@giro3d/piero 1.0.0-beta.4 → 1.0.0-beta.7

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 (499) hide show
  1. package/README.md +10 -10
  2. package/dist/assets/piero.css +2 -2
  3. package/dist/index.cjs.js +6 -9
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.es.js +3090 -6878
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/modules.cjs.js +1 -1
  9. package/dist/modules.cjs.js.map +1 -1
  10. package/dist/modules.d.ts +1 -1
  11. package/dist/modules.es.js +1598 -893
  12. package/dist/modules.es.js.map +1 -1
  13. package/dist/{src → packages/piero/src}/App.vue.d.ts +1 -0
  14. package/dist/packages/piero/src/App.vue.d.ts.map +1 -0
  15. package/dist/packages/piero/src/PieroApplication.d.ts +5 -0
  16. package/dist/packages/piero/src/PieroApplication.d.ts.map +1 -0
  17. package/dist/{src/api/AnalysisApi.d.ts → packages/piero/src/api/analysis.d.ts} +5 -3
  18. package/dist/packages/piero/src/api/analysis.d.ts.map +1 -0
  19. package/dist/packages/piero/src/api/bookmarks.d.ts +16 -0
  20. package/dist/packages/piero/src/api/bookmarks.d.ts.map +1 -0
  21. package/dist/{src/api/DatasetApi.d.ts → packages/piero/src/api/dataset.d.ts} +55 -19
  22. package/dist/packages/piero/src/api/dataset.d.ts.map +1 -0
  23. package/dist/packages/piero/src/api/http.d.ts +32 -0
  24. package/dist/packages/piero/src/api/http.d.ts.map +1 -0
  25. package/dist/packages/piero/src/api/index.d.ts +9 -0
  26. package/dist/packages/piero/src/api/index.d.ts.map +1 -0
  27. package/dist/packages/piero/src/api/notifications.d.ts +52 -0
  28. package/dist/packages/piero/src/api/notifications.d.ts.map +1 -0
  29. package/dist/{src/api/SearchApi.d.ts → packages/piero/src/api/search.d.ts} +2 -0
  30. package/dist/packages/piero/src/api/search.d.ts.map +1 -0
  31. package/dist/packages/piero/src/api/view.d.ts +31 -0
  32. package/dist/packages/piero/src/api/view.d.ts.map +1 -0
  33. package/dist/{src/api/WidgetApi.d.ts → packages/piero/src/api/widgets.d.ts} +9 -6
  34. package/dist/packages/piero/src/api/widgets.d.ts.map +1 -0
  35. package/dist/{src → packages/piero/src}/components/AlertToast.vue.d.ts +1 -0
  36. package/dist/packages/piero/src/components/AlertToast.vue.d.ts.map +1 -0
  37. package/dist/{src → packages/piero/src}/components/AttributeGroup.vue.d.ts +1 -0
  38. package/dist/packages/piero/src/components/AttributeGroup.vue.d.ts.map +1 -0
  39. package/dist/{src → packages/piero/src}/components/AttributeItem.vue.d.ts +1 -0
  40. package/dist/packages/piero/src/components/AttributeItem.vue.d.ts.map +1 -0
  41. package/dist/{src → packages/piero/src}/components/AttributePanel.vue.d.ts +1 -0
  42. package/dist/packages/piero/src/components/AttributePanel.vue.d.ts.map +1 -0
  43. package/dist/packages/piero/src/components/CheckboxToggle.vue.d.ts +26 -0
  44. package/dist/packages/piero/src/components/CheckboxToggle.vue.d.ts.map +1 -0
  45. package/dist/{src → packages/piero/src}/components/ColorFragment.vue.d.ts +1 -0
  46. package/dist/packages/piero/src/components/ColorFragment.vue.d.ts.map +1 -0
  47. package/dist/{src → packages/piero/src}/components/Configuration.d.ts +2 -1
  48. package/dist/packages/piero/src/components/Configuration.d.ts.map +1 -0
  49. package/dist/{src → packages/piero/src}/components/CoordinateFragment.vue.d.ts +1 -0
  50. package/dist/packages/piero/src/components/CoordinateFragment.vue.d.ts.map +1 -0
  51. package/dist/{src → packages/piero/src}/components/CoordinateInput.vue.d.ts +1 -0
  52. package/dist/packages/piero/src/components/CoordinateInput.vue.d.ts.map +1 -0
  53. package/dist/{src → packages/piero/src}/components/DropdownView.vue.d.ts +1 -0
  54. package/dist/packages/piero/src/components/DropdownView.vue.d.ts.map +1 -0
  55. package/dist/{src → packages/piero/src}/components/LinkFragment.vue.d.ts +1 -0
  56. package/dist/packages/piero/src/components/LinkFragment.vue.d.ts.map +1 -0
  57. package/dist/{src → packages/piero/src}/components/LoadingScreen.vue.d.ts +1 -0
  58. package/dist/packages/piero/src/components/LoadingScreen.vue.d.ts.map +1 -0
  59. package/dist/{src → packages/piero/src}/components/MainView.vue.d.ts +1 -0
  60. package/dist/packages/piero/src/components/MainView.vue.d.ts.map +1 -0
  61. package/dist/{src → packages/piero/src}/components/ModalOverlay.vue.d.ts +1 -0
  62. package/dist/packages/piero/src/components/ModalOverlay.vue.d.ts.map +1 -0
  63. package/dist/{src → packages/piero/src}/components/NavigationButtons.vue.d.ts +1 -0
  64. package/dist/packages/piero/src/components/NavigationButtons.vue.d.ts.map +1 -0
  65. package/dist/{src → packages/piero/src}/components/PanelContainer.vue.d.ts +1 -0
  66. package/dist/packages/piero/src/components/PanelContainer.vue.d.ts.map +1 -0
  67. package/dist/{src → packages/piero/src}/components/ProgressBar.vue.d.ts +1 -0
  68. package/dist/packages/piero/src/components/ProgressBar.vue.d.ts.map +1 -0
  69. package/dist/{src → packages/piero/src}/components/SearchOverlay.vue.d.ts +2 -1
  70. package/dist/packages/piero/src/components/SearchOverlay.vue.d.ts.map +1 -0
  71. package/dist/{src → packages/piero/src}/components/SpinnerControl.vue.d.ts +1 -0
  72. package/dist/packages/piero/src/components/SpinnerControl.vue.d.ts.map +1 -0
  73. package/dist/{src/components/atoms/ListLabel.vue.d.ts → packages/piero/src/components/StatusBar.vue.d.ts} +5 -1
  74. package/dist/packages/piero/src/components/StatusBar.vue.d.ts.map +1 -0
  75. package/dist/{src → packages/piero/src}/components/SwitchToggle.vue.d.ts +1 -0
  76. package/dist/packages/piero/src/components/SwitchToggle.vue.d.ts.map +1 -0
  77. package/dist/{src → packages/piero/src}/components/VisibilityControl.vue.d.ts +1 -0
  78. package/dist/packages/piero/src/components/VisibilityControl.vue.d.ts.map +1 -0
  79. package/dist/{src → packages/piero/src}/components/atoms/ButtonArea.vue.d.ts +1 -0
  80. package/dist/packages/piero/src/components/atoms/ButtonArea.vue.d.ts.map +1 -0
  81. package/dist/{src → packages/piero/src}/components/atoms/ButtonWithIcon.vue.d.ts +1 -0
  82. package/dist/packages/piero/src/components/atoms/ButtonWithIcon.vue.d.ts.map +1 -0
  83. package/dist/{src/components/atoms/SectionCollapsible.vue.d.ts → packages/piero/src/components/atoms/CompactList.vue.d.ts} +5 -14
  84. package/dist/packages/piero/src/components/atoms/CompactList.vue.d.ts.map +1 -0
  85. package/dist/{src → packages/piero/src}/components/atoms/Icon.vue.d.ts +1 -0
  86. package/dist/packages/piero/src/components/atoms/Icon.vue.d.ts.map +1 -0
  87. package/dist/{src → packages/piero/src}/components/atoms/IconList.vue.d.ts +1 -0
  88. package/dist/packages/piero/src/components/atoms/IconList.vue.d.ts.map +1 -0
  89. package/dist/{src → packages/piero/src}/components/atoms/IconListButton.vue.d.ts +1 -0
  90. package/dist/packages/piero/src/components/atoms/IconListButton.vue.d.ts.map +1 -0
  91. package/dist/{src → packages/piero/src}/components/atoms/ImportButton.vue.d.ts +1 -0
  92. package/dist/packages/piero/src/components/atoms/ImportButton.vue.d.ts.map +1 -0
  93. package/dist/{src → packages/piero/src}/components/atoms/ListLabelButton.vue.d.ts +1 -0
  94. package/dist/packages/piero/src/components/atoms/ListLabelButton.vue.d.ts.map +1 -0
  95. package/dist/packages/piero/src/components/atoms/Slider.vue.d.ts +15 -0
  96. package/dist/packages/piero/src/components/atoms/Slider.vue.d.ts.map +1 -0
  97. package/dist/{src → packages/piero/src}/components/panels/AboutPanel.vue.d.ts +1 -0
  98. package/dist/packages/piero/src/components/panels/AboutPanel.vue.d.ts.map +1 -0
  99. package/dist/packages/piero/src/components/panels/AnalysisPanel.vue.d.ts +3 -0
  100. package/dist/packages/piero/src/components/panels/AnalysisPanel.vue.d.ts.map +1 -0
  101. package/dist/{src → packages/piero/src}/components/panels/AnnotationItem.vue.d.ts +1 -0
  102. package/dist/packages/piero/src/components/panels/AnnotationItem.vue.d.ts.map +1 -0
  103. package/dist/{src → packages/piero/src}/components/panels/AnnotationPanel.vue.d.ts +1 -0
  104. package/dist/packages/piero/src/components/panels/AnnotationPanel.vue.d.ts.map +1 -0
  105. package/dist/{src → packages/piero/src}/components/panels/BookmarkItem.vue.d.ts +3 -2
  106. package/dist/packages/piero/src/components/panels/BookmarkItem.vue.d.ts.map +1 -0
  107. package/dist/{src → packages/piero/src}/components/panels/BookmarkPanel.vue.d.ts +1 -0
  108. package/dist/packages/piero/src/components/panels/BookmarkPanel.vue.d.ts.map +1 -0
  109. package/dist/packages/piero/src/components/panels/DatagroupItem.vue.d.ts +15 -0
  110. package/dist/packages/piero/src/components/panels/DatagroupItem.vue.d.ts.map +1 -0
  111. package/dist/packages/piero/src/components/panels/DatasetItem.vue.d.ts +15 -0
  112. package/dist/packages/piero/src/components/panels/DatasetItem.vue.d.ts.map +1 -0
  113. package/dist/packages/piero/src/components/panels/DatasetOrGroupItem.vue.d.ts +15 -0
  114. package/dist/packages/piero/src/components/panels/DatasetOrGroupItem.vue.d.ts.map +1 -0
  115. package/dist/{src/components/panels/AnalysisPanel.vue.d.ts → packages/piero/src/components/panels/DatasetPanel.vue.d.ts} +1 -0
  116. package/dist/packages/piero/src/components/panels/DatasetPanel.vue.d.ts.map +1 -0
  117. package/dist/{src/components/OpacitySlider.vue.d.ts → packages/piero/src/components/panels/DatasetParameters.vue.d.ts} +6 -5
  118. package/dist/packages/piero/src/components/panels/DatasetParameters.vue.d.ts.map +1 -0
  119. package/dist/{src → packages/piero/src}/components/panels/EmptyIndicator.vue.d.ts +1 -0
  120. package/dist/packages/piero/src/components/panels/EmptyIndicator.vue.d.ts.map +1 -0
  121. package/dist/{src → packages/piero/src}/components/panels/MeasurementItem.vue.d.ts +1 -0
  122. package/dist/packages/piero/src/components/panels/MeasurementItem.vue.d.ts.map +1 -0
  123. package/dist/{src → packages/piero/src}/components/panels/MeasurementPanel.vue.d.ts +1 -0
  124. package/dist/packages/piero/src/components/panels/MeasurementPanel.vue.d.ts.map +1 -0
  125. package/dist/{src → packages/piero/src}/components/panels/ShareBookmarkModal.vue.d.ts +1 -0
  126. package/dist/packages/piero/src/components/panels/ShareBookmarkModal.vue.d.ts.map +1 -0
  127. package/dist/{src → packages/piero/src}/components/panels/analysis/ToolWrapper.vue.d.ts +1 -0
  128. package/dist/packages/piero/src/components/panels/analysis/ToolWrapper.vue.d.ts.map +1 -0
  129. package/dist/{src → packages/piero/src}/components/toolbar/ToolBar.vue.d.ts +1 -0
  130. package/dist/packages/piero/src/components/toolbar/ToolBar.vue.d.ts.map +1 -0
  131. package/dist/{src → packages/piero/src}/components/toolbar/ToolbarButton.vue.d.ts +1 -0
  132. package/dist/packages/piero/src/components/toolbar/ToolbarButton.vue.d.ts.map +1 -0
  133. package/dist/packages/piero/src/configuration/ImageFormat.d.ts +4 -0
  134. package/dist/packages/piero/src/configuration/ImageFormat.d.ts.map +1 -0
  135. package/dist/packages/piero/src/configuration/annotation.d.ts +25 -0
  136. package/dist/packages/piero/src/configuration/annotation.d.ts.map +1 -0
  137. package/dist/packages/piero/src/configuration/basemap.d.ts +7 -0
  138. package/dist/packages/piero/src/configuration/basemap.d.ts.map +1 -0
  139. package/dist/packages/piero/src/configuration/bookmark.d.ts +10 -0
  140. package/dist/packages/piero/src/configuration/bookmark.d.ts.map +1 -0
  141. package/dist/packages/piero/src/configuration/colormap.d.ts +10 -0
  142. package/dist/packages/piero/src/configuration/colormap.d.ts.map +1 -0
  143. package/dist/packages/piero/src/configuration/configuration.d.ts +32 -0
  144. package/dist/packages/piero/src/configuration/configuration.d.ts.map +1 -0
  145. package/dist/packages/piero/src/configuration/configuration.test.d.ts +2 -0
  146. package/dist/packages/piero/src/configuration/configuration.test.d.ts.map +1 -0
  147. package/dist/packages/piero/src/configuration/coordinate.d.ts +23 -0
  148. package/dist/packages/piero/src/configuration/coordinate.d.ts.map +1 -0
  149. package/dist/packages/piero/src/configuration/crs.d.ts +11 -0
  150. package/dist/packages/piero/src/configuration/crs.d.ts.map +1 -0
  151. package/dist/packages/piero/src/configuration/dataset.d.ts +56 -0
  152. package/dist/packages/piero/src/configuration/dataset.d.ts.map +1 -0
  153. package/dist/packages/piero/src/configuration/defaultConfig.d.ts +8 -0
  154. package/dist/packages/piero/src/configuration/defaultConfig.d.ts.map +1 -0
  155. package/dist/packages/piero/src/configuration/extent.d.ts +15 -0
  156. package/dist/packages/piero/src/configuration/extent.d.ts.map +1 -0
  157. package/dist/packages/piero/src/configuration/index.d.ts +18 -0
  158. package/dist/packages/piero/src/configuration/index.d.ts.map +1 -0
  159. package/dist/packages/piero/src/configuration/layer.d.ts +27 -0
  160. package/dist/packages/piero/src/configuration/layer.d.ts.map +1 -0
  161. package/dist/packages/piero/src/configuration/lookAt.d.ts +13 -0
  162. package/dist/packages/piero/src/configuration/lookAt.d.ts.map +1 -0
  163. package/dist/packages/piero/src/configuration/module.d.ts +6 -0
  164. package/dist/packages/piero/src/configuration/module.d.ts.map +1 -0
  165. package/dist/packages/piero/src/configuration/orientation.d.ts +4 -0
  166. package/dist/packages/piero/src/configuration/orientation.d.ts.map +1 -0
  167. package/dist/packages/piero/src/configuration/scene.d.ts +12 -0
  168. package/dist/packages/piero/src/configuration/scene.d.ts.map +1 -0
  169. package/dist/packages/piero/src/configuration/style.d.ts +7 -0
  170. package/dist/packages/piero/src/configuration/style.d.ts.map +1 -0
  171. package/dist/packages/piero/src/configuration/units.d.ts +6 -0
  172. package/dist/packages/piero/src/configuration/units.d.ts.map +1 -0
  173. package/dist/packages/piero/src/configuration/url.d.ts +4 -0
  174. package/dist/packages/piero/src/configuration/url.d.ts.map +1 -0
  175. package/dist/packages/piero/src/configurationLoader.d.ts +7 -0
  176. package/dist/packages/piero/src/configurationLoader.d.ts.map +1 -0
  177. package/dist/{src → packages/piero/src}/constants.d.ts +1 -0
  178. package/dist/packages/piero/src/constants.d.ts.map +1 -0
  179. package/dist/{src → packages/piero/src}/context.d.ts +27 -18
  180. package/dist/packages/piero/src/context.d.ts.map +1 -0
  181. package/dist/packages/piero/src/createPieroApp.d.ts +30 -0
  182. package/dist/packages/piero/src/createPieroApp.d.ts.map +1 -0
  183. package/dist/{src → packages/piero/src}/events.d.ts +3 -1
  184. package/dist/packages/piero/src/events.d.ts.map +1 -0
  185. package/dist/{src → packages/piero/src}/giro3d/CameraControlsInspector.d.ts +1 -0
  186. package/dist/packages/piero/src/giro3d/CameraControlsInspector.d.ts.map +1 -0
  187. package/dist/packages/piero/src/giro3d/DatasetBuilder.d.ts +17 -0
  188. package/dist/packages/piero/src/giro3d/DatasetBuilder.d.ts.map +1 -0
  189. package/dist/{src → packages/piero/src}/giro3d/Measure3D.d.ts +1 -0
  190. package/dist/packages/piero/src/giro3d/Measure3D.d.ts.map +1 -0
  191. package/dist/packages/piero/src/index.d.ts +15 -0
  192. package/dist/packages/piero/src/index.d.ts.map +1 -0
  193. package/dist/{src → packages/piero/src}/loaders/loader.d.ts +3 -9
  194. package/dist/packages/piero/src/loaders/loader.d.ts.map +1 -0
  195. package/dist/packages/piero/src/loaders/loader.test.d.ts +2 -0
  196. package/dist/packages/piero/src/loaders/loader.test.d.ts.map +1 -0
  197. package/dist/{src → packages/piero/src}/loaders/userData.d.ts +1 -0
  198. package/dist/packages/piero/src/loaders/userData.d.ts.map +1 -0
  199. package/dist/{src → packages/piero/src}/module.d.ts +6 -1
  200. package/dist/packages/piero/src/module.d.ts.map +1 -0
  201. package/dist/packages/piero/src/modules/analysis/ClippingBox.d.ts +19 -0
  202. package/dist/packages/piero/src/modules/analysis/ClippingBox.d.ts.map +1 -0
  203. package/dist/packages/piero/src/modules/analysis/CrossSection.d.ts +12 -0
  204. package/dist/packages/piero/src/modules/analysis/CrossSection.d.ts.map +1 -0
  205. package/dist/packages/piero/src/modules/analysis/FloodingPlane.d.ts +12 -0
  206. package/dist/packages/piero/src/modules/analysis/FloodingPlane.d.ts.map +1 -0
  207. package/dist/{src/modules/clippingBoxAnalysis → packages/piero/src/modules/analysis/clippingBox}/ClippingBox.vue.d.ts +1 -0
  208. package/dist/packages/piero/src/modules/analysis/clippingBox/ClippingBox.vue.d.ts.map +1 -0
  209. package/dist/{src/modules/clippingBoxAnalysis → packages/piero/src/modules/analysis/clippingBox}/ClippingBoxManager.d.ts +4 -3
  210. package/dist/packages/piero/src/modules/analysis/clippingBox/ClippingBoxManager.d.ts.map +1 -0
  211. package/dist/packages/piero/src/modules/analysis/clippingBox/store.d.ts +2269 -0
  212. package/dist/packages/piero/src/modules/analysis/clippingBox/store.d.ts.map +1 -0
  213. package/dist/{src/modules/crossSectionAnalysis → packages/piero/src/modules/analysis/crossSection}/CrossSection.vue.d.ts +1 -0
  214. package/dist/packages/piero/src/modules/analysis/crossSection/CrossSection.vue.d.ts.map +1 -0
  215. package/dist/packages/piero/src/modules/analysis/crossSection/CrossSectionHelper.d.ts +5 -0
  216. package/dist/packages/piero/src/modules/analysis/crossSection/CrossSectionHelper.d.ts.map +1 -0
  217. package/dist/{src/modules/crossSectionAnalysis → packages/piero/src/modules/analysis/crossSection}/CrossSectionManager.d.ts +2 -1
  218. package/dist/packages/piero/src/modules/analysis/crossSection/CrossSectionManager.d.ts.map +1 -0
  219. package/dist/packages/piero/src/modules/analysis/crossSection/store.d.ts +543 -0
  220. package/dist/packages/piero/src/modules/analysis/crossSection/store.d.ts.map +1 -0
  221. package/dist/{src/modules/floodingPlaneAnalysis → packages/piero/src/modules/analysis/floodingPlane}/FloodingPlane.vue.d.ts +1 -0
  222. package/dist/packages/piero/src/modules/analysis/floodingPlane/FloodingPlane.vue.d.ts.map +1 -0
  223. package/dist/{src/modules/floodingPlaneAnalysis → packages/piero/src/modules/analysis/floodingPlane}/FloodingPlaneManager.d.ts +2 -1
  224. package/dist/packages/piero/src/modules/analysis/floodingPlane/FloodingPlaneManager.d.ts.map +1 -0
  225. package/dist/{src/modules/floodingPlaneAnalysis → packages/piero/src/modules/analysis/floodingPlane}/FloodingPlaneObject.d.ts +2 -1
  226. package/dist/packages/piero/src/modules/analysis/floodingPlane/FloodingPlaneObject.d.ts.map +1 -0
  227. package/dist/{src/modules/floodingPlaneAnalysis → packages/piero/src/modules/analysis/floodingPlane}/store.d.ts +1 -0
  228. package/dist/packages/piero/src/modules/analysis/floodingPlane/store.d.ts.map +1 -0
  229. package/dist/packages/piero/src/modules/analysis/index.d.ts +9 -0
  230. package/dist/packages/piero/src/modules/analysis/index.d.ts.map +1 -0
  231. package/dist/packages/piero/src/modules/index.d.ts +17 -0
  232. package/dist/packages/piero/src/modules/index.d.ts.map +1 -0
  233. package/dist/packages/piero/src/modules/loaders/BDTopoLoader.d.ts +11 -0
  234. package/dist/packages/piero/src/modules/loaders/BDTopoLoader.d.ts.map +1 -0
  235. package/dist/packages/piero/src/modules/loaders/GPXLoader.d.ts +28 -0
  236. package/dist/packages/piero/src/modules/loaders/GPXLoader.d.ts.map +1 -0
  237. package/dist/packages/piero/src/modules/loaders/GeoJSONLoader.d.ts +28 -0
  238. package/dist/packages/piero/src/modules/loaders/GeoJSONLoader.d.ts.map +1 -0
  239. package/dist/packages/piero/src/modules/loaders/GeoTIFFLoader.d.ts +11 -0
  240. package/dist/packages/piero/src/modules/loaders/GeoTIFFLoader.d.ts.map +1 -0
  241. package/dist/packages/piero/src/modules/loaders/IFCLoader.d.ts +11 -0
  242. package/dist/packages/piero/src/modules/loaders/IFCLoader.d.ts.map +1 -0
  243. package/dist/packages/piero/src/modules/loaders/KMLLoader.d.ts +28 -0
  244. package/dist/packages/piero/src/modules/loaders/KMLLoader.d.ts.map +1 -0
  245. package/dist/packages/piero/src/modules/loaders/LASLoader.d.ts +29 -0
  246. package/dist/packages/piero/src/modules/loaders/LASLoader.d.ts.map +1 -0
  247. package/dist/packages/piero/src/modules/loaders/MapboxLoader.d.ts +11 -0
  248. package/dist/packages/piero/src/modules/loaders/MapboxLoader.d.ts.map +1 -0
  249. package/dist/packages/piero/src/modules/loaders/OSMLoader.d.ts +11 -0
  250. package/dist/packages/piero/src/modules/loaders/OSMLoader.d.ts.map +1 -0
  251. package/dist/packages/piero/src/modules/loaders/PotreeLoader.d.ts +11 -0
  252. package/dist/packages/piero/src/modules/loaders/PotreeLoader.d.ts.map +1 -0
  253. package/dist/packages/piero/src/modules/loaders/TMSLoader.d.ts +27 -0
  254. package/dist/packages/piero/src/modules/loaders/TMSLoader.d.ts.map +1 -0
  255. package/dist/packages/piero/src/modules/loaders/Tiles3DLoader.d.ts +11 -0
  256. package/dist/packages/piero/src/modules/loaders/Tiles3DLoader.d.ts.map +1 -0
  257. package/dist/packages/piero/src/modules/loaders/WMSLoader.d.ts +29 -0
  258. package/dist/packages/piero/src/modules/loaders/WMSLoader.d.ts.map +1 -0
  259. package/dist/packages/piero/src/modules/loaders/WMTSLoader.d.ts +29 -0
  260. package/dist/packages/piero/src/modules/loaders/WMTSLoader.d.ts.map +1 -0
  261. package/dist/{src/giro3d/entities/FeatureCollectionEntity.d.ts → packages/piero/src/modules/loaders/bdtopo/BDTopoEntity.d.ts} +7 -9
  262. package/dist/packages/piero/src/modules/loaders/bdtopo/BDTopoEntity.d.ts.map +1 -0
  263. package/dist/{src/modules → packages/piero/src/modules/loaders}/ifc/IfcEntity.d.ts +6 -3
  264. package/dist/packages/piero/src/modules/loaders/ifc/IfcEntity.d.ts.map +1 -0
  265. package/dist/{src/modules → packages/piero/src/modules/loaders}/ifc/IfcEntityInspector.d.ts +1 -0
  266. package/dist/packages/piero/src/modules/loaders/ifc/IfcEntityInspector.d.ts.map +1 -0
  267. package/dist/{src/modules → packages/piero/src/modules/loaders}/ifc/IfcPropertyView.vue.d.ts +2 -1
  268. package/dist/packages/piero/src/modules/loaders/ifc/IfcPropertyView.vue.d.ts.map +1 -0
  269. package/dist/{src/modules → packages/piero/src/modules/loaders}/ifc/IfcSubtree.vue.d.ts +1 -0
  270. package/dist/packages/piero/src/modules/loaders/ifc/IfcSubtree.vue.d.ts.map +1 -0
  271. package/dist/packages/piero/src/modules/loaders/index.d.ts +20 -0
  272. package/dist/packages/piero/src/modules/loaders/index.d.ts.map +1 -0
  273. package/dist/packages/piero/src/modules/misc/Attribution.d.ts +8 -0
  274. package/dist/packages/piero/src/modules/misc/Attribution.d.ts.map +1 -0
  275. package/dist/packages/piero/src/modules/misc/AttributionWidget.vue.d.ts +4 -0
  276. package/dist/packages/piero/src/modules/misc/AttributionWidget.vue.d.ts.map +1 -0
  277. package/dist/{src/modules → packages/piero/src/modules/misc}/DownloadDataset.d.ts +3 -2
  278. package/dist/packages/piero/src/modules/misc/DownloadDataset.d.ts.map +1 -0
  279. package/dist/packages/piero/src/modules/misc/Graticule.d.ts +8 -0
  280. package/dist/packages/piero/src/modules/misc/Graticule.d.ts.map +1 -0
  281. package/dist/{src/modules → packages/piero/src/modules/misc}/OpenLayersMinimap.d.ts +3 -2
  282. package/dist/packages/piero/src/modules/misc/OpenLayersMinimap.d.ts.map +1 -0
  283. package/dist/{src/modules/minimap → packages/piero/src/modules/misc}/OpenLayersMinimapComponent.vue.d.ts +1 -0
  284. package/dist/packages/piero/src/modules/misc/OpenLayersMinimapComponent.vue.d.ts.map +1 -0
  285. package/dist/{src/modules → packages/piero/src/modules/misc}/PostProcessEntities.d.ts +3 -2
  286. package/dist/packages/piero/src/modules/misc/PostProcessEntities.d.ts.map +1 -0
  287. package/dist/{src/modules → packages/piero/src/modules/misc}/Tour.d.ts +4 -3
  288. package/dist/packages/piero/src/modules/misc/Tour.d.ts.map +1 -0
  289. package/dist/packages/piero/src/modules/misc/index.d.ts +12 -0
  290. package/dist/packages/piero/src/modules/misc/index.d.ts.map +1 -0
  291. package/dist/{src/modules/geocoding → packages/piero/src/modules/search}/CoordinatesSearch.d.ts +2 -1
  292. package/dist/packages/piero/src/modules/search/CoordinatesSearch.d.ts.map +1 -0
  293. package/dist/{src/modules/geocoding → packages/piero/src/modules/search}/FrenchBanGeocoder.d.ts +2 -1
  294. package/dist/packages/piero/src/modules/search/FrenchBanGeocoder.d.ts.map +1 -0
  295. package/dist/packages/piero/src/modules/search/PhotonGeocoder.d.ts +11 -0
  296. package/dist/packages/piero/src/modules/search/PhotonGeocoder.d.ts.map +1 -0
  297. package/dist/packages/piero/src/modules/search/index.d.ts +9 -0
  298. package/dist/packages/piero/src/modules/search/index.d.ts.map +1 -0
  299. package/dist/{src → packages/piero/src}/providers/Alticoding.d.ts +1 -0
  300. package/dist/packages/piero/src/providers/Alticoding.d.ts.map +1 -0
  301. package/dist/{src → packages/piero/src}/providers/IgnProvider.d.ts +1 -0
  302. package/dist/packages/piero/src/providers/IgnProvider.d.ts.map +1 -0
  303. package/dist/{src → packages/piero/src}/services/AnnotationManager.d.ts +9 -2
  304. package/dist/packages/piero/src/services/AnnotationManager.d.ts.map +1 -0
  305. package/dist/{src → packages/piero/src}/services/CameraController.d.ts +2 -1
  306. package/dist/packages/piero/src/services/CameraController.d.ts.map +1 -0
  307. package/dist/{src → packages/piero/src}/services/DatasetManager.d.ts +4 -3
  308. package/dist/packages/piero/src/services/DatasetManager.d.ts.map +1 -0
  309. package/dist/{src → packages/piero/src}/services/Giro3DManager.d.ts +2 -1
  310. package/dist/packages/piero/src/services/Giro3DManager.d.ts.map +1 -0
  311. package/dist/{src → packages/piero/src}/services/Highlighter.d.ts +1 -0
  312. package/dist/packages/piero/src/services/Highlighter.d.ts.map +1 -0
  313. package/dist/packages/piero/src/services/LayerManager.d.ts +24 -0
  314. package/dist/packages/piero/src/services/LayerManager.d.ts.map +1 -0
  315. package/dist/{src → packages/piero/src}/services/MeasureTool.d.ts +2 -1
  316. package/dist/packages/piero/src/services/MeasureTool.d.ts.map +1 -0
  317. package/dist/{src → packages/piero/src}/services/MeasurementManager.d.ts +2 -1
  318. package/dist/packages/piero/src/services/MeasurementManager.d.ts.map +1 -0
  319. package/dist/{src → packages/piero/src}/services/SceneCursorManager.d.ts +1 -0
  320. package/dist/packages/piero/src/services/SceneCursorManager.d.ts.map +1 -0
  321. package/dist/{src/services/Picker.d.ts → packages/piero/src/services/picking.d.ts} +1 -0
  322. package/dist/packages/piero/src/services/picking.d.ts.map +1 -0
  323. package/dist/{src → packages/piero/src}/stores/analysis.d.ts +2 -1
  324. package/dist/packages/piero/src/stores/analysis.d.ts.map +1 -0
  325. package/dist/{src → packages/piero/src}/stores/annotations.d.ts +1 -0
  326. package/dist/packages/piero/src/stores/annotations.d.ts.map +1 -0
  327. package/dist/packages/piero/src/stores/basemap.d.ts +18 -0
  328. package/dist/packages/piero/src/stores/basemap.d.ts.map +1 -0
  329. package/dist/{src → packages/piero/src}/stores/bookmarks.d.ts +2 -1
  330. package/dist/packages/piero/src/stores/bookmarks.d.ts.map +1 -0
  331. package/dist/{src → packages/piero/src}/stores/camera.d.ts +1 -0
  332. package/dist/packages/piero/src/stores/camera.d.ts.map +1 -0
  333. package/dist/{src → packages/piero/src}/stores/datasets.d.ts +27 -16
  334. package/dist/packages/piero/src/stores/datasets.d.ts.map +1 -0
  335. package/dist/{src → packages/piero/src}/stores/giro3d.d.ts +7 -5
  336. package/dist/packages/piero/src/stores/giro3d.d.ts.map +1 -0
  337. package/dist/{src → packages/piero/src}/stores/measurement.d.ts +1 -0
  338. package/dist/packages/piero/src/stores/measurement.d.ts.map +1 -0
  339. package/dist/{src → packages/piero/src}/stores/modules.d.ts +1 -0
  340. package/dist/packages/piero/src/stores/modules.d.ts.map +1 -0
  341. package/dist/packages/piero/src/stores/modules.test.d.ts +2 -0
  342. package/dist/packages/piero/src/stores/modules.test.d.ts.map +1 -0
  343. package/dist/{src → packages/piero/src}/stores/notifications.d.ts +2 -1
  344. package/dist/packages/piero/src/stores/notifications.d.ts.map +1 -0
  345. package/dist/{src → packages/piero/src}/stores/search.d.ts +6 -2
  346. package/dist/packages/piero/src/stores/search.d.ts.map +1 -0
  347. package/dist/{src → packages/piero/src}/stores/widgets.d.ts +2 -1
  348. package/dist/packages/piero/src/stores/widgets.d.ts.map +1 -0
  349. package/dist/{src → packages/piero/src}/types/Annotation.d.ts +5 -2
  350. package/dist/packages/piero/src/types/Annotation.d.ts.map +1 -0
  351. package/dist/{src → packages/piero/src}/types/AnnotationMode.d.ts +1 -0
  352. package/dist/packages/piero/src/types/AnnotationMode.d.ts.map +1 -0
  353. package/dist/{src → packages/piero/src}/types/Bookmark.d.ts +1 -0
  354. package/dist/packages/piero/src/types/Bookmark.d.ts.map +1 -0
  355. package/dist/{src → packages/piero/src}/types/CameraPosition.d.ts +4 -0
  356. package/dist/packages/piero/src/types/CameraPosition.d.ts.map +1 -0
  357. package/dist/packages/piero/src/types/Dataset.d.ts +81 -0
  358. package/dist/packages/piero/src/types/Dataset.d.ts.map +1 -0
  359. package/dist/{src → packages/piero/src}/types/Feature.d.ts +1 -0
  360. package/dist/packages/piero/src/types/Feature.d.ts.map +1 -0
  361. package/dist/{src → packages/piero/src}/types/Measure.d.ts +1 -0
  362. package/dist/packages/piero/src/types/Measure.d.ts.map +1 -0
  363. package/dist/{src → packages/piero/src}/types/MeasurementMode.d.ts +1 -0
  364. package/dist/packages/piero/src/types/MeasurementMode.d.ts.map +1 -0
  365. package/dist/{src → packages/piero/src}/types/Named.d.ts +1 -0
  366. package/dist/packages/piero/src/types/Named.d.ts.map +1 -0
  367. package/dist/{src → packages/piero/src}/types/NavigationMode.d.ts +1 -0
  368. package/dist/packages/piero/src/types/NavigationMode.d.ts.map +1 -0
  369. package/dist/{src → packages/piero/src}/types/OLGeometry.d.ts +1 -0
  370. package/dist/packages/piero/src/types/OLGeometry.d.ts.map +1 -0
  371. package/dist/{src → packages/piero/src}/types/Viewbox.d.ts +1 -0
  372. package/dist/packages/piero/src/types/Viewbox.d.ts.map +1 -0
  373. package/dist/packages/piero/src/types/index.d.ts +1 -0
  374. package/dist/packages/piero/src/types/index.d.ts.map +1 -0
  375. package/dist/{src → packages/piero/src}/types/utilities.d.ts +1 -0
  376. package/dist/packages/piero/src/types/utilities.d.ts.map +1 -0
  377. package/dist/{src → packages/piero/src}/utils/Components.d.ts +1 -0
  378. package/dist/packages/piero/src/utils/Components.d.ts.map +1 -0
  379. package/dist/packages/piero/src/utils/Configuration.d.ts +12 -0
  380. package/dist/packages/piero/src/utils/Configuration.d.ts.map +1 -0
  381. package/dist/{src → packages/piero/src}/utils/Download.d.ts +2 -1
  382. package/dist/packages/piero/src/utils/Download.d.ts.map +1 -0
  383. package/dist/{src → packages/piero/src}/utils/Fetcher.d.ts +2 -20
  384. package/dist/packages/piero/src/utils/Fetcher.d.ts.map +1 -0
  385. package/dist/{src → packages/piero/src}/utils/Measure.d.ts +1 -0
  386. package/dist/packages/piero/src/utils/Measure.d.ts.map +1 -0
  387. package/dist/{src → packages/piero/src}/utils/Projections.d.ts +3 -2
  388. package/dist/packages/piero/src/utils/Projections.d.ts.map +1 -0
  389. package/dist/{src → packages/piero/src}/utils/Types.d.ts +1 -0
  390. package/dist/packages/piero/src/utils/Types.d.ts.map +1 -0
  391. package/dist/{src/utils/OLFeatures.d.ts → packages/piero/src/utils/features.d.ts} +1 -0
  392. package/dist/packages/piero/src/utils/features.d.ts.map +1 -0
  393. package/dist/packages/piero/src/utils/style.d.ts +4 -0
  394. package/dist/packages/piero/src/utils/style.d.ts.map +1 -0
  395. package/dist/userData.cjs.js +6 -0
  396. package/dist/userData.cjs.js.map +1 -0
  397. package/dist/{Components.es.js → userData.es.js} +2283 -3131
  398. package/dist/userData.es.js.map +1 -0
  399. package/package.json +9 -5
  400. package/dist/Components.cjs.js +0 -7
  401. package/dist/Components.cjs.js.map +0 -1
  402. package/dist/Components.es.js.map +0 -1
  403. package/dist/src/api/BookmarkApi.d.ts +0 -6
  404. package/dist/src/api/NotificationApi.d.ts +0 -10
  405. package/dist/src/api/ViewApi.d.ts +0 -10
  406. package/dist/src/api/index.d.ts +0 -5
  407. package/dist/src/components/StatusBar.vue.d.ts +0 -10
  408. package/dist/src/components/atoms/CompactList.vue.d.ts +0 -17
  409. package/dist/src/components/panels/BasemapItem.vue.d.ts +0 -17
  410. package/dist/src/components/panels/DatagroupItem.vue.d.ts +0 -18
  411. package/dist/src/components/panels/DatasetItem.vue.d.ts +0 -18
  412. package/dist/src/components/panels/DatasetOrGroupItem.vue.d.ts +0 -16
  413. package/dist/src/components/panels/DatasetPanel.vue.d.ts +0 -2
  414. package/dist/src/components/panels/OverlayItem.vue.d.ts +0 -19
  415. package/dist/src/config-loader.d.ts +0 -7
  416. package/dist/src/createPieroApp.d.ts +0 -31
  417. package/dist/src/giro3d/EntityBuilder.d.ts +0 -21
  418. package/dist/src/giro3d/Graticule.d.ts +0 -20
  419. package/dist/src/giro3d/Grid.d.ts +0 -11
  420. package/dist/src/giro3d/LayerBuilder.d.ts +0 -46
  421. package/dist/src/giro3d/Plane.d.ts +0 -11
  422. package/dist/src/giro3d/Skybox.d.ts +0 -6
  423. package/dist/src/giro3d/entities/PointCloudEntity.d.ts +0 -45
  424. package/dist/src/giro3d/entities/TiledPointCloudEntity.d.ts +0 -13
  425. package/dist/src/giro3d/entities/Tiles3dEntity.d.ts +0 -11
  426. package/dist/src/giro3d/entities/VectorLabelsEntity.d.ts +0 -48
  427. package/dist/src/giro3d/entities/VectorMeshEntity.d.ts +0 -97
  428. package/dist/src/giro3d/entities/VectorShapeEntity.d.ts +0 -8
  429. package/dist/src/giro3d/entities/flatPointCloud.d.ts +0 -2
  430. package/dist/src/giro3d/entities/tiledIfc.d.ts +0 -2
  431. package/dist/src/giro3d/entities/vector.d.ts +0 -2
  432. package/dist/src/giro3d/sources/GeopackageSource.d.ts +0 -20
  433. package/dist/src/giro3d/sources/ShapefileSource.d.ts +0 -20
  434. package/dist/src/giro3d/sources/mixins.d.ts +0 -60
  435. package/dist/src/index.d.ts +0 -18
  436. package/dist/src/loaders/csv.d.ts +0 -3
  437. package/dist/src/loaders/las.d.ts +0 -3
  438. package/dist/src/loaders/loader.test.d.ts +0 -1
  439. package/dist/src/loaders/vector.d.ts +0 -4
  440. package/dist/src/modules/ClippingBoxAnalysis.d.ts +0 -18
  441. package/dist/src/modules/CrossSectionAnalysis.d.ts +0 -11
  442. package/dist/src/modules/FloodingPlaneAnalysis.d.ts +0 -11
  443. package/dist/src/modules/IFCLoader.d.ts +0 -10
  444. package/dist/src/modules/PLYLoader.d.ts +0 -10
  445. package/dist/src/modules/PotreeLoader.d.ts +0 -10
  446. package/dist/src/modules/clippingBoxAnalysis/store.d.ts +0 -2268
  447. package/dist/src/modules/crossSectionAnalysis/CrossSectionHelper.d.ts +0 -4
  448. package/dist/src/modules/crossSectionAnalysis/store.d.ts +0 -542
  449. package/dist/src/modules/index.d.ts +0 -13
  450. package/dist/src/modules/ply/PlyEntity.d.ts +0 -33
  451. package/dist/src/services/LayerManager.d.ts +0 -37
  452. package/dist/src/stores/layers.d.ts +0 -40
  453. package/dist/src/stores/modules.test.d.ts +0 -1
  454. package/dist/src/types/BaseLayer.d.ts +0 -30
  455. package/dist/src/types/Configuration.d.ts +0 -106
  456. package/dist/src/types/Dataset.d.ts +0 -78
  457. package/dist/src/types/IFCTypes.d.ts +0 -5
  458. package/dist/src/types/LayerObject.d.ts +0 -20
  459. package/dist/src/types/Notification.d.ts +0 -8
  460. package/dist/src/types/Overlay.d.ts +0 -24
  461. package/dist/src/types/VectorStyle.d.ts +0 -31
  462. package/dist/src/types/configuration/analysis.d.ts +0 -26
  463. package/dist/src/types/configuration/bookmark.d.ts +0 -16
  464. package/dist/src/types/configuration/camera.d.ts +0 -19
  465. package/dist/src/types/configuration/color.d.ts +0 -18
  466. package/dist/src/types/configuration/datasets/cityjson.d.ts +0 -9
  467. package/dist/src/types/configuration/datasets/core.d.ts +0 -49
  468. package/dist/src/types/configuration/datasets/featureCollection.d.ts +0 -6
  469. package/dist/src/types/configuration/datasets/ifc.d.ts +0 -10
  470. package/dist/src/types/configuration/datasets/index.d.ts +0 -27
  471. package/dist/src/types/configuration/datasets/layer.d.ts +0 -43
  472. package/dist/src/types/configuration/datasets/ply.d.ts +0 -10
  473. package/dist/src/types/configuration/datasets/pointCloud.d.ts +0 -12
  474. package/dist/src/types/configuration/datasets/potreePointCloud.d.ts +0 -10
  475. package/dist/src/types/configuration/datasets/tiledIfc.d.ts +0 -9
  476. package/dist/src/types/configuration/datasets/tiledPointCloud.d.ts +0 -9
  477. package/dist/src/types/configuration/datasets/vector.d.ts +0 -34
  478. package/dist/src/types/configuration/features.d.ts +0 -2
  479. package/dist/src/types/configuration/geographic.d.ts +0 -51
  480. package/dist/src/types/configuration/layers/core.d.ts +0 -50
  481. package/dist/src/types/configuration/layers/index.d.ts +0 -51
  482. package/dist/src/types/configuration/sources/bingMaps.d.ts +0 -5
  483. package/dist/src/types/configuration/sources/core/baseConfig.d.ts +0 -70
  484. package/dist/src/types/configuration/sources/core/tiled.d.ts +0 -19
  485. package/dist/src/types/configuration/sources/core/vector.d.ts +0 -13
  486. package/dist/src/types/configuration/sources/core/vectorTile.d.ts +0 -8
  487. package/dist/src/types/configuration/sources/customVector.d.ts +0 -7
  488. package/dist/src/types/configuration/sources/customVectorTile.d.ts +0 -8
  489. package/dist/src/types/configuration/sources/geojson.d.ts +0 -5
  490. package/dist/src/types/configuration/sources/geotiff.d.ts +0 -8
  491. package/dist/src/types/configuration/sources/gpx.d.ts +0 -5
  492. package/dist/src/types/configuration/sources/kml.d.ts +0 -5
  493. package/dist/src/types/configuration/sources/mvt.d.ts +0 -10
  494. package/dist/src/types/configuration/sources/osm.d.ts +0 -5
  495. package/dist/src/types/configuration/sources/stadiaMaps.d.ts +0 -5
  496. package/dist/src/types/configuration/sources/wms.d.ts +0 -15
  497. package/dist/src/types/configuration/sources/wmts.d.ts +0 -15
  498. package/dist/src/types/configuration/sources/xyz.d.ts +0 -9
  499. package/dist/src/utils/Configuration.d.ts +0 -15
