mars3d-cesium 1.96.2 → 1.96.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Cesium/Cesium.js +11 -11
- package/Build/Cesium/ThirdParty/Workers/basis_transcoder.js +1 -1
- package/Build/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +1 -1
- package/Build/Cesium/ThirdParty/Workers/package.js +1 -1
- package/Build/Cesium/ThirdParty/Workers/pako_deflate.min.js +1 -1
- package/Build/Cesium/ThirdParty/Workers/pako_inflate.min.js +1 -1
- package/Build/Cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/Build/Cesium/ThirdParty/google-earth-dbroot-parser.js +1 -1
- package/Build/Cesium/Workers/{ArcType-b570b3ee.js → ArcType-2a3adffe.js} +1 -1
- package/Build/Cesium/Workers/ArcType-8a3a359b.js +1 -1
- package/Build/Cesium/Workers/{AttributeCompression-f967afc2.js → AttributeCompression-62b0e919.js} +2 -2
- package/Build/Cesium/Workers/{AxisAlignedBoundingBox-b14143c9.js → AxisAlignedBoundingBox-f7daa7b3.js} +2 -2
- package/Build/Cesium/Workers/{BoundingRectangle-d55ba9f7.js → BoundingRectangle-32cfbde7.js} +2 -2
- package/Build/Cesium/Workers/{BoxGeometry-07b61a36.js → BoxGeometry-5923382d.js} +2 -2
- package/Build/Cesium/Workers/{Color-661a230d.js → Color-12a018a9.js} +2 -2
- package/Build/Cesium/Workers/{ComponentDatatype-6ff7d2c3.js → ComponentDatatype-94a172c0.js} +2 -2
- package/Build/Cesium/Workers/ComponentDatatype-98788316.js +1 -1
- package/Build/Cesium/Workers/CoplanarPolygonGeometryLibrary-c2f2cb73.js +25 -0
- package/Build/Cesium/Workers/{CorridorGeometryLibrary-4ce028fc.js → CorridorGeometryLibrary-55a354d3.js} +2 -2
- package/Build/Cesium/Workers/{CylinderGeometry-dbd49111.js → CylinderGeometry-79e44bab.js} +2 -2
- package/Build/Cesium/Workers/{CylinderGeometryLibrary-24ffef71.js → CylinderGeometryLibrary-8ab6de01.js} +2 -2
- package/Build/Cesium/Workers/CylinderGeometryLibrary-d4a4174d.js +1 -1
- package/Build/Cesium/Workers/{EllipseGeometry-197109d7.js → EllipseGeometry-7b3fe578.js} +2 -2
- package/Build/Cesium/Workers/{EllipseGeometryLibrary-402d6780.js → EllipseGeometryLibrary-ad4a5b4c.js} +2 -2
- package/Build/Cesium/Workers/{EllipseOutlineGeometry-bde24798.js → EllipseOutlineGeometry-3068b696.js} +2 -2
- package/Build/Cesium/Workers/{EllipsoidGeodesic-84738e5f.js → EllipsoidGeodesic-11e914fe.js} +2 -2
- package/Build/Cesium/Workers/{EllipsoidGeometry-1d494c03.js → EllipsoidGeometry-32972807.js} +2 -2
- package/Build/Cesium/Workers/{EllipsoidOutlineGeometry-86039893.js → EllipsoidOutlineGeometry-ec57863c.js} +2 -2
- package/Build/Cesium/Workers/{EllipsoidRhumbLine-c3b11f35.js → EllipsoidRhumbLine-49eb2f6d.js} +2 -2
- package/Build/Cesium/Workers/{EllipsoidTangentPlane-12fe3e10.js → EllipsoidTangentPlane-ecc006c3.js} +2 -2
- package/Build/Cesium/Workers/{EncodedCartesian3-1e797130.js → EncodedCartesian3-222548c7.js} +2 -2
- package/Build/Cesium/Workers/{FrustumGeometry-7dd263a9.js → FrustumGeometry-5b18c3b7.js} +2 -2
- package/Build/Cesium/Workers/{GeometryAttribute-29ed65a7.js → GeometryAttribute-4daab906.js} +2 -2
- package/Build/Cesium/Workers/GeometryAttributes-98e858da.js +1 -1
- package/Build/Cesium/Workers/{GeometryAttributes-cb1bf806.js → GeometryAttributes-a490dcf1.js} +2 -2
- package/Build/Cesium/Workers/{GeometryInstance-8a2d7ac1.js → GeometryInstance-19520f53.js} +2 -2
- package/Build/Cesium/Workers/{GeometryOffsetAttribute-ddcc2f7f.js → GeometryOffsetAttribute-62f885db.js} +1 -1
- package/Build/Cesium/Workers/GeometryOffsetAttribute-da11568b.js +1 -1
- package/Build/Cesium/Workers/{GeometryPipeline-9eaa7fbb.js → GeometryPipeline-f0a1ad88.js} +2 -2
- package/Build/Cesium/Workers/{IndexDatatype-d42fd89c.js → IndexDatatype-33d13dff.js} +2 -2
- package/Build/Cesium/Workers/IndexDatatype-be82b350.js +1 -1
- package/Build/Cesium/Workers/{IntersectionTests-1cdbb657.js → IntersectionTests-8b7c8657.js} +2 -2
- package/Build/Cesium/Workers/{Matrix2-735f0ea9.js → Matrix2-c788e106.js} +2 -2
- package/Build/Cesium/Workers/{OrientedBoundingBox-771a41b6.js → OrientedBoundingBox-917a4be5.js} +2 -2
- package/Build/Cesium/Workers/Plane-f81558db.js +25 -0
- package/Build/Cesium/Workers/{PolygonGeometryLibrary-b5d25b76.js → PolygonGeometryLibrary-343a1da6.js} +2 -2
- package/Build/Cesium/Workers/{PolygonPipeline-71c413e2.js → PolygonPipeline-38b4288d.js} +2 -2
- package/Build/Cesium/Workers/{PolylinePipeline-4244f016.js → PolylinePipeline-91ecbec7.js} +2 -2
- package/Build/Cesium/Workers/{PolylineVolumeGeometryLibrary-1c97d86c.js → PolylineVolumeGeometryLibrary-eae5ef7f.js} +2 -2
- package/Build/Cesium/Workers/{PrimitivePipeline-6579baa1.js → PrimitivePipeline-98819346.js} +2 -2
- package/Build/Cesium/Workers/RectangleGeometryLibrary-46c88be3.js +25 -0
- package/Build/Cesium/Workers/{RuntimeError-17a7ed3d.js → RuntimeError-50f3c270.js} +2 -2
- package/Build/Cesium/Workers/RuntimeError-a977b8e0.js +1 -1
- package/Build/Cesium/Workers/{TerrainEncoding-d51253d2.js → TerrainEncoding-fef638a6.js} +2 -2
- package/Build/Cesium/Workers/{Transforms-b683baff.js → Transforms-fae4cdf7.js} +2 -2
- package/Build/Cesium/Workers/VertexFormat-3518f543.js +1 -1
- package/Build/Cesium/Workers/{VertexFormat-4362bb4a.js → VertexFormat-a34558d6.js} +2 -2
- package/Build/Cesium/Workers/{WallGeometryLibrary-135603d8.js → WallGeometryLibrary-91f03d48.js} +2 -2
- package/Build/Cesium/Workers/WebGLConstants-0ff1ce58.js +1 -1
- package/Build/Cesium/Workers/{WebGLConstants-d878ea52.js → WebGLConstants-cbf0dab7.js} +1 -1
- package/Build/Cesium/Workers/{WebMercatorProjection-4d21b562.js → WebMercatorProjection-3ff867a8.js} +2 -2
- package/Build/Cesium/Workers/_commonjsHelpers-3aae1032-f55dc0c4.js +1 -1
- package/Build/Cesium/Workers/{_commonjsHelpers-c27c962c.js → _commonjsHelpers-d90b2ade.js} +1 -1
- package/Build/Cesium/Workers/arrayRemoveDuplicates-50333467.js +25 -0
- package/Build/Cesium/Workers/arrayRemoveDuplicates-568a8f01.js +1 -1
- package/Build/Cesium/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/Build/Cesium/Workers/combine-13bb426d.js +1 -1
- package/Build/Cesium/Workers/{combine-c04aaa26.js → combine-4bf14979.js} +2 -2
- package/Build/Cesium/Workers/combineGeometry.js +2 -2
- package/Build/Cesium/Workers/createBoxGeometry.js +2 -2
- package/Build/Cesium/Workers/createBoxOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCircleGeometry.js +2 -2
- package/Build/Cesium/Workers/createCircleOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/Build/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCorridorGeometry.js +2 -2
- package/Build/Cesium/Workers/createCorridorOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCylinderGeometry.js +2 -2
- package/Build/Cesium/Workers/createCylinderOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipseGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipseOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipsoidGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createFrustumGeometry.js +2 -2
- package/Build/Cesium/Workers/createFrustumOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createGeometry.js +2 -2
- package/Build/Cesium/Workers/createGroundPolylineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPlaneGeometry.js +2 -2
- package/Build/Cesium/Workers/createPlaneOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolygonGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolygonOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolylineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolylineVolumeGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createRectangleGeometry.js +2 -2
- package/Build/Cesium/Workers/createRectangleOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createSimplePolylineGeometry.js +2 -2
- package/Build/Cesium/Workers/createSphereGeometry.js +2 -2
- package/Build/Cesium/Workers/createSphereOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createTaskProcessorWorker.js +2 -2
- package/Build/Cesium/Workers/createVectorTileClampedPolylines.js +2 -2
- package/Build/Cesium/Workers/createVectorTileGeometries.js +2 -2
- package/Build/Cesium/Workers/createVectorTilePoints.js +2 -2
- package/Build/Cesium/Workers/createVectorTilePolygons.js +2 -2
- package/Build/Cesium/Workers/createVectorTilePolylines.js +2 -2
- package/Build/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/Build/Cesium/Workers/createVerticesFromHeightmap.js +2 -2
- package/Build/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/Build/Cesium/Workers/createWallGeometry.js +2 -2
- package/Build/Cesium/Workers/createWallOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/decodeDraco.js +2 -2
- package/Build/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/Build/Cesium/Workers/defaultValue-028a8a27.js +1 -1
- package/Build/Cesium/Workers/{defaultValue-6ed27e8d.js → defaultValue-77c08f32.js} +1 -1
- package/Build/Cesium/Workers/package.js +1 -1
- package/Build/Cesium/Workers/transcodeKTX2.js +2 -2
- package/Build/Cesium/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/Build/Cesium/index.cjs +13 -13
- package/Build/Cesium/index.js +11 -11
- package/package.json +4 -7
- package/Build/Cesium/Workers/CoplanarPolygonGeometryLibrary-81615a1e.js +0 -25
- package/Build/Cesium/Workers/Plane-6c77dfaf.js +0 -25
- package/Build/Cesium/Workers/RectangleGeometryLibrary-2d6a51a1.js +0 -25
- package/Build/Cesium/Workers/arrayRemoveDuplicates-d332a3bf.js +0 -25
- package/Build/package.json +0 -1
package/Build/Cesium/Cesium.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.96
|
|
4
|
+
* Version 1.96.3
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -84,22 +84,22 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
84
84
|
`),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3)):this.noSleepVideo.play()}disable(){YY?this.noSleepTimer&&(console.warn(`
|
|
85
85
|
NoSleep now disabled for older iOS devices.
|
|
86
86
|
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}};kxe.exports=XY});var $1=_o(jc=>{"use strict";var C0t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function A0t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}jc.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(!!n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var i in n)A0t(n,i)&&(e[i]=n[i])}}return e};jc.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var T0t={arraySet:function(e,t,n,i,o){if(t.subarray&&e.subarray){e.set(t.subarray(n,n+i),o);return}for(var r=0;r<i;r++)e[o+r]=t[n+r]},flattenChunks:function(e){var t,n,i,o,r,s;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(s=new Uint8Array(i),o=0,t=0,n=e.length;t<n;t++)r=e[t],s.set(r,o),o+=r.length;return s}},b0t={arraySet:function(e,t,n,i,o){for(var r=0;r<i;r++)e[o+r]=t[n+r]},flattenChunks:function(e){return[].concat.apply([],e)}};jc.setTyped=function(e){e?(jc.Buf8=Uint8Array,jc.Buf16=Uint16Array,jc.Buf32=Int32Array,jc.assign(jc,T0t)):(jc.Buf8=Array,jc.Buf16=Array,jc.Buf32=Array,jc.assign(jc,b0t))};jc.setTyped(C0t)});var Hxe=_o((lji,zxe)=>{"use strict";function E0t(e,t,n,i){for(var o=e&65535|0,r=e>>>16&65535|0,s=0;n!==0;){s=n>2e3?2e3:n,n-=s;do o=o+t[i++]|0,r=r+o|0;while(--s);o%=65521,r%=65521}return o|r<<16|0}zxe.exports=E0t});var Wxe=_o((uji,Gxe)=>{"use strict";function S0t(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var w0t=S0t();function v0t(e,t,n,i){var o=w0t,r=i+n;e^=-1;for(var s=i;s<r;s++)e=e>>>8^o[(e^t[s])&255];return e^-1}Gxe.exports=v0t});var qxe=_o((fji,jxe)=>{"use strict";var J4=30,D0t=12;jxe.exports=function(t,n){var i,o,r,s,a,c,u,f,d,p,_,m,x,C,A,T,b,S,w,D,O,I,L,N,g;i=t.state,o=t.next_in,N=t.input,r=o+(t.avail_in-5),s=t.next_out,g=t.output,a=s-(n-t.avail_out),c=s+(t.avail_out-257),u=i.dmax,f=i.wsize,d=i.whave,p=i.wnext,_=i.window,m=i.hold,x=i.bits,C=i.lencode,A=i.distcode,T=(1<<i.lenbits)-1,b=(1<<i.distbits)-1;e:do{x<15&&(m+=N[o++]<<x,x+=8,m+=N[o++]<<x,x+=8),S=C[m&T];t:for(;;){if(w=S>>>24,m>>>=w,x-=w,w=S>>>16&255,w===0)g[s++]=S&65535;else if(w&16){D=S&65535,w&=15,w&&(x<w&&(m+=N[o++]<<x,x+=8),D+=m&(1<<w)-1,m>>>=w,x-=w),x<15&&(m+=N[o++]<<x,x+=8,m+=N[o++]<<x,x+=8),S=A[m&b];n:for(;;){if(w=S>>>24,m>>>=w,x-=w,w=S>>>16&255,w&16){if(O=S&65535,w&=15,x<w&&(m+=N[o++]<<x,x+=8,x<w&&(m+=N[o++]<<x,x+=8)),O+=m&(1<<w)-1,O>u){t.msg="invalid distance too far back",i.mode=J4;break e}if(m>>>=w,x-=w,w=s-a,O>w){if(w=O-w,w>d&&i.sane){t.msg="invalid distance too far back",i.mode=J4;break e}if(I=0,L=_,p===0){if(I+=f-w,w<D){D-=w;do g[s++]=_[I++];while(--w);I=s-O,L=g}}else if(p<w){if(I+=f+p-w,w-=p,w<D){D-=w;do g[s++]=_[I++];while(--w);if(I=0,p<D){w=p,D-=w;do g[s++]=_[I++];while(--w);I=s-O,L=g}}}else if(I+=p-w,w<D){D-=w;do g[s++]=_[I++];while(--w);I=s-O,L=g}for(;D>2;)g[s++]=L[I++],g[s++]=L[I++],g[s++]=L[I++],D-=3;D&&(g[s++]=L[I++],D>1&&(g[s++]=L[I++]))}else{I=s-O;do g[s++]=g[I++],g[s++]=g[I++],g[s++]=g[I++],D-=3;while(D>2);D&&(g[s++]=g[I++],D>1&&(g[s++]=g[I++]))}}else if((w&64)===0){S=A[(S&65535)+(m&(1<<w)-1)];continue n}else{t.msg="invalid distance code",i.mode=J4;break e}break}}else if((w&64)===0){S=C[(S&65535)+(m&(1<<w)-1)];continue t}else if(w&32){i.mode=D0t;break e}else{t.msg="invalid literal/length code",i.mode=J4;break e}break}}while(o<r&&s<c);D=x>>3,o-=D,x-=D<<3,m&=(1<<x)-1,t.next_in=o,t.next_out=s,t.avail_in=o<r?5+(r-o):5-(o-r),t.avail_out=s<c?257+(c-s):257-(s-c),i.hold=m,i.bits=x}});var Qxe=_o((dji,Jxe)=>{"use strict";var Yxe=$1(),XE=15,Xxe=852,Kxe=592,$xe=0,KY=1,Zxe=2,P0t=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],I0t=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],O0t=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],R0t=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Jxe.exports=function(t,n,i,o,r,s,a,c){var u=c.bits,f=0,d=0,p=0,_=0,m=0,x=0,C=0,A=0,T=0,b=0,S,w,D,O,I,L=null,N=0,g,E=new Yxe.Buf16(XE+1),v=new Yxe.Buf16(XE+1),P=null,M=0,V,U,k;for(f=0;f<=XE;f++)E[f]=0;for(d=0;d<o;d++)E[n[i+d]]++;for(m=u,_=XE;_>=1&&E[_]===0;_--);if(m>_&&(m=_),_===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,c.bits=1,0;for(p=1;p<_&&E[p]===0;p++);for(m<p&&(m=p),A=1,f=1;f<=XE;f++)if(A<<=1,A-=E[f],A<0)return-1;if(A>0&&(t===$xe||_!==1))return-1;for(v[1]=0,f=1;f<XE;f++)v[f+1]=v[f]+E[f];for(d=0;d<o;d++)n[i+d]!==0&&(a[v[n[i+d]]++]=d);if(t===$xe?(L=P=a,g=19):t===KY?(L=P0t,N-=257,P=I0t,M-=257,g=256):(L=O0t,P=R0t,g=-1),b=0,d=0,f=p,I=s,x=m,C=0,D=-1,T=1<<m,O=T-1,t===KY&&T>Xxe||t===Zxe&&T>Kxe)return 1;for(;;){V=f-C,a[d]<g?(U=0,k=a[d]):a[d]>g?(U=P[M+a[d]],k=L[N+a[d]]):(U=32+64,k=0),S=1<<f-C,w=1<<x,p=w;do w-=S,r[I+(b>>C)+w]=V<<24|U<<16|k|0;while(w!==0);for(S=1<<f-1;b&S;)S>>=1;if(S!==0?(b&=S-1,b+=S):b=0,d++,--E[f]===0){if(f===_)break;f=n[i+a[d]]}if(f>m&&(b&O)!==D){for(C===0&&(C=m),I+=p,x=f-C,A=1<<x;x+C<_&&(A-=E[x+C],!(A<=0));)x++,A<<=1;if(T+=1<<x,t===KY&&T>Xxe||t===Zxe&&T>Kxe)return 1;D=b&O,r[D]=m<<24|x<<16|I-s|0}}return b!==0&&(r[I+b]=f-C<<24|64<<16|0),c.bits=m,0}});var BCe=_o(oh=>{"use strict";var Ou=$1(),tX=Hxe(),Dm=Wxe(),M0t=qxe(),Z1=Qxe(),B0t=0,SCe=1,wCe=2,eCe=4,L0t=5,Q4=6,EC=0,N0t=1,F0t=2,Gf=-2,vCe=-3,nX=-4,V0t=-5,tCe=8,DCe=1,nCe=2,iCe=3,oCe=4,rCe=5,sCe=6,aCe=7,cCe=8,lCe=9,uCe=10,nz=11,l_=12,$Y=13,fCe=14,ZY=15,dCe=16,hCe=17,mCe=18,pCe=19,ez=20,tz=21,_Ce=22,gCe=23,yCe=24,xCe=25,CCe=26,JY=27,ACe=28,TCe=29,Dr=30,iX=31,k0t=32,U0t=852,z0t=592,H0t=15,G0t=H0t;function bCe(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function W0t(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ou.Buf16(320),this.work=new Ou.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function PCe(e){var t;return!e||!e.state?Gf:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=DCe,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ou.Buf32(U0t),t.distcode=t.distdyn=new Ou.Buf32(z0t),t.sane=1,t.back=-1,EC)}function ICe(e){var t;return!e||!e.state?Gf:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,PCe(e))}function OCe(e,t){var n,i;return!e||!e.state||(i=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Gf:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,ICe(e))}function RCe(e,t){var n,i;return e?(i=new W0t,e.state=i,i.window=null,n=OCe(e,t),n!==EC&&(e.state=null),n):Gf}function j0t(e){return RCe(e,G0t)}var ECe=!0,QY,eX;function q0t(e){if(ECe){var t;for(QY=new Ou.Buf32(512),eX=new Ou.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Z1(SCe,e.lens,0,288,QY,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Z1(wCe,e.lens,0,32,eX,0,e.work,{bits:5}),ECe=!1}e.lencode=QY,e.lenbits=9,e.distcode=eX,e.distbits=5}function MCe(e,t,n,i){var o,r=e.state;return r.window===null&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Ou.Buf8(r.wsize)),i>=r.wsize?(Ou.arraySet(r.window,t,n-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(o=r.wsize-r.wnext,o>i&&(o=i),Ou.arraySet(r.window,t,n-i,o,r.wnext),i-=o,i?(Ou.arraySet(r.window,t,n-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=o,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=o))),0}function Y0t(e,t){var n,i,o,r,s,a,c,u,f,d,p,_,m,x,C=0,A,T,b,S,w,D,O,I,L=new Ou.Buf8(4),N,g,E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Gf;n=e.state,n.mode===l_&&(n.mode=$Y),s=e.next_out,o=e.output,c=e.avail_out,r=e.next_in,i=e.input,a=e.avail_in,u=n.hold,f=n.bits,d=a,p=c,I=EC;e:for(;;)switch(n.mode){case DCe:if(n.wrap===0){n.mode=$Y;break}for(;f<16;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(n.wrap&2&&u===35615){n.check=0,L[0]=u&255,L[1]=u>>>8&255,n.check=Dm(n.check,L,2,0),u=0,f=0,n.mode=nCe;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=Dr;break}if((u&15)!==tCe){e.msg="unknown compression method",n.mode=Dr;break}if(u>>>=4,f-=4,O=(u&15)+8,n.wbits===0)n.wbits=O;else if(O>n.wbits){e.msg="invalid window size",n.mode=Dr;break}n.dmax=1<<O,e.adler=n.check=1,n.mode=u&512?uCe:l_,u=0,f=0;break;case nCe:for(;f<16;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(n.flags=u,(n.flags&255)!==tCe){e.msg="unknown compression method",n.mode=Dr;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Dr;break}n.head&&(n.head.text=u>>8&1),n.flags&512&&(L[0]=u&255,L[1]=u>>>8&255,n.check=Dm(n.check,L,2,0)),u=0,f=0,n.mode=iCe;case iCe:for(;f<32;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}n.head&&(n.head.time=u),n.flags&512&&(L[0]=u&255,L[1]=u>>>8&255,L[2]=u>>>16&255,L[3]=u>>>24&255,n.check=Dm(n.check,L,4,0)),u=0,f=0,n.mode=oCe;case oCe:for(;f<16;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}n.head&&(n.head.xflags=u&255,n.head.os=u>>8),n.flags&512&&(L[0]=u&255,L[1]=u>>>8&255,n.check=Dm(n.check,L,2,0)),u=0,f=0,n.mode=rCe;case rCe:if(n.flags&1024){for(;f<16;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}n.length=u,n.head&&(n.head.extra_len=u),n.flags&512&&(L[0]=u&255,L[1]=u>>>8&255,n.check=Dm(n.check,L,2,0)),u=0,f=0}else n.head&&(n.head.extra=null);n.mode=sCe;case sCe:if(n.flags&1024&&(_=n.length,_>a&&(_=a),_&&(n.head&&(O=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Ou.arraySet(n.head.extra,i,r,_,O)),n.flags&512&&(n.check=Dm(n.check,i,_,r)),a-=_,r+=_,n.length-=_),n.length))break e;n.length=0,n.mode=aCe;case aCe:if(n.flags&2048){if(a===0)break e;_=0;do O=i[r+_++],n.head&&O&&n.length<65536&&(n.head.name+=String.fromCharCode(O));while(O&&_<a);if(n.flags&512&&(n.check=Dm(n.check,i,_,r)),a-=_,r+=_,O)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=cCe;case cCe:if(n.flags&4096){if(a===0)break e;_=0;do O=i[r+_++],n.head&&O&&n.length<65536&&(n.head.comment+=String.fromCharCode(O));while(O&&_<a);if(n.flags&512&&(n.check=Dm(n.check,i,_,r)),a-=_,r+=_,O)break e}else n.head&&(n.head.comment=null);n.mode=lCe;case lCe:if(n.flags&512){for(;f<16;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(u!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Dr;break}u=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=l_;break;case uCe:for(;f<32;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}e.adler=n.check=bCe(u),u=0,f=0,n.mode=nz;case nz:if(n.havedict===0)return e.next_out=s,e.avail_out=c,e.next_in=r,e.avail_in=a,n.hold=u,n.bits=f,F0t;e.adler=n.check=1,n.mode=l_;case l_:if(t===L0t||t===Q4)break e;case $Y:if(n.last){u>>>=f&7,f-=f&7,n.mode=JY;break}for(;f<3;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}switch(n.last=u&1,u>>>=1,f-=1,u&3){case 0:n.mode=fCe;break;case 1:if(q0t(n),n.mode=ez,t===Q4){u>>>=2,f-=2;break e}break;case 2:n.mode=hCe;break;case 3:e.msg="invalid block type",n.mode=Dr}u>>>=2,f-=2;break;case fCe:for(u>>>=f&7,f-=f&7;f<32;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Dr;break}if(n.length=u&65535,u=0,f=0,n.mode=ZY,t===Q4)break e;case ZY:n.mode=dCe;case dCe:if(_=n.length,_){if(_>a&&(_=a),_>c&&(_=c),_===0)break e;Ou.arraySet(o,i,r,_,s),a-=_,r+=_,c-=_,s+=_,n.length-=_;break}n.mode=l_;break;case hCe:for(;f<14;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(n.nlen=(u&31)+257,u>>>=5,f-=5,n.ndist=(u&31)+1,u>>>=5,f-=5,n.ncode=(u&15)+4,u>>>=4,f-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Dr;break}n.have=0,n.mode=mCe;case mCe:for(;n.have<n.ncode;){for(;f<3;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}n.lens[E[n.have++]]=u&7,u>>>=3,f-=3}for(;n.have<19;)n.lens[E[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,N={bits:n.lenbits},I=Z1(B0t,n.lens,0,19,n.lencode,0,n.work,N),n.lenbits=N.bits,I){e.msg="invalid code lengths set",n.mode=Dr;break}n.have=0,n.mode=pCe;case pCe:for(;n.have<n.nlen+n.ndist;){for(;C=n.lencode[u&(1<<n.lenbits)-1],A=C>>>24,T=C>>>16&255,b=C&65535,!(A<=f);){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(b<16)u>>>=A,f-=A,n.lens[n.have++]=b;else{if(b===16){for(g=A+2;f<g;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(u>>>=A,f-=A,n.have===0){e.msg="invalid bit length repeat",n.mode=Dr;break}O=n.lens[n.have-1],_=3+(u&3),u>>>=2,f-=2}else if(b===17){for(g=A+3;f<g;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}u>>>=A,f-=A,O=0,_=3+(u&7),u>>>=3,f-=3}else{for(g=A+7;f<g;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}u>>>=A,f-=A,O=0,_=11+(u&127),u>>>=7,f-=7}if(n.have+_>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Dr;break}for(;_--;)n.lens[n.have++]=O}}if(n.mode===Dr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Dr;break}if(n.lenbits=9,N={bits:n.lenbits},I=Z1(SCe,n.lens,0,n.nlen,n.lencode,0,n.work,N),n.lenbits=N.bits,I){e.msg="invalid literal/lengths set",n.mode=Dr;break}if(n.distbits=6,n.distcode=n.distdyn,N={bits:n.distbits},I=Z1(wCe,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,N),n.distbits=N.bits,I){e.msg="invalid distances set",n.mode=Dr;break}if(n.mode=ez,t===Q4)break e;case ez:n.mode=tz;case tz:if(a>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=r,e.avail_in=a,n.hold=u,n.bits=f,M0t(e,p),s=e.next_out,o=e.output,c=e.avail_out,r=e.next_in,i=e.input,a=e.avail_in,u=n.hold,f=n.bits,n.mode===l_&&(n.back=-1);break}for(n.back=0;C=n.lencode[u&(1<<n.lenbits)-1],A=C>>>24,T=C>>>16&255,b=C&65535,!(A<=f);){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(T&&(T&240)===0){for(S=A,w=T,D=b;C=n.lencode[D+((u&(1<<S+w)-1)>>S)],A=C>>>24,T=C>>>16&255,b=C&65535,!(S+A<=f);){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}u>>>=S,f-=S,n.back+=S}if(u>>>=A,f-=A,n.back+=A,n.length=b,T===0){n.mode=CCe;break}if(T&32){n.back=-1,n.mode=l_;break}if(T&64){e.msg="invalid literal/length code",n.mode=Dr;break}n.extra=T&15,n.mode=_Ce;case _Ce:if(n.extra){for(g=n.extra;f<g;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=gCe;case gCe:for(;C=n.distcode[u&(1<<n.distbits)-1],A=C>>>24,T=C>>>16&255,b=C&65535,!(A<=f);){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if((T&240)===0){for(S=A,w=T,D=b;C=n.distcode[D+((u&(1<<S+w)-1)>>S)],A=C>>>24,T=C>>>16&255,b=C&65535,!(S+A<=f);){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}u>>>=S,f-=S,n.back+=S}if(u>>>=A,f-=A,n.back+=A,T&64){e.msg="invalid distance code",n.mode=Dr;break}n.offset=b,n.extra=T&15,n.mode=yCe;case yCe:if(n.extra){for(g=n.extra;f<g;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Dr;break}n.mode=xCe;case xCe:if(c===0)break e;if(_=p-c,n.offset>_){if(_=n.offset-_,_>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Dr;break}_>n.wnext?(_-=n.wnext,m=n.wsize-_):m=n.wnext-_,_>n.length&&(_=n.length),x=n.window}else x=o,m=s-n.offset,_=n.length;_>c&&(_=c),c-=_,n.length-=_;do o[s++]=x[m++];while(--_);n.length===0&&(n.mode=tz);break;case CCe:if(c===0)break e;o[s++]=n.length,c--,n.mode=tz;break;case JY:if(n.wrap){for(;f<32;){if(a===0)break e;a--,u|=i[r++]<<f,f+=8}if(p-=c,e.total_out+=p,n.total+=p,p&&(e.adler=n.check=n.flags?Dm(n.check,o,p,s-p):tX(n.check,o,p,s-p)),p=c,(n.flags?u:bCe(u))!==n.check){e.msg="incorrect data check",n.mode=Dr;break}u=0,f=0}n.mode=ACe;case ACe:if(n.wrap&&n.flags){for(;f<32;){if(a===0)break e;a--,u+=i[r++]<<f,f+=8}if(u!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Dr;break}u=0,f=0}n.mode=TCe;case TCe:I=N0t;break e;case Dr:I=vCe;break e;case iX:return nX;case k0t:default:return Gf}return e.next_out=s,e.avail_out=c,e.next_in=r,e.avail_in=a,n.hold=u,n.bits=f,(n.wsize||p!==e.avail_out&&n.mode<Dr&&(n.mode<JY||t!==eCe))&&MCe(e,e.output,e.next_out,p-e.avail_out)?(n.mode=iX,nX):(d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,n.total+=p,n.wrap&&p&&(e.adler=n.check=n.flags?Dm(n.check,o,p,e.next_out-p):tX(n.check,o,p,e.next_out-p)),e.data_type=n.bits+(n.last?64:0)+(n.mode===l_?128:0)+(n.mode===ez||n.mode===ZY?256:0),(d===0&&p===0||t===eCe)&&I===EC&&(I=V0t),I)}function X0t(e){if(!e||!e.state)return Gf;var t=e.state;return t.window&&(t.window=null),e.state=null,EC}function K0t(e,t){var n;return!e||!e.state||(n=e.state,(n.wrap&2)===0)?Gf:(n.head=t,t.done=!1,EC)}function $0t(e,t){var n=t.length,i,o,r;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==nz)?Gf:i.mode===nz&&(o=1,o=tX(o,t,n,0),o!==i.check)?vCe:(r=MCe(e,t,n,n),r?(i.mode=iX,nX):(i.havedict=1,EC))}oh.inflateReset=ICe;oh.inflateReset2=OCe;oh.inflateResetKeep=PCe;oh.inflateInit=j0t;oh.inflateInit2=RCe;oh.inflate=Y0t;oh.inflateEnd=X0t;oh.inflateGetHeader=K0t;oh.inflateSetDictionary=$0t;oh.inflateInfo="pako inflate (from Nodeca project)"});var VCe=_o(KE=>{"use strict";var iz=$1(),LCe=!0,NCe=!0;try{String.fromCharCode.apply(null,[0])}catch{LCe=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{NCe=!1}var J1=new iz.Buf8(256);for(u_=0;u_<256;u_++)J1[u_]=u_>=252?6:u_>=248?5:u_>=240?4:u_>=224?3:u_>=192?2:1;var u_;J1[254]=J1[254]=1;KE.string2buf=function(e){var t,n,i,o,r,s=e.length,a=0;for(o=0;o<s;o++)n=e.charCodeAt(o),(n&64512)===55296&&o+1<s&&(i=e.charCodeAt(o+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),o++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new iz.Buf8(a),r=0,o=0;r<a;o++)n=e.charCodeAt(o),(n&64512)===55296&&o+1<s&&(i=e.charCodeAt(o+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),o++)),n<128?t[r++]=n:n<2048?(t[r++]=192|n>>>6,t[r++]=128|n&63):n<65536?(t[r++]=224|n>>>12,t[r++]=128|n>>>6&63,t[r++]=128|n&63):(t[r++]=240|n>>>18,t[r++]=128|n>>>12&63,t[r++]=128|n>>>6&63,t[r++]=128|n&63);return t};function FCe(e,t){if(t<65534&&(e.subarray&&NCe||!e.subarray&&LCe))return String.fromCharCode.apply(null,iz.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}KE.buf2binstring=function(e){return FCe(e,e.length)};KE.binstring2buf=function(e){for(var t=new iz.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t};KE.buf2string=function(e,t){var n,i,o,r,s=t||e.length,a=new Array(s*2);for(i=0,n=0;n<s;){if(o=e[n++],o<128){a[i++]=o;continue}if(r=J1[o],r>4){a[i++]=65533,n+=r-1;continue}for(o&=r===2?31:r===3?15:7;r>1&&n<s;)o=o<<6|e[n++]&63,r--;if(r>1){a[i++]=65533;continue}o<65536?a[i++]=o:(o-=65536,a[i++]=55296|o>>10&1023,a[i++]=56320|o&1023)}return FCe(a,i)};KE.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+J1[e[n]]>t?n:t}});var UCe=_o((pji,kCe)=>{"use strict";kCe.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var HCe=_o((_ji,zCe)=>{"use strict";zCe.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var WCe=_o((gji,GCe)=>{"use strict";function Z0t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}GCe.exports=Z0t});var qCe=_o((yji,jCe)=>{"use strict";function J0t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}jCe.exports=J0t});var XCe=_o(eP=>{"use strict";var $E=BCe(),Q1=$1(),oz=VCe(),cs=UCe(),oX=HCe(),Q0t=WCe(),eyt=qCe(),YCe=Object.prototype.toString;function SC(e){if(!(this instanceof SC))return new SC(e);this.options=Q1.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Q0t,this.strm.avail_out=0;var n=$E.inflateInit2(this.strm,t.windowBits);if(n!==cs.Z_OK)throw new Error(oX[n]);if(this.header=new eyt,$E.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=oz.string2buf(t.dictionary):YCe.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=$E.inflateSetDictionary(this.strm,t.dictionary),n!==cs.Z_OK)))throw new Error(oX[n])}SC.prototype.push=function(e,t){var n=this.strm,i=this.options.chunkSize,o=this.options.dictionary,r,s,a,c,u,f=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?cs.Z_FINISH:cs.Z_NO_FLUSH,typeof e=="string"?n.input=oz.binstring2buf(e):YCe.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Q1.Buf8(i),n.next_out=0,n.avail_out=i),r=$E.inflate(n,cs.Z_NO_FLUSH),r===cs.Z_NEED_DICT&&o&&(r=$E.inflateSetDictionary(this.strm,o)),r===cs.Z_BUF_ERROR&&f===!0&&(r=cs.Z_OK,f=!1),r!==cs.Z_STREAM_END&&r!==cs.Z_OK)return this.onEnd(r),this.ended=!0,!1;n.next_out&&(n.avail_out===0||r===cs.Z_STREAM_END||n.avail_in===0&&(s===cs.Z_FINISH||s===cs.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=oz.utf8border(n.output,n.next_out),c=n.next_out-a,u=oz.buf2string(n.output,a),n.next_out=c,n.avail_out=i-c,c&&Q1.arraySet(n.output,n.output,a,c,0),this.onData(u)):this.onData(Q1.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(f=!0)}while((n.avail_in>0||n.avail_out===0)&&r!==cs.Z_STREAM_END);return r===cs.Z_STREAM_END&&(s=cs.Z_FINISH),s===cs.Z_FINISH?(r=$E.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===cs.Z_OK):(s===cs.Z_SYNC_FLUSH&&(this.onEnd(cs.Z_OK),n.avail_out=0),!0)};SC.prototype.onData=function(e){this.chunks.push(e)};SC.prototype.onEnd=function(e){e===cs.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Q1.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function rX(e,t){var n=new SC(t);if(n.push(e,!0),n.err)throw n.msg||oX[n.err];return n.result}function tyt(e,t){return t=t||{},t.raw=!0,rX(e,t)}eP.Inflate=SC;eP.inflate=rX;eP.inflateRaw=tyt;eP.ungzip=rX});var vxt={};y8(vxt,{AlphaMode:()=>wp,AlphaPipelineStage:()=>EF,Animation:()=>fz,AnimationViewModel:()=>dz,Appearance:()=>to,ApproximateTerrainHeights:()=>ai,ArcGISTiledElevationTerrainProvider:()=>Y$,ArcGisMapServerImageryProvider:()=>I0,ArcType:()=>Yt,ArticulationStageType:()=>_c,AssociativeArray:()=>gt,AttributeCompression:()=>Pn,AttributeType:()=>jt,AutoExposure:()=>JV,Autolinker:()=>Zx,AutomaticUniforms:()=>hg,Axis:()=>In,AxisAlignedBoundingBox:()=>ry,B3dmLoader:()=>u2,B3dmParser:()=>WT,BaseLayerPicker:()=>pz,BaseLayerPickerViewModel:()=>hz,BatchTable:()=>bT,BatchTableHierarchy:()=>Ic,BatchTexture:()=>xo,BatchTexturePipelineStage:()=>SF,Batched3DModel3DTileContent:()=>hN,Billboard:()=>Ao,BillboardCollection:()=>uf,BillboardGraphics:()=>Ec,BillboardVisualizer:()=>eR,BingMapsGeocoderService:()=>Q$,BingMapsImageryProvider:()=>tk,BingMapsStyle:()=>QV,BlendEquation:()=>qa,BlendFunction:()=>Io,BlendOption:()=>Oo,BlendingState:()=>un,BoundingRectangle:()=>qe,BoundingSphere:()=>oe,BoundingSphereState:()=>lt,BoxEmitter:()=>y_e,BoxGeometry:()=>Vl,BoxGeometryUpdater:()=>DL,BoxGraphics:()=>PT,BoxOutlineGeometry:()=>xh,BrdfLutGenerator:()=>ik,Buffer:()=>ut,BufferLoader:()=>Rc,BufferUsage:()=>Fe,CPUStylingPipelineStage:()=>NF,CallbackProperty:()=>jh,Camera:()=>ho,CameraEventAggregator:()=>dk,CameraEventType:()=>Bi,CameraFlightPath:()=>ok,Cartesian2:()=>G,Cartesian3:()=>h,Cartesian4:()=>se,Cartographic:()=>me,CartographicGeocoderService:()=>lI,CatmullRomSpline:()=>_Z,Cesium3DContentGroup:()=>xg,Cesium3DTile:()=>oD,Cesium3DTileBatchTable:()=>_l,Cesium3DTileColorBlendMode:()=>Kl,Cesium3DTileContent:()=>$_e,Cesium3DTileContentFactory:()=>Ab,Cesium3DTileContentState:()=>Bo,Cesium3DTileContentType:()=>Xs,Cesium3DTileFeature:()=>br,Cesium3DTileFeatureTable:()=>gl,Cesium3DTileOptimizationHint:()=>Sd,Cesium3DTileOptimizations:()=>w2,Cesium3DTilePass:()=>hr,Cesium3DTilePassState:()=>Kd,Cesium3DTilePointFeature:()=>kg,Cesium3DTileRefine:()=>Er,Cesium3DTileStyle:()=>AE,Cesium3DTileStyleEngine:()=>O2,Cesium3DTilesInspector:()=>Az,Cesium3DTilesInspectorViewModel:()=>xz,Cesium3DTileset:()=>Cf,Cesium3DTilesetCache:()=>v2,Cesium3DTilesetGraphics:()=>NT,Cesium3DTilesetHeatmap:()=>P2,Cesium3DTilesetMetadata:()=>S2,Cesium3DTilesetMostDetailedTraversal:()=>Kv,Cesium3DTilesetStatistics:()=>Qg,Cesium3DTilesetTraversal:()=>Wp,Cesium3DTilesetVisualizer:()=>M2,CesiumInspector:()=>Ez,CesiumInspectorViewModel:()=>Tz,CesiumTerrainProvider:()=>hI,CesiumWidget:()=>Sz,Check:()=>Nl,CheckerboardMaterialProperty:()=>cD,CircleEmitter:()=>mk,CircleGeometry:()=>oJ,CircleOutlineGeometry:()=>cJ,ClassificationModel:()=>oN,ClassificationPrimitive:()=>bw,ClassificationType:()=>Wn,ClearCommand:()=>oi,ClippingPlane:()=>QT,ClippingPlaneCollection:()=>ws,Clock:()=>Eh,ClockRange:()=>zr,ClockStep:()=>yo,ClockViewModel:()=>rz,CloudCollection:()=>oge,CloudType:()=>i1,Color:()=>z,ColorBlendMode:()=>vs,ColorGeometryInstanceAttribute:()=>It,ColorMaterialProperty:()=>Dt,Command:()=>KCe,ComponentDatatype:()=>K,Composite3DTileContent:()=>mN,CompositeEntityCollection:()=>vue,CompositeMaterialProperty:()=>uD,CompositePositionProperty:()=>Ta,CompositeProperty:()=>Lc,CompressedTextureBuffer:()=>DI,ComputeCommand:()=>ld,ComputeEngine:()=>jV,ConditionsExpression:()=>hk,ConeEmitter:()=>rge,ConstantPositionProperty:()=>pl,ConstantProperty:()=>Xn,ConstantSpline:()=>vA,ContentMetadata:()=>au,Context:()=>KV,ContextLimits:()=>Rt,CoplanarPolygonGeometry:()=>BI,CoplanarPolygonGeometryLibrary:()=>B_,CoplanarPolygonOutlineGeometry:()=>ed,CornerType:()=>Ii,CorridorGeometry:()=>BA,CorridorGeometryLibrary:()=>Ni,CorridorGeometryUpdater:()=>N2,CorridorGraphics:()=>OT,CorridorOutlineGeometry:()=>GI,Credit:()=>Ht,CreditDisplay:()=>Mk,CubeMap:()=>Sc,CubeMapFace:()=>sp,CubicRealPolynomial:()=>eA,CullFace:()=>Hi,CullingVolume:()=>da,CumulusCloud:()=>Nf,CustomDataSource:()=>U2,CustomHeightmapTerrainProvider:()=>gQ,CustomShader:()=>DC,CustomShaderMode:()=>Wg,CustomShaderPipelineStage:()=>MF,CylinderGeometry:()=>qI,CylinderGeometryLibrary:()=>NA,CylinderGeometryUpdater:()=>z2,CylinderGraphics:()=>RT,CylinderOutlineGeometry:()=>YI,CzmlDataSource:()=>X2,DataSource:()=>Xr,DataSourceClock:()=>um,DataSourceCollection:()=>$2,DataSourceDisplay:()=>g3,DebugAppearance:()=>Rge,DebugCameraPrimitive:()=>n_,DebugInspector:()=>Lk,DebugModelMatrixPrimitive:()=>Fk,DefaultProxy:()=>AQ,DepthFunction:()=>wc,DepthPlane:()=>zk,DequantizationPipelineStage:()=>FF,DerivedCommand:()=>F0,DeveloperError:()=>ye,DeviceOrientationCameraController:()=>Gk,DirectionalLight:()=>Vge,DiscardEmptyTileImagePolicy:()=>JD,DiscardMissingTileImagePolicy:()=>ZV,DistanceDisplayCondition:()=>Tt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Fn,DoubleEndedPriorityQueue:()=>EQ,DoublyLinkedList:()=>ZI,DracoLoader:()=>yl,DrawCommand:()=>et,DynamicGeometryBatch:()=>Hb,DynamicGeometryUpdater:()=>ni,EarthOrientationParameters:()=>UP,EarthOrientationParametersSample:()=>ay,EasingFunction:()=>Hr,EllipseGeometry:()=>rl,EllipseGeometryLibrary:()=>kl,EllipseGeometryUpdater:()=>Q2,EllipseGraphics:()=>MT,EllipseOutlineGeometry:()=>Fu,Ellipsoid:()=>re,EllipsoidGeodesic:()=>td,EllipsoidGeometry:()=>ks,EllipsoidGeometryUpdater:()=>e3,EllipsoidGraphics:()=>BT,EllipsoidOutlineGeometry:()=>zu,EllipsoidPrimitive:()=>jk,EllipsoidRhumbLine:()=>za,EllipsoidSurfaceAppearance:()=>Uge,EllipsoidTangentPlane:()=>Fa,EllipsoidTerrainProvider:()=>G_,EllipsoidalOccluder:()=>y_,Empty3DTileContent:()=>nD,EncodedCartesian3:()=>kn,Entity:()=>ur,EntityCluster:()=>bf,EntityCollection:()=>$s,EntityView:()=>C3,Event:()=>_e,EventHelper:()=>Gr,ExperimentalFeatures:()=>zA,Expression:()=>fd,ExpressionNodeType:()=>dt,ExtrapolationType:()=>Hu,FeatureDetection:()=>Et,FeatureIdPipelineStage:()=>Cx,Fog:()=>Kk,ForEach:()=>Te,FrameRateMonitor:()=>$k,FrameState:()=>Zk,Framebuffer:()=>ya,FramebufferManager:()=>fi,FrustumCommands:()=>Jk,FrustumGeometry:()=>GA,FrustumOutlineGeometry:()=>tO,Fullscreen:()=>Or,FullscreenButton:()=>Pz,FullscreenButtonViewModel:()=>vz,GeoJsonDataSource:()=>hV,GeoJsonLoader:()=>_f,GeocodeType:()=>Dy,Geocoder:()=>Rz,GeocoderService:()=>UQ,GeocoderViewModel:()=>Iz,GeographicProjection:()=>Si,GeographicTilingScheme:()=>Xi,Geometry:()=>ct,Geometry3DTileContent:()=>pN,GeometryAttribute:()=>Ee,GeometryAttributes:()=>ln,GeometryFactory:()=>HQ,GeometryInstance:()=>pt,GeometryInstanceAttribute:()=>Ac,GeometryOffsetAttribute:()=>tn,GeometryPipeline:()=>Rn,GeometryPipelineStage:()=>UF,GeometryType:()=>Zf,GeometryUpdater:()=>ii,GeometryVisualizer:()=>c3,GetFeatureInfoFormat:()=>DE,Globe:()=>wU,GlobeDepth:()=>vU,GlobeSurfaceShaderSet:()=>tU,GlobeSurfaceTile:()=>Qd,GlobeSurfaceTileProvider:()=>pU,GlobeTranslucency:()=>_U,GlobeTranslucencyFramebuffer:()=>DU,GlobeTranslucencyState:()=>PU,GltfBufferViewLoader:()=>Jl,GltfDracoLoader:()=>Ql,GltfImageLoader:()=>Cl,GltfIndexBufferLoader:()=>eu,GltfJsonLoader:()=>tu,GltfLoader:()=>Ca,GltfLoaderUtil:()=>nu,GltfStructuralMetadataLoader:()=>mf,GltfTextureLoader:()=>iu,GltfVertexBufferLoader:()=>ou,GoogleEarthEnterpriseImageryProvider:()=>L0e,GoogleEarthEnterpriseMapsProvider:()=>wk,GoogleEarthEnterpriseMetadata:()=>Rh,GoogleEarthEnterpriseTerrainData:()=>qS,GoogleEarthEnterpriseTerrainProvider:()=>JQ,GoogleEarthEnterpriseTileInformation:()=>iO,GpxDataSource:()=>PV,GregorianDate:()=>x_,GridImageryProvider:()=>N0e,GridMaterialProperty:()=>pD,GroundGeometryUpdater:()=>zn,GroundPolylineGeometry:()=>qA,GroundPolylinePrimitive:()=>Uh,GroundPrimitive:()=>ml,GroupMetadata:()=>rD,HeadingPitchRange:()=>ju,HeadingPitchRoll:()=>Xf,Heap:()=>wP,HeightReference:()=>He,HeightmapEncoding:()=>Vm,HeightmapTerrainData:()=>ka,HeightmapTessellator:()=>xS,HermitePolynomialApproximation:()=>fO,HermiteSpline:()=>dy,HilbertOrder:()=>XS,HomeButton:()=>Lz,HomeButtonViewModel:()=>Mz,HorizontalOrigin:()=>di,I3dmLoader:()=>h2,I3dmParser:()=>nb,Iau2000Orientation:()=>hO,Iau2006XysData:()=>zP,Iau2006XysSample:()=>nA,IauOrientationAxes:()=>mO,IauOrientationParameters:()=>dO,ImageBasedLighting:()=>Pc,ImageBasedLightingPipelineStage:()=>hF,ImageMaterialProperty:()=>Jy,Imagery:()=>y1,ImageryLayer:()=>Vf,ImageryLayerCollection:()=>yU,ImageryLayerFeatureInfo:()=>Cm,ImageryProvider:()=>Ol,ImageryState:()=>ri,Implicit3DTileContent:()=>ga,ImplicitAvailabilityBitstream:()=>Mg,ImplicitMetadataView:()=>xl,ImplicitSubdivisionScheme:()=>ss,ImplicitSubtree:()=>ps,ImplicitSubtreeMetadata:()=>gN,ImplicitTileCoordinates:()=>lo,ImplicitTileset:()=>aD,IndexDatatype:()=>Ne,InfoBox:()=>Vz,InfoBoxViewModel:()=>Nz,InspectorShared:()=>Y0,InstanceAttributeSemantic:()=>Yr,Instanced3DModel3DTileContent:()=>ON,InstancingPipelineStage:()=>AF,InterpolationAlgorithm:()=>zee,InterpolationType:()=>Mh,Intersect:()=>Zt,IntersectionTests:()=>Ki,Intersections2D:()=>O_,Interval:()=>Jc,InvertClassification:()=>w1,Ion:()=>wh,IonGeocoderService:()=>_O,IonImageryProvider:()=>B0,IonResource:()=>vh,IonWorldImageryStyle:()=>L0,Iso8601:()=>ze,JobScheduler:()=>OU,JobType:()=>os,JsonMetadataTable:()=>bd,JulianDate:()=>ee,KTX2Transcoder:()=>gO,KeyboardEventModifier:()=>ha,KmlCamera:()=>IV,KmlDataSource:()=>GV,KmlLookAt:()=>OV,KmlTour:()=>MV,KmlTourFlyTo:()=>LV,KmlTourWait:()=>NV,Label:()=>px,LabelCollection:()=>Mp,LabelGraphics:()=>zh,LabelStyle:()=>$o,LabelVisualizer:()=>l3,LagrangePolynomialApproximation:()=>yO,LeapSecond:()=>ki,Light:()=>V0e,LightingModel:()=>Hp,LightingPipelineStage:()=>HF,LinearApproximation:()=>XA,LinearSpline:()=>Wm,ManagedArray:()=>qu,MapMode2D:()=>bu,MapProjection:()=>Yee,MapboxImageryProvider:()=>vk,MapboxStyleImageryProvider:()=>U0e,Mars3DEx:()=>c_e,Material:()=>no,MaterialAppearance:()=>ro,MaterialPipelineStage:()=>WF,MaterialProperty:()=>lr,Math:()=>R,Matrix2:()=>vi,Matrix3:()=>Q,Matrix4:()=>B,MetadataClass:()=>Kh,MetadataClassProperty:()=>cx,MetadataComponentType:()=>vn,MetadataEntity:()=>Bn,MetadataEnum:()=>EN,MetadataEnumValue:()=>bN,MetadataPipelineStage:()=>zp,MetadataSchema:()=>$h,MetadataSchemaLoader:()=>rf,MetadataSemantic:()=>wN,MetadataTable:()=>md,MetadataTableProperty:()=>xN,MetadataType:()=>Ln,MipmapHint:()=>ap,Model:()=>Tp,ModelAlphaOptions:()=>kv,ModelAnimation:()=>sN,ModelAnimationCache:()=>sx,ModelAnimationCollection:()=>cN,ModelAnimationLoop:()=>Xo,ModelAnimationState:()=>Gs,ModelClippingPlanesPipelineStage:()=>_F,ModelColorPipelineStage:()=>xx,ModelComponents:()=>Ft,ModelExperimental:()=>Ti,ModelExperimental3DTileContent:()=>Mo,ModelExperimentalAnimation:()=>sF,ModelExperimentalAnimationChannel:()=>rF,ModelExperimentalAnimationCollection:()=>cF,ModelExperimentalArticulation:()=>Gg,ModelExperimentalArticulationStage:()=>yx,ModelExperimentalDrawCommand:()=>lF,ModelExperimentalNode:()=>yb,ModelExperimentalRuntimeNode:()=>om,ModelExperimentalRuntimePrimitive:()=>xb,ModelExperimentalSceneGraph:()=>Aa,ModelExperimentalSkin:()=>Tx,ModelExperimentalStatistics:()=>sm,ModelExperimentalType:()=>Is,ModelExperimentalUtility:()=>Vt,ModelFeature:()=>pf,ModelFeatureTable:()=>Ho,ModelGraphics:()=>pg,ModelInstance:()=>PN,ModelInstanceCollection:()=>IN,ModelLightingOptions:()=>Gv,ModelLoadResources:()=>jT,ModelMaterial:()=>uN,ModelMatrixUpdateStage:()=>TF,ModelMesh:()=>fN,ModelNode:()=>dN,ModelOutlineLoader:()=>Kw,ModelRenderResources:()=>Uv,ModelSilhouettePipelineStage:()=>s2,ModelSplitterPipelineStage:()=>c2,ModelUtility:()=>Xt,ModelVisualizer:()=>u3,Moon:()=>BU,MorphTargetsPipelineStage:()=>qF,MorphWeightSpline:()=>CO,MortonOrder:()=>Oy,Multiple3DTileContent:()=>Bc,MultisampleFramebuffer:()=>LN,NavigationHelpButton:()=>zz,NavigationHelpButtonViewModel:()=>kz,NearFarScalar:()=>wt,NeverTileDiscardPolicy:()=>z0e,NodeRenderResources:()=>Hv,NodeStatisticsPipelineStage:()=>bF,NodeTransformationProperty:()=>LT,OIT:()=>NU,Occluder:()=>EO,OctahedralProjectedCubeMap:()=>Xl,OffsetGeometryInstanceAttribute:()=>Zi,OpenCageGeocoderService:()=>Jee,OpenStreetMapImageryProvider:()=>NE,OrderedGroundPrimitiveCollection:()=>J2,OrientedBoundingBox:()=>gi,OrthographicFrustum:()=>Qt,OrthographicOffCenterFrustum:()=>Wr,Packable:()=>Qee,PackableForInterpolation:()=>ete,Particle:()=>P1,ParticleBurst:()=>q0e,ParticleEmitter:()=>X0e,ParticleSystem:()=>Z0e,Pass:()=>Ce,PassState:()=>Uc,PathGraphics:()=>_g,PathVisualizer:()=>f3,PeliasGeocoderService:()=>pO,PerInstanceColorAppearance:()=>nn,PerformanceDisplay:()=>z0,PerformanceWatchdog:()=>Wz,PerformanceWatchdogViewModel:()=>Hz,PerspectiveFrustum:()=>xi,PerspectiveOffCenterFrustum:()=>ul,PickDepth:()=>UU,PickDepthFramebuffer:()=>zU,PickFramebuffer:()=>HU,Picking:()=>$U,PickingPipelineStage:()=>YF,PinBuilder:()=>K_,PixelDatatype:()=>Xe,PixelFormat:()=>ft,Plane:()=>rn,PlaneGeometry:()=>DO,PlaneGeometryUpdater:()=>t3,PlaneGraphics:()=>vL,PlaneOutlineGeometry:()=>IO,PntsLoader:()=>gf,PntsParser:()=>ob,PointCloud:()=>rb,PointCloud3DTileContent:()=>FN,PointCloudEyeDomeLighting:()=>Ng,PointCloudShading:()=>gd,PointCloudStylingPipelineStage:()=>KF,PointGraphics:()=>FT,PointPrimitive:()=>Zs,PointPrimitiveCollection:()=>dD,PointVisualizer:()=>d3,PolygonGeometry:()=>tT,PolygonGeometryLibrary:()=>Un,PolygonGeometryUpdater:()=>n3,PolygonGraphics:()=>Hh,PolygonHierarchy:()=>dl,PolygonOutlineGeometry:()=>MO,PolygonPipeline:()=>ti,Polyline:()=>yd,PolylineArrowMaterialProperty:()=>_D,PolylineCollection:()=>Ug,PolylineColorAppearance:()=>is,PolylineDashMaterialProperty:()=>gD,PolylineGeometry:()=>J_,PolylineGeometryUpdater:()=>m3,PolylineGlowMaterialProperty:()=>yD,PolylineGraphics:()=>vc,PolylineMaterialAppearance:()=>pa,PolylineOutlineMaterialProperty:()=>kx,PolylinePipeline:()=>Oi,PolylineVisualizer:()=>_3,PolylineVolumeGeometry:()=>BO,PolylineVolumeGeometryLibrary:()=>Sh,PolylineVolumeGeometryUpdater:()=>i3,PolylineVolumeGraphics:()=>VT,PolylineVolumeOutlineGeometry:()=>LO,PositionProperty:()=>mg,PositionPropertyArray:()=>r0,PostProcessStage:()=>Eo,PostProcessStageCollection:()=>_4,PostProcessStageComposite:()=>Bl,PostProcessStageLibrary:()=>nh,PostProcessStageSampleMode:()=>zf,PostProcessStageTextureCache:()=>HE,Primitive:()=>Cn,PrimitiveCollection:()=>du,PrimitiveLoadPlan:()=>gb,PrimitiveOutlineGenerator:()=>nm,PrimitiveOutlinePipelineStage:()=>JF,PrimitivePipeline:()=>ET,PrimitiveRenderResources:()=>Wv,PrimitiveState:()=>Lr,PrimitiveStatisticsPipelineStage:()=>QF,PrimitiveType:()=>Le,ProjectionPicker:()=>Xz,ProjectionPickerViewModel:()=>qz,Property:()=>q,PropertyArray:()=>xD,PropertyAttribute:()=>Fp,PropertyAttributeProperty:()=>pb,PropertyBag:()=>ql,PropertyTable:()=>El,PropertyTexture:()=>mb,PropertyTextureProperty:()=>nF,ProviderViewModel:()=>Ms,Proxy:()=>Ate,QuadraticRealPolynomial:()=>Qc,QuadtreeOccluders:()=>xU,QuadtreePrimitive:()=>SU,QuadtreeTile:()=>AU,QuadtreeTileLoadState:()=>oa,QuadtreeTileProvider:()=>Eye,QuantizedMeshTerrainData:()=>pA,QuarticRealPolynomial:()=>BP,Quaternion:()=>Me,QuaternionSpline:()=>iT,Queue:()=>sl,Ray:()=>bn,Rectangle:()=>de,RectangleCollisionChecker:()=>oT,RectangleGeometry:()=>aT,RectangleGeometryLibrary:()=>Es,RectangleGeometryUpdater:()=>o3,RectangleGraphics:()=>Gh,RectangleOutlineGeometry:()=>uT,ReferenceFrame:()=>eo,ReferenceProperty:()=>a0,RenderState:()=>Ue,Renderbuffer:()=>sf,RenderbufferFormat:()=>Tl,Request:()=>rr,RequestErrorEvent:()=>Lm,RequestScheduler:()=>fc,RequestState:()=>ui,RequestType:()=>or,Resource:()=>De,ResourceCache:()=>Co,ResourceCacheKey:()=>ru,ResourceCacheStatistics:()=>vp,ResourceLoader:()=>li,ResourceLoaderState:()=>Nt,Rotation:()=>Od,RuntimeError:()=>fe,S2Cell:()=>ig,SDFSettings:()=>Ys,SampledPositionProperty:()=>ba,SampledProperty:()=>Ef,Sampler:()=>on,ScaledPositionProperty:()=>Jp,Scene:()=>M4,SceneFramebuffer:()=>FE,SceneMode:()=>te,SceneMode2DPipelineStage:()=>e2,SceneModePicker:()=>Jz,SceneModePickerViewModel:()=>$z,SceneTransforms:()=>Qi,SceneTransitioner:()=>y4,ScreenSpaceCameraController:()=>v4,ScreenSpaceEventHandler:()=>Ku,ScreenSpaceEventType:()=>mn,SelectedFeatureIdPipelineStage:()=>Ax,SelectionIndicator:()=>n8,SelectionIndicatorViewModel:()=>e8,ShaderBuilder:()=>Os,ShaderCache:()=>qV,ShaderDestination:()=>we,ShaderFunction:()=>Ex,ShaderProgram:()=>Gt,ShaderSource:()=>Ve,ShaderStruct:()=>bx,ShadowMap:()=>G0,ShadowMapShader:()=>s_,ShadowMode:()=>$t,ShadowVolumeAppearance:()=>ef,ShowGeometryInstanceAttribute:()=>pn,Simon1994PlanetaryPositions:()=>Uy,SimplePolylineGeometry:()=>Mne,SingleTileImageryProvider:()=>Dk,SkinningPipelineStage:()=>n2,SkyAtmosphere:()=>N4,SkyBox:()=>U4,SphereEmitter:()=>yxe,SphereGeometry:()=>Bne,SphereOutlineGeometry:()=>sg,Spherical:()=>qO,Spline:()=>zi,SplitDirection:()=>rs,Splitter:()=>Dg,StaticGeometryColorBatch:()=>Nd,StaticGeometryPerMaterialBatch:()=>Vd,StaticGroundGeometryColorBatch:()=>wD,StaticGroundGeometryPerMaterialBatch:()=>s3,StaticGroundPolylinePerMaterialBatch:()=>p3,StaticOutlineGeometryBatch:()=>vD,StencilConstants:()=>en,StencilFunction:()=>hi,StencilOperation:()=>Lt,SteppedSpline:()=>YO,StripeMaterialProperty:()=>CD,StripeOrientation:()=>fm,StructuralMetadata:()=>Za,StyleCommandsNeeded:()=>Mc,StyleExpression:()=>xxe,Sun:()=>W4,SunLight:()=>P0,SunPostProcess:()=>I4,SupportedImageFormats:()=>Pv,SvgPathBindingHandler:()=>K4,TaskProcessor:()=>Di,TerrainData:()=>_h,TerrainEncoding:()=>mc,TerrainExaggeration:()=>nl,TerrainFillMesh:()=>A1,TerrainMesh:()=>$f,TerrainOffsetProperty:()=>zT,TerrainProvider:()=>es,TerrainQuantization:()=>Fs,TerrainState:()=>bo,Texture:()=>vt,TextureAtlas:()=>hx,TextureCache:()=>YV,TextureMagnificationFilter:()=>Gi,TextureManager:()=>Pm,TextureMinificationFilter:()=>Pt,TextureUniform:()=>cX,TextureWrap:()=>fn,TileAvailability:()=>gh,TileBoundingRegion:()=>vd,TileBoundingS2Cell:()=>T2,TileBoundingSphere:()=>Zg,TileBoundingVolume:()=>Cxe,TileCoordinatesImageryProvider:()=>j4,TileDiscardPolicy:()=>Axe,TileEdge:()=>hn,TileImagery:()=>x1,TileMapServiceImageryProvider:()=>iC,TileMetadata:()=>cu,TileOrientedBoundingBox:()=>Dd,TileProviderError:()=>Gn,TileReplacementQueue:()=>bU,TileSelectionResult:()=>Yn,TileState:()=>Txe,Tileset3DTileContent:()=>VN,TilesetMetadata:()=>E2,TilingScheme:()=>Lne,TimeConstants:()=>jn,TimeDynamicImagery:()=>PE,TimeDynamicPointCloud:()=>Y1,TimeInterval:()=>yn,TimeIntervalCollection:()=>qr,TimeIntervalCollectionPositionProperty:()=>l0,TimeIntervalCollectionProperty:()=>u0,TimeStandard:()=>Hn,Timeline:()=>r8,TimelineHighlightRange:()=>i8,TimelineTrack:()=>o8,Tipsify:()=>pI,ToggleButtonViewModel:()=>wC,Tonemapper:()=>_C,Transforms:()=>_t,TranslationRotationScale:()=>rp,TranslucentTileClassification:()=>jU,TridiagonalSystemSolver:()=>bS,TrustedServers:()=>lS,Tween:()=>yi.default,TweenCollection:()=>GE,UniformState:()=>XV,UniformType:()=>nP,Uri:()=>ei.default,UrlTemplateImageryProvider:()=>sc,VERSION:()=>wxt,VRButton:()=>l8,VRButtonViewModel:()=>a8,VRTheWorldTerrainProvider:()=>Une,VaryingType:()=>eAe,Vector3DTileBatch:()=>of,Vector3DTileClampedPolylines:()=>eF,Vector3DTileContent:()=>tF,Vector3DTileGeometry:()=>Rg,Vector3DTilePoints:()=>KN,Vector3DTilePolygons:()=>$N,Vector3DTilePolylines:()=>hb,Vector3DTilePrimitive:()=>Sg,VelocityOrientationProperty:()=>G2,VelocityVectorProperty:()=>Ub,VertexArray:()=>Kn,VertexArrayFacade:()=>Fg,VertexAttributeSemantic:()=>Wt,VertexFormat:()=>Pe,VerticalOrigin:()=>wn,VideoSynchronizer:()=>Vne,View:()=>kE,Viewer:()=>DAe,ViewportQuad:()=>wxe,Visibility:()=>xr,Visualizer:()=>a_e,VulkanConstants:()=>zne,WallGeometry:()=>ZO,WallGeometryLibrary:()=>yT,WallGeometryUpdater:()=>a3,WallGraphics:()=>gg,WallOutlineGeometry:()=>JO,WebGLConstants:()=>Z,WebMapServiceImageryProvider:()=>Ik,WebMapTileServiceImageryProvider:()=>Ok,WebMercatorProjection:()=>Ui,WebMercatorTilingScheme:()=>ts,WindingOrder:()=>fs,WireframeIndexGenerator:()=>hw,WireframePipelineStage:()=>i2,_shadersAcesTonemappingStage:()=>ZU,_shadersAdditiveBlend:()=>D4,_shadersAdjustTranslucentFS:()=>D1,_shadersAllMaterialAppearanceFS:()=>tR,_shadersAllMaterialAppearanceVS:()=>nR,_shadersAmbientOcclusionGenerate:()=>JU,_shadersAmbientOcclusionModulate:()=>QU,_shadersAspectRampMaterial:()=>fR,_shadersAtmosphereCommon:()=>V0,_shadersBasicMaterialAppearanceFS:()=>iR,_shadersBasicMaterialAppearanceVS:()=>oR,_shadersBillboardCollectionFS:()=>kN,_shadersBillboardCollectionVS:()=>UN,_shadersBlackAndWhite:()=>e4,_shadersBloomComposite:()=>t4,_shadersBrdfLutGeneratorFS:()=>nk,_shadersBrightPass:()=>P4,_shadersBrightness:()=>n4,_shadersBumpMapMaterial:()=>dR,_shadersCPUStylingStageFS:()=>LF,_shadersCPUStylingStageVS:()=>BF,_shadersCheckerboardMaterial:()=>hR,_shadersCloudCollectionFS:()=>pk,_shadersCloudCollectionVS:()=>_k,_shadersCloudNoiseFS:()=>gk,_shadersCloudNoiseVS:()=>yk,_shadersCompareAndPackTranslucentDepth:()=>WU,_shadersCompositeOITFS:()=>LU,_shadersCompositeTranslucentClassification:()=>VE,_shadersContrastBias:()=>i4,_shadersCustomShaderStageFS:()=>vF,_shadersCustomShaderStageVS:()=>wF,_shadersCzmBuiltins:()=>TT,_shadersDepthOfField:()=>o4,_shadersDepthPlaneFS:()=>Vk,_shadersDepthPlaneVS:()=>kk,_shadersDepthView:()=>r4,_shadersDepthViewPacked:()=>tAe,_shadersDotMaterial:()=>mR,_shadersEdgeDetection:()=>s4,_shadersElevationBandMaterial:()=>pR,_shadersElevationContourMaterial:()=>_R,_shadersElevationRampMaterial:()=>gR,_shadersEllipsoidFS:()=>p1,_shadersEllipsoidSurfaceAppearanceFS:()=>qk,_shadersEllipsoidSurfaceAppearanceVS:()=>Yk,_shadersEllipsoidVS:()=>_1,_shadersFXAA:()=>c4,_shadersFXAA3_11:()=>m4,_shadersFadeMaterial:()=>yR,_shadersFeatureIdStageFS:()=>DF,_shadersFeatureIdStageVS:()=>PF,_shadersFilmicTonemapping:()=>a4,_shadersGaussianBlur1D:()=>mC,_shadersGeometryStageFS:()=>VF,_shadersGeometryStageVS:()=>kF,_shadersGlobeFS:()=>Qk,_shadersGlobeVS:()=>eU,_shadersGridMaterial:()=>xR,_shadersGroundAtmosphere:()=>g1,_shadersHSBToRGB:()=>oB,_shadersHSLToRGB:()=>rB,_shadersImageBasedLightingStageFS:()=>dF,_shadersInstancingStageCommon:()=>gF,_shadersInstancingStageVS:()=>yF,_shadersLegacyInstancingStageVS:()=>xF,_shadersLensFlare:()=>l4,_shadersLightingStageFS:()=>zF,_shadersMaterialStageFS:()=>GF,_shadersMetadataStageFS:()=>IF,_shadersMetadataStageVS:()=>OF,_shadersModelClippingPlanesStageFS:()=>pF,_shadersModelColorStageFS:()=>mF,_shadersModelExperimentalFS:()=>uF,_shadersModelExperimentalVS:()=>fF,_shadersModelSilhouetteStageFS:()=>o2,_shadersModelSilhouetteStageVS:()=>r2,_shadersModelSplitterStageFS:()=>a2,_shadersModifiedReinhardTonemapping:()=>u4,_shadersMorphTargetsStageVS:()=>jF,_shadersNightVision:()=>f4,_shadersNormalMapMaterial:()=>CR,_shadersOctahedralProjectionAtlasFS:()=>PL,_shadersOctahedralProjectionFS:()=>IL,_shadersOctahedralProjectionVS:()=>OL,_shadersPassThrough:()=>vu,_shadersPassThroughDepth:()=>sC,_shadersPerInstanceColorAppearanceFS:()=>PR,_shadersPerInstanceColorAppearanceVS:()=>IR,_shadersPerInstanceFlatColorAppearanceFS:()=>CT,_shadersPerInstanceFlatColorAppearanceVS:()=>OR,_shadersPointCloudEyeDomeLighting:()=>NN,_shadersPointCloudStylingStageVS:()=>XF,_shadersPointPrimitiveCollectionFS:()=>Fx,_shadersPointPrimitiveCollectionVS:()=>V2,_shadersPolylineArrowMaterial:()=>AR,_shadersPolylineColorAppearanceVS:()=>SL,_shadersPolylineCommon:()=>tf,_shadersPolylineDashMaterial:()=>TR,_shadersPolylineFS:()=>vT,_shadersPolylineGlowMaterial:()=>bR,_shadersPolylineMaterialAppearanceVS:()=>wL,_shadersPolylineOutlineMaterial:()=>ER,_shadersPolylineShadowVolumeFS:()=>AL,_shadersPolylineShadowVolumeMorphFS:()=>TL,_shadersPolylineShadowVolumeMorphVS:()=>bL,_shadersPolylineShadowVolumeVS:()=>EL,_shadersPolylineVS:()=>qN,_shadersPrimitiveOutlineStageFS:()=>ZF,_shadersPrimitiveOutlineStageVS:()=>$F,_shadersRGBToHSB:()=>OB,_shadersRGBToHSL:()=>RB,_shadersRGBToXYZ:()=>MB,_shadersReinhardTonemapping:()=>d4,_shadersReprojectWebMercatorFS:()=>nU,_shadersReprojectWebMercatorVS:()=>iU,_shadersRimLightingMaterial:()=>SR,_shadersSelectedFeatureIdStageCommon:()=>Fv,_shadersShadowVolumeAppearanceFS:()=>Tw,_shadersShadowVolumeAppearanceVS:()=>mL,_shadersShadowVolumeFS:()=>Yy,_shadersSilhouette:()=>h4,_shadersSkinningStageVS:()=>t2,_shadersSkyAtmosphereCommon:()=>H1,_shadersSkyAtmosphereFS:()=>B4,_shadersSkyAtmosphereVS:()=>L4,_shadersSkyBoxFS:()=>F4,_shadersSkyBoxVS:()=>V4,_shadersSlopeRampMaterial:()=>wR,_shadersStripeMaterial:()=>vR,_shadersSunFS:()=>z4,_shadersSunTextureFS:()=>H4,_shadersSunVS:()=>G4,_shadersTexturedMaterialAppearanceFS:()=>rR,_shadersTexturedMaterialAppearanceVS:()=>sR,_shadersVector3DTileClampedPolylinesFS:()=>QN,_shadersVector3DTileClampedPolylinesVS:()=>JN,_shadersVector3DTilePolylinesVS:()=>ZN,_shadersVectorTileVS:()=>jw,_shadersViewportQuadFS:()=>q4,_shadersViewportQuadVS:()=>pE,_shadersWater:()=>DR,_shadersXYZToRGB:()=>nL,_shadersacesTonemapping:()=>DM,_shadersalphaWeight:()=>PM,_shadersantialias:()=>IM,_shadersapproximateSphericalCoordinates:()=>OM,_shadersbackFacing:()=>RM,_shadersbranchFreeTernary:()=>MM,_shaderscascadeColor:()=>BM,_shaderscascadeDistance:()=>LM,_shaderscascadeMatrix:()=>NM,_shaderscascadeWeights:()=>FM,_shaderscolumbusViewMorph:()=>VM,_shaderscomputePosition:()=>kM,_shaderscosineAndSine:()=>UM,_shadersdecompressTextureCoordinates:()=>zM,_shadersdefaultPbrMaterial:()=>HM,_shadersdegreesPerRadian:()=>NR,_shadersdepthClamp:()=>GM,_shadersdepthRange:()=>FR,_shadersdepthRangeStruct:()=>xM,_shaderseastNorthUpToEyeCoordinates:()=>WM,_shadersellipsoidContainsPoint:()=>jM,_shadersellipsoidWgs84TextureCoordinates:()=>qM,_shadersepsilon1:()=>VR,_shadersepsilon2:()=>kR,_shadersepsilon3:()=>UR,_shadersepsilon4:()=>zR,_shadersepsilon5:()=>HR,_shadersepsilon6:()=>GR,_shadersepsilon7:()=>WR,_shadersequalsEpsilon:()=>YM,_shaderseyeOffset:()=>XM,_shaderseyeToWindowCoordinates:()=>KM,_shadersfastApproximateAtan:()=>$M,_shadersfog:()=>ZM,_shadersfromCartesian:()=>iL,_shadersgammaCorrect:()=>JM,_shadersgeodeticSurfaceNormal:()=>QM,_shadersgetDefaultMaterial:()=>eB,_shadersgetFloodRect:()=>oL,_shadersgetIndexMat:()=>rL,_shadersgetLambertDiffuse:()=>tB,_shadersgetMaxIndex:()=>sL,_shadersgetMaxIndexVal:()=>aL,_shadersgetSpecular:()=>nB,_shadersgetWaterNoise:()=>iB,_shadershue:()=>sB,_shadersinfinity:()=>jR,_shadersinverseGamma:()=>aB,_shadersisEmpty:()=>cB,_shadersisFull:()=>lB,_shadersisInEllipsoid:()=>cL,_shadersisInObliq:()=>lL,_shaderslatitudeToWebMercatorFraction:()=>uB,_shaderslineDistance:()=>dB,_shaderslinearToSrgb:()=>fB,_shadersluminance:()=>hB,_shadersmagnitude:()=>uL,_shadersmagnitudeSquared:()=>fL,_shadersmaterial:()=>CM,_shadersmaterialInput:()=>AM,_shadersmetersPerPixel:()=>mB,_shadersmodelMaterial:()=>TM,_shadersmodelToWindowCoordinates:()=>pB,_shadersmodelVertexOutput:()=>bM,_shadersmultiplyComponents:()=>dL,_shadersmultiplyWithColorBalance:()=>_B,_shadersnearFarScalar:()=>gB,_shadersoctDecode:()=>yB,_shadersoneOverPi:()=>qR,_shadersoneOverTwoPi:()=>YR,_shaderspackDepth:()=>xB,_shaderspassCesium3DTile:()=>XR,_shaderspassCesium3DTileClassification:()=>KR,_shaderspassCesium3DTileClassificationIgnoreShow:()=>$R,_shaderspassClassification:()=>ZR,_shaderspassCompute:()=>JR,_shaderspassEnvironment:()=>QR,_shaderspassGlobe:()=>eM,_shaderspassOpaque:()=>tM,_shaderspassOverlay:()=>nM,_shaderspassTerrainClassification:()=>iM,_shaderspassTranslucent:()=>oM,_shaderspbrLighting:()=>CB,_shaderspbrMetallicRoughnessMaterial:()=>AB,_shaderspbrParameters:()=>EM,_shaderspbrSpecularGlossinessMaterial:()=>TB,_shadersphong:()=>bB,_shaderspi:()=>rM,_shaderspiOverFour:()=>sM,_shaderspiOverSix:()=>aM,_shaderspiOverThree:()=>cM,_shaderspiOverTwo:()=>lM,_shadersplaneDistance:()=>EB,_shaderspointAlongRay:()=>SB,_shadersradiansPerDegree:()=>uM,_shadersray:()=>SM,_shadersrayEllipsoidIntersectionInterval:()=>wB,_shadersraySegment:()=>wM,_shadersraySphereIntersectionInterval:()=>vB,_shadersreadDepth:()=>DB,_shadersreadNonPerspective:()=>PB,_shadersreverseLogDepth:()=>IB,_shadersround:()=>BB,_shaderssampleOctahedralProjection:()=>LB,_shaderssaturation:()=>NB,_shadersscaleToGeodeticSurface:()=>hL,_shaderssceneMode2D:()=>fM,_shaderssceneMode3D:()=>dM,_shaderssceneModeColumbusView:()=>hM,_shaderssceneModeMorphing:()=>mM,_shadersshadowDepthCompare:()=>FB,_shadersshadowParameters:()=>vM,_shadersshadowVisibility:()=>VB,_shaderssignNotZero:()=>kB,_shaderssolarRadius:()=>pM,_shaderssphericalHarmonics:()=>UB,_shaderssrgbToLinear:()=>zB,_shaderstangentToEyeSpaceMatrix:()=>HB,_shadersthreePiOver2:()=>_M,_shaderstransformPlane:()=>GB,_shaderstranslateRelativeToEye:()=>WB,_shaderstranslucentPhong:()=>jB,_shaderstranspose:()=>qB,_shaderstwoPi:()=>gM,_shadersunpackDepth:()=>YB,_shadersunpackFloat:()=>XB,_shadersunpackUint:()=>KB,_shadersvalueTransform:()=>$B,_shadersvertexLogDepth:()=>ZB,_shaderswebMercatorMaxLatitude:()=>yM,_shaderswindowToEyeCoordinates:()=>JB,_shaderswriteDepthClamp:()=>QB,_shaderswriteLogDepth:()=>eL,_shaderswriteNonPerspective:()=>tL,addBuffer:()=>zL,addDefaults:()=>Ag,addExtensionsRequired:()=>VL,addExtensionsUsed:()=>qh,addPipelineExtras:()=>gp,addToArray:()=>ao,appendForwardSlash:()=>hP,arrayRemoveDuplicates:()=>So,barycentricCoordinates:()=>uA,binarySearch:()=>ar,bitmap_sdf:()=>mv.default,buildDrawCommand:()=>Rv,buildModuleUrl:()=>Jt,cancelAnimationFrame:()=>cZ,clone:()=>Qe,combine:()=>at,computeFlyToLocationForRectangle:()=>TE,createBillboardPointCallback:()=>lb,createCommand:()=>xn,createDefaultImageryProviderViewModels:()=>_z,createDefaultTerrainProviderViewModels:()=>gz,createElevationBandMaterial:()=>lge,createGuid:()=>Mn,createMaterialPropertyDescriptor:()=>Fo,createOsmBuildings:()=>uge,createPropertyDescriptor:()=>le,createRawPropertyDescriptor:()=>jl,createTangentSpaceDebugPrimitive:()=>fge,createTaskProcessorWorker:()=>BAe,createUniform:()=>RR,createUniformArray:()=>MR,createWorldImagery:()=>N0,createWorldTerrain:()=>jI,decodeGoogleEarthEnterpriseData:()=>XI,decodeVectorPolylinePositions:()=>KI,defaultValue:()=>y,defer:()=>Qr,defined:()=>l,deprecationWarning:()=>ci,destroyObject:()=>ue,dompurify:()=>dS.default,earcut:()=>RS.default,exportKml:()=>mme,findAccessorMinMax:()=>Gw,findContentMetadata:()=>Tb,findGroupMetadata:()=>Px,findTileMetadata:()=>x2,forEachTextureInMaterial:()=>Ww,formatError:()=>Hm,freezeRenderState:()=>eie,getAbsoluteUri:()=>qf,getAccessorByteStride:()=>ms,getBaseUri:()=>bP,getBinaryAccessor:()=>nf,getClipAndStyleCode:()=>eb,getClippingFunction:()=>vg,getComponentReader:()=>Tg,getElement:()=>Dn,getExtensionFromUri:()=>jC,getFilenameFromUri:()=>j_,getImageFromTypedArray:()=>nO,getImagePixels:()=>ch,getJsonFromTypedArray:()=>No,getMagic:()=>Gu,getStringFromTypedArray:()=>fa,getTimestamp:()=>Pi,grapheme_splitter:()=>yv.default,hasExtension:()=>Ji,heightReferenceOnEntityPropertyChanged:()=>yg,isBitSet:()=>Tc,isBlobUri:()=>qC,isCrossOriginUrl:()=>YC,isDataUri:()=>__,isLeapYear:()=>C_,jsep:()=>ix.default,kdbush:()=>o0,knockout:()=>xe,knockout_3_5_1:()=>YE,knockout_es5:()=>X4,ktx_parse:()=>jY,lerc:()=>qY.default,loadAndExecuteScript:()=>XC,loadCubeMap:()=>$V,loadImageFromTypedArray:()=>X_,loadKTX2:()=>Ha,mergeSort:()=>Iy,mersenne_twister:()=>ah.default,meshoptimizer:()=>nv,modernizeShader:()=>LR,moveTechniqueRenderStates:()=>FL,moveTechniquesToExtension:()=>kL,nosleep:()=>K1.default,numberOfComponentsForType:()=>hs,objectToQuery:()=>KC,oneTimeWarning:()=>Mt,pako:()=>sX.default,parseBatchTable:()=>Ed,parseBoundingVolumeSemantics:()=>rv,parseFeatureMetadataLegacy:()=>Dv,parseGlb:()=>yp,parseResponseHeaders:()=>SP,parseStructuralMetadata:()=>vv,pointInsideTriangle:()=>ite,preprocess3DTileContent:()=>Ix,processModelMaterialsCommon:()=>KT,processPbrMaterials:()=>$T,protobufjs:()=>WA,queryToObject:()=>Mu,rbush:()=>rw.default,readAccessorPacked:()=>HL,removeExtensionsRequired:()=>LL,removeExtensionsUsed:()=>NL,removePipelineExtras:()=>AN,removeUnusedElements:()=>UL,requestAnimationFrame:()=>zte,resizeImageToNextPowerOfTwo:()=>Fy,sampleTerrain:()=>UO,sampleTerrainMostDetailed:()=>dT,scaleToGeodeticSurface:()=>UC,subdivideArray:()=>XO,subscribeAndEvaluate:()=>Da,topojson:()=>fE,updateAccessorComponentTypes:()=>WL,updateVersion:()=>bg,usesExtension:()=>Vo,viewerCesium3DTilesInspectorMixin:()=>PAe,viewerCesiumInspectorMixin:()=>IAe,viewerDragDropMixin:()=>RAe,viewerPerformanceWatchdogMixin:()=>MAe,webGLConstantToGlslType:()=>cg,wrapFunction:()=>QO,writeTextToCanvas:()=>$A,zip:()=>nc});function XAe(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var hP=XAe;function KAe(e){return e!=null}var l=KAe;function ey(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(ey.prototype=Object.create(Error.prototype),ey.prototype.constructor=ey);ey.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
|
|
87
|
-
${this.stack.toString()}`),e};ey.throwInstantiationError=function(){throw new ey("This function defines an interface and should not be called directly.")};var ye=ey;var ls={};ls.typeOf={};function $Ae(e){return`${e} is required, actual value was undefined`}function VC(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ls.defined=function(e,t){if(!l(t))throw new ye($Ae(e))};ls.typeOf.func=function(e,t){if(typeof t!="function")throw new ye(VC(typeof t,"function",e))};ls.typeOf.string=function(e,t){if(typeof t!="string")throw new ye(VC(typeof t,"string",e))};ls.typeOf.number=function(e,t){if(typeof t!="number")throw new ye(VC(typeof t,"number",e))};ls.typeOf.number.lessThan=function(e,t,n){if(ls.typeOf.number(e,t),t>=n)throw new ye(`Expected ${e} to be less than ${n}, actual value was ${t}`)};ls.typeOf.number.lessThanOrEquals=function(e,t,n){if(ls.typeOf.number(e,t),t>n)throw new ye(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};ls.typeOf.number.greaterThan=function(e,t,n){if(ls.typeOf.number(e,t),t<=n)throw new ye(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};ls.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ls.typeOf.number(e,t),t<n)throw new ye(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};ls.typeOf.object=function(e,t){if(typeof t!="object")throw new ye(VC(typeof t,"object",e))};ls.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new ye(VC(typeof t,"boolean",e))};ls.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new ye(VC(typeof t,"bigint",e))};ls.typeOf.number.equals=function(e,t,n,i){if(ls.typeOf.number(e,n),ls.typeOf.number(t,i),n!==i)throw new ye(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var Nl=ls;function FX(e,t){return e??t}FX.EMPTY_OBJECT=Object.freeze({});var y=FX;var ah=Zc(kX(),1);var it={};it.EPSILON1=.1;it.EPSILON2=.01;it.EPSILON3=.001;it.EPSILON4=1e-4;it.EPSILON5=1e-5;it.EPSILON6=1e-6;it.EPSILON7=1e-7;it.EPSILON8=1e-8;it.EPSILON9=1e-9;it.EPSILON10=1e-10;it.EPSILON11=1e-11;it.EPSILON12=1e-12;it.EPSILON13=1e-13;it.EPSILON14=1e-14;it.EPSILON15=1e-15;it.EPSILON16=1e-16;it.EPSILON17=1e-17;it.EPSILON18=1e-18;it.EPSILON19=1e-19;it.EPSILON20=1e-20;it.EPSILON21=1e-21;it.GRAVITATIONALPARAMETER=3986004418e5;it.SOLAR_RADIUS=6955e5;it.LUNAR_RADIUS=1737400;it.SIXTY_FOUR_KILOBYTES=64*1024;it.FOUR_GIGABYTES=4*1024*1024*1024;it.sign=y(Math.sign,function(t){return t=+t,t===0||t!==t?t:t>0?1:-1});it.signNotZero=function(e){return e<0?-1:1};it.toSNorm=function(e,t){return t=y(t,255),Math.round((it.clamp(e,-1,1)*.5+.5)*t)};it.fromSNorm=function(e,t){return t=y(t,255),it.clamp(e,0,t)/t*2-1};it.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:it.clamp((e-t)/n,0,1)};it.sinh=y(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2});it.cosh=y(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2});it.lerp=function(e,t,n){return(1-n)*e+n*t};it.PI=Math.PI;it.ONE_OVER_PI=1/Math.PI;it.PI_OVER_TWO=Math.PI/2;it.PI_OVER_THREE=Math.PI/3;it.PI_OVER_FOUR=Math.PI/4;it.PI_OVER_SIX=Math.PI/6;it.THREE_PI_OVER_TWO=3*Math.PI/2;it.TWO_PI=2*Math.PI;it.ONE_OVER_TWO_PI=1/(2*Math.PI);it.RADIANS_PER_DEGREE=Math.PI/180;it.DEGREES_PER_RADIAN=180/Math.PI;it.RADIANS_PER_ARCSECOND=it.RADIANS_PER_DEGREE/3600;it.toRadians=function(e){return e*it.RADIANS_PER_DEGREE};it.toDegrees=function(e){return e*it.DEGREES_PER_RADIAN};it.convertLongitudeRange=function(e){let t=it.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};it.clampToLatitudeRange=function(e){return it.clamp(e,-1*it.PI_OVER_TWO,it.PI_OVER_TWO)};it.negativePiToPi=function(e){return e>=-it.PI&&e<=it.PI?e:it.zeroToTwoPi(e+it.PI)-it.PI};it.zeroToTwoPi=function(e){if(e>=0&&e<=it.TWO_PI)return e;let t=it.mod(e,it.TWO_PI);return Math.abs(t)<it.EPSILON14&&Math.abs(e)>it.EPSILON14?it.TWO_PI:t};it.mod=function(e,t){return it.sign(e)===it.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};it.equalsEpsilon=function(e,t,n,i){n=y(n,0),i=y(i,n);let o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))};it.lessThan=function(e,t,n){return e-t<-n};it.lessThanOrEquals=function(e,t,n){return e-t<n};it.greaterThan=function(e,t,n){return e-t>n};it.greaterThanOrEquals=function(e,t,n){return e-t>-n};var mP=[1];it.factorial=function(e){let t=mP.length;if(e>=t){let n=mP[t-1];for(let i=t;i<=e;i++){let o=n*i;mP.push(o),n=o}}return mP[e]};it.incrementWrap=function(e,t,n){return n=y(n,0),++e,e>t&&(e=n),e};it.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};it.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};it.previousPowerOfTwo=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e};it.clamp=function(e,t,n){return e<t?t:e>n?n:e};var UX=new ah.default;it.setRandomNumberSeed=function(e){UX=new ah.default(e)};it.nextRandomNumber=function(){return UX.random()};it.randomBetween=function(e,t){return it.nextRandomNumber()*(t-e)+e};it.acosClamped=function(e){return Math.acos(it.clamp(e,-1,1))};it.asinClamped=function(e){return Math.asin(it.clamp(e,-1,1))};it.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};it.logBase=function(e,t){return Math.log(e)/Math.log(t)};it.cbrt=y(Math.cbrt,function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n});it.log2=y(Math.log2,function(t){return Math.log(t)*Math.LOG2E});it.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};it.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};it.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=it.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?it.PI_OVER_TWO-i:i,i=e<0?it.PI-i:i,i=t<0?-i:i,i};var R=it;function Ze(e,t,n){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0)}Ze.fromSpherical=function(e,t){l(t)||(t=new Ze);let n=e.clock,i=e.cone,o=y(e.magnitude,1),r=o*Math.sin(i);return t.x=r*Math.cos(n),t.y=r*Math.sin(n),t.z=o*Math.cos(i),t};Ze.fromElements=function(e,t,n,i){return l(i)?(i.x=e,i.y=t,i.z=n,i):new Ze(e,t,n)};Ze.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new Ze(e.x,e.y,e.z)};Ze.fromCartesian4=Ze.clone;Ze.packedLength=3;Ze.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t};Ze.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Ze),n.x=e[t++],n.y=e[t++],n.z=e[t],n};Ze.packArray=function(e,t){let n=e.length,i=n*3;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)Ze.pack(e[o],t,o*3);return t};Ze.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/3:t=new Array(n/3);for(let i=0;i<n;i+=3){let o=i/3;t[o]=Ze.unpack(e,i,t[o])}return t};Ze.fromArray=Ze.unpack;Ze.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)};Ze.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)};Ze.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n};Ze.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n};Ze.clamp=function(e,t,n,i){let o=R.clamp(e.x,t.x,n.x),r=R.clamp(e.y,t.y,n.y),s=R.clamp(e.z,t.z,n.z);return i.x=o,i.y=r,i.z=s,i};Ze.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z};Ze.magnitude=function(e){return Math.sqrt(Ze.magnitudeSquared(e))};var _P=new Ze;Ze.distance=function(e,t){return Ze.subtract(e,t,_P),Ze.magnitude(_P)};Ze.distanceSquared=function(e,t){return Ze.subtract(e,t,_P),Ze.magnitudeSquared(_P)};Ze.normalize=function(e,t){let n=Ze.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t};Ze.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z};Ze.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n};Ze.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n};Ze.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n};Ze.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n};Ze.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n};Ze.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n};Ze.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t};Ze.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var zX=new Ze;Ze.lerp=function(e,t,n,i){return Ze.multiplyByScalar(t,n,zX),i=Ze.multiplyByScalar(e,1-n,i),Ze.add(zX,i,i)};var pP=new Ze,x8=new Ze;Ze.angleBetween=function(e,t){Ze.normalize(e,pP),Ze.normalize(t,x8);let n=Ze.dot(pP,x8),i=Ze.magnitude(Ze.cross(pP,x8,pP));return Math.atan2(i,n)};var ZAe=new Ze;Ze.mostOrthogonalAxis=function(e,t){let n=Ze.normalize(e,ZAe);return Ze.abs(n,n),n.x<=n.y?n.x<=n.z?t=Ze.clone(Ze.UNIT_X,t):t=Ze.clone(Ze.UNIT_Z,t):n.y<=n.z?t=Ze.clone(Ze.UNIT_Y,t):t=Ze.clone(Ze.UNIT_Z,t),t};Ze.projectVector=function(e,t,n){let i=Ze.dot(e,t)/Ze.dot(t,t);return Ze.multiplyByScalar(t,i,n)};Ze.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};Ze.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]};Ze.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.x,t.x,n,i)&&R.equalsEpsilon(e.y,t.y,n,i)&&R.equalsEpsilon(e.z,t.z,n,i)};Ze.cross=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=t.x,a=t.y,c=t.z,u=o*c-r*a,f=r*s-i*c,d=i*a-o*s;return n.x=u,n.y=f,n.z=d,n};Ze.midpoint=function(e,t,n){return n.x=(e.x+t.x)*.5,n.y=(e.y+t.y)*.5,n.z=(e.z+t.z)*.5,n};Ze.fromDegrees=function(e,t,n,i,o){return e=R.toRadians(e),t=R.toRadians(t),Ze.fromRadians(e,t,n,i,o)};var Ru=new Ze,kC=new Ze,JAe=new Ze(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);Ze.fromRadians=function(e,t,n,i,o){n=y(n,0);let r=l(i)?i.radiiSquared:JAe,s=Math.cos(t);Ru.x=s*Math.cos(e),Ru.y=s*Math.sin(e),Ru.z=Math.sin(t),Ru=Ze.normalize(Ru,Ru),Ze.multiplyComponents(r,Ru,kC);let a=Math.sqrt(Ze.dot(Ru,kC));return kC=Ze.divideByScalar(kC,a,kC),Ru=Ze.multiplyByScalar(Ru,n,Ru),l(o)||(o=new Ze),Ze.add(kC,Ru,o)};Ze.fromDegreesArray=function(e,t,n){let i=e.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=e[o],s=e[o+1],a=o/2;n[a]=Ze.fromDegrees(r,s,0,t,n[a])}return n};Ze.fromRadiansArray=function(e,t,n){let i=e.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=e[o],s=e[o+1],a=o/2;n[a]=Ze.fromRadians(r,s,0,t,n[a])}return n};Ze.fromDegreesArrayHeights=function(e,t,n){let i=e.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=e[o],s=e[o+1],a=e[o+2],c=o/3;n[c]=Ze.fromDegrees(r,s,a,t,n[c])}return n};Ze.fromRadiansArrayHeights=function(e,t,n){let i=e.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=e[o],s=e[o+1],a=e[o+2],c=o/3;n[c]=Ze.fromRadians(r,s,a,t,n[c])}return n};Ze.ZERO=Object.freeze(new Ze(0,0,0));Ze.ONE=Object.freeze(new Ze(1,1,1));Ze.UNIT_X=Object.freeze(new Ze(1,0,0));Ze.UNIT_Y=Object.freeze(new Ze(0,1,0));Ze.UNIT_Z=Object.freeze(new Ze(0,0,1));Ze.prototype.clone=function(e){return Ze.clone(this,e)};Ze.prototype.equals=function(e){return Ze.equals(this,e)};Ze.prototype.equalsEpsilon=function(e,t,n){return Ze.equalsEpsilon(this,e,t,n)};Ze.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var h=Ze;var QAe=new h,eTe=new h;function tTe(e,t,n,i,o){let r=e.x,s=e.y,a=e.z,c=t.x,u=t.y,f=t.z,d=r*r*c*c,p=s*s*u*u,_=a*a*f*f,m=d+p+_,x=Math.sqrt(1/m),C=h.multiplyByScalar(e,x,QAe);if(m<i)return isFinite(x)?h.clone(C,o):void 0;let A=n.x,T=n.y,b=n.z,S=eTe;S.x=C.x*A*2,S.y=C.y*T*2,S.z=C.z*b*2;let w=(1-x)*h.magnitude(e)/(.5*h.magnitude(S)),D=0,O,I,L,N,g,E,v,P,M,V,U;do{w-=D,L=1/(1+w*A),N=1/(1+w*T),g=1/(1+w*b),E=L*L,v=N*N,P=g*g,M=E*L,V=v*N,U=P*g,O=d*E+p*v+_*P-1,I=d*M*A+p*V*T+_*U*b;let k=-2*I;D=O/k}while(Math.abs(O)>R.EPSILON12);return l(o)?(o.x=r*L,o.y=s*N,o.z=a*g,o):new h(r*L,s*N,a*g)}var UC=tTe;function Jr(e,t,n){this.longitude=y(e,0),this.latitude=y(t,0),this.height=y(n,0)}Jr.fromRadians=function(e,t,n,i){return n=y(n,0),l(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new Jr(e,t,n)};Jr.fromDegrees=function(e,t,n,i){return e=R.toRadians(e),t=R.toRadians(t),Jr.fromRadians(e,t,n,i)};var nTe=new h,iTe=new h,oTe=new h,rTe=new h(1/6378137,1/6378137,1/6356752314245179e-9),sTe=new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9)),aTe=R.EPSILON1;Jr.fromCartesian=function(e,t,n){let i=l(t)?t.oneOverRadii:rTe,o=l(t)?t.oneOverRadiiSquared:sTe,r=l(t)?t._centerToleranceSquared:aTe,s=UC(e,i,o,r,iTe);if(!l(s))return;let a=h.multiplyComponents(s,o,nTe);a=h.normalize(a,a);let c=h.subtract(e,s,oTe),u=Math.atan2(a.y,a.x),f=Math.asin(a.z),d=R.sign(h.dot(c,e))*h.magnitude(c);return l(n)?(n.longitude=u,n.latitude=f,n.height=d,n):new Jr(u,f,d)};Jr.toCartesian=function(e,t,n){return h.fromRadians(e.longitude,e.latitude,e.height,t,n)};Jr.clone=function(e,t){if(!!l(e))return l(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Jr(e.longitude,e.latitude,e.height)};Jr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};Jr.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};Jr.ZERO=Object.freeze(new Jr(0,0,0));Jr.prototype.clone=function(e){return Jr.clone(this,e)};Jr.prototype.equals=function(e){return Jr.equals(this,e)};Jr.prototype.equalsEpsilon=function(e,t){return Jr.equalsEpsilon(this,e,t)};Jr.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var me=Jr;function GX(e,t,n,i){t=y(t,0),n=y(n,0),i=y(i,0),e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=R.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function qi(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,GX(this,e,t,n)}Object.defineProperties(qi.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});qi.clone=function(e,t){if(!l(e))return;let n=e._radii;return l(t)?(h.clone(n,t._radii),h.clone(e._radiiSquared,t._radiiSquared),h.clone(e._radiiToTheFourth,t._radiiToTheFourth),h.clone(e._oneOverRadii,t._oneOverRadii),h.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new qi(n.x,n.y,n.z)};qi.fromCartesian3=function(e,t){return l(t)||(t=new qi),l(e)&&GX(t,e.x,e.y,e.z),t};qi.WGS84=Object.freeze(new qi(6378137,6378137,6356752314245179e-9));qi.UNIT_SPHERE=Object.freeze(new qi(1,1,1));qi.MOON=Object.freeze(new qi(R.LUNAR_RADIUS,R.LUNAR_RADIUS,R.LUNAR_RADIUS));qi.prototype.clone=function(e){return qi.clone(this,e)};qi.packedLength=h.packedLength;qi.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),t};qi.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t);return qi.fromCartesian3(i,n)};qi.prototype.geocentricSurfaceNormal=h.normalize;qi.prototype.geodeticSurfaceNormalCartographic=function(e,t){let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return l(t)||(t=new h),t.x=r,t.y=s,t.z=a,h.normalize(t,t)};qi.prototype.geodeticSurfaceNormal=function(e,t){if(!h.equalsEpsilon(e,h.ZERO,R.EPSILON14))return l(t)||(t=new h),t=h.multiplyComponents(e,this._oneOverRadiiSquared,t),h.normalize(t,t)};var cTe=new h,lTe=new h;qi.prototype.cartographicToCartesian=function(e,t){let n=cTe,i=lTe;this.geodeticSurfaceNormalCartographic(e,n),h.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(h.dot(n,i));return h.divideByScalar(i,o,i),h.multiplyByScalar(n,e.height,n),l(t)||(t=new h),h.add(i,n,t)};qi.prototype.cartographicArrayToCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=this.cartographicToCartesian(e[i],t[i]);return t};var uTe=new h,fTe=new h,dTe=new h;qi.prototype.cartesianToCartographic=function(e,t){let n=this.scaleToGeodeticSurface(e,fTe);if(!l(n))return;let i=this.geodeticSurfaceNormal(n,uTe),o=h.subtract(e,n,dTe),r=Math.atan2(i.y,i.x),s=Math.asin(i.z),a=R.sign(h.dot(o,e))*h.magnitude(o);return l(t)?(t.longitude=r,t.latitude=s,t.height=a,t):new me(r,s,a)};qi.prototype.cartesianArrayToCartographicArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.cartesianToCartographic(e[i],t[i]);return t};qi.prototype.scaleToGeodeticSurface=function(e,t){return UC(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)};qi.prototype.scaleToGeocentricSurface=function(e,t){l(t)||(t=new h);let n=e.x,i=e.y,o=e.z,r=this._oneOverRadiiSquared,s=1/Math.sqrt(n*n*r.x+i*i*r.y+o*o*r.z);return h.multiplyByScalar(e,s,t)};qi.prototype.transformPositionToScaledSpace=function(e,t){return l(t)||(t=new h),h.multiplyComponents(e,this._oneOverRadii,t)};qi.prototype.transformPositionFromScaledSpace=function(e,t){return l(t)||(t=new h),h.multiplyComponents(e,this._radii,t)};qi.prototype.equals=function(e){return this===e||l(e)&&h.equals(this._radii,e._radii)};qi.prototype.toString=function(){return this._radii.toString()};qi.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,n){t=y(t,0);let i=this._squaredXOverSquaredZ;if(l(n)||(n=new h),n.x=0,n.y=0,n.z=e.z*(1-i),!(Math.abs(n.z)>=this._radii.z-t))return n};var hTe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],mTe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function HX(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*hTe[s];r+=mTe[s]*(n(i+a)+n(i-a))}return r*=o,r}qi.prototype.surfaceArea=function(e){let t=e.west,n=e.east,i=e.south,o=e.north;for(;n<t;)n+=R.TWO_PI;let r=this._radiiSquared,s=r.x,a=r.y,c=r.z,u=s*a;return HX(i,o,function(f){let d=Math.cos(f),p=Math.sin(f);return Math.cos(f)*HX(t,n,function(_){let m=Math.cos(_),x=Math.sin(_);return Math.sqrt(u*p*p+c*(a*m*m+s*x*x)*d*d)})})};var re=qi;function gP(e){this._ellipsoid=y(e,re.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(gP.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});gP.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=e.latitude*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new h(i,o,r)};gP.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=e.y*n,r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new me(i,o,r)};var Si=gP;var pTe={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Zt=Object.freeze(pTe);function _Te(e,t){this.start=y(e,0),this.stop=y(t,0)}var Jc=_Te;function Je(e,t,n,i,o,r,s,a,c){this[0]=y(e,0),this[1]=y(i,0),this[2]=y(s,0),this[3]=y(t,0),this[4]=y(o,0),this[5]=y(a,0),this[6]=y(n,0),this[7]=y(r,0),this[8]=y(c,0)}Je.packedLength=9;Je.pack=function(e,t,n){return n=y(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t};Je.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Je),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n};Je.packArray=function(e,t){let n=e.length,i=n*9;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)Je.pack(e[o],t,o*9);return t};Je.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/9:t=new Array(n/9);for(let i=0;i<n;i+=9){let o=i/9;t[o]=Je.unpack(e,i,t[o])}return t};Je.clone=function(e,t){if(!!l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new Je(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])};Je.fromArray=Je.unpack;Je.fromColumnMajorArray=function(e,t){return Je.clone(e,t)};Je.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new Je(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])};Je.fromQuaternion=function(e,t){let n=e.x*e.x,i=e.x*e.y,o=e.x*e.z,r=e.x*e.w,s=e.y*e.y,a=e.y*e.z,c=e.y*e.w,u=e.z*e.z,f=e.z*e.w,d=e.w*e.w,p=n-s-u+d,_=2*(i-f),m=2*(o+c),x=2*(i+f),C=-n+s-u+d,A=2*(a-r),T=2*(o-c),b=2*(a+r),S=-n-s+u+d;return l(t)?(t[0]=p,t[1]=x,t[2]=T,t[3]=_,t[4]=C,t[5]=b,t[6]=m,t[7]=A,t[8]=S,t):new Je(p,_,m,x,C,A,T,b,S)};Je.fromHeadingPitchRoll=function(e,t){let n=Math.cos(-e.pitch),i=Math.cos(-e.heading),o=Math.cos(e.roll),r=Math.sin(-e.pitch),s=Math.sin(-e.heading),a=Math.sin(e.roll),c=n*i,u=-o*s+a*r*i,f=a*s+o*r*i,d=n*s,p=o*i+a*r*s,_=-a*i+o*r*s,m=-r,x=a*n,C=o*n;return l(t)?(t[0]=c,t[1]=d,t[2]=m,t[3]=u,t[4]=p,t[5]=x,t[6]=f,t[7]=_,t[8]=C,t):new Je(c,u,f,d,p,_,m,x,C)};Je.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new Je(e.x,0,0,0,e.y,0,0,0,e.z)};Je.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new Je(e,0,0,0,e,0,0,0,e)};Je.fromCrossProduct=function(e,t){return l(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new Je(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)};Je.fromRotationX=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=i,t[6]=0,t[7]=-i,t[8]=n,t):new Je(1,0,0,0,n,-i,0,i,n)};Je.fromRotationY=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=0,t[2]=-i,t[3]=0,t[4]=1,t[5]=0,t[6]=i,t[7]=0,t[8]=n,t):new Je(n,0,i,0,1,0,-i,0,n)};Je.fromRotationZ=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Je(n,-i,0,i,n,0,0,0,1)};Je.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]};Je.getElementIndex=function(e,t){return e*3+t};Je.getColumn=function(e,t,n){let i=t*3,o=e[i],r=e[i+1],s=e[i+2];return n.x=o,n.y=r,n.z=s,n};Je.setColumn=function(e,t,n,i){i=Je.clone(e,i);let o=t*3;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i};Je.getRow=function(e,t,n){let i=e[t],o=e[t+3],r=e[t+6];return n.x=i,n.y=o,n.z=r,n};Je.setRow=function(e,t,n,i){return i=Je.clone(e,i),i[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};var gTe=new h;Je.setScale=function(e,t,n){let i=Je.getScale(e,gTe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var yTe=new h;Je.setUniformScale=function(e,t,n){let i=Je.getScale(e,yTe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var C8=new h;Je.getScale=function(e,t){return t.x=h.magnitude(h.fromElements(e[0],e[1],e[2],C8)),t.y=h.magnitude(h.fromElements(e[3],e[4],e[5],C8)),t.z=h.magnitude(h.fromElements(e[6],e[7],e[8],C8)),t};var WX=new h;Je.getMaximumScale=function(e){return Je.getScale(e,WX),h.maximumComponent(WX)};var xTe=new h;Je.setRotation=function(e,t,n){let i=Je.getScale(e,xTe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};var CTe=new h;Je.getRotation=function(e,t){let n=Je.getScale(e,CTe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t};Je.multiply=function(e,t,n){let i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],o=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],r=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],a=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],f=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],d=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=o,n[2]=r,n[3]=s,n[4]=a,n[5]=c,n[6]=u,n[7]=f,n[8]=d,n};Je.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n};Je.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n};Je.multiplyByVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[3]*o+e[6]*r,a=e[1]*i+e[4]*o+e[7]*r,c=e[2]*i+e[5]*o+e[8]*r;return n.x=s,n.y=a,n.z=c,n};Je.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};Je.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n};Je.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};Je.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t};Je.transpose=function(e,t){let n=e[0],i=e[3],o=e[6],r=e[1],s=e[4],a=e[7],c=e[2],u=e[5],f=e[8];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=f,t};function ATe(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var A8=[1,0,0],T8=[2,2,1];function TTe(e){let t=0;for(let n=0;n<3;++n){let i=e[Je.getElementIndex(T8[n],A8[n])];t+=2*i*i}return Math.sqrt(t)}function bTe(e,t){let n=R.EPSILON15,i=0,o=1;for(let u=0;u<3;++u){let f=Math.abs(e[Je.getElementIndex(T8[u],A8[u])]);f>i&&(o=u,i=f)}let r=1,s=0,a=A8[o],c=T8[o];if(Math.abs(e[Je.getElementIndex(c,a)])>n){let u=e[Je.getElementIndex(c,c)],f=e[Je.getElementIndex(a,a)],d=e[Je.getElementIndex(c,a)],p=(u-f)/2/d,_;p<0?_=-1/(-p+Math.sqrt(1+p*p)):_=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+_*_),s=_*r}return t=Je.clone(Je.IDENTITY,t),t[Je.getElementIndex(a,a)]=t[Je.getElementIndex(c,c)]=r,t[Je.getElementIndex(c,a)]=s,t[Je.getElementIndex(a,c)]=-s,t}var yP=new Je,jX=new Je;Je.computeEigenDecomposition=function(e,t){let n=R.EPSILON20,i=10,o=0,r=0;l(t)||(t={});let s=t.unitary=Je.clone(Je.IDENTITY,t.unitary),a=t.diagonal=Je.clone(e,t.diagonal),c=n*ATe(a);for(;r<i&&TTe(a)>c;)bTe(a,yP),Je.transpose(yP,jX),Je.multiply(a,yP,a),Je.multiply(jX,a,a),Je.multiply(s,yP,s),++o>2&&(++r,o=0);return t};Je.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t};Je.determinant=function(e){let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],c=e[5],u=e[8];return t*(r*u-c*s)+o*(c*i-n*u)+a*(n*s-r*i)};Je.inverse=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],c=e[6],u=e[7],f=e[8],d=Je.determinant(e);t[0]=s*f-u*a,t[1]=u*o-i*f,t[2]=i*a-s*o,t[3]=c*a-r*f,t[4]=n*f-c*o,t[5]=r*o-n*a,t[6]=r*u-c*s,t[7]=c*i-n*u,t[8]=n*s-r*i;let p=1/d;return Je.multiplyByScalar(t,p,t)};var ETe=new Je;Je.inverseTranspose=function(e,t){return Je.inverse(Je.transpose(e,ETe),t)};Je.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]};Je.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n};Je.IDENTITY=Object.freeze(new Je(1,0,0,0,1,0,0,0,1));Je.ZERO=Object.freeze(new Je(0,0,0,0,0,0,0,0,0));Je.COLUMN0ROW0=0;Je.COLUMN0ROW1=1;Je.COLUMN0ROW2=2;Je.COLUMN1ROW0=3;Je.COLUMN1ROW1=4;Je.COLUMN1ROW2=5;Je.COLUMN2ROW0=6;Je.COLUMN2ROW1=7;Je.COLUMN2ROW2=8;Object.defineProperties(Je.prototype,{length:{get:function(){return Je.packedLength}}});Je.prototype.clone=function(e){return Je.clone(this,e)};Je.prototype.equals=function(e){return Je.equals(this,e)};Je.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]};Je.prototype.equalsEpsilon=function(e,t){return Je.equalsEpsilon(this,e,t)};Je.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
87
|
+
${this.stack.toString()}`),e};ey.throwInstantiationError=function(){throw new ey("This function defines an interface and should not be called directly.")};var ye=ey;var ls={};ls.typeOf={};function $Ae(e){return`${e} is required, actual value was undefined`}function VC(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}ls.defined=function(e,t){if(!l(t))throw new ye($Ae(e))};ls.typeOf.func=function(e,t){if(typeof t!="function")throw new ye(VC(typeof t,"function",e))};ls.typeOf.string=function(e,t){if(typeof t!="string")throw new ye(VC(typeof t,"string",e))};ls.typeOf.number=function(e,t){if(typeof t!="number")throw new ye(VC(typeof t,"number",e))};ls.typeOf.number.lessThan=function(e,t,n){if(ls.typeOf.number(e,t),t>=n)throw new ye(`Expected ${e} to be less than ${n}, actual value was ${t}`)};ls.typeOf.number.lessThanOrEquals=function(e,t,n){if(ls.typeOf.number(e,t),t>n)throw new ye(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};ls.typeOf.number.greaterThan=function(e,t,n){if(ls.typeOf.number(e,t),t<=n)throw new ye(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};ls.typeOf.number.greaterThanOrEquals=function(e,t,n){if(ls.typeOf.number(e,t),t<n)throw new ye(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};ls.typeOf.object=function(e,t){if(typeof t!="object")throw new ye(VC(typeof t,"object",e))};ls.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new ye(VC(typeof t,"boolean",e))};ls.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new ye(VC(typeof t,"bigint",e))};ls.typeOf.number.equals=function(e,t,n,i){if(ls.typeOf.number(e,n),ls.typeOf.number(t,i),n!==i)throw new ye(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var Nl=ls;function FX(e,t){return e??t}FX.EMPTY_OBJECT=Object.freeze({});var y=FX;var ah=Zc(kX());var it={};it.EPSILON1=.1;it.EPSILON2=.01;it.EPSILON3=.001;it.EPSILON4=1e-4;it.EPSILON5=1e-5;it.EPSILON6=1e-6;it.EPSILON7=1e-7;it.EPSILON8=1e-8;it.EPSILON9=1e-9;it.EPSILON10=1e-10;it.EPSILON11=1e-11;it.EPSILON12=1e-12;it.EPSILON13=1e-13;it.EPSILON14=1e-14;it.EPSILON15=1e-15;it.EPSILON16=1e-16;it.EPSILON17=1e-17;it.EPSILON18=1e-18;it.EPSILON19=1e-19;it.EPSILON20=1e-20;it.EPSILON21=1e-21;it.GRAVITATIONALPARAMETER=3986004418e5;it.SOLAR_RADIUS=6955e5;it.LUNAR_RADIUS=1737400;it.SIXTY_FOUR_KILOBYTES=64*1024;it.FOUR_GIGABYTES=4*1024*1024*1024;it.sign=y(Math.sign,function(t){return t=+t,t===0||t!==t?t:t>0?1:-1});it.signNotZero=function(e){return e<0?-1:1};it.toSNorm=function(e,t){return t=y(t,255),Math.round((it.clamp(e,-1,1)*.5+.5)*t)};it.fromSNorm=function(e,t){return t=y(t,255),it.clamp(e,0,t)/t*2-1};it.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:it.clamp((e-t)/n,0,1)};it.sinh=y(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2});it.cosh=y(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2});it.lerp=function(e,t,n){return(1-n)*e+n*t};it.PI=Math.PI;it.ONE_OVER_PI=1/Math.PI;it.PI_OVER_TWO=Math.PI/2;it.PI_OVER_THREE=Math.PI/3;it.PI_OVER_FOUR=Math.PI/4;it.PI_OVER_SIX=Math.PI/6;it.THREE_PI_OVER_TWO=3*Math.PI/2;it.TWO_PI=2*Math.PI;it.ONE_OVER_TWO_PI=1/(2*Math.PI);it.RADIANS_PER_DEGREE=Math.PI/180;it.DEGREES_PER_RADIAN=180/Math.PI;it.RADIANS_PER_ARCSECOND=it.RADIANS_PER_DEGREE/3600;it.toRadians=function(e){return e*it.RADIANS_PER_DEGREE};it.toDegrees=function(e){return e*it.DEGREES_PER_RADIAN};it.convertLongitudeRange=function(e){let t=it.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};it.clampToLatitudeRange=function(e){return it.clamp(e,-1*it.PI_OVER_TWO,it.PI_OVER_TWO)};it.negativePiToPi=function(e){return e>=-it.PI&&e<=it.PI?e:it.zeroToTwoPi(e+it.PI)-it.PI};it.zeroToTwoPi=function(e){if(e>=0&&e<=it.TWO_PI)return e;let t=it.mod(e,it.TWO_PI);return Math.abs(t)<it.EPSILON14&&Math.abs(e)>it.EPSILON14?it.TWO_PI:t};it.mod=function(e,t){return it.sign(e)===it.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};it.equalsEpsilon=function(e,t,n,i){n=y(n,0),i=y(i,n);let o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))};it.lessThan=function(e,t,n){return e-t<-n};it.lessThanOrEquals=function(e,t,n){return e-t<n};it.greaterThan=function(e,t,n){return e-t>n};it.greaterThanOrEquals=function(e,t,n){return e-t>-n};var mP=[1];it.factorial=function(e){let t=mP.length;if(e>=t){let n=mP[t-1];for(let i=t;i<=e;i++){let o=n*i;mP.push(o),n=o}}return mP[e]};it.incrementWrap=function(e,t,n){return n=y(n,0),++e,e>t&&(e=n),e};it.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};it.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};it.previousPowerOfTwo=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e};it.clamp=function(e,t,n){return e<t?t:e>n?n:e};var UX=new ah.default;it.setRandomNumberSeed=function(e){UX=new ah.default(e)};it.nextRandomNumber=function(){return UX.random()};it.randomBetween=function(e,t){return it.nextRandomNumber()*(t-e)+e};it.acosClamped=function(e){return Math.acos(it.clamp(e,-1,1))};it.asinClamped=function(e){return Math.asin(it.clamp(e,-1,1))};it.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};it.logBase=function(e,t){return Math.log(e)/Math.log(t)};it.cbrt=y(Math.cbrt,function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n});it.log2=y(Math.log2,function(t){return Math.log(t)*Math.LOG2E});it.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};it.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};it.fastApproximateAtan2=function(e,t){let n,i=Math.abs(e);n=Math.abs(t);let o=Math.max(i,n);n=Math.min(i,n);let r=n/o;return i=it.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?it.PI_OVER_TWO-i:i,i=e<0?it.PI-i:i,i=t<0?-i:i,i};var R=it;function Ze(e,t,n){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0)}Ze.fromSpherical=function(e,t){l(t)||(t=new Ze);let n=e.clock,i=e.cone,o=y(e.magnitude,1),r=o*Math.sin(i);return t.x=r*Math.cos(n),t.y=r*Math.sin(n),t.z=o*Math.cos(i),t};Ze.fromElements=function(e,t,n,i){return l(i)?(i.x=e,i.y=t,i.z=n,i):new Ze(e,t,n)};Ze.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new Ze(e.x,e.y,e.z)};Ze.fromCartesian4=Ze.clone;Ze.packedLength=3;Ze.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t};Ze.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Ze),n.x=e[t++],n.y=e[t++],n.z=e[t],n};Ze.packArray=function(e,t){let n=e.length,i=n*3;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)Ze.pack(e[o],t,o*3);return t};Ze.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/3:t=new Array(n/3);for(let i=0;i<n;i+=3){let o=i/3;t[o]=Ze.unpack(e,i,t[o])}return t};Ze.fromArray=Ze.unpack;Ze.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)};Ze.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)};Ze.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n};Ze.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n};Ze.clamp=function(e,t,n,i){let o=R.clamp(e.x,t.x,n.x),r=R.clamp(e.y,t.y,n.y),s=R.clamp(e.z,t.z,n.z);return i.x=o,i.y=r,i.z=s,i};Ze.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z};Ze.magnitude=function(e){return Math.sqrt(Ze.magnitudeSquared(e))};var _P=new Ze;Ze.distance=function(e,t){return Ze.subtract(e,t,_P),Ze.magnitude(_P)};Ze.distanceSquared=function(e,t){return Ze.subtract(e,t,_P),Ze.magnitudeSquared(_P)};Ze.normalize=function(e,t){let n=Ze.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t};Ze.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z};Ze.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n};Ze.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n};Ze.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n};Ze.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n};Ze.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n};Ze.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n};Ze.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t};Ze.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var zX=new Ze;Ze.lerp=function(e,t,n,i){return Ze.multiplyByScalar(t,n,zX),i=Ze.multiplyByScalar(e,1-n,i),Ze.add(zX,i,i)};var pP=new Ze,x8=new Ze;Ze.angleBetween=function(e,t){Ze.normalize(e,pP),Ze.normalize(t,x8);let n=Ze.dot(pP,x8),i=Ze.magnitude(Ze.cross(pP,x8,pP));return Math.atan2(i,n)};var ZAe=new Ze;Ze.mostOrthogonalAxis=function(e,t){let n=Ze.normalize(e,ZAe);return Ze.abs(n,n),n.x<=n.y?n.x<=n.z?t=Ze.clone(Ze.UNIT_X,t):t=Ze.clone(Ze.UNIT_Z,t):n.y<=n.z?t=Ze.clone(Ze.UNIT_Y,t):t=Ze.clone(Ze.UNIT_Z,t),t};Ze.projectVector=function(e,t,n){let i=Ze.dot(e,t)/Ze.dot(t,t);return Ze.multiplyByScalar(t,i,n)};Ze.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z};Ze.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]};Ze.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.x,t.x,n,i)&&R.equalsEpsilon(e.y,t.y,n,i)&&R.equalsEpsilon(e.z,t.z,n,i)};Ze.cross=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=t.x,a=t.y,c=t.z,u=o*c-r*a,f=r*s-i*c,d=i*a-o*s;return n.x=u,n.y=f,n.z=d,n};Ze.midpoint=function(e,t,n){return n.x=(e.x+t.x)*.5,n.y=(e.y+t.y)*.5,n.z=(e.z+t.z)*.5,n};Ze.fromDegrees=function(e,t,n,i,o){return e=R.toRadians(e),t=R.toRadians(t),Ze.fromRadians(e,t,n,i,o)};var Ru=new Ze,kC=new Ze,JAe=new Ze(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);Ze.fromRadians=function(e,t,n,i,o){n=y(n,0);let r=l(i)?i.radiiSquared:JAe,s=Math.cos(t);Ru.x=s*Math.cos(e),Ru.y=s*Math.sin(e),Ru.z=Math.sin(t),Ru=Ze.normalize(Ru,Ru),Ze.multiplyComponents(r,Ru,kC);let a=Math.sqrt(Ze.dot(Ru,kC));return kC=Ze.divideByScalar(kC,a,kC),Ru=Ze.multiplyByScalar(Ru,n,Ru),l(o)||(o=new Ze),Ze.add(kC,Ru,o)};Ze.fromDegreesArray=function(e,t,n){let i=e.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=e[o],s=e[o+1],a=o/2;n[a]=Ze.fromDegrees(r,s,0,t,n[a])}return n};Ze.fromRadiansArray=function(e,t,n){let i=e.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){let r=e[o],s=e[o+1],a=o/2;n[a]=Ze.fromRadians(r,s,0,t,n[a])}return n};Ze.fromDegreesArrayHeights=function(e,t,n){let i=e.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=e[o],s=e[o+1],a=e[o+2],c=o/3;n[c]=Ze.fromDegrees(r,s,a,t,n[c])}return n};Ze.fromRadiansArrayHeights=function(e,t,n){let i=e.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){let r=e[o],s=e[o+1],a=e[o+2],c=o/3;n[c]=Ze.fromRadians(r,s,a,t,n[c])}return n};Ze.ZERO=Object.freeze(new Ze(0,0,0));Ze.ONE=Object.freeze(new Ze(1,1,1));Ze.UNIT_X=Object.freeze(new Ze(1,0,0));Ze.UNIT_Y=Object.freeze(new Ze(0,1,0));Ze.UNIT_Z=Object.freeze(new Ze(0,0,1));Ze.prototype.clone=function(e){return Ze.clone(this,e)};Ze.prototype.equals=function(e){return Ze.equals(this,e)};Ze.prototype.equalsEpsilon=function(e,t,n){return Ze.equalsEpsilon(this,e,t,n)};Ze.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var h=Ze;var QAe=new h,eTe=new h;function tTe(e,t,n,i,o){let r=e.x,s=e.y,a=e.z,c=t.x,u=t.y,f=t.z,d=r*r*c*c,p=s*s*u*u,_=a*a*f*f,m=d+p+_,x=Math.sqrt(1/m),C=h.multiplyByScalar(e,x,QAe);if(m<i)return isFinite(x)?h.clone(C,o):void 0;let A=n.x,T=n.y,b=n.z,S=eTe;S.x=C.x*A*2,S.y=C.y*T*2,S.z=C.z*b*2;let w=(1-x)*h.magnitude(e)/(.5*h.magnitude(S)),D=0,O,I,L,N,g,E,v,P,M,V,U;do{w-=D,L=1/(1+w*A),N=1/(1+w*T),g=1/(1+w*b),E=L*L,v=N*N,P=g*g,M=E*L,V=v*N,U=P*g,O=d*E+p*v+_*P-1,I=d*M*A+p*V*T+_*U*b;let k=-2*I;D=O/k}while(Math.abs(O)>R.EPSILON12);return l(o)?(o.x=r*L,o.y=s*N,o.z=a*g,o):new h(r*L,s*N,a*g)}var UC=tTe;function Jr(e,t,n){this.longitude=y(e,0),this.latitude=y(t,0),this.height=y(n,0)}Jr.fromRadians=function(e,t,n,i){return n=y(n,0),l(i)?(i.longitude=e,i.latitude=t,i.height=n,i):new Jr(e,t,n)};Jr.fromDegrees=function(e,t,n,i){return e=R.toRadians(e),t=R.toRadians(t),Jr.fromRadians(e,t,n,i)};var nTe=new h,iTe=new h,oTe=new h,rTe=new h(1/6378137,1/6378137,1/6356752314245179e-9),sTe=new h(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9)),aTe=R.EPSILON1;Jr.fromCartesian=function(e,t,n){let i=l(t)?t.oneOverRadii:rTe,o=l(t)?t.oneOverRadiiSquared:sTe,r=l(t)?t._centerToleranceSquared:aTe,s=UC(e,i,o,r,iTe);if(!l(s))return;let a=h.multiplyComponents(s,o,nTe);a=h.normalize(a,a);let c=h.subtract(e,s,oTe),u=Math.atan2(a.y,a.x),f=Math.asin(a.z),d=R.sign(h.dot(c,e))*h.magnitude(c);return l(n)?(n.longitude=u,n.latitude=f,n.height=d,n):new Jr(u,f,d)};Jr.toCartesian=function(e,t,n){return h.fromRadians(e.longitude,e.latitude,e.height,t,n)};Jr.clone=function(e,t){if(!!l(e))return l(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new Jr(e.longitude,e.latitude,e.height)};Jr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height};Jr.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.longitude-t.longitude)<=n&&Math.abs(e.latitude-t.latitude)<=n&&Math.abs(e.height-t.height)<=n};Jr.ZERO=Object.freeze(new Jr(0,0,0));Jr.prototype.clone=function(e){return Jr.clone(this,e)};Jr.prototype.equals=function(e){return Jr.equals(this,e)};Jr.prototype.equalsEpsilon=function(e,t){return Jr.equalsEpsilon(this,e,t)};Jr.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var me=Jr;function GX(e,t,n,i){t=y(t,0),n=y(n,0),i=y(i,0),e._radii=new h(t,n,i),e._radiiSquared=new h(t*t,n*n,i*i),e._radiiToTheFourth=new h(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new h(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new h(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=R.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function qi(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,GX(this,e,t,n)}Object.defineProperties(qi.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});qi.clone=function(e,t){if(!l(e))return;let n=e._radii;return l(t)?(h.clone(n,t._radii),h.clone(e._radiiSquared,t._radiiSquared),h.clone(e._radiiToTheFourth,t._radiiToTheFourth),h.clone(e._oneOverRadii,t._oneOverRadii),h.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new qi(n.x,n.y,n.z)};qi.fromCartesian3=function(e,t){return l(t)||(t=new qi),l(e)&&GX(t,e.x,e.y,e.z),t};qi.WGS84=Object.freeze(new qi(6378137,6378137,6356752314245179e-9));qi.UNIT_SPHERE=Object.freeze(new qi(1,1,1));qi.MOON=Object.freeze(new qi(R.LUNAR_RADIUS,R.LUNAR_RADIUS,R.LUNAR_RADIUS));qi.prototype.clone=function(e){return qi.clone(this,e)};qi.packedLength=h.packedLength;qi.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),t};qi.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t);return qi.fromCartesian3(i,n)};qi.prototype.geocentricSurfaceNormal=h.normalize;qi.prototype.geodeticSurfaceNormalCartographic=function(e,t){let n=e.longitude,i=e.latitude,o=Math.cos(i),r=o*Math.cos(n),s=o*Math.sin(n),a=Math.sin(i);return l(t)||(t=new h),t.x=r,t.y=s,t.z=a,h.normalize(t,t)};qi.prototype.geodeticSurfaceNormal=function(e,t){if(!h.equalsEpsilon(e,h.ZERO,R.EPSILON14))return l(t)||(t=new h),t=h.multiplyComponents(e,this._oneOverRadiiSquared,t),h.normalize(t,t)};var cTe=new h,lTe=new h;qi.prototype.cartographicToCartesian=function(e,t){let n=cTe,i=lTe;this.geodeticSurfaceNormalCartographic(e,n),h.multiplyComponents(this._radiiSquared,n,i);let o=Math.sqrt(h.dot(n,i));return h.divideByScalar(i,o,i),h.multiplyByScalar(n,e.height,n),l(t)||(t=new h),h.add(i,n,t)};qi.prototype.cartographicArrayToCartesianArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;i++)t[i]=this.cartographicToCartesian(e[i],t[i]);return t};var uTe=new h,fTe=new h,dTe=new h;qi.prototype.cartesianToCartographic=function(e,t){let n=this.scaleToGeodeticSurface(e,fTe);if(!l(n))return;let i=this.geodeticSurfaceNormal(n,uTe),o=h.subtract(e,n,dTe),r=Math.atan2(i.y,i.x),s=Math.asin(i.z),a=R.sign(h.dot(o,e))*h.magnitude(o);return l(t)?(t.longitude=r,t.latitude=s,t.height=a,t):new me(r,s,a)};qi.prototype.cartesianArrayToCartographicArray=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.cartesianToCartographic(e[i],t[i]);return t};qi.prototype.scaleToGeodeticSurface=function(e,t){return UC(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)};qi.prototype.scaleToGeocentricSurface=function(e,t){l(t)||(t=new h);let n=e.x,i=e.y,o=e.z,r=this._oneOverRadiiSquared,s=1/Math.sqrt(n*n*r.x+i*i*r.y+o*o*r.z);return h.multiplyByScalar(e,s,t)};qi.prototype.transformPositionToScaledSpace=function(e,t){return l(t)||(t=new h),h.multiplyComponents(e,this._oneOverRadii,t)};qi.prototype.transformPositionFromScaledSpace=function(e,t){return l(t)||(t=new h),h.multiplyComponents(e,this._radii,t)};qi.prototype.equals=function(e){return this===e||l(e)&&h.equals(this._radii,e._radii)};qi.prototype.toString=function(){return this._radii.toString()};qi.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,n){t=y(t,0);let i=this._squaredXOverSquaredZ;if(l(n)||(n=new h),n.x=0,n.y=0,n.z=e.z*(1-i),!(Math.abs(n.z)>=this._radii.z-t))return n};var hTe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],mTe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function HX(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*hTe[s];r+=mTe[s]*(n(i+a)+n(i-a))}return r*=o,r}qi.prototype.surfaceArea=function(e){let t=e.west,n=e.east,i=e.south,o=e.north;for(;n<t;)n+=R.TWO_PI;let r=this._radiiSquared,s=r.x,a=r.y,c=r.z,u=s*a;return HX(i,o,function(f){let d=Math.cos(f),p=Math.sin(f);return Math.cos(f)*HX(t,n,function(_){let m=Math.cos(_),x=Math.sin(_);return Math.sqrt(u*p*p+c*(a*m*m+s*x*x)*d*d)})})};var re=qi;function gP(e){this._ellipsoid=y(e,re.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(gP.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});gP.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=e.latitude*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new h(i,o,r)};gP.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=e.y*n,r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new me(i,o,r)};var Si=gP;var pTe={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},Zt=Object.freeze(pTe);function _Te(e,t){this.start=y(e,0),this.stop=y(t,0)}var Jc=_Te;function Je(e,t,n,i,o,r,s,a,c){this[0]=y(e,0),this[1]=y(i,0),this[2]=y(s,0),this[3]=y(t,0),this[4]=y(o,0),this[5]=y(a,0),this[6]=y(n,0),this[7]=y(r,0),this[8]=y(c,0)}Je.packedLength=9;Je.pack=function(e,t,n){return n=y(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t};Je.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Je),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n};Je.packArray=function(e,t){let n=e.length,i=n*9;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)Je.pack(e[o],t,o*9);return t};Je.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/9:t=new Array(n/9);for(let i=0;i<n;i+=9){let o=i/9;t[o]=Je.unpack(e,i,t[o])}return t};Je.clone=function(e,t){if(!!l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new Je(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])};Je.fromArray=Je.unpack;Je.fromColumnMajorArray=function(e,t){return Je.clone(e,t)};Je.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new Je(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])};Je.fromQuaternion=function(e,t){let n=e.x*e.x,i=e.x*e.y,o=e.x*e.z,r=e.x*e.w,s=e.y*e.y,a=e.y*e.z,c=e.y*e.w,u=e.z*e.z,f=e.z*e.w,d=e.w*e.w,p=n-s-u+d,_=2*(i-f),m=2*(o+c),x=2*(i+f),C=-n+s-u+d,A=2*(a-r),T=2*(o-c),b=2*(a+r),S=-n-s+u+d;return l(t)?(t[0]=p,t[1]=x,t[2]=T,t[3]=_,t[4]=C,t[5]=b,t[6]=m,t[7]=A,t[8]=S,t):new Je(p,_,m,x,C,A,T,b,S)};Je.fromHeadingPitchRoll=function(e,t){let n=Math.cos(-e.pitch),i=Math.cos(-e.heading),o=Math.cos(e.roll),r=Math.sin(-e.pitch),s=Math.sin(-e.heading),a=Math.sin(e.roll),c=n*i,u=-o*s+a*r*i,f=a*s+o*r*i,d=n*s,p=o*i+a*r*s,_=-a*i+o*r*s,m=-r,x=a*n,C=o*n;return l(t)?(t[0]=c,t[1]=d,t[2]=m,t[3]=u,t[4]=p,t[5]=x,t[6]=f,t[7]=_,t[8]=C,t):new Je(c,u,f,d,p,_,m,x,C)};Je.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new Je(e.x,0,0,0,e.y,0,0,0,e.z)};Je.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new Je(e,0,0,0,e,0,0,0,e)};Je.fromCrossProduct=function(e,t){return l(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new Je(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)};Je.fromRotationX=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=i,t[6]=0,t[7]=-i,t[8]=n,t):new Je(1,0,0,0,n,-i,0,i,n)};Je.fromRotationY=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=0,t[2]=-i,t[3]=0,t[4]=1,t[5]=0,t[6]=i,t[7]=0,t[8]=n,t):new Je(n,0,i,0,1,0,-i,0,n)};Je.fromRotationZ=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Je(n,-i,0,i,n,0,0,0,1)};Je.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]};Je.getElementIndex=function(e,t){return e*3+t};Je.getColumn=function(e,t,n){let i=t*3,o=e[i],r=e[i+1],s=e[i+2];return n.x=o,n.y=r,n.z=s,n};Je.setColumn=function(e,t,n,i){i=Je.clone(e,i);let o=t*3;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i};Je.getRow=function(e,t,n){let i=e[t],o=e[t+3],r=e[t+6];return n.x=i,n.y=o,n.z=r,n};Je.setRow=function(e,t,n,i){return i=Je.clone(e,i),i[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};var gTe=new h;Je.setScale=function(e,t,n){let i=Je.getScale(e,gTe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var yTe=new h;Je.setUniformScale=function(e,t,n){let i=Je.getScale(e,yTe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*s,n[7]=e[7]*s,n[8]=e[8]*s,n};var C8=new h;Je.getScale=function(e,t){return t.x=h.magnitude(h.fromElements(e[0],e[1],e[2],C8)),t.y=h.magnitude(h.fromElements(e[3],e[4],e[5],C8)),t.z=h.magnitude(h.fromElements(e[6],e[7],e[8],C8)),t};var WX=new h;Je.getMaximumScale=function(e){return Je.getScale(e,WX),h.maximumComponent(WX)};var xTe=new h;Je.setRotation=function(e,t,n){let i=Je.getScale(e,xTe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};var CTe=new h;Je.getRotation=function(e,t){let n=Je.getScale(e,CTe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t};Je.multiply=function(e,t,n){let i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],o=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],r=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],s=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],a=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],u=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],f=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],d=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=o,n[2]=r,n[3]=s,n[4]=a,n[5]=c,n[6]=u,n[7]=f,n[8]=d,n};Je.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n};Je.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n};Je.multiplyByVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[3]*o+e[6]*r,a=e[1]*i+e[4]*o+e[7]*r,c=e[2]*i+e[5]*o+e[8]*r;return n.x=s,n.y=a,n.z=c,n};Je.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};Je.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n};Je.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n};Je.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t};Je.transpose=function(e,t){let n=e[0],i=e[3],o=e[6],r=e[1],s=e[4],a=e[7],c=e[2],u=e[5],f=e[8];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=f,t};function ATe(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var A8=[1,0,0],T8=[2,2,1];function TTe(e){let t=0;for(let n=0;n<3;++n){let i=e[Je.getElementIndex(T8[n],A8[n])];t+=2*i*i}return Math.sqrt(t)}function bTe(e,t){let n=R.EPSILON15,i=0,o=1;for(let u=0;u<3;++u){let f=Math.abs(e[Je.getElementIndex(T8[u],A8[u])]);f>i&&(o=u,i=f)}let r=1,s=0,a=A8[o],c=T8[o];if(Math.abs(e[Je.getElementIndex(c,a)])>n){let u=e[Je.getElementIndex(c,c)],f=e[Je.getElementIndex(a,a)],d=e[Je.getElementIndex(c,a)],p=(u-f)/2/d,_;p<0?_=-1/(-p+Math.sqrt(1+p*p)):_=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+_*_),s=_*r}return t=Je.clone(Je.IDENTITY,t),t[Je.getElementIndex(a,a)]=t[Je.getElementIndex(c,c)]=r,t[Je.getElementIndex(c,a)]=s,t[Je.getElementIndex(a,c)]=-s,t}var yP=new Je,jX=new Je;Je.computeEigenDecomposition=function(e,t){let n=R.EPSILON20,i=10,o=0,r=0;l(t)||(t={});let s=t.unitary=Je.clone(Je.IDENTITY,t.unitary),a=t.diagonal=Je.clone(e,t.diagonal),c=n*ATe(a);for(;r<i&&TTe(a)>c;)bTe(a,yP),Je.transpose(yP,jX),Je.multiply(a,yP,a),Je.multiply(jX,a,a),Je.multiply(s,yP,s),++o>2&&(++r,o=0);return t};Je.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t};Je.determinant=function(e){let t=e[0],n=e[3],i=e[6],o=e[1],r=e[4],s=e[7],a=e[2],c=e[5],u=e[8];return t*(r*u-c*s)+o*(c*i-n*u)+a*(n*s-r*i)};Je.inverse=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],c=e[6],u=e[7],f=e[8],d=Je.determinant(e);t[0]=s*f-u*a,t[1]=u*o-i*f,t[2]=i*a-s*o,t[3]=c*a-r*f,t[4]=n*f-c*o,t[5]=r*o-n*a,t[6]=r*u-c*s,t[7]=c*i-n*u,t[8]=n*s-r*i;let p=1/d;return Je.multiplyByScalar(t,p,t)};var ETe=new Je;Je.inverseTranspose=function(e,t){return Je.inverse(Je.transpose(e,ETe),t)};Je.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]};Je.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n};Je.IDENTITY=Object.freeze(new Je(1,0,0,0,1,0,0,0,1));Je.ZERO=Object.freeze(new Je(0,0,0,0,0,0,0,0,0));Je.COLUMN0ROW0=0;Je.COLUMN0ROW1=1;Je.COLUMN0ROW2=2;Je.COLUMN1ROW0=3;Je.COLUMN1ROW1=4;Je.COLUMN1ROW2=5;Je.COLUMN2ROW0=6;Je.COLUMN2ROW1=7;Je.COLUMN2ROW2=8;Object.defineProperties(Je.prototype,{length:{get:function(){return Je.packedLength}}});Je.prototype.clone=function(e){return Je.clone(this,e)};Je.prototype.equals=function(e){return Je.equals(this,e)};Je.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]};Je.prototype.equalsEpsilon=function(e,t){return Je.equalsEpsilon(this,e,t)};Je.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
88
88
|
(${this[1]}, ${this[4]}, ${this[7]})
|
|
89
89
|
(${this[2]}, ${this[5]}, ${this[8]})`};var Q=Je;function ht(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0),this.w=y(i,0)}ht.fromElements=function(e,t,n,i,o){return l(o)?(o.x=e,o.y=t,o.z=n,o.w=i,o):new ht(e,t,n,i)};ht.fromColor=function(e,t){return l(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new ht(e.red,e.green,e.blue,e.alpha)};ht.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new ht(e.x,e.y,e.z,e.w)};ht.packedLength=4;ht.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};ht.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ht),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n};ht.packArray=function(e,t){let n=e.length,i=n*4;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)ht.pack(e[o],t,o*4);return t};ht.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=ht.unpack(e,i,t[o])}return t};ht.fromArray=ht.unpack;ht.maximumComponent=function(e){return Math.max(e.x,e.y,e.z,e.w)};ht.minimumComponent=function(e){return Math.min(e.x,e.y,e.z,e.w)};ht.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n.w=Math.min(e.w,t.w),n};ht.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n.w=Math.max(e.w,t.w),n};ht.clamp=function(e,t,n,i){let o=R.clamp(e.x,t.x,n.x),r=R.clamp(e.y,t.y,n.y),s=R.clamp(e.z,t.z,n.z),a=R.clamp(e.w,t.w,n.w);return i.x=o,i.y=r,i.z=s,i.w=a,i};ht.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};ht.magnitude=function(e){return Math.sqrt(ht.magnitudeSquared(e))};var xP=new ht;ht.distance=function(e,t){return ht.subtract(e,t,xP),ht.magnitude(xP)};ht.distanceSquared=function(e,t){return ht.subtract(e,t,xP),ht.magnitudeSquared(xP)};ht.normalize=function(e,t){let n=ht.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,t};ht.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};ht.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n.w=e.w*t.w,n};ht.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n.w=e.w/t.w,n};ht.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};ht.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};ht.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};ht.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};ht.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};ht.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var qX=new ht;ht.lerp=function(e,t,n,i){return ht.multiplyByScalar(t,n,qX),i=ht.multiplyByScalar(e,1-n,i),ht.add(qX,i,i)};var STe=new ht;ht.mostOrthogonalAxis=function(e,t){let n=ht.normalize(e,STe);return ht.abs(n,n),n.x<=n.y?n.x<=n.z?n.x<=n.w?t=ht.clone(ht.UNIT_X,t):t=ht.clone(ht.UNIT_W,t):n.z<=n.w?t=ht.clone(ht.UNIT_Z,t):t=ht.clone(ht.UNIT_W,t):n.y<=n.z?n.y<=n.w?t=ht.clone(ht.UNIT_Y,t):t=ht.clone(ht.UNIT_W,t):n.z<=n.w?t=ht.clone(ht.UNIT_Z,t):t=ht.clone(ht.UNIT_W,t),t};ht.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};ht.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]};ht.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.x,t.x,n,i)&&R.equalsEpsilon(e.y,t.y,n,i)&&R.equalsEpsilon(e.z,t.z,n,i)&&R.equalsEpsilon(e.w,t.w,n,i)};ht.ZERO=Object.freeze(new ht(0,0,0,0));ht.ONE=Object.freeze(new ht(1,1,1,1));ht.UNIT_X=Object.freeze(new ht(1,0,0,0));ht.UNIT_Y=Object.freeze(new ht(0,1,0,0));ht.UNIT_Z=Object.freeze(new ht(0,0,1,0));ht.UNIT_W=Object.freeze(new ht(0,0,0,1));ht.prototype.clone=function(e){return ht.clone(this,e)};ht.prototype.equals=function(e){return ht.equals(this,e)};ht.prototype.equalsEpsilon=function(e,t,n){return ht.equalsEpsilon(this,e,t,n)};ht.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var b8=new Float32Array(1),Ma=new Uint8Array(b8.buffer),wTe=new Uint32Array([287454020]),vTe=new Uint8Array(wTe.buffer),YX=vTe[0]===68;ht.packFloat=function(e,t){return l(t)||(t=new ht),b8[0]=e,YX?(t.x=Ma[0],t.y=Ma[1],t.z=Ma[2],t.w=Ma[3]):(t.x=Ma[3],t.y=Ma[2],t.z=Ma[1],t.w=Ma[0]),t};ht.unpackFloat=function(e){return YX?(Ma[0]=e.x,Ma[1]=e.y,Ma[2]=e.z,Ma[3]=e.w):(Ma[0]=e.w,Ma[1]=e.z,Ma[2]=e.y,Ma[3]=e.x),b8[0]};var se=ht;function rS(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(rS.prototype=Object.create(Error.prototype),rS.prototype.constructor=rS);rS.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
|
|
90
90
|
${this.stack.toString()}`),e};var fe=rS;function Ke(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){this[0]=y(e,0),this[1]=y(o,0),this[2]=y(c,0),this[3]=y(p,0),this[4]=y(t,0),this[5]=y(r,0),this[6]=y(u,0),this[7]=y(_,0),this[8]=y(n,0),this[9]=y(s,0),this[10]=y(f,0),this[11]=y(m,0),this[12]=y(i,0),this[13]=y(a,0),this[14]=y(d,0),this[15]=y(x,0)}Ke.packedLength=16;Ke.pack=function(e,t,n){return n=y(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t};Ke.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Ke),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n};Ke.packArray=function(e,t){let n=e.length,i=n*16;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)Ke.pack(e[o],t,o*16);return t};Ke.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/16:t=new Array(n/16);for(let i=0;i<n;i+=16){let o=i/16;t[o]=Ke.unpack(e,i,t[o])}return t};Ke.clone=function(e,t){if(!!l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new Ke(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};Ke.fromArray=Ke.unpack;Ke.fromColumnMajorArray=function(e,t){return Ke.clone(e,t)};Ke.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new Ke(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};Ke.fromRotationTranslation=function(e,t,n){return t=y(t,h.ZERO),l(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n):new Ke(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)};Ke.fromTranslationQuaternionRotationScale=function(e,t,n,i){l(i)||(i=new Ke);let o=n.x,r=n.y,s=n.z,a=t.x*t.x,c=t.x*t.y,u=t.x*t.z,f=t.x*t.w,d=t.y*t.y,p=t.y*t.z,_=t.y*t.w,m=t.z*t.z,x=t.z*t.w,C=t.w*t.w,A=a-d-m+C,T=2*(c-x),b=2*(u+_),S=2*(c+x),w=-a+d-m+C,D=2*(p-f),O=2*(u-_),I=2*(p+f),L=-a-d+m+C;return i[0]=A*o,i[1]=S*o,i[2]=O*o,i[3]=0,i[4]=T*r,i[5]=w*r,i[6]=I*r,i[7]=0,i[8]=b*s,i[9]=D*s,i[10]=L*s,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,i};Ke.fromTranslationRotationScale=function(e,t){return Ke.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)};Ke.fromTranslation=function(e,t){return Ke.fromRotationTranslation(Q.IDENTITY,e,t)};Ke.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Ke(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};Ke.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new Ke(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};Ke.fromRotation=function(e,t){return l(t)||(t=new Ke),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};var zC=new h,HC=new h,sS=new h;Ke.fromCamera=function(e,t){let n=e.position,i=e.direction,o=e.up;h.normalize(i,zC),h.normalize(h.cross(zC,o,HC),HC),h.normalize(h.cross(HC,zC,sS),sS);let r=HC.x,s=HC.y,a=HC.z,c=zC.x,u=zC.y,f=zC.z,d=sS.x,p=sS.y,_=sS.z,m=n.x,x=n.y,C=n.z,A=r*-m+s*-x+a*-C,T=d*-m+p*-x+_*-C,b=c*m+u*x+f*C;return l(t)?(t[0]=r,t[1]=d,t[2]=-c,t[3]=0,t[4]=s,t[5]=p,t[6]=-u,t[7]=0,t[8]=a,t[9]=_,t[10]=-f,t[11]=0,t[12]=A,t[13]=T,t[14]=b,t[15]=1,t):new Ke(r,s,a,A,d,p,_,T,-c,-u,-f,b,0,0,0,1)};Ke.computePerspectiveFieldOfView=function(e,t,n,i,o){let r=Math.tan(e*.5),s=1/r,a=s/t,c=(i+n)/(n-i),u=2*i*n/(n-i);return o[0]=a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=s,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=c,o[11]=-1,o[12]=0,o[13]=0,o[14]=u,o[15]=0,o};Ke.computeOrthographicOffCenter=function(e,t,n,i,o,r,s){let a=1/(t-e),c=1/(i-n),u=1/(r-o),f=-(t+e)*a,d=-(i+n)*c,p=-(r+o)*u;return a*=2,c*=2,u*=-2,s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=c,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=u,s[11]=0,s[12]=f,s[13]=d,s[14]=p,s[15]=1,s};Ke.computePerspectiveOffCenter=function(e,t,n,i,o,r,s){let a=2*o/(t-e),c=2*o/(i-n),u=(t+e)/(t-e),f=(i+n)/(i-n),d=-(r+o)/(r-o),p=-1,_=-2*r*o/(r-o);return s[0]=a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=c,s[6]=0,s[7]=0,s[8]=u,s[9]=f,s[10]=d,s[11]=p,s[12]=0,s[13]=0,s[14]=_,s[15]=0,s};Ke.computeInfinitePerspectiveOffCenter=function(e,t,n,i,o,r){let s=2*o/(t-e),a=2*o/(i-n),c=(t+e)/(t-e),u=(i+n)/(i-n),f=-1,d=-1,p=-2*o;return r[0]=s,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=c,r[9]=u,r[10]=f,r[11]=d,r[12]=0,r[13]=0,r[14]=p,r[15]=0,r};Ke.computeViewportTransformation=function(e,t,n,i){l(i)||(i=new Ke),e=y(e,y.EMPTY_OBJECT);let o=y(e.x,0),r=y(e.y,0),s=y(e.width,0),a=y(e.height,0);t=y(t,0),n=y(n,1);let c=s*.5,u=a*.5,f=(n-t)*.5,d=c,p=u,_=f,m=o+c,x=r+u,C=t+f,A=1;return i[0]=d,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=p,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=_,i[11]=0,i[12]=m,i[13]=x,i[14]=C,i[15]=A,i};Ke.computeView=function(e,t,n,i,o){return o[0]=i.x,o[1]=n.x,o[2]=-t.x,o[3]=0,o[4]=i.y,o[5]=n.y,o[6]=-t.y,o[7]=0,o[8]=i.z,o[9]=n.z,o[10]=-t.z,o[11]=0,o[12]=-h.dot(i,e),o[13]=-h.dot(n,e),o[14]=h.dot(t,e),o[15]=1,o};Ke.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};Ke.getElementIndex=function(e,t){return e*4+t};Ke.getColumn=function(e,t,n){let i=t*4,o=e[i],r=e[i+1],s=e[i+2],a=e[i+3];return n.x=o,n.y=r,n.z=s,n.w=a,n};Ke.setColumn=function(e,t,n,i){i=Ke.clone(e,i);let o=t*4;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i[o+3]=n.w,i};Ke.getRow=function(e,t,n){let i=e[t],o=e[t+4],r=e[t+8],s=e[t+12];return n.x=i,n.y=o,n.z=r,n.w=s,n};Ke.setRow=function(e,t,n,i){return i=Ke.clone(e,i),i[t]=n.x,i[t+4]=n.y,i[t+8]=n.z,i[t+12]=n.w,i};Ke.setTranslation=function(e,t,n){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var DTe=new h;Ke.setScale=function(e,t,n){let i=Ke.getScale(e,DTe),o=t.x/i.x,r=t.y/i.y,s=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var PTe=new h;Ke.setUniformScale=function(e,t,n){let i=Ke.getScale(e,PTe),o=t/i.x,r=t/i.y,s=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*s,n[9]=e[9]*s,n[10]=e[10]*s,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var E8=new h;Ke.getScale=function(e,t){return t.x=h.magnitude(h.fromElements(e[0],e[1],e[2],E8)),t.y=h.magnitude(h.fromElements(e[4],e[5],e[6],E8)),t.z=h.magnitude(h.fromElements(e[8],e[9],e[10],E8)),t};var XX=new h;Ke.getMaximumScale=function(e){return Ke.getScale(e,XX),h.maximumComponent(XX)};var ITe=new h;Ke.setRotation=function(e,t,n){let i=Ke.getScale(e,ITe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=e[3],n[4]=t[3]*i.y,n[5]=t[4]*i.y,n[6]=t[5]*i.y,n[7]=e[7],n[8]=t[6]*i.z,n[9]=t[7]*i.z,n[10]=t[8]*i.z,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var OTe=new h;Ke.getRotation=function(e,t){let n=Ke.getScale(e,OTe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[4]/n.y,t[4]=e[5]/n.y,t[5]=e[6]/n.y,t[6]=e[8]/n.z,t[7]=e[9]/n.z,t[8]=e[10]/n.z,t};Ke.multiply=function(e,t,n){let i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],c=e[5],u=e[6],f=e[7],d=e[8],p=e[9],_=e[10],m=e[11],x=e[12],C=e[13],A=e[14],T=e[15],b=t[0],S=t[1],w=t[2],D=t[3],O=t[4],I=t[5],L=t[6],N=t[7],g=t[8],E=t[9],v=t[10],P=t[11],M=t[12],V=t[13],U=t[14],k=t[15],H=i*b+a*S+d*w+x*D,F=o*b+c*S+p*w+C*D,Y=r*b+u*S+_*w+A*D,j=s*b+f*S+m*w+T*D,X=i*O+a*I+d*L+x*N,W=o*O+c*I+p*L+C*N,$=r*O+u*I+_*L+A*N,J=s*O+f*I+m*L+T*N,ce=i*g+a*E+d*v+x*P,he=o*g+c*E+p*v+C*P,ie=r*g+u*E+_*v+A*P,ae=s*g+f*E+m*v+T*P,ge=i*M+a*V+d*U+x*k,Se=o*M+c*V+p*U+C*k,be=r*M+u*V+_*U+A*k,Be=s*M+f*V+m*U+T*k;return n[0]=H,n[1]=F,n[2]=Y,n[3]=j,n[4]=X,n[5]=W,n[6]=$,n[7]=J,n[8]=ce,n[9]=he,n[10]=ie,n[11]=ae,n[12]=ge,n[13]=Se,n[14]=be,n[15]=Be,n};Ke.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n};Ke.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n};Ke.multiplyTransformation=function(e,t,n){let i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],c=e[6],u=e[8],f=e[9],d=e[10],p=e[12],_=e[13],m=e[14],x=t[0],C=t[1],A=t[2],T=t[4],b=t[5],S=t[6],w=t[8],D=t[9],O=t[10],I=t[12],L=t[13],N=t[14],g=i*x+s*C+u*A,E=o*x+a*C+f*A,v=r*x+c*C+d*A,P=i*T+s*b+u*S,M=o*T+a*b+f*S,V=r*T+c*b+d*S,U=i*w+s*D+u*O,k=o*w+a*D+f*O,H=r*w+c*D+d*O,F=i*I+s*L+u*N+p,Y=o*I+a*L+f*N+_,j=r*I+c*L+d*N+m;return n[0]=g,n[1]=E,n[2]=v,n[3]=0,n[4]=P,n[5]=M,n[6]=V,n[7]=0,n[8]=U,n[9]=k,n[10]=H,n[11]=0,n[12]=F,n[13]=Y,n[14]=j,n[15]=1,n};Ke.multiplyByMatrix3=function(e,t,n){let i=e[0],o=e[1],r=e[2],s=e[4],a=e[5],c=e[6],u=e[8],f=e[9],d=e[10],p=t[0],_=t[1],m=t[2],x=t[3],C=t[4],A=t[5],T=t[6],b=t[7],S=t[8],w=i*p+s*_+u*m,D=o*p+a*_+f*m,O=r*p+c*_+d*m,I=i*x+s*C+u*A,L=o*x+a*C+f*A,N=r*x+c*C+d*A,g=i*T+s*b+u*S,E=o*T+a*b+f*S,v=r*T+c*b+d*S;return n[0]=w,n[1]=D,n[2]=O,n[3]=0,n[4]=I,n[5]=L,n[6]=N,n[7]=0,n[8]=g,n[9]=E,n[10]=v,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};Ke.multiplyByTranslation=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=i*e[0]+o*e[4]+r*e[8]+e[12],a=i*e[1]+o*e[5]+r*e[9]+e[13],c=i*e[2]+o*e[6]+r*e[10]+e[14];return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=s,n[13]=a,n[14]=c,n[15]=e[15],n};Ke.multiplyByScale=function(e,t,n){let i=t.x,o=t.y,r=t.z;return i===1&&o===1&&r===1?Ke.clone(e,n):(n[0]=i*e[0],n[1]=i*e[1],n[2]=i*e[2],n[3]=e[3],n[4]=o*e[4],n[5]=o*e[5],n[6]=o*e[6],n[7]=e[7],n[8]=r*e[8],n[9]=r*e[9],n[10]=r*e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n)};Ke.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3],n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7],n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};Ke.multiplyByVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=t.w,a=e[0]*i+e[4]*o+e[8]*r+e[12]*s,c=e[1]*i+e[5]*o+e[9]*r+e[13]*s,u=e[2]*i+e[6]*o+e[10]*r+e[14]*s,f=e[3]*i+e[7]*o+e[11]*r+e[15]*s;return n.x=a,n.y=c,n.z=u,n.w=f,n};Ke.multiplyByPointAsVector=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[4]*o+e[8]*r,a=e[1]*i+e[5]*o+e[9]*r,c=e[2]*i+e[6]*o+e[10]*r;return n.x=s,n.y=a,n.z=c,n};Ke.multiplyByPoint=function(e,t,n){let i=t.x,o=t.y,r=t.z,s=e[0]*i+e[4]*o+e[8]*r+e[12],a=e[1]*i+e[5]*o+e[9]*r+e[13],c=e[2]*i+e[6]*o+e[10]*r+e[14];return n.x=s,n.y=a,n.z=c,n};Ke.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n};Ke.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t};Ke.transpose=function(e,t){let n=e[1],i=e[2],o=e[3],r=e[6],s=e[7],a=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=r,t[10]=e[10],t[11]=e[14],t[12]=o,t[13]=s,t[14]=a,t[15]=e[15],t};Ke.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t};Ke.equals=function(e,t){return e===t||l(e)&&l(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]};Ke.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n};Ke.getTranslation=function(e,t){return t.x=e[12],t.y=e[13],t.z=e[14],t};Ke.getMatrix3=function(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var RTe=new Q,MTe=new Q,BTe=new se,LTe=new se(0,0,0,1);Ke.inverse=function(e,t){let n=e[0],i=e[4],o=e[8],r=e[12],s=e[1],a=e[5],c=e[9],u=e[13],f=e[2],d=e[6],p=e[10],_=e[14],m=e[3],x=e[7],C=e[11],A=e[15],T=p*A,b=_*C,S=d*A,w=_*x,D=d*C,O=p*x,I=f*A,L=_*m,N=f*C,g=p*m,E=f*x,v=d*m,P=T*a+w*c+D*u-(b*a+S*c+O*u),M=b*s+I*c+g*u-(T*s+L*c+N*u),V=S*s+L*a+E*u-(w*s+I*a+v*u),U=O*s+N*a+v*c-(D*s+g*a+E*c),k=b*i+S*o+O*r-(T*i+w*o+D*r),H=T*n+L*o+N*r-(b*n+I*o+g*r),F=w*n+I*i+v*r-(S*n+L*i+E*r),Y=D*n+g*i+E*o-(O*n+N*i+v*o);T=o*u,b=r*c,S=i*u,w=r*a,D=i*c,O=o*a,I=n*u,L=r*s,N=n*c,g=o*s,E=n*a,v=i*s;let j=T*x+w*C+D*A-(b*x+S*C+O*A),X=b*m+I*C+g*A-(T*m+L*C+N*A),W=S*m+L*x+E*A-(w*m+I*x+v*A),$=O*m+N*x+v*C-(D*m+g*x+E*C),J=S*p+O*_+b*d-(D*_+T*d+w*p),ce=N*_+T*f+L*p-(I*p+g*_+b*f),he=I*d+v*_+w*f-(E*_+S*f+L*d),ie=E*p+D*f+g*d-(N*d+v*p+O*f),ae=n*P+i*M+o*V+r*U;if(Math.abs(ae)<R.EPSILON21){if(Q.equalsEpsilon(Ke.getMatrix3(e,RTe),MTe,R.EPSILON7)&&se.equals(Ke.getRow(e,3,BTe),LTe))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new fe("matrix is not invertible because its determinate is zero.")}return ae=1/ae,t[0]=P*ae,t[1]=M*ae,t[2]=V*ae,t[3]=U*ae,t[4]=k*ae,t[5]=H*ae,t[6]=F*ae,t[7]=Y*ae,t[8]=j*ae,t[9]=X*ae,t[10]=W*ae,t[11]=$*ae,t[12]=J*ae,t[13]=ce*ae,t[14]=he*ae,t[15]=ie*ae,t};Ke.inverseTransformation=function(e,t){let n=e[0],i=e[1],o=e[2],r=e[4],s=e[5],a=e[6],c=e[8],u=e[9],f=e[10],d=e[12],p=e[13],_=e[14],m=-n*d-i*p-o*_,x=-r*d-s*p-a*_,C=-c*d-u*p-f*_;return t[0]=n,t[1]=r,t[2]=c,t[3]=0,t[4]=i,t[5]=s,t[6]=u,t[7]=0,t[8]=o,t[9]=a,t[10]=f,t[11]=0,t[12]=m,t[13]=x,t[14]=C,t[15]=1,t};var NTe=new Ke;Ke.inverseTranspose=function(e,t){return Ke.inverse(Ke.transpose(e,NTe),t)};Ke.IDENTITY=Object.freeze(new Ke(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));Ke.ZERO=Object.freeze(new Ke(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));Ke.COLUMN0ROW0=0;Ke.COLUMN0ROW1=1;Ke.COLUMN0ROW2=2;Ke.COLUMN0ROW3=3;Ke.COLUMN1ROW0=4;Ke.COLUMN1ROW1=5;Ke.COLUMN1ROW2=6;Ke.COLUMN1ROW3=7;Ke.COLUMN2ROW0=8;Ke.COLUMN2ROW1=9;Ke.COLUMN2ROW2=10;Ke.COLUMN2ROW3=11;Ke.COLUMN3ROW0=12;Ke.COLUMN3ROW1=13;Ke.COLUMN3ROW2=14;Ke.COLUMN3ROW3=15;Object.defineProperties(Ke.prototype,{length:{get:function(){return Ke.packedLength}}});Ke.prototype.clone=function(e){return Ke.clone(this,e)};Ke.prototype.equals=function(e){return Ke.equals(this,e)};Ke.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]};Ke.prototype.equalsEpsilon=function(e,t){return Ke.equalsEpsilon(this,e,t)};Ke.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
|
|
91
91
|
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
|
|
92
92
|
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
|
|
93
|
-
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var B=Ke;function On(e,t,n,i){this.west=y(e,0),this.south=y(t,0),this.east=y(n,0),this.north=y(i,0)}Object.defineProperties(On.prototype,{width:{get:function(){return On.computeWidth(this)}},height:{get:function(){return On.computeHeight(this)}}});On.packedLength=4;On.pack=function(e,t,n){return n=y(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};On.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new On),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};On.computeWidth=function(e){let t=e.east,n=e.west;return t<n&&(t+=R.TWO_PI),t-n};On.computeHeight=function(e){return e.north-e.south};On.fromDegrees=function(e,t,n,i,o){return e=R.toRadians(y(e,0)),t=R.toRadians(y(t,0)),n=R.toRadians(y(n,0)),i=R.toRadians(y(i,0)),l(o)?(o.west=e,o.south=t,o.east=n,o.north=i,o):new On(e,t,n,i)};On.fromRadians=function(e,t,n,i,o){return l(o)?(o.west=y(e,0),o.south=y(t,0),o.east=y(n,0),o.north=y(i,0),o):new On(e,t,n,i)};On.fromCartographicArray=function(e,t){let n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE;for(let c=0,u=e.length;c<u;c++){let f=e[c];n=Math.min(n,f.longitude),i=Math.max(i,f.longitude),s=Math.min(s,f.latitude),a=Math.max(a,f.latitude);let d=f.longitude>=0?f.longitude:f.longitude+R.TWO_PI;o=Math.min(o,d),r=Math.max(r,d)}return i-n>r-o&&(n=o,i=r,i>R.PI&&(i=i-R.TWO_PI),n>R.PI&&(n=n-R.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new On(n,s,i,a)};On.fromCartesianArray=function(e,t,n){t=y(t,re.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,f=e.length;u<f;u++){let d=t.cartesianToCartographic(e[u]);i=Math.min(i,d.longitude),o=Math.max(o,d.longitude),a=Math.min(a,d.latitude),c=Math.max(c,d.latitude);let p=d.longitude>=0?d.longitude:d.longitude+R.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>R.PI&&(o=o-R.TWO_PI),i>R.PI&&(i=i-R.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new On(i,a,o,c)};On.clone=function(e,t){if(!!l(e))return l(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new On(e.west,e.south,e.east,e.north)};On.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n};On.prototype.clone=function(e){return On.clone(this,e)};On.prototype.equals=function(e){return On.equals(this,e)};On.equals=function(e,t){return e===t||l(e)&&l(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north};On.prototype.equalsEpsilon=function(e,t){return On.equalsEpsilon(this,e,t)};On.validate=function(e){};On.southwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new me(e.west,e.south)};On.northwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new me(e.west,e.north)};On.northeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new me(e.east,e.north)};On.southeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new me(e.east,e.south)};On.center=function(e,t){let n=e.east,i=e.west;n<i&&(n+=R.TWO_PI);let o=R.negativePiToPi((i+n)*.5),r=(e.south+e.north)*.5;return l(t)?(t.longitude=o,t.latitude=r,t.height=0,t):new me(o,r)};On.intersection=function(e,t,n){let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=R.TWO_PI:r<s&&i>0&&(r+=R.TWO_PI),i<o&&s<0?s+=R.TWO_PI:r<s&&o<0&&(o+=R.TWO_PI);let a=R.negativePiToPi(Math.max(o,s)),c=R.negativePiToPi(Math.min(i,r));if((e.west<e.east||t.west<t.east)&&c<=a)return;let u=Math.max(e.south,t.south),f=Math.min(e.north,t.north);if(!(u>=f))return l(n)?(n.west=a,n.south=u,n.east=c,n.north=f,n):new On(a,u,c,f)};On.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new On(i,o,r,s)};On.union=function(e,t,n){l(n)||(n=new On);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=R.TWO_PI:r<s&&i>0&&(r+=R.TWO_PI),i<o&&s<0?s+=R.TWO_PI:r<s&&o<0&&(o+=R.TWO_PI);let a=R.negativePiToPi(Math.min(o,s)),c=R.negativePiToPi(Math.max(i,r));return n.west=a,n.south=Math.min(e.south,t.south),n.east=c,n.north=Math.max(e.north,t.north),n};On.expand=function(e,t,n){return l(n)||(n=new On),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n};On.contains=function(e,t){let n=t.longitude,i=t.latitude,o=e.west,r=e.east;return r<o&&(r+=R.TWO_PI,n<0&&(n+=R.TWO_PI)),(n>o||R.equalsEpsilon(n,o,R.EPSILON14))&&(n<r||R.equalsEpsilon(n,r,R.EPSILON14))&&i>=e.south&&i<=e.north};var FTe=new me;On.subsample=function(e,t,n,i){t=y(t,re.WGS84),n=y(n,0),l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,u=FTe;u.height=n,u.longitude=c,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:s>0?u.latitude=s:u.latitude=0;for(let f=1;f<8;++f)u.longitude=-Math.PI+f*R.PI_OVER_TWO,On.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i};On.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new On),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=R.TWO_PI+e.east-e.west;r.west=R.negativePiToPi(e.west+t*a),r.east=R.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};On.MAX_VALUE=Object.freeze(new On(-Math.PI,-R.PI_OVER_TWO,Math.PI,R.PI_OVER_TWO));var de=On;function cn(e,t){this.center=h.clone(y(e,h.ZERO)),this.radius=y(t,0)}var v8=new h,D8=new h,P8=new h,I8=new h,O8=new h,R8=new h,M8=new h,Ns=new h,B8=new h,L8=new h,N8=new h,F8=new h,VTe=4/3*R.PI;cn.fromPoints=function(e,t){if(l(t)||(t=new cn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=h.clone(e[0],M8),i=h.clone(n,v8),o=h.clone(n,D8),r=h.clone(n,P8),s=h.clone(n,I8),a=h.clone(n,O8),c=h.clone(n,R8),u=e.length,f;for(f=1;f<u;f++){h.clone(e[f],n);let I=n.x,L=n.y,N=n.z;I<i.x&&h.clone(n,i),I>s.x&&h.clone(n,s),L<o.y&&h.clone(n,o),L>a.y&&h.clone(n,a),N<r.z&&h.clone(n,r),N>c.z&&h.clone(n,c)}let d=h.magnitudeSquared(h.subtract(s,i,Ns)),p=h.magnitudeSquared(h.subtract(a,o,Ns)),_=h.magnitudeSquared(h.subtract(c,r,Ns)),m=i,x=s,C=d;p>C&&(C=p,m=o,x=a),_>C&&(C=_,m=r,x=c);let A=B8;A.x=(m.x+x.x)*.5,A.y=(m.y+x.y)*.5,A.z=(m.z+x.z)*.5;let T=h.magnitudeSquared(h.subtract(x,A,Ns)),b=Math.sqrt(T),S=L8;S.x=i.x,S.y=o.y,S.z=r.z;let w=N8;w.x=s.x,w.y=a.y,w.z=c.z;let D=h.midpoint(S,w,F8),O=0;for(f=0;f<u;f++){h.clone(e[f],n);let I=h.magnitude(h.subtract(n,D,Ns));I>O&&(O=I);let L=h.magnitudeSquared(h.subtract(n,A,Ns));if(L>T){let N=Math.sqrt(L);b=(b+N)*.5,T=b*b;let g=N-b;A.x=(b*A.x+g*n.x)/N,A.y=(b*A.y+g*n.y)/N,A.z=(b*A.z+g*n.z)/N}}return b<O?(h.clone(A,t.center),t.radius=b):(h.clone(D,t.center),t.radius=O),t};var kTe=new Si,UTe=new h,zTe=new h,S8=new me,w8=new me;cn.fromRectangle2D=function(e,t,n){return cn.fromRectangleWithHeights2D(e,t,0,0,n)};cn.fromRectangleWithHeights2D=function(e,t,n,i,o){if(l(o)||(o=new cn),!l(e))return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;t=y(t,kTe),de.southwest(e,S8),S8.height=n,de.northeast(e,w8),w8.height=i;let r=t.project(S8,UTe),s=t.project(w8,zTe),a=s.x-r.x,c=s.y-r.y,u=s.z-r.z;o.radius=Math.sqrt(a*a+c*c+u*u)*.5;let f=o.center;return f.x=r.x+a*.5,f.y=r.y+c*.5,f.z=r.z+u*.5,o};var HTe=[];cn.fromRectangle3D=function(e,t,n,i){if(t=y(t,re.WGS84),n=y(n,0),l(i)||(i=new cn),!l(e))return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;let o=de.subsample(e,t,n,HTe);return cn.fromPoints(o,i)};cn.fromVertices=function(e,t,n,i){if(l(i)||(i=new cn),!l(e)||e.length===0)return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;t=y(t,h.ZERO),n=y(n,3);let o=M8;o.x=e[0]+t.x,o.y=e[1]+t.y,o.z=e[2]+t.z;let r=h.clone(o,v8),s=h.clone(o,D8),a=h.clone(o,P8),c=h.clone(o,I8),u=h.clone(o,O8),f=h.clone(o,R8),d=e.length,p;for(p=0;p<d;p+=n){let N=e[p]+t.x,g=e[p+1]+t.y,E=e[p+2]+t.z;o.x=N,o.y=g,o.z=E,N<r.x&&h.clone(o,r),N>c.x&&h.clone(o,c),g<s.y&&h.clone(o,s),g>u.y&&h.clone(o,u),E<a.z&&h.clone(o,a),E>f.z&&h.clone(o,f)}let _=h.magnitudeSquared(h.subtract(c,r,Ns)),m=h.magnitudeSquared(h.subtract(u,s,Ns)),x=h.magnitudeSquared(h.subtract(f,a,Ns)),C=r,A=c,T=_;m>T&&(T=m,C=s,A=u),x>T&&(T=x,C=a,A=f);let b=B8;b.x=(C.x+A.x)*.5,b.y=(C.y+A.y)*.5,b.z=(C.z+A.z)*.5;let S=h.magnitudeSquared(h.subtract(A,b,Ns)),w=Math.sqrt(S),D=L8;D.x=r.x,D.y=s.y,D.z=a.z;let O=N8;O.x=c.x,O.y=u.y,O.z=f.z;let I=h.midpoint(D,O,F8),L=0;for(p=0;p<d;p+=n){o.x=e[p]+t.x,o.y=e[p+1]+t.y,o.z=e[p+2]+t.z;let N=h.magnitude(h.subtract(o,I,Ns));N>L&&(L=N);let g=h.magnitudeSquared(h.subtract(o,b,Ns));if(g>S){let E=Math.sqrt(g);w=(w+E)*.5,S=w*w;let v=E-w;b.x=(w*b.x+v*o.x)/E,b.y=(w*b.y+v*o.y)/E,b.z=(w*b.z+v*o.z)/E}}return w<L?(h.clone(b,i.center),i.radius=w):(h.clone(I,i.center),i.radius=L),i};cn.fromEncodedCartesianVertices=function(e,t,n){if(l(n)||(n=new cn),!l(e)||!l(t)||e.length!==t.length||e.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=M8;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];let o=h.clone(i,v8),r=h.clone(i,D8),s=h.clone(i,P8),a=h.clone(i,I8),c=h.clone(i,O8),u=h.clone(i,R8),f=e.length,d;for(d=0;d<f;d+=3){let L=e[d]+t[d],N=e[d+1]+t[d+1],g=e[d+2]+t[d+2];i.x=L,i.y=N,i.z=g,L<o.x&&h.clone(i,o),L>a.x&&h.clone(i,a),N<r.y&&h.clone(i,r),N>c.y&&h.clone(i,c),g<s.z&&h.clone(i,s),g>u.z&&h.clone(i,u)}let p=h.magnitudeSquared(h.subtract(a,o,Ns)),_=h.magnitudeSquared(h.subtract(c,r,Ns)),m=h.magnitudeSquared(h.subtract(u,s,Ns)),x=o,C=a,A=p;_>A&&(A=_,x=r,C=c),m>A&&(A=m,x=s,C=u);let T=B8;T.x=(x.x+C.x)*.5,T.y=(x.y+C.y)*.5,T.z=(x.z+C.z)*.5;let b=h.magnitudeSquared(h.subtract(C,T,Ns)),S=Math.sqrt(b),w=L8;w.x=o.x,w.y=r.y,w.z=s.z;let D=N8;D.x=a.x,D.y=c.y,D.z=u.z;let O=h.midpoint(w,D,F8),I=0;for(d=0;d<f;d+=3){i.x=e[d]+t[d],i.y=e[d+1]+t[d+1],i.z=e[d+2]+t[d+2];let L=h.magnitude(h.subtract(i,O,Ns));L>I&&(I=L);let N=h.magnitudeSquared(h.subtract(i,T,Ns));if(N>b){let g=Math.sqrt(N);S=(S+g)*.5,b=S*S;let E=g-S;T.x=(S*T.x+E*i.x)/g,T.y=(S*T.y+E*i.y)/g,T.z=(S*T.z+E*i.z)/g}}return S<I?(h.clone(T,n.center),n.radius=S):(h.clone(O,n.center),n.radius=I),n};cn.fromCornerPoints=function(e,t,n){l(n)||(n=new cn);let i=h.midpoint(e,t,n.center);return n.radius=h.distance(i,t),n};cn.fromEllipsoid=function(e,t){return l(t)||(t=new cn),h.clone(h.ZERO,t.center),t.radius=e.maximumRadius,t};var GTe=new h;cn.fromBoundingSpheres=function(e,t){if(l(t)||(t=new cn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=e.length;if(n===1)return cn.clone(e[0],t);if(n===2)return cn.union(e[0],e[1],t);let i=[],o;for(o=0;o<n;o++)i.push(e[o].center);t=cn.fromPoints(i,t);let r=t.center,s=t.radius;for(o=0;o<n;o++){let a=e[o];s=Math.max(s,h.distance(r,a.center,GTe)+a.radius)}return t.radius=s,t};var WTe=new h,jTe=new h,qTe=new h;cn.fromOrientedBoundingBox=function(e,t){l(t)||(t=new cn);let n=e.halfAxes,i=Q.getColumn(n,0,WTe),o=Q.getColumn(n,1,jTe),r=Q.getColumn(n,2,qTe);return h.add(i,o,i),h.add(i,r,i),t.center=h.clone(e.center,t.center),t.radius=h.magnitude(i),t};var YTe=new h,XTe=new h;cn.fromTransformation=function(e,t){l(t)||(t=new cn);let n=B.getTranslation(e,YTe),i=B.getScale(e,XTe),o=.5*h.magnitude(i);return t.center=h.clone(n,t.center),t.radius=o,t};cn.clone=function(e,t){if(!!l(e))return l(t)?(t.center=h.clone(e.center,t.center),t.radius=e.radius,t):new cn(e.center,e.radius)};cn.packedLength=4;cn.pack=function(e,t,n){n=y(n,0);let i=e.center;return t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n]=e.radius,t};cn.unpack=function(e,t,n){t=y(t,0),l(n)||(n=new cn);let i=n.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],n.radius=e[t],n};var KTe=new h,$Te=new h;cn.union=function(e,t,n){l(n)||(n=new cn);let i=e.center,o=e.radius,r=t.center,s=t.radius,a=h.subtract(r,i,KTe),c=h.magnitude(a);if(o>=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let u=(o+c+s)*.5,f=h.multiplyByScalar(a,(-o+u)/c,$Te);return h.add(f,i,f),h.clone(f,n.center),n.radius=u,n};var ZTe=new h;cn.expand=function(e,t,n){n=cn.clone(e,n);let i=h.magnitude(h.subtract(t,n.center,ZTe));return i>n.radius&&(n.radius=i),n};cn.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=h.dot(o,n)+t.distance;return r<-i?Zt.OUTSIDE:r<i?Zt.INTERSECTING:Zt.INSIDE};cn.transform=function(e,t,n){return l(n)||(n=new cn),n.center=B.multiplyByPoint(t,e.center,n.center),n.radius=B.getMaximumScale(t)*e.radius,n};var JTe=new h;cn.distanceSquaredTo=function(e,t){let n=h.subtract(e.center,t,JTe),i=h.magnitude(n)-e.radius;return i<=0?0:i*i};cn.transformWithoutScale=function(e,t,n){return l(n)||(n=new cn),n.center=B.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};var QTe=new h;cn.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Jc);let o=h.subtract(e.center,t,QTe),r=h.dot(n,o);return i.start=r-e.radius,i.stop=r+e.radius,i};var KX=new h,ebe=new h,tbe=new h,nbe=new h,ibe=new h,obe=new me,$X=new Array(8);for(let e=0;e<8;++e)$X[e]=new h;var rbe=new Si;cn.projectTo2D=function(e,t,n){t=y(t,rbe);let i=t.ellipsoid,o=e.center,r=e.radius,s;h.equals(o,h.ZERO)?s=h.clone(h.UNIT_X,KX):s=i.geodeticSurfaceNormal(o,KX);let a=h.cross(h.UNIT_Z,s,ebe);h.normalize(a,a);let c=h.cross(s,a,tbe);h.normalize(c,c),h.multiplyByScalar(s,r,s),h.multiplyByScalar(c,r,c),h.multiplyByScalar(a,r,a);let u=h.negate(c,ibe),f=h.negate(a,nbe),d=$X,p=d[0];h.add(s,c,p),h.add(p,a,p),p=d[1],h.add(s,c,p),h.add(p,f,p),p=d[2],h.add(s,u,p),h.add(p,f,p),p=d[3],h.add(s,u,p),h.add(p,a,p),h.negate(s,s),p=d[4],h.add(s,c,p),h.add(p,a,p),p=d[5],h.add(s,c,p),h.add(p,f,p),p=d[6],h.add(s,u,p),h.add(p,f,p),p=d[7],h.add(s,u,p),h.add(p,a,p);let _=d.length;for(let A=0;A<_;++A){let T=d[A];h.add(o,T,T);let b=i.cartesianToCartographic(T,obe);t.project(b,T)}n=cn.fromPoints(d,n),o=n.center;let m=o.x,x=o.y,C=o.z;return o.x=C,o.y=m,o.z=x,n};cn.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)};cn.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&e.radius===t.radius};cn.prototype.intersectPlane=function(e){return cn.intersectPlane(this,e)};cn.prototype.distanceSquaredTo=function(e){return cn.distanceSquaredTo(this,e)};cn.prototype.computePlaneDistances=function(e,t,n){return cn.computePlaneDistances(this,e,t,n)};cn.prototype.isOccluded=function(e){return cn.isOccluded(this,e)};cn.prototype.equals=function(e){return cn.equals(this,e)};cn.prototype.clone=function(e){return cn.clone(this,e)};cn.prototype.volume=function(){let e=this.radius;return VTe*e*e*e};var oe=cn;var ei=Zc(iK(),1);function V8(e,t){let n;return typeof document<"u"&&(n=document),V8._implementation(e,t,n)}V8._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=y(n.baseURI,n.location.href)}let i=new ei.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var qf=V8;function oK(e,t){if(e===null||typeof e!="object")return e;t=y(t,!1);let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=oK(o,t)),n[i]=o}return n}var Qe=oK;function rK(e,t,n){n=y(n,!1);let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=rK(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var at=rK;function sbe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var Qr=sbe;function abe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new ei.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var bP=abe;function cbe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var jC=cbe;var sK={};function lbe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=sK[t];l(i)||(i={},sK[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d"),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var ch=lbe;var ube=/^blob:/i;function fbe(e){return ube.test(e)}var qC=fbe;var lh;function dbe(e){l(lh)||(lh=document.createElement("a")),lh.href=window.location.href;let t=lh.host,n=lh.protocol;return lh.href=e,lh.href=lh.href,n!==lh.protocol||t!==lh.host}var YC=dbe;var hbe=/^data:/i;function mbe(e){return hbe.test(e)}var __=mbe;function pbe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var XC=pbe;function _be(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var KC=_be;function gbe(e){let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){let r=n[i].split("="),s=decodeURIComponent(r[0]),a=r[1];l(a)?a=decodeURIComponent(a):a="";let c=t[s];typeof c=="string"?t[s]=[c,a]:Array.isArray(c)?c.push(a):t[s]=a}return t}var Mu=gbe;var ybe={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},ui=Object.freeze(ybe);var xbe={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},or=Object.freeze(xbe);function EP(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.throttleByServer,!1),n=y(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=y(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=y(e.type,or.OTHER),this.serverKey=void 0,this.state=ui.UNISSUED,this.deferred=void 0,this.cancelled=!1}EP.prototype.cancel=function(){this.cancelled=!0};EP.prototype.clone=function(e){return l(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new EP(this)};var rr=EP;function Cbe(e){let t={};if(!e)return t;let n=e.split(`\r
|
|
94
|
-
`);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var SP=Cbe;function aK(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=SP(this.responseHeaders))}aK.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Lm=aK;function aS(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(aS.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});aS.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);let n=this;return function(){n.removeEventListener(e,t)}};aS.prototype.removeEventListener=function(e,t){let n=this._listeners,i=this._scopes,o=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&i[r]===t){o=r;break}return o!==-1?(this._insideRaiseEvent?(this._toRemove.push(o),n[o]=void 0,i[o]=void 0):(n.splice(o,1),i.splice(o,1)),!0):!1};function Abe(e,t){return t-e}aS.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,t=this._listeners,n=this._scopes,i=t.length;for(e=0;e<i;e++){let r=t[e];l(r)&&t[e].apply(n[e],arguments)}let o=this._toRemove;if(i=o.length,i>0){for(o.sort(Abe),e=0;e<i;e++){let r=o[e];t.splice(r,1),n.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};var _e=aS;function ty(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(ty.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function k8(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}ty.prototype.reserve=function(e){e=y(e,this._length),this._array.length=e};ty.prototype.heapify=function(e){e=y(e,0);let t=this._length,n=this._comparator,i=this._array,o=-1,r=!0;for(;r;){let s=2*(e+1),a=s-1;a<t&&n(i[a],i[e])<0?o=a:o=e,s<t&&n(i[s],i[o])<0&&(o=s),o!==e?(k8(i,o,e),e=o):r=!1}};ty.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};ty.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(o<t.length?t[o]=e:t.push(e);o!==0;){let s=Math.floor((o-1)/2);if(n(t[o],t[s])<0)k8(t,o,s),o=s;else break}let r;return l(i)&&this._length>i&&(r=t[i],this._length=i),r};ty.prototype.pop=function(e){if(e=y(e,0),this._length===0)return;let t=this._array,n=t[e];return k8(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var wP=ty;function Tbe(e,t){return e.priority-t.priority}var Yi={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},$C=20,Ba=new wP({comparator:Tbe});Ba.maximumLength=$C;Ba.reserve($C);var uh=[],Nm={},bbe=typeof document<"u"?new ei.default(document.location.href):new ei.default,vP=new _e;function qo(){}qo.maximumRequests=50;qo.maximumRequestsPerServer=6;qo.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18};qo.throttleRequests=!0;qo.debugShowStatistics=!1;qo.requestCompletedEvent=vP;Object.defineProperties(qo,{statistics:{get:function(){return Yi}},priorityHeapLength:{get:function(){return $C},set:function(e){if(e<$C)for(;Ba.length>e;){let t=Ba.pop();ny(t)}$C=e,Ba.maximumLength=e,Ba.reserve(e)}}});function cK(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}qo.serverHasOpenSlots=function(e,t){t=y(t,1);let n=y(qo.requestsByServer[e],qo.maximumRequestsPerServer);return Nm[e]+t<=n};qo.heapHasOpenSlots=function(e){return Ba.length+e<=$C};function lK(e){return e.state===ui.UNISSUED&&(e.state=ui.ISSUED,e.deferred=Qr()),e.deferred.promise}function Ebe(e){return function(t){if(e.state===ui.CANCELLED)return;let n=e.deferred;--Yi.numberOfActiveRequests,--Nm[e.serverKey],vP.raiseEvent(),e.state=ui.RECEIVED,e.deferred=void 0,n.resolve(t)}}function Sbe(e){return function(t){e.state!==ui.CANCELLED&&(++Yi.numberOfFailedRequests,--Yi.numberOfActiveRequests,--Nm[e.serverKey],vP.raiseEvent(t),e.state=ui.FAILED,e.deferred.reject(t))}}function uK(e){let t=lK(e);return e.state=ui.ACTIVE,uh.push(e),++Yi.numberOfActiveRequests,++Yi.numberOfActiveRequestsEver,++Nm[e.serverKey],e.requestFunction().then(Ebe(e)).catch(Sbe(e)),t}function ny(e){let t=e.state===ui.ACTIVE;if(e.state=ui.CANCELLED,++Yi.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Yi.numberOfActiveRequests,--Nm[e.serverKey],++Yi.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}qo.update=function(){let e,t,n=0,i=uh.length;for(e=0;e<i;++e){if(t=uh[e],t.cancelled&&ny(t),t.state!==ui.ACTIVE){++n;continue}n>0&&(uh[e-n]=t)}uh.length-=n;let o=Ba.internalArray,r=Ba.length;for(e=0;e<r;++e)cK(o[e]);Ba.resort();let s=Math.max(qo.maximumRequests-uh.length,0),a=0;for(;a<s&&Ba.length>0;){if(t=Ba.pop(),t.cancelled){ny(t);continue}if(t.throttleByServer&&!qo.serverHasOpenSlots(t.serverKey)){ny(t);continue}uK(t),++a}wbe()};qo.getServerKey=function(e){let t=new ei.default(e);t.scheme()===""&&(t=new ei.default(e).absoluteTo(bbe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=Nm[n];return l(i)||(Nm[n]=0),n};qo.request=function(e){if(__(e.url)||qC(e.url))return vP.raiseEvent(),e.state=ui.RECEIVED,e.requestFunction();if(++Yi.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=qo.getServerKey(e.url)),qo.throttleRequests&&e.throttleByServer&&!qo.serverHasOpenSlots(e.serverKey))return;if(!qo.throttleRequests||!e.throttle)return uK(e);if(uh.length>=qo.maximumRequests)return;cK(e);let t=Ba.insert(e);if(l(t)){if(t===e)return;ny(t)}return lK(e)};function wbe(){!qo.debugShowStatistics||(Yi.numberOfActiveRequests===0&&Yi.lastNumberOfActiveRequests>0&&(Yi.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Yi.numberOfAttemptedRequests}`),Yi.numberOfAttemptedRequests=0),Yi.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Yi.numberOfCancelledRequests}`),Yi.numberOfCancelledRequests=0),Yi.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Yi.numberOfCancelledActiveRequests}`),Yi.numberOfCancelledActiveRequests=0),Yi.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Yi.numberOfFailedRequests}`),Yi.numberOfFailedRequests=0)),Yi.lastNumberOfActiveRequests=Yi.numberOfActiveRequests)}qo.clearForSpecs=function(){for(;Ba.length>0;){let t=Ba.pop();ny(t)}let e=uh.length;for(let t=0;t<e;++t)ny(uh[t]);uh.length=0,Nm={},Yi.numberOfAttemptedRequests=0,Yi.numberOfActiveRequests=0,Yi.numberOfCancelledRequests=0,Yi.numberOfCancelledActiveRequests=0,Yi.numberOfFailedRequests=0,Yi.numberOfActiveRequestsEver=0,Yi.lastNumberOfActiveRequests=0};qo.numberOfActiveRequestsByServer=function(e){return Nm[e]};qo.requestHeap=Ba;var fc=qo;var cS={},ZC={};cS.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(ZC[n])||(ZC[n]=!0)};cS.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(ZC[n])&&delete ZC[n]};function vbe(e){let t=new ei.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}cS.contains=function(e){let t=vbe(e);return!!(l(t)&&l(ZC[t]))};cS.clear=function(){ZC={}};var lS=cS;var hK=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function z8(e,t,n,i){let o=e.query();if(o.length===0)return{};let r;if(o.indexOf("=")===-1){let s={};s[o]=void 0,r=s}else r=Mu(o);n?t._queryParameters=PP(r,t._queryParameters,i):t._queryParameters=r,e.search("")}function Dbe(e,t){let n=t._queryParameters,i=Object.keys(n);i.length===1&&!l(n[i[0]])?e.search(i[0]):e.search(KC(n))}function fh(e,t){return l(e)?l(e.clone)?e.clone():Qe(e):t}function H8(e){if(e.state===ui.ISSUED||e.state===ui.ACTIVE)throw new fe("The Resource is already being fetched.");e.state=ui.UNISSUED,e.deferred=void 0}function PP(e,t,n){if(!n)return at(e,t);let i=Qe(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}function Ct(e){e=y(e,y.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=fh(e.templateValues,{}),this._queryParameters=fh(e.queryParameters,{}),this.headers=fh(e.headers,{}),this.request=y(e.request,new rr),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=y(e.retryAttempts,0),this._retryCount=0;let t=new ei.default(e.url);z8(t,this,!0,!0),t.fragment(""),this._url=t.toString()}Ct.createIfNeeded=function(e){return e instanceof Ct?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Ct({url:e})};var JC;Ct.supportsImageBitmapOptions=function(){if(l(JC))return JC;if(typeof createImageBitmap!="function")return JC=Promise.resolve(!1),JC;let e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC";return JC=Ct.fetchBlob({url:e}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=ch(t[0]),i=ch(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),JC};Object.defineProperties(Ct,{isBlobSupported:{get:function(){return hK}}});Object.defineProperties(Ct.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){let t=new ei.default(e);z8(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){return jC(this._url)}},isDataUri:{get:function(){return __(this._url)}},isBlobUri:{get:function(){return qC(this._url)}},isCrossOriginUrl:{get:function(){return YC(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}});Ct.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Ct.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=new ei.default(this._url);e&&Dbe(n,this);let i=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),o=this._templateValues;return i=i.replace(/{(.*?)}/g,function(r,s){let a=o[s];return l(a)?encodeURIComponent(a):r}),t&&l(this.proxy)&&(i=this.proxy.getURL(i)),i};Ct.prototype.setQueryParameters=function(e,t){t?this._queryParameters=PP(this._queryParameters,e,!1):this._queryParameters=PP(e,this._queryParameters,!1)};Ct.prototype.appendQueryParameters=function(e){this._queryParameters=PP(e,this._queryParameters,!0)};Ct.prototype.setTemplateValues=function(e,t){t?this._templateValues=at(this._templateValues,e):this._templateValues=at(e,this._templateValues)};Ct.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=new ei.default(e.url),i=y(e.preserveQueryParameters,!1);z8(n,t,!0,i),n.fragment(""),n.scheme()!==""?t._url=n.toString():t._url=n.absoluteTo(new ei.default(qf(this._url))).toString()}return l(e.queryParameters)&&(t._queryParameters=at(e.queryParameters,t._queryParameters)),l(e.templateValues)&&(t._templateValues=at(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=at(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Ct.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Ct.prototype.clone=function(e){return l(e)||(e=new Ct({url:this._url})),e._url=this._url,e._queryParameters=Qe(this._queryParameters),e._templateValues=Qe(this._templateValues),e.headers=Qe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e};Ct.prototype.getBaseUri=function(e){return bP(this.getUrlComponent(e),e)};Ct.prototype.appendForwardSlash=function(){this._url=hP(this._url)};Ct.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Ct.fetchArrayBuffer=function(e){return new Ct(e).fetchArrayBuffer()};Ct.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Ct.fetchBlob=function(e){return new Ct(e).fetchBlob()};Ct.prototype.fetchImage=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.preferImageBitmap,!1),n=y(e.preferBlob,!1),i=y(e.flipY,!1),o=y(e.skipColorSpaceConversion,!1);if(H8(this.request),!hK||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return U8({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,u;return Ct.supportsImageBitmapOptions().then(function(f){return s=f,a=s&&t,r}).then(function(f){if(!l(f))return;if(u=f,a)return Ct.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let d=window.URL.createObjectURL(f);return c=new Ct({url:d}),U8({resource:c,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(f){if(!!l(f))return f.blob=u,a||window.URL.revokeObjectURL(c.url),f}).catch(function(f){return l(c)&&window.URL.revokeObjectURL(c.url),f.blob=u,Promise.reject(f)})};function U8(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=Qr();return Ct._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=fc.request(r);if(!!l(s))return s.catch(function(a){return r.state!==ui.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=ui.UNISSUED,r.deferred=void 0,U8({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Ct.fetchImage=function(e){return new Ct(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Ct.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Ct.fetchText=function(e){return new Ct(e).fetchText()};Ct.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(!!l(e))return e.then(function(t){if(!!l(t))return JSON.parse(t)})};Ct.fetchJson=function(e){return new Ct(e).fetchJson()};Ct.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Ct.fetchXML=function(e){return new Ct(e).fetchXML()};Ct.prototype.fetchJsonp=function(e){e=y(e,"callback"),H8(this.request);let t;do t=`loadJsonp${R.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return mK(this,e,t)};function mK(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request;o.url=e.url,o.requestFunction=function(){let s=Qr();return window[n]=function(a){s.resolve(a);try{delete window[n]}catch{window[n]=void 0}},Ct._Implementations.loadAndExecuteScript(e.url,n,s),s.promise};let r=fc.request(o);if(!!l(r))return r.catch(function(s){return o.state!==ui.FAILED?Promise.reject(s):e.retryOnError(s).then(function(a){return a?(o.state=ui.UNISSUED,o.deferred=void 0,mK(e,t,n)):Promise.reject(s)})})}Ct.fetchJsonp=function(e){return new Ct(e).fetchJsonp(e.callbackParameterName)};Ct.prototype._makeRequest=function(e){let t=this;H8(t.request);let n=t.request;n.url=t.url,n.requestFunction=function(){let o=e.responseType,r=at(e.headers,t.headers),s=e.overrideMimeType,a=e.method,c=e.data,u=Qr(),f=Ct._Implementations.loadWithXhr(t.url,o,a,c,r,u,s);return l(f)&&l(f.abort)&&(n.cancelFunction=function(){f.abort()}),u.promise};let i=fc.request(n);if(!!l(i))return i.then(function(o){return n.cancelFunction=void 0,o}).catch(function(o){return n.cancelFunction=void 0,n.state!==ui.FAILED?Promise.reject(o):t.retryOnError(o).then(function(r){return r?(n.state=ui.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(o)})})};var Pbe=/^data:(.*?)(;base64)?,(.*)$/;function DP(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function fK(e,t){let n=DP(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}function Ibe(e,t){t=y(t,"");let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return DP(i,o);case"arraybuffer":return fK(i,o);case"blob":return r=fK(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(DP(i,o),n);case"json":return JSON.parse(DP(i,o));default:}}Ct.prototype.fetch=function(e){return e=fh(e,{}),e.method="GET",this._makeRequest(e)};Ct.fetch=function(e){return new Ct(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.delete=function(e){return e=fh(e,{}),e.method="DELETE",this._makeRequest(e)};Ct.delete=function(e){return new Ct(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Ct.prototype.head=function(e){return e=fh(e,{}),e.method="HEAD",this._makeRequest(e)};Ct.head=function(e){return new Ct(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.options=function(e){return e=fh(e,{}),e.method="OPTIONS",this._makeRequest(e)};Ct.options=function(e){return new Ct(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.post=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Ct.post=function(e){return new Ct(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.put=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Ct.put=function(e){return new Ct(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.patch=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Ct.patch=function(e){return new Ct(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct._Implementations={};Ct._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(lS.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Ct._Implementations.createImage=function(e,t,n,i,o,r){let s=e.url;Ct.supportsImageBitmapOptions().then(function(a){if(!(a&&r)){Ct._Implementations.loadImageElement(s,t,n);return}let c="blob",u="GET",f=Qr(),d=Ct._Implementations.loadWithXhr(s,c,u,void 0,void 0,f,void 0,void 0,void 0);return l(d)&&l(d.abort)&&(e.cancelFunction=function(){d.abort()}),f.promise.then(function(p){if(!l(p)){n.reject(new fe(`Successfully retrieved ${s} but it contained no content.`));return}return Ct.createImageBitmapFromBlob(p,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(p){n.resolve(p)})}).catch(function(a){n.reject(a)})};Ct.createImageBitmapFromBlob=function(e,t){return Nl.defined("options",t),Nl.typeOf.bool("options.flipY",t.flipY),Nl.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),Nl.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function dK(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function Obe(e,t,n,i,o,r,s){let a=p_("url").parse(e),c=a.protocol==="https:"?p_("https"):p_("http"),u=p_("zlib"),f={protocol:a.protocol,hostname:a.hostname,port:a.port,path:a.path,query:a.query,method:n,headers:o};c.request(f).on("response",function(d){if(d.statusCode<200||d.statusCode>=300){r.reject(new Lm(d.statusCode,d,d.headers));return}let p=[];d.on("data",function(_){p.push(_)}),d.on("end",function(){let _=Buffer.concat(p);d.headers["content-encoding"]==="gzip"?u.gunzip(_,function(m,x){m?r.reject(new fe("Error decompressing response.")):r.resolve(dK(x,t))}):r.resolve(dK(_,t))})}).on("error",function(d){r.reject(new Lm)}).end()}var Rbe=typeof XMLHttpRequest>"u";Ct._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=Pbe.exec(e);if(a!==null){r.resolve(Ibe(a,t));return}if(Rbe){Obe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(lS.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let f in o)o.hasOwnProperty(f)&&c.setRequestHeader(f,o[f]);l(t)&&(c.responseType=t);let u=!1;return typeof e=="string"&&(u=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(u&&c.status===0)){r.reject(new Lm(c.status,c.response,c.getAllResponseHeaders()));return}let f=c.response,d=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let _=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};_.forEach(function(x){let C=x.split(": "),A=C.shift();m[A]=C.join(": ")}),r.resolve(m);return}if(c.status===204)r.resolve();else if(l(f)&&(!l(t)||d===t))r.resolve(f);else if(t==="json"&&typeof f=="string")try{r.resolve(JSON.parse(f))}catch(p){r.reject(p)}else(d===""||d==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(d===""||d==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new fe("Invalid XMLHttpRequest response type."))},c.onerror=function(f){r.reject(new Lm)},c.send(i),c};Ct._Implementations.loadAndExecuteScript=function(e,t,n){return XC(e,t).catch(function(i){n.reject(i)})};Ct._DefaultImplementations={};Ct._DefaultImplementations.createImage=Ct._Implementations.createImage;Ct._DefaultImplementations.loadWithXhr=Ct._Implementations.loadWithXhr;Ct._DefaultImplementations.loadAndExecuteScript=Ct._Implementations.loadAndExecuteScript;Ct.DEFAULT=Object.freeze(new Ct({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var De=Ct;var pK=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function Mbe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=pK.exec(i);if(o!==null)return o[1]}}var QC;function _K(e){return typeof document>"u"?e:(l(QC)||(QC=document.createElement("a")),QC.href=e,QC.href=QC.href,QC.href)}var iy;function gK(){if(l(iy))return iy;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(p_.toUrl)?e=qf("..",oy("Core/buildModuleUrl.js")):e=Mbe(),iy=new De({url:_K(e)}),iy.appendForwardSlash(),iy}function Bbe(e){return _K(p_.toUrl(`../${e}`))}function yK(e){return gK().getDerivedResource({url:e}).url}var IP;function oy(e){return l(IP)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(p_.toUrl)?IP=Bbe:IP=yK),IP(e)}oy._cesiumScriptRegex=pK;oy._buildModuleUrlFromBaseUrl=yK;oy._clearBaseResource=function(){iy=void 0};oy.setBaseUrl=function(e){iy=De.DEFAULT.getDerivedResource({url:e})};oy.getCesiumBaseUrl=gK;var Jt=oy;function bt(e,t){this.x=y(e,0),this.y=y(t,0)}bt.fromElements=function(e,t,n){return l(n)?(n.x=e,n.y=t,n):new bt(e,t)};bt.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t):new bt(e.x,e.y)};bt.fromCartesian3=bt.clone;bt.fromCartesian4=bt.clone;bt.packedLength=2;bt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n]=e.y,t};bt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new bt),n.x=e[t++],n.y=e[t],n};bt.packArray=function(e,t){let n=e.length,i=n*2;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)bt.pack(e[o],t,o*2);return t};bt.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/2:t=new Array(n/2);for(let i=0;i<n;i+=2){let o=i/2;t[o]=bt.unpack(e,i,t[o])}return t};bt.fromArray=bt.unpack;bt.maximumComponent=function(e){return Math.max(e.x,e.y)};bt.minimumComponent=function(e){return Math.min(e.x,e.y)};bt.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n};bt.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n};bt.clamp=function(e,t,n,i){let o=R.clamp(e.x,t.x,n.x),r=R.clamp(e.y,t.y,n.y);return i.x=o,i.y=r,i};bt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y};bt.magnitude=function(e){return Math.sqrt(bt.magnitudeSquared(e))};var OP=new bt;bt.distance=function(e,t){return bt.subtract(e,t,OP),bt.magnitude(OP)};bt.distanceSquared=function(e,t){return bt.subtract(e,t,OP),bt.magnitudeSquared(OP)};bt.normalize=function(e,t){let n=bt.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t};bt.dot=function(e,t){return e.x*t.x+e.y*t.y};bt.cross=function(e,t){return e.x*t.y-e.y*t.x};bt.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n};bt.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n};bt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n};bt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n};bt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n};bt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n};bt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t};bt.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var xK=new bt;bt.lerp=function(e,t,n,i){return bt.multiplyByScalar(t,n,xK),i=bt.multiplyByScalar(e,1-n,i),bt.add(xK,i,i)};var CK=new bt,AK=new bt;bt.angleBetween=function(e,t){return bt.normalize(e,CK),bt.normalize(t,AK),R.acosClamped(bt.dot(CK,AK))};var Lbe=new bt;bt.mostOrthogonalAxis=function(e,t){let n=bt.normalize(e,Lbe);return bt.abs(n,n),n.x<=n.y?t=bt.clone(bt.UNIT_X,t):t=bt.clone(bt.UNIT_Y,t),t};bt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y};bt.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]};bt.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.x,t.x,n,i)&&R.equalsEpsilon(e.y,t.y,n,i)};bt.ZERO=Object.freeze(new bt(0,0));bt.ONE=Object.freeze(new bt(1,1));bt.UNIT_X=Object.freeze(new bt(1,0));bt.UNIT_Y=Object.freeze(new bt(0,1));bt.prototype.clone=function(e){return bt.clone(this,e)};bt.prototype.equals=function(e){return bt.equals(this,e)};bt.prototype.equalsEpsilon=function(e,t,n){return bt.equalsEpsilon(this,e,t,n)};bt.prototype.toString=function(){return`(${this.x}, ${this.y})`};var G=bt;function g_(e){e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._rectangle=y(e.rectangle,de.MAX_VALUE),this._projection=new Si(this._ellipsoid),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(g_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});g_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};g_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};g_.prototype.rectangleToNativeRectangle=function(e,t){let n=R.toDegrees(e.west),i=R.toDegrees(e.south),o=R.toDegrees(e.east),r=R.toDegrees(e.north);return l(t)?(t.west=n,t.south=i,t.east=o,t.north=r,t):new de(n,i,o,r)};g_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.tileXYToRectangle(e,t,n,i);return o.west=R.toDegrees(o.west),o.south=R.toDegrees(o.south),o.east=R.toDegrees(o.east),o.north=R.toDegrees(o.north),o};g_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this._rectangle,r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,c=e*a+o.west,u=(e+1)*a+o.west,f=o.height/s,d=o.north-t*f,p=o.north-(t+1)*f;return l(i)||(i=new de(c,p,u,d)),i.west=c,i.south=p,i.east=u,i.north=d,i};g_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),s=i.width/o,a=i.height/r,c=e.longitude;i.east<i.west&&(c+=R.TWO_PI);let u=(c-i.west)/s|0;u>=o&&(u=o-1);let f=(i.north-e.latitude)/a|0;return f>=r&&(f=r-1),l(n)?(n.x=u,n.y=f,n):new G(u,f)};var Xi=g_;var TK=new h,bK=new h,EK=new me,G8=new h,Nbe=new h,SK=new oe,Fbe=new Xi,uS=[new me,new me,new me,new me],fS=new G,Ur={};Ur.initialize=function(){let e=Ur._initPromise;return l(e)||(e=De.fetchJson(Jt("Assets/approximateTerrainHeights.json")).then(function(t){Ur._terrainHeights=t}),Ur._initPromise=e),e};Ur.getMinimumMaximumHeights=function(e,t){t=y(t,re.WGS84);let n=wK(e),i=Ur._defaultMinTerrainHeight,o=Ur._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Ur._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(de.northeast(e,EK),TK),t.cartographicToCartesian(de.southwest(e,EK),bK),h.midpoint(bK,TK,G8);let a=t.scaleToGeodeticSurface(G8,Nbe);if(l(a)){let c=h.distance(G8,a);i=Math.min(i,-c)}else i=Ur._defaultMinTerrainHeight}return i=Math.max(Ur._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Ur.getBoundingSphere=function(e,t){t=y(t,re.WGS84);let n=wK(e),i=Ur._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Ur._terrainHeights[r];l(s)&&(i=s[1])}let o=oe.fromRectangle3D(e,t,0);return oe.fromRectangle3D(e,t,i,SK),oe.union(o,SK,o)};function wK(e){me.fromRadians(e.east,e.north,0,uS[0]),me.fromRadians(e.west,e.north,0,uS[1]),me.fromRadians(e.east,e.south,0,uS[2]),me.fromRadians(e.west,e.south,0,uS[3]);let t=0,n=0,i=0,o=0,r=Ur._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let u=uS[c];if(Fbe.positionToTileXY(u,s,fS),c===0)i=fS.x,o=fS.y;else if(i!==fS.x||o!==fS.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}Ur._terrainHeightsMaxLevel=6;Ur._defaultMaxTerrainHeight=9e3;Ur._defaultMinTerrainHeight=-1e5;Ur._terrainHeights=void 0;Ur._initPromise=void 0;Object.defineProperties(Ur,{initialized:{get:function(){return l(Ur._terrainHeights)}}});var ai=Ur;var dS=Zc(vK(),1);var Vbe=0,q8={};function Fm(e,t){let n,i=e;l(q8[i])?n=q8[i]:(n=Vbe++,q8[i]=n),t=y(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Fm.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=dS.default.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i<n.length;i++)n[i].setAttribute("target","_blank");this._element=t}return this._element}}});Fm.equals=function(e,t){return e===t||l(e)&&l(t)&&e._id===t._id&&e._showOnScreen===t._showOnScreen};Fm.prototype.equals=function(e){return Fm.equals(this,e)};Fm.getIonCredit=function(e){let t=l(e.collapsible)&&!e.collapsible,n=new Fm(e.html,t);return n._isIon=n.html.indexOf("ion-credit.png")!==-1,n};Fm.clone=function(e){if(l(e))return new Fm(e.html,e.showOnScreen)};var Ht=Fm;var kbe={NONE:0,LERC:1},Vm=Object.freeze(kbe);function dc(e,t,n){this.minimum=h.clone(y(e,h.ZERO)),this.maximum=h.clone(y(t,h.ZERO)),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}dc.fromCorners=function(e,t,n){return l(n)||(n=new dc),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};dc.fromPoints=function(e,t){if(l(t)||(t=new dc),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let d=1;d<c;d++){let p=e[d],_=p.x,m=p.y,x=p.z;n=Math.min(_,n),r=Math.max(_,r),i=Math.min(m,i),s=Math.max(m,s),o=Math.min(x,o),a=Math.max(x,a)}let u=t.minimum;u.x=n,u.y=i,u.z=o;let f=t.maximum;return f.x=r,f.y=s,f.z=a,t.center=h.midpoint(u,f,t.center),t};dc.clone=function(e,t){if(!!l(e))return l(t)?(t.minimum=h.clone(e.minimum,t.minimum),t.maximum=h.clone(e.maximum,t.maximum),t.center=h.clone(e.center,t.center),t):new dc(e.minimum,e.maximum,e.center)};dc.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&h.equals(e.minimum,t.minimum)&&h.equals(e.maximum,t.maximum)};var RP=new h;dc.intersectPlane=function(e,t){RP=h.subtract(e.maximum,e.minimum,RP);let n=h.multiplyByScalar(RP,.5,RP),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=h.dot(e.center,i)+t.distance;return r-o>0?Zt.INSIDE:r+o<0?Zt.OUTSIDE:Zt.INTERSECTING};dc.prototype.clone=function(e){return dc.clone(this,e)};dc.prototype.intersectPlane=function(e){return dc.intersectPlane(this,e)};dc.prototype.equals=function(e){return dc.equals(this,e)};var ry=dc;function dh(e,t){this._ellipsoid=e,this._cameraPosition=new h,this._cameraPositionInScaledSpace=new h,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(dh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=h.magnitudeSquared(n)-1;h.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var DK=new h;dh.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,DK);return X8(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};dh.prototype.isScaledSpacePointVisible=function(e){return X8(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var Ube=new h;dh.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=Ube,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),X8(e,o,i)};dh.prototype.computeHorizonCullingPoint=function(e,t,n){return OK(this._ellipsoid,e,t,n)};var PK=re.clone(re.UNIT_SPHERE);dh.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=IK(this._ellipsoid,n,PK);return OK(o,e,t,i)};dh.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return RK(this._ellipsoid,e,t,n,i,o)};dh.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=IK(this._ellipsoid,o,PK);return RK(s,e,t,n,i,r)};var zbe=[];dh.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=de.subsample(e,t,0,zbe),o=oe.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var Hbe=new h;function IK(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Hbe);e=re.fromCartesian3(i,n)}return e}function OK(e,t,n,i){l(i)||(i=new h);let o=LK(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],u=MK(e,c,o);if(u<0)return;r=Math.max(r,u)}return BK(o,r,i)}var MP=new h;function RK(e,t,n,i,o,r){l(r)||(r=new h),i=y(i,3),o=y(o,h.ZERO);let s=LK(e,t),a=0;for(let c=0,u=n.length;c<u;c+=i){MP.x=n[c]+o.x,MP.y=n[c+1]+o.y,MP.z=n[c+2]+o.z;let f=MK(e,MP,s);if(f<0)return;a=Math.max(a,f)}return BK(s,a,r)}function X8(e,t,n){let i=t,o=n,r=h.subtract(e,i,DK),s=-h.dot(r,i);return!(o<0?s>0:s>o&&s*s/h.magnitudeSquared(r)>o)}var Gbe=new h,Wbe=new h;function MK(e,t,n){let i=e.transformPositionToScaledSpace(t,Gbe),o=h.magnitudeSquared(i),r=Math.sqrt(o),s=h.divideByScalar(i,r,Wbe);o=Math.max(1,o),r=Math.max(1,r);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),u=1/r,f=Math.sqrt(o-1)*u;return 1/(a*u-c*f)}function BK(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var Y8=new h;function LK(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,Y8),h.normalize(Y8,Y8))}var y_=dh;var K8={};K8.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function NK(e,t,n){let i=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}K8.computeRealRoots=function(e,t,n){let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let c=Math.abs(n),u=Math.abs(e);if(c<u&&c/u<R.EPSILON14)return[0,0];if(c>u&&u/c<R.EPSILON14)return[];if(i=-n/e,i<0)return[];let f=Math.sqrt(i);return[-f,f]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let o=t*t,r=4*e*n,s=NK(o,-r,R.EPSILON14);if(s<0)return[];let a=-.5*NK(t,R.sign(t)*Math.sqrt(s),R.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Qc=K8;var Z8={};Z8.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function $8(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,u=r*a,f=r*r,d=s*s,p=o*s-f,_=o*a-r*s,m=r*a-d,x=4*p*m-_*_,C,A;if(x<0){let Y,j,X;f*u>=c*d?(Y=o,j=p,X=-2*r*p+o*_):(Y=a,j=m,X=-a*_+2*s*m);let $=-(X<0?-1:1)*Math.abs(Y)*Math.sqrt(-x);A=-X+$;let J=A/2,ce=J<0?-Math.pow(-J,1/3):Math.pow(J,1/3),he=A===$?-ce:-j/ce;return C=j<=0?ce+he:-X/(ce*ce+he*he+j),f*u>=c*d?[(C-r)/o]:[-a/(C+s)]}let T=p,b=-2*r*p+o*_,S=m,w=-a*_+2*s*m,D=Math.sqrt(x),O=Math.sqrt(3)/2,I=Math.abs(Math.atan2(o*D,-b)/3);C=2*Math.sqrt(-T);let L=Math.cos(I);A=C*L;let N=C*(-L/2-O*Math.sin(I)),g=A+N>2*r?A-r:N-r,E=o,v=g/E;I=Math.abs(Math.atan2(a*D,-w)/3),C=2*Math.sqrt(-S),L=Math.cos(I),A=C*L,N=C*(-L/2-O*Math.sin(I));let P=-a,M=A+N<2*s?A+s:N+s,V=P/M,U=E*M,k=-g*M-E*P,H=g*P,F=(s*k-r*H)/(-r*k+s*U);return v<=F?v<=V?F<=V?[v,F,V]:[v,V,F]:[V,v,F]:v<=V?[F,v,V]:F<=V?[F,V,v]:[V,F,v]}Z8.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Qc.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=Qc.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return $8(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):$8(e,t,0,i);if(i===0)return o=Qc.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return $8(e,t,n,i)};var eA=Z8;var J8={};J8.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,u=n*n,f=u*n,d=i*i,p=d*i,_=o*o,m=_*o;return a*u*d-4*c*p-4*e*f*d+18*e*t*n*p-27*r*d*d+256*s*m+o*(18*c*n*i-4*a*f+16*e*u*u-80*e*t*u*i-6*e*a*d+144*r*n*d)+_*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)};function Yf(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=eA.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let u=-e/4,f=c[c.length-1];if(Math.abs(f)<R.EPSILON14){let d=Qc.computeRealRoots(1,r,a);if(d.length===2){let p=d[0],_=d[1],m;if(p>=0&&_>=0){let x=Math.sqrt(p),C=Math.sqrt(_);return[u-C,u-x,u+x,u+C]}else{if(p>=0&&_<0)return m=Math.sqrt(p),[u-m,u+m];if(p<0&&_>=0)return m=Math.sqrt(_),[u-m,u+m]}}return[]}else if(f>0){let d=Math.sqrt(f),p=(r+f-s/d)/2,_=(r+f+s/d)/2,m=Qc.computeRealRoots(1,d,p),x=Qc.computeRealRoots(1,-d,_);return m.length!==0?(m[0]+=u,m[1]+=u,x.length!==0?(x[0]+=u,x[1]+=u,m[1]<=x[0]?[m[0],m[1],x[0],x[1]]:x[1]<=m[0]?[x[0],x[1],m[0],m[1]]:m[0]>=x[0]&&m[1]<=x[1]?[x[0],m[0],m[1],x[1]]:x[0]>=m[0]&&x[1]<=m[1]?[m[0],x[0],x[1],m[1]]:m[0]>x[0]&&m[0]<x[1]?[x[0],m[0],x[1],m[1]]:[m[0],x[0],m[1],x[1]]):m):x.length!==0?(x[0]+=u,x[1]+=u,x):[]}}return[]}function hS(e,t,n,i){let o=n*n,r=t*t,s=e*e,a=-2*t,c=n*e+r-4*i,u=s*i-n*t*e+o,f=eA.computeRealRoots(1,a,c,u);if(f.length>0){let d=f[0],p=t-d,_=p*p,m=e/2,x=p/2,C=_-4*i,A=_+4*Math.abs(i),T=s-4*d,b=s+4*Math.abs(d),S,w;if(d<0||C*b<T*A){let E=Math.sqrt(T);S=E/2,w=E===0?0:(e*x-n)/E}else{let E=Math.sqrt(C);S=E===0?0:(e*x-n)/E,w=E/2}let D,O;m===0&&S===0?(D=0,O=0):R.sign(m)===R.sign(S)?(D=m+S,O=d/D):(O=m-S,D=d/O);let I,L;x===0&&w===0?(I=0,L=0):R.sign(x)===R.sign(w)?(I=x+w,L=i/I):(L=x-w,I=i/L);let N=Qc.computeRealRoots(1,D,I),g=Qc.computeRealRoots(1,O,L);if(N.length!==0)return g.length!==0?N[1]<=g[0]?[N[0],N[1],g[0],g[1]]:g[1]<=N[0]?[g[0],g[1],N[0],N[1]]:N[0]>=g[0]&&N[1]<=g[1]?[g[0],N[0],N[1],g[1]]:g[0]>=N[0]&&g[1]<=N[1]?[N[0],g[0],g[1],N[1]]:N[0]>g[0]&&N[0]<g[1]?[g[0],N[0],g[1],N[1]]:[N[0],g[0],N[1],g[1]]:N;if(g.length!==0)return g}return[]}J8.computeRealRoots=function(e,t,n,i,o){if(Math.abs(e)<R.EPSILON15)return eA.computeRealRoots(t,n,i,o);let r=t/e,s=n/e,a=i/e,c=o/e,u=r<0?1:0;switch(u+=s<0?u+1:u,u+=a<0?u+1:u,u+=c<0?u+1:u,u){case 0:return Yf(r,s,a,c);case 1:return hS(r,s,a,c);case 2:return hS(r,s,a,c);case 3:return Yf(r,s,a,c);case 4:return Yf(r,s,a,c);case 5:return hS(r,s,a,c);case 6:return Yf(r,s,a,c);case 7:return Yf(r,s,a,c);case 8:return hS(r,s,a,c);case 9:return Yf(r,s,a,c);case 10:return Yf(r,s,a,c);case 11:return hS(r,s,a,c);case 12:return Yf(r,s,a,c);case 13:return Yf(r,s,a,c);case 14:return Yf(r,s,a,c);case 15:return Yf(r,s,a,c);default:return}};var BP=J8;function LP(e,t){t=h.clone(y(t,h.ZERO)),h.equals(t,h.ZERO)||h.normalize(t,t),this.origin=h.clone(y(e,h.ZERO)),this.direction=t}LP.clone=function(e,t){if(!!l(e))return l(t)?(t.origin=h.clone(e.origin),t.direction=h.clone(e.direction),t):new LP(e.origin,e.direction)};LP.getPoint=function(e,t,n){return l(n)||(n=new h),n=h.multiplyByScalar(e.direction,t,n),h.add(e.origin,n,n)};var bn=LP;var sr={};sr.rayPlane=function(e,t,n){l(n)||(n=new h);let i=e.origin,o=e.direction,r=t.normal,s=h.dot(r,o);if(Math.abs(s)<R.EPSILON15)return;let a=(-t.distance-h.dot(r,i))/s;if(!(a<0))return n=h.multiplyByScalar(o,a,n),h.add(i,n,n)};var jbe=new h,qbe=new h,WK=new h,FK=new h,VK=new h;sr.rayTriangleParametric=function(e,t,n,i,o){o=y(o,!1);let r=e.origin,s=e.direction,a=h.subtract(n,t,jbe),c=h.subtract(i,t,qbe),u=h.cross(s,c,WK),f=h.dot(a,u),d,p,_,m,x;if(o){if(f<R.EPSILON6||(d=h.subtract(r,t,FK),_=h.dot(d,u),_<0||_>f)||(p=h.cross(d,a,VK),m=h.dot(s,p),m<0||_+m>f))return;x=h.dot(c,p)/f}else{if(Math.abs(f)<R.EPSILON6)return;let C=1/f;if(d=h.subtract(r,t,FK),_=h.dot(d,u)*C,_<0||_>1||(p=h.cross(d,a,VK),m=h.dot(s,p)*C,m<0||_+m>1))return;x=h.dot(c,p)*C}return x};sr.rayTriangle=function(e,t,n,i,o,r){let s=sr.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,s,r),h.add(e.origin,r,r)};var Ybe=new bn;sr.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=Ybe;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=sr.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function Xbe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,u=(-t-a)*s;return c<u?(i.root0=c,i.root1=u):(i.root0=u,i.root1=c),i}let r=-t/(2*e);if(r!==0)return i.root0=i.root1=r,i}var Kbe={root0:0,root1:0};function jK(e,t,n){l(n)||(n=new Jc);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=h.subtract(i,r,WK),c=h.dot(o,o),u=2*h.dot(o,a),f=h.magnitudeSquared(a)-s,d=Xbe(c,u,f,Kbe);if(!!l(d))return n.start=d.root0,n.stop=d.root1,n}sr.raySphere=function(e,t,n){if(n=jK(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var $be=new bn;sr.lineSegmentSphere=function(e,t,n,i){let o=$be;h.clone(e,o.origin);let r=h.subtract(t,e,o.direction),s=h.magnitude(r);if(h.normalize(r,r),i=jK(o,n,i),!(!l(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var Zbe=new h,Jbe=new h;sr.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,Zbe),o=h.multiplyComponents(n,e.direction,Jbe),r=h.magnitudeSquared(i),s=h.dot(i,o),a,c,u,f,d;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=h.magnitudeSquared(o),u=c*a,p<u)return;if(p>u){f=s*s-u,d=-s+Math.sqrt(f);let m=d/c,x=a/d;return m<x?new Jc(m,x):{start:x,stop:m}}let _=Math.sqrt(a/c);return new Jc(_,_)}else if(r<1)return a=r-1,c=h.magnitudeSquared(o),u=c*a,f=s*s-u,d=-s+Math.sqrt(f),new Jc(0,d/c);if(s<0)return c=h.magnitudeSquared(o),new Jc(0,-s/c)};function sy(e,t,n){let i=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}function Qbe(e,t,n,i,o){let r=i*i,s=o*o,a=(e[Q.COLUMN1ROW1]-e[Q.COLUMN2ROW2])*s,c=o*(i*sy(e[Q.COLUMN1ROW0],e[Q.COLUMN0ROW1],R.EPSILON15)+t.y),u=e[Q.COLUMN0ROW0]*r+e[Q.COLUMN2ROW2]*s+i*t.x+n,f=s*sy(e[Q.COLUMN2ROW1],e[Q.COLUMN1ROW2],R.EPSILON15),d=o*(i*sy(e[Q.COLUMN2ROW0],e[Q.COLUMN0ROW2])+t.z),p,_=[];if(d===0&&f===0){if(p=Qc.computeRealRoots(a,c,u),p.length===0)return _;let I=p[0],L=Math.sqrt(Math.max(1-I*I,0));if(_.push(new h(i,o*I,o*-L)),_.push(new h(i,o*I,o*L)),p.length===2){let N=p[1],g=Math.sqrt(Math.max(1-N*N,0));_.push(new h(i,o*N,o*-g)),_.push(new h(i,o*N,o*g))}return _}let m=d*d,x=f*f,C=a*a,A=d*f,T=C+x,b=2*(c*a+A),S=2*u*a+c*c-x+m,w=2*(u*c-A),D=u*u-m;if(T===0&&b===0&&S===0&&w===0)return _;p=BP.computeRealRoots(T,b,S,w,D);let O=p.length;if(O===0)return _;for(let I=0;I<O;++I){let L=p[I],N=L*L,g=Math.max(1-N,0),E=Math.sqrt(g),v;R.sign(a)===R.sign(u)?v=sy(a*N+u,c*L,R.EPSILON12):R.sign(u)===R.sign(c*L)?v=sy(a*N,c*L+u,R.EPSILON12):v=sy(a*N+c*L,u,R.EPSILON12);let P=sy(f*L,d,R.EPSILON15),M=v*P;M<0?_.push(new h(i,o*L,o*E)):M>0?_.push(new h(i,o*L,o*-E)):E!==0?(_.push(new h(i,o*L,o*-E)),_.push(new h(i,o*L,o*E)),++I):_.push(new h(i,o*L,o*E))}return _}var Q8=new h,kK=new h,UK=new h,NP=new h,eEe=new h,tEe=new Q,nEe=new Q,iEe=new Q,oEe=new Q,rEe=new Q,zK=new Q,HK=new Q,GK=new h,sEe=new h,aEe=new me;sr.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let D=t.geodeticSurfaceNormal(n,Q8);if(h.dot(i,D)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,Q8),s=h.normalize(r,r),a=h.mostOrthogonalAxis(r,NP),c=h.normalize(h.cross(a,s,kK),kK),u=h.normalize(h.cross(s,c,UK),UK),f=tEe;f[0]=s.x,f[1]=s.y,f[2]=s.z,f[3]=c.x,f[4]=c.y,f[5]=c.z,f[6]=u.x,f[7]=u.y,f[8]=u.z;let d=Q.transpose(f,nEe),p=Q.fromScale(t.radii,iEe),_=Q.fromScale(t.oneOverRadii,oEe),m=rEe;m[0]=0,m[1]=-i.z,m[2]=i.y,m[3]=i.z,m[4]=0,m[5]=-i.x,m[6]=-i.y,m[7]=i.x,m[8]=0;let x=Q.multiply(Q.multiply(d,_,zK),m,zK),C=Q.multiply(Q.multiply(x,p,HK),f,HK),A=Q.multiplyByVector(x,n,eEe),T=Qbe(C,h.negate(A,Q8),0,0,1),b,S,w=T.length;if(w>0){let D=h.clone(h.ZERO,sEe),O=Number.NEGATIVE_INFINITY;for(let L=0;L<w;++L){b=Q.multiplyByVector(p,Q.multiplyByVector(f,T[L],GK),GK);let N=h.normalize(h.subtract(b,n,NP),NP),g=h.dot(N,i);g>O&&(O=g,D=h.clone(b,D))}let I=t.cartesianToCartographic(D,aEe);return O=R.clamp(O,0,1),S=h.magnitude(h.subtract(D,n,NP))*Math.sqrt(1-O*O),S=o?-S:S,I.height=S,t.cartographicToCartesian(I,new h)}};var cEe=new h;sr.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,cEe),r=n.normal,s=h.dot(r,o);if(Math.abs(s)<R.EPSILON6)return;let a=h.dot(r,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};sr.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=h.dot(o,e)+r<0,a=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,u=0;u+=s?1:0,u+=a?1:0,u+=c?1:0;let f,d;if((u===1||u===2)&&(f=new h,d=new h),u===1){if(s)return sr.lineSegmentPlane(e,t,i,f),sr.lineSegmentPlane(e,n,i,d),{positions:[e,t,n,f,d],indices:[0,3,4,1,2,4,1,4,3]};if(a)return sr.lineSegmentPlane(t,n,i,f),sr.lineSegmentPlane(t,e,i,d),{positions:[e,t,n,f,d],indices:[1,3,4,2,0,4,2,4,3]};if(c)return sr.lineSegmentPlane(n,e,i,f),sr.lineSegmentPlane(n,t,i,d),{positions:[e,t,n,f,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(s)if(a){if(!c)return sr.lineSegmentPlane(e,n,i,f),sr.lineSegmentPlane(t,n,i,d),{positions:[e,t,n,f,d],indices:[0,1,4,0,4,3,2,3,4]}}else return sr.lineSegmentPlane(n,t,i,f),sr.lineSegmentPlane(e,t,i,d),{positions:[e,t,n,f,d],indices:[2,0,4,2,4,3,1,3,4]};else return sr.lineSegmentPlane(t,e,i,f),sr.lineSegmentPlane(n,e,i,d),{positions:[e,t,n,f,d],indices:[1,2,4,1,4,3,0,3,4]}};var Ki=sr;function Ts(e,t){this.normal=h.clone(e),this.distance=t}Ts.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Ts(t,i)};var lEe=new h;Ts.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,lEe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Ts(n,i)};Ts.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var uEe=new h;Ts.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Ts.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,uEe);return h.subtract(t,o,n)};var fEe=new B,dEe=new se,hEe=new h;Ts.transform=function(e,t,n){let i=e.normal,o=e.distance,r=B.inverseTranspose(t,fEe),s=se.fromElements(i.x,i.y,i.z,o,dEe);s=B.multiplyByVector(r,s,s);let a=h.fromCartesian4(s,hEe);return s=se.divideByScalar(s,h.magnitude(a),s),Ts.fromCartesian4(s,n)};Ts.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Ts(e.normal,e.distance)};Ts.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Ts.ORIGIN_XY_PLANE=Object.freeze(new Ts(h.UNIT_Z,0));Ts.ORIGIN_YZ_PLANE=Object.freeze(new Ts(h.UNIT_X,0));Ts.ORIGIN_ZX_PLANE=Object.freeze(new Ts(h.UNIT_Y,0));var rn=Ts;function mEe(e,t,n){let i=0,o=e.length-1,r,s;for(;i<=o;){if(r=~~((i+o)/2),s=n(e[r],t),s<0){i=r+1;continue}if(s>0){o=r-1;continue}return r}return~(o+1)}var ar=mEe;function pEe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var ay=pEe;function _Ee(e,t,n,i,o,r,s,a){this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a}var x_=_Ee;function gEe(e){return e%4===0&&e%100!==0||e%400===0}var C_=gEe;function yEe(e,t){this.julianDate=e,this.offset=t}var ki=yEe;var xEe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},jn=Object.freeze(xEe);var CEe={UTC:0,TAI:1},Hn=Object.freeze(CEe);var YK=new x_,eH=[31,28,31,30,31,30,31,31,30,31,30,31],tH=29;function nH(e,t){return At.compare(e.julianDate,t.julianDate)}var tA=new ki;function VP(e){tA.julianDate=e;let t=At.leapSeconds,n=ar(t,tA,nH);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&At.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),At.addSeconds(e,i,e)}function qK(e,t){tA.julianDate=e;let n=At.leapSeconds,i=ar(n,tA,nH);if(i<0&&(i=~i),i===0)return At.addSeconds(e,-n[0].offset,t);if(i>=n.length)return At.addSeconds(e,-n[i-1].offset,t);let o=At.secondsDifference(n[i].julianDate,e);if(o===0)return At.addSeconds(e,-n[i].offset,t);if(!(o<=1))return At.addSeconds(e,-n[--i].offset,t)}function A_(e,t,n){let i=t/jn.SECONDS_PER_DAY|0;return e+=i,t-=jn.SECONDS_PER_DAY*i,t<0&&(e--,t+=jn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function iH(e,t,n,i,o,r,s){let a=(t-14)/12|0,c=e+4800+a,u=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let f=r+(i*jn.SECONDS_PER_HOUR+o*jn.SECONDS_PER_MINUTE+s*jn.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var AEe=/^(\d{4})$/,TEe=/^(\d{4})-(\d{2})$/,bEe=/^(\d{4})-?(\d{3})$/,EEe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,SEe=/^(\d{4})-?(\d{2})-?(\d{2})$/,oH=/([Z+\-])?(\d{2})?:?(\d{2})?$/,wEe=/^(\d{2})(\.\d+)?/.source+oH.source,vEe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+oH.source,DEe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+oH.source;function At(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=y(e,0),t=y(t,0),n=y(n,Hn.UTC);let i=e|0;t=t+(e-i)*jn.SECONDS_PER_DAY,A_(i,t,this),n===Hn.UTC&&VP(this)}At.fromGregorianDate=function(e,t){let n=iH(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(A_(n[0],n[1],t),VP(t),t):new At(n[0],n[1],Hn.UTC)};At.fromDate=function(e,t){let n=iH(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(A_(n[0],n[1],t),VP(t),t):new At(n[0],n[1],Hn.UTC)};At.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,u=0,f=n[0],d=n[1],p,_;if(n=f.match(SEe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=f.match(TEe),n!==null)i=+n[1],o=+n[2];else if(n=f.match(AEe),n!==null)i=+n[1];else{let A;if(n=f.match(bEe),n!==null)i=+n[1],A=+n[2],_=C_(i);else if(n=f.match(EEe),n!==null){i=+n[1];let T=+n[2],b=+n[3]||0,S=new Date(Date.UTC(i,0,4));A=T*7+b-S.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(A),o=p.getUTCMonth()+1,r=p.getUTCDate()}_=C_(i);let m;if(l(d)){n=d.match(DEe),n!==null?(s=+n[1],a=+n[2],c=+n[3],u=+(n[4]||0)*1e3,m=5):(n=d.match(vEe),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,m=4):(n=d.match(wEe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,m=3)));let A=n[m],T=+n[m+1],b=+(n[m+2]||0);switch(A){case"+":s=s-T,a=a-b;break;case"-":s=s+T,a=a+b;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let x=c===60;for(x&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=_&&o===2?tH:eH[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=_&&o===2?tH:eH[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=_&&o===2?tH:eH[o-1],r+=p;let C=iH(i,o,r,s,a,c,u);return l(t)?(A_(C[0],C[1],t),VP(t)):t=new At(C[0],C[1],Hn.UTC),x&&At.addSeconds(t,1,t),t};At.now=function(e){return At.fromDate(new Date,e)};var FP=new At(0,0,Hn.TAI);At.toGregorianDate=function(e,t){let n=!1,i=qK(e,FP);l(i)||(At.addSeconds(e,-1,FP),i=qK(FP,FP),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let u=80*s/2447|0,f=s-(2447*u/80|0)|0;s=u/11|0;let d=u+2-12*s|0,p=100*(a-49)+c+s|0,_=r/jn.SECONDS_PER_HOUR|0,m=r-_*jn.SECONDS_PER_HOUR,x=m/jn.SECONDS_PER_MINUTE|0;m=m-x*jn.SECONDS_PER_MINUTE;let C=m|0,A=(m-C)/jn.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),n&&(C+=1),l(t)?(t.year=p,t.month=d,t.day=f,t.hour=_,t.minute=x,t.second=C,t.millisecond=A,t.isLeapSecond=n,t):new x_(p,d,f,_,x,C,A,n)};At.toDate=function(e){let t=At.toGregorianDate(e,YK),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};At.toIso8601=function(e,t){let n=At.toGregorianDate(e,YK),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,u=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&u===0&&(i=9999,o=12,r=31,s=24);let f;return!l(t)&&u!==0?(f=(u*.01).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`):!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(f=(u*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`)};At.clone=function(e,t){if(!!l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new At(e.dayNumber,e.secondsOfDay,Hn.TAI)};At.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};At.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};At.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(At.secondsDifference(e,t))<=n};At.totalDays=function(e){return e.dayNumber+e.secondsOfDay/jn.SECONDS_PER_DAY};At.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*jn.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};At.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/jn.SECONDS_PER_DAY;return n+i};At.computeTaiMinusUtc=function(e){tA.julianDate=e;let t=At.leapSeconds,n=ar(t,tA,nH);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};At.addSeconds=function(e,t,n){return A_(e.dayNumber,e.secondsOfDay+t,n)};At.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*jn.SECONDS_PER_MINUTE;return A_(e.dayNumber,i,n)};At.addHours=function(e,t,n){let i=e.secondsOfDay+t*jn.SECONDS_PER_HOUR;return A_(e.dayNumber,i,n)};At.addDays=function(e,t,n){let i=e.dayNumber+t;return A_(i,e.secondsOfDay,n)};At.lessThan=function(e,t){return At.compare(e,t)<0};At.lessThanOrEquals=function(e,t){return At.compare(e,t)<=0};At.greaterThan=function(e,t){return At.compare(e,t)>0};At.greaterThanOrEquals=function(e,t){return At.compare(e,t)>=0};At.prototype.clone=function(e){return At.clone(this,e)};At.prototype.equals=function(e){return At.equals(this,e)};At.prototype.equalsEpsilon=function(e,t){return At.equalsEpsilon(this,e,t)};At.prototype.toString=function(){return At.toIso8601(this)};At.leapSeconds=[new ki(new At(2441317,43210,Hn.TAI),10),new ki(new At(2441499,43211,Hn.TAI),11),new ki(new At(2441683,43212,Hn.TAI),12),new ki(new At(2442048,43213,Hn.TAI),13),new ki(new At(2442413,43214,Hn.TAI),14),new ki(new At(2442778,43215,Hn.TAI),15),new ki(new At(2443144,43216,Hn.TAI),16),new ki(new At(2443509,43217,Hn.TAI),17),new ki(new At(2443874,43218,Hn.TAI),18),new ki(new At(2444239,43219,Hn.TAI),19),new ki(new At(2444786,43220,Hn.TAI),20),new ki(new At(2445151,43221,Hn.TAI),21),new ki(new At(2445516,43222,Hn.TAI),22),new ki(new At(2446247,43223,Hn.TAI),23),new ki(new At(2447161,43224,Hn.TAI),24),new ki(new At(2447892,43225,Hn.TAI),25),new ki(new At(2448257,43226,Hn.TAI),26),new ki(new At(2448804,43227,Hn.TAI),27),new ki(new At(2449169,43228,Hn.TAI),28),new ki(new At(2449534,43229,Hn.TAI),29),new ki(new At(2450083,43230,Hn.TAI),30),new ki(new At(2450630,43231,Hn.TAI),31),new ki(new At(2451179,43232,Hn.TAI),32),new ki(new At(2453736,43233,Hn.TAI),33),new ki(new At(2454832,43234,Hn.TAI),34),new ki(new At(2456109,43235,Hn.TAI),35),new ki(new At(2457204,43236,Hn.TAI),36),new ki(new At(2457754,43237,Hn.TAI),37)];var ee=At;function kP(e){if(e=y(e,y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=y(e.addNewLeapSeconds,!0),l(e.data))rH(this,e.data);else if(l(e.url)){let t=De.createIfNeeded(e.url),n=this;this._downloadPromise=t.fetchJson().then(function(i){rH(n,i)}).catch(function(){n._dataError=`An error occurred while retrieving the EOP data from the URL ${t.url}.`})}else rH(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}kP.NONE=Object.freeze({getPromiseToLoad:function(){return Promise.resolve()},compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new ay(0,0,0,0,0),t}});kP.prototype.getPromiseToLoad=function(){return Promise.resolve(this._downloadPromise)};kP.prototype.compute=function(e,t){if(!l(this._samples)){if(l(this._dataError))throw new fe(this._dataError);return}if(l(t)||(t=new ay(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],u=ee.lessThanOrEquals(a,e),f=!l(c),d=f||ee.greaterThanOrEquals(c,e);if(u&&d)return o=i,!f&&c.equals(e)&&++o,r=o+1,KK(this,n,this._samples,e,o,r,t),t}let s=ar(n,e,ee.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,o=s,r=s):(r=~s,o=r-1,o<0&&(o=0)),this._lastIndex=o,KK(this,n,this._samples,e,o,r,t),t};function PEe(e,t){return ee.compare(e.julianDate,t)}function rH(e,t){if(!l(t.columnNames)){e._dataError="Error in loaded EOP data: The columnNames property is required.";return}if(!l(t.samples)){e._dataError="Error in loaded EOP data: The samples property is required.";return}let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||c<0){e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";return}let u=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let d,p=e._addNewLeapSeconds;for(let _=0,m=u.length;_<m;_+=e._columnCount){let x=u[_+n],C=u[_+c],A=x+jn.MODIFIED_JULIAN_DATE_DIFFERENCE,T=new ee(A,C,Hn.TAI);if(f.push(T),p){if(C!==d&&l(d)){let b=ee.leapSeconds,S=ar(b,T,PEe);if(S<0){let w=new ki(T,C);b.splice(~S,0,w)}}d=C}}}function XK(e,t,n,i,o){let r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function mS(e,t,n){return t+e*(n-t)}function KK(e,t,n,i,o,r,s){let a=e._columnCount;if(r>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],u=t[r];if(c.equals(u)||i.equals(c))return XK(e,n,o,a,s),s;if(i.equals(u))return XK(e,n,r,a,s),s;let f=ee.secondsDifference(i,c)/ee.secondsDifference(u,c),d=o*a,p=r*a,_=n[d+e._ut1MinusUtcSecondsColumn],m=n[p+e._ut1MinusUtcSecondsColumn],x=m-_;if(x>.5||x<-.5){let C=n[d+e._taiMinusUtcSecondsColumn],A=n[p+e._taiMinusUtcSecondsColumn];C!==A&&(u.equals(i)?_=m:m-=A-C)}return s.xPoleWander=mS(f,n[d+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=mS(f,n[d+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=mS(f,n[d+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=mS(f,n[d+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=mS(f,_,m),s}var UP=kP;function La(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.roll=y(n,0)}La.fromQuaternion=function(e,t){l(t)||(t=new La);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-R.asinClamped(n),t};La.fromDegrees=function(e,t,n,i){return l(i)||(i=new La),i.heading=e*R.RADIANS_PER_DEGREE,i.pitch=t*R.RADIANS_PER_DEGREE,i.roll=n*R.RADIANS_PER_DEGREE,i};La.clone=function(e,t){if(!!l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new La(e.heading,e.pitch,e.roll)};La.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};La.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.heading,t.heading,n,i)&&R.equalsEpsilon(e.pitch,t.pitch,n,i)&&R.equalsEpsilon(e.roll,t.roll,n,i)};La.prototype.clone=function(e){return La.clone(this,e)};La.prototype.equals=function(e){return La.equals(this,e)};La.prototype.equalsEpsilon=function(e,t,n){return La.equalsEpsilon(this,e,t,n)};La.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Xf=La;function IEe(e,t,n){this.x=e,this.y=t,this.s=n}var nA=IEe;function cH(e){e=y(e,y.EMPTY_OBJECT),this._xysFileUrlTemplate=De.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=y(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new ee(this._sampleZeroJulianEphemerisDate,0,Hn.TAI),this._stepSizeDays=y(e.stepSizeDays,1),this._samplesPerXysFile=y(e.samplesPerXysFile,1e3),this._totalSamples=y(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var OEe=new ee(0,0,Hn.TAI);function sH(e,t,n){let i=OEe;return i.dayNumber=t,i.secondsOfDay=n,ee.daysDifference(i,e._sampleZeroDateTT)}cH.prototype.preload=function(e,t,n,i){let o=sH(this,e,t),r=sH(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,u=a/this._samplesPerXysFile|0,f=[];for(let d=c;d<=u;++d)f.push(aH(this,d));return Promise.all(f)};cH.prototype.computeXysRadians=function(e,t,n){let i=sH(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,u=this._samples;if(l(u[s*3])||(aH(this,s/this._samplesPerXysFile|0),c=!0),l(u[a*3])||(aH(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new nA(0,0,0);let f=i-s*this._stepSizeDays,d=this._work,p=this._denominators,_=this._coef,m=this._xTable,x,C;for(x=0;x<=r;++x)d[x]=f-m[x];for(x=0;x<=r;++x){for(_[x]=1,C=0;C<=r;++C)C!==x&&(_[x]*=d[C]);_[x]*=p[x];let A=(s+x)*3;n.x+=_[x]*u[A++],n.y+=_[x]*u[A++],n.s+=_[x]*u[A]}return n};function aH(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new De({url:Jt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let u=0,f=a.length;u<f;++u)s[c+u]=a[u]});return e._chunkDownloadsInProgress[t]=o,o}var zP=cH;var T_,Ir={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},el={};Object.defineProperties(el,{element:{get:function(){if(!!el.supportsFullscreen())return document[Ir.fullscreenElement]}},changeEventName:{get:function(){if(!!el.supportsFullscreen())return Ir.fullscreenchange}},errorEventName:{get:function(){if(!!el.supportsFullscreen())return Ir.fullscreenerror}},enabled:{get:function(){if(!!el.supportsFullscreen())return document[Ir.fullscreenEnabled]}},fullscreen:{get:function(){if(!!el.supportsFullscreen())return el.element!==null}}});el.supportsFullscreen=function(){if(l(T_))return T_;T_=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return Ir.requestFullscreen="requestFullscreen",Ir.exitFullscreen="exitFullscreen",Ir.fullscreenEnabled="fullscreenEnabled",Ir.fullscreenElement="fullscreenElement",Ir.fullscreenchange="fullscreenchange",Ir.fullscreenerror="fullscreenerror",T_=!0,T_;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i<o;++i){let r=t[i];n=`${r}RequestFullscreen`,typeof e[n]=="function"?(Ir.requestFullscreen=n,T_=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(Ir.requestFullscreen=n,T_=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?Ir.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(Ir.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?Ir.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(Ir.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?Ir.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(Ir.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),Ir.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),Ir.fullscreenerror=n)}return T_};el.requestFullscreen=function(e,t){!el.supportsFullscreen()||e[Ir.requestFullscreen]({vrDisplay:t})};el.exitFullscreen=function(){!el.supportsFullscreen()||document[Ir.exitFullscreen]()};el._names=Ir;var Or=el;var Na;typeof navigator<"u"?Na=navigator:Na={};function cy(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var HP,$K;function mH(){if(!l(HP)&&(HP=!1,!XP())){let e=/ Chrome\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(HP=!0,$K=cy(e[1]))}return HP}function REe(){return mH()&&$K}var GP,ZK;function JK(){if(!l(GP)&&(GP=!1,!mH()&&!XP()&&/ Safari\/[\.0-9]+/.test(Na.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(GP=!0,ZK=cy(e[1]))}return GP}function MEe(){return JK()&&ZK}var WP,dH;function QK(){if(!l(WP)){WP=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Na.userAgent);e!==null&&(WP=!0,dH=cy(e[1]),dH.isNightly=!!e[2])}return WP}function BEe(){return QK()&&dH}var pS,hH;function e$(){if(!l(pS)){pS=!1;let e;Na.appName==="Microsoft Internet Explorer"?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Na.userAgent),e!==null&&(pS=!0,hH=cy(e[1]))):Na.appName==="Netscape"&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Na.userAgent),e!==null&&(pS=!0,hH=cy(e[1])))}return pS}function LEe(){return e$()&&hH}var jP,t$;function XP(){if(!l(jP)){jP=!1;let e=/ Edg\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(jP=!0,t$=cy(e[1]))}return jP}function NEe(){return XP()&&t$}var qP,n$;function pH(){if(!l(qP)){qP=!1;let e=/Firefox\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(qP=!0,n$=cy(e[1]))}return qP}var lH;function FEe(){return l(lH)||(lH=/Windows/i.test(Na.appVersion)),lH}var uH;function VEe(){return l(uH)||(uH=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),uH}function kEe(){return pH()&&n$}var fH;function UEe(){return l(fH)||(fH=!pH()&&typeof PointerEvent<"u"&&(!l(Na.pointerEnabled)||Na.pointerEnabled)),fH}var i$,YP;function o$(){if(!l(YP)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;YP=l(t)&&t!=="",YP&&(i$=t)}return YP}function zEe(){return o$()?i$:void 0}function hc(){return hc._result}hc._promise=void 0;hc._result=void 0;hc.initialize=function(){return l(hc._promise)||(hc._promise=new Promise(e=>{let t=new Image;t.onload=function(){hc._result=t.width>0&&t.height>0,e(hc._result)},t.onerror=function(){hc._result=!1,e(hc._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),hc._promise};Object.defineProperties(hc,{initialized:{get:function(){return l(hc._result)}}});var iA=[];typeof ArrayBuffer<"u"&&(iA.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&iA.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&iA.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&iA.push(BigInt64Array),typeof BigUint64Array<"u"&&iA.push(BigUint64Array));var hh={isChrome:mH,chromeVersion:REe,isSafari:JK,safariVersion:MEe,isWebkit:QK,webkitVersion:BEe,isInternetExplorer:e$,internetExplorerVersion:LEe,isEdge:XP,edgeVersion:NEe,isFirefox:pH,firefoxVersion:kEe,isWindows:FEe,isIPadOrIOS:VEe,hardwareConcurrency:y(Na.hardwareConcurrency,3),supportsPointerEvents:UEe,supportsImageRenderingPixelated:o$,supportsWebP:hc,imageRenderingValue:zEe,typedArrayTypes:iA};hh.supportsBasis=function(e){return hh.supportsWebAssembly()&&e.context.supportsBasis};hh.supportsFullscreen=function(){return Or.supportsFullscreen()};hh.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};hh.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};hh.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};hh.supportsBigInt=function(){return typeof BigInt<"u"};hh.supportsWebWorkers=function(){return typeof Worker<"u"};hh.supportsWebAssembly=function(){return typeof WebAssembly<"u"};var Et=hh;function tt(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0),this.w=y(i,0)}var _S=new h;tt.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);_S=h.normalize(e,_S);let r=_S.x*o,s=_S.y*o,a=_S.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new tt(r,s,a,c)};var HEe=[1,2,0],GEe=new Array(3);tt.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[Q.COLUMN0ROW0],c=e[Q.COLUMN1ROW1],u=e[Q.COLUMN2ROW2],f=a+c+u;if(f>0)n=Math.sqrt(f+1),s=.5*n,n=.5/n,i=(e[Q.COLUMN1ROW2]-e[Q.COLUMN2ROW1])*n,o=(e[Q.COLUMN2ROW0]-e[Q.COLUMN0ROW2])*n,r=(e[Q.COLUMN0ROW1]-e[Q.COLUMN1ROW0])*n;else{let d=HEe,p=0;c>a&&(p=1),u>a&&u>c&&(p=2);let _=d[p],m=d[_];n=Math.sqrt(e[Q.getElementIndex(p,p)]-e[Q.getElementIndex(_,_)]-e[Q.getElementIndex(m,m)]+1);let x=GEe;x[p]=.5*n,n=.5/n,s=(e[Q.getElementIndex(m,_)]-e[Q.getElementIndex(_,m)])*n,x[_]=(e[Q.getElementIndex(_,p)]+e[Q.getElementIndex(p,_)])*n,x[m]=(e[Q.getElementIndex(m,p)]+e[Q.getElementIndex(p,m)])*n,i=-x[0],o=-x[1],r=-x[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new tt(i,o,r,s)};var r$=new tt,s$=new tt,_H=new tt,a$=new tt;tt.fromHeadingPitchRoll=function(e,t){return a$=tt.fromAxisAngle(h.UNIT_X,e.roll,r$),_H=tt.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=tt.multiply(_H,a$,_H),s$=tt.fromAxisAngle(h.UNIT_Z,-e.heading,r$),tt.multiply(s$,t,t)};var KP=new h,gH=new h,Kf=new tt,c$=new tt,$P=new tt;tt.packedLength=4;tt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};tt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new tt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};tt.packedInterpolationLength=3;tt.convertPackedArrayForInterpolation=function(e,t,n,i){tt.unpack(e,n*4,$P),tt.conjugate($P,$P);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;tt.unpack(e,(t+o)*4,Kf),tt.multiply(Kf,$P,Kf),Kf.w<0&&tt.negate(Kf,Kf),tt.computeAxis(Kf,KP);let a=tt.computeAngle(Kf);l(i)||(i=[]),i[s]=KP.x*a,i[s+1]=KP.y*a,i[s+2]=KP.z*a}};tt.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new tt),h.fromArray(e,0,gH);let r=h.magnitude(gH);return tt.unpack(t,i*4,c$),r===0?tt.clone(tt.IDENTITY,Kf):tt.fromAxisAngle(gH,r,Kf),tt.multiply(Kf,c$,o)};tt.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new tt(e.x,e.y,e.z,e.w)};tt.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};tt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};tt.magnitude=function(e){return Math.sqrt(tt.magnitudeSquared(e))};tt.normalize=function(e,t){let n=1/tt.magnitude(e),i=e.x*n,o=e.y*n,r=e.z*n,s=e.w*n;return t.x=i,t.y=o,t.z=r,t.w=s,t};tt.inverse=function(e,t){let n=tt.magnitudeSquared(e);return t=tt.conjugate(e,t),tt.multiplyByScalar(t,1/n,t)};tt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};tt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};tt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};tt.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};tt.multiply=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,c=t.y,u=t.z,f=t.w,d=s*a+i*f+o*u-r*c,p=s*c-i*u+o*f+r*a,_=s*u+i*c-o*a+r*f,m=s*f-i*a-o*c-r*u;return n.x=d,n.y=p,n.z=_,n.w=m,n};tt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};tt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};tt.computeAxis=function(e,t){let n=e.w;if(Math.abs(n-1)<R.EPSILON6)return t.x=t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};tt.computeAngle=function(e){return Math.abs(e.w-1)<R.EPSILON6?0:2*Math.acos(e.w)};var yH=new tt;tt.lerp=function(e,t,n,i){return yH=tt.multiplyByScalar(t,n,yH),i=tt.multiplyByScalar(e,1-n,i),tt.add(yH,i,i)};var l$=new tt,xH=new tt,CH=new tt;tt.slerp=function(e,t,n,i){let o=tt.dot(e,t),r=t;if(o<0&&(o=-o,r=l$=tt.negate(t,l$)),1-o<R.EPSILON6)return tt.lerp(e,r,n,i);let s=Math.acos(o);return xH=tt.multiplyByScalar(e,Math.sin((1-n)*s),xH),CH=tt.multiplyByScalar(r,Math.sin(n*s),CH),i=tt.add(xH,CH,i),tt.multiplyByScalar(i,1/Math.sin(s),i)};tt.log=function(e,t){let n=R.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),h.multiplyByScalar(e,i,t)};tt.exp=function(e,t){let n=h.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var WEe=new h,jEe=new h,gS=new tt,oA=new tt;tt.computeInnerQuadrangle=function(e,t,n,i){let o=tt.conjugate(t,gS);tt.multiply(o,n,oA);let r=tt.log(oA,WEe);tt.multiply(o,e,oA);let s=tt.log(oA,jEe);return h.add(r,s,r),h.multiplyByScalar(r,.25,r),h.negate(r,r),tt.exp(r,gS),tt.multiply(t,gS,i)};tt.squad=function(e,t,n,i,o,r){let s=tt.slerp(e,t,o,gS),a=tt.slerp(n,i,o,oA);return tt.slerp(s,a,2*o*(1-o),r)};var qEe=new tt,u$=1.9011074535173003,ZP=Et.supportsTypedArrays()?new Float32Array(8):[],JP=Et.supportsTypedArrays()?new Float32Array(8):[],km=Et.supportsTypedArrays()?new Float32Array(8):[],Um=Et.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;ZP[e]=1/(t*n),JP[e]=t/n}ZP[7]=u$/(8*17);JP[7]=u$*8/17;tt.fastSlerp=function(e,t,n,i){let o=tt.dot(e,t),r;o>=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,u=a*a;for(let _=7;_>=0;--_)km[_]=(ZP[_]*c-JP[_])*s,Um[_]=(ZP[_]*u-JP[_])*s;let f=r*n*(1+km[0]*(1+km[1]*(1+km[2]*(1+km[3]*(1+km[4]*(1+km[5]*(1+km[6]*(1+km[7])))))))),d=a*(1+Um[0]*(1+Um[1]*(1+Um[2]*(1+Um[3]*(1+Um[4]*(1+Um[5]*(1+Um[6]*(1+Um[7])))))))),p=tt.multiplyByScalar(e,d,qEe);return tt.multiplyByScalar(t,f,i),tt.add(p,i,i)};tt.fastSquad=function(e,t,n,i,o,r){let s=tt.fastSlerp(e,t,o,gS),a=tt.fastSlerp(n,i,o,oA);return tt.fastSlerp(s,a,2*o*(1-o),r)};tt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};tt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};tt.ZERO=Object.freeze(new tt(0,0,0,0));tt.IDENTITY=Object.freeze(new tt(0,0,0,1));tt.prototype.clone=function(e){return tt.clone(this,e)};tt.prototype.equals=function(e){return tt.equals(this,e)};tt.prototype.equalsEpsilon=function(e,t){return tt.equalsEpsilon(this,e,t)};tt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Me=tt;var Li={},AH={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},rA={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},TH={},tl={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},b_=new h,E_=new h,S_=new h;Li.localFrameToFixedFrameGenerator=function(e,t){if(!AH.hasOwnProperty(e)||!AH[e].hasOwnProperty(t))throw new ye("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=AH[e][t],i,o=e+t;return l(TH[o])?i=TH[o]:(i=function(r,s,a){if(l(a)||(a=new B),h.equalsEpsilon(r,h.ZERO,R.EPSILON14))h.unpack(rA[e],0,b_),h.unpack(rA[t],0,E_),h.unpack(rA[n],0,S_);else if(R.equalsEpsilon(r.x,0,R.EPSILON14)&&R.equalsEpsilon(r.y,0,R.EPSILON14)){let c=R.sign(r.z);h.unpack(rA[e],0,b_),e!=="east"&&e!=="west"&&h.multiplyByScalar(b_,c,b_),h.unpack(rA[t],0,E_),t!=="east"&&t!=="west"&&h.multiplyByScalar(E_,c,E_),h.unpack(rA[n],0,S_),n!=="east"&&n!=="west"&&h.multiplyByScalar(S_,c,S_)}else{s=y(s,re.WGS84),s.geodeticSurfaceNormal(r,tl.up);let c=tl.up,u=tl.east;u.x=-r.y,u.y=r.x,u.z=0,h.normalize(u,tl.east),h.cross(c,u,tl.north),h.multiplyByScalar(tl.up,-1,tl.down),h.multiplyByScalar(tl.east,-1,tl.west),h.multiplyByScalar(tl.north,-1,tl.south),b_=tl[e],E_=tl[t],S_=tl[n]}return a[0]=b_.x,a[1]=b_.y,a[2]=b_.z,a[3]=0,a[4]=E_.x,a[5]=E_.y,a[6]=E_.z,a[7]=0,a[8]=S_.x,a[9]=S_.y,a[10]=S_.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},TH[o]=i),i};Li.eastNorthUpToFixedFrame=Li.localFrameToFixedFrameGenerator("east","north");Li.northEastDownToFixedFrame=Li.localFrameToFixedFrameGenerator("north","east");Li.northUpEastToFixedFrame=Li.localFrameToFixedFrameGenerator("north","up");Li.northWestUpToFixedFrame=Li.localFrameToFixedFrameGenerator("north","west");var YEe=new Me,XEe=new h(1,1,1),KEe=new B;Li.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=y(i,Li.eastNorthUpToFixedFrame);let r=Me.fromHeadingPitchRoll(t,YEe),s=B.fromTranslationQuaternionRotationScale(h.ZERO,r,XEe,KEe);return o=i(e,n,o),B.multiply(o,s,o)};var $Ee=new B,ZEe=new Q;Li.headingPitchRollQuaternion=function(e,t,n,i,o){let r=Li.headingPitchRollToFixedFrame(e,t,n,i,$Ee),s=B.getMatrix3(r,ZEe);return Me.fromRotationMatrix(s,o)};var JEe=new h(1,1,1),QEe=new h,f$=new B,eSe=new B,tSe=new Q,nSe=new Me;Li.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=y(t,re.WGS84),n=y(n,Li.eastNorthUpToFixedFrame),l(i)||(i=new Xf);let o=B.getTranslation(e,QEe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=B.inverseTransformation(n(o,t,f$),f$),s=B.setScale(e,JEe,eSe);s=B.setTranslation(s,h.ZERO,s),r=B.multiply(r,s,r);let a=Me.fromRotationMatrix(B.getMatrix3(r,tSe),nSe);return a=Me.normalize(a,a),Xf.fromQuaternion(a,i)};var iSe=6*3600+41*60+50.54841,oSe=8640184812866e-6,rSe=.093104,sSe=-62e-7,aSe=11772758384668e-32,cSe=72921158553e-15,lSe=R.TWO_PI/86400,QP=new ee;Li.computeTemeToPseudoFixedMatrix=function(e,t){QP=ee.addSeconds(e,-ee.computeTaiMinusUtc(e),QP);let n=QP.dayNumber,i=QP.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/jn.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/jn.DAYS_PER_JULIAN_CENTURY;let a=(iSe+o*(oSe+o*(rSe+o*sSe)))*lSe%R.TWO_PI,c=cSe+aSe*(n-24515455e-1),u=(i+jn.SECONDS_PER_DAY*.5)%jn.SECONDS_PER_DAY,f=a+c*u,d=Math.cos(f),p=Math.sin(f);return l(t)?(t[0]=d,t[1]=-p,t[2]=0,t[3]=p,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Q(d,p,0,-p,d,0,0,0,1)};Li.iau2006XysData=new zP;Li.earthOrientationParameters=UP.NONE;var SH=32.184,uSe=2451545;Li.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+SH,i=e.stop.dayNumber,o=e.stop.secondsOfDay+SH,r=Li.iau2006XysData.preload(t,n,i,o),s=Li.earthOrientationParameters.getPromiseToLoad();return Promise.all([r,s])};Li.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new Q);let n=Li.computeFixedToIcrfMatrix(e,t);if(!!l(n))return Q.transpose(n,t)};var fSe=new nA(0,0,0),dSe=new ay(0,0,0,0,0,0),bH=new Q,EH=new Q;Li.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new Q);let n=Li.earthOrientationParameters.compute(e,dSe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+SH,r=Li.iau2006XysData.computeXysRadians(i,o,fSe);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),u=bH;u[0]=1-c*s*s,u[3]=-c*s*a,u[6]=s,u[1]=-c*s*a,u[4]=1-c*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-c*(s*s+a*a);let f=Q.fromRotationZ(-r.s,EH),d=Q.multiply(u,f,bH),p=e.dayNumber,_=e.secondsOfDay-ee.computeTaiMinusUtc(e)+n.ut1MinusUtc,m=p-2451545,x=_/jn.SECONDS_PER_DAY,C=.779057273264+x+.00273781191135448*(m+x);C=C%1*R.TWO_PI;let A=Q.fromRotationZ(C,EH),T=Q.multiply(d,A,bH),b=Math.cos(n.xPoleWander),S=Math.cos(n.yPoleWander),w=Math.sin(n.xPoleWander),D=Math.sin(n.yPoleWander),O=i-uSe+o/jn.SECONDS_PER_DAY;O/=36525;let I=-47e-6*O*R.RADIANS_PER_DEGREE/3600,L=Math.cos(I),N=Math.sin(I),g=EH;return g[0]=b*L,g[1]=b*N,g[2]=w,g[3]=-S*N+D*w*L,g[4]=S*L+D*w*N,g[5]=-D*b,g[6]=-D*N-S*w*L,g[7]=D*L-S*w*N,g[8]=S*b,Q.multiply(T,g,t)};var hSe=new se;Li.pointToWindowCoordinates=function(e,t,n,i){return i=Li.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};Li.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new G);let o=hSe;return B.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),B.multiplyByVector(t,o,o),G.fromCartesian4(o,i)};var mSe=new h,pSe=new h,_Se=new h;Li.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=y(n,re.WGS84).geodeticSurfaceNormal(e,mSe),r=h.cross(t,o,pSe);h.equalsEpsilon(r,h.ZERO,R.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let s=h.cross(r,t,_Se);return h.normalize(s,s),h.cross(t,s,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new Q),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var d$=new B(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),h$=new me,m$=new h,gSe=new h,ySe=new Q,wH=new B,p$=new B;Li.basisTo2D=function(e,t,n){let i=B.getTranslation(t,gSe),o=e.ellipsoid,r=o.cartesianToCartographic(i,h$),s=e.project(r,m$);h.fromElements(s.z,s.x,s.y,s);let a=Li.eastNorthUpToFixedFrame(i,o,wH),c=B.inverseTransformation(a,p$),u=B.getMatrix3(t,ySe),f=B.multiplyByMatrix3(c,u,n);return B.multiply(d$,f,n),B.setTranslation(n,s,n),n};Li.wgs84To2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=Li.eastNorthUpToFixedFrame(t,i,wH),r=B.inverseTransformation(o,p$),s=i.cartesianToCartographic(t,h$),a=e.project(s,m$);h.fromElements(a.z,a.x,a.y,a);let c=B.fromTranslation(a,wH);return B.multiply(d$,r,n),B.multiply(c,n,n),n};var _t=Li;var vH=new se;function mh(e,t){t=y(t,re.WGS84),e=t.scaleToGeodeticSurface(e);let n=_t.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(B.getColumn(n,0,vH)),this._yAxis=h.fromCartesian4(B.getColumn(n,1,vH));let i=h.fromCartesian4(B.getColumn(n,2,vH));this._plane=rn.fromPointNormal(e,i)}Object.defineProperties(mh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var xSe=new ry;mh.fromPoints=function(e,t){let n=ry.fromPoints(e,xSe);return new mh(n.center,t)};var _$=new bn,eI=new h;mh.prototype.projectPointOntoPlane=function(e,t){let n=_$;n.origin=e,h.normalize(e,n.direction);let i=Ki.rayPlane(n,this._plane,eI);if(l(i)||(h.negate(n.direction,n.direction),i=Ki.rayPlane(n,this._plane,eI)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new G(r,s)}};mh.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let r=this.projectPointOntoPlane(e[o],t[n]);l(r)&&(t[n]=r,n++)}return t.length=n,t};mh.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new G);let n=_$;n.origin=e,h.clone(this._plane.normal,n.direction);let i=Ki.rayPlane(n,this._plane,eI);l(i)||(h.negate(n.direction,n.direction),i=Ki.rayPlane(n,this._plane,eI));let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return t.x=r,t.y=s,t};mh.prototype.projectPointsToNearestOnPlane=function(e,t){l(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var CSe=new h;mh.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new h);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=CSe;return h.multiplyByScalar(o,e.x,s),t=h.add(i,s,t),h.multiplyByScalar(r,e.y,s),h.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};mh.prototype.projectPointsOntoEllipsoid=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Fa=mh;function wi(e,t){this.center=h.clone(y(e,h.ZERO)),this.halfAxes=Q.clone(y(t,Q.ZERO))}wi.packedLength=h.packedLength+Q.packedLength;wi.pack=function(e,t,n){return n=y(n,0),h.pack(e.center,t,n),Q.pack(e.halfAxes,t,n+h.packedLength),t};wi.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new wi),h.unpack(e,t,n.center),Q.unpack(e,t+h.packedLength,n.halfAxes),n};var ASe=new h,TSe=new h,bSe=new h,ESe=new h,SSe=new h,wSe=new h,vSe=new Q,DSe={unitary:new Q,diagonal:new Q};wi.fromPoints=function(e,t){if(l(t)||(t=new wi),!l(e)||e.length===0)return t.halfAxes=Q.ZERO,t.center=h.ZERO,t;let n,i=e.length,o=h.clone(e[0],ASe);for(n=1;n<i;n++)h.add(o,e[n],o);let r=1/i;h.multiplyByScalar(o,r,o);let s=0,a=0,c=0,u=0,f=0,d=0,p;for(n=0;n<i;n++)p=h.subtract(e[n],o,TSe),s+=p.x*p.x,a+=p.x*p.y,c+=p.x*p.z,u+=p.y*p.y,f+=p.y*p.z,d+=p.z*p.z;s*=r,a*=r,c*=r,u*=r,f*=r,d*=r;let _=vSe;_[0]=s,_[1]=a,_[2]=c,_[3]=a,_[4]=u,_[5]=f,_[6]=c,_[7]=f,_[8]=d;let m=Q.computeEigenDecomposition(_,DSe),x=Q.clone(m.unitary,t.halfAxes),C=Q.getColumn(x,0,ESe),A=Q.getColumn(x,1,SSe),T=Q.getColumn(x,2,wSe),b=-Number.MAX_VALUE,S=-Number.MAX_VALUE,w=-Number.MAX_VALUE,D=Number.MAX_VALUE,O=Number.MAX_VALUE,I=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],b=Math.max(h.dot(C,p),b),S=Math.max(h.dot(A,p),S),w=Math.max(h.dot(T,p),w),D=Math.min(h.dot(C,p),D),O=Math.min(h.dot(A,p),O),I=Math.min(h.dot(T,p),I);C=h.multiplyByScalar(C,.5*(D+b),C),A=h.multiplyByScalar(A,.5*(O+S),A),T=h.multiplyByScalar(T,.5*(I+w),T);let L=h.add(C,A,t.center);h.add(L,T,L);let N=bSe;return N.x=b-D,N.y=S-O,N.z=w-I,h.multiplyByScalar(N,.5,N),Q.multiplyByScale(t.halfAxes,N,t.halfAxes),t};var T$=new h,PSe=new h;function g$(e,t,n,i,o,r,s,a,c,u,f){l(f)||(f=new wi);let d=f.halfAxes;Q.setColumn(d,0,t,d),Q.setColumn(d,1,n,d),Q.setColumn(d,2,i,d);let p=T$;p.x=(o+r)/2,p.y=(s+a)/2,p.z=(c+u)/2;let _=PSe;_.x=(r-o)/2,_.y=(a-s)/2,_.z=(u-c)/2;let m=f.center;return p=Q.multiplyByVector(d,p,p),h.add(e,p,m),Q.multiplyByScale(d,_,d),f}var y$=new me,ISe=new h,OSe=new me,RSe=new me,MSe=new me,BSe=new me,LSe=new me,NSe=new h,x$=new h,FSe=new h,C$=new h,VSe=new h,kSe=new G,USe=new G,zSe=new G,HSe=new G,GSe=new G,WSe=new h,jSe=new h,qSe=new h,YSe=new h,XSe=new G,KSe=new h,$Se=new h,ZSe=new h,JSe=new rn(h.UNIT_X,0);wi.fromRectangle=function(e,t,n,i,o){t=y(t,0),n=y(n,0),i=y(i,re.WGS84);let r,s,a,c,u,f,d;if(e.width<=R.PI){let O=de.center(e,y$),I=i.cartographicToCartesian(O,ISe),L=new Fa(I,i);d=L.plane;let N=O.longitude,g=e.south<0&&e.north>0?0:O.latitude,E=me.fromRadians(N,e.north,n,OSe),v=me.fromRadians(e.west,e.north,n,RSe),P=me.fromRadians(e.west,g,n,MSe),M=me.fromRadians(e.west,e.south,n,BSe),V=me.fromRadians(N,e.south,n,LSe),U=i.cartographicToCartesian(E,NSe),k=i.cartographicToCartesian(v,x$),H=i.cartographicToCartesian(P,FSe),F=i.cartographicToCartesian(M,C$),Y=i.cartographicToCartesian(V,VSe),j=L.projectPointToNearestOnPlane(U,kSe),X=L.projectPointToNearestOnPlane(k,USe),W=L.projectPointToNearestOnPlane(H,zSe),$=L.projectPointToNearestOnPlane(F,HSe),J=L.projectPointToNearestOnPlane(Y,GSe);return r=Math.min(X.x,W.x,$.x),s=-r,c=Math.max(X.y,j.y),a=Math.min($.y,J.y),v.height=M.height=t,k=i.cartographicToCartesian(v,x$),F=i.cartographicToCartesian(M,C$),u=Math.min(rn.getPointDistance(d,k),rn.getPointDistance(d,F)),f=n,g$(L.origin,L.xAxis,L.yAxis,L.zAxis,r,s,a,c,u,f,o)}let p=e.south>0,_=e.north<0,m=p?e.south:_?e.north:0,x=de.center(e,y$).longitude,C=h.fromRadians(x,m,n,i,WSe);C.z=0;let T=Math.abs(C.x)<R.EPSILON10&&Math.abs(C.y)<R.EPSILON10?h.UNIT_X:h.normalize(C,jSe),b=h.UNIT_Z,S=h.cross(T,b,qSe);d=rn.fromPointNormal(C,T,JSe);let w=h.fromRadians(x+R.PI_OVER_TWO,m,n,i,YSe);s=h.dot(rn.projectPointOntoPlane(d,w,XSe),S),r=-s,c=h.fromRadians(0,e.north,_?t:n,i,KSe).z,a=h.fromRadians(0,e.south,p?t:n,i,$Se).z;let D=h.fromRadians(e.east,m,n,i,ZSe);return u=rn.getPointDistance(d,D),f=0,g$(C,S,b,T,r,s,a,c,u,f,o)};wi.fromTransformation=function(e,t){return l(t)||(t=new wi),t.center=B.getTranslation(e,t.center),t.halfAxes=B.getMatrix3(e,t.halfAxes),t.halfAxes=Q.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};wi.clone=function(e,t){if(!!l(e))return l(t)?(h.clone(e.center,t.center),Q.clone(e.halfAxes,t.halfAxes),t):new wi(e.center,e.halfAxes)};wi.intersectPlane=function(e,t){let n=e.center,i=t.normal,o=e.halfAxes,r=i.x,s=i.y,a=i.z,c=Math.abs(r*o[Q.COLUMN0ROW0]+s*o[Q.COLUMN0ROW1]+a*o[Q.COLUMN0ROW2])+Math.abs(r*o[Q.COLUMN1ROW0]+s*o[Q.COLUMN1ROW1]+a*o[Q.COLUMN1ROW2])+Math.abs(r*o[Q.COLUMN2ROW0]+s*o[Q.COLUMN2ROW1]+a*o[Q.COLUMN2ROW2]),u=h.dot(i,n)+t.distance;return u<=-c?Zt.OUTSIDE:u>=c?Zt.INSIDE:Zt.INTERSECTING};var b$=new h,E$=new h,S$=new h,QSe=new h,A$=new h,ewe=new h;wi.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,T$),i=e.halfAxes,o=Q.getColumn(i,0,b$),r=Q.getColumn(i,1,E$),s=Q.getColumn(i,2,S$),a=h.magnitude(o),c=h.magnitude(r),u=h.magnitude(s),f=!0,d=!0,p=!0;a>0?h.divideByScalar(o,a,o):f=!1,c>0?h.divideByScalar(r,c,r):d=!1,u>0?h.divideByScalar(s,u,s):p=!1;let _=!f+!d+!p,m,x,C;if(_===1){let S=o;m=r,x=s,d?p||(S=s,x=o):(S=r,m=o),C=h.cross(m,x,A$),S===o?o=C:S===r?r=C:S===s&&(s=C)}else if(_===2){m=o,d?m=r:p&&(m=s);let S=h.UNIT_Y;S.equalsEpsilon(m,R.EPSILON3)&&(S=h.UNIT_X),x=h.cross(m,S,QSe),h.normalize(x,x),C=h.cross(m,x,A$),h.normalize(C,C),m===o?(r=x,s=C):m===r?(s=x,o=C):m===s&&(o=x,r=C)}else _===3&&(o=h.UNIT_X,r=h.UNIT_Y,s=h.UNIT_Z);let A=ewe;A.x=h.dot(n,o),A.y=h.dot(n,r),A.z=h.dot(n,s);let T=0,b;return A.x<-a?(b=A.x+a,T+=b*b):A.x>a&&(b=A.x-a,T+=b*b),A.y<-c?(b=A.y+c,T+=b*b):A.y>c&&(b=A.y-c,T+=b*b),A.z<-u?(b=A.z+u,T+=b*b):A.z>u&&(b=A.z-u,T+=b*b),T};var twe=new h,nwe=new h;wi.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Jc);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=Q.getColumn(a,0,b$),u=Q.getColumn(a,1,E$),f=Q.getColumn(a,2,S$),d=h.add(c,u,twe);h.add(d,f,d),h.add(d,s,d);let p=h.subtract(d,t,nwe),_=h.dot(n,p);return o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.add(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),i.start=o,i.stop=r,i};var iwe=new h,owe=new h,rwe=new h;wi.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=Q.getColumn(i,0,iwe),r=Q.getColumn(i,1,owe),s=Q.getColumn(i,2,rwe);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],s,t[7]),t};var swe=new Q;wi.computeTransformation=function(e,t){l(t)||(t=new B);let n=e.center,i=Q.multiplyByUniformScale(e.halfAxes,2,swe);return B.fromRotationTranslation(i,n,t)};var awe=new oe;wi.isOccluded=function(e,t){let n=oe.fromOrientedBoundingBox(e,awe);return!t.isBoundingSphereVisible(n)};wi.prototype.intersectPlane=function(e){return wi.intersectPlane(this,e)};wi.prototype.distanceSquaredTo=function(e){return wi.distanceSquaredTo(this,e)};wi.prototype.computePlaneDistances=function(e,t,n){return wi.computePlaneDistances(this,e,t,n)};wi.prototype.computeCorners=function(e){return wi.computeCorners(this,e)};wi.prototype.computeTransformation=function(e){return wi.computeTransformation(this,e)};wi.prototype.isOccluded=function(e){return wi.isOccluded(this,e)};wi.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&Q.equals(e.halfAxes,t.halfAxes)};wi.prototype.clone=function(e){return wi.clone(this,e)};wi.prototype.equals=function(e){return wi.equals(this,e)};var gi=wi;var cwe={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},Z=Object.freeze(cwe);var gn={BYTE:Z.BYTE,UNSIGNED_BYTE:Z.UNSIGNED_BYTE,SHORT:Z.SHORT,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,INT:Z.INT,UNSIGNED_INT:Z.UNSIGNED_INT,FLOAT:Z.FLOAT,DOUBLE:Z.DOUBLE};gn.getSizeInBytes=function(e){switch(e){case gn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case gn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case gn.INT:return Int32Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case gn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case gn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};gn.fromTypedArray=function(e){if(e instanceof Int8Array)return gn.BYTE;if(e instanceof Uint8Array)return gn.UNSIGNED_BYTE;if(e instanceof Int16Array)return gn.SHORT;if(e instanceof Uint16Array)return gn.UNSIGNED_SHORT;if(e instanceof Int32Array)return gn.INT;if(e instanceof Uint32Array)return gn.UNSIGNED_INT;if(e instanceof Float32Array)return gn.FLOAT;if(e instanceof Float64Array)return gn.DOUBLE};gn.validate=function(e){return l(e)&&(e===gn.BYTE||e===gn.UNSIGNED_BYTE||e===gn.SHORT||e===gn.UNSIGNED_SHORT||e===gn.INT||e===gn.UNSIGNED_INT||e===gn.FLOAT||e===gn.DOUBLE)};gn.createTypedArray=function(e,t){switch(e){case gn.BYTE:return new Int8Array(t);case gn.UNSIGNED_BYTE:return new Uint8Array(t);case gn.SHORT:return new Int16Array(t);case gn.UNSIGNED_SHORT:return new Uint16Array(t);case gn.INT:return new Int32Array(t);case gn.UNSIGNED_INT:return new Uint32Array(t);case gn.FLOAT:return new Float32Array(t);case gn.DOUBLE:return new Float64Array(t)}};gn.createArrayBufferView=function(e,t,n,i){switch(n=y(n,0),i=y(i,(t.byteLength-n)/gn.getSizeInBytes(e)),e){case gn.BYTE:return new Int8Array(t,n,i);case gn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case gn.SHORT:return new Int16Array(t,n,i);case gn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case gn.INT:return new Int32Array(t,n,i);case gn.UNSIGNED_INT:return new Uint32Array(t,n,i);case gn.FLOAT:return new Float32Array(t,n,i);case gn.DOUBLE:return new Float64Array(t,n,i)}};gn.fromName=function(e){switch(e){case"BYTE":return gn.BYTE;case"UNSIGNED_BYTE":return gn.UNSIGNED_BYTE;case"SHORT":return gn.SHORT;case"UNSIGNED_SHORT":return gn.UNSIGNED_SHORT;case"INT":return gn.INT;case"UNSIGNED_INT":return gn.UNSIGNED_INT;case"FLOAT":return gn.FLOAT;case"DOUBLE":return gn.DOUBLE}};var K=Object.freeze(gn);function zt(e,t,n,i){this[0]=y(e,0),this[1]=y(n,0),this[2]=y(t,0),this[3]=y(i,0)}zt.packedLength=4;zt.pack=function(e,t,n){return n=y(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t};zt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zt),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n};zt.packArray=function(e,t){let n=e.length,i=n*4;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)zt.pack(e[o],t,o*4);return t};zt.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=zt.unpack(e,i,t[o])}return t};zt.clone=function(e,t){if(!!l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new zt(e[0],e[2],e[1],e[3])};zt.fromArray=zt.unpack;zt.fromColumnMajorArray=function(e,t){return zt.clone(e,t)};zt.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new zt(e[0],e[1],e[2],e[3])};zt.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new zt(e.x,0,0,e.y)};zt.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new zt(e,0,0,e)};zt.fromRotation=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=-i,t[3]=n,t):new zt(n,-i,i,n)};zt.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]};zt.getElementIndex=function(e,t){return e*2+t};zt.getColumn=function(e,t,n){let i=t*2,o=e[i],r=e[i+1];return n.x=o,n.y=r,n};zt.setColumn=function(e,t,n,i){i=zt.clone(e,i);let o=t*2;return i[o]=n.x,i[o+1]=n.y,i};zt.getRow=function(e,t,n){let i=e[t],o=e[t+2];return n.x=i,n.y=o,n};zt.setRow=function(e,t,n,i){return i=zt.clone(e,i),i[t]=n.x,i[t+2]=n.y,i};var lwe=new G;zt.setScale=function(e,t,n){let i=zt.getScale(e,lwe),o=t.x/i.x,r=t.y/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var uwe=new G;zt.setUniformScale=function(e,t,n){let i=zt.getScale(e,uwe),o=t/i.x,r=t/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var w$=new G;zt.getScale=function(e,t){return t.x=G.magnitude(G.fromElements(e[0],e[1],w$)),t.y=G.magnitude(G.fromElements(e[2],e[3],w$)),t};var v$=new G;zt.getMaximumScale=function(e){return zt.getScale(e,v$),G.maximumComponent(v$)};var fwe=new G;zt.setRotation=function(e,t,n){let i=zt.getScale(e,fwe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.y,n[3]=t[3]*i.y,n};var dwe=new G;zt.getRotation=function(e,t){let n=zt.getScale(e,dwe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.y,t[3]=e[3]/n.y,t};zt.multiply=function(e,t,n){let i=e[0]*t[0]+e[2]*t[1],o=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n};zt.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n};zt.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n};zt.multiplyByVector=function(e,t,n){let i=e[0]*t.x+e[2]*t.y,o=e[1]*t.x+e[3]*t.y;return n.x=i,n.y=o,n};zt.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};zt.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n};zt.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};zt.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};zt.transpose=function(e,t){let n=e[0],i=e[2],o=e[1],r=e[3];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t};zt.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t};zt.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]};zt.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]};zt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n};zt.IDENTITY=Object.freeze(new zt(1,0,0,1));zt.ZERO=Object.freeze(new zt(0,0,0,0));zt.COLUMN0ROW0=0;zt.COLUMN0ROW1=1;zt.COLUMN1ROW0=2;zt.COLUMN1ROW1=3;Object.defineProperties(zt.prototype,{length:{get:function(){return zt.packedLength}}});zt.prototype.clone=function(e){return zt.clone(this,e)};zt.prototype.equals=function(e){return zt.equals(this,e)};zt.prototype.equalsEpsilon=function(e,t){return zt.equalsEpsilon(this,e,t)};zt.prototype.toString=function(){return`(${this[0]}, ${this[2]})
|
|
93
|
+
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var B=Ke;function On(e,t,n,i){this.west=y(e,0),this.south=y(t,0),this.east=y(n,0),this.north=y(i,0)}Object.defineProperties(On.prototype,{width:{get:function(){return On.computeWidth(this)}},height:{get:function(){return On.computeHeight(this)}}});On.packedLength=4;On.pack=function(e,t,n){return n=y(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};On.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new On),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};On.computeWidth=function(e){let t=e.east,n=e.west;return t<n&&(t+=R.TWO_PI),t-n};On.computeHeight=function(e){return e.north-e.south};On.fromDegrees=function(e,t,n,i,o){return e=R.toRadians(y(e,0)),t=R.toRadians(y(t,0)),n=R.toRadians(y(n,0)),i=R.toRadians(y(i,0)),l(o)?(o.west=e,o.south=t,o.east=n,o.north=i,o):new On(e,t,n,i)};On.fromRadians=function(e,t,n,i,o){return l(o)?(o.west=y(e,0),o.south=y(t,0),o.east=y(n,0),o.north=y(i,0),o):new On(e,t,n,i)};On.fromCartographicArray=function(e,t){let n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE,a=-Number.MAX_VALUE;for(let c=0,u=e.length;c<u;c++){let f=e[c];n=Math.min(n,f.longitude),i=Math.max(i,f.longitude),s=Math.min(s,f.latitude),a=Math.max(a,f.latitude);let d=f.longitude>=0?f.longitude:f.longitude+R.TWO_PI;o=Math.min(o,d),r=Math.max(r,d)}return i-n>r-o&&(n=o,i=r,i>R.PI&&(i=i-R.TWO_PI),n>R.PI&&(n=n-R.TWO_PI)),l(t)?(t.west=n,t.south=s,t.east=i,t.north=a,t):new On(n,s,i,a)};On.fromCartesianArray=function(e,t,n){t=y(t,re.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let u=0,f=e.length;u<f;u++){let d=t.cartesianToCartographic(e[u]);i=Math.min(i,d.longitude),o=Math.max(o,d.longitude),a=Math.min(a,d.latitude),c=Math.max(c,d.latitude);let p=d.longitude>=0?d.longitude:d.longitude+R.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>R.PI&&(o=o-R.TWO_PI),i>R.PI&&(i=i-R.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new On(i,a,o,c)};On.clone=function(e,t){if(!!l(e))return l(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new On(e.west,e.south,e.east,e.north)};On.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n};On.prototype.clone=function(e){return On.clone(this,e)};On.prototype.equals=function(e){return On.equals(this,e)};On.equals=function(e,t){return e===t||l(e)&&l(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north};On.prototype.equalsEpsilon=function(e,t){return On.equalsEpsilon(this,e,t)};On.validate=function(e){};On.southwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new me(e.west,e.south)};On.northwest=function(e,t){return l(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new me(e.west,e.north)};On.northeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new me(e.east,e.north)};On.southeast=function(e,t){return l(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new me(e.east,e.south)};On.center=function(e,t){let n=e.east,i=e.west;n<i&&(n+=R.TWO_PI);let o=R.negativePiToPi((i+n)*.5),r=(e.south+e.north)*.5;return l(t)?(t.longitude=o,t.latitude=r,t.height=0,t):new me(o,r)};On.intersection=function(e,t,n){let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=R.TWO_PI:r<s&&i>0&&(r+=R.TWO_PI),i<o&&s<0?s+=R.TWO_PI:r<s&&o<0&&(o+=R.TWO_PI);let a=R.negativePiToPi(Math.max(o,s)),c=R.negativePiToPi(Math.min(i,r));if((e.west<e.east||t.west<t.east)&&c<=a)return;let u=Math.max(e.south,t.south),f=Math.min(e.north,t.north);if(!(u>=f))return l(n)?(n.west=a,n.south=u,n.east=c,n.north=f,n):new On(a,u,c,f)};On.simpleIntersection=function(e,t,n){let i=Math.max(e.west,t.west),o=Math.max(e.south,t.south),r=Math.min(e.east,t.east),s=Math.min(e.north,t.north);if(!(o>=s||i>=r))return l(n)?(n.west=i,n.south=o,n.east=r,n.north=s,n):new On(i,o,r,s)};On.union=function(e,t,n){l(n)||(n=new On);let i=e.east,o=e.west,r=t.east,s=t.west;i<o&&r>0?i+=R.TWO_PI:r<s&&i>0&&(r+=R.TWO_PI),i<o&&s<0?s+=R.TWO_PI:r<s&&o<0&&(o+=R.TWO_PI);let a=R.negativePiToPi(Math.min(o,s)),c=R.negativePiToPi(Math.max(i,r));return n.west=a,n.south=Math.min(e.south,t.south),n.east=c,n.north=Math.max(e.north,t.north),n};On.expand=function(e,t,n){return l(n)||(n=new On),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n};On.contains=function(e,t){let n=t.longitude,i=t.latitude,o=e.west,r=e.east;return r<o&&(r+=R.TWO_PI,n<0&&(n+=R.TWO_PI)),(n>o||R.equalsEpsilon(n,o,R.EPSILON14))&&(n<r||R.equalsEpsilon(n,r,R.EPSILON14))&&i>=e.south&&i<=e.north};var FTe=new me;On.subsample=function(e,t,n,i){t=y(t,re.WGS84),n=y(n,0),l(i)||(i=[]);let o=0,r=e.north,s=e.south,a=e.east,c=e.west,u=FTe;u.height=n,u.longitude=c,u.latitude=r,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.latitude=s,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:s>0?u.latitude=s:u.latitude=0;for(let f=1;f<8;++f)u.longitude=-Math.PI+f*R.PI_OVER_TWO,On.contains(e,u)&&(i[o]=t.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=c,i[o]=t.cartographicToCartesian(u,i[o]),o++,u.longitude=a,i[o]=t.cartographicToCartesian(u,i[o]),o++),i.length=o,i};On.subsection=function(e,t,n,i,o,r){if(l(r)||(r=new On),e.west<=e.east){let a=e.east-e.west;r.west=e.west+t*a,r.east=e.west+i*a}else{let a=R.TWO_PI+e.east-e.west;r.west=R.negativePiToPi(e.west+t*a),r.east=R.negativePiToPi(e.west+i*a)}let s=e.north-e.south;return r.south=e.south+n*s,r.north=e.south+o*s,t===1&&(r.west=e.east),i===1&&(r.east=e.east),n===1&&(r.south=e.north),o===1&&(r.north=e.north),r};On.MAX_VALUE=Object.freeze(new On(-Math.PI,-R.PI_OVER_TWO,Math.PI,R.PI_OVER_TWO));var de=On;function cn(e,t){this.center=h.clone(y(e,h.ZERO)),this.radius=y(t,0)}var v8=new h,D8=new h,P8=new h,I8=new h,O8=new h,R8=new h,M8=new h,Ns=new h,B8=new h,L8=new h,N8=new h,F8=new h,VTe=4/3*R.PI;cn.fromPoints=function(e,t){if(l(t)||(t=new cn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=h.clone(e[0],M8),i=h.clone(n,v8),o=h.clone(n,D8),r=h.clone(n,P8),s=h.clone(n,I8),a=h.clone(n,O8),c=h.clone(n,R8),u=e.length,f;for(f=1;f<u;f++){h.clone(e[f],n);let I=n.x,L=n.y,N=n.z;I<i.x&&h.clone(n,i),I>s.x&&h.clone(n,s),L<o.y&&h.clone(n,o),L>a.y&&h.clone(n,a),N<r.z&&h.clone(n,r),N>c.z&&h.clone(n,c)}let d=h.magnitudeSquared(h.subtract(s,i,Ns)),p=h.magnitudeSquared(h.subtract(a,o,Ns)),_=h.magnitudeSquared(h.subtract(c,r,Ns)),m=i,x=s,C=d;p>C&&(C=p,m=o,x=a),_>C&&(C=_,m=r,x=c);let A=B8;A.x=(m.x+x.x)*.5,A.y=(m.y+x.y)*.5,A.z=(m.z+x.z)*.5;let T=h.magnitudeSquared(h.subtract(x,A,Ns)),b=Math.sqrt(T),S=L8;S.x=i.x,S.y=o.y,S.z=r.z;let w=N8;w.x=s.x,w.y=a.y,w.z=c.z;let D=h.midpoint(S,w,F8),O=0;for(f=0;f<u;f++){h.clone(e[f],n);let I=h.magnitude(h.subtract(n,D,Ns));I>O&&(O=I);let L=h.magnitudeSquared(h.subtract(n,A,Ns));if(L>T){let N=Math.sqrt(L);b=(b+N)*.5,T=b*b;let g=N-b;A.x=(b*A.x+g*n.x)/N,A.y=(b*A.y+g*n.y)/N,A.z=(b*A.z+g*n.z)/N}}return b<O?(h.clone(A,t.center),t.radius=b):(h.clone(D,t.center),t.radius=O),t};var kTe=new Si,UTe=new h,zTe=new h,S8=new me,w8=new me;cn.fromRectangle2D=function(e,t,n){return cn.fromRectangleWithHeights2D(e,t,0,0,n)};cn.fromRectangleWithHeights2D=function(e,t,n,i,o){if(l(o)||(o=new cn),!l(e))return o.center=h.clone(h.ZERO,o.center),o.radius=0,o;t=y(t,kTe),de.southwest(e,S8),S8.height=n,de.northeast(e,w8),w8.height=i;let r=t.project(S8,UTe),s=t.project(w8,zTe),a=s.x-r.x,c=s.y-r.y,u=s.z-r.z;o.radius=Math.sqrt(a*a+c*c+u*u)*.5;let f=o.center;return f.x=r.x+a*.5,f.y=r.y+c*.5,f.z=r.z+u*.5,o};var HTe=[];cn.fromRectangle3D=function(e,t,n,i){if(t=y(t,re.WGS84),n=y(n,0),l(i)||(i=new cn),!l(e))return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;let o=de.subsample(e,t,n,HTe);return cn.fromPoints(o,i)};cn.fromVertices=function(e,t,n,i){if(l(i)||(i=new cn),!l(e)||e.length===0)return i.center=h.clone(h.ZERO,i.center),i.radius=0,i;t=y(t,h.ZERO),n=y(n,3);let o=M8;o.x=e[0]+t.x,o.y=e[1]+t.y,o.z=e[2]+t.z;let r=h.clone(o,v8),s=h.clone(o,D8),a=h.clone(o,P8),c=h.clone(o,I8),u=h.clone(o,O8),f=h.clone(o,R8),d=e.length,p;for(p=0;p<d;p+=n){let N=e[p]+t.x,g=e[p+1]+t.y,E=e[p+2]+t.z;o.x=N,o.y=g,o.z=E,N<r.x&&h.clone(o,r),N>c.x&&h.clone(o,c),g<s.y&&h.clone(o,s),g>u.y&&h.clone(o,u),E<a.z&&h.clone(o,a),E>f.z&&h.clone(o,f)}let _=h.magnitudeSquared(h.subtract(c,r,Ns)),m=h.magnitudeSquared(h.subtract(u,s,Ns)),x=h.magnitudeSquared(h.subtract(f,a,Ns)),C=r,A=c,T=_;m>T&&(T=m,C=s,A=u),x>T&&(T=x,C=a,A=f);let b=B8;b.x=(C.x+A.x)*.5,b.y=(C.y+A.y)*.5,b.z=(C.z+A.z)*.5;let S=h.magnitudeSquared(h.subtract(A,b,Ns)),w=Math.sqrt(S),D=L8;D.x=r.x,D.y=s.y,D.z=a.z;let O=N8;O.x=c.x,O.y=u.y,O.z=f.z;let I=h.midpoint(D,O,F8),L=0;for(p=0;p<d;p+=n){o.x=e[p]+t.x,o.y=e[p+1]+t.y,o.z=e[p+2]+t.z;let N=h.magnitude(h.subtract(o,I,Ns));N>L&&(L=N);let g=h.magnitudeSquared(h.subtract(o,b,Ns));if(g>S){let E=Math.sqrt(g);w=(w+E)*.5,S=w*w;let v=E-w;b.x=(w*b.x+v*o.x)/E,b.y=(w*b.y+v*o.y)/E,b.z=(w*b.z+v*o.z)/E}}return w<L?(h.clone(b,i.center),i.radius=w):(h.clone(I,i.center),i.radius=L),i};cn.fromEncodedCartesianVertices=function(e,t,n){if(l(n)||(n=new cn),!l(e)||!l(t)||e.length!==t.length||e.length===0)return n.center=h.clone(h.ZERO,n.center),n.radius=0,n;let i=M8;i.x=e[0]+t[0],i.y=e[1]+t[1],i.z=e[2]+t[2];let o=h.clone(i,v8),r=h.clone(i,D8),s=h.clone(i,P8),a=h.clone(i,I8),c=h.clone(i,O8),u=h.clone(i,R8),f=e.length,d;for(d=0;d<f;d+=3){let L=e[d]+t[d],N=e[d+1]+t[d+1],g=e[d+2]+t[d+2];i.x=L,i.y=N,i.z=g,L<o.x&&h.clone(i,o),L>a.x&&h.clone(i,a),N<r.y&&h.clone(i,r),N>c.y&&h.clone(i,c),g<s.z&&h.clone(i,s),g>u.z&&h.clone(i,u)}let p=h.magnitudeSquared(h.subtract(a,o,Ns)),_=h.magnitudeSquared(h.subtract(c,r,Ns)),m=h.magnitudeSquared(h.subtract(u,s,Ns)),x=o,C=a,A=p;_>A&&(A=_,x=r,C=c),m>A&&(A=m,x=s,C=u);let T=B8;T.x=(x.x+C.x)*.5,T.y=(x.y+C.y)*.5,T.z=(x.z+C.z)*.5;let b=h.magnitudeSquared(h.subtract(C,T,Ns)),S=Math.sqrt(b),w=L8;w.x=o.x,w.y=r.y,w.z=s.z;let D=N8;D.x=a.x,D.y=c.y,D.z=u.z;let O=h.midpoint(w,D,F8),I=0;for(d=0;d<f;d+=3){i.x=e[d]+t[d],i.y=e[d+1]+t[d+1],i.z=e[d+2]+t[d+2];let L=h.magnitude(h.subtract(i,O,Ns));L>I&&(I=L);let N=h.magnitudeSquared(h.subtract(i,T,Ns));if(N>b){let g=Math.sqrt(N);S=(S+g)*.5,b=S*S;let E=g-S;T.x=(S*T.x+E*i.x)/g,T.y=(S*T.y+E*i.y)/g,T.z=(S*T.z+E*i.z)/g}}return S<I?(h.clone(T,n.center),n.radius=S):(h.clone(O,n.center),n.radius=I),n};cn.fromCornerPoints=function(e,t,n){l(n)||(n=new cn);let i=h.midpoint(e,t,n.center);return n.radius=h.distance(i,t),n};cn.fromEllipsoid=function(e,t){return l(t)||(t=new cn),h.clone(h.ZERO,t.center),t.radius=e.maximumRadius,t};var GTe=new h;cn.fromBoundingSpheres=function(e,t){if(l(t)||(t=new cn),!l(e)||e.length===0)return t.center=h.clone(h.ZERO,t.center),t.radius=0,t;let n=e.length;if(n===1)return cn.clone(e[0],t);if(n===2)return cn.union(e[0],e[1],t);let i=[],o;for(o=0;o<n;o++)i.push(e[o].center);t=cn.fromPoints(i,t);let r=t.center,s=t.radius;for(o=0;o<n;o++){let a=e[o];s=Math.max(s,h.distance(r,a.center,GTe)+a.radius)}return t.radius=s,t};var WTe=new h,jTe=new h,qTe=new h;cn.fromOrientedBoundingBox=function(e,t){l(t)||(t=new cn);let n=e.halfAxes,i=Q.getColumn(n,0,WTe),o=Q.getColumn(n,1,jTe),r=Q.getColumn(n,2,qTe);return h.add(i,o,i),h.add(i,r,i),t.center=h.clone(e.center,t.center),t.radius=h.magnitude(i),t};var YTe=new h,XTe=new h;cn.fromTransformation=function(e,t){l(t)||(t=new cn);let n=B.getTranslation(e,YTe),i=B.getScale(e,XTe),o=.5*h.magnitude(i);return t.center=h.clone(n,t.center),t.radius=o,t};cn.clone=function(e,t){if(!!l(e))return l(t)?(t.center=h.clone(e.center,t.center),t.radius=e.radius,t):new cn(e.center,e.radius)};cn.packedLength=4;cn.pack=function(e,t,n){n=y(n,0);let i=e.center;return t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n]=e.radius,t};cn.unpack=function(e,t,n){t=y(t,0),l(n)||(n=new cn);let i=n.center;return i.x=e[t++],i.y=e[t++],i.z=e[t++],n.radius=e[t],n};var KTe=new h,$Te=new h;cn.union=function(e,t,n){l(n)||(n=new cn);let i=e.center,o=e.radius,r=t.center,s=t.radius,a=h.subtract(r,i,KTe),c=h.magnitude(a);if(o>=c+s)return e.clone(n),n;if(s>=c+o)return t.clone(n),n;let u=(o+c+s)*.5,f=h.multiplyByScalar(a,(-o+u)/c,$Te);return h.add(f,i,f),h.clone(f,n.center),n.radius=u,n};var ZTe=new h;cn.expand=function(e,t,n){n=cn.clone(e,n);let i=h.magnitude(h.subtract(t,n.center,ZTe));return i>n.radius&&(n.radius=i),n};cn.intersectPlane=function(e,t){let n=e.center,i=e.radius,o=t.normal,r=h.dot(o,n)+t.distance;return r<-i?Zt.OUTSIDE:r<i?Zt.INTERSECTING:Zt.INSIDE};cn.transform=function(e,t,n){return l(n)||(n=new cn),n.center=B.multiplyByPoint(t,e.center,n.center),n.radius=B.getMaximumScale(t)*e.radius,n};var JTe=new h;cn.distanceSquaredTo=function(e,t){let n=h.subtract(e.center,t,JTe),i=h.magnitude(n)-e.radius;return i<=0?0:i*i};cn.transformWithoutScale=function(e,t,n){return l(n)||(n=new cn),n.center=B.multiplyByPoint(t,e.center,n.center),n.radius=e.radius,n};var QTe=new h;cn.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Jc);let o=h.subtract(e.center,t,QTe),r=h.dot(n,o);return i.start=r-e.radius,i.stop=r+e.radius,i};var KX=new h,ebe=new h,tbe=new h,nbe=new h,ibe=new h,obe=new me,$X=new Array(8);for(let e=0;e<8;++e)$X[e]=new h;var rbe=new Si;cn.projectTo2D=function(e,t,n){t=y(t,rbe);let i=t.ellipsoid,o=e.center,r=e.radius,s;h.equals(o,h.ZERO)?s=h.clone(h.UNIT_X,KX):s=i.geodeticSurfaceNormal(o,KX);let a=h.cross(h.UNIT_Z,s,ebe);h.normalize(a,a);let c=h.cross(s,a,tbe);h.normalize(c,c),h.multiplyByScalar(s,r,s),h.multiplyByScalar(c,r,c),h.multiplyByScalar(a,r,a);let u=h.negate(c,ibe),f=h.negate(a,nbe),d=$X,p=d[0];h.add(s,c,p),h.add(p,a,p),p=d[1],h.add(s,c,p),h.add(p,f,p),p=d[2],h.add(s,u,p),h.add(p,f,p),p=d[3],h.add(s,u,p),h.add(p,a,p),h.negate(s,s),p=d[4],h.add(s,c,p),h.add(p,a,p),p=d[5],h.add(s,c,p),h.add(p,f,p),p=d[6],h.add(s,u,p),h.add(p,f,p),p=d[7],h.add(s,u,p),h.add(p,a,p);let _=d.length;for(let A=0;A<_;++A){let T=d[A];h.add(o,T,T);let b=i.cartesianToCartographic(T,obe);t.project(b,T)}n=cn.fromPoints(d,n),o=n.center;let m=o.x,x=o.y,C=o.z;return o.x=C,o.y=m,o.z=x,n};cn.isOccluded=function(e,t){return!t.isBoundingSphereVisible(e)};cn.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&e.radius===t.radius};cn.prototype.intersectPlane=function(e){return cn.intersectPlane(this,e)};cn.prototype.distanceSquaredTo=function(e){return cn.distanceSquaredTo(this,e)};cn.prototype.computePlaneDistances=function(e,t,n){return cn.computePlaneDistances(this,e,t,n)};cn.prototype.isOccluded=function(e){return cn.isOccluded(this,e)};cn.prototype.equals=function(e){return cn.equals(this,e)};cn.prototype.clone=function(e){return cn.clone(this,e)};cn.prototype.volume=function(){let e=this.radius;return VTe*e*e*e};var oe=cn;var ei=Zc(iK());function V8(e,t){let n;return typeof document<"u"&&(n=document),V8._implementation(e,t,n)}V8._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=y(n.baseURI,n.location.href)}let i=new ei.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var qf=V8;function oK(e,t){if(e===null||typeof e!="object")return e;t=y(t,!1);let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=oK(o,t)),n[i]=o}return n}var Qe=oK;function rK(e,t,n){n=y(n,!1);let i={},o=l(e),r=l(t),s,a,c;if(o)for(s in e)e.hasOwnProperty(s)&&(a=e[s],r&&n&&typeof a=="object"&&t.hasOwnProperty(s)?(c=t[s],typeof c=="object"?i[s]=rK(a,c,n):i[s]=a):i[s]=a);if(r)for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(c=t[s],i[s]=c);return i}var at=rK;function sbe(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var Qr=sbe;function abe(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new ei.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var bP=abe;function cbe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),i=n.lastIndexOf("."),i===-1?n="":n=n.substr(i+1),n}var jC=cbe;var sK={};function lbe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=sK[t];l(i)||(i={},sK[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d"),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var ch=lbe;var ube=/^blob:/i;function fbe(e){return ube.test(e)}var qC=fbe;var lh;function dbe(e){l(lh)||(lh=document.createElement("a")),lh.href=window.location.href;let t=lh.host,n=lh.protocol;return lh.href=e,lh.href=lh.href,n!==lh.protocol||t!==lh.host}var YC=dbe;var hbe=/^data:/i;function mbe(e){return hbe.test(e)}var __=mbe;function pbe(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,i)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let o=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,o.removeChild(t),n()},t.onerror=function(r){i(r)},o.appendChild(t)})}var XC=pbe;function _be(e){let t="";for(let n in e)if(e.hasOwnProperty(n)){let i=e[n],o=`${encodeURIComponent(n)}=`;if(Array.isArray(i))for(let r=0,s=i.length;r<s;++r)t+=`${o+encodeURIComponent(i[r])}&`;else t+=`${o+encodeURIComponent(i)}&`}return t=t.slice(0,-1),t}var KC=_be;function gbe(e){let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=n.length;i<o;++i){let r=n[i].split("="),s=decodeURIComponent(r[0]),a=r[1];l(a)?a=decodeURIComponent(a):a="";let c=t[s];typeof c=="string"?t[s]=[c,a]:Array.isArray(c)?c.push(a):t[s]=a}return t}var Mu=gbe;var ybe={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},ui=Object.freeze(ybe);var xbe={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},or=Object.freeze(xbe);function EP(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.throttleByServer,!1),n=y(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=y(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=y(e.type,or.OTHER),this.serverKey=void 0,this.state=ui.UNISSUED,this.deferred=void 0,this.cancelled=!1}EP.prototype.cancel=function(){this.cancelled=!0};EP.prototype.clone=function(e){return l(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new EP(this)};var rr=EP;function Cbe(e){let t={};if(!e)return t;let n=e.split(`\r
|
|
94
|
+
`);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var SP=Cbe;function aK(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=SP(this.responseHeaders))}aK.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var Lm=aK;function aS(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(aS.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});aS.prototype.addEventListener=function(e,t){this._listeners.push(e),this._scopes.push(t);let n=this;return function(){n.removeEventListener(e,t)}};aS.prototype.removeEventListener=function(e,t){let n=this._listeners,i=this._scopes,o=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&i[r]===t){o=r;break}return o!==-1?(this._insideRaiseEvent?(this._toRemove.push(o),n[o]=void 0,i[o]=void 0):(n.splice(o,1),i.splice(o,1)),!0):!1};function Abe(e,t){return t-e}aS.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,t=this._listeners,n=this._scopes,i=t.length;for(e=0;e<i;e++){let r=t[e];l(r)&&t[e].apply(n[e],arguments)}let o=this._toRemove;if(i=o.length,i>0){for(o.sort(Abe),e=0;e<i;e++){let r=o[e];t.splice(r,1),n.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};var _e=aS;function ty(e){this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(ty.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){let t=this._length;if(e<t){let n=this._array;for(let i=e;i<t;++i)n[i]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function k8(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}ty.prototype.reserve=function(e){e=y(e,this._length),this._array.length=e};ty.prototype.heapify=function(e){e=y(e,0);let t=this._length,n=this._comparator,i=this._array,o=-1,r=!0;for(;r;){let s=2*(e+1),a=s-1;a<t&&n(i[a],i[e])<0?o=a:o=e,s<t&&n(i[s],i[o])<0&&(o=s),o!==e?(k8(i,o,e),e=o):r=!1}};ty.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};ty.prototype.insert=function(e){let t=this._array,n=this._comparator,i=this._maximumLength,o=this._length++;for(o<t.length?t[o]=e:t.push(e);o!==0;){let s=Math.floor((o-1)/2);if(n(t[o],t[s])<0)k8(t,o,s),o=s;else break}let r;return l(i)&&this._length>i&&(r=t[i],this._length=i),r};ty.prototype.pop=function(e){if(e=y(e,0),this._length===0)return;let t=this._array,n=t[e];return k8(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var wP=ty;function Tbe(e,t){return e.priority-t.priority}var Yi={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},$C=20,Ba=new wP({comparator:Tbe});Ba.maximumLength=$C;Ba.reserve($C);var uh=[],Nm={},bbe=typeof document<"u"?new ei.default(document.location.href):new ei.default,vP=new _e;function qo(){}qo.maximumRequests=50;qo.maximumRequestsPerServer=6;qo.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18};qo.throttleRequests=!0;qo.debugShowStatistics=!1;qo.requestCompletedEvent=vP;Object.defineProperties(qo,{statistics:{get:function(){return Yi}},priorityHeapLength:{get:function(){return $C},set:function(e){if(e<$C)for(;Ba.length>e;){let t=Ba.pop();ny(t)}$C=e,Ba.maximumLength=e,Ba.reserve(e)}}});function cK(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}qo.serverHasOpenSlots=function(e,t){t=y(t,1);let n=y(qo.requestsByServer[e],qo.maximumRequestsPerServer);return Nm[e]+t<=n};qo.heapHasOpenSlots=function(e){return Ba.length+e<=$C};function lK(e){return e.state===ui.UNISSUED&&(e.state=ui.ISSUED,e.deferred=Qr()),e.deferred.promise}function Ebe(e){return function(t){if(e.state===ui.CANCELLED)return;let n=e.deferred;--Yi.numberOfActiveRequests,--Nm[e.serverKey],vP.raiseEvent(),e.state=ui.RECEIVED,e.deferred=void 0,n.resolve(t)}}function Sbe(e){return function(t){e.state!==ui.CANCELLED&&(++Yi.numberOfFailedRequests,--Yi.numberOfActiveRequests,--Nm[e.serverKey],vP.raiseEvent(t),e.state=ui.FAILED,e.deferred.reject(t))}}function uK(e){let t=lK(e);return e.state=ui.ACTIVE,uh.push(e),++Yi.numberOfActiveRequests,++Yi.numberOfActiveRequestsEver,++Nm[e.serverKey],e.requestFunction().then(Ebe(e)).catch(Sbe(e)),t}function ny(e){let t=e.state===ui.ACTIVE;if(e.state=ui.CANCELLED,++Yi.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--Yi.numberOfActiveRequests,--Nm[e.serverKey],++Yi.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}qo.update=function(){let e,t,n=0,i=uh.length;for(e=0;e<i;++e){if(t=uh[e],t.cancelled&&ny(t),t.state!==ui.ACTIVE){++n;continue}n>0&&(uh[e-n]=t)}uh.length-=n;let o=Ba.internalArray,r=Ba.length;for(e=0;e<r;++e)cK(o[e]);Ba.resort();let s=Math.max(qo.maximumRequests-uh.length,0),a=0;for(;a<s&&Ba.length>0;){if(t=Ba.pop(),t.cancelled){ny(t);continue}if(t.throttleByServer&&!qo.serverHasOpenSlots(t.serverKey)){ny(t);continue}uK(t),++a}wbe()};qo.getServerKey=function(e){let t=new ei.default(e);t.scheme()===""&&(t=new ei.default(e).absoluteTo(bbe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=Nm[n];return l(i)||(Nm[n]=0),n};qo.request=function(e){if(__(e.url)||qC(e.url))return vP.raiseEvent(),e.state=ui.RECEIVED,e.requestFunction();if(++Yi.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=qo.getServerKey(e.url)),qo.throttleRequests&&e.throttleByServer&&!qo.serverHasOpenSlots(e.serverKey))return;if(!qo.throttleRequests||!e.throttle)return uK(e);if(uh.length>=qo.maximumRequests)return;cK(e);let t=Ba.insert(e);if(l(t)){if(t===e)return;ny(t)}return lK(e)};function wbe(){!qo.debugShowStatistics||(Yi.numberOfActiveRequests===0&&Yi.lastNumberOfActiveRequests>0&&(Yi.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${Yi.numberOfAttemptedRequests}`),Yi.numberOfAttemptedRequests=0),Yi.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${Yi.numberOfCancelledRequests}`),Yi.numberOfCancelledRequests=0),Yi.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${Yi.numberOfCancelledActiveRequests}`),Yi.numberOfCancelledActiveRequests=0),Yi.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${Yi.numberOfFailedRequests}`),Yi.numberOfFailedRequests=0)),Yi.lastNumberOfActiveRequests=Yi.numberOfActiveRequests)}qo.clearForSpecs=function(){for(;Ba.length>0;){let t=Ba.pop();ny(t)}let e=uh.length;for(let t=0;t<e;++t)ny(uh[t]);uh.length=0,Nm={},Yi.numberOfAttemptedRequests=0,Yi.numberOfActiveRequests=0,Yi.numberOfCancelledRequests=0,Yi.numberOfCancelledActiveRequests=0,Yi.numberOfFailedRequests=0,Yi.numberOfActiveRequestsEver=0,Yi.lastNumberOfActiveRequests=0};qo.numberOfActiveRequestsByServer=function(e){return Nm[e]};qo.requestHeap=Ba;var fc=qo;var cS={},ZC={};cS.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(ZC[n])||(ZC[n]=!0)};cS.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(ZC[n])&&delete ZC[n]};function vbe(e){let t=new ei.default(e);t.normalize();let n=t.authority();if(n.length!==0){if(t.authority(n),n.indexOf("@")!==-1&&(n=n.split("@")[1]),n.indexOf(":")===-1){let i=t.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")n+=":80";else if(i==="https")n+=":443";else return}return n}}cS.contains=function(e){let t=vbe(e);return!!(l(t)&&l(ZC[t]))};cS.clear=function(){ZC={}};var lS=cS;var hK=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function z8(e,t,n,i){let o=e.query();if(o.length===0)return{};let r;if(o.indexOf("=")===-1){let s={};s[o]=void 0,r=s}else r=Mu(o);n?t._queryParameters=PP(r,t._queryParameters,i):t._queryParameters=r,e.search("")}function Dbe(e,t){let n=t._queryParameters,i=Object.keys(n);i.length===1&&!l(n[i[0]])?e.search(i[0]):e.search(KC(n))}function fh(e,t){return l(e)?l(e.clone)?e.clone():Qe(e):t}function H8(e){if(e.state===ui.ISSUED||e.state===ui.ACTIVE)throw new fe("The Resource is already being fetched.");e.state=ui.UNISSUED,e.deferred=void 0}function PP(e,t,n){if(!n)return at(e,t);let i=Qe(e,!0);for(let o in t)if(t.hasOwnProperty(o)){let r=i[o],s=t[o];l(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(s)):i[o]=Array.isArray(s)?s.slice():s}return i}function Ct(e){e=y(e,y.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=fh(e.templateValues,{}),this._queryParameters=fh(e.queryParameters,{}),this.headers=fh(e.headers,{}),this.request=y(e.request,new rr),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=y(e.retryAttempts,0),this._retryCount=0;let t=new ei.default(e.url);z8(t,this,!0,!0),t.fragment(""),this._url=t.toString()}Ct.createIfNeeded=function(e){return e instanceof Ct?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Ct({url:e})};var JC;Ct.supportsImageBitmapOptions=function(){if(l(JC))return JC;if(typeof createImageBitmap!="function")return JC=Promise.resolve(!1),JC;let e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC";return JC=Ct.fetchBlob({url:e}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=ch(t[0]),i=ch(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),JC};Object.defineProperties(Ct,{isBlobSupported:{get:function(){return hK}}});Object.defineProperties(Ct.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){let t=new ei.default(e);z8(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){return jC(this._url)}},isDataUri:{get:function(){return __(this._url)}},isBlobUri:{get:function(){return qC(this._url)}},isCrossOriginUrl:{get:function(){return YC(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}});Ct.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Ct.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=new ei.default(this._url);e&&Dbe(n,this);let i=n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),o=this._templateValues;return i=i.replace(/{(.*?)}/g,function(r,s){let a=o[s];return l(a)?encodeURIComponent(a):r}),t&&l(this.proxy)&&(i=this.proxy.getURL(i)),i};Ct.prototype.setQueryParameters=function(e,t){t?this._queryParameters=PP(this._queryParameters,e,!1):this._queryParameters=PP(e,this._queryParameters,!1)};Ct.prototype.appendQueryParameters=function(e){this._queryParameters=PP(e,this._queryParameters,!0)};Ct.prototype.setTemplateValues=function(e,t){t?this._templateValues=at(this._templateValues,e):this._templateValues=at(e,this._templateValues)};Ct.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,l(e.url)){let n=new ei.default(e.url),i=y(e.preserveQueryParameters,!1);z8(n,t,!0,i),n.fragment(""),n.scheme()!==""?t._url=n.toString():t._url=n.absoluteTo(new ei.default(qf(this._url))).toString()}return l(e.queryParameters)&&(t._queryParameters=at(e.queryParameters,t._queryParameters)),l(e.templateValues)&&(t._templateValues=at(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=at(e.headers,t.headers)),l(e.proxy)&&(t.proxy=e.proxy),l(e.request)&&(t.request=e.request),l(e.retryCallback)&&(t.retryCallback=e.retryCallback),l(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};Ct.prototype.retryOnError=function(e){let t=this.retryCallback;if(typeof t!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);let n=this;return Promise.resolve(t(this,e)).then(function(i){return++n._retryCount,i})};Ct.prototype.clone=function(e){return l(e)||(e=new Ct({url:this._url})),e._url=this._url,e._queryParameters=Qe(this._queryParameters),e._templateValues=Qe(this._templateValues),e.headers=Qe(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e};Ct.prototype.getBaseUri=function(e){return bP(this.getUrlComponent(e),e)};Ct.prototype.appendForwardSlash=function(){this._url=hP(this._url)};Ct.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Ct.fetchArrayBuffer=function(e){return new Ct(e).fetchArrayBuffer()};Ct.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Ct.fetchBlob=function(e){return new Ct(e).fetchBlob()};Ct.prototype.fetchImage=function(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.preferImageBitmap,!1),n=y(e.preferBlob,!1),i=y(e.flipY,!1),o=y(e.skipColorSpaceConversion,!1);if(H8(this.request),!hK||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return U8({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:t});let r=this.fetchBlob();if(!l(r))return;let s,a,c,u;return Ct.supportsImageBitmapOptions().then(function(f){return s=f,a=s&&t,r}).then(function(f){if(!l(f))return;if(u=f,a)return Ct.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let d=window.URL.createObjectURL(f);return c=new Ct({url:d}),U8({resource:c,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(f){if(!!l(f))return f.blob=u,a||window.URL.revokeObjectURL(c.url),f}).catch(function(f){return l(c)&&window.URL.revokeObjectURL(c.url),f.blob=u,Promise.reject(f)})};function U8(e){let t=e.resource,n=e.flipY,i=e.skipColorSpaceConversion,o=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let a=!1;!t.isDataUri&&!t.isBlobUri&&(a=t.isCrossOriginUrl);let c=Qr();return Ct._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=fc.request(r);if(!!l(s))return s.catch(function(a){return r.state!==ui.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=ui.UNISSUED,r.deferred=void 0,U8({resource:t,flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})}Ct.fetchImage=function(e){return new Ct(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Ct.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Ct.fetchText=function(e){return new Ct(e).fetchText()};Ct.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(!!l(e))return e.then(function(t){if(!!l(t))return JSON.parse(t)})};Ct.fetchJson=function(e){return new Ct(e).fetchJson()};Ct.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Ct.fetchXML=function(e){return new Ct(e).fetchXML()};Ct.prototype.fetchJsonp=function(e){e=y(e,"callback"),H8(this.request);let t;do t=`loadJsonp${R.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return mK(this,e,t)};function mK(e,t,n){let i={};i[t]=n,e.setQueryParameters(i);let o=e.request;o.url=e.url,o.requestFunction=function(){let s=Qr();return window[n]=function(a){s.resolve(a);try{delete window[n]}catch{window[n]=void 0}},Ct._Implementations.loadAndExecuteScript(e.url,n,s),s.promise};let r=fc.request(o);if(!!l(r))return r.catch(function(s){return o.state!==ui.FAILED?Promise.reject(s):e.retryOnError(s).then(function(a){return a?(o.state=ui.UNISSUED,o.deferred=void 0,mK(e,t,n)):Promise.reject(s)})})}Ct.fetchJsonp=function(e){return new Ct(e).fetchJsonp(e.callbackParameterName)};Ct.prototype._makeRequest=function(e){let t=this;H8(t.request);let n=t.request;n.url=t.url,n.requestFunction=function(){let o=e.responseType,r=at(e.headers,t.headers),s=e.overrideMimeType,a=e.method,c=e.data,u=Qr(),f=Ct._Implementations.loadWithXhr(t.url,o,a,c,r,u,s);return l(f)&&l(f.abort)&&(n.cancelFunction=function(){f.abort()}),u.promise};let i=fc.request(n);if(!!l(i))return i.then(function(o){return n.cancelFunction=void 0,o}).catch(function(o){return n.cancelFunction=void 0,n.state!==ui.FAILED?Promise.reject(o):t.retryOnError(o).then(function(r){return r?(n.state=ui.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(o)})})};var Pbe=/^data:(.*?)(;base64)?,(.*)$/;function DP(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function fK(e,t){let n=DP(e,t),i=new ArrayBuffer(n.length),o=new Uint8Array(i);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return i}function Ibe(e,t){t=y(t,"");let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return DP(i,o);case"arraybuffer":return fK(i,o);case"blob":return r=fK(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(DP(i,o),n);case"json":return JSON.parse(DP(i,o));default:}}Ct.prototype.fetch=function(e){return e=fh(e,{}),e.method="GET",this._makeRequest(e)};Ct.fetch=function(e){return new Ct(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.delete=function(e){return e=fh(e,{}),e.method="DELETE",this._makeRequest(e)};Ct.delete=function(e){return new Ct(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Ct.prototype.head=function(e){return e=fh(e,{}),e.method="HEAD",this._makeRequest(e)};Ct.head=function(e){return new Ct(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.options=function(e){return e=fh(e,{}),e.method="OPTIONS",this._makeRequest(e)};Ct.options=function(e){return new Ct(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.post=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Ct.post=function(e){return new Ct(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.put=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Ct.put=function(e){return new Ct(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct.prototype.patch=function(e,t){return Nl.defined("data",e),t=fh(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Ct.patch=function(e){return new Ct(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Ct._Implementations={};Ct._Implementations.loadImageElement=function(e,t,n){let i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),n.resolve(i)},i.onerror=function(o){n.reject(o)},t&&(lS.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Ct._Implementations.createImage=function(e,t,n,i,o,r){let s=e.url;Ct.supportsImageBitmapOptions().then(function(a){if(!(a&&r)){Ct._Implementations.loadImageElement(s,t,n);return}let c="blob",u="GET",f=Qr(),d=Ct._Implementations.loadWithXhr(s,c,u,void 0,void 0,f,void 0,void 0,void 0);return l(d)&&l(d.abort)&&(e.cancelFunction=function(){d.abort()}),f.promise.then(function(p){if(!l(p)){n.reject(new fe(`Successfully retrieved ${s} but it contained no content.`));return}return Ct.createImageBitmapFromBlob(p,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(p){n.resolve(p)})}).catch(function(a){n.reject(a)})};Ct.createImageBitmapFromBlob=function(e,t){return Nl.defined("options",t),Nl.typeOf.bool("options.flipY",t.flipY),Nl.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),Nl.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function dK(e,t){switch(t){case"text":return e.toString("utf8");case"json":return JSON.parse(e.toString("utf8"));default:return new Uint8Array(e).buffer}}function Obe(e,t,n,i,o,r,s){let a=p_("url").parse(e),c=a.protocol==="https:"?p_("https"):p_("http"),u=p_("zlib"),f={protocol:a.protocol,hostname:a.hostname,port:a.port,path:a.path,query:a.query,method:n,headers:o};c.request(f).on("response",function(d){if(d.statusCode<200||d.statusCode>=300){r.reject(new Lm(d.statusCode,d,d.headers));return}let p=[];d.on("data",function(_){p.push(_)}),d.on("end",function(){let _=Buffer.concat(p);d.headers["content-encoding"]==="gzip"?u.gunzip(_,function(m,x){m?r.reject(new fe("Error decompressing response.")):r.resolve(dK(x,t))}):r.resolve(dK(_,t))})}).on("error",function(d){r.reject(new Lm)}).end()}var Rbe=typeof XMLHttpRequest>"u";Ct._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=Pbe.exec(e);if(a!==null){r.resolve(Ibe(a,t));return}if(Rbe){Obe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(lS.contains(e)&&(c.withCredentials=!0),c.open(n,e,!0),l(s)&&l(c.overrideMimeType)&&c.overrideMimeType(s),l(o))for(let f in o)o.hasOwnProperty(f)&&c.setRequestHeader(f,o[f]);l(t)&&(c.responseType=t);let u=!1;return typeof e=="string"&&(u=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),c.onload=function(){if((c.status<200||c.status>=300)&&!(u&&c.status===0)){r.reject(new Lm(c.status,c.response,c.getAllResponseHeaders()));return}let f=c.response,d=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let _=c.getAllResponseHeaders().trim().split(/[\r\n]+/),m={};_.forEach(function(x){let C=x.split(": "),A=C.shift();m[A]=C.join(": ")}),r.resolve(m);return}if(c.status===204)r.resolve();else if(l(f)&&(!l(t)||d===t))r.resolve(f);else if(t==="json"&&typeof f=="string")try{r.resolve(JSON.parse(f))}catch(p){r.reject(p)}else(d===""||d==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(d===""||d==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new fe("Invalid XMLHttpRequest response type."))},c.onerror=function(f){r.reject(new Lm)},c.send(i),c};Ct._Implementations.loadAndExecuteScript=function(e,t,n){return XC(e,t).catch(function(i){n.reject(i)})};Ct._DefaultImplementations={};Ct._DefaultImplementations.createImage=Ct._Implementations.createImage;Ct._DefaultImplementations.loadWithXhr=Ct._Implementations.loadWithXhr;Ct._DefaultImplementations.loadAndExecuteScript=Ct._Implementations.loadAndExecuteScript;Ct.DEFAULT=Object.freeze(new Ct({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var De=Ct;var pK=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function Mbe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=pK.exec(i);if(o!==null)return o[1]}}var QC;function _K(e){return typeof document>"u"?e:(l(QC)||(QC=document.createElement("a")),QC.href=e,QC.href=QC.href,QC.href)}var iy;function gK(){if(l(iy))return iy;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(p_.toUrl)?e=qf("..",oy("Core/buildModuleUrl.js")):e=Mbe(),iy=new De({url:_K(e)}),iy.appendForwardSlash(),iy}function Bbe(e){return _K(p_.toUrl(`../${e}`))}function yK(e){return gK().getDerivedResource({url:e}).url}var IP;function oy(e){return l(IP)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(p_.toUrl)?IP=Bbe:IP=yK),IP(e)}oy._cesiumScriptRegex=pK;oy._buildModuleUrlFromBaseUrl=yK;oy._clearBaseResource=function(){iy=void 0};oy.setBaseUrl=function(e){iy=De.DEFAULT.getDerivedResource({url:e})};oy.getCesiumBaseUrl=gK;var Jt=oy;function bt(e,t){this.x=y(e,0),this.y=y(t,0)}bt.fromElements=function(e,t,n){return l(n)?(n.x=e,n.y=t,n):new bt(e,t)};bt.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t):new bt(e.x,e.y)};bt.fromCartesian3=bt.clone;bt.fromCartesian4=bt.clone;bt.packedLength=2;bt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n]=e.y,t};bt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new bt),n.x=e[t++],n.y=e[t],n};bt.packArray=function(e,t){let n=e.length,i=n*2;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)bt.pack(e[o],t,o*2);return t};bt.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/2:t=new Array(n/2);for(let i=0;i<n;i+=2){let o=i/2;t[o]=bt.unpack(e,i,t[o])}return t};bt.fromArray=bt.unpack;bt.maximumComponent=function(e){return Math.max(e.x,e.y)};bt.minimumComponent=function(e){return Math.min(e.x,e.y)};bt.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n};bt.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n};bt.clamp=function(e,t,n,i){let o=R.clamp(e.x,t.x,n.x),r=R.clamp(e.y,t.y,n.y);return i.x=o,i.y=r,i};bt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y};bt.magnitude=function(e){return Math.sqrt(bt.magnitudeSquared(e))};var OP=new bt;bt.distance=function(e,t){return bt.subtract(e,t,OP),bt.magnitude(OP)};bt.distanceSquared=function(e,t){return bt.subtract(e,t,OP),bt.magnitudeSquared(OP)};bt.normalize=function(e,t){let n=bt.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t};bt.dot=function(e,t){return e.x*t.x+e.y*t.y};bt.cross=function(e,t){return e.x*t.y-e.y*t.x};bt.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n};bt.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n};bt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n};bt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n};bt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n};bt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n};bt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t};bt.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var xK=new bt;bt.lerp=function(e,t,n,i){return bt.multiplyByScalar(t,n,xK),i=bt.multiplyByScalar(e,1-n,i),bt.add(xK,i,i)};var CK=new bt,AK=new bt;bt.angleBetween=function(e,t){return bt.normalize(e,CK),bt.normalize(t,AK),R.acosClamped(bt.dot(CK,AK))};var Lbe=new bt;bt.mostOrthogonalAxis=function(e,t){let n=bt.normalize(e,Lbe);return bt.abs(n,n),n.x<=n.y?t=bt.clone(bt.UNIT_X,t):t=bt.clone(bt.UNIT_Y,t),t};bt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y};bt.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]};bt.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.x,t.x,n,i)&&R.equalsEpsilon(e.y,t.y,n,i)};bt.ZERO=Object.freeze(new bt(0,0));bt.ONE=Object.freeze(new bt(1,1));bt.UNIT_X=Object.freeze(new bt(1,0));bt.UNIT_Y=Object.freeze(new bt(0,1));bt.prototype.clone=function(e){return bt.clone(this,e)};bt.prototype.equals=function(e){return bt.equals(this,e)};bt.prototype.equalsEpsilon=function(e,t,n){return bt.equalsEpsilon(this,e,t,n)};bt.prototype.toString=function(){return`(${this.x}, ${this.y})`};var G=bt;function g_(e){e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._rectangle=y(e.rectangle,de.MAX_VALUE),this._projection=new Si(this._ellipsoid),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(g_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});g_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};g_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};g_.prototype.rectangleToNativeRectangle=function(e,t){let n=R.toDegrees(e.west),i=R.toDegrees(e.south),o=R.toDegrees(e.east),r=R.toDegrees(e.north);return l(t)?(t.west=n,t.south=i,t.east=o,t.north=r,t):new de(n,i,o,r)};g_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.tileXYToRectangle(e,t,n,i);return o.west=R.toDegrees(o.west),o.south=R.toDegrees(o.south),o.east=R.toDegrees(o.east),o.north=R.toDegrees(o.north),o};g_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this._rectangle,r=this.getNumberOfXTilesAtLevel(n),s=this.getNumberOfYTilesAtLevel(n),a=o.width/r,c=e*a+o.west,u=(e+1)*a+o.west,f=o.height/s,d=o.north-t*f,p=o.north-(t+1)*f;return l(i)||(i=new de(c,p,u,d)),i.west=c,i.south=p,i.east=u,i.north=d,i};g_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),s=i.width/o,a=i.height/r,c=e.longitude;i.east<i.west&&(c+=R.TWO_PI);let u=(c-i.west)/s|0;u>=o&&(u=o-1);let f=(i.north-e.latitude)/a|0;return f>=r&&(f=r-1),l(n)?(n.x=u,n.y=f,n):new G(u,f)};var Xi=g_;var TK=new h,bK=new h,EK=new me,G8=new h,Nbe=new h,SK=new oe,Fbe=new Xi,uS=[new me,new me,new me,new me],fS=new G,Ur={};Ur.initialize=function(){let e=Ur._initPromise;return l(e)||(e=De.fetchJson(Jt("Assets/approximateTerrainHeights.json")).then(function(t){Ur._terrainHeights=t}),Ur._initPromise=e),e};Ur.getMinimumMaximumHeights=function(e,t){t=y(t,re.WGS84);let n=wK(e),i=Ur._defaultMinTerrainHeight,o=Ur._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Ur._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(de.northeast(e,EK),TK),t.cartographicToCartesian(de.southwest(e,EK),bK),h.midpoint(bK,TK,G8);let a=t.scaleToGeodeticSurface(G8,Nbe);if(l(a)){let c=h.distance(G8,a);i=Math.min(i,-c)}else i=Ur._defaultMinTerrainHeight}return i=Math.max(Ur._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Ur.getBoundingSphere=function(e,t){t=y(t,re.WGS84);let n=wK(e),i=Ur._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Ur._terrainHeights[r];l(s)&&(i=s[1])}let o=oe.fromRectangle3D(e,t,0);return oe.fromRectangle3D(e,t,i,SK),oe.union(o,SK,o)};function wK(e){me.fromRadians(e.east,e.north,0,uS[0]),me.fromRadians(e.west,e.north,0,uS[1]),me.fromRadians(e.east,e.south,0,uS[2]),me.fromRadians(e.west,e.south,0,uS[3]);let t=0,n=0,i=0,o=0,r=Ur._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let u=uS[c];if(Fbe.positionToTileXY(u,s,fS),c===0)i=fS.x,o=fS.y;else if(i!==fS.x||o!==fS.y){a=!0;break}}if(a)break;t=i,n=o}if(s!==0)return{x:t,y:n,level:s>r?r:s-1}}Ur._terrainHeightsMaxLevel=6;Ur._defaultMaxTerrainHeight=9e3;Ur._defaultMinTerrainHeight=-1e5;Ur._terrainHeights=void 0;Ur._initPromise=void 0;Object.defineProperties(Ur,{initialized:{get:function(){return l(Ur._terrainHeights)}}});var ai=Ur;var dS=Zc(vK());var Vbe=0,q8={};function Fm(e,t){let n,i=e;l(q8[i])?n=q8[i]:(n=Vbe++,q8[i]=n),t=y(t,!1),this._id=n,this._html=e,this._showOnScreen=t,this._element=void 0}Object.defineProperties(Fm.prototype,{html:{get:function(){return this._html}},id:{get:function(){return this._id}},showOnScreen:{get:function(){return this._showOnScreen},set:function(e){this._showOnScreen=e}},element:{get:function(){if(!l(this._element)){let e=dS.default.sanitize(this._html),t=document.createElement("div");t._creditId=this._id,t.style.display="inline",t.innerHTML=e;let n=t.querySelectorAll("a");for(let i=0;i<n.length;i++)n[i].setAttribute("target","_blank");this._element=t}return this._element}}});Fm.equals=function(e,t){return e===t||l(e)&&l(t)&&e._id===t._id&&e._showOnScreen===t._showOnScreen};Fm.prototype.equals=function(e){return Fm.equals(this,e)};Fm.getIonCredit=function(e){let t=l(e.collapsible)&&!e.collapsible,n=new Fm(e.html,t);return n._isIon=n.html.indexOf("ion-credit.png")!==-1,n};Fm.clone=function(e){if(l(e))return new Fm(e.html,e.showOnScreen)};var Ht=Fm;var kbe={NONE:0,LERC:1},Vm=Object.freeze(kbe);function dc(e,t,n){this.minimum=h.clone(y(e,h.ZERO)),this.maximum=h.clone(y(t,h.ZERO)),l(n)?n=h.clone(n):n=h.midpoint(this.minimum,this.maximum,new h),this.center=n}dc.fromCorners=function(e,t,n){return l(n)||(n=new dc),n.minimum=h.clone(e,n.minimum),n.maximum=h.clone(t,n.maximum),n.center=h.midpoint(e,t,n.center),n};dc.fromPoints=function(e,t){if(l(t)||(t=new dc),!l(e)||e.length===0)return t.minimum=h.clone(h.ZERO,t.minimum),t.maximum=h.clone(h.ZERO,t.maximum),t.center=h.clone(h.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let d=1;d<c;d++){let p=e[d],_=p.x,m=p.y,x=p.z;n=Math.min(_,n),r=Math.max(_,r),i=Math.min(m,i),s=Math.max(m,s),o=Math.min(x,o),a=Math.max(x,a)}let u=t.minimum;u.x=n,u.y=i,u.z=o;let f=t.maximum;return f.x=r,f.y=s,f.z=a,t.center=h.midpoint(u,f,t.center),t};dc.clone=function(e,t){if(!!l(e))return l(t)?(t.minimum=h.clone(e.minimum,t.minimum),t.maximum=h.clone(e.maximum,t.maximum),t.center=h.clone(e.center,t.center),t):new dc(e.minimum,e.maximum,e.center)};dc.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&h.equals(e.minimum,t.minimum)&&h.equals(e.maximum,t.maximum)};var RP=new h;dc.intersectPlane=function(e,t){RP=h.subtract(e.maximum,e.minimum,RP);let n=h.multiplyByScalar(RP,.5,RP),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=h.dot(e.center,i)+t.distance;return r-o>0?Zt.INSIDE:r+o<0?Zt.OUTSIDE:Zt.INTERSECTING};dc.prototype.clone=function(e){return dc.clone(this,e)};dc.prototype.intersectPlane=function(e){return dc.intersectPlane(this,e)};dc.prototype.equals=function(e){return dc.equals(this,e)};var ry=dc;function dh(e,t){this._ellipsoid=e,this._cameraPosition=new h,this._cameraPositionInScaledSpace=new h,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(dh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=h.magnitudeSquared(n)-1;h.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var DK=new h;dh.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,DK);return X8(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};dh.prototype.isScaledSpacePointVisible=function(e){return X8(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var Ube=new h;dh.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=Ube,o.x=this._cameraPosition.x/(n.radii.x+t),o.y=this._cameraPosition.y/(n.radii.y+t),o.z=this._cameraPosition.z/(n.radii.z+t),i=o.x*o.x+o.y*o.y+o.z*o.z-1):(o=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),X8(e,o,i)};dh.prototype.computeHorizonCullingPoint=function(e,t,n){return OK(this._ellipsoid,e,t,n)};var PK=re.clone(re.UNIT_SPHERE);dh.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=IK(this._ellipsoid,n,PK);return OK(o,e,t,i)};dh.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return RK(this._ellipsoid,e,t,n,i,o)};dh.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=IK(this._ellipsoid,o,PK);return RK(s,e,t,n,i,r)};var zbe=[];dh.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=de.subsample(e,t,0,zbe),o=oe.fromPoints(i);if(!(h.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var Hbe=new h;function IK(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=h.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Hbe);e=re.fromCartesian3(i,n)}return e}function OK(e,t,n,i){l(i)||(i=new h);let o=LK(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],u=MK(e,c,o);if(u<0)return;r=Math.max(r,u)}return BK(o,r,i)}var MP=new h;function RK(e,t,n,i,o,r){l(r)||(r=new h),i=y(i,3),o=y(o,h.ZERO);let s=LK(e,t),a=0;for(let c=0,u=n.length;c<u;c+=i){MP.x=n[c]+o.x,MP.y=n[c+1]+o.y,MP.z=n[c+2]+o.z;let f=MK(e,MP,s);if(f<0)return;a=Math.max(a,f)}return BK(s,a,r)}function X8(e,t,n){let i=t,o=n,r=h.subtract(e,i,DK),s=-h.dot(r,i);return!(o<0?s>0:s>o&&s*s/h.magnitudeSquared(r)>o)}var Gbe=new h,Wbe=new h;function MK(e,t,n){let i=e.transformPositionToScaledSpace(t,Gbe),o=h.magnitudeSquared(i),r=Math.sqrt(o),s=h.divideByScalar(i,r,Wbe);o=Math.max(1,o),r=Math.max(1,r);let a=h.dot(s,n),c=h.magnitude(h.cross(s,n,s)),u=1/r,f=Math.sqrt(o-1)*u;return 1/(a*u-c*f)}function BK(e,t,n){if(!(t<=0||t===1/0||t!==t))return h.multiplyByScalar(e,t,n)}var Y8=new h;function LK(e,t){return h.equals(t,h.ZERO)?t:(e.transformPositionToScaledSpace(t,Y8),h.normalize(Y8,Y8))}var y_=dh;var K8={};K8.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function NK(e,t,n){let i=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}K8.computeRealRoots=function(e,t,n){let i;if(e===0)return t===0?[]:[-n/t];if(t===0){if(n===0)return[0,0];let c=Math.abs(n),u=Math.abs(e);if(c<u&&c/u<R.EPSILON14)return[0,0];if(c>u&&u/c<R.EPSILON14)return[];if(i=-n/e,i<0)return[];let f=Math.sqrt(i);return[-f,f]}else if(n===0)return i=-t/e,i<0?[i,0]:[0,i];let o=t*t,r=4*e*n,s=NK(o,-r,R.EPSILON14);if(s<0)return[];let a=-.5*NK(t,R.sign(t)*Math.sqrt(s),R.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Qc=K8;var Z8={};Z8.computeDiscriminant=function(e,t,n,i){let o=e*e,r=t*t,s=n*n,a=i*i;return 18*e*t*n*i+r*s-27*o*a-4*(e*s*n+r*t*i)};function $8(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,u=r*a,f=r*r,d=s*s,p=o*s-f,_=o*a-r*s,m=r*a-d,x=4*p*m-_*_,C,A;if(x<0){let Y,j,X;f*u>=c*d?(Y=o,j=p,X=-2*r*p+o*_):(Y=a,j=m,X=-a*_+2*s*m);let $=-(X<0?-1:1)*Math.abs(Y)*Math.sqrt(-x);A=-X+$;let J=A/2,ce=J<0?-Math.pow(-J,1/3):Math.pow(J,1/3),he=A===$?-ce:-j/ce;return C=j<=0?ce+he:-X/(ce*ce+he*he+j),f*u>=c*d?[(C-r)/o]:[-a/(C+s)]}let T=p,b=-2*r*p+o*_,S=m,w=-a*_+2*s*m,D=Math.sqrt(x),O=Math.sqrt(3)/2,I=Math.abs(Math.atan2(o*D,-b)/3);C=2*Math.sqrt(-T);let L=Math.cos(I);A=C*L;let N=C*(-L/2-O*Math.sin(I)),g=A+N>2*r?A-r:N-r,E=o,v=g/E;I=Math.abs(Math.atan2(a*D,-w)/3),C=2*Math.sqrt(-S),L=Math.cos(I),A=C*L,N=C*(-L/2-O*Math.sin(I));let P=-a,M=A+N<2*s?A+s:N+s,V=P/M,U=E*M,k=-g*M-E*P,H=g*P,F=(s*k-r*H)/(-r*k+s*U);return v<=F?v<=V?F<=V?[v,F,V]:[v,V,F]:[V,v,F]:v<=V?[F,v,V]:F<=V?[F,V,v]:[V,F,v]}Z8.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Qc.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=Qc.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return $8(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):$8(e,t,0,i);if(i===0)return o=Qc.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return $8(e,t,n,i)};var eA=Z8;var J8={};J8.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,u=n*n,f=u*n,d=i*i,p=d*i,_=o*o,m=_*o;return a*u*d-4*c*p-4*e*f*d+18*e*t*n*p-27*r*d*d+256*s*m+o*(18*c*n*i-4*a*f+16*e*u*u-80*e*t*u*i-6*e*a*d+144*r*n*d)+_*(144*e*a*n-27*a*a-128*r*u-192*r*t*i)};function Yf(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=eA.computeRealRoots(1,2*r,r*r-4*a,-s*s);if(c.length>0){let u=-e/4,f=c[c.length-1];if(Math.abs(f)<R.EPSILON14){let d=Qc.computeRealRoots(1,r,a);if(d.length===2){let p=d[0],_=d[1],m;if(p>=0&&_>=0){let x=Math.sqrt(p),C=Math.sqrt(_);return[u-C,u-x,u+x,u+C]}else{if(p>=0&&_<0)return m=Math.sqrt(p),[u-m,u+m];if(p<0&&_>=0)return m=Math.sqrt(_),[u-m,u+m]}}return[]}else if(f>0){let d=Math.sqrt(f),p=(r+f-s/d)/2,_=(r+f+s/d)/2,m=Qc.computeRealRoots(1,d,p),x=Qc.computeRealRoots(1,-d,_);return m.length!==0?(m[0]+=u,m[1]+=u,x.length!==0?(x[0]+=u,x[1]+=u,m[1]<=x[0]?[m[0],m[1],x[0],x[1]]:x[1]<=m[0]?[x[0],x[1],m[0],m[1]]:m[0]>=x[0]&&m[1]<=x[1]?[x[0],m[0],m[1],x[1]]:x[0]>=m[0]&&x[1]<=m[1]?[m[0],x[0],x[1],m[1]]:m[0]>x[0]&&m[0]<x[1]?[x[0],m[0],x[1],m[1]]:[m[0],x[0],m[1],x[1]]):m):x.length!==0?(x[0]+=u,x[1]+=u,x):[]}}return[]}function hS(e,t,n,i){let o=n*n,r=t*t,s=e*e,a=-2*t,c=n*e+r-4*i,u=s*i-n*t*e+o,f=eA.computeRealRoots(1,a,c,u);if(f.length>0){let d=f[0],p=t-d,_=p*p,m=e/2,x=p/2,C=_-4*i,A=_+4*Math.abs(i),T=s-4*d,b=s+4*Math.abs(d),S,w;if(d<0||C*b<T*A){let E=Math.sqrt(T);S=E/2,w=E===0?0:(e*x-n)/E}else{let E=Math.sqrt(C);S=E===0?0:(e*x-n)/E,w=E/2}let D,O;m===0&&S===0?(D=0,O=0):R.sign(m)===R.sign(S)?(D=m+S,O=d/D):(O=m-S,D=d/O);let I,L;x===0&&w===0?(I=0,L=0):R.sign(x)===R.sign(w)?(I=x+w,L=i/I):(L=x-w,I=i/L);let N=Qc.computeRealRoots(1,D,I),g=Qc.computeRealRoots(1,O,L);if(N.length!==0)return g.length!==0?N[1]<=g[0]?[N[0],N[1],g[0],g[1]]:g[1]<=N[0]?[g[0],g[1],N[0],N[1]]:N[0]>=g[0]&&N[1]<=g[1]?[g[0],N[0],N[1],g[1]]:g[0]>=N[0]&&g[1]<=N[1]?[N[0],g[0],g[1],N[1]]:N[0]>g[0]&&N[0]<g[1]?[g[0],N[0],g[1],N[1]]:[N[0],g[0],N[1],g[1]]:N;if(g.length!==0)return g}return[]}J8.computeRealRoots=function(e,t,n,i,o){if(Math.abs(e)<R.EPSILON15)return eA.computeRealRoots(t,n,i,o);let r=t/e,s=n/e,a=i/e,c=o/e,u=r<0?1:0;switch(u+=s<0?u+1:u,u+=a<0?u+1:u,u+=c<0?u+1:u,u){case 0:return Yf(r,s,a,c);case 1:return hS(r,s,a,c);case 2:return hS(r,s,a,c);case 3:return Yf(r,s,a,c);case 4:return Yf(r,s,a,c);case 5:return hS(r,s,a,c);case 6:return Yf(r,s,a,c);case 7:return Yf(r,s,a,c);case 8:return hS(r,s,a,c);case 9:return Yf(r,s,a,c);case 10:return Yf(r,s,a,c);case 11:return hS(r,s,a,c);case 12:return Yf(r,s,a,c);case 13:return Yf(r,s,a,c);case 14:return Yf(r,s,a,c);case 15:return Yf(r,s,a,c);default:return}};var BP=J8;function LP(e,t){t=h.clone(y(t,h.ZERO)),h.equals(t,h.ZERO)||h.normalize(t,t),this.origin=h.clone(y(e,h.ZERO)),this.direction=t}LP.clone=function(e,t){if(!!l(e))return l(t)?(t.origin=h.clone(e.origin),t.direction=h.clone(e.direction),t):new LP(e.origin,e.direction)};LP.getPoint=function(e,t,n){return l(n)||(n=new h),n=h.multiplyByScalar(e.direction,t,n),h.add(e.origin,n,n)};var bn=LP;var sr={};sr.rayPlane=function(e,t,n){l(n)||(n=new h);let i=e.origin,o=e.direction,r=t.normal,s=h.dot(r,o);if(Math.abs(s)<R.EPSILON15)return;let a=(-t.distance-h.dot(r,i))/s;if(!(a<0))return n=h.multiplyByScalar(o,a,n),h.add(i,n,n)};var jbe=new h,qbe=new h,WK=new h,FK=new h,VK=new h;sr.rayTriangleParametric=function(e,t,n,i,o){o=y(o,!1);let r=e.origin,s=e.direction,a=h.subtract(n,t,jbe),c=h.subtract(i,t,qbe),u=h.cross(s,c,WK),f=h.dot(a,u),d,p,_,m,x;if(o){if(f<R.EPSILON6||(d=h.subtract(r,t,FK),_=h.dot(d,u),_<0||_>f)||(p=h.cross(d,a,VK),m=h.dot(s,p),m<0||_+m>f))return;x=h.dot(c,p)/f}else{if(Math.abs(f)<R.EPSILON6)return;let C=1/f;if(d=h.subtract(r,t,FK),_=h.dot(d,u)*C,_<0||_>1||(p=h.cross(d,a,VK),m=h.dot(s,p)*C,m<0||_+m>1))return;x=h.dot(c,p)*C}return x};sr.rayTriangle=function(e,t,n,i,o,r){let s=sr.rayTriangleParametric(e,t,n,i,o);if(!(!l(s)||s<0))return l(r)||(r=new h),h.multiplyByScalar(e.direction,s,r),h.add(e.origin,r,r)};var Ybe=new bn;sr.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=Ybe;h.clone(e,a.origin),h.subtract(t,e,a.direction),h.normalize(a.direction,a.direction);let c=sr.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>h.distance(e,t)))return l(s)||(s=new h),h.multiplyByScalar(a.direction,c,s),h.add(a.origin,s,s)};function Xbe(e,t,n,i){let o=t*t-4*e*n;if(o<0)return;if(o>0){let s=1/(2*e),a=Math.sqrt(o),c=(-t+a)*s,u=(-t-a)*s;return c<u?(i.root0=c,i.root1=u):(i.root0=u,i.root1=c),i}let r=-t/(2*e);if(r!==0)return i.root0=i.root1=r,i}var Kbe={root0:0,root1:0};function jK(e,t,n){l(n)||(n=new Jc);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=h.subtract(i,r,WK),c=h.dot(o,o),u=2*h.dot(o,a),f=h.magnitudeSquared(a)-s,d=Xbe(c,u,f,Kbe);if(!!l(d))return n.start=d.root0,n.stop=d.root1,n}sr.raySphere=function(e,t,n){if(n=jK(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var $be=new bn;sr.lineSegmentSphere=function(e,t,n,i){let o=$be;h.clone(e,o.origin);let r=h.subtract(t,e,o.direction),s=h.magnitude(r);if(h.normalize(r,r),i=jK(o,n,i),!(!l(i)||i.stop<0||i.start>s))return i.start=Math.max(i.start,0),i.stop=Math.min(i.stop,s),i};var Zbe=new h,Jbe=new h;sr.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=h.multiplyComponents(n,e.origin,Zbe),o=h.multiplyComponents(n,e.direction,Jbe),r=h.magnitudeSquared(i),s=h.dot(i,o),a,c,u,f,d;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=h.magnitudeSquared(o),u=c*a,p<u)return;if(p>u){f=s*s-u,d=-s+Math.sqrt(f);let m=d/c,x=a/d;return m<x?new Jc(m,x):{start:x,stop:m}}let _=Math.sqrt(a/c);return new Jc(_,_)}else if(r<1)return a=r-1,c=h.magnitudeSquared(o),u=c*a,f=s*s-u,d=-s+Math.sqrt(f),new Jc(0,d/c);if(s<0)return c=h.magnitudeSquared(o),new Jc(0,-s/c)};function sy(e,t,n){let i=e+t;return R.sign(e)!==R.sign(t)&&Math.abs(i/Math.max(Math.abs(e),Math.abs(t)))<n?0:i}function Qbe(e,t,n,i,o){let r=i*i,s=o*o,a=(e[Q.COLUMN1ROW1]-e[Q.COLUMN2ROW2])*s,c=o*(i*sy(e[Q.COLUMN1ROW0],e[Q.COLUMN0ROW1],R.EPSILON15)+t.y),u=e[Q.COLUMN0ROW0]*r+e[Q.COLUMN2ROW2]*s+i*t.x+n,f=s*sy(e[Q.COLUMN2ROW1],e[Q.COLUMN1ROW2],R.EPSILON15),d=o*(i*sy(e[Q.COLUMN2ROW0],e[Q.COLUMN0ROW2])+t.z),p,_=[];if(d===0&&f===0){if(p=Qc.computeRealRoots(a,c,u),p.length===0)return _;let I=p[0],L=Math.sqrt(Math.max(1-I*I,0));if(_.push(new h(i,o*I,o*-L)),_.push(new h(i,o*I,o*L)),p.length===2){let N=p[1],g=Math.sqrt(Math.max(1-N*N,0));_.push(new h(i,o*N,o*-g)),_.push(new h(i,o*N,o*g))}return _}let m=d*d,x=f*f,C=a*a,A=d*f,T=C+x,b=2*(c*a+A),S=2*u*a+c*c-x+m,w=2*(u*c-A),D=u*u-m;if(T===0&&b===0&&S===0&&w===0)return _;p=BP.computeRealRoots(T,b,S,w,D);let O=p.length;if(O===0)return _;for(let I=0;I<O;++I){let L=p[I],N=L*L,g=Math.max(1-N,0),E=Math.sqrt(g),v;R.sign(a)===R.sign(u)?v=sy(a*N+u,c*L,R.EPSILON12):R.sign(u)===R.sign(c*L)?v=sy(a*N,c*L+u,R.EPSILON12):v=sy(a*N+c*L,u,R.EPSILON12);let P=sy(f*L,d,R.EPSILON15),M=v*P;M<0?_.push(new h(i,o*L,o*E)):M>0?_.push(new h(i,o*L,o*-E)):E!==0?(_.push(new h(i,o*L,o*-E)),_.push(new h(i,o*L,o*E)),++I):_.push(new h(i,o*L,o*E))}return _}var Q8=new h,kK=new h,UK=new h,NP=new h,eEe=new h,tEe=new Q,nEe=new Q,iEe=new Q,oEe=new Q,rEe=new Q,zK=new Q,HK=new Q,GK=new h,sEe=new h,aEe=new me;sr.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!h.equals(n,h.ZERO)){let D=t.geodeticSurfaceNormal(n,Q8);if(h.dot(i,D)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,Q8),s=h.normalize(r,r),a=h.mostOrthogonalAxis(r,NP),c=h.normalize(h.cross(a,s,kK),kK),u=h.normalize(h.cross(s,c,UK),UK),f=tEe;f[0]=s.x,f[1]=s.y,f[2]=s.z,f[3]=c.x,f[4]=c.y,f[5]=c.z,f[6]=u.x,f[7]=u.y,f[8]=u.z;let d=Q.transpose(f,nEe),p=Q.fromScale(t.radii,iEe),_=Q.fromScale(t.oneOverRadii,oEe),m=rEe;m[0]=0,m[1]=-i.z,m[2]=i.y,m[3]=i.z,m[4]=0,m[5]=-i.x,m[6]=-i.y,m[7]=i.x,m[8]=0;let x=Q.multiply(Q.multiply(d,_,zK),m,zK),C=Q.multiply(Q.multiply(x,p,HK),f,HK),A=Q.multiplyByVector(x,n,eEe),T=Qbe(C,h.negate(A,Q8),0,0,1),b,S,w=T.length;if(w>0){let D=h.clone(h.ZERO,sEe),O=Number.NEGATIVE_INFINITY;for(let L=0;L<w;++L){b=Q.multiplyByVector(p,Q.multiplyByVector(f,T[L],GK),GK);let N=h.normalize(h.subtract(b,n,NP),NP),g=h.dot(N,i);g>O&&(O=g,D=h.clone(b,D))}let I=t.cartesianToCartographic(D,aEe);return O=R.clamp(O,0,1),S=h.magnitude(h.subtract(D,n,NP))*Math.sqrt(1-O*O),S=o?-S:S,I.height=S,t.cartographicToCartesian(I,new h)}};var cEe=new h;sr.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new h);let o=h.subtract(t,e,cEe),r=n.normal,s=h.dot(r,o);if(Math.abs(s)<R.EPSILON6)return;let a=h.dot(r,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return h.multiplyByScalar(o,c,i),h.add(e,i,i),i};sr.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=h.dot(o,e)+r<0,a=h.dot(o,t)+r<0,c=h.dot(o,n)+r<0,u=0;u+=s?1:0,u+=a?1:0,u+=c?1:0;let f,d;if((u===1||u===2)&&(f=new h,d=new h),u===1){if(s)return sr.lineSegmentPlane(e,t,i,f),sr.lineSegmentPlane(e,n,i,d),{positions:[e,t,n,f,d],indices:[0,3,4,1,2,4,1,4,3]};if(a)return sr.lineSegmentPlane(t,n,i,f),sr.lineSegmentPlane(t,e,i,d),{positions:[e,t,n,f,d],indices:[1,3,4,2,0,4,2,4,3]};if(c)return sr.lineSegmentPlane(n,e,i,f),sr.lineSegmentPlane(n,t,i,d),{positions:[e,t,n,f,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(u===2)if(s)if(a){if(!c)return sr.lineSegmentPlane(e,n,i,f),sr.lineSegmentPlane(t,n,i,d),{positions:[e,t,n,f,d],indices:[0,1,4,0,4,3,2,3,4]}}else return sr.lineSegmentPlane(n,t,i,f),sr.lineSegmentPlane(e,t,i,d),{positions:[e,t,n,f,d],indices:[2,0,4,2,4,3,1,3,4]};else return sr.lineSegmentPlane(t,e,i,f),sr.lineSegmentPlane(n,e,i,d),{positions:[e,t,n,f,d],indices:[1,2,4,1,4,3,0,3,4]}};var Ki=sr;function Ts(e,t){this.normal=h.clone(e),this.distance=t}Ts.fromPointNormal=function(e,t,n){let i=-h.dot(t,e);return l(n)?(h.clone(t,n.normal),n.distance=i,n):new Ts(t,i)};var lEe=new h;Ts.fromCartesian4=function(e,t){let n=h.fromCartesian4(e,lEe),i=e.w;return l(t)?(h.clone(n,t.normal),t.distance=i,t):new Ts(n,i)};Ts.getPointDistance=function(e,t){return h.dot(e.normal,t)+e.distance};var uEe=new h;Ts.projectPointOntoPlane=function(e,t,n){l(n)||(n=new h);let i=Ts.getPointDistance(e,t),o=h.multiplyByScalar(e.normal,i,uEe);return h.subtract(t,o,n)};var fEe=new B,dEe=new se,hEe=new h;Ts.transform=function(e,t,n){let i=e.normal,o=e.distance,r=B.inverseTranspose(t,fEe),s=se.fromElements(i.x,i.y,i.z,o,dEe);s=B.multiplyByVector(r,s,s);let a=h.fromCartesian4(s,hEe);return s=se.divideByScalar(s,h.magnitude(a),s),Ts.fromCartesian4(s,n)};Ts.clone=function(e,t){return l(t)?(h.clone(e.normal,t.normal),t.distance=e.distance,t):new Ts(e.normal,e.distance)};Ts.equals=function(e,t){return e.distance===t.distance&&h.equals(e.normal,t.normal)};Ts.ORIGIN_XY_PLANE=Object.freeze(new Ts(h.UNIT_Z,0));Ts.ORIGIN_YZ_PLANE=Object.freeze(new Ts(h.UNIT_X,0));Ts.ORIGIN_ZX_PLANE=Object.freeze(new Ts(h.UNIT_Y,0));var rn=Ts;function mEe(e,t,n){let i=0,o=e.length-1,r,s;for(;i<=o;){if(r=~~((i+o)/2),s=n(e[r],t),s<0){i=r+1;continue}if(s>0){o=r-1;continue}return r}return~(o+1)}var ar=mEe;function pEe(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var ay=pEe;function _Ee(e,t,n,i,o,r,s,a){this.year=e,this.month=t,this.day=n,this.hour=i,this.minute=o,this.second=r,this.millisecond=s,this.isLeapSecond=a}var x_=_Ee;function gEe(e){return e%4===0&&e%100!==0||e%400===0}var C_=gEe;function yEe(e,t){this.julianDate=e,this.offset=t}var ki=yEe;var xEe={SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1},jn=Object.freeze(xEe);var CEe={UTC:0,TAI:1},Hn=Object.freeze(CEe);var YK=new x_,eH=[31,28,31,30,31,30,31,31,30,31,30,31],tH=29;function nH(e,t){return At.compare(e.julianDate,t.julianDate)}var tA=new ki;function VP(e){tA.julianDate=e;let t=At.leapSeconds,n=ar(t,tA,nH);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&At.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),At.addSeconds(e,i,e)}function qK(e,t){tA.julianDate=e;let n=At.leapSeconds,i=ar(n,tA,nH);if(i<0&&(i=~i),i===0)return At.addSeconds(e,-n[0].offset,t);if(i>=n.length)return At.addSeconds(e,-n[i-1].offset,t);let o=At.secondsDifference(n[i].julianDate,e);if(o===0)return At.addSeconds(e,-n[i].offset,t);if(!(o<=1))return At.addSeconds(e,-n[--i].offset,t)}function A_(e,t,n){let i=t/jn.SECONDS_PER_DAY|0;return e+=i,t-=jn.SECONDS_PER_DAY*i,t<0&&(e--,t+=jn.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function iH(e,t,n,i,o,r,s){let a=(t-14)/12|0,c=e+4800+a,u=(1461*c/4|0)+(367*(t-2-12*a)/12|0)-(3*((c+100)/100|0)/4|0)+n-32075;i=i-12,i<0&&(i+=24);let f=r+(i*jn.SECONDS_PER_HOUR+o*jn.SECONDS_PER_MINUTE+s*jn.SECONDS_PER_MILLISECOND);return f>=43200&&(u-=1),[u,f]}var AEe=/^(\d{4})$/,TEe=/^(\d{4})-(\d{2})$/,bEe=/^(\d{4})-?(\d{3})$/,EEe=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,SEe=/^(\d{4})-?(\d{2})-?(\d{2})$/,oH=/([Z+\-])?(\d{2})?:?(\d{2})?$/,wEe=/^(\d{2})(\.\d+)?/.source+oH.source,vEe=/^(\d{2}):?(\d{2})(\.\d+)?/.source+oH.source,DEe=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+oH.source;function At(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=y(e,0),t=y(t,0),n=y(n,Hn.UTC);let i=e|0;t=t+(e-i)*jn.SECONDS_PER_DAY,A_(i,t,this),n===Hn.UTC&&VP(this)}At.fromGregorianDate=function(e,t){let n=iH(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return l(t)?(A_(n[0],n[1],t),VP(t),t):new At(n[0],n[1],Hn.UTC)};At.fromDate=function(e,t){let n=iH(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return l(t)?(A_(n[0],n[1],t),VP(t),t):new At(n[0],n[1],Hn.UTC)};At.fromIso8601=function(e,t){e=e.replace(",",".");let n=e.split("T"),i,o=1,r=1,s=0,a=0,c=0,u=0,f=n[0],d=n[1],p,_;if(n=f.match(SEe),n!==null)i=+n[1],o=+n[2],r=+n[3];else if(n=f.match(TEe),n!==null)i=+n[1],o=+n[2];else if(n=f.match(AEe),n!==null)i=+n[1];else{let A;if(n=f.match(bEe),n!==null)i=+n[1],A=+n[2],_=C_(i);else if(n=f.match(EEe),n!==null){i=+n[1];let T=+n[2],b=+n[3]||0,S=new Date(Date.UTC(i,0,4));A=T*7+b-S.getUTCDay()-3}p=new Date(Date.UTC(i,0,1)),p.setUTCDate(A),o=p.getUTCMonth()+1,r=p.getUTCDate()}_=C_(i);let m;if(l(d)){n=d.match(DEe),n!==null?(s=+n[1],a=+n[2],c=+n[3],u=+(n[4]||0)*1e3,m=5):(n=d.match(vEe),n!==null?(s=+n[1],a=+n[2],c=+(n[3]||0)*60,m=4):(n=d.match(wEe),n!==null&&(s=+n[1],a=+(n[2]||0)*60,m=3)));let A=n[m],T=+n[m+1],b=+(n[m+2]||0);switch(A){case"+":s=s-T,a=a-b;break;case"-":s=s+T,a=a+b;break;case"Z":break;default:a=a+new Date(Date.UTC(i,o-1,r,s,a)).getTimezoneOffset();break}}let x=c===60;for(x&&c--;a>=60;)a-=60,s++;for(;s>=24;)s-=24,r++;for(p=_&&o===2?tH:eH[o-1];r>p;)r-=p,o++,o>12&&(o-=12,i++),p=_&&o===2?tH:eH[o-1];for(;a<0;)a+=60,s--;for(;s<0;)s+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),p=_&&o===2?tH:eH[o-1],r+=p;let C=iH(i,o,r,s,a,c,u);return l(t)?(A_(C[0],C[1],t),VP(t)):t=new At(C[0],C[1],Hn.UTC),x&&At.addSeconds(t,1,t),t};At.now=function(e){return At.fromDate(new Date,e)};var FP=new At(0,0,Hn.TAI);At.toGregorianDate=function(e,t){let n=!1,i=qK(e,FP);l(i)||(At.addSeconds(e,-1,FP),i=qK(FP,FP),n=!0);let o=i.dayNumber,r=i.secondsOfDay;r>=43200&&(o+=1);let s=o+68569|0,a=4*s/146097|0;s=s-((146097*a+3)/4|0)|0;let c=4e3*(s+1)/1461001|0;s=s-(1461*c/4|0)+31|0;let u=80*s/2447|0,f=s-(2447*u/80|0)|0;s=u/11|0;let d=u+2-12*s|0,p=100*(a-49)+c+s|0,_=r/jn.SECONDS_PER_HOUR|0,m=r-_*jn.SECONDS_PER_HOUR,x=m/jn.SECONDS_PER_MINUTE|0;m=m-x*jn.SECONDS_PER_MINUTE;let C=m|0,A=(m-C)/jn.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),n&&(C+=1),l(t)?(t.year=p,t.month=d,t.day=f,t.hour=_,t.minute=x,t.second=C,t.millisecond=A,t.isLeapSecond=n,t):new x_(p,d,f,_,x,C,A,n)};At.toDate=function(e){let t=At.toGregorianDate(e,YK),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};At.toIso8601=function(e,t){let n=At.toGregorianDate(e,YK),i=n.year,o=n.month,r=n.day,s=n.hour,a=n.minute,c=n.second,u=n.millisecond;i===1e4&&o===1&&r===1&&s===0&&a===0&&c===0&&u===0&&(i=9999,o=12,r=31,s=24);let f;return!l(t)&&u!==0?(f=(u*.01).toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`):!l(t)||t===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}Z`:(f=(u*.01).toFixed(t).replace(".","").slice(0,t),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${s.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}.${f}Z`)};At.clone=function(e,t){if(!!l(e))return l(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new At(e.dayNumber,e.secondsOfDay,Hn.TAI)};At.compare=function(e,t){let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};At.equals=function(e,t){return e===t||l(e)&&l(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};At.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(At.secondsDifference(e,t))<=n};At.totalDays=function(e){return e.dayNumber+e.secondsOfDay/jn.SECONDS_PER_DAY};At.secondsDifference=function(e,t){return(e.dayNumber-t.dayNumber)*jn.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};At.daysDifference=function(e,t){let n=e.dayNumber-t.dayNumber,i=(e.secondsOfDay-t.secondsOfDay)/jn.SECONDS_PER_DAY;return n+i};At.computeTaiMinusUtc=function(e){tA.julianDate=e;let t=At.leapSeconds,n=ar(t,tA,nH);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};At.addSeconds=function(e,t,n){return A_(e.dayNumber,e.secondsOfDay+t,n)};At.addMinutes=function(e,t,n){let i=e.secondsOfDay+t*jn.SECONDS_PER_MINUTE;return A_(e.dayNumber,i,n)};At.addHours=function(e,t,n){let i=e.secondsOfDay+t*jn.SECONDS_PER_HOUR;return A_(e.dayNumber,i,n)};At.addDays=function(e,t,n){let i=e.dayNumber+t;return A_(i,e.secondsOfDay,n)};At.lessThan=function(e,t){return At.compare(e,t)<0};At.lessThanOrEquals=function(e,t){return At.compare(e,t)<=0};At.greaterThan=function(e,t){return At.compare(e,t)>0};At.greaterThanOrEquals=function(e,t){return At.compare(e,t)>=0};At.prototype.clone=function(e){return At.clone(this,e)};At.prototype.equals=function(e){return At.equals(this,e)};At.prototype.equalsEpsilon=function(e,t){return At.equalsEpsilon(this,e,t)};At.prototype.toString=function(){return At.toIso8601(this)};At.leapSeconds=[new ki(new At(2441317,43210,Hn.TAI),10),new ki(new At(2441499,43211,Hn.TAI),11),new ki(new At(2441683,43212,Hn.TAI),12),new ki(new At(2442048,43213,Hn.TAI),13),new ki(new At(2442413,43214,Hn.TAI),14),new ki(new At(2442778,43215,Hn.TAI),15),new ki(new At(2443144,43216,Hn.TAI),16),new ki(new At(2443509,43217,Hn.TAI),17),new ki(new At(2443874,43218,Hn.TAI),18),new ki(new At(2444239,43219,Hn.TAI),19),new ki(new At(2444786,43220,Hn.TAI),20),new ki(new At(2445151,43221,Hn.TAI),21),new ki(new At(2445516,43222,Hn.TAI),22),new ki(new At(2446247,43223,Hn.TAI),23),new ki(new At(2447161,43224,Hn.TAI),24),new ki(new At(2447892,43225,Hn.TAI),25),new ki(new At(2448257,43226,Hn.TAI),26),new ki(new At(2448804,43227,Hn.TAI),27),new ki(new At(2449169,43228,Hn.TAI),28),new ki(new At(2449534,43229,Hn.TAI),29),new ki(new At(2450083,43230,Hn.TAI),30),new ki(new At(2450630,43231,Hn.TAI),31),new ki(new At(2451179,43232,Hn.TAI),32),new ki(new At(2453736,43233,Hn.TAI),33),new ki(new At(2454832,43234,Hn.TAI),34),new ki(new At(2456109,43235,Hn.TAI),35),new ki(new At(2457204,43236,Hn.TAI),36),new ki(new At(2457754,43237,Hn.TAI),37)];var ee=At;function kP(e){if(e=y(e,y.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=y(e.addNewLeapSeconds,!0),l(e.data))rH(this,e.data);else if(l(e.url)){let t=De.createIfNeeded(e.url),n=this;this._downloadPromise=t.fetchJson().then(function(i){rH(n,i)}).catch(function(){n._dataError=`An error occurred while retrieving the EOP data from the URL ${t.url}.`})}else rH(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}kP.NONE=Object.freeze({getPromiseToLoad:function(){return Promise.resolve()},compute:function(e,t){return l(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new ay(0,0,0,0,0),t}});kP.prototype.getPromiseToLoad=function(){return Promise.resolve(this._downloadPromise)};kP.prototype.compute=function(e,t){if(!l(this._samples)){if(l(this._dataError))throw new fe(this._dataError);return}if(l(t)||(t=new ay(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],u=ee.lessThanOrEquals(a,e),f=!l(c),d=f||ee.greaterThanOrEquals(c,e);if(u&&d)return o=i,!f&&c.equals(e)&&++o,r=o+1,KK(this,n,this._samples,e,o,r,t),t}let s=ar(n,e,ee.compare,this._dateColumn);return s>=0?(s<n.length-1&&n[s+1].equals(e)&&++s,o=s,r=s):(r=~s,o=r-1,o<0&&(o=0)),this._lastIndex=o,KK(this,n,this._samples,e,o,r,t),t};function PEe(e,t){return ee.compare(e.julianDate,t)}function rH(e,t){if(!l(t.columnNames)){e._dataError="Error in loaded EOP data: The columnNames property is required.";return}if(!l(t.samples)){e._dataError="Error in loaded EOP data: The samples property is required.";return}let n=t.columnNames.indexOf("modifiedJulianDateUtc"),i=t.columnNames.indexOf("xPoleWanderRadians"),o=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),s=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),a=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||i<0||o<0||r<0||s<0||a<0||c<0){e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";return}let u=e._samples=t.samples,f=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let d,p=e._addNewLeapSeconds;for(let _=0,m=u.length;_<m;_+=e._columnCount){let x=u[_+n],C=u[_+c],A=x+jn.MODIFIED_JULIAN_DATE_DIFFERENCE,T=new ee(A,C,Hn.TAI);if(f.push(T),p){if(C!==d&&l(d)){let b=ee.leapSeconds,S=ar(b,T,PEe);if(S<0){let w=new ki(T,C);b.splice(~S,0,w)}}d=C}}}function XK(e,t,n,i,o){let r=n*i;o.xPoleWander=t[r+e._xPoleWanderRadiansColumn],o.yPoleWander=t[r+e._yPoleWanderRadiansColumn],o.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function mS(e,t,n){return t+e*(n-t)}function KK(e,t,n,i,o,r,s){let a=e._columnCount;if(r>t.length-1)return s.xPoleWander=0,s.yPoleWander=0,s.xPoleOffset=0,s.yPoleOffset=0,s.ut1MinusUtc=0,s;let c=t[o],u=t[r];if(c.equals(u)||i.equals(c))return XK(e,n,o,a,s),s;if(i.equals(u))return XK(e,n,r,a,s),s;let f=ee.secondsDifference(i,c)/ee.secondsDifference(u,c),d=o*a,p=r*a,_=n[d+e._ut1MinusUtcSecondsColumn],m=n[p+e._ut1MinusUtcSecondsColumn],x=m-_;if(x>.5||x<-.5){let C=n[d+e._taiMinusUtcSecondsColumn],A=n[p+e._taiMinusUtcSecondsColumn];C!==A&&(u.equals(i)?_=m:m-=A-C)}return s.xPoleWander=mS(f,n[d+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=mS(f,n[d+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=mS(f,n[d+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=mS(f,n[d+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=mS(f,_,m),s}var UP=kP;function La(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.roll=y(n,0)}La.fromQuaternion=function(e,t){l(t)||(t=new La);let n=2*(e.w*e.y-e.z*e.x),i=1-2*(e.x*e.x+e.y*e.y),o=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),s=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(s,r),t.roll=Math.atan2(o,i),t.pitch=-R.asinClamped(n),t};La.fromDegrees=function(e,t,n,i){return l(i)||(i=new La),i.heading=e*R.RADIANS_PER_DEGREE,i.pitch=t*R.RADIANS_PER_DEGREE,i.roll=n*R.RADIANS_PER_DEGREE,i};La.clone=function(e,t){if(!!l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new La(e.heading,e.pitch,e.roll)};La.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};La.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&R.equalsEpsilon(e.heading,t.heading,n,i)&&R.equalsEpsilon(e.pitch,t.pitch,n,i)&&R.equalsEpsilon(e.roll,t.roll,n,i)};La.prototype.clone=function(e){return La.clone(this,e)};La.prototype.equals=function(e){return La.equals(this,e)};La.prototype.equalsEpsilon=function(e,t,n){return La.equalsEpsilon(this,e,t,n)};La.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Xf=La;function IEe(e,t,n){this.x=e,this.y=t,this.s=n}var nA=IEe;function cH(e){e=y(e,y.EMPTY_OBJECT),this._xysFileUrlTemplate=De.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=y(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=y(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new ee(this._sampleZeroJulianEphemerisDate,0,Hn.TAI),this._stepSizeDays=y(e.stepSizeDays,1),this._samplesPerXysFile=y(e.samplesPerXysFile,1e3),this._totalSamples=y(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),i=this._xTable=new Array(t+1),o=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=o,i[r]=r*this._stepSizeDays;for(let s=0;s<=t;++s)s!==r&&(n[r]*=r-s);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var OEe=new ee(0,0,Hn.TAI);function sH(e,t,n){let i=OEe;return i.dayNumber=t,i.secondsOfDay=n,ee.daysDifference(i,e._sampleZeroDateTT)}cH.prototype.preload=function(e,t,n,i){let o=sH(this,e,t),r=sH(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,u=a/this._samplesPerXysFile|0,f=[];for(let d=c;d<=u;++d)f.push(aH(this,d));return Promise.all(f)};cH.prototype.computeXysRadians=function(e,t,n){let i=sH(this,e,t);if(i<0)return;let o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;let r=this._interpolationOrder,s=o-(r/2|0);s<0&&(s=0);let a=s+r;a>=this._totalSamples&&(a=this._totalSamples-1,s=a-r,s<0&&(s=0));let c=!1,u=this._samples;if(l(u[s*3])||(aH(this,s/this._samplesPerXysFile|0),c=!0),l(u[a*3])||(aH(this,a/this._samplesPerXysFile|0),c=!0),c)return;l(n)?(n.x=0,n.y=0,n.s=0):n=new nA(0,0,0);let f=i-s*this._stepSizeDays,d=this._work,p=this._denominators,_=this._coef,m=this._xTable,x,C;for(x=0;x<=r;++x)d[x]=f-m[x];for(x=0;x<=r;++x){for(_[x]=1,C=0;C<=r;++C)C!==x&&(_[x]*=d[C]);_[x]*=p[x];let A=(s+x)*3;n.x+=_[x]*u[A++],n.y+=_[x]*u[A++],n.s+=_[x]*u[A]}return n};function aH(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,i=e._xysFileUrlTemplate;l(i)?n=i.getDerivedResource({templateValues:{0:t}}):n=new De({url:Jt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let s=e._samples,a=r.samples,c=t*e._samplesPerXysFile*3;for(let u=0,f=a.length;u<f;++u)s[c+u]=a[u]});return e._chunkDownloadsInProgress[t]=o,o}var zP=cH;var T_,Ir={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},el={};Object.defineProperties(el,{element:{get:function(){if(!!el.supportsFullscreen())return document[Ir.fullscreenElement]}},changeEventName:{get:function(){if(!!el.supportsFullscreen())return Ir.fullscreenchange}},errorEventName:{get:function(){if(!!el.supportsFullscreen())return Ir.fullscreenerror}},enabled:{get:function(){if(!!el.supportsFullscreen())return document[Ir.fullscreenEnabled]}},fullscreen:{get:function(){if(!!el.supportsFullscreen())return el.element!==null}}});el.supportsFullscreen=function(){if(l(T_))return T_;T_=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return Ir.requestFullscreen="requestFullscreen",Ir.exitFullscreen="exitFullscreen",Ir.fullscreenEnabled="fullscreenEnabled",Ir.fullscreenElement="fullscreenElement",Ir.fullscreenchange="fullscreenchange",Ir.fullscreenerror="fullscreenerror",T_=!0,T_;let t=["webkit","moz","o","ms","khtml"],n;for(let i=0,o=t.length;i<o;++i){let r=t[i];n=`${r}RequestFullscreen`,typeof e[n]=="function"?(Ir.requestFullscreen=n,T_=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(Ir.requestFullscreen=n,T_=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?Ir.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(Ir.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?Ir.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(Ir.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?Ir.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(Ir.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),Ir.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),Ir.fullscreenerror=n)}return T_};el.requestFullscreen=function(e,t){!el.supportsFullscreen()||e[Ir.requestFullscreen]({vrDisplay:t})};el.exitFullscreen=function(){!el.supportsFullscreen()||document[Ir.exitFullscreen]()};el._names=Ir;var Or=el;var Na;typeof navigator<"u"?Na=navigator:Na={};function cy(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var HP,$K;function mH(){if(!l(HP)&&(HP=!1,!XP())){let e=/ Chrome\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(HP=!0,$K=cy(e[1]))}return HP}function REe(){return mH()&&$K}var GP,ZK;function JK(){if(!l(GP)&&(GP=!1,!mH()&&!XP()&&/ Safari\/[\.0-9]+/.test(Na.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(GP=!0,ZK=cy(e[1]))}return GP}function MEe(){return JK()&&ZK}var WP,dH;function QK(){if(!l(WP)){WP=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Na.userAgent);e!==null&&(WP=!0,dH=cy(e[1]),dH.isNightly=!!e[2])}return WP}function BEe(){return QK()&&dH}var pS,hH;function e$(){if(!l(pS)){pS=!1;let e;Na.appName==="Microsoft Internet Explorer"?(e=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Na.userAgent),e!==null&&(pS=!0,hH=cy(e[1]))):Na.appName==="Netscape"&&(e=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Na.userAgent),e!==null&&(pS=!0,hH=cy(e[1])))}return pS}function LEe(){return e$()&&hH}var jP,t$;function XP(){if(!l(jP)){jP=!1;let e=/ Edg\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(jP=!0,t$=cy(e[1]))}return jP}function NEe(){return XP()&&t$}var qP,n$;function pH(){if(!l(qP)){qP=!1;let e=/Firefox\/([\.0-9]+)/.exec(Na.userAgent);e!==null&&(qP=!0,n$=cy(e[1]))}return qP}var lH;function FEe(){return l(lH)||(lH=/Windows/i.test(Na.appVersion)),lH}var uH;function VEe(){return l(uH)||(uH=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),uH}function kEe(){return pH()&&n$}var fH;function UEe(){return l(fH)||(fH=!pH()&&typeof PointerEvent<"u"&&(!l(Na.pointerEnabled)||Na.pointerEnabled)),fH}var i$,YP;function o$(){if(!l(YP)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;YP=l(t)&&t!=="",YP&&(i$=t)}return YP}function zEe(){return o$()?i$:void 0}function hc(){return hc._result}hc._promise=void 0;hc._result=void 0;hc.initialize=function(){return l(hc._promise)||(hc._promise=new Promise(e=>{let t=new Image;t.onload=function(){hc._result=t.width>0&&t.height>0,e(hc._result)},t.onerror=function(){hc._result=!1,e(hc._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),hc._promise};Object.defineProperties(hc,{initialized:{get:function(){return l(hc._result)}}});var iA=[];typeof ArrayBuffer<"u"&&(iA.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&iA.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&iA.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&iA.push(BigInt64Array),typeof BigUint64Array<"u"&&iA.push(BigUint64Array));var hh={isChrome:mH,chromeVersion:REe,isSafari:JK,safariVersion:MEe,isWebkit:QK,webkitVersion:BEe,isInternetExplorer:e$,internetExplorerVersion:LEe,isEdge:XP,edgeVersion:NEe,isFirefox:pH,firefoxVersion:kEe,isWindows:FEe,isIPadOrIOS:VEe,hardwareConcurrency:y(Na.hardwareConcurrency,3),supportsPointerEvents:UEe,supportsImageRenderingPixelated:o$,supportsWebP:hc,imageRenderingValue:zEe,typedArrayTypes:iA};hh.supportsBasis=function(e){return hh.supportsWebAssembly()&&e.context.supportsBasis};hh.supportsFullscreen=function(){return Or.supportsFullscreen()};hh.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};hh.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};hh.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};hh.supportsBigInt=function(){return typeof BigInt<"u"};hh.supportsWebWorkers=function(){return typeof Worker<"u"};hh.supportsWebAssembly=function(){return typeof WebAssembly<"u"};var Et=hh;function tt(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.z=y(n,0),this.w=y(i,0)}var _S=new h;tt.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);_S=h.normalize(e,_S);let r=_S.x*o,s=_S.y*o,a=_S.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new tt(r,s,a,c)};var HEe=[1,2,0],GEe=new Array(3);tt.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[Q.COLUMN0ROW0],c=e[Q.COLUMN1ROW1],u=e[Q.COLUMN2ROW2],f=a+c+u;if(f>0)n=Math.sqrt(f+1),s=.5*n,n=.5/n,i=(e[Q.COLUMN1ROW2]-e[Q.COLUMN2ROW1])*n,o=(e[Q.COLUMN2ROW0]-e[Q.COLUMN0ROW2])*n,r=(e[Q.COLUMN0ROW1]-e[Q.COLUMN1ROW0])*n;else{let d=HEe,p=0;c>a&&(p=1),u>a&&u>c&&(p=2);let _=d[p],m=d[_];n=Math.sqrt(e[Q.getElementIndex(p,p)]-e[Q.getElementIndex(_,_)]-e[Q.getElementIndex(m,m)]+1);let x=GEe;x[p]=.5*n,n=.5/n,s=(e[Q.getElementIndex(m,_)]-e[Q.getElementIndex(_,m)])*n,x[_]=(e[Q.getElementIndex(_,p)]+e[Q.getElementIndex(p,_)])*n,x[m]=(e[Q.getElementIndex(m,p)]+e[Q.getElementIndex(p,m)])*n,i=-x[0],o=-x[1],r=-x[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new tt(i,o,r,s)};var r$=new tt,s$=new tt,_H=new tt,a$=new tt;tt.fromHeadingPitchRoll=function(e,t){return a$=tt.fromAxisAngle(h.UNIT_X,e.roll,r$),_H=tt.fromAxisAngle(h.UNIT_Y,-e.pitch,t),t=tt.multiply(_H,a$,_H),s$=tt.fromAxisAngle(h.UNIT_Z,-e.heading,r$),tt.multiply(s$,t,t)};var KP=new h,gH=new h,Kf=new tt,c$=new tt,$P=new tt;tt.packedLength=4;tt.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};tt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new tt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};tt.packedInterpolationLength=3;tt.convertPackedArrayForInterpolation=function(e,t,n,i){tt.unpack(e,n*4,$P),tt.conjugate($P,$P);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;tt.unpack(e,(t+o)*4,Kf),tt.multiply(Kf,$P,Kf),Kf.w<0&&tt.negate(Kf,Kf),tt.computeAxis(Kf,KP);let a=tt.computeAngle(Kf);l(i)||(i=[]),i[s]=KP.x*a,i[s+1]=KP.y*a,i[s+2]=KP.z*a}};tt.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new tt),h.fromArray(e,0,gH);let r=h.magnitude(gH);return tt.unpack(t,i*4,c$),r===0?tt.clone(tt.IDENTITY,Kf):tt.fromAxisAngle(gH,r,Kf),tt.multiply(Kf,c$,o)};tt.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new tt(e.x,e.y,e.z,e.w)};tt.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};tt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};tt.magnitude=function(e){return Math.sqrt(tt.magnitudeSquared(e))};tt.normalize=function(e,t){let n=1/tt.magnitude(e),i=e.x*n,o=e.y*n,r=e.z*n,s=e.w*n;return t.x=i,t.y=o,t.z=r,t.w=s,t};tt.inverse=function(e,t){let n=tt.magnitudeSquared(e);return t=tt.conjugate(e,t),tt.multiplyByScalar(t,1/n,t)};tt.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n};tt.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n};tt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};tt.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};tt.multiply=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,c=t.y,u=t.z,f=t.w,d=s*a+i*f+o*u-r*c,p=s*c-i*u+o*f+r*a,_=s*u+i*c-o*a+r*f,m=s*f-i*a-o*c-r*u;return n.x=d,n.y=p,n.z=_,n.w=m,n};tt.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};tt.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};tt.computeAxis=function(e,t){let n=e.w;if(Math.abs(n-1)<R.EPSILON6)return t.x=t.y=t.z=0,t;let i=1/Math.sqrt(1-n*n);return t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t};tt.computeAngle=function(e){return Math.abs(e.w-1)<R.EPSILON6?0:2*Math.acos(e.w)};var yH=new tt;tt.lerp=function(e,t,n,i){return yH=tt.multiplyByScalar(t,n,yH),i=tt.multiplyByScalar(e,1-n,i),tt.add(yH,i,i)};var l$=new tt,xH=new tt,CH=new tt;tt.slerp=function(e,t,n,i){let o=tt.dot(e,t),r=t;if(o<0&&(o=-o,r=l$=tt.negate(t,l$)),1-o<R.EPSILON6)return tt.lerp(e,r,n,i);let s=Math.acos(o);return xH=tt.multiplyByScalar(e,Math.sin((1-n)*s),xH),CH=tt.multiplyByScalar(r,Math.sin(n*s),CH),i=tt.add(xH,CH,i),tt.multiplyByScalar(i,1/Math.sin(s),i)};tt.log=function(e,t){let n=R.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),h.multiplyByScalar(e,i,t)};tt.exp=function(e,t){let n=h.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var WEe=new h,jEe=new h,gS=new tt,oA=new tt;tt.computeInnerQuadrangle=function(e,t,n,i){let o=tt.conjugate(t,gS);tt.multiply(o,n,oA);let r=tt.log(oA,WEe);tt.multiply(o,e,oA);let s=tt.log(oA,jEe);return h.add(r,s,r),h.multiplyByScalar(r,.25,r),h.negate(r,r),tt.exp(r,gS),tt.multiply(t,gS,i)};tt.squad=function(e,t,n,i,o,r){let s=tt.slerp(e,t,o,gS),a=tt.slerp(n,i,o,oA);return tt.slerp(s,a,2*o*(1-o),r)};var qEe=new tt,u$=1.9011074535173003,ZP=Et.supportsTypedArrays()?new Float32Array(8):[],JP=Et.supportsTypedArrays()?new Float32Array(8):[],km=Et.supportsTypedArrays()?new Float32Array(8):[],Um=Et.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;ZP[e]=1/(t*n),JP[e]=t/n}ZP[7]=u$/(8*17);JP[7]=u$*8/17;tt.fastSlerp=function(e,t,n,i){let o=tt.dot(e,t),r;o>=0?r=1:(r=-1,o=-o);let s=o-1,a=1-n,c=n*n,u=a*a;for(let _=7;_>=0;--_)km[_]=(ZP[_]*c-JP[_])*s,Um[_]=(ZP[_]*u-JP[_])*s;let f=r*n*(1+km[0]*(1+km[1]*(1+km[2]*(1+km[3]*(1+km[4]*(1+km[5]*(1+km[6]*(1+km[7])))))))),d=a*(1+Um[0]*(1+Um[1]*(1+Um[2]*(1+Um[3]*(1+Um[4]*(1+Um[5]*(1+Um[6]*(1+Um[7])))))))),p=tt.multiplyByScalar(e,d,qEe);return tt.multiplyByScalar(t,f,i),tt.add(p,i,i)};tt.fastSquad=function(e,t,n,i,o,r){let s=tt.fastSlerp(e,t,o,gS),a=tt.fastSlerp(n,i,o,oA);return tt.fastSlerp(s,a,2*o*(1-o),r)};tt.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};tt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.x-t.x)<=n&&Math.abs(e.y-t.y)<=n&&Math.abs(e.z-t.z)<=n&&Math.abs(e.w-t.w)<=n};tt.ZERO=Object.freeze(new tt(0,0,0,0));tt.IDENTITY=Object.freeze(new tt(0,0,0,1));tt.prototype.clone=function(e){return tt.clone(this,e)};tt.prototype.equals=function(e){return tt.equals(this,e)};tt.prototype.equalsEpsilon=function(e,t){return tt.equalsEpsilon(this,e,t)};tt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Me=tt;var Li={},AH={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},rA={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},TH={},tl={east:new h,north:new h,up:new h,west:new h,south:new h,down:new h},b_=new h,E_=new h,S_=new h;Li.localFrameToFixedFrameGenerator=function(e,t){if(!AH.hasOwnProperty(e)||!AH[e].hasOwnProperty(t))throw new ye("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=AH[e][t],i,o=e+t;return l(TH[o])?i=TH[o]:(i=function(r,s,a){if(l(a)||(a=new B),h.equalsEpsilon(r,h.ZERO,R.EPSILON14))h.unpack(rA[e],0,b_),h.unpack(rA[t],0,E_),h.unpack(rA[n],0,S_);else if(R.equalsEpsilon(r.x,0,R.EPSILON14)&&R.equalsEpsilon(r.y,0,R.EPSILON14)){let c=R.sign(r.z);h.unpack(rA[e],0,b_),e!=="east"&&e!=="west"&&h.multiplyByScalar(b_,c,b_),h.unpack(rA[t],0,E_),t!=="east"&&t!=="west"&&h.multiplyByScalar(E_,c,E_),h.unpack(rA[n],0,S_),n!=="east"&&n!=="west"&&h.multiplyByScalar(S_,c,S_)}else{s=y(s,re.WGS84),s.geodeticSurfaceNormal(r,tl.up);let c=tl.up,u=tl.east;u.x=-r.y,u.y=r.x,u.z=0,h.normalize(u,tl.east),h.cross(c,u,tl.north),h.multiplyByScalar(tl.up,-1,tl.down),h.multiplyByScalar(tl.east,-1,tl.west),h.multiplyByScalar(tl.north,-1,tl.south),b_=tl[e],E_=tl[t],S_=tl[n]}return a[0]=b_.x,a[1]=b_.y,a[2]=b_.z,a[3]=0,a[4]=E_.x,a[5]=E_.y,a[6]=E_.z,a[7]=0,a[8]=S_.x,a[9]=S_.y,a[10]=S_.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},TH[o]=i),i};Li.eastNorthUpToFixedFrame=Li.localFrameToFixedFrameGenerator("east","north");Li.northEastDownToFixedFrame=Li.localFrameToFixedFrameGenerator("north","east");Li.northUpEastToFixedFrame=Li.localFrameToFixedFrameGenerator("north","up");Li.northWestUpToFixedFrame=Li.localFrameToFixedFrameGenerator("north","west");var YEe=new Me,XEe=new h(1,1,1),KEe=new B;Li.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=y(i,Li.eastNorthUpToFixedFrame);let r=Me.fromHeadingPitchRoll(t,YEe),s=B.fromTranslationQuaternionRotationScale(h.ZERO,r,XEe,KEe);return o=i(e,n,o),B.multiply(o,s,o)};var $Ee=new B,ZEe=new Q;Li.headingPitchRollQuaternion=function(e,t,n,i,o){let r=Li.headingPitchRollToFixedFrame(e,t,n,i,$Ee),s=B.getMatrix3(r,ZEe);return Me.fromRotationMatrix(s,o)};var JEe=new h(1,1,1),QEe=new h,f$=new B,eSe=new B,tSe=new Q,nSe=new Me;Li.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=y(t,re.WGS84),n=y(n,Li.eastNorthUpToFixedFrame),l(i)||(i=new Xf);let o=B.getTranslation(e,QEe);if(h.equals(o,h.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=B.inverseTransformation(n(o,t,f$),f$),s=B.setScale(e,JEe,eSe);s=B.setTranslation(s,h.ZERO,s),r=B.multiply(r,s,r);let a=Me.fromRotationMatrix(B.getMatrix3(r,tSe),nSe);return a=Me.normalize(a,a),Xf.fromQuaternion(a,i)};var iSe=6*3600+41*60+50.54841,oSe=8640184812866e-6,rSe=.093104,sSe=-62e-7,aSe=11772758384668e-32,cSe=72921158553e-15,lSe=R.TWO_PI/86400,QP=new ee;Li.computeTemeToPseudoFixedMatrix=function(e,t){QP=ee.addSeconds(e,-ee.computeTaiMinusUtc(e),QP);let n=QP.dayNumber,i=QP.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/jn.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/jn.DAYS_PER_JULIAN_CENTURY;let a=(iSe+o*(oSe+o*(rSe+o*sSe)))*lSe%R.TWO_PI,c=cSe+aSe*(n-24515455e-1),u=(i+jn.SECONDS_PER_DAY*.5)%jn.SECONDS_PER_DAY,f=a+c*u,d=Math.cos(f),p=Math.sin(f);return l(t)?(t[0]=d,t[1]=-p,t[2]=0,t[3]=p,t[4]=d,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new Q(d,p,0,-p,d,0,0,0,1)};Li.iau2006XysData=new zP;Li.earthOrientationParameters=UP.NONE;var SH=32.184,uSe=2451545;Li.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+SH,i=e.stop.dayNumber,o=e.stop.secondsOfDay+SH,r=Li.iau2006XysData.preload(t,n,i,o),s=Li.earthOrientationParameters.getPromiseToLoad();return Promise.all([r,s])};Li.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new Q);let n=Li.computeFixedToIcrfMatrix(e,t);if(!!l(n))return Q.transpose(n,t)};var fSe=new nA(0,0,0),dSe=new ay(0,0,0,0,0,0),bH=new Q,EH=new Q;Li.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new Q);let n=Li.earthOrientationParameters.compute(e,dSe);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+SH,r=Li.iau2006XysData.computeXysRadians(i,o,fSe);if(!l(r))return;let s=r.x+n.xPoleOffset,a=r.y+n.yPoleOffset,c=1/(1+Math.sqrt(1-s*s-a*a)),u=bH;u[0]=1-c*s*s,u[3]=-c*s*a,u[6]=s,u[1]=-c*s*a,u[4]=1-c*a*a,u[7]=a,u[2]=-s,u[5]=-a,u[8]=1-c*(s*s+a*a);let f=Q.fromRotationZ(-r.s,EH),d=Q.multiply(u,f,bH),p=e.dayNumber,_=e.secondsOfDay-ee.computeTaiMinusUtc(e)+n.ut1MinusUtc,m=p-2451545,x=_/jn.SECONDS_PER_DAY,C=.779057273264+x+.00273781191135448*(m+x);C=C%1*R.TWO_PI;let A=Q.fromRotationZ(C,EH),T=Q.multiply(d,A,bH),b=Math.cos(n.xPoleWander),S=Math.cos(n.yPoleWander),w=Math.sin(n.xPoleWander),D=Math.sin(n.yPoleWander),O=i-uSe+o/jn.SECONDS_PER_DAY;O/=36525;let I=-47e-6*O*R.RADIANS_PER_DEGREE/3600,L=Math.cos(I),N=Math.sin(I),g=EH;return g[0]=b*L,g[1]=b*N,g[2]=w,g[3]=-S*N+D*w*L,g[4]=S*L+D*w*N,g[5]=-D*b,g[6]=-D*N-S*w*L,g[7]=D*L-S*w*N,g[8]=S*b,Q.multiply(T,g,t)};var hSe=new se;Li.pointToWindowCoordinates=function(e,t,n,i){return i=Li.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};Li.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new G);let o=hSe;return B.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),B.multiplyByVector(t,o,o),G.fromCartesian4(o,i)};var mSe=new h,pSe=new h,_Se=new h;Li.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=y(n,re.WGS84).geodeticSurfaceNormal(e,mSe),r=h.cross(t,o,pSe);h.equalsEpsilon(r,h.ZERO,R.EPSILON6)&&(r=h.clone(h.UNIT_X,r));let s=h.cross(r,t,_Se);return h.normalize(s,s),h.cross(t,s,r),h.negate(r,r),h.normalize(r,r),l(i)||(i=new Q),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};var d$=new B(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),h$=new me,m$=new h,gSe=new h,ySe=new Q,wH=new B,p$=new B;Li.basisTo2D=function(e,t,n){let i=B.getTranslation(t,gSe),o=e.ellipsoid,r=o.cartesianToCartographic(i,h$),s=e.project(r,m$);h.fromElements(s.z,s.x,s.y,s);let a=Li.eastNorthUpToFixedFrame(i,o,wH),c=B.inverseTransformation(a,p$),u=B.getMatrix3(t,ySe),f=B.multiplyByMatrix3(c,u,n);return B.multiply(d$,f,n),B.setTranslation(n,s,n),n};Li.wgs84To2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=Li.eastNorthUpToFixedFrame(t,i,wH),r=B.inverseTransformation(o,p$),s=i.cartesianToCartographic(t,h$),a=e.project(s,m$);h.fromElements(a.z,a.x,a.y,a);let c=B.fromTranslation(a,wH);return B.multiply(d$,r,n),B.multiply(c,n,n),n};var _t=Li;var vH=new se;function mh(e,t){t=y(t,re.WGS84),e=t.scaleToGeodeticSurface(e);let n=_t.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=h.fromCartesian4(B.getColumn(n,0,vH)),this._yAxis=h.fromCartesian4(B.getColumn(n,1,vH));let i=h.fromCartesian4(B.getColumn(n,2,vH));this._plane=rn.fromPointNormal(e,i)}Object.defineProperties(mh.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var xSe=new ry;mh.fromPoints=function(e,t){let n=ry.fromPoints(e,xSe);return new mh(n.center,t)};var _$=new bn,eI=new h;mh.prototype.projectPointOntoPlane=function(e,t){let n=_$;n.origin=e,h.normalize(e,n.direction);let i=Ki.rayPlane(n,this._plane,eI);if(l(i)||(h.negate(n.direction,n.direction),i=Ki.rayPlane(n,this._plane,eI)),l(i)){let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new G(r,s)}};mh.prototype.projectPointsOntoPlane=function(e,t){l(t)||(t=[]);let n=0,i=e.length;for(let o=0;o<i;o++){let r=this.projectPointOntoPlane(e[o],t[n]);l(r)&&(t[n]=r,n++)}return t.length=n,t};mh.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new G);let n=_$;n.origin=e,h.clone(this._plane.normal,n.direction);let i=Ki.rayPlane(n,this._plane,eI);l(i)||(h.negate(n.direction,n.direction),i=Ki.rayPlane(n,this._plane,eI));let o=h.subtract(i,this._origin,i),r=h.dot(this._xAxis,o),s=h.dot(this._yAxis,o);return t.x=r,t.y=s,t};mh.prototype.projectPointsToNearestOnPlane=function(e,t){l(t)||(t=[]);let n=e.length;t.length=n;for(let i=0;i<n;i++)t[i]=this.projectPointToNearestOnPlane(e[i],t[i]);return t};var CSe=new h;mh.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new h);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=CSe;return h.multiplyByScalar(o,e.x,s),t=h.add(i,s,t),h.multiplyByScalar(r,e.y,s),h.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};mh.prototype.projectPointsOntoEllipsoid=function(e,t){let n=e.length;l(t)?t.length=n:t=new Array(n);for(let i=0;i<n;++i)t[i]=this.projectPointOntoEllipsoid(e[i],t[i]);return t};var Fa=mh;function wi(e,t){this.center=h.clone(y(e,h.ZERO)),this.halfAxes=Q.clone(y(t,Q.ZERO))}wi.packedLength=h.packedLength+Q.packedLength;wi.pack=function(e,t,n){return n=y(n,0),h.pack(e.center,t,n),Q.pack(e.halfAxes,t,n+h.packedLength),t};wi.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new wi),h.unpack(e,t,n.center),Q.unpack(e,t+h.packedLength,n.halfAxes),n};var ASe=new h,TSe=new h,bSe=new h,ESe=new h,SSe=new h,wSe=new h,vSe=new Q,DSe={unitary:new Q,diagonal:new Q};wi.fromPoints=function(e,t){if(l(t)||(t=new wi),!l(e)||e.length===0)return t.halfAxes=Q.ZERO,t.center=h.ZERO,t;let n,i=e.length,o=h.clone(e[0],ASe);for(n=1;n<i;n++)h.add(o,e[n],o);let r=1/i;h.multiplyByScalar(o,r,o);let s=0,a=0,c=0,u=0,f=0,d=0,p;for(n=0;n<i;n++)p=h.subtract(e[n],o,TSe),s+=p.x*p.x,a+=p.x*p.y,c+=p.x*p.z,u+=p.y*p.y,f+=p.y*p.z,d+=p.z*p.z;s*=r,a*=r,c*=r,u*=r,f*=r,d*=r;let _=vSe;_[0]=s,_[1]=a,_[2]=c,_[3]=a,_[4]=u,_[5]=f,_[6]=c,_[7]=f,_[8]=d;let m=Q.computeEigenDecomposition(_,DSe),x=Q.clone(m.unitary,t.halfAxes),C=Q.getColumn(x,0,ESe),A=Q.getColumn(x,1,SSe),T=Q.getColumn(x,2,wSe),b=-Number.MAX_VALUE,S=-Number.MAX_VALUE,w=-Number.MAX_VALUE,D=Number.MAX_VALUE,O=Number.MAX_VALUE,I=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],b=Math.max(h.dot(C,p),b),S=Math.max(h.dot(A,p),S),w=Math.max(h.dot(T,p),w),D=Math.min(h.dot(C,p),D),O=Math.min(h.dot(A,p),O),I=Math.min(h.dot(T,p),I);C=h.multiplyByScalar(C,.5*(D+b),C),A=h.multiplyByScalar(A,.5*(O+S),A),T=h.multiplyByScalar(T,.5*(I+w),T);let L=h.add(C,A,t.center);h.add(L,T,L);let N=bSe;return N.x=b-D,N.y=S-O,N.z=w-I,h.multiplyByScalar(N,.5,N),Q.multiplyByScale(t.halfAxes,N,t.halfAxes),t};var T$=new h,PSe=new h;function g$(e,t,n,i,o,r,s,a,c,u,f){l(f)||(f=new wi);let d=f.halfAxes;Q.setColumn(d,0,t,d),Q.setColumn(d,1,n,d),Q.setColumn(d,2,i,d);let p=T$;p.x=(o+r)/2,p.y=(s+a)/2,p.z=(c+u)/2;let _=PSe;_.x=(r-o)/2,_.y=(a-s)/2,_.z=(u-c)/2;let m=f.center;return p=Q.multiplyByVector(d,p,p),h.add(e,p,m),Q.multiplyByScale(d,_,d),f}var y$=new me,ISe=new h,OSe=new me,RSe=new me,MSe=new me,BSe=new me,LSe=new me,NSe=new h,x$=new h,FSe=new h,C$=new h,VSe=new h,kSe=new G,USe=new G,zSe=new G,HSe=new G,GSe=new G,WSe=new h,jSe=new h,qSe=new h,YSe=new h,XSe=new G,KSe=new h,$Se=new h,ZSe=new h,JSe=new rn(h.UNIT_X,0);wi.fromRectangle=function(e,t,n,i,o){t=y(t,0),n=y(n,0),i=y(i,re.WGS84);let r,s,a,c,u,f,d;if(e.width<=R.PI){let O=de.center(e,y$),I=i.cartographicToCartesian(O,ISe),L=new Fa(I,i);d=L.plane;let N=O.longitude,g=e.south<0&&e.north>0?0:O.latitude,E=me.fromRadians(N,e.north,n,OSe),v=me.fromRadians(e.west,e.north,n,RSe),P=me.fromRadians(e.west,g,n,MSe),M=me.fromRadians(e.west,e.south,n,BSe),V=me.fromRadians(N,e.south,n,LSe),U=i.cartographicToCartesian(E,NSe),k=i.cartographicToCartesian(v,x$),H=i.cartographicToCartesian(P,FSe),F=i.cartographicToCartesian(M,C$),Y=i.cartographicToCartesian(V,VSe),j=L.projectPointToNearestOnPlane(U,kSe),X=L.projectPointToNearestOnPlane(k,USe),W=L.projectPointToNearestOnPlane(H,zSe),$=L.projectPointToNearestOnPlane(F,HSe),J=L.projectPointToNearestOnPlane(Y,GSe);return r=Math.min(X.x,W.x,$.x),s=-r,c=Math.max(X.y,j.y),a=Math.min($.y,J.y),v.height=M.height=t,k=i.cartographicToCartesian(v,x$),F=i.cartographicToCartesian(M,C$),u=Math.min(rn.getPointDistance(d,k),rn.getPointDistance(d,F)),f=n,g$(L.origin,L.xAxis,L.yAxis,L.zAxis,r,s,a,c,u,f,o)}let p=e.south>0,_=e.north<0,m=p?e.south:_?e.north:0,x=de.center(e,y$).longitude,C=h.fromRadians(x,m,n,i,WSe);C.z=0;let T=Math.abs(C.x)<R.EPSILON10&&Math.abs(C.y)<R.EPSILON10?h.UNIT_X:h.normalize(C,jSe),b=h.UNIT_Z,S=h.cross(T,b,qSe);d=rn.fromPointNormal(C,T,JSe);let w=h.fromRadians(x+R.PI_OVER_TWO,m,n,i,YSe);s=h.dot(rn.projectPointOntoPlane(d,w,XSe),S),r=-s,c=h.fromRadians(0,e.north,_?t:n,i,KSe).z,a=h.fromRadians(0,e.south,p?t:n,i,$Se).z;let D=h.fromRadians(e.east,m,n,i,ZSe);return u=rn.getPointDistance(d,D),f=0,g$(C,S,b,T,r,s,a,c,u,f,o)};wi.fromTransformation=function(e,t){return l(t)||(t=new wi),t.center=B.getTranslation(e,t.center),t.halfAxes=B.getMatrix3(e,t.halfAxes),t.halfAxes=Q.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};wi.clone=function(e,t){if(!!l(e))return l(t)?(h.clone(e.center,t.center),Q.clone(e.halfAxes,t.halfAxes),t):new wi(e.center,e.halfAxes)};wi.intersectPlane=function(e,t){let n=e.center,i=t.normal,o=e.halfAxes,r=i.x,s=i.y,a=i.z,c=Math.abs(r*o[Q.COLUMN0ROW0]+s*o[Q.COLUMN0ROW1]+a*o[Q.COLUMN0ROW2])+Math.abs(r*o[Q.COLUMN1ROW0]+s*o[Q.COLUMN1ROW1]+a*o[Q.COLUMN1ROW2])+Math.abs(r*o[Q.COLUMN2ROW0]+s*o[Q.COLUMN2ROW1]+a*o[Q.COLUMN2ROW2]),u=h.dot(i,n)+t.distance;return u<=-c?Zt.OUTSIDE:u>=c?Zt.INSIDE:Zt.INTERSECTING};var b$=new h,E$=new h,S$=new h,QSe=new h,A$=new h,ewe=new h;wi.distanceSquaredTo=function(e,t){let n=h.subtract(t,e.center,T$),i=e.halfAxes,o=Q.getColumn(i,0,b$),r=Q.getColumn(i,1,E$),s=Q.getColumn(i,2,S$),a=h.magnitude(o),c=h.magnitude(r),u=h.magnitude(s),f=!0,d=!0,p=!0;a>0?h.divideByScalar(o,a,o):f=!1,c>0?h.divideByScalar(r,c,r):d=!1,u>0?h.divideByScalar(s,u,s):p=!1;let _=!f+!d+!p,m,x,C;if(_===1){let S=o;m=r,x=s,d?p||(S=s,x=o):(S=r,m=o),C=h.cross(m,x,A$),S===o?o=C:S===r?r=C:S===s&&(s=C)}else if(_===2){m=o,d?m=r:p&&(m=s);let S=h.UNIT_Y;S.equalsEpsilon(m,R.EPSILON3)&&(S=h.UNIT_X),x=h.cross(m,S,QSe),h.normalize(x,x),C=h.cross(m,x,A$),h.normalize(C,C),m===o?(r=x,s=C):m===r?(s=x,o=C):m===s&&(o=x,r=C)}else _===3&&(o=h.UNIT_X,r=h.UNIT_Y,s=h.UNIT_Z);let A=ewe;A.x=h.dot(n,o),A.y=h.dot(n,r),A.z=h.dot(n,s);let T=0,b;return A.x<-a?(b=A.x+a,T+=b*b):A.x>a&&(b=A.x-a,T+=b*b),A.y<-c?(b=A.y+c,T+=b*b):A.y>c&&(b=A.y-c,T+=b*b),A.z<-u?(b=A.z+u,T+=b*b):A.z>u&&(b=A.z-u,T+=b*b),T};var twe=new h,nwe=new h;wi.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Jc);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=Q.getColumn(a,0,b$),u=Q.getColumn(a,1,E$),f=Q.getColumn(a,2,S$),d=h.add(c,u,twe);h.add(d,f,d),h.add(d,s,d);let p=h.subtract(d,t,nwe),_=h.dot(n,p);return o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.add(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.add(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.add(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.subtract(d,u,d),h.add(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),h.subtract(s,c,d),h.subtract(d,u,d),h.subtract(d,f,d),h.subtract(d,t,p),_=h.dot(n,p),o=Math.min(_,o),r=Math.max(_,r),i.start=o,i.stop=r,i};var iwe=new h,owe=new h,rwe=new h;wi.computeCorners=function(e,t){l(t)||(t=[new h,new h,new h,new h,new h,new h,new h,new h]);let n=e.center,i=e.halfAxes,o=Q.getColumn(i,0,iwe),r=Q.getColumn(i,1,owe),s=Q.getColumn(i,2,rwe);return h.clone(n,t[0]),h.subtract(t[0],o,t[0]),h.subtract(t[0],r,t[0]),h.subtract(t[0],s,t[0]),h.clone(n,t[1]),h.subtract(t[1],o,t[1]),h.subtract(t[1],r,t[1]),h.add(t[1],s,t[1]),h.clone(n,t[2]),h.subtract(t[2],o,t[2]),h.add(t[2],r,t[2]),h.subtract(t[2],s,t[2]),h.clone(n,t[3]),h.subtract(t[3],o,t[3]),h.add(t[3],r,t[3]),h.add(t[3],s,t[3]),h.clone(n,t[4]),h.add(t[4],o,t[4]),h.subtract(t[4],r,t[4]),h.subtract(t[4],s,t[4]),h.clone(n,t[5]),h.add(t[5],o,t[5]),h.subtract(t[5],r,t[5]),h.add(t[5],s,t[5]),h.clone(n,t[6]),h.add(t[6],o,t[6]),h.add(t[6],r,t[6]),h.subtract(t[6],s,t[6]),h.clone(n,t[7]),h.add(t[7],o,t[7]),h.add(t[7],r,t[7]),h.add(t[7],s,t[7]),t};var swe=new Q;wi.computeTransformation=function(e,t){l(t)||(t=new B);let n=e.center,i=Q.multiplyByUniformScale(e.halfAxes,2,swe);return B.fromRotationTranslation(i,n,t)};var awe=new oe;wi.isOccluded=function(e,t){let n=oe.fromOrientedBoundingBox(e,awe);return!t.isBoundingSphereVisible(n)};wi.prototype.intersectPlane=function(e){return wi.intersectPlane(this,e)};wi.prototype.distanceSquaredTo=function(e){return wi.distanceSquaredTo(this,e)};wi.prototype.computePlaneDistances=function(e,t,n){return wi.computePlaneDistances(this,e,t,n)};wi.prototype.computeCorners=function(e){return wi.computeCorners(this,e)};wi.prototype.computeTransformation=function(e){return wi.computeTransformation(this,e)};wi.prototype.isOccluded=function(e){return wi.isOccluded(this,e)};wi.equals=function(e,t){return e===t||l(e)&&l(t)&&h.equals(e.center,t.center)&&Q.equals(e.halfAxes,t.halfAxes)};wi.prototype.clone=function(e){return wi.clone(this,e)};wi.prototype.equals=function(e){return wi.equals(this,e)};var gi=wi;var cwe={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_ASTC_4x4_WEBGL:37808,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGBA_BPTC_UNORM:36492,HALF_FLOAT_OES:36193,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047},Z=Object.freeze(cwe);var gn={BYTE:Z.BYTE,UNSIGNED_BYTE:Z.UNSIGNED_BYTE,SHORT:Z.SHORT,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,INT:Z.INT,UNSIGNED_INT:Z.UNSIGNED_INT,FLOAT:Z.FLOAT,DOUBLE:Z.DOUBLE};gn.getSizeInBytes=function(e){switch(e){case gn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case gn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case gn.INT:return Int32Array.BYTES_PER_ELEMENT;case gn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case gn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case gn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};gn.fromTypedArray=function(e){if(e instanceof Int8Array)return gn.BYTE;if(e instanceof Uint8Array)return gn.UNSIGNED_BYTE;if(e instanceof Int16Array)return gn.SHORT;if(e instanceof Uint16Array)return gn.UNSIGNED_SHORT;if(e instanceof Int32Array)return gn.INT;if(e instanceof Uint32Array)return gn.UNSIGNED_INT;if(e instanceof Float32Array)return gn.FLOAT;if(e instanceof Float64Array)return gn.DOUBLE};gn.validate=function(e){return l(e)&&(e===gn.BYTE||e===gn.UNSIGNED_BYTE||e===gn.SHORT||e===gn.UNSIGNED_SHORT||e===gn.INT||e===gn.UNSIGNED_INT||e===gn.FLOAT||e===gn.DOUBLE)};gn.createTypedArray=function(e,t){switch(e){case gn.BYTE:return new Int8Array(t);case gn.UNSIGNED_BYTE:return new Uint8Array(t);case gn.SHORT:return new Int16Array(t);case gn.UNSIGNED_SHORT:return new Uint16Array(t);case gn.INT:return new Int32Array(t);case gn.UNSIGNED_INT:return new Uint32Array(t);case gn.FLOAT:return new Float32Array(t);case gn.DOUBLE:return new Float64Array(t)}};gn.createArrayBufferView=function(e,t,n,i){switch(n=y(n,0),i=y(i,(t.byteLength-n)/gn.getSizeInBytes(e)),e){case gn.BYTE:return new Int8Array(t,n,i);case gn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case gn.SHORT:return new Int16Array(t,n,i);case gn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case gn.INT:return new Int32Array(t,n,i);case gn.UNSIGNED_INT:return new Uint32Array(t,n,i);case gn.FLOAT:return new Float32Array(t,n,i);case gn.DOUBLE:return new Float64Array(t,n,i)}};gn.fromName=function(e){switch(e){case"BYTE":return gn.BYTE;case"UNSIGNED_BYTE":return gn.UNSIGNED_BYTE;case"SHORT":return gn.SHORT;case"UNSIGNED_SHORT":return gn.UNSIGNED_SHORT;case"INT":return gn.INT;case"UNSIGNED_INT":return gn.UNSIGNED_INT;case"FLOAT":return gn.FLOAT;case"DOUBLE":return gn.DOUBLE}};var K=Object.freeze(gn);function zt(e,t,n,i){this[0]=y(e,0),this[1]=y(n,0),this[2]=y(t,0),this[3]=y(i,0)}zt.packedLength=4;zt.pack=function(e,t,n){return n=y(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t};zt.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zt),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n};zt.packArray=function(e,t){let n=e.length,i=n*4;l(t)?!Array.isArray(t)&&t.length!==i||t.length!==i&&(t.length=i):t=new Array(i);for(let o=0;o<n;++o)zt.pack(e[o],t,o*4);return t};zt.unpackArray=function(e,t){let n=e.length;l(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){let o=i/4;t[o]=zt.unpack(e,i,t[o])}return t};zt.clone=function(e,t){if(!!l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new zt(e[0],e[2],e[1],e[3])};zt.fromArray=zt.unpack;zt.fromColumnMajorArray=function(e,t){return zt.clone(e,t)};zt.fromRowMajorArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new zt(e[0],e[1],e[2],e[3])};zt.fromScale=function(e,t){return l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new zt(e.x,0,0,e.y)};zt.fromUniformScale=function(e,t){return l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new zt(e,0,0,e)};zt.fromRotation=function(e,t){let n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=-i,t[3]=n,t):new zt(n,-i,i,n)};zt.toArray=function(e,t){return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]};zt.getElementIndex=function(e,t){return e*2+t};zt.getColumn=function(e,t,n){let i=t*2,o=e[i],r=e[i+1];return n.x=o,n.y=r,n};zt.setColumn=function(e,t,n,i){i=zt.clone(e,i);let o=t*2;return i[o]=n.x,i[o+1]=n.y,i};zt.getRow=function(e,t,n){let i=e[t],o=e[t+2];return n.x=i,n.y=o,n};zt.setRow=function(e,t,n,i){return i=zt.clone(e,i),i[t]=n.x,i[t+2]=n.y,i};var lwe=new G;zt.setScale=function(e,t,n){let i=zt.getScale(e,lwe),o=t.x/i.x,r=t.y/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var uwe=new G;zt.setUniformScale=function(e,t,n){let i=zt.getScale(e,uwe),o=t/i.x,r=t/i.y;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*r,n[3]=e[3]*r,n};var w$=new G;zt.getScale=function(e,t){return t.x=G.magnitude(G.fromElements(e[0],e[1],w$)),t.y=G.magnitude(G.fromElements(e[2],e[3],w$)),t};var v$=new G;zt.getMaximumScale=function(e){return zt.getScale(e,v$),G.maximumComponent(v$)};var fwe=new G;zt.setRotation=function(e,t,n){let i=zt.getScale(e,fwe);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.y,n[3]=t[3]*i.y,n};var dwe=new G;zt.getRotation=function(e,t){let n=zt.getScale(e,dwe);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.y,t[3]=e[3]/n.y,t};zt.multiply=function(e,t,n){let i=e[0]*t[0]+e[2]*t[1],o=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return n[0]=i,n[1]=r,n[2]=o,n[3]=s,n};zt.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n};zt.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n};zt.multiplyByVector=function(e,t,n){let i=e[0]*t.x+e[2]*t.y,o=e[1]*t.x+e[3]*t.y;return n.x=i,n.y=o,n};zt.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};zt.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n};zt.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};zt.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};zt.transpose=function(e,t){let n=e[0],i=e[2],o=e[1],r=e[3];return t[0]=n,t[1]=i,t[2]=o,t[3]=r,t};zt.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t};zt.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]};zt.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]};zt.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n};zt.IDENTITY=Object.freeze(new zt(1,0,0,1));zt.ZERO=Object.freeze(new zt(0,0,0,0));zt.COLUMN0ROW0=0;zt.COLUMN0ROW1=1;zt.COLUMN1ROW0=2;zt.COLUMN1ROW1=3;Object.defineProperties(zt.prototype,{length:{get:function(){return zt.packedLength}}});zt.prototype.clone=function(e){return zt.clone(this,e)};zt.prototype.equals=function(e){return zt.equals(this,e)};zt.prototype.equalsEpsilon=function(e,t){return zt.equalsEpsilon(this,e,t)};zt.prototype.toString=function(){return`(${this[0]}, ${this[2]})
|
|
95
95
|
(${this[1]}, ${this[3]})`};var vi=zt;var $i={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};$i.getMathType=function(e){switch(e){case $i.SCALAR:return Number;case $i.VEC2:return G;case $i.VEC3:return h;case $i.VEC4:return se;case $i.MAT2:return vi;case $i.MAT3:return Q;case $i.MAT4:return B}};$i.getNumberOfComponents=function(e){switch(e){case $i.SCALAR:return 1;case $i.VEC2:return 2;case $i.VEC3:return 3;case $i.VEC4:case $i.MAT2:return 4;case $i.MAT3:return 9;case $i.MAT4:return 16}};$i.getAttributeLocationCount=function(e){switch(e){case $i.SCALAR:case $i.VEC2:case $i.VEC3:case $i.VEC4:return 1;case $i.MAT2:return 2;case $i.MAT3:return 3;case $i.MAT4:return 4}};$i.getGlslType=function(e){switch(e){case $i.SCALAR:return"float";case $i.VEC2:return"vec2";case $i.VEC3:return"vec3";case $i.VEC4:return"vec4";case $i.MAT2:return"mat2";case $i.MAT3:return"mat3";case $i.MAT4:return"mat4"}};var jt=Object.freeze($i);var D$=1/256,P$=256,go={};go.octEncodeInRange=function(e,t,n){if(n.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),n.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){let i=n.x,o=n.y;n.x=(1-Math.abs(o))*R.signNotZero(i),n.y=(1-Math.abs(i))*R.signNotZero(o)}return n.x=R.toSNorm(n.x,t),n.y=R.toSNorm(n.y,t),n};go.octEncode=function(e,t){return go.octEncodeInRange(e,255,t)};var yS=new G,I$=new Uint8Array(1);function tI(e){return I$[0]=e,I$[0]}go.octEncodeToCartesian4=function(e,t){return go.octEncodeInRange(e,65535,yS),t.x=tI(yS.x*D$),t.y=tI(yS.x),t.z=tI(yS.y*D$),t.w=tI(yS.y),t};go.octDecodeInRange=function(e,t,n,i){if(i.x=R.fromSNorm(e,n),i.y=R.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let o=i.x;i.x=(1-Math.abs(i.y))*R.signNotZero(o),i.y=(1-Math.abs(o))*R.signNotZero(i.y)}return h.normalize(i,i)};go.octDecode=function(e,t,n){return go.octDecodeInRange(e,t,255,n)};go.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,o=e.z,r=e.w,s=n*P$+i,a=o*P$+r;return go.octDecodeInRange(s,a,65535,t)};go.octPackFloat=function(e){return 256*e.x+e.y};var PH=new G;go.octEncodeFloat=function(e){return go.octEncode(e,PH),go.octPackFloat(PH)};go.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),o=(n-i)*256;return go.octDecode(i,o,t)};go.octPack=function(e,t,n,i){let o=go.octEncodeFloat(e),r=go.octEncodeFloat(t),s=go.octEncode(n,PH);return i.x=65536*s.x+o,i.y=65536*s.y+r,i};go.octUnpack=function(e,t,n,i){let o=e.x/65536,r=Math.floor(o),s=(o-r)*65536;o=e.y/65536;let a=Math.floor(o),c=(o-a)*65536;go.octDecodeFloat(s,t),go.octDecodeFloat(c,n),go.octDecode(r,a,i)};go.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};go.decompressTextureCoordinates=function(e,t){let n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-i*4096)/4095,t};function DH(e){return e>>1^-(e&1)}go.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a<i;++a)o+=DH(e[a]),r+=DH(t[a]),e[a]=o,t[a]=r,l(n)&&(s+=DH(n[a]),n[a]=s)};go.dequantize=function(e,t,n,i){let o=jt.getNumberOfComponents(n),r;switch(t){case K.BYTE:r=127;break;case K.UNSIGNED_BYTE:r=255;break;case K.SHORT:r=32767;break;case K.UNSIGNED_SHORT:r=65535;break;case K.INT:r=2147483647;break;case K.UNSIGNED_INT:r=4294967295;break}let s=new Float32Array(i*o);for(let a=0;a<i;a++)for(let c=0;c<o;c++){let u=a*o+c;s[u]=Math.max(e[u]/r,-1)}return s};go.decodeRGB565=function(e,t){let n=e.length;l(t)||(t=new Float32Array(n*3));let i=(1<<5)-1,o=(1<<6)-1,r=1/31,s=1/63;for(let a=0;a<n;a++){let c=e[a],u=c>>11,f=c>>5&o,d=c&i,p=3*a;t[p]=u*r,t[p+1]=f*s,t[p+2]=d*r}return t};var Pn=go;var nI={};nI.getHeight=function(e,t,n){return(e-n)*t+n};var hwe=new h;nI.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,hwe),s=nI.getHeight(r.height,n,i);return h.fromRadians(r.longitude,r.latitude,s,t,o)};var nl=nI;var mwe={NONE:0,BITS12:1},Fs=Object.freeze(mwe);var ly=new h,pwe=new h,Bu=new G,iI=new B,_we=new B,gwe=Math.pow(2,12);function Va(e,t,n,i,o,r,s,a,c,u){let f=Fs.NONE,d,p;if(l(t)&&l(n)&&l(i)&&l(o)){let _=t.minimum,m=t.maximum,x=h.subtract(m,_,pwe),C=i-n;Math.max(h.maximumComponent(x),C)<gwe-1?f=Fs.BITS12:f=Fs.NONE,d=B.inverseTransformation(o,new B);let T=h.negate(_,ly);B.multiply(B.fromTranslation(T,iI),d,d);let b=ly;b.x=1/x.x,b.y=1/x.y,b.z=1/x.z,B.multiply(B.fromScale(b,iI),d,d),p=B.clone(o),B.setTranslation(p,h.ZERO,p),o=B.clone(o,new B);let S=B.fromTranslation(_,iI),w=B.fromScale(x,_we),D=B.multiply(S,w,iI);B.multiply(o,D,o),B.multiply(p,D,p)}this.quantization=f,this.minimumHeight=n,this.maximumHeight=i,this.center=h.clone(e),this.toScaledENU=d,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r,this.hasWebMercatorT=y(s,!1),this.hasGeodeticSurfaceNormals=y(a,!1),this.exaggeration=y(c,1),this.exaggerationRelativeHeight=y(u,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}Va.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,u=i.y;if(this.quantization===Fs.BITS12){n=B.multiplyByPoint(this.toScaledENU,n,ly),n.x=R.clamp(n.x,0,1),n.y=R.clamp(n.y,0,1),n.z=R.clamp(n.z,0,1);let f=this.maximumHeight-this.minimumHeight,d=R.clamp((o-this.minimumHeight)/f,0,1);G.fromElements(n.x,n.y,Bu);let p=Pn.compressTextureCoordinates(Bu);G.fromElements(n.z,d,Bu);let _=Pn.compressTextureCoordinates(Bu);G.fromElements(c,u,Bu);let m=Pn.compressTextureCoordinates(Bu);if(e[t++]=p,e[t++]=_,e[t++]=m,this.hasWebMercatorT){G.fromElements(s,0,Bu);let x=Pn.compressTextureCoordinates(Bu);e[t++]=x}}else h.subtract(n,this.center,ly),e[t++]=ly.x,e[t++]=ly.y,e[t++]=ly.z,e[t++]=o,e[t++]=c,e[t++]=u,this.hasWebMercatorT&&(e[t++]=s);return this.hasVertexNormals&&(e[t++]=Pn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var ywe=new h,O$=new h;Va.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s<o;s++){for(let f=0;f<i;f++){let d=s*i+f,p=s*r+f;t[p]=e[d]}let a=this.decodePosition(t,s,ywe),c=n.geodeticSurfaceNormal(a,O$),u=s*r+this._offsetGeodeticSurfaceNormal;t[u]=c.x,t[u+1]=c.y,t[u+2]=c.z}};Va.prototype.removeGeodeticSurfaceNormals=function(e,t){if(!this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=e.length/n;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let o=this.stride;for(let r=0;r<i;r++)for(let s=0;s<o;s++){let a=r*n+s,c=r*o+s;t[c]=e[a]}};Va.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new h),t*=this.stride,this.quantization===Fs.BITS12){let i=Pn.decompressTextureCoordinates(e[t],Bu);n.x=i.x,n.y=i.y;let o=Pn.decompressTextureCoordinates(e[t+1],Bu);return n.z=o.x,B.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],h.add(n,this.center,n)};Va.prototype.getExaggeratedPosition=function(e,t,n){n=this.decodePosition(e,t,n);let i=this.exaggeration,o=this.exaggerationRelativeHeight;if(i!==1&&this.hasGeodeticSurfaceNormals){let s=this.decodeGeodeticSurfaceNormal(e,t,O$),a=this.decodeHeight(e,t),c=nl.getHeight(a,i,o)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Va.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new G),t*=this.stride,this.quantization===Fs.BITS12?Pn.decompressTextureCoordinates(e[t+2],n):G.fromElements(e[t+4],e[t+5],n)};Va.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===Fs.BITS12?Pn.decompressTextureCoordinates(e[t+1],Bu).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Va.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===Fs.BITS12?Pn.decompressTextureCoordinates(e[t+3],Bu).x:e[t+6]};Va.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return G.fromElements(o,r,n)};Va.prototype.decodeGeodeticSurfaceNormal=function(e,t,n){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,n.x=e[t],n.y=e[t+1],n.z=e[t+2],n};Va.prototype._calculateStrideAndOffsets=function(){let e=0;switch(this.quantization){case Fs.BITS12:e+=3;break;default:e+=6}this.hasWebMercatorT&&(e+=1),this.hasVertexNormals&&(this._offsetVertexNormal=e,e+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=e,e+=3),this.stride=e};var oI={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},rI={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Va.prototype.getAttributes=function(e){let t=K.FLOAT,n=K.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function s(a,c){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:o,strideInBytes:i}),o+=c*n}if(this.quantization===Fs.NONE){s(oI.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(oI.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(oI.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(rI.compressed0,a?4:3),c&&s(rI.compressed1,1),this.hasGeodeticSurfaceNormals&&s(rI.geodeticSurfaceNormal,3)}return r};Va.prototype.getAttributeLocations=function(){return this.quantization===Fs.NONE?oI:rI};Va.clone=function(e,t){if(!!l(e))return l(t)||(t=new Va),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=h.clone(e.center),t.toScaledENU=B.clone(e.toScaledENU),t.fromScaledENU=B.clone(e.fromScaledENU),t.matrix=B.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var mc=Va;function il(e){this._ellipsoid=y(e,re.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(il.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});il.mercatorAngleToGeodeticLatitude=function(e){return R.PI_OVER_TWO-2*Math.atan(Math.exp(-e))};il.geodeticLatitudeToMercatorAngle=function(e){e>il.MaximumLatitude?e=il.MaximumLatitude:e<-il.MaximumLatitude&&(e=-il.MaximumLatitude);let t=Math.sin(e);return .5*Math.log((1+t)/(1-t))};il.MaximumLatitude=il.mercatorAngleToGeodeticLatitude(Math.PI);il.prototype.project=function(e,t){let n=this._semimajorAxis,i=e.longitude*n,o=il.geodeticLatitudeToMercatorAngle(e.latitude)*n,r=e.height;return l(t)?(t.x=i,t.y=o,t.z=r,t):new h(i,o,r)};il.prototype.unproject=function(e,t){let n=this._oneOverSemimajorAxis,i=e.x*n,o=il.mercatorAngleToGeodeticLatitude(e.y*n),r=e.z;return l(t)?(t.longitude=i,t.latitude=o,t.height=r,t):new me(i,o,r)};var Ui=il;var ph={};ph.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var IH=new h,xwe=new B,Cwe=new h,Awe=new h;ph.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=R.PI_OVER_TWO,a=R.toRadians,c=e.heightmap,u=e.width,f=e.height,d=e.skirtHeight,p=d>0,_=y(e.isGeographic,!0),m=y(e.ellipsoid,re.WGS84),x=1/m.maximumRadius,C=de.clone(e.nativeRectangle),A=de.clone(e.rectangle),T,b,S,w;l(A)?(T=A.west,b=A.south,S=A.east,w=A.north):_?(T=a(C.west),b=a(C.south),S=a(C.east),w=a(C.north)):(T=C.west*x,b=s-2*o(r(-C.south*x)),S=C.east*x,w=s-2*o(r(-C.north*x)));let D=e.relativeToCenter,O=l(D);D=O?D:h.ZERO;let I=y(e.includeWebMercatorT,!1),L=y(e.exaggeration,1),N=y(e.exaggerationRelativeHeight,0),E=L!==1,v=y(e.structure,ph.DEFAULT_STRUCTURE),P=y(v.heightScale,ph.DEFAULT_STRUCTURE.heightScale),M=y(v.heightOffset,ph.DEFAULT_STRUCTURE.heightOffset),V=y(v.elementsPerHeight,ph.DEFAULT_STRUCTURE.elementsPerHeight),U=y(v.stride,ph.DEFAULT_STRUCTURE.stride),k=y(v.elementMultiplier,ph.DEFAULT_STRUCTURE.elementMultiplier),H=y(v.isBigEndian,ph.DEFAULT_STRUCTURE.isBigEndian),F=de.computeWidth(C),Y=de.computeHeight(C),j=F/(u-1),X=Y/(f-1);_||(F*=x,Y*=x);let W=m.radiiSquared,$=W.x,J=W.y,ce=W.z,he=65536,ie=-65536,ae=_t.eastNorthUpToFixedFrame(D,m),ge=B.inverseTransformation(ae,xwe),Se,be;I&&(Se=Ui.geodeticLatitudeToMercatorAngle(b),be=1/(Ui.geodeticLatitudeToMercatorAngle(w)-Se));let Be=Cwe;Be.x=Number.POSITIVE_INFINITY,Be.y=Number.POSITIVE_INFINITY,Be.z=Number.POSITIVE_INFINITY;let Ae=Awe;Ae.x=Number.NEGATIVE_INFINITY,Ae.y=Number.NEGATIVE_INFINITY,Ae.z=Number.NEGATIVE_INFINITY;let Oe=Number.POSITIVE_INFINITY,Ge=u*f,ot=d>0?u*2+f*2:0,nt=Ge+ot,Tn=new Array(nt),Zn=new Array(nt),st=new Array(nt),kt=I?new Array(nt):[],Qn=E?new Array(nt):[],ve=0,yt=f,Kt=0,ji=u;p&&(--ve,++yt,--Kt,++ji);let si=1e-5;for(let Ye=ve;Ye<yt;++Ye){let We=Ye;We<0&&(We=0),We>=f&&(We=f-1);let $e=C.north-X*We;_?$e=a($e):$e=s-2*o(r(-$e*x));let xt=($e-b)/(w-b);xt=R.clamp(xt,0,1);let an=Ye===ve,Nn=Ye===yt-1;d>0&&(an?$e+=si*Y:Nn&&($e-=si*Y));let mo=t($e),Wo=n($e),io=ce*Wo,_i;I&&(_i=(Ui.geodeticLatitudeToMercatorAngle($e)-Se)*be);for(let Pr=Kt;Pr<ji;++Pr){let Zr=Pr;Zr<0&&(Zr=0),Zr>=u&&(Zr=u-1);let Xc=We*(u*U)+Zr*U,jo;if(V===1)jo=c[Xc];else{jo=0;let Pa;if(H)for(Pa=0;Pa<V;++Pa)jo=jo*k+c[Xc+Pa];else for(Pa=V-1;Pa>=0;--Pa)jo=jo*k+c[Xc+Pa]}jo=jo*P+M,ie=Math.max(ie,jo),he=Math.min(he,jo);let gr=C.west+j*Zr;_?gr=a(gr):gr=gr*x;let aa=(gr-T)/(S-T);aa=R.clamp(aa,0,1);let Do=We*u+Zr;if(d>0){let Pa=Pr===Kt,Q0=Pr===ji-1,h_=an||Nn||Pa||Q0;if((an||Nn)&&(Pa||Q0))continue;h_&&(jo-=d,Pa?(Do=Ge+(f-We-1),gr-=si*F):Nn?Do=Ge+f+(u-Zr-1):Q0?(Do=Ge+f+u+We,gr+=si*F):an&&(Do=Ge+f+u+f+Zr))}let Ls=mo*t(gr),oo=mo*n(gr),J0=$*Ls,po=J*oo,Ll=i(J0*Ls+po*oo+io*Wo),Kc=1/Ll,d_=J0*Kc,ca=po*Kc,$c=io*Kc,uc=new h;uc.x=d_+Ls*jo,uc.y=ca+oo*jo,uc.z=$c+Wo*jo,B.multiplyByPoint(ge,uc,IH),h.minimumByComponent(IH,Be,Be),h.maximumByComponent(IH,Ae,Ae),Oe=Math.min(Oe,jo),Tn[Do]=uc,st[Do]=new G(aa,xt),Zn[Do]=jo,I&&(kt[Do]=_i),E&&(Qn[Do]=m.geodeticSurfaceNormal(uc))}}let vo=oe.fromPoints(Tn),ir;l(A)&&(ir=gi.fromRectangle(A,he,ie,m));let _r;O&&(_r=new y_(m).computeHorizonCullingPointPossiblyUnderEllipsoid(D,Tn,he));let Vi=new ry(Be,Ae,D),Lo=new mc(D,Vi,Oe,ie,ae,!1,I,E,L,N),Bs=new Float32Array(nt*Lo.stride),ke=0;for(let Ye=0;Ye<nt;++Ye)ke=Lo.encode(Bs,ke,Tn[Ye],st[Ye],Zn[Ye],void 0,kt[Ye],Qn[Ye]);return{vertices:Bs,maximumHeight:ie,minimumHeight:he,encoding:Lo,boundingSphere3D:vo,orientedBoundingBox:ir,occludeePointInScaledSpace:_r}};var xS=ph;function Twe(){return!0}function bwe(e,t){t=y(t,"This object was destroyed, i.e., destroy() was called.");function n(){}for(let i in e)typeof e[i]=="function"&&(e[i]=n);e.isDestroyed=Twe}var ue=bwe;function R$(){if(!l(la._canTransferArrayBuffer)){let e=new Worker(B$("Workers/transferTypedArrayTest.js"));e.postMessage=y(e.webkitPostMessage,e.postMessage);let t=99,n=new Int8Array([t]);try{e.postMessage({array:n},[n.buffer])}catch{return la._canTransferArrayBuffer=!1,la._canTransferArrayBuffer}let i=Qr();e.onmessage=function(o){let r=o.data.array,s=l(r)&&r[0]===t;i.resolve(s),e.terminate(),la._canTransferArrayBuffer=s},la._canTransferArrayBuffer=i.promise}return la._canTransferArrayBuffer}var RH=new _e;function M$(e,t){--e._activeTasks;let n=t.id;if(!l(n))return;let i=e._deferreds,o=i[n];if(l(t.error)){let r=t.error;r.name==="RuntimeError"?(r=new fe(t.error.message),r.stack=t.error.stack):r.name==="DeveloperError"&&(r=new ye(t.error.message),r.stack=t.error.stack),RH.raiseEvent(r),o.reject(r)}else RH.raiseEvent(),o.resolve(t.result);delete i[n]}function B$(e){let t=Jt(e);if(YC(t)){let n=`importScripts("${t}");`,i;try{i=new Blob([n],{type:"application/javascript"})}catch{let s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,a=new s;a.append(n),i=a.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}var OH;function Ewe(){return l(OH)||(OH=B$("Workers/cesiumWorkerBootstrapper.js")),OH}function L$(e){let t=new Worker(Ewe());t.postMessage=y(t.webkitPostMessage,t.postMessage);let n={loaderConfig:{paths:{Workers:Jt("Workers")},baseUrl:Jt.getCesiumBaseUrl().url},workerModule:e._workerPath};return t.postMessage(n),t.onmessage=function(i){M$(e,i.data)},t}function Swe(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!Et.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new fe(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Jt(t.fallbackModulePath),Promise.resolve(n)}return n.modulePath=Jt(t.modulePath),n.wasmBinaryFile=Jt(t.wasmBinaryFile),De.fetchArrayBuffer({url:n.wasmBinaryFile}).then(function(i){return n.wasmBinary=i,n})}function la(e,t){let n=new ei.default(e);this._workerPath=n.scheme().length!==0&&n.fragment().length===0?e:la._workerModulePrefix+e,this._maximumActiveTasks=y(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._deferreds={},this._nextID=0}var wwe=[];la.prototype.scheduleTask=function(e,t){if(l(this._worker)||(this._worker=L$(this)),this._activeTasks>=this._maximumActiveTasks)return;++this._activeTasks;let n=this;return Promise.resolve(R$()).then(function(i){l(t)?i||(t.length=0):t=wwe;let o=n._nextID++,r=Qr();return n._deferreds[o]=r,n._worker.postMessage({id:o,parameters:e,canTransferArrayBuffer:i},t),r.promise})};la.prototype.initWebAssemblyModule=function(e){l(this._worker)||(this._worker=L$(this));let t=Qr(),n=this,i=this._worker;return Swe(this,e).then(function(o){return Promise.resolve(R$()).then(function(r){let s,a=o.wasmBinary;l(a)&&r&&(s=[a]),i.onmessage=function(c){i.onmessage=function(u){M$(n,u.data)},t.resolve(c.data)},i.postMessage({webAssemblyConfig:o},s)})}),t.promise};la.prototype.isDestroyed=function(){return!1};la.prototype.destroy=function(){return l(this._worker)&&this._worker.terminate(),ue(this)};la.taskCompletedEvent=RH;la._defaultWorkerModulePrefix="Workers/";la._workerModulePrefix=la._defaultWorkerModulePrefix;la._canTransferArrayBuffer=void 0;var Di=la;function w_(){ye.throwInstantiationError()}Object.defineProperties(w_.prototype,{credits:{get:ye.throwInstantiationError},waterMask:{get:ye.throwInstantiationError}});w_.prototype.interpolateHeight=ye.throwInstantiationError;w_.prototype.isChildAvailable=ye.throwInstantiationError;w_.prototype.createMesh=ye.throwInstantiationError;w_.prototype.upsample=ye.throwInstantiationError;w_.prototype.wasCreatedByUpsampling=ye.throwInstantiationError;w_.maximumAsynchronousTasks=5;var _h=w_;function vwe(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){this.center=e,this.vertices=t,this.stride=y(u,6),this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.boundingSphere3D=a,this.occludeePointInScaledSpace=c,this.orientedBoundingBox=f,this.encoding=d,this.westIndicesSouthToNorth=p,this.southIndicesEastToWest=_,this.eastIndicesNorthToSouth=m,this.northIndicesWestToEast=x}var $f=vwe;var bs={UNSIGNED_BYTE:Z.UNSIGNED_BYTE,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,UNSIGNED_INT:Z.UNSIGNED_INT};bs.getSizeInBytes=function(e){switch(e){case bs.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case bs.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case bs.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};bs.fromSizeInBytes=function(e){switch(e){case 2:return bs.UNSIGNED_SHORT;case 4:return bs.UNSIGNED_INT;case 1:return bs.UNSIGNED_BYTE}};bs.validate=function(e){return l(e)&&(e===bs.UNSIGNED_BYTE||e===bs.UNSIGNED_SHORT||e===bs.UNSIGNED_INT)};bs.createTypedArray=function(e,t){return e>=R.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};bs.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=R.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};bs.fromTypedArray=function(e){if(e instanceof Uint8Array)return bs.UNSIGNED_BYTE;if(e instanceof Uint16Array)return bs.UNSIGNED_SHORT;if(e instanceof Uint32Array)return bs.UNSIGNED_INT};var Ne=Object.freeze(bs);function pc(){ye.throwInstantiationError()}Object.defineProperties(pc.prototype,{errorEvent:{get:ye.throwInstantiationError},credit:{get:ye.throwInstantiationError},tilingScheme:{get:ye.throwInstantiationError},ready:{get:ye.throwInstantiationError},readyPromise:{get:ye.throwInstantiationError},hasWaterMask:{get:ye.throwInstantiationError},hasVertexNormals:{get:ye.throwInstantiationError},availability:{get:ye.throwInstantiationError}});var N$=[];pc.getRegularGridIndices=function(e,t){let n=N$[e];l(n)||(N$[e]=n=[]);let i=n[t];return l(i)||(e*t<R.SIXTY_FOUR_KILOBYTES?i=n[t]=new Uint16Array((e-1)*(t-1)*6):i=n[t]=new Uint32Array((e-1)*(t-1)*6),U$(e,t,i,0)),i};var F$=[];pc.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=F$[e];l(n)||(F$[e]=n=[]);let i=n[t];if(!l(i)){let o=pc.getRegularGridIndices(e,t),r=k$(e,t),s=r.westIndicesSouthToNorth,a=r.southIndicesEastToWest,c=r.eastIndicesNorthToSouth,u=r.northIndicesWestToEast;i=n[t]={indices:o,westIndicesSouthToNorth:s,southIndicesEastToWest:a,eastIndicesNorthToSouth:c,northIndicesWestToEast:u}}return i};var V$=[];pc.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=V$[e];l(n)||(V$[e]=n=[]);let i=n[t];if(!l(i)){let o=e*t,r=(e-1)*(t-1)*6,s=e*2+t*2,a=Math.max(0,s-4)*6,c=o+s,u=r+a,f=k$(e,t),d=f.westIndicesSouthToNorth,p=f.southIndicesEastToWest,_=f.eastIndicesNorthToSouth,m=f.northIndicesWestToEast,x=Ne.createTypedArray(c,u);U$(e,t,x,0),pc.addSkirtIndices(d,p,_,m,o,x,r),i=n[t]={indices:x,westIndicesSouthToNorth:d,southIndicesEastToWest:p,eastIndicesNorthToSouth:_,northIndicesWestToEast:m,indexCountWithoutSkirts:r}}return i};pc.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=sI(e,a,r,s),a+=e.length,s=sI(t,a,r,s),a+=t.length,s=sI(n,a,r,s),a+=n.length,sI(i,a,r,s)};function k$(e,t){let n=new Array(t),i=new Array(e),o=new Array(t),r=new Array(e),s;for(s=0;s<e;++s)r[s]=s,i[s]=e*t-1-s;for(s=0;s<t;++s)o[s]=(s+1)*e-1,n[s]=(t-s-1)*e;return{westIndicesSouthToNorth:n,southIndicesEastToWest:i,eastIndicesNorthToSouth:o,northIndicesWestToEast:r}}function U$(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){let a=o,c=a+e,u=c+1,f=a+1;n[i++]=a,n[i++]=c,n[i++]=f,n[i++]=f,n[i++]=c,n[i++]=u,++o}++o}}function sI(e,t,n,i){let o=e[0],r=e.length;for(let s=1;s<r;++s){let a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}pc.heightmapTerrainQuality=.25;pc.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*pc.heightmapTerrainQuality/(t*n)};pc.prototype.requestTileGeometry=ye.throwInstantiationError;pc.prototype.getLevelMaximumGeometricError=ye.throwInstantiationError;pc.prototype.getTileDataAvailable=ye.throwInstantiationError;pc.prototype.loadTileDataAvailability=ye.throwInstantiationError;var es=pc;function zm(e){this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=y(e.childTileMask,15),this._encoding=y(e.encoding,Vm.NONE);let t=xS.DEFAULT_STRUCTURE,n=e.structure;l(n)?n!==t&&(n.heightScale=y(n.heightScale,t.heightScale),n.heightOffset=y(n.heightOffset,t.heightOffset),n.elementsPerHeight=y(n.elementsPerHeight,t.elementsPerHeight),n.stride=y(n.stride,t.stride),n.elementMultiplier=y(n.elementMultiplier,t.elementMultiplier),n.isBigEndian=y(n.isBigEndian,t.isBigEndian)):n=t,this._structure=n,this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===Vm.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(zm.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var z$="createVerticesFromHeightmap",Dwe=new Di(z$),Pwe=new Di(z$,_h.maximumAsynchronousTasks);zm.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,u=t.tileXYToNativeRectangle(n,i,o),f=t.tileXYToRectangle(n,i,o),d=c.cartographicToCartesian(de.center(f)),p=this._structure,m=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(c,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(m*4,1e3);let C=(a?Pwe:Dwe).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:u,rectangle:f,relativeToCenter:d,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Si,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(C))return;let A=this;return Promise.resolve(C).then(function(T){let b;A._skirtHeight>0?b=es.getRegularGridAndSkirtIndicesAndEdgeIndices(T.gridWidth,T.gridHeight):b=es.getRegularGridIndicesAndEdgeIndices(T.gridWidth,T.gridHeight);let S=T.gridWidth*T.gridHeight;return A._mesh=new $f(d,new Float32Array(T.vertices),b.indices,b.indexCountWithoutSkirts,S,T.minimumHeight,T.maximumHeight,oe.clone(T.boundingSphere3D),h.clone(T.occludeePointInScaledSpace),T.numberOfAttributes,gi.clone(T.orientedBoundingBox),mc.clone(T.encoding),b.westIndicesSouthToNorth,b.southIndicesEastToWest,b.eastIndicesNorthToSouth,b.northIndicesWestToEast),A._buffer=void 0,A._mesh})};zm.prototype._createMeshSync=function(e){let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=t.ellipsoid,c=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),f=a.cartographicToCartesian(de.center(u)),d=this._structure,_=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(_*4,1e3);let m=xS.computeVertices({heightmap:this._buffer,structure:d,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:u,relativeToCenter:f,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Si,exaggeration:r,exaggerationRelativeHeight:s});this._buffer=void 0;let x;this._skirtHeight>0?x=es.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):x=es.getRegularGridIndicesAndEdgeIndices(this._width,this._height);let C=m.gridWidth*m.gridHeight;return this._mesh=new $f(f,m.vertices,x.indices,x.indexCountWithoutSkirts,C,m.minimumHeight,m.maximumHeight,m.boundingSphere3D,m.occludeePointInScaledSpace,m.encoding.stride,m.orientedBoundingBox,m.encoding,x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),this._mesh};zm.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,u=r.isBigEndian,f=r.heightOffset,d=r.heightScale,p=l(this._mesh),_=this._encoding===Vm.LERC;if(!p&&_)return;let x;if(p){let C=this._mesh.vertices,A=this._mesh.encoding;x=H$(C,A,f,d,e,i,o,t,n)}else x=Iwe(this._buffer,a,c,s,u,e,i,o,t,n),x=x*d+f;return x};zm.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,u=this._height,f=this._structure,d=f.stride,p=new this._bufferType(c*u*d),_=a.vertices,m=a.encoding,x=e.tileXYToRectangle(t,n,i),C=e.tileXYToRectangle(o,r,s),A=f.heightOffset,T=f.heightScale,b=f.elementsPerHeight,S=f.elementMultiplier,w=f.isBigEndian,D=Math.pow(S,b-1);for(let O=0;O<u;++O){let I=R.lerp(C.north,C.south,O/(u-1));for(let L=0;L<c;++L){let N=R.lerp(C.west,C.east,L/(c-1)),g=H$(_,m,A,T,x,c,u,N,I);g=g<f.lowestEncodedHeight?f.lowestEncodedHeight:g,g=g>f.highestEncodedHeight?f.highestEncodedHeight:g,Owe(p,b,S,D,d,w,O*c+L,g)}}return Promise.resolve(new zm({buffer:p,width:c,height:u,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};zm.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};zm.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function Iwe(e,t,n,i,o,r,s,a,c,u){let f=(c-r.west)*(s-1)/(r.east-r.west),d=(u-r.south)*(a-1)/(r.north-r.south),p=f|0,_=p+1;_>=s&&(_=s-1,p=s-2);let m=d|0,x=m+1;x>=a&&(x=a-1,m=a-2);let C=f-p,A=d-m;m=a-1-m,x=a-1-x;let T=aI(e,t,n,i,o,m*s+p),b=aI(e,t,n,i,o,m*s+_),S=aI(e,t,n,i,o,x*s+p),w=aI(e,t,n,i,o,x*s+_);return G$(C,A,T,b,S,w)}function H$(e,t,n,i,o,r,s,a,c){let u=(a-o.west)*(r-1)/(o.east-o.west),f=(c-o.south)*(s-1)/(o.north-o.south),d=u|0,p=d+1;p>=r&&(p=r-1,d=r-2);let _=f|0,m=_+1;m>=s&&(m=s-1,_=s-2);let x=u-d,C=f-_;_=s-1-_,m=s-1-m;let A=(t.decodeHeight(e,_*r+d)-n)/i,T=(t.decodeHeight(e,_*r+p)-n)/i,b=(t.decodeHeight(e,m*r+d)-n)/i,S=(t.decodeHeight(e,m*r+p)-n)/i;return G$(x,C,A,T,b,S)}function G$(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function aI(e,t,n,i,o,r){r*=i;let s=0,a;if(o)for(a=0;a<t;++a)s=s*n+e[r+a];else for(a=t-1;a>=0;--a)s=s*n+e[r+a];return s}function Owe(e,t,n,i,o,r,s,a){s*=o;let c;if(r)for(c=0;c<t-1;++c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;else for(c=t-1;c>0;--c)e[s+c]=a/i|0,a-=e[s+c]*i,i/=n;e[s+c]=a}var ka=zm;function cA(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var uy=new de;function Rwe(e,t,n,i){let o=i.length;for(let r=0;r<o;++r){let s=i[r];if(s.x===t&&s.y===n&&s.level===e)return!0}return!1}cA.prototype.addAvailableTileRange=function(e,t,n,i,o){let r=this._tilingScheme,s=this._rootNodes;if(e===0)for(let p=n;p<=o;++p)for(let _=t;_<=i;++_)Rwe(e,_,p,s)||s.push(new sA(r,void 0,0,_,p));r.tileXYToRectangle(t,n,e,uy);let a=uy.west,c=uy.north;r.tileXYToRectangle(i,o,e,uy);let u=uy.east,f=uy.south,d=new Fwe(e,a,f,u,c);for(let p=0;p<s.length;++p){let _=s[p];MH(_.extent,d)&&Vwe(this._maximumLevel,_,d)}};cA.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(aA(i.extent,e)){t=i;break}}return l(t)?CS(void 0,t,e):-1};var Mwe=[],Bwe=[],Lwe=new de,Nwe=new de;cA.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=Mwe;t.length=0,e.east<e.west?(t.push(de.fromRadians(-Math.PI,e.south,e.east,e.north,Lwe)),t.push(de.fromRadians(e.west,e.south,Math.PI,e.north,Nwe))):t.push(e);let n=Bwe;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)AS(n,this._rootNodes[i],t);for(i=n.length-1;i>=0;--i)if(l(n[i])&&n[i].length===0)return i;return 0};var W$=new me;cA.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,uy);return de.center(i,W$),this.computeMaximumLevelAtPosition(W$)>=e};cA.prototype.computeChildMaskForTile=function(e,t,n){let i=e+1;if(i>=this._maximumLevel)return 0;let o=0;return o|=this.isTileAvailable(i,2*t,2*n+1)?1:0,o|=this.isTileAvailable(i,2*t+1,2*n+1)?2:0,o|=this.isTileAvailable(i,2*t,2*n)?4:0,o|=this.isTileAvailable(i,2*t+1,2*n)?8:0,o};function sA(e,t,n,i,o){this.tilingScheme=e,this.parent=t,this.level=n,this.x=i,this.y=o,this.extent=e.tileXYToRectangle(i,o,n),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}Object.defineProperties(sA.prototype,{nw:{get:function(){return this._nw||(this._nw=new sA(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new sA(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new sA(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new sA(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function Fwe(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function MH(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function Vwe(e,t,n){for(;t.level<e;)if(cI(t.nw.extent,n))t=t.nw;else if(cI(t.ne.extent,n))t=t.ne;else if(cI(t.sw.extent,n))t=t.sw;else if(cI(t.se.extent,n))t=t.se;else break;if(t.rectangles.length===0||t.rectangles[t.rectangles.length-1].level<=n.level)t.rectangles.push(n);else{let i=ar(t.rectangles,n.level,kwe);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function kwe(e,t){return e.level-t}function cI(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function aA(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function CS(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&aA(t._nw.extent,n),s=t._ne&&aA(t._ne.extent,n),a=t._sw&&aA(t._sw.extent,n),c=t._se&&aA(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,CS(t,t._nw,n))),s&&(i=Math.max(i,CS(t,t._ne,n))),a&&(i=Math.max(i,CS(t,t._sw,n))),c&&(i=Math.max(i,CS(t,t._se,n)));break}else r?t=t._nw:s?t=t._ne:a?t=t._sw:c?t=t._se:o=!0}for(;t!==e;){let r=t.rectangles;for(let s=r.length-1;s>=0&&r[s].level>i;--s){let a=r[s];aA(a,n)&&(i=a.level)}t=t.parent}return i}function AS(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||MH(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=Uwe(e[s.level],s)}AS(e,t._nw,n),AS(e,t._ne,n),AS(e,t._sw,n),AS(e,t._se,n)}function Uwe(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];MH(o,t)?(o.west<t.west&&n.push(new de(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new de(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new de(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new de(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var gh=cA;var j$={};function TS(e,t){l(j$[e])||(j$[e]=!0,console.warn(y(t,e)))}TS.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";TS.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";TS.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";TS.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var Mt=TS;function zwe(e,t){Mt(e,t)}var ci=zwe;function Hwe(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=`
|
|
96
|
-
${o}`),t}var Hm=Hwe;function v_(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=y(r,0),this.retry=!1,this.error=s}v_.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new v_(t,i,o,r,s,0,a),n.numberOfListeners>0?n.raiseEvent(c):console.log(`An error occurred in "${t.constructor.name}": ${Hm(i)}`),c};v_.handleError=function(e,t,n,i,o,r,s,a,c){ci("TileProviderError.handleError","TileProviderError.handleError was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportError instead.");let u=v_.reportError(e,t,n,i,o,r,s,c);return u.retry&&l(a)&&a(),u};v_.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};v_.handleSuccess=function(e){ci("TileProviderError.handleSuccess","TileProviderError.handleSuccess was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportSuccess instead."),v_.reportSuccess(e)};var Gn=v_;function D_(e){if(e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1),this._projection=new Ui(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new G(-i,-i),this._rectangleNortheastInMeters=new G(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new de(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(D_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});D_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};D_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};D_.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(de.southwest(e)),o=n.project(de.northeast(e));return l(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new de(i.x,i.y,o.x,o.y)};D_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,c=this._rectangleSouthwestInMeters.x+(e+1)*s,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,f=this._rectangleNortheastInMeters.y-t*u,d=this._rectangleNortheastInMeters.y-(t+1)*u;return l(i)?(i.west=a,i.south=d,i.east=c,i.north=f,i):new de(a,d,c,f)};D_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new G(o.west,o.south)),a=r.unproject(new G(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};D_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,d=this._projection.project(e),p=d.x-this._rectangleSouthwestInMeters.x,_=this._rectangleNortheastInMeters.y-d.y,m=p/a|0;m>=o&&(m=o-1);let x=_/u|0;return x>=r&&(x=r-1),l(n)?(n.x=m,n.y=x,n):new G(m,x)};var ts=D_;var Gwe=15;function lA(e){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let n=this,i=y(e.ellipsoid,re.WGS84);this._readyPromise=Promise.resolve(e.url).then(function(o){let r=De.createIfNeeded(o);return r.appendForwardSlash(),l(t)&&(r=r.getDerivedResource({queryParameters:{token:t}})),n._resource=r,r.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(o){let r=o.copyrightText;l(r)&&(n._credit=new Ht(r));let s=o.spatialReference,a=y(s.latestWkid,s.wkid),c=o.extent,u={ellipsoid:i};if(a===4326)u.rectangle=de.fromDegrees(c.xmin,c.ymin,c.xmax,c.ymax),n._tilingScheme=new Xi(u);else if(a===3857)u.rectangleSouthwestInMeters=new G(c.xmin,c.ymin),u.rectangleNortheastInMeters=new G(c.xmax,c.ymax),n._tilingScheme=new ts(u);else return Promise.reject(new fe("Invalid spatial reference"));let f=o.tileInfo;return l(f)?(n._width=f.rows+1,n._height=f.cols+1,n._encoding=f.format==="LERC"?Vm.LERC:Vm.NONE,n._lodCount=f.lods.length-1,(n._hasAvailability=o.capabilities.indexOf("Tilemap")!==-1)&&(n._tilesAvailable=new gh(n._tilingScheme,n._lodCount),n._tilesAvailable.addAvailableTileRange(0,0,0,n._tilingScheme.getNumberOfXTilesAtLevel(0),n._tilingScheme.getNumberOfYTilesAtLevel(0)),n._tilesAvailablityLoaded=new gh(n._tilingScheme,n._lodCount)),n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._width,n._tilingScheme.getNumberOfXTilesAtLevel(0)),o.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),n._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:o.minValues[0],highestEncodedHeight:o.maxValues[0]},n._ready=!0,!0):Promise.reject(new fe("tileInfo is required"))}).catch(function(o){let r=`An error occurred while accessing ${n._resource.url}.`;return Gn.reportError(void 0,n,n._errorEvent,r),Promise.reject(o)}),this._errorEvent=new _e}Object.defineProperties(lA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});lA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(BH(this,n+1,e*2,t*2))){let d=q$(this,n+1,e*2,t*2);s=d.promise,a=d.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let u=this,f=this._tilesAvailable;return Promise.all([c,s]).then(function(d){return new ka({buffer:d[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):Gwe,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(function(d){return l(a)&&a.state===ui.CANCELLED?(i.cancel(),i.deferred.promise.finally(function(){return i.state=ui.CANCELLED,Promise.reject(d)})):Promise.reject(d)})};function BH(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailablityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}lA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};lA.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=BH(this,n,e,t);if(l(i))return i;q$(this,n,e,t)};lA.prototype.loadTileDataAvailability=function(e,t,n){};function Wwe(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},u=new G(e.x+1,e.y+1),f=!1,d=!1;for(;!(f&&d);){let p=u.x,_=d?u.y+1:u.y;if(!f){for(let m=e.y;m<_;++m)if(i[m*t+u.x]!==s){f=!0;break}f?(a.push(new G(u.x,e.y)),--u.x,--p,c.endX=u.x):u.x===o?(c.endX=u.x,f=!0):++u.x}if(!d){let m=u.y*t;for(let x=e.x;x<=p;++x)if(i[m+x]!==s){d=!0;break}d?(a.push(new G(e.x,u.y)),--u.y,c.endY=u.y):u.y===r?(c.endY=u.y,d=!0):++u.y}}return{endingIndices:a,range:c,value:s}}function jwe(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new G(0,0)];for(;a.length>0;){let c=a.pop(),u=Wwe(c,n,i,o);if(u.value===1){let d=u.range;d.startX+=e,d.endX+=e,d.startY+=t,d.endY+=t,r.push(d)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return r}function q$(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let u=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN}),d=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return l(d)?(d=d.then(function(p){let _=jwe(o,r,s,s,p.data);e._tilesAvailablityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let m=e._tilesAvailable;for(let x=0;x<_.length;++x){let C=_[x];m.addAvailableTileRange(t,C.startX,C.startY,C.endX,C.endY)}return BH(e,t,n,i)}),c[a]={promise:d,request:u},d=d.finally(function(p){return delete c[a],p}),{promise:d,request:u}):{}}var Y$=lA;var qwe={NONE:0,GEODESIC:1,RHUMB:2},Yt=Object.freeze(qwe);var X$=R.EPSILON10;function Ywe(e,t,n,i){if(!l(e))return;n=y(n,!1);let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,u,f=0,d=-1;for(s=1;s<r;++s)c=e[s],t(a,c,X$)?(l(u)||(u=e.slice(0,s),f=s-1,d=0),o&&i.push(s)):(l(u)&&(u.push(c),f=s,o&&(d=i.length)),a=c);return n&&t(e[0],e[r-1],X$)&&(o&&(l(u)?i.splice(d,0,f):i.push(r-1)),l(u)?u.length-=1:u=e.slice(0,-1)),l(u)?u:e}var So=Ywe;var Xwe={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"},_c=Object.freeze(Xwe);function fy(){this._array=[],this._hash={}}Object.defineProperties(fy.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}});fy.prototype.contains=function(e){return l(this._hash[e])};fy.prototype.set=function(e,t){let n=this._hash[e];t!==n&&(this.remove(e),this._hash[e]=t,this._array.push(t))};fy.prototype.get=function(e){return this._hash[e]};fy.prototype.remove=function(e){let t=this._hash[e],n=l(t);if(n){let i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n};fy.prototype.removeAll=function(){let e=this._array;e.length>0&&(this._hash={},e.length=0)};var gt=fy;var K$=new h,$$=new h,Z$=new h;function Kwe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,u,f,d,p;if(l(t.z)){if(h.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,K$),s=h.subtract(i,t,$$),a=h.subtract(e,t,Z$),c=h.dot(r,r),u=h.dot(r,s),f=h.dot(r,a),d=h.dot(s,s),p=h.dot(s,a)}else{if(G.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(G.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(G.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=G.subtract(n,t,K$),s=G.subtract(i,t,$$),a=G.subtract(e,t,Z$),c=G.dot(r,r),u=G.dot(r,s),f=G.dot(r,a),d=G.dot(s,s),p=G.dot(s,a)}o.y=d*f-u*p,o.z=c*p-u*f;let _=c*d-u*u;if(_!==0)return o.y/=_,o.z/=_,o.x=1-o.y-o.z,o}var uA=Kwe;var J$="https://dev.virtualearth.net/REST/v1/Locations";function LH(e){e=y(e,y.EMPTY_OBJECT);let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new De({url:J$,queryParameters:n})}Object.defineProperties(LH.prototype,{url:{get:function(){return J$}},key:{get:function(){return this._key}}});LH.prototype.geocode=function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],u=r[3];return{displayName:o.name,destination:de.fromDegrees(a,s,u,c)}})})};var Q$=LH;function Rr(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.width=y(n,0),this.height=y(i,0)}Rr.packedLength=4;Rr.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Rr.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Rr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Rr.fromPoints=function(e,t){if(l(t)||(t=new Rr),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let c=e[a],u=c.x,f=c.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(f,o),s=Math.max(f,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};var $we=new Si,Zwe=new me,Jwe=new me;Rr.fromRectangle=function(e,t,n){if(l(n)||(n=new Rr),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;t=y(t,$we);let i=t.project(de.southwest(e,Zwe)),o=t.project(de.northeast(e,Jwe));return G.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};Rr.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Rr(e.x,e.y,e.width,e.height)};Rr.union=function(e,t,n){l(n)||(n=new Rr);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n};Rr.expand=function(e,t,n){n=Rr.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Rr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?Zt.OUTSIDE:Zt.INTERSECTING};Rr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Rr.prototype.clone=function(e){return Rr.clone(this,e)};Rr.prototype.intersect=function(e){return Rr.intersect(this,e)};Rr.prototype.equals=function(e){return Rr.equals(this,e)};var qe=Rr;var Qwe={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Zf=Object.freeze(Qwe);var ua={POINTS:Z.POINTS,LINES:Z.LINES,LINE_LOOP:Z.LINE_LOOP,LINE_STRIP:Z.LINE_STRIP,TRIANGLES:Z.TRIANGLES,TRIANGLE_STRIP:Z.TRIANGLE_STRIP,TRIANGLE_FAN:Z.TRIANGLE_FAN};ua.isLines=function(e){return e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP};ua.isTriangles=function(e){return e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};ua.validate=function(e){return e===ua.POINTS||e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP||e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};var Le=Object.freeze(ua);function NH(e){e=y(e,y.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=y(e.primitiveType,Le.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=y(e.geometryType,Zf.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}NH.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var eve=new me,tve=new h,eZ=new B,nve=[new me,new me,new me],ive=[new G,new G,new G],ove=[new G,new G,new G],rve=new h,sve=new Me,ave=new B,cve=new vi;NH._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=de.center(i,eve),s=me.toCartesian(r,n,tve),a=_t.eastNorthUpToFixedFrame(s,n,eZ),c=B.inverse(a,eZ),u=ive,f=nve;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let d=rve;for(o=0;o<3;o++)me.toCartesian(f[o],n,d),d=B.multiplyByPointAsVector(c,d,d),u[o].x=d.x,u[o].y=d.y;let p=Me.fromAxisAngle(h.UNIT_Z,-t,sve),_=Q.fromQuaternion(p,ave),m=e.length,x=Number.POSITIVE_INFINITY,C=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(o=0;o<m;o++)d=B.multiplyByPointAsVector(c,e[o],d),d=Q.multiplyByVector(_,d,d),x=Math.min(x,d.x),C=Math.min(C,d.y),A=Math.max(A,d.x),T=Math.max(T,d.y);let b=vi.fromRotation(t,cve),S=ove;S[0].x=x,S[0].y=C,S[1].x=x,S[1].y=T,S[2].x=A,S[2].y=C;let w=u[0],D=u[2].x-w.x,O=u[1].y-w.y;for(o=0;o<3;o++){let E=S[o];vi.multiplyByVector(b,E,E),E.x=(E.x-w.x)/D,E.y=(E.y-w.y)/O}let I=S[0],L=S[1],N=S[2],g=new Array(6);return G.pack(I,g),G.pack(L,g,2),G.pack(N,g,4),g};var ct=NH;function lve(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.values=e.values}var Ee=lve;function uve(e){e=y(e,y.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var ln=uve;var fve={NONE:0,TOP:1,ALL:2},tn=Object.freeze(fve);function ns(e){e=y(e,y.EMPTY_OBJECT),this.position=y(e.position,!1),this.normal=y(e.normal,!1),this.st=y(e.st,!1),this.bitangent=y(e.bitangent,!1),this.tangent=y(e.tangent,!1),this.color=y(e.color,!1)}ns.POSITION_ONLY=Object.freeze(new ns({position:!0}));ns.POSITION_AND_NORMAL=Object.freeze(new ns({position:!0,normal:!0}));ns.POSITION_NORMAL_AND_ST=Object.freeze(new ns({position:!0,normal:!0,st:!0}));ns.POSITION_AND_ST=Object.freeze(new ns({position:!0,st:!0}));ns.POSITION_AND_COLOR=Object.freeze(new ns({position:!0,color:!0}));ns.ALL=Object.freeze(new ns({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));ns.DEFAULT=ns.POSITION_NORMAL_AND_ST;ns.packedLength=6;ns.pack=function(e,t,n){return n=y(n,0),t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};ns.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ns),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};ns.clone=function(e,t){if(!!l(e))return l(t)||(t=new ns),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Pe=ns;var dve=new h;function Fl(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum,i=y(e.vertexFormat,Pe.DEFAULT);this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Fl.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new Fl({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};Fl.fromAxisAlignedBoundingBox=function(e){return new Fl({minimum:e.minimum,maximum:e.maximum})};Fl.packedLength=2*h.packedLength+Pe.packedLength+1;Fl.pack=function(e,t,n){return n=y(n,0),h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Pe.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Pe.packedLength]=y(e._offsetAttribute,-1),t};var nZ=new h,iZ=new h,oZ=new Pe,tZ={minimum:nZ,maximum:iZ,vertexFormat:oZ,offsetAttribute:void 0};Fl.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,nZ),o=h.unpack(e,t+h.packedLength,iZ),r=Pe.unpack(e,t+2*h.packedLength,oZ),s=e[t+2*h.packedLength+Pe.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(o,n._maximum),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(tZ.offsetAttribute=s===-1?void 0:s,new Fl(tZ))};Fl.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let o=new ln,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(6*4*3),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(6*2*3),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=4+2,r[7]=4+1,r[8]=4+0,r[9]=4+3,r[10]=4+2,r[11]=4+0,r[12]=8+0,r[13]=8+1,r[14]=8+2,r[15]=8+0,r[16]=8+2,r[17]=8+3,r[18]=12+2,r[19]=12+1,r[20]=12+0,r[21]=12+3,r[22]=12+2,r[23]=12+0,r[24]=16+2,r[25]=16+1,r[26]=16+0,r[27]=16+3,r[28]=16+2,r[29]=16+0,r[30]=20+0,r[31]=20+1,r[32]=20+2,r[33]=20+0,r[34]=20+2,r[35]=20+3}else s=new Float64Array(8*3),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(6*2*3),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=h.subtract(n,t,dve),c=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let u=s.length,f=e._offsetAttribute===tn.NONE?0:1,d=new Uint8Array(u/3).fill(f);o.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new ct({attributes:o,indices:r,primitiveType:Le.TRIANGLES,boundingSphere:new oe(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var FH;Fl.getUnitBox=function(){return l(FH)||(FH=Fl.createGeometry(Fl.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),FH};var Vl=Fl;var hve=new h;function yh(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}yh.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new yh({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};yh.fromAxisAlignedBoundingBox=function(e){return new yh({minimum:e.minimum,maximum:e.maximum})};yh.packedLength=2*h.packedLength+1;yh.pack=function(e,t,n){return n=y(n,0),h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=y(e._offsetAttribute,-1),t};var sZ=new h,aZ=new h,rZ={minimum:sZ,maximum:aZ,offsetAttribute:void 0};yh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sZ),o=h.unpack(e,t+h.packedLength,aZ),r=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(rZ.offsetAttribute=r===-1?void 0:r,new yh(rZ))};yh.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new ln,o=new Uint16Array(12*2),r=new Float64Array(8*3);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=h.subtract(n,t,hve),a=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,u=e._offsetAttribute===tn.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new ct({attributes:i,indices:o,primitiveType:Le.LINES,boundingSphere:new oe(h.ZERO,a),offsetAttribute:e._offsetAttribute})};var xh=yh;var Gm;typeof cancelAnimationFrame<"u"&&(Gm=cancelAnimationFrame);(function(){if(!l(Gm)&&typeof window<"u"){let e=["webkit","moz","ms","o"],t=0,n=e.length;for(;t<n&&!l(Gm);)Gm=window[`${e[t]}CancelAnimationFrame`],l(Gm)||(Gm=window[`${e[t]}CancelRequestAnimationFrame`]),++t}l(Gm)||(Gm=clearTimeout)})();function mve(e){ci("Cesium.cancelAnimationFrame","Cesium.cancelAnimationFrame was deprecated in CesiumJS 1.96 and will be removed in 1.99. Use the native cancelAnimationFrame method instead."),Gm(e)}var cZ=mve;function lZ(){}lZ.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var lI=lZ;function fA(){this.times=void 0,this.points=void 0,ye.throwInstantiationError()}fA.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Me)return Me};fA.prototype.evaluate=ye.throwInstantiationError;fA.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=y(t,0),e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};fA.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};fA.prototype.clampTime=function(e){let t=this.times;return R.clamp(e,t[0],t[t.length-1])};var zi=fA;function dA(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(dA.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});dA.prototype.findTimeInterval=zi.prototype.findTimeInterval;dA.prototype.wrapTime=zi.prototype.wrapTime;dA.prototype.clampTime=zi.prototype.clampTime;dA.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var Wm=dA;var uZ={};uZ.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new h,s[a]=new h;o[0]=n[0]/t[0],r[0]=h.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(a=1;a<o.length;++a)c=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*c,r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var bS=uZ;var fZ=[],dZ=[],hZ=[],mZ=[];function pve(e,t,n){let i=fZ,o=hZ,r=dZ,s=mZ;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new h),h.clone(n,c),bS.solve(i,r,o,s)}function _ve(e){let t=fZ,n=hZ,i=dZ,o=mZ;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(l(s)||(s=o[0]=new h),h.subtract(e[1],e[0],s),h.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r+1],e[r-1],s),h.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r],e[r-1],s),h.multiplyByScalar(s,3,s),bS.solve(t,i,n,o)}function ol(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(ol.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});ol.createC1=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.tangents,o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createNaturalCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points;if(n.length<3)return new Wm({points:n,times:t});let i=_ve(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createClampedCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=zi.getPointType(n[0]);if(n.length<3)return new Wm({points:n,times:t});let s=pve(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new ol({times:t,points:n,inTangents:c,outTangents:a})};ol.hermiteCoefficientMatrix=new B(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);ol.prototype.findTimeInterval=zi.prototype.findTimeInterval;var gve=new se,hA=new h;ol.prototype.wrapTime=zi.prototype.wrapTime;ol.prototype.clampTime=zi.prototype.clampTime;ol.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],c=(e-i[s])/a,u=gve;u.z=c,u.y=c*c,u.x=u.y*c,u.w=1;let f=B.multiplyByVector(ol.hermiteCoefficientMatrix,u,u);f.z*=a,f.w*=a;let d=this._pointType;return d===Number?n[s]*f.x+n[s+1]*f.y+r[s]*f.z+o[s]*f.w:(l(t)||(t=new d),t=d.multiplyByScalar(n[s],f.x,t),d.multiplyByScalar(n[s+1],f.y,hA),d.add(t,hA,t),d.multiplyByScalar(r[s],f.z,hA),d.add(t,hA,t),d.multiplyByScalar(o[s],f.w,hA),d.add(t,hA,t))};var dy=ol;var yve=new se,pZ=new h,mA=new h;function xve(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new h);let u=(a-i)*o;return h.lerp(r,s,u,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=yve;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,u,f,d,p;return r===0?(c=t[0],u=t[1],f=e.firstTangent,d=h.subtract(t[2],c,pZ),h.multiplyByScalar(d,.5,d),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],u=t[r+1],d=e.lastTangent,f=h.subtract(u,t[r-1],pZ),h.multiplyByScalar(f,.5,f),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):(c=t[r-1],u=t[r],f=t[r+1],d=t[r+2],p=B.multiplyByVector(P_.catmullRomCoefficientMatrix,a,a)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(u,p.y,mA),h.add(o,mA,o),h.multiplyByScalar(f,p.z,mA),h.add(o,mA,o),h.multiplyByScalar(d,p.w,mA),h.add(o,mA,o)}}var Cve=new h,Ave=new h;function P_(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=Cve,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=Ave,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=xve(this),this._lastTimeIndex=0}Object.defineProperties(P_.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});P_.catmullRomCoefficientMatrix=new B(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);P_.prototype.findTimeInterval=zi.prototype.findTimeInterval;P_.prototype.wrapTime=zi.prototype.wrapTime;P_.prototype.clampTime=zi.prototype.clampTime;P_.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var _Z=P_;function I_(e,t,n){return t=y(t,0),n=y(n,e.byteLength-t),e=e.subarray(t,t+n),I_.decode(e)}I_.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};I_.decodeWithFromCharCode=function(e){let t="",n=Tve(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function ES(e,t,n){return t<=e&&e<=n}function Tve(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c<a;++c){let u=e[c];if(i===0){if(ES(u,0,127)){s.push(u);continue}if(ES(u,194,223)){i=1,t=u&31;continue}if(ES(u,224,239)){u===224&&(o=160),u===237&&(r=159),i=2,t=u&15;continue}if(ES(u,240,244)){u===240&&(o=144),u===244&&(r=143),i=3,t=u&7;continue}throw new fe("String decoding failed.")}if(!ES(u,o,r)){t=i=n=0,o=128,r=191,--c;continue}o=128,r=191,t=t<<6|u&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder<"u"?I_.decode=I_.decodeWithTextDecoder:I_.decode=I_.decodeWithFromCharCode;var fa=I_;function bve(e,t,n){return JSON.parse(fa(e,t,n))}var No=bve;var uI={};uI.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let u=s+a+c,f,d,p,_,m,x;return u===1?s?(f=(e-n)/(i-n),d=(e-n)/(o-n),r.push(1),r.push(2),d!==1&&(r.push(-1),r.push(0),r.push(2),r.push(d)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):a?(p=(e-i)/(o-i),_=(e-i)/(n-i),r.push(2),r.push(0),_!==1&&(r.push(-1),r.push(1),r.push(0),r.push(_)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(m=(e-o)/(n-o),x=(e-o)/(i-o),r.push(0),r.push(1),x!==1&&(r.push(-1),r.push(2),r.push(1),r.push(x)),m!==1&&(r.push(-1),r.push(2),r.push(0),r.push(m))):u===2?!s&&n!==e?(_=(e-i)/(n-i),m=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(_),r.push(-1),r.push(2),r.push(0),r.push(m)):!a&&i!==e?(x=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(x),r.push(-1),r.push(0),r.push(1),r.push(f)):!c&&o!==e&&(d=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(d),r.push(-1),r.push(1),r.push(2),r.push(p)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};uI.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let u=n-s,f=s-o,d=r-a,p=i-a,_=1/(d*u+f*p),m=t-a,x=e-s,C=(d*x+f*m)*_,A=(-p*x+u*m)*_,T=1-C-A;return l(c)?(c.x=C,c.y=A,c.z=T,c):new h(C,A,T)};uI.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let u=(s-o)*(t-r)-(a-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),d=(a-r)*(n-e)-(s-o)*(i-t);if(d===0)return;let p=u/d,_=f/d;if(p>=0&&p<=1&&_>=0&&_<=1)return l(c)||(c=new G),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var O_=uI;function R_(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=dI(e.westIndices,o,t),this._southIndices=dI(e.southIndices,r,t),this._eastIndices=dI(e.eastIndices,o,t),this._northIndices=dI(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=y(e.childTileMask,15),this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(R_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var fI=[];function dI(e,t,n){fI.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)fI[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(fI.sort(t),Ne.createTypedArray(n,fI)):e}var gZ="createVerticesFromQuantizedTerrainMesh",Eve=new Di(gZ),Sve=new Di(gZ,_h.maximumAsynchronousTasks);R_.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),d=(a?Sve:Eve).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(d))return;let p=this;return Promise.resolve(d).then(function(_){let m=p._quantizedVertices.length/3,x=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,C=Ne.createTypedArray(x,_.indices),A=new Float32Array(_.vertices),T=_.center,b=_.minimumHeight,S=_.maximumHeight,w=p._boundingSphere,D=p._orientedBoundingBox,O=y(h.clone(_.occludeePointInScaledSpace),p._horizonOcclusionPoint),I=_.vertexStride,L=mc.clone(_.encoding);return p._mesh=new $f(T,A,C,_.indexCountWithoutSkirts,m,b,S,w,O,I,D,L,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var wve=new Di("upsampleQuantizedTerrainMesh",_h.maximumAsynchronousTasks);R_.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,s),p=wve.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let _=Math.min(this._westSkirtHeight,this._eastSkirtHeight);_=Math.min(_,this._southSkirtHeight),_=Math.min(_,this._northSkirtHeight);let m=c?_*.5:this._westSkirtHeight,x=u?_*.5:this._southSkirtHeight,C=c?this._eastSkirtHeight:_*.5,A=u?this._northSkirtHeight:_*.5,T=this._credits;return Promise.resolve(p).then(function(b){let S=new Uint16Array(b.vertices),w=Ne.createTypedArray(S.length/3,b.indices),D;return l(b.encodedNormals)&&(D=new Uint8Array(b.encodedNormals)),new R_({quantizedVertices:S,indices:w,encodedNormals:D,minimumHeight:b.minimumHeight,maximumHeight:b.maximumHeight,boundingSphere:oe.clone(b.boundingSphere),orientedBoundingBox:gi.clone(b.orientedBoundingBox),horizonOcclusionPoint:h.clone(b.horizonOcclusionPoint),westIndices:b.westIndices,southIndices:b.southIndices,eastIndices:b.eastIndices,northIndices:b.northIndices,westSkirtHeight:m,southSkirtHeight:x,eastSkirtHeight:C,northSkirtHeight:A,childTileMask:0,credits:T,createdByUpsampling:!0})})};var VH=32767,yZ=new h;R_.prototype.interpolateHeight=function(e,t,n){let i=R.clamp((t-e.west)/e.width,0,1);i*=VH;let o=R.clamp((n-e.south)/e.height,0,1);return o*=VH,l(this._mesh)?Ive(this,i,o):Ove(this,i,o)};function xZ(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),u=Math.max(n,o,s),f=Math.min(i,r,a),d=Math.max(i,r,a);return e>=c&&e<=u&&t>=f&&t<=d}var vve=new G,Dve=new G,Pve=new G;function Ive(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=r.decodeTextureCoordinates(o,u,vve),_=r.decodeTextureCoordinates(o,f,Dve),m=r.decodeTextureCoordinates(o,d,Pve);if(xZ(t,n,p.x,p.y,_.x,_.y,m.x,m.y)){let x=O_.computeBarycentricCoordinates(t,n,p.x,p.y,_.x,_.y,m.x,m.y,yZ);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let C=r.decodeHeight(o,u),A=r.decodeHeight(o,f),T=r.decodeHeight(o,d);return x.x*C+x.y*A+x.z*T}}}}function Ove(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=i[u],_=i[f],m=i[d],x=o[u],C=o[f],A=o[d];if(xZ(t,n,p,x,_,C,m,A)){let T=O_.computeBarycentricCoordinates(t,n,p,x,_,C,m,A,yZ);if(T.x>=-1e-15&&T.y>=-1e-15&&T.z>=-1e-15){let b=T.x*r[u]+T.y*r[f]+T.z*r[d];return R.lerp(e._minimumHeight,e._maximumHeight,b/VH)}}}}R_.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};R_.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var pA=R_;function Rve(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function hy(e){this._heightmapWidth=65,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=y(e.requestVertexNormals,!1),this._requestWaterMask=y(e.requestWaterMask,!1),this._requestMetadata=y(e.requestMetadata,!0),this._errorEvent=new _e;let t=e.credit;typeof t=="string"&&(t=new Ht(t)),this._credit=t,this._availability=void 0,this._ready=!1,this._tileCredits=void 0;let n=this,i,o,r,s=this._layers=[],a="",c=[],u=0;this._readyPromise=Promise.resolve(e.url).then(function(x){let C=De.createIfNeeded(x);return C.appendForwardSlash(),i=C,o=i.getDerivedResource({url:"layer.json"}),n._tileCredits=C.credits,m()});function f(x){let C;if(!x.format)return C="The tile format is not specified in the layer.json file.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(!x.tiles||x.tiles.length===0)return C="The layer.json file does not specify any tile URL templates.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let A=!1,T=!1,b=!1,S=!0,w=!1;if(x.format==="heightmap-1.0")w=!0,l(n._heightmapStructure)||(n._heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),T=!0,n._requestWaterMask=!0;else if(x.format.indexOf("quantized-mesh-1.")!==0)return C=`The tile format "${x.format}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let D=x.tiles,O=x.maxzoom;if(u=Math.max(u,O),!x.projection||x.projection==="EPSG:4326")n._tilingScheme=new Xi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else if(x.projection==="EPSG:3857")n._tilingScheme=new ts({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else return C=`The projection "${x.projection}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._heightmapWidth,n._tilingScheme.getNumberOfXTilesAtLevel(0)),!x.scheme||x.scheme==="tms"||x.scheme==="slippyMap")n._scheme=x.scheme;else return C=`The scheme "${x.scheme}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let I;l(x.extensions)&&x.extensions.indexOf("octvertexnormals")!==-1?A=!0:l(x.extensions)&&x.extensions.indexOf("vertexnormals")!==-1&&(A=!0,S=!1),l(x.extensions)&&x.extensions.indexOf("watermask")!==-1&&(T=!0),l(x.extensions)&&x.extensions.indexOf("metadata")!==-1&&(b=!0);let L=x.metadataAvailability,N=x.available,g;if(l(N)&&!l(L)){g=new gh(n._tilingScheme,N.length);for(let v=0;v<N.length;++v){let P=N[v],M=n._tilingScheme.getNumberOfYTilesAtLevel(v);l(c[v])||(c[v]=[]);for(let V=0;V<P.length;++V){let U=P[V],k=M-U.endY-1,H=M-U.startY-1;c[v].push([U.startX,k,U.endX,H]),g.addAvailableTileRange(v,U.startX,k,U.endX,H)}}}else l(L)&&(I=new gh(n._tilingScheme,O),g=new gh(n._tilingScheme,O),c[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));n._hasWaterMask=n._hasWaterMask||T,n._hasVertexNormals=n._hasVertexNormals||A,n._hasMetadata=n._hasMetadata||b,l(x.attribution)&&(a.length>0&&(a+=" "),a+=x.attribution),s.push(new Rve({resource:i,version:x.version,isHeightmap:w,tileUrlTemplates:D,availability:g,hasVertexNormals:A,hasWaterMask:T,hasMetadata:b,availabilityLevels:L,availabilityTilesLoaded:I,littleEndianExtensionSize:S}));let E=x.parentUrl;if(l(E)){if(!l(g))return console.log("A layer.json can't have a parentUrl if it does't have an available array."),Promise.resolve(!0);i=i.getDerivedResource({url:E}),i.appendForwardSlash(),o=i.getDerivedResource({url:"layer.json"});let v=o.fetchJson();return Promise.resolve(v).then(f).catch(d)}return Promise.resolve(!0)}function d(x){let C=`An error occurred while accessing ${o.url}.`;return r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C))}function p(x){return f(x).then(function(){if(l(r))return;let C=c.length;if(C>0){let A=n._availability=new gh(n._tilingScheme,u);for(let T=0;T<C;++T){let b=c[T];for(let S=0;S<b.length;++S){let w=b[S];A.addAvailableTileRange(T,w[0],w[1],w[2],w[3])}}}if(a.length>0){let A=new Ht(a);l(n._tileCredits)?n._tileCredits.push(A):n._tileCredits=[A]}return n._ready=!0,Promise.resolve(!0)})}function _(x){return l(x)&&x.statusCode===404?p({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):d(x)}function m(){return Promise.resolve(o.fetchJson()).then(p).catch(_)}}var kH={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function CZ(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function Mve(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new ka({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Bve(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,d=Float64Array.BYTES_PER_ELEMENT*u,p=3,_=Uint16Array.BYTES_PER_ELEMENT*p,m=3,x=Uint16Array.BYTES_PER_ELEMENT,C=x*m,A=new DataView(t),T=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let b=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let S=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let w=new oe(new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0)),A.getFloat64(a+f,!0));a+=d;let D=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let O=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let I=new Uint16Array(t,a,O*3);a+=O*_,O>64*1024&&(x=Uint32Array.BYTES_PER_ELEMENT,C=x*m);let L=I.subarray(0,O),N=I.subarray(O,2*O),g=I.subarray(O*2,3*O);Pn.zigZagDeltaDecode(L,N,g),a%x!==0&&(a+=x-a%x);let E=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let v=Ne.createTypedArrayFromArrayBuffer(O,t,a,E*m);a+=E*C;let P=0,M=v.length;for(let ie=0;ie<M;++ie){let ae=v[ie];v[ie]=P-ae,ae===0&&++P}let V=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let U=Ne.createTypedArrayFromArrayBuffer(O,t,a,V);a+=V*x;let k=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let H=Ne.createTypedArrayFromArrayBuffer(O,t,a,k);a+=k*x;let F=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let Y=Ne.createTypedArrayFromArrayBuffer(O,t,a,F);a+=F*x;let j=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let X=Ne.createTypedArrayFromArrayBuffer(O,t,a,j);a+=j*x;let W,$;for(;a<A.byteLength;){let ie=A.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ae=A.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ie===kH.OCT_VERTEX_NORMALS&&e._requestVertexNormals)W=new Uint8Array(t,a,O*2);else if(ie===kH.WATER_MASK&&e._requestWaterMask)$=new Uint8Array(t,a,ae);else if(ie===kH.METADATA&&e._requestMetadata){let ge=A.getUint32(a,!0);if(ge>0){let be=No(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ge).available;if(l(be))for(let Be=0;Be<be.length;++Be){let Ae=n+Be+1,Oe=be[Be],Ge=e._tilingScheme.getNumberOfYTilesAtLevel(Ae);for(let ot=0;ot<Oe.length;++ot){let nt=Oe[ot],Tn=Ge-nt.endY-1,Zn=Ge-nt.startY-1;e.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn),r.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ae}let J=e.getLevelMaximumGeometricError(n)*5,ce=e._tilingScheme.tileXYToRectangle(i,o,n),he=gi.fromRectangle(ce,b,S,e._tilingScheme.ellipsoid);return new pA({center:T,minimumHeight:b,maximumHeight:S,boundingSphere:w,orientedBoundingBox:he,horizonOcclusionPoint:D,quantizedVertices:I,encodedNormals:W,indices:v,westIndices:U,southIndices:H,eastIndices:Y,northIndices:X,westSkirtHeight:J,southSkirtHeight:J,eastSkirtHeight:J,northSkirtHeight:J,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:$,credits:e._tileCredits})}hy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length;if(s===1)r=o[0];else for(let a=0;a<s;++a){let c=o[a];if(!l(c.availability)||c.availability.isTileAvailable(n,e,t)){r=c;break}}return AZ(this,e,t,n,r,i)};function AZ(e,t,n,i,o,r){if(!l(o))return Promise.reject(new fe("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let u,f,d=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=CZ(void 0)):u=CZ(c);let _=p.getDerivedResource({url:d,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(!!l(_))return _.then(function(m){return l(m)?l(e._heightmapStructure)?Mve(e,m,i,t,n):Bve(e,m,i,t,n,o):Promise.reject(new fe("Mesh buffer doesn't exist."))})}Object.defineProperties(hy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});hy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};hy.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(TZ(this,e,t,n,i[r],r===0).result)return;return!1};hy.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=TZ(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function UH(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function TZ(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,u=o.availability,f=UH(o,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let d;if(!r&&(s=`${f.level}-${f.x}-${f.y}`,d=o.availabilityPromiseCache[s],!l(d))){let p=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN});d=AZ(e,f.x,f.y,f.level,o,p),l(d)&&(o.availabilityPromiseCache[s]=d,d.then(a))}return{result:!0,promise:d}}f=UH(o,f.x,f.y,f.level)}return{result:!1}}hy._getAvailabilityTile=UH;var hI=hy;var HH={},mI=new h,bZ=new h,EZ=new Me,SZ=new Q;function _A(e,t,n,i,o,r,s,a,c,u){let f=e+t;h.multiplyByScalar(i,Math.cos(f),mI),h.multiplyByScalar(n,Math.sin(f),bZ),h.add(mI,bZ,mI);let d=Math.cos(e);d=d*d;let p=Math.sin(e);p=p*p;let m=r/Math.sqrt(s*d+o*p)/a;return Me.fromAxisAngle(mI,m,EZ),Q.fromQuaternion(EZ,SZ),Q.multiplyByVector(SZ,c,u),h.normalize(u,u),h.multiplyByScalar(u,a,u),u}var wZ=new h,vZ=new h,zH=new h,Lve=new h;HH.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,u=n?c:0;for(let f=0;f<c;f+=3){let d=f+1,p=f+2,_=h.fromArray(e,f,wZ);i.scaleToGeodeticSurface(_,_);let m=h.clone(_,vZ),x=i.geodeticSurfaceNormal(_,Lve),C=h.multiplyByScalar(x,o,zH);h.add(_,C,_),n&&(h.multiplyByScalar(x,r,C),h.add(m,C,m),a[f+u]=m.x,a[d+u]=m.y,a[p+u]=m.z),a[f]=_.x,a[d]=_.y,a[p]=_.z}return a};var Nve=new h,Fve=new h,Vve=new h;HH.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,u=o*o,f=o*i,d=h.magnitude(s),p=h.normalize(s,Nve),_=h.cross(h.UNIT_Z,s,Fve);_=h.normalize(_,_);let m=h.cross(p,_,Vve),x=1+Math.ceil(R.PI_OVER_TWO/a),C=R.PI_OVER_TWO/(x-1),A=R.PI_OVER_TWO-x*C;A<0&&(x-=Math.ceil(Math.abs(A)/C));let T=2*(x*(x+2)),b=t?new Array(T*3):void 0,S=0,w=wZ,D=vZ,O=x*4*3,I=O-1,L=0,N=n?new Array(O):void 0,g,E,v,P,M;for(A=R.PI_OVER_TWO,w=_A(A,r,m,_,c,f,u,d,p,w),t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x),A=R.PI_OVER_TWO-C,g=1;g<x+1;++g){if(w=_A(A,r,m,_,c,f,u,d,p,w),D=_A(Math.PI-A,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*g+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z),A=R.PI_OVER_TWO-(g+1)*C}for(g=x;g>1;--g){if(A=R.PI_OVER_TWO-(g-1)*C,w=_A(-A,r,m,_,c,f,u,d,p,w),D=_A(A+Math.PI,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*(g-1)+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z)}A=R.PI_OVER_TWO,w=_A(-A,r,m,_,c,f,u,d,p,w);let V={};return t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,V.positions=b,V.numPts=x),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,V.outerPositions=N),V};var kl=HH;function kve(e){e=y(e,y.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=B.clone(y(e.modelMatrix,B.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=y(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var pt=kve;function Ch(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}Ch.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var jm={high:0,low:0};Ch.fromCartesian=function(e,t){l(t)||(t=new Ch);let n=t.high,i=t.low;return Ch.encode(e.x,jm),n.x=jm.high,i.x=jm.low,Ch.encode(e.y,jm),n.y=jm.high,i.y=jm.low,Ch.encode(e.z,jm),n.z=jm.high,i.z=jm.low,t};var GH=new Ch;Ch.writeElements=function(e,t,n){Ch.fromCartesian(e,GH);let i=GH.high,o=GH.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var kn=Ch;var WH={};WH.calculateACMR=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;a<o;)c>n&&(n=c),++a,c=t[a]}let r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};WH.tipsify=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o;function r(g,E,v,P){for(;E.length>=1;){let M=E[E.length-1];if(E.splice(E.length-1,1),g[M].numLiveTriangles>0)return M}for(;o<P;){if(g[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(g,E,v,P,M,V,U){let k=-1,H,F=-1,Y=0;for(;Y<v.length;){let j=v[Y];P[j].numLiveTriangles&&(H=0,M-P[j].timeStamp+2*P[j].numLiveTriangles<=E&&(H=M-P[j].timeStamp),(H>F||F===-1)&&(F=H,k=j)),++Y}return k===-1?r(P,V,g,U):k}let a=t.length,c=0,u=0,f=t[u],d=a;if(l(n))c=n+1;else{for(;u<d;)f>c&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],_;for(_=0;_<c;_++)p[_]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let m=0;for(;u<d;)p[t[u]].vertexTriangles.push(m),++p[t[u]].numLiveTriangles,p[t[u+1]].vertexTriangles.push(m),++p[t[u+1]].numLiveTriangles,p[t[u+2]].vertexTriangles.push(m),++p[t[u+2]].numLiveTriangles,++m,u+=3;let x=0,C=i+1;o=1;let A=[],T=[],b,S,w=0,D=[],O=a/3,I=[];for(_=0;_<O;_++)I[_]=!1;let L,N;for(;x!==-1;){A=[],S=p[x],N=S.vertexTriangles.length;for(let g=0;g<N;++g)if(m=S.vertexTriangles[g],!I[m]){I[m]=!0,u=m+m+m;for(let E=0;E<3;++E)L=t[u],A.push(L),T.push(L),D[w]=L,++w,b=p[L],--b.numLiveTriangles,C-b.timeStamp>i&&(b.timeStamp=C,++C),++u}x=s(t,i,A,p,C,T,c)}return D};var pI=WH;var gc={};function TI(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function Uve(e){let t=e.length,n=t/3*6,i=Ne.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)TI(i,o,e[r],e[r+1],e[r+2]);return i}function zve(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ne.createTypedArray(t,n);TI(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)TI(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function Hve(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ne.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)TI(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}gc.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Le.TRIANGLES:e.indices=Uve(t);break;case Le.TRIANGLE_STRIP:e.indices=zve(t);break;case Le.TRIANGLE_FAN:e.indices=Hve(t);break}e.primitiveType=Le.LINES}return e};gc.createLineSegmentsForVectors=function(e,t,n){t=y(t,"normal"),n=y(n,1e4);let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let f=0;f<r;f+=3)s[a++]=i[f],s[a++]=i[f+1],s[a++]=i[f+2],s[a++]=i[f]+o[f]*n,s[a++]=i[f+1]+o[f+1]*n,s[a++]=i[f+2]+o[f+2]*n;let c,u=e.boundingSphere;return l(u)&&(c=new oe(u.center,u.radius+n)),new ct({attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Le.LINES,boundingSphere:c})};gc.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];l(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=o++);return i};gc.reorderForPreVertexCache=function(e){let t=ct.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let o=n,r=o.length,s=Ne.createTypedArray(t,r),a=0,c=0,u=0,f;for(;a<r;)f=i[o[a]],f!==-1?s[c]=f:(f=o[a],i[f]=u,s[c]=u,++u),++a,++c;e.indices=s;let d=e.attributes;for(let p in d)if(d.hasOwnProperty(p)&&l(d[p])&&l(d[p].values)){let _=d[p],m=_.values,x=0,C=_.componentsPerAttribute,A=K.createTypedArray(_.componentDatatype,u*C);for(;x<t;){let T=i[x];if(T!==-1)for(let b=0;b<C;b++)A[C*T+b]=m[C*x+b];++x}_.values=A}}return e};gc.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Le.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=pI.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function DZ(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ee({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function Gve(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}gc.fitToUnsignedShortIndices=function(e){let t=[],n=ct.computeNumberOfVertices(e);if(l(e.indices)&&n>=R.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=DZ(e.attributes),a=e.indices,c=a.length,u;e.primitiveType===Le.TRIANGLES?u=3:e.primitiveType===Le.LINES?u=2:e.primitiveType===Le.POINTS&&(u=1);for(let f=0;f<c;f+=u){for(let d=0;d<u;++d){let p=a[f+d],_=i[p];l(_)||(_=r++,i[p]=_,Gve(s,e.attributes,p)),o.push(_)}r+u>=R.SIXTY_FOUR_KILOBYTES&&(t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=DZ(e.attributes))}o.length!==0&&t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var PZ=new h,Wve=new me;gc.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Si;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),u=0;for(let f=0;f<a.length;f+=3){let d=h.fromArray(a,f,PZ),p=s.cartesianToCartographic(d,Wve),_=o.project(p,PZ);c[u++]=_.x,c[u++]=_.y,c[u++]=_.z}return e.attributes[n]=r,e.attributes[i]=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var jH={high:0,low:0};gc.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),c=new Float32Array(s);for(let f=0;f<s;++f)kn.encode(r[f],jH),a[f]=jH.high,c[f]=jH.low;let u=o.componentsPerAttribute;return e.attributes[n]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:c}),delete e.attributes[t],e};var Qf=new h;function qH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),B.multiplyByPoint(e,Qf,Qf),h.pack(Qf,n,o)}}function YH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),Q.multiplyByVector(e,Qf,Qf),Qf=h.normalize(Qf,Qf),h.pack(Qf,n,o)}}var _I=new B,gI=new Q;gc.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(B.equals(t,B.IDENTITY))return e;let n=e.geometry.attributes;qH(t,n.position),qH(t,n.prevPosition),qH(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(B.inverse(t,_I),B.transpose(_I,_I),B.getMatrix3(_I,gI),YH(gI,n.normal),YH(gI,n.tangent),YH(gI,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=oe.transform(i,t,i)),e.modelMatrix=B.clone(B.IDENTITY),e};function jve(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let s=o[r],a=s.values.length,c=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[r];if(!l(f)||s.componentDatatype!==f.componentDatatype||s.componentsPerAttribute!==f.componentsPerAttribute||s.normalize!==f.normalize){c=!1;break}a+=f.values.length}c&&(i[r]=new Ee({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:K.createTypedArray(s.componentDatatype,a)}))}return i}var qve=new h;function XH(e,t){let n=e.length,i,o,r,s,a=e[0].modelMatrix,c=l(e[0][t].indices),u=e[0][t].primitiveType,f=jve(e,t),d,p,_;for(i in f)if(f.hasOwnProperty(i))for(d=f[i].values,s=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,_=p.length,r=0;r<_;++r)d[s++]=p[r];let m;if(c){let T=0;for(o=0;o<n;++o)T+=e[o][t].indices.length;let b=ct.computeNumberOfVertices(new ct({attributes:f,primitiveType:Le.POINTS})),S=Ne.createTypedArray(b,T),w=0,D=0;for(o=0;o<n;++o){let O=e[o][t].indices,I=O.length;for(s=0;s<I;++s)S[w++]=D+O[s];D+=ct.computeNumberOfVertices(e[o][t])}m=S}let x=new h,C=0,A;for(o=0;o<n;++o){if(A=e[o][t].boundingSphere,!l(A)){x=void 0;break}h.add(A.center,x,x)}if(l(x))for(h.divideByScalar(x,n,x),o=0;o<n;++o){A=e[o][t].boundingSphere;let T=h.magnitude(h.subtract(A.center,x,qve))+A.radius;T>C&&(C=T)}return new ct({attributes:f,indices:m,primitiveType:u,boundingSphere:l(x)?new oe(x,C):void 0})}gc.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(XH(t,"geometry")),n.length>0&&(o.push(XH(n,"westHemisphereGeometry")),o.push(XH(n,"eastHemisphereGeometry"))),o};var Lu=new h,SS=new h,gA=new h,yA=new h;gc.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),u;for(u=0;u<o;u++)s[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<r;u+=3){let m=t[u],x=t[u+1],C=t[u+2],A=m*3,T=x*3,b=C*3;SS.x=i[A],SS.y=i[A+1],SS.z=i[A+2],gA.x=i[T],gA.y=i[T+1],gA.z=i[T+2],yA.x=i[b],yA.y=i[b+1],yA.z=i[b+2],s[m].count++,s[x].count++,s[C].count++,h.subtract(gA,SS,gA),h.subtract(yA,SS,yA),a[f]=h.cross(gA,yA,new h),f++}let d=0;for(u=0;u<o;u++)s[u].indexOffset+=d,d+=s[u].count;f=0;let p;for(u=0;u<r;u+=3){p=s[t[u]];let m=p.indexOffset+p.currentCount;c[m]=f,p.currentCount++,p=s[t[u+1]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,p=s[t[u+2]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,f++}let _=new Float32Array(o*3);for(u=0;u<o;u++){let m=u*3;if(p=s[u],h.clone(h.ZERO,Lu),p.count>0){for(f=0;f<p.count;f++)h.add(Lu,a[c[p.indexOffset+f]],Lu);h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&h.clone(a[c[p.indexOffset]],Lu)}h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&(Lu.z=1),h.normalize(Lu,Lu),_[m]=Lu.x,_[m+1]=Lu.y,_[m+2]=Lu.z}return e.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e};var Yve=new h,IZ=new h,Xve=new h;gc.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),u;for(u=0;u<c.length;u++)c[u]=0;let f,d,p;for(u=0;u<a;u+=3){let x=n[u],C=n[u+1],A=n[u+2];f=x*3,d=C*3,p=A*3;let T=x*2,b=C*2,S=A*2,w=i[f],D=i[f+1],O=i[f+2],I=r[T],L=r[T+1],N=r[b+1]-L,g=r[S+1]-L,E=1/((r[b]-I)*g-(r[S]-I)*N),v=(g*(i[d]-w)-N*(i[p]-w))*E,P=(g*(i[d+1]-D)-N*(i[p+1]-D))*E,M=(g*(i[d+2]-O)-N*(i[p+2]-O))*E;c[f]+=v,c[f+1]+=P,c[f+2]+=M,c[d]+=v,c[d+1]+=P,c[d+2]+=M,c[p]+=v,c[p+1]+=P,c[p+2]+=M}let _=new Float32Array(s*3),m=new Float32Array(s*3);for(u=0;u<s;u++){f=u*3,d=f+1,p=f+2;let x=h.fromArray(o,f,Yve),C=h.fromArray(c,f,Xve),A=h.dot(x,C);h.multiplyByScalar(x,A,IZ),h.normalize(h.subtract(C,IZ,C),C),_[f]=C.x,_[d]=C.y,_[p]=C.z,h.normalize(h.cross(x,C,C),C),m[f]=C.x,m[d]=C.y,m[p]=C.z}return e.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m}),e};var wS=new G,Jf=new h,OZ=new h,RZ=new h,yI=new G;gc.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let D=t.values;i=D.length/3;let O=new Float32Array(i*2),I=0;for(n=0;n<i;++n){if(h.fromArray(D,n*3,Jf),h.equals(Jf,h.ZERO)){I+=2;continue}yI=Pn.octEncodeInRange(Jf,65535,yI),O[I++]=yI.x,O[I++]=yI.y}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:O}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=l(o),a=l(r);if(!s&&!a)return e;let c=e.attributes.tangent,u=e.attributes.bitangent,f=l(c),d=l(u),p,_,m,x;s&&(p=o.values),a&&(_=r.values),f&&(m=c.values),d&&(x=u.values),i=(s?p.length:_.length)/(s?3:2);let T=i,b=a&&s?2:1;b+=f||d?1:0,T*=b;let S=new Float32Array(T),w=0;for(n=0;n<i;++n){a&&(G.fromArray(_,n*2,wS),S[w++]=Pn.compressTextureCoordinates(wS));let D=n*3;s&&l(m)&&l(x)?(h.fromArray(p,D,Jf),h.fromArray(m,D,OZ),h.fromArray(x,D,RZ),Pn.octPack(Jf,OZ,RZ,wS),S[w++]=wS.x,S[w++]=wS.y):(s&&(h.fromArray(p,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),f&&(h.fromArray(m,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),d&&(h.fromArray(x,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)))}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:b,values:S}),s&&delete e.attributes.normal,a&&delete e.attributes.st,d&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function Kve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function $ve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Zve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Jve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function Qve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Le.LINES,e}function eDe(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Le.LINES,e}function tDe(e){switch(e.primitiveType){case Le.TRIANGLE_FAN:return $ve(e);case Le.TRIANGLE_STRIP:return Zve(e);case Le.TRIANGLES:return Kve(e);case Le.LINE_STRIP:return Qve(e);case Le.LINE_LOOP:return eDe(e);case Le.LINES:return Jve(e)}return e}function M_(e,t){Math.abs(e.y)<R.EPSILON6&&(t?e.y=-R.EPSILON6:e.y=R.EPSILON6)}function nDe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){M_(e,e.y<0),M_(t,t.y<0),M_(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),s;i>o?i>r?s=R.sign(e.y):s=R.sign(n.y):o>r?s=R.sign(t.y):s=R.sign(n.y);let a=s<0;M_(e,a),M_(t,a),M_(n,a)}var MZ=new h;function Nu(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,MZ),e.y/(e.y-t.y),MZ),n),h.clone(n,i),M_(n,!0),M_(i,!1)}var my=new h,py=new h,_y=new h,gy=new h,KH={positions:new Array(7),indices:new Array(3*3)};function iDe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;nDe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=KH.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=KH.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=my,c[4]=py,c[5]=_y,c[6]=gy,c.length=7),KH}function BZ(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=K.createTypedArray(r.componentDatatype,r.values)}let i=ct.computeNumberOfVertices(e);return e.indices=Ne.createTypedArray(i,e.indices),t&&(e.boundingSphere=oe.fromVertices(n.position.values)),e}function CA(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ee({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ct({attributes:n,indices:[],primitiveType:e.primitiveType})}function QH(e,t,n){let i=l(e.geometry.boundingSphere);t=BZ(t,i),n=BZ(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function e5(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,u,f,d,p){let _=e.fromArray(u,r*t,n),m=e.fromArray(u,s*t,i),x=e.fromArray(u,a*t,o);e.multiplyByScalar(_,c.x,_),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(x,c.z,x);let C=e.add(_,m,_);e.add(C,x,C),p&&e.normalize(C,C),e.pack(C,f,d*t)}}var oDe=e5(se,4),AI=e5(h,3),UZ=e5(G,2),rDe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,u=o[n]*i.z;r[s]=a+c+u>R.EPSILON6?1:0},vS=new h,$H=new h,ZH=new h,sDe=new h;function xI(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(u)&&_===0)return;let C=h.fromArray(o,e*3,vS),A=h.fromArray(o,t*3,$H),T=h.fromArray(o,n*3,ZH),b=uA(i,C,A,T,sDe);if(!!l(b)){if(l(r)&&AI(e,t,n,b,r,d.normal.values,x,!0),l(u)){let S=h.fromArray(u,e*3,vS),w=h.fromArray(u,t*3,$H),D=h.fromArray(u,n*3,ZH);h.multiplyByScalar(S,b.x,S),h.multiplyByScalar(w,b.y,w),h.multiplyByScalar(D,b.z,D);let O;!h.equals(S,h.ZERO)||!h.equals(w,h.ZERO)||!h.equals(D,h.ZERO)?(O=h.add(S,w,S),h.add(O,D,O),h.normalize(O,O)):(O=vS,O.x=0,O.y=0,O.z=0),h.pack(O,d.extrudeDirection.values,x*3)}if(l(f)&&rDe(e,t,n,b,f,d.applyOffset.values,x),l(s)&&AI(e,t,n,b,s,d.tangent.values,x,!0),l(a)&&AI(e,t,n,b,a,d.bitangent.values,x,!0),l(c)&&UZ(e,t,n,b,c,d.st.values,x),_>0)for(let S=0;S<_;S++){let w=p[S];aDe(e,t,n,b,x,m[w],d[w])}}}function aDe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,u=s.values;switch(a){case 4:oDe(e,t,n,i,c,u,o,!1);break;case 3:AI(e,t,n,i,c,u,o,!1);break;case 2:UZ(e,t,n,i,c,u,o,!1);break;default:u[o]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function Ah(e,t,n,i,o,r){let s=e.position.values.length/3;if(o!==-1){let a=i[o],c=n[a];return c===-1?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(c),c)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}var cDe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function LZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=l(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,d=[];for(let O in n)n.hasOwnProperty(O)&&!cDe[O]&&l(n[O])&&d.push(O);let p=d.length,_=CA(t),m=CA(t),x,C,A,T,b,S=[];S.length=i.length/3;let w=[];for(w.length=i.length/3,b=0;b<S.length;++b)S[b]=-1,w[b]=-1;let D=f.length;for(b=0;b<D;b+=3){let O=f[b],I=f[b+1],L=f[b+2],N=h.fromArray(i,O*3),g=h.fromArray(i,I*3),E=h.fromArray(i,L*3),v=iDe(N,g,E);if(l(v)&&v.positions.length>3){let P=v.positions,M=v.indices,V=M.length;for(let U=0;U<V;++U){let k=M[U],H=P[k];H.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,k<3?b+k:-1,H),xI(O,I,L,H,i,o,s,r,a,c,u,x,d,p,n,T)}}else l(v)&&(N=v.positions[0],g=v.positions[1],E=v.positions[2]),N.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,b,N),xI(O,I,L,N,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+1,g),xI(O,I,L,g,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+2,E),xI(O,I,L,E,i,o,s,r,a,c,u,x,d,p,n,T)}QH(e,m,_)}var zZ=rn.fromPointNormal(h.ZERO,h.UNIT_Y),lDe=new h,uDe=new h;function xA(e,t,n,i,o,r,s){if(!l(s))return;let a=h.fromArray(i,e*3,vS);h.equalsEpsilon(a,n,R.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function NZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=CA(t),a=CA(t),c,u=r.length,f=[];f.length=i.length/3;let d=[];for(d.length=i.length/3,c=0;c<f.length;++c)f[c]=-1,d[c]=-1;for(c=0;c<u;c+=2){let p=r[c],_=r[c+1],m=h.fromArray(i,p*3,vS),x=h.fromArray(i,_*3,$H),C;Math.abs(m.y)<R.EPSILON6&&(m.y<0?m.y=-R.EPSILON6:m.y=R.EPSILON6),Math.abs(x.y)<R.EPSILON6&&(x.y<0?x.y=-R.EPSILON6:x.y=R.EPSILON6);let A=s.attributes,T=s.indices,b=d,S=a.attributes,w=a.indices,D=f,O=Ki.lineSegmentPlane(m,x,zZ,ZH);if(l(O)){let I=h.multiplyByScalar(h.UNIT_Y,5*R.EPSILON9,lDe);m.y<0&&(h.negate(I,I),A=a.attributes,T=a.indices,b=f,S=s.attributes,w=s.indices,D=d);let L=h.add(O,I,uDe);C=Ah(A,T,b,r,c,m),xA(p,_,m,i,C,A,o),C=Ah(A,T,b,r,-1,L),xA(p,_,L,i,C,A,o),h.negate(I,I),h.add(O,I,L),C=Ah(S,w,D,r,-1,L),xA(p,_,L,i,C,S,o),C=Ah(S,w,D,r,c+1,x),xA(p,_,x,i,C,S,o)}else{let I,L,N;m.y<0?(I=a.attributes,L=a.indices,N=f):(I=s.attributes,L=s.indices,N=d),C=Ah(I,L,N,r,c,m),xA(p,_,m,i,C,I,o),C=Ah(I,L,N,r,c+1,x),xA(p,_,x,i,C,I,o)}}QH(e,a,s)}var FZ=new G,fDe=new G,HZ=new h,GZ=new h,JH=new h,dDe=new h,hDe=new h,mDe=new h,VZ=new se;function kZ(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=h.unpack(n,s,HZ);if(a.x>0)continue;let c=h.unpack(i,s,GZ);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let u=h.unpack(o,s,JH);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):h.pack(a,o,s))}}var pDe=5*R.EPSILON9,CI=R.EPSILON6;function _De(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,u=CA(t),f=CA(t),d,p,_,m=!1,x=i.length/3;for(d=0;d<x;d+=4){let C=d,A=d+2,T=h.fromArray(i,C*3,HZ),b=h.fromArray(i,A*3,GZ);if(Math.abs(T.y)<CI)for(T.y=CI*(b.y<0?-1:1),i[d*3+1]=T.y,i[(d+1)*3+1]=T.y,p=C*3;p<C*3+4*3;p+=3)o[p]=i[d*3],o[p+1]=i[d*3+1],o[p+2]=i[d*3+2];if(Math.abs(b.y)<CI)for(b.y=CI*(T.y<0?-1:1),i[(d+2)*3+1]=b.y,i[(d+3)*3+1]=b.y,p=C*3;p<C*3+4*3;p+=3)r[p]=i[(d+2)*3],r[p+1]=i[(d+2)*3+1],r[p+2]=i[(d+2)*3+2];let S=u.attributes,w=u.indices,D=f.attributes,O=f.indices,I=Ki.lineSegmentPlane(T,b,zZ,dDe);if(l(I)){m=!0;let L=h.multiplyByScalar(h.UNIT_Y,pDe,hDe);T.y<0&&(h.negate(L,L),S=f.attributes,w=f.indices,D=u.attributes,O=u.indices);let N=h.add(I,L,mDe);S.position.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.position.values.push(N.x,N.y,N.z),S.position.values.push(N.x,N.y,N.z),S.prevPosition.values.push(o[C*3],o[C*3+1],o[C*3+2]),S.prevPosition.values.push(o[C*3+3],o[C*3+4],o[C*3+5]),S.prevPosition.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),h.negate(L,L),h.add(I,L,N),D.position.values.push(N.x,N.y,N.z),D.position.values.push(N.x,N.y,N.z),D.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.nextPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.nextPosition.values.push(r[A*3],r[A*3+1],r[A*3+2]),D.nextPosition.values.push(r[A*3+3],r[A*3+4],r[A*3+5]);let g=G.fromArray(s,C*2,FZ),E=Math.abs(g.y);S.expandAndWidth.values.push(-1,E,1,E),S.expandAndWidth.values.push(-1,-E,1,-E),D.expandAndWidth.values.push(-1,E,1,E),D.expandAndWidth.values.push(-1,-E,1,-E);let v=h.magnitudeSquared(h.subtract(I,T,JH));if(v/=h.magnitudeSquared(h.subtract(b,T,JH)),l(c)){let P=se.fromArray(c,C*4,VZ),M=se.fromArray(c,A*4,VZ),V=R.lerp(P.x,M.x,v),U=R.lerp(P.y,M.y,v),k=R.lerp(P.z,M.z,v),H=R.lerp(P.w,M.w,v);for(p=C*4;p<C*4+2*4;++p)S.color.values.push(c[p]);for(S.color.values.push(V,U,k,H),S.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),p=A*4;p<A*4+2*4;++p)D.color.values.push(c[p])}if(l(a)){let P=G.fromArray(a,C*2,FZ),M=G.fromArray(a,(d+3)*2,fDe),V=R.lerp(P.x,M.x,v);for(p=C*2;p<C*2+2*2;++p)S.st.values.push(a[p]);for(S.st.values.push(V,P.y),S.st.values.push(V,M.y),D.st.values.push(V,P.y),D.st.values.push(V,M.y),p=A*2;p<A*2+2*2;++p)D.st.values.push(a[p])}_=S.position.values.length/3-4,w.push(_,_+2,_+1),w.push(_+1,_+2,_+3),_=D.position.values.length/3-4,O.push(_,_+2,_+1),O.push(_+1,_+2,_+3)}else{let L,N;for(T.y<0?(L=f.attributes,N=f.indices):(L=u.attributes,N=u.indices),L.position.values.push(T.x,T.y,T.z),L.position.values.push(T.x,T.y,T.z),L.position.values.push(b.x,b.y,b.z),L.position.values.push(b.x,b.y,b.z),p=d*3;p<d*3+4*3;++p)L.prevPosition.values.push(o[p]),L.nextPosition.values.push(r[p]);for(p=d*2;p<d*2+4*2;++p)L.expandAndWidth.values.push(s[p]),l(a)&&L.st.values.push(a[p]);if(l(c))for(p=d*4;p<d*4+4*4;++p)L.color.values.push(c[p]);_=L.position.values.length/3-4,N.push(_,_+2,_+1),N.push(_+1,_+2,_+3)}}m&&(kZ(f),kZ(u)),QH(e,f,u)}gc.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||oe.intersectPlane(n,rn.ORIGIN_ZX_PLANE)!==Zt.INTERSECTING))return e;if(t.geometryType!==Zf.NONE)switch(t.geometryType){case Zf.POLYLINES:_De(e);break;case Zf.TRIANGLES:LZ(e);break;case Zf.LINES:NZ(e);break}else tDe(t),t.primitiveType===Le.TRIANGLES?LZ(e):t.primitiveType===Le.LINES&&NZ(e);return e};var Rn=gc;var AA=new h,t5=new h,n5=new h,WZ=new h,us=new G,jZ=new Q,gDe=new Q,i5=new Me,qZ=new h,YZ=new h,XZ=new h,SI=new me,KZ=new h,$Z=new G,ZZ=new G;function JZ(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,d=i.st?new Float32Array(u*2):void 0,p=i.normal?new Float32Array(u*3):void 0,_=i.tangent?new Float32Array(u*3):void 0,m=i.bitangent?new Float32Array(u*3):void 0,x=f?new Float32Array(u*3):void 0,C=0,A=qZ,T=YZ,b=XZ,S=new Si(a),w=S.project(a.cartesianToCartographic(o,SI),KZ),D=a.scaleToGeodeticSurface(o,AA);a.geodeticSurfaceNormal(D,D);let O=jZ,I=gDe;if(c!==0){let M=Me.fromAxisAngle(D,c,i5);O=Q.fromQuaternion(M,O),M=Me.fromAxisAngle(D,-c,i5),I=Q.fromQuaternion(M,I)}else O=Q.clone(Q.IDENTITY,O),I=Q.clone(Q.IDENTITY,I);let L=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),N=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),g=e.length,E=n?g:0,v=E/3*2;for(let M=0;M<g;M+=3){let V=M+1,U=M+2,k=h.fromArray(e,M,AA);if(i.st){let H=Q.multiplyByVector(O,k,t5),F=S.project(a.cartesianToCartographic(H,SI),n5);h.subtract(F,w,F),us.x=(F.x+r)/(2*r),us.y=(F.y+s)/(2*s),L.x=Math.min(us.x,L.x),L.y=Math.min(us.y,L.y),N.x=Math.max(us.x,N.x),N.y=Math.max(us.y,N.y),n&&(d[C+v]=us.x,d[C+1+v]=us.y),d[C++]=us.x,d[C++]=us.y}(i.normal||i.tangent||i.bitangent||f)&&(A=a.geodeticSurfaceNormal(k,A),f&&(x[M+E]=-A.x,x[V+E]=-A.y,x[U+E]=-A.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(T=h.normalize(h.cross(h.UNIT_Z,A,T),T),Q.multiplyByVector(I,T,T)),i.normal&&(p[M]=A.x,p[V]=A.y,p[U]=A.z,n&&(p[M+E]=-A.x,p[V+E]=-A.y,p[U+E]=-A.z)),i.tangent&&(_[M]=T.x,_[V]=T.y,_[U]=T.z,n&&(_[M+E]=-T.x,_[V+E]=-T.y,_[U+E]=-T.z)),i.bitangent&&(b=h.normalize(h.cross(A,T,b),b),m[M]=b.x,m[V]=b.y,m[U]=b.z,n&&(m[M+E]=b.x,m[V+E]=b.y,m[U+E]=b.z))))}if(i.st){g=d.length;for(let M=0;M<g;M+=2)d[M]=(d[M]-L.x)/(N.x-L.x),d[M+1]=(d[M+1]-L.y)/(N.y-L.y)}let P=new ln;if(i.position){let M=kl.raisePositionsToHeight(e,t,n);P.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:M})}if(i.st&&(P.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(P.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(P.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),i.bitangent&&(P.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),f&&(P.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),n&&l(t.offsetAttribute)){let M=new Uint8Array(u);if(t.offsetAttribute===tn.TOP)M=M.fill(1,0,u/2);else{let V=t.offsetAttribute===tn.NONE?0:1;M=M.fill(V)}P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return P}function QZ(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var yy=new h;function yDe(e){let t=e.center;yy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,yy),e.height,yy),yy=h.add(t,yy,yy);let n=new oe(yy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=JZ(o,e,!1),a=QZ(r);return a=Ne.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function xDe(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,d=new Float64Array(f*3),p=n.st?new Float32Array(f*2):void 0,_=n.normal?new Float32Array(f*3):void 0,m=n.tangent?new Float32Array(f*3):void 0,x=n.bitangent?new Float32Array(f*3):void 0,C=t.shadowVolume,A=C?new Float32Array(f*3):void 0,T=0,b=qZ,S=YZ,w=XZ,D=new Si(s),O=D.project(s.cartesianToCartographic(i,SI),KZ),I=s.scaleToGeodeticSurface(i,AA);s.geodeticSurfaceNormal(I,I);let L=Me.fromAxisAngle(I,u,i5),N=Q.fromQuaternion(L,jZ),g=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),E=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),v=e.length,P=v/3*2;for(let V=0;V<v;V+=3){let U=V+1,k=V+2,H=h.fromArray(e,V,AA),F;if(n.st){let j=Q.multiplyByVector(N,H,t5),X=D.project(s.cartesianToCartographic(j,SI),n5);h.subtract(X,O,X),us.x=(X.x+o)/(2*o),us.y=(X.y+r)/(2*r),g.x=Math.min(us.x,g.x),g.y=Math.min(us.y,g.y),E.x=Math.max(us.x,E.x),E.y=Math.max(us.y,E.y),p[T+P]=us.x,p[T+1+P]=us.y,p[T++]=us.x,p[T++]=us.y}H=s.scaleToGeodeticSurface(H,H),F=h.clone(H,t5),b=s.geodeticSurfaceNormal(H,b),C&&(A[V+v]=-b.x,A[U+v]=-b.y,A[k+v]=-b.z);let Y=h.multiplyByScalar(b,a,WZ);if(H=h.add(H,Y,H),Y=h.multiplyByScalar(b,c,Y),F=h.add(F,Y,F),n.position&&(d[V+v]=F.x,d[U+v]=F.y,d[k+v]=F.z,d[V]=H.x,d[U]=H.y,d[k]=H.z),n.normal||n.tangent||n.bitangent){w=h.clone(b,w);let j=h.fromArray(e,(V+3)%v,WZ);h.subtract(j,H,j);let X=h.subtract(F,H,n5);b=h.normalize(h.cross(X,j,b),b),n.normal&&(_[V]=b.x,_[U]=b.y,_[k]=b.z,_[V+v]=b.x,_[U+v]=b.y,_[k+v]=b.z),n.tangent&&(S=h.normalize(h.cross(w,b,S),S),m[V]=S.x,m[U]=S.y,m[k]=S.z,m[V+v]=S.x,m[V+1+v]=S.y,m[V+2+v]=S.z),n.bitangent&&(x[V]=w.x,x[U]=w.y,x[k]=w.z,x[V+v]=w.x,x[U+v]=w.y,x[k+v]=w.z)}}if(n.st){v=p.length;for(let V=0;V<v;V+=2)p[V]=(p[V]-g.x)/(E.x-g.x),p[V+1]=(p[V+1]-g.y)/(E.y-g.y)}let M=new ln;if(n.position&&(M.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})),n.st&&(M.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(M.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),n.tangent&&(M.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(M.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),C&&(M.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),l(t.offsetAttribute)){let V=new Uint8Array(f);if(t.offsetAttribute===tn.TOP)V=V.fill(1,0,f/2);else{let U=t.offsetAttribute===tn.NONE?0:1;V=V.fill(U)}M.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return M}function CDe(e){let t=e.length/3,n=Ne.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,c=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var bI=new oe,EI=new oe;function ADe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,AA),e.height,AA);bI.center=h.add(t,o,bI.center),bI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),EI.center=h.add(t,o,EI.center),EI.radius=i;let r=kl.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,u=oe.union(bI,EI),f=JZ(s,e,!0),d=QZ(a),p=d.length;d.length=p*2;let _=s.length/3;for(let S=0;S<p;S+=3)d[S+p]=d[S+2]+_,d[S+1+p]=d[S+1]+_,d[S+2+p]=d[S]+_;let m=Ne.createTypedArray(_*2/3,d),x=new ct({attributes:f,indices:m,primitiveType:Le.TRIANGLES}),C=xDe(c,e);d=CDe(c);let A=Ne.createTypedArray(c.length*2/3,d),T=new ct({attributes:C,indices:A,primitiveType:Le.TRIANGLES}),b=Rn.combineInstances([new pt({geometry:x}),new pt({geometry:T})]);return{boundingSphere:u,attributes:b[0].attributes,indices:b[0].indices}}function eJ(e,t,n,i,o,r,s){let c=kl.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=h.fromArray(c,p*3);let d=de.fromCartesianArray(f,r,s);return d.width>R.PI&&(d.north=d.north>0?R.PI_OVER_TWO-R.EPSILON7:d.north,d.south=d.south<0?R.EPSILON7-R.PI_OVER_TWO:d.south,d.east=R.PI,d.west=-R.PI),d}function bh(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.vertexFormat,Pe.DEFAULT),a=y(e.height,0),c=y(e.extrudedHeight,a);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Pe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}bh.packedLength=h.packedLength+re.packedLength+Pe.packedLength+9;bh.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var tJ=new h,nJ=new re,iJ=new Pe,Th={center:tJ,ellipsoid:nJ,vertexFormat:iJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};bh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,tJ);t+=h.packedLength;let o=re.unpack(e,t,nJ);t+=re.packedLength;let r=Pe.unpack(e,t,iJ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++],_=e[t++]===1,m=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=d,n._extrudedHeight=p,n._shadowVolume=_,n._offsetAttribute=m===-1?void 0:m,n):(Th.height=f,Th.extrudedHeight=p,Th.granularity=d,Th.stRotation=u,Th.rotation=c,Th.semiMajorAxis=s,Th.semiMinorAxis=a,Th.shadowVolume=_,Th.offsetAttribute=m===-1?void 0:m,new bh(Th))};bh.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.center,i=y(e.ellipsoid,re.WGS84),o=e.semiMajorAxis,r=e.semiMinorAxis,s=y(e.granularity,R.RADIANS_PER_DEGREE),a=y(e.rotation,0);return eJ(n,o,r,a,s,i,t)};bh.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=ADe(o);else if(r=yDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};bh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new bh({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};function TDe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=kl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=h.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return ct._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(bh.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=eJ(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=TDe(this)),this._textureCoordinateRotationPoints}}});var rl=bh;function qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new rl(n),this._workerName="createCircleGeometry"}qm.packedLength=rl.packedLength;qm.pack=function(e,t,n){return rl.pack(e._ellipseGeometry,t,n)};var bDe=new rl({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ua={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Pe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};qm.unpack=function(e,t,n){let i=rl.unpack(e,t,bDe);return Ua.center=h.clone(i._center,Ua.center),Ua.ellipsoid=re.clone(i._ellipsoid,Ua.ellipsoid),Ua.height=i._height,Ua.extrudedHeight=i._extrudedHeight,Ua.granularity=i._granularity,Ua.vertexFormat=Pe.clone(i._vertexFormat,Ua.vertexFormat),Ua.stRotation=i._stRotation,Ua.shadowVolume=i._shadowVolume,l(n)?(Ua.semiMajorAxis=i._semiMajorAxis,Ua.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new rl(Ua),n):(Ua.radius=i._semiMajorAxis,new qm(Ua))};qm.createGeometry=function(e){return rl.createGeometry(e._ellipseGeometry)};qm.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new qm({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(qm.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var oJ=qm;var rJ=new h,xy=new h;function EDe(e){let t=e.center;xy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,xy),e.height,xy),xy=h.add(t,xy,xy);let n=new oe(xy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!1,!0).outerPositions,o=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ne.createTypedArray(r,r*2),a=0;for(let c=0;c<r;++c)s[a++]=c,s[a++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var wI=new oe,vI=new oe;function SDe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,rJ),e.height,rJ);wI.center=h.add(t,o,wI.center),wI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),vI.center=h.add(t,o,vI.center),vI.radius=i;let r=kl.computeEllipsePositions(e,!1,!0).outerPositions,s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=oe.union(wI,vI),c=r.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===tn.TOP)m=m.fill(1,0,c/2);else{let x=e.offsetAttribute===tn.NONE?0:1;m=m.fill(x)}s.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=y(e.numberOfVerticalLines,16);u=R.clamp(u,0,c/2);let f=Ne.createTypedArray(c,c*2+u*2);c/=2;let d=0,p;for(p=0;p<c;++p)f[d++]=p,f[d++]=(p+1)%c,f[d++]=p+c,f[d++]=(p+1)%c+c;let _;if(u>0){let m=Math.min(u,c);_=Math.round(c/m);let x=Math.min(_*u,c);for(p=0;p<x;p+=_)f[d++]=p,f[d++]=p+c}return{boundingSphere:a,attributes:s,indices:f}}function TA(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.height,0),a=y(e.extrudedHeight,s);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(y(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}TA.packedLength=h.packedLength+re.packedLength+8;TA.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var sJ=new h,aJ=new re,Ym={center:sJ,ellipsoid:aJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};TA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sJ);t+=h.packedLength;let o=re.unpack(e,t,aJ);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=d,n._offsetAttribute=p===-1?void 0:p,n):(Ym.height=c,Ym.extrudedHeight=f,Ym.granularity=u,Ym.rotation=a,Ym.semiMajorAxis=r,Ym.semiMinorAxis=s,Ym.numberOfVerticalLines=d,Ym.offsetAttribute=p===-1?void 0:p,new TA(Ym))};TA.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=SDe(o);else if(r=EDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Fu=TA;function bA(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Fu(n),this._workerName="createCircleOutlineGeometry"}bA.packedLength=Fu.packedLength;bA.pack=function(e,t,n){return Fu.pack(e._ellipseGeometry,t,n)};var wDe=new Fu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ul={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};bA.unpack=function(e,t,n){let i=Fu.unpack(e,t,wDe);return Ul.center=h.clone(i._center,Ul.center),Ul.ellipsoid=re.clone(i._ellipsoid,Ul.ellipsoid),Ul.height=i._height,Ul.extrudedHeight=i._extrudedHeight,Ul.granularity=i._granularity,Ul.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(Ul.semiMajorAxis=i._semiMajorAxis,Ul.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Fu(Ul),n):(Ul.radius=i._semiMajorAxis,new bA(Ul))};bA.createGeometry=function(e){return Fu.createGeometry(e._ellipseGeometry)};var cJ=bA;var vDe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},zr=Object.freeze(vDe);var DDe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},yo=Object.freeze(DDe);var o5;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?o5=function(){return performance.now()}:o5=function(){return Date.now()};var Pi=o5;function r5(e){e=y(e,y.EMPTY_OBJECT);let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=ee.clone(t):l(n)?t=ee.clone(n):l(i)?t=ee.addDays(i,-1,new ee):t=ee.now(),l(n)?n=ee.clone(n):n=ee.clone(t),l(i)?i=ee.clone(i):i=ee.addDays(n,1,new ee),this.startTime=n,this.stopTime=i,this.clockRange=y(e.clockRange,zr.UNBOUNDED),this.canAnimate=y(e.canAnimate,!0),this.onTick=new _e,this.onStop=new _e,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Pi(),this.currentTime=t,this.multiplier=y(e.multiplier,1),this.shouldAnimate=y(e.shouldAnimate,!1),this.clockStep=y(e.clockStep,yo.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(r5.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){ee.equals(this._currentTime,e)||(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===yo.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=ee.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});r5.prototype.tick=function(){let e=Pi(),t=ee.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===yo.SYSTEM_CLOCK)t=ee.now(t);else{let i=this._multiplier;if(n===yo.TICK_DEPENDENT)t=ee.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=ee.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===zr.CLAMPED)ee.lessThan(t,r)?t=ee.clone(r,t):ee.greaterThan(t,s)&&(t=ee.clone(s,t),this.onStop.raiseEvent(this));else if(o===zr.LOOP_STOP)for(ee.lessThan(t,r)&&(t=ee.clone(r,t));ee.greaterThan(t,s);)t=ee.addSeconds(r,ee.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Eh=r5;function s5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ne(e,t,n,i){this.red=y(e,1),this.green=y(t,1),this.blue=y(n,1),this.alpha=y(i,1)}ne.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new ne(e.x,e.y,e.z,e.w)};ne.fromBytes=function(e,t,n,i,o){return e=ne.byteToFloat(y(e,255)),t=ne.byteToFloat(y(t,255)),n=ne.byteToFloat(y(n,255)),i=ne.byteToFloat(y(i,255)),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new ne(e,t,n,i)};ne.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new ne(e.red,e.green,e.blue,t)};var a5,c5,Xm;Et.supportsTypedArrays()&&(a5=new ArrayBuffer(4),c5=new Uint32Array(a5),Xm=new Uint8Array(a5));ne.fromRgba=function(e,t){return c5[0]=e,ne.fromBytes(Xm[0],Xm[1],Xm[2],Xm[3],t)};ne.fromHsl=function(e,t,n,i,o){e=y(e,0)%1,t=y(t,0),n=y(n,0),i=y(i,1);let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let u=2*n-c;r=s5(u,c,e+1/3),s=s5(u,c,e),a=s5(u,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new ne(r,s,a,i)};ne.fromRandom=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.red;if(!l(n)){let s=y(e.minimumRed,0),a=y(e.maximumRed,1);n=s+R.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=y(e.minimumGreen,0),a=y(e.maximumGreen,1);i=s+R.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=y(e.minimumBlue,0),a=y(e.maximumBlue,1);o=s+R.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=y(e.minimumAlpha,0),a=y(e.maximumAlpha,1);r=s+R.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new ne(n,i,o,r)};var PDe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,IDe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,ODe=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,RDe=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;ne.fromCssColorString=function(e,t){l(t)||(t=new ne),e=e.replace(/\s/g,"");let n=ne[e.toUpperCase()];if(l(n))return ne.clone(n,t),t;let i=PDe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(y(i[4],"f"),16)/15,t):(i=IDe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(y(i[4],"ff"),16)/255,t):(i=ODe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(y(i[4],"1.0")),t):(i=RDe.exec(e),i!==null?ne.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(y(i[4],"1.0")),t):(t=void 0,t))))};ne.packedLength=4;ne.pack=function(e,t,n){return n=y(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};ne.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ne),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};ne.byteToFloat=function(e){return e/255};ne.floatToByte=function(e){return e===1?255:e*256|0};ne.clone=function(e,t){if(!!l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new ne(e.red,e.green,e.blue,e.alpha)};ne.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};ne.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};ne.prototype.clone=function(e){return ne.clone(this,e)};ne.prototype.equals=function(e){return ne.equals(this,e)};ne.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};ne.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};ne.prototype.toCssColorString=function(){let e=ne.floatToByte(this.red),t=ne.floatToByte(this.green),n=ne.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};ne.prototype.toCssHexString=function(){let e=ne.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=ne.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=ne.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=ne.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};ne.prototype.toBytes=function(e){let t=ne.floatToByte(this.red),n=ne.floatToByte(this.green),i=ne.floatToByte(this.blue),o=ne.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};ne.prototype.toRgba=function(){return Xm[0]=ne.floatToByte(this.red),Xm[1]=ne.floatToByte(this.green),Xm[2]=ne.floatToByte(this.blue),Xm[3]=ne.floatToByte(this.alpha),c5[0]};ne.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};ne.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};ne.prototype.withAlpha=function(e,t){return ne.fromAlpha(this,e,t)};ne.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};ne.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};ne.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};ne.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};ne.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};ne.lerp=function(e,t,n,i){return i.red=R.lerp(e.red,t.red,n),i.green=R.lerp(e.green,t.green,n),i.blue=R.lerp(e.blue,t.blue,n),i.alpha=R.lerp(e.alpha,t.alpha,n),i};ne.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};ne.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};ne.ALICEBLUE=Object.freeze(ne.fromCssColorString("#F0F8FF"));ne.ANTIQUEWHITE=Object.freeze(ne.fromCssColorString("#FAEBD7"));ne.AQUA=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.AQUAMARINE=Object.freeze(ne.fromCssColorString("#7FFFD4"));ne.AZURE=Object.freeze(ne.fromCssColorString("#F0FFFF"));ne.BEIGE=Object.freeze(ne.fromCssColorString("#F5F5DC"));ne.BISQUE=Object.freeze(ne.fromCssColorString("#FFE4C4"));ne.BLACK=Object.freeze(ne.fromCssColorString("#000000"));ne.BLANCHEDALMOND=Object.freeze(ne.fromCssColorString("#FFEBCD"));ne.BLUE=Object.freeze(ne.fromCssColorString("#0000FF"));ne.BLUEVIOLET=Object.freeze(ne.fromCssColorString("#8A2BE2"));ne.BROWN=Object.freeze(ne.fromCssColorString("#A52A2A"));ne.BURLYWOOD=Object.freeze(ne.fromCssColorString("#DEB887"));ne.CADETBLUE=Object.freeze(ne.fromCssColorString("#5F9EA0"));ne.CHARTREUSE=Object.freeze(ne.fromCssColorString("#7FFF00"));ne.CHOCOLATE=Object.freeze(ne.fromCssColorString("#D2691E"));ne.CORAL=Object.freeze(ne.fromCssColorString("#FF7F50"));ne.CORNFLOWERBLUE=Object.freeze(ne.fromCssColorString("#6495ED"));ne.CORNSILK=Object.freeze(ne.fromCssColorString("#FFF8DC"));ne.CRIMSON=Object.freeze(ne.fromCssColorString("#DC143C"));ne.CYAN=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.DARKBLUE=Object.freeze(ne.fromCssColorString("#00008B"));ne.DARKCYAN=Object.freeze(ne.fromCssColorString("#008B8B"));ne.DARKGOLDENROD=Object.freeze(ne.fromCssColorString("#B8860B"));ne.DARKGRAY=Object.freeze(ne.fromCssColorString("#A9A9A9"));ne.DARKGREEN=Object.freeze(ne.fromCssColorString("#006400"));ne.DARKGREY=ne.DARKGRAY;ne.DARKKHAKI=Object.freeze(ne.fromCssColorString("#BDB76B"));ne.DARKMAGENTA=Object.freeze(ne.fromCssColorString("#8B008B"));ne.DARKOLIVEGREEN=Object.freeze(ne.fromCssColorString("#556B2F"));ne.DARKORANGE=Object.freeze(ne.fromCssColorString("#FF8C00"));ne.DARKORCHID=Object.freeze(ne.fromCssColorString("#9932CC"));ne.DARKRED=Object.freeze(ne.fromCssColorString("#8B0000"));ne.DARKSALMON=Object.freeze(ne.fromCssColorString("#E9967A"));ne.DARKSEAGREEN=Object.freeze(ne.fromCssColorString("#8FBC8F"));ne.DARKSLATEBLUE=Object.freeze(ne.fromCssColorString("#483D8B"));ne.DARKSLATEGRAY=Object.freeze(ne.fromCssColorString("#2F4F4F"));ne.DARKSLATEGREY=ne.DARKSLATEGRAY;ne.DARKTURQUOISE=Object.freeze(ne.fromCssColorString("#00CED1"));ne.DARKVIOLET=Object.freeze(ne.fromCssColorString("#9400D3"));ne.DEEPPINK=Object.freeze(ne.fromCssColorString("#FF1493"));ne.DEEPSKYBLUE=Object.freeze(ne.fromCssColorString("#00BFFF"));ne.DIMGRAY=Object.freeze(ne.fromCssColorString("#696969"));ne.DIMGREY=ne.DIMGRAY;ne.DODGERBLUE=Object.freeze(ne.fromCssColorString("#1E90FF"));ne.FIREBRICK=Object.freeze(ne.fromCssColorString("#B22222"));ne.FLORALWHITE=Object.freeze(ne.fromCssColorString("#FFFAF0"));ne.FORESTGREEN=Object.freeze(ne.fromCssColorString("#228B22"));ne.FUCHSIA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.GAINSBORO=Object.freeze(ne.fromCssColorString("#DCDCDC"));ne.GHOSTWHITE=Object.freeze(ne.fromCssColorString("#F8F8FF"));ne.GOLD=Object.freeze(ne.fromCssColorString("#FFD700"));ne.GOLDENROD=Object.freeze(ne.fromCssColorString("#DAA520"));ne.GRAY=Object.freeze(ne.fromCssColorString("#808080"));ne.GREEN=Object.freeze(ne.fromCssColorString("#008000"));ne.GREENYELLOW=Object.freeze(ne.fromCssColorString("#ADFF2F"));ne.GREY=ne.GRAY;ne.HONEYDEW=Object.freeze(ne.fromCssColorString("#F0FFF0"));ne.HOTPINK=Object.freeze(ne.fromCssColorString("#FF69B4"));ne.INDIANRED=Object.freeze(ne.fromCssColorString("#CD5C5C"));ne.INDIGO=Object.freeze(ne.fromCssColorString("#4B0082"));ne.IVORY=Object.freeze(ne.fromCssColorString("#FFFFF0"));ne.KHAKI=Object.freeze(ne.fromCssColorString("#F0E68C"));ne.LAVENDER=Object.freeze(ne.fromCssColorString("#E6E6FA"));ne.LAVENDAR_BLUSH=Object.freeze(ne.fromCssColorString("#FFF0F5"));ne.LAWNGREEN=Object.freeze(ne.fromCssColorString("#7CFC00"));ne.LEMONCHIFFON=Object.freeze(ne.fromCssColorString("#FFFACD"));ne.LIGHTBLUE=Object.freeze(ne.fromCssColorString("#ADD8E6"));ne.LIGHTCORAL=Object.freeze(ne.fromCssColorString("#F08080"));ne.LIGHTCYAN=Object.freeze(ne.fromCssColorString("#E0FFFF"));ne.LIGHTGOLDENRODYELLOW=Object.freeze(ne.fromCssColorString("#FAFAD2"));ne.LIGHTGRAY=Object.freeze(ne.fromCssColorString("#D3D3D3"));ne.LIGHTGREEN=Object.freeze(ne.fromCssColorString("#90EE90"));ne.LIGHTGREY=ne.LIGHTGRAY;ne.LIGHTPINK=Object.freeze(ne.fromCssColorString("#FFB6C1"));ne.LIGHTSEAGREEN=Object.freeze(ne.fromCssColorString("#20B2AA"));ne.LIGHTSKYBLUE=Object.freeze(ne.fromCssColorString("#87CEFA"));ne.LIGHTSLATEGRAY=Object.freeze(ne.fromCssColorString("#778899"));ne.LIGHTSLATEGREY=ne.LIGHTSLATEGRAY;ne.LIGHTSTEELBLUE=Object.freeze(ne.fromCssColorString("#B0C4DE"));ne.LIGHTYELLOW=Object.freeze(ne.fromCssColorString("#FFFFE0"));ne.LIME=Object.freeze(ne.fromCssColorString("#00FF00"));ne.LIMEGREEN=Object.freeze(ne.fromCssColorString("#32CD32"));ne.LINEN=Object.freeze(ne.fromCssColorString("#FAF0E6"));ne.MAGENTA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.MAROON=Object.freeze(ne.fromCssColorString("#800000"));ne.MEDIUMAQUAMARINE=Object.freeze(ne.fromCssColorString("#66CDAA"));ne.MEDIUMBLUE=Object.freeze(ne.fromCssColorString("#0000CD"));ne.MEDIUMORCHID=Object.freeze(ne.fromCssColorString("#BA55D3"));ne.MEDIUMPURPLE=Object.freeze(ne.fromCssColorString("#9370DB"));ne.MEDIUMSEAGREEN=Object.freeze(ne.fromCssColorString("#3CB371"));ne.MEDIUMSLATEBLUE=Object.freeze(ne.fromCssColorString("#7B68EE"));ne.MEDIUMSPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FA9A"));ne.MEDIUMTURQUOISE=Object.freeze(ne.fromCssColorString("#48D1CC"));ne.MEDIUMVIOLETRED=Object.freeze(ne.fromCssColorString("#C71585"));ne.MIDNIGHTBLUE=Object.freeze(ne.fromCssColorString("#191970"));ne.MINTCREAM=Object.freeze(ne.fromCssColorString("#F5FFFA"));ne.MISTYROSE=Object.freeze(ne.fromCssColorString("#FFE4E1"));ne.MOCCASIN=Object.freeze(ne.fromCssColorString("#FFE4B5"));ne.NAVAJOWHITE=Object.freeze(ne.fromCssColorString("#FFDEAD"));ne.NAVY=Object.freeze(ne.fromCssColorString("#000080"));ne.OLDLACE=Object.freeze(ne.fromCssColorString("#FDF5E6"));ne.OLIVE=Object.freeze(ne.fromCssColorString("#808000"));ne.OLIVEDRAB=Object.freeze(ne.fromCssColorString("#6B8E23"));ne.ORANGE=Object.freeze(ne.fromCssColorString("#FFA500"));ne.ORANGERED=Object.freeze(ne.fromCssColorString("#FF4500"));ne.ORCHID=Object.freeze(ne.fromCssColorString("#DA70D6"));ne.PALEGOLDENROD=Object.freeze(ne.fromCssColorString("#EEE8AA"));ne.PALEGREEN=Object.freeze(ne.fromCssColorString("#98FB98"));ne.PALETURQUOISE=Object.freeze(ne.fromCssColorString("#AFEEEE"));ne.PALEVIOLETRED=Object.freeze(ne.fromCssColorString("#DB7093"));ne.PAPAYAWHIP=Object.freeze(ne.fromCssColorString("#FFEFD5"));ne.PEACHPUFF=Object.freeze(ne.fromCssColorString("#FFDAB9"));ne.PERU=Object.freeze(ne.fromCssColorString("#CD853F"));ne.PINK=Object.freeze(ne.fromCssColorString("#FFC0CB"));ne.PLUM=Object.freeze(ne.fromCssColorString("#DDA0DD"));ne.POWDERBLUE=Object.freeze(ne.fromCssColorString("#B0E0E6"));ne.PURPLE=Object.freeze(ne.fromCssColorString("#800080"));ne.RED=Object.freeze(ne.fromCssColorString("#FF0000"));ne.ROSYBROWN=Object.freeze(ne.fromCssColorString("#BC8F8F"));ne.ROYALBLUE=Object.freeze(ne.fromCssColorString("#4169E1"));ne.SADDLEBROWN=Object.freeze(ne.fromCssColorString("#8B4513"));ne.SALMON=Object.freeze(ne.fromCssColorString("#FA8072"));ne.SANDYBROWN=Object.freeze(ne.fromCssColorString("#F4A460"));ne.SEAGREEN=Object.freeze(ne.fromCssColorString("#2E8B57"));ne.SEASHELL=Object.freeze(ne.fromCssColorString("#FFF5EE"));ne.SIENNA=Object.freeze(ne.fromCssColorString("#A0522D"));ne.SILVER=Object.freeze(ne.fromCssColorString("#C0C0C0"));ne.SKYBLUE=Object.freeze(ne.fromCssColorString("#87CEEB"));ne.SLATEBLUE=Object.freeze(ne.fromCssColorString("#6A5ACD"));ne.SLATEGRAY=Object.freeze(ne.fromCssColorString("#708090"));ne.SLATEGREY=ne.SLATEGRAY;ne.SNOW=Object.freeze(ne.fromCssColorString("#FFFAFA"));ne.SPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FF7F"));ne.STEELBLUE=Object.freeze(ne.fromCssColorString("#4682B4"));ne.TAN=Object.freeze(ne.fromCssColorString("#D2B48C"));ne.TEAL=Object.freeze(ne.fromCssColorString("#008080"));ne.THISTLE=Object.freeze(ne.fromCssColorString("#D8BFD8"));ne.TOMATO=Object.freeze(ne.fromCssColorString("#FF6347"));ne.TURQUOISE=Object.freeze(ne.fromCssColorString("#40E0D0"));ne.VIOLET=Object.freeze(ne.fromCssColorString("#EE82EE"));ne.WHEAT=Object.freeze(ne.fromCssColorString("#F5DEB3"));ne.WHITE=Object.freeze(ne.fromCssColorString("#FFFFFF"));ne.WHITESMOKE=Object.freeze(ne.fromCssColorString("#F5F5F5"));ne.YELLOW=Object.freeze(ne.fromCssColorString("#FFFF00"));ne.YELLOWGREEN=Object.freeze(ne.fromCssColorString("#9ACD32"));ne.TRANSPARENT=Object.freeze(new ne(0,0,0,0));var z=ne;function EA(e,t,n,i){e=y(e,1),t=y(t,1),n=y(n,1),i=y(i,1),this.value=new Uint8Array([z.floatToByte(e),z.floatToByte(t),z.floatToByte(n),z.floatToByte(i)])}Object.defineProperties(EA.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});EA.fromColor=function(e){return new EA(e.red,e.green,e.blue,e.alpha)};EA.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};EA.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var It=EA;function SA(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(SA.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}});SA.clone=function(e){if(!!l(e))return new SA(e._format,e._datatype,e._width,e._height,e._buffer)};SA.prototype.clone=function(){return SA.clone(this)};var DI=SA;function wA(e){this._value=e,this._valueType=zi.getPointType(e)}Object.defineProperties(wA.prototype,{value:{get:function(){return this._value}}});wA.prototype.findTimeInterval=function(e){};wA.prototype.wrapTime=function(e){return 0};wA.prototype.clampTime=function(e){return 0};wA.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var vA=wA;var DS={},MDe=new h,lJ=new h,uJ=new h,fJ=new h,dJ=new gi;DS.validOutline=function(e){let n=gi.fromPoints(e,dJ).halfAxes,i=Q.getColumn(n,0,lJ),o=Q.getColumn(n,1,uJ),r=Q.getColumn(n,2,fJ),s=h.magnitude(i),a=h.magnitude(o),c=h.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};DS.computeProjectTo2DArguments=function(e,t,n,i){let o=gi.fromPoints(e,dJ),r=o.halfAxes,s=Q.getColumn(r,0,lJ),a=Q.getColumn(r,1,uJ),c=Q.getColumn(r,2,fJ),u=h.magnitude(s),f=h.magnitude(a),d=h.magnitude(c),p=Math.min(u,f,d);if(u===0&&(f===0||d===0)||f===0&&d===0)return!1;let _,m;return(p===f||p===d)&&(_=s),p===u?_=a:p===d&&(m=a),(p===u||p===f)&&(m=c),h.normalize(_,n),h.normalize(m,i),h.clone(o.center,t),!0};function hJ(e,t,n,i,o){let r=h.subtract(e,t,MDe),s=h.dot(n,r),a=h.dot(i,r);return G.fromElements(s,a,o)}DS.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=hJ(i[r],e,t,n);return o}};DS.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return hJ(i,e,t,n,o)}};var B_=DS;function u5(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,u=n,f=Math.sin(2*u),d=Math.sin(4*u),p=Math.sin(6*u),_=Math.sin(8*u),m=Math.sin(10*u),x=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*f+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*d-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*_-(693*a/1310720+6237*c/5242880)*m+1001*c/8388608*x)}function BDe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,u=c*c,f=u*c,d=f*c,p=d*c,_=p*c,m=Math.sin(2*i),x=Math.cos(2*i),C=Math.sin(4*i),A=Math.cos(4*i),T=Math.sin(6*i),b=Math.cos(6*i),S=Math.sin(8*i),w=Math.cos(8*i),D=Math.sin(10*i),O=Math.cos(10*i),I=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*d/16384+1515*i*p/65536+16837*i*_/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*d/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*_/5242880)*x+(21*i*f/256+483*i*d/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*_/1048576)*A+(151*i*d/4096+4681*i*p/65536+1479*i*_/16384-453*r*_/32768)*b+(1097*i*p/65536+42783*i*_/1048576)*w+8011*i*_/1048576*O+(3*c/8+3*u/16+213*f/2048-3*o*f/64+255*d/4096-33*o*d/512+20861*p/524288-33*o*p/512+s*p/1024+28273*_/1048576-471*o*_/8192+9*s*_/4096)*m+(21*u/256+21*f/256+533*d/8192-21*o*d/512+197*p/4096-315*o*p/4096+584039*_/16777216-12517*o*_/131072+7*s*_/2048)*C+(151*f/6144+151*d/4096+5019*p/131072-453*o*p/16384+26965*_/786432-8607*o*_/131072)*T+(1097*d/131072+1097*p/65536+225797*_/10485760-1097*o*_/65536)*S+(8011*p/2621440+8011*_/1048576)*D+293393*_/251658240*I}function DA(e,t){if(e===0)return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function LDe(e,t,n,i,o){let r=DA(e._ellipticity,n),s=DA(e._ellipticity,o);return Math.atan2(R.negativePiToPi(i-t),s-r)}function NDe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,u=0;if(R.equalsEpsilon(Math.abs(a),R.PI_OVER_TWO,R.EPSILON8))if(t===n)u=t*Math.cos(o)*R.negativePiToPi(c);else{let f=Math.sin(o);u=t*Math.cos(o)*R.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=u5(e._ellipticity,t,o);u=(u5(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var FDe=new h,l5=new h;function mJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,l5),FDe),r=h.normalize(i.cartographicToCartesian(n,l5),l5),s=i.maximumRadius,a=i.minimumRadius,c=s*s,u=a*a;e._ellipticitySquared=(c-u)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=me.clone(t,e._start),e._start.height=0,e._end=me.clone(n,e._end),e._end.height=0,e._heading=LDe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=NDe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function pJ(e,t,n,i,o,r){if(n===0)return me.clone(e,r);let s=o*o,a,c,u;if(Math.abs(R.PI_OVER_TWO-Math.abs(t))>R.EPSILON8){let f=u5(o,i,e.latitude),d=n*Math.cos(t),p=f+d;c=BDe(p,o,i);let _=DA(o,e.latitude),m=DA(o,c);u=Math.tan(t)*(m-_),a=R.negativePiToPi(e.longitude+u)}else{c=e.latitude;let f;if(o===0)f=i*Math.cos(e.latitude);else{let d=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-s*d*d)}u=n/f,t>0?a=R.negativePiToPi(e.longitude+u):a=R.negativePiToPi(e.longitude-u)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new me(a,c,0)}function Km(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&mJ(this,e,t,i)}Object.defineProperties(Km.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});Km.fromStartHeadingDistance=function(e,t,n,i,o){let r=y(i,re.WGS84),s=r.maximumRadius,a=r.minimumRadius,c=s*s,u=a*a,f=Math.sqrt((c-u)/c);t=R.negativePiToPi(t);let d=pJ(e,t,n,r.maximumRadius,f);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new Km(e,d,r):(o.setEndPoints(e,d),o)};Km.prototype.setEndPoints=function(e,t){mJ(this,e,t,this._ellipsoid)};Km.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};Km.prototype.interpolateUsingSurfaceDistance=function(e,t){return pJ(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};Km.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=R.negativePiToPi(e),R.equalsEpsilon(Math.abs(e),Math.PI,R.EPSILON14)&&(e=R.sign(r.longitude)*Math.PI),l(t)||(t=new me),Math.abs(R.PI_OVER_TWO-o)<=R.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(R.equalsEpsilon(Math.abs(R.PI_OVER_TWO-o),R.PI_OVER_TWO,R.EPSILON8))return R.equalsEpsilon(e,r.longitude,R.EPSILON12)?void 0:(t.longitude=e,t.latitude=R.PI_OVER_TWO*R.sign(R.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(R.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=r.latitude,d;do{d=f;let p=n*Math.sin(d),_=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(_/u,n/2))-R.PI_OVER_TWO}while(!R.equalsEpsilon(f,d,R.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};Km.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(R.equalsEpsilon(Math.abs(i),R.PI_OVER_TWO,R.EPSILON8))return;let r=DA(n,o.latitude),s=DA(n,e),a=Math.tan(i)*(s-r),c=R.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new me(c,e,0)};var za=Km;var RS=Zc(CJ(),1);var MI={CLOCKWISE:Z.CW,COUNTER_CLOCKWISE:Z.CCW};MI.validate=function(e){return e===MI.CLOCKWISE||e===MI.COUNTER_CLOCKWISE};var fs=Object.freeze(MI);var QDe=new h,e1e=new h,L_={};L_.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return n*.5};L_.computeWindingOrder2D=function(e){return L_.computeArea2D(e)>0?fs.COUNTER_CLOCKWISE:fs.CLOCKWISE};L_.triangulate=function(e,t){let n=G.packArray(e);return(0,RS.default)(n,t,2)};var EJ=new h,SJ=new h,wJ=new h,AJ=new h,TJ=new h,bJ=new h,$m=new h,vJ=new G,DJ=new G,PJ=new G,IA=new G;L_.computeSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let b=t[a];if(u[d++]=b.x,u[d++]=b.y,u[d++]=b.z,r){let S=i[a];f[p++]=S.x,f[p++]=S.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=C*C;for(;s.length>0;){let b=s.pop(),S=s.pop(),w=s.pop(),D=h.fromArray(u,w*3,EJ),O=h.fromArray(u,S*3,SJ),I=h.fromArray(u,b*3,wJ),L,N,g;r&&(L=G.fromArray(f,w*2,vJ),N=G.fromArray(f,S*2,DJ),g=G.fromArray(f,b*2,PJ));let E=h.multiplyByScalar(h.normalize(D,AJ),x,AJ),v=h.multiplyByScalar(h.normalize(O,TJ),x,TJ),P=h.multiplyByScalar(h.normalize(I,bJ),x,bJ),M=h.magnitudeSquared(h.subtract(E,v,$m)),V=h.magnitudeSquared(h.subtract(v,P,$m)),U=h.magnitudeSquared(h.subtract(P,E,$m)),k=Math.max(M,V,U),H,F,Y;k>A?M===k?(H=`${Math.min(w,S)} ${Math.max(w,S)}`,a=m[H],l(a)||(F=h.add(D,O,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(L,N,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(w,a,b),s.push(a,S,b)):V===k?(H=`${Math.min(S,b)} ${Math.max(S,b)}`,a=m[H],l(a)||(F=h.add(O,I,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(N,g,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(S,a,w),s.push(a,b,w)):U===k&&(H=`${Math.min(b,w)} ${Math.max(b,w)}`,a=m[H],l(a)||(F=h.add(I,D,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(g,L,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(b,a,S),s.push(a,w,S)):(_.push(w),_.push(S),_.push(b))}let T={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(T.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(T)};var t1e=new me,n1e=new me,i1e=new me,p5=new me;L_.computeRhumbLineSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let w=t[a];if(u[d++]=w.x,u[d++]=w.y,u[d++]=w.z,r){let D=i[a];f[p++]=D.x,f[p++]=D.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=new za(void 0,void 0,e),T=new za(void 0,void 0,e),b=new za(void 0,void 0,e);for(;s.length>0;){let w=s.pop(),D=s.pop(),O=s.pop(),I=h.fromArray(u,O*3,EJ),L=h.fromArray(u,D*3,SJ),N=h.fromArray(u,w*3,wJ),g,E,v;r&&(g=G.fromArray(f,O*2,vJ),E=G.fromArray(f,D*2,DJ),v=G.fromArray(f,w*2,PJ));let P=e.cartesianToCartographic(I,t1e),M=e.cartesianToCartographic(L,n1e),V=e.cartesianToCartographic(N,i1e);A.setEndPoints(P,M);let U=A.surfaceDistance;T.setEndPoints(M,V);let k=T.surfaceDistance;b.setEndPoints(V,P);let H=b.surfaceDistance,F=Math.max(U,k,H),Y,j,X,W,$;F>C?U===F?(Y=`${Math.min(O,D)} ${Math.max(O,D)}`,a=m[Y],l(a)||(j=A.interpolateUsingFraction(.5,p5),X=(P.height+M.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(g,E,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(O,a,w),s.push(a,D,w)):k===F?(Y=`${Math.min(D,w)} ${Math.max(D,w)}`,a=m[Y],l(a)||(j=T.interpolateUsingFraction(.5,p5),X=(M.height+V.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(E,v,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(D,a,O),s.push(a,w,O)):H===F&&(Y=`${Math.min(w,O)} ${Math.max(w,O)}`,a=m[Y],l(a)||(j=b.interpolateUsingFraction(.5,p5),X=(V.height+P.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(v,g,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(w,a,D),s.push(a,O,D)):(_.push(O),_.push(D),_.push(w))}let S={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(S.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(S)};L_.scaleToGeodeticHeight=function(e,t,n,i){n=y(n,re.WGS84);let o=QDe,r=e1e;if(t=y(t,0),i=y(i,!0),l(e)){let s=e.length;for(let a=0;a<s;a+=3)h.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),h.multiplyByScalar(o,t,o),h.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var ti=L_;function N_(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(N_.prototype,{length:{get:function(){return this._length}}});N_.prototype.enqueue=function(e){this._array.push(e),this._length++};N_.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};N_.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};N_.prototype.contains=function(e){return this._array.indexOf(e)!==-1};N_.prototype.clear=function(){this._array.length=this._offset=this._length=0};N_.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var sl=N_;var cr={};cr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c<a;++c)i.push(s[c])}}return n};cr.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let u=0;u<c;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(l(a)){let c=a.length;for(let u=0;u<c;++u)o.push(a[u])}}return n};cr.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=cr.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var Ay=new G;function MJ(e,t,n,i){return G.subtract(t,e,Ay),G.multiplyByScalar(Ay,n/i,Ay),G.add(e,Ay,Ay),[Ay.x,Ay.y]}var F_=new h;function o1e(e,t,n,i){return h.subtract(t,e,F_),h.multiplyByScalar(F_,n/i,F_),h.add(e,F_,F_),[F_.x,F_.y,F_.z]}cr.subdivideLineCount=function(e,t,n){let o=h.distance(e,t)/n,r=Math.max(0,Math.ceil(R.log2(o)));return Math.pow(2,r)};var _5=new me,g5=new me,r1e=new me,s1e=new h,IJ=new za;cr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,_5),r=e.cartesianToCartographic(n,g5),a=new za(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(R.log2(a)));return Math.pow(2,c)};cr.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=cr.subdivideLineCount(n,i,o),a=G.distance(e,t),c=a/s,u=r;u.length=s*2;let f=0;for(let d=0;d<s;d++){let p=MJ(e,t,d*c,a);u[f++]=p[0],u[f++]=p[1]}return u};cr.subdivideLine=function(e,t,n,i){let o=cr.subdivideLineCount(e,t,n),r=h.distance(e,t),s=r/o;l(i)||(i=[]);let a=i;a.length=o*3;let c=0;for(let u=0;u<o;u++){let f=o1e(e,t,u*s,r);a[c++]=f[0],a[c++]=f[1],a[c++]=f[2]}return a};cr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,_5),c=n.cartesianToCartographic(o,g5);IJ.setEndPoints(a,c);let u=IJ.surfaceDistance/r,f=Math.max(0,Math.ceil(R.log2(u))),d=Math.pow(2,f),p=G.distance(e,t),_=p/d,m=s;m.length=d*2;let x=0;for(let C=0;C<d;C++){let A=MJ(e,t,C*_,p);m[x++]=A[0],m[x++]=A[1]}return m};cr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,_5),s=e.cartesianToCartographic(n,g5),a=new za(r,s,e),c=a.surfaceDistance/i,u=Math.max(0,Math.ceil(R.log2(c))),f=Math.pow(2,u),d=a.surfaceDistance/f;l(o)||(o=[]);let p=o;p.length=f*3;let _=0;for(let m=0;m<f;m++){let x=a.interpolateUsingSurfaceDistance(m*d,r1e),C=e.cartographicToCartesian(x,s1e);p[_++]=C.x,p[_++]=C.y,p[_++]=C.z}return p};var a1e=new h,c1e=new h,l1e=new h,u1e=new h;cr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=y(i,re.WGS84);let r=a1e,s=c1e,a=l1e,c=u1e;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let d=0;d<f;d+=3)h.fromArray(u,d,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=h.multiplyByScalar(r,n,s),s=h.add(c,s,s),u[d+f]=s.x,u[d+1+f]=s.y,u[d+2+f]=s.z,o&&(c=h.clone(a,c)),s=h.multiplyByScalar(r,t,s),s=h.add(c,s,s),u[d]=s.x,u[d+1]=s.y,u[d+2]=s.z}return e};cr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new sl;o.enqueue(e);let r,s,a;for(;o.length!==0;){let c=o.dequeue(),u=c.positions;if(t)for(a=u.length,r=0;r<a;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=So(u,h.equalsEpsilon,!0),u.length<3)continue;let f=c.holes?c.holes.length:0;for(r=0;r<f;r++){let d=c.holes[r],p=d.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=So(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let _=0;for(l(d.holes)&&(_=d.holes.length),s=0;s<_;s++)o.enqueue(d.holes[s])}i.push(u)}return i};cr.polygonsFromHierarchy=function(e,t,n,i,o){let r=[],s=[],a=new sl;for(a.enqueue(e);a.length!==0;){let c=a.dequeue(),u=c.positions,f=c.holes,d,p;if(i)for(p=u.length,d=0;d<p;d++)o.scaleToGeodeticSurface(u[d],u[d]);if(t||(u=So(u,h.equalsEpsilon,!0)),u.length<3)continue;let _=n(u);if(!l(_))continue;let m=[],x=ti.computeWindingOrder2D(_);x===fs.CLOCKWISE&&(_.reverse(),u=u.slice().reverse());let C=u.slice(),A=l(f)?f.length:0,T=[],b;for(d=0;d<A;d++){let S=f[d],w=S.positions;if(i)for(p=w.length,b=0;b<p;++b)o.scaleToGeodeticSurface(w[b],w[b]);if(t||(w=So(w,h.equalsEpsilon,!0)),w.length<3)continue;let D=n(w);if(!l(D))continue;x=ti.computeWindingOrder2D(D),x===fs.CLOCKWISE&&(D.reverse(),w=w.slice().reverse()),T.push(w),m.push(C.length),C=C.concat(w),_=_.concat(D);let O=0;for(l(S.holes)&&(O=S.holes.length),b=0;b<O;b++)a.enqueue(S.holes[b])}r.push({outerRing:u,holes:T}),s.push({positions:C,positions2D:_,holes:m})}return{hierarchy:r,polygons:s}};var f1e=new G,d1e=new h,h1e=new Me,m1e=new Q;cr.computeBoundingRectangle=function(e,t,n,i,o){let r=Me.fromAxisAngle(e,i,h1e),s=Q.fromQuaternion(r,m1e),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,d=n.length;for(let p=0;p<d;++p){let _=h.clone(n[p],d1e);Q.multiplyByVector(s,_,_);let m=t(_,f1e);l(m)&&(a=Math.min(a,m.x),c=Math.max(c,m.x),u=Math.min(u,m.y),f=Math.max(f,m.y))}return o.x=a,o.y=u,o.width=c-a,o.height=f-u,o};cr.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=ti.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,u=l(n),f=u?n.positions:void 0;if(o){let d=c.length,p=new Array(d*3),_=0;for(let C=0;C<d;C++){let A=c[C];p[_++]=A.x,p[_++]=A.y,p[_++]=A.z}let m={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:Le.TRIANGLES};u&&(m.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:G.packArray(f)}));let x=new ct(m);return r.normal?Rn.computeNormal(x):x}if(s===Yt.GEODESIC)return ti.computeSubdivision(e,c,a,f,i);if(s===Yt.RHUMB)return ti.computeRhumbLineSubdivision(e,c,a,f,i)};var OJ=[],RJ=[],p1e=new h,_1e=new h;cr.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,u,f,d,p,_,m,x=e.length,C=0,A=0,T=l(t),b=T?t.positions:void 0;if(o)for(a=x*3*2,s=new Array(a*2),T&&(m=x*2*2,_=new Array(m*2)),c=0;c<x;c++)u=e[c],f=e[(c+1)%x],s[C]=s[C+a]=u.x,++C,s[C]=s[C+a]=u.y,++C,s[C]=s[C+a]=u.z,++C,s[C]=s[C+a]=f.x,++C,s[C]=s[C+a]=f.y,++C,s[C]=s[C+a]=f.z,++C,T&&(d=b[c],p=b[(c+1)%x],_[A]=_[A+m]=d.x,++A,_[A]=_[A+m]=d.y,++A,_[A]=_[A+m]=p.x,++A,_[A]=_[A+m]=p.y,++A);else{let I=R.chordLength(i,n.maximumRadius),L=0;if(r===Yt.GEODESIC)for(c=0;c<x;c++)L+=cr.subdivideLineCount(e[c],e[(c+1)%x],I);else if(r===Yt.RHUMB)for(c=0;c<x;c++)L+=cr.subdivideRhumbLineCount(n,e[c],e[(c+1)%x],I);for(a=(L+x)*3,s=new Array(a*2),T&&(m=(L+x)*2,_=new Array(m*2)),c=0;c<x;c++){u=e[c],f=e[(c+1)%x];let N,g;T&&(d=b[c],p=b[(c+1)%x]),r===Yt.GEODESIC?(N=cr.subdivideLine(u,f,I,RJ),T&&(g=cr.subdivideTexcoordLine(d,p,u,f,I,OJ))):r===Yt.RHUMB&&(N=cr.subdivideRhumbLine(n,u,f,I,RJ),T&&(g=cr.subdivideTexcoordRhumbLine(d,p,n,u,f,I,OJ)));let E=N.length;for(let v=0;v<E;++v,++C)s[C]=N[v],s[C+a]=N[v];if(s[C]=f.x,s[C+a]=f.x,++C,s[C]=f.y,s[C+a]=f.y,++C,s[C]=f.z,s[C+a]=f.z,++C,T){let v=g.length;for(let P=0;P<v;++P,++A)_[A]=g[P],_[A+m]=g[P];_[A]=p.x,_[A+m]=p.x,++A,_[A]=p.y,_[A+m]=p.y,++A}}}x=s.length;let S=Ne.createTypedArray(x/3,x-e.length*6),w=0;for(x/=6,c=0;c<x;c++){let I=c,L=I+1,N=I+x,g=N+1;u=h.fromArray(s,I*3,p1e),f=h.fromArray(s,L*3,_1e),!h.equalsEpsilon(u,f,R.EPSILON10,R.EPSILON10)&&(S[w++]=I,S[w++]=N,S[w++]=L,S[w++]=L,S[w++]=N,S[w++]=g)}let D={attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),indices:S,primitiveType:Le.TRIANGLES};return T&&(D.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:_})),new ct(D)};var Un=cr;var g1e=new h,y1e=new qe,x1e=new G,C1e=new G,A1e=new h,T1e=new h,b1e=new h,MS=new h,E1e=new h,S1e=new h,BJ=new Me,w1e=new Q,v1e=new Q,D1e=new h;function P1e(e,t,n,i,o,r,s,a,c){let u=e.positions,f=ti.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let d=Ne.createTypedArray(u.length,f.length);d.set(f);let p=w1e;if(i!==0){let g=Me.fromAxisAngle(s,i,BJ);if(p=Q.fromQuaternion(g,p),t.tangent||t.bitangent){g=Me.fromAxisAngle(s,-i,BJ);let E=Q.fromQuaternion(g,v1e);a=h.normalize(Q.multiplyByVector(E,a,a),a),t.bitangent&&(c=h.normalize(h.cross(s,a,c),c))}}else p=Q.clone(Q.IDENTITY,p);let _=C1e;t.st&&(_.x=n.x,_.y=n.y);let m=u.length,x=m*3,C=new Float64Array(x),A=t.normal?new Float32Array(x):void 0,T=t.tangent?new Float32Array(x):void 0,b=t.bitangent?new Float32Array(x):void 0,S=t.st?new Float32Array(m*2):void 0,w=0,D=0,O=0,I=0,L=0;for(let g=0;g<m;g++){let E=u[g];if(C[w++]=E.x,C[w++]=E.y,C[w++]=E.z,t.st)if(l(o)&&o.positions.length===m)S[L++]=o.positions[g].x,S[L++]=o.positions[g].y;else{let v=Q.multiplyByVector(p,E,g1e),P=r(v,x1e);G.subtract(P,_,P);let M=R.clamp(P.x/n.width,0,1),V=R.clamp(P.y/n.height,0,1);S[L++]=M,S[L++]=V}t.normal&&(A[D++]=s.x,A[D++]=s.y,A[D++]=s.z),t.tangent&&(T[I++]=a.x,T[I++]=a.y,T[I++]=a.z),t.bitangent&&(b[O++]=c.x,b[O++]=c.y,b[O++]=c.z)}let N=new ln;return t.position&&(N.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C})),t.normal&&(N.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(N.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(N.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),t.st&&(N.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S})),new ct({attributes:N,indices:d,primitiveType:Le.TRIANGLES})}function Ty(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy,n=e.textureCoordinates,i=y(e.vertexFormat,Pe.DEFAULT);this._vertexFormat=Pe.clone(i),this._polygonHierarchy=t,this._stRotation=y(e.stRotation,0),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Un.computeHierarchyPackedLength(t,h)+Pe.packedLength+re.packedLength+(l(n)?Un.computeHierarchyPackedLength(n,G):1)+2}Ty.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new Ty(t)};Ty.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Un.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};var I1e=re.clone(re.UNIT_SPHERE),O1e=new Pe,R1e={polygonHierarchy:{}};Ty.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,I1e);t+=re.packedLength;let r=Pe.unpack(e,t,O1e);t+=Pe.packedLength;let s=e[t++],a=e[t]===-1?void 0:Un.unpackPolygonHierarchy(e,t,G);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new Ty(R1e)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};Ty.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=So(s,h.equalsEpsilon,!0),s.length<3)return;let a=A1e,c=T1e,u=b1e,f=E1e,d=S1e;if(!B_.computeProjectTo2DArguments(s,MS,f,d))return;if(a=h.cross(f,d,a),a=h.normalize(a,a),!h.equalsEpsilon(MS,h.ZERO,R.EPSILON6)){let L=e._ellipsoid.geodeticSurfaceNormal(MS,D1e);h.dot(a,L)<0&&(a=h.negate(a,a),f=h.negate(f,f))}let _=B_.createProjectPointsTo2DFunction(MS,f,d),m=B_.createProjectPointTo2DFunction(MS,f,d);t.tangent&&(c=h.clone(f,c)),t.bitangent&&(u=h.clone(d,u));let x=Un.polygonsFromHierarchy(n,r,_,!1),C=x.hierarchy,A=x.polygons,T=function(L){return L},b=r?Un.polygonsFromHierarchy(o,!0,T,!1).polygons:void 0;if(C.length===0)return;s=C[0].outerRing;let S=oe.fromPoints(s),w=Un.computeBoundingRectangle(a,m,s,i,y1e),D=[];for(let L=0;L<A.length;L++){let N=new pt({geometry:P1e(A[L],t,w,i,r?b[L]:void 0,m,a,c,u)});D.push(N)}let O=Rn.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=Ne.createTypedArray(O.attributes.position.values.length/3,O.indices);let I=O.attributes;return t.position||delete I.position,new ct({attributes:I,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:S})};var BI=Ty;function M1e(e){let t=e.length,n=new Float64Array(t*3),i=Ne.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let c=e[a];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=a,i[r++]=(a+1)%t}let s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n})});return new ct({attributes:s,indices:i,primitiveType:Le.LINES})}function by(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Un.computeHierarchyPackedLength(t,h)+1}by.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions}};return new by(t)};by.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var B1e={polygonHierarchy:{}};by.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new by(B1e)),n._polygonHierarchy=i,n.packedLength=o,n};by.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=So(n,h.equalsEpsilon,!0),n.length<3||!B_.validOutline(n))return;let o=Un.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let u=new pt({geometry:M1e(o[c])});r.push(u)}let s=Rn.combineInstances(r)[0],a=oe.fromPoints(t.positions);return new ct({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var ed=by;var L1e={ROUNDED:0,MITERED:1,BEVELED:2},Ii=Object.freeze(L1e);function N1e(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),u=c*a,f=Math.atan2(a,r),d=c*s,p=d*d,_=1-p,m=Math.sqrt(_),x=t/4,C=x*x,A=C*x,T=C*C,b=1+x-3*C/4+5*A/4-175*T/64,S=1-x+15*C/8-35*A/8,w=1-3*x+35*C/4,D=1-5*x,O=b*f-S*Math.sin(2*f)*x/2-w*Math.sin(4*f)*C/16-D*Math.sin(6*f)*A/48-Math.sin(8*f)*5*T/512,I=e._constants;I.a=n,I.b=i,I.f=o,I.cosineHeading=r,I.sineHeading=s,I.tanU=a,I.cosineU=c,I.sineU=u,I.sigma=f,I.sineAlpha=d,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=_,I.cosineAlpha=m,I.u2Over4=x,I.u4Over16=C,I.u6Over64=A,I.u8Over256=T,I.a0=b,I.a1=S,I.a2=w,I.a3=D,I.distanceRatio=O}function F1e(e,t){return e*t*(4+e*(4-3*t))/16}function LJ(e,t,n,i,o,r,s){let a=F1e(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function V1e(e,t,n,i,o,r,s){let a=(t-n)/t,c=r-i,u=Math.atan((1-a)*Math.tan(o)),f=Math.atan((1-a)*Math.tan(s)),d=Math.cos(u),p=Math.sin(u),_=Math.cos(f),m=Math.sin(f),x=d*_,C=d*m,A=p*m,T=p*_,b=c,S=R.TWO_PI,w=Math.cos(b),D=Math.sin(b),O,I,L,N,g;do{w=Math.cos(b),D=Math.sin(b);let F=C-T*w;L=Math.sqrt(_*_*D*D+F*F),I=A+x*w,O=Math.atan2(L,I);let Y;L===0?(Y=0,N=1):(Y=x*D/L,N=1-Y*Y),S=b,g=I-2*A/N,isFinite(g)||(g=0),b=c+LJ(a,Y,N,O,L,I,g)}while(Math.abs(b-S)>R.EPSILON12);let E=N*(t*t-n*n)/(n*n),v=1+E*(4096+E*(E*(320-175*E)-768))/16384,P=E*(256+E*(E*(74-47*E)-128))/1024,M=g*g,V=P*L*(g+P*(I*(2*M-1)-P*g*(4*L*L-3)*(4*M-3)/6)/4),U=n*v*(O-V),k=Math.atan2(_*D,C-T*w),H=Math.atan2(d*D,C*w-T);e._distance=U,e._startHeading=k,e._endHeading=H,e._uSquared=E}var k1e=new h,y5=new h;function NJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,y5),k1e),r=h.normalize(i.cartographicToCartesian(n,y5),y5);V1e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=me.clone(t,e._start),e._end=me.clone(n,e._end),e._start.height=0,e._end.height=0,N1e(e)}function BS(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&NJ(this,e,t,i)}Object.defineProperties(BS.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});BS.prototype.setEndPoints=function(e,t){NJ(this,e,t,this._ellipsoid)};BS.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};BS.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),d=i*i,p=i*d,_=n.u8Over256,m=n.u2Over4,x=n.u6Over64,C=n.u4Over16,A=2*p*_*o/3+i*(1-m+7*C/4-15*x/4+579*_/64-(C-15*x/4+187*_/16)*o-(5*x/4-115*_/16)*r-29*_*s/16)+(m/2-C+71*x/32-85*_/16)*a+(5*C/16-5*x/4+383*_/96)*c-d*((x-11*_/2)*a+5*_*c/2)+(29*x/96-29*_/16)*u+539*_*f/1536,T=Math.asin(Math.sin(A)*n.cosineAlpha),b=Math.atan(n.a/n.b*Math.tan(T));A=A-n.sigma;let S=Math.cos(2*n.sigma+A),w=Math.sin(A),D=Math.cos(A),O=n.cosineU*D,I=n.sineU*w,N=Math.atan2(w*n.sineHeading,O-I*n.cosineHeading)-LJ(n.f,n.sineAlpha,n.cosineSquaredAlpha,A,w,D,S);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=b,t.height=0,t):new me(this._start.longitude+N,b,0)};var td=BS;var yc={};yc.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};yc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var U1e=new me;yc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,U1e).height}return i};var z1e=new B,H1e=new h,FJ=new h,G1e=new rn(h.UNIT_X,0),VJ=new h,W1e=new rn(h.UNIT_X,0),j1e=new h,q1e=new h,C5=[];function UJ(e,t,n){let i=C5;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var NI=new me,LI=new me,V_=new h,A5=new h,Y1e=new h,x5=new td,LS=new za;function X1e(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,A5),u=i.scaleToGeodeticSurface(t,Y1e),f=yc.numberOfPoints(e,t,n),d=i.cartesianToCartographic(c,NI),p=i.cartesianToCartographic(u,LI),_=UJ(f,o,r);x5.setEndPoints(d,p);let m=x5.surfaceDistance/f,x=a;d.height=o;let C=i.cartographicToCartesian(d,V_);h.pack(C,s,x),x+=3;for(let A=1;A<f;A++){let T=x5.interpolateUsingSurfaceDistance(A*m,LI);T.height=_[A],C=i.cartographicToCartesian(T,V_),h.pack(C,s,x),x+=3}return x}function K1e(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,NI),u=i.cartesianToCartographic(t,LI),f=yc.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let d=UJ(f,o,r);LS.ellipsoid.equals(i)||(LS=new za(void 0,void 0,i)),LS.setEndPoints(c,u);let p=LS.surfaceDistance/f,_=a;c.height=o;let m=i.cartographicToCartesian(c,V_);h.pack(m,s,_),_+=3;for(let x=1;x<f;x++){let C=LS.interpolateUsingSurfaceDistance(x*p,LI);C.height=d[x],m=i.cartographicToCartesian(C,V_),h.pack(m,s,_),_+=3}return _}yc.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=y(t,B.IDENTITY);let o=B.inverseTransformation(t,z1e),r=B.multiplyByPoint(o,h.ZERO,H1e),s=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_Y,FJ),FJ),a=rn.fromPointNormal(r,s,G1e),c=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_X,VJ),VJ),u=rn.fromPointNormal(r,c,W1e),f=1;n.push(h.clone(e[0]));let d=n[0],p=e.length;for(let _=1;_<p;++_){let m=e[_];if(rn.getPointDistance(u,d)<0||rn.getPointDistance(u,m)<0){let x=Ki.lineSegmentPlane(d,m,a,j1e);if(l(x)){let C=h.multiplyByScalar(s,5e-9,q1e);rn.getPointDistance(a,d)<0&&h.negate(C,C),n.push(h.add(x,C,new h)),i.push(f+1),h.negate(C,C),n.push(h.add(x,C,new h)),f=1}}n.push(h.clone(e[_])),f++,d=m}i.push(f)}return{positions:n,lengths:i}};yc.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let x=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let C=i.geodeticSurfaceNormal(x,V_);h.multiplyByScalar(C,o,C),h.add(x,C,x)}return[x.x,x.y,x.z]}let s=e.minDistance;if(!l(s)){let x=y(e.granularity,R.RADIANS_PER_DEGREE);s=R.chordLength(x,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=yc.numberOfPoints(t[c],t[c+1],s);let u=(a+1)*3,f=new Array(u),d=0;for(c=0;c<n-1;c++){let x=t[c],C=t[c+1],A=r?o[c]:o,T=r?o[c+1]:o;d=X1e(x,C,s,i,A,T,f,d)}C5.length=0;let p=t[n-1],_=i.cartesianToCartographic(p,NI);_.height=r?o[n-1]:o;let m=i.cartographicToCartesian(_,V_);return h.pack(m,f,u-3),f};var kJ=new me,$1e=new me;yc.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let A=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let T=i.geodeticSurfaceNormal(A,V_);h.multiplyByScalar(T,o,T),h.add(A,T,A)}return[A.x,A.y,A.z]}let s=y(e.granularity,R.RADIANS_PER_DEGREE),a=0,c,u=i.cartesianToCartographic(t[0],kJ),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],$1e),a+=yc.numberOfPointsRhumbLine(u,f,s),u=me.clone(f,kJ);let d=(a+1)*3,p=new Array(d),_=0;for(c=0;c<n-1;c++){let A=t[c],T=t[c+1],b=r?o[c]:o,S=r?o[c+1]:o;_=K1e(A,T,s,i,b,S,p,_)}C5.length=0;let m=t[n-1],x=i.cartesianToCartographic(m,NI);x.height=r?o[n-1]:o;let C=i.cartographicToCartesian(x,V_);return h.pack(C,p,d-3),p};yc.generateCartesianArc=function(e){let t=yc.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};yc.generateCartesianRhumbArc=function(e){let t=yc.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};var Oi=yc;var Vs=[new h,new h],Z1e=new h,J1e=new h,Q1e=new h,ePe=new h,tPe=new h,nPe=new h,iPe=new h,oPe=new h,rPe=new h,OA=new h,FI=new h,NS={},T5=new me;function sPe(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];T5=t.cartesianToCartographic(o,T5),n[i]=T5.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function b5(e,t,n,i){let o=e[0],r=e[1],s=h.angleBetween(o,r),a=Math.ceil(s/i),c=new Array(a),u;if(t===n){for(u=0;u<a;u++)c[u]=t;return c.push(n),c}let d=(n-t)/a;for(u=1;u<a;u++){let p=t+u*d;c[u]=p}return c[0]=t,c.push(n),c}var VI=new h,kI=new h;function aPe(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI),a=G.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var cPe=new h(-1,0,0),Ey=new B,lPe=new B,E5=new Q,uPe=Q.IDENTITY.clone(),fPe=new h,dPe=new se,zJ=new h;function Zm(e,t,n,i,o,r,s,a){let c=fPe,u=dPe;Ey=_t.eastNorthUpToFixedFrame(e,o,Ey),c=B.multiplyByPointAsVector(Ey,cPe,c),c=h.normalize(c,c);let f=aPe(c,t,e,o);E5=Q.fromRotationZ(f,E5),zJ.z=r,Ey=B.multiplyTransformation(Ey,B.fromRotationTranslation(E5,zJ,lPe),Ey);let d=uPe;d[0]=s;for(let p=0;p<a;p++)for(let _=0;_<n.length;_+=3)u=h.fromArray(n,_,u),u=Q.multiplyByVector(d,u,u),u=B.multiplyByPoint(Ey,u,u),i.push(u.x,u.y,u.z);return i}var hPe=new h;function S5(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=h.fromArray(e,a,hPe);i=Zm(c,t,n,i,o,r[a/3],s,1)}return i}function mPe(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let u=a.x-r,f=a.y-s;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function HJ(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var GJ=new Me,WJ=new h,jJ=new Q;function qJ(e,t,n,i,o,r,s,a,c,u){let f=h.angleBetween(h.subtract(t,e,OA),h.subtract(n,e,FI)),d=i===Ii.BEVELED?0:Math.ceil(f/R.toRadians(5)),p;o?p=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,OA),f/(d+1),GJ),jJ):p=Q.fromQuaternion(Me.fromAxisAngle(e,f/(d+1),GJ),jJ);let _,m;if(t=h.clone(t,WJ),d>0){let x=u?2:1;for(let C=0;C<d;C++)t=Q.multiplyByVector(p,t,t),_=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,x)}else _=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,1),n=h.clone(n,WJ),_=h.subtract(n,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(n,FI),s=Zm(m,_,a,s,r,c,1,1);return s}NS.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];G.equals(r,s)||n.push(s)}return n};NS.angleIsGreaterThanPi=function(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI);return s.x*r.y-s.y*r.x>=0};var pPe=new h,_Pe=new h;NS.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=sPe(e,r),a=i._granularity,c=i._cornerType,u=o?mPe(t,n):HJ(t,n),f=o?HJ(t,n):void 0,d=n.height/2,p=n.width/2,_=e.length,m=[],x=o?[]:void 0,C=Z1e,A=J1e,T=Q1e,b=ePe,S=tPe,w=nPe,D=iPe,O=oPe,I=rPe,L=e[0],N=e[1];b=r.geodeticSurfaceNormal(L,b),C=h.subtract(N,L,C),C=h.normalize(C,C),O=h.cross(b,C,O),O=h.normalize(O,O);let g=s[0],E=s[1];o&&(x=Zm(L,O,f,x,r,g+d,1,1)),I=h.clone(L,I),L=N,A=h.negate(C,A);let v,P;for(let U=1;U<_-1;U++){let k=o?2:1;if(N=e[U+1],L.equals(N)){Mt("Positions are too close and are considered equivalent with rounding error.");continue}C=h.subtract(N,L,C),C=h.normalize(C,C),T=h.add(C,A,T),T=h.normalize(T,T),b=r.geodeticSurfaceNormal(L,b);let H=h.multiplyByScalar(b,h.dot(C,b),pPe);h.subtract(C,H,H),h.normalize(H,H);let F=h.multiplyByScalar(b,h.dot(A,b),_Pe);if(h.subtract(A,F,F),h.normalize(F,F),!R.equalsEpsilon(Math.abs(h.dot(H,F)),1,R.EPSILON7)){T=h.cross(T,b,T),T=h.cross(b,T,T),T=h.normalize(T,T);let j=1/Math.max(.25,h.magnitude(h.cross(T,A,OA))),X=NS.angleIsGreaterThanPi(C,A,L,r);X?(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):(T=h.negate(T,T),m=Zm(L,T,u,m,r,E+d,j,k)),I=h.clone(D,I)):(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,-p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,-p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):m=Zm(L,T,u,m,r,E+d,j,k),I=h.clone(D,I)),A=h.negate(C,A)}else m=Zm(I,O,u,m,r,g+d,1,1),I=L;g=E,E=s[U+1],L=N}Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(L,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),o&&(x=Zm(L,O,f,x,r,E+d,1,1)),_=m.length;let M=o?_+x.length:_,V=new Float64Array(M);return V.set(m),o&&V.set(x,_),V};var Sh=NS;var v5={},RA=new h,ZJ=new h,gPe=new h,YJ=new h,xc=[new h,new h],JJ=new h,QJ=new h,eQ=new h,yPe=new h,xPe=new h,CPe=new h,APe=new h,TPe=new h,bPe=new h,EPe=new h,XJ=new Me,KJ=new Q;function UI(e,t,n,i,o){let r=h.angleBetween(h.subtract(t,e,RA),h.subtract(n,e,ZJ)),s=i===Ii.BEVELED?1:Math.ceil(r/R.toRadians(5))+1,a=s*3,c=new Array(a);c[a-3]=n.x,c[a-2]=n.y,c[a-1]=n.z;let u;o?u=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,RA),r/s,XJ),KJ):u=Q.fromQuaternion(Me.fromAxisAngle(e,r/s,XJ),KJ);let f=0;t=h.clone(t,RA);for(let d=0;d<s;d++)t=Q.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function SPe(e){let t=JJ,n=QJ,i=eQ,o=e[1];n=h.fromArray(e[1],o.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let r=UI(t,n,i,Ii.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=h.fromArray(a,a.length-3,n),i=h.fromArray(o,0,i),t=h.midpoint(n,i,t);let c=UI(t,n,i,Ii.ROUNDED,!1);return[r,c]}function $J(e,t,n,i){let o=RA;return i?o=h.add(e,t,o):(t=h.negate(t,t),o=h.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function w5(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=h.multiplyByScalar(t,n,RA),a=h.negate(s,ZJ),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let d=h.fromArray(e,f,gPe),p=h.add(d,a,YJ);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let _=h.add(d,s,YJ);r[u--]=_.z,r[u--]=_.y,r[u--]=_.x}return i.push(o,r),i}v5.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var wPe=new h,vPe=new h;v5.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=JJ,c=QJ,u=eQ,f=yPe,d=xPe,p=CPe,_=APe,m=TPe,x=bPe,C=EPe,A=[],T=s?[]:void 0,b=s?[]:void 0,S=n[0],w=n[1];c=h.normalize(h.subtract(w,S,c),c),a=i.geodeticSurfaceNormal(S,a),f=h.normalize(h.cross(a,c,f),f),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),_=h.clone(S,_),S=w,u=h.negate(c,u);let D,O=[],I,L=n.length;for(I=1;I<L-1;I++){a=i.geodeticSurfaceNormal(S,a),w=n[I+1],c=h.normalize(h.subtract(w,S,c),c),d=h.normalize(h.add(c,u,d),d);let g=h.multiplyByScalar(a,h.dot(c,a),wPe);h.subtract(c,g,g),h.normalize(g,g);let E=h.multiplyByScalar(a,h.dot(u,a),vPe);if(h.subtract(u,E,E),h.normalize(E,E),!R.equalsEpsilon(Math.abs(h.dot(g,E)),1,R.EPSILON7)){d=h.cross(d,a,d),d=h.cross(a,d,d),d=h.normalize(d,d);let P=o/Math.max(.25,h.magnitude(h.cross(d,u,RA))),M=Sh.angleIsGreaterThanPi(c,u,S,i);d=h.multiplyByScalar(d,P,d),M?(m=h.add(S,d,m),C=h.add(m,h.multiplyByScalar(f,o,C),C),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(x,p),f=h.normalize(h.cross(a,c,f),f),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),_=h.add(m,h.multiplyByScalar(f,o,_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({leftPositions:UI(m,p,x,r,M)}):O.push({leftPositions:$J(S,h.negate(d,d),x,M)})):(x=h.add(S,d,x),C=h.add(x,h.negate(h.multiplyByScalar(f,o,C),C),C),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(m,p),f=h.normalize(h.cross(a,c,f),f),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),_=h.add(x,h.negate(h.multiplyByScalar(f,o,_),_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({rightPositions:UI(x,p,m,r,M)}):O.push({rightPositions:$J(S,d,m,M)})),u=h.negate(c,u)}S=w}a=i.geodeticSurfaceNormal(S,a),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(S,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z));let N;return r===Ii.ROUNDED&&(N=SPe(A)),{positions:A,corners:O,lefts:T,normals:b,endPositions:N}};var Ni=v5;var iQ=new h,oQ=new h,zI=new h,HI=new h,DPe=new h,rQ=new h,k_=new h,MA=new h;function sQ(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function nd(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,u=h.normalize(h.cross(n,t,k_),k_);r.normal&&Ni.addAttribute(s,t,i,o),r.tangent&&Ni.addAttribute(a,u,i,o),r.bitangent&&Ni.addAttribute(c,n,i,o)}function aQ(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new ln,u,f=0,d=0,p,_=0,m;for(p=0;p<i.length;p+=2)m=i[p].length-3,f+=m,_+=m*2,d+=i[p+1].length-3;for(f+=3,d+=3,p=0;p<o.length;p++){u=o[p];let J=o[p].leftPositions;l(J)?(m=J.length,f+=m,_+=m):(m=o[p].rightPositions.length,d+=m,_+=m)}let x=l(r),C;x&&(C=r[0].length-3,f+=C,d+=C,C/=3,_+=C*6);let A=f+d,T=new Float64Array(A),b=t.normal?new Float32Array(A):void 0,S=t.tangent?new Float32Array(A):void 0,w=t.bitangent?new Float32Array(A):void 0,D={normals:b,tangents:S,bitangents:w},O=0,I=A-1,L,N,g,E,v=iQ,P=oQ,M,V,U=C/2,k=Ne.createTypedArray(A/3,_),H=0;if(x){V=zI,M=HI;let J=r[0];for(v=h.fromArray(a,0,v),P=h.fromArray(s,0,P),p=0;p<U;p++)V=h.fromArray(J,(U-1-p)*3,V),M=h.fromArray(J,(U+p)*3,M),Ni.addAttribute(T,M,O),Ni.addAttribute(T,V,void 0,I),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}let F=0,Y=0,j=i[F++],X=i[F++];T.set(j,O),T.set(X,I-X.length+1),P=h.fromArray(s,Y,P);let W,$;for(m=X.length-3,p=0;p<m;p+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,p,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-p,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;for(W=n.geodeticSurfaceNormal(h.fromArray(j,m,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m,MA),MA),v=h.normalize(h.add(W,$,v),v),Y+=3,p=0;p<o.length;p++){let J;u=o[p];let ce=u.leftPositions,he=u.rightPositions,ie,ae,ge=rQ,Se=zI,be=HI;if(v=h.fromArray(a,Y,v),l(ce)){for(nd(D,v,P,void 0,I,t),I-=3,ie=E,ae=g,J=0;J<ce.length/3;J++)ge=h.fromArray(ce,J*3,ge),k[H++]=ie,k[H++]=ae-J-1,k[H++]=ae-J,Ni.addAttribute(T,ge,void 0,I),Se=h.fromArray(T,(ae-J-1)*3,Se),be=h.fromArray(T,ie*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,void 0,I,t),I-=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,ae*3,Se),ge,Se),be=h.subtract(h.fromArray(T,(ae-J)*3,be),ge,be),P=h.normalize(h.add(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3}else{for(nd(D,v,P,O,void 0,t),O+=3,ie=g,ae=E,J=0;J<he.length/3;J++)ge=h.fromArray(he,J*3,ge),k[H++]=ie,k[H++]=ae+J,k[H++]=ae+J+1,Ni.addAttribute(T,ge,O),Se=h.fromArray(T,ie*3,Se),be=h.fromArray(T,(ae+J)*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,(ae+J)*3,Se),ge,Se),be=h.subtract(h.fromArray(T,ae*3,be),ge,be),P=h.normalize(h.negate(h.add(be,Se,P),P),P),nd(D,v,P,void 0,I,t),I-=3}for(j=i[F++],X=i[F++],j.splice(0,3),X.splice(X.length-3,3),T.set(j,O),T.set(X,I-X.length+1),m=X.length-3,Y+=3,P=h.fromArray(s,Y,P),J=0;J<X.length;J+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,J,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-J,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;O-=3,I+=3}if(v=h.fromArray(a,a.length-3,v),nd(D,v,P,O,I,t),x){O+=3,I-=3,V=zI,M=HI;let J=r[1];for(p=0;p<U;p++)V=h.fromArray(J,(C-p-1)*3,V),M=h.fromArray(J,p*3,M),Ni.addAttribute(T,V,void 0,I),Ni.addAttribute(T,M,O),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}if(c.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:T}),t.st){let J=new Float32Array(A/3*2),ce,he,ie=0;if(x){f/=3,d/=3;let ae=Math.PI/(C+1);he=1/(f-C+1),ce=1/(d-C+1);let ge,Se=C/2;for(p=Se+1;p<C+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=1;p<d-C+1;p++)J[ie++]=p*ce,J[ie++]=0;for(p=C;p>Se;p--)ge=R.PI_OVER_TWO-p*ae,J[ie++]=1-ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=Se;p>0;p--)ge=R.PI_OVER_TWO-ae*p,J[ie++]=1-he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=f-C;p>0;p--)J[ie++]=p*he,J[ie++]=1;for(p=1;p<Se+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge))}else{for(f/=3,d/=3,he=1/(f-1),ce=1/(d-1),p=0;p<d;p++)J[ie++]=p*ce,J[ie++]=0;for(p=f;p>0;p--)J[ie++]=(p-1)*he,J[ie++]=1}c.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(c.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.normals})),t.tangent&&(c.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.tangents})),t.bitangent&&(c.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.bitangents})),{attributes:c,indices:k}}function PPe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,d=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,_=iQ,m=oQ,x=zI,C=HI,A=DPe,T=rQ,b=c;for(u=0;u<s;u+=3){let S=b+c;_=h.fromArray(n,u,_),m=h.fromArray(n,u+s,m),x=h.fromArray(n,(u+3)%s,x),m=h.subtract(m,_,m),x=h.subtract(x,_,x),C=h.normalize(h.cross(m,x,C),C),t.normal&&(Ni.addAttribute(f,C,S),Ni.addAttribute(f,C,S+3),Ni.addAttribute(f,C,b),Ni.addAttribute(f,C,b+3)),(t.tangent||t.bitangent)&&(T=h.fromArray(i,u,T),t.bitangent&&(Ni.addAttribute(p,T,S),Ni.addAttribute(p,T,S+3),Ni.addAttribute(p,T,b),Ni.addAttribute(p,T,b+3)),t.tangent&&(A=h.normalize(h.cross(T,C,A),A),Ni.addAttribute(d,A,S),Ni.addAttribute(d,A,S+3),Ni.addAttribute(d,A,b),Ni.addAttribute(d,A,b+3))),b+=6}if(t.normal){for(f.set(i),u=0;u<s;u+=3)f[u+s]=-i[u],f[u+s+1]=-i[u+1],f[u+s+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let S=e.tangent.values;d.set(S),d.set(S,s),e.tangent.values=d}}if(t.st){let f=e.st.values,d=new Float32Array(a*6);d.set(f),d.set(f,a);let p=a*2;for(let _=0;_<2;_++){for(d[p++]=f[0],d[p++]=f[1],u=2;u<a;u+=2){let m=f[u],x=f[u+1];d[p++]=m,d[p++]=x,d[p++]=m,d[p++]=x}d[p++]=f[0],d[p++]=f[1]}e.st.values=d}return e}function D5(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function IPe(e,t){let n=new Pe({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=Ni.computePositions(e),r=aQ(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,u=r.indices,f=c.position.values,d=f.length,p=new Float64Array(d*6),_=new Float64Array(d);_.set(f);let m=new Float64Array(d*4);f=ti.scaleToGeodeticHeight(f,s,i),m=D5(f,0,m),_=ti.scaleToGeodeticHeight(_,a,i),m=D5(_,d*2,m),p.set(f),p.set(_,d),p.set(m,d*2),c.position.values=p,c=PPe(c,t);let x,C=d/3;if(e.shadowVolume){let L=c.normal.values;d=L.length;let N=new Float32Array(d*6);for(x=0;x<d;x++)L[x]=-L[x];N.set(L,d),N=D5(L,d*4,N),c.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let L=new Uint8Array(C*6);if(e.offsetAttribute===tn.TOP)L=L.fill(1,0,C).fill(1,C*2,C*4);else{let N=e.offsetAttribute===tn.NONE?0:1;L=L.fill(N)}c.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}let A=u.length,T=C+C,b=Ne.createTypedArray(p.length/3,A*2+T*3);b.set(u);let S=A;for(x=0;x<A;x+=3){let L=u[x],N=u[x+1],g=u[x+2];b[S++]=g+C,b[S++]=N+C,b[S++]=L+C}let w,D,O,I;for(x=0;x<T;x+=2)w=x+T,D=w+T,O=w+1,I=D+1,b[S++]=w,b[S++]=D,b[S++]=O,b[S++]=O,b[S++]=D,b[S++]=I;return{attributes:c,indices:b}}var tQ=new h,FS=new h,ku=new me;function nQ(e,t,n,i,o,r){let s=h.subtract(t,e,tQ);h.normalize(s,s);let a=n.geodeticSurfaceNormal(e,FS),c=h.cross(s,a,tQ);h.multiplyByScalar(c,i,c);let u=o.latitude,f=o.longitude,d=r.latitude,p=r.longitude;h.add(e,c,FS),n.cartesianToCartographic(FS,ku);let _=ku.latitude,m=ku.longitude;u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),h.subtract(e,c,FS),n.cartesianToCartographic(FS,ku),_=ku.latitude,m=ku.longitude,u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),o.latitude=u,o.longitude=f,r.latitude=d,r.longitude=p}var Vu=new h,VS=new h,al=new me,cl=new me;function cQ(e,t,n,i,o){e=sQ(e,t);let r=So(e,h.equalsEpsilon),s=r.length;if(s<2||n<=0)return new de;let a=n*.5;al.latitude=Number.POSITIVE_INFINITY,al.longitude=Number.POSITIVE_INFINITY,cl.latitude=Number.NEGATIVE_INFINITY,cl.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===Ii.ROUNDED){let p=r[0];h.subtract(p,r[1],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(p,Vu,VS),t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u)}for(let p=0;p<s-1;++p)nQ(r[p],r[p+1],t,a,al,cl);let f=r[s-1];h.subtract(f,r[s-2],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(f,Vu,VS),nQ(f,VS,t,a,al,cl),i===Ii.ROUNDED&&(t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u));let d=l(o)?o:new de;return d.north=cl.latitude,d.south=al.latitude,d.east=cl.longitude,d.west=al.longitude,d}function Qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*h.packedLength+re.packedLength+Pe.packedLength+7}Qm.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var lQ=re.clone(re.UNIT_SPHERE),uQ=new Pe,Jm={positions:void 0,ellipsoid:lQ,vertexFormat:uQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Qm.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=h.packedLength)o[m]=h.unpack(e,t);let r=re.unpack(e,t,lQ);t+=re.packedLength;let s=Pe.unpack(e,t,uQ);t+=Pe.packedLength;let a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++]===1,_=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._vertexFormat=Pe.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=d,n._shadowVolume=p,n._offsetAttribute=_===-1?void 0:_,n):(Jm.positions=o,Jm.width=a,Jm.height=c,Jm.extrudedHeight=u,Jm.cornerType=f,Jm.granularity=d,Jm.shadowVolume=p,Jm.offsetAttribute=_===-1?void 0:_,new Qm(Jm))};Qm.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.positions,i=e.width,o=y(e.ellipsoid,re.WGS84),r=y(e.cornerType,Ii.ROUNDED);return cQ(n,o,i,r,t)};Qm.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=sQ(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=IPe(u,c);else{let _=Ni.computePositions(u);if(f=aQ(_,c,i),f.attributes.position.values=ti.scaleToGeodeticHeight(f.attributes.position.values,r,i),l(e._offsetAttribute)){let m=e._offsetAttribute===tn.NONE?0:1,x=f.attributes.position.values.length,C=new Uint8Array(x/3).fill(m);f.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}}let d=f.attributes,p=oe.fromVertices(d.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new ct({attributes:d,indices:f.indices,primitiveType:Le.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Qm.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Qm({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Qm.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=cQ(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var BA=Qm;var fQ=new h,dQ=new h,OPe=new h;function RPe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function hQ(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new ln,a,c=0,u=0,f,d=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,d+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<o.length;f++){a=o[f];let M=o[f].leftPositions;l(M)?(p=M.length,c+=p,d+=p/3*2):(p=o[f].rightPositions.length,u+=p,d+=p/3*2)}let _=l(r),m;_&&(m=r[0].length-3,c+=m,u+=m,m/=3,d+=m*4);let x=c+u,C=new Float64Array(x),A=0,T=x-1,b,S,w,D,O,I,L=m/2,N=Ne.createTypedArray(x/3,d+4),g=0;if(N[g++]=A/3,N[g++]=(T-2)/3,_){n.push(A/3),I=fQ,O=dQ;let M=r[0];for(f=0;f<L;f++)I=h.fromArray(M,(L-1-f)*3,I),O=h.fromArray(M,(L+f)*3,O),Ni.addAttribute(C,O,A),Ni.addAttribute(C,I,void 0,T),S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3}let E=0,v=i[E++],P=i[E++];for(C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,n.push(A/3,(T-2)/3),f=0;f<p;f+=3)S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;for(f=0;f<o.length;f++){let M;a=o[f];let V=a.leftPositions,U=a.rightPositions,k,H=OPe;if(l(V)){for(T-=3,k=w,n.push(D),M=0;M<V.length/3;M++)H=h.fromArray(V,M*3,H),N[g++]=k-M-1,N[g++]=k-M,Ni.addAttribute(C,H,void 0,T),T-=3;n.push(k-Math.floor(V.length/6)),t===Ii.BEVELED&&n.push((T-2)/3+1),A+=3}else{for(A+=3,k=D,n.push(w),M=0;M<U.length/3;M++)H=h.fromArray(U,M*3,H),N[g++]=k+M,N[g++]=k+M+1,Ni.addAttribute(C,H,A),A+=3;n.push(k+Math.floor(U.length/6)),t===Ii.BEVELED&&n.push(A/3-1),T-=3}for(v=i[E++],P=i[E++],v.splice(0,3),P.splice(P.length-3,3),C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,M=0;M<P.length;M+=3)D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;A-=3,T+=3,n.push(A/3,(T-2)/3)}if(_){A+=3,T-=3,I=fQ,O=dQ;let M=r[1];for(f=0;f<L;f++)I=h.fromArray(M,(m-f-1)*3,I),O=h.fromArray(M,f*3,O),Ni.addAttribute(C,I,void 0,T),Ni.addAttribute(C,O,A),D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;n.push(A/3)}else n.push(A/3,(T-2)/3);return N[g++]=A/3,N[g++]=(T-2)/3,s.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C}),{attributes:s,indices:N,wallIndices:n}}function MPe(e){let t=e.ellipsoid,n=Ni.computePositions(e),i=hQ(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,u=a.position.values,f=u.length,d=new Float64Array(f);d.set(u);let p=new Float64Array(f*2);if(u=ti.scaleToGeodeticHeight(u,r,t),d=ti.scaleToGeodeticHeight(d,s,t),p.set(u),p.set(d,f),a.position.values=p,f/=3,l(e.offsetAttribute)){let b=new Uint8Array(f*2);if(e.offsetAttribute===tn.TOP)b=b.fill(1,0,f);else{let S=e.offsetAttribute===tn.NONE?0:1;b=b.fill(S)}a.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let _,m=c.length,x=Ne.createTypedArray(p.length/3,(m+o.length)*2);x.set(c);let C=m;for(_=0;_<m;_+=2){let b=c[_],S=c[_+1];x[C++]=b+f,x[C++]=S+f}let A,T;for(_=0;_<o.length;_++)A=o[_],T=A+f,x[C++]=A,x[C++]=T;return{attributes:a,indices:x}}function kS(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+re.packedLength+6}kS.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=y(e._offsetAttribute,-1),t};var mQ=re.clone(re.UNIT_SPHERE),U_={positions:void 0,ellipsoid:mQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};kS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)o[p]=h.unpack(e,t);let r=re.unpack(e,t,mQ);t+=re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=d===-1?void 0:d,n):(U_.positions=o,U_.width=s,U_.height=a,U_.extrudedHeight=c,U_.cornerType=u,U_.granularity=f,U_.offsetAttribute=d===-1?void 0:d,new kS(U_))};kS.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=RPe(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,u=MPe(c);else{let p=Ni.computePositions(c);if(u=hQ(p,c.cornerType),u.attributes.position.values=ti.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let _=u.attributes.position.values.length,m=e._offsetAttribute===tn.NONE?0:1,x=new Uint8Array(_/3).fill(m);u.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}}let f=u.attributes,d=oe.fromVertices(f.position.values,void 0,3);return new ct({attributes:f,indices:u.indices,primitiveType:Le.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var GI=kS;function BPe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Mn=BPe;var P5,pQ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyNDBiMjBhOS1jZWE5LTRmYWYtOGI3Yy05ZDg3ODBiZDZiZjUiLCJpZCI6MjU5LCJpYXQiOjE2NTkzNjE0MTJ9.tXPPvw93XpCGHG71h7s_mMLlWGCuAL55o8LC309hLAg",WI={};WI.defaultAccessToken=pQ;WI.defaultServer=new De({url:"https://api.cesium.com/"});WI.getDefaultTokenCredit=function(e){if(e===pQ){if(!l(P5)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;P5=new Ht(t,!0)}return P5}};var wh=WI;function Cc(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:LPe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new fe("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");De.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new ei.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(Cc.prototype=Object.create(De.prototype),Cc.prototype.constructor=Cc);Cc.fromAssetId=function(e,t){let n=Cc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Cc(i,n)})};Object.defineProperties(Cc.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Cc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Cc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Ht.getIonCredit),i=wh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Ht.clone(i)),n};Cc.prototype.clone=function(e){let t=y(this._ionRoot,this);return l(e)||(e=new Cc(t._ionEndpoint,t._ionEndpointResource)),e=De.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Cc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return De.prototype.fetchImage.call(this,e)};Cc.prototype._makeRequest=function(e){return this._isExternal||new ei.default(this.url).authority()!==this._ionEndpointDomain?De.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,De.prototype._makeRequest.call(this,e))};Cc._createEndpointResource=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.server,wh.defaultServer),i=y(t.accessToken,wh.defaultAccessToken);n=De.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function LPe(e,t){let n=y(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var vh=Cc;function NPe(e){return e=y(e,y.EMPTY_OBJECT),new hI({url:vh.fromAssetId(1),requestVertexNormals:y(e.requestVertexNormals,!1),requestWaterMask:y(e.requestWaterMask,!1)})}var jI=NPe;function Uu(e){this.planes=y(e,[])}var US=[new h,new h,new h];h.clone(h.UNIT_X,US[0]);h.clone(h.UNIT_Y,US[1]);h.clone(h.UNIT_Z,US[2]);var z_=new h,FPe=new h,_Q=new rn(new h(1,0,0),0);Uu.fromBoundingSphere=function(e,t){l(t)||(t=new Uu);let n=US.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a<n;++a){let c=US[a],u=i[s],f=i[s+1];l(u)||(u=i[s]=new se),l(f)||(f=i[s+1]=new se),h.multiplyByScalar(c,-r,z_),h.add(o,z_,z_),u.x=c.x,u.y=c.y,u.z=c.z,u.w=-h.dot(c,z_),h.multiplyByScalar(c,r,z_),h.add(o,z_,z_),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-h.dot(h.negate(c,FPe),z_),s+=2}return t};Uu.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(rn.fromCartesian4(t[i],_Q));if(r===Zt.OUTSIDE)return Zt.OUTSIDE;r===Zt.INTERSECTING&&(n=!0)}return n?Zt.INTERSECTING:Zt.INSIDE};Uu.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===Uu.MASK_OUTSIDE||t===Uu.MASK_INSIDE)return t;let n=Uu.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let s=o<31?1<<o:0;if(o<31&&(t&s)===0)continue;let a=e.intersectPlane(rn.fromCartesian4(i[o],_Q));if(a===Zt.OUTSIDE)return Uu.MASK_OUTSIDE;a===Zt.INTERSECTING&&(n|=s)}return n};Uu.MASK_OUTSIDE=4294967295;Uu.MASK_INSIDE=0;Uu.MASK_INDETERMINATE=2147483647;var da=Uu;function LA(e){e=y(e,y.EMPTY_OBJECT),this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e;let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(LA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});LA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new ka({buffer:c,width:r,height:s})})};LA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};LA.prototype.getTileDataAvailable=function(e,t,n){};LA.prototype.loadTileDataAvailability=function(e,t,n){};var gQ=LA;var yQ={};yQ.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,u=new Float64Array(c*3),f,d=0,p=0,_=o?a*3:0,m=o?(a+i)*3:i*3;for(f=0;f<i;f++){let x=f/i*R.TWO_PI,C=Math.cos(x),A=Math.sin(x),T=C*n,b=A*n,S=C*t,w=A*t;u[p+_]=T,u[p+_+1]=b,u[p+_+2]=s,u[p+m]=S,u[p+m+1]=w,u[p+m+2]=r,p+=3,o&&(u[d++]=T,u[d++]=b,u[d++]=s,u[d++]=S,u[d++]=w,u[d++]=r)}return u};var NA=yQ;var I5=new G,VPe=new h,kPe=new h,UPe=new h,zPe=new h;function ep(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e.slices,128);this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Pe.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}ep.packedLength=Pe.packedLength+5;ep.pack=function(e,t,n){return n=y(n,0),Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=y(e._offsetAttribute,-1),t};var xQ=new Pe,FA={vertexFormat:xQ,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};ep.unpack=function(e,t,n){t=y(t,0);let i=Pe.unpack(e,t,xQ);t+=Pe.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Pe.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(FA.length=o,FA.topRadius=r,FA.bottomRadius=s,FA.slices=a,FA.offsetAttribute=c===-1?void 0:c,new ep(FA))};ep.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,c=s+s,u=NA.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(c*2):void 0,d=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,_=o.bitangent?new Float32Array(c*3):void 0,m,x=o.normal||o.tangent||o.bitangent;if(x){let O=o.tangent||o.bitangent,I=0,L=0,N=0,g=Math.atan2(i-n,t),E=VPe;E.z=Math.sin(g);let v=Math.cos(g),P=UPe,M=kPe;for(m=0;m<r;m++){let V=m/r*R.TWO_PI,U=v*Math.cos(V),k=v*Math.sin(V);x&&(E.x=U,E.y=k,O&&(P=h.normalize(h.cross(h.UNIT_Z,E,P),P)),o.normal&&(d[I++]=E.x,d[I++]=E.y,d[I++]=E.z,d[I++]=E.x,d[I++]=E.y,d[I++]=E.z),o.tangent&&(p[L++]=P.x,p[L++]=P.y,p[L++]=P.z,p[L++]=P.x,p[L++]=P.y,p[L++]=P.z),o.bitangent&&(M=h.normalize(h.cross(E,P,M),M),_[N++]=M.x,_[N++]=M.y,_[N++]=M.z,_[N++]=M.x,_[N++]=M.y,_[N++]=M.z))}for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=-1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=-1,_[N++]=0);for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=1,_[N++]=0)}let C=12*r-12,A=Ne.createTypedArray(c,C),T=0,b=0;for(m=0;m<r-1;m++)A[T++]=b,A[T++]=b+2,A[T++]=b+3,A[T++]=b,A[T++]=b+3,A[T++]=b+1,b+=2;for(A[T++]=s-2,A[T++]=0,A[T++]=1,A[T++]=s-2,A[T++]=1,A[T++]=s-1,m=1;m<r-1;m++)A[T++]=s+m+1,A[T++]=s+m,A[T++]=s;for(m=1;m<r-1;m++)A[T++]=a,A[T++]=a+m,A[T++]=a+m+1;let S=0;if(o.st){let O=Math.max(n,i);for(m=0;m<c;m++){let I=h.fromArray(u,m*3,zPe);f[S++]=(I.x+O)/(2*O),f[S++]=(I.y+O)/(2*O)}}let w=new ln;o.position&&(w.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(w.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})),o.tangent&&(w.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(w.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(w.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),I5.x=t*.5,I5.y=Math.max(i,n);let D=new oe(h.ZERO,G.magnitude(I5));if(l(e._offsetAttribute)){t=u.length;let O=e._offsetAttribute===tn.NONE?0:1,I=new Uint8Array(t/3).fill(O);w.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new ct({attributes:w,indices:A,primitiveType:Le.TRIANGLES,boundingSphere:D,offsetAttribute:e._offsetAttribute})};var O5;ep.getUnitCylinder=function(){return l(O5)||(O5=ep.createGeometry(new ep({topRadius:1,bottomRadius:1,length:1,vertexFormat:Pe.POSITION_ONLY}))),O5};var qI=ep;var R5=new G;function VA(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.slices,128),r=Math.max(y(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}VA.packedLength=6;VA.pack=function(e,t,n){return n=y(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var Sy={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};VA.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(Sy.length=i,Sy.topRadius=o,Sy.bottomRadius=r,Sy.slices=s,Sy.numberOfVerticalLines=a,Sy.offsetAttribute=c===-1?void 0:c,new VA(Sy))};VA.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=NA.computePositions(t,n,i,o,!1),c=o*2,u;if(r>0){let x=Math.min(r,o);u=Math.round(o/x),c+=x}let f=Ne.createTypedArray(s,c*2),d=0,p;for(p=0;p<o-1;p++)f[d++]=p,f[d++]=p+1,f[d++]=p+o,f[d++]=p+1+o;if(f[d++]=o-1,f[d++]=0,f[d++]=o+o-1,f[d++]=o,r>0)for(p=0;p<o;p+=u)f[d++]=p,f[d++]=p+o;let _=new ln;_.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:a}),R5.x=t*.5,R5.y=Math.max(i,n);let m=new oe(h.ZERO,G.magnitude(R5));if(l(e._offsetAttribute)){t=a.length;let x=e._offsetAttribute===tn.NONE?0:1,C=new Uint8Array(t/3).fill(x);_.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}return new ct({attributes:_,indices:f,primitiveType:Le.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var YI=VA;var HPe=1953029805,GPe=2917034100;function M5(e,t){if(M5.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new fe("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===HPe||o===GPe)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,u=n,f,d=8;for(;s<c;)for(d=(d+8)%24,f=d;s<c&&f<u;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(d=(d+8)%24,f=d);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(f)),s++,f++}M5.passThroughDataForTesting=!1;var XI=M5;var B5=32767,WPe=new me,jPe=new h;function qPe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);Pn.zigZagDeltaDecode(s,a,c);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let d=s[f],p=a[f],_=c[f],m=R.lerp(t.west,t.east,d/B5),x=R.lerp(t.south,t.north,p/B5),C=R.lerp(n,i,_/B5),A=me.fromRadians(m,x,C,WPe),T=o.cartographicToCartesian(A,jPe);h.pack(T,u,f*3)}return u}var KI=qPe;function CQ(e){this.proxy=e}CQ.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var AQ=CQ;function zl(e,t){e=y(e,0),this._near=e,t=y(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(zl.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});zl.packedLength=2;zl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n]=e.far,t};zl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zl),n.near=e[t++],n.far=e[t],n};zl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};zl.clone=function(e,t){if(!!l(e))return l(t)||(t=new zl),t.near=e.near,t.far=e.far,t};zl.prototype.clone=function(e){return zl.clone(this,e)};zl.prototype.equals=function(e){return zl.equals(this,e)};var Tt=zl;function zS(e,t){e=y(e,0),t=y(t,Number.MAX_VALUE),this.value=new Float32Array([e,t])}Object.defineProperties(zS.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});zS.fromDistanceDisplayCondition=function(e){return new zS(e.near,e.far)};zS.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Fn=zS;function id(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(id.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});id.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new id({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};id.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};id.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)TQ(this,t)};id.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,TQ(this,i),t};id.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],bQ(this,0)),this._array[e-1]=void 0,t};id.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=L5(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&bQ(this,n)}return this._array[e-1]=void 0,t};id.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};id.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[L5(this,1,2)?1:2]};function $I(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function HS(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function L5(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function TQ(e,t){if(t===0)return;let n=Math.floor(R.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=HS(e,t,i);for(o!==n&&($I(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(HS(e,t,r)!==o)break;$I(e,t,r),t=r}}function bQ(e,t){let n=e._length,i=Math.floor(R.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){HS(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let u=0;u<c;u++){let f=a+u;HS(e,f,r)===i&&(r=f)}}if(HS(e,r,t)===i&&($I(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);L5(e,r,a)===i&&$I(e,r,a)}t=r}}var EQ=id;function GS(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(GS.prototype,{length:{get:function(){return this._length}}});function YPe(e,t,n){this.item=e,this.previous=t,this.next=n}GS.prototype.add=function(e){let t=new YPe(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function SQ(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}GS.prototype.remove=function(e){!l(e)||(SQ(this,e),--this._length)};GS.prototype.splice=function(e,t){if(e===t)return;SQ(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var ZI=GS;var yi=Zc(wQ(),1);var XPe={LINEAR_NONE:yi.default.Easing.Linear.None,QUADRATIC_IN:yi.default.Easing.Quadratic.In,QUADRATIC_OUT:yi.default.Easing.Quadratic.Out,QUADRATIC_IN_OUT:yi.default.Easing.Quadratic.InOut,CUBIC_IN:yi.default.Easing.Cubic.In,CUBIC_OUT:yi.default.Easing.Cubic.Out,CUBIC_IN_OUT:yi.default.Easing.Cubic.InOut,QUARTIC_IN:yi.default.Easing.Quartic.In,QUARTIC_OUT:yi.default.Easing.Quartic.Out,QUARTIC_IN_OUT:yi.default.Easing.Quartic.InOut,QUINTIC_IN:yi.default.Easing.Quintic.In,QUINTIC_OUT:yi.default.Easing.Quintic.Out,QUINTIC_IN_OUT:yi.default.Easing.Quintic.InOut,SINUSOIDAL_IN:yi.default.Easing.Sinusoidal.In,SINUSOIDAL_OUT:yi.default.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:yi.default.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:yi.default.Easing.Exponential.In,EXPONENTIAL_OUT:yi.default.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:yi.default.Easing.Exponential.InOut,CIRCULAR_IN:yi.default.Easing.Circular.In,CIRCULAR_OUT:yi.default.Easing.Circular.Out,CIRCULAR_IN_OUT:yi.default.Easing.Circular.InOut,ELASTIC_IN:yi.default.Easing.Elastic.In,ELASTIC_OUT:yi.default.Easing.Elastic.Out,ELASTIC_IN_OUT:yi.default.Easing.Elastic.InOut,BACK_IN:yi.default.Easing.Back.In,BACK_OUT:yi.default.Easing.Back.Out,BACK_IN_OUT:yi.default.Easing.Back.InOut,BOUNCE_IN:yi.default.Easing.Bounce.In,BOUNCE_OUT:yi.default.Easing.Bounce.Out,BOUNCE_IN_OUT:yi.default.Easing.Bounce.InOut},Hr=Object.freeze(XPe);var KPe=new h,$Pe=new h,ZPe=new h,JPe=new h,QPe=new h,eIe=new h(1,1,1),vQ=Math.cos,DQ=Math.sin;function tp(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,eIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,64)),c=Math.round(y(e.slicePartitions,64)),u=y(e.vertexFormat,Pe.DEFAULT);this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Pe.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}tp.packedLength=2*h.packedLength+Pe.packedLength+7;tp.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=y(e._offsetAttribute,-1),t};var PQ=new h,IQ=new h,OQ=new Pe,H_={radii:PQ,innerRadii:IQ,vertexFormat:OQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};tp.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,PQ);t+=h.packedLength;let o=h.unpack(e,t,IQ);t+=h.packedLength;let r=Pe.unpack(e,t,OQ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=d,n._offsetAttribute=p===-1?void 0:p,n):(H_.minimumClock=s,H_.maximumClock=a,H_.minimumCone=c,H_.maximumCone=u,H_.stackPartitions=f,H_.slicePartitions=d,H_.offsetAttribute=p===-1?void 0:p,new tp(H_))};tp.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/R.TWO_PI),u=Math.round(u*Math.abs(s-r)/R.PI),c<2&&(c=2),u<2&&(u=2);let f,d,p=0,_=[r],m=[i];for(f=0;f<u;f++)_.push(r+f*(s-r)/(u-1));for(_.push(s),d=0;d<c;d++)m.push(i+d*(o-i)/(c-1));m.push(o);let x=_.length,C=m.length,A=0,T=1,b=n.x!==t.x||n.y!==t.y||n.z!==t.z,S=!1,w=!1,D=!1;b&&(T=2,r>0&&(S=!0,A+=c-1),s<Math.PI&&(w=!0,A+=c-1),(o-i)%R.TWO_PI?(D=!0,A+=(u-1)*2+1):A+=1);let O=C*x*T,I=new Float64Array(O*3),L=new Array(O).fill(!1),N=new Array(O).fill(!1),g=c*u*T,E=6*(g+A+1-(c+u)*T),v=Ne.createTypedArray(g,E),P=a.normal?new Float32Array(O*3):void 0,M=a.tangent?new Float32Array(O*3):void 0,V=a.bitangent?new Float32Array(O*3):void 0,U=a.st?new Float32Array(O*2):void 0,k=new Array(x),H=new Array(x);for(f=0;f<x;f++)k[f]=DQ(_[f]),H[f]=vQ(_[f]);let F=new Array(C),Y=new Array(C);for(d=0;d<C;d++)Y[d]=vQ(m[d]),F[d]=DQ(m[d]);for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=t.x*k[f]*Y[d],I[p++]=t.y*k[f]*F[d],I[p++]=t.z*H[f];let j=O/2;if(b)for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=n.x*k[f]*Y[d],I[p++]=n.y*k[f]*F[d],I[p++]=n.z*H[f],L[j]=!0,f>0&&f!==x-1&&d!==0&&d!==C-1&&(N[j]=!0),j++;p=0;let X,W;for(f=1;f<x-2;f++)for(X=f*C,W=(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=W+d+1,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=X+d;if(b){let Oe=x*C;for(f=1;f<x-2;f++)for(X=Oe+f*C,W=Oe+(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=X+d,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=W+d+1}let $,J;if(b){if(S)for(J=x*C,f=1;f<C-2;f++)v[p++]=f,v[p++]=f+1,v[p++]=J+f+1,v[p++]=f,v[p++]=J+f+1,v[p++]=J+f;if(w)for($=x*C-C,J=x*C*T-C,f=1;f<C-2;f++)v[p++]=$+f+1,v[p++]=$+f,v[p++]=J+f,v[p++]=$+f+1,v[p++]=J+f,v[p++]=J+f+1}if(D){for(f=1;f<x-2;f++)J=C*x+C*f,$=C*f,v[p++]=J,v[p++]=$+C,v[p++]=$,v[p++]=J,v[p++]=J+C,v[p++]=$+C;for(f=1;f<x-2;f++)J=C*x+C*(f+1)-1,$=C*(f+1)-1,v[p++]=$+C,v[p++]=J,v[p++]=$,v[p++]=$+C,v[p++]=J+C,v[p++]=J}let ce=new ln;a.position&&(ce.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:I}));let he=0,ie=0,ae=0,ge=0,Se=O/2,be,Be=re.fromCartesian3(t),Ae=re.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<O;f++){be=L[f]?Ae:Be;let Oe=h.fromArray(I,f*3,KPe),Ge=be.geodeticSurfaceNormal(Oe,$Pe);if(N[f]&&h.negate(Ge,Ge),a.st){let ot=G.negate(Ge,QPe);U[he++]=Math.atan2(ot.y,ot.x)/R.TWO_PI+.5,U[he++]=Math.asin(Ge.z)/Math.PI+.5}if(a.normal&&(P[ie++]=Ge.x,P[ie++]=Ge.y,P[ie++]=Ge.z),a.tangent||a.bitangent){let ot=ZPe,nt=0,Tn;if(L[f]&&(nt=Se),!S&&f>=nt&&f<nt+C*2?Tn=h.UNIT_X:Tn=h.UNIT_Z,h.cross(Tn,Ge,ot),h.normalize(ot,ot),a.tangent&&(M[ae++]=ot.x,M[ae++]=ot.y,M[ae++]=ot.z),a.bitangent){let Zn=h.cross(Ge,ot,JPe);h.normalize(Zn,Zn),V[ge++]=Zn.x,V[ge++]=Zn.y,V[ge++]=Zn.z}}}a.st&&(ce.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:U})),a.normal&&(ce.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:P})),a.tangent&&(ce.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:M})),a.bitangent&&(ce.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:V}))}if(l(e._offsetAttribute)){let Oe=I.length,Ge=e._offsetAttribute===tn.NONE?0:1,ot=new Uint8Array(Oe/3).fill(Ge);ce.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:ot})}return new ct({attributes:ce,indices:v,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromEllipsoid(Be),offsetAttribute:e._offsetAttribute})};var V5;tp.getUnitEllipsoid=function(){return l(V5)||(V5=tp.createGeometry(new tp({radii:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),V5};var ks=tp;var tIe=new h(1,1,1),JI=Math.cos,QI=Math.sin;function kA(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,tIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,10)),c=Math.round(y(e.slicePartitions,8)),u=Math.round(y(e.subdivisions,128));this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}kA.packedLength=2*h.packedLength+8;kA.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=y(e._offsetAttribute,-1),t};var RQ=new h,MQ=new h,np={radii:RQ,innerRadii:MQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};kA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,RQ);t+=h.packedLength;let o=h.unpack(e,t,MQ);t+=h.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=d,n._offsetAttribute=p===-1?void 0:p,n):(np.minimumClock=r,np.maximumClock=s,np.minimumCone=a,np.maximumCone=c,np.stackPartitions=u,np.slicePartitions=f,np.subdivisions=d,np.offsetAttribute=p===-1?void 0:p,new kA(np))};kA.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=re.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/R.TWO_PI),f=Math.round(f*Math.abs(s-r)/R.PI),u<2&&(u=2),f<2&&(f=2);let d=0,p=1,_=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,x=!1;_&&(p=2,r>0&&(m=!0,d+=u),s<Math.PI&&(x=!0,d+=u));let C=a*p*(f+u),A=new Float64Array(C*3),T=2*(C+d-(u+f)*p),b=Ne.createTypedArray(C,T),S,w,D,O,I=0,L=new Array(f),N=new Array(f);for(S=0;S<f;S++)O=r+S*(s-r)/(f-1),L[S]=QI(O),N[S]=JI(O);let g=new Array(a),E=new Array(a);for(S=0;S<a;S++)D=i+S*(o-i)/(a-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(L.length=a,N.length=a,S=0;S<a;S++)O=r+S*(s-r)/(a-1),L[S]=QI(O),N[S]=JI(O);for(g.length=u,E.length=u,S=0;S<u;S++)D=i+S*(o-i)/(u-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(I=0,S=0;S<f*p;S++){let M=S*a;for(w=0;w<a-1;w++)b[I++]=M+w,b[I++]=M+w+1}let v=f*a*p;for(S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_)for(v=f*a*p+u*a,S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_){let M=f*a*p,V=M+a*u;if(m)for(S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S;if(x)for(M+=a*u-u,V+=a*u-u,S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S}let P=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A})});if(l(e._offsetAttribute)){let M=A.length,V=e._offsetAttribute===tn.NONE?0:1,U=new Uint8Array(M/3).fill(V);P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return new ct({attributes:P,indices:b,primitiveType:Le.LINES,boundingSphere:oe.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var zu=kA;function UA(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(UA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});UA.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new ka({buffer:new Uint8Array(16*16),width:16,height:16}))};UA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};UA.prototype.getTileDataAvailable=function(e,t,n){};UA.prototype.loadTileDataAvailability=function(e,t,n){};var G_=UA;function k5(){this._removalFunctions=[]}k5.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};k5.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Gr=k5;var nIe={enableModelExperimental:!1},zA=nIe;var iIe={NONE:0,HOLD:1,EXTRAPOLATE:2},Hu=Object.freeze(iIe);function Dh(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._orthographicMatrix=new B}function BQ(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=B.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(Dh.prototype,{projectionMatrix:{get:function(){return BQ(this),this._orthographicMatrix}}});var oIe=new h,rIe=new h,sIe=new h,U5=new h;Dh.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,oIe);h.normalize(f,f);let d=rIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=sIe;h.multiplyByScalar(f,a,p),h.add(d,p,p);let _=i[0];return l(_)||(_=i[0]=new se),_.x=f.x,_.y=f.y,_.z=f.z,_.w=-h.dot(f,p),h.multiplyByScalar(f,s,p),h.add(d,p,p),_=i[1],l(_)||(_=i[1]=new se),_.x=-f.x,_.y=-f.y,_.z=-f.z,_.w=-h.dot(h.negate(f,U5),p),h.multiplyByScalar(n,r,p),h.add(d,p,p),_=i[2],l(_)||(_=i[2]=new se),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-h.dot(n,p),h.multiplyByScalar(n,o,p),h.add(d,p,p),_=i[3],l(_)||(_=i[3]=new se),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-h.dot(h.negate(n,U5),p),_=i[4],l(_)||(_=i[4]=new se),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-h.dot(t,d),h.multiplyByScalar(t,u,p),h.add(e,p,p),_=i[5],l(_)||(_=i[5]=new se),_.x=-t.x,_.y=-t.y,_.z=-t.z,_.w=-h.dot(h.negate(t,U5),p),this._cullingVolume};Dh.prototype.getPixelDimensions=function(e,t,n,i,o){BQ(this);let r=this.right-this.left,s=this.top-this.bottom,a=i*r/e,c=i*s/t;return o.x=a,o.y=c,o};Dh.prototype.clone=function(e){return l(e)||(e=new Dh),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Dh.prototype.equals=function(e){return l(e)&&e instanceof Dh&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Dh.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Dh&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var Wr=Dh;function ll(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new Wr,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far}ll.packedLength=4;ll.pack=function(e,t,n){return n=y(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};ll.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ll),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function wy(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(ll.prototype,{projectionMatrix:{get:function(){return wy(this),this._offCenterFrustum.projectionMatrix}}});ll.prototype.computeCullingVolume=function(e,t,n){return wy(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};ll.prototype.getPixelDimensions=function(e,t,n,i,o){return wy(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};ll.prototype.clone=function(e){return l(e)||(e=new ll),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};ll.prototype.equals=function(e){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};ll.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),R.equalsEpsilon(this.width,e.width,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Qt=ll;function Ph(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._perspectiveMatrix=new B,this._infinitePerspective=new B}function z5(e){let t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=B.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=B.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(Ph.prototype,{projectionMatrix:{get:function(){return z5(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z5(this),this._infinitePerspective}}});var aIe=new h,cIe=new h,lIe=new h,uIe=new h;Ph.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,aIe),d=cIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=lIe;h.multiplyByScalar(t,u,p),h.add(e,p,p);let _=uIe;h.multiplyByScalar(f,a,_),h.add(d,_,_),h.subtract(_,e,_),h.normalize(_,_),h.cross(_,n,_),h.normalize(_,_);let m=i[0];return l(m)||(m=i[0]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(f,s,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(n,_,_),h.normalize(_,_),m=i[1],l(m)||(m=i[1]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,r,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(f,_,_),h.normalize(_,_),m=i[2],l(m)||(m=i[2]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,o,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(_,f,_),h.normalize(_,_),m=i[3],l(m)||(m=i[3]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),m=i[4],l(m)||(m=i[4]=new se),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-h.dot(t,d),h.negate(t,_),m=i[5],l(m)||(m=i[5]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,p),this._cullingVolume};Ph.prototype.getPixelDimensions=function(e,t,n,i,o){z5(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};Ph.prototype.clone=function(e){return l(e)||(e=new Ph),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Ph.prototype.equals=function(e){return l(e)&&e instanceof Ph&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Ph.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Ph&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var ul=Ph;function fl(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new ul,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.xOffset=y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=y(e.yOffset,0),this._yOffset=this.yOffset}fl.packedLength=6;fl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};fl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new fl),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function Ih(e){let t=e._offCenterFrustum;(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset)&&(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}Object.defineProperties(fl.prototype,{projectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Ih(this),this._fovy}},sseDenominator:{get:function(){return Ih(this),this._sseDenominator}}});fl.prototype.computeCullingVolume=function(e,t,n){return Ih(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};fl.prototype.getPixelDimensions=function(e,t,n,i,o){return Ih(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};fl.prototype.clone=function(e){return l(e)||(e=new fl),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};fl.prototype.equals=function(e){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};fl.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),R.equalsEpsilon(this.fov,e.fov,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var xi=fl;var eO=0,fIe=1;function vy(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e._drawNearPlane,!0),s,a;t instanceof xi?(s=eO,a=xi.packedLength):t instanceof Qt&&(s=fIe,a=Qt.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+Me.packedLength+Pe.packedLength}vy.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===eO?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n]=e._drawNearPlane?1:0,t};var dIe=new xi,hIe=new Qt,mIe=new Me,pIe=new h,_Ie=new Pe;vy.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===eO?(o=xi.unpack(e,t,dIe),t+=xi.packedLength):(o=Qt.unpack(e,t,hIe),t+=Qt.packedLength);let r=h.unpack(e,t,pIe);t+=h.packedLength;let s=Me.unpack(e,t,mIe);t+=Me.packedLength;let a=Pe.unpack(e,t,_Ie);t+=Pe.packedLength;let c=e[t]===1;if(!l(n))return new vy({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._vertexFormat=Pe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function HA(e,t,n,i,o,r,s,a){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var gIe=new Q,yIe=new B,H5=new B,LQ=new h,NQ=new h,FQ=new h,xIe=new h,CIe=new h,AIe=new h,W_=new Array(3),WS=new Array(4);WS[0]=new se(-1,-1,1,1);WS[1]=new se(1,-1,1,1);WS[2]=new se(1,1,1,1);WS[3]=new se(-1,1,1,1);var VQ=new Array(4);for(let e=0;e<4;++e)VQ[e]=new se;vy._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=Q.fromQuaternion(t,gIe),u=y(r,LQ),f=y(s,NQ),d=y(a,FQ);u=Q.getColumn(c,0,u),f=Q.getColumn(c,1,f),d=Q.getColumn(c,2,d),h.normalize(u,u),h.normalize(f,f),h.normalize(d,d),h.negate(u,u);let p=B.computeView(e,d,f,u,yIe),_,m;if(n===eO){let x=i.projectionMatrix,C=B.multiply(x,p,H5);m=B.inverse(C,H5)}else _=B.inverseTransformation(p,H5);l(m)?(W_[0]=i.near,W_[1]=i.far):(W_[0]=0,W_[1]=i.near,W_[2]=i.far);for(let x=0;x<2;++x)for(let C=0;C<4;++C){let A=se.clone(WS[C],VQ[C]);if(l(m)){A=B.multiplyByVector(m,A,A);let T=1/A.w;h.multiplyByScalar(A,T,A),h.subtract(A,e,A),h.normalize(A,A);let b=h.dot(d,A);h.multiplyByScalar(A,W_[x]/b,A),h.add(A,e,A)}else{l(i._offCenterFrustum)&&(i=i._offCenterFrustum);let T=W_[x],b=W_[x+1];A.x=(A.x*(i.right-i.left)+i.left+i.right)*.5,A.y=(A.y*(i.top-i.bottom)+i.bottom+i.top)*.5,A.z=(A.z*(T-b)-T-b)*.5,A.w=1,B.multiplyByVector(_,A,A)}o[12*x+C*3]=A.x,o[12*x+C*3+1]=A.y,o[12*x+C*3+2]=A.z}};vy.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(3*4*6);vy._computeNearFarPlanes(i,o,t,n,c);let u=3*4*2;c[u]=c[3*4],c[u+1]=c[3*4+1],c[u+2]=c[3*4+2],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[3*3],c[u+7]=c[3*3+1],c[u+8]=c[3*3+2],c[u+9]=c[3*7],c[u+10]=c[3*7+1],c[u+11]=c[3*7+2],u+=3*4,c[u]=c[3*5],c[u+1]=c[3*5+1],c[u+2]=c[3*5+2],c[u+3]=c[3],c[u+4]=c[3+1],c[u+5]=c[3+2],c[u+6]=c[0],c[u+7]=c[1],c[u+8]=c[2],c[u+9]=c[3*4],c[u+10]=c[3*4+1],c[u+11]=c[3*4+2],u+=3*4,c[u]=c[3],c[u+1]=c[3+1],c[u+2]=c[3+2],c[u+3]=c[3*5],c[u+4]=c[3*5+1],c[u+5]=c[3*5+2],c[u+6]=c[3*6],c[u+7]=c[3*6+1],c[u+8]=c[3*6+2],c[u+9]=c[3*2],c[u+10]=c[3*2+1],c[u+11]=c[3*2+2],u+=3*4,c[u]=c[3*2],c[u+1]=c[3*2+1],c[u+2]=c[3*2+2],c[u+3]=c[3*6],c[u+4]=c[3*6+1],c[u+5]=c[3*6+2],c[u+6]=c[3*7],c[u+7]=c[3*7+1],c[u+8]=c[3*7+2],c[u+9]=c[3*3],c[u+10]=c[3*3+1],c[u+11]=c[3*3+2],r||(c=c.subarray(3*4));let f=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,_=l(s.tangent)?new Float32Array(3*4*a):void 0,m=l(s.bitangent)?new Float32Array(3*4*a):void 0,x=l(s.st)?new Float32Array(2*4*a):void 0,C=LQ,A=NQ,T=FQ,b=h.negate(C,xIe),S=h.negate(A,CIe),w=h.negate(T,AIe);u=0,r&&(HA(u,p,_,m,x,w,C,A),u+=3*4),HA(u,p,_,m,x,T,b,A),u+=3*4,HA(u,p,_,m,x,b,w,A),u+=3*4,HA(u,p,_,m,x,S,w,b),u+=3*4,HA(u,p,_,m,x,C,T,A),u+=3*4,HA(u,p,_,m,x,A,T,b),l(p)&&(f.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),l(_)&&(f.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),l(m)&&(f.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),l(x)&&(f.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:x}))}let d=new Uint16Array(6*a);for(let p=0;p<a;++p){let _=p*6,m=p*4;d[_]=m,d[_+1]=m+1,d[_+2]=m+2,d[_+3]=m,d[_+4]=m+2,d[_+5]=m+3}return new ct({attributes:f,indices:d,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromVertices(c)})};var GA=vy;var G5=0,TIe=1;function jS(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e._drawNearPlane,!0),r,s;t instanceof xi?(r=G5,s=xi.packedLength):t instanceof Qt&&(r=TIe,s=Qt.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+Me.packedLength}jS.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===G5?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,t[n]=e._drawNearPlane?1:0,t};var bIe=new xi,EIe=new Qt,SIe=new Me,wIe=new h;jS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===G5?(o=xi.unpack(e,t,bIe),t+=xi.packedLength):(o=Qt.unpack(e,t,EIe),t+=Qt.packedLength);let r=h.unpack(e,t,wIe);t+=h.packedLength;let s=Me.unpack(e,t,SIe);t+=Me.packedLength;let a=e[t]===1;if(!l(n))return new jS({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._drawNearPlane=a,n};jS.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);GA._computeNearFarPlanes(i,o,t,n,s);let a=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),c,u,f=r?2:1,d=new Uint16Array(8*(f+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,u=p*4,d[c]=u,d[c+1]=u+1,d[c+2]=u+1,d[c+3]=u+2,d[c+4]=u+2,d[c+5]=u+3,d[c+6]=u+3,d[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,d[c]=u,d[c+1]=u+4,d[c+2]=u+1,d[c+3]=u+5,d[c+4]=u+2,d[c+5]=u+6,d[c+6]=u+3,d[c+7]=u+7;return new ct({attributes:a,indices:d,primitiveType:Le.LINES,boundingSphere:oe.fromVertices(s)})};var tO=jS;function kQ(){}kQ.prototype.geocode=ye.throwInstantiationError;var UQ=kQ;var vIe={SEARCH:0,AUTOCOMPLETE:1},Dy=Object.freeze(vIe);function zQ(){ye.throwInstantiationError()}zQ.createGeometry=function(e){ye.throwInstantiationError()};var HQ=zQ;function DIe(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.value=e.value}var Ac=DIe;function PIe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var j_=PIe;function IIe(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var nO=IIe;function OIe(e,t){return t=y(t,0),fa(e,t,Math.min(4,e.length))}var Gu=OIe;var WA=Zc(GQ(),1);function RIe(e,t){return(e&t)!==0}var Tc=RIe;var MIe=[1,2,4,8],WQ=15,BIe=16,LIe=64,NIe=128;function Oh(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}Oh.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new Oh(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};Oh.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};Oh.prototype.hasSubtree=function(){return Tc(this._bits,BIe)};Oh.prototype.hasImagery=function(){return Tc(this._bits,LIe)};Oh.prototype.hasTerrain=function(){return Tc(this._bits,NIe)};Oh.prototype.hasChildren=function(){return Tc(this._bits,WQ)};Oh.prototype.hasChild=function(e){return Tc(this._bits,MIe[e])};Oh.prototype.getChildBitmask=function(){return this._bits&WQ};var iO=Oh;function FIe(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var VIe=FIe(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
|
|
96
|
+
${o}`),t}var Hm=Hwe;function v_(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=y(r,0),this.retry=!1,this.error=s}v_.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new v_(t,i,o,r,s,0,a),n.numberOfListeners>0?n.raiseEvent(c):console.log(`An error occurred in "${t.constructor.name}": ${Hm(i)}`),c};v_.handleError=function(e,t,n,i,o,r,s,a,c){ci("TileProviderError.handleError","TileProviderError.handleError was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportError instead.");let u=v_.reportError(e,t,n,i,o,r,s,c);return u.retry&&l(a)&&a(),u};v_.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};v_.handleSuccess=function(e){ci("TileProviderError.handleSuccess","TileProviderError.handleSuccess was deprecated in CesiumJS 1.96 and will be removed in 1.97. Use TileProviderError.reportSuccess instead."),v_.reportSuccess(e)};var Gn=v_;function D_(e){if(e=y(e,y.EMPTY_OBJECT),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._numberOfLevelZeroTilesX=y(e.numberOfLevelZeroTilesX,1),this._numberOfLevelZeroTilesY=y(e.numberOfLevelZeroTilesY,1),this._projection=new Ui(this._ellipsoid),l(e.rectangleSouthwestInMeters)&&l(e.rectangleNortheastInMeters))this._rectangleSouthwestInMeters=e.rectangleSouthwestInMeters,this._rectangleNortheastInMeters=e.rectangleNortheastInMeters;else{let i=this._ellipsoid.maximumRadius*Math.PI;this._rectangleSouthwestInMeters=new G(-i,-i),this._rectangleNortheastInMeters=new G(i,i)}let t=this._projection.unproject(this._rectangleSouthwestInMeters),n=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new de(t.longitude,t.latitude,n.longitude,n.latitude)}Object.defineProperties(D_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}});D_.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e};D_.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e};D_.prototype.rectangleToNativeRectangle=function(e,t){let n=this._projection,i=n.project(de.southwest(e)),o=n.project(de.northeast(e));return l(t)?(t.west=i.x,t.south=i.y,t.east=o.x,t.north=o.y,t):new de(i.x,i.y,o.x,o.y)};D_.prototype.tileXYToNativeRectangle=function(e,t,n,i){let o=this.getNumberOfXTilesAtLevel(n),r=this.getNumberOfYTilesAtLevel(n),s=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,a=this._rectangleSouthwestInMeters.x+e*s,c=this._rectangleSouthwestInMeters.x+(e+1)*s,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,f=this._rectangleNortheastInMeters.y-t*u,d=this._rectangleNortheastInMeters.y-(t+1)*u;return l(i)?(i.west=a,i.south=d,i.east=c,i.north=f,i):new de(a,d,c,f)};D_.prototype.tileXYToRectangle=function(e,t,n,i){let o=this.tileXYToNativeRectangle(e,t,n,i),r=this._projection,s=r.unproject(new G(o.west,o.south)),a=r.unproject(new G(o.east,o.north));return o.west=s.longitude,o.south=s.latitude,o.east=a.longitude,o.north=a.latitude,o};D_.prototype.positionToTileXY=function(e,t,n){let i=this._rectangle;if(!de.contains(i,e))return;let o=this.getNumberOfXTilesAtLevel(t),r=this.getNumberOfYTilesAtLevel(t),a=(this._rectangleNortheastInMeters.x-this._rectangleSouthwestInMeters.x)/o,u=(this._rectangleNortheastInMeters.y-this._rectangleSouthwestInMeters.y)/r,d=this._projection.project(e),p=d.x-this._rectangleSouthwestInMeters.x,_=this._rectangleNortheastInMeters.y-d.y,m=p/a|0;m>=o&&(m=o-1);let x=_/u|0;return x>=r&&(x=r-1),l(n)?(n.x=m,n.y=x,n):new G(m,x)};var ts=D_;var Gwe=15;function lA(e){this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;let t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};let n=this,i=y(e.ellipsoid,re.WGS84);this._readyPromise=Promise.resolve(e.url).then(function(o){let r=De.createIfNeeded(o);return r.appendForwardSlash(),l(t)&&(r=r.getDerivedResource({queryParameters:{token:t}})),n._resource=r,r.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()}).then(function(o){let r=o.copyrightText;l(r)&&(n._credit=new Ht(r));let s=o.spatialReference,a=y(s.latestWkid,s.wkid),c=o.extent,u={ellipsoid:i};if(a===4326)u.rectangle=de.fromDegrees(c.xmin,c.ymin,c.xmax,c.ymax),n._tilingScheme=new Xi(u);else if(a===3857)u.rectangleSouthwestInMeters=new G(c.xmin,c.ymin),u.rectangleNortheastInMeters=new G(c.xmax,c.ymax),n._tilingScheme=new ts(u);else return Promise.reject(new fe("Invalid spatial reference"));let f=o.tileInfo;return l(f)?(n._width=f.rows+1,n._height=f.cols+1,n._encoding=f.format==="LERC"?Vm.LERC:Vm.NONE,n._lodCount=f.lods.length-1,(n._hasAvailability=o.capabilities.indexOf("Tilemap")!==-1)&&(n._tilesAvailable=new gh(n._tilingScheme,n._lodCount),n._tilesAvailable.addAvailableTileRange(0,0,0,n._tilingScheme.getNumberOfXTilesAtLevel(0),n._tilingScheme.getNumberOfYTilesAtLevel(0)),n._tilesAvailablityLoaded=new gh(n._tilingScheme,n._lodCount)),n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._width,n._tilingScheme.getNumberOfXTilesAtLevel(0)),o.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),n._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:o.minValues[0],highestEncodedHeight:o.maxValues[0]},n._ready=!0,!0):Promise.reject(new fe("tileInfo is required"))}).catch(function(o){let r=`An error occurred while accessing ${n._resource.url}.`;return Gn.reportError(void 0,n,n._errorEvent,r),Promise.reject(o)}),this._errorEvent=new _e}Object.defineProperties(lA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){return this._tilesAvailable}}});lA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._resource.getDerivedResource({url:`tile/${n}/${t}/${e}`,request:i}),r=this._hasAvailability,s=Promise.resolve(!0),a;if(r&&!l(BH(this,n+1,e*2,t*2))){let d=q$(this,n+1,e*2,t*2);s=d.promise,a=d.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let u=this,f=this._tilesAvailable;return Promise.all([c,s]).then(function(d){return new ka({buffer:d[0],width:u._width,height:u._height,childTileMask:r?f.computeChildMaskForTile(n,e,t):Gwe,structure:u._terrainDataStructure,encoding:u._encoding})}).catch(function(d){return l(a)&&a.state===ui.CANCELLED?(i.cancel(),i.deferred.promise.finally(function(){return i.state=ui.CANCELLED,Promise.reject(d)})):Promise.reject(d)})};function BH(e,t,n,i){if(!e._hasAvailability)return;let o=e._tilesAvailablityLoaded,r=e._tilesAvailable;if(t>e._lodCount)return!1;if(r.isTileAvailable(t,n,i))return!0;if(o.isTileAvailable(t,n,i))return!1}lA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};lA.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=BH(this,n,e,t);if(l(i))return i;q$(this,n,e,t)};lA.prototype.loadTileDataAvailability=function(e,t,n){};function Wwe(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},u=new G(e.x+1,e.y+1),f=!1,d=!1;for(;!(f&&d);){let p=u.x,_=d?u.y+1:u.y;if(!f){for(let m=e.y;m<_;++m)if(i[m*t+u.x]!==s){f=!0;break}f?(a.push(new G(u.x,e.y)),--u.x,--p,c.endX=u.x):u.x===o?(c.endX=u.x,f=!0):++u.x}if(!d){let m=u.y*t;for(let x=e.x;x<=p;++x)if(i[m+x]!==s){d=!0;break}d?(a.push(new G(e.x,u.y)),--u.y,c.endY=u.y):u.y===r?(c.endY=u.y,d=!0):++u.y}}return{endingIndices:a,range:c,value:s}}function jwe(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new G(0,0)];for(;a.length>0;){let c=a.pop(),u=Wwe(c,n,i,o);if(u.value===1){let d=u.range;d.startX+=e,d.endX+=e,d.startY+=t,d.endY+=t,r.push(d)}let f=u.endingIndices;f.length>0&&(a=a.concat(f))}return r}function q$(e,t,n,i){if(!e._hasAvailability)return{};let o=Math.floor(n/128)*128,r=Math.floor(i/128)*128,s=Math.min(1<<t,128),a=`tilemap/${t}/${r}/${o}/${s}/${s}`,c=e._availableCache;if(l(c[a]))return c[a];let u=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN}),d=e._resource.getDerivedResource({url:a,request:u}).fetchJson();return l(d)?(d=d.then(function(p){let _=jwe(o,r,s,s,p.data);e._tilesAvailablityLoaded.addAvailableTileRange(t,o,r,o+s,r+s);let m=e._tilesAvailable;for(let x=0;x<_.length;++x){let C=_[x];m.addAvailableTileRange(t,C.startX,C.startY,C.endX,C.endY)}return BH(e,t,n,i)}),c[a]={promise:d,request:u},d=d.finally(function(p){return delete c[a],p}),{promise:d,request:u}):{}}var Y$=lA;var qwe={NONE:0,GEODESIC:1,RHUMB:2},Yt=Object.freeze(qwe);var X$=R.EPSILON10;function Ywe(e,t,n,i){if(!l(e))return;n=y(n,!1);let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,u,f=0,d=-1;for(s=1;s<r;++s)c=e[s],t(a,c,X$)?(l(u)||(u=e.slice(0,s),f=s-1,d=0),o&&i.push(s)):(l(u)&&(u.push(c),f=s,o&&(d=i.length)),a=c);return n&&t(e[0],e[r-1],X$)&&(o&&(l(u)?i.splice(d,0,f):i.push(r-1)),l(u)?u.length-=1:u=e.slice(0,-1)),l(u)?u:e}var So=Ywe;var Xwe={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"},_c=Object.freeze(Xwe);function fy(){this._array=[],this._hash={}}Object.defineProperties(fy.prototype,{length:{get:function(){return this._array.length}},values:{get:function(){return this._array}}});fy.prototype.contains=function(e){return l(this._hash[e])};fy.prototype.set=function(e,t){let n=this._hash[e];t!==n&&(this.remove(e),this._hash[e]=t,this._array.push(t))};fy.prototype.get=function(e){return this._hash[e]};fy.prototype.remove=function(e){let t=this._hash[e],n=l(t);if(n){let i=this._array;i.splice(i.indexOf(t),1),delete this._hash[e]}return n};fy.prototype.removeAll=function(){let e=this._array;e.length>0&&(this._hash={},e.length=0)};var gt=fy;var K$=new h,$$=new h,Z$=new h;function Kwe(e,t,n,i,o){l(o)||(o=new h);let r,s,a,c,u,f,d,p;if(l(t.z)){if(h.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(h.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(h.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=h.subtract(n,t,K$),s=h.subtract(i,t,$$),a=h.subtract(e,t,Z$),c=h.dot(r,r),u=h.dot(r,s),f=h.dot(r,a),d=h.dot(s,s),p=h.dot(s,a)}else{if(G.equalsEpsilon(e,t,R.EPSILON14))return h.clone(h.UNIT_X,o);if(G.equalsEpsilon(e,n,R.EPSILON14))return h.clone(h.UNIT_Y,o);if(G.equalsEpsilon(e,i,R.EPSILON14))return h.clone(h.UNIT_Z,o);r=G.subtract(n,t,K$),s=G.subtract(i,t,$$),a=G.subtract(e,t,Z$),c=G.dot(r,r),u=G.dot(r,s),f=G.dot(r,a),d=G.dot(s,s),p=G.dot(s,a)}o.y=d*f-u*p,o.z=c*p-u*f;let _=c*d-u*u;if(_!==0)return o.y/=_,o.z/=_,o.x=1-o.y-o.z,o}var uA=Kwe;var J$="https://dev.virtualearth.net/REST/v1/Locations";function LH(e){e=y(e,y.EMPTY_OBJECT);let t=e.key;this._key=t;let n={key:t};l(e.culture)&&(n.culture=e.culture),this._resource=new De({url:J$,queryParameters:n})}Object.defineProperties(LH.prototype,{url:{get:function(){return J$}},key:{get:function(){return this._key}}});LH.prototype.geocode=function(e){return this._resource.getDerivedResource({queryParameters:{query:e}}).fetchJsonp("jsonp").then(function(n){return n.resourceSets.length===0?[]:n.resourceSets[0].resources.map(function(o){let r=o.bbox,s=r[0],a=r[1],c=r[2],u=r[3];return{displayName:o.name,destination:de.fromDegrees(a,s,u,c)}})})};var Q$=LH;function Rr(e,t,n,i){this.x=y(e,0),this.y=y(t,0),this.width=y(n,0),this.height=y(i,0)}Rr.packedLength=4;Rr.pack=function(e,t,n){return n=y(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.width,t[n]=e.height,t};Rr.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Rr),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};Rr.fromPoints=function(e,t){if(l(t)||(t=new Rr),!l(e)||e.length===0)return t.x=0,t.y=0,t.width=0,t.height=0,t;let n=e.length,i=e[0].x,o=e[0].y,r=e[0].x,s=e[0].y;for(let a=1;a<n;a++){let c=e[a],u=c.x,f=c.y;i=Math.min(u,i),r=Math.max(u,r),o=Math.min(f,o),s=Math.max(f,s)}return t.x=i,t.y=o,t.width=r-i,t.height=s-o,t};var $we=new Si,Zwe=new me,Jwe=new me;Rr.fromRectangle=function(e,t,n){if(l(n)||(n=new Rr),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;t=y(t,$we);let i=t.project(de.southwest(e,Zwe)),o=t.project(de.northeast(e,Jwe));return G.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};Rr.clone=function(e,t){if(!!l(e))return l(t)?(t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t):new Rr(e.x,e.y,e.width,e.height)};Rr.union=function(e,t,n){l(n)||(n=new Rr);let i=Math.min(e.x,t.x),o=Math.min(e.y,t.y),r=Math.max(e.x+e.width,t.x+t.width),s=Math.max(e.y+e.height,t.y+t.height);return n.x=i,n.y=o,n.width=r-i,n.height=s-o,n};Rr.expand=function(e,t,n){n=Rr.clone(e,n);let i=t.x-n.x,o=t.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=t.x),o>n.height?n.height=o:o<0&&(n.height-=o,n.y=t.y),n};Rr.intersect=function(e,t){let n=e.x,i=e.y,o=t.x,r=t.y;return n>o+t.width||n+e.width<o||i+e.height<r||i>r+t.height?Zt.OUTSIDE:Zt.INTERSECTING};Rr.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height};Rr.prototype.clone=function(e){return Rr.clone(this,e)};Rr.prototype.intersect=function(e){return Rr.intersect(this,e)};Rr.prototype.equals=function(e){return Rr.equals(this,e)};var qe=Rr;var Qwe={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},Zf=Object.freeze(Qwe);var ua={POINTS:Z.POINTS,LINES:Z.LINES,LINE_LOOP:Z.LINE_LOOP,LINE_STRIP:Z.LINE_STRIP,TRIANGLES:Z.TRIANGLES,TRIANGLE_STRIP:Z.TRIANGLE_STRIP,TRIANGLE_FAN:Z.TRIANGLE_FAN};ua.isLines=function(e){return e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP};ua.isTriangles=function(e){return e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};ua.validate=function(e){return e===ua.POINTS||e===ua.LINES||e===ua.LINE_LOOP||e===ua.LINE_STRIP||e===ua.TRIANGLES||e===ua.TRIANGLE_STRIP||e===ua.TRIANGLE_FAN};var Le=Object.freeze(ua);function NH(e){e=y(e,y.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=y(e.primitiveType,Le.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=y(e.geometryType,Zf.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}NH.computeNumberOfVertices=function(e){let t=-1;for(let n in e.attributes)if(e.attributes.hasOwnProperty(n)&&l(e.attributes[n])&&l(e.attributes[n].values)){let i=e.attributes[n];t=i.values.length/i.componentsPerAttribute}return t};var eve=new me,tve=new h,eZ=new B,nve=[new me,new me,new me],ive=[new G,new G,new G],ove=[new G,new G,new G],rve=new h,sve=new Me,ave=new B,cve=new vi;NH._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=de.center(i,eve),s=me.toCartesian(r,n,tve),a=_t.eastNorthUpToFixedFrame(s,n,eZ),c=B.inverse(a,eZ),u=ive,f=nve;f[0].longitude=i.west,f[0].latitude=i.south,f[1].longitude=i.west,f[1].latitude=i.north,f[2].longitude=i.east,f[2].latitude=i.south;let d=rve;for(o=0;o<3;o++)me.toCartesian(f[o],n,d),d=B.multiplyByPointAsVector(c,d,d),u[o].x=d.x,u[o].y=d.y;let p=Me.fromAxisAngle(h.UNIT_Z,-t,sve),_=Q.fromQuaternion(p,ave),m=e.length,x=Number.POSITIVE_INFINITY,C=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(o=0;o<m;o++)d=B.multiplyByPointAsVector(c,e[o],d),d=Q.multiplyByVector(_,d,d),x=Math.min(x,d.x),C=Math.min(C,d.y),A=Math.max(A,d.x),T=Math.max(T,d.y);let b=vi.fromRotation(t,cve),S=ove;S[0].x=x,S[0].y=C,S[1].x=x,S[1].y=T,S[2].x=A,S[2].y=C;let w=u[0],D=u[2].x-w.x,O=u[1].y-w.y;for(o=0;o<3;o++){let E=S[o];vi.multiplyByVector(b,E,E),E.x=(E.x-w.x)/D,E.y=(E.y-w.y)/O}let I=S[0],L=S[1],N=S[2],g=new Array(6);return G.pack(I,g),G.pack(L,g,2),G.pack(N,g,4),g};var ct=NH;function lve(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.values=e.values}var Ee=lve;function uve(e){e=y(e,y.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}var ln=uve;var fve={NONE:0,TOP:1,ALL:2},tn=Object.freeze(fve);function ns(e){e=y(e,y.EMPTY_OBJECT),this.position=y(e.position,!1),this.normal=y(e.normal,!1),this.st=y(e.st,!1),this.bitangent=y(e.bitangent,!1),this.tangent=y(e.tangent,!1),this.color=y(e.color,!1)}ns.POSITION_ONLY=Object.freeze(new ns({position:!0}));ns.POSITION_AND_NORMAL=Object.freeze(new ns({position:!0,normal:!0}));ns.POSITION_NORMAL_AND_ST=Object.freeze(new ns({position:!0,normal:!0,st:!0}));ns.POSITION_AND_ST=Object.freeze(new ns({position:!0,st:!0}));ns.POSITION_AND_COLOR=Object.freeze(new ns({position:!0,color:!0}));ns.ALL=Object.freeze(new ns({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));ns.DEFAULT=ns.POSITION_NORMAL_AND_ST;ns.packedLength=6;ns.pack=function(e,t,n){return n=y(n,0),t[n++]=e.position?1:0,t[n++]=e.normal?1:0,t[n++]=e.st?1:0,t[n++]=e.tangent?1:0,t[n++]=e.bitangent?1:0,t[n]=e.color?1:0,t};ns.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ns),n.position=e[t++]===1,n.normal=e[t++]===1,n.st=e[t++]===1,n.tangent=e[t++]===1,n.bitangent=e[t++]===1,n.color=e[t]===1,n};ns.clone=function(e,t){if(!!l(e))return l(t)||(t=new ns),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Pe=ns;var dve=new h;function Fl(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum,i=y(e.vertexFormat,Pe.DEFAULT);this._minimum=h.clone(t),this._maximum=h.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}Fl.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new Fl({minimum:h.negate(n,new h),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};Fl.fromAxisAlignedBoundingBox=function(e){return new Fl({minimum:e.minimum,maximum:e.maximum})};Fl.packedLength=2*h.packedLength+Pe.packedLength+1;Fl.pack=function(e,t,n){return n=y(n,0),h.pack(e._minimum,t,n),h.pack(e._maximum,t,n+h.packedLength),Pe.pack(e._vertexFormat,t,n+2*h.packedLength),t[n+2*h.packedLength+Pe.packedLength]=y(e._offsetAttribute,-1),t};var nZ=new h,iZ=new h,oZ=new Pe,tZ={minimum:nZ,maximum:iZ,vertexFormat:oZ,offsetAttribute:void 0};Fl.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,nZ),o=h.unpack(e,t+h.packedLength,iZ),r=Pe.unpack(e,t+2*h.packedLength,oZ),s=e[t+2*h.packedLength+Pe.packedLength];return l(n)?(n._minimum=h.clone(i,n._minimum),n._maximum=h.clone(o,n._maximum),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(tZ.offsetAttribute=s===-1?void 0:s,new Fl(tZ))};Fl.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(h.equals(t,n))return;let o=new ln,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(6*4*3),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let u=new Float32Array(72);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=1,u[9]=0,u[10]=0,u[11]=1,u[12]=0,u[13]=0,u[14]=-1,u[15]=0,u[16]=0,u[17]=-1,u[18]=0,u[19]=0,u[20]=-1,u[21]=0,u[22]=0,u[23]=-1,u[24]=1,u[25]=0,u[26]=0,u[27]=1,u[28]=0,u[29]=0,u[30]=1,u[31]=0,u[32]=0,u[33]=1,u[34]=0,u[35]=0,u[36]=-1,u[37]=0,u[38]=0,u[39]=-1,u[40]=0,u[41]=0,u[42]=-1,u[43]=0,u[44]=0,u[45]=-1,u[46]=0,u[47]=0,u[48]=0,u[49]=1,u[50]=0,u[51]=0,u[52]=1,u[53]=0,u[54]=0,u[55]=1,u[56]=0,u[57]=0,u[58]=1,u[59]=0,u[60]=0,u[61]=-1,u[62]=0,u[63]=0,u[64]=-1,u[65]=0,u[66]=0,u[67]=-1,u[68]=0,u[69]=0,u[70]=-1,u[71]=0,o.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.st){let u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[28]=0,u[29]=1,u[30]=1,u[31]=1,u[32]=1,u[33]=0,u[34]=0,u[35]=0,u[36]=0,u[37]=1,u[38]=1,u[39]=1,u[40]=0,u[41]=0,u[42]=1,u[43]=0,u[44]=1,u[45]=1,u[46]=0,u[47]=1,o.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})}if(i.tangent){let u=new Float32Array(72);u[0]=1,u[1]=0,u[2]=0,u[3]=1,u[4]=0,u[5]=0,u[6]=1,u[7]=0,u[8]=0,u[9]=1,u[10]=0,u[11]=0,u[12]=-1,u[13]=0,u[14]=0,u[15]=-1,u[16]=0,u[17]=0,u[18]=-1,u[19]=0,u[20]=0,u[21]=-1,u[22]=0,u[23]=0,u[24]=0,u[25]=1,u[26]=0,u[27]=0,u[28]=1,u[29]=0,u[30]=0,u[31]=1,u[32]=0,u[33]=0,u[34]=1,u[35]=0,u[36]=0,u[37]=-1,u[38]=0,u[39]=0,u[40]=-1,u[41]=0,u[42]=0,u[43]=-1,u[44]=0,u[45]=0,u[46]=-1,u[47]=0,u[48]=-1,u[49]=0,u[50]=0,u[51]=-1,u[52]=0,u[53]=0,u[54]=-1,u[55]=0,u[56]=0,u[57]=-1,u[58]=0,u[59]=0,u[60]=1,u[61]=0,u[62]=0,u[63]=1,u[64]=0,u[65]=0,u[66]=1,u[67]=0,u[68]=0,u[69]=1,u[70]=0,u[71]=0,o.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}if(i.bitangent){let u=new Float32Array(72);u[0]=0,u[1]=1,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=0,u[7]=1,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=1,u[14]=0,u[15]=0,u[16]=1,u[17]=0,u[18]=0,u[19]=1,u[20]=0,u[21]=0,u[22]=1,u[23]=0,u[24]=0,u[25]=0,u[26]=1,u[27]=0,u[28]=0,u[29]=1,u[30]=0,u[31]=0,u[32]=1,u[33]=0,u[34]=0,u[35]=1,u[36]=0,u[37]=0,u[38]=1,u[39]=0,u[40]=0,u[41]=1,u[42]=0,u[43]=0,u[44]=1,u[45]=0,u[46]=0,u[47]=1,u[48]=0,u[49]=0,u[50]=1,u[51]=0,u[52]=0,u[53]=1,u[54]=0,u[55]=0,u[56]=1,u[57]=0,u[58]=0,u[59]=1,u[60]=0,u[61]=0,u[62]=1,u[63]=0,u[64]=0,u[65]=1,u[66]=0,u[67]=0,u[68]=1,u[69]=0,u[70]=0,u[71]=1,o.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:u})}r=new Uint16Array(6*2*3),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=4+2,r[7]=4+1,r[8]=4+0,r[9]=4+3,r[10]=4+2,r[11]=4+0,r[12]=8+0,r[13]=8+1,r[14]=8+2,r[15]=8+0,r[16]=8+2,r[17]=8+3,r[18]=12+2,r[19]=12+1,r[20]=12+0,r[21]=12+3,r[22]=12+2,r[23]=12+0,r[24]=16+2,r[25]=16+1,r[26]=16+0,r[27]=16+3,r[28]=16+2,r[29]=16+0,r[30]=20+0,r[31]=20+1,r[32]=20+2,r[33]=20+0,r[34]=20+2,r[35]=20+3}else s=new Float64Array(8*3),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(6*2*3),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=h.subtract(n,t,dve),c=h.magnitude(a)*.5;if(l(e._offsetAttribute)){let u=s.length,f=e._offsetAttribute===tn.NONE?0:1,d=new Uint8Array(u/3).fill(f);o.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return new ct({attributes:o,indices:r,primitiveType:Le.TRIANGLES,boundingSphere:new oe(h.ZERO,c),offsetAttribute:e._offsetAttribute})};var FH;Fl.getUnitBox=function(){return l(FH)||(FH=Fl.createGeometry(Fl.fromDimensions({dimensions:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),FH};var Vl=Fl;var hve=new h;function yh(e){e=y(e,y.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;this._min=h.clone(t),this._max=h.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}yh.fromDimensions=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.dimensions,n=h.multiplyByScalar(t,.5,new h);return new yh({minimum:h.negate(n,new h),maximum:n,offsetAttribute:e.offsetAttribute})};yh.fromAxisAlignedBoundingBox=function(e){return new yh({minimum:e.minimum,maximum:e.maximum})};yh.packedLength=2*h.packedLength+1;yh.pack=function(e,t,n){return n=y(n,0),h.pack(e._min,t,n),h.pack(e._max,t,n+h.packedLength),t[n+h.packedLength*2]=y(e._offsetAttribute,-1),t};var sZ=new h,aZ=new h,rZ={minimum:sZ,maximum:aZ,offsetAttribute:void 0};yh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sZ),o=h.unpack(e,t+h.packedLength,aZ),r=e[t+h.packedLength*2];return l(n)?(n._min=h.clone(i,n._min),n._max=h.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(rZ.offsetAttribute=r===-1?void 0:r,new yh(rZ))};yh.createGeometry=function(e){let t=e._min,n=e._max;if(h.equals(t,n))return;let i=new ln,o=new Uint16Array(12*2),r=new Float64Array(8*3);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=h.subtract(n,t,hve),a=h.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,u=e._offsetAttribute===tn.NONE?0:1,f=new Uint8Array(c/3).fill(u);i.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new ct({attributes:i,indices:o,primitiveType:Le.LINES,boundingSphere:new oe(h.ZERO,a),offsetAttribute:e._offsetAttribute})};var xh=yh;var Gm;typeof cancelAnimationFrame<"u"&&(Gm=cancelAnimationFrame);(function(){if(!l(Gm)&&typeof window<"u"){let e=["webkit","moz","ms","o"],t=0,n=e.length;for(;t<n&&!l(Gm);)Gm=window[`${e[t]}CancelAnimationFrame`],l(Gm)||(Gm=window[`${e[t]}CancelRequestAnimationFrame`]),++t}l(Gm)||(Gm=clearTimeout)})();function mve(e){ci("Cesium.cancelAnimationFrame","Cesium.cancelAnimationFrame was deprecated in CesiumJS 1.96 and will be removed in 1.99. Use the native cancelAnimationFrame method instead."),Gm(e)}var cZ=mve;function lZ(){}lZ.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:h.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var lI=lZ;function fA(){this.times=void 0,this.points=void 0,ye.throwInstantiationError()}fA.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof h)return h;if(e instanceof Me)return Me};fA.prototype.evaluate=ye.throwInstantiationError;fA.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=y(t,0),e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};fA.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};fA.prototype.clampTime=function(e){let t=this.times;return R.clamp(e,t[0],t[t.length-1])};var zi=fA;function dA(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(dA.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});dA.prototype.findTimeInterval=zi.prototype.findTimeInterval;dA.prototype.wrapTime=zi.prototype.wrapTime;dA.prototype.clampTime=zi.prototype.clampTime;dA.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new h),h.lerp(n[o],n[o+1],r,t))};var Wm=dA;var uZ={};uZ.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new h,s[a]=new h;o[0]=n[0]/t[0],r[0]=h.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(a=1;a<o.length;++a)c=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*c,r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=h.subtract(i[a],h.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=h.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=h.subtract(r[a],h.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var bS=uZ;var fZ=[],dZ=[],hZ=[],mZ=[];function pve(e,t,n){let i=fZ,o=hZ,r=dZ,s=mZ;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new h),h.clone(t,c),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new h),h.subtract(e[a+1],e[a-1],c),h.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new h),h.clone(n,c),bS.solve(i,r,o,s)}function _ve(e){let t=fZ,n=hZ,i=dZ,o=mZ;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(l(s)||(s=o[0]=new h),h.subtract(e[1],e[0],s),h.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r+1],e[r-1],s),h.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new h),h.subtract(e[r],e[r-1],s),h.multiplyByScalar(s,3,s),bS.solve(t,i,n,o)}function ol(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.inTangents,o=e.outTangents;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(ol.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}});ol.createC1=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.tangents,o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createNaturalCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points;if(n.length<3)return new Wm({points:n,times:t});let i=_ve(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new ol({times:t,points:n,inTangents:r,outTangents:o})};ol.createClampedCubic=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=zi.getPointType(n[0]);if(n.length<3)return new Wm({points:n,times:t});let s=pve(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new ol({times:t,points:n,inTangents:c,outTangents:a})};ol.hermiteCoefficientMatrix=new B(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);ol.prototype.findTimeInterval=zi.prototype.findTimeInterval;var gve=new se,hA=new h;ol.prototype.wrapTime=zi.prototype.wrapTime;ol.prototype.clampTime=zi.prototype.clampTime;ol.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this.inTangents,r=this.outTangents;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let s=this._lastTimeIndex,a=i[s+1]-i[s],c=(e-i[s])/a,u=gve;u.z=c,u.y=c*c,u.x=u.y*c,u.w=1;let f=B.multiplyByVector(ol.hermiteCoefficientMatrix,u,u);f.z*=a,f.w*=a;let d=this._pointType;return d===Number?n[s]*f.x+n[s+1]*f.y+r[s]*f.z+o[s]*f.w:(l(t)||(t=new d),t=d.multiplyByScalar(n[s],f.x,t),d.multiplyByScalar(n[s+1],f.y,hA),d.add(t,hA,t),d.multiplyByScalar(r[s],f.z,hA),d.add(t,hA,t),d.multiplyByScalar(o[s],f.w,hA),d.add(t,hA,t))};var dy=ol;var yve=new se,pZ=new h,mA=new h;function xve(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new h);let u=(a-i)*o;return h.lerp(r,s,u,c)}}return function(i,o){l(o)||(o=new h);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=yve;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,u,f,d,p;return r===0?(c=t[0],u=t[1],f=e.firstTangent,d=h.subtract(t[2],c,pZ),h.multiplyByScalar(d,.5,d),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],u=t[r+1],d=e.lastTangent,f=h.subtract(u,t[r-1],pZ),h.multiplyByScalar(f,.5,f),p=B.multiplyByVector(dy.hermiteCoefficientMatrix,a,a)):(c=t[r-1],u=t[r],f=t[r+1],d=t[r+2],p=B.multiplyByVector(P_.catmullRomCoefficientMatrix,a,a)),o=h.multiplyByScalar(c,p.x,o),h.multiplyByScalar(u,p.y,mA),h.add(o,mA,o),h.multiplyByScalar(f,p.z,mA),h.add(o,mA,o),h.multiplyByScalar(d,p.w,mA),h.add(o,mA,o)}}var Cve=new h,Ave=new h;function P_(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times,i=e.firstTangent,o=e.lastTangent;if(t.length>2&&(l(i)||(i=Cve,h.multiplyByScalar(t[1],2,i),h.subtract(i,t[2],i),h.subtract(i,t[0],i),h.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=Ave,h.multiplyByScalar(t[r-1],2,o),h.subtract(t[r],o,o),h.add(o,t[r-2],o),h.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=h.clone(i),this._lastTangent=h.clone(o),this._evaluateFunction=xve(this),this._lastTimeIndex=0}Object.defineProperties(P_.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}});P_.catmullRomCoefficientMatrix=new B(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);P_.prototype.findTimeInterval=zi.prototype.findTimeInterval;P_.prototype.wrapTime=zi.prototype.wrapTime;P_.prototype.clampTime=zi.prototype.clampTime;P_.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var _Z=P_;function I_(e,t,n){return t=y(t,0),n=y(n,e.byteLength-t),e=e.subarray(t,t+n),I_.decode(e)}I_.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};I_.decodeWithFromCharCode=function(e){let t="",n=Tve(e),i=n.length;for(let o=0;o<i;++o){let r=n[o];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return t};function ES(e,t,n){return t<=e&&e<=n}function Tve(e){let t=0,n=0,i=0,o=128,r=191,s=[],a=e.length;for(let c=0;c<a;++c){let u=e[c];if(i===0){if(ES(u,0,127)){s.push(u);continue}if(ES(u,194,223)){i=1,t=u&31;continue}if(ES(u,224,239)){u===224&&(o=160),u===237&&(r=159),i=2,t=u&15;continue}if(ES(u,240,244)){u===240&&(o=144),u===244&&(r=143),i=3,t=u&7;continue}throw new fe("String decoding failed.")}if(!ES(u,o,r)){t=i=n=0,o=128,r=191,--c;continue}o=128,r=191,t=t<<6|u&63,++n,n===i&&(s.push(t),t=i=n=0)}return s}typeof TextDecoder<"u"?I_.decode=I_.decodeWithTextDecoder:I_.decode=I_.decodeWithFromCharCode;var fa=I_;function bve(e,t,n){return JSON.parse(fa(e,t,n))}var No=bve;var uI={};uI.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let u=s+a+c,f,d,p,_,m,x;return u===1?s?(f=(e-n)/(i-n),d=(e-n)/(o-n),r.push(1),r.push(2),d!==1&&(r.push(-1),r.push(0),r.push(2),r.push(d)),f!==1&&(r.push(-1),r.push(0),r.push(1),r.push(f))):a?(p=(e-i)/(o-i),_=(e-i)/(n-i),r.push(2),r.push(0),_!==1&&(r.push(-1),r.push(1),r.push(0),r.push(_)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(m=(e-o)/(n-o),x=(e-o)/(i-o),r.push(0),r.push(1),x!==1&&(r.push(-1),r.push(2),r.push(1),r.push(x)),m!==1&&(r.push(-1),r.push(2),r.push(0),r.push(m))):u===2?!s&&n!==e?(_=(e-i)/(n-i),m=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(_),r.push(-1),r.push(2),r.push(0),r.push(m)):!a&&i!==e?(x=(e-o)/(i-o),f=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(x),r.push(-1),r.push(0),r.push(1),r.push(f)):!c&&o!==e&&(d=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(d),r.push(-1),r.push(1),r.push(2),r.push(p)):u!==3&&(r.push(0),r.push(1),r.push(2)),r};uI.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let u=n-s,f=s-o,d=r-a,p=i-a,_=1/(d*u+f*p),m=t-a,x=e-s,C=(d*x+f*m)*_,A=(-p*x+u*m)*_,T=1-C-A;return l(c)?(c.x=C,c.y=A,c.z=T,c):new h(C,A,T)};uI.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let u=(s-o)*(t-r)-(a-r)*(e-o),f=(n-e)*(t-r)-(i-t)*(e-o),d=(a-r)*(n-e)-(s-o)*(i-t);if(d===0)return;let p=u/d,_=f/d;if(p>=0&&p<=1&&_>=0&&_<=1)return l(c)||(c=new G),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var O_=uI;function R_(e){this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;let t=this._quantizedVertices.length/3,n=this._uValues=this._quantizedVertices.subarray(0,t),i=this._vValues=this._quantizedVertices.subarray(t,2*t);this._heightValues=this._quantizedVertices.subarray(2*t,3*t);function o(s,a){return i[s]-i[a]}function r(s,a){return n[s]-n[a]}this._westIndices=dI(e.westIndices,o,t),this._southIndices=dI(e.southIndices,r,t),this._eastIndices=dI(e.eastIndices,o,t),this._northIndices=dI(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=y(e.childTileMask,15),this._createdByUpsampling=y(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(R_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return l(this._mesh)}}});var fI=[];function dI(e,t,n){fI.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)fI[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(fI.sort(t),Ne.createTypedArray(n,fI)):e}var gZ="createVerticesFromQuantizedTerrainMesh",Eve=new Di(gZ),Sve=new Di(gZ,_h.maximumAsynchronousTasks);R_.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid,u=t.tileXYToRectangle(n,i,o),d=(a?Sve:Eve).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:u,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(d))return;let p=this;return Promise.resolve(d).then(function(_){let m=p._quantizedVertices.length/3,x=m+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,C=Ne.createTypedArray(x,_.indices),A=new Float32Array(_.vertices),T=_.center,b=_.minimumHeight,S=_.maximumHeight,w=p._boundingSphere,D=p._orientedBoundingBox,O=y(h.clone(_.occludeePointInScaledSpace),p._horizonOcclusionPoint),I=_.vertexStride,L=mc.clone(_.encoding);return p._mesh=new $f(T,A,C,_.indexCountWithoutSkirts,m,b,S,w,O,I,D,L,_.westIndicesSouthToNorth,_.southIndicesEastToWest,_.eastIndicesNorthToSouth,_.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh})};var wve=new Di("upsampleQuantizedTerrainMesh",_h.maximumAsynchronousTasks);R_.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,s),p=wve.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let _=Math.min(this._westSkirtHeight,this._eastSkirtHeight);_=Math.min(_,this._southSkirtHeight),_=Math.min(_,this._northSkirtHeight);let m=c?_*.5:this._westSkirtHeight,x=u?_*.5:this._southSkirtHeight,C=c?this._eastSkirtHeight:_*.5,A=u?this._northSkirtHeight:_*.5,T=this._credits;return Promise.resolve(p).then(function(b){let S=new Uint16Array(b.vertices),w=Ne.createTypedArray(S.length/3,b.indices),D;return l(b.encodedNormals)&&(D=new Uint8Array(b.encodedNormals)),new R_({quantizedVertices:S,indices:w,encodedNormals:D,minimumHeight:b.minimumHeight,maximumHeight:b.maximumHeight,boundingSphere:oe.clone(b.boundingSphere),orientedBoundingBox:gi.clone(b.orientedBoundingBox),horizonOcclusionPoint:h.clone(b.horizonOcclusionPoint),westIndices:b.westIndices,southIndices:b.southIndices,eastIndices:b.eastIndices,northIndices:b.northIndices,westSkirtHeight:m,southSkirtHeight:x,eastSkirtHeight:C,northSkirtHeight:A,childTileMask:0,credits:T,createdByUpsampling:!0})})};var VH=32767,yZ=new h;R_.prototype.interpolateHeight=function(e,t,n){let i=R.clamp((t-e.west)/e.width,0,1);i*=VH;let o=R.clamp((n-e.south)/e.height,0,1);return o*=VH,l(this._mesh)?Ive(this,i,o):Ove(this,i,o)};function xZ(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),u=Math.max(n,o,s),f=Math.min(i,r,a),d=Math.max(i,r,a);return e>=c&&e<=u&&t>=f&&t<=d}var vve=new G,Dve=new G,Pve=new G;function Ive(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=r.decodeTextureCoordinates(o,u,vve),_=r.decodeTextureCoordinates(o,f,Dve),m=r.decodeTextureCoordinates(o,d,Pve);if(xZ(t,n,p.x,p.y,_.x,_.y,m.x,m.y)){let x=O_.computeBarycentricCoordinates(t,n,p.x,p.y,_.x,_.y,m.x,m.y,yZ);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let C=r.decodeHeight(o,u),A=r.decodeHeight(o,f),T=r.decodeHeight(o,d);return x.x*C+x.y*A+x.z*T}}}}function Ove(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=i[u],_=i[f],m=i[d],x=o[u],C=o[f],A=o[d];if(xZ(t,n,p,x,_,C,m,A)){let T=O_.computeBarycentricCoordinates(t,n,p,x,_,C,m,A,yZ);if(T.x>=-1e-15&&T.y>=-1e-15&&T.z>=-1e-15){let b=T.x*r[u]+T.y*r[f]+T.z*r[d];return R.lerp(e._minimumHeight,e._maximumHeight,b/VH)}}}}R_.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};R_.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var pA=R_;function Rve(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function hy(e){this._heightmapWidth=65,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=y(e.requestVertexNormals,!1),this._requestWaterMask=y(e.requestWaterMask,!1),this._requestMetadata=y(e.requestMetadata,!0),this._errorEvent=new _e;let t=e.credit;typeof t=="string"&&(t=new Ht(t)),this._credit=t,this._availability=void 0,this._ready=!1,this._tileCredits=void 0;let n=this,i,o,r,s=this._layers=[],a="",c=[],u=0;this._readyPromise=Promise.resolve(e.url).then(function(x){let C=De.createIfNeeded(x);return C.appendForwardSlash(),i=C,o=i.getDerivedResource({url:"layer.json"}),n._tileCredits=C.credits,m()});function f(x){let C;if(!x.format)return C="The tile format is not specified in the layer.json file.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(!x.tiles||x.tiles.length===0)return C="The layer.json file does not specify any tile URL templates.",r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let A=!1,T=!1,b=!1,S=!0,w=!1;if(x.format==="heightmap-1.0")w=!0,l(n._heightmapStructure)||(n._heightmapStructure={heightScale:1/5,heightOffset:-1e3,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1,lowestEncodedHeight:0,highestEncodedHeight:256*256-1}),T=!0,n._requestWaterMask=!0;else if(x.format.indexOf("quantized-mesh-1.")!==0)return C=`The tile format "${x.format}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let D=x.tiles,O=x.maxzoom;if(u=Math.max(u,O),!x.projection||x.projection==="EPSG:4326")n._tilingScheme=new Xi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else if(x.projection==="EPSG:3857")n._tilingScheme=new ts({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:n._ellipsoid});else return C=`The projection "${x.projection}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));if(n._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(n._tilingScheme.ellipsoid,n._heightmapWidth,n._tilingScheme.getNumberOfXTilesAtLevel(0)),!x.scheme||x.scheme==="tms"||x.scheme==="slippyMap")n._scheme=x.scheme;else return C=`The scheme "${x.scheme}" is invalid or not supported.`,r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C));let I;l(x.extensions)&&x.extensions.indexOf("octvertexnormals")!==-1?A=!0:l(x.extensions)&&x.extensions.indexOf("vertexnormals")!==-1&&(A=!0,S=!1),l(x.extensions)&&x.extensions.indexOf("watermask")!==-1&&(T=!0),l(x.extensions)&&x.extensions.indexOf("metadata")!==-1&&(b=!0);let L=x.metadataAvailability,N=x.available,g;if(l(N)&&!l(L)){g=new gh(n._tilingScheme,N.length);for(let v=0;v<N.length;++v){let P=N[v],M=n._tilingScheme.getNumberOfYTilesAtLevel(v);l(c[v])||(c[v]=[]);for(let V=0;V<P.length;++V){let U=P[V],k=M-U.endY-1,H=M-U.startY-1;c[v].push([U.startX,k,U.endX,H]),g.addAvailableTileRange(v,U.startX,k,U.endX,H)}}}else l(L)&&(I=new gh(n._tilingScheme,O),g=new gh(n._tilingScheme,O),c[0]=[[0,0,1,0]],g.addAvailableTileRange(0,0,0,1,0));n._hasWaterMask=n._hasWaterMask||T,n._hasVertexNormals=n._hasVertexNormals||A,n._hasMetadata=n._hasMetadata||b,l(x.attribution)&&(a.length>0&&(a+=" "),a+=x.attribution),s.push(new Rve({resource:i,version:x.version,isHeightmap:w,tileUrlTemplates:D,availability:g,hasVertexNormals:A,hasWaterMask:T,hasMetadata:b,availabilityLevels:L,availabilityTilesLoaded:I,littleEndianExtensionSize:S}));let E=x.parentUrl;if(l(E)){if(!l(g))return console.log("A layer.json can't have a parentUrl if it does't have an available array."),Promise.resolve(!0);i=i.getDerivedResource({url:E}),i.appendForwardSlash(),o=i.getDerivedResource({url:"layer.json"});let v=o.fetchJson();return Promise.resolve(v).then(f).catch(d)}return Promise.resolve(!0)}function d(x){let C=`An error occurred while accessing ${o.url}.`;return r=Gn.reportError(r,n,n._errorEvent,C),r.retry?m():Promise.reject(new fe(C))}function p(x){return f(x).then(function(){if(l(r))return;let C=c.length;if(C>0){let A=n._availability=new gh(n._tilingScheme,u);for(let T=0;T<C;++T){let b=c[T];for(let S=0;S<b.length;++S){let w=b[S];A.addAvailableTileRange(T,w[0],w[1],w[2],w[3])}}}if(a.length>0){let A=new Ht(a);l(n._tileCredits)?n._tileCredits.push(A):n._tileCredits=[A]}return n._ready=!0,Promise.resolve(!0)})}function _(x){return l(x)&&x.statusCode===404?p({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):d(x)}function m(){return Promise.resolve(o.fetchJson()).then(p).catch(_)}}var kH={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function CZ(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function Mve(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new ka({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Bve(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,u=c+1,f=Float64Array.BYTES_PER_ELEMENT*c,d=Float64Array.BYTES_PER_ELEMENT*u,p=3,_=Uint16Array.BYTES_PER_ELEMENT*p,m=3,x=Uint16Array.BYTES_PER_ELEMENT,C=x*m,A=new DataView(t),T=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let b=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let S=A.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let w=new oe(new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0)),A.getFloat64(a+f,!0));a+=d;let D=new h(A.getFloat64(a,!0),A.getFloat64(a+8,!0),A.getFloat64(a+16,!0));a+=f;let O=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let I=new Uint16Array(t,a,O*3);a+=O*_,O>64*1024&&(x=Uint32Array.BYTES_PER_ELEMENT,C=x*m);let L=I.subarray(0,O),N=I.subarray(O,2*O),g=I.subarray(O*2,3*O);Pn.zigZagDeltaDecode(L,N,g),a%x!==0&&(a+=x-a%x);let E=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let v=Ne.createTypedArrayFromArrayBuffer(O,t,a,E*m);a+=E*C;let P=0,M=v.length;for(let ie=0;ie<M;++ie){let ae=v[ie];v[ie]=P-ae,ae===0&&++P}let V=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let U=Ne.createTypedArrayFromArrayBuffer(O,t,a,V);a+=V*x;let k=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let H=Ne.createTypedArrayFromArrayBuffer(O,t,a,k);a+=k*x;let F=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let Y=Ne.createTypedArrayFromArrayBuffer(O,t,a,F);a+=F*x;let j=A.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let X=Ne.createTypedArrayFromArrayBuffer(O,t,a,j);a+=j*x;let W,$;for(;a<A.byteLength;){let ie=A.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let ae=A.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ie===kH.OCT_VERTEX_NORMALS&&e._requestVertexNormals)W=new Uint8Array(t,a,O*2);else if(ie===kH.WATER_MASK&&e._requestWaterMask)$=new Uint8Array(t,a,ae);else if(ie===kH.METADATA&&e._requestMetadata){let ge=A.getUint32(a,!0);if(ge>0){let be=No(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,ge).available;if(l(be))for(let Be=0;Be<be.length;++Be){let Ae=n+Be+1,Oe=be[Be],Ge=e._tilingScheme.getNumberOfYTilesAtLevel(Ae);for(let ot=0;ot<Oe.length;++ot){let nt=Oe[ot],Tn=Ge-nt.endY-1,Zn=Ge-nt.startY-1;e.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn),r.availability.addAvailableTileRange(Ae,nt.startX,Tn,nt.endX,Zn)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=ae}let J=e.getLevelMaximumGeometricError(n)*5,ce=e._tilingScheme.tileXYToRectangle(i,o,n),he=gi.fromRectangle(ce,b,S,e._tilingScheme.ellipsoid);return new pA({center:T,minimumHeight:b,maximumHeight:S,boundingSphere:w,orientedBoundingBox:he,horizonOcclusionPoint:D,quantizedVertices:I,encodedNormals:W,indices:v,westIndices:U,southIndices:H,eastIndices:Y,northIndices:X,westSkirtHeight:J,southSkirtHeight:J,eastSkirtHeight:J,northSkirtHeight:J,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:$,credits:e._tileCredits})}hy.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length;if(s===1)r=o[0];else for(let a=0;a<s;++a){let c=o[a];if(!l(c.availability)||c.availability.isTileAvailable(n,e,t)){r=c;break}}return AZ(this,e,t,n,r,i)};function AZ(e,t,n,i,o,r){if(!l(o))return Promise.reject(new fe("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let u,f,d=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(f={extensions:c.join("-")}),u=CZ(void 0)):u=CZ(c);let _=p.getDerivedResource({url:d,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:f,headers:u,request:r}).fetchArrayBuffer();if(!!l(_))return _.then(function(m){return l(m)?l(e._heightmapStructure)?Mve(e,m,i,t,n):Bve(e,m,i,t,n,o):Promise.reject(new fe("Mesh buffer doesn't exist."))})}Object.defineProperties(hy.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return this._hasWaterMask&&this._requestWaterMask}},hasVertexNormals:{get:function(){return this._hasVertexNormals&&this._requestVertexNormals}},hasMetadata:{get:function(){return this._hasMetadata&&this._requestMetadata}},requestVertexNormals:{get:function(){return this._requestVertexNormals}},requestWaterMask:{get:function(){return this._requestWaterMask}},requestMetadata:{get:function(){return this._requestMetadata}},availability:{get:function(){return this._availability}}});hy.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};hy.prototype.getTileDataAvailable=function(e,t,n){if(!l(this._availability))return;if(n>this._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(n,e,t))return!0;if(!this._hasMetadata)return!1;let i=this._layers,o=i.length;for(let r=0;r<o;++r)if(TZ(this,e,t,n,i[r],r===0).result)return;return!1};hy.prototype.loadTileDataAvailability=function(e,t,n){if(!l(this._availability)||n>this._availability._maximumLevel||this._availability.isTileAvailable(n,e,t)||!this._hasMetadata)return;let i=this._layers,o=i.length;for(let r=0;r<o;++r){let s=TZ(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function UH(e,t,n,i){if(i===0)return;let o=e.availabilityLevels,r=i%o===0?i-o:(i/o|0)*o,s=1<<i-r,a=t/s|0,c=n/s|0;return{level:r,x:a,y:c}}function TZ(e,t,n,i,o,r){if(!l(o.availabilityLevels))return{result:!1};let s,a=function(){delete o.availabilityPromiseCache[s]},c=o.availabilityTilesLoaded,u=o.availability,f=UH(o,t,n,i);for(;l(f);){if(u.isTileAvailable(f.level,f.x,f.y)&&!c.isTileAvailable(f.level,f.x,f.y)){let d;if(!r&&(s=`${f.level}-${f.x}-${f.y}`,d=o.availabilityPromiseCache[s],!l(d))){let p=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN});d=AZ(e,f.x,f.y,f.level,o,p),l(d)&&(o.availabilityPromiseCache[s]=d,d.then(a))}return{result:!0,promise:d}}f=UH(o,f.x,f.y,f.level)}return{result:!1}}hy._getAvailabilityTile=UH;var hI=hy;var HH={},mI=new h,bZ=new h,EZ=new Me,SZ=new Q;function _A(e,t,n,i,o,r,s,a,c,u){let f=e+t;h.multiplyByScalar(i,Math.cos(f),mI),h.multiplyByScalar(n,Math.sin(f),bZ),h.add(mI,bZ,mI);let d=Math.cos(e);d=d*d;let p=Math.sin(e);p=p*p;let m=r/Math.sqrt(s*d+o*p)/a;return Me.fromAxisAngle(mI,m,EZ),Q.fromQuaternion(EZ,SZ),Q.multiplyByVector(SZ,c,u),h.normalize(u,u),h.multiplyByScalar(u,a,u),u}var wZ=new h,vZ=new h,zH=new h,Lve=new h;HH.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,u=n?c:0;for(let f=0;f<c;f+=3){let d=f+1,p=f+2,_=h.fromArray(e,f,wZ);i.scaleToGeodeticSurface(_,_);let m=h.clone(_,vZ),x=i.geodeticSurfaceNormal(_,Lve),C=h.multiplyByScalar(x,o,zH);h.add(_,C,_),n&&(h.multiplyByScalar(x,r,C),h.add(m,C,m),a[f+u]=m.x,a[d+u]=m.y,a[p+u]=m.z),a[f]=_.x,a[d]=_.y,a[p]=_.z}return a};var Nve=new h,Fve=new h,Vve=new h;HH.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,u=o*o,f=o*i,d=h.magnitude(s),p=h.normalize(s,Nve),_=h.cross(h.UNIT_Z,s,Fve);_=h.normalize(_,_);let m=h.cross(p,_,Vve),x=1+Math.ceil(R.PI_OVER_TWO/a),C=R.PI_OVER_TWO/(x-1),A=R.PI_OVER_TWO-x*C;A<0&&(x-=Math.ceil(Math.abs(A)/C));let T=2*(x*(x+2)),b=t?new Array(T*3):void 0,S=0,w=wZ,D=vZ,O=x*4*3,I=O-1,L=0,N=n?new Array(O):void 0,g,E,v,P,M;for(A=R.PI_OVER_TWO,w=_A(A,r,m,_,c,f,u,d,p,w),t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x),A=R.PI_OVER_TWO-C,g=1;g<x+1;++g){if(w=_A(A,r,m,_,c,f,u,d,p,w),D=_A(Math.PI-A,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*g+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z),A=R.PI_OVER_TWO-(g+1)*C}for(g=x;g>1;--g){if(A=R.PI_OVER_TWO-(g-1)*C,w=_A(-A,r,m,_,c,f,u,d,p,w),D=_A(A+Math.PI,r,m,_,c,f,u,d,p,D),t){for(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,v=2*(g-1)+2,E=1;E<v-1;++E)P=E/(v-1),M=h.lerp(w,D,P,zH),b[S++]=M.x,b[S++]=M.y,b[S++]=M.z;b[S++]=D.x,b[S++]=D.y,b[S++]=D.z}n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,N[L++]=D.x,N[L++]=D.y,N[L++]=D.z)}A=R.PI_OVER_TWO,w=_A(-A,r,m,_,c,f,u,d,p,w);let V={};return t&&(b[S++]=w.x,b[S++]=w.y,b[S++]=w.z,V.positions=b,V.numPts=x),n&&(N[I--]=w.z,N[I--]=w.y,N[I--]=w.x,V.outerPositions=N),V};var kl=HH;function kve(e){e=y(e,y.EMPTY_OBJECT),this.geometry=e.geometry,this.modelMatrix=B.clone(y(e.modelMatrix,B.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=y(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var pt=kve;function Ch(){this.high=h.clone(h.ZERO),this.low=h.clone(h.ZERO)}Ch.encode=function(e,t){l(t)||(t={high:0,low:0});let n;return e>=0?(n=Math.floor(e/65536)*65536,t.high=n,t.low=e-n):(n=Math.floor(-e/65536)*65536,t.high=-n,t.low=e+n),t};var jm={high:0,low:0};Ch.fromCartesian=function(e,t){l(t)||(t=new Ch);let n=t.high,i=t.low;return Ch.encode(e.x,jm),n.x=jm.high,i.x=jm.low,Ch.encode(e.y,jm),n.y=jm.high,i.y=jm.low,Ch.encode(e.z,jm),n.z=jm.high,i.z=jm.low,t};var GH=new Ch;Ch.writeElements=function(e,t,n){Ch.fromCartesian(e,GH);let i=GH.high,o=GH.low;t[n]=i.x,t[n+1]=i.y,t[n+2]=i.z,t[n+3]=o.x,t[n+4]=o.y,t[n+5]=o.z};var kn=Ch;var WH={};WH.calculateACMR=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o=t.length;if(!l(n)){n=0;let a=0,c=t[a];for(;a<o;)c>n&&(n=c),++a,c=t[a]}let r=[];for(let a=0;a<n+1;a++)r[a]=0;let s=i+1;for(let a=0;a<o;++a)s-r[t[a]]>i&&(r[t[a]]=s,++s);return(s-i+1)/(o/3)};WH.tipsify=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.indices,n=e.maximumIndex,i=y(e.cacheSize,24),o;function r(g,E,v,P){for(;E.length>=1;){let M=E[E.length-1];if(E.splice(E.length-1,1),g[M].numLiveTriangles>0)return M}for(;o<P;){if(g[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(g,E,v,P,M,V,U){let k=-1,H,F=-1,Y=0;for(;Y<v.length;){let j=v[Y];P[j].numLiveTriangles&&(H=0,M-P[j].timeStamp+2*P[j].numLiveTriangles<=E&&(H=M-P[j].timeStamp),(H>F||F===-1)&&(F=H,k=j)),++Y}return k===-1?r(P,V,g,U):k}let a=t.length,c=0,u=0,f=t[u],d=a;if(l(n))c=n+1;else{for(;u<d;)f>c&&(c=f),++u,f=t[u];if(c===-1)return 0;++c}let p=[],_;for(_=0;_<c;_++)p[_]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let m=0;for(;u<d;)p[t[u]].vertexTriangles.push(m),++p[t[u]].numLiveTriangles,p[t[u+1]].vertexTriangles.push(m),++p[t[u+1]].numLiveTriangles,p[t[u+2]].vertexTriangles.push(m),++p[t[u+2]].numLiveTriangles,++m,u+=3;let x=0,C=i+1;o=1;let A=[],T=[],b,S,w=0,D=[],O=a/3,I=[];for(_=0;_<O;_++)I[_]=!1;let L,N;for(;x!==-1;){A=[],S=p[x],N=S.vertexTriangles.length;for(let g=0;g<N;++g)if(m=S.vertexTriangles[g],!I[m]){I[m]=!0,u=m+m+m;for(let E=0;E<3;++E)L=t[u],A.push(L),T.push(L),D[w]=L,++w,b=p[L],--b.numLiveTriangles,C-b.timeStamp>i&&(b.timeStamp=C,++C),++u}x=s(t,i,A,p,C,T,c)}return D};var pI=WH;var gc={};function TI(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function Uve(e){let t=e.length,n=t/3*6,i=Ne.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)TI(i,o,e[r],e[r+1],e[r+2]);return i}function zve(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Ne.createTypedArray(t,n);TI(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)TI(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function Hve(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Ne.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)TI(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}gc.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case Le.TRIANGLES:e.indices=Uve(t);break;case Le.TRIANGLE_STRIP:e.indices=zve(t);break;case Le.TRIANGLE_FAN:e.indices=Hve(t);break}e.primitiveType=Le.LINES}return e};gc.createLineSegmentsForVectors=function(e,t,n){t=y(t,"normal"),n=y(n,1e4);let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let f=0;f<r;f+=3)s[a++]=i[f],s[a++]=i[f+1],s[a++]=i[f+2],s[a++]=i[f]+o[f]*n,s[a++]=i[f+1]+o[f+1]*n,s[a++]=i[f+2]+o[f+2]*n;let c,u=e.boundingSphere;return l(u)&&(c=new oe(u.center,u.radius+n)),new ct({attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:Le.LINES,boundingSphere:c})};gc.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];l(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=o++);return i};gc.reorderForPreVertexCache=function(e){let t=ct.computeNumberOfVertices(e),n=e.indices;if(l(n)){let i=new Int32Array(t);for(let p=0;p<t;p++)i[p]=-1;let o=n,r=o.length,s=Ne.createTypedArray(t,r),a=0,c=0,u=0,f;for(;a<r;)f=i[o[a]],f!==-1?s[c]=f:(f=o[a],i[f]=u,s[c]=u,++u),++a,++c;e.indices=s;let d=e.attributes;for(let p in d)if(d.hasOwnProperty(p)&&l(d[p])&&l(d[p].values)){let _=d[p],m=_.values,x=0,C=_.componentsPerAttribute,A=K.createTypedArray(_.componentDatatype,u*C);for(;x<t;){let T=i[x];if(T!==-1)for(let b=0;b<C;b++)A[C*T+b]=m[C*x+b];++x}_.values=A}}return e};gc.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===Le.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=pI.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function DZ(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ee({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function Gve(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}gc.fitToUnsignedShortIndices=function(e){let t=[],n=ct.computeNumberOfVertices(e);if(l(e.indices)&&n>=R.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=DZ(e.attributes),a=e.indices,c=a.length,u;e.primitiveType===Le.TRIANGLES?u=3:e.primitiveType===Le.LINES?u=2:e.primitiveType===Le.POINTS&&(u=1);for(let f=0;f<c;f+=u){for(let d=0;d<u;++d){let p=a[f+d],_=i[p];l(_)||(_=r++,i[p]=_,Gve(s,e.attributes,p)),o.push(_)}r+u>=R.SIXTY_FOUR_KILOBYTES&&(t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=DZ(e.attributes))}o.length!==0&&t.push(new ct({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var PZ=new h,Wve=new me;gc.projectTo2D=function(e,t,n,i,o){let r=e.attributes[t];o=l(o)?o:new Si;let s=o.ellipsoid,a=r.values,c=new Float64Array(a.length),u=0;for(let f=0;f<a.length;f+=3){let d=h.fromArray(a,f,PZ),p=s.cartesianToCartographic(d,Wve),_=o.project(p,PZ);c[u++]=_.x,c[u++]=_.y,c[u++]=_.z}return e.attributes[n]=r,e.attributes[i]=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var jH={high:0,low:0};gc.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),c=new Float32Array(s);for(let f=0;f<s;++f)kn.encode(r[f],jH),a[f]=jH.high,c[f]=jH.low;let u=o.componentsPerAttribute;return e.attributes[n]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:a}),e.attributes[i]=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:u,values:c}),delete e.attributes[t],e};var Qf=new h;function qH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),B.multiplyByPoint(e,Qf,Qf),h.pack(Qf,n,o)}}function YH(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)h.unpack(n,o,Qf),Q.multiplyByVector(e,Qf,Qf),Qf=h.normalize(Qf,Qf),h.pack(Qf,n,o)}}var _I=new B,gI=new Q;gc.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(B.equals(t,B.IDENTITY))return e;let n=e.geometry.attributes;qH(t,n.position),qH(t,n.prevPosition),qH(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(B.inverse(t,_I),B.transpose(_I,_I),B.getMatrix3(_I,gI),YH(gI,n.normal),YH(gI,n.tangent),YH(gI,n.bitangent));let i=e.geometry.boundingSphere;return l(i)&&(e.geometry.boundingSphere=oe.transform(i,t,i)),e.modelMatrix=B.clone(B.IDENTITY),e};function jve(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let s=o[r],a=s.values.length,c=!0;for(let u=1;u<n;++u){let f=e[u][t].attributes[r];if(!l(f)||s.componentDatatype!==f.componentDatatype||s.componentsPerAttribute!==f.componentsPerAttribute||s.normalize!==f.normalize){c=!1;break}a+=f.values.length}c&&(i[r]=new Ee({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:K.createTypedArray(s.componentDatatype,a)}))}return i}var qve=new h;function XH(e,t){let n=e.length,i,o,r,s,a=e[0].modelMatrix,c=l(e[0][t].indices),u=e[0][t].primitiveType,f=jve(e,t),d,p,_;for(i in f)if(f.hasOwnProperty(i))for(d=f[i].values,s=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,_=p.length,r=0;r<_;++r)d[s++]=p[r];let m;if(c){let T=0;for(o=0;o<n;++o)T+=e[o][t].indices.length;let b=ct.computeNumberOfVertices(new ct({attributes:f,primitiveType:Le.POINTS})),S=Ne.createTypedArray(b,T),w=0,D=0;for(o=0;o<n;++o){let O=e[o][t].indices,I=O.length;for(s=0;s<I;++s)S[w++]=D+O[s];D+=ct.computeNumberOfVertices(e[o][t])}m=S}let x=new h,C=0,A;for(o=0;o<n;++o){if(A=e[o][t].boundingSphere,!l(A)){x=void 0;break}h.add(A.center,x,x)}if(l(x))for(h.divideByScalar(x,n,x),o=0;o<n;++o){A=e[o][t].boundingSphere;let T=h.magnitude(h.subtract(A.center,x,qve))+A.radius;T>C&&(C=T)}return new ct({attributes:f,indices:m,primitiveType:u,boundingSphere:l(x)?new oe(x,C):void 0})}gc.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(XH(t,"geometry")),n.length>0&&(o.push(XH(n,"westHemisphereGeometry")),o.push(XH(n,"eastHemisphereGeometry"))),o};var Lu=new h,SS=new h,gA=new h,yA=new h;gc.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),u;for(u=0;u<o;u++)s[u]={indexOffset:0,count:0,currentCount:0};let f=0;for(u=0;u<r;u+=3){let m=t[u],x=t[u+1],C=t[u+2],A=m*3,T=x*3,b=C*3;SS.x=i[A],SS.y=i[A+1],SS.z=i[A+2],gA.x=i[T],gA.y=i[T+1],gA.z=i[T+2],yA.x=i[b],yA.y=i[b+1],yA.z=i[b+2],s[m].count++,s[x].count++,s[C].count++,h.subtract(gA,SS,gA),h.subtract(yA,SS,yA),a[f]=h.cross(gA,yA,new h),f++}let d=0;for(u=0;u<o;u++)s[u].indexOffset+=d,d+=s[u].count;f=0;let p;for(u=0;u<r;u+=3){p=s[t[u]];let m=p.indexOffset+p.currentCount;c[m]=f,p.currentCount++,p=s[t[u+1]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,p=s[t[u+2]],m=p.indexOffset+p.currentCount,c[m]=f,p.currentCount++,f++}let _=new Float32Array(o*3);for(u=0;u<o;u++){let m=u*3;if(p=s[u],h.clone(h.ZERO,Lu),p.count>0){for(f=0;f<p.count;f++)h.add(Lu,a[c[p.indexOffset+f]],Lu);h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&h.clone(a[c[p.indexOffset]],Lu)}h.equalsEpsilon(h.ZERO,Lu,R.EPSILON10)&&(Lu.z=1),h.normalize(Lu,Lu),_[m]=Lu.x,_[m+1]=Lu.y,_[m+2]=Lu.z}return e.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e};var Yve=new h,IZ=new h,Xve=new h;gc.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),u;for(u=0;u<c.length;u++)c[u]=0;let f,d,p;for(u=0;u<a;u+=3){let x=n[u],C=n[u+1],A=n[u+2];f=x*3,d=C*3,p=A*3;let T=x*2,b=C*2,S=A*2,w=i[f],D=i[f+1],O=i[f+2],I=r[T],L=r[T+1],N=r[b+1]-L,g=r[S+1]-L,E=1/((r[b]-I)*g-(r[S]-I)*N),v=(g*(i[d]-w)-N*(i[p]-w))*E,P=(g*(i[d+1]-D)-N*(i[p+1]-D))*E,M=(g*(i[d+2]-O)-N*(i[p+2]-O))*E;c[f]+=v,c[f+1]+=P,c[f+2]+=M,c[d]+=v,c[d+1]+=P,c[d+2]+=M,c[p]+=v,c[p+1]+=P,c[p+2]+=M}let _=new Float32Array(s*3),m=new Float32Array(s*3);for(u=0;u<s;u++){f=u*3,d=f+1,p=f+2;let x=h.fromArray(o,f,Yve),C=h.fromArray(c,f,Xve),A=h.dot(x,C);h.multiplyByScalar(x,A,IZ),h.normalize(h.subtract(C,IZ,C),C),_[f]=C.x,_[d]=C.y,_[p]=C.z,h.normalize(h.cross(x,C,C),C),m[f]=C.x,m[d]=C.y,m[p]=C.z}return e.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_}),e.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m}),e};var wS=new G,Jf=new h,OZ=new h,RZ=new h,yI=new G;gc.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let D=t.values;i=D.length/3;let O=new Float32Array(i*2),I=0;for(n=0;n<i;++n){if(h.fromArray(D,n*3,Jf),h.equals(Jf,h.ZERO)){I+=2;continue}yI=Pn.octEncodeInRange(Jf,65535,yI),O[I++]=yI.x,O[I++]=yI.y}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:O}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=l(o),a=l(r);if(!s&&!a)return e;let c=e.attributes.tangent,u=e.attributes.bitangent,f=l(c),d=l(u),p,_,m,x;s&&(p=o.values),a&&(_=r.values),f&&(m=c.values),d&&(x=u.values),i=(s?p.length:_.length)/(s?3:2);let T=i,b=a&&s?2:1;b+=f||d?1:0,T*=b;let S=new Float32Array(T),w=0;for(n=0;n<i;++n){a&&(G.fromArray(_,n*2,wS),S[w++]=Pn.compressTextureCoordinates(wS));let D=n*3;s&&l(m)&&l(x)?(h.fromArray(p,D,Jf),h.fromArray(m,D,OZ),h.fromArray(x,D,RZ),Pn.octPack(Jf,OZ,RZ,wS),S[w++]=wS.x,S[w++]=wS.y):(s&&(h.fromArray(p,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),f&&(h.fromArray(m,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)),d&&(h.fromArray(x,D,Jf),S[w++]=Pn.octEncodeFloat(Jf)))}return e.attributes.compressedAttributes=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:b,values:S}),s&&delete e.attributes.normal,a&&delete e.attributes.st,d&&delete e.attributes.bitangent,f&&delete e.attributes.tangent,e};function Kve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function $ve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Zve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=Le.TRIANGLES,e}function Jve(e){if(l(e.indices))return e;let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function Qve(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=Le.LINES,e}function eDe(e){let t=ct.computeNumberOfVertices(e),n=Ne.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=Le.LINES,e}function tDe(e){switch(e.primitiveType){case Le.TRIANGLE_FAN:return $ve(e);case Le.TRIANGLE_STRIP:return Zve(e);case Le.TRIANGLES:return Kve(e);case Le.LINE_STRIP:return Qve(e);case Le.LINE_LOOP:return eDe(e);case Le.LINES:return Jve(e)}return e}function M_(e,t){Math.abs(e.y)<R.EPSILON6&&(t?e.y=-R.EPSILON6:e.y=R.EPSILON6)}function nDe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){M_(e,e.y<0),M_(t,t.y<0),M_(n,n.y<0);return}let i=Math.abs(e.y),o=Math.abs(t.y),r=Math.abs(n.y),s;i>o?i>r?s=R.sign(e.y):s=R.sign(n.y):o>r?s=R.sign(t.y):s=R.sign(n.y);let a=s<0;M_(e,a),M_(t,a),M_(n,a)}var MZ=new h;function Nu(e,t,n,i){h.add(e,h.multiplyByScalar(h.subtract(t,e,MZ),e.y/(e.y-t.y),MZ),n),h.clone(n,i),M_(n,!0),M_(i,!1)}var my=new h,py=new h,_y=new h,gy=new h,KH={positions:new Array(7),indices:new Array(3*3)};function iDe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;nDe(e,t,n);let i=e.y<0,o=t.y<0,r=n.y<0,s=0;s+=i?1:0,s+=o?1:0,s+=r?1:0;let a=KH.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):s===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,i?o?r||(Nu(n,e,my,_y),Nu(n,t,py,gy),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(Nu(t,n,my,_y),Nu(t,e,py,gy),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(Nu(e,t,my,_y),Nu(e,n,py,gy),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=KH.positions;return c[0]=e,c[1]=t,c[2]=n,c.length=3,(s===1||s===2)&&(c[3]=my,c[4]=py,c[5]=_y,c[6]=gy,c.length=7),KH}function BZ(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=K.createTypedArray(r.componentDatatype,r.values)}let i=ct.computeNumberOfVertices(e);return e.indices=Ne.createTypedArray(i,e.indices),t&&(e.boundingSphere=oe.fromVertices(n.position.values)),e}function CA(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ee({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ct({attributes:n,indices:[],primitiveType:e.primitiveType})}function QH(e,t,n){let i=l(e.geometry.boundingSphere);t=BZ(t,i),n=BZ(n,i),l(n)&&!l(t)?e.geometry=n:!l(n)&&l(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=n,e.geometry=void 0)}function e5(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,u,f,d,p){let _=e.fromArray(u,r*t,n),m=e.fromArray(u,s*t,i),x=e.fromArray(u,a*t,o);e.multiplyByScalar(_,c.x,_),e.multiplyByScalar(m,c.y,m),e.multiplyByScalar(x,c.z,x);let C=e.add(_,m,_);e.add(C,x,C),p&&e.normalize(C,C),e.pack(C,f,d*t)}}var oDe=e5(se,4),AI=e5(h,3),UZ=e5(G,2),rDe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,u=o[n]*i.z;r[s]=a+c+u>R.EPSILON6?1:0},vS=new h,$H=new h,ZH=new h,sDe=new h;function xI(e,t,n,i,o,r,s,a,c,u,f,d,p,_,m,x){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(u)&&_===0)return;let C=h.fromArray(o,e*3,vS),A=h.fromArray(o,t*3,$H),T=h.fromArray(o,n*3,ZH),b=uA(i,C,A,T,sDe);if(!!l(b)){if(l(r)&&AI(e,t,n,b,r,d.normal.values,x,!0),l(u)){let S=h.fromArray(u,e*3,vS),w=h.fromArray(u,t*3,$H),D=h.fromArray(u,n*3,ZH);h.multiplyByScalar(S,b.x,S),h.multiplyByScalar(w,b.y,w),h.multiplyByScalar(D,b.z,D);let O;!h.equals(S,h.ZERO)||!h.equals(w,h.ZERO)||!h.equals(D,h.ZERO)?(O=h.add(S,w,S),h.add(O,D,O),h.normalize(O,O)):(O=vS,O.x=0,O.y=0,O.z=0),h.pack(O,d.extrudeDirection.values,x*3)}if(l(f)&&rDe(e,t,n,b,f,d.applyOffset.values,x),l(s)&&AI(e,t,n,b,s,d.tangent.values,x,!0),l(a)&&AI(e,t,n,b,a,d.bitangent.values,x,!0),l(c)&&UZ(e,t,n,b,c,d.st.values,x),_>0)for(let S=0;S<_;S++){let w=p[S];aDe(e,t,n,b,x,m[w],d[w])}}}function aDe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,u=s.values;switch(a){case 4:oDe(e,t,n,i,c,u,o,!1);break;case 3:AI(e,t,n,i,c,u,o,!1);break;case 2:UZ(e,t,n,i,c,u,o,!1);break;default:u[o]=c[e]*i.x+c[t]*i.y+c[n]*i.z}}function Ah(e,t,n,i,o,r){let s=e.position.values.length/3;if(o!==-1){let a=i[o],c=n[a];return c===-1?(n[a]=s,e.position.values.push(r.x,r.y,r.z),t.push(s),s):(t.push(c),c)}return e.position.values.push(r.x,r.y,r.z),t.push(s),s}var cDe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function LZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=l(n.applyOffset)?n.applyOffset.values:void 0,f=t.indices,d=[];for(let O in n)n.hasOwnProperty(O)&&!cDe[O]&&l(n[O])&&d.push(O);let p=d.length,_=CA(t),m=CA(t),x,C,A,T,b,S=[];S.length=i.length/3;let w=[];for(w.length=i.length/3,b=0;b<S.length;++b)S[b]=-1,w[b]=-1;let D=f.length;for(b=0;b<D;b+=3){let O=f[b],I=f[b+1],L=f[b+2],N=h.fromArray(i,O*3),g=h.fromArray(i,I*3),E=h.fromArray(i,L*3),v=iDe(N,g,E);if(l(v)&&v.positions.length>3){let P=v.positions,M=v.indices,V=M.length;for(let U=0;U<V;++U){let k=M[U],H=P[k];H.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,k<3?b+k:-1,H),xI(O,I,L,H,i,o,s,r,a,c,u,x,d,p,n,T)}}else l(v)&&(N=v.positions[0],g=v.positions[1],E=v.positions[2]),N.y<0?(x=m.attributes,C=m.indices,A=S):(x=_.attributes,C=_.indices,A=w),T=Ah(x,C,A,f,b,N),xI(O,I,L,N,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+1,g),xI(O,I,L,g,i,o,s,r,a,c,u,x,d,p,n,T),T=Ah(x,C,A,f,b+2,E),xI(O,I,L,E,i,o,s,r,a,c,u,x,d,p,n,T)}QH(e,m,_)}var zZ=rn.fromPointNormal(h.ZERO,h.UNIT_Y),lDe=new h,uDe=new h;function xA(e,t,n,i,o,r,s){if(!l(s))return;let a=h.fromArray(i,e*3,vS);h.equalsEpsilon(a,n,R.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function NZ(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.applyOffset)?n.applyOffset.values:void 0,r=t.indices,s=CA(t),a=CA(t),c,u=r.length,f=[];f.length=i.length/3;let d=[];for(d.length=i.length/3,c=0;c<f.length;++c)f[c]=-1,d[c]=-1;for(c=0;c<u;c+=2){let p=r[c],_=r[c+1],m=h.fromArray(i,p*3,vS),x=h.fromArray(i,_*3,$H),C;Math.abs(m.y)<R.EPSILON6&&(m.y<0?m.y=-R.EPSILON6:m.y=R.EPSILON6),Math.abs(x.y)<R.EPSILON6&&(x.y<0?x.y=-R.EPSILON6:x.y=R.EPSILON6);let A=s.attributes,T=s.indices,b=d,S=a.attributes,w=a.indices,D=f,O=Ki.lineSegmentPlane(m,x,zZ,ZH);if(l(O)){let I=h.multiplyByScalar(h.UNIT_Y,5*R.EPSILON9,lDe);m.y<0&&(h.negate(I,I),A=a.attributes,T=a.indices,b=f,S=s.attributes,w=s.indices,D=d);let L=h.add(O,I,uDe);C=Ah(A,T,b,r,c,m),xA(p,_,m,i,C,A,o),C=Ah(A,T,b,r,-1,L),xA(p,_,L,i,C,A,o),h.negate(I,I),h.add(O,I,L),C=Ah(S,w,D,r,-1,L),xA(p,_,L,i,C,S,o),C=Ah(S,w,D,r,c+1,x),xA(p,_,x,i,C,S,o)}else{let I,L,N;m.y<0?(I=a.attributes,L=a.indices,N=f):(I=s.attributes,L=s.indices,N=d),C=Ah(I,L,N,r,c,m),xA(p,_,m,i,C,I,o),C=Ah(I,L,N,r,c+1,x),xA(p,_,x,i,C,I,o)}}QH(e,a,s)}var FZ=new G,fDe=new G,HZ=new h,GZ=new h,JH=new h,dDe=new h,hDe=new h,mDe=new h,VZ=new se;function kZ(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=h.unpack(n,s,HZ);if(a.x>0)continue;let c=h.unpack(i,s,GZ);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):h.pack(a,i,s));let u=h.unpack(o,s,JH);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):h.pack(a,o,s))}}var pDe=5*R.EPSILON9,CI=R.EPSILON6;function _De(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=n.prevPosition.values,r=n.nextPosition.values,s=n.expandAndWidth.values,a=l(n.st)?n.st.values:void 0,c=l(n.color)?n.color.values:void 0,u=CA(t),f=CA(t),d,p,_,m=!1,x=i.length/3;for(d=0;d<x;d+=4){let C=d,A=d+2,T=h.fromArray(i,C*3,HZ),b=h.fromArray(i,A*3,GZ);if(Math.abs(T.y)<CI)for(T.y=CI*(b.y<0?-1:1),i[d*3+1]=T.y,i[(d+1)*3+1]=T.y,p=C*3;p<C*3+4*3;p+=3)o[p]=i[d*3],o[p+1]=i[d*3+1],o[p+2]=i[d*3+2];if(Math.abs(b.y)<CI)for(b.y=CI*(T.y<0?-1:1),i[(d+2)*3+1]=b.y,i[(d+3)*3+1]=b.y,p=C*3;p<C*3+4*3;p+=3)r[p]=i[(d+2)*3],r[p+1]=i[(d+2)*3+1],r[p+2]=i[(d+2)*3+2];let S=u.attributes,w=u.indices,D=f.attributes,O=f.indices,I=Ki.lineSegmentPlane(T,b,zZ,dDe);if(l(I)){m=!0;let L=h.multiplyByScalar(h.UNIT_Y,pDe,hDe);T.y<0&&(h.negate(L,L),S=f.attributes,w=f.indices,D=u.attributes,O=u.indices);let N=h.add(I,L,mDe);S.position.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.position.values.push(N.x,N.y,N.z),S.position.values.push(N.x,N.y,N.z),S.prevPosition.values.push(o[C*3],o[C*3+1],o[C*3+2]),S.prevPosition.values.push(o[C*3+3],o[C*3+4],o[C*3+5]),S.prevPosition.values.push(T.x,T.y,T.z,T.x,T.y,T.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),S.nextPosition.values.push(N.x,N.y,N.z),h.negate(L,L),h.add(I,L,N),D.position.values.push(N.x,N.y,N.z),D.position.values.push(N.x,N.y,N.z),D.position.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.prevPosition.values.push(N.x,N.y,N.z),D.nextPosition.values.push(b.x,b.y,b.z,b.x,b.y,b.z),D.nextPosition.values.push(r[A*3],r[A*3+1],r[A*3+2]),D.nextPosition.values.push(r[A*3+3],r[A*3+4],r[A*3+5]);let g=G.fromArray(s,C*2,FZ),E=Math.abs(g.y);S.expandAndWidth.values.push(-1,E,1,E),S.expandAndWidth.values.push(-1,-E,1,-E),D.expandAndWidth.values.push(-1,E,1,E),D.expandAndWidth.values.push(-1,-E,1,-E);let v=h.magnitudeSquared(h.subtract(I,T,JH));if(v/=h.magnitudeSquared(h.subtract(b,T,JH)),l(c)){let P=se.fromArray(c,C*4,VZ),M=se.fromArray(c,A*4,VZ),V=R.lerp(P.x,M.x,v),U=R.lerp(P.y,M.y,v),k=R.lerp(P.z,M.z,v),H=R.lerp(P.w,M.w,v);for(p=C*4;p<C*4+2*4;++p)S.color.values.push(c[p]);for(S.color.values.push(V,U,k,H),S.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),D.color.values.push(V,U,k,H),p=A*4;p<A*4+2*4;++p)D.color.values.push(c[p])}if(l(a)){let P=G.fromArray(a,C*2,FZ),M=G.fromArray(a,(d+3)*2,fDe),V=R.lerp(P.x,M.x,v);for(p=C*2;p<C*2+2*2;++p)S.st.values.push(a[p]);for(S.st.values.push(V,P.y),S.st.values.push(V,M.y),D.st.values.push(V,P.y),D.st.values.push(V,M.y),p=A*2;p<A*2+2*2;++p)D.st.values.push(a[p])}_=S.position.values.length/3-4,w.push(_,_+2,_+1),w.push(_+1,_+2,_+3),_=D.position.values.length/3-4,O.push(_,_+2,_+1),O.push(_+1,_+2,_+3)}else{let L,N;for(T.y<0?(L=f.attributes,N=f.indices):(L=u.attributes,N=u.indices),L.position.values.push(T.x,T.y,T.z),L.position.values.push(T.x,T.y,T.z),L.position.values.push(b.x,b.y,b.z),L.position.values.push(b.x,b.y,b.z),p=d*3;p<d*3+4*3;++p)L.prevPosition.values.push(o[p]),L.nextPosition.values.push(r[p]);for(p=d*2;p<d*2+4*2;++p)L.expandAndWidth.values.push(s[p]),l(a)&&L.st.values.push(a[p]);if(l(c))for(p=d*4;p<d*4+4*4;++p)L.color.values.push(c[p]);_=L.position.values.length/3-4,N.push(_,_+2,_+1),N.push(_+1,_+2,_+3)}}m&&(kZ(f),kZ(u)),QH(e,f,u)}gc.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||oe.intersectPlane(n,rn.ORIGIN_ZX_PLANE)!==Zt.INTERSECTING))return e;if(t.geometryType!==Zf.NONE)switch(t.geometryType){case Zf.POLYLINES:_De(e);break;case Zf.TRIANGLES:LZ(e);break;case Zf.LINES:NZ(e);break}else tDe(t),t.primitiveType===Le.TRIANGLES?LZ(e):t.primitiveType===Le.LINES&&NZ(e);return e};var Rn=gc;var AA=new h,t5=new h,n5=new h,WZ=new h,us=new G,jZ=new Q,gDe=new Q,i5=new Me,qZ=new h,YZ=new h,XZ=new h,SI=new me,KZ=new h,$Z=new G,ZZ=new G;function JZ(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,u=n?e.length/3*2:e.length/3,f=t.shadowVolume,d=i.st?new Float32Array(u*2):void 0,p=i.normal?new Float32Array(u*3):void 0,_=i.tangent?new Float32Array(u*3):void 0,m=i.bitangent?new Float32Array(u*3):void 0,x=f?new Float32Array(u*3):void 0,C=0,A=qZ,T=YZ,b=XZ,S=new Si(a),w=S.project(a.cartesianToCartographic(o,SI),KZ),D=a.scaleToGeodeticSurface(o,AA);a.geodeticSurfaceNormal(D,D);let O=jZ,I=gDe;if(c!==0){let M=Me.fromAxisAngle(D,c,i5);O=Q.fromQuaternion(M,O),M=Me.fromAxisAngle(D,-c,i5),I=Q.fromQuaternion(M,I)}else O=Q.clone(Q.IDENTITY,O),I=Q.clone(Q.IDENTITY,I);let L=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),N=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),g=e.length,E=n?g:0,v=E/3*2;for(let M=0;M<g;M+=3){let V=M+1,U=M+2,k=h.fromArray(e,M,AA);if(i.st){let H=Q.multiplyByVector(O,k,t5),F=S.project(a.cartesianToCartographic(H,SI),n5);h.subtract(F,w,F),us.x=(F.x+r)/(2*r),us.y=(F.y+s)/(2*s),L.x=Math.min(us.x,L.x),L.y=Math.min(us.y,L.y),N.x=Math.max(us.x,N.x),N.y=Math.max(us.y,N.y),n&&(d[C+v]=us.x,d[C+1+v]=us.y),d[C++]=us.x,d[C++]=us.y}(i.normal||i.tangent||i.bitangent||f)&&(A=a.geodeticSurfaceNormal(k,A),f&&(x[M+E]=-A.x,x[V+E]=-A.y,x[U+E]=-A.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(T=h.normalize(h.cross(h.UNIT_Z,A,T),T),Q.multiplyByVector(I,T,T)),i.normal&&(p[M]=A.x,p[V]=A.y,p[U]=A.z,n&&(p[M+E]=-A.x,p[V+E]=-A.y,p[U+E]=-A.z)),i.tangent&&(_[M]=T.x,_[V]=T.y,_[U]=T.z,n&&(_[M+E]=-T.x,_[V+E]=-T.y,_[U+E]=-T.z)),i.bitangent&&(b=h.normalize(h.cross(A,T,b),b),m[M]=b.x,m[V]=b.y,m[U]=b.z,n&&(m[M+E]=b.x,m[V+E]=b.y,m[U+E]=b.z))))}if(i.st){g=d.length;for(let M=0;M<g;M+=2)d[M]=(d[M]-L.x)/(N.x-L.x),d[M+1]=(d[M+1]-L.y)/(N.y-L.y)}let P=new ln;if(i.position){let M=kl.raisePositionsToHeight(e,t,n);P.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:M})}if(i.st&&(P.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:d})),i.normal&&(P.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(P.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),i.bitangent&&(P.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),f&&(P.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),n&&l(t.offsetAttribute)){let M=new Uint8Array(u);if(t.offsetAttribute===tn.TOP)M=M.fill(1,0,u/2);else{let V=t.offsetAttribute===tn.NONE?0:1;M=M.fill(V)}P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:M})}return P}function QZ(e){let t=new Array(12*(e*(e+1))-6),n=0,i,o,r,s,a;for(i=0,r=1,s=0;s<3;s++)t[n++]=r++,t[n++]=i,t[n++]=r;for(s=2;s<e+1;++s){for(r=s*(s+1)-1,i=(s-1)*s-1,t[n++]=r++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=r++,t[n++]=i,t[n++]=r}for(o=e*2,++r,++i,s=0;s<o-1;++s)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;for(t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i++,t[n++]=i,++i,s=e-1;s>1;--s){for(t[n++]=i++,t[n++]=i,t[n++]=r,o=2*s,a=0;a<o-1;++a)t[n++]=r,t[n++]=i++,t[n++]=i,t[n++]=r++,t[n++]=i,t[n++]=r;t[n++]=i++,t[n++]=i++,t[n++]=r++}for(s=0;s<3;s++)t[n++]=i++,t[n++]=i,t[n++]=r;return t}var yy=new h;function yDe(e){let t=e.center;yy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,yy),e.height,yy),yy=h.add(t,yy,yy);let n=new oe(yy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=JZ(o,e,!1),a=QZ(r);return a=Ne.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function xDe(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,u=t.stRotation,f=e.length/3*2,d=new Float64Array(f*3),p=n.st?new Float32Array(f*2):void 0,_=n.normal?new Float32Array(f*3):void 0,m=n.tangent?new Float32Array(f*3):void 0,x=n.bitangent?new Float32Array(f*3):void 0,C=t.shadowVolume,A=C?new Float32Array(f*3):void 0,T=0,b=qZ,S=YZ,w=XZ,D=new Si(s),O=D.project(s.cartesianToCartographic(i,SI),KZ),I=s.scaleToGeodeticSurface(i,AA);s.geodeticSurfaceNormal(I,I);let L=Me.fromAxisAngle(I,u,i5),N=Q.fromQuaternion(L,jZ),g=G.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,$Z),E=G.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ZZ),v=e.length,P=v/3*2;for(let V=0;V<v;V+=3){let U=V+1,k=V+2,H=h.fromArray(e,V,AA),F;if(n.st){let j=Q.multiplyByVector(N,H,t5),X=D.project(s.cartesianToCartographic(j,SI),n5);h.subtract(X,O,X),us.x=(X.x+o)/(2*o),us.y=(X.y+r)/(2*r),g.x=Math.min(us.x,g.x),g.y=Math.min(us.y,g.y),E.x=Math.max(us.x,E.x),E.y=Math.max(us.y,E.y),p[T+P]=us.x,p[T+1+P]=us.y,p[T++]=us.x,p[T++]=us.y}H=s.scaleToGeodeticSurface(H,H),F=h.clone(H,t5),b=s.geodeticSurfaceNormal(H,b),C&&(A[V+v]=-b.x,A[U+v]=-b.y,A[k+v]=-b.z);let Y=h.multiplyByScalar(b,a,WZ);if(H=h.add(H,Y,H),Y=h.multiplyByScalar(b,c,Y),F=h.add(F,Y,F),n.position&&(d[V+v]=F.x,d[U+v]=F.y,d[k+v]=F.z,d[V]=H.x,d[U]=H.y,d[k]=H.z),n.normal||n.tangent||n.bitangent){w=h.clone(b,w);let j=h.fromArray(e,(V+3)%v,WZ);h.subtract(j,H,j);let X=h.subtract(F,H,n5);b=h.normalize(h.cross(X,j,b),b),n.normal&&(_[V]=b.x,_[U]=b.y,_[k]=b.z,_[V+v]=b.x,_[U+v]=b.y,_[k+v]=b.z),n.tangent&&(S=h.normalize(h.cross(w,b,S),S),m[V]=S.x,m[U]=S.y,m[k]=S.z,m[V+v]=S.x,m[V+1+v]=S.y,m[V+2+v]=S.z),n.bitangent&&(x[V]=w.x,x[U]=w.y,x[k]=w.z,x[V+v]=w.x,x[U+v]=w.y,x[k+v]=w.z)}}if(n.st){v=p.length;for(let V=0;V<v;V+=2)p[V]=(p[V]-g.x)/(E.x-g.x),p[V+1]=(p[V+1]-g.y)/(E.y-g.y)}let M=new ln;if(n.position&&(M.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})),n.st&&(M.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(M.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),n.tangent&&(M.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),n.bitangent&&(M.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),C&&(M.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),l(t.offsetAttribute)){let V=new Uint8Array(f);if(t.offsetAttribute===tn.TOP)V=V.fill(1,0,f/2);else{let U=t.offsetAttribute===tn.NONE?0:1;V=V.fill(U)}M.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}return M}function CDe(e){let t=e.length/3,n=Ne.createTypedArray(t,t*6),i=0;for(let o=0;o<t;o++){let r=o,s=o+t,a=(r+1)%t,c=a+t;n[i++]=r,n[i++]=s,n[i++]=a,n[i++]=a,n[i++]=s,n[i++]=c}return n}var bI=new oe,EI=new oe;function ADe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,AA),e.height,AA);bI.center=h.add(t,o,bI.center),bI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),EI.center=h.add(t,o,EI.center),EI.radius=i;let r=kl.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,u=oe.union(bI,EI),f=JZ(s,e,!0),d=QZ(a),p=d.length;d.length=p*2;let _=s.length/3;for(let S=0;S<p;S+=3)d[S+p]=d[S+2]+_,d[S+1+p]=d[S+1]+_,d[S+2+p]=d[S]+_;let m=Ne.createTypedArray(_*2/3,d),x=new ct({attributes:f,indices:m,primitiveType:Le.TRIANGLES}),C=xDe(c,e);d=CDe(c);let A=Ne.createTypedArray(c.length*2/3,d),T=new ct({attributes:C,indices:A,primitiveType:Le.TRIANGLES}),b=Rn.combineInstances([new pt({geometry:x}),new pt({geometry:T})]);return{boundingSphere:u,attributes:b[0].attributes,indices:b[0].indices}}function eJ(e,t,n,i,o,r,s){let c=kl.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,u=c.length/3,f=new Array(u);for(let p=0;p<u;++p)f[p]=h.fromArray(c,p*3);let d=de.fromCartesianArray(f,r,s);return d.width>R.PI&&(d.north=d.north>0?R.PI_OVER_TWO-R.EPSILON7:d.north,d.south=d.south<0?R.EPSILON7-R.PI_OVER_TWO:d.south,d.east=R.PI,d.west=-R.PI),d}function bh(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.vertexFormat,Pe.DEFAULT),a=y(e.height,0),c=y(e.extrudedHeight,a);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Pe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}bh.packedLength=h.packedLength+re.packedLength+Pe.packedLength+9;bh.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var tJ=new h,nJ=new re,iJ=new Pe,Th={center:tJ,ellipsoid:nJ,vertexFormat:iJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};bh.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,tJ);t+=h.packedLength;let o=re.unpack(e,t,nJ);t+=re.packedLength;let r=Pe.unpack(e,t,iJ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++],_=e[t++]===1,m=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=u,n._height=f,n._granularity=d,n._extrudedHeight=p,n._shadowVolume=_,n._offsetAttribute=m===-1?void 0:m,n):(Th.height=f,Th.extrudedHeight=p,Th.granularity=d,Th.stRotation=u,Th.rotation=c,Th.semiMajorAxis=s,Th.semiMinorAxis=a,Th.shadowVolume=_,Th.offsetAttribute=m===-1?void 0:m,new bh(Th))};bh.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.center,i=y(e.ellipsoid,re.WGS84),o=e.semiMajorAxis,r=e.semiMinorAxis,s=y(e.granularity,R.RADIANS_PER_DEGREE),a=y(e.rotation,0);return eJ(n,o,r,a,s,i,t)};bh.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r;if(i)o.extrudedHeight=n,o.shadowVolume=e._shadowVolume,o.offsetAttribute=e._offsetAttribute,r=ADe(o);else if(r=yDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};bh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new bh({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};function TDe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=kl.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=h.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return ct._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(bh.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=eJ(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=TDe(this)),this._textureCoordinateRotationPoints}}});var rl=bh;function qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new rl(n),this._workerName="createCircleGeometry"}qm.packedLength=rl.packedLength;qm.pack=function(e,t,n){return rl.pack(e._ellipseGeometry,t,n)};var bDe=new rl({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ua={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Pe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};qm.unpack=function(e,t,n){let i=rl.unpack(e,t,bDe);return Ua.center=h.clone(i._center,Ua.center),Ua.ellipsoid=re.clone(i._ellipsoid,Ua.ellipsoid),Ua.height=i._height,Ua.extrudedHeight=i._extrudedHeight,Ua.granularity=i._granularity,Ua.vertexFormat=Pe.clone(i._vertexFormat,Ua.vertexFormat),Ua.stRotation=i._stRotation,Ua.shadowVolume=i._shadowVolume,l(n)?(Ua.semiMajorAxis=i._semiMajorAxis,Ua.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new rl(Ua),n):(Ua.radius=i._semiMajorAxis,new qm(Ua))};qm.createGeometry=function(e){return rl.createGeometry(e._ellipseGeometry)};qm.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new qm({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(qm.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var oJ=qm;var rJ=new h,xy=new h;function EDe(e){let t=e.center;xy=h.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,xy),e.height,xy),xy=h.add(t,xy,xy);let n=new oe(xy,e.semiMajorAxis),i=kl.computeEllipsePositions(e,!1,!0).outerPositions,o=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Ne.createTypedArray(r,r*2),a=0;for(let c=0;c<r;++c)s[a++]=c,s[a++]=(c+1)%r;return{boundingSphere:n,attributes:o,indices:s}}var wI=new oe,vI=new oe;function SDe(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,rJ),e.height,rJ);wI.center=h.add(t,o,wI.center),wI.radius=i,o=h.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),vI.center=h.add(t,o,vI.center),vI.radius=i;let r=kl.computeEllipsePositions(e,!1,!0).outerPositions,s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:kl.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=oe.union(wI,vI),c=r.length/3;if(l(e.offsetAttribute)){let m=new Uint8Array(c);if(e.offsetAttribute===tn.TOP)m=m.fill(1,0,c/2);else{let x=e.offsetAttribute===tn.NONE?0:1;m=m.fill(x)}s.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}let u=y(e.numberOfVerticalLines,16);u=R.clamp(u,0,c/2);let f=Ne.createTypedArray(c,c*2+u*2);c/=2;let d=0,p;for(p=0;p<c;++p)f[d++]=p,f[d++]=(p+1)%c,f[d++]=p+c,f[d++]=(p+1)%c+c;let _;if(u>0){let m=Math.min(u,c);_=Math.round(c/m);let x=Math.min(_*u,c);for(p=0;p<x;p+=_)f[d++]=p,f[d++]=p+c}return{boundingSphere:a,attributes:s,indices:f}}function TA(e){e=y(e,y.EMPTY_OBJECT);let t=e.center,n=y(e.ellipsoid,re.WGS84),i=e.semiMajorAxis,o=e.semiMinorAxis,r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.height,0),a=y(e.extrudedHeight,s);this._center=h.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=re.clone(n),this._rotation=y(e.rotation,0),this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(y(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}TA.packedLength=h.packedLength+re.packedLength+8;TA.pack=function(e,t,n){return n=y(n,0),h.pack(e._center,t,n),n+=h.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var sJ=new h,aJ=new re,Ym={center:sJ,ellipsoid:aJ,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};TA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,sJ);t+=h.packedLength;let o=re.unpack(e,t,aJ);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._center=h.clone(i,n._center),n._ellipsoid=re.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=u,n._extrudedHeight=f,n._numberOfVerticalLines=d,n._offsetAttribute=p===-1?void 0:p,n):(Ym.height=c,Ym.extrudedHeight=f,Ym.granularity=u,Ym.rotation=a,Ym.semiMajorAxis=r,Ym.semiMinorAxis=s,Ym.numberOfVerticalLines=d,Ym.offsetAttribute=p===-1?void 0:p,new TA(Ym))};TA.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!R.equalsEpsilon(t,n,0,R.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=SDe(o);else if(r=EDe(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===tn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ct({attributes:r.attributes,indices:r.indices,primitiveType:Le.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var Fu=TA;function bA(e){e=y(e,y.EMPTY_OBJECT);let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new Fu(n),this._workerName="createCircleOutlineGeometry"}bA.packedLength=Fu.packedLength;bA.pack=function(e,t,n){return Fu.pack(e._ellipseGeometry,t,n)};var wDe=new Fu({center:new h,semiMajorAxis:1,semiMinorAxis:1}),Ul={center:new h,radius:void 0,ellipsoid:re.clone(re.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};bA.unpack=function(e,t,n){let i=Fu.unpack(e,t,wDe);return Ul.center=h.clone(i._center,Ul.center),Ul.ellipsoid=re.clone(i._ellipsoid,Ul.ellipsoid),Ul.height=i._height,Ul.extrudedHeight=i._extrudedHeight,Ul.granularity=i._granularity,Ul.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(Ul.semiMajorAxis=i._semiMajorAxis,Ul.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new Fu(Ul),n):(Ul.radius=i._semiMajorAxis,new bA(Ul))};bA.createGeometry=function(e){return Fu.createGeometry(e._ellipseGeometry)};var cJ=bA;var vDe={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2},zr=Object.freeze(vDe);var DDe={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2},yo=Object.freeze(DDe);var o5;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?o5=function(){return performance.now()}:o5=function(){return Date.now()};var Pi=o5;function r5(e){e=y(e,y.EMPTY_OBJECT);let t=e.currentTime,n=e.startTime,i=e.stopTime;l(t)?t=ee.clone(t):l(n)?t=ee.clone(n):l(i)?t=ee.addDays(i,-1,new ee):t=ee.now(),l(n)?n=ee.clone(n):n=ee.clone(t),l(i)?i=ee.clone(i):i=ee.addDays(n,1,new ee),this.startTime=n,this.stopTime=i,this.clockRange=y(e.clockRange,zr.UNBOUNDED),this.canAnimate=y(e.canAnimate,!0),this.onTick=new _e,this.onStop=new _e,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Pi(),this.currentTime=t,this.multiplier=y(e.multiplier,1),this.shouldAnimate=y(e.shouldAnimate,!1),this.clockStep=y(e.clockStep,yo.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(r5.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){ee.equals(this._currentTime,e)||(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===yo.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=ee.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===yo.SYSTEM_CLOCK&&(this._clockStep=yo.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}});r5.prototype.tick=function(){let e=Pi(),t=ee.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){let n=this._clockStep;if(n===yo.SYSTEM_CLOCK)t=ee.now(t);else{let i=this._multiplier;if(n===yo.TICK_DEPENDENT)t=ee.addSeconds(t,i,t);else{let a=e-this._lastSystemTime;t=ee.addSeconds(t,i*(a/1e3),t)}let o=this.clockRange,r=this.startTime,s=this.stopTime;if(o===zr.CLAMPED)ee.lessThan(t,r)?t=ee.clone(r,t):ee.greaterThan(t,s)&&(t=ee.clone(s,t),this.onStop.raiseEvent(this));else if(o===zr.LOOP_STOP)for(ee.lessThan(t,r)&&(t=ee.clone(r,t));ee.greaterThan(t,s);)t=ee.addSeconds(r,ee.secondsDifference(t,s),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t};var Eh=r5;function s5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n*6<1?e+(t-e)*6*n:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function ne(e,t,n,i){this.red=y(e,1),this.green=y(t,1),this.blue=y(n,1),this.alpha=y(i,1)}ne.fromCartesian4=function(e,t){return l(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new ne(e.x,e.y,e.z,e.w)};ne.fromBytes=function(e,t,n,i,o){return e=ne.byteToFloat(y(e,255)),t=ne.byteToFloat(y(t,255)),n=ne.byteToFloat(y(n,255)),i=ne.byteToFloat(y(i,255)),l(o)?(o.red=e,o.green=t,o.blue=n,o.alpha=i,o):new ne(e,t,n,i)};ne.fromAlpha=function(e,t,n){return l(n)?(n.red=e.red,n.green=e.green,n.blue=e.blue,n.alpha=t,n):new ne(e.red,e.green,e.blue,t)};var a5,c5,Xm;Et.supportsTypedArrays()&&(a5=new ArrayBuffer(4),c5=new Uint32Array(a5),Xm=new Uint8Array(a5));ne.fromRgba=function(e,t){return c5[0]=e,ne.fromBytes(Xm[0],Xm[1],Xm[2],Xm[3],t)};ne.fromHsl=function(e,t,n,i,o){e=y(e,0)%1,t=y(t,0),n=y(n,0),i=y(i,1);let r=n,s=n,a=n;if(t!==0){let c;n<.5?c=n*(1+t):c=n+t-n*t;let u=2*n-c;r=s5(u,c,e+1/3),s=s5(u,c,e),a=s5(u,c,e-1/3)}return l(o)?(o.red=r,o.green=s,o.blue=a,o.alpha=i,o):new ne(r,s,a,i)};ne.fromRandom=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.red;if(!l(n)){let s=y(e.minimumRed,0),a=y(e.maximumRed,1);n=s+R.nextRandomNumber()*(a-s)}let i=e.green;if(!l(i)){let s=y(e.minimumGreen,0),a=y(e.maximumGreen,1);i=s+R.nextRandomNumber()*(a-s)}let o=e.blue;if(!l(o)){let s=y(e.minimumBlue,0),a=y(e.maximumBlue,1);o=s+R.nextRandomNumber()*(a-s)}let r=e.alpha;if(!l(r)){let s=y(e.minimumAlpha,0),a=y(e.maximumAlpha,1);r=s+R.nextRandomNumber()*(a-s)}return l(t)?(t.red=n,t.green=i,t.blue=o,t.alpha=r,t):new ne(n,i,o,r)};var PDe=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,IDe=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,ODe=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,RDe=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;ne.fromCssColorString=function(e,t){l(t)||(t=new ne),e=e.replace(/\s/g,"");let n=ne[e.toUpperCase()];if(l(n))return ne.clone(n,t),t;let i=PDe.exec(e);return i!==null?(t.red=parseInt(i[1],16)/15,t.green=parseInt(i[2],16)/15,t.blue=parseInt(i[3],16)/15,t.alpha=parseInt(y(i[4],"f"),16)/15,t):(i=IDe.exec(e),i!==null?(t.red=parseInt(i[1],16)/255,t.green=parseInt(i[2],16)/255,t.blue=parseInt(i[3],16)/255,t.alpha=parseInt(y(i[4],"ff"),16)/255,t):(i=ODe.exec(e),i!==null?(t.red=parseFloat(i[1])/(i[1].substr(-1)==="%"?100:255),t.green=parseFloat(i[2])/(i[2].substr(-1)==="%"?100:255),t.blue=parseFloat(i[3])/(i[3].substr(-1)==="%"?100:255),t.alpha=parseFloat(y(i[4],"1.0")),t):(i=RDe.exec(e),i!==null?ne.fromHsl(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(y(i[4],"1.0")),t):(t=void 0,t))))};ne.packedLength=4;ne.pack=function(e,t,n){return n=y(n,0),t[n++]=e.red,t[n++]=e.green,t[n++]=e.blue,t[n]=e.alpha,t};ne.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ne),n.red=e[t++],n.green=e[t++],n.blue=e[t++],n.alpha=e[t],n};ne.byteToFloat=function(e){return e/255};ne.floatToByte=function(e){return e===1?255:e*256|0};ne.clone=function(e,t){if(!!l(e))return l(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new ne(e.red,e.green,e.blue,e.alpha)};ne.equals=function(e,t){return e===t||l(e)&&l(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha};ne.equalsArray=function(e,t,n){return e.red===t[n]&&e.green===t[n+1]&&e.blue===t[n+2]&&e.alpha===t[n+3]};ne.prototype.clone=function(e){return ne.clone(this,e)};ne.prototype.equals=function(e){return ne.equals(this,e)};ne.prototype.equalsEpsilon=function(e,t){return this===e||l(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t};ne.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};ne.prototype.toCssColorString=function(){let e=ne.floatToByte(this.red),t=ne.floatToByte(this.green),n=ne.floatToByte(this.blue);return this.alpha===1?`rgb(${e},${t},${n})`:`rgba(${e},${t},${n},${this.alpha})`};ne.prototype.toCssHexString=function(){let e=ne.floatToByte(this.red).toString(16);e.length<2&&(e=`0${e}`);let t=ne.floatToByte(this.green).toString(16);t.length<2&&(t=`0${t}`);let n=ne.floatToByte(this.blue).toString(16);if(n.length<2&&(n=`0${n}`),this.alpha<1){let i=ne.floatToByte(this.alpha).toString(16);return i.length<2&&(i=`0${i}`),`#${e}${t}${n}${i}`}return`#${e}${t}${n}`};ne.prototype.toBytes=function(e){let t=ne.floatToByte(this.red),n=ne.floatToByte(this.green),i=ne.floatToByte(this.blue),o=ne.floatToByte(this.alpha);return l(e)?(e[0]=t,e[1]=n,e[2]=i,e[3]=o,e):[t,n,i,o]};ne.prototype.toRgba=function(){return Xm[0]=ne.floatToByte(this.red),Xm[1]=ne.floatToByte(this.green),Xm[2]=ne.floatToByte(this.blue),Xm[3]=ne.floatToByte(this.alpha),c5[0]};ne.prototype.brighten=function(e,t){return e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t};ne.prototype.darken=function(e,t){return e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t};ne.prototype.withAlpha=function(e,t){return ne.fromAlpha(this,e,t)};ne.add=function(e,t,n){return n.red=e.red+t.red,n.green=e.green+t.green,n.blue=e.blue+t.blue,n.alpha=e.alpha+t.alpha,n};ne.subtract=function(e,t,n){return n.red=e.red-t.red,n.green=e.green-t.green,n.blue=e.blue-t.blue,n.alpha=e.alpha-t.alpha,n};ne.multiply=function(e,t,n){return n.red=e.red*t.red,n.green=e.green*t.green,n.blue=e.blue*t.blue,n.alpha=e.alpha*t.alpha,n};ne.divide=function(e,t,n){return n.red=e.red/t.red,n.green=e.green/t.green,n.blue=e.blue/t.blue,n.alpha=e.alpha/t.alpha,n};ne.mod=function(e,t,n){return n.red=e.red%t.red,n.green=e.green%t.green,n.blue=e.blue%t.blue,n.alpha=e.alpha%t.alpha,n};ne.lerp=function(e,t,n,i){return i.red=R.lerp(e.red,t.red,n),i.green=R.lerp(e.green,t.green,n),i.blue=R.lerp(e.blue,t.blue,n),i.alpha=R.lerp(e.alpha,t.alpha,n),i};ne.multiplyByScalar=function(e,t,n){return n.red=e.red*t,n.green=e.green*t,n.blue=e.blue*t,n.alpha=e.alpha*t,n};ne.divideByScalar=function(e,t,n){return n.red=e.red/t,n.green=e.green/t,n.blue=e.blue/t,n.alpha=e.alpha/t,n};ne.ALICEBLUE=Object.freeze(ne.fromCssColorString("#F0F8FF"));ne.ANTIQUEWHITE=Object.freeze(ne.fromCssColorString("#FAEBD7"));ne.AQUA=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.AQUAMARINE=Object.freeze(ne.fromCssColorString("#7FFFD4"));ne.AZURE=Object.freeze(ne.fromCssColorString("#F0FFFF"));ne.BEIGE=Object.freeze(ne.fromCssColorString("#F5F5DC"));ne.BISQUE=Object.freeze(ne.fromCssColorString("#FFE4C4"));ne.BLACK=Object.freeze(ne.fromCssColorString("#000000"));ne.BLANCHEDALMOND=Object.freeze(ne.fromCssColorString("#FFEBCD"));ne.BLUE=Object.freeze(ne.fromCssColorString("#0000FF"));ne.BLUEVIOLET=Object.freeze(ne.fromCssColorString("#8A2BE2"));ne.BROWN=Object.freeze(ne.fromCssColorString("#A52A2A"));ne.BURLYWOOD=Object.freeze(ne.fromCssColorString("#DEB887"));ne.CADETBLUE=Object.freeze(ne.fromCssColorString("#5F9EA0"));ne.CHARTREUSE=Object.freeze(ne.fromCssColorString("#7FFF00"));ne.CHOCOLATE=Object.freeze(ne.fromCssColorString("#D2691E"));ne.CORAL=Object.freeze(ne.fromCssColorString("#FF7F50"));ne.CORNFLOWERBLUE=Object.freeze(ne.fromCssColorString("#6495ED"));ne.CORNSILK=Object.freeze(ne.fromCssColorString("#FFF8DC"));ne.CRIMSON=Object.freeze(ne.fromCssColorString("#DC143C"));ne.CYAN=Object.freeze(ne.fromCssColorString("#00FFFF"));ne.DARKBLUE=Object.freeze(ne.fromCssColorString("#00008B"));ne.DARKCYAN=Object.freeze(ne.fromCssColorString("#008B8B"));ne.DARKGOLDENROD=Object.freeze(ne.fromCssColorString("#B8860B"));ne.DARKGRAY=Object.freeze(ne.fromCssColorString("#A9A9A9"));ne.DARKGREEN=Object.freeze(ne.fromCssColorString("#006400"));ne.DARKGREY=ne.DARKGRAY;ne.DARKKHAKI=Object.freeze(ne.fromCssColorString("#BDB76B"));ne.DARKMAGENTA=Object.freeze(ne.fromCssColorString("#8B008B"));ne.DARKOLIVEGREEN=Object.freeze(ne.fromCssColorString("#556B2F"));ne.DARKORANGE=Object.freeze(ne.fromCssColorString("#FF8C00"));ne.DARKORCHID=Object.freeze(ne.fromCssColorString("#9932CC"));ne.DARKRED=Object.freeze(ne.fromCssColorString("#8B0000"));ne.DARKSALMON=Object.freeze(ne.fromCssColorString("#E9967A"));ne.DARKSEAGREEN=Object.freeze(ne.fromCssColorString("#8FBC8F"));ne.DARKSLATEBLUE=Object.freeze(ne.fromCssColorString("#483D8B"));ne.DARKSLATEGRAY=Object.freeze(ne.fromCssColorString("#2F4F4F"));ne.DARKSLATEGREY=ne.DARKSLATEGRAY;ne.DARKTURQUOISE=Object.freeze(ne.fromCssColorString("#00CED1"));ne.DARKVIOLET=Object.freeze(ne.fromCssColorString("#9400D3"));ne.DEEPPINK=Object.freeze(ne.fromCssColorString("#FF1493"));ne.DEEPSKYBLUE=Object.freeze(ne.fromCssColorString("#00BFFF"));ne.DIMGRAY=Object.freeze(ne.fromCssColorString("#696969"));ne.DIMGREY=ne.DIMGRAY;ne.DODGERBLUE=Object.freeze(ne.fromCssColorString("#1E90FF"));ne.FIREBRICK=Object.freeze(ne.fromCssColorString("#B22222"));ne.FLORALWHITE=Object.freeze(ne.fromCssColorString("#FFFAF0"));ne.FORESTGREEN=Object.freeze(ne.fromCssColorString("#228B22"));ne.FUCHSIA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.GAINSBORO=Object.freeze(ne.fromCssColorString("#DCDCDC"));ne.GHOSTWHITE=Object.freeze(ne.fromCssColorString("#F8F8FF"));ne.GOLD=Object.freeze(ne.fromCssColorString("#FFD700"));ne.GOLDENROD=Object.freeze(ne.fromCssColorString("#DAA520"));ne.GRAY=Object.freeze(ne.fromCssColorString("#808080"));ne.GREEN=Object.freeze(ne.fromCssColorString("#008000"));ne.GREENYELLOW=Object.freeze(ne.fromCssColorString("#ADFF2F"));ne.GREY=ne.GRAY;ne.HONEYDEW=Object.freeze(ne.fromCssColorString("#F0FFF0"));ne.HOTPINK=Object.freeze(ne.fromCssColorString("#FF69B4"));ne.INDIANRED=Object.freeze(ne.fromCssColorString("#CD5C5C"));ne.INDIGO=Object.freeze(ne.fromCssColorString("#4B0082"));ne.IVORY=Object.freeze(ne.fromCssColorString("#FFFFF0"));ne.KHAKI=Object.freeze(ne.fromCssColorString("#F0E68C"));ne.LAVENDER=Object.freeze(ne.fromCssColorString("#E6E6FA"));ne.LAVENDAR_BLUSH=Object.freeze(ne.fromCssColorString("#FFF0F5"));ne.LAWNGREEN=Object.freeze(ne.fromCssColorString("#7CFC00"));ne.LEMONCHIFFON=Object.freeze(ne.fromCssColorString("#FFFACD"));ne.LIGHTBLUE=Object.freeze(ne.fromCssColorString("#ADD8E6"));ne.LIGHTCORAL=Object.freeze(ne.fromCssColorString("#F08080"));ne.LIGHTCYAN=Object.freeze(ne.fromCssColorString("#E0FFFF"));ne.LIGHTGOLDENRODYELLOW=Object.freeze(ne.fromCssColorString("#FAFAD2"));ne.LIGHTGRAY=Object.freeze(ne.fromCssColorString("#D3D3D3"));ne.LIGHTGREEN=Object.freeze(ne.fromCssColorString("#90EE90"));ne.LIGHTGREY=ne.LIGHTGRAY;ne.LIGHTPINK=Object.freeze(ne.fromCssColorString("#FFB6C1"));ne.LIGHTSEAGREEN=Object.freeze(ne.fromCssColorString("#20B2AA"));ne.LIGHTSKYBLUE=Object.freeze(ne.fromCssColorString("#87CEFA"));ne.LIGHTSLATEGRAY=Object.freeze(ne.fromCssColorString("#778899"));ne.LIGHTSLATEGREY=ne.LIGHTSLATEGRAY;ne.LIGHTSTEELBLUE=Object.freeze(ne.fromCssColorString("#B0C4DE"));ne.LIGHTYELLOW=Object.freeze(ne.fromCssColorString("#FFFFE0"));ne.LIME=Object.freeze(ne.fromCssColorString("#00FF00"));ne.LIMEGREEN=Object.freeze(ne.fromCssColorString("#32CD32"));ne.LINEN=Object.freeze(ne.fromCssColorString("#FAF0E6"));ne.MAGENTA=Object.freeze(ne.fromCssColorString("#FF00FF"));ne.MAROON=Object.freeze(ne.fromCssColorString("#800000"));ne.MEDIUMAQUAMARINE=Object.freeze(ne.fromCssColorString("#66CDAA"));ne.MEDIUMBLUE=Object.freeze(ne.fromCssColorString("#0000CD"));ne.MEDIUMORCHID=Object.freeze(ne.fromCssColorString("#BA55D3"));ne.MEDIUMPURPLE=Object.freeze(ne.fromCssColorString("#9370DB"));ne.MEDIUMSEAGREEN=Object.freeze(ne.fromCssColorString("#3CB371"));ne.MEDIUMSLATEBLUE=Object.freeze(ne.fromCssColorString("#7B68EE"));ne.MEDIUMSPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FA9A"));ne.MEDIUMTURQUOISE=Object.freeze(ne.fromCssColorString("#48D1CC"));ne.MEDIUMVIOLETRED=Object.freeze(ne.fromCssColorString("#C71585"));ne.MIDNIGHTBLUE=Object.freeze(ne.fromCssColorString("#191970"));ne.MINTCREAM=Object.freeze(ne.fromCssColorString("#F5FFFA"));ne.MISTYROSE=Object.freeze(ne.fromCssColorString("#FFE4E1"));ne.MOCCASIN=Object.freeze(ne.fromCssColorString("#FFE4B5"));ne.NAVAJOWHITE=Object.freeze(ne.fromCssColorString("#FFDEAD"));ne.NAVY=Object.freeze(ne.fromCssColorString("#000080"));ne.OLDLACE=Object.freeze(ne.fromCssColorString("#FDF5E6"));ne.OLIVE=Object.freeze(ne.fromCssColorString("#808000"));ne.OLIVEDRAB=Object.freeze(ne.fromCssColorString("#6B8E23"));ne.ORANGE=Object.freeze(ne.fromCssColorString("#FFA500"));ne.ORANGERED=Object.freeze(ne.fromCssColorString("#FF4500"));ne.ORCHID=Object.freeze(ne.fromCssColorString("#DA70D6"));ne.PALEGOLDENROD=Object.freeze(ne.fromCssColorString("#EEE8AA"));ne.PALEGREEN=Object.freeze(ne.fromCssColorString("#98FB98"));ne.PALETURQUOISE=Object.freeze(ne.fromCssColorString("#AFEEEE"));ne.PALEVIOLETRED=Object.freeze(ne.fromCssColorString("#DB7093"));ne.PAPAYAWHIP=Object.freeze(ne.fromCssColorString("#FFEFD5"));ne.PEACHPUFF=Object.freeze(ne.fromCssColorString("#FFDAB9"));ne.PERU=Object.freeze(ne.fromCssColorString("#CD853F"));ne.PINK=Object.freeze(ne.fromCssColorString("#FFC0CB"));ne.PLUM=Object.freeze(ne.fromCssColorString("#DDA0DD"));ne.POWDERBLUE=Object.freeze(ne.fromCssColorString("#B0E0E6"));ne.PURPLE=Object.freeze(ne.fromCssColorString("#800080"));ne.RED=Object.freeze(ne.fromCssColorString("#FF0000"));ne.ROSYBROWN=Object.freeze(ne.fromCssColorString("#BC8F8F"));ne.ROYALBLUE=Object.freeze(ne.fromCssColorString("#4169E1"));ne.SADDLEBROWN=Object.freeze(ne.fromCssColorString("#8B4513"));ne.SALMON=Object.freeze(ne.fromCssColorString("#FA8072"));ne.SANDYBROWN=Object.freeze(ne.fromCssColorString("#F4A460"));ne.SEAGREEN=Object.freeze(ne.fromCssColorString("#2E8B57"));ne.SEASHELL=Object.freeze(ne.fromCssColorString("#FFF5EE"));ne.SIENNA=Object.freeze(ne.fromCssColorString("#A0522D"));ne.SILVER=Object.freeze(ne.fromCssColorString("#C0C0C0"));ne.SKYBLUE=Object.freeze(ne.fromCssColorString("#87CEEB"));ne.SLATEBLUE=Object.freeze(ne.fromCssColorString("#6A5ACD"));ne.SLATEGRAY=Object.freeze(ne.fromCssColorString("#708090"));ne.SLATEGREY=ne.SLATEGRAY;ne.SNOW=Object.freeze(ne.fromCssColorString("#FFFAFA"));ne.SPRINGGREEN=Object.freeze(ne.fromCssColorString("#00FF7F"));ne.STEELBLUE=Object.freeze(ne.fromCssColorString("#4682B4"));ne.TAN=Object.freeze(ne.fromCssColorString("#D2B48C"));ne.TEAL=Object.freeze(ne.fromCssColorString("#008080"));ne.THISTLE=Object.freeze(ne.fromCssColorString("#D8BFD8"));ne.TOMATO=Object.freeze(ne.fromCssColorString("#FF6347"));ne.TURQUOISE=Object.freeze(ne.fromCssColorString("#40E0D0"));ne.VIOLET=Object.freeze(ne.fromCssColorString("#EE82EE"));ne.WHEAT=Object.freeze(ne.fromCssColorString("#F5DEB3"));ne.WHITE=Object.freeze(ne.fromCssColorString("#FFFFFF"));ne.WHITESMOKE=Object.freeze(ne.fromCssColorString("#F5F5F5"));ne.YELLOW=Object.freeze(ne.fromCssColorString("#FFFF00"));ne.YELLOWGREEN=Object.freeze(ne.fromCssColorString("#9ACD32"));ne.TRANSPARENT=Object.freeze(new ne(0,0,0,0));var z=ne;function EA(e,t,n,i){e=y(e,1),t=y(t,1),n=y(n,1),i=y(i,1),this.value=new Uint8Array([z.floatToByte(e),z.floatToByte(t),z.floatToByte(n),z.floatToByte(i)])}Object.defineProperties(EA.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});EA.fromColor=function(e){return new EA(e.red,e.green,e.blue,e.alpha)};EA.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};EA.equals=function(e,t){return e===t||l(e)&&l(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]};var It=EA;function SA(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(SA.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}});SA.clone=function(e){if(!!l(e))return new SA(e._format,e._datatype,e._width,e._height,e._buffer)};SA.prototype.clone=function(){return SA.clone(this)};var DI=SA;function wA(e){this._value=e,this._valueType=zi.getPointType(e)}Object.defineProperties(wA.prototype,{value:{get:function(){return this._value}}});wA.prototype.findTimeInterval=function(e){};wA.prototype.wrapTime=function(e){return 0};wA.prototype.clampTime=function(e){return 0};wA.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var vA=wA;var DS={},MDe=new h,lJ=new h,uJ=new h,fJ=new h,dJ=new gi;DS.validOutline=function(e){let n=gi.fromPoints(e,dJ).halfAxes,i=Q.getColumn(n,0,lJ),o=Q.getColumn(n,1,uJ),r=Q.getColumn(n,2,fJ),s=h.magnitude(i),a=h.magnitude(o),c=h.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};DS.computeProjectTo2DArguments=function(e,t,n,i){let o=gi.fromPoints(e,dJ),r=o.halfAxes,s=Q.getColumn(r,0,lJ),a=Q.getColumn(r,1,uJ),c=Q.getColumn(r,2,fJ),u=h.magnitude(s),f=h.magnitude(a),d=h.magnitude(c),p=Math.min(u,f,d);if(u===0&&(f===0||d===0)||f===0&&d===0)return!1;let _,m;return(p===f||p===d)&&(_=s),p===u?_=a:p===d&&(m=a),(p===u||p===f)&&(m=c),h.normalize(_,n),h.normalize(m,i),h.clone(o.center,t),!0};function hJ(e,t,n,i,o){let r=h.subtract(e,t,MDe),s=h.dot(n,r),a=h.dot(i,r);return G.fromElements(s,a,o)}DS.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=hJ(i[r],e,t,n);return o}};DS.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return hJ(i,e,t,n,o)}};var B_=DS;function u5(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,u=n,f=Math.sin(2*u),d=Math.sin(4*u),p=Math.sin(6*u),_=Math.sin(8*u),m=Math.sin(10*u),x=Math.sin(12*u);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*u-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*f+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*d-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*_-(693*a/1310720+6237*c/5242880)*m+1001*c/8388608*x)}function BDe(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,u=c*c,f=u*c,d=f*c,p=d*c,_=p*c,m=Math.sin(2*i),x=Math.cos(2*i),C=Math.sin(4*i),A=Math.cos(4*i),T=Math.sin(6*i),b=Math.cos(6*i),S=Math.sin(8*i),w=Math.cos(8*i),D=Math.sin(10*i),O=Math.cos(10*i),I=Math.sin(12*i);return i+i*c/4+7*i*u/64+15*i*f/256+579*i*d/16384+1515*i*p/65536+16837*i*_/1048576+(3*i*u/16+45*i*f/256-i*(32*o-561)*d/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*_/5242880)*x+(21*i*f/256+483*i*d/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*_/1048576)*A+(151*i*d/4096+4681*i*p/65536+1479*i*_/16384-453*r*_/32768)*b+(1097*i*p/65536+42783*i*_/1048576)*w+8011*i*_/1048576*O+(3*c/8+3*u/16+213*f/2048-3*o*f/64+255*d/4096-33*o*d/512+20861*p/524288-33*o*p/512+s*p/1024+28273*_/1048576-471*o*_/8192+9*s*_/4096)*m+(21*u/256+21*f/256+533*d/8192-21*o*d/512+197*p/4096-315*o*p/4096+584039*_/16777216-12517*o*_/131072+7*s*_/2048)*C+(151*f/6144+151*d/4096+5019*p/131072-453*o*p/16384+26965*_/786432-8607*o*_/131072)*T+(1097*d/131072+1097*p/65536+225797*_/10485760-1097*o*_/65536)*S+(8011*p/2621440+8011*_/1048576)*D+293393*_/251658240*I}function DA(e,t){if(e===0)return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)));let n=e*Math.sin(t);return Math.log(Math.tan(.5*(R.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function LDe(e,t,n,i,o){let r=DA(e._ellipticity,n),s=DA(e._ellipticity,o);return Math.atan2(R.negativePiToPi(i-t),s-r)}function NDe(e,t,n,i,o,r,s){let a=e._heading,c=r-i,u=0;if(R.equalsEpsilon(Math.abs(a),R.PI_OVER_TWO,R.EPSILON8))if(t===n)u=t*Math.cos(o)*R.negativePiToPi(c);else{let f=Math.sin(o);u=t*Math.cos(o)*R.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{let f=u5(e._ellipticity,t,o);u=(u5(e._ellipticity,t,s)-f)/Math.cos(a)}return Math.abs(u)}var FDe=new h,l5=new h;function mJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,l5),FDe),r=h.normalize(i.cartographicToCartesian(n,l5),l5),s=i.maximumRadius,a=i.minimumRadius,c=s*s,u=a*a;e._ellipticitySquared=(c-u)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=me.clone(t,e._start),e._start.height=0,e._end=me.clone(n,e._end),e._end.height=0,e._heading=LDe(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=NDe(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function pJ(e,t,n,i,o,r){if(n===0)return me.clone(e,r);let s=o*o,a,c,u;if(Math.abs(R.PI_OVER_TWO-Math.abs(t))>R.EPSILON8){let f=u5(o,i,e.latitude),d=n*Math.cos(t),p=f+d;c=BDe(p,o,i);let _=DA(o,e.latitude),m=DA(o,c);u=Math.tan(t)*(m-_),a=R.negativePiToPi(e.longitude+u)}else{c=e.latitude;let f;if(o===0)f=i*Math.cos(e.latitude);else{let d=Math.sin(e.latitude);f=i*Math.cos(e.latitude)/Math.sqrt(1-s*d*d)}u=n/f,t>0?a=R.negativePiToPi(e.longitude+u):a=R.negativePiToPi(e.longitude-u)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new me(a,c,0)}function Km(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&mJ(this,e,t,i)}Object.defineProperties(Km.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return this._heading}}});Km.fromStartHeadingDistance=function(e,t,n,i,o){let r=y(i,re.WGS84),s=r.maximumRadius,a=r.minimumRadius,c=s*s,u=a*a,f=Math.sqrt((c-u)/c);t=R.negativePiToPi(t);let d=pJ(e,t,n,r.maximumRadius,f);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new Km(e,d,r):(o.setEndPoints(e,d),o)};Km.prototype.setEndPoints=function(e,t){mJ(this,e,t,this._ellipsoid)};Km.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};Km.prototype.interpolateUsingSurfaceDistance=function(e,t){return pJ(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};Km.prototype.findIntersectionWithLongitude=function(e,t){let n=this._ellipticity,i=this._heading,o=Math.abs(i),r=this._start;if(e=R.negativePiToPi(e),R.equalsEpsilon(Math.abs(e),Math.PI,R.EPSILON14)&&(e=R.sign(r.longitude)*Math.PI),l(t)||(t=new me),Math.abs(R.PI_OVER_TWO-o)<=R.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(R.equalsEpsilon(Math.abs(R.PI_OVER_TWO-o),R.PI_OVER_TWO,R.EPSILON8))return R.equalsEpsilon(e,r.longitude,R.EPSILON12)?void 0:(t.longitude=e,t.latitude=R.PI_OVER_TWO*R.sign(R.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(R.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),u=(1+a)/(1-a),f=r.latitude,d;do{d=f;let p=n*Math.sin(d),_=(1+p)/(1-p);f=2*Math.atan(c*Math.pow(_/u,n/2))-R.PI_OVER_TWO}while(!R.equalsEpsilon(f,d,R.EPSILON12));return t.longitude=e,t.latitude=f,t.height=0,t};Km.prototype.findIntersectionWithLatitude=function(e,t){let n=this._ellipticity,i=this._heading,o=this._start;if(R.equalsEpsilon(Math.abs(i),R.PI_OVER_TWO,R.EPSILON8))return;let r=DA(n,o.latitude),s=DA(n,e),a=Math.tan(i)*(s-r),c=R.negativePiToPi(o.longitude+a);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new me(c,e,0)};var za=Km;var RS=Zc(CJ());var MI={CLOCKWISE:Z.CW,COUNTER_CLOCKWISE:Z.CCW};MI.validate=function(e){return e===MI.CLOCKWISE||e===MI.COUNTER_CLOCKWISE};var fs=Object.freeze(MI);var QDe=new h,e1e=new h,L_={};L_.computeArea2D=function(e){let t=e.length,n=0;for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];n+=r.x*s.y-s.x*r.y}return n*.5};L_.computeWindingOrder2D=function(e){return L_.computeArea2D(e)>0?fs.COUNTER_CLOCKWISE:fs.CLOCKWISE};L_.triangulate=function(e,t){let n=G.packArray(e);return(0,RS.default)(n,t,2)};var EJ=new h,SJ=new h,wJ=new h,AJ=new h,TJ=new h,bJ=new h,$m=new h,vJ=new G,DJ=new G,PJ=new G,IA=new G;L_.computeSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let b=t[a];if(u[d++]=b.x,u[d++]=b.y,u[d++]=b.z,r){let S=i[a];f[p++]=S.x,f[p++]=S.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=C*C;for(;s.length>0;){let b=s.pop(),S=s.pop(),w=s.pop(),D=h.fromArray(u,w*3,EJ),O=h.fromArray(u,S*3,SJ),I=h.fromArray(u,b*3,wJ),L,N,g;r&&(L=G.fromArray(f,w*2,vJ),N=G.fromArray(f,S*2,DJ),g=G.fromArray(f,b*2,PJ));let E=h.multiplyByScalar(h.normalize(D,AJ),x,AJ),v=h.multiplyByScalar(h.normalize(O,TJ),x,TJ),P=h.multiplyByScalar(h.normalize(I,bJ),x,bJ),M=h.magnitudeSquared(h.subtract(E,v,$m)),V=h.magnitudeSquared(h.subtract(v,P,$m)),U=h.magnitudeSquared(h.subtract(P,E,$m)),k=Math.max(M,V,U),H,F,Y;k>A?M===k?(H=`${Math.min(w,S)} ${Math.max(w,S)}`,a=m[H],l(a)||(F=h.add(D,O,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(L,N,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(w,a,b),s.push(a,S,b)):V===k?(H=`${Math.min(S,b)} ${Math.max(S,b)}`,a=m[H],l(a)||(F=h.add(O,I,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(N,g,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(S,a,w),s.push(a,b,w)):U===k&&(H=`${Math.min(b,w)} ${Math.max(b,w)}`,a=m[H],l(a)||(F=h.add(I,D,$m),h.multiplyByScalar(F,.5,F),u.push(F.x,F.y,F.z),a=u.length/3-1,m[H]=a,r&&(Y=G.add(g,L,IA),G.multiplyByScalar(Y,.5,Y),f.push(Y.x,Y.y))),s.push(b,a,S),s.push(a,w,S)):(_.push(w),_.push(S),_.push(b))}let T={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(T.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(T)};var t1e=new me,n1e=new me,i1e=new me,p5=new me;L_.computeRhumbLineSubdivision=function(e,t,n,i,o){o=y(o,R.RADIANS_PER_DEGREE);let r=l(i),s=n.slice(0),a,c=t.length,u=new Array(c*3),f=new Array(c*2),d=0,p=0;for(a=0;a<c;a++){let w=t[a];if(u[d++]=w.x,u[d++]=w.y,u[d++]=w.z,r){let D=i[a];f[p++]=D.x,f[p++]=D.y}}let _=[],m={},x=e.maximumRadius,C=R.chordLength(o,x),A=new za(void 0,void 0,e),T=new za(void 0,void 0,e),b=new za(void 0,void 0,e);for(;s.length>0;){let w=s.pop(),D=s.pop(),O=s.pop(),I=h.fromArray(u,O*3,EJ),L=h.fromArray(u,D*3,SJ),N=h.fromArray(u,w*3,wJ),g,E,v;r&&(g=G.fromArray(f,O*2,vJ),E=G.fromArray(f,D*2,DJ),v=G.fromArray(f,w*2,PJ));let P=e.cartesianToCartographic(I,t1e),M=e.cartesianToCartographic(L,n1e),V=e.cartesianToCartographic(N,i1e);A.setEndPoints(P,M);let U=A.surfaceDistance;T.setEndPoints(M,V);let k=T.surfaceDistance;b.setEndPoints(V,P);let H=b.surfaceDistance,F=Math.max(U,k,H),Y,j,X,W,$;F>C?U===F?(Y=`${Math.min(O,D)} ${Math.max(O,D)}`,a=m[Y],l(a)||(j=A.interpolateUsingFraction(.5,p5),X=(P.height+M.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(g,E,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(O,a,w),s.push(a,D,w)):k===F?(Y=`${Math.min(D,w)} ${Math.max(D,w)}`,a=m[Y],l(a)||(j=T.interpolateUsingFraction(.5,p5),X=(M.height+V.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(E,v,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(D,a,O),s.push(a,w,O)):H===F&&(Y=`${Math.min(w,O)} ${Math.max(w,O)}`,a=m[Y],l(a)||(j=b.interpolateUsingFraction(.5,p5),X=(V.height+P.height)*.5,W=h.fromRadians(j.longitude,j.latitude,X,e,$m),u.push(W.x,W.y,W.z),a=u.length/3-1,m[Y]=a,r&&($=G.add(v,g,IA),G.multiplyByScalar($,.5,$),f.push($.x,$.y))),s.push(w,a,D),s.push(a,O,D)):(_.push(O),_.push(D),_.push(w))}let S={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})},indices:_,primitiveType:Le.TRIANGLES};return r&&(S.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),new ct(S)};L_.scaleToGeodeticHeight=function(e,t,n,i){n=y(n,re.WGS84);let o=QDe,r=e1e;if(t=y(t,0),i=y(i,!0),l(e)){let s=e.length;for(let a=0;a<s;a+=3)h.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),h.multiplyByScalar(o,t,o),h.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var ti=L_;function N_(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(N_.prototype,{length:{get:function(){return this._length}}});N_.prototype.enqueue=function(e){this._array.push(e),this._length++};N_.prototype.dequeue=function(){if(this._length===0)return;let e=this._array,t=this._offset,n=e[t];return e[t]=void 0,t++,t>10&&t*2>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n};N_.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};N_.prototype.contains=function(e){return this._array.indexOf(e)!==-1};N_.prototype.clear=function(){this._array.length=this._offset=this._length=0};N_.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var sl=N_;var cr={};cr.computeHierarchyPackedLength=function(e,t){let n=0,i=[e];for(;i.length>0;){let o=i.pop();if(!l(o))continue;n+=2;let r=o.positions,s=o.holes;if(l(r)&&r.length>0&&(n+=r.length*t.packedLength),l(s)){let a=s.length;for(let c=0;c<a;++c)i.push(s[c])}}return n};cr.packPolygonHierarchy=function(e,t,n,i){let o=[e];for(;o.length>0;){let r=o.pop();if(!l(r))continue;let s=r.positions,a=r.holes;if(t[n++]=l(s)?s.length:0,t[n++]=l(a)?a.length:0,l(s)){let c=s.length;for(let u=0;u<c;++u,n+=i.packedLength)i.pack(s[u],t,n)}if(l(a)){let c=a.length;for(let u=0;u<c;++u)o.push(a[u])}}return n};cr.unpackPolygonHierarchy=function(e,t,n){let i=e[t++],o=e[t++],r=new Array(i),s=o>0?new Array(o):void 0;for(let a=0;a<i;++a,t+=n.packedLength)r[a]=n.unpack(e,t);for(let a=0;a<o;++a)s[a]=cr.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var Ay=new G;function MJ(e,t,n,i){return G.subtract(t,e,Ay),G.multiplyByScalar(Ay,n/i,Ay),G.add(e,Ay,Ay),[Ay.x,Ay.y]}var F_=new h;function o1e(e,t,n,i){return h.subtract(t,e,F_),h.multiplyByScalar(F_,n/i,F_),h.add(e,F_,F_),[F_.x,F_.y,F_.z]}cr.subdivideLineCount=function(e,t,n){let o=h.distance(e,t)/n,r=Math.max(0,Math.ceil(R.log2(o)));return Math.pow(2,r)};var _5=new me,g5=new me,r1e=new me,s1e=new h,IJ=new za;cr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,_5),r=e.cartesianToCartographic(n,g5),a=new za(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(R.log2(a)));return Math.pow(2,c)};cr.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=cr.subdivideLineCount(n,i,o),a=G.distance(e,t),c=a/s,u=r;u.length=s*2;let f=0;for(let d=0;d<s;d++){let p=MJ(e,t,d*c,a);u[f++]=p[0],u[f++]=p[1]}return u};cr.subdivideLine=function(e,t,n,i){let o=cr.subdivideLineCount(e,t,n),r=h.distance(e,t),s=r/o;l(i)||(i=[]);let a=i;a.length=o*3;let c=0;for(let u=0;u<o;u++){let f=o1e(e,t,u*s,r);a[c++]=f[0],a[c++]=f[1],a[c++]=f[2]}return a};cr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,_5),c=n.cartesianToCartographic(o,g5);IJ.setEndPoints(a,c);let u=IJ.surfaceDistance/r,f=Math.max(0,Math.ceil(R.log2(u))),d=Math.pow(2,f),p=G.distance(e,t),_=p/d,m=s;m.length=d*2;let x=0;for(let C=0;C<d;C++){let A=MJ(e,t,C*_,p);m[x++]=A[0],m[x++]=A[1]}return m};cr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,_5),s=e.cartesianToCartographic(n,g5),a=new za(r,s,e),c=a.surfaceDistance/i,u=Math.max(0,Math.ceil(R.log2(c))),f=Math.pow(2,u),d=a.surfaceDistance/f;l(o)||(o=[]);let p=o;p.length=f*3;let _=0;for(let m=0;m<f;m++){let x=a.interpolateUsingSurfaceDistance(m*d,r1e),C=e.cartographicToCartesian(x,s1e);p[_++]=C.x,p[_++]=C.y,p[_++]=C.z}return p};var a1e=new h,c1e=new h,l1e=new h,u1e=new h;cr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=y(i,re.WGS84);let r=a1e,s=c1e,a=l1e,c=u1e;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let u=e.attributes.position.values,f=u.length/2;for(let d=0;d<f;d+=3)h.fromArray(u,d,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=h.multiplyByScalar(r,n,s),s=h.add(c,s,s),u[d+f]=s.x,u[d+1+f]=s.y,u[d+2+f]=s.z,o&&(c=h.clone(a,c)),s=h.multiplyByScalar(r,t,s),s=h.add(c,s,s),u[d]=s.x,u[d+1]=s.y,u[d+2]=s.z}return e};cr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new sl;o.enqueue(e);let r,s,a;for(;o.length!==0;){let c=o.dequeue(),u=c.positions;if(t)for(a=u.length,r=0;r<a;r++)n.scaleToGeodeticSurface(u[r],u[r]);if(u=So(u,h.equalsEpsilon,!0),u.length<3)continue;let f=c.holes?c.holes.length:0;for(r=0;r<f;r++){let d=c.holes[r],p=d.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=So(p,h.equalsEpsilon,!0),p.length<3)continue;i.push(p);let _=0;for(l(d.holes)&&(_=d.holes.length),s=0;s<_;s++)o.enqueue(d.holes[s])}i.push(u)}return i};cr.polygonsFromHierarchy=function(e,t,n,i,o){let r=[],s=[],a=new sl;for(a.enqueue(e);a.length!==0;){let c=a.dequeue(),u=c.positions,f=c.holes,d,p;if(i)for(p=u.length,d=0;d<p;d++)o.scaleToGeodeticSurface(u[d],u[d]);if(t||(u=So(u,h.equalsEpsilon,!0)),u.length<3)continue;let _=n(u);if(!l(_))continue;let m=[],x=ti.computeWindingOrder2D(_);x===fs.CLOCKWISE&&(_.reverse(),u=u.slice().reverse());let C=u.slice(),A=l(f)?f.length:0,T=[],b;for(d=0;d<A;d++){let S=f[d],w=S.positions;if(i)for(p=w.length,b=0;b<p;++b)o.scaleToGeodeticSurface(w[b],w[b]);if(t||(w=So(w,h.equalsEpsilon,!0)),w.length<3)continue;let D=n(w);if(!l(D))continue;x=ti.computeWindingOrder2D(D),x===fs.CLOCKWISE&&(D.reverse(),w=w.slice().reverse()),T.push(w),m.push(C.length),C=C.concat(w),_=_.concat(D);let O=0;for(l(S.holes)&&(O=S.holes.length),b=0;b<O;b++)a.enqueue(S.holes[b])}r.push({outerRing:u,holes:T}),s.push({positions:C,positions2D:_,holes:m})}return{hierarchy:r,polygons:s}};var f1e=new G,d1e=new h,h1e=new Me,m1e=new Q;cr.computeBoundingRectangle=function(e,t,n,i,o){let r=Me.fromAxisAngle(e,i,h1e),s=Q.fromQuaternion(r,m1e),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,d=n.length;for(let p=0;p<d;++p){let _=h.clone(n[p],d1e);Q.multiplyByVector(s,_,_);let m=t(_,f1e);l(m)&&(a=Math.min(a,m.x),c=Math.max(c,m.x),u=Math.min(u,m.y),f=Math.max(f,m.y))}return o.x=a,o.y=u,o.width=c-a,o.height=f-u,o};cr.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=ti.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,u=l(n),f=u?n.positions:void 0;if(o){let d=c.length,p=new Array(d*3),_=0;for(let C=0;C<d;C++){let A=c[C];p[_++]=A.x,p[_++]=A.y,p[_++]=A.z}let m={attributes:{position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:Le.TRIANGLES};u&&(m.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:G.packArray(f)}));let x=new ct(m);return r.normal?Rn.computeNormal(x):x}if(s===Yt.GEODESIC)return ti.computeSubdivision(e,c,a,f,i);if(s===Yt.RHUMB)return ti.computeRhumbLineSubdivision(e,c,a,f,i)};var OJ=[],RJ=[],p1e=new h,_1e=new h;cr.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,u,f,d,p,_,m,x=e.length,C=0,A=0,T=l(t),b=T?t.positions:void 0;if(o)for(a=x*3*2,s=new Array(a*2),T&&(m=x*2*2,_=new Array(m*2)),c=0;c<x;c++)u=e[c],f=e[(c+1)%x],s[C]=s[C+a]=u.x,++C,s[C]=s[C+a]=u.y,++C,s[C]=s[C+a]=u.z,++C,s[C]=s[C+a]=f.x,++C,s[C]=s[C+a]=f.y,++C,s[C]=s[C+a]=f.z,++C,T&&(d=b[c],p=b[(c+1)%x],_[A]=_[A+m]=d.x,++A,_[A]=_[A+m]=d.y,++A,_[A]=_[A+m]=p.x,++A,_[A]=_[A+m]=p.y,++A);else{let I=R.chordLength(i,n.maximumRadius),L=0;if(r===Yt.GEODESIC)for(c=0;c<x;c++)L+=cr.subdivideLineCount(e[c],e[(c+1)%x],I);else if(r===Yt.RHUMB)for(c=0;c<x;c++)L+=cr.subdivideRhumbLineCount(n,e[c],e[(c+1)%x],I);for(a=(L+x)*3,s=new Array(a*2),T&&(m=(L+x)*2,_=new Array(m*2)),c=0;c<x;c++){u=e[c],f=e[(c+1)%x];let N,g;T&&(d=b[c],p=b[(c+1)%x]),r===Yt.GEODESIC?(N=cr.subdivideLine(u,f,I,RJ),T&&(g=cr.subdivideTexcoordLine(d,p,u,f,I,OJ))):r===Yt.RHUMB&&(N=cr.subdivideRhumbLine(n,u,f,I,RJ),T&&(g=cr.subdivideTexcoordRhumbLine(d,p,n,u,f,I,OJ)));let E=N.length;for(let v=0;v<E;++v,++C)s[C]=N[v],s[C+a]=N[v];if(s[C]=f.x,s[C+a]=f.x,++C,s[C]=f.y,s[C+a]=f.y,++C,s[C]=f.z,s[C+a]=f.z,++C,T){let v=g.length;for(let P=0;P<v;++P,++A)_[A]=g[P],_[A+m]=g[P];_[A]=p.x,_[A+m]=p.x,++A,_[A]=p.y,_[A+m]=p.y,++A}}}x=s.length;let S=Ne.createTypedArray(x/3,x-e.length*6),w=0;for(x/=6,c=0;c<x;c++){let I=c,L=I+1,N=I+x,g=N+1;u=h.fromArray(s,I*3,p1e),f=h.fromArray(s,L*3,_1e),!h.equalsEpsilon(u,f,R.EPSILON10,R.EPSILON10)&&(S[w++]=I,S[w++]=N,S[w++]=L,S[w++]=L,S[w++]=N,S[w++]=g)}let D={attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),indices:S,primitiveType:Le.TRIANGLES};return T&&(D.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:_})),new ct(D)};var Un=cr;var g1e=new h,y1e=new qe,x1e=new G,C1e=new G,A1e=new h,T1e=new h,b1e=new h,MS=new h,E1e=new h,S1e=new h,BJ=new Me,w1e=new Q,v1e=new Q,D1e=new h;function P1e(e,t,n,i,o,r,s,a,c){let u=e.positions,f=ti.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);let d=Ne.createTypedArray(u.length,f.length);d.set(f);let p=w1e;if(i!==0){let g=Me.fromAxisAngle(s,i,BJ);if(p=Q.fromQuaternion(g,p),t.tangent||t.bitangent){g=Me.fromAxisAngle(s,-i,BJ);let E=Q.fromQuaternion(g,v1e);a=h.normalize(Q.multiplyByVector(E,a,a),a),t.bitangent&&(c=h.normalize(h.cross(s,a,c),c))}}else p=Q.clone(Q.IDENTITY,p);let _=C1e;t.st&&(_.x=n.x,_.y=n.y);let m=u.length,x=m*3,C=new Float64Array(x),A=t.normal?new Float32Array(x):void 0,T=t.tangent?new Float32Array(x):void 0,b=t.bitangent?new Float32Array(x):void 0,S=t.st?new Float32Array(m*2):void 0,w=0,D=0,O=0,I=0,L=0;for(let g=0;g<m;g++){let E=u[g];if(C[w++]=E.x,C[w++]=E.y,C[w++]=E.z,t.st)if(l(o)&&o.positions.length===m)S[L++]=o.positions[g].x,S[L++]=o.positions[g].y;else{let v=Q.multiplyByVector(p,E,g1e),P=r(v,x1e);G.subtract(P,_,P);let M=R.clamp(P.x/n.width,0,1),V=R.clamp(P.y/n.height,0,1);S[L++]=M,S[L++]=V}t.normal&&(A[D++]=s.x,A[D++]=s.y,A[D++]=s.z),t.tangent&&(T[I++]=a.x,T[I++]=a.y,T[I++]=a.z),t.bitangent&&(b[O++]=c.x,b[O++]=c.y,b[O++]=c.z)}let N=new ln;return t.position&&(N.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C})),t.normal&&(N.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(N.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(N.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),t.st&&(N.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S})),new ct({attributes:N,indices:d,primitiveType:Le.TRIANGLES})}function Ty(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy,n=e.textureCoordinates,i=y(e.vertexFormat,Pe.DEFAULT);this._vertexFormat=Pe.clone(i),this._polygonHierarchy=t,this._stRotation=y(e.stRotation,0),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Un.computeHierarchyPackedLength(t,h)+Pe.packedLength+re.packedLength+(l(n)?Un.computeHierarchyPackedLength(n,G):1)+2}Ty.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new Ty(t)};Ty.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Un.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};var I1e=re.clone(re.UNIT_SPHERE),O1e=new Pe,R1e={polygonHierarchy:{}};Ty.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,I1e);t+=re.packedLength;let r=Pe.unpack(e,t,O1e);t+=Pe.packedLength;let s=e[t++],a=e[t]===-1?void 0:Un.unpackPolygonHierarchy(e,t,G);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new Ty(R1e)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};Ty.createGeometry=function(e){let t=e._vertexFormat,n=e._polygonHierarchy,i=e._stRotation,o=e._textureCoordinates,r=l(o),s=n.positions;if(s=So(s,h.equalsEpsilon,!0),s.length<3)return;let a=A1e,c=T1e,u=b1e,f=E1e,d=S1e;if(!B_.computeProjectTo2DArguments(s,MS,f,d))return;if(a=h.cross(f,d,a),a=h.normalize(a,a),!h.equalsEpsilon(MS,h.ZERO,R.EPSILON6)){let L=e._ellipsoid.geodeticSurfaceNormal(MS,D1e);h.dot(a,L)<0&&(a=h.negate(a,a),f=h.negate(f,f))}let _=B_.createProjectPointsTo2DFunction(MS,f,d),m=B_.createProjectPointTo2DFunction(MS,f,d);t.tangent&&(c=h.clone(f,c)),t.bitangent&&(u=h.clone(d,u));let x=Un.polygonsFromHierarchy(n,r,_,!1),C=x.hierarchy,A=x.polygons,T=function(L){return L},b=r?Un.polygonsFromHierarchy(o,!0,T,!1).polygons:void 0;if(C.length===0)return;s=C[0].outerRing;let S=oe.fromPoints(s),w=Un.computeBoundingRectangle(a,m,s,i,y1e),D=[];for(let L=0;L<A.length;L++){let N=new pt({geometry:P1e(A[L],t,w,i,r?b[L]:void 0,m,a,c,u)});D.push(N)}let O=Rn.combineInstances(D)[0];O.attributes.position.values=new Float64Array(O.attributes.position.values),O.indices=Ne.createTypedArray(O.attributes.position.values.length/3,O.indices);let I=O.attributes;return t.position||delete I.position,new ct({attributes:I,indices:O.indices,primitiveType:O.primitiveType,boundingSphere:S})};var BI=Ty;function M1e(e){let t=e.length,n=new Float64Array(t*3),i=Ne.createTypedArray(t,t*2),o=0,r=0;for(let a=0;a<t;a++){let c=e[a];n[o++]=c.x,n[o++]=c.y,n[o++]=c.z,i[r++]=a,i[r++]=(a+1)%t}let s=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n})});return new ct({attributes:s,indices:i,primitiveType:Le.LINES})}function by(e){e=y(e,y.EMPTY_OBJECT);let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Un.computeHierarchyPackedLength(t,h)+1}by.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions}};return new by(t)};by.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),t[n]=e.packedLength,t};var B1e={polygonHierarchy:{}};by.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new by(B1e)),n._polygonHierarchy=i,n.packedLength=o,n};by.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=So(n,h.equalsEpsilon,!0),n.length<3||!B_.validOutline(n))return;let o=Un.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let u=new pt({geometry:M1e(o[c])});r.push(u)}let s=Rn.combineInstances(r)[0],a=oe.fromPoints(t.positions);return new ct({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var ed=by;var L1e={ROUNDED:0,MITERED:1,BEVELED:2},Ii=Object.freeze(L1e);function N1e(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),u=c*a,f=Math.atan2(a,r),d=c*s,p=d*d,_=1-p,m=Math.sqrt(_),x=t/4,C=x*x,A=C*x,T=C*C,b=1+x-3*C/4+5*A/4-175*T/64,S=1-x+15*C/8-35*A/8,w=1-3*x+35*C/4,D=1-5*x,O=b*f-S*Math.sin(2*f)*x/2-w*Math.sin(4*f)*C/16-D*Math.sin(6*f)*A/48-Math.sin(8*f)*5*T/512,I=e._constants;I.a=n,I.b=i,I.f=o,I.cosineHeading=r,I.sineHeading=s,I.tanU=a,I.cosineU=c,I.sineU=u,I.sigma=f,I.sineAlpha=d,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=_,I.cosineAlpha=m,I.u2Over4=x,I.u4Over16=C,I.u6Over64=A,I.u8Over256=T,I.a0=b,I.a1=S,I.a2=w,I.a3=D,I.distanceRatio=O}function F1e(e,t){return e*t*(4+e*(4-3*t))/16}function LJ(e,t,n,i,o,r,s){let a=F1e(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function V1e(e,t,n,i,o,r,s){let a=(t-n)/t,c=r-i,u=Math.atan((1-a)*Math.tan(o)),f=Math.atan((1-a)*Math.tan(s)),d=Math.cos(u),p=Math.sin(u),_=Math.cos(f),m=Math.sin(f),x=d*_,C=d*m,A=p*m,T=p*_,b=c,S=R.TWO_PI,w=Math.cos(b),D=Math.sin(b),O,I,L,N,g;do{w=Math.cos(b),D=Math.sin(b);let F=C-T*w;L=Math.sqrt(_*_*D*D+F*F),I=A+x*w,O=Math.atan2(L,I);let Y;L===0?(Y=0,N=1):(Y=x*D/L,N=1-Y*Y),S=b,g=I-2*A/N,isFinite(g)||(g=0),b=c+LJ(a,Y,N,O,L,I,g)}while(Math.abs(b-S)>R.EPSILON12);let E=N*(t*t-n*n)/(n*n),v=1+E*(4096+E*(E*(320-175*E)-768))/16384,P=E*(256+E*(E*(74-47*E)-128))/1024,M=g*g,V=P*L*(g+P*(I*(2*M-1)-P*g*(4*L*L-3)*(4*M-3)/6)/4),U=n*v*(O-V),k=Math.atan2(_*D,C-T*w),H=Math.atan2(d*D,C*w-T);e._distance=U,e._startHeading=k,e._endHeading=H,e._uSquared=E}var k1e=new h,y5=new h;function NJ(e,t,n,i){let o=h.normalize(i.cartographicToCartesian(t,y5),k1e),r=h.normalize(i.cartographicToCartesian(n,y5),y5);V1e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=me.clone(t,e._start),e._end=me.clone(n,e._end),e._start.height=0,e._end.height=0,N1e(e)}function BS(e,t,n){let i=y(n,re.WGS84);this._ellipsoid=i,this._start=new me,this._end=new me,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&NJ(this,e,t,i)}Object.defineProperties(BS.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});BS.prototype.setEndPoints=function(e,t){NJ(this,e,t,this._ellipsoid)};BS.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};BS.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),u=Math.sin(6*i),f=Math.sin(8*i),d=i*i,p=i*d,_=n.u8Over256,m=n.u2Over4,x=n.u6Over64,C=n.u4Over16,A=2*p*_*o/3+i*(1-m+7*C/4-15*x/4+579*_/64-(C-15*x/4+187*_/16)*o-(5*x/4-115*_/16)*r-29*_*s/16)+(m/2-C+71*x/32-85*_/16)*a+(5*C/16-5*x/4+383*_/96)*c-d*((x-11*_/2)*a+5*_*c/2)+(29*x/96-29*_/16)*u+539*_*f/1536,T=Math.asin(Math.sin(A)*n.cosineAlpha),b=Math.atan(n.a/n.b*Math.tan(T));A=A-n.sigma;let S=Math.cos(2*n.sigma+A),w=Math.sin(A),D=Math.cos(A),O=n.cosineU*D,I=n.sineU*w,N=Math.atan2(w*n.sineHeading,O-I*n.cosineHeading)-LJ(n.f,n.sineAlpha,n.cosineSquaredAlpha,A,w,D,S);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=b,t.height=0,t):new me(this._start.longitude+N,b,0)};var td=BS;var yc={};yc.numberOfPoints=function(e,t,n){let i=h.distance(e,t);return Math.ceil(i/n)};yc.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var U1e=new me;yc.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,U1e).height}return i};var z1e=new B,H1e=new h,FJ=new h,G1e=new rn(h.UNIT_X,0),VJ=new h,W1e=new rn(h.UNIT_X,0),j1e=new h,q1e=new h,C5=[];function UJ(e,t,n){let i=C5;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var NI=new me,LI=new me,V_=new h,A5=new h,Y1e=new h,x5=new td,LS=new za;function X1e(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,A5),u=i.scaleToGeodeticSurface(t,Y1e),f=yc.numberOfPoints(e,t,n),d=i.cartesianToCartographic(c,NI),p=i.cartesianToCartographic(u,LI),_=UJ(f,o,r);x5.setEndPoints(d,p);let m=x5.surfaceDistance/f,x=a;d.height=o;let C=i.cartographicToCartesian(d,V_);h.pack(C,s,x),x+=3;for(let A=1;A<f;A++){let T=x5.interpolateUsingSurfaceDistance(A*m,LI);T.height=_[A],C=i.cartographicToCartesian(T,V_),h.pack(C,s,x),x+=3}return x}function K1e(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,NI),u=i.cartesianToCartographic(t,LI),f=yc.numberOfPointsRhumbLine(c,u,n);c.height=0,u.height=0;let d=UJ(f,o,r);LS.ellipsoid.equals(i)||(LS=new za(void 0,void 0,i)),LS.setEndPoints(c,u);let p=LS.surfaceDistance/f,_=a;c.height=o;let m=i.cartographicToCartesian(c,V_);h.pack(m,s,_),_+=3;for(let x=1;x<f;x++){let C=LS.interpolateUsingSurfaceDistance(x*p,LI);C.height=d[x],m=i.cartographicToCartesian(C,V_),h.pack(m,s,_),_+=3}return _}yc.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=y(t,B.IDENTITY);let o=B.inverseTransformation(t,z1e),r=B.multiplyByPoint(o,h.ZERO,H1e),s=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_Y,FJ),FJ),a=rn.fromPointNormal(r,s,G1e),c=h.normalize(B.multiplyByPointAsVector(o,h.UNIT_X,VJ),VJ),u=rn.fromPointNormal(r,c,W1e),f=1;n.push(h.clone(e[0]));let d=n[0],p=e.length;for(let _=1;_<p;++_){let m=e[_];if(rn.getPointDistance(u,d)<0||rn.getPointDistance(u,m)<0){let x=Ki.lineSegmentPlane(d,m,a,j1e);if(l(x)){let C=h.multiplyByScalar(s,5e-9,q1e);rn.getPointDistance(a,d)<0&&h.negate(C,C),n.push(h.add(x,C,new h)),i.push(f+1),h.negate(C,C),n.push(h.add(x,C,new h)),f=1}}n.push(h.clone(e[_])),f++,d=m}i.push(f)}return{positions:n,lengths:i}};yc.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let x=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let C=i.geodeticSurfaceNormal(x,V_);h.multiplyByScalar(C,o,C),h.add(x,C,x)}return[x.x,x.y,x.z]}let s=e.minDistance;if(!l(s)){let x=y(e.granularity,R.RADIANS_PER_DEGREE);s=R.chordLength(x,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=yc.numberOfPoints(t[c],t[c+1],s);let u=(a+1)*3,f=new Array(u),d=0;for(c=0;c<n-1;c++){let x=t[c],C=t[c+1],A=r?o[c]:o,T=r?o[c+1]:o;d=X1e(x,C,s,i,A,T,f,d)}C5.length=0;let p=t[n-1],_=i.cartesianToCartographic(p,NI);_.height=r?o[n-1]:o;let m=i.cartographicToCartesian(_,V_);return h.pack(m,f,u-3),f};var kJ=new me,$1e=new me;yc.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=y(e.ellipsoid,re.WGS84),o=y(e.height,0),r=Array.isArray(o);if(n<1)return[];if(n===1){let A=i.scaleToGeodeticSurface(t[0],A5);if(o=r?o[0]:o,o!==0){let T=i.geodeticSurfaceNormal(A,V_);h.multiplyByScalar(T,o,T),h.add(A,T,A)}return[A.x,A.y,A.z]}let s=y(e.granularity,R.RADIANS_PER_DEGREE),a=0,c,u=i.cartesianToCartographic(t[0],kJ),f;for(c=0;c<n-1;c++)f=i.cartesianToCartographic(t[c+1],$1e),a+=yc.numberOfPointsRhumbLine(u,f,s),u=me.clone(f,kJ);let d=(a+1)*3,p=new Array(d),_=0;for(c=0;c<n-1;c++){let A=t[c],T=t[c+1],b=r?o[c]:o,S=r?o[c+1]:o;_=K1e(A,T,s,i,b,S,p,_)}C5.length=0;let m=t[n-1],x=i.cartesianToCartographic(m,NI);x.height=r?o[n-1]:o;let C=i.cartographicToCartesian(x,V_);return h.pack(C,p,d-3),p};yc.generateCartesianArc=function(e){let t=yc.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};yc.generateCartesianRhumbArc=function(e){let t=yc.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=h.unpack(t,o*3);return i};var Oi=yc;var Vs=[new h,new h],Z1e=new h,J1e=new h,Q1e=new h,ePe=new h,tPe=new h,nPe=new h,iPe=new h,oPe=new h,rPe=new h,OA=new h,FI=new h,NS={},T5=new me;function sPe(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];T5=t.cartesianToCartographic(o,T5),n[i]=T5.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function b5(e,t,n,i){let o=e[0],r=e[1],s=h.angleBetween(o,r),a=Math.ceil(s/i),c=new Array(a),u;if(t===n){for(u=0;u<a;u++)c[u]=t;return c.push(n),c}let d=(n-t)/a;for(u=1;u<a;u++){let p=t+u*d;c[u]=p}return c[0]=t,c.push(n),c}var VI=new h,kI=new h;function aPe(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI),a=G.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var cPe=new h(-1,0,0),Ey=new B,lPe=new B,E5=new Q,uPe=Q.IDENTITY.clone(),fPe=new h,dPe=new se,zJ=new h;function Zm(e,t,n,i,o,r,s,a){let c=fPe,u=dPe;Ey=_t.eastNorthUpToFixedFrame(e,o,Ey),c=B.multiplyByPointAsVector(Ey,cPe,c),c=h.normalize(c,c);let f=aPe(c,t,e,o);E5=Q.fromRotationZ(f,E5),zJ.z=r,Ey=B.multiplyTransformation(Ey,B.fromRotationTranslation(E5,zJ,lPe),Ey);let d=uPe;d[0]=s;for(let p=0;p<a;p++)for(let _=0;_<n.length;_+=3)u=h.fromArray(n,_,u),u=Q.multiplyByVector(d,u,u),u=B.multiplyByPoint(Ey,u,u),i.push(u.x,u.y,u.z);return i}var hPe=new h;function S5(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=h.fromArray(e,a,hPe);i=Zm(c,t,n,i,o,r[a/3],s,1)}return i}function mPe(e,t){let n=e.length,i=new Array(n*6),o=0,r=t.x+t.width/2,s=t.y+t.height/2,a=e[0];i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s;for(let c=1;c<n;c++){a=e[c];let u=a.x-r,f=a.y-s;i[o++]=u,i[o++]=0,i[o++]=f,i[o++]=u,i[o++]=0,i[o++]=f}return a=e[0],i[o++]=a.x-r,i[o++]=0,i[o++]=a.y-s,i}function HJ(e,t){let n=e.length,i=new Array(n*3),o=0,r=t.x+t.width/2,s=t.y+t.height/2;for(let a=0;a<n;a++)i[o++]=e[a].x-r,i[o++]=0,i[o++]=e[a].y-s;return i}var GJ=new Me,WJ=new h,jJ=new Q;function qJ(e,t,n,i,o,r,s,a,c,u){let f=h.angleBetween(h.subtract(t,e,OA),h.subtract(n,e,FI)),d=i===Ii.BEVELED?0:Math.ceil(f/R.toRadians(5)),p;o?p=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,OA),f/(d+1),GJ),jJ):p=Q.fromQuaternion(Me.fromAxisAngle(e,f/(d+1),GJ),jJ);let _,m;if(t=h.clone(t,WJ),d>0){let x=u?2:1;for(let C=0;C<d;C++)t=Q.multiplyByVector(p,t,t),_=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,x)}else _=h.subtract(t,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(t,FI),s=Zm(m,_,a,s,r,c,1,1),n=h.clone(n,WJ),_=h.subtract(n,e,OA),_=h.normalize(_,_),o||(_=h.negate(_,_)),m=r.scaleToGeodeticSurface(n,FI),s=Zm(m,_,a,s,r,c,1,1);return s}NS.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];G.equals(r,s)||n.push(s)}return n};NS.angleIsGreaterThanPi=function(e,t,n,i){let o=new Fa(n,i),r=o.projectPointOntoPlane(h.add(n,e,VI),VI),s=o.projectPointOntoPlane(h.add(n,t,kI),kI);return s.x*r.y-s.y*r.x>=0};var pPe=new h,_Pe=new h;NS.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=sPe(e,r),a=i._granularity,c=i._cornerType,u=o?mPe(t,n):HJ(t,n),f=o?HJ(t,n):void 0,d=n.height/2,p=n.width/2,_=e.length,m=[],x=o?[]:void 0,C=Z1e,A=J1e,T=Q1e,b=ePe,S=tPe,w=nPe,D=iPe,O=oPe,I=rPe,L=e[0],N=e[1];b=r.geodeticSurfaceNormal(L,b),C=h.subtract(N,L,C),C=h.normalize(C,C),O=h.cross(b,C,O),O=h.normalize(O,O);let g=s[0],E=s[1];o&&(x=Zm(L,O,f,x,r,g+d,1,1)),I=h.clone(L,I),L=N,A=h.negate(C,A);let v,P;for(let U=1;U<_-1;U++){let k=o?2:1;if(N=e[U+1],L.equals(N)){Mt("Positions are too close and are considered equivalent with rounding error.");continue}C=h.subtract(N,L,C),C=h.normalize(C,C),T=h.add(C,A,T),T=h.normalize(T,T),b=r.geodeticSurfaceNormal(L,b);let H=h.multiplyByScalar(b,h.dot(C,b),pPe);h.subtract(C,H,H),h.normalize(H,H);let F=h.multiplyByScalar(b,h.dot(A,b),_Pe);if(h.subtract(A,F,F),h.normalize(F,F),!R.equalsEpsilon(Math.abs(h.dot(H,F)),1,R.EPSILON7)){T=h.cross(T,b,T),T=h.cross(b,T,T),T=h.normalize(T,T);let j=1/Math.max(.25,h.magnitude(h.cross(T,A,OA))),X=NS.angleIsGreaterThanPi(C,A,L,r);X?(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):(T=h.negate(T,T),m=Zm(L,T,u,m,r,E+d,j,k)),I=h.clone(D,I)):(S=h.add(L,h.multiplyByScalar(T,j*p,T),S),w=h.add(S,h.multiplyByScalar(O,-p,w),w),Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(w,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),O=h.cross(b,C,O),O=h.normalize(O,O),D=h.add(S,h.multiplyByScalar(O,-p,D),D),c===Ii.ROUNDED||c===Ii.BEVELED?qJ(S,w,D,c,X,r,m,u,E+d,o):m=Zm(L,T,u,m,r,E+d,j,k),I=h.clone(D,I)),A=h.negate(C,A)}else m=Zm(I,O,u,m,r,g+d,1,1),I=L;g=E,E=s[U+1],L=N}Vs[0]=h.clone(I,Vs[0]),Vs[1]=h.clone(L,Vs[1]),v=b5(Vs,g+d,E+d,a),P=Oi.generateArc({positions:Vs,granularity:a,ellipsoid:r}),m=S5(P,O,u,m,r,v,1),o&&(x=Zm(L,O,f,x,r,E+d,1,1)),_=m.length;let M=o?_+x.length:_,V=new Float64Array(M);return V.set(m),o&&V.set(x,_),V};var Sh=NS;var v5={},RA=new h,ZJ=new h,gPe=new h,YJ=new h,xc=[new h,new h],JJ=new h,QJ=new h,eQ=new h,yPe=new h,xPe=new h,CPe=new h,APe=new h,TPe=new h,bPe=new h,EPe=new h,XJ=new Me,KJ=new Q;function UI(e,t,n,i,o){let r=h.angleBetween(h.subtract(t,e,RA),h.subtract(n,e,ZJ)),s=i===Ii.BEVELED?1:Math.ceil(r/R.toRadians(5))+1,a=s*3,c=new Array(a);c[a-3]=n.x,c[a-2]=n.y,c[a-1]=n.z;let u;o?u=Q.fromQuaternion(Me.fromAxisAngle(h.negate(e,RA),r/s,XJ),KJ):u=Q.fromQuaternion(Me.fromAxisAngle(e,r/s,XJ),KJ);let f=0;t=h.clone(t,RA);for(let d=0;d<s;d++)t=Q.multiplyByVector(u,t,t),c[f++]=t.x,c[f++]=t.y,c[f++]=t.z;return c}function SPe(e){let t=JJ,n=QJ,i=eQ,o=e[1];n=h.fromArray(e[1],o.length-3,n),i=h.fromArray(e[0],0,i),t=h.midpoint(n,i,t);let r=UI(t,n,i,Ii.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=h.fromArray(a,a.length-3,n),i=h.fromArray(o,0,i),t=h.midpoint(n,i,t);let c=UI(t,n,i,Ii.ROUNDED,!1);return[r,c]}function $J(e,t,n,i){let o=RA;return i?o=h.add(e,t,o):(t=h.negate(t,t),o=h.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function w5(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=h.multiplyByScalar(t,n,RA),a=h.negate(s,ZJ),c=0,u=e.length-1;for(let f=0;f<e.length;f+=3){let d=h.fromArray(e,f,gPe),p=h.add(d,a,YJ);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let _=h.add(d,s,YJ);r[u--]=_.z,r[u--]=_.y,r[u--]=_.x}return i.push(o,r),i}v5.addAttribute=function(e,t,n,i){let o=t.x,r=t.y,s=t.z;l(n)&&(e[n]=o,e[n+1]=r,e[n+2]=s),l(i)&&(e[i]=s,e[i-1]=r,e[i-2]=o)};var wPe=new h,vPe=new h;v5.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=JJ,c=QJ,u=eQ,f=yPe,d=xPe,p=CPe,_=APe,m=TPe,x=bPe,C=EPe,A=[],T=s?[]:void 0,b=s?[]:void 0,S=n[0],w=n[1];c=h.normalize(h.subtract(w,S,c),c),a=i.geodeticSurfaceNormal(S,a),f=h.normalize(h.cross(a,c,f),f),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),_=h.clone(S,_),S=w,u=h.negate(c,u);let D,O=[],I,L=n.length;for(I=1;I<L-1;I++){a=i.geodeticSurfaceNormal(S,a),w=n[I+1],c=h.normalize(h.subtract(w,S,c),c),d=h.normalize(h.add(c,u,d),d);let g=h.multiplyByScalar(a,h.dot(c,a),wPe);h.subtract(c,g,g),h.normalize(g,g);let E=h.multiplyByScalar(a,h.dot(u,a),vPe);if(h.subtract(u,E,E),h.normalize(E,E),!R.equalsEpsilon(Math.abs(h.dot(g,E)),1,R.EPSILON7)){d=h.cross(d,a,d),d=h.cross(a,d,d),d=h.normalize(d,d);let P=o/Math.max(.25,h.magnitude(h.cross(d,u,RA))),M=Sh.angleIsGreaterThanPi(c,u,S,i);d=h.multiplyByScalar(d,P,d),M?(m=h.add(S,d,m),C=h.add(m,h.multiplyByScalar(f,o,C),C),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(x,p),f=h.normalize(h.cross(a,c,f),f),x=h.add(m,h.multiplyByScalar(f,o*2,x),x),_=h.add(m,h.multiplyByScalar(f,o,_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({leftPositions:UI(m,p,x,r,M)}):O.push({leftPositions:$J(S,h.negate(d,d),x,M)})):(x=h.add(S,d,x),C=h.add(x,h.negate(h.multiplyByScalar(f,o,C),C),C),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(C,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z)),p=h.clone(m,p),f=h.normalize(h.cross(a,c,f),f),m=h.add(x,h.negate(h.multiplyByScalar(f,o*2,m),m),m),_=h.add(x,h.negate(h.multiplyByScalar(f,o,_),_),_),r===Ii.ROUNDED||r===Ii.BEVELED?O.push({rightPositions:UI(x,p,m,r,M)}):O.push({rightPositions:$J(S,d,m,M)})),u=h.negate(c,u)}S=w}a=i.geodeticSurfaceNormal(S,a),xc[0]=h.clone(_,xc[0]),xc[1]=h.clone(S,xc[1]),D=Oi.generateArc({positions:xc,granularity:t,ellipsoid:i}),A=w5(D,f,o,A),s&&(T.push(f.x,f.y,f.z),b.push(a.x,a.y,a.z));let N;return r===Ii.ROUNDED&&(N=SPe(A)),{positions:A,corners:O,lefts:T,normals:b,endPositions:N}};var Ni=v5;var iQ=new h,oQ=new h,zI=new h,HI=new h,DPe=new h,rQ=new h,k_=new h,MA=new h;function sQ(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function nd(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,u=h.normalize(h.cross(n,t,k_),k_);r.normal&&Ni.addAttribute(s,t,i,o),r.tangent&&Ni.addAttribute(a,u,i,o),r.bitangent&&Ni.addAttribute(c,n,i,o)}function aQ(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new ln,u,f=0,d=0,p,_=0,m;for(p=0;p<i.length;p+=2)m=i[p].length-3,f+=m,_+=m*2,d+=i[p+1].length-3;for(f+=3,d+=3,p=0;p<o.length;p++){u=o[p];let J=o[p].leftPositions;l(J)?(m=J.length,f+=m,_+=m):(m=o[p].rightPositions.length,d+=m,_+=m)}let x=l(r),C;x&&(C=r[0].length-3,f+=C,d+=C,C/=3,_+=C*6);let A=f+d,T=new Float64Array(A),b=t.normal?new Float32Array(A):void 0,S=t.tangent?new Float32Array(A):void 0,w=t.bitangent?new Float32Array(A):void 0,D={normals:b,tangents:S,bitangents:w},O=0,I=A-1,L,N,g,E,v=iQ,P=oQ,M,V,U=C/2,k=Ne.createTypedArray(A/3,_),H=0;if(x){V=zI,M=HI;let J=r[0];for(v=h.fromArray(a,0,v),P=h.fromArray(s,0,P),p=0;p<U;p++)V=h.fromArray(J,(U-1-p)*3,V),M=h.fromArray(J,(U+p)*3,M),Ni.addAttribute(T,M,O),Ni.addAttribute(T,V,void 0,I),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}let F=0,Y=0,j=i[F++],X=i[F++];T.set(j,O),T.set(X,I-X.length+1),P=h.fromArray(s,Y,P);let W,$;for(m=X.length-3,p=0;p<m;p+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,p,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-p,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),N=O/3,E=N+1,L=(I-2)/3,g=L-1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;for(W=n.geodeticSurfaceNormal(h.fromArray(j,m,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m,MA),MA),v=h.normalize(h.add(W,$,v),v),Y+=3,p=0;p<o.length;p++){let J;u=o[p];let ce=u.leftPositions,he=u.rightPositions,ie,ae,ge=rQ,Se=zI,be=HI;if(v=h.fromArray(a,Y,v),l(ce)){for(nd(D,v,P,void 0,I,t),I-=3,ie=E,ae=g,J=0;J<ce.length/3;J++)ge=h.fromArray(ce,J*3,ge),k[H++]=ie,k[H++]=ae-J-1,k[H++]=ae-J,Ni.addAttribute(T,ge,void 0,I),Se=h.fromArray(T,(ae-J-1)*3,Se),be=h.fromArray(T,ie*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,void 0,I,t),I-=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,ae*3,Se),ge,Se),be=h.subtract(h.fromArray(T,(ae-J)*3,be),ge,be),P=h.normalize(h.add(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3}else{for(nd(D,v,P,O,void 0,t),O+=3,ie=g,ae=E,J=0;J<he.length/3;J++)ge=h.fromArray(he,J*3,ge),k[H++]=ie,k[H++]=ae+J,k[H++]=ae+J+1,Ni.addAttribute(T,ge,O),Se=h.fromArray(T,ie*3,Se),be=h.fromArray(T,(ae+J)*3,be),P=h.normalize(h.subtract(Se,be,P),P),nd(D,v,P,O,void 0,t),O+=3;ge=h.fromArray(T,ie*3,ge),Se=h.subtract(h.fromArray(T,(ae+J)*3,Se),ge,Se),be=h.subtract(h.fromArray(T,ae*3,be),ge,be),P=h.normalize(h.negate(h.add(be,Se,P),P),P),nd(D,v,P,void 0,I,t),I-=3}for(j=i[F++],X=i[F++],j.splice(0,3),X.splice(X.length-3,3),T.set(j,O),T.set(X,I-X.length+1),m=X.length-3,Y+=3,P=h.fromArray(s,Y,P),J=0;J<X.length;J+=3)W=n.geodeticSurfaceNormal(h.fromArray(j,J,k_),k_),$=n.geodeticSurfaceNormal(h.fromArray(X,m-J,MA),MA),v=h.normalize(h.add(W,$,v),v),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3;O-=3,I+=3}if(v=h.fromArray(a,a.length-3,v),nd(D,v,P,O,I,t),x){O+=3,I-=3,V=zI,M=HI;let J=r[1];for(p=0;p<U;p++)V=h.fromArray(J,(C-p-1)*3,V),M=h.fromArray(J,p*3,M),Ni.addAttribute(T,V,void 0,I),Ni.addAttribute(T,M,O),nd(D,v,P,O,I,t),E=O/3,N=E-1,g=(I-2)/3,L=g+1,k[H++]=L,k[H++]=N,k[H++]=g,k[H++]=g,k[H++]=N,k[H++]=E,O+=3,I-=3}if(c.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:T}),t.st){let J=new Float32Array(A/3*2),ce,he,ie=0;if(x){f/=3,d/=3;let ae=Math.PI/(C+1);he=1/(f-C+1),ce=1/(d-C+1);let ge,Se=C/2;for(p=Se+1;p<C+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=1;p<d-C+1;p++)J[ie++]=p*ce,J[ie++]=0;for(p=C;p>Se;p--)ge=R.PI_OVER_TWO-p*ae,J[ie++]=1-ce*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=Se;p>0;p--)ge=R.PI_OVER_TWO-ae*p,J[ie++]=1-he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge));for(p=f-C;p>0;p--)J[ie++]=p*he,J[ie++]=1;for(p=1;p<Se+1;p++)ge=R.PI_OVER_TWO+ae*p,J[ie++]=he*(1+Math.cos(ge)),J[ie++]=.5*(1+Math.sin(ge))}else{for(f/=3,d/=3,he=1/(f-1),ce=1/(d-1),p=0;p<d;p++)J[ie++]=p*ce,J[ie++]=0;for(p=f;p>0;p--)J[ie++]=(p-1)*he,J[ie++]=1}c.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:J})}return t.normal&&(c.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.normals})),t.tangent&&(c.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.tangents})),t.bitangent&&(c.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:D.bitangents})),{attributes:c,indices:k}}function PPe(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,u;if(t.normal||t.bitangent||t.tangent){let f=t.normal?new Float32Array(s*6):void 0,d=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,_=iQ,m=oQ,x=zI,C=HI,A=DPe,T=rQ,b=c;for(u=0;u<s;u+=3){let S=b+c;_=h.fromArray(n,u,_),m=h.fromArray(n,u+s,m),x=h.fromArray(n,(u+3)%s,x),m=h.subtract(m,_,m),x=h.subtract(x,_,x),C=h.normalize(h.cross(m,x,C),C),t.normal&&(Ni.addAttribute(f,C,S),Ni.addAttribute(f,C,S+3),Ni.addAttribute(f,C,b),Ni.addAttribute(f,C,b+3)),(t.tangent||t.bitangent)&&(T=h.fromArray(i,u,T),t.bitangent&&(Ni.addAttribute(p,T,S),Ni.addAttribute(p,T,S+3),Ni.addAttribute(p,T,b),Ni.addAttribute(p,T,b+3)),t.tangent&&(A=h.normalize(h.cross(T,C,A),A),Ni.addAttribute(d,A,S),Ni.addAttribute(d,A,S+3),Ni.addAttribute(d,A,b),Ni.addAttribute(d,A,b+3))),b+=6}if(t.normal){for(f.set(i),u=0;u<s;u+=3)f[u+s]=-i[u],f[u+s+1]=-i[u+1],f[u+s+2]=-i[u+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let S=e.tangent.values;d.set(S),d.set(S,s),e.tangent.values=d}}if(t.st){let f=e.st.values,d=new Float32Array(a*6);d.set(f),d.set(f,a);let p=a*2;for(let _=0;_<2;_++){for(d[p++]=f[0],d[p++]=f[1],u=2;u<a;u+=2){let m=f[u],x=f[u+1];d[p++]=m,d[p++]=x,d[p++]=m,d[p++]=x}d[p++]=f[0],d[p++]=f[1]}e.st.values=d}return e}function D5(e,t,n){n[t++]=e[0],n[t++]=e[1],n[t++]=e[2];for(let i=3;i<e.length;i+=3){let o=e[i],r=e[i+1],s=e[i+2];n[t++]=o,n[t++]=r,n[t++]=s,n[t++]=o,n[t++]=r,n[t++]=s}return n[t++]=e[0],n[t++]=e[1],n[t++]=e[2],n}function IPe(e,t){let n=new Pe({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=Ni.computePositions(e),r=aQ(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,u=r.indices,f=c.position.values,d=f.length,p=new Float64Array(d*6),_=new Float64Array(d);_.set(f);let m=new Float64Array(d*4);f=ti.scaleToGeodeticHeight(f,s,i),m=D5(f,0,m),_=ti.scaleToGeodeticHeight(_,a,i),m=D5(_,d*2,m),p.set(f),p.set(_,d),p.set(m,d*2),c.position.values=p,c=PPe(c,t);let x,C=d/3;if(e.shadowVolume){let L=c.normal.values;d=L.length;let N=new Float32Array(d*6);for(x=0;x<d;x++)L[x]=-L[x];N.set(L,d),N=D5(L,d*4,N),c.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let L=new Uint8Array(C*6);if(e.offsetAttribute===tn.TOP)L=L.fill(1,0,C).fill(1,C*2,C*4);else{let N=e.offsetAttribute===tn.NONE?0:1;L=L.fill(N)}c.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:L})}let A=u.length,T=C+C,b=Ne.createTypedArray(p.length/3,A*2+T*3);b.set(u);let S=A;for(x=0;x<A;x+=3){let L=u[x],N=u[x+1],g=u[x+2];b[S++]=g+C,b[S++]=N+C,b[S++]=L+C}let w,D,O,I;for(x=0;x<T;x+=2)w=x+T,D=w+T,O=w+1,I=D+1,b[S++]=w,b[S++]=D,b[S++]=O,b[S++]=O,b[S++]=D,b[S++]=I;return{attributes:c,indices:b}}var tQ=new h,FS=new h,ku=new me;function nQ(e,t,n,i,o,r){let s=h.subtract(t,e,tQ);h.normalize(s,s);let a=n.geodeticSurfaceNormal(e,FS),c=h.cross(s,a,tQ);h.multiplyByScalar(c,i,c);let u=o.latitude,f=o.longitude,d=r.latitude,p=r.longitude;h.add(e,c,FS),n.cartesianToCartographic(FS,ku);let _=ku.latitude,m=ku.longitude;u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),h.subtract(e,c,FS),n.cartesianToCartographic(FS,ku),_=ku.latitude,m=ku.longitude,u=Math.min(u,_),f=Math.min(f,m),d=Math.max(d,_),p=Math.max(p,m),o.latitude=u,o.longitude=f,r.latitude=d,r.longitude=p}var Vu=new h,VS=new h,al=new me,cl=new me;function cQ(e,t,n,i,o){e=sQ(e,t);let r=So(e,h.equalsEpsilon),s=r.length;if(s<2||n<=0)return new de;let a=n*.5;al.latitude=Number.POSITIVE_INFINITY,al.longitude=Number.POSITIVE_INFINITY,cl.latitude=Number.NEGATIVE_INFINITY,cl.longitude=Number.NEGATIVE_INFINITY;let c,u;if(i===Ii.ROUNDED){let p=r[0];h.subtract(p,r[1],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(p,Vu,VS),t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u)}for(let p=0;p<s-1;++p)nQ(r[p],r[p+1],t,a,al,cl);let f=r[s-1];h.subtract(f,r[s-2],Vu),h.normalize(Vu,Vu),h.multiplyByScalar(Vu,a,Vu),h.add(f,Vu,VS),nQ(f,VS,t,a,al,cl),i===Ii.ROUNDED&&(t.cartesianToCartographic(VS,ku),c=ku.latitude,u=ku.longitude,al.latitude=Math.min(al.latitude,c),al.longitude=Math.min(al.longitude,u),cl.latitude=Math.max(cl.latitude,c),cl.longitude=Math.max(cl.longitude,u));let d=l(o)?o:new de;return d.north=cl.latitude,d.south=al.latitude,d.east=cl.longitude,d.west=al.longitude,d}function Qm(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*h.packedLength+re.packedLength+Pe.packedLength+7}Qm.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var lQ=re.clone(re.UNIT_SPHERE),uQ=new Pe,Jm={positions:void 0,ellipsoid:lQ,vertexFormat:uQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Qm.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let m=0;m<i;++m,t+=h.packedLength)o[m]=h.unpack(e,t);let r=re.unpack(e,t,lQ);t+=re.packedLength;let s=Pe.unpack(e,t,uQ);t+=Pe.packedLength;let a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t++]===1,_=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._vertexFormat=Pe.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=u,n._cornerType=f,n._granularity=d,n._shadowVolume=p,n._offsetAttribute=_===-1?void 0:_,n):(Jm.positions=o,Jm.width=a,Jm.height=c,Jm.extrudedHeight=u,Jm.cornerType=f,Jm.granularity=d,Jm.shadowVolume=p,Jm.offsetAttribute=_===-1?void 0:_,new Qm(Jm))};Qm.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.positions,i=e.width,o=y(e.ellipsoid,re.WGS84),r=y(e.cornerType,Ii.ROUNDED);return cQ(n,o,i,r,t)};Qm.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=sQ(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c=e._vertexFormat,u={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},f;if(a)u.height=r,u.extrudedHeight=s,u.shadowVolume=e._shadowVolume,u.offsetAttribute=e._offsetAttribute,f=IPe(u,c);else{let _=Ni.computePositions(u);if(f=aQ(_,c,i),f.attributes.position.values=ti.scaleToGeodeticHeight(f.attributes.position.values,r,i),l(e._offsetAttribute)){let m=e._offsetAttribute===tn.NONE?0:1,x=f.attributes.position.values.length,C=new Uint8Array(x/3).fill(m);f.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}}let d=f.attributes,p=oe.fromVertices(d.position.values,void 0,3);return c.position||(f.attributes.position.values=void 0),new ct({attributes:d,indices:f.indices,primitiveType:Le.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Qm.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Qm({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Qm.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=cQ(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var BA=Qm;var fQ=new h,dQ=new h,OPe=new h;function RPe(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function hQ(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new ln,a,c=0,u=0,f,d=0,p;for(f=0;f<i.length;f+=2)p=i[f].length-3,c+=p,d+=p/3*4,u+=i[f+1].length-3;for(c+=3,u+=3,f=0;f<o.length;f++){a=o[f];let M=o[f].leftPositions;l(M)?(p=M.length,c+=p,d+=p/3*2):(p=o[f].rightPositions.length,u+=p,d+=p/3*2)}let _=l(r),m;_&&(m=r[0].length-3,c+=m,u+=m,m/=3,d+=m*4);let x=c+u,C=new Float64Array(x),A=0,T=x-1,b,S,w,D,O,I,L=m/2,N=Ne.createTypedArray(x/3,d+4),g=0;if(N[g++]=A/3,N[g++]=(T-2)/3,_){n.push(A/3),I=fQ,O=dQ;let M=r[0];for(f=0;f<L;f++)I=h.fromArray(M,(L-1-f)*3,I),O=h.fromArray(M,(L+f)*3,O),Ni.addAttribute(C,O,A),Ni.addAttribute(C,I,void 0,T),S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3}let E=0,v=i[E++],P=i[E++];for(C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,n.push(A/3,(T-2)/3),f=0;f<p;f+=3)S=A/3,D=S+1,b=(T-2)/3,w=b-1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;for(f=0;f<o.length;f++){let M;a=o[f];let V=a.leftPositions,U=a.rightPositions,k,H=OPe;if(l(V)){for(T-=3,k=w,n.push(D),M=0;M<V.length/3;M++)H=h.fromArray(V,M*3,H),N[g++]=k-M-1,N[g++]=k-M,Ni.addAttribute(C,H,void 0,T),T-=3;n.push(k-Math.floor(V.length/6)),t===Ii.BEVELED&&n.push((T-2)/3+1),A+=3}else{for(A+=3,k=D,n.push(w),M=0;M<U.length/3;M++)H=h.fromArray(U,M*3,H),N[g++]=k+M,N[g++]=k+M+1,Ni.addAttribute(C,H,A),A+=3;n.push(k+Math.floor(U.length/6)),t===Ii.BEVELED&&n.push(A/3-1),T-=3}for(v=i[E++],P=i[E++],v.splice(0,3),P.splice(P.length-3,3),C.set(v,A),C.set(P,T-P.length+1),p=P.length-3,M=0;M<P.length;M+=3)D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;A-=3,T+=3,n.push(A/3,(T-2)/3)}if(_){A+=3,T-=3,I=fQ,O=dQ;let M=r[1];for(f=0;f<L;f++)I=h.fromArray(M,(m-f-1)*3,I),O=h.fromArray(M,f*3,O),Ni.addAttribute(C,I,void 0,T),Ni.addAttribute(C,O,A),D=A/3,S=D-1,w=(T-2)/3,b=w+1,N[g++]=b,N[g++]=w,N[g++]=S,N[g++]=D,A+=3,T-=3;n.push(A/3)}else n.push(A/3,(T-2)/3);return N[g++]=A/3,N[g++]=(T-2)/3,s.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C}),{attributes:s,indices:N,wallIndices:n}}function MPe(e){let t=e.ellipsoid,n=Ni.computePositions(e),i=hQ(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,u=a.position.values,f=u.length,d=new Float64Array(f);d.set(u);let p=new Float64Array(f*2);if(u=ti.scaleToGeodeticHeight(u,r,t),d=ti.scaleToGeodeticHeight(d,s,t),p.set(u),p.set(d,f),a.position.values=p,f/=3,l(e.offsetAttribute)){let b=new Uint8Array(f*2);if(e.offsetAttribute===tn.TOP)b=b.fill(1,0,f);else{let S=e.offsetAttribute===tn.NONE?0:1;b=b.fill(S)}a.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let _,m=c.length,x=Ne.createTypedArray(p.length/3,(m+o.length)*2);x.set(c);let C=m;for(_=0;_<m;_+=2){let b=c[_],S=c[_+1];x[C++]=b+f,x[C++]=S+f}let A,T;for(_=0;_<o.length;_++)A=o[_],T=A+f,x[C++]=A,x[C++]=T;return{attributes:a,indices:x}}function kS(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.width,i=y(e.height,0),o=y(e.extrudedHeight,i);this._positions=t,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*h.packedLength+re.packedLength+6}kS.pack=function(e,t,n){n=y(n,0);let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=h.packedLength)h.pack(i[r],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=y(e._offsetAttribute,-1),t};var mQ=re.clone(re.UNIT_SPHERE),U_={positions:void 0,ellipsoid:mQ,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};kS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=h.packedLength)o[p]=h.unpack(e,t);let r=re.unpack(e,t,mQ);t+=re.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t];return l(n)?(n._positions=o,n._ellipsoid=re.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=u,n._granularity=f,n._offsetAttribute=d===-1?void 0:d,n):(U_.positions=o,U_.width=s,U_.height=a,U_.extrudedHeight=c,U_.cornerType=u,U_.granularity=f,U_.offsetAttribute=d===-1?void 0:d,new kS(U_))};kS.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=RPe(t,i);let o=So(t,h.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!R.equalsEpsilon(r,s,0,R.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},u;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,u=MPe(c);else{let p=Ni.computePositions(c);if(u=hQ(p,c.cornerType),u.attributes.position.values=ti.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let _=u.attributes.position.values.length,m=e._offsetAttribute===tn.NONE?0:1,x=new Uint8Array(_/3).fill(m);u.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}}let f=u.attributes,d=oe.fromVertices(f.position.values,void 0,3);return new ct({attributes:f,indices:u.indices,primitiveType:Le.LINES,boundingSphere:d,offsetAttribute:e._offsetAttribute})};var GI=kS;function BPe(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Mn=BPe;var P5,pQ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyNDBiMjBhOS1jZWE5LTRmYWYtOGI3Yy05ZDg3ODBiZDZiZjUiLCJpZCI6MjU5LCJpYXQiOjE2NTkzNjE0MTJ9.tXPPvw93XpCGHG71h7s_mMLlWGCuAL55o8LC309hLAg",WI={};WI.defaultAccessToken=pQ;WI.defaultServer=new De({url:"https://api.cesium.com/"});WI.getDefaultTokenCredit=function(e){if(e===pQ){if(!l(P5)){let t=`<b> This application is using Cesium's default ion access token. Please assign <i>Cesium.Ion.defaultAccessToken</i> with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at <a href="https://cesium.com">https://cesium.com</a>.</b>`;P5=new Ht(t,!0)}return P5}};var wh=WI;function Cc(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:LPe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new fe("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");De.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new ei.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}l(Object.create)&&(Cc.prototype=Object.create(De.prototype),Cc.prototype.constructor=Cc);Cc.fromAssetId=function(e,t){let n=Cc._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Cc(i,n)})};Object.defineProperties(Cc.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Cc.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Cc.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(Ht.getIonCredit),i=wh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(Ht.clone(i)),n};Cc.prototype.clone=function(e){let t=y(this._ionRoot,this);return l(e)||(e=new Cc(t._ionEndpoint,t._ionEndpointResource)),e=De.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Cc.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return De.prototype.fetchImage.call(this,e)};Cc.prototype._makeRequest=function(e){return this._isExternal||new ei.default(this.url).authority()!==this._ionEndpointDomain?De.prototype._makeRequest.call(this,e):(l(e.headers)||(e.headers={}),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,De.prototype._makeRequest.call(this,e))};Cc._createEndpointResource=function(e,t){t=y(t,y.EMPTY_OBJECT);let n=y(t.server,wh.defaultServer),i=y(t.accessToken,wh.defaultAccessToken);n=De.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),n.getDerivedResource(o)};function LPe(e,t){let n=y(e._ionRoot,e),i=n._ionEndpointResource,o=typeof Image<"u";return!l(t)||t.statusCode!==401&&!(o&&t.target instanceof Image)?Promise.resolve(!1):(l(n._pendingPromise)||(n._pendingPromise=i.fetchJson().then(function(r){return n._ionEndpoint=r,r}).finally(function(r){return n._pendingPromise=void 0,r})),n._pendingPromise.then(function(r){return e._ionEndpoint=r,!0}))}var vh=Cc;function NPe(e){return e=y(e,y.EMPTY_OBJECT),new hI({url:vh.fromAssetId(1),requestVertexNormals:y(e.requestVertexNormals,!1),requestWaterMask:y(e.requestWaterMask,!1)})}var jI=NPe;function Uu(e){this.planes=y(e,[])}var US=[new h,new h,new h];h.clone(h.UNIT_X,US[0]);h.clone(h.UNIT_Y,US[1]);h.clone(h.UNIT_Z,US[2]);var z_=new h,FPe=new h,_Q=new rn(new h(1,0,0),0);Uu.fromBoundingSphere=function(e,t){l(t)||(t=new Uu);let n=US.length,i=t.planes;i.length=2*n;let o=e.center,r=e.radius,s=0;for(let a=0;a<n;++a){let c=US[a],u=i[s],f=i[s+1];l(u)||(u=i[s]=new se),l(f)||(f=i[s+1]=new se),h.multiplyByScalar(c,-r,z_),h.add(o,z_,z_),u.x=c.x,u.y=c.y,u.z=c.z,u.w=-h.dot(c,z_),h.multiplyByScalar(c,r,z_),h.add(o,z_,z_),f.x=-c.x,f.y=-c.y,f.z=-c.z,f.w=-h.dot(h.negate(c,FPe),z_),s+=2}return t};Uu.prototype.computeVisibility=function(e){let t=this.planes,n=!1;for(let i=0,o=t.length;i<o;++i){let r=e.intersectPlane(rn.fromCartesian4(t[i],_Q));if(r===Zt.OUTSIDE)return Zt.OUTSIDE;r===Zt.INTERSECTING&&(n=!0)}return n?Zt.INTERSECTING:Zt.INSIDE};Uu.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===Uu.MASK_OUTSIDE||t===Uu.MASK_INSIDE)return t;let n=Uu.MASK_INSIDE,i=this.planes;for(let o=0,r=i.length;o<r;++o){let s=o<31?1<<o:0;if(o<31&&(t&s)===0)continue;let a=e.intersectPlane(rn.fromCartesian4(i[o],_Q));if(a===Zt.OUTSIDE)return Uu.MASK_OUTSIDE;a===Zt.INTERSECTING&&(n|=s)}return n};Uu.MASK_OUTSIDE=4294967295;Uu.MASK_INSIDE=0;Uu.MASK_INDETERMINATE=2147483647;var da=Uu;function LA(e){e=y(e,y.EMPTY_OBJECT),this._callback=e.callback,this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._width=e.width,this._height=e.height;let t=Math.max(this._width,this._height);this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,t,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e;let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(LA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});LA.prototype.requestTileGeometry=function(e,t,n,i){let o=this._callback(e,t,n);if(!l(o))return;let r=this._width,s=this._height;return Promise.resolve(o).then(function(a){let c=a;return Array.isArray(c)&&(c=new Float64Array(c)),new ka({buffer:c,width:r,height:s})})};LA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};LA.prototype.getTileDataAvailable=function(e,t,n){};LA.prototype.loadTileDataAvailability=function(e,t,n){};var gQ=LA;var yQ={};yQ.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,u=new Float64Array(c*3),f,d=0,p=0,_=o?a*3:0,m=o?(a+i)*3:i*3;for(f=0;f<i;f++){let x=f/i*R.TWO_PI,C=Math.cos(x),A=Math.sin(x),T=C*n,b=A*n,S=C*t,w=A*t;u[p+_]=T,u[p+_+1]=b,u[p+_+2]=s,u[p+m]=S,u[p+m+1]=w,u[p+m+2]=r,p+=3,o&&(u[d++]=T,u[d++]=b,u[d++]=s,u[d++]=S,u[d++]=w,u[d++]=r)}return u};var NA=yQ;var I5=new G,VPe=new h,kPe=new h,UPe=new h,zPe=new h;function ep(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e.slices,128);this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Pe.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}ep.packedLength=Pe.packedLength+5;ep.pack=function(e,t,n){return n=y(n,0),Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=y(e._offsetAttribute,-1),t};var xQ=new Pe,FA={vertexFormat:xQ,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};ep.unpack=function(e,t,n){t=y(t,0);let i=Pe.unpack(e,t,xQ);t+=Pe.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Pe.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(FA.length=o,FA.topRadius=r,FA.bottomRadius=s,FA.slices=a,FA.offsetAttribute=c===-1?void 0:c,new ep(FA))};ep.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._vertexFormat,r=e._slices;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=r+r,a=r+s,c=s+s,u=NA.computePositions(t,n,i,r,!0),f=o.st?new Float32Array(c*2):void 0,d=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,_=o.bitangent?new Float32Array(c*3):void 0,m,x=o.normal||o.tangent||o.bitangent;if(x){let O=o.tangent||o.bitangent,I=0,L=0,N=0,g=Math.atan2(i-n,t),E=VPe;E.z=Math.sin(g);let v=Math.cos(g),P=UPe,M=kPe;for(m=0;m<r;m++){let V=m/r*R.TWO_PI,U=v*Math.cos(V),k=v*Math.sin(V);x&&(E.x=U,E.y=k,O&&(P=h.normalize(h.cross(h.UNIT_Z,E,P),P)),o.normal&&(d[I++]=E.x,d[I++]=E.y,d[I++]=E.z,d[I++]=E.x,d[I++]=E.y,d[I++]=E.z),o.tangent&&(p[L++]=P.x,p[L++]=P.y,p[L++]=P.z,p[L++]=P.x,p[L++]=P.y,p[L++]=P.z),o.bitangent&&(M=h.normalize(h.cross(E,P,M),M),_[N++]=M.x,_[N++]=M.y,_[N++]=M.z,_[N++]=M.x,_[N++]=M.y,_[N++]=M.z))}for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=-1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=-1,_[N++]=0);for(m=0;m<r;m++)o.normal&&(d[I++]=0,d[I++]=0,d[I++]=1),o.tangent&&(p[L++]=1,p[L++]=0,p[L++]=0),o.bitangent&&(_[N++]=0,_[N++]=1,_[N++]=0)}let C=12*r-12,A=Ne.createTypedArray(c,C),T=0,b=0;for(m=0;m<r-1;m++)A[T++]=b,A[T++]=b+2,A[T++]=b+3,A[T++]=b,A[T++]=b+3,A[T++]=b+1,b+=2;for(A[T++]=s-2,A[T++]=0,A[T++]=1,A[T++]=s-2,A[T++]=1,A[T++]=s-1,m=1;m<r-1;m++)A[T++]=s+m+1,A[T++]=s+m,A[T++]=s;for(m=1;m<r-1;m++)A[T++]=a,A[T++]=a+m,A[T++]=a+m+1;let S=0;if(o.st){let O=Math.max(n,i);for(m=0;m<c;m++){let I=h.fromArray(u,m*3,zPe);f[S++]=(I.x+O)/(2*O),f[S++]=(I.y+O)/(2*O)}}let w=new ln;o.position&&(w.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:u})),o.normal&&(w.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})),o.tangent&&(w.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(w.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(w.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:f})),I5.x=t*.5,I5.y=Math.max(i,n);let D=new oe(h.ZERO,G.magnitude(I5));if(l(e._offsetAttribute)){t=u.length;let O=e._offsetAttribute===tn.NONE?0:1,I=new Uint8Array(t/3).fill(O);w.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new ct({attributes:w,indices:A,primitiveType:Le.TRIANGLES,boundingSphere:D,offsetAttribute:e._offsetAttribute})};var O5;ep.getUnitCylinder=function(){return l(O5)||(O5=ep.createGeometry(new ep({topRadius:1,bottomRadius:1,length:1,vertexFormat:Pe.POSITION_ONLY}))),O5};var qI=ep;var R5=new G;function VA(e){e=y(e,y.EMPTY_OBJECT);let t=e.length,n=e.topRadius,i=e.bottomRadius,o=y(e.slices,128),r=Math.max(y(e.numberOfVerticalLines,16),0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}VA.packedLength=6;VA.pack=function(e,t,n){return n=y(n,0),t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=y(e._offsetAttribute,-1),t};var Sy={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};VA.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(Sy.length=i,Sy.topRadius=o,Sy.bottomRadius=r,Sy.slices=s,Sy.numberOfVerticalLines=a,Sy.offsetAttribute=c===-1?void 0:c,new VA(Sy))};VA.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=NA.computePositions(t,n,i,o,!1),c=o*2,u;if(r>0){let x=Math.min(r,o);u=Math.round(o/x),c+=x}let f=Ne.createTypedArray(s,c*2),d=0,p;for(p=0;p<o-1;p++)f[d++]=p,f[d++]=p+1,f[d++]=p+o,f[d++]=p+1+o;if(f[d++]=o-1,f[d++]=0,f[d++]=o+o-1,f[d++]=o,r>0)for(p=0;p<o;p+=u)f[d++]=p,f[d++]=p+o;let _=new ln;_.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:a}),R5.x=t*.5,R5.y=Math.max(i,n);let m=new oe(h.ZERO,G.magnitude(R5));if(l(e._offsetAttribute)){t=a.length;let x=e._offsetAttribute===tn.NONE?0:1,C=new Uint8Array(t/3).fill(x);_.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}return new ct({attributes:_,indices:f,primitiveType:Le.LINES,boundingSphere:m,offsetAttribute:e._offsetAttribute})};var YI=VA;var HPe=1953029805,GPe=2917034100;function M5(e,t){if(M5.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new fe("The length of key must be greater than 0 and a multiple of 4.");let i=new DataView(t),o=i.getUint32(0,!0);if(o===HPe||o===GPe)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,u=n,f,d=8;for(;s<c;)for(d=(d+8)%24,f=d;s<c&&f<u;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(f,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(f+4,!0),!0),s+=8,f+=24;if(s<a)for(f>=u&&(d=(d+8)%24,f=d);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(f)),s++,f++}M5.passThroughDataForTesting=!1;var XI=M5;var B5=32767,WPe=new me,jPe=new h;function qPe(e,t,n,i,o){let r=e.length/3,s=e.subarray(0,r),a=e.subarray(r,2*r),c=e.subarray(2*r,3*r);Pn.zigZagDeltaDecode(s,a,c);let u=new Float64Array(e.length);for(let f=0;f<r;++f){let d=s[f],p=a[f],_=c[f],m=R.lerp(t.west,t.east,d/B5),x=R.lerp(t.south,t.north,p/B5),C=R.lerp(n,i,_/B5),A=me.fromRadians(m,x,C,WPe),T=o.cartographicToCartesian(A,jPe);h.pack(T,u,f*3)}return u}var KI=qPe;function CQ(e){this.proxy=e}CQ.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var AQ=CQ;function zl(e,t){e=y(e,0),this._near=e,t=y(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(zl.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}});zl.packedLength=2;zl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n]=e.far,t};zl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new zl),n.near=e[t++],n.far=e[t],n};zl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};zl.clone=function(e,t){if(!!l(e))return l(t)||(t=new zl),t.near=e.near,t.far=e.far,t};zl.prototype.clone=function(e){return zl.clone(this,e)};zl.prototype.equals=function(e){return zl.equals(this,e)};var Tt=zl;function zS(e,t){e=y(e,0),t=y(t,Number.MAX_VALUE),this.value=new Float32Array([e,t])}Object.defineProperties(zS.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});zS.fromDistanceDisplayCondition=function(e){return new zS(e.near,e.far)};zS.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Fn=zS;function id(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(id.prototype,{length:{get:function(){return this._length}},maximumLength:{get:function(){return this._maximumLength},set:function(e){if(l(e)){for(;this._length>e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}});id.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new id({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};id.prototype.reset=function(){this._length=0;let e=this._maximumLength;if(l(e))for(let t=0;t<e;t++)this._array[t]=void 0;else this._array.length=0};id.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)TQ(this,t)};id.prototype.insert=function(e){let t,n=this._maximumLength;if(l(n)){if(n===0)return;if(this._length===n){let o=this._array[0];if(this._comparator(e,o)<=0)return e;t=this.removeMinimum()}}let i=this._length;return this._array[i]=e,this._length++,TQ(this,i),t};id.prototype.removeMinimum=function(){let e=this._length;if(e===0)return;this._length--;let t=this._array[0];return e>=2&&(this._array[0]=this._array[e-1],bQ(this,0)),this._array[e-1]=void 0,t};id.prototype.removeMaximum=function(){let e=this._length;if(e===0)return;this._length--;let t;if(e<=2)t=this._array[e-1];else{let n=L5(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&bQ(this,n)}return this._array[e-1]=void 0,t};id.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};id.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[L5(this,1,2)?1:2]};function $I(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function HS(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function L5(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function TQ(e,t){if(t===0)return;let n=Math.floor(R.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=HS(e,t,i);for(o!==n&&($I(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(HS(e,t,r)!==o)break;$I(e,t,r),t=r}}function bQ(e,t){let n=e._length,i=Math.floor(R.log2(t+1))%2===0,o;for(;(o=2*t+1)<n;){let r=o,s=o+1;if(s<n){HS(e,s,r)===i&&(r=s);let a=2*o+1,c=Math.max(Math.min(n-a,4),0);for(let u=0;u<c;u++){let f=a+u;HS(e,f,r)===i&&(r=f)}}if(HS(e,r,t)===i&&($I(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);L5(e,r,a)===i&&$I(e,r,a)}t=r}}var EQ=id;function GS(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(GS.prototype,{length:{get:function(){return this._length}}});function YPe(e,t,n){this.item=e,this.previous=t,this.next=n}GS.prototype.add=function(e){let t=new YPe(e,this.tail,void 0);return l(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t};function SQ(e,t){l(t.previous)&&l(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):l(t.previous)?(t.previous.next=void 0,e.tail=t.previous):l(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}GS.prototype.remove=function(e){!l(e)||(SQ(this,e),--this._length)};GS.prototype.splice=function(e,t){if(e===t)return;SQ(this,t);let n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e};var ZI=GS;var yi=Zc(wQ());var XPe={LINEAR_NONE:yi.default.Easing.Linear.None,QUADRATIC_IN:yi.default.Easing.Quadratic.In,QUADRATIC_OUT:yi.default.Easing.Quadratic.Out,QUADRATIC_IN_OUT:yi.default.Easing.Quadratic.InOut,CUBIC_IN:yi.default.Easing.Cubic.In,CUBIC_OUT:yi.default.Easing.Cubic.Out,CUBIC_IN_OUT:yi.default.Easing.Cubic.InOut,QUARTIC_IN:yi.default.Easing.Quartic.In,QUARTIC_OUT:yi.default.Easing.Quartic.Out,QUARTIC_IN_OUT:yi.default.Easing.Quartic.InOut,QUINTIC_IN:yi.default.Easing.Quintic.In,QUINTIC_OUT:yi.default.Easing.Quintic.Out,QUINTIC_IN_OUT:yi.default.Easing.Quintic.InOut,SINUSOIDAL_IN:yi.default.Easing.Sinusoidal.In,SINUSOIDAL_OUT:yi.default.Easing.Sinusoidal.Out,SINUSOIDAL_IN_OUT:yi.default.Easing.Sinusoidal.InOut,EXPONENTIAL_IN:yi.default.Easing.Exponential.In,EXPONENTIAL_OUT:yi.default.Easing.Exponential.Out,EXPONENTIAL_IN_OUT:yi.default.Easing.Exponential.InOut,CIRCULAR_IN:yi.default.Easing.Circular.In,CIRCULAR_OUT:yi.default.Easing.Circular.Out,CIRCULAR_IN_OUT:yi.default.Easing.Circular.InOut,ELASTIC_IN:yi.default.Easing.Elastic.In,ELASTIC_OUT:yi.default.Easing.Elastic.Out,ELASTIC_IN_OUT:yi.default.Easing.Elastic.InOut,BACK_IN:yi.default.Easing.Back.In,BACK_OUT:yi.default.Easing.Back.Out,BACK_IN_OUT:yi.default.Easing.Back.InOut,BOUNCE_IN:yi.default.Easing.Bounce.In,BOUNCE_OUT:yi.default.Easing.Bounce.Out,BOUNCE_IN_OUT:yi.default.Easing.Bounce.InOut},Hr=Object.freeze(XPe);var KPe=new h,$Pe=new h,ZPe=new h,JPe=new h,QPe=new h,eIe=new h(1,1,1),vQ=Math.cos,DQ=Math.sin;function tp(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,eIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,64)),c=Math.round(y(e.slicePartitions,64)),u=y(e.vertexFormat,Pe.DEFAULT);this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Pe.clone(u),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}tp.packedLength=2*h.packedLength+Pe.packedLength+7;tp.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=y(e._offsetAttribute,-1),t};var PQ=new h,IQ=new h,OQ=new Pe,H_={radii:PQ,innerRadii:IQ,vertexFormat:OQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};tp.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,PQ);t+=h.packedLength;let o=h.unpack(e,t,IQ);t+=h.packedLength;let r=Pe.unpack(e,t,OQ);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=u,n._stackPartitions=f,n._slicePartitions=d,n._offsetAttribute=p===-1?void 0:p,n):(H_.minimumClock=s,H_.maximumClock=a,H_.minimumCone=c,H_.maximumCone=u,H_.stackPartitions=f,H_.slicePartitions=d,H_.offsetAttribute=p===-1?void 0:p,new tp(H_))};tp.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,u=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/R.TWO_PI),u=Math.round(u*Math.abs(s-r)/R.PI),c<2&&(c=2),u<2&&(u=2);let f,d,p=0,_=[r],m=[i];for(f=0;f<u;f++)_.push(r+f*(s-r)/(u-1));for(_.push(s),d=0;d<c;d++)m.push(i+d*(o-i)/(c-1));m.push(o);let x=_.length,C=m.length,A=0,T=1,b=n.x!==t.x||n.y!==t.y||n.z!==t.z,S=!1,w=!1,D=!1;b&&(T=2,r>0&&(S=!0,A+=c-1),s<Math.PI&&(w=!0,A+=c-1),(o-i)%R.TWO_PI?(D=!0,A+=(u-1)*2+1):A+=1);let O=C*x*T,I=new Float64Array(O*3),L=new Array(O).fill(!1),N=new Array(O).fill(!1),g=c*u*T,E=6*(g+A+1-(c+u)*T),v=Ne.createTypedArray(g,E),P=a.normal?new Float32Array(O*3):void 0,M=a.tangent?new Float32Array(O*3):void 0,V=a.bitangent?new Float32Array(O*3):void 0,U=a.st?new Float32Array(O*2):void 0,k=new Array(x),H=new Array(x);for(f=0;f<x;f++)k[f]=DQ(_[f]),H[f]=vQ(_[f]);let F=new Array(C),Y=new Array(C);for(d=0;d<C;d++)Y[d]=vQ(m[d]),F[d]=DQ(m[d]);for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=t.x*k[f]*Y[d],I[p++]=t.y*k[f]*F[d],I[p++]=t.z*H[f];let j=O/2;if(b)for(f=0;f<x;f++)for(d=0;d<C;d++)I[p++]=n.x*k[f]*Y[d],I[p++]=n.y*k[f]*F[d],I[p++]=n.z*H[f],L[j]=!0,f>0&&f!==x-1&&d!==0&&d!==C-1&&(N[j]=!0),j++;p=0;let X,W;for(f=1;f<x-2;f++)for(X=f*C,W=(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=W+d+1,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=X+d;if(b){let Oe=x*C;for(f=1;f<x-2;f++)for(X=Oe+f*C,W=Oe+(f+1)*C,d=1;d<C-2;d++)v[p++]=W+d,v[p++]=X+d,v[p++]=X+d+1,v[p++]=W+d,v[p++]=X+d+1,v[p++]=W+d+1}let $,J;if(b){if(S)for(J=x*C,f=1;f<C-2;f++)v[p++]=f,v[p++]=f+1,v[p++]=J+f+1,v[p++]=f,v[p++]=J+f+1,v[p++]=J+f;if(w)for($=x*C-C,J=x*C*T-C,f=1;f<C-2;f++)v[p++]=$+f+1,v[p++]=$+f,v[p++]=J+f,v[p++]=$+f+1,v[p++]=J+f,v[p++]=J+f+1}if(D){for(f=1;f<x-2;f++)J=C*x+C*f,$=C*f,v[p++]=J,v[p++]=$+C,v[p++]=$,v[p++]=J,v[p++]=J+C,v[p++]=$+C;for(f=1;f<x-2;f++)J=C*x+C*(f+1)-1,$=C*(f+1)-1,v[p++]=$+C,v[p++]=J,v[p++]=$,v[p++]=$+C,v[p++]=J+C,v[p++]=J}let ce=new ln;a.position&&(ce.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:I}));let he=0,ie=0,ae=0,ge=0,Se=O/2,be,Be=re.fromCartesian3(t),Ae=re.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(f=0;f<O;f++){be=L[f]?Ae:Be;let Oe=h.fromArray(I,f*3,KPe),Ge=be.geodeticSurfaceNormal(Oe,$Pe);if(N[f]&&h.negate(Ge,Ge),a.st){let ot=G.negate(Ge,QPe);U[he++]=Math.atan2(ot.y,ot.x)/R.TWO_PI+.5,U[he++]=Math.asin(Ge.z)/Math.PI+.5}if(a.normal&&(P[ie++]=Ge.x,P[ie++]=Ge.y,P[ie++]=Ge.z),a.tangent||a.bitangent){let ot=ZPe,nt=0,Tn;if(L[f]&&(nt=Se),!S&&f>=nt&&f<nt+C*2?Tn=h.UNIT_X:Tn=h.UNIT_Z,h.cross(Tn,Ge,ot),h.normalize(ot,ot),a.tangent&&(M[ae++]=ot.x,M[ae++]=ot.y,M[ae++]=ot.z),a.bitangent){let Zn=h.cross(Ge,ot,JPe);h.normalize(Zn,Zn),V[ge++]=Zn.x,V[ge++]=Zn.y,V[ge++]=Zn.z}}}a.st&&(ce.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:U})),a.normal&&(ce.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:P})),a.tangent&&(ce.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:M})),a.bitangent&&(ce.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:V}))}if(l(e._offsetAttribute)){let Oe=I.length,Ge=e._offsetAttribute===tn.NONE?0:1,ot=new Uint8Array(Oe/3).fill(Ge);ce.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:ot})}return new ct({attributes:ce,indices:v,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromEllipsoid(Be),offsetAttribute:e._offsetAttribute})};var V5;tp.getUnitEllipsoid=function(){return l(V5)||(V5=tp.createGeometry(new tp({radii:new h(1,1,1),vertexFormat:Pe.POSITION_ONLY}))),V5};var ks=tp;var tIe=new h(1,1,1),JI=Math.cos,QI=Math.sin;function kA(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.radii,tIe),n=y(e.innerRadii,t),i=y(e.minimumClock,0),o=y(e.maximumClock,R.TWO_PI),r=y(e.minimumCone,0),s=y(e.maximumCone,R.PI),a=Math.round(y(e.stackPartitions,10)),c=Math.round(y(e.slicePartitions,8)),u=Math.round(y(e.subdivisions,128));this._radii=h.clone(t),this._innerRadii=h.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=u,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}kA.packedLength=2*h.packedLength+8;kA.pack=function(e,t,n){return n=y(n,0),h.pack(e._radii,t,n),n+=h.packedLength,h.pack(e._innerRadii,t,n),n+=h.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=y(e._offsetAttribute,-1),t};var RQ=new h,MQ=new h,np={radii:RQ,innerRadii:MQ,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};kA.unpack=function(e,t,n){t=y(t,0);let i=h.unpack(e,t,RQ);t+=h.packedLength;let o=h.unpack(e,t,MQ);t+=h.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++],p=e[t];return l(n)?(n._radii=h.clone(i,n._radii),n._innerRadii=h.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=u,n._slicePartitions=f,n._subdivisions=d,n._offsetAttribute=p===-1?void 0:p,n):(np.minimumClock=r,np.maximumClock=s,np.minimumCone=a,np.maximumCone=c,np.stackPartitions=u,np.slicePartitions=f,np.subdivisions=d,np.offsetAttribute=p===-1?void 0:p,new kA(np))};kA.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=re.fromCartesian3(t),u=e._slicePartitions+1,f=e._stackPartitions+1;u=Math.round(u*Math.abs(o-i)/R.TWO_PI),f=Math.round(f*Math.abs(s-r)/R.PI),u<2&&(u=2),f<2&&(f=2);let d=0,p=1,_=n.x!==t.x||n.y!==t.y||n.z!==t.z,m=!1,x=!1;_&&(p=2,r>0&&(m=!0,d+=u),s<Math.PI&&(x=!0,d+=u));let C=a*p*(f+u),A=new Float64Array(C*3),T=2*(C+d-(u+f)*p),b=Ne.createTypedArray(C,T),S,w,D,O,I=0,L=new Array(f),N=new Array(f);for(S=0;S<f;S++)O=r+S*(s-r)/(f-1),L[S]=QI(O),N[S]=JI(O);let g=new Array(a),E=new Array(a);for(S=0;S<a;S++)D=i+S*(o-i)/(a-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<f;S++)for(w=0;w<a;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(L.length=a,N.length=a,S=0;S<a;S++)O=r+S*(s-r)/(a-1),L[S]=QI(O),N[S]=JI(O);for(g.length=u,E.length=u,S=0;S<u;S++)D=i+S*(o-i)/(u-1),g[S]=QI(D),E[S]=JI(D);for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=t.x*L[S]*E[w],A[I++]=t.y*L[S]*g[w],A[I++]=t.z*N[S];if(_)for(S=0;S<a;S++)for(w=0;w<u;w++)A[I++]=n.x*L[S]*E[w],A[I++]=n.y*L[S]*g[w],A[I++]=n.z*N[S];for(I=0,S=0;S<f*p;S++){let M=S*a;for(w=0;w<a-1;w++)b[I++]=M+w,b[I++]=M+w+1}let v=f*a*p;for(S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_)for(v=f*a*p+u*a,S=0;S<u;S++)for(w=0;w<a-1;w++)b[I++]=v+S+w*u,b[I++]=v+S+(w+1)*u;if(_){let M=f*a*p,V=M+a*u;if(m)for(S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S;if(x)for(M+=a*u-u,V+=a*u-u,S=0;S<u;S++)b[I++]=M+S,b[I++]=V+S}let P=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A})});if(l(e._offsetAttribute)){let M=A.length,V=e._offsetAttribute===tn.NONE?0:1,U=new Uint8Array(M/3).fill(V);P.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:U})}return new ct({attributes:P,indices:b,primitiveType:Le.LINES,boundingSphere:oe.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var zu=kA;function UA(e){e=y(e,y.EMPTY_OBJECT),this._tilingScheme=e.tilingScheme,l(this._tilingScheme)||(this._tilingScheme=new Xi({ellipsoid:y(e.ellipsoid,re.WGS84)})),this._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(this._tilingScheme.ellipsoid,64,this._tilingScheme.getNumberOfXTilesAtLevel(0)),this._errorEvent=new _e,this._readyPromise=Promise.resolve(!0)}Object.defineProperties(UA.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return!0}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});UA.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new ka({buffer:new Uint8Array(16*16),width:16,height:16}))};UA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};UA.prototype.getTileDataAvailable=function(e,t,n){};UA.prototype.loadTileDataAvailability=function(e,t,n){};var G_=UA;function k5(){this._removalFunctions=[]}k5.prototype.add=function(e,t,n){let i=e.addEventListener(t,n);this._removalFunctions.push(i);let o=this;return function(){i();let r=o._removalFunctions;r.splice(r.indexOf(i),1)}};k5.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var Gr=k5;var nIe={enableModelExperimental:!1},zA=nIe;var iIe={NONE:0,HOLD:1,EXTRAPOLATE:2},Hu=Object.freeze(iIe);function Dh(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._orthographicMatrix=new B}function BQ(e){(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far)&&(e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=B.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix))}Object.defineProperties(Dh.prototype,{projectionMatrix:{get:function(){return BQ(this),this._orthographicMatrix}}});var oIe=new h,rIe=new h,sIe=new h,U5=new h;Dh.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,oIe);h.normalize(f,f);let d=rIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=sIe;h.multiplyByScalar(f,a,p),h.add(d,p,p);let _=i[0];return l(_)||(_=i[0]=new se),_.x=f.x,_.y=f.y,_.z=f.z,_.w=-h.dot(f,p),h.multiplyByScalar(f,s,p),h.add(d,p,p),_=i[1],l(_)||(_=i[1]=new se),_.x=-f.x,_.y=-f.y,_.z=-f.z,_.w=-h.dot(h.negate(f,U5),p),h.multiplyByScalar(n,r,p),h.add(d,p,p),_=i[2],l(_)||(_=i[2]=new se),_.x=n.x,_.y=n.y,_.z=n.z,_.w=-h.dot(n,p),h.multiplyByScalar(n,o,p),h.add(d,p,p),_=i[3],l(_)||(_=i[3]=new se),_.x=-n.x,_.y=-n.y,_.z=-n.z,_.w=-h.dot(h.negate(n,U5),p),_=i[4],l(_)||(_=i[4]=new se),_.x=t.x,_.y=t.y,_.z=t.z,_.w=-h.dot(t,d),h.multiplyByScalar(t,u,p),h.add(e,p,p),_=i[5],l(_)||(_=i[5]=new se),_.x=-t.x,_.y=-t.y,_.z=-t.z,_.w=-h.dot(h.negate(t,U5),p),this._cullingVolume};Dh.prototype.getPixelDimensions=function(e,t,n,i,o){BQ(this);let r=this.right-this.left,s=this.top-this.bottom,a=i*r/e,c=i*s/t;return o.x=a,o.y=c,o};Dh.prototype.clone=function(e){return l(e)||(e=new Dh),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Dh.prototype.equals=function(e){return l(e)&&e instanceof Dh&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Dh.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Dh&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var Wr=Dh;function ll(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new Wr,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far}ll.packedLength=4;ll.pack=function(e,t,n){return n=y(n,0),t[n++]=e.width,t[n++]=e.aspectRatio,t[n++]=e.near,t[n]=e.far,t};ll.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new ll),n.width=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t],n};function wy(e){let t=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let n=1/e.aspectRatio;t.right=e.width*.5,t.left=-t.right,t.top=n*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}Object.defineProperties(ll.prototype,{projectionMatrix:{get:function(){return wy(this),this._offCenterFrustum.projectionMatrix}}});ll.prototype.computeCullingVolume=function(e,t,n){return wy(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};ll.prototype.getPixelDimensions=function(e,t,n,i,o){return wy(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};ll.prototype.clone=function(e){return l(e)||(e=new ll),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};ll.prototype.equals=function(e){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};ll.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof ll)?!1:(wy(this),wy(e),R.equalsEpsilon(this.width,e.width,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var Qt=ll;function Ph(e){e=y(e,y.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new da,this._perspectiveMatrix=new B,this._infinitePerspective=new B}function z5(e){let t=e.top,n=e.bottom,i=e.right,o=e.left,r=e.near,s=e.far;(t!==e._top||n!==e._bottom||o!==e._left||i!==e._right||r!==e._near||s!==e._far)&&(e._left=o,e._right=i,e._top=t,e._bottom=n,e._near=r,e._far=s,e._perspectiveMatrix=B.computePerspectiveOffCenter(o,i,n,t,r,s,e._perspectiveMatrix),e._infinitePerspective=B.computeInfinitePerspectiveOffCenter(o,i,n,t,r,e._infinitePerspective))}Object.defineProperties(Ph.prototype,{projectionMatrix:{get:function(){return z5(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return z5(this),this._infinitePerspective}}});var aIe=new h,cIe=new h,lIe=new h,uIe=new h;Ph.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,u=this.far,f=h.cross(t,n,aIe),d=cIe;h.multiplyByScalar(t,c,d),h.add(e,d,d);let p=lIe;h.multiplyByScalar(t,u,p),h.add(e,p,p);let _=uIe;h.multiplyByScalar(f,a,_),h.add(d,_,_),h.subtract(_,e,_),h.normalize(_,_),h.cross(_,n,_),h.normalize(_,_);let m=i[0];return l(m)||(m=i[0]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(f,s,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(n,_,_),h.normalize(_,_),m=i[1],l(m)||(m=i[1]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,r,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(f,_,_),h.normalize(_,_),m=i[2],l(m)||(m=i[2]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),h.multiplyByScalar(n,o,_),h.add(d,_,_),h.subtract(_,e,_),h.cross(_,f,_),h.normalize(_,_),m=i[3],l(m)||(m=i[3]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,e),m=i[4],l(m)||(m=i[4]=new se),m.x=t.x,m.y=t.y,m.z=t.z,m.w=-h.dot(t,d),h.negate(t,_),m=i[5],l(m)||(m=i[5]=new se),m.x=_.x,m.y=_.y,m.z=_.z,m.w=-h.dot(_,p),this._cullingVolume};Ph.prototype.getPixelDimensions=function(e,t,n,i,o){z5(this);let r=1/this.near,s=this.top*r,a=2*i*n*s/t;s=this.right*r;let c=2*i*n*s/e;return o.x=c,o.y=a,o};Ph.prototype.clone=function(e){return l(e)||(e=new Ph),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e};Ph.prototype.equals=function(e){return l(e)&&e instanceof Ph&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};Ph.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof Ph&&R.equalsEpsilon(this.right,e.right,t,n)&&R.equalsEpsilon(this.left,e.left,t,n)&&R.equalsEpsilon(this.top,e.top,t,n)&&R.equalsEpsilon(this.bottom,e.bottom,t,n)&&R.equalsEpsilon(this.near,e.near,t,n)&&R.equalsEpsilon(this.far,e.far,t,n)};var ul=Ph;function fl(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new ul,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.xOffset=y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=y(e.yOffset,0),this._yOffset=this.yOffset}fl.packedLength=6;fl.pack=function(e,t,n){return n=y(n,0),t[n++]=e.fov,t[n++]=e.aspectRatio,t[n++]=e.near,t[n++]=e.far,t[n++]=e.xOffset,t[n]=e.yOffset,t};fl.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new fl),n.fov=e[t++],n.aspectRatio=e[t++],n.near=e[t++],n.far=e[t++],n.xOffset=e[t++],n.yOffset=e[t],n};function Ih(e){let t=e._offCenterFrustum;(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset)&&(e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:Math.atan(Math.tan(e.fov*.5)/e.aspectRatio)*2,e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}Object.defineProperties(fl.prototype,{projectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return Ih(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return Ih(this),this._fovy}},sseDenominator:{get:function(){return Ih(this),this._sseDenominator}}});fl.prototype.computeCullingVolume=function(e,t,n){return Ih(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};fl.prototype.getPixelDimensions=function(e,t,n,i,o){return Ih(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};fl.prototype.clone=function(e){return l(e)||(e=new fl),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e};fl.prototype.equals=function(e){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};fl.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof fl)?!1:(Ih(this),Ih(e),R.equalsEpsilon(this.fov,e.fov,t,n)&&R.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,n)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,n))};var xi=fl;var eO=0,fIe=1;function vy(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e._drawNearPlane,!0),s,a;t instanceof xi?(s=eO,a=xi.packedLength):t instanceof Qt&&(s=fIe,a=Qt.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+h.packedLength+Me.packedLength+Pe.packedLength}vy.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===eO?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n]=e._drawNearPlane?1:0,t};var dIe=new xi,hIe=new Qt,mIe=new Me,pIe=new h,_Ie=new Pe;vy.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===eO?(o=xi.unpack(e,t,dIe),t+=xi.packedLength):(o=Qt.unpack(e,t,hIe),t+=Qt.packedLength);let r=h.unpack(e,t,pIe);t+=h.packedLength;let s=Me.unpack(e,t,mIe);t+=Me.packedLength;let a=Pe.unpack(e,t,_Ie);t+=Pe.packedLength;let c=e[t]===1;if(!l(n))return new vy({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let u=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(u),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._vertexFormat=Pe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function HA(e,t,n,i,o,r,s,a){let c=e/3*2;for(let u=0;u<4;++u)l(t)&&(t[e]=r.x,t[e+1]=r.y,t[e+2]=r.z),l(n)&&(n[e]=s.x,n[e+1]=s.y,n[e+2]=s.z),l(i)&&(i[e]=a.x,i[e+1]=a.y,i[e+2]=a.z),e+=3;o[c]=0,o[c+1]=0,o[c+2]=1,o[c+3]=0,o[c+4]=1,o[c+5]=1,o[c+6]=0,o[c+7]=1}var gIe=new Q,yIe=new B,H5=new B,LQ=new h,NQ=new h,FQ=new h,xIe=new h,CIe=new h,AIe=new h,W_=new Array(3),WS=new Array(4);WS[0]=new se(-1,-1,1,1);WS[1]=new se(1,-1,1,1);WS[2]=new se(1,1,1,1);WS[3]=new se(-1,1,1,1);var VQ=new Array(4);for(let e=0;e<4;++e)VQ[e]=new se;vy._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=Q.fromQuaternion(t,gIe),u=y(r,LQ),f=y(s,NQ),d=y(a,FQ);u=Q.getColumn(c,0,u),f=Q.getColumn(c,1,f),d=Q.getColumn(c,2,d),h.normalize(u,u),h.normalize(f,f),h.normalize(d,d),h.negate(u,u);let p=B.computeView(e,d,f,u,yIe),_,m;if(n===eO){let x=i.projectionMatrix,C=B.multiply(x,p,H5);m=B.inverse(C,H5)}else _=B.inverseTransformation(p,H5);l(m)?(W_[0]=i.near,W_[1]=i.far):(W_[0]=0,W_[1]=i.near,W_[2]=i.far);for(let x=0;x<2;++x)for(let C=0;C<4;++C){let A=se.clone(WS[C],VQ[C]);if(l(m)){A=B.multiplyByVector(m,A,A);let T=1/A.w;h.multiplyByScalar(A,T,A),h.subtract(A,e,A),h.normalize(A,A);let b=h.dot(d,A);h.multiplyByScalar(A,W_[x]/b,A),h.add(A,e,A)}else{l(i._offCenterFrustum)&&(i=i._offCenterFrustum);let T=W_[x],b=W_[x+1];A.x=(A.x*(i.right-i.left)+i.left+i.right)*.5,A.y=(A.y*(i.top-i.bottom)+i.bottom+i.top)*.5,A.z=(A.z*(T-b)-T-b)*.5,A.w=1,B.multiplyByVector(_,A,A)}o[12*x+C*3]=A.x,o[12*x+C*3+1]=A.y,o[12*x+C*3+2]=A.z}};vy.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=e._vertexFormat,a=r?6:5,c=new Float64Array(3*4*6);vy._computeNearFarPlanes(i,o,t,n,c);let u=3*4*2;c[u]=c[3*4],c[u+1]=c[3*4+1],c[u+2]=c[3*4+2],c[u+3]=c[0],c[u+4]=c[1],c[u+5]=c[2],c[u+6]=c[3*3],c[u+7]=c[3*3+1],c[u+8]=c[3*3+2],c[u+9]=c[3*7],c[u+10]=c[3*7+1],c[u+11]=c[3*7+2],u+=3*4,c[u]=c[3*5],c[u+1]=c[3*5+1],c[u+2]=c[3*5+2],c[u+3]=c[3],c[u+4]=c[3+1],c[u+5]=c[3+2],c[u+6]=c[0],c[u+7]=c[1],c[u+8]=c[2],c[u+9]=c[3*4],c[u+10]=c[3*4+1],c[u+11]=c[3*4+2],u+=3*4,c[u]=c[3],c[u+1]=c[3+1],c[u+2]=c[3+2],c[u+3]=c[3*5],c[u+4]=c[3*5+1],c[u+5]=c[3*5+2],c[u+6]=c[3*6],c[u+7]=c[3*6+1],c[u+8]=c[3*6+2],c[u+9]=c[3*2],c[u+10]=c[3*2+1],c[u+11]=c[3*2+2],u+=3*4,c[u]=c[3*2],c[u+1]=c[3*2+1],c[u+2]=c[3*2+2],c[u+3]=c[3*6],c[u+4]=c[3*6+1],c[u+5]=c[3*6+2],c[u+6]=c[3*7],c[u+7]=c[3*7+1],c[u+8]=c[3*7+2],c[u+9]=c[3*3],c[u+10]=c[3*3+1],c[u+11]=c[3*3+2],r||(c=c.subarray(3*4));let f=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,_=l(s.tangent)?new Float32Array(3*4*a):void 0,m=l(s.bitangent)?new Float32Array(3*4*a):void 0,x=l(s.st)?new Float32Array(2*4*a):void 0,C=LQ,A=NQ,T=FQ,b=h.negate(C,xIe),S=h.negate(A,CIe),w=h.negate(T,AIe);u=0,r&&(HA(u,p,_,m,x,w,C,A),u+=3*4),HA(u,p,_,m,x,T,b,A),u+=3*4,HA(u,p,_,m,x,b,w,A),u+=3*4,HA(u,p,_,m,x,S,w,b),u+=3*4,HA(u,p,_,m,x,C,T,A),u+=3*4,HA(u,p,_,m,x,A,T,b),l(p)&&(f.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),l(_)&&(f.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),l(m)&&(f.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),l(x)&&(f.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:x}))}let d=new Uint16Array(6*a);for(let p=0;p<a;++p){let _=p*6,m=p*4;d[_]=m,d[_+1]=m+1,d[_+2]=m+2,d[_+3]=m,d[_+4]=m+2,d[_+5]=m+3}return new ct({attributes:f,indices:d,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromVertices(c)})};var GA=vy;var G5=0,TIe=1;function jS(e){let t=e.frustum,n=e.orientation,i=e.origin,o=y(e._drawNearPlane,!0),r,s;t instanceof xi?(r=G5,s=xi.packedLength):t instanceof Qt&&(r=TIe,s=Qt.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=h.clone(i),this._orientation=Me.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+h.packedLength+Me.packedLength}jS.pack=function(e,t,n){n=y(n,0);let i=e._frustumType,o=e._frustum;return t[n++]=i,i===G5?(xi.pack(o,t,n),n+=xi.packedLength):(Qt.pack(o,t,n),n+=Qt.packedLength),h.pack(e._origin,t,n),n+=h.packedLength,Me.pack(e._orientation,t,n),n+=Me.packedLength,t[n]=e._drawNearPlane?1:0,t};var bIe=new xi,EIe=new Qt,SIe=new Me,wIe=new h;jS.unpack=function(e,t,n){t=y(t,0);let i=e[t++],o;i===G5?(o=xi.unpack(e,t,bIe),t+=xi.packedLength):(o=Qt.unpack(e,t,EIe),t+=Qt.packedLength);let r=h.unpack(e,t,wIe);t+=h.packedLength;let s=Me.unpack(e,t,SIe);t+=Me.packedLength;let a=e[t]===1;if(!l(n))return new jS({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=h.clone(r,n._origin),n._orientation=Me.clone(s,n._orientation),n._drawNearPlane=a,n};jS.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(3*4*2);GA._computeNearFarPlanes(i,o,t,n,s);let a=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),c,u,f=r?2:1,d=new Uint16Array(8*(f+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,u=p*4,d[c]=u,d[c+1]=u+1,d[c+2]=u+1,d[c+3]=u+2,d[c+4]=u+2,d[c+5]=u+3,d[c+6]=u+3,d[c+7]=u;for(p=0;p<2;++p)c=(f+p)*8,u=p*4,d[c]=u,d[c+1]=u+4,d[c+2]=u+1,d[c+3]=u+5,d[c+4]=u+2,d[c+5]=u+6,d[c+6]=u+3,d[c+7]=u+7;return new ct({attributes:a,indices:d,primitiveType:Le.LINES,boundingSphere:oe.fromVertices(s)})};var tO=jS;function kQ(){}kQ.prototype.geocode=ye.throwInstantiationError;var UQ=kQ;var vIe={SEARCH:0,AUTOCOMPLETE:1},Dy=Object.freeze(vIe);function zQ(){ye.throwInstantiationError()}zQ.createGeometry=function(e){ye.throwInstantiationError()};var HQ=zQ;function DIe(e){e=y(e,y.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=y(e.normalize,!1),this.value=e.value}var Ac=DIe;function PIe(e){let t=new ei.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var j_=PIe;function IIe(e,t,n){let i=new Uint8ClampedArray(e.buffer),o=new ImageData(i,t,n),r=document.createElement("canvas");return r.width=t,r.height=n,r.getContext("2d").putImageData(o,0,0),r}var nO=IIe;function OIe(e,t){return t=y(t,0),fa(e,t,Math.min(4,e.length))}var Gu=OIe;var WA=Zc(GQ());function RIe(e,t){return(e&t)!==0}var Tc=RIe;var MIe=[1,2,4,8],WQ=15,BIe=16,LIe=64,NIe=128;function Oh(e,t,n,i,o,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=o,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}Oh.clone=function(e,t){return l(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new Oh(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};Oh.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};Oh.prototype.hasSubtree=function(){return Tc(this._bits,BIe)};Oh.prototype.hasImagery=function(){return Tc(this._bits,LIe)};Oh.prototype.hasTerrain=function(){return Tc(this._bits,NIe)};Oh.prototype.hasChildren=function(){return Tc(this._bits,WQ)};Oh.prototype.hasChild=function(e){return Tc(this._bits,MIe[e])};Oh.prototype.getChildBitmask=function(){return this._bits&WQ};var iO=Oh;function FIe(e){let t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n);for(let o=0;o<t;++o)i[o]=e.charCodeAt(o);return n}var VIe=FIe(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
|
|
97
97
|
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
|
|
98
98
|
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6\xE6x\fa1-\xA4O\xA5~q \x88\xEC\r1\xE8N\v\0nPh}=\b\r\x95\xA6n\xA3h\x97$[k\xF3#\xF3\xB6s\xB3\r\v@\xC0\x9F\xD8Q]\xFA".j\xDFI\0\xB9\xA0wU\xC6\xEFj\xBF{GL\x7F\x83\xEE\xDC\xDCF\x85\xA9\xADS\x07+S4\x07\xFF\x94Y\xE48\xE81\x83N\xB9XFk\xCB-#\x86\x92p\x005\x88"\xCF1\xB2&/\xE7\xC3u-6,rt\xB0#G\xB7\xD3\xD1&\x857r\xE2\0\x8CD\xCF\xDA3-\xDE\`\x86i#i*|\xCDKQ\r\x95T9w.)\xEA\x1B\xA6P\xA2j\x8FoP\x99\\>T\xFB\xEFP[\v\x07E\x89m(w7\xDB\x8EJfJo\x99 \xE5p\xE2\xB9q~\fmI-z\xFEr\xC7\xF2Y0\x8F\xBB]s\xE5\xC9 \xEAx\xEC \x90\xF0\x8A\x7FB|G\`\xB0\xBD&\xB7q\xB6\xC7\x9F\xD13\x82=\xD3\xAB\xEEc\x99\xC8+S\xA0D\\q\xC6\xCCD2O<\xCA\xC0)=R\xD3aX\xA9}e\xB4\xDC\xCF\r\xF4=\xF1\b\xA9B\xDA# \xD8\xBF^PI\xF8M\xC0\xCBGLO\xF7{+\xD8\xC51\x92;\xB5o\xDCl\r\x92\x88\xD1\x9E\xDB?\xE2\xE9\xDA_\xD4\x84\xE2FaZ\xDEU\xCF\xA4\0\xBE\xFD\xCEg\xF1Ji\x97\xE6 H\xD8]\x7F~\xAEq N\xAE\xC0V\xA9\x91<\x82r\xE7v\xEC)I\xD6]-\x83\xE3\xDB6\xA9;f\x97\x87j\xD5\xB6=P^R\xB9K\xC7sWx\xC9\xF4.Y\x07\x95\x93o\xD0KW>''\xC7\`\xDB;\xED\x9ASD>?\x8D\x92mw\xA2
|
|
99
99
|
\xEB?R\xA8\xC6U^1I7\x85\xF4\xC5&-\xA9\xBF\x8B'T\xDA\xC3j \xE5*x\xB0\xD6\x90pr\xAA\x8Bh\xBD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
|
|
100
100
|
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
|
|
101
101
|
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
|
|
102
|
-
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function od(e){let t=e;typeof t!="string"&&!(t instanceof De)&&(t=e.url);let n=De.createIfNeeded(t);n.appendForwardSlash(),this._resource=n,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=R.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};let i=this;this._readyPromise=kIe(this).then(function(){return i.getQuadTreePacket("",i._quadPacketVersion)}).then(function(){return!0}).catch(function(o){let r=`An error occurred while accessing ${qQ(i,"",1).url}.`;return Promise.reject(new fe(r))})}Object.defineProperties(od.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}});od.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;Tc(t,r)?Tc(e,r)&&(s|=1):(s|=2,Tc(e,r)||(s|=1)),i+=s}return i};od.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];Tc(s,2)?Tc(s,1)||(t|=r):(n|=r,Tc(s,1)&&(t|=r))}return{x:t,y:n,level:i}};od.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var jQ=new Di("decodeGoogleEarthEnterprisePacket");od.prototype.getQuadTreePacket=function(e,t,n){t=y(t,1),e=y(e,"");let o=qQ(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return jQ.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(u){let f,d=-1;if(e!==""){d=e.length+1;let m=u[e];f=r[e],f._bits|=m._bits,delete u[e]}let p=Object.keys(u);p.sort(function(m,x){return m.length-x.length});let _=p.length;for(let m=0;m<_;++m){let x=p[m];if(u[x]!==null){let A=iO.clone(u[x]),T=x.length;if(T===d)A.setParent(f);else if(T>1){let b=r[x.substring(0,x.length-1)];A.setParent(b)}r[x]=A}else r[x]=null}})})};od.prototype.populateSubtree=function(e,t,n,i){let o=od.tileXYToQuadKey(e,t,n);return q5(this,o,i)};function q5(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,c=a[o];if(l(c))return c.then(function(){return s=new rr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),q5(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new fe(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return a[o]=c,c.then(function(){return s=new rr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),q5(e,t,s)}).finally(function(){delete a[o]})}od.prototype.getTileInformation=function(e,t,n){let i=od.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};od.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function qQ(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var W5,j5;function kIe(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(j5)){let n=Jt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;j5=XC(n).then(function(){W5=window.cesiumGoogleEarthDbRootParser(WA),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return j5.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=W5.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let c=o.buffer.slice(r,s);return jQ.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=W5.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=y(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=y(i.terrainPresent,e.terrainPresent),l(i.endSnippet)&&l(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=y(a.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=y(a.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}l(i.databaseVersion)&&(e._quadPacketVersion=y(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));let o=e.providers,r=y(i.providerInfo,[]),s=r.length;for(let a=0;a<s;++a){let c=r[a],u=c.copyrightString;l(u)&&(o[c.providerId]=new Ht(u.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=VIe})}var Rh=od;function Py(e){e=y(e,y.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=y(e.childTileMask,15),n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=y(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(Py.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var KQ="createVerticesFromGoogleEarthEnterpriseBuffer",UIe=new Di(KQ),zIe=new Di(KQ,_h.maximumAsynchronousTasks),YQ=new de,Y5=new de;Py.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,YQ),t.tileXYToRectangle(n,i,o,Y5);let u=c.cartographicToCartesian(de.center(Y5)),d=40075.16/(1<<o);this._skirtHeight=Math.min(d*8,1e3);let _=(a?zIe:UIe).scheduleTask({buffer:this._buffer,nativeRectangle:YQ,rectangle:Y5,relativeToCenter:u,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(_))return;let m=this;return _.then(function(x){return m._mesh=new $f(u,new Float32Array(x.vertices),new Uint16Array(x.indices),x.indexCountWithoutSkirts,x.vertexCountWithoutSkirts,x.minimumHeight,x.maximumHeight,oe.clone(x.boundingSphere3D),h.clone(x.occludeePointInScaledSpace),x.numberOfAttributes,gi.clone(x.orientedBoundingBox),mc.clone(x.encoding),x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),m._minimumHeight=x.minimumHeight,m._maximumHeight=x.maximumHeight,m._buffer=void 0,m._mesh})};Py.prototype.interpolateHeight=function(e,t,n){let i=R.clamp((t-e.west)/e.width,0,1),o=R.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?qIe(this,i,o):KIe(this,i,o,e)};var HIe=new Di("upsampleQuantizedTerrainMesh",_h.maximumAsynchronousTasks);Py.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,s),p=HIe.scheduleTask({vertices:a.vertices,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let _=this;return p.then(function(m){let x=new Uint16Array(m.vertices),C=Ne.createTypedArray(x.length/3,m.indices),A=_._skirtHeight;return new pA({quantizedVertices:x,indices:C,minimumHeight:m.minimumHeight,maximumHeight:m.maximumHeight,boundingSphere:oe.clone(m.boundingSphere),orientedBoundingBox:gi.clone(m.orientedBoundingBox),horizonOcclusionPoint:h.clone(m.horizonOcclusionPoint),westIndices:m.westIndices,southIndices:m.southIndices,eastIndices:m.eastIndices,northIndices:m.northIndices,westSkirtHeight:A,southSkirtHeight:A,eastSkirtHeight:A,northSkirtHeight:A,childTileMask:0,createdByUpsampling:!0,credits:_._credits})})};Py.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Py.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var GIe=new G,WIe=new G,jIe=new G,$Q=new h;function qIe(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=r.decodeTextureCoordinates(o,u,GIe),_=r.decodeTextureCoordinates(o,f,WIe),m=r.decodeTextureCoordinates(o,d,jIe),x=O_.computeBarycentricCoordinates(t,n,p.x,p.y,_.x,_.y,m.x,m.y,$Q);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let C=r.decodeHeight(o,u),A=r.decodeHeight(o,f),T=r.decodeHeight(o,d);return x.x*C+x.y*A+x.z*T}}}var YIe=Uint16Array.BYTES_PER_ELEMENT,XQ=Uint32Array.BYTES_PER_ELEMENT,X5=Int32Array.BYTES_PER_ELEMENT,XIe=Float32Array.BYTES_PER_ELEMENT,K5=Float64Array.BYTES_PER_ELEMENT;function KIe(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let c=new DataView(o),u=0;for(let w=0;w<r;++w)u+=c.getUint32(u,!0),u+=XQ;u+=XQ,u+=2*K5;let f=R.toRadians(c.getFloat64(u,!0)*180);u+=K5;let d=R.toRadians(c.getFloat64(u,!0)*180);u+=K5;let p=i.width/f/2,_=i.height/d/2,m=c.getInt32(u,!0);u+=X5;let x=c.getInt32(u,!0)*3;u+=X5,u+=X5;let C=new Array(m),A=new Array(m),T=new Array(m),b;for(b=0;b<m;++b)C[b]=s+c.getUint8(u++)*p,A[b]=a+c.getUint8(u++)*_,T[b]=c.getFloat32(u,!0)*6371010,u+=XIe;let S=new Array(x);for(b=0;b<x;++b)S[b]=c.getUint16(u,!0),u+=YIe;for(b=0;b<x;b+=3){let w=S[b],D=S[b+1],O=S[b+2],I=C[w],L=C[D],N=C[O],g=A[w],E=A[D],v=A[O],P=O_.computeBarycentricCoordinates(t,n,I,g,L,E,N,v,$Q);if(P.x>=-1e-15&&P.y>=-1e-15&&P.z>=-1e-15)return P.x*T[w]+P.y*T[D]+P.z*T[O]}}var qS=Py;var Wu={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},oO=new ee;function rO(){this._terrainCache={},this._lastTidy=ee.now()}rO.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:ee.now()}};rO.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};rO.prototype.tidy=function(){if(ee.now(oO),ee.secondsDifference(oO,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];ee.secondsDifference(oO,r.timestamp)>10&&delete e[o]}ee.clone(oO,this._lastTidy)}};function jA(e){e=y(e,y.EMPTY_OBJECT);let t;if(l(e.metadata))t=e.metadata;else{let r=De.createIfNeeded(e.url);t=new Rh(r)}this._metadata=t,this._tilingScheme=new Xi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new de(-R.PI,-R.PI,R.PI,R.PI),ellipsoid:e.ellipsoid});let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new rO,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new _e,this._ready=!1;let i=this,o;this._readyPromise=t.readyPromise.then(function(r){if(!t.terrainPresent){let s=new fe(`The server ${t.url} doesn't have terrain`);return o=Gn.reportError(o,i,i._errorEvent,s.message,void 0,void 0,void 0,s),Promise.reject(s)}return Gn.reportSuccess(o),i._ready=r,r}).catch(function(r){return o=Gn.reportError(o,i,i._errorEvent,r.message,void 0,void 0,void 0,r),Promise.reject(r)})}Object.defineProperties(jA.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var $Ie=new Di("decodeGoogleEarthEnterprisePacket");function ZQ(e,t,n){let i=t.getChildBitmask();if(t.terrainState===Wu.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}jA.prototype.requestTileGeometry=function(e,t,n,i){let o=Rh.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new fe("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=Wu.UNKNOWN);let u=r.get(o);if(l(u)){let A=s.providers[a.terrainProvider];return Promise.resolve(new qS({buffer:u,childTileMask:ZQ(o,a,s),credits:l(A)?[A]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===Wu.NONE)return Promise.reject(new fe("Terrain tile doesn't exist"))}else return Promise.resolve(new ka({buffer:new Uint8Array(16*16),width:16,height:16}));let f,d=o,p=-1;switch(c){case Wu.SELF:p=a.terrainVersion;break;case Wu.PARENT:d=d.substring(0,d.length-1),f=s.getTileInformationFromQuadKey(d),p=f.terrainVersion;break;case Wu.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(d=d.substring(0,d.length-1),f=s.getTileInformationFromQuadKey(d),l(f)&&f.hasTerrain()&&(p=f.terrainVersion));break}if(p<0)return Promise.reject(new fe("Terrain tile doesn't exist"));let _=this._terrainPromises,m=this._terrainRequests,x,C;if(l(_[d]))x=_[d],C=m[d];else{C=i;let A=ZIe(this,d,p,C).fetchArrayBuffer();if(!l(A))return;x=A.then(function(T){return l(T)?$Ie.scheduleTask({buffer:T,type:"Terrain",key:s.key},[T]).then(function(b){let S=s.getTileInformationFromQuadKey(d);S.terrainState=Wu.SELF,r.add(d,b[0]);let w=S.terrainProvider,D=b.length-1;for(let O=0;O<D;++O){let I=d+O.toString(),L=s.getTileInformationFromQuadKey(I);l(L)&&(r.add(I,b[O+1]),L.terrainState=Wu.PARENT,L.terrainProvider===0&&(L.terrainProvider=w))}}):Promise.reject(new fe("Failed to load terrain."))}),_[d]=x,m[d]=C,x=x.finally(function(){delete _[d],delete m[d]})}return x.then(function(){let A=r.get(o);if(l(A)){let T=s.providers[a.terrainProvider];return new qS({buffer:A,childTileMask:ZQ(o,a,s),credits:l(T)?[T]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new fe("Failed to load terrain."))}).catch(function(A){return C.state===ui.CANCELLED?(i.state=C.state,Promise.reject(A)):(a.terrainState=Wu.NONE,Promise.reject(A))})};jA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};jA.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=Rh.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(l(r)){if(!r.ancestorHasTerrain)return!0;let s=r.terrainState;if(s===Wu.NONE)return!1;if((!l(s)||s===Wu.UNKNOWN)&&(r.terrainState=Wu.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let a=i.getTileInformationFromQuadKey(o);if(!l(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(o)){let s=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};jA.prototype.loadTileDataAvailability=function(e,t,n){};function ZIe(e,t,n,i){return n=l(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var JQ=jA;var iG=[Si,Ui],JIe=iG.length,yee=Math.cos(R.toRadians(30)),QQ=Math.cos(R.toRadians(150)),xee=0,Cee=1e3;function Y_(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions;this.width=y(e.width,1),this._positions=t,this.granularity=y(e.granularity,9999),this.loop=y(e.loop,!1),this.arcType=y(e.arcType,Yt.GEODESIC),this._ellipsoid=re.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(Y_.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+re.packedLength+1+1}}});Y_.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<JIe;i++)if(t instanceof iG[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var QIe=new h,eee=new h,tee=new h;function nG(e,t,n,i,o){let r=bc(i,e,0,QIe),s=bc(i,e,n,eee),a=bc(i,t,0,tee),c=ip(s,r,eee),u=ip(a,r,tee);return h.cross(u,c,o),h.normalize(o,o)}var eOe=new me,tOe=new h,nOe=new h,iOe=new h;function $5(e,t,n,i,o,r,s,a,c,u,f){if(o===0)return;let d;r===Yt.GEODESIC?d=new td(e,t,s):r===Yt.RHUMB&&(d=new za(e,t,s));let p=d.surfaceDistance;if(p<o)return;let _=nG(e,t,i,s,iOe),m=Math.ceil(p/o),x=p/m,C=x,A=m-1,T=a.length;for(let b=0;b<A;b++){let S=d.interpolateUsingSurfaceDistance(C,eOe),w=bc(s,S,n,tOe),D=bc(s,S,i,nOe);h.pack(_,a,T),h.pack(w,c,T),h.pack(D,u,T),f.push(S.latitude),f.push(S.longitude),T+=3,C+=x}}var Z5=new me;function bc(e,t,n,i){return me.clone(t,Z5),Z5.height=n,me.toCartesian(Z5,e,i)}Y_.pack=function(e,t,n){let i=y(n,0),o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s){let a=o[s];h.pack(a,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,re.pack(e._ellipsoid,t,i),i+=re.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t};Y_.unpack=function(e,t,n){let i=y(t,0),o=e[i++],r=new Array(o);for(let p=0;p<o;p++)r[p]=h.unpack(e,i),i+=3;let s=e[i++],a=e[i++]===1,c=e[i++],u=re.unpack(e,i);i+=re.packedLength;let f=e[i++],d=e[i++]===1;return l(n)||(n=new Y_({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=c,n._ellipsoid=u,n._projectionIndex=f,n._scene3DOnly=d,n};function ip(e,t,n){return h.subtract(e,t,n),h.normalize(n,n),n}function nee(e,t,n,i){return i=ip(e,t,i),i=h.cross(i,n,i),i=h.normalize(i,i),i=h.cross(n,i,i),i}var oOe=new h,rOe=new h,sOe=new h,Aee=new h,aOe=0,cOe=-1;function J5(e,t,n,i,o){let r=ip(n,t,Aee),s=nee(e,t,r,oOe),a=nee(i,t,r,rOe);if(R.equalsEpsilon(h.dot(s,a),cOe,R.EPSILON5))return o=h.cross(r,s,o),o=h.normalize(o,o),o;o=h.add(a,s,o),o=h.normalize(o,o);let c=h.cross(r,o,sOe);return h.dot(a,c)<aOe&&(o=h.negate(o,o)),o}var lO=rn.fromPointNormal(h.ZERO,h.UNIT_Y),lOe=new h,uOe=new h,fOe=new h,dOe=new h,hOe=new h,sO=new h,aO=new me,iee=new me,oee=new me;Y_.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new iG[e._projectionIndex](i),a=xee,c=Cee,u,f,d=e._positions,p=d.length;p===2&&(n=!1);let _,m,x,C,A=new za(void 0,void 0,i),T,b,S,w=[d[0]];for(f=0;f<p-1;f++)_=d[f],m=d[f+1],T=Ki.lineSegmentPlane(_,m,lO,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&(e.arcType===Yt.GEODESIC?w.push(h.clone(T)):e.arcType===Yt.RHUMB&&(S=i.cartesianToCartographic(T,aO).longitude,x=i.cartesianToCartographic(_,aO),C=i.cartesianToCartographic(m,iee),A.setEndPoints(x,C),b=A.findIntersectionWithLongitude(S,oee),T=i.cartographicToCartesian(b,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&w.push(h.clone(T)))),w.push(m);n&&(_=d[p-1],m=d[0],T=Ki.lineSegmentPlane(_,m,lO,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&(e.arcType===Yt.GEODESIC?w.push(h.clone(T)):e.arcType===Yt.RHUMB&&(S=i.cartesianToCartographic(T,aO).longitude,x=i.cartesianToCartographic(_,aO),C=i.cartesianToCartographic(m,iee),A.setEndPoints(x,C),b=A.findIntersectionWithLongitude(S,oee),T=i.cartographicToCartesian(b,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&w.push(h.clone(T)))));let D=w.length,O=new Array(D);for(f=0;f<D;f++){let j=me.fromCartesian(w[f],i);j.height=0,O[f]=j}if(O=So(O,me.equalsEpsilon),D=O.length,D<2)return;let I=[],L=[],N=[],g=[],E=lOe,v=uOe,P=fOe,M=dOe,V=hOe,U=O[0],k=O[1],H=O[D-1];for(E=bc(i,H,a,E),M=bc(i,k,a,M),v=bc(i,U,a,v),P=bc(i,U,c,P),n?V=J5(E,v,P,M,V):V=nG(U,k,c,i,V),h.pack(V,L,0),h.pack(v,N,0),h.pack(P,g,0),I.push(U.latitude),I.push(U.longitude),$5(U,k,a,c,o,r,i,L,N,g,I),f=1;f<D-1;++f){E=h.clone(v,E),v=h.clone(M,v);let j=O[f];bc(i,j,c,P),bc(i,O[f+1],a,M),J5(E,v,P,M,V),u=L.length,h.pack(V,L,u),h.pack(v,N,u),h.pack(P,g,u),I.push(j.latitude),I.push(j.longitude),$5(O[f],O[f+1],a,c,o,r,i,L,N,g,I)}let F=O[D-1],Y=O[D-2];if(v=bc(i,F,a,v),P=bc(i,F,c,P),n){let j=O[0];E=bc(i,Y,a,E),M=bc(i,j,a,M),V=J5(E,v,P,M,V)}else V=nG(Y,F,c,i,V);if(u=L.length,h.pack(V,L,u),h.pack(v,N,u),h.pack(P,g,u),I.push(F.latitude),I.push(F.longitude),n){for($5(F,U,a,c,o,r,i,L,N,g,I),u=L.length,f=0;f<3;++f)L[u+f]=L[f],N[u+f]=N[f],g[u+f]=g[f];I.push(U.latitude),I.push(U.longitude)}return kOe(n,s,N,g,L,I,t)};var mOe=new h,pOe=new Q,_Oe=new Me;function ree(e,t,n,i){let o=ip(n,t,mOe),r=h.dot(o,e);if(r>yee||r<QQ){let s=ip(i,n,Aee),a=r<QQ?R.PI_OVER_TWO:-R.PI_OVER_TWO,c=Me.fromAxisAngle(s,a,_Oe),u=Q.fromQuaternion(c,pOe);return Q.multiplyByVector(u,e,e),!0}return!1}var see=new me,gOe=new h,aee=new h;function YS(e,t,n,i,o){let r=me.toCartesian(t,e._ellipsoid,gOe),s=h.add(r,n,aee),a=!1,c=e._ellipsoid,u=c.cartesianToCartographic(s,see);Math.abs(t.longitude-u.longitude)>R.PI_OVER_TWO&&(a=!0,s=h.subtract(r,n,aee),u=c.cartesianToCartographic(s,see)),u.height=0;let f=e.project(u,o);return o=h.subtract(f,i,o),o.z=0,o=h.normalize(o,o),a&&h.negate(o,o),o}var yOe=new h,cee=new h;function lee(e,t,n,i,o,r){let s=h.subtract(t,e,yOe);h.normalize(s,s);let a=n-xee,c=h.multiplyByScalar(s,a,cee);h.add(e,c,o);let u=i-Cee;c=h.multiplyByScalar(s,u,cee),h.add(t,c,r)}var xOe=new h;function cO(e,t){let n=rn.getPointDistance(lO,e),i=rn.getPointDistance(lO,t),o=xOe;R.equalsEpsilon(n,0,R.EPSILON2)?(o=ip(t,e,o),h.multiplyByScalar(o,R.EPSILON2,o),h.add(e,o,e)):R.equalsEpsilon(i,0,R.EPSILON2)&&(o=ip(e,t,o),h.multiplyByScalar(o,R.EPSILON2,o),h.add(t,o,t))}function COe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(R.equalsEpsilon(n,R.PI,R.EPSILON11)){let o=R.sign(t.longitude);return e.longitude=o*(n-R.EPSILON11),1}else if(R.equalsEpsilon(i,R.PI,R.EPSILON11)){let o=R.sign(e.longitude);return t.longitude=o*(i-R.EPSILON11),2}return 0}var Tee=new me,bee=new me,uee=new h,Q5=new h,fee=new h,dee=new h,AOe=new h,hee=new h,TOe=[Tee,bee],bOe=new de,EOe=new h,SOe=new h,wOe=new h,vOe=new h,DOe=new h,POe=new h,eG=new h,tG=new h,IOe=new h,OOe=new h,ROe=new h,mee=new h,MOe=new h,BOe=new h,LOe=new kn,NOe=new kn,pee=new h,FOe=new h,_ee=new h,VOe=[new oe,new oe],Eee=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],gee=Eee.length;function kOe(e,t,n,i,o,r,s){let a,c,u=t._ellipsoid,f=n.length/3-1,d=f*8,p=d*4,_=f*36,m=d>65535?new Uint32Array(_):new Uint16Array(_),x=new Float64Array(d*3),C=new Float32Array(p),A=new Float32Array(p),T=new Float32Array(p),b=new Float32Array(p),S=new Float32Array(p),w,D,O,I;s&&(w=new Float32Array(p),D=new Float32Array(p),O=new Float32Array(p),I=new Float32Array(d*2));let L=r.length/2,N=0,g=Tee;g.height=0;let E=bee;E.height=0;let v=uee,P=Q5;if(s)for(c=0,a=1;a<L;a++)g.latitude=r[c],g.longitude=r[c+1],E.latitude=r[c+2],E.longitude=r[c+3],v=t.project(g,v),P=t.project(E,P),N+=h.distance(v,P),c+=2;let M=i.length/3;P=h.unpack(i,0,P);let V=0;for(c=3,a=1;a<M;a++)v=h.clone(P,v),P=h.unpack(i,c,P),V+=h.distance(v,P),c+=3;let U;c=3;let k=0,H=0,F=0,Y=0,j=!1,X=h.unpack(n,0,dee),W=h.unpack(i,0,Q5),$=h.unpack(o,0,hee);if(e){let be=h.unpack(n,n.length-6,fee);ree($,be,X,W)&&($=h.negate($,$))}let J=0,ce=0,he=0;for(a=0;a<f;a++){let be=h.clone(X,fee),Be=h.clone(W,uee),Ae=h.clone($,AOe);j&&(Ae=h.negate(Ae,Ae)),X=h.unpack(n,c,dee),W=h.unpack(i,c,Q5),$=h.unpack(o,c,hee),j=ree($,be,X,W),g.latitude=r[k],g.longitude=r[k+1],E.latitude=r[k+2],E.longitude=r[k+3];let Oe,Ge,ot,nt;if(s){let _i=COe(g,E);Oe=t.project(g,DOe),Ge=t.project(E,POe);let Pr=ip(Ge,Oe,pee);Pr.y=Math.abs(Pr.y),ot=eG,nt=tG,_i===0||h.dot(Pr,h.UNIT_Y)>yee?(ot=YS(t,g,Ae,Oe,eG),nt=YS(t,E,$,Ge,tG)):_i===1?(nt=YS(t,E,$,Ge,tG),ot.x=0,ot.y=R.sign(g.longitude-Math.abs(E.longitude)),ot.z=0):(ot=YS(t,g,Ae,Oe,eG),nt.x=0,nt.y=R.sign(g.longitude-E.longitude),nt.z=0)}let Tn=h.distance(Be,W),Zn=kn.fromCartesian(be,LOe),st=h.subtract(X,be,IOe),kt=h.normalize(st,mee),Qn=h.subtract(Be,be,OOe);Qn=h.normalize(Qn,Qn);let ve=h.cross(kt,Qn,mee);ve=h.normalize(ve,ve);let yt=h.cross(Qn,Ae,MOe);yt=h.normalize(yt,yt);let Kt=h.subtract(W,X,ROe);Kt=h.normalize(Kt,Kt);let ji=h.cross($,Kt,BOe);ji=h.normalize(ji,ji);let si=Tn/V,vo=J/V,ir=0,_r,Vi,Lo,Bs=0,ke=0;if(s){ir=h.distance(Oe,Ge),_r=kn.fromCartesian(Oe,NOe),Vi=h.subtract(Ge,Oe,pee),Lo=h.normalize(Vi,FOe);let _i=Lo.x;Lo.x=Lo.y,Lo.y=-_i,Bs=ir/N,ke=ce/N}for(U=0;U<8;U++){let _i=Y+U*4,Pr=H+U*2,Zr=_i+3,Xc=U<4?1:-1,jo=U===2||U===3||U===6||U===7?1:-1;h.pack(Zn.high,C,_i),C[Zr]=st.x,h.pack(Zn.low,A,_i),A[Zr]=st.y,h.pack(yt,T,_i),T[Zr]=st.z,h.pack(ji,b,_i),b[Zr]=si*Xc,h.pack(ve,S,_i);let gr=vo*jo;gr===0&&jo<0&&(gr=9),S[Zr]=gr,s&&(w[_i]=_r.high.x,w[_i+1]=_r.high.y,w[_i+2]=_r.low.x,w[_i+3]=_r.low.y,O[_i]=-ot.y,O[_i+1]=ot.x,O[_i+2]=nt.y,O[_i+3]=-nt.x,D[_i]=Vi.x,D[_i+1]=Vi.y,D[_i+2]=Lo.x,D[_i+3]=Lo.y,I[Pr]=Bs*Xc,gr=ke*jo,gr===0&&jo<0&&(gr=9),I[Pr+1]=gr)}let Ye=wOe,We=vOe,$e=EOe,xt=SOe,an=de.fromCartographicArray(TOe,bOe),Nn=ai.getMinimumMaximumHeights(an,u),mo=Nn.minimumTerrainHeight,Wo=Nn.maximumTerrainHeight;he+=mo,he+=Wo,lee(be,Be,mo,Wo,Ye,$e),lee(X,W,mo,Wo,We,xt);let io=h.multiplyByScalar(ve,R.EPSILON5,_ee);h.add(Ye,io,Ye),h.add(We,io,We),h.add($e,io,$e),h.add(xt,io,xt),cO(Ye,We),cO($e,xt),h.pack(Ye,x,F),h.pack(We,x,F+3),h.pack(xt,x,F+6),h.pack($e,x,F+9),io=h.multiplyByScalar(ve,-2*R.EPSILON5,_ee),h.add(Ye,io,Ye),h.add(We,io,We),h.add($e,io,$e),h.add(xt,io,xt),cO(Ye,We),cO($e,xt),h.pack(Ye,x,F+12),h.pack(We,x,F+15),h.pack(xt,x,F+18),h.pack($e,x,F+21),k+=2,c+=3,H+=16,F+=24,Y+=32,J+=Tn,ce+=ir}c=0;let ie=0;for(a=0;a<f;a++){for(U=0;U<gee;U++)m[c+U]=Eee[U]+ie;ie+=8,c+=gee}let ae=VOe;oe.fromVertices(n,h.ZERO,3,ae[0]),oe.fromVertices(i,h.ZERO,3,ae[1]);let ge=oe.fromBoundingSpheres(ae);ge.radius+=he/(f*2);let Se={position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,normalize:!1,values:x}),startHiAndForwardOffsetX:q_(C),startLoAndForwardOffsetY:q_(A),startNormalAndForwardOffsetZ:q_(T),endNormalAndTextureCoordinateNormalizationX:q_(b),rightNormalAndTextureCoordinateNormalizationY:q_(S)};return s&&(Se.startHiLo2D=q_(w),Se.offsetAndRight2D=q_(D),Se.startEndNormals2D=q_(O),Se.texcoordNormalization2D=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,normalize:!1,values:I})),new ct({attributes:Se,indices:m,boundingSphere:ge})}function q_(e){return new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}Y_._projectNormal=YS;var qA=Y_;function oG(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.range=y(n,0)}oG.clone=function(e,t){if(!!l(e))return l(t)||(t=new oG),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var ju=oG;var UOe=R.factorial;function rG(e,t,n,i,o,r){let s=0,a,c,u;if(i>0){for(c=0;c<o;c++){for(a=!1,u=0;u<r.length&&!a;u++)c===r[u]&&(a=!0);a||(r.push(c),s+=rG(e,t,n,i-1,o,r),r.splice(r.length-1,1))}return s}for(s=1,c=0;c<o;c++){for(a=!1,u=0;u<r.length&&!a;u++)c===r[u]&&(a=!0);a||(s*=e-n[t[c]])}return s}var uO={type:"Hermite"};uO.getRequiredDataPoints=function(e,t){return t=y(t,0),Math.max(Math.floor((e+1)/(t+1)),2)};uO.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c,u,f,d=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let C=new Array(d);for(p[r]=C,s=0;s<d;s++)C[s]=[]}let _=d,m=new Array(_);for(r=0;r<_;r++)m[r]=r;let x=d-1;for(c=0;c<i;c++){for(s=0;s<_;s++)f=m[s]*i+c,p[c][0].push(n[f]);for(r=1;r<_;r++){let C=!1;for(s=0;s<_-r;s++){let A=t[m[s]],T=t[m[s+r]],b;T-A<=0?(f=m[s]*i+i*r+c,b=n[f],p[c][r].push(b/UOe(r))):(b=p[c][r-1][s+1]-p[c][r-1][s],p[c][r].push(b/(T-A))),C=C||b!==0}C||(x=r-1)}}for(a=0,u=0;a<=u;a++)for(r=a;r<=x;r++){let C=rG(e,m,t,a,r,[]);for(c=0;c<i;c++){let A=p[c][r][0];o[c+a*i]+=A*C}}return o};var zOe=[];uO.interpolate=function(e,t,n,i,o,r,s){let a=i*(r+1);l(s)||(s=new Array(a));for(let A=0;A<a;A++)s[A]=0;let c=t.length,u=new Array(c*(o+1)),f;for(f=0;f<c;f++)for(let A=0;A<o+1;A++)u[f*(o+1)+A]=f;let d=u.length,p=zOe,_=HOe(p,u,t,n,i,o),m=[],x=d*(d+1)/2,C=Math.min(_,r);for(let A=0;A<=C;A++)for(f=A;f<=_;f++){m.length=0;let T=rG(e,u,t,A,f,m),b=Math.floor(f*(1-f)/2)+d*f;for(let S=0;S<i;S++){let w=Math.floor(S*x),D=p[w+b];s[S+A*i]+=D*T}}return s};function HOe(e,t,n,i,o,r){let s,a,c=-1,u=t.length,f=u*(u+1)/2;for(let d=0;d<o;d++){let p=Math.floor(d*f);for(s=0;s<u;s++)a=t[s]*o*(r+1)+d,e[p+s]=i[a];for(let _=1;_<u;_++){let m=0,x=Math.floor(_*(1-_)/2)+u*_,C=!1;for(s=0;s<u-_;s++){let A=n[t[s]],T=n[t[s+_]],b,S;if(T-A<=0)a=t[s]*o*(r+1)+o*_+d,b=i[a],S=b/R.factorial(_),e[p+x+m]=S,m++;else{let w=Math.floor((_-1)*(2-_)/2)+u*(_-1);b=e[p+w+s+1]-e[p+w+s],S=b/(T-A),e[p+x+m]=S,m++}C=C||b!==0}C&&(c=Math.max(c,_))}}return c}var fO=uO;var sG={};sG.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,c+=BigInt((3*r^s)*a*a),See(i,o,r,s);return c};sG.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s<n;s*=2)o=1&Number(a/BigInt(2)),r=1&Number(a^BigInt(o)),See(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};function See(e,t,n,i){if(i!==0)return;n===1&&(t.x=e-1-t.x,t.y=e-1-t.y);let o=t.x;t.x=t.y,t.y=o}var XS=sG;function GOe(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var dO=GOe;var kee={},WOe=32.184,jOe=2451545,wee=-.0529921,vee=-.1059842,Dee=13.0120009,Pee=13.3407154,Iee=.9856003,Oee=26.4057084,Ree=13.064993,Mee=.3287146,Bee=1.7484877,Lee=-.1589763,Nee=.0036096,Fee=.1643573,Vee=12.9590088,aG=new ee;kee.ComputeMoon=function(e,t){l(e)||(e=ee.now()),aG=ee.addSeconds(e,WOe,aG);let n=ee.totalDays(aG)-jOe,i=n/jn.DAYS_PER_JULIAN_CENTURY,o=(125.045+wee*n)*R.RADIANS_PER_DEGREE,r=(250.089+vee*n)*R.RADIANS_PER_DEGREE,s=(260.008+Dee*n)*R.RADIANS_PER_DEGREE,a=(176.625+Pee*n)*R.RADIANS_PER_DEGREE,c=(357.529+Iee*n)*R.RADIANS_PER_DEGREE,u=(311.589+Oee*n)*R.RADIANS_PER_DEGREE,f=(134.963+Ree*n)*R.RADIANS_PER_DEGREE,d=(276.617+Mee*n)*R.RADIANS_PER_DEGREE,p=(34.226+Bee*n)*R.RADIANS_PER_DEGREE,_=(15.134+Lee*n)*R.RADIANS_PER_DEGREE,m=(119.743+Nee*n)*R.RADIANS_PER_DEGREE,x=(239.961+Fee*n)*R.RADIANS_PER_DEGREE,C=(25.053+Vee*n)*R.RADIANS_PER_DEGREE,A=Math.sin(o),T=Math.sin(r),b=Math.sin(s),S=Math.sin(a),w=Math.sin(c),D=Math.sin(u),O=Math.sin(f),I=Math.sin(d),L=Math.sin(p),N=Math.sin(_),g=Math.sin(m),E=Math.sin(x),v=Math.sin(C),P=Math.cos(o),M=Math.cos(r),V=Math.cos(s),U=Math.cos(a),k=Math.cos(c),H=Math.cos(u),F=Math.cos(f),Y=Math.cos(d),j=Math.cos(p),X=Math.cos(_),W=Math.cos(m),$=Math.cos(x),J=Math.cos(C),ce=(269.9949+.0031*i-3.8787*A-.1204*T+.07*b-.0172*S+.0072*D-.0052*N+.0043*v)*R.RADIANS_PER_DEGREE,he=(66.5392+.013*i+1.5419*P+.0239*M-.0278*V+.0068*U-.0029*H+9e-4*F+8e-4*X-9e-4*J)*R.RADIANS_PER_DEGREE,ie=(38.3213+13.17635815*n-14e-13*n*n+3.561*A+.1208*T-.0642*b+.0158*S+.0252*w-.0066*D-.0047*O-.0046*I+.0028*L+.0052*N+.004*g+.0019*E-.0044*v)*R.RADIANS_PER_DEGREE,ae=(13.17635815-14e-13*(2*n)+3.561*P*wee+.1208*M*vee-.0642*V*Dee+.0158*U*Pee+.0252*k*Iee-.0066*H*Oee-.0047*F*Ree-.0046*Y*Mee+.0028*j*Bee+.0052*X*Lee+.004*W*Nee+.0019*$*Fee-.0044*J*Vee)/86400*R.RADIANS_PER_DEGREE;return l(t)||(t=new dO),t.rightAscension=ce,t.declination=he,t.rotation=ie,t.rotationRate=ae,t};var hO=kee;function Uee(e){(!l(e)||typeof e!="function")&&(e=hO.ComputeMoon),this._computeFunction=e}var qOe=new h,YOe=new h,XOe=new h;function KOe(e,t,n){let i=qOe;i.x=Math.cos(e+R.PI_OVER_TWO),i.y=Math.sin(e+R.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=XOe;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=h.cross(r,i,YOe);return l(n)||(n=new Q),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var $Oe=new Q,ZOe=new Me;Uee.prototype.evaluate=function(e,t){l(e)||(e=ee.now());let n=this._computeFunction(e),i=KOe(n.rightAscension,n.declination,t),o=R.zeroToTwoPi(n.rotation),r=Me.fromAxisAngle(h.UNIT_Z,o,ZOe),s=Q.fromQuaternion(Me.conjugate(r,r),$Oe);return Q.multiply(s,i,i)};var mO=Uee;var KS={};KS.type=void 0;KS.getRequiredDataPoints=ye.throwInstantiationError;KS.interpolateOrderZero=ye.throwInstantiationError;KS.interpolate=ye.throwInstantiationError;var zee=KS;var JOe={STEP:0,LINEAR:1,CUBICSPLINE:2},Mh=Object.freeze(JOe);function cG(e){this._url=De.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(cG.prototype,{url:{get:function(){return this._url}}});cG.prototype.geocode=function(e,t){return this._url.getDerivedResource({url:t===Dy.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(l(s))r=de.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=h.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r}})})};var pO=cG;function Hee(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.accessToken,wh.defaultAccessToken),n=De.createIfNeeded(y(e.server,wh.defaultServer));n.appendForwardSlash();let i=wh.getDefaultTokenCredit(t);l(i)&&e.scene.frameState.creditDisplay.addDefaultCredit(Ht.clone(i));let o=n.getDerivedResource({url:"v1/geocode"});l(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new pO(o)}Hee.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)};var _O=Hee;function Yo(e){e=y(e,y.EMPTY_OBJECT),this.start=l(e.start)?ee.clone(e.start):new ee,this.stop=l(e.stop)?ee.clone(e.stop):new ee,this.data=e.data,this.isStartIncluded=y(e.isStartIncluded,!0),this.isStopIncluded=y(e.isStopIncluded,!0)}Object.defineProperties(Yo.prototype,{isEmpty:{get:function(){let e=ee.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var YA={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Yo.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new ye("options.iso8601 is an invalid ISO 8601 interval.");let i=ee.fromIso8601(n[0]),o=ee.fromIso8601(n[1]),r=y(e.isStartIncluded,!0),s=y(e.isStopIncluded,!0),a=e.data;return l(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=s,t.data=a,t):(YA.start=i,YA.stop=o,YA.isStartIncluded=r,YA.isStopIncluded=s,YA.data=a,new Yo(YA))};Yo.toIso8601=function(e,t){return`${ee.toIso8601(e.start,t)}/${ee.toIso8601(e.stop,t)}`};Yo.clone=function(e,t){if(!!l(e))return l(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new Yo(e)};Yo.equals=function(e,t,n){return e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&ee.equals(e.start,t.start)&&ee.equals(e.stop,t.stop)&&(e.data===t.data||l(n)&&n(e.data,t.data)))};Yo.equalsEpsilon=function(e,t,n,i){return n=y(n,0),e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&ee.equalsEpsilon(e.start,t.start,n)&&ee.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||l(i)&&i(e.data,t.data)))};Yo.intersect=function(e,t,n,i){if(!l(t))return Yo.clone(Yo.EMPTY,n);let o=e.start,r=e.stop,s=t.start,a=t.stop,c=ee.greaterThanOrEquals(s,o)&&ee.greaterThanOrEquals(r,s),u=!c&&ee.lessThanOrEquals(s,o)&&ee.lessThanOrEquals(o,a);if(!c&&!u)return Yo.clone(Yo.EMPTY,n);let f=e.isStartIncluded,d=e.isStopIncluded,p=t.isStartIncluded,_=t.isStopIncluded,m=ee.lessThan(r,a);return l(n)||(n=new Yo),n.start=c?s:o,n.isStartIncluded=f&&p||!ee.equals(s,o)&&(c&&p||u&&f),n.stop=m?r:a,n.isStopIncluded=m?d:d&&_||!ee.equals(a,r)&&_,n.data=l(i)?i(e.data,t.data):e.data,n};Yo.contains=function(e,t){if(e.isEmpty)return!1;let n=ee.compare(e.start,t);if(n===0)return e.isStartIncluded;let i=ee.compare(t,e.stop);return i===0?e.isStopIncluded:n<0&&i<0};Yo.prototype.clone=function(e){return Yo.clone(this,e)};Yo.prototype.equals=function(e,t){return Yo.equals(this,e,t)};Yo.prototype.equalsEpsilon=function(e,t,n){return Yo.equalsEpsilon(this,e,t,n)};Yo.prototype.toString=function(){return Yo.toIso8601(this)};Yo.EMPTY=Object.freeze(new Yo({start:new ee,stop:new ee,isStartIncluded:!1,isStopIncluded:!1}));var yn=Yo;var Gee=Object.freeze(ee.fromIso8601("0000-01-01T00:00:00Z")),Wee=Object.freeze(ee.fromIso8601("9999-12-31T24:00:00Z")),QOe=Object.freeze(new yn({start:Gee,stop:Wee})),eRe={MINIMUM_VALUE:Gee,MAXIMUM_VALUE:Wee,MAXIMUM_INTERVAL:QOe},ze=eRe;var tRe={SHIFT:0,CTRL:1,ALT:2},ha=Object.freeze(tRe);function op(){}op._transcodeTaskProcessor=new Di("transcodeKTX2",Number.POSITIVE_INFINITY);op._readyPromise=void 0;function nRe(){let e=op._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(){return op._transcodeTaskProcessor});op._readyPromise=e}op.transcode=function(e,t){return l(op._readyPromise)||nRe(),op._readyPromise.then(function(n){let i;if(e instanceof ArrayBuffer){let o=new Uint8Array(e);return i={supportedTargetFormats:t,ktx2Buffer:o},n.scheduleTask(i,[e])}return i={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(i,[e.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]),r=o.length,s;for(s=0;s<i;s++){let a=n[s];for(let c=0;c<r;c++){let u=a[o[c]];a[o[c]]=new DI(u.internalFormat,u.datatype,u.width,u.height,u.levelBuffer)}}if(r===1){for(s=0;s<i;++s)n[s]=n[s][o[0]];i===1&&(n=n[0])}return n}).catch(function(n){throw n})};var gO=op;var lG={type:"Lagrange"};lG.getRequiredDataPoints=function(e){return Math.max(e+1,2)};lG.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<a;r++){let c=1;for(s=0;s<a;s++)if(s!==r){let u=t[r]-t[s];c*=(e-t[s])/u}for(s=0;s<i;s++)o[s]+=c*n[r*i+s]}return o};var yO=lG;var uG={type:"Linear"};uG.getRequiredDataPoints=function(e){return 2};uG.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c=t[0],u=t[1];for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+u*s-c*a)/(u-c);return o};var XA=uG;function iRe(e){let t=e.uint8Array,n=e.format,i=e.request,o=y(e.flipY,!1),r=y(e.skipColorSpaceConversion,!1),s=new Blob([t],{type:n}),a;return De.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(De.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new De({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(c){return l(a)&&window.URL.revokeObjectURL(a),c}).catch(function(c){return l(a)&&window.URL.revokeObjectURL(a),Promise.reject(c)})}var X_=iRe;var jee;qee.setKTX2SupportedFormats=function(e,t,n,i,o,r){jee={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function qee(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=De.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return gO.transcode(n,jee)})}var Ha=qee;function Bh(e){e=y(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(Bh.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});Bh.prototype.get=function(e){return this._array[e]};Bh.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};Bh.prototype.peek=function(){return this._array[this._length-1]};Bh.prototype.push=function(e){let t=this.length++;this._array[t]=e};Bh.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};Bh.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};Bh.prototype.resize=function(e){this.length=e};Bh.prototype.trim=function(e){e=y(e,this._length),this._array.length=e};var qu=Bh;function xO(){ye.throwInstantiationError()}Object.defineProperties(xO.prototype,{ellipsoid:{get:ye.throwInstantiationError}});xO.prototype.project=ye.throwInstantiationError;xO.prototype.unproject=ye.throwInstantiationError;var Yee=xO;var fG=[],dG=[];function oRe(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=fG,u=dG,f,d;for(f=0;f<s;++f)c[f]=e[i+f];for(d=0;d<a;++d)u[d]=e[o+d+1];f=0,d=0;for(let p=i;p<=r;++p){let _=c[f],m=u[d];f<s&&(d>=a||t(_,m,n)<=0)?(e[p]=_,++f):d<a&&(e[p]=m,++d)}}function hG(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);hG(e,t,n,i,r),hG(e,t,n,r+1,o),oRe(e,t,n,i,r,o)}function rRe(e,t,n){let i=e.length,o=Math.ceil(i*.5);fG.length=o,dG.length=o,hG(e,t,n,0,i-1),fG.length=0,dG.length=0}var Iy=rRe;function KA(e){e=y(e,y.EMPTY_OBJECT);let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(KA.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});KA.prototype.findTimeInterval=zi.prototype.findTimeInterval;KA.prototype.wrapTime=zi.prototype.wrapTime;KA.prototype.clampTime=zi.prototype.clampTime;KA.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=o*this._count+s;t[s]=n[a]*(1-r)+n[a+this._count]*r}return t};var CO=KA;var $S={};function Xee(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function mG(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function Kee(e){return e&=1431655765,e=(e^e>>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function pG(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}$S.encode2D=function(e,t){return(Xee(e)|Xee(t)<<1)>>>0};$S.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=Kee(e),t[1]=Kee(e>>1),t};$S.encode3D=function(e,t,n){return mG(e)|mG(t)<<1|mG(n)<<2};$S.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=pG(e),t[1]=pG(e>>1),t[2]=pG(e>>2),t};var Oy=$S;function Yu(e,t,n,i){this.near=y(e,0),this.nearValue=y(t,0),this.far=y(n,1),this.farValue=y(i,0)}Yu.clone=function(e,t){if(!!l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new Yu(e.near,e.nearValue,e.far,e.farValue)};Yu.packedLength=4;Yu.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};Yu.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Yu),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};Yu.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};Yu.prototype.clone=function(e){return Yu.clone(this,e)};Yu.prototype.equals=function(e){return Yu.equals(this,e)};var wt=Yu;var sRe={NONE:-1,PARTIAL:0,FULL:1},xr=Object.freeze(sRe);function Ga(e,t){this._occluderPosition=h.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var AO=new h;Object.defineProperties(Ga.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=h.clone(e,this._cameraPosition);let t=h.subtract(this._occluderPosition,e,AO),n=h.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=h.multiplyByScalar(t,n,AO);let a=o*o*n;s=h.add(e,h.multiplyByScalar(r,a,AO),AO)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});Ga.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new Ga(e,t)};var Zee=new h;Ga.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,Zee),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var aRe=new h;Ga.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,aRe),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,Zee),o=this._occluderRadius-n;if(o=h.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),o*o+n*n>h.magnitudeSquared(i)):!1;if(o>0){i=h.subtract(t,this._cameraPosition,i);let r=h.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var cRe=new h;Ga.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return xr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,cRe),o=this._occluderRadius-n,r=h.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let s=h.magnitudeSquared(i);return o*o+n*n<s?xr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?xr.FULL:xr.PARTIAL):(i=h.subtract(t,this._horizonPlanePosition,i),h.dot(i,this._horizonPlaneNormal)>-n?xr.PARTIAL:xr.FULL))}}return xr.NONE};var TO=new h;Ga.computeOccludeePoint=function(e,t,n){let i=h.clone(t),o=h.clone(e.center),r=e.radius,s=n.length,a=h.normalize(h.subtract(i,o,TO),TO),c=-h.dot(a,o),u=Ga._anyRotationVector(o,a,c),f=Ga._horizonToPlaneNormalDotProduct(e,a,c,u,n[0]);if(!f)return;let d;for(let _=1;_<s;++_){if(d=Ga._horizonToPlaneNormalDotProduct(e,a,c,u,n[_]),!d)return;d<f&&(f=d)}if(f<.0017453283658983088)return;let p=r/f;return h.add(o,h.multiplyByScalar(a,p,TO),TO)};var lRe=[];Ga.computeOccludeePointFromRectangle=function(e,t){t=y(t,re.WGS84);let n=de.subsample(e,t,0,lRe),i=oe.fromPoints(n),o=h.ZERO;if(!h.equals(o,i.center))return Ga.computeOccludeePoint(new oe(o,t.minimumRadius),i.center,n)};var uRe=new h;Ga._anyRotationVector=function(e,t,n){let i=h.abs(t,uRe),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new h,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=h.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=h.UNIT_Z);let a=(h.dot(t,i)+n)/-h.dot(t,s);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(s,a,r),i),e,i),i)};var fRe=new h;Ga._rotationVector=function(e,t,n,i,o){let r=h.subtract(i,e,fRe);if(r=h.normalize(r,r),h.dot(t,r)<.9999999847691291){let s=h.cross(t,r,r);if(h.magnitude(s)>R.EPSILON13)return h.normalize(s,new h)}return o};var _G=new h,dRe=new h,bO=new h,$ee=new h;Ga._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=h.clone(o,_G),s=h.clone(e.center,dRe),a=e.radius,c=h.subtract(s,r,bO),u=h.magnitudeSquared(c),f=a*a;if(u<f)return!1;let d=u-f,p=Math.sqrt(d),_=Math.sqrt(u),m=1/_,C=p*m*p;c=h.normalize(c,c);let A=h.add(r,h.multiplyByScalar(c,C,$ee),$ee),T=Math.sqrt(d-C*C),b=this._rotationVector(s,t,n,r,i),S=h.fromElements(b.x*b.x*c.x+(b.x*b.y-b.z)*c.y+(b.x*b.z+b.y)*c.z,(b.x*b.y+b.z)*c.x+b.y*b.y*c.y+(b.y*b.z-b.x)*c.z,(b.x*b.z-b.y)*c.x+(b.y*b.z+b.x)*c.y+b.z*b.z*c.z,_G);S=h.normalize(S,S);let w=h.multiplyByScalar(S,T,_G);b=h.normalize(h.subtract(h.add(A,w,bO),s,bO),bO);let D=h.dot(t,b);b=h.normalize(h.subtract(h.subtract(A,w,b),s,b),b);let O=h.dot(t,b);return D<O?D:O};var EO=Ga;function ZS(e,t,n){e=y(e,0),t=y(t,0),n=y(n,0),this.value=new Float32Array([e,t,n])}Object.defineProperties(ZS.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});ZS.fromCartesian3=function(e){return new ZS(e.x,e.y,e.z)};ZS.toValue=function(e,t){return l(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var Zi=ZS;function gG(e,t,n){e=De.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=y(n,{})}Object.defineProperties(gG.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}});gG.prototype.geocode=function(e){return this._url.getDerivedResource({url:"json",queryParameters:at(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=de.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let s=i.geometry.lat,a=i.geometry.lng;o=h.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var Jee=gG;var hRe={packedLength:void 0,pack:ye.throwInstantiationError,unpack:ye.throwInstantiationError},Qee=hRe;var mRe={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:ye.throwInstantiationError,unpackInterpolationResult:ye.throwInstantiationError},ete=mRe;function pRe(e,t,n,i,o){let r=e.measureText(t);if(!!/\S/.test(t)){let a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),c=document.createElement("canvas"),u=100,f=r.width+u|0,d=3*a,p=d/2;c.width=f,c.height=d;let _=c.getContext("2d");_.font=n,_.fillStyle="white",_.fillRect(0,0,c.width+1,c.height+1),i&&(_.strokeStyle="black",_.lineWidth=e.lineWidth,_.strokeText(t,u/2,p)),o&&(_.fillStyle="black",_.fillText(t,u/2,p));let m=_.getImageData(0,0,f,d).data,x=m.length,C=f*4,A,T,b,S;for(A=0;A<x;++A)if(m[A]!==255){b=A/C|0;break}for(A=x-1;A>=0;--A)if(m[A]!==255){S=A/C|0;break}let w=-1;for(A=0;A<f&&w===-1;++A)for(T=0;T<d;++T){let D=A*4+T*C;if(m[D]!==255||m[D+1]!==255||m[D+2]!==255||m[D+3]!==255){w=A;break}}return{width:r.width,height:S-b,ascent:p-b,descent:S-p,minx:w-u/2}}return{width:r.width,height:0,ascent:0,descent:0,minx:0}}var Ry;function _Re(e,t){if(e==="")return;t=y(t,y.EMPTY_OBJECT);let n=y(t.font,"10px sans-serif"),i=y(t.stroke,!1),o=y(t.fill,!0),r=y(t.strokeWidth,1),s=y(t.backgroundColor,z.TRANSPARENT),a=y(t.padding,0),c=a*2,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;let f=u.getContext("2d");l(Ry)||(l(f.imageSmoothingEnabled)?Ry="imageSmoothingEnabled":l(f.mozImageSmoothingEnabled)?Ry="mozImageSmoothingEnabled":l(f.webkitImageSmoothingEnabled)?Ry="webkitImageSmoothingEnabled":l(f.msImageSmoothingEnabled)&&(Ry="msImageSmoothingEnabled")),f.font=n,f.lineJoin="round",f.lineWidth=r,f[Ry]=!1,u.style.visibility="hidden",document.body.appendChild(u);let d=pRe(f,e,n,i,o);u.dimensions=d,document.body.removeChild(u),u.style.visibility="";let p=-d.minx,_=Math.ceil(d.width)+p+c,m=d.height+c,x=m-d.ascent+a,C=m-x+c;if(u.width=_,u.height=m,f.font=n,f.lineJoin="round",f.lineWidth=r,f[Ry]=!1,s!==z.TRANSPARENT&&(f.fillStyle=s.toCssColorString(),f.fillRect(0,0,u.width,u.height)),i){let A=y(t.strokeColor,z.BLACK);f.strokeStyle=A.toCssColorString(),f.strokeText(e,p+a,C)}if(o){let A=y(t.fillColor,z.WHITE);f.fillStyle=A.toCssColorString(),f.fillText(e,p+a,C)}return u}var $A=_Re;function QS(){this._cache={}}QS.prototype.fromColor=function(e,t){return SO(void 0,void 0,e,t,this._cache)};QS.prototype.fromUrl=function(e,t,n){return SO(e,void 0,t,n,this._cache)};QS.prototype.fromMakiIconId=function(e,t,n){return SO(Jt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};QS.prototype.fromText=function(e,t,n){return SO(void 0,e,t,n,this._cache)};var gRe=new z;function yRe(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,gRe).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function tte(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));let s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=z.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=z.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}var JS=new Array(4);function SO(e,t,n,i,o){JS[0]=e,JS[1]=t,JS[2]=n,JS[3]=i;let r=JSON.stringify(JS),s=o[r];if(l(s))return s;let a=document.createElement("canvas");a.width=i,a.height=i;let c=a.getContext("2d");if(yRe(c,n,i),l(e)){let f=De.createIfNeeded(e).fetchImage().then(function(d){return tte(c,d,i),o[r]=a,a});return o[r]=f,f}else if(l(t)){let u=$A(t,{font:`bold ${i}px sans-serif`});tte(c,u,i)}return o[r]=a,a}var K_=QS;var Ci={UNSIGNED_BYTE:Z.UNSIGNED_BYTE,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,UNSIGNED_INT:Z.UNSIGNED_INT,FLOAT:Z.FLOAT,HALF_FLOAT:Z.HALF_FLOAT_OES,UNSIGNED_INT_24_8:Z.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:Z.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:Z.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:Z.UNSIGNED_SHORT_5_6_5};Ci.toWebGLConstant=function(e,t){switch(e){case Ci.UNSIGNED_BYTE:return Z.UNSIGNED_BYTE;case Ci.UNSIGNED_SHORT:return Z.UNSIGNED_SHORT;case Ci.UNSIGNED_INT:return Z.UNSIGNED_INT;case Ci.FLOAT:return Z.FLOAT;case Ci.HALF_FLOAT:return t.webgl2?Z.HALF_FLOAT:Z.HALF_FLOAT_OES;case Ci.UNSIGNED_INT_24_8:return Z.UNSIGNED_INT_24_8;case Ci.UNSIGNED_SHORT_4_4_4_4:return Z.UNSIGNED_SHORT_4_4_4_4;case Ci.UNSIGNED_SHORT_5_5_5_1:return Z.UNSIGNED_SHORT_5_5_5_1;case Ci.UNSIGNED_SHORT_5_6_5:return Ci.UNSIGNED_SHORT_5_6_5}};Ci.isPacked=function(e){return e===Ci.UNSIGNED_INT_24_8||e===Ci.UNSIGNED_SHORT_4_4_4_4||e===Ci.UNSIGNED_SHORT_5_5_5_1||e===Ci.UNSIGNED_SHORT_5_6_5};Ci.sizeInBytes=function(e){switch(e){case Ci.UNSIGNED_BYTE:return 1;case Ci.UNSIGNED_SHORT:case Ci.UNSIGNED_SHORT_4_4_4_4:case Ci.UNSIGNED_SHORT_5_5_5_1:case Ci.UNSIGNED_SHORT_5_6_5:case Ci.HALF_FLOAT:return 2;case Ci.UNSIGNED_INT:case Ci.FLOAT:case Ci.UNSIGNED_INT_24_8:return 4}};Ci.validate=function(e){return e===Ci.UNSIGNED_BYTE||e===Ci.UNSIGNED_SHORT||e===Ci.UNSIGNED_INT||e===Ci.FLOAT||e===Ci.HALF_FLOAT||e===Ci.UNSIGNED_INT_24_8||e===Ci.UNSIGNED_SHORT_4_4_4_4||e===Ci.UNSIGNED_SHORT_5_5_5_1||e===Ci.UNSIGNED_SHORT_5_6_5};var Xe=Object.freeze(Ci);var rt={DEPTH_COMPONENT:Z.DEPTH_COMPONENT,DEPTH_STENCIL:Z.DEPTH_STENCIL,ALPHA:Z.ALPHA,RGB:Z.RGB,RGBA:Z.RGBA,LUMINANCE:Z.LUMINANCE,LUMINANCE_ALPHA:Z.LUMINANCE_ALPHA,RGB_DXT1:Z.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:Z.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:Z.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:Z.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:Z.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:Z.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:Z.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:Z.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:Z.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:Z.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:Z.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:Z.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:Z.COMPRESSED_RGBA_BPTC_UNORM};rt.componentsLength=function(e){switch(e){case rt.RGB:return 3;case rt.RGBA:return 4;case rt.LUMINANCE_ALPHA:return 2;case rt.ALPHA:case rt.LUMINANCE:return 1;default:return 1}};rt.validate=function(e){return e===rt.DEPTH_COMPONENT||e===rt.DEPTH_STENCIL||e===rt.ALPHA||e===rt.RGB||e===rt.RGBA||e===rt.LUMINANCE||e===rt.LUMINANCE_ALPHA||e===rt.RGB_DXT1||e===rt.RGBA_DXT1||e===rt.RGBA_DXT3||e===rt.RGBA_DXT5||e===rt.RGB_PVRTC_4BPPV1||e===rt.RGB_PVRTC_2BPPV1||e===rt.RGBA_PVRTC_4BPPV1||e===rt.RGBA_PVRTC_2BPPV1||e===rt.RGBA_ASTC||e===rt.RGB_ETC1||e===rt.RGB8_ETC2||e===rt.RGBA8_ETC2_EAC||e===rt.RGBA_BC7};rt.isColorFormat=function(e){return e===rt.ALPHA||e===rt.RGB||e===rt.RGBA||e===rt.LUMINANCE||e===rt.LUMINANCE_ALPHA};rt.isDepthFormat=function(e){return e===rt.DEPTH_COMPONENT||e===rt.DEPTH_STENCIL};rt.isCompressedFormat=function(e){return e===rt.RGB_DXT1||e===rt.RGBA_DXT1||e===rt.RGBA_DXT3||e===rt.RGBA_DXT5||e===rt.RGB_PVRTC_4BPPV1||e===rt.RGB_PVRTC_2BPPV1||e===rt.RGBA_PVRTC_4BPPV1||e===rt.RGBA_PVRTC_2BPPV1||e===rt.RGBA_ASTC||e===rt.RGB_ETC1||e===rt.RGB8_ETC2||e===rt.RGBA8_ETC2_EAC||e===rt.RGBA_BC7};rt.isDXTFormat=function(e){return e===rt.RGB_DXT1||e===rt.RGBA_DXT1||e===rt.RGBA_DXT3||e===rt.RGBA_DXT5};rt.isPVRTCFormat=function(e){return e===rt.RGB_PVRTC_4BPPV1||e===rt.RGB_PVRTC_2BPPV1||e===rt.RGBA_PVRTC_4BPPV1||e===rt.RGBA_PVRTC_2BPPV1};rt.isASTCFormat=function(e){return e===rt.RGBA_ASTC};rt.isETC1Format=function(e){return e===rt.RGB_ETC1};rt.isETC2Format=function(e){return e===rt.RGB8_ETC2||e===rt.RGBA8_ETC2_EAC};rt.isBC7Format=function(e){return e===rt.RGBA_BC7};rt.compressedTextureSizeInBytes=function(e,t,n){switch(e){case rt.RGB_DXT1:case rt.RGBA_DXT1:case rt.RGB_ETC1:case rt.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case rt.RGBA_DXT3:case rt.RGBA_DXT5:case rt.RGBA_ASTC:case rt.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case rt.RGB_PVRTC_4BPPV1:case rt.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case rt.RGB_PVRTC_2BPPV1:case rt.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case rt.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};rt.textureSizeInBytes=function(e,t,n,i){let o=rt.componentsLength(e);return Xe.isPacked(t)&&(o=1),o*Xe.sizeInBytes(t)*n*i};rt.alignmentInBytes=function(e,t,n){let i=rt.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};rt.createTypedArray=function(e,t,n,i){let o,r=Xe.sizeInBytes(t);r===Uint8Array.BYTES_PER_ELEMENT?o=Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?o=Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===Xe.FLOAT?o=Float32Array:o=Uint32Array;let s=rt.componentsLength(e)*n*i;return new o(s)};rt.flipY=function(e,t,n,i,o){if(o===1)return e;let r=rt.createTypedArray(t,n,i,o),s=rt.componentsLength(t),a=i*s;for(let c=0;c<o;++c){let u=c*i*s,f=(o-c-1)*i*s;for(let d=0;d<a;++d)r[f+d]=e[u+d]}return r};rt.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===rt.DEPTH_STENCIL)return Z.DEPTH24_STENCIL8;if(e===rt.DEPTH_COMPONENT){if(t===Xe.UNSIGNED_SHORT)return Z.DEPTH_COMPONENT16;if(t===Xe.UNSIGNED_INT)return Z.DEPTH_COMPONENT24}if(t===Xe.FLOAT)switch(e){case rt.RGBA:return Z.RGBA32F;case rt.RGB:return Z.RGB32F;case rt.RG:return Z.RG32F;case rt.R:return Z.R32F}if(t===Xe.HALF_FLOAT)switch(e){case rt.RGBA:return Z.RGBA16F;case rt.RGB:return Z.RGB16F;case rt.RG:return Z.RG16F;case rt.R:return Z.R16F}return e};var ft=Object.freeze(rt);function ZA(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.vertexFormat,Pe.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}ZA.packedLength=Pe.packedLength;ZA.pack=function(e,t,n){return n=y(n,0),Pe.pack(e._vertexFormat,t,n),t};var nte=new Pe,xRe={vertexFormat:nte};ZA.unpack=function(e,t,n){t=y(t,0);let i=Pe.unpack(e,t,nte);return l(n)?(n._vertexFormat=Pe.clone(i,n._vertexFormat),n):new ZA(xRe)};var wO=new h(-.5,-.5,0),vO=new h(.5,.5,0);ZA.createGeometry=function(e){let t=e._vertexFormat,n=new ln,i,o;if(t.position){if(o=new Float64Array(4*3),o[0]=wO.x,o[1]=wO.y,o[2]=0,o[3]=vO.x,o[4]=wO.y,o[5]=0,o[6]=vO.x,o[7]=vO.y,o[8]=0,o[9]=wO.x,o[10]=vO.y,o[11]=0,n.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(2*3),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new ct({attributes:n,indices:i,primitiveType:Le.TRIANGLES,boundingSphere:new oe(h.ZERO,Math.sqrt(2))})};var DO=ZA;function JA(){this._workerName="createPlaneOutlineGeometry"}JA.packedLength=0;JA.pack=function(e,t){return t};JA.unpack=function(e,t,n){return l(n)?n:new JA};var $_=new h(-.5,-.5,0),PO=new h(.5,.5,0);JA.createGeometry=function(){let e=new ln,t=new Uint16Array(4*2),n=new Float64Array(4*3);return n[0]=$_.x,n[1]=$_.y,n[2]=$_.z,n[3]=PO.x,n[4]=$_.y,n[5]=$_.z,n[6]=PO.x,n[7]=PO.y,n[8]=$_.z,n[9]=$_.x,n[10]=PO.y,n[11]=$_.z,e.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new ct({attributes:e,indices:t,primitiveType:Le.LINES,boundingSphere:new oe(h.ZERO,Math.sqrt(2))})};var IO=JA;var CRe=new h;function ARe(e,t,n,i){let o=uA(e,t,n,i,CRe);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var ite=ARe;var TRe=new me,ote=new me;function bRe(e,t,n,i){let r=i.cartesianToCartographic(e,TRe).height,s=i.cartesianToCartographic(t,ote);s.height=r,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,ote);a.height=r-100,i.cartographicToCartesian(a,n)}var ERe=new qe,SRe=new h,wRe=new h,vRe=new h,DRe=new h,PRe=new h,IRe=new h,OO=new h,Lh=new h,QA=new h,ORe=new G,RRe=new G,MRe=new h,rte=new Me,BRe=new Q,LRe=new Q;function yG(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=l(n.attributes.st)?n.attributes.st.values:void 0,s=o.length,a=e.wall,c=e.top||a,u=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){let f=e.boundingRectangle,d=e.tangentPlane,p=e.ellipsoid,_=e.stRotation,m=e.perPositionHeight,x=ORe;x.x=f.x,x.y=f.y;let C=t.st?new Float32Array(2*(s/3)):void 0,A;t.normal&&(m&&c&&!a?A=n.attributes.normal.values:A=new Float32Array(s));let T=t.tangent?new Float32Array(s):void 0,b=t.bitangent?new Float32Array(s):void 0,S=i?new Float32Array(s):void 0,w=0,D=0,O=wRe,I=vRe,L=DRe,N=!0,g=BRe,E=LRe;if(_!==0){let M=Me.fromAxisAngle(d._plane.normal,_,rte);g=Q.fromQuaternion(M,g),M=Me.fromAxisAngle(d._plane.normal,-_,rte),E=Q.fromQuaternion(M,E)}else g=Q.clone(Q.IDENTITY,g),E=Q.clone(Q.IDENTITY,E);let v=0,P=0;c&&u&&(v=s/2,P=s/3,s/=2);for(let M=0;M<s;M+=3){let V=h.fromArray(o,M,MRe);if(t.st&&!l(r)){let U=Q.multiplyByVector(g,V,SRe);U=p.scaleToGeodeticSurface(U,U);let k=d.projectPointOntoPlane(U,RRe);G.subtract(k,x,k);let H=R.clamp(k.x/f.width,0,1),F=R.clamp(k.y/f.height,0,1);u&&(C[w+P]=H,C[w+1+P]=F),c&&(C[w]=H,C[w+1]=F),w+=2}if(t.normal||t.tangent||t.bitangent||i){let U=D+1,k=D+2;if(a){if(M+3<s){let H=h.fromArray(o,M+3,PRe);if(N){let F=h.fromArray(o,M+s,IRe);m&&bRe(V,H,F,p),h.subtract(H,V,H),h.subtract(F,V,F),O=h.normalize(h.cross(F,H,O),O),N=!1}h.equalsEpsilon(H,V,R.EPSILON10)&&(N=!0)}(t.tangent||t.bitangent)&&(L=p.geodeticSurfaceNormal(V,L),t.tangent&&(I=h.normalize(h.cross(L,O,I),I)))}else O=p.geodeticSurfaceNormal(V,O),(t.tangent||t.bitangent)&&(m&&(OO=h.fromArray(A,D,OO),Lh=h.cross(h.UNIT_Z,OO,Lh),Lh=h.normalize(Q.multiplyByVector(E,Lh,Lh),Lh),t.bitangent&&(QA=h.normalize(h.cross(OO,Lh,QA),QA))),I=h.cross(h.UNIT_Z,O,I),I=h.normalize(Q.multiplyByVector(E,I,I),I),t.bitangent&&(L=h.normalize(h.cross(O,I,L),L)));t.normal&&(e.wall?(A[D+v]=O.x,A[U+v]=O.y,A[k+v]=O.z):u&&(A[D+v]=-O.x,A[U+v]=-O.y,A[k+v]=-O.z),(c&&!m||a)&&(A[D]=O.x,A[U]=O.y,A[k]=O.z)),i&&(a&&(O=p.geodeticSurfaceNormal(V,O)),S[D+v]=-O.x,S[U+v]=-O.y,S[k+v]=-O.z),t.tangent&&(e.wall?(T[D+v]=I.x,T[U+v]=I.y,T[k+v]=I.z):u&&(T[D+v]=-I.x,T[U+v]=-I.y,T[k+v]=-I.z),c&&(m?(T[D]=Lh.x,T[U]=Lh.y,T[k]=Lh.z):(T[D]=I.x,T[U]=I.y,T[k]=I.z))),t.bitangent&&(u&&(b[D+v]=L.x,b[U+v]=L.y,b[k+v]=L.z),c&&(m?(b[D]=QA.x,b[U]=QA.y,b[k]=QA.z):(b[D]=L.x,b[U]=L.y,b[k]=L.z))),D+=3}}t.st&&!l(r)&&(n.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:C})),t.normal&&(n.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(n.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(n.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),i&&(n.attributes.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:S}))}if(e.extrude&&l(e.offsetAttribute)){let f=o.length/3,d=new Uint8Array(f);if(e.offsetAttribute===tn.TOP)c&&u||a?d=d.fill(1,0,f/2):c&&(d=d.fill(1));else{let p=e.offsetAttribute===tn.NONE?0:1;d=d.fill(p)}n.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return n}var NRe=new me,FRe=new me,Z_={westOverIDL:0,eastOverIDL:0},eT=new td;function cte(e,t,n,i,o){if(o=y(o,new de),!l(e)||e.length<3)return o.west=0,o.north=0,o.south=0,o.east=0,o;if(n===Yt.RHUMB)return de.fromCartesianArray(e,t,o);eT.ellipsoid.equals(t)||(eT=new td(void 0,void 0,t)),o.west=Number.POSITIVE_INFINITY,o.east=Number.NEGATIVE_INFINITY,o.south=Number.POSITIVE_INFINITY,o.north=Number.NEGATIVE_INFINITY,Z_.westOverIDL=Number.POSITIVE_INFINITY,Z_.eastOverIDL=Number.NEGATIVE_INFINITY;let r=1/R.chordLength(i,t.maximumRadius),s=e.length,a=t.cartesianToCartographic(e[0],FRe),c=NRe,u;for(let f=1;f<s;f++)u=c,c=a,a=t.cartesianToCartographic(e[f],u),eT.setEndPoints(c,a),ste(eT,r,o,Z_);return u=c,c=a,a=t.cartesianToCartographic(e[0],u),eT.setEndPoints(c,a),ste(eT,r,o,Z_),o.east-o.west>Z_.eastOverIDL-Z_.westOverIDL&&(o.west=Z_.westOverIDL,o.east=Z_.eastOverIDL,o.east>R.PI&&(o.east=o.east-R.TWO_PI),o.west>R.PI&&(o.west=o.west-R.TWO_PI)),o}var VRe=new me;function ste(e,t,n,i){let o=e.surfaceDistance,r=Math.ceil(o*t),s=r>0?o/(r-1):Number.POSITIVE_INFINITY,a=0;for(let c=0;c<r;c++){let u=e.interpolateUsingSurfaceDistance(a,VRe);a+=s;let f=u.longitude,d=u.latitude;n.west=Math.min(n.west,f),n.east=Math.max(n.east,f),n.south=Math.min(n.south,d),n.north=Math.max(n.north,d);let p=f>=0?f:f+R.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,p),i.eastOverIDL=Math.max(i.eastOverIDL,p)}}var ate=[];function kRe(e,t,n,i,o,r,s,a,c,u){let f={walls:[]},d;if(s||a){let T=Un.createGeometryFromPositions(e,t,n,i,r,c,u),b=T.attributes.position.values,S=T.indices,w,D;if(s&&a){let O=b.concat(b);w=O.length/3,D=Ne.createTypedArray(w,S.length*2),D.set(S);let I=S.length,L=w/2;for(d=0;d<I;d+=3){let N=D[d]+L,g=D[d+1]+L,E=D[d+2]+L;D[d+I]=E,D[d+1+I]=g,D[d+2+I]=N}if(T.attributes.position.values=O,r&&c.normal){let N=T.attributes.normal.values;T.attributes.normal.values=new Float32Array(O.length),T.attributes.normal.values.set(N)}if(c.st&&l(n)){let N=T.attributes.st.values;T.attributes.st.values=new Float32Array(w*2),T.attributes.st.values=N.concat(N)}T.indices=D}else if(a){for(w=b.length/3,D=Ne.createTypedArray(w,S.length),d=0;d<S.length;d+=3)D[d]=S[d+2],D[d+1]=S[d+1],D[d+2]=S[d];T.indices=D}f.topAndBottom=new pt({geometry:T})}let p=o.outerRing,_=Fa.fromPoints(p,e),m=_.projectPointsOntoPlane(p,ate),x=ti.computeWindingOrder2D(m);x===fs.CLOCKWISE&&(p=p.slice().reverse());let C=Un.computeWallGeometry(p,n,e,i,r,u);f.walls.push(new pt({geometry:C}));let A=o.holes;for(d=0;d<A.length;d++){let T=A[d];_=Fa.fromPoints(T,e),m=_.projectPointsOntoPlane(T,ate),x=ti.computeWindingOrder2D(m),x===fs.COUNTER_CLOCKWISE&&(T=T.slice().reverse()),C=Un.computeWallGeometry(T,n,e,i,r,u),f.walls.push(new pt({geometry:C}))}return f}function rd(e){let t=e.polygonHierarchy,n=y(e.vertexFormat,Pe.DEFAULT),i=y(e.ellipsoid,re.WGS84),o=y(e.granularity,R.RADIANS_PER_DEGREE),r=y(e.stRotation,0),s=e.textureCoordinates,a=y(e.perPositionHeight,!1),c=a&&l(e.extrudedHeight),u=y(e.height,0),f=y(e.extrudedHeight,u);if(!c){let d=Math.max(u,f);f=Math.min(u,f),u=d}this._vertexFormat=Pe.clone(n),this._ellipsoid=re.clone(i),this._granularity=o,this._stRotation=r,this._height=u,this._extrudedHeight=f,this._closeTop=y(e.closeTop,!0),this._closeBottom=y(e.closeBottom,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=c,this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=y(e.arcType,Yt.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=Un.computeHierarchyPackedLength(t,h)+re.packedLength+Pe.packedLength+(s?Un.computeHierarchyPackedLength(s,G):1)+12}rd.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates};return new rd(t)};rd.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=y(e._offsetAttribute,-1),t[n++]=e._arcType,l(e._textureCoordinates)?n=Un.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};var URe=re.clone(re.UNIT_SPHERE),zRe=new Pe,HRe={polygonHierarchy:{}};rd.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,URe);t+=re.packedLength;let r=Pe.unpack(e,t,zRe);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++]===1,d=e[t++]===1,p=e[t++]===1,_=e[t++]===1,m=e[t++]===1,x=e[t++],C=e[t++],A=e[t]===-1?void 0:Un.unpackPolygonHierarchy(e,t,G);l(A)?(t=A.startingIndex,delete A.startingIndex):t++;let T=e[t++];return l(n)||(n=new rd(HRe)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=c,n._stRotation=u,n._perPositionHeightExtrude=f,n._perPositionHeight=d,n._closeTop=p,n._closeBottom=_,n._shadowVolume=m,n._offsetAttribute=x===-1?void 0:x,n._arcType=C,n._textureCoordinates=A,n.packedLength=T,n};rd.computeRectangle=function(e,t){let n=y(e.granularity,R.RADIANS_PER_DEGREE),i=y(e.arcType,Yt.GEODESIC),o=e.polygonHierarchy,r=y(e.ellipsoid,re.WGS84);return cte(o.positions,r,i,n,t)};rd.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,u=e._arcType,f=e._textureCoordinates,d=l(f),p=r.positions;if(p.length<3)return;let _=Fa.fromPoints(p,n),m=Un.polygonsFromHierarchy(r,d,_.projectPointsOntoPlane.bind(_),!s,n),x=m.hierarchy,C=m.polygons,A=function(v){return v},T=d?Un.polygonsFromHierarchy(f,!0,A,!1).polygons:void 0;if(x.length===0)return;p=x[0].outerRing;let b=Un.computeBoundingRectangle(_.plane.normal,_.projectPointOntoPlane.bind(_),p,o,ERe),S=[],w=e._height,D=e._extrudedHeight,O=e._perPositionHeightExtrude||!R.equalsEpsilon(w,D,0,R.EPSILON2),I={perPositionHeight:s,vertexFormat:t,geometry:void 0,tangentPlane:_,boundingRectangle:b,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},L;if(O)for(I.extrude=!0,I.top=a,I.bottom=c,I.shadowVolume=e._shadowVolume,I.offsetAttribute=e._offsetAttribute,L=0;L<C.length;L++){let v=kRe(n,C[L],d?T[L]:void 0,i,x[L],s,a,c,t,u),P;a&&c?(P=v.topAndBottom,I.geometry=Un.scaleToGeodeticHeightExtruded(P.geometry,w,D,n,s)):a?(P=v.topAndBottom,P.geometry.attributes.position.values=ti.scaleToGeodeticHeight(P.geometry.attributes.position.values,w,n,!s),I.geometry=P.geometry):c&&(P=v.topAndBottom,P.geometry.attributes.position.values=ti.scaleToGeodeticHeight(P.geometry.attributes.position.values,D,n,!0),I.geometry=P.geometry),(a||c)&&(I.wall=!1,P.geometry=yG(I),S.push(P));let M=v.walls;I.wall=!0;for(let V=0;V<M.length;V++){let U=M[V];I.geometry=Un.scaleToGeodeticHeightExtruded(U.geometry,w,D,n,s),U.geometry=yG(I),S.push(U)}}else for(L=0;L<C.length;L++){let v=new pt({geometry:Un.createGeometryFromPositions(n,C[L],d?T[L]:void 0,i,s,t,u)});if(v.geometry.attributes.position.values=ti.scaleToGeodeticHeight(v.geometry.attributes.position.values,w,n,!s),I.geometry=v.geometry,v.geometry=yG(I),l(e._offsetAttribute)){let P=v.geometry.attributes.position.values.length,M=e._offsetAttribute===tn.NONE?0:1,V=new Uint8Array(P/3).fill(M);v.geometry.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}S.push(v)}let N=Rn.combineInstances(S)[0];N.attributes.position.values=new Float64Array(N.attributes.position.values),N.indices=Ne.createTypedArray(N.attributes.position.values.length/3,N.indices);let g=N.attributes,E=oe.fromVertices(g.position.values);return t.position||delete g.position,new ct({attributes:g,indices:N.indices,primitiveType:N.primitiveType,boundingSphere:E,offsetAttribute:e._offsetAttribute})};rd.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new rd({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function GRe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let n=e._ellipsoid,i=e._polygonHierarchy.positions,o=e.rectangle;return ct._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(rd.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=cte(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=GRe(this)),this._textureCoordinateRotationPoints}}});var tT=rd;function WRe(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var dl=WRe;var lte=[],RO=[];function jRe(e,t,n,i,o){let s=Fa.fromPoints(t,e).projectPointsOntoPlane(t,lte);ti.computeWindingOrder2D(s)===fs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=0;if(i)for(c=new Float64Array(f*2*3),u=0;u<f;u++){let m=t[u],x=t[(u+1)%f];c[d++]=m.x,c[d++]=m.y,c[d++]=m.z,c[d++]=x.x,c[d++]=x.y,c[d++]=x.z}else{let m=0;if(o===Yt.GEODESIC)for(u=0;u<f;u++)m+=Un.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===Yt.RHUMB)for(u=0;u<f;u++)m+=Un.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(m*3),u=0;u<f;u++){let x;o===Yt.GEODESIC?x=Un.subdivideLine(t[u],t[(u+1)%f],n,RO):o===Yt.RHUMB&&(x=Un.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,RO));let C=x.length;for(let A=0;A<C;++A)c[d++]=x[A]}}f=c.length/3;let p=f*2,_=Ne.createTypedArray(f,p);for(d=0,u=0;u<f-1;u++)_[d++]=u,_[d++]=u+1;return _[d++]=f-1,_[d++]=0,new pt({geometry:new ct({attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:_,primitiveType:Le.LINES})})}function qRe(e,t,n,i,o){let s=Fa.fromPoints(t,e).projectPointsOntoPlane(t,lte);ti.computeWindingOrder2D(s)===fs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=new Array(f),p=0;if(i)for(c=new Float64Array(f*2*3*2),u=0;u<f;++u){d[u]=p/3;let C=t[u],A=t[(u+1)%f];c[p++]=C.x,c[p++]=C.y,c[p++]=C.z,c[p++]=A.x,c[p++]=A.y,c[p++]=A.z}else{let C=0;if(o===Yt.GEODESIC)for(u=0;u<f;u++)C+=Un.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===Yt.RHUMB)for(u=0;u<f;u++)C+=Un.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(C*3*2),u=0;u<f;++u){d[u]=p/3;let A;o===Yt.GEODESIC?A=Un.subdivideLine(t[u],t[(u+1)%f],n,RO):o===Yt.RHUMB&&(A=Un.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,RO));let T=A.length;for(let b=0;b<T;++b)c[p++]=A[b]}}f=c.length/(3*2);let _=d.length,m=(f*2+_)*2,x=Ne.createTypedArray(f+_,m);for(p=0,u=0;u<f;++u)x[p++]=u,x[p++]=(u+1)%f,x[p++]=u+f,x[p++]=(u+1)%f+f;for(u=0;u<_;u++){let C=d[u];x[p++]=C,x[p++]=C+f}return new pt({geometry:new ct({attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:x,primitiveType:Le.LINES})})}function My(e){let t=e.polygonHierarchy,n=y(e.ellipsoid,re.WGS84),i=y(e.granularity,R.RADIANS_PER_DEGREE),o=y(e.perPositionHeight,!1),r=o&&l(e.extrudedHeight),s=y(e.arcType,Yt.GEODESIC),a=y(e.height,0),c=y(e.extrudedHeight,a);if(!r){let u=Math.max(a,c);c=Math.min(a,c),a=u}this._ellipsoid=re.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=Un.computeHierarchyPackedLength(t,h)+re.packedLength+8}My.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=y(e._offsetAttribute,-1),t[n]=e.packedLength,t};var YRe=re.clone(re.UNIT_SPHERE),XRe={polygonHierarchy:{}};My.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,YRe);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,u=e[t++]===1,f=e[t++],d=e[t++],p=e[t];return l(n)||(n=new My(XRe)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=c,n._arcType=f,n._offsetAttribute=d===-1?void 0:d,n.packedLength=p,n};My.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new My(t)};My.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=Un.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,c=[],u=R.chordLength(n,t.maximumRadius),f=e._height,d=e._extrudedHeight,p=e._perPositionHeightExtrude||!R.equalsEpsilon(f,d,0,R.EPSILON2),_,m;if(p)for(m=0;m<s.length;m++){if(a=qRe(t,s[m],u,o,r),a.geometry=Un.scaleToGeodeticHeightExtruded(a.geometry,f,d,t,o),l(e._offsetAttribute)){let A=a.geometry.attributes.position.values.length/3,T=new Uint8Array(A);e._offsetAttribute===tn.TOP?T=T.fill(1,0,A/2):(_=e._offsetAttribute===tn.NONE?0:1,T=T.fill(_)),a.geometry.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}c.push(a)}else for(m=0;m<s.length;m++){if(a=jRe(t,s[m],u,o,r),a.geometry.attributes.position.values=ti.scaleToGeodeticHeight(a.geometry.attributes.position.values,f,t,!o),l(e._offsetAttribute)){let A=a.geometry.attributes.position.values.length;_=e._offsetAttribute===tn.NONE?0:1;let T=new Uint8Array(A/3).fill(_);a.geometry.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}c.push(a)}let x=Rn.combineInstances(c)[0],C=oe.fromVertices(x.attributes.position.values);return new ct({attributes:x.attributes,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:C,offsetAttribute:e._offsetAttribute})};var MO=My;var mte=[];function KRe(e,t,n,i,o){let r=mte;r.length=o;let s,a=n.red,c=n.green,u=n.blue,f=n.alpha,d=i.red,p=i.green,_=i.blue,m=i.alpha;if(z.equals(n,i)){for(s=0;s<o;s++)r[s]=z.clone(n);return r}let x=(d-a)/o,C=(p-c)/o,A=(_-u)/o,T=(m-f)/o;for(s=0;s<o;s++)r[s]=new z(a+s*x,c+s*C,u+s*A,f+s*T);return r}function ew(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=y(e.width,1),o=y(e.colorsPerVertex,!1);this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._arcType=y(e.arcType,Yt.GEODESIC),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._workerName="createPolylineGeometry";let r=1+t.length*h.packedLength;r+=l(n)?1+n.length*z.packedLength:1,this.packedLength=r+re.packedLength+Pe.packedLength+4}ew.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var pte=re.clone(re.UNIT_SPHERE),_te=new Pe,By={positions:void 0,colors:void 0,ellipsoid:pte,vertexFormat:_te,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};ew.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=re.unpack(e,t,pte);t+=re.packedLength;let c=Pe.unpack(e,t,_te);t+=Pe.packedLength;let u=e[t++],f=e[t++]===1,d=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=re.clone(a,n._ellipsoid),n._vertexFormat=Pe.clone(c,n._vertexFormat),n._width=u,n._colorsPerVertex=f,n._arcType=d,n._granularity=p,n):(By.positions=r,By.colors=s,By.width=u,By.colorsPerVertex=f,By.arcType=d,By.granularity=p,new ew(By))};var ute=new h,fte=new h,dte=new h,hte=new h;ew.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid,c,u,f,d=[],p=So(e._positions,h.equalsEpsilon,!1,d);if(l(i)&&d.length>0){let M=0,V=d[0];i=i.filter(function(U,k){let H=!1;return o?H=k===V||k===0&&V===1:H=k+1===V,H?(M++,V=d[M],!1):!0})}let _=p.length;if(_<2||t<=0)return;if(r===Yt.GEODESIC||r===Yt.RHUMB){let M,V;r===Yt.GEODESIC?(M=R.chordLength(s,a.maximumRadius),V=Oi.numberOfPoints):(M=s,V=Oi.numberOfPointsRhumbLine);let U=Oi.extractHeights(p,a);if(l(i)){let k=1;for(c=0;c<_-1;++c)k+=V(p[c],p[c+1],M);let H=new Array(k),F=0;for(c=0;c<_-1;++c){let Y=p[c],j=p[c+1],X=i[c],W=V(Y,j,M);if(o&&c<k){let $=i[c+1],J=KRe(Y,j,X,$,W),ce=J.length;for(u=0;u<ce;++u)H[F++]=J[u]}else for(u=0;u<W;++u)H[F++]=z.clone(X)}H[F]=z.clone(i[i.length-1]),i=H,mte.length=0}r===Yt.GEODESIC?p=Oi.generateCartesianArc({positions:p,minDistance:M,ellipsoid:a,height:U}):p=Oi.generateCartesianRhumbArc({positions:p,granularity:M,ellipsoid:a,height:U})}_=p.length;let m=_*4-4,x=new Float64Array(m*3),C=new Float64Array(m*3),A=new Float64Array(m*3),T=new Float32Array(m*2),b=n.st?new Float32Array(m*2):void 0,S=l(i)?new Uint8Array(m*4):void 0,w=0,D=0,O=0,I=0,L;for(u=0;u<_;++u){u===0?(L=ute,h.subtract(p[0],p[1],L),h.add(p[0],L,L)):L=p[u-1],h.clone(L,dte),h.clone(p[u],fte),u===_-1?(L=ute,h.subtract(p[_-1],p[_-2],L),h.add(p[_-1],L,L)):L=p[u+1],h.clone(L,hte);let M,V;l(S)&&(u!==0&&!o?M=i[u-1]:M=i[u],u!==_-1&&(V=i[u]));let U=u===0?2:0,k=u===_-1?2:4;for(f=U;f<k;++f){h.pack(fte,x,w),h.pack(dte,C,w),h.pack(hte,A,w),w+=3;let H=f-2<0?-1:1;if(T[D++]=2*(f%2)-1,T[D++]=H*t,n.st&&(b[O++]=u/(_-1),b[O++]=Math.max(T[D-2],0)),l(S)){let F=f<2?M:V;S[I++]=z.floatToByte(F.red),S[I++]=z.floatToByte(F.green),S[I++]=z.floatToByte(F.blue),S[I++]=z.floatToByte(F.alpha)}}}let N=new ln;N.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:x}),N.prevPosition=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C}),N.nextPosition=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A}),N.expandAndWidth=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:T}),n.st&&(N.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:b})),l(S)&&(N.color=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:S,normalize:!0}));let g=Ne.createTypedArray(m,_*6-6),E=0,v=0,P=_-1;for(u=0;u<P;++u)g[v++]=E,g[v++]=E+2,g[v++]=E+1,g[v++]=E+1,g[v++]=E+2,g[v++]=E+3,E+=4;return new ct({attributes:N,indices:g,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromPoints(p),geometryType:Zf.POLYLINES})};var J_=ew;function $Re(e,t,n,i){let o=new ln;i.position&&(o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),c=ti.triangulate(t),u=(a-1)*r*6+c.length*2,f=Ne.createTypedArray(s,u),d,p,_,m,x,C,A=r*2,T=0;for(d=0;d<a-1;d++){for(p=0;p<r-1;p++)_=p*2+d*r*2,C=_+A,m=_+1,x=m+A,f[T++]=m,f[T++]=_,f[T++]=x,f[T++]=x,f[T++]=_,f[T++]=C;_=r*2-2+d*r*2,m=_+1,x=m+A,C=_+A,f[T++]=m,f[T++]=_,f[T++]=x,f[T++]=x,f[T++]=_,f[T++]=C}if(i.st||i.tangent||i.bitangent){let w=new Float32Array(s*2),D=1/(a-1),O=1/n.height,I=n.height/2,L,N,g=0;for(d=0;d<a;d++){for(L=d*D,N=O*(t[0].y+I),w[g++]=L,w[g++]=N,p=1;p<r;p++)N=O*(t[p].y+I),w[g++]=L,w[g++]=N,w[g++]=L,w[g++]=N;N=O*(t[0].y+I),w[g++]=L,w[g++]=N}for(p=0;p<r;p++)L=0,N=O*(t[p].y+I),w[g++]=L,w[g++]=N;for(p=0;p<r;p++)L=(a-1)*D,N=O*(t[p].y+I),w[g++]=L,w[g++]=N;o.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:new Float32Array(w)})}let b=s-r*2;for(d=0;d<c.length;d+=3){let w=c[d]+b,D=c[d+1]+b,O=c[d+2]+b;f[T++]=w,f[T++]=D,f[T++]=O,f[T++]=O+r,f[T++]=D+r,f[T++]=w+r}let S=new ct({attributes:o,indices:f,boundingSphere:oe.fromVertices(e),primitiveType:Le.TRIANGLES});if(i.normal&&(S=Rn.computeNormal(S)),i.tangent||i.bitangent){try{S=Rn.computeTangentAndBitangent(S)}catch{Mt("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(S.attributes.tangent=void 0),i.bitangent||(S.attributes.bitangent=void 0),i.st||(S.attributes.st=void 0)}return S}function nw(e){e=y(e,y.EMPTY_OBJECT);let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*G.packedLength,this.packedLength=i+re.packedLength+Pe.packedLength+2}nw.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var gte=re.clone(re.UNIT_SPHERE),yte=new Pe,tw={polylinePositions:void 0,shapePositions:void 0,ellipsoid:gte,vertexFormat:yte,cornerType:void 0,granularity:void 0};nw.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);let a=re.unpack(e,t,gte);t+=re.packedLength;let c=Pe.unpack(e,t,yte);t+=Pe.packedLength;let u=e[t++],f=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=re.clone(a,n._ellipsoid),n._vertexFormat=Pe.clone(c,n._vertexFormat),n._cornerType=u,n._granularity=f,n):(tw.polylinePositions=r,tw.shapePositions=s,tw.cornerType=u,tw.granularity=f,new nw(tw))};var ZRe=new qe;nw.createGeometry=function(e){let t=e._positions,n=So(t,h.equalsEpsilon),i=e._shape;if(i=Sh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ti.computeWindingOrder2D(i)===fs.CLOCKWISE&&i.reverse();let o=qe.fromPoints(i,ZRe),r=Sh.computePositions(n,i,o,e,!0);return $Re(r,i,o,e._vertexFormat)};var BO=nw;function JRe(e,t){let n=new ln;n.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Ne.createTypedArray(o,2*i*(s+1)),c,u,f=0;c=0;let d=c*i;for(u=0;u<i-1;u++)a[f++]=u+d,a[f++]=u+d+1;for(a[f++]=i-1+d,a[f++]=d,c=s-1,d=c*i,u=0;u<i-1;u++)a[f++]=u+d,a[f++]=u+d+1;for(a[f++]=i-1+d,a[f++]=d,c=0;c<s-1;c++){let _=i*c,m=_+i;for(u=0;u<i;u++)a[f++]=u+_,a[f++]=u+m}return new ct({attributes:n,indices:Ne.createTypedArray(o,a),boundingSphere:oe.fromVertices(e),primitiveType:Le.LINES})}function ow(e){e=y(e,y.EMPTY_OBJECT);let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*G.packedLength,this.packedLength=i+re.packedLength+2}ow.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var xte=re.clone(re.UNIT_SPHERE),iw={polylinePositions:void 0,shapePositions:void 0,ellipsoid:xte,height:void 0,cornerType:void 0,granularity:void 0};ow.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);let a=re.unpack(e,t,xte);t+=re.packedLength;let c=e[t++],u=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=re.clone(a,n._ellipsoid),n._cornerType=c,n._granularity=u,n):(iw.polylinePositions=r,iw.shapePositions=s,iw.cornerType=c,iw.granularity=u,new ow(iw))};var QRe=new qe;ow.createGeometry=function(e){let t=e._positions,n=So(t,h.equalsEpsilon),i=e._shape;if(i=Sh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ti.computeWindingOrder2D(i)===fs.CLOCKWISE&&i.reverse();let o=qe.fromPoints(i,QRe),r=Sh.computePositions(n,i,o,e,!1);return JRe(r,i)};var LO=ow;function Cte(){ye.throwInstantiationError()}Cte.prototype.getURL=ye.throwInstantiationError;var Ate=Cte;function eMe(e){let t=e.points,n=e.times;return function(i,o){l(o)||(o=new Me);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=t[r],c=t[r+1];return Me.fastSlerp(a,c,s,o)}}function nT(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=eMe(this),this._lastTimeIndex=0}Object.defineProperties(nT.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});nT.prototype.findTimeInterval=zi.prototype.findTimeInterval;nT.prototype.wrapTime=zi.prototype.wrapTime;nT.prototype.clampTime=zi.prototype.clampTime;nT.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var iT=nT;var rw=Zc(Tte(),1);function NO(){this._tree=new rw.default}function Ly(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}Ly.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n};NO.prototype.insert=function(e,t){let n=Ly.fromRectangleAndId(e,t,new Ly);this._tree.insert(n)};function tMe(e,t){return e.id===t.id}var nMe=new Ly;NO.prototype.remove=function(e,t){let n=Ly.fromRectangleAndId(e,t,nMe);this._tree.remove(n,tMe)};var iMe=new Ly;NO.prototype.collides=function(e){let t=Ly.fromRectangleAndId("",e,iMe);return this._tree.collides(t)};var oT=NO;var bte=Math.cos,Ete=Math.sin,oMe=Math.sqrt,TG={};TG.computePosition=function(e,t,n,i,o,r,s){let a=t.radiiSquared,c=e.nwCorner,u=e.boundingRectangle,f=c.latitude-e.granYCos*i+o*e.granXSin,d=bte(f),p=Ete(f),_=a.z*p,m=c.longitude+i*e.granYSin+o*e.granXCos,x=d*bte(m),C=d*Ete(m),A=a.x*x,T=a.y*C,b=oMe(A*x+T*C+_*p);if(r.x=A/b,r.y=T/b,r.z=_/b,n){let S=e.stNwCorner;l(S)?(f=S.latitude-e.stGranYCos*i+o*e.stGranXSin,m=S.longitude+i*e.stGranYSin+o*e.stGranXCos,s.x=(m-e.stWest)*e.lonScalar,s.y=(f-e.stSouth)*e.latScalar):(s.x=(m-u.west)*e.lonScalar,s.y=(f-u.south)*e.latScalar)}};var rMe=new vi,Xu=new h,sMe=new me,FO=new h,AG=new Si;function Ste(e,t,n,i,o,r,s){let a=Math.cos(t),c=i*a,u=n*a,f=Math.sin(t),d=i*f,p=n*f;Xu=AG.project(e,Xu),Xu=h.subtract(Xu,FO,Xu);let _=vi.fromRotation(t,rMe);Xu=vi.multiplyByVector(_,Xu,Xu),Xu=h.add(Xu,FO,Xu),e=AG.unproject(Xu,e),r-=1,s-=1;let m=e.latitude,x=m+r*p,C=m-c*s,A=m-c*s+r*p,T=Math.max(m,x,C,A),b=Math.min(m,x,C,A),S=e.longitude,w=S+r*u,D=S+s*d,O=S+s*d+r*u,I=Math.max(S,w,D,O),L=Math.min(S,w,D,O);return{north:T,south:b,east:I,west:L,granYCos:c,granYSin:d,granXCos:u,granXSin:p,nwCorner:e}}TG.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,c=e.west,u=e.north,f=e.south,d=!1,p=!1;u===R.PI_OVER_TWO&&(d=!0),f===-R.PI_OVER_TWO&&(p=!0);let _,m=u-f;c>a?_=R.TWO_PI-c+a:_=a-c;let x=Math.ceil(_/t)+1,C=Math.ceil(m/t)+1,A=_/(x-1),T=m/(C-1),b=de.northwest(e,r),S=de.center(e,sMe);(n!==0||i!==0)&&(S.longitude<b.longitude&&(S.longitude+=R.TWO_PI),FO=AG.project(S,FO));let w=T,D=A,O=0,I=0,L=de.clone(e,o),N={granYCos:w,granYSin:O,granXCos:D,granXSin:I,nwCorner:b,boundingRectangle:L,width:x,height:C,northCap:d,southCap:p};if(n!==0){let g=Ste(b,n,A,T,S,x,C);u=g.north,f=g.south,a=g.east,c=g.west,N.granYCos=g.granYCos,N.granYSin=g.granYSin,N.granXCos=g.granXCos,N.granXSin=g.granXSin,L.north=u,L.south=f,L.east=a,L.west=c}if(i!==0){n=n-i;let g=de.northwest(L,s),E=Ste(g,n,A,T,S,x,C);N.stGranYCos=E.granYCos,N.stGranXCos=E.granXCos,N.stGranYSin=E.granYSin,N.stGranXSin=E.granXSin,N.stNwCorner=g,N.stWest=E.west,N.stSouth=E.south}return N};var Es=TG;var bG=new h,Dte=new h,Pte=new h,Ite=new h,Ote=new de,aMe=new G,cMe=new oe,lMe=new oe;function Rte(e,t){let n=new ct({attributes:new ln,primitiveType:Le.TRIANGLES});return n.attributes.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function uMe(e,t,n,i){let o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0,c=0,u=Ite,f=Pte,d=Dte;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let _=h.fromArray(e,p,bG),m=c+1,x=c+2;d=n.geodeticSurfaceNormal(_,d),(t.tangent||t.bitangent)&&(h.cross(h.UNIT_Z,d,f),Q.multiplyByVector(i,f,f),h.normalize(f,f),t.bitangent&&h.normalize(h.cross(d,f,u),u)),t.normal&&(r[c]=d.x,r[m]=d.y,r[x]=d.z),t.tangent&&(s[c]=f.x,s[m]=f.y,s[x]=f.z),t.bitangent&&(a[c]=u.x,a[m]=u.y,a[x]=u.z),c+=3}return Rte(t,{positions:e,normals:r,tangents:s,bitangents:a})}var EG=new h,Mte=new h;function fMe(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,c=0,u=0,f=!0,d=Ite,p=Pte,_=Dte;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<i;m+=6){let x=h.fromArray(e,m,bG),C=h.fromArray(e,(m+6)%i,EG);if(f){let A=h.fromArray(e,(m+3)%i,Mte);h.subtract(C,x,C),h.subtract(A,x,A),_=h.normalize(h.cross(A,C,_),_),f=!1}h.equalsEpsilon(C,x,R.EPSILON10)&&(f=!0),(t.tangent||t.bitangent)&&(d=n.geodeticSurfaceNormal(x,d),t.tangent&&(p=h.normalize(h.cross(d,_,p),p))),t.normal&&(o[a++]=_.x,o[a++]=_.y,o[a++]=_.z,o[a++]=_.x,o[a++]=_.y,o[a++]=_.z),t.tangent&&(r[c++]=p.x,r[c++]=p.y,r[c++]=p.z,r[c++]=p.x,r[c++]=p.y,r[c++]=p.z),t.bitangent&&(s[u++]=d.x,s[u++]=d.y,s[u++]=d.z,s[u++]=d.x,s[u++]=d.y,s[u++]=d.z)}return Rte(t,{positions:e,normals:o,tangents:r,bitangents:s})}function Bte(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap,c=0,u=o,f=o,d=0;s&&(c=1,f-=1,d+=1),a&&(u-=1,f-=1,d+=1),d+=r*f;let p=n.position?new Float64Array(d*3):void 0,_=n.st?new Float32Array(d*2):void 0,m=0,x=0,C=bG,A=aMe,T=Number.MAX_VALUE,b=Number.MAX_VALUE,S=-Number.MAX_VALUE,w=-Number.MAX_VALUE;for(let E=c;E<u;++E)for(let v=0;v<r;++v)Es.computePosition(t,i,n.st,E,v,C,A),p[m++]=C.x,p[m++]=C.y,p[m++]=C.z,n.st&&(_[x++]=A.x,_[x++]=A.y,T=Math.min(T,A.x),b=Math.min(b,A.y),S=Math.max(S,A.x),w=Math.max(w,A.y));if(s&&(Es.computePosition(t,i,n.st,0,0,C,A),p[m++]=C.x,p[m++]=C.y,p[m++]=C.z,n.st&&(_[x++]=A.x,_[x++]=A.y,T=A.x,b=A.y,S=A.x,w=A.y)),a&&(Es.computePosition(t,i,n.st,o-1,0,C,A),p[m++]=C.x,p[m++]=C.y,p[m]=C.z,n.st&&(_[x++]=A.x,_[x]=A.y,T=Math.min(T,A.x),b=Math.min(b,A.y),S=Math.max(S,A.x),w=Math.max(w,A.y))),n.st&&(T<0||b<0||S>1||w>1))for(let E=0;E<_.length;E+=2)_[E]=(_[E]-T)/(S-T),_[E+1]=(_[E+1]-b)/(w-b);let D=uMe(p,n,i,t.tangentRotationMatrix),O=6*(r-1)*(f-1);s&&(O+=3*(r-1)),a&&(O+=3*(r-1));let I=Ne.createTypedArray(d,O),L=0,N=0,g;for(g=0;g<f-1;++g){for(let E=0;E<r-1;++E){let v=L,P=v+r,M=P+1,V=v+1;I[N++]=v,I[N++]=P,I[N++]=V,I[N++]=V,I[N++]=P,I[N++]=M,++L}++L}if(s||a){let E=d-1,v=d-1;s&&a&&(E=d-2);let P,M;if(L=0,s)for(g=0;g<r-1;g++)P=L,M=P+1,I[N++]=E,I[N++]=P,I[N++]=M,++L;if(a)for(L=(f-1)*r,g=0;g<r-1;g++)P=L,M=P+1,I[N++]=P,I[N++]=v,I[N++]=M,++L}return D.indices=I,n.st&&(D.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:_})),D}function rT(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function sT(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var SG=new Pe;function dMe(e,t){let n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,c=t.height,u=t.width,f;if(n){let nt=Pe.clone(o,SG);nt.normal=!0,e._vertexFormat=nt}let d=Bte(e,t);n&&(e._vertexFormat=o);let p=ti.scaleToGeodeticHeight(d.attributes.position.values,s,a,!1);p=new Float64Array(p);let _=p.length,m=_*2,x=new Float64Array(m);x.set(p);let C=ti.scaleToGeodeticHeight(d.attributes.position.values,r,a);x.set(C,_),d.attributes.position.values=x;let A=o.normal?new Float32Array(m):void 0,T=o.tangent?new Float32Array(m):void 0,b=o.bitangent?new Float32Array(m):void 0,S=o.st?new Float32Array(m/3*2):void 0,w,D;if(o.normal){for(D=d.attributes.normal.values,A.set(D),f=0;f<_;f++)D[f]=-D[f];A.set(D,_),d.attributes.normal.values=A}if(n){D=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);let nt=new Float32Array(m);for(f=0;f<_;f++)D[f]=-D[f];nt.set(D,_),d.attributes.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:nt})}let O,I=l(i);if(I){let nt=_/3*2,Tn=new Uint8Array(nt);i===tn.TOP?Tn=Tn.fill(1,0,nt/2):(O=i===tn.NONE?0:1,Tn=Tn.fill(O)),d.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Tn})}if(o.tangent){let nt=d.attributes.tangent.values;for(T.set(nt),f=0;f<_;f++)nt[f]=-nt[f];T.set(nt,_),d.attributes.tangent.values=T}if(o.bitangent){let nt=d.attributes.bitangent.values;b.set(nt),b.set(nt,_),d.attributes.bitangent.values=b}o.st&&(w=d.attributes.st.values,S.set(w),S.set(w,_/3*2),d.attributes.st.values=S);let L=d.indices,N=L.length,g=_/3,E=Ne.createTypedArray(m/3,N*2);for(E.set(L),f=0;f<N;f+=3)E[f+N]=L[f+2]+g,E[f+1+N]=L[f+1]+g,E[f+2+N]=L[f]+g;d.indices=E;let v=t.northCap,P=t.southCap,M=c,V=2,U=0,k=4,H=4;v&&(V-=1,M-=1,U+=1,k-=2,H-=1),P&&(V-=1,M-=1,U+=1,k-=2,H-=1),U+=V*u+2*M-k;let F=(U+H)*2,Y=new Float64Array(F*3),j=n?new Float32Array(F*3):void 0,X=I?new Uint8Array(F):void 0,W=o.st?new Float32Array(F*2):void 0,$=i===tn.TOP;I&&!$&&(O=i===tn.ALL?1:0,X=X.fill(O));let J=0,ce=0,he=0,ie=0,ae=u*M,ge;for(f=0;f<ae;f+=u)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);if(P){let nt=v?ae+1:ae;for(ge=nt*3,f=0;f<2;f++)Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,nt*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1)}else for(f=ae-u;f<ae;f++)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);for(f=ae-1;f>0;f-=u)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);if(v){let nt=ae;for(ge=nt*3,f=0;f<2;f++)Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,nt*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1)}else for(f=u-1;f>=0;f--)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);let Se=fMe(Y,o,a);o.st&&(Se.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:W})),n&&(Se.attributes.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:j})),I&&(Se.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:X}));let be=Ne.createTypedArray(F,U*6),Be,Ae,Oe,Ge;_=Y.length/3;let ot=0;for(f=0;f<_-1;f+=2){Be=f,Ge=(Be+2)%_;let nt=h.fromArray(Y,Be*3,EG),Tn=h.fromArray(Y,Ge*3,Mte);h.equalsEpsilon(nt,Tn,R.EPSILON10)||(Ae=(Be+1)%_,Oe=(Ae+2)%_,be[ot++]=Be,be[ot++]=Ae,be[ot++]=Ge,be[ot++]=Ge,be[ot++]=Ae,be[ot++]=Oe)}return Se.indices=be,Se=Rn.combineInstances([new pt({geometry:d}),new pt({geometry:Se})]),Se[0]}var hMe=[new h,new h,new h,new h],Lte=new me,mMe=new me;function wG(e,t,n,i,o){if(n===0)return de.clone(e,o);let r=Es.computeOptions(e,t,n,0,Ote,Lte),s=r.height,a=r.width,c=hMe;return Es.computePosition(r,i,!1,0,0,c[0]),Es.computePosition(r,i,!1,0,a-1,c[1]),Es.computePosition(r,i,!1,s-1,0,c[2]),Es.computePosition(r,i,!1,s-1,a-1,c[3]),de.fromCartesianArray(c,i,o)}function Nh(e){e=y(e,y.EMPTY_OBJECT);let t=e.rectangle,n=y(e.height,0),i=y(e.extrudedHeight,n);this._rectangle=de.clone(t),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._surfaceHeight=Math.max(n,i),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._extrudedHeight=Math.min(n,i),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Nh.packedLength=de.packedLength+re.packedLength+Pe.packedLength+7;Nh.pack=function(e,t,n){return n=y(n,0),de.pack(e._rectangle,t,n),n+=de.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var Nte=new de,Fte=re.clone(re.UNIT_SPHERE),Q_={rectangle:Nte,ellipsoid:Fte,vertexFormat:SG,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Nh.unpack=function(e,t,n){t=y(t,0);let i=de.unpack(e,t,Nte);t+=de.packedLength;let o=re.unpack(e,t,Fte);t+=re.packedLength;let r=Pe.unpack(e,t,SG);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++]===1,p=e[t];return l(n)?(n._rectangle=de.clone(i,n._rectangle),n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=u,n._extrudedHeight=f,n._shadowVolume=d,n._offsetAttribute=p===-1?void 0:p,n):(Q_.granularity=s,Q_.height=a,Q_.rotation=c,Q_.stRotation=u,Q_.extrudedHeight=f,Q_.shadowVolume=d,Q_.offsetAttribute=p===-1?void 0:p,new Nh(Q_))};Nh.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.rectangle,i=y(e.granularity,R.RADIANS_PER_DEGREE),o=y(e.ellipsoid,re.WGS84),r=y(e.rotation,0);return wG(n,i,r,o,t)};var pMe=new Q,wte=new Me,_Me=new me;Nh.createGeometry=function(e){if(R.equalsEpsilon(e._rectangle.north,e._rectangle.south,R.EPSILON10)||R.equalsEpsilon(e._rectangle.east,e._rectangle.west,R.EPSILON10))return;let t=e._rectangle,n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,s=Es.computeOptions(t,e._granularity,i,o,Ote,Lte,mMe),a=pMe;if(o!==0||i!==0){let _=de.center(t,_Me),m=n.geodeticSurfaceNormalCartographic(_,EG);Me.fromAxisAngle(m,-o,wte),Q.fromQuaternion(wte,a)}else Q.clone(Q.IDENTITY,a);let c=e._surfaceHeight,u=e._extrudedHeight,f=!R.equalsEpsilon(c,u,0,R.EPSILON2);s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a;let d,p;if(t=e._rectangle,f){d=dMe(e,s);let _=oe.fromRectangle3D(t,n,c,lMe),m=oe.fromRectangle3D(t,n,u,cMe);p=oe.union(_,m)}else{if(d=Bte(e,s),d.attributes.position.values=ti.scaleToGeodeticHeight(d.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let _=d.attributes.position.values.length,m=e._offsetAttribute===tn.NONE?0:1,x=new Uint8Array(_/3).fill(m);d.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}p=oe.fromRectangle3D(t,n,c)}return r.position||delete d.attributes.position,new ct({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Nh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Nh({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};var vte=new de,gMe=[new G,new G,new G],yMe=new vi,xMe=new me;function CMe(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=de.clone(e._rectangle,vte),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=wG(t,n,o,i,vte),s=gMe;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;let a=e.rectangle,c=vi.fromRotation(e._stRotation,yMe),u=de.center(a,xMe);for(let m=0;m<3;++m){let x=s[m];x.x-=u.longitude,x.y-=u.latitude,vi.multiplyByVector(c,x,x),x.x+=u.longitude,x.y+=u.latitude,x.x=(x.x-a.west)/a.width,x.y=(x.y-a.south)/a.height}let f=s[0],d=s[1],p=s[2],_=new Array(6);return G.pack(f,_),G.pack(d,_,2),G.pack(p,_,4),_}Object.defineProperties(Nh.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=wG(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=CMe(this)),this._textureCoordinateRotationPoints}}});var aT=Nh;var AMe=new oe,TMe=new oe,bMe=new h,EMe=new de;function Vte(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap,a=i,c=2,u=0,f=4;r&&(c-=1,a-=1,u+=1,f-=2),s&&(c-=1,a-=1,u+=1,f-=2),u+=c*o+2*a-f;let d=new Float64Array(u*3),p=0,_=0,m,x=bMe;if(r)Es.computePosition(t,n,!1,_,0,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;else for(m=0;m<o;m++)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;for(m=o-1,_=1;_<i;_++)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;if(_=i-1,!s)for(m=o-2;m>=0;m--)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;for(m=0,_=i-2;_>0;_--)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;let C=d.length/3*2,A=Ne.createTypedArray(d.length/3,C),T=0;for(let S=0;S<d.length/3-1;S++)A[T++]=S,A[T++]=S+1;A[T++]=d.length/3-1,A[T++]=0;let b=new ct({attributes:new ln,primitiveType:Le.LINES});return b.attributes.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d}),b.indices=A,b}function SMe(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=i,s=n,a=Vte(e,t),c=t.height,u=t.width,f=ti.scaleToGeodeticHeight(a.attributes.position.values,s,o,!1),d=f.length,p=new Float64Array(d*2);p.set(f);let _=ti.scaleToGeodeticHeight(a.attributes.position.values,r,o);p.set(_,d),a.attributes.position.values=p;let m=t.northCap,x=t.southCap,C=4;m&&(C-=1),x&&(C-=1);let A=(p.length/3+C)*2,T=Ne.createTypedArray(p.length/3,A);d=p.length/6;let b=0;for(let w=0;w<d-1;w++)T[b++]=w,T[b++]=w+1,T[b++]=w+d,T[b++]=w+d+1;T[b++]=d-1,T[b++]=0,T[b++]=d+d-1,T[b++]=d,T[b++]=0,T[b++]=d;let S;if(m)S=c-1;else{let w=u-1;T[b++]=w,T[b++]=w+d,S=u+c-2}if(T[b++]=S,T[b++]=S+d,!x){let w=u+S-1;T[b++]=w,T[b]=w+d}return a.indices=T,a}function lT(e){e=y(e,y.EMPTY_OBJECT);let t=e.rectangle,n=y(e.granularity,R.RADIANS_PER_DEGREE),i=y(e.ellipsoid,re.WGS84),o=y(e.rotation,0),r=y(e.height,0),s=y(e.extrudedHeight,r);this._rectangle=de.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}lT.packedLength=de.packedLength+re.packedLength+5;lT.pack=function(e,t,n){return n=y(n,0),de.pack(e._rectangle,t,n),n+=de.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=y(e._offsetAttribute,-1),t};var kte=new de,Ute=re.clone(re.UNIT_SPHERE),cT={rectangle:kte,ellipsoid:Ute,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};lT.unpack=function(e,t,n){t=y(t,0);let i=de.unpack(e,t,kte);t+=de.packedLength;let o=re.unpack(e,t,Ute);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t];return l(n)?(n._rectangle=de.clone(i,n._rectangle),n._ellipsoid=re.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=c,n._offsetAttribute=u===-1?void 0:u,n):(cT.granularity=r,cT.height=s,cT.rotation=a,cT.extrudedHeight=c,cT.offsetAttribute=u===-1?void 0:u,new lT(cT))};var wMe=new me;lT.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=Es.computeOptions(t,e._granularity,e._rotation,0,EMe,wMe),o,r;if(R.equalsEpsilon(t.north,t.south,R.EPSILON10)||R.equalsEpsilon(t.east,t.west,R.EPSILON10))return;let s=e._surfaceHeight,a=e._extrudedHeight,c=!R.equalsEpsilon(s,a,0,R.EPSILON2),u;if(c){if(o=SMe(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,_=new Uint8Array(p);e._offsetAttribute===tn.TOP?_=_.fill(1,0,p/2):(u=e._offsetAttribute===tn.NONE?0:1,_=_.fill(u)),o.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}let f=oe.fromRectangle3D(t,n,s,TMe),d=oe.fromRectangle3D(t,n,a,AMe);r=oe.union(f,d)}else{if(o=Vte(e,i),o.attributes.position.values=ti.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let f=o.attributes.position.values.length;u=e._offsetAttribute===tn.NONE?0:1;let d=new Uint8Array(f/3).fill(u);o.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}r=oe.fromRectangle3D(t,n,s)}return new ct({attributes:o.attributes,indices:o.indices,primitiveType:Le.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var uT=lT;var vMe={FIXED:0,INERTIAL:1},eo=Object.freeze(vMe);var Ny;typeof requestAnimationFrame<"u"&&(Ny=requestAnimationFrame);(function(){if(!l(Ny)&&typeof window<"u"){let e=["webkit","moz","ms","o"],t=0,n=e.length;for(;t<n&&!l(Ny);)Ny=window[`${e[t]}RequestAnimationFrame`],++t}if(!l(Ny)){let e=16.666666666666668,t=0;Ny=function(n){let i=Pi(),o=Math.max(e-(i-t),0);return t=i+o,setTimeout(function(){n(t)},o)}}})();function DMe(e){return ci("Cesium.requestAnimationFrame","Cesium.requestAnimationFrame was deprecated in CesiumJS 1.96 and will be removed in 1.99. Use the native requestAnimationFrame method instead."),Ny(e)}var zte=DMe;function PMe(e){let t=document.createElement("canvas");return t.width=R.nextPowerOfTwo(e.width),t.height=R.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}var Fy=PMe;var Vy=30,IMe=1<<Vy,OMe=1<<Vy+1>>>0,vG=2*Vy+1,eg=4,Wte=[],jte=[],RMe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],tg=1,fT=2,VO=[tg,0,0,tg|fT];function jr(e){if(!Et.supportsBigInt())throw new fe("S2 required BigInt support");this._cellId=e,this._level=jr.getLevel(e)}jr.fromToken=function(e){return new jr(jr.getIdFromToken(e))};jr.isValidId=function(e){return!(e<=0||e>>BigInt(vG)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};jr.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?jr.isValidId(jr.getIdFromToken(e)):!1};jr.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};jr.getTokenFromId=function(e){let t=Math.floor(HMe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};jr.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return Vy-(t>>1)};jr.prototype.getChild=function(e){let t=Xte(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new jr(n)};jr.prototype.getParent=function(){let e=Xte(this._cellId)<<BigInt(2);return new jr(this._cellId&~e+BigInt(1)|e)};jr.prototype.getParentAtLevel=function(e){let t=UMe(e);return new jr(this._cellId&-t|t)};jr.prototype.getCenter=function(e){e=y(e,re.WGS84);let t=MMe(this._cellId,this._level);t=h.normalize(t,t);let n=new me.fromCartesian(t,re.UNIT_SPHERE);return me.toCartesian(n,e,new h)};jr.prototype.getVertex=function(e,t){t=y(t,re.WGS84);let n=BMe(this._cellId,this._level,e);n=h.normalize(n,n);let i=new me.fromCartesian(n,re.UNIT_SPHERE);return me.toCartesian(i,t,new h)};jr.fromFacePositionLevel=function(e,t,n){let i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),s=Array(vG-2*n).join("0"),a=BigInt(`0b${i}${r}${o}1${s}`);return new jr(a)};function MMe(e,t){let n=LMe(e,t);return NMe(n[0],n[1],n[2])}function BMe(e,t,n){let i=qte(e,t),o=FMe([i[1],i[2]],t),r=n>>1&1;return Yte(i[0],o[0][r^n&1],o[1][r])}function LMe(e,t){let n=qte(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,u=(o<<1)+c,f=(r<<1)+c;return[i,u,f]}function qte(e){Wte.length===0&&kMe();let t=Number(e>>BigInt(vG)),n=t&tg,i=(1<<eg)-1,o=0,r=0;for(let s=7;s>=0;s--){let a=s===7?Vy-7*eg:eg,c=(1<<2*a)-1;n+=Number(e>>BigInt(s*2*eg+1)&BigInt(c))<<2,n=jte[n];let u=s*eg;o+=n>>eg+2<<u,r+=(n>>2&i)<<u,n&=tg|fT}return[t,o,r]}function NMe(e,t,n){let i=Hte(t),o=Hte(n),r=kO(i),s=kO(o);return Yte(e,r,s)}function Yte(e,t,n){switch(e){case 0:return new h(1,t,n);case 1:return new h(-t,1,n);case 2:return new h(-t,-n,1);case 3:return new h(-1,-n,-t);case 4:return new h(n,-1,-t);default:return new h(n,t,-1)}}function kO(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Hte(e){return 1/OMe*e}function FMe(e,t){let n=[[],[]],i=VMe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=kO(Gte(r)),n[o][1]=kO(Gte(s))}return n}function VMe(e){return 1<<Vy-e>>>0}function Gte(e){return 1/IMe*e}function ng(e,t,n,i,o,r){if(e===eg){let s=(t<<eg)+n;Wte[(s<<2)+i]=(o<<2)+r,jte[(o<<2)+i]=(s<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let s=RMe[r];ng(e,t+(s[0]>>1),n+(s[0]&1),i,o,r^VO[0]),ng(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^VO[1]),ng(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^VO[2]),ng(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^VO[3])}}function kMe(){ng(0,0,0,0,0,0),ng(0,0,0,tg,0,tg),ng(0,0,0,fT,0,fT),ng(0,0,0,tg|fT,0,tg|fT)}function Xte(e){return e&~e+BigInt(1)}function UMe(e){return BigInt(1)<<BigInt(2*(Vy-e))}var zMe=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];function HMe(e){return zMe[(-e&e)%BigInt(67)]}var ig=jr;function GMe(e,t,n){return e.readyPromise.then(function(){return qMe(e,t,n)})}function WMe(e,t){let n=e[0],i=n.terrainProvider.requestTileGeometry(n.x,n.y,n.level);if(!i)return!1;let o=i.then(YMe(n)).catch(XMe(n));return e.shift(),t.push(o),!0}function jMe(e){return new Promise(function(t){setTimeout(t,e)})}function DG(e,t){return e.length?WMe(e,t)?DG(e,t):jMe(100).then(()=>DG(e,t)):Promise.resolve()}function qMe(e,t,n){let i=e.tilingScheme,o,r=[],s={};for(o=0;o<n.length;++o){let c=i.positionToTileXY(n[o],t),u=c.toString();if(!s.hasOwnProperty(u)){let f={x:c.x,y:c.y,level:t,tilingScheme:i,terrainProvider:e,positions:[]};s[u]=f,r.push(f)}s[u].positions.push(n[o])}let a=[];return DG(r,a).then(function(){return Promise.all(a).then(function(){return n})})}function Kte(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function YMe(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let s=t[r];if(!Kte(s,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let s=t[r];Kte(s,i,n)}}):Promise.resolve()}}function XMe(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var UO=GMe;var PG=new G;function $te(e,t){return e.readyPromise.then(function(){let n=[],i=[],o=e.availability,r=[];for(let s=0;s<t.length;++s){let a=t[s],c=o.computeMaximumLevelAtPosition(a);if(i[s]=c,c===0){e.tilingScheme.positionToTileXY(a,1,PG);let f=e.loadTileDataAvailability(PG.x,PG.y,1);l(f)&&r.push(f)}let u=n[c];l(u)||(n[c]=u=[]),u.push(a)}return Promise.all(r).then(function(){return Promise.all(n.map(function(s,a){if(l(s))return UO(e,a,s)}))}).then(function(){let s=[];for(let a=0;a<t.length;++a){let c=t[a];o.computeMaximumLevelAtPosition(c)!==i[a]&&s.push(c)}if(s.length>0)return $te(e,s)}).then(function(){return t})})}var dT=$te;var KMe={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},mn=Object.freeze(KMe);function og(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function LG(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function ky(e){if(e.shiftKey)return ha.SHIFT;if(e.ctrlKey)return ha.CTRL;if(e.altKey)return ha.ALT}var ds={LEFT:0,MIDDLE:1,RIGHT:2};function Hl(e,t,n,i){function o(r){i(e,r)}Et.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function $Me(e){let t=e._element,n=l(t.disableRootEvents)?t:document;Et.supportsPointerEvents()?(Hl(e,"pointerdown",t,nBe),Hl(e,"pointerup",t,sne),Hl(e,"pointermove",t,iBe),Hl(e,"pointercancel",t,sne)):(Hl(e,"mousedown",t,ane),Hl(e,"mouseup",n,cne),Hl(e,"mousemove",n,lne),Hl(e,"touchstart",t,eBe),Hl(e,"touchend",n,tne),Hl(e,"touchmove",n,tBe),Hl(e,"touchcancel",n,tne)),Hl(e,"dblclick",t,JMe);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",Hl(e,i,t,QMe)}function ZMe(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var Zte={position:new G};function NG(e){e._lastSeenTouchEvent=Pi()}function FG(e){return Pi()-e._lastSeenTouchEvent>sd.mouseEmulationIgnoreMilliseconds}function BG(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function ane(e,t){if(!FG(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===ds.LEFT)i=mn.LEFT_DOWN;else if(n===ds.MIDDLE)i=mn.MIDDLE_DOWN;else if(n===ds.RIGHT)i=mn.RIGHT_DOWN;else return;let o=og(e,t,e._primaryPosition);G.clone(o,e._primaryStartPosition),G.clone(o,e._primaryPreviousPosition);let r=ky(t),s=e.getInputAction(i,r);l(s)&&(G.clone(o,Zte.position),s(Zte),t.preventDefault())}var Jte={position:new G},Qte={position:new G};function IG(e,t,n,i){let o=ky(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(l(r)||l(s)){let a=og(e,i,e._primaryPosition);if(l(r)&&(G.clone(a,Jte.position),r(Jte)),l(s)){let c=e._primaryStartPosition;BG(c,a,e._clickPixelTolerance)&&(G.clone(a,Qte.position),s(Qte))}}}function cne(e,t){if(!FG(e))return;let n=t.button;n!==ds.LEFT&&n!==ds.MIDDLE&&n!==ds.RIGHT||(e._buttonDown[ds.LEFT]&&(IG(e,mn.LEFT_UP,mn.LEFT_CLICK,t),e._buttonDown[ds.LEFT]=!1),e._buttonDown[ds.MIDDLE]&&(IG(e,mn.MIDDLE_UP,mn.MIDDLE_CLICK,t),e._buttonDown[ds.MIDDLE]=!1),e._buttonDown[ds.RIGHT]&&(IG(e,mn.RIGHT_UP,mn.RIGHT_CLICK,t),e._buttonDown[ds.RIGHT]=!1))}var OG={startPosition:new G,endPosition:new G};function lne(e,t){if(!FG(e))return;let n=ky(t),i=og(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(mn.MOUSE_MOVE,n);l(r)&&(G.clone(o,OG.startPosition),G.clone(i,OG.endPosition),r(OG)),G.clone(i,o),(e._buttonDown[ds.LEFT]||e._buttonDown[ds.MIDDLE]||e._buttonDown[ds.RIGHT])&&t.preventDefault()}var ene={position:new G};function JMe(e,t){let n=t.button,i;if(n===ds.LEFT)i=mn.LEFT_DOUBLE_CLICK;else return;let o=ky(t),r=e.getInputAction(i,o);l(r)&&(og(e,t,ene.position),r(ene))}function QMe(e,t){let n;if(l(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=ky(t),o=e.getInputAction(mn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function eBe(e,t){NG(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,og(e,r,new G));zO(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,G.clone(a.get(s)))}function tne(e,t){NG(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);zO(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var nne={position:new G},RG={position1:new G,position2:new G},ine={position:new G},one={position:new G},rne={position:new G};function zO(e,t){let n=ky(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[ds.LEFT]){if(e._buttonDown[ds.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(mn.LEFT_UP,n),l(r)&&(G.clone(e._primaryPosition,ine.position),r(ine)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(mn.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,u=e._previousPositions.values[0];BG(c,u,e._clickPixelTolerance)&&(G.clone(e._primaryPosition,one.position),s(one))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(mn.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];G.clone(c,e._primaryPosition),G.clone(c,e._primaryStartPosition),G.clone(c,e._primaryPreviousPosition),e._buttonDown[ds.LEFT]=!0,r=e.getInputAction(mn.LEFT_DOWN,n),l(r)&&(G.clone(c,nne.position),r(nne)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(mn.RIGHT_CLICK,n),l(s))){let u=e._primaryStartPosition,f=e._previousPositions.values[0];BG(u,f,e._holdPixelTolerance)&&(G.clone(e._primaryPosition,rne.position),s(rne))}},sd.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(mn.PINCH_START,n),l(r)&&(G.clone(i.values[0],RG.position1),G.clone(i.values[1],RG.position2),r(RG),t.preventDefault()))}function tBe(e,t){NG(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;let u=a.get(s);l(u)&&og(e,r,u)}une(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,G.clone(a.get(s),c.get(s))}var MG={startPosition:new G,endPosition:new G},sw={distance:{startPosition:new G,endPosition:new G},angleAndHeight:{startPosition:new G,endPosition:new G}};function une(e,t){let n=ky(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[ds.LEFT]){let a=i.values[0];G.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(mn.MOUSE_MOVE,n),l(s)&&(G.clone(c,MG.startPosition),G.clone(a,MG.endPosition),s(MG)),G.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(mn.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],u=o.values[0],f=o.values[1],d=c.x-a.x,p=c.y-a.y,_=Math.sqrt(d*d+p*p)*.25,m=f.x-u.x,x=f.y-u.y,C=Math.sqrt(m*m+x*x)*.25,A=(c.y+a.y)*.125,T=(f.y+u.y)*.125,b=Math.atan2(p,d),S=Math.atan2(x,m);G.fromElements(0,C,sw.distance.startPosition),G.fromElements(0,_,sw.distance.endPosition),G.fromElements(S,T,sw.angleAndHeight.startPosition),G.fromElements(b,A,sw.angleAndHeight.endPosition),s(sw)}}function nBe(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,og(e,t,new G)),zO(e,t),e._previousPositions.set(i,G.clone(n.get(i)))}else ane(e,t)}function sne(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),zO(e,t),e._previousPositions.remove(i)}else cne(e,t)}function iBe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;og(e,t,o),une(e,t);let r=e._previousPositions;G.clone(n.get(i),r.get(i))}else lne(e,t)}function sd(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-sd.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new G,this._primaryPosition=new G,this._primaryPreviousPosition=new G,this._positions=new gt,this._previousPositions=new gt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=y(e,document),$Me(this)}sd.prototype.setInputAction=function(e,t,n){let i=LG(t,n);this._inputEvents[i]=e};sd.prototype.getInputAction=function(e,t){let n=LG(e,t);return this._inputEvents[n]};sd.prototype.removeInputAction=function(e,t){let n=LG(e,t);delete this._inputEvents[n]};sd.prototype.isDestroyed=function(){return!1};sd.prototype.destroy=function(){return ZMe(this),ue(this)};sd.mouseEmulationIgnoreMilliseconds=800;sd.touchHoldDelayMilliseconds=1500;var Ku=sd;function HO(e){e=y(e,!0),this.value=HO.toValue(e)}Object.defineProperties(HO.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});HO.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var pn=HO;var VG={};function oBe(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var rBe=32.184,sBe=2451545;function Pne(e,t){t=ee.addSeconds(e,rBe,t);let n=ee.totalDays(t)-sBe;return t=ee.addSeconds(t,oBe(n),t),t}var GO=new ee(2451545,0,Hn.TAI),aBe=1e3,$u=R.RADIANS_PER_DEGREE,Gl=R.RADIANS_PER_ARCSECOND,ma=14959787e4,fne=new Q;function Ine(e,t,n,i,o,r,s){n<0&&(n=-n,o+=R.PI);let a=e*(1-t),c=i-o,u=o,f=lBe(r-i,t),d=cBe(t,0);mBe(c,n,u,fne);let p=a*(1+t),_=Math.cos(f),m=Math.sin(f),x=1+t*_,C=p/x;return l(s)?(s.x=C*_,s.y=C*m,s.z=0):s=new h(C*_,C*m,0),Q.multiplyByVector(fne,s,s)}function cBe(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function lBe(e,t){let n=dBe(e,t);return hBe(n,t)}var uBe=50,fBe=R.EPSILON8;function dBe(e,t){let n=Math.floor(e/R.TWO_PI);e-=n*R.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE,r;for(r=0;r<uBe&&Math.abs(o-i)>fBe;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}return o=i+n*R.TWO_PI,o}function hBe(e,t){let n=Math.floor(e/R.TWO_PI);e-=n*R.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=R.zeroToTwoPi(r),e<0&&(r-=R.TWO_PI),r+=n*R.TWO_PI,r}function mBe(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),u=Math.sin(n);return l(i)?(i[0]=c*o-u*r*s,i[1]=u*o+c*r*s,i[2]=r*a,i[3]=-c*r-u*o*s,i[4]=-u*r+c*o*s,i[5]=o*a,i[6]=u*a,i[7]=-c*a,i[8]=s):i=new Q(c*o-u*r*s,-c*r-u*o*s,u*a,u*o+c*r*s,-u*r+c*o*s,-c*a,r*a,o*a,s),i}var pBe=1.0000010178*ma,_Be=100.46645683*$u,gBe=129597742283429e-5*Gl,dne=16002,hne=21863,mne=32004,pne=10931,_ne=14529,gne=16368,yne=15318,xne=32794,yBe=64*1e-7*ma,xBe=-152*1e-7*ma,CBe=62*1e-7*ma,ABe=-8*1e-7*ma,TBe=32*1e-7*ma,bBe=-41*1e-7*ma,EBe=19*1e-7*ma,SBe=-11*1e-7*ma,wBe=-150*1e-7*ma,vBe=-46*1e-7*ma,DBe=68*1e-7*ma,PBe=54*1e-7*ma,IBe=14*1e-7*ma,OBe=24*1e-7*ma,RBe=-28*1e-7*ma,MBe=22*1e-7*ma,Cne=10,Ane=16002,Tne=21863,bne=10931,Ene=1473,Sne=32004,wne=4387,vne=73,BBe=-325*1e-7,LBe=-322*1e-7,NBe=-79*1e-7,FBe=232*1e-7,VBe=-52*1e-7,kBe=97*1e-7,UBe=55*1e-7,zBe=-41*1e-7,HBe=-105*1e-7,GBe=-137*1e-7,WBe=258*1e-7,jBe=35*1e-7,qBe=-116*1e-7,YBe=-88*1e-7,XBe=-112*1e-7,KBe=-80*1e-7,hT=new ee(0,0,Hn.TAI);function $Be(e,t){Pne(e,hT);let i=(hT.dayNumber-GO.dayNumber+(hT.secondsOfDay-GO.secondsOfDay)/jn.SECONDS_PER_DAY)/(jn.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=pBe+yBe*Math.cos(dne*o)+wBe*Math.sin(dne*o)+xBe*Math.cos(hne*o)+vBe*Math.sin(hne*o)+CBe*Math.cos(mne*o)+DBe*Math.sin(mne*o)+ABe*Math.cos(pne*o)+PBe*Math.sin(pne*o)+TBe*Math.cos(_ne*o)+IBe*Math.sin(_ne*o)+bBe*Math.cos(gne*o)+OBe*Math.sin(gne*o)+EBe*Math.cos(yne*o)+RBe*Math.sin(yne*o)+SBe*Math.cos(xne*o)+MBe*Math.sin(xne*o),s=_Be+gBe*i+BBe*Math.cos(Cne*o)+HBe*Math.sin(Cne*o)+LBe*Math.cos(Ane*o)+GBe*Math.sin(Ane*o)+NBe*Math.cos(Tne*o)+WBe*Math.sin(Tne*o)+FBe*Math.cos(bne*o)+jBe*Math.sin(bne*o)+VBe*Math.cos(Ene*o)+qBe*Math.sin(Ene*o)+kBe*Math.cos(Sne*o)+YBe*Math.sin(Sne*o)+UBe*Math.cos(wne*o)+XBe*Math.sin(wne*o)+zBe*Math.cos(vne*o)+KBe*Math.sin(vne*o),a=.0167086342-.0004203654*i,c=102.93734808*$u+11612.3529*Gl*i,u=469.97289*Gl*i,f=174.87317577*$u-8679.27034*Gl*i;return Ine(r,a,u,c,f,s,t)}function One(e,t){Pne(e,hT);let i=(hT.dayNumber-GO.dayNumber+(hT.secondsOfDay-GO.secondsOfDay)/jn.SECONDS_PER_DAY)/jn.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,u=5.15668983*$u,f=-8e-5*i+.02966*o-42e-6*r-13e-8*s,d=83.35324312*$u,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,_=125.04455501*$u,m=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,x=218.31664563*$u,C=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,A=297.85019547*$u+Gl*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),T=93.27209062*$u+Gl*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),b=134.96340251*$u+Gl*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),S=357.52910918*$u+Gl*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),w=310.17137918*$u-Gl*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),D=2*A,O=4*A,I=6*A,L=2*b,N=3*b,g=4*b,E=2*T;a+=3400.4*Math.cos(D)-635.6*Math.cos(D-b)-235.6*Math.cos(b)+218.1*Math.cos(D-S)+181*Math.cos(D+b),c+=.014216*Math.cos(D-b)+.008551*Math.cos(D-L)-.001383*Math.cos(b)+.001356*Math.cos(D+b)-.001147*Math.cos(O-N)-914e-6*Math.cos(O-L)+869e-6*Math.cos(D-S-b)-627e-6*Math.cos(D)-394e-6*Math.cos(O-g)+282e-6*Math.cos(D-S-L)-279e-6*Math.cos(A-b)-236e-6*Math.cos(L)+231e-6*Math.cos(O)+229e-6*Math.cos(I-g)-201e-6*Math.cos(L-E),f+=486.26*Math.cos(D-E)-40.13*Math.cos(D)+37.51*Math.cos(E)+25.73*Math.cos(L-E)+19.97*Math.cos(D-S-E),p+=-55609*Math.sin(D-b)-34711*Math.sin(D-L)-9792*Math.sin(b)+9385*Math.sin(O-N)+7505*Math.sin(O-L)+5318*Math.sin(D+b)+3484*Math.sin(O-g)-3417*Math.sin(D-S-b)-2530*Math.sin(I-g)-2376*Math.sin(D)-2075*Math.sin(D-N)-1883*Math.sin(L)-1736*Math.sin(I-5*b)+1626*Math.sin(S)-1370*Math.sin(I-N),m+=-5392*Math.sin(D-E)-540*Math.sin(S)-441*Math.sin(D)+423*Math.sin(E)-288*Math.sin(L-E),C+=-3332.9*Math.sin(D)+1197.4*Math.sin(D-b)-662.5*Math.sin(S)+396.3*Math.sin(b)-218*Math.sin(D-S);let v=2*w,P=3*w;f+=46.997*Math.cos(w)*i-.614*Math.cos(D-E+w)*i+.614*Math.cos(D-E-w)*i-.0297*Math.cos(v)*o-.0335*Math.cos(w)*o+.0012*Math.cos(D-E+v)*o-16e-5*Math.cos(w)*r+4e-5*Math.cos(P)*r+4e-5*Math.cos(v)*r;let M=2.116*Math.sin(w)*i-.111*Math.sin(D-E-w)*i-.0015*Math.sin(w)*o;p+=M,C+=M,m+=-520.77*Math.sin(w)*i+13.66*Math.sin(D-E+w)*i+1.12*Math.sin(D-w)*i-1.06*Math.sin(E-w)*i+.66*Math.sin(v)*o+.371*Math.sin(w)*o-.035*Math.sin(D-E+v)*o-.015*Math.sin(D-E+w)*o+.0014*Math.sin(w)*r-.0011*Math.sin(P)*r-9e-4*Math.sin(v)*r,a*=aBe;let V=u+f*Gl,U=d+p*Gl,k=x+C*Gl,H=_+m*Gl;return Ine(a,c,V,U,H,k,t)}var Dne=.012300034,ZBe=Dne/(Dne+1)*-1;function JBe(e,t){return t=One(e,t),h.multiplyByScalar(t,ZBe,t)}var Rne=new Q(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),aw=new h;VG.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=ee.now()),l(t)||(t=new h),aw=$Be(e,aw),t=h.negate(aw,t),JBe(e,aw),h.subtract(t,aw,t),Q.multiplyByVector(Rne,t,t),t};VG.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=ee.now()),t=One(e,t),Q.multiplyByVector(Rne,t,t),t};var Uy=VG;function QBe(e,t,n,i,o,r,s){let a=Oi.numberOfPoints(e,t,o),c,u=n.red,f=n.green,d=n.blue,p=n.alpha,_=i.red,m=i.green,x=i.blue,C=i.alpha;if(z.equals(n,i)){for(c=0;c<a;c++)r[s++]=z.floatToByte(u),r[s++]=z.floatToByte(f),r[s++]=z.floatToByte(d),r[s++]=z.floatToByte(p);return s}let A=(_-u)/a,T=(m-f)/a,b=(x-d)/a,S=(C-p)/a,w=s;for(c=0;c<a;c++)r[w++]=z.floatToByte(u+c*A),r[w++]=z.floatToByte(f+c*T),r[w++]=z.floatToByte(d+c*b),r[w++]=z.floatToByte(p+c*S);return w}function cw(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=y(e.colorsPerVertex,!1);this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=y(e.arcType,Yt.GEODESIC),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._workerName="createSimplePolylineGeometry";let o=1+t.length*h.packedLength;o+=l(n)?1+n.length*z.packedLength:1,this.packedLength=o+re.packedLength+3}cw.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};cw.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=re.unpack(e,t);t+=re.packedLength;let c=e[t++]===1,u=e[t++],f=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=u,n._granularity=f,n):new cw({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:u,granularity:f})};var WO=new Array(2),jO=new Array(2),eLe={positions:WO,height:jO,ellipsoid:void 0,minDistance:void 0,granularity:void 0};cw.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=R.chordLength(r,s.maximumRadius),c=l(n)&&!i,u,f=t.length,d,p,_,m,x=0;if(o===Yt.GEODESIC||o===Yt.RHUMB){let S,w,D;o===Yt.GEODESIC?(S=R.chordLength(r,s.maximumRadius),w=Oi.numberOfPoints,D=Oi.generateArc):(S=r,w=Oi.numberOfPointsRhumbLine,D=Oi.generateRhumbArc);let O=Oi.extractHeights(t,s),I=eLe;if(o===Yt.GEODESIC?I.minDistance=a:I.granularity=r,I.ellipsoid=s,c){let L=0;for(u=0;u<f-1;u++)L+=w(t[u],t[u+1],S)+1;d=new Float64Array(L*3),_=new Uint8Array(L*4),I.positions=WO,I.height=jO;let N=0;for(u=0;u<f-1;++u){WO[0]=t[u],WO[1]=t[u+1],jO[0]=O[u],jO[1]=O[u+1];let g=D(I);if(l(n)){let E=g.length/3;m=n[u];for(let v=0;v<E;++v)_[N++]=z.floatToByte(m.red),_[N++]=z.floatToByte(m.green),_[N++]=z.floatToByte(m.blue),_[N++]=z.floatToByte(m.alpha)}d.set(g,x),x+=g.length}}else if(I.positions=t,I.height=O,d=new Float64Array(D(I)),l(n)){for(_=new Uint8Array(d.length/3*4),u=0;u<f-1;++u){let N=t[u],g=t[u+1],E=n[u],v=n[u+1];x=QBe(N,g,E,v,a,_,x)}let L=n[f-1];_[x++]=z.floatToByte(L.red),_[x++]=z.floatToByte(L.green),_[x++]=z.floatToByte(L.blue),_[x++]=z.floatToByte(L.alpha)}}else{p=c?f*2-2:f,d=new Float64Array(p*3),_=l(n)?new Uint8Array(p*4):void 0;let S=0,w=0;for(u=0;u<f;++u){let D=t[u];if(c&&u>0&&(h.pack(D,d,S),S+=3,m=n[u-1],_[w++]=z.floatToByte(m.red),_[w++]=z.floatToByte(m.green),_[w++]=z.floatToByte(m.blue),_[w++]=z.floatToByte(m.alpha)),c&&u===f-1)break;h.pack(D,d,S),S+=3,l(n)&&(m=n[u],_[w++]=z.floatToByte(m.red),_[w++]=z.floatToByte(m.green),_[w++]=z.floatToByte(m.blue),_[w++]=z.floatToByte(m.alpha))}}let C=new ln;C.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d}),l(n)&&(C.color=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:_,normalize:!0})),p=d.length/3;let A=(p-1)*2,T=Ne.createTypedArray(p,A),b=0;for(u=0;u<p-1;++u)T[b++]=u,T[b++]=u+1;return new ct({attributes:C,indices:T,primitiveType:Le.LINES,boundingSphere:oe.fromPoints(t)})};var Mne=cw;function mT(e){let t=y(e.radius,1),i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new ks(i),this._workerName="createSphereGeometry"}mT.packedLength=ks.packedLength;mT.pack=function(e,t,n){return ks.pack(e._ellipsoidGeometry,t,n)};var tLe=new ks,rg={radius:void 0,radii:new h,vertexFormat:new Pe,stackPartitions:void 0,slicePartitions:void 0};mT.unpack=function(e,t,n){let i=ks.unpack(e,t,tLe);return rg.vertexFormat=Pe.clone(i._vertexFormat,rg.vertexFormat),rg.stackPartitions=i._stackPartitions,rg.slicePartitions=i._slicePartitions,l(n)?(h.clone(i._radii,rg.radii),n._ellipsoidGeometry=new ks(rg),n):(rg.radius=i._radii.x,new mT(rg))};mT.createGeometry=function(e){return ks.createGeometry(e._ellipsoidGeometry)};var Bne=mT;function pT(e){let t=y(e.radius,1),i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new zu(i),this._workerName="createSphereOutlineGeometry"}pT.packedLength=zu.packedLength;pT.pack=function(e,t,n){return zu.pack(e._ellipsoidGeometry,t,n)};var nLe=new zu,zy={radius:void 0,radii:new h,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};pT.unpack=function(e,t,n){let i=zu.unpack(e,t,nLe);return zy.stackPartitions=i._stackPartitions,zy.slicePartitions=i._slicePartitions,zy.subdivisions=i._subdivisions,l(n)?(h.clone(i._radii,zy.radii),n._ellipsoidGeometry=new zu(zy),n):(zy.radius=i._radii.x,new pT(zy))};pT.createGeometry=function(e){return zu.createGeometry(e._ellipsoidGeometry)};var sg=pT;function Wa(e,t,n){this.clock=y(e,0),this.cone=y(t,0),this.magnitude=y(n,1)}Wa.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new Wa),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};Wa.clone=function(e,t){if(!!l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Wa(e.clock,e.cone,e.magnitude)};Wa.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Wa(e.clock,e.cone,1)};Wa.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};Wa.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.clock-t.clock)<=n&&Math.abs(e.cone-t.cone)<=n&&Math.abs(e.magnitude-t.magnitude)<=n};Wa.prototype.equals=function(e){return Wa.equals(this,e)};Wa.prototype.clone=function(e){return Wa.clone(this,e)};Wa.prototype.equalsEpsilon=function(e,t){return Wa.equalsEpsilon(this,e,t)};Wa.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var qO=Wa;function _T(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(_T.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});_T.prototype.findTimeInterval=zi.prototype.findTimeInterval;_T.prototype.wrapTime=zi.prototype.wrapTime;_T.prototype.clampTime=zi.prototype.clampTime;_T.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(l(t)||(t=new o),o.clone(n[i],t))};var YO=_T;function iLe(e,t){let n=[],i=e.length,o=0;for(;o<i;){let r=Math.ceil((i-o)/t--);n.push(e.slice(o,o+r)),o+=r}return n}var XO=iLe;var oLe={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},hn=oLe;function ag(e){}Object.defineProperties(ag.prototype,{ellipsoid:{get:ye.throwInstantiationError},rectangle:{get:ye.throwInstantiationError},projection:{get:ye.throwInstantiationError}});ag.prototype.getNumberOfXTilesAtLevel=ye.throwInstantiationError;ag.prototype.getNumberOfYTilesAtLevel=ye.throwInstantiationError;ag.prototype.rectangleToNativeRectangle=ye.throwInstantiationError;ag.prototype.tileXYToNativeRectangle=ye.throwInstantiationError;ag.prototype.tileXYToRectangle=ye.throwInstantiationError;ag.prototype.positionToTileXY=ye.throwInstantiationError;var Lne=ag;function zG(e,t){return ee.compare(e.start,t.start)}function Br(e){if(this._intervals=[],this._changedEvent=new _e,l(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(Br.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){let e=this._intervals;return e.length===0?void 0:e[0].start}},isStartIncluded:{get:function(){let e=this._intervals;return e.length===0?!1:e[0].isStartIncluded}},stop:{get:function(){let e=this._intervals,t=e.length;return t===0?void 0:e[t-1].stop}},isStopIncluded:{get:function(){let e=this._intervals,t=e.length;return t===0?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return this._intervals.length===0}}});Br.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof Br))return!1;let n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!yn.equals(n[r],i[r],t))return!1;return!0};Br.prototype.get=function(e){return this._intervals[e]};Br.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Br.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Br.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Br.prototype.contains=function(e){return this.indexOf(e)>=0};var kG=new yn;Br.prototype.indexOf=function(e){let t=this._intervals;kG.start=e,kG.stop=e;let n=ar(t,kG,zG);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1<t.length&&yn.contains(t[n-1],e)?n-1:~n)};Br.prototype.findInterval=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let s=0,a=r.length;s<a;s++){let c=r[s];if((!l(t)||c.start.equals(t))&&(!l(n)||c.stop.equals(n))&&(!l(i)||c.isStartIncluded===i)&&(!l(o)||c.isStopIncluded===o))return r[s]}};Br.prototype.addInterval=function(e,t){if(e.isEmpty)return;let n=this._intervals;if(n.length===0||ee.greaterThan(e.start,n[n.length-1].stop)){n.push(e),this._changedEvent.raiseEvent(this);return}let i=ar(n,e,zG);i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i;let o;for(i>0&&(o=ee.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(ee.greaterThan(e.stop,n[i-1].stop)?e=new yn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new yn({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=ee.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new yn({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new yn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=ee.compare(e.stop,n[i].start),o>0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new yn({start:e.start,stop:ee.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:ee.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new yn({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Br.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=ar(t,e,zG);n<0&&(n=~n);let i=!1;for(n>0&&(ee.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(ee.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new yn({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new yn({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new yn({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&ee.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new yn({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new yn({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(ee.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new yn({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};Br.prototype.intersect=function(e,t,n){let i=new Br,o=0,r=0,s=this._intervals,a=e._intervals;for(;o<s.length&&r<a.length;){let c=s[o],u=a[r];if(ee.lessThan(c.stop,u.start))++o;else if(ee.lessThan(u.stop,c.start))++r;else{if(l(n)||l(t)&&t(c.data,u.data)||!l(t)&&u.data===c.data){let f=yn.intersect(c,u,new yn,n);f.isEmpty||i.addInterval(f,t)}ee.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++o:++r}}return i};Br.fromJulianDateArray=function(e,t){l(t)||(t=new Br);let n=e.julianDates,i=n.length,o=e.dataCallback,r=y(e.isStartIncluded,!0),s=y(e.isStopIncluded,!0),a=y(e.leadingInterval,!1),c=y(e.trailingInterval,!1),u,f=0;a&&(++f,u=new yn({start:ze.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u));for(let d=0;d<i-1;++d){let p=n[d],_=n[d+1];u=new yn({start:p,stop:_,isStartIncluded:t.length===f?r:!0,isStopIncluded:d===i-2?s:!1}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u),p=_}return c&&(u=new yn({start:n[i-1],stop:ze.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u)),t};var ja=new x_,lw=[0,31,28,31,30,31,30,31,31,30,31,30,31];function UG(e,t,n){l(n)||(n=new ee),ee.toGregorianDate(e,ja);let i=ja.millisecond+t.millisecond,o=ja.second+t.second,r=ja.minute+t.minute,s=ja.hour+t.hour,a=ja.day+t.day,c=ja.month+t.month,u=ja.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),lw[2]=C_(u)?29:28;a>lw[c]||c>=13;)a>lw[c]&&(a-=lw[c],++c),c>=13&&(--c,u+=Math.floor(c/12),c=c%12,++c),lw[2]=C_(u)?29:28;return ja.millisecond=i,ja.second=o,ja.minute=r,ja.hour=s,ja.day=a,ja.month=c,ja.year=u,ee.fromGregorianDate(ja,n)}var rLe=new ee,sLe=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function Nne(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(sLe);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),ee.toGregorianDate(ee.fromIso8601(e,rLe),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var uw=new x_;Br.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=ee.fromIso8601(n[0]),o=ee.fromIso8601(n[1]),r=[];if(!Nne(n[2],uw))r.push(i,o);else{let s=ee.clone(i);for(r.push(s);ee.compare(s,o)<0;)s=UG(s,uw),ee.compare(o,s)<=0&&ee.clone(o,s),r.push(s)}return Br.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Br.fromIso8601DateArray=function(e,t){return Br.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return ee.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Br.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=y(e.relativeToPrevious,!1),r=[],s,a,c=i.length;for(let u=0;u<c;++u)(Nne(i[u],uw)||u===0)&&(o&&l(a)?s=UG(a,uw):s=UG(n,uw),r.push(s),a=s);return Br.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var qr=Br;var aLe=new h(1,1,1),cLe=h.ZERO,lLe=Me.IDENTITY;function Fne(e,t,n){this.translation=h.clone(y(e,cLe)),this.rotation=Me.clone(y(t,lLe)),this.scale=h.clone(y(n,aLe))}Fne.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&Me.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var rp=Fne;function Hy(e){e=y(e,y.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=y(e.epoch,ze.MINIMUM_VALUE),this.tolerance=y(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(Hy.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(l(t)&&(this._clockSubscription(),this._clockSubscription=void 0),l(e)&&(this._clockSubscription=e.onTick.addEventListener(Hy.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(l(t)&&t.removeEventListener("seeked",this._seekFunction,!1),l(e)&&(this._seeking=!1,this._seekFunction=uLe(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});Hy.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,ue(this)};Hy.prototype.isDestroyed=function(){return!1};Hy.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};Hy.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=y(this.epoch,ze.MINIMUM_VALUE),s=ee.secondsDifference(o,r),a=t.duration,c,u=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),c=s):s>a?c=a:s<0?c=0:c=s;let f=i?y(this.tolerance,1):.001;Math.abs(c-u)>f&&(this._seeking=!0,t.currentTime=c)};function uLe(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var Vne=Hy;function fLe(e,t){this.rectangle=e,this.maxLevel=t}function gT(e){e=y(e,y.EMPTY_OBJECT);let t=De.createIfNeeded(e.url);this._resource=t,this._errorEvent=new _e,this._ready=!1,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._tilingScheme=void 0,this._rectangles=[];let i=this,o,r=y(e.ellipsoid,re.WGS84);function s(u){let f=u.getElementsByTagName("SRS")[0].textContent;if(f==="EPSG:4326")i._tilingScheme=new Xi({ellipsoid:r});else return Promise.reject(new fe(`SRS ${f} is not supported.`));let d=u.getElementsByTagName("TileFormat")[0];i._heightmapWidth=parseInt(d.getAttribute("width"),10),i._heightmapHeight=parseInt(d.getAttribute("height"),10),i._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(r,Math.min(i._heightmapWidth,i._heightmapHeight),i._tilingScheme.getNumberOfXTilesAtLevel(0));let p=u.getElementsByTagName("DataExtent");for(let _=0;_<p.length;++_){let m=p[_],x=R.toRadians(parseFloat(m.getAttribute("minx"))),C=R.toRadians(parseFloat(m.getAttribute("miny"))),A=R.toRadians(parseFloat(m.getAttribute("maxx"))),T=R.toRadians(parseFloat(m.getAttribute("maxy"))),b=parseInt(m.getAttribute("maxlevel"),10);i._rectangles.push(new fLe(new de(x,C,A,T),b))}return i._ready=!0,Promise.resolve(!0)}function a(u){let f=y(l(u)?u.message:void 0,`An error occurred while accessing ${i._resource.url}.`);return o=Gn.reportError(o,i,i._errorEvent,f),o.retry?c():Promise.reject(new fe(f))}function c(){return i._resource.fetchXML().then(s).catch(a)}this._readyPromise=c()}Object.defineProperties(gT.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});gT.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${o-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!l(s))return;let a=this;return Promise.resolve(s).then(function(c){return new ka({buffer:ch(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:dLe(a,e,t,n),structure:a._terrainDataStructure})})};gT.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var kne=new de;function dLe(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<r.length&&a!==15;++c){let u=r[c];if(u.maxLevel<=i)continue;let f=u.rectangle,d=de.intersection(f,s,kne);l(d)&&(KO(o,f,t*2,n*2,i+1)&&(a|=4),KO(o,f,t*2+1,n*2,i+1)&&(a|=8),KO(o,f,t*2,n*2+1,i+1)&&(a|=1),KO(o,f,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function KO(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(de.intersection(r,t,kne))}gT.prototype.getTileDataAvailable=function(e,t,n){};gT.prototype.loadTileDataAvailability=function(e,t,n){};var Une=gT;var hLe={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},zne=Object.freeze(hLe);var Hne={};function mLe(e,t){return R.equalsEpsilon(e.latitude,t.latitude,R.EPSILON10)&&R.equalsEpsilon(e.longitude,t.longitude,R.EPSILON10)}var pLe=new me,_Le=new me;function gLe(e,t,n,i){t=So(t,h.equalsEpsilon);let o=t.length;if(o<2)return;let r=l(i),s=l(n),a=new Array(o),c=new Array(o),u=new Array(o),f=t[0];a[0]=f;let d=e.cartesianToCartographic(f,pLe);s&&(d.height=n[0]),c[0]=d.height,r?u[0]=i[0]:u[0]=0;let p=c[0],_=u[0],m=p===_,x=1;for(let C=1;C<o;++C){let A=t[C],T=e.cartesianToCartographic(A,_Le);s&&(T.height=n[C]),m=m&&T.height===0,mLe(d,T)?d.height<T.height&&(c[x-1]=T.height):(a[x]=A,c[x]=T.height,r?u[x]=i[C]:u[x]=0,m=m&&c[x]===u[x],me.clone(T,d),++x)}if(!(m||x<2))return a.length=x,c.length=x,u.length=x,{positions:a,topHeights:c,bottomHeights:u}}var yLe=new Array(2),xLe=new Array(2),CLe={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};Hne.computePositions=function(e,t,n,i,o,r){let s=gLe(e,t,n,i);if(!l(s))return;t=s.positions,n=s.topHeights,i=s.bottomHeights;let a=t.length,c=a-2,u,f,d=R.chordLength(o,e.maximumRadius),p=CLe;if(p.minDistance=d,p.ellipsoid=e,r){let _=0,m;for(m=0;m<a-1;m++)_+=Oi.numberOfPoints(t[m],t[m+1],d)+1;u=new Float64Array(_*3),f=new Float64Array(_*3);let x=yLe,C=xLe;p.positions=x,p.height=C;let A=0;for(m=0;m<a-1;m++){x[0]=t[m],x[1]=t[m+1],C[0]=n[m],C[1]=n[m+1];let T=Oi.generateArc(p);u.set(T,A),C[0]=i[m],C[1]=i[m+1],f.set(Oi.generateArc(p),A),A+=T.length}}else p.positions=t,p.height=n,u=new Float64Array(Oi.generateArc(p)),p.height=i,f=new Float64Array(Oi.generateArc(p));return{bottomPositions:f,topPositions:u,numCorners:c}};var yT=Hne;var HG=new h,$O=new h,ALe=new h,Gne=new h,TLe=new h,bLe=new h,ELe=new h;function Gy(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.ellipsoid,re.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Pe.clone(o),this._granularity=r,this._ellipsoid=re.clone(s),this._workerName="createWallGeometry";let a=1+t.length*h.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+re.packedLength+Pe.packedLength+1}Gy.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n]=e._granularity,t};var Wne=re.clone(re.UNIT_SPHERE),jne=new Pe,fw={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Wne,vertexFormat:jne,granularity:void 0};Gy.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=re.unpack(e,t,Wne);t+=re.packedLength;let u=Pe.unpack(e,t,jne);t+=Pe.packedLength;let f=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=re.clone(c,n._ellipsoid),n._vertexFormat=Pe.clone(u,n._vertexFormat),n._granularity=f,n):(fw.positions=r,fw.minimumHeights=s,fw.maximumHeights=a,fw.granularity=f,new Gy(fw))};Gy.fromConstantHeights=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=o),a&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new Gy(c)};Gy.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=yT.computePositions(s,t,i,n,r,!0);if(!l(a))return;let c=a.bottomPositions,u=a.topPositions,f=a.numCorners,d=u.length,p=d*2,_=o.position?new Float64Array(p):void 0,m=o.normal?new Float32Array(p):void 0,x=o.tangent?new Float32Array(p):void 0,C=o.bitangent?new Float32Array(p):void 0,A=o.st?new Float32Array(p/3*2):void 0,T=0,b=0,S=0,w=0,D=0,O=ELe,I=bLe,L=TLe,N=!0;d/=3;let g,E=0,v=1/(d-f-1);for(g=0;g<d;++g){let k=g*3,H=h.fromArray(u,k,HG),F=h.fromArray(c,k,$O);if(o.position&&(_[T++]=F.x,_[T++]=F.y,_[T++]=F.z,_[T++]=H.x,_[T++]=H.y,_[T++]=H.z),o.st&&(A[D++]=E,A[D++]=0,A[D++]=E,A[D++]=1),o.normal||o.tangent||o.bitangent){let Y=h.clone(h.ZERO,Gne),j=h.subtract(H,s.geodeticSurfaceNormal(H,$O),$O);if(g+1<d&&(Y=h.fromArray(u,k+3,Gne)),N){let X=h.subtract(Y,H,ALe),W=h.subtract(j,H,HG);O=h.normalize(h.cross(W,X,O),O),N=!1}h.equalsEpsilon(H,Y,R.EPSILON10)?N=!0:(E+=v,o.tangent&&(I=h.normalize(h.subtract(Y,H,I),I)),o.bitangent&&(L=h.normalize(h.cross(O,I,L),L))),o.normal&&(m[b++]=O.x,m[b++]=O.y,m[b++]=O.z,m[b++]=O.x,m[b++]=O.y,m[b++]=O.z),o.tangent&&(x[w++]=I.x,x[w++]=I.y,x[w++]=I.z,x[w++]=I.x,x[w++]=I.y,x[w++]=I.z),o.bitangent&&(C[S++]=L.x,C[S++]=L.y,C[S++]=L.z,C[S++]=L.x,C[S++]=L.y,C[S++]=L.z)}}let P=new ln;o.position&&(P.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_})),o.normal&&(P.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),o.tangent&&(P.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),o.bitangent&&(P.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:C})),o.st&&(P.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:A}));let M=p/3;p-=6*(f+1);let V=Ne.createTypedArray(M,p),U=0;for(g=0;g<M-2;g+=2){let k=g,H=g+2,F=h.fromArray(_,k*3,HG),Y=h.fromArray(_,H*3,$O);if(h.equalsEpsilon(F,Y,R.EPSILON10))continue;let j=g+1,X=g+3;V[U++]=j,V[U++]=k,V[U++]=X,V[U++]=X,V[U++]=k,V[U++]=H}return new ct({attributes:P,indices:V,primitiveType:Le.TRIANGLES,boundingSphere:new oe.fromVertices(_)})};var ZO=Gy;var qne=new h,Yne=new h;function Wy(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=y(e.granularity,R.RADIANS_PER_DEGREE),r=y(e.ellipsoid,re.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=re.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*h.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+re.packedLength+1}Wy.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n]=e._granularity,t};var Xne=re.clone(re.UNIT_SPHERE),dw={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Xne,granularity:void 0};Wy.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=re.unpack(e,t,Xne);t+=re.packedLength;let u=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=re.clone(c,n._ellipsoid),n._granularity=u,n):(dw.positions=r,dw.minimumHeights=s,dw.maximumHeights=a,dw.granularity=u,new Wy(dw))};Wy.fromConstantHeights=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=o),a&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new Wy(c)};Wy.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=yT.computePositions(r,t,i,n,o,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,u=c.length,f=u*2,d=new Float64Array(f),p=0;u/=3;let _;for(_=0;_<u;++_){let T=_*3,b=h.fromArray(c,T,qne),S=h.fromArray(a,T,Yne);d[p++]=S.x,d[p++]=S.y,d[p++]=S.z,d[p++]=b.x,d[p++]=b.y,d[p++]=b.z}let m=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})}),x=f/3;f=2*x-4+x;let C=Ne.createTypedArray(x,f),A=0;for(_=0;_<x-2;_+=2){let T=_,b=_+2,S=h.fromArray(d,T*3,qne),w=h.fromArray(d,b*3,Yne);if(h.equalsEpsilon(S,w,R.EPSILON10))continue;let D=_+1,O=_+3;C[A++]=D,C[A++]=T,C[A++]=D,C[A++]=O,C[A++]=T,C[A++]=b}return C[A++]=x-2,C[A++]=x-1,new ct({attributes:m,indices:C,primitiveType:Le.LINES,boundingSphere:new oe.fromVertices(d)})};var JO=Wy;function SLe(e){switch(e){case Z.FLOAT:return"float";case Z.FLOAT_VEC2:return"vec2";case Z.FLOAT_VEC3:return"vec3";case Z.FLOAT_VEC4:return"vec4";case Z.FLOAT_MAT2:return"mat2";case Z.FLOAT_MAT3:return"mat3";case Z.FLOAT_MAT4:return"mat4";case Z.SAMPLER_2D:return"sampler2D";case Z.BOOL:return"bool"}}var cg=SLe;var GG={};function wLe(e){let t=Ne.createTypedArray(e,e*2),n=e,i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}function vLe(e,t){let n=t.length,i=Ne.createTypedArray(e,n*2),o=0;for(let r=0;r<n;r+=3){let s=t[r],a=t[r+1],c=t[r+2];i[o++]=s,i[o++]=a,i[o++]=a,i[o++]=c,i[o++]=c,i[o++]=s}return i}function DLe(e){let t=e-2,n=2+t*4,i=Ne.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}function PLe(e,t){let i=t.length-2,o=2+i*4,r=Ne.createTypedArray(e,o),s=0;r[s++]=t[0],r[s++]=t[1];for(let a=0;a<i;a++){let c=t[a],u=t[a+1],f=t[a+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=c}return r}function ILe(e){let t=e-2,n=2+t*4,i=Ne.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}function OLe(e,t){let i=t.length-2,o=2+i*4,r=Ne.createTypedArray(e,o),s=0,a=t[0];r[s++]=a,r[s++]=t[1];for(let c=0;c<i;c++){let u=t[c+1],f=t[c+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=a}return r}GG.createWireframeIndices=function(e,t,n){let i=l(n);if(e===Le.TRIANGLES)return i?vLe(t,n):wLe(t);if(e===Le.TRIANGLE_STRIP)return i?PLe(t,n):DLe(t);if(e===Le.TRIANGLE_FAN)return i?OLe(t,n):ILe(t)};GG.getWireframeIndicesCount=function(e,t){if(e===Le.TRIANGLES)return t*2;if(e===Le.TRIANGLE_STRIP||e===Le.TRIANGLE_FAN){let n=t-2;return 2+n*4}return t};var hw=GG;function RLe(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var QO=RLe;function lg(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new _e,this.setValue(e)}Object.defineProperties(lg.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});lg.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};lg.prototype.setValue=function(e){let t=this._value;if(t!==e){let n=l(e),i=n&&typeof e.clone=="function",o=n&&typeof e.equals=="function";(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}};lg.prototype.equals=function(e){return this===e||e instanceof lg&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};lg.prototype.valueOf=function(){return this._value};lg.prototype.toString=function(){return String(this._value)};var Xn=lg;function MLe(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){let s=this[t],a=this[n];l(a)&&(a(),this[n]=void 0),r!==void 0&&(!l(r)||!l(r.getValue))&&l(o)&&(r=o(r)),s!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,s)),l(r)&&l(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}function BLe(e){return new Xn(e)}function LLe(e,t,n){return MLe(e,`_${e.toString()}`,`_${e.toString()}Subscription`,y(t,!1),y(n,BLe))}var le=LLe;function mw(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(mw.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:le("show"),image:le("image"),scale:le("scale"),pixelOffset:le("pixelOffset"),eyeOffset:le("eyeOffset"),horizontalOrigin:le("horizontalOrigin"),verticalOrigin:le("verticalOrigin"),heightReference:le("heightReference"),color:le("color"),rotation:le("rotation"),alignedAxis:le("alignedAxis"),sizeInMeters:le("sizeInMeters"),width:le("width"),height:le("height"),scaleByDistance:le("scaleByDistance"),translucencyByDistance:le("translucencyByDistance"),pixelOffsetScaleByDistance:le("pixelOffsetScaleByDistance"),imageSubRegion:le("imageSubRegion"),distanceDisplayCondition:le("distanceDisplayCondition"),disableDepthTestDistance:le("disableDepthTestDistance")});mw.prototype.clone=function(e){return l(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new mw(this)};mw.prototype.merge=function(e){this.show=y(this._show,e.show),this.image=y(this._image,e.image),this.scale=y(this._scale,e.scale),this.pixelOffset=y(this._pixelOffset,e.pixelOffset),this.eyeOffset=y(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=y(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=y(this._verticalOrigin,e.verticalOrigin),this.heightReference=y(this._heightReference,e.heightReference),this.color=y(this._color,e.color),this.rotation=y(this._rotation,e.rotation),this.alignedAxis=y(this._alignedAxis,e.alignedAxis),this.sizeInMeters=y(this._sizeInMeters,e.sizeInMeters),this.width=y(this._width,e.width),this.height=y(this._height,e.height),this.scaleByDistance=y(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=y(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=y(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=y(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=y(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=y(this._disableDepthTestDistance,e.disableDepthTestDistance)};var Ec=mw;var NLe={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},He=Object.freeze(NLe);var FLe={CENTER:0,LEFT:1,RIGHT:-1},di=Object.freeze(FLe);var VLe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},wn=Object.freeze(VLe);var kLe={DONE:0,PENDING:1,FAILED:2},lt=Object.freeze(kLe);function ad(){ye.throwInstantiationError()}Object.defineProperties(ad.prototype,{isConstant:{get:ye.throwInstantiationError},definitionChanged:{get:ye.throwInstantiationError}});ad.prototype.getValue=ye.throwInstantiationError;ad.prototype.equals=ye.throwInstantiationError;ad.equals=function(e,t){return e===t||l(e)&&e.equals(t)};ad.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!ad.equals(e[i],t[i]))return!1;return!0};ad.isConstant=function(e){return!l(e)||e.isConstant};ad.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};ad.getValueOrDefault=function(e,t,n,i){return l(e)?y(e.getValue(t,i),n):n};ad.getValueOrClonedDefault=function(e,t,n,i){let o;return l(e)&&(o=e.getValue(t,i)),l(o)||(o=n.clone(o)),o};var q=ad;var ULe=z.WHITE,zLe=h.ZERO,HLe=He.NONE,GLe=G.ZERO,WLe=1,jLe=0,qLe=h.ZERO,YLe=di.CENTER,XLe=wn.CENTER,KLe=!1,$Le=new h,ZLe=new z,JLe=new h,QLe=new G,eNe=new wt,tNe=new wt,nNe=new wt,iNe=new qe,oNe=new Tt;function Kne(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function ug(e,t){t.collectionChanged.addEventListener(ug.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new gt,this._onCollectionChanged(t,t.values,[],[])}ug.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._billboard,c,u=r.billboard,f=s.isShowing&&s.isAvailable(e)&&q.getValueOrDefault(a._show,e,!0),d;if(f&&(d=q.getValueOrUndefined(s._position,e,$Le),c=q.getValueOrUndefined(a._image,e),f=l(d)&&l(c)),!f){WG(r,s,n);continue}q.isConstant(s._position)||(n._clusterDirty=!0),l(u)||(u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u),u.show=f,(!l(u.image)||r.textureValue!==c)&&(u.image=c,r.textureValue=c),u.position=d,u.color=q.getValueOrDefault(a._color,e,ULe,ZLe),u.eyeOffset=q.getValueOrDefault(a._eyeOffset,e,zLe,JLe),u.heightReference=q.getValueOrDefault(a._heightReference,e,HLe),u.pixelOffset=q.getValueOrDefault(a._pixelOffset,e,GLe,QLe),u.scale=q.getValueOrDefault(a._scale,e,WLe),u.rotation=q.getValueOrDefault(a._rotation,e,jLe),u.alignedAxis=q.getValueOrDefault(a._alignedAxis,e,qLe),u.horizontalOrigin=q.getValueOrDefault(a._horizontalOrigin,e,YLe),u.verticalOrigin=q.getValueOrDefault(a._verticalOrigin,e,XLe),u.width=q.getValueOrUndefined(a._width,e),u.height=q.getValueOrUndefined(a._height,e),u.scaleByDistance=q.getValueOrUndefined(a._scaleByDistance,e,eNe),u.translucencyByDistance=q.getValueOrUndefined(a._translucencyByDistance,e,tNe),u.pixelOffsetScaleByDistance=q.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,nNe),u.sizeInMeters=q.getValueOrDefault(a._sizeInMeters,e,KLe),u.distanceDisplayCondition=q.getValueOrUndefined(a._distanceDisplayCondition,e,oNe),u.disableDepthTestDistance=q.getValueOrUndefined(a._disableDepthTestDistance,e);let p=q.getValueOrUndefined(a._imageSubRegion,e,iNe);l(p)&&u.setImageSubRegion(u._imageId,p)}return!0};ug.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return lt.FAILED;let i=n.billboard;if(i.heightReference===He.NONE)t.center=h.clone(i.position,t.center);else{if(!l(i._clampedPosition))return lt.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,lt.DONE};ug.prototype.isDestroyed=function(){return!1};ug.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ug.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return ue(this)};ug.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&s.set(r.id,new Kne(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Kne(r)):(WG(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],WG(s.get(r.id),r,a),s.remove(r.id)};function WG(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var eR=ug;var tR=`varying vec3 v_positionEC;
|
|
102
|
+
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function od(e){let t=e;typeof t!="string"&&!(t instanceof De)&&(t=e.url);let n=De.createIfNeeded(t);n.appendForwardSlash(),this._resource=n,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=R.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};let i=this;this._readyPromise=kIe(this).then(function(){return i.getQuadTreePacket("",i._quadPacketVersion)}).then(function(){return!0}).catch(function(o){let r=`An error occurred while accessing ${qQ(i,"",1).url}.`;return Promise.reject(new fe(r))})}Object.defineProperties(od.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}});od.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;Tc(t,r)?Tc(e,r)&&(s|=1):(s|=2,Tc(e,r)||(s|=1)),i+=s}return i};od.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];Tc(s,2)?Tc(s,1)||(t|=r):(n|=r,Tc(s,1)&&(t|=r))}return{x:t,y:n,level:i}};od.prototype.isValid=function(e){let t=this.getTileInformationFromQuadKey(e);if(l(t))return t!==null;let n=!0,i=e,o;for(;i.length>1;)if(o=i.substring(i.length-1),i=i.substring(0,i.length-1),t=this.getTileInformationFromQuadKey(i),l(t)){!t.hasSubtree()&&!t.hasChild(parseInt(o))&&(n=!1);break}else if(t===null){n=!1;break}return n};var jQ=new Di("decodeGoogleEarthEnterprisePacket");od.prototype.getQuadTreePacket=function(e,t,n){t=y(t,1),e=y(e,"");let o=qQ(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return jQ.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(u){let f,d=-1;if(e!==""){d=e.length+1;let m=u[e];f=r[e],f._bits|=m._bits,delete u[e]}let p=Object.keys(u);p.sort(function(m,x){return m.length-x.length});let _=p.length;for(let m=0;m<_;++m){let x=p[m];if(u[x]!==null){let A=iO.clone(u[x]),T=x.length;if(T===d)A.setParent(f);else if(T>1){let b=r[x.substring(0,x.length-1)];A.setParent(b)}r[x]=A}else r[x]=null}})})};od.prototype.populateSubtree=function(e,t,n,i){let o=od.tileXYToQuadKey(e,t,n);return q5(this,o,i)};function q5(e,t,n){let i=e._tileInfo,o=t,r=i[o];if(l(r)&&(!r.hasSubtree()||r.hasChildren()))return r;for(;r===void 0&&o.length>1;)o=o.substring(0,o.length-1),r=i[o];let s,a=e._subtreePromises,c=a[o];if(l(c))return c.then(function(){return s=new rr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),q5(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new fe(`Couldn't load metadata for tile ${t}`));if(c=e.getQuadTreePacket(o,r.cnodeVersion,n),!!l(c))return a[o]=c,c.then(function(){return s=new rr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),q5(e,t,s)}).finally(function(){delete a[o]})}od.prototype.getTileInformation=function(e,t,n){let i=od.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};od.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function qQ(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var W5,j5;function kIe(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(j5)){let n=Jt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;j5=XC(n).then(function(){W5=window.cesiumGoogleEarthDbRootParser(WA),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return j5.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=W5.EncryptedDbRootProto.decode(new Uint8Array(n)),o=i.encryptionData,r=o.byteOffset,s=r+o.byteLength,a=e.key=o.buffer.slice(r,s);o=i.dbrootData,r=o.byteOffset,s=r+o.byteLength;let c=o.buffer.slice(r,s);return jQ.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=W5.DbRootProto.decode(new Uint8Array(n.buffer));if(e.imageryPresent=y(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=y(i.terrainPresent,e.terrainPresent),l(i.endSnippet)&&l(i.endSnippet.model)){let a=i.endSnippet.model;e.negativeAltitudeExponentBias=y(a.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=y(a.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}l(i.databaseVersion)&&(e._quadPacketVersion=y(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));let o=e.providers,r=y(i.providerInfo,[]),s=r.length;for(let a=0;a<s;++a){let c=r[a],u=c.copyrightString;l(u)&&(o[c.providerId]=new Ht(u.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=VIe})}var Rh=od;function Py(e){e=y(e,y.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;let t=y(e.childTileMask,15),n=t&3;n|=t&4?8:0,n|=t&8?4:0,this._childTileMask=n,this._createdByUpsampling=y(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(Py.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var KQ="createVerticesFromGoogleEarthEnterpriseBuffer",UIe=new Di(KQ),zIe=new Di(KQ,_h.maximumAsynchronousTasks),YQ=new de,Y5=new de;Py.prototype.createMesh=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=y(e.exaggeration,1),s=y(e.exaggerationRelativeHeight,0),a=y(e.throttle,!0),c=t.ellipsoid;t.tileXYToNativeRectangle(n,i,o,YQ),t.tileXYToRectangle(n,i,o,Y5);let u=c.cartographicToCartesian(de.center(Y5)),d=40075.16/(1<<o);this._skirtHeight=Math.min(d*8,1e3);let _=(a?zIe:UIe).scheduleTask({buffer:this._buffer,nativeRectangle:YQ,rectangle:Y5,relativeToCenter:u,ellipsoid:c,skirtHeight:this._skirtHeight,exaggeration:r,exaggerationRelativeHeight:s,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(!l(_))return;let m=this;return _.then(function(x){return m._mesh=new $f(u,new Float32Array(x.vertices),new Uint16Array(x.indices),x.indexCountWithoutSkirts,x.vertexCountWithoutSkirts,x.minimumHeight,x.maximumHeight,oe.clone(x.boundingSphere3D),h.clone(x.occludeePointInScaledSpace),x.numberOfAttributes,gi.clone(x.orientedBoundingBox),mc.clone(x.encoding),x.westIndicesSouthToNorth,x.southIndicesEastToWest,x.eastIndicesNorthToSouth,x.northIndicesWestToEast),m._minimumHeight=x.minimumHeight,m._maximumHeight=x.maximumHeight,m._buffer=void 0,m._mesh})};Py.prototype.interpolateHeight=function(e,t,n){let i=R.clamp((t-e.west)/e.width,0,1),o=R.clamp((n-e.south)/e.height,0,1);return l(this._mesh)?qIe(this,i,o):KIe(this,i,o,e)};var HIe=new Di("upsampleQuantizedTerrainMesh",_h.maximumAsynchronousTasks);Py.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,u=n*2===r,f=e.ellipsoid,d=e.tileXYToRectangle(o,r,s),p=HIe.scheduleTask({vertices:a.vertices,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:u,childRectangle:d,ellipsoid:f});if(!l(p))return;let _=this;return p.then(function(m){let x=new Uint16Array(m.vertices),C=Ne.createTypedArray(x.length/3,m.indices),A=_._skirtHeight;return new pA({quantizedVertices:x,indices:C,minimumHeight:m.minimumHeight,maximumHeight:m.maximumHeight,boundingSphere:oe.clone(m.boundingSphere),orientedBoundingBox:gi.clone(m.orientedBoundingBox),horizonOcclusionPoint:h.clone(m.horizonOcclusionPoint),westIndices:m.westIndices,southIndices:m.southIndices,eastIndices:m.eastIndices,northIndices:m.northIndices,westSkirtHeight:A,southSkirtHeight:A,eastSkirtHeight:A,northSkirtHeight:A,childTileMask:0,createdByUpsampling:!0,credits:_._credits})})};Py.prototype.isChildAvailable=function(e,t,n,i){let o=2;return n!==e*2&&++o,i!==t*2&&(o-=2),(this._childTileMask&1<<o)!==0};Py.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var GIe=new G,WIe=new G,jIe=new G,$Q=new h;function qIe(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let u=s[a],f=s[a+1],d=s[a+2],p=r.decodeTextureCoordinates(o,u,GIe),_=r.decodeTextureCoordinates(o,f,WIe),m=r.decodeTextureCoordinates(o,d,jIe),x=O_.computeBarycentricCoordinates(t,n,p.x,p.y,_.x,_.y,m.x,m.y,$Q);if(x.x>=-1e-15&&x.y>=-1e-15&&x.z>=-1e-15){let C=r.decodeHeight(o,u),A=r.decodeHeight(o,f),T=r.decodeHeight(o,d);return x.x*C+x.y*A+x.z*T}}}var YIe=Uint16Array.BYTES_PER_ELEMENT,XQ=Uint32Array.BYTES_PER_ELEMENT,X5=Int32Array.BYTES_PER_ELEMENT,XIe=Float32Array.BYTES_PER_ELEMENT,K5=Float64Array.BYTES_PER_ELEMENT;function KIe(e,t,n,i){let o=e._buffer,r=0,s=0,a=0;n>.5?(t>.5?(r=2,s=.5):r=3,a=.5):t>.5&&(r=1,s=.5);let c=new DataView(o),u=0;for(let w=0;w<r;++w)u+=c.getUint32(u,!0),u+=XQ;u+=XQ,u+=2*K5;let f=R.toRadians(c.getFloat64(u,!0)*180);u+=K5;let d=R.toRadians(c.getFloat64(u,!0)*180);u+=K5;let p=i.width/f/2,_=i.height/d/2,m=c.getInt32(u,!0);u+=X5;let x=c.getInt32(u,!0)*3;u+=X5,u+=X5;let C=new Array(m),A=new Array(m),T=new Array(m),b;for(b=0;b<m;++b)C[b]=s+c.getUint8(u++)*p,A[b]=a+c.getUint8(u++)*_,T[b]=c.getFloat32(u,!0)*6371010,u+=XIe;let S=new Array(x);for(b=0;b<x;++b)S[b]=c.getUint16(u,!0),u+=YIe;for(b=0;b<x;b+=3){let w=S[b],D=S[b+1],O=S[b+2],I=C[w],L=C[D],N=C[O],g=A[w],E=A[D],v=A[O],P=O_.computeBarycentricCoordinates(t,n,I,g,L,E,N,v,$Q);if(P.x>=-1e-15&&P.y>=-1e-15&&P.z>=-1e-15)return P.x*T[w]+P.y*T[D]+P.z*T[O]}}var qS=Py;var Wu={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},oO=new ee;function rO(){this._terrainCache={},this._lastTidy=ee.now()}rO.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:ee.now()}};rO.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};rO.prototype.tidy=function(){if(ee.now(oO),ee.secondsDifference(oO,this._lastTidy)>10){let e=this._terrainCache,t=Object.keys(e),n=t.length;for(let i=0;i<n;++i){let o=t[i],r=e[o];ee.secondsDifference(oO,r.timestamp)>10&&delete e[o]}ee.clone(oO,this._lastTidy)}};function jA(e){e=y(e,y.EMPTY_OBJECT);let t;if(l(e.metadata))t=e.metadata;else{let r=De.createIfNeeded(e.url);t=new Rh(r)}this._metadata=t,this._tilingScheme=new Xi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new de(-R.PI,-R.PI,R.PI,R.PI),ellipsoid:e.ellipsoid});let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new rO,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new _e,this._ready=!1;let i=this,o;this._readyPromise=t.readyPromise.then(function(r){if(!t.terrainPresent){let s=new fe(`The server ${t.url} doesn't have terrain`);return o=Gn.reportError(o,i,i._errorEvent,s.message,void 0,void 0,void 0,s),Promise.reject(s)}return Gn.reportSuccess(o),i._ready=r,r}).catch(function(r){return o=Gn.reportError(o,i,i._errorEvent,r.message,void 0,void 0,void 0,r),Promise.reject(r)})}Object.defineProperties(jA.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var $Ie=new Di("decodeGoogleEarthEnterprisePacket");function ZQ(e,t,n){let i=t.getChildBitmask();if(t.terrainState===Wu.PARENT){i=0;for(let o=0;o<4;++o){let r=n.getTileInformationFromQuadKey(e+o.toString());l(r)&&r.hasTerrain()&&(i|=1<<o)}}return i}jA.prototype.requestTileGeometry=function(e,t,n,i){let o=Rh.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new fe("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=Wu.UNKNOWN);let u=r.get(o);if(l(u)){let A=s.providers[a.terrainProvider];return Promise.resolve(new qS({buffer:u,childTileMask:ZQ(o,a,s),credits:l(A)?[A]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===Wu.NONE)return Promise.reject(new fe("Terrain tile doesn't exist"))}else return Promise.resolve(new ka({buffer:new Uint8Array(16*16),width:16,height:16}));let f,d=o,p=-1;switch(c){case Wu.SELF:p=a.terrainVersion;break;case Wu.PARENT:d=d.substring(0,d.length-1),f=s.getTileInformationFromQuadKey(d),p=f.terrainVersion;break;case Wu.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(d=d.substring(0,d.length-1),f=s.getTileInformationFromQuadKey(d),l(f)&&f.hasTerrain()&&(p=f.terrainVersion));break}if(p<0)return Promise.reject(new fe("Terrain tile doesn't exist"));let _=this._terrainPromises,m=this._terrainRequests,x,C;if(l(_[d]))x=_[d],C=m[d];else{C=i;let A=ZIe(this,d,p,C).fetchArrayBuffer();if(!l(A))return;x=A.then(function(T){return l(T)?$Ie.scheduleTask({buffer:T,type:"Terrain",key:s.key},[T]).then(function(b){let S=s.getTileInformationFromQuadKey(d);S.terrainState=Wu.SELF,r.add(d,b[0]);let w=S.terrainProvider,D=b.length-1;for(let O=0;O<D;++O){let I=d+O.toString(),L=s.getTileInformationFromQuadKey(I);l(L)&&(r.add(I,b[O+1]),L.terrainState=Wu.PARENT,L.terrainProvider===0&&(L.terrainProvider=w))}}):Promise.reject(new fe("Failed to load terrain."))}),_[d]=x,m[d]=C,x=x.finally(function(){delete _[d],delete m[d]})}return x.then(function(){let A=r.get(o);if(l(A)){let T=s.providers[a.terrainProvider];return new qS({buffer:A,childTileMask:ZQ(o,a,s),credits:l(T)?[T]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new fe("Failed to load terrain."))}).catch(function(A){return C.state===ui.CANCELLED?(i.state=C.state,Promise.reject(A)):(a.terrainState=Wu.NONE,Promise.reject(A))})};jA.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};jA.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=Rh.tileXYToQuadKey(e,t,n),r=i.getTileInformation(e,t,n);if(r===null)return!1;if(l(r)){if(!r.ancestorHasTerrain)return!0;let s=r.terrainState;if(s===Wu.NONE)return!1;if((!l(s)||s===Wu.UNKNOWN)&&(r.terrainState=Wu.UNKNOWN,!r.hasTerrain())){o=o.substring(0,o.length-1);let a=i.getTileInformationFromQuadKey(o);if(!l(a)||!a.hasTerrain())return!1}return!0}if(i.isValid(o)){let s=new rr({throttle:!1,throttleByServer:!0,type:or.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};jA.prototype.loadTileDataAvailability=function(e,t,n){};function ZIe(e,t,n,i){return n=l(n)&&n>0?n:1,e._metadata.resource.getDerivedResource({url:`flatfile?f1c-0${t}-t.${n.toString()}`,request:i})}var JQ=jA;var iG=[Si,Ui],JIe=iG.length,yee=Math.cos(R.toRadians(30)),QQ=Math.cos(R.toRadians(150)),xee=0,Cee=1e3;function Y_(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions;this.width=y(e.width,1),this._positions=t,this.granularity=y(e.granularity,9999),this.loop=y(e.loop,!1),this.arcType=y(e.arcType,Yt.GEODESIC),this._ellipsoid=re.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(Y_.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+re.packedLength+1+1}}});Y_.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<JIe;i++)if(t instanceof iG[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var QIe=new h,eee=new h,tee=new h;function nG(e,t,n,i,o){let r=bc(i,e,0,QIe),s=bc(i,e,n,eee),a=bc(i,t,0,tee),c=ip(s,r,eee),u=ip(a,r,tee);return h.cross(u,c,o),h.normalize(o,o)}var eOe=new me,tOe=new h,nOe=new h,iOe=new h;function $5(e,t,n,i,o,r,s,a,c,u,f){if(o===0)return;let d;r===Yt.GEODESIC?d=new td(e,t,s):r===Yt.RHUMB&&(d=new za(e,t,s));let p=d.surfaceDistance;if(p<o)return;let _=nG(e,t,i,s,iOe),m=Math.ceil(p/o),x=p/m,C=x,A=m-1,T=a.length;for(let b=0;b<A;b++){let S=d.interpolateUsingSurfaceDistance(C,eOe),w=bc(s,S,n,tOe),D=bc(s,S,i,nOe);h.pack(_,a,T),h.pack(w,c,T),h.pack(D,u,T),f.push(S.latitude),f.push(S.longitude),T+=3,C+=x}}var Z5=new me;function bc(e,t,n,i){return me.clone(t,Z5),Z5.height=n,me.toCartesian(Z5,e,i)}Y_.pack=function(e,t,n){let i=y(n,0),o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s){let a=o[s];h.pack(a,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,re.pack(e._ellipsoid,t,i),i+=re.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t};Y_.unpack=function(e,t,n){let i=y(t,0),o=e[i++],r=new Array(o);for(let p=0;p<o;p++)r[p]=h.unpack(e,i),i+=3;let s=e[i++],a=e[i++]===1,c=e[i++],u=re.unpack(e,i);i+=re.packedLength;let f=e[i++],d=e[i++]===1;return l(n)||(n=new Y_({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=c,n._ellipsoid=u,n._projectionIndex=f,n._scene3DOnly=d,n};function ip(e,t,n){return h.subtract(e,t,n),h.normalize(n,n),n}function nee(e,t,n,i){return i=ip(e,t,i),i=h.cross(i,n,i),i=h.normalize(i,i),i=h.cross(n,i,i),i}var oOe=new h,rOe=new h,sOe=new h,Aee=new h,aOe=0,cOe=-1;function J5(e,t,n,i,o){let r=ip(n,t,Aee),s=nee(e,t,r,oOe),a=nee(i,t,r,rOe);if(R.equalsEpsilon(h.dot(s,a),cOe,R.EPSILON5))return o=h.cross(r,s,o),o=h.normalize(o,o),o;o=h.add(a,s,o),o=h.normalize(o,o);let c=h.cross(r,o,sOe);return h.dot(a,c)<aOe&&(o=h.negate(o,o)),o}var lO=rn.fromPointNormal(h.ZERO,h.UNIT_Y),lOe=new h,uOe=new h,fOe=new h,dOe=new h,hOe=new h,sO=new h,aO=new me,iee=new me,oee=new me;Y_.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new iG[e._projectionIndex](i),a=xee,c=Cee,u,f,d=e._positions,p=d.length;p===2&&(n=!1);let _,m,x,C,A=new za(void 0,void 0,i),T,b,S,w=[d[0]];for(f=0;f<p-1;f++)_=d[f],m=d[f+1],T=Ki.lineSegmentPlane(_,m,lO,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&(e.arcType===Yt.GEODESIC?w.push(h.clone(T)):e.arcType===Yt.RHUMB&&(S=i.cartesianToCartographic(T,aO).longitude,x=i.cartesianToCartographic(_,aO),C=i.cartesianToCartographic(m,iee),A.setEndPoints(x,C),b=A.findIntersectionWithLongitude(S,oee),T=i.cartographicToCartesian(b,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&w.push(h.clone(T)))),w.push(m);n&&(_=d[p-1],m=d[0],T=Ki.lineSegmentPlane(_,m,lO,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&(e.arcType===Yt.GEODESIC?w.push(h.clone(T)):e.arcType===Yt.RHUMB&&(S=i.cartesianToCartographic(T,aO).longitude,x=i.cartesianToCartographic(_,aO),C=i.cartesianToCartographic(m,iee),A.setEndPoints(x,C),b=A.findIntersectionWithLongitude(S,oee),T=i.cartographicToCartesian(b,sO),l(T)&&!h.equalsEpsilon(T,_,R.EPSILON7)&&!h.equalsEpsilon(T,m,R.EPSILON7)&&w.push(h.clone(T)))));let D=w.length,O=new Array(D);for(f=0;f<D;f++){let j=me.fromCartesian(w[f],i);j.height=0,O[f]=j}if(O=So(O,me.equalsEpsilon),D=O.length,D<2)return;let I=[],L=[],N=[],g=[],E=lOe,v=uOe,P=fOe,M=dOe,V=hOe,U=O[0],k=O[1],H=O[D-1];for(E=bc(i,H,a,E),M=bc(i,k,a,M),v=bc(i,U,a,v),P=bc(i,U,c,P),n?V=J5(E,v,P,M,V):V=nG(U,k,c,i,V),h.pack(V,L,0),h.pack(v,N,0),h.pack(P,g,0),I.push(U.latitude),I.push(U.longitude),$5(U,k,a,c,o,r,i,L,N,g,I),f=1;f<D-1;++f){E=h.clone(v,E),v=h.clone(M,v);let j=O[f];bc(i,j,c,P),bc(i,O[f+1],a,M),J5(E,v,P,M,V),u=L.length,h.pack(V,L,u),h.pack(v,N,u),h.pack(P,g,u),I.push(j.latitude),I.push(j.longitude),$5(O[f],O[f+1],a,c,o,r,i,L,N,g,I)}let F=O[D-1],Y=O[D-2];if(v=bc(i,F,a,v),P=bc(i,F,c,P),n){let j=O[0];E=bc(i,Y,a,E),M=bc(i,j,a,M),V=J5(E,v,P,M,V)}else V=nG(Y,F,c,i,V);if(u=L.length,h.pack(V,L,u),h.pack(v,N,u),h.pack(P,g,u),I.push(F.latitude),I.push(F.longitude),n){for($5(F,U,a,c,o,r,i,L,N,g,I),u=L.length,f=0;f<3;++f)L[u+f]=L[f],N[u+f]=N[f],g[u+f]=g[f];I.push(U.latitude),I.push(U.longitude)}return kOe(n,s,N,g,L,I,t)};var mOe=new h,pOe=new Q,_Oe=new Me;function ree(e,t,n,i){let o=ip(n,t,mOe),r=h.dot(o,e);if(r>yee||r<QQ){let s=ip(i,n,Aee),a=r<QQ?R.PI_OVER_TWO:-R.PI_OVER_TWO,c=Me.fromAxisAngle(s,a,_Oe),u=Q.fromQuaternion(c,pOe);return Q.multiplyByVector(u,e,e),!0}return!1}var see=new me,gOe=new h,aee=new h;function YS(e,t,n,i,o){let r=me.toCartesian(t,e._ellipsoid,gOe),s=h.add(r,n,aee),a=!1,c=e._ellipsoid,u=c.cartesianToCartographic(s,see);Math.abs(t.longitude-u.longitude)>R.PI_OVER_TWO&&(a=!0,s=h.subtract(r,n,aee),u=c.cartesianToCartographic(s,see)),u.height=0;let f=e.project(u,o);return o=h.subtract(f,i,o),o.z=0,o=h.normalize(o,o),a&&h.negate(o,o),o}var yOe=new h,cee=new h;function lee(e,t,n,i,o,r){let s=h.subtract(t,e,yOe);h.normalize(s,s);let a=n-xee,c=h.multiplyByScalar(s,a,cee);h.add(e,c,o);let u=i-Cee;c=h.multiplyByScalar(s,u,cee),h.add(t,c,r)}var xOe=new h;function cO(e,t){let n=rn.getPointDistance(lO,e),i=rn.getPointDistance(lO,t),o=xOe;R.equalsEpsilon(n,0,R.EPSILON2)?(o=ip(t,e,o),h.multiplyByScalar(o,R.EPSILON2,o),h.add(e,o,e)):R.equalsEpsilon(i,0,R.EPSILON2)&&(o=ip(e,t,o),h.multiplyByScalar(o,R.EPSILON2,o),h.add(t,o,t))}function COe(e,t){let n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(R.equalsEpsilon(n,R.PI,R.EPSILON11)){let o=R.sign(t.longitude);return e.longitude=o*(n-R.EPSILON11),1}else if(R.equalsEpsilon(i,R.PI,R.EPSILON11)){let o=R.sign(e.longitude);return t.longitude=o*(i-R.EPSILON11),2}return 0}var Tee=new me,bee=new me,uee=new h,Q5=new h,fee=new h,dee=new h,AOe=new h,hee=new h,TOe=[Tee,bee],bOe=new de,EOe=new h,SOe=new h,wOe=new h,vOe=new h,DOe=new h,POe=new h,eG=new h,tG=new h,IOe=new h,OOe=new h,ROe=new h,mee=new h,MOe=new h,BOe=new h,LOe=new kn,NOe=new kn,pee=new h,FOe=new h,_ee=new h,VOe=[new oe,new oe],Eee=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],gee=Eee.length;function kOe(e,t,n,i,o,r,s){let a,c,u=t._ellipsoid,f=n.length/3-1,d=f*8,p=d*4,_=f*36,m=d>65535?new Uint32Array(_):new Uint16Array(_),x=new Float64Array(d*3),C=new Float32Array(p),A=new Float32Array(p),T=new Float32Array(p),b=new Float32Array(p),S=new Float32Array(p),w,D,O,I;s&&(w=new Float32Array(p),D=new Float32Array(p),O=new Float32Array(p),I=new Float32Array(d*2));let L=r.length/2,N=0,g=Tee;g.height=0;let E=bee;E.height=0;let v=uee,P=Q5;if(s)for(c=0,a=1;a<L;a++)g.latitude=r[c],g.longitude=r[c+1],E.latitude=r[c+2],E.longitude=r[c+3],v=t.project(g,v),P=t.project(E,P),N+=h.distance(v,P),c+=2;let M=i.length/3;P=h.unpack(i,0,P);let V=0;for(c=3,a=1;a<M;a++)v=h.clone(P,v),P=h.unpack(i,c,P),V+=h.distance(v,P),c+=3;let U;c=3;let k=0,H=0,F=0,Y=0,j=!1,X=h.unpack(n,0,dee),W=h.unpack(i,0,Q5),$=h.unpack(o,0,hee);if(e){let be=h.unpack(n,n.length-6,fee);ree($,be,X,W)&&($=h.negate($,$))}let J=0,ce=0,he=0;for(a=0;a<f;a++){let be=h.clone(X,fee),Be=h.clone(W,uee),Ae=h.clone($,AOe);j&&(Ae=h.negate(Ae,Ae)),X=h.unpack(n,c,dee),W=h.unpack(i,c,Q5),$=h.unpack(o,c,hee),j=ree($,be,X,W),g.latitude=r[k],g.longitude=r[k+1],E.latitude=r[k+2],E.longitude=r[k+3];let Oe,Ge,ot,nt;if(s){let _i=COe(g,E);Oe=t.project(g,DOe),Ge=t.project(E,POe);let Pr=ip(Ge,Oe,pee);Pr.y=Math.abs(Pr.y),ot=eG,nt=tG,_i===0||h.dot(Pr,h.UNIT_Y)>yee?(ot=YS(t,g,Ae,Oe,eG),nt=YS(t,E,$,Ge,tG)):_i===1?(nt=YS(t,E,$,Ge,tG),ot.x=0,ot.y=R.sign(g.longitude-Math.abs(E.longitude)),ot.z=0):(ot=YS(t,g,Ae,Oe,eG),nt.x=0,nt.y=R.sign(g.longitude-E.longitude),nt.z=0)}let Tn=h.distance(Be,W),Zn=kn.fromCartesian(be,LOe),st=h.subtract(X,be,IOe),kt=h.normalize(st,mee),Qn=h.subtract(Be,be,OOe);Qn=h.normalize(Qn,Qn);let ve=h.cross(kt,Qn,mee);ve=h.normalize(ve,ve);let yt=h.cross(Qn,Ae,MOe);yt=h.normalize(yt,yt);let Kt=h.subtract(W,X,ROe);Kt=h.normalize(Kt,Kt);let ji=h.cross($,Kt,BOe);ji=h.normalize(ji,ji);let si=Tn/V,vo=J/V,ir=0,_r,Vi,Lo,Bs=0,ke=0;if(s){ir=h.distance(Oe,Ge),_r=kn.fromCartesian(Oe,NOe),Vi=h.subtract(Ge,Oe,pee),Lo=h.normalize(Vi,FOe);let _i=Lo.x;Lo.x=Lo.y,Lo.y=-_i,Bs=ir/N,ke=ce/N}for(U=0;U<8;U++){let _i=Y+U*4,Pr=H+U*2,Zr=_i+3,Xc=U<4?1:-1,jo=U===2||U===3||U===6||U===7?1:-1;h.pack(Zn.high,C,_i),C[Zr]=st.x,h.pack(Zn.low,A,_i),A[Zr]=st.y,h.pack(yt,T,_i),T[Zr]=st.z,h.pack(ji,b,_i),b[Zr]=si*Xc,h.pack(ve,S,_i);let gr=vo*jo;gr===0&&jo<0&&(gr=9),S[Zr]=gr,s&&(w[_i]=_r.high.x,w[_i+1]=_r.high.y,w[_i+2]=_r.low.x,w[_i+3]=_r.low.y,O[_i]=-ot.y,O[_i+1]=ot.x,O[_i+2]=nt.y,O[_i+3]=-nt.x,D[_i]=Vi.x,D[_i+1]=Vi.y,D[_i+2]=Lo.x,D[_i+3]=Lo.y,I[Pr]=Bs*Xc,gr=ke*jo,gr===0&&jo<0&&(gr=9),I[Pr+1]=gr)}let Ye=wOe,We=vOe,$e=EOe,xt=SOe,an=de.fromCartographicArray(TOe,bOe),Nn=ai.getMinimumMaximumHeights(an,u),mo=Nn.minimumTerrainHeight,Wo=Nn.maximumTerrainHeight;he+=mo,he+=Wo,lee(be,Be,mo,Wo,Ye,$e),lee(X,W,mo,Wo,We,xt);let io=h.multiplyByScalar(ve,R.EPSILON5,_ee);h.add(Ye,io,Ye),h.add(We,io,We),h.add($e,io,$e),h.add(xt,io,xt),cO(Ye,We),cO($e,xt),h.pack(Ye,x,F),h.pack(We,x,F+3),h.pack(xt,x,F+6),h.pack($e,x,F+9),io=h.multiplyByScalar(ve,-2*R.EPSILON5,_ee),h.add(Ye,io,Ye),h.add(We,io,We),h.add($e,io,$e),h.add(xt,io,xt),cO(Ye,We),cO($e,xt),h.pack(Ye,x,F+12),h.pack(We,x,F+15),h.pack(xt,x,F+18),h.pack($e,x,F+21),k+=2,c+=3,H+=16,F+=24,Y+=32,J+=Tn,ce+=ir}c=0;let ie=0;for(a=0;a<f;a++){for(U=0;U<gee;U++)m[c+U]=Eee[U]+ie;ie+=8,c+=gee}let ae=VOe;oe.fromVertices(n,h.ZERO,3,ae[0]),oe.fromVertices(i,h.ZERO,3,ae[1]);let ge=oe.fromBoundingSpheres(ae);ge.radius+=he/(f*2);let Se={position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,normalize:!1,values:x}),startHiAndForwardOffsetX:q_(C),startLoAndForwardOffsetY:q_(A),startNormalAndForwardOffsetZ:q_(T),endNormalAndTextureCoordinateNormalizationX:q_(b),rightNormalAndTextureCoordinateNormalizationY:q_(S)};return s&&(Se.startHiLo2D=q_(w),Se.offsetAndRight2D=q_(D),Se.startEndNormals2D=q_(O),Se.texcoordNormalization2D=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,normalize:!1,values:I})),new ct({attributes:Se,indices:m,boundingSphere:ge})}function q_(e){return new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}Y_._projectNormal=YS;var qA=Y_;function oG(e,t,n){this.heading=y(e,0),this.pitch=y(t,0),this.range=y(n,0)}oG.clone=function(e,t){if(!!l(e))return l(t)||(t=new oG),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var ju=oG;var UOe=R.factorial;function rG(e,t,n,i,o,r){let s=0,a,c,u;if(i>0){for(c=0;c<o;c++){for(a=!1,u=0;u<r.length&&!a;u++)c===r[u]&&(a=!0);a||(r.push(c),s+=rG(e,t,n,i-1,o,r),r.splice(r.length-1,1))}return s}for(s=1,c=0;c<o;c++){for(a=!1,u=0;u<r.length&&!a;u++)c===r[u]&&(a=!0);a||(s*=e-n[t[c]])}return s}var uO={type:"Hermite"};uO.getRequiredDataPoints=function(e,t){return t=y(t,0),Math.max(Math.floor((e+1)/(t+1)),2)};uO.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c,u,f,d=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let C=new Array(d);for(p[r]=C,s=0;s<d;s++)C[s]=[]}let _=d,m=new Array(_);for(r=0;r<_;r++)m[r]=r;let x=d-1;for(c=0;c<i;c++){for(s=0;s<_;s++)f=m[s]*i+c,p[c][0].push(n[f]);for(r=1;r<_;r++){let C=!1;for(s=0;s<_-r;s++){let A=t[m[s]],T=t[m[s+r]],b;T-A<=0?(f=m[s]*i+i*r+c,b=n[f],p[c][r].push(b/UOe(r))):(b=p[c][r-1][s+1]-p[c][r-1][s],p[c][r].push(b/(T-A))),C=C||b!==0}C||(x=r-1)}}for(a=0,u=0;a<=u;a++)for(r=a;r<=x;r++){let C=rG(e,m,t,a,r,[]);for(c=0;c<i;c++){let A=p[c][r][0];o[c+a*i]+=A*C}}return o};var zOe=[];uO.interpolate=function(e,t,n,i,o,r,s){let a=i*(r+1);l(s)||(s=new Array(a));for(let A=0;A<a;A++)s[A]=0;let c=t.length,u=new Array(c*(o+1)),f;for(f=0;f<c;f++)for(let A=0;A<o+1;A++)u[f*(o+1)+A]=f;let d=u.length,p=zOe,_=HOe(p,u,t,n,i,o),m=[],x=d*(d+1)/2,C=Math.min(_,r);for(let A=0;A<=C;A++)for(f=A;f<=_;f++){m.length=0;let T=rG(e,u,t,A,f,m),b=Math.floor(f*(1-f)/2)+d*f;for(let S=0;S<i;S++){let w=Math.floor(S*x),D=p[w+b];s[S+A*i]+=D*T}}return s};function HOe(e,t,n,i,o,r){let s,a,c=-1,u=t.length,f=u*(u+1)/2;for(let d=0;d<o;d++){let p=Math.floor(d*f);for(s=0;s<u;s++)a=t[s]*o*(r+1)+d,e[p+s]=i[a];for(let _=1;_<u;_++){let m=0,x=Math.floor(_*(1-_)/2)+u*_,C=!1;for(s=0;s<u-_;s++){let A=n[t[s]],T=n[t[s+_]],b,S;if(T-A<=0)a=t[s]*o*(r+1)+o*_+d,b=i[a],S=b/R.factorial(_),e[p+x+m]=S,m++;else{let w=Math.floor((_-1)*(2-_)/2)+u*(_-1);b=e[p+w+s+1]-e[p+w+s],S=b/(T-A),e[p+x+m]=S,m++}C=C||b!==0}C&&(c=Math.max(c,_))}}return c}var fO=uO;var sG={};sG.encode2D=function(e,t,n){let i=Math.pow(2,e),o={x:t,y:n},r,s,a,c=BigInt(0);for(a=i/2;a>0;a/=2)r=(o.x&a)>0?1:0,s=(o.y&a)>0?1:0,c+=BigInt((3*r^s)*a*a),See(i,o,r,s);return c};sG.decode2D=function(e,t){let n=Math.pow(2,e),i={x:0,y:0},o,r,s,a;for(s=1,a=t;s<n;s*=2)o=1&Number(a/BigInt(2)),r=1&Number(a^BigInt(o)),See(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};function See(e,t,n,i){if(i!==0)return;n===1&&(t.x=e-1-t.x,t.y=e-1-t.y);let o=t.x;t.x=t.y,t.y=o}var XS=sG;function GOe(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var dO=GOe;var kee={},WOe=32.184,jOe=2451545,wee=-.0529921,vee=-.1059842,Dee=13.0120009,Pee=13.3407154,Iee=.9856003,Oee=26.4057084,Ree=13.064993,Mee=.3287146,Bee=1.7484877,Lee=-.1589763,Nee=.0036096,Fee=.1643573,Vee=12.9590088,aG=new ee;kee.ComputeMoon=function(e,t){l(e)||(e=ee.now()),aG=ee.addSeconds(e,WOe,aG);let n=ee.totalDays(aG)-jOe,i=n/jn.DAYS_PER_JULIAN_CENTURY,o=(125.045+wee*n)*R.RADIANS_PER_DEGREE,r=(250.089+vee*n)*R.RADIANS_PER_DEGREE,s=(260.008+Dee*n)*R.RADIANS_PER_DEGREE,a=(176.625+Pee*n)*R.RADIANS_PER_DEGREE,c=(357.529+Iee*n)*R.RADIANS_PER_DEGREE,u=(311.589+Oee*n)*R.RADIANS_PER_DEGREE,f=(134.963+Ree*n)*R.RADIANS_PER_DEGREE,d=(276.617+Mee*n)*R.RADIANS_PER_DEGREE,p=(34.226+Bee*n)*R.RADIANS_PER_DEGREE,_=(15.134+Lee*n)*R.RADIANS_PER_DEGREE,m=(119.743+Nee*n)*R.RADIANS_PER_DEGREE,x=(239.961+Fee*n)*R.RADIANS_PER_DEGREE,C=(25.053+Vee*n)*R.RADIANS_PER_DEGREE,A=Math.sin(o),T=Math.sin(r),b=Math.sin(s),S=Math.sin(a),w=Math.sin(c),D=Math.sin(u),O=Math.sin(f),I=Math.sin(d),L=Math.sin(p),N=Math.sin(_),g=Math.sin(m),E=Math.sin(x),v=Math.sin(C),P=Math.cos(o),M=Math.cos(r),V=Math.cos(s),U=Math.cos(a),k=Math.cos(c),H=Math.cos(u),F=Math.cos(f),Y=Math.cos(d),j=Math.cos(p),X=Math.cos(_),W=Math.cos(m),$=Math.cos(x),J=Math.cos(C),ce=(269.9949+.0031*i-3.8787*A-.1204*T+.07*b-.0172*S+.0072*D-.0052*N+.0043*v)*R.RADIANS_PER_DEGREE,he=(66.5392+.013*i+1.5419*P+.0239*M-.0278*V+.0068*U-.0029*H+9e-4*F+8e-4*X-9e-4*J)*R.RADIANS_PER_DEGREE,ie=(38.3213+13.17635815*n-14e-13*n*n+3.561*A+.1208*T-.0642*b+.0158*S+.0252*w-.0066*D-.0047*O-.0046*I+.0028*L+.0052*N+.004*g+.0019*E-.0044*v)*R.RADIANS_PER_DEGREE,ae=(13.17635815-14e-13*(2*n)+3.561*P*wee+.1208*M*vee-.0642*V*Dee+.0158*U*Pee+.0252*k*Iee-.0066*H*Oee-.0047*F*Ree-.0046*Y*Mee+.0028*j*Bee+.0052*X*Lee+.004*W*Nee+.0019*$*Fee-.0044*J*Vee)/86400*R.RADIANS_PER_DEGREE;return l(t)||(t=new dO),t.rightAscension=ce,t.declination=he,t.rotation=ie,t.rotationRate=ae,t};var hO=kee;function Uee(e){(!l(e)||typeof e!="function")&&(e=hO.ComputeMoon),this._computeFunction=e}var qOe=new h,YOe=new h,XOe=new h;function KOe(e,t,n){let i=qOe;i.x=Math.cos(e+R.PI_OVER_TWO),i.y=Math.sin(e+R.PI_OVER_TWO),i.z=0;let o=Math.cos(t),r=XOe;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=h.cross(r,i,YOe);return l(n)||(n=new Q),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var $Oe=new Q,ZOe=new Me;Uee.prototype.evaluate=function(e,t){l(e)||(e=ee.now());let n=this._computeFunction(e),i=KOe(n.rightAscension,n.declination,t),o=R.zeroToTwoPi(n.rotation),r=Me.fromAxisAngle(h.UNIT_Z,o,ZOe),s=Q.fromQuaternion(Me.conjugate(r,r),$Oe);return Q.multiply(s,i,i)};var mO=Uee;var KS={};KS.type=void 0;KS.getRequiredDataPoints=ye.throwInstantiationError;KS.interpolateOrderZero=ye.throwInstantiationError;KS.interpolate=ye.throwInstantiationError;var zee=KS;var JOe={STEP:0,LINEAR:1,CUBICSPLINE:2},Mh=Object.freeze(JOe);function cG(e){this._url=De.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(cG.prototype,{url:{get:function(){return this._url}}});cG.prototype.geocode=function(e,t){return this._url.getDerivedResource({url:t===Dy.AUTOCOMPLETE?"autocomplete":"search",queryParameters:{text:e}}).fetchJson().then(function(i){return i.features.map(function(o){let r,s=o.bbox;if(l(s))r=de.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=h.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r}})})};var pO=cG;function Hee(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.accessToken,wh.defaultAccessToken),n=De.createIfNeeded(y(e.server,wh.defaultServer));n.appendForwardSlash();let i=wh.getDefaultTokenCredit(t);l(i)&&e.scene.frameState.creditDisplay.addDefaultCredit(Ht.clone(i));let o=n.getDerivedResource({url:"v1/geocode"});l(t)&&o.appendQueryParameters({access_token:t}),this._accessToken=t,this._server=n,this._pelias=new pO(o)}Hee.prototype.geocode=function(e,t){return this._pelias.geocode(e,t)};var _O=Hee;function Yo(e){e=y(e,y.EMPTY_OBJECT),this.start=l(e.start)?ee.clone(e.start):new ee,this.stop=l(e.stop)?ee.clone(e.stop):new ee,this.data=e.data,this.isStartIncluded=y(e.isStartIncluded,!0),this.isStopIncluded=y(e.isStopIncluded,!0)}Object.defineProperties(Yo.prototype,{isEmpty:{get:function(){let e=ee.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var YA={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};Yo.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new ye("options.iso8601 is an invalid ISO 8601 interval.");let i=ee.fromIso8601(n[0]),o=ee.fromIso8601(n[1]),r=y(e.isStartIncluded,!0),s=y(e.isStopIncluded,!0),a=e.data;return l(t)?(t.start=i,t.stop=o,t.isStartIncluded=r,t.isStopIncluded=s,t.data=a,t):(YA.start=i,YA.stop=o,YA.isStartIncluded=r,YA.isStopIncluded=s,YA.data=a,new Yo(YA))};Yo.toIso8601=function(e,t){return`${ee.toIso8601(e.start,t)}/${ee.toIso8601(e.stop,t)}`};Yo.clone=function(e,t){if(!!l(e))return l(t)?(t.start=e.start,t.stop=e.stop,t.isStartIncluded=e.isStartIncluded,t.isStopIncluded=e.isStopIncluded,t.data=e.data,t):new Yo(e)};Yo.equals=function(e,t,n){return e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&ee.equals(e.start,t.start)&&ee.equals(e.stop,t.stop)&&(e.data===t.data||l(n)&&n(e.data,t.data)))};Yo.equalsEpsilon=function(e,t,n,i){return n=y(n,0),e===t||l(e)&&l(t)&&(e.isEmpty&&t.isEmpty||e.isStartIncluded===t.isStartIncluded&&e.isStopIncluded===t.isStopIncluded&&ee.equalsEpsilon(e.start,t.start,n)&&ee.equalsEpsilon(e.stop,t.stop,n)&&(e.data===t.data||l(i)&&i(e.data,t.data)))};Yo.intersect=function(e,t,n,i){if(!l(t))return Yo.clone(Yo.EMPTY,n);let o=e.start,r=e.stop,s=t.start,a=t.stop,c=ee.greaterThanOrEquals(s,o)&&ee.greaterThanOrEquals(r,s),u=!c&&ee.lessThanOrEquals(s,o)&&ee.lessThanOrEquals(o,a);if(!c&&!u)return Yo.clone(Yo.EMPTY,n);let f=e.isStartIncluded,d=e.isStopIncluded,p=t.isStartIncluded,_=t.isStopIncluded,m=ee.lessThan(r,a);return l(n)||(n=new Yo),n.start=c?s:o,n.isStartIncluded=f&&p||!ee.equals(s,o)&&(c&&p||u&&f),n.stop=m?r:a,n.isStopIncluded=m?d:d&&_||!ee.equals(a,r)&&_,n.data=l(i)?i(e.data,t.data):e.data,n};Yo.contains=function(e,t){if(e.isEmpty)return!1;let n=ee.compare(e.start,t);if(n===0)return e.isStartIncluded;let i=ee.compare(t,e.stop);return i===0?e.isStopIncluded:n<0&&i<0};Yo.prototype.clone=function(e){return Yo.clone(this,e)};Yo.prototype.equals=function(e,t){return Yo.equals(this,e,t)};Yo.prototype.equalsEpsilon=function(e,t,n){return Yo.equalsEpsilon(this,e,t,n)};Yo.prototype.toString=function(){return Yo.toIso8601(this)};Yo.EMPTY=Object.freeze(new Yo({start:new ee,stop:new ee,isStartIncluded:!1,isStopIncluded:!1}));var yn=Yo;var Gee=Object.freeze(ee.fromIso8601("0000-01-01T00:00:00Z")),Wee=Object.freeze(ee.fromIso8601("9999-12-31T24:00:00Z")),QOe=Object.freeze(new yn({start:Gee,stop:Wee})),eRe={MINIMUM_VALUE:Gee,MAXIMUM_VALUE:Wee,MAXIMUM_INTERVAL:QOe},ze=eRe;var tRe={SHIFT:0,CTRL:1,ALT:2},ha=Object.freeze(tRe);function op(){}op._transcodeTaskProcessor=new Di("transcodeKTX2",Number.POSITIVE_INFINITY);op._readyPromise=void 0;function nRe(){let e=op._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(){return op._transcodeTaskProcessor});op._readyPromise=e}op.transcode=function(e,t){return l(op._readyPromise)||nRe(),op._readyPromise.then(function(n){let i;if(e instanceof ArrayBuffer){let o=new Uint8Array(e);return i={supportedTargetFormats:t,ktx2Buffer:o},n.scheduleTask(i,[e])}return i={supportedTargetFormats:t,ktx2Buffer:e},n.scheduleTask(i,[e.buffer])}).then(function(n){let i=n.length,o=Object.keys(n[0]),r=o.length,s;for(s=0;s<i;s++){let a=n[s];for(let c=0;c<r;c++){let u=a[o[c]];a[o[c]]=new DI(u.internalFormat,u.datatype,u.width,u.height,u.levelBuffer)}}if(r===1){for(s=0;s<i;++s)n[s]=n[s][o[0]];i===1&&(n=n[0])}return n}).catch(function(n){throw n})};var gO=op;var lG={type:"Lagrange"};lG.getRequiredDataPoints=function(e){return Math.max(e+1,2)};lG.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<a;r++){let c=1;for(s=0;s<a;s++)if(s!==r){let u=t[r]-t[s];c*=(e-t[s])/u}for(s=0;s<i;s++)o[s]+=c*n[r*i+s]}return o};var yO=lG;var uG={type:"Linear"};uG.getRequiredDataPoints=function(e){return 2};uG.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c=t[0],u=t[1];for(r=0;r<i;r++)s=n[r],a=n[r+i],o[r]=((a-s)*e+u*s-c*a)/(u-c);return o};var XA=uG;function iRe(e){let t=e.uint8Array,n=e.format,i=e.request,o=y(e.flipY,!1),r=y(e.skipColorSpaceConversion,!1),s=new Blob([t],{type:n}),a;return De.supportsImageBitmapOptions().then(function(c){return c?Promise.resolve(De.createImageBitmapFromBlob(s,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:r})):(a=window.URL.createObjectURL(s),new De({url:a,request:i}).fetchImage({flipY:o,skipColorSpaceConversion:r}))}).then(function(c){return l(a)&&window.URL.revokeObjectURL(a),c}).catch(function(c){return l(a)&&window.URL.revokeObjectURL(a),Promise.reject(c)})}var X_=iRe;var jee;qee.setKTX2SupportedFormats=function(e,t,n,i,o,r){jee={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function qee(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=De.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return gO.transcode(n,jee)})}var Ha=qee;function Bh(e){e=y(e,0),this._array=new Array(e),this._length=e}Object.defineProperties(Bh.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});Bh.prototype.get=function(e){return this._array[e]};Bh.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};Bh.prototype.peek=function(){return this._array[this._length-1]};Bh.prototype.push=function(e){let t=this.length++;this._array[t]=e};Bh.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};Bh.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};Bh.prototype.resize=function(e){this.length=e};Bh.prototype.trim=function(e){e=y(e,this._length),this._array.length=e};var qu=Bh;function xO(){ye.throwInstantiationError()}Object.defineProperties(xO.prototype,{ellipsoid:{get:ye.throwInstantiationError}});xO.prototype.project=ye.throwInstantiationError;xO.prototype.unproject=ye.throwInstantiationError;var Yee=xO;var fG=[],dG=[];function oRe(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=fG,u=dG,f,d;for(f=0;f<s;++f)c[f]=e[i+f];for(d=0;d<a;++d)u[d]=e[o+d+1];f=0,d=0;for(let p=i;p<=r;++p){let _=c[f],m=u[d];f<s&&(d>=a||t(_,m,n)<=0)?(e[p]=_,++f):d<a&&(e[p]=m,++d)}}function hG(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);hG(e,t,n,i,r),hG(e,t,n,r+1,o),oRe(e,t,n,i,r,o)}function rRe(e,t,n){let i=e.length,o=Math.ceil(i*.5);fG.length=o,dG.length=o,hG(e,t,n,0,i-1),fG.length=0,dG.length=0}var Iy=rRe;function KA(e){e=y(e,y.EMPTY_OBJECT);let t=e.weights,n=e.times;this._times=n,this._weights=t,this._count=t.length/n.length,this._lastTimeIndex=0}Object.defineProperties(KA.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});KA.prototype.findTimeInterval=zi.prototype.findTimeInterval;KA.prototype.wrapTime=zi.prototype.wrapTime;KA.prototype.clampTime=zi.prototype.clampTime;KA.prototype.evaluate=function(e,t){let n=this.weights,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);l(t)||(t=new Array(this._count));for(let s=0;s<this._count;s++){let a=o*this._count+s;t[s]=n[a]*(1-r)+n[a+this._count]*r}return t};var CO=KA;var $S={};function Xee(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function mG(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function Kee(e){return e&=1431655765,e=(e^e>>1)&858993459,e=(e^e>>2)&252645135,e=(e^e>>4)&16711935,e=(e^e>>8)&65535,e}function pG(e){return e&=153391689,e=(e^e>>2)&51130563,e=(e^e>>4)&50393103,e=(e^e>>8)&4278190335,e=(e^e>>16)&1023,e}$S.encode2D=function(e,t){return(Xee(e)|Xee(t)<<1)>>>0};$S.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=Kee(e),t[1]=Kee(e>>1),t};$S.encode3D=function(e,t,n){return mG(e)|mG(t)<<1|mG(n)<<2};$S.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=pG(e),t[1]=pG(e>>1),t[2]=pG(e>>2),t};var Oy=$S;function Yu(e,t,n,i){this.near=y(e,0),this.nearValue=y(t,0),this.far=y(n,1),this.farValue=y(i,0)}Yu.clone=function(e,t){if(!!l(e))return l(t)?(t.near=e.near,t.nearValue=e.nearValue,t.far=e.far,t.farValue=e.farValue,t):new Yu(e.near,e.nearValue,e.far,e.farValue)};Yu.packedLength=4;Yu.pack=function(e,t,n){return n=y(n,0),t[n++]=e.near,t[n++]=e.nearValue,t[n++]=e.far,t[n]=e.farValue,t};Yu.unpack=function(e,t,n){return t=y(t,0),l(n)||(n=new Yu),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};Yu.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.nearValue===t.nearValue&&e.far===t.far&&e.farValue===t.farValue};Yu.prototype.clone=function(e){return Yu.clone(this,e)};Yu.prototype.equals=function(e){return Yu.equals(this,e)};var wt=Yu;var sRe={NONE:-1,PARTIAL:0,FULL:1},xr=Object.freeze(sRe);function Ga(e,t){this._occluderPosition=h.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var AO=new h;Object.defineProperties(Ga.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=h.clone(e,this._cameraPosition);let t=h.subtract(this._occluderPosition,e,AO),n=h.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=h.multiplyByScalar(t,n,AO);let a=o*o*n;s=h.add(e,h.multiplyByScalar(r,a,AO),AO)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});Ga.fromBoundingSphere=function(e,t,n){return l(n)?(h.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new Ga(e,t)};var Zee=new h;Ga.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=h.subtract(e,this._occluderPosition,Zee),n=this._occluderRadius;if(n=h.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=h.subtract(e,this._cameraPosition,t),n*n>h.magnitudeSquared(t)}return!1};var aRe=new h;Ga.prototype.isBoundingSphereVisible=function(e){let t=h.clone(e.center,aRe),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,Zee),o=this._occluderRadius-n;if(o=h.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i),o*o+n*n>h.magnitudeSquared(i)):!1;if(o>0){i=h.subtract(t,this._cameraPosition,i);let r=h.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var cRe=new h;Ga.prototype.computeVisibility=function(e){let t=h.clone(e.center),n=e.radius;if(n>this._occluderRadius)return xr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=h.subtract(t,this._occluderPosition,cRe),o=this._occluderRadius-n,r=h.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=h.subtract(t,this._cameraPosition,i);let s=h.magnitudeSquared(i);return o*o+n*n<s?xr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?xr.FULL:xr.PARTIAL):(i=h.subtract(t,this._horizonPlanePosition,i),h.dot(i,this._horizonPlaneNormal)>-n?xr.PARTIAL:xr.FULL))}}return xr.NONE};var TO=new h;Ga.computeOccludeePoint=function(e,t,n){let i=h.clone(t),o=h.clone(e.center),r=e.radius,s=n.length,a=h.normalize(h.subtract(i,o,TO),TO),c=-h.dot(a,o),u=Ga._anyRotationVector(o,a,c),f=Ga._horizonToPlaneNormalDotProduct(e,a,c,u,n[0]);if(!f)return;let d;for(let _=1;_<s;++_){if(d=Ga._horizonToPlaneNormalDotProduct(e,a,c,u,n[_]),!d)return;d<f&&(f=d)}if(f<.0017453283658983088)return;let p=r/f;return h.add(o,h.multiplyByScalar(a,p,TO),TO)};var lRe=[];Ga.computeOccludeePointFromRectangle=function(e,t){t=y(t,re.WGS84);let n=de.subsample(e,t,0,lRe),i=oe.fromPoints(n),o=h.ZERO;if(!h.equals(o,i.center))return Ga.computeOccludeePoint(new oe(o,t.minimumRadius),i.center,n)};var uRe=new h;Ga._anyRotationVector=function(e,t,n){let i=h.abs(t,uRe),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new h,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=h.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=h.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=h.UNIT_Z);let a=(h.dot(t,i)+n)/-h.dot(t,s);return h.normalize(h.subtract(h.add(i,h.multiplyByScalar(s,a,r),i),e,i),i)};var fRe=new h;Ga._rotationVector=function(e,t,n,i,o){let r=h.subtract(i,e,fRe);if(r=h.normalize(r,r),h.dot(t,r)<.9999999847691291){let s=h.cross(t,r,r);if(h.magnitude(s)>R.EPSILON13)return h.normalize(s,new h)}return o};var _G=new h,dRe=new h,bO=new h,$ee=new h;Ga._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=h.clone(o,_G),s=h.clone(e.center,dRe),a=e.radius,c=h.subtract(s,r,bO),u=h.magnitudeSquared(c),f=a*a;if(u<f)return!1;let d=u-f,p=Math.sqrt(d),_=Math.sqrt(u),m=1/_,C=p*m*p;c=h.normalize(c,c);let A=h.add(r,h.multiplyByScalar(c,C,$ee),$ee),T=Math.sqrt(d-C*C),b=this._rotationVector(s,t,n,r,i),S=h.fromElements(b.x*b.x*c.x+(b.x*b.y-b.z)*c.y+(b.x*b.z+b.y)*c.z,(b.x*b.y+b.z)*c.x+b.y*b.y*c.y+(b.y*b.z-b.x)*c.z,(b.x*b.z-b.y)*c.x+(b.y*b.z+b.x)*c.y+b.z*b.z*c.z,_G);S=h.normalize(S,S);let w=h.multiplyByScalar(S,T,_G);b=h.normalize(h.subtract(h.add(A,w,bO),s,bO),bO);let D=h.dot(t,b);b=h.normalize(h.subtract(h.subtract(A,w,b),s,b),b);let O=h.dot(t,b);return D<O?D:O};var EO=Ga;function ZS(e,t,n){e=y(e,0),t=y(t,0),n=y(n,0),this.value=new Float32Array([e,t,n])}Object.defineProperties(ZS.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});ZS.fromCartesian3=function(e){return new ZS(e.x,e.y,e.z)};ZS.toValue=function(e,t){return l(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};var Zi=ZS;function gG(e,t,n){e=De.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=y(n,{})}Object.defineProperties(gG.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}}});gG.prototype.geocode=function(e){return this._url.getDerivedResource({url:"json",queryParameters:at(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=de.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let s=i.geometry.lat,a=i.geometry.lng;o=h.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var Jee=gG;var hRe={packedLength:void 0,pack:ye.throwInstantiationError,unpack:ye.throwInstantiationError},Qee=hRe;var mRe={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:ye.throwInstantiationError,unpackInterpolationResult:ye.throwInstantiationError},ete=mRe;function pRe(e,t,n,i,o){let r=e.measureText(t);if(!!/\S/.test(t)){let a=document.defaultView.getComputedStyle(e.canvas).getPropertyValue("font-size").replace("px",""),c=document.createElement("canvas"),u=100,f=r.width+u|0,d=3*a,p=d/2;c.width=f,c.height=d;let _=c.getContext("2d");_.font=n,_.fillStyle="white",_.fillRect(0,0,c.width+1,c.height+1),i&&(_.strokeStyle="black",_.lineWidth=e.lineWidth,_.strokeText(t,u/2,p)),o&&(_.fillStyle="black",_.fillText(t,u/2,p));let m=_.getImageData(0,0,f,d).data,x=m.length,C=f*4,A,T,b,S;for(A=0;A<x;++A)if(m[A]!==255){b=A/C|0;break}for(A=x-1;A>=0;--A)if(m[A]!==255){S=A/C|0;break}let w=-1;for(A=0;A<f&&w===-1;++A)for(T=0;T<d;++T){let D=A*4+T*C;if(m[D]!==255||m[D+1]!==255||m[D+2]!==255||m[D+3]!==255){w=A;break}}return{width:r.width,height:S-b,ascent:p-b,descent:S-p,minx:w-u/2}}return{width:r.width,height:0,ascent:0,descent:0,minx:0}}var Ry;function _Re(e,t){if(e==="")return;t=y(t,y.EMPTY_OBJECT);let n=y(t.font,"10px sans-serif"),i=y(t.stroke,!1),o=y(t.fill,!0),r=y(t.strokeWidth,1),s=y(t.backgroundColor,z.TRANSPARENT),a=y(t.padding,0),c=a*2,u=document.createElement("canvas");u.width=1,u.height=1,u.style.font=n;let f=u.getContext("2d");l(Ry)||(l(f.imageSmoothingEnabled)?Ry="imageSmoothingEnabled":l(f.mozImageSmoothingEnabled)?Ry="mozImageSmoothingEnabled":l(f.webkitImageSmoothingEnabled)?Ry="webkitImageSmoothingEnabled":l(f.msImageSmoothingEnabled)&&(Ry="msImageSmoothingEnabled")),f.font=n,f.lineJoin="round",f.lineWidth=r,f[Ry]=!1,u.style.visibility="hidden",document.body.appendChild(u);let d=pRe(f,e,n,i,o);u.dimensions=d,document.body.removeChild(u),u.style.visibility="";let p=-d.minx,_=Math.ceil(d.width)+p+c,m=d.height+c,x=m-d.ascent+a,C=m-x+c;if(u.width=_,u.height=m,f.font=n,f.lineJoin="round",f.lineWidth=r,f[Ry]=!1,s!==z.TRANSPARENT&&(f.fillStyle=s.toCssColorString(),f.fillRect(0,0,u.width,u.height)),i){let A=y(t.strokeColor,z.BLACK);f.strokeStyle=A.toCssColorString(),f.strokeText(e,p+a,C)}if(o){let A=y(t.fillColor,z.WHITE);f.fillStyle=A.toCssColorString(),f.fillText(e,p+a,C)}return u}var $A=_Re;function QS(){this._cache={}}QS.prototype.fromColor=function(e,t){return SO(void 0,void 0,e,t,this._cache)};QS.prototype.fromUrl=function(e,t,n){return SO(e,void 0,t,n,this._cache)};QS.prototype.fromMakiIconId=function(e,t,n){return SO(Jt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};QS.prototype.fromText=function(e,t,n){return SO(void 0,e,t,n,this._cache)};var gRe=new z;function yRe(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,gRe).toCssColorString(),e.lineWidth=.846,e.beginPath(),e.moveTo(6.72,.422),e.lineTo(17.28,.422),e.bezierCurveTo(18.553,.422,19.577,1.758,19.577,3.415),e.lineTo(19.577,10.973),e.bezierCurveTo(19.577,12.63,18.553,13.966,17.282,13.966),e.lineTo(14.386,14.008),e.lineTo(11.826,23.578),e.lineTo(9.614,14.008),e.lineTo(6.719,13.965),e.bezierCurveTo(5.446,13.983,4.422,12.629,4.422,10.972),e.lineTo(4.422,3.416),e.bezierCurveTo(4.423,1.76,5.447,.423,6.718,.423),e.closePath(),e.fill(),e.stroke(),e.restore()}function tte(e,t,n){let i=n/2.5,o=i,r=i;t.width>t.height?r=i*(t.height/t.width):t.width<t.height&&(o=i*(t.width/t.height));let s=Math.round((n-o)/2),a=Math.round(7/24*n-r/2);e.globalCompositeOperation="destination-out",e.drawImage(t,s-1,a,o,r),e.drawImage(t,s,a-1,o,r),e.drawImage(t,s+1,a,o,r),e.drawImage(t,s,a+1,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=z.BLACK.toCssColorString(),e.fillRect(s-1,a-1,o+2,r+2),e.globalCompositeOperation="destination-out",e.drawImage(t,s,a,o,r),e.globalCompositeOperation="destination-over",e.fillStyle=z.WHITE.toCssColorString(),e.fillRect(s-1,a-2,o+2,r+2)}var JS=new Array(4);function SO(e,t,n,i,o){JS[0]=e,JS[1]=t,JS[2]=n,JS[3]=i;let r=JSON.stringify(JS),s=o[r];if(l(s))return s;let a=document.createElement("canvas");a.width=i,a.height=i;let c=a.getContext("2d");if(yRe(c,n,i),l(e)){let f=De.createIfNeeded(e).fetchImage().then(function(d){return tte(c,d,i),o[r]=a,a});return o[r]=f,f}else if(l(t)){let u=$A(t,{font:`bold ${i}px sans-serif`});tte(c,u,i)}return o[r]=a,a}var K_=QS;var Ci={UNSIGNED_BYTE:Z.UNSIGNED_BYTE,UNSIGNED_SHORT:Z.UNSIGNED_SHORT,UNSIGNED_INT:Z.UNSIGNED_INT,FLOAT:Z.FLOAT,HALF_FLOAT:Z.HALF_FLOAT_OES,UNSIGNED_INT_24_8:Z.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:Z.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:Z.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:Z.UNSIGNED_SHORT_5_6_5};Ci.toWebGLConstant=function(e,t){switch(e){case Ci.UNSIGNED_BYTE:return Z.UNSIGNED_BYTE;case Ci.UNSIGNED_SHORT:return Z.UNSIGNED_SHORT;case Ci.UNSIGNED_INT:return Z.UNSIGNED_INT;case Ci.FLOAT:return Z.FLOAT;case Ci.HALF_FLOAT:return t.webgl2?Z.HALF_FLOAT:Z.HALF_FLOAT_OES;case Ci.UNSIGNED_INT_24_8:return Z.UNSIGNED_INT_24_8;case Ci.UNSIGNED_SHORT_4_4_4_4:return Z.UNSIGNED_SHORT_4_4_4_4;case Ci.UNSIGNED_SHORT_5_5_5_1:return Z.UNSIGNED_SHORT_5_5_5_1;case Ci.UNSIGNED_SHORT_5_6_5:return Ci.UNSIGNED_SHORT_5_6_5}};Ci.isPacked=function(e){return e===Ci.UNSIGNED_INT_24_8||e===Ci.UNSIGNED_SHORT_4_4_4_4||e===Ci.UNSIGNED_SHORT_5_5_5_1||e===Ci.UNSIGNED_SHORT_5_6_5};Ci.sizeInBytes=function(e){switch(e){case Ci.UNSIGNED_BYTE:return 1;case Ci.UNSIGNED_SHORT:case Ci.UNSIGNED_SHORT_4_4_4_4:case Ci.UNSIGNED_SHORT_5_5_5_1:case Ci.UNSIGNED_SHORT_5_6_5:case Ci.HALF_FLOAT:return 2;case Ci.UNSIGNED_INT:case Ci.FLOAT:case Ci.UNSIGNED_INT_24_8:return 4}};Ci.validate=function(e){return e===Ci.UNSIGNED_BYTE||e===Ci.UNSIGNED_SHORT||e===Ci.UNSIGNED_INT||e===Ci.FLOAT||e===Ci.HALF_FLOAT||e===Ci.UNSIGNED_INT_24_8||e===Ci.UNSIGNED_SHORT_4_4_4_4||e===Ci.UNSIGNED_SHORT_5_5_5_1||e===Ci.UNSIGNED_SHORT_5_6_5};var Xe=Object.freeze(Ci);var rt={DEPTH_COMPONENT:Z.DEPTH_COMPONENT,DEPTH_STENCIL:Z.DEPTH_STENCIL,ALPHA:Z.ALPHA,RGB:Z.RGB,RGBA:Z.RGBA,LUMINANCE:Z.LUMINANCE,LUMINANCE_ALPHA:Z.LUMINANCE_ALPHA,RGB_DXT1:Z.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:Z.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:Z.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:Z.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:Z.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:Z.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:Z.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:Z.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:Z.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:Z.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:Z.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:Z.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:Z.COMPRESSED_RGBA_BPTC_UNORM};rt.componentsLength=function(e){switch(e){case rt.RGB:return 3;case rt.RGBA:return 4;case rt.LUMINANCE_ALPHA:return 2;case rt.ALPHA:case rt.LUMINANCE:return 1;default:return 1}};rt.validate=function(e){return e===rt.DEPTH_COMPONENT||e===rt.DEPTH_STENCIL||e===rt.ALPHA||e===rt.RGB||e===rt.RGBA||e===rt.LUMINANCE||e===rt.LUMINANCE_ALPHA||e===rt.RGB_DXT1||e===rt.RGBA_DXT1||e===rt.RGBA_DXT3||e===rt.RGBA_DXT5||e===rt.RGB_PVRTC_4BPPV1||e===rt.RGB_PVRTC_2BPPV1||e===rt.RGBA_PVRTC_4BPPV1||e===rt.RGBA_PVRTC_2BPPV1||e===rt.RGBA_ASTC||e===rt.RGB_ETC1||e===rt.RGB8_ETC2||e===rt.RGBA8_ETC2_EAC||e===rt.RGBA_BC7};rt.isColorFormat=function(e){return e===rt.ALPHA||e===rt.RGB||e===rt.RGBA||e===rt.LUMINANCE||e===rt.LUMINANCE_ALPHA};rt.isDepthFormat=function(e){return e===rt.DEPTH_COMPONENT||e===rt.DEPTH_STENCIL};rt.isCompressedFormat=function(e){return e===rt.RGB_DXT1||e===rt.RGBA_DXT1||e===rt.RGBA_DXT3||e===rt.RGBA_DXT5||e===rt.RGB_PVRTC_4BPPV1||e===rt.RGB_PVRTC_2BPPV1||e===rt.RGBA_PVRTC_4BPPV1||e===rt.RGBA_PVRTC_2BPPV1||e===rt.RGBA_ASTC||e===rt.RGB_ETC1||e===rt.RGB8_ETC2||e===rt.RGBA8_ETC2_EAC||e===rt.RGBA_BC7};rt.isDXTFormat=function(e){return e===rt.RGB_DXT1||e===rt.RGBA_DXT1||e===rt.RGBA_DXT3||e===rt.RGBA_DXT5};rt.isPVRTCFormat=function(e){return e===rt.RGB_PVRTC_4BPPV1||e===rt.RGB_PVRTC_2BPPV1||e===rt.RGBA_PVRTC_4BPPV1||e===rt.RGBA_PVRTC_2BPPV1};rt.isASTCFormat=function(e){return e===rt.RGBA_ASTC};rt.isETC1Format=function(e){return e===rt.RGB_ETC1};rt.isETC2Format=function(e){return e===rt.RGB8_ETC2||e===rt.RGBA8_ETC2_EAC};rt.isBC7Format=function(e){return e===rt.RGBA_BC7};rt.compressedTextureSizeInBytes=function(e,t,n){switch(e){case rt.RGB_DXT1:case rt.RGBA_DXT1:case rt.RGB_ETC1:case rt.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case rt.RGBA_DXT3:case rt.RGBA_DXT5:case rt.RGBA_ASTC:case rt.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case rt.RGB_PVRTC_4BPPV1:case rt.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case rt.RGB_PVRTC_2BPPV1:case rt.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case rt.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};rt.textureSizeInBytes=function(e,t,n,i){let o=rt.componentsLength(e);return Xe.isPacked(t)&&(o=1),o*Xe.sizeInBytes(t)*n*i};rt.alignmentInBytes=function(e,t,n){let i=rt.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};rt.createTypedArray=function(e,t,n,i){let o,r=Xe.sizeInBytes(t);r===Uint8Array.BYTES_PER_ELEMENT?o=Uint8Array:r===Uint16Array.BYTES_PER_ELEMENT?o=Uint16Array:r===Float32Array.BYTES_PER_ELEMENT&&t===Xe.FLOAT?o=Float32Array:o=Uint32Array;let s=rt.componentsLength(e)*n*i;return new o(s)};rt.flipY=function(e,t,n,i,o){if(o===1)return e;let r=rt.createTypedArray(t,n,i,o),s=rt.componentsLength(t),a=i*s;for(let c=0;c<o;++c){let u=c*i*s,f=(o-c-1)*i*s;for(let d=0;d<a;++d)r[f+d]=e[u+d]}return r};rt.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===rt.DEPTH_STENCIL)return Z.DEPTH24_STENCIL8;if(e===rt.DEPTH_COMPONENT){if(t===Xe.UNSIGNED_SHORT)return Z.DEPTH_COMPONENT16;if(t===Xe.UNSIGNED_INT)return Z.DEPTH_COMPONENT24}if(t===Xe.FLOAT)switch(e){case rt.RGBA:return Z.RGBA32F;case rt.RGB:return Z.RGB32F;case rt.RG:return Z.RG32F;case rt.R:return Z.R32F}if(t===Xe.HALF_FLOAT)switch(e){case rt.RGBA:return Z.RGBA16F;case rt.RGB:return Z.RGB16F;case rt.RG:return Z.RG16F;case rt.R:return Z.R16F}return e};var ft=Object.freeze(rt);function ZA(e){e=y(e,y.EMPTY_OBJECT);let t=y(e.vertexFormat,Pe.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}ZA.packedLength=Pe.packedLength;ZA.pack=function(e,t,n){return n=y(n,0),Pe.pack(e._vertexFormat,t,n),t};var nte=new Pe,xRe={vertexFormat:nte};ZA.unpack=function(e,t,n){t=y(t,0);let i=Pe.unpack(e,t,nte);return l(n)?(n._vertexFormat=Pe.clone(i,n._vertexFormat),n):new ZA(xRe)};var wO=new h(-.5,-.5,0),vO=new h(.5,.5,0);ZA.createGeometry=function(e){let t=e._vertexFormat,n=new ln,i,o;if(t.position){if(o=new Float64Array(4*3),o[0]=wO.x,o[1]=wO.y,o[2]=0,o[3]=vO.x,o[4]=wO.y,o[5]=0,o[6]=vO.x,o[7]=vO.y,o[8]=0,o[9]=wO.x,o[10]=vO.y,o[11]=0,n.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(2*3),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new ct({attributes:n,indices:i,primitiveType:Le.TRIANGLES,boundingSphere:new oe(h.ZERO,Math.sqrt(2))})};var DO=ZA;function JA(){this._workerName="createPlaneOutlineGeometry"}JA.packedLength=0;JA.pack=function(e,t){return t};JA.unpack=function(e,t,n){return l(n)?n:new JA};var $_=new h(-.5,-.5,0),PO=new h(.5,.5,0);JA.createGeometry=function(){let e=new ln,t=new Uint16Array(4*2),n=new Float64Array(4*3);return n[0]=$_.x,n[1]=$_.y,n[2]=$_.z,n[3]=PO.x,n[4]=$_.y,n[5]=$_.z,n[6]=PO.x,n[7]=PO.y,n[8]=$_.z,n[9]=$_.x,n[10]=PO.y,n[11]=$_.z,e.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new ct({attributes:e,indices:t,primitiveType:Le.LINES,boundingSphere:new oe(h.ZERO,Math.sqrt(2))})};var IO=JA;var CRe=new h;function ARe(e,t,n,i){let o=uA(e,t,n,i,CRe);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var ite=ARe;var TRe=new me,ote=new me;function bRe(e,t,n,i){let r=i.cartesianToCartographic(e,TRe).height,s=i.cartesianToCartographic(t,ote);s.height=r,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,ote);a.height=r-100,i.cartographicToCartesian(a,n)}var ERe=new qe,SRe=new h,wRe=new h,vRe=new h,DRe=new h,PRe=new h,IRe=new h,OO=new h,Lh=new h,QA=new h,ORe=new G,RRe=new G,MRe=new h,rte=new Me,BRe=new Q,LRe=new Q;function yG(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=l(n.attributes.st)?n.attributes.st.values:void 0,s=o.length,a=e.wall,c=e.top||a,u=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){let f=e.boundingRectangle,d=e.tangentPlane,p=e.ellipsoid,_=e.stRotation,m=e.perPositionHeight,x=ORe;x.x=f.x,x.y=f.y;let C=t.st?new Float32Array(2*(s/3)):void 0,A;t.normal&&(m&&c&&!a?A=n.attributes.normal.values:A=new Float32Array(s));let T=t.tangent?new Float32Array(s):void 0,b=t.bitangent?new Float32Array(s):void 0,S=i?new Float32Array(s):void 0,w=0,D=0,O=wRe,I=vRe,L=DRe,N=!0,g=BRe,E=LRe;if(_!==0){let M=Me.fromAxisAngle(d._plane.normal,_,rte);g=Q.fromQuaternion(M,g),M=Me.fromAxisAngle(d._plane.normal,-_,rte),E=Q.fromQuaternion(M,E)}else g=Q.clone(Q.IDENTITY,g),E=Q.clone(Q.IDENTITY,E);let v=0,P=0;c&&u&&(v=s/2,P=s/3,s/=2);for(let M=0;M<s;M+=3){let V=h.fromArray(o,M,MRe);if(t.st&&!l(r)){let U=Q.multiplyByVector(g,V,SRe);U=p.scaleToGeodeticSurface(U,U);let k=d.projectPointOntoPlane(U,RRe);G.subtract(k,x,k);let H=R.clamp(k.x/f.width,0,1),F=R.clamp(k.y/f.height,0,1);u&&(C[w+P]=H,C[w+1+P]=F),c&&(C[w]=H,C[w+1]=F),w+=2}if(t.normal||t.tangent||t.bitangent||i){let U=D+1,k=D+2;if(a){if(M+3<s){let H=h.fromArray(o,M+3,PRe);if(N){let F=h.fromArray(o,M+s,IRe);m&&bRe(V,H,F,p),h.subtract(H,V,H),h.subtract(F,V,F),O=h.normalize(h.cross(F,H,O),O),N=!1}h.equalsEpsilon(H,V,R.EPSILON10)&&(N=!0)}(t.tangent||t.bitangent)&&(L=p.geodeticSurfaceNormal(V,L),t.tangent&&(I=h.normalize(h.cross(L,O,I),I)))}else O=p.geodeticSurfaceNormal(V,O),(t.tangent||t.bitangent)&&(m&&(OO=h.fromArray(A,D,OO),Lh=h.cross(h.UNIT_Z,OO,Lh),Lh=h.normalize(Q.multiplyByVector(E,Lh,Lh),Lh),t.bitangent&&(QA=h.normalize(h.cross(OO,Lh,QA),QA))),I=h.cross(h.UNIT_Z,O,I),I=h.normalize(Q.multiplyByVector(E,I,I),I),t.bitangent&&(L=h.normalize(h.cross(O,I,L),L)));t.normal&&(e.wall?(A[D+v]=O.x,A[U+v]=O.y,A[k+v]=O.z):u&&(A[D+v]=-O.x,A[U+v]=-O.y,A[k+v]=-O.z),(c&&!m||a)&&(A[D]=O.x,A[U]=O.y,A[k]=O.z)),i&&(a&&(O=p.geodeticSurfaceNormal(V,O)),S[D+v]=-O.x,S[U+v]=-O.y,S[k+v]=-O.z),t.tangent&&(e.wall?(T[D+v]=I.x,T[U+v]=I.y,T[k+v]=I.z):u&&(T[D+v]=-I.x,T[U+v]=-I.y,T[k+v]=-I.z),c&&(m?(T[D]=Lh.x,T[U]=Lh.y,T[k]=Lh.z):(T[D]=I.x,T[U]=I.y,T[k]=I.z))),t.bitangent&&(u&&(b[D+v]=L.x,b[U+v]=L.y,b[k+v]=L.z),c&&(m?(b[D]=QA.x,b[U]=QA.y,b[k]=QA.z):(b[D]=L.x,b[U]=L.y,b[k]=L.z))),D+=3}}t.st&&!l(r)&&(n.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:C})),t.normal&&(n.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(n.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:T})),t.bitangent&&(n.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),i&&(n.attributes.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:S}))}if(e.extrude&&l(e.offsetAttribute)){let f=o.length/3,d=new Uint8Array(f);if(e.offsetAttribute===tn.TOP)c&&u||a?d=d.fill(1,0,f/2):c&&(d=d.fill(1));else{let p=e.offsetAttribute===tn.NONE?0:1;d=d.fill(p)}n.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}return n}var NRe=new me,FRe=new me,Z_={westOverIDL:0,eastOverIDL:0},eT=new td;function cte(e,t,n,i,o){if(o=y(o,new de),!l(e)||e.length<3)return o.west=0,o.north=0,o.south=0,o.east=0,o;if(n===Yt.RHUMB)return de.fromCartesianArray(e,t,o);eT.ellipsoid.equals(t)||(eT=new td(void 0,void 0,t)),o.west=Number.POSITIVE_INFINITY,o.east=Number.NEGATIVE_INFINITY,o.south=Number.POSITIVE_INFINITY,o.north=Number.NEGATIVE_INFINITY,Z_.westOverIDL=Number.POSITIVE_INFINITY,Z_.eastOverIDL=Number.NEGATIVE_INFINITY;let r=1/R.chordLength(i,t.maximumRadius),s=e.length,a=t.cartesianToCartographic(e[0],FRe),c=NRe,u;for(let f=1;f<s;f++)u=c,c=a,a=t.cartesianToCartographic(e[f],u),eT.setEndPoints(c,a),ste(eT,r,o,Z_);return u=c,c=a,a=t.cartesianToCartographic(e[0],u),eT.setEndPoints(c,a),ste(eT,r,o,Z_),o.east-o.west>Z_.eastOverIDL-Z_.westOverIDL&&(o.west=Z_.westOverIDL,o.east=Z_.eastOverIDL,o.east>R.PI&&(o.east=o.east-R.TWO_PI),o.west>R.PI&&(o.west=o.west-R.TWO_PI)),o}var VRe=new me;function ste(e,t,n,i){let o=e.surfaceDistance,r=Math.ceil(o*t),s=r>0?o/(r-1):Number.POSITIVE_INFINITY,a=0;for(let c=0;c<r;c++){let u=e.interpolateUsingSurfaceDistance(a,VRe);a+=s;let f=u.longitude,d=u.latitude;n.west=Math.min(n.west,f),n.east=Math.max(n.east,f),n.south=Math.min(n.south,d),n.north=Math.max(n.north,d);let p=f>=0?f:f+R.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,p),i.eastOverIDL=Math.max(i.eastOverIDL,p)}}var ate=[];function kRe(e,t,n,i,o,r,s,a,c,u){let f={walls:[]},d;if(s||a){let T=Un.createGeometryFromPositions(e,t,n,i,r,c,u),b=T.attributes.position.values,S=T.indices,w,D;if(s&&a){let O=b.concat(b);w=O.length/3,D=Ne.createTypedArray(w,S.length*2),D.set(S);let I=S.length,L=w/2;for(d=0;d<I;d+=3){let N=D[d]+L,g=D[d+1]+L,E=D[d+2]+L;D[d+I]=E,D[d+1+I]=g,D[d+2+I]=N}if(T.attributes.position.values=O,r&&c.normal){let N=T.attributes.normal.values;T.attributes.normal.values=new Float32Array(O.length),T.attributes.normal.values.set(N)}if(c.st&&l(n)){let N=T.attributes.st.values;T.attributes.st.values=new Float32Array(w*2),T.attributes.st.values=N.concat(N)}T.indices=D}else if(a){for(w=b.length/3,D=Ne.createTypedArray(w,S.length),d=0;d<S.length;d+=3)D[d]=S[d+2],D[d+1]=S[d+1],D[d+2]=S[d];T.indices=D}f.topAndBottom=new pt({geometry:T})}let p=o.outerRing,_=Fa.fromPoints(p,e),m=_.projectPointsOntoPlane(p,ate),x=ti.computeWindingOrder2D(m);x===fs.CLOCKWISE&&(p=p.slice().reverse());let C=Un.computeWallGeometry(p,n,e,i,r,u);f.walls.push(new pt({geometry:C}));let A=o.holes;for(d=0;d<A.length;d++){let T=A[d];_=Fa.fromPoints(T,e),m=_.projectPointsOntoPlane(T,ate),x=ti.computeWindingOrder2D(m),x===fs.COUNTER_CLOCKWISE&&(T=T.slice().reverse()),C=Un.computeWallGeometry(T,n,e,i,r,u),f.walls.push(new pt({geometry:C}))}return f}function rd(e){let t=e.polygonHierarchy,n=y(e.vertexFormat,Pe.DEFAULT),i=y(e.ellipsoid,re.WGS84),o=y(e.granularity,R.RADIANS_PER_DEGREE),r=y(e.stRotation,0),s=e.textureCoordinates,a=y(e.perPositionHeight,!1),c=a&&l(e.extrudedHeight),u=y(e.height,0),f=y(e.extrudedHeight,u);if(!c){let d=Math.max(u,f);f=Math.min(u,f),u=d}this._vertexFormat=Pe.clone(n),this._ellipsoid=re.clone(i),this._granularity=o,this._stRotation=r,this._height=u,this._extrudedHeight=f,this._closeTop=y(e.closeTop,!0),this._closeBottom=y(e.closeBottom,!0),this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=c,this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=y(e.arcType,Yt.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=Un.computeHierarchyPackedLength(t,h)+re.packedLength+Pe.packedLength+(s?Un.computeHierarchyPackedLength(s,G):1)+12}rd.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,closeTop:e.closeTop,closeBottom:e.closeBottom,offsetAttribute:e.offsetAttribute,arcType:e.arcType,textureCoordinates:e.textureCoordinates};return new rd(t)};rd.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=y(e._offsetAttribute,-1),t[n++]=e._arcType,l(e._textureCoordinates)?n=Un.packPolygonHierarchy(e._textureCoordinates,t,n,G):t[n++]=-1,t[n++]=e.packedLength,t};var URe=re.clone(re.UNIT_SPHERE),zRe=new Pe,HRe={polygonHierarchy:{}};rd.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,URe);t+=re.packedLength;let r=Pe.unpack(e,t,zRe);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++]===1,d=e[t++]===1,p=e[t++]===1,_=e[t++]===1,m=e[t++]===1,x=e[t++],C=e[t++],A=e[t]===-1?void 0:Un.unpackPolygonHierarchy(e,t,G);l(A)?(t=A.startingIndex,delete A.startingIndex):t++;let T=e[t++];return l(n)||(n=new rd(HRe)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=c,n._stRotation=u,n._perPositionHeightExtrude=f,n._perPositionHeight=d,n._closeTop=p,n._closeBottom=_,n._shadowVolume=m,n._offsetAttribute=x===-1?void 0:x,n._arcType=C,n._textureCoordinates=A,n.packedLength=T,n};rd.computeRectangle=function(e,t){let n=y(e.granularity,R.RADIANS_PER_DEGREE),i=y(e.arcType,Yt.GEODESIC),o=e.polygonHierarchy,r=y(e.ellipsoid,re.WGS84);return cte(o.positions,r,i,n,t)};rd.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,u=e._arcType,f=e._textureCoordinates,d=l(f),p=r.positions;if(p.length<3)return;let _=Fa.fromPoints(p,n),m=Un.polygonsFromHierarchy(r,d,_.projectPointsOntoPlane.bind(_),!s,n),x=m.hierarchy,C=m.polygons,A=function(v){return v},T=d?Un.polygonsFromHierarchy(f,!0,A,!1).polygons:void 0;if(x.length===0)return;p=x[0].outerRing;let b=Un.computeBoundingRectangle(_.plane.normal,_.projectPointOntoPlane.bind(_),p,o,ERe),S=[],w=e._height,D=e._extrudedHeight,O=e._perPositionHeightExtrude||!R.equalsEpsilon(w,D,0,R.EPSILON2),I={perPositionHeight:s,vertexFormat:t,geometry:void 0,tangentPlane:_,boundingRectangle:b,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:u},L;if(O)for(I.extrude=!0,I.top=a,I.bottom=c,I.shadowVolume=e._shadowVolume,I.offsetAttribute=e._offsetAttribute,L=0;L<C.length;L++){let v=kRe(n,C[L],d?T[L]:void 0,i,x[L],s,a,c,t,u),P;a&&c?(P=v.topAndBottom,I.geometry=Un.scaleToGeodeticHeightExtruded(P.geometry,w,D,n,s)):a?(P=v.topAndBottom,P.geometry.attributes.position.values=ti.scaleToGeodeticHeight(P.geometry.attributes.position.values,w,n,!s),I.geometry=P.geometry):c&&(P=v.topAndBottom,P.geometry.attributes.position.values=ti.scaleToGeodeticHeight(P.geometry.attributes.position.values,D,n,!0),I.geometry=P.geometry),(a||c)&&(I.wall=!1,P.geometry=yG(I),S.push(P));let M=v.walls;I.wall=!0;for(let V=0;V<M.length;V++){let U=M[V];I.geometry=Un.scaleToGeodeticHeightExtruded(U.geometry,w,D,n,s),U.geometry=yG(I),S.push(U)}}else for(L=0;L<C.length;L++){let v=new pt({geometry:Un.createGeometryFromPositions(n,C[L],d?T[L]:void 0,i,s,t,u)});if(v.geometry.attributes.position.values=ti.scaleToGeodeticHeight(v.geometry.attributes.position.values,w,n,!s),I.geometry=v.geometry,v.geometry=yG(I),l(e._offsetAttribute)){let P=v.geometry.attributes.position.values.length,M=e._offsetAttribute===tn.NONE?0:1,V=new Uint8Array(P/3).fill(M);v.geometry.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:V})}S.push(v)}let N=Rn.combineInstances(S)[0];N.attributes.position.values=new Float64Array(N.attributes.position.values),N.indices=Ne.createTypedArray(N.attributes.position.values.length/3,N.indices);let g=N.attributes,E=oe.fromVertices(g.position.values);return t.position||delete g.position,new ct({attributes:g,indices:N.indices,primitiveType:N.primitiveType,boundingSphere:E,offsetAttribute:e._offsetAttribute})};rd.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new rd({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function GRe(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let n=e._ellipsoid,i=e._polygonHierarchy.positions,o=e.rectangle;return ct._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(rd.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=cte(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=GRe(this)),this._textureCoordinateRotationPoints}}});var tT=rd;function WRe(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var dl=WRe;var lte=[],RO=[];function jRe(e,t,n,i,o){let s=Fa.fromPoints(t,e).projectPointsOntoPlane(t,lte);ti.computeWindingOrder2D(s)===fs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=0;if(i)for(c=new Float64Array(f*2*3),u=0;u<f;u++){let m=t[u],x=t[(u+1)%f];c[d++]=m.x,c[d++]=m.y,c[d++]=m.z,c[d++]=x.x,c[d++]=x.y,c[d++]=x.z}else{let m=0;if(o===Yt.GEODESIC)for(u=0;u<f;u++)m+=Un.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===Yt.RHUMB)for(u=0;u<f;u++)m+=Un.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(m*3),u=0;u<f;u++){let x;o===Yt.GEODESIC?x=Un.subdivideLine(t[u],t[(u+1)%f],n,RO):o===Yt.RHUMB&&(x=Un.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,RO));let C=x.length;for(let A=0;A<C;++A)c[d++]=x[A]}}f=c.length/3;let p=f*2,_=Ne.createTypedArray(f,p);for(d=0,u=0;u<f-1;u++)_[d++]=u,_[d++]=u+1;return _[d++]=f-1,_[d++]=0,new pt({geometry:new ct({attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:_,primitiveType:Le.LINES})})}function qRe(e,t,n,i,o){let s=Fa.fromPoints(t,e).projectPointsOntoPlane(t,lte);ti.computeWindingOrder2D(s)===fs.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,u,f=t.length,d=new Array(f),p=0;if(i)for(c=new Float64Array(f*2*3*2),u=0;u<f;++u){d[u]=p/3;let C=t[u],A=t[(u+1)%f];c[p++]=C.x,c[p++]=C.y,c[p++]=C.z,c[p++]=A.x,c[p++]=A.y,c[p++]=A.z}else{let C=0;if(o===Yt.GEODESIC)for(u=0;u<f;u++)C+=Un.subdivideLineCount(t[u],t[(u+1)%f],n);else if(o===Yt.RHUMB)for(u=0;u<f;u++)C+=Un.subdivideRhumbLineCount(e,t[u],t[(u+1)%f],n);for(c=new Float64Array(C*3*2),u=0;u<f;++u){d[u]=p/3;let A;o===Yt.GEODESIC?A=Un.subdivideLine(t[u],t[(u+1)%f],n,RO):o===Yt.RHUMB&&(A=Un.subdivideRhumbLine(e,t[u],t[(u+1)%f],n,RO));let T=A.length;for(let b=0;b<T;++b)c[p++]=A[b]}}f=c.length/(3*2);let _=d.length,m=(f*2+_)*2,x=Ne.createTypedArray(f+_,m);for(p=0,u=0;u<f;++u)x[p++]=u,x[p++]=(u+1)%f,x[p++]=u+f,x[p++]=(u+1)%f+f;for(u=0;u<_;u++){let C=d[u];x[p++]=C,x[p++]=C+f}return new pt({geometry:new ct({attributes:new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:x,primitiveType:Le.LINES})})}function My(e){let t=e.polygonHierarchy,n=y(e.ellipsoid,re.WGS84),i=y(e.granularity,R.RADIANS_PER_DEGREE),o=y(e.perPositionHeight,!1),r=o&&l(e.extrudedHeight),s=y(e.arcType,Yt.GEODESIC),a=y(e.height,0),c=y(e.extrudedHeight,a);if(!r){let u=Math.max(a,c);c=Math.min(a,c),a=u}this._ellipsoid=re.clone(n),this._granularity=i,this._height=a,this._extrudedHeight=c,this._arcType=s,this._polygonHierarchy=t,this._perPositionHeight=o,this._perPositionHeightExtrude=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=Un.computeHierarchyPackedLength(t,h)+re.packedLength+8}My.pack=function(e,t,n){return n=y(n,0),n=Un.packPolygonHierarchy(e._polygonHierarchy,t,n,h),re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=y(e._offsetAttribute,-1),t[n]=e.packedLength,t};var YRe=re.clone(re.UNIT_SPHERE),XRe={polygonHierarchy:{}};My.unpack=function(e,t,n){t=y(t,0);let i=Un.unpackPolygonHierarchy(e,t,h);t=i.startingIndex,delete i.startingIndex;let o=re.unpack(e,t,YRe);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,u=e[t++]===1,f=e[t++],d=e[t++],p=e[t];return l(n)||(n=new My(XRe)),n._polygonHierarchy=i,n._ellipsoid=re.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=u,n._perPositionHeightExtrude=c,n._arcType=f,n._offsetAttribute=d===-1?void 0:d,n.packedLength=p,n};My.fromPositions=function(e){e=y(e,y.EMPTY_OBJECT);let t={polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute};return new My(t)};My.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=Un.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,c=[],u=R.chordLength(n,t.maximumRadius),f=e._height,d=e._extrudedHeight,p=e._perPositionHeightExtrude||!R.equalsEpsilon(f,d,0,R.EPSILON2),_,m;if(p)for(m=0;m<s.length;m++){if(a=qRe(t,s[m],u,o,r),a.geometry=Un.scaleToGeodeticHeightExtruded(a.geometry,f,d,t,o),l(e._offsetAttribute)){let A=a.geometry.attributes.position.values.length/3,T=new Uint8Array(A);e._offsetAttribute===tn.TOP?T=T.fill(1,0,A/2):(_=e._offsetAttribute===tn.NONE?0:1,T=T.fill(_)),a.geometry.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}c.push(a)}else for(m=0;m<s.length;m++){if(a=jRe(t,s[m],u,o,r),a.geometry.attributes.position.values=ti.scaleToGeodeticHeight(a.geometry.attributes.position.values,f,t,!o),l(e._offsetAttribute)){let A=a.geometry.attributes.position.values.length;_=e._offsetAttribute===tn.NONE?0:1;let T=new Uint8Array(A/3).fill(_);a.geometry.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}c.push(a)}let x=Rn.combineInstances(c)[0],C=oe.fromVertices(x.attributes.position.values);return new ct({attributes:x.attributes,indices:x.indices,primitiveType:x.primitiveType,boundingSphere:C,offsetAttribute:e._offsetAttribute})};var MO=My;var mte=[];function KRe(e,t,n,i,o){let r=mte;r.length=o;let s,a=n.red,c=n.green,u=n.blue,f=n.alpha,d=i.red,p=i.green,_=i.blue,m=i.alpha;if(z.equals(n,i)){for(s=0;s<o;s++)r[s]=z.clone(n);return r}let x=(d-a)/o,C=(p-c)/o,A=(_-u)/o,T=(m-f)/o;for(s=0;s<o;s++)r[s]=new z(a+s*x,c+s*C,u+s*A,f+s*T);return r}function ew(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=y(e.width,1),o=y(e.colorsPerVertex,!1);this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._arcType=y(e.arcType,Yt.GEODESIC),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._workerName="createPolylineGeometry";let r=1+t.length*h.packedLength;r+=l(n)?1+n.length*z.packedLength:1,this.packedLength=r+re.packedLength+Pe.packedLength+4}ew.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var pte=re.clone(re.UNIT_SPHERE),_te=new Pe,By={positions:void 0,colors:void 0,ellipsoid:pte,vertexFormat:_te,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};ew.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=re.unpack(e,t,pte);t+=re.packedLength;let c=Pe.unpack(e,t,_te);t+=Pe.packedLength;let u=e[t++],f=e[t++]===1,d=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=re.clone(a,n._ellipsoid),n._vertexFormat=Pe.clone(c,n._vertexFormat),n._width=u,n._colorsPerVertex=f,n._arcType=d,n._granularity=p,n):(By.positions=r,By.colors=s,By.width=u,By.colorsPerVertex=f,By.arcType=d,By.granularity=p,new ew(By))};var ute=new h,fte=new h,dte=new h,hte=new h;ew.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid,c,u,f,d=[],p=So(e._positions,h.equalsEpsilon,!1,d);if(l(i)&&d.length>0){let M=0,V=d[0];i=i.filter(function(U,k){let H=!1;return o?H=k===V||k===0&&V===1:H=k+1===V,H?(M++,V=d[M],!1):!0})}let _=p.length;if(_<2||t<=0)return;if(r===Yt.GEODESIC||r===Yt.RHUMB){let M,V;r===Yt.GEODESIC?(M=R.chordLength(s,a.maximumRadius),V=Oi.numberOfPoints):(M=s,V=Oi.numberOfPointsRhumbLine);let U=Oi.extractHeights(p,a);if(l(i)){let k=1;for(c=0;c<_-1;++c)k+=V(p[c],p[c+1],M);let H=new Array(k),F=0;for(c=0;c<_-1;++c){let Y=p[c],j=p[c+1],X=i[c],W=V(Y,j,M);if(o&&c<k){let $=i[c+1],J=KRe(Y,j,X,$,W),ce=J.length;for(u=0;u<ce;++u)H[F++]=J[u]}else for(u=0;u<W;++u)H[F++]=z.clone(X)}H[F]=z.clone(i[i.length-1]),i=H,mte.length=0}r===Yt.GEODESIC?p=Oi.generateCartesianArc({positions:p,minDistance:M,ellipsoid:a,height:U}):p=Oi.generateCartesianRhumbArc({positions:p,granularity:M,ellipsoid:a,height:U})}_=p.length;let m=_*4-4,x=new Float64Array(m*3),C=new Float64Array(m*3),A=new Float64Array(m*3),T=new Float32Array(m*2),b=n.st?new Float32Array(m*2):void 0,S=l(i)?new Uint8Array(m*4):void 0,w=0,D=0,O=0,I=0,L;for(u=0;u<_;++u){u===0?(L=ute,h.subtract(p[0],p[1],L),h.add(p[0],L,L)):L=p[u-1],h.clone(L,dte),h.clone(p[u],fte),u===_-1?(L=ute,h.subtract(p[_-1],p[_-2],L),h.add(p[_-1],L,L)):L=p[u+1],h.clone(L,hte);let M,V;l(S)&&(u!==0&&!o?M=i[u-1]:M=i[u],u!==_-1&&(V=i[u]));let U=u===0?2:0,k=u===_-1?2:4;for(f=U;f<k;++f){h.pack(fte,x,w),h.pack(dte,C,w),h.pack(hte,A,w),w+=3;let H=f-2<0?-1:1;if(T[D++]=2*(f%2)-1,T[D++]=H*t,n.st&&(b[O++]=u/(_-1),b[O++]=Math.max(T[D-2],0)),l(S)){let F=f<2?M:V;S[I++]=z.floatToByte(F.red),S[I++]=z.floatToByte(F.green),S[I++]=z.floatToByte(F.blue),S[I++]=z.floatToByte(F.alpha)}}}let N=new ln;N.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:x}),N.prevPosition=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:C}),N.nextPosition=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A}),N.expandAndWidth=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:T}),n.st&&(N.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:b})),l(S)&&(N.color=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:S,normalize:!0}));let g=Ne.createTypedArray(m,_*6-6),E=0,v=0,P=_-1;for(u=0;u<P;++u)g[v++]=E,g[v++]=E+2,g[v++]=E+1,g[v++]=E+1,g[v++]=E+2,g[v++]=E+3,E+=4;return new ct({attributes:N,indices:g,primitiveType:Le.TRIANGLES,boundingSphere:oe.fromPoints(p),geometryType:Zf.POLYLINES})};var J_=ew;function $Re(e,t,n,i){let o=new ln;i.position&&(o.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),c=ti.triangulate(t),u=(a-1)*r*6+c.length*2,f=Ne.createTypedArray(s,u),d,p,_,m,x,C,A=r*2,T=0;for(d=0;d<a-1;d++){for(p=0;p<r-1;p++)_=p*2+d*r*2,C=_+A,m=_+1,x=m+A,f[T++]=m,f[T++]=_,f[T++]=x,f[T++]=x,f[T++]=_,f[T++]=C;_=r*2-2+d*r*2,m=_+1,x=m+A,C=_+A,f[T++]=m,f[T++]=_,f[T++]=x,f[T++]=x,f[T++]=_,f[T++]=C}if(i.st||i.tangent||i.bitangent){let w=new Float32Array(s*2),D=1/(a-1),O=1/n.height,I=n.height/2,L,N,g=0;for(d=0;d<a;d++){for(L=d*D,N=O*(t[0].y+I),w[g++]=L,w[g++]=N,p=1;p<r;p++)N=O*(t[p].y+I),w[g++]=L,w[g++]=N,w[g++]=L,w[g++]=N;N=O*(t[0].y+I),w[g++]=L,w[g++]=N}for(p=0;p<r;p++)L=0,N=O*(t[p].y+I),w[g++]=L,w[g++]=N;for(p=0;p<r;p++)L=(a-1)*D,N=O*(t[p].y+I),w[g++]=L,w[g++]=N;o.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:new Float32Array(w)})}let b=s-r*2;for(d=0;d<c.length;d+=3){let w=c[d]+b,D=c[d+1]+b,O=c[d+2]+b;f[T++]=w,f[T++]=D,f[T++]=O,f[T++]=O+r,f[T++]=D+r,f[T++]=w+r}let S=new ct({attributes:o,indices:f,boundingSphere:oe.fromVertices(e),primitiveType:Le.TRIANGLES});if(i.normal&&(S=Rn.computeNormal(S)),i.tangent||i.bitangent){try{S=Rn.computeTangentAndBitangent(S)}catch{Mt("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}i.tangent||(S.attributes.tangent=void 0),i.bitangent||(S.attributes.bitangent=void 0),i.st||(S.attributes.st=void 0)}return S}function nw(e){e=y(e,y.EMPTY_OBJECT);let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*G.packedLength,this.packedLength=i+re.packedLength+Pe.packedLength+2}nw.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var gte=re.clone(re.UNIT_SPHERE),yte=new Pe,tw={polylinePositions:void 0,shapePositions:void 0,ellipsoid:gte,vertexFormat:yte,cornerType:void 0,granularity:void 0};nw.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);let a=re.unpack(e,t,gte);t+=re.packedLength;let c=Pe.unpack(e,t,yte);t+=Pe.packedLength;let u=e[t++],f=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=re.clone(a,n._ellipsoid),n._vertexFormat=Pe.clone(c,n._vertexFormat),n._cornerType=u,n._granularity=f,n):(tw.polylinePositions=r,tw.shapePositions=s,tw.cornerType=u,tw.granularity=f,new nw(tw))};var ZRe=new qe;nw.createGeometry=function(e){let t=e._positions,n=So(t,h.equalsEpsilon),i=e._shape;if(i=Sh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ti.computeWindingOrder2D(i)===fs.CLOCKWISE&&i.reverse();let o=qe.fromPoints(i,ZRe),r=Sh.computePositions(n,i,o,e,!0);return $Re(r,i,o,e._vertexFormat)};var BO=nw;function JRe(e,t){let n=new ln;n.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Ne.createTypedArray(o,2*i*(s+1)),c,u,f=0;c=0;let d=c*i;for(u=0;u<i-1;u++)a[f++]=u+d,a[f++]=u+d+1;for(a[f++]=i-1+d,a[f++]=d,c=s-1,d=c*i,u=0;u<i-1;u++)a[f++]=u+d,a[f++]=u+d+1;for(a[f++]=i-1+d,a[f++]=d,c=0;c<s-1;c++){let _=i*c,m=_+i;for(u=0;u<i;u++)a[f++]=u+_,a[f++]=u+m}return new ct({attributes:n,indices:Ne.createTypedArray(o,a),boundingSphere:oe.fromVertices(e),primitiveType:Le.LINES})}function ow(e){e=y(e,y.EMPTY_OBJECT);let t=e.polylinePositions,n=e.shapePositions;this._positions=t,this._shape=n,this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._cornerType=y(e.cornerType,Ii.ROUNDED),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let i=1+t.length*h.packedLength;i+=1+n.length*G.packedLength,this.packedLength=i+re.packedLength+2}ow.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=G.packedLength)G.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var xte=re.clone(re.UNIT_SPHERE),iw={polylinePositions:void 0,shapePositions:void 0,ellipsoid:xte,height:void 0,cornerType:void 0,granularity:void 0};ow.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=G.packedLength)s[i]=G.unpack(e,t);let a=re.unpack(e,t,xte);t+=re.packedLength;let c=e[t++],u=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=re.clone(a,n._ellipsoid),n._cornerType=c,n._granularity=u,n):(iw.polylinePositions=r,iw.shapePositions=s,iw.cornerType=c,iw.granularity=u,new ow(iw))};var QRe=new qe;ow.createGeometry=function(e){let t=e._positions,n=So(t,h.equalsEpsilon),i=e._shape;if(i=Sh.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;ti.computeWindingOrder2D(i)===fs.CLOCKWISE&&i.reverse();let o=qe.fromPoints(i,QRe),r=Sh.computePositions(n,i,o,e,!1);return JRe(r,i)};var LO=ow;function Cte(){ye.throwInstantiationError()}Cte.prototype.getURL=ye.throwInstantiationError;var Ate=Cte;function eMe(e){let t=e.points,n=e.times;return function(i,o){l(o)||(o=new Me);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=t[r],c=t[r+1];return Me.fastSlerp(a,c,s,o)}}function nT(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=eMe(this),this._lastTimeIndex=0}Object.defineProperties(nT.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});nT.prototype.findTimeInterval=zi.prototype.findTimeInterval;nT.prototype.wrapTime=zi.prototype.wrapTime;nT.prototype.clampTime=zi.prototype.clampTime;nT.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var iT=nT;var rw=Zc(Tte());function NO(){this._tree=new rw.default}function Ly(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}Ly.fromRectangleAndId=function(e,t,n){return n.minX=t.west,n.minY=t.south,n.maxX=t.east,n.maxY=t.north,n.id=e,n};NO.prototype.insert=function(e,t){let n=Ly.fromRectangleAndId(e,t,new Ly);this._tree.insert(n)};function tMe(e,t){return e.id===t.id}var nMe=new Ly;NO.prototype.remove=function(e,t){let n=Ly.fromRectangleAndId(e,t,nMe);this._tree.remove(n,tMe)};var iMe=new Ly;NO.prototype.collides=function(e){let t=Ly.fromRectangleAndId("",e,iMe);return this._tree.collides(t)};var oT=NO;var bte=Math.cos,Ete=Math.sin,oMe=Math.sqrt,TG={};TG.computePosition=function(e,t,n,i,o,r,s){let a=t.radiiSquared,c=e.nwCorner,u=e.boundingRectangle,f=c.latitude-e.granYCos*i+o*e.granXSin,d=bte(f),p=Ete(f),_=a.z*p,m=c.longitude+i*e.granYSin+o*e.granXCos,x=d*bte(m),C=d*Ete(m),A=a.x*x,T=a.y*C,b=oMe(A*x+T*C+_*p);if(r.x=A/b,r.y=T/b,r.z=_/b,n){let S=e.stNwCorner;l(S)?(f=S.latitude-e.stGranYCos*i+o*e.stGranXSin,m=S.longitude+i*e.stGranYSin+o*e.stGranXCos,s.x=(m-e.stWest)*e.lonScalar,s.y=(f-e.stSouth)*e.latScalar):(s.x=(m-u.west)*e.lonScalar,s.y=(f-u.south)*e.latScalar)}};var rMe=new vi,Xu=new h,sMe=new me,FO=new h,AG=new Si;function Ste(e,t,n,i,o,r,s){let a=Math.cos(t),c=i*a,u=n*a,f=Math.sin(t),d=i*f,p=n*f;Xu=AG.project(e,Xu),Xu=h.subtract(Xu,FO,Xu);let _=vi.fromRotation(t,rMe);Xu=vi.multiplyByVector(_,Xu,Xu),Xu=h.add(Xu,FO,Xu),e=AG.unproject(Xu,e),r-=1,s-=1;let m=e.latitude,x=m+r*p,C=m-c*s,A=m-c*s+r*p,T=Math.max(m,x,C,A),b=Math.min(m,x,C,A),S=e.longitude,w=S+r*u,D=S+s*d,O=S+s*d+r*u,I=Math.max(S,w,D,O),L=Math.min(S,w,D,O);return{north:T,south:b,east:I,west:L,granYCos:c,granYSin:d,granXCos:u,granXSin:p,nwCorner:e}}TG.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,c=e.west,u=e.north,f=e.south,d=!1,p=!1;u===R.PI_OVER_TWO&&(d=!0),f===-R.PI_OVER_TWO&&(p=!0);let _,m=u-f;c>a?_=R.TWO_PI-c+a:_=a-c;let x=Math.ceil(_/t)+1,C=Math.ceil(m/t)+1,A=_/(x-1),T=m/(C-1),b=de.northwest(e,r),S=de.center(e,sMe);(n!==0||i!==0)&&(S.longitude<b.longitude&&(S.longitude+=R.TWO_PI),FO=AG.project(S,FO));let w=T,D=A,O=0,I=0,L=de.clone(e,o),N={granYCos:w,granYSin:O,granXCos:D,granXSin:I,nwCorner:b,boundingRectangle:L,width:x,height:C,northCap:d,southCap:p};if(n!==0){let g=Ste(b,n,A,T,S,x,C);u=g.north,f=g.south,a=g.east,c=g.west,N.granYCos=g.granYCos,N.granYSin=g.granYSin,N.granXCos=g.granXCos,N.granXSin=g.granXSin,L.north=u,L.south=f,L.east=a,L.west=c}if(i!==0){n=n-i;let g=de.northwest(L,s),E=Ste(g,n,A,T,S,x,C);N.stGranYCos=E.granYCos,N.stGranXCos=E.granXCos,N.stGranYSin=E.granYSin,N.stGranXSin=E.granXSin,N.stNwCorner=g,N.stWest=E.west,N.stSouth=E.south}return N};var Es=TG;var bG=new h,Dte=new h,Pte=new h,Ite=new h,Ote=new de,aMe=new G,cMe=new oe,lMe=new oe;function Rte(e,t){let n=new ct({attributes:new ln,primitiveType:Le.TRIANGLES});return n.attributes.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function uMe(e,t,n,i){let o=e.length,r=t.normal?new Float32Array(o):void 0,s=t.tangent?new Float32Array(o):void 0,a=t.bitangent?new Float32Array(o):void 0,c=0,u=Ite,f=Pte,d=Dte;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let _=h.fromArray(e,p,bG),m=c+1,x=c+2;d=n.geodeticSurfaceNormal(_,d),(t.tangent||t.bitangent)&&(h.cross(h.UNIT_Z,d,f),Q.multiplyByVector(i,f,f),h.normalize(f,f),t.bitangent&&h.normalize(h.cross(d,f,u),u)),t.normal&&(r[c]=d.x,r[m]=d.y,r[x]=d.z),t.tangent&&(s[c]=f.x,s[m]=f.y,s[x]=f.z),t.bitangent&&(a[c]=u.x,a[m]=u.y,a[x]=u.z),c+=3}return Rte(t,{positions:e,normals:r,tangents:s,bitangents:a})}var EG=new h,Mte=new h;function fMe(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,c=0,u=0,f=!0,d=Ite,p=Pte,_=Dte;if(t.normal||t.tangent||t.bitangent)for(let m=0;m<i;m+=6){let x=h.fromArray(e,m,bG),C=h.fromArray(e,(m+6)%i,EG);if(f){let A=h.fromArray(e,(m+3)%i,Mte);h.subtract(C,x,C),h.subtract(A,x,A),_=h.normalize(h.cross(A,C,_),_),f=!1}h.equalsEpsilon(C,x,R.EPSILON10)&&(f=!0),(t.tangent||t.bitangent)&&(d=n.geodeticSurfaceNormal(x,d),t.tangent&&(p=h.normalize(h.cross(d,_,p),p))),t.normal&&(o[a++]=_.x,o[a++]=_.y,o[a++]=_.z,o[a++]=_.x,o[a++]=_.y,o[a++]=_.z),t.tangent&&(r[c++]=p.x,r[c++]=p.y,r[c++]=p.z,r[c++]=p.x,r[c++]=p.y,r[c++]=p.z),t.bitangent&&(s[u++]=d.x,s[u++]=d.y,s[u++]=d.z,s[u++]=d.x,s[u++]=d.y,s[u++]=d.z)}return Rte(t,{positions:e,normals:o,tangents:r,bitangents:s})}function Bte(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap,c=0,u=o,f=o,d=0;s&&(c=1,f-=1,d+=1),a&&(u-=1,f-=1,d+=1),d+=r*f;let p=n.position?new Float64Array(d*3):void 0,_=n.st?new Float32Array(d*2):void 0,m=0,x=0,C=bG,A=aMe,T=Number.MAX_VALUE,b=Number.MAX_VALUE,S=-Number.MAX_VALUE,w=-Number.MAX_VALUE;for(let E=c;E<u;++E)for(let v=0;v<r;++v)Es.computePosition(t,i,n.st,E,v,C,A),p[m++]=C.x,p[m++]=C.y,p[m++]=C.z,n.st&&(_[x++]=A.x,_[x++]=A.y,T=Math.min(T,A.x),b=Math.min(b,A.y),S=Math.max(S,A.x),w=Math.max(w,A.y));if(s&&(Es.computePosition(t,i,n.st,0,0,C,A),p[m++]=C.x,p[m++]=C.y,p[m++]=C.z,n.st&&(_[x++]=A.x,_[x++]=A.y,T=A.x,b=A.y,S=A.x,w=A.y)),a&&(Es.computePosition(t,i,n.st,o-1,0,C,A),p[m++]=C.x,p[m++]=C.y,p[m]=C.z,n.st&&(_[x++]=A.x,_[x]=A.y,T=Math.min(T,A.x),b=Math.min(b,A.y),S=Math.max(S,A.x),w=Math.max(w,A.y))),n.st&&(T<0||b<0||S>1||w>1))for(let E=0;E<_.length;E+=2)_[E]=(_[E]-T)/(S-T),_[E+1]=(_[E+1]-b)/(w-b);let D=uMe(p,n,i,t.tangentRotationMatrix),O=6*(r-1)*(f-1);s&&(O+=3*(r-1)),a&&(O+=3*(r-1));let I=Ne.createTypedArray(d,O),L=0,N=0,g;for(g=0;g<f-1;++g){for(let E=0;E<r-1;++E){let v=L,P=v+r,M=P+1,V=v+1;I[N++]=v,I[N++]=P,I[N++]=V,I[N++]=V,I[N++]=P,I[N++]=M,++L}++L}if(s||a){let E=d-1,v=d-1;s&&a&&(E=d-2);let P,M;if(L=0,s)for(g=0;g<r-1;g++)P=L,M=P+1,I[N++]=E,I[N++]=P,I[N++]=M,++L;if(a)for(L=(f-1)*r,g=0;g<r-1;g++)P=L,M=P+1,I[N++]=P,I[N++]=v,I[N++]=M,++L}return D.indices=I,n.st&&(D.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:_})),D}function rT(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function sT(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var SG=new Pe;function dMe(e,t){let n=e._shadowVolume,i=e._offsetAttribute,o=e._vertexFormat,r=e._extrudedHeight,s=e._surfaceHeight,a=e._ellipsoid,c=t.height,u=t.width,f;if(n){let nt=Pe.clone(o,SG);nt.normal=!0,e._vertexFormat=nt}let d=Bte(e,t);n&&(e._vertexFormat=o);let p=ti.scaleToGeodeticHeight(d.attributes.position.values,s,a,!1);p=new Float64Array(p);let _=p.length,m=_*2,x=new Float64Array(m);x.set(p);let C=ti.scaleToGeodeticHeight(d.attributes.position.values,r,a);x.set(C,_),d.attributes.position.values=x;let A=o.normal?new Float32Array(m):void 0,T=o.tangent?new Float32Array(m):void 0,b=o.bitangent?new Float32Array(m):void 0,S=o.st?new Float32Array(m/3*2):void 0,w,D;if(o.normal){for(D=d.attributes.normal.values,A.set(D),f=0;f<_;f++)D[f]=-D[f];A.set(D,_),d.attributes.normal.values=A}if(n){D=d.attributes.normal.values,o.normal||(d.attributes.normal=void 0);let nt=new Float32Array(m);for(f=0;f<_;f++)D[f]=-D[f];nt.set(D,_),d.attributes.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:nt})}let O,I=l(i);if(I){let nt=_/3*2,Tn=new Uint8Array(nt);i===tn.TOP?Tn=Tn.fill(1,0,nt/2):(O=i===tn.NONE?0:1,Tn=Tn.fill(O)),d.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Tn})}if(o.tangent){let nt=d.attributes.tangent.values;for(T.set(nt),f=0;f<_;f++)nt[f]=-nt[f];T.set(nt,_),d.attributes.tangent.values=T}if(o.bitangent){let nt=d.attributes.bitangent.values;b.set(nt),b.set(nt,_),d.attributes.bitangent.values=b}o.st&&(w=d.attributes.st.values,S.set(w),S.set(w,_/3*2),d.attributes.st.values=S);let L=d.indices,N=L.length,g=_/3,E=Ne.createTypedArray(m/3,N*2);for(E.set(L),f=0;f<N;f+=3)E[f+N]=L[f+2]+g,E[f+1+N]=L[f+1]+g,E[f+2+N]=L[f]+g;d.indices=E;let v=t.northCap,P=t.southCap,M=c,V=2,U=0,k=4,H=4;v&&(V-=1,M-=1,U+=1,k-=2,H-=1),P&&(V-=1,M-=1,U+=1,k-=2,H-=1),U+=V*u+2*M-k;let F=(U+H)*2,Y=new Float64Array(F*3),j=n?new Float32Array(F*3):void 0,X=I?new Uint8Array(F):void 0,W=o.st?new Float32Array(F*2):void 0,$=i===tn.TOP;I&&!$&&(O=i===tn.ALL?1:0,X=X.fill(O));let J=0,ce=0,he=0,ie=0,ae=u*M,ge;for(f=0;f<ae;f+=u)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);if(P){let nt=v?ae+1:ae;for(ge=nt*3,f=0;f<2;f++)Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,nt*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1)}else for(f=ae-u;f<ae;f++)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);for(f=ae-1;f>0;f-=u)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);if(v){let nt=ae;for(ge=nt*3,f=0;f<2;f++)Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,nt*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1)}else for(f=u-1;f>=0;f--)ge=f*3,Y=rT(Y,J,ge,p,C),J+=6,o.st&&(W=sT(W,ce,f*2,w),ce+=4),n&&(he+=3,j[he++]=D[ge],j[he++]=D[ge+1],j[he++]=D[ge+2]),$&&(X[ie++]=1,ie+=1);let Se=fMe(Y,o,a);o.st&&(Se.attributes.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:W})),n&&(Se.attributes.extrudeDirection=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:j})),I&&(Se.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:X}));let be=Ne.createTypedArray(F,U*6),Be,Ae,Oe,Ge;_=Y.length/3;let ot=0;for(f=0;f<_-1;f+=2){Be=f,Ge=(Be+2)%_;let nt=h.fromArray(Y,Be*3,EG),Tn=h.fromArray(Y,Ge*3,Mte);h.equalsEpsilon(nt,Tn,R.EPSILON10)||(Ae=(Be+1)%_,Oe=(Ae+2)%_,be[ot++]=Be,be[ot++]=Ae,be[ot++]=Ge,be[ot++]=Ge,be[ot++]=Ae,be[ot++]=Oe)}return Se.indices=be,Se=Rn.combineInstances([new pt({geometry:d}),new pt({geometry:Se})]),Se[0]}var hMe=[new h,new h,new h,new h],Lte=new me,mMe=new me;function wG(e,t,n,i,o){if(n===0)return de.clone(e,o);let r=Es.computeOptions(e,t,n,0,Ote,Lte),s=r.height,a=r.width,c=hMe;return Es.computePosition(r,i,!1,0,0,c[0]),Es.computePosition(r,i,!1,0,a-1,c[1]),Es.computePosition(r,i,!1,s-1,0,c[2]),Es.computePosition(r,i,!1,s-1,a-1,c[3]),de.fromCartesianArray(c,i,o)}function Nh(e){e=y(e,y.EMPTY_OBJECT);let t=e.rectangle,n=y(e.height,0),i=y(e.extrudedHeight,n);this._rectangle=de.clone(t),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._ellipsoid=re.clone(y(e.ellipsoid,re.WGS84)),this._surfaceHeight=Math.max(n,i),this._rotation=y(e.rotation,0),this._stRotation=y(e.stRotation,0),this._vertexFormat=Pe.clone(y(e.vertexFormat,Pe.DEFAULT)),this._extrudedHeight=Math.min(n,i),this._shadowVolume=y(e.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Nh.packedLength=de.packedLength+re.packedLength+Pe.packedLength+7;Nh.pack=function(e,t,n){return n=y(n,0),de.pack(e._rectangle,t,n),n+=de.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=y(e._offsetAttribute,-1),t};var Nte=new de,Fte=re.clone(re.UNIT_SPHERE),Q_={rectangle:Nte,ellipsoid:Fte,vertexFormat:SG,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Nh.unpack=function(e,t,n){t=y(t,0);let i=de.unpack(e,t,Nte);t+=de.packedLength;let o=re.unpack(e,t,Fte);t+=re.packedLength;let r=Pe.unpack(e,t,SG);t+=Pe.packedLength;let s=e[t++],a=e[t++],c=e[t++],u=e[t++],f=e[t++],d=e[t++]===1,p=e[t];return l(n)?(n._rectangle=de.clone(i,n._rectangle),n._ellipsoid=re.clone(o,n._ellipsoid),n._vertexFormat=Pe.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=u,n._extrudedHeight=f,n._shadowVolume=d,n._offsetAttribute=p===-1?void 0:p,n):(Q_.granularity=s,Q_.height=a,Q_.rotation=c,Q_.stRotation=u,Q_.extrudedHeight=f,Q_.shadowVolume=d,Q_.offsetAttribute=p===-1?void 0:p,new Nh(Q_))};Nh.computeRectangle=function(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.rectangle,i=y(e.granularity,R.RADIANS_PER_DEGREE),o=y(e.ellipsoid,re.WGS84),r=y(e.rotation,0);return wG(n,i,r,o,t)};var pMe=new Q,wte=new Me,_Me=new me;Nh.createGeometry=function(e){if(R.equalsEpsilon(e._rectangle.north,e._rectangle.south,R.EPSILON10)||R.equalsEpsilon(e._rectangle.east,e._rectangle.west,R.EPSILON10))return;let t=e._rectangle,n=e._ellipsoid,i=e._rotation,o=e._stRotation,r=e._vertexFormat,s=Es.computeOptions(t,e._granularity,i,o,Ote,Lte,mMe),a=pMe;if(o!==0||i!==0){let _=de.center(t,_Me),m=n.geodeticSurfaceNormalCartographic(_,EG);Me.fromAxisAngle(m,-o,wte),Q.fromQuaternion(wte,a)}else Q.clone(Q.IDENTITY,a);let c=e._surfaceHeight,u=e._extrudedHeight,f=!R.equalsEpsilon(c,u,0,R.EPSILON2);s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a;let d,p;if(t=e._rectangle,f){d=dMe(e,s);let _=oe.fromRectangle3D(t,n,c,lMe),m=oe.fromRectangle3D(t,n,u,cMe);p=oe.union(_,m)}else{if(d=Bte(e,s),d.attributes.position.values=ti.scaleToGeodeticHeight(d.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let _=d.attributes.position.values.length,m=e._offsetAttribute===tn.NONE?0:1,x=new Uint8Array(_/3).fill(m);d.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:x})}p=oe.fromRectangle3D(t,n,c)}return r.position||delete d.attributes.position,new ct({attributes:d.attributes,indices:d.indices,primitiveType:d.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Nh.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Nh({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Pe.POSITION_ONLY,shadowVolume:!0})};var vte=new de,gMe=[new G,new G,new G],yMe=new vi,xMe=new me;function CMe(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=de.clone(e._rectangle,vte),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=wG(t,n,o,i,vte),s=gMe;s[0].x=r.west,s[0].y=r.south,s[1].x=r.west,s[1].y=r.north,s[2].x=r.east,s[2].y=r.south;let a=e.rectangle,c=vi.fromRotation(e._stRotation,yMe),u=de.center(a,xMe);for(let m=0;m<3;++m){let x=s[m];x.x-=u.longitude,x.y-=u.latitude,vi.multiplyByVector(c,x,x),x.x+=u.longitude,x.y+=u.latitude,x.x=(x.x-a.west)/a.width,x.y=(x.y-a.south)/a.height}let f=s[0],d=s[1],p=s[2],_=new Array(6);return G.pack(f,_),G.pack(d,_,2),G.pack(p,_,4),_}Object.defineProperties(Nh.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=wG(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=CMe(this)),this._textureCoordinateRotationPoints}}});var aT=Nh;var AMe=new oe,TMe=new oe,bMe=new h,EMe=new de;function Vte(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap,a=i,c=2,u=0,f=4;r&&(c-=1,a-=1,u+=1,f-=2),s&&(c-=1,a-=1,u+=1,f-=2),u+=c*o+2*a-f;let d=new Float64Array(u*3),p=0,_=0,m,x=bMe;if(r)Es.computePosition(t,n,!1,_,0,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;else for(m=0;m<o;m++)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;for(m=o-1,_=1;_<i;_++)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;if(_=i-1,!s)for(m=o-2;m>=0;m--)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;for(m=0,_=i-2;_>0;_--)Es.computePosition(t,n,!1,_,m,x),d[p++]=x.x,d[p++]=x.y,d[p++]=x.z;let C=d.length/3*2,A=Ne.createTypedArray(d.length/3,C),T=0;for(let S=0;S<d.length/3-1;S++)A[T++]=S,A[T++]=S+1;A[T++]=d.length/3-1,A[T++]=0;let b=new ct({attributes:new ln,primitiveType:Le.LINES});return b.attributes.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d}),b.indices=A,b}function SMe(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=i,s=n,a=Vte(e,t),c=t.height,u=t.width,f=ti.scaleToGeodeticHeight(a.attributes.position.values,s,o,!1),d=f.length,p=new Float64Array(d*2);p.set(f);let _=ti.scaleToGeodeticHeight(a.attributes.position.values,r,o);p.set(_,d),a.attributes.position.values=p;let m=t.northCap,x=t.southCap,C=4;m&&(C-=1),x&&(C-=1);let A=(p.length/3+C)*2,T=Ne.createTypedArray(p.length/3,A);d=p.length/6;let b=0;for(let w=0;w<d-1;w++)T[b++]=w,T[b++]=w+1,T[b++]=w+d,T[b++]=w+d+1;T[b++]=d-1,T[b++]=0,T[b++]=d+d-1,T[b++]=d,T[b++]=0,T[b++]=d;let S;if(m)S=c-1;else{let w=u-1;T[b++]=w,T[b++]=w+d,S=u+c-2}if(T[b++]=S,T[b++]=S+d,!x){let w=u+S-1;T[b++]=w,T[b]=w+d}return a.indices=T,a}function lT(e){e=y(e,y.EMPTY_OBJECT);let t=e.rectangle,n=y(e.granularity,R.RADIANS_PER_DEGREE),i=y(e.ellipsoid,re.WGS84),o=y(e.rotation,0),r=y(e.height,0),s=y(e.extrudedHeight,r);this._rectangle=de.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}lT.packedLength=de.packedLength+re.packedLength+5;lT.pack=function(e,t,n){return n=y(n,0),de.pack(e._rectangle,t,n),n+=de.packedLength,re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._extrudedHeight,t[n]=y(e._offsetAttribute,-1),t};var kte=new de,Ute=re.clone(re.UNIT_SPHERE),cT={rectangle:kte,ellipsoid:Ute,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};lT.unpack=function(e,t,n){t=y(t,0);let i=de.unpack(e,t,kte);t+=de.packedLength;let o=re.unpack(e,t,Ute);t+=re.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],u=e[t];return l(n)?(n._rectangle=de.clone(i,n._rectangle),n._ellipsoid=re.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=c,n._offsetAttribute=u===-1?void 0:u,n):(cT.granularity=r,cT.height=s,cT.rotation=a,cT.extrudedHeight=c,cT.offsetAttribute=u===-1?void 0:u,new lT(cT))};var wMe=new me;lT.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=Es.computeOptions(t,e._granularity,e._rotation,0,EMe,wMe),o,r;if(R.equalsEpsilon(t.north,t.south,R.EPSILON10)||R.equalsEpsilon(t.east,t.west,R.EPSILON10))return;let s=e._surfaceHeight,a=e._extrudedHeight,c=!R.equalsEpsilon(s,a,0,R.EPSILON2),u;if(c){if(o=SMe(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,_=new Uint8Array(p);e._offsetAttribute===tn.TOP?_=_.fill(1,0,p/2):(u=e._offsetAttribute===tn.NONE?0:1,_=_.fill(u)),o.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}let f=oe.fromRectangle3D(t,n,s,TMe),d=oe.fromRectangle3D(t,n,a,AMe);r=oe.union(f,d)}else{if(o=Vte(e,i),o.attributes.position.values=ti.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let f=o.attributes.position.values.length;u=e._offsetAttribute===tn.NONE?0:1;let d=new Uint8Array(f/3).fill(u);o.attributes.applyOffset=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:d})}r=oe.fromRectangle3D(t,n,s)}return new ct({attributes:o.attributes,indices:o.indices,primitiveType:Le.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var uT=lT;var vMe={FIXED:0,INERTIAL:1},eo=Object.freeze(vMe);var Ny;typeof requestAnimationFrame<"u"&&(Ny=requestAnimationFrame);(function(){if(!l(Ny)&&typeof window<"u"){let e=["webkit","moz","ms","o"],t=0,n=e.length;for(;t<n&&!l(Ny);)Ny=window[`${e[t]}RequestAnimationFrame`],++t}if(!l(Ny)){let e=16.666666666666668,t=0;Ny=function(n){let i=Pi(),o=Math.max(e-(i-t),0);return t=i+o,setTimeout(function(){n(t)},o)}}})();function DMe(e){return ci("Cesium.requestAnimationFrame","Cesium.requestAnimationFrame was deprecated in CesiumJS 1.96 and will be removed in 1.99. Use the native requestAnimationFrame method instead."),Ny(e)}var zte=DMe;function PMe(e){let t=document.createElement("canvas");return t.width=R.nextPowerOfTwo(e.width),t.height=R.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}var Fy=PMe;var Vy=30,IMe=1<<Vy,OMe=1<<Vy+1>>>0,vG=2*Vy+1,eg=4,Wte=[],jte=[],RMe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],tg=1,fT=2,VO=[tg,0,0,tg|fT];function jr(e){if(!Et.supportsBigInt())throw new fe("S2 required BigInt support");this._cellId=e,this._level=jr.getLevel(e)}jr.fromToken=function(e){return new jr(jr.getIdFromToken(e))};jr.isValidId=function(e){return!(e<=0||e>>BigInt(vG)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};jr.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?jr.isValidId(jr.getIdFromToken(e)):!1};jr.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};jr.getTokenFromId=function(e){let t=Math.floor(HMe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};jr.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return Vy-(t>>1)};jr.prototype.getChild=function(e){let t=Xte(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new jr(n)};jr.prototype.getParent=function(){let e=Xte(this._cellId)<<BigInt(2);return new jr(this._cellId&~e+BigInt(1)|e)};jr.prototype.getParentAtLevel=function(e){let t=UMe(e);return new jr(this._cellId&-t|t)};jr.prototype.getCenter=function(e){e=y(e,re.WGS84);let t=MMe(this._cellId,this._level);t=h.normalize(t,t);let n=new me.fromCartesian(t,re.UNIT_SPHERE);return me.toCartesian(n,e,new h)};jr.prototype.getVertex=function(e,t){t=y(t,re.WGS84);let n=BMe(this._cellId,this._level,e);n=h.normalize(n,n);let i=new me.fromCartesian(n,re.UNIT_SPHERE);return me.toCartesian(i,t,new h)};jr.fromFacePositionLevel=function(e,t,n){let i=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),o=t.toString(2),r=Array(2*n-o.length+1).join("0"),s=Array(vG-2*n).join("0"),a=BigInt(`0b${i}${r}${o}1${s}`);return new jr(a)};function MMe(e,t){let n=LMe(e,t);return NMe(n[0],n[1],n[2])}function BMe(e,t,n){let i=qte(e,t),o=FMe([i[1],i[2]],t),r=n>>1&1;return Yte(i[0],o[0][r^n&1],o[1][r])}function LMe(e,t){let n=qte(e),i=n[0],o=n[1],r=n[2],s=t===30,a=!s&&(BigInt(o)^e>>BigInt(2))&BigInt(1),c=s?1:a?2:0,u=(o<<1)+c,f=(r<<1)+c;return[i,u,f]}function qte(e){Wte.length===0&&kMe();let t=Number(e>>BigInt(vG)),n=t&tg,i=(1<<eg)-1,o=0,r=0;for(let s=7;s>=0;s--){let a=s===7?Vy-7*eg:eg,c=(1<<2*a)-1;n+=Number(e>>BigInt(s*2*eg+1)&BigInt(c))<<2,n=jte[n];let u=s*eg;o+=n>>eg+2<<u,r+=(n>>2&i)<<u,n&=tg|fT}return[t,o,r]}function NMe(e,t,n){let i=Hte(t),o=Hte(n),r=kO(i),s=kO(o);return Yte(e,r,s)}function Yte(e,t,n){switch(e){case 0:return new h(1,t,n);case 1:return new h(-t,1,n);case 2:return new h(-t,-n,1);case 3:return new h(-1,-n,-t);case 4:return new h(n,-1,-t);default:return new h(n,t,-1)}}function kO(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Hte(e){return 1/OMe*e}function FMe(e,t){let n=[[],[]],i=VMe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=kO(Gte(r)),n[o][1]=kO(Gte(s))}return n}function VMe(e){return 1<<Vy-e>>>0}function Gte(e){return 1/IMe*e}function ng(e,t,n,i,o,r){if(e===eg){let s=(t<<eg)+n;Wte[(s<<2)+i]=(o<<2)+r,jte[(o<<2)+i]=(s<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let s=RMe[r];ng(e,t+(s[0]>>1),n+(s[0]&1),i,o,r^VO[0]),ng(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^VO[1]),ng(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^VO[2]),ng(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^VO[3])}}function kMe(){ng(0,0,0,0,0,0),ng(0,0,0,tg,0,tg),ng(0,0,0,fT,0,fT),ng(0,0,0,tg|fT,0,tg|fT)}function Xte(e){return e&~e+BigInt(1)}function UMe(e){return BigInt(1)<<BigInt(2*(Vy-e))}var zMe=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];function HMe(e){return zMe[(-e&e)%BigInt(67)]}var ig=jr;function GMe(e,t,n){return e.readyPromise.then(function(){return qMe(e,t,n)})}function WMe(e,t){let n=e[0],i=n.terrainProvider.requestTileGeometry(n.x,n.y,n.level);if(!i)return!1;let o=i.then(YMe(n)).catch(XMe(n));return e.shift(),t.push(o),!0}function jMe(e){return new Promise(function(t){setTimeout(t,e)})}function DG(e,t){return e.length?WMe(e,t)?DG(e,t):jMe(100).then(()=>DG(e,t)):Promise.resolve()}function qMe(e,t,n){let i=e.tilingScheme,o,r=[],s={};for(o=0;o<n.length;++o){let c=i.positionToTileXY(n[o],t),u=c.toString();if(!s.hasOwnProperty(u)){let f={x:c.x,y:c.y,level:t,tilingScheme:i,terrainProvider:e,positions:[]};s[u]=f,r.push(f)}s[u].positions.push(n[o])}let a=[];return DG(r,a).then(function(){return Promise.all(a).then(function(){return n})})}function Kte(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function YMe(e){let t=e.positions,n=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(i){let o=!1;for(let r=0;r<t.length;++r){let s=t[r];if(!Kte(s,i,n)){o=!0;break}}return o?i.createMesh({tilingScheme:e.tilingScheme,x:e.x,y:e.y,level:e.level,throttle:!1}).then(function(){for(let r=0;r<t.length;++r){let s=t[r];Kte(s,i,n)}}):Promise.resolve()}}function XMe(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var UO=GMe;var PG=new G;function $te(e,t){return e.readyPromise.then(function(){let n=[],i=[],o=e.availability,r=[];for(let s=0;s<t.length;++s){let a=t[s],c=o.computeMaximumLevelAtPosition(a);if(i[s]=c,c===0){e.tilingScheme.positionToTileXY(a,1,PG);let f=e.loadTileDataAvailability(PG.x,PG.y,1);l(f)&&r.push(f)}let u=n[c];l(u)||(n[c]=u=[]),u.push(a)}return Promise.all(r).then(function(){return Promise.all(n.map(function(s,a){if(l(s))return UO(e,a,s)}))}).then(function(){let s=[];for(let a=0;a<t.length;++a){let c=t[a];o.computeMaximumLevelAtPosition(c)!==i[a]&&s.push(c)}if(s.length>0)return $te(e,s)}).then(function(){return t})})}var dT=$te;var KMe={LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19},mn=Object.freeze(KMe);function og(e,t,n){let i=e._element;if(i===document)return n.x=t.clientX,n.y=t.clientY,n;let o=i.getBoundingClientRect();return n.x=t.clientX-o.left,n.y=t.clientY-o.top,n}function LG(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function ky(e){if(e.shiftKey)return ha.SHIFT;if(e.ctrlKey)return ha.CTRL;if(e.altKey)return ha.ALT}var ds={LEFT:0,MIDDLE:1,RIGHT:2};function Hl(e,t,n,i){function o(r){i(e,r)}Et.isInternetExplorer()?n.addEventListener(t,o,!1):n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function $Me(e){let t=e._element,n=l(t.disableRootEvents)?t:document;Et.supportsPointerEvents()?(Hl(e,"pointerdown",t,nBe),Hl(e,"pointerup",t,sne),Hl(e,"pointermove",t,iBe),Hl(e,"pointercancel",t,sne)):(Hl(e,"mousedown",t,ane),Hl(e,"mouseup",n,cne),Hl(e,"mousemove",n,lne),Hl(e,"touchstart",t,eBe),Hl(e,"touchend",n,tne),Hl(e,"touchmove",n,tBe),Hl(e,"touchcancel",n,tne)),Hl(e,"dblclick",t,JMe);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",Hl(e,i,t,QMe)}function ZMe(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var Zte={position:new G};function NG(e){e._lastSeenTouchEvent=Pi()}function FG(e){return Pi()-e._lastSeenTouchEvent>sd.mouseEmulationIgnoreMilliseconds}function BG(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function ane(e,t){if(!FG(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===ds.LEFT)i=mn.LEFT_DOWN;else if(n===ds.MIDDLE)i=mn.MIDDLE_DOWN;else if(n===ds.RIGHT)i=mn.RIGHT_DOWN;else return;let o=og(e,t,e._primaryPosition);G.clone(o,e._primaryStartPosition),G.clone(o,e._primaryPreviousPosition);let r=ky(t),s=e.getInputAction(i,r);l(s)&&(G.clone(o,Zte.position),s(Zte),t.preventDefault())}var Jte={position:new G},Qte={position:new G};function IG(e,t,n,i){let o=ky(i),r=e.getInputAction(t,o),s=e.getInputAction(n,o);if(l(r)||l(s)){let a=og(e,i,e._primaryPosition);if(l(r)&&(G.clone(a,Jte.position),r(Jte)),l(s)){let c=e._primaryStartPosition;BG(c,a,e._clickPixelTolerance)&&(G.clone(a,Qte.position),s(Qte))}}}function cne(e,t){if(!FG(e))return;let n=t.button;n!==ds.LEFT&&n!==ds.MIDDLE&&n!==ds.RIGHT||(e._buttonDown[ds.LEFT]&&(IG(e,mn.LEFT_UP,mn.LEFT_CLICK,t),e._buttonDown[ds.LEFT]=!1),e._buttonDown[ds.MIDDLE]&&(IG(e,mn.MIDDLE_UP,mn.MIDDLE_CLICK,t),e._buttonDown[ds.MIDDLE]=!1),e._buttonDown[ds.RIGHT]&&(IG(e,mn.RIGHT_UP,mn.RIGHT_CLICK,t),e._buttonDown[ds.RIGHT]=!1))}var OG={startPosition:new G,endPosition:new G};function lne(e,t){if(!FG(e))return;let n=ky(t),i=og(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(mn.MOUSE_MOVE,n);l(r)&&(G.clone(o,OG.startPosition),G.clone(i,OG.endPosition),r(OG)),G.clone(i,o),(e._buttonDown[ds.LEFT]||e._buttonDown[ds.MIDDLE]||e._buttonDown[ds.RIGHT])&&t.preventDefault()}var ene={position:new G};function JMe(e,t){let n=t.button,i;if(n===ds.LEFT)i=mn.LEFT_DOUBLE_CLICK;else return;let o=ky(t),r=e.getInputAction(i,o);l(r)&&(og(e,t,ene.position),r(ene))}function QMe(e,t){let n;if(l(t.deltaY)){let r=t.deltaMode;r===t.DOM_DELTA_PIXEL?n=-t.deltaY:r===t.DOM_DELTA_LINE?n=-t.deltaY*40:n=-t.deltaY*120}else t.detail>0?n=t.detail*-120:n=t.wheelDelta;if(!l(n))return;let i=ky(t),o=e.getInputAction(mn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function eBe(e,t){NG(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.set(s,og(e,r,new G));zO(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,G.clone(a.get(s)))}function tne(e,t){NG(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i)r=n[i],s=r.identifier,a.remove(s);zO(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var nne={position:new G},RG={position1:new G,position2:new G},ine={position:new G},one={position:new G},rne={position:new G};function zO(e,t){let n=ky(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[ds.LEFT]){if(e._buttonDown[ds.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(mn.LEFT_UP,n),l(r)&&(G.clone(e._primaryPosition,ine.position),r(ine)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(mn.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,u=e._previousPositions.values[0];BG(c,u,e._clickPixelTolerance)&&(G.clone(e._primaryPosition,one.position),s(one))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(mn.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];G.clone(c,e._primaryPosition),G.clone(c,e._primaryStartPosition),G.clone(c,e._primaryPreviousPosition),e._buttonDown[ds.LEFT]=!0,r=e.getInputAction(mn.LEFT_DOWN,n),l(r)&&(G.clone(c,nne.position),r(nne)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(mn.RIGHT_CLICK,n),l(s))){let u=e._primaryStartPosition,f=e._previousPositions.values[0];BG(u,f,e._holdPixelTolerance)&&(G.clone(e._primaryPosition,rne.position),s(rne))}},sd.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(mn.PINCH_START,n),l(r)&&(G.clone(i.values[0],RG.position1),G.clone(i.values[1],RG.position2),r(RG),t.preventDefault()))}function tBe(e,t){NG(e);let n=t.changedTouches,i,o=n.length,r,s,a=e._positions;for(i=0;i<o;++i){r=n[i],s=r.identifier;let u=a.get(s);l(u)&&og(e,r,u)}une(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,G.clone(a.get(s),c.get(s))}var MG={startPosition:new G,endPosition:new G},sw={distance:{startPosition:new G,endPosition:new G},angleAndHeight:{startPosition:new G,endPosition:new G}};function une(e,t){let n=ky(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[ds.LEFT]){let a=i.values[0];G.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(mn.MOUSE_MOVE,n),l(s)&&(G.clone(c,MG.startPosition),G.clone(a,MG.endPosition),s(MG)),G.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(mn.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],u=o.values[0],f=o.values[1],d=c.x-a.x,p=c.y-a.y,_=Math.sqrt(d*d+p*p)*.25,m=f.x-u.x,x=f.y-u.y,C=Math.sqrt(m*m+x*x)*.25,A=(c.y+a.y)*.125,T=(f.y+u.y)*.125,b=Math.atan2(p,d),S=Math.atan2(x,m);G.fromElements(0,C,sw.distance.startPosition),G.fromElements(0,_,sw.distance.endPosition),G.fromElements(S,T,sw.angleAndHeight.startPosition),G.fromElements(b,A,sw.angleAndHeight.endPosition),s(sw)}}function nBe(e,t){if(t.target.setPointerCapture(t.pointerId),t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.set(i,og(e,t,new G)),zO(e,t),e._previousPositions.set(i,G.clone(n.get(i)))}else ane(e,t)}function sne(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),zO(e,t),e._previousPositions.remove(i)}else cne(e,t)}function iBe(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId,o=n.get(i);if(!l(o))return;og(e,t,o),une(e,t);let r=e._previousPositions;G.clone(n.get(i),r.get(i))}else lne(e,t)}function sd(e){this._inputEvents={},this._buttonDown={LEFT:!1,MIDDLE:!1,RIGHT:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-sd.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new G,this._primaryPosition=new G,this._primaryPreviousPosition=new G,this._positions=new gt,this._previousPositions=new gt,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=y(e,document),$Me(this)}sd.prototype.setInputAction=function(e,t,n){let i=LG(t,n);this._inputEvents[i]=e};sd.prototype.getInputAction=function(e,t){let n=LG(e,t);return this._inputEvents[n]};sd.prototype.removeInputAction=function(e,t){let n=LG(e,t);delete this._inputEvents[n]};sd.prototype.isDestroyed=function(){return!1};sd.prototype.destroy=function(){return ZMe(this),ue(this)};sd.mouseEmulationIgnoreMilliseconds=800;sd.touchHoldDelayMilliseconds=1500;var Ku=sd;function HO(e){e=y(e,!0),this.value=HO.toValue(e)}Object.defineProperties(HO.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});HO.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var pn=HO;var VG={};function oBe(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var rBe=32.184,sBe=2451545;function Pne(e,t){t=ee.addSeconds(e,rBe,t);let n=ee.totalDays(t)-sBe;return t=ee.addSeconds(t,oBe(n),t),t}var GO=new ee(2451545,0,Hn.TAI),aBe=1e3,$u=R.RADIANS_PER_DEGREE,Gl=R.RADIANS_PER_ARCSECOND,ma=14959787e4,fne=new Q;function Ine(e,t,n,i,o,r,s){n<0&&(n=-n,o+=R.PI);let a=e*(1-t),c=i-o,u=o,f=lBe(r-i,t),d=cBe(t,0);mBe(c,n,u,fne);let p=a*(1+t),_=Math.cos(f),m=Math.sin(f),x=1+t*_,C=p/x;return l(s)?(s.x=C*_,s.y=C*m,s.z=0):s=new h(C*_,C*m,0),Q.multiplyByVector(fne,s,s)}function cBe(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function lBe(e,t){let n=dBe(e,t);return hBe(n,t)}var uBe=50,fBe=R.EPSILON8;function dBe(e,t){let n=Math.floor(e/R.TWO_PI);e-=n*R.TWO_PI;let i=e+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE,r;for(r=0;r<uBe&&Math.abs(o-i)>fBe;++r){o=i;let s=o-t*Math.sin(o)-e,a=1-t*Math.cos(o);i=o-s/a}return o=i+n*R.TWO_PI,o}function hBe(e,t){let n=Math.floor(e/R.TWO_PI);e-=n*R.TWO_PI;let i=Math.cos(e)-t,o=Math.sin(e)*Math.sqrt(1-t*t),r=Math.atan2(o,i);return r=R.zeroToTwoPi(r),e<0&&(r-=R.TWO_PI),r+=n*R.TWO_PI,r}function mBe(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),u=Math.sin(n);return l(i)?(i[0]=c*o-u*r*s,i[1]=u*o+c*r*s,i[2]=r*a,i[3]=-c*r-u*o*s,i[4]=-u*r+c*o*s,i[5]=o*a,i[6]=u*a,i[7]=-c*a,i[8]=s):i=new Q(c*o-u*r*s,-c*r-u*o*s,u*a,u*o+c*r*s,-u*r+c*o*s,-c*a,r*a,o*a,s),i}var pBe=1.0000010178*ma,_Be=100.46645683*$u,gBe=129597742283429e-5*Gl,dne=16002,hne=21863,mne=32004,pne=10931,_ne=14529,gne=16368,yne=15318,xne=32794,yBe=64*1e-7*ma,xBe=-152*1e-7*ma,CBe=62*1e-7*ma,ABe=-8*1e-7*ma,TBe=32*1e-7*ma,bBe=-41*1e-7*ma,EBe=19*1e-7*ma,SBe=-11*1e-7*ma,wBe=-150*1e-7*ma,vBe=-46*1e-7*ma,DBe=68*1e-7*ma,PBe=54*1e-7*ma,IBe=14*1e-7*ma,OBe=24*1e-7*ma,RBe=-28*1e-7*ma,MBe=22*1e-7*ma,Cne=10,Ane=16002,Tne=21863,bne=10931,Ene=1473,Sne=32004,wne=4387,vne=73,BBe=-325*1e-7,LBe=-322*1e-7,NBe=-79*1e-7,FBe=232*1e-7,VBe=-52*1e-7,kBe=97*1e-7,UBe=55*1e-7,zBe=-41*1e-7,HBe=-105*1e-7,GBe=-137*1e-7,WBe=258*1e-7,jBe=35*1e-7,qBe=-116*1e-7,YBe=-88*1e-7,XBe=-112*1e-7,KBe=-80*1e-7,hT=new ee(0,0,Hn.TAI);function $Be(e,t){Pne(e,hT);let i=(hT.dayNumber-GO.dayNumber+(hT.secondsOfDay-GO.secondsOfDay)/jn.SECONDS_PER_DAY)/(jn.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=pBe+yBe*Math.cos(dne*o)+wBe*Math.sin(dne*o)+xBe*Math.cos(hne*o)+vBe*Math.sin(hne*o)+CBe*Math.cos(mne*o)+DBe*Math.sin(mne*o)+ABe*Math.cos(pne*o)+PBe*Math.sin(pne*o)+TBe*Math.cos(_ne*o)+IBe*Math.sin(_ne*o)+bBe*Math.cos(gne*o)+OBe*Math.sin(gne*o)+EBe*Math.cos(yne*o)+RBe*Math.sin(yne*o)+SBe*Math.cos(xne*o)+MBe*Math.sin(xne*o),s=_Be+gBe*i+BBe*Math.cos(Cne*o)+HBe*Math.sin(Cne*o)+LBe*Math.cos(Ane*o)+GBe*Math.sin(Ane*o)+NBe*Math.cos(Tne*o)+WBe*Math.sin(Tne*o)+FBe*Math.cos(bne*o)+jBe*Math.sin(bne*o)+VBe*Math.cos(Ene*o)+qBe*Math.sin(Ene*o)+kBe*Math.cos(Sne*o)+YBe*Math.sin(Sne*o)+UBe*Math.cos(wne*o)+XBe*Math.sin(wne*o)+zBe*Math.cos(vne*o)+KBe*Math.sin(vne*o),a=.0167086342-.0004203654*i,c=102.93734808*$u+11612.3529*Gl*i,u=469.97289*Gl*i,f=174.87317577*$u-8679.27034*Gl*i;return Ine(r,a,u,c,f,s,t)}function One(e,t){Pne(e,hT);let i=(hT.dayNumber-GO.dayNumber+(hT.secondsOfDay-GO.secondsOfDay)/jn.SECONDS_PER_DAY)/jn.DAYS_PER_JULIAN_CENTURY,o=i*i,r=o*i,s=r*i,a=383397.7725+.004*i,c=.055545526-16e-9*i,u=5.15668983*$u,f=-8e-5*i+.02966*o-42e-6*r-13e-8*s,d=83.35324312*$u,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,_=125.04455501*$u,m=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,x=218.31664563*$u,C=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,A=297.85019547*$u+Gl*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),T=93.27209062*$u+Gl*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),b=134.96340251*$u+Gl*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),S=357.52910918*$u+Gl*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),w=310.17137918*$u-Gl*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),D=2*A,O=4*A,I=6*A,L=2*b,N=3*b,g=4*b,E=2*T;a+=3400.4*Math.cos(D)-635.6*Math.cos(D-b)-235.6*Math.cos(b)+218.1*Math.cos(D-S)+181*Math.cos(D+b),c+=.014216*Math.cos(D-b)+.008551*Math.cos(D-L)-.001383*Math.cos(b)+.001356*Math.cos(D+b)-.001147*Math.cos(O-N)-914e-6*Math.cos(O-L)+869e-6*Math.cos(D-S-b)-627e-6*Math.cos(D)-394e-6*Math.cos(O-g)+282e-6*Math.cos(D-S-L)-279e-6*Math.cos(A-b)-236e-6*Math.cos(L)+231e-6*Math.cos(O)+229e-6*Math.cos(I-g)-201e-6*Math.cos(L-E),f+=486.26*Math.cos(D-E)-40.13*Math.cos(D)+37.51*Math.cos(E)+25.73*Math.cos(L-E)+19.97*Math.cos(D-S-E),p+=-55609*Math.sin(D-b)-34711*Math.sin(D-L)-9792*Math.sin(b)+9385*Math.sin(O-N)+7505*Math.sin(O-L)+5318*Math.sin(D+b)+3484*Math.sin(O-g)-3417*Math.sin(D-S-b)-2530*Math.sin(I-g)-2376*Math.sin(D)-2075*Math.sin(D-N)-1883*Math.sin(L)-1736*Math.sin(I-5*b)+1626*Math.sin(S)-1370*Math.sin(I-N),m+=-5392*Math.sin(D-E)-540*Math.sin(S)-441*Math.sin(D)+423*Math.sin(E)-288*Math.sin(L-E),C+=-3332.9*Math.sin(D)+1197.4*Math.sin(D-b)-662.5*Math.sin(S)+396.3*Math.sin(b)-218*Math.sin(D-S);let v=2*w,P=3*w;f+=46.997*Math.cos(w)*i-.614*Math.cos(D-E+w)*i+.614*Math.cos(D-E-w)*i-.0297*Math.cos(v)*o-.0335*Math.cos(w)*o+.0012*Math.cos(D-E+v)*o-16e-5*Math.cos(w)*r+4e-5*Math.cos(P)*r+4e-5*Math.cos(v)*r;let M=2.116*Math.sin(w)*i-.111*Math.sin(D-E-w)*i-.0015*Math.sin(w)*o;p+=M,C+=M,m+=-520.77*Math.sin(w)*i+13.66*Math.sin(D-E+w)*i+1.12*Math.sin(D-w)*i-1.06*Math.sin(E-w)*i+.66*Math.sin(v)*o+.371*Math.sin(w)*o-.035*Math.sin(D-E+v)*o-.015*Math.sin(D-E+w)*o+.0014*Math.sin(w)*r-.0011*Math.sin(P)*r-9e-4*Math.sin(v)*r,a*=aBe;let V=u+f*Gl,U=d+p*Gl,k=x+C*Gl,H=_+m*Gl;return Ine(a,c,V,U,H,k,t)}var Dne=.012300034,ZBe=Dne/(Dne+1)*-1;function JBe(e,t){return t=One(e,t),h.multiplyByScalar(t,ZBe,t)}var Rne=new Q(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),aw=new h;VG.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=ee.now()),l(t)||(t=new h),aw=$Be(e,aw),t=h.negate(aw,t),JBe(e,aw),h.subtract(t,aw,t),Q.multiplyByVector(Rne,t,t),t};VG.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=ee.now()),t=One(e,t),Q.multiplyByVector(Rne,t,t),t};var Uy=VG;function QBe(e,t,n,i,o,r,s){let a=Oi.numberOfPoints(e,t,o),c,u=n.red,f=n.green,d=n.blue,p=n.alpha,_=i.red,m=i.green,x=i.blue,C=i.alpha;if(z.equals(n,i)){for(c=0;c<a;c++)r[s++]=z.floatToByte(u),r[s++]=z.floatToByte(f),r[s++]=z.floatToByte(d),r[s++]=z.floatToByte(p);return s}let A=(_-u)/a,T=(m-f)/a,b=(x-d)/a,S=(C-p)/a,w=s;for(c=0;c<a;c++)r[w++]=z.floatToByte(u+c*A),r[w++]=z.floatToByte(f+c*T),r[w++]=z.floatToByte(d+c*b),r[w++]=z.floatToByte(p+c*S);return w}function cw(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.colors,i=y(e.colorsPerVertex,!1);this._positions=t,this._colors=n,this._colorsPerVertex=i,this._arcType=y(e.arcType,Yt.GEODESIC),this._granularity=y(e.granularity,R.RADIANS_PER_DEGREE),this._ellipsoid=y(e.ellipsoid,re.WGS84),this._workerName="createSimplePolylineGeometry";let o=1+t.length*h.packedLength;o+=l(n)?1+n.length*z.packedLength:1,this.packedLength=o+re.packedLength+3}cw.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=z.packedLength)z.pack(s[i],t,n);return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};cw.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=z.packedLength)s[i]=z.unpack(e,t);let a=re.unpack(e,t);t+=re.packedLength;let c=e[t++]===1,u=e[t++],f=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=u,n._granularity=f,n):new cw({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:u,granularity:f})};var WO=new Array(2),jO=new Array(2),eLe={positions:WO,height:jO,ellipsoid:void 0,minDistance:void 0,granularity:void 0};cw.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=R.chordLength(r,s.maximumRadius),c=l(n)&&!i,u,f=t.length,d,p,_,m,x=0;if(o===Yt.GEODESIC||o===Yt.RHUMB){let S,w,D;o===Yt.GEODESIC?(S=R.chordLength(r,s.maximumRadius),w=Oi.numberOfPoints,D=Oi.generateArc):(S=r,w=Oi.numberOfPointsRhumbLine,D=Oi.generateRhumbArc);let O=Oi.extractHeights(t,s),I=eLe;if(o===Yt.GEODESIC?I.minDistance=a:I.granularity=r,I.ellipsoid=s,c){let L=0;for(u=0;u<f-1;u++)L+=w(t[u],t[u+1],S)+1;d=new Float64Array(L*3),_=new Uint8Array(L*4),I.positions=WO,I.height=jO;let N=0;for(u=0;u<f-1;++u){WO[0]=t[u],WO[1]=t[u+1],jO[0]=O[u],jO[1]=O[u+1];let g=D(I);if(l(n)){let E=g.length/3;m=n[u];for(let v=0;v<E;++v)_[N++]=z.floatToByte(m.red),_[N++]=z.floatToByte(m.green),_[N++]=z.floatToByte(m.blue),_[N++]=z.floatToByte(m.alpha)}d.set(g,x),x+=g.length}}else if(I.positions=t,I.height=O,d=new Float64Array(D(I)),l(n)){for(_=new Uint8Array(d.length/3*4),u=0;u<f-1;++u){let N=t[u],g=t[u+1],E=n[u],v=n[u+1];x=QBe(N,g,E,v,a,_,x)}let L=n[f-1];_[x++]=z.floatToByte(L.red),_[x++]=z.floatToByte(L.green),_[x++]=z.floatToByte(L.blue),_[x++]=z.floatToByte(L.alpha)}}else{p=c?f*2-2:f,d=new Float64Array(p*3),_=l(n)?new Uint8Array(p*4):void 0;let S=0,w=0;for(u=0;u<f;++u){let D=t[u];if(c&&u>0&&(h.pack(D,d,S),S+=3,m=n[u-1],_[w++]=z.floatToByte(m.red),_[w++]=z.floatToByte(m.green),_[w++]=z.floatToByte(m.blue),_[w++]=z.floatToByte(m.alpha)),c&&u===f-1)break;h.pack(D,d,S),S+=3,l(n)&&(m=n[u],_[w++]=z.floatToByte(m.red),_[w++]=z.floatToByte(m.green),_[w++]=z.floatToByte(m.blue),_[w++]=z.floatToByte(m.alpha))}}let C=new ln;C.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d}),l(n)&&(C.color=new Ee({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:_,normalize:!0})),p=d.length/3;let A=(p-1)*2,T=Ne.createTypedArray(p,A),b=0;for(u=0;u<p-1;++u)T[b++]=u,T[b++]=u+1;return new ct({attributes:C,indices:T,primitiveType:Le.LINES,boundingSphere:oe.fromPoints(t)})};var Mne=cw;function mT(e){let t=y(e.radius,1),i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new ks(i),this._workerName="createSphereGeometry"}mT.packedLength=ks.packedLength;mT.pack=function(e,t,n){return ks.pack(e._ellipsoidGeometry,t,n)};var tLe=new ks,rg={radius:void 0,radii:new h,vertexFormat:new Pe,stackPartitions:void 0,slicePartitions:void 0};mT.unpack=function(e,t,n){let i=ks.unpack(e,t,tLe);return rg.vertexFormat=Pe.clone(i._vertexFormat,rg.vertexFormat),rg.stackPartitions=i._stackPartitions,rg.slicePartitions=i._slicePartitions,l(n)?(h.clone(i._radii,rg.radii),n._ellipsoidGeometry=new ks(rg),n):(rg.radius=i._radii.x,new mT(rg))};mT.createGeometry=function(e){return ks.createGeometry(e._ellipsoidGeometry)};var Bne=mT;function pT(e){let t=y(e.radius,1),i={radii:new h(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new zu(i),this._workerName="createSphereOutlineGeometry"}pT.packedLength=zu.packedLength;pT.pack=function(e,t,n){return zu.pack(e._ellipsoidGeometry,t,n)};var nLe=new zu,zy={radius:void 0,radii:new h,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};pT.unpack=function(e,t,n){let i=zu.unpack(e,t,nLe);return zy.stackPartitions=i._stackPartitions,zy.slicePartitions=i._slicePartitions,zy.subdivisions=i._subdivisions,l(n)?(h.clone(i._radii,zy.radii),n._ellipsoidGeometry=new zu(zy),n):(zy.radius=i._radii.x,new pT(zy))};pT.createGeometry=function(e){return zu.createGeometry(e._ellipsoidGeometry)};var sg=pT;function Wa(e,t,n){this.clock=y(e,0),this.cone=y(t,0),this.magnitude=y(n,1)}Wa.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new Wa),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};Wa.clone=function(e,t){if(!!l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new Wa(e.clock,e.cone,e.magnitude)};Wa.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new Wa(e.clock,e.cone,1)};Wa.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};Wa.equalsEpsilon=function(e,t,n){return n=y(n,0),e===t||l(e)&&l(t)&&Math.abs(e.clock-t.clock)<=n&&Math.abs(e.cone-t.cone)<=n&&Math.abs(e.magnitude-t.magnitude)<=n};Wa.prototype.equals=function(e){return Wa.equals(this,e)};Wa.prototype.clone=function(e){return Wa.clone(this,e)};Wa.prototype.equalsEpsilon=function(e,t){return Wa.equalsEpsilon(this,e,t)};Wa.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var qO=Wa;function _T(e){e=y(e,y.EMPTY_OBJECT);let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=zi.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(_T.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});_T.prototype.findTimeInterval=zi.prototype.findTimeInterval;_T.prototype.wrapTime=zi.prototype.wrapTime;_T.prototype.clampTime=zi.prototype.clampTime;_T.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(l(t)||(t=new o),o.clone(n[i],t))};var YO=_T;function iLe(e,t){let n=[],i=e.length,o=0;for(;o<i;){let r=Math.ceil((i-o)/t--);n.push(e.slice(o,o+r)),o+=r}return n}var XO=iLe;var oLe={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},hn=oLe;function ag(e){}Object.defineProperties(ag.prototype,{ellipsoid:{get:ye.throwInstantiationError},rectangle:{get:ye.throwInstantiationError},projection:{get:ye.throwInstantiationError}});ag.prototype.getNumberOfXTilesAtLevel=ye.throwInstantiationError;ag.prototype.getNumberOfYTilesAtLevel=ye.throwInstantiationError;ag.prototype.rectangleToNativeRectangle=ye.throwInstantiationError;ag.prototype.tileXYToNativeRectangle=ye.throwInstantiationError;ag.prototype.tileXYToRectangle=ye.throwInstantiationError;ag.prototype.positionToTileXY=ye.throwInstantiationError;var Lne=ag;function zG(e,t){return ee.compare(e.start,t.start)}function Br(e){if(this._intervals=[],this._changedEvent=new _e,l(e)){let t=e.length;for(let n=0;n<t;n++)this.addInterval(e[n])}}Object.defineProperties(Br.prototype,{changedEvent:{get:function(){return this._changedEvent}},start:{get:function(){let e=this._intervals;return e.length===0?void 0:e[0].start}},isStartIncluded:{get:function(){let e=this._intervals;return e.length===0?!1:e[0].isStartIncluded}},stop:{get:function(){let e=this._intervals,t=e.length;return t===0?void 0:e[t-1].stop}},isStopIncluded:{get:function(){let e=this._intervals,t=e.length;return t===0?!1:e[t-1].isStopIncluded}},length:{get:function(){return this._intervals.length}},isEmpty:{get:function(){return this._intervals.length===0}}});Br.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof Br))return!1;let n=this._intervals,i=e._intervals,o=n.length;if(o!==i.length)return!1;for(let r=0;r<o;r++)if(!yn.equals(n[r],i[r],t))return!1;return!0};Br.prototype.get=function(e){return this._intervals[e]};Br.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};Br.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};Br.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};Br.prototype.contains=function(e){return this.indexOf(e)>=0};var kG=new yn;Br.prototype.indexOf=function(e){let t=this._intervals;kG.start=e,kG.stop=e;let n=ar(t,kG,zG);return n>=0?t[n].isStartIncluded?n:n>0&&t[n-1].stop.equals(e)&&t[n-1].isStopIncluded?n-1:~n:(n=~n,n>0&&n-1<t.length&&yn.contains(t[n-1],e)?n-1:~n)};Br.prototype.findInterval=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.start,n=e.stop,i=e.isStartIncluded,o=e.isStopIncluded,r=this._intervals;for(let s=0,a=r.length;s<a;s++){let c=r[s];if((!l(t)||c.start.equals(t))&&(!l(n)||c.stop.equals(n))&&(!l(i)||c.isStartIncluded===i)&&(!l(o)||c.isStopIncluded===o))return r[s]}};Br.prototype.addInterval=function(e,t){if(e.isEmpty)return;let n=this._intervals;if(n.length===0||ee.greaterThan(e.start,n[n.length-1].stop)){n.push(e),this._changedEvent.raiseEvent(this);return}let i=ar(n,e,zG);i<0?i=~i:i>0&&e.isStartIncluded&&n[i-1].isStartIncluded&&n[i-1].start.equals(e.start)?--i:i<n.length&&!e.isStartIncluded&&n[i].isStartIncluded&&n[i].start.equals(e.start)&&++i;let o;for(i>0&&(o=ee.compare(n[i-1].stop,e.start),(o>0||o===0&&(n[i-1].isStopIncluded||e.isStartIncluded))&&((l(t)?t(n[i-1].data,e.data):n[i-1].data===e.data)?(ee.greaterThan(e.stop,n[i-1].stop)?e=new yn({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new yn({start:n[i-1].start,stop:n[i-1].stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:n[i-1].isStopIncluded||e.stop.equals(n[i-1].stop)&&e.isStopIncluded,data:e.data}),n.splice(i-1,1),--i):(o=ee.compare(n[i-1].stop,e.stop),(o>0||o===0&&n[i-1].isStopIncluded&&!e.isStopIncluded)&&n.splice(i,0,new yn({start:e.stop,stop:n[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i-1].isStopIncluded,data:n[i-1].data})),n[i-1]=new yn({start:n[i-1].start,stop:e.start,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:n[i-1].data}))));i<n.length&&(o=ee.compare(e.stop,n[i].start),o>0||o===0&&(e.isStopIncluded||n[i].isStartIncluded));)if(l(t)?t(n[i].data,e.data):n[i].data===e.data)e=new yn({start:e.start,stop:ee.greaterThan(n[i].stop,e.stop)?n[i].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:ee.greaterThan(n[i].stop,e.stop)?n[i].isStopIncluded:e.isStopIncluded,data:e.data}),n.splice(i,1);else if(n[i]=new yn({start:e.stop,stop:n[i].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:n[i].isStopIncluded,data:n[i].data}),n[i].isEmpty)n.splice(i,1);else break;n.splice(i,0,e),this._changedEvent.raiseEvent(this)};Br.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=ar(t,e,zG);n<0&&(n=~n);let i=!1;for(n>0&&(ee.greaterThan(t[n-1].stop,e.start)||t[n-1].stop.equals(e.start)&&t[n-1].isStopIncluded&&e.isStartIncluded)&&(i=!0,(ee.greaterThan(t[n-1].stop,e.stop)||t[n-1].isStopIncluded&&!e.isStopIncluded&&t[n-1].stop.equals(e.stop))&&t.splice(n,0,new yn({start:e.stop,stop:t[n-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n-1].isStopIncluded,data:t[n-1].data})),t[n-1]=new yn({start:t[n-1].start,stop:e.start,isStartIncluded:t[n-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[n-1].data})),n<t.length&&!e.isStartIncluded&&t[n].isStartIncluded&&e.start.equals(t[n].start)&&(i=!0,t.splice(n,0,new yn({start:t[n].start,stop:t[n].start,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data})),++n);n<t.length&&ee.greaterThan(e.stop,t[n].stop);)i=!0,t.splice(n,1);return n<t.length&&e.stop.equals(t[n].stop)&&(i=!0,!e.isStopIncluded&&t[n].isStopIncluded?n+1<t.length&&t[n+1].start.equals(e.stop)&&t[n].data===t[n+1].data?(t.splice(n,1),t[n]=new yn({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new yn({start:e.stop,stop:e.stop,isStartIncluded:!0,isStopIncluded:!0,data:t[n].data}):t.splice(n,1)),n<t.length&&(ee.greaterThan(e.stop,t[n].start)||e.stop.equals(t[n].start)&&e.isStopIncluded&&t[n].isStartIncluded)&&(i=!0,t[n]=new yn({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};Br.prototype.intersect=function(e,t,n){let i=new Br,o=0,r=0,s=this._intervals,a=e._intervals;for(;o<s.length&&r<a.length;){let c=s[o],u=a[r];if(ee.lessThan(c.stop,u.start))++o;else if(ee.lessThan(u.stop,c.start))++r;else{if(l(n)||l(t)&&t(c.data,u.data)||!l(t)&&u.data===c.data){let f=yn.intersect(c,u,new yn,n);f.isEmpty||i.addInterval(f,t)}ee.lessThan(c.stop,u.stop)||c.stop.equals(u.stop)&&!c.isStopIncluded&&u.isStopIncluded?++o:++r}}return i};Br.fromJulianDateArray=function(e,t){l(t)||(t=new Br);let n=e.julianDates,i=n.length,o=e.dataCallback,r=y(e.isStartIncluded,!0),s=y(e.isStopIncluded,!0),a=y(e.leadingInterval,!1),c=y(e.trailingInterval,!1),u,f=0;a&&(++f,u=new yn({start:ze.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u));for(let d=0;d<i-1;++d){let p=n[d],_=n[d+1];u=new yn({start:p,stop:_,isStartIncluded:t.length===f?r:!0,isStopIncluded:d===i-2?s:!1}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u),p=_}return c&&(u=new yn({start:n[i-1],stop:ze.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),u.data=l(o)?o(u,t.length):t.length,t.addInterval(u)),t};var ja=new x_,lw=[0,31,28,31,30,31,30,31,31,30,31,30,31];function UG(e,t,n){l(n)||(n=new ee),ee.toGregorianDate(e,ja);let i=ja.millisecond+t.millisecond,o=ja.second+t.second,r=ja.minute+t.minute,s=ja.hour+t.hour,a=ja.day+t.day,c=ja.month+t.month,u=ja.year+t.year;for(i>=1e3&&(o+=Math.floor(i/1e3),i=i%1e3),o>=60&&(r+=Math.floor(o/60),o=o%60),r>=60&&(s+=Math.floor(r/60),r=r%60),s>=24&&(a+=Math.floor(s/24),s=s%24),lw[2]=C_(u)?29:28;a>lw[c]||c>=13;)a>lw[c]&&(a-=lw[c],++c),c>=13&&(--c,u+=Math.floor(c/12),c=c%12,++c),lw[2]=C_(u)?29:28;return ja.millisecond=i,ja.second=o,ja.minute=r,ja.hour=s,ja.day=a,ja.month=c,ja.year=u,ee.fromGregorianDate(ja,n)}var rLe=new ee,sLe=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function Nne(e,t){if(!l(e)||e.length===0)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,e[0]==="P"){let n=e.match(sLe);if(!l(n))return!1;if(l(n[1])&&(t.year=Number(n[1].replace(",","."))),l(n[2])&&(t.month=Number(n[2].replace(",","."))),l(n[3])&&(t.day=Number(n[3].replace(",","."))*7),l(n[4])&&(t.day+=Number(n[4].replace(",","."))),l(n[5])&&(t.hour=Number(n[5].replace(",","."))),l(n[6])&&(t.minute=Number(n[6].replace(",","."))),l(n[7])){let i=Number(n[7].replace(",","."));t.second=Math.floor(i),t.millisecond=i%1*1e3}}else e[e.length-1]!=="Z"&&(e+="Z"),ee.toGregorianDate(ee.fromIso8601(e,rLe),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var uw=new x_;Br.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=ee.fromIso8601(n[0]),o=ee.fromIso8601(n[1]),r=[];if(!Nne(n[2],uw))r.push(i,o);else{let s=ee.clone(i);for(r.push(s);ee.compare(s,o)<0;)s=UG(s,uw),ee.compare(o,s)<=0&&ee.clone(o,s),r.push(s)}return Br.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Br.fromIso8601DateArray=function(e,t){return Br.fromJulianDateArray({julianDates:e.iso8601Dates.map(function(n){return ee.fromIso8601(n)}),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};Br.fromIso8601DurationArray=function(e,t){let n=e.epoch,i=e.iso8601Durations,o=y(e.relativeToPrevious,!1),r=[],s,a,c=i.length;for(let u=0;u<c;++u)(Nne(i[u],uw)||u===0)&&(o&&l(a)?s=UG(a,uw):s=UG(n,uw),r.push(s),a=s);return Br.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var qr=Br;var aLe=new h(1,1,1),cLe=h.ZERO,lLe=Me.IDENTITY;function Fne(e,t,n){this.translation=h.clone(y(e,cLe)),this.rotation=Me.clone(y(t,lLe)),this.scale=h.clone(y(n,aLe))}Fne.prototype.equals=function(e){return this===e||l(e)&&h.equals(this.translation,e.translation)&&Me.equals(this.rotation,e.rotation)&&h.equals(this.scale,e.scale)};var rp=Fne;function Hy(e){e=y(e,y.EMPTY_OBJECT),this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=y(e.epoch,ze.MINIMUM_VALUE),this.tolerance=y(e.tolerance,1),this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(Hy.prototype,{clock:{get:function(){return this._clock},set:function(e){let t=this._clock;t!==e&&(l(t)&&(this._clockSubscription(),this._clockSubscription=void 0),l(e)&&(this._clockSubscription=e.onTick.addEventListener(Hy.prototype._onTick,this)),this._clock=e)}},element:{get:function(){return this._element},set:function(e){let t=this._element;t!==e&&(l(t)&&t.removeEventListener("seeked",this._seekFunction,!1),l(e)&&(this._seeking=!1,this._seekFunction=uLe(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});Hy.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,ue(this)};Hy.prototype.isDestroyed=function(){return!1};Hy.prototype._trySetPlaybackRate=function(e){if(this._lastPlaybackRate===e.multiplier)return;let t=this._element;try{t.playbackRate=e.multiplier}catch{t.playbackRate=0}this._lastPlaybackRate=e.multiplier};Hy.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=y(this.epoch,ze.MINIMUM_VALUE),s=ee.secondsDifference(o,r),a=t.duration,c,u=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),c=s):s>a?c=a:s<0?c=0:c=s;let f=i?y(this.tolerance,1):.001;Math.abs(c-u)>f&&(this._seeking=!0,t.currentTime=c)};function uLe(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var Vne=Hy;function fLe(e,t){this.rectangle=e,this.maxLevel=t}function gT(e){e=y(e,y.EMPTY_OBJECT);let t=De.createIfNeeded(e.url);this._resource=t,this._errorEvent=new _e,this._ready=!1,this._terrainDataStructure={heightScale:1/1e3,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0,lowestEncodedHeight:0,highestEncodedHeight:256*256*256-1};let n=e.credit;typeof n=="string"&&(n=new Ht(n)),this._credit=n,this._tilingScheme=void 0,this._rectangles=[];let i=this,o,r=y(e.ellipsoid,re.WGS84);function s(u){let f=u.getElementsByTagName("SRS")[0].textContent;if(f==="EPSG:4326")i._tilingScheme=new Xi({ellipsoid:r});else return Promise.reject(new fe(`SRS ${f} is not supported.`));let d=u.getElementsByTagName("TileFormat")[0];i._heightmapWidth=parseInt(d.getAttribute("width"),10),i._heightmapHeight=parseInt(d.getAttribute("height"),10),i._levelZeroMaximumGeometricError=es.getEstimatedLevelZeroGeometricErrorForAHeightmap(r,Math.min(i._heightmapWidth,i._heightmapHeight),i._tilingScheme.getNumberOfXTilesAtLevel(0));let p=u.getElementsByTagName("DataExtent");for(let _=0;_<p.length;++_){let m=p[_],x=R.toRadians(parseFloat(m.getAttribute("minx"))),C=R.toRadians(parseFloat(m.getAttribute("miny"))),A=R.toRadians(parseFloat(m.getAttribute("maxx"))),T=R.toRadians(parseFloat(m.getAttribute("maxy"))),b=parseInt(m.getAttribute("maxlevel"),10);i._rectangles.push(new fLe(new de(x,C,A,T),b))}return i._ready=!0,Promise.resolve(!0)}function a(u){let f=y(l(u)?u.message:void 0,`An error occurred while accessing ${i._resource.url}.`);return o=Gn.reportError(o,i,i._errorEvent,f),o.retry?c():Promise.reject(new fe(f))}function c(){return i._resource.fetchXML().then(s).catch(a)}this._readyPromise=c()}Object.defineProperties(gT.prototype,{errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},tilingScheme:{get:function(){return this._tilingScheme}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});gT.prototype.requestTileGeometry=function(e,t,n,i){let o=this._tilingScheme.getNumberOfYTilesAtLevel(n),s=this._resource.getDerivedResource({url:`${n}/${e}/${o-t-1}.tif`,queryParameters:{cesium:!0},request:i}).fetchImage({preferImageBitmap:!0});if(!l(s))return;let a=this;return Promise.resolve(s).then(function(c){return new ka({buffer:ch(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:dLe(a,e,t,n),structure:a._terrainDataStructure})})};gT.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var kne=new de;function dLe(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<r.length&&a!==15;++c){let u=r[c];if(u.maxLevel<=i)continue;let f=u.rectangle,d=de.intersection(f,s,kne);l(d)&&(KO(o,f,t*2,n*2,i+1)&&(a|=4),KO(o,f,t*2+1,n*2,i+1)&&(a|=8),KO(o,f,t*2,n*2+1,i+1)&&(a|=1),KO(o,f,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function KO(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(de.intersection(r,t,kne))}gT.prototype.getTileDataAvailable=function(e,t,n){};gT.prototype.loadTileDataAvailability=function(e,t,n){};var Une=gT;var hLe={VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033},zne=Object.freeze(hLe);var Hne={};function mLe(e,t){return R.equalsEpsilon(e.latitude,t.latitude,R.EPSILON10)&&R.equalsEpsilon(e.longitude,t.longitude,R.EPSILON10)}var pLe=new me,_Le=new me;function gLe(e,t,n,i){t=So(t,h.equalsEpsilon);let o=t.length;if(o<2)return;let r=l(i),s=l(n),a=new Array(o),c=new Array(o),u=new Array(o),f=t[0];a[0]=f;let d=e.cartesianToCartographic(f,pLe);s&&(d.height=n[0]),c[0]=d.height,r?u[0]=i[0]:u[0]=0;let p=c[0],_=u[0],m=p===_,x=1;for(let C=1;C<o;++C){let A=t[C],T=e.cartesianToCartographic(A,_Le);s&&(T.height=n[C]),m=m&&T.height===0,mLe(d,T)?d.height<T.height&&(c[x-1]=T.height):(a[x]=A,c[x]=T.height,r?u[x]=i[C]:u[x]=0,m=m&&c[x]===u[x],me.clone(T,d),++x)}if(!(m||x<2))return a.length=x,c.length=x,u.length=x,{positions:a,topHeights:c,bottomHeights:u}}var yLe=new Array(2),xLe=new Array(2),CLe={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};Hne.computePositions=function(e,t,n,i,o,r){let s=gLe(e,t,n,i);if(!l(s))return;t=s.positions,n=s.topHeights,i=s.bottomHeights;let a=t.length,c=a-2,u,f,d=R.chordLength(o,e.maximumRadius),p=CLe;if(p.minDistance=d,p.ellipsoid=e,r){let _=0,m;for(m=0;m<a-1;m++)_+=Oi.numberOfPoints(t[m],t[m+1],d)+1;u=new Float64Array(_*3),f=new Float64Array(_*3);let x=yLe,C=xLe;p.positions=x,p.height=C;let A=0;for(m=0;m<a-1;m++){x[0]=t[m],x[1]=t[m+1],C[0]=n[m],C[1]=n[m+1];let T=Oi.generateArc(p);u.set(T,A),C[0]=i[m],C[1]=i[m+1],f.set(Oi.generateArc(p),A),A+=T.length}}else p.positions=t,p.height=n,u=new Float64Array(Oi.generateArc(p)),p.height=i,f=new Float64Array(Oi.generateArc(p));return{bottomPositions:f,topPositions:u,numCorners:c}};var yT=Hne;var HG=new h,$O=new h,ALe=new h,Gne=new h,TLe=new h,bLe=new h,ELe=new h;function Gy(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=y(e.vertexFormat,Pe.DEFAULT),r=y(e.granularity,R.RADIANS_PER_DEGREE),s=y(e.ellipsoid,re.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Pe.clone(o),this._granularity=r,this._ellipsoid=re.clone(s),this._workerName="createWallGeometry";let a=1+t.length*h.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+re.packedLength+Pe.packedLength+1}Gy.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return re.pack(e._ellipsoid,t,n),n+=re.packedLength,Pe.pack(e._vertexFormat,t,n),n+=Pe.packedLength,t[n]=e._granularity,t};var Wne=re.clone(re.UNIT_SPHERE),jne=new Pe,fw={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Wne,vertexFormat:jne,granularity:void 0};Gy.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=re.unpack(e,t,Wne);t+=re.packedLength;let u=Pe.unpack(e,t,jne);t+=Pe.packedLength;let f=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=re.clone(c,n._ellipsoid),n._vertexFormat=Pe.clone(u,n._vertexFormat),n._granularity=f,n):(fw.positions=r,fw.minimumHeights=s,fw.maximumHeights=a,fw.granularity=f,new Gy(fw))};Gy.fromConstantHeights=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=o),a&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat};return new Gy(c)};Gy.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=yT.computePositions(s,t,i,n,r,!0);if(!l(a))return;let c=a.bottomPositions,u=a.topPositions,f=a.numCorners,d=u.length,p=d*2,_=o.position?new Float64Array(p):void 0,m=o.normal?new Float32Array(p):void 0,x=o.tangent?new Float32Array(p):void 0,C=o.bitangent?new Float32Array(p):void 0,A=o.st?new Float32Array(p/3*2):void 0,T=0,b=0,S=0,w=0,D=0,O=ELe,I=bLe,L=TLe,N=!0;d/=3;let g,E=0,v=1/(d-f-1);for(g=0;g<d;++g){let k=g*3,H=h.fromArray(u,k,HG),F=h.fromArray(c,k,$O);if(o.position&&(_[T++]=F.x,_[T++]=F.y,_[T++]=F.z,_[T++]=H.x,_[T++]=H.y,_[T++]=H.z),o.st&&(A[D++]=E,A[D++]=0,A[D++]=E,A[D++]=1),o.normal||o.tangent||o.bitangent){let Y=h.clone(h.ZERO,Gne),j=h.subtract(H,s.geodeticSurfaceNormal(H,$O),$O);if(g+1<d&&(Y=h.fromArray(u,k+3,Gne)),N){let X=h.subtract(Y,H,ALe),W=h.subtract(j,H,HG);O=h.normalize(h.cross(W,X,O),O),N=!1}h.equalsEpsilon(H,Y,R.EPSILON10)?N=!0:(E+=v,o.tangent&&(I=h.normalize(h.subtract(Y,H,I),I)),o.bitangent&&(L=h.normalize(h.cross(O,I,L),L))),o.normal&&(m[b++]=O.x,m[b++]=O.y,m[b++]=O.z,m[b++]=O.x,m[b++]=O.y,m[b++]=O.z),o.tangent&&(x[w++]=I.x,x[w++]=I.y,x[w++]=I.z,x[w++]=I.x,x[w++]=I.y,x[w++]=I.z),o.bitangent&&(C[S++]=L.x,C[S++]=L.y,C[S++]=L.z,C[S++]=L.x,C[S++]=L.y,C[S++]=L.z)}}let P=new ln;o.position&&(P.position=new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_})),o.normal&&(P.normal=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:m})),o.tangent&&(P.tangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:x})),o.bitangent&&(P.bitangent=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:C})),o.st&&(P.st=new Ee({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:A}));let M=p/3;p-=6*(f+1);let V=Ne.createTypedArray(M,p),U=0;for(g=0;g<M-2;g+=2){let k=g,H=g+2,F=h.fromArray(_,k*3,HG),Y=h.fromArray(_,H*3,$O);if(h.equalsEpsilon(F,Y,R.EPSILON10))continue;let j=g+1,X=g+3;V[U++]=j,V[U++]=k,V[U++]=X,V[U++]=X,V[U++]=k,V[U++]=H}return new ct({attributes:P,indices:V,primitiveType:Le.TRIANGLES,boundingSphere:new oe.fromVertices(_)})};var ZO=Gy;var qne=new h,Yne=new h;function Wy(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=y(e.granularity,R.RADIANS_PER_DEGREE),r=y(e.ellipsoid,re.WGS84);this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=re.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*h.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+re.packedLength+1}Wy.pack=function(e,t,n){n=y(n,0);let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=h.packedLength)h.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return re.pack(e._ellipsoid,t,n),n+=re.packedLength,t[n]=e._granularity,t};var Xne=re.clone(re.UNIT_SPHERE),dw={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:Xne,granularity:void 0};Wy.unpack=function(e,t,n){t=y(t,0);let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=h.packedLength)r[i]=h.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=re.unpack(e,t,Xne);t+=re.packedLength;let u=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=re.clone(c,n._ellipsoid),n._granularity=u,n):(dw.positions=r,dw.minimumHeights=s,dw.maximumHeights=a,dw.granularity=u,new Wy(dw))};Wy.fromConstantHeights=function(e){e=y(e,y.EMPTY_OBJECT);let t=e.positions,n,i,o=e.minimumHeight,r=e.maximumHeight,s=l(o),a=l(r);if(s||a){let u=t.length;n=s?new Array(u):void 0,i=a?new Array(u):void 0;for(let f=0;f<u;++f)s&&(n[f]=o),a&&(i[f]=r)}let c={positions:t,maximumHeights:i,minimumHeights:n,ellipsoid:e.ellipsoid};return new Wy(c)};Wy.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=yT.computePositions(r,t,i,n,o,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,u=c.length,f=u*2,d=new Float64Array(f),p=0;u/=3;let _;for(_=0;_<u;++_){let T=_*3,b=h.fromArray(c,T,qne),S=h.fromArray(a,T,Yne);d[p++]=S.x,d[p++]=S.y,d[p++]=S.z,d[p++]=b.x,d[p++]=b.y,d[p++]=b.z}let m=new ln({position:new Ee({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})}),x=f/3;f=2*x-4+x;let C=Ne.createTypedArray(x,f),A=0;for(_=0;_<x-2;_+=2){let T=_,b=_+2,S=h.fromArray(d,T*3,qne),w=h.fromArray(d,b*3,Yne);if(h.equalsEpsilon(S,w,R.EPSILON10))continue;let D=_+1,O=_+3;C[A++]=D,C[A++]=T,C[A++]=D,C[A++]=O,C[A++]=T,C[A++]=b}return C[A++]=x-2,C[A++]=x-1,new ct({attributes:m,indices:C,primitiveType:Le.LINES,boundingSphere:new oe.fromVertices(d)})};var JO=Wy;function SLe(e){switch(e){case Z.FLOAT:return"float";case Z.FLOAT_VEC2:return"vec2";case Z.FLOAT_VEC3:return"vec3";case Z.FLOAT_VEC4:return"vec4";case Z.FLOAT_MAT2:return"mat2";case Z.FLOAT_MAT3:return"mat3";case Z.FLOAT_MAT4:return"mat4";case Z.SAMPLER_2D:return"sampler2D";case Z.BOOL:return"bool"}}var cg=SLe;var GG={};function wLe(e){let t=Ne.createTypedArray(e,e*2),n=e,i=0;for(let o=0;o<n;o+=3)t[i++]=o,t[i++]=o+1,t[i++]=o+1,t[i++]=o+2,t[i++]=o+2,t[i++]=o;return t}function vLe(e,t){let n=t.length,i=Ne.createTypedArray(e,n*2),o=0;for(let r=0;r<n;r+=3){let s=t[r],a=t[r+1],c=t[r+2];i[o++]=s,i[o++]=a,i[o++]=a,i[o++]=c,i[o++]=c,i[o++]=s}return i}function DLe(e){let t=e-2,n=2+t*4,i=Ne.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=r;return i}function PLe(e,t){let i=t.length-2,o=2+i*4,r=Ne.createTypedArray(e,o),s=0;r[s++]=t[0],r[s++]=t[1];for(let a=0;a<i;a++){let c=t[a],u=t[a+1],f=t[a+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=c}return r}function ILe(e){let t=e-2,n=2+t*4,i=Ne.createTypedArray(e,n),o=0;i[o++]=0,i[o++]=1;for(let r=0;r<t;r++)i[o++]=r+1,i[o++]=r+2,i[o++]=r+2,i[o++]=0;return i}function OLe(e,t){let i=t.length-2,o=2+i*4,r=Ne.createTypedArray(e,o),s=0,a=t[0];r[s++]=a,r[s++]=t[1];for(let c=0;c<i;c++){let u=t[c+1],f=t[c+2];r[s++]=u,r[s++]=f,r[s++]=f,r[s++]=a}return r}GG.createWireframeIndices=function(e,t,n){let i=l(n);if(e===Le.TRIANGLES)return i?vLe(t,n):wLe(t);if(e===Le.TRIANGLE_STRIP)return i?PLe(t,n):DLe(t);if(e===Le.TRIANGLE_FAN)return i?OLe(t,n):ILe(t)};GG.getWireframeIndicesCount=function(e,t){if(e===Le.TRIANGLES)return t*2;if(e===Le.TRIANGLE_STRIP||e===Le.TRIANGLE_FAN){let n=t-2;return 2+n*4}return t};var hw=GG;function RLe(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var QO=RLe;function lg(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new _e,this.setValue(e)}Object.defineProperties(lg.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});lg.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};lg.prototype.setValue=function(e){let t=this._value;if(t!==e){let n=l(e),i=n&&typeof e.clone=="function",o=n&&typeof e.equals=="function";(!o||!e.equals(t))&&(this._hasClone=i,this._hasEquals=o,this._value=i?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}};lg.prototype.equals=function(e){return this===e||e instanceof lg&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};lg.prototype.valueOf=function(){return this._value};lg.prototype.toString=function(){return String(this._value)};var Xn=lg;function MLe(e,t,n,i,o){return{configurable:i,get:function(){return this[t]},set:function(r){let s=this[t],a=this[n];l(a)&&(a(),this[n]=void 0),r!==void 0&&(!l(r)||!l(r.getValue))&&l(o)&&(r=o(r)),s!==r&&(this[t]=r,this._definitionChanged.raiseEvent(this,e,r,s)),l(r)&&l(r.definitionChanged)&&(this[n]=r.definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this,e,r,r)},this))}}}function BLe(e){return new Xn(e)}function LLe(e,t,n){return MLe(e,`_${e.toString()}`,`_${e.toString()}Subscription`,y(t,!1),y(n,BLe))}var le=LLe;function mw(e){this._definitionChanged=new _e,this._show=void 0,this._showSubscription=void 0,this._image=void 0,this._imageSubscription=void 0,this._scale=void 0,this._scaleSubscription=void 0,this._pixelOffset=void 0,this._pixelOffsetSubscription=void 0,this._eyeOffset=void 0,this._eyeOffsetSubscription=void 0,this._horizontalOrigin=void 0,this._horizontalOriginSubscription=void 0,this._verticalOrigin=void 0,this._verticalOriginSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._color=void 0,this._colorSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._alignedAxis=void 0,this._alignedAxisSubscription=void 0,this._sizeInMeters=void 0,this._sizeInMetersSubscription=void 0,this._width=void 0,this._widthSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._scaleByDistance=void 0,this._scaleByDistanceSubscription=void 0,this._translucencyByDistance=void 0,this._translucencyByDistanceSubscription=void 0,this._pixelOffsetScaleByDistance=void 0,this._pixelOffsetScaleByDistanceSubscription=void 0,this._imageSubRegion=void 0,this._imageSubRegionSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._disableDepthTestDistance=void 0,this._disableDepthTestDistanceSubscription=void 0,this.merge(y(e,y.EMPTY_OBJECT))}Object.defineProperties(mw.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:le("show"),image:le("image"),scale:le("scale"),pixelOffset:le("pixelOffset"),eyeOffset:le("eyeOffset"),horizontalOrigin:le("horizontalOrigin"),verticalOrigin:le("verticalOrigin"),heightReference:le("heightReference"),color:le("color"),rotation:le("rotation"),alignedAxis:le("alignedAxis"),sizeInMeters:le("sizeInMeters"),width:le("width"),height:le("height"),scaleByDistance:le("scaleByDistance"),translucencyByDistance:le("translucencyByDistance"),pixelOffsetScaleByDistance:le("pixelOffsetScaleByDistance"),imageSubRegion:le("imageSubRegion"),distanceDisplayCondition:le("distanceDisplayCondition"),disableDepthTestDistance:le("disableDepthTestDistance")});mw.prototype.clone=function(e){return l(e)?(e.show=this._show,e.image=this._image,e.scale=this._scale,e.pixelOffset=this._pixelOffset,e.eyeOffset=this._eyeOffset,e.horizontalOrigin=this._horizontalOrigin,e.verticalOrigin=this._verticalOrigin,e.heightReference=this._heightReference,e.color=this._color,e.rotation=this._rotation,e.alignedAxis=this._alignedAxis,e.sizeInMeters=this._sizeInMeters,e.width=this._width,e.height=this._height,e.scaleByDistance=this._scaleByDistance,e.translucencyByDistance=this._translucencyByDistance,e.pixelOffsetScaleByDistance=this._pixelOffsetScaleByDistance,e.imageSubRegion=this._imageSubRegion,e.distanceDisplayCondition=this._distanceDisplayCondition,e.disableDepthTestDistance=this._disableDepthTestDistance,e):new mw(this)};mw.prototype.merge=function(e){this.show=y(this._show,e.show),this.image=y(this._image,e.image),this.scale=y(this._scale,e.scale),this.pixelOffset=y(this._pixelOffset,e.pixelOffset),this.eyeOffset=y(this._eyeOffset,e.eyeOffset),this.horizontalOrigin=y(this._horizontalOrigin,e.horizontalOrigin),this.verticalOrigin=y(this._verticalOrigin,e.verticalOrigin),this.heightReference=y(this._heightReference,e.heightReference),this.color=y(this._color,e.color),this.rotation=y(this._rotation,e.rotation),this.alignedAxis=y(this._alignedAxis,e.alignedAxis),this.sizeInMeters=y(this._sizeInMeters,e.sizeInMeters),this.width=y(this._width,e.width),this.height=y(this._height,e.height),this.scaleByDistance=y(this._scaleByDistance,e.scaleByDistance),this.translucencyByDistance=y(this._translucencyByDistance,e.translucencyByDistance),this.pixelOffsetScaleByDistance=y(this._pixelOffsetScaleByDistance,e.pixelOffsetScaleByDistance),this.imageSubRegion=y(this._imageSubRegion,e.imageSubRegion),this.distanceDisplayCondition=y(this._distanceDisplayCondition,e.distanceDisplayCondition),this.disableDepthTestDistance=y(this._disableDepthTestDistance,e.disableDepthTestDistance)};var Ec=mw;var NLe={NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2},He=Object.freeze(NLe);var FLe={CENTER:0,LEFT:1,RIGHT:-1},di=Object.freeze(FLe);var VLe={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1},wn=Object.freeze(VLe);var kLe={DONE:0,PENDING:1,FAILED:2},lt=Object.freeze(kLe);function ad(){ye.throwInstantiationError()}Object.defineProperties(ad.prototype,{isConstant:{get:ye.throwInstantiationError},definitionChanged:{get:ye.throwInstantiationError}});ad.prototype.getValue=ye.throwInstantiationError;ad.prototype.equals=ye.throwInstantiationError;ad.equals=function(e,t){return e===t||l(e)&&e.equals(t)};ad.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!ad.equals(e[i],t[i]))return!1;return!0};ad.isConstant=function(e){return!l(e)||e.isConstant};ad.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};ad.getValueOrDefault=function(e,t,n,i){return l(e)?y(e.getValue(t,i),n):n};ad.getValueOrClonedDefault=function(e,t,n,i){let o;return l(e)&&(o=e.getValue(t,i)),l(o)||(o=n.clone(o)),o};var q=ad;var ULe=z.WHITE,zLe=h.ZERO,HLe=He.NONE,GLe=G.ZERO,WLe=1,jLe=0,qLe=h.ZERO,YLe=di.CENTER,XLe=wn.CENTER,KLe=!1,$Le=new h,ZLe=new z,JLe=new h,QLe=new G,eNe=new wt,tNe=new wt,nNe=new wt,iNe=new qe,oNe=new Tt;function Kne(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function ug(e,t){t.collectionChanged.addEventListener(ug.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new gt,this._onCollectionChanged(t,t.values,[],[])}ug.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._billboard,c,u=r.billboard,f=s.isShowing&&s.isAvailable(e)&&q.getValueOrDefault(a._show,e,!0),d;if(f&&(d=q.getValueOrUndefined(s._position,e,$Le),c=q.getValueOrUndefined(a._image,e),f=l(d)&&l(c)),!f){WG(r,s,n);continue}q.isConstant(s._position)||(n._clusterDirty=!0),l(u)||(u=n.getBillboard(s),u.id=s,u.image=void 0,r.billboard=u),u.show=f,(!l(u.image)||r.textureValue!==c)&&(u.image=c,r.textureValue=c),u.position=d,u.color=q.getValueOrDefault(a._color,e,ULe,ZLe),u.eyeOffset=q.getValueOrDefault(a._eyeOffset,e,zLe,JLe),u.heightReference=q.getValueOrDefault(a._heightReference,e,HLe),u.pixelOffset=q.getValueOrDefault(a._pixelOffset,e,GLe,QLe),u.scale=q.getValueOrDefault(a._scale,e,WLe),u.rotation=q.getValueOrDefault(a._rotation,e,jLe),u.alignedAxis=q.getValueOrDefault(a._alignedAxis,e,qLe),u.horizontalOrigin=q.getValueOrDefault(a._horizontalOrigin,e,YLe),u.verticalOrigin=q.getValueOrDefault(a._verticalOrigin,e,XLe),u.width=q.getValueOrUndefined(a._width,e),u.height=q.getValueOrUndefined(a._height,e),u.scaleByDistance=q.getValueOrUndefined(a._scaleByDistance,e,eNe),u.translucencyByDistance=q.getValueOrUndefined(a._translucencyByDistance,e,tNe),u.pixelOffsetScaleByDistance=q.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,nNe),u.sizeInMeters=q.getValueOrDefault(a._sizeInMeters,e,KLe),u.distanceDisplayCondition=q.getValueOrUndefined(a._distanceDisplayCondition,e,oNe),u.disableDepthTestDistance=q.getValueOrUndefined(a._disableDepthTestDistance,e);let p=q.getValueOrUndefined(a._imageSubRegion,e,iNe);l(p)&&u.setImageSubRegion(u._imageId,p)}return!0};ug.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return lt.FAILED;let i=n.billboard;if(i.heightReference===He.NONE)t.center=h.clone(i.position,t.center);else{if(!l(i._clampedPosition))return lt.PENDING;t.center=h.clone(i._clampedPosition,t.center)}return t.radius=0,lt.DONE};ug.prototype.isDestroyed=function(){return!1};ug.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ug.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return ue(this)};ug.prototype._onCollectionChanged=function(e,t,n,i){let o,r,s=this._items,a=this._cluster;for(o=t.length-1;o>-1;o--)r=t[o],l(r._billboard)&&l(r._position)&&s.set(r.id,new Kne(r));for(o=i.length-1;o>-1;o--)r=i[o],l(r._billboard)&&l(r._position)?s.contains(r.id)||s.set(r.id,new Kne(r)):(WG(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],WG(s.get(r.id),r,a),s.remove(r.id)};function WG(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var eR=ug;var tR=`varying vec3 v_positionEC;
|
|
103
103
|
varying vec3 v_normalEC;
|
|
104
104
|
varying vec3 v_tangentEC;
|
|
105
105
|
varying vec3 v_bitangentEC;
|
|
@@ -4197,7 +4197,7 @@ void main()
|
|
|
4197
4197
|
{
|
|
4198
4198
|
gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
|
|
4199
4199
|
}
|
|
4200
|
-
`;var ix=Zc(fre()
|
|
4200
|
+
`;var ix=Zc(fre());var Rke={VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18},dt=Object.freeze(Rke);function ud(e,t){this._expression=e,e=jke(e,t),e=Yke(qke(e)),ix.default.addBinaryOp("=~",0),ix.default.addBinaryOp("!~",0);let n;try{n=(0,ix.default)(e)}catch(i){throw new fe(i)}this._runtimeAst=mi(this,n)}Object.defineProperties(ud.prototype,{expression:{get:function(){return this._expression}}});var En={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new G],cartesian3Array:[new h],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new G),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new h),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};ud.prototype.evaluate=function(e,t){En.reset();let n=this._runtimeAst.evaluate(e);return t instanceof z&&n instanceof se?z.fromCartesian4(n,t):n instanceof G||n instanceof h||n instanceof se?n.clone(t):n};ud.prototype.evaluateColor=function(e,t){En.reset();let n=this._runtimeAst.evaluate(e);return z.fromCartesian4(n,t)};ud.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}
|
|
4201
4201
|
{
|
|
4202
4202
|
return ${o};
|
|
4203
4203
|
}
|
|
@@ -5058,9 +5058,9 @@ void main()
|
|
|
5058
5058
|
{
|
|
5059
5059
|
gl_FragColor = texture2D(billboard_texture, v_textureCoordinates);
|
|
5060
5060
|
}
|
|
5061
|
-
`,i=t.createViewportQuadCommand(n,{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Ce.OVERLAY,i}var D6e=[];lf.prototype.update=function(e){if(g9(this),!this.show)return;let t=this._billboards,n=t.length,i=e.context;this._instanced=i.instancedArrays,To=this._instanced?m6e:h6e,u9=this._instanced?_6e:p6e;let o=this._textureAtlas;if(!l(o)){o=this._textureAtlas=new hx({context:i});for(let I=0;I<n;++I)t[I]._loadImage()}let r=o.textureCoordinates;if(r.length===0)return;S6e(this,e),t=this._billboards,n=t.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,c=this._propertiesChanged,u=o.guid,f=this._createVertexArray||this._textureAtlasGUID!==u;this._textureAtlasGUID=u;let d,p=e.passes,_=p.pick;if(f||!_&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let I=0;I<_9;++I)c[I]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=y6e(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),d=this._vaf.writers;for(let I=0;I<n;++I){let L=this._billboards[I];L._dirty=!1,E6e(this,e,r,d,L)}this._vaf.commit(u9(i))}this._billboardsToUpdateIndex=0}else if(a>0){let I=D6e;I.length=0,(c[dv]||c[l6e]||c[c6e])&&I.push(Uae),(c[fv]||c[Oae]||c[s6e]||c[a6e]||c[r6e])&&(I.push(qae),this._instanced&&I.push(p9)),(c[fv]||c[u6e]||c[Lae])&&(I.push(Yae),I.push(m9)),(c[fv]||c[Mae])&&I.push(m9),c[Rae]&&I.push(p9),c[Bae]&&I.push(Xae),c[Nae]&&I.push(Kae),(c[Fae]||c[f6e]||c[fv]||c[dv])&&I.push($ae),(c[fv]||c[dv])&&I.push(Zae),c[Vae]&&I.push(Jae);let L=I.length;if(d=this._vaf.writers,a/n>.1){for(let N=0;N<a;++N){let g=s[N];g._dirty=!1;for(let E=0;E<L;++E)I[E](this,e,r,d,g)}this._vaf.commit(u9(i))}else{for(let N=0;N<a;++N){let g=s[N];g._dirty=!1;for(let E=0;E<L;++E)I[E](this,e,r,d,g);this._instanced?this._vaf.subCommit(g._index,1):this._vaf.subCommit(g._index*4,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>n*1.5&&(s.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,oe.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,x=B.IDENTITY;e.mode===te.SCENE3D?(x=this.modelMatrix,m=oe.clone(this._baseVolumeWC,this._boundingVolume)):m=oe.clone(this._baseVolume2D,this._boundingVolume),w6e(this,e,m);let C=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,C){this._blendOption===Oo.OPAQUE||this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ue.fromCache({depthTest:{enabled:!0,func:Z.LESS},depthMask:!0}):this._rsOpaque=void 0;let I=this._blendOption===Oo.TRANSLUCENT;this._blendOption===Oo.TRANSLUCENT||this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ue.fromCache({depthTest:{enabled:!0,func:I?Z.LEQUAL:Z.LESS},depthMask:I,blending:un.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let A,T,b,S,w,D=Rt.maximumVertexTextureImageUnits>0;if(C||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){A=UN,T=kN,w=[],l(this._batchTable)&&(w.push("VECTOR_TILE"),A=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(A),T=this._batchTable.getFragmentShaderCallback(!1,void 0)(T)),b=new Ve({defines:w,sources:[A]}),this._instanced&&b.defines.push("INSTANCED"),this._shaderRotation&&b.defines.push("ROTATION"),this._shaderAlignedAxis&&b.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&b.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&b.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&b.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&b.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&b.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(D?b.defines.push("VERTEX_DEPTH_CHECK"):b.defines.push("FRAGMENT_DEPTH_CHECK"));let I=1-Ys.CUTOFF;this._sdf&&b.defines.push("SDF");let L=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT&&(S=new Ve({defines:["OPAQUE",L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._sp=Gt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To}),S=new Ve({defines:["TRANSLUCENT",L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._spTranslucent=Gt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To})),this._blendOption===Oo.OPAQUE&&(S=new Ve({defines:[L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._sp=Gt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To})),this._blendOption===Oo.TRANSLUCENT&&(S=new Ve({defines:[L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._spTranslucent=Gt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let O=e.commandList;if(p.render||p.pick){let I=this._colorCommands,L=this._blendOption===Oo.OPAQUE,N=this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT,g=this._vaf.va,E=g.length,v=this._uniforms,P;l(this._batchTable)?(v=this._batchTable.getUniformMapCallback()(v),P=this._batchTable.getPickId()):P="v_pickColor",I.length=E;let M=N?E*2:E;for(let V=0;V<M;++V){let U=I[V];l(U)||(U=I[V]=new et);let k=L||N&&V%2===0;U.pass=k||!N?Ce.OPAQUE:Ce.TRANSLUCENT,U.owner=this;let H=N?Math.floor(V/2):V;U.boundingVolume=m,U.modelMatrix=x,U.count=g[H].indicesCount,U.shaderProgram=k?this._sp:this._spTranslucent,U.uniformMap=v,U.vertexArray=g[H].va,U.renderState=k?this._rsOpaque:this._rsTranslucent,U.debugShowBoundingVolume=this.debugShowBoundingVolume,U.pickId=P,this._instanced&&(U.count=6,U.instanceCount=n),O.push(U)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=v6e(this,e.context)),O.push(this.debugCommand))}};lf.prototype.isDestroyed=function(){return!1};lf.prototype.destroy=function(){return l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),kae(this._billboards),ue(this)};var uf=lf;function P6e(e,t,n,i,o){return function(){let r=document.createElement("canvas"),s=o+2*i;r.height=r.width=s;let a=r.getContext("2d");return a.clearRect(0,0,s,s),i!==0&&(a.beginPath(),a.arc(s/2,s/2,s/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=n,a.fill(),e<1&&(a.save(),a.globalCompositeOperation="destination-out",a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),r}}var lb=P6e;function Ps(e,t,n,i,o){this._content=e,this._billboard=n,this._label=i,this._polyline=o,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),ub(this)}var I6e=new me;Object.defineProperties(Ps.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=z.clone(e,this._color),ub(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,ub(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=z.clone(e,this._pointOutlineColor),ub(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,ub(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){l(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=y(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,I6e);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=z.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&ub(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});Ps.defaultColor=z.WHITE;Ps.defaultPointOutlineColor=z.BLACK;Ps.defaultPointOutlineWidth=0;Ps.defaultPointSize=8;function ub(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=y(e._color,Ps.defaultColor),i=y(e._pointOutlineColor,Ps.defaultPointOutlineColor),o=y(e._pointOutlineWidth,Ps.defaultPointOutlineWidth),r=y(e._pointSize,Ps.defaultPointSize),s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,u=e._billboardSize;if(z.equals(n,s)&&z.equals(i,a)&&o===c&&r===u)return;e._billboardColor=z.clone(n,e._billboardColor),e._billboardOutlineColor=z.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let f=n.alpha,d=n.toCssColorString(),p=i.toCssColorString(),_=JSON.stringify([d,r,p,o]);t.setImage(_,lb(f,d,p,o,r))}Ps.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};Ps.prototype.getPropertyNames=function(e){return ci("Cesium3DTilePointFeature.getPropertyNames","Cesium3DTilePointFeature.getPropertyNames is deprecated in CesiumJS 1.95, and will be removed in 1.98. Use Cesium3DTilePointFeature.getPropertyIds instead"),this._content.batchTable.getPropertyIds(this._batchId,e)};Ps.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};Ps.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};Ps.prototype.getPropertyInherited=function(e){return br.getPropertyInherited(this._content,this._batchId,e)};Ps.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};Ps.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};Ps.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};Ps.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var kg=Ps;var mv=Zc(oce(),1);var B6e={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},$o=Object.freeze(B6e);var rce={},sce=0,L6e=256,N6e=new z(.165,.165,.165,.8),F6e=new G(7,5),as=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function mx(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function pv(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function _v(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function cce(e){let t=rce[e._font];if(!l(t)){let n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(_v(n,"line-height"));isNaN(i)&&(i=void 0),t={family:_v(n,"font-family"),size:_v(n,"font-size").replace("px",""),style:_v(n,"font-style"),weight:_v(n,"font-weight"),lineHeight:i},document.body.removeChild(n),sce<L6e&&(rce[e._font]=t,sce++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function Rp(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=wt.clone(n)),l(i)&&(i=wt.clone(i)),l(o)&&(o=wt.clone(o)),l(r)&&(r=Tt.clone(r)),this._renderedText=void 0,this._text=void 0,this._show=y(e.show,!0),this._font=y(e.font,"30px sans-serif"),this._fillColor=z.clone(y(e.fillColor,z.WHITE)),this._outlineColor=z.clone(y(e.outlineColor,z.BLACK)),this._outlineWidth=y(e.outlineWidth,1),this._showBackground=y(e.showBackground,!1),this._backgroundColor=z.clone(y(e.backgroundColor,N6e)),this._backgroundPadding=G.clone(y(e.backgroundPadding,F6e)),this._style=y(e.style,$o.FILL),this._verticalOrigin=y(e.verticalOrigin,wn.BASELINE),this._horizontalOrigin=y(e.horizontalOrigin,di.LEFT),this._pixelOffset=G.clone(y(e.pixelOffset,G.ZERO)),this._eyeOffset=h.clone(y(e.eyeOffset,h.ZERO)),this._position=h.clone(y(e.position,h.ZERO)),this._scale=y(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=y(e.heightReference,He.NONE),this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=y(e.text,""),this._relativeSize=1,cce(this),this._updateClamping()}Object.defineProperties(Rp.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.show=e)}let n=this._backgroundBillboard;l(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){let t=this._position;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o].billboard;l(s)&&(s.position=e)}let i=this._backgroundBillboard;l(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),pv(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=e.replace(/\u00ad/g,"");this._renderedText=Rp.enableRightToLeftDetection?G6e(t):t,mx(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,mx(this),cce(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;z.equals(t,e)||(z.clone(e,t),mx(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),mx(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,mx(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,mx(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){let t=this._backgroundColor;if(!z.equals(t,e)){z.clone(e,t);let n=this._backgroundBillboard;l(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){let t=this._backgroundPadding;G.equals(t,e)||(G.clone(e,t),pv(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,mx(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;if(!G.equals(t,e)){G.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;if(!wt.equals(t,e)){this._translucencyByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.translucencyByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;if(!wt.equals(t,e)){this._pixelOffsetScaleByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffsetScaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;if(!wt.equals(t,e)){this._scaleByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.eyeOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,pv(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;l(n)&&(n.verticalOrigin=e),pv(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;l(n)&&(n.scale=e*this._relativeSize),pv(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Tt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Tt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;l(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;l(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.id=e)}let n=this._backgroundBillboard;l(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!l(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=h.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard._clampedPosition=e)}let n=this._backgroundBillboard;l(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}}});Rp.prototype._updateClamping=function(){Ao._updateClamping(this._labelCollection,this)};Rp.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new G);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Ao._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};Rp.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,s=0,a=e.totalScale,c=e._backgroundBillboard;if(l(c))i=t.x+c._translate.x,o=t.y-c._translate.y,r=c.width*a,s=c.height*a,e.verticalOrigin===wn.BOTTOM||e.verticalOrigin===wn.BASELINE?o-=s:e.verticalOrigin===wn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let u=0,f=0,d=e._glyphs,p=d.length;for(let _=0;_<p;++_){let m=d[_],x=m.billboard;if(!l(x))continue;let C=t.x+x._translate.x,A=t.y-x._translate.y,T=m.dimensions.width*a,b=m.dimensions.height*a;e.verticalOrigin===wn.BOTTOM||e.verticalOrigin===wn.BASELINE?A-=b:e.verticalOrigin===wn.CENTER&&(A-=b*.5),e._verticalOrigin===wn.TOP?A+=Ys.PADDING*a:(e._verticalOrigin===wn.BOTTOM||e._verticalOrigin===wn.BASELINE)&&(A-=Ys.PADDING*a),i=Math.min(i,C),o=Math.min(o,A),u=Math.max(u,C+T),f=Math.max(f,A+b)}r=u-i,s=f-o}return l(n)||(n=new qe),n.x=i,n.y=o,n.width=r,n.height=s,n};Rp.prototype.equals=function(e){return this===e||l(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&h.equals(this._position,e._position)&&z.equals(this._fillColor,e._fillColor)&&z.equals(this._outlineColor,e._outlineColor)&&z.equals(this._backgroundColor,e._backgroundColor)&&G.equals(this._backgroundPadding,e._backgroundPadding)&&G.equals(this._pixelOffset,e._pixelOffset)&&h.equals(this._eyeOffset,e._eyeOffset)&&wt.equals(this._translucencyByDistance,e._translucencyByDistance)&&wt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&wt.equals(this._scaleByDistance,e._scaleByDistance)&&Tt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};Rp.prototype.isDestroyed=function(){return!1};Rp.enableRightToLeftDetection=!1;function V6e(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=as.LTR,a="",c=e.length;for(let u=0;u<c;++u){let f=e.charAt(u);t.test(f)?a=as.RTL:n.test(f)?a=as.LTR:i.test(f)?a=as.BRACKETS:a=as.WEAK,u===0&&(s=a),s===a&&a!==as.BRACKETS?r+=f:(r!==""&&o.push({Type:s,Word:r}),s=a,r=f)}return o.push({Type:a,Word:r}),o}function k6e(e){return e.split("").reverse().join("")}function gv(e,t,n){return e.slice(0,t)+n+e.slice(t)}function U6e(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var z6e="\u05D0-\u05EA",H6e="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",ace=new RegExp(`[${z6e}${H6e}]`);function G6e(e){let t=e.split(`
|
|
5061
|
+
`,i=t.createViewportQuadCommand(n,{uniformMap:{billboard_texture:function(){return e._textureAtlas.texture}}});return i.pass=Ce.OVERLAY,i}var D6e=[];lf.prototype.update=function(e){if(g9(this),!this.show)return;let t=this._billboards,n=t.length,i=e.context;this._instanced=i.instancedArrays,To=this._instanced?m6e:h6e,u9=this._instanced?_6e:p6e;let o=this._textureAtlas;if(!l(o)){o=this._textureAtlas=new hx({context:i});for(let I=0;I<n;++I)t[I]._loadImage()}let r=o.textureCoordinates;if(r.length===0)return;S6e(this,e),t=this._billboards,n=t.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,c=this._propertiesChanged,u=o.guid,f=this._createVertexArray||this._textureAtlasGUID!==u;this._textureAtlasGUID=u;let d,p=e.passes,_=p.pick;if(f||!_&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let I=0;I<_9;++I)c[I]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=y6e(i,n,this._buffersUsage,this._instanced,this._batchTable,this._sdf),d=this._vaf.writers;for(let I=0;I<n;++I){let L=this._billboards[I];L._dirty=!1,E6e(this,e,r,d,L)}this._vaf.commit(u9(i))}this._billboardsToUpdateIndex=0}else if(a>0){let I=D6e;I.length=0,(c[dv]||c[l6e]||c[c6e])&&I.push(Uae),(c[fv]||c[Oae]||c[s6e]||c[a6e]||c[r6e])&&(I.push(qae),this._instanced&&I.push(p9)),(c[fv]||c[u6e]||c[Lae])&&(I.push(Yae),I.push(m9)),(c[fv]||c[Mae])&&I.push(m9),c[Rae]&&I.push(p9),c[Bae]&&I.push(Xae),c[Nae]&&I.push(Kae),(c[Fae]||c[f6e]||c[fv]||c[dv])&&I.push($ae),(c[fv]||c[dv])&&I.push(Zae),c[Vae]&&I.push(Jae);let L=I.length;if(d=this._vaf.writers,a/n>.1){for(let N=0;N<a;++N){let g=s[N];g._dirty=!1;for(let E=0;E<L;++E)I[E](this,e,r,d,g)}this._vaf.commit(u9(i))}else{for(let N=0;N<a;++N){let g=s[N];g._dirty=!1;for(let E=0;E<L;++E)I[E](this,e,r,d,g);this._instanced?this._vaf.subCommit(g._index,1):this._vaf.subCommit(g._index*4,4)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>n*1.5&&(s.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,oe.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let m,x=B.IDENTITY;e.mode===te.SCENE3D?(x=this.modelMatrix,m=oe.clone(this._baseVolumeWC,this._boundingVolume)):m=oe.clone(this._baseVolume2D,this._boundingVolume),w6e(this,e,m);let C=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,C){this._blendOption===Oo.OPAQUE||this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=Ue.fromCache({depthTest:{enabled:!0,func:Z.LESS},depthMask:!0}):this._rsOpaque=void 0;let I=this._blendOption===Oo.TRANSLUCENT;this._blendOption===Oo.TRANSLUCENT||this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=Ue.fromCache({depthTest:{enabled:!0,func:I?Z.LEQUAL:Z.LESS},depthMask:I,blending:un.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let A,T,b,S,w,D=Rt.maximumVertexTextureImageUnits>0;if(C||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){A=UN,T=kN,w=[],l(this._batchTable)&&(w.push("VECTOR_TILE"),A=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(A),T=this._batchTable.getFragmentShaderCallback(!1,void 0)(T)),b=new Ve({defines:w,sources:[A]}),this._instanced&&b.defines.push("INSTANCED"),this._shaderRotation&&b.defines.push("ROTATION"),this._shaderAlignedAxis&&b.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&b.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&b.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&b.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&b.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&b.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(D?b.defines.push("VERTEX_DEPTH_CHECK"):b.defines.push("FRAGMENT_DEPTH_CHECK"));let I=1-Ys.CUTOFF;this._sdf&&b.defines.push("SDF");let L=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT&&(S=new Ve({defines:["OPAQUE",L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._sp=Gt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To}),S=new Ve({defines:["TRANSLUCENT",L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._spTranslucent=Gt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To})),this._blendOption===Oo.OPAQUE&&(S=new Ve({defines:[L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._sp=Gt.replaceCache({context:i,shaderProgram:this._sp,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To})),this._blendOption===Oo.TRANSLUCENT&&(S=new Ve({defines:[L],sources:[T]}),this._shaderClampToGround&&(D?S.defines.push("VERTEX_DEPTH_CHECK"):S.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(S.defines.push("SDF"),S.defines.push(`SDF_EDGE ${I}`)),this._spTranslucent=Gt.replaceCache({context:i,shaderProgram:this._spTranslucent,vertexShaderSource:b,fragmentShaderSource:S,attributeLocations:To})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}let O=e.commandList;if(p.render||p.pick){let I=this._colorCommands,L=this._blendOption===Oo.OPAQUE,N=this._blendOption===Oo.OPAQUE_AND_TRANSLUCENT,g=this._vaf.va,E=g.length,v=this._uniforms,P;l(this._batchTable)?(v=this._batchTable.getUniformMapCallback()(v),P=this._batchTable.getPickId()):P="v_pickColor",I.length=E;let M=N?E*2:E;for(let V=0;V<M;++V){let U=I[V];l(U)||(U=I[V]=new et);let k=L||N&&V%2===0;U.pass=k||!N?Ce.OPAQUE:Ce.TRANSLUCENT,U.owner=this;let H=N?Math.floor(V/2):V;U.boundingVolume=m,U.modelMatrix=x,U.count=g[H].indicesCount,U.shaderProgram=k?this._sp:this._spTranslucent,U.uniformMap=v,U.vertexArray=g[H].va,U.renderState=k?this._rsOpaque:this._rsTranslucent,U.debugShowBoundingVolume=this.debugShowBoundingVolume,U.pickId=P,this._instanced&&(U.count=6,U.instanceCount=n),O.push(U)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=v6e(this,e.context)),O.push(this.debugCommand))}};lf.prototype.isDestroyed=function(){return!1};lf.prototype.destroy=function(){return l(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this._textureAtlas=this._destroyTextureAtlas&&this._textureAtlas&&this._textureAtlas.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spTranslucent=this._spTranslucent&&this._spTranslucent.destroy(),this._vaf=this._vaf&&this._vaf.destroy(),kae(this._billboards),ue(this)};var uf=lf;function P6e(e,t,n,i,o){return function(){let r=document.createElement("canvas"),s=o+2*i;r.height=r.width=s;let a=r.getContext("2d");return a.clearRect(0,0,s,s),i!==0&&(a.beginPath(),a.arc(s/2,s/2,s/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=n,a.fill(),e<1&&(a.save(),a.globalCompositeOperation="destination-out",a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle="black",a.fill(),a.restore())),a.beginPath(),a.arc(s/2,s/2,o/2,0,2*Math.PI,!0),a.closePath(),a.fillStyle=t,a.fill(),r}}var lb=P6e;function Ps(e,t,n,i,o){this._content=e,this._billboard=n,this._label=i,this._polyline=o,this._batchId=t,this._billboardImage=void 0,this._billboardColor=void 0,this._billboardOutlineColor=void 0,this._billboardOutlineWidth=void 0,this._billboardSize=void 0,this._pointSize=void 0,this._color=void 0,this._pointSize=void 0,this._pointOutlineColor=void 0,this._pointOutlineWidth=void 0,this._heightOffset=void 0,this._pickIds=new Array(3),ub(this)}var I6e=new me;Object.defineProperties(Ps.prototype,{show:{get:function(){return this._label.show},set:function(e){this._label.show=e,this._billboard.show=e,this._polyline.show=e}},color:{get:function(){return this._color},set:function(e){this._color=z.clone(e,this._color),ub(this)}},pointSize:{get:function(){return this._pointSize},set:function(e){this._pointSize=e,ub(this)}},pointOutlineColor:{get:function(){return this._pointOutlineColor},set:function(e){this._pointOutlineColor=z.clone(e,this._pointOutlineColor),ub(this)}},pointOutlineWidth:{get:function(){return this._pointOutlineWidth},set:function(e){this._pointOutlineWidth=e,ub(this)}},labelColor:{get:function(){return this._label.fillColor},set:function(e){this._label.fillColor=e,this._polyline.show=this._label.show&&e.alpha>0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){l(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){let t=y(this._heightOffset,0),n=this._content.tileset.ellipsoid,i=n.cartesianToCartographic(this._billboard.position,I6e);i.height=i.height-t+e;let o=n.cartographicToCartesian(i);this._billboard.position=o,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],o],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=z.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){let t=this._billboardImage!==e;this._billboardImage=e,t&&ub(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){let e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}});Ps.defaultColor=z.WHITE;Ps.defaultPointOutlineColor=z.BLACK;Ps.defaultPointOutlineWidth=0;Ps.defaultPointSize=8;function ub(e){let t=e._billboard;if(l(e._billboardImage)&&e._billboardImage!==t.image){t.image=e._billboardImage;return}if(l(e._billboardImage))return;let n=y(e._color,Ps.defaultColor),i=y(e._pointOutlineColor,Ps.defaultPointOutlineColor),o=y(e._pointOutlineWidth,Ps.defaultPointOutlineWidth),r=y(e._pointSize,Ps.defaultPointSize),s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,u=e._billboardSize;if(z.equals(n,s)&&z.equals(i,a)&&o===c&&r===u)return;e._billboardColor=z.clone(n,e._billboardColor),e._billboardOutlineColor=z.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let f=n.alpha,d=n.toCssColorString(),p=i.toCssColorString(),_=JSON.stringify([d,r,p,o]);t.setImage(_,lb(f,d,p,o,r))}Ps.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)};Ps.prototype.getPropertyNames=function(e){return ci("Cesium3DTilePointFeature.getPropertyNames","Cesium3DTilePointFeature.getPropertyNames is deprecated in CesiumJS 1.95, and will be removed in 1.98. Use Cesium3DTilePointFeature.getPropertyIds instead"),this._content.batchTable.getPropertyIds(this._batchId,e)};Ps.prototype.getPropertyIds=function(e){return this._content.batchTable.getPropertyIds(this._batchId,e)};Ps.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)};Ps.prototype.getPropertyInherited=function(e){return br.getPropertyInherited(this._content,this._batchId,e)};Ps.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0};Ps.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)};Ps.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)};Ps.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)};var kg=Ps;var mv=Zc(oce());var B6e={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2},$o=Object.freeze(B6e);var rce={},sce=0,L6e=256,N6e=new z(.165,.165,.165,.8),F6e=new G(7,5),as=Object.freeze({LTR:0,RTL:1,WEAK:2,BRACKETS:3});function mx(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._rebindAllGlyphs=!0}function pv(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function _v(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function cce(e){let t=rce[e._font];if(!l(t)){let n=document.createElement("div");n.style.position="absolute",n.style.opacity=0,n.style.font=e._font,document.body.appendChild(n);let i=parseFloat(_v(n,"line-height"));isNaN(i)&&(i=void 0),t={family:_v(n,"font-family"),size:_v(n,"font-size").replace("px",""),style:_v(n,"font-style"),weight:_v(n,"font-weight"),lineHeight:i},document.body.removeChild(n),sce<L6e&&(rce[e._font]=t,sce++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function Rp(e,t){e=y(e,y.EMPTY_OBJECT);let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=wt.clone(n)),l(i)&&(i=wt.clone(i)),l(o)&&(o=wt.clone(o)),l(r)&&(r=Tt.clone(r)),this._renderedText=void 0,this._text=void 0,this._show=y(e.show,!0),this._font=y(e.font,"30px sans-serif"),this._fillColor=z.clone(y(e.fillColor,z.WHITE)),this._outlineColor=z.clone(y(e.outlineColor,z.BLACK)),this._outlineWidth=y(e.outlineWidth,1),this._showBackground=y(e.showBackground,!1),this._backgroundColor=z.clone(y(e.backgroundColor,N6e)),this._backgroundPadding=G.clone(y(e.backgroundPadding,F6e)),this._style=y(e.style,$o.FILL),this._verticalOrigin=y(e.verticalOrigin,wn.BASELINE),this._horizontalOrigin=y(e.horizontalOrigin,di.LEFT),this._pixelOffset=G.clone(y(e.pixelOffset,G.ZERO)),this._eyeOffset=h.clone(y(e.eyeOffset,h.ZERO)),this._position=h.clone(y(e.position,h.ZERO)),this._scale=y(e.scale,1),this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=y(e.heightReference,He.NONE),this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=y(e.text,""),this._relativeSize=1,cce(this),this._updateClamping()}Object.defineProperties(Rp.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.show=e)}let n=this._backgroundBillboard;l(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){let t=this._position;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o].billboard;l(s)&&(s.position=e)}let i=this._backgroundBillboard;l(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),pv(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=e.replace(/\u00ad/g,"");this._renderedText=Rp.enableRightToLeftDetection?G6e(t):t,mx(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,mx(this),cce(this))}},fillColor:{get:function(){return this._fillColor},set:function(e){let t=this._fillColor;z.equals(t,e)||(z.clone(e,t),mx(this))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;z.equals(t,e)||(z.clone(e,t),mx(this))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,mx(this))}},showBackground:{get:function(){return this._showBackground},set:function(e){this._showBackground!==e&&(this._showBackground=e,mx(this))}},backgroundColor:{get:function(){return this._backgroundColor},set:function(e){let t=this._backgroundColor;if(!z.equals(t,e)){z.clone(e,t);let n=this._backgroundBillboard;l(n)&&(n.color=t)}}},backgroundPadding:{get:function(){return this._backgroundPadding},set:function(e){let t=this._backgroundPadding;G.equals(t,e)||(G.clone(e,t),pv(this))}},style:{get:function(){return this._style},set:function(e){this._style!==e&&(this._style=e,mx(this))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;if(!G.equals(t,e)){G.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;if(!wt.equals(t,e)){this._translucencyByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.translucencyByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.translucencyByDistance=e)}}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;if(!wt.equals(t,e)){this._pixelOffsetScaleByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffsetScaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffsetScaleByDistance=e)}}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;if(!wt.equals(t,e)){this._scaleByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;if(!h.equals(t,e)){h.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.eyeOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,pv(this))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){if(this._verticalOrigin!==e){this._verticalOrigin=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.verticalOrigin=e)}let n=this._backgroundBillboard;l(n)&&(n.verticalOrigin=e),pv(this)}}},scale:{get:function(){return this._scale},set:function(e){if(this._scale!==e){this._scale=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.scale=e*this._relativeSize)}let n=this._backgroundBillboard;l(n)&&(n.scale=e*this._relativeSize),pv(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Tt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Tt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;l(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;l(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.id=e)}let n=this._backgroundBillboard;l(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!l(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=h.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard._clampedPosition=e)}let n=this._backgroundBillboard;l(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}}});Rp.prototype._updateClamping=function(){Ao._updateClamping(this._labelCollection,this)};Rp.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new G);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Ao._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};Rp.getScreenSpaceBoundingBox=function(e,t,n){let i=0,o=0,r=0,s=0,a=e.totalScale,c=e._backgroundBillboard;if(l(c))i=t.x+c._translate.x,o=t.y-c._translate.y,r=c.width*a,s=c.height*a,e.verticalOrigin===wn.BOTTOM||e.verticalOrigin===wn.BASELINE?o-=s:e.verticalOrigin===wn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let u=0,f=0,d=e._glyphs,p=d.length;for(let _=0;_<p;++_){let m=d[_],x=m.billboard;if(!l(x))continue;let C=t.x+x._translate.x,A=t.y-x._translate.y,T=m.dimensions.width*a,b=m.dimensions.height*a;e.verticalOrigin===wn.BOTTOM||e.verticalOrigin===wn.BASELINE?A-=b:e.verticalOrigin===wn.CENTER&&(A-=b*.5),e._verticalOrigin===wn.TOP?A+=Ys.PADDING*a:(e._verticalOrigin===wn.BOTTOM||e._verticalOrigin===wn.BASELINE)&&(A-=Ys.PADDING*a),i=Math.min(i,C),o=Math.min(o,A),u=Math.max(u,C+T),f=Math.max(f,A+b)}r=u-i,s=f-o}return l(n)||(n=new qe),n.x=i,n.y=o,n.width=r,n.height=s,n};Rp.prototype.equals=function(e){return this===e||l(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&h.equals(this._position,e._position)&&z.equals(this._fillColor,e._fillColor)&&z.equals(this._outlineColor,e._outlineColor)&&z.equals(this._backgroundColor,e._backgroundColor)&&G.equals(this._backgroundPadding,e._backgroundPadding)&&G.equals(this._pixelOffset,e._pixelOffset)&&h.equals(this._eyeOffset,e._eyeOffset)&&wt.equals(this._translucencyByDistance,e._translucencyByDistance)&&wt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&wt.equals(this._scaleByDistance,e._scaleByDistance)&&Tt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};Rp.prototype.isDestroyed=function(){return!1};Rp.enableRightToLeftDetection=!1;function V6e(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=as.LTR,a="",c=e.length;for(let u=0;u<c;++u){let f=e.charAt(u);t.test(f)?a=as.RTL:n.test(f)?a=as.LTR:i.test(f)?a=as.BRACKETS:a=as.WEAK,u===0&&(s=a),s===a&&a!==as.BRACKETS?r+=f:(r!==""&&o.push({Type:s,Word:r}),s=a,r=f)}return o.push({Type:a,Word:r}),o}function k6e(e){return e.split("").reverse().join("")}function gv(e,t,n){return e.slice(0,t)+n+e.slice(t)}function U6e(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var z6e="\u05D0-\u05EA",H6e="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",ace=new RegExp(`[${z6e}${H6e}]`);function G6e(e){let t=e.split(`
|
|
5062
5062
|
`),n="";for(let i=0;i<t.length;i++){let o=t[i],r=ace.test(o.charAt(0)),s=V6e(o,ace),a=0,c="";for(let u=0;u<s.length;++u){let f=s[u],d=f.Type===as.BRACKETS?U6e(f.Word):k6e(f.Word);r?f.Type===as.RTL?(c=d+c,a=0):f.Type===as.LTR?(c=gv(c,a,f.Word),a+=f.Word.length):(f.Type===as.WEAK||f.Type===as.BRACKETS)&&(f.Type===as.WEAK&&s[u-1].Type===as.BRACKETS?c=d+c:s[u-1].Type===as.RTL?(c=d+c,a=0):s.length>u+1?s[u+1].Type===as.RTL?(c=d+c,a=0):(c=gv(c,a,f.Word),a+=f.Word.length):c=gv(c,0,d)):f.Type===as.RTL?c=gv(c,a,d):f.Type===as.LTR?(c+=f.Word,a=c.length):(f.Type===as.WEAK||f.Type===as.BRACKETS)&&(u>0&&s[u-1].Type===as.RTL?s.length>u+1?s[u+1].Type===as.RTL?c=gv(c,a,d):(c+=f.Word,a=c.length):c+=f.Word:(c+=f.Word,a=c.length))}n+=c,i<t.length-1&&(n+=`
|
|
5063
|
-
`)}return n}var px=Rp;var yv=Zc(lce()
|
|
5063
|
+
`)}return n}var px=Rp;var yv=Zc(lce());function j6e(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function q6e(e,t,n){this.labelCollection=e,this.index=t,this.dimensions=n}var Y6e=1.2,fce="ID_WHITE_PIXEL",y9=new G(4,4),X6e=new qe(1,1,1,1);function K6e(e){let t=document.createElement("canvas");t.width=y9.x,t.height=y9.y;let n=t.getContext("2d");n.fillStyle="#fff",n.fillRect(0,0,t.width,t.height),e.addImage(fce,t)}var ff={};function $6e(e,t,n,i,o,r,s){return ff.font=t,ff.fillColor=n,ff.strokeColor=i,ff.strokeWidth=o,ff.padding=Ys.PADDING,s===wn.CENTER?ff.textBaseline="middle":s===wn.TOP?ff.textBaseline="top":ff.textBaseline="bottom",ff.fill=r===$o.FILL||r===$o.FILL_AND_OUTLINE,ff.stroke=r===$o.OUTLINE||r===$o.FILL_AND_OUTLINE,ff.backgroundColor=z.BLACK,$A(e,ff)}function x9(e,t){t.textureInfo=void 0,t.dimensions=void 0;let n=t.billboard;l(n)&&(n.show=!1,n.image=void 0,l(n._removeCallbackFunc)&&(n._removeCallbackFunc(),n._removeCallbackFunc=void 0),e._spareBillboards.push(n),t.billboard=void 0)}function Z6e(e,t,n,i){i.index=e.addImageSync(t,n)}var J6e=new yv.default;function Q6e(e,t){let n=t._renderedText,i=J6e.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length,a,c,u;if(t._relativeSize=t._fontSize/Ys.FONT_SIZE,o<s)for(c=o;c<s;++c)x9(e,r[c]);r.length=o;let f=t._showBackground&&n.split(`
|
|
5064
5064
|
`).join("").length>0,d=t._backgroundBillboard,p=e._backgroundBillboardCollection;f?(l(d)||(d=p.add({collection:e,image:fce,imageSubRegion:X6e}),t._backgroundBillboard=d),d.color=t._backgroundColor,d.show=t._show,d.position=t._position,d.eyeOffset=t._eyeOffset,d.pixelOffset=t._pixelOffset,d.horizontalOrigin=di.LEFT,d.verticalOrigin=t._verticalOrigin,d.heightReference=t._heightReference,d.scale=t.totalScale,d.pickPrimitive=t,d.id=t._id,d.translucencyByDistance=t._translucencyByDistance,d.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,d.scaleByDistance=t._scaleByDistance,d.distanceDisplayCondition=t._distanceDisplayCondition,d.disableDepthTestDistance=t._disableDepthTestDistance):l(d)&&(p.remove(d),t._backgroundBillboard=d=void 0);let _=e._glyphTextureCache;for(u=0;u<o;++u){let m=i[u],x=t._verticalOrigin,C=JSON.stringify([m,t._fontFamily,t._fontStyle,t._fontWeight,+x]),A=_[C];if(!l(A)){let T=`${t._fontStyle} ${t._fontWeight} ${Ys.FONT_SIZE}px ${t._fontFamily}`,b=$6e(m,T,z.WHITE,z.WHITE,0,$o.FILL,x);if(A=new q6e(e,-1,b.dimensions),_[C]=A,b.width>0&&b.height>0){let S=(0,mv.default)(b,{cutoff:Ys.CUTOFF,radius:Ys.RADIUS}),w=b.getContext("2d"),D=b.width,O=b.height,I=w.getImageData(0,0,D,O);for(let L=0;L<D;L++)for(let N=0;N<O;N++){let g=N*D+L,E=S[g]*255,v=g*4;I.data[v+0]=E,I.data[v+1]=E,I.data[v+2]=E,I.data[v+3]=E}w.putImageData(I,0,0),m!==" "&&Z6e(e._textureAtlas,C,b,A)}}if(a=r[u],l(a)?A.index===-1?x9(e,a):l(a.textureInfo)&&(a.textureInfo=void 0):(a=new j6e,r[u]=a),a.textureInfo=A,a.dimensions=A.dimensions,A.index!==-1){let T=a.billboard,b=e._spareBillboards;l(T)||(b.length>0?T=b.pop():(T=e._billboardCollection.add({collection:e}),T._labelDimensions=new G,T._labelTranslate=new G),a.billboard=T),T.show=t._show,T.position=t._position,T.eyeOffset=t._eyeOffset,T.pixelOffset=t._pixelOffset,T.horizontalOrigin=di.LEFT,T.verticalOrigin=t._verticalOrigin,T.heightReference=t._heightReference,T.scale=t.totalScale,T.pickPrimitive=t,T.id=t._id,T.image=C,T.translucencyByDistance=t._translucencyByDistance,T.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,T.scaleByDistance=t._scaleByDistance,T.distanceDisplayCondition=t._distanceDisplayCondition,T.disableDepthTestDistance=t._disableDepthTestDistance,T._batchIndex=t._batchIndex,T.outlineColor=t.outlineColor,t.style===$o.FILL_AND_OUTLINE?(T.color=t._fillColor,T.outlineWidth=t.outlineWidth):t.style===$o.FILL?(T.color=t._fillColor,T.outlineWidth=0):t.style===$o.OUTLINE&&(T.color=z.TRANSPARENT,T.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function uce(e,t,n){return t===di.CENTER?-e/2:t===di.RIGHT?-(e+n.x):n.x}var fr=new G,e9e=new G;function t9e(e){let t=e._glyphs,n=e._renderedText,i,o,r=0,s=0,a=[],c=Number.NEGATIVE_INFINITY,u=0,f=1,d,p=t.length,_=e._backgroundBillboard,m=G.clone(l(_)?e._backgroundPadding:G.ZERO,e9e);for(m.x/=e._relativeSize,m.y/=e._relativeSize,d=0;d<p;++d)n.charAt(d)===`
|
|
5065
5065
|
`?(a.push(r),++f,r=0):(i=t[d],o=i.dimensions,u=Math.max(u,o.height-o.descent),c=Math.max(c,o.descent),r+=o.width-o.minx,d<p-1&&(r+=t[d+1].dimensions.minx),s=Math.max(s,r));a.push(r);let x=u+c,C=e.totalScale,A=e._horizontalOrigin,T=e._verticalOrigin,b=0,S=a[b],w=uce(S,A,m),D=(l(e._lineHeight)?e._lineHeight:Y6e*e._fontSize)/e._relativeSize,O=D*(f-1),I=s,L=x+O;l(_)&&(I+=m.x*2,L+=m.y*2,_._labelHorizontalOrigin=A),fr.x=w*C,fr.y=0;let N=!0,g=0;for(d=0;d<p;++d)if(n.charAt(d)===`
|
|
5066
5066
|
`)++b,g+=D,S=a[b],w=uce(S,A,m),fr.x=w*C,N=!0;else if(i=t[d],o=i.dimensions,T===wn.TOP?(fr.y=o.height-u-m.y,fr.y+=Ys.PADDING):T===wn.CENTER?fr.y=(O+o.height-u)/2:T===wn.BASELINE?(fr.y=O,fr.y-=Ys.PADDING):(fr.y=O+c+m.y,fr.y-=Ys.PADDING),fr.y=(fr.y-o.descent-g)*C,N&&(fr.x-=Ys.PADDING*C,N=!1),l(i.billboard)&&(i.billboard._setTranslate(fr),i.billboard._labelDimensions.x=I,i.billboard._labelDimensions.y=L,i.billboard._labelHorizontalOrigin=A),d<p-1){let E=t[d+1];fr.x+=(o.width-o.minx+E.dimensions.minx)*C}if(l(_)&&n.split(`
|
|
@@ -9730,7 +9730,7 @@ Message: `+yt.message,yt}})}return Se=nt===e,{shouldBindDescendants:Se,bindingCo
|
|
|
9730
9730
|
* Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
|
|
9731
9731
|
* Copyright (c) Steve Sanderson
|
|
9732
9732
|
* MIT license
|
|
9733
|
-
*/var VY="__knockoutObservables",kY="__knockoutSubscribable";function vxe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=Dxe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===VY||o===kY)&&!(o in i)){var r=e[o],s=r instanceof Array,a=n.isObservable(r)?r:s?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[o]=a,s&&u0t(n,a)}}),e}function Dxe(e,t){var n=e[VY];return!n&&t&&(n={},Object.defineProperty(e,VY,{value:n})),n}function l0t(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),vxe.call(i,e,[t]),e}function u0t(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=f0t(e,t,i))})}function f0t(e,t,n){var i=d0t(e,n);return i.subscribe(t)}function d0t(e,t){var n=t[kY];if(!n){n=new e.subscribable,Object.defineProperty(t,kY,{value:n});var i={};h0t(t,n,i),m0t(e,t,n,i)}return n}function h0t(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function m0t(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function Pxe(e,t){if(!e)return null;var n=Dxe(e,!1);return n&&n[t]||null}function p0t(e,t){var n=Pxe(e,t);n&&n.valueHasMutated()}function _0t(e){e.track=vxe,e.getObservable=Pxe,e.valueHasMutated=p0t,e.defineProperty=l0t}var X4={attachToKo:_0t};var Ixe="http://www.w3.org/2000/svg",Oxe="cesium-svgPath-svg",g0t={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(Ixe,"svg:svg");i.setAttribute("class",Oxe);let o=document.createElementNS(Ixe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let s=e.unwrap(r.width),a=e.unwrap(r.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),r.css&&i.setAttribute("class",`${Oxe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},K4=g0t;X4.attachToKo(YE);K4.register(YE);var xe=YE;var Q7i=new Uint8Array([0]),Wc=[171,75,84,88,32,50,48,187,13,10,26,10],UY,zY,HY,$4,Rxe,GY,Mxe,Bxe;(function(e){e[e.NONE=0]="NONE",e[e.BASISLZ=1]="BASISLZ",e[e.ZSTD=2]="ZSTD",e[e.ZLIB=3]="ZLIB"})(UY||(UY={})),function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(zY||(zY={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(HY||(HY={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}($4||($4={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(Rxe||(Rxe={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(GY||(GY={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(Mxe||(Mxe={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(Bxe||(Bxe={}));var WY=class{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=UY.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:zY.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:HY.UNSPECIFIED,colorPrimaries:$4.SRGB,transferFunction:$4.SRGB,flags:GY.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}},bC=class{constructor(t,n,i,o){this._dataView=new DataView(t.buffer,t.byteOffset+n,i),this._littleEndian=o,this._offset=0}_nextUint8(){let t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){let t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){let t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){let t=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,n=0){let i=this._offset,o=0;for(;this._dataView.getUint8(this._offset)!==n&&o<t;)o++,this._offset++;return o<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,o)}};function Lxe(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Buffer.from(e).toString("utf8")}function jY(e){let t=new Uint8Array(e.buffer,e.byteOffset,Wc.length);if(t[0]!==Wc[0]||t[1]!==Wc[1]||t[2]!==Wc[2]||t[3]!==Wc[3]||t[4]!==Wc[4]||t[5]!==Wc[5]||t[6]!==Wc[6]||t[7]!==Wc[7]||t[8]!==Wc[8]||t[9]!==Wc[9]||t[10]!==Wc[10]||t[11]!==Wc[11])throw new Error("Missing KTX 2.0 identifier.");let n=new WY,i=17*Uint32Array.BYTES_PER_ELEMENT,o=new bC(e,Wc.length,i,!0);n.vkFormat=o._nextUint32(),n.typeSize=o._nextUint32(),n.pixelWidth=o._nextUint32(),n.pixelHeight=o._nextUint32(),n.pixelDepth=o._nextUint32(),n.layerCount=o._nextUint32(),n.faceCount=o._nextUint32();let r=o._nextUint32();n.supercompressionScheme=o._nextUint32();let s=o._nextUint32(),a=o._nextUint32(),c=o._nextUint32(),u=o._nextUint32(),f=o._nextUint64(),d=o._nextUint64(),p=new bC(e,Wc.length+i,3*r*8,!0);for(let U=0;U<r;U++)n.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+p._nextUint64(),p._nextUint64()),uncompressedByteLength:p._nextUint64()});let _=new bC(e,s,a,!0),m={vendorId:_._skip(4)._nextUint16(),descriptorType:_._nextUint16(),versionNumber:_._nextUint16(),descriptorBlockSize:_._nextUint16(),colorModel:_._nextUint8(),colorPrimaries:_._nextUint8(),transferFunction:_._nextUint8(),flags:_._nextUint8(),texelBlockDimension:{x:_._nextUint8()+1,y:_._nextUint8()+1,z:_._nextUint8()+1,w:_._nextUint8()+1},bytesPlane:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],samples:[]},x=(m.descriptorBlockSize/4-6)/4;for(let U=0;U<x;U++)m.samples[U]={bitOffset:_._nextUint16(),bitLength:_._nextUint8(),channelID:_._nextUint8(),samplePosition:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],sampleLower:_._nextUint32(),sampleUpper:_._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(m);let C=new bC(e,c,u,!0);for(;C._offset<u;){let U=C._nextUint32(),k=C._scan(U),H=Lxe(k),F=C._scan(U-k.byteLength);n.keyValue[H]=H.match(/^ktx/i)?Lxe(F):F,C._offset%4&&C._skip(4-C._offset%4)}if(d<=0)return n;let A=new bC(e,f,d,!0),T=A._nextUint16(),b=A._nextUint16(),S=A._nextUint32(),w=A._nextUint32(),D=A._nextUint32(),O=A._nextUint32(),I=[];for(let U=0;U<r;U++)I.push({imageFlags:A._nextUint32(),rgbSliceByteOffset:A._nextUint32(),rgbSliceByteLength:A._nextUint32(),alphaSliceByteOffset:A._nextUint32(),alphaSliceByteLength:A._nextUint32()});let L=f+A._offset,N=L+S,g=N+w,E=g+D,v=new Uint8Array(e.buffer,e.byteOffset+L,S),P=new Uint8Array(e.buffer,e.byteOffset+N,w),M=new Uint8Array(e.buffer,e.byteOffset+g,D),V=new Uint8Array(e.buffer,e.byteOffset+E,O);return n.globalData={endpointCount:T,selectorCount:b,imageDescs:I,endpointsData:v,selectorsData:P,tablesData:M,extendedData:V},n}var qY=Zc(Nxe(),1);var K1=Zc(Uxe(),1);var sX=Zc(XCe(),1);function tP(e){l(e)||(e=new Eh),this._clock=e,this._eventHelper=new Gr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=xe.observable(ee.now()),this.systemTime.equalityComparer=ee.equals,this.startTime=xe.observable(e.startTime),this.startTime.equalityComparer=ee.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=xe.observable(e.stopTime),this.stopTime.equalityComparer=ee.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=xe.observable(e.currentTime),this.currentTime.equalityComparer=ee.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=xe.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=xe.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=xe.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=xe.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=xe.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),xe.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(tP.prototype,{clock:{get:function(){return this._clock}}});tP.prototype.synchronize=function(){let e=this._clock;this.systemTime=ee.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};tP.prototype.isDestroyed=function(){return!1};tP.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var rz=tP;function nyt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,ye.throwInstantiationError()}var KCe=nyt;function iyt(e,t){t=y(t,!0);let n=new _e,i=new _e;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,xe.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var xn=iyt;var aX={};aX.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),r.setAttribute("data-bind",s),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};aX.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",o.appendChild(s),s};var Y0=aX;function oyt(e,t,n,i,o){return n.call(i,e[t]),xe.getObservable(e,t).subscribe(n,i,o)}var Da=oyt;function $Ce(e,t){this._command=e,t=y(t,y.EMPTY_OBJECT),this.toggled=y(t.toggled,!1),this.tooltip=y(t.tooltip,""),xe.track(this,["toggled","tooltip"])}Object.defineProperties($Ce.prototype,{command:{get:function(){return this._command}}});var wC=$Ce;var ryt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},nP=Object.freeze(ryt);function Pm(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}Pm.prototype.getTexture=function(e){return this._textures[e]};function syt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}Pm.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):syt(this,e,t)};function ayt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?sz(o,r,n):cyt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function sz(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?JCe(e,n):new vt({context:n,source:t,sampler:o});return ZCe(o)&&r.generateMipmap(),r}function cyt(e,t,n){let{typedArray:i,sampler:o}=e,r=ZCe(o),s=o.wrapS===fn.REPEAT||o.wrapS===fn.MIRRORED_REPEAT||o.wrapT===fn.REPEAT||o.wrapT===fn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,u=[a,c].every(R.isPowerOfTwo);if((r||s)&&!u)if(l(i)){if(e.pixelDatatype===Xe.UNSIGNED_BYTE){let d=nO(i,a,c),p=Fy(d);return sz({sampler:o},p,n)}}else{let d=Fy(t);return sz(e,d,n)}else return sz(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),JCe(e,n)}function ZCe(e){return[Pt.NEAREST_MIPMAP_NEAREST,Pt.NEAREST_MIPMAP_LINEAR,Pt.LINEAR_MIPMAP_NEAREST,Pt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function JCe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new vt({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}Pm.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];ayt(this,o,t)}n.length=0};Pm.prototype.isDestroyed=function(){return!1};Pm.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return ue(this)};function DC(e){e=y(e,y.EMPTY_OBJECT),this.mode=y(e.mode,Wg.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=y(e.uniforms,y.EMPTY_OBJECT),this.varyings=y(e.varyings,y.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.isTranslucent=y(e.isTranslucent,!1),this._textureManager=new Pm,this._defaultTexture=void 0,this.uniformMap=lyt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},dyt(this),hyt(this)}function lyt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===nP.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=uyt(e,i)):n[i]=fyt(e,i)}return n}function uyt(e,t){return function(){return y(e._textureManager.getTexture(t),e._defaultTexture)}}function fyt(e,t){return function(){return e.uniforms[t].value}}function vC(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function dyt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,vC(r,t,o),o=e.usedVariablesVertex.featureIdSet,vC(r,n,o),o=e.usedVariablesVertex.metadataSet,vC(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,vC(s,t,o),o=e.usedVariablesFragment.featureIdSet,vC(s,n,o),o=e.usedVariablesFragment.metadataSet,vC(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;vC(s,a,c)}}function QCe(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function lc(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${QCe(t)} is not available in the ${i} shader. Did you mean ${QCe(n)} instead?`;throw new ye(o)}}function hyt(e){let t=e.usedVariablesVertex.attributeSet;lc(t,"position","positionMC","vertex"),lc(t,"normal","normalMC","vertex"),lc(t,"tangent","tangentMC","vertex"),lc(t,"bitangent","bitangentMC","vertex"),lc(t,"positionWC","positionMC","vertex"),lc(t,"positionEC","positionMC","vertex"),lc(t,"normalEC","normalMC","vertex"),lc(t,"tangentEC","tangentMC","vertex"),lc(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;lc(n,"position","positionEC","fragment"),lc(n,"normal","normalEC","fragment"),lc(n,"tangent","tangentEC","fragment"),lc(n,"bitangent","bitangentEC","fragment"),lc(n,"normalMC","normalEC","fragment"),lc(n,"tangentMC","tangentEC","fragment"),lc(n,"bitangentMC","bitangentEC","fragment")}DC.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===nP.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};DC.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};DC.prototype.isDestroyed=function(){return!1};DC.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),ue(this)};function cX(e){e=y(e,y.EMPTY_OBJECT),this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=y(e.pixelFormat,ft.RGBA),this.pixelDatatype=y(e.pixelDatatype,Xe.UNSIGNED_BYTE);let t=e.url;typeof t=="string"&&(t=De.createIfNeeded(t)),this.resource=t;let i=y(e.repeat,!0)?fn.REPEAT:fn.CLAMP_TO_EDGE;this.sampler=new on({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var myt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},eAe=Object.freeze(myt);var tAe=`uniform sampler2D u_depthTexture;
|
|
9733
|
+
*/var VY="__knockoutObservables",kY="__knockoutSubscribable";function vxe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=Dxe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===VY||o===kY)&&!(o in i)){var r=e[o],s=r instanceof Array,a=n.isObservable(r)?r:s?n.observableArray(r):n.observable(r);Object.defineProperty(e,o,{configurable:!0,enumerable:!0,get:a,set:n.isWriteableObservable(a)?a:void 0}),i[o]=a,s&&u0t(n,a)}}),e}function Dxe(e,t){var n=e[VY];return!n&&t&&(n={},Object.defineProperty(e,VY,{value:n})),n}function l0t(e,t,n){var i=this,o={owner:e,deferEvaluation:!0};if(typeof n=="function")o.read=n;else{if("value"in n)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if(typeof n.get!="function")throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');o.read=n.get,o.write=n.set}return e[t]=i.computed(o),vxe.call(i,e,[t]),e}function u0t(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=f0t(e,t,i))})}function f0t(e,t,n){var i=d0t(e,n);return i.subscribe(t)}function d0t(e,t){var n=t[kY];if(!n){n=new e.subscribable,Object.defineProperty(t,kY,{value:n});var i={};h0t(t,n,i),m0t(e,t,n,i)}return n}function h0t(e,t,n){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(i){var o=e[i];e[i]=function(){var r=o.apply(this,arguments);return n.pause!==!0&&t.notifySubscribers(this),r}})}function m0t(e,t,n,i){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(o){Object.defineProperty(t,o,{enumerable:!1,value:function(){var r;i.pause=!0;try{r=e.observableArray.fn[o].apply(e.observableArray(t),arguments)}finally{i.pause=!1}return n.notifySubscribers(t),r}})})}function Pxe(e,t){if(!e)return null;var n=Dxe(e,!1);return n&&n[t]||null}function p0t(e,t){var n=Pxe(e,t);n&&n.valueHasMutated()}function _0t(e){e.track=vxe,e.getObservable=Pxe,e.valueHasMutated=p0t,e.defineProperty=l0t}var X4={attachToKo:_0t};var Ixe="http://www.w3.org/2000/svg",Oxe="cesium-svgPath-svg",g0t={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(Ixe,"svg:svg");i.setAttribute("class",Oxe);let o=document.createElementNS(Ixe,"path");return i.appendChild(o),e.virtualElements.setDomNodeChildren(t,[i]),e.computed({read:function(){let r=e.unwrap(n());o.setAttribute("d",e.unwrap(r.path));let s=e.unwrap(r.width),a=e.unwrap(r.height);i.setAttribute("width",s),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${s} ${a}`),r.css&&i.setAttribute("class",`${Oxe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},K4=g0t;X4.attachToKo(YE);K4.register(YE);var xe=YE;var Q7i=new Uint8Array([0]),Wc=[171,75,84,88,32,50,48,187,13,10,26,10],UY,zY,HY,$4,Rxe,GY,Mxe,Bxe;(function(e){e[e.NONE=0]="NONE",e[e.BASISLZ=1]="BASISLZ",e[e.ZSTD=2]="ZSTD",e[e.ZLIB=3]="ZLIB"})(UY||(UY={})),function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(zY||(zY={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(HY||(HY={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}($4||($4={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(Rxe||(Rxe={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(GY||(GY={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(Mxe||(Mxe={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(Bxe||(Bxe={}));var WY=class{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=UY.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:zY.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:HY.UNSPECIFIED,colorPrimaries:$4.SRGB,transferFunction:$4.SRGB,flags:GY.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}},bC=class{constructor(t,n,i,o){this._dataView=new DataView(t.buffer,t.byteOffset+n,i),this._littleEndian=o,this._offset=0}_nextUint8(){let t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){let t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){let t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){let t=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,n=0){let i=this._offset,o=0;for(;this._dataView.getUint8(this._offset)!==n&&o<t;)o++,this._offset++;return o<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,o)}};function Lxe(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Buffer.from(e).toString("utf8")}function jY(e){let t=new Uint8Array(e.buffer,e.byteOffset,Wc.length);if(t[0]!==Wc[0]||t[1]!==Wc[1]||t[2]!==Wc[2]||t[3]!==Wc[3]||t[4]!==Wc[4]||t[5]!==Wc[5]||t[6]!==Wc[6]||t[7]!==Wc[7]||t[8]!==Wc[8]||t[9]!==Wc[9]||t[10]!==Wc[10]||t[11]!==Wc[11])throw new Error("Missing KTX 2.0 identifier.");let n=new WY,i=17*Uint32Array.BYTES_PER_ELEMENT,o=new bC(e,Wc.length,i,!0);n.vkFormat=o._nextUint32(),n.typeSize=o._nextUint32(),n.pixelWidth=o._nextUint32(),n.pixelHeight=o._nextUint32(),n.pixelDepth=o._nextUint32(),n.layerCount=o._nextUint32(),n.faceCount=o._nextUint32();let r=o._nextUint32();n.supercompressionScheme=o._nextUint32();let s=o._nextUint32(),a=o._nextUint32(),c=o._nextUint32(),u=o._nextUint32(),f=o._nextUint64(),d=o._nextUint64(),p=new bC(e,Wc.length+i,3*r*8,!0);for(let U=0;U<r;U++)n.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+p._nextUint64(),p._nextUint64()),uncompressedByteLength:p._nextUint64()});let _=new bC(e,s,a,!0),m={vendorId:_._skip(4)._nextUint16(),descriptorType:_._nextUint16(),versionNumber:_._nextUint16(),descriptorBlockSize:_._nextUint16(),colorModel:_._nextUint8(),colorPrimaries:_._nextUint8(),transferFunction:_._nextUint8(),flags:_._nextUint8(),texelBlockDimension:{x:_._nextUint8()+1,y:_._nextUint8()+1,z:_._nextUint8()+1,w:_._nextUint8()+1},bytesPlane:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],samples:[]},x=(m.descriptorBlockSize/4-6)/4;for(let U=0;U<x;U++)m.samples[U]={bitOffset:_._nextUint16(),bitLength:_._nextUint8(),channelID:_._nextUint8(),samplePosition:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],sampleLower:_._nextUint32(),sampleUpper:_._nextUint32()};n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(m);let C=new bC(e,c,u,!0);for(;C._offset<u;){let U=C._nextUint32(),k=C._scan(U),H=Lxe(k),F=C._scan(U-k.byteLength);n.keyValue[H]=H.match(/^ktx/i)?Lxe(F):F,C._offset%4&&C._skip(4-C._offset%4)}if(d<=0)return n;let A=new bC(e,f,d,!0),T=A._nextUint16(),b=A._nextUint16(),S=A._nextUint32(),w=A._nextUint32(),D=A._nextUint32(),O=A._nextUint32(),I=[];for(let U=0;U<r;U++)I.push({imageFlags:A._nextUint32(),rgbSliceByteOffset:A._nextUint32(),rgbSliceByteLength:A._nextUint32(),alphaSliceByteOffset:A._nextUint32(),alphaSliceByteLength:A._nextUint32()});let L=f+A._offset,N=L+S,g=N+w,E=g+D,v=new Uint8Array(e.buffer,e.byteOffset+L,S),P=new Uint8Array(e.buffer,e.byteOffset+N,w),M=new Uint8Array(e.buffer,e.byteOffset+g,D),V=new Uint8Array(e.buffer,e.byteOffset+E,O);return n.globalData={endpointCount:T,selectorCount:b,imageDescs:I,endpointsData:v,selectorsData:P,tablesData:M,extendedData:V},n}var qY=Zc(Nxe());var K1=Zc(Uxe());var sX=Zc(XCe());function tP(e){l(e)||(e=new Eh),this._clock=e,this._eventHelper=new Gr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=xe.observable(ee.now()),this.systemTime.equalityComparer=ee.equals,this.startTime=xe.observable(e.startTime),this.startTime.equalityComparer=ee.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=xe.observable(e.stopTime),this.stopTime.equalityComparer=ee.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=xe.observable(e.currentTime),this.currentTime.equalityComparer=ee.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=xe.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=xe.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=xe.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=xe.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=xe.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),xe.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(tP.prototype,{clock:{get:function(){return this._clock}}});tP.prototype.synchronize=function(){let e=this._clock;this.systemTime=ee.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate};tP.prototype.isDestroyed=function(){return!1};tP.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var rz=tP;function nyt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,ye.throwInstantiationError()}var KCe=nyt;function iyt(e,t){t=y(t,!0);let n=new _e,i=new _e;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,xe.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var xn=iyt;var aX={};aX.createCheckbox=function(e,t,n){let i=document.createElement("div"),o=document.createElement("label"),r=document.createElement("input");r.type="checkbox";let s=`checked: ${t}`;return l(n)&&(s+=`, enable: ${n}`),r.setAttribute("data-bind",s),o.appendChild(r),o.appendChild(document.createTextNode(e)),i.appendChild(o),i};aX.createSection=function(e,t,n,i){let o=document.createElement("div");o.className="cesium-cesiumInspector-section",o.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${n} }`),e.appendChild(o);let r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind",`click: ${i}`),o.appendChild(r);let s=document.createElement("div");return s.className="cesium-cesiumInspector-sectionContent",o.appendChild(s),s};var Y0=aX;function oyt(e,t,n,i,o){return n.call(i,e[t]),xe.getObservable(e,t).subscribe(n,i,o)}var Da=oyt;function $Ce(e,t){this._command=e,t=y(t,y.EMPTY_OBJECT),this.toggled=y(t.toggled,!1),this.tooltip=y(t.tooltip,""),xe.track(this,["toggled","tooltip"])}Object.defineProperties($Ce.prototype,{command:{get:function(){return this._command}}});var wC=$Ce;var ryt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},nP=Object.freeze(ryt);function Pm(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}Pm.prototype.getTexture=function(e){return this._textures[e]};function syt(e,t,n){n.resource.fetchImage().then(function(i){e._loadedImages.push({id:t,image:i,textureUniform:n})}).catch(function(){let i=e._textures[t];l(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture})}Pm.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):syt(this,e,t)};function ayt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?sz(o,r,n):cyt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function sz(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?JCe(e,n):new vt({context:n,source:t,sampler:o});return ZCe(o)&&r.generateMipmap(),r}function cyt(e,t,n){let{typedArray:i,sampler:o}=e,r=ZCe(o),s=o.wrapS===fn.REPEAT||o.wrapS===fn.MIRRORED_REPEAT||o.wrapT===fn.REPEAT||o.wrapT===fn.MIRRORED_REPEAT,{width:a,height:c}=l(i)?e:t,u=[a,c].every(R.isPowerOfTwo);if((r||s)&&!u)if(l(i)){if(e.pixelDatatype===Xe.UNSIGNED_BYTE){let d=nO(i,a,c),p=Fy(d);return sz({sampler:o},p,n)}}else{let d=Fy(t);return sz(e,d,n)}else return sz(e,t,n);return r?console.warn("Texture requires resizing for mipmaps but pixelDataType cannot be resized. The texture may be rendered incorrectly."):s&&console.warn("Texture requires resizing for wrapping but pixelDataType cannot be resized. The texture may be rendered incorrectly."),JCe(e,n)}function ZCe(e){return[Pt.NEAREST_MIPMAP_NEAREST,Pt.NEAREST_MIPMAP_LINEAR,Pt.LINEAR_MIPMAP_NEAREST,Pt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function JCe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new vt({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}Pm.prototype.update=function(e){if(e.frameNumber===this._lastUpdatedFrame)return;this._lastUpdatedFrame=e.frameNumber;let t=e.context;this._defaultTexture=t.defaultTexture;let n=this._loadedImages;for(let i=0;i<n.length;i++){let o=n[i];ayt(this,o,t)}n.length=0};Pm.prototype.isDestroyed=function(){return!1};Pm.prototype.destroy=function(){let e=this._textures;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];n!==this._defaultTexture&&n.destroy()}return ue(this)};function DC(e){e=y(e,y.EMPTY_OBJECT),this.mode=y(e.mode,Wg.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=y(e.uniforms,y.EMPTY_OBJECT),this.varyings=y(e.varyings,y.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.isTranslucent=y(e.isTranslucent,!1),this._textureManager=new Pm,this._defaultTexture=void 0,this.uniformMap=lyt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},dyt(this),hyt(this)}function lyt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===nP.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=uyt(e,i)):n[i]=fyt(e,i)}return n}function uyt(e,t){return function(){return y(e._textureManager.getTexture(t),e._defaultTexture)}}function fyt(e,t){return function(){return e.uniforms[t].value}}function vC(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function dyt(e){let t=/[vf]sInput\.attributes\.(\w+)/g,n=/[vf]sInput\.featureIds\.(\w+)/g,i=/[vf]sInput\.metadata.(\w+)/g,o,r=e.vertexShaderText;l(r)&&(o=e.usedVariablesVertex.attributeSet,vC(r,t,o),o=e.usedVariablesVertex.featureIdSet,vC(r,n,o),o=e.usedVariablesVertex.metadataSet,vC(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,vC(s,t,o),o=e.usedVariablesFragment.featureIdSet,vC(s,n,o),o=e.usedVariablesFragment.metadataSet,vC(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;vC(s,a,c)}}function QCe(e){let t=/^.*MC$/,n=/^.*WC$/,i=/^.*EC$/;return t.test(e)?`${e} (model coordinates)`:n.test(e)?`${e} (Cartesian world coordinates)`:i.test(e)?`${e} (eye coordinates)`:e}function lc(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${QCe(t)} is not available in the ${i} shader. Did you mean ${QCe(n)} instead?`;throw new ye(o)}}function hyt(e){let t=e.usedVariablesVertex.attributeSet;lc(t,"position","positionMC","vertex"),lc(t,"normal","normalMC","vertex"),lc(t,"tangent","tangentMC","vertex"),lc(t,"bitangent","bitangentMC","vertex"),lc(t,"positionWC","positionMC","vertex"),lc(t,"positionEC","positionMC","vertex"),lc(t,"normalEC","normalMC","vertex"),lc(t,"tangentEC","tangentMC","vertex"),lc(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;lc(n,"position","positionEC","fragment"),lc(n,"normal","normalEC","fragment"),lc(n,"tangent","tangentEC","fragment"),lc(n,"bitangent","bitangentEC","fragment"),lc(n,"normalMC","normalEC","fragment"),lc(n,"tangentMC","tangentEC","fragment"),lc(n,"bitangentMC","bitangentEC","fragment")}DC.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===nP.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};DC.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};DC.prototype.isDestroyed=function(){return!1};DC.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),ue(this)};function cX(e){e=y(e,y.EMPTY_OBJECT),this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=y(e.pixelFormat,ft.RGBA),this.pixelDatatype=y(e.pixelDatatype,Xe.UNSIGNED_BYTE);let t=e.url;typeof t=="string"&&(t=De.createIfNeeded(t)),this.resource=t;let i=y(e.repeat,!0)?fn.REPEAT:fn.CLAMP_TO_EDGE;this.sampler=new on({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var myt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},eAe=Object.freeze(myt);var tAe=`uniform sampler2D u_depthTexture;
|
|
9734
9734
|
varying vec2 v_textureCoordinates;
|
|
9735
9735
|
void main()
|
|
9736
9736
|
{
|
|
@@ -9760,4 +9760,4 @@ http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:functio
|
|
|
9760
9760
|
`);n.value=n.value.slice(0,i)+f+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};sa.prototype._update=function(){let e=this._tileset;if(this.performance&&this._performanceDisplay.update(),l(e)){if(e.isDestroyed()){this.tile=void 0,this.feature=void 0,this.tileset=void 0;return}let t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=sP(e,!1),this._pickStatisticsText=sP(e,!0),this._resourceCacheStatisticsText=uAe())};sa.prototype.isDestroyed=function(){return!1};sa.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){xe.getObservable(e,t).dispose()}),ue(this)};sa.getStatistics=sP;var xz=sa;function Cz(e,t){e=Dn(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new xz(t,i);this._viewModel=o,this._container=e,this._element=n;let r=document.createElement("div");r.textContent="3D Tiles Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),n.appendChild(r),n.className="cesium-cesiumInspector cesium-3DTilesInspector",n.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(n);let s=document.createElement("div");this._panel=s,s.className="cesium-cesiumInspector-dropDown",n.appendChild(s);let a=Y0.createSection,c=Y0.createCheckbox,u=a(s,"Tileset","tilesetVisible","toggleTileset"),f=a(s,"Display","displayVisible","toggleDisplay"),d=a(s,"Update","updateVisible","toggleUpdate"),p=a(s,"Logging","loggingVisible","toggleLogging"),_=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),m=a(s,"Style","styleVisible","toggleStyle"),x=a(s,"Optimization","optimizationVisible","toggleOptimization"),C=document.createElement("div");C.className="field-group";let A=document.createElement("label");A.className="field-label",A.appendChild(document.createTextNode("Properties: "));let T=document.createElement("div");T.setAttribute("data-bind","text: properties"),C.appendChild(A),C.appendChild(T),u.appendChild(C),u.appendChild(mX("togglePickTileset","Pick Tileset","pickActive")),u.appendChild(mX("trimTilesCache","Trim Tiles Cache")),u.appendChild(c("Enable Picking","picking")),f.appendChild(c("Colorize","colorize")),f.appendChild(c("Wireframe","wireframe")),f.appendChild(c("Bounding Volumes","showBoundingVolumes")),f.appendChild(c("Content Volumes","showContentBoundingVolumes")),f.appendChild(c("Request Volumes","showRequestVolumes")),f.appendChild(c("Point Cloud Shading","pointCloudShading"));let b=document.createElement("div");b.setAttribute("data-bind","visible: pointCloudShading"),b.appendChild(sh("geometricErrorScale",0,2,.01,"Geometric Error Scale")),b.appendChild(sh("maximumAttenuation",0,32,1,"Maximum Attenuation")),b.appendChild(sh("baseResolution",0,1,.01,"Base Resolution")),b.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),f.appendChild(b);let S=document.createElement("div");S.setAttribute("data-bind","visible: eyeDomeLighting"),S.appendChild(sh("eyeDomeLightingStrength",0,2,.1,"EDL Strength")),S.appendChild(sh("eyeDomeLightingRadius",0,4,.1,"EDL Radius")),b.appendChild(S),d.appendChild(c("Freeze Frame","freezeFrame")),d.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let w=document.createElement("div");w.appendChild(sh("maximumScreenSpaceError",0,128,1,"Maximum Screen Space Error")),d.appendChild(w);let D=document.createElement("div");D.setAttribute("data-bind","visible: dynamicScreenSpaceError"),D.appendChild(sh("dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"Screen Space Error Density","dynamicScreenSpaceErrorDensity")),D.appendChild(sh("dynamicScreenSpaceErrorFactor",1,10,.1,"Screen Space Error Factor")),d.appendChild(D),p.appendChild(c("Performance","performance")),p.appendChild(i),p.appendChild(c("Statistics","showStatistics"));let O=document.createElement("div");O.className="cesium-3dTilesInspector-statistics",O.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),p.appendChild(O),p.appendChild(c("Pick Statistics","showPickStatistics"));let I=document.createElement("div");I.className="cesium-3dTilesInspector-statistics",I.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),p.appendChild(I),p.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let L=document.createElement("div");L.className="cesium-3dTilesInspector-statistics",L.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),p.appendChild(L);let N=document.createElement("div");m.appendChild(N),N.appendChild(document.createTextNode("Color Blend Mode: "));let g=document.createElement("select");g.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),N.appendChild(g);let E=document.createElement("textarea");E.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),N.className="cesium-cesiumInspector-styleEditor",N.appendChild(E);let v=mX("compileStyle","Compile (Ctrl+Enter)");N.appendChild(v);let P=document.createElement("div");P.className="cesium-cesiumInspector-error",P.setAttribute("data-bind","text: editorError"),N.appendChild(P),_.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),_.appendChild(c("Geometric Error","showGeometricError")),_.appendChild(c("Rendering Statistics","showRenderingStatistics")),_.appendChild(c("Memory Usage (MB)","showMemoryUsage")),_.appendChild(c("Url","showUrl")),x.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let M=document.createElement("div");M.appendChild(sh("skipScreenSpaceErrorFactor",1,50,1,"Skip SSE Factor")),x.appendChild(M);let V=document.createElement("div");V.appendChild(sh("baseScreenSpaceError",0,4096,1,"SSE before skipping LOD")),x.appendChild(V);let U=document.createElement("div");U.appendChild(sh("skipLevels",0,10,1,"Min. levels to skip")),x.appendChild(U),x.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),x.appendChild(c("Load siblings of visible tiles","loadSiblings")),xe.applyBindings(o,n)}Object.defineProperties(Cz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Cz.prototype.isDestroyed=function(){return!1};Cz.prototype.destroy=function(){return xe.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};function sh(e,t,n,i,o,r){r=y(r,e);let s=document.createElement("input");s.setAttribute("data-bind",`value: ${r}`),s.type="number";let a=document.createElement("input");a.type="range",a.min=t,a.max=n,a.step=i,a.setAttribute("data-bind",`valueUpdate: "input", value: ${e}`);let c=document.createElement("div");c.appendChild(a);let u=document.createElement("div");return u.className="cesium-cesiumInspector-slider",u.appendChild(document.createTextNode(o)),u.appendChild(s),u.appendChild(c),u}function mX(e,t,n){let i=document.createElement("button");i.type="button",i.textContent=t,i.className="cesium-cesiumInspector-pickButton";let o=`click: ${e}`;return l(n)&&(o+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${n}}`),i.setAttribute("data-bind",o),i}var Az=Cz;function Pyt(e){let t;if(l(e)){t="Command Statistics";let n=e.commandsInFrustums;for(let i in n)if(n.hasOwnProperty(i)){let o=parseInt(i,10),r;if(o===7)r="1, 2 and 3";else{let s=[];for(let a=2;a>=0;a--){let c=Math.pow(2,a);o>=c&&(s.push(a+1),o-=c)}r=s.reverse().join(" and ")}t+=`<br> ${n[i]} in frustum ${r}`}t+=`<br>Total: ${e.totalCommands}`}return t}function pX(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var Iyt=new bn,Oyt=new h;function aP(e,t){let n=this,i=e.canvas,o=new Ku(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",xe.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=xn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=xn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=xn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=xn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=xe.getObservable(this,"frustums").subscribe(function(u){n._scene.debugShowFrustums=u,n._scene.requestRender()}),this._frustumPlanesSubscription=xe.getObservable(this,"frustumPlanes").subscribe(function(u){n._scene.debugShowFrustumPlanes=u,n._scene.requestRender()}),this._performanceSubscription=xe.getObservable(this,"performance").subscribe(function(u){u?n._performanceDisplay=new z0({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=xn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=xe.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=xn(function(){if(n.primitiveReferenceFrame){let u=n._primitive.modelMatrix;n._modelMatrixPrimitive=new Fk({modelMatrix:u}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=xe.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=xn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(u){return l(n._modelMatrixPrimitive)&&u.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?u.owner===n._primitive||u.owner===n._primitive._billboardCollection||u.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=xe.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=xe.getObservable(this,"wireframe").subscribe(function(u){r._surface.tileProvider._debug.wireframe=u,n._scene.requestRender()}),this._depthFrustumSubscription=xe.getObservable(this,"depthFrustum").subscribe(function(u){n._scene.debugShowDepthFrustum=u,n._scene.requestRender()}),this._incrementDepthFrustum=xn(function(){let u=n.depthFrustum+1;return n.depthFrustum=pX(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._decrementDepthFrustum=xn(function(){let u=n.depthFrustum-1;return n.depthFrustum=pX(1,n._numberOfFrustums,u),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=xe.getObservable(this,"suspendUpdates").subscribe(function(u){r._surface._debug.suspendLodUpdate=u,u||(n.filterTile=!1)});let s;this._showTileCoordinates=xn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new j4({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=xe.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=xe.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=xn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=xn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=xe.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(u){let f=n._scene.pick({x:u.position.x,y:u.position.y});l(f)&&(n.primitive=l(f.collection)?f.collection:f.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=xn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=xe.getObservable(this,"pickPrimitiveActive").subscribe(function(u){u?o.setInputAction(a,mn.LEFT_CLICK):o.removeInputAction(mn.LEFT_CLICK)});function c(u){let f,d=r.ellipsoid,p=n._scene.camera.getPickRay(u.position,Iyt),_=r.pick(p,n._scene,Oyt);if(l(_)){let m=d.cartesianToCartographic(_),x=r._surface.tileProvider._tilesToRenderByTextureCount;for(let C=0;!f&&C<x.length;++C){let A=x[C];if(!!l(A))for(let T=0;!f&&T<A.length;++T){let b=A[T];de.contains(b.rectangle,m)&&(f=b)}}}n.tile=f,n.pickTileActive=!1}this._pickTile=xn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=xe.getObservable(this,"pickTileActive").subscribe(function(u){u?o.setInputAction(c,mn.LEFT_CLICK):o.removeInputAction(mn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(aP.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){let e=this;return xn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return xn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return xn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return xn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return xn(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){let t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,l(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,l(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(l(e)){this.hasPickedTile=!0;let t=this._tile;if(e!==t){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;let n=e.data;l(n)&&l(n.tileBoundingRegion)?this.tileText+=`<br>Min: ${n.tileBoundingRegion.minimumHeight} Max: ${n.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}});aP.prototype._update=function(){this.frustums&&(this.frustumStatisticText=Pyt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=pX(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`};aP.prototype.isDestroyed=function(){return!1};aP.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),ue(this)};var Tz=aP;function bz(e,t){e=Dn(e);let n=document.createElement("div"),i=new Tz(t,n);this._viewModel=i,this._container=e;let o=document.createElement("div");this._element=o;let r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),o.appendChild(r),o.className="cesium-cesiumInspector",o.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);let s=document.createElement("div");this._panel=s,s.className="cesium-cesiumInspector-dropDown",o.appendChild(s);let a=Y0.createSection,c=Y0.createCheckbox,u=a(s,"General","generalVisible","toggleGeneral"),f=c("Show Frustums","frustums"),d=document.createElement("div");d.className="cesium-cesiumInspector-frustumStatistics",d.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),f.appendChild(d),u.appendChild(f),u.appendChild(c("Show Frustum Planes","frustumPlanes")),u.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",u.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),u.appendChild(p);let _=document.createElement("div");u.appendChild(_);let m=document.createElement("span");m.setAttribute("data-bind",'html: " Frustum:"'),_.appendChild(m);let x=document.createElement("span");x.setAttribute("data-bind","text: depthFrustumText"),_.appendChild(x);let C=document.createElement("input");C.type="button",C.value="-",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: decrementDepthFrustum"),_.appendChild(C);let A=document.createElement("input");A.type="button",A.value="+",A.className="cesium-cesiumInspector-pickButton",A.setAttribute("data-bind","click: incrementDepthFrustum"),_.appendChild(A);let T=a(s,"Primitives","primitivesVisible","togglePrimitives"),b=document.createElement("div");b.className="cesium-cesiumInspector-pickSection",T.appendChild(b);let S=document.createElement("input");S.type="button",S.value="Pick a primitive",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let w=document.createElement("div");w.className="cesium-cesiumInspector-center",w.appendChild(S),b.appendChild(w),b.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),b.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),b.appendChild(this._primitiveOnly);let D=a(s,"Terrain","terrainVisible","toggleTerrain"),O=document.createElement("div");O.className="cesium-cesiumInspector-pickSection",D.appendChild(O);let I=document.createElement("input");I.type="button",I.value="Pick a tile",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),w=document.createElement("div"),w.appendChild(I),w.className="cesium-cesiumInspector-center",O.appendChild(w);let L=document.createElement("div");O.appendChild(L);let N=document.createElement("input");N.type="button",N.value="Parent",N.className="cesium-cesiumInspector-pickButton",N.setAttribute("data-bind","click: selectParent");let g=document.createElement("input");g.type="button",g.value="NW",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: selectNW");let E=document.createElement("input");E.type="button",E.value="NE",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind","click: selectNE");let v=document.createElement("input");v.type="button",v.value="SW",v.className="cesium-cesiumInspector-pickButton",v.setAttribute("data-bind","click: selectSW");let P=document.createElement("input");P.type="button",P.value="SE",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectSE");let M=document.createElement("div");M.className="cesium-cesiumInspector-tileText",L.className="cesium-cesiumInspector-frustumStatistics",L.appendChild(M),L.setAttribute("data-bind","visible: hasPickedTile"),M.setAttribute("data-bind","html: tileText");let V=document.createElement("div");V.className="cesium-cesiumInspector-relativeText",V.textContent="Select relative:",L.appendChild(V);let U=document.createElement("table"),k=document.createElement("tr"),H=document.createElement("tr"),F=document.createElement("td");F.appendChild(N);let Y=document.createElement("td");Y.appendChild(g);let j=document.createElement("td");j.appendChild(E),k.appendChild(F),k.appendChild(Y),k.appendChild(j);let X=document.createElement("td"),W=document.createElement("td");W.appendChild(v);let $=document.createElement("td");$.appendChild(P),H.appendChild(X),H.appendChild(W),H.appendChild($),U.appendChild(k),U.appendChild(H),L.appendChild(U),O.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),O.appendChild(c("Show only selected","filterTile","hasPickedTile")),D.appendChild(c("Wireframe","wireframe")),D.appendChild(c("Suspend LOD update","suspendUpdates")),D.appendChild(c("Show tile coordinates","tileCoordinates")),xe.applyBindings(i,this._element)}Object.defineProperties(bz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});bz.prototype.isDestroyed=function(){return!1};bz.prototype.destroy=function(){return xe.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),ue(this)};var Ez=bz;function QE(e){return Jt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}function Ryt(e){e._renderLoopRunning=!0;let t=0;function n(i){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{let o=e._targetFrameRate;if(!l(o))e.resize(),e.render(),requestAnimationFrame(n);else{let r=1e3/o,s=i-t;s>r&&(e.resize(),e.render(),t=i-s%r),requestAnimationFrame(n)}}catch(o){if(e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors){let r="An error occurred while rendering. Rendering has stopped.";e.showErrorPanel(r,void 0,o)}}else e._renderLoopRunning=!1}requestAnimationFrame(n)}function fAe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function dAe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=fAe(e);e._canvasClientWidth=n,e._canvasClientHeight=i,n*=o,i*=o,t.width=n,t.height=i,e._canRender=n!==0&&i!==0,e._lastDevicePixelRatio=window.devicePixelRatio}function hAe(e){let t=e._canvas,n=t.width,i=t.height;if(n!==0&&i!==0){let o=e._scene.camera.frustum;l(o.aspectRatio)?o.aspectRatio=n/i:(o.top=o.right*(i/n),o.bottom=-o.top)}}function IC(e,t){e=Dn(e),t=y(t,y.EMPTY_OBJECT);let n=document.createElement("div");n.className="cesium-widget",e.appendChild(n);let i=document.createElement("canvas"),o=Et.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=Et.imageRenderingValue()),i.oncontextmenu=function(){return!1},i.onselectstart=function(){return!1};function r(){i!==i.ownerDocument.activeElement&&i.ownerDocument.activeElement.blur()}y(t.blurActiveElementOnCanvasFocus,!0)&&(i.addEventListener("mousedown",r),i.addEventListener("pointerdown",r)),n.appendChild(i);let a=document.createElement("div");a.className="cesium-widget-credits";let c=l(t.creditContainer)?Dn(t.creditContainer):n;c.appendChild(a);let u=l(t.creditViewport)?Dn(t.creditViewport):n,f=y(t.showRenderLoopErrors,!0),d=y(t.useBrowserRecommendedResolution,!0);this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=u,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=f,this._resolutionScale=1,this._useBrowserRecommendedResolution=d,this._forceResize=!1,this._clock=l(t.clock)?t.clock:new Eh,dAe(this);try{let p=new M4({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:u,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:y(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=p,p.camera.constrainedAxis=h.UNIT_Z,fAe(this),hAe(this);let _=y(p.mapProjection.ellipsoid,re.WGS84),m=t.globe;l(m)||(m=new wU(_)),m!==!1&&(p.globe=m,p.globe.shadows=y(t.terrainShadows,$t.RECEIVE_ONLY));let x=t.skyBox;l(x)||(x=new U4({sources:{positiveX:QE("px"),negativeX:QE("mx"),positiveY:QE("py"),negativeY:QE("my"),positiveZ:QE("pz"),negativeZ:QE("mz")}})),x!==!1&&(p.skyBox=x,p.sun=new W4,p.moon=new BU);let C=t.skyAtmosphere;l(C)||(C=new N4(_)),C!==!1&&(p.skyAtmosphere=C);let A=t.globe===!1?!1:t.imageryProvider;l(A)||(A=N0()),A!==!1&&p.imageryLayers.addImageryProvider(A),l(t.terrainProvider)&&t.globe!==!1&&(p.terrainProvider=t.terrainProvider),this._screenSpaceEventHandler=new Ku(i),l(t.sceneMode)&&(t.sceneMode===te.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===te.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=y(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let T=this;this._onRenderError=function(b,S){if(T._useDefaultRenderLoop=!1,T._renderLoopRunning=!1,T._showRenderLoopErrors){let w="An error occurred while rendering. Rendering has stopped.";T.showErrorPanel(w,void 0,S)}},p.renderError.addEventListener(this._onRenderError)}catch(p){if(f){let _="Error constructing CesiumWidget.",m='Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:';this.showErrorPanel(_,m,p)}throw p}}Object.defineProperties(IC.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&Ryt(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}});IC.prototype.showErrorPanel=function(e,t,n){let i=this._element,o=document.createElement("div");o.className="cesium-widget-errorPanel";let r=document.createElement("div");r.className="cesium-widget-errorPanel-content",o.appendChild(r);let s=document.createElement("div");s.className="cesium-widget-errorPanel-header",s.appendChild(document.createTextNode(e)),r.appendChild(s);let a=document.createElement("div");a.className="cesium-widget-errorPanel-scroll",r.appendChild(a);function c(){a.style.maxHeight=`${Math.max(Math.round(i.clientHeight*.9-100),30)}px`}c(),l(window.addEventListener)&&window.addEventListener("resize",c,!1);let u=l(t),f=l(n);if(u||f){let _=document.createElement("div");if(_.className="cesium-widget-errorPanel-message",a.appendChild(_),f){let m=Hm(n);u||(typeof n=="string"&&(n=new Error(n)),t=Hm({name:n.name,message:n.message}),m=n.stack),typeof console<"u"&&console.error(`${e}
|
|
9761
9761
|
${t}
|
|
9762
9762
|
${m}`);let x=document.createElement("div");x.className="cesium-widget-errorPanel-message-details collapsed";let C=document.createElement("span");C.className="cesium-widget-errorPanel-more-details",C.appendChild(document.createTextNode("See more...")),x.appendChild(C),x.onclick=function(A){x.removeChild(C),x.appendChild(document.createTextNode(m)),x.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",x.onclick=void 0},a.appendChild(x)}_.innerHTML=`<p>${t}</p>`}let d=document.createElement("div");d.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(d);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},d.appendChild(p),i.appendChild(o)};IC.prototype.isDestroyed=function(){return!1};IC.prototype.destroy=function(){l(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),ue(this)};IC.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,dAe(this),hAe(this),this._scene.requestRender())};IC.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};var Sz=IC;function wz(e,t){l(t)||(t=document.body),t=Dn(t);let n=this,i=xe.observable(Or.fullscreen),o=xe.observable(Or.enabled),r=t.ownerDocument;this.isFullscreen=void 0,xe.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,xe.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&Or.enabled)}}),this.tooltip=void 0,xe.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=xn(function(){Or.fullscreen?Or.exitFullscreen():Or.requestFullscreen(n._fullscreenElement)},xe.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=y(Dn(e),r.body),this._callback=function(){i(Or.fullscreen)},r.addEventListener(Or.changeEventName,this._callback)}Object.defineProperties(wz.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});wz.prototype.isDestroyed=function(){return!1};wz.prototype.destroy=function(){document.removeEventListener(Or.changeEventName,this._callback),ue(this)};var vz=wz;var Myt="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z",Byt="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z";function Dz(e,t){e=Dn(e);let n=new vz(t,e);n._exitFullScreenPath=Byt,n._enterFullScreenPath=Myt;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),xe.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(Dz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Dz.prototype.isDestroyed=function(){return!1};Dz.prototype.destroy=function(){return this._viewModel.destroy(),xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Pz=Dz;var mAe=1e3;function Im(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new lI,new _O({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new _e,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=_Ae,this._handleArrowUp=pAe;let t=this;this._suggestionsVisible=xe.pureComputed(function(){let o=xe.getObservable(t,"_suggestions")().length>0,r=xe.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=xn(function(i){if(i=y(i,Dy.SEARCH),t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;t.hideSuggestions(),t.isSearchInProgress?Uyt(t):Vyt(t,t._geocoderServices,i)}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38;return(r||s)&&o.preventDefault(),!0},this.handleKeyUp=function(i,o){let r=o.key==="ArrowDown"||o.key==="Down"||o.keyCode===40,s=o.key==="ArrowUp"||o.key==="Up"||o.keyCode===38,a=o.key==="Enter"||o.keyCode===13;return s?pAe(t):r?_Ae(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;yAe(t),t.destinationFound(t,o)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(i,o){i!==t._selectedSuggestion&&(t._selectedSuggestion=i)},this.keepExpanded=!1,this.autoComplete=y(e.autocomplete,!0),this.destinationFound=y(e.destinationFound,Im.flyToDestination),this._focusTextbox=!1,xe.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=xe.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){Im._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,xe.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,xe.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,xe.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(Im.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}});Im.prototype.destroy=function(){this._suggestionSubscription.dispose()};function pAe(e){if(e._suggestions.length===0)return;let t=e._suggestions.indexOf(e._selectedSuggestion);if(t===-1||t===0){e._selectedSuggestion=void 0;return}let n=t-1;e._selectedSuggestion=e._suggestions[n],Im._adjustSuggestionsScroll(e,n)}function _Ae(e){if(e._suggestions.length===0)return;let t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],Im._adjustSuggestionsScroll(e,i)}function Lyt(e,t){let n=l(t)?t.availability:void 0;return l(n)?dT(t,[e]).then(function(i){return e=i[0],e.height+=mAe,e}):(e.height+=mAe,Promise.resolve(e))}function Nyt(e,t){let n=e._scene,o=n.mapProjection.ellipsoid,r=n.camera,s=n.terrainProvider,a=t,c;return t instanceof de?R.equalsEpsilon(t.south,t.north,R.EPSILON7)&&R.equalsEpsilon(t.east,t.west,R.EPSILON7)?t=de.center(t):c=TE(t,n):t=o.cartesianToCartographic(t),l(c)||(c=Lyt(t,s)),c.then(function(u){a=o.cartographicToCartesian(u)}).finally(function(){r.flyTo({destination:a,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:B.IDENTITY})})}function Fyt(e,t,n,i){return e.then(function(o){return l(o)&&o.state==="fulfilled"&&o.value.length>0?o:t.geocode(n,i).then(function(s){return{state:"fulfilled",value:s}}).catch(function(s){return{state:"rejected",reason:s}})})}function Vyt(e,t,n){let i=e._searchText;if(gAe(i)){e.showSuggestions();return}e._isSearchInProgress=!0;let o=Promise.resolve();for(let r=0;r<t.length;r++)o=Fyt(o,t[r],i,n);e._geocodePromise=o,o.then(function(r){if(o.cancel)return;e._isSearchInProgress=!1;let s=r.value;if(r.state==="fulfilled"&&l(s)&&s.length>0){e._searchText=s[0].displayName,e.destinationFound(e,s[0].destination);return}e._searchText=`${i} (not found)`})}function kyt(e,t){let n=Dn(e._viewContainer),i=n.getElementsByClassName("search-results")[0],r=n.getElementsByTagName("li")[t];if(t===0){i.scrollTop=0;return}let s=r.offsetTop;s+r.clientHeight>i.clientHeight?i.scrollTop=s+r.clientHeight:s<i.scrollTop&&(i.scrollTop=s)}function Uyt(e){e._isSearchInProgress=!1,l(e._geocodePromise)&&(e._geocodePromise.cancel=!0,e._geocodePromise=void 0)}function gAe(e){return/^\s*$/.test(e)}function yAe(e){xe.getObservable(e,"_suggestions").removeAll()}function zyt(e){if(!e.autoComplete)return;let t=e._searchText;if(yAe(e),gAe(t))return;let n=Promise.resolve([]);return e._geocoderServices.forEach(function(i){n=n.then(function(o){return o.length>=5?o:i.geocode(t,Dy.AUTOCOMPLETE).then(function(r){return o=o.concat(r),o})})}),n.then(function(i){let o=e._suggestions;for(let r=0;r<i.length;r++)o.push(i[r])})}Im.flyToDestination=Nyt;Im._updateSearchSuggestions=zyt;Im._adjustSuggestionsScroll=kyt;var Iz=Im;var Hyt="M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",Gyt="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";function Oz(e){let t=Dn(e.container),n=new Iz(e);n._startSearchPath=Hyt,n._stopSearchPath=Gyt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),xe.applyBindings(n,i),xe.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(u){let f=u.target;typeof u.composedPath=="function"&&(f=u.composedPath()[0]),t.contains(f)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(u){n._focusTextbox=!0,n.showSuggestions()},Et.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties(Oz.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Oz.prototype.isDestroyed=function(){return!1};Oz.prototype.destroy=function(){let e=this._container;return Et.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),xe.cleanNode(this._form),xe.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),ue(this)};var Rz=Oz;function xAe(e,t){this._scene=e,this._duration=t;let n=this;this._command=xn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",xe.track(this,["tooltip"])}Object.defineProperties(xAe.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}}});var Mz=xAe;function Bz(e,t,n){e=Dn(e);let i=new Mz(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),xe.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(Bz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Bz.prototype.isDestroyed=function(){return!1};Bz.prototype.destroy=function(){return xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Lz=Bz;var Wyt="M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z",jyt="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function _X(){this._cameraClicked=new _e,this._closeClicked=new _e,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",xe.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,xe.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?jyt:Wyt}}),xe.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}_X.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(_X.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var Nz=_X;function Fz(e){e=Dn(e);let t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);let n=document.createElement("div");n.className="cesium-infoBox-title",n.setAttribute("data-bind","text: titleText"),t.appendChild(n);let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-infoBox-camera",i.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-infoBox-close",o.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),o.innerHTML="×",t.appendChild(o);let r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);let s=new Nz;xe.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,u=c.createElement("link");u.href=Jt("Widgets/InfoBox/InfoBoxDescription.css"),u.rel="stylesheet",u.type="text/css";let f=c.createElement("div");f.className="cesium-infoBox-description",c.head.appendChild(u),c.body.appendChild(f),a._descriptionSubscription=Da(s,"description",function(d){r.style.height="5px",f.innerHTML=d;let p=null,_=f.firstElementChild;if(_!==null&&f.childNodes.length===1){let x=window.getComputedStyle(_);if(x!==null){let C=x["background-color"],A=z.fromCssColorString(C);l(A)&&A.alpha!==0&&(p=x["background-color"])}}t.style["background-color"]=p;let m=f.getBoundingClientRect().height;r.style.height=`${m}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(Fz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});Fz.prototype.isDestroyed=function(){return!1};Fz.prototype.destroy=function(){let e=this._container;return xe.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),ue(this)};var Vz=Fz;function CAe(){this.showInstructions=!1;let e=this;this._command=xn(function(){e.showInstructions=!e.showInstructions}),this._showClick=xn(function(){e._touch=!1}),this._showTouch=xn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",xe.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(CAe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var kz=CAe;function Uz(e){let t=Dn(e.container),n=new kz,i=y(e.instructionsInitiallyVisible,!1);n.showInstructions=i,n._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";let o=document.createElement("span");o.className="cesium-navigationHelpButton-wrapper",t.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),o.appendChild(r);let s=document.createElement("div");s.className="cesium-navigation-help",s.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-navigation-button cesium-navigation-button-left",a.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');let c=document.createElement("img");c.src=Jt("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",a.appendChild(c),a.appendChild(document.createTextNode("Mouse"));let u=document.createElement("button");u.type="button",u.className="cesium-navigation-button cesium-navigation-button-right",u.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');let f=document.createElement("img");f.src=Jt("Widgets/Images/NavigationHelp/Touch.svg"),f.className="cesium-navigation-button-icon",f.style.width="25px",f.style.height="25px",u.appendChild(f),u.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(u);let d=document.createElement("div");d.className="cesium-click-navigation-help cesium-navigation-help-instructions",d.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),d.innerHTML=` <table> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/MouseLeft.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">Left click + drag</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/MouseRight.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Right click + drag, or</div> <div class="cesium-navigation-help-details">Mouse wheel scroll</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,s.appendChild(d);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchDrag.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-pan">Pan view</div> <div class="cesium-navigation-help-details">One finger drag</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchZoom.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-zoom">Zoom view</div> <div class="cesium-navigation-help-details">Two finger pinch</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchTilt.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Tilt view</div> <div class="cesium-navigation-help-details">Two finger drag, same direction</div> </td> </tr> <tr> <td><img src="${Jt("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,s.appendChild(p),xe.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(_){o.contains(_.target)||(n.showInstructions=!1)},Et.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(Uz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Uz.prototype.isDestroyed=function(){return!1};Uz.prototype.destroy=function(){return Et.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),xe.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var zz=Uz;function gX(e){this._scene=e.scene,this.lowFrameRateMessage=y(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,xe.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=xn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=$k.fromScene(e.scene);this._unsubscribeLowFrameRate=n.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=n.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}Object.defineProperties(gX.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});gX.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),ue(this)};var Hz=gX;function Gz(e){let t=Dn(e.container),n=new Hz(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="×",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),xe.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(Gz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Gz.prototype.isDestroyed=function(){return!1};Gz.prototype.destroy=function(){return this._viewModel.destroy(),xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var Wz=Gz;function jz(e){this._scene=e,this._orthographic=e.camera.frustum instanceof Qt,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,xe.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;xe.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=xn(function(){t.sceneMode===te.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new Gr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===te.SCENE2D||t._scene.camera.frustum instanceof Qt}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=xn(function(){t.sceneMode!==te.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=xn(function(){t.sceneMode!==te.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=te}Object.defineProperties(jz.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}});jz.prototype.isDestroyed=function(){return!1};jz.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var qz=jz;var qyt="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",Yyt="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";function Yz(e,t){e=Dn(e);let n=new qz(t);n._perspectivePath=qyt,n._orthographicPath=Yyt;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),xe.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},Et.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Yz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Yz.prototype.isDestroyed=function(){return!1};Yz.prototype.destroy=function(){return this._viewModel.destroy(),Et.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),xe.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var Xz=Yz;function Kz(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new Gr,this._eventHelper.add(e.morphStart,i),this._duration=y(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",xe.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,xe.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===te.SCENE2D?n.tooltip2D:o===te.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=xn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=xn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=xn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=xn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=te}Object.defineProperties(Kz.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}});Kz.prototype.isDestroyed=function(){return!1};Kz.prototype.destroy=function(){this._eventHelper.removeAll(),ue(this)};var $z=Kz;var Xyt="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",Kyt="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",$yt="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";function Zz(e,t,n){e=Dn(e);let i=new $z(t,n);i._globePath=Xyt,i._flatMapPath=Kyt,i._columbusViewPath=$yt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),xe.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(u){o.contains(u.target)||(i.dropDownVisible=!1)},Et.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Zz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Zz.prototype.isDestroyed=function(){return!1};Zz.prototype.destroy=function(){return this._viewModel.destroy(),Et.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),xe.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),ue(this)};var Jz=Zz;var Zyt=new G,Qz="-1000px";function cP(e,t,n){this._scene=e,this._screenPositionX=Qz,this._screenPositionY=Qz,this._tweens=e.tweens,this._container=y(n,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,xe.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,xe.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),xe.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return Qi.wgs84ToWindowCoordinates(e,i,o)}}cP.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,Zyt);if(!l(e))this._screenPositionX=Qz,this._screenPositionY=Qz;else{let t=this._container,n=t.parentNode.clientWidth,i=t.parentNode.clientHeight,o=this._selectionIndicatorElement.clientWidth,r=o*.5;e.x=Math.min(Math.max(e.x,-o),n+o)-r,e.y=Math.min(Math.max(e.y,-o),i+o)-r,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}}};cP.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Hr.EXPONENTIAL_OUT})};cP.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Hr.EXPONENTIAL_OUT})};Object.defineProperties(cP.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var e8=cP;function t8(e,t){e=Dn(e),this._container=e;let n=document.createElement("div");n.className="cesium-selection-wrapper",n.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(n),this._element=n;let i="http://www.w3.org/2000/svg",o="M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z",r=document.createElementNS(i,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");let s=document.createElementNS(i,"g");s.setAttribute("transform","translate(80,80)"),r.appendChild(s);let a=document.createElementNS(i,"path");a.setAttribute("data-bind","attr: { transform: _transform }"),a.setAttribute("d",o),s.appendChild(a),n.appendChild(r);let c=new e8(t,this._element,this._container);this._viewModel=c,xe.applyBindings(this._viewModel,this._element)}Object.defineProperties(t8.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});t8.prototype.isDestroyed=function(){return!1};t8.prototype.destroy=function(){let e=this._container;return xe.cleanNode(this._element),e.removeChild(this._element),ue(this)};var n8=t8;function OC(e,t,n){this._color=e,this._height=t,this._base=y(n,0)}OC.prototype.getHeight=function(){return this._height};OC.prototype.getBase=function(){return this._base};OC.prototype.getStartTime=function(){return this._start};OC.prototype.getStopTime=function(){return this._stop};OC.prototype.setRange=function(e,t){this._start=e,this._stop=t};OC.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){let n=ee.secondsDifference(this._start,e.epochJulian),i=Math.round(e.timeBarWidth*e.getAlpha(n)),o=ee.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(o))-i;i<0&&(r+=i,i=0),i+r>e.timeBarWidth&&(r=e.timeBarWidth-i),r>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${i.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t};var i8=OC;function AAe(e,t,n,i){this.interval=e,this.height=t,this.color=n||new z(.5,.5,.5,1),this.backgroundColor=i||new z(0,0,0,0)}AAe.prototype.render=function(e,t){let n=this.interval.start,i=this.interval.stop,o=t.startJulian,r=ee.addSeconds(t.startJulian,t.duration,new ee);if(ee.lessThan(n,o)&&ee.greaterThan(i,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(ee.lessThanOrEquals(n,r)&&ee.greaterThanOrEquals(i,o)){let s,a,c;for(s=0;s<t.timeBarWidth;++s){let u=ee.addSeconds(t.startJulian,s/t.timeBarWidth*t.duration,new ee);!l(a)&&ee.greaterThanOrEquals(u,n)?a=s:!l(c)&&ee.greaterThanOrEquals(u,i)&&(c=s)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),l(a)&&(l(c)||(c=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(a,t.y,Math.max(c-a,1),this.height))}};var o8=AAe;var yX=1e12,jf={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},qc={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},$0=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],Jyt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Yc(e,t){e=Dn(e);let n=e.ownerDocument;this.container=e;let i=n.createElement("div");i.className="cesium-timeline-main",e.appendChild(i),this._topDiv=i,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=jf.none,this._touchMode=qc.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=Qyt(this),this._onMouseUp=ext(this),this._onMouseMove=txt(this),this._onMouseWheel=nxt(this),this._onTouchStart=ixt(this),this._onTouchMove=rxt(this),this._onTouchEnd=oxt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}Yc.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};Yc.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};Yc.prototype.isDestroyed=function(){return!1};Yc.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),ue(this)};Yc.prototype.addHighlightRange=function(e,t,n){let i=new i8(e,t,n);return this._highlightRanges.push(i),this.resize(),i};Yc.prototype.addTrack=function(e,t,n,i){let o=new o8(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};Yc.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=ee.secondsDifference(t,e),this._clock&&this._clock.clockRange!==zr.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=ee.secondsDifference(o,i),s=ee.secondsDifference(i,this._startJulian),a=ee.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=ee.addSeconds(this._endJulian,s,new ee),this._startJulian=i,this._timeBarSecondsSpan=ee.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=ee.addSeconds(this._startJulian,a,new ee),this._endJulian=o,this._timeBarSecondsSpan=ee.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};Yc.prototype.zoomFrom=function(e){let t=ee.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(ee.addSeconds(this._startJulian,t-t*e,new ee),ee.addSeconds(this._endJulian,n*e-n,new ee))};function xX(e){return e<10?`0${e.toString()}`:e.toString()}Yc.prototype.makeLabel=function(e){let t=ee.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${Jyt[t.month-1]} ${t.day} ${t.year} ${xX(t.hour)}:${xX(t.minute)}:${xX(t.second)}${i}`};Yc.prototype.smallestTicInPixels=7;Yc.prototype._makeTics=function(){let e=this._timeBarEle,t=ee.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,u=1e-10,f=0,d=this._timeBarSecondsSpan;d<a?(d=a,this._timeBarSecondsSpan=a,this._endJulian=ee.addSeconds(this._startJulian,a,new ee)):d>c&&(d=c,this._timeBarSecondsSpan=c,this._endJulian=ee.addSeconds(this._startJulian,c,new ee));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let _=this._startJulian,m=Math.min(d/p*1e-5,.4),x,C=ee.toGregorianDate(_);d>31536e4?x=ee.fromDate(new Date(Date.UTC(Math.floor(C.year/100)*100,0))):d>31536e3?x=ee.fromDate(new Date(Date.UTC(Math.floor(C.year/10)*10,0))):d>86400?x=ee.fromDate(new Date(Date.UTC(C.year,0))):x=ee.fromDate(new Date(Date.UTC(C.year,C.month,C.day)));let A=ee.secondsDifference(this._startJulian,ee.addSeconds(x,m,new ee)),T=A+d;this._epochJulian=x;function b(F){return Math.floor(A/F)*F}function S(F,Y){return Math.ceil(F/Y+.5)*Y}function w(F){return(F-A)/d}function D(F,Y){return F-Y*Math.round(F/Y)}this._rulerEle.innerHTML=this.makeLabel(ee.addSeconds(this._endJulian,-a,new ee));let O=this._rulerEle.offsetWidth+20;O<30&&(O=180);let I=f;f-=u;let L={startTime:A,startJulian:_,epochJulian:x,duration:d,timeBarWidth:p,getAlpha:w};this._highlightRanges.forEach(function(F){s+=F.render(L)});let N=0,g=0,E=0,v=O/p;v>1&&(v=1),v*=this._timeBarSecondsSpan;let P=-1,M=-1,V=$0.length,U;for(U=0;U<V;++U){let F=$0[U];if(++P,N=F,F>v&&F>f)break;M<0&&p*(F/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(M=P)}if(P>0){for(;P>0;)if(--P,Math.abs(D(N,$0[P]))<1e-5){$0[P]>=f&&(g=$0[P]);break}if(M>=0)for(;M<P;){if(Math.abs(D(g,$0[M]))<1e-5&&$0[M]>=f){E=$0[M];break}++M}}f=I,f>u&&E<1e-5&&Math.abs(f-N)>u&&(E=f,f<=N+u&&(g=0));let k=-999999,H;if(p*(E/this._timeBarSecondsSpan)>=3)for(o=b(E);o<=T;o=S(o,E))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*w(o)).toString()}px;"></span>`;if(p*(g/this._timeBarSecondsSpan)>=3)for(o=b(g);o<=T;o=S(o,g))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*w(o)).toString()}px;"></span>`;if(p*(N/this._timeBarSecondsSpan)>=2){this._mainTicSpan=N,T+=N,o=b(N);let F=ee.computeTaiMinusUtc(x);for(;o<=T;){let Y=ee.addSeconds(_,o-A,new ee);if(N>2.1){let $=ee.computeTaiMinusUtc(Y);Math.abs($-F)>.1&&(o+=$-F,Y=ee.addSeconds(_,o-A,new ee))}let j=Math.round(p*w(o)),X=this.makeLabel(Y);this._rulerEle.innerHTML=X,H=this._rulerEle.offsetWidth,H<10&&(H=O);let W=j-(H/2-1);W>k?(k=W+H+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${j.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${W.toString()}px;">${X}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${j.toString()}px;"></span>`,o=S(o,N)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),L.y=0,this._trackList.forEach(function(F){F.render(r._context,L),L.y+=F.height})};Yc.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=ee.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(ee.addSeconds(this._startJulian,this._timelineDrag,new ee),ee.addSeconds(this._endJulian,this._timelineDrag,new ee)))};Yc.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=ee.addSeconds(this._startJulian,t,new ee),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function Qyt(e){return function(t){e._mouseMode!==jf.touchOnly&&(t.button===0?(e._mouseMode=jf.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=jf.zoom:e._mouseMode=jf.slide)),t.preventDefault()}}function ext(e){return function(t){e._mouseMode=jf.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function txt(e){return function(t){let n;if(e._mouseMode===jf.scrub){t.preventDefault();let i=t.clientX-e._topDiv.getBoundingClientRect().left;i<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):i>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===jf.slide){if(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0){let i=n*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(ee.addSeconds(e._startJulian,i,new ee),ee.addSeconds(e._endJulian,i,new ee))}}else e._mouseMode===jf.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function nxt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;yX=Math.max(Math.min(Math.abs(n),yX),1),n/=yX,e.zoomFrom(Math.pow(1.05,-n))}}function ixt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=jf.touchOnly,n===1?(i=ee.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=qc.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=qc.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=qc.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=qc.ignore}}function oxt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===qc.singleTap?(e._touchMode=qc.scrub,e._onTouchMove(t)):e._touchMode===qc.scrub&&e._onTouchMove(t),e._mouseMode=jf.touchOnly,n!==1?e._touchMode=n>0?qc.ignore:qc.none:e._touchMode===qc.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function rxt(e){return function(t){let n,i,o,r,s,a,c=1,u=e._topDiv.getBoundingClientRect().left;e._touchMode===qc.singleTap&&(e._touchMode=qc.slideZoom),e._mouseMode=jf.touchOnly,e._touchMode===qc.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-u,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===qc.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-u,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-u,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=ee.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new ee)):(n=e._touchState.centerX-r,a=ee.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new ee)),e.zoomTo(a,ee.addSeconds(a,e._timeBarSecondsSpan*c,new ee)),e._touchState.centerX=r,e._touchState.spanX=s))}}Yc.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var r8=Yc;function sxt(e){let t=!1,n=window.screen;return l(n)&&(l(n.lockOrientation)?t=n.lockOrientation(e):l(n.mozLockOrientation)?t=n.mozLockOrientation(e):l(n.msLockOrientation)?t=n.msLockOrientation(e):l(n.orientation&&n.orientation.lock)&&(t=n.orientation.lock(e))),t}function TAe(){let e=window.screen;l(e)&&(l(e.unlockOrientation)?e.unlockOrientation():l(e.mozUnlockOrientation)?e.mozUnlockOrientation():l(e.msUnlockOrientation)?e.msUnlockOrientation():l(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function axt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(TAe(),e._locked=!1),e._noSleep.disable(),Or.exitFullscreen(),n(!1)):(Or.fullscreen||Or.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=sxt("landscape")),t.useWebVR=!0,n(!0)))}function s8(e,t){let n=this,i=xe.observable(Or.enabled),o=xe.observable(!1);this.isVRMode=void 0,xe.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,xe.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&Or.enabled)}}),this.tooltip=void 0,xe.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=xe.observable(!1);this._isOrthographic=void 0,xe.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new Gr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof Qt)}),this._locked=!1,this._noSleep=new K1.default,this._command=xn(function(){axt(n,e,o,r)},xe.getObservable(this,"isVREnabled")),this._vrElement=y(Dn(t),document.body),this._callback=function(){!Or.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(TAe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Or.changeEventName,this._callback)}Object.defineProperties(s8.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});s8.prototype.isDestroyed=function(){return!1};s8.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Or.changeEventName,this._callback),ue(this)};var a8=s8;var cxt="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z",lxt="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z";function c8(e,t,n){e=Dn(e);let i=new a8(t,n);i._exitVRPath=lxt,i._enterVRPath=cxt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),xe.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(c8.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});c8.prototype.isDestroyed=function(){return!1};c8.prototype.destroy=function(){return this._viewModel.destroy(),xe.cleanNode(this._element),this._container.removeChild(this._element),ue(this)};var l8=c8;var Z0=new oe;function SAe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function uxt(e){let t=e.getPropertyIds(),n="";return t.forEach(function(i){let o=e.getProperty(i);l(o)&&(n+=`<tr><th>${i}</th><td>${o}</td></tr>`)}),n.length>0&&(n=`<table class="cesium-infoBox-defaultTable"><tbody>${n}</tbody></table>`),n}function fxt(e){let t,n=[],i=e.getPropertyIds();for(t=0;t<i.length;t++){let r=i[t];/^name$/i.test(r)?n[0]=e.getProperty(r):/name/i.test(r)?n[1]=e.getProperty(r):/^title$/i.test(r)?n[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?n[3]=e.getProperty(r):/element/i.test(r)?n[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(n[5]=e.getProperty(r))}let o=n.length;for(t=0;t<o;t++){let r=n[t];if(l(r)&&r!=="")return r}return"Unnamed Feature"}function bAe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=y(n.id,n.primitive.id);if(i instanceof ur)return i;if(n instanceof br)return new ur({name:fxt(n),description:uxt(n),feature:n})}if(l(e.scene.globe))return mxt(e,t.position)}var dxt=new ee;function wAe(e,t,n){if(l(n)){let i=n.clock;if(l(i)&&(i.getValue(t),l(e))){let o=i.startTime,r=i.stopTime;ee.equals(o,r)&&(r=ee.addSeconds(o,R.EPSILON2,dxt)),e.updateFromClock(),e.zoomTo(o,r)}}}var hxt=new h;function mxt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new ur({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=EAe();return}let a=s[0],c=new ur({id:a.name,description:a.description});if(l(a.position)){let u=e.scene.globe.ellipsoid.cartographicToCartesian(a.position,hxt);c.position=new pl(u)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=EAe())}),r}function EAe(){return new ur({id:"None",description:"No features found."})}function pxt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,u=e._fullscreenButton,f=e._infoBox,d=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(u)&&u.viewModel.isFullscreenEnabled&&(u.container.style.visibility=p),l(f)&&(f.container.style.visibility=p),l(d)&&(d.container.style.visibility=p),e._container){let _=t||!l(u)?0:u.container.clientWidth;e._vrButton.container.style.right=`${_}px`,e.forceResize()}}function Ei(e,t){e=Dn(e),t=y(t,y.EMPTY_OBJECT);let n=(!l(t.globe)||t.globe!==!1)&&(!l(t.baseLayerPicker)||t.baseLayerPicker!==!1),i=this,o=document.createElement("div");o.className="cesium-viewer",e.appendChild(o);let r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",o.appendChild(r);let s=document.createElement("div");s.className="cesium-viewer-bottom",o.appendChild(s);let a=y(t.scene3DOnly,!1),c,u,f=!1;l(t.clockViewModel)?(u=t.clockViewModel,c=u.clock):(c=new Eh,u=new rz(c),f=!0),l(t.shouldAnimate)&&(c.shouldAnimate=t.shouldAnimate);let d=new Sz(r,{imageryProvider:n||l(t.imageryProvider)?!1:void 0,clock:c,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=t.dataSources,_=!1;l(p)||(p=new $2,_=!0);let m=d.scene,x=new g3({scene:m,dataSourceCollection:p}),C=new Gr;C.add(c.onTick,Ei.prototype._onTick,this),C.add(m.morphStart,Ei.prototype._clearTrackedObject,this);let A;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let j=document.createElement("div");j.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(j),A=new n8(j,m)}let T;if(!l(t.infoBox)||t.infoBox!==!1){let j=document.createElement("div");j.className="cesium-viewer-infoBoxContainer",o.appendChild(j),T=new Vz(j);let X=T.viewModel;C.add(X.cameraClicked,Ei.prototype._onInfoBoxCameraClicked,this),C.add(X.closeClicked,Ei.prototype._onInfoBoxClockClicked,this)}let b=document.createElement("div");b.className="cesium-viewer-toolbar",o.appendChild(b);let S;if(!l(t.geocoder)||t.geocoder!==!1){let j=document.createElement("div");j.className="cesium-viewer-geocoderContainer",b.appendChild(j);let X;l(t.geocoder)&&typeof t.geocoder!="boolean"&&(X=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),S=new Rz({container:j,geocoderServices:X,scene:m}),C.add(S.viewModel.search.beforeExecute,Ei.prototype._clearObjects,this)}let w;(!l(t.homeButton)||t.homeButton!==!1)&&(w=new Lz(b,m),l(S)&&C.add(w.viewModel.command.afterExecute,function(){let j=S.viewModel;j.searchText="",j.isSearchInProgress&&j.search()}),C.add(w.viewModel.command.beforeExecute,Ei.prototype._clearTrackedObject,this));let D;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(D=new Jz(b,m));let O;t.projectionPicker&&(O=new Xz(b,m));let I,L;if(n){let j=y(t.imageryProviderViewModels,_z()),X=y(t.terrainProviderViewModels,gz());I=new pz(b,{globe:m.globe,imageryProviderViewModels:j,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:X,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),L=b.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.imageryProvider)&&t.imageryProvider!==!1&&(n&&(I.viewModel.selectedImagery=void 0),m.imageryLayers.removeAll(),m.imageryLayers.addImageryProvider(t.imageryProvider)),l(t.terrainProvider)&&(n&&(I.viewModel.selectedTerrain=void 0),m.terrainProvider=t.terrainProvider);let N;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let j=!0;try{if(l(window.localStorage)){let X=window.localStorage.getItem("cesium-hasSeenNavHelp");l(X)&&Boolean(X)?j=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}N=new zz({container:b,instructionsInitiallyVisible:y(t.navigationInstructionsInitiallyVisible,j)})}let g;if(!l(t.animation)||t.animation!==!1){let j=document.createElement("div");j.className="cesium-viewer-animationContainer",o.appendChild(j),g=new fz(j,new dz(u))}let E;if(!l(t.timeline)||t.timeline!==!1){let j=document.createElement("div");j.className="cesium-viewer-timelineContainer",o.appendChild(j),E=new r8(j,c),E.addEventListener("settime",SAe,!1),E.zoomTo(c.startTime,c.stopTime)}let v,P,M;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(M=document.createElement("div"),M.className="cesium-viewer-fullscreenContainer",o.appendChild(M),v=new Pz(M,t.fullscreenElement),P=Da(v.viewModel,"isFullscreenEnabled",function(j){M.style.display=j?"block":"none",l(E)&&(E.container.style.right=`${M.clientWidth}px`,E.resize())}));let V,U,k;if(t.vrButton){let j=document.createElement("div");j.className="cesium-viewer-vrContainer",o.appendChild(j),V=new l8(j,m,t.fullScreenElement),U=Da(V.viewModel,"isVREnabled",function(X){j.style.display=X?"block":"none",l(v)&&(j.style.right=`${M.clientWidth}px`),l(E)&&(E.container.style.right=`${j.clientWidth}px`,E.resize())}),k=Da(V.viewModel,"isVRMode",function(X){pxt(i,X)})}this._baseLayerPickerDropDown=L,this._fullscreenSubscription=P,this._vrSubscription=U,this._vrModeSubscription=k,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=y(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=d,this._selectionIndicator=A,this._infoBox=T,this._dataSourceCollection=p,this._destroyDataSourceCollection=_,this._dataSourceDisplay=x,this._clockViewModel=u,this._destroyClockViewModel=f,this._toolbar=b,this._homeButton=w,this._sceneModePicker=D,this._projectionPicker=O,this._baseLayerPicker=I,this._navigationHelpButton=N,this._animation=g,this._timeline=E,this._fullscreenButton=v,this._vrButton=V,this._geocoder=S,this._eventHelper=C,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=l(T)||l(A),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new _e,this._trackedEntityChanged=new _e,xe.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),C.add(p.dataSourceAdded,Ei.prototype._onDataSourceAdded,this),C.add(p.dataSourceRemoved,Ei.prototype._onDataSourceRemoved,this),C.add(m.postUpdate,Ei.prototype.resize,this),C.add(m.postRender,Ei.prototype._postRender,this);let H=p.length;for(let j=0;j<H;j++)this._dataSourceAdded(p,p.get(j));this._dataSourceAdded(void 0,x.defaultDataSource),C.add(p.dataSourceAdded,Ei.prototype._dataSourceAdded,this),C.add(p.dataSourceRemoved,Ei.prototype._dataSourceRemoved,this);function F(j){let X=bAe(i,j);l(X)?q.getValueOrUndefined(X.position,i.clock.currentTime)?i.trackedEntity=X:i.zoomTo(X):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function Y(j){i.selectedEntity=bAe(i,j)}d.screenSpaceEventHandler.setInputAction(Y,mn.LEFT_CLICK),d.screenSpaceEventHandler.setInputAction(F,mn.LEFT_DOUBLE_CLICK)}Object.defineProperties(Ei.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},selectionIndicator:{get:function(){return this._selectionIndicator}},infoBox:{get:function(){return this._infoBox}},geocoder:{get:function(){return this._geocoder}},homeButton:{get:function(){return this._homeButton}},sceneModePicker:{get:function(){return this._sceneModePicker}},projectionPicker:{get:function(){return this._projectionPicker}},baseLayerPicker:{get:function(){return this._baseLayerPicker}},navigationHelpButton:{get:function(){return this._navigationHelpButton}},animation:{get:function(){return this._animation}},timeline:{get:function(){return this._timeline}},fullscreenButton:{get:function(){return this._fullscreenButton}},vrButton:{get:function(){return this._vrButton}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(e){this.scene.shadowMap.enabled=e}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(e){this.scene.globe.shadows=e}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(e){this.scene.terrainProvider=e}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(e){this._cesiumWidget.targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(e){this._cesiumWidget.useDefaultRenderLoop=e}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(e){this._cesiumWidget.resolutionScale=e}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(e){this._cesiumWidget.useBrowserRecommendedResolution=e}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(e){this._allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._trackedEntity},set:function(e){if(this._trackedEntity!==e){this._trackedEntity=e,u8(this);let t=this.scene,n=t.mode;!l(e)||!l(e.position)?(this._needTrackedEntityUpdate=!1,(n===te.COLUMBUS_VIEW||n===te.SCENE2D)&&(t.screenSpaceCameraController.enableTranslate=!0),(n===te.COLUMBUS_VIEW||n===te.SCENE3D)&&(t.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(B.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(e),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;let t=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(e)?l(t)&&t.animateAppear():l(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(e){this._clockTrackedDataSource!==e&&(this._clockTrackedDataSource=e,wAe(this._timeline,this.clock,e))}}});Ei.prototype.extend=function(e,t){e(this,t)};Ei.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let _=this._geocoder.searchSuggestionsContainer;_.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,u,f=0,d=0,p=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let _=this._lastWidth;u=this._animation.container,n>900?(f=169,_<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):n>=600?(f=136,(_<600||_>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(f=106,(_>600||_===0)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),d=f+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let _=this._fullscreenButton,m=this._vrButton,x=c.container,C=x.style;p=x.clientHeight+3,C.left=`${f}px`;let A=0;l(_)&&(A+=_.container.clientWidth),l(m)&&(A+=m.container.clientWidth),C.right=`${A}px`,c.resize()}this._bottomContainer.style.left=`${d}px`,this._bottomContainer.style.bottom=`${p}px`,this._lastWidth=n,this._lastHeight=i};Ei.prototype.forceResize=function(){this._lastWidth=0,this.resize()};Ei.prototype.render=function(){this._cesiumWidget.render()};Ei.prototype.isDestroyed=function(){return!1};Ei.prototype.destroy=function(){let e;this.screenSpaceEventHandler.removeInputAction(mn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(mn.LEFT_DOUBLE_CLICK);let t=this.dataSources,n=t.length;for(e=0;e<n;e++)this._dataSourceRemoved(t,t.get(e));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),l(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),l(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),l(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),l(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),l(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),l(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),l(this._timeline)&&(this._timeline.removeEventListener("settime",SAe,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),l(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),l(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),l(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),l(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),ue(this)};Ei.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Ei.prototype._onEntityCollectionChanged,this)};Ei.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Ei.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};Ei.prototype._onTick=function(e){let t=e.currentTime,n=this._dataSourceDisplay.update(t);this._allowDataSourcesToSuspendAnimation&&(this._clockViewModel.canAnimate=n);let i=this._entityView;if(l(i)){let f=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(f,!1,Z0)===lt.DONE&&i.update(t,Z0)}let o,r=!1,s=this.selectedEntity,a=l(s)&&this._enableInfoOrSelection;a&&s.isShowing&&s.isAvailable(t)&&(this._dataSourceDisplay.getBoundingSphere(s,!0,Z0)!==lt.FAILED?o=Z0.center:l(s.position)&&(o=s.position.getValue(t,o)),r=l(o));let c=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(c)&&(c.position=h.clone(o,c.position),c.showSelection=a&&r,c.update());let u=l(this._infoBox)?this._infoBox.viewModel:void 0;l(u)&&(u.showInfo=a,u.enableCamera=r,u.isCameraTracking=this.trackedEntity===this.selectedEntity,a?(u.titleText=y(s.name,s.id),u.description=q.getValueOrDefault(s.description,t,"")):(u.titleText="",u.description=""))};Ei.prototype._onEntityCollectionChanged=function(e,t,n){let i=n.length;for(let o=0;o<i;o++){let r=n[o];this.trackedEntity===r&&(this.trackedEntity=void 0),this.selectedEntity===r&&(this.selectedEntity=void 0)}};Ei.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let n=this.selectedEntity.position;l(n)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};Ei.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Ei.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};Ei.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};Ei.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&wAe(this.timeline,this.clock,e)};Ei.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Ei.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Ei.prototype._onDataSourceRemoved=function(e,t){let n=this.clockTrackedDataSource===t,i=t.entities.id;if(this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0,n){let o=e.length;this._automaticallyTrackDataSourceClocks&&o>0?this.clockTrackedDataSource=e.get(o-1):this.clockTrackedDataSource=void 0}};Ei.prototype.zoomTo=function(e,t){return vAe(this,e,{offset:t},!1)};Ei.prototype.flyTo=function(e,t){return vAe(this,e,t,!0)};function vAe(e,t,n,i){u8(e);let o=new Promise(r=>{e._completeZoom=function(s){r(s)}});return e._zoomPromise=o,e._zoomIsFlight=i,e._zoomOptions=n,Promise.resolve(t).then(function(r){if(e._zoomPromise===o){if(r instanceof Vf){r.getViewableRectangle().then(function(s){return TE(s,e.scene)}).then(function(s){e._zoomPromise===o&&(e._zoomTarget=s)});return}if(r instanceof Cf){e._zoomTarget=r;return}if(r instanceof Y1){e._zoomTarget=r;return}if(r.isLoading&&l(r.loadingEvent)){let s=r.loadingEvent.addEventListener(function(){s(),e._zoomPromise===o&&(e._zoomTarget=r.entities.values.slice(0))});return}if(Array.isArray(r)){e._zoomTarget=r.slice(0);return}r=y(r.values,r),l(r.entities)&&(r=r.entities.values),Array.isArray(r)?e._zoomTarget=r.slice(0):e._zoomTarget=[r]}}),e.scene.requestRender(),o}function eS(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function u8(e){let t=e._zoomPromise;l(t)&&(eS(e),e._completeZoom(!1))}Ei.prototype._postRender=function(){_xt(this),gxt(this)};function _xt(e){let t=e._zoomTarget;if(!l(t)||e.scene.mode===te.MORPHING)return;let n=e.scene,i=n.camera,o=y(e._zoomOptions,{}),r;if(t instanceof Cf)return t.readyPromise.then(function(){let u=t.boundingSphere;l(o.offset)||(o.offset=new ju(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(t.boundingSphere,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(B.IDENTITY),e._completeZoom(!0)),eS(e)}).catch(()=>{u8(e)});if(t instanceof Y1)return t.readyPromise.then(function(){let u=t.boundingSphere;l(o.offset)||(o.offset=new ju(0,-.5,u.radius)),r={offset:o.offset,duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyToBoundingSphere(u,r):(i.viewBoundingSphere(u,o.offset),i.lookAtTransform(B.IDENTITY),e._completeZoom(!0)),eS(e)});if(t instanceof me){r={destination:n.mapProjection.ellipsoid.cartographicToCartesian(t),duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)}},e._zoomIsFlight?i.flyTo(r):(i.setView(r),e._completeZoom(!0)),eS(e);return}let s=t,a=[];for(let u=0,f=s.length;u<f;u++){let d=e._dataSourceDisplay.getBoundingSphere(s[u],!1,Z0);if(d===lt.PENDING)return;d!==lt.FAILED&&a.push(oe.clone(Z0))}if(a.length===0){u8(e);return}e.trackedEntity=void 0;let c=oe.fromBoundingSpheres(a);e._zoomIsFlight?(eS(e),i.flyToBoundingSphere(c,{duration:o.duration,maximumHeight:o.maximumHeight,complete:function(){e._completeZoom(!0)},cancel:function(){e._completeZoom(!1)},offset:o.offset})):(i.viewBoundingSphere(c,o.offset),i.lookAtTransform(B.IDENTITY),eS(e),e._completeZoom(!0))}function gxt(e){if(!e._needTrackedEntityUpdate)return;let t=e._trackedEntity,n=e.clock.currentTime,i=q.getValueOrUndefined(t.position,n);if(!l(i))return;let o=e.scene,r=e._dataSourceDisplay.getBoundingSphere(t,!1,Z0);if(r===lt.PENDING)return;let s=o.mode;(s===te.COLUMBUS_VIEW||s===te.SCENE2D)&&(o.screenSpaceCameraController.enableTranslate=!1),(s===te.COLUMBUS_VIEW||s===te.SCENE3D)&&(o.screenSpaceCameraController.enableTilt=!1);let a=r!==lt.FAILED?Z0:void 0;e._entityView=new C3(t,o,o.mapProjection.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var DAe=Ei;function yxt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new Az(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var PAe=yxt;function xxt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new Ez(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var IAe=xxt;function Cxt(e,t){t=y(t,y.EMPTY_OBJECT);let n=!0,i=y(t.flyToOnDrop,!0),o=new _e,r=y(t.clearOnDrop,!0),s=y(t.dropTarget,e.container),a=y(t.clampToGround,!0),c=t.proxy;s=Dn(s),Object.defineProperties(e,{dropTarget:{get:function(){return s},set:function(f){OAe(s,u),s=f,CX(s,u)}},dropEnabled:{get:function(){return n},set:function(f){f!==n&&(f?CX(s,u):OAe(s,u),n=f)}},dropError:{get:function(){return o}},clearOnDrop:{get:function(){return r},set:function(f){r=f}},flyToOnDrop:{get:function(){return i},set:function(f){i=f}},proxy:{get:function(){return c},set:function(f){c=f}},clampToGround:{get:function(){return a},set:function(f){a=f}}});function u(f){RC(f),r&&(e.entities.removeAll(),e.dataSources.removeAll());let d=f.dataTransfer.files,p=d.length;for(let _=0;_<p;_++){let m=d[_],x=new FileReader;x.onload=Axt(e,m,c,a),x.onerror=Txt(e,m),x.readAsText(m)}}CX(s,u),e.destroy=QO(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=u}function RC(e){e.stopPropagation(),e.preventDefault()}function OAe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",RC,!1),n.removeEventListener("dragover",RC,!1),n.removeEventListener("dragexit",RC,!1))}function CX(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",RC,!1),e.addEventListener("dragover",RC,!1),e.addEventListener("dragexit",RC,!1)}function Axt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=X2.load(JSON.parse(r.target.result),{sourceUri:s});else if(/\.geojson$/i.test(s)||/\.json$/i.test(s)||/\.topojson$/i.test(s))a=hV.load(JSON.parse(r.target.result),{sourceUri:s,clampToGround:i});else if(/\.(kml|kmz)$/i.test(s))a=GV.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=PV.load(t,{sourceUri:s,proxy:n});else{e.dropError.raiseEvent(e,s,`Unrecognized file: ${s}`);return}l(a)&&e.dataSources.add(a).then(function(c){e.flyToOnDrop&&e.flyTo(c)}).catch(function(c){e.dropError.raiseEvent(e,s,c)})}catch(a){e.dropError.raiseEvent(e,s,a)}}}function Txt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var RAe=Cxt;function bxt(e,t){t=y(t,y.EMPTY_OBJECT);let n=new Wz({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var MAe=bxt;function Ext(e,t,n){let i;try{return i=e(t,n),i}catch(o){return Promise.reject(o)}}function Sxt(e){let t;return function(n){let i=n.data,o=[],r={id:i.id,result:void 0,error:void 0};return Promise.resolve(Ext(e,i.parameters,o)).then(function(s){r.result=s}).catch(function(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}).finally(function(){l(t)||(t=y(self.webkitPostMessage,self.postMessage)),i.canTransferArrayBuffer||(o.length=0);try{t(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Hm(s)}
|
|
9763
|
-
with responseMessage: ${JSON.stringify(r)}`,t(r)}})}}var BAe=Sxt;var wxt="1.96";return YAe(vxt);})();
|
|
9763
|
+
with responseMessage: ${JSON.stringify(r)}`,t(r)}})}}var BAe=Sxt;var wxt="1.96.3";return YAe(vxt);})();
|