@kenlify/cesium 1.128.24 → 1.128.26

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 (208) hide show
  1. package/Build/Cesium/Cesium.js +12 -12
  2. package/Build/Cesium/Workers/{chunk-AGGWOPOE.js → chunk-2J5ERDHI.js} +2 -2
  3. package/Build/Cesium/Workers/{chunk-Y7CU744N.js → chunk-2LYQJKQP.js} +2 -2
  4. package/Build/Cesium/Workers/{chunk-LL3ISGOT.js → chunk-52QGWEEE.js} +1 -1
  5. package/Build/Cesium/Workers/{chunk-5VGLE4GN.js → chunk-5L74NDQU.js} +2 -2
  6. package/Build/Cesium/Workers/{chunk-AM5XL6WI.js → chunk-6BPXJY4T.js} +2 -2
  7. package/Build/Cesium/Workers/{chunk-5OB72XXB.js → chunk-6CX3HDWX.js} +2 -2
  8. package/Build/Cesium/Workers/{chunk-MDJWVZDL.js → chunk-6D7EATWI.js} +2 -2
  9. package/Build/Cesium/Workers/{chunk-KMWS7NMX.js → chunk-6ET3JK7U.js} +2 -2
  10. package/Build/Cesium/Workers/{chunk-WHZC25DU.js → chunk-6JFWIA2S.js} +2 -2
  11. package/Build/Cesium/Workers/{chunk-I47DPGZ5.js → chunk-7ZFFNR7K.js} +2 -2
  12. package/Build/Cesium/Workers/{chunk-6RPF3BFL.js → chunk-BVPVUPIJ.js} +2 -2
  13. package/Build/Cesium/Workers/{chunk-M3CTXLRO.js → chunk-DXUKDEDM.js} +2 -2
  14. package/Build/Cesium/Workers/{chunk-3G3X7JDX.js → chunk-EUILNBOS.js} +2 -2
  15. package/Build/Cesium/Workers/{chunk-XUJ2ELVF.js → chunk-FTC76BZY.js} +2 -2
  16. package/Build/Cesium/Workers/{chunk-K6GXNVYQ.js → chunk-GHSKJVLY.js} +2 -2
  17. package/Build/Cesium/Workers/{chunk-FZ7B4QHP.js → chunk-GPCMPV44.js} +1 -1
  18. package/Build/Cesium/Workers/{chunk-UBHS5Z2W.js → chunk-GRIPLZIM.js} +2 -2
  19. package/Build/Cesium/Workers/{chunk-YKVE6KMA.js → chunk-GTUSMBQH.js} +2 -2
  20. package/Build/Cesium/Workers/{chunk-GLSEYMYO.js → chunk-IUB4KRZG.js} +2 -2
  21. package/Build/Cesium/Workers/{chunk-7D4TZURK.js → chunk-IUQ7DUW2.js} +2 -2
  22. package/Build/Cesium/Workers/{chunk-KJZ5WB3D.js → chunk-IYXY44PZ.js} +2 -2
  23. package/Build/Cesium/Workers/{chunk-LGD7Y624.js → chunk-J72L6YLA.js} +2 -2
  24. package/Build/Cesium/Workers/{chunk-ZA3ZZVAJ.js → chunk-JBW2PYJZ.js} +2 -2
  25. package/Build/Cesium/Workers/{chunk-IX7QS73W.js → chunk-JJ6HKYJM.js} +2 -2
  26. package/Build/Cesium/Workers/{chunk-GEBZRAQ6.js → chunk-JMOZLJZI.js} +2 -2
  27. package/Build/Cesium/Workers/{chunk-IQL776LN.js → chunk-K2KPI7PB.js} +1 -1
  28. package/Build/Cesium/Workers/{chunk-ON76GPB5.js → chunk-KFTBSPQT.js} +2 -2
  29. package/Build/Cesium/Workers/{chunk-QKFIGZYW.js → chunk-KTCUOVE3.js} +2 -2
  30. package/Build/Cesium/Workers/{chunk-UCO5QBZB.js → chunk-KZZQ5SQ4.js} +2 -2
  31. package/Build/Cesium/Workers/{chunk-AAH3FUIP.js → chunk-L5A4YJO2.js} +2 -2
  32. package/Build/Cesium/Workers/{chunk-N2TIFVHB.js → chunk-L5H6CDWA.js} +2 -2
  33. package/Build/Cesium/Workers/{chunk-ZXPMOMHE.js → chunk-LYFUDHA4.js} +2 -2
  34. package/Build/Cesium/Workers/{chunk-REITUZEF.js → chunk-MFKTFEOS.js} +2 -2
  35. package/Build/Cesium/Workers/{chunk-LUKDNNLL.js → chunk-NU7ORKBX.js} +1 -1
  36. package/Build/Cesium/Workers/{chunk-OFTVJOZT.js → chunk-NYR3E6PP.js} +2 -2
  37. package/Build/Cesium/Workers/{chunk-KWNMBZGF.js → chunk-OP3I3XZO.js} +2 -2
  38. package/Build/Cesium/Workers/{chunk-ICYFP4HV.js → chunk-P5VSNGMV.js} +2 -2
  39. package/Build/Cesium/Workers/{chunk-UGIH5SQD.js → chunk-PMWORKYX.js} +2 -2
  40. package/Build/Cesium/Workers/{chunk-NBQ64UY7.js → chunk-QLPF7IZC.js} +2 -2
  41. package/Build/Cesium/Workers/{chunk-GO5CEPGN.js → chunk-QQU7HJFC.js} +2 -2
  42. package/Build/Cesium/Workers/{chunk-D2IU7A6B.js → chunk-QR2NFVAC.js} +2 -2
  43. package/Build/Cesium/Workers/{chunk-AXFOG5GS.js → chunk-R5FNRB6C.js} +2 -2
  44. package/Build/Cesium/Workers/{chunk-GOHMOQMK.js → chunk-RDFFKYPD.js} +2 -2
  45. package/Build/Cesium/Workers/{chunk-YN7B7PBC.js → chunk-S37HRAKR.js} +2 -2
  46. package/Build/Cesium/Workers/{chunk-Q7B26RKQ.js → chunk-TQNQ2LKP.js} +2 -2
  47. package/Build/Cesium/Workers/{chunk-2H64EMZE.js → chunk-V22B75EA.js} +2 -2
  48. package/Build/Cesium/Workers/{chunk-BLAHTZ6R.js → chunk-VORK4UPT.js} +2 -2
  49. package/Build/Cesium/Workers/{chunk-N2EMCBQ4.js → chunk-XTNTW34V.js} +2 -2
  50. package/Build/Cesium/Workers/{chunk-BNEAME56.js → chunk-Y4BJC2IM.js} +2 -2
  51. package/Build/Cesium/Workers/{chunk-356VDAUY.js → chunk-YACQZSMI.js} +2 -2
  52. package/Build/Cesium/Workers/{chunk-X4SLY5JK.js → chunk-ZAYM6TQA.js} +2 -2
  53. package/Build/Cesium/Workers/combineGeometry.js +2 -2
  54. package/Build/Cesium/Workers/createBoxGeometry.js +2 -2
  55. package/Build/Cesium/Workers/createBoxOutlineGeometry.js +2 -2
  56. package/Build/Cesium/Workers/createCircleGeometry.js +2 -2
  57. package/Build/Cesium/Workers/createCircleOutlineGeometry.js +2 -2
  58. package/Build/Cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
  59. package/Build/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
  60. package/Build/Cesium/Workers/createCorridorGeometry.js +2 -2
  61. package/Build/Cesium/Workers/createCorridorOutlineGeometry.js +2 -2
  62. package/Build/Cesium/Workers/createCylinderGeometry.js +2 -2
  63. package/Build/Cesium/Workers/createCylinderOutlineGeometry.js +2 -2
  64. package/Build/Cesium/Workers/createEllipseGeometry.js +2 -2
  65. package/Build/Cesium/Workers/createEllipseOutlineGeometry.js +2 -2
  66. package/Build/Cesium/Workers/createEllipsoidGeometry.js +2 -2
  67. package/Build/Cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
  68. package/Build/Cesium/Workers/createFrustumGeometry.js +2 -2
  69. package/Build/Cesium/Workers/createFrustumOutlineGeometry.js +2 -2
  70. package/Build/Cesium/Workers/createGeometry.js +2 -2
  71. package/Build/Cesium/Workers/createGroundPolylineGeometry.js +2 -2
  72. package/Build/Cesium/Workers/createPlaneGeometry.js +2 -2
  73. package/Build/Cesium/Workers/createPlaneOutlineGeometry.js +2 -2
  74. package/Build/Cesium/Workers/createPolygonGeometry.js +2 -2
  75. package/Build/Cesium/Workers/createPolygonOutlineGeometry.js +2 -2
  76. package/Build/Cesium/Workers/createPolylineGeometry.js +2 -2
  77. package/Build/Cesium/Workers/createPolylineVolumeGeometry.js +2 -2
  78. package/Build/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
  79. package/Build/Cesium/Workers/createRectangleGeometry.js +2 -2
  80. package/Build/Cesium/Workers/createRectangleOutlineGeometry.js +2 -2
  81. package/Build/Cesium/Workers/createSimplePolylineGeometry.js +2 -2
  82. package/Build/Cesium/Workers/createSphereGeometry.js +2 -2
  83. package/Build/Cesium/Workers/createSphereOutlineGeometry.js +2 -2
  84. package/Build/Cesium/Workers/createTaskProcessorWorker.js +2 -2
  85. package/Build/Cesium/Workers/createVectorTileClampedPolylines.js +2 -2
  86. package/Build/Cesium/Workers/createVectorTileGeometries.js +2 -2
  87. package/Build/Cesium/Workers/createVectorTilePoints.js +2 -2
  88. package/Build/Cesium/Workers/createVectorTilePolygons.js +2 -2
  89. package/Build/Cesium/Workers/createVectorTilePolylines.js +2 -2
  90. package/Build/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
  91. package/Build/Cesium/Workers/createVerticesFromHeightmap.js +2 -2
  92. package/Build/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
  93. package/Build/Cesium/Workers/createWallGeometry.js +2 -2
  94. package/Build/Cesium/Workers/createWallOutlineGeometry.js +2 -2
  95. package/Build/Cesium/Workers/decodeDraco.js +2 -2
  96. package/Build/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  97. package/Build/Cesium/Workers/decodeI3S.js +2 -2
  98. package/Build/Cesium/Workers/transcodeKTX2.js +2 -2
  99. package/Build/Cesium/Workers/transferTypedArrayTest.js +1 -1
  100. package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
  101. package/Build/Cesium/index.cjs +12 -12
  102. package/Build/Cesium/index.js +11 -11
  103. package/Build/CesiumUnminified/Cesium.js +2241 -2241
  104. package/Build/CesiumUnminified/Workers/{chunk-OXDQFUTW.js → chunk-2ODKGIOB.js} +13 -13
  105. package/Build/CesiumUnminified/Workers/{chunk-GI7P7RAI.js → chunk-35T3NFI6.js} +5 -5
  106. package/Build/CesiumUnminified/Workers/{chunk-RDE3MCQR.js → chunk-372AR3OW.js} +6 -6
  107. package/Build/CesiumUnminified/Workers/{chunk-IZXMMMLE.js → chunk-4ESFX7SB.js} +1 -1
  108. package/Build/CesiumUnminified/Workers/{chunk-MLHBYWLB.js → chunk-5G6TCZLM.js} +12 -12
  109. package/Build/CesiumUnminified/Workers/{chunk-KZN5W2VR.js → chunk-6KKB5BY3.js} +5 -5
  110. package/Build/CesiumUnminified/Workers/{chunk-L6I5T3EH.js → chunk-7BITXBIH.js} +6 -6
  111. package/Build/CesiumUnminified/Workers/{chunk-3PDUNW55.js → chunk-A7ZYVNOK.js} +5 -5
  112. package/Build/CesiumUnminified/Workers/{chunk-ZLFYMFZU.js → chunk-ANGA44LS.js} +4 -4
  113. package/Build/CesiumUnminified/Workers/{chunk-XV37232G.js → chunk-AYUAVWXO.js} +10 -10
  114. package/Build/CesiumUnminified/Workers/{chunk-LP2IV6SE.js → chunk-BI3PCCII.js} +6 -6
  115. package/Build/CesiumUnminified/Workers/{chunk-HMQE5N5A.js → chunk-CUKCSD5O.js} +1 -1
  116. package/Build/CesiumUnminified/Workers/{chunk-RJYMFWQU.js → chunk-D2SH42HF.js} +8 -8
  117. package/Build/CesiumUnminified/Workers/{chunk-2LMZYTHF.js → chunk-D5YM2IMF.js} +1 -1
  118. package/Build/CesiumUnminified/Workers/{chunk-FFR2H54E.js → chunk-D7KV2W7K.js} +4 -4
  119. package/Build/CesiumUnminified/Workers/{chunk-BE2HBCV4.js → chunk-DWISTTNK.js} +5 -5
  120. package/Build/CesiumUnminified/Workers/{chunk-ZVMXUUAN.js → chunk-DYCGH2YL.js} +9 -9
  121. package/Build/CesiumUnminified/Workers/{chunk-YQHTDFTW.js → chunk-E57B2YC2.js} +5 -5
  122. package/Build/CesiumUnminified/Workers/{chunk-LNPEMF6I.js → chunk-EYR5QNZZ.js} +4 -4
  123. package/Build/CesiumUnminified/Workers/{chunk-22CWSVHC.js → chunk-F67VLFHB.js} +12 -12
  124. package/Build/CesiumUnminified/Workers/{chunk-AYI4FBEF.js → chunk-FK562WO2.js} +6 -6
  125. package/Build/CesiumUnminified/Workers/{chunk-TCQHQYA2.js → chunk-GTXR74RZ.js} +7 -7
  126. package/Build/CesiumUnminified/Workers/{chunk-5SQAOMDL.js → chunk-GV5REGDI.js} +7 -7
  127. package/Build/CesiumUnminified/Workers/{chunk-ZADYPEP2.js → chunk-HCS6AB2A.js} +5 -5
  128. package/Build/CesiumUnminified/Workers/{chunk-6G7I6SMP.js → chunk-HJL6QUXO.js} +2 -2
  129. package/Build/CesiumUnminified/Workers/{chunk-QBSZA5E6.js → chunk-HYCGN743.js} +4 -4
  130. package/Build/CesiumUnminified/Workers/{chunk-YNRR2YC6.js → chunk-I6JHIK6C.js} +14 -14
  131. package/Build/CesiumUnminified/Workers/{chunk-VQSMIBYZ.js → chunk-JVBLPHHU.js} +9 -9
  132. package/Build/CesiumUnminified/Workers/{chunk-L52UQFUN.js → chunk-JVWR26GG.js} +1 -1
  133. package/Build/CesiumUnminified/Workers/{chunk-B6D4UUM2.js → chunk-LPJVZZTL.js} +6 -6
  134. package/Build/CesiumUnminified/Workers/{chunk-2NSH3CSO.js → chunk-LWDPWMUE.js} +5 -5
  135. package/Build/CesiumUnminified/Workers/{chunk-RV3VM6TU.js → chunk-NIYT5GD2.js} +10 -10
  136. package/Build/CesiumUnminified/Workers/{chunk-AECLDB5Y.js → chunk-OLRU5MMP.js} +6 -6
  137. package/Build/CesiumUnminified/Workers/{chunk-ZZ572JJ5.js → chunk-RY6LJY2G.js} +2 -2
  138. package/Build/CesiumUnminified/Workers/{chunk-OBMT6AYF.js → chunk-RYKL6UCM.js} +8 -8
  139. package/Build/CesiumUnminified/Workers/{chunk-KJ2XCRWL.js → chunk-S4IQQ2V6.js} +12 -12
  140. package/Build/CesiumUnminified/Workers/{chunk-AHZFS45R.js → chunk-S5X23VZC.js} +16 -16
  141. package/Build/CesiumUnminified/Workers/{chunk-KEJICC73.js → chunk-SB5BT26D.js} +4 -4
  142. package/Build/CesiumUnminified/Workers/{chunk-GV2FKQPB.js → chunk-T6G4I342.js} +12 -12
  143. package/Build/CesiumUnminified/Workers/{chunk-W6RYUQWA.js → chunk-TSE7QV3R.js} +2 -2
  144. package/Build/CesiumUnminified/Workers/{chunk-GFJJUNRT.js → chunk-TXQCJMN4.js} +2 -2
  145. package/Build/CesiumUnminified/Workers/{chunk-HE24W7Y4.js → chunk-UUMNHKS7.js} +9 -9
  146. package/Build/CesiumUnminified/Workers/{chunk-X7VNU473.js → chunk-VRWD4BAV.js} +11 -11
  147. package/Build/CesiumUnminified/Workers/{chunk-BWTA6YTS.js → chunk-VVB4KFA2.js} +2 -2
  148. package/Build/CesiumUnminified/Workers/{chunk-YBHJ6J7Y.js → chunk-WDF75NPX.js} +6 -6
  149. package/Build/CesiumUnminified/Workers/{chunk-LHHCXZNC.js → chunk-XAWO6CUN.js} +16 -16
  150. package/Build/CesiumUnminified/Workers/{chunk-OWLXLO6R.js → chunk-Y3JM4NZF.js} +7 -7
  151. package/Build/CesiumUnminified/Workers/{chunk-5VNVGW2Q.js → chunk-YVFINNJQ.js} +3 -3
  152. package/Build/CesiumUnminified/Workers/{chunk-F5ALEMWT.js → chunk-ZLFLV7X5.js} +2 -2
  153. package/Build/CesiumUnminified/Workers/{chunk-XAIR7ZUH.js → chunk-ZSS22J7V.js} +4 -4
  154. package/Build/CesiumUnminified/Workers/{chunk-RVM7YQ46.js → chunk-ZY7JWTLG.js} +4 -4
  155. package/Build/CesiumUnminified/Workers/combineGeometry.js +21 -21
  156. package/Build/CesiumUnminified/Workers/createBoxGeometry.js +15 -15
  157. package/Build/CesiumUnminified/Workers/createBoxOutlineGeometry.js +13 -13
  158. package/Build/CesiumUnminified/Workers/createCircleGeometry.js +23 -23
  159. package/Build/CesiumUnminified/Workers/createCircleOutlineGeometry.js +16 -16
  160. package/Build/CesiumUnminified/Workers/createCoplanarPolygonGeometry.js +30 -30
  161. package/Build/CesiumUnminified/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
  162. package/Build/CesiumUnminified/Workers/createCorridorGeometry.js +26 -26
  163. package/Build/CesiumUnminified/Workers/createCorridorOutlineGeometry.js +25 -25
  164. package/Build/CesiumUnminified/Workers/createCylinderGeometry.js +17 -17
  165. package/Build/CesiumUnminified/Workers/createCylinderOutlineGeometry.js +15 -15
  166. package/Build/CesiumUnminified/Workers/createEllipseGeometry.js +23 -23
  167. package/Build/CesiumUnminified/Workers/createEllipseOutlineGeometry.js +16 -16
  168. package/Build/CesiumUnminified/Workers/createEllipsoidGeometry.js +16 -16
  169. package/Build/CesiumUnminified/Workers/createEllipsoidOutlineGeometry.js +15 -15
  170. package/Build/CesiumUnminified/Workers/createFrustumGeometry.js +15 -15
  171. package/Build/CesiumUnminified/Workers/createFrustumOutlineGeometry.js +15 -15
  172. package/Build/CesiumUnminified/Workers/createGeometry.js +21 -21
  173. package/Build/CesiumUnminified/Workers/createGroundPolylineGeometry.js +19 -19
  174. package/Build/CesiumUnminified/Workers/createPlaneGeometry.js +13 -13
  175. package/Build/CesiumUnminified/Workers/createPlaneOutlineGeometry.js +12 -12
  176. package/Build/CesiumUnminified/Workers/createPolygonGeometry.js +29 -29
  177. package/Build/CesiumUnminified/Workers/createPolygonOutlineGeometry.js +27 -27
  178. package/Build/CesiumUnminified/Workers/createPolylineGeometry.js +22 -22
  179. package/Build/CesiumUnminified/Workers/createPolylineVolumeGeometry.js +28 -28
  180. package/Build/CesiumUnminified/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
  181. package/Build/CesiumUnminified/Workers/createRectangleGeometry.js +24 -24
  182. package/Build/CesiumUnminified/Workers/createRectangleOutlineGeometry.js +17 -17
  183. package/Build/CesiumUnminified/Workers/createSimplePolylineGeometry.js +20 -20
  184. package/Build/CesiumUnminified/Workers/createSphereGeometry.js +16 -16
  185. package/Build/CesiumUnminified/Workers/createSphereOutlineGeometry.js +15 -15
  186. package/Build/CesiumUnminified/Workers/createTaskProcessorWorker.js +3 -3
  187. package/Build/CesiumUnminified/Workers/createVectorTileClampedPolylines.js +12 -12
  188. package/Build/CesiumUnminified/Workers/createVectorTileGeometries.js +21 -21
  189. package/Build/CesiumUnminified/Workers/createVectorTilePoints.js +11 -11
  190. package/Build/CesiumUnminified/Workers/createVectorTilePolygons.js +19 -19
  191. package/Build/CesiumUnminified/Workers/createVectorTilePolylines.js +12 -12
  192. package/Build/CesiumUnminified/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +19 -19
  193. package/Build/CesiumUnminified/Workers/createVerticesFromHeightmap.js +19 -19
  194. package/Build/CesiumUnminified/Workers/createVerticesFromQuantizedTerrainMesh.js +16 -16
  195. package/Build/CesiumUnminified/Workers/createWallGeometry.js +21 -21
  196. package/Build/CesiumUnminified/Workers/createWallOutlineGeometry.js +20 -20
  197. package/Build/CesiumUnminified/Workers/decodeDraco.js +10 -10
  198. package/Build/CesiumUnminified/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  199. package/Build/CesiumUnminified/Workers/decodeI3S.js +9 -9
  200. package/Build/CesiumUnminified/Workers/transcodeKTX2.js +6 -6
  201. package/Build/CesiumUnminified/Workers/transferTypedArrayTest.js +1 -1
  202. package/Build/CesiumUnminified/Workers/upsampleQuantizedTerrainMesh.js +19 -19
  203. package/Build/CesiumUnminified/index.cjs +2214 -2214
  204. package/Build/CesiumUnminified/index.js +2214 -2214
  205. package/Source/Cesium.js +91 -91
  206. package/package.json +1 -1
  207. package/patches/engine/Source/Core/taskProcessor.patch.js +14 -14
  208. package/patches/engine/Source/Core/tileAvailability.patch.js +8 -6
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.128.23
4
+ * Version 1.128.26
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -26369,9 +26369,9 @@ var import_urijs7 = __toESM(require_URI(), 1);
26369
26369
  function defaultValue(value, defaultValue3) {
26370
26370
  return value !== void 0 ? value : defaultValue3;
26371
26371
  }
