iflow-engine-base-3d 3.11.3 → 3.11.4

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 (404) hide show
  1. package/dist/bim-engine-sdk.es.js +9 -50
  2. package/dist/bim-engine-sdk.umd.js +291 -18724
  3. package/dist/chunks/{engine-3d-Cq9w_B8R.js → engine-3d-9GJt1rzb.js} +490 -550
  4. package/dist/chunks/{sdk-assets-DseBGYv8.js → sdk-assets-BbXNfc5u.js} +11 -11
  5. package/dist/chunks/sdk-runtime-kyCuafGM.js +1174 -0
  6. package/dist/chunks/sdk-vendor-DYgn7sFs.js +22392 -0
  7. package/dist/chunks/{three-vendor-M4ZIGmaO.js → three-vendor-ox3_iXFc.js} +6604 -7305
  8. package/dist/iflow-engine-base.css +1 -1
  9. package/dist/index.d.ts +6 -7314
  10. package/package.json +2 -1
  11. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +0 -1
  12. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +0 -1
  13. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +0 -1
  14. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +0 -1
  15. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +0 -1
  16. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +0 -1
  17. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +0 -1
  18. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +0 -1
  19. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +0 -1
  20. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +0 -1
  21. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +0 -1
  22. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +0 -1
  23. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +0 -1
  24. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +0 -1
  25. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +0 -1
  26. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +0 -1
  27. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +0 -1
  28. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +0 -1
  29. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +0 -1
  30. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +0 -1
  31. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +0 -1
  32. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +0 -1
  33. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +0 -1
  34. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +0 -1
  35. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +0 -1
  36. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +0 -1
  37. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +0 -1
  38. package/dist/Cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +0 -1
  39. package/dist/Cesium/Assets/Images/bing_maps_credit.png +0 -0
  40. package/dist/Cesium/Assets/Images/cesium_credit.png +0 -0
  41. package/dist/Cesium/Assets/Images/google_earth_credit.png +0 -0
  42. package/dist/Cesium/Assets/Images/ion-credit.png +0 -0
  43. package/dist/Cesium/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  44. package/dist/Cesium/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  45. package/dist/Cesium/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  46. package/dist/Cesium/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  47. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  48. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  49. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  50. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  51. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  52. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  53. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  54. package/dist/Cesium/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  55. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  56. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  57. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  58. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  59. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  60. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  61. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  62. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  63. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  64. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  65. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  66. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  67. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  68. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  69. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  70. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  71. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  72. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  73. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  74. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  75. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  76. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  77. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  78. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  79. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  80. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  81. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  82. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  83. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  84. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  85. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  86. package/dist/Cesium/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  87. package/dist/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml +0 -14
  88. package/dist/Cesium/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  89. package/dist/Cesium/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  90. package/dist/Cesium/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  91. package/dist/Cesium/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  92. package/dist/Cesium/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  93. package/dist/Cesium/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  94. package/dist/Cesium/Assets/Textures/maki/airfield.png +0 -0
  95. package/dist/Cesium/Assets/Textures/maki/airport.png +0 -0
  96. package/dist/Cesium/Assets/Textures/maki/alcohol-shop.png +0 -0
  97. package/dist/Cesium/Assets/Textures/maki/america-football.png +0 -0
  98. package/dist/Cesium/Assets/Textures/maki/art-gallery.png +0 -0
  99. package/dist/Cesium/Assets/Textures/maki/bakery.png +0 -0
  100. package/dist/Cesium/Assets/Textures/maki/bank.png +0 -0
  101. package/dist/Cesium/Assets/Textures/maki/bar.png +0 -0
  102. package/dist/Cesium/Assets/Textures/maki/baseball.png +0 -0
  103. package/dist/Cesium/Assets/Textures/maki/basketball.png +0 -0
  104. package/dist/Cesium/Assets/Textures/maki/beer.png +0 -0
  105. package/dist/Cesium/Assets/Textures/maki/bicycle.png +0 -0
  106. package/dist/Cesium/Assets/Textures/maki/building.png +0 -0
  107. package/dist/Cesium/Assets/Textures/maki/bus.png +0 -0
  108. package/dist/Cesium/Assets/Textures/maki/cafe.png +0 -0
  109. package/dist/Cesium/Assets/Textures/maki/camera.png +0 -0
  110. package/dist/Cesium/Assets/Textures/maki/campsite.png +0 -0
  111. package/dist/Cesium/Assets/Textures/maki/car.png +0 -0
  112. package/dist/Cesium/Assets/Textures/maki/cemetery.png +0 -0
  113. package/dist/Cesium/Assets/Textures/maki/cesium.png +0 -0
  114. package/dist/Cesium/Assets/Textures/maki/chemist.png +0 -0
  115. package/dist/Cesium/Assets/Textures/maki/cinema.png +0 -0
  116. package/dist/Cesium/Assets/Textures/maki/circle-stroked.png +0 -0
  117. package/dist/Cesium/Assets/Textures/maki/circle.png +0 -0
  118. package/dist/Cesium/Assets/Textures/maki/city.png +0 -0
  119. package/dist/Cesium/Assets/Textures/maki/clothing-store.png +0 -0
  120. package/dist/Cesium/Assets/Textures/maki/college.png +0 -0
  121. package/dist/Cesium/Assets/Textures/maki/commercial.png +0 -0
  122. package/dist/Cesium/Assets/Textures/maki/cricket.png +0 -0
  123. package/dist/Cesium/Assets/Textures/maki/cross.png +0 -0
  124. package/dist/Cesium/Assets/Textures/maki/dam.png +0 -0
  125. package/dist/Cesium/Assets/Textures/maki/danger.png +0 -0
  126. package/dist/Cesium/Assets/Textures/maki/disability.png +0 -0
  127. package/dist/Cesium/Assets/Textures/maki/dog-park.png +0 -0
  128. package/dist/Cesium/Assets/Textures/maki/embassy.png +0 -0
  129. package/dist/Cesium/Assets/Textures/maki/emergency-telephone.png +0 -0
  130. package/dist/Cesium/Assets/Textures/maki/entrance.png +0 -0
  131. package/dist/Cesium/Assets/Textures/maki/farm.png +0 -0
  132. package/dist/Cesium/Assets/Textures/maki/fast-food.png +0 -0
  133. package/dist/Cesium/Assets/Textures/maki/ferry.png +0 -0
  134. package/dist/Cesium/Assets/Textures/maki/fire-station.png +0 -0
  135. package/dist/Cesium/Assets/Textures/maki/fuel.png +0 -0
  136. package/dist/Cesium/Assets/Textures/maki/garden.png +0 -0
  137. package/dist/Cesium/Assets/Textures/maki/gift.png +0 -0
  138. package/dist/Cesium/Assets/Textures/maki/golf.png +0 -0
  139. package/dist/Cesium/Assets/Textures/maki/grocery.png +0 -0
  140. package/dist/Cesium/Assets/Textures/maki/hairdresser.png +0 -0
  141. package/dist/Cesium/Assets/Textures/maki/harbor.png +0 -0
  142. package/dist/Cesium/Assets/Textures/maki/heart.png +0 -0
  143. package/dist/Cesium/Assets/Textures/maki/heliport.png +0 -0
  144. package/dist/Cesium/Assets/Textures/maki/hospital.png +0 -0
  145. package/dist/Cesium/Assets/Textures/maki/ice-cream.png +0 -0
  146. package/dist/Cesium/Assets/Textures/maki/industrial.png +0 -0
  147. package/dist/Cesium/Assets/Textures/maki/land-use.png +0 -0
  148. package/dist/Cesium/Assets/Textures/maki/laundry.png +0 -0
  149. package/dist/Cesium/Assets/Textures/maki/library.png +0 -0
  150. package/dist/Cesium/Assets/Textures/maki/lighthouse.png +0 -0
  151. package/dist/Cesium/Assets/Textures/maki/lodging.png +0 -0
  152. package/dist/Cesium/Assets/Textures/maki/logging.png +0 -0
  153. package/dist/Cesium/Assets/Textures/maki/london-underground.png +0 -0
  154. package/dist/Cesium/Assets/Textures/maki/marker-stroked.png +0 -0
  155. package/dist/Cesium/Assets/Textures/maki/marker.png +0 -0
  156. package/dist/Cesium/Assets/Textures/maki/minefield.png +0 -0
  157. package/dist/Cesium/Assets/Textures/maki/mobilephone.png +0 -0
  158. package/dist/Cesium/Assets/Textures/maki/monument.png +0 -0
  159. package/dist/Cesium/Assets/Textures/maki/museum.png +0 -0
  160. package/dist/Cesium/Assets/Textures/maki/music.png +0 -0
  161. package/dist/Cesium/Assets/Textures/maki/oil-well.png +0 -0
  162. package/dist/Cesium/Assets/Textures/maki/park.png +0 -0
  163. package/dist/Cesium/Assets/Textures/maki/park2.png +0 -0
  164. package/dist/Cesium/Assets/Textures/maki/parking-garage.png +0 -0
  165. package/dist/Cesium/Assets/Textures/maki/parking.png +0 -0
  166. package/dist/Cesium/Assets/Textures/maki/pharmacy.png +0 -0
  167. package/dist/Cesium/Assets/Textures/maki/pitch.png +0 -0
  168. package/dist/Cesium/Assets/Textures/maki/place-of-worship.png +0 -0
  169. package/dist/Cesium/Assets/Textures/maki/playground.png +0 -0
  170. package/dist/Cesium/Assets/Textures/maki/police.png +0 -0
  171. package/dist/Cesium/Assets/Textures/maki/polling-place.png +0 -0
  172. package/dist/Cesium/Assets/Textures/maki/post.png +0 -0
  173. package/dist/Cesium/Assets/Textures/maki/prison.png +0 -0
  174. package/dist/Cesium/Assets/Textures/maki/rail-above.png +0 -0
  175. package/dist/Cesium/Assets/Textures/maki/rail-light.png +0 -0
  176. package/dist/Cesium/Assets/Textures/maki/rail-metro.png +0 -0
  177. package/dist/Cesium/Assets/Textures/maki/rail-underground.png +0 -0
  178. package/dist/Cesium/Assets/Textures/maki/rail.png +0 -0
  179. package/dist/Cesium/Assets/Textures/maki/religious-christian.png +0 -0
  180. package/dist/Cesium/Assets/Textures/maki/religious-jewish.png +0 -0
  181. package/dist/Cesium/Assets/Textures/maki/religious-muslim.png +0 -0
  182. package/dist/Cesium/Assets/Textures/maki/restaurant.png +0 -0
  183. package/dist/Cesium/Assets/Textures/maki/roadblock.png +0 -0
  184. package/dist/Cesium/Assets/Textures/maki/rocket.png +0 -0
  185. package/dist/Cesium/Assets/Textures/maki/school.png +0 -0
  186. package/dist/Cesium/Assets/Textures/maki/scooter.png +0 -0
  187. package/dist/Cesium/Assets/Textures/maki/shop.png +0 -0
  188. package/dist/Cesium/Assets/Textures/maki/skiing.png +0 -0
  189. package/dist/Cesium/Assets/Textures/maki/slaughterhouse.png +0 -0
  190. package/dist/Cesium/Assets/Textures/maki/soccer.png +0 -0
  191. package/dist/Cesium/Assets/Textures/maki/square-stroked.png +0 -0
  192. package/dist/Cesium/Assets/Textures/maki/square.png +0 -0
  193. package/dist/Cesium/Assets/Textures/maki/star-stroked.png +0 -0
  194. package/dist/Cesium/Assets/Textures/maki/star.png +0 -0
  195. package/dist/Cesium/Assets/Textures/maki/suitcase.png +0 -0
  196. package/dist/Cesium/Assets/Textures/maki/swimming.png +0 -0
  197. package/dist/Cesium/Assets/Textures/maki/telephone.png +0 -0
  198. package/dist/Cesium/Assets/Textures/maki/tennis.png +0 -0
  199. package/dist/Cesium/Assets/Textures/maki/theatre.png +0 -0
  200. package/dist/Cesium/Assets/Textures/maki/toilets.png +0 -0
  201. package/dist/Cesium/Assets/Textures/maki/town-hall.png +0 -0
  202. package/dist/Cesium/Assets/Textures/maki/town.png +0 -0
  203. package/dist/Cesium/Assets/Textures/maki/triangle-stroked.png +0 -0
  204. package/dist/Cesium/Assets/Textures/maki/triangle.png +0 -0
  205. package/dist/Cesium/Assets/Textures/maki/village.png +0 -0
  206. package/dist/Cesium/Assets/Textures/maki/warehouse.png +0 -0
  207. package/dist/Cesium/Assets/Textures/maki/waste-basket.png +0 -0
  208. package/dist/Cesium/Assets/Textures/maki/water.png +0 -0
  209. package/dist/Cesium/Assets/Textures/maki/wetland.png +0 -0
  210. package/dist/Cesium/Assets/Textures/maki/zoo.png +0 -0
  211. package/dist/Cesium/Assets/Textures/moonSmall.jpg +0 -0
  212. package/dist/Cesium/Assets/Textures/pin.svg +0 -1
  213. package/dist/Cesium/Assets/Textures/waterNormals.jpg +0 -0
  214. package/dist/Cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
  215. package/dist/Cesium/Assets/approximateTerrainHeights.json +0 -1
  216. package/dist/Cesium/Cesium.js +0 -17946
  217. package/dist/Cesium/ThirdParty/Workers/package.json +0 -1
  218. package/dist/Cesium/ThirdParty/Workers/zip-web-worker.js +0 -1
  219. package/dist/Cesium/ThirdParty/basis_transcoder.wasm +0 -0
  220. package/dist/Cesium/ThirdParty/draco_decoder.wasm +0 -0
  221. package/dist/Cesium/ThirdParty/google-earth-dbroot-parser.js +0 -1
  222. package/dist/Cesium/ThirdParty/wasm_splats_bg.wasm +0 -0
  223. package/dist/Cesium/ThirdParty/zip-module.wasm +0 -0
  224. package/dist/Cesium/Widgets/Animation/Animation.css +0 -127
  225. package/dist/Cesium/Widgets/Animation/lighter.css +0 -70
  226. package/dist/Cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +0 -108
  227. package/dist/Cesium/Widgets/BaseLayerPicker/lighter.css +0 -22
  228. package/dist/Cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +0 -102
  229. package/dist/Cesium/Widgets/CesiumInspector/CesiumInspector.css +0 -113
  230. package/dist/Cesium/Widgets/CesiumWidget/CesiumWidget.css +0 -119
  231. package/dist/Cesium/Widgets/CesiumWidget/lighter.css +0 -14
  232. package/dist/Cesium/Widgets/FullscreenButton/FullscreenButton.css +0 -8
  233. package/dist/Cesium/Widgets/Geocoder/Geocoder.css +0 -70
  234. package/dist/Cesium/Widgets/Geocoder/lighter.css +0 -17
  235. package/dist/Cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +0 -27
  236. package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
  237. package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
  238. package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
  239. package/dist/Cesium/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
  240. package/dist/Cesium/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
  241. package/dist/Cesium/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
  242. package/dist/Cesium/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
  243. package/dist/Cesium/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
  244. package/dist/Cesium/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
  245. package/dist/Cesium/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
  246. package/dist/Cesium/Widgets/Images/ImageryProviders/googleContour.png +0 -0
  247. package/dist/Cesium/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
  248. package/dist/Cesium/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
  249. package/dist/Cesium/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
  250. package/dist/Cesium/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
  251. package/dist/Cesium/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
  252. package/dist/Cesium/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
  253. package/dist/Cesium/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
  254. package/dist/Cesium/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
  255. package/dist/Cesium/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
  256. package/dist/Cesium/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
  257. package/dist/Cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
  258. package/dist/Cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
  259. package/dist/Cesium/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
  260. package/dist/Cesium/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
  261. package/dist/Cesium/Widgets/Images/NavigationHelp/Mouse.svg +0 -84
  262. package/dist/Cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +0 -76
  263. package/dist/Cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +0 -76
  264. package/dist/Cesium/Widgets/Images/NavigationHelp/MouseRight.svg +0 -76
  265. package/dist/Cesium/Widgets/Images/NavigationHelp/Touch.svg +0 -120
  266. package/dist/Cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +0 -129
  267. package/dist/Cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +0 -76
  268. package/dist/Cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +0 -135
  269. package/dist/Cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +0 -74
  270. package/dist/Cesium/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
  271. package/dist/Cesium/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
  272. package/dist/Cesium/Widgets/Images/TimelineIcons.png +0 -0
  273. package/dist/Cesium/Widgets/Images/info-loading.gif +0 -0
  274. package/dist/Cesium/Widgets/InfoBox/InfoBox.css +0 -92
  275. package/dist/Cesium/Widgets/InfoBox/InfoBoxDescription.css +0 -178
  276. package/dist/Cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +0 -93
  277. package/dist/Cesium/Widgets/NavigationHelpButton/lighter.css +0 -38
  278. package/dist/Cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +0 -15
  279. package/dist/Cesium/Widgets/ProjectionPicker/ProjectionPicker.css +0 -38
  280. package/dist/Cesium/Widgets/SceneModePicker/SceneModePicker.css +0 -56
  281. package/dist/Cesium/Widgets/SelectionIndicator/SelectionIndicator.css +0 -20
  282. package/dist/Cesium/Widgets/Timeline/Timeline.css +0 -103
  283. package/dist/Cesium/Widgets/Timeline/lighter.css +0 -23
  284. package/dist/Cesium/Widgets/VRButton/VRButton.css +0 -8
  285. package/dist/Cesium/Widgets/Viewer/Viewer.css +0 -107
  286. package/dist/Cesium/Widgets/VoxelInspector/VoxelInspector.css +0 -16
  287. package/dist/Cesium/Widgets/lighter.css +0 -237
  288. package/dist/Cesium/Widgets/lighterShared.css +0 -46
  289. package/dist/Cesium/Widgets/shared.css +0 -103
  290. package/dist/Cesium/Widgets/widgets.css +0 -1342
  291. package/dist/Cesium/Workers/chunk-236YIEYT.js +0 -26
  292. package/dist/Cesium/Workers/chunk-2ZYB3DYT.js +0 -26
  293. package/dist/Cesium/Workers/chunk-4M56RRIL.js +0 -26
  294. package/dist/Cesium/Workers/chunk-5BC2Q3QW.js +0 -26
  295. package/dist/Cesium/Workers/chunk-5XHUDY37.js +0 -26
  296. package/dist/Cesium/Workers/chunk-6WMLAJJP.js +0 -26
  297. package/dist/Cesium/Workers/chunk-72KUXMWU.js +0 -26
  298. package/dist/Cesium/Workers/chunk-7NQYTTAU.js +0 -26
  299. package/dist/Cesium/Workers/chunk-A35GG5WJ.js +0 -26
  300. package/dist/Cesium/Workers/chunk-AXNBHUAG.js +0 -26
  301. package/dist/Cesium/Workers/chunk-DC3K7YTH.js +0 -26
  302. package/dist/Cesium/Workers/chunk-DRBPXGI7.js +0 -26
  303. package/dist/Cesium/Workers/chunk-EARRZPMO.js +0 -26
  304. package/dist/Cesium/Workers/chunk-EHC3BDVP.js +0 -26
  305. package/dist/Cesium/Workers/chunk-EYZUSGKM.js +0 -26
  306. package/dist/Cesium/Workers/chunk-EZSKHVA2.js +0 -26
  307. package/dist/Cesium/Workers/chunk-F3WJIFOO.js +0 -26
  308. package/dist/Cesium/Workers/chunk-FB7UV5BI.js +0 -26
  309. package/dist/Cesium/Workers/chunk-FC6IYMYF.js +0 -26
  310. package/dist/Cesium/Workers/chunk-GF67PEXE.js +0 -27
  311. package/dist/Cesium/Workers/chunk-GXEQRH2R.js +0 -26
  312. package/dist/Cesium/Workers/chunk-I5NKQIWE.js +0 -26
  313. package/dist/Cesium/Workers/chunk-IH7GXIUB.js +0 -26
  314. package/dist/Cesium/Workers/chunk-IPP3UFGH.js +0 -26
  315. package/dist/Cesium/Workers/chunk-IYRGNBSH.js +0 -26
  316. package/dist/Cesium/Workers/chunk-J6BM74AD.js +0 -26
  317. package/dist/Cesium/Workers/chunk-KG2GJUJT.js +0 -26
  318. package/dist/Cesium/Workers/chunk-L7UE5MMF.js +0 -26
  319. package/dist/Cesium/Workers/chunk-LBZ34MHQ.js +0 -26
  320. package/dist/Cesium/Workers/chunk-LOQDTQMX.js +0 -26
  321. package/dist/Cesium/Workers/chunk-LYLRYC4L.js +0 -29
  322. package/dist/Cesium/Workers/chunk-MGPRMLLW.js +0 -26
  323. package/dist/Cesium/Workers/chunk-NP26LKQA.js +0 -26
  324. package/dist/Cesium/Workers/chunk-OMUAZ3NM.js +0 -26
  325. package/dist/Cesium/Workers/chunk-PPFUDJN4.js +0 -26
  326. package/dist/Cesium/Workers/chunk-PQ3V63XF.js +0 -27
  327. package/dist/Cesium/Workers/chunk-PWBQN4GK.js +0 -26
  328. package/dist/Cesium/Workers/chunk-QOTMLO2T.js +0 -26
  329. package/dist/Cesium/Workers/chunk-SP35IT73.js +0 -26
  330. package/dist/Cesium/Workers/chunk-T3ZGSZKA.js +0 -26
  331. package/dist/Cesium/Workers/chunk-TM6SYYHO.js +0 -28
  332. package/dist/Cesium/Workers/chunk-TSGIJVWH.js +0 -26
  333. package/dist/Cesium/Workers/chunk-U3YGOX3C.js +0 -63
  334. package/dist/Cesium/Workers/chunk-VBYOXOSM.js +0 -26
  335. package/dist/Cesium/Workers/chunk-VCOHJNKB.js +0 -26
  336. package/dist/Cesium/Workers/chunk-VXAZXMUX.js +0 -26
  337. package/dist/Cesium/Workers/chunk-VXCJOT4W.js +0 -26
  338. package/dist/Cesium/Workers/chunk-WPD3MB6X.js +0 -26
  339. package/dist/Cesium/Workers/chunk-X4D5KUN5.js +0 -26
  340. package/dist/Cesium/Workers/chunk-XEC656IT.js +0 -26
  341. package/dist/Cesium/Workers/chunk-XR53QRQS.js +0 -26
  342. package/dist/Cesium/Workers/chunk-XR7MN4PJ.js +0 -28
  343. package/dist/Cesium/Workers/chunk-XU6O4MRS.js +0 -26
  344. package/dist/Cesium/Workers/chunk-XZBHEBLF.js +0 -29
  345. package/dist/Cesium/Workers/chunk-Z2M4BF4E.js +0 -26
  346. package/dist/Cesium/Workers/chunk-Z4ERBZFB.js +0 -26
  347. package/dist/Cesium/Workers/chunk-ZY2KCIWI.js +0 -26
  348. package/dist/Cesium/Workers/combineGeometry.js +0 -26
  349. package/dist/Cesium/Workers/createBoxGeometry.js +0 -26
  350. package/dist/Cesium/Workers/createBoxOutlineGeometry.js +0 -26
  351. package/dist/Cesium/Workers/createCircleGeometry.js +0 -26
  352. package/dist/Cesium/Workers/createCircleOutlineGeometry.js +0 -26
  353. package/dist/Cesium/Workers/createCoplanarPolygonGeometry.js +0 -26
  354. package/dist/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +0 -26
  355. package/dist/Cesium/Workers/createCorridorGeometry.js +0 -26
  356. package/dist/Cesium/Workers/createCorridorOutlineGeometry.js +0 -26
  357. package/dist/Cesium/Workers/createCylinderGeometry.js +0 -26
  358. package/dist/Cesium/Workers/createCylinderOutlineGeometry.js +0 -26
  359. package/dist/Cesium/Workers/createEllipseGeometry.js +0 -26
  360. package/dist/Cesium/Workers/createEllipseOutlineGeometry.js +0 -26
  361. package/dist/Cesium/Workers/createEllipsoidGeometry.js +0 -26
  362. package/dist/Cesium/Workers/createEllipsoidOutlineGeometry.js +0 -26
  363. package/dist/Cesium/Workers/createFrustumGeometry.js +0 -26
  364. package/dist/Cesium/Workers/createFrustumOutlineGeometry.js +0 -26
  365. package/dist/Cesium/Workers/createGeometry.js +0 -26
  366. package/dist/Cesium/Workers/createGroundPolylineGeometry.js +0 -26
  367. package/dist/Cesium/Workers/createPlaneGeometry.js +0 -26
  368. package/dist/Cesium/Workers/createPlaneOutlineGeometry.js +0 -26
  369. package/dist/Cesium/Workers/createPolygonGeometry.js +0 -26
  370. package/dist/Cesium/Workers/createPolygonOutlineGeometry.js +0 -26
  371. package/dist/Cesium/Workers/createPolylineGeometry.js +0 -26
  372. package/dist/Cesium/Workers/createPolylineVolumeGeometry.js +0 -26
  373. package/dist/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +0 -26
  374. package/dist/Cesium/Workers/createRectangleGeometry.js +0 -26
  375. package/dist/Cesium/Workers/createRectangleOutlineGeometry.js +0 -26
  376. package/dist/Cesium/Workers/createSimplePolylineGeometry.js +0 -26
  377. package/dist/Cesium/Workers/createSphereGeometry.js +0 -26
  378. package/dist/Cesium/Workers/createSphereOutlineGeometry.js +0 -26
  379. package/dist/Cesium/Workers/createTaskProcessorWorker.js +0 -26
  380. package/dist/Cesium/Workers/createVectorTileClampedPolylines.js +0 -26
  381. package/dist/Cesium/Workers/createVectorTileGeometries.js +0 -26
  382. package/dist/Cesium/Workers/createVectorTilePoints.js +0 -26
  383. package/dist/Cesium/Workers/createVectorTilePolygons.js +0 -26
  384. package/dist/Cesium/Workers/createVectorTilePolylines.js +0 -26
  385. package/dist/Cesium/Workers/createVerticesFromCesium3DTilesTerrain.js +0 -26
  386. package/dist/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -26
  387. package/dist/Cesium/Workers/createVerticesFromHeightmap.js +0 -26
  388. package/dist/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -26
  389. package/dist/Cesium/Workers/createWallGeometry.js +0 -26
  390. package/dist/Cesium/Workers/createWallOutlineGeometry.js +0 -26
  391. package/dist/Cesium/Workers/decodeDraco.js +0 -26
  392. package/dist/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +0 -26
  393. package/dist/Cesium/Workers/decodeI3S.js +0 -26
  394. package/dist/Cesium/Workers/gaussianSplatSorter.js +0 -26
  395. package/dist/Cesium/Workers/gaussianSplatTextureGenerator.js +0 -26
  396. package/dist/Cesium/Workers/incrementallyBuildTerrainPicker.js +0 -26
  397. package/dist/Cesium/Workers/transcodeKTX2.js +0 -56
  398. package/dist/Cesium/Workers/transferTypedArrayTest.js +0 -26
  399. package/dist/Cesium/Workers/upsampleQuantizedTerrainMesh.js +0 -26
  400. package/dist/Cesium/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +0 -26
  401. package/dist/Cesium/index.cjs +0 -17946
  402. package/dist/Cesium/index.js +0 -17946
  403. package/dist/chunks/sdk-runtime--Vql9ddn.js +0 -1408
  404. package/dist/chunks/sdk-vendor-DUEcGYjb.js +0 -36171
