@ifc-lite/create 3.2.0 → 5.1.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 (426) hide show
  1. package/README.md +43 -0
  2. package/dist/in-store/align-boxes.d.ts +38 -0
  3. package/dist/in-store/align-boxes.d.ts.map +1 -0
  4. package/dist/in-store/align-boxes.js +97 -0
  5. package/dist/in-store/align-boxes.js.map +1 -0
  6. package/dist/in-store/anchor.d.ts.map +1 -1
  7. package/dist/in-store/anchor.js +13 -2
  8. package/dist/in-store/anchor.js.map +1 -1
  9. package/dist/in-store/auto-space-detect.d.ts +1 -1
  10. package/dist/in-store/auto-space-detect.js +1 -1
  11. package/dist/in-store/beam.d.ts +10 -1
  12. package/dist/in-store/beam.d.ts.map +1 -1
  13. package/dist/in-store/beam.js +17 -35
  14. package/dist/in-store/beam.js.map +1 -1
  15. package/dist/in-store/column.d.ts +10 -1
  16. package/dist/in-store/column.d.ts.map +1 -1
  17. package/dist/in-store/column.js +23 -22
  18. package/dist/in-store/column.js.map +1 -1
  19. package/dist/in-store/copy-array.d.ts +17 -0
  20. package/dist/in-store/copy-array.d.ts.map +1 -0
  21. package/dist/in-store/copy-array.js +47 -0
  22. package/dist/in-store/copy-array.js.map +1 -0
  23. package/dist/in-store/copy-batch.d.ts +27 -0
  24. package/dist/in-store/copy-batch.d.ts.map +1 -0
  25. package/dist/in-store/copy-batch.js +101 -0
  26. package/dist/in-store/copy-batch.js.map +1 -0
  27. package/dist/in-store/copy-dependent-walk.d.ts +27 -0
  28. package/dist/in-store/copy-dependent-walk.d.ts.map +1 -0
  29. package/dist/in-store/copy-dependent-walk.js +61 -0
  30. package/dist/in-store/copy-dependent-walk.js.map +1 -0
  31. package/dist/in-store/copy-frame.d.ts +53 -0
  32. package/dist/in-store/copy-frame.d.ts.map +1 -0
  33. package/dist/in-store/copy-frame.js +112 -0
  34. package/dist/in-store/copy-frame.js.map +1 -0
  35. package/dist/in-store/copy-product.d.ts +76 -0
  36. package/dist/in-store/copy-product.d.ts.map +1 -0
  37. package/dist/in-store/copy-product.js +318 -0
  38. package/dist/in-store/copy-product.js.map +1 -0
  39. package/dist/in-store/curtain-wall.d.ts +87 -0
  40. package/dist/in-store/curtain-wall.d.ts.map +1 -0
  41. package/dist/in-store/curtain-wall.js +237 -0
  42. package/dist/in-store/curtain-wall.js.map +1 -0
  43. package/dist/in-store/edit/effective-mutation-view.d.ts +6 -0
  44. package/dist/in-store/edit/effective-mutation-view.d.ts.map +1 -0
  45. package/dist/in-store/edit/effective-mutation-view.js +45 -0
  46. package/dist/in-store/edit/effective-mutation-view.js.map +1 -0
  47. package/dist/in-store/edit/effective-storey.d.ts +13 -0
  48. package/dist/in-store/edit/effective-storey.d.ts.map +1 -0
  49. package/dist/in-store/edit/effective-storey.js +36 -0
  50. package/dist/in-store/edit/effective-storey.js.map +1 -0
  51. package/dist/in-store/edit/effective-storeys.d.ts +9 -0
  52. package/dist/in-store/edit/effective-storeys.d.ts.map +1 -0
  53. package/dist/in-store/edit/effective-storeys.js +16 -0
  54. package/dist/in-store/edit/effective-storeys.js.map +1 -0
  55. package/dist/in-store/edit/hosted-opening-refit.d.ts +29 -0
  56. package/dist/in-store/edit/hosted-opening-refit.d.ts.map +1 -0
  57. package/dist/in-store/edit/hosted-opening-refit.js +168 -0
  58. package/dist/in-store/edit/hosted-opening-refit.js.map +1 -0
  59. package/dist/in-store/edit/length-unit-scale.d.ts +24 -0
  60. package/dist/in-store/edit/length-unit-scale.d.ts.map +1 -0
  61. package/dist/in-store/edit/length-unit-scale.js +37 -0
  62. package/dist/in-store/edit/length-unit-scale.js.map +1 -0
  63. package/dist/in-store/edit/linear-element-edit.d.ts +131 -0
  64. package/dist/in-store/edit/linear-element-edit.d.ts.map +1 -0
  65. package/dist/in-store/edit/linear-element-edit.js +259 -0
  66. package/dist/in-store/edit/linear-element-edit.js.map +1 -0
  67. package/dist/in-store/edit/metadata-clone-effective.d.ts +5 -0
  68. package/dist/in-store/edit/metadata-clone-effective.d.ts.map +1 -0
  69. package/dist/in-store/edit/metadata-clone-effective.js +47 -0
  70. package/dist/in-store/edit/metadata-clone-effective.js.map +1 -0
  71. package/dist/in-store/edit/metadata-clone.d.ts +40 -0
  72. package/dist/in-store/edit/metadata-clone.d.ts.map +1 -0
  73. package/dist/in-store/edit/metadata-clone.js +107 -0
  74. package/dist/in-store/edit/metadata-clone.js.map +1 -0
  75. package/dist/in-store/edit/placement-core.d.ts +140 -0
  76. package/dist/in-store/edit/placement-core.d.ts.map +1 -0
  77. package/dist/in-store/edit/placement-core.js +317 -0
  78. package/dist/in-store/edit/placement-core.js.map +1 -0
  79. package/dist/in-store/edit/polygon-clip.d.ts +58 -0
  80. package/dist/in-store/edit/polygon-clip.d.ts.map +1 -0
  81. package/dist/in-store/edit/polygon-clip.js +153 -0
  82. package/dist/in-store/edit/polygon-clip.js.map +1 -0
  83. package/dist/in-store/edit/read-profile.d.ts +6 -0
  84. package/dist/in-store/edit/read-profile.d.ts.map +1 -0
  85. package/dist/in-store/edit/read-profile.js +95 -0
  86. package/dist/in-store/edit/read-profile.js.map +1 -0
  87. package/dist/in-store/edit/slab-edit-frame.d.ts +40 -0
  88. package/dist/in-store/edit/slab-edit-frame.d.ts.map +1 -0
  89. package/dist/in-store/edit/slab-edit-frame.js +146 -0
  90. package/dist/in-store/edit/slab-edit-frame.js.map +1 -0
  91. package/dist/in-store/edit/slab-edit.d.ts +112 -0
  92. package/dist/in-store/edit/slab-edit.d.ts.map +1 -0
  93. package/dist/in-store/edit/slab-edit.js +275 -0
  94. package/dist/in-store/edit/slab-edit.js.map +1 -0
  95. package/dist/in-store/edit/slab-opening-carry.d.ts +10 -0
  96. package/dist/in-store/edit/slab-opening-carry.d.ts.map +1 -0
  97. package/dist/in-store/edit/slab-opening-carry.js +65 -0
  98. package/dist/in-store/edit/slab-opening-carry.js.map +1 -0
  99. package/dist/in-store/edit/split-guid.d.ts +29 -0
  100. package/dist/in-store/edit/split-guid.d.ts.map +1 -0
  101. package/dist/in-store/edit/split-guid.js +64 -0
  102. package/dist/in-store/edit/split-guid.js.map +1 -0
  103. package/dist/in-store/edit/split-target.d.ts +90 -0
  104. package/dist/in-store/edit/split-target.d.ts.map +1 -0
  105. package/dist/in-store/edit/split-target.js +116 -0
  106. package/dist/in-store/edit/split-target.js.map +1 -0
  107. package/dist/in-store/edit/target.d.ts +8 -0
  108. package/dist/in-store/edit/target.d.ts.map +1 -0
  109. package/dist/in-store/edit/target.js +5 -0
  110. package/dist/in-store/edit/target.js.map +1 -0
  111. package/dist/in-store/edit/trim-extend-geometry.d.ts +99 -0
  112. package/dist/in-store/edit/trim-extend-geometry.d.ts.map +1 -0
  113. package/dist/in-store/edit/trim-extend-geometry.js +105 -0
  114. package/dist/in-store/edit/trim-extend-geometry.js.map +1 -0
  115. package/dist/in-store/edit/wall-axis-edit.d.ts +16 -0
  116. package/dist/in-store/edit/wall-axis-edit.d.ts.map +1 -0
  117. package/dist/in-store/edit/wall-axis-edit.js +40 -0
  118. package/dist/in-store/edit/wall-axis-edit.js.map +1 -0
  119. package/dist/in-store/edit/wall-edit.d.ts +157 -0
  120. package/dist/in-store/edit/wall-edit.d.ts.map +1 -0
  121. package/dist/in-store/edit/wall-edit.js +276 -0
  122. package/dist/in-store/edit/wall-edit.js.map +1 -0
  123. package/dist/in-store/edit/wall-hosted-cuts.d.ts +35 -0
  124. package/dist/in-store/edit/wall-hosted-cuts.d.ts.map +1 -0
  125. package/dist/in-store/edit/wall-hosted-cuts.js +27 -0
  126. package/dist/in-store/edit/wall-hosted-cuts.js.map +1 -0
  127. package/dist/in-store/edit/wall-opening-reassign.d.ts +18 -0
  128. package/dist/in-store/edit/wall-opening-reassign.d.ts.map +1 -0
  129. package/dist/in-store/edit/wall-opening-reassign.js +50 -0
  130. package/dist/in-store/edit/wall-opening-reassign.js.map +1 -0
  131. package/dist/in-store/element-align.d.ts +13 -0
  132. package/dist/in-store/element-align.d.ts.map +1 -0
  133. package/dist/in-store/element-align.js +90 -0
  134. package/dist/in-store/element-align.js.map +1 -0
  135. package/dist/in-store/element-replacement.d.ts +26 -0
  136. package/dist/in-store/element-replacement.d.ts.map +1 -0
  137. package/dist/in-store/element-replacement.js +68 -0
  138. package/dist/in-store/element-replacement.js.map +1 -0
  139. package/dist/in-store/element-size-edit.d.ts +40 -0
  140. package/dist/in-store/element-size-edit.d.ts.map +1 -0
  141. package/dist/in-store/element-size-edit.js +103 -0
  142. package/dist/in-store/element-size-edit.js.map +1 -0
  143. package/dist/in-store/element-split-axis.d.ts +6 -0
  144. package/dist/in-store/element-split-axis.d.ts.map +1 -0
  145. package/dist/in-store/element-split-axis.js +87 -0
  146. package/dist/in-store/element-split-axis.js.map +1 -0
  147. package/dist/in-store/element-split-joined.d.ts +13 -0
  148. package/dist/in-store/element-split-joined.d.ts.map +1 -0
  149. package/dist/in-store/element-split-joined.js +74 -0
  150. package/dist/in-store/element-split-joined.js.map +1 -0
  151. package/dist/in-store/element-split-placement.d.ts +19 -0
  152. package/dist/in-store/element-split-placement.d.ts.map +1 -0
  153. package/dist/in-store/element-split-placement.js +48 -0
  154. package/dist/in-store/element-split-placement.js.map +1 -0
  155. package/dist/in-store/element-split-slab.d.ts +19 -0
  156. package/dist/in-store/element-split-slab.d.ts.map +1 -0
  157. package/dist/in-store/element-split-slab.js +86 -0
  158. package/dist/in-store/element-split-slab.js.map +1 -0
  159. package/dist/in-store/element-split.d.ts +49 -0
  160. package/dist/in-store/element-split.d.ts.map +1 -0
  161. package/dist/in-store/element-split.js +52 -0
  162. package/dist/in-store/element-split.js.map +1 -0
  163. package/dist/in-store/element-transform-edit.d.ts +33 -0
  164. package/dist/in-store/element-transform-edit.d.ts.map +1 -0
  165. package/dist/in-store/element-transform-edit.js +97 -0
  166. package/dist/in-store/element-transform-edit.js.map +1 -0
  167. package/dist/in-store/element-transform-frames.d.ts +58 -0
  168. package/dist/in-store/element-transform-frames.d.ts.map +1 -0
  169. package/dist/in-store/element-transform-frames.js +110 -0
  170. package/dist/in-store/element-transform-frames.js.map +1 -0
  171. package/dist/in-store/element-transform-joins.d.ts +4 -0
  172. package/dist/in-store/element-transform-joins.d.ts.map +1 -0
  173. package/dist/in-store/element-transform-joins.js +62 -0
  174. package/dist/in-store/element-transform-joins.js.map +1 -0
  175. package/dist/in-store/element-transform-plan.d.ts +38 -0
  176. package/dist/in-store/element-transform-plan.d.ts.map +1 -0
  177. package/dist/in-store/element-transform-plan.js +115 -0
  178. package/dist/in-store/element-transform-plan.js.map +1 -0
  179. package/dist/in-store/element-trim-extend.d.ts +25 -0
  180. package/dist/in-store/element-trim-extend.d.ts.map +1 -0
  181. package/dist/in-store/element-trim-extend.js +97 -0
  182. package/dist/in-store/element-trim-extend.js.map +1 -0
  183. package/dist/in-store/extract-grids.d.ts +36 -0
  184. package/dist/in-store/extract-grids.d.ts.map +1 -0
  185. package/dist/in-store/extract-grids.js +220 -0
  186. package/dist/in-store/extract-grids.js.map +1 -0
  187. package/dist/in-store/extract-walls.d.ts +12 -23
  188. package/dist/in-store/extract-walls.d.ts.map +1 -1
  189. package/dist/in-store/extract-walls.js +6 -69
  190. package/dist/in-store/extract-walls.js.map +1 -1
  191. package/dist/in-store/generate-spaces.d.ts +1 -1
  192. package/dist/in-store/grid-column.d.ts +23 -0
  193. package/dist/in-store/grid-column.d.ts.map +1 -0
  194. package/dist/in-store/grid-column.js +73 -0
  195. package/dist/in-store/grid-column.js.map +1 -0
  196. package/dist/in-store/grid-intersection-read.d.ts +10 -0
  197. package/dist/in-store/grid-intersection-read.d.ts.map +1 -0
  198. package/dist/in-store/grid-intersection-read.js +45 -0
  199. package/dist/in-store/grid-intersection-read.js.map +1 -0
  200. package/dist/in-store/grid.d.ts +124 -0
  201. package/dist/in-store/grid.d.ts.map +1 -0
  202. package/dist/in-store/grid.js +204 -0
  203. package/dist/in-store/grid.js.map +1 -0
  204. package/dist/in-store/group-evidence.d.ts +49 -0
  205. package/dist/in-store/group-evidence.d.ts.map +1 -0
  206. package/dist/in-store/group-evidence.js +111 -0
  207. package/dist/in-store/group-evidence.js.map +1 -0
  208. package/dist/in-store/group-graph.d.ts +51 -0
  209. package/dist/in-store/group-graph.d.ts.map +1 -0
  210. package/dist/in-store/group-graph.js +213 -0
  211. package/dist/in-store/group-graph.js.map +1 -0
  212. package/dist/in-store/group.d.ts +34 -0
  213. package/dist/in-store/group.d.ts.map +1 -0
  214. package/dist/in-store/group.js +181 -0
  215. package/dist/in-store/group.js.map +1 -0
  216. package/dist/in-store/host-geometry-frame.d.ts +48 -0
  217. package/dist/in-store/host-geometry-frame.d.ts.map +1 -0
  218. package/dist/in-store/host-geometry-frame.js +190 -0
  219. package/dist/in-store/host-geometry-frame.js.map +1 -0
  220. package/dist/in-store/hosted-element-edit.d.ts +29 -0
  221. package/dist/in-store/hosted-element-edit.d.ts.map +1 -0
  222. package/dist/in-store/hosted-element-edit.js +120 -0
  223. package/dist/in-store/hosted-element-edit.js.map +1 -0
  224. package/dist/in-store/hosted-element.d.ts +41 -0
  225. package/dist/in-store/hosted-element.d.ts.map +1 -0
  226. package/dist/in-store/hosted-element.js +124 -0
  227. package/dist/in-store/hosted-element.js.map +1 -0
  228. package/dist/in-store/hosted-fill-read.d.ts +56 -0
  229. package/dist/in-store/hosted-fill-read.d.ts.map +1 -0
  230. package/dist/in-store/hosted-fill-read.js +197 -0
  231. package/dist/in-store/hosted-fill-read.js.map +1 -0
  232. package/dist/in-store/hosted-global-id.d.ts +8 -0
  233. package/dist/in-store/hosted-global-id.d.ts.map +1 -0
  234. package/dist/in-store/hosted-global-id.js +53 -0
  235. package/dist/in-store/hosted-global-id.js.map +1 -0
  236. package/dist/in-store/hosted-placement-edit.d.ts +30 -0
  237. package/dist/in-store/hosted-placement-edit.d.ts.map +1 -0
  238. package/dist/in-store/hosted-placement-edit.js +123 -0
  239. package/dist/in-store/hosted-placement-edit.js.map +1 -0
  240. package/dist/in-store/hosted-scale-chain.d.ts +12 -0
  241. package/dist/in-store/hosted-scale-chain.d.ts.map +1 -0
  242. package/dist/in-store/hosted-scale-chain.js +74 -0
  243. package/dist/in-store/hosted-scale-chain.js.map +1 -0
  244. package/dist/in-store/hosted-shape-edit.d.ts +9 -0
  245. package/dist/in-store/hosted-shape-edit.d.ts.map +1 -0
  246. package/dist/in-store/hosted-shape-edit.js +79 -0
  247. package/dist/in-store/hosted-shape-edit.js.map +1 -0
  248. package/dist/in-store/index.d.ts +66 -0
  249. package/dist/in-store/index.d.ts.map +1 -0
  250. package/dist/in-store/index.js +71 -0
  251. package/dist/in-store/index.js.map +1 -0
  252. package/dist/in-store/linear-profile-frame.d.ts +10 -0
  253. package/dist/in-store/linear-profile-frame.d.ts.map +1 -0
  254. package/dist/in-store/linear-profile-frame.js +17 -0
  255. package/dist/in-store/linear-profile-frame.js.map +1 -0
  256. package/dist/in-store/material.d.ts.map +1 -1
  257. package/dist/in-store/material.js +17 -6
  258. package/dist/in-store/material.js.map +1 -1
  259. package/dist/in-store/member.d.ts +8 -2
  260. package/dist/in-store/member.d.ts.map +1 -1
  261. package/dist/in-store/member.js +15 -21
  262. package/dist/in-store/member.js.map +1 -1
  263. package/dist/in-store/ordinary-element.d.ts +47 -0
  264. package/dist/in-store/ordinary-element.d.ts.map +1 -0
  265. package/dist/in-store/ordinary-element.js +38 -0
  266. package/dist/in-store/ordinary-element.js.map +1 -0
  267. package/dist/in-store/placement-frame.d.ts +15 -5
  268. package/dist/in-store/placement-frame.d.ts.map +1 -1
  269. package/dist/in-store/placement-frame.js +25 -36
  270. package/dist/in-store/placement-frame.js.map +1 -1
  271. package/dist/in-store/profile.d.ts +141 -0
  272. package/dist/in-store/profile.d.ts.map +1 -0
  273. package/dist/in-store/profile.js +174 -0
  274. package/dist/in-store/profile.js.map +1 -0
  275. package/dist/in-store/railing.d.ts +65 -0
  276. package/dist/in-store/railing.d.ts.map +1 -0
  277. package/dist/in-store/railing.js +112 -0
  278. package/dist/in-store/railing.js.map +1 -0
  279. package/dist/in-store/rel-connects-path.d.ts +43 -0
  280. package/dist/in-store/rel-connects-path.d.ts.map +1 -0
  281. package/dist/in-store/rel-connects-path.js +65 -0
  282. package/dist/in-store/rel-connects-path.js.map +1 -0
  283. package/dist/in-store/resolve-anchor.d.ts +3 -2
  284. package/dist/in-store/resolve-anchor.d.ts.map +1 -1
  285. package/dist/in-store/resolve-anchor.js +7 -5
  286. package/dist/in-store/resolve-anchor.js.map +1 -1
  287. package/dist/in-store/resolve-host.d.ts +12 -1
  288. package/dist/in-store/resolve-host.d.ts.map +1 -1
  289. package/dist/in-store/resolve-host.js +169 -85
  290. package/dist/in-store/resolve-host.js.map +1 -1
  291. package/dist/in-store/resolve-relations.d.ts +3 -1
  292. package/dist/in-store/resolve-relations.d.ts.map +1 -1
  293. package/dist/in-store/resolve-relations.js +8 -3
  294. package/dist/in-store/resolve-relations.js.map +1 -1
  295. package/dist/in-store/resolve-source.d.ts.map +1 -1
  296. package/dist/in-store/resolve-source.js +39 -59
  297. package/dist/in-store/resolve-source.js.map +1 -1
  298. package/dist/in-store/room-candidates.d.ts +58 -0
  299. package/dist/in-store/room-candidates.d.ts.map +1 -0
  300. package/dist/in-store/room-candidates.js +135 -0
  301. package/dist/in-store/room-candidates.js.map +1 -0
  302. package/dist/in-store/room-creation-plan.d.ts +16 -0
  303. package/dist/in-store/room-creation-plan.d.ts.map +1 -0
  304. package/dist/in-store/room-creation-plan.js +28 -0
  305. package/dist/in-store/room-creation-plan.js.map +1 -0
  306. package/dist/in-store/room-floor-height.d.ts +24 -0
  307. package/dist/in-store/room-floor-height.d.ts.map +1 -0
  308. package/dist/in-store/room-floor-height.js +32 -0
  309. package/dist/in-store/room-floor-height.js.map +1 -0
  310. package/dist/in-store/room-footprint-native.d.ts +19 -0
  311. package/dist/in-store/room-footprint-native.d.ts.map +1 -0
  312. package/dist/in-store/room-footprint-native.js +117 -0
  313. package/dist/in-store/room-footprint-native.js.map +1 -0
  314. package/dist/in-store/room-layout-cache.d.ts +23 -0
  315. package/dist/in-store/room-layout-cache.d.ts.map +1 -0
  316. package/dist/in-store/room-layout-cache.js +84 -0
  317. package/dist/in-store/room-layout-cache.js.map +1 -0
  318. package/dist/in-store/room-layout-core.d.ts +68 -0
  319. package/dist/in-store/room-layout-core.d.ts.map +1 -0
  320. package/dist/in-store/room-layout-core.js +153 -0
  321. package/dist/in-store/room-layout-core.js.map +1 -0
  322. package/dist/in-store/room-population.d.ts +5 -0
  323. package/dist/in-store/room-population.d.ts.map +1 -0
  324. package/dist/in-store/room-population.js +28 -0
  325. package/dist/in-store/room-population.js.map +1 -0
  326. package/dist/in-store/room-space-meshes.d.ts +15 -0
  327. package/dist/in-store/room-space-meshes.d.ts.map +1 -0
  328. package/dist/in-store/room-space-meshes.js +38 -0
  329. package/dist/in-store/room-space-meshes.js.map +1 -0
  330. package/dist/in-store/room-store.d.ts +55 -0
  331. package/dist/in-store/room-store.d.ts.map +1 -0
  332. package/dist/in-store/room-store.js +173 -0
  333. package/dist/in-store/room-store.js.map +1 -0
  334. package/dist/in-store/room-storey-elevation.d.ts +5 -0
  335. package/dist/in-store/room-storey-elevation.d.ts.map +1 -0
  336. package/dist/in-store/room-storey-elevation.js +42 -0
  337. package/dist/in-store/room-storey-elevation.js.map +1 -0
  338. package/dist/in-store/room-storey-frame.d.ts +47 -0
  339. package/dist/in-store/room-storey-frame.d.ts.map +1 -0
  340. package/dist/in-store/room-storey-frame.js +48 -0
  341. package/dist/in-store/room-storey-frame.js.map +1 -0
  342. package/dist/in-store/room-wall-rects.d.ts +117 -0
  343. package/dist/in-store/room-wall-rects.d.ts.map +1 -0
  344. package/dist/in-store/room-wall-rects.js +157 -0
  345. package/dist/in-store/room-wall-rects.js.map +1 -0
  346. package/dist/in-store/schema-attributes.d.ts +8 -3
  347. package/dist/in-store/schema-attributes.d.ts.map +1 -1
  348. package/dist/in-store/schema-attributes.js +18 -9
  349. package/dist/in-store/schema-attributes.js.map +1 -1
  350. package/dist/in-store/slab.d.ts.map +1 -1
  351. package/dist/in-store/slab.js +1 -4
  352. package/dist/in-store/slab.js.map +1 -1
  353. package/dist/in-store/space-footprints.d.ts +55 -0
  354. package/dist/in-store/space-footprints.d.ts.map +1 -0
  355. package/dist/in-store/space-footprints.js +260 -0
  356. package/dist/in-store/space-footprints.js.map +1 -0
  357. package/dist/in-store/space.d.ts.map +1 -1
  358. package/dist/in-store/space.js +15 -3
  359. package/dist/in-store/space.js.map +1 -1
  360. package/dist/in-store/spatial-children.d.ts +1 -1
  361. package/dist/in-store/spatial-children.js +1 -1
  362. package/dist/in-store/stair-edit.d.ts +24 -0
  363. package/dist/in-store/stair-edit.d.ts.map +1 -0
  364. package/dist/in-store/stair-edit.js +190 -0
  365. package/dist/in-store/stair-edit.js.map +1 -0
  366. package/dist/in-store/stair-removal.d.ts +17 -0
  367. package/dist/in-store/stair-removal.d.ts.map +1 -0
  368. package/dist/in-store/stair-removal.js +134 -0
  369. package/dist/in-store/stair-removal.js.map +1 -0
  370. package/dist/in-store/stair.d.ts +58 -0
  371. package/dist/in-store/stair.d.ts.map +1 -0
  372. package/dist/in-store/stair.js +156 -0
  373. package/dist/in-store/stair.js.map +1 -0
  374. package/dist/in-store/storey-plan-frame.d.ts +2 -1
  375. package/dist/in-store/storey-plan-frame.d.ts.map +1 -1
  376. package/dist/in-store/storey-plan-frame.js +20 -11
  377. package/dist/in-store/storey-plan-frame.js.map +1 -1
  378. package/dist/in-store/storey-reassignment-plan.d.ts +53 -0
  379. package/dist/in-store/storey-reassignment-plan.d.ts.map +1 -0
  380. package/dist/in-store/storey-reassignment-plan.js +237 -0
  381. package/dist/in-store/storey-reassignment-plan.js.map +1 -0
  382. package/dist/in-store/storey-reassignment.d.ts +8 -0
  383. package/dist/in-store/storey-reassignment.d.ts.map +1 -0
  384. package/dist/in-store/storey-reassignment.js +52 -0
  385. package/dist/in-store/storey-reassignment.js.map +1 -0
  386. package/dist/in-store/trim-extend-plan.d.ts +27 -0
  387. package/dist/in-store/trim-extend-plan.d.ts.map +1 -0
  388. package/dist/in-store/trim-extend-plan.js +49 -0
  389. package/dist/in-store/trim-extend-plan.js.map +1 -0
  390. package/dist/in-store/wall-join-apply.d.ts +74 -0
  391. package/dist/in-store/wall-join-apply.d.ts.map +1 -0
  392. package/dist/in-store/wall-join-apply.js +137 -0
  393. package/dist/in-store/wall-join-apply.js.map +1 -0
  394. package/dist/in-store/wall-join-edit.d.ts +53 -0
  395. package/dist/in-store/wall-join-edit.d.ts.map +1 -0
  396. package/dist/in-store/wall-join-edit.js +251 -0
  397. package/dist/in-store/wall-join-edit.js.map +1 -0
  398. package/dist/in-store/wall-join-read.d.ts +60 -0
  399. package/dist/in-store/wall-join-read.d.ts.map +1 -0
  400. package/dist/in-store/wall-join-read.js +230 -0
  401. package/dist/in-store/wall-join-read.js.map +1 -0
  402. package/dist/in-store/wall-join.d.ts +122 -0
  403. package/dist/in-store/wall-join.d.ts.map +1 -0
  404. package/dist/in-store/wall-join.js +231 -0
  405. package/dist/in-store/wall-join.js.map +1 -0
  406. package/dist/in-store/wall-opening-fit.d.ts +11 -0
  407. package/dist/in-store/wall-opening-fit.d.ts.map +1 -0
  408. package/dist/in-store/wall-opening-fit.js +27 -0
  409. package/dist/in-store/wall-opening-fit.js.map +1 -0
  410. package/dist/in-store/wall-section-edit.d.ts +16 -0
  411. package/dist/in-store/wall-section-edit.d.ts.map +1 -0
  412. package/dist/in-store/wall-section-edit.js +75 -0
  413. package/dist/in-store/wall-section-edit.js.map +1 -0
  414. package/dist/in-store/wall-size-edit.d.ts +29 -0
  415. package/dist/in-store/wall-size-edit.d.ts.map +1 -0
  416. package/dist/in-store/wall-size-edit.js +65 -0
  417. package/dist/in-store/wall-size-edit.js.map +1 -0
  418. package/dist/in-store/wall.d.ts +32 -0
  419. package/dist/in-store/wall.d.ts.map +1 -1
  420. package/dist/in-store/wall.js +77 -13
  421. package/dist/in-store/wall.js.map +1 -1
  422. package/dist/index.d.ts +25 -38
  423. package/dist/index.d.ts.map +1 -1
  424. package/dist/index.js +25 -40
  425. package/dist/index.js.map +1 -1
  426. package/package.json +9 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stair.d.ts","sourceRoot":"","sources":["../../src/in-store/stair.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjF,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,GACb,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiBzB;AAED,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAmB9E;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,kBAAkB,GACzB,gBAAgB,CAoFlB;AAED,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;;;EAgBnI"}
