@pggis/pg-sdk 5.1.16 → 5.1.25

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.
Files changed (108) hide show
  1. package/dist/index.js +717 -96
  2. package/dist/pggis.min.js +5082 -4451
  3. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
  4. package/dist/resources/Workers/{chunk-AJYK4IVJ.js → chunk-335F4KMR.js} +2 -2
  5. package/dist/resources/Workers/chunk-3FFM6NRK.js +26 -0
  6. package/dist/resources/Workers/{chunk-QOUAJ6TL.js → chunk-46IDNOB6.js} +2 -2
  7. package/dist/resources/Workers/{chunk-IYTZ52EY.js → chunk-4QCIHDA2.js} +2 -2
  8. package/dist/resources/Workers/{chunk-AU7IKHOH.js → chunk-5EZKANRV.js} +2 -2
  9. package/dist/resources/Workers/{chunk-7HTKERZY.js → chunk-5GVU4LLW.js} +2 -2
  10. package/dist/resources/Workers/chunk-6EFYFFBI.js +26 -0
  11. package/dist/resources/Workers/{chunk-VTBDSFTG.js → chunk-72ENFGTU.js} +2 -2
  12. package/dist/resources/Workers/{chunk-A56XVLQR.js → chunk-7IBY6LYM.js} +2 -2
  13. package/dist/resources/Workers/{chunk-ED5JPB3S.js → chunk-7RJW35V3.js} +2 -2
  14. package/dist/resources/Workers/{chunk-NB3ML6JO.js → chunk-ABHTLV4B.js} +2 -2
  15. package/dist/resources/Workers/{chunk-D6AA5QVT.js → chunk-AHKBUIAX.js} +2 -2
  16. package/dist/resources/Workers/{chunk-GBYLG25F.js → chunk-AOSK7NDA.js} +1 -1
  17. package/dist/resources/Workers/{chunk-J6UP6FLE.js → chunk-ATTMFTQ4.js} +1 -1
  18. package/dist/resources/Workers/{chunk-DEPHB2WM.js → chunk-BCYX7GBY.js} +2 -2
  19. package/dist/resources/Workers/{chunk-RCV6KWXS.js → chunk-BDLVVHOG.js} +2 -2
  20. package/dist/resources/Workers/{chunk-TCGIRNHN.js → chunk-BGQDOF2W.js} +2 -2
  21. package/dist/resources/Workers/{chunk-5YEWO3HT.js → chunk-BTPJ3H6N.js} +2 -2
  22. package/dist/resources/Workers/{chunk-PSPPBZWI.js → chunk-DGGIK7AD.js} +3 -3
  23. package/dist/resources/Workers/{chunk-FEVXJ54I.js → chunk-DSXZVGY7.js} +2 -2
  24. package/dist/resources/Workers/{chunk-UP6I5URU.js → chunk-F7XR2IV5.js} +2 -2
  25. package/dist/resources/Workers/{chunk-64RSHJUE.js → chunk-FCVV6A2F.js} +2 -2
  26. package/dist/resources/Workers/{chunk-VTAIKJXX.js → chunk-GBI3IATP.js} +1 -1
  27. package/dist/resources/Workers/{chunk-WZDE3RYP.js → chunk-GRCPCORO.js} +2 -2
  28. package/dist/resources/Workers/{chunk-DMEY62ID.js → chunk-HLFNWOQ4.js} +2 -2
  29. package/dist/resources/Workers/{chunk-CNCV5UL7.js → chunk-HMV6ETSJ.js} +2 -2
  30. package/dist/resources/Workers/{chunk-3W4GT7KQ.js → chunk-I3XHKING.js} +2 -2
  31. package/dist/resources/Workers/{chunk-EZUYS2JF.js → chunk-I7WJS3WM.js} +2 -2
  32. package/dist/resources/Workers/{chunk-OSW76XDF.js → chunk-JOXXXMPE.js} +1 -1
  33. package/dist/resources/Workers/{chunk-CYCB63OH.js → chunk-JU23HGY3.js} +2 -2
  34. package/dist/resources/Workers/{chunk-U4IEOH5K.js → chunk-KORWG3CG.js} +2 -2
  35. package/dist/resources/Workers/{chunk-WGGIH7QW.js → chunk-KTDI3TD2.js} +2 -2
  36. package/dist/resources/Workers/{chunk-D6C66QON.js → chunk-LIEFEM73.js} +2 -2
  37. package/dist/resources/Workers/{chunk-OFUUQVMR.js → chunk-LNFOIPBT.js} +2 -2
  38. package/dist/resources/Workers/{chunk-G5AGHVVC.js → chunk-N6G72L23.js} +2 -2
  39. package/dist/resources/Workers/{chunk-VW6VD53G.js → chunk-NU4XOT2V.js} +2 -2
  40. package/dist/resources/Workers/{chunk-3SSKC3VN.js → chunk-PO64KPKA.js} +2 -2
  41. package/dist/resources/Workers/{chunk-B4AA3ARO.js → chunk-PQSWZ6QE.js} +2 -2
  42. package/dist/resources/Workers/{chunk-M3MGYQSL.js → chunk-QGPFMASY.js} +1 -1
  43. package/dist/resources/Workers/{chunk-DQQ63PYM.js → chunk-QJG5NRTN.js} +2 -2
  44. package/dist/resources/Workers/{chunk-LEYMRMBK.js → chunk-R3KD5ZAI.js} +2 -2
  45. package/dist/resources/Workers/{chunk-XRL4AVS5.js → chunk-RQ3X5FSK.js} +2 -2
  46. package/dist/resources/Workers/{chunk-HMIYSTF6.js → chunk-SNN6UCXM.js} +2 -2
  47. package/dist/resources/Workers/{chunk-N4VJKXZS.js → chunk-SPVHGWGM.js} +2 -2
  48. package/dist/resources/Workers/{chunk-WWA5PL4H.js → chunk-SRJEQ4WA.js} +2 -2
  49. package/dist/resources/Workers/{chunk-4IW2T6GF.js → chunk-VMOPYKP4.js} +2 -2
  50. package/dist/resources/Workers/{chunk-HWXX4CWK.js → chunk-WNAZRVVU.js} +2 -2
  51. package/dist/resources/Workers/{chunk-35SHYARM.js → chunk-WQBKKXJC.js} +2 -2
  52. package/dist/resources/Workers/{chunk-37F5JSTI.js → chunk-Y53SIX6D.js} +2 -2
  53. package/dist/resources/Workers/{chunk-ARG42DC4.js → chunk-YC4EEWUJ.js} +2 -2
  54. package/dist/resources/Workers/{chunk-HTFSEEMT.js → chunk-YDUNCXSU.js} +2 -2
  55. package/dist/resources/Workers/{chunk-GILIDQNQ.js → chunk-YL47XCQ4.js} +2 -2
  56. package/dist/resources/Workers/combineGeometry.js +2 -2
  57. package/dist/resources/Workers/createBoxGeometry.js +2 -2
  58. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -2
  59. package/dist/resources/Workers/createCircleGeometry.js +2 -2
  60. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -2
  61. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -2
  62. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
  63. package/dist/resources/Workers/createCorridorGeometry.js +2 -2
  64. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -2
  65. package/dist/resources/Workers/createCylinderGeometry.js +2 -2
  66. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -2
  67. package/dist/resources/Workers/createEllipseGeometry.js +2 -2
  68. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -2
  69. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -2
  70. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -2
  71. package/dist/resources/Workers/createFrustumGeometry.js +2 -2
  72. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -2
  73. package/dist/resources/Workers/createGeometry.js +2 -2
  74. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -2
  75. package/dist/resources/Workers/createPlaneGeometry.js +2 -2
  76. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -2
  77. package/dist/resources/Workers/createPolygonGeometry.js +2 -2
  78. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -2
  79. package/dist/resources/Workers/createPolylineGeometry.js +2 -2
  80. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -2
  81. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
  82. package/dist/resources/Workers/createRectangleGeometry.js +2 -2
  83. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -2
  84. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -2
  85. package/dist/resources/Workers/createSphereGeometry.js +2 -2
  86. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -2
  87. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -2
  88. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -2
  89. package/dist/resources/Workers/createVectorTileGeometries.js +2 -2
  90. package/dist/resources/Workers/createVectorTilePoints.js +2 -2
  91. package/dist/resources/Workers/createVectorTilePolygons.js +2 -2
  92. package/dist/resources/Workers/createVectorTilePolylines.js +2 -2
  93. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
  94. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2
  95. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
  96. package/dist/resources/Workers/createWallGeometry.js +2 -2
  97. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -2
  98. package/dist/resources/Workers/decodeDraco.js +2 -2
  99. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  100. package/dist/resources/Workers/decodeI3S.js +2 -2
  101. package/dist/resources/Workers/gaussianSplatSorter.js +2 -2
  102. package/dist/resources/Workers/gaussianSplatTextureGenerator.js +2 -2
  103. package/dist/resources/Workers/transcodeKTX2.js +2 -2
  104. package/dist/resources/Workers/transferTypedArrayTest.js +1 -1
  105. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -2
  106. package/package.json +3 -3
  107. package/dist/resources/Workers/chunk-77IHZJJ3.js +0 -26
  108. package/dist/resources/Workers/chunk-QN3VOORQ.js +0 -26
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as g,b as d}from"./chunk-4IW2T6GF.js";import{h as x}from"./chunk-PSPPBZWI.js";import{b as p,c as M,d as O}from"./chunk-64RSHJUE.js";import{b as m}from"./chunk-LEYMRMBK.js";import{e as f}from"./chunk-VTAIKJXX.js";function n(i,h,o,t){this.x=i??0,this.y=h??0,this.width=o??0,this.height=t??0}n.packedLength=4;n.pack=function(i,h,o){return m.typeOf.object("value",i),m.defined("array",h),o=o??0,h[o++]=i.x,h[o++]=i.y,h[o++]=i.width,h[o]=i.height,h};n.unpack=function(i,h,o){return m.defined("array",i),h=h??0,f(o)||(o=new n),o.x=i[h++],o.y=i[h++],o.width=i[h++],o.height=i[h],o};n.fromPoints=function(i,h){if(f(h)||(h=new n),!f(i)||i.length===0)return h.x=0,h.y=0,h.width=0,h.height=0,h;let o=i.length,t=i[0].x,c=i[0].y,e=i[0].x,w=i[0].y;for(let y=1;y<o;y++){let R=i[y],b=R.x,j=R.y;t=Math.min(b,t),e=Math.max(b,e),c=Math.min(j,c),w=Math.max(j,w)}return h.x=t,h.y=c,h.width=e-t,h.height=w-c,h};var L=new g,X=new p,Y=new p;n.fromRectangle=function(i,h,o){if(f(o)||(o=new n),!f(i))return o.x=0,o.y=0,o.width=0,o.height=0,o;L._ellipsoid=O.default,h=h??L;let t=h.project(x.southwest(i,X)),c=h.project(x.northeast(i,Y));return M.subtract(c,t,c),o.x=t.x,o.y=t.y,o.width=c.x,o.height=c.y,o};n.clone=function(i,h){if(f(i))return f(h)?(h.x=i.x,h.y=i.y,h.width=i.width,h.height=i.height,h):new n(i.x,i.y,i.width,i.height)};n.union=function(i,h,o){m.typeOf.object("left",i),m.typeOf.object("right",h),f(o)||(o=new n);let t=Math.min(i.x,h.x),c=Math.min(i.y,h.y),e=Math.max(i.x+i.width,h.x+h.width),w=Math.max(i.y+i.height,h.y+h.height);return o.x=t,o.y=c,o.width=e-t,o.height=w-c,o};n.expand=function(i,h,o){m.typeOf.object("rectangle",i),m.typeOf.object("point",h),o=n.clone(i,o);let t=h.x-o.x,c=h.y-o.y;return t>o.width?o.width=t:t<0&&(o.width-=t,o.x=h.x),c>o.height?o.height=c:c<0&&(o.height-=c,o.y=h.y),o};n.intersect=function(i,h){m.typeOf.object("left",i),m.typeOf.object("right",h);let o=i.x,t=i.y,c=h.x,e=h.y;return o>c+h.width||o+i.width<c||t+i.height<e||t>e+h.height?d.OUTSIDE:d.INTERSECTING};n.equals=function(i,h){return i===h||f(i)&&f(h)&&i.x===h.x&&i.y===h.y&&i.width===h.width&&i.height===h.height};n.prototype.clone=function(i){return n.clone(this,i)};n.prototype.intersect=function(i){return n.intersect(this,i)};n.prototype.equals=function(i){return n.equals(this,i)};var S=n;export{S as a};
26
+ import{a as g,b as d}from"./chunk-VMOPYKP4.js";import{h as x}from"./chunk-DGGIK7AD.js";import{b as p,c as M,d as O}from"./chunk-FCVV6A2F.js";import{b as m}from"./chunk-R3KD5ZAI.js";import{e as f}from"./chunk-GBI3IATP.js";function n(i,h,o,t){this.x=i??0,this.y=h??0,this.width=o??0,this.height=t??0}n.packedLength=4;n.pack=function(i,h,o){return m.typeOf.object("value",i),m.defined("array",h),o=o??0,h[o++]=i.x,h[o++]=i.y,h[o++]=i.width,h[o]=i.height,h};n.unpack=function(i,h,o){return m.defined("array",i),h=h??0,f(o)||(o=new n),o.x=i[h++],o.y=i[h++],o.width=i[h++],o.height=i[h],o};n.fromPoints=function(i,h){if(f(h)||(h=new n),!f(i)||i.length===0)return h.x=0,h.y=0,h.width=0,h.height=0,h;let o=i.length,t=i[0].x,c=i[0].y,e=i[0].x,w=i[0].y;for(let y=1;y<o;y++){let R=i[y],b=R.x,j=R.y;t=Math.min(b,t),e=Math.max(b,e),c=Math.min(j,c),w=Math.max(j,w)}return h.x=t,h.y=c,h.width=e-t,h.height=w-c,h};var L=new g,X=new p,Y=new p;n.fromRectangle=function(i,h,o){if(f(o)||(o=new n),!f(i))return o.x=0,o.y=0,o.width=0,o.height=0,o;L._ellipsoid=O.default,h=h??L;let t=h.project(x.southwest(i,X)),c=h.project(x.northeast(i,Y));return M.subtract(c,t,c),o.x=t.x,o.y=t.y,o.width=c.x,o.height=c.y,o};n.clone=function(i,h){if(f(i))return f(h)?(h.x=i.x,h.y=i.y,h.width=i.width,h.height=i.height,h):new n(i.x,i.y,i.width,i.height)};n.union=function(i,h,o){m.typeOf.object("left",i),m.typeOf.object("right",h),f(o)||(o=new n);let t=Math.min(i.x,h.x),c=Math.min(i.y,h.y),e=Math.max(i.x+i.width,h.x+h.width),w=Math.max(i.y+i.height,h.y+h.height);return o.x=t,o.y=c,o.width=e-t,o.height=w-c,o};n.expand=function(i,h,o){m.typeOf.object("rectangle",i),m.typeOf.object("point",h),o=n.clone(i,o);let t=h.x-o.x,c=h.y-o.y;return t>o.width?o.width=t:t<0&&(o.width-=t,o.x=h.x),c>o.height?o.height=c:c<0&&(o.height-=c,o.y=h.y),o};n.intersect=function(i,h){m.typeOf.object("left",i),m.typeOf.object("right",h);let o=i.x,t=i.y,c=h.x,e=h.y;return o>c+h.width||o+i.width<c||t+i.height<e||t>e+h.height?d.OUTSIDE:d.INTERSECTING};n.equals=function(i,h){return i===h||f(i)&&f(h)&&i.x===h.x&&i.y===h.y&&i.width===h.width&&i.height===h.height};n.prototype.clone=function(i){return n.clone(this,i)};n.prototype.intersect=function(i){return n.intersect(this,i)};n.prototype.equals=function(i){return n.equals(this,i)};var S=n;export{S as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as F}from"./chunk-GBYLG25F.js";import{a as Z}from"./chunk-OFUUQVMR.js";import{a as X}from"./chunk-A56XVLQR.js";import{b as K,c as Q,d as U}from"./chunk-RCV6KWXS.js";import{d as H}from"./chunk-4IW2T6GF.js";import{a as y}from"./chunk-AU7IKHOH.js";import{a as r,d as J,f as V}from"./chunk-64RSHJUE.js";import{a as N}from"./chunk-3SSKC3VN.js";import{a as b}from"./chunk-LEYMRMBK.js";import{e as R}from"./chunk-VTAIKJXX.js";var ii=new r(1,1,1),B=Math.cos,S=Math.sin;function v(t){t=t??V.EMPTY_OBJECT;let o=t.radii??ii,n=t.innerRadii??o,C=t.minimumClock??0,P=t.maximumClock??N.TWO_PI,h=t.minimumCone??0,k=t.maximumCone??N.PI,s=Math.round(t.stackPartitions??10),w=Math.round(t.slicePartitions??8),m=Math.round(t.subdivisions??128);if(s<1)throw new b("options.stackPartitions cannot be less than 1");if(w<0)throw new b("options.slicePartitions cannot be less than 0");if(m<0)throw new b("options.subdivisions must be greater than or equal to zero.");if(R(t.offsetAttribute)&&t.offsetAttribute===F.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=r.clone(o),this._innerRadii=r.clone(n),this._minimumClock=C,this._maximumClock=P,this._minimumCone=h,this._maximumCone=k,this._stackPartitions=s,this._slicePartitions=w,this._subdivisions=m,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}v.packedLength=2*r.packedLength+8;v.pack=function(t,o,n){if(!R(t))throw new b("value is required");if(!R(o))throw new b("array is required");return n=n??0,r.pack(t._radii,o,n),n+=r.packedLength,r.pack(t._innerRadii,o,n),n+=r.packedLength,o[n++]=t._minimumClock,o[n++]=t._maximumClock,o[n++]=t._minimumCone,o[n++]=t._maximumCone,o[n++]=t._stackPartitions,o[n++]=t._slicePartitions,o[n++]=t._subdivisions,o[n]=t._offsetAttribute??-1,o};var $=new r,G=new r,l={radii:$,innerRadii:G,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};v.unpack=function(t,o,n){if(!R(t))throw new b("array is required");o=o??0;let C=r.unpack(t,o,$);o+=r.packedLength;let P=r.unpack(t,o,G);o+=r.packedLength;let h=t[o++],k=t[o++],s=t[o++],w=t[o++],m=t[o++],f=t[o++],T=t[o++],a=t[o];return R(n)?(n._radii=r.clone(C,n._radii),n._innerRadii=r.clone(P,n._innerRadii),n._minimumClock=h,n._maximumClock=k,n._minimumCone=s,n._maximumCone=w,n._stackPartitions=m,n._slicePartitions=f,n._subdivisions=T,n._offsetAttribute=a===-1?void 0:a,n):(l.minimumClock=h,l.maximumClock=k,l.minimumCone=s,l.maximumCone=w,l.stackPartitions=m,l.slicePartitions=f,l.subdivisions=T,l.offsetAttribute=a===-1?void 0:a,new v(l))};v.createGeometry=function(t){let o=t._radii;if(o.x<=0||o.y<=0||o.z<=0)return;let n=t._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let C=t._minimumClock,P=t._maximumClock,h=t._minimumCone,k=t._maximumCone,s=t._subdivisions,w=J.fromCartesian3(o),m=t._slicePartitions+1,f=t._stackPartitions+1;m=Math.round(m*Math.abs(P-C)/N.TWO_PI),f=Math.round(f*Math.abs(k-h)/N.PI),m<2&&(m=2),f<2&&(f=2);let T=0,a=1,x=n.x!==o.x||n.y!==o.y||n.z!==o.z,W=!1,Y=!1;x&&(a=2,h>0&&(W=!0,T+=m),k<Math.PI&&(Y=!0,T+=m));let q=s*a*(f+m),u=new Float64Array(q*3),g=2*(q+T-(m+f)*a),d=Z.createTypedArray(q,g),i,e,E,z,c=0,_=new Array(f),A=new Array(f);for(i=0;i<f;i++)z=h+i*(k-h)/(f-1),_[i]=S(z),A[i]=B(z);let O=new Array(s),M=new Array(s);for(i=0;i<s;i++)E=C+i*(P-C)/(s-1),O[i]=S(E),M[i]=B(E);for(i=0;i<f;i++)for(e=0;e<s;e++)u[c++]=o.x*_[i]*M[e],u[c++]=o.y*_[i]*O[e],u[c++]=o.z*A[i];if(x)for(i=0;i<f;i++)for(e=0;e<s;e++)u[c++]=n.x*_[i]*M[e],u[c++]=n.y*_[i]*O[e],u[c++]=n.z*A[i];for(_.length=s,A.length=s,i=0;i<s;i++)z=h+i*(k-h)/(s-1),_[i]=S(z),A[i]=B(z);for(O.length=m,M.length=m,i=0;i<m;i++)E=C+i*(P-C)/(m-1),O[i]=S(E),M[i]=B(E);for(i=0;i<s;i++)for(e=0;e<m;e++)u[c++]=o.x*_[i]*M[e],u[c++]=o.y*_[i]*O[e],u[c++]=o.z*A[i];if(x)for(i=0;i<s;i++)for(e=0;e<m;e++)u[c++]=n.x*_[i]*M[e],u[c++]=n.y*_[i]*O[e],u[c++]=n.z*A[i];for(c=0,i=0;i<f*a;i++){let p=i*s;for(e=0;e<s-1;e++)d[c++]=p+e,d[c++]=p+e+1}let L=f*s*a;for(i=0;i<m;i++)for(e=0;e<s-1;e++)d[c++]=L+i+e*m,d[c++]=L+i+(e+1)*m;if(x)for(L=f*s*a+m*s,i=0;i<m;i++)for(e=0;e<s-1;e++)d[c++]=L+i+e*m,d[c++]=L+i+(e+1)*m;if(x){let p=f*s*a,D=p+s*m;if(W)for(i=0;i<m;i++)d[c++]=p+i,d[c++]=D+i;if(Y)for(p+=s*m-m,D+=s*m-m,i=0;i<m;i++)d[c++]=p+i,d[c++]=D+i}let j=new X({position:new U({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:u})});if(R(t._offsetAttribute)){let p=u.length,D=t._offsetAttribute===F.NONE?0:1,I=new Uint8Array(p/3).fill(D);j.applyOffset=new U({componentDatatype:y.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new Q({attributes:j,indices:d,primitiveType:K.LINES,boundingSphere:H.fromEllipsoid(w),offsetAttribute:t._offsetAttribute})};var Ci=v;export{Ci as a};
26
+ import{a as F}from"./chunk-AOSK7NDA.js";import{a as Z}from"./chunk-LNFOIPBT.js";import{a as X}from"./chunk-7IBY6LYM.js";import{b as K,c as Q,d as U}from"./chunk-BDLVVHOG.js";import{d as H}from"./chunk-VMOPYKP4.js";import{a as y}from"./chunk-5EZKANRV.js";import{a as r,d as J,f as V}from"./chunk-FCVV6A2F.js";import{a as N}from"./chunk-PO64KPKA.js";import{a as b}from"./chunk-R3KD5ZAI.js";import{e as R}from"./chunk-GBI3IATP.js";var ii=new r(1,1,1),B=Math.cos,S=Math.sin;function v(t){t=t??V.EMPTY_OBJECT;let o=t.radii??ii,n=t.innerRadii??o,C=t.minimumClock??0,P=t.maximumClock??N.TWO_PI,h=t.minimumCone??0,k=t.maximumCone??N.PI,s=Math.round(t.stackPartitions??10),w=Math.round(t.slicePartitions??8),m=Math.round(t.subdivisions??128);if(s<1)throw new b("options.stackPartitions cannot be less than 1");if(w<0)throw new b("options.slicePartitions cannot be less than 0");if(m<0)throw new b("options.subdivisions must be greater than or equal to zero.");if(R(t.offsetAttribute)&&t.offsetAttribute===F.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=r.clone(o),this._innerRadii=r.clone(n),this._minimumClock=C,this._maximumClock=P,this._minimumCone=h,this._maximumCone=k,this._stackPartitions=s,this._slicePartitions=w,this._subdivisions=m,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}v.packedLength=2*r.packedLength+8;v.pack=function(t,o,n){if(!R(t))throw new b("value is required");if(!R(o))throw new b("array is required");return n=n??0,r.pack(t._radii,o,n),n+=r.packedLength,r.pack(t._innerRadii,o,n),n+=r.packedLength,o[n++]=t._minimumClock,o[n++]=t._maximumClock,o[n++]=t._minimumCone,o[n++]=t._maximumCone,o[n++]=t._stackPartitions,o[n++]=t._slicePartitions,o[n++]=t._subdivisions,o[n]=t._offsetAttribute??-1,o};var $=new r,G=new r,l={radii:$,innerRadii:G,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};v.unpack=function(t,o,n){if(!R(t))throw new b("array is required");o=o??0;let C=r.unpack(t,o,$);o+=r.packedLength;let P=r.unpack(t,o,G);o+=r.packedLength;let h=t[o++],k=t[o++],s=t[o++],w=t[o++],m=t[o++],f=t[o++],T=t[o++],a=t[o];return R(n)?(n._radii=r.clone(C,n._radii),n._innerRadii=r.clone(P,n._innerRadii),n._minimumClock=h,n._maximumClock=k,n._minimumCone=s,n._maximumCone=w,n._stackPartitions=m,n._slicePartitions=f,n._subdivisions=T,n._offsetAttribute=a===-1?void 0:a,n):(l.minimumClock=h,l.maximumClock=k,l.minimumCone=s,l.maximumCone=w,l.stackPartitions=m,l.slicePartitions=f,l.subdivisions=T,l.offsetAttribute=a===-1?void 0:a,new v(l))};v.createGeometry=function(t){let o=t._radii;if(o.x<=0||o.y<=0||o.z<=0)return;let n=t._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let C=t._minimumClock,P=t._maximumClock,h=t._minimumCone,k=t._maximumCone,s=t._subdivisions,w=J.fromCartesian3(o),m=t._slicePartitions+1,f=t._stackPartitions+1;m=Math.round(m*Math.abs(P-C)/N.TWO_PI),f=Math.round(f*Math.abs(k-h)/N.PI),m<2&&(m=2),f<2&&(f=2);let T=0,a=1,x=n.x!==o.x||n.y!==o.y||n.z!==o.z,W=!1,Y=!1;x&&(a=2,h>0&&(W=!0,T+=m),k<Math.PI&&(Y=!0,T+=m));let q=s*a*(f+m),u=new Float64Array(q*3),g=2*(q+T-(m+f)*a),d=Z.createTypedArray(q,g),i,e,E,z,c=0,_=new Array(f),A=new Array(f);for(i=0;i<f;i++)z=h+i*(k-h)/(f-1),_[i]=S(z),A[i]=B(z);let O=new Array(s),M=new Array(s);for(i=0;i<s;i++)E=C+i*(P-C)/(s-1),O[i]=S(E),M[i]=B(E);for(i=0;i<f;i++)for(e=0;e<s;e++)u[c++]=o.x*_[i]*M[e],u[c++]=o.y*_[i]*O[e],u[c++]=o.z*A[i];if(x)for(i=0;i<f;i++)for(e=0;e<s;e++)u[c++]=n.x*_[i]*M[e],u[c++]=n.y*_[i]*O[e],u[c++]=n.z*A[i];for(_.length=s,A.length=s,i=0;i<s;i++)z=h+i*(k-h)/(s-1),_[i]=S(z),A[i]=B(z);for(O.length=m,M.length=m,i=0;i<m;i++)E=C+i*(P-C)/(m-1),O[i]=S(E),M[i]=B(E);for(i=0;i<s;i++)for(e=0;e<m;e++)u[c++]=o.x*_[i]*M[e],u[c++]=o.y*_[i]*O[e],u[c++]=o.z*A[i];if(x)for(i=0;i<s;i++)for(e=0;e<m;e++)u[c++]=n.x*_[i]*M[e],u[c++]=n.y*_[i]*O[e],u[c++]=n.z*A[i];for(c=0,i=0;i<f*a;i++){let p=i*s;for(e=0;e<s-1;e++)d[c++]=p+e,d[c++]=p+e+1}let L=f*s*a;for(i=0;i<m;i++)for(e=0;e<s-1;e++)d[c++]=L+i+e*m,d[c++]=L+i+(e+1)*m;if(x)for(L=f*s*a+m*s,i=0;i<m;i++)for(e=0;e<s-1;e++)d[c++]=L+i+e*m,d[c++]=L+i+(e+1)*m;if(x){let p=f*s*a,D=p+s*m;if(W)for(i=0;i<m;i++)d[c++]=p+i,d[c++]=D+i;if(Y)for(p+=s*m-m,D+=s*m-m,i=0;i<m;i++)d[c++]=p+i,d[c++]=D+i}let j=new X({position:new U({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:u})});if(R(t._offsetAttribute)){let p=u.length,D=t._offsetAttribute===F.NONE?0:1,I=new Uint8Array(p/3).fill(D);j.applyOffset=new U({componentDatatype:y.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new Q({attributes:j,indices:d,primitiveType:K.LINES,boundingSphere:H.fromEllipsoid(w),offsetAttribute:t._offsetAttribute})};var Ci=v;export{Ci as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a}from"./chunk-3SSKC3VN.js";import{a as N}from"./chunk-OSW76XDF.js";import{a as t}from"./chunk-LEYMRMBK.js";import{e as i}from"./chunk-VTAIKJXX.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT};r.getSizeInBytes=function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")};r.fromSizeInBytes=function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}};r.validate=function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)};r.createTypedArray=function(e,n){if(!i(e))throw new t("numberOfVertices is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n):new Uint16Array(n)};r.createTypedArrayFromArrayBuffer=function(e,n,E,o){if(!i(e))throw new t("numberOfVertices is required.");if(!i(n))throw new t("sourceArray is required.");if(!i(E))throw new t("byteOffset is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n,E,o):new Uint16Array(n,E,o)};r.fromTypedArray=function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var u=Object.freeze(r);export{u as a};
26
+ import{a}from"./chunk-PO64KPKA.js";import{a as N}from"./chunk-JOXXXMPE.js";import{a as t}from"./chunk-R3KD5ZAI.js";import{e as i}from"./chunk-GBI3IATP.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT};r.getSizeInBytes=function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")};r.fromSizeInBytes=function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}};r.validate=function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)};r.createTypedArray=function(e,n){if(!i(e))throw new t("numberOfVertices is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n):new Uint16Array(n)};r.createTypedArrayFromArrayBuffer=function(e,n,E,o){if(!i(e))throw new t("numberOfVertices is required.");if(!i(n))throw new t("sourceArray is required.");if(!i(E))throw new t("byteOffset is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n,E,o):new Uint16Array(n,E,o)};r.fromTypedArray=function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var u=Object.freeze(r);export{u as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as p,b as P,d as T}from"./chunk-64RSHJUE.js";import{a}from"./chunk-3SSKC3VN.js";import{a as I,b as g}from"./chunk-LEYMRMBK.js";import{e as l}from"./chunk-VTAIKJXX.js";function w(n,i,o){if(n===0)return i*o;let t=n*n,e=t*t,c=e*t,r=c*t,h=r*t,s=h*t,d=o,u=Math.sin(2*d),f=Math.sin(4*d),M=Math.sin(6*d),_=Math.sin(8*d),E=Math.sin(10*d),S=Math.sin(12*d);return i*((1-t/4-3*e/64-5*c/256-175*r/16384-441*h/65536-4851*s/1048576)*d-(3*t/8+3*e/32+45*c/1024+105*r/4096+2205*h/131072+6237*s/524288)*u+(15*e/256+45*c/1024+525*r/16384+1575*h/65536+155925*s/8388608)*f-(35*c/3072+175*r/12288+3675*h/262144+13475*s/1048576)*M+(315*r/131072+2205*h/524288+43659*s/8388608)*_-(693*h/1310720+6237*s/5242880)*E+1001*s/8388608*S)}function H(n,i,o){let t=n/o;if(i===0)return t;let e=t*t,c=e*t,r=c*t,h=i,s=h*h,d=s*s,u=d*s,f=u*s,M=f*s,_=M*s,E=Math.sin(2*t),S=Math.cos(2*t),v=Math.sin(4*t),W=Math.cos(4*t),V=Math.sin(6*t),C=Math.cos(6*t),N=Math.sin(8*t),R=Math.cos(8*t),b=Math.sin(10*t),x=Math.cos(10*t),U=Math.sin(12*t);return t+t*s/4+7*t*d/64+15*t*u/256+579*t*f/16384+1515*t*M/65536+16837*t*_/1048576+(3*t*d/16+45*t*u/256-t*(32*e-561)*f/4096-t*(232*e-1677)*M/16384+t*(399985-90560*e+512*r)*_/5242880)*S+(21*t*u/256+483*t*f/4096-t*(224*e-1969)*M/16384-t*(33152*e-112599)*_/1048576)*W+(151*t*f/4096+4681*t*M/65536+1479*t*_/16384-453*c*_/32768)*C+(1097*t*M/65536+42783*t*_/1048576)*R+8011*t*_/1048576*x+(3*s/8+3*d/16+213*u/2048-3*e*u/64+255*f/4096-33*e*f/512+20861*M/524288-33*e*M/512+r*M/1024+28273*_/1048576-471*e*_/8192+9*r*_/4096)*E+(21*d/256+21*u/256+533*f/8192-21*e*f/512+197*M/4096-315*e*M/4096+584039*_/16777216-12517*e*_/131072+7*r*_/2048)*v+(151*u/6144+151*f/4096+5019*M/131072-453*e*M/16384+26965*_/786432-8607*e*_/131072)*V+(1097*f/131072+1097*M/65536+225797*_/10485760-1097*e*_/65536)*N+(8011*M/2621440+8011*_/1048576)*b+293393*_/251658240*U}function O(n,i){if(n===0)return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)));let o=n*Math.sin(i);return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)))-n/2*Math.log((1+o)/(1-o))}function z(n,i,o,t,e){let c=O(n._ellipticity,o),r=O(n._ellipticity,e);return Math.atan2(a.negativePiToPi(t-i),r-c)}function k(n,i,o,t,e,c,r){let h=n._heading,s=c-t,d=0;if(a.equalsEpsilon(Math.abs(h),a.PI_OVER_TWO,a.EPSILON8))if(i===o)d=i*Math.cos(e)*a.negativePiToPi(s);else{let u=Math.sin(e);d=i*Math.cos(e)*a.negativePiToPi(s)/Math.sqrt(1-n._ellipticitySquared*u*u)}else{let u=w(n._ellipticity,i,e);d=(w(n._ellipticity,i,r)-u)/Math.cos(h)}return Math.abs(d)}var A=new p,q=new p;function y(n,i,o,t){let e=p.normalize(t.cartographicToCartesian(i,q),A),c=p.normalize(t.cartographicToCartesian(o,q),q);g.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(p.angleBetween(e,c))-Math.PI),.0125);let r=t.maximumRadius,h=t.minimumRadius,s=r*r,d=h*h;n._ellipticitySquared=(s-d)/s,n._ellipticity=Math.sqrt(n._ellipticitySquared),n._start=P.clone(i,n._start),n._start.height=0,n._end=P.clone(o,n._end),n._end.height=0,n._heading=z(n,i.longitude,i.latitude,o.longitude,o.latitude),n._distance=k(n,t.maximumRadius,t.minimumRadius,i.longitude,i.latitude,o.longitude,o.latitude)}function D(n,i,o,t,e,c){if(o===0)return P.clone(n,c);let r=e*e,h,s,d;if(Math.abs(a.PI_OVER_TWO-Math.abs(i))>a.EPSILON8){let u=w(e,t,n.latitude),f=o*Math.cos(i),M=u+f;if(s=H(M,e,t),Math.abs(i)<a.EPSILON10)h=a.negativePiToPi(n.longitude);else{let _=O(e,n.latitude),E=O(e,s);d=Math.tan(i)*(E-_),h=a.negativePiToPi(n.longitude+d)}}else{s=n.latitude;let u;if(e===0)u=t*Math.cos(n.latitude);else{let f=Math.sin(n.latitude);u=t*Math.cos(n.latitude)/Math.sqrt(1-r*f*f)}d=o/u,i>0?h=a.negativePiToPi(n.longitude+d):h=a.negativePiToPi(n.longitude-d)}return l(c)?(c.longitude=h,c.latitude=s,c.height=0,c):new P(h,s,0)}function m(n,i,o){let t=o??T.default;this._ellipsoid=t,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(n)&&l(i)&&y(this,n,i,t)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}});m.fromStartHeadingDistance=function(n,i,o,t,e){g.defined("start",n),g.defined("heading",i),g.defined("distance",o),g.typeOf.number.greaterThan("distance",o,0);let c=t??T.default,r=c.maximumRadius,h=c.minimumRadius,s=r*r,d=h*h,u=Math.sqrt((s-d)/s);i=a.negativePiToPi(i);let f=D(n,i,o,c.maximumRadius,u);return!l(e)||l(t)&&!t.equals(e.ellipsoid)?new m(n,f,c):(e.setEndPoints(n,f),e)};m.prototype.setEndPoints=function(n,i){g.defined("start",n),g.defined("end",i),y(this,n,i,this._ellipsoid)};m.prototype.interpolateUsingFraction=function(n,i){return this.interpolateUsingSurfaceDistance(n*this._distance,i)};m.prototype.interpolateUsingSurfaceDistance=function(n,i){if(g.typeOf.number("distance",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");return D(this._start,this._heading,n,this._ellipsoid.maximumRadius,this._ellipticity,i)};m.prototype.findIntersectionWithLongitude=function(n,i){if(g.typeOf.number("intersectionLongitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=Math.abs(t),c=this._start;if(n=a.negativePiToPi(n),a.equalsEpsilon(Math.abs(n),Math.PI,a.EPSILON14)&&(n=a.sign(c.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-e)<=a.EPSILON8)return i.longitude=n,i.latitude=c.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-e),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(n,c.longitude,a.EPSILON12)?void 0:(i.longitude=n,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-t),i.height=0,i);let r=c.latitude,h=o*Math.sin(r),s=Math.tan(.5*(a.PI_OVER_TWO+r))*Math.exp((n-c.longitude)/Math.tan(t)),d=(1+h)/(1-h),u=c.latitude,f;do{f=u;let M=o*Math.sin(f),_=(1+M)/(1-M);u=2*Math.atan(s*Math.pow(_/d,o/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(u,f,a.EPSILON12));return i.longitude=n,i.latitude=u,i.height=0,i};m.prototype.findIntersectionWithLatitude=function(n,i){if(g.typeOf.number("intersectionLatitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=this._start;if(a.equalsEpsilon(Math.abs(t),a.PI_OVER_TWO,a.EPSILON8))return;let c=O(o,e.latitude),r=O(o,n),h=Math.tan(t)*(r-c),s=a.negativePiToPi(e.longitude+h);return l(i)?(i.longitude=s,i.latitude=n,i.height=0,i):new P(s,n,0)};var Y=m;export{Y as a};
26
+ import{a as p,b as P,d as T}from"./chunk-FCVV6A2F.js";import{a}from"./chunk-PO64KPKA.js";import{a as I,b as g}from"./chunk-R3KD5ZAI.js";import{e as l}from"./chunk-GBI3IATP.js";function w(n,i,o){if(n===0)return i*o;let t=n*n,e=t*t,c=e*t,r=c*t,h=r*t,s=h*t,d=o,u=Math.sin(2*d),f=Math.sin(4*d),M=Math.sin(6*d),_=Math.sin(8*d),E=Math.sin(10*d),S=Math.sin(12*d);return i*((1-t/4-3*e/64-5*c/256-175*r/16384-441*h/65536-4851*s/1048576)*d-(3*t/8+3*e/32+45*c/1024+105*r/4096+2205*h/131072+6237*s/524288)*u+(15*e/256+45*c/1024+525*r/16384+1575*h/65536+155925*s/8388608)*f-(35*c/3072+175*r/12288+3675*h/262144+13475*s/1048576)*M+(315*r/131072+2205*h/524288+43659*s/8388608)*_-(693*h/1310720+6237*s/5242880)*E+1001*s/8388608*S)}function H(n,i,o){let t=n/o;if(i===0)return t;let e=t*t,c=e*t,r=c*t,h=i,s=h*h,d=s*s,u=d*s,f=u*s,M=f*s,_=M*s,E=Math.sin(2*t),S=Math.cos(2*t),v=Math.sin(4*t),W=Math.cos(4*t),V=Math.sin(6*t),C=Math.cos(6*t),N=Math.sin(8*t),R=Math.cos(8*t),b=Math.sin(10*t),x=Math.cos(10*t),U=Math.sin(12*t);return t+t*s/4+7*t*d/64+15*t*u/256+579*t*f/16384+1515*t*M/65536+16837*t*_/1048576+(3*t*d/16+45*t*u/256-t*(32*e-561)*f/4096-t*(232*e-1677)*M/16384+t*(399985-90560*e+512*r)*_/5242880)*S+(21*t*u/256+483*t*f/4096-t*(224*e-1969)*M/16384-t*(33152*e-112599)*_/1048576)*W+(151*t*f/4096+4681*t*M/65536+1479*t*_/16384-453*c*_/32768)*C+(1097*t*M/65536+42783*t*_/1048576)*R+8011*t*_/1048576*x+(3*s/8+3*d/16+213*u/2048-3*e*u/64+255*f/4096-33*e*f/512+20861*M/524288-33*e*M/512+r*M/1024+28273*_/1048576-471*e*_/8192+9*r*_/4096)*E+(21*d/256+21*u/256+533*f/8192-21*e*f/512+197*M/4096-315*e*M/4096+584039*_/16777216-12517*e*_/131072+7*r*_/2048)*v+(151*u/6144+151*f/4096+5019*M/131072-453*e*M/16384+26965*_/786432-8607*e*_/131072)*V+(1097*f/131072+1097*M/65536+225797*_/10485760-1097*e*_/65536)*N+(8011*M/2621440+8011*_/1048576)*b+293393*_/251658240*U}function O(n,i){if(n===0)return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)));let o=n*Math.sin(i);return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)))-n/2*Math.log((1+o)/(1-o))}function z(n,i,o,t,e){let c=O(n._ellipticity,o),r=O(n._ellipticity,e);return Math.atan2(a.negativePiToPi(t-i),r-c)}function k(n,i,o,t,e,c,r){let h=n._heading,s=c-t,d=0;if(a.equalsEpsilon(Math.abs(h),a.PI_OVER_TWO,a.EPSILON8))if(i===o)d=i*Math.cos(e)*a.negativePiToPi(s);else{let u=Math.sin(e);d=i*Math.cos(e)*a.negativePiToPi(s)/Math.sqrt(1-n._ellipticitySquared*u*u)}else{let u=w(n._ellipticity,i,e);d=(w(n._ellipticity,i,r)-u)/Math.cos(h)}return Math.abs(d)}var A=new p,q=new p;function y(n,i,o,t){let e=p.normalize(t.cartographicToCartesian(i,q),A),c=p.normalize(t.cartographicToCartesian(o,q),q);g.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(p.angleBetween(e,c))-Math.PI),.0125);let r=t.maximumRadius,h=t.minimumRadius,s=r*r,d=h*h;n._ellipticitySquared=(s-d)/s,n._ellipticity=Math.sqrt(n._ellipticitySquared),n._start=P.clone(i,n._start),n._start.height=0,n._end=P.clone(o,n._end),n._end.height=0,n._heading=z(n,i.longitude,i.latitude,o.longitude,o.latitude),n._distance=k(n,t.maximumRadius,t.minimumRadius,i.longitude,i.latitude,o.longitude,o.latitude)}function D(n,i,o,t,e,c){if(o===0)return P.clone(n,c);let r=e*e,h,s,d;if(Math.abs(a.PI_OVER_TWO-Math.abs(i))>a.EPSILON8){let u=w(e,t,n.latitude),f=o*Math.cos(i),M=u+f;if(s=H(M,e,t),Math.abs(i)<a.EPSILON10)h=a.negativePiToPi(n.longitude);else{let _=O(e,n.latitude),E=O(e,s);d=Math.tan(i)*(E-_),h=a.negativePiToPi(n.longitude+d)}}else{s=n.latitude;let u;if(e===0)u=t*Math.cos(n.latitude);else{let f=Math.sin(n.latitude);u=t*Math.cos(n.latitude)/Math.sqrt(1-r*f*f)}d=o/u,i>0?h=a.negativePiToPi(n.longitude+d):h=a.negativePiToPi(n.longitude-d)}return l(c)?(c.longitude=h,c.latitude=s,c.height=0,c):new P(h,s,0)}function m(n,i,o){let t=o??T.default;this._ellipsoid=t,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(n)&&l(i)&&y(this,n,i,t)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}});m.fromStartHeadingDistance=function(n,i,o,t,e){g.defined("start",n),g.defined("heading",i),g.defined("distance",o),g.typeOf.number.greaterThan("distance",o,0);let c=t??T.default,r=c.maximumRadius,h=c.minimumRadius,s=r*r,d=h*h,u=Math.sqrt((s-d)/s);i=a.negativePiToPi(i);let f=D(n,i,o,c.maximumRadius,u);return!l(e)||l(t)&&!t.equals(e.ellipsoid)?new m(n,f,c):(e.setEndPoints(n,f),e)};m.prototype.setEndPoints=function(n,i){g.defined("start",n),g.defined("end",i),y(this,n,i,this._ellipsoid)};m.prototype.interpolateUsingFraction=function(n,i){return this.interpolateUsingSurfaceDistance(n*this._distance,i)};m.prototype.interpolateUsingSurfaceDistance=function(n,i){if(g.typeOf.number("distance",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");return D(this._start,this._heading,n,this._ellipsoid.maximumRadius,this._ellipticity,i)};m.prototype.findIntersectionWithLongitude=function(n,i){if(g.typeOf.number("intersectionLongitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=Math.abs(t),c=this._start;if(n=a.negativePiToPi(n),a.equalsEpsilon(Math.abs(n),Math.PI,a.EPSILON14)&&(n=a.sign(c.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-e)<=a.EPSILON8)return i.longitude=n,i.latitude=c.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-e),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(n,c.longitude,a.EPSILON12)?void 0:(i.longitude=n,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-t),i.height=0,i);let r=c.latitude,h=o*Math.sin(r),s=Math.tan(.5*(a.PI_OVER_TWO+r))*Math.exp((n-c.longitude)/Math.tan(t)),d=(1+h)/(1-h),u=c.latitude,f;do{f=u;let M=o*Math.sin(f),_=(1+M)/(1-M);u=2*Math.atan(s*Math.pow(_/d,o/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(u,f,a.EPSILON12));return i.longitude=n,i.latitude=u,i.height=0,i};m.prototype.findIntersectionWithLatitude=function(n,i){if(g.typeOf.number("intersectionLatitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=this._start;if(a.equalsEpsilon(Math.abs(t),a.PI_OVER_TWO,a.EPSILON8))return;let c=O(o,e.latitude),r=O(o,n),h=Math.tan(t)*(r-c),s=a.negativePiToPi(e.longitude+h);return l(i)?(i.longitude=s,i.latitude=n,i.height=0,i):new P(s,n,0)};var Y=m;export{Y as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as tt}from"./chunk-DEPHB2WM.js";import{a as jt}from"./chunk-QOUAJ6TL.js";import{b as Lt}from"./chunk-DMEY62ID.js";import{a as Et}from"./chunk-HTFSEEMT.js";import{a as j}from"./chunk-OFUUQVMR.js";import{a as dt,b as D,c as B,d as U}from"./chunk-RCV6KWXS.js";import{a as _t,b as Ut,d as ot}from"./chunk-4IW2T6GF.js";import{a as pt,b as H}from"./chunk-PSPPBZWI.js";import{a as F}from"./chunk-AU7IKHOH.js";import{a as r,b as Mt,c as V,e as gt,f as Ot}from"./chunk-64RSHJUE.js";import{a as N}from"./chunk-3SSKC3VN.js";import{a as I,b as ft}from"./chunk-LEYMRMBK.js";import{e as f}from"./chunk-VTAIKJXX.js";var Yt=new r,Zt=new r,Xt=new r;function pe(t,e,n,s,i){ft.defined("point",t),ft.defined("p0",e),ft.defined("p1",n),ft.defined("p2",s),f(i)||(i=new r);let c,o,a,p,u,d,m,l;if(f(e.z)){if(r.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(r.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(r.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=r.subtract(n,e,Yt),o=r.subtract(s,e,Zt),a=r.subtract(t,e,Xt),p=r.dot(c,c),u=r.dot(c,o),d=r.dot(c,a),m=r.dot(o,o),l=r.dot(o,a)}else{if(V.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(V.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(V.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=V.subtract(n,e,Yt),o=V.subtract(s,e,Zt),a=V.subtract(t,e,Xt),p=V.dot(c,c),u=V.dot(c,o),d=V.dot(c,a),m=V.dot(o,o),l=V.dot(o,a)}i.y=m*d-u*l,i.z=p*l-u*d;let h=p*m-u*u;if(h!==0)return i.y/=h,i.z/=h,i.x=1-i.y-i.z,i}var Ht=pe;var Nt={};Nt.calculateACMR=function(t){t=t??Ot.EMPTY_OBJECT;let e=t.indices,n=t.maximumIndex,s=t.cacheSize??24;if(!f(e))throw new I("indices is required.");let i=e.length;if(i<3||i%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");if(!f(n)){n=0;let a=0,p=e[a];for(;a<i;)p>n&&(n=p),++a,p=e[a]}let c=[];for(let a=0;a<n+1;a++)c[a]=0;let o=s+1;for(let a=0;a<i;++a)o-c[e[a]]>s&&(c[e[a]]=o,++o);return(o-s+1)/(i/3)};Nt.tipsify=function(t){t=t??Ot.EMPTY_OBJECT;let e=t.indices,n=t.maximumIndex,s=t.cacheSize??24,i;function c(C,z,q,R){for(;z.length>=1;){let G=z[z.length-1];if(z.splice(z.length-1,1),C[G].numLiveTriangles>0)return G}for(;i<R;){if(C[i].numLiveTriangles>0)return++i,i-1;++i}return-1}function o(C,z,q,R,G,M,J){let Y=-1,_,St=-1,Pt=0;for(;Pt<q.length;){let lt=q[Pt];R[lt].numLiveTriangles&&(_=0,G-R[lt].timeStamp+2*R[lt].numLiveTriangles<=z&&(_=G-R[lt].timeStamp),(_>St||St===-1)&&(St=_,Y=lt)),++Pt}return Y===-1?c(R,M,C,J):Y}if(!f(e))throw new I("indices is required.");let a=e.length;if(a<3||a%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");let p=0,u=0,d=e[u],m=a;if(f(n))p=n+1;else{for(;u<m;)d>p&&(p=d),++u,d=e[u];if(p===-1)return 0;++p}let l=[],h;for(h=0;h<p;h++)l[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let y=0;for(;u<m;)l[e[u]].vertexTriangles.push(y),++l[e[u]].numLiveTriangles,l[e[u+1]].vertexTriangles.push(y),++l[e[u+1]].numLiveTriangles,l[e[u+2]].vertexTriangles.push(y),++l[e[u+2]].numLiveTriangles,++y,u+=3;let v=0,b=s+1;i=1;let S=[],x=[],w,A,E=0,P=[],O=a/3,L=[];for(h=0;h<O;h++)L[h]=!1;let g,T;for(;v!==-1;){S=[],A=l[v],T=A.vertexTriangles.length;for(let C=0;C<T;++C)if(y=A.vertexTriangles[C],!L[y]){L[y]=!0,u=y+y+y;for(let z=0;z<3;++z)g=e[u],S.push(g),x.push(g),P[E]=g,++E,w=l[g],--w.numLiveTriangles,b-w.timeStamp>s&&(w.timeStamp=b,++b),++u}v=o(e,s,S,l,b,x,p)}return P};var Wt=Nt;var k={};function It(t,e,n,s,i){t[e++]=n,t[e++]=s,t[e++]=s,t[e++]=i,t[e++]=i,t[e]=n}function de(t){let e=t.length,n=e/3*6,s=j.createTypedArray(e,n),i=0;for(let c=0;c<e;c+=3,i+=6)It(s,i,t[c],t[c+1],t[c+2]);return s}function me(t){let e=t.length;if(e>=3){let n=(e-2)*6,s=j.createTypedArray(e,n);It(s,0,t[0],t[1],t[2]);let i=6;for(let c=3;c<e;++c,i+=6)It(s,i,t[c-1],t[c],t[c-2]);return s}return new Uint16Array}function he(t){if(t.length>0){let e=t.length-1,n=(e-1)*6,s=j.createTypedArray(e,n),i=t[0],c=0;for(let o=1;o<e;++o,c+=6)It(s,c,i,t[o],t[o+1]);return s}return new Uint16Array}k.toWireframe=function(t){if(!f(t))throw new I("geometry is required.");let e=t.indices;if(f(e)){switch(t.primitiveType){case D.TRIANGLES:t.indices=de(e);break;case D.TRIANGLE_STRIP:t.indices=me(e);break;case D.TRIANGLE_FAN:t.indices=he(e);break;default:throw new I("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}t.primitiveType=D.LINES}return t};k.createLineSegmentsForVectors=function(t,e,n){if(e=e??"normal",!f(t))throw new I("geometry is required.");if(!f(t.attributes.position))throw new I("geometry.attributes.position is required.");if(!f(t.attributes[e]))throw new I(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`);n=n??1e4;let s=t.attributes.position.values,i=t.attributes[e].values,c=s.length,o=new Float64Array(2*c),a=0;for(let d=0;d<c;d+=3)o[a++]=s[d],o[a++]=s[d+1],o[a++]=s[d+2],o[a++]=s[d]+i[d]*n,o[a++]=s[d+1]+i[d+1]*n,o[a++]=s[d+2]+i[d+2]*n;let p,u=t.boundingSphere;return f(u)&&(p=new ot(u.center,u.radius+n)),new B({attributes:{position:new U({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:D.LINES,boundingSphere:p})};k.createAttributeLocations=function(t){if(!f(t))throw new I("geometry is required.");let e=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=t.attributes,s={},i=0,c,o=e.length;for(c=0;c<o;++c){let a=e[c];f(n[a])&&(s[a]=i++)}for(let a in n)n.hasOwnProperty(a)&&!f(s[a])&&(s[a]=i++);return s};k.reorderForPreVertexCache=function(t){if(!f(t))throw new I("geometry is required.");let e=B.computeNumberOfVertices(t),n=t.indices;if(f(n)){let s=new Int32Array(e);for(let l=0;l<e;l++)s[l]=-1;let i=n,c=i.length,o=j.createTypedArray(e,c),a=0,p=0,u=0,d;for(;a<c;)d=s[i[a]],d!==-1?o[p]=d:(d=i[a],s[d]=u,o[p]=u,++u),++a,++p;t.indices=o;let m=t.attributes;for(let l in m)if(m.hasOwnProperty(l)&&f(m[l])&&f(m[l].values)){let h=m[l],y=h.values,v=0,b=h.componentsPerAttribute,S=F.createTypedArray(h.componentDatatype,u*b);for(;v<e;){let x=s[v];if(x!==-1)for(let w=0;w<b;w++)S[b*x+w]=y[b*v+w];++v}h.values=S}}return t};k.reorderForPostVertexCache=function(t,e){if(!f(t))throw new I("geometry is required.");let n=t.indices;if(t.primitiveType===D.TRIANGLES&&f(n)){let s=n.length,i=0;for(let c=0;c<s;c++)n[c]>i&&(i=n[c]);t.indices=Wt.tipsify({indices:n,maximumIndex:i,cacheSize:e})}return t};function $t(t){let e={};for(let n in t)if(t.hasOwnProperty(n)&&f(t[n])&&f(t[n].values)){let s=t[n];e[n]=new U({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:[]})}return e}function be(t,e,n){for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];for(let c=0;c<i.componentsPerAttribute;++c)t[s].values.push(i.values[n*i.componentsPerAttribute+c])}}k.fitToUnsignedShortIndices=function(t){if(!f(t))throw new I("geometry is required.");if(f(t.indices)&&t.primitiveType!==D.TRIANGLES&&t.primitiveType!==D.LINES&&t.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let e=[],n=B.computeNumberOfVertices(t);if(f(t.indices)&&n>=N.SIXTY_FOUR_KILOBYTES){let s=[],i=[],c=0,o=$t(t.attributes),a=t.indices,p=a.length,u;t.primitiveType===D.TRIANGLES?u=3:t.primitiveType===D.LINES?u=2:t.primitiveType===D.POINTS&&(u=1);for(let d=0;d<p;d+=u){for(let m=0;m<u;++m){let l=a[d+m],h=s[l];f(h)||(h=c++,s[l]=h,be(o,t.attributes,l)),i.push(h)}c+u>=N.SIXTY_FOUR_KILOBYTES&&(e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV})),s=[],i=[],c=0,o=$t(t.attributes))}i.length!==0&&e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV}))}else e.push(t);return e};var Jt=new r,we=new Mt;k.projectTo2D=function(t,e,n,s,i){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeName3D is required.");if(!f(s))throw new I("attributeName2D is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==F.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let c=t.attributes[e];i=f(i)?i:new _t;let o=i.ellipsoid,a=c.values,p=new Float64Array(a.length),u=0;for(let d=0;d<a.length;d+=3){let m=r.fromArray(a,d,Jt),l=o.cartesianToCartographic(m,we);if(!f(l))throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);let h=i.project(l,Jt);p[u++]=h.x,p[u++]=h.y,p[u++]=h.z}return t.attributes[n]=c,t.attributes[s]=new U({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:p}),delete t.attributes[e],t};var zt={high:0,low:0};k.encodeAttribute=function(t,e,n,s){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeHighName is required.");if(!f(s))throw new I("attributeLowName is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==F.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let i=t.attributes[e],c=i.values,o=c.length,a=new Float32Array(o),p=new Float32Array(o);for(let d=0;d<o;++d)jt.encode(c[d],zt),a[d]=zt.high,p[d]=zt.low;let u=i.componentsPerAttribute;return t.attributes[n]=new U({componentDatatype:F.FLOAT,componentsPerAttribute:u,values:a}),t.attributes[s]=new U({componentDatatype:F.FLOAT,componentsPerAttribute:u,values:p}),delete t.attributes[e],t};var $=new r;function Dt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),H.multiplyByPoint(t,$,$),r.pack($,n,i)}}function qt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),gt.multiplyByVector(t,$,$),$=r.normalize($,$),r.pack($,n,i)}}var wt=new H,vt=new gt;k.transformToWorldCoordinates=function(t){if(!f(t))throw new I("instance is required.");let e=t.modelMatrix;if(H.equals(e,H.IDENTITY))return t;let n=t.geometry.attributes;Dt(e,n.position),Dt(e,n.prevPosition),Dt(e,n.nextPosition),(f(n.normal)||f(n.tangent)||f(n.bitangent))&&(H.inverse(e,wt),H.transpose(wt,wt),H.getMatrix3(wt,vt),qt(vt,n.normal),qt(vt,n.tangent),qt(vt,n.bitangent));let s=t.geometry.boundingSphere;return f(s)&&(t.geometry.boundingSphere=ot.transform(s,e,s)),t.modelMatrix=H.clone(H.IDENTITY),t};function ve(t,e){let n=t.length,s={},i=t[0][e].attributes,c;for(c in i)if(i.hasOwnProperty(c)&&f(i[c])&&f(i[c].values)){let o=i[c],a=o.values.length,p=!0;for(let u=1;u<n;++u){let d=t[u][e].attributes[c];if(!f(d)||o.componentDatatype!==d.componentDatatype||o.componentsPerAttribute!==d.componentsPerAttribute||o.normalize!==d.normalize){p=!1;break}a+=d.values.length}p&&(s[c]=new U({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:F.createTypedArray(o.componentDatatype,a)}))}return s}var ye=new r;function Rt(t,e){let n=t.length,s,i,c,o,a=t[0].modelMatrix,p=f(t[0][e].indices),u=t[0][e].primitiveType;for(i=1;i<n;++i){if(!H.equals(t[i].modelMatrix,a))throw new I("All instances must have the same modelMatrix.");if(f(t[i][e].indices)!==p)throw new I("All instance geometries must have an indices or not have one.");if(t[i][e].primitiveType!==u)throw new I("All instance geometries must have the same primitiveType.")}let d=ve(t,e),m,l,h;for(s in d)if(d.hasOwnProperty(s))for(m=d[s].values,o=0,i=0;i<n;++i)for(l=t[i][e].attributes[s].values,h=l.length,c=0;c<h;++c)m[o++]=l[c];let y;if(p){let x=0;for(i=0;i<n;++i)x+=t[i][e].indices.length;let w=B.computeNumberOfVertices(new B({attributes:d,primitiveType:D.POINTS})),A=j.createTypedArray(w,x),E=0,P=0;for(i=0;i<n;++i){let O=t[i][e].indices,L=O.length;for(o=0;o<L;++o)A[E++]=P+O[o];P+=B.computeNumberOfVertices(t[i][e])}y=A}let v=new r,b=0,S;for(i=0;i<n;++i){if(S=t[i][e].boundingSphere,!f(S)){v=void 0;break}r.add(S.center,v,v)}if(f(v))for(r.divideByScalar(v,n,v),i=0;i<n;++i){S=t[i][e].boundingSphere;let x=r.magnitude(r.subtract(S.center,v,ye))+S.radius;x>b&&(b=x)}return new B({attributes:d,indices:y,primitiveType:u,boundingSphere:f(v)?new ot(v,b):void 0})}k.combineInstances=function(t){if(!f(t)||t.length<1)throw new I("instances is required and must have length greater than zero.");let e=[],n=[],s=t.length;for(let c=0;c<s;++c){let o=t[c];f(o.geometry)?e.push(o):f(o.westHemisphereGeometry)&&f(o.eastHemisphereGeometry)&&n.push(o)}let i=[];return e.length>0&&i.push(Rt(e,"geometry")),n.length>0&&(i.push(Rt(n,"westHemisphereGeometry")),i.push(Rt(n,"eastHemisphereGeometry"))),i};var Z=new r,mt=new r,rt=new r,ct=new r;k.computeNormal=function(t){if(!f(t))throw new I("geometry is required.");if(!f(t.attributes.position)||!f(t.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(t.indices))throw new I("geometry.indices is required.");if(t.indices.length<2||t.indices.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let e=t.indices,n=t.attributes,s=n.position.values,i=n.position.values.length/3,c=e.length,o=new Array(i),a=new Array(c/3),p=new Array(c),u;for(u=0;u<i;u++)o[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<c;u+=3){let y=e[u],v=e[u+1],b=e[u+2],S=y*3,x=v*3,w=b*3;mt.x=s[S],mt.y=s[S+1],mt.z=s[S+2],rt.x=s[x],rt.y=s[x+1],rt.z=s[x+2],ct.x=s[w],ct.y=s[w+1],ct.z=s[w+2],o[y].count++,o[v].count++,o[b].count++,r.subtract(rt,mt,rt),r.subtract(ct,mt,ct),a[d]=r.cross(rt,ct,new r),d++}let m=0;for(u=0;u<i;u++)o[u].indexOffset+=m,m+=o[u].count;d=0;let l;for(u=0;u<c;u+=3){l=o[e[u]];let y=l.indexOffset+l.currentCount;p[y]=d,l.currentCount++,l=o[e[u+1]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,l=o[e[u+2]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,d++}let h=new Float32Array(i*3);for(u=0;u<i;u++){let y=u*3;if(l=o[u],r.clone(r.ZERO,Z),l.count>0){for(d=0;d<l.count;d++)r.add(Z,a[p[l.indexOffset+d]],Z);r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&r.clone(a[p[l.indexOffset]],Z)}r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&(Z.z=1),r.normalize(Z,Z),h[y]=Z.x,h[y+1]=Z.y,h[y+2]=Z.z}return t.attributes.normal=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:h}),t};var xe=new r,Kt=new r,Te=new r;k.computeTangentAndBitangent=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes,n=t.indices;if(!f(e.position)||!f(e.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.normal)||!f(e.normal.values))throw new I("geometry.attributes.normal.values is required.");if(!f(e.st)||!f(e.st.values))throw new I("geometry.attributes.st.values is required.");if(!f(n))throw new I("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let s=t.attributes.position.values,i=t.attributes.normal.values,c=t.attributes.st.values,o=t.attributes.position.values.length/3,a=n.length,p=new Array(o*3),u;for(u=0;u<p.length;u++)p[u]=0;let d,m,l;for(u=0;u<a;u+=3){let v=n[u],b=n[u+1],S=n[u+2];d=v*3,m=b*3,l=S*3;let x=v*2,w=b*2,A=S*2,E=s[d],P=s[d+1],O=s[d+2],L=c[x],g=c[x+1],T=c[w+1]-g,C=c[A+1]-g,z=1/((c[w]-L)*C-(c[A]-L)*T),q=(C*(s[m]-E)-T*(s[l]-E))*z,R=(C*(s[m+1]-P)-T*(s[l+1]-P))*z,G=(C*(s[m+2]-O)-T*(s[l+2]-O))*z;p[d]+=q,p[d+1]+=R,p[d+2]+=G,p[m]+=q,p[m+1]+=R,p[m+2]+=G,p[l]+=q,p[l+1]+=R,p[l+2]+=G}let h=new Float32Array(o*3),y=new Float32Array(o*3);for(u=0;u<o;u++){d=u*3,m=d+1,l=d+2;let v=r.fromArray(i,d,xe),b=r.fromArray(p,d,Te),S=r.dot(v,b);r.multiplyByScalar(v,S,Kt),r.normalize(r.subtract(b,Kt,b),b),h[d]=b.x,h[m]=b.y,h[l]=b.z,r.normalize(r.cross(v,b,b),b),y[d]=b.x,y[m]=b.y,y[l]=b.z}return t.attributes.tangent=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:h}),t.attributes.bitangent=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:y}),t};var ht=new V,W=new r,Qt=new r,te=new r,yt=new V;k.compressVertices=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes.extrudeDirection,n,s;if(f(e)){let P=e.values;s=P.length/3;let O=new Float32Array(s*2),L=0;for(n=0;n<s;++n){if(r.fromArray(P,n*3,W),r.equals(W,r.ZERO)){L+=2;continue}yt=tt.octEncodeInRange(W,65535,yt),O[L++]=yt.x,O[L++]=yt.y}return t.attributes.compressedAttributes=new U({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:O}),delete t.attributes.extrudeDirection,t}let i=t.attributes.normal,c=t.attributes.st,o=f(i),a=f(c);if(!o&&!a)return t;let p=t.attributes.tangent,u=t.attributes.bitangent,d=f(p),m=f(u),l,h,y,v;o&&(l=i.values),a&&(h=c.values),d&&(y=p.values),m&&(v=u.values),s=(o?l.length:h.length)/(o?3:2);let x=s,w=a&&o?2:1;w+=d||m?1:0,x*=w;let A=new Float32Array(x),E=0;for(n=0;n<s;++n){a&&(V.fromArray(h,n*2,ht),A[E++]=tt.compressTextureCoordinates(ht));let P=n*3;o&&f(y)&&f(v)?(r.fromArray(l,P,W),r.fromArray(y,P,Qt),r.fromArray(v,P,te),tt.octPack(W,Qt,te,ht),A[E++]=ht.x,A[E++]=ht.y):(o&&(r.fromArray(l,P,W),A[E++]=tt.octEncodeFloat(W)),d&&(r.fromArray(y,P,W),A[E++]=tt.octEncodeFloat(W)),m&&(r.fromArray(v,P,W),A[E++]=tt.octEncodeFloat(W)))}return t.attributes.compressedAttributes=new U({componentDatatype:F.FLOAT,componentsPerAttribute:w,values:A}),o&&delete t.attributes.normal,a&&delete t.attributes.st,m&&delete t.attributes.bitangent,d&&delete t.attributes.tangent,t};function Ae(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");if(e%3!==0)throw new I("The number of vertices must be a multiple of three.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function Ie(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");let n=j.createTypedArray(e,(e-2)*3);n[0]=1,n[1]=0,n[2]=2;let s=3;for(let i=3;i<e;++i)n[s++]=i-1,n[s++]=0,n[s++]=i;return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Se(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least 3.");let n=j.createTypedArray(e,(e-2)*3);n[0]=0,n[1]=1,n[2]=2,e>3&&(n[3]=0,n[4]=2,n[5]=3);let s=6;for(let i=3;i<e-1;i+=2)n[s++]=i,n[s++]=i-1,n[s++]=i+1,i+2<e&&(n[s++]=i,n[s++]=i+1,n[s++]=i+2);return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Pe(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");if(e%2!==0)throw new I("The number of vertices must be a multiple of 2.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function ge(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,(e-1)*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return t.indices=n,t.primitiveType=D.LINES,t}function Oe(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,e*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return n[s++]=e-1,n[s]=0,t.indices=n,t.primitiveType=D.LINES,t}function Le(t){switch(t.primitiveType){case D.TRIANGLE_FAN:return Ie(t);case D.TRIANGLE_STRIP:return Se(t);case D.TRIANGLES:return Ae(t);case D.LINE_STRIP:return ge(t);case D.LINE_LOOP:return Oe(t);case D.LINES:return Pe(t)}return t}function Q(t,e){Math.abs(t.y)<N.EPSILON6&&(e?t.y=-N.EPSILON6:t.y=N.EPSILON6)}function Ee(t,e,n){if(t.y!==0&&e.y!==0&&n.y!==0){Q(t,t.y<0),Q(e,e.y<0),Q(n,n.y<0);return}let s=Math.abs(t.y),i=Math.abs(e.y),c=Math.abs(n.y),o;s>i?s>c?o=N.sign(t.y):o=N.sign(n.y):i>c?o=N.sign(e.y):o=N.sign(n.y);let a=o<0;Q(t,a),Q(e,a),Q(n,a)}var ee=new r;function X(t,e,n,s){r.add(t,r.multiplyByScalar(r.subtract(e,t,ee),t.y/(t.y-e.y),ee),n),r.clone(n,s),Q(n,!0),Q(s,!1)}var et=new r,nt=new r,it=new r,st=new r,Vt={positions:new Array(7),indices:new Array(9)};function Ne(t,e,n){if(t.x>=0||e.x>=0||n.x>=0)return;Ee(t,e,n);let s=t.y<0,i=e.y<0,c=n.y<0,o=0;o+=s?1:0,o+=i?1:0,o+=c?1:0;let a=Vt.indices;o===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,s?(X(t,e,et,it),X(t,n,nt,st),a[0]=0,a[3]=1,a[4]=2,a[6]=1):i?(X(e,n,et,it),X(e,t,nt,st),a[0]=1,a[3]=2,a[4]=0,a[6]=2):c&&(X(n,t,et,it),X(n,e,nt,st),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):o===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,s?i?c||(X(n,t,et,it),X(n,e,nt,st),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(e,n,et,it),X(e,t,nt,st),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(t,e,et,it),X(t,n,nt,st),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let p=Vt.positions;return p[0]=t,p[1]=e,p[2]=n,p.length=3,(o===1||o===2)&&(p[3]=et,p[4]=nt,p[5]=it,p[6]=st,p.length=7),Vt}function ne(t,e){let n=t.attributes;if(n.position.values.length===0)return;for(let i in n)if(n.hasOwnProperty(i)&&f(n[i])&&f(n[i].values)){let c=n[i];c.values=F.createTypedArray(c.componentDatatype,c.values)}let s=B.computeNumberOfVertices(t);return t.indices=j.createTypedArray(s,t.indices),e&&(t.boundingSphere=ot.fromVertices(n.position.values)),t}function ut(t){let e=t.attributes,n={};for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];n[s]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:n,indices:[],primitiveType:t.primitiveType})}function Ft(t,e,n){let s=f(t.geometry.boundingSphere);e=ne(e,s),n=ne(n,s),f(n)&&!f(e)?t.geometry=n:!f(n)&&f(e)?t.geometry=e:(t.westHemisphereGeometry=e,t.eastHemisphereGeometry=n,t.geometry=void 0)}function kt(t,e){let n=new t,s=new t,i=new t;return function(c,o,a,p,u,d,m,l){let h=t.fromArray(u,c*e,n),y=t.fromArray(u,o*e,s),v=t.fromArray(u,a*e,i);t.multiplyByScalar(h,p.x,h),t.multiplyByScalar(y,p.y,y),t.multiplyByScalar(v,p.z,v);let b=t.add(h,y,h);t.add(b,v,b),l&&t.normalize(b,b),t.pack(b,d,m*e)}}var ze=kt(pt,4),At=kt(r,3),ae=kt(V,2),De=function(t,e,n,s,i,c,o){let a=i[t]*s.x,p=i[e]*s.y,u=i[n]*s.z;c[o]=a+p+u>N.EPSILON6?1:0},bt=new r,Gt=new r,Ct=new r,qe=new r;function xt(t,e,n,s,i,c,o,a,p,u,d,m,l,h,y,v){if(!f(c)&&!f(o)&&!f(a)&&!f(p)&&!f(u)&&h===0)return;let b=r.fromArray(i,t*3,bt),S=r.fromArray(i,e*3,Gt),x=r.fromArray(i,n*3,Ct),w=Ht(s,b,S,x,qe);if(f(w)){if(f(c)&&At(t,e,n,w,c,m.normal.values,v,!0),f(u)){let A=r.fromArray(u,t*3,bt),E=r.fromArray(u,e*3,Gt),P=r.fromArray(u,n*3,Ct);r.multiplyByScalar(A,w.x,A),r.multiplyByScalar(E,w.y,E),r.multiplyByScalar(P,w.z,P);let O;!r.equals(A,r.ZERO)||!r.equals(E,r.ZERO)||!r.equals(P,r.ZERO)?(O=r.add(A,E,A),r.add(O,P,O),r.normalize(O,O)):(O=bt,O.x=0,O.y=0,O.z=0),r.pack(O,m.extrudeDirection.values,v*3)}if(f(d)&&De(t,e,n,w,d,m.applyOffset.values,v),f(o)&&At(t,e,n,w,o,m.tangent.values,v,!0),f(a)&&At(t,e,n,w,a,m.bitangent.values,v,!0),f(p)&&ae(t,e,n,w,p,m.st.values,v),h>0)for(let A=0;A<h;A++){let E=l[A];Re(t,e,n,w,v,y[E],m[E])}}}function Re(t,e,n,s,i,c,o){let a=c.componentsPerAttribute,p=c.values,u=o.values;switch(a){case 4:ze(t,e,n,s,p,u,i,!1);break;case 3:At(t,e,n,s,p,u,i,!1);break;case 2:ae(t,e,n,s,p,u,i,!1);break;default:u[i]=p[t]*s.x+p[e]*s.y+p[n]*s.z}}function K(t,e,n,s,i,c){let o=t.position.values.length/3;if(i!==-1){let a=s[i],p=n[a];return p===-1?(n[a]=o,t.position.values.push(c.x,c.y,c.z),e.push(o),o):(e.push(p),p)}return t.position.values.push(c.x,c.y,c.z),e.push(o),o}var Ve={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ie(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.normal)?n.normal.values:void 0,c=f(n.bitangent)?n.bitangent.values:void 0,o=f(n.tangent)?n.tangent.values:void 0,a=f(n.st)?n.st.values:void 0,p=f(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=f(n.applyOffset)?n.applyOffset.values:void 0,d=e.indices,m=[];for(let O in n)n.hasOwnProperty(O)&&!Ve[O]&&f(n[O])&&m.push(O);let l=m.length,h=ut(e),y=ut(e),v,b,S,x,w,A=[];A.length=s.length/3;let E=[];for(E.length=s.length/3,w=0;w<A.length;++w)A[w]=-1,E[w]=-1;let P=d.length;for(w=0;w<P;w+=3){let O=d[w],L=d[w+1],g=d[w+2],T=r.fromArray(s,O*3),C=r.fromArray(s,L*3),z=r.fromArray(s,g*3),q=Ne(T,C,z);if(f(q)&&q.positions.length>3){let R=q.positions,G=q.indices,M=G.length;for(let J=0;J<M;++J){let Y=G[J],_=R[Y];_.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=K(v,b,S,d,Y<3?w+Y:-1,_),xt(O,L,g,_,s,i,o,c,a,p,u,v,m,l,n,x)}}else f(q)&&(T=q.positions[0],C=q.positions[1],z=q.positions[2]),T.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=K(v,b,S,d,w,T),xt(O,L,g,T,s,i,o,c,a,p,u,v,m,l,n,x),x=K(v,b,S,d,w+1,C),xt(O,L,g,C,s,i,o,c,a,p,u,v,m,l,n,x),x=K(v,b,S,d,w+2,z),xt(O,L,g,z,s,i,o,c,a,p,u,v,m,l,n,x)}Ft(t,y,h)}var ue=Et.fromPointNormal(r.ZERO,r.UNIT_Y),Ge=new r,Ce=new r;function at(t,e,n,s,i,c,o){if(!f(o))return;let a=r.fromArray(s,t*3,bt);r.equalsEpsilon(a,n,N.EPSILON10)?c.applyOffset.values[i]=o[t]:c.applyOffset.values[i]=o[e]}function se(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.applyOffset)?n.applyOffset.values:void 0,c=e.indices,o=ut(e),a=ut(e),p,u=c.length,d=[];d.length=s.length/3;let m=[];for(m.length=s.length/3,p=0;p<d.length;++p)d[p]=-1,m[p]=-1;for(p=0;p<u;p+=2){let l=c[p],h=c[p+1],y=r.fromArray(s,l*3,bt),v=r.fromArray(s,h*3,Gt),b;Math.abs(y.y)<N.EPSILON6&&(y.y<0?y.y=-N.EPSILON6:y.y=N.EPSILON6),Math.abs(v.y)<N.EPSILON6&&(v.y<0?v.y=-N.EPSILON6:v.y=N.EPSILON6);let S=o.attributes,x=o.indices,w=m,A=a.attributes,E=a.indices,P=d,O=Lt.lineSegmentPlane(y,v,ue,Ct);if(f(O)){let L=r.multiplyByScalar(r.UNIT_Y,5*N.EPSILON9,Ge);y.y<0&&(r.negate(L,L),S=a.attributes,x=a.indices,w=d,A=o.attributes,E=o.indices,P=m);let g=r.add(O,L,Ce);b=K(S,x,w,c,p,y),at(l,h,y,s,b,S,i),b=K(S,x,w,c,-1,g),at(l,h,g,s,b,S,i),r.negate(L,L),r.add(O,L,g),b=K(A,E,P,c,-1,g),at(l,h,g,s,b,A,i),b=K(A,E,P,c,p+1,v),at(l,h,v,s,b,A,i)}else{let L,g,T;y.y<0?(L=a.attributes,g=a.indices,T=d):(L=o.attributes,g=o.indices,T=m),b=K(L,g,T,c,p,y),at(l,h,y,s,b,L,i),b=K(L,g,T,c,p+1,v),at(l,h,v,s,b,L,i)}}Ft(t,a,o)}var oe=new V,Be=new V,le=new r,fe=new r,Bt=new r,Fe=new r,ke=new r,Me=new r,re=new pt;function ce(t){let e=t.attributes,n=e.position.values,s=e.prevPosition.values,i=e.nextPosition.values,c=n.length;for(let o=0;o<c;o+=3){let a=r.unpack(n,o,le);if(a.x>0)continue;let p=r.unpack(s,o,fe);(a.y<0&&p.y>0||a.y>0&&p.y<0)&&(o-3>0?(s[o]=n[o-3],s[o+1]=n[o-2],s[o+2]=n[o-1]):r.pack(a,s,o));let u=r.unpack(i,o,Bt);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(o+3<c?(i[o]=n[o+3],i[o+1]=n[o+4],i[o+2]=n[o+5]):r.pack(a,i,o))}}var _e=5*N.EPSILON9,Tt=N.EPSILON6;function Ue(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=n.prevPosition.values,c=n.nextPosition.values,o=n.expandAndWidth.values,a=f(n.st)?n.st.values:void 0,p=f(n.color)?n.color.values:void 0,u=ut(e),d=ut(e),m,l,h,y=!1,v=s.length/3;for(m=0;m<v;m+=4){let b=m,S=m+2,x=r.fromArray(s,b*3,le),w=r.fromArray(s,S*3,fe);if(Math.abs(x.y)<Tt)for(x.y=Tt*(w.y<0?-1:1),s[m*3+1]=x.y,s[(m+1)*3+1]=x.y,l=b*3;l<b*3+12;l+=3)i[l]=s[m*3],i[l+1]=s[m*3+1],i[l+2]=s[m*3+2];if(Math.abs(w.y)<Tt)for(w.y=Tt*(x.y<0?-1:1),s[(m+2)*3+1]=w.y,s[(m+3)*3+1]=w.y,l=b*3;l<b*3+12;l+=3)c[l]=s[(m+2)*3],c[l+1]=s[(m+2)*3+1],c[l+2]=s[(m+2)*3+2];let A=u.attributes,E=u.indices,P=d.attributes,O=d.indices,L=Lt.lineSegmentPlane(x,w,ue,Fe);if(f(L)){y=!0;let g=r.multiplyByScalar(r.UNIT_Y,_e,ke);x.y<0&&(r.negate(g,g),A=d.attributes,E=d.indices,P=u.attributes,O=u.indices);let T=r.add(L,g,Me);A.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.position.values.push(T.x,T.y,T.z),A.position.values.push(T.x,T.y,T.z),A.prevPosition.values.push(i[b*3],i[b*3+1],i[b*3+2]),A.prevPosition.values.push(i[b*3+3],i[b*3+4],i[b*3+5]),A.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),r.negate(g,g),r.add(L,g,T),P.position.values.push(T.x,T.y,T.z),P.position.values.push(T.x,T.y,T.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(c[S*3],c[S*3+1],c[S*3+2]),P.nextPosition.values.push(c[S*3+3],c[S*3+4],c[S*3+5]);let C=V.fromArray(o,b*2,oe),z=Math.abs(C.y);A.expandAndWidth.values.push(-1,z,1,z),A.expandAndWidth.values.push(-1,-z,1,-z),P.expandAndWidth.values.push(-1,z,1,z),P.expandAndWidth.values.push(-1,-z,1,-z);let q=r.magnitudeSquared(r.subtract(L,x,Bt));if(q/=r.magnitudeSquared(r.subtract(w,x,Bt)),f(p)){let R=pt.fromArray(p,b*4,re),G=pt.fromArray(p,S*4,re),M=N.lerp(R.x,G.x,q),J=N.lerp(R.y,G.y,q),Y=N.lerp(R.z,G.z,q),_=N.lerp(R.w,G.w,q);for(l=b*4;l<b*4+8;++l)A.color.values.push(p[l]);for(A.color.values.push(M,J,Y,_),A.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),l=S*4;l<S*4+8;++l)P.color.values.push(p[l])}if(f(a)){let R=V.fromArray(a,b*2,oe),G=V.fromArray(a,(m+3)*2,Be),M=N.lerp(R.x,G.x,q);for(l=b*2;l<b*2+4;++l)A.st.values.push(a[l]);for(A.st.values.push(M,R.y),A.st.values.push(M,G.y),P.st.values.push(M,R.y),P.st.values.push(M,G.y),l=S*2;l<S*2+4;++l)P.st.values.push(a[l])}h=A.position.values.length/3-4,E.push(h,h+2,h+1),E.push(h+1,h+2,h+3),h=P.position.values.length/3-4,O.push(h,h+2,h+1),O.push(h+1,h+2,h+3)}else{let g,T;for(x.y<0?(g=d.attributes,T=d.indices):(g=u.attributes,T=u.indices),g.position.values.push(x.x,x.y,x.z),g.position.values.push(x.x,x.y,x.z),g.position.values.push(w.x,w.y,w.z),g.position.values.push(w.x,w.y,w.z),l=m*3;l<m*3+12;++l)g.prevPosition.values.push(i[l]),g.nextPosition.values.push(c[l]);for(l=m*2;l<m*2+8;++l)g.expandAndWidth.values.push(o[l]),f(a)&&g.st.values.push(a[l]);if(f(p))for(l=m*4;l<m*4+16;++l)g.color.values.push(p[l]);h=g.position.values.length/3-4,T.push(h,h+2,h+1),T.push(h+1,h+2,h+3)}}y&&(ce(d),ce(u)),Ft(t,d,u)}k.splitLongitude=function(t){if(!f(t))throw new I("instance is required.");let e=t.geometry,n=e.boundingSphere;if(f(n)&&(n.center.x-n.radius>0||ot.intersectPlane(n,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return t;if(e.geometryType!==dt.NONE)switch(e.geometryType){case dt.POLYLINES:Ue(t);break;case dt.TRIANGLES:ie(t);break;case dt.LINES:se(t);break}else Le(e),e.primitiveType===D.TRIANGLES?ie(t):e.primitiveType===D.LINES&&se(t);return t};var Pn=k;export{Pn as a};
26
+ import{a as tt}from"./chunk-BCYX7GBY.js";import{a as jt}from"./chunk-46IDNOB6.js";import{b as Lt}from"./chunk-HLFNWOQ4.js";import{a as Et}from"./chunk-YDUNCXSU.js";import{a as j}from"./chunk-LNFOIPBT.js";import{a as dt,b as D,c as B,d as U}from"./chunk-BDLVVHOG.js";import{a as _t,b as Ut,d as ot}from"./chunk-VMOPYKP4.js";import{a as pt,b as H}from"./chunk-DGGIK7AD.js";import{a as F}from"./chunk-5EZKANRV.js";import{a as r,b as Mt,c as V,e as gt,f as Ot}from"./chunk-FCVV6A2F.js";import{a as N}from"./chunk-PO64KPKA.js";import{a as I,b as ft}from"./chunk-R3KD5ZAI.js";import{e as f}from"./chunk-GBI3IATP.js";var Yt=new r,Zt=new r,Xt=new r;function pe(t,e,n,s,i){ft.defined("point",t),ft.defined("p0",e),ft.defined("p1",n),ft.defined("p2",s),f(i)||(i=new r);let c,o,a,p,u,d,m,l;if(f(e.z)){if(r.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(r.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(r.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=r.subtract(n,e,Yt),o=r.subtract(s,e,Zt),a=r.subtract(t,e,Xt),p=r.dot(c,c),u=r.dot(c,o),d=r.dot(c,a),m=r.dot(o,o),l=r.dot(o,a)}else{if(V.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(V.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(V.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=V.subtract(n,e,Yt),o=V.subtract(s,e,Zt),a=V.subtract(t,e,Xt),p=V.dot(c,c),u=V.dot(c,o),d=V.dot(c,a),m=V.dot(o,o),l=V.dot(o,a)}i.y=m*d-u*l,i.z=p*l-u*d;let h=p*m-u*u;if(h!==0)return i.y/=h,i.z/=h,i.x=1-i.y-i.z,i}var Ht=pe;var Nt={};Nt.calculateACMR=function(t){t=t??Ot.EMPTY_OBJECT;let e=t.indices,n=t.maximumIndex,s=t.cacheSize??24;if(!f(e))throw new I("indices is required.");let i=e.length;if(i<3||i%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");if(!f(n)){n=0;let a=0,p=e[a];for(;a<i;)p>n&&(n=p),++a,p=e[a]}let c=[];for(let a=0;a<n+1;a++)c[a]=0;let o=s+1;for(let a=0;a<i;++a)o-c[e[a]]>s&&(c[e[a]]=o,++o);return(o-s+1)/(i/3)};Nt.tipsify=function(t){t=t??Ot.EMPTY_OBJECT;let e=t.indices,n=t.maximumIndex,s=t.cacheSize??24,i;function c(C,z,q,R){for(;z.length>=1;){let G=z[z.length-1];if(z.splice(z.length-1,1),C[G].numLiveTriangles>0)return G}for(;i<R;){if(C[i].numLiveTriangles>0)return++i,i-1;++i}return-1}function o(C,z,q,R,G,M,J){let Y=-1,_,St=-1,Pt=0;for(;Pt<q.length;){let lt=q[Pt];R[lt].numLiveTriangles&&(_=0,G-R[lt].timeStamp+2*R[lt].numLiveTriangles<=z&&(_=G-R[lt].timeStamp),(_>St||St===-1)&&(St=_,Y=lt)),++Pt}return Y===-1?c(R,M,C,J):Y}if(!f(e))throw new I("indices is required.");let a=e.length;if(a<3||a%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");let p=0,u=0,d=e[u],m=a;if(f(n))p=n+1;else{for(;u<m;)d>p&&(p=d),++u,d=e[u];if(p===-1)return 0;++p}let l=[],h;for(h=0;h<p;h++)l[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let y=0;for(;u<m;)l[e[u]].vertexTriangles.push(y),++l[e[u]].numLiveTriangles,l[e[u+1]].vertexTriangles.push(y),++l[e[u+1]].numLiveTriangles,l[e[u+2]].vertexTriangles.push(y),++l[e[u+2]].numLiveTriangles,++y,u+=3;let v=0,b=s+1;i=1;let S=[],x=[],w,A,E=0,P=[],O=a/3,L=[];for(h=0;h<O;h++)L[h]=!1;let g,T;for(;v!==-1;){S=[],A=l[v],T=A.vertexTriangles.length;for(let C=0;C<T;++C)if(y=A.vertexTriangles[C],!L[y]){L[y]=!0,u=y+y+y;for(let z=0;z<3;++z)g=e[u],S.push(g),x.push(g),P[E]=g,++E,w=l[g],--w.numLiveTriangles,b-w.timeStamp>s&&(w.timeStamp=b,++b),++u}v=o(e,s,S,l,b,x,p)}return P};var Wt=Nt;var k={};function It(t,e,n,s,i){t[e++]=n,t[e++]=s,t[e++]=s,t[e++]=i,t[e++]=i,t[e]=n}function de(t){let e=t.length,n=e/3*6,s=j.createTypedArray(e,n),i=0;for(let c=0;c<e;c+=3,i+=6)It(s,i,t[c],t[c+1],t[c+2]);return s}function me(t){let e=t.length;if(e>=3){let n=(e-2)*6,s=j.createTypedArray(e,n);It(s,0,t[0],t[1],t[2]);let i=6;for(let c=3;c<e;++c,i+=6)It(s,i,t[c-1],t[c],t[c-2]);return s}return new Uint16Array}function he(t){if(t.length>0){let e=t.length-1,n=(e-1)*6,s=j.createTypedArray(e,n),i=t[0],c=0;for(let o=1;o<e;++o,c+=6)It(s,c,i,t[o],t[o+1]);return s}return new Uint16Array}k.toWireframe=function(t){if(!f(t))throw new I("geometry is required.");let e=t.indices;if(f(e)){switch(t.primitiveType){case D.TRIANGLES:t.indices=de(e);break;case D.TRIANGLE_STRIP:t.indices=me(e);break;case D.TRIANGLE_FAN:t.indices=he(e);break;default:throw new I("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}t.primitiveType=D.LINES}return t};k.createLineSegmentsForVectors=function(t,e,n){if(e=e??"normal",!f(t))throw new I("geometry is required.");if(!f(t.attributes.position))throw new I("geometry.attributes.position is required.");if(!f(t.attributes[e]))throw new I(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`);n=n??1e4;let s=t.attributes.position.values,i=t.attributes[e].values,c=s.length,o=new Float64Array(2*c),a=0;for(let d=0;d<c;d+=3)o[a++]=s[d],o[a++]=s[d+1],o[a++]=s[d+2],o[a++]=s[d]+i[d]*n,o[a++]=s[d+1]+i[d+1]*n,o[a++]=s[d+2]+i[d+2]*n;let p,u=t.boundingSphere;return f(u)&&(p=new ot(u.center,u.radius+n)),new B({attributes:{position:new U({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:D.LINES,boundingSphere:p})};k.createAttributeLocations=function(t){if(!f(t))throw new I("geometry is required.");let e=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=t.attributes,s={},i=0,c,o=e.length;for(c=0;c<o;++c){let a=e[c];f(n[a])&&(s[a]=i++)}for(let a in n)n.hasOwnProperty(a)&&!f(s[a])&&(s[a]=i++);return s};k.reorderForPreVertexCache=function(t){if(!f(t))throw new I("geometry is required.");let e=B.computeNumberOfVertices(t),n=t.indices;if(f(n)){let s=new Int32Array(e);for(let l=0;l<e;l++)s[l]=-1;let i=n,c=i.length,o=j.createTypedArray(e,c),a=0,p=0,u=0,d;for(;a<c;)d=s[i[a]],d!==-1?o[p]=d:(d=i[a],s[d]=u,o[p]=u,++u),++a,++p;t.indices=o;let m=t.attributes;for(let l in m)if(m.hasOwnProperty(l)&&f(m[l])&&f(m[l].values)){let h=m[l],y=h.values,v=0,b=h.componentsPerAttribute,S=F.createTypedArray(h.componentDatatype,u*b);for(;v<e;){let x=s[v];if(x!==-1)for(let w=0;w<b;w++)S[b*x+w]=y[b*v+w];++v}h.values=S}}return t};k.reorderForPostVertexCache=function(t,e){if(!f(t))throw new I("geometry is required.");let n=t.indices;if(t.primitiveType===D.TRIANGLES&&f(n)){let s=n.length,i=0;for(let c=0;c<s;c++)n[c]>i&&(i=n[c]);t.indices=Wt.tipsify({indices:n,maximumIndex:i,cacheSize:e})}return t};function $t(t){let e={};for(let n in t)if(t.hasOwnProperty(n)&&f(t[n])&&f(t[n].values)){let s=t[n];e[n]=new U({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:[]})}return e}function be(t,e,n){for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];for(let c=0;c<i.componentsPerAttribute;++c)t[s].values.push(i.values[n*i.componentsPerAttribute+c])}}k.fitToUnsignedShortIndices=function(t){if(!f(t))throw new I("geometry is required.");if(f(t.indices)&&t.primitiveType!==D.TRIANGLES&&t.primitiveType!==D.LINES&&t.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let e=[],n=B.computeNumberOfVertices(t);if(f(t.indices)&&n>=N.SIXTY_FOUR_KILOBYTES){let s=[],i=[],c=0,o=$t(t.attributes),a=t.indices,p=a.length,u;t.primitiveType===D.TRIANGLES?u=3:t.primitiveType===D.LINES?u=2:t.primitiveType===D.POINTS&&(u=1);for(let d=0;d<p;d+=u){for(let m=0;m<u;++m){let l=a[d+m],h=s[l];f(h)||(h=c++,s[l]=h,be(o,t.attributes,l)),i.push(h)}c+u>=N.SIXTY_FOUR_KILOBYTES&&(e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV})),s=[],i=[],c=0,o=$t(t.attributes))}i.length!==0&&e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV}))}else e.push(t);return e};var Jt=new r,we=new Mt;k.projectTo2D=function(t,e,n,s,i){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeName3D is required.");if(!f(s))throw new I("attributeName2D is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==F.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let c=t.attributes[e];i=f(i)?i:new _t;let o=i.ellipsoid,a=c.values,p=new Float64Array(a.length),u=0;for(let d=0;d<a.length;d+=3){let m=r.fromArray(a,d,Jt),l=o.cartesianToCartographic(m,we);if(!f(l))throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);let h=i.project(l,Jt);p[u++]=h.x,p[u++]=h.y,p[u++]=h.z}return t.attributes[n]=c,t.attributes[s]=new U({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:p}),delete t.attributes[e],t};var zt={high:0,low:0};k.encodeAttribute=function(t,e,n,s){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeHighName is required.");if(!f(s))throw new I("attributeLowName is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==F.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let i=t.attributes[e],c=i.values,o=c.length,a=new Float32Array(o),p=new Float32Array(o);for(let d=0;d<o;++d)jt.encode(c[d],zt),a[d]=zt.high,p[d]=zt.low;let u=i.componentsPerAttribute;return t.attributes[n]=new U({componentDatatype:F.FLOAT,componentsPerAttribute:u,values:a}),t.attributes[s]=new U({componentDatatype:F.FLOAT,componentsPerAttribute:u,values:p}),delete t.attributes[e],t};var $=new r;function Dt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),H.multiplyByPoint(t,$,$),r.pack($,n,i)}}function qt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),gt.multiplyByVector(t,$,$),$=r.normalize($,$),r.pack($,n,i)}}var wt=new H,vt=new gt;k.transformToWorldCoordinates=function(t){if(!f(t))throw new I("instance is required.");let e=t.modelMatrix;if(H.equals(e,H.IDENTITY))return t;let n=t.geometry.attributes;Dt(e,n.position),Dt(e,n.prevPosition),Dt(e,n.nextPosition),(f(n.normal)||f(n.tangent)||f(n.bitangent))&&(H.inverse(e,wt),H.transpose(wt,wt),H.getMatrix3(wt,vt),qt(vt,n.normal),qt(vt,n.tangent),qt(vt,n.bitangent));let s=t.geometry.boundingSphere;return f(s)&&(t.geometry.boundingSphere=ot.transform(s,e,s)),t.modelMatrix=H.clone(H.IDENTITY),t};function ve(t,e){let n=t.length,s={},i=t[0][e].attributes,c;for(c in i)if(i.hasOwnProperty(c)&&f(i[c])&&f(i[c].values)){let o=i[c],a=o.values.length,p=!0;for(let u=1;u<n;++u){let d=t[u][e].attributes[c];if(!f(d)||o.componentDatatype!==d.componentDatatype||o.componentsPerAttribute!==d.componentsPerAttribute||o.normalize!==d.normalize){p=!1;break}a+=d.values.length}p&&(s[c]=new U({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:F.createTypedArray(o.componentDatatype,a)}))}return s}var ye=new r;function Rt(t,e){let n=t.length,s,i,c,o,a=t[0].modelMatrix,p=f(t[0][e].indices),u=t[0][e].primitiveType;for(i=1;i<n;++i){if(!H.equals(t[i].modelMatrix,a))throw new I("All instances must have the same modelMatrix.");if(f(t[i][e].indices)!==p)throw new I("All instance geometries must have an indices or not have one.");if(t[i][e].primitiveType!==u)throw new I("All instance geometries must have the same primitiveType.")}let d=ve(t,e),m,l,h;for(s in d)if(d.hasOwnProperty(s))for(m=d[s].values,o=0,i=0;i<n;++i)for(l=t[i][e].attributes[s].values,h=l.length,c=0;c<h;++c)m[o++]=l[c];let y;if(p){let x=0;for(i=0;i<n;++i)x+=t[i][e].indices.length;let w=B.computeNumberOfVertices(new B({attributes:d,primitiveType:D.POINTS})),A=j.createTypedArray(w,x),E=0,P=0;for(i=0;i<n;++i){let O=t[i][e].indices,L=O.length;for(o=0;o<L;++o)A[E++]=P+O[o];P+=B.computeNumberOfVertices(t[i][e])}y=A}let v=new r,b=0,S;for(i=0;i<n;++i){if(S=t[i][e].boundingSphere,!f(S)){v=void 0;break}r.add(S.center,v,v)}if(f(v))for(r.divideByScalar(v,n,v),i=0;i<n;++i){S=t[i][e].boundingSphere;let x=r.magnitude(r.subtract(S.center,v,ye))+S.radius;x>b&&(b=x)}return new B({attributes:d,indices:y,primitiveType:u,boundingSphere:f(v)?new ot(v,b):void 0})}k.combineInstances=function(t){if(!f(t)||t.length<1)throw new I("instances is required and must have length greater than zero.");let e=[],n=[],s=t.length;for(let c=0;c<s;++c){let o=t[c];f(o.geometry)?e.push(o):f(o.westHemisphereGeometry)&&f(o.eastHemisphereGeometry)&&n.push(o)}let i=[];return e.length>0&&i.push(Rt(e,"geometry")),n.length>0&&(i.push(Rt(n,"westHemisphereGeometry")),i.push(Rt(n,"eastHemisphereGeometry"))),i};var Z=new r,mt=new r,rt=new r,ct=new r;k.computeNormal=function(t){if(!f(t))throw new I("geometry is required.");if(!f(t.attributes.position)||!f(t.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(t.indices))throw new I("geometry.indices is required.");if(t.indices.length<2||t.indices.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let e=t.indices,n=t.attributes,s=n.position.values,i=n.position.values.length/3,c=e.length,o=new Array(i),a=new Array(c/3),p=new Array(c),u;for(u=0;u<i;u++)o[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<c;u+=3){let y=e[u],v=e[u+1],b=e[u+2],S=y*3,x=v*3,w=b*3;mt.x=s[S],mt.y=s[S+1],mt.z=s[S+2],rt.x=s[x],rt.y=s[x+1],rt.z=s[x+2],ct.x=s[w],ct.y=s[w+1],ct.z=s[w+2],o[y].count++,o[v].count++,o[b].count++,r.subtract(rt,mt,rt),r.subtract(ct,mt,ct),a[d]=r.cross(rt,ct,new r),d++}let m=0;for(u=0;u<i;u++)o[u].indexOffset+=m,m+=o[u].count;d=0;let l;for(u=0;u<c;u+=3){l=o[e[u]];let y=l.indexOffset+l.currentCount;p[y]=d,l.currentCount++,l=o[e[u+1]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,l=o[e[u+2]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,d++}let h=new Float32Array(i*3);for(u=0;u<i;u++){let y=u*3;if(l=o[u],r.clone(r.ZERO,Z),l.count>0){for(d=0;d<l.count;d++)r.add(Z,a[p[l.indexOffset+d]],Z);r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&r.clone(a[p[l.indexOffset]],Z)}r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&(Z.z=1),r.normalize(Z,Z),h[y]=Z.x,h[y+1]=Z.y,h[y+2]=Z.z}return t.attributes.normal=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:h}),t};var xe=new r,Kt=new r,Te=new r;k.computeTangentAndBitangent=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes,n=t.indices;if(!f(e.position)||!f(e.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.normal)||!f(e.normal.values))throw new I("geometry.attributes.normal.values is required.");if(!f(e.st)||!f(e.st.values))throw new I("geometry.attributes.st.values is required.");if(!f(n))throw new I("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let s=t.attributes.position.values,i=t.attributes.normal.values,c=t.attributes.st.values,o=t.attributes.position.values.length/3,a=n.length,p=new Array(o*3),u;for(u=0;u<p.length;u++)p[u]=0;let d,m,l;for(u=0;u<a;u+=3){let v=n[u],b=n[u+1],S=n[u+2];d=v*3,m=b*3,l=S*3;let x=v*2,w=b*2,A=S*2,E=s[d],P=s[d+1],O=s[d+2],L=c[x],g=c[x+1],T=c[w+1]-g,C=c[A+1]-g,z=1/((c[w]-L)*C-(c[A]-L)*T),q=(C*(s[m]-E)-T*(s[l]-E))*z,R=(C*(s[m+1]-P)-T*(s[l+1]-P))*z,G=(C*(s[m+2]-O)-T*(s[l+2]-O))*z;p[d]+=q,p[d+1]+=R,p[d+2]+=G,p[m]+=q,p[m+1]+=R,p[m+2]+=G,p[l]+=q,p[l+1]+=R,p[l+2]+=G}let h=new Float32Array(o*3),y=new Float32Array(o*3);for(u=0;u<o;u++){d=u*3,m=d+1,l=d+2;let v=r.fromArray(i,d,xe),b=r.fromArray(p,d,Te),S=r.dot(v,b);r.multiplyByScalar(v,S,Kt),r.normalize(r.subtract(b,Kt,b),b),h[d]=b.x,h[m]=b.y,h[l]=b.z,r.normalize(r.cross(v,b,b),b),y[d]=b.x,y[m]=b.y,y[l]=b.z}return t.attributes.tangent=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:h}),t.attributes.bitangent=new U({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:y}),t};var ht=new V,W=new r,Qt=new r,te=new r,yt=new V;k.compressVertices=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes.extrudeDirection,n,s;if(f(e)){let P=e.values;s=P.length/3;let O=new Float32Array(s*2),L=0;for(n=0;n<s;++n){if(r.fromArray(P,n*3,W),r.equals(W,r.ZERO)){L+=2;continue}yt=tt.octEncodeInRange(W,65535,yt),O[L++]=yt.x,O[L++]=yt.y}return t.attributes.compressedAttributes=new U({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:O}),delete t.attributes.extrudeDirection,t}let i=t.attributes.normal,c=t.attributes.st,o=f(i),a=f(c);if(!o&&!a)return t;let p=t.attributes.tangent,u=t.attributes.bitangent,d=f(p),m=f(u),l,h,y,v;o&&(l=i.values),a&&(h=c.values),d&&(y=p.values),m&&(v=u.values),s=(o?l.length:h.length)/(o?3:2);let x=s,w=a&&o?2:1;w+=d||m?1:0,x*=w;let A=new Float32Array(x),E=0;for(n=0;n<s;++n){a&&(V.fromArray(h,n*2,ht),A[E++]=tt.compressTextureCoordinates(ht));let P=n*3;o&&f(y)&&f(v)?(r.fromArray(l,P,W),r.fromArray(y,P,Qt),r.fromArray(v,P,te),tt.octPack(W,Qt,te,ht),A[E++]=ht.x,A[E++]=ht.y):(o&&(r.fromArray(l,P,W),A[E++]=tt.octEncodeFloat(W)),d&&(r.fromArray(y,P,W),A[E++]=tt.octEncodeFloat(W)),m&&(r.fromArray(v,P,W),A[E++]=tt.octEncodeFloat(W)))}return t.attributes.compressedAttributes=new U({componentDatatype:F.FLOAT,componentsPerAttribute:w,values:A}),o&&delete t.attributes.normal,a&&delete t.attributes.st,m&&delete t.attributes.bitangent,d&&delete t.attributes.tangent,t};function Ae(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");if(e%3!==0)throw new I("The number of vertices must be a multiple of three.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function Ie(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");let n=j.createTypedArray(e,(e-2)*3);n[0]=1,n[1]=0,n[2]=2;let s=3;for(let i=3;i<e;++i)n[s++]=i-1,n[s++]=0,n[s++]=i;return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Se(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least 3.");let n=j.createTypedArray(e,(e-2)*3);n[0]=0,n[1]=1,n[2]=2,e>3&&(n[3]=0,n[4]=2,n[5]=3);let s=6;for(let i=3;i<e-1;i+=2)n[s++]=i,n[s++]=i-1,n[s++]=i+1,i+2<e&&(n[s++]=i,n[s++]=i+1,n[s++]=i+2);return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Pe(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");if(e%2!==0)throw new I("The number of vertices must be a multiple of 2.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function ge(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,(e-1)*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return t.indices=n,t.primitiveType=D.LINES,t}function Oe(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,e*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return n[s++]=e-1,n[s]=0,t.indices=n,t.primitiveType=D.LINES,t}function Le(t){switch(t.primitiveType){case D.TRIANGLE_FAN:return Ie(t);case D.TRIANGLE_STRIP:return Se(t);case D.TRIANGLES:return Ae(t);case D.LINE_STRIP:return ge(t);case D.LINE_LOOP:return Oe(t);case D.LINES:return Pe(t)}return t}function Q(t,e){Math.abs(t.y)<N.EPSILON6&&(e?t.y=-N.EPSILON6:t.y=N.EPSILON6)}function Ee(t,e,n){if(t.y!==0&&e.y!==0&&n.y!==0){Q(t,t.y<0),Q(e,e.y<0),Q(n,n.y<0);return}let s=Math.abs(t.y),i=Math.abs(e.y),c=Math.abs(n.y),o;s>i?s>c?o=N.sign(t.y):o=N.sign(n.y):i>c?o=N.sign(e.y):o=N.sign(n.y);let a=o<0;Q(t,a),Q(e,a),Q(n,a)}var ee=new r;function X(t,e,n,s){r.add(t,r.multiplyByScalar(r.subtract(e,t,ee),t.y/(t.y-e.y),ee),n),r.clone(n,s),Q(n,!0),Q(s,!1)}var et=new r,nt=new r,it=new r,st=new r,Vt={positions:new Array(7),indices:new Array(3*3)};function Ne(t,e,n){if(t.x>=0||e.x>=0||n.x>=0)return;Ee(t,e,n);let s=t.y<0,i=e.y<0,c=n.y<0,o=0;o+=s?1:0,o+=i?1:0,o+=c?1:0;let a=Vt.indices;o===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,s?(X(t,e,et,it),X(t,n,nt,st),a[0]=0,a[3]=1,a[4]=2,a[6]=1):i?(X(e,n,et,it),X(e,t,nt,st),a[0]=1,a[3]=2,a[4]=0,a[6]=2):c&&(X(n,t,et,it),X(n,e,nt,st),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):o===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,s?i?c||(X(n,t,et,it),X(n,e,nt,st),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(e,n,et,it),X(e,t,nt,st),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(t,e,et,it),X(t,n,nt,st),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let p=Vt.positions;return p[0]=t,p[1]=e,p[2]=n,p.length=3,(o===1||o===2)&&(p[3]=et,p[4]=nt,p[5]=it,p[6]=st,p.length=7),Vt}function ne(t,e){let n=t.attributes;if(n.position.values.length===0)return;for(let i in n)if(n.hasOwnProperty(i)&&f(n[i])&&f(n[i].values)){let c=n[i];c.values=F.createTypedArray(c.componentDatatype,c.values)}let s=B.computeNumberOfVertices(t);return t.indices=j.createTypedArray(s,t.indices),e&&(t.boundingSphere=ot.fromVertices(n.position.values)),t}function ut(t){let e=t.attributes,n={};for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];n[s]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:n,indices:[],primitiveType:t.primitiveType})}function Ft(t,e,n){let s=f(t.geometry.boundingSphere);e=ne(e,s),n=ne(n,s),f(n)&&!f(e)?t.geometry=n:!f(n)&&f(e)?t.geometry=e:(t.westHemisphereGeometry=e,t.eastHemisphereGeometry=n,t.geometry=void 0)}function kt(t,e){let n=new t,s=new t,i=new t;return function(c,o,a,p,u,d,m,l){let h=t.fromArray(u,c*e,n),y=t.fromArray(u,o*e,s),v=t.fromArray(u,a*e,i);t.multiplyByScalar(h,p.x,h),t.multiplyByScalar(y,p.y,y),t.multiplyByScalar(v,p.z,v);let b=t.add(h,y,h);t.add(b,v,b),l&&t.normalize(b,b),t.pack(b,d,m*e)}}var ze=kt(pt,4),At=kt(r,3),ae=kt(V,2),De=function(t,e,n,s,i,c,o){let a=i[t]*s.x,p=i[e]*s.y,u=i[n]*s.z;c[o]=a+p+u>N.EPSILON6?1:0},bt=new r,Gt=new r,Ct=new r,qe=new r;function xt(t,e,n,s,i,c,o,a,p,u,d,m,l,h,y,v){if(!f(c)&&!f(o)&&!f(a)&&!f(p)&&!f(u)&&h===0)return;let b=r.fromArray(i,t*3,bt),S=r.fromArray(i,e*3,Gt),x=r.fromArray(i,n*3,Ct),w=Ht(s,b,S,x,qe);if(f(w)){if(f(c)&&At(t,e,n,w,c,m.normal.values,v,!0),f(u)){let A=r.fromArray(u,t*3,bt),E=r.fromArray(u,e*3,Gt),P=r.fromArray(u,n*3,Ct);r.multiplyByScalar(A,w.x,A),r.multiplyByScalar(E,w.y,E),r.multiplyByScalar(P,w.z,P);let O;!r.equals(A,r.ZERO)||!r.equals(E,r.ZERO)||!r.equals(P,r.ZERO)?(O=r.add(A,E,A),r.add(O,P,O),r.normalize(O,O)):(O=bt,O.x=0,O.y=0,O.z=0),r.pack(O,m.extrudeDirection.values,v*3)}if(f(d)&&De(t,e,n,w,d,m.applyOffset.values,v),f(o)&&At(t,e,n,w,o,m.tangent.values,v,!0),f(a)&&At(t,e,n,w,a,m.bitangent.values,v,!0),f(p)&&ae(t,e,n,w,p,m.st.values,v),h>0)for(let A=0;A<h;A++){let E=l[A];Re(t,e,n,w,v,y[E],m[E])}}}function Re(t,e,n,s,i,c,o){let a=c.componentsPerAttribute,p=c.values,u=o.values;switch(a){case 4:ze(t,e,n,s,p,u,i,!1);break;case 3:At(t,e,n,s,p,u,i,!1);break;case 2:ae(t,e,n,s,p,u,i,!1);break;default:u[i]=p[t]*s.x+p[e]*s.y+p[n]*s.z}}function K(t,e,n,s,i,c){let o=t.position.values.length/3;if(i!==-1){let a=s[i],p=n[a];return p===-1?(n[a]=o,t.position.values.push(c.x,c.y,c.z),e.push(o),o):(e.push(p),p)}return t.position.values.push(c.x,c.y,c.z),e.push(o),o}var Ve={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ie(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.normal)?n.normal.values:void 0,c=f(n.bitangent)?n.bitangent.values:void 0,o=f(n.tangent)?n.tangent.values:void 0,a=f(n.st)?n.st.values:void 0,p=f(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=f(n.applyOffset)?n.applyOffset.values:void 0,d=e.indices,m=[];for(let O in n)n.hasOwnProperty(O)&&!Ve[O]&&f(n[O])&&m.push(O);let l=m.length,h=ut(e),y=ut(e),v,b,S,x,w,A=[];A.length=s.length/3;let E=[];for(E.length=s.length/3,w=0;w<A.length;++w)A[w]=-1,E[w]=-1;let P=d.length;for(w=0;w<P;w+=3){let O=d[w],L=d[w+1],g=d[w+2],T=r.fromArray(s,O*3),C=r.fromArray(s,L*3),z=r.fromArray(s,g*3),q=Ne(T,C,z);if(f(q)&&q.positions.length>3){let R=q.positions,G=q.indices,M=G.length;for(let J=0;J<M;++J){let Y=G[J],_=R[Y];_.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=K(v,b,S,d,Y<3?w+Y:-1,_),xt(O,L,g,_,s,i,o,c,a,p,u,v,m,l,n,x)}}else f(q)&&(T=q.positions[0],C=q.positions[1],z=q.positions[2]),T.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=K(v,b,S,d,w,T),xt(O,L,g,T,s,i,o,c,a,p,u,v,m,l,n,x),x=K(v,b,S,d,w+1,C),xt(O,L,g,C,s,i,o,c,a,p,u,v,m,l,n,x),x=K(v,b,S,d,w+2,z),xt(O,L,g,z,s,i,o,c,a,p,u,v,m,l,n,x)}Ft(t,y,h)}var ue=Et.fromPointNormal(r.ZERO,r.UNIT_Y),Ge=new r,Ce=new r;function at(t,e,n,s,i,c,o){if(!f(o))return;let a=r.fromArray(s,t*3,bt);r.equalsEpsilon(a,n,N.EPSILON10)?c.applyOffset.values[i]=o[t]:c.applyOffset.values[i]=o[e]}function se(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.applyOffset)?n.applyOffset.values:void 0,c=e.indices,o=ut(e),a=ut(e),p,u=c.length,d=[];d.length=s.length/3;let m=[];for(m.length=s.length/3,p=0;p<d.length;++p)d[p]=-1,m[p]=-1;for(p=0;p<u;p+=2){let l=c[p],h=c[p+1],y=r.fromArray(s,l*3,bt),v=r.fromArray(s,h*3,Gt),b;Math.abs(y.y)<N.EPSILON6&&(y.y<0?y.y=-N.EPSILON6:y.y=N.EPSILON6),Math.abs(v.y)<N.EPSILON6&&(v.y<0?v.y=-N.EPSILON6:v.y=N.EPSILON6);let S=o.attributes,x=o.indices,w=m,A=a.attributes,E=a.indices,P=d,O=Lt.lineSegmentPlane(y,v,ue,Ct);if(f(O)){let L=r.multiplyByScalar(r.UNIT_Y,5*N.EPSILON9,Ge);y.y<0&&(r.negate(L,L),S=a.attributes,x=a.indices,w=d,A=o.attributes,E=o.indices,P=m);let g=r.add(O,L,Ce);b=K(S,x,w,c,p,y),at(l,h,y,s,b,S,i),b=K(S,x,w,c,-1,g),at(l,h,g,s,b,S,i),r.negate(L,L),r.add(O,L,g),b=K(A,E,P,c,-1,g),at(l,h,g,s,b,A,i),b=K(A,E,P,c,p+1,v),at(l,h,v,s,b,A,i)}else{let L,g,T;y.y<0?(L=a.attributes,g=a.indices,T=d):(L=o.attributes,g=o.indices,T=m),b=K(L,g,T,c,p,y),at(l,h,y,s,b,L,i),b=K(L,g,T,c,p+1,v),at(l,h,v,s,b,L,i)}}Ft(t,a,o)}var oe=new V,Be=new V,le=new r,fe=new r,Bt=new r,Fe=new r,ke=new r,Me=new r,re=new pt;function ce(t){let e=t.attributes,n=e.position.values,s=e.prevPosition.values,i=e.nextPosition.values,c=n.length;for(let o=0;o<c;o+=3){let a=r.unpack(n,o,le);if(a.x>0)continue;let p=r.unpack(s,o,fe);(a.y<0&&p.y>0||a.y>0&&p.y<0)&&(o-3>0?(s[o]=n[o-3],s[o+1]=n[o-2],s[o+2]=n[o-1]):r.pack(a,s,o));let u=r.unpack(i,o,Bt);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(o+3<c?(i[o]=n[o+3],i[o+1]=n[o+4],i[o+2]=n[o+5]):r.pack(a,i,o))}}var _e=5*N.EPSILON9,Tt=N.EPSILON6;function Ue(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=n.prevPosition.values,c=n.nextPosition.values,o=n.expandAndWidth.values,a=f(n.st)?n.st.values:void 0,p=f(n.color)?n.color.values:void 0,u=ut(e),d=ut(e),m,l,h,y=!1,v=s.length/3;for(m=0;m<v;m+=4){let b=m,S=m+2,x=r.fromArray(s,b*3,le),w=r.fromArray(s,S*3,fe);if(Math.abs(x.y)<Tt)for(x.y=Tt*(w.y<0?-1:1),s[m*3+1]=x.y,s[(m+1)*3+1]=x.y,l=b*3;l<b*3+4*3;l+=3)i[l]=s[m*3],i[l+1]=s[m*3+1],i[l+2]=s[m*3+2];if(Math.abs(w.y)<Tt)for(w.y=Tt*(x.y<0?-1:1),s[(m+2)*3+1]=w.y,s[(m+3)*3+1]=w.y,l=b*3;l<b*3+4*3;l+=3)c[l]=s[(m+2)*3],c[l+1]=s[(m+2)*3+1],c[l+2]=s[(m+2)*3+2];let A=u.attributes,E=u.indices,P=d.attributes,O=d.indices,L=Lt.lineSegmentPlane(x,w,ue,Fe);if(f(L)){y=!0;let g=r.multiplyByScalar(r.UNIT_Y,_e,ke);x.y<0&&(r.negate(g,g),A=d.attributes,E=d.indices,P=u.attributes,O=u.indices);let T=r.add(L,g,Me);A.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.position.values.push(T.x,T.y,T.z),A.position.values.push(T.x,T.y,T.z),A.prevPosition.values.push(i[b*3],i[b*3+1],i[b*3+2]),A.prevPosition.values.push(i[b*3+3],i[b*3+4],i[b*3+5]),A.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),r.negate(g,g),r.add(L,g,T),P.position.values.push(T.x,T.y,T.z),P.position.values.push(T.x,T.y,T.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(c[S*3],c[S*3+1],c[S*3+2]),P.nextPosition.values.push(c[S*3+3],c[S*3+4],c[S*3+5]);let C=V.fromArray(o,b*2,oe),z=Math.abs(C.y);A.expandAndWidth.values.push(-1,z,1,z),A.expandAndWidth.values.push(-1,-z,1,-z),P.expandAndWidth.values.push(-1,z,1,z),P.expandAndWidth.values.push(-1,-z,1,-z);let q=r.magnitudeSquared(r.subtract(L,x,Bt));if(q/=r.magnitudeSquared(r.subtract(w,x,Bt)),f(p)){let R=pt.fromArray(p,b*4,re),G=pt.fromArray(p,S*4,re),M=N.lerp(R.x,G.x,q),J=N.lerp(R.y,G.y,q),Y=N.lerp(R.z,G.z,q),_=N.lerp(R.w,G.w,q);for(l=b*4;l<b*4+2*4;++l)A.color.values.push(p[l]);for(A.color.values.push(M,J,Y,_),A.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),l=S*4;l<S*4+2*4;++l)P.color.values.push(p[l])}if(f(a)){let R=V.fromArray(a,b*2,oe),G=V.fromArray(a,(m+3)*2,Be),M=N.lerp(R.x,G.x,q);for(l=b*2;l<b*2+2*2;++l)A.st.values.push(a[l]);for(A.st.values.push(M,R.y),A.st.values.push(M,G.y),P.st.values.push(M,R.y),P.st.values.push(M,G.y),l=S*2;l<S*2+2*2;++l)P.st.values.push(a[l])}h=A.position.values.length/3-4,E.push(h,h+2,h+1),E.push(h+1,h+2,h+3),h=P.position.values.length/3-4,O.push(h,h+2,h+1),O.push(h+1,h+2,h+3)}else{let g,T;for(x.y<0?(g=d.attributes,T=d.indices):(g=u.attributes,T=u.indices),g.position.values.push(x.x,x.y,x.z),g.position.values.push(x.x,x.y,x.z),g.position.values.push(w.x,w.y,w.z),g.position.values.push(w.x,w.y,w.z),l=m*3;l<m*3+4*3;++l)g.prevPosition.values.push(i[l]),g.nextPosition.values.push(c[l]);for(l=m*2;l<m*2+4*2;++l)g.expandAndWidth.values.push(o[l]),f(a)&&g.st.values.push(a[l]);if(f(p))for(l=m*4;l<m*4+4*4;++l)g.color.values.push(p[l]);h=g.position.values.length/3-4,T.push(h,h+2,h+1),T.push(h+1,h+2,h+3)}}y&&(ce(d),ce(u)),Ft(t,d,u)}k.splitLongitude=function(t){if(!f(t))throw new I("instance is required.");let e=t.geometry,n=e.boundingSphere;if(f(n)&&(n.center.x-n.radius>0||ot.intersectPlane(n,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return t;if(e.geometryType!==dt.NONE)switch(e.geometryType){case dt.POLYLINES:Ue(t);break;case dt.TRIANGLES:ie(t);break;case dt.LINES:se(t);break}else Le(e),e.primitiveType===D.TRIANGLES?ie(t):e.primitiveType===D.LINES&&se(t);return t};var Pn=k;export{Pn as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as n,b as a}from"./chunk-LEYMRMBK.js";import{c as E,d as I,e as o}from"./chunk-VTAIKJXX.js";var d=E((_,m)=>{var f=function(t){t==null&&(t=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};f.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};f.prototype.init_by_array=function(t,i){var e,s,h;for(this.init_seed(19650218),e=1,s=0,h=this.N>i?this.N:i;h;h--){var u=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((u&4294901760)>>>16)*1664525<<16)+(u&65535)*1664525)+t[s]+s,this.mt[e]>>>=0,e++,s++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1),s>=i&&(s=0)}for(h=this.N-1;h;h--){var u=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((u&4294901760)>>>16)*1566083941<<16)+(u&65535)*1566083941)-e,this.mt[e]>>>=0,e++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1)}this.mt[0]=2147483648};f.prototype.random_int=function(){var t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var e;for(this.mti==this.N+1&&this.init_seed(5489),e=0;e<this.N-this.M;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+this.M]^t>>>1^i[t&1];for(;e<this.N-1;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+(this.M-this.N)]^t>>>1^i[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^i[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};f.prototype.random_int31=function(){return this.random_int()>>>1};f.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};f.prototype.random=function(){return this.random_int()*(1/4294967296)};f.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};f.prototype.random_long=function(){var t=this.random_int()>>>5,i=this.random_int()>>>6;return(t*67108864+i)*(1/9007199254740992)};m.exports=f});var w=I(d(),1);var r={};r.EPSILON1=.1;r.EPSILON2=.01;r.EPSILON3=.001;r.EPSILON4=1e-4;r.EPSILON5=1e-5;r.EPSILON6=1e-6;r.EPSILON7=1e-7;r.EPSILON8=1e-8;r.EPSILON9=1e-9;r.EPSILON10=1e-10;r.EPSILON11=1e-11;r.EPSILON12=1e-12;r.EPSILON13=1e-13;r.EPSILON14=1e-14;r.EPSILON15=1e-15;r.EPSILON16=1e-16;r.EPSILON17=1e-17;r.EPSILON18=1e-18;r.EPSILON19=1e-19;r.EPSILON20=1e-20;r.EPSILON21=1e-21;r.GRAVITATIONALPARAMETER=3986004418e5;r.SOLAR_RADIUS=6955e5;r.LUNAR_RADIUS=1737400;r.SIXTY_FOUR_KILOBYTES=64*1024;r.FOUR_GIGABYTES=4*1024*1024*1024;r.sign=Math.sign??function(i){return i=+i,i===0||i!==i?i:i>0?1:-1};r.signNotZero=function(t){return t<0?-1:1};r.toSNorm=function(t,i){return i=i??255,Math.round((r.clamp(t,-1,1)*.5+.5)*i)};r.fromSNorm=function(t,i){return i=i??255,r.clamp(t,0,i)/i*2-1};r.normalize=function(t,i,e){return e=Math.max(e-i,0),e===0?0:r.clamp((t-i)/e,0,1)};r.sinh=Math.sinh??function(i){return(Math.exp(i)-Math.exp(-i))/2};r.cosh=Math.cosh??function(i){return(Math.exp(i)+Math.exp(-i))/2};r.lerp=function(t,i,e){return(1-e)*t+e*i};r.PI=Math.PI;r.ONE_OVER_PI=1/Math.PI;r.PI_OVER_TWO=Math.PI/2;r.PI_OVER_THREE=Math.PI/3;r.PI_OVER_FOUR=Math.PI/4;r.PI_OVER_SIX=Math.PI/6;r.THREE_PI_OVER_TWO=3*Math.PI/2;r.TWO_PI=2*Math.PI;r.ONE_OVER_TWO_PI=1/(2*Math.PI);r.RADIANS_PER_DEGREE=Math.PI/180;r.DEGREES_PER_RADIAN=180/Math.PI;r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600;r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE};r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN};r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let i=r.TWO_PI,e=t-Math.floor(t/i)*i;return e<-Math.PI?e+i:e>=Math.PI?e-i:e};r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)};r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI};r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let i=r.mod(t,r.TWO_PI);return Math.abs(i)<r.EPSILON14&&Math.abs(t)>r.EPSILON14?r.TWO_PI:i};r.mod=function(t,i){if(!o(t))throw new n("m is required.");if(!o(i))throw new n("n is required.");if(i===0)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(i)&&Math.abs(t)<Math.abs(i)?t:(t%i+i)%i};r.equalsEpsilon=function(t,i,e,s){if(!o(t))throw new n("left is required.");if(!o(i))throw new n("right is required.");e=e??0,s=s??e;let h=Math.abs(t-i);return h<=s||h<=e*Math.max(Math.abs(t),Math.abs(i))};r.lessThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<-e};r.lessThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<e};r.greaterThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>e};r.greaterThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>-e};var c=[1];r.factorial=function(t){if(typeof t!="number"||t<0)throw new n("A number greater than or equal to 0 is required.");let i=c.length;if(t>=i){let e=c[i-1];for(let s=i;s<=t;s++){let h=e*s;c.push(h),e=h}}return c[t]};r.incrementWrap=function(t,i,e){if(e=e??0,!o(t))throw new n("n is required.");if(i<=e)throw new n("maximumValue must be greater than minimumValue.");return++t,t>i&&(t=e),t};r.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0};r.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t};r.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t};r.clamp=function(t,i,e){return a.typeOf.number("value",t),a.typeOf.number("min",i),a.typeOf.number("max",e),t<i?i:t>e?e:t};var P=new w.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");P=new w.default(t)};r.nextRandomNumber=function(){return P.random()};r.randomBetween=function(t,i){return r.nextRandomNumber()*(i-t)+t};r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))};r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))};r.chordLength=function(t,i){if(!o(t))throw new n("angle is required.");if(!o(i))throw new n("radius is required.");return 2*i*Math.sin(t*.5)};r.logBase=function(t,i){if(!o(t))throw new n("number is required.");if(!o(i))throw new n("base is required.");return Math.log(t)/Math.log(i)};r.cbrt=Math.cbrt??function(i){let e=Math.pow(Math.abs(i),.3333333333333333);return i<0?-e:e};r.log2=Math.log2??function(i){return Math.log(i)*Math.LOG2E};r.fog=function(t,i){let e=t*i;return 1-Math.exp(-(e*e))};r.fastApproximateAtan=function(t){return a.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)};r.fastApproximateAtan2=function(t,i){a.typeOf.number("x",t),a.typeOf.number("y",i);let e,s=Math.abs(t);e=Math.abs(i);let h=Math.max(s,e);e=Math.min(s,e);let u=e/h;if(isNaN(u))throw new n("either x or y must be nonzero");return s=r.fastApproximateAtan(u),s=Math.abs(i)>Math.abs(t)?r.PI_OVER_TWO-s:s,s=t<0?r.PI-s:s,s=i<0?-s:s,s};var M=r;export{M as a};
26
+ import{a as n,b as a}from"./chunk-R3KD5ZAI.js";import{c as E,d as I,e as o}from"./chunk-GBI3IATP.js";var d=E((_,m)=>{var f=function(t){t==null&&(t=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};f.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};f.prototype.init_by_array=function(t,i){var e,s,h;for(this.init_seed(19650218),e=1,s=0,h=this.N>i?this.N:i;h;h--){var u=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((u&4294901760)>>>16)*1664525<<16)+(u&65535)*1664525)+t[s]+s,this.mt[e]>>>=0,e++,s++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1),s>=i&&(s=0)}for(h=this.N-1;h;h--){var u=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((u&4294901760)>>>16)*1566083941<<16)+(u&65535)*1566083941)-e,this.mt[e]>>>=0,e++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1)}this.mt[0]=2147483648};f.prototype.random_int=function(){var t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var e;for(this.mti==this.N+1&&this.init_seed(5489),e=0;e<this.N-this.M;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+this.M]^t>>>1^i[t&1];for(;e<this.N-1;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+(this.M-this.N)]^t>>>1^i[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^i[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};f.prototype.random_int31=function(){return this.random_int()>>>1};f.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};f.prototype.random=function(){return this.random_int()*(1/4294967296)};f.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};f.prototype.random_long=function(){var t=this.random_int()>>>5,i=this.random_int()>>>6;return(t*67108864+i)*(1/9007199254740992)};m.exports=f});var w=I(d(),1);var r={};r.EPSILON1=.1;r.EPSILON2=.01;r.EPSILON3=.001;r.EPSILON4=1e-4;r.EPSILON5=1e-5;r.EPSILON6=1e-6;r.EPSILON7=1e-7;r.EPSILON8=1e-8;r.EPSILON9=1e-9;r.EPSILON10=1e-10;r.EPSILON11=1e-11;r.EPSILON12=1e-12;r.EPSILON13=1e-13;r.EPSILON14=1e-14;r.EPSILON15=1e-15;r.EPSILON16=1e-16;r.EPSILON17=1e-17;r.EPSILON18=1e-18;r.EPSILON19=1e-19;r.EPSILON20=1e-20;r.EPSILON21=1e-21;r.GRAVITATIONALPARAMETER=3986004418e5;r.SOLAR_RADIUS=6955e5;r.LUNAR_RADIUS=1737400;r.SIXTY_FOUR_KILOBYTES=64*1024;r.FOUR_GIGABYTES=4*1024*1024*1024;r.sign=Math.sign??function(i){return i=+i,i===0||i!==i?i:i>0?1:-1};r.signNotZero=function(t){return t<0?-1:1};r.toSNorm=function(t,i){return i=i??255,Math.round((r.clamp(t,-1,1)*.5+.5)*i)};r.fromSNorm=function(t,i){return i=i??255,r.clamp(t,0,i)/i*2-1};r.normalize=function(t,i,e){return e=Math.max(e-i,0),e===0?0:r.clamp((t-i)/e,0,1)};r.sinh=Math.sinh??function(i){return(Math.exp(i)-Math.exp(-i))/2};r.cosh=Math.cosh??function(i){return(Math.exp(i)+Math.exp(-i))/2};r.lerp=function(t,i,e){return(1-e)*t+e*i};r.PI=Math.PI;r.ONE_OVER_PI=1/Math.PI;r.PI_OVER_TWO=Math.PI/2;r.PI_OVER_THREE=Math.PI/3;r.PI_OVER_FOUR=Math.PI/4;r.PI_OVER_SIX=Math.PI/6;r.THREE_PI_OVER_TWO=3*Math.PI/2;r.TWO_PI=2*Math.PI;r.ONE_OVER_TWO_PI=1/(2*Math.PI);r.RADIANS_PER_DEGREE=Math.PI/180;r.DEGREES_PER_RADIAN=180/Math.PI;r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600;r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE};r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN};r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let i=r.TWO_PI,e=t-Math.floor(t/i)*i;return e<-Math.PI?e+i:e>=Math.PI?e-i:e};r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)};r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI};r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let i=r.mod(t,r.TWO_PI);return Math.abs(i)<r.EPSILON14&&Math.abs(t)>r.EPSILON14?r.TWO_PI:i};r.mod=function(t,i){if(!o(t))throw new n("m is required.");if(!o(i))throw new n("n is required.");if(i===0)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(i)&&Math.abs(t)<Math.abs(i)?t:(t%i+i)%i};r.equalsEpsilon=function(t,i,e,s){if(!o(t))throw new n("left is required.");if(!o(i))throw new n("right is required.");e=e??0,s=s??e;let h=Math.abs(t-i);return h<=s||h<=e*Math.max(Math.abs(t),Math.abs(i))};r.lessThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<-e};r.lessThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<e};r.greaterThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>e};r.greaterThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>-e};var c=[1];r.factorial=function(t){if(typeof t!="number"||t<0)throw new n("A number greater than or equal to 0 is required.");let i=c.length;if(t>=i){let e=c[i-1];for(let s=i;s<=t;s++){let h=e*s;c.push(h),e=h}}return c[t]};r.incrementWrap=function(t,i,e){if(e=e??0,!o(t))throw new n("n is required.");if(i<=e)throw new n("maximumValue must be greater than minimumValue.");return++t,t>i&&(t=e),t};r.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0};r.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t};r.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t};r.clamp=function(t,i,e){return a.typeOf.number("value",t),a.typeOf.number("min",i),a.typeOf.number("max",e),t<i?i:t>e?e:t};var P=new w.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");P=new w.default(t)};r.nextRandomNumber=function(){return P.random()};r.randomBetween=function(t,i){return r.nextRandomNumber()*(i-t)+t};r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))};r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))};r.chordLength=function(t,i){if(!o(t))throw new n("angle is required.");if(!o(i))throw new n("radius is required.");return 2*i*Math.sin(t*.5)};r.logBase=function(t,i){if(!o(t))throw new n("number is required.");if(!o(i))throw new n("base is required.");return Math.log(t)/Math.log(i)};r.cbrt=Math.cbrt??function(i){let e=Math.pow(Math.abs(i),.3333333333333333);return i<0?-e:e};r.log2=Math.log2??function(i){return Math.log(i)*Math.LOG2E};r.fog=function(t,i){let e=t*i;return 1-Math.exp(-(e*e))};r.fastApproximateAtan=function(t){return a.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)};r.fastApproximateAtan2=function(t,i){a.typeOf.number("x",t),a.typeOf.number("y",i);let e,s=Math.abs(t);e=Math.abs(i);let h=Math.max(s,e);e=Math.min(s,e);let u=e/h;if(isNaN(u))throw new n("either x or y must be nonzero");return s=r.fastApproximateAtan(u),s=Math.abs(i)>Math.abs(t)?r.PI_OVER_TWO-s:s,s=t<0?r.PI-s:s,s=i<0?-s:s,s};var M=r;export{M as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as _}from"./chunk-XRL4AVS5.js";import{a as te}from"./chunk-TCGIRNHN.js";import{a as ie,b as j,f as Z,g as fe}from"./chunk-PSPPBZWI.js";import{a as e,b as se,c as ee,e as O}from"./chunk-64RSHJUE.js";import{a as Q}from"./chunk-3SSKC3VN.js";import{a as le}from"./chunk-LEYMRMBK.js";import{e as $}from"./chunk-VTAIKJXX.js";var Ee={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Ee);var me={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(me[r])||(me[r]=!0,console.warn(n??r))}P.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.";P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var ue=P;var w=[new e,new e],Se=new e,Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,I=new e,W=new e,R={},re=new se;function De(r,n){let a=new Array(r.length);for(let o=0;o<r.length;o++){let t=r[o];re=n.cartesianToCartographic(t,re),a[o]=re.height,r[o]=n.scaleToGeodeticSurface(t,t)}return a}function ne(r,n,a,o){let t=r[0],c=r[1],f=e.angleBetween(t,c),l=Math.ceil(f/o),m=new Array(l),s;if(n===a){for(s=0;s<l;s++)m[s]=n;return m.push(a),m}let d=(a-n)/l;for(s=1;s<l;s++){let x=n+s*d;m[s]=x}return m[0]=n,m.push(a),m}var X=new e,Y=new e;function je(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y),l=ee.angleBetween(c,f);return f.x*c.y-f.y*c.x>=0?-l:l}var He=new e(-1,0,0),H=new j,Me=new j,oe=new O,Ne=O.IDENTITY.clone(),Ve=new e,Fe=new ie,he=new e;function v(r,n,a,o,t,c,f,l){let m=Ve,s=Fe;H=fe.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,He,m),m=e.normalize(m,m);let S=je(m,n,r,t);oe=O.fromRotationZ(S,oe),he.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,he,Me),H);let d=Ne;d[0]=f;for(let x=0;x<l;x++)for(let i=0;i<a.length;i+=3)s=e.fromArray(a,i,s),s=O.multiplyByVector(d,s,s),s=j.multiplyByPoint(H,s,s),o.push(s.x,s.y,s.z);return o}var Ge=new e;function ce(r,n,a,o,t,c,f){for(let l=0;l<r.length;l+=3){let m=e.fromArray(r,l,Ge);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Ie(r,n){let a=r.length,o=new Array(a*6),t=0,c=n.x+n.width/2,f=n.y+n.height/2,l=r[0];o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f;for(let m=1;m<a;m++){l=r[m];let s=l.x-c,S=l.y-f;o[t++]=s,o[t++]=0,o[t++]=S,o[t++]=s,o[t++]=0,o[t++]=S}return l=r[0],o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f,o}function de(r,n){let a=r.length,o=new Array(a*3),t=0,c=n.x+n.width/2,f=n.y+n.height/2;for(let l=0;l<a;l++)o[t++]=r[l].x-c,o[t++]=0,o[t++]=r[l].y-f;return o}var ge=new Z,ye=new e,we=new O;function pe(r,n,a,o,t,c,f,l,m,s){let S=e.angleBetween(e.subtract(n,r,I),e.subtract(a,r,W)),d=o===G.BEVELED?0:Math.ceil(S/Q.toRadians(5)),x;t?x=O.fromQuaternion(Z.fromAxisAngle(e.negate(r,I),S/(d+1),ge),we):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ge),we);let i,g;if(n=e.clone(n,ye),d>0){let D=s?2:1;for(let y=0;y<d;y++)n=O.multiplyByVector(x,n,n),i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,D)}else i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,1),a=e.clone(a,ye),i=e.subtract(a,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(a,W),f=v(g,i,l,f,c,m,1,1);return f}R.removeDuplicatesFromShape=function(r){let n=r.length,a=[];for(let o=n-1,t=0;t<n;o=t++){let c=r[o],f=r[t];ee.equals(c,f)||a.push(f)}return a};R.angleIsGreaterThanPi=function(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y);return f.x*c.y-f.y*c.x>=0};var Le=new e,qe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=De(r,c),l=o._granularity,m=o._cornerType,s=t?Ie(n,a):de(n,a),S=t?de(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Se,b=Te,h=Be,E=Ce,B=ze,C=Ae,z=be,u=Oe,T=ve,p=r[0],M=r[1];E=c.geodeticSurfaceNormal(p,E),y=e.subtract(M,p,y),y=e.normalize(y,y),u=e.cross(E,y,u),u=e.normalize(u,u);let N=f[0],A=f[1];t&&(D=v(p,u,S,D,c,N+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let V,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){ue("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),Le);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),qe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){h=e.add(y,b,h),h=e.normalize(h,h),h=e.cross(h,E,h),h=e.cross(E,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,b,I))),K=R.angleIsGreaterThanPi(y,b,p,c);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):(h=e.negate(h,h),g=v(p,h,s,g,c,A+d,k,ae)),T=e.clone(z,T)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):g=v(p,h,s,g,c,A+d,k,ae),T=e.clone(z,T)),b=e.negate(y,b)}else g=v(T,u,s,g,c,N+d,1,1),T=p;N=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let xe=t?i+D.length:i,J=new Float64Array(xe);return J.set(g),t&&J.set(D,i),J};var ct=R;export{G as a,ue as b,ct as c};
26
+ import{a as _}from"./chunk-RQ3X5FSK.js";import{a as te}from"./chunk-BGQDOF2W.js";import{a as ie,b as j,f as Z,g as fe}from"./chunk-DGGIK7AD.js";import{a as e,b as se,c as ee,e as O}from"./chunk-FCVV6A2F.js";import{a as Q}from"./chunk-PO64KPKA.js";import{a as le}from"./chunk-R3KD5ZAI.js";import{e as $}from"./chunk-GBI3IATP.js";var Ee={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Ee);var me={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(me[r])||(me[r]=!0,console.warn(n??r))}P.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.";P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var ue=P;var w=[new e,new e],Se=new e,Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,I=new e,W=new e,R={},re=new se;function De(r,n){let a=new Array(r.length);for(let o=0;o<r.length;o++){let t=r[o];re=n.cartesianToCartographic(t,re),a[o]=re.height,r[o]=n.scaleToGeodeticSurface(t,t)}return a}function ne(r,n,a,o){let t=r[0],c=r[1],f=e.angleBetween(t,c),l=Math.ceil(f/o),m=new Array(l),s;if(n===a){for(s=0;s<l;s++)m[s]=n;return m.push(a),m}let d=(a-n)/l;for(s=1;s<l;s++){let x=n+s*d;m[s]=x}return m[0]=n,m.push(a),m}var X=new e,Y=new e;function je(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y),l=ee.angleBetween(c,f);return f.x*c.y-f.y*c.x>=0?-l:l}var He=new e(-1,0,0),H=new j,Me=new j,oe=new O,Ne=O.IDENTITY.clone(),Ve=new e,Fe=new ie,he=new e;function v(r,n,a,o,t,c,f,l){let m=Ve,s=Fe;H=fe.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,He,m),m=e.normalize(m,m);let S=je(m,n,r,t);oe=O.fromRotationZ(S,oe),he.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,he,Me),H);let d=Ne;d[0]=f;for(let x=0;x<l;x++)for(let i=0;i<a.length;i+=3)s=e.fromArray(a,i,s),s=O.multiplyByVector(d,s,s),s=j.multiplyByPoint(H,s,s),o.push(s.x,s.y,s.z);return o}var Ge=new e;function ce(r,n,a,o,t,c,f){for(let l=0;l<r.length;l+=3){let m=e.fromArray(r,l,Ge);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Ie(r,n){let a=r.length,o=new Array(a*6),t=0,c=n.x+n.width/2,f=n.y+n.height/2,l=r[0];o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f;for(let m=1;m<a;m++){l=r[m];let s=l.x-c,S=l.y-f;o[t++]=s,o[t++]=0,o[t++]=S,o[t++]=s,o[t++]=0,o[t++]=S}return l=r[0],o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f,o}function de(r,n){let a=r.length,o=new Array(a*3),t=0,c=n.x+n.width/2,f=n.y+n.height/2;for(let l=0;l<a;l++)o[t++]=r[l].x-c,o[t++]=0,o[t++]=r[l].y-f;return o}var ge=new Z,ye=new e,we=new O;function pe(r,n,a,o,t,c,f,l,m,s){let S=e.angleBetween(e.subtract(n,r,I),e.subtract(a,r,W)),d=o===G.BEVELED?0:Math.ceil(S/Q.toRadians(5)),x;t?x=O.fromQuaternion(Z.fromAxisAngle(e.negate(r,I),S/(d+1),ge),we):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ge),we);let i,g;if(n=e.clone(n,ye),d>0){let D=s?2:1;for(let y=0;y<d;y++)n=O.multiplyByVector(x,n,n),i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,D)}else i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,1),a=e.clone(a,ye),i=e.subtract(a,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(a,W),f=v(g,i,l,f,c,m,1,1);return f}R.removeDuplicatesFromShape=function(r){let n=r.length,a=[];for(let o=n-1,t=0;t<n;o=t++){let c=r[o],f=r[t];ee.equals(c,f)||a.push(f)}return a};R.angleIsGreaterThanPi=function(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y);return f.x*c.y-f.y*c.x>=0};var Le=new e,qe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=De(r,c),l=o._granularity,m=o._cornerType,s=t?Ie(n,a):de(n,a),S=t?de(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Se,b=Te,h=Be,E=Ce,B=ze,C=Ae,z=be,u=Oe,T=ve,p=r[0],M=r[1];E=c.geodeticSurfaceNormal(p,E),y=e.subtract(M,p,y),y=e.normalize(y,y),u=e.cross(E,y,u),u=e.normalize(u,u);let N=f[0],A=f[1];t&&(D=v(p,u,S,D,c,N+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let V,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){ue("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),Le);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),qe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){h=e.add(y,b,h),h=e.normalize(h,h),h=e.cross(h,E,h),h=e.cross(E,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,b,I))),K=R.angleIsGreaterThanPi(y,b,p,c);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):(h=e.negate(h,h),g=v(p,h,s,g,c,A+d,k,ae)),T=e.clone(z,T)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):g=v(p,h,s,g,c,A+d,k,ae),T=e.clone(z,T)),b=e.negate(y,b)}else g=v(T,u,s,g,c,N+d,1,1),T=p;N=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let xe=t?i+D.length:i,J=new Float64Array(xe);return J.set(g),t&&J.set(D,i),J};var ct=R;export{G as a,ue as b,ct as c};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as u,b as c,d as p}from"./chunk-64RSHJUE.js";import{a as d}from"./chunk-3SSKC3VN.js";import{a as s}from"./chunk-LEYMRMBK.js";import{e as a}from"./chunk-VTAIKJXX.js";function e(t){this._ellipsoid=t??p.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});e.mercatorAngleToGeodeticLatitude=function(t){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-t))};e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return .5*Math.log((1+i)/(1-i))};e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI);e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,n=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,m=t.height;return a(i)?(i.x=r,i.y=n,i.z=m,i):new u(r,n,m)};e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,n=e.mercatorAngleToGeodeticLatitude(t.y*o),m=t.z;return a(i)?(i.longitude=r,i.latitude=n,i.height=m,i):new c(r,n,m)};var A=e;export{A as a};
26
+ import{a as u,b as c,d as p}from"./chunk-FCVV6A2F.js";import{a as d}from"./chunk-PO64KPKA.js";import{a as s}from"./chunk-R3KD5ZAI.js";import{e as a}from"./chunk-GBI3IATP.js";function e(t){this._ellipsoid=t??p.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});e.mercatorAngleToGeodeticLatitude=function(t){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-t))};e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return .5*Math.log((1+i)/(1-i))};e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI);e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,n=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,m=t.height;return a(i)?(i.x=r,i.y=n,i.z=m,i):new u(r,n,m)};e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,n=e.mercatorAngleToGeodeticLatitude(t.y*o),m=t.z;return a(i)?(i.longitude=r,i.latitude=n,i.height=m,i):new c(r,n,m)};var A=e;export{A as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,5 +23,5 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{e as u}from"./chunk-VTAIKJXX.js";function f(t){this.name="DeveloperError",this.message=t;let e;try{throw new Error}catch(o){e=o.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f);f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=`
26
+ import{e as u}from"./chunk-GBI3IATP.js";function f(t){this.name="DeveloperError",this.message=t;let e;try{throw new Error}catch(o){e=o.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f);f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=`
27
27
  ${this.stack.toString()}`),t};f.throwInstantiationError=function(){throw new f("This function defines an interface and should not be called directly.")};var r=f;var n={};n.typeOf={};function c(t){return`${t} is required, actual value was undefined`}function a(t,e,o){return`Expected ${o} to be typeof ${e}, actual typeof was ${t}`}n.defined=function(t,e){if(!u(e))throw new r(c(t))};n.typeOf.func=function(t,e){if(typeof e!="function")throw new r(a(typeof e,"function",t))};n.typeOf.string=function(t,e){if(typeof e!="string")throw new r(a(typeof e,"string",t))};n.typeOf.number=function(t,e){if(typeof e!="number")throw new r(a(typeof e,"number",t))};n.typeOf.number.lessThan=function(t,e,o){if(n.typeOf.number(t,e),e>=o)throw new r(`Expected ${t} to be less than ${o}, actual value was ${e}`)};n.typeOf.number.lessThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e>o)throw new r(`Expected ${t} to be less than or equal to ${o}, actual value was ${e}`)};n.typeOf.number.greaterThan=function(t,e,o){if(n.typeOf.number(t,e),e<=o)throw new r(`Expected ${t} to be greater than ${o}, actual value was ${e}`)};n.typeOf.number.greaterThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e<o)throw new r(`Expected ${t} to be greater than or equal to ${o}, actual value was ${e}`)};n.typeOf.object=function(t,e){if(typeof e!="object")throw new r(a(typeof e,"object",t))};n.typeOf.bool=function(t,e){if(typeof e!="boolean")throw new r(a(typeof e,"boolean",t))};n.typeOf.bigint=function(t,e){if(typeof e!="bigint")throw new r(a(typeof e,"bigint",t))};n.typeOf.number.equals=function(t,e,o,i){if(n.typeOf.number(t,o),n.typeOf.number(e,i),o!==i)throw new r(`${t} must be equal to ${e}, the actual values are ${o} and ${i}`)};var l=n;export{r as a,l as b};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{a as G}from"./chunk-U4IEOH5K.js";import{a as z}from"./chunk-G5AGHVVC.js";import{b as B}from"./chunk-DMEY62ID.js";import{a as C}from"./chunk-HTFSEEMT.js";import{b as L}from"./chunk-PSPPBZWI.js";import{a,b as D,d as I}from"./chunk-64RSHJUE.js";import{a as S}from"./chunk-3SSKC3VN.js";import{a as x}from"./chunk-LEYMRMBK.js";import{e as T}from"./chunk-VTAIKJXX.js";var p={};p.numberOfPoints=function(r,n,o){let e=a.distance(r,n);return Math.ceil(e/o)};p.numberOfPointsRhumbLine=function(r,n,o){let e=Math.pow(r.longitude-n.longitude,2)+Math.pow(r.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(e/(o*o))))};var Z=new D;p.extractHeights=function(r,n){let o=r.length,e=new Array(o);for(let t=0;t<o;t++){let l=r[t];e[t]=n.cartesianToCartographic(l,Z).height}return e};var Y=new L,V=new a,_=new a,F=new C(a.UNIT_X,0),v=new a,j=new C(a.UNIT_X,0),J=new a,K=new a,O=[];function U(r,n,o){let e=O;e.length=r;let t;if(n===o){for(t=0;t<r;t++)e[t]=n;return e}let u=(o-n)/r;for(t=0;t<r;t++){let d=n+t*u;e[t]=d}return e}var N=new D,E=new D,b=new a,k=new a,Q=new a,M=new G,R=new z;function W(r,n,o,e,t,l,u,d){let c=e.scaleToGeodeticSurface(r,k),w=e.scaleToGeodeticSurface(n,Q),h=p.numberOfPoints(r,n,o),f=e.cartesianToCartographic(c,N),y=e.cartesianToCartographic(w,E),g=U(h,t,l);M.setEndPoints(f,y);let P=M.surfaceDistance/h,i=d;f.height=t;let s=e.cartographicToCartesian(f,b);a.pack(s,u,i),i+=3;for(let m=1;m<h;m++){let A=M.interpolateUsingSurfaceDistance(m*P,E);A.height=g[m],s=e.cartographicToCartesian(A,b),a.pack(s,u,i),i+=3}return i}function $(r,n,o,e,t,l,u,d){let c=e.cartesianToCartographic(r,N),w=e.cartesianToCartographic(n,E),h=p.numberOfPointsRhumbLine(c,w,o);c.height=0,w.height=0;let f=U(h,t,l);R.ellipsoid.equals(e)||(R=new z(void 0,void 0,e)),R.setEndPoints(c,w);let y=R.surfaceDistance/h,g=d;c.height=t;let P=e.cartographicToCartesian(c,b);a.pack(P,u,g),g+=3;for(let i=1;i<h;i++){let s=R.interpolateUsingSurfaceDistance(i*y,E);s.height=f[i],P=e.cartographicToCartesian(s,b),a.pack(P,u,g),g+=3}return g}p.wrapLongitude=function(r,n){let o=[],e=[];if(T(r)&&r.length>0){n=n??L.IDENTITY;let t=L.inverseTransformation(n,Y),l=L.multiplyByPoint(t,a.ZERO,V),u=a.normalize(L.multiplyByPointAsVector(t,a.UNIT_Y,_),_),d=C.fromPointNormal(l,u,F),c=a.normalize(L.multiplyByPointAsVector(t,a.UNIT_X,v),v),w=C.fromPointNormal(l,c,j),h=1;o.push(a.clone(r[0]));let f=o[0],y=r.length;for(let g=1;g<y;++g){let P=r[g];if(C.getPointDistance(w,f)<0||C.getPointDistance(w,P)<0){let i=B.lineSegmentPlane(f,P,d,J);if(T(i)){let s=a.multiplyByScalar(u,5e-9,K);C.getPointDistance(d,f)<0&&a.negate(s,s),o.push(a.add(i,s,new a)),e.push(h+1),a.negate(s,s),o.push(a.add(i,s,new a)),h=1}}o.push(a.clone(r[g])),h++,f=P}e.push(h)}return{positions:o,lengths:e}};p.generateArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new x("options.positions is required.");let o=n.length,e=r.ellipsoid??I.default,t=r.height??0,l=Array.isArray(t);if(o<1)return[];if(o===1){let i=e.scaleToGeodeticSurface(n[0],k);if(t=l?t[0]:t,t!==0){let s=e.geodeticSurfaceNormal(i,b);a.multiplyByScalar(s,t,s),a.add(i,s,i)}return[i.x,i.y,i.z]}let u=r.minDistance;if(!T(u)){let i=r.granularity??S.RADIANS_PER_DEGREE;u=S.chordLength(i,e.maximumRadius)}let d=0,c;for(c=0;c<o-1;c++)d+=p.numberOfPoints(n[c],n[c+1],u);let w=(d+1)*3,h=new Array(w),f=0;for(c=0;c<o-1;c++){let i=n[c],s=n[c+1],m=l?t[c]:t,A=l?t[c+1]:t;f=W(i,s,u,e,m,A,h,f)}O.length=0;let y=n[o-1],g=e.cartesianToCartographic(y,N);g.height=l?t[o-1]:t;let P=e.cartographicToCartesian(g,b);return a.pack(P,h,w-3),h};var H=new D,tt=new D;p.generateRhumbArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new x("options.positions is required.");let o=n.length,e=r.ellipsoid??I.default,t=r.height??0,l=Array.isArray(t);if(o<1)return[];if(o===1){let m=e.scaleToGeodeticSurface(n[0],k);if(t=l?t[0]:t,t!==0){let A=e.geodeticSurfaceNormal(m,b);a.multiplyByScalar(A,t,A),a.add(m,A,m)}return[m.x,m.y,m.z]}let u=r.granularity??S.RADIANS_PER_DEGREE,d=0,c,w=e.cartesianToCartographic(n[0],H),h;for(c=0;c<o-1;c++)h=e.cartesianToCartographic(n[c+1],tt),d+=p.numberOfPointsRhumbLine(w,h,u),w=D.clone(h,H);let f=(d+1)*3,y=new Array(f),g=0;for(c=0;c<o-1;c++){let m=n[c],A=n[c+1],q=l?t[c]:t,X=l?t[c+1]:t;g=$(m,A,u,e,q,X,y,g)}O.length=0;let P=n[o-1],i=e.cartesianToCartographic(P,N);i.height=l?t[o-1]:t;let s=e.cartographicToCartesian(i,b);return a.pack(s,y,f-3),y};p.generateCartesianArc=function(r){let n=p.generateArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};p.generateCartesianRhumbArc=function(r){let n=p.generateRhumbArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};var gt=p;export{gt as a};
26
+ import{a as G}from"./chunk-KORWG3CG.js";import{a as z}from"./chunk-N6G72L23.js";import{b as B}from"./chunk-HLFNWOQ4.js";import{a as C}from"./chunk-YDUNCXSU.js";import{b as L}from"./chunk-DGGIK7AD.js";import{a,b as D,d as I}from"./chunk-FCVV6A2F.js";import{a as S}from"./chunk-PO64KPKA.js";import{a as x}from"./chunk-R3KD5ZAI.js";import{e as T}from"./chunk-GBI3IATP.js";var p={};p.numberOfPoints=function(r,n,o){let e=a.distance(r,n);return Math.ceil(e/o)};p.numberOfPointsRhumbLine=function(r,n,o){let e=Math.pow(r.longitude-n.longitude,2)+Math.pow(r.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(e/(o*o))))};var Z=new D;p.extractHeights=function(r,n){let o=r.length,e=new Array(o);for(let t=0;t<o;t++){let l=r[t];e[t]=n.cartesianToCartographic(l,Z).height}return e};var Y=new L,V=new a,_=new a,F=new C(a.UNIT_X,0),v=new a,j=new C(a.UNIT_X,0),J=new a,K=new a,O=[];function U(r,n,o){let e=O;e.length=r;let t;if(n===o){for(t=0;t<r;t++)e[t]=n;return e}let u=(o-n)/r;for(t=0;t<r;t++){let d=n+t*u;e[t]=d}return e}var N=new D,E=new D,b=new a,k=new a,Q=new a,M=new G,R=new z;function W(r,n,o,e,t,l,u,d){let c=e.scaleToGeodeticSurface(r,k),w=e.scaleToGeodeticSurface(n,Q),h=p.numberOfPoints(r,n,o),f=e.cartesianToCartographic(c,N),y=e.cartesianToCartographic(w,E),g=U(h,t,l);M.setEndPoints(f,y);let P=M.surfaceDistance/h,i=d;f.height=t;let s=e.cartographicToCartesian(f,b);a.pack(s,u,i),i+=3;for(let m=1;m<h;m++){let A=M.interpolateUsingSurfaceDistance(m*P,E);A.height=g[m],s=e.cartographicToCartesian(A,b),a.pack(s,u,i),i+=3}return i}function $(r,n,o,e,t,l,u,d){let c=e.cartesianToCartographic(r,N),w=e.cartesianToCartographic(n,E),h=p.numberOfPointsRhumbLine(c,w,o);c.height=0,w.height=0;let f=U(h,t,l);R.ellipsoid.equals(e)||(R=new z(void 0,void 0,e)),R.setEndPoints(c,w);let y=R.surfaceDistance/h,g=d;c.height=t;let P=e.cartographicToCartesian(c,b);a.pack(P,u,g),g+=3;for(let i=1;i<h;i++){let s=R.interpolateUsingSurfaceDistance(i*y,E);s.height=f[i],P=e.cartographicToCartesian(s,b),a.pack(P,u,g),g+=3}return g}p.wrapLongitude=function(r,n){let o=[],e=[];if(T(r)&&r.length>0){n=n??L.IDENTITY;let t=L.inverseTransformation(n,Y),l=L.multiplyByPoint(t,a.ZERO,V),u=a.normalize(L.multiplyByPointAsVector(t,a.UNIT_Y,_),_),d=C.fromPointNormal(l,u,F),c=a.normalize(L.multiplyByPointAsVector(t,a.UNIT_X,v),v),w=C.fromPointNormal(l,c,j),h=1;o.push(a.clone(r[0]));let f=o[0],y=r.length;for(let g=1;g<y;++g){let P=r[g];if(C.getPointDistance(w,f)<0||C.getPointDistance(w,P)<0){let i=B.lineSegmentPlane(f,P,d,J);if(T(i)){let s=a.multiplyByScalar(u,5e-9,K);C.getPointDistance(d,f)<0&&a.negate(s,s),o.push(a.add(i,s,new a)),e.push(h+1),a.negate(s,s),o.push(a.add(i,s,new a)),h=1}}o.push(a.clone(r[g])),h++,f=P}e.push(h)}return{positions:o,lengths:e}};p.generateArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new x("options.positions is required.");let o=n.length,e=r.ellipsoid??I.default,t=r.height??0,l=Array.isArray(t);if(o<1)return[];if(o===1){let i=e.scaleToGeodeticSurface(n[0],k);if(t=l?t[0]:t,t!==0){let s=e.geodeticSurfaceNormal(i,b);a.multiplyByScalar(s,t,s),a.add(i,s,i)}return[i.x,i.y,i.z]}let u=r.minDistance;if(!T(u)){let i=r.granularity??S.RADIANS_PER_DEGREE;u=S.chordLength(i,e.maximumRadius)}let d=0,c;for(c=0;c<o-1;c++)d+=p.numberOfPoints(n[c],n[c+1],u);let w=(d+1)*3,h=new Array(w),f=0;for(c=0;c<o-1;c++){let i=n[c],s=n[c+1],m=l?t[c]:t,A=l?t[c+1]:t;f=W(i,s,u,e,m,A,h,f)}O.length=0;let y=n[o-1],g=e.cartesianToCartographic(y,N);g.height=l?t[o-1]:t;let P=e.cartographicToCartesian(g,b);return a.pack(P,h,w-3),h};var H=new D,tt=new D;p.generateRhumbArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new x("options.positions is required.");let o=n.length,e=r.ellipsoid??I.default,t=r.height??0,l=Array.isArray(t);if(o<1)return[];if(o===1){let m=e.scaleToGeodeticSurface(n[0],k);if(t=l?t[0]:t,t!==0){let A=e.geodeticSurfaceNormal(m,b);a.multiplyByScalar(A,t,A),a.add(m,A,m)}return[m.x,m.y,m.z]}let u=r.granularity??S.RADIANS_PER_DEGREE,d=0,c,w=e.cartesianToCartographic(n[0],H),h;for(c=0;c<o-1;c++)h=e.cartesianToCartographic(n[c+1],tt),d+=p.numberOfPointsRhumbLine(w,h,u),w=D.clone(h,H);let f=(d+1)*3,y=new Array(f),g=0;for(c=0;c<o-1;c++){let m=n[c],A=n[c+1],q=l?t[c]:t,X=l?t[c+1]:t;g=$(m,A,u,e,q,X,y,g)}O.length=0;let P=n[o-1],i=e.cartesianToCartographic(P,N);i.height=l?t[o-1]:t;let s=e.cartographicToCartesian(i,b);return a.pack(s,y,f-3),y};p.generateCartesianArc=function(r){let n=p.generateArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};p.generateCartesianRhumbArc=function(r){let n=p.generateRhumbArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};var gt=p;export{gt as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.132
4
+ * Version 1.131
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,4 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import{f as g,g as j}from"./chunk-64RSHJUE.js";import{a as i}from"./chunk-3SSKC3VN.js";import{b as n}from"./chunk-LEYMRMBK.js";import{e as b}from"./chunk-VTAIKJXX.js";function F(r,o,t){return t<0&&(t+=1),t>1&&(t-=1),t*6<1?r+(o-r)*6*t:t*2<1?o:t*3<2?r+(o-r)*(2/3-t)*6:r}function e(r,o,t,f){this.red=r??1,this.green=o??1,this.blue=t??1,this.alpha=f??1}e.fromCartesian4=function(r,o){return n.typeOf.object("cartesian",r),b(o)?(o.red=r.x,o.green=r.y,o.blue=r.z,o.alpha=r.w,o):new e(r.x,r.y,r.z,r.w)};e.fromBytes=function(r,o,t,f,C){return r=e.byteToFloat(r??255),o=e.byteToFloat(o??255),t=e.byteToFloat(t??255),f=e.byteToFloat(f??255),b(C)?(C.red=r,C.green=o,C.blue=t,C.alpha=f,C):new e(r,o,t,f)};e.fromAlpha=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("alpha",o),b(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=o,t):new e(r.red,r.green,r.blue,o)};var l,A,E;j.supportsTypedArrays()&&(l=new ArrayBuffer(4),A=new Uint32Array(l),E=new Uint8Array(l));e.fromRgba=function(r,o){return A[0]=r,e.fromBytes(E[0],E[1],E[2],E[3],o)};e.fromHsl=function(r,o,t,f,C){r=(r??0)%1,o=o??0,t=t??0,f=f??1;let m=t,s=t,O=t;if(o!==0){let c;t<.5?c=t*(1+o):c=t+o-t*o;let S=2*t-c;m=F(S,c,r+1/3),s=F(S,c,r),O=F(S,c,r-1/3)}return b(C)?(C.red=m,C.green=s,C.blue=O,C.alpha=f,C):new e(m,s,O,f)};e.fromRandom=function(r,o){r=r??g.EMPTY_OBJECT;let t=r.red;if(!b(t)){let s=r.minimumRed??0,O=r.maximumRed??1;n.typeOf.number.lessThanOrEquals("minimumRed",s,O),t=s+i.nextRandomNumber()*(O-s)}let f=r.green;if(!b(f)){let s=r.minimumGreen??0,O=r.maximumGreen??1;n.typeOf.number.lessThanOrEquals("minimumGreen",s,O),f=s+i.nextRandomNumber()*(O-s)}let C=r.blue;if(!b(C)){let s=r.minimumBlue??0,O=r.maximumBlue??1;n.typeOf.number.lessThanOrEquals("minimumBlue",s,O),C=s+i.nextRandomNumber()*(O-s)}let m=r.alpha;if(!b(m)){let s=r.minimumAlpha??0,O=r.maximumAlpha??1;n.typeOf.number.lessThanOrEquals("minimumAlpha",s,O),m=s+i.nextRandomNumber()*(O-s)}return b(o)?(o.red=t,o.green=f,o.blue=C,o.alpha=m,o):new e(t,f,C,m)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,o){n.typeOf.string("color",r),b(o)||(o=new e),r=r.trim();let t=e[r.toUpperCase()];if(b(t))return e.clone(t,o),o;let f=a.exec(r);return f!==null?(o.red=parseInt(f[1],16)/15,o.green=parseInt(f[2],16)/15,o.blue=parseInt(f[3],16)/15,o.alpha=parseInt(f[4]??"f",16)/15,o):(f=z.exec(r),f!==null?(o.red=parseInt(f[1],16)/255,o.green=parseInt(f[2],16)/255,o.blue=parseInt(f[3],16)/255,o.alpha=parseInt(f[4]??"ff",16)/255,o):(f=p.exec(r),f!==null?(o.red=parseFloat(f[1])/(f[1].substr(-1)==="%"?100:255),o.green=parseFloat(f[2])/(f[2].substr(-1)==="%"?100:255),o.blue=parseFloat(f[3])/(f[3].substr(-1)==="%"?100:255),o.alpha=parseFloat(f[4]??"1.0"),o):(f=R.exec(r),f!==null?e.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(f[4]??"1.0"),o):(o=void 0,o))))};e.packedLength=4;e.pack=function(r,o,t){return n.typeOf.object("value",r),n.defined("array",o),t=t??0,o[t++]=r.red,o[t++]=r.green,o[t++]=r.blue,o[t]=r.alpha,o};e.unpack=function(r,o,t){return n.defined("array",r),o=o??0,b(t)||(t=new e),t.red=r[o++],t.green=r[o++],t.blue=r[o++],t.alpha=r[o],t};e.byteToFloat=function(r){return r/255};e.floatToByte=function(r){return r===1?255:r*256|0};e.clone=function(r,o){if(b(r))return b(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=r.alpha,o):new e(r.red,r.green,r.blue,r.alpha)};e.equals=function(r,o){return r===o||b(r)&&b(o)&&r.red===o.red&&r.green===o.green&&r.blue===o.blue&&r.alpha===o.alpha};e.equalsArray=function(r,o,t){return r.red===o[t]&&r.green===o[t+1]&&r.blue===o[t+2]&&r.alpha===o[t+3]};e.prototype.clone=function(r){return e.clone(this,r)};e.prototype.equals=function(r){return e.equals(this,r)};e.prototype.equalsEpsilon=function(r,o){return this===r||b(r)&&Math.abs(this.red-r.red)<=o&&Math.abs(this.green-r.green)<=o&&Math.abs(this.blue-r.blue)<=o&&Math.abs(this.alpha-r.alpha)<=o};e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),o=e.floatToByte(this.green),t=e.floatToByte(this.blue);return this.alpha===1?`rgb(${r},${o},${t})`:`rgba(${r},${o},${t},${this.alpha})`};e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let o=e.floatToByte(this.green).toString(16);o.length<2&&(o=`0${o}`);let t=e.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let f=e.floatToByte(this.alpha).toString(16);return f.length<2&&(f=`0${f}`),`#${r}${o}${t}${f}`}return`#${r}${o}${t}`};e.prototype.toBytes=function(r){let o=e.floatToByte(this.red),t=e.floatToByte(this.green),f=e.floatToByte(this.blue),C=e.floatToByte(this.alpha);return b(r)?(r[0]=o,r[1]=t,r[2]=f,r[3]=C,r):[o,t,f,C]};e.prototype.toRgba=function(){return E[0]=e.floatToByte(this.red),E[1]=e.floatToByte(this.green),E[2]=e.floatToByte(this.blue),E[3]=e.floatToByte(this.alpha),A[0]};e.prototype.brighten=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=1-(1-this.red)*r,o.green=1-(1-this.green)*r,o.blue=1-(1-this.blue)*r,o.alpha=this.alpha,o};e.prototype.darken=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=this.red*r,o.green=this.green*r,o.blue=this.blue*r,o.alpha=this.alpha,o};e.prototype.withAlpha=function(r,o){return e.fromAlpha(this,r,o)};e.add=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red+o.red,t.green=r.green+o.green,t.blue=r.blue+o.blue,t.alpha=r.alpha+o.alpha,t};e.subtract=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red-o.red,t.green=r.green-o.green,t.blue=r.blue-o.blue,t.alpha=r.alpha-o.alpha,t};e.multiply=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red*o.red,t.green=r.green*o.green,t.blue=r.blue*o.blue,t.alpha=r.alpha*o.alpha,t};e.divide=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red/o.red,t.green=r.green/o.green,t.blue=r.blue/o.blue,t.alpha=r.alpha/o.alpha,t};e.mod=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red%o.red,t.green=r.green%o.green,t.blue=r.blue%o.blue,t.alpha=r.alpha%o.alpha,t};e.lerp=function(r,o,t,f){return n.typeOf.object("start",r),n.typeOf.object("end",o),n.typeOf.number("t",t),n.typeOf.object("result",f),f.red=i.lerp(r.red,o.red,t),f.green=i.lerp(r.green,o.green,t),f.blue=i.lerp(r.blue,o.blue,t),f.alpha=i.lerp(r.alpha,o.alpha,t),f};e.multiplyByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red*o,t.green=r.green*o,t.blue=r.blue*o,t.alpha=r.alpha*o,t};e.divideByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red/o,t.green=r.green/o,t.blue=r.blue/o,t.alpha=r.alpha/o,t};e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF"));e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7"));e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF"));e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4"));e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF"));e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC"));e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4"));e.BLACK=Object.freeze(e.fromCssColorString("#000000"));e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD"));e.BLUE=Object.freeze(e.fromCssColorString("#0000FF"));e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2"));e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A"));e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887"));e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0"));e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00"));e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E"));e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50"));e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED"));e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC"));e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C"));e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF"));e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B"));e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B"));e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B"));e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9"));e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400"));e.DARKGREY=e.DARKGRAY;e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B"));e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B"));e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F"));e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00"));e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC"));e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000"));e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A"));e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F"));e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B"));e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F"));e.DARKSLATEGREY=e.DARKSLATEGRAY;e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1"));e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3"));e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493"));e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF"));e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969"));e.DIMGREY=e.DIMGRAY;e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF"));e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222"));e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0"));e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22"));e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF"));e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC"));e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF"));e.GOLD=Object.freeze(e.fromCssColorString("#FFD700"));e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520"));e.GRAY=Object.freeze(e.fromCssColorString("#808080"));e.GREEN=Object.freeze(e.fromCssColorString("#008000"));e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F"));e.GREY=e.GRAY;e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0"));e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4"));e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C"));e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082"));e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0"));e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C"));e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA"));e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5"));e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00"));e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD"));e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6"));e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080"));e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF"));e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2"));e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3"));e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90"));e.LIGHTGREY=e.LIGHTGRAY;e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1"));e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA"));e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA"));e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899"));e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY;e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE"));e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0"));e.LIME=Object.freeze(e.fromCssColorString("#00FF00"));e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32"));e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6"));e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF"));e.MAROON=Object.freeze(e.fromCssColorString("#800000"));e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA"));e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD"));e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3"));e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB"));e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371"));e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE"));e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A"));e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC"));e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585"));e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970"));e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA"));e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1"));e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5"));e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD"));e.NAVY=Object.freeze(e.fromCssColorString("#000080"));e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6"));e.OLIVE=Object.freeze(e.fromCssColorString("#808000"));e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23"));e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500"));e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500"));e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6"));e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA"));e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98"));e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE"));e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093"));e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5"));e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9"));e.PERU=Object.freeze(e.fromCssColorString("#CD853F"));e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB"));e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD"));e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6"));e.PURPLE=Object.freeze(e.fromCssColorString("#800080"));e.RED=Object.freeze(e.fromCssColorString("#FF0000"));e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F"));e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1"));e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513"));e.SALMON=Object.freeze(e.fromCssColorString("#FA8072"));e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460"));e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57"));e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE"));e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D"));e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0"));e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB"));e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD"));e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090"));e.SLATEGREY=e.SLATEGRAY;e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA"));e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F"));e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4"));e.TAN=Object.freeze(e.fromCssColorString("#D2B48C"));e.TEAL=Object.freeze(e.fromCssColorString("#008080"));e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8"));e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347"));e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0"));e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE"));e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3"));e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF"));e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5"));e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00"));e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32"));e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a};
26
+ import{f as g,g as j}from"./chunk-FCVV6A2F.js";import{a as i}from"./chunk-PO64KPKA.js";import{b as n}from"./chunk-R3KD5ZAI.js";import{e as b}from"./chunk-GBI3IATP.js";function F(r,o,t){return t<0&&(t+=1),t>1&&(t-=1),t*6<1?r+(o-r)*6*t:t*2<1?o:t*3<2?r+(o-r)*(2/3-t)*6:r}function e(r,o,t,f){this.red=r??1,this.green=o??1,this.blue=t??1,this.alpha=f??1}e.fromCartesian4=function(r,o){return n.typeOf.object("cartesian",r),b(o)?(o.red=r.x,o.green=r.y,o.blue=r.z,o.alpha=r.w,o):new e(r.x,r.y,r.z,r.w)};e.fromBytes=function(r,o,t,f,C){return r=e.byteToFloat(r??255),o=e.byteToFloat(o??255),t=e.byteToFloat(t??255),f=e.byteToFloat(f??255),b(C)?(C.red=r,C.green=o,C.blue=t,C.alpha=f,C):new e(r,o,t,f)};e.fromAlpha=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("alpha",o),b(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=o,t):new e(r.red,r.green,r.blue,o)};var l,A,E;j.supportsTypedArrays()&&(l=new ArrayBuffer(4),A=new Uint32Array(l),E=new Uint8Array(l));e.fromRgba=function(r,o){return A[0]=r,e.fromBytes(E[0],E[1],E[2],E[3],o)};e.fromHsl=function(r,o,t,f,C){r=(r??0)%1,o=o??0,t=t??0,f=f??1;let m=t,s=t,O=t;if(o!==0){let c;t<.5?c=t*(1+o):c=t+o-t*o;let S=2*t-c;m=F(S,c,r+1/3),s=F(S,c,r),O=F(S,c,r-1/3)}return b(C)?(C.red=m,C.green=s,C.blue=O,C.alpha=f,C):new e(m,s,O,f)};e.fromRandom=function(r,o){r=r??g.EMPTY_OBJECT;let t=r.red;if(!b(t)){let s=r.minimumRed??0,O=r.maximumRed??1;n.typeOf.number.lessThanOrEquals("minimumRed",s,O),t=s+i.nextRandomNumber()*(O-s)}let f=r.green;if(!b(f)){let s=r.minimumGreen??0,O=r.maximumGreen??1;n.typeOf.number.lessThanOrEquals("minimumGreen",s,O),f=s+i.nextRandomNumber()*(O-s)}let C=r.blue;if(!b(C)){let s=r.minimumBlue??0,O=r.maximumBlue??1;n.typeOf.number.lessThanOrEquals("minimumBlue",s,O),C=s+i.nextRandomNumber()*(O-s)}let m=r.alpha;if(!b(m)){let s=r.minimumAlpha??0,O=r.maximumAlpha??1;n.typeOf.number.lessThanOrEquals("minimumAlpha",s,O),m=s+i.nextRandomNumber()*(O-s)}return b(o)?(o.red=t,o.green=f,o.blue=C,o.alpha=m,o):new e(t,f,C,m)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,o){n.typeOf.string("color",r),b(o)||(o=new e),r=r.trim();let t=e[r.toUpperCase()];if(b(t))return e.clone(t,o),o;let f=a.exec(r);return f!==null?(o.red=parseInt(f[1],16)/15,o.green=parseInt(f[2],16)/15,o.blue=parseInt(f[3],16)/15,o.alpha=parseInt(f[4]??"f",16)/15,o):(f=z.exec(r),f!==null?(o.red=parseInt(f[1],16)/255,o.green=parseInt(f[2],16)/255,o.blue=parseInt(f[3],16)/255,o.alpha=parseInt(f[4]??"ff",16)/255,o):(f=p.exec(r),f!==null?(o.red=parseFloat(f[1])/(f[1].substr(-1)==="%"?100:255),o.green=parseFloat(f[2])/(f[2].substr(-1)==="%"?100:255),o.blue=parseFloat(f[3])/(f[3].substr(-1)==="%"?100:255),o.alpha=parseFloat(f[4]??"1.0"),o):(f=R.exec(r),f!==null?e.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(f[4]??"1.0"),o):(o=void 0,o))))};e.packedLength=4;e.pack=function(r,o,t){return n.typeOf.object("value",r),n.defined("array",o),t=t??0,o[t++]=r.red,o[t++]=r.green,o[t++]=r.blue,o[t]=r.alpha,o};e.unpack=function(r,o,t){return n.defined("array",r),o=o??0,b(t)||(t=new e),t.red=r[o++],t.green=r[o++],t.blue=r[o++],t.alpha=r[o],t};e.byteToFloat=function(r){return r/255};e.floatToByte=function(r){return r===1?255:r*256|0};e.clone=function(r,o){if(b(r))return b(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=r.alpha,o):new e(r.red,r.green,r.blue,r.alpha)};e.equals=function(r,o){return r===o||b(r)&&b(o)&&r.red===o.red&&r.green===o.green&&r.blue===o.blue&&r.alpha===o.alpha};e.equalsArray=function(r,o,t){return r.red===o[t]&&r.green===o[t+1]&&r.blue===o[t+2]&&r.alpha===o[t+3]};e.prototype.clone=function(r){return e.clone(this,r)};e.prototype.equals=function(r){return e.equals(this,r)};e.prototype.equalsEpsilon=function(r,o){return this===r||b(r)&&Math.abs(this.red-r.red)<=o&&Math.abs(this.green-r.green)<=o&&Math.abs(this.blue-r.blue)<=o&&Math.abs(this.alpha-r.alpha)<=o};e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),o=e.floatToByte(this.green),t=e.floatToByte(this.blue);return this.alpha===1?`rgb(${r},${o},${t})`:`rgba(${r},${o},${t},${this.alpha})`};e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let o=e.floatToByte(this.green).toString(16);o.length<2&&(o=`0${o}`);let t=e.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let f=e.floatToByte(this.alpha).toString(16);return f.length<2&&(f=`0${f}`),`#${r}${o}${t}${f}`}return`#${r}${o}${t}`};e.prototype.toBytes=function(r){let o=e.floatToByte(this.red),t=e.floatToByte(this.green),f=e.floatToByte(this.blue),C=e.floatToByte(this.alpha);return b(r)?(r[0]=o,r[1]=t,r[2]=f,r[3]=C,r):[o,t,f,C]};e.prototype.toRgba=function(){return E[0]=e.floatToByte(this.red),E[1]=e.floatToByte(this.green),E[2]=e.floatToByte(this.blue),E[3]=e.floatToByte(this.alpha),A[0]};e.prototype.brighten=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=1-(1-this.red)*r,o.green=1-(1-this.green)*r,o.blue=1-(1-this.blue)*r,o.alpha=this.alpha,o};e.prototype.darken=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=this.red*r,o.green=this.green*r,o.blue=this.blue*r,o.alpha=this.alpha,o};e.prototype.withAlpha=function(r,o){return e.fromAlpha(this,r,o)};e.add=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red+o.red,t.green=r.green+o.green,t.blue=r.blue+o.blue,t.alpha=r.alpha+o.alpha,t};e.subtract=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red-o.red,t.green=r.green-o.green,t.blue=r.blue-o.blue,t.alpha=r.alpha-o.alpha,t};e.multiply=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red*o.red,t.green=r.green*o.green,t.blue=r.blue*o.blue,t.alpha=r.alpha*o.alpha,t};e.divide=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red/o.red,t.green=r.green/o.green,t.blue=r.blue/o.blue,t.alpha=r.alpha/o.alpha,t};e.mod=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red%o.red,t.green=r.green%o.green,t.blue=r.blue%o.blue,t.alpha=r.alpha%o.alpha,t};e.lerp=function(r,o,t,f){return n.typeOf.object("start",r),n.typeOf.object("end",o),n.typeOf.number("t",t),n.typeOf.object("result",f),f.red=i.lerp(r.red,o.red,t),f.green=i.lerp(r.green,o.green,t),f.blue=i.lerp(r.blue,o.blue,t),f.alpha=i.lerp(r.alpha,o.alpha,t),f};e.multiplyByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red*o,t.green=r.green*o,t.blue=r.blue*o,t.alpha=r.alpha*o,t};e.divideByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red/o,t.green=r.green/o,t.blue=r.blue/o,t.alpha=r.alpha/o,t};e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF"));e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7"));e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF"));e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4"));e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF"));e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC"));e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4"));e.BLACK=Object.freeze(e.fromCssColorString("#000000"));e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD"));e.BLUE=Object.freeze(e.fromCssColorString("#0000FF"));e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2"));e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A"));e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887"));e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0"));e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00"));e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E"));e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50"));e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED"));e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC"));e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C"));e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF"));e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B"));e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B"));e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B"));e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9"));e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400"));e.DARKGREY=e.DARKGRAY;e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B"));e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B"));e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F"));e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00"));e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC"));e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000"));e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A"));e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F"));e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B"));e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F"));e.DARKSLATEGREY=e.DARKSLATEGRAY;e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1"));e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3"));e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493"));e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF"));e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969"));e.DIMGREY=e.DIMGRAY;e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF"));e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222"));e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0"));e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22"));e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF"));e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC"));e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF"));e.GOLD=Object.freeze(e.fromCssColorString("#FFD700"));e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520"));e.GRAY=Object.freeze(e.fromCssColorString("#808080"));e.GREEN=Object.freeze(e.fromCssColorString("#008000"));e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F"));e.GREY=e.GRAY;e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0"));e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4"));e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C"));e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082"));e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0"));e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C"));e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA"));e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5"));e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00"));e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD"));e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6"));e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080"));e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF"));e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2"));e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3"));e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90"));e.LIGHTGREY=e.LIGHTGRAY;e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1"));e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA"));e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA"));e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899"));e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY;e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE"));e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0"));e.LIME=Object.freeze(e.fromCssColorString("#00FF00"));e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32"));e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6"));e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF"));e.MAROON=Object.freeze(e.fromCssColorString("#800000"));e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA"));e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD"));e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3"));e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB"));e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371"));e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE"));e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A"));e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC"));e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585"));e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970"));e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA"));e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1"));e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5"));e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD"));e.NAVY=Object.freeze(e.fromCssColorString("#000080"));e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6"));e.OLIVE=Object.freeze(e.fromCssColorString("#808000"));e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23"));e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500"));e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500"));e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6"));e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA"));e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98"));e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE"));e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093"));e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5"));e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9"));e.PERU=Object.freeze(e.fromCssColorString("#CD853F"));e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB"));e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD"));e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6"));e.PURPLE=Object.freeze(e.fromCssColorString("#800080"));e.RED=Object.freeze(e.fromCssColorString("#FF0000"));e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F"));e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1"));e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513"));e.SALMON=Object.freeze(e.fromCssColorString("#FA8072"));e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460"));e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57"));e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE"));e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D"));e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0"));e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB"));e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD"));e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090"));e.SLATEGREY=e.SLATEGRAY;e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA"));e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F"));e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4"));e.TAN=Object.freeze(e.fromCssColorString("#D2B48C"));e.TEAL=Object.freeze(e.fromCssColorString("#008080"));e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8"));e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347"));e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0"));e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE"));e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3"));e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF"));e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5"));e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00"));e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32"));e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a};