@@ -1,24 +1,47 @@
1
- var Ce = Object.defineProperty;
2
- var xe = (a, t, e) => t in a ? Ce(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var c = (a, t, e) => xe(a, typeof t != "symbol" ? t + "" : t, e);
4
- import { K as Ie, a1 as se, P as Pe, V as F, I as q, O as Ee, a2 as K, a3 as ce, a4 as R, a5 as Se, i as J, a6 as oe, F as k, l as Te, t as $, G as ue, f as ee, M as Fe, n as ke, J as Me, a7 as Le, N as ie, U as W, W as De, _ as te, r as Be, X as Ne, a8 as de, a9 as Oe, aa as Ae, ab as ze, C as je, h as $e } from "./Components.es.js";
5
- import { ac as Wn } from "./Components.es.js";
6
- import { defineComponent as D, ref as I, createElementBlock as P, openBlock as v, createElementVNode as m, toDisplayString as pe, createCommentVNode as L, createBlock as V, shallowRef as Z, Fragment as Y, createVNode as T, unref as b, resolveComponent as He, normalizeClass as ae, withCtx as re, renderList as he, onMounted as Re, onUnmounted as Ve } from "vue";
7
- import H from "@giro3d/giro3d/core/geographic/Coordinates";
8
- import { defineStore as me } from "pinia";
9
- import fe, { isEntity3D as ge } from "@giro3d/giro3d/entities/Entity3D";
10
- import { HttpError as Ue } from "@giro3d/giro3d/utils/Fetcher";
11
- import Ye from "@giro3d/giro3d/gui/EntityPanel";
12
- import { Components as Ge, SimpleScene as We, SimpleRenderer as qe, SimpleCamera as Je, SimpleRaycaster as Ze, IfcPropertiesUtils as M, FragmentBoundingBox as Qe, FragmentManager as Xe, FragmentClassifier as Ke, FragmentIfcLoader as et, toCompositeID as tt, IfcCategoryMap as nt } from "openbim-components";
13
- import st from "@giro3d/giro3d/gui/EntityInspector";
14
- import { Map as ot, View as it } from "ol";
15
- import at from "ol/layer/Tile";
16
- import { fromLonLat as le } from "ol/proj";
17
- import { OSM as rt } from "ol/source";
18
- import lt from "@giro3d/giro3d/entities/PointCloud";
19
- import ct from "@giro3d/giro3d/sources/PotreeSource";
20
- import w from "shepherd.js";
21
- const ut = { class: "input-group" }, dt = { class: "form-label" }, pt = { class: "input-group" }, ht = ["value"], mt = ["value"], ft = ["value"], gt = /* @__PURE__ */ D({
1
+ var yt = Object.defineProperty;
2
+ var vt = (s, e, t) => e in s ? yt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var l = (s, e, t) => vt(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { a3 as Ce, ag as te, U as wt, V as M, a1 as ne, T as _t, ah as Ee, ai as Te, aj as q, ak as St, M as J, al as ye, am as Ie, C as xt, ae as re, an as O, ao as Fe, ap as I, aq as le, ar as z, as as se, at as Pt, F as $, K as Ct, z as Et, a2 as Tt, au as It, a4 as ve, a6 as ee, a7 as Ft, _ as X, L as De, a8 as Dt, N as Mt, av as K, w as Lt, aw as kt, ax as Ot, ay as jt, y as ce, O as $t, q as zt } from "./userData.es.js";
5
+ import { defineComponent as A, ref as E, createElementBlock as x, openBlock as y, createElementVNode as f, toDisplayString as ue, createCommentVNode as k, createBlock as Z, shallowRef as oe, Fragment as V, createVNode as D, unref as v, resolveComponent as At, normalizeClass as we, withCtx as _e, renderList as de, computed as Nt, onMounted as Bt, onUnmounted as Gt } from "vue";
6
+ import N from "@giro3d/giro3d/core/geographic/Coordinates";
7
+ import { defineStore as Me } from "pinia";
8
+ import Rt, { isEntity3D as Le } from "@giro3d/giro3d/entities/Entity3D";
9
+ import Ht from "@giro3d/giro3d/core/geographic/Extent";
10
+ import Ut from "@giro3d/giro3d/entities/FeatureCollection";
11
+ import { GeoJSON as Vt } from "ol/format";
12
+ import { tile as Wt } from "ol/loadingstrategy.js";
13
+ import Yt from "ol/source/Vector";
14
+ import { createXYZ as qt } from "ol/tilegrid.js";
15
+ import L from "@giro3d/giro3d/core/layer/ColorLayer";
16
+ import pe from "@giro3d/giro3d/sources/VectorSource";
17
+ import Jt from "ol/format/GeoJSON";
18
+ import { flatStylesToStyleFunction as Se, rulesToStyleFunction as Zt } from "ol/render/canvas/style";
19
+ import me from "@giro3d/giro3d/core/layer/ElevationLayer";
20
+ import Xt from "@giro3d/giro3d/sources/GeoTIFFSource";
21
+ import Kt from "ol/format/GPX";
22
+ import { Style as Qt, Stroke as en, Fill as tn } from "ol/style";
23
+ import nn from "@giro3d/giro3d/gui/EntityPanel";
24
+ import { Components as sn, SimpleScene as on, SimpleRenderer as an, SimpleCamera as rn, SimpleRaycaster as ln, IfcPropertiesUtils as j, FragmentBoundingBox as cn, FragmentManager as un, FragmentClassifier as dn, FragmentIfcLoader as pn, toCompositeID as mn, IfcCategoryMap as fn } from "openbim-components";
25
+ import hn from "@giro3d/giro3d/gui/EntityInspector";
26
+ import gn from "ol/format/KML";
27
+ import fe from "@giro3d/giro3d/entities/PointCloud";
28
+ import bn from "@giro3d/giro3d/sources/COPCSource";
29
+ import yn from "@giro3d/giro3d/sources/LASSource";
30
+ import _ from "zod";
31
+ import vn from "@giro3d/giro3d/formats/MapboxTerrainFormat";
32
+ import he from "@giro3d/giro3d/sources/TiledImageSource";
33
+ import { XYZ as ke, OSM as Oe } from "ol/source";
34
+ import wn from "@giro3d/giro3d/sources/PotreeSource";
35
+ import _n from "@giro3d/giro3d/entities/Tiles3D";
36
+ import Sn from "@giro3d/giro3d/sources/WmsSource";
37
+ import xn from "@giro3d/giro3d/formats/BilFormat";
38
+ import Pn from "@giro3d/giro3d/sources/WmtsSource";
39
+ import { Map as Cn, View as En } from "ol";
40
+ import Tn from "ol/layer/Tile";
41
+ import { fromLonLat as xe } from "ol/proj";
42
+ import C from "shepherd.js";
43
+ import { HttpError as je } from "@giro3d/giro3d/utils/Fetcher";
44
+ const In = { class: "input-group" }, Fn = { class: "form-label" }, Dn = { class: "input-group" }, Mn = ["value"], Ln = ["value"], kn = ["value"], On = /* @__PURE__ */ A({
22
45
  __name: "CoordinateInput",
23
46
  props: {
24
47
  cursorManager: {},
@@ -28,148 +51,148 @@ const ut = { class: "input-group" }, dt = { class: "form-label" }, pt = { class:
28
51
  showZ: { type: Boolean }
29
52
  },
30
53
  emits: ["update:coordinates"],
31
- setup(a, { emit: t }) {
32
- var g, C, _;
33
- const e = a, n = I(((g = e.initialValue) == null ? void 0 : g.x) ?? 0), s = I(((C = e.initialValue) == null ? void 0 : C.y) ?? 0), o = I(((_ = e.initialValue) == null ? void 0 : _.z) ?? 0), i = t, l = new Pe(), d = I(!1), p = () => {
34
- i(
54
+ setup(s, { emit: e }) {
55
+ var h, S, T;
56
+ const t = s, n = E(((h = t.initialValue) == null ? void 0 : h.x) ?? 0), o = E(((S = t.initialValue) == null ? void 0 : S.y) ?? 0), i = E(((T = t.initialValue) == null ? void 0 : T.z) ?? 0), a = e, r = new wt(), u = E(!1), p = () => {
57
+ a(
35
58
  "update:coordinates",
36
- new H(se(e.instance).referenceCrs, n.value, s.value, o.value)
59
+ new N(te(t.instance).referenceCrs, n.value, o.value, i.value)
37
60
  );
38
- }, r = () => {
39
- const y = se(e.instance);
40
- d.value = !0;
41
- const x = (G) => {
42
- var B, N, O, ne;
43
- const S = (N = (B = l.getFirstFeatureAt(y, G)) == null ? void 0 : B.at(0)) == null ? void 0 : N.point;
44
- S && (n.value = S.x, s.value = S.y, o.value = S.z, (O = e.cursorManager) == null || O.setCursor("location"), (ne = e.cursorManager) == null || ne.setCursorLocation(S));
45
- }, E = (G) => {
46
- var B, N, O;
47
- (B = e.cursorManager) == null || B.setCursor(null), y.domElement.removeEventListener("click", E), y.domElement.removeEventListener("mousemove", x), d.value = !1;
48
- const S = (O = (N = l.getFirstFeatureAt(y, G)) == null ? void 0 : N.at(0)) == null ? void 0 : O.point;
49
- S && (n.value = S.x, s.value = S.y, o.value = S.z, p());
61
+ }, c = () => {
62
+ const b = te(t.instance);
63
+ u.value = !0;
64
+ const P = (Q) => {
65
+ var B, G, R, be;
66
+ const F = (G = (B = r.getFirstFeatureAt(b, Q)) == null ? void 0 : B.at(0)) == null ? void 0 : G.point;
67
+ F && (n.value = F.x, o.value = F.y, i.value = F.z, (R = t.cursorManager) == null || R.setCursor("location"), (be = t.cursorManager) == null || be.setCursorLocation(F));
68
+ }, w = (Q) => {
69
+ var B, G, R;
70
+ (B = t.cursorManager) == null || B.setCursor(null), b.domElement.removeEventListener("click", w), b.domElement.removeEventListener("mousemove", P), u.value = !1;
71
+ const F = (R = (G = r.getFirstFeatureAt(b, Q)) == null ? void 0 : G.at(0)) == null ? void 0 : R.point;
72
+ F && (n.value = F.x, o.value = F.y, i.value = F.z, p());
50
73
  };
51
- y.domElement.addEventListener("mousemove", x), y.domElement.addEventListener("click", E);
74
+ b.domElement.addEventListener("mousemove", P), b.domElement.addEventListener("click", w);
52
75
  };
53
- function u(y) {
54
- n.value = y, p();
76
+ function d(b) {
77
+ n.value = b, p();
55
78
  }
56
- function h(y) {
57
- s.value = y, p();
79
+ function m(b) {
80
+ o.value = b, p();
58
81
  }
59
- function f(y) {
60
- o.value = y, p();
82
+ function g(b) {
83
+ i.value = b, p();
61
84
  }
62
- return (y, x) => (v(), P("div", ut, [
63
- m("label", dt, pe(e.label), 1),
64
- m("div", pt, [
65
- m("input", {
85
+ return (b, P) => (y(), x("div", In, [
86
+ f("label", Fn, ue(t.label), 1),
87
+ f("div", Dn, [
88
+ f("input", {
66
89
  type: "number",
67
90
  class: "form-control",
68
91
  id: "plane-center-x",
69
92
  value: n.value.toFixed(2),
70
- onInput: x[0] || (x[0] = (E) => u(Number.parseFloat(E.target.value)))
71
- }, null, 40, ht),
72
- m("input", {
93
+ onInput: P[0] || (P[0] = (w) => d(Number.parseFloat(w.target.value)))
94
+ }, null, 40, Mn),
95
+ f("input", {
73
96
  type: "number",
74
97
  class: "form-control",
75
98
  id: "plane-center-y",
76
- value: s.value.toFixed(2),
77
- onInput: x[1] || (x[1] = (E) => h(Number.parseFloat(E.target.value)))
78
- }, null, 40, mt),
79
- e.showZ === !0 ? (v(), P("input", {
99
+ value: o.value.toFixed(2),
100
+ onInput: P[1] || (P[1] = (w) => m(Number.parseFloat(w.target.value)))
101
+ }, null, 40, Ln),
102
+ t.showZ === !0 ? (y(), x("input", {
80
103
  key: 0,
81
104
  type: "number",
82
105
  class: "form-control",
83
106
  id: "plane-center-z",
84
- value: o.value.toFixed(2),
85
- onInput: x[2] || (x[2] = (E) => f(Number.parseFloat(E.target.value)))
86
- }, null, 40, ft)) : L("", !0),
87
- e.instance != null ? (v(), V(Ie, {
107
+ value: i.value.toFixed(2),
108
+ onInput: P[2] || (P[2] = (w) => g(Number.parseFloat(w.target.value)))
109
+ }, null, 40, kn)) : k("", !0),
110
+ t.instance != null ? (y(), Z(Ce, {
88
111
  key: 1,
89
112
  title: "Pick point in scene",
90
113
  icon: "fg-location",
91
- disabled: d.value,
92
- onClick: r,
114
+ disabled: u.value,
115
+ onClick: c,
93
116
  class: "btn-primary"
94
- }, null, 8, ["disabled"])) : L("", !0)
117
+ }, null, 8, ["disabled"])) : k("", !0)
95
118
  ])
96
119
  ]));
97
120
  }
98
- }), ye = me("crossSection", () => {
99
- const a = I(0), t = Z(), e = Z(), n = I(new F(0, 0, 0)), s = I(!1), o = I(!1);
100
- function i(h) {
101
- s.value = h;
121
+ }), $e = Me("crossSection", () => {
122
+ const s = E(0), e = oe(), t = oe(), n = E(new M(0, 0, 0)), o = E(!1), i = E(!1);
123
+ function a(m) {
124
+ o.value = m;
102
125
  }
103
- function l(h) {
104
- a.value = h;
126
+ function r(m) {
127
+ s.value = m;
105
128
  }
106
- function d(h) {
107
- n.value = h;
129
+ function u(m) {
130
+ n.value = m;
108
131
  }
109
- function p(h) {
110
- o.value = h;
132
+ function p(m) {
133
+ i.value = m;
111
134
  }
112
- function r(h) {
113
- t.value = h;
135
+ function c(m) {
136
+ e.value = m;
114
137
  }
115
- function u(h) {
116
- e.value = h;
138
+ function d(m) {
139
+ t.value = m;
117
140
  }
118
141
  return {
119
142
  center: n,
120
- cursorManager: e,
121
- enable: s,
122
- instance: t,
123
- orientation: a,
124
- setCenter: d,
125
- setCursorManager: u,
126
- setEnabled: i,
127
- setInstance: r,
128
- setOrientation: l,
143
+ cursorManager: t,
144
+ enable: o,
145
+ instance: e,
146
+ orientation: s,
147
+ setCenter: u,
148
+ setCursorManager: d,
149
+ setEnabled: a,
150
+ setInstance: c,
151
+ setOrientation: r,
129
152
  setShowHelper: p,
130
- showHelper: o
153
+ showHelper: i
131
154
  };
132
- }), yt = { class: "input-group" }, bt = { class: "input-group" }, vt = { class: "input-group my-3" }, _t = ["value"], wt = { class: "input-group mb-3" }, Ct = ["value"], xt = /* @__PURE__ */ D({
155
+ }), jn = { class: "input-group" }, $n = { class: "input-group" }, zn = { class: "input-group my-3" }, An = ["value"], Nn = { class: "input-group mb-3" }, Bn = ["value"], Gn = /* @__PURE__ */ A({
133
156
  __name: "CrossSection",
134
- setup(a) {
135
- const t = ye();
136
- function e(s) {
137
- t.setOrientation(s);
157
+ setup(s) {
158
+ const e = $e();
159
+ function t(o) {
160
+ e.setOrientation(o);
138
161
  }
139
- const n = (s) => {
140
- t.setCenter(s.toVector3());
162
+ const n = (o) => {
163
+ e.setCenter(o.toVector3());
141
164
  };
142
- return (s, o) => (v(), P(Y, null, [
143
- m("div", yt, [
144
- T(q, {
145
- "model-value": b(t).enable,
146
- "onUpdate:modelValue": o[0] || (o[0] = (i) => b(t).setEnabled(i)),
165
+ return (o, i) => (y(), x(V, null, [
166
+ f("div", jn, [
167
+ D(ne, {
168
+ "model-value": v(e).enable,
169
+ "onUpdate:modelValue": i[0] || (i[0] = (a) => v(e).setEnabled(a)),
147
170
  id: "cross-section-enable",
148
171
  title: "Enable cross-section"
149
172
  }, null, 8, ["model-value"]),
150
- o[4] || (o[4] = m("label", {
173
+ i[4] || (i[4] = f("label", {
151
174
  for: "cross-section-enable",
152
175
  class: "form-check-label"
153
176
  }, "Enable cross section", -1))
154
177
  ]),
155
- m("div", bt, [
156
- T(q, {
157
- "model-value": b(t).showHelper,
158
- "onUpdate:modelValue": o[1] || (o[1] = (i) => b(t).setShowHelper(i)),
178
+ f("div", $n, [
179
+ D(ne, {
180
+ "model-value": v(e).showHelper,
181
+ "onUpdate:modelValue": i[1] || (i[1] = (a) => v(e).setShowHelper(a)),
159
182
  id: "cross-section-helper-enable",
160
183
  title: "Show plane helper"
161
184
  }, null, 8, ["model-value"]),
162
- o[5] || (o[5] = m("label", {
185
+ i[5] || (i[5] = f("label", {
163
186
  for: "cross-section-helper-enable",
164
187
  class: "form-check-label"
165
188
  }, "Show plane helper", -1))
166
189
  ]),
167
- m("div", vt, [
168
- o[6] || (o[6] = m("label", {
190
+ f("div", zn, [
191
+ i[6] || (i[6] = f("label", {
169
192
  for: "plane-orientation-range",
170
193
  class: "form-check-label"
171
194
  }, "Plane orientation (0-360°)", -1)),
172
- m("input", {
195
+ f("input", {
173
196
  id: "plane-orientation-range",
174
197
  title: "Altitude",
175
198
  type: "range",
@@ -177,63 +200,61 @@ const ut = { class: "input-group" }, dt = { class: "form-label" }, pt = { class:
177
200
  min: "0",
178
201
  step: "0.1",
179
202
  max: "360",
180
- value: b(t).orientation,
181
- onInput: o[2] || (o[2] = (i) => e(Number.parseFloat(i.target.value)))
182
- }, null, 40, _t)
203
+ value: v(e).orientation,
204
+ onInput: i[2] || (i[2] = (a) => t(Number.parseFloat(a.target.value)))
205
+ }, null, 40, An)
183
206
  ]),
184
- m("div", wt, [
185
- m("input", {
207
+ f("div", Nn, [
208
+ f("input", {
186
209
  type: "number",
187
210
  class: "form-control",
188
211
  id: "plane-orientation-number",
189
212
  step: "0.1",
190
- value: b(t).orientation,
191
- onInput: o[3] || (o[3] = (i) => e(Number.parseFloat(i.target.value)))
192
- }, null, 40, Ct)
213
+ value: v(e).orientation,
214
+ onInput: i[3] || (i[3] = (a) => t(Number.parseFloat(a.target.value)))
215
+ }, null, 40, Bn)
193
216
  ]),
194
- o[7] || (o[7] = m("hr", null, null, -1)),
195
- b(t).instance != null ? (v(), V(gt, {
217
+ i[7] || (i[7] = f("hr", null, null, -1)),
218
+ v(e).instance != null ? (y(), Z(On, {
196
219
  key: 0,
197
220
  label: "Center",
198
- "initial-value": b(t).center,
199
- instance: b(t).instance,
200
- "cursor-manager": b(t).cursorManager,
221
+ "initial-value": v(e).center,
222
+ instance: v(e).instance,
223
+ "cursor-manager": v(e).cursorManager,
201
224
  "onUpdate:coordinates": n
202
- }, null, 8, ["initial-value", "instance", "cursor-manager"])) : L("", !0)
225
+ }, null, 8, ["initial-value", "instance", "cursor-manager"])) : k("", !0)
203
226
  ], 64));
204
227
  }
205
228
  });
206
- class It extends Ee {
229
+ class Rn extends _t {
207
230
  constructor() {
208
231
  super();
209
- const t = new K(
210
- new ce(50, 100, 1, 10),
211
- new R({
232
+ const e = new Ee(
233
+ new Te(50, 100, 1, 10),
234
+ new q({
212
235
  color: "#6bf904",
213
236
  depthTest: !1,
214
237
  depthWrite: !1,
215
238
  wireframe: !0
216
239
  })
217
- ), e = new Se(new F(0, 1, 0), new F(0, 0, 0), 200);
218
- t.renderOrder = 999, t.rotateY(Math.PI / 2), this.add(t), this.add(e), this.updateMatrixWorld(!0);
240
+ ), t = new St(new M(0, 1, 0), new M(0, 0, 0), 200);
241
+ e.renderOrder = 999, e.rotateY(Math.PI / 2), this.add(e), this.add(t), this.updateMatrixWorld(!0);
219
242
  }
220
243
  }
221
- class Pt {
222
- constructor(t) {
223
- c(this, "_clippingPlanes", null);
224
- c(this, "_helper");
225
- c(this, "_instance");
226
- c(this, "_store", ye());
227
- this.context = t, t.events.addEventListener("ready", () => {
228
- this._instance = t.view.getInstance();
229
- const e = t.configuration.default_crs, n = t.configuration.analysis.cross_section;
230
- this._store.setCursorManager(t.view.getSceneCursorManager()), this._store.setInstance(t.view.getInstance()), this._store.setOrientation(n.orientation);
231
- const s = n.pivot, o = new H(s.crs ?? e, s.x, s.y, 0).as(
232
- e
233
- );
234
- this._store.setCenter(o.toVector3()), this._instance.addEventListener("entity-added", this.updateCrossSection.bind(this)), this._store.$onAction(({ after: i, name: l }) => {
244
+ class Hn {
245
+ constructor(e) {
246
+ l(this, "_clippingPlanes", null);
247
+ l(this, "_helper");
248
+ l(this, "_instance");
249
+ l(this, "_store", $e());
250
+ this.context = e, e.events.addEventListener("ready", () => {
251
+ this._instance = e.view.getInstance();
252
+ const t = this._instance.referenceCrs;
253
+ this._store.setCursorManager(e.view.getSceneCursorManager()), this._store.setInstance(e.view.getInstance());
254
+ const n = this._store.center, o = new N(t, n.x, n.y, 0);
255
+ this._store.setCenter(o.toVector3()), this._instance.addEventListener("entity-added", this.updateCrossSection.bind(this)), this._store.$onAction(({ after: i, name: a }) => {
235
256
  i(() => {
236
- switch (l) {
257
+ switch (a) {
237
258
  case "setCenter":
238
259
  case "setEnabled":
239
260
  case "setOrientation":
@@ -248,136 +269,85 @@ class Pt {
248
269
  dispose() {
249
270
  }
250
271
  createHelperIfNecessary() {
251
- this._store.showHelper && this._helper == null && this._instance && (this._helper = new It(), this._instance.add(this._helper).catch(console.error));
272
+ this._store.showHelper && this._helper == null && this._instance && (this._helper = new Rn(), this._instance.add(this._helper).catch(console.error));
252
273
  }
253
- showHelper(t) {
254
- this.createHelperIfNecessary(), this._helper && (this._helper.visible = t), this.updateHelper();
274
+ showHelper(e) {
275
+ this.createHelperIfNecessary(), this._helper && (this._helper.visible = e), this.updateHelper();
255
276
  }
256
277
  updateCrossSection() {
257
278
  if (this._store.enable) {
258
- const t = [], e = J.DEG2RAD * this._store.orientation, n = Math.cos(e), s = Math.sin(e), o = new F(n, s, 0), i = new oe(o, 0).distanceToPoint(this._store.center), l = new oe(o, -i);
259
- t.push(l), this._clippingPlanes = t;
279
+ const e = [], t = J.DEG2RAD * this._store.orientation, n = Math.cos(t), o = Math.sin(t), i = new M(n, o, 0), a = new ye(i, 0).distanceToPoint(this._store.center), r = new ye(i, -a);
280
+ e.push(r), this._clippingPlanes = e;
260
281
  } else
261
282
  this._clippingPlanes = null;
262
283
  this.updateEntities();
263
284
  }
264
285
  updateEntities() {
265
- const t = this.context.view.getInstance();
266
- for (const e of t.getEntities())
267
- ge(e) && (e.clippingPlanes = this._clippingPlanes);
268
- t.notifyChange();
286
+ const e = this.context.view.getInstance();
287
+ for (const t of e.getEntities())
288
+ Le(t) && (t.clippingPlanes = this._clippingPlanes);
289
+ e.notifyChange();
269
290
  }
270
291
  updateHelper() {
271
- var t, e, n, s;
272
- this.createHelperIfNecessary(), (t = this._helper) == null || t.position.copy(this._store.center), (e = this._helper) == null || e.updateMatrixWorld(!0), (n = this._helper) == null || n.setRotationFromAxisAngle(
273
- new F(0, 0, 1),
292
+ var e, t, n, o;
293
+ this.createHelperIfNecessary(), (e = this._helper) == null || e.position.copy(this._store.center), (t = this._helper) == null || t.updateMatrixWorld(!0), (n = this._helper) == null || n.setRotationFromAxisAngle(
294
+ new M(0, 0, 1),
274
295
  J.degToRad(this._store.orientation)
275
- ), (s = this._instance) == null || s.notifyChange();
296
+ ), (o = this._instance) == null || o.notifyChange();
276
297
  }
277
298
  }
278
- class Bn {
299
+ class ze {
279
300
  constructor() {
280
- c(this, "id", "builtin-cross-section-analysis");
281
- c(this, "name", "Cross section");
282
- c(this, "_manager", null);
301
+ l(this, "id", "builtin-analysis-cross-section");
302
+ l(this, "name", "Cross section");
303
+ l(this, "_manager", null);
283
304
  }
284
- initialize(t) {
285
- t.analysis.registerTool({
286
- component: xt,
305
+ initialize(e) {
306
+ e.analysis.registerTool({
307
+ component: Gn,
287
308
  icon: "bi-circle-half",
288
309
  name: "Cross section"
289
- }), this._manager = new Pt(t);
310
+ }), this._manager = new Hn(e);
290
311
  }
291
312
  }
292
- function Q(a) {
293
- if ("url" in a.config && typeof a.config.url == "string")
294
- return a.config.url;
295
- if ("source" in a.config && typeof a.config.source == "object" && "url" in a.config.source && typeof a.config.source.url == "string")
296
- return a.config.source.url;
297
- }
298
- function Et(a) {
299
- return Q(a) != null;
300
- }
301
- class Nn {
302
- constructor() {
303
- c(this, "id", "builtin-download-dataset");
304
- c(this, "name", "Download dataset");
305
- c(this, "_context", null);
313
+ const Ae = Me("floodingPlane", () => {
314
+ const s = E(0), e = E(!1);
315
+ function t() {
316
+ return s.value;
306
317
  }
307
- initialize(t) {
308
- this._context = t, t.datasets.registerDatasetAction({
309
- action: this.download.bind(this),
310
- icon: "bi-download",
311
- predicate: Et,
312
- title: "Download dataset"
313
- });
318
+ function n(i) {
319
+ s.value = i;
314
320
  }
315
- download(t) {
316
- const e = Q(t);
317
- if (e == null) {
318
- console.warn("invalid");
319
- return;
320
- }
321
- const n = this._context, s = new URL(e).pathname.split("/"), o = s[s.length - 1];
322
- console.info(`download ${Q(t)}`), k.fetch(e).then((i) => {
323
- if (!i.ok)
324
- throw new Error(`${i.status} ${i.statusText}`);
325
- return i.blob();
326
- }).then((i) => {
327
- Te.downloadBlob(i, o), n.notifications.pushNotification({
328
- level: "success",
329
- text: o,
330
- title: "Download successful"
331
- });
332
- }).catch((i) => {
333
- console.error(i);
334
- const l = i instanceof Error ? i.message : "Download failed";
335
- n.notifications.pushNotification({
336
- level: "error",
337
- text: l,
338
- title: t.name
339
- });
340
- });
321
+ function o(i) {
322
+ e.value = i;
341
323
  }
342
- }
343
- const be = me("floodingPlane", () => {
344
- const a = I(0), t = I(!1);
345
- function e() {
346
- return a.value;
347
- }
348
- function n(o) {
349
- a.value = o;
350
- }
351
- function s(o) {
352
- t.value = o;
353
- }
354
- return { enable: t, getHeight: e, setEnabled: s, setHeight: n };
355
- }), St = { class: "input-group mb-3" }, Tt = { class: "input-group mb-3" }, Ft = ["value"], kt = { class: "input-group mb-3" }, Mt = ["value"], Lt = /* @__PURE__ */ D({
324
+ return { enable: e, getHeight: t, setEnabled: o, setHeight: n };
325
+ }), Un = { class: "input-group mb-3" }, Vn = { class: "input-group mb-3" }, Wn = ["value"], Yn = { class: "input-group mb-3" }, qn = ["value"], Jn = /* @__PURE__ */ A({
356
326
  __name: "FloodingPlane",
357
- setup(a) {
358
- const t = be();
359
- function e(n) {
360
- t.setHeight(n);
327
+ setup(s) {
328
+ const e = Ae();
329
+ function t(n) {
330
+ e.setHeight(n);
361
331
  }
362
- return (n, s) => (v(), P(Y, null, [
363
- m("div", St, [
364
- T(q, {
365
- "model-value": b(t).enable,
366
- "onUpdate:modelValue": s[0] || (s[0] = (o) => b(t).setEnabled(o)),
332
+ return (n, o) => (y(), x(V, null, [
333
+ f("div", Un, [
334
+ D(ne, {
335
+ "model-value": v(e).enable,
336
+ "onUpdate:modelValue": o[0] || (o[0] = (i) => v(e).setEnabled(i)),
367
337
  id: "flooding-plane-enable",
368
- title: "foo"
338
+ title: "Show flooding plane"
369
339
  }, null, 8, ["model-value"]),
370
- s[3] || (s[3] = m("label", {
340
+ o[3] || (o[3] = f("label", {
371
341
  for: "flooding-plane-enable",
372
342
  class: "form-label"
373
343
  }, "Enable flooding plane", -1))
374
344
  ]),
375
- m("div", Tt, [
376
- s[5] || (s[5] = m("label", {
345
+ f("div", Vn, [
346
+ o[5] || (o[5] = f("label", {
377
347
  for: "flooding-altitude-range",
378
348
  class: "form-label"
379
349
  }, "Altitude", -1)),
380
- m("input", {
350
+ f("input", {
381
351
  id: "flooding-altitude-range",
382
352
  title: "Altitude",
383
353
  type: "range",
@@ -385,40 +355,40 @@ const be = me("floodingPlane", () => {
385
355
  min: "0",
386
356
  step: "0.1",
387
357
  max: "500",
388
- value: b(t).getHeight(),
389
- onInput: s[1] || (s[1] = (o) => e(Number.parseFloat(o.target.value)))
390
- }, null, 40, Ft),
391
- m("div", kt, [
392
- m("input", {
358
+ value: v(e).getHeight(),
359
+ onInput: o[1] || (o[1] = (i) => t(Number.parseFloat(i.target.value)))
360
+ }, null, 40, Wn),
361
+ f("div", Yn, [
362
+ f("input", {
393
363
  type: "number",
394
364
  class: "form-control",
395
365
  id: "flooding-altitude-number",
396
366
  step: "0.1",
397
- value: b(t).getHeight(),
398
- onInput: s[2] || (s[2] = (o) => e(Number.parseFloat(o.target.value)))
399
- }, null, 40, Mt),
400
- s[4] || (s[4] = m("span", { class: "input-group-text" }, "m", -1))
367
+ value: v(e).getHeight(),
368
+ onInput: o[2] || (o[2] = (i) => t(Number.parseFloat(i.target.value)))
369
+ }, null, 40, qn),
370
+ o[4] || (o[4] = f("span", { class: "input-group-text" }, "m", -1))
401
371
  ])
402
372
  ])
403
373
  ], 64));
404
374
  }
405
375
  });
406
- class Dt {
376
+ class Zn {
407
377
  constructor() {
408
- c(this, "geometry");
409
- c(this, "material");
410
- c(this, "object3D");
411
- c(this, "_height");
412
- this.geometry = new ce(1, 1, 1, 1), this.material = new R({ color: 43690, opacity: 0.5, transparent: !0 }), this.object3D = new K(this.geometry, this.material), this.object3D.renderOrder = 2, this.visible = !1, this._height = 0;
378
+ l(this, "geometry");
379
+ l(this, "material");
380
+ l(this, "object3D");
381
+ l(this, "_height");
382
+ this.geometry = new Te(1, 1, 1, 1), this.material = new q({ color: 43690, opacity: 0.5, transparent: !0 }), this.object3D = new Ee(this.geometry, this.material), this.object3D.renderOrder = 2, this.visible = !1, this._height = 0;
413
383
  }
414
- set height(t) {
415
- this._height = t;
384
+ set height(e) {
385
+ this._height = e;
416
386
  }
417
387
  get height() {
418
388
  return this._height;
419
389
  }
420
- set visible(t) {
421
- this.object3D.visible = t;
390
+ set visible(e) {
391
+ this.object3D.visible = e;
422
392
  }
423
393
  get visible() {
424
394
  return this.object3D.visible;
@@ -426,18 +396,18 @@ class Dt {
426
396
  dispose() {
427
397
  this.object3D.removeFromParent(), this.geometry.dispose(), this.material.dispose();
428
398
  }
429
- setPosition(t, e, n, s, o) {
430
- this.object3D.scale.set(s, o, 1), this.object3D.position.set(t, e, n), this.object3D.updateMatrixWorld();
399
+ setPosition(e, t, n, o, i) {
400
+ this.object3D.scale.set(o, i, 1), this.object3D.position.set(e, t, n), this.object3D.updateMatrixWorld();
431
401
  }
432
402
  }
433
- class Bt {
434
- constructor(t) {
435
- c(this, "_context");
436
- c(this, "_plane");
437
- c(this, "_store", be());
438
- this._context = t, this._plane = null, t.events.addEventListener("ready", () => {
439
- this._store.$onAction(({ after: e, name: n }) => {
440
- e(() => {
403
+ class Xn {
404
+ constructor(e) {
405
+ l(this, "_context");
406
+ l(this, "_plane");
407
+ l(this, "_store", Ae());
408
+ this._context = e, this._plane = null, e.events.addEventListener("ready", () => {
409
+ this._store.$onAction(({ after: t, name: n }) => {
410
+ t(() => {
441
411
  switch (n) {
442
412
  case "setEnabled":
443
413
  this.updatePlane();
@@ -454,206 +424,344 @@ class Bt {
454
424
  this._plane && (this._context.view.getInstance().remove(this._plane.object3D), this._plane.dispose());
455
425
  }
456
426
  async updatePlane() {
457
- this._plane || (this._plane = new Dt(), await this._context.view.getInstance().add(this._plane.object3D));
458
- const t = this._context.view.getBoundingBox(), e = t.getCenter(new F()), n = t.getSize(new F());
459
- this._plane.visible = this._store.enable, this._plane.setPosition(e.x, e.y, this._store.getHeight(), n.x, n.y), this._context.view.getInstance().notifyChange();
427
+ this._plane || (this._plane = new Zn(), await this._context.view.getInstance().add(this._plane.object3D));
428
+ const e = this._context.view.getBoundingBox(), t = e.getCenter(new M()), n = e.getSize(new M());
429
+ this._plane.visible = this._store.enable, this._plane.setPosition(t.x, t.y, this._store.getHeight(), n.x, n.y), this._context.view.getInstance().notifyChange();
460
430
  }
461
431
  }
462
- class On {
432
+ class Ne {
463
433
  constructor() {
464
- c(this, "id", "builtin-flooding-plane-analysis");
465
- c(this, "name", "Flooding plane");
466
- c(this, "_manager", null);
434
+ l(this, "id", "builtin-analysis-flooding-plane");
435
+ l(this, "name", "Flooding plane");
436
+ l(this, "_manager", null);
467
437
  }
468
- initialize(t) {
469
- t.analysis.registerTool({
470
- component: Lt,
438
+ initialize(e) {
439
+ e.analysis.registerTool({
440
+ component: Jn,
471
441
  icon: "bi-layers-half",
472
442
  name: "Flooding plane"
473
- }), this._manager = new Bt(t);
443
+ }), this._manager = new Xn(e);
474
444
  }
475
445
  }
476
- const Nt = /^(\d+\.\d+)\s*,\s*(\d+\.\d+)$/;
477
- class Ot {
478
- constructor() {
479
- c(this, "name", "Go to coordinates");
480
- }
481
- search(t) {
482
- const e = Nt.exec(t);
483
- if (e) {
484
- const n = Number.parseFloat(e[1]), s = Number.parseFloat(e[2]), i = {
485
- coordinates: H.WGS84(n, s),
486
- label: `${n.toFixed(6)}, ${s.toFixed(6)}`,
487
- provider: this
446
+ const Be = [Ie, ze, Ne], hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
447
+ __proto__: null,
448
+ ClippingBox: Ie,
449
+ CrossSection: ze,
450
+ FloodingPlane: Ne,
451
+ all: Be
452
+ }, Symbol.toStringTag, { value: "Module" }));
453
+ class Kn extends Ut {
454
+ constructor(e) {
455
+ const t = e.featureProjection, n = "BDTOPO_V3:batiment", o = new Yt({
456
+ format: new Vt(),
457
+ strategy: Wt(qt({ tileSize: 512 })),
458
+ url: function(c) {
459
+ return `${`https://data.geopf.fr/wfs/ows?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=${n}&outputFormat=application/json&SRSNAME=${t}&startIndex=0&bbox=`}${c.join(",")},${t}`;
460
+ }
461
+ }), i = e.extent ?? new Ht("EPSG:2154", -111629.52, 127502884e-2, 597603379e-2, 723016164e-2), a = e.extrusionOffset ?? ((p) => {
462
+ const m = -p.getProperties().hauteur;
463
+ return Number.isNaN(m) ? 0 : m;
464
+ }), r = e.style ?? ((p) => {
465
+ const c = p.getProperties();
466
+ let d = "#FFFFFF";
467
+ switch (c.usage_1) {
468
+ case "Agricole":
469
+ d = "#96ff0d";
470
+ break;
471
+ case "Commercial et services":
472
+ d = "#d8ffd4";
473
+ break;
474
+ case "Industriel":
475
+ d = "#f0bb41";
476
+ break;
477
+ case "Religieux":
478
+ d = "#41b5f0";
479
+ break;
480
+ case "Résidentiel":
481
+ d = "#cec8be";
482
+ break;
483
+ case "Sportif":
484
+ d = "#ff0d45";
485
+ break;
486
+ }
487
+ return {
488
+ fill: {
489
+ color: new xt(d),
490
+ shading: !0
491
+ },
492
+ stroke: {
493
+ color: "black",
494
+ lineWidth: 2
495
+ }
488
496
  };
489
- return Promise.resolve([i]);
490
- } else
491
- return Promise.resolve([]);
497
+ }), u = {
498
+ extent: i,
499
+ extrusionOffset: a,
500
+ maxLevel: e.maxLevel ?? 11,
501
+ minLevel: e.minLevel ?? 11,
502
+ source: o,
503
+ style: r
504
+ };
505
+ super(u), this.name = n, re(this, { filename: n });
492
506
  }
493
507
  }
494
- class An {
508
+ const Qn = (s) => {
509
+ const e = new Kn({
510
+ featureProjection: s.instance.referenceCrs
511
+ });
512
+ return Promise.resolve({
513
+ entities: [e]
514
+ });
515
+ };
516
+ class Ge {
495
517
  constructor() {
496
- c(this, "id", "builtin-coordinates-search");
497
- c(this, "name", "Coordinates search");
498
- }
499
- initialize(t) {
500
- t.search.registerProvider(new Ot());
518
+ l(this, "id", "builtin-loader-bdtopo");
519
+ l(this, "name", "BD TOPO®");
520
+ }
521
+ initialize(e) {
522
+ e.datasets.registerDatasetType("bdtopo", {
523
+ builder: Qn,
524
+ icon: "bi-buildings",
525
+ name: "BD TOPO®"
526
+ });
501
527
  }
502
528
  }
503
- const At = /[a-z]{3}/;
504
- class zt {
529
+ function ge(s) {
530
+ return Array.isArray(s) ? s.length === 0 ? [] : "style" in s[0] ? Zt(s) : Se(s) : Se([s]);
531
+ }
532
+ const es = "geojson", ts = O.extend({
533
+ projection: z.optional().default("EPSG:4326"),
534
+ style: le.optional(),
535
+ url: I
536
+ }), ns = (s) => {
537
+ const e = ts.parse(s.dataset), n = {
538
+ layers: [new L({
539
+ resolutionFactor: e.resolution,
540
+ source: new pe({
541
+ data: {
542
+ format: new Jt(),
543
+ url: e.url
544
+ },
545
+ dataProjection: e.projection,
546
+ style: e.style != null ? ge(e.style) : Fe
547
+ })
548
+ })]
549
+ };
550
+ return Promise.resolve(n);
551
+ }, ss = (s) => {
552
+ const e = {
553
+ layerType: "color",
554
+ name: s.filename,
555
+ projection: "EPSG:4326",
556
+ resolution: 1,
557
+ type: "geojson",
558
+ url: typeof s.file == "string" ? s.file : URL.createObjectURL(s.file),
559
+ visible: !0
560
+ };
561
+ return Promise.resolve(e);
562
+ };
563
+ class Re {
505
564
  constructor() {
506
- c(this, "name", "Base adresse nationale (BAN)");
507
- }
508
- async search(t) {
509
- if (!At.test(t))
510
- return [];
511
- try {
512
- const n = (await k.fetchJson(
513
- `https://api-adresse.data.gouv.fr/search/?q=${t}`
514
- )).features.map((s) => {
515
- const o = s.properties, i = s.geometry, [l, d] = i.coordinates;
516
- return {
517
- coordinates: new H("EPSG:4326", l, d, 0),
518
- label: o.label,
519
- provider: this
520
- };
521
- });
522
- return await jt(n.map((s) => s.coordinates)), n;
523
- } catch (e) {
524
- if (e instanceof Ue)
525
- return [];
526
- throw e;
527
- }
565
+ l(this, "id", "builtin-loader-geojson");
566
+ l(this, "name", "GeoJSON");
567
+ }
568
+ initialize(e) {
569
+ e.datasets.registerDatasetType(es, {
570
+ builder: ns,
571
+ fileExtensions: ["geojson", "geo.json"],
572
+ icon: "fg-polygon-pt",
573
+ loader: ss,
574
+ name: "GeoJSON"
575
+ });
528
576
  }
529
577
  }
530
- async function jt(a) {
531
- const t = new URL("https://data.geopf.fr/altimetrie/1.0/calcul/alti/rest/elevation.json");
532
- t.searchParams.append("lon", a.map((n) => n.longitude).join("|")), t.searchParams.append("lat", a.map((n) => n.latitude).join("|")), t.searchParams.append("zonly", "true"), t.searchParams.append("resource", "ign_rge_alti_wld"), t.searchParams.append("delimiter", "|"), t.searchParams.append("indent", "false");
533
- const e = await k.fetchJson(t.toString());
534
- for (let n = 0; n < a.length; n++)
535
- a[n].setAltitude(e.elevations[n]);
536
- return e;
537
- }
538
- class zn {
578
+ const os = O.extend({
579
+ projection: z,
580
+ url: I
581
+ }), is = (s) => {
582
+ const e = os.parse(s.dataset), t = new Xt({
583
+ crs: e.projection,
584
+ url: e.url
585
+ });
586
+ let n;
587
+ switch (e.layerType) {
588
+ case "color":
589
+ n = new L({ source: t });
590
+ break;
591
+ case "elevation":
592
+ n = new me({ source: t });
593
+ break;
594
+ default:
595
+ throw new Error(`unsupported layer type: ${e.layerType}`);
596
+ }
597
+ return Promise.resolve({
598
+ layers: [n]
599
+ });
600
+ };
601
+ class He {
539
602
  constructor() {
540
- c(this, "id", "builtin-geocoding-ban");
541
- c(this, "name", "Base adresse nationale");
603
+ l(this, "id", "builtin-loader-geotiff");
604
+ l(this, "name", "GeoTIFF");
605
+ }
606
+ initialize(e) {
607
+ e.datasets.registerDatasetType("geotiff", {
608
+ builder: is,
609
+ icon: "fg-layer-alt",
610
+ name: "GeoTIFF"
611
+ });
542
612
  }
543
- initialize(t) {
544
- t.search.registerProvider(new zt());
613
+ }
614
+ const as = "gpx", rs = O.extend({
615
+ projection: z.optional().default("EPSG:3857"),
616
+ style: le.optional(),
617
+ url: I
618
+ }), ls = new Qt({
619
+ fill: new tn({
620
+ color: "rgba(72,147,131, 0.4)"
621
+ }),
622
+ stroke: new en({
623
+ color: "rgba(81, 227, 196, 1)",
624
+ width: 2
625
+ })
626
+ }), cs = (s) => {
627
+ const e = rs.parse(s.dataset), n = {
628
+ layers: [new L({
629
+ resolutionFactor: e.resolution,
630
+ source: new pe({
631
+ data: {
632
+ format: new Kt(),
633
+ url: e.url
634
+ },
635
+ dataProjection: e.projection,
636
+ style: e.style != null ? ge(e.style) : ls
637
+ })
638
+ })]
639
+ };
640
+ return Promise.resolve(n);
641
+ };
642
+ class Ue {
643
+ constructor() {
644
+ l(this, "id", "builtin-loader-gpx");
645
+ l(this, "name", "GPX");
646
+ }
647
+ initialize(e) {
648
+ e.datasets.registerDatasetType(as, {
649
+ builder: cs,
650
+ icon: "fg-polygon-pt",
651
+ name: "GPX"
652
+ });
545
653
  }
546
654
  }
547
- const A = new Fe(), $t = {
548
- bbox: new R({
655
+ const H = new Ct(), us = {
656
+ bbox: new q({
549
657
  color: "#FFFF00",
550
658
  depthTest: !0,
551
659
  opacity: 0.2,
552
660
  transparent: !0
553
661
  }),
554
- selection: new R({
662
+ selection: new q({
555
663
  color: "#FF0000",
556
664
  depthTest: !1,
557
665
  opacity: 0.6,
558
666
  transparent: !0
559
667
  })
560
- }, Ht = 4186316022, Rt = 781010003, Vt = 2655215786, Ut = 3242617779, Yt = 919958153, Gt = 1307041759, ve = 1451395588, _e = 1883228015, Wt = [ve, _e], qt = [
561
- Ht,
562
- Rt,
563
- Vt,
564
- Ut,
565
- Yt,
566
- Gt
567
- ], we = (a) => $(a) && a.isIFCPickResult, z = class z extends fe {
568
- constructor(e) {
569
- super(new ue());
570
- c(this, "isIfcEntity", !0);
571
- c(this, "isPickableFeatures", !0);
572
- c(this, "type", "IfcEntity");
573
- c(this, "_classificationCache");
574
- c(this, "_components");
575
- c(this, "_fragmentBoundingBox");
576
- c(this, "_fragmentClassifier");
577
- c(this, "_fragmentManager");
578
- c(this, "_ifcSelection");
668
+ }, ds = 4186316022, ps = 781010003, ms = 2655215786, fs = 3242617779, hs = 919958153, gs = 1307041759, Ve = 1451395588, We = 1883228015, bs = [Ve, We], ys = [
669
+ ds,
670
+ ps,
671
+ ms,
672
+ fs,
673
+ hs,
674
+ gs
675
+ ], Ye = (s) => se(s) && s.isIFCPickResult, U = class U extends Rt {
676
+ constructor(t) {
677
+ super(new Pt());
678
+ l(this, "isIfcEntity", !0);
679
+ l(this, "isPickableFeatures", !0);
680
+ l(this, "type", "IfcEntity");
681
+ l(this, "_classificationCache");
682
+ l(this, "_components");
683
+ l(this, "_fragmentBoundingBox");
684
+ l(this, "_fragmentClassifier");
685
+ l(this, "_fragmentManager");
686
+ l(this, "_ifcSelection");
579
687
  // Currently selected fragments
580
- c(this, "_indexMap");
688
+ l(this, "_indexMap");
581
689
  // Properties relationships
582
- c(this, "_model");
583
- c(this, "_source");
584
- this._source = e, this._components = new Ge(), this._components.ui.enabled = !1, this._components.scene = new We(this._components), this._components.renderer = new qe(
690
+ l(this, "_model");
691
+ l(this, "_source");
692
+ this._source = t, this._components = new sn(), this._components.ui.enabled = !1, this._components.scene = new on(this._components), this._components.renderer = new an(
585
693
  this._components,
586
694
  document.createElement("div")
587
- ), this._components.camera = new Je(this._components), this._components.raycaster = new Ze(this._components), this._components.init(), this._ifcSelection = { bbox: {}, selection: {} }, this._indexMap = {}, this._classificationCache = null, this._fragmentBoundingBox = null;
695
+ ), this._components.camera = new rn(this._components), this._components.raycaster = new ln(this._components), this._components.init(), this._ifcSelection = { bbox: {}, selection: {} }, this._indexMap = {}, this._classificationCache = null, this._fragmentBoundingBox = null;
588
696
  }
589
- clearHighlight(e = "selection") {
590
- for (const n of Object.keys(this._ifcSelection[e])) {
591
- const s = this._fragmentManager.list[n], o = s == null ? void 0 : s.fragments[e];
592
- o != null && o.mesh.removeFromParent();
697
+ clearHighlight(t = "selection") {
698
+ for (const n of Object.keys(this._ifcSelection[t])) {
699
+ const o = this._fragmentManager.list[n], i = o == null ? void 0 : o.fragments[t];
700
+ i != null && i.mesh.removeFromParent();
593
701
  }
594
- this.notifyChange(this), this._ifcSelection[e] = {};
702
+ this.notifyChange(this), this._ifcSelection[t] = {};
595
703
  }
596
- getBoundingBoxById(e) {
597
- this.clearHighlight("bbox"), this.highlightById(e, "bbox");
704
+ getBoundingBoxById(t) {
705
+ this.clearHighlight("bbox"), this.highlightById(t, "bbox");
598
706
  const n = this._fragmentBoundingBox;
599
707
  if (n === null)
600
708
  throw new Error("Must call initClassification before getBoundingBoxById");
601
- const s = this._fragmentManager;
709
+ const o = this._fragmentManager;
602
710
  n.reset();
603
- const o = this._ifcSelection.bbox;
604
- if (!Object.keys(o).length)
711
+ const i = this._ifcSelection.bbox;
712
+ if (!Object.keys(i).length)
605
713
  return;
606
- for (const u of Object.keys(o)) {
607
- const f = s.list[u].fragments.bbox;
608
- n.addMesh(f.mesh);
714
+ for (const d of Object.keys(i)) {
715
+ const g = o.list[d].fragments.bbox;
716
+ n.addMesh(g.mesh);
609
717
  }
610
- const i = n.get(), { y: l, z: d } = i.min, { y: p, z: r } = i.max;
611
- return i.min.y = -r, i.max.y = -d, i.min.z = l, i.max.z = p, i.translate(this._model.position), this.clearHighlight("bbox"), i;
718
+ const a = n.get(), { y: r, z: u } = a.min, { y: p, z: c } = a.max;
719
+ return a.min.y = -c, a.max.y = -u, a.min.z = r, a.max.z = p, a.translate(this._model.position), this.clearHighlight("bbox"), a;
612
720
  }
613
721
  getClassification() {
614
722
  if (this._classificationCache === null)
615
723
  throw new Error("Must call initClassification before getClassification");
616
724
  return this._classificationCache;
617
725
  }
618
- getProperties(e) {
619
- const n = [], s = this._model.properties;
620
- if (!s)
726
+ getProperties(t) {
727
+ const n = [], o = this._model.properties;
728
+ if (!o)
621
729
  return [];
622
- for (const o of this._indexMap[e]) {
623
- const i = s[o];
624
- if (i == null)
730
+ for (const i of this._indexMap[t]) {
731
+ const a = o[i];
732
+ if (a == null)
625
733
  continue;
626
- const { name: l } = M.getEntityName(s, o);
627
- if (l !== null) {
628
- if (i.type === ve) {
629
- const d = M.getPsetProps(s, o);
630
- if (d !== null)
631
- for (const p of d) {
632
- if (s[p] == null)
734
+ const { name: r } = j.getEntityName(o, i);
735
+ if (r !== null) {
736
+ if (a.type === Ve) {
737
+ const u = j.getPsetProps(o, i);
738
+ if (u !== null)
739
+ for (const p of u) {
740
+ if (o[p] == null)
633
741
  continue;
634
- const u = this.getProperty(p);
635
- u !== null && n.push({
636
- parentName: l,
637
- ...u
742
+ const d = this.getProperty(p);
743
+ d !== null && n.push({
744
+ parentName: r,
745
+ ...d
638
746
  });
639
747
  }
640
- } else if (i.type === _e) {
641
- const d = M.getQsetQuantities(
642
- s,
643
- o
748
+ } else if (a.type === We) {
749
+ const u = j.getQsetQuantities(
750
+ o,
751
+ i
644
752
  );
645
- if (d !== null)
646
- for (const p of d) {
647
- const { key: r } = M.getQuantityValue(
648
- s,
753
+ if (u !== null)
754
+ for (const p of u) {
755
+ const { key: c } = j.getQuantityValue(
756
+ o,
649
757
  p
650
758
  );
651
- if (r === null)
759
+ if (c === null)
652
760
  continue;
653
- const u = this.getProperty(p);
654
- u !== null && n.push({
655
- parentName: l,
656
- ...u
761
+ const d = this.getProperty(p);
762
+ d !== null && n.push({
763
+ parentName: r,
764
+ ...d
657
765
  });
658
766
  }
659
767
  }
@@ -661,59 +769,59 @@ const A = new Fe(), $t = {
661
769
  }
662
770
  return n;
663
771
  }
664
- getProperty(e) {
772
+ getProperty(t) {
665
773
  const n = this._model.properties;
666
774
  if (n === void 0)
667
775
  return null;
668
- const { name: s } = M.getEntityName(n, e);
669
- if (s === null)
776
+ const { name: o } = j.getEntityName(n, t);
777
+ if (o === null)
670
778
  return null;
671
- const { value: o } = M.getQuantityValue(n, e);
672
- return { name: s, value: o };
673
- }
674
- highlight(e, n, s) {
675
- this._ifcSelection[e][n.uuid] = /* @__PURE__ */ new Set();
676
- const o = parseInt(s, 10);
677
- this._ifcSelection[e][n.uuid].add(s), this.addComposites(e, n, o), this.regenerate(e, n.uuid);
678
- const i = n.fragment.group;
679
- if (i) {
680
- const l = i.data[o][0];
681
- for (let d = 0; d < l.length; d++) {
682
- const p = l[d], r = i.keyFragments[p], u = this._fragmentManager.list[r];
683
- r in this._ifcSelection[e] || (this._ifcSelection[e][r] = /* @__PURE__ */ new Set()), this._ifcSelection[e][r].add(s), this.addComposites(e, u.mesh, o), this.regenerate(e, r);
779
+ const { value: i } = j.getQuantityValue(n, t);
780
+ return { name: o, value: i };
781
+ }
782
+ highlight(t, n, o) {
783
+ this._ifcSelection[t][n.uuid] = /* @__PURE__ */ new Set();
784
+ const i = parseInt(o, 10);
785
+ this._ifcSelection[t][n.uuid].add(o), this.addComposites(t, n, i), this.regenerate(t, n.uuid);
786
+ const a = n.fragment.group;
787
+ if (a) {
788
+ const r = a.data[i][0];
789
+ for (let u = 0; u < r.length; u++) {
790
+ const p = r[u], c = a.keyFragments[p], d = this._fragmentManager.list[c];
791
+ c in this._ifcSelection[t] || (this._ifcSelection[t][c] = /* @__PURE__ */ new Set()), this._ifcSelection[t][c].add(o), this.addComposites(t, d.mesh, i), this.regenerate(t, c);
684
792
  }
685
793
  }
686
794
  this.notifyChange(this);
687
795
  }
688
- highlightById(e, n = "selection") {
689
- for (const s of Object.keys(e)) {
690
- s in this._ifcSelection[n] || (this._ifcSelection[n][s] = /* @__PURE__ */ new Set());
691
- const o = this._fragmentManager.list[s], i = /* @__PURE__ */ new Set();
692
- for (const l of e[s])
693
- this._ifcSelection[n][s].add(l), i.add(parseInt(l, 10));
694
- for (const l of i)
695
- this.addComposites(n, o.mesh, l);
696
- this.regenerate(n, s);
796
+ highlightById(t, n = "selection") {
797
+ for (const o of Object.keys(t)) {
798
+ o in this._ifcSelection[n] || (this._ifcSelection[n][o] = /* @__PURE__ */ new Set());
799
+ const i = this._fragmentManager.list[o], a = /* @__PURE__ */ new Set();
800
+ for (const r of t[o])
801
+ this._ifcSelection[n][o].add(r), a.add(parseInt(r, 10));
802
+ for (const r of a)
803
+ this.addComposites(n, i.mesh, r);
804
+ this.regenerate(n, o);
697
805
  }
698
806
  this.notifyChange(this);
699
807
  }
700
- pick(e, n) {
701
- return super.pick(e, n).map((s) => ({
702
- ...s,
808
+ pick(t, n) {
809
+ return super.pick(t, n).map((o) => ({
810
+ ...o,
703
811
  entity: this,
704
- features: s.features,
812
+ features: o.features,
705
813
  isIFCPickResult: !0,
706
- object: s.object
814
+ object: o.object
707
815
  }));
708
816
  }
709
- pickFeaturesFrom(e) {
710
- var s, o, i;
711
- const n = e.object;
712
- if (n.fragment != null && e.instanceId != null && e.face) {
713
- const l = n.fragment.getVertexBlockID(n.geometry, e.face.a), d = (s = n.fragment.getItemID(e.instanceId, l)) == null ? void 0 : s.replace(/\..*/, "");
714
- if (d && ((i = (o = n.fragment.group) == null ? void 0 : o.properties) == null ? void 0 : i[d]) != null) {
715
- const r = n.fragment.group.properties[d], h = [{ ifcProperties: this.getProperties(d), itemProperties: r }];
716
- return e.features = h, h;
817
+ pickFeaturesFrom(t) {
818
+ var o, i, a;
819
+ const n = t.object;
820
+ if (n.fragment != null && t.instanceId != null && t.face) {
821
+ const r = n.fragment.getVertexBlockID(n.geometry, t.face.a), u = (o = n.fragment.getItemID(t.instanceId, r)) == null ? void 0 : o.replace(/\..*/, "");
822
+ if (u && ((a = (i = n.fragment.group) == null ? void 0 : i.properties) == null ? void 0 : a[u]) != null) {
823
+ const c = n.fragment.group.properties[u], m = [{ ifcProperties: this.getProperties(u), itemProperties: c }];
824
+ return t.features = m, m;
717
825
  }
718
826
  }
719
827
  return [];
@@ -726,550 +834,1026 @@ const A = new Fe(), $t = {
726
834
  ]), this._classificationCache.length === 0 && (this._classificationCache = await this.regenerateClassification([
727
835
  "entities"
728
836
  /* ENTITY */
729
- ])), this._fragmentBoundingBox = await this._components.tools.get(Qe);
837
+ ])), this._fragmentBoundingBox = await this._components.tools.get(cn);
730
838
  }
731
839
  async preprocess() {
732
- const e = await k.fetchArrayBuffer(this._source.url);
733
- this._fragmentManager = await this._components.tools.get(Xe), this._fragmentClassifier = await this._components.tools.get(Ke);
734
- const n = new et(this._components);
840
+ const t = await $.fetchArrayBuffer(this._source.url);
841
+ this._fragmentManager = await this._components.tools.get(un), this._fragmentClassifier = await this._components.tools.get(dn);
842
+ const n = new pn(this._components);
735
843
  n.settings.webIfc.COORDINATE_TO_ORIGIN = !0, n.settings.webIfc.OPTIMIZE_PROFILES = !0;
736
- const s = new Uint8Array(e);
737
- this._model = await n.load(s, this._source.name), this._model.rotateX(Math.PI / 2);
738
- const o = new F();
844
+ const o = new Uint8Array(t);
845
+ this._model = await n.load(o, this._source.name), this._model.rotateX(Math.PI / 2);
846
+ const i = new M();
739
847
  if (this._source.at)
740
- this._source.at.toVector3(o), this._model.position.copy(o);
848
+ this._source.at.toVector3(i), this._model.position.copy(i);
741
849
  else {
742
- const l = this._model.coordinationMatrix.clone().invert();
743
- o.applyMatrix4(l), this._model.position.set(o.x, -o.z, o.y);
850
+ const r = this._model.coordinationMatrix.clone().invert();
851
+ i.applyMatrix4(r), this._model.position.set(i.x, -i.z, i.y);
744
852
  }
745
853
  this._model.updateWorldMatrix(!0, !0), this._model.updateMatrix(), this._model.updateMatrixWorld(!0), this.initializeEntityIndexes(), this._fragmentClassifier.byStorey(this._model), this._fragmentClassifier.byEntity(this._model), await this.initClassification(), this.object3d.add(this._model), this.onObjectCreated(this._model);
746
- const i = k.getContext(this._source.url);
747
- ee(this, { filename: i.filename }), this.notifyChange(this.object3d);
748
- }
749
- addComposites(e, n, s) {
750
- this.addHighlightToFragment(e, n.fragment);
751
- const o = n.fragment.composites[s];
752
- if (o)
753
- for (let i = 1; i < o; i++) {
754
- const l = tt(s, i);
755
- this._ifcSelection[e][n.uuid].add(l);
854
+ const a = $.getContext(this._source.url);
855
+ re(this, { filename: a.filename }), this.notifyChange(this.object3d);
856
+ }
857
+ addComposites(t, n, o) {
858
+ this.addHighlightToFragment(t, n.fragment);
859
+ const i = n.fragment.composites[o];
860
+ if (i)
861
+ for (let a = 1; a < i; a++) {
862
+ const r = mn(o, a);
863
+ this._ifcSelection[t][n.uuid].add(r);
756
864
  }
757
865
  }
758
- addHighlightToFragment(e, n) {
759
- if (!(e in n.fragments)) {
760
- const s = n.addFragment(e, [$t[e]]);
761
- n.blocks.count > 1 && (s.setInstance(0, {
866
+ addHighlightToFragment(t, n) {
867
+ if (!(t in n.fragments)) {
868
+ const o = n.addFragment(t, [us[t]]);
869
+ n.blocks.count > 1 && (o.setInstance(0, {
762
870
  ids: Array.from(n.ids),
763
- transform: A
764
- }), s.blocks.setVisibility(!1)), this._model.add(s.mesh), s.mesh.renderOrder = 30, s.mesh.frustumCulled = !1, s.mesh.name = e, s.mesh.updateMatrixWorld(!0);
871
+ transform: H
872
+ }), o.blocks.setVisibility(!1)), this._model.add(o.mesh), o.mesh.renderOrder = 30, o.mesh.frustumCulled = !1, o.mesh.name = t, o.mesh.updateMatrixWorld(!0);
765
873
  }
766
874
  }
767
875
  initializeEntityIndexes() {
768
876
  this._indexMap = {};
769
- const e = this._model.properties;
770
- if (e !== void 0)
771
- for (const n of qt)
772
- M.getRelationMap(e, n, (s, o) => {
773
- const i = e[s];
774
- Wt.includes(i.type) || this.setEntityIndex(s);
775
- for (const l of o)
776
- this.setEntityIndex(l).add(s);
877
+ const t = this._model.properties;
878
+ if (t !== void 0)
879
+ for (const n of ys)
880
+ j.getRelationMap(t, n, (o, i) => {
881
+ const a = t[o];
882
+ bs.includes(a.type) || this.setEntityIndex(o);
883
+ for (const r of i)
884
+ this.setEntityIndex(r).add(o);
777
885
  });
778
886
  }
779
- regenerate(e, n) {
780
- this.updateFragmentFill(e, n);
781
- }
782
- async regenerateClassification(e, n = {}) {
783
- const s = this._fragmentClassifier.get(), o = [], i = e[0], l = s[i];
784
- if (i == null || l == null)
785
- return o;
786
- for (const d of Object.keys(l)) {
787
- const p = { ...n, [i]: [d] }, r = await this._fragmentClassifier.find(p);
788
- if (Object.keys(r).length > 0) {
789
- const f = i[0].toUpperCase() + i.slice(1), g = await this.regenerateClassification(
790
- e.slice(1),
887
+ regenerate(t, n) {
888
+ this.updateFragmentFill(t, n);
889
+ }
890
+ async regenerateClassification(t, n = {}) {
891
+ const o = this._fragmentClassifier.get(), i = [], a = t[0], r = o[a];
892
+ if (a == null || r == null)
893
+ return i;
894
+ for (const u of Object.keys(r)) {
895
+ const p = { ...n, [a]: [u] }, c = await this._fragmentClassifier.find(p);
896
+ if (Object.keys(c).length > 0) {
897
+ const g = a[0].toUpperCase() + a.slice(1), h = await this.regenerateClassification(
898
+ t.slice(1),
791
899
  p
792
900
  );
793
- o.push({ children: g, fragments: r, name: d, treeItemName: f });
901
+ i.push({ children: h, fragments: c, name: u, treeItemName: g });
794
902
  }
795
903
  }
796
- return o;
904
+ return i;
797
905
  }
798
- setEntityIndex(e) {
799
- return e in this._indexMap || (this._indexMap[e] = /* @__PURE__ */ new Set()), this._indexMap[e];
906
+ setEntityIndex(t) {
907
+ return t in this._indexMap || (this._indexMap[t] = /* @__PURE__ */ new Set()), this._indexMap[t];
800
908
  }
801
- updateFragmentFill(e, n) {
802
- const s = this._ifcSelection[e][n], o = this._fragmentManager.list[n];
803
- if (o == null)
804
- return;
805
- const i = o.fragments[e];
909
+ updateFragmentFill(t, n) {
910
+ const o = this._ifcSelection[t][n], i = this._fragmentManager.list[n];
806
911
  if (i == null)
807
912
  return;
808
- const l = o.mesh.parent;
809
- if (l == null)
913
+ const a = i.fragments[t];
914
+ if (a == null)
915
+ return;
916
+ const r = i.mesh.parent;
917
+ if (r == null)
810
918
  return;
811
- if (l.add(i.mesh), i.blocks.count > 1)
812
- o.getInstance(0, A), i.setInstance(0, {
813
- ids: Array.from(o.ids),
814
- transform: A
815
- }), i.blocks.setVisibility(!0, s, !0);
919
+ if (r.add(a.mesh), a.blocks.count > 1)
920
+ i.getInstance(0, H), a.setInstance(0, {
921
+ ids: Array.from(i.ids),
922
+ transform: H
923
+ }), a.blocks.setVisibility(!0, o, !0);
816
924
  else {
817
925
  let p = 0;
818
- for (const r of s) {
819
- i.mesh.count = p + 1;
820
- const { instanceID: u } = o.getInstanceAndBlockID(r);
821
- o.getInstance(u, A), i.setInstance(p, { ids: [r], transform: A }), p++;
926
+ for (const c of o) {
927
+ a.mesh.count = p + 1;
928
+ const { instanceID: d } = i.getInstanceAndBlockID(c);
929
+ i.getInstance(d, H), a.setInstance(p, { ids: [c], transform: H }), p++;
822
930
  }
823
931
  }
824
932
  }
825
933
  };
826
- c(z, "isIFCEntity", (e) => $(e) && e.isIfcEntity), c(z, "isIFCPickResult", (e) => $(e) && z.isIFCEntity(e.entity));
827
- let X = z;
828
- class Jt extends st {
829
- constructor(t, e, n) {
830
- super(t, e, n, { visibility: !0 });
934
+ l(U, "isIFCEntity", (t) => se(t) && t.isIfcEntity), l(U, "isIFCPickResult", (t) => se(t) && U.isIFCEntity(t.entity));
935
+ let ie = U;
936
+ class vs extends hn {
937
+ constructor(e, t, n) {
938
+ super(e, t, n, { visibility: !0 });
831
939
  }
832
940
  }
833
- const Zt = { class: "d-flex" }, Qt = ["title"], Xt = ["id"], Kt = { class: "list-unstyled border-start" }, en = /* @__PURE__ */ D({
941
+ const ws = { class: "d-flex" }, _s = ["title"], Ss = ["id"], xs = { class: "list-unstyled border-start" }, Ps = /* @__PURE__ */ A({
834
942
  __name: "IfcSubtree",
835
943
  props: {
836
944
  classificationElement: {},
837
945
  ifcEntity: {}
838
946
  },
839
- setup(a) {
840
- const t = a, e = J.generateUUID(), n = `#${e}`, s = I(!1), o = ke(), l = Me().getModule(Le);
841
- function d() {
842
- if (l == null) {
947
+ setup(s) {
948
+ const e = s, t = J.generateUUID(), n = `#${t}`, o = E(!1), i = Et(), r = Tt().getModule(It);
949
+ function u() {
950
+ if (r == null) {
843
951
  console.warn("Cannot clip IFC element, ClippingBoxAnalysis module is not present");
844
952
  return;
845
953
  }
846
- const u = t.ifcEntity.getBoundingBoxById(t.classificationElement.fragments);
847
- u && !u.isEmpty() && l.setClippingBox(u);
954
+ const d = e.ifcEntity.getBoundingBoxById(e.classificationElement.fragments);
955
+ d && !d.isEmpty() && r.setClippingBox(d);
848
956
  }
849
957
  function p() {
850
- s.value = !0, t.ifcEntity.clearHighlight(), t.ifcEntity.highlightById(t.classificationElement.fragments), setTimeout(() => s.value = !1, 2e3);
958
+ o.value = !0, e.ifcEntity.clearHighlight(), e.ifcEntity.highlightById(e.classificationElement.fragments), setTimeout(() => o.value = !1, 2e3);
851
959
  }
852
- function r() {
853
- const u = t.ifcEntity.getBoundingBoxById(t.classificationElement.fragments);
854
- u && !u.isEmpty() && o.lookTopDownAt(u);
960
+ function c() {
961
+ const d = e.ifcEntity.getBoundingBoxById(e.classificationElement.fragments);
962
+ d && !d.isEmpty() && i.lookTopDownAt(d);
855
963
  }
856
- return (u, h) => {
857
- const f = He("IfcSubtree", !0);
858
- return v(), P("div", null, [
859
- m("div", Zt, [
860
- m("span", {
861
- class: ae([
964
+ return (d, m) => {
965
+ const g = At("IfcSubtree", !0);
966
+ return y(), x("div", null, [
967
+ f("div", ws, [
968
+ f("span", {
969
+ class: we([
862
970
  "border rounded px-1 py-0 fw-normal",
863
- s.value ? "text-danger border-danger" : "text-secondary border-secondary"
971
+ o.value ? "text-danger border-danger" : "text-secondary border-secondary"
864
972
  ]),
865
- title: u.classificationElement.treeItemName
866
- }, pe(u.classificationElement.treeItemName), 11, Qt),
867
- u.classificationElement.children.length > 0 ? (v(), V(ie, { key: 0 }, {
868
- default: re(() => [
869
- T(W, {
973
+ title: s.classificationElement.treeItemName
974
+ }, ue(s.classificationElement.treeItemName), 11, _s),
975
+ s.classificationElement.children.length > 0 ? (y(), Z(ve, { key: 0 }, {
976
+ default: _e(() => [
977
+ D(ee, {
870
978
  title: "Expand group",
871
979
  icon: "bi-chevron-down",
872
980
  "data-bs-toggle": "collapse",
873
981
  "data-bs-target": n,
874
- "aria-controls": b(e),
982
+ "aria-controls": v(t),
875
983
  "aria-expanded": "true"
876
984
  }, null, 8, ["aria-controls"])
877
985
  ]),
878
986
  _: 1
879
- })) : L("", !0),
880
- T(De, {
881
- class: ae(["label", s.value ? "text-danger-emphasis" : "text-muted"]),
882
- text: u.classificationElement.name,
883
- title: `Zoom to ${u.classificationElement.name}`,
884
- onClick: r
987
+ })) : k("", !0),
988
+ D(Ft, {
989
+ class: we(["label", o.value ? "text-danger-emphasis" : "text-muted"]),
990
+ text: s.classificationElement.name,
991
+ title: `Zoom to ${s.classificationElement.name}`,
992
+ onClick: c
885
993
  }, null, 8, ["class", "text", "title"]),
886
- T(ie, { class: "ms-1" }, {
887
- default: re(() => [
888
- T(W, {
994
+ D(ve, { class: "ms-1" }, {
995
+ default: _e(() => [
996
+ D(ee, {
889
997
  title: "Highlight",
890
998
  icon: "bi-highlighter",
891
999
  onClick: p
892
1000
  }),
893
- b(l) != null ? (v(), V(W, {
1001
+ v(r) != null ? (y(), Z(ee, {
894
1002
  key: 0,
895
1003
  title: "Clip to",
896
1004
  icon: "bi-bounding-box",
897
- onClick: d
898
- })) : L("", !0)
1005
+ onClick: u
1006
+ })) : k("", !0)
899
1007
  ]),
900
1008
  _: 1
901
1009
  })
902
1010
  ]),
903
- u.classificationElement.children.length > 0 ? (v(), P("div", {
1011
+ s.classificationElement.children.length > 0 ? (y(), x("div", {
904
1012
  key: 0,
905
- id: b(e),
1013
+ id: v(t),
906
1014
  class: "collapse show"
907
1015
  }, [
908
- m("ul", Kt, [
909
- (v(!0), P(Y, null, he(u.classificationElement.children, (g, C) => (v(), P("li", { key: C }, [
910
- T(f, {
911
- "ifc-entity": t.ifcEntity,
912
- "classification-element": g
1016
+ f("ul", xs, [
1017
+ (y(!0), x(V, null, de(s.classificationElement.children, (h, S) => (y(), x("li", { key: S }, [
1018
+ D(g, {
1019
+ "ifc-entity": e.ifcEntity,
1020
+ "classification-element": h
913
1021
  }, null, 8, ["ifc-entity", "classification-element"])
914
1022
  ]))), 128))
915
1023
  ])
916
- ], 8, Xt)) : L("", !0)
1024
+ ], 8, Ss)) : k("", !0)
917
1025
  ]);
918
1026
  };
919
1027
  }
920
- }), tn = /* @__PURE__ */ te(en, [["__scopeId", "data-v-804ca598"]]), nn = { key: 0 }, sn = /* @__PURE__ */ D({
1028
+ }), Cs = /* @__PURE__ */ X(Ps, [["__scopeId", "data-v-b83cefb0"]]), Es = { key: 0 }, Ts = /* @__PURE__ */ A({
921
1029
  __name: "IfcPropertyView",
922
1030
  props: {
923
1031
  dataset: {}
924
1032
  },
925
- setup(a) {
926
- const t = Be(), e = a, n = Ne(e.dataset, "isPreloaded");
927
- function s() {
928
- const i = o();
929
- return i == null ? null : i.getClassification();
930
- }
1033
+ setup(s) {
1034
+ const e = De(), t = s, n = Dt(t.dataset, "state");
931
1035
  function o() {
932
- const i = t.getEntity(e.dataset);
933
- return i ?? null;
1036
+ const a = i();
1037
+ return a == null ? null : a.getClassification();
1038
+ }
1039
+ function i() {
1040
+ const a = e.getEntities(t.dataset);
1041
+ return a == null ? null : a[0];
934
1042
  }
935
- return (i, l) => b(n) ? (v(), P("div", nn, [
936
- m("ul", null, [
937
- (v(!0), P(Y, null, he(s(), (d, p) => (v(), P("li", { key: p }, [
938
- T(tn, {
939
- "ifc-entity": o(),
940
- "classification-element": d
1043
+ return (a, r) => v(n) === v(Mt).Loaded ? (y(), x("div", Es, [
1044
+ f("ul", null, [
1045
+ (y(!0), x(V, null, de(o(), (u, p) => (y(), x("li", { key: p }, [
1046
+ D(Cs, {
1047
+ "ifc-entity": i(),
1048
+ "classification-element": u
941
1049
  }, null, 8, ["ifc-entity", "classification-element"])
942
1050
  ]))), 128))
943
1051
  ])
944
- ])) : L("", !0);
945
- }
946
- }), on = /* @__PURE__ */ te(sn, [["__scopeId", "data-v-d2d82ae7"]]), an = (a) => {
947
- if (we(a)) {
948
- const t = a.object;
949
- if (t.fragment != null && a.face && a.instanceId != null) {
950
- const e = t.fragment.getVertexBlockID(t.geometry, a.face.a), n = t.fragment.getItemID(a.instanceId, e).replace(/\..*/, "");
951
- return a.entity.highlight("selection", t, n), () => a.entity.clearHighlight();
1052
+ ])) : k("", !0);
1053
+ }
1054
+ }), Is = /* @__PURE__ */ X(Ts, [["__scopeId", "data-v-dc6d8b2c"]]), Fs = K.extend({
1055
+ position: kt.optional(),
1056
+ url: I
1057
+ }), Ds = (s) => {
1058
+ if (Ye(s)) {
1059
+ const e = s.object;
1060
+ if (e.fragment != null && s.face && s.instanceId != null) {
1061
+ const t = e.fragment.getVertexBlockID(e.geometry, s.face.a), n = e.fragment.getItemID(s.instanceId, t).replace(/\..*/, "");
1062
+ return s.entity.highlight("selection", e, n), () => s.entity.clearHighlight();
952
1063
  }
953
1064
  }
954
1065
  return null;
955
- }, rn = (a) => ({
956
- name: a.filename,
957
- source: {
958
- url: a.file
959
- },
960
- type: "ifc",
961
- visible: !0
962
- }), ln = (a, t) => {
963
- var d, p, r, u, h, f, g, C, _;
964
- if (!we(a))
1066
+ }, Ms = (s) => {
1067
+ const e = {
1068
+ name: s.filename,
1069
+ type: "ifc",
1070
+ url: typeof s.file == "string" ? s.file : URL.createObjectURL(s.file),
1071
+ visible: !0
1072
+ };
1073
+ return Promise.resolve(e);
1074
+ }, Ls = (s, e) => {
1075
+ var u, p, c, d, m, g, h, S, T;
1076
+ if (!Ye(s))
965
1077
  return;
966
- const e = (d = a.features) == null ? void 0 : d.at(0);
967
- if (!e)
1078
+ const t = (u = s.features) == null ? void 0 : u.at(0);
1079
+ if (!t)
968
1080
  return;
969
- t.has("IFC") || t.set("IFC", []);
970
- const n = t.get("IFC"), { ifcProperties: s, itemProperties: o } = e, i = "NULL", l = ((p = o.Name) == null ? void 0 : p.value) ?? i;
1081
+ e.has("IFC") || e.set("IFC", []);
1082
+ const n = e.get("IFC"), { ifcProperties: o, itemProperties: i } = t, a = "NULL", r = ((p = i.Name) == null ? void 0 : p.value) ?? a;
971
1083
  n.push({
972
1084
  key: "Site",
973
- value: ((u = (r = a.entity.object3d.userData) == null ? void 0 : r.dataset) == null ? void 0 : u.name) ?? i
1085
+ value: ((d = (c = s.entity.object3d.userData) == null ? void 0 : c.dataset) == null ? void 0 : d.name) ?? a
974
1086
  }), n.push({
975
1087
  key: "IFCType",
976
- value: nt[o.type] ?? i
977
- }), n.push({ key: "Name", value: l }), n.push({ key: "ID", value: o.expressID }), n.push({ key: "GlobalId", value: ((h = o.GlobalId) == null ? void 0 : h.value) ?? i }), ((f = o.Description) == null ? void 0 : f.value) != null && n.push({ key: "Description", value: o.Description.value }), ((g = o.PredefinedType) == null ? void 0 : g.value) != null && n.push({ key: "PredefinedType", value: o.PredefinedType.value }), ((C = o.ObjectType) == null ? void 0 : C.value) != null && n.push({ key: "ObjectType", value: o.ObjectType.value });
978
- for (const { name: y, parentName: x, value: E } of s)
979
- t.has(x) || t.set(x, []), (_ = t.get(x)) == null || _.push({ key: y, value: E });
980
- }, cn = (a) => {
981
- const t = a.dataset, e = t.config, n = de(e.source.position ?? t.get("position")), s = new X({
982
- ...e.source,
983
- at: n,
984
- name: t.name
1088
+ value: fn[i.type] ?? a
1089
+ }), n.push({ key: "Name", value: r }), n.push({ key: "ID", value: i.expressID }), n.push({ key: "GlobalId", value: ((m = i.GlobalId) == null ? void 0 : m.value) ?? a }), ((g = i.Description) == null ? void 0 : g.value) != null && n.push({ key: "Description", value: i.Description.value }), ((h = i.PredefinedType) == null ? void 0 : h.value) != null && n.push({ key: "PredefinedType", value: i.PredefinedType.value }), ((S = i.ObjectType) == null ? void 0 : S.value) != null && n.push({ key: "ObjectType", value: i.ObjectType.value });
1090
+ for (const { name: b, parentName: P, value: w } of o)
1091
+ e.has(P) || e.set(P, []), (T = e.get(P)) == null || T.push({ key: b, value: w });
1092
+ }, ks = (s) => {
1093
+ const { dataset: e, instance: t } = s, n = Fs.parse(e), o = n.position ? Lt(n.position, t.referenceCrs).as(t.referenceCrs) : void 0, i = new ie({
1094
+ at: o,
1095
+ name: e.name,
1096
+ url: n.url
1097
+ });
1098
+ return Promise.resolve({
1099
+ entities: [i]
985
1100
  });
986
- return Promise.resolve(s);
987
1101
  };
988
- class jn {
1102
+ class qe {
989
1103
  constructor() {
990
- c(this, "id", "builtin-ifc-loader");
991
- c(this, "name", "IFC");
1104
+ l(this, "id", "builtin-loader-ifc");
1105
+ l(this, "name", "IFC");
992
1106
  }
993
- async initialize(t) {
994
- t.datasets.registerDatasetType("ifc", {
995
- attributeExtractor: ln,
996
- entityBuilder: cn,
1107
+ async initialize(e) {
1108
+ e.datasets.registerDatasetType("ifc", {
1109
+ attributeExtractor: Ls,
1110
+ builder: ks,
997
1111
  fileExtensions: ["ifc"],
998
- highlight: an,
1112
+ highlight: Ds,
999
1113
  icon: "bi-building",
1000
- loader: rn,
1114
+ loader: Ms,
1001
1115
  name: "IFC",
1002
- propertyView: on
1003
- }), Ye.registerInspector("IfcEntity", Jt), await k.fetch("web-ifc.wasm").catch((e) => {
1004
- console.warn("Could not load web-ifc.wasm", e);
1116
+ propertyView: Is
1117
+ }), nn.registerInspector("IfcEntity", vs), await $.fetch("web-ifc.wasm").catch((t) => {
1118
+ console.warn("Could not load web-ifc.wasm", t);
1119
+ });
1120
+ }
1121
+ }
1122
+ const Os = "kml", js = O.extend({
1123
+ projection: z.optional().default("EPSG:4326"),
1124
+ style: le.optional(),
1125
+ url: I
1126
+ }), $s = (s) => {
1127
+ const e = js.parse(s.dataset), n = {
1128
+ layers: [new L({
1129
+ resolutionFactor: e.resolution,
1130
+ source: new pe({
1131
+ data: {
1132
+ format: new gn({
1133
+ extractStyles: e.style == null
1134
+ }),
1135
+ url: e.url
1136
+ },
1137
+ dataProjection: e.projection,
1138
+ style: e.style != null ? ge(e.style) : Fe
1139
+ })
1140
+ })]
1141
+ };
1142
+ return Promise.resolve(n);
1143
+ }, zs = (s) => {
1144
+ const e = {
1145
+ layerType: "color",
1146
+ name: s.filename,
1147
+ projection: "EPSG:4326",
1148
+ resolution: 1,
1149
+ type: "kml",
1150
+ url: typeof s.file == "string" ? s.file : URL.createObjectURL(s.file),
1151
+ visible: !0
1152
+ };
1153
+ return Promise.resolve(e);
1154
+ };
1155
+ class Je {
1156
+ constructor() {
1157
+ l(this, "id", "builtin-loader-kml");
1158
+ l(this, "name", "KML");
1159
+ }
1160
+ initialize(e) {
1161
+ e.datasets.registerDatasetType(Os, {
1162
+ builder: $s,
1163
+ fileExtensions: ["kml"],
1164
+ icon: "fg-polygon-pt",
1165
+ loader: zs,
1166
+ name: "KML"
1167
+ });
1168
+ }
1169
+ }
1170
+ const As = _.object({
1171
+ colorMap: jt.default({ max: 100, min: 0, ramp: "Greys" })
1172
+ }), Ze = K.extend({
1173
+ attribute: _.string().optional(),
1174
+ style: As.optional(),
1175
+ url: I
1176
+ }), Ns = (s) => {
1177
+ const e = Ze.parse(s.dataset), t = new fe({
1178
+ source: new yn({
1179
+ url: e.url
1180
+ })
1181
+ });
1182
+ return Promise.resolve({
1183
+ entities: [t]
1184
+ });
1185
+ }, Bs = (s) => {
1186
+ const e = Ze.parse(s.dataset), t = new fe({
1187
+ source: new bn({
1188
+ url: e.url
1189
+ })
1190
+ }), n = e.attribute;
1191
+ return t.addEventListener("initialized", () => {
1192
+ var o;
1193
+ n != null && (t.setColoringMode("attribute"), t.setActiveAttribute(n)), ((o = e.style) == null ? void 0 : o.colorMap) != null && (t.colorMap = Ot(e.style.colorMap));
1194
+ }), Promise.resolve({
1195
+ entities: [t]
1196
+ });
1197
+ }, Pe = (s) => {
1198
+ const e = {
1199
+ name: s.filename,
1200
+ // TODO we currently cannot stream a COPC file from a file, it causes an error during decoding
1201
+ // (something like "Error: Invalid EVLR header length (must be 60)"),
1202
+ // so we have to use the less performant non-streamable LAS format for now.
1203
+ type: "las",
1204
+ url: typeof s.file == "string" ? s.file : URL.createObjectURL(s.file),
1205
+ visible: !0
1206
+ };
1207
+ return Promise.resolve(e);
1208
+ };
1209
+ class Xe {
1210
+ constructor() {
1211
+ l(this, "id", "builtin-loader-las");
1212
+ l(this, "name", "LAS");
1213
+ }
1214
+ initialize(e) {
1215
+ e.datasets.registerDatasetType("las", {
1216
+ builder: Ns,
1217
+ fileExtensions: ["laz", "las"],
1218
+ icon: "fg-multipoint",
1219
+ loader: Pe,
1220
+ name: "LAS"
1221
+ }), e.datasets.registerDatasetType("copc", {
1222
+ builder: Bs,
1223
+ fileExtensions: ["copc.laz"],
1224
+ icon: "fg-multipoint",
1225
+ loader: Pe,
1226
+ name: "Cloud-Optimized Point Cloud (COPC)"
1227
+ });
1228
+ }
1229
+ }
1230
+ const Gs = _.union([
1231
+ _.literal("mapbox.mapbox-terrain-dem-v1"),
1232
+ _.literal("mapbox.terrain-rgb"),
1233
+ _.literal("mapbox.satellite")
1234
+ ]), Rs = O.extend({
1235
+ tileset: Gs,
1236
+ token: _.string().nonempty()
1237
+ }), Hs = {
1238
+ "mapbox.mapbox-terrain-dem-v1": "pngraw",
1239
+ "mapbox.satellite": "jpeg",
1240
+ "mapbox.terrain-rgb": "pngraw"
1241
+ }, Us = "https://api.mapbox.com/v4", Vs = (s) => {
1242
+ const e = Rs.parse(s.dataset), t = Hs[e.tileset];
1243
+ let n;
1244
+ switch (e.tileset) {
1245
+ case "mapbox.mapbox-terrain-dem-v1":
1246
+ case "mapbox.terrain-rgb":
1247
+ n = new vn();
1248
+ break;
1249
+ }
1250
+ let o;
1251
+ const i = new he({
1252
+ format: n,
1253
+ source: new ke({
1254
+ url: `${Us}/${e.tileset}/{z}/{x}/{y}.${t}?access_token=${e.token}`
1255
+ })
1256
+ }), a = {
1257
+ extent: e.extent != null ? ce(e.extent, s.instance.referenceCrs) : void 0,
1258
+ resolutionFactor: e.resolution,
1259
+ source: i
1260
+ };
1261
+ switch (e.layerType) {
1262
+ case "color":
1263
+ o = new L(a);
1264
+ break;
1265
+ case "elevation":
1266
+ o = new me(a);
1267
+ break;
1268
+ }
1269
+ return Promise.resolve({
1270
+ layers: [o]
1271
+ });
1272
+ };
1273
+ class Ke {
1274
+ constructor() {
1275
+ l(this, "id", "builtin-loader-mapbox");
1276
+ l(this, "name", "Mapbox");
1277
+ }
1278
+ initialize(e) {
1279
+ e.datasets.registerDatasetType("mapbox", {
1280
+ builder: Vs,
1281
+ icon: "fg-layer-alt",
1282
+ name: "Mapbox"
1283
+ });
1284
+ }
1285
+ }
1286
+ const Ws = () => {
1287
+ const e = {
1288
+ layers: [new L({
1289
+ source: new he({
1290
+ source: new Oe()
1291
+ })
1292
+ })]
1293
+ };
1294
+ return Promise.resolve(e);
1295
+ };
1296
+ class Qe {
1297
+ constructor() {
1298
+ l(this, "id", "builtin-loader-osm");
1299
+ l(this, "name", "OSM basemap");
1300
+ }
1301
+ initialize(e) {
1302
+ e.datasets.registerDatasetType("osm", {
1303
+ builder: Ws,
1304
+ icon: "fg-layer-alt",
1305
+ name: "OpenStreetMap"
1306
+ });
1307
+ }
1308
+ }
1309
+ const Ys = K.extend({
1310
+ url: I
1311
+ }), qs = (s) => {
1312
+ const e = Ys.parse(s.dataset), t = new fe({
1313
+ source: new wn({ url: `${e.url}` })
1314
+ });
1315
+ return re(t, {
1316
+ filename: e.url
1317
+ }), Promise.resolve({
1318
+ entities: [t]
1319
+ });
1320
+ };
1321
+ class et {
1322
+ constructor() {
1323
+ l(this, "id", "builtin-loader-potree");
1324
+ l(this, "name", "Potree");
1325
+ }
1326
+ initialize(e) {
1327
+ e.datasets.registerDatasetType("potree", {
1328
+ builder: qs,
1329
+ icon: "fg-multipoint",
1330
+ name: "Potree Point Cloud"
1331
+ });
1332
+ }
1333
+ }
1334
+ const Js = K.extend({
1335
+ url: I
1336
+ }), Zs = (s) => {
1337
+ const e = Js.parse(s.dataset), t = new _n({
1338
+ url: e.url
1339
+ });
1340
+ return Promise.resolve({
1341
+ entities: [t]
1342
+ });
1343
+ };
1344
+ class tt {
1345
+ constructor() {
1346
+ l(this, "id", "builtin-loader-3dtiles");
1347
+ l(this, "name", "3D Tiles");
1348
+ }
1349
+ initialize(e) {
1350
+ e.datasets.registerDatasetType("3dtiles", {
1351
+ builder: Zs,
1352
+ icon: "fg-3dtiles-file",
1353
+ name: "3D Tiles"
1354
+ });
1355
+ }
1356
+ }
1357
+ const Xs = "tms", Ks = O.extend(
1358
+ _.object({
1359
+ projection: z.optional().default("EPSG:3857"),
1360
+ url: I
1361
+ }).shape
1362
+ ), Qs = (s) => {
1363
+ const e = Ks.parse(s.dataset), n = {
1364
+ layers: [new L({
1365
+ extent: e.extent ? ce(e.extent, s.instance.referenceCrs).as(
1366
+ s.instance.referenceCrs
1367
+ ) : void 0,
1368
+ source: new he({
1369
+ source: new ke({
1370
+ projection: e.projection ?? "EPSG:3857",
1371
+ url: e.url
1372
+ })
1373
+ })
1374
+ })]
1375
+ };
1376
+ return Promise.resolve(n);
1377
+ };
1378
+ class nt {
1379
+ constructor() {
1380
+ l(this, "id", "builtin-loader-tms");
1381
+ l(this, "name", "TMS");
1382
+ }
1383
+ initialize(e) {
1384
+ e.datasets.registerDatasetType(Xs, {
1385
+ builder: Qs,
1386
+ icon: "fg-layer-alt",
1387
+ name: "TMS"
1388
+ });
1389
+ }
1390
+ }
1391
+ const eo = "wms", to = O.extend({
1392
+ format: _.string().nonempty().optional().default("image/jpeg"),
1393
+ layer: _.union([_.array(_.string().nonempty()), _.string().nonempty()]),
1394
+ projection: z.optional().default("EPSG:3857"),
1395
+ url: I
1396
+ }), no = (s) => {
1397
+ const e = to.parse(s.dataset), n = {
1398
+ layers: [new L({
1399
+ resolutionFactor: e.resolution,
1400
+ source: new Sn({
1401
+ imageFormat: e.format,
1402
+ layer: Array.isArray(e.layer) ? e.layer : [e.layer],
1403
+ projection: e.projection ?? "EPSG:3857",
1404
+ url: e.url
1405
+ })
1406
+ })]
1407
+ };
1408
+ return Promise.resolve(n);
1409
+ };
1410
+ class st {
1411
+ constructor() {
1412
+ l(this, "id", "builtin-loader-wms");
1413
+ l(this, "name", "WMS");
1414
+ }
1415
+ initialize(e) {
1416
+ e.datasets.registerDatasetType(eo, {
1417
+ builder: no,
1418
+ icon: "fg-layer-alt",
1419
+ name: "WMS"
1420
+ });
1421
+ }
1422
+ }
1423
+ const ot = _.string().nonempty();
1424
+ _.globalRegistry.add(ot, { id: "ImageFormat" });
1425
+ const so = "wmts", oo = O.extend({
1426
+ format: ot.optional().default("image/jpeg"),
1427
+ layer: _.string().nonempty().nonoptional(),
1428
+ projection: z.optional().default("EPSG:3857"),
1429
+ url: I
1430
+ });
1431
+ function io(s) {
1432
+ if (s === "image/x-bil;bits=32")
1433
+ return new xn();
1434
+ }
1435
+ const ao = async (s) => {
1436
+ const e = oo.parse(s.dataset), t = await Pn.fromCapabilities(e.url, {
1437
+ format: io(e.format),
1438
+ imageFormat: e.format,
1439
+ layer: e.layer,
1440
+ noDataValue: e.nodata
1441
+ }), n = {
1442
+ extent: e.extent != null ? ce(e.extent, s.instance.referenceCrs).as(
1443
+ s.instance.referenceCrs
1444
+ ) : void 0,
1445
+ noDataOptions: e.nodata != null ? {
1446
+ replaceNoData: !0
1447
+ } : void 0,
1448
+ resolutionFactor: e.resolution,
1449
+ source: t
1450
+ };
1451
+ let o;
1452
+ switch (e.layerType) {
1453
+ case "color":
1454
+ o = new L(n);
1455
+ break;
1456
+ case "elevation":
1457
+ o = new me(n);
1458
+ break;
1459
+ default:
1460
+ throw new Error(`unsupported layer type: ${e.layerType}`);
1461
+ }
1462
+ const i = {
1463
+ layers: [o]
1464
+ };
1465
+ return Promise.resolve(i);
1466
+ };
1467
+ class it {
1468
+ constructor() {
1469
+ l(this, "id", "builtin-loader-wmts");
1470
+ l(this, "name", "WMTS");
1471
+ }
1472
+ initialize(e) {
1473
+ e.datasets.registerDatasetType(so, {
1474
+ builder: ao,
1475
+ icon: "fg-layer-alt",
1476
+ name: "WMTS"
1477
+ });
1478
+ }
1479
+ }
1480
+ const at = [
1481
+ Re,
1482
+ He,
1483
+ Ue,
1484
+ qe,
1485
+ Je,
1486
+ Xe,
1487
+ Qe,
1488
+ tt,
1489
+ nt,
1490
+ st,
1491
+ it,
1492
+ Ke,
1493
+ et,
1494
+ Ge
1495
+ ], gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1496
+ __proto__: null,
1497
+ BDTopoLoader: Ge,
1498
+ GPXLoader: Ue,
1499
+ GeoJSONLoader: Re,
1500
+ GeoTIFFLoader: He,
1501
+ IFCLoader: qe,
1502
+ KMLLoader: Je,
1503
+ LASLoader: Xe,
1504
+ MapboxLoader: Ke,
1505
+ OSMLoader: Qe,
1506
+ PotreeLoader: et,
1507
+ TMSLoader: nt,
1508
+ Tiles3DLoader: tt,
1509
+ WMSLoader: st,
1510
+ WMTSLoader: it,
1511
+ all: at
1512
+ }, Symbol.toStringTag, { value: "Module" })), ro = { class: "area" }, lo = {
1513
+ key: 0,
1514
+ class: "list rounded text-muted"
1515
+ }, co = /* @__PURE__ */ A({
1516
+ __name: "AttributionWidget",
1517
+ props: {
1518
+ context: {}
1519
+ },
1520
+ setup(s) {
1521
+ const e = De(), t = Nt(() => n(e.getVisibleDatasets()));
1522
+ function n(i) {
1523
+ const a = i.filter((u) => u.visible && !$t.isGroup(u) && u.config.attribution != null).map((u) => te(u.config.attribution));
1524
+ return [...new Set(a)];
1525
+ }
1526
+ const o = E(!1);
1527
+ return (i, a) => (y(), x("div", ro, [
1528
+ D(Ce, {
1529
+ title: "Show attributions and copyrights",
1530
+ icon: "bi-info-lg",
1531
+ class: "btn-light button border",
1532
+ onClick: a[0] || (a[0] = () => o.value = !o.value)
1533
+ }),
1534
+ o.value && t.value.length > 0 ? (y(), x("div", lo, [
1535
+ (y(!0), x(V, null, de(t.value, (r) => (y(), x("span", { key: r }, ue(r), 1))), 128))
1536
+ ])) : k("", !0)
1537
+ ]));
1538
+ }
1539
+ }), uo = /* @__PURE__ */ X(co, [["__scopeId", "data-v-d3ec562b"]]);
1540
+ class rt {
1541
+ constructor() {
1542
+ l(this, "id", "builtin-attribution");
1543
+ l(this, "name", "Attribution");
1544
+ }
1545
+ initialize(e) {
1546
+ e.widgets.addWidget({
1547
+ component: uo,
1548
+ id: "attribution"
1549
+ });
1550
+ }
1551
+ }
1552
+ function ae(s) {
1553
+ if ("url" in s.config && typeof s.config.url == "string")
1554
+ try {
1555
+ return _.url().parse(s.config.url), s.config.url;
1556
+ } catch {
1557
+ return;
1558
+ }
1559
+ }
1560
+ function po(s) {
1561
+ return ae(s) != null;
1562
+ }
1563
+ class lt {
1564
+ constructor() {
1565
+ l(this, "id", "builtin-download-dataset");
1566
+ l(this, "name", "Download dataset");
1567
+ l(this, "_context", null);
1568
+ }
1569
+ initialize(e) {
1570
+ this._context = e, e.datasets.registerDatasetAction({
1571
+ action: this.download.bind(this),
1572
+ icon: "bi-download",
1573
+ predicate: po,
1574
+ title: "Download dataset"
1575
+ });
1576
+ }
1577
+ download(e) {
1578
+ const t = ae(e);
1579
+ if (t == null) {
1580
+ console.warn("invalid");
1581
+ return;
1582
+ }
1583
+ const n = this._context, o = new URL(t).pathname.split("/"), i = o[o.length - 1];
1584
+ console.info(`download ${ae(e)}`), $.fetch(t).then((a) => {
1585
+ if (!a.ok)
1586
+ throw new Error(`${a.status} ${a.statusText}`);
1587
+ return a.blob();
1588
+ }).then((a) => {
1589
+ zt.downloadBlob(a, i), n.notifications.push({
1590
+ level: "success",
1591
+ text: i,
1592
+ title: "Download successful"
1593
+ });
1594
+ }).catch((a) => {
1595
+ console.error(a);
1596
+ const r = a instanceof Error ? a.message : "Download failed";
1597
+ n.notifications.push({
1598
+ level: "error",
1599
+ text: r,
1600
+ title: e.name
1601
+ });
1005
1602
  });
1006
1603
  }
1007
1604
  }
1008
- const un = /* @__PURE__ */ D({
1605
+ let Y = !1, W = 1;
1606
+ function mo(s) {
1607
+ return J.clamp(s / 400, 1, 1 / 0);
1608
+ }
1609
+ const fo = [
1610
+ { altitude: 1e3, step: 100 },
1611
+ { altitude: 2500, step: 200 },
1612
+ { altitude: 5e3, step: 500 },
1613
+ { altitude: 2e4, step: 1e3 },
1614
+ { altitude: 5e4, step: 2e3 },
1615
+ { altitude: 1e5, step: 1e4 },
1616
+ { altitude: 2e5, step: 2e4 },
1617
+ { altitude: 4e5, step: 4e4 },
1618
+ { altitude: 25e4, step: 25e3 },
1619
+ { altitude: 5e5, step: 5e4 },
1620
+ { altitude: 1e6, step: 1e5 },
1621
+ { altitude: 2e6, step: 25e4 },
1622
+ { altitude: 5e6, step: 5e5 },
1623
+ { altitude: 1e7, step: 1e6 },
1624
+ { altitude: 3e7, step: 2e6 },
1625
+ { altitude: 1 / 0, step: 4e6 }
1626
+ ];
1627
+ function ho(s, e, t, n) {
1628
+ let o = !1;
1629
+ function i(r, u, p) {
1630
+ r[u] !== p && (o = !0, r[u] = p);
1631
+ }
1632
+ i(s.graticule, "enabled", Y);
1633
+ const a = t.z;
1634
+ i(s.graticule, "thickness", mo(a)), i(s.graticule, "opacity", e);
1635
+ for (const r of fo)
1636
+ if (a <= r.altitude) {
1637
+ i(s.graticule, "xStep", r.step), i(s.graticule, "yStep", r.step);
1638
+ break;
1639
+ }
1640
+ o && n.notifyChange(s);
1641
+ }
1642
+ const go = (s) => (e) => {
1643
+ const t = e.instance, n = t.view;
1644
+ Y = !0, W = 1;
1645
+ const o = n.camera.position.clone(), i = n.camera.rotation.clone(), a = () => {
1646
+ const r = s.view.getBasemap();
1647
+ (r.graticule.opacity !== W || r.graticule.enabled !== Y || !o.equals(n.camera.position) || !i.equals(n.camera.rotation)) && (o.copy(n.camera.position), i.copy(n.camera.rotation), ho(r, W, o, t));
1648
+ };
1649
+ return s.events.addEventListener("dataset-opacity-changed", (r) => {
1650
+ r.value.config.type === "graticule" && (W = r.value.opacity, a());
1651
+ }), s.events.addEventListener("dataset-visibility-changed", (r) => {
1652
+ r.value.config.type === "graticule" && (Y = r.value.visible, a());
1653
+ }), t.addEventListener("after-camera-update", () => {
1654
+ a();
1655
+ }), a(), Promise.resolve({});
1656
+ };
1657
+ class ct {
1658
+ constructor() {
1659
+ l(this, "id", "builtin-graticule");
1660
+ l(this, "name", "Graticule");
1661
+ }
1662
+ initialize(e) {
1663
+ e.datasets.registerDatasetType("graticule", {
1664
+ builder: go(e),
1665
+ icon: "fg-grid",
1666
+ name: "Graticule"
1667
+ });
1668
+ }
1669
+ }
1670
+ const bo = /* @__PURE__ */ A({
1009
1671
  __name: "OpenLayersMinimapComponent",
1010
1672
  props: {
1011
1673
  context: {}
1012
1674
  },
1013
- setup(a) {
1014
- const t = I(), e = Z(), n = a, s = [
1675
+ setup(s) {
1676
+ const e = E(), t = oe(), n = s, o = [
1015
1677
  [3e4, 12],
1016
1678
  [5e4, 10],
1017
1679
  [1e5, 8],
1018
1680
  [4e5, 6],
1019
- [8e5, 4]
1681
+ [8e5, 4],
1682
+ [16e5, 3],
1683
+ [3e6, 1]
1020
1684
  ];
1021
- function o(i) {
1022
- for (const [l, d] of s)
1023
- if (i < l)
1024
- return d;
1025
- return s[s.length - 1][1];
1685
+ function i(a) {
1686
+ for (const [r, u] of o)
1687
+ if (a < r)
1688
+ return u;
1689
+ return o[o.length - 1][1];
1026
1690
  }
1027
- return Re(() => {
1028
- e.value = new ot({
1691
+ return Bt(() => {
1692
+ const a = new Tn({
1693
+ source: new Oe()
1694
+ });
1695
+ t.value = new Cn({
1029
1696
  controls: [],
1030
- layers: [new at({ source: new rt() })],
1031
- target: t.value,
1032
- view: new it({
1033
- center: le([4, 44]),
1697
+ layers: [a],
1698
+ target: e.value,
1699
+ view: new En({
1700
+ center: xe([4, 44]),
1034
1701
  projection: "EPSG:3857",
1035
1702
  zoom: 5
1036
1703
  })
1037
1704
  });
1038
- let i = new F();
1039
- const l = () => {
1040
- var f;
1041
- const p = n.context.view.getInstance(), u = n.context.view.getCameraController().getCameraPosition(), h = u.camera.z;
1042
- if (!u.camera.equals(i)) {
1043
- i = u.camera.clone();
1044
- const g = new H(
1045
- p.referenceCrs,
1046
- i.x,
1047
- i.y
1048
- ).as("EPSG:4326"), C = o(h), _ = (f = e.value) == null ? void 0 : f.getView();
1049
- _ == null || _.setCenter(le([g.longitude, g.latitude])), _ == null || _.setZoom(C);
1705
+ let r = new M(), u;
1706
+ const p = () => {
1707
+ var T;
1708
+ const m = n.context.view.getInstance(), h = n.context.view.getCameraController().getCameraPosition(), S = h.camera.z;
1709
+ if (!h.camera.equals(r)) {
1710
+ r = h.camera.clone();
1711
+ const b = new N(
1712
+ m.referenceCrs,
1713
+ r.x,
1714
+ r.y
1715
+ ).as("EPSG:4326"), P = i(S), w = (T = t.value) == null ? void 0 : T.getView();
1716
+ w == null || w.setCenter(xe([b.longitude, b.latitude])), w == null || w.setZoom(P);
1050
1717
  }
1051
1718
  };
1052
- n.context.events.addEventListener("updated", l);
1053
- let d = !1;
1054
- t.value && (t.value.onclick = () => {
1055
- var p, r, u, h;
1056
- d = !d, d ? ((p = t.value) == null || p.classList.add("collapsed"), (r = t.value) == null || r.classList.remove("expanded")) : ((u = t.value) == null || u.classList.remove("collapsed"), (h = t.value) == null || h.classList.add("expanded"));
1719
+ let c = !1;
1720
+ const d = () => {
1721
+ clearTimeout(u), c || (u = setTimeout(p, 200));
1722
+ };
1723
+ n.context.events.addEventListener("updated", d), e.value && (e.value.onclick = () => {
1724
+ var m, g, h, S;
1725
+ c = !c, c ? ((m = e.value) == null || m.classList.add("collapsed"), (g = e.value) == null || g.classList.remove("expanded")) : ((h = e.value) == null || h.classList.remove("collapsed"), (S = e.value) == null || S.classList.add("expanded"));
1057
1726
  });
1058
- }), Ve(() => {
1059
- var i;
1060
- (i = e.value) == null || i.dispose(), e.value = void 0;
1061
- }), (i, l) => (v(), P("div", {
1727
+ }), Gt(() => {
1728
+ var a;
1729
+ (a = t.value) == null || a.dispose(), t.value = void 0;
1730
+ }), (a, r) => (y(), x("div", {
1062
1731
  ref_key: "target",
1063
- ref: t,
1732
+ ref: e,
1064
1733
  title: "Toggle minimap",
1065
1734
  class: "minimap expanded"
1066
- }, null, 512));
1067
- }
1068
- }), dn = /* @__PURE__ */ te(un, [["__scopeId", "data-v-38ee3c04"]]);
1069
- class $n {
1735
+ }, [...r[0] || (r[0] = [
1736
+ f("div", { class: "crosshair position-absolute top-50 start-50 translate-middle" }, [
1737
+ f("i", { class: "bi bi-crosshair" })
1738
+ ], -1)
1739
+ ])], 512));
1740
+ }
1741
+ }), yo = /* @__PURE__ */ X(bo, [["__scopeId", "data-v-ce43aa25"]]);
1742
+ class ut {
1070
1743
  constructor() {
1071
- c(this, "id", "builtin-minimap-openlayers");
1072
- c(this, "name", "Minimap");
1744
+ l(this, "id", "builtin-minimap-openlayers");
1745
+ l(this, "name", "Minimap");
1073
1746
  }
1074
- initialize(t) {
1075
- t.widgets.addWidget({
1076
- component: dn,
1747
+ initialize(e) {
1748
+ e.widgets.addWidget({
1749
+ component: yo,
1077
1750
  id: "minimap-ol"
1078
1751
  });
1079
1752
  }
1080
1753
  }
1081
- const j = class j extends K {
1082
- constructor() {
1083
- super(...arguments);
1084
- c(this, "isPickableFeatures", !0);
1085
- c(this, "isPlyMesh", !0);
1086
- }
1087
- pickFeaturesFrom(e) {
1088
- if (this.geometry.hasAttribute("color") && e.face) {
1089
- const n = this.geometry.getAttribute("color").array, s = e.face, i = [{ color: new je(
1090
- n[s.a * 3],
1091
- n[s.a * 3 + 1],
1092
- n[s.a * 3 + 2]
1093
- ) }];
1094
- return e.features = i, i;
1095
- }
1096
- return [];
1097
- }
1098
- };
1099
- c(j, "isPlyMesh", (e) => $(e) && e.isPlyMesh), c(j, "isPlyPickResult", (e) => $(e) && j.isPlyMesh(e == null ? void 0 : e.object));
1100
- let U = j;
1101
- class pn extends fe {
1102
- constructor(e) {
1103
- super(new ue());
1104
- c(this, "isPlyEntity", !0);
1105
- c(this, "source");
1106
- this.source = e;
1107
- }
1108
- async preprocess() {
1109
- const e = await k.fetchArrayBuffer(this.source.url), n = this.source.at.as(this.source.featureProjection).toVector3(), o = new Oe().parse(e), i = new Ae({
1110
- side: ze
1111
- });
1112
- o.hasAttribute("color") && (i.vertexColors = !0), o.computeVertexNormals();
1113
- const l = new U(o, i);
1114
- l.name = "plyModel", o.computeBoundingBox(), l.position.copy(n), l.updateWorldMatrix(!0, !0), this.object3d.add(l), this.onObjectCreated(l);
1115
- const d = k.getContext(this.source.url);
1116
- ee(this, { filename: d.filename }), this.notifyChange(this.object3d);
1117
- }
1118
- }
1119
- const hn = (a) => {
1120
- const { dataset: t, instance: e } = a, n = t.config, s = de(n.source.position ?? t.get("position")), o = new pn({
1121
- ...n.source,
1122
- at: s,
1123
- featureProjection: e.referenceCrs
1124
- });
1125
- return Promise.resolve(o);
1126
- }, mn = (a, t) => {
1127
- var s;
1128
- if (!U.isPlyPickResult(a))
1129
- return;
1130
- const e = (s = a.features) == null ? void 0 : s.at(0);
1131
- if (!e)
1132
- return;
1133
- t.has("PLY") || t.set("PLY", []), t.get("PLY").push({ key: "Color", value: e.color });
1134
- };
1135
- class Hn {
1136
- constructor() {
1137
- c(this, "id", "builtin-ply-loader");
1138
- c(this, "name", "PLY");
1139
- }
1140
- initialize(t) {
1141
- t.datasets.registerDatasetType("ply", {
1142
- attributeExtractor: mn,
1143
- entityBuilder: hn,
1144
- icon: "bi-file-earmark-binary",
1145
- name: "PLY"
1146
- });
1147
- }
1148
- }
1149
- const fn = (a) => {
1150
- a.addEventListener("object-created", (t) => {
1151
- t.obj.traverse((n) => {
1152
- var s;
1153
- ((s = n.userData) == null ? void 0 : s.class) === "IfcSpace" && (n.visible = !1);
1754
+ const vo = (s) => {
1755
+ s.addEventListener("object-created", (e) => {
1756
+ e.obj.traverse((n) => {
1757
+ var o;
1758
+ ((o = n.userData) == null ? void 0 : o.class) === "IfcSpace" && (n.visible = !1);
1154
1759
  });
1155
1760
  });
1156
1761
  };
1157
- class Rn {
1762
+ class dt {
1158
1763
  constructor() {
1159
- c(this, "id", "builtin-post-process-entities");
1160
- c(this, "name", "Post-process 3D Tiles");
1161
- c(this, "_alreadyProcessedEntities", /* @__PURE__ */ new Set());
1162
- c(this, "_processings", [fn]);
1163
- }
1164
- initialize(t) {
1165
- t.events.addEventListener("ready", () => {
1166
- const e = t.view.getInstance();
1167
- e.addEventListener("entity-added", () => this.processEntities(e)), this.processEntities(e);
1764
+ l(this, "id", "builtin-post-process-entities");
1765
+ l(this, "name", "Post-process 3D Tiles");
1766
+ l(this, "_alreadyProcessedEntities", /* @__PURE__ */ new Set());
1767
+ l(this, "_processings", [vo]);
1768
+ }
1769
+ initialize(e) {
1770
+ e.events.addEventListener("ready", () => {
1771
+ const t = e.view.getInstance();
1772
+ t.addEventListener("entity-added", () => this.processEntities(t)), this.processEntities(t);
1168
1773
  });
1169
1774
  }
1170
- processEntities(t) {
1171
- for (const e of t.getEntities())
1172
- this._alreadyProcessedEntities.has(e.id) || (ge(e) && this.processEntity(e, t), this._alreadyProcessedEntities.add(e.id));
1775
+ processEntities(e) {
1776
+ for (const t of e.getEntities())
1777
+ this._alreadyProcessedEntities.has(t.id) || (Le(t) && this.processEntity(t, e), this._alreadyProcessedEntities.add(t.id));
1173
1778
  }
1174
- processEntity(t, e) {
1175
- const n = { instance: e };
1176
- for (const s of this._processings)
1177
- s(t, n);
1779
+ processEntity(e, t) {
1780
+ const n = { instance: t };
1781
+ for (const o of this._processings)
1782
+ o(e, n);
1178
1783
  }
1179
1784
  }
1180
- const gn = (a) => {
1181
- const t = a.dataset.config, e = new lt({
1182
- source: new ct({ url: `${t.source.url}/${t.source.filename}` })
1183
- });
1184
- return ee(e, {
1185
- filename: t.source.url
1186
- }), Promise.resolve(e);
1187
- };
1188
- class Vn {
1785
+ class pt {
1189
1786
  constructor() {
1190
- c(this, "id", "builtin-potree-loader");
1191
- c(this, "name", "Potree");
1787
+ l(this, "id", "builtin-tour");
1788
+ l(this, "name", "Tour");
1789
+ l(this, "_camera", null);
1790
+ l(this, "_cameraCallback", null);
1791
+ l(this, "_context", null);
1792
+ l(this, "_tours", null);
1192
1793
  }
1193
- initialize(t) {
1194
- t.datasets.registerDatasetType("potree", {
1195
- entityBuilder: gn,
1196
- icon: "fg-multipoint",
1197
- name: "Potree Point Cloud"
1198
- });
1199
- }
1200
- }
1201
- class Un {
1202
- constructor() {
1203
- c(this, "id", "builtin-tour");
1204
- c(this, "name", "Tour");
1205
- c(this, "_camera", null);
1206
- c(this, "_cameraCallback", null);
1207
- c(this, "_context", null);
1208
- c(this, "_tours", null);
1209
- }
1210
- initialize(t) {
1211
- this._context = t, t.events.addEventListener("ready", this.start.bind(this));
1794
+ initialize(e) {
1795
+ this._context = e, e.events.addEventListener("ready", this.start.bind(this));
1212
1796
  }
1213
1797
  buildTours() {
1214
- const t = this._camera, e = new w.Tour({
1798
+ const e = this._camera, t = new C.Tour({
1215
1799
  tourName: "main",
1216
1800
  useModalOverlay: !0
1217
- }), n = new w.Tour({
1801
+ }), n = new C.Tour({
1218
1802
  tourName: "navigating",
1219
1803
  useModalOverlay: !0
1220
- }), s = new w.Tour({
1804
+ }), o = new C.Tour({
1221
1805
  tourName: "analyzing",
1222
1806
  useModalOverlay: !0
1223
- }), o = [
1807
+ }), i = [
1224
1808
  { action: () => {
1225
- var r;
1226
- return (r = w.activeTour) == null ? void 0 : r.next();
1809
+ var c;
1810
+ return (c = C.activeTour) == null ? void 0 : c.next();
1227
1811
  }, text: "Next" },
1228
1812
  { action: () => {
1229
- var r;
1230
- return (r = w.activeTour) == null ? void 0 : r.cancel();
1813
+ var c;
1814
+ return (c = C.activeTour) == null ? void 0 : c.cancel();
1231
1815
  }, secondary: !0, text: "Exit" }
1232
- ], i = () => {
1233
- var _, y;
1234
- const r = (_ = w.activeTour) == null ? void 0 : _.getCurrentStep(), u = r == null ? void 0 : r.getElement(), h = u == null ? void 0 : u.querySelector(".shepherd-text"), f = (y = w.activeTour) == null ? void 0 : y.steps;
1235
- if (r == null || u == null || h == null || f == null)
1816
+ ], a = () => {
1817
+ var T, b;
1818
+ const c = (T = C.activeTour) == null ? void 0 : T.getCurrentStep(), d = c == null ? void 0 : c.getElement(), m = d == null ? void 0 : d.querySelector(".shepherd-text"), g = (b = C.activeTour) == null ? void 0 : b.steps;
1819
+ if (c == null || d == null || m == null || g == null)
1236
1820
  return;
1237
- const g = document.createElement("div");
1238
- g.className = "progress mt-3", g.setAttribute("role", "progressbar"), g.style.height = "2px";
1239
- const C = document.createElement("div");
1240
- C.className = "progress-bar bg-success", C.style.width = `${100 * (f.indexOf(r) / f.length)}%`, g.appendChild(C), h.appendChild(g);
1241
- }, l = async (r, u) => new Promise((h) => {
1242
- const f = document.getElementById(r);
1243
- if (f && !f.classList.contains("active") && f.click(), document.querySelector(u))
1244
- return h(document.querySelector(u));
1245
- const g = new MutationObserver(() => {
1246
- document.querySelector(u) && (g.disconnect(), h(document.querySelector(u)));
1821
+ const h = document.createElement("div");
1822
+ h.className = "progress mt-3", h.setAttribute("role", "progressbar"), h.style.height = "2px";
1823
+ const S = document.createElement("div");
1824
+ S.className = "progress-bar bg-success", S.style.width = `${100 * (g.indexOf(c) / g.length)}%`, h.appendChild(S), m.appendChild(h);
1825
+ }, r = async (c, d) => new Promise((m) => {
1826
+ const g = document.getElementById(c);
1827
+ if (g && !g.classList.contains("active") && g.click(), document.querySelector(d))
1828
+ return m(document.querySelector(d));
1829
+ const h = new MutationObserver(() => {
1830
+ document.querySelector(d) && (h.disconnect(), m(document.querySelector(d)));
1247
1831
  });
1248
- g.observe(document.body, {
1832
+ h.observe(document.body, {
1249
1833
  childList: !0,
1250
1834
  subtree: !0
1251
1835
  });
1252
1836
  });
1253
- e.addStep({
1837
+ t.addStep({
1254
1838
  buttons: [
1255
1839
  {
1256
1840
  action: () => {
1257
- var r;
1258
- (r = w.activeTour) == null || r.complete(), n.show(0);
1841
+ var c;
1842
+ (c = C.activeTour) == null || c.complete(), n.show(0);
1259
1843
  },
1260
1844
  text: "Navigating"
1261
1845
  },
1262
1846
  {
1263
1847
  action: () => {
1264
- var r;
1265
- (r = w.activeTour) == null || r.complete(), s.show(0);
1848
+ var c;
1849
+ (c = C.activeTour) == null || c.complete(), o.show(0);
1266
1850
  },
1267
1851
  text: "Analyzing data"
1268
1852
  },
1269
1853
  {
1270
1854
  action: () => {
1271
- var r;
1272
- return (r = w.activeTour) == null ? void 0 : r.cancel();
1855
+ var c;
1856
+ return (c = C.activeTour) == null ? void 0 : c.cancel();
1273
1857
  },
1274
1858
  secondary: !0,
1275
1859
  text: "Exit"
@@ -1280,37 +1864,37 @@ class Un {
1280
1864
  text: "<p>Welcome to <strong>Piero</strong>, the Giro3D application.<br/>We can guide you through the different features.</p>",
1281
1865
  title: "Welcome!",
1282
1866
  when: {
1283
- show: i
1867
+ show: a
1284
1868
  }
1285
1869
  }), n.addStep({
1286
1870
  attachTo: {
1287
1871
  element: "#main-view",
1288
1872
  on: "bottom"
1289
1873
  },
1290
- buttons: o,
1874
+ buttons: i,
1291
1875
  id: "view",
1292
1876
  text: "<p>This is the <b>main view</b>.</p><p>Giro3D natively supports a broad range of data sources, from 2D raster and vector data, to 3D point clouds and tilesets.</p><p>Piero adds support for CityJSON and IFC files.</p>",
1293
1877
  when: {
1294
- show: i
1878
+ show: a
1295
1879
  }
1296
1880
  }), n.addStep({
1297
1881
  attachTo: {
1298
1882
  element: "#main-view",
1299
1883
  on: "bottom"
1300
1884
  },
1301
- buttons: o,
1885
+ buttons: i,
1302
1886
  id: "navigate",
1303
1887
  text: '<p>This application integrates <a href="https://github.com/yomotsu/camera-controls">camera-controls</a>, a camera control for three.js.</p><p><b>Click</b> to move the camera. <b>Right-click</b> to rotate around a point. <b>Scroll</b> to zoom in or out.</p>',
1304
1888
  when: {
1305
1889
  hide: () => {
1306
- this._cameraCallback && t.removeEventListener("interaction-end", this._cameraCallback), this._cameraCallback = null;
1890
+ this._cameraCallback && e.removeEventListener("interaction-end", this._cameraCallback), this._cameraCallback = null;
1307
1891
  },
1308
1892
  show: () => {
1309
- let r = 0;
1893
+ let c = 0;
1310
1894
  this._cameraCallback = () => {
1311
- var u;
1312
- r += 1, r > 2 && ((u = w.activeTour) == null || u.next());
1313
- }, t.addEventListener("interaction-end", this._cameraCallback), i();
1895
+ var d;
1896
+ c += 1, c > 2 && ((d = C.activeTour) == null || d.next());
1897
+ }, e.addEventListener("interaction-end", this._cameraCallback), a();
1314
1898
  }
1315
1899
  }
1316
1900
  }), n.addStep({
@@ -1318,71 +1902,71 @@ class Un {
1318
1902
  element: "#toolbar",
1319
1903
  on: "right"
1320
1904
  },
1321
- beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
1322
- buttons: o,
1905
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
1906
+ buttons: i,
1323
1907
  id: "toolbar-layers",
1324
1908
  text: "<p>Giro3D supports multiple datasets.</p><p>You can toggle datasets as you wish with the <b>Datasets</b> panel.</p>",
1325
1909
  when: {
1326
- show: i
1910
+ show: a
1327
1911
  }
1328
1912
  }), n.addStep({
1329
1913
  attachTo: {
1330
1914
  element: "#basemap-list",
1331
1915
  on: "right"
1332
1916
  },
1333
- beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
1334
- buttons: o,
1917
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
1918
+ buttons: i,
1335
1919
  id: "basemaps",
1336
1920
  text: "<p><b>Basemaps</b> are color and elevation layers that make the basic shape and aspect of the <b>Map</b>.</p>",
1337
1921
  when: {
1338
- show: i
1922
+ show: a
1339
1923
  }
1340
1924
  }), n.addStep({
1341
1925
  attachTo: {
1342
1926
  element: "#overlay-list",
1343
1927
  on: "right"
1344
1928
  },
1345
- beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
1346
- buttons: o,
1929
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
1930
+ buttons: i,
1347
1931
  id: "overlays",
1348
1932
  text: "<p><b>Overlays</b> are vector layers in various formats (WFS, GML, GeoJSON...).</p>",
1349
1933
  when: {
1350
- show: i
1934
+ show: a
1351
1935
  }
1352
1936
  }), n.addStep({
1353
1937
  attachTo: {
1354
1938
  element: "#dataset-list",
1355
1939
  on: "right"
1356
1940
  },
1357
- beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
1358
- buttons: o,
1941
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
1942
+ buttons: i,
1359
1943
  id: "layers",
1360
1944
  text: "<p>The <b>Datasets</b> panel contains all 3D objects in the scene.</><p>You can toggle their visibility and delete them.<p><p>Most objects leverage Giro3D's adaptive resolution to optimize their display.</p>",
1361
1945
  when: {
1362
- show: i
1946
+ show: a
1363
1947
  }
1364
1948
  }), n.addStep({
1365
1949
  attachTo: {
1366
1950
  element: "#datasets-drop-zone",
1367
1951
  on: "right"
1368
1952
  },
1369
- beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
1370
- buttons: o,
1953
+ beforeShowPromise: () => r("toolbar-datasets", "#datasets-drop-zone"),
1954
+ buttons: i,
1371
1955
  id: "adddata",
1372
1956
  text: "<p>You can add your own data from your computer by <b>dragging the file</b> into this page.</p><p>While you won't benefit from Giro3D's tiling mechanism, this can be a great way to quickly visualize datasets up to 100MB.</p><p>This application supports CityJSONs, IFCs, LAS/LAZs, CSV pointclouds, and simple GeoJSON features.</p>",
1373
1957
  when: {
1374
- show: i
1958
+ show: a
1375
1959
  }
1376
1960
  }), n.addStep({
1377
1961
  attachTo: {
1378
1962
  element: "#main-view",
1379
1963
  on: "bottom"
1380
1964
  },
1381
- buttons: o,
1965
+ buttons: i,
1382
1966
  id: "attributes",
1383
1967
  text: "<p>By clicking on any feature on the map, you can see its <strong>Attribute table</strong>. Clickable features display a cursor when hovered.</p>",
1384
1968
  when: {
1385
- show: i
1969
+ show: a
1386
1970
  }
1387
1971
  }), n.addStep({
1388
1972
  attachTo: {
@@ -1392,15 +1976,15 @@ class Un {
1392
1976
  buttons: [
1393
1977
  {
1394
1978
  action: () => {
1395
- var r;
1396
- (r = w.activeTour) == null || r.complete(), s.show(0);
1979
+ var c;
1980
+ (c = C.activeTour) == null || c.complete(), o.show(0);
1397
1981
  },
1398
1982
  text: "Analyzing data"
1399
1983
  },
1400
1984
  {
1401
1985
  action: () => {
1402
- var r;
1403
- return (r = w.activeTour) == null ? void 0 : r.complete();
1986
+ var c;
1987
+ return (c = C.activeTour) == null ? void 0 : c.complete();
1404
1988
  },
1405
1989
  secondary: !0,
1406
1990
  text: "Exit"
@@ -1409,101 +1993,222 @@ class Un {
1409
1993
  id: "widgets",
1410
1994
  text: "Giro3D is highly extensible. Here we added a widget to search and navigate to locations based on the French address database.",
1411
1995
  when: {
1412
- show: i
1996
+ show: a
1413
1997
  }
1414
- }), s.addStep({
1998
+ }), o.addStep({
1415
1999
  attachTo: {
1416
2000
  element: "#annotations-fieldset",
1417
2001
  on: "right"
1418
2002
  },
1419
- beforeShowPromise: () => l("toolbar-annotations", "#annotations-fieldset"),
1420
- buttons: o,
2003
+ beforeShowPromise: () => r("toolbar-annotations", "#annotations-fieldset"),
2004
+ buttons: i,
1421
2005
  id: "annotation",
1422
2006
  text: "<p>You can <strong>annotate</strong> any data displayed using Giro3D native tools.<br>Select the <strong>geometry</strong> of your annotation, and <strong>click</strong> on the scene to add points. <strong>Right-click</strong> to end the shape.</p>",
1423
2007
  when: {
1424
- show: i
2008
+ show: a
1425
2009
  }
1426
- }), s.addStep({
2010
+ }), o.addStep({
1427
2011
  attachTo: {
1428
2012
  element: "#annotations-fieldset",
1429
2013
  on: "right"
1430
2014
  },
1431
- beforeShowPromise: () => l("toolbar-annotations", "#annotations-fieldset"),
1432
- buttons: o,
2015
+ beforeShowPromise: () => r("toolbar-annotations", "#annotations-fieldset"),
2016
+ buttons: i,
1433
2017
  id: "annotations",
1434
2018
  text: "You can download your annotations as GeoJSON files. You can also upload your own by dragging them into this panel.",
1435
2019
  when: {
1436
- show: i
2020
+ show: a
1437
2021
  }
1438
- }), $e("measurements") && s.addStep({
2022
+ }), o.addStep({
1439
2023
  attachTo: {
1440
2024
  element: "#panel-container",
1441
2025
  on: "right"
1442
2026
  },
1443
- beforeShowPromise: () => l("toolbar-measures", "#measures-fieldset"),
1444
- buttons: o,
2027
+ beforeShowPromise: () => r("toolbar-measures", "#measures-fieldset"),
2028
+ buttons: i,
1445
2029
  id: "measurements",
1446
2030
  text: "You can add <strong>measurements</strong> to easily get distances betwween objects.<br>Once started, moving the mouse will display the measure. <strong>Click</strong> to save the measurement. <strong>Right-click</strong> to end.",
1447
2031
  when: {
1448
- show: i
2032
+ show: a
1449
2033
  }
1450
- }), s.addStep({
2034
+ }), o.addStep({
1451
2035
  attachTo: {
1452
2036
  element: "#panel-container",
1453
2037
  on: "right"
1454
2038
  },
1455
- beforeShowPromise: () => l("toolbar-analysis", "#panel-container .card"),
2039
+ beforeShowPromise: () => r("toolbar-analysis", "#panel-container .card"),
1456
2040
  buttons: [{ action: () => {
1457
- var r;
1458
- return (r = w.activeTour) == null ? void 0 : r.complete();
2041
+ var c;
2042
+ return (c = C.activeTour) == null ? void 0 : c.complete();
1459
2043
  }, text: "Done!" }],
1460
2044
  id: "analysis",
1461
2045
  text: "In the <strong>Analysis</strong> panel you'll find some advanced analysis tools.",
1462
2046
  when: {
1463
- show: i
2047
+ show: a
1464
2048
  }
1465
2049
  });
1466
- const d = () => {
1467
- const r = new URL(document.URL);
1468
- r.searchParams.delete("tourStep"), r.searchParams.set("tour", "none"), window.history.replaceState({}, "", r.toString());
1469
- }, p = (r) => {
1470
- const u = new URL(document.URL);
1471
- let h = "main";
1472
- r.tour.id.startsWith("navigating") ? h = "navigating" : r.tour.id.startsWith("analyzing") && (h = "analyzing"), u.searchParams.set("tour", h), u.searchParams.set("tourStep", r.step.id), window.history.replaceState({}, "", u.toString());
2050
+ const u = () => {
2051
+ const c = new URL(document.URL);
2052
+ c.searchParams.delete("tourStep"), c.searchParams.set("tour", "none"), window.history.replaceState({}, "", c.toString());
2053
+ }, p = (c) => {
2054
+ const d = new URL(document.URL);
2055
+ let m = "main";
2056
+ c.tour.id.startsWith("navigating") ? m = "navigating" : c.tour.id.startsWith("analyzing") && (m = "analyzing"), d.searchParams.set("tour", m), d.searchParams.set("tourStep", c.step.id), window.history.replaceState({}, "", d.toString());
1473
2057
  };
1474
- return e.on("cancel", d), e.on("complete", d), e.on("show", p), n.on("cancel", d), n.on("complete", d), n.on("show", p), s.on("cancel", d), s.on("complete", d), s.on("show", p), { analyzingTour: s, mainTour: e, navigatingTour: n };
2058
+ return t.on("cancel", u), t.on("complete", u), t.on("show", p), n.on("cancel", u), n.on("complete", u), n.on("show", p), o.on("cancel", u), o.on("complete", u), o.on("show", p), { analyzingTour: o, mainTour: t, navigatingTour: n };
1475
2059
  }
1476
2060
  getTours() {
1477
2061
  return this._tours || (this._tours = this.buildTours()), this._tours;
1478
2062
  }
1479
2063
  restart() {
1480
- const { mainTour: t } = this.getTours();
1481
- t.show(0);
2064
+ const { mainTour: e } = this.getTours();
2065
+ e.show(0);
1482
2066
  }
1483
2067
  start() {
1484
2068
  if (!this._context)
1485
2069
  throw new Error("module is not initialized");
1486
- const { analyzingTour: t, mainTour: e, navigatingTour: n } = this.getTours();
2070
+ const { analyzingTour: e, mainTour: t, navigatingTour: n } = this.getTours();
1487
2071
  this._camera = this._context.view.getCameraController();
1488
- const s = new URL(document.URL), o = s.searchParams.get("tour") ?? "main";
1489
- if (o !== "none") {
1490
- const i = s.searchParams.get("tourStep") ?? 0;
1491
- o === "navigating" ? n.show(i) : o === "analyzing" ? t.show(i) : e.show(i);
2072
+ const o = new URL(document.URL), i = o.searchParams.get("tour") ?? "main";
2073
+ if (i !== "none") {
2074
+ const a = o.searchParams.get("tourStep") ?? 0;
2075
+ i === "navigating" ? n.show(a) : i === "analyzing" ? e.show(a) : t.show(a);
1492
2076
  }
1493
2077
  }
1494
2078
  }
2079
+ const mt = [rt, lt, ct, ut, dt, pt], bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2080
+ __proto__: null,
2081
+ Attribution: rt,
2082
+ DownloadDataset: lt,
2083
+ Graticule: ct,
2084
+ OpenLayersMinimap: ut,
2085
+ PostProcessEntities: dt,
2086
+ Tour: pt,
2087
+ all: mt
2088
+ }, Symbol.toStringTag, { value: "Module" })), wo = /^(\d+\.\d+)\s*,\s*(\d+\.\d+)$/;
2089
+ class _o {
2090
+ constructor() {
2091
+ l(this, "name", "Go to coordinates");
2092
+ }
2093
+ search(e) {
2094
+ const t = wo.exec(e);
2095
+ if (t) {
2096
+ const n = Number.parseFloat(t[1]), o = Number.parseFloat(t[2]), a = {
2097
+ coordinates: N.WGS84(n, o),
2098
+ label: `${n.toFixed(6)}, ${o.toFixed(6)}`,
2099
+ provider: this
2100
+ };
2101
+ return Promise.resolve([a]);
2102
+ } else
2103
+ return Promise.resolve([]);
2104
+ }
2105
+ }
2106
+ class ft {
2107
+ constructor() {
2108
+ l(this, "id", "builtin-search-coordinates");
2109
+ l(this, "name", "Coordinates search");
2110
+ }
2111
+ initialize(e) {
2112
+ e.search.registerProvider(new _o());
2113
+ }
2114
+ }
2115
+ const So = /[a-z]{3}/;
2116
+ class xo {
2117
+ constructor() {
2118
+ l(this, "name", "Base adresse nationale (BAN)");
2119
+ }
2120
+ async search(e) {
2121
+ if (!So.test(e))
2122
+ return [];
2123
+ try {
2124
+ const n = (await $.fetchJson(
2125
+ `https://api-adresse.data.gouv.fr/search/?q=${e}`
2126
+ )).features.map((o) => {
2127
+ const i = o.properties, a = o.geometry, [r, u] = a.coordinates;
2128
+ return {
2129
+ coordinates: new N("EPSG:4326", r, u, 0),
2130
+ label: i.label,
2131
+ provider: this
2132
+ };
2133
+ });
2134
+ return await Po(n.map((o) => o.coordinates)), n;
2135
+ } catch (t) {
2136
+ if (t instanceof je)
2137
+ return [];
2138
+ throw t;
2139
+ }
2140
+ }
2141
+ }
2142
+ async function Po(s) {
2143
+ const e = new URL("https://data.geopf.fr/altimetrie/1.0/calcul/alti/rest/elevation.json");
2144
+ e.searchParams.append("lon", s.map((n) => n.longitude).join("|")), e.searchParams.append("lat", s.map((n) => n.latitude).join("|")), e.searchParams.append("zonly", "true"), e.searchParams.append("resource", "ign_rge_alti_wld"), e.searchParams.append("delimiter", "|"), e.searchParams.append("indent", "false");
2145
+ const t = await $.fetchJson(e.toString());
2146
+ for (let n = 0; n < s.length; n++)
2147
+ s[n].setAltitude(t.elevations[n]);
2148
+ return t;
2149
+ }
2150
+ class ht {
2151
+ constructor() {
2152
+ l(this, "id", "builtin-search-ban");
2153
+ l(this, "name", "Base adresse nationale");
2154
+ }
2155
+ initialize(e) {
2156
+ e.search.registerProvider(new xo());
2157
+ }
2158
+ }
2159
+ const Co = /[a-z]{3}/;
2160
+ class Eo {
2161
+ constructor() {
2162
+ l(this, "name", "OpenStreetMap Photon");
2163
+ }
2164
+ async search(e) {
2165
+ if (!Co.test(e))
2166
+ return [];
2167
+ try {
2168
+ return (await $.fetchJson(
2169
+ `https://photon.komoot.io/api/?q=${e}`
2170
+ )).features.map((o) => {
2171
+ const i = o.properties, a = o.geometry, [r, u] = a.coordinates;
2172
+ return {
2173
+ coordinates: new N("EPSG:4326", r, u, 0),
2174
+ label: To(i),
2175
+ provider: this
2176
+ };
2177
+ });
2178
+ } catch (t) {
2179
+ if (t instanceof je)
2180
+ return [];
2181
+ throw t;
2182
+ }
2183
+ }
2184
+ }
2185
+ function To(s) {
2186
+ if (s.label != null)
2187
+ return s.label;
2188
+ const e = [];
2189
+ return s.housenumber != null && e.push(s.housenumber), s.street != null && e.push(s.street), s.city != null && e.push(s.city), s.country != null && e.push(s.country), s.postcode != null && e.push(s.postcode), e.join(", ");
2190
+ }
2191
+ class gt {
2192
+ constructor() {
2193
+ l(this, "id", "builtin-search-photon");
2194
+ l(this, "name", "OpenStreetMap Photon");
2195
+ }
2196
+ initialize(e) {
2197
+ e.search.registerProvider(new Eo());
2198
+ }
2199
+ }
2200
+ const bt = [ft, ht, gt], yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2201
+ __proto__: null,
2202
+ CoordinatesSearch: ft,
2203
+ FrenchBanGeocoder: ht,
2204
+ PhotonGeocoder: gt,
2205
+ all: bt
2206
+ }, Symbol.toStringTag, { value: "Module" })), vi = [...Be, ...at, ...mt, ...bt];
1495
2207
  export {
1496
- Wn as ClippingBoxAnalysis,
1497
- An as CoordinatesSearch,
1498
- Bn as CrossSectionAnalysis,
1499
- Nn as DownloadDataset,
1500
- On as FloodingPlaneAnalysis,
1501
- zn as FrenchBanGeocoder,
1502
- jn as IFCLoader,
1503
- $n as OpenLayersMinimap,
1504
- Hn as PLYLoader,
1505
- Rn as PostProcessEntities,
1506
- Vn as PotreeLoader,
1507
- Un as Tour
2208
+ vi as all,
2209
+ hi as analysis,
2210
+ gi as loaders,
2211
+ bi as misc,
2212
+ yi as search
1508
2213
  };
1509
2214
  //# sourceMappingURL=modules.es.js.map