@@ -0,0 +1,156 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /**
5
+ * Anchored builder for a straight-run stair (#6232): an IfcStair contained in
6
+ * the storey, aggregating one IfcStairFlight that carries the body.
7
+ *
8
+ * Same footprint as `IfcCreator.addIfcStair` (`Position` is the foot of the
9
+ * first riser, the run goes along local +X rotated by `Direction`, the width
10
+ * spans local +Y, step i covers x in [i·T, (i+1)·T] and rises to (i+1)·R), but
11
+ * the body is one extruded stepped profile instead of one box per riser: a
12
+ * single IfcArbitraryClosedProfileDef in the stair's XZ plane, extruded across
13
+ * the width. With `WaistThickness` the underside follows the pitch line (a
14
+ * cast-in-place flight); without it the flight is solid down to its base, the
15
+ * volume IfcCreator's stacked treads enclose.
16
+ *
17
+ * The IfcStair itself has no representation: its geometry is its flight's,
18
+ * which is how IFC4 decomposes a stair (IfcRelAggregates, stair -> flight).
19
+ * The flight's placement is relative to the stair's, so moving the stair
20
+ * moves the flight.
21
+ *
22
+ * Schema gating (D2): attributes are laid out from the target schema's
23
+ * registry, so IFC2X3 gets `IfcStair.ShapeType` and
24
+ * `IfcStairFlight.NumberOfRiser` (its spelling) with no flight PredefinedType,
25
+ * IFC4/IFC4X3 get `PredefinedType`s, and IFC5 is refused.
26
+ */
27
+ import { generateIfcGuid } from '@ifc-lite/encoding';
28
+ import { assertFinitePoint3 } from '../ifc-creator-math.js';
29
+ import { toNativeLength, toNativePoint3 } from './anchor.js';
30
+ import { assertPositiveFinite, emitBodyRepresentation, emitLocalPlacement, emitPolygonProfile, emitRelContainedInSpatialStructure, ownerHistoryRef, productGuid, } from './_emit-helpers.js';
31
+ import { schemaAttributes, schemaRegistry } from './schema-attributes.js';
32
+ /**
33
+ * The flight's side outline in (run, rise) coordinates, native units: the
34
+ * stepped top, then the underside. Counter-clockwise.
35
+ */
36
+ export function stairFlightOutline(risers, riser, tread, waist) {
37
+ const top = [[0, 0]];
38
+ for (let i = 0; i < risers; i++) {
39
+ top.push([i * tread, (i + 1) * riser], [(i + 1) * tread, (i + 1) * riser]);
40
+ }
41
+ const run = risers * tread;
42
+ const rise = risers * riser;
43
+ if (waist === undefined) {
44
+ // Solid to the base: down the back, along the floor.
45
+ return [...top, [run, 0]].reverse();
46
+ }
47
+ // Underside parallel to the pitch line z = x·R/T, `waist` below it
48
+ // (perpendicular), i.e. a vertical drop of waist / cos(pitch).
49
+ const drop = waist * Math.hypot(riser, tread) / tread;
50
+ const foot = drop * tread / riser; // where the underside meets the floor
51
+ const underside = [[run, rise - drop], [foot, 0]];
52
+ return [...top, ...underside].reverse();
53
+ }
54
+ /** Package-private validation shared by creation and occurrence edits. */
55
+ export function assertStairParams(params, op) {
56
+ assertFinitePoint3({ Position: params.Position }, op);
57
+ if (!Number.isInteger(params.NumberOfRisers) || params.NumberOfRisers < 1) {
58
+ throw new Error(`${op}: NumberOfRisers must be a positive integer`);
59
+ }
60
+ assertPositiveFinite([params.RiserHeight, params.TreadLength, params.Width], `${op}: RiserHeight, TreadLength and Width must be finite positive numbers`);
61
+ if (params.Direction !== undefined && !Number.isFinite(params.Direction)) {
62
+ throw new Error(`${op}: Direction must be a finite number (radians)`);
63
+ }
64
+ if (params.WaistThickness !== undefined) {
65
+ assertPositiveFinite([params.WaistThickness], `${op}: WaistThickness must be a finite positive number`);
66
+ const drop = params.WaistThickness * Math.hypot(params.RiserHeight, params.TreadLength) / params.TreadLength;
67
+ if (drop >= params.NumberOfRisers * params.RiserHeight) {
68
+ throw new Error(`${op}: WaistThickness is too thick for a flight of this height`);
69
+ }
70
+ }
71
+ }
72
+ export function addStairToStore(editor, anchor, params) {
73
+ const op = 'addStairToStore';
74
+ assertStairParams(params, op);
75
+ const registry = schemaRegistry(anchor.schema, op);
76
+ const isIfc2x3 = registry.name.toUpperCase() === 'IFC2X3';
77
+ const shapeType = params.PredefinedType ?? 'STRAIGHT_RUN_STAIR';
78
+ const stairGuid = productGuid(params, anchor.guidRandom);
79
+ const flightGuid = productGuid({ GlobalId: params.FlightGlobalId }, anchor.guidRandom);
80
+ const stairValues = (placement) => ({
81
+ GlobalId: stairGuid,
82
+ OwnerHistory: ownerHistoryRef(anchor.ownerHistoryId),
83
+ Name: params.Name ?? 'Stair',
84
+ Description: params.Description,
85
+ ObjectType: params.ObjectType,
86
+ ObjectPlacement: placement,
87
+ Tag: params.Tag,
88
+ [isIfc2x3 ? 'ShapeType' : 'PredefinedType']: shapeType,
89
+ });
90
+ // Lay the stair record out once before the first emit, so a bad
91
+ // PredefinedType or a missing IFC2X3 OwnerHistory refuses cleanly.
92
+ schemaAttributes(registry, 'IfcStair', stairValues(null), op);
93
+ const riser = toNativeLength(anchor, params.RiserHeight);
94
+ const tread = toNativeLength(anchor, params.TreadLength);
95
+ const width = toNativeLength(anchor, params.Width);
96
+ const waist = params.WaistThickness === undefined ? undefined : toNativeLength(anchor, params.WaistThickness);
97
+ const direction = params.Direction ?? 0;
98
+ // Stair placement: at Position, local X along the run. Written with
99
+ // explicit axes so the stair can be turned later (rotateEntity edits the
100
+ // RefDirection).
101
+ const placementId = emitLocalPlacement(editor, anchor.storeyPlacementId, toNativePoint3(anchor, params.Position), [0, 0, 1], [Math.cos(direction), Math.sin(direction), 0]);
102
+ const flightPlacementId = emitLocalPlacement(editor, placementId, [0, 0, 0]);
103
+ const { profileId, solidId } = emitStairFlightBody(editor, params.NumberOfRisers, riser, tread, width, waist);
104
+ const { shapeRepId, productShapeId } = emitBodyRepresentation(editor, anchor.bodyContextId, solidId);
105
+ const stairId = editor.addEntity('IfcStair', schemaAttributes(registry, 'IfcStair', stairValues(`#${placementId}`), op)).expressId;
106
+ const flightId = editor.addEntity('IfcStairFlight', schemaAttributes(registry, 'IfcStairFlight', {
107
+ GlobalId: flightGuid,
108
+ OwnerHistory: ownerHistoryRef(anchor.ownerHistoryId),
109
+ Name: `${params.Name ?? 'Stair'} Flight`,
110
+ ObjectPlacement: `#${flightPlacementId}`,
111
+ Representation: `#${productShapeId}`,
112
+ [isIfc2x3 ? 'NumberOfRiser' : 'NumberOfRisers']: params.NumberOfRisers,
113
+ NumberOfTreads: params.NumberOfRisers,
114
+ RiserHeight: riser,
115
+ TreadLength: tread,
116
+ ...(isIfc2x3 ? {} : { PredefinedType: 'STRAIGHT' }),
117
+ }, op)).expressId;
118
+ const relAggregatesId = editor.addEntity('IfcRelAggregates', schemaAttributes(registry, 'IfcRelAggregates', {
119
+ GlobalId: generateIfcGuid(anchor.guidRandom),
120
+ OwnerHistory: ownerHistoryRef(anchor.ownerHistoryId),
121
+ RelatingObject: `#${stairId}`,
122
+ RelatedObjects: [`#${flightId}`],
123
+ }, op)).expressId;
124
+ const relContainedId = emitRelContainedInSpatialStructure(editor, anchor.ownerHistoryId, stairId, anchor.storeyId, anchor.guidRandom);
125
+ return {
126
+ stairId,
127
+ flightId,
128
+ placementId,
129
+ flightPlacementId,
130
+ profileId,
131
+ solidId,
132
+ shapeRepId,
133
+ productShapeId,
134
+ relAggregatesId,
135
+ relContainedId,
136
+ };
137
+ }
138
+ /** The canonical stepped solid, in native units; package-private. */
139
+ export function emitStairFlightBody(editor, risers, riser, tread, width, waist) {
140
+ // The stepped side outline lies in the solid's XY plane. The solid's frame
141
+ // maps profile X -> stair +X (run) and profile Y -> stair +Z (rise) with
142
+ // extrusion along -Y, from y = width, so the flight spans y in [0, width].
143
+ const profileId = emitPolygonProfile(editor, stairFlightOutline(risers, riser, tread, waist));
144
+ const solidOrigin = editor.addEntity('IfcCartesianPoint', [[0, width, 0]]).expressId;
145
+ const solidAxis = editor.addEntity('IfcDirection', [[0, -1, 0]]).expressId;
146
+ const solidRef = editor.addEntity('IfcDirection', [[1, 0, 0]]).expressId;
147
+ const solidPosition = editor.addEntity('IfcAxis2Placement3D', [
148
+ `#${solidOrigin}`, `#${solidAxis}`, `#${solidRef}`,
149
+ ]).expressId;
150
+ const extrusion = editor.addEntity('IfcDirection', [[0, 0, 1]]).expressId;
151
+ const solidId = editor.addEntity('IfcExtrudedAreaSolid', [
152
+ `#${profileId}`, `#${solidPosition}`, `#${extrusion}`, width,
153
+ ]).expressId;
154
+ return { profileId, solidId };
155
+ }
156
+ //# sourceMappingURL=stair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stair.js","sourceRoot":"","sources":["../../src/in-store/stair.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,kCAAkC,EAClC,eAAe,EACf,WAAW,GACZ,MA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AE,SAAS,EAAE,OAAO,EAAE,CAAC;AAChC,CAAC"}
@@ -21,6 +21,7 @@
21
21
  * schedule.