@@ -1,1408 +0,0 @@
1
- import { R as ve, b as B, V as ce, t as Te, bb as Ce } from "./three-vendor-M4ZIGmaO.js";
2
- import { a as pe, J as ne, p as Ae, l as J } from "./sdk-vendor-DUEcGYjb.js";
3
- class It {
4
- /**
5
- * 构造函数
6
- * @param camera - Three.js 相机对象(用于投影计算)
7
- * @param renderer - Three.js 渲染器对象(用于获取画布尺寸)
8
- * @param scene - Three.js 场景对象(用于屏幕坐标转世界坐标时的射线检测,可选)
9
- */
10
- constructor(e, t, r) {
11
- this.camera = e, this.renderer = t, this.scene = r, this.raycaster = new ve();
12
- }
13
- raycaster;
14
- /**
15
- * 将世界坐标转换为屏幕坐标(归一化坐标,范围 -1 到 1)
16
- * @param worldPos - 世界空间中的3D坐标点
17
- * @returns 归一化的屏幕坐标,x 和 y 的范围都是 -1 到 1
18
- * x: -1 表示屏幕左边缘,1 表示屏幕右边缘
19
- * y: -1 表示屏幕下边缘,1 表示屏幕上边缘
20
- */
21
- worldToScreenNormalized(e) {
22
- const t = e.clone();
23
- return t.project(this.camera), new B(t.x, t.y);
24
- }
25
- /**
26
- * 将世界坐标转换为屏幕坐标(像素坐标)
27
- * @param worldPos - 世界空间中的3D坐标点
28
- * @returns 屏幕像素坐标,x 和 y 表示在画布上的实际像素位置
29
- * x: 0 表示屏幕左边缘,width 表示屏幕右边缘
30
- * y: 0 表示屏幕上边缘,height 表示屏幕下边缘
31
- */
32
- worldToScreen(e) {
33
- const t = new ce();
34
- return t.copy(e).project(this.camera), t.x = t.x * this.renderer.domElement.clientWidth * 0.5, t.y = -t.y * this.renderer.domElement.clientHeight * 0.5, t.z = (t.z + 1) * 0.5, t.x += this.renderer.domElement.clientWidth * 0.5, t.y += this.renderer.domElement.clientHeight * 0.5, new B(t.x, t.y);
35
- }
36
- /**
37
- * 将世界坐标转换为屏幕坐标,仅在点位于当前相机可见裁剪空间内时返回结果。
38
- * 透视相机背后的点经过 project 后会翻转到屏幕异常位置,这里提前过滤。
39
- * @param worldPos - 世界空间中的 3D 坐标点
40
- * @returns 屏幕像素坐标;如果点不可见或投影结果无效,返回 null
41
- */
42
- worldToScreenIfVisible(e) {
43
- if (this.camera.updateMatrixWorld(!0), this.camera instanceof Te && e.clone().applyMatrix4(this.camera.matrixWorldInverse).z >= 0)
44
- return null;
45
- const t = e.clone().project(this.camera);
46
- if (!Number.isFinite(t.x) || !Number.isFinite(t.y) || !Number.isFinite(t.z) || t.z < -1 || t.z > 1)
47
- return null;
48
- const r = this.renderer.domElement.clientWidth, i = this.renderer.domElement.clientHeight;
49
- return new B(
50
- t.x * r * 0.5 + r * 0.5,
51
- -t.y * i * 0.5 + i * 0.5
52
- );
53
- }
54
- /**
55
- * 将屏幕坐标(像素坐标)转换为归一化坐标
56
- * @param screenX - 屏幕像素 X 坐标
57
- * @param screenY - 屏幕像素 Y 坐标
58
- * @returns 归一化的屏幕坐标,范围 -1 到 1
59
- */
60
- screenToNormalized(e, t) {
61
- const r = this.renderer.domElement.clientWidth, i = this.renderer.domElement.clientHeight, o = e / r * 2 - 1, s = -(t / i * 2 - 1);
62
- return new B(o, s);
63
- }
64
- /**
65
- * 将屏幕坐标(像素坐标)转换为世界坐标
66
- * 使用射线检测,返回与场景中第一个相交对象的世界坐标点
67
- * @param screenX - 屏幕像素 X 坐标
68
- * @param screenY - 屏幕像素 Y 坐标
69
- * @param objects - 可选,指定要检测的对象数组。如果不提供且 scene 存在,则检测场景中的所有对象
70
- * @returns 世界坐标点,如果没有相交则返回 null
71
- */
72
- screenToWorld(e, t, r) {
73
- if (!this.scene && !r)
74
- return console.warn("WorldToScreen: 需要提供 scene 或 objects 参数才能进行屏幕坐标转世界坐标"), null;
75
- const i = this.screenToNormalized(e, t);
76
- this.raycaster.setFromCamera(i, this.camera);
77
- const o = r || this.scene.children, s = this.raycaster.intersectObjects(o, !0);
78
- return s.length > 0 ? s[0].point : null;
79
- }
80
- /**
81
- * 将屏幕坐标转换为指定深度的世界坐标
82
- * @param screenX - 屏幕像素 X 坐标
83
- * @param screenY - 屏幕像素 Y 坐标
84
- * @param depth - 沿射线方向的距离(世界单位)
85
- * @returns 世界坐标点
86
- */
87
- screenToWorldWithDepth(e, t, r = 0) {
88
- const i = this.screenToNormalized(e, t);
89
- this.raycaster.setFromCamera(i, this.camera);
90
- const o = new ce();
91
- return this.raycaster.ray.at(r, o), o;
92
- }
93
- /**
94
- * 更新相机引用(当相机发生变化时调用)
95
- * @param camera - 新的相机对象
96
- */
97
- updateCamera(e) {
98
- this.camera = e;
99
- }
100
- /**
101
- * 更新渲染器引用(当渲染器发生变化时调用)
102
- * @param renderer - 新的渲染器对象
103
- */
104
- updateRenderer(e) {
105
- this.renderer = e;
106
- }
107
- /**
108
- * 更新场景引用(当场景发生变化时调用)
109
- * @param scene - 新的场景对象
110
- */
111
- updateScene(e) {
112
- this.scene = e;
113
- }
114
- }
115
- const Se = "iflowbim.cn", Le = 512, Pe = 128, Ue = 150, Ie = 38, R = 290, q = 190;
116
- class Mt {
117
- THREE;
118
- text;
119
- scene;
120
- camera;
121
- material;
122
- sprites = [];
123
- size;
124
- viewportWidth = 0;
125
- viewportHeight = 0;
126
- constructor(e, t = Se) {
127
- this.THREE = e, this.text = t, this.scene = new e.Scene(), this.camera = new e.OrthographicCamera(0, 1, 1, 0, -10, 10), this.material = new e.SpriteMaterial({
128
- map: new e.CanvasTexture(this.createTextTexture()),
129
- transparent: !0,
130
- opacity: 0.46,
131
- depthTest: !1,
132
- depthWrite: !1,
133
- toneMapped: !1
134
- }), this.size = new e.Vector2();
135
- }
136
- /**
137
- * 在当前帧末尾把水印写入同一个 renderer canvas。
138
- */
139
- render(e) {
140
- }
141
- /**
142
- * 释放水印内部纹理和材质,跟随宿主 renderer 生命周期销毁。
143
- */
144
- dispose() {
145
- this.material.map?.dispose?.(), this.material.dispose?.(), this.sprites.length = 0;
146
- }
147
- createTextTexture() {
148
- const e = document.createElement("canvas");
149
- e.width = Le, e.height = Pe;
150
- const t = e.getContext("2d");
151
- return t && (t.clearRect(0, 0, e.width, e.height), t.textAlign = "center", t.textBaseline = "middle", t.font = "600 54px Arial, Helvetica, sans-serif", t.lineWidth = 3, t.strokeStyle = "rgba(0, 0, 0, 0.20)", t.fillStyle = "rgba(255, 255, 255, 0.24)", t.strokeText(this.text, e.width / 2, e.height / 2), t.fillText(this.text, e.width / 2, e.height / 2)), e;
152
- }
153
- updateLayout(e, t) {
154
- if (e === this.viewportWidth && t === this.viewportHeight)
155
- return;
156
- this.viewportWidth = e, this.viewportHeight = t, this.camera.left = -e / 2, this.camera.right = e / 2, this.camera.top = t / 2, this.camera.bottom = -t / 2, this.camera.updateProjectionMatrix();
157
- const r = Math.ceil(e / R) + 2, i = Math.ceil(t / q) + 2, o = r * i;
158
- this.ensureSpriteCount(o);
159
- let s = 0;
160
- const c = -e / 2 - R / 2, a = -t / 2 - q / 2;
161
- for (let l = 0; l < i; l += 1)
162
- for (let d = 0; d < r; d += 1) {
163
- const u = this.sprites[s], h = c + d * R + l % 2 * (R / 2), f = a + l * q;
164
- u.position.set(h, f, 0), u.visible = !0, s += 1;
165
- }
166
- for (let l = s; l < this.sprites.length; l += 1)
167
- this.sprites[l].visible = !1;
168
- }
169
- ensureSpriteCount(e) {
170
- for (; this.sprites.length < e; ) {
171
- const t = new this.THREE.Sprite(this.material);
172
- t.scale.set(Ue, Ie, 1), t.rotation.z = -0.32, t.renderOrder = 999999, this.scene.add(t), this.sprites.push(t);
173
- }
174
- }
175
- }
176
- function Me(n) {
177
- return n instanceof Uint8Array || ArrayBuffer.isView(n) && n.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in n && n.BYTES_PER_ELEMENT === 1;
178
- }
179
- function ae(n) {
180
- if (typeof n != "number")
181
- throw new TypeError("number expected, got " + typeof n);
182
- if (!Number.isSafeInteger(n) || n < 0)
183
- throw new RangeError("positive integer expected, got " + n);
184
- }
185
- function x(n, e, t = "") {
186
- const r = Me(n), i = n?.length, o = e !== void 0;
187
- if (!r || o && i !== e) {
188
- const s = t && `"${t}" `, c = o ? ` of length ${e}` : "", a = r ? `length=${i}` : `type=${typeof n}`, l = s + "expected Uint8Array" + c + ", got " + a;
189
- throw r ? new RangeError(l) : new TypeError(l);
190
- }
191
- return n;
192
- }
193
- function le(n, e = !0) {
194
- if (n.destroyed)
195
- throw new Error("Hash instance has been destroyed");
196
- if (e && n.finished)
197
- throw new Error("Hash#digest() has already been called");
198
- }
199
- function ze(n, e, t = !1) {
200
- x(n, void 0, "output");
201
- const r = e.outputLen;
202
- if (n.length < r)
203
- throw new RangeError("digestInto() expects output buffer of length at least " + r);
204
- if (t && !U(n))
205
- throw new Error("invalid output, must be aligned");
206
- }
207
- function Be(n) {
208
- return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
209
- }
210
- function T(n) {
211
- return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
212
- }
213
- function v(...n) {
214
- for (let e = 0; e < n.length; e++)
215
- n[e].fill(0);
216
- }
217
- function F(n) {
218
- return new DataView(n.buffer, n.byteOffset, n.byteLength);
219
- }
220
- const re = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, ye = (n) => n << 24 & 4278190080 | n << 8 & 16711680 | n >>> 8 & 65280 | n >>> 24 & 255, g = re ? (n) => n : (n) => ye(n) >>> 0, Re = (n) => {
221
- for (let e = 0; e < n.length; e++)
222
- n[e] = ye(n[e]);
223
- return n;
224
- }, ie = re ? (n) => n : Re;
225
- function _e(n, e) {
226
- if (n.length !== e.length)
227
- return !1;
228
- let t = 0;
229
- for (let r = 0; r < n.length; r++)
230
- t |= n[r] ^ e[r];
231
- return t === 0;
232
- }
233
- function $e(n, e, t) {
234
- const r = e, i = t || (() => []), o = (c, a) => r(a, ...i(c)).update(c).digest(), s = r(new Uint8Array(n), ...i(new Uint8Array(0)));
235
- return o.outputLen = s.outputLen, o.blockLen = s.blockLen, o.create = (c, ...a) => r(c, ...a), o;
236
- }
237
- const Ke = /* @__NO_SIDE_EFFECTS__ */ (n, e) => {
238
- function t(r, ...i) {
239
- if (x(r, void 0, "key"), n.nonceLength !== void 0) {
240
- const d = i[0];
241
- x(d, n.varSizeNonce ? void 0 : n.nonceLength, "nonce");
242
- }
243
- const o = n.tagLength;
244
- o && i[1] !== void 0 && x(i[1], void 0, "AAD");
245
- const s = e(r, ...i), c = (d, u) => {
246
- if (u !== void 0) {
247
- if (d !== 2)
248
- throw new Error("cipher output not supported");
249
- x(u, void 0, "output");
250
- }
251
- };
252
- let a = !1;
253
- return {
254
- encrypt(d, u) {
255
- if (a)
256
- throw new Error("cannot encrypt() twice with same key + nonce");
257
- return a = !0, x(d), c(s.encrypt.length, u), s.encrypt(d, u);
258
- },
259
- decrypt(d, u) {
260
- if (x(d), o && d.length < o)
261
- throw new Error('"ciphertext" expected length bigger than tagLength=' + o);
262
- return c(s.decrypt.length, u), s.decrypt(d, u);
263
- }
264
- };
265
- }
266
- return Object.assign(t, n), t;
267
- };
268
- function Oe(n, e, t = !0) {
269
- if (e === void 0)
270
- return new Uint8Array(n);
271
- if (x(e, void 0, "output"), e.length !== n)
272
- throw new Error('"output" expected Uint8Array of length ' + n + ", got: " + e.length);
273
- if (t && !U(e))
274
- throw new Error("invalid output, must be aligned");
275
- return e;
276
- }
277
- function je(n, e, t) {
278
- ae(n), ae(e);
279
- const r = new Uint8Array(16), i = F(r);
280
- return i.setBigUint64(0, BigInt(e), t), i.setBigUint64(8, BigInt(n), t), r;
281
- }
282
- function U(n) {
283
- return n.byteOffset % 4 === 0;
284
- }
285
- function I(n) {
286
- return Uint8Array.from(x(n));
287
- }
288
- const A = 16, me = /* @__PURE__ */ new Uint8Array(16), L = /* @__PURE__ */ T(me), We = 225, Ne = (n, e, t, r) => {
289
- const i = r & 1;
290
- return {
291
- s3: t << 31 | r >>> 1,
292
- s2: e << 31 | t >>> 1,
293
- s1: n << 31 | e >>> 1,
294
- // NIST SP 800-38D §6.3 applies `V >> 1` and XORs R on carry. In this
295
- // 4x32-bit split, R = 0xe1 || 0^120 lives in the top byte of s0.
296
- s0: n >>> 1 ^ We << 24 & -(i & 1)
297
- // reduce % poly
298
- };
299
- }, _ = (n) => (n >>> 0 & 255) << 24 | (n >>> 8 & 255) << 16 | (n >>> 16 & 255) << 8 | n >>> 24 & 255 | 0, Ve = (n) => n > 64 * 1024 ? 8 : n > 1024 ? 4 : 2;
300
- class De {
301
- blockLen = A;
302
- outputLen = A;
303
- s0 = 0;
304
- s1 = 0;
305
- s2 = 0;
306
- s3 = 0;
307
- finished = !1;
308
- destroyed = !1;
309
- t;
310
- W;
311
- windowSize;
312
- // We select bits per window adaptively based on expectedLength
313
- constructor(e, t) {
314
- x(e, 16, "key"), e = I(e);
315
- const r = F(e);
316
- let i = r.getUint32(0, !1), o = r.getUint32(4, !1), s = r.getUint32(8, !1), c = r.getUint32(12, !1);
317
- const a = [];
318
- for (let p = 0; p < 128; p++)
319
- a.push({ s0: _(i), s1: _(o), s2: _(s), s3: _(c) }), { s0: i, s1: o, s2: s, s3: c } = Ne(i, o, s, c);
320
- const l = Ve(t || 1024);
321
- if (![1, 2, 4, 8].includes(l))
322
- throw new Error("ghash: invalid window size, expected 2, 4 or 8");
323
- this.W = l;
324
- const u = 128 / l, h = this.windowSize = 2 ** l, f = [];
325
- for (let p = 0; p < u; p++)
326
- for (let y = 0; y < h; y++) {
327
- let b = 0, k = 0, m = 0, C = 0;
328
- for (let E = 0; E < l; E++) {
329
- if (!(y >>> l - E - 1 & 1))
330
- continue;
331
- const { s0: Z, s1: xe, s2: ke, s3: Ee } = a[l * p + E];
332
- b ^= Z, k ^= xe, m ^= ke, C ^= Ee;
333
- }
334
- f.push({ s0: b, s1: k, s2: m, s3: C });
335
- }
336
- this.t = f;
337
- }
338
- _updateBlock(e, t, r, i) {
339
- e ^= this.s0, t ^= this.s1, r ^= this.s2, i ^= this.s3;
340
- const { W: o, t: s, windowSize: c } = this;
341
- let a = 0, l = 0, d = 0, u = 0;
342
- const h = (1 << o) - 1;
343
- let f = 0;
344
- for (const p of [e, t, r, i])
345
- for (let y = 0; y < 4; y++) {
346
- const b = p >>> 8 * y & 255;
347
- for (let k = 8 / o - 1; k >= 0; k--) {
348
- const m = b >>> o * k & h, { s0: C, s1: E, s2: S, s3: Z } = s[f * c + m];
349
- a ^= C, l ^= E, d ^= S, u ^= Z, f += 1;
350
- }
351
- }
352
- this.s0 = a, this.s1 = l, this.s2 = d, this.s3 = u;
353
- }
354
- update(e) {
355
- le(this), x(e), e = I(e);
356
- const t = T(e), r = Math.floor(e.length / A), i = e.length % A;
357
- for (let o = 0; o < r; o++)
358
- this._updateBlock(g(t[o * 4 + 0]), g(t[o * 4 + 1]), g(t[o * 4 + 2]), g(t[o * 4 + 3]));
359
- return i && (me.set(e.subarray(r * A)), this._updateBlock(g(L[0]), g(L[1]), g(L[2]), g(L[3])), v(L)), this;
360
- }
361
- destroy() {
362
- this.destroyed = !0;
363
- const { t: e } = this;
364
- for (const t of e)
365
- t.s0 = 0, t.s1 = 0, t.s2 = 0, t.s3 = 0;
366
- }
367
- digestInto(e) {
368
- le(this), ze(e, this, !0), this.finished = !0;
369
- const { s0: t, s1: r, s2: i, s3: o } = this, s = T(e);
370
- s[0] = t, s[1] = r, s[2] = i, s[3] = o, ie(s);
371
- }
372
- digest() {
373
- const e = new Uint8Array(A);
374
- return this.digestInto(e), this.destroy(), e;
375
- }
376
- }
377
- const ue = /* @__PURE__ */ $e(16, (n, e) => new De(n, e), (n) => [n.length]), ee = 16, He = 4, $ = /* @__PURE__ */ new Uint8Array(ee), Fe = 283;
378
- function Ze(n) {
379
- if (![16, 24, 32].includes(n.length))
380
- throw new Error('"aes key" expected Uint8Array of length 16/24/32, got length=' + n.length);
381
- }
382
- function oe(n) {
383
- return n << 1 ^ Fe & -(n >> 7);
384
- }
385
- function de(n, e) {
386
- let t = 0;
387
- for (; e > 0; e >>= 1)
388
- t ^= n & -(e & 1), n = oe(n);
389
- return t;
390
- }
391
- const qe = /* @__PURE__ */ (() => {
392
- const n = new Uint8Array(256);
393
- for (let t = 0, r = 1; t < 256; t++, r ^= oe(r))
394
- n[t] = r;
395
- const e = new Uint8Array(256);
396
- e[0] = 99;
397
- for (let t = 0; t < 255; t++) {
398
- let r = n[255 - t];
399
- r |= r << 8, e[n[t]] = (r ^ r >> 4 ^ r >> 5 ^ r >> 6 ^ r >> 7 ^ 99) & 255;
400
- }
401
- return v(n), e;
402
- })(), Ye = (n) => n << 24 | n >>> 8, Y = (n) => n << 8 | n >>> 24;
403
- function Ge(n, e) {
404
- if (n.length !== 256)
405
- throw new Error("Wrong sbox length");
406
- const t = new Uint32Array(256).map((l, d) => e(n[d])), r = t.map(Y), i = r.map(Y), o = i.map(Y), s = new Uint32Array(256 * 256), c = new Uint32Array(256 * 256), a = new Uint16Array(256 * 256);
407
- for (let l = 0; l < 256; l++)
408
- for (let d = 0; d < 256; d++) {
409
- const u = l * 256 + d;
410
- s[u] = t[l] ^ r[d], c[u] = i[l] ^ o[d], a[u] = n[l] << 8 | n[d];
411
- }
412
- return { sbox: n, sbox2: a, T0: t, T1: r, T2: i, T3: o, T01: s, T23: c };
413
- }
414
- const ge = /* @__PURE__ */ Ge(qe, (n) => de(n, 3) << 24 | n << 16 | n << 8 | de(n, 2)), Qe = /* @__PURE__ */ (() => {
415
- const n = new Uint8Array(16);
416
- for (let e = 0, t = 1; e < 16; e++, t = oe(t))
417
- n[e] = t;
418
- return n;
419
- })();
420
- function Xe(n) {
421
- x(n);
422
- const e = n.length;
423
- Ze(n);
424
- const { sbox2: t } = ge, r = [];
425
- (!re || !U(n)) && r.push(n = I(n));
426
- const i = ie(T(n)), o = i.length, s = (a) => P(t, a, a, a, a), c = new Uint32Array(e + 28);
427
- c.set(i);
428
- for (let a = o; a < c.length; a++) {
429
- let l = c[a - 1];
430
- a % o === 0 ? l = s(Ye(l)) ^ Qe[a / o - 1] : o > 6 && a % o === 4 && (l = s(l)), c[a] = c[a - o] ^ l;
431
- }
432
- return v(...r), c;
433
- }
434
- function K(n, e, t, r, i, o) {
435
- return n[t << 8 & 65280 | r >>> 8 & 255] ^ e[i >>> 8 & 65280 | o >>> 24 & 255];
436
- }
437
- function P(n, e, t, r, i) {
438
- return n[e & 255 | t & 65280] | n[r >>> 16 & 255 | i >>> 16 & 65280] << 16;
439
- }
440
- function he(n, e, t, r, i) {
441
- const { sbox2: o, T01: s, T23: c } = ge;
442
- let a = 0;
443
- e ^= n[a++], t ^= n[a++], r ^= n[a++], i ^= n[a++];
444
- const l = n.length / 4 - 2;
445
- for (let p = 0; p < l; p++) {
446
- const y = n[a++] ^ K(s, c, e, t, r, i), b = n[a++] ^ K(s, c, t, r, i, e), k = n[a++] ^ K(s, c, r, i, e, t), m = n[a++] ^ K(s, c, i, e, t, r);
447
- e = y, t = b, r = k, i = m;
448
- }
449
- const d = n[a++] ^ P(o, e, t, r, i), u = n[a++] ^ P(o, t, r, i, e), h = n[a++] ^ P(o, r, i, e, t), f = n[a++] ^ P(o, i, e, t, r);
450
- return { s0: d, s1: u, s2: h, s3: f };
451
- }
452
- function O(n, e, t, r, i) {
453
- x(t, ee, "nonce"), x(r), i = Oe(r.length, i);
454
- const o = t, s = T(o), c = F(o), a = T(r), l = T(i), d = e ? 0 : 12, u = r.length;
455
- let h = c.getUint32(d, e), { s0: f, s1: p, s2: y, s3: b } = he(n, g(s[0]), g(s[1]), g(s[2]), g(s[3]));
456
- for (let m = 0; m + 4 <= a.length; m += 4)
457
- l[m + 0] = a[m + 0] ^ g(f), l[m + 1] = a[m + 1] ^ g(p), l[m + 2] = a[m + 2] ^ g(y), l[m + 3] = a[m + 3] ^ g(b), h = h + 1 >>> 0, c.setUint32(d, h, e), { s0: f, s1: p, s2: y, s3: b } = he(n, g(s[0]), g(s[1]), g(s[2]), g(s[3]));
458
- const k = ee * Math.floor(a.length / He);
459
- if (k < u) {
460
- const m = new Uint32Array([f, p, y, b]);
461
- ie(m);
462
- const C = Be(m);
463
- for (let E = k, S = 0; E < u; E++, S++)
464
- i[E] = r[E] ^ C[S];
465
- v(m);
466
- }
467
- return i;
468
- }
469
- function Je(n, e, t, r, i) {
470
- const o = i ? i.length : 0, s = n.create(t, r.length + o);
471
- i && s.update(i);
472
- const c = je(8 * r.length, 8 * o, e);
473
- s.update(r), s.update(c);
474
- const a = s.digest();
475
- return v(c), a;
476
- }
477
- const W = /* @__PURE__ */ Ke({ blockSize: 16, nonceLength: 12, tagLength: 16, varSizeNonce: !0 }, function(e, t, r) {
478
- if (t.length < 8)
479
- throw new Error("aes/gcm: invalid nonce length");
480
- const i = 16;
481
- function o(c, a, l) {
482
- const d = Je(ue, !1, c, l, r);
483
- for (let u = 0; u < a.length; u++)
484
- d[u] ^= a[u];
485
- return d;
486
- }
487
- function s() {
488
- const c = Xe(e), a = $.slice(), l = $.slice();
489
- if (O(c, !1, l, l, a), t.length === 12)
490
- l.set(t);
491
- else {
492
- const u = $.slice();
493
- F(u).setBigUint64(8, BigInt(t.length * 8), !1);
494
- const f = ue.create(a).update(t).update(u);
495
- f.digestInto(l), f.destroy();
496
- }
497
- const d = O(c, !1, l, $);
498
- return { xk: c, authKey: a, counter: l, tagMask: d };
499
- }
500
- return {
501
- encrypt(c) {
502
- const { xk: a, authKey: l, counter: d, tagMask: u } = s(), h = new Uint8Array(c.length + i), f = [a, l, d, u];
503
- U(c) || f.push(c = I(c)), O(a, !1, d, c, h.subarray(0, c.length));
504
- const p = o(l, u, h.subarray(0, h.length - i));
505
- return f.push(p), h.set(p, c.length), v(...f), h;
506
- },
507
- decrypt(c) {
508
- const { xk: a, authKey: l, counter: d, tagMask: u } = s(), h = [a, l, u, d];
509
- U(c) || h.push(c = I(c));
510
- const f = c.subarray(0, -i), p = c.subarray(-i), y = o(l, u, f);
511
- if (h.push(y), !_e(y, p))
512
- throw v(...h), new Error("aes/gcm: invalid ghash tag");
513
- const b = O(a, !1, d, f);
514
- return v(...h), b;
515
- }
516
- };
517
- });
518
- class N {
519
- static MAGIC = new TextEncoder().encode("BIMGCM01");
520
- /**
521
- * 检测二进制数据是否为 .pzenc 加密格式
522
- * @param data 原始二进制数据
523
- * @returns 是否为加密文件
524
- */
525
- static isEncrypted(e) {
526
- if (e.byteLength < 8) return !1;
527
- const t = new Uint8Array(e);
528
- for (let r = 0; r < 8; r++)
529
- if (t[r] !== N.MAGIC[r]) return !1;
530
- return !0;
531
- }
532
- /**
533
- * 解密 .pzenc 自定义加密格式为 zip 二进制数据
534
- *
535
- * 二进制布局:
536
- * [0-7] magic "BIMGCM01" (8 字节)
537
- * [8] version (1 字节, 当前必须为 1)
538
- * [9] nonceLen (1 字节)
539
- * [10] tagLen (1 字节)
540
- * [11..] nonce || tag || ciphertext
541
- *
542
- * @param encryptedArrayBuffer 加密的原始二进制数据
543
- * @param keyBase64 Base64 编码的 AES-256 密钥 (32 字节)
544
- * @returns 解密后的 zip 二进制数据 (Uint8Array)
545
- */
546
- static async decryptPzEnc(e, t) {
547
- const r = new Uint8Array(e), i = new TextEncoder().encode("BIMGCM01");
548
- for (let y = 0; y < i.length; y++)
549
- if (r[y] !== i[y])
550
- throw new Error("magic 不匹配: 不是有效的 pzenc 文件");
551
- const o = r[8];
552
- if (o !== 1)
553
- throw new Error(`不支持的 pzenc 版本: ${o}`);
554
- const s = r[9], c = r[10], a = 11, l = r.slice(a, a + s), d = r.slice(a + s, a + s + c), u = r.slice(a + s + c), h = tt(u, d), f = et(t);
555
- if (f.length !== 32)
556
- throw new Error("AES-256 密钥必须是 32 字节");
557
- const p = r.slice(0, a);
558
- if (globalThis.crypto?.subtle) {
559
- const y = await globalThis.crypto.subtle.importKey(
560
- "raw",
561
- f.buffer,
562
- { name: "AES-GCM" },
563
- !1,
564
- ["decrypt"]
565
- ), b = await globalThis.crypto.subtle.decrypt(
566
- {
567
- name: "AES-GCM",
568
- iv: l.buffer,
569
- additionalData: p.buffer,
570
- tagLength: c * 8
571
- },
572
- y,
573
- h.buffer
574
- );
575
- return new Uint8Array(b);
576
- }
577
- return nt(f, l, p, h, c);
578
- }
579
- }
580
- function et(n) {
581
- const e = atob(n), t = new Uint8Array(e.length);
582
- for (let r = 0; r < e.length; r++)
583
- t[r] = e.codePointAt(r);
584
- return t;
585
- }
586
- function tt(n, e) {
587
- const t = new Uint8Array(n.length + e.length);
588
- return t.set(n, 0), t.set(e, n.length), t;
589
- }
590
- function nt(n, e, t, r, i) {
591
- if (i !== W.tagLength)
592
- throw new Error(`当前 HTTP 回退解密仅支持 ${W.tagLength} 字节 AES-GCM tag,当前文件 tagLen: ${i}`);
593
- return W(n, e, t).decrypt(r);
594
- }
595
- function zt(n, e) {
596
- pe({
597
- method: "get",
598
- responseType: "blob",
599
- url: n
600
- }).then((t) => {
601
- let r = new window.File([t.data], "zipFolder", {
602
- type: "zip"
603
- });
604
- ne.loadAsync(r).then((i) => {
605
- const o = /* @__PURE__ */ new Map(), s = [];
606
- for (let c in i.files) {
607
- if (i.files[c].dir)
608
- continue;
609
- const a = i.file(i.files[c].name);
610
- if (a) {
611
- const l = a.async("blob").then((d) => {
612
- const u = URL.createObjectURL(d);
613
- o.set("/" + i.files[c].name.replace("\\", "/"), u);
614
- });
615
- s.push(l);
616
- }
617
- }
618
- Promise.all(s).then(() => {
619
- e(o);
620
- }).catch((c) => {
621
- console.error("解压zip文件失败:", c), e(/* @__PURE__ */ new Map());
622
- });
623
- }).catch((i) => {
624
- console.error("加载zip文件失败:", i), e(/* @__PURE__ */ new Map());
625
- });
626
- }).catch((t) => {
627
- console.error("下载zip文件失败:", t), e(/* @__PURE__ */ new Map());
628
- });
629
- }
630
- function Bt(n, e, t, r) {
631
- pe({
632
- method: "get",
633
- responseType: "arraybuffer",
634
- url: n
635
- }).then(async (o) => {
636
- let s = o.data;
637
- r && N.isEncrypted(o.data) && (s = await N.decryptPzEnc(o.data, r)), ne.loadAsync(s).then((c) => {
638
- for (let a in c.files) {
639
- const l = c.file(c.files[a].name);
640
- l && l.async("blob").then((d) => {
641
- i(d, "utf-8", function(u, h) {
642
- e(h);
643
- });
644
- }).catch(() => {
645
- t();
646
- });
647
- }
648
- }).catch(() => {
649
- t();
650
- });
651
- }).catch(() => {
652
- t();
653
- });
654
- function i(o, s, c) {
655
- var a = new FileReader(), l = new Blob([o]);
656
- a.onload = function(d) {
657
- c(null, d.target.result);
658
- }, a.onerror = function() {
659
- c(null, null);
660
- }, a.readAsText(l, s);
661
- }
662
- }
663
- function Rt() {
664
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(n) {
665
- var e = Math.random() * 16 | 0, t = n == "x" ? e : e & 3 | 8;
666
- return t.toString(16);
667
- });
668
- }
669
- class w {
670
- /** 从 URL 加载 TTF/OTF 字体,生成 Three.js typeface.json。 */
671
- static async fromUrl(e, t) {
672
- const r = await fetch(e);
673
- if (!r.ok) throw new Error(`FontJsonGenerator: 无法加载 ${e} (${r.status})`);
674
- const i = await r.arrayBuffer();
675
- return w.fromArrayBuffer(i, t);
676
- }
677
- /** 从 ArrayBuffer 解析字体,生成 typeface.json。 */
678
- static fromArrayBuffer(e, t) {
679
- const r = Ae(e);
680
- return w._convert(r, t?.chars);
681
- }
682
- /** 将 typeface.json 转为 Three.js Font 对象,可直接用于文字几何。 */
683
- static toThreeFont(e) {
684
- return new Ce().parse(e);
685
- }
686
- static _convert(e, t) {
687
- const r = {}, i = e.unitsPerEm, o = (u) => Math.round(u), s = (u) => {
688
- const h = e.charToGlyph(u);
689
- if (!h || h.index === 0) return;
690
- const f = w._commandsToTypefaceOutline(h.path.commands, o), p = h.getBoundingBox();
691
- r[u] = {
692
- x_min: p.x1,
693
- x_max: p.x2,
694
- ha: h.advanceWidth ?? 0,
695
- o: f.join(" ")
696
- };
697
- };
698
- if (t)
699
- for (const u of t) s(u);
700
- else {
701
- const u = e.tables.cmap?.glyphIndexMap ?? {};
702
- for (const h of Object.keys(u)) {
703
- const f = Number.parseInt(h, 10);
704
- f > 0 && s(String.fromCodePoint(f));
705
- }
706
- }
707
- if (!r[" "]) {
708
- const u = e.charToGlyph(" ");
709
- r[" "] = {
710
- x_min: 0,
711
- x_max: 0,
712
- ha: u?.advanceWidth ?? Math.round(i / 4),
713
- o: ""
714
- };
715
- }
716
- const c = e.names, a = (u) => c[u]?.en ?? c[u]?.zh ?? "", l = a("fontFamily") || "Custom Font", d = a("fontSubfamily") || "Regular";
717
- return {
718
- familyName: l,
719
- ascender: e.ascender,
720
- descender: e.descender,
721
- underlinePosition: e.tables.post?.underlinePosition ?? -100,
722
- underlineThickness: e.tables.post?.underlineThickness ?? 50,
723
- boundingBox: { yMin: e.descender, xMin: 0, yMax: e.ascender, xMax: i },
724
- resolution: i,
725
- original_font_information: { fontFamily: l, fontSubfamily: d },
726
- cssFontStyle: d.toLowerCase().includes("italic") ? "italic" : "normal",
727
- cssFontWeight: d.toLowerCase().includes("bold") ? "bold" : "normal",
728
- glyphs: r
729
- };
730
- }
731
- /** 将 opentype 命令拆为闭合轮廓,并输出为 Three 更稳定的“外轮廓 -> 孔洞”顺序。 */
732
- static _commandsToTypefaceOutline(e, t) {
733
- const r = w._splitContours(e), i = w._createContourEntries(r), o = i.filter((a) => a.depth % 2 === 0), s = i.filter((a) => a.depth % 2 === 1), c = [];
734
- return o.sort((a, l) => a.index - l.index).forEach((a) => {
735
- w._appendNormalizedContour(a.contour, !0, c, t), s.filter((l) => w._findParentSolid(l, o) === a).sort((l, d) => l.index - d.index).forEach((l) => w._appendNormalizedContour(l.contour, !1, c, t));
736
- }), c;
737
- }
738
- static _createContourEntries(e) {
739
- return e.filter((t) => t.segments.length > 0).map((t, r) => {
740
- const i = w._samplePoint(t), o = e.reduce((s, c) => c === t || c.points.length < 3 ? s : w._pointInPolygon(i, c.points) ? s + 1 : s, 0);
741
- return {
742
- contour: t,
743
- index: r,
744
- depth: o,
745
- absArea: Math.abs(w._signedArea(t.points))
746
- };
747
- });
748
- }
749
- static _findParentSolid(e, t) {
750
- const r = w._samplePoint(e.contour);
751
- return t.filter((i) => w._pointInPolygon(r, i.contour.points)).sort((i, o) => i.absArea - o.absArea)[0];
752
- }
753
- static _appendNormalizedContour(e, t, r, i) {
754
- const s = w._signedArea(e.points) < 0 === t ? e.segments : w._reverseSegments(e.segments);
755
- w._appendContour(s, r, i);
756
- }
757
- static _splitContours(e) {
758
- const t = [];
759
- let r = null, i = null;
760
- const o = () => {
761
- r && r.segments.length > 0 && t.push(r), r = null, i = null;
762
- };
763
- return e.forEach((s) => {
764
- if (s.type === "M") {
765
- o(), i = { x: s.x, y: s.y }, r = { segments: [], points: [i] };
766
- return;
767
- }
768
- if (!r || !i) return;
769
- if (s.type === "Z") {
770
- o();
771
- return;
772
- }
773
- const c = { x: s.x, y: s.y };
774
- s.type === "L" ? r.segments.push({ type: "L", start: i, end: c }) : s.type === "Q" ? r.segments.push({ type: "Q", start: i, end: c, x1: s.x1, y1: s.y1 }) : s.type === "C" && r.segments.push({
775
- type: "C",
776
- start: i,
777
- end: c,
778
- x1: s.x1,
779
- y1: s.y1,
780
- x2: s.x2,
781
- y2: s.y2
782
- }), i = c, r.points.push(c);
783
- }), o(), t;
784
- }
785
- static _appendContour(e, t, r) {
786
- const i = e[0].start;
787
- t.push(`m ${r(i.x)} ${r(i.y)}`), e.forEach((o) => {
788
- o.type === "L" ? t.push(`l ${r(o.end.x)} ${r(o.end.y)}`) : o.type === "Q" ? t.push(`q ${r(o.end.x)} ${r(o.end.y)} ${r(o.x1)} ${r(o.y1)}`) : t.push(
789
- `b ${r(o.end.x)} ${r(o.end.y)} ${r(o.x1)} ${r(o.y1)} ${r(o.x2)} ${r(o.y2)}`
790
- );
791
- }), t.push("z");
792
- }
793
- static _reverseSegments(e) {
794
- return e.slice().reverse().map((t) => t.type === "L" ? { type: "L", start: t.end, end: t.start } : t.type === "Q" ? { type: "Q", start: t.end, end: t.start, x1: t.x1, y1: t.y1 } : {
795
- type: "C",
796
- start: t.end,
797
- end: t.start,
798
- x1: t.x2,
799
- y1: t.y2,
800
- x2: t.x1,
801
- y2: t.y1
802
- });
803
- }
804
- static _signedArea(e) {
805
- let t = 0;
806
- for (let r = 0, i = e.length - 1; r < e.length; i = r++)
807
- t += e[i].x * e[r].y - e[r].x * e[i].y;
808
- return t / 2;
809
- }
810
- static _samplePoint(e) {
811
- return e.points[0];
812
- }
813
- static _pointInPolygon(e, t) {
814
- let r = !1;
815
- for (let i = 0, o = t.length - 1; i < t.length; o = i++) {
816
- const s = t[i], c = t[o];
817
- s.y > e.y != c.y > e.y && e.x < (c.x - s.x) * (e.y - s.y) / (c.y - s.y) + s.x && (r = !r);
818
- }
819
- return r;
820
- }
821
- }
822
- function we(n) {
823
- const e = String(n ?? "").trim().toLowerCase(), t = e.lastIndexOf(".");
824
- return t >= 0 ? e.slice(t) : "";
825
- }
826
- function rt(n) {
827
- return it(n.webkitRelativePath || n.name);
828
- }
829
- function _t(n) {
830
- const e = URL.createObjectURL(n);
831
- return {
832
- url: e,
833
- name: n.name,
834
- extension: we(n.name),
835
- revoke: () => URL.revokeObjectURL(e)
836
- };
837
- }
838
- async function $t(n, e = "package.zip") {
839
- const t = new ne();
840
- n.forEach((o) => {
841
- t.file(rt(o), o);
842
- });
843
- const r = await t.generateAsync({ type: "blob" }), i = URL.createObjectURL(r);
844
- return {
845
- url: i,
846
- name: e,
847
- extension: we(e),
848
- revoke: () => URL.revokeObjectURL(i)
849
- };
850
- }
851
- async function Kt(n) {
852
- return n.text();
853
- }
854
- async function Ot(n) {
855
- return n.arrayBuffer();
856
- }
857
- function it(n) {
858
- return String(n).replace(/\\/g, "/").replace(/^\/+/, "").replace(/\/+/g, "/");
859
- }
860
- class jt {
861
- container;
862
- labelContainer;
863
- projectCoordinate;
864
- pickCoordinate;
865
- emitEvent;
866
- labels = /* @__PURE__ */ new Map();
867
- clickCallbacks = /* @__PURE__ */ new Set();
868
- pickResolver = null;
869
- isPicking = !1;
870
- constructor(e) {
871
- this.container = e.container, this.projectCoordinate = e.projectCoordinate, this.pickCoordinate = e.pickCoordinate, this.emitEvent = e.emitEvent, this.labelContainer = document.createElement("div"), this.labelContainer.className = e.className ?? "bim-engine-label-container", this.labelContainer.style.cssText = [
872
- "position:absolute",
873
- "left:0",
874
- "top:0",
875
- "width:100%",
876
- "height:100%",
877
- "pointer-events:none",
878
- "overflow:hidden",
879
- "z-index:1200"
880
- ].join(";"), this.container.appendChild(this.labelContainer);
881
- }
882
- /**
883
- * 开启一次选点,下一次画布点击会返回当前引擎坐标。
884
- */
885
- pickPoint() {
886
- return this.cancelPick(), this.isPicking = !0, this.container.style.cursor = "crosshair", this.addPickBlockers(), this.container.addEventListener("click", this.handlePickClick, !0), new Promise((e) => {
887
- this.pickResolver = e;
888
- });
889
- }
890
- /**
891
- * 兼容回调式调用,便于旧业务页面直接绑定按钮。
892
- */
893
- startPickPoint(e) {
894
- const t = this.pickPoint();
895
- return e && t.then(e), t;
896
- }
897
- /**
898
- * 创建标签,返回最终标签 id。
899
- */
900
- createLabel(e) {
901
- const t = e.id ?? this.createId();
902
- if (this.labels.has(t))
903
- throw new Error(`LabelManager: label "${t}" already exists`);
904
- const r = this.createElement(t), i = {
905
- id: t,
906
- coordinate: { ...e.coordinate },
907
- icon: e.icon,
908
- name: e.name,
909
- data: e.data,
910
- size: e.iconSize ?? e.size ?? 28,
911
- visible: e.visible ?? !0,
912
- element: r
913
- };
914
- return this.labels.set(t, i), this.labelContainer.appendChild(r), this.renderLabel(i), this.updateLabelPosition(i), this.emitEvent?.("label-created", this.toPayload(i)), t;
915
- }
916
- /**
917
- * 更新标签,支持按需修改坐标、图标、名称和业务数据。
918
- */
919
- updateLabel(e, t) {
920
- const r = this.labels.get(e);
921
- return r ? (t.coordinate && (r.coordinate = { ...t.coordinate }), t.icon !== void 0 && (r.icon = t.icon), t.name !== void 0 && (r.name = t.name), t.data !== void 0 && (r.data = t.data), t.iconSize !== void 0 && (r.size = t.iconSize), t.size !== void 0 && (r.size = t.size), t.visible !== void 0 && (r.visible = t.visible), this.renderLabel(r), this.updateLabelPosition(r), this.emitEvent?.("label-updated", this.toPayload(r)), !0) : !1;
922
- }
923
- /**
924
- * 删除指定标签。
925
- */
926
- deleteLabel(e) {
927
- const t = this.labels.get(e);
928
- return t ? (t.element.remove(), this.labels.delete(e), this.emitEvent?.("label-deleted", { id: e }), !0) : !1;
929
- }
930
- removeLabel(e) {
931
- return this.deleteLabel(e);
932
- }
933
- clearLabels() {
934
- Array.from(this.labels.keys()).forEach((e) => this.deleteLabel(e));
935
- }
936
- getLabel(e) {
937
- return this.labels.get(e);
938
- }
939
- getLabels() {
940
- return Array.from(this.labels.values());
941
- }
942
- onLabelClick(e) {
943
- return this.clickCallbacks.add(e), () => this.offLabelClick(e);
944
- }
945
- offLabelClick(e) {
946
- this.clickCallbacks.delete(e);
947
- }
948
- /**
949
- * 每帧同步标签屏幕位置。
950
- */
951
- update() {
952
- this.labels.forEach((e) => this.updateLabelPosition(e));
953
- }
954
- cancelPick() {
955
- this.isPicking && (this.isPicking = !1, this.container.style.cursor = "", this.removePickBlockers(), this.container.removeEventListener("click", this.handlePickClick, !0), this.pickResolver?.(null), this.pickResolver = null);
956
- }
957
- dispose() {
958
- this.cancelPick(), this.clearLabels(), this.clickCallbacks.clear(), this.labelContainer.remove();
959
- }
960
- createElement(e) {
961
- const t = document.createElement("div");
962
- return t.dataset.labelId = e, t.style.cssText = [
963
- "position:absolute",
964
- "display:flex",
965
- "flex-direction:column",
966
- "align-items:center",
967
- "gap:5px",
968
- "transform:translate(-50%, -100%)",
969
- "pointer-events:auto",
970
- "cursor:pointer",
971
- "user-select:none",
972
- "white-space:nowrap",
973
- "font:12px/1.2 -apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif"
974
- ].join(";"), t.addEventListener("click", (r) => {
975
- r.preventDefault(), r.stopPropagation();
976
- const i = this.labels.get(e);
977
- if (!i) return;
978
- const o = {
979
- id: e,
980
- label: i,
981
- coordinate: i.coordinate,
982
- originalEvent: r
983
- };
984
- this.clickCallbacks.forEach((s) => s(o)), this.emitEvent?.("label-click", o);
985
- }), t;
986
- }
987
- renderLabel(e) {
988
- e.element.innerHTML = "";
989
- const t = document.createElement("img"), r = this.normalizeIconSize(e.size);
990
- t.src = e.icon, t.alt = e.name, t.style.cssText = [
991
- `width:${r.width}px`,
992
- `height:${r.height}px`,
993
- "object-fit:contain",
994
- "display:block",
995
- "filter:drop-shadow(0 3px 5px rgba(0,0,0,.32))"
996
- ].join(";");
997
- const i = document.createElement("span");
998
- i.textContent = e.name, i.style.cssText = [
999
- "max-width:160px",
1000
- "overflow:hidden",
1001
- "text-overflow:ellipsis",
1002
- "padding:5px 9px",
1003
- "border-radius:6px",
1004
- "background:rgba(15,23,42,.88)",
1005
- "color:#fff",
1006
- "border:1px solid rgba(255,255,255,.16)",
1007
- "box-shadow:0 3px 10px rgba(0,0,0,.24)"
1008
- ].join(";"), e.element.title = e.name, e.element.appendChild(i), e.element.appendChild(t);
1009
- }
1010
- updateLabelPosition(e) {
1011
- const t = this.projectCoordinate(e.coordinate);
1012
- if (!(e.visible && t != null && t.visible !== !1) || !t) {
1013
- e.element.style.display = "none";
1014
- return;
1015
- }
1016
- e.element.style.display = "flex", e.element.style.left = `${t.x}px`, e.element.style.top = `${t.y}px`;
1017
- }
1018
- handlePickClick = (e) => {
1019
- e.preventDefault(), e.stopImmediatePropagation();
1020
- const t = this.pickCoordinate(e);
1021
- this.isPicking = !1, this.container.style.cursor = "", this.removePickBlockers(), this.container.removeEventListener("click", this.handlePickClick, !0), this.pickResolver?.(t), this.pickResolver = null, t && this.emitEvent?.("label-pick", t);
1022
- };
1023
- toPayload(e) {
1024
- return {
1025
- id: e.id,
1026
- coordinate: e.coordinate,
1027
- icon: e.icon,
1028
- name: e.name,
1029
- data: e.data,
1030
- size: e.size,
1031
- visible: e.visible
1032
- };
1033
- }
1034
- normalizeIconSize(e) {
1035
- return typeof e == "number" ? {
1036
- width: e,
1037
- height: e
1038
- } : {
1039
- width: this.normalizeSizeValue(e.width, 28),
1040
- height: this.normalizeSizeValue(e.height, 28)
1041
- };
1042
- }
1043
- normalizeSizeValue(e, t) {
1044
- return Number.isFinite(e) && e > 0 ? e : t;
1045
- }
1046
- createId() {
1047
- return `label-${Date.now()}-${Math.random().toString(16).slice(2)}`;
1048
- }
1049
- addPickBlockers() {
1050
- this.container.addEventListener("mousedown", this.blockPickInteraction, !0), this.container.addEventListener("mouseup", this.blockPickInteraction, !0), this.container.addEventListener("touchstart", this.blockPickInteraction, !0), this.container.addEventListener("touchmove", this.blockPickInteraction, !0), this.container.addEventListener("touchend", this.blockPickInteraction, !0);
1051
- }
1052
- removePickBlockers() {
1053
- this.container.removeEventListener("mousedown", this.blockPickInteraction, !0), this.container.removeEventListener("mouseup", this.blockPickInteraction, !0), this.container.removeEventListener("touchstart", this.blockPickInteraction, !0), this.container.removeEventListener("touchmove", this.blockPickInteraction, !0), this.container.removeEventListener("touchend", this.blockPickInteraction, !0);
1054
- }
1055
- blockPickInteraction = (e) => {
1056
- e.stopImmediatePropagation();
1057
- };
1058
- }
1059
- const ot = "3.11.3", st = {
1060
- version: ot
1061
- }, V = st.version;
1062
- function se() {
1063
- const n = globalThis.crypto?.subtle;
1064
- if (!n)
1065
- throw new Error("[BimEngine] Web Crypto API is required for secure sdkAuth credentials mode");
1066
- return n;
1067
- }
1068
- function M(n) {
1069
- return new TextEncoder().encode(n);
1070
- }
1071
- function z(n) {
1072
- return n.buffer.slice(n.byteOffset, n.byteOffset + n.byteLength);
1073
- }
1074
- function fe(n) {
1075
- let e = "";
1076
- return n.forEach((t) => {
1077
- e += String.fromCharCode(t);
1078
- }), btoa(e);
1079
- }
1080
- function ct(n) {
1081
- const e = n.getUTCFullYear(), t = String(n.getUTCMonth() + 1).padStart(2, "0"), r = String(n.getUTCDate()).padStart(2, "0");
1082
- return `${e}${t}${r}`;
1083
- }
1084
- async function at(n) {
1085
- const e = await se().digest("SHA-256", z(M(n)));
1086
- return Array.from(new Uint8Array(e)).map((t) => t.toString(16).padStart(2, "0")).join("");
1087
- }
1088
- async function lt(n, e) {
1089
- const t = se(), r = await t.importKey("raw", z(n), { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]);
1090
- return t.sign("HMAC", r, z(M(e)));
1091
- }
1092
- function ut(n) {
1093
- return M(
1094
- [n.appId, n.engineType, n.requestDate, String(n.timestamp), n.nonce].join("|")
1095
- );
1096
- }
1097
- async function dt(n) {
1098
- const e = se(), t = /* @__PURE__ */ new Date(), r = t.getTime(), i = ct(t), o = globalThis.crypto.randomUUID(), s = globalThis.crypto.getRandomValues(new Uint8Array(12)), c = await at(n.appSecret), a = await lt(M(c), i), l = await e.importKey("raw", a, "AES-GCM", !1, ["encrypt"]), d = JSON.stringify({
1099
- appKey: n.appKey,
1100
- appSecret: n.appSecret
1101
- }), u = await e.encrypt(
1102
- {
1103
- name: "AES-GCM",
1104
- iv: s,
1105
- additionalData: z(ut({
1106
- appId: n.appId,
1107
- engineType: n.engineType,
1108
- requestDate: i,
1109
- timestamp: r,
1110
- nonce: o
1111
- })),
1112
- tagLength: 128
1113
- },
1114
- l,
1115
- z(M(d))
1116
- );
1117
- return {
1118
- appId: n.appId,
1119
- engineType: n.engineType,
1120
- requestDate: i,
1121
- timestamp: r,
1122
- nonce: o,
1123
- iv: fe(s),
1124
- cipherText: fe(new Uint8Array(u)),
1125
- sdkVersion: n.sdkVersion,
1126
- origin: n.origin,
1127
- product: n.product
1128
- };
1129
- }
1130
- const G = /* @__PURE__ */ new Map();
1131
- function D(n) {
1132
- return n.replace(/\/+$/, "");
1133
- }
1134
- function H(n) {
1135
- if (n) return n;
1136
- if (typeof window < "u" && typeof window.location?.origin == "string")
1137
- return window.location.origin;
1138
- }
1139
- function ht(n, e) {
1140
- return JSON.stringify({
1141
- endpoint: D(n.endpoint),
1142
- token: n.token ?? "",
1143
- appId: n.appId ?? "",
1144
- appKey: n.appKey ?? "",
1145
- appSecret: n.appSecret ?? "",
1146
- origin: H(n.origin) ?? "",
1147
- product: n.product ?? "",
1148
- engineType: e,
1149
- sdkVersion: V
1150
- });
1151
- }
1152
- async function te(n, e, t) {
1153
- const r = typeof AbortController < "u" ? new AbortController() : void 0, i = r ? setTimeout(() => r.abort(), t) : void 0;
1154
- try {
1155
- const o = await fetch(n, {
1156
- method: "POST",
1157
- headers: {
1158
- "Content-Type": "application/json"
1159
- },
1160
- body: JSON.stringify(e),
1161
- signal: r?.signal
1162
- }), s = await o.json().catch(() => ({}));
1163
- if (!o.ok) {
1164
- const c = s?.error?.message ?? s?.message ?? `SDK authentication failed with status ${o.status}`;
1165
- throw new Error(c);
1166
- }
1167
- return s;
1168
- } finally {
1169
- i != null && clearTimeout(i);
1170
- }
1171
- }
1172
- async function ft(n, e) {
1173
- const t = await te(`${D(n.endpoint)}/oauth/sdk-verify`, {
1174
- sdkToken: n.token,
1175
- engineType: e,
1176
- sdkVersion: V,
1177
- origin: H(n.origin),
1178
- product: n.product
1179
- }, n.timeoutMs ?? 8e3);
1180
- return t.sdkToken = n.token, t;
1181
- }
1182
- async function pt(n, e) {
1183
- const t = await dt({
1184
- appId: n.appId,
1185
- appKey: n.appKey,
1186
- appSecret: n.appSecret,
1187
- engineType: e,
1188
- sdkVersion: V,
1189
- origin: H(n.origin),
1190
- product: n.product
1191
- }), r = await te(
1192
- `${D(n.endpoint)}/oauth/sdk-token/secure`,
1193
- t,
1194
- n.timeoutMs ?? 8e3
1195
- ), i = await te(`${D(n.endpoint)}/oauth/sdk-verify`, {
1196
- sdkToken: r.sdkToken,
1197
- engineType: e,
1198
- sdkVersion: V,
1199
- origin: H(n.origin),
1200
- product: n.product
1201
- }, n.timeoutMs ?? 8e3);
1202
- return i.sdkToken = r.sdkToken, i;
1203
- }
1204
- async function yt(n, e) {
1205
- const t = n?.sdkAuth;
1206
- if (!t)
1207
- return null;
1208
- if (!t.endpoint)
1209
- throw new Error("[BimEngine] sdkAuth.endpoint is required");
1210
- if (!t.token && !(t.appId && t.appKey && t.appSecret))
1211
- return null;
1212
- const r = ht(t, e), i = G.get(r);
1213
- if (i) {
1214
- const s = await i;
1215
- return n && (n.__sdkAuthSession = s), s;
1216
- }
1217
- const o = (t.token ? ft(t, e) : pt(t, e)).then((s) => {
1218
- if (s.authorized !== !0)
1219
- throw new Error("[BimEngine] SDK authorization rejected");
1220
- return n && (n.__sdkAuthSession = s), s;
1221
- }).catch((s) => {
1222
- throw G.delete(r), s;
1223
- });
1224
- return G.set(r, o), o;
1225
- }
1226
- const mt = "evtrsa1", Q = /* @__PURE__ */ new Map();
1227
- function be(n) {
1228
- return n.replace(/\/+$/, "");
1229
- }
1230
- function gt(n) {
1231
- return new TextEncoder().encode(n);
1232
- }
1233
- function j(n) {
1234
- let e = "";
1235
- return n.forEach((t) => {
1236
- e += String.fromCharCode(t);
1237
- }), btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
1238
- }
1239
- async function wt(n, e) {
1240
- const t = typeof AbortController < "u" ? new AbortController() : void 0, r = t ? setTimeout(() => t.abort(), e) : void 0;
1241
- try {
1242
- const i = await fetch(n, {
1243
- method: "GET",
1244
- headers: {
1245
- Accept: "application/json"
1246
- },
1247
- signal: t?.signal
1248
- }), o = await i.json().catch(() => ({}));
1249
- if (!i.ok) {
1250
- const s = o?.error?.message ?? o?.message ?? `ViewToken public key request failed with status ${i.status}`;
1251
- throw new Error(s);
1252
- }
1253
- return o;
1254
- } finally {
1255
- r != null && clearTimeout(r);
1256
- }
1257
- }
1258
- function X(n) {
1259
- const e = globalThis.crypto;
1260
- if (!e?.getRandomValues)
1261
- throw new Error("[BimEngine] crypto.getRandomValues is required to encrypt viewToken");
1262
- return e.getRandomValues(new Uint8Array(n));
1263
- }
1264
- function bt(n) {
1265
- let e = "";
1266
- return n.forEach((t) => {
1267
- e += String.fromCharCode(t);
1268
- }), e;
1269
- }
1270
- function xt(n) {
1271
- const e = new Uint8Array(n.length);
1272
- for (let t = 0; t < n.length; t += 1)
1273
- e[t] = n.charCodeAt(t) & 255;
1274
- return e;
1275
- }
1276
- async function kt(n, e) {
1277
- const t = `${be(n)}/models/view-token/public-key`, r = await wt(t, e);
1278
- if (r.algorithm !== "RSA-OAEP-256" || !r.publicKey)
1279
- throw new Error("[BimEngine] OpenAPI returned an invalid viewToken public key");
1280
- return J.pki.publicKeyFromPem(r.publicKey);
1281
- }
1282
- function Et(n, e) {
1283
- const t = be(n), r = Q.get(t);
1284
- if (r)
1285
- return r;
1286
- const i = kt(n, e).catch((o) => {
1287
- throw Q.delete(t), o;
1288
- });
1289
- return Q.set(t, i), i;
1290
- }
1291
- async function vt(n, e, t) {
1292
- const r = await Et(n, t), i = X(32), o = X(12), s = X(16), c = JSON.stringify({
1293
- viewToken: e,
1294
- timestamp: Date.now(),
1295
- nonce: j(s)
1296
- }), a = r.encrypt(
1297
- bt(i),
1298
- "RSA-OAEP",
1299
- {
1300
- md: J.md.sha256.create(),
1301
- mgf1: {
1302
- md: J.md.sha256.create()
1303
- }
1304
- }
1305
- ), l = W(i, o).encrypt(gt(c));
1306
- return [
1307
- mt,
1308
- j(xt(a)),
1309
- j(o),
1310
- j(l)
1311
- ].join(".");
1312
- }
1313
- function Tt(n) {
1314
- return n.replace(/\/+$/, "");
1315
- }
1316
- async function Ct(n, e, t) {
1317
- const r = typeof AbortController < "u" ? new AbortController() : void 0, i = r ? setTimeout(() => r.abort(), t) : void 0;
1318
- try {
1319
- const o = await fetch(n, {
1320
- method: "POST",
1321
- headers: {
1322
- "Content-Type": "application/json"
1323
- },
1324
- body: JSON.stringify(e),
1325
- signal: r?.signal
1326
- }), s = await o.json().catch(() => ({}));
1327
- if (!o.ok) {
1328
- const c = s?.error?.message ?? s?.message ?? `ViewToken resolve failed with status ${o.status}`;
1329
- throw new Error(c);
1330
- }
1331
- return s;
1332
- } finally {
1333
- i != null && clearTimeout(i);
1334
- }
1335
- }
1336
- function At(n) {
1337
- switch (n) {
1338
- case "2d":
1339
- return "cad_model";
1340
- case "720":
1341
- return "panorama";
1342
- case "gis":
1343
- return "gis_scene";
1344
- case "gaussian":
1345
- return "gaussian_model";
1346
- case "3d":
1347
- default:
1348
- return "model";
1349
- }
1350
- }
1351
- function St(n) {
1352
- return {
1353
- models: [
1354
- {
1355
- modelType: n.toLowerCase().endsWith(".json") ? "3dtiles" : "glb",
1356
- url: n
1357
- }
1358
- ]
1359
- };
1360
- }
1361
- function Lt(n, e) {
1362
- return {
1363
- applicationId: 0,
1364
- engineType: e,
1365
- assetCategory: At(e),
1366
- url: n,
1367
- urls: [n],
1368
- info: e === "gis" ? St(n) : void 0
1369
- };
1370
- }
1371
- async function Wt(n, e, t) {
1372
- const r = n?.sdkAuth;
1373
- if (!r?.endpoint)
1374
- return Lt(e, t);
1375
- let i;
1376
- (r.token || r.appId && r.appKey && r.appSecret) && (i = (await yt(n, t))?.sdkToken);
1377
- const s = {
1378
- viewToken: await vt(
1379
- r.endpoint,
1380
- e,
1381
- r.timeoutMs ?? 8e3
1382
- ),
1383
- engineType: t
1384
- };
1385
- return i && (s.sdkToken = i), Ct(
1386
- `${Tt(r.endpoint)}/models/view-token/resolve`,
1387
- s,
1388
- r.timeoutMs ?? 8e3
1389
- );
1390
- }
1391
- export {
1392
- N as B,
1393
- Mt as C,
1394
- V as E,
1395
- w as F,
1396
- jt as L,
1397
- It as W,
1398
- $t as a,
1399
- Bt as b,
1400
- _t as c,
1401
- we as d,
1402
- Kt as e,
1403
- Ot as f,
1404
- Rt as g,
1405
- rt as h,
1406
- zt as l,
1407
- Wt as r
1408
- };