@ifc-lite/viewer 1.23.0 → 1.25.0

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 (109) hide show
  1. package/.turbo/turbo-build.log +34 -31
  2. package/CHANGELOG.md +96 -0
  3. package/dist/assets/{basketViewActivator-Dn_bHUl2.js → basketViewActivator-CU8_toGq.js} +7 -7
  4. package/dist/assets/{bcf-B9SFl84i.js → bcf-DXGDhw56.js} +23 -23
  5. package/dist/assets/{deflate-yMpdCIqk.js → deflate-Bb1_H2Yf.js} +1 -1
  6. package/dist/assets/{exporters-D-BvrNIg.js → exporters-DZhLN0ux.js} +1861 -1658
  7. package/dist/assets/geometry-controller.worker-DQOSYqtw.js +7 -0
  8. package/dist/assets/geometry.worker-B62e03Ao.js +1 -0
  9. package/dist/assets/{geotiff-D1tvcDCb.js → geotiff-y0ZxbRJd.js} +10 -10
  10. package/dist/assets/{ids-DZLs0snJ.js → ids-DruUNtfD.js} +4 -4
  11. package/dist/assets/ifc-lite-Ch2T9pP9.js +7 -0
  12. package/dist/assets/{ifc-lite_bg-DyHX37GQ.wasm → ifc-lite_bg-D7O1WHgP.wasm} +0 -0
  13. package/dist/assets/{ifc-lite_bg-BIryVCXQ.wasm → ifc-lite_bg-iH_07wf8.wasm} +0 -0
  14. package/dist/assets/index-Bws3UAkj.css +1 -0
  15. package/dist/assets/{index-CXSBhkcJ.js → index-Dr88ZlSY.js} +64100 -47030
  16. package/dist/assets/{jpeg-DUMcZp24.js → jpeg-B3_loqFe.js} +1 -1
  17. package/dist/assets/lens-PYsLu_MA.js +1 -0
  18. package/dist/assets/{lerc-IN4uWojP.js → lerc-nkwS8ZUe.js} +1 -1
  19. package/dist/assets/{lzw-Cnw0hH-m.js → lzw-D3cW5Wpg.js} +1 -1
  20. package/dist/assets/{native-bridge-BVf2uzoH.js → native-bridge-BcYJooq8.js} +2 -2
  21. package/dist/assets/{packbits-BskJCwk0.js → packbits-DDN4xzB5.js} +1 -1
  22. package/dist/assets/{parser.worker-BdtkkaGf.js → parser.worker-BW1IMUed.js} +3 -3
  23. package/dist/assets/raw-CoIXstQ-.js +1 -0
  24. package/dist/assets/{sandbox-VLI_y7cl.js → sandbox-DETNEyQb.js} +498 -470
  25. package/dist/assets/{server-client-BLcKaWQB.js → server-client-CmzJOeS7.js} +1 -1
  26. package/dist/assets/{wasm-bridge-BAfZh7YT.js → wasm-bridge-CT7mK9W0.js} +1 -1
  27. package/dist/assets/{webimage-Db2xzze3.js → webimage-CBjgg4up.js} +1 -1
  28. package/dist/assets/{workerHelpers--sAYm9yN.js → workerHelpers-IEQDo8r3.js} +1 -1
  29. package/dist/assets/{zstd-BDToOQyD.js → zstd-C8oQ6qdS.js} +1 -1
  30. package/dist/index.html +8 -8
  31. package/package.json +11 -9
  32. package/src/App.tsx +5 -2
  33. package/src/components/extensions/AuditLogPanel.tsx +259 -0
  34. package/src/components/extensions/BundlePreview.tsx +102 -0
  35. package/src/components/extensions/CapabilityReview.tsx +333 -0
  36. package/src/components/extensions/ExtensionDockHost.tsx +192 -0
  37. package/src/components/extensions/ExtensionToolbarSlot.tsx +106 -0
  38. package/src/components/extensions/ExtensionsPanel.tsx +481 -0
  39. package/src/components/extensions/FlavorDialog.tsx +398 -0
  40. package/src/components/extensions/FlavorImportPreview.tsx +79 -0
  41. package/src/components/extensions/FlavorIndicator.tsx +81 -0
  42. package/src/components/extensions/FlavorListView.tsx +318 -0
  43. package/src/components/extensions/FlavorMergeDialog.tsx +326 -0
  44. package/src/components/extensions/HelpHint.tsx +182 -0
  45. package/src/components/extensions/IdeasPanel.tsx +344 -0
  46. package/src/components/extensions/PlanCard.tsx +227 -0
  47. package/src/components/extensions/PrivacyPanel.tsx +312 -0
  48. package/src/components/extensions/PromoteToolDialog.tsx +313 -0
  49. package/src/components/extensions/RepairQueuePanel.tsx +222 -0
  50. package/src/components/extensions/icon-registry.ts +92 -0
  51. package/src/components/extensions/toast-helpers.ts +49 -0
  52. package/src/components/extensions/widget/WidgetErrorBoundary.tsx +62 -0
  53. package/src/components/extensions/widget/WidgetRenderer.tsx +428 -0
  54. package/src/components/viewer/ChatPanel.tsx +251 -3
  55. package/src/components/viewer/CommandPalette.tsx +74 -4
  56. package/src/components/viewer/Drawing2DCanvas.tsx +178 -1
  57. package/src/components/viewer/EntityContextMenu.tsx +70 -0
  58. package/src/components/viewer/ExportDialog.tsx +9 -1
  59. package/src/components/viewer/KeyboardShortcutsDialog.tsx +21 -6
  60. package/src/components/viewer/LensPanel.tsx +50 -0
  61. package/src/components/viewer/MainToolbar.tsx +170 -87
  62. package/src/components/viewer/ScriptPanel.tsx +105 -1
  63. package/src/components/viewer/Section2DPanel.tsx +58 -2
  64. package/src/components/viewer/StatusBar.tsx +18 -0
  65. package/src/components/viewer/ViewerLayout.tsx +53 -4
  66. package/src/components/viewer/Viewport.tsx +72 -0
  67. package/src/hooks/useActionLogger.test.ts +161 -0
  68. package/src/hooks/useActionLogger.ts +141 -0
  69. package/src/hooks/useForkExtension.ts +51 -0
  70. package/src/hooks/useIfcFederation.ts +7 -1
  71. package/src/hooks/useInstalledExtensions.ts +43 -0
  72. package/src/hooks/usePrivacyDisclosure.ts +48 -0
  73. package/src/hooks/useRunExtensionTests.ts +67 -0
  74. package/src/hooks/useSlotContributions.ts +38 -0
  75. package/src/hooks/useSymbolicAnnotations.test.ts +124 -0
  76. package/src/hooks/useSymbolicAnnotations.ts +776 -0
  77. package/src/lib/desktop-product.ts +7 -1
  78. package/src/lib/lens/adapter.ts +14 -0
  79. package/src/lib/llm/prompt-cache.ts +77 -0
  80. package/src/lib/llm/stream-client.ts +20 -2
  81. package/src/lib/llm/stream-direct.ts +11 -1
  82. package/src/lib/llm/system-prompt.ts +42 -0
  83. package/src/lib/safe-mode.ts +30 -0
  84. package/src/sdk/ExtensionHostProvider.tsx +103 -0
  85. package/src/services/extensions/flavor-service.ts +183 -0
  86. package/src/services/extensions/host-commands.ts +112 -0
  87. package/src/services/extensions/host-installer.ts +289 -0
  88. package/src/services/extensions/host.ts +514 -0
  89. package/src/services/extensions/idb-flavor-storage.test.ts +140 -0
  90. package/src/services/extensions/idb-flavor-storage.ts +241 -0
  91. package/src/services/extensions/idb-log-storage.test.ts +110 -0
  92. package/src/services/extensions/idb-log-storage.ts +171 -0
  93. package/src/services/extensions/idb-storage.ts +228 -0
  94. package/src/services/extensions/runtime-errors.ts +26 -0
  95. package/src/services/extensions/sandbox-factory.ts +217 -0
  96. package/src/store/constants.ts +48 -6
  97. package/src/store/index.ts +6 -1
  98. package/src/store/slices/drawing2DSlice.ts +8 -0
  99. package/src/store/slices/extensionsSlice.ts +90 -0
  100. package/src/store/slices/lensSlice.ts +28 -0
  101. package/src/store/slices/visibilitySlice.test.ts +6 -0
  102. package/src/store/slices/visibilitySlice.ts +17 -8
  103. package/src/store/types.ts +2 -0
  104. package/dist/assets/geometry-controller.worker-Cm5pvyR6.js +0 -7
  105. package/dist/assets/geometry.worker-ClNvXIrj.js +0 -1
  106. package/dist/assets/ifc-lite-BDg0iIbj.js +0 -7
  107. package/dist/assets/index-DS_xJQfP.css +0 -1
  108. package/dist/assets/lens-CpjUdqpw.js +0 -1
  109. package/dist/assets/raw-DzTtEZIY.js +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > @ifc-lite/viewer@1.23.0 build /home/runner/work/ifc-lite/ifc-lite/apps/viewer
2
+ > @ifc-lite/viewer@1.25.0 build /home/runner/work/ifc-lite/ifc-lite/apps/viewer
3
3
  > vite build
4
4
 
5
5
  vite v7.3.3 building client environment for production...
@@ -17,16 +17,19 @@ transforming...
17
17
  [plugin vite:resolve] Module "node:fs" has been externalized for browser compatibility, imported by "/home/runner/work/ifc-lite/ifc-lite/node_modules/.pnpm/@anthropic-ai+sdk@0.96.0/node_modules/@anthropic-ai/sdk/core/credentials.mjs". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
18
18
  [plugin vite:resolve] Module "node:path" has been externalized for browser compatibility, imported by "/home/runner/work/ifc-lite/ifc-lite/node_modules/.pnpm/@anthropic-ai+sdk@0.96.0/node_modules/@anthropic-ai/sdk/core/credentials.mjs". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
19
19
  [plugin vite:resolve] Module "node:fs" has been externalized for browser compatibility, imported by "/home/runner/work/ifc-lite/ifc-lite/node_modules/.pnpm/@anthropic-ai+sdk@0.96.0/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
20
- ✓ 4866 modules transformed.
20
+ ✓ 4999 modules transformed.
21
21
  rendering chunks...
22
22
  [plugin vite:reporter]
23
+ (!) /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/store.ts is dynamically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/extensions/host.ts but also statically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/ExtensionDockHost.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/ExtensionToolbarSlot.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/ExtensionsPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/FlavorDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/IdeasPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/PrivacyPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/RepairQueuePanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/AddElementPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/BCFPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/BasepointOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/BasketPresentationDock.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/BulkPropertyEditor.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/CesiumOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/CesiumPlacementEditor.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ChatPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/CommandPalette.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/DataConnector.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/DesktopEntitlementBanner.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/DeviationPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/DrawingSettingsPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/EntityContextMenu.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ExportChangesButton.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ExportDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/GLBExportDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/GeometryEditCard.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/HierarchyPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/HoverTooltip.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/LensPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MainToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MergeLayersBanner.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MobileToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/PointCloudClasses.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/PointCloudPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/PropertiesPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/PropertyEditor.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ScriptPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SearchInline.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SearchModal.filter.builder.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SearchModal.filter.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SearchModal.text.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SearchModal.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/Section2DPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SettingsPage.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SheetSetupPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/StatusBar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ThemeSwitch.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/TitleBlockEditor.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ToolOverlays.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ViewerLayout.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/Viewport.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ViewportContainer.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ViewportOverlays.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/annotations/AnnotationLayer.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/bcf/BCFOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/chat/ExecutableCodeBlock.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/chat/ModelSelector.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/hierarchy/treeDataBuilder.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/hierarchy/useHierarchyTree.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/lists/ListPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/lists/ListResultsTable.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/BsddCard.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/FederationAlignmentControls.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/GeoreferencingPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/RawStepCard.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/RawStepRow.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/TaskEditCard.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/AnimationSettingsPopover.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/GanttPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/GanttTimeline.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/GanttToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/GenerateScheduleDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/schedule-utils.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/useConstructionSequence.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/useGanttBarDrag.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/useGanttSelection3DHighlight.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/useOverlayCompositor.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/selectionHandlers.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/AddElementOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/GizmoOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/MeasurePanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SectionCapControls.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SectionPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SectionVisualization.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SplitNumericInput.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SplitOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/WallEndpointOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/useDuplicateShortcut.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/useMouseControls.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/usePointCloudLifecycle.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/usePointCloudSync.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/useRenderUpdates.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useActionLogger.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useBCF.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useDrawingGeneration.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useFloorplanView.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useForkExtension.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIDS.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfc.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcCache.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcFederation.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcServer.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useKeyboardShortcuts.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useLens.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useLensDiscovery.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useLevelDisplayEffect.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useModelSelection.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useSearchIndex.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useSymbolicAnnotations.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useViewerSelectors.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/lib/llm/context-builder.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/desktop-export.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/utils/loadingUtils.ts, dynamic import will not move module into another chunk.
24
+ 
25
+ [plugin vite:reporter]
23
26
  (!) /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/utils/ifcConfig.ts is dynamically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/utils/acquireFileBuffer.ts but also statically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcFederation.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcServer.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/cacheService.ts, dynamic import will not move module into another chunk.
24
27
  
25
28
  [plugin vite:reporter]
26
29
  (!) /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/desktop-cache.ts is dynamically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcLoader.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/cacheService.ts but also statically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/desktop-native-metadata.ts, dynamic import will not move module into another chunk.
27
30
  
28
31
  [plugin vite:reporter]