22
22
  */
23
23
  import { type IfcDataStore } from '@ifc-lite/parser';
24
+ import type { MutablePropertyView } from '@ifc-lite/mutations';
24
25
  import type { Vec2 } from './auto-space-detect.js';
25
26
  /**
26
27
  * A storey's placement chain reduced to a planar rigid motion in the model's
@@ -54,7 +55,7 @@ export interface StoreyPlanFrame {
54
55
  * - the chain closes on itself, so composing every link of it reaches no
55
56
  * world frame to express the result in.
56
57
  */
57
- export declare function storeyPlanFrame(store: IfcDataStore, storeyExpressId: number): StoreyPlanFrame | null;
58
+ export declare function storeyPlanFrame(store: IfcDataStore, storeyExpressId: number, view?: MutablePropertyView | null): StoreyPlanFrame | null;
58
59
  /**
59
60
  * World-frame point → the storey-local frame `addSpaceToStore` writes into:
60
61
  * `Rᵀ · (p − origin)`.
@@ -1 +1 @@
1
- {"version":3,"file":"storey-plan-frame.d.ts","sourceRoot":"","sources":["../../src/in-store/storey-plan-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAUnD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,MAAM,EAAE,IAAI,CAAC;IACb,iEAAiE;IACjE,KAAK,EAAE,IAAI,CAAC;CACb;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,MAAM,GACtB,eAAe,GAAG,IAAI,CA6BxB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAKnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAMrE"}
1
+ {"version":3,"file":"storey-plan-frame.d.ts","sourceRoot":"","sources":["../../src/in-store/storey-plan-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAUnD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,MAAM,EAAE,IAAI,CAAC;IACb,iEAAiE;IACjE,KAAK,EAAE,IAAI,CAAC;CACb;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,MAAM,EACvB,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAChC,eAAe,GAAG,IAAI,CAqCxB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAKnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAMrE"}
@@ -24,6 +24,7 @@
24
24
  * schedule.
25
25
  */