26372
- function canTransferArrayBuffer() {
26372
+ function canTransferArrayBufferPatched() {
26373
26373
  if (!defined_default(TaskProcessor_default._canTransferArrayBuffer)) {
26374
- const worker = createWorker("transferTypedArrayTest");
26374
+ const worker = createWorkerPatched("transferTypedArrayTest");
26375
26375
  worker.postMessage = defaultValue(worker.webkitPostMessage, worker.postMessage);
26376
26376
  const value = 99;
26377
26377
  const array = new Int8Array([value]);
@@ -26399,7 +26399,7 @@ function canTransferArrayBuffer() {
26399
26399
  return TaskProcessor_default._canTransferArrayBuffer;
26400
26400
  }
26401
26401
  var taskCompletedEvent = new Event_default();
26402
- function urlFromScript(script) {
26402
+ function urlFromScriptPatched(script) {
26403
26403
  let blob;
26404
26404
  try {
26405
26405
  blob = new Blob([script], {
@@ -26414,7 +26414,7 @@ function urlFromScript(script) {
26414
26414
  const URL2 = window.URL || window.webkitURL;
26415
26415
  return URL2.createObjectURL(blob);
26416
26416
  }
26417
- function createWorker(url2) {
26417
+ function createWorkerPatched(url2) {
26418
26418
  const uri = new import_urijs7.default(url2);
26419
26419
  const isUri = uri.scheme().length !== 0 && uri.fragment().length === 0;
26420
26420
  const moduleID = url2.replace(/\.js$/, "");
@@ -26431,16 +26431,16 @@ function createWorker(url2) {
26431
26431
  }
26432
26432
  if (crossOriginUrl) {
26433
26433
  const script = `import "${crossOriginUrl}";`;
26434
- workerPath = urlFromScript(script);
26434
+ workerPath = urlFromScriptPatched(script);
26435
26435
  options.type = "module";
26436
26436
  return new Worker(workerPath, options);
26437
26437
  }
26438
26438
  if (!isUri && typeof CESIUM_WORKERS !== "undefined") {
26439
26439
  const script = `
26440
- importScripts("${urlFromScript(CESIUM_WORKERS)}");
26440
+ importScripts("${urlFromScriptPatched(CESIUM_WORKERS)}");
26441
26441
  CesiumWorkers["${moduleID}"]();
26442
26442
  `;
26443
- workerPath = urlFromScript(script);
26443
+ workerPath = urlFromScriptPatched(script);
26444
26444
  return new Worker(workerPath, options);
26445
26445
  }
26446
26446
  workerPath = url2;
@@ -26481,8 +26481,8 @@ var createOnmessageHandler = (worker, id, resolve2, reject) => {
26481
26481
  return listener;
26482
26482
  };
26483
26483
  var emptyTransferableObjectArray = [];
26484
- async function runTask(processor, parameters, transferableObjects) {
26485
- const canTransfer = await Promise.resolve(canTransferArrayBuffer());
26484
+ async function runTaskPatched(processor, parameters, transferableObjects) {
26485
+ const canTransfer = await Promise.resolve(canTransferArrayBufferPatched());
26486
26486
  if (!defined_default(transferableObjects)) {
26487
26487
  transferableObjects = emptyTransferableObjectArray;
26488
26488
  } else if (!canTransfer) {
@@ -26517,10 +26517,10 @@ async function runTask(processor, parameters, transferableObjects) {
26517
26517
  }
26518
26518
  return promise;
26519
26519
  }
26520
- async function scheduleTask(processor, parameters, transferableObjects) {
26520
+ async function scheduleTaskPatched(processor, parameters, transferableObjects) {
26521
26521
  ++processor._activeTasks;
26522
26522
  try {
26523
- const result = await runTask(processor, parameters, transferableObjects);
26523
+ const result = await runTaskPatched(processor, parameters, transferableObjects);
26524
26524
  --processor._activeTasks;
26525
26525
  return result;
26526
26526
  } catch (error) {
@@ -26530,12 +26530,12 @@ async function scheduleTask(processor, parameters, transferableObjects) {
26530
26530
  }
26531
26531
  TaskProcessor_default.prototype.scheduleTask = function(parameters, transferableObjects) {
26532
26532
  if (!defined_default(this._worker)) {
26533
- this._worker = createWorker(this._workerPath);
26533
+ this._worker = createWorkerPatched(this._workerPath);
26534
26534
  }
26535
26535
  if (this._activeTasks >= this._maximumActiveTasks) {
26536
26536
  return void 0;
26537
26537
  }
26538
- return scheduleTask(this, parameters, transferableObjects);
26538
+ return scheduleTaskPatched(this, parameters, transferableObjects);
26539
26539
  };
26540
26540
  TaskProcessor_default.taskCompletedEvent = taskCompletedEvent;
26541
26541
  TaskProcessor_default._defaultWorkerModulePrefix = "Workers/";
@@ -26543,9 +26543,9 @@ TaskProcessor_default._workerModulePrefix = TaskProcessor_default._defaultWorker
26543
26543
  TaskProcessor_default._canTransferArrayBuffer = void 0;
26544
26544
 
26545
26545
  // packages/engine/Source/Core/TaskProcessor.js
26546
- function canTransferArrayBuffer2() {
26546
+ function canTransferArrayBuffer() {
26547
26547
  if (!defined_default(TaskProcessor._canTransferArrayBuffer)) {
26548
- const worker = createWorker2("transferTypedArrayTest");
26548
+ const worker = createWorker("transferTypedArrayTest");
26549
26549
  worker.postMessage = worker.webkitPostMessage ?? worker.postMessage;
26550
26550
  const value = 99;
26551
26551
  const array = new Int8Array([value]);
@@ -26573,7 +26573,7 @@ function canTransferArrayBuffer2() {
26573
26573
  return TaskProcessor._canTransferArrayBuffer;
26574
26574
  }
26575
26575
  var taskCompletedEvent2 = new Event_default();
26576
- function urlFromScript2(script) {
26576
+ function urlFromScript(script) {
26577
26577
  let blob;
26578
26578
  try {
26579
26579
  blob = new Blob([script], {
@@ -26588,7 +26588,7 @@ function urlFromScript2(script) {
26588
26588
  const URL2 = window.URL || window.webkitURL;
26589
26589
  return URL2.createObjectURL(blob);
26590
26590
  }
26591
- function createWorker2(url2) {
26591
+ function createWorker(url2) {
26592
26592
  const uri = new import_urijs8.default(url2);
26593
26593
  const isUri = uri.scheme().length !== 0 && uri.fragment().length === 0;
26594
26594
  const moduleID = url2.replace(/\.js$/, "");
@@ -26607,16 +26607,16 @@ function createWorker2(url2) {
26607
26607
  }
26608
26608
  if (crossOriginUrl) {
26609
26609
  const script = `import "${crossOriginUrl}";`;
26610
- workerPath = urlFromScript2(script);
26610
+ workerPath = urlFromScript(script);
26611
26611
  options.type = "module";
26612
26612
  return new Worker(workerPath, options);
26613
26613
  }
26614
26614
  if (!isUri && typeof CESIUM_WORKERS !== "undefined") {
26615
26615
  const script = `
26616
- importScripts("${urlFromScript2(CESIUM_WORKERS)}");
26616
+ importScripts("${urlFromScript(CESIUM_WORKERS)}");
26617
26617
  CesiumWorkers["${moduleID}"]();
26618
26618
  `;
26619
- workerPath = urlFromScript2(script);
26619
+ workerPath = urlFromScript(script);
26620
26620
  return new Worker(workerPath, options);
26621
26621
  }
26622
26622
  workerPath = url2;
@@ -26690,8 +26690,8 @@ var createOnmessageHandler2 = (worker, id, resolve2, reject) => {
26690
26690
  return listener;
26691
26691
  };
26692
26692
  var emptyTransferableObjectArray2 = [];
26693
- async function runTask2(processor, parameters, transferableObjects) {
26694
- const canTransfer = await Promise.resolve(canTransferArrayBuffer2());
26693
+ async function runTask(processor, parameters, transferableObjects) {
26694
+ const canTransfer = await Promise.resolve(canTransferArrayBuffer());
26695
26695
  if (!defined_default(transferableObjects)) {
26696
26696
  transferableObjects = emptyTransferableObjectArray2;
26697
26697
  } else if (!canTransfer) {
@@ -26715,10 +26715,10 @@ async function runTask2(processor, parameters, transferableObjects) {
26715
26715
  );
26716
26716
  return promise;
26717
26717
  }
26718
- async function scheduleTask2(processor, parameters, transferableObjects) {
26718
+ async function scheduleTask(processor, parameters, transferableObjects) {
26719
26719
  ++processor._activeTasks;
26720
26720
  try {
26721
- const result = await runTask2(processor, parameters, transferableObjects);
26721
+ const result = await runTask(processor, parameters, transferableObjects);
26722
26722
  --processor._activeTasks;
26723
26723
  return result;
26724
26724
  } catch (error) {
@@ -26728,24 +26728,24 @@ async function scheduleTask2(processor, parameters, transferableObjects) {
26728
26728
  }
26729
26729
  TaskProcessor.prototype.scheduleTask = function(parameters, transferableObjects) {
26730
26730
  if (!defined_default(this._worker)) {
26731
- this._worker = createWorker2(this._workerPath);
26731
+ this._worker = createWorker(this._workerPath);
26732
26732
  }
26733
26733
  if (this._activeTasks >= this._maximumActiveTasks) {
26734
26734
  return void 0;
26735
26735
  }
26736
- return scheduleTask2(this, parameters, transferableObjects);
26736
+ return scheduleTask(this, parameters, transferableObjects);
26737
26737
  };
26738
26738
  TaskProcessor.prototype.initWebAssemblyModule = async function(webAssemblyOptions) {
26739
26739
  if (defined_default(this._webAssemblyPromise)) {
26740
26740
  return this._webAssemblyPromise;
26741
26741
  }
26742
26742
  const init = async () => {
26743
- const worker = this._worker = createWorker2(this._workerPath);
26743
+ const worker = this._worker = createWorker(this._workerPath);
26744
26744
  const wasmConfig = await getWebAssemblyLoaderConfig(
26745
26745
  this,
26746
26746
  webAssemblyOptions
26747
26747
  );
26748
- const canTransfer = await Promise.resolve(canTransferArrayBuffer2());
26748
+ const canTransfer = await Promise.resolve(canTransferArrayBuffer());
26749
26749
  let transferableObjects;
26750
26750
  const binary = wasmConfig.wasmBinary;
26751
26751
  if (defined_default(binary) && canTransfer) {
@@ -72921,7 +72921,7 @@ var MeshoptDecoder = (function() {
72921
72921
  };
72922
72922
  var workers2 = [];
72923
72923
  var requestId = 0;
72924
- function createWorker3(url2) {
72924
+ function createWorker2(url2) {
72925
72925
  var worker = {
72926
72926
  object: new Worker(url2),
72927
72927
  pending: 0,
@@ -72940,7 +72940,7 @@ var MeshoptDecoder = (function() {
72940
72940
  var blob = new Blob([source], { type: "text/javascript" });
72941
72941
  var url2 = URL.createObjectURL(blob);
72942
72942
  for (var i = workers2.length; i < count; ++i) {
72943
- workers2[i] = createWorker3(url2);
72943
+ workers2[i] = createWorker2(url2);
72944
72944
  }
72945
72945
  for (var i = count; i < workers2.length; ++i) {
72946
72946
  workers2[i].object.postMessage({});
@@ -224207,7 +224207,7 @@ var ViewportQuadFS_default = "\nin vec2 v_textureCoordinates;\n\nvoid main()\n{\
224207
224207
  function rectangleContainsPosition(potentialContainer, positionToTest) {
224208
224208
  return positionToTest.longitude >= potentialContainer.west && positionToTest.longitude <= potentialContainer.east && positionToTest.latitude >= potentialContainer.south && positionToTest.latitude <= potentialContainer.north;
224209
224209
  }
224210
- function findMaxLevelFromNode(stopNode, node, position) {
224210
+ function findMaxLevelFromNodePatched(stopNode, node, position) {
224211
224211
  let maxLevel = 0;
224212
224212
  let found = false;
224213
224213
  while (!found) {
@@ -224217,16 +224217,16 @@ function findMaxLevelFromNode(stopNode, node, position) {
224217
224217
  const se = node._se && rectangleContainsPosition(node._se.extent, position);
224218
224218
  if (Number(nw) + Number(ne) + Number(sw) + Number(se) > 1) {
224219
224219
  if (nw) {
224220
- maxLevel = Math.max(maxLevel, findMaxLevelFromNode(node, node._nw, position));
224220
+ maxLevel = Math.max(maxLevel, findMaxLevelFromNodePatched(node, node._nw, position));
224221
224221
  }
224222
224222
  if (ne) {
224223
- maxLevel = Math.max(maxLevel, findMaxLevelFromNode(node, node._ne, position));
224223
+ maxLevel = Math.max(maxLevel, findMaxLevelFromNodePatched(node, node._ne, position));
224224
224224
  }
224225
224225
  if (sw) {
224226
- maxLevel = Math.max(maxLevel, findMaxLevelFromNode(node, node._sw, position));
224226
+ maxLevel = Math.max(maxLevel, findMaxLevelFromNodePatched(node, node._sw, position));
224227
224227
  }
224228
224228
  if (se) {
224229
- maxLevel = Math.max(maxLevel, findMaxLevelFromNode(node, node._se, position));
224229
+ maxLevel = Math.max(maxLevel, findMaxLevelFromNodePatched(node, node._se, position));
224230
224230
  }
224231
224231
  break;
224232
224232
  } else if (nw) {
@@ -224264,7 +224264,7 @@ TileAvailability_default.prototype.computeMaximumLevelAtPosition = function(posi
224264
224264
  if (!defined_default(node)) {
224265
224265
  return -1;
224266
224266
  }
224267
- return findMaxLevelFromNode(void 0, node, position);
224267
+ return findMaxLevelFromNodePatched(void 0, node, position);
224268
224268
  };
224269
224269
 
224270
224270
  // packages/engine/Source/Core/TileAvailability.js
@@ -224328,7 +224328,7 @@ TileAvailability.prototype.computeMaximumLevelAtPosition = function(position) {
224328
224328
  if (!defined_default(node)) {
224329
224329
  return -1;
224330
224330
  }
224331
- return findMaxLevelFromNode2(void 0, node, position);
224331
+ return findMaxLevelFromNode(void 0, node, position);
224332
224332
  };
224333
224333
  var rectanglesScratch = [];
224334
224334
  var remainingToCoverByLevelScratch = [];
@@ -224521,7 +224521,7 @@ function rectangleFullyContainsRectangle(potentialContainer, rectangleToTest) {
224521
224521
  function rectangleContainsPosition2(potentialContainer, positionToTest) {
224522
224522
  return positionToTest.longitude >= potentialContainer.west && positionToTest.longitude <= potentialContainer.east && positionToTest.latitude >= potentialContainer.south && positionToTest.latitude <= potentialContainer.north;
224523
224523
  }
224524
- function findMaxLevelFromNode2(stopNode, node, position) {
224524
+ function findMaxLevelFromNode(stopNode, node, position) {
224525
224525
  let maxLevel = 0;
224526
224526
  let found = false;
224527
224527
  while (!found) {
@@ -224533,25 +224533,25 @@ function findMaxLevelFromNode2(stopNode, node, position) {
224533
224533
  if (nw) {
224534
224534
  maxLevel = Math.max(
224535
224535
  maxLevel,
224536
- findMaxLevelFromNode2(node, node._nw, position)
224536
+ findMaxLevelFromNode(node, node._nw, position)
224537
224537
  );
224538
224538
  }
224539
224539
  if (ne) {
224540
224540
  maxLevel = Math.max(
224541
224541
  maxLevel,
224542
- findMaxLevelFromNode2(node, node._ne, position)
224542
+ findMaxLevelFromNode(node, node._ne, position)
224543
224543
  );
224544
224544
  }
224545
224545
  if (sw) {
224546
224546
  maxLevel = Math.max(
224547
224547
  maxLevel,
224548
- findMaxLevelFromNode2(node, node._sw, position)
224548
+ findMaxLevelFromNode(node, node._sw, position)
224549
224549
  );
224550
224550
  }
224551
224551
  if (se) {
224552
224552
  maxLevel = Math.max(
224553
224553
  maxLevel,
224554
- findMaxLevelFromNode2(node, node._se, position)
224554
+ findMaxLevelFromNode(node, node._se, position)
224555
224555
  );
224556
224556
  }
224557
224557
  break;
@@ -240551,7 +240551,7 @@ function createTaskProcessorWorker(workerFunction) {
240551
240551
  var createTaskProcessorWorker_default = createTaskProcessorWorker;
240552
240552
 
240553
240553
  // packages/engine/index.js
240554
- globalThis.CESIUM_VERSION = "1.128.23";
240554
+ globalThis.CESIUM_VERSION = "1.128.26";
240555
240555
 
240556
240556
  // packages/widgets/Source/ThirdParty/knockout-3.5.1.js
240557
240557
  var oldValue;
@@ -246198,939 +246198,6 @@ function createDefaultTerrainProviderViewModels() {
246198
246198
  }
246199
246199
  var createDefaultTerrainProviderViewModels_default = createDefaultTerrainProviderViewModels;
246200
246200
 
246201
- // packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js
246202
- function frustumStatisticsToString(statistics2) {
246203
- let str;
246204
- if (defined_default(statistics2)) {
246205
- str = "Command Statistics";
246206
- const com = statistics2.commandsInFrustums;
246207
- for (const n in com) {
246208
- if (com.hasOwnProperty(n)) {
246209
- let num = parseInt(n, 10);
246210
- let s;
246211
- if (num === 7) {
246212
- s = "1, 2 and 3";
246213
- } else {
246214
- const f = [];
246215
- for (let i = 2; i >= 0; i--) {
246216
- const p = Math.pow(2, i);
246217
- if (num >= p) {
246218
- f.push(i + 1);
246219
- num -= p;
246220
- }
246221
- }
246222
- s = f.reverse().join(" and ");
246223
- }
246224
- str += `<br>&nbsp;&nbsp;&nbsp;&nbsp;${com[n]} in frustum ${s}`;
246225
- }
246226
- }
246227
- str += `<br>Total: ${statistics2.totalCommands}`;
246228
- }
246229
- return str;
246230
- }
246231
- function boundDepthFrustum(lower, upper, proposed) {
246232
- let bounded = Math.min(proposed, upper);
246233
- bounded = Math.max(bounded, lower);
246234
- return bounded;
246235
- }
246236
- var scratchPickRay2 = new Ray_default();
246237
- var scratchPickCartesian3 = new Cartesian3_default();
246238
- function CesiumInspectorViewModel(scene, performanceContainer) {
246239
- if (!defined_default(scene)) {
246240
- throw new DeveloperError_default("scene is required");
246241
- }
246242
- if (!defined_default(performanceContainer)) {
246243
- throw new DeveloperError_default("performanceContainer is required");
246244
- }
246245
- const that = this;
246246
- const canvas = scene.canvas;
246247
- const eventHandler = new ScreenSpaceEventHandler_default(canvas);
246248
- this._eventHandler = eventHandler;
246249
- this._scene = scene;
246250
- this._canvas = canvas;
246251
- this._primitive = void 0;
246252
- this._tile = void 0;
246253
- this._modelMatrixPrimitive = void 0;
246254
- this._performanceDisplay = void 0;
246255
- this._performanceContainer = performanceContainer;
246256
- const globe = this._scene.globe;
246257
- globe.depthTestAgainstTerrain = true;
246258
- this.frustums = false;
246259
- this.frustumPlanes = false;
246260
- this.performance = false;
246261
- this.shaderCacheText = "";
246262
- this.primitiveBoundingSphere = false;
246263
- this.primitiveReferenceFrame = false;
246264
- this.filterPrimitive = false;
246265
- this.tileBoundingSphere = false;
246266
- this.filterTile = false;
246267
- this.wireframe = false;
246268
- this.depthFrustum = 1;
246269
- this._numberOfFrustums = 1;
246270
- this.suspendUpdates = false;
246271
- this.tileCoordinates = false;
246272
- this.frustumStatisticText = false;
246273
- this.tileText = "";
246274
- this.hasPickedPrimitive = false;
246275
- this.hasPickedTile = false;
246276
- this.pickPrimitiveActive = false;
246277
- this.pickTileActive = false;
246278
- this.dropDownVisible = true;
246279
- this.generalVisible = true;
246280
- this.primitivesVisible = false;
246281
- this.terrainVisible = false;
246282
- this.depthFrustumText = "";
246283
- knockout_default.track(this, [
246284
- "frustums",
246285
- "frustumPlanes",
246286
- "performance",
246287
- "shaderCacheText",
246288
- "primitiveBoundingSphere",
246289
- "primitiveReferenceFrame",
246290
- "filterPrimitive",
246291
- "tileBoundingSphere",
246292
- "filterTile",
246293
- "wireframe",
246294
- "depthFrustum",
246295
- "suspendUpdates",
246296
- "tileCoordinates",
246297
- "frustumStatisticText",
246298
- "tileText",
246299
- "hasPickedPrimitive",
246300
- "hasPickedTile",
246301
- "pickPrimitiveActive",
246302
- "pickTileActive",
246303
- "dropDownVisible",
246304
- "generalVisible",
246305
- "primitivesVisible",
246306
- "terrainVisible",
246307
- "depthFrustumText"
246308
- ]);
246309
- this._toggleDropDown = createCommand_default(function() {
246310
- that.dropDownVisible = !that.dropDownVisible;
246311
- });
246312
- this._toggleGeneral = createCommand_default(function() {
246313
- that.generalVisible = !that.generalVisible;
246314
- });
246315
- this._togglePrimitives = createCommand_default(function() {
246316
- that.primitivesVisible = !that.primitivesVisible;
246317
- });
246318
- this._toggleTerrain = createCommand_default(function() {
246319
- that.terrainVisible = !that.terrainVisible;
246320
- });
246321
- this._frustumsSubscription = knockout_default.getObservable(this, "frustums").subscribe(function(val) {
246322
- that._scene.debugShowFrustums = val;
246323
- that._scene.requestRender();
246324
- });
246325
- this._frustumPlanesSubscription = knockout_default.getObservable(this, "frustumPlanes").subscribe(function(val) {
246326
- that._scene.debugShowFrustumPlanes = val;
246327
- that._scene.requestRender();
246328
- });
246329
- this._performanceSubscription = knockout_default.getObservable(this, "performance").subscribe(function(val) {
246330
- if (val) {
246331
- that._performanceDisplay = new PerformanceDisplay_default({
246332
- container: that._performanceContainer
246333
- });
246334
- } else {
246335
- that._performanceContainer.innerHTML = "";
246336
- }
246337
- });
246338
- this._showPrimitiveBoundingSphere = createCommand_default(function() {
246339
- that._primitive.debugShowBoundingVolume = that.primitiveBoundingSphere;
246340
- that._scene.requestRender();
246341
- return true;
246342
- });
246343
- this._primitiveBoundingSphereSubscription = knockout_default.getObservable(this, "primitiveBoundingSphere").subscribe(function() {
246344
- that._showPrimitiveBoundingSphere();
246345
- });
246346
- this._showPrimitiveReferenceFrame = createCommand_default(function() {
246347
- if (that.primitiveReferenceFrame) {
246348
- const modelMatrix = that._primitive.modelMatrix;
246349
- that._modelMatrixPrimitive = new DebugModelMatrixPrimitive_default({
246350
- modelMatrix
246351
- });
246352
- that._scene.primitives.add(that._modelMatrixPrimitive);
246353
- } else if (defined_default(that._modelMatrixPrimitive)) {
246354
- that._scene.primitives.remove(that._modelMatrixPrimitive);
246355
- that._modelMatrixPrimitive = void 0;
246356
- }
246357
- that._scene.requestRender();
246358
- return true;
246359
- });
246360
- this._primitiveReferenceFrameSubscription = knockout_default.getObservable(this, "primitiveReferenceFrame").subscribe(function() {
246361
- that._showPrimitiveReferenceFrame();
246362
- });
246363
- this._doFilterPrimitive = createCommand_default(function() {
246364
- if (that.filterPrimitive) {
246365
- that._scene.debugCommandFilter = function(command) {
246366
- if (defined_default(that._modelMatrixPrimitive) && command.owner === that._modelMatrixPrimitive._primitive) {
246367
- return true;
246368
- } else if (defined_default(that._primitive)) {
246369
- return command.owner === that._primitive || command.owner === that._primitive._billboardCollection || command.owner.primitive === that._primitive;
246370
- }
246371
- return false;
246372
- };
246373
- } else {
246374
- that._scene.debugCommandFilter = void 0;
246375
- }
246376
- return true;
246377
- });
246378
- this._filterPrimitiveSubscription = knockout_default.getObservable(this, "filterPrimitive").subscribe(function() {
246379
- that._doFilterPrimitive();
246380
- that._scene.requestRender();
246381
- });
246382
- this._wireframeSubscription = knockout_default.getObservable(this, "wireframe").subscribe(function(val) {
246383
- globe._surface.tileProvider._debug.wireframe = val;
246384
- that._scene.requestRender();
246385
- });
246386
- this._depthFrustumSubscription = knockout_default.getObservable(this, "depthFrustum").subscribe(function(val) {
246387
- that._scene.debugShowDepthFrustum = val;
246388
- that._scene.requestRender();
246389
- });
246390
- this._incrementDepthFrustum = createCommand_default(function() {
246391
- const next = that.depthFrustum + 1;
246392
- that.depthFrustum = boundDepthFrustum(1, that._numberOfFrustums, next);
246393
- that._scene.requestRender();
246394
- return true;
246395
- });
246396
- this._decrementDepthFrustum = createCommand_default(function() {
246397
- const next = that.depthFrustum - 1;
246398
- that.depthFrustum = boundDepthFrustum(1, that._numberOfFrustums, next);
246399
- that._scene.requestRender();
246400
- return true;
246401
- });
246402
- this._suspendUpdatesSubscription = knockout_default.getObservable(this, "suspendUpdates").subscribe(function(val) {
246403
- globe._surface._debug.suspendLodUpdate = val;
246404
- if (!val) {
246405
- that.filterTile = false;
246406
- }
246407
- });
246408
- let tileBoundariesLayer;
246409
- this._showTileCoordinates = createCommand_default(function() {
246410
- if (that.tileCoordinates && !defined_default(tileBoundariesLayer)) {
246411
- tileBoundariesLayer = scene.imageryLayers.addImageryProvider(
246412
- new TileCoordinatesImageryProvider_default({
246413
- tilingScheme: scene.terrainProvider.tilingScheme
246414
- })
246415
- );
246416
- } else if (!that.tileCoordinates && defined_default(tileBoundariesLayer)) {
246417
- scene.imageryLayers.remove(tileBoundariesLayer);
246418
- tileBoundariesLayer = void 0;
246419
- }
246420
- return true;
246421
- });
246422
- this._tileCoordinatesSubscription = knockout_default.getObservable(this, "tileCoordinates").subscribe(function() {
246423
- that._showTileCoordinates();
246424
- that._scene.requestRender();
246425
- });
246426
- this._tileBoundingSphereSubscription = knockout_default.getObservable(this, "tileBoundingSphere").subscribe(function() {
246427
- that._showTileBoundingSphere();
246428
- that._scene.requestRender();
246429
- });
246430
- this._showTileBoundingSphere = createCommand_default(function() {
246431
- if (that.tileBoundingSphere) {
246432
- globe._surface.tileProvider._debug.boundingSphereTile = that._tile;
246433
- } else {
246434
- globe._surface.tileProvider._debug.boundingSphereTile = void 0;
246435
- }
246436
- that._scene.requestRender();
246437
- return true;
246438
- });
246439
- this._doFilterTile = createCommand_default(function() {
246440
- if (!that.filterTile) {
246441
- that.suspendUpdates = false;
246442
- } else {
246443
- that.suspendUpdates = true;
246444
- globe._surface._tilesToRender = [];
246445
- if (defined_default(that._tile) && that._tile.renderable) {
246446
- globe._surface._tilesToRender.push(that._tile);
246447
- }
246448
- }
246449
- return true;
246450
- });
246451
- this._filterTileSubscription = knockout_default.getObservable(this, "filterTile").subscribe(function() {
246452
- that.doFilterTile();
246453
- that._scene.requestRender();
246454
- });
246455
- function pickPrimitive(e) {
246456
- const newPick = that._scene.pick({
246457
- x: e.position.x,
246458
- y: e.position.y
246459
- });
246460
- if (defined_default(newPick)) {
246461
- that.primitive = defined_default(newPick.collection) ? newPick.collection : newPick.primitive;
246462
- }
246463
- that._scene.requestRender();
246464
- that.pickPrimitiveActive = false;
246465
- }
246466
- this._pickPrimitive = createCommand_default(function() {
246467
- that.pickPrimitiveActive = !that.pickPrimitiveActive;
246468
- });
246469
- this._pickPrimitiveActiveSubscription = knockout_default.getObservable(this, "pickPrimitiveActive").subscribe(function(val) {
246470
- if (val) {
246471
- eventHandler.setInputAction(
246472
- pickPrimitive,
246473
- ScreenSpaceEventType_default.LEFT_CLICK
246474
- );
246475
- } else {
246476
- eventHandler.removeInputAction(ScreenSpaceEventType_default.LEFT_CLICK);
246477
- }
246478
- });
246479
- function selectTile(e) {
246480
- let selectedTile;
246481
- const ellipsoid = globe.ellipsoid;
246482
- const ray = that._scene.camera.getPickRay(e.position, scratchPickRay2);
246483
- const cartesian11 = globe.pick(ray, that._scene, scratchPickCartesian3);
246484
- if (defined_default(cartesian11)) {
246485
- const cartographic2 = ellipsoid.cartesianToCartographic(cartesian11);
246486
- const tilesRendered = globe._surface.tileProvider._tilesToRenderByTextureCount;
246487
- for (let textureCount = 0; !selectedTile && textureCount < tilesRendered.length; ++textureCount) {
246488
- const tilesRenderedByTextureCount = tilesRendered[textureCount];
246489
- if (!defined_default(tilesRenderedByTextureCount)) {
246490
- continue;
246491
- }
246492
- for (let tileIndex = 0; !selectedTile && tileIndex < tilesRenderedByTextureCount.length; ++tileIndex) {
246493
- const tile = tilesRenderedByTextureCount[tileIndex];
246494
- if (Rectangle_default.contains(tile.rectangle, cartographic2)) {
246495
- selectedTile = tile;
246496
- }
246497
- }
246498
- }
246499
- }
246500
- that.tile = selectedTile;
246501
- that.pickTileActive = false;
246502
- }
246503
- this._pickTile = createCommand_default(function() {
246504
- that.pickTileActive = !that.pickTileActive;
246505
- });
246506
- this._pickTileActiveSubscription = knockout_default.getObservable(this, "pickTileActive").subscribe(function(val) {
246507
- if (val) {
246508
- eventHandler.setInputAction(
246509
- selectTile,
246510
- ScreenSpaceEventType_default.LEFT_CLICK
246511
- );
246512
- } else {
246513
- eventHandler.removeInputAction(ScreenSpaceEventType_default.LEFT_CLICK);
246514
- }
246515
- });
246516
- this._removePostRenderEvent = scene.postRender.addEventListener(function() {
246517
- that._update();
246518
- });
246519
- }
246520
- Object.defineProperties(CesiumInspectorViewModel.prototype, {
246521
- /**
246522
- * Gets the scene to control.
246523
- * @memberof CesiumInspectorViewModel.prototype
246524
- *
246525
- * @type {Scene}
246526
- */
246527
- scene: {
246528
- get: function() {
246529
- return this._scene;
246530
- }
246531
- },
246532
- /**
246533
- * Gets the container of the PerformanceDisplay
246534
- * @memberof CesiumInspectorViewModel.prototype
246535
- *
246536
- * @type {Element}
246537
- */
246538
- performanceContainer: {
246539
- get: function() {
246540
- return this._performanceContainer;
246541
- }
246542
- },
246543
- /**
246544
- * Gets the command to toggle the visibility of the drop down.
246545
- * @memberof CesiumInspectorViewModel.prototype
246546
- *
246547
- * @type {Command}
246548
- */
246549
- toggleDropDown: {
246550
- get: function() {
246551
- return this._toggleDropDown;
246552
- }
246553
- },
246554
- /**
246555
- * Gets the command to toggle the visibility of a BoundingSphere for a primitive
246556
- * @memberof CesiumInspectorViewModel.prototype
246557
- *
246558
- * @type {Command}
246559
- */
246560
- showPrimitiveBoundingSphere: {
246561
- get: function() {
246562
- return this._showPrimitiveBoundingSphere;
246563
- }
246564
- },
246565
- /**
246566
- * Gets the command to toggle the visibility of a {@link DebugModelMatrixPrimitive} for the model matrix of a primitive
246567
- * @memberof CesiumInspectorViewModel.prototype
246568
- *
246569
- * @type {Command}
246570
- */
246571
- showPrimitiveReferenceFrame: {
246572
- get: function() {
246573
- return this._showPrimitiveReferenceFrame;
246574
- }
246575
- },
246576
- /**
246577
- * Gets the command to toggle a filter that renders only a selected primitive
246578
- * @memberof CesiumInspectorViewModel.prototype
246579
- *
246580
- * @type {Command}
246581
- */
246582
- doFilterPrimitive: {
246583
- get: function() {
246584
- return this._doFilterPrimitive;
246585
- }
246586
- },
246587
- /**
246588
- * Gets the command to increment the depth frustum index to be shown
246589
- * @memberof CesiumInspectorViewModel.prototype
246590
- *
246591
- * @type {Command}
246592
- */
246593
- incrementDepthFrustum: {
246594
- get: function() {
246595
- return this._incrementDepthFrustum;
246596
- }
246597
- },
246598
- /**
246599
- * Gets the command to decrement the depth frustum index to be shown
246600
- * @memberof CesiumInspectorViewModel.prototype
246601
- *
246602
- * @type {Command}
246603
- */
246604
- decrementDepthFrustum: {
246605
- get: function() {
246606
- return this._decrementDepthFrustum;
246607
- }
246608
- },
246609
- /**
246610
- * Gets the command to toggle the visibility of tile coordinates
246611
- * @memberof CesiumInspectorViewModel.prototype
246612
- *
246613
- * @type {Command}
246614
- */
246615
- showTileCoordinates: {
246616
- get: function() {
246617
- return this._showTileCoordinates;
246618
- }
246619
- },
246620
- /**
246621
- * Gets the command to toggle the visibility of a BoundingSphere for a selected tile
246622
- * @memberof CesiumInspectorViewModel.prototype
246623
- *
246624
- * @type {Command}
246625
- */
246626
- showTileBoundingSphere: {
246627
- get: function() {
246628
- return this._showTileBoundingSphere;
246629
- }
246630
- },
246631
- /**
246632
- * Gets the command to toggle a filter that renders only a selected tile
246633
- * @memberof CesiumInspectorViewModel.prototype
246634
- *
246635
- * @type {Command}
246636
- */
246637
- doFilterTile: {
246638
- get: function() {
246639
- return this._doFilterTile;
246640
- }
246641
- },
246642
- /**
246643
- * Gets the command to expand and collapse the general section
246644
- * @memberof CesiumInspectorViewModel.prototype
246645
- *
246646
- * @type {Command}
246647
- */
246648
- toggleGeneral: {
246649
- get: function() {
246650
- return this._toggleGeneral;
246651
- }
246652
- },
246653
- /**
246654
- * Gets the command to expand and collapse the primitives section
246655
- * @memberof CesiumInspectorViewModel.prototype
246656
- *
246657
- * @type {Command}
246658
- */
246659
- togglePrimitives: {
246660
- get: function() {
246661
- return this._togglePrimitives;
246662
- }
246663
- },
246664
- /**
246665
- * Gets the command to expand and collapse the terrain section
246666
- * @memberof CesiumInspectorViewModel.prototype
246667
- *
246668
- * @type {Command}
246669
- */
246670
- toggleTerrain: {
246671
- get: function() {
246672
- return this._toggleTerrain;
246673
- }
246674
- },
246675
- /**
246676
- * Gets the command to pick a primitive
246677
- * @memberof CesiumInspectorViewModel.prototype
246678
- *
246679
- * @type {Command}
246680
- */
246681
- pickPrimitive: {
246682
- get: function() {
246683
- return this._pickPrimitive;
246684
- }
246685
- },
246686
- /**
246687
- * Gets the command to pick a tile
246688
- * @memberof CesiumInspectorViewModel.prototype
246689
- *
246690
- * @type {Command}
246691
- */
246692
- pickTile: {
246693
- get: function() {
246694
- return this._pickTile;
246695
- }
246696
- },
246697
- /**
246698
- * Gets the command to pick a tile
246699
- * @memberof CesiumInspectorViewModel.prototype
246700
- *
246701
- * @type {Command}
246702
- */
246703
- selectParent: {
246704
- get: function() {
246705
- const that = this;
246706
- return createCommand_default(function() {
246707
- that.tile = that.tile.parent;
246708
- });
246709
- }
246710
- },
246711
- /**
246712
- * Gets the command to pick a tile
246713
- * @memberof CesiumInspectorViewModel.prototype
246714
- *
246715
- * @type {Command}
246716
- */
246717
- selectNW: {
246718
- get: function() {
246719
- const that = this;
246720
- return createCommand_default(function() {
246721
- that.tile = that.tile.northwestChild;
246722
- });
246723
- }
246724
- },
246725
- /**
246726
- * Gets the command to pick a tile
246727
- * @memberof CesiumInspectorViewModel.prototype
246728
- *
246729
- * @type {Command}
246730
- */
246731
- selectNE: {
246732
- get: function() {
246733
- const that = this;
246734
- return createCommand_default(function() {
246735
- that.tile = that.tile.northeastChild;
246736
- });
246737
- }
246738
- },
246739
- /**
246740
- * Gets the command to pick a tile
246741
- * @memberof CesiumInspectorViewModel.prototype
246742
- *
246743
- * @type {Command}
246744
- */
246745
- selectSW: {
246746
- get: function() {
246747
- const that = this;
246748
- return createCommand_default(function() {
246749
- that.tile = that.tile.southwestChild;
246750
- });
246751
- }
246752
- },
246753
- /**
246754
- * Gets the command to pick a tile
246755
- * @memberof CesiumInspectorViewModel.prototype
246756
- *
246757
- * @type {Command}
246758
- */
246759
- selectSE: {
246760
- get: function() {
246761
- const that = this;
246762
- return createCommand_default(function() {
246763
- that.tile = that.tile.southeastChild;
246764
- });
246765
- }
246766
- },
246767
- /**
246768
- * Gets or sets the current selected primitive
246769
- * @memberof CesiumInspectorViewModel.prototype
246770
- *
246771
- * @type {Command}
246772
- */
246773
- primitive: {
246774
- get: function() {
246775
- return this._primitive;
246776
- },
246777
- set: function(newPrimitive) {
246778
- const oldPrimitive = this._primitive;
246779
- if (newPrimitive !== oldPrimitive) {
246780
- this.hasPickedPrimitive = true;
246781
- if (defined_default(oldPrimitive)) {
246782
- oldPrimitive.debugShowBoundingVolume = false;
246783
- }
246784
- this._scene.debugCommandFilter = void 0;
246785
- if (defined_default(this._modelMatrixPrimitive)) {
246786
- this._scene.primitives.remove(this._modelMatrixPrimitive);
246787
- this._modelMatrixPrimitive = void 0;
246788
- }
246789
- this._primitive = newPrimitive;
246790
- newPrimitive.show = false;
246791
- setTimeout(function() {
246792
- newPrimitive.show = true;
246793
- }, 50);
246794
- this.showPrimitiveBoundingSphere();
246795
- this.showPrimitiveReferenceFrame();
246796
- this.doFilterPrimitive();
246797
- }
246798
- }
246799
- },
246800
- /**
246801
- * Gets or sets the current selected tile
246802
- * @memberof CesiumInspectorViewModel.prototype
246803
- *
246804
- * @type {Command}
246805
- */
246806
- tile: {
246807
- get: function() {
246808
- return this._tile;
246809
- },
246810
- set: function(newTile) {
246811
- if (defined_default(newTile)) {
246812
- this.hasPickedTile = true;
246813
- const oldTile = this._tile;
246814
- if (newTile !== oldTile) {
246815
- this.tileText = `L: ${newTile.level} X: ${newTile.x} Y: ${newTile.y}`;
246816
- this.tileText += `<br>SW corner: ${newTile.rectangle.west}, ${newTile.rectangle.south}`;
246817
- this.tileText += `<br>NE corner: ${newTile.rectangle.east}, ${newTile.rectangle.north}`;
246818
- const data = newTile.data;
246819
- if (defined_default(data) && defined_default(data.tileBoundingRegion)) {
246820
- this.tileText += `<br>Min: ${data.tileBoundingRegion.minimumHeight} Max: ${data.tileBoundingRegion.maximumHeight}`;
246821
- } else {
246822
- this.tileText += "<br>(Tile is not loaded)";
246823
- }
246824
- }
246825
- this._tile = newTile;
246826
- this.showTileBoundingSphere();
246827
- this.doFilterTile();
246828
- } else {
246829
- this.hasPickedTile = false;
246830
- this._tile = void 0;
246831
- }
246832
- }
246833
- }
246834
- });
246835
- CesiumInspectorViewModel.prototype._update = function() {
246836
- if (this.frustums) {
246837
- this.frustumStatisticText = frustumStatisticsToString(
246838
- this._scene.debugFrustumStatistics
246839
- );
246840
- }
246841
- const numberOfFrustums = this._scene.numberOfFrustums;
246842
- this._numberOfFrustums = numberOfFrustums;
246843
- this.depthFrustum = boundDepthFrustum(1, numberOfFrustums, this.depthFrustum);
246844
- this.depthFrustumText = `${this.depthFrustum} of ${numberOfFrustums}`;
246845
- if (this.performance) {
246846
- this._performanceDisplay.update();
246847
- }
246848
- if (this.primitiveReferenceFrame) {
246849
- this._modelMatrixPrimitive.modelMatrix = this._primitive.modelMatrix;
246850
- }
246851
- this.shaderCacheText = `Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`;
246852
- };
246853
- CesiumInspectorViewModel.prototype.isDestroyed = function() {
246854
- return false;
246855
- };
246856
- CesiumInspectorViewModel.prototype.destroy = function() {
246857
- this._eventHandler.destroy();
246858
- this._removePostRenderEvent();
246859
- this._frustumsSubscription.dispose();
246860
- this._frustumPlanesSubscription.dispose();
246861
- this._performanceSubscription.dispose();
246862
- this._primitiveBoundingSphereSubscription.dispose();
246863
- this._primitiveReferenceFrameSubscription.dispose();
246864
- this._filterPrimitiveSubscription.dispose();
246865
- this._wireframeSubscription.dispose();
246866
- this._depthFrustumSubscription.dispose();
246867
- this._suspendUpdatesSubscription.dispose();
246868
- this._tileCoordinatesSubscription.dispose();
246869
- this._tileBoundingSphereSubscription.dispose();
246870
- this._filterTileSubscription.dispose();
246871
- this._pickPrimitiveActiveSubscription.dispose();
246872
- this._pickTileActiveSubscription.dispose();
246873
- return destroyObject_default(this);
246874
- };
246875
- var CesiumInspectorViewModel_default = CesiumInspectorViewModel;
246876
-
246877
- // packages/widgets/Source/CesiumInspector/CesiumInspector.js
246878
- function CesiumInspector(container, scene) {
246879
- if (!defined_default(container)) {
246880
- throw new DeveloperError_default("container is required.");
246881
- }
246882
- if (!defined_default(scene)) {
246883
- throw new DeveloperError_default("scene is required.");
246884
- }
246885
- container = getElement_default(container);
246886
- const performanceContainer = document.createElement("div");
246887
- const viewModel = new CesiumInspectorViewModel_default(scene, performanceContainer);
246888
- this._viewModel = viewModel;
246889
- this._container = container;
246890
- const element = document.createElement("div");
246891
- this._element = element;
246892
- const text2 = document.createElement("div");
246893
- text2.textContent = "Cesium Inspector";
246894
- text2.className = "cesium-cesiumInspector-button";
246895
- text2.setAttribute("data-bind", "click: toggleDropDown");
246896
- element.appendChild(text2);
246897
- element.className = "cesium-cesiumInspector";
246898
- element.setAttribute(
246899
- "data-bind",
246900
- 'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'
246901
- );
246902
- container.appendChild(this._element);
246903
- const panel = document.createElement("div");
246904
- panel.className = "cesium-cesiumInspector-dropDown";
246905
- element.appendChild(panel);
246906
- const createSection = InspectorShared_default.createSection;
246907
- const createCheckbox = InspectorShared_default.createCheckbox;
246908
- const generalSection = createSection(
246909
- panel,
246910
- "General",
246911
- "generalVisible",
246912
- "toggleGeneral"
246913
- );
246914
- const debugShowFrustums = createCheckbox("Show Frustums", "frustums");
246915
- const frustumStatistics = document.createElement("div");
246916
- frustumStatistics.className = "cesium-cesiumInspector-frustumStatistics";
246917
- frustumStatistics.setAttribute(
246918
- "data-bind",
246919
- "visible: frustums, html: frustumStatisticText"
246920
- );
246921
- debugShowFrustums.appendChild(frustumStatistics);
246922
- generalSection.appendChild(debugShowFrustums);
246923
- generalSection.appendChild(
246924
- createCheckbox("Show Frustum Planes", "frustumPlanes")
246925
- );
246926
- generalSection.appendChild(
246927
- createCheckbox("Performance Display", "performance")
246928
- );
246929
- performanceContainer.className = "cesium-cesiumInspector-performanceDisplay";
246930
- generalSection.appendChild(performanceContainer);
246931
- const shaderCacheDisplay = document.createElement("div");
246932
- shaderCacheDisplay.className = "cesium-cesiumInspector-shaderCache";
246933
- shaderCacheDisplay.setAttribute("data-bind", "html: shaderCacheText");
246934
- generalSection.appendChild(shaderCacheDisplay);
246935
- const depthFrustum = document.createElement("div");
246936
- generalSection.appendChild(depthFrustum);
246937
- const gLabel = document.createElement("span");
246938
- gLabel.setAttribute(
246939
- "data-bind",
246940
- 'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'
246941
- );
246942
- depthFrustum.appendChild(gLabel);
246943
- const gText = document.createElement("span");
246944
- gText.setAttribute("data-bind", "text: depthFrustumText");
246945
- depthFrustum.appendChild(gText);
246946
- const gMinusButton = document.createElement("input");
246947
- gMinusButton.type = "button";
246948
- gMinusButton.value = "-";
246949
- gMinusButton.className = "cesium-cesiumInspector-pickButton";
246950
- gMinusButton.setAttribute("data-bind", "click: decrementDepthFrustum");
246951
- depthFrustum.appendChild(gMinusButton);
246952
- const gPlusButton = document.createElement("input");
246953
- gPlusButton.type = "button";
246954
- gPlusButton.value = "+";
246955
- gPlusButton.className = "cesium-cesiumInspector-pickButton";
246956
- gPlusButton.setAttribute("data-bind", "click: incrementDepthFrustum");
246957
- depthFrustum.appendChild(gPlusButton);
246958
- const primSection = createSection(
246959
- panel,
246960
- "Primitives",
246961
- "primitivesVisible",
246962
- "togglePrimitives"
246963
- );
246964
- const pickPrimRequired = document.createElement("div");
246965
- pickPrimRequired.className = "cesium-cesiumInspector-pickSection";
246966
- primSection.appendChild(pickPrimRequired);
246967
- const pickPrimitiveButton = document.createElement("input");
246968
- pickPrimitiveButton.type = "button";
246969
- pickPrimitiveButton.value = "Pick a primitive";
246970
- pickPrimitiveButton.className = "cesium-cesiumInspector-pickButton";
246971
- pickPrimitiveButton.setAttribute(
246972
- "data-bind",
246973
- 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive'
246974
- );
246975
- let buttonWrap = document.createElement("div");
246976
- buttonWrap.className = "cesium-cesiumInspector-center";
246977
- buttonWrap.appendChild(pickPrimitiveButton);
246978
- pickPrimRequired.appendChild(buttonWrap);
246979
- pickPrimRequired.appendChild(
246980
- createCheckbox(
246981
- "Show bounding sphere",
246982
- "primitiveBoundingSphere",
246983
- "hasPickedPrimitive"
246984
- )
246985
- );
246986
- pickPrimRequired.appendChild(
246987
- createCheckbox(
246988
- "Show reference frame",
246989
- "primitiveReferenceFrame",
246990
- "hasPickedPrimitive"
246991
- )
246992
- );
246993
- this._primitiveOnly = createCheckbox(
246994
- "Show only selected",
246995
- "filterPrimitive",
246996
- "hasPickedPrimitive"
246997
- );
246998
- pickPrimRequired.appendChild(this._primitiveOnly);
246999
- const terrainSection = createSection(
247000
- panel,
247001
- "Terrain",
247002
- "terrainVisible",
247003
- "toggleTerrain"
247004
- );
247005
- const pickTileRequired = document.createElement("div");
247006
- pickTileRequired.className = "cesium-cesiumInspector-pickSection";
247007
- terrainSection.appendChild(pickTileRequired);
247008
- const pickTileButton = document.createElement("input");
247009
- pickTileButton.type = "button";
247010
- pickTileButton.value = "Pick a tile";
247011
- pickTileButton.className = "cesium-cesiumInspector-pickButton";
247012
- pickTileButton.setAttribute(
247013
- "data-bind",
247014
- 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'
247015
- );
247016
- buttonWrap = document.createElement("div");
247017
- buttonWrap.appendChild(pickTileButton);
247018
- buttonWrap.className = "cesium-cesiumInspector-center";
247019
- pickTileRequired.appendChild(buttonWrap);
247020
- const tileInfo = document.createElement("div");
247021
- pickTileRequired.appendChild(tileInfo);
247022
- const parentTile = document.createElement("input");
247023
- parentTile.type = "button";
247024
- parentTile.value = "Parent";
247025
- parentTile.className = "cesium-cesiumInspector-pickButton";
247026
- parentTile.setAttribute("data-bind", "click: selectParent");
247027
- const nwTile = document.createElement("input");
247028
- nwTile.type = "button";
247029
- nwTile.value = "NW";
247030
- nwTile.className = "cesium-cesiumInspector-pickButton";
247031
- nwTile.setAttribute("data-bind", "click: selectNW");
247032
- const neTile = document.createElement("input");
247033
- neTile.type = "button";
247034
- neTile.value = "NE";
247035
- neTile.className = "cesium-cesiumInspector-pickButton";
247036
- neTile.setAttribute("data-bind", "click: selectNE");
247037
- const swTile = document.createElement("input");
247038
- swTile.type = "button";
247039
- swTile.value = "SW";
247040
- swTile.className = "cesium-cesiumInspector-pickButton";
247041
- swTile.setAttribute("data-bind", "click: selectSW");
247042
- const seTile = document.createElement("input");
247043
- seTile.type = "button";
247044
- seTile.value = "SE";
247045
- seTile.className = "cesium-cesiumInspector-pickButton";
247046
- seTile.setAttribute("data-bind", "click: selectSE");
247047
- const tileText = document.createElement("div");
247048
- tileText.className = "cesium-cesiumInspector-tileText";
247049
- tileInfo.className = "cesium-cesiumInspector-frustumStatistics";
247050
- tileInfo.appendChild(tileText);
247051
- tileInfo.setAttribute("data-bind", "visible: hasPickedTile");
247052
- tileText.setAttribute("data-bind", "html: tileText");
247053
- const relativeText = document.createElement("div");
247054
- relativeText.className = "cesium-cesiumInspector-relativeText";
247055
- relativeText.textContent = "Select relative:";
247056
- tileInfo.appendChild(relativeText);
247057
- const table3 = document.createElement("table");
247058
- const tr1 = document.createElement("tr");
247059
- const tr2 = document.createElement("tr");
247060
- const td1 = document.createElement("td");
247061
- td1.appendChild(parentTile);
247062
- const td2 = document.createElement("td");
247063
- td2.appendChild(nwTile);
247064
- const td3 = document.createElement("td");
247065
- td3.appendChild(neTile);
247066
- tr1.appendChild(td1);
247067
- tr1.appendChild(td2);
247068
- tr1.appendChild(td3);
247069
- const td4 = document.createElement("td");
247070
- const td5 = document.createElement("td");
247071
- td5.appendChild(swTile);
247072
- const td6 = document.createElement("td");
247073
- td6.appendChild(seTile);
247074
- tr2.appendChild(td4);
247075
- tr2.appendChild(td5);
247076
- tr2.appendChild(td6);
247077
- table3.appendChild(tr1);
247078
- table3.appendChild(tr2);
247079
- tileInfo.appendChild(table3);
247080
- pickTileRequired.appendChild(
247081
- createCheckbox(
247082
- "Show bounding volume",
247083
- "tileBoundingSphere",
247084
- "hasPickedTile"
247085
- )
247086
- );
247087
- pickTileRequired.appendChild(
247088
- createCheckbox("Show only selected", "filterTile", "hasPickedTile")
247089
- );
247090
- terrainSection.appendChild(createCheckbox("Wireframe", "wireframe"));
247091
- terrainSection.appendChild(
247092
- createCheckbox("Suspend LOD update", "suspendUpdates")
247093
- );
247094
- terrainSection.appendChild(
247095
- createCheckbox("Show tile coordinates", "tileCoordinates")
247096
- );
247097
- knockout_default.applyBindings(viewModel, this._element);
247098
- }
247099
- Object.defineProperties(CesiumInspector.prototype, {
247100
- /**
247101
- * Gets the parent container.
247102
- * @memberof CesiumInspector.prototype
247103
- *
247104
- * @type {Element}
247105
- */
247106
- container: {
247107
- get: function() {
247108
- return this._container;
247109
- }
247110
- },
247111
- /**
247112
- * Gets the view model.
247113
- * @memberof CesiumInspector.prototype
247114
- *
247115
- * @type {CesiumInspectorViewModel}
247116
- */
247117
- viewModel: {
247118
- get: function() {
247119
- return this._viewModel;
247120
- }
247121
- }
247122
- });
247123
- CesiumInspector.prototype.isDestroyed = function() {
247124
- return false;
247125
- };
247126
- CesiumInspector.prototype.destroy = function() {
247127
- knockout_default.cleanNode(this._element);
247128
- this._container.removeChild(this._element);
247129
- this.viewModel.destroy();
247130
- return destroyObject_default(this);
247131
- };
247132
- var CesiumInspector_default = CesiumInspector;
247133
-
247134
246201
  // packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspectorViewModel.js
247135
246202
  function getPickTileset(viewModel) {
247136
246203
  return function(e) {
@@ -248534,6 +247601,1053 @@ Cesium3DTilesInspector.prototype.destroy = function() {
248534
247601
  };
248535
247602
  var Cesium3DTilesInspector_default = Cesium3DTilesInspector;
248536
247603
 
247604
+ // packages/widgets/Source/CesiumInspector/CesiumInspectorViewModel.js
247605
+ function frustumStatisticsToString(statistics2) {
247606
+ let str;
247607
+ if (defined_default(statistics2)) {
247608
+ str = "Command Statistics";
247609
+ const com = statistics2.commandsInFrustums;
247610
+ for (const n in com) {
247611
+ if (com.hasOwnProperty(n)) {
247612
+ let num = parseInt(n, 10);
247613
+ let s;
247614
+ if (num === 7) {
247615
+ s = "1, 2 and 3";
247616
+ } else {
247617
+ const f = [];
247618
+ for (let i = 2; i >= 0; i--) {
247619
+ const p = Math.pow(2, i);
247620
+ if (num >= p) {
247621
+ f.push(i + 1);
247622
+ num -= p;
247623
+ }
247624
+ }
247625
+ s = f.reverse().join(" and ");
247626
+ }
247627
+ str += `<br>&nbsp;&nbsp;&nbsp;&nbsp;${com[n]} in frustum ${s}`;
247628
+ }
247629
+ }
247630
+ str += `<br>Total: ${statistics2.totalCommands}`;
247631
+ }
247632
+ return str;
247633
+ }
247634
+ function boundDepthFrustum(lower, upper, proposed) {
247635
+ let bounded = Math.min(proposed, upper);
247636
+ bounded = Math.max(bounded, lower);
247637
+ return bounded;
247638
+ }
247639
+ var scratchPickRay2 = new Ray_default();
247640
+ var scratchPickCartesian3 = new Cartesian3_default();
247641
+ function CesiumInspectorViewModel(scene, performanceContainer) {
247642
+ if (!defined_default(scene)) {
247643
+ throw new DeveloperError_default("scene is required");
247644
+ }
247645
+ if (!defined_default(performanceContainer)) {
247646
+ throw new DeveloperError_default("performanceContainer is required");
247647
+ }
247648
+ const that = this;
247649
+ const canvas = scene.canvas;
247650
+ const eventHandler = new ScreenSpaceEventHandler_default(canvas);
247651
+ this._eventHandler = eventHandler;
247652
+ this._scene = scene;
247653
+ this._canvas = canvas;
247654
+ this._primitive = void 0;
247655
+ this._tile = void 0;
247656
+ this._modelMatrixPrimitive = void 0;
247657
+ this._performanceDisplay = void 0;
247658
+ this._performanceContainer = performanceContainer;
247659
+ const globe = this._scene.globe;
247660
+ globe.depthTestAgainstTerrain = true;
247661
+ this.frustums = false;
247662
+ this.frustumPlanes = false;
247663
+ this.performance = false;
247664
+ this.shaderCacheText = "";
247665
+ this.primitiveBoundingSphere = false;
247666
+ this.primitiveReferenceFrame = false;
247667
+ this.filterPrimitive = false;
247668
+ this.tileBoundingSphere = false;
247669
+ this.filterTile = false;
247670
+ this.wireframe = false;
247671
+ this.depthFrustum = 1;
247672
+ this._numberOfFrustums = 1;
247673
+ this.suspendUpdates = false;
247674
+ this.tileCoordinates = false;
247675
+ this.frustumStatisticText = false;
247676
+ this.tileText = "";
247677
+ this.hasPickedPrimitive = false;
247678
+ this.hasPickedTile = false;
247679
+ this.pickPrimitiveActive = false;
247680
+ this.pickTileActive = false;
247681
+ this.dropDownVisible = true;
247682
+ this.generalVisible = true;
247683
+ this.primitivesVisible = false;
247684
+ this.terrainVisible = false;
247685
+ this.depthFrustumText = "";
247686
+ knockout_default.track(this, [
247687
+ "frustums",
247688
+ "frustumPlanes",
247689
+ "performance",
247690
+ "shaderCacheText",
247691
+ "primitiveBoundingSphere",
247692
+ "primitiveReferenceFrame",
247693
+ "filterPrimitive",
247694
+ "tileBoundingSphere",
247695
+ "filterTile",
247696
+ "wireframe",
247697
+ "depthFrustum",
247698
+ "suspendUpdates",
247699
+ "tileCoordinates",
247700
+ "frustumStatisticText",
247701
+ "tileText",
247702
+ "hasPickedPrimitive",
247703
+ "hasPickedTile",
247704
+ "pickPrimitiveActive",
247705
+ "pickTileActive",
247706
+ "dropDownVisible",
247707
+ "generalVisible",
247708
+ "primitivesVisible",
247709
+ "terrainVisible",
247710
+ "depthFrustumText"
247711
+ ]);
247712
+ this._toggleDropDown = createCommand_default(function() {
247713
+ that.dropDownVisible = !that.dropDownVisible;
247714
+ });
247715
+ this._toggleGeneral = createCommand_default(function() {
247716
+ that.generalVisible = !that.generalVisible;
247717
+ });
247718
+ this._togglePrimitives = createCommand_default(function() {
247719
+ that.primitivesVisible = !that.primitivesVisible;
247720
+ });
247721
+ this._toggleTerrain = createCommand_default(function() {
247722
+ that.terrainVisible = !that.terrainVisible;
247723
+ });
247724
+ this._frustumsSubscription = knockout_default.getObservable(this, "frustums").subscribe(function(val) {
247725
+ that._scene.debugShowFrustums = val;
247726
+ that._scene.requestRender();
247727
+ });
247728
+ this._frustumPlanesSubscription = knockout_default.getObservable(this, "frustumPlanes").subscribe(function(val) {
247729
+ that._scene.debugShowFrustumPlanes = val;
247730
+ that._scene.requestRender();
247731
+ });
247732
+ this._performanceSubscription = knockout_default.getObservable(this, "performance").subscribe(function(val) {
247733
+ if (val) {
247734
+ that._performanceDisplay = new PerformanceDisplay_default({
247735
+ container: that._performanceContainer
247736
+ });
247737
+ } else {
247738
+ that._performanceContainer.innerHTML = "";
247739
+ }
247740
+ });
247741
+ this._showPrimitiveBoundingSphere = createCommand_default(function() {
247742
+ that._primitive.debugShowBoundingVolume = that.primitiveBoundingSphere;
247743
+ that._scene.requestRender();
247744
+ return true;
247745
+ });
247746
+ this._primitiveBoundingSphereSubscription = knockout_default.getObservable(this, "primitiveBoundingSphere").subscribe(function() {
247747
+ that._showPrimitiveBoundingSphere();
247748
+ });
247749
+ this._showPrimitiveReferenceFrame = createCommand_default(function() {
247750
+ if (that.primitiveReferenceFrame) {
247751
+ const modelMatrix = that._primitive.modelMatrix;
247752
+ that._modelMatrixPrimitive = new DebugModelMatrixPrimitive_default({
247753
+ modelMatrix
247754
+ });
247755
+ that._scene.primitives.add(that._modelMatrixPrimitive);
247756
+ } else if (defined_default(that._modelMatrixPrimitive)) {
247757
+ that._scene.primitives.remove(that._modelMatrixPrimitive);
247758
+ that._modelMatrixPrimitive = void 0;
247759
+ }
247760
+ that._scene.requestRender();
247761
+ return true;
247762
+ });
247763
+ this._primitiveReferenceFrameSubscription = knockout_default.getObservable(this, "primitiveReferenceFrame").subscribe(function() {
247764
+ that._showPrimitiveReferenceFrame();
247765
+ });
247766
+ this._doFilterPrimitive = createCommand_default(function() {
247767
+ if (that.filterPrimitive) {
247768
+ that._scene.debugCommandFilter = function(command) {
247769
+ if (defined_default(that._modelMatrixPrimitive) && command.owner === that._modelMatrixPrimitive._primitive) {
247770
+ return true;
247771
+ } else if (defined_default(that._primitive)) {
247772
+ return command.owner === that._primitive || command.owner === that._primitive._billboardCollection || command.owner.primitive === that._primitive;
247773
+ }
247774
+ return false;
247775
+ };
247776
+ } else {
247777
+ that._scene.debugCommandFilter = void 0;
247778
+ }
247779
+ return true;
247780
+ });
247781
+ this._filterPrimitiveSubscription = knockout_default.getObservable(this, "filterPrimitive").subscribe(function() {
247782
+ that._doFilterPrimitive();
247783
+ that._scene.requestRender();
247784
+ });
247785
+ this._wireframeSubscription = knockout_default.getObservable(this, "wireframe").subscribe(function(val) {
247786
+ globe._surface.tileProvider._debug.wireframe = val;
247787
+ that._scene.requestRender();
247788
+ });
247789
+ this._depthFrustumSubscription = knockout_default.getObservable(this, "depthFrustum").subscribe(function(val) {
247790
+ that._scene.debugShowDepthFrustum = val;
247791
+ that._scene.requestRender();
247792
+ });
247793
+ this._incrementDepthFrustum = createCommand_default(function() {
247794
+ const next = that.depthFrustum + 1;
247795
+ that.depthFrustum = boundDepthFrustum(1, that._numberOfFrustums, next);
247796
+ that._scene.requestRender();
247797
+ return true;
247798
+ });
247799
+ this._decrementDepthFrustum = createCommand_default(function() {
247800
+ const next = that.depthFrustum - 1;
247801
+ that.depthFrustum = boundDepthFrustum(1, that._numberOfFrustums, next);
247802
+ that._scene.requestRender();
247803
+ return true;
247804
+ });
247805
+ this._suspendUpdatesSubscription = knockout_default.getObservable(this, "suspendUpdates").subscribe(function(val) {
247806
+ globe._surface._debug.suspendLodUpdate = val;
247807
+ if (!val) {
247808
+ that.filterTile = false;
247809
+ }
247810
+ });
247811
+ let tileBoundariesLayer;
247812
+ this._showTileCoordinates = createCommand_default(function() {
247813
+ if (that.tileCoordinates && !defined_default(tileBoundariesLayer)) {
247814
+ tileBoundariesLayer = scene.imageryLayers.addImageryProvider(
247815
+ new TileCoordinatesImageryProvider_default({
247816
+ tilingScheme: scene.terrainProvider.tilingScheme
247817
+ })
247818
+ );
247819
+ } else if (!that.tileCoordinates && defined_default(tileBoundariesLayer)) {
247820
+ scene.imageryLayers.remove(tileBoundariesLayer);
247821
+ tileBoundariesLayer = void 0;
247822
+ }
247823
+ return true;
247824
+ });
247825
+ this._tileCoordinatesSubscription = knockout_default.getObservable(this, "tileCoordinates").subscribe(function() {
247826
+ that._showTileCoordinates();
247827
+ that._scene.requestRender();
247828
+ });
247829
+ this._tileBoundingSphereSubscription = knockout_default.getObservable(this, "tileBoundingSphere").subscribe(function() {
247830
+ that._showTileBoundingSphere();
247831
+ that._scene.requestRender();
247832
+ });
247833
+ this._showTileBoundingSphere = createCommand_default(function() {
247834
+ if (that.tileBoundingSphere) {
247835
+ globe._surface.tileProvider._debug.boundingSphereTile = that._tile;
247836
+ } else {
247837
+ globe._surface.tileProvider._debug.boundingSphereTile = void 0;
247838
+ }
247839
+ that._scene.requestRender();
247840
+ return true;
247841
+ });
247842
+ this._doFilterTile = createCommand_default(function() {
247843
+ if (!that.filterTile) {
247844
+ that.suspendUpdates = false;
247845
+ } else {
247846
+ that.suspendUpdates = true;
247847
+ globe._surface._tilesToRender = [];
247848
+ if (defined_default(that._tile) && that._tile.renderable) {
247849
+ globe._surface._tilesToRender.push(that._tile);
247850
+ }
247851
+ }
247852
+ return true;
247853
+ });
247854
+ this._filterTileSubscription = knockout_default.getObservable(this, "filterTile").subscribe(function() {
247855
+ that.doFilterTile();
247856
+ that._scene.requestRender();
247857
+ });
247858
+ function pickPrimitive(e) {
247859
+ const newPick = that._scene.pick({
247860
+ x: e.position.x,
247861
+ y: e.position.y
247862
+ });
247863
+ if (defined_default(newPick)) {
247864
+ that.primitive = defined_default(newPick.collection) ? newPick.collection : newPick.primitive;
247865
+ }
247866
+ that._scene.requestRender();
247867
+ that.pickPrimitiveActive = false;
247868
+ }
247869
+ this._pickPrimitive = createCommand_default(function() {
247870
+ that.pickPrimitiveActive = !that.pickPrimitiveActive;
247871
+ });
247872
+ this._pickPrimitiveActiveSubscription = knockout_default.getObservable(this, "pickPrimitiveActive").subscribe(function(val) {
247873
+ if (val) {
247874
+ eventHandler.setInputAction(
247875
+ pickPrimitive,
247876
+ ScreenSpaceEventType_default.LEFT_CLICK
247877
+ );
247878
+ } else {
247879
+ eventHandler.removeInputAction(ScreenSpaceEventType_default.LEFT_CLICK);
247880
+ }
247881
+ });
247882
+ function selectTile(e) {
247883
+ let selectedTile;
247884
+ const ellipsoid = globe.ellipsoid;
247885
+ const ray = that._scene.camera.getPickRay(e.position, scratchPickRay2);
247886
+ const cartesian11 = globe.pick(ray, that._scene, scratchPickCartesian3);
247887
+ if (defined_default(cartesian11)) {
247888
+ const cartographic2 = ellipsoid.cartesianToCartographic(cartesian11);
247889
+ const tilesRendered = globe._surface.tileProvider._tilesToRenderByTextureCount;
247890
+ for (let textureCount = 0; !selectedTile && textureCount < tilesRendered.length; ++textureCount) {
247891
+ const tilesRenderedByTextureCount = tilesRendered[textureCount];
247892
+ if (!defined_default(tilesRenderedByTextureCount)) {
247893
+ continue;
247894
+ }
247895
+ for (let tileIndex = 0; !selectedTile && tileIndex < tilesRenderedByTextureCount.length; ++tileIndex) {
247896
+ const tile = tilesRenderedByTextureCount[tileIndex];
247897
+ if (Rectangle_default.contains(tile.rectangle, cartographic2)) {
247898
+ selectedTile = tile;
247899
+ }
247900
+ }
247901
+ }
247902
+ }
247903
+ that.tile = selectedTile;
247904
+ that.pickTileActive = false;
247905
+ }
247906
+ this._pickTile = createCommand_default(function() {
247907
+ that.pickTileActive = !that.pickTileActive;
247908
+ });
247909
+ this._pickTileActiveSubscription = knockout_default.getObservable(this, "pickTileActive").subscribe(function(val) {
247910
+ if (val) {
247911
+ eventHandler.setInputAction(
247912
+ selectTile,
247913
+ ScreenSpaceEventType_default.LEFT_CLICK
247914
+ );
247915
+ } else {
247916
+ eventHandler.removeInputAction(ScreenSpaceEventType_default.LEFT_CLICK);
247917
+ }
247918
+ });
247919
+ this._removePostRenderEvent = scene.postRender.addEventListener(function() {
247920
+ that._update();
247921
+ });
247922
+ }
247923
+ Object.defineProperties(CesiumInspectorViewModel.prototype, {
247924
+ /**
247925
+ * Gets the scene to control.
247926
+ * @memberof CesiumInspectorViewModel.prototype
247927
+ *
247928
+ * @type {Scene}
247929
+ */
247930
+ scene: {
247931
+ get: function() {
247932
+ return this._scene;
247933
+ }
247934
+ },
247935
+ /**
247936
+ * Gets the container of the PerformanceDisplay
247937
+ * @memberof CesiumInspectorViewModel.prototype
247938
+ *
247939
+ * @type {Element}
247940
+ */
247941
+ performanceContainer: {
247942
+ get: function() {
247943
+ return this._performanceContainer;
247944
+ }
247945
+ },
247946
+ /**
247947
+ * Gets the command to toggle the visibility of the drop down.
247948
+ * @memberof CesiumInspectorViewModel.prototype
247949
+ *
247950
+ * @type {Command}
247951
+ */
247952
+ toggleDropDown: {
247953
+ get: function() {
247954
+ return this._toggleDropDown;
247955
+ }
247956
+ },
247957
+ /**
247958
+ * Gets the command to toggle the visibility of a BoundingSphere for a primitive
247959
+ * @memberof CesiumInspectorViewModel.prototype
247960
+ *
247961
+ * @type {Command}
247962
+ */
247963
+ showPrimitiveBoundingSphere: {
247964
+ get: function() {
247965
+ return this._showPrimitiveBoundingSphere;
247966
+ }
247967
+ },
247968
+ /**
247969
+ * Gets the command to toggle the visibility of a {@link DebugModelMatrixPrimitive} for the model matrix of a primitive
247970
+ * @memberof CesiumInspectorViewModel.prototype
247971
+ *
247972
+ * @type {Command}
247973
+ */
247974
+ showPrimitiveReferenceFrame: {
247975
+ get: function() {
247976
+ return this._showPrimitiveReferenceFrame;
247977
+ }
247978
+ },
247979
+ /**
247980
+ * Gets the command to toggle a filter that renders only a selected primitive
247981
+ * @memberof CesiumInspectorViewModel.prototype
247982
+ *
247983
+ * @type {Command}
247984
+ */
247985
+ doFilterPrimitive: {
247986
+ get: function() {
247987
+ return this._doFilterPrimitive;
247988
+ }
247989
+ },
247990
+ /**
247991
+ * Gets the command to increment the depth frustum index to be shown
247992
+ * @memberof CesiumInspectorViewModel.prototype
247993
+ *
247994
+ * @type {Command}
247995
+ */
247996
+ incrementDepthFrustum: {
247997
+ get: function() {
247998
+ return this._incrementDepthFrustum;
247999
+ }
248000
+ },
248001
+ /**
248002
+ * Gets the command to decrement the depth frustum index to be shown
248003
+ * @memberof CesiumInspectorViewModel.prototype
248004
+ *
248005
+ * @type {Command}
248006
+ */
248007
+ decrementDepthFrustum: {
248008
+ get: function() {
248009
+ return this._decrementDepthFrustum;
248010
+ }
248011
+ },
248012
+ /**
248013
+ * Gets the command to toggle the visibility of tile coordinates
248014
+ * @memberof CesiumInspectorViewModel.prototype
248015
+ *
248016
+ * @type {Command}
248017
+ */
248018
+ showTileCoordinates: {
248019
+ get: function() {
248020
+ return this._showTileCoordinates;
248021
+ }
248022
+ },
248023
+ /**
248024
+ * Gets the command to toggle the visibility of a BoundingSphere for a selected tile
248025
+ * @memberof CesiumInspectorViewModel.prototype
248026
+ *
248027
+ * @type {Command}
248028
+ */
248029
+ showTileBoundingSphere: {
248030
+ get: function() {
248031
+ return this._showTileBoundingSphere;
248032
+ }
248033
+ },
248034
+ /**
248035
+ * Gets the command to toggle a filter that renders only a selected tile
248036
+ * @memberof CesiumInspectorViewModel.prototype
248037
+ *
248038
+ * @type {Command}
248039
+ */
248040
+ doFilterTile: {
248041
+ get: function() {
248042
+ return this._doFilterTile;
248043
+ }
248044
+ },
248045
+ /**
248046
+ * Gets the command to expand and collapse the general section
248047
+ * @memberof CesiumInspectorViewModel.prototype
248048
+ *
248049
+ * @type {Command}
248050
+ */
248051
+ toggleGeneral: {
248052
+ get: function() {
248053
+ return this._toggleGeneral;
248054
+ }
248055
+ },
248056
+ /**
248057
+ * Gets the command to expand and collapse the primitives section
248058
+ * @memberof CesiumInspectorViewModel.prototype
248059
+ *
248060
+ * @type {Command}
248061
+ */
248062
+ togglePrimitives: {
248063
+ get: function() {
248064
+ return this._togglePrimitives;
248065
+ }
248066
+ },
248067
+ /**
248068
+ * Gets the command to expand and collapse the terrain section
248069
+ * @memberof CesiumInspectorViewModel.prototype
248070
+ *
248071
+ * @type {Command}
248072
+ */
248073
+ toggleTerrain: {
248074
+ get: function() {
248075
+ return this._toggleTerrain;
248076
+ }
248077
+ },
248078
+ /**
248079
+ * Gets the command to pick a primitive
248080
+ * @memberof CesiumInspectorViewModel.prototype
248081
+ *
248082
+ * @type {Command}
248083
+ */
248084
+ pickPrimitive: {
248085
+ get: function() {
248086
+ return this._pickPrimitive;
248087
+ }
248088
+ },
248089
+ /**
248090
+ * Gets the command to pick a tile
248091
+ * @memberof CesiumInspectorViewModel.prototype
248092
+ *
248093
+ * @type {Command}
248094
+ */
248095
+ pickTile: {
248096
+ get: function() {
248097
+ return this._pickTile;
248098
+ }
248099
+ },
248100
+ /**
248101
+ * Gets the command to pick a tile
248102
+ * @memberof CesiumInspectorViewModel.prototype
248103
+ *
248104
+ * @type {Command}
248105
+ */
248106
+ selectParent: {
248107
+ get: function() {
248108
+ const that = this;
248109
+ return createCommand_default(function() {
248110
+ that.tile = that.tile.parent;
248111
+ });
248112
+ }
248113
+ },
248114
+ /**
248115
+ * Gets the command to pick a tile
248116
+ * @memberof CesiumInspectorViewModel.prototype
248117
+ *
248118
+ * @type {Command}
248119
+ */
248120
+ selectNW: {
248121
+ get: function() {
248122
+ const that = this;
248123
+ return createCommand_default(function() {
248124
+ that.tile = that.tile.northwestChild;
248125
+ });
248126
+ }
248127
+ },
248128
+ /**
248129
+ * Gets the command to pick a tile
248130
+ * @memberof CesiumInspectorViewModel.prototype
248131
+ *
248132
+ * @type {Command}
248133
+ */
248134
+ selectNE: {
248135
+ get: function() {
248136
+ const that = this;
248137
+ return createCommand_default(function() {
248138
+ that.tile = that.tile.northeastChild;
248139
+ });
248140
+ }
248141
+ },
248142
+ /**
248143
+ * Gets the command to pick a tile
248144
+ * @memberof CesiumInspectorViewModel.prototype
248145
+ *
248146
+ * @type {Command}
248147
+ */
248148
+ selectSW: {
248149
+ get: function() {
248150
+ const that = this;
248151
+ return createCommand_default(function() {
248152
+ that.tile = that.tile.southwestChild;
248153
+ });
248154
+ }
248155
+ },
248156
+ /**
248157
+ * Gets the command to pick a tile
248158
+ * @memberof CesiumInspectorViewModel.prototype
248159
+ *
248160
+ * @type {Command}
248161
+ */
248162
+ selectSE: {
248163
+ get: function() {
248164
+ const that = this;
248165
+ return createCommand_default(function() {
248166
+ that.tile = that.tile.southeastChild;
248167
+ });
248168
+ }
248169
+ },
248170
+ /**
248171
+ * Gets or sets the current selected primitive
248172
+ * @memberof CesiumInspectorViewModel.prototype
248173
+ *
248174
+ * @type {Command}
248175
+ */
248176
+ primitive: {
248177
+ get: function() {
248178
+ return this._primitive;
248179
+ },
248180
+ set: function(newPrimitive) {
248181
+ const oldPrimitive = this._primitive;
248182
+ if (newPrimitive !== oldPrimitive) {
248183
+ this.hasPickedPrimitive = true;
248184
+ if (defined_default(oldPrimitive)) {
248185
+ oldPrimitive.debugShowBoundingVolume = false;
248186
+ }
248187
+ this._scene.debugCommandFilter = void 0;
248188
+ if (defined_default(this._modelMatrixPrimitive)) {
248189
+ this._scene.primitives.remove(this._modelMatrixPrimitive);
248190
+ this._modelMatrixPrimitive = void 0;
248191
+ }
248192
+ this._primitive = newPrimitive;
248193
+ newPrimitive.show = false;
248194
+ setTimeout(function() {
248195
+ newPrimitive.show = true;
248196
+ }, 50);
248197
+ this.showPrimitiveBoundingSphere();
248198
+ this.showPrimitiveReferenceFrame();
248199
+ this.doFilterPrimitive();
248200
+ }
248201
+ }
248202
+ },
248203
+ /**
248204
+ * Gets or sets the current selected tile
248205
+ * @memberof CesiumInspectorViewModel.prototype
248206
+ *
248207
+ * @type {Command}
248208
+ */
248209
+ tile: {
248210
+ get: function() {
248211
+ return this._tile;
248212
+ },
248213
+ set: function(newTile) {
248214
+ if (defined_default(newTile)) {
248215
+ this.hasPickedTile = true;
248216
+ const oldTile = this._tile;
248217
+ if (newTile !== oldTile) {
248218
+ this.tileText = `L: ${newTile.level} X: ${newTile.x} Y: ${newTile.y}`;
248219
+ this.tileText += `<br>SW corner: ${newTile.rectangle.west}, ${newTile.rectangle.south}`;
248220
+ this.tileText += `<br>NE corner: ${newTile.rectangle.east}, ${newTile.rectangle.north}`;
248221
+ const data = newTile.data;
248222
+ if (defined_default(data) && defined_default(data.tileBoundingRegion)) {
248223
+ this.tileText += `<br>Min: ${data.tileBoundingRegion.minimumHeight} Max: ${data.tileBoundingRegion.maximumHeight}`;
248224
+ } else {
248225
+ this.tileText += "<br>(Tile is not loaded)";
248226
+ }
248227
+ }
248228
+ this._tile = newTile;
248229
+ this.showTileBoundingSphere();
248230
+ this.doFilterTile();
248231
+ } else {
248232
+ this.hasPickedTile = false;
248233
+ this._tile = void 0;
248234
+ }
248235
+ }
248236
+ }
248237
+ });
248238
+ CesiumInspectorViewModel.prototype._update = function() {
248239
+ if (this.frustums) {
248240
+ this.frustumStatisticText = frustumStatisticsToString(
248241
+ this._scene.debugFrustumStatistics
248242
+ );
248243
+ }
248244
+ const numberOfFrustums = this._scene.numberOfFrustums;
248245
+ this._numberOfFrustums = numberOfFrustums;
248246
+ this.depthFrustum = boundDepthFrustum(1, numberOfFrustums, this.depthFrustum);
248247
+ this.depthFrustumText = `${this.depthFrustum} of ${numberOfFrustums}`;
248248
+ if (this.performance) {
248249
+ this._performanceDisplay.update();
248250
+ }
248251
+ if (this.primitiveReferenceFrame) {
248252
+ this._modelMatrixPrimitive.modelMatrix = this._primitive.modelMatrix;
248253
+ }
248254
+ this.shaderCacheText = `Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`;
248255
+ };
248256
+ CesiumInspectorViewModel.prototype.isDestroyed = function() {
248257
+ return false;
248258
+ };
248259
+ CesiumInspectorViewModel.prototype.destroy = function() {
248260
+ this._eventHandler.destroy();
248261
+ this._removePostRenderEvent();
248262
+ this._frustumsSubscription.dispose();
248263
+ this._frustumPlanesSubscription.dispose();
248264
+ this._performanceSubscription.dispose();
248265
+ this._primitiveBoundingSphereSubscription.dispose();
248266
+ this._primitiveReferenceFrameSubscription.dispose();
248267
+ this._filterPrimitiveSubscription.dispose();
248268
+ this._wireframeSubscription.dispose();
248269
+ this._depthFrustumSubscription.dispose();
248270
+ this._suspendUpdatesSubscription.dispose();
248271
+ this._tileCoordinatesSubscription.dispose();
248272
+ this._tileBoundingSphereSubscription.dispose();
248273
+ this._filterTileSubscription.dispose();
248274
+ this._pickPrimitiveActiveSubscription.dispose();
248275
+ this._pickTileActiveSubscription.dispose();
248276
+ return destroyObject_default(this);
248277
+ };
248278
+ var CesiumInspectorViewModel_default = CesiumInspectorViewModel;
248279
+
248280
+ // packages/widgets/Source/CesiumInspector/CesiumInspector.js
248281
+ function CesiumInspector(container, scene) {
248282
+ if (!defined_default(container)) {
248283
+ throw new DeveloperError_default("container is required.");
248284
+ }
248285
+ if (!defined_default(scene)) {
248286
+ throw new DeveloperError_default("scene is required.");
248287
+ }
248288
+ container = getElement_default(container);
248289
+ const performanceContainer = document.createElement("div");
248290
+ const viewModel = new CesiumInspectorViewModel_default(scene, performanceContainer);
248291
+ this._viewModel = viewModel;
248292
+ this._container = container;
248293
+ const element = document.createElement("div");
248294
+ this._element = element;
248295
+ const text2 = document.createElement("div");
248296
+ text2.textContent = "Cesium Inspector";
248297
+ text2.className = "cesium-cesiumInspector-button";
248298
+ text2.setAttribute("data-bind", "click: toggleDropDown");
248299
+ element.appendChild(text2);
248300
+ element.className = "cesium-cesiumInspector";
248301
+ element.setAttribute(
248302
+ "data-bind",
248303
+ 'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'
248304
+ );
248305
+ container.appendChild(this._element);
248306
+ const panel = document.createElement("div");
248307
+ panel.className = "cesium-cesiumInspector-dropDown";
248308
+ element.appendChild(panel);
248309
+ const createSection = InspectorShared_default.createSection;
248310
+ const createCheckbox = InspectorShared_default.createCheckbox;
248311
+ const generalSection = createSection(
248312
+ panel,
248313
+ "General",
248314
+ "generalVisible",
248315
+ "toggleGeneral"
248316
+ );
248317
+ const debugShowFrustums = createCheckbox("Show Frustums", "frustums");
248318
+ const frustumStatistics = document.createElement("div");
248319
+ frustumStatistics.className = "cesium-cesiumInspector-frustumStatistics";
248320
+ frustumStatistics.setAttribute(
248321
+ "data-bind",
248322
+ "visible: frustums, html: frustumStatisticText"
248323
+ );
248324
+ debugShowFrustums.appendChild(frustumStatistics);
248325
+ generalSection.appendChild(debugShowFrustums);
248326
+ generalSection.appendChild(
248327
+ createCheckbox("Show Frustum Planes", "frustumPlanes")
248328
+ );
248329
+ generalSection.appendChild(
248330
+ createCheckbox("Performance Display", "performance")
248331
+ );
248332
+ performanceContainer.className = "cesium-cesiumInspector-performanceDisplay";
248333
+ generalSection.appendChild(performanceContainer);
248334
+ const shaderCacheDisplay = document.createElement("div");
248335
+ shaderCacheDisplay.className = "cesium-cesiumInspector-shaderCache";
248336
+ shaderCacheDisplay.setAttribute("data-bind", "html: shaderCacheText");
248337
+ generalSection.appendChild(shaderCacheDisplay);
248338
+ const depthFrustum = document.createElement("div");
248339
+ generalSection.appendChild(depthFrustum);
248340
+ const gLabel = document.createElement("span");
248341
+ gLabel.setAttribute(
248342
+ "data-bind",
248343
+ 'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'
248344
+ );
248345
+ depthFrustum.appendChild(gLabel);
248346
+ const gText = document.createElement("span");
248347
+ gText.setAttribute("data-bind", "text: depthFrustumText");
248348
+ depthFrustum.appendChild(gText);
248349
+ const gMinusButton = document.createElement("input");
248350
+ gMinusButton.type = "button";
248351
+ gMinusButton.value = "-";
248352
+ gMinusButton.className = "cesium-cesiumInspector-pickButton";
248353
+ gMinusButton.setAttribute("data-bind", "click: decrementDepthFrustum");
248354
+ depthFrustum.appendChild(gMinusButton);
248355
+ const gPlusButton = document.createElement("input");
248356
+ gPlusButton.type = "button";
248357
+ gPlusButton.value = "+";
248358
+ gPlusButton.className = "cesium-cesiumInspector-pickButton";
248359
+ gPlusButton.setAttribute("data-bind", "click: incrementDepthFrustum");
248360
+ depthFrustum.appendChild(gPlusButton);
248361
+ const primSection = createSection(
248362
+ panel,
248363
+ "Primitives",
248364
+ "primitivesVisible",
248365
+ "togglePrimitives"
248366
+ );
248367
+ const pickPrimRequired = document.createElement("div");
248368
+ pickPrimRequired.className = "cesium-cesiumInspector-pickSection";
248369
+ primSection.appendChild(pickPrimRequired);
248370
+ const pickPrimitiveButton = document.createElement("input");
248371
+ pickPrimitiveButton.type = "button";
248372
+ pickPrimitiveButton.value = "Pick a primitive";
248373
+ pickPrimitiveButton.className = "cesium-cesiumInspector-pickButton";
248374
+ pickPrimitiveButton.setAttribute(
248375
+ "data-bind",
248376
+ 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive'
248377
+ );
248378
+ let buttonWrap = document.createElement("div");
248379
+ buttonWrap.className = "cesium-cesiumInspector-center";
248380
+ buttonWrap.appendChild(pickPrimitiveButton);
248381
+ pickPrimRequired.appendChild(buttonWrap);
248382
+ pickPrimRequired.appendChild(
248383
+ createCheckbox(
248384
+ "Show bounding sphere",
248385
+ "primitiveBoundingSphere",
248386
+ "hasPickedPrimitive"
248387
+ )
248388
+ );
248389
+ pickPrimRequired.appendChild(
248390
+ createCheckbox(
248391
+ "Show reference frame",
248392
+ "primitiveReferenceFrame",
248393
+ "hasPickedPrimitive"
248394
+ )
248395
+ );
248396
+ this._primitiveOnly = createCheckbox(
248397
+ "Show only selected",
248398
+ "filterPrimitive",
248399
+ "hasPickedPrimitive"
248400
+ );
248401
+ pickPrimRequired.appendChild(this._primitiveOnly);
248402
+ const terrainSection = createSection(
248403
+ panel,
248404
+ "Terrain",
248405
+ "terrainVisible",
248406
+ "toggleTerrain"
248407
+ );
248408
+ const pickTileRequired = document.createElement("div");
248409
+ pickTileRequired.className = "cesium-cesiumInspector-pickSection";
248410
+ terrainSection.appendChild(pickTileRequired);
248411
+ const pickTileButton = document.createElement("input");
248412
+ pickTileButton.type = "button";
248413
+ pickTileButton.value = "Pick a tile";
248414
+ pickTileButton.className = "cesium-cesiumInspector-pickButton";
248415
+ pickTileButton.setAttribute(
248416
+ "data-bind",
248417
+ 'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'
248418
+ );
248419
+ buttonWrap = document.createElement("div");
248420
+ buttonWrap.appendChild(pickTileButton);
248421
+ buttonWrap.className = "cesium-cesiumInspector-center";
248422
+ pickTileRequired.appendChild(buttonWrap);
248423
+ const tileInfo = document.createElement("div");
248424
+ pickTileRequired.appendChild(tileInfo);
248425
+ const parentTile = document.createElement("input");
248426
+ parentTile.type = "button";
248427
+ parentTile.value = "Parent";
248428
+ parentTile.className = "cesium-cesiumInspector-pickButton";
248429
+ parentTile.setAttribute("data-bind", "click: selectParent");
248430
+ const nwTile = document.createElement("input");
248431
+ nwTile.type = "button";
248432
+ nwTile.value = "NW";
248433
+ nwTile.className = "cesium-cesiumInspector-pickButton";
248434
+ nwTile.setAttribute("data-bind", "click: selectNW");
248435
+ const neTile = document.createElement("input");
248436
+ neTile.type = "button";
248437
+ neTile.value = "NE";
248438
+ neTile.className = "cesium-cesiumInspector-pickButton";
248439
+ neTile.setAttribute("data-bind", "click: selectNE");
248440
+ const swTile = document.createElement("input");
248441
+ swTile.type = "button";
248442
+ swTile.value = "SW";
248443
+ swTile.className = "cesium-cesiumInspector-pickButton";
248444
+ swTile.setAttribute("data-bind", "click: selectSW");
248445
+ const seTile = document.createElement("input");
248446
+ seTile.type = "button";
248447
+ seTile.value = "SE";
248448
+ seTile.className = "cesium-cesiumInspector-pickButton";
248449
+ seTile.setAttribute("data-bind", "click: selectSE");
248450
+ const tileText = document.createElement("div");
248451
+ tileText.className = "cesium-cesiumInspector-tileText";
248452
+ tileInfo.className = "cesium-cesiumInspector-frustumStatistics";
248453
+ tileInfo.appendChild(tileText);
248454
+ tileInfo.setAttribute("data-bind", "visible: hasPickedTile");
248455
+ tileText.setAttribute("data-bind", "html: tileText");
248456
+ const relativeText = document.createElement("div");
248457
+ relativeText.className = "cesium-cesiumInspector-relativeText";
248458
+ relativeText.textContent = "Select relative:";
248459
+ tileInfo.appendChild(relativeText);
248460
+ const table3 = document.createElement("table");
248461
+ const tr1 = document.createElement("tr");
248462
+ const tr2 = document.createElement("tr");
248463
+ const td1 = document.createElement("td");
248464
+ td1.appendChild(parentTile);
248465
+ const td2 = document.createElement("td");
248466
+ td2.appendChild(nwTile);
248467
+ const td3 = document.createElement("td");
248468
+ td3.appendChild(neTile);
248469
+ tr1.appendChild(td1);
248470
+ tr1.appendChild(td2);
248471
+ tr1.appendChild(td3);
248472
+ const td4 = document.createElement("td");
248473
+ const td5 = document.createElement("td");
248474
+ td5.appendChild(swTile);
248475
+ const td6 = document.createElement("td");
248476
+ td6.appendChild(seTile);
248477
+ tr2.appendChild(td4);
248478
+ tr2.appendChild(td5);
248479
+ tr2.appendChild(td6);
248480
+ table3.appendChild(tr1);
248481
+ table3.appendChild(tr2);
248482
+ tileInfo.appendChild(table3);
248483
+ pickTileRequired.appendChild(
248484
+ createCheckbox(
248485
+ "Show bounding volume",
248486
+ "tileBoundingSphere",
248487
+ "hasPickedTile"
248488
+ )
248489
+ );
248490
+ pickTileRequired.appendChild(
248491
+ createCheckbox("Show only selected", "filterTile", "hasPickedTile")
248492
+ );
248493
+ terrainSection.appendChild(createCheckbox("Wireframe", "wireframe"));
248494
+ terrainSection.appendChild(
248495
+ createCheckbox("Suspend LOD update", "suspendUpdates")
248496
+ );
248497
+ terrainSection.appendChild(
248498
+ createCheckbox("Show tile coordinates", "tileCoordinates")
248499
+ );
248500
+ knockout_default.applyBindings(viewModel, this._element);
248501
+ }
248502
+ Object.defineProperties(CesiumInspector.prototype, {
248503
+ /**
248504
+ * Gets the parent container.
248505
+ * @memberof CesiumInspector.prototype
248506
+ *
248507
+ * @type {Element}
248508
+ */
248509
+ container: {
248510
+ get: function() {
248511
+ return this._container;
248512
+ }
248513
+ },
248514
+ /**
248515
+ * Gets the view model.
248516
+ * @memberof CesiumInspector.prototype
248517
+ *
248518
+ * @type {CesiumInspectorViewModel}
248519
+ */
248520
+ viewModel: {
248521
+ get: function() {
248522
+ return this._viewModel;
248523
+ }
248524
+ }
248525
+ });
248526
+ CesiumInspector.prototype.isDestroyed = function() {
248527
+ return false;
248528
+ };
248529
+ CesiumInspector.prototype.destroy = function() {
248530
+ knockout_default.cleanNode(this._element);
248531
+ this._container.removeChild(this._element);
248532
+ this.viewModel.destroy();
248533
+ return destroyObject_default(this);
248534
+ };
248535
+ var CesiumInspector_default = CesiumInspector;
248536
+
248537
+ // packages/widgets/Source/HomeButton/HomeButtonViewModel.js
248538
+ function HomeButtonViewModel(scene, duration) {
248539
+ if (!defined_default(scene)) {
248540
+ throw new DeveloperError_default("scene is required.");
248541
+ }
248542
+ this._scene = scene;
248543
+ this._duration = duration;
248544
+ const that = this;
248545
+ this._command = createCommand_default(function() {
248546
+ that._scene.camera.flyHome(that._duration);
248547
+ });
248548
+ this.tooltip = "View Home";
248549
+ knockout_default.track(this, ["tooltip"]);
248550
+ }
248551
+ Object.defineProperties(HomeButtonViewModel.prototype, {
248552
+ /**
248553
+ * Gets the scene to control.
248554
+ * @memberof HomeButtonViewModel.prototype
248555
+ *
248556
+ * @type {Scene}
248557
+ */
248558
+ scene: {
248559
+ get: function() {
248560
+ return this._scene;
248561
+ }
248562
+ },
248563
+ /**
248564
+ * Gets the Command that is executed when the button is clicked.
248565
+ * @memberof HomeButtonViewModel.prototype
248566
+ *
248567
+ * @type {Command}
248568
+ */
248569
+ command: {
248570
+ get: function() {
248571
+ return this._command;
248572
+ }
248573
+ },
248574
+ /**
248575
+ * Gets or sets the the duration of the camera flight in seconds.
248576
+ * A value of zero causes the camera to instantly switch to home view.
248577
+ * The duration will be computed based on the distance when undefined.
248578
+ * @memberof HomeButtonViewModel.prototype
248579
+ *
248580
+ * @type {number|undefined}
248581
+ */
248582
+ duration: {
248583
+ get: function() {
248584
+ return this._duration;
248585
+ },
248586
+ set: function(value) {
248587
+ if (defined_default(value) && value < 0) {
248588
+ throw new DeveloperError_default("value must be positive.");
248589
+ }
248590
+ this._duration = value;
248591
+ }
248592
+ }
248593
+ });
248594
+ var HomeButtonViewModel_default = HomeButtonViewModel;
248595
+
248596
+ // packages/widgets/Source/HomeButton/HomeButton.js
248597
+ function HomeButton(container, scene, duration) {
248598
+ if (!defined_default(container)) {
248599
+ throw new DeveloperError_default("container is required.");
248600
+ }
248601
+ container = getElement_default(container);
248602
+ const viewModel = new HomeButtonViewModel_default(scene, duration);
248603
+ viewModel._svgPath = "M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";
248604
+ const element = document.createElement("button");
248605
+ element.type = "button";
248606
+ element.className = "cesium-button cesium-toolbar-button cesium-home-button";
248607
+ element.setAttribute(
248608
+ "data-bind",
248609
+ "attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"
248610
+ );
248611
+ container.appendChild(element);
248612
+ knockout_default.applyBindings(viewModel, element);
248613
+ this._container = container;
248614
+ this._viewModel = viewModel;
248615
+ this._element = element;
248616
+ }
248617
+ Object.defineProperties(HomeButton.prototype, {
248618
+ /**
248619
+ * Gets the parent container.
248620
+ * @memberof HomeButton.prototype
248621
+ *
248622
+ * @type {Element}
248623
+ */
248624
+ container: {
248625
+ get: function() {
248626
+ return this._container;
248627
+ }
248628
+ },
248629
+ /**
248630
+ * Gets the view model.
248631
+ * @memberof HomeButton.prototype
248632
+ *
248633
+ * @type {HomeButtonViewModel}
248634
+ */
248635
+ viewModel: {
248636
+ get: function() {
248637
+ return this._viewModel;
248638
+ }
248639
+ }
248640
+ });
248641
+ HomeButton.prototype.isDestroyed = function() {
248642
+ return false;
248643
+ };
248644
+ HomeButton.prototype.destroy = function() {
248645
+ knockout_default.cleanNode(this._element);
248646
+ this._container.removeChild(this._element);
248647
+ return destroyObject_default(this);
248648
+ };
248649
+ var HomeButton_default = HomeButton;
248650
+
248537
248651
  // packages/widgets/Source/FullscreenButton/FullscreenButtonViewModel.js
248538
248652
  function FullscreenButtonViewModel(fullscreenElement, container) {
248539
248653
  if (!defined_default(container)) {
@@ -248682,90 +248796,155 @@ FullscreenButton.prototype.destroy = function() {
248682
248796
  };
248683
248797
  var FullscreenButton_default = FullscreenButton;
248684
248798
 
248685
- // packages/widgets/Source/HomeButton/HomeButtonViewModel.js
248686
- function HomeButtonViewModel(scene, duration) {
248687
- if (!defined_default(scene)) {
248688
- throw new DeveloperError_default("scene is required.");
248689
- }
248690
- this._scene = scene;
248691
- this._duration = duration;
248692
- const that = this;
248693
- this._command = createCommand_default(function() {
248694
- that._scene.camera.flyHome(that._duration);
248799
+ // packages/widgets/Source/InfoBox/InfoBoxViewModel.js
248800
+ var cameraEnabledPath = "M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z";
248801
+ var cameraDisabledPath = "M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";
248802
+ function InfoBoxViewModel() {
248803
+ this._cameraClicked = new Event_default();
248804
+ this._closeClicked = new Event_default();
248805
+ this.maxHeight = 500;
248806
+ this.enableCamera = false;
248807
+ this.isCameraTracking = false;
248808
+ this.showInfo = false;
248809
+ this.titleText = "";
248810
+ this.description = "";
248811
+ knockout_default.track(this, [
248812
+ "showInfo",
248813
+ "titleText",
248814
+ "description",
248815
+ "maxHeight",
248816
+ "enableCamera",
248817
+ "isCameraTracking"
248818
+ ]);
248819
+ this._loadingIndicatorHtml = '<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>';
248820
+ this.cameraIconPath = void 0;
248821
+ knockout_default.defineProperty(this, "cameraIconPath", {
248822
+ get: function() {
248823
+ return !this.enableCamera || this.isCameraTracking ? cameraDisabledPath : cameraEnabledPath;
248824
+ }
248695
248825
  });
248696
- this.tooltip = "View Home";
248697
- knockout_default.track(this, ["tooltip"]);
248698
- }
248699
- Object.defineProperties(HomeButtonViewModel.prototype, {
248700
- /**
248701
- * Gets the scene to control.
248702
- * @memberof HomeButtonViewModel.prototype
248703
- *
248704
- * @type {Scene}
248705
- */
248706
- scene: {
248826
+ knockout_default.defineProperty(this, "_bodyless", {
248707
248827
  get: function() {
248708
- return this._scene;
248828
+ return !defined_default(this.description) || this.description.length === 0;
248709
248829
  }
248710
- },
248830
+ });
248831
+ }
248832
+ InfoBoxViewModel.prototype.maxHeightOffset = function(offset) {
248833
+ return `${this.maxHeight - offset}px`;
248834
+ };
248835
+ Object.defineProperties(InfoBoxViewModel.prototype, {
248711
248836
  /**
248712
- * Gets the Command that is executed when the button is clicked.
248713
- * @memberof HomeButtonViewModel.prototype
248714
- *
248715
- * @type {Command}
248837
+ * Gets an {@link Event} that is fired when the user clicks the camera icon.
248838
+ * @memberof InfoBoxViewModel.prototype
248839
+ * @type {Event}
248716
248840
  */
248717
- command: {
248841
+ cameraClicked: {
248718
248842
  get: function() {
248719
- return this._command;
248843
+ return this._cameraClicked;
248720
248844
  }
248721
248845
  },
248722
248846
  /**
248723
- * Gets or sets the the duration of the camera flight in seconds.
248724
- * A value of zero causes the camera to instantly switch to home view.
248725
- * The duration will be computed based on the distance when undefined.
248726
- * @memberof HomeButtonViewModel.prototype
248727
- *
248728
- * @type {number|undefined}
248847
+ * Gets an {@link Event} that is fired when the user closes the info box.
248848
+ * @memberof InfoBoxViewModel.prototype
248849
+ * @type {Event}
248729
248850
  */
248730
- duration: {
248851
+ closeClicked: {
248731
248852
  get: function() {
248732
- return this._duration;
248733
- },
248734
- set: function(value) {
248735
- if (defined_default(value) && value < 0) {
248736
- throw new DeveloperError_default("value must be positive.");
248737
- }
248738
- this._duration = value;
248853
+ return this._closeClicked;
248739
248854
  }
248740
248855
  }
248741
248856
  });
248742
- var HomeButtonViewModel_default = HomeButtonViewModel;
248857
+ var InfoBoxViewModel_default = InfoBoxViewModel;
248743
248858
 
248744
- // packages/widgets/Source/HomeButton/HomeButton.js
248745
- function HomeButton(container, scene, duration) {
248746
- if (!defined_default(container)) {
248747
- throw new DeveloperError_default("container is required.");
248748
- }
248859
+ // packages/widgets/Source/InfoBox/InfoBox.js
248860
+ function InfoBox(container) {
248861
+ Check_default.defined("container", container);
248749
248862
  container = getElement_default(container);
248750
- const viewModel = new HomeButtonViewModel_default(scene, duration);
248751
- viewModel._svgPath = "M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";
248752
- const element = document.createElement("button");
248753
- element.type = "button";
248754
- element.className = "cesium-button cesium-toolbar-button cesium-home-button";
248755
- element.setAttribute(
248863
+ const infoElement = document.createElement("div");
248864
+ infoElement.className = "cesium-infoBox";
248865
+ infoElement.setAttribute(
248756
248866
  "data-bind",
248757
- "attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"
248867
+ 'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'
248758
248868
  );
248759
- container.appendChild(element);
248760
- knockout_default.applyBindings(viewModel, element);
248869
+ container.appendChild(infoElement);
248870
+ const titleElement = document.createElement("div");
248871
+ titleElement.className = "cesium-infoBox-title";
248872
+ titleElement.setAttribute("data-bind", "text: titleText");
248873
+ infoElement.appendChild(titleElement);
248874
+ const cameraElement = document.createElement("button");
248875
+ cameraElement.type = "button";
248876
+ cameraElement.className = "cesium-button cesium-infoBox-camera";
248877
+ cameraElement.setAttribute(
248878
+ "data-bind",
248879
+ 'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'
248880
+ );
248881
+ infoElement.appendChild(cameraElement);
248882
+ const closeElement = document.createElement("button");
248883
+ closeElement.type = "button";
248884
+ closeElement.className = "cesium-infoBox-close";
248885
+ closeElement.setAttribute(
248886
+ "data-bind",
248887
+ "click: function () { closeClicked.raiseEvent(this); }"
248888
+ );
248889
+ closeElement.innerHTML = "&times;";
248890
+ infoElement.appendChild(closeElement);
248891
+ const frame = document.createElement("iframe");
248892
+ frame.className = "cesium-infoBox-iframe";
248893
+ frame.setAttribute("sandbox", "allow-same-origin allow-popups allow-forms");
248894
+ frame.setAttribute(
248895
+ "data-bind",
248896
+ "style : { maxHeight : maxHeightOffset(40) }"
248897
+ );
248898
+ frame.setAttribute("allowfullscreen", true);
248899
+ infoElement.appendChild(frame);
248900
+ const viewModel = new InfoBoxViewModel_default();
248901
+ knockout_default.applyBindings(viewModel, infoElement);
248761
248902
  this._container = container;
248903
+ this._element = infoElement;
248904
+ this._frame = frame;
248762
248905
  this._viewModel = viewModel;
248763
- this._element = element;
248906
+ this._descriptionSubscription = void 0;
248907
+ const that = this;
248908
+ frame.addEventListener("load", function() {
248909
+ const frameDocument = frame.contentDocument;
248910
+ const cssLink = frameDocument.createElement("link");
248911
+ cssLink.href = buildModuleUrl_default("Widgets/InfoBox/InfoBoxDescription.css");
248912
+ cssLink.rel = "stylesheet";
248913
+ cssLink.type = "text/css";
248914
+ const frameContent = frameDocument.createElement("div");
248915
+ frameContent.className = "cesium-infoBox-description";
248916
+ frameDocument.head.appendChild(cssLink);
248917
+ frameDocument.body.appendChild(frameContent);
248918
+ that._descriptionSubscription = subscribeAndEvaluate_default(
248919
+ viewModel,
248920
+ "description",
248921
+ function(value) {
248922
+ frame.style.height = "5px";
248923
+ frameContent.innerHTML = value;
248924
+ let background = null;
248925
+ const firstElementChild = frameContent.firstElementChild;
248926
+ if (firstElementChild !== null && frameContent.childNodes.length === 1) {
248927
+ const style = window.getComputedStyle(firstElementChild);
248928
+ if (style !== null) {
248929
+ const backgroundColor = style["background-color"];
248930
+ const color = Color_default.fromCssColorString(backgroundColor);
248931
+ if (defined_default(color) && color.alpha !== 0) {
248932
+ background = style["background-color"];
248933
+ }
248934
+ }
248935
+ }
248936
+ infoElement.style["background-color"] = background;
248937
+ const height = frameContent.getBoundingClientRect().height;
248938
+ frame.style.height = `${height}px`;
248939
+ }
248940
+ );
248941
+ });
248942
+ frame.setAttribute("src", "about:blank");
248764
248943
  }
248765
- Object.defineProperties(HomeButton.prototype, {
248944
+ Object.defineProperties(InfoBox.prototype, {
248766
248945
  /**
248767
248946
  * Gets the parent container.
248768
- * @memberof HomeButton.prototype
248947
+ * @memberof InfoBox.prototype
248769
248948
  *
248770
248949
  * @type {Element}
248771
248950
  */
@@ -248776,25 +248955,40 @@ Object.defineProperties(HomeButton.prototype, {
248776
248955
  },
248777
248956
  /**
248778
248957
  * Gets the view model.
248779
- * @memberof HomeButton.prototype
248958
+ * @memberof InfoBox.prototype
248780
248959
  *
248781
- * @type {HomeButtonViewModel}
248960
+ * @type {InfoBoxViewModel}
248782
248961
  */
248783
248962
  viewModel: {
248784
248963
  get: function() {
248785
248964
  return this._viewModel;
248786
248965
  }
248966
+ },
248967
+ /**
248968
+ * Gets the iframe used to display the description.
248969
+ * @memberof InfoBox.prototype
248970
+ *
248971
+ * @type {HTMLIFrameElement}
248972
+ */
248973
+ frame: {
248974
+ get: function() {
248975
+ return this._frame;
248976
+ }
248787
248977
  }
248788
248978
  });
248789
- HomeButton.prototype.isDestroyed = function() {
248979
+ InfoBox.prototype.isDestroyed = function() {
248790
248980
  return false;
248791
248981
  };
248792
- HomeButton.prototype.destroy = function() {
248982
+ InfoBox.prototype.destroy = function() {
248983
+ const container = this._container;
248793
248984
  knockout_default.cleanNode(this._element);
248794
- this._container.removeChild(this._element);
248985
+ container.removeChild(this._element);
248986
+ if (defined_default(this._descriptionSubscription)) {
248987
+ this._descriptionSubscription.dispose();
248988
+ }
248795
248989
  return destroyObject_default(this);
248796
248990
  };
248797
- var HomeButton_default = HomeButton;
248991
+ var InfoBox_default = InfoBox;
248798
248992
 
248799
248993
  // packages/widgets/Source/Geocoder/GeocoderViewModel.js
248800
248994
  var DEFAULT_HEIGHT = 1e3;
@@ -249214,737 +249408,101 @@ GeocoderViewModel.prototype.isDestroyed = function() {
249214
249408
  GeocoderViewModel.prototype.destroy = function() {
249215
249409
  clearCredits(this);
249216
249410
  return destroyObject_default(this);
249217
- };
249218
- var GeocoderViewModel_default = GeocoderViewModel;
249219
-
249220
- // packages/widgets/Source/Geocoder/Geocoder.js
249221
- var startSearchPath = "M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z";
249222
- var stopSearchPath = "M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";
249223
- function Geocoder(options) {
249224
- if (!defined_default(options) || !defined_default(options.container)) {
249225
- throw new DeveloperError_default("options.container is required.");
249226
- }
249227
- if (!defined_default(options.scene)) {
249228
- throw new DeveloperError_default("options.scene is required.");
249229
- }
249230
- const container = getElement_default(options.container);
249231
- const viewModel = new GeocoderViewModel_default(options);
249232
- viewModel._startSearchPath = startSearchPath;
249233
- viewModel._stopSearchPath = stopSearchPath;
249234
- const form = document.createElement("form");
249235
- form.setAttribute("data-bind", "submit: search");
249236
- const textBox = document.createElement("input");
249237
- textBox.type = "search";
249238
- textBox.className = "cesium-geocoder-input";
249239
- textBox.setAttribute("placeholder", "Enter an address or landmark...");
249240
- textBox.setAttribute(
249241
- "data-bind",
249242
- 'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'
249243
- );
249244
- this._onTextBoxFocus = function() {
249245
- setTimeout(function() {
249246
- textBox.select();
249247
- }, 0);
249248
- };
249249
- textBox.addEventListener("focus", this._onTextBoxFocus, false);
249250
- form.appendChild(textBox);
249251
- this._textBox = textBox;
249252
- const searchButton = document.createElement("span");
249253
- searchButton.className = "cesium-geocoder-searchButton";
249254
- searchButton.setAttribute(
249255
- "data-bind",
249256
- "click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"
249257
- );
249258
- form.appendChild(searchButton);
249259
- container.appendChild(form);
249260
- const searchSuggestionsContainer = document.createElement("div");
249261
- searchSuggestionsContainer.className = "search-results";
249262
- searchSuggestionsContainer.setAttribute(
249263
- "data-bind",
249264
- "visible: _suggestionsVisible"
249265
- );
249266
- const suggestionsList = document.createElement("ul");
249267
- suggestionsList.setAttribute("data-bind", "foreach: _suggestions");
249268
- const suggestions = document.createElement("li");
249269
- suggestionsList.appendChild(suggestions);
249270
- suggestions.setAttribute(
249271
- "data-bind",
249272
- "text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"
249273
- );
249274
- searchSuggestionsContainer.appendChild(suggestionsList);
249275
- container.appendChild(searchSuggestionsContainer);
249276
- knockout_default.applyBindings(viewModel, form);
249277
- knockout_default.applyBindings(viewModel, searchSuggestionsContainer);
249278
- this._container = container;
249279
- this._searchSuggestionsContainer = searchSuggestionsContainer;
249280
- this._viewModel = viewModel;
249281
- this._form = form;
249282
- this._onInputBegin = function(e) {
249283
- let target = e.target;
249284
- if (typeof e.composedPath === "function") {
249285
- target = e.composedPath()[0];
249286
- }
249287
- if (!container.contains(target)) {
249288
- viewModel._focusTextbox = false;
249289
- viewModel.hideSuggestions();
249290
- }
249291
- };
249292
- this._onInputEnd = function(e) {
249293
- viewModel._focusTextbox = true;
249294
- viewModel.showSuggestions();
249295
- };
249296
- if (FeatureDetection_default.supportsPointerEvents()) {
249297
- document.addEventListener("pointerdown", this._onInputBegin, true);
249298
- container.addEventListener("pointerup", this._onInputEnd, true);
249299
- container.addEventListener("pointercancel", this._onInputEnd, true);
249300
- } else {
249301
- document.addEventListener("mousedown", this._onInputBegin, true);
249302
- container.addEventListener("mouseup", this._onInputEnd, true);
249303
- document.addEventListener("touchstart", this._onInputBegin, true);
249304
- container.addEventListener("touchend", this._onInputEnd, true);
249305
- container.addEventListener("touchcancel", this._onInputEnd, true);
249306
- }
249307
- }
249308
- Object.defineProperties(Geocoder.prototype, {
249309
- /**
249310
- * Gets the parent container.
249311
- * @memberof Geocoder.prototype
249312
- *
249313
- * @type {Element}
249314
- */
249315
- container: {
249316
- get: function() {
249317
- return this._container;
249318
- }
249319
- },
249320
- /**
249321
- * Gets the parent container.
249322
- * @memberof Geocoder.prototype
249323
- *
249324
- * @type {Element}
249325
- */
249326
- searchSuggestionsContainer: {
249327
- get: function() {
249328
- return this._searchSuggestionsContainer;
249329
- }
249330
- },
249331
- /**
249332
- * Gets the view model.
249333
- * @memberof Geocoder.prototype
249334
- *
249335
- * @type {GeocoderViewModel}
249336
- */
249337
- viewModel: {
249338
- get: function() {
249339
- return this._viewModel;
249340
- }
249341
- }
249342
- });
249343
- Geocoder.prototype.isDestroyed = function() {
249344
- return false;
249345
- };
249346
- Geocoder.prototype.destroy = function() {
249347
- const container = this._container;
249348
- if (FeatureDetection_default.supportsPointerEvents()) {
249349
- document.removeEventListener("pointerdown", this._onInputBegin, true);
249350
- container.removeEventListener("pointerup", this._onInputEnd, true);
249351
- } else {
249352
- document.removeEventListener("mousedown", this._onInputBegin, true);
249353
- container.removeEventListener("mouseup", this._onInputEnd, true);
249354
- document.removeEventListener("touchstart", this._onInputBegin, true);
249355
- container.removeEventListener("touchend", this._onInputEnd, true);
249356
- }
249357
- this._viewModel.destroy();
249358
- knockout_default.cleanNode(this._form);
249359
- knockout_default.cleanNode(this._searchSuggestionsContainer);
249360
- container.removeChild(this._form);
249361
- container.removeChild(this._searchSuggestionsContainer);
249362
- this._textBox.removeEventListener("focus", this._onTextBoxFocus, false);
249363
- return destroyObject_default(this);
249364
- };
249365
- var Geocoder_default = Geocoder;
249366
-
249367
- // packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
249368
- function expandItemsHandler(data, event) {
249369
- const nestedList = event.currentTarget.parentElement.parentElement.querySelector(
249370
- `#${data.name}-expander`
249371
- );
249372
- nestedList.classList.toggle("active");
249373
- event.currentTarget.textContent = event.currentTarget.textContent === "+" ? "-" : "+";
249374
- }
249375
- function trackSublayer(sublayer, viewModel) {
249376
- knockout_default.track(sublayer);
249377
- for (let i = 0; i < sublayer.sublayers.length; i++) {
249378
- trackSublayer(sublayer.sublayers[i], viewModel);
249379
- }
249380
- }
249381
- function isFullModel(layer) {
249382
- return layer.modelName === "FullModel";
249383
- }
249384
- function isOverview(layer) {
249385
- return layer.modelName === "Overview";
249386
- }
249387
- function isTopLayer(layer) {
249388
- return isOverview(layer) || isFullModel(layer);
249389
- }
249390
- function addTopLayer(layer, viewModel) {
249391
- if (isTopLayer(layer)) {
249392
- layer.visibility = false;
249393
- for (let i = 0; i < layer.sublayers.length; i++) {
249394
- layer.sublayers[i].visibility = true;
249395
- }
249396
- const topLayer = {
249397
- name: layer.name,
249398
- modelName: layer.modelName,
249399
- disable: knockout_default.observable(false),
249400
- index: viewModel.sublayers.length
249401
- };
249402
- viewModel.topLayers.push(topLayer);
249403
- viewModel.sublayers.push(layer);
249404
- return topLayer;
249405
- }
249406
- }
249407
- function handleTopLayerSelector(layer, viewModel) {
249408
- if (isTopLayer(layer)) {
249409
- viewModel.sublayers.forEach((elem) => elem.visibility = false);
249410
- viewModel.sublayers[layer.index].visibility = true;
249411
- const bsl = document.getElementById("bsl-wrapper");
249412
- if (isFullModel(layer)) {
249413
- viewModel.currentLevel = viewModel.selectedLevel;
249414
- bsl.style.display = "block";
249415
- } else {
249416
- viewModel.selectedLevel = viewModel.currentLevel;
249417
- viewModel.currentLevel = "All";
249418
- bsl.style.display = "none";
249419
- }
249420
- }
249421
- }
249422
- async function setLevels(i3sProvider, levels) {
249423
- try {
249424
- const attributes = i3sProvider.getAttributeNames();
249425
- for (let index = 0; index < attributes.length; index++) {
249426
- if (attributes[index] === "BldgLevel") {
249427
- const values = i3sProvider.getAttributeValues(attributes[index]);
249428
- for (let i = 0; i < values.length; i++) {
249429
- levels.push(values[i]);
249430
- }
249431
- }
249432
- }
249433
- levels.sort((a3, b) => a3 - b);
249434
- levels.unshift("All");
249435
- } catch (error) {
249436
- console.log(`There was an error getting attributes: ${error}`);
249437
- }
249438
- }
249439
- function I3SBuildingSceneLayerExplorerViewModel(i3sProvider) {
249440
- const that = this;
249441
- this.levels = [];
249442
- this.viewModel = {
249443
- sublayers: [],
249444
- levels: this.levels,
249445
- currentLevel: knockout_default.observable(),
249446
- selectedLevel: "All",
249447
- topLayers: [
249448
- {
249449
- name: "Select a layer to explore...",
249450
- disable: knockout_default.observable(true),
249451
- index: -1
249452
- }
249453
- ],
249454
- currentLayer: knockout_default.observable(),
249455
- expandClickHandler: expandItemsHandler,
249456
- setOptionDisable: function(option, item) {
249457
- knockout_default.applyBindingsToNode(option, { disable: item.disable }, item);
249458
- },
249459
- defaultLayer: void 0
249460
- };
249461
- this.viewModel.currentLayer.subscribe(function(layer) {
249462
- handleTopLayerSelector(layer, that.viewModel);
249463
- });
249464
- const sublayers = i3sProvider.sublayers;
249465
- for (let i = 0; i < sublayers.length; i++) {
249466
- trackSublayer(sublayers[i], this.viewModel);
249467
- const topLayer = addTopLayer(sublayers[i], this.viewModel);
249468
- if (defined_default(topLayer) && (isOverview(topLayer) || !defined_default(this.viewModel.defaultLayer) && isFullModel(topLayer))) {
249469
- this.viewModel.defaultLayer = topLayer;
249470
- }
249471
- }
249472
- if (this.viewModel.topLayers.length === 1 && sublayers.length > 0) {
249473
- i3sProvider.show = false;
249474
- const fullModel = {
249475
- name: "Full Model",
249476
- modelName: "FullModel",
249477
- visibility: i3sProvider.show,
249478
- sublayers: i3sProvider.sublayers
249479
- };
249480
- this.viewModel.defaultLayer = addTopLayer(fullModel, this.viewModel);
249481
- this.viewModel.currentLayer.subscribe(function(layer) {
249482
- i3sProvider.show = isFullModel(layer);
249483
- });
249484
- } else if (this.viewModel.topLayers.length === 1) {
249485
- this.viewModel.topLayers[0].name = "Building layers not found";
249486
- }
249487
- setLevels(i3sProvider, this.levels);
249488
- this.viewModel.currentLevel.subscribe(function(newValue) {
249489
- if (newValue !== "All") {
249490
- i3sProvider.filterByAttributes([
249491
- {
249492
- name: "BldgLevel",
249493
- values: [newValue]
249494
- }
249495
- ]);
249496
- } else {
249497
- i3sProvider.filterByAttributes();
249498
- }
249499
- });
249500
- return this.viewModel;
249501
- }
249502
- var I3SBuildingSceneLayerExplorerViewModel_default = I3SBuildingSceneLayerExplorerViewModel;
249503
-
249504
- // packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js
249505
- function I3SBuildingSceneLayerExplorer(containerId, i3sProvider) {
249506
- const container = document.getElementById(containerId);
249507
- Check_default.defined("container", container);
249508
- Check_default.defined("i3sProvider", i3sProvider);
249509
- const htmlWrapper = document.createElement("div");
249510
- htmlWrapper.classList.add("cesium-viewer-i3s-explorer");
249511
- htmlWrapper.innerHTML = `
249512
- <h3>Building explorer</h3>
249513
- <select
249514
- data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
249515
- ></select>
249516
- <div id="bsl-wrapper">
249517
- <h3>Select Level</h3>
249518
- <select data-bind="options: levels, value: currentLevel"></select>
249519
- <h3>Disciplines & Categories</h3>
249520
- <ul class="layersList" data-bind="foreach: sublayers">
249521
- <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
249522
- <li>
249523
- <div class="li-wrapper">
249524
- <span
249525
- class="expandItem"
249526
- data-bind="click: $root.expandClickHandler"
249527
- >+</span
249528
- >
249529
- <input
249530
- type="checkbox"
249531
- data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
249532
- />
249533
- <label data-bind="attr: { for: name}">
249534
- <span data-bind="text: name"></span>
249535
- </label>
249536
- </div>
249537
- <ul class="nested" data-bind="attr: { id: name + '-expander'}">
249538
- <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
249539
- <div class="li-wrapper">
249540
- <input
249541
- type="checkbox"
249542
- data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
249543
- />
249544
- <label data-bind="attr: { for: name}">
249545
- <span data-bind="text: name"></span>
249546
- </label>
249547
- </div>
249548
- </li>
249549
- </ul>
249550
- </li>
249551
- </ul>
249552
- </ul>
249553
- </div>`;
249554
- container.appendChild(htmlWrapper);
249555
- const viewModel = new I3SBuildingSceneLayerExplorerViewModel_default(i3sProvider);
249556
- knockout_default.track(viewModel);
249557
- knockout_default.applyBindings(viewModel, container);
249558
- if (defined_default(viewModel.defaultLayer)) {
249559
- viewModel.currentLayer = viewModel.defaultLayer;
249560
- }
249561
- }
249562
- var I3SBuildingSceneLayerExplorer_default = I3SBuildingSceneLayerExplorer;
249563
-
249564
- // packages/widgets/Source/InfoBox/InfoBoxViewModel.js
249565
- var cameraEnabledPath = "M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z";
249566
- var cameraDisabledPath = "M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";
249567
- function InfoBoxViewModel() {
249568
- this._cameraClicked = new Event_default();
249569
- this._closeClicked = new Event_default();
249570
- this.maxHeight = 500;
249571
- this.enableCamera = false;
249572
- this.isCameraTracking = false;
249573
- this.showInfo = false;
249574
- this.titleText = "";
249575
- this.description = "";
249576
- knockout_default.track(this, [
249577
- "showInfo",
249578
- "titleText",
249579
- "description",
249580
- "maxHeight",
249581
- "enableCamera",
249582
- "isCameraTracking"
249583
- ]);
249584
- this._loadingIndicatorHtml = '<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>';
249585
- this.cameraIconPath = void 0;
249586
- knockout_default.defineProperty(this, "cameraIconPath", {
249587
- get: function() {
249588
- return !this.enableCamera || this.isCameraTracking ? cameraDisabledPath : cameraEnabledPath;
249589
- }
249590
- });
249591
- knockout_default.defineProperty(this, "_bodyless", {
249592
- get: function() {
249593
- return !defined_default(this.description) || this.description.length === 0;
249594
- }
249595
- });
249596
- }
249597
- InfoBoxViewModel.prototype.maxHeightOffset = function(offset) {
249598
- return `${this.maxHeight - offset}px`;
249599
- };
249600
- Object.defineProperties(InfoBoxViewModel.prototype, {
249601
- /**
249602
- * Gets an {@link Event} that is fired when the user clicks the camera icon.
249603
- * @memberof InfoBoxViewModel.prototype
249604
- * @type {Event}
249605
- */
249606
- cameraClicked: {
249607
- get: function() {
249608
- return this._cameraClicked;
249609
- }
249610
- },
249611
- /**
249612
- * Gets an {@link Event} that is fired when the user closes the info box.
249613
- * @memberof InfoBoxViewModel.prototype
249614
- * @type {Event}
249615
- */
249616
- closeClicked: {
249617
- get: function() {
249618
- return this._closeClicked;
249619
- }
249620
- }
249621
- });
249622
- var InfoBoxViewModel_default = InfoBoxViewModel;
249623
-
249624
- // packages/widgets/Source/InfoBox/InfoBox.js
249625
- function InfoBox(container) {
249626
- Check_default.defined("container", container);
249627
- container = getElement_default(container);
249628
- const infoElement = document.createElement("div");
249629
- infoElement.className = "cesium-infoBox";
249630
- infoElement.setAttribute(
249631
- "data-bind",
249632
- 'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'
249633
- );
249634
- container.appendChild(infoElement);
249635
- const titleElement = document.createElement("div");
249636
- titleElement.className = "cesium-infoBox-title";
249637
- titleElement.setAttribute("data-bind", "text: titleText");
249638
- infoElement.appendChild(titleElement);
249639
- const cameraElement = document.createElement("button");
249640
- cameraElement.type = "button";
249641
- cameraElement.className = "cesium-button cesium-infoBox-camera";
249642
- cameraElement.setAttribute(
249643
- "data-bind",
249644
- 'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'
249645
- );
249646
- infoElement.appendChild(cameraElement);
249647
- const closeElement = document.createElement("button");
249648
- closeElement.type = "button";
249649
- closeElement.className = "cesium-infoBox-close";
249650
- closeElement.setAttribute(
249651
- "data-bind",
249652
- "click: function () { closeClicked.raiseEvent(this); }"
249653
- );
249654
- closeElement.innerHTML = "&times;";
249655
- infoElement.appendChild(closeElement);
249656
- const frame = document.createElement("iframe");
249657
- frame.className = "cesium-infoBox-iframe";
249658
- frame.setAttribute("sandbox", "allow-same-origin allow-popups allow-forms");
249659
- frame.setAttribute(
249660
- "data-bind",
249661
- "style : { maxHeight : maxHeightOffset(40) }"
249662
- );
249663
- frame.setAttribute("allowfullscreen", true);
249664
- infoElement.appendChild(frame);
249665
- const viewModel = new InfoBoxViewModel_default();
249666
- knockout_default.applyBindings(viewModel, infoElement);
249667
- this._container = container;
249668
- this._element = infoElement;
249669
- this._frame = frame;
249670
- this._viewModel = viewModel;
249671
- this._descriptionSubscription = void 0;
249672
- const that = this;
249673
- frame.addEventListener("load", function() {
249674
- const frameDocument = frame.contentDocument;
249675
- const cssLink = frameDocument.createElement("link");
249676
- cssLink.href = buildModuleUrl_default("Widgets/InfoBox/InfoBoxDescription.css");
249677
- cssLink.rel = "stylesheet";
249678
- cssLink.type = "text/css";
249679
- const frameContent = frameDocument.createElement("div");
249680
- frameContent.className = "cesium-infoBox-description";
249681
- frameDocument.head.appendChild(cssLink);
249682
- frameDocument.body.appendChild(frameContent);
249683
- that._descriptionSubscription = subscribeAndEvaluate_default(
249684
- viewModel,
249685
- "description",
249686
- function(value) {
249687
- frame.style.height = "5px";
249688
- frameContent.innerHTML = value;
249689
- let background = null;
249690
- const firstElementChild = frameContent.firstElementChild;
249691
- if (firstElementChild !== null && frameContent.childNodes.length === 1) {
249692
- const style = window.getComputedStyle(firstElementChild);
249693
- if (style !== null) {
249694
- const backgroundColor = style["background-color"];
249695
- const color = Color_default.fromCssColorString(backgroundColor);
249696
- if (defined_default(color) && color.alpha !== 0) {
249697
- background = style["background-color"];
249698
- }
249699
- }
249700
- }
249701
- infoElement.style["background-color"] = background;
249702
- const height = frameContent.getBoundingClientRect().height;
249703
- frame.style.height = `${height}px`;
249704
- }
249705
- );
249706
- });
249707
- frame.setAttribute("src", "about:blank");
249708
- }
249709
- Object.defineProperties(InfoBox.prototype, {
249710
- /**
249711
- * Gets the parent container.
249712
- * @memberof InfoBox.prototype
249713
- *
249714
- * @type {Element}
249715
- */
249716
- container: {
249717
- get: function() {
249718
- return this._container;
249719
- }
249720
- },
249721
- /**
249722
- * Gets the view model.
249723
- * @memberof InfoBox.prototype
249724
- *
249725
- * @type {InfoBoxViewModel}
249726
- */
249727
- viewModel: {
249728
- get: function() {
249729
- return this._viewModel;
249730
- }
249731
- },
249732
- /**
249733
- * Gets the iframe used to display the description.
249734
- * @memberof InfoBox.prototype
249735
- *
249736
- * @type {HTMLIFrameElement}
249737
- */
249738
- frame: {
249739
- get: function() {
249740
- return this._frame;
249741
- }
249742
- }
249743
- });
249744
- InfoBox.prototype.isDestroyed = function() {
249745
- return false;
249746
- };
249747
- InfoBox.prototype.destroy = function() {
249748
- const container = this._container;
249749
- knockout_default.cleanNode(this._element);
249750
- container.removeChild(this._element);
249751
- if (defined_default(this._descriptionSubscription)) {
249752
- this._descriptionSubscription.dispose();
249753
- }
249754
- return destroyObject_default(this);
249755
- };
249756
- var InfoBox_default = InfoBox;
249757
-
249758
- // packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
249759
- function ProjectionPickerViewModel(scene) {
249760
- if (!defined_default(scene)) {
249761
- throw new DeveloperError_default("scene is required.");
249762
- }
249763
- this._scene = scene;
249764
- this._orthographic = scene.camera.frustum instanceof OrthographicFrustum_default;
249765
- this._flightInProgress = false;
249766
- this.dropDownVisible = false;
249767
- this.tooltipPerspective = "Perspective Projection";
249768
- this.tooltipOrthographic = "Orthographic Projection";
249769
- this.selectedTooltip = void 0;
249770
- this.sceneMode = scene.mode;
249771
- knockout_default.track(this, [
249772
- "_orthographic",
249773
- "_flightInProgress",
249774
- "sceneMode",
249775
- "dropDownVisible",
249776
- "tooltipPerspective",
249777
- "tooltipOrthographic"
249778
- ]);
249779
- const that = this;
249780
- knockout_default.defineProperty(this, "selectedTooltip", function() {
249781
- if (that._orthographic) {
249782
- return that.tooltipOrthographic;
249783
- }
249784
- return that.tooltipPerspective;
249785
- });
249786
- this._toggleDropDown = createCommand_default(function() {
249787
- if (that.sceneMode === SceneMode_default.SCENE2D || that._flightInProgress) {
249788
- return;
249789
- }
249790
- that.dropDownVisible = !that.dropDownVisible;
249791
- });
249792
- this._eventHelper = new EventHelper_default();
249793
- this._eventHelper.add(
249794
- scene.morphComplete,
249795
- function(transitioner, oldMode, newMode, isMorphing) {
249796
- that.sceneMode = newMode;
249797
- that._orthographic = newMode === SceneMode_default.SCENE2D || that._scene.camera.frustum instanceof OrthographicFrustum_default;
249798
- }
249799
- );
249800
- this._eventHelper.add(scene.preRender, function() {
249801
- that._flightInProgress = defined_default(scene.camera._currentFlight);
249802
- });
249803
- this._switchToPerspective = createCommand_default(function() {
249804
- if (that.sceneMode === SceneMode_default.SCENE2D) {
249805
- return;
249806
- }
249807
- that._scene.camera.switchToPerspectiveFrustum();
249808
- that._orthographic = false;
249809
- that.dropDownVisible = false;
249810
- });
249811
- this._switchToOrthographic = createCommand_default(function() {
249812
- if (that.sceneMode === SceneMode_default.SCENE2D) {
249813
- return;
249814
- }
249815
- that._scene.camera.switchToOrthographicFrustum();
249816
- that._orthographic = true;
249817
- that.dropDownVisible = false;
249818
- });
249819
- this._sceneMode = SceneMode_default;
249820
- }
249821
- Object.defineProperties(ProjectionPickerViewModel.prototype, {
249822
- /**
249823
- * Gets the scene
249824
- * @memberof ProjectionPickerViewModel.prototype
249825
- * @type {Scene}
249826
- */
249827
- scene: {
249828
- get: function() {
249829
- return this._scene;
249830
- }
249831
- },
249832
- /**
249833
- * Gets the command to toggle the drop down box.
249834
- * @memberof ProjectionPickerViewModel.prototype
249835
- *
249836
- * @type {Command}
249837
- */
249838
- toggleDropDown: {
249839
- get: function() {
249840
- return this._toggleDropDown;
249841
- }
249842
- },
249843
- /**
249844
- * Gets the command to switch to a perspective projection.
249845
- * @memberof ProjectionPickerViewModel.prototype
249846
- *
249847
- * @type {Command}
249848
- */
249849
- switchToPerspective: {
249850
- get: function() {
249851
- return this._switchToPerspective;
249852
- }
249853
- },
249854
- /**
249855
- * Gets the command to switch to orthographic projection.
249856
- * @memberof ProjectionPickerViewModel.prototype
249857
- *
249858
- * @type {Command}
249859
- */
249860
- switchToOrthographic: {
249861
- get: function() {
249862
- return this._switchToOrthographic;
249863
- }
249864
- },
249865
- /**
249866
- * Gets whether the scene is currently using an orthographic projection.
249867
- * @memberof ProjectionPickerViewModel.prototype
249868
- *
249869
- * @type {Command}
249870
- */
249871
- isOrthographicProjection: {
249872
- get: function() {
249873
- return this._orthographic;
249874
- }
249875
- }
249876
- });
249877
- ProjectionPickerViewModel.prototype.isDestroyed = function() {
249878
- return false;
249879
- };
249880
- ProjectionPickerViewModel.prototype.destroy = function() {
249881
- this._eventHelper.removeAll();
249882
- destroyObject_default(this);
249883
- };
249884
- var ProjectionPickerViewModel_default = ProjectionPickerViewModel;
249885
-
249886
- // packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
249887
- var perspectivePath = "M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z";
249888
- var orthographicPath = "m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";
249889
- function ProjectionPicker(container, scene) {
249890
- if (!defined_default(container)) {
249891
- throw new DeveloperError_default("container is required.");
249411
+ };
249412
+ var GeocoderViewModel_default = GeocoderViewModel;
249413
+
249414
+ // packages/widgets/Source/Geocoder/Geocoder.js
249415
+ var startSearchPath = "M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z";
249416
+ var stopSearchPath = "M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z";
249417
+ function Geocoder(options) {
249418
+ if (!defined_default(options) || !defined_default(options.container)) {
249419
+ throw new DeveloperError_default("options.container is required.");
249892
249420
  }
249893
- if (!defined_default(scene)) {
249894
- throw new DeveloperError_default("scene is required.");
249421
+ if (!defined_default(options.scene)) {
249422
+ throw new DeveloperError_default("options.scene is required.");
249895
249423
  }
249896
- container = getElement_default(container);
249897
- const viewModel = new ProjectionPickerViewModel_default(scene);
249898
- viewModel._perspectivePath = perspectivePath;
249899
- viewModel._orthographicPath = orthographicPath;
249900
- const wrapper = document.createElement("span");
249901
- wrapper.className = "cesium-projectionPicker-wrapper cesium-toolbar-button";
249902
- container.appendChild(wrapper);
249903
- const button = document.createElement("button");
249904
- button.type = "button";
249905
- button.className = "cesium-button cesium-toolbar-button";
249906
- button.setAttribute(
249424
+ const container = getElement_default(options.container);
249425
+ const viewModel = new GeocoderViewModel_default(options);
249426
+ viewModel._startSearchPath = startSearchPath;
249427
+ viewModel._stopSearchPath = stopSearchPath;
249428
+ const form = document.createElement("form");
249429
+ form.setAttribute("data-bind", "submit: search");
249430
+ const textBox = document.createElement("input");
249431
+ textBox.type = "search";
249432
+ textBox.className = "cesium-geocoder-input";
249433
+ textBox.setAttribute("placeholder", "Enter an address or landmark...");
249434
+ textBox.setAttribute(
249907
249435
  "data-bind",
249908
- 'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'
249436
+ 'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'
249909
249437
  );
249910
- button.innerHTML = '<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->';
249911
- wrapper.appendChild(button);
249912
- const perspectiveButton = document.createElement("button");
249913
- perspectiveButton.type = "button";
249914
- perspectiveButton.className = "cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon";
249915
- perspectiveButton.setAttribute(
249438
+ this._onTextBoxFocus = function() {
249439
+ setTimeout(function() {
249440
+ textBox.select();
249441
+ }, 0);
249442
+ };
249443
+ textBox.addEventListener("focus", this._onTextBoxFocus, false);
249444
+ form.appendChild(textBox);
249445
+ this._textBox = textBox;
249446
+ const searchButton = document.createElement("span");
249447
+ searchButton.className = "cesium-geocoder-searchButton";
249448
+ searchButton.setAttribute(
249916
249449
  "data-bind",
249917
- 'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'
249450
+ "click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"
249918
249451
  );
249919
- wrapper.appendChild(perspectiveButton);
249920
- const orthographicButton = document.createElement("button");
249921
- orthographicButton.type = "button";
249922
- orthographicButton.className = "cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon";
249923
- orthographicButton.setAttribute(
249452
+ form.appendChild(searchButton);
249453
+ container.appendChild(form);
249454
+ const searchSuggestionsContainer = document.createElement("div");
249455
+ searchSuggestionsContainer.className = "search-results";
249456
+ searchSuggestionsContainer.setAttribute(
249924
249457
  "data-bind",
249925
- 'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'
249458
+ "visible: _suggestionsVisible"
249926
249459
  );
249927
- wrapper.appendChild(orthographicButton);
249928
- knockout_default.applyBindings(viewModel, wrapper);
249929
- this._viewModel = viewModel;
249460
+ const suggestionsList = document.createElement("ul");
249461
+ suggestionsList.setAttribute("data-bind", "foreach: _suggestions");
249462
+ const suggestions = document.createElement("li");
249463
+ suggestionsList.appendChild(suggestions);
249464
+ suggestions.setAttribute(
249465
+ "data-bind",
249466
+ "text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"
249467
+ );
249468
+ searchSuggestionsContainer.appendChild(suggestionsList);
249469
+ container.appendChild(searchSuggestionsContainer);
249470
+ knockout_default.applyBindings(viewModel, form);
249471
+ knockout_default.applyBindings(viewModel, searchSuggestionsContainer);
249930
249472
  this._container = container;
249931
- this._wrapper = wrapper;
249932
- this._closeDropDown = function(e) {
249933
- if (!wrapper.contains(e.target)) {
249934
- viewModel.dropDownVisible = false;
249473
+ this._searchSuggestionsContainer = searchSuggestionsContainer;
249474
+ this._viewModel = viewModel;
249475
+ this._form = form;
249476
+ this._onInputBegin = function(e) {
249477
+ let target = e.target;
249478
+ if (typeof e.composedPath === "function") {
249479
+ target = e.composedPath()[0];
249480
+ }
249481
+ if (!container.contains(target)) {
249482
+ viewModel._focusTextbox = false;
249483
+ viewModel.hideSuggestions();
249935
249484
  }
249936
249485
  };
249486
+ this._onInputEnd = function(e) {
249487
+ viewModel._focusTextbox = true;
249488
+ viewModel.showSuggestions();
249489
+ };
249937
249490
  if (FeatureDetection_default.supportsPointerEvents()) {
249938
- document.addEventListener("pointerdown", this._closeDropDown, true);
249491
+ document.addEventListener("pointerdown", this._onInputBegin, true);
249492
+ container.addEventListener("pointerup", this._onInputEnd, true);
249493
+ container.addEventListener("pointercancel", this._onInputEnd, true);
249939
249494
  } else {
249940
- document.addEventListener("mousedown", this._closeDropDown, true);
249941
- document.addEventListener("touchstart", this._closeDropDown, true);
249495
+ document.addEventListener("mousedown", this._onInputBegin, true);
249496
+ container.addEventListener("mouseup", this._onInputEnd, true);
249497
+ document.addEventListener("touchstart", this._onInputBegin, true);
249498
+ container.addEventListener("touchend", this._onInputEnd, true);
249499
+ container.addEventListener("touchcancel", this._onInputEnd, true);
249942
249500
  }
249943
249501
  }
249944
- Object.defineProperties(ProjectionPicker.prototype, {
249502
+ Object.defineProperties(Geocoder.prototype, {
249945
249503
  /**
249946
249504
  * Gets the parent container.
249947
- * @memberof ProjectionPicker.prototype
249505
+ * @memberof Geocoder.prototype
249948
249506
  *
249949
249507
  * @type {Element}
249950
249508
  */
@@ -249953,11 +249511,22 @@ Object.defineProperties(ProjectionPicker.prototype, {
249953
249511
  return this._container;
249954
249512
  }
249955
249513
  },
249514
+ /**
249515
+ * Gets the parent container.
249516
+ * @memberof Geocoder.prototype
249517
+ *
249518
+ * @type {Element}
249519
+ */
249520
+ searchSuggestionsContainer: {
249521
+ get: function() {
249522
+ return this._searchSuggestionsContainer;
249523
+ }
249524
+ },
249956
249525
  /**
249957
249526
  * Gets the view model.
249958
- * @memberof ProjectionPicker.prototype
249527
+ * @memberof Geocoder.prototype
249959
249528
  *
249960
- * @type {ProjectionPickerViewModel}
249529
+ * @type {GeocoderViewModel}
249961
249530
  */
249962
249531
  viewModel: {
249963
249532
  get: function() {
@@ -249965,22 +249534,226 @@ Object.defineProperties(ProjectionPicker.prototype, {
249965
249534
  }
249966
249535
  }
249967
249536
  });
249968
- ProjectionPicker.prototype.isDestroyed = function() {
249537
+ Geocoder.prototype.isDestroyed = function() {
249969
249538
  return false;
249970
249539
  };
249971
- ProjectionPicker.prototype.destroy = function() {
249972
- this._viewModel.destroy();
249540
+ Geocoder.prototype.destroy = function() {
249541
+ const container = this._container;
249973
249542
  if (FeatureDetection_default.supportsPointerEvents()) {
249974
- document.removeEventListener("pointerdown", this._closeDropDown, true);
249543
+ document.removeEventListener("pointerdown", this._onInputBegin, true);
249544
+ container.removeEventListener("pointerup", this._onInputEnd, true);
249975
249545
  } else {
249976
- document.removeEventListener("mousedown", this._closeDropDown, true);
249977
- document.removeEventListener("touchstart", this._closeDropDown, true);
249546
+ document.removeEventListener("mousedown", this._onInputBegin, true);
249547
+ container.removeEventListener("mouseup", this._onInputEnd, true);
249548
+ document.removeEventListener("touchstart", this._onInputBegin, true);
249549
+ container.removeEventListener("touchend", this._onInputEnd, true);
249978
249550
  }
249979
- knockout_default.cleanNode(this._wrapper);
249980
- this._container.removeChild(this._wrapper);
249551
+ this._viewModel.destroy();
249552
+ knockout_default.cleanNode(this._form);
249553
+ knockout_default.cleanNode(this._searchSuggestionsContainer);
249554
+ container.removeChild(this._form);
249555
+ container.removeChild(this._searchSuggestionsContainer);
249556
+ this._textBox.removeEventListener("focus", this._onTextBoxFocus, false);
249981
249557
  return destroyObject_default(this);
249982
249558
  };
249983
- var ProjectionPicker_default = ProjectionPicker;
249559
+ var Geocoder_default = Geocoder;
249560
+
249561
+ // packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel.js
249562
+ function expandItemsHandler(data, event) {
249563
+ const nestedList = event.currentTarget.parentElement.parentElement.querySelector(
249564
+ `#${data.name}-expander`
249565
+ );
249566
+ nestedList.classList.toggle("active");
249567
+ event.currentTarget.textContent = event.currentTarget.textContent === "+" ? "-" : "+";
249568
+ }
249569
+ function trackSublayer(sublayer, viewModel) {
249570
+ knockout_default.track(sublayer);
249571
+ for (let i = 0; i < sublayer.sublayers.length; i++) {
249572
+ trackSublayer(sublayer.sublayers[i], viewModel);
249573
+ }
249574
+ }
249575
+ function isFullModel(layer) {
249576
+ return layer.modelName === "FullModel";
249577
+ }
249578
+ function isOverview(layer) {
249579
+ return layer.modelName === "Overview";
249580
+ }
249581
+ function isTopLayer(layer) {
249582
+ return isOverview(layer) || isFullModel(layer);
249583
+ }
249584
+ function addTopLayer(layer, viewModel) {
249585
+ if (isTopLayer(layer)) {
249586
+ layer.visibility = false;
249587
+ for (let i = 0; i < layer.sublayers.length; i++) {
249588
+ layer.sublayers[i].visibility = true;
249589
+ }
249590
+ const topLayer = {
249591
+ name: layer.name,
249592
+ modelName: layer.modelName,
249593
+ disable: knockout_default.observable(false),
249594
+ index: viewModel.sublayers.length
249595
+ };
249596
+ viewModel.topLayers.push(topLayer);
249597
+ viewModel.sublayers.push(layer);
249598
+ return topLayer;
249599
+ }
249600
+ }
249601
+ function handleTopLayerSelector(layer, viewModel) {
249602
+ if (isTopLayer(layer)) {
249603
+ viewModel.sublayers.forEach((elem) => elem.visibility = false);
249604
+ viewModel.sublayers[layer.index].visibility = true;
249605
+ const bsl = document.getElementById("bsl-wrapper");
249606
+ if (isFullModel(layer)) {
249607
+ viewModel.currentLevel = viewModel.selectedLevel;
249608
+ bsl.style.display = "block";
249609
+ } else {
249610
+ viewModel.selectedLevel = viewModel.currentLevel;
249611
+ viewModel.currentLevel = "All";
249612
+ bsl.style.display = "none";
249613
+ }
249614
+ }
249615
+ }
249616
+ async function setLevels(i3sProvider, levels) {
249617
+ try {
249618
+ const attributes = i3sProvider.getAttributeNames();
249619
+ for (let index = 0; index < attributes.length; index++) {
249620
+ if (attributes[index] === "BldgLevel") {
249621
+ const values = i3sProvider.getAttributeValues(attributes[index]);
249622
+ for (let i = 0; i < values.length; i++) {
249623
+ levels.push(values[i]);
249624
+ }
249625
+ }
249626
+ }
249627
+ levels.sort((a3, b) => a3 - b);
249628
+ levels.unshift("All");
249629
+ } catch (error) {
249630
+ console.log(`There was an error getting attributes: ${error}`);
249631
+ }
249632
+ }
249633
+ function I3SBuildingSceneLayerExplorerViewModel(i3sProvider) {
249634
+ const that = this;
249635
+ this.levels = [];
249636
+ this.viewModel = {
249637
+ sublayers: [],
249638
+ levels: this.levels,
249639
+ currentLevel: knockout_default.observable(),
249640
+ selectedLevel: "All",
249641
+ topLayers: [
249642
+ {
249643
+ name: "Select a layer to explore...",
249644
+ disable: knockout_default.observable(true),
249645
+ index: -1
249646
+ }
249647
+ ],
249648
+ currentLayer: knockout_default.observable(),
249649
+ expandClickHandler: expandItemsHandler,
249650
+ setOptionDisable: function(option, item) {
249651
+ knockout_default.applyBindingsToNode(option, { disable: item.disable }, item);
249652
+ },
249653
+ defaultLayer: void 0
249654
+ };
249655
+ this.viewModel.currentLayer.subscribe(function(layer) {
249656
+ handleTopLayerSelector(layer, that.viewModel);
249657
+ });
249658
+ const sublayers = i3sProvider.sublayers;
249659
+ for (let i = 0; i < sublayers.length; i++) {
249660
+ trackSublayer(sublayers[i], this.viewModel);
249661
+ const topLayer = addTopLayer(sublayers[i], this.viewModel);
249662
+ if (defined_default(topLayer) && (isOverview(topLayer) || !defined_default(this.viewModel.defaultLayer) && isFullModel(topLayer))) {
249663
+ this.viewModel.defaultLayer = topLayer;
249664
+ }
249665
+ }
249666
+ if (this.viewModel.topLayers.length === 1 && sublayers.length > 0) {
249667
+ i3sProvider.show = false;
249668
+ const fullModel = {
249669
+ name: "Full Model",
249670
+ modelName: "FullModel",
249671
+ visibility: i3sProvider.show,
249672
+ sublayers: i3sProvider.sublayers
249673
+ };
249674
+ this.viewModel.defaultLayer = addTopLayer(fullModel, this.viewModel);
249675
+ this.viewModel.currentLayer.subscribe(function(layer) {
249676
+ i3sProvider.show = isFullModel(layer);
249677
+ });
249678
+ } else if (this.viewModel.topLayers.length === 1) {
249679
+ this.viewModel.topLayers[0].name = "Building layers not found";
249680
+ }
249681
+ setLevels(i3sProvider, this.levels);
249682
+ this.viewModel.currentLevel.subscribe(function(newValue) {
249683
+ if (newValue !== "All") {
249684
+ i3sProvider.filterByAttributes([
249685
+ {
249686
+ name: "BldgLevel",
249687
+ values: [newValue]
249688
+ }
249689
+ ]);
249690
+ } else {
249691
+ i3sProvider.filterByAttributes();
249692
+ }
249693
+ });
249694
+ return this.viewModel;
249695
+ }
249696
+ var I3SBuildingSceneLayerExplorerViewModel_default = I3SBuildingSceneLayerExplorerViewModel;
249697
+
249698
+ // packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.js
249699
+ function I3SBuildingSceneLayerExplorer(containerId, i3sProvider) {
249700
+ const container = document.getElementById(containerId);
249701
+ Check_default.defined("container", container);
249702
+ Check_default.defined("i3sProvider", i3sProvider);
249703
+ const htmlWrapper = document.createElement("div");
249704
+ htmlWrapper.classList.add("cesium-viewer-i3s-explorer");
249705
+ htmlWrapper.innerHTML = `
249706
+ <h3>Building explorer</h3>
249707
+ <select
249708
+ data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
249709
+ ></select>
249710
+ <div id="bsl-wrapper">
249711
+ <h3>Select Level</h3>
249712
+ <select data-bind="options: levels, value: currentLevel"></select>
249713
+ <h3>Disciplines & Categories</h3>
249714
+ <ul class="layersList" data-bind="foreach: sublayers">
249715
+ <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
249716
+ <li>
249717
+ <div class="li-wrapper">
249718
+ <span
249719
+ class="expandItem"
249720
+ data-bind="click: $root.expandClickHandler"
249721
+ >+</span
249722
+ >
249723
+ <input
249724
+ type="checkbox"
249725
+ data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
249726
+ />
249727
+ <label data-bind="attr: { for: name}">
249728
+ <span data-bind="text: name"></span>
249729
+ </label>
249730
+ </div>
249731
+ <ul class="nested" data-bind="attr: { id: name + '-expander'}">
249732
+ <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
249733
+ <div class="li-wrapper">
249734
+ <input
249735
+ type="checkbox"
249736
+ data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
249737
+ />
249738
+ <label data-bind="attr: { for: name}">
249739
+ <span data-bind="text: name"></span>
249740
+ </label>
249741
+ </div>
249742
+ </li>
249743
+ </ul>
249744
+ </li>
249745
+ </ul>
249746
+ </ul>
249747
+ </div>`;
249748
+ container.appendChild(htmlWrapper);
249749
+ const viewModel = new I3SBuildingSceneLayerExplorerViewModel_default(i3sProvider);
249750
+ knockout_default.track(viewModel);
249751
+ knockout_default.applyBindings(viewModel, container);
249752
+ if (defined_default(viewModel.defaultLayer)) {
249753
+ viewModel.currentLayer = viewModel.defaultLayer;
249754
+ }
249755
+ }
249756
+ var I3SBuildingSceneLayerExplorer_default = I3SBuildingSceneLayerExplorer;
249984
249757
 
249985
249758
  // packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdogViewModel.js
249986
249759
  function PerformanceWatchdogViewModel(options) {
@@ -250109,449 +249882,6 @@ PerformanceWatchdog.prototype.destroy = function() {
250109
249882
  };
250110
249883
  var PerformanceWatchdog_default = PerformanceWatchdog;
250111
249884
 
250112
- // packages/widgets/Source/SceneModePicker/SceneModePickerViewModel.js
250113
- function SceneModePickerViewModel(scene, duration) {
250114
- if (!defined_default(scene)) {
250115
- throw new DeveloperError_default("scene is required.");
250116
- }
250117
- this._scene = scene;
250118
- const that = this;
250119
- const morphStart = function(transitioner, oldMode, newMode, isMorphing) {
250120
- that.sceneMode = newMode;
250121
- that.dropDownVisible = false;
250122
- };
250123
- this._eventHelper = new EventHelper_default();
250124
- this._eventHelper.add(scene.morphStart, morphStart);
250125
- this._duration = duration ?? 2;
250126
- this.sceneMode = scene.mode;
250127
- this.dropDownVisible = false;
250128
- this.tooltip2D = "2D";
250129
- this.tooltip3D = "3D";
250130
- this.tooltipColumbusView = "Columbus View";
250131
- knockout_default.track(this, [
250132
- "sceneMode",
250133
- "dropDownVisible",
250134
- "tooltip2D",
250135
- "tooltip3D",
250136
- "tooltipColumbusView"
250137
- ]);
250138
- this.selectedTooltip = void 0;
250139
- knockout_default.defineProperty(this, "selectedTooltip", function() {
250140
- const mode2 = that.sceneMode;
250141
- if (mode2 === SceneMode_default.SCENE2D) {
250142
- return that.tooltip2D;
250143
- }
250144
- if (mode2 === SceneMode_default.SCENE3D) {
250145
- return that.tooltip3D;
250146
- }
250147
- return that.tooltipColumbusView;
250148
- });
250149
- this._toggleDropDown = createCommand_default(function() {
250150
- that.dropDownVisible = !that.dropDownVisible;
250151
- });
250152
- this._morphTo2D = createCommand_default(function() {
250153
- scene.morphTo2D(that._duration);
250154
- });
250155
- this._morphTo3D = createCommand_default(function() {
250156
- scene.morphTo3D(that._duration);
250157
- });
250158
- this._morphToColumbusView = createCommand_default(function() {
250159
- scene.morphToColumbusView(that._duration);
250160
- });
250161
- this._sceneMode = SceneMode_default;
250162
- }
250163
- Object.defineProperties(SceneModePickerViewModel.prototype, {
250164
- /**
250165
- * Gets the scene
250166
- * @memberof SceneModePickerViewModel.prototype
250167
- * @type {Scene}
250168
- */
250169
- scene: {
250170
- get: function() {
250171
- return this._scene;
250172
- }
250173
- },
250174
- /**
250175
- * Gets or sets the the duration of scene mode transition animations in seconds.
250176
- * A value of zero causes the scene to instantly change modes.
250177
- * @memberof SceneModePickerViewModel.prototype
250178
- * @type {number}
250179
- */
250180
- duration: {
250181
- get: function() {
250182
- return this._duration;
250183
- },
250184
- set: function(value) {
250185
- if (value < 0) {
250186
- throw new DeveloperError_default("duration value must be positive.");
250187
- }
250188
- this._duration = value;
250189
- }
250190
- },
250191
- /**
250192
- * Gets the command to toggle the drop down box.
250193
- * @memberof SceneModePickerViewModel.prototype
250194
- *
250195
- * @type {Command}
250196
- */
250197
- toggleDropDown: {
250198
- get: function() {
250199
- return this._toggleDropDown;
250200
- }
250201
- },
250202
- /**
250203
- * Gets the command to morph to 2D.
250204
- * @memberof SceneModePickerViewModel.prototype
250205
- *
250206
- * @type {Command}
250207
- */
250208
- morphTo2D: {
250209
- get: function() {
250210
- return this._morphTo2D;
250211
- }
250212
- },
250213
- /**
250214
- * Gets the command to morph to 3D.
250215
- * @memberof SceneModePickerViewModel.prototype
250216
- *
250217
- * @type {Command}
250218
- */
250219
- morphTo3D: {
250220
- get: function() {
250221
- return this._morphTo3D;
250222
- }
250223
- },
250224
- /**
250225
- * Gets the command to morph to Columbus View.
250226
- * @memberof SceneModePickerViewModel.prototype
250227
- *
250228
- * @type {Command}
250229
- */
250230
- morphToColumbusView: {
250231
- get: function() {
250232
- return this._morphToColumbusView;
250233
- }
250234
- }
250235
- });
250236
- SceneModePickerViewModel.prototype.isDestroyed = function() {
250237
- return false;
250238
- };
250239
- SceneModePickerViewModel.prototype.destroy = function() {
250240
- this._eventHelper.removeAll();
250241
- destroyObject_default(this);
250242
- };
250243
- var SceneModePickerViewModel_default = SceneModePickerViewModel;
250244
-
250245
- // packages/widgets/Source/SceneModePicker/SceneModePicker.js
250246
- var globePath = "m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z";
250247
- var flatMapPath = "m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z";
250248
- var columbusViewPath = "m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";
250249
- function SceneModePicker(container, scene, duration) {
250250
- if (!defined_default(container)) {
250251
- throw new DeveloperError_default("container is required.");
250252
- }
250253
- if (!defined_default(scene)) {
250254
- throw new DeveloperError_default("scene is required.");
250255
- }
250256
- container = getElement_default(container);
250257
- const viewModel = new SceneModePickerViewModel_default(scene, duration);
250258
- viewModel._globePath = globePath;
250259
- viewModel._flatMapPath = flatMapPath;
250260
- viewModel._columbusViewPath = columbusViewPath;
250261
- const wrapper = document.createElement("span");
250262
- wrapper.className = "cesium-sceneModePicker-wrapper cesium-toolbar-button";
250263
- container.appendChild(wrapper);
250264
- const button = document.createElement("button");
250265
- button.type = "button";
250266
- button.className = "cesium-button cesium-toolbar-button";
250267
- button.setAttribute(
250268
- "data-bind",
250269
- 'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'
250270
- );
250271
- button.innerHTML = '<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->';
250272
- wrapper.appendChild(button);
250273
- const morphTo3DButton = document.createElement("button");
250274
- morphTo3DButton.type = "button";
250275
- morphTo3DButton.className = "cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon";
250276
- morphTo3DButton.setAttribute(
250277
- "data-bind",
250278
- 'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'
250279
- );
250280
- wrapper.appendChild(morphTo3DButton);
250281
- const morphTo2DButton = document.createElement("button");
250282
- morphTo2DButton.type = "button";
250283
- morphTo2DButton.className = "cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon";
250284
- morphTo2DButton.setAttribute(
250285
- "data-bind",
250286
- 'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'
250287
- );
250288
- wrapper.appendChild(morphTo2DButton);
250289
- const morphToCVButton = document.createElement("button");
250290
- morphToCVButton.type = "button";
250291
- morphToCVButton.className = "cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon";
250292
- morphToCVButton.setAttribute(
250293
- "data-bind",
250294
- 'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'
250295
- );
250296
- wrapper.appendChild(morphToCVButton);
250297
- knockout_default.applyBindings(viewModel, wrapper);
250298
- this._viewModel = viewModel;
250299
- this._container = container;
250300
- this._wrapper = wrapper;
250301
- this._closeDropDown = function(e) {
250302
- if (!wrapper.contains(e.target)) {
250303
- viewModel.dropDownVisible = false;
250304
- }
250305
- };
250306
- if (FeatureDetection_default.supportsPointerEvents()) {
250307
- document.addEventListener("pointerdown", this._closeDropDown, true);
250308
- } else {
250309
- document.addEventListener("mousedown", this._closeDropDown, true);
250310
- document.addEventListener("touchstart", this._closeDropDown, true);
250311
- }
250312
- }
250313
- Object.defineProperties(SceneModePicker.prototype, {
250314
- /**
250315
- * Gets the parent container.
250316
- * @memberof SceneModePicker.prototype
250317
- *
250318
- * @type {Element}
250319
- */
250320
- container: {
250321
- get: function() {
250322
- return this._container;
250323
- }
250324
- },
250325
- /**
250326
- * Gets the view model.
250327
- * @memberof SceneModePicker.prototype
250328
- *
250329
- * @type {SceneModePickerViewModel}
250330
- */
250331
- viewModel: {
250332
- get: function() {
250333
- return this._viewModel;
250334
- }
250335
- }
250336
- });
250337
- SceneModePicker.prototype.isDestroyed = function() {
250338
- return false;
250339
- };
250340
- SceneModePicker.prototype.destroy = function() {
250341
- this._viewModel.destroy();
250342
- if (FeatureDetection_default.supportsPointerEvents()) {
250343
- document.removeEventListener("pointerdown", this._closeDropDown, true);
250344
- } else {
250345
- document.removeEventListener("mousedown", this._closeDropDown, true);
250346
- document.removeEventListener("touchstart", this._closeDropDown, true);
250347
- }
250348
- knockout_default.cleanNode(this._wrapper);
250349
- this._container.removeChild(this._wrapper);
250350
- return destroyObject_default(this);
250351
- };
250352
- var SceneModePicker_default = SceneModePicker;
250353
-
250354
- // packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
250355
- var screenSpacePos = new Cartesian2_default();
250356
- var offScreen = "-1000px";
250357
- function SelectionIndicatorViewModel(scene, selectionIndicatorElement, container) {
250358
- if (!defined_default(scene)) {
250359
- throw new DeveloperError_default("scene is required.");
250360
- }
250361
- if (!defined_default(selectionIndicatorElement)) {
250362
- throw new DeveloperError_default("selectionIndicatorElement is required.");
250363
- }
250364
- if (!defined_default(container)) {
250365
- throw new DeveloperError_default("container is required.");
250366
- }
250367
- this._scene = scene;
250368
- this._screenPositionX = offScreen;
250369
- this._screenPositionY = offScreen;
250370
- this._tweens = scene.tweens;
250371
- this._container = container ?? document.body;
250372
- this._selectionIndicatorElement = selectionIndicatorElement;
250373
- this._scale = 1;
250374
- this.position = void 0;
250375
- this.showSelection = false;
250376
- knockout_default.track(this, [
250377
- "position",
250378
- "_screenPositionX",
250379
- "_screenPositionY",
250380
- "_scale",
250381
- "showSelection"
250382
- ]);
250383
- this.isVisible = void 0;
250384
- knockout_default.defineProperty(this, "isVisible", {
250385
- get: function() {
250386
- return this.showSelection && defined_default(this.position);
250387
- }
250388
- });
250389
- knockout_default.defineProperty(this, "_transform", {
250390
- get: function() {
250391
- return `scale(${this._scale})`;
250392
- }
250393
- });
250394
- this.computeScreenSpacePosition = function(position, result) {
250395
- return SceneTransforms_default.worldToWindowCoordinates(scene, position, result);
250396
- };
250397
- }
250398
- SelectionIndicatorViewModel.prototype.update = function() {
250399
- if (this.showSelection && defined_default(this.position)) {
250400
- const screenPosition = this.computeScreenSpacePosition(
250401
- this.position,
250402
- screenSpacePos
250403
- );
250404
- if (!defined_default(screenPosition)) {
250405
- this._screenPositionX = offScreen;
250406
- this._screenPositionY = offScreen;
250407
- } else {
250408
- const container = this._container;
250409
- const containerWidth = container.parentNode.clientWidth;
250410
- const containerHeight = container.parentNode.clientHeight;
250411
- const indicatorSize = this._selectionIndicatorElement.clientWidth;
250412
- const halfSize = indicatorSize * 0.5;
250413
- screenPosition.x = Math.min(
250414
- Math.max(screenPosition.x, -indicatorSize),
250415
- containerWidth + indicatorSize
250416
- ) - halfSize;
250417
- screenPosition.y = Math.min(
250418
- Math.max(screenPosition.y, -indicatorSize),
250419
- containerHeight + indicatorSize
250420
- ) - halfSize;
250421
- this._screenPositionX = `${Math.floor(screenPosition.x + 0.25)}px`;
250422
- this._screenPositionY = `${Math.floor(screenPosition.y + 0.25)}px`;
250423
- }
250424
- }
250425
- };
250426
- SelectionIndicatorViewModel.prototype.animateAppear = function() {
250427
- this._tweens.addProperty({
250428
- object: this,
250429
- property: "_scale",
250430
- startValue: 2,
250431
- stopValue: 1,
250432
- duration: 0.8,
250433
- easingFunction: EasingFunction_default.EXPONENTIAL_OUT
250434
- });
250435
- };
250436
- SelectionIndicatorViewModel.prototype.animateDepart = function() {
250437
- this._tweens.addProperty({
250438
- object: this,
250439
- property: "_scale",
250440
- startValue: this._scale,
250441
- stopValue: 1.5,
250442
- duration: 0.8,
250443
- easingFunction: EasingFunction_default.EXPONENTIAL_OUT
250444
- });
250445
- };
250446
- Object.defineProperties(SelectionIndicatorViewModel.prototype, {
250447
- /**
250448
- * Gets the HTML element containing the selection indicator.
250449
- * @memberof SelectionIndicatorViewModel.prototype
250450
- *
250451
- * @type {Element}
250452
- */
250453
- container: {
250454
- get: function() {
250455
- return this._container;
250456
- }
250457
- },
250458
- /**
250459
- * Gets the HTML element that holds the selection indicator.
250460
- * @memberof SelectionIndicatorViewModel.prototype
250461
- *
250462
- * @type {Element}
250463
- */
250464
- selectionIndicatorElement: {
250465
- get: function() {
250466
- return this._selectionIndicatorElement;
250467
- }
250468
- },
250469
- /**
250470
- * Gets the scene being used.
250471
- * @memberof SelectionIndicatorViewModel.prototype
250472
- *
250473
- * @type {Scene}
250474
- */
250475
- scene: {
250476
- get: function() {
250477
- return this._scene;
250478
- }
250479
- }
250480
- });
250481
- var SelectionIndicatorViewModel_default = SelectionIndicatorViewModel;
250482
-
250483
- // packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
250484
- function SelectionIndicator(container, scene) {
250485
- if (!defined_default(container)) {
250486
- throw new DeveloperError_default("container is required.");
250487
- }
250488
- container = getElement_default(container);
250489
- this._container = container;
250490
- const el = document.createElement("div");
250491
- el.className = "cesium-selection-wrapper";
250492
- el.setAttribute(
250493
- "data-bind",
250494
- 'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'
250495
- );
250496
- container.appendChild(el);
250497
- this._element = el;
250498
- const svgNS3 = "http://www.w3.org/2000/svg";
250499
- const path = "M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z";
250500
- const svg2 = document.createElementNS(svgNS3, "svg:svg");
250501
- svg2.setAttribute("width", 160);
250502
- svg2.setAttribute("height", 160);
250503
- svg2.setAttribute("viewBox", "0 0 160 160");
250504
- const group = document.createElementNS(svgNS3, "g");
250505
- group.setAttribute("transform", "translate(80,80)");
250506
- svg2.appendChild(group);
250507
- const pathElement = document.createElementNS(svgNS3, "path");
250508
- pathElement.setAttribute("data-bind", "attr: { transform: _transform }");
250509
- pathElement.setAttribute("d", path);
250510
- group.appendChild(pathElement);
250511
- el.appendChild(svg2);
250512
- const viewModel = new SelectionIndicatorViewModel_default(
250513
- scene,
250514
- this._element,
250515
- this._container
250516
- );
250517
- this._viewModel = viewModel;
250518
- knockout_default.applyBindings(this._viewModel, this._element);
250519
- }
250520
- Object.defineProperties(SelectionIndicator.prototype, {
250521
- /**
250522
- * Gets the parent container.
250523
- * @memberof SelectionIndicator.prototype
250524
- *
250525
- * @type {Element}
250526
- */
250527
- container: {
250528
- get: function() {
250529
- return this._container;
250530
- }
250531
- },
250532
- /**
250533
- * Gets the view model.
250534
- * @memberof SelectionIndicator.prototype
250535
- *
250536
- * @type {SelectionIndicatorViewModel}
250537
- */
250538
- viewModel: {
250539
- get: function() {
250540
- return this._viewModel;
250541
- }
250542
- }
250543
- });
250544
- SelectionIndicator.prototype.isDestroyed = function() {
250545
- return false;
250546
- };
250547
- SelectionIndicator.prototype.destroy = function() {
250548
- const container = this._container;
250549
- knockout_default.cleanNode(this._element);
250550
- container.removeChild(this._element);
250551
- return destroyObject_default(this);
250552
- };
250553
- var SelectionIndicator_default = SelectionIndicator;
250554
-
250555
249885
  // packages/widgets/Source/NavigationHelpButton/NavigationHelpButtonViewModel.js
250556
249886
  function NavigationHelpButtonViewModel() {
250557
249887
  this.showInstructions = false;
@@ -250750,6 +250080,233 @@ NavigationHelpButton.prototype.destroy = function() {
250750
250080
  };
250751
250081
  var NavigationHelpButton_default = NavigationHelpButton;
250752
250082
 
250083
+ // packages/widgets/Source/ProjectionPicker/ProjectionPickerViewModel.js
250084
+ function ProjectionPickerViewModel(scene) {
250085
+ if (!defined_default(scene)) {
250086
+ throw new DeveloperError_default("scene is required.");
250087
+ }
250088
+ this._scene = scene;
250089
+ this._orthographic = scene.camera.frustum instanceof OrthographicFrustum_default;
250090
+ this._flightInProgress = false;
250091
+ this.dropDownVisible = false;
250092
+ this.tooltipPerspective = "Perspective Projection";
250093
+ this.tooltipOrthographic = "Orthographic Projection";
250094
+ this.selectedTooltip = void 0;
250095
+ this.sceneMode = scene.mode;
250096
+ knockout_default.track(this, [
250097
+ "_orthographic",
250098
+ "_flightInProgress",
250099
+ "sceneMode",
250100
+ "dropDownVisible",
250101
+ "tooltipPerspective",
250102
+ "tooltipOrthographic"
250103
+ ]);
250104
+ const that = this;
250105
+ knockout_default.defineProperty(this, "selectedTooltip", function() {
250106
+ if (that._orthographic) {
250107
+ return that.tooltipOrthographic;
250108
+ }
250109
+ return that.tooltipPerspective;
250110
+ });
250111
+ this._toggleDropDown = createCommand_default(function() {
250112
+ if (that.sceneMode === SceneMode_default.SCENE2D || that._flightInProgress) {
250113
+ return;
250114
+ }
250115
+ that.dropDownVisible = !that.dropDownVisible;
250116
+ });
250117
+ this._eventHelper = new EventHelper_default();
250118
+ this._eventHelper.add(
250119
+ scene.morphComplete,
250120
+ function(transitioner, oldMode, newMode, isMorphing) {
250121
+ that.sceneMode = newMode;
250122
+ that._orthographic = newMode === SceneMode_default.SCENE2D || that._scene.camera.frustum instanceof OrthographicFrustum_default;
250123
+ }
250124
+ );
250125
+ this._eventHelper.add(scene.preRender, function() {
250126
+ that._flightInProgress = defined_default(scene.camera._currentFlight);
250127
+ });
250128
+ this._switchToPerspective = createCommand_default(function() {
250129
+ if (that.sceneMode === SceneMode_default.SCENE2D) {
250130
+ return;
250131
+ }
250132
+ that._scene.camera.switchToPerspectiveFrustum();
250133
+ that._orthographic = false;
250134
+ that.dropDownVisible = false;
250135
+ });
250136
+ this._switchToOrthographic = createCommand_default(function() {
250137
+ if (that.sceneMode === SceneMode_default.SCENE2D) {
250138
+ return;
250139
+ }
250140
+ that._scene.camera.switchToOrthographicFrustum();
250141
+ that._orthographic = true;
250142
+ that.dropDownVisible = false;
250143
+ });
250144
+ this._sceneMode = SceneMode_default;
250145
+ }
250146
+ Object.defineProperties(ProjectionPickerViewModel.prototype, {
250147
+ /**
250148
+ * Gets the scene
250149
+ * @memberof ProjectionPickerViewModel.prototype
250150
+ * @type {Scene}
250151
+ */
250152
+ scene: {
250153
+ get: function() {
250154
+ return this._scene;
250155
+ }
250156
+ },
250157
+ /**
250158
+ * Gets the command to toggle the drop down box.
250159
+ * @memberof ProjectionPickerViewModel.prototype
250160
+ *
250161
+ * @type {Command}
250162
+ */
250163
+ toggleDropDown: {
250164
+ get: function() {
250165
+ return this._toggleDropDown;
250166
+ }
250167
+ },
250168
+ /**
250169
+ * Gets the command to switch to a perspective projection.
250170
+ * @memberof ProjectionPickerViewModel.prototype
250171
+ *
250172
+ * @type {Command}
250173
+ */
250174
+ switchToPerspective: {
250175
+ get: function() {
250176
+ return this._switchToPerspective;
250177
+ }
250178
+ },
250179
+ /**
250180
+ * Gets the command to switch to orthographic projection.
250181
+ * @memberof ProjectionPickerViewModel.prototype
250182
+ *
250183
+ * @type {Command}
250184
+ */
250185
+ switchToOrthographic: {
250186
+ get: function() {
250187
+ return this._switchToOrthographic;
250188
+ }
250189
+ },
250190
+ /**
250191
+ * Gets whether the scene is currently using an orthographic projection.
250192
+ * @memberof ProjectionPickerViewModel.prototype
250193
+ *
250194
+ * @type {Command}
250195
+ */
250196
+ isOrthographicProjection: {
250197
+ get: function() {
250198
+ return this._orthographic;
250199
+ }
250200
+ }
250201
+ });
250202
+ ProjectionPickerViewModel.prototype.isDestroyed = function() {
250203
+ return false;
250204
+ };
250205
+ ProjectionPickerViewModel.prototype.destroy = function() {
250206
+ this._eventHelper.removeAll();
250207
+ destroyObject_default(this);
250208
+ };
250209
+ var ProjectionPickerViewModel_default = ProjectionPickerViewModel;
250210
+
250211
+ // packages/widgets/Source/ProjectionPicker/ProjectionPicker.js
250212
+ var perspectivePath = "M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z";
250213
+ var orthographicPath = "m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";
250214
+ function ProjectionPicker(container, scene) {
250215
+ if (!defined_default(container)) {
250216
+ throw new DeveloperError_default("container is required.");
250217
+ }
250218
+ if (!defined_default(scene)) {
250219
+ throw new DeveloperError_default("scene is required.");
250220
+ }
250221
+ container = getElement_default(container);
250222
+ const viewModel = new ProjectionPickerViewModel_default(scene);
250223
+ viewModel._perspectivePath = perspectivePath;
250224
+ viewModel._orthographicPath = orthographicPath;
250225
+ const wrapper = document.createElement("span");
250226
+ wrapper.className = "cesium-projectionPicker-wrapper cesium-toolbar-button";
250227
+ container.appendChild(wrapper);
250228
+ const button = document.createElement("button");
250229
+ button.type = "button";
250230
+ button.className = "cesium-button cesium-toolbar-button";
250231
+ button.setAttribute(
250232
+ "data-bind",
250233
+ 'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'
250234
+ );
250235
+ button.innerHTML = '<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->';
250236
+ wrapper.appendChild(button);
250237
+ const perspectiveButton = document.createElement("button");
250238
+ perspectiveButton.type = "button";
250239
+ perspectiveButton.className = "cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon";
250240
+ perspectiveButton.setAttribute(
250241
+ "data-bind",
250242
+ 'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'
250243
+ );
250244
+ wrapper.appendChild(perspectiveButton);
250245
+ const orthographicButton = document.createElement("button");
250246
+ orthographicButton.type = "button";
250247
+ orthographicButton.className = "cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon";
250248
+ orthographicButton.setAttribute(
250249
+ "data-bind",
250250
+ 'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'
250251
+ );
250252
+ wrapper.appendChild(orthographicButton);
250253
+ knockout_default.applyBindings(viewModel, wrapper);
250254
+ this._viewModel = viewModel;
250255
+ this._container = container;
250256
+ this._wrapper = wrapper;
250257
+ this._closeDropDown = function(e) {
250258
+ if (!wrapper.contains(e.target)) {
250259
+ viewModel.dropDownVisible = false;
250260
+ }
250261
+ };
250262
+ if (FeatureDetection_default.supportsPointerEvents()) {
250263
+ document.addEventListener("pointerdown", this._closeDropDown, true);
250264
+ } else {
250265
+ document.addEventListener("mousedown", this._closeDropDown, true);
250266
+ document.addEventListener("touchstart", this._closeDropDown, true);
250267
+ }
250268
+ }
250269
+ Object.defineProperties(ProjectionPicker.prototype, {
250270
+ /**
250271
+ * Gets the parent container.
250272
+ * @memberof ProjectionPicker.prototype
250273
+ *
250274
+ * @type {Element}
250275
+ */
250276
+ container: {
250277
+ get: function() {
250278
+ return this._container;
250279
+ }
250280
+ },
250281
+ /**
250282
+ * Gets the view model.
250283
+ * @memberof ProjectionPicker.prototype
250284
+ *
250285
+ * @type {ProjectionPickerViewModel}
250286
+ */
250287
+ viewModel: {
250288
+ get: function() {
250289
+ return this._viewModel;
250290
+ }
250291
+ }
250292
+ });
250293
+ ProjectionPicker.prototype.isDestroyed = function() {
250294
+ return false;
250295
+ };
250296
+ ProjectionPicker.prototype.destroy = function() {
250297
+ this._viewModel.destroy();
250298
+ if (FeatureDetection_default.supportsPointerEvents()) {
250299
+ document.removeEventListener("pointerdown", this._closeDropDown, true);
250300
+ } else {
250301
+ document.removeEventListener("mousedown", this._closeDropDown, true);
250302
+ document.removeEventListener("touchstart", this._closeDropDown, true);
250303
+ }
250304
+ knockout_default.cleanNode(this._wrapper);
250305
+ this._container.removeChild(this._wrapper);
250306
+ return destroyObject_default(this);
250307
+ };
250308
+ var ProjectionPicker_default = ProjectionPicker;
250309
+
250753
250310
  // packages/widgets/Source/Timeline/TimelineHighlightRange.js
250754
250311
  function TimelineHighlightRange(color, heightInPx, base) {
250755
250312
  this._color = color;
@@ -251671,6 +251228,248 @@ Timeline.prototype.resize = function() {
251671
251228
  };
251672
251229
  var Timeline_default = Timeline;
251673
251230
 
251231
+ // packages/widgets/Source/SceneModePicker/SceneModePickerViewModel.js
251232
+ function SceneModePickerViewModel(scene, duration) {
251233
+ if (!defined_default(scene)) {
251234
+ throw new DeveloperError_default("scene is required.");
251235
+ }
251236
+ this._scene = scene;
251237
+ const that = this;
251238
+ const morphStart = function(transitioner, oldMode, newMode, isMorphing) {
251239
+ that.sceneMode = newMode;
251240
+ that.dropDownVisible = false;
251241
+ };
251242
+ this._eventHelper = new EventHelper_default();
251243
+ this._eventHelper.add(scene.morphStart, morphStart);
251244
+ this._duration = duration ?? 2;
251245
+ this.sceneMode = scene.mode;
251246
+ this.dropDownVisible = false;
251247
+ this.tooltip2D = "2D";
251248
+ this.tooltip3D = "3D";
251249
+ this.tooltipColumbusView = "Columbus View";
251250
+ knockout_default.track(this, [
251251
+ "sceneMode",
251252
+ "dropDownVisible",
251253
+ "tooltip2D",
251254
+ "tooltip3D",
251255
+ "tooltipColumbusView"
251256
+ ]);
251257
+ this.selectedTooltip = void 0;
251258
+ knockout_default.defineProperty(this, "selectedTooltip", function() {
251259
+ const mode2 = that.sceneMode;
251260
+ if (mode2 === SceneMode_default.SCENE2D) {
251261
+ return that.tooltip2D;
251262
+ }
251263
+ if (mode2 === SceneMode_default.SCENE3D) {
251264
+ return that.tooltip3D;
251265
+ }
251266
+ return that.tooltipColumbusView;
251267
+ });
251268
+ this._toggleDropDown = createCommand_default(function() {
251269
+ that.dropDownVisible = !that.dropDownVisible;
251270
+ });
251271
+ this._morphTo2D = createCommand_default(function() {
251272
+ scene.morphTo2D(that._duration);
251273
+ });
251274
+ this._morphTo3D = createCommand_default(function() {
251275
+ scene.morphTo3D(that._duration);
251276
+ });
251277
+ this._morphToColumbusView = createCommand_default(function() {
251278
+ scene.morphToColumbusView(that._duration);
251279
+ });
251280
+ this._sceneMode = SceneMode_default;
251281
+ }
251282
+ Object.defineProperties(SceneModePickerViewModel.prototype, {
251283
+ /**
251284
+ * Gets the scene
251285
+ * @memberof SceneModePickerViewModel.prototype
251286
+ * @type {Scene}
251287
+ */
251288
+ scene: {
251289
+ get: function() {
251290
+ return this._scene;
251291
+ }
251292
+ },
251293
+ /**
251294
+ * Gets or sets the the duration of scene mode transition animations in seconds.
251295
+ * A value of zero causes the scene to instantly change modes.
251296
+ * @memberof SceneModePickerViewModel.prototype
251297
+ * @type {number}
251298
+ */
251299
+ duration: {
251300
+ get: function() {
251301
+ return this._duration;
251302
+ },
251303
+ set: function(value) {
251304
+ if (value < 0) {
251305
+ throw new DeveloperError_default("duration value must be positive.");
251306
+ }
251307
+ this._duration = value;
251308
+ }
251309
+ },
251310
+ /**
251311
+ * Gets the command to toggle the drop down box.
251312
+ * @memberof SceneModePickerViewModel.prototype
251313
+ *
251314
+ * @type {Command}
251315
+ */
251316
+ toggleDropDown: {
251317
+ get: function() {
251318
+ return this._toggleDropDown;
251319
+ }
251320
+ },
251321
+ /**
251322
+ * Gets the command to morph to 2D.
251323
+ * @memberof SceneModePickerViewModel.prototype
251324
+ *
251325
+ * @type {Command}
251326
+ */
251327
+ morphTo2D: {
251328
+ get: function() {
251329
+ return this._morphTo2D;
251330
+ }
251331
+ },
251332
+ /**
251333
+ * Gets the command to morph to 3D.
251334
+ * @memberof SceneModePickerViewModel.prototype
251335
+ *
251336
+ * @type {Command}
251337
+ */
251338
+ morphTo3D: {
251339
+ get: function() {
251340
+ return this._morphTo3D;
251341
+ }
251342
+ },
251343
+ /**
251344
+ * Gets the command to morph to Columbus View.
251345
+ * @memberof SceneModePickerViewModel.prototype
251346
+ *
251347
+ * @type {Command}
251348
+ */
251349
+ morphToColumbusView: {
251350
+ get: function() {
251351
+ return this._morphToColumbusView;
251352
+ }
251353
+ }
251354
+ });
251355
+ SceneModePickerViewModel.prototype.isDestroyed = function() {
251356
+ return false;
251357
+ };
251358
+ SceneModePickerViewModel.prototype.destroy = function() {
251359
+ this._eventHelper.removeAll();
251360
+ destroyObject_default(this);
251361
+ };
251362
+ var SceneModePickerViewModel_default = SceneModePickerViewModel;
251363
+
251364
+ // packages/widgets/Source/SceneModePicker/SceneModePicker.js
251365
+ var globePath = "m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z";
251366
+ var flatMapPath = "m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z";
251367
+ var columbusViewPath = "m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";
251368
+ function SceneModePicker(container, scene, duration) {
251369
+ if (!defined_default(container)) {
251370
+ throw new DeveloperError_default("container is required.");
251371
+ }
251372
+ if (!defined_default(scene)) {
251373
+ throw new DeveloperError_default("scene is required.");
251374
+ }
251375
+ container = getElement_default(container);
251376
+ const viewModel = new SceneModePickerViewModel_default(scene, duration);
251377
+ viewModel._globePath = globePath;
251378
+ viewModel._flatMapPath = flatMapPath;
251379
+ viewModel._columbusViewPath = columbusViewPath;
251380
+ const wrapper = document.createElement("span");
251381
+ wrapper.className = "cesium-sceneModePicker-wrapper cesium-toolbar-button";
251382
+ container.appendChild(wrapper);
251383
+ const button = document.createElement("button");
251384
+ button.type = "button";
251385
+ button.className = "cesium-button cesium-toolbar-button";
251386
+ button.setAttribute(
251387
+ "data-bind",
251388
+ 'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'
251389
+ );
251390
+ button.innerHTML = '<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->';
251391
+ wrapper.appendChild(button);
251392
+ const morphTo3DButton = document.createElement("button");
251393
+ morphTo3DButton.type = "button";
251394
+ morphTo3DButton.className = "cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon";
251395
+ morphTo3DButton.setAttribute(
251396
+ "data-bind",
251397
+ 'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'
251398
+ );
251399
+ wrapper.appendChild(morphTo3DButton);
251400
+ const morphTo2DButton = document.createElement("button");
251401
+ morphTo2DButton.type = "button";
251402
+ morphTo2DButton.className = "cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon";
251403
+ morphTo2DButton.setAttribute(
251404
+ "data-bind",
251405
+ 'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'
251406
+ );
251407
+ wrapper.appendChild(morphTo2DButton);
251408
+ const morphToCVButton = document.createElement("button");
251409
+ morphToCVButton.type = "button";
251410
+ morphToCVButton.className = "cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon";
251411
+ morphToCVButton.setAttribute(
251412
+ "data-bind",
251413
+ 'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'
251414
+ );
251415
+ wrapper.appendChild(morphToCVButton);
251416
+ knockout_default.applyBindings(viewModel, wrapper);
251417
+ this._viewModel = viewModel;
251418
+ this._container = container;
251419
+ this._wrapper = wrapper;
251420
+ this._closeDropDown = function(e) {
251421
+ if (!wrapper.contains(e.target)) {
251422
+ viewModel.dropDownVisible = false;
251423
+ }
251424
+ };
251425
+ if (FeatureDetection_default.supportsPointerEvents()) {
251426
+ document.addEventListener("pointerdown", this._closeDropDown, true);
251427
+ } else {
251428
+ document.addEventListener("mousedown", this._closeDropDown, true);
251429
+ document.addEventListener("touchstart", this._closeDropDown, true);
251430
+ }
251431
+ }
251432
+ Object.defineProperties(SceneModePicker.prototype, {
251433
+ /**
251434
+ * Gets the parent container.
251435
+ * @memberof SceneModePicker.prototype
251436
+ *
251437
+ * @type {Element}
251438
+ */
251439
+ container: {
251440
+ get: function() {
251441
+ return this._container;
251442
+ }
251443
+ },
251444
+ /**
251445
+ * Gets the view model.
251446
+ * @memberof SceneModePicker.prototype
251447
+ *
251448
+ * @type {SceneModePickerViewModel}
251449
+ */
251450
+ viewModel: {
251451
+ get: function() {
251452
+ return this._viewModel;
251453
+ }
251454
+ }
251455
+ });
251456
+ SceneModePicker.prototype.isDestroyed = function() {
251457
+ return false;
251458
+ };
251459
+ SceneModePicker.prototype.destroy = function() {
251460
+ this._viewModel.destroy();
251461
+ if (FeatureDetection_default.supportsPointerEvents()) {
251462
+ document.removeEventListener("pointerdown", this._closeDropDown, true);
251463
+ } else {
251464
+ document.removeEventListener("mousedown", this._closeDropDown, true);
251465
+ document.removeEventListener("touchstart", this._closeDropDown, true);
251466
+ }
251467
+ knockout_default.cleanNode(this._wrapper);
251468
+ this._container.removeChild(this._wrapper);
251469
+ return destroyObject_default(this);
251470
+ };
251471
+ var SceneModePicker_default = SceneModePicker;
251472
+
251674
251473
  // packages/widgets/Source/VRButton/VRButtonViewModel.js
251675
251474
  var import_nosleep = __toESM(require_src(), 1);
251676
251475
  function lockScreen(orientation) {
@@ -252956,6 +252755,207 @@ function makeCoordinateRange(maxXTitle, minXTitle, maxYTitle, minYTitle, maxZTit
252956
252755
  }
252957
252756
  var VoxelInspector_default = VoxelInspector;
252958
252757
 
252758
+ // packages/widgets/Source/SelectionIndicator/SelectionIndicatorViewModel.js
252759
+ var screenSpacePos = new Cartesian2_default();
252760
+ var offScreen = "-1000px";
252761
+ function SelectionIndicatorViewModel(scene, selectionIndicatorElement, container) {
252762
+ if (!defined_default(scene)) {
252763
+ throw new DeveloperError_default("scene is required.");
252764
+ }
252765
+ if (!defined_default(selectionIndicatorElement)) {
252766
+ throw new DeveloperError_default("selectionIndicatorElement is required.");
252767
+ }
252768
+ if (!defined_default(container)) {
252769
+ throw new DeveloperError_default("container is required.");
252770
+ }
252771
+ this._scene = scene;
252772
+ this._screenPositionX = offScreen;
252773
+ this._screenPositionY = offScreen;
252774
+ this._tweens = scene.tweens;
252775
+ this._container = container ?? document.body;
252776
+ this._selectionIndicatorElement = selectionIndicatorElement;
252777
+ this._scale = 1;
252778
+ this.position = void 0;
252779
+ this.showSelection = false;
252780
+ knockout_default.track(this, [
252781
+ "position",
252782
+ "_screenPositionX",
252783
+ "_screenPositionY",
252784
+ "_scale",
252785
+ "showSelection"
252786
+ ]);
252787
+ this.isVisible = void 0;
252788
+ knockout_default.defineProperty(this, "isVisible", {
252789
+ get: function() {
252790
+ return this.showSelection && defined_default(this.position);
252791
+ }
252792
+ });
252793
+ knockout_default.defineProperty(this, "_transform", {
252794
+ get: function() {
252795
+ return `scale(${this._scale})`;
252796
+ }
252797
+ });
252798
+ this.computeScreenSpacePosition = function(position, result) {
252799
+ return SceneTransforms_default.worldToWindowCoordinates(scene, position, result);
252800
+ };
252801
+ }
252802
+ SelectionIndicatorViewModel.prototype.update = function() {
252803
+ if (this.showSelection && defined_default(this.position)) {
252804
+ const screenPosition = this.computeScreenSpacePosition(
252805
+ this.position,
252806
+ screenSpacePos
252807
+ );
252808
+ if (!defined_default(screenPosition)) {
252809
+ this._screenPositionX = offScreen;
252810
+ this._screenPositionY = offScreen;
252811
+ } else {
252812
+ const container = this._container;
252813
+ const containerWidth = container.parentNode.clientWidth;
252814
+ const containerHeight = container.parentNode.clientHeight;
252815
+ const indicatorSize = this._selectionIndicatorElement.clientWidth;
252816
+ const halfSize = indicatorSize * 0.5;
252817
+ screenPosition.x = Math.min(
252818
+ Math.max(screenPosition.x, -indicatorSize),
252819
+ containerWidth + indicatorSize
252820
+ ) - halfSize;
252821
+ screenPosition.y = Math.min(
252822
+ Math.max(screenPosition.y, -indicatorSize),
252823
+ containerHeight + indicatorSize
252824
+ ) - halfSize;
252825
+ this._screenPositionX = `${Math.floor(screenPosition.x + 0.25)}px`;
252826
+ this._screenPositionY = `${Math.floor(screenPosition.y + 0.25)}px`;
252827
+ }
252828
+ }
252829
+ };
252830
+ SelectionIndicatorViewModel.prototype.animateAppear = function() {
252831
+ this._tweens.addProperty({
252832
+ object: this,
252833
+ property: "_scale",
252834
+ startValue: 2,
252835
+ stopValue: 1,
252836
+ duration: 0.8,
252837
+ easingFunction: EasingFunction_default.EXPONENTIAL_OUT
252838
+ });
252839
+ };
252840
+ SelectionIndicatorViewModel.prototype.animateDepart = function() {
252841
+ this._tweens.addProperty({
252842
+ object: this,
252843
+ property: "_scale",
252844
+ startValue: this._scale,
252845
+ stopValue: 1.5,
252846
+ duration: 0.8,
252847
+ easingFunction: EasingFunction_default.EXPONENTIAL_OUT
252848
+ });
252849
+ };
252850
+ Object.defineProperties(SelectionIndicatorViewModel.prototype, {
252851
+ /**
252852
+ * Gets the HTML element containing the selection indicator.
252853
+ * @memberof SelectionIndicatorViewModel.prototype
252854
+ *
252855
+ * @type {Element}
252856
+ */
252857
+ container: {
252858
+ get: function() {
252859
+ return this._container;
252860
+ }
252861
+ },
252862
+ /**
252863
+ * Gets the HTML element that holds the selection indicator.
252864
+ * @memberof SelectionIndicatorViewModel.prototype
252865
+ *
252866
+ * @type {Element}
252867
+ */
252868
+ selectionIndicatorElement: {
252869
+ get: function() {
252870
+ return this._selectionIndicatorElement;
252871
+ }
252872
+ },
252873
+ /**
252874
+ * Gets the scene being used.
252875
+ * @memberof SelectionIndicatorViewModel.prototype
252876
+ *
252877
+ * @type {Scene}
252878
+ */
252879
+ scene: {
252880
+ get: function() {
252881
+ return this._scene;
252882
+ }
252883
+ }
252884
+ });
252885
+ var SelectionIndicatorViewModel_default = SelectionIndicatorViewModel;
252886
+
252887
+ // packages/widgets/Source/SelectionIndicator/SelectionIndicator.js
252888
+ function SelectionIndicator(container, scene) {
252889
+ if (!defined_default(container)) {
252890
+ throw new DeveloperError_default("container is required.");
252891
+ }
252892
+ container = getElement_default(container);
252893
+ this._container = container;
252894
+ const el = document.createElement("div");
252895
+ el.className = "cesium-selection-wrapper";
252896
+ el.setAttribute(
252897
+ "data-bind",
252898
+ 'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'
252899
+ );
252900
+ container.appendChild(el);
252901
+ this._element = el;
252902
+ const svgNS3 = "http://www.w3.org/2000/svg";
252903
+ const path = "M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z";
252904
+ const svg2 = document.createElementNS(svgNS3, "svg:svg");
252905
+ svg2.setAttribute("width", 160);
252906
+ svg2.setAttribute("height", 160);
252907
+ svg2.setAttribute("viewBox", "0 0 160 160");
252908
+ const group = document.createElementNS(svgNS3, "g");
252909
+ group.setAttribute("transform", "translate(80,80)");
252910
+ svg2.appendChild(group);
252911
+ const pathElement = document.createElementNS(svgNS3, "path");
252912
+ pathElement.setAttribute("data-bind", "attr: { transform: _transform }");
252913
+ pathElement.setAttribute("d", path);
252914
+ group.appendChild(pathElement);
252915
+ el.appendChild(svg2);
252916
+ const viewModel = new SelectionIndicatorViewModel_default(
252917
+ scene,
252918
+ this._element,
252919
+ this._container
252920
+ );
252921
+ this._viewModel = viewModel;
252922
+ knockout_default.applyBindings(this._viewModel, this._element);
252923
+ }
252924
+ Object.defineProperties(SelectionIndicator.prototype, {
252925
+ /**
252926
+ * Gets the parent container.
252927
+ * @memberof SelectionIndicator.prototype
252928
+ *
252929
+ * @type {Element}
252930
+ */
252931
+ container: {
252932
+ get: function() {
252933
+ return this._container;
252934
+ }
252935
+ },
252936
+ /**
252937
+ * Gets the view model.
252938
+ * @memberof SelectionIndicator.prototype
252939
+ *
252940
+ * @type {SelectionIndicatorViewModel}
252941
+ */
252942
+ viewModel: {
252943
+ get: function() {
252944
+ return this._viewModel;
252945
+ }
252946
+ }
252947
+ });
252948
+ SelectionIndicator.prototype.isDestroyed = function() {
252949
+ return false;
252950
+ };
252951
+ SelectionIndicator.prototype.destroy = function() {
252952
+ const container = this._container;
252953
+ knockout_default.cleanNode(this._element);
252954
+ container.removeChild(this._element);
252955
+ return destroyObject_default(this);
252956
+ };
252957
+ var SelectionIndicator_default = SelectionIndicator;
252958
+
252959
252959
  // packages/widgets/Source/Viewer/Viewer.js
252960
252960
  var boundingSphereScratch5 = new BoundingSphere_default();
252961
252961
  function onTimelineScrubfunction(e) {
@@ -254680,10 +254680,10 @@ function viewerVoxelInspectorMixin(viewer) {
254680
254680
  var viewerVoxelInspectorMixin_default = viewerVoxelInspectorMixin;
254681
254681
 
254682
254682
  // packages/widgets/index.js
254683
- globalThis.CESIUM_VERSION = "1.128.23";
254683
+ globalThis.CESIUM_VERSION = "1.128.26";
254684
254684
 
254685
254685
  // Source/Cesium.js
254686
- var VERSION2 = "1.128.23";
254686
+ var VERSION2 = "1.128.26";
254687
254687
  export {
254688
254688
  AlphaMode_default as AlphaMode,
254689
254689
  AlphaPipelineStage_default as AlphaPipelineStage,