29
- (!) /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/ui/toast.tsx is dynamically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useKeyboardShortcuts.ts but also statically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/App.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/AddElementPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/CesiumPlacementEditor.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ChatPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/EntityContextMenu.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ExportChangesButton.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ExportDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/GLBExportDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/GeometryEditCard.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MainToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MobileToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ScriptPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SettingsPage.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ViewportContainer.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/chat/ByokKeyModal.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/FederationAlignmentControls.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/GeoreferencingPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/GanttToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/selectionHandlers.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SplitNumericInput.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/useDuplicateShortcut.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcFederation.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/desktop-export.ts, dynamic import will not move module into another chunk.
32
+ (!) /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/ui/toast.tsx is dynamically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useKeyboardShortcuts.ts but also statically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/App.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/AuditLogPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/BundlePreview.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/ExtensionDockHost.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/ExtensionToolbarSlot.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/ExtensionsPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/FlavorDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/FlavorMergeDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/IdeasPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/PrivacyPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/PromoteToolDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/extensions/RepairQueuePanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/AddElementPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/CesiumPlacementEditor.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ChatPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/CommandPalette.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/EntityContextMenu.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ExportChangesButton.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ExportDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/GLBExportDialog.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/GeometryEditCard.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MainToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/MobileToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ScriptPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/SettingsPage.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/ViewportContainer.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/chat/ByokKeyModal.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/FederationAlignmentControls.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/properties/GeoreferencingPanel.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/schedule/GanttToolbar.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/selectionHandlers.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/SplitNumericInput.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/useDuplicateShortcut.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useForkExtension.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useIfcFederation.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/usePrivacyDisclosure.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useRunExtensionTests.ts, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/sdk/ExtensionHostProvider.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/services/desktop-export.ts, dynamic import will not move module into another chunk.
30
33
  
31
34
  [plugin vite:reporter]
32
35
  (!) /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/selectionHandlers.ts is dynamically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/hooks/useKeyboardShortcuts.ts but also statically imported by /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/tools/WallEndpointOverlay.tsx, /home/runner/work/ifc-lite/ifc-lite/apps/viewer/src/components/viewer/useMouseControls.ts, dynamic import will not move module into another chunk.
@@ -34,7 +37,7 @@ rendering chunks...
34
37
  computing gzip size...
35
38
  [vite-plugin-static-copy] Copied 389 items.
36
39
  dist/assets/laz-perf-DgUOSLeU.js  0.06 kB
37
- dist/assets/workerHelpers--sAYm9yN.js  1.21 kB
40
+ dist/assets/workerHelpers-IEQDo8r3.js  1.21 kB
38
41
  dist/assets/las-source-C_IGrgRq.js  2.40 kB
39
42
  dist/assets/las-BW6LIc_j.js  3.08 kB
40
43
  dist/index.html  3.65 kB │ gzip: 1.24 kB
@@ -44,65 +47,65 @@ computing gzip size...
44
47
  dist/assets/ply-source-C8jjyzxE.js  6.77 kB
45
48
  dist/assets/pcd-source-Ck0UnVDn.js  7.31 kB
46
49
  dist/assets/e57-source-CQHxE8n3.js  13.46 kB
47
- dist/assets/ifc-lite-BDg0iIbj.js  47.03 kB
48
- dist/assets/geometry.worker-ClNvXIrj.js  47.46 kB
49
- dist/assets/geometry-controller.worker-Cm5pvyR6.js  52.71 kB
50
+ dist/assets/ifc-lite-Ch2T9pP9.js  51.83 kB
51
+ dist/assets/geometry.worker-B62e03Ao.js  52.22 kB
50
52
  dist/assets/index-DMho-JA0.js  53.15 kB
53
+ dist/assets/geometry-controller.worker-DQOSYqtw.js  57.51 kB
51
54
  dist/assets/laz-perf-CFJp03W6.wasm  214.35 kB │ gzip: 73.76 kB
52
55
  dist/assets/emscripten-module-uFzwHH0Y.wasm  503.13 kB │ gzip: 234.04 kB
53
- dist/assets/parser.worker-BdtkkaGf.js  938.13 kB
56
+ dist/assets/parser.worker-BW1IMUed.js  942.89 kB
54
57
  dist/assets/emscripten-module-B1g2L2eS.wasm  1,027.52 kB │ gzip: 364.87 kB
55
58
  dist/assets/emscripten-module-ZrHFMo7O.wasm  1,218.63 kB │ gzip: 456.85 kB
56
- dist/assets/ifc-lite_bg-DyHX37GQ.wasm  1,412.93 kB │ gzip: 510.81 kB
57
- dist/assets/ifc-lite_bg-BIryVCXQ.wasm  1,473.79 kB │ gzip: 531.99 kB
59
+ dist/assets/ifc-lite_bg-D7O1WHgP.wasm  1,448.20 kB │ gzip: 521.92 kB
60
+ dist/assets/ifc-lite_bg-iH_07wf8.wasm  1,508.69 kB │ gzip: 544.04 kB
58
61
  dist/assets/emscripten-module-DHbYPfAp.wasm  1,510.75 kB │ gzip: 497.65 kB
59
62
  dist/assets/arrow2_bg-4Y7xYo54.wasm  5,000.39 kB │ gzip: 1,544.22 kB
60
63
  dist/assets/parquet_wasm_bg-DcKVfvto.wasm  6,626.29 kB │ gzip: 1,944.12 kB
61
64
  dist/assets/esbuild-CzsZLPr0.wasm 13,918.74 kB │ gzip: 3,765.48 kB
62
65
  dist/assets/cesium-ADbP7waU.css  24.30 kB │ gzip: 5.49 kB
63
- dist/assets/index-DS_xJQfP.css  255.53 kB │ gzip: 36.98 kB
66
+ dist/assets/index-Bws3UAkj.css  258.08 kB │ gzip: 37.31 kB
64
67
  dist/assets/__vite-browser-external-B1O5LaIO.js  0.03 kB │ gzip: 0.05 kB
65
68
  dist/assets/inline-worker-BpBzlmd6.js  0.05 kB │ gzip: 0.07 kB
66
69
  dist/assets/tauri-dialog-stub-r7Wksg7o.js  0.05 kB │ gzip: 0.07 kB
67
70
  dist/assets/esbuild-FgU11_Eg.js  0.06 kB │ gzip: 0.08 kB
68
71
  dist/assets/tauri-core-stub-D8Fa-u43.js  0.11 kB │ gzip: 0.12 kB
69
72
  dist/assets/tauri-fs-stub-BdeRC7aK.js  0.13 kB │ gzip: 0.13 kB
70
- dist/assets/raw-DzTtEZIY.js  0.21 kB │ gzip: 0.18 kB
71
- dist/assets/deflate-yMpdCIqk.js  0.28 kB │ gzip: 0.22 kB
72
- dist/assets/packbits-BskJCwk0.js  0.45 kB │ gzip: 0.32 kB
73
- dist/assets/webimage-Db2xzze3.js  1.06 kB │ gzip: 0.60 kB
73
+ dist/assets/raw-CoIXstQ-.js  0.21 kB │ gzip: 0.18 kB
74
+ dist/assets/deflate-Bb1_H2Yf.js  0.28 kB │ gzip: 0.22 kB
75
+ dist/assets/packbits-DDN4xzB5.js  0.45 kB │ gzip: 0.32 kB
76
+ dist/assets/webimage-CBjgg4up.js  1.06 kB │ gzip: 0.60 kB
74
77
  dist/assets/event-B0kAzHa-.js  1.49 kB │ gzip: 0.68 kB
75
- dist/assets/lzw-Cnw0hH-m.js  1.60 kB │ gzip: 0.91 kB
76
- dist/assets/wasm-bridge-BAfZh7YT.js  1.60 kB │ gzip: 0.77 kB
77
- dist/assets/basketViewActivator-Dn_bHUl2.js  2.28 kB │ gzip: 0.79 kB
78
+ dist/assets/lzw-D3cW5Wpg.js  1.60 kB │ gzip: 0.91 kB
79
+ dist/assets/wasm-bridge-CT7mK9W0.js  1.60 kB │ gzip: 0.77 kB
80
+ dist/assets/basketViewActivator-CU8_toGq.js  2.28 kB │ gzip: 0.79 kB
78
81
  dist/assets/ifc-cache-BAN4vcd4.js  2.77 kB │ gzip: 0.94 kB
79
82
  dist/assets/ffi-Boa1QuFa.js  6.32 kB │ gzip: 1.00 kB
80
- dist/assets/lens-CpjUdqpw.js  9.07 kB │ gzip: 2.81 kB
81
83
  dist/assets/emscripten-module.browser-BLJD5hhE.js  9.16 kB │ gzip: 4.19 kB
82
- dist/assets/jpeg-DUMcZp24.js  11.28 kB │ gzip: 4.27 kB
83
- dist/assets/native-bridge-BVf2uzoH.js  18.61 kB │ gzip: 3.76 kB
84
+ dist/assets/lens-PYsLu_MA.js  9.37 kB │ gzip: 2.91 kB
85
+ dist/assets/jpeg-B3_loqFe.js  11.28 kB │ gzip: 4.27 kB
86
+ dist/assets/native-bridge-BcYJooq8.js  18.61 kB │ gzip: 3.76 kB
84
87
  dist/assets/pako.esm-Cram60i4.js  21.58 kB │ gzip: 7.64 kB
85
88
  dist/assets/parquet-CEXmQNRO.js  29.67 kB │ gzip: 6.89 kB
86
- dist/assets/server-client-BLcKaWQB.js  31.43 kB │ gzip: 7.06 kB
87
- dist/assets/bcf-B9SFl84i.js  37.74 kB │ gzip: 11.37 kB
89
+ dist/assets/server-client-CmzJOeS7.js  31.43 kB │ gzip: 7.06 kB
90
+ dist/assets/bcf-DXGDhw56.js  37.89 kB │ gzip: 11.39 kB
88
91
  dist/assets/browser-DXS29_v9.js  70.26 kB │ gzip: 19.95 kB
89
92
  dist/assets/drawing-2d-C71b8Ugx.js  71.89 kB │ gzip: 21.08 kB
90
- dist/assets/zstd-BDToOQyD.js  81.19 kB │ gzip: 32.35 kB
93
+ dist/assets/zstd-C8oQ6qdS.js  81.19 kB │ gzip: 32.34 kB
91
94
  dist/assets/zip-BJqVbRkU.js  96.95 kB │ gzip: 29.94 kB
92
- dist/assets/lerc-IN4uWojP.js  97.20 kB │ gzip: 37.62 kB
93
- dist/assets/ids-DZLs0snJ.js  164.18 kB │ gzip: 29.22 kB
95
+ dist/assets/lerc-nkwS8ZUe.js  97.20 kB │ gzip: 37.62 kB
96
+ dist/assets/ids-DruUNtfD.js  164.18 kB │ gzip: 29.22 kB
94
97
  dist/assets/arrow-CXWhTnNT.js  208.86 kB │ gzip: 50.09 kB
95
- dist/assets/exporters-D-BvrNIg.js  233.91 kB │ gzip: 41.19 kB
96
- dist/assets/geotiff-D1tvcDCb.js  366.67 kB │ gzip: 118.41 kB
98
+ dist/assets/exporters-DZhLN0ux.js  241.36 kB │ gzip: 41.62 kB
99
+ dist/assets/geotiff-y0ZxbRJd.js  366.67 kB │ gzip: 118.40 kB
97
100
  dist/assets/three-CQBzFWY2.js  534.00 kB │ gzip: 133.77 kB
98
101
  dist/assets/maplibre-gl-Do6O5tDc.js  1,053.34 kB │ gzip: 284.74 kB
99
102
  dist/assets/epsg-index.generated-BjJrt_0S.js  4,295.95 kB │ gzip: 440.44 kB
100
103
  dist/assets/cesium-BoVuJvTC.js  4,778.78 kB │ gzip: 1,320.18 kB
101
- dist/assets/index-CXSBhkcJ.js  6,764.49 kB │ gzip: 1,220.09 kB
102
- dist/assets/sandbox-VLI_y7cl.js  8,485.01 kB │ gzip: 512.34 kB
104
+ dist/assets/index-Dr88ZlSY.js  7,493.78 kB │ gzip: 1,360.36 kB
105
+ dist/assets/sandbox-DETNEyQb.js  8,486.06 kB │ gzip: 512.61 kB
103
106
  
104
107
  (!) Some chunks are larger than 6000 kB after minification. Consider:
105
108
  - Using dynamic import() to code-split the application
106
109
  - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
107
110
  - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
108
- ✓ built in 1m 16s
111
+ ✓ built in 1m 17s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # @ifc-lite/viewer
2
2
 