26
26
  import { EntityExtractor } from '@ifc-lite/parser';
27
+ import { AnchorEntityReader } from './resolve-anchor.js';
27
28
  import { safeLengthUnitScale } from './length-unit-scale.js';
28
29
  import { numericAttr, readEntity, readVec3, storeyFrameAboveBy, storeyPlacementChain, } from './placement-frame.js';
29
30
  /** A placement `Axis` is treated as vertical within this of unit +Z. */
@@ -51,20 +52,28 @@ const IDENTITY_FRAME = { origin: [0, 0], axisX: [1, 0] };
51
52
  * - the chain closes on itself, so composing every link of it reaches no
52
53
  * world frame to express the result in.
53
54
  */
54
- export function storeyPlanFrame(store, storeyExpressId) {
55
+ export function storeyPlanFrame(store, storeyExpressId, view) {
55
56
  if (!store.source)
56
57
  return null;
57
58
  const extractor = new EntityExtractor(store.source);
58
- const storey = readEntity(store, extractor, undefined, storeyExpressId);
59
- if (!storey)
59
+ const reader = view ? new AnchorEntityReader(store, view) : null;
60
+ const overlay = reader ? {
61
+ getNewEntities: () => [], readEntity: id => {
62
+ const record = reader.entity(id);
63
+ // Native StoreEditor fields are strings/IfcAttributeValue positional values.
64
+ return record ? { type: record.type, attributes: record.attributes } : null;
65
+ },
66
+ } : undefined;
67
+ const storey = readEntity(store, extractor, overlay, storeyExpressId);
68
+ if (!storey || (view && storey.type?.toUpperCase() !== 'IFCBUILDINGSTOREY'))
60
69
  return null;
61
70
  if (numericAttr(storey.attributes[5]) === null)
62
71
  return IDENTITY_FRAME; // ObjectPlacement
63
- const chain = storeyPlacementChain(store, extractor, undefined, storeyExpressId);
72
+ const chain = storeyPlacementChain(store, extractor, overlay, storeyExpressId, view ? 256 : undefined);
64
73
  if (!chain || chain.size === 0)
65
74
  return null;
66
75
  for (const placementId of chain.keys()) {
67
- if (!placementIsInPlan(store, extractor, placementId))
76
+ if (!placementIsInPlan(store, extractor, placementId, overlay))
68
77
  return null;
69
78
  }
70
79
  // `hops === chain.size` composes every link, so the result is expressed in
@@ -74,10 +83,10 @@ export function storeyPlanFrame(store, storeyExpressId) {
74
83
  // malformed IFC ends with a link that still has a parent, and composing every
75
84
  // link then lands in no frame at all rather than the world. Refuse.
76
85
  const last = [...chain.keys()][chain.size - 1];
77
- const lastPlacement = readEntity(store, extractor, undefined, last);
86
+ const lastPlacement = readEntity(store, extractor, overlay, last);
78
87
  if (lastPlacement && numericAttr(lastPlacement.attributes[0]) !== null)
79
88
  return null;
80
- const frame = storeyFrameAboveBy(store, extractor, undefined, chain, chain.size);
89
+ const frame = storeyFrameAboveBy(store, extractor, overlay, chain, chain.size);
81
90
  if (!frame)
82
91
  return null;
83
92
  // A thrown or degenerate unit lookup is not a reason to author a space a
@@ -127,21 +136,21 @@ export function fromStoreyLocal(frame, p) {
127
136
  * is silently taken for +Z — which is the guess this function exists to
128
137
  * prevent, on the one input where the guess cannot be checked.
129
138
  */
130
- function placementIsInPlan(store, extractor, placementId) {
131
- const placement = readEntity(store, extractor, undefined, placementId);
139
+ function placementIsInPlan(store, extractor, placementId, overlay) {
140
+ const placement = readEntity(store, extractor, overlay, placementId);
132
141
  if (!placement)
133
142
  return true;
134
143
  const axisPlacementId = numericAttr(placement.attributes[1]); // RelativePlacement
135
144
  if (axisPlacementId === null)
136
145
  return true;
137
- const axisPlacement = readEntity(store, extractor, undefined, axisPlacementId);
146
+ const axisPlacement = readEntity(store, extractor, overlay, axisPlacementId);
138
147
  if (!axisPlacement)
139
148
  return true;
140
149
  const axisId = numericAttr(axisPlacement.attributes[1]); // Axis
141
150
  if (axisId === null)
142
151
  return true; // absent: +Z by default, per IFC
143
152
  // Present from here on — any failure to read it is a refusal, not a default.
144
- const axisDir = readEntity(store, extractor, undefined, axisId);
153
+ const axisDir = readEntity(store, extractor, overlay, axisId);
145
154
  if (!axisDir)
146
155
  return false;
147
156
  const v = readVec3(axisDir.attributes[0]);
@@ -1 +1 @@
1
- {"version":3,"file":"storey-plan-frame.js","sourceRoot":"","sources":["../../src/in-store/storey-plan-frame.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,eAAe,EAAqB,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAc9B,wEAAwE;AACxE,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B,4EAA4E;AAC5E,MAAM,cAAc,GAAoB,EAAE,MAAM,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MutablePropertyView } from '@ifc-lite/mutations';
2
+ import type { IfcDataStore } from '@ifc-lite/parser';
3
+ import { type Frame3 } from './host-geometry-frame.js';
4
+ export type ReassignmentRelationship = {
5
+ id: number;
6
+ type: string;
7
+ parent: number;
8
+ children: number[];
9
+ listIndex: number;
10
+ parentIndex: number;
11
+ attributes: readonly unknown[];
12
+ };
13
+ export type StoreyReassignmentPlan = {
14
+ sourceStorey: {
15
+ expressId: number;
16
+ GlobalId: string;
17
+ };
18
+ destinationStorey: {
19
+ expressId: number;
20
+ GlobalId: string;
21
+ };
22
+ sourceStoreyId: number;
23
+ destinationStoreyId: number;
24
+ destinationPlacementId: number;
25
+ products: {
26
+ expressId: number;
27
+ GlobalId: string;
28
+ type: string;
29
+ attributes: readonly unknown[];
30
+ placementId: number;
31
+ world: Frame3;
32
+ }[];
33
+ placements: {
34
+ expressId: number;
35
+ relative: Frame3;
36
+ }[];
37
+ relationships: ReassignmentRelationship[];
38
+ sourceMemberships: ReassignmentRelationship[];
39
+ };
40
+ /** Complete read-only admission for one destination. */
41
+ export declare function planStoreyReassignment(store: IfcDataStore, view: MutablePropertyView, selectedIds: readonly number[], sourceStoreyId: number, destinationStoreyId: number): StoreyReassignmentPlan;
42
+ /** Selection capture shares one effective Root/relationship inventory across
43
+ * at most 20 destination candidates. Each refusal remains explicit. */
44
+ export declare function planStoreyReassignmentCandidates(store: IfcDataStore, view: MutablePropertyView, selectedIds: readonly number[], sourceStoreyId: number, destinationStoreyIds: readonly number[]): ({
45
+ destinationStoreyId: number;
46
+ plan: StoreyReassignmentPlan;
47
+ refusal: null;
48
+ } | {
49
+ destinationStoreyId: number;
50
+ plan: null;
51
+ refusal: string;
52
+ })[];
53
+ //# sourceMappingURL=storey-reassignment-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storey-reassignment-plan.d.ts","sourceRoot":"","sources":["../../src/in-store/storey-reassignment-plan.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6B,KAAK,mBAAm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AAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE,EACnH,cAAc,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,GAAG,sBAAsB,CAE7E;AAED;uEACuE;AACvE,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE,EAC7H,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,SAAS,MAAM,EAAE;;;;;;;;KAUhE"}
@@ -0,0 +1,237 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
5
+ import { editOwnershipRefusal } from '@ifc-lite/export';
6
+ import { AnchorEntityReader } from './resolve-anchor.js';
7
+ import { conformsTo, schemaRegistry } from './schema-attributes.js';
8
+ import { placementInAncestor, placementRelativeTo, refId } from './host-geometry-frame.js';
9
+ const OP = 'reassignElementsToStoreyInStore';
10
+ const fail = (message) => { throw new Error(`${OP}: ${message}`); };
11
+ function refs(value) {
12
+ if (!Array.isArray(value) || value.length === 0)
13
+ return fail('unreadable empty relationship membership');
14
+ const ids = value.map(refId);
15
+ if (ids.some(id => id === null) || new Set(ids).size !== ids.length)
16
+ return fail('unreadable or duplicate relationship membership');
17
+ return ids;
18
+ }
19
+ /** Effective relationships, not stale parser edges. The finite closure includes
20
+ * aggregate/nested parts and the complete host → opening → filling chain. */
21
+ function relationships(reader) {
22
+ const result = [];
23
+ let work = 0;
24
+ for (const type of ['IFCRELAGGREGATES', 'IFCRELNESTS', 'IFCRELVOIDSELEMENT', 'IFCRELFILLSELEMENT', 'IFCRELCONTAINEDINSPATIALSTRUCTURE']) {
25
+ for (const id of reader.ids(type)) {
26
+ const entity = reader.entity(id) ?? fail(`unreadable relationship #${id}`);
27
+ const contained = type === 'IFCRELCONTAINEDINSPATIALSTRUCTURE';
28
+ const parentIndex = contained ? 5 : 4, listIndex = contained ? 4 : 5;
29
+ const parent = refId(entity.attributes[parentIndex]) ?? fail(`unreadable parent of #${id}`);
30
+ const singleton = type === 'IFCRELVOIDSELEMENT' || type === 'IFCRELFILLSELEMENT';
31
+ const rawChildren = entity.attributes[listIndex];
32
+ work += 1 + (Array.isArray(rawChildren) ? rawChildren.length : 1);
33
+ if (work > 2_000_000)
34
+ fail('relationship inventory exceeds 2,000,000 references');
35
+ const children = singleton ? [refId(entity.attributes[listIndex]) ?? fail(`unreadable child of #${id}`)] : refs(entity.attributes[listIndex]);
36
+ result.push({ id, type, parent, children, listIndex, parentIndex, attributes: entity.attributes });
37
+ }
38
+ }
39
+ return result;
40
+ }
41
+ /** One ephemeral effective snapshot per synchronous planning request. Never
42
+ * reuse it across mutation revisions or native transactions. */
43
+ function planningInventory(store, view) {
44
+ class CachedReader extends AnchorEntityReader {
45
+ records = new Map();
46
+ entity(id) {
47
+ if (!this.records.has(id))
48
+ this.records.set(id, super.entity(id));
49
+ return this.records.get(id) ?? null;
50
+ }
51
+ }
52
+ const reader = new CachedReader(store, view), registry = schemaRegistry(store.schemaVersion, OP);
53
+ const allRelationships = relationships(reader), outgoing = new Map();
54
+ const incomingById = new Map(), relationOrder = new Map();
55
+ for (const [index, rel] of allRelationships.entries()) {
56
+ relationOrder.set(rel.id, index);
57
+ const edges = outgoing.get(rel.parent) ?? [];
58
+ edges.push(rel);
59
+ outgoing.set(rel.parent, edges);
60
+ for (const child of rel.children) {
61
+ const parents = incomingById.get(child) ?? [];
62
+ parents.push(rel);
63
+ incomingById.set(child, parents);
64
+ }
65
+ }
66
+ const rootTypes = Object.entries(registry.entities).filter(([name, entity]) => name === 'IfcRoot' || entity.inheritanceChain?.includes('IfcRoot')).map(([name]) => name.toUpperCase());
67
+ const guidCounts = new Map();
68
+ for (const { expressId } of iterateEffectiveEntityIds(store, view, rootTypes)) {
69
+ const guid = reader.entity(expressId)?.attributes[0];
70
+ if (typeof guid === 'string')
71
+ guidCounts.set(guid, (guidCounts.get(guid) ?? 0) + 1);
72
+ }
73
+ return { reader, registry, outgoing, incomingById, relationOrder, guidCounts, ownership: new Map() };
74
+ }
75
+ function planWithInventory(store, view, selectedIds, sourceStoreyId, destinationStoreyId, inventory) {
76
+ if (!selectedIds.length || selectedIds.length > 200 || new Set(selectedIds).size !== selectedIds.length)
77
+ fail('select 1–200 distinct products');
78
+ if (sourceStoreyId === destinationStoreyId)
79
+ fail('source and destination storeys must differ');
80
+ const { reader, registry, outgoing, incomingById, relationOrder, guidCounts, ownership } = inventory;
81
+ const storeyPlacement = (id) => {
82
+ const entity = reader.entity(id);
83
+ if (entity?.type.toUpperCase() !== 'IFCBUILDINGSTOREY')
84
+ return fail(`#${id} is not a live IfcBuildingStorey in this model`);
85
+ const placement = refId(entity.attributes[5]) ?? fail(`storey #${id} has no placement`);
86
+ if (!placementInAncestor(reader, placement, null))
87
+ fail(`storey #${id} has an unreadable world placement`);
88
+ return placement;
89
+ };
90
+ storeyPlacement(sourceStoreyId);
91
+ const destinationPlacementId = storeyPlacement(destinationStoreyId);
92
+ const ids = new Set(selectedIds), queue = [...ids];
93
+ for (let index = 0; index < queue.length; index++) {
94
+ for (const rel of outgoing.get(queue[index]) ?? []) {
95
+ for (const child of rel.children) {
96
+ if (ids.has(child))
97
+ continue;
98
+ if (ids.size >= 5_000)
99
+ fail('dependency closure exceeds 5,000 products');
100
+ ids.add(child);
101
+ queue.push(child);
102
+ }
103
+ }
104
+ }
105
+ const incoming = new Map();
106
+ for (const child of ids)
107
+ for (const rel of incomingById.get(child) ?? []) {
108
+ const parents = incoming.get(child) ?? [];
109
+ parents.push(rel);
110
+ incoming.set(child, parents);
111
+ if (!ids.has(rel.parent) && rel.parent !== sourceStoreyId)
112
+ fail(`#${child} belongs to an external host, assembly or container #${rel.parent}`);
113
+ if (rel.parent === sourceStoreyId && ['IFCRELVOIDSELEMENT', 'IFCRELFILLSELEMENT'].includes(rel.type))
114
+ fail('storey cannot own hosted dependencies');
115
+ }
116
+ // Each direct spatial owner is unique; host and aggregate ownership may
117
+ // coexist with containment but never be silently detached.
118
+ for (const id of ids) {
119
+ const spatial = (incoming.get(id) ?? []).filter(rel => rel.type === 'IFCRELCONTAINEDINSPATIALSTRUCTURE'
120
+ || (rel.type === 'IFCRELAGGREGATES' && rel.parent === sourceStoreyId));
121
+ if (spatial.length > 1)
122
+ fail(`#${id} has duplicate spatial ownership`);
123
+ for (const family of [['IFCRELAGGREGATES', 'IFCRELNESTS'], ['IFCRELVOIDSELEMENT'], ['IFCRELFILLSELEMENT']]) {
124
+ if ((incoming.get(id) ?? []).filter(rel => family.includes(rel.type)).length > 1)
125
+ fail(`#${id} has ambiguous dependency ownership`);
126
+ }
127
+ }
128
+ const ownedRelationships = [...ids].flatMap(id => outgoing.get(id) ?? []).sort((a, b) => relationOrder.get(a.id) - relationOrder.get(b.id));
129
+ const indegree = new Map([...ids].map(id => [id, 0]));
130
+ for (const rel of ownedRelationships)
131
+ for (const child of rel.children)
132
+ indegree.set(child, (indegree.get(child) ?? 0) + 1);
133
+ const roots = [...ids].filter(id => indegree.get(id) === 0), topo = [...roots];
134
+ for (let i = 0; i < topo.length; i++)
135
+ for (const rel of outgoing.get(topo[i]) ?? []) {
136
+ for (const child of rel.children) {
137
+ const n = indegree.get(child) - 1;
138
+ indegree.set(child, n);
139
+ if (n === 0)
140
+ topo.push(child);
141
+ }
142
+ }
143
+ if (topo.length !== ids.size)
144
+ fail('cyclic hosted or aggregate dependencies');
145
+ for (const id of roots) {
146
+ const spatialRoot = conformsTo(registry, reader.entity(id)?.type ?? '', 'IfcSpatialStructureElement');
147
+ if (!(incoming.get(id) ?? []).some(rel => rel.parent === sourceStoreyId &&
148
+ (rel.type === 'IFCRELCONTAINEDINSPATIALSTRUCTURE' || (spatialRoot && rel.type === 'IFCRELAGGREGATES')))) {
149
+ fail('selected roots must have a spatial owner directly in the declared source storey');
150
+ }
151
+ }
152
+ const products = [...ids].sort((a, b) => a - b).map(expressId => {
153
+ const entity = reader.entity(expressId) ?? fail(`missing product #${expressId}`);
154
+ if (!conformsTo(registry, entity.type, 'IfcProduct') || ['IFCSITE', 'IFCBUILDING', 'IFCBUILDINGSTOREY', 'IFCGRID'].includes(entity.type.toUpperCase()))
155
+ fail(`#${expressId} is not a supported movable product`);
156
+ const guid = entity.attributes[0];
157
+ const GlobalId = typeof guid === 'string' && /^[0-3][0-9A-Za-z_$]{21}$/.test(guid) ? guid : fail(`#${expressId} has no valid GlobalId`);
158
+ const placementId = refId(entity.attributes[5]) ?? fail(`#${expressId} has no ObjectPlacement`);
159
+ const world = placementInAncestor(reader, placementId, null) ?? fail(`#${expressId} has an unreadable world placement`);
160
+ return { expressId, GlobalId, type: entity.type, attributes: entity.attributes, placementId, world };
161
+ });
162
+ const storeyGuids = [sourceStoreyId, destinationStoreyId].map(id => {
163
+ const guid = reader.entity(id)?.attributes[0];
164
+ return typeof guid === 'string' && /^[0-3][0-9A-Za-z_$]{21}$/.test(guid) ? guid : fail(`storey #${id} has no valid GlobalId`);
165
+ });
166
+ const guids = new Set([...storeyGuids, ...products.map(product => product.GlobalId)]);
167
+ if (guids.size !== products.length + 2 || [...guids].some(guid => guidCounts.get(guid) !== 1))
168
+ fail('ambiguous duplicate product GlobalId');
169
+ const sourceMemberships = (outgoing.get(sourceStoreyId) ?? []).filter(rel => rel.children.some(id => ids.has(id)));
170
+ for (const relation of [...ownedRelationships, ...sourceMemberships]) {
171
+ const guid = relation.attributes[0];
172
+ const GlobalId = typeof guid === 'string' && /^[0-3][0-9A-Za-z_$]{21}$/.test(guid)
173
+ ? guid : fail(`relationship GlobalId is missing or malformed for #${relation.id}`);
174
+ if (guidCounts.get(GlobalId) !== 1)
175
+ fail(`ambiguous duplicate relationship GlobalId for #${relation.id}`);
176
+ }
177
+ const placementIds = new Set(products.map(product => product.placementId));
178
+ const placements = [...placementIds].filter(id => {
179
+ const visited = new Set();
180
+ let parent = refId(reader.entity(id)?.attributes[0]);
181
+ while (parent !== null) {
182
+ if (visited.has(parent) || visited.size >= 10_000)
183
+ return fail('cyclic placement ancestry');
184
+ visited.add(parent);
185
+ if (placementIds.has(parent))
186
+ return false;
187
+ parent = refId(reader.entity(parent)?.attributes[0]);
188
+ }
189
+ return true;
190
+ }).map(expressId => {
191
+ // Reparenting under a descendant would introduce a new placement cycle.
192
+ const visited = new Set();
193
+ let parent = destinationPlacementId;
194
+ while (parent !== null) {
195
+ if (parent === expressId)
196
+ fail('destination placement depends on a moved product');
197
+ if (visited.has(parent) || visited.size >= 10_000)
198
+ fail('cyclic destination placement');
199
+ visited.add(parent);
200
+ parent = refId(reader.entity(parent)?.attributes[0]);
201
+ }
202
+ const relative = placementRelativeTo(reader, expressId, destinationPlacementId) ?? fail(`cannot express placement #${expressId} in destination frame`);
203
+ return { expressId, relative };
204
+ });
205
+ const ownershipKey = JSON.stringify([placements.map(p => p.expressId), products.map(p => p.expressId)]);
206
+ if (!ownership.has(ownershipKey))
207
+ ownership.set(ownershipKey, editOwnershipRefusal(store, view, placements.map(p => p.expressId), ids));
208
+ const refusal = ownership.get(ownershipKey);
209
+ if (refusal)
210
+ fail(refusal);
211
+ return { sourceStorey: { expressId: sourceStoreyId, GlobalId: storeyGuids[0] },
212
+ destinationStorey: { expressId: destinationStoreyId, GlobalId: storeyGuids[1] },
213
+ sourceStoreyId, destinationStoreyId, destinationPlacementId, products, placements,
214
+ relationships: ownedRelationships, sourceMemberships };
215
+ }
216
+ /** Complete read-only admission for one destination. */
217
+ export function planStoreyReassignment(store, view, selectedIds, sourceStoreyId, destinationStoreyId) {
218
+ return planWithInventory(store, view, selectedIds, sourceStoreyId, destinationStoreyId, planningInventory(store, view));
219
+ }
220
+ /** Selection capture shares one effective Root/relationship inventory across
221
+ * at most 20 destination candidates. Each refusal remains explicit. */
222
+ export function planStoreyReassignmentCandidates(store, view, selectedIds, sourceStoreyId, destinationStoreyIds) {
223
+ if (destinationStoreyIds.length > 20 || new Set(destinationStoreyIds).size !== destinationStoreyIds.length)
224
+ fail('choose at most 20 distinct destination storeys');
225
+ const inventory = planningInventory(store, view);
226
+ return destinationStoreyIds.map(destinationStoreyId => {
227
+ try {
228
+ return { destinationStoreyId, plan: planWithInventory(store, view, selectedIds, sourceStoreyId, destinationStoreyId, inventory), refusal: null };
229
+ }
230
+ catch (error) {
231
+ if (!(error instanceof Error))
232
+ throw error;
233
+ return { destinationStoreyId, plan: null, refusal: error.message };
234
+ }
235
+ });
236
+ }
237
+ //# sourceMappingURL=storey-reassignment-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storey-reassignment-plan.js","sourceRoot":"","sources":["../../src/in-store/storey-reassignment-plan.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,yBAAyB,EAA4B,MAAM,qBAAqB,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,KAAK,EAAe,MAAM,0BAA0B,CAAC;AAExG,MAAM,EAAE,GAAG,iCAAiC,CAAC;AAC7C,MAAM,IAAI,GAAG,CAAC,OAAe,EAAS,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,GAAG,EAAE,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAWnF,SAAS,IAAI,CAAC,KAAc;IAC1B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACzG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,GAAG,CAAC,IAAI,CAAC,E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