3
+ ## 1.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#815](https://github.com/LTplus-AG/ifc-lite/pull/815) [`bc1a85d`](https://github.com/LTplus-AG/ifc-lite/commit/bc1a85dd532386774bcc76025de06b4fcf493937) Thanks [@louistrue](https://github.com/louistrue)! - Make IFC annotation overlays usable in real drawings (issue [#812](https://github.com/LTplus-AG/ifc-lite/issues/812) follow-up
8
+ to the annotation text feature):
9
+
10
+ - **3D z-fight fix**: annotation lines, fills, and text pipelines now apply
11
+ a reverse-Z `depthBias` / `depthBiasSlopeScale` so a label drawn exactly
12
+ on a wall/floor face no longer disappears or strobes. This was the user-
13
+ reported "coplanar glitch" — the per-fragment depth-equal pass plus MSAA
14
+ jitter was the actual cause, not line weight. The pipelines remain
15
+ `depthCompare: 'greater-equal'` so foreground geometry still occludes the
16
+ overlay correctly.
17
+
18
+ - **Annotations in 2D section views**: the Section 2D panel now overlays
19
+ IfcAnnotation curves, text, and fills on the section drawing when their
20
+ authored storey elevation falls inside the cut's view-range on the cut
21
+ axis. New `showIfcAnnotations` flag on `drawing2DDisplayOptions` (defaults
22
+ on) and a header toggle (Tag icon, next to Symbolic-vs-Cut) wire it up.
23
+ The toggle is currently active only for floor-plan views (`axis='down'`);
24
+ elevation/section axes need a separate coord-reorientation pass and are
25
+ disabled in the UI.
26
+
27
+ The 2D path reuses the existing module-global parse cache from
28
+ `useSymbolicAnnotations`, so the WASM symbolic-representation parse runs
29
+ at most once per loaded model regardless of how many overlay surfaces are
30
+ active.
31
+
32
+ ### Patch Changes
33
+
34
+ - [#827](https://github.com/LTplus-AG/ifc-lite/pull/827) [`4c87791`](https://github.com/LTplus-AG/ifc-lite/commit/4c87791aa17780ec7d3f007dddf841d5606c5cdc) Thanks [@louistrue](https://github.com/louistrue)! - Address CodeRabbit feedback from PR [#823](https://github.com/LTplus-AG/ifc-lite/issues/823):
35
+
36
+ - Auto-populate `modelId` in the Lens rule editor when exactly one federated model is loaded, so the single-model branch (which hides the selector) no longer leaves the rule permanently invalid.
37
+ - Fix a `ReferenceError` in `scripts/fetch-prebuilt-wasm.mjs` by routing both prebuilt-fetch and source-build flows through a shared `scripts/lib/patch-threaded-stub.mjs` helper that imports `writeFileSync` and uses a regex anchored on the default export (resilient to wasm-bindgen formatting changes).
38
+ - Refresh the stale build-command reference in `@ifc-lite/wasm-threaded`'s package description.
39
+
40
+ Closes [#824](https://github.com/LTplus-AG/ifc-lite/issues/824).
41
+
42
+ - Updated dependencies [[`8b48495`](https://github.com/LTplus-AG/ifc-lite/commit/8b48495bc65c8ca778c3b60f271108f641fafe02), [`78f1d10`](https://github.com/LTplus-AG/ifc-lite/commit/78f1d10aab812da682962845638daa95b86ae178), [`bc1a85d`](https://github.com/LTplus-AG/ifc-lite/commit/bc1a85dd532386774bcc76025de06b4fcf493937), [`bdb9978`](https://github.com/LTplus-AG/ifc-lite/commit/bdb997842fe38627fefbcddf250fc0136289bc84), [`a72c8d9`](https://github.com/LTplus-AG/ifc-lite/commit/a72c8d9d71da428cec6453e60c650c6cb296007c), [`ee6dbae`](https://github.com/LTplus-AG/ifc-lite/commit/ee6dbaedcc205b08728fa3e235bc3028d32b65e3), [`bc1a85d`](https://github.com/LTplus-AG/ifc-lite/commit/bc1a85dd532386774bcc76025de06b4fcf493937)]:
43
+ - @ifc-lite/bcf@1.15.4
44
+ - @ifc-lite/cache@1.14.7
45
+ - @ifc-lite/export@1.19.2
46
+ - @ifc-lite/renderer@1.22.1
47
+ - @ifc-lite/wasm@1.19.1
48
+ - @ifc-lite/parser@2.4.2
49
+ - @ifc-lite/lens@1.15.0
50
+ - @ifc-lite/ids@1.15.3
51
+
52
+ ## 1.24.0
53
+
54
+ ### Minor Changes
55
+
56
+ - [#659](https://github.com/LTplus-AG/ifc-lite/pull/659) [`f209e34`](https://github.com/LTplus-AG/ifc-lite/commit/f209e342c306041ea045bc108595676efa671eec) Thanks [@louistrue](https://github.com/louistrue)! - Render IfcAnnotation 2D representations as a 3D drawing-layer overlay
57
+ (closes [#653](https://github.com/LTplus-AG/ifc-lite/issues/653)). Implements the BIMVision-style "model + annotations =
58
+ engineering drawing" effect described by the OP.
59
+
60
+ What's covered:
61
+
62
+ - **Rust WASM**: new `SymbolicText` and `SymbolicFillArea` types
63
+ carried alongside the existing symbolic polyline output. The parser
64
+ walks `IfcTextLiteralWithExtent.Placement` and
65
+ `IfcAnnotationFillArea.OuterBoundary`/`InnerBoundaries` (across
66
+ `IfcPolyline` and `IfcIndexedPolyCurve`).
67
+ - **TS hook**: `useSymbolicAnnotationsRichData()` returns 3D-lifted
68
+ texts + fills with per-storey resolution. Module-level parse cache
69
+ is now keyed on `byteLength + FNV-1a fingerprints of head/mid/tail`,
70
+ so federated views with same-size IFCs no longer alias each other.
71
+ Storey elevation handling distinguishes "no authored elevation"
72
+ from "elevation = 0.0" (the previous sentinel collapsed both to
73
+ the fallback Y).
74
+ - **Renderer**: two new WebGPU pipelines — `SymbolicFillPipeline`
75
+ (ear-clipping triangulation with rightmost-vertex bridge-edge
76
+ hole stitching, premultiplied-alpha blend) and
77
+ `SymbolicTextPipeline` (Canvas2D glyph atlas → instanced WebGPU
78
+ quads). Both declare matching MSAA sample count + the 2-color-
79
+ target attachment shape used by the main render pass, and run with
80
+ reverse-Z `greater-equal` depth compare so they composite correctly
81
+ against the scene.
82
+ - **Viewport wiring**: `Viewport.tsx` calls the new hook unconditionally
83
+ whenever the user enables the IFC Annotations toggle — no section-
84
+ plane gating, since annotations are a free-floating drawing layer.
85
+
86
+ Deferred (no behaviour change, follow-up):
87
+
88
+ - `IfcStyledItem` → `IfcFillAreaStyleHatching` resolution. The parser
89
+ stubs in a default opaque dark-grey solid fill; the renderer is
90
+ ready to consume a hatch style once the styled-item index lands.
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [[`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`8b22fc0`](https://github.com/LTplus-AG/ifc-lite/commit/8b22fc048da4fa94abbb5298aa509d90ab53cb2d), [`f209e34`](https://github.com/LTplus-AG/ifc-lite/commit/f209e342c306041ea045bc108595676efa671eec)]:
95
+ - @ifc-lite/extensions@0.2.0
96
+ - @ifc-lite/renderer@1.22.0
97
+ - @ifc-lite/wasm@1.19.0
98
+
3
99
  ## 1.23.0
4
100
 
5
101
  ### Minor Changes
@@ -1,13 +1,13 @@
1
- import { u as o, __tla as __tla_0 } from "./index-CXSBhkcJ.js";
1
+ import { u as o, __tla as __tla_0 } from "./index-Dr88ZlSY.js";
2
2
  import "./zip-BJqVbRkU.js";
3
3
  import "./arrow-CXWhTnNT.js";
4
- import { __tla as __tla_1 } from "./sandbox-VLI_y7cl.js";
5
- import "./lens-CpjUdqpw.js";
6
- import { __tla as __tla_2 } from "./exporters-D-BvrNIg.js";
4
+ import { __tla as __tla_1 } from "./sandbox-DETNEyQb.js";
5
+ import "./lens-PYsLu_MA.js";
6
+ import { __tla as __tla_2 } from "./exporters-DZhLN0ux.js";
7
7
  import "./drawing-2d-C71b8Ugx.js";
8
- import "./bcf-B9SFl84i.js";
9
- import { __tla as __tla_3 } from "./server-client-BLcKaWQB.js";
10
- import { __tla as __tla_4 } from "./ids-DZLs0snJ.js";
8
+ import "./bcf-DXGDhw56.js";
9
+ import { __tla as __tla_3 } from "./server-client-CmzJOeS7.js";
10
+ import { __tla as __tla_4 } from "./ids-DruUNtfD.js";
11
11
  import "./three-CQBzFWY2.js";
12
12
  let v;
13
13
  let __tla = Promise.all([
@@ -1,4 +1,4 @@
1
- import{J as X}from"./zip-BJqVbRkU.js";import{ae as C}from"./sandbox-VLI_y7cl.js";async function te(t){const e=await X.loadAsync(t),i=await Q(e),{projectId:o,name:n,extensions:s}=await tt(e),c=await et(e);return{version:i.versionId,projectId:o,name:n,topics:c,extensions:s}}async function Q(t){const e=t.file("bcf.version");if(!e)throw new Error("Invalid BCF file: missing bcf.version");const o=(await e.async("string")).match(/VersionId="([^"]+)"/);if(!o)throw new Error("Invalid BCF version file: could not parse VersionId");const n=o[1];return n!=="2.1"&&n!=="3.0"&&console.warn(`Unsupported BCF version: ${n}, treating as 2.1`),{versionId:n==="3.0"?"3.0":"2.1",detailedVersion:o[1]}}async function tt(t){const e=t.file("project.bcfp");if(!e)return{};const i=await e.async("string"),o=i.match(/ProjectId="([^"]+)"/),n=i.match(/<Name>([^<]+)<\/Name>/);return{projectId:o?.[1],name:n?.[1]}}async function et(t){const e=new Map,i=new Set;t.forEach(o=>{const n=o.match(/^([^/]+)\/markup\.bcf$/i);n&&i.add(n[1])});for(const o of i)try{const n=await it(t,o);n&&e.set(n.guid,n)}catch(n){console.warn(`Failed to parse topic ${o}:`,n)}return e}async function it(t,e){const i=t.file(`${e}/markup.bcf`);if(!i)return null;const o=await i.async("string"),n=o.match(/<Topic\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Topic>/);if(!n)return console.warn(`Invalid markup.bcf in ${e}: missing Topic element`),null;const s=n[1],c=n[2],r=o.match(/<Topic[^>]*TopicType="([^"]+)"/),a=o.match(/<Topic[^>]*TopicStatus="([^"]+)"/),l=h(c,"Title")||"Untitled",p=h(c,"Description"),f=h(c,"Priority"),m=h(c,"Index"),u=h(c,"CreationDate")||new Date().toISOString(),g=h(c,"CreationAuthor")||"Unknown",d=h(c,"ModifiedDate"),x=h(c,"ModifiedAuthor"),w=h(c,"DueDate"),b=h(c,"AssignedTo"),v=h(c,"Stage"),T=[],q=c.matchAll(/<Labels>([^<]+)<\/Labels>/g);for(const A of q)T.push(A[1]);const H=ot(c),O=nt(c),z=[],W=c.matchAll(/<RelatedTopic\s+Guid="([^"]+)"/g);for(const A of W)z.push(A[1]);const J=st(o),K=await ct(t,e,o);return{guid:s,title:l,description:p,topicType:r?.[1],topicStatus:a?.[1],priority:f,index:m?parseInt(m,10):void 0,creationDate:u,creationAuthor:g,modifiedDate:d,modifiedAuthor:x,dueDate:w,assignedTo:b,stage:v,labels:T.length>0?T:void 0,bimSnippet:H,documentReferences:O.length>0?O:void 0,relatedTopics:z.length>0?z:void 0,comments:J,viewpoints:K}}function h(t,e){return t.match(new RegExp(`<${e}>([^<]*)<\\/${e}>`))?.[1]}function ot(t){const e=t.match(/<BimSnippet\s+SnippetType="([^"]+)"[^>]*>([\s\S]*?)<\/BimSnippet>/);if(!e)return;const i=e[0].match(/isExternal="([^"]+)"/),o=h(e[2],"Reference"),n=h(e[2],"ReferenceSchema");return{snippetType:e[1],isExternal:i?.[1]==="true",reference:o||"",referenceSchema:n}}function nt(t){const e=[],i=t.matchAll(/<DocumentReference[^>]*>([\s\S]*?)<\/DocumentReference>/g);for(const o of i){const n=o[0].match(/Guid="([^"]+)"/),s=o[0].match(/isExternal="([^"]+)"/),c=h(o[1],"ReferencedDocument"),r=h(o[1],"Description");c&&e.push({guid:n?.[1],isExternal:s?.[1]==="true",referencedDocument:c,description:r})}return e}function st(t){const e=[],i=t.matchAll(/<Comment\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Comment>/g);for(const o of i){const n=o[1],s=o[2],c=h(s,"Date")||new Date().toISOString(),r=h(s,"Author")||"Unknown",a=h(s,"Comment")||"",l=h(s,"ModifiedDate"),p=h(s,"ModifiedAuthor"),f=s.match(/<Viewpoint\s+Guid="([^"]+)"/);e.push({guid:n,date:c,author:r,comment:a,viewpointGuid:f?.[1],modifiedDate:l,modifiedAuthor:p})}return e}async function ct(t,e,i){const o=[],n=new Map,s=/<Viewpoint\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Viewpoint>/g;for(const a of i.matchAll(s)){const l=a[1],p=a[2],f=p.match(/<Viewpoint>([^<]+)<\/Viewpoint>/),m=p.match(/<Snapshot>([^<]+)<\/Snapshot>/);n.set(l,{viewpointFile:f?.[1],snapshotFile:m?.[1]})}const c=i.matchAll(/<Viewpoint\s+Guid="([^"]+)"[^>]*\/>/g);for(const a of c)n.has(a[1])||n.set(a[1],{});const r=[];t.forEach(a=>{a.startsWith(`${e}/`)&&a.endsWith(".bcfv")&&r.push(a)});for(const a of r)try{const l=t.file(a);if(!l)continue;const p=await l.async("string"),f=at(p);if(f){const m=n.get(f.guid);let u=null,g="png";if(m?.snapshotFile){const d=`${e}/${m.snapshotFile}`;u=t.file(d),(m.snapshotFile.toLowerCase().endsWith(".jpg")||m.snapshotFile.toLowerCase().endsWith(".jpeg"))&&(g="jpeg")}if(!u){const d=a.replace(".bcfv",""),x=d.replace(/Viewpoint_/i,"Snapshot_"),w=d.replace(/_viewpoint$/i,"_snapshot"),b=[`${x}.png`,`${w}.png`,`${d}.png`,`${e}/snapshot.png`,`${x}.jpg`,`${w}.jpg`,`${d}.jpg`,`${e}/snapshot.jpg`];for(const v of b)if(u=t.file(v),u){(v.toLowerCase().endsWith(".jpg")||v.toLowerCase().endsWith(".jpeg"))&&(g="jpeg");break}}if(u){const d=await u.async("uint8array");f.snapshotData=d,f.snapshot=`data:image/${g};base64,${j(d)}`}o.push(f)}}catch(l){console.warn(`Failed to parse viewpoint ${a}:`,l)}if(o.length===0){const a=t.file(`${e}/snapshot.png`)||t.file(`${e}/snapshot.jpg`);if(a){const l=a.name.toLowerCase().endsWith(".jpg"),p=await a.async("uint8array");o.push({guid:e,snapshot:`data:image/${l?"jpeg":"png"};base64,${j(p)}`,snapshotData:p})}}return o}function at(t){const i=t.match(/<VisualizationInfo[^>]+Guid="([^"]+)"/)?.[1]||crypto.randomUUID?.()||`vp-${Date.now()}`,o=rt(t),n=lt(t),s=pt(t),c=mt(t),r=dt(t),a=ht(t);return{guid:i,perspectiveCamera:o,orthogonalCamera:n,components:s,lines:c.length>0?c:void 0,clippingPlanes:r.length>0?r:void 0,bitmaps:a.length>0?a:void 0}}function rt(t){const e=t.match(/<PerspectiveCamera>([\s\S]*?)<\/PerspectiveCamera>/);if(!e)return;const i=e[1],o=V(i,"CameraViewPoint"),n=P(i,"CameraDirection"),s=P(i,"CameraUpVector"),c=h(i,"FieldOfView");if(!(!o||!n||!s||!c))return{cameraViewPoint:o,cameraDirection:n,cameraUpVector:s,fieldOfView:parseFloat(c)}}function lt(t){const e=t.match(/<OrthogonalCamera>([\s\S]*?)<\/OrthogonalCamera>/);if(!e)return;const i=e[1],o=V(i,"CameraViewPoint"),n=P(i,"CameraDirection"),s=P(i,"CameraUpVector"),c=h(i,"ViewToWorldScale");if(!(!o||!n||!s||!c))return{cameraViewPoint:o,cameraDirection:n,cameraUpVector:s,viewToWorldScale:parseFloat(c)}}function V(t,e){const i=t.match(new RegExp(`<${e}>([\\s\\S]*?)<\\/${e}>`));if(!i)return;const o=h(i[1],"X"),n=h(i[1],"Y"),s=h(i[1],"Z");if(!(o===void 0||n===void 0||s===void 0))return{x:parseFloat(o),y:parseFloat(n),z:parseFloat(s)}}function P(t,e){return V(t,e)}function pt(t){const e=t.match(/<Components>([\s\S]*?)<\/Components>/);if(!e)return;const i=e[1],o=B(i,"Selection"),n=ft(i),s=ut(i);if(!(!o&&!n&&!s))return{selection:o?.length?o:void 0,visibility:n,coloring:s?.length?s:void 0}}function B(t,e){const i=t.match(new RegExp(`<${e}>([\\s\\S]*?)<\\/${e}>`));if(!i)return;const o=[],n=i[1].matchAll(/<Component[^>]*(?:\/>|>[\s\S]*?<\/Component>)/g);for(const s of n){const c=Y(s[0]);c&&o.push(c)}return o.length>0?o:void 0}function Y(t){const e=t.match(/IfcGuid="([^"]+)"/),i=t.match(/AuthoringToolId="([^"]+)"/),o=t.match(/OriginatingSystem="([^"]+)"/);if(!(!e&&!i))return{ifcGuid:e?.[1],authoringToolId:i?.[1],originatingSystem:o?.[1]}}function ft(t){const e=t.match(/<Visibility[^>]*>([\s\S]*?)<\/Visibility>/);if(!e)return;const o=t.match(/DefaultVisibility="([^"]+)"/)?.[1]!=="false",n=B(e[1],"Exceptions");return{defaultVisibility:o,exceptions:n}}function ut(t){const e=t.match(/<Coloring>([\s\S]*?)<\/Coloring>/);if(!e)return;const i=[],o=e[1].matchAll(/<Color\s+Color="([^"]+)"[^>]*>([\s\S]*?)<\/Color>/g);for(const n of o){const s=n[1],c=[],r=n[2].matchAll(/<Component[^>]*(?:\/>|>[\s\S]*?<\/Component>)/g);for(const a of r){const l=Y(a[0]);l&&c.push(l)}c.length>0&&i.push({color:s,components:c})}return i.length>0?i:void 0}function mt(t){const e=[],i=t.match(/<Lines>([\s\S]*?)<\/Lines>/);if(!i)return e;const o=i[1].matchAll(/<Line>([\s\S]*?)<\/Line>/g);for(const n of o){const s=V(n[1],"StartPoint"),c=V(n[1],"EndPoint");s&&c&&e.push({startPoint:s,endPoint:c})}return e}function dt(t){const e=[],i=t.match(/<ClippingPlanes>([\s\S]*?)<\/ClippingPlanes>/);if(!i)return e;const o=i[1].matchAll(/<ClippingPlane>([\s\S]*?)<\/ClippingPlane>/g);for(const n of o){const s=V(n[1],"Location"),c=P(n[1],"Direction");s&&c&&e.push({location:s,direction:c})}return e}function ht(t){const e=[],i=t.match(/<Bitmaps>([\s\S]*?)<\/Bitmaps>/);if(!i)return e;const o=i[1].matchAll(/<Bitmap>([\s\S]*?)<\/Bitmap>/g);for(const n of o){const s=h(n[1],"Format")||h(n[1],"Bitmap"),c=h(n[1],"Reference"),r=V(n[1],"Location"),a=P(n[1],"Normal"),l=P(n[1],"Up"),p=h(n[1],"Height");s&&c&&r&&a&&l&&p&&e.push({format:s.toUpperCase()==="JPG"?"JPG":"PNG",reference:c,location:r,normal:a,up:l,height:parseFloat(p)})}return e}function j(t){let e="";for(let i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return btoa(e)}async function ee(t){const e=new X;gt(e,t.version),(t.projectId||t.name)&&yt(e,t);for(const[i,o]of t.topics)await xt(e,o);return e.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}})}function gt(t,e){const i=`<?xml version="1.0" encoding="UTF-8"?>
1
+ import{J as X}from"./zip-BJqVbRkU.js";import{af as C}from"./sandbox-DETNEyQb.js";async function te(t){const e=await X.loadAsync(t),i=await Q(e),{projectId:o,name:n,extensions:s}=await tt(e),a=await et(e);return{version:i.versionId,projectId:o,name:n,topics:a,extensions:s}}async function Q(t){const e=t.file("bcf.version");if(!e)throw new Error("Invalid BCF file: missing bcf.version");const o=(await e.async("string")).match(/VersionId="([^"]+)"/);if(!o)throw new Error("Invalid BCF version file: could not parse VersionId");const n=o[1];return n!=="2.1"&&n!=="3.0"&&console.warn(`Unsupported BCF version: ${n}, treating as 2.1`),{versionId:n==="3.0"?"3.0":"2.1",detailedVersion:o[1]}}async function tt(t){const e=t.file("project.bcfp");if(!e)return{};const i=await e.async("string"),o=i.match(/ProjectId="([^"]+)"/),n=i.match(/<Name>([^<]+)<\/Name>/);return{projectId:o?.[1],name:n?.[1]}}async function et(t){const e=new Map,i=new Set;t.forEach(o=>{const n=o.match(/^([^/]+)\/markup\.bcf$/i);n&&i.add(n[1])});for(const o of i)try{const n=await it(t,o);n&&e.set(n.guid,n)}catch(n){console.warn(`Failed to parse topic ${o}:`,n)}return e}async function it(t,e){const i=t.file(`${e}/markup.bcf`);if(!i)return null;const o=await i.async("string"),n=o.match(/<Topic\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Topic>/);if(!n)return console.warn(`Invalid markup.bcf in ${e}: missing Topic element`),null;const s=n[1],a=n[2],r=o.match(/<Topic[^>]*TopicType="([^"]+)"/),c=o.match(/<Topic[^>]*TopicStatus="([^"]+)"/),l=h(a,"Title")||"Untitled",p=h(a,"Description"),f=h(a,"Priority"),m=h(a,"Index"),u=h(a,"CreationDate")||new Date().toISOString(),g=h(a,"CreationAuthor")||"Unknown",d=h(a,"ModifiedDate"),x=h(a,"ModifiedAuthor"),w=h(a,"DueDate"),b=h(a,"AssignedTo"),v=h(a,"Stage"),T=[],q=a.matchAll(/<Labels>([^<]+)<\/Labels>/g);for(const A of q)T.push(A[1]);const H=ot(a),O=nt(a),I=[],W=a.matchAll(/<RelatedTopic\s+Guid="([^"]+)"/g);for(const A of W)I.push(A[1]);const J=st(o),K=await at(t,e,o);return{guid:s,title:l,description:p,topicType:r?.[1],topicStatus:c?.[1],priority:f,index:m?parseInt(m,10):void 0,creationDate:u,creationAuthor:g,modifiedDate:d,modifiedAuthor:x,dueDate:w,assignedTo:b,stage:v,labels:T.length>0?T:void 0,bimSnippet:H,documentReferences:O.length>0?O:void 0,relatedTopics:I.length>0?I:void 0,comments:J,viewpoints:K}}function h(t,e){return t.match(new RegExp(`<${e}>([^<]*)<\\/${e}>`))?.[1]}function ot(t){const e=t.match(/<BimSnippet\s+SnippetType="([^"]+)"[^>]*>([\s\S]*?)<\/BimSnippet>/);if(!e)return;const i=e[0].match(/isExternal="([^"]+)"/),o=h(e[2],"Reference"),n=h(e[2],"ReferenceSchema");return{snippetType:e[1],isExternal:i?.[1]==="true",reference:o||"",referenceSchema:n}}function nt(t){const e=[],i=t.matchAll(/<DocumentReference[^>]*>([\s\S]*?)<\/DocumentReference>/g);for(const o of i){const n=o[0].match(/Guid="([^"]+)"/),s=o[0].match(/isExternal="([^"]+)"/),a=h(o[1],"ReferencedDocument"),r=h(o[1],"Description");a&&e.push({guid:n?.[1],isExternal:s?.[1]==="true",referencedDocument:a,description:r})}return e}function st(t){const e=[],i=t.matchAll(/<Comment\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Comment>/g);for(const o of i){const n=o[1],s=o[2],a=h(s,"Date")||new Date().toISOString(),r=h(s,"Author")||"Unknown",c=h(s,"Comment")||"",l=h(s,"ModifiedDate"),p=h(s,"ModifiedAuthor"),f=s.match(/<Viewpoint\s+Guid="([^"]+)"/);e.push({guid:n,date:a,author:r,comment:c,viewpointGuid:f?.[1],modifiedDate:l,modifiedAuthor:p})}return e}async function at(t,e,i){const o=[],n=new Map,s=/<Viewpoint\s+Guid="([^"]+)"[^>]*>([\s\S]*?)<\/Viewpoint>/g;for(const c of i.matchAll(s)){const l=c[1],p=c[2],f=p.match(/<Viewpoint>([^<]+)<\/Viewpoint>/),m=p.match(/<Snapshot>([^<]+)<\/Snapshot>/);n.set(l,{viewpointFile:f?.[1],snapshotFile:m?.[1]})}const a=i.matchAll(/<Viewpoint\s+Guid="([^"]+)"[^>]*\/>/g);for(const c of a)n.has(c[1])||n.set(c[1],{});const r=[];t.forEach(c=>{c.startsWith(`${e}/`)&&c.endsWith(".bcfv")&&r.push(c)});for(const c of r)try{const l=t.file(c);if(!l)continue;const p=await l.async("string"),f=ct(p);if(f){const m=n.get(f.guid);let u=null,g="png";if(m?.snapshotFile){const d=`${e}/${m.snapshotFile}`;u=t.file(d),(m.snapshotFile.toLowerCase().endsWith(".jpg")||m.snapshotFile.toLowerCase().endsWith(".jpeg"))&&(g="jpeg")}if(!u){const d=c.replace(".bcfv",""),x=d.replace(/Viewpoint_/i,"Snapshot_"),w=d.replace(/_viewpoint$/i,"_snapshot"),b=[`${x}.png`,`${w}.png`,`${d}.png`,`${e}/snapshot.png`,`${x}.jpg`,`${w}.jpg`,`${d}.jpg`,`${e}/snapshot.jpg`];for(const v of b)if(u=t.file(v),u){(v.toLowerCase().endsWith(".jpg")||v.toLowerCase().endsWith(".jpeg"))&&(g="jpeg");break}}if(u){const d=await u.async("uint8array");f.snapshotData=d,f.snapshot=`data:image/${g};base64,${U(d)}`}o.push(f)}}catch(l){console.warn(`Failed to parse viewpoint ${c}:`,l)}if(o.length===0){const c=t.file(`${e}/snapshot.png`)||t.file(`${e}/snapshot.jpg`);if(c){const l=c.name.toLowerCase().endsWith(".jpg"),p=await c.async("uint8array");o.push({guid:e,snapshot:`data:image/${l?"jpeg":"png"};base64,${U(p)}`,snapshotData:p})}}return o}function ct(t){const i=t.match(/<VisualizationInfo[^>]+Guid="([^"]+)"/)?.[1]||crypto.randomUUID?.()||`vp-${Date.now()}`,o=rt(t),n=lt(t),s=pt(t),a=mt(t),r=dt(t),c=ht(t);return{guid:i,perspectiveCamera:o,orthogonalCamera:n,components:s,lines:a.length>0?a:void 0,clippingPlanes:r.length>0?r:void 0,bitmaps:c.length>0?c:void 0}}function rt(t){const e=t.match(/<PerspectiveCamera>([\s\S]*?)<\/PerspectiveCamera>/);if(!e)return;const i=e[1],o=V(i,"CameraViewPoint"),n=M(i,"CameraDirection"),s=M(i,"CameraUpVector"),a=h(i,"FieldOfView");if(!(!o||!n||!s||!a))return{cameraViewPoint:o,cameraDirection:n,cameraUpVector:s,fieldOfView:parseFloat(a)}}function lt(t){const e=t.match(/<OrthogonalCamera>([\s\S]*?)<\/OrthogonalCamera>/);if(!e)return;const i=e[1],o=V(i,"CameraViewPoint"),n=M(i,"CameraDirection"),s=M(i,"CameraUpVector"),a=h(i,"ViewToWorldScale");if(!(!o||!n||!s||!a))return{cameraViewPoint:o,cameraDirection:n,cameraUpVector:s,viewToWorldScale:parseFloat(a)}}function V(t,e){const i=t.match(new RegExp(`<${e}>([\\s\\S]*?)<\\/${e}>`));if(!i)return;const o=h(i[1],"X"),n=h(i[1],"Y"),s=h(i[1],"Z");if(!(o===void 0||n===void 0||s===void 0))return{x:parseFloat(o),y:parseFloat(n),z:parseFloat(s)}}function M(t,e){return V(t,e)}function pt(t){const e=t.match(/<Components>([\s\S]*?)<\/Components>/);if(!e)return;const i=e[1],o=B(i,"Selection"),n=ft(i),s=ut(i);if(!(!o&&!n&&!s))return{selection:o?.length?o:void 0,visibility:n,coloring:s?.length?s:void 0}}function B(t,e){const i=t.match(new RegExp(`<${e}>([\\s\\S]*?)<\\/${e}>`));if(!i)return;const o=[],n=i[1].matchAll(/<Component[^>]*(?:\/>|>[\s\S]*?<\/Component>)/g);for(const s of n){const a=_(s[0]);a&&o.push(a)}return o.length>0?o:void 0}function _(t){const e=t.match(/IfcGuid="([^"]+)"/),i=t.match(/AuthoringToolId="([^"]+)"/),o=t.match(/OriginatingSystem="([^"]+)"/);if(!(!e&&!i))return{ifcGuid:e?.[1],authoringToolId:i?.[1],originatingSystem:o?.[1]}}function ft(t){const e=t.match(/<Visibility[^>]*>([\s\S]*?)<\/Visibility>/);if(!e)return;const o=t.match(/DefaultVisibility="([^"]+)"/)?.[1]!=="false",n=B(e[1],"Exceptions");return{defaultVisibility:o,exceptions:n}}function ut(t){const e=t.match(/<Coloring>([\s\S]*?)<\/Coloring>/);if(!e)return;const i=[],o=e[1].matchAll(/<Color\s+Color="([^"]+)"[^>]*>([\s\S]*?)<\/Color>/g);for(const n of o){const s=n[1],a=[],r=n[2].matchAll(/<Component[^>]*(?:\/>|>[\s\S]*?<\/Component>)/g);for(const c of r){const l=_(c[0]);l&&a.push(l)}a.length>0&&i.push({color:s,components:a})}return i.length>0?i:void 0}function mt(t){const e=[],i=t.match(/<Lines>([\s\S]*?)<\/Lines>/);if(!i)return e;const o=i[1].matchAll(/<Line>([\s\S]*?)<\/Line>/g);for(const n of o){const s=V(n[1],"StartPoint"),a=V(n[1],"EndPoint");s&&a&&e.push({startPoint:s,endPoint:a})}return e}function dt(t){const e=[],i=t.match(/<ClippingPlanes>([\s\S]*?)<\/ClippingPlanes>/);if(!i)return e;const o=i[1].matchAll(/<ClippingPlane>([\s\S]*?)<\/ClippingPlane>/g);for(const n of o){const s=V(n[1],"Location"),a=M(n[1],"Direction");s&&a&&e.push({location:s,direction:a})}return e}function ht(t){const e=[],i=t.match(/<Bitmaps>([\s\S]*?)<\/Bitmaps>/);if(!i)return e;const o=i[1].matchAll(/<Bitmap>([\s\S]*?)<\/Bitmap>/g);for(const n of o){const s=h(n[1],"Format")||h(n[1],"Bitmap"),a=h(n[1],"Reference"),r=V(n[1],"Location"),c=M(n[1],"Normal"),l=M(n[1],"Up"),p=h(n[1],"Height");s&&a&&r&&c&&l&&p&&e.push({format:s.toUpperCase()==="JPG"?"JPG":"PNG",reference:a,location:r,normal:c,up:l,height:parseFloat(p)})}return e}function U(t){let e="";for(let i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return btoa(e)}async function ee(t){const e=new X;gt(e,t.version),(t.projectId||t.name)&&yt(e,t);for(const[i,o]of t.topics)await xt(e,o);return e.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}})}function gt(t,e){const i=`<?xml version="1.0" encoding="UTF-8"?>
2
2
  <Version xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" VersionId="${e}">
3
3
  <DetailedVersion>${e}</DetailedVersion>
4
4
  </Version>`;t.file("bcf.version",i)}function yt(t,e){const i=e.projectId||C(),o=e.name?`
@@ -22,10 +22,10 @@ import{J as X}from"./zip-BJqVbRkU.js";import{ae as C}from"./sandbox-VLI_y7cl.js"
22
22
  <Stage>${y(e.stage)}</Stage>`),e.labels&&e.labels.length>0)for(const o of e.labels)i+=`
23
23
  <Labels>${y(o)}</Labels>`;if(e.relatedTopics&&e.relatedTopics.length>0)for(const o of e.relatedTopics)i+=`
24
24
  <RelatedTopic Guid="${o}"/>`;i+=`
25
- </Topic>`;for(let o=0;o<e.viewpoints.length;o++){const n=e.viewpoints[o],s=`Viewpoint_${n.guid}.bcfv`,c=`Snapshot_${n.guid}.png`;i+=`
25
+ </Topic>`;for(let o=0;o<e.viewpoints.length;o++){const n=e.viewpoints[o],s=`Viewpoint_${n.guid}.bcfv`,a=`Snapshot_${n.guid}.png`;i+=`
26
26
  <Viewpoints Guid="${n.guid}">`,i+=`
27
27
  <Viewpoint>${s}</Viewpoint>`,(n.snapshot||n.snapshotData)&&(i+=`
28
- <Snapshot>${c}</Snapshot>`),i+=`
28
+ <Snapshot>${a}</Snapshot>`),i+=`
29
29
  </Viewpoints>`}for(const o of e.comments)i+=`
30
30
  <Comment Guid="${o.guid}">`,i+=`
31
31
  <Date>${o.date}</Date>`,i+=`
@@ -37,13 +37,13 @@ import{J as X}from"./zip-BJqVbRkU.js";import{ae as C}from"./sandbox-VLI_y7cl.js"
37
37
  </Comment>`;i+=`
38
38
  </Markup>`,t.file("markup.bcf",i)}async function Ct(t,e,i){const o=`Viewpoint_${e.guid}.bcfv`,n=`Snapshot_${e.guid}.png`;let s=`<?xml version="1.0" encoding="UTF-8"?>
39
39
  <VisualizationInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="${e.guid}">`;if(e.components&&(s+=vt(e.components)),e.perspectiveCamera&&(s+=bt(e.perspectiveCamera)),e.orthogonalCamera&&(s+=Tt(e.orthogonalCamera)),e.lines&&e.lines.length>0){s+=`
40
- <Lines>`;for(const c of e.lines)s+=Vt(c);s+=`
40
+ <Lines>`;for(const a of e.lines)s+=Vt(a);s+=`
41
41
  </Lines>`}if(e.clippingPlanes&&e.clippingPlanes.length>0){s+=`
42
- <ClippingPlanes>`;for(const c of e.clippingPlanes)s+=Pt(c);s+=`
42
+ <ClippingPlanes>`;for(const a of e.clippingPlanes)s+=Mt(a);s+=`
43
43
  </ClippingPlanes>`}if(e.bitmaps&&e.bitmaps.length>0){s+=`
44
- <Bitmaps>`;for(const c of e.bitmaps)s+=Mt(c);s+=`
44
+ <Bitmaps>`;for(const a of e.bitmaps)s+=Pt(a);s+=`
45
45
  </Bitmaps>`}if(s+=`
46
- </VisualizationInfo>`,t.file(o,s),e.snapshotData)t.file(n,e.snapshotData);else if(e.snapshot&&e.snapshot.startsWith("data:")){const c=e.snapshot.split(",")[1],r=atob(c),a=new Uint8Array(r.length);for(let l=0;l<r.length;l++)a[l]=r.charCodeAt(l);t.file(n,a)}}function vt(t){let e=`
46
+ </VisualizationInfo>`,t.file(o,s),e.snapshotData)t.file(n,e.snapshotData);else if(e.snapshot&&e.snapshot.startsWith("data:")){const a=e.snapshot.split(",")[1],r=atob(a),c=new Uint8Array(r.length);for(let l=0;l<r.length;l++)c[l]=r.charCodeAt(l);t.file(n,c)}}function vt(t){let e=`
47
47
  <Components>`;if(t.visibility?.viewSetupHints){const i=t.visibility.viewSetupHints;e+=`
48
48
  <ViewSetupHints`,i.spacesVisible!==void 0&&(e+=` SpacesVisible="${i.spacesVisible}"`),i.spaceBoundariesVisible!==void 0&&(e+=` SpaceBoundariesVisible="${i.spaceBoundariesVisible}"`),i.openingsVisible!==void 0&&(e+=` OpeningsVisible="${i.openingsVisible}"`),e+="/>"}if(t.selection&&t.selection.length>0){e+=`
49
49
  <Selection>`;for(const i of t.selection)e+=E(i);e+=`
@@ -108,7 +108,7 @@ ${e}</Component>`):o+="/>",o}function St(t){let e=`
108
108
  <Y>${t.endPoint.y}</Y>
109
109
  <Z>${t.endPoint.z}</Z>
110
110
  </EndPoint>
111
- </Line>`}function Pt(t){return`
111
+ </Line>`}function Mt(t){return`
112
112
  <ClippingPlane>
113
113
  <Location>
114
114
  <X>${t.location.x}</X>
@@ -120,7 +120,7 @@ ${e}</Component>`):o+="/>",o}function St(t){let e=`
120
120
  <Y>${t.direction.y}</Y>
121
121
  <Z>${t.direction.z}</Z>
122
122
  </Direction>
123
- </ClippingPlane>`}function Mt(t){return`
123
+ </ClippingPlane>`}function Pt(t){return`
124
124
  <Bitmap>
125
125
  <Format>${t.format}</Format>
126
126
  <Reference>${y(t.reference)}</Reference>
@@ -140,7 +140,7 @@ ${e}</Component>`):o+="/>",o}function St(t){let e=`
140
140
  <Z>${t.up.z}</Z>
141
141
  </Up>
142
142
  <Height>${t.height}</Height>
143
- </Bitmap>`}function y(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function $(t){return{x:t.x,y:-t.z,z:t.y}}function S(t){return{x:t.x,y:t.z,z:-t.y}}function Dt(t){const e=$(t.position),i=$(t.target),o=$(t.up),n=i.x-e.x,s=i.y-e.y,c=i.z-e.z,r=Math.sqrt(n*n+s*s+c*c),a=r>1e-4?{x:n/r,y:s/r,z:c/r}:{x:0,y:1,z:0},l=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),p=l>1e-4?{x:o.x/l,y:o.y/l,z:o.z/l}:{x:0,y:0,z:1},f=t.fov*180/Math.PI;return{cameraViewPoint:e,cameraDirection:a,cameraUpVector:p,fieldOfView:Math.max(1,Math.min(179,f))}}function It(t,e){const i=$(t.position),o=$(t.target),n=$(t.up),s=o.x-i.x,c=o.y-i.y,r=o.z-i.z,a=Math.sqrt(s*s+c*c+r*r),l=a>1e-4?{x:s/a,y:c/a,z:r/a}:{x:0,y:1,z:0},p=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z),f=p>1e-4?{x:n.x/p,y:n.y/p,z:n.z/p}:{x:0,y:0,z:1};return{cameraViewPoint:i,cameraDirection:l,cameraUpVector:f,viewToWorldScale:e}}function zt(t,e=10){const i={x:t.cameraViewPoint.x+t.cameraDirection.x*e,y:t.cameraViewPoint.y+t.cameraDirection.y*e,z:t.cameraViewPoint.z+t.cameraDirection.z*e},o=S(t.cameraViewPoint),n=S(i),s=S(t.cameraUpVector),c=t.fieldOfView*Math.PI/180;return{position:o,target:n,up:s,fov:c,isOrthographic:!1}}function At(t,e=10){const i={x:t.cameraViewPoint.x+t.cameraDirection.x*e,y:t.cameraViewPoint.y+t.cameraDirection.y*e,z:t.cameraViewPoint.z+t.cameraDirection.z*e},o=S(t.cameraViewPoint),n=S(i),s=S(t.cameraUpVector);return{position:o,target:n,up:s,fov:Math.PI/4,isOrthographic:!0,orthoScale:t.viewToWorldScale}}function Gt(t,e){if(!t.enabled)return null;const i=t.position/100;let o,n;switch(t.axis){case"down":o={x:(e.min.x+e.max.x)/2,y:e.min.y+i*(e.max.y-e.min.y),z:(e.min.z+e.max.z)/2},n=t.flipped?{x:0,y:1,z:0}:{x:0,y:-1,z:0};break;case"front":o={x:(e.min.x+e.max.x)/2,y:(e.min.y+e.max.y)/2,z:e.min.z+i*(e.max.z-e.min.z)},n=t.flipped?{x:0,y:0,z:1}:{x:0,y:0,z:-1};break;case"side":o={x:e.min.x+i*(e.max.x-e.min.x),y:(e.min.y+e.max.y)/2,z:(e.min.z+e.max.z)/2},n=t.flipped?{x:1,y:0,z:0}:{x:-1,y:0,z:0};break}return{location:$(o),direction:$(n)}}function kt(t,e){const i=S(t.location),o=S(t.direction),n=Math.abs(o.x),s=Math.abs(o.y),c=Math.abs(o.z);let r,a,l;if(s>=n&&s>=c){r="down";const p=e.max.y-e.min.y;a=p>0?(i.y-e.min.y)/p*100:50,l=o.y>0}else if(c>=n){r="front";const p=e.max.z-e.min.z;a=p>0?(i.z-e.min.z)/p*100:50,l=o.z>0}else{r="side";const p=e.max.x-e.min.x;a=p>0?(i.x-e.min.x)/p*100:50,l=o.x>0}return a=Math.max(0,Math.min(100,a)),{axis:r,position:a,enabled:!0,flipped:l}}function ie(t){const{camera:e,sectionPlane:i,bounds:o,snapshot:n,snapshotData:s,selectedGuids:c,hiddenGuids:r,visibleGuids:a,coloredGuids:l}=t,p={guid:C()};if(e.isOrthographic&&e.orthoScale!==void 0?p.orthogonalCamera=It(e,e.orthoScale):p.perspectiveCamera=Dt(e),i?.enabled&&o){const d=Gt(i,o);d&&(p.clippingPlanes=[d])}n&&(p.snapshot=n),s&&(p.snapshotData=s);const f=c&&c.length>0,m=r&&r.length>0,u=a&&a.length>0,g=l&&l.length>0;return(f||m||u||g)&&(p.components={},f&&(p.components.selection=c.map(d=>({ifcGuid:d}))),u?p.components.visibility={defaultVisibility:!1,exceptions:a.map(d=>({ifcGuid:d}))}:m&&(p.components.visibility={defaultVisibility:!0,exceptions:r.map(d=>({ifcGuid:d}))}),g&&(p.components.coloring=l.map(({color:d,guids:x})=>({color:d,components:x.map(w=>({ifcGuid:w}))})))),p}function oe(t,e,i=10){let o,n;t.perspectiveCamera?o=zt(t.perspectiveCamera,i):t.orthogonalCamera&&(o=At(t.orthogonalCamera,i)),t.clippingPlanes&&t.clippingPlanes.length>0&&e&&(n=kt(t.clippingPlanes[0],e));const s=[];if(t.components?.selection)for(const l of t.components.selection)l.ifcGuid&&s.push(l.ifcGuid);const c=[],r=[];if(t.components?.visibility){const{defaultVisibility:l,exceptions:p}=t.components.visibility;if(p)for(const f of p)f.ifcGuid&&(l===!1?r.push(f.ifcGuid):c.push(f.ifcGuid))}const a=[];if(t.components?.coloring)for(const l of t.components.coloring){const p=[];for(const f of l.components)f.ifcGuid&&p.push(f.ifcGuid);p.length>0&&a.push({color:l.color,guids:p})}return{camera:o,sectionPlane:n,selectedGuids:s,hiddenGuids:c,visibleGuids:r,coloredGuids:a}}function k(t){return{x:t.x,y:t.z,z:-t.y}}function Lt(t,e){const i=t.perspectiveCamera??t.orthogonalCamera;if(!i)return null;const o=k(i.cameraViewPoint),n=k(i.cameraDirection),s=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z);if(s<1e-6)return null;const c=n.x/s,r=n.y/s,a=n.z/s;return{x:o.x+c*e,y:o.y+r*e,z:o.z+a*e}}function U(t){const e=(t.min.x+t.max.x)/2,i=(t.min.z+t.max.z)/2,o=t.max.y,n=t.max.y-t.min.y,s=Math.max(n*.3,.5);return{position:{x:e,y:o+s,z:i},connectorAnchor:{x:e,y:o,z:i}}}function Et(t,e,i){const o=t.components?.selection;if(o&&o.length>0)for(const r of o){if(!r.ifcGuid)continue;const a=e(r.ifcGuid);if(a)return{...U(a),source:"component"}}const n=t.components?.visibility;if(n&&!n.defaultVisibility&&n.exceptions&&n.exceptions.length>0)for(const r of n.exceptions){if(!r.ifcGuid)continue;const a=e(r.ifcGuid);if(a)return{...U(a),source:"component"}}const s=Lt(t,i);if(s)return{position:s,source:"camera-target"};const c=t.perspectiveCamera??t.orthogonalCamera;return c?{position:k(c.cameraViewPoint),source:"camera-position"}:null}function ne(t,e,i){const{targetDistance:o=50,statusFilter:n}=i??{},s=[];for(let c=0;c<t.length;c++){const r=t[c];if(n&&n.length>0){const p=(r.topicStatus??"").toLowerCase();if(!n.some(f=>f.toLowerCase()===p))continue}let a=null;for(const p of r.viewpoints)if(a=Et(p,e,o),a)break;if(!a)continue;const l=r.viewpoints[0];s.push({topicGuid:r.guid,position:a.position,connectorAnchor:a.connectorAnchor,title:r.title,status:r.topicStatus??"Open",priority:r.priority??"Normal",topicType:r.topicType??"Issue",commentCount:r.comments.length,hasViewpoint:r.viewpoints.length>0,snapshot:l?.snapshot,positionSource:a.source,index:r.index??c+1})}return s}const G="bcf-overlay-marker",R="bcf-overlay-connector",M="bcf-overlay-active",D="bcf-overlay-tooltip",Ft={high:"#f7768e",critical:"#f7768e",medium:"#ff9e64",normal:"#ff9e64",low:"#9ece6a"},Ot={open:"●","in progress":"◐",resolved:"✓",closed:"○"};class L{container;svgLayer;markerElements=new Map;connectorElements=new Map;markers=[];activeMarkerId=null;projection;unsubCamera=null;clickCallbacks=[];hoverCallbacks=[];opts;_visible=!0;_disposed=!1;constructor(e,i,o){this.projection=i,this.opts={showConnectors:o?.showConnectors??!0,showTooltips:o?.showTooltips??!0,minScale:o?.minScale??.65,maxScale:o?.maxScale??1,verticalOffset:o?.verticalOffset??36},this.container=document.createElement("div"),this.container.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:20;",e.appendChild(this.container),this.svgLayer=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svgLayer.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;",this.container.appendChild(this.svgLayer),this.injectStyles(),this.unsubCamera=i.onCameraChange(()=>this.updatePositions())}setMarkers(e){this.markers=e;const i=new Set(e.map(o=>o.topicGuid));for(const[o,n]of this.markerElements)i.has(o)||(n.remove(),this.markerElements.delete(o));for(const[o,n]of this.connectorElements)i.has(o)||(n.remove(),this.connectorElements.delete(o));for(const o of e)this.markerElements.has(o.topicGuid)?this.updateMarkerContent(o):this.createMarkerElement(o);this.updatePositions()}setActiveMarker(e){if(this.activeMarkerId){const i=this.markerElements.get(this.activeMarkerId);i&&i.classList.remove(M)}if(this.activeMarkerId=e,e){const i=this.markerElements.get(e);i&&i.classList.add(M)}}setVisible(e){this._visible=e,this.container.style.display=e?"":"none"}onMarkerClick(e){return this.clickCallbacks.push(e),()=>{this.clickCallbacks=this.clickCallbacks.filter(i=>i!==e)}}onMarkerHover(e){return this.hoverCallbacks.push(e),()=>{this.hoverCallbacks=this.hoverCallbacks.filter(i=>i!==e)}}updatePositions(){if(this._disposed||!this._visible)return;const{width:e,height:i}=this.projection.getCanvasSize();if(e===0||i===0)return;const o=this.projection.getCameraPosition?.();for(const n of this.markers){const s=this.markerElements.get(n.topicGuid);if(!s)continue;const c=this.projection.projectToScreen(n.position);if(!c||c.x<-80||c.y<-80||c.x>e+80||c.y>i+80){s.style.display="none";const f=this.connectorElements.get(n.topicGuid);f&&(f.style.display="none");continue}s.style.display="";let r=1;if(o){const f=n.position.x-o.x,m=n.position.y-o.y,u=n.position.z-o.z,g=Math.sqrt(f*f+m*m+u*u),d=Math.max(0,Math.min(1,(g-20)/180));r=this.opts.maxScale+d*(this.opts.minScale-this.opts.maxScale)}const a=c.x,l=c.y;s.style.transform=`translate(${a}px, ${l}px) translate(-50%, -100%) scale(${r.toFixed(3)})`;const p=o?.6+(1-Math.max(0,Math.min(1,(Math.sqrt((n.position.x-o.x)**2+(n.position.y-o.y)**2+(n.position.z-o.z)**2)-20)/250)))*.4:1;if(s.style.opacity=p.toFixed(2),this.opts.showConnectors){const f=n.connectorAnchor??n.position,m=this.projection.projectToScreen(f);let u=this.connectorElements.get(n.topicGuid);if(u||(u=document.createElementNS("http://www.w3.org/2000/svg","line"),u.classList.add(R),this.svgLayer.appendChild(u),this.connectorElements.set(n.topicGuid,u)),!m){u.style.display="none";continue}u.style.display="";const g=this.getPriorityColor(n.priority);u.setAttribute("x1",String(a)),u.setAttribute("y1",String(l)),u.setAttribute("x2",String(m.x)),u.setAttribute("y2",String(m.y)),u.setAttribute("stroke",g),u.setAttribute("stroke-width","1.5"),u.setAttribute("stroke-dasharray","3 2"),u.setAttribute("stroke-opacity",String((p*.5).toFixed(2)))}}}dispose(){this._disposed=!0,this.unsubCamera&&this.unsubCamera(),this.container.remove(),this.markerElements.clear(),this.connectorElements.clear(),this.clickCallbacks=[],this.hoverCallbacks=[]}createMarkerElement(e){const i=document.createElement("div");i.className=G,i.dataset.topicGuid=e.topicGuid,this.updateMarkerInnerHTML(i,e),i.addEventListener("click",o=>{o.stopPropagation();for(const n of this.clickCallbacks)n(e.topicGuid)}),i.addEventListener("mouseenter",()=>{for(const n of this.hoverCallbacks)n(e.topicGuid);const o=i.querySelector(`.${D}`);o&&(o.style.display="")}),i.addEventListener("mouseleave",()=>{for(const n of this.hoverCallbacks)n(null);const o=i.querySelector(`.${D}`);o&&(o.style.display="none")}),e.topicGuid===this.activeMarkerId&&i.classList.add(M),this.container.appendChild(i),this.markerElements.set(e.topicGuid,i)}updateMarkerContent(e){const i=this.markerElements.get(e.topicGuid);i&&(this.updateMarkerInnerHTML(i,e),e.topicGuid===this.activeMarkerId?i.classList.add(M):i.classList.remove(M))}updateMarkerInnerHTML(e,i){const o=this.getPriorityColor(i.priority),n=Ot[i.status.toLowerCase()]??"●";e.innerHTML=`
143
+ </Bitmap>`}function y(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function $(t){return{x:t.x,y:-t.z,z:t.y}}function S(t){return{x:t.x,y:t.z,z:-t.y}}function Dt(t){const e=$(t.position),i=$(t.target),o=$(t.up),n=i.x-e.x,s=i.y-e.y,a=i.z-e.z,r=Math.sqrt(n*n+s*s+a*a),c=r>1e-4?{x:n/r,y:s/r,z:a/r}:{x:0,y:1,z:0},l=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),p=l>1e-4?{x:o.x/l,y:o.y/l,z:o.z/l}:{x:0,y:0,z:1},f=t.fov*180/Math.PI;return{cameraViewPoint:e,cameraDirection:c,cameraUpVector:p,fieldOfView:Math.max(1,Math.min(179,f))}}function zt(t,e){const i=$(t.position),o=$(t.target),n=$(t.up),s=o.x-i.x,a=o.y-i.y,r=o.z-i.z,c=Math.sqrt(s*s+a*a+r*r),l=c>1e-4?{x:s/c,y:a/c,z:r/c}:{x:0,y:1,z:0},p=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z),f=p>1e-4?{x:n.x/p,y:n.y/p,z:n.z/p}:{x:0,y:0,z:1};return{cameraViewPoint:i,cameraDirection:l,cameraUpVector:f,viewToWorldScale:e}}function It(t,e=10){const i={x:t.cameraViewPoint.x+t.cameraDirection.x*e,y:t.cameraViewPoint.y+t.cameraDirection.y*e,z:t.cameraViewPoint.z+t.cameraDirection.z*e},o=S(t.cameraViewPoint),n=S(i),s=S(t.cameraUpVector),a=t.fieldOfView*Math.PI/180;return{position:o,target:n,up:s,fov:a,isOrthographic:!1}}function At(t,e=10){const i={x:t.cameraViewPoint.x+t.cameraDirection.x*e,y:t.cameraViewPoint.y+t.cameraDirection.y*e,z:t.cameraViewPoint.z+t.cameraDirection.z*e},o=S(t.cameraViewPoint),n=S(i),s=S(t.cameraUpVector);return{position:o,target:n,up:s,fov:Math.PI/4,isOrthographic:!0,orthoScale:t.viewToWorldScale}}function kt(t,e){if(!t.enabled)return null;const i=t.position/100;let o,n;switch(t.axis){case"down":o={x:(e.min.x+e.max.x)/2,y:e.min.y+i*(e.max.y-e.min.y),z:(e.min.z+e.max.z)/2},n=t.flipped?{x:0,y:1,z:0}:{x:0,y:-1,z:0};break;case"front":o={x:(e.min.x+e.max.x)/2,y:(e.min.y+e.max.y)/2,z:e.min.z+i*(e.max.z-e.min.z)},n=t.flipped?{x:0,y:0,z:1}:{x:0,y:0,z:-1};break;case"side":o={x:e.min.x+i*(e.max.x-e.min.x),y:(e.min.y+e.max.y)/2,z:(e.min.z+e.max.z)/2},n=t.flipped?{x:1,y:0,z:0}:{x:-1,y:0,z:0};break}return{location:$(o),direction:$(n)}}function Gt(t,e){const i=S(t.location),o=S(t.direction),n=Math.abs(o.x),s=Math.abs(o.y),a=Math.abs(o.z);let r,c,l;if(s>=n&&s>=a){r="down";const p=e.max.y-e.min.y;c=p>0?(i.y-e.min.y)/p*100:50,l=o.y>0}else if(a>=n){r="front";const p=e.max.z-e.min.z;c=p>0?(i.z-e.min.z)/p*100:50,l=o.z>0}else{r="side";const p=e.max.x-e.min.x;c=p>0?(i.x-e.min.x)/p*100:50,l=o.x>0}return c=Math.max(0,Math.min(100,c)),{axis:r,position:c,enabled:!0,flipped:l}}function ie(t){const{camera:e,sectionPlane:i,bounds:o,snapshot:n,snapshotData:s,selectedGuids:a,hiddenGuids:r,visibleGuids:c,coloredGuids:l}=t,p={guid:C()};if(e.isOrthographic&&e.orthoScale!==void 0?p.orthogonalCamera=zt(e,e.orthoScale):p.perspectiveCamera=Dt(e),i?.enabled&&o){const d=kt(i,o);d&&(p.clippingPlanes=[d])}n&&(p.snapshot=n),s&&(p.snapshotData=s);const f=a&&a.length>0,m=r&&r.length>0,u=c&&c.length>0,g=l&&l.length>0;return(f||m||u||g)&&(p.components={},f&&(p.components.selection=a.map(d=>({ifcGuid:d}))),u?p.components.visibility={defaultVisibility:!1,exceptions:c.map(d=>({ifcGuid:d}))}:m&&(p.components.visibility={defaultVisibility:!0,exceptions:r.map(d=>({ifcGuid:d}))}),g&&(p.components.coloring=l.map(({color:d,guids:x})=>({color:d,components:x.map(w=>({ifcGuid:w}))})))),p}function oe(t,e,i=10){let o,n;t.perspectiveCamera?o=It(t.perspectiveCamera,i):t.orthogonalCamera&&(o=At(t.orthogonalCamera,i)),t.clippingPlanes&&t.clippingPlanes.length>0&&e&&(n=Gt(t.clippingPlanes[0],e));const s=[];if(t.components?.selection)for(const l of t.components.selection)l.ifcGuid&&s.push(l.ifcGuid);const a=[],r=[];if(t.components?.visibility){const{defaultVisibility:l,exceptions:p}=t.components.visibility;if(p)for(const f of p)f.ifcGuid&&(l===!1?r.push(f.ifcGuid):a.push(f.ifcGuid))}const c=[];if(t.components?.coloring)for(const l of t.components.coloring){const p=[];for(const f of l.components)f.ifcGuid&&p.push(f.ifcGuid);p.length>0&&c.push({color:l.color,guids:p})}return{camera:o,sectionPlane:n,selectedGuids:s,hiddenGuids:a,visibleGuids:r,coloredGuids:c}}function G(t){return{x:t.x,y:t.z,z:-t.y}}function Lt(t,e){const i=t.perspectiveCamera??t.orthogonalCamera;if(!i)return null;const o=G(i.cameraViewPoint),n=G(i.cameraDirection),s=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z);if(s<1e-6)return null;const a=n.x/s,r=n.y/s,c=n.z/s;return{x:o.x+a*e,y:o.y+r*e,z:o.z+c*e}}function j(t){const e=(t.min.x+t.max.x)/2,i=(t.min.z+t.max.z)/2,o=t.max.y,n=t.max.y-t.min.y,s=Math.max(n*.3,.5);return{position:{x:e,y:o+s,z:i},connectorAnchor:{x:e,y:o,z:i}}}function Et(t,e,i){const o=t.components?.selection;if(o&&o.length>0)for(const r of o){if(!r.ifcGuid)continue;const c=e(r.ifcGuid);if(c)return{...j(c),source:"component"}}const n=t.components?.visibility;if(n&&!n.defaultVisibility&&n.exceptions&&n.exceptions.length>0)for(const r of n.exceptions){if(!r.ifcGuid)continue;const c=e(r.ifcGuid);if(c)return{...j(c),source:"component"}}const s=Lt(t,i);if(s)return{position:s,source:"camera-target"};const a=t.perspectiveCamera??t.orthogonalCamera;return a?{position:G(a.cameraViewPoint),source:"camera-position"}:null}function ne(t,e,i){const{targetDistance:o=50,statusFilter:n}=i??{},s=[];for(let a=0;a<t.length;a++){const r=t[a];if(n&&n.length>0){const p=(r.topicStatus??"").toLowerCase();if(!n.some(f=>f.toLowerCase()===p))continue}let c=null;for(const p of r.viewpoints)if(c=Et(p,e,o),c)break;if(!c)continue;const l=r.viewpoints[0];s.push({topicGuid:r.guid,position:c.position,connectorAnchor:c.connectorAnchor,title:r.title,status:r.topicStatus??"Open",priority:r.priority??"Normal",topicType:r.topicType??"Issue",commentCount:r.comments.length,hasViewpoint:r.viewpoints.length>0,snapshot:l?.snapshot,positionSource:c.source,index:r.index??a+1})}return s}const k="bcf-overlay-marker",R="bcf-overlay-connector",P="bcf-overlay-active",D="bcf-overlay-tooltip",Ft={open:"#f7768e","in progress":"#e0af68",resolved:"#9ece6a",closed:"#565f89"},Ot={open:"●","in progress":"◐",resolved:"✓",closed:"○"};class L{container;svgLayer;markerElements=new Map;connectorElements=new Map;markers=[];activeMarkerId=null;projection;unsubCamera=null;clickCallbacks=[];hoverCallbacks=[];opts;_visible=!0;_disposed=!1;constructor(e,i,o){this.projection=i,this.opts={showConnectors:o?.showConnectors??!0,showTooltips:o?.showTooltips??!0,minScale:o?.minScale??.65,maxScale:o?.maxScale??1,verticalOffset:o?.verticalOffset??36},this.container=document.createElement("div"),this.container.style.cssText="position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:20;",e.appendChild(this.container),this.svgLayer=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svgLayer.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;",this.container.appendChild(this.svgLayer),this.injectStyles(),this.unsubCamera=i.onCameraChange(()=>this.updatePositions())}setMarkers(e){this.markers=e;const i=new Set(e.map(o=>o.topicGuid));for(const[o,n]of this.markerElements)i.has(o)||(n.remove(),this.markerElements.delete(o));for(const[o,n]of this.connectorElements)i.has(o)||(n.remove(),this.connectorElements.delete(o));for(const o of e)this.markerElements.has(o.topicGuid)?this.updateMarkerContent(o):this.createMarkerElement(o);this.updatePositions()}setActiveMarker(e){if(this.activeMarkerId){const i=this.markerElements.get(this.activeMarkerId);i&&i.classList.remove(P)}if(this.activeMarkerId=e,e){const i=this.markerElements.get(e);i&&i.classList.add(P)}}setVisible(e){this._visible=e,this.container.style.display=e?"":"none"}onMarkerClick(e){return this.clickCallbacks.push(e),()=>{this.clickCallbacks=this.clickCallbacks.filter(i=>i!==e)}}onMarkerHover(e){return this.hoverCallbacks.push(e),()=>{this.hoverCallbacks=this.hoverCallbacks.filter(i=>i!==e)}}updatePositions(){if(this._disposed||!this._visible)return;const{width:e,height:i}=this.projection.getCanvasSize();if(e===0||i===0)return;const o=this.projection.getCameraPosition?.();for(const n of this.markers){const s=this.markerElements.get(n.topicGuid);if(!s)continue;const a=this.projection.projectToScreen(n.position);if(!a||a.x<-80||a.y<-80||a.x>e+80||a.y>i+80){s.style.display="none";const f=this.connectorElements.get(n.topicGuid);f&&(f.style.display="none");continue}s.style.display="";let r=1;if(o){const f=n.position.x-o.x,m=n.position.y-o.y,u=n.position.z-o.z,g=Math.sqrt(f*f+m*m+u*u),d=Math.max(0,Math.min(1,(g-20)/180));r=this.opts.maxScale+d*(this.opts.minScale-this.opts.maxScale)}const c=a.x,l=a.y;s.style.transform=`translate(${c}px, ${l}px) translate(-50%, -100%) scale(${r.toFixed(3)})`;const p=o?.6+(1-Math.max(0,Math.min(1,(Math.sqrt((n.position.x-o.x)**2+(n.position.y-o.y)**2+(n.position.z-o.z)**2)-20)/250)))*.4:1;if(s.style.opacity=p.toFixed(2),this.opts.showConnectors){const f=n.connectorAnchor??n.position,m=this.projection.projectToScreen(f);let u=this.connectorElements.get(n.topicGuid);if(u||(u=document.createElementNS("http://www.w3.org/2000/svg","line"),u.classList.add(R),this.svgLayer.appendChild(u),this.connectorElements.set(n.topicGuid,u)),!m){u.style.display="none";continue}u.style.display="";const g=this.getStatusColor(n.status);u.setAttribute("x1",String(c)),u.setAttribute("y1",String(l)),u.setAttribute("x2",String(m.x)),u.setAttribute("y2",String(m.y)),u.setAttribute("stroke",g),u.setAttribute("stroke-width","1.5"),u.setAttribute("stroke-dasharray","3 2"),u.setAttribute("stroke-opacity",String((p*.5).toFixed(2)))}}}dispose(){this._disposed=!0,this.unsubCamera&&this.unsubCamera(),this.container.remove(),this.markerElements.clear(),this.connectorElements.clear(),this.clickCallbacks=[],this.hoverCallbacks=[]}createMarkerElement(e){const i=document.createElement("div");i.className=k,i.dataset.topicGuid=e.topicGuid,this.updateMarkerInnerHTML(i,e),i.addEventListener("click",o=>{o.stopPropagation();for(const n of this.clickCallbacks)n(e.topicGuid)}),i.addEventListener("mouseenter",()=>{for(const n of this.hoverCallbacks)n(e.topicGuid);const o=i.querySelector(`.${D}`);o&&(o.style.display="")}),i.addEventListener("mouseleave",()=>{for(const n of this.hoverCallbacks)n(null);const o=i.querySelector(`.${D}`);o&&(o.style.display="none")}),e.topicGuid===this.activeMarkerId&&i.classList.add(P),this.container.appendChild(i),this.markerElements.set(e.topicGuid,i)}updateMarkerContent(e){const i=this.markerElements.get(e.topicGuid);i&&(this.updateMarkerInnerHTML(i,e),e.topicGuid===this.activeMarkerId?i.classList.add(P):i.classList.remove(P))}updateMarkerInnerHTML(e,i){const o=this.getStatusColor(i.status),n=Ot[i.status.toLowerCase()]??"●",s=i.priority?` · ${i.priority}`:"";e.innerHTML=`
144
144
  <div class="bcf-marker-pin" style="--marker-color:${o};">
145
145
  <span class="bcf-marker-index">${i.index}</span>
146
146
  </div>
@@ -150,13 +150,13 @@ ${e}</Component>`):o+="/>",o}function St(t){let e=`
150
150
  <span class="bcf-tooltip-title">${this.escapeHtml(i.title)}</span>
151
151
  </div>
152
152
  <div class="bcf-tooltip-meta">
153
- ${this.escapeHtml(i.status)}${i.commentCount>0?` · ${i.commentCount} comment${i.commentCount!==1?"s":""}`:""}
153
+ ${this.escapeHtml(i.status)}${s}${i.commentCount>0?` · ${i.commentCount} comment${i.commentCount!==1?"s":""}`:""}
154
154
  </div>
155
155
  </div>
156
- `}getPriorityColor(e){return Ft[e.toLowerCase()]??"#7aa2f7"}escapeHtml(e){const i=document.createElement("div");return i.textContent=e,i.innerHTML}static stylesInjected=!1;injectStyles(){if(L.stylesInjected)return;L.stylesInjected=!0;const e=document.createElement("style");e.textContent=`
156
+ `}getStatusColor(e){return Ft[e.toLowerCase()]??"#7aa2f7"}escapeHtml(e){const i=document.createElement("div");return i.textContent=e,i.innerHTML}static stylesInjected=!1;injectStyles(){if(L.stylesInjected)return;L.stylesInjected=!0;const e=document.createElement("style");e.textContent=`
157
157
  /* BCF 3D Overlay Markers */
158
158
 
159
- .${G} {
159
+ .${k} {
160
160
  position: absolute;
161
161
  left: 0;
162
162
  top: 0;
@@ -182,14 +182,14 @@ ${e}</Component>`):o+="/>",o}function St(t){let e=`
182
182
  transition: transform 0.15s ease, box-shadow 0.15s ease;
183
183
  }
184
184
 
185
- .${G}:hover .bcf-marker-pin {
185
+ .${k}:hover .bcf-marker-pin {
186
186
  transform: rotate(-45deg) scale(1.2);
187
187
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
188
188
  }
189
189
 
190
- .${M} .bcf-marker-pin {
190
+ .${P} .bcf-marker-pin {
191
191
  transform: rotate(-45deg) scale(1.25);
192
- box-shadow: 0 0 0 4px rgba(122,162,247,0.35), 0 4px 16px rgba(0,0,0,0.4);
192
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker-color, #7aa2f7) 35%, transparent), 0 4px 16px rgba(0,0,0,0.4);
193
193
  animation: bcf-pulse 1.8s ease-in-out infinite;
194
194
  }
195
195
 
@@ -267,15 +267,15 @@ ${e}</Component>`):o+="/>",o}function St(t){let e=`
267
267
 
268
268
  /* Pulse animation for active marker */
269
269
  @keyframes bcf-pulse {
270
- 0%, 100% { box-shadow: 0 0 0 4px rgba(122,162,247,0.35), 0 4px 16px rgba(0,0,0,0.4); }
271
- 50% { box-shadow: 0 0 0 8px rgba(122,162,247,0.1), 0 4px 16px rgba(0,0,0,0.4); }
270
+ 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker-color, #7aa2f7) 35%, transparent), 0 4px 16px rgba(0,0,0,0.4); }
271
+ 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--marker-color, #7aa2f7) 10%, transparent), 0 4px 16px rgba(0,0,0,0.4); }
272
272
  }
273
- `,document.head.appendChild(e)}}function jt(t,e){return{version:e,projectId:C(),name:t,topics:new Map}}function F(t){return{guid:C(),title:t.title,description:t.description,topicType:t.topicType??"Issue",topicStatus:t.topicStatus??"Open",priority:t.priority,creationDate:new Date().toISOString(),creationAuthor:t.author,labels:t.labels,comments:[],viewpoints:[]}}function I(t){return{guid:C(),date:new Date().toISOString(),author:t.author,comment:t.comment,viewpointGuid:t.viewpointGuid}}const Ut="ids-validator@ifc-lite",Rt=1e3,Xt="FFFF3333",Bt="Error",_="Info",Yt=50;function se(t,e={}){const{author:i=Ut,projectName:o,version:n="2.1",topicGrouping:s="per-entity",includePassingEntities:c=!1,failureTopicType:r=Bt,passTopicType:a=_,maxTopics:l=Rt,failureColor:p=Xt,entityBounds:f,entitySnapshots:m}=e,u=jt(o??t.title,n);switch(s){case"per-entity":_t(u,t,{author:i,includePassingEntities:c,failureTopicType:r,passTopicType:a,maxTopics:l,failureColor:p,entityBounds:f,entitySnapshots:m});break;case"per-specification":Zt(u,t,{author:i,failureTopicType:r,maxTopics:l,failureColor:p});break;case"per-requirement":Nt(u,t,{author:i,failureTopicType:r,maxTopics:l,failureColor:p,entityBounds:f,entitySnapshots:m});break}return u}function _t(t,e,i){let o=0;for(const n of e.specificationResults)if(n.status!=="not_applicable")for(const s of n.entityResults){if(o>=i.maxTopics)return;if(s.passed&&!i.includePassingEntities)continue;const c=s.requirementResults.filter(m=>m.status==="fail"),r=s.requirementResults.filter(m=>m.status!=="not_applicable").length,a=s.entityName||`#${s.expressId}`,l=!s.passed,p=F({title:`${s.entityType}: ${a}`,description:qt(n,s,c.length,r),author:i.author,topicType:l?i.failureTopicType:i.passTopicType??_,topicStatus:l?"Open":"Closed",priority:l?c.length===r?"High":"Medium":void 0,labels:["IDS",n.specification.name]});let f;if(s.globalId){const m=`${s.modelId}:${s.expressId}`,u=i.entityBounds?.get(m),g=i.entitySnapshots?.get(m),d=N(s.globalId,l?i.failureColor:void 0,u,g);p.viewpoints.push(d),f=d.guid}for(const m of c){const u=I({author:i.author,comment:Z(m),viewpointGuid:f});p.comments.push(u)}t.topics.set(p.guid,p),o++}}function Zt(t,e,i){let o=0;for(const n of e.specificationResults){if(n.status!=="fail")continue;if(o>=i.maxTopics)return;const s=n.entityResults.filter(f=>!f.passed),c=F({title:`[FAIL] ${n.specification.name}`,description:Ht(n),author:i.author,topicType:i.failureTopicType,topicStatus:"Open",priority:n.failedCount>n.passedCount?"High":"Medium",labels:["IDS",n.specification.name]}),r=s.map(f=>f.globalId).filter(f=>f!==void 0);let a;if(r.length>0){const f=Jt(r,i.failureColor);c.viewpoints.push(f),a=f.guid}const l=Yt,p=s.slice(0,l);for(const f of p){const m=f.entityName||`#${f.expressId}`,g=f.requirementResults.filter(x=>x.status==="fail").map(x=>x.failureReason??x.checkedDescription).join("; "),d=I({author:i.author,comment:`${f.entityType}: ${m}${f.globalId?` (${f.globalId})`:""}
274
- ${g}`,viewpointGuid:a});c.comments.push(d)}if(s.length>l){const f=I({author:i.author,comment:`... and ${s.length-l} more failing entities`});c.comments.push(f)}t.topics.set(c.guid,c),o++}}function Nt(t,e,i){let o=0;for(const n of e.specificationResults)if(n.status==="fail"){for(const s of n.entityResults)if(!s.passed)for(const c of s.requirementResults){if(c.status!=="fail")continue;if(o>=i.maxTopics)return;const r=s.entityName||`#${s.expressId}`,a=F({title:`${s.entityType}: ${r} - ${c.failureReason??c.checkedDescription}`,description:`Specification: ${n.specification.name}
273
+ `,document.head.appendChild(e)}}function Ut(t,e){return{version:e,projectId:C(),name:t,topics:new Map}}function F(t){return{guid:C(),title:t.title,description:t.description,topicType:t.topicType??"Issue",topicStatus:t.topicStatus??"Open",priority:t.priority,creationDate:new Date().toISOString(),creationAuthor:t.author,labels:t.labels,comments:[],viewpoints:[]}}function z(t){return{guid:C(),date:new Date().toISOString(),author:t.author,comment:t.comment,viewpointGuid:t.viewpointGuid}}const jt="ids-validator@ifc-lite",Rt=1e3,Xt="FFFF3333",Bt="Error",Y="Info",_t=50;function se(t,e={}){const{author:i=jt,projectName:o,version:n="2.1",topicGrouping:s="per-entity",includePassingEntities:a=!1,failureTopicType:r=Bt,passTopicType:c=Y,maxTopics:l=Rt,failureColor:p=Xt,entityBounds:f,entitySnapshots:m}=e,u=Ut(o??t.title,n);switch(s){case"per-entity":Yt(u,t,{author:i,includePassingEntities:a,failureTopicType:r,passTopicType:c,maxTopics:l,failureColor:p,entityBounds:f,entitySnapshots:m});break;case"per-specification":Zt(u,t,{author:i,failureTopicType:r,maxTopics:l,failureColor:p});break;case"per-requirement":Nt(u,t,{author:i,failureTopicType:r,maxTopics:l,failureColor:p,entityBounds:f,entitySnapshots:m});break}return u}function Yt(t,e,i){let o=0;for(const n of e.specificationResults)if(n.status!=="not_applicable")for(const s of n.entityResults){if(o>=i.maxTopics)return;if(s.passed&&!i.includePassingEntities)continue;const a=s.requirementResults.filter(m=>m.status==="fail"),r=s.requirementResults.filter(m=>m.status!=="not_applicable").length,c=s.entityName||`#${s.expressId}`,l=!s.passed,p=F({title:`${s.entityType}: ${c}`,description:qt(n,s,a.length,r),author:i.author,topicType:l?i.failureTopicType:i.passTopicType??Y,topicStatus:l?"Open":"Closed",priority:l?a.length===r?"High":"Medium":void 0,labels:["IDS",n.specification.name]});let f;if(s.globalId){const m=`${s.modelId}:${s.expressId}`,u=i.entityBounds?.get(m),g=i.entitySnapshots?.get(m),d=N(s.globalId,l?i.failureColor:void 0,u,g);p.viewpoints.push(d),f=d.guid}for(const m of a){const u=z({author:i.author,comment:Z(m),viewpointGuid:f});p.comments.push(u)}t.topics.set(p.guid,p),o++}}function Zt(t,e,i){let o=0;for(const n of e.specificationResults){if(n.status!=="fail")continue;if(o>=i.maxTopics)return;const s=n.entityResults.filter(f=>!f.passed),a=F({title:`[FAIL] ${n.specification.name}`,description:Ht(n),author:i.author,topicType:i.failureTopicType,topicStatus:"Open",priority:n.failedCount>n.passedCount?"High":"Medium",labels:["IDS",n.specification.name]}),r=s.map(f=>f.globalId).filter(f=>f!==void 0);let c;if(r.length>0){const f=Jt(r,i.failureColor);a.viewpoints.push(f),c=f.guid}const l=_t,p=s.slice(0,l);for(const f of p){const m=f.entityName||`#${f.expressId}`,g=f.requirementResults.filter(x=>x.status==="fail").map(x=>x.failureReason??x.checkedDescription).join("; "),d=z({author:i.author,comment:`${f.entityType}: ${m}${f.globalId?` (${f.globalId})`:""}
274
+ ${g}`,viewpointGuid:c});a.comments.push(d)}if(s.length>l){const f=z({author:i.author,comment:`... and ${s.length-l} more failing entities`});a.comments.push(f)}t.topics.set(a.guid,a),o++}}function Nt(t,e,i){let o=0;for(const n of e.specificationResults)if(n.status==="fail"){for(const s of n.entityResults)if(!s.passed)for(const a of s.requirementResults){if(a.status!=="fail")continue;if(o>=i.maxTopics)return;const r=s.entityName||`#${s.expressId}`,c=F({title:`${s.entityType}: ${r} - ${a.failureReason??a.checkedDescription}`,description:`Specification: ${n.specification.name}
275
275
  ${n.specification.description??""}
276
276
 
277
- Requirement: ${c.checkedDescription}${s.globalId?`
278
- GlobalId: ${s.globalId}`:""}`,author:i.author,topicType:i.failureTopicType,topicStatus:"Open",labels:["IDS",n.specification.name]});let l;if(s.globalId){const f=`${s.modelId}:${s.expressId}`,m=i.entityBounds?.get(f),u=i.entitySnapshots?.get(f),g=N(s.globalId,i.failureColor,m,u);a.viewpoints.push(g),l=g.guid}const p=I({author:i.author,comment:Z(c),viewpointGuid:l});a.comments.push(p),t.topics.set(a.guid,a),o++}}}function qt(t,e,i,o){const n=[];return e.passed?n.push("IDS Validation Passed — all requirements satisfied"):n.push(`IDS Validation Failure — ${i} of ${o} requirements failed`),n.push(""),n.push(`Specification: ${t.specification.name}`),t.specification.description&&n.push(`Description: ${t.specification.description}`),n.push(`Entity Type: ${e.entityType}`),e.globalId&&n.push(`GlobalId: ${e.globalId}`),e.entityName&&n.push(`Name: ${e.entityName}`),n.join(`
277
+ Requirement: ${a.checkedDescription}${s.globalId?`
278
+ GlobalId: ${s.globalId}`:""}`,author:i.author,topicType:i.failureTopicType,topicStatus:"Open",labels:["IDS",n.specification.name]});let l;if(s.globalId){const f=`${s.modelId}:${s.expressId}`,m=i.entityBounds?.get(f),u=i.entitySnapshots?.get(f),g=N(s.globalId,i.failureColor,m,u);c.viewpoints.push(g),l=g.guid}const p=z({author:i.author,comment:Z(a),viewpointGuid:l});c.comments.push(p),t.topics.set(c.guid,c),o++}}}function qt(t,e,i,o){const n=[];return e.passed?n.push("IDS Validation Passed — all requirements satisfied"):n.push(`IDS Validation Failure — ${i} of ${o} requirements failed`),n.push(""),n.push(`Specification: ${t.specification.name}`),t.specification.description&&n.push(`Description: ${t.specification.description}`),n.push(`Entity Type: ${e.entityType}`),e.globalId&&n.push(`GlobalId: ${e.globalId}`),e.entityName&&n.push(`Name: ${e.entityName}`),n.join(`
279
279
  `)}function Ht(t){const e=[];return e.push(`IDS Specification Failure — ${t.failedCount} of ${t.applicableCount} entities failed`),t.specification.description&&(e.push(""),e.push(t.specification.description)),e.push(""),e.push(`Applicable: ${t.applicableCount}`),e.push(`Passed: ${t.passedCount}`),e.push(`Failed: ${t.failedCount}`),e.join(`
280
280
  `)}function Z(t){const e=[];return e.push(`[${t.facetType}] ${t.checkedDescription}`),t.failureReason&&e.push(`Failure: ${t.failureReason}`),t.expectedValue&&e.push(`Expected: ${t.expectedValue}`),t.actualValue&&e.push(`Actual: ${t.actualValue}`),e.join(`
281
- `)}function Wt(t){const e=(t.min.x+t.max.x)/2,i=(t.min.y+t.max.y)/2,o=(t.min.z+t.max.z)/2,n=t.max.x-t.min.x,s=t.max.y-t.min.y,c=t.max.z-t.min.z,r=Math.max(n,s,c,.1),a=60*Math.PI/180,l=r/2/Math.tan(a/2)*1.5,p=Math.sqrt(.6*.6+.5*.5+.6*.6),f=.6/p*l,m=.5/p*l,u=.6/p*l,g=e+f,d=i+m,x=o+u,w=e-g,b=i-d,v=o-x,T=Math.sqrt(w*w+b*b+v*v);return{cameraViewPoint:{x:g,y:-x,z:d},cameraDirection:{x:w/T,y:-v/T,z:b/T},cameraUpVector:{x:0,y:0,z:1},fieldOfView:60}}function N(t,e,i,o){const n={guid:C(),components:{selection:[{ifcGuid:t}],visibility:{defaultVisibility:!1,exceptions:[{ifcGuid:t}]}}};return e&&(n.components.coloring=[{color:e,components:[{ifcGuid:t}]}]),i&&(n.perspectiveCamera=Wt(i)),o&&(n.snapshot=o),n}function Jt(t,e){const i={guid:C(),components:{selection:t.map(o=>({ifcGuid:o})),visibility:{defaultVisibility:!1,exceptions:t.map(o=>({ifcGuid:o}))}}};return e&&(i.components.coloring=[{color:e,components:t.map(o=>({ifcGuid:o}))}]),i}function ce(t){return{version:t?.version??"2.1",projectId:C(),name:t?.name,topics:new Map}}function ae(t){return{guid:C(),title:t.title,description:t.description,topicType:t.topicType??"Issue",topicStatus:t.topicStatus??"Open",priority:t.priority,creationDate:new Date().toISOString(),creationAuthor:t.author,assignedTo:t.assignedTo,dueDate:t.dueDate,labels:t.labels,comments:[],viewpoints:[]}}function re(t){return{guid:C(),date:new Date().toISOString(),author:t.author,comment:t.comment,viewpointGuid:t.viewpointGuid}}function le(t,e){t.topics.set(e.guid,e)}function pe(t,e){t.comments.push(e),t.modifiedDate=new Date().toISOString()}function fe(t,e){t.viewpoints.push(e),t.modifiedDate=new Date().toISOString()}function ue(t,e,i){t.topicStatus=e,t.modifiedDate=new Date().toISOString(),t.modifiedAuthor=i}export{L as B,pe as a,le as b,fe as c,ne as d,re as e,se as f,ce as g,ae as h,ie as i,oe as j,te as r,ue as u,ee as w};
281
+ `)}function Wt(t){const e=(t.min.x+t.max.x)/2,i=(t.min.y+t.max.y)/2,o=(t.min.z+t.max.z)/2,n=t.max.x-t.min.x,s=t.max.y-t.min.y,a=t.max.z-t.min.z,r=Math.max(n,s,a,.1),c=60*Math.PI/180,l=r/2/Math.tan(c/2)*1.5,p=Math.sqrt(.6*.6+.5*.5+.6*.6),f=.6/p*l,m=.5/p*l,u=.6/p*l,g=e+f,d=i+m,x=o+u,w=e-g,b=i-d,v=o-x,T=Math.sqrt(w*w+b*b+v*v);return{cameraViewPoint:{x:g,y:-x,z:d},cameraDirection:{x:w/T,y:-v/T,z:b/T},cameraUpVector:{x:0,y:0,z:1},fieldOfView:60}}function N(t,e,i,o){const n={guid:C(),components:{selection:[{ifcGuid:t}],visibility:{defaultVisibility:!1,exceptions:[{ifcGuid:t}]}}};return e&&(n.components.coloring=[{color:e,components:[{ifcGuid:t}]}]),i&&(n.perspectiveCamera=Wt(i)),o&&(n.snapshot=o),n}function Jt(t,e){const i={guid:C(),components:{selection:t.map(o=>({ifcGuid:o})),visibility:{defaultVisibility:!1,exceptions:t.map(o=>({ifcGuid:o}))}}};return e&&(i.components.coloring=[{color:e,components:t.map(o=>({ifcGuid:o}))}]),i}function ae(t){return{version:t?.version??"2.1",projectId:C(),name:t?.name,topics:new Map}}function ce(t){return{guid:C(),title:t.title,description:t.description,topicType:t.topicType??"Issue",topicStatus:t.topicStatus??"Open",priority:t.priority,creationDate:new Date().toISOString(),creationAuthor:t.author,assignedTo:t.assignedTo,dueDate:t.dueDate,labels:t.labels,comments:[],viewpoints:[]}}function re(t){return{guid:C(),date:new Date().toISOString(),author:t.author,comment:t.comment,viewpointGuid:t.viewpointGuid}}function le(t,e){t.topics.set(e.guid,e)}function pe(t,e){t.comments.push(e),t.modifiedDate=new Date().toISOString()}function fe(t,e){t.viewpoints.push(e),t.modifiedDate=new Date().toISOString()}function ue(t,e,i){t.topicStatus=e,t.modifiedDate=new Date().toISOString(),t.modifiedAuthor=i}export{L as B,pe as a,le as b,fe as c,ne as d,re as e,se as f,ae as g,ce as h,ie as i,oe as j,te as r,ue as u,ee as w};
@@ -1 +1 @@
1
- import{i as r}from"./pako.esm-Cram60i4.js";import{B as o}from"./geotiff-D1tvcDCb.js";import"./sandbox-VLI_y7cl.js";import"./lens-CpjUdqpw.js";import"./__vite-browser-external-B1O5LaIO.js";class d extends o{decodeBlock(e){return r(new Uint8Array(e)).buffer}}export{d as default};
1
+ import{i as r}from"./pako.esm-Cram60i4.js";import{B as o}from"./geotiff-y0ZxbRJd.js";import"./sandbox-DETNEyQb.js";import"./lens-PYsLu_MA.js";import"./__vite-browser-external-B1O5LaIO.js";class d extends o{decodeBlock(e){return r(new Uint8Array(e)).buffer}}export{d as default};