@ifc-lite/viewer 1.26.0 → 1.27.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 (89) hide show
  1. package/.turbo/turbo-build.log +38 -31
  2. package/CHANGELOG.md +29 -0
  3. package/dist/assets/{basketViewActivator-ZpTYWE3K.js → basketViewActivator-B3CdrLsb.js} +7 -7
  4. package/dist/assets/{bcf-Ctcu_Sc2.js → bcf-QeHK_Aud.js} +1 -1
  5. package/dist/assets/{browser-DXS29_v9.js → browser-BIoDDfBW.js} +1 -1
  6. package/dist/assets/{cesium-BoVuJvTC.js → cesium-CzZn5yVA.js} +319 -319
  7. package/dist/assets/{deflate-Cnx0il6E.js → deflate-B-d0SYQM.js} +1 -1
  8. package/dist/assets/exceljs.min-DsuzKYnj.js +29 -0
  9. package/dist/assets/{exporters-DSq76AVM.js → exporters-B4LbZFeT.js} +1422 -1194
  10. package/dist/assets/geometry.worker-BdH-E6NB.js +1 -0
  11. package/dist/assets/{geotiff-A5UjhI6L.js → geotiff-CrVtDRFq.js} +10 -10
  12. package/dist/assets/html2canvas.esm-Ge7aVWlp.js +5 -0
  13. package/dist/assets/{ids-DiLcGTer.js → ids-DjsGFN10.js} +4 -4
  14. package/dist/assets/ifc-lite_bg-DsYUIHm3.wasm +0 -0
  15. package/dist/assets/{index-BAH8IJVR.js → index-COYokSKc.js} +38319 -35469
  16. package/dist/assets/index-ajK6D32J.css +1 -0
  17. package/dist/assets/index.es-CY202jA3.js +6866 -0
  18. package/dist/assets/{jpeg-BzSkwo5D.js → jpeg-D4wOkf5h.js} +1 -1
  19. package/dist/assets/jspdf.es.min-DIGb9BHN.js +19571 -0
  20. package/dist/assets/jspdf.plugin.autotable-BBLUVd7n.js +2 -0
  21. package/dist/assets/{lerc-Cg2Rz-D5.js → lerc-DmW0_tgf.js} +1 -1
  22. package/dist/assets/{lzw-BBPPLW-0.js → lzw-oWetY-d6.js} +1 -1
  23. package/dist/assets/{maplibre-gl-Do6O5tDc.js → maplibre-gl-BF3Z0idw.js} +1 -1
  24. package/dist/assets/{native-bridge-CPojOeGE.js → native-bridge-BX8_tHXE.js} +1 -1
  25. package/dist/assets/{packbits-yLSpjW-V.js → packbits-F8Nkp4NY.js} +1 -1
  26. package/dist/assets/{pako.esm-Cram60i4.js → pako.esm-n3Pgozwg.js} +1 -1
  27. package/dist/assets/{parser.worker-8md211IW.js → parser.worker-D591Zu_-.js} +3 -3
  28. package/dist/assets/pdf-Dsh3HPZB.js +135 -0
  29. package/dist/assets/raw-D9iw0tmc.js +1 -0
  30. package/dist/assets/{sandbox-CsRXlgCO.js → sandbox-BAC3a-eN.js} +1735 -1660
  31. package/dist/assets/server-client-Cjwnm7il.js +706 -0
  32. package/dist/assets/{webimage-YafxjjGr.js → webimage-BLV1dgmd.js} +1 -1
  33. package/dist/assets/xlsx-Bc2HTrjC.js +142 -0
  34. package/dist/assets/{zip-BJqVbRkU.js → zip-DFgP-l20.js} +1 -1
  35. package/dist/assets/{zstd-CkSLOiuu.js → zstd-C_1HxVrA.js} +1 -1
  36. package/dist/index.html +8 -8
  37. package/package.json +10 -7
  38. package/src/components/mcp/PlaygroundChat.tsx +1 -0
  39. package/src/components/mcp/data.ts +6 -0
  40. package/src/components/mcp/playground-dispatcher.ts +277 -0
  41. package/src/components/mcp/types.ts +2 -1
  42. package/src/components/ui/combo-input.tsx +163 -0
  43. package/src/components/ui/tabs.tsx +1 -1
  44. package/src/components/viewer/PropertiesPanel.tsx +13 -6
  45. package/src/components/viewer/SearchInline.tsx +62 -2
  46. package/src/components/viewer/SearchModal.filter.builder.tsx +24 -393
  47. package/src/components/viewer/SearchModal.filter.editors.tsx +503 -0
  48. package/src/components/viewer/SearchModal.filter.tsx +64 -1
  49. package/src/components/viewer/SearchModal.tsx +19 -6
  50. package/src/components/viewer/Viewport.tsx +15 -0
  51. package/src/components/viewer/lists/ColumnHeaderMenu.tsx +84 -0
  52. package/src/components/viewer/lists/ListBuilder.tsx +789 -280
  53. package/src/components/viewer/lists/ListGroupingBar.tsx +72 -0
  54. package/src/components/viewer/lists/ListPanel.tsx +49 -5
  55. package/src/components/viewer/lists/ListResultsTable.tsx +270 -176
  56. package/src/components/viewer/lists/list-table-utils.ts +123 -0
  57. package/src/generated/mcp-catalog.json +4 -0
  58. package/src/hooks/source-key.ts +35 -0
  59. package/src/hooks/useAlignmentLines3D.ts +1 -26
  60. package/src/hooks/useGridLines3D.ts +140 -0
  61. package/src/lib/length-unit-scale.ts +41 -0
  62. package/src/lib/lists/adapter.ts +136 -11
  63. package/src/lib/lists/export/csv.ts +47 -0
  64. package/src/lib/lists/export/index.ts +49 -0
  65. package/src/lib/lists/export/model.ts +111 -0
  66. package/src/lib/lists/export/pdf.ts +67 -0
  67. package/src/lib/lists/export/xlsx.ts +83 -0
  68. package/src/lib/lists/index.ts +2 -0
  69. package/src/lib/search/filter-evaluate.test.ts +81 -0
  70. package/src/lib/search/filter-evaluate.ts +59 -87
  71. package/src/lib/search/filter-match.ts +167 -0
  72. package/src/lib/search/filter-rules.test.ts +25 -0
  73. package/src/lib/search/filter-rules.ts +75 -2
  74. package/src/lib/search/filter-schema.ts +0 -0
  75. package/src/lib/slab-edit.test.ts +72 -0
  76. package/src/lib/slab-edit.ts +159 -19
  77. package/src/sdk/adapters/export-adapter.ts +3 -3
  78. package/src/sdk/adapters/query-adapter.ts +3 -3
  79. package/src/store/slices/listSlice.ts +6 -0
  80. package/src/store/slices/mutationSlice.ts +14 -6
  81. package/src/store/slices/searchSlice.ts +29 -3
  82. package/src/utils/nativeSpatialDataStore.ts +6 -0
  83. package/src/utils/serverDataModel.test.ts +6 -0
  84. package/src/utils/serverDataModel.ts +7 -0
  85. package/dist/assets/geometry.worker-0Q9qEa6p.js +0 -1
  86. package/dist/assets/ifc-lite_bg-CEZnhM2e.wasm +0 -0
  87. package/dist/assets/index-B9Ug2EqU.css +0 -1
  88. package/dist/assets/raw-BQrAgxwT.js +0 -1
  89. package/dist/assets/server-client-Bk4c1CPO.js +0 -626
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-bridge-CPojOeGE.js","assets/sandbox-CsRXlgCO.js","assets/lens-PYsLu_MA.js"])))=>i.map(i=>d[i]);
2
- import { U as Ge, _ as $e, aP as nt, a7 as Ve, a8 as ze, k as tt, l as Ct, aS as Me, E as ke, ai as ee, am as Ye, aj as We, aK as je, W as He, j as ne, i as Xe, __tla as __tla_0 } from "./sandbox-CsRXlgCO.js";
3
- let rs, is, Le, as, qn, Be, ss, In, cs, ie, os, ns;
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-bridge-BX8_tHXE.js","assets/sandbox-BAC3a-eN.js","assets/lens-PYsLu_MA.js"])))=>i.map(i=>d[i]);
2
+ import { V as We, _ as je, aT as nt, a9 as ke, aa as Ye, l as et, m as bt, aW as Ue, E as He, al as se, ap as Xe, am as qe, aO as Qe, X as Je, k as ie, j as Ke, __tla as __tla_0 } from "./sandbox-BAC3a-eN.js";
3
+ let ds, ls, Be, us, ts, Ge, cs, En, hs, oe, fs, as;
4
4
  let __tla = Promise.all([
5
5
  (()=>{
6
6
  try {
@@ -8,72 +8,75 @@ let __tla = Promise.all([
8
8
  } catch {}
9
9
  })()
10
10
  ]).then(async ()=>{
11
- let c;
12
- function B(r) {
13
- St === ot.length && ot.push(ot.length + 1);
14
- const t = St;
15
- return St = ot[t], ot[t] = r, t;
11
+ let a;
12
+ function U(r) {
13
+ Nt === ot.length && ot.push(ot.length + 1);
14
+ const t = Nt;
15
+ return Nt = ot[t], ot[t] = r, t;
16
16
  }
17
- function qe(r) {
17
+ function Ze(r) {
18
18
  if (kt == 1) throw new Error("out of js stack");
19
19
  return ot[--kt] = r, kt;
20
20
  }
21
- const de = typeof FinalizationRegistry > "u" ? {
21
+ const ue = typeof FinalizationRegistry > "u" ? {
22
22
  register: ()=>{},
23
23
  unregister: ()=>{}
24
24
  } : new FinalizationRegistry((r)=>r.dtor(r.a, r.b));
25
- function Qe(r) {
26
- r < 132 || (ot[r] = St, St = r);
25
+ function tn(r) {
26
+ r < 132 || (ot[r] = Nt, Nt = r);
27
27
  }
28
- function se(r, t) {
29
- return r = r >>> 0, Ke().subarray(r / 4, r / 4 + t);
28
+ function re(r, t) {
29
+ return r = r >>> 0, sn().subarray(r / 4, r / 4 + t);
30
30
  }
31
- function Je(r, t) {
32
- return r = r >>> 0, Ze().subarray(r / 8, r / 8 + t);
31
+ function en(r, t) {
32
+ return r = r >>> 0, rn().subarray(r / 8, r / 8 + t);
33
33
  }
34
- function xe(r, t) {
35
- return r = r >>> 0, Pe().subarray(r / 4, r / 4 + t);
34
+ function De(r, t) {
35
+ return r = r >>> 0, ve().subarray(r / 4, r / 4 + t);
36
36
  }
37
- let gt = null;
37
+ function nn(r, t) {
38
+ return r = r >>> 0, Ct().subarray(r / 1, r / 1 + t);
39
+ }
40
+ let _t = null;
38
41
  function A() {
39
- return (gt === null || gt.buffer.detached === !0 || gt.buffer.detached === void 0 && gt.buffer !== c.memory.buffer) && (gt = new DataView(c.memory.buffer)), gt;
42
+ return (_t === null || _t.buffer.detached === !0 || _t.buffer.detached === void 0 && _t.buffer !== a.memory.buffer) && (_t = new DataView(a.memory.buffer)), _t;
40
43
  }
41
44
  let Tt = null;
42
- function Ke() {
43
- return (Tt === null || Tt.byteLength === 0) && (Tt = new Float32Array(c.memory.buffer)), Tt;
45
+ function sn() {
46
+ return (Tt === null || Tt.byteLength === 0) && (Tt = new Float32Array(a.memory.buffer)), Tt;
44
47
  }
45
- let wt = null;
46
- function Ze() {
47
- return (wt === null || wt.byteLength === 0) && (wt = new Float64Array(c.memory.buffer)), wt;
48
+ let Ft = null;
49
+ function rn() {
50
+ return (Ft === null || Ft.byteLength === 0) && (Ft = new Float64Array(a.memory.buffer)), Ft;
48
51
  }
49
52
  function J(r, t) {
50
- return r = r >>> 0, nn(r, t);
51
- }
52
- let Ft = null;
53
- function Pe() {
54
- return (Ft === null || Ft.byteLength === 0) && (Ft = new Uint32Array(c.memory.buffer)), Ft;
53
+ return r = r >>> 0, cn(r, t);
55
54
  }
56
55
  let Rt = null;
57
- function Nt() {
58
- return (Rt === null || Rt.byteLength === 0) && (Rt = new Uint8Array(c.memory.buffer)), Rt;
56
+ function ve() {
57
+ return (Rt === null || Rt.byteLength === 0) && (Rt = new Uint32Array(a.memory.buffer)), Rt;
58
+ }
59
+ let St = null;
60
+ function Ct() {
61
+ return (St === null || St.byteLength === 0) && (St = new Uint8Array(a.memory.buffer)), St;
59
62
  }
60
- function W(r) {
63
+ function k(r) {
61
64
  return ot[r];
62
65
  }
63
- function Xt(r, t) {
66
+ function Qt(r, t) {
64
67
  try {
65
68
  return r.apply(this, t);
66
69
  } catch (e) {
67
- c.__wbindgen_export(B(e));
70
+ a.__wbindgen_export(U(e));
68
71
  }
69
72
  }
70
73
  let ot = new Array(128).fill(void 0);
71
74
  ot.push(void 0, null, !0, !1);
72
- let St = ot.length;
73
- function $t(r) {
75
+ let Nt = ot.length;
76
+ function zt(r) {
74
77
  return r == null;
75
78
  }
76
- function tn(r, t, e, n) {
79
+ function on(r, t, e, n) {
77
80
  const s = {
78
81
  a: r,
79
82
  b: t,
@@ -81,63 +84,63 @@ let __tla = Promise.all([
81
84
  dtor: e
82
85
  }, i = (...o)=>{
83
86
  s.cnt++;
84
- const a = s.a;
87
+ const c = s.a;
85
88
  s.a = 0;
86
89
  try {
87
- return n(a, s.b, ...o);
90
+ return n(c, s.b, ...o);
88
91
  } finally{
89
- s.a = a, i._wbg_cb_unref();
92
+ s.a = c, i._wbg_cb_unref();
90
93
  }
91
94
  };
92
95
  return i._wbg_cb_unref = ()=>{
93
- --s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0, de.unregister(s));
94
- }, de.register(i, s, s), i;
96
+ --s.cnt === 0 && (s.dtor(s.a, s.b), s.a = 0, ue.unregister(s));
97
+ }, ue.register(i, s, s), i;
95
98
  }
96
- function ft(r, t) {
99
+ function ut(r, t) {
97
100
  const e = t(r.length * 4, 4) >>> 0;
98
- return Pe().set(r, e / 4), $ = r.length, e;
101
+ return ve().set(r, e / 4), G = r.length, e;
99
102
  }
100
103
  function It(r, t) {
101
104
  const e = t(r.length * 1, 1) >>> 0;
102
- return Nt().set(r, e / 1), $ = r.length, e;
105
+ return Ct().set(r, e / 1), G = r.length, e;
103
106
  }
104
- function ut(r, t, e) {
107
+ function ct(r, t, e) {
105
108
  if (e === void 0) {
106
- const a = At.encode(r), l = t(a.length, 1) >>> 0;
107
- return Nt().subarray(l, l + a.length).set(a), $ = a.length, l;
109
+ const c = At.encode(r), l = t(c.length, 1) >>> 0;
110
+ return Ct().subarray(l, l + c.length).set(c), G = c.length, l;
108
111
  }
109
112
  let n = r.length, s = t(n, 1) >>> 0;
110
- const i = Nt();
113
+ const i = Ct();
111
114
  let o = 0;
112
115
  for(; o < n; o++){
113
- const a = r.charCodeAt(o);
114
- if (a > 127) break;
115
- i[s + o] = a;
116
+ const c = r.charCodeAt(o);
117
+ if (c > 127) break;
118
+ i[s + o] = c;
116
119
  }
117
120
  if (o !== n) {
118
121
  o !== 0 && (r = r.slice(o)), s = e(s, n, n = o + r.length * 3, 1) >>> 0;
119
- const a = Nt().subarray(s + o, s + n), l = At.encodeInto(r, a);
122
+ const c = Ct().subarray(s + o, s + n), l = At.encodeInto(r, c);
120
123
  o += l.written, s = e(s, n, o, 1) >>> 0;
121
124
  }
122
- return $ = o, s;
125
+ return G = o, s;
123
126
  }
124
127
  let kt = 128;
125
- function V(r) {
126
- const t = W(r);
127
- return Qe(r), t;
128
+ function D(r) {
129
+ const t = k(r);
130
+ return tn(r), t;
128
131
  }
129
132
  let Yt = new TextDecoder("utf-8", {
130
133
  ignoreBOM: !0,
131
134
  fatal: !0
132
135
  });
133
136
  Yt.decode();
134
- const en = 2146435072;
135
- let qt = 0;
136
- function nn(r, t) {
137
- return qt += t, qt >= en && (Yt = new TextDecoder("utf-8", {
137
+ const an = 2146435072;
138
+ let Jt = 0;
139
+ function cn(r, t) {
140
+ return Jt += t, Jt >= an && (Yt = new TextDecoder("utf-8", {
138
141
  ignoreBOM: !0,
139
142
  fatal: !0
140
- }), Yt.decode(), qt = t), Yt.decode(Nt().subarray(r, r + t));
143
+ }), Yt.decode(), Jt = t), Yt.decode(Ct().subarray(r, r + t));
141
144
  }
142
145
  const At = new TextEncoder;
143
146
  "encodeInto" in At || (At.encodeInto = function(r, t) {
@@ -147,725 +150,829 @@ let __tla = Promise.all([
147
150
  written: e.length
148
151
  };
149
152
  });
150
- let $ = 0;
151
- function sn(r, t, e) {
152
- c.__wasm_bindgen_func_elem_593(r, t, B(e));
153
+ let G = 0;
154
+ function ln(r, t, e) {
155
+ a.__wasm_bindgen_func_elem_654(r, t, U(e));
153
156
  }
154
- function rn(r, t, e, n) {
155
- c.__wasm_bindgen_func_elem_627(r, t, B(e), B(n));
157
+ function dn(r, t, e, n) {
158
+ a.__wasm_bindgen_func_elem_688(r, t, U(e), U(n));
156
159
  }
157
- typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>c.__wbg_clashrunresult_free(r >>> 0, 1));
158
- typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>c.__wbg_clashsession_free(r >>> 0, 1));
159
- const fe = typeof FinalizationRegistry > "u" ? {
160
+ typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashrunresult_free(r >>> 0, 1));
161
+ typeof FinalizationRegistry > "u" || new FinalizationRegistry((r)=>a.__wbg_clashsession_free(r >>> 0, 1));
162
+ const he = typeof FinalizationRegistry > "u" ? {
163
+ register: ()=>{},
164
+ unregister: ()=>{}
165
+ } : new FinalizationRegistry((r)=>a.__wbg_gridaxiscollection_free(r >>> 0, 1)), pe = typeof FinalizationRegistry > "u" ? {
160
166
  register: ()=>{},
161
167
  unregister: ()=>{}
162
- } : new FinalizationRegistry((r)=>c.__wbg_ifcapi_free(r >>> 0, 1)), ue = typeof FinalizationRegistry > "u" ? {
168
+ } : new FinalizationRegistry((r)=>a.__wbg_gridaxisjs_free(r >>> 0, 1)), Ie = typeof FinalizationRegistry > "u" ? {
163
169
  register: ()=>{},
164
170
  unregister: ()=>{}
165
- } : new FinalizationRegistry((r)=>c.__wbg_meshcollection_free(r >>> 0, 1)), he = typeof FinalizationRegistry > "u" ? {
171
+ } : new FinalizationRegistry((r)=>a.__wbg_ifcapi_free(r >>> 0, 1)), _e = typeof FinalizationRegistry > "u" ? {
166
172
  register: ()=>{},
167
173
  unregister: ()=>{}
168
- } : new FinalizationRegistry((r)=>c.__wbg_meshdatajs_free(r >>> 0, 1)), pe = typeof FinalizationRegistry > "u" ? {
174
+ } : new FinalizationRegistry((r)=>a.__wbg_meshcollection_free(r >>> 0, 1)), ge = typeof FinalizationRegistry > "u" ? {
169
175
  register: ()=>{},
170
176
  unregister: ()=>{}
171
- } : new FinalizationRegistry((r)=>c.__wbg_profilecollection_free(r >>> 0, 1)), Ie = typeof FinalizationRegistry > "u" ? {
177
+ } : new FinalizationRegistry((r)=>a.__wbg_meshdatajs_free(r >>> 0, 1)), ye = typeof FinalizationRegistry > "u" ? {
172
178
  register: ()=>{},
173
179
  unregister: ()=>{}
174
- } : new FinalizationRegistry((r)=>c.__wbg_profileentryjs_free(r >>> 0, 1)), ge = typeof FinalizationRegistry > "u" ? {
180
+ } : new FinalizationRegistry((r)=>a.__wbg_profilecollection_free(r >>> 0, 1)), me = typeof FinalizationRegistry > "u" ? {
175
181
  register: ()=>{},
176
182
  unregister: ()=>{}
177
- } : new FinalizationRegistry((r)=>c.__wbg_symboliccircle_free(r >>> 0, 1)), _e = typeof FinalizationRegistry > "u" ? {
183
+ } : new FinalizationRegistry((r)=>a.__wbg_profileentryjs_free(r >>> 0, 1)), Ee = typeof FinalizationRegistry > "u" ? {
178
184
  register: ()=>{},
179
185
  unregister: ()=>{}
180
- } : new FinalizationRegistry((r)=>c.__wbg_symbolicfillarea_free(r >>> 0, 1)), ye = typeof FinalizationRegistry > "u" ? {
186
+ } : new FinalizationRegistry((r)=>a.__wbg_symboliccircle_free(r >>> 0, 1)), be = typeof FinalizationRegistry > "u" ? {
181
187
  register: ()=>{},
182
188
  unregister: ()=>{}
183
- } : new FinalizationRegistry((r)=>c.__wbg_symbolicpolyline_free(r >>> 0, 1)), Ee = typeof FinalizationRegistry > "u" ? {
189
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolicfillarea_free(r >>> 0, 1)), Ce = typeof FinalizationRegistry > "u" ? {
184
190
  register: ()=>{},
185
191
  unregister: ()=>{}
186
- } : new FinalizationRegistry((r)=>c.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)), me = typeof FinalizationRegistry > "u" ? {
192
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolicpolyline_free(r >>> 0, 1)), we = typeof FinalizationRegistry > "u" ? {
187
193
  register: ()=>{},
188
194
  unregister: ()=>{}
189
- } : new FinalizationRegistry((r)=>c.__wbg_symbolictext_free(r >>> 0, 1));
190
- ie = class {
195
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolicrepresentationcollection_free(r >>> 0, 1)), Te = typeof FinalizationRegistry > "u" ? {
196
+ register: ()=>{},
197
+ unregister: ()=>{}
198
+ } : new FinalizationRegistry((r)=>a.__wbg_symbolictext_free(r >>> 0, 1));
199
+ class Ot {
200
+ static __wrap(t) {
201
+ t = t >>> 0;
202
+ const e = Object.create(Ot.prototype);
203
+ return e.__wbg_ptr = t, he.register(e, e.__wbg_ptr, e), e;
204
+ }
205
+ __destroy_into_raw() {
206
+ const t = this.__wbg_ptr;
207
+ return this.__wbg_ptr = 0, he.unregister(this), t;
208
+ }
209
+ free() {
210
+ const t = this.__destroy_into_raw();
211
+ a.__wbg_gridaxiscollection_free(t, 0);
212
+ }
213
+ get length() {
214
+ return a.gridaxiscollection_length(this.__wbg_ptr) >>> 0;
215
+ }
216
+ getAxis(t) {
217
+ const e = a.gridaxiscollection_getAxis(this.__wbg_ptr, t);
218
+ return e === 0 ? void 0 : xt.__wrap(e);
219
+ }
220
+ get isEmpty() {
221
+ return a.gridaxiscollection_isEmpty(this.__wbg_ptr) !== 0;
222
+ }
223
+ }
224
+ Symbol.dispose && (Ot.prototype[Symbol.dispose] = Ot.prototype.free);
225
+ class xt {
226
+ static __wrap(t) {
227
+ t = t >>> 0;
228
+ const e = Object.create(xt.prototype);
229
+ return e.__wbg_ptr = t, pe.register(e, e.__wbg_ptr, e), e;
230
+ }
191
231
  __destroy_into_raw() {
192
232
  const t = this.__wbg_ptr;
193
- return this.__wbg_ptr = 0, fe.unregister(this), t;
233
+ return this.__wbg_ptr = 0, pe.unregister(this), t;
194
234
  }
195
235
  free() {
196
236
  const t = this.__destroy_into_raw();
197
- c.__wbg_ifcapi_free(t, 0);
237
+ a.__wbg_gridaxisjs_free(t, 0);
238
+ }
239
+ get end() {
240
+ const t = a.gridaxisjs_end(this.__wbg_ptr);
241
+ return D(t);
242
+ }
243
+ get tag() {
244
+ let t, e;
245
+ try {
246
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
247
+ a.gridaxisjs_tag(i, this.__wbg_ptr);
248
+ var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
249
+ return t = n, e = s, J(n, s);
250
+ } finally{
251
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
252
+ }
253
+ }
254
+ get start() {
255
+ const t = a.gridaxisjs_start(this.__wbg_ptr);
256
+ return D(t);
257
+ }
258
+ get axisId() {
259
+ return a.gridaxisjs_axisId(this.__wbg_ptr) >>> 0;
260
+ }
261
+ get gridId() {
262
+ return a.gridaxisjs_gridId(this.__wbg_ptr) >>> 0;
263
+ }
264
+ }
265
+ Symbol.dispose && (xt.prototype[Symbol.dispose] = xt.prototype.free);
266
+ oe = class {
267
+ __destroy_into_raw() {
268
+ const t = this.__wbg_ptr;
269
+ return this.__wbg_ptr = 0, Ie.unregister(this), t;
270
+ }
271
+ free() {
272
+ const t = this.__destroy_into_raw();
273
+ a.__wbg_ifcapi_free(t, 0);
198
274
  }
199
275
  buildPrePassFast(t) {
200
- const e = It(t, c.__wbindgen_export3), n = $, s = c.ifcapi_buildPrePassFast(this.__wbg_ptr, e, n);
201
- return V(s);
276
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_buildPrePassFast(this.__wbg_ptr, e, n);
277
+ return D(s);
202
278
  }
203
279
  buildPrePassOnce(t) {
204
- const e = It(t, c.__wbindgen_export3), n = $, s = c.ifcapi_buildPrePassOnce(this.__wbg_ptr, e, n);
205
- return V(s);
280
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_buildPrePassOnce(this.__wbg_ptr, e, n);
281
+ return D(s);
206
282
  }
207
- processGeometryBatch(t, e, n, s, i, o, a, l, d, u, f, p) {
208
- const _ = It(t, c.__wbindgen_export3), h = $, y = ft(e, c.__wbindgen_export3), m = $, b = ft(l, c.__wbindgen_export3), w = $, v = ft(d, c.__wbindgen_export3), L = $, j = ft(u, c.__wbindgen_export3), O = $, U = ft(f, c.__wbindgen_export3), C = $, N = It(p, c.__wbindgen_export3), F = $, E = c.ifcapi_processGeometryBatch(this.__wbg_ptr, _, h, y, m, n, s, i, o, a, b, w, v, L, j, O, U, C, N, F);
209
- return Ot.__wrap(E);
283
+ processGeometryBatch(t, e, n, s, i, o, c, l, d, u, f, p) {
284
+ const g = It(t, a.__wbindgen_export3), h = G, y = ut(e, a.__wbindgen_export3), E = G, C = ut(l, a.__wbindgen_export3), T = G, $ = ut(d, a.__wbindgen_export3), x = G, Y = ut(u, a.__wbindgen_export3), O = G, v = ut(f, a.__wbindgen_export3), b = G, S = It(p, a.__wbindgen_export3), F = G, m = a.ifcapi_processGeometryBatch(this.__wbg_ptr, g, h, y, E, n, s, i, o, c, C, T, $, x, Y, O, v, b, S, F);
285
+ return Lt.__wrap(m);
210
286
  }
211
287
  buildPrePassStreaming(t, e, n) {
212
288
  try {
213
- const a = c.__wbindgen_add_to_stack_pointer(-16), l = It(t, c.__wbindgen_export3), d = $;
214
- c.ifcapi_buildPrePassStreaming(a, this.__wbg_ptr, l, d, qe(e), n);
215
- var s = A().getInt32(a + 0, !0), i = A().getInt32(a + 4, !0), o = A().getInt32(a + 8, !0);
216
- if (o) throw V(i);
217
- return V(s);
289
+ const c = a.__wbindgen_add_to_stack_pointer(-16), l = It(t, a.__wbindgen_export3), d = G;
290
+ a.ifcapi_buildPrePassStreaming(c, this.__wbg_ptr, l, d, Ze(e), n);
291
+ var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = A().getInt32(c + 8, !0);
292
+ if (o) throw D(i);
293
+ return D(s);
218
294
  } finally{
219
- c.__wbindgen_add_to_stack_pointer(16), ot[kt++] = void 0;
295
+ a.__wbindgen_add_to_stack_pointer(16), ot[kt++] = void 0;
220
296
  }
221
297
  }
298
+ parseGridAxes(t) {
299
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseGridAxes(this.__wbg_ptr, e, n);
300
+ return Ot.__wrap(s);
301
+ }
302
+ parseGridLines(t) {
303
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseGridLines(this.__wbg_ptr, e, n);
304
+ return D(s);
305
+ }
222
306
  parseAlignmentLines(t) {
223
- const e = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), n = $, s = c.ifcapi_parseAlignmentLines(this.__wbg_ptr, e, n);
224
- return V(s);
307
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseAlignmentLines(this.__wbg_ptr, e, n);
308
+ return D(s);
225
309
  }
226
310
  extractProfiles(t, e) {
227
- const n = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), s = $, i = c.ifcapi_extractProfiles(this.__wbg_ptr, n, s, e);
228
- return Mt.__wrap(i);
311
+ const n = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), s = G, i = a.ifcapi_extractProfiles(this.__wbg_ptr, n, s, e);
312
+ return Pt.__wrap(i);
229
313
  }
230
314
  getMemory() {
231
- const t = c.ifcapi_getMemory(this.__wbg_ptr);
232
- return V(t);
315
+ const t = a.ifcapi_getMemory(this.__wbg_ptr);
316
+ return D(t);
233
317
  }
234
318
  setEntityIndex(t, e, n) {
235
- const s = ft(t, c.__wbindgen_export3), i = $, o = ft(e, c.__wbindgen_export3), a = $, l = ft(n, c.__wbindgen_export3), d = $;
236
- c.ifcapi_setEntityIndex(this.__wbg_ptr, s, i, o, a, l, d);
319
+ const s = ut(t, a.__wbindgen_export3), i = G, o = ut(e, a.__wbindgen_export3), c = G, l = ut(n, a.__wbindgen_export3), d = G;
320
+ a.ifcapi_setEntityIndex(this.__wbg_ptr, s, i, o, c, l, d);
237
321
  }
238
322
  setMergeLayers(t) {
239
- c.ifcapi_setMergeLayers(this.__wbg_ptr, t);
323
+ a.ifcapi_setMergeLayers(this.__wbg_ptr, t);
240
324
  }
241
325
  clearPrePassCache() {
242
- c.ifcapi_clearPrePassCache(this.__wbg_ptr);
326
+ a.ifcapi_clearPrePassCache(this.__wbg_ptr);
243
327
  }
244
328
  constructor(){
245
- const t = c.ifcapi_new();
246
- return this.__wbg_ptr = t >>> 0, fe.register(this, this.__wbg_ptr, this), this;
329
+ const t = a.ifcapi_new();
330
+ return this.__wbg_ptr = t >>> 0, Ie.register(this, this.__wbg_ptr, this), this;
247
331
  }
248
332
  get version() {
249
333
  let t, e;
250
334
  try {
251
- const i = c.__wbindgen_add_to_stack_pointer(-16);
252
- c.ifcapi_version(i, this.__wbg_ptr);
335
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
336
+ a.ifcapi_version(i, this.__wbg_ptr);
253
337
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
254
338
  return t = n, e = s, J(n, s);
255
339
  } finally{
256
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
340
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
257
341
  }
258
342
  }
259
343
  get is_ready() {
260
- return c.ifcapi_is_ready(this.__wbg_ptr) !== 0;
344
+ return a.ifcapi_is_ready(this.__wbg_ptr) !== 0;
261
345
  }
262
346
  parseStreaming(t, e) {
263
- const n = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), s = $, i = c.ifcapi_parseStreaming(this.__wbg_ptr, n, s, B(e));
264
- return V(i);
347
+ const n = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), s = G, i = a.ifcapi_parseStreaming(this.__wbg_ptr, n, s, U(e));
348
+ return D(i);
265
349
  }
266
350
  scanEntitiesFast(t) {
267
- const e = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), n = $, s = c.ifcapi_scanEntitiesFast(this.__wbg_ptr, e, n);
268
- return V(s);
351
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_scanEntitiesFast(this.__wbg_ptr, e, n);
352
+ return D(s);
269
353
  }
270
354
  scanEntitiesFastBytes(t) {
271
- const e = It(t, c.__wbindgen_export3), n = $, s = c.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, e, n);
272
- return V(s);
355
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, e, n);
356
+ return D(s);
273
357
  }
274
358
  scanGeometryEntitiesFast(t) {
275
- const e = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), n = $, s = c.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, e, n);
276
- return V(s);
359
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, e, n);
360
+ return D(s);
277
361
  }
278
362
  scanRelevantEntitiesFastBytes(t) {
279
- const e = It(t, c.__wbindgen_export3), n = $, s = c.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, e, n);
280
- return V(s);
363
+ const e = It(t, a.__wbindgen_export3), n = G, s = a.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, e, n);
364
+ return D(s);
281
365
  }
282
366
  parse(t) {
283
- const e = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), n = $, s = c.ifcapi_parse(this.__wbg_ptr, e, n);
284
- return V(s);
367
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parse(this.__wbg_ptr, e, n);
368
+ return D(s);
285
369
  }
286
370
  parseSymbolicRepresentations(t) {
287
- const e = ut(t, c.__wbindgen_export3, c.__wbindgen_export4), n = $, s = c.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, e, n);
288
- return Dt.__wrap(s);
371
+ const e = ct(t, a.__wbindgen_export3, a.__wbindgen_export4), n = G, s = a.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, e, n);
372
+ return Gt.__wrap(s);
289
373
  }
290
374
  };
291
- Symbol.dispose && (ie.prototype[Symbol.dispose] = ie.prototype.free);
292
- class Ot {
375
+ Symbol.dispose && (oe.prototype[Symbol.dispose] = oe.prototype.free);
376
+ class Lt {
293
377
  static __wrap(t) {
294
378
  t = t >>> 0;
295
- const e = Object.create(Ot.prototype);
296
- return e.__wbg_ptr = t, ue.register(e, e.__wbg_ptr, e), e;
379
+ const e = Object.create(Lt.prototype);
380
+ return e.__wbg_ptr = t, _e.register(e, e.__wbg_ptr, e), e;
297
381
  }
298
382
  __destroy_into_raw() {
299
383
  const t = this.__wbg_ptr;
300
- return this.__wbg_ptr = 0, ue.unregister(this), t;
384
+ return this.__wbg_ptr = 0, _e.unregister(this), t;
301
385
  }
302
386
  free() {
303
387
  const t = this.__destroy_into_raw();
304
- c.__wbg_meshcollection_free(t, 0);
388
+ a.__wbg_meshcollection_free(t, 0);
305
389
  }
306
390
  get rtcOffsetX() {
307
- return c.meshcollection_rtcOffsetX(this.__wbg_ptr);
391
+ return a.meshcollection_rtcOffsetX(this.__wbg_ptr);
308
392
  }
309
393
  get rtcOffsetY() {
310
- return c.meshcollection_rtcOffsetY(this.__wbg_ptr);
394
+ return a.meshcollection_rtcOffsetY(this.__wbg_ptr);
311
395
  }
312
396
  get rtcOffsetZ() {
313
- return c.meshcollection_rtcOffsetZ(this.__wbg_ptr);
397
+ return a.meshcollection_rtcOffsetZ(this.__wbg_ptr);
314
398
  }
315
399
  hasRtcOffset() {
316
- return c.meshcollection_hasRtcOffset(this.__wbg_ptr) !== 0;
400
+ return a.meshcollection_hasRtcOffset(this.__wbg_ptr) !== 0;
317
401
  }
318
402
  localToWorld(t, e, n) {
319
403
  try {
320
- const a = c.__wbindgen_add_to_stack_pointer(-16);
321
- c.meshcollection_localToWorld(a, this.__wbg_ptr, t, e, n);
322
- var s = A().getInt32(a + 0, !0), i = A().getInt32(a + 4, !0), o = Je(s, i).slice();
323
- return c.__wbindgen_export2(s, i * 8, 8), o;
404
+ const c = a.__wbindgen_add_to_stack_pointer(-16);
405
+ a.meshcollection_localToWorld(c, this.__wbg_ptr, t, e, n);
406
+ var s = A().getInt32(c + 0, !0), i = A().getInt32(c + 4, !0), o = en(s, i).slice();
407
+ return a.__wbindgen_export2(s, i * 8, 8), o;
324
408
  } finally{
325
- c.__wbindgen_add_to_stack_pointer(16);
409
+ a.__wbindgen_add_to_stack_pointer(16);
326
410
  }
327
411
  }
328
412
  get totalVertices() {
329
- return c.meshcollection_totalVertices(this.__wbg_ptr) >>> 0;
413
+ return a.meshcollection_totalVertices(this.__wbg_ptr) >>> 0;
330
414
  }
331
415
  get totalTriangles() {
332
- return c.meshcollection_totalTriangles(this.__wbg_ptr) >>> 0;
416
+ return a.meshcollection_totalTriangles(this.__wbg_ptr) >>> 0;
333
417
  }
334
418
  get buildingRotation() {
335
419
  try {
336
- const n = c.__wbindgen_add_to_stack_pointer(-16);
337
- c.meshcollection_buildingRotation(n, this.__wbg_ptr);
420
+ const n = a.__wbindgen_add_to_stack_pointer(-16);
421
+ a.meshcollection_buildingRotation(n, this.__wbg_ptr);
338
422
  var t = A().getInt32(n + 0, !0), e = A().getFloat64(n + 8, !0);
339
423
  return t === 0 ? void 0 : e;
340
424
  } finally{
341
- c.__wbindgen_add_to_stack_pointer(16);
425
+ a.__wbindgen_add_to_stack_pointer(16);
342
426
  }
343
427
  }
344
428
  get(t) {
345
- const e = c.meshcollection_get(this.__wbg_ptr, t);
346
- return e === 0 ? void 0 : Lt.__wrap(e);
429
+ const e = a.meshcollection_get(this.__wbg_ptr, t);
430
+ return e === 0 ? void 0 : Mt.__wrap(e);
347
431
  }
348
432
  get length() {
349
- return c.meshcollection_length(this.__wbg_ptr) >>> 0;
433
+ return a.meshcollection_length(this.__wbg_ptr) >>> 0;
350
434
  }
351
435
  }
352
- Symbol.dispose && (Ot.prototype[Symbol.dispose] = Ot.prototype.free);
353
- class Lt {
436
+ Symbol.dispose && (Lt.prototype[Symbol.dispose] = Lt.prototype.free);
437
+ class Mt {
354
438
  static __wrap(t) {
355
439
  t = t >>> 0;
356
- const e = Object.create(Lt.prototype);
357
- return e.__wbg_ptr = t, he.register(e, e.__wbg_ptr, e), e;
440
+ const e = Object.create(Mt.prototype);
441
+ return e.__wbg_ptr = t, ge.register(e, e.__wbg_ptr, e), e;
358
442
  }
359
443
  __destroy_into_raw() {
360
444
  const t = this.__wbg_ptr;
361
- return this.__wbg_ptr = 0, he.unregister(this), t;
445
+ return this.__wbg_ptr = 0, ge.unregister(this), t;
362
446
  }
363
447
  free() {
364
448
  const t = this.__destroy_into_raw();
365
- c.__wbg_meshdatajs_free(t, 0);
449
+ a.__wbg_meshdatajs_free(t, 0);
366
450
  }
367
451
  get expressId() {
368
- return c.meshdatajs_expressId(this.__wbg_ptr) >>> 0;
452
+ return a.meshdatajs_expressId(this.__wbg_ptr) >>> 0;
453
+ }
454
+ get hasTexture() {
455
+ return a.meshdatajs_hasTexture(this.__wbg_ptr) !== 0;
456
+ }
457
+ get textureRgba() {
458
+ const t = a.meshdatajs_textureRgba(this.__wbg_ptr);
459
+ return D(t);
369
460
  }
370
461
  get vertexCount() {
371
- return c.meshdatajs_vertexCount(this.__wbg_ptr) >>> 0;
462
+ return a.meshdatajs_vertexCount(this.__wbg_ptr) >>> 0;
372
463
  }
373
464
  get shadingColor() {
374
465
  try {
375
- const n = c.__wbindgen_add_to_stack_pointer(-16);
376
- c.meshdatajs_shadingColor(n, this.__wbg_ptr);
466
+ const n = a.__wbindgen_add_to_stack_pointer(-16);
467
+ a.meshdatajs_shadingColor(n, this.__wbg_ptr);
377
468
  var t = A().getInt32(n + 0, !0), e = A().getInt32(n + 4, !0);
378
469
  let s;
379
- return t !== 0 && (s = se(t, e).slice(), c.__wbindgen_export2(t, e * 4, 4)), s;
470
+ return t !== 0 && (s = re(t, e).slice(), a.__wbindgen_export2(t, e * 4, 4)), s;
380
471
  } finally{
381
- c.__wbindgen_add_to_stack_pointer(16);
472
+ a.__wbindgen_add_to_stack_pointer(16);
382
473
  }
383
474
  }
475
+ get textureWidth() {
476
+ return a.meshdatajs_textureWidth(this.__wbg_ptr) >>> 0;
477
+ }
478
+ get textureHeight() {
479
+ return a.meshdatajs_textureHeight(this.__wbg_ptr) >>> 0;
480
+ }
384
481
  get triangleCount() {
385
- return c.meshdatajs_triangleCount(this.__wbg_ptr) >>> 0;
482
+ return a.meshdatajs_triangleCount(this.__wbg_ptr) >>> 0;
483
+ }
484
+ get textureRepeatS() {
485
+ return a.meshdatajs_textureRepeatS(this.__wbg_ptr) !== 0;
486
+ }
487
+ get textureRepeatT() {
488
+ return a.meshdatajs_textureRepeatT(this.__wbg_ptr) !== 0;
489
+ }
490
+ get uvs() {
491
+ const t = a.meshdatajs_uvs(this.__wbg_ptr);
492
+ return D(t);
386
493
  }
387
494
  get color() {
388
495
  try {
389
- const s = c.__wbindgen_add_to_stack_pointer(-16);
390
- c.meshdatajs_color(s, this.__wbg_ptr);
391
- var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = se(t, e).slice();
392
- return c.__wbindgen_export2(t, e * 4, 4), n;
496
+ const s = a.__wbindgen_add_to_stack_pointer(-16);
497
+ a.meshdatajs_color(s, this.__wbg_ptr);
498
+ var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = re(t, e).slice();
499
+ return a.__wbindgen_export2(t, e * 4, 4), n;
393
500
  } finally{
394
- c.__wbindgen_add_to_stack_pointer(16);
501
+ a.__wbindgen_add_to_stack_pointer(16);
395
502
  }
396
503
  }
397
504
  get indices() {
398
- const t = c.meshdatajs_indices(this.__wbg_ptr);
399
- return V(t);
505
+ const t = a.meshdatajs_indices(this.__wbg_ptr);
506
+ return D(t);
400
507
  }
401
508
  get normals() {
402
- const t = c.meshdatajs_normals(this.__wbg_ptr);
403
- return V(t);
509
+ const t = a.meshdatajs_normals(this.__wbg_ptr);
510
+ return D(t);
404
511
  }
405
512
  get ifcType() {
406
513
  let t, e;
407
514
  try {
408
- const i = c.__wbindgen_add_to_stack_pointer(-16);
409
- c.meshdatajs_ifcType(i, this.__wbg_ptr);
515
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
516
+ a.meshdatajs_ifcType(i, this.__wbg_ptr);
410
517
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
411
518
  return t = n, e = s, J(n, s);
412
519
  } finally{
413
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
520
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
414
521
  }
415
522
  }
416
523
  get positions() {
417
- const t = c.meshdatajs_positions(this.__wbg_ptr);
418
- return V(t);
524
+ const t = a.meshdatajs_positions(this.__wbg_ptr);
525
+ return D(t);
419
526
  }
420
527
  }
421
- Symbol.dispose && (Lt.prototype[Symbol.dispose] = Lt.prototype.free);
422
- class Mt {
528
+ Symbol.dispose && (Mt.prototype[Symbol.dispose] = Mt.prototype.free);
529
+ class Pt {
423
530
  static __wrap(t) {
424
531
  t = t >>> 0;
425
- const e = Object.create(Mt.prototype);
426
- return e.__wbg_ptr = t, pe.register(e, e.__wbg_ptr, e), e;
532
+ const e = Object.create(Pt.prototype);
533
+ return e.__wbg_ptr = t, ye.register(e, e.__wbg_ptr, e), e;
427
534
  }
428
535
  __destroy_into_raw() {
429
536
  const t = this.__wbg_ptr;
430
- return this.__wbg_ptr = 0, pe.unregister(this), t;
537
+ return this.__wbg_ptr = 0, ye.unregister(this), t;
431
538
  }
432
539
  free() {
433
540
  const t = this.__destroy_into_raw();
434
- c.__wbg_profilecollection_free(t, 0);
541
+ a.__wbg_profilecollection_free(t, 0);
435
542
  }
436
543
  get(t) {
437
- const e = c.profilecollection_get(this.__wbg_ptr, t);
438
- return e === 0 ? void 0 : xt.__wrap(e);
544
+ const e = a.profilecollection_get(this.__wbg_ptr, t);
545
+ return e === 0 ? void 0 : Bt.__wrap(e);
439
546
  }
440
547
  get length() {
441
- return c.profilecollection_length(this.__wbg_ptr) >>> 0;
548
+ return a.profilecollection_length(this.__wbg_ptr) >>> 0;
442
549
  }
443
550
  }
444
- Symbol.dispose && (Mt.prototype[Symbol.dispose] = Mt.prototype.free);
445
- class xt {
551
+ Symbol.dispose && (Pt.prototype[Symbol.dispose] = Pt.prototype.free);
552
+ class Bt {
446
553
  static __wrap(t) {
447
554
  t = t >>> 0;
448
- const e = Object.create(xt.prototype);
449
- return e.__wbg_ptr = t, Ie.register(e, e.__wbg_ptr, e), e;
555
+ const e = Object.create(Bt.prototype);
556
+ return e.__wbg_ptr = t, me.register(e, e.__wbg_ptr, e), e;
450
557
  }
451
558
  __destroy_into_raw() {
452
559
  const t = this.__wbg_ptr;
453
- return this.__wbg_ptr = 0, Ie.unregister(this), t;
560
+ return this.__wbg_ptr = 0, me.unregister(this), t;
454
561
  }
455
562
  free() {
456
563
  const t = this.__destroy_into_raw();
457
- c.__wbg_profileentryjs_free(t, 0);
564
+ a.__wbg_profileentryjs_free(t, 0);
458
565
  }
459
566
  get expressId() {
460
- return c.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
567
+ return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
461
568
  }
462
569
  get holeCounts() {
463
- const t = c.profileentryjs_holeCounts(this.__wbg_ptr);
464
- return V(t);
570
+ const t = a.profileentryjs_holeCounts(this.__wbg_ptr);
571
+ return D(t);
465
572
  }
466
573
  get holePoints() {
467
- const t = c.profileentryjs_holePoints(this.__wbg_ptr);
468
- return V(t);
574
+ const t = a.profileentryjs_holePoints(this.__wbg_ptr);
575
+ return D(t);
469
576
  }
470
577
  get modelIndex() {
471
- return c.profileentryjs_modelIndex(this.__wbg_ptr) >>> 0;
578
+ return a.profileentryjs_modelIndex(this.__wbg_ptr) >>> 0;
472
579
  }
473
580
  get outerPoints() {
474
- const t = c.profileentryjs_outerPoints(this.__wbg_ptr);
475
- return V(t);
581
+ const t = a.profileentryjs_outerPoints(this.__wbg_ptr);
582
+ return D(t);
476
583
  }
477
584
  get extrusionDir() {
478
- const t = c.profileentryjs_extrusionDir(this.__wbg_ptr);
479
- return V(t);
585
+ const t = a.profileentryjs_extrusionDir(this.__wbg_ptr);
586
+ return D(t);
480
587
  }
481
588
  get extrusionDepth() {
482
- return c.profileentryjs_extrusionDepth(this.__wbg_ptr);
589
+ return a.profileentryjs_extrusionDepth(this.__wbg_ptr);
483
590
  }
484
591
  get ifcType() {
485
592
  let t, e;
486
593
  try {
487
- const i = c.__wbindgen_add_to_stack_pointer(-16);
488
- c.profileentryjs_ifcType(i, this.__wbg_ptr);
594
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
595
+ a.profileentryjs_ifcType(i, this.__wbg_ptr);
489
596
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
490
597
  return t = n, e = s, J(n, s);
491
598
  } finally{
492
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
599
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
493
600
  }
494
601
  }
495
602
  get transform() {
496
- const t = c.profileentryjs_transform(this.__wbg_ptr);
497
- return V(t);
603
+ const t = a.profileentryjs_transform(this.__wbg_ptr);
604
+ return D(t);
498
605
  }
499
606
  }
500
- Symbol.dispose && (xt.prototype[Symbol.dispose] = xt.prototype.free);
501
- class Pt {
607
+ Symbol.dispose && (Bt.prototype[Symbol.dispose] = Bt.prototype.free);
608
+ class Ut {
502
609
  static __wrap(t) {
503
610
  t = t >>> 0;
504
- const e = Object.create(Pt.prototype);
505
- return e.__wbg_ptr = t, ge.register(e, e.__wbg_ptr, e), e;
611
+ const e = Object.create(Ut.prototype);
612
+ return e.__wbg_ptr = t, Ee.register(e, e.__wbg_ptr, e), e;
506
613
  }
507
614
  __destroy_into_raw() {
508
615
  const t = this.__wbg_ptr;
509
- return this.__wbg_ptr = 0, ge.unregister(this), t;
616
+ return this.__wbg_ptr = 0, Ee.unregister(this), t;
510
617
  }
511
618
  free() {
512
619
  const t = this.__destroy_into_raw();
513
- c.__wbg_symboliccircle_free(t, 0);
620
+ a.__wbg_symboliccircle_free(t, 0);
514
621
  }
515
622
  get expressId() {
516
- return c.symboliccircle_expressId(this.__wbg_ptr) >>> 0;
623
+ return a.symboliccircle_expressId(this.__wbg_ptr) >>> 0;
517
624
  }
518
625
  get startAngle() {
519
- return c.symboliccircle_startAngle(this.__wbg_ptr);
626
+ return a.symboliccircle_startAngle(this.__wbg_ptr);
520
627
  }
521
628
  get isFullCircle() {
522
- return c.symboliccircle_isFullCircle(this.__wbg_ptr) !== 0;
629
+ return a.symboliccircle_isFullCircle(this.__wbg_ptr) !== 0;
523
630
  }
524
631
  get repIdentifier() {
525
632
  let t, e;
526
633
  try {
527
- const i = c.__wbindgen_add_to_stack_pointer(-16);
528
- c.symboliccircle_repIdentifier(i, this.__wbg_ptr);
634
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
635
+ a.symboliccircle_repIdentifier(i, this.__wbg_ptr);
529
636
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
530
637
  return t = n, e = s, J(n, s);
531
638
  } finally{
532
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
639
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
533
640
  }
534
641
  }
535
642
  get radius() {
536
- return c.symboliccircle_radius(this.__wbg_ptr);
643
+ return a.symboliccircle_radius(this.__wbg_ptr);
537
644
  }
538
645
  get worldY() {
539
- return c.symboliccircle_worldY(this.__wbg_ptr);
646
+ return a.symboliccircle_worldY(this.__wbg_ptr);
540
647
  }
541
648
  get centerX() {
542
- return c.symboliccircle_centerX(this.__wbg_ptr);
649
+ return a.symboliccircle_centerX(this.__wbg_ptr);
543
650
  }
544
651
  get centerY() {
545
- return c.symboliccircle_centerY(this.__wbg_ptr);
652
+ return a.symboliccircle_centerY(this.__wbg_ptr);
546
653
  }
547
654
  get ifcType() {
548
655
  let t, e;
549
656
  try {
550
- const i = c.__wbindgen_add_to_stack_pointer(-16);
551
- c.symboliccircle_ifcType(i, this.__wbg_ptr);
657
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
658
+ a.symboliccircle_ifcType(i, this.__wbg_ptr);
552
659
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
553
660
  return t = n, e = s, J(n, s);
554
661
  } finally{
555
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
662
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
556
663
  }
557
664
  }
558
665
  get endAngle() {
559
- return c.symboliccircle_endAngle(this.__wbg_ptr);
666
+ return a.symboliccircle_endAngle(this.__wbg_ptr);
560
667
  }
561
668
  }
562
- Symbol.dispose && (Pt.prototype[Symbol.dispose] = Pt.prototype.free);
563
- class Bt {
669
+ Symbol.dispose && (Ut.prototype[Symbol.dispose] = Ut.prototype.free);
670
+ class Dt {
564
671
  static __wrap(t) {
565
672
  t = t >>> 0;
566
- const e = Object.create(Bt.prototype);
567
- return e.__wbg_ptr = t, _e.register(e, e.__wbg_ptr, e), e;
673
+ const e = Object.create(Dt.prototype);
674
+ return e.__wbg_ptr = t, be.register(e, e.__wbg_ptr, e), e;
568
675
  }
569
676
  __destroy_into_raw() {
570
677
  const t = this.__wbg_ptr;
571
- return this.__wbg_ptr = 0, _e.unregister(this), t;
678
+ return this.__wbg_ptr = 0, be.unregister(this), t;
572
679
  }
573
680
  free() {
574
681
  const t = this.__destroy_into_raw();
575
- c.__wbg_symbolicfillarea_free(t, 0);
682
+ a.__wbg_symbolicfillarea_free(t, 0);
576
683
  }
577
684
  get expressId() {
578
- return c.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
685
+ return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
579
686
  }
580
687
  get holeCount() {
581
- return c.symbolicfillarea_holeCount(this.__wbg_ptr) >>> 0;
688
+ return a.symbolicfillarea_holeCount(this.__wbg_ptr) >>> 0;
582
689
  }
583
690
  get hatchAngle() {
584
- return c.symbolicfillarea_hatchAngle(this.__wbg_ptr);
691
+ return a.symbolicfillarea_hatchAngle(this.__wbg_ptr);
585
692
  }
586
693
  get pointCount() {
587
- return c.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
694
+ return a.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
588
695
  }
589
696
  get hasHatching() {
590
- return c.symbolicfillarea_hasHatching(this.__wbg_ptr) !== 0;
697
+ return a.symbolicfillarea_hasHatching(this.__wbg_ptr) !== 0;
591
698
  }
592
699
  get hatchSpacing() {
593
- return c.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
700
+ return a.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
594
701
  }
595
702
  get holesOffsets() {
596
- const t = c.symbolicfillarea_holesOffsets(this.__wbg_ptr);
597
- return V(t);
703
+ const t = a.symbolicfillarea_holesOffsets(this.__wbg_ptr);
704
+ return D(t);
598
705
  }
599
706
  get repIdentifier() {
600
707
  let t, e;
601
708
  try {
602
- const i = c.__wbindgen_add_to_stack_pointer(-16);
603
- c.symbolicfillarea_repIdentifier(i, this.__wbg_ptr);
709
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
710
+ a.symbolicfillarea_repIdentifier(i, this.__wbg_ptr);
604
711
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
605
712
  return t = n, e = s, J(n, s);
606
713
  } finally{
607
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
714
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
608
715
  }
609
716
  }
610
717
  get hatchLineWidth() {
611
- return c.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
718
+ return a.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
612
719
  }
613
720
  get hatchAngleSecondary() {
614
- return c.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
721
+ return a.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
615
722
  }
616
723
  get fillA() {
617
- return c.symbolicfillarea_fillA(this.__wbg_ptr);
724
+ return a.symbolicfillarea_fillA(this.__wbg_ptr);
618
725
  }
619
726
  get fillB() {
620
- return c.symbolicfillarea_fillB(this.__wbg_ptr);
727
+ return a.symbolicfillarea_fillB(this.__wbg_ptr);
621
728
  }
622
729
  get fillG() {
623
- return c.symbolicfillarea_fillG(this.__wbg_ptr);
730
+ return a.symbolicfillarea_fillG(this.__wbg_ptr);
624
731
  }
625
732
  get fillR() {
626
- return c.symbolicfillarea_fillR(this.__wbg_ptr);
733
+ return a.symbolicfillarea_fillR(this.__wbg_ptr);
627
734
  }
628
735
  get points() {
629
- const t = c.symbolicfillarea_points(this.__wbg_ptr);
630
- return V(t);
736
+ const t = a.symbolicfillarea_points(this.__wbg_ptr);
737
+ return D(t);
631
738
  }
632
739
  get worldY() {
633
- return c.symbolicfillarea_worldY(this.__wbg_ptr);
740
+ return a.symbolicfillarea_worldY(this.__wbg_ptr);
634
741
  }
635
742
  get ifcType() {
636
743
  let t, e;
637
744
  try {
638
- const i = c.__wbindgen_add_to_stack_pointer(-16);
639
- c.symbolicfillarea_ifcType(i, this.__wbg_ptr);
745
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
746
+ a.symbolicfillarea_ifcType(i, this.__wbg_ptr);
640
747
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
641
748
  return t = n, e = s, J(n, s);
642
749
  } finally{
643
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
750
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
644
751
  }
645
752
  }
646
753
  }
647
- Symbol.dispose && (Bt.prototype[Symbol.dispose] = Bt.prototype.free);
648
- class Ut {
754
+ Symbol.dispose && (Dt.prototype[Symbol.dispose] = Dt.prototype.free);
755
+ class vt {
649
756
  static __wrap(t) {
650
757
  t = t >>> 0;
651
- const e = Object.create(Ut.prototype);
652
- return e.__wbg_ptr = t, ye.register(e, e.__wbg_ptr, e), e;
758
+ const e = Object.create(vt.prototype);
759
+ return e.__wbg_ptr = t, Ce.register(e, e.__wbg_ptr, e), e;
653
760
  }
654
761
  __destroy_into_raw() {
655
762
  const t = this.__wbg_ptr;
656
- return this.__wbg_ptr = 0, ye.unregister(this), t;
763
+ return this.__wbg_ptr = 0, Ce.unregister(this), t;
657
764
  }
658
765
  free() {
659
766
  const t = this.__destroy_into_raw();
660
- c.__wbg_symbolicpolyline_free(t, 0);
767
+ a.__wbg_symbolicpolyline_free(t, 0);
661
768
  }
662
769
  get expressId() {
663
- return c.symbolicpolyline_expressId(this.__wbg_ptr) >>> 0;
770
+ return a.symbolicpolyline_expressId(this.__wbg_ptr) >>> 0;
664
771
  }
665
772
  get pointCount() {
666
- return c.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
773
+ return a.symbolicfillarea_pointCount(this.__wbg_ptr) >>> 0;
667
774
  }
668
775
  get repIdentifier() {
669
776
  let t, e;
670
777
  try {
671
- const i = c.__wbindgen_add_to_stack_pointer(-16);
672
- c.symbolicpolyline_repIdentifier(i, this.__wbg_ptr);
778
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
779
+ a.symbolicpolyline_repIdentifier(i, this.__wbg_ptr);
673
780
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
674
781
  return t = n, e = s, J(n, s);
675
782
  } finally{
676
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
783
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
677
784
  }
678
785
  }
679
786
  get points() {
680
- const t = c.symbolicpolyline_points(this.__wbg_ptr);
681
- return V(t);
787
+ const t = a.symbolicpolyline_points(this.__wbg_ptr);
788
+ return D(t);
682
789
  }
683
790
  get worldY() {
684
- return c.symboliccircle_worldY(this.__wbg_ptr);
791
+ return a.symboliccircle_worldY(this.__wbg_ptr);
685
792
  }
686
793
  get ifcType() {
687
794
  let t, e;
688
795
  try {
689
- const i = c.__wbindgen_add_to_stack_pointer(-16);
690
- c.symbolicpolyline_ifcType(i, this.__wbg_ptr);
796
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
797
+ a.symbolicpolyline_ifcType(i, this.__wbg_ptr);
691
798
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
692
799
  return t = n, e = s, J(n, s);
693
800
  } finally{
694
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
801
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
695
802
  }
696
803
  }
697
804
  get isClosed() {
698
- return c.symbolicpolyline_isClosed(this.__wbg_ptr) !== 0;
805
+ return a.symbolicpolyline_isClosed(this.__wbg_ptr) !== 0;
699
806
  }
700
807
  }
701
- Symbol.dispose && (Ut.prototype[Symbol.dispose] = Ut.prototype.free);
702
- class Dt {
808
+ Symbol.dispose && (vt.prototype[Symbol.dispose] = vt.prototype.free);
809
+ class Gt {
703
810
  static __wrap(t) {
704
811
  t = t >>> 0;
705
- const e = Object.create(Dt.prototype);
706
- return e.__wbg_ptr = t, Ee.register(e, e.__wbg_ptr, e), e;
812
+ const e = Object.create(Gt.prototype);
813
+ return e.__wbg_ptr = t, we.register(e, e.__wbg_ptr, e), e;
707
814
  }
708
815
  __destroy_into_raw() {
709
816
  const t = this.__wbg_ptr;
710
- return this.__wbg_ptr = 0, Ee.unregister(this), t;
817
+ return this.__wbg_ptr = 0, we.unregister(this), t;
711
818
  }
712
819
  free() {
713
820
  const t = this.__destroy_into_raw();
714
- c.__wbg_symbolicrepresentationcollection_free(t, 0);
821
+ a.__wbg_symbolicrepresentationcollection_free(t, 0);
715
822
  }
716
823
  get fillCount() {
717
- return c.symbolicrepresentationcollection_fillCount(this.__wbg_ptr) >>> 0;
824
+ return a.symbolicrepresentationcollection_fillCount(this.__wbg_ptr) >>> 0;
718
825
  }
719
826
  getCircle(t) {
720
- const e = c.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, t);
721
- return e === 0 ? void 0 : Pt.__wrap(e);
827
+ const e = a.symbolicrepresentationcollection_getCircle(this.__wbg_ptr, t);
828
+ return e === 0 ? void 0 : Ut.__wrap(e);
722
829
  }
723
830
  get textCount() {
724
- return c.symbolicrepresentationcollection_textCount(this.__wbg_ptr) >>> 0;
831
+ return a.symbolicrepresentationcollection_textCount(this.__wbg_ptr) >>> 0;
725
832
  }
726
833
  get totalCount() {
727
- return c.symbolicrepresentationcollection_totalCount(this.__wbg_ptr) >>> 0;
834
+ return a.symbolicrepresentationcollection_totalCount(this.__wbg_ptr) >>> 0;
728
835
  }
729
836
  get circleCount() {
730
- return c.symbolicrepresentationcollection_circleCount(this.__wbg_ptr) >>> 0;
837
+ return a.symbolicrepresentationcollection_circleCount(this.__wbg_ptr) >>> 0;
731
838
  }
732
839
  getPolyline(t) {
733
- const e = c.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, t);
734
- return e === 0 ? void 0 : Ut.__wrap(e);
840
+ const e = a.symbolicrepresentationcollection_getPolyline(this.__wbg_ptr, t);
841
+ return e === 0 ? void 0 : vt.__wrap(e);
735
842
  }
736
843
  get polylineCount() {
737
- return c.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr) >>> 0;
844
+ return a.symbolicrepresentationcollection_polylineCount(this.__wbg_ptr) >>> 0;
738
845
  }
739
846
  getExpressIds() {
740
847
  try {
741
- const s = c.__wbindgen_add_to_stack_pointer(-16);
742
- c.symbolicrepresentationcollection_getExpressIds(s, this.__wbg_ptr);
743
- var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = xe(t, e).slice();
744
- return c.__wbindgen_export2(t, e * 4, 4), n;
848
+ const s = a.__wbindgen_add_to_stack_pointer(-16);
849
+ a.symbolicrepresentationcollection_getExpressIds(s, this.__wbg_ptr);
850
+ var t = A().getInt32(s + 0, !0), e = A().getInt32(s + 4, !0), n = De(t, e).slice();
851
+ return a.__wbindgen_export2(t, e * 4, 4), n;
745
852
  } finally{
746
- c.__wbindgen_add_to_stack_pointer(16);
853
+ a.__wbindgen_add_to_stack_pointer(16);
747
854
  }
748
855
  }
749
856
  getFill(t) {
750
- const e = c.symbolicrepresentationcollection_getFill(this.__wbg_ptr, t);
751
- return e === 0 ? void 0 : Bt.__wrap(e);
857
+ const e = a.symbolicrepresentationcollection_getFill(this.__wbg_ptr, t);
858
+ return e === 0 ? void 0 : Dt.__wrap(e);
752
859
  }
753
860
  getText(t) {
754
- const e = c.symbolicrepresentationcollection_getText(this.__wbg_ptr, t);
755
- return e === 0 ? void 0 : vt.__wrap(e);
861
+ const e = a.symbolicrepresentationcollection_getText(this.__wbg_ptr, t);
862
+ return e === 0 ? void 0 : $t.__wrap(e);
756
863
  }
757
864
  get isEmpty() {
758
- return c.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr) !== 0;
865
+ return a.symbolicrepresentationcollection_isEmpty(this.__wbg_ptr) !== 0;
759
866
  }
760
867
  }
761
- Symbol.dispose && (Dt.prototype[Symbol.dispose] = Dt.prototype.free);
762
- class vt {
868
+ Symbol.dispose && (Gt.prototype[Symbol.dispose] = Gt.prototype.free);
869
+ class $t {
763
870
  static __wrap(t) {
764
871
  t = t >>> 0;
765
- const e = Object.create(vt.prototype);
766
- return e.__wbg_ptr = t, me.register(e, e.__wbg_ptr, e), e;
872
+ const e = Object.create($t.prototype);
873
+ return e.__wbg_ptr = t, Te.register(e, e.__wbg_ptr, e), e;
767
874
  }
768
875
  __destroy_into_raw() {
769
876
  const t = this.__wbg_ptr;
770
- return this.__wbg_ptr = 0, me.unregister(this), t;
877
+ return this.__wbg_ptr = 0, Te.unregister(this), t;
771
878
  }
772
879
  free() {
773
880
  const t = this.__destroy_into_raw();
774
- c.__wbg_symbolictext_free(t, 0);
881
+ a.__wbg_symbolictext_free(t, 0);
775
882
  }
776
883
  get expressId() {
777
- return c.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
884
+ return a.profileentryjs_expressId(this.__wbg_ptr) >>> 0;
778
885
  }
779
886
  get repIdentifier() {
780
887
  let t, e;
781
888
  try {
782
- const i = c.__wbindgen_add_to_stack_pointer(-16);
783
- c.symbolictext_repIdentifier(i, this.__wbg_ptr);
889
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
890
+ a.symbolictext_repIdentifier(i, this.__wbg_ptr);
784
891
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
785
892
  return t = n, e = s, J(n, s);
786
893
  } finally{
787
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
894
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
788
895
  }
789
896
  }
790
897
  get x() {
791
- return c.symbolicfillarea_fillR(this.__wbg_ptr);
898
+ return a.symbolicfillarea_fillR(this.__wbg_ptr);
792
899
  }
793
900
  get y() {
794
- return c.symbolicfillarea_fillG(this.__wbg_ptr);
901
+ return a.symbolicfillarea_fillG(this.__wbg_ptr);
795
902
  }
796
903
  get dirX() {
797
- return c.symbolicfillarea_fillB(this.__wbg_ptr);
904
+ return a.symbolicfillarea_fillB(this.__wbg_ptr);
798
905
  }
799
906
  get dirY() {
800
- return c.symbolicfillarea_fillA(this.__wbg_ptr);
907
+ return a.symbolicfillarea_fillA(this.__wbg_ptr);
801
908
  }
802
909
  get height() {
803
- return c.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
910
+ return a.symbolicfillarea_hatchSpacing(this.__wbg_ptr);
804
911
  }
805
912
  get colorA() {
806
- return c.symbolictext_colorA(this.__wbg_ptr);
913
+ return a.symbolictext_colorA(this.__wbg_ptr);
807
914
  }
808
915
  get colorB() {
809
- return c.symbolicfillarea_worldY(this.__wbg_ptr);
916
+ return a.symbolicfillarea_worldY(this.__wbg_ptr);
810
917
  }
811
918
  get colorG() {
812
- return c.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
919
+ return a.symbolicfillarea_hatchLineWidth(this.__wbg_ptr);
813
920
  }
814
921
  get colorR() {
815
- return c.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
922
+ return a.symbolicfillarea_hatchAngleSecondary(this.__wbg_ptr);
816
923
  }
817
924
  get content() {
818
925
  let t, e;
819
926
  try {
820
- const i = c.__wbindgen_add_to_stack_pointer(-16);
821
- c.symbolictext_content(i, this.__wbg_ptr);
927
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
928
+ a.symbolictext_content(i, this.__wbg_ptr);
822
929
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
823
930
  return t = n, e = s, J(n, s);
824
931
  } finally{
825
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
932
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
826
933
  }
827
934
  }
828
935
  get worldY() {
829
- return c.symbolicfillarea_hatchAngle(this.__wbg_ptr);
936
+ return a.symbolicfillarea_hatchAngle(this.__wbg_ptr);
830
937
  }
831
938
  get ifcType() {
832
939
  let t, e;
833
940
  try {
834
- const i = c.__wbindgen_add_to_stack_pointer(-16);
835
- c.symbolictext_ifcType(i, this.__wbg_ptr);
941
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
942
+ a.symbolictext_ifcType(i, this.__wbg_ptr);
836
943
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
837
944
  return t = n, e = s, J(n, s);
838
945
  } finally{
839
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
946
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
840
947
  }
841
948
  }
842
949
  get alignment() {
843
950
  let t, e;
844
951
  try {
845
- const i = c.__wbindgen_add_to_stack_pointer(-16);
846
- c.symbolictext_alignment(i, this.__wbg_ptr);
952
+ const i = a.__wbindgen_add_to_stack_pointer(-16);
953
+ a.symbolictext_alignment(i, this.__wbg_ptr);
847
954
  var n = A().getInt32(i + 0, !0), s = A().getInt32(i + 4, !0);
848
955
  return t = n, e = s, J(n, s);
849
956
  } finally{
850
- c.__wbindgen_add_to_stack_pointer(16), c.__wbindgen_export2(t, e, 1);
957
+ a.__wbindgen_add_to_stack_pointer(16), a.__wbindgen_export2(t, e, 1);
851
958
  }
852
959
  }
853
960
  get targetPx() {
854
- return c.symbolictext_targetPx(this.__wbg_ptr);
961
+ return a.symbolictext_targetPx(this.__wbg_ptr);
855
962
  }
856
963
  }
857
- Symbol.dispose && (vt.prototype[Symbol.dispose] = vt.prototype.free);
858
- const on = new Set([
964
+ Symbol.dispose && ($t.prototype[Symbol.dispose] = $t.prototype.free);
965
+ const fn = new Set([
859
966
  "basic",
860
967
  "cors",
861
968
  "default"
862
969
  ]);
863
- async function an(r, t) {
970
+ async function un(r, t) {
864
971
  if (typeof Response == "function" && r instanceof Response) {
865
972
  if (typeof WebAssembly.instantiateStreaming == "function") try {
866
973
  return await WebAssembly.instantiateStreaming(r, t);
867
974
  } catch (n) {
868
- if (r.ok && on.has(r.type) && r.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", n);
975
+ if (r.ok && fn.has(r.type) && r.headers.get("Content-Type") !== "application/wasm") console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", n);
869
976
  else throw n;
870
977
  }
871
978
  const e = await r.arrayBuffer();
@@ -878,161 +985,164 @@ let __tla = Promise.all([
878
985
  } : e;
879
986
  }
880
987
  }
881
- function cn() {
988
+ function hn() {
882
989
  const r = {};
883
990
  return r.wbg = {}, r.wbg.__wbg_Error_52673b7de5a0ca89 = function(t, e) {
884
991
  const n = Error(J(t, e));
885
- return B(n);
992
+ return U(n);
886
993
  }, r.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(t) {
887
- return typeof W(t) == "function";
994
+ return typeof k(t) == "function";
888
995
  }, r.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(t) {
889
- return W(t) === void 0;
996
+ return k(t) === void 0;
890
997
  }, r.wbg.__wbg___wbindgen_memory_a342e963fbcabd68 = function() {
891
- const t = c.memory;
892
- return B(t);
998
+ const t = a.memory;
999
+ return U(t);
893
1000
  }, r.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(t, e) {
894
1001
  throw new Error(J(t, e));
895
1002
  }, r.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(t) {
896
- W(t)._wbg_cb_unref();
1003
+ k(t)._wbg_cb_unref();
897
1004
  }, r.wbg.__wbg_call_3020136f7a2d6e44 = function() {
898
- return Xt(function(t, e, n) {
899
- const s = W(t).call(W(e), W(n));
900
- return B(s);
1005
+ return Qt(function(t, e, n) {
1006
+ const s = k(t).call(k(e), k(n));
1007
+ return U(s);
901
1008
  }, arguments);
902
1009
  }, r.wbg.__wbg_call_abb4ff46ce38be40 = function() {
903
- return Xt(function(t, e) {
904
- const n = W(t).call(W(e));
905
- return B(n);
1010
+ return Qt(function(t, e) {
1011
+ const n = k(t).call(k(e));
1012
+ return U(n);
906
1013
  }, arguments);
907
1014
  }, r.wbg.__wbg_error_7534b8e9a36f1ab4 = function(t, e) {
908
1015
  let n, s;
909
1016
  try {
910
1017
  n = t, s = e, console.error(J(t, e));
911
1018
  } finally{
912
- c.__wbindgen_export2(n, s, 1);
1019
+ a.__wbindgen_export2(n, s, 1);
913
1020
  }
914
1021
  }, r.wbg.__wbg_info_ce6bcc489c22f6f0 = function(t) {
915
- console.info(W(t));
1022
+ console.info(k(t));
916
1023
  }, r.wbg.__wbg_new_1ba21ce319a06297 = function() {
917
1024
  const t = new Object;
918
- return B(t);
1025
+ return U(t);
919
1026
  }, r.wbg.__wbg_new_25f239778d6112b9 = function() {
920
1027
  const t = new Array;
921
- return B(t);
1028
+ return U(t);
922
1029
  }, r.wbg.__wbg_new_8a6f238a6ece86ea = function() {
923
1030
  const t = new Error;
924
- return B(t);
1031
+ return U(t);
925
1032
  }, r.wbg.__wbg_new_ff12d2b041fb48f1 = function(t, e) {
926
1033
  try {
927
1034
  var n = {
928
1035
  a: t,
929
1036
  b: e
930
- }, s = (o, a)=>{
1037
+ }, s = (o, c)=>{
931
1038
  const l = n.a;
932
1039
  n.a = 0;
933
1040
  try {
934
- return rn(l, n.b, o, a);
1041
+ return dn(l, n.b, o, c);
935
1042
  } finally{
936
1043
  n.a = l;
937
1044
  }
938
1045
  };
939
1046
  const i = new Promise(s);
940
- return B(i);
1047
+ return U(i);
941
1048
  } finally{
942
1049
  n.a = n.b = 0;
943
1050
  }
944
1051
  }, r.wbg.__wbg_new_from_slice_41e2764a343e3cb1 = function(t, e) {
945
- const n = new Float32Array(se(t, e));
946
- return B(n);
1052
+ const n = new Float32Array(re(t, e));
1053
+ return U(n);
947
1054
  }, r.wbg.__wbg_new_from_slice_db0691b69e9d3891 = function(t, e) {
948
- const n = new Uint32Array(xe(t, e));
949
- return B(n);
1055
+ const n = new Uint32Array(De(t, e));
1056
+ return U(n);
1057
+ }, r.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(t, e) {
1058
+ const n = new Uint8Array(nn(t, e));
1059
+ return U(n);
950
1060
  }, r.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(t, e) {
951
1061
  const n = new Function(J(t, e));
952
- return B(n);
1062
+ return U(n);
953
1063
  }, r.wbg.__wbg_new_with_length_202b3db94ba5fc86 = function(t) {
954
1064
  const e = new Uint32Array(t >>> 0);
955
- return B(e);
1065
+ return U(e);
956
1066
  }, r.wbg.__wbg_new_with_length_806b9e5b8290af7c = function(t) {
957
1067
  const e = new Float64Array(t >>> 0);
958
- return B(e);
1068
+ return U(e);
959
1069
  }, r.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(t) {
960
1070
  const e = new Uint8Array(t >>> 0);
961
- return B(e);
1071
+ return U(e);
962
1072
  }, r.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(t) {
963
- const e = W(t).queueMicrotask;
964
- return B(e);
1073
+ const e = k(t).queueMicrotask;
1074
+ return U(e);
965
1075
  }, r.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(t) {
966
- queueMicrotask(W(t));
1076
+ queueMicrotask(k(t));
967
1077
  }, r.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(t) {
968
- const e = Promise.resolve(W(t));
969
- return B(e);
1078
+ const e = Promise.resolve(k(t));
1079
+ return U(e);
970
1080
  }, r.wbg.__wbg_set_3f1d0b984ed272ed = function(t, e, n) {
971
- W(t)[V(e)] = V(n);
1081
+ k(t)[D(e)] = D(n);
972
1082
  }, r.wbg.__wbg_set_781438a03c0c3c81 = function() {
973
- return Xt(function(t, e, n) {
974
- return Reflect.set(W(t), W(e), W(n));
1083
+ return Qt(function(t, e, n) {
1084
+ return Reflect.set(k(t), k(e), k(n));
975
1085
  }, arguments);
976
1086
  }, r.wbg.__wbg_set_7df433eea03a5c14 = function(t, e, n) {
977
- W(t)[e >>> 0] = V(n);
1087
+ k(t)[e >>> 0] = D(n);
978
1088
  }, r.wbg.__wbg_set_index_021489b2916af13e = function(t, e, n) {
979
- W(t)[e >>> 0] = n;
1089
+ k(t)[e >>> 0] = n;
980
1090
  }, r.wbg.__wbg_set_index_04c4b93e64d08a52 = function(t, e, n) {
981
- W(t)[e >>> 0] = n;
1091
+ k(t)[e >>> 0] = n;
982
1092
  }, r.wbg.__wbg_set_index_42abe35f117e614e = function(t, e, n) {
983
- W(t)[e >>> 0] = n >>> 0;
1093
+ k(t)[e >>> 0] = n >>> 0;
984
1094
  }, r.wbg.__wbg_stack_0ed75d68575b0f3c = function(t, e) {
985
- const n = W(e).stack, s = ut(n, c.__wbindgen_export3, c.__wbindgen_export4), i = $;
1095
+ const n = k(e).stack, s = ct(n, a.__wbindgen_export3, a.__wbindgen_export4), i = G;
986
1096
  A().setInt32(t + 4, i, !0), A().setInt32(t + 0, s, !0);
987
1097
  }, r.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
988
1098
  const t = typeof global > "u" ? null : global;
989
- return $t(t) ? 0 : B(t);
1099
+ return zt(t) ? 0 : U(t);
990
1100
  }, r.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
991
1101
  const t = typeof globalThis > "u" ? null : globalThis;
992
- return $t(t) ? 0 : B(t);
1102
+ return zt(t) ? 0 : U(t);
993
1103
  }, r.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
994
1104
  const t = typeof self > "u" ? null : self;
995
- return $t(t) ? 0 : B(t);
1105
+ return zt(t) ? 0 : U(t);
996
1106
  }, r.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
997
1107
  const t = typeof window > "u" ? null : window;
998
- return $t(t) ? 0 : B(t);
1108
+ return zt(t) ? 0 : U(t);
999
1109
  }, r.wbg.__wbg_then_4f95312d68691235 = function(t, e) {
1000
- const n = W(t).then(W(e));
1001
- return B(n);
1110
+ const n = k(t).then(k(e));
1111
+ return U(n);
1002
1112
  }, r.wbg.__wbg_warn_6e567d0d926ff881 = function(t) {
1003
- console.warn(W(t));
1113
+ console.warn(k(t));
1004
1114
  }, r.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(t, e) {
1005
1115
  const n = J(t, e);
1006
- return B(n);
1116
+ return U(n);
1117
+ }, r.wbg.__wbindgen_cast_257c51b8abf9285e = function(t, e) {
1118
+ const n = on(t, e, a.__wasm_bindgen_func_elem_653, ln);
1119
+ return U(n);
1007
1120
  }, r.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(t) {
1008
1121
  const e = BigInt.asUintN(64, t);
1009
- return B(e);
1122
+ return U(e);
1010
1123
  }, r.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(t) {
1011
- return B(t);
1012
- }, r.wbg.__wbindgen_cast_e7ad0d7b317830d5 = function(t, e) {
1013
- const n = tn(t, e, c.__wasm_bindgen_func_elem_592, sn);
1014
- return B(n);
1124
+ return U(t);
1015
1125
  }, r.wbg.__wbindgen_object_clone_ref = function(t) {
1016
- const e = W(t);
1017
- return B(e);
1126
+ const e = k(t);
1127
+ return U(e);
1018
1128
  }, r.wbg.__wbindgen_object_drop_ref = function(t) {
1019
- V(t);
1129
+ D(t);
1020
1130
  }, r;
1021
1131
  }
1022
- function ln(r, t) {
1023
- return c = r.exports, Be.__wbindgen_wasm_module = t, gt = null, Tt = null, wt = null, Ft = null, Rt = null, c.__wbindgen_start(), c;
1132
+ function pn(r, t) {
1133
+ return a = r.exports, Ge.__wbindgen_wasm_module = t, _t = null, Tt = null, Ft = null, Rt = null, St = null, a.__wbindgen_start(), a;
1024
1134
  }
1025
- Be = async function(r) {
1026
- if (c !== void 0) return c;
1027
- typeof r < "u" && (Object.getPrototypeOf(r) === Object.prototype ? { module_or_path: r } = r : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof r > "u" && (r = new URL("/assets/ifc-lite_bg-CEZnhM2e.wasm", import.meta.url));
1028
- const t = cn();
1135
+ Ge = async function(r) {
1136
+ if (a !== void 0) return a;
1137
+ typeof r < "u" && (Object.getPrototypeOf(r) === Object.prototype ? { module_or_path: r } = r : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), typeof r > "u" && (r = new URL("/assets/ifc-lite_bg-DsYUIHm3.wasm", import.meta.url));
1138
+ const t = hn();
1029
1139
  (typeof r == "string" || typeof Request == "function" && r instanceof Request || typeof URL == "function" && r instanceof URL) && (r = fetch(r));
1030
- const { instance: e, module: n } = await an(await r, t);
1031
- return ln(e, n);
1140
+ const { instance: e, module: n } = await un(await r, t);
1141
+ return pn(e, n);
1032
1142
  };
1033
- const rt = Ge("Geometry"), dn = "IFC-Lite WASM cannot recover from a fatal runtime error within the same document lifetime. Reload the page or recreate the worker process before calling init() again.";
1034
- let Qt = null;
1035
- class fn {
1143
+ const tt = We("Geometry"), In = "IFC-Lite WASM cannot recover from a fatal runtime error within the same document lifetime. Reload the page or recreate the worker process before calling init() again.";
1144
+ let Kt = null;
1145
+ class _n {
1036
1146
  ifcApi = null;
1037
1147
  initialized = !1;
1038
1148
  mergeLayers = !1;
@@ -1040,15 +1150,15 @@ let __tla = Promise.all([
1040
1150
  return t instanceof WebAssembly.RuntimeError;
1041
1151
  }
1042
1152
  markFatalWasmRuntimeError() {
1043
- Qt = new Error(dn), this.reset();
1153
+ Kt = new Error(In), this.reset();
1044
1154
  }
1045
1155
  async init() {
1046
1156
  if (!this.initialized) {
1047
- if (Qt) throw Qt;
1157
+ if (Kt) throw Kt;
1048
1158
  try {
1049
- await Be(), rt.debug("Geometry processing: single-threaded WASM (N-worker pool handles parallelism)"), this.ifcApi = new ie, this.applyMergeLayers(), this.initialized = !0, rt.info("WASM geometry engine initialized");
1159
+ await Ge(), tt.debug("Geometry processing: single-threaded WASM (N-worker pool handles parallelism)"), this.ifcApi = new oe, this.applyMergeLayers(), this.initialized = !0, tt.info("WASM geometry engine initialized");
1050
1160
  } catch (t) {
1051
- throw rt.error("Failed to initialize WASM geometry engine", t, {
1161
+ throw tt.error("Failed to initialize WASM geometry engine", t, {
1052
1162
  operation: "init"
1053
1163
  }), this.isWasmRuntimeError(t) ? this.markFatalWasmRuntimeError() : this.reset(), t;
1054
1164
  }
@@ -1061,11 +1171,11 @@ let __tla = Promise.all([
1061
1171
  if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1062
1172
  try {
1063
1173
  const e = this.ifcApi.parseSymbolicRepresentations(t);
1064
- return rt.debug(`Parsed ${e.totalCount} symbolic items (${e.polylineCount} polylines, ${e.circleCount} circles)`, {
1174
+ return tt.debug(`Parsed ${e.totalCount} symbolic items (${e.polylineCount} polylines, ${e.circleCount} circles)`, {
1065
1175
  operation: "parseSymbolicRepresentations"
1066
1176
  }), e;
1067
1177
  } catch (e) {
1068
- throw rt.error("Failed to parse symbolic representations", e, {
1178
+ throw tt.error("Failed to parse symbolic representations", e, {
1069
1179
  operation: "parseSymbolicRepresentations",
1070
1180
  data: {
1071
1181
  contentLength: t.length
@@ -1077,11 +1187,11 @@ let __tla = Promise.all([
1077
1187
  if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1078
1188
  try {
1079
1189
  const e = this.ifcApi.parseAlignmentLines(t);
1080
- return rt.debug(`Parsed ${e.length / 3} alignment line vertices`, {
1190
+ return tt.debug(`Parsed ${e.length / 3} alignment line vertices`, {
1081
1191
  operation: "parseAlignmentLines"
1082
1192
  }), e;
1083
1193
  } catch (e) {
1084
- throw rt.error("Failed to parse alignment lines", e, {
1194
+ throw tt.error("Failed to parse alignment lines", e, {
1085
1195
  operation: "parseAlignmentLines",
1086
1196
  data: {
1087
1197
  contentLength: t.length
@@ -1089,15 +1199,47 @@ let __tla = Promise.all([
1089
1199
  }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1090
1200
  }
1091
1201
  }
1202
+ parseGridLines(t) {
1203
+ if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1204
+ try {
1205
+ const e = this.ifcApi.parseGridLines(t);
1206
+ return tt.debug(`Parsed ${e.length / 3} grid line vertices`, {
1207
+ operation: "parseGridLines"
1208
+ }), e;
1209
+ } catch (e) {
1210
+ throw tt.error("Failed to parse grid lines", e, {
1211
+ operation: "parseGridLines",
1212
+ data: {
1213
+ contentLength: t.length
1214
+ }
1215
+ }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1216
+ }
1217
+ }
1218
+ parseGridAxes(t) {
1219
+ if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1220
+ try {
1221
+ const e = this.ifcApi.parseGridAxes(t);
1222
+ return tt.debug(`Parsed ${e.length} grid axes`, {
1223
+ operation: "parseGridAxes"
1224
+ }), e;
1225
+ } catch (e) {
1226
+ throw tt.error("Failed to parse grid axes", e, {
1227
+ operation: "parseGridAxes",
1228
+ data: {
1229
+ contentLength: t.length
1230
+ }
1231
+ }), this.isWasmRuntimeError(e) && this.markFatalWasmRuntimeError(), e;
1232
+ }
1233
+ }
1092
1234
  extractProfiles(t, e = 0) {
1093
1235
  if (!this.ifcApi) throw new Error("IFC-Lite not initialized. Call init() first.");
1094
1236
  try {
1095
1237
  const n = this.ifcApi.extractProfiles(t, e);
1096
- return rt.debug(`Extracted ${n.length} profiles`, {
1238
+ return tt.debug(`Extracted ${n.length} profiles`, {
1097
1239
  operation: "extractProfiles"
1098
1240
  }), n;
1099
1241
  } catch (n) {
1100
- throw rt.error("Failed to extract profiles", n, {
1242
+ throw tt.error("Failed to extract profiles", n, {
1101
1243
  operation: "extractProfiles",
1102
1244
  data: {
1103
1245
  contentLength: t.length
@@ -1125,7 +1267,7 @@ let __tla = Promise.all([
1125
1267
  if (!this.ifcApi) return;
1126
1268
  const t = this.ifcApi;
1127
1269
  if (typeof t.setMergeLayers != "function") {
1128
- rt.warn("setMergeLayers not present on WASM API — flag tracked but suppression is a no-op until WASM is rebuilt", {
1270
+ tt.warn("setMergeLayers not present on WASM API — flag tracked but suppression is a no-op until WASM is rebuilt", {
1129
1271
  operation: "setMergeLayers",
1130
1272
  data: {
1131
1273
  requested: this.mergeLayers
@@ -1133,18 +1275,18 @@ let __tla = Promise.all([
1133
1275
  });
1134
1276
  return;
1135
1277
  }
1136
- t.setMergeLayers(this.mergeLayers), rt.debug(`mergeLayers=${this.mergeLayers}`, {
1278
+ t.setMergeLayers(this.mergeLayers), tt.debug(`mergeLayers=${this.mergeLayers}`, {
1137
1279
  operation: "setMergeLayers"
1138
1280
  });
1139
1281
  }
1140
1282
  }
1141
- function Ue() {
1283
+ function $e() {
1142
1284
  return typeof window < "u" && "__TAURI_INTERNALS__" in window;
1143
1285
  }
1144
- async function un() {
1145
- if (Ue()) {
1146
- const { NativeBridge: r } = await $e(async ()=>{
1147
- const { NativeBridge: t } = await import("./native-bridge-CPojOeGE.js").then(async (m)=>{
1286
+ async function gn() {
1287
+ if ($e()) {
1288
+ const { NativeBridge: r } = await je(async ()=>{
1289
+ const { NativeBridge: t } = await import("./native-bridge-BX8_tHXE.js").then(async (m)=>{
1148
1290
  await m.__tla;
1149
1291
  return m;
1150
1292
  });
@@ -1156,12 +1298,12 @@ let __tla = Promise.all([
1156
1298
  }
1157
1299
  throw new Error("createPlatformBridge() is native-only; the browser uses the WASM GeometryProcessor path directly.");
1158
1300
  }
1159
- class hn {
1301
+ class yn {
1160
1302
  buildInterleavedBuffer(t) {
1161
1303
  const e = t.positions.length / 3, n = new Float32Array(e * 6);
1162
1304
  for(let s = 0; s < e; s++){
1163
- const i = s * 6, o = s * 3, a = s * 3;
1164
- n[i] = t.positions[o], n[i + 1] = t.positions[o + 1], n[i + 2] = t.positions[o + 2], n[i + 3] = t.normals[a], n[i + 4] = t.normals[a + 1], n[i + 5] = t.normals[a + 2];
1305
+ const i = s * 6, o = s * 3, c = s * 3;
1306
+ n[i] = t.positions[o], n[i + 1] = t.positions[o + 1], n[i + 2] = t.positions[o + 2], n[i + 3] = t.normals[c], n[i + 4] = t.normals[c + 1], n[i + 5] = t.normals[c + 2];
1165
1307
  }
1166
1308
  return n;
1167
1309
  }
@@ -1175,7 +1317,7 @@ let __tla = Promise.all([
1175
1317
  };
1176
1318
  }
1177
1319
  }
1178
- class pn {
1320
+ class mn {
1179
1321
  originShift = {
1180
1322
  x: 0,
1181
1323
  y: 0,
@@ -1188,6 +1330,8 @@ let __tla = Promise.all([
1188
1330
  wasmRtcDetected = !1;
1189
1331
  NORMAL_COORD_THRESHOLD = 1e4;
1190
1332
  activeThreshold = 1e7;
1333
+ appliedWasmRtcOffset = null;
1334
+ lengthUnitScale = void 0;
1191
1335
  isReasonableValue(t) {
1192
1336
  return Number.isFinite(t) && Math.abs(t) < this.MAX_REASONABLE_COORD;
1193
1337
  }
@@ -1207,22 +1351,22 @@ let __tla = Promise.all([
1207
1351
  }, s = e ?? this.MAX_REASONABLE_COORD;
1208
1352
  for (const i of t){
1209
1353
  const o = i.positions;
1210
- for(let a = 0; a < o.length; a += 3){
1211
- const l = o[a], d = o[a + 1], u = o[a + 2];
1354
+ for(let c = 0; c < o.length; c += 3){
1355
+ const l = o[c], d = o[c + 1], u = o[c + 2];
1212
1356
  Number.isFinite(l) && Number.isFinite(d) && Number.isFinite(u) && Math.abs(l) < s && Math.abs(d) < s && Math.abs(u) < s && (n.min.x = Math.min(n.min.x, l), n.min.y = Math.min(n.min.y, d), n.min.z = Math.min(n.min.z, u), n.max.x = Math.max(n.max.x, l), n.max.y = Math.max(n.max.y, d), n.max.z = Math.max(n.max.z, u));
1213
1357
  }
1214
1358
  }
1215
1359
  return n;
1216
1360
  }
1217
1361
  calculateBoundsFast(t) {
1218
- let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0, a = -1 / 0;
1362
+ let e = 1 / 0, n = 1 / 0, s = 1 / 0, i = -1 / 0, o = -1 / 0, c = -1 / 0;
1219
1363
  for (const l of t){
1220
1364
  const d = l.positions, u = d.length;
1221
1365
  if (u < 3) continue;
1222
- const f = d[0], p = d[1], _ = d[2];
1223
- if (f < e && (e = f), p < n && (n = p), _ < s && (s = _), f > i && (i = f), p > o && (o = p), _ > a && (a = _), u >= 6) {
1224
- const h = d[u - 3], y = d[u - 2], m = d[u - 1];
1225
- h < e && (e = h), y < n && (n = y), m < s && (s = m), h > i && (i = h), y > o && (o = y), m > a && (a = m);
1366
+ const f = d[0], p = d[1], g = d[2];
1367
+ if (f < e && (e = f), p < n && (n = p), g < s && (s = g), f > i && (i = f), p > o && (o = p), g > c && (c = g), u >= 6) {
1368
+ const h = d[u - 3], y = d[u - 2], E = d[u - 1];
1369
+ h < e && (e = h), y < n && (n = y), E < s && (s = E), h > i && (i = h), y > o && (o = y), E > c && (c = E);
1226
1370
  }
1227
1371
  }
1228
1372
  return {
@@ -1234,7 +1378,7 @@ let __tla = Promise.all([
1234
1378
  max: {
1235
1379
  x: i,
1236
1380
  y: o,
1237
- z: a
1381
+ z: c
1238
1382
  }
1239
1383
  };
1240
1384
  }
@@ -1251,8 +1395,8 @@ let __tla = Promise.all([
1251
1395
  shiftPositions(t, e, n) {
1252
1396
  const s = n ?? this.MAX_REASONABLE_COORD;
1253
1397
  for(let i = 0; i < t.length; i += 3){
1254
- const o = t[i], a = t[i + 1], l = t[i + 2];
1255
- Number.isFinite(o) && Number.isFinite(a) && Number.isFinite(l) && Math.abs(o) < s && Math.abs(a) < s && Math.abs(l) < s ? (t[i] = o - e.x, t[i + 1] = a - e.y, t[i + 2] = l - e.z) : (t[i] = 0, t[i + 1] = 0, t[i + 2] = 0);
1398
+ const o = t[i], c = t[i + 1], l = t[i + 2];
1399
+ Number.isFinite(o) && Number.isFinite(c) && Number.isFinite(l) && Math.abs(o) < s && Math.abs(c) < s && Math.abs(l) < s ? (t[i] = o - e.x, t[i + 1] = c - e.y, t[i + 2] = l - e.z) : (t[i] = 0, t[i + 1] = 0, t[i + 2] = 0);
1256
1400
  }
1257
1401
  }
1258
1402
  shiftBounds(t, e) {
@@ -1322,11 +1466,11 @@ let __tla = Promise.all([
1322
1466
  const o = this.calculateCentroid(n);
1323
1467
  this.originShift = o;
1324
1468
  for (const l of t)this.shiftPositions(l.positions, o);
1325
- const a = this.shiftBounds(n, o);
1469
+ const c = this.shiftBounds(n, o);
1326
1470
  return {
1327
1471
  originShift: o,
1328
1472
  originalBounds: n,
1329
- shiftedBounds: a,
1473
+ shiftedBounds: c,
1330
1474
  hasLargeCoordinates: !0
1331
1475
  };
1332
1476
  }
@@ -1358,18 +1502,18 @@ let __tla = Promise.all([
1358
1502
  x: this.accumulatedBounds.max.x - this.accumulatedBounds.min.x,
1359
1503
  y: this.accumulatedBounds.max.y - this.accumulatedBounds.min.y,
1360
1504
  z: this.accumulatedBounds.max.z - this.accumulatedBounds.min.z
1361
- }, i = Math.max(s.x, s.y, s.z), o = this.calculateCentroid(this.accumulatedBounds), a = Math.sqrt(o.x ** 2 + o.y ** 2 + o.z ** 2);
1505
+ }, i = Math.max(s.x, s.y, s.z), o = this.calculateCentroid(this.accumulatedBounds), c = Math.sqrt(o.x ** 2 + o.y ** 2 + o.z ** 2);
1362
1506
  let l = 0, d = 0;
1363
1507
  const u = this.THRESHOLD;
1364
- for (const _ of t){
1365
- const h = _.positions;
1508
+ for (const g of t){
1509
+ const h = g.positions;
1366
1510
  if (h.length >= 3) {
1367
- const y = Math.abs(h[0]), m = Math.abs(h[1]), b = Math.abs(h[2]);
1368
- Math.max(y, m, b) < u ? l++ : d++;
1511
+ const y = Math.abs(h[0]), E = Math.abs(h[1]), C = Math.abs(h[2]);
1512
+ Math.max(y, E, C) < u ? l++ : d++;
1369
1513
  }
1370
1514
  }
1371
1515
  const f = l + d, p = f > 0 && l / f > .5;
1372
- p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (a > this.THRESHOLD || i > this.THRESHOLD) && !p && (this.originShift = o);
1516
+ p && (this.wasmRtcDetected = !0, this.accumulatedBounds = this.calculateBounds(t, this.NORMAL_COORD_THRESHOLD)), (c > this.THRESHOLD || i > this.THRESHOLD) && !p && (this.originShift = o);
1373
1517
  }
1374
1518
  this.shiftCalculated = !0;
1375
1519
  }
@@ -1394,7 +1538,15 @@ let __tla = Promise.all([
1394
1538
  ...this.accumulatedBounds
1395
1539
  },
1396
1540
  shiftedBounds: e,
1397
- hasLargeCoordinates: n
1541
+ hasLargeCoordinates: n,
1542
+ ...this.appliedWasmRtcOffset ? {
1543
+ wasmRtcOffset: {
1544
+ ...this.appliedWasmRtcOffset
1545
+ }
1546
+ } : {},
1547
+ ...this.lengthUnitScale !== void 0 ? {
1548
+ lengthUnitScale: this.lengthUnitScale
1549
+ } : {}
1398
1550
  };
1399
1551
  }
1400
1552
  getFinalCoordinateInfo() {
@@ -1429,27 +1581,40 @@ let __tla = Promise.all([
1429
1581
  z: 0
1430
1582
  }
1431
1583
  },
1432
- hasLargeCoordinates: !1
1584
+ hasLargeCoordinates: !1,
1585
+ ...this.appliedWasmRtcOffset ? {
1586
+ wasmRtcOffset: {
1587
+ ...this.appliedWasmRtcOffset
1588
+ }
1589
+ } : {},
1590
+ ...this.lengthUnitScale !== void 0 ? {
1591
+ lengthUnitScale: this.lengthUnitScale
1592
+ } : {}
1433
1593
  };
1434
1594
  }
1595
+ setWasmMetadata(t, e) {
1596
+ this.lengthUnitScale = t, this.appliedWasmRtcOffset = e ? {
1597
+ ...e
1598
+ } : null;
1599
+ }
1435
1600
  reset() {
1436
1601
  this.accumulatedBounds = null, this.shiftCalculated = !1, this.originShift = {
1437
1602
  x: 0,
1438
1603
  y: 0,
1439
1604
  z: 0
1440
- }, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD;
1605
+ }, this.wasmRtcDetected = !1, this.activeThreshold = this.MAX_REASONABLE_COORD, this.appliedWasmRtcOffset = null, this.lengthUnitScale = void 0;
1441
1606
  }
1442
1607
  }
1443
- In = ((r)=>(r.Fast = "fast", r.Balanced = "balanced", r.High = "high", r))(In || {});
1444
- function gn(r) {
1445
- const t = Math.max(0, r.fileSizeMB), e = Math.max(1, Math.floor(r.cores)), n = Math.max(1, r.deviceMemoryGB), s = e >= 10 ? Math.max(n, 16) : n, i = Math.max(0, Math.floor(r.totalJobs)), o = Math.max(1, Math.floor(r.minWorkers ?? 1)), a = Math.max(o, Math.floor(r.maxWorkers ?? 8));
1608
+ En = ((r)=>(r.Fast = "fast", r.Balanced = "balanced", r.High = "high", r))(En || {});
1609
+ function bn(r) {
1610
+ const t = Math.max(0, r.fileSizeMB), e = Math.max(1, Math.floor(r.cores)), n = Math.max(1, r.deviceMemoryGB), s = e >= 10 ? Math.max(n, 16) : n, i = Math.max(0, Math.floor(r.totalJobs)), o = Math.max(1, Math.floor(r.minWorkers ?? 1)), c = Math.max(o, Math.floor(r.maxWorkers ?? 8));
1446
1611
  if (i === 0) return {
1447
1612
  count: 0,
1448
1613
  reason: "jobs"
1449
1614
  };
1450
1615
  let l;
1451
- e >= 16 && s >= 16 ? l = Math.min(a, Math.floor(e / 2)) : e >= 12 && s >= 8 ? l = t > 512 ? 4 : 5 : e >= 10 && s >= 8 ? l = t > 512 ? 3 : 4 : e >= 8 && s >= 8 ? l = t > 512 ? 2 : 3 : l = Math.max(1, Math.min(2, Math.floor(e / 2)));
1452
- const d = s * 1024, u = Math.max(1024, d * .25), f = t * 2.5, p = Math.max(64, t * 1.5), _ = d - u - f, h = _ > 0 ? Math.max(1, Math.floor(_ / p)) : 1, y = [
1616
+ e >= 16 && s >= 16 ? l = Math.min(c, Math.floor(e / 2)) : e >= 12 && s >= 8 ? l = t > 512 ? 4 : 5 : e >= 10 && s >= 8 ? l = t > 512 ? 3 : 4 : e >= 8 && s >= 8 ? l = t > 512 ? 2 : 3 : l = Math.max(1, Math.min(2, Math.floor(e / 2)));
1617
+ const d = s * 1024, u = Math.max(1024, d * .25), f = t * 2.5, p = Math.max(64, t * 1.5), g = d - u - f, h = g > 0 ? Math.max(1, Math.floor(g / p)) : 1, y = [
1453
1618
  {
1454
1619
  value: l,
1455
1620
  reason: "cores"
@@ -1463,34 +1628,34 @@ let __tla = Promise.all([
1463
1628
  reason: "jobs"
1464
1629
  },
1465
1630
  {
1466
- value: a,
1631
+ value: c,
1467
1632
  reason: "max"
1468
1633
  }
1469
1634
  ];
1470
- let m = y[0];
1471
- for(let b = 1; b < y.length; b++)y[b].value < m.value && (m = y[b]);
1472
- return m.value < o ? {
1635
+ let E = y[0];
1636
+ for(let C = 1; C < y.length; C++)y[C].value < E.value && (E = y[C]);
1637
+ return E.value < o ? {
1473
1638
  count: o,
1474
1639
  reason: "min"
1475
1640
  } : {
1476
- count: m.value,
1477
- reason: m.reason
1641
+ count: E.value,
1642
+ reason: E.reason
1478
1643
  };
1479
1644
  }
1480
- function _n(r) {
1481
- return gn(r).count;
1645
+ function Cn(r) {
1646
+ return bn(r).count;
1482
1647
  }
1483
- const yn = 3e4, En = 15e3, mn = 15e3, Cn = 5e3, bn = 60, Tn = 30, wn = 30, Fn = 15;
1484
- ns = function(r) {
1485
- const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ? Cn : mn : t ? En : yn, i = e > 0 ? t ? Fn : wn : t ? Tn : bn;
1648
+ const wn = 3e4, Tn = 15e3, Fn = 15e3, Rn = 5e3, Sn = 60, Nn = 30, An = 30, On = 15;
1649
+ as = function(r) {
1650
+ const t = r.desktopStableWasm === !0, e = Math.max(0, Math.floor(r.batchCount)), n = Math.max(0, r.fileSizeMB), s = e > 0 ? t ? Rn : Fn : t ? Tn : wn, i = e > 0 ? t ? On : An : t ? Nn : Sn;
1486
1651
  return Math.max(s, Math.round(s + n * i));
1487
1652
  };
1488
- function Rn(r, t) {
1653
+ function xn(r, t) {
1489
1654
  if (typeof t == "number") return t;
1490
1655
  const e = t.fileSizeMB ? t.fileSizeMB : r.length / (1024 * 1024);
1491
1656
  return e < 10 ? 100 : e < 50 ? 200 : e < 100 ? 300 : e < 300 ? 500 : e < 500 ? 1500 : 3e3;
1492
1657
  }
1493
- function Ce(r) {
1658
+ function Fe(r) {
1494
1659
  const t = [];
1495
1660
  try {
1496
1661
  for(let e = 0; e < r.length; e++){
@@ -1501,8 +1666,7 @@ let __tla = Promise.all([
1501
1666
  s[1],
1502
1667
  s[2],
1503
1668
  s[3]
1504
- ] : void 0;
1505
- t.push({
1669
+ ] : void 0, o = {
1506
1670
  expressId: n.expressId,
1507
1671
  ifcType: n.ifcType,
1508
1672
  positions: n.positions,
@@ -1517,7 +1681,14 @@ let __tla = Promise.all([
1517
1681
  ...i ? {
1518
1682
  shadingColor: i
1519
1683
  } : {}
1520
- });
1684
+ };
1685
+ n.hasTexture && (o.uvs = n.uvs, o.texture = {
1686
+ rgba: n.textureRgba,
1687
+ width: n.textureWidth,
1688
+ height: n.textureHeight,
1689
+ repeatS: n.textureRepeatS,
1690
+ repeatT: n.textureRepeatT
1691
+ }), t.push(o);
1521
1692
  } finally{
1522
1693
  n.free();
1523
1694
  }
@@ -1527,41 +1698,41 @@ let __tla = Promise.all([
1527
1698
  }
1528
1699
  return t;
1529
1700
  }
1530
- function Vt(r, t) {
1701
+ function Wt(r, t) {
1531
1702
  return t !== void 0 ? {
1532
1703
  ...r,
1533
1704
  buildingRotation: t
1534
1705
  } : r;
1535
1706
  }
1536
- const Nn = 8, Sn = 32768, An = 4, On = 8192, Ln = 10;
1537
- function be() {
1707
+ const Ln = 8, Mn = 32768, Pn = 4, Bn = 8192, Un = 10;
1708
+ function Re() {
1538
1709
  const r = globalThis.scheduler;
1539
1710
  return typeof r?.yield == "function" ? r.yield() : new Promise((t)=>{
1540
1711
  globalThis.setTimeout(t, 0);
1541
1712
  });
1542
1713
  }
1543
- function Te(r, t, e) {
1714
+ function Se(r, t, e) {
1544
1715
  if (t.type === "colorUpdate") {
1545
1716
  const i = r[r.length - 1];
1546
1717
  if (i?.type === "colorUpdate") {
1547
- for (const [o, a] of t.updates)i.updates.set(o, a);
1718
+ for (const [o, c] of t.updates)i.updates.set(o, c);
1548
1719
  return;
1549
1720
  }
1550
1721
  r.push(t);
1551
1722
  return;
1552
1723
  }
1553
1724
  const n = r[r.length - 1];
1554
- if (n?.type === "batch" && (r.length >= Nn || e.queuedMeshes >= Sn)) {
1725
+ if (n?.type === "batch" && (r.length >= Ln || e.queuedMeshes >= Mn)) {
1555
1726
  for(let i = 0; i < t.meshes.length; i++)n.meshes.push(t.meshes[i]);
1556
1727
  n.nativeTelemetry = t.nativeTelemetry, e.coalescedBatchCount += 1;
1557
1728
  } else r.push(t);
1558
1729
  e.queuedMeshes += t.meshes.length;
1559
1730
  }
1560
- async function* we(r, t, e, n) {
1731
+ async function* Ne(r, t, e, n) {
1561
1732
  e.reset(), yield {
1562
1733
  type: "start",
1563
1734
  totalEstimate: t
1564
- }, await be(), yield {
1735
+ }, await Re(), yield {
1565
1736
  type: "model-open",
1566
1737
  modelID: 0
1567
1738
  };
@@ -1569,65 +1740,65 @@ let __tla = Promise.all([
1569
1740
  queuedMeshes: 0,
1570
1741
  coalescedBatchCount: 0
1571
1742
  };
1572
- let o = null, a = !1, l = null, d, u = 0;
1743
+ let o = null, c = !1, l = null, d, u = 0;
1573
1744
  const f = ()=>{
1574
1745
  o && (o(), o = null);
1575
1746
  }, p = r({
1576
1747
  onBatch: (h)=>{
1577
- Te(s, {
1748
+ Se(s, {
1578
1749
  type: "batch",
1579
1750
  meshes: h.meshes,
1580
1751
  nativeTelemetry: h.nativeTelemetry
1581
1752
  }, i), f();
1582
1753
  },
1583
1754
  onColorUpdate: (h)=>{
1584
- Te(s, {
1755
+ Se(s, {
1585
1756
  type: "colorUpdate",
1586
1757
  updates: new Map(h)
1587
1758
  }, i), f();
1588
1759
  },
1589
1760
  onComplete: (h)=>{
1590
- n(h), d = h.totalMeshes, a = !0, f();
1761
+ n(h), d = h.totalMeshes, c = !0, f();
1591
1762
  },
1592
1763
  onError: (h)=>{
1593
- l = h, a = !0, f();
1764
+ l = h, c = !0, f();
1594
1765
  }
1595
1766
  });
1596
- for(; !a || s.length > 0;){
1597
- let h = 0, y = 0, m = performance.now();
1767
+ for(; !c || s.length > 0;){
1768
+ let h = 0, y = 0, E = performance.now();
1598
1769
  for(; s.length > 0;){
1599
- const b = s.shift();
1600
- if (b.type === "colorUpdate") {
1770
+ const C = s.shift();
1771
+ if (C.type === "colorUpdate") {
1601
1772
  yield {
1602
1773
  type: "colorUpdate",
1603
- updates: b.updates
1774
+ updates: C.updates
1604
1775
  };
1605
1776
  continue;
1606
1777
  }
1607
- i.queuedMeshes = Math.max(0, i.queuedMeshes - b.meshes.length), e.processTrustedMeshesIncremental(b.meshes), u += b.meshes.length;
1608
- const w = e.getCurrentCoordinateInfo();
1778
+ i.queuedMeshes = Math.max(0, i.queuedMeshes - C.meshes.length), e.processTrustedMeshesIncremental(C.meshes), u += C.meshes.length;
1779
+ const T = e.getCurrentCoordinateInfo();
1609
1780
  yield {
1610
1781
  type: "batch",
1611
- meshes: b.meshes,
1782
+ meshes: C.meshes,
1612
1783
  totalSoFar: u,
1613
- coordinateInfo: w || void 0,
1614
- nativeTelemetry: b.nativeTelemetry
1615
- }, h += 1, y += b.meshes.length, s.length > 0 && (h >= An || y >= On || performance.now() - m >= Ln) && (await be(), h = 0, y = 0, m = performance.now());
1784
+ coordinateInfo: T || void 0,
1785
+ nativeTelemetry: C.nativeTelemetry
1786
+ }, h += 1, y += C.meshes.length, s.length > 0 && (h >= Pn || y >= Bn || performance.now() - E >= Un) && (await Re(), h = 0, y = 0, E = performance.now());
1616
1787
  }
1617
1788
  if (l) throw l;
1618
- a || await new Promise((b)=>{
1619
- o = b;
1789
+ c || await new Promise((C)=>{
1790
+ o = C;
1620
1791
  });
1621
1792
  }
1622
1793
  await p, i.coalescedBatchCount > 0 && console.info(`[GeometryProcessor] Coalesced ${i.coalescedBatchCount} native batches while JS drained the queue`);
1623
- const _ = e.getFinalCoordinateInfo();
1794
+ const g = e.getFinalCoordinateInfo();
1624
1795
  yield {
1625
1796
  type: "complete",
1626
1797
  totalMeshes: d ?? u,
1627
- coordinateInfo: _
1798
+ coordinateInfo: g
1628
1799
  };
1629
1800
  }
1630
- async function* Mn(r, t, e, n, s) {
1801
+ async function* Dn(r, t, e, n, s) {
1631
1802
  t.reset(), yield {
1632
1803
  type: "start",
1633
1804
  totalEstimate: r.length / 1e3
@@ -1638,164 +1809,174 @@ let __tla = Promise.all([
1638
1809
  let i;
1639
1810
  const o = r.buffer;
1640
1811
  n && n.byteLength === r.byteLength ? i = n : typeof SharedArrayBuffer < "u" && o instanceof SharedArrayBuffer && r.byteOffset === 0 && r.byteLength === o.byteLength ? i = o : (i = new SharedArrayBuffer(r.byteLength), new Uint8Array(i).set(r));
1641
- const a = ()=>new Worker(new URL("/assets/geometry.worker-0Q9qEa6p.js", import.meta.url), {
1812
+ const c = ()=>new Worker(new URL("/assets/geometry.worker-BdH-E6NB.js", import.meta.url), {
1642
1813
  type: "module"
1643
- }), l = ()=>new Worker(new URL("/assets/geometry.worker-0Q9qEa6p.js", import.meta.url), {
1814
+ }), l = ()=>new Worker(new URL("/assets/geometry.worker-BdH-E6NB.js", import.meta.url), {
1644
1815
  type: "module"
1645
1816
  }), d = [];
1646
1817
  let u = null;
1647
1818
  const f = ()=>{
1648
1819
  u && (u(), u = null);
1649
1820
  };
1650
- let p = null, _ = 0, h = !1, y = null, m = null, b = 0, w = 0, v = !1, L = !1;
1651
- const j = [];
1652
- let O = !1, U = !1;
1653
- const C = [], N = (M, X)=>{
1654
- M.onmessage = (P)=>{
1655
- const x = P.data;
1656
- if (x.type === "ready") {
1821
+ let p = null, g = 0, h = !1, y = null, E = null, C = 0, T = 0, $ = !1, x = !1;
1822
+ const Y = [];
1823
+ let O = !1, v = !1;
1824
+ const b = [], S = (L, X)=>{
1825
+ L.onmessage = (B)=>{
1826
+ const M = B.data;
1827
+ if (M.type === "ready") {
1657
1828
  console.log(`[stream] worker[${X}] WASM ready @ ${Q()}ms`);
1658
1829
  return;
1659
1830
  }
1660
- if (x.type === "memory") {
1831
+ if (M.type === "memory") {
1661
1832
  d.push({
1662
1833
  type: "workerMemory",
1663
1834
  workerIndex: X,
1664
- wasmHeapBytes: x.wasmHeapBytes,
1665
- meshBytes: x.meshBytes
1835
+ wasmHeapBytes: M.wasmHeapBytes,
1836
+ meshBytes: M.meshBytes
1666
1837
  }), f();
1667
1838
  return;
1668
1839
  }
1669
- if (x.type === "batch") {
1670
- C[X] === void 0 && (C[X] = Q(), console.log(`[stream] worker[${X}] first batch @ ${Q()}ms (${x.meshes?.length ?? 0} meshes)`));
1671
- const q = x.meshes.map((D)=>({
1672
- expressId: D.expressId,
1673
- ifcType: D.ifcType,
1674
- positions: D.positions instanceof Float32Array ? D.positions : new Float32Array(D.positions),
1675
- normals: D.normals instanceof Float32Array ? D.normals : new Float32Array(D.normals),
1676
- indices: D.indices instanceof Uint32Array ? D.indices : new Uint32Array(D.indices),
1677
- color: D.color
1840
+ if (M.type === "batch") {
1841
+ b[X] === void 0 && (b[X] = Q(), console.log(`[stream] worker[${X}] first batch @ ${Q()}ms (${M.meshes?.length ?? 0} meshes)`));
1842
+ const q = M.meshes.map((P)=>({
1843
+ expressId: P.expressId,
1844
+ ifcType: P.ifcType,
1845
+ positions: P.positions instanceof Float32Array ? P.positions : new Float32Array(P.positions),
1846
+ normals: P.normals instanceof Float32Array ? P.normals : new Float32Array(P.normals),
1847
+ indices: P.indices instanceof Uint32Array ? P.indices : new Uint32Array(P.indices),
1848
+ color: P.color,
1849
+ ...P.uvs ? {
1850
+ uvs: P.uvs
1851
+ } : {},
1852
+ ...P.texture ? {
1853
+ texture: P.texture
1854
+ } : {}
1678
1855
  }));
1679
1856
  if (q.length > 0) {
1680
- w += q.length, t.processMeshesIncremental(q);
1681
- const D = t.getCurrentCoordinateInfo();
1857
+ T += q.length, t.processMeshesIncremental(q);
1858
+ const P = t.getCurrentCoordinateInfo();
1682
1859
  d.push({
1683
1860
  type: "batch",
1684
1861
  meshes: q,
1685
- totalSoFar: w,
1686
- coordinateInfo: D || void 0
1862
+ totalSoFar: T,
1863
+ coordinateInfo: P || void 0
1687
1864
  }), f();
1688
1865
  }
1689
1866
  return;
1690
1867
  }
1691
- if (x.type === "complete") {
1692
- b++, M.terminate(), f();
1868
+ if (M.type === "complete") {
1869
+ C++, L.terminate(), f();
1693
1870
  return;
1694
1871
  }
1695
- if (x.type === "error") {
1696
- m = new Error(`Geometry worker error: ${x.message}`), b++, M.terminate(), f();
1872
+ if (M.type === "error") {
1873
+ E = new Error(`Geometry worker error: ${M.message}`), C++, L.terminate(), f();
1697
1874
  return;
1698
1875
  }
1699
- }, M.onerror = (P)=>{
1700
- m = new Error(`Geometry worker failed: ${P.message}`), b++, M.terminate(), f();
1876
+ }, L.onerror = (B)=>{
1877
+ E = new Error(`Geometry worker failed: ${B.message}`), C++, L.terminate(), f();
1701
1878
  };
1702
- }, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2, E = typeof navigator < "u" ? navigator.deviceMemory ?? 8 : 8, g = r.byteLength / (1024 * 1024), T = Math.max(1, Math.ceil(g * 100)), I = _n({
1703
- fileSizeMB: g,
1879
+ }, F = typeof navigator < "u" ? navigator.hardwareConcurrency ?? 2 : 2, m = typeof navigator < "u" ? navigator.deviceMemory ?? 8 : 8, _ = r.byteLength / (1024 * 1024), w = Math.max(1, Math.ceil(_ * 100)), I = Cn({
1880
+ fileSizeMB: _,
1704
1881
  cores: F,
1705
- deviceMemoryGB: E,
1706
- totalJobs: T
1882
+ deviceMemoryGB: m,
1883
+ totalJobs: w
1707
1884
  }), R = [];
1708
- for(let M = 0; M < I; M++){
1709
- const X = a();
1710
- R.push(X), N(X, M);
1711
- const P = s?.wasmUrls?.wasm;
1885
+ for(let L = 0; L < I; L++){
1886
+ const X = c();
1887
+ R.push(X), S(X, L);
1888
+ const B = s?.wasmUrls?.wasm;
1712
1889
  X.postMessage({
1713
1890
  type: "init",
1714
- ...P ? {
1715
- wasmUrl: P
1891
+ ...B ? {
1892
+ wasmUrl: B
1716
1893
  } : {}
1717
1894
  }), X.postMessage({
1718
1895
  type: "set-merge-layers",
1719
1896
  enabled: s?.mergeLayers === !0
1720
1897
  });
1721
1898
  }
1722
- const S = ()=>{
1723
- if (!v) {
1724
- v = !0;
1725
- for (const M of R)try {
1726
- M.postMessage({
1899
+ const N = ()=>{
1900
+ if (!$) {
1901
+ $ = !0;
1902
+ for (const L of R)try {
1903
+ L.postMessage({
1727
1904
  type: "stream-end"
1728
1905
  });
1729
1906
  } catch {}
1730
1907
  }
1731
- }, G = ()=>{
1732
- if (L || !p) return;
1733
- L = !0;
1734
- const M = e != null, X = M ? e.x : p.rtcOffset[0], P = M ? e.y : p.rtcOffset[1], x = M ? e.z : p.rtcOffset[2], q = M ? !0 : p.needsShift;
1735
- d.push({
1908
+ }, V = ()=>{
1909
+ if (x || !p) return;
1910
+ x = !0;
1911
+ const L = e != null, X = L ? e.x : p.rtcOffset[0], B = L ? e.y : p.rtcOffset[1], M = L ? e.z : p.rtcOffset[2], q = L ? !0 : p.needsShift;
1912
+ t.setWasmMetadata(p.unitScale, q ? {
1913
+ x: X,
1914
+ y: B,
1915
+ z: M
1916
+ } : null), d.push({
1736
1917
  type: "rtcOffset",
1737
1918
  rtcOffset: {
1738
1919
  x: X,
1739
- y: P,
1740
- z: x
1920
+ y: B,
1921
+ z: M
1741
1922
  },
1742
1923
  hasRtc: q
1743
1924
  }), f();
1744
- const D = new Uint32Array(0), st = new Uint8Array(0);
1925
+ const P = new Uint32Array(0), it = new Uint8Array(0);
1745
1926
  for (const pt of R)pt.postMessage({
1746
1927
  type: "stream-start",
1747
1928
  sharedBuffer: i,
1748
1929
  unitScale: p.unitScale,
1749
1930
  rtcX: X,
1750
- rtcY: P,
1751
- rtcZ: x,
1931
+ rtcY: B,
1932
+ rtcZ: M,
1752
1933
  needsShift: q,
1753
- voidKeys: D,
1754
- voidCounts: D,
1755
- voidValues: D,
1756
- styleIds: D,
1757
- styleColors: st
1934
+ voidKeys: P,
1935
+ voidCounts: P,
1936
+ voidValues: P,
1937
+ styleIds: P,
1938
+ styleColors: it
1758
1939
  });
1759
1940
  };
1760
- function z(M) {
1761
- if (R.length === 0 || M.length === 0) return;
1762
- const X = Math.floor(M.length / 3);
1941
+ function z(L) {
1942
+ if (R.length === 0 || L.length === 0) return;
1943
+ const X = Math.floor(L.length / 3);
1763
1944
  if (X === 0) return;
1764
- const P = Math.ceil(X / R.length);
1945
+ const B = Math.ceil(X / R.length);
1765
1946
  try {
1766
- for(let x = 0; x < R.length; x++){
1767
- const q = x * P * 3, D = Math.min(q + P * 3, M.length);
1768
- if (q >= D) continue;
1769
- const st = M.slice(q, D);
1770
- R[x].postMessage({
1947
+ for(let M = 0; M < R.length; M++){
1948
+ const q = M * B * 3, P = Math.min(q + B * 3, L.length);
1949
+ if (q >= P) continue;
1950
+ const it = L.slice(q, P);
1951
+ R[M].postMessage({
1771
1952
  type: "stream-chunk",
1772
- jobsFlat: st
1953
+ jobsFlat: it
1773
1954
  }, [
1774
- st.buffer
1955
+ it.buffer
1775
1956
  ]);
1776
1957
  }
1777
- } catch (x) {
1778
- m = new Error(`Failed to dispatch jobs chunk: ${x instanceof Error ? x.message : String(x)}`), f();
1958
+ } catch (M) {
1959
+ E = new Error(`Failed to dispatch jobs chunk: ${M instanceof Error ? M.message : String(M)}`), f();
1779
1960
  }
1780
1961
  }
1781
- const k = (M)=>{
1782
- if (!L || !O || !U) {
1783
- j.push(M);
1962
+ const W = (L)=>{
1963
+ if (!x || !O || !v) {
1964
+ Y.push(L);
1784
1965
  return;
1785
1966
  }
1786
- z(M);
1967
+ z(L);
1787
1968
  }, H = ()=>{
1788
- if (!(!L || !O || !U)) for(; j.length > 0;)z(j.shift());
1789
- }, Y = performance.now(), Q = ()=>Math.round(performance.now() - Y);
1790
- console.log(`[stream] processParallel start, fileSizeMB=${g.toFixed(1)} workerCount=${I}`);
1969
+ if (!(!x || !O || !v)) for(; Y.length > 0;)z(Y.shift());
1970
+ }, j = performance.now(), Q = ()=>Math.round(performance.now() - j);
1971
+ console.log(`[stream] processParallel start, fileSizeMB=${_.toFixed(1)} workerCount=${I}`);
1791
1972
  const K = l();
1792
1973
  s?.wasmUrls?.wasm && K.postMessage({
1793
1974
  type: "init",
1794
1975
  wasmUrl: s.wasmUrls.wasm
1795
1976
  });
1796
- let at = 0, ht = 0, it = -1;
1797
- K.onmessage = (M)=>{
1798
- const X = M.data;
1977
+ let at = 0, ht = 0, rt = -1;
1978
+ K.onmessage = (L)=>{
1979
+ const X = L.data;
1799
1980
  if (X.type === "prepass-progress") {
1800
1981
  d.push({
1801
1982
  type: "progress",
@@ -1804,114 +1985,114 @@ let __tla = Promise.all([
1804
1985
  return;
1805
1986
  }
1806
1987
  if (X.type === "prepass-stream") {
1807
- const P = X.event;
1808
- if (P.type === "meta") p = {
1809
- unitScale: P.unitScale,
1810
- rtcOffset: P.rtcOffset,
1811
- needsShift: P.needsShift,
1812
- buildingRotation: P.buildingRotation ?? null
1813
- }, console.log(`[stream] meta @ ${Q()}ms unitScale=${p.unitScale} rtc=[${p.rtcOffset[0].toFixed(0)},${p.rtcOffset[1].toFixed(0)},${p.rtcOffset[2].toFixed(0)}]`), G(), f();
1814
- else if (P.type === "jobs") {
1815
- const x = P.jobs, q = Math.floor(x.length / 3);
1816
- at++, ht += q, it < 0 && (it = Q(), console.log(`[stream] first jobs chunk @ ${it}ms (${q} jobs)`)), (at % 10 === 1 || q < 1e3) && console.log(`[stream] chunk #${at} @ ${Q()}ms (+${q} jobs, total ${ht})`), k(x);
1817
- } else if (P.type === "styles") {
1818
- const x = P.styleIds, q = P.styleColors, D = P.voidKeys, st = P.voidCounts, pt = P.voidValues;
1819
- console.log(`[stream] styles @ ${Q()}ms (${x.length} styled, ${D.length} void hosts), draining ${j.length} queued chunks`);
1820
- for (const Ht of R)try {
1821
- const dt = x.slice(), yt = q.slice(), Et = D.slice(), mt = st.slice(), Gt = pt.slice();
1822
- Ht.postMessage({
1988
+ const B = X.event;
1989
+ if (B.type === "meta") p = {
1990
+ unitScale: B.unitScale,
1991
+ rtcOffset: B.rtcOffset,
1992
+ needsShift: B.needsShift,
1993
+ buildingRotation: B.buildingRotation ?? null
1994
+ }, console.log(`[stream] meta @ ${Q()}ms unitScale=${p.unitScale} rtc=[${p.rtcOffset[0].toFixed(0)},${p.rtcOffset[1].toFixed(0)},${p.rtcOffset[2].toFixed(0)}]`), V(), f();
1995
+ else if (B.type === "jobs") {
1996
+ const M = B.jobs, q = Math.floor(M.length / 3);
1997
+ at++, ht += q, rt < 0 && (rt = Q(), console.log(`[stream] first jobs chunk @ ${rt}ms (${q} jobs)`)), (at % 10 === 1 || q < 1e3) && console.log(`[stream] chunk #${at} @ ${Q()}ms (+${q} jobs, total ${ht})`), W(M);
1998
+ } else if (B.type === "styles") {
1999
+ const M = B.styleIds, q = B.styleColors, P = B.voidKeys, it = B.voidCounts, pt = B.voidValues;
2000
+ console.log(`[stream] styles @ ${Q()}ms (${M.length} styled, ${P.length} void hosts), draining ${Y.length} queued chunks`);
2001
+ for (const qt of R)try {
2002
+ const ft = M.slice(), yt = q.slice(), mt = P.slice(), Et = it.slice(), Vt = pt.slice();
2003
+ qt.postMessage({
1823
2004
  type: "set-styles",
1824
- styleIds: dt,
2005
+ styleIds: ft,
1825
2006
  styleColors: yt,
1826
- voidKeys: Et,
1827
- voidCounts: mt,
1828
- voidValues: Gt
2007
+ voidKeys: mt,
2008
+ voidCounts: Et,
2009
+ voidValues: Vt
1829
2010
  }, [
1830
- dt.buffer,
2011
+ ft.buffer,
1831
2012
  yt.buffer,
1832
- Et.buffer,
1833
2013
  mt.buffer,
1834
- Gt.buffer
2014
+ Et.buffer,
2015
+ Vt.buffer
1835
2016
  ]);
1836
- } catch (dt) {
1837
- console.warn("[stream] set-styles dispatch failed:", dt);
2017
+ } catch (ft) {
2018
+ console.warn("[stream] set-styles dispatch failed:", ft);
1838
2019
  }
1839
2020
  O = !0, H();
1840
- } else if (P.type === "entity-index") {
1841
- const x = P.ids, q = P.starts, D = P.lengths;
1842
- if (console.log(`[stream] entity-index @ ${Q()}ms (${x.length} entries)`), typeof SharedArrayBuffer < "u") {
1843
- const st = x.byteLength, pt = q.byteLength, Ht = D.byteLength, dt = new SharedArrayBuffer(st), yt = new SharedArrayBuffer(pt), Et = new SharedArrayBuffer(Ht);
1844
- new Uint32Array(dt).set(x), new Uint32Array(yt).set(q), new Uint32Array(Et).set(D);
1845
- for (const mt of R)try {
1846
- mt.postMessage({
2021
+ } else if (B.type === "entity-index") {
2022
+ const M = B.ids, q = B.starts, P = B.lengths;
2023
+ if (console.log(`[stream] entity-index @ ${Q()}ms (${M.length} entries)`), typeof SharedArrayBuffer < "u") {
2024
+ const it = M.byteLength, pt = q.byteLength, qt = P.byteLength, ft = new SharedArrayBuffer(it), yt = new SharedArrayBuffer(pt), mt = new SharedArrayBuffer(qt);
2025
+ new Uint32Array(ft).set(M), new Uint32Array(yt).set(q), new Uint32Array(mt).set(P);
2026
+ for (const Et of R)try {
2027
+ Et.postMessage({
1847
2028
  type: "set-entity-index",
1848
- ids: new Uint32Array(dt),
2029
+ ids: new Uint32Array(ft),
1849
2030
  starts: new Uint32Array(yt),
1850
- lengths: new Uint32Array(Et)
2031
+ lengths: new Uint32Array(mt)
1851
2032
  });
1852
- } catch (Gt) {
1853
- console.warn("[stream] set-entity-index dispatch failed:", Gt);
2033
+ } catch (Vt) {
2034
+ console.warn("[stream] set-entity-index dispatch failed:", Vt);
1854
2035
  }
1855
2036
  if (s?.onEntityIndex) try {
1856
- s.onEntityIndex(new Uint32Array(dt), new Uint32Array(yt), new Uint32Array(Et));
1857
- } catch (mt) {
1858
- console.warn("[stream] onEntityIndex callback failed:", mt);
2037
+ s.onEntityIndex(new Uint32Array(ft), new Uint32Array(yt), new Uint32Array(mt));
2038
+ } catch (Et) {
2039
+ console.warn("[stream] onEntityIndex callback failed:", Et);
1859
2040
  }
1860
2041
  } else {
1861
- for (const st of R)try {
1862
- st.postMessage({
2042
+ for (const it of R)try {
2043
+ it.postMessage({
1863
2044
  type: "set-entity-index",
1864
- ids: x.slice(),
2045
+ ids: M.slice(),
1865
2046
  starts: q.slice(),
1866
- lengths: D.slice()
2047
+ lengths: P.slice()
1867
2048
  });
1868
2049
  } catch (pt) {
1869
2050
  console.warn("[stream] set-entity-index dispatch failed:", pt);
1870
2051
  }
1871
2052
  if (s?.onEntityIndex) try {
1872
- s.onEntityIndex(x.slice(), q.slice(), D.slice());
1873
- } catch (st) {
1874
- console.warn("[stream] onEntityIndex callback failed:", st);
2053
+ s.onEntityIndex(M.slice(), q.slice(), P.slice());
2054
+ } catch (it) {
2055
+ console.warn("[stream] onEntityIndex callback failed:", it);
1875
2056
  }
1876
2057
  }
1877
- U = !0, H();
1878
- } else P.type === "complete" && (_ = P.totalJobs, console.log(`[stream] prepass complete @ ${Q()}ms totalJobs=${_} chunks=${at}`), ct || (ct = !0, lt()));
2058
+ v = !0, H();
2059
+ } else B.type === "complete" && (g = B.totalJobs, console.log(`[stream] prepass complete @ ${Q()}ms totalJobs=${g} chunks=${at}`), lt || (lt = !0, dt()));
1879
2060
  return;
1880
2061
  }
1881
2062
  if (X.type === "error") {
1882
2063
  y = new Error(X.message), h = !0, K.terminate(), f();
1883
2064
  return;
1884
2065
  }
1885
- }, K.onerror = (M)=>{
1886
- y = new Error(`Pre-pass worker failed: ${M.message}`), h = !0, K.terminate(), f();
2066
+ }, K.onerror = (L)=>{
2067
+ y = new Error(`Pre-pass worker failed: ${L.message}`), h = !0, K.terminate(), f();
1887
2068
  };
1888
- const lt = ()=>{
1889
- h = !0, L && S(), K.terminate(), f();
2069
+ const dt = ()=>{
2070
+ h = !0, x && N(), K.terminate(), f();
1890
2071
  };
1891
2072
  K.postMessage({
1892
2073
  type: "prepass-streaming",
1893
2074
  sharedBuffer: i,
1894
2075
  chunkSize: 5e4
1895
2076
  });
1896
- let ct = !1;
2077
+ let lt = !1;
1897
2078
  for(;;){
1898
2079
  for(; d.length > 0;)yield d.shift();
1899
- if (m) {
1900
- for (const M of R)try {
1901
- M.terminate();
2080
+ if (E) {
2081
+ for (const L of R)try {
2082
+ L.terminate();
1902
2083
  } catch {}
1903
2084
  try {
1904
2085
  K.terminate();
1905
2086
  } catch {}
1906
- throw m;
2087
+ throw E;
1907
2088
  }
1908
2089
  if (y) {
1909
- for (const M of R)try {
1910
- M.terminate();
2090
+ for (const L of R)try {
2091
+ L.terminate();
1911
2092
  } catch {}
1912
2093
  throw y;
1913
2094
  }
1914
- if (h && !L && _ === 0) {
2095
+ if (h && !x && g === 0) {
1915
2096
  for (const X of R)try {
1916
2097
  X.terminate();
1917
2098
  } catch {}
@@ -1922,26 +2103,26 @@ let __tla = Promise.all([
1922
2103
  };
1923
2104
  return;
1924
2105
  }
1925
- if (h && L && b >= R.length && d.length === 0) break;
1926
- await new Promise((M)=>{
1927
- u = M;
2106
+ if (h && x && C >= R.length && d.length === 0) break;
2107
+ await new Promise((L)=>{
2108
+ u = L;
1928
2109
  });
1929
2110
  }
1930
- const _t = t.getFinalCoordinateInfo();
2111
+ const gt = t.getFinalCoordinateInfo();
1931
2112
  yield {
1932
2113
  type: "complete",
1933
- totalMeshes: w,
1934
- coordinateInfo: _t
2114
+ totalMeshes: T,
2115
+ coordinateInfo: gt
1935
2116
  };
1936
2117
  }
1937
- let bt = null;
1938
- function xn(r) {
1939
- if (bt) throw new Error(`GeometryProcessor ${r} cannot start while ${bt} is still running. Wait for the active stream to finish, or cancel it before starting another geometry operation.`);
1940
- return bt = r, ()=>{
1941
- bt === r && (bt = null);
2118
+ let wt = null;
2119
+ function vn(r) {
2120
+ if (wt) throw new Error(`GeometryProcessor ${r} cannot start while ${wt} is still running. Wait for the active stream to finish, or cancel it before starting another geometry operation.`);
2121
+ return wt = r, ()=>{
2122
+ wt === r && (wt = null);
1942
2123
  };
1943
2124
  }
1944
- ss = class {
2125
+ cs = class {
1945
2126
  static largeFileByteStreamingThreshold = 256 * 1024 * 1024;
1946
2127
  bridge = null;
1947
2128
  platformBridge = null;
@@ -1951,19 +2132,19 @@ let __tla = Promise.all([
1951
2132
  lastNativeStats = null;
1952
2133
  mergeLayers;
1953
2134
  constructor(t = {}){
1954
- this.bufferBuilder = new hn, this.coordinateHandler = new pn, this.isNative = t.preferNative !== !1 && Ue(), this.mergeLayers = t.mergeLayers === !0, t.quality, this.isNative || (this.bridge = new fn, this.bridge.setMergeLayers(this.mergeLayers));
2135
+ this.bufferBuilder = new yn, this.coordinateHandler = new mn, this.isNative = t.preferNative !== !1 && $e(), this.mergeLayers = t.mergeLayers === !0, t.quality, this.isNative || (this.bridge = new _n, this.bridge.setMergeLayers(this.mergeLayers));
1955
2136
  }
1956
2137
  async init() {
1957
- this.isNative ? (this.platformBridge = await un(), await this.platformBridge.init(), console.log("[GeometryProcessor] Native bridge initialized")) : this.bridge && await this.bridge.init();
2138
+ this.isNative ? (this.platformBridge = await gn(), await this.platformBridge.init(), console.log("[GeometryProcessor] Native bridge initialized")) : this.bridge && await this.bridge.init();
1958
2139
  }
1959
2140
  async process(t, e) {
1960
2141
  let n;
1961
2142
  if (this.isNative && this.platformBridge) console.time("[GeometryProcessor] native-processing"), n = (await this.platformBridge.processGeometry(t)).meshes, console.timeEnd("[GeometryProcessor] native-processing");
1962
2143
  else {
1963
2144
  this.bridge?.isInitialized() || await this.init();
1964
- const a = await this.collectMeshesMainThread(t);
1965
- n = a.meshes;
1966
- const l = this.coordinateHandler.processMeshes(n), d = a.buildingRotation, u = {
2145
+ const c = await this.collectMeshesMainThread(t);
2146
+ n = c.meshes;
2147
+ const l = this.coordinateHandler.processMeshes(n), d = c.buildingRotation, u = {
1967
2148
  ...l,
1968
2149
  buildingRotation: d
1969
2150
  }, f = this.bufferBuilder.processMeshes(n);
@@ -1993,14 +2174,22 @@ let __tla = Promise.all([
1993
2174
  coordinateInfo: n
1994
2175
  };
1995
2176
  }
2177
+ applyPrePassMetadata(t) {
2178
+ this.coordinateHandler.setWasmMetadata(t.unitScale, t.needsShift ? {
2179
+ x: t.rtcOffset?.[0] ?? 0,
2180
+ y: t.rtcOffset?.[1] ?? 0,
2181
+ z: t.rtcOffset?.[2] ?? 0
2182
+ } : null);
2183
+ }
1996
2184
  collectMeshesViaPrePass(t) {
1997
2185
  if (!this.bridge) throw new Error("WASM bridge not initialized");
1998
2186
  const e = this.bridge.getApi(), n = e.buildPrePassOnce(t);
2187
+ this.applyPrePassMetadata(n);
1999
2188
  try {
2000
2189
  const s = [], i = n.totalJobs ?? 0;
2001
2190
  if (n.jobs && i > 0) {
2002
2191
  const o = e.processGeometryBatch(t, n.jobs, n.unitScale, n.rtcOffset?.[0] ?? 0, n.rtcOffset?.[1] ?? 0, n.rtcOffset?.[2] ?? 0, n.needsShift, n.voidKeys, n.voidCounts, n.voidValues, n.styleIds, n.styleColors);
2003
- s.push(...Ce(o));
2192
+ s.push(...Fe(o));
2004
2193
  }
2005
2194
  return {
2006
2195
  meshes: s,
@@ -2016,6 +2205,7 @@ let __tla = Promise.all([
2016
2205
  async *processStreamingBytes(t, e) {
2017
2206
  if (!this.bridge) throw new Error("WASM bridge not initialized");
2018
2207
  const n = this.bridge.getApi(), s = n.buildPrePassOnce(t);
2208
+ this.applyPrePassMetadata(s);
2019
2209
  try {
2020
2210
  yield {
2021
2211
  type: "model-open",
@@ -2034,28 +2224,28 @@ let __tla = Promise.all([
2034
2224
  yield {
2035
2225
  type: "complete",
2036
2226
  totalMeshes: 0,
2037
- coordinateInfo: Vt(this.coordinateHandler.getFinalCoordinateInfo(), i)
2227
+ coordinateInfo: Wt(this.coordinateHandler.getFinalCoordinateInfo(), i)
2038
2228
  };
2039
2229
  return;
2040
2230
  }
2041
- const o = Rn(t, e), l = Math.max(o, Math.ceil(s.totalJobs / 30));
2231
+ const o = xn(t, e), l = Math.max(o, Math.ceil(s.totalJobs / 30));
2042
2232
  let d = 0;
2043
2233
  for(let f = 0; f < s.totalJobs; f += l){
2044
- const p = Math.min(f + l, s.totalJobs), _ = s.jobs.slice(f * 3, p * 3), h = n.processGeometryBatch(t, _, s.unitScale, s.rtcOffset?.[0] ?? 0, s.rtcOffset?.[1] ?? 0, s.rtcOffset?.[2] ?? 0, s.needsShift, s.voidKeys, s.voidCounts, s.voidValues, s.styleIds, s.styleColors), y = Ce(h);
2234
+ const p = Math.min(f + l, s.totalJobs), g = s.jobs.slice(f * 3, p * 3), h = n.processGeometryBatch(t, g, s.unitScale, s.rtcOffset?.[0] ?? 0, s.rtcOffset?.[1] ?? 0, s.rtcOffset?.[2] ?? 0, s.needsShift, s.voidKeys, s.voidCounts, s.voidValues, s.styleIds, s.styleColors), y = Fe(h);
2045
2235
  if (y.length === 0) {
2046
- await new Promise((w)=>setTimeout(w, 0));
2236
+ await new Promise((T)=>setTimeout(T, 0));
2047
2237
  continue;
2048
2238
  }
2049
2239
  this.coordinateHandler.processMeshesIncremental(y), d += y.length;
2050
- const m = this.coordinateHandler.getCurrentCoordinateInfo(), b = m ? Vt(m, i) : null;
2240
+ const E = this.coordinateHandler.getCurrentCoordinateInfo(), C = E ? Wt(E, i) : null;
2051
2241
  yield {
2052
2242
  type: "batch",
2053
2243
  meshes: y,
2054
2244
  totalSoFar: d,
2055
- coordinateInfo: b || void 0
2056
- }, await new Promise((w)=>setTimeout(w, 0));
2245
+ coordinateInfo: C || void 0
2246
+ }, await new Promise((T)=>setTimeout(T, 0));
2057
2247
  }
2058
- const u = Vt(this.coordinateHandler.getFinalCoordinateInfo(), i);
2248
+ const u = Wt(this.coordinateHandler.getFinalCoordinateInfo(), i);
2059
2249
  yield {
2060
2250
  type: "complete",
2061
2251
  totalMeshes: d,
@@ -2066,7 +2256,7 @@ let __tla = Promise.all([
2066
2256
  }
2067
2257
  }
2068
2258
  async *processStreaming(t, e, n = 25, s) {
2069
- const i = this.isNative ? null : xn("processStreaming");
2259
+ const i = this.isNative ? null : vn("processStreaming");
2070
2260
  try {
2071
2261
  yield* this.processStreamingUnlocked(t, e, n, s);
2072
2262
  } finally{
@@ -2083,7 +2273,7 @@ let __tla = Promise.all([
2083
2273
  modelID: 0
2084
2274
  }, console.time("[GeometryProcessor] native-streaming");
2085
2275
  const i = [];
2086
- let o = null, a = !1, l = null, d, u = 0;
2276
+ let o = null, c = !1, l = null, d, u = 0;
2087
2277
  const f = ()=>{
2088
2278
  o && (o(), o = null);
2089
2279
  }, p = this.platformBridge.processGeometryStreaming(t, {
@@ -2101,13 +2291,13 @@ let __tla = Promise.all([
2101
2291
  }), f();
2102
2292
  },
2103
2293
  onComplete: (h)=>{
2104
- this.lastNativeStats = h, d = h.totalMeshes, a = !0, f();
2294
+ this.lastNativeStats = h, d = h.totalMeshes, c = !0, f();
2105
2295
  },
2106
2296
  onError: (h)=>{
2107
- l = h, a = !0, f();
2297
+ l = h, c = !0, f();
2108
2298
  }
2109
2299
  });
2110
- for(; !a || i.length > 0;){
2300
+ for(; !c || i.length > 0;){
2111
2301
  for(; i.length > 0;){
2112
2302
  const h = i.shift();
2113
2303
  if (h.type === "colorUpdate") {
@@ -2128,16 +2318,16 @@ let __tla = Promise.all([
2128
2318
  };
2129
2319
  }
2130
2320
  if (l) throw l;
2131
- a || await new Promise((h)=>{
2321
+ c || await new Promise((h)=>{
2132
2322
  o = h;
2133
2323
  });
2134
2324
  }
2135
2325
  await p;
2136
- const _ = this.coordinateHandler.getFinalCoordinateInfo();
2326
+ const g = this.coordinateHandler.getFinalCoordinateInfo();
2137
2327
  yield {
2138
2328
  type: "complete",
2139
2329
  totalMeshes: d ?? u,
2140
- coordinateInfo: _
2330
+ coordinateInfo: g
2141
2331
  }, console.timeEnd("[GeometryProcessor] native-streaming");
2142
2332
  } else {
2143
2333
  if (!this.bridge) throw new Error("WASM bridge not initialized");
@@ -2147,19 +2337,19 @@ let __tla = Promise.all([
2147
2337
  async *processStreamingPath(t, e = 0, n) {
2148
2338
  if (!this.isNative) throw new Error("File-path geometry streaming is only available in native desktop builds");
2149
2339
  if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingPath) throw new Error("Native platform bridge does not support file-path streaming");
2150
- yield* we((s)=>this.platformBridge.processGeometryStreamingPath(t, s, n), e > 0 ? e / 1e3 : 0, this.coordinateHandler, (s)=>{
2340
+ yield* Ne((s)=>this.platformBridge.processGeometryStreamingPath(t, s, n), e > 0 ? e / 1e3 : 0, this.coordinateHandler, (s)=>{
2151
2341
  this.lastNativeStats = s;
2152
2342
  });
2153
2343
  }
2154
2344
  async *processStreamingCache(t) {
2155
2345
  if (!this.isNative) throw new Error("Native cached geometry streaming is only available in native desktop builds");
2156
2346
  if (this.platformBridge || await this.init(), !this.platformBridge?.processGeometryStreamingCache) throw new Error("Native platform bridge does not support cached geometry streaming");
2157
- yield* we((e)=>this.platformBridge.processGeometryStreamingCache(t, e), 0, this.coordinateHandler, (e)=>{
2347
+ yield* Ne((e)=>this.platformBridge.processGeometryStreamingCache(t, e), 0, this.coordinateHandler, (e)=>{
2158
2348
  this.lastNativeStats = e;
2159
2349
  });
2160
2350
  }
2161
2351
  async *processParallel(t, e, n, s, i) {
2162
- this.bridge?.isInitialized() || await this.init(), yield* Mn(t, this.coordinateHandler, e, n, {
2352
+ this.bridge?.isInitialized() || await this.init(), yield* Dn(t, this.coordinateHandler, e, n, {
2163
2353
  onEntityIndex: s,
2164
2354
  mergeLayers: this.mergeLayers,
2165
2355
  wasmUrls: i
@@ -2182,16 +2372,16 @@ let __tla = Promise.all([
2182
2372
  i = l.meshes, o = l.buildingRotation;
2183
2373
  }
2184
2374
  this.coordinateHandler.processMeshesIncremental(i);
2185
- const a = Vt(this.coordinateHandler.getFinalCoordinateInfo(), o);
2375
+ const c = Wt(this.coordinateHandler.getFinalCoordinateInfo(), o);
2186
2376
  yield {
2187
2377
  type: "batch",
2188
2378
  meshes: i,
2189
2379
  totalSoFar: i.length,
2190
- coordinateInfo: a || void 0
2380
+ coordinateInfo: c || void 0
2191
2381
  }, yield {
2192
2382
  type: "complete",
2193
2383
  totalMeshes: i.length,
2194
- coordinateInfo: a
2384
+ coordinateInfo: c
2195
2385
  };
2196
2386
  } else typeof SharedArrayBuffer < "u" && typeof Worker < "u" && typeof navigator < "u" && (navigator.hardwareConcurrency ?? 1) > 1 ? yield* this.processParallel(t, e.sharedRtcOffset, e.existingSab, e.onEntityIndex, e.wasmUrls) : yield* this.processStreaming(t, e.entityIndex, s, e.sharedRtcOffset);
2197
2387
  }
@@ -2211,6 +2401,44 @@ let __tla = Promise.all([
2211
2401
  const e = nt(t);
2212
2402
  return this.bridge.parseAlignmentLines(e);
2213
2403
  }
2404
+ parseGridLines(t) {
2405
+ if (!this.bridge || !this.bridge.isInitialized()) return null;
2406
+ const e = nt(t);
2407
+ return this.bridge.parseGridLines(e);
2408
+ }
2409
+ parseGridAxes(t) {
2410
+ if (!this.bridge || !this.bridge.isInitialized()) return null;
2411
+ const e = nt(t), n = this.bridge.parseGridAxes(e);
2412
+ try {
2413
+ const s = [];
2414
+ for(let i = 0; i < n.length; i++){
2415
+ const o = n.getAxis(i);
2416
+ if (o) try {
2417
+ const c = o.start, l = o.end;
2418
+ s.push({
2419
+ gridId: o.gridId,
2420
+ axisId: o.axisId,
2421
+ tag: o.tag,
2422
+ start: [
2423
+ c[0],
2424
+ c[1],
2425
+ c[2]
2426
+ ],
2427
+ end: [
2428
+ l[0],
2429
+ l[1],
2430
+ l[2]
2431
+ ]
2432
+ });
2433
+ } finally{
2434
+ o.free();
2435
+ }
2436
+ }
2437
+ return s;
2438
+ } finally{
2439
+ n.free();
2440
+ }
2441
+ }
2214
2442
  extractProfiles(t, e = 0) {
2215
2443
  if (!this.bridge || !this.bridge.isInitialized()) return null;
2216
2444
  const n = nt(t);
@@ -2218,7 +2446,7 @@ let __tla = Promise.all([
2218
2446
  }
2219
2447
  dispose() {}
2220
2448
  };
2221
- is = class {
2449
+ ls = class {
2222
2450
  geometryResult;
2223
2451
  constructor(t){
2224
2452
  this.geometryResult = t;
@@ -2235,7 +2463,7 @@ let __tla = Promise.all([
2235
2463
  };
2236
2464
  }
2237
2465
  buildGLTF(t) {
2238
- const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null, a = o !== null && o.size > 0, l = t.hiddenIfcTypes ?? null, d = (I)=>s ? !(l && I.ifcType && l.has(I.ifcType) || a && !o.has(I.expressId) || i && i.has(I.expressId)) : !0, u = (I)=>n === "shading" ? I.shadingColor ?? I.color : I.color, f = {
2466
+ const e = this.geometryResult.meshes, n = t.colorSource ?? "rendering", s = t.visibleOnly === !0, i = t.hiddenEntityIds ?? null, o = t.isolatedEntityIds ?? null, c = o !== null && o.size > 0, l = t.hiddenIfcTypes ?? null, d = (I)=>s ? !(l && I.ifcType && l.has(I.ifcType) || c && !o.has(I.expressId) || i && i.has(I.expressId)) : !0, u = (I)=>n === "shading" ? I.shadingColor ?? I.color : I.color, f = {
2239
2467
  asset: {
2240
2468
  version: "2.0",
2241
2469
  generator: "IFC-Lite"
@@ -2261,12 +2489,12 @@ let __tla = Promise.all([
2261
2489
  vertexCount: this.geometryResult.totalVertices,
2262
2490
  triangleCount: this.geometryResult.totalTriangles
2263
2491
  });
2264
- const p = new Map, _ = [];
2492
+ const p = new Map, g = [];
2265
2493
  function h(I) {
2266
- const R = `${Math.round(I[0] * 100)},${Math.round(I[1] * 100)},${Math.round(I[2] * 100)},${Math.round(I[3] * 100)}`, S = p.get(R);
2267
- if (S !== void 0) return S;
2268
- const G = _.length;
2269
- return _.push({
2494
+ const R = `${Math.round(I[0] * 100)},${Math.round(I[1] * 100)},${Math.round(I[2] * 100)},${Math.round(I[3] * 100)}`, N = p.get(R);
2495
+ if (N !== void 0) return N;
2496
+ const V = g.length;
2497
+ return g.push({
2270
2498
  pbrMetallicRoughness: {
2271
2499
  baseColorFactor: [
2272
2500
  I[0],
@@ -2283,34 +2511,34 @@ let __tla = Promise.all([
2283
2511
  ...I[3] < 1 ? {
2284
2512
  alphaMode: "BLEND"
2285
2513
  } : {}
2286
- }), p.set(R, G), G;
2514
+ }), p.set(R, V), V;
2287
2515
  }
2288
2516
  const y = [];
2289
- let m = 0, b = 0, w = 0;
2517
+ let E = 0, C = 0, T = 0;
2290
2518
  for(let I = 0; I < e.length; I++){
2291
2519
  const R = e[I];
2292
2520
  if (!d(R)) continue;
2293
- const S = R.positions, G = R.normals, z = R.indices;
2294
- if (!S.length || !G.length || !z.length || S.length % 3 !== 0 || G.length % 3 !== 0 || S.length !== G.length) continue;
2295
- let k = S[0], H = S[1], Y = S[2], Q = S[0], K = S[1], at = S[2];
2296
- for(let it = 3; it < S.length; it += 3){
2297
- const lt = S[it], ct = S[it + 1], _t = S[it + 2];
2298
- lt < k && (k = lt), lt > Q && (Q = lt), ct < H && (H = ct), ct > K && (K = ct), _t < Y && (Y = _t), _t > at && (at = _t);
2521
+ const N = R.positions, V = R.normals, z = R.indices;
2522
+ if (!N.length || !V.length || !z.length || N.length % 3 !== 0 || V.length % 3 !== 0 || N.length !== V.length) continue;
2523
+ let W = N[0], H = N[1], j = N[2], Q = N[0], K = N[1], at = N[2];
2524
+ for(let rt = 3; rt < N.length; rt += 3){
2525
+ const dt = N[rt], lt = N[rt + 1], gt = N[rt + 2];
2526
+ dt < W && (W = dt), dt > Q && (Q = dt), lt < H && (H = lt), lt > K && (K = lt), gt < j && (j = gt), gt > at && (at = gt);
2299
2527
  }
2300
2528
  const ht = u(R);
2301
2529
  y.push({
2302
2530
  meshIndex: I,
2303
- posCount: S.length,
2304
- normCount: G.length,
2531
+ posCount: N.length,
2532
+ normCount: V.length,
2305
2533
  idxCount: z.length,
2306
- posByteOffset: m * 4,
2307
- normByteOffset: b * 4,
2308
- idxByteOffset: w * 4,
2534
+ posByteOffset: E * 4,
2535
+ normByteOffset: C * 4,
2536
+ idxByteOffset: T * 4,
2309
2537
  bounds: {
2310
2538
  min: [
2311
- k,
2539
+ W,
2312
2540
  H,
2313
- Y
2541
+ j
2314
2542
  ],
2315
2543
  max: [
2316
2544
  Q,
@@ -2319,16 +2547,16 @@ let __tla = Promise.all([
2319
2547
  ]
2320
2548
  },
2321
2549
  materialIdx: ht ? h(ht) : void 0
2322
- }), m += S.length, b += G.length, w += z.length;
2550
+ }), E += N.length, C += V.length, T += z.length;
2323
2551
  }
2324
- if (m === 0 || b === 0 || w === 0) throw new Error("Cannot export GLB: no valid geometry data found");
2325
- const v = new Float32Array(m), L = new Float32Array(b), j = new Uint32Array(w);
2326
- let O = 0, U = 0, C = 0;
2327
- const N = [];
2552
+ if (E === 0 || C === 0 || T === 0) throw new Error("Cannot export GLB: no valid geometry data found");
2553
+ const $ = new Float32Array(E), x = new Float32Array(C), Y = new Uint32Array(T);
2554
+ let O = 0, v = 0, b = 0;
2555
+ const S = [];
2328
2556
  for (const I of y){
2329
2557
  const R = e[I.meshIndex];
2330
- v.set(R.positions, O), L.set(R.normals, U), j.set(R.indices, C), O += I.posCount, U += I.normCount, C += I.idxCount;
2331
- const S = f.accessors.length;
2558
+ $.set(R.positions, O), x.set(R.normals, v), Y.set(R.indices, b), O += I.posCount, v += I.normCount, b += I.idxCount;
2559
+ const N = f.accessors.length;
2332
2560
  f.accessors.push({
2333
2561
  bufferView: 0,
2334
2562
  byteOffset: I.posByteOffset,
@@ -2338,7 +2566,7 @@ let __tla = Promise.all([
2338
2566
  min: I.bounds.min,
2339
2567
  max: I.bounds.max
2340
2568
  });
2341
- const G = f.accessors.length;
2569
+ const V = f.accessors.length;
2342
2570
  f.accessors.push({
2343
2571
  bufferView: 1,
2344
2572
  byteOffset: I.normByteOffset,
@@ -2354,13 +2582,13 @@ let __tla = Promise.all([
2354
2582
  count: I.idxCount,
2355
2583
  type: "SCALAR"
2356
2584
  });
2357
- const k = f.meshes.length;
2585
+ const W = f.meshes.length;
2358
2586
  f.meshes.push({
2359
2587
  primitives: [
2360
2588
  {
2361
2589
  attributes: {
2362
- POSITION: S,
2363
- NORMAL: G
2590
+ POSITION: N,
2591
+ NORMAL: V
2364
2592
  },
2365
2593
  indices: z,
2366
2594
  ...I.materialIdx !== void 0 ? {
@@ -2369,20 +2597,20 @@ let __tla = Promise.all([
2369
2597
  }
2370
2598
  ]
2371
2599
  });
2372
- const H = f.nodes.length, Y = {
2373
- mesh: k
2600
+ const H = f.nodes.length, j = {
2601
+ mesh: W
2374
2602
  };
2375
- t.includeMetadata && R.expressId !== void 0 && (Y.extras = R.modelIndex !== void 0 ? {
2603
+ t.includeMetadata && R.expressId !== void 0 && (j.extras = R.modelIndex !== void 0 ? {
2376
2604
  expressId: R.expressId,
2377
2605
  modelIndex: R.modelIndex
2378
2606
  } : {
2379
2607
  expressId: R.expressId
2380
- }), f.nodes.push(Y), N.push(H);
2608
+ }), f.nodes.push(j), S.push(H);
2381
2609
  }
2382
- f.scenes[0].nodes = N, _.length > 0 && (f.materials = _, f.extensionsUsed = [
2610
+ f.scenes[0].nodes = S, g.length > 0 && (f.materials = g, f.extensionsUsed = [
2383
2611
  "KHR_materials_unlit"
2384
2612
  ]);
2385
- const F = v.buffer, E = L.buffer, g = j.buffer, T = F.byteLength + E.byteLength + g.byteLength;
2613
+ const F = $.buffer, m = x.buffer, _ = Y.buffer, w = F.byteLength + m.byteLength + _.byteLength;
2386
2614
  f.bufferViews.push({
2387
2615
  buffer: 0,
2388
2616
  byteOffset: 0,
@@ -2392,38 +2620,38 @@ let __tla = Promise.all([
2392
2620
  }), f.bufferViews.push({
2393
2621
  buffer: 0,
2394
2622
  byteOffset: F.byteLength,
2395
- byteLength: E.byteLength,
2623
+ byteLength: m.byteLength,
2396
2624
  byteStride: 12,
2397
2625
  target: 34962
2398
2626
  }), f.bufferViews.push({
2399
2627
  buffer: 0,
2400
- byteOffset: F.byteLength + E.byteLength,
2401
- byteLength: g.byteLength,
2628
+ byteOffset: F.byteLength + m.byteLength,
2629
+ byteLength: _.byteLength,
2402
2630
  target: 34963
2403
- }), f.buffers[0].byteLength = T;
2631
+ }), f.buffers[0].byteLength = w;
2404
2632
  for (const I of f.accessors){
2405
2633
  const R = f.bufferViews[I.bufferView];
2406
2634
  if (!R) throw new Error(`Accessor references invalid bufferView ${I.bufferView}`);
2407
- let S = 0;
2408
- if (I.componentType === 5126) S = 4;
2409
- else if (I.componentType === 5125) S = 4;
2410
- else if (I.componentType === 5123) S = 2;
2411
- else if (I.componentType === 5120) S = 1;
2635
+ let N = 0;
2636
+ if (I.componentType === 5126) N = 4;
2637
+ else if (I.componentType === 5125) N = 4;
2638
+ else if (I.componentType === 5123) N = 2;
2639
+ else if (I.componentType === 5120) N = 1;
2412
2640
  else throw new Error(`Unsupported component type: ${I.componentType}`);
2413
- let G = 1;
2414
- if (I.type === "VEC3") G = 3;
2415
- else if (I.type === "VEC2") G = 2;
2416
- else if (I.type === "SCALAR") G = 1;
2641
+ let V = 1;
2642
+ if (I.type === "VEC3") V = 3;
2643
+ else if (I.type === "VEC2") V = 2;
2644
+ else if (I.type === "SCALAR") V = 1;
2417
2645
  else throw new Error(`Unsupported accessor type: ${I.type}`);
2418
- const z = I.count * G * S, k = (I.byteOffset || 0) + z;
2419
- if (k > R.byteLength) throw new Error(`Accessor exceeds bufferView bounds: accessor byteOffset=${I.byteOffset || 0}, length=${z}, bufferView byteLength=${R.byteLength}, end=${k}`);
2646
+ const z = I.count * V * N, W = (I.byteOffset || 0) + z;
2647
+ if (W > R.byteLength) throw new Error(`Accessor exceeds bufferView bounds: accessor byteOffset=${I.byteOffset || 0}, length=${z}, bufferView byteLength=${R.byteLength}, end=${W}`);
2420
2648
  }
2421
2649
  return {
2422
2650
  json: f,
2423
2651
  buffers: [
2424
2652
  new Uint8Array(F),
2425
- new Uint8Array(E),
2426
- new Uint8Array(g)
2653
+ new Uint8Array(m),
2654
+ new Uint8Array(_)
2427
2655
  ]
2428
2656
  };
2429
2657
  }
@@ -2434,23 +2662,23 @@ let __tla = Promise.all([
2434
2662
  return n;
2435
2663
  }
2436
2664
  packGLB(t, e) {
2437
- const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i, a = this.combineBuffers(e), l = (4 - a.byteLength % 4) % 4, d = a.byteLength + l, u = 20 + o + 8 + d, f = new ArrayBuffer(u), p = new DataView(f), _ = new Uint8Array(f);
2665
+ const n = JSON.stringify(t), s = new TextEncoder().encode(n), i = (4 - s.byteLength % 4) % 4, o = s.byteLength + i, c = this.combineBuffers(e), l = (4 - c.byteLength % 4) % 4, d = c.byteLength + l, u = 20 + o + 8 + d, f = new ArrayBuffer(u), p = new DataView(f), g = new Uint8Array(f);
2438
2666
  let h = 0;
2439
- p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, u, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4, _.set(s, h), h += s.byteLength;
2440
- for(let y = 0; y < i; y++)_[h++] = 32;
2441
- return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4, _.set(a, h), new Uint8Array(f);
2667
+ p.setUint32(h, 1179937895, !0), h += 4, p.setUint32(h, 2, !0), h += 4, p.setUint32(h, u, !0), h += 4, p.setUint32(h, o, !0), h += 4, p.setUint32(h, 1313821514, !0), h += 4, g.set(s, h), h += s.byteLength;
2668
+ for(let y = 0; y < i; y++)g[h++] = 32;
2669
+ return p.setUint32(h, d, !0), h += 4, p.setUint32(h, 5130562, !0), h += 4, g.set(c, h), new Uint8Array(f);
2442
2670
  }
2443
2671
  };
2444
- rs = class {
2672
+ ds = class {
2445
2673
  store;
2446
2674
  constructor(t){
2447
2675
  this.store = t;
2448
2676
  }
2449
2677
  getPropertiesForEntity(t) {
2450
- return this.store.onDemandPropertyMap && this.store.source?.length > 0 ? Ve(this.store, t) : this.store.properties?.getForEntity(t) ?? [];
2678
+ return this.store.onDemandPropertyMap && this.store.source?.length > 0 ? ke(this.store, t) : this.store.properties?.getForEntity(t) ?? [];
2451
2679
  }
2452
2680
  getQuantitiesForEntity(t) {
2453
- return this.store.onDemandQuantityMap && this.store.source?.length > 0 ? ze(this.store, t) : this.store.quantities?.getForEntity(t) ?? [];
2681
+ return this.store.onDemandQuantityMap && this.store.source?.length > 0 ? Ye(this.store, t) : this.store.quantities?.getForEntity(t) ?? [];
2454
2682
  }
2455
2683
  exportEntities(t, e = {}) {
2456
2684
  const n = e.delimiter ?? ",", s = e.includeProperties ?? !1, i = e.flattenProperties ?? !1, o = [
@@ -2461,17 +2689,17 @@ let __tla = Promise.all([
2461
2689
  "description",
2462
2690
  "objectType",
2463
2691
  "hasGeometry"
2464
- ], a = new Map;
2692
+ ], c = new Map;
2465
2693
  if (s && i) {
2466
2694
  const u = t ?? this.getAllEntityIds();
2467
2695
  for (const f of u){
2468
2696
  const p = this.getPropertiesForEntity(f);
2469
- for (const _ of p){
2470
- a.has(_.name) || a.set(_.name, new Set);
2471
- for (const h of _.properties)a.get(_.name).add(h.name);
2697
+ for (const g of p){
2698
+ c.has(g.name) || c.set(g.name, new Set);
2699
+ for (const h of g.properties)c.get(g.name).add(h.name);
2472
2700
  }
2473
2701
  }
2474
- for (const [f, p] of a)for (const _ of p)o.push(`${f}_${_}`);
2702
+ for (const [f, p] of c)for (const g of p)o.push(`${f}_${g}`);
2475
2703
  }
2476
2704
  const l = [
2477
2705
  this.joinRow(o.map((u)=>this.escapeValue(u)), n)
@@ -2487,15 +2715,15 @@ let __tla = Promise.all([
2487
2715
  this.escapeValue(this.store.entities.hasGeometry(u) ? "true" : "false")
2488
2716
  ];
2489
2717
  if (s && i) {
2490
- const p = this.getPropertiesForEntity(u), _ = new Map;
2718
+ const p = this.getPropertiesForEntity(u), g = new Map;
2491
2719
  for (const h of p){
2492
2720
  const y = new Map;
2493
- for (const m of h.properties)y.set(m.name, m.value);
2494
- _.set(h.name, y);
2721
+ for (const E of h.properties)y.set(E.name, E.value);
2722
+ g.set(h.name, y);
2495
2723
  }
2496
- for (const [h, y] of a)for (const m of y){
2497
- const b = _.get(h)?.get(m) ?? "";
2498
- f.push(this.escapeValue(b));
2724
+ for (const [h, y] of c)for (const E of y){
2725
+ const C = g.get(h)?.get(E) ?? "";
2726
+ f.push(this.escapeValue(C));
2499
2727
  }
2500
2728
  }
2501
2729
  l.push(this.joinRow(f, n));
@@ -2514,22 +2742,22 @@ let __tla = Promise.all([
2514
2742
  "value",
2515
2743
  "type"
2516
2744
  ], i = [
2517
- this.joinRow(s.map((a)=>this.escapeValue(a)), n)
2745
+ this.joinRow(s.map((c)=>this.escapeValue(c)), n)
2518
2746
  ], o = t ?? this.getAllEntityIds();
2519
- for (const a of o){
2520
- const l = this.getPropertiesForEntity(a);
2747
+ for (const c of o){
2748
+ const l = this.getPropertiesForEntity(c);
2521
2749
  if (!l || l.length === 0) continue;
2522
- const d = this.store.entities.getGlobalId(a) || "", u = this.store.entities.getName(a) || "", f = this.store.entities.getTypeName(a) || "";
2523
- for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const _ of p.properties){
2750
+ const d = this.store.entities.getGlobalId(c) || "", u = this.store.entities.getName(c) || "", f = this.store.entities.getTypeName(c) || "";
2751
+ for (const p of l)if (!(!p.properties || p.properties.length === 0)) for (const g of p.properties){
2524
2752
  const h = [
2525
- this.escapeValue(a),
2753
+ this.escapeValue(c),
2526
2754
  this.escapeValue(d),
2527
2755
  this.escapeValue(u),
2528
2756
  this.escapeValue(f),
2529
2757
  this.escapeValue(p.name || ""),
2530
- this.escapeValue(_.name || ""),
2531
- this.escapeValue(_.value),
2532
- this.escapeValue(_.type ?? "")
2758
+ this.escapeValue(g.name || ""),
2759
+ this.escapeValue(g.value),
2760
+ this.escapeValue(g.type ?? "")
2533
2761
  ];
2534
2762
  i.push(this.joinRow(h, n));
2535
2763
  }
@@ -2549,18 +2777,18 @@ let __tla = Promise.all([
2549
2777
  "type"
2550
2778
  ], o = [
2551
2779
  this.joinRow(s.map((l)=>this.escapeValue(l)), n)
2552
- ], a = t ?? this.getAllEntityIds();
2553
- for (const l of a){
2780
+ ], c = t ?? this.getAllEntityIds();
2781
+ for (const l of c){
2554
2782
  const d = this.getQuantitiesForEntity(l);
2555
2783
  if (!d || d.length === 0) continue;
2556
2784
  const u = this.store.entities.getGlobalId(l) || "", f = this.store.entities.getName(l) || "", p = this.store.entities.getTypeName(l) || "";
2557
- for (const _ of d)if (!(!_.quantities || _.quantities.length === 0)) for (const h of _.quantities){
2785
+ for (const g of d)if (!(!g.quantities || g.quantities.length === 0)) for (const h of g.quantities){
2558
2786
  const y = [
2559
2787
  this.escapeValue(l),
2560
2788
  this.escapeValue(u),
2561
2789
  this.escapeValue(f),
2562
2790
  this.escapeValue(p),
2563
- this.escapeValue(_.name || ""),
2791
+ this.escapeValue(g.name || ""),
2564
2792
  this.escapeValue(h.name || ""),
2565
2793
  this.escapeValue(h.value),
2566
2794
  this.escapeValue(h.type ?? "")
@@ -2580,19 +2808,19 @@ let __tla = Promise.all([
2580
2808
  "parentId",
2581
2809
  "level"
2582
2810
  ], s = [
2583
- this.joinRow(n.map((a)=>this.escapeValue(a)), e)
2811
+ this.joinRow(n.map((c)=>this.escapeValue(c)), e)
2584
2812
  ], i = this.store.spatialHierarchy;
2585
2813
  if (!i?.project) return s[0];
2586
- const o = (a, l, d)=>{
2814
+ const o = (c, l, d)=>{
2587
2815
  const u = [
2588
- this.escapeValue(a.expressId),
2589
- this.escapeValue(this.store.entities.getGlobalId(a.expressId) || ""),
2590
- this.escapeValue(a.name || ""),
2591
- this.escapeValue(this.store.entities.getTypeName(a.expressId) || ""),
2816
+ this.escapeValue(c.expressId),
2817
+ this.escapeValue(this.store.entities.getGlobalId(c.expressId) || ""),
2818
+ this.escapeValue(c.name || ""),
2819
+ this.escapeValue(this.store.entities.getTypeName(c.expressId) || ""),
2592
2820
  this.escapeValue(l ?? ""),
2593
2821
  this.escapeValue(d)
2594
2822
  ];
2595
- if (s.push(this.joinRow(u, e)), a.children) for (const f of a.children)o(f, a.expressId, d + 1);
2823
+ if (s.push(this.joinRow(u, e)), c.children) for (const f of c.children)o(f, c.expressId, d + 1);
2596
2824
  };
2597
2825
  return o(i.project, null, 0), s.join(`
2598
2826
  `);
@@ -2612,7 +2840,7 @@ let __tla = Promise.all([
2612
2840
  return t.join(e);
2613
2841
  }
2614
2842
  };
2615
- const Pn = 35, zt = 48, Fe = 57, Bn = new Set([
2843
+ const Gn = 35, jt = 48, Ae = 57, $n = new Set([
2616
2844
  "IFCOWNERHISTORY",
2617
2845
  "IFCAPPLICATION",
2618
2846
  "IFCPERSON",
@@ -2628,7 +2856,7 @@ let __tla = Promise.all([
2628
2856
  "IFCMONETARYUNIT",
2629
2857
  "IFCGEOMETRICREPRESENTATIONCONTEXT",
2630
2858
  "IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
2631
- ]), Un = new Set([
2859
+ ]), Vn = new Set([
2632
2860
  "IFCPROJECT",
2633
2861
  "IFCSITE",
2634
2862
  "IFCBUILDING",
@@ -2649,7 +2877,7 @@ let __tla = Promise.all([
2649
2877
  "IFCSPATIALZONE",
2650
2878
  "IFCEXTERNALSPATIALELEMENT",
2651
2879
  "IFCEXTERNALSPATIALSTRUCTUREELEMENT"
2652
- ]), Dn = new Set([
2880
+ ]), zn = new Set([
2653
2881
  "IFCBEAM",
2654
2882
  "IFCBEAMSTANDARDCASE",
2655
2883
  "IFCBUILDINGELEMENT",
@@ -2857,25 +3085,25 @@ let __tla = Promise.all([
2857
3085
  "IFCSTRUCTURALSURFACEMEMBERVARYING",
2858
3086
  "IFCSTRUCTURALSURFACEREACTION"
2859
3087
  ]);
2860
- function Wt(r, t, e, n) {
3088
+ function Ht(r, t, e, n) {
2861
3089
  const s = t + e;
2862
3090
  let i = t;
2863
- for(; i < s;)if (r[i] === Pn) {
2864
- if (i++, i < s && r[i] >= zt && r[i] <= Fe) {
2865
- let o = r[i] - zt;
2866
- for(i++; i < s && r[i] >= zt && r[i] <= Fe;)o = o * 10 + (r[i] - zt), i++;
3091
+ for(; i < s;)if (r[i] === Gn) {
3092
+ if (i++, i < s && r[i] >= jt && r[i] <= Ae) {
3093
+ let o = r[i] - jt;
3094
+ for(i++; i < s && r[i] >= jt && r[i] <= Ae;)o = o * 10 + (r[i] - jt), i++;
2867
3095
  n.push(o);
2868
3096
  }
2869
3097
  } else i++;
2870
3098
  }
2871
- function re(r, t, e, n) {
3099
+ function ae(r, t, e, n) {
2872
3100
  const s = new Set, i = [];
2873
- for (const a of r)e.has(a) && !s.has(a) && (s.add(a), i.push(a));
3101
+ for (const c of r)e.has(c) && !s.has(c) && (s.add(c), i.push(c));
2874
3102
  const o = [];
2875
3103
  for(; i.length > 0;){
2876
- const a = i.pop(), l = e.get(a);
3104
+ const c = i.pop(), l = e.get(c);
2877
3105
  if (l) {
2878
- o.length = 0, Wt(t, l.byteOffset, l.byteLength, o);
3106
+ o.length = 0, Ht(t, l.byteOffset, l.byteLength, o);
2879
3107
  for(let d = 0; d < o.length; d++){
2880
3108
  const u = o[d];
2881
3109
  if (!s.has(u) && e.has(u)) {
@@ -2887,23 +3115,23 @@ let __tla = Promise.all([
2887
3115
  }
2888
3116
  return s;
2889
3117
  }
2890
- function oe(r, t, e) {
3118
+ function ce(r, t, e) {
2891
3119
  const n = new Set, s = new Set;
2892
3120
  for (const [i, o] of r.entityIndex.byId){
2893
- const a = o.type.toUpperCase();
2894
- if (Bn.has(a)) {
3121
+ const c = o.type.toUpperCase();
3122
+ if ($n.has(c)) {
2895
3123
  n.add(i);
2896
3124
  continue;
2897
3125
  }
2898
- if (Un.has(a)) {
3126
+ if (Vn.has(c)) {
2899
3127
  n.add(i);
2900
3128
  continue;
2901
3129
  }
2902
- if (a.startsWith("IFCREL")) {
3130
+ if (c.startsWith("IFCREL")) {
2903
3131
  n.add(i);
2904
3132
  continue;
2905
3133
  }
2906
- if (Dn.has(a)) {
3134
+ if (zn.has(c)) {
2907
3135
  const l = t.has(i), d = e !== null && !e.has(i);
2908
3136
  l || d ? s.add(i) : n.add(i);
2909
3137
  continue;
@@ -2917,38 +3145,38 @@ let __tla = Promise.all([
2917
3145
  continue;
2918
3146
  }
2919
3147
  }
2920
- return vn(r, n, s), {
3148
+ return Wn(r, n, s), {
2921
3149
  roots: n,
2922
3150
  hiddenProductIds: s
2923
3151
  };
2924
3152
  }
2925
- function vn(r, t, e) {
3153
+ function Wn(r, t, e) {
2926
3154
  const n = r.source;
2927
3155
  if (!n) return;
2928
3156
  const s = r.entityIndex.byType.get("IFCRELVOIDSELEMENT") ?? [];
2929
3157
  if (s.length === 0) return;
2930
3158
  const i = [];
2931
3159
  for (const o of s){
2932
- const a = r.entityIndex.byId.get(o);
2933
- if (!a) continue;
2934
- let l = a.byteOffset;
2935
- const d = a.byteOffset + a.byteLength;
3160
+ const c = r.entityIndex.byId.get(o);
3161
+ if (!c) continue;
3162
+ let l = c.byteOffset;
3163
+ const d = c.byteOffset + c.byteLength;
2936
3164
  for(; l < d && n[l] !== 40;)l++;
2937
- if (l >= d || (i.length = 0, Wt(n, l, d - l, i), i.length < 2)) continue;
3165
+ if (l >= d || (i.length = 0, Ht(n, l, d - l, i), i.length < 2)) continue;
2938
3166
  const u = i[i.length - 2], f = i[i.length - 1];
2939
3167
  e.has(u) && (e.add(f), t.delete(o), t.delete(f));
2940
3168
  }
2941
3169
  }
2942
- function ae(r, t, e) {
3170
+ function le(r, t, e) {
2943
3171
  const n = [], s = [], i = e.byType.get("IFCSTYLEDITEM") ?? [], o = e.byType.get("IFCSTYLEDREPRESENTATION") ?? [];
2944
- for (const a of [
3172
+ for (const c of [
2945
3173
  i,
2946
3174
  o
2947
- ])for (const l of a){
3175
+ ])for (const l of c){
2948
3176
  if (r.has(l)) continue;
2949
3177
  const d = e.byId.get(l);
2950
3178
  if (!d) continue;
2951
- s.length = 0, Wt(t, d.byteOffset, d.byteLength, s);
3179
+ s.length = 0, Ht(t, d.byteOffset, d.byteLength, s);
2952
3180
  let u = !1;
2953
3181
  for(let f = 0; f < s.length; f++)if (r.has(s[f])) {
2954
3182
  u = !0;
@@ -2957,9 +3185,9 @@ let __tla = Promise.all([
2957
3185
  u && (r.add(l), n.push(l));
2958
3186
  }
2959
3187
  for(; n.length > 0;){
2960
- const a = n.pop(), l = e.byId.get(a);
3188
+ const c = n.pop(), l = e.byId.get(c);
2961
3189
  if (l) {
2962
- s.length = 0, Wt(t, l.byteOffset, l.byteLength, s);
3190
+ s.length = 0, Ht(t, l.byteOffset, l.byteLength, s);
2963
3191
  for(let d = 0; d < s.length; d++){
2964
3192
  const u = s[d];
2965
3193
  !r.has(u) && e.byId.has(u) && (r.add(u), n.push(u));
@@ -2967,7 +3195,7 @@ let __tla = Promise.all([
2967
3195
  }
2968
3196
  }
2969
3197
  }
2970
- const Re = new Map([
3198
+ const Oe = new Map([
2971
3199
  [
2972
3200
  "IFCELECTRICDISTRIBUTIONPOINT",
2973
3201
  "IFCELECTRICDISTRIBUTIONBOARD"
@@ -2980,7 +3208,7 @@ let __tla = Promise.all([
2980
3208
  "IFCEQUIPMENTELEMENT",
2981
3209
  "IFCBUILDINGELEMENTPROXY"
2982
3210
  ]
2983
- ]), Ne = new Map([
3211
+ ]), xe = new Map([
2984
3212
  [
2985
3213
  "IFCELECTRICDISTRIBUTIONBOARD",
2986
3214
  "IFCELECTRICDISTRIBUTIONPOINT"
@@ -3073,7 +3301,7 @@ let __tla = Promise.all([
3073
3301
  "IFCBUILTELEMENT",
3074
3302
  "IFCBUILDINGELEMENTPROXY"
3075
3303
  ]
3076
- ]), Jt = new Map([]), Kt = new Map([
3304
+ ]), Zt = new Map([]), te = new Map([
3077
3305
  [
3078
3306
  "IFCFACILITY",
3079
3307
  "IFCBUILDING"
@@ -3218,7 +3446,7 @@ let __tla = Promise.all([
3218
3446
  "IFCELECTRICFLOWTREATMENTDEVICE",
3219
3447
  "IFCFLOWTREATMENTDEVICE"
3220
3448
  ]
3221
- ]), Gn = new Map([
3449
+ ]), jn = new Map([
3222
3450
  [
3223
3451
  "IFCWALL",
3224
3452
  8
@@ -3340,34 +3568,34 @@ let __tla = Promise.all([
3340
3568
  8
3341
3569
  ]
3342
3570
  ]);
3343
- function De(r, t, e) {
3571
+ function Ve(r, t, e) {
3344
3572
  if (t === e) return r;
3345
3573
  const n = r.toUpperCase();
3346
- return $n(t, e)?.get(n) ?? n;
3574
+ return kn(t, e)?.get(n) ?? n;
3347
3575
  }
3348
- function $n(r, t) {
3349
- return r === "IFC2X3" && t === "IFC4" ? Re : r === "IFC4" && t === "IFC2X3" ? Ne : r === "IFC4" && t === "IFC4X3" ? Jt : r === "IFC4X3" && t === "IFC4" ? Kt : r === "IFC5" && t === "IFC4X3" || r === "IFC4X3" && t === "IFC5" ? null : r === "IFC5" && t === "IFC4" ? Kt : r === "IFC4" && t === "IFC5" ? Jt : r === "IFC2X3" && (t === "IFC4X3" || t === "IFC5") ? Se(Re, Jt) : (r === "IFC4X3" || r === "IFC5") && t === "IFC2X3" ? Se(Kt, Ne) : null;
3576
+ function kn(r, t) {
3577
+ return r === "IFC2X3" && t === "IFC4" ? Oe : r === "IFC4" && t === "IFC2X3" ? xe : r === "IFC4" && t === "IFC4X3" ? Zt : r === "IFC4X3" && t === "IFC4" ? te : r === "IFC5" && t === "IFC4X3" || r === "IFC4X3" && t === "IFC5" ? null : r === "IFC5" && t === "IFC4" ? te : r === "IFC4" && t === "IFC5" ? Zt : r === "IFC2X3" && (t === "IFC4X3" || t === "IFC5") ? Le(Oe, Zt) : (r === "IFC4X3" || r === "IFC5") && t === "IFC2X3" ? Le(te, xe) : null;
3350
3578
  }
3351
- function Se(r, t) {
3579
+ function Le(r, t) {
3352
3580
  const e = new Map;
3353
3581
  for (const [n, s] of r)e.set(n, t.get(s) ?? s);
3354
3582
  for (const [n, s] of t)e.has(n) || e.set(n, s);
3355
3583
  return e;
3356
3584
  }
3357
- function jt(r, t, e) {
3585
+ function Xt(r, t, e) {
3358
3586
  if (t === e) return r;
3359
3587
  const n = r.match(/^(#\d+=)(\w+)\((.*)?\);?\s*$/);
3360
3588
  if (!n) return r;
3361
- const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", a = De(i, t, e);
3362
- if (Vn(a, e)) return `${s}IFCPROXY('${Yn()}',$,'${i}',$,$,$,$,.NOTDEFINED.,$);`;
3589
+ const s = n[1], i = n[2].toUpperCase(), o = n[3] ?? "", c = Ve(i, t, e);
3590
+ if (Yn(c, e)) return `${s}IFCPROXY('${qn()}',$,'${i}',$,$,$,$,.NOTDEFINED.,$);`;
3363
3591
  let l = o;
3364
3592
  if (e === "IFC2X3") {
3365
- const d = Gn.get(a);
3366
- d !== void 0 && (l = zn(o, d));
3593
+ const d = jn.get(c);
3594
+ d !== void 0 && (l = Hn(o, d));
3367
3595
  }
3368
- return `${s}${a}(${l});`;
3596
+ return `${s}${c}(${l});`;
3369
3597
  }
3370
- function Vn(r, t) {
3598
+ function Yn(r, t) {
3371
3599
  return t === "IFC4X3" || t === "IFC5" ? !1 : new Set([
3372
3600
  "IFCALIGNMENTCANT",
3373
3601
  "IFCALIGNMENTHORIZONTAL",
@@ -3375,39 +3603,39 @@ let __tla = Promise.all([
3375
3603
  "IFCALIGNMENTSEGMENT"
3376
3604
  ]).has(r);
3377
3605
  }
3378
- function zn(r, t) {
3606
+ function Hn(r, t) {
3379
3607
  if (!r.trim()) return r;
3380
3608
  const e = [];
3381
3609
  let n = 0, s = !1, i = "";
3382
3610
  for(let o = 0; o < r.length; o++){
3383
- const a = r[o];
3384
- if (a === "'" && !s) s = !0, i += a;
3385
- else if (a === "'" && s) {
3611
+ const c = r[o];
3612
+ if (c === "'" && !s) s = !0, i += c;
3613
+ else if (c === "'" && s) {
3386
3614
  if (o + 1 < r.length && r[o + 1] === "'") {
3387
3615
  i += "''", o++;
3388
3616
  continue;
3389
3617
  }
3390
- s = !1, i += a;
3391
- } else if (s) i += a;
3392
- else if (a === "(") n++, i += a;
3393
- else if (a === ")") n--, i += a;
3394
- else if (a === "," && n === 0) {
3618
+ s = !1, i += c;
3619
+ } else if (s) i += c;
3620
+ else if (c === "(") n++, i += c;
3621
+ else if (c === ")") n--, i += c;
3622
+ else if (c === "," && n === 0) {
3395
3623
  if (e.push(i), i = "", e.length >= t) return e.join(",");
3396
- } else i += a;
3624
+ } else i += c;
3397
3625
  }
3398
3626
  return e.push(i), e.length > t ? e.slice(0, t).join(",") : e.join(",");
3399
3627
  }
3400
- function ce(r, t) {
3628
+ function de(r, t) {
3401
3629
  return r !== t;
3402
3630
  }
3403
- let kn = 0;
3404
- function Yn() {
3405
- const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t = kn++;
3631
+ let Xn = 0;
3632
+ function qn() {
3633
+ const r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$", t = Xn++;
3406
3634
  let e = "PROXY_", n = t;
3407
3635
  for(let s = 0; s < 16; s++)e += r[n % 64], n = Math.floor(n / 64) + s;
3408
3636
  return e;
3409
3637
  }
3410
- function et(r) {
3638
+ function st(r) {
3411
3639
  return r.replace(/\\/g, "\\\\").replace(/'/g, "''");
3412
3640
  }
3413
3641
  function Z(r) {
@@ -3415,52 +3643,52 @@ let __tla = Promise.all([
3415
3643
  const t = r.toString();
3416
3644
  return t.includes(".") ? t : t + ".";
3417
3645
  }
3418
- function Wn(r) {
3646
+ function Qn(r) {
3419
3647
  switch(r){
3420
- case Ct.Length:
3648
+ case bt.Length:
3421
3649
  return "IFCQUANTITYLENGTH";
3422
- case Ct.Area:
3650
+ case bt.Area:
3423
3651
  return "IFCQUANTITYAREA";
3424
- case Ct.Volume:
3652
+ case bt.Volume:
3425
3653
  return "IFCQUANTITYVOLUME";
3426
- case Ct.Count:
3654
+ case bt.Count:
3427
3655
  return "IFCQUANTITYCOUNT";
3428
- case Ct.Weight:
3656
+ case bt.Weight:
3429
3657
  return "IFCQUANTITYWEIGHT";
3430
- case Ct.Time:
3658
+ case bt.Time:
3431
3659
  return "IFCQUANTITYTIME";
3432
3660
  default:
3433
3661
  return "IFCQUANTITYCOUNT";
3434
3662
  }
3435
3663
  }
3436
- function ve(r, t) {
3664
+ function ze(r, t) {
3437
3665
  if (r == null) return "$";
3438
3666
  switch(t){
3439
- case tt.String:
3440
- case tt.Label:
3441
- case tt.Text:
3442
- return `IFCLABEL('${et(String(r))}')`;
3443
- case tt.Identifier:
3444
- return `IFCIDENTIFIER('${et(String(r))}')`;
3445
- case tt.Real:
3667
+ case et.String:
3668
+ case et.Label:
3669
+ case et.Text:
3670
+ return `IFCLABEL('${st(String(r))}')`;
3671
+ case et.Identifier:
3672
+ return `IFCIDENTIFIER('${st(String(r))}')`;
3673
+ case et.Real:
3446
3674
  {
3447
3675
  const e = Number(r);
3448
3676
  return Number.isFinite(e) ? `IFCREAL(${e.toString().includes(".") ? e : e + "."})` : "$";
3449
3677
  }
3450
- case tt.Integer:
3678
+ case et.Integer:
3451
3679
  return `IFCINTEGER(${Math.round(Number(r))})`;
3452
- case tt.Boolean:
3453
- case tt.Logical:
3680
+ case et.Boolean:
3681
+ case et.Logical:
3454
3682
  return r === !0 ? "IFCBOOLEAN(.T.)" : r === !1 ? "IFCBOOLEAN(.F.)" : "IFCLOGICAL(.U.)";
3455
- case tt.Enum:
3683
+ case et.Enum:
3456
3684
  return `.${String(r).toUpperCase()}.`;
3457
- case tt.List:
3458
- return Array.isArray(r) ? `(${r.map((n)=>ve(n, tt.String)).join(",")})` : "$";
3685
+ case et.List:
3686
+ return Array.isArray(r) ? `(${r.map((n)=>ze(n, et.String)).join(",")})` : "$";
3459
3687
  default:
3460
- return `IFCLABEL('${et(String(r))}')`;
3688
+ return `IFCLABEL('${st(String(r))}')`;
3461
3689
  }
3462
3690
  }
3463
- function jn(r, t) {
3691
+ function Jn(r, t) {
3464
3692
  const e = r.trim(), n = t.trim();
3465
3693
  if (r === "") return "$";
3466
3694
  if (e === "$" || e === "*" || /^#\d+$/.test(e)) return e;
@@ -3473,20 +3701,20 @@ let __tla = Promise.all([
3473
3701
  const s = Number(e);
3474
3702
  return Number.isFinite(s) ? n.includes(".") || /E/i.test(n) ? Z(s) : String(s) : "$";
3475
3703
  }
3476
- return Me(r);
3704
+ return Ue(r);
3477
3705
  }
3478
- function le(r) {
3706
+ function fe(r) {
3479
3707
  if (r == null) return "$";
3480
3708
  if (typeof r == "boolean") return r ? ".T." : ".F.";
3481
3709
  if (typeof r == "number") return Number.isFinite(r) ? Number.isInteger(r) ? String(r) : Z(r) : "$";
3482
- if (Array.isArray(r)) return `(${r.map(le).join(",")})`;
3710
+ if (Array.isArray(r)) return `(${r.map(fe).join(",")})`;
3483
3711
  const t = String(r).trim();
3484
- return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${et(String(r))}'`;
3712
+ return t === "$" || t === "*" || /^#\d+$/.test(t) ? t : /^\.[A-Z0-9_]+\.$/i.test(t) ? t.toUpperCase() : `'${st(String(r))}'`;
3485
3713
  }
3486
- function Hn(r) {
3487
- return r.map(le).join(",");
3714
+ function Kn(r) {
3715
+ return r.map(fe).join(",");
3488
3716
  }
3489
- function Ae(r) {
3717
+ function Me(r) {
3490
3718
  const t = [];
3491
3719
  let e = "", n = 0, s = !1;
3492
3720
  for(let i = 0; i < r.length; i++){
@@ -3511,7 +3739,7 @@ let __tla = Promise.all([
3511
3739
  }
3512
3740
  return e.trim() && t.push(e.trim()), t;
3513
3741
  }
3514
- function Xn(r) {
3742
+ function Zn(r) {
3515
3743
  const t = [];
3516
3744
  let e = "", n = 0, s = !1;
3517
3745
  for(let i = 0; i < r.length; i++){
@@ -3536,7 +3764,7 @@ let __tla = Promise.all([
3536
3764
  }
3537
3765
  return t.push(e), t;
3538
3766
  }
3539
- qn = class {
3767
+ ts = class {
3540
3768
  dataStore;
3541
3769
  mutationView;
3542
3770
  nextExpressId;
@@ -3544,192 +3772,192 @@ let __tla = Promise.all([
3544
3772
  constructor(t, e){
3545
3773
  this.dataStore = t, this.mutationView = e || null;
3546
3774
  const n = this.findMaxExpressId(), s = typeof e?.peekNextExpressId == "function" ? e.peekNextExpressId() - 1 : 0;
3547
- this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new ke(t.source) : null;
3775
+ this.nextExpressId = Math.max(n, s) + 1, this.entityExtractor = t.source ? new He(t.source) : null;
3548
3776
  }
3549
3777
  export(t) {
3550
3778
  const e = [];
3551
3779
  let n = 0, s = 0;
3552
- const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", a = ce(o, i);
3780
+ const i = t.schema || this.dataStore.schemaVersion || "IFC4", o = this.dataStore.schemaVersion || "IFC4", c = de(o, i);
3553
3781
  if (i === "IFC2X3" && t.applyMutations !== !1 && t.georefMutations && (Object.keys(t.georefMutations.projectedCRS ?? {}).length > 0 || Object.keys(t.georefMutations.mapConversion ?? {}).length > 0)) throw new Error("Georeferencing creation and editing requires IFC4 or newer. IFC2X3 does not support IfcProjectedCRS or IfcMapConversion.");
3554
- const l = ee({
3782
+ const l = se({
3555
3783
  schema: i,
3556
3784
  description: t.description || "Exported from ifc-lite",
3557
3785
  author: t.author || "",
3558
3786
  organization: t.organization || "",
3559
3787
  application: t.application || "ifc-lite",
3560
3788
  filename: t.filename || "export.ifc"
3561
- }), d = new Set, u = new Map, f = new Map, p = [], _ = [], h = new Map, y = new Map, m = new Set, b = new Map, w = new Set, v = new Set;
3789
+ }), d = new Set, u = new Map, f = new Map, p = [], g = [], h = new Map, y = new Map, E = new Set, C = new Map, T = new Set, $ = new Set;
3562
3790
  if (this.mutationView && t.applyMutations !== !1) {
3563
- const C = this.mutationView.getMutations(), N = new Map, F = new Map;
3564
- for (const g of C){
3565
- if (g.type === "UPDATE_ATTRIBUTE" && g.attributeName) {
3566
- d.add(g.entityId), f.has(g.entityId) || f.set(g.entityId, new Map), f.get(g.entityId).set(g.attributeName, g.newValue == null ? "" : String(g.newValue));
3791
+ const b = this.mutationView.getMutations(), S = new Map, F = new Map;
3792
+ for (const _ of b){
3793
+ if (_.type === "UPDATE_ATTRIBUTE" && _.attributeName) {
3794
+ d.add(_.entityId), f.has(_.entityId) || f.set(_.entityId, new Map), f.get(_.entityId).set(_.attributeName, _.newValue == null ? "" : String(_.newValue));
3567
3795
  continue;
3568
3796
  }
3569
- if (!g.psetName) continue;
3570
- const I = g.type === "CREATE_QUANTITY" || g.type === "UPDATE_QUANTITY" || g.type === "DELETE_QUANTITY" ? F : N;
3571
- I.has(g.entityId) || I.set(g.entityId, new Set), I.get(g.entityId).add(g.psetName);
3797
+ if (!_.psetName) continue;
3798
+ const I = _.type === "CREATE_QUANTITY" || _.type === "UPDATE_QUANTITY" || _.type === "DELETE_QUANTITY" ? F : S;
3799
+ I.has(_.entityId) || I.set(_.entityId, new Set), I.get(_.entityId).add(_.psetName);
3572
3800
  }
3573
- const E = this.buildRelDefinesByPropertiesIndex();
3574
- for (const [g, T] of N){
3575
- d.add(g), u.set(g, T), s++;
3576
- const R = this.mutationView.getForEntity(g).filter((z)=>T.has(z.name)), S = new Set;
3801
+ const m = this.buildRelDefinesByPropertiesIndex();
3802
+ for (const [_, w] of S){
3803
+ d.add(_), u.set(_, w), s++;
3804
+ const R = this.mutationView.getForEntity(_).filter((z)=>w.has(z.name)), N = new Set;
3577
3805
  R.length > 0 && p.push({
3578
- entityId: g,
3806
+ entityId: _,
3579
3807
  psets: R
3580
3808
  });
3581
- const G = E.get(g);
3582
- if (G) for (const { relId: z, psetId: k } of G){
3583
- const H = this.getPropertySetName(k);
3584
- if (H && S.add(H), H && T.has(H)) {
3585
- v.add(z), w.add(k);
3586
- const Y = this.getPropertyIdsInSet(k);
3587
- for (const Q of Y)w.add(Q);
3809
+ const V = m.get(_);
3810
+ if (V) for (const { relId: z, psetId: W } of V){
3811
+ const H = this.getPropertySetName(W);
3812
+ if (H && N.add(H), H && w.has(H)) {
3813
+ $.add(z), T.add(W);
3814
+ const j = this.getPropertyIdsInSet(W);
3815
+ for (const Q of j)T.add(Q);
3588
3816
  }
3589
3817
  }
3590
- if (this.isTypeEntity(g)) {
3591
- const z = this.getTypeOwnedHasPropertySetIds(g), k = new Set;
3818
+ if (this.isTypeEntity(_)) {
3819
+ const z = this.getTypeOwnedHasPropertySetIds(_), W = new Set;
3592
3820
  for (const H of z){
3593
- const Y = this.getPropertySetName(H);
3594
- if (!Y || !T.has(Y)) continue;
3595
- k.add(Y), w.add(H);
3821
+ const j = this.getPropertySetName(H);
3822
+ if (!j || !w.has(j)) continue;
3823
+ W.add(j), T.add(H);
3596
3824
  const Q = this.getPropertyIdsInSet(H);
3597
- for (const K of Q)w.add(K);
3825
+ for (const K of Q)T.add(K);
3598
3826
  }
3599
- for (const H of T)S.has(H) || k.add(H);
3600
- k.size > 0 && (h.set(g, k), y.set(g, z), m.add(g));
3827
+ for (const H of w)N.has(H) || W.add(H);
3828
+ W.size > 0 && (h.set(_, W), y.set(_, z), E.add(_));
3601
3829
  }
3602
3830
  }
3603
3831
  t.includeQuantities === !1 && F.clear();
3604
- for (const [g, T] of F){
3605
- d.add(g), u.has(g) || s++;
3606
- const R = this.mutationView.getQuantitiesForEntity(g).filter((G)=>T.has(G.name));
3607
- R.length > 0 && _.push({
3608
- entityId: g,
3832
+ for (const [_, w] of F){
3833
+ d.add(_), u.has(_) || s++;
3834
+ const R = this.mutationView.getQuantitiesForEntity(_).filter((V)=>w.has(V.name));
3835
+ R.length > 0 && g.push({
3836
+ entityId: _,
3609
3837
  qsets: R
3610
3838
  });
3611
- const S = E.get(g);
3612
- if (S) for (const { relId: G, psetId: z } of S){
3613
- const k = this.getElementQuantityName(z);
3614
- if (k && T.has(k)) {
3615
- v.add(G), w.add(z);
3839
+ const N = m.get(_);
3840
+ if (N) for (const { relId: V, psetId: z } of N){
3841
+ const W = this.getElementQuantityName(z);
3842
+ if (W && w.has(W)) {
3843
+ $.add(V), T.add(z);
3616
3844
  const H = this.getPropertyIdsInSet(z);
3617
- for (const Y of H)w.add(Y);
3845
+ for (const j of H)T.add(j);
3618
3846
  }
3619
3847
  }
3620
3848
  }
3621
- for (const [g] of f)!N.has(g) && !F.has(g) && s++;
3849
+ for (const [_] of f)!S.has(_) && !F.has(_) && s++;
3622
3850
  }
3623
- const L = [];
3851
+ const x = [];
3624
3852
  if (t.applyMutations !== !1 && t.georefMutations) {
3625
- const C = t.georefMutations, N = this.dataStore.entityIndex.byType.get("IFCPROJECTEDCRS"), F = this.dataStore.entityIndex.byType.get("IFCMAPCONVERSION");
3626
- if (C.projectedCRS && N?.length) {
3627
- const E = N[0];
3628
- f.has(E) || f.set(E, new Map);
3629
- const g = f.get(E), T = C.projectedCRS;
3853
+ const b = t.georefMutations, S = this.dataStore.entityIndex.byType.get("IFCPROJECTEDCRS"), F = this.dataStore.entityIndex.byType.get("IFCMAPCONVERSION");
3854
+ if (b.projectedCRS && S?.length) {
3855
+ const m = S[0];
3856
+ f.has(m) || f.set(m, new Map);
3857
+ const _ = f.get(m), w = b.projectedCRS;
3630
3858
  let I = !1;
3631
- if (T.name !== void 0 && (g.set("Name", String(T.name)), I = !0), T.description !== void 0 && (g.set("Description", String(T.description)), I = !0), T.geodeticDatum !== void 0 && (g.set("GeodeticDatum", String(T.geodeticDatum)), I = !0), T.verticalDatum !== void 0 && (g.set("VerticalDatum", String(T.verticalDatum)), I = !0), T.mapProjection !== void 0 && (g.set("MapProjection", String(T.mapProjection)), I = !0), T.mapZone !== void 0 && (g.set("MapZone", String(T.mapZone)), I = !0), T.mapUnit !== void 0) {
3632
- const R = this.resolveMapUnitReference(String(T.mapUnit), L);
3633
- g.set("MapUnit", `#${R}`), I = !0;
3859
+ if (w.name !== void 0 && (_.set("Name", String(w.name)), I = !0), w.description !== void 0 && (_.set("Description", String(w.description)), I = !0), w.geodeticDatum !== void 0 && (_.set("GeodeticDatum", String(w.geodeticDatum)), I = !0), w.verticalDatum !== void 0 && (_.set("VerticalDatum", String(w.verticalDatum)), I = !0), w.mapProjection !== void 0 && (_.set("MapProjection", String(w.mapProjection)), I = !0), w.mapZone !== void 0 && (_.set("MapZone", String(w.mapZone)), I = !0), w.mapUnit !== void 0) {
3860
+ const R = this.resolveMapUnitReference(String(w.mapUnit), x);
3861
+ _.set("MapUnit", `#${R}`), I = !0;
3634
3862
  }
3635
- I && !d.has(E) && (d.add(E), s++);
3863
+ I && !d.has(m) && (d.add(m), s++);
3636
3864
  }
3637
- if (C.mapConversion && F?.length) {
3638
- const E = F[0];
3639
- f.has(E) || f.set(E, new Map);
3640
- const g = f.get(E), T = C.mapConversion;
3865
+ if (b.mapConversion && F?.length) {
3866
+ const m = F[0];
3867
+ f.has(m) || f.set(m, new Map);
3868
+ const _ = f.get(m), w = b.mapConversion;
3641
3869
  let I = !1;
3642
- T.eastings !== void 0 && (g.set("Eastings", String(T.eastings)), I = !0), T.northings !== void 0 && (g.set("Northings", String(T.northings)), I = !0), T.orthogonalHeight !== void 0 && (g.set("OrthogonalHeight", String(T.orthogonalHeight)), I = !0), T.xAxisAbscissa !== void 0 && (g.set("XAxisAbscissa", String(T.xAxisAbscissa)), I = !0), T.xAxisOrdinate !== void 0 && (g.set("XAxisOrdinate", String(T.xAxisOrdinate)), I = !0), T.scale !== void 0 && (g.set("Scale", String(T.scale)), I = !0), I && !d.has(E) && (d.add(E), s++);
3870
+ w.eastings !== void 0 && (_.set("Eastings", String(w.eastings)), I = !0), w.northings !== void 0 && (_.set("Northings", String(w.northings)), I = !0), w.orthogonalHeight !== void 0 && (_.set("OrthogonalHeight", String(w.orthogonalHeight)), I = !0), w.xAxisAbscissa !== void 0 && (_.set("XAxisAbscissa", String(w.xAxisAbscissa)), I = !0), w.xAxisOrdinate !== void 0 && (_.set("XAxisOrdinate", String(w.xAxisOrdinate)), I = !0), w.scale !== void 0 && (_.set("Scale", String(w.scale)), I = !0), I && !d.has(m) && (d.add(m), s++);
3643
3871
  }
3644
- if (C.projectedCRS && !N?.length) {
3645
- const E = C.projectedCRS, g = this.nextExpressId++, T = E.name ? `'${et(String(E.name))}'` : "$", I = E.description ? `'${et(String(E.description))}'` : "$", R = E.geodeticDatum ? `'${et(String(E.geodeticDatum))}'` : "$", S = E.verticalDatum ? `'${et(String(E.verticalDatum))}'` : "$", G = E.mapProjection ? `'${et(String(E.mapProjection))}'` : "$", z = E.mapZone ? `'${et(String(E.mapZone))}'` : "$", k = E.mapUnit ? `#${this.resolveMapUnitReference(String(E.mapUnit), L)}` : "$";
3646
- L.push(`#${g}=IFCPROJECTEDCRS(${T},${I},${R},${S},${G},${z},${k});`), n++;
3872
+ if (b.projectedCRS && !S?.length) {
3873
+ const m = b.projectedCRS, _ = this.nextExpressId++, w = m.name ? `'${st(String(m.name))}'` : "$", I = m.description ? `'${st(String(m.description))}'` : "$", R = m.geodeticDatum ? `'${st(String(m.geodeticDatum))}'` : "$", N = m.verticalDatum ? `'${st(String(m.verticalDatum))}'` : "$", V = m.mapProjection ? `'${st(String(m.mapProjection))}'` : "$", z = m.mapZone ? `'${st(String(m.mapZone))}'` : "$", W = m.mapUnit ? `#${this.resolveMapUnitReference(String(m.mapUnit), x)}` : "$";
3874
+ x.push(`#${_}=IFCPROJECTEDCRS(${w},${I},${R},${N},${V},${z},${W});`), n++;
3647
3875
  const H = this.findPreferredGeometricRepresentationContextId();
3648
3876
  if (H) {
3649
- const Y = C.mapConversion || {}, Q = this.nextExpressId++, K = Z(Number(Y.eastings) || 0), at = Z(Number(Y.northings) || 0), ht = Z(Number(Y.orthogonalHeight) || 0), it = Y.xAxisAbscissa !== void 0 ? Z(Number(Y.xAxisAbscissa)) : "$", lt = Y.xAxisOrdinate !== void 0 ? Z(Number(Y.xAxisOrdinate)) : "$", ct = Y.scale !== void 0 ? Z(Number(Y.scale)) : "$";
3650
- L.push(`#${Q}=IFCMAPCONVERSION(#${H},#${g},${K},${at},${ht},${it},${lt},${ct});`), n++;
3877
+ const j = b.mapConversion || {}, Q = this.nextExpressId++, K = Z(Number(j.eastings) || 0), at = Z(Number(j.northings) || 0), ht = Z(Number(j.orthogonalHeight) || 0), rt = j.xAxisAbscissa !== void 0 ? Z(Number(j.xAxisAbscissa)) : "$", dt = j.xAxisOrdinate !== void 0 ? Z(Number(j.xAxisOrdinate)) : "$", lt = j.scale !== void 0 ? Z(Number(j.scale)) : "$";
3878
+ x.push(`#${Q}=IFCMAPCONVERSION(#${H},#${_},${K},${at},${ht},${rt},${dt},${lt});`), n++;
3651
3879
  } else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
3652
- } else if (C.mapConversion && !F?.length && N?.length) {
3653
- const E = this.findPreferredGeometricRepresentationContextId();
3654
- if (E) {
3655
- const g = C.mapConversion, T = this.nextExpressId++, I = Z(Number(g.eastings) || 0), R = Z(Number(g.northings) || 0), S = Z(Number(g.orthogonalHeight) || 0), G = g.xAxisAbscissa !== void 0 ? Z(Number(g.xAxisAbscissa)) : "$", z = g.xAxisOrdinate !== void 0 ? Z(Number(g.xAxisOrdinate)) : "$", k = g.scale !== void 0 ? Z(Number(g.scale)) : "$";
3656
- L.push(`#${T}=IFCMAPCONVERSION(#${E},#${N[0]},${I},${R},${S},${G},${z},${k});`), n++;
3880
+ } else if (b.mapConversion && !F?.length && S?.length) {
3881
+ const m = this.findPreferredGeometricRepresentationContextId();
3882
+ if (m) {
3883
+ const _ = b.mapConversion, w = this.nextExpressId++, I = Z(Number(_.eastings) || 0), R = Z(Number(_.northings) || 0), N = Z(Number(_.orthogonalHeight) || 0), V = _.xAxisAbscissa !== void 0 ? Z(Number(_.xAxisAbscissa)) : "$", z = _.xAxisOrdinate !== void 0 ? Z(Number(_.xAxisOrdinate)) : "$", W = _.scale !== void 0 ? Z(Number(_.scale)) : "$";
3884
+ x.push(`#${w}=IFCMAPCONVERSION(#${m},#${S[0]},${I},${R},${N},${V},${z},${W});`), n++;
3657
3885
  } else console.warn("[StepExporter] Cannot create IfcMapConversion: no IfcGeometricRepresentationContext found in source file");
3658
3886
  }
3659
3887
  }
3660
- const j = this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function" ? this.mutationView.getNewEntities().length : 0;
3661
- if (t.deltaOnly && d.size === 0 && j === 0 && L.length === 0) {
3662
- const C = new TextEncoder().encode(l + `DATA;
3888
+ const Y = this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function" ? this.mutationView.getNewEntities().length : 0;
3889
+ if (t.deltaOnly && d.size === 0 && Y === 0 && x.length === 0) {
3890
+ const b = new TextEncoder().encode(l + `DATA;
3663
3891
  ENDSEC;
3664
3892
  END-ISO-10303-21;
3665
3893
  `);
3666
3894
  return {
3667
- content: C,
3895
+ content: b,
3668
3896
  stats: {
3669
3897
  entityCount: 0,
3670
3898
  newEntityCount: 0,
3671
3899
  modifiedEntityCount: 0,
3672
- fileSize: C.byteLength
3900
+ fileSize: b.byteLength
3673
3901
  }
3674
3902
  };
3675
3903
  }
3676
3904
  let O = null;
3677
3905
  if (t.visibleOnly && this.dataStore.source) {
3678
- const { roots: C, hiddenProductIds: N } = oe(this.dataStore, t.hiddenEntityIds ?? new Set, t.isolatedEntityIds ?? null);
3679
- O = re(C, this.dataStore.source, this.dataStore.entityIndex.byId, N), ae(O, this.dataStore.source, this.dataStore.entityIndex);
3906
+ const { roots: b, hiddenProductIds: S } = ce(this.dataStore, t.hiddenEntityIds ?? new Set, t.isolatedEntityIds ?? null);
3907
+ O = ae(b, this.dataStore.source, this.dataStore.entityIndex.byId, S), le(O, this.dataStore.source, this.dataStore.entityIndex);
3680
3908
  }
3681
3909
  if (!t.deltaOnly && this.dataStore.source) {
3682
- const C = this.dataStore.source, N = !!this.mutationView && t.applyMutations !== !1;
3683
- for (const [F, E] of this.dataStore.entityIndex.byId){
3684
- if (N && typeof this.mutationView.isDeleted == "function" && this.mutationView.isDeleted(F) || E.byteLength === 0 || E.byteOffset < 0 || O !== null && !O.has(F) || w.has(F) || v.has(F) || m.has(F)) continue;
3685
- const g = E.type.toUpperCase();
3686
- if (t.includeGeometry === !1 && this.isGeometryEntity(g)) continue;
3687
- const T = nt(C, E.byteOffset, E.byteOffset + E.byteLength);
3688
- let I = f.has(F) ? this.applyAttributeMutations(T, g, f.get(F)) : T;
3689
- const R = N && typeof this.mutationView.getPositionalMutationsForEntity == "function" ? this.mutationView.getPositionalMutationsForEntity(F) : null;
3690
- if (R && R.size > 0 && (I = this.applyPositionalMutations(I, R), d.has(F) || (d.add(F), s++)), a) {
3691
- const S = jt(I, o, i);
3692
- S !== null && e.push(S);
3910
+ const b = this.dataStore.source, S = !!this.mutationView && t.applyMutations !== !1;
3911
+ for (const [F, m] of this.dataStore.entityIndex.byId){
3912
+ if (S && typeof this.mutationView.isDeleted == "function" && this.mutationView.isDeleted(F) || m.byteLength === 0 || m.byteOffset < 0 || O !== null && !O.has(F) || T.has(F) || $.has(F) || E.has(F)) continue;
3913
+ const _ = m.type.toUpperCase();
3914
+ if (t.includeGeometry === !1 && this.isGeometryEntity(_)) continue;
3915
+ const w = nt(b, m.byteOffset, m.byteOffset + m.byteLength);
3916
+ let I = f.has(F) ? this.applyAttributeMutations(w, _, f.get(F)) : w;
3917
+ const R = S && typeof this.mutationView.getPositionalMutationsForEntity == "function" ? this.mutationView.getPositionalMutationsForEntity(F) : null;
3918
+ if (R && R.size > 0 && (I = this.applyPositionalMutations(I, R), d.has(F) || (d.add(F), s++)), c) {
3919
+ const N = Xt(I, o, i);
3920
+ N !== null && e.push(N);
3693
3921
  } else e.push(I);
3694
3922
  }
3695
3923
  }
3696
- for (const { entityId: C, psets: N } of p){
3697
- const F = this.generatePropertySetEntities(C, N, h.get(C));
3924
+ for (const { entityId: b, psets: S } of p){
3925
+ const F = this.generatePropertySetEntities(b, S, h.get(b));
3698
3926
  e.push(...F.lines), n += F.count;
3699
- const E = h.get(C);
3700
- if (E && E.size > 0) {
3701
- const g = this.rewriteTypeEntityHasPropertySets(C, y.get(C) ?? [], E, F.generatedTypeOwnedPsetIds);
3702
- g && b.set(C, g);
3927
+ const m = h.get(b);
3928
+ if (m && m.size > 0) {
3929
+ const _ = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], m, F.generatedTypeOwnedPsetIds);
3930
+ _ && C.set(b, _);
3703
3931
  }
3704
3932
  }
3705
- for (const [C, N] of h){
3706
- if (b.has(C)) continue;
3707
- const F = this.rewriteTypeEntityHasPropertySets(C, y.get(C) ?? [], N, new Map);
3708
- F && b.set(C, F);
3933
+ for (const [b, S] of h){
3934
+ if (C.has(b)) continue;
3935
+ const F = this.rewriteTypeEntityHasPropertySets(b, y.get(b) ?? [], S, new Map);
3936
+ F && C.set(b, F);
3709
3937
  }
3710
- for (const { entityId: C, qsets: N } of _){
3711
- const F = this.generateQuantitySetEntities(C, N);
3938
+ for (const { entityId: b, qsets: S } of g){
3939
+ const F = this.generateQuantitySetEntities(b, S);
3712
3940
  e.push(...F.lines), n += F.count;
3713
3941
  }
3714
- for (const C of b.values())e.push(C);
3715
- for (const C of L)e.push(C);
3716
- if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const C of this.mutationView.getNewEntities()){
3717
- const N = C.type.toUpperCase();
3718
- if (t.includeGeometry === !1 && this.isGeometryEntity(N) || O !== null && !O.has(C.expressId)) continue;
3719
- const F = `#${C.expressId}=${N}(${Hn(C.attributes)});`;
3720
- if (a) {
3721
- const E = jt(F, o, i);
3722
- E !== null && (e.push(E), n++);
3942
+ for (const b of C.values())e.push(b);
3943
+ for (const b of x)e.push(b);
3944
+ if (this.mutationView && t.applyMutations !== !1 && typeof this.mutationView.getNewEntities == "function") for (const b of this.mutationView.getNewEntities()){
3945
+ const S = b.type.toUpperCase();
3946
+ if (t.includeGeometry === !1 && this.isGeometryEntity(S) || O !== null && !O.has(b.expressId)) continue;
3947
+ const F = `#${b.expressId}=${S}(${Kn(b.attributes)});`;
3948
+ if (c) {
3949
+ const m = Xt(F, o, i);
3950
+ m !== null && (e.push(m), n++);
3723
3951
  } else e.push(F), n++;
3724
3952
  }
3725
- const U = Qn(l, e);
3953
+ const v = es(l, e);
3726
3954
  return {
3727
- content: U,
3955
+ content: v,
3728
3956
  stats: {
3729
3957
  entityCount: e.length,
3730
3958
  newEntityCount: n,
3731
3959
  modifiedEntityCount: s,
3732
- fileSize: U.byteLength
3960
+ fileSize: v.byteLength
3733
3961
  }
3734
3962
  };
3735
3963
  }
@@ -3765,22 +3993,22 @@ END-ISO-10303-21;
3765
3993
  const s = [];
3766
3994
  let i = 0;
3767
3995
  const o = new Map;
3768
- for (const a of e){
3996
+ for (const c of e){
3769
3997
  const l = [];
3770
- for (const _ of a.properties){
3998
+ for (const g of c.properties){
3771
3999
  const h = this.nextExpressId++;
3772
4000
  i++;
3773
- const y = ve(_.value, _.type), m = _.unit ? this.findUnitId(_.unit) : null, b = m !== null ? je(m) : null, w = `#${h}=IFCPROPERTYSINGLEVALUE('${et(_.name)}',$,${y},${b ? Me(b) : "$"});`;
3774
- s.push(w), l.push(h);
4001
+ const y = ze(g.value, g.type), E = g.unit ? this.findUnitId(g.unit) : null, C = E !== null ? Qe(E) : null, T = `#${h}=IFCPROPERTYSINGLEVALUE('${st(g.name)}',$,${y},${C ? Ue(C) : "$"});`;
4002
+ s.push(T), l.push(h);
3775
4003
  }
3776
4004
  const d = this.nextExpressId++;
3777
4005
  i++;
3778
- const u = l.map((_)=>`#${_}`).join(","), f = this.generateGlobalId(), p = `#${d}=IFCPROPERTYSET('${f}',$,'${et(a.name)}',$,(${u}));`;
3779
- if (s.push(p), n?.has(a.name)) o.set(a.name, d);
4006
+ const u = l.map((g)=>`#${g}`).join(","), f = this.generateGlobalId(), p = `#${d}=IFCPROPERTYSET('${f}',$,'${st(c.name)}',$,(${u}));`;
4007
+ if (s.push(p), n?.has(c.name)) o.set(c.name, d);
3780
4008
  else {
3781
- const _ = this.nextExpressId++;
4009
+ const g = this.nextExpressId++;
3782
4010
  i++;
3783
- const h = this.generateGlobalId(), y = `#${_}=IFCRELDEFINESBYPROPERTIES('${h}',$,$,$,(#${t}),#${d});`;
4011
+ const h = this.generateGlobalId(), y = `#${g}=IFCRELDEFINESBYPROPERTIES('${h}',$,$,$,(#${t}),#${d});`;
3784
4012
  s.push(y);
3785
4013
  }
3786
4014
  }
@@ -3798,17 +4026,17 @@ END-ISO-10303-21;
3798
4026
  for (const h of i.quantities){
3799
4027
  const y = this.nextExpressId++;
3800
4028
  s++;
3801
- const m = Wn(h.type), b = Z(h.value), w = `#${y}=${m}('${et(h.name)}',$,$,${b},$);`;
3802
- n.push(w), o.push(y);
4029
+ const E = Qn(h.type), C = Z(h.value), T = `#${y}=${E}('${st(h.name)}',$,$,${C},$);`;
4030
+ n.push(T), o.push(y);
3803
4031
  }
3804
- const a = this.nextExpressId++;
4032
+ const c = this.nextExpressId++;
3805
4033
  s++;
3806
- const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), u = `#${a}=IFCELEMENTQUANTITY('${d}',$,'${et(i.name)}',$,$,(${l}));`;
4034
+ const l = o.map((h)=>`#${h}`).join(","), d = this.generateGlobalId(), u = `#${c}=IFCELEMENTQUANTITY('${d}',$,'${st(i.name)}',$,$,(${l}));`;
3807
4035
  n.push(u);
3808
4036
  const f = this.nextExpressId++;
3809
4037
  s++;
3810
- const p = this.generateGlobalId(), _ = `#${f}=IFCRELDEFINESBYPROPERTIES('${p}',$,$,$,(#${t}),#${a});`;
3811
- n.push(_);
4038
+ const p = this.generateGlobalId(), g = `#${f}=IFCRELDEFINESBYPROPERTIES('${p}',$,$,$,(#${t}),#${c});`;
4039
+ n.push(g);
3812
4040
  }
3813
4041
  return {
3814
4042
  lines: n,
@@ -3818,22 +4046,22 @@ END-ISO-10303-21;
3818
4046
  applyAttributeMutations(t, e, n) {
3819
4047
  const s = t.indexOf("("), i = t.lastIndexOf(");");
3820
4048
  if (s < 0 || i < s) return t;
3821
- const o = Ye(e);
4049
+ const o = Xe(e);
3822
4050
  if (o.length === 0) return t;
3823
- const a = Ae(t.slice(s + 1, i));
4051
+ const c = Me(t.slice(s + 1, i));
3824
4052
  let l = !1;
3825
4053
  for (const [d, u] of n){
3826
4054
  const f = o.indexOf(d);
3827
- f < 0 || f >= a.length || (a[f] = jn(u, a[f]), l = !0);
4055
+ f < 0 || f >= c.length || (c[f] = Jn(u, c[f]), l = !0);
3828
4056
  }
3829
- return l ? `${t.slice(0, s + 1)}${a.join(",")}${t.slice(i)}` : t;
4057
+ return l ? `${t.slice(0, s + 1)}${c.join(",")}${t.slice(i)}` : t;
3830
4058
  }
3831
4059
  applyPositionalMutations(t, e) {
3832
4060
  const n = t.indexOf("("), s = t.lastIndexOf(");");
3833
4061
  if (n < 0 || s < n) return t;
3834
- const i = Ae(t.slice(n + 1, s));
4062
+ const i = Me(t.slice(n + 1, s));
3835
4063
  let o = !1;
3836
- for (const [a, l] of e)a < 0 || a >= i.length || (i[a] = le(l), o = !0);
4064
+ for (const [c, l] of e)c < 0 || c >= i.length || (i[c] = fe(l), o = !0);
3837
4065
  return o ? `${t.slice(0, n + 1)}${i.join(",")}${t.slice(s)}` : t;
3838
4066
  }
3839
4067
  resolveMapUnitReference(t, e) {
@@ -3844,8 +4072,8 @@ END-ISO-10303-21;
3844
4072
  return e.push(`#${o}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), o;
3845
4073
  }
3846
4074
  if (n === "FOOT" || n === "US SURVEY FOOT") {
3847
- const o = this.nextExpressId++, a = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++, u = n === "US SURVEY FOOT" ? 1200 / 3937 : .3048, f = n === "US SURVEY FOOT" ? "US SURVEY FOOT" : "FOOT";
3848
- return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${a}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${Z(u)}),#${a});`), e.push(`#${d}=IFCCONVERSIONBASEDUNIT(#${o},.LENGTHUNIT.,'${f}',#${l});`), d;
4075
+ const o = this.nextExpressId++, c = this.nextExpressId++, l = this.nextExpressId++, d = this.nextExpressId++, u = n === "US SURVEY FOOT" ? 1200 / 3937 : .3048, f = n === "US SURVEY FOOT" ? "US SURVEY FOOT" : "FOOT";
4076
+ return e.push(`#${o}=IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0);`), e.push(`#${c}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), e.push(`#${l}=IFCMEASUREWITHUNIT(IFCLENGTHMEASURE(${Z(u)}),#${c});`), e.push(`#${d}=IFCCONVERSIONBASEDUNIT(#${o},.LENGTHUNIT.,'${f}',#${l});`), d;
3849
4077
  }
3850
4078
  const i = this.nextExpressId++;
3851
4079
  return e.push(`#${i}=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);`), i;
@@ -3864,13 +4092,13 @@ END-ISO-10303-21;
3864
4092
  if (typeof d != "number") continue;
3865
4093
  const u = this.dataStore.entityIndex.byId.get(d), f = u ? this.entityExtractor.extractEntity(u) : null;
3866
4094
  if (!f) continue;
3867
- const p = f.type.toUpperCase(), _ = f.attributes ?? [];
3868
- if ((typeof _[1] == "string" ? _[1].replace(/\./g, "").toUpperCase() : "") === "LENGTHUNIT") {
4095
+ const p = f.type.toUpperCase(), g = f.attributes ?? [];
4096
+ if ((typeof g[1] == "string" ? g[1].replace(/\./g, "").toUpperCase() : "") === "LENGTHUNIT") {
3869
4097
  if (p === "IFCSIUNIT") {
3870
- const y = typeof _[2] == "string" ? _[2].replace(/\./g, "").toUpperCase() : "", m = typeof _[3] == "string" ? _[3].replace(/\./g, "").toUpperCase() : "", b = y ? `${y}${m}` : m;
3871
- if (t === "METRE" && (b === "METRE" || b === "METER")) return d;
4098
+ const y = typeof g[2] == "string" ? g[2].replace(/\./g, "").toUpperCase() : "", E = typeof g[3] == "string" ? g[3].replace(/\./g, "").toUpperCase() : "", C = y ? `${y}${E}` : E;
4099
+ if (t === "METRE" && (C === "METRE" || C === "METER")) return d;
3872
4100
  }
3873
- if (p === "IFCCONVERSIONBASEDUNIT" && (typeof _[2] == "string" ? this.normalizeMapUnitName(_[2]) : "") === t) return d;
4101
+ if (p === "IFCCONVERSIONBASEDUNIT" && (typeof g[2] == "string" ? this.normalizeMapUnitName(g[2]) : "") === t) return d;
3874
4102
  }
3875
4103
  }
3876
4104
  return null;
@@ -3882,13 +4110,13 @@ END-ISO-10303-21;
3882
4110
  for (const n of t){
3883
4111
  const s = this.dataStore.entityIndex.byId.get(n), i = s ? this.entityExtractor.extractEntity(s) : null;
3884
4112
  if (!i) continue;
3885
- const o = i.attributes ?? [], a = typeof o[1] == "string" ? o[1].trim().toUpperCase() : "", l = typeof o[2] == "number" ? o[2] : null;
3886
- if (l === 3 && e === null && (e = n), a === "MODEL" && l === 3) return n;
4113
+ const o = i.attributes ?? [], c = typeof o[1] == "string" ? o[1].trim().toUpperCase() : "", l = typeof o[2] == "number" ? o[2] : null;
4114
+ if (l === 3 && e === null && (e = n), c === "MODEL" && l === 3) return n;
3887
4115
  }
3888
4116
  return e ?? t[0] ?? null;
3889
4117
  }
3890
4118
  generateGlobalId() {
3891
- return We();
4119
+ return qe();
3892
4120
  }
3893
4121
  findMaxExpressId() {
3894
4122
  let t = 0;
@@ -3953,8 +4181,8 @@ END-ISO-10303-21;
3953
4181
  if (!e || !this.dataStore.source) return [];
3954
4182
  const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(([^)]+)\)\s*,\s*#(\d+)\s*\)\s*;/);
3955
4183
  if (!s) return [];
3956
- const i = s[1], o = [], a = i.matchAll(/#(\d+)/g);
3957
- for (const l of a)o.push(parseInt(l[1], 10));
4184
+ const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
4185
+ for (const l of c)o.push(parseInt(l[1], 10));
3958
4186
  return o;
3959
4187
  }
3960
4188
  getRelatedPropertySet(t) {
@@ -3980,8 +4208,8 @@ END-ISO-10303-21;
3980
4208
  if (!e || !this.dataStore.source) return [];
3981
4209
  const s = nt(this.dataStore.source, e.byteOffset, e.byteOffset + e.byteLength).match(/\(\s*(#[^)]+)\s*\)\s*\)\s*;$/);
3982
4210
  if (!s) return [];
3983
- const i = s[1], o = [], a = i.matchAll(/#(\d+)/g);
3984
- for (const l of a)o.push(parseInt(l[1], 10));
4211
+ const i = s[1], o = [], c = i.matchAll(/#(\d+)/g);
4212
+ for (const l of c)o.push(parseInt(l[1], 10));
3985
4213
  return o;
3986
4214
  }
3987
4215
  isTypeEntity(t) {
@@ -4006,53 +4234,53 @@ END-ISO-10303-21;
4006
4234
  i.push(l);
4007
4235
  }
4008
4236
  for (const [l, d] of s)o.has(l) || i.push(d);
4009
- const a = i.length > 0 ? `(${i.map((l)=>`#${l}`).join(",")})` : "$";
4010
- return this.replaceEntityAttribute(t, 5, a);
4237
+ const c = i.length > 0 ? `(${i.map((l)=>`#${l}`).join(",")})` : "$";
4238
+ return this.replaceEntityAttribute(t, 5, c);
4011
4239
  }
4012
4240
  replaceEntityAttribute(t, e, n) {
4013
4241
  const s = this.dataStore.entityIndex.byId.get(t);
4014
4242
  if (!s || !this.dataStore.source) return null;
4015
4243
  const o = nt(this.dataStore.source, s.byteOffset, s.byteOffset + s.byteLength).match(/^(#\d+\s*=\s*\w+\()([\s\S]*)(\)\s*;)\s*$/);
4016
4244
  if (!o) return null;
4017
- const [, a, l, d] = o, u = Xn(l);
4018
- return e >= u.length ? null : (u[e] = n, `${a}${u.join(",")}${d}`);
4245
+ const [, c, l, d] = o, u = Zn(l);
4246
+ return e >= u.length ? null : (u[e] = n, `${c}${u.join(",")}${d}`);
4019
4247
  }
4020
4248
  };
4021
- os = function(r, t) {
4022
- const n = new qn(r).export({
4249
+ fs = function(r, t) {
4250
+ const n = new ts(r).export({
4023
4251
  schema: "IFC4",
4024
4252
  ...t
4025
4253
  });
4026
4254
  return new TextDecoder().decode(n.content);
4027
4255
  };
4028
- function Qn(r, t) {
4256
+ function es(r, t) {
4029
4257
  const e = new TextEncoder, n = e.encode(`${r}DATA;
4030
4258
  `), s = e.encode(`ENDSEC;
4031
4259
  END-ISO-10303-21;
4032
4260
  `), i = e.encode(`
4033
4261
  `);
4034
4262
  let o = n.byteLength + s.byteLength;
4035
- const a = new Array(t.length);
4036
- for(let u = 0; u < t.length; u++)a[u] = e.encode(t[u]), o += a[u].byteLength + i.byteLength;
4263
+ const c = new Array(t.length);
4264
+ for(let u = 0; u < t.length; u++)c[u] = e.encode(t[u]), o += c[u].byteLength + i.byteLength;
4037
4265
  const l = new Uint8Array(o);
4038
4266
  let d = 0;
4039
4267
  l.set(n, d), d += n.byteLength;
4040
- for(let u = 0; u < a.length; u++)l.set(a[u], d), d += a[u].byteLength, l.set(i, d), d += i.byteLength;
4268
+ for(let u = 0; u < c.length; u++)l.set(c[u], d), d += c[u].byteLength, l.set(i, d), d += i.byteLength;
4041
4269
  return l.set(s, d), l;
4042
4270
  }
4043
- const Jn = /#(\d+)/g, Kn = new Set([
4271
+ const ns = /#(\d+)/g, ss = new Set([
4044
4272
  "IFCUNITASSIGNMENT",
4045
4273
  "IFCGEOMETRICREPRESENTATIONCONTEXT",
4046
4274
  "IFCGEOMETRICREPRESENTATIONSUBCONTEXT"
4047
4275
  ]);
4048
- as = class {
4276
+ us = class {
4049
4277
  models;
4050
4278
  constructor(t){
4051
4279
  if (t.length === 0) throw new Error("MergedExporter requires at least one model");
4052
4280
  this.models = t;
4053
4281
  }
4054
4282
  export(t) {
4055
- const e = t.onProgress, n = t.schema || "IFC4", s = ee({
4283
+ const e = t.onProgress, n = t.schema || "IFC4", s = se({
4056
4284
  schema: n,
4057
4285
  description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
4058
4286
  author: t.author || "",
@@ -4061,46 +4289,46 @@ END-ISO-10303-21;
4061
4289
  filename: t.filename || "merged.ifc"
4062
4290
  }), i = [];
4063
4291
  let o = 1;
4064
- const a = new Map;
4292
+ const c = new Map;
4065
4293
  for (const y of this.models){
4066
- a.set(y.id, o - 1);
4067
- let m = 0;
4068
- for (const [b] of y.dataStore.entityIndex.byId)b > m && (m = b);
4069
- o += m;
4294
+ c.set(y.id, o - 1);
4295
+ let E = 0;
4296
+ for (const [C] of y.dataStore.entityIndex.byId)C > E && (E = C);
4297
+ o += E;
4070
4298
  }
4071
- const l = this.models[0], d = a.get(l.id), u = this.findInfrastructureEntities(l.dataStore), f = this.findEntitiesByType(l.dataStore, "IFCPROJECT"), p = this.buildSpatialLookup(l.dataStore);
4072
- let _ = !0;
4299
+ const l = this.models[0], d = c.get(l.id), u = this.findInfrastructureEntities(l.dataStore), f = this.findEntitiesByType(l.dataStore, "IFCPROJECT"), p = this.buildSpatialLookup(l.dataStore);
4300
+ let g = !0;
4073
4301
  for (const y of this.models){
4074
- const m = a.get(y.id), b = y.dataStore.source;
4075
- if (!b || b.length === 0) continue;
4076
- let w = null;
4302
+ const E = c.get(y.id), C = y.dataStore.source;
4303
+ if (!C || C.length === 0) continue;
4304
+ let T = null;
4077
4305
  if (t.visibleOnly) {
4078
- const j = t.hiddenEntityIdsByModel?.get(y.id) ?? new Set, O = t.isolatedEntityIdsByModel?.get(y.id) ?? null, { roots: U, hiddenProductIds: C } = oe(y.dataStore, j, O);
4079
- w = re(U, b, y.dataStore.entityIndex.byId, C), ae(w, b, y.dataStore.entityIndex);
4306
+ const Y = t.hiddenEntityIdsByModel?.get(y.id) ?? new Set, O = t.isolatedEntityIdsByModel?.get(y.id) ?? null, { roots: v, hiddenProductIds: b } = ce(y.dataStore, Y, O);
4307
+ T = ae(v, C, y.dataStore.entityIndex.byId, b), le(T, C, y.dataStore.entityIndex);
4080
4308
  }
4081
- const v = new Map, L = new Set;
4082
- if (!_) {
4083
- const j = this.findEntitiesByType(y.dataStore, "IFCPROJECT");
4084
- if (f.length > 0) for (const U of j)v.set(U, f[0] + d), L.add(U);
4309
+ const $ = new Map, x = new Set;
4310
+ if (!g) {
4311
+ const Y = this.findEntitiesByType(y.dataStore, "IFCPROJECT");
4312
+ if (f.length > 0) for (const v of Y)$.set(v, f[0] + d), x.add(v);
4085
4313
  const O = this.findInfrastructureEntities(y.dataStore);
4086
- for (const [U, C] of u){
4087
- const N = O.get(U);
4088
- N && C.length > 0 && N.length > 0 && (v.set(N[0], C[0] + d), L.add(N[0]));
4314
+ for (const [v, b] of u){
4315
+ const S = O.get(v);
4316
+ S && b.length > 0 && S.length > 0 && ($.set(S[0], b[0] + d), x.add(S[0]));
4089
4317
  }
4090
- this.unifySpatialEntities(y.dataStore, p, d, v, L), this.skipRedundantRelAggregates(y.dataStore, v, L);
4318
+ this.unifySpatialEntities(y.dataStore, p, d, $, x), this.skipRedundantRelAggregates(y.dataStore, $, x);
4091
4319
  }
4092
- for (const [j, O] of y.dataStore.entityIndex.byId){
4093
- if (w !== null && !w.has(j) || L.has(j)) continue;
4094
- const U = nt(b, O.byteOffset, O.byteOffset + O.byteLength);
4095
- let C;
4096
- m === 0 && v.size === 0 ? C = U : C = this.remapEntityText(U, m, v);
4097
- const N = y.dataStore.schemaVersion || "IFC4";
4098
- if (ce(N, n)) {
4099
- const F = jt(C, N, n);
4320
+ for (const [Y, O] of y.dataStore.entityIndex.byId){
4321
+ if (T !== null && !T.has(Y) || x.has(Y)) continue;
4322
+ const v = nt(C, O.byteOffset, O.byteOffset + O.byteLength);
4323
+ let b;
4324
+ E === 0 && $.size === 0 ? b = v : b = this.remapEntityText(v, E, $);
4325
+ const S = y.dataStore.schemaVersion || "IFC4";
4326
+ if (de(S, n)) {
4327
+ const F = Xt(b, S, n);
4100
4328
  F !== null && i.push(F);
4101
- } else i.push(C);
4329
+ } else i.push(b);
4102
4330
  }
4103
- _ = !1;
4331
+ g = !1;
4104
4332
  }
4105
4333
  e && e({
4106
4334
  phase: "assembling",
@@ -4108,7 +4336,7 @@ END-ISO-10303-21;
4108
4336
  entitiesProcessed: i.length,
4109
4337
  entitiesTotal: i.length
4110
4338
  });
4111
- const h = Oe(s, i);
4339
+ const h = Pe(s, i);
4112
4340
  return {
4113
4341
  content: h,
4114
4342
  stats: {
@@ -4119,7 +4347,7 @@ END-ISO-10303-21;
4119
4347
  };
4120
4348
  }
4121
4349
  async exportAsync(t) {
4122
- const e = t.onProgress, n = t.schema || "IFC4", s = ee({
4350
+ const e = t.onProgress, n = t.schema || "IFC4", s = se({
4123
4351
  schema: n,
4124
4352
  description: t.description || `Merged export of ${this.models.length} models from ifc-lite`,
4125
4353
  author: t.author || "",
@@ -4128,67 +4356,67 @@ END-ISO-10303-21;
4128
4356
  filename: t.filename || "merged.ifc"
4129
4357
  }), i = [];
4130
4358
  let o = 0;
4131
- for (const w of this.models)o += w.dataStore.entityIndex.byId.size;
4132
- let a = 1;
4359
+ for (const T of this.models)o += T.dataStore.entityIndex.byId.size;
4360
+ let c = 1;
4133
4361
  const l = new Map;
4134
- for (const w of this.models){
4135
- l.set(w.id, a - 1);
4136
- let v = 0;
4137
- for (const [L] of w.dataStore.entityIndex.byId)L > v && (v = L);
4138
- a += v;
4362
+ for (const T of this.models){
4363
+ l.set(T.id, c - 1);
4364
+ let $ = 0;
4365
+ for (const [x] of T.dataStore.entityIndex.byId)x > $ && ($ = x);
4366
+ c += $;
4139
4367
  }
4140
- const d = this.models[0], u = l.get(d.id), f = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"), _ = this.buildSpatialLookup(d.dataStore);
4368
+ const d = this.models[0], u = l.get(d.id), f = this.findInfrastructureEntities(d.dataStore), p = this.findEntitiesByType(d.dataStore, "IFCPROJECT"), g = this.buildSpatialLookup(d.dataStore);
4141
4369
  let h = !0, y = 0;
4142
- const m = 2e3;
4370
+ const E = 2e3;
4143
4371
  e && e({
4144
4372
  phase: "preparing",
4145
4373
  percent: 0,
4146
4374
  entitiesProcessed: 0,
4147
4375
  entitiesTotal: o
4148
4376
  });
4149
- for (const w of this.models){
4150
- const v = l.get(w.id), L = w.dataStore.source;
4151
- if (!L || L.length === 0) continue;
4377
+ for (const T of this.models){
4378
+ const $ = l.get(T.id), x = T.dataStore.source;
4379
+ if (!x || x.length === 0) continue;
4152
4380
  e && e({
4153
4381
  phase: "entities",
4154
4382
  percent: o > 0 ? y / o * .85 : 0,
4155
4383
  entitiesProcessed: y,
4156
4384
  entitiesTotal: o,
4157
- currentModel: w.name
4385
+ currentModel: T.name
4158
4386
  });
4159
- let j = null;
4387
+ let Y = null;
4160
4388
  if (t.visibleOnly) {
4161
- const N = t.hiddenEntityIdsByModel?.get(w.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(w.id) ?? null, { roots: E, hiddenProductIds: g } = oe(w.dataStore, N, F);
4162
- j = re(E, L, w.dataStore.entityIndex.byId, g), ae(j, L, w.dataStore.entityIndex);
4389
+ const S = t.hiddenEntityIdsByModel?.get(T.id) ?? new Set, F = t.isolatedEntityIdsByModel?.get(T.id) ?? null, { roots: m, hiddenProductIds: _ } = ce(T.dataStore, S, F);
4390
+ Y = ae(m, x, T.dataStore.entityIndex.byId, _), le(Y, x, T.dataStore.entityIndex);
4163
4391
  }
4164
- const O = new Map, U = new Set;
4392
+ const O = new Map, v = new Set;
4165
4393
  if (!h) {
4166
- const N = this.findEntitiesByType(w.dataStore, "IFCPROJECT");
4167
- if (p.length > 0) for (const E of N)O.set(E, p[0] + u), U.add(E);
4168
- const F = this.findInfrastructureEntities(w.dataStore);
4169
- for (const [E, g] of f){
4170
- const T = F.get(E);
4171
- T && g.length > 0 && T.length > 0 && (O.set(T[0], g[0] + u), U.add(T[0]));
4394
+ const S = this.findEntitiesByType(T.dataStore, "IFCPROJECT");
4395
+ if (p.length > 0) for (const m of S)O.set(m, p[0] + u), v.add(m);
4396
+ const F = this.findInfrastructureEntities(T.dataStore);
4397
+ for (const [m, _] of f){
4398
+ const w = F.get(m);
4399
+ w && _.length > 0 && w.length > 0 && (O.set(w[0], _[0] + u), v.add(w[0]));
4172
4400
  }
4173
- this.unifySpatialEntities(w.dataStore, _, u, O, U), this.skipRedundantRelAggregates(w.dataStore, O, U);
4401
+ this.unifySpatialEntities(T.dataStore, g, u, O, v), this.skipRedundantRelAggregates(T.dataStore, O, v);
4174
4402
  }
4175
- let C = 0;
4176
- for (const [N, F] of w.dataStore.entityIndex.byId){
4177
- if (j !== null && !j.has(N) || U.has(N)) continue;
4178
- const E = nt(L, F.byteOffset, F.byteOffset + F.byteLength);
4179
- let g;
4180
- v === 0 && O.size === 0 ? g = E : g = this.remapEntityText(E, v, O);
4181
- const T = w.dataStore.schemaVersion || "IFC4";
4182
- if (ce(T, n)) {
4183
- const I = jt(g, T, n);
4403
+ let b = 0;
4404
+ for (const [S, F] of T.dataStore.entityIndex.byId){
4405
+ if (Y !== null && !Y.has(S) || v.has(S)) continue;
4406
+ const m = nt(x, F.byteOffset, F.byteOffset + F.byteLength);
4407
+ let _;
4408
+ $ === 0 && O.size === 0 ? _ = m : _ = this.remapEntityText(m, $, O);
4409
+ const w = T.dataStore.schemaVersion || "IFC4";
4410
+ if (de(w, n)) {
4411
+ const I = Xt(_, w, n);
4184
4412
  I !== null && i.push(I);
4185
- } else i.push(g);
4186
- C++, y++, C % m === 0 && (e && e({
4413
+ } else i.push(_);
4414
+ b++, y++, b % E === 0 && (e && e({
4187
4415
  phase: "entities",
4188
4416
  percent: o > 0 ? y / o * .85 : 0,
4189
4417
  entitiesProcessed: y,
4190
4418
  entitiesTotal: o,
4191
- currentModel: w.name
4419
+ currentModel: T.name
4192
4420
  }), await new Promise((I)=>setTimeout(I, 0)));
4193
4421
  }
4194
4422
  h = !1;
@@ -4198,31 +4426,31 @@ END-ISO-10303-21;
4198
4426
  percent: .9,
4199
4427
  entitiesProcessed: o,
4200
4428
  entitiesTotal: o
4201
- }), await new Promise((w)=>setTimeout(w, 0));
4202
- const b = Oe(s, i);
4429
+ }), await new Promise((T)=>setTimeout(T, 0));
4430
+ const C = Pe(s, i);
4203
4431
  return e && e({
4204
4432
  phase: "assembling",
4205
4433
  percent: 1,
4206
4434
  entitiesProcessed: o,
4207
4435
  entitiesTotal: o
4208
4436
  }), {
4209
- content: b,
4437
+ content: C,
4210
4438
  stats: {
4211
4439
  modelCount: this.models.length,
4212
4440
  totalEntityCount: i.length,
4213
- fileSize: b.byteLength
4441
+ fileSize: C.byteLength
4214
4442
  }
4215
4443
  };
4216
4444
  }
4217
4445
  remapEntityText(t, e, n) {
4218
- return t.replace(Jn, (s, i)=>{
4219
- const o = parseInt(i, 10), a = n.get(o);
4220
- return a !== void 0 ? `#${a}` : `#${o + e}`;
4446
+ return t.replace(ns, (s, i)=>{
4447
+ const o = parseInt(i, 10), c = n.get(o);
4448
+ return c !== void 0 ? `#${c}` : `#${o + e}`;
4221
4449
  });
4222
4450
  }
4223
4451
  findInfrastructureEntities(t) {
4224
4452
  const e = new Map;
4225
- for (const n of Kn){
4453
+ for (const n of ss){
4226
4454
  const s = t.entityIndex.byType.get(n) ?? [];
4227
4455
  s.length > 0 && e.set(n, [
4228
4456
  ...s
@@ -4270,11 +4498,11 @@ END-ISO-10303-21;
4270
4498
  let f;
4271
4499
  u && (f = e.sitesByName.get(u.toLowerCase())), f === void 0 && o.length === 1 && e.siteIds.length === 1 && (f = e.siteIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
4272
4500
  }
4273
- const a = this.findEntitiesByType(t, "IFCBUILDING");
4274
- for (const d of a){
4501
+ const c = this.findEntitiesByType(t, "IFCBUILDING");
4502
+ for (const d of c){
4275
4503
  const u = this.extractEntityName(d, t);
4276
4504
  let f;
4277
- u && (f = e.buildingsByName.get(u.toLowerCase())), f === void 0 && a.length === 1 && e.buildingIds.length === 1 && (f = e.buildingIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
4505
+ u && (f = e.buildingsByName.get(u.toLowerCase())), f === void 0 && c.length === 1 && e.buildingIds.length === 1 && (f = e.buildingIds[0]), f !== void 0 && (s.set(d, f + n), i.add(d));
4278
4506
  }
4279
4507
  const l = new Set;
4280
4508
  for (const d of this.findEntitiesByType(t, "IFCBUILDINGSTOREY")){
@@ -4286,11 +4514,11 @@ END-ISO-10303-21;
4286
4514
  }
4287
4515
  if (f === void 0) {
4288
4516
  const p = this.extractStoreyElevation(d, t);
4289
- if (p !== void 0) for (const _ of e.storeysByElevation){
4290
- if (l.has(_.expressId)) continue;
4291
- const h = Math.max(.5, Math.abs(_.elevation) * .01);
4292
- if (Math.abs(p - _.elevation) <= h) {
4293
- f = _.expressId;
4517
+ if (p !== void 0) for (const g of e.storeysByElevation){
4518
+ if (l.has(g.expressId)) continue;
4519
+ const h = Math.max(.5, Math.abs(g.elevation) * .01);
4520
+ if (Math.abs(p - g.elevation) <= h) {
4521
+ f = g.expressId;
4294
4522
  break;
4295
4523
  }
4296
4524
  }
@@ -4304,11 +4532,11 @@ END-ISO-10303-21;
4304
4532
  if (!i) continue;
4305
4533
  const o = i.match(/^#(\d+)$/);
4306
4534
  if (!o || !e.has(parseInt(o[1], 10))) continue;
4307
- const a = this.extractStepAttribute(s, t, 5);
4308
- if (!a) continue;
4535
+ const c = this.extractStepAttribute(s, t, 5);
4536
+ if (!c) continue;
4309
4537
  const l = [], d = /#(\d+)/g;
4310
4538
  let u;
4311
- for(; (u = d.exec(a)) !== null;)l.push(parseInt(u[1], 10));
4539
+ for(; (u = d.exec(c)) !== null;)l.push(parseInt(u[1], 10));
4312
4540
  l.length !== 0 && l.every((f)=>e.has(f)) && n.add(s);
4313
4541
  }
4314
4542
  }
@@ -4317,7 +4545,7 @@ END-ISO-10303-21;
4317
4545
  if (!n || n === "$") return null;
4318
4546
  if (n.startsWith("'") && n.endsWith("'")) {
4319
4547
  const s = n.slice(1, -1).replace(/''/g, "'");
4320
- return He(s);
4548
+ return Je(s);
4321
4549
  }
4322
4550
  return null;
4323
4551
  }
@@ -4332,24 +4560,24 @@ END-ISO-10303-21;
4332
4560
  if (!s) return null;
4333
4561
  const i = e.entityIndex.byId.get(t);
4334
4562
  if (!i) return null;
4335
- const o = nt(s, i.byteOffset, i.byteOffset + i.byteLength), a = o.indexOf("(");
4336
- if (a === -1) return null;
4337
- let l = 0, d = 0, u = a + 1, f = !1;
4338
- for(let p = a + 1; p < o.length; p++){
4339
- const _ = o[p];
4340
- if (_ === "'" && !f) f = !0;
4341
- else if (_ === "'" && f) {
4563
+ const o = nt(s, i.byteOffset, i.byteOffset + i.byteLength), c = o.indexOf("(");
4564
+ if (c === -1) return null;
4565
+ let l = 0, d = 0, u = c + 1, f = !1;
4566
+ for(let p = c + 1; p < o.length; p++){
4567
+ const g = o[p];
4568
+ if (g === "'" && !f) f = !0;
4569
+ else if (g === "'" && f) {
4342
4570
  if (p + 1 < o.length && o[p + 1] === "'") {
4343
4571
  p++;
4344
4572
  continue;
4345
4573
  }
4346
4574
  f = !1;
4347
4575
  } else if (!f) {
4348
- if (_ === "(") l++;
4349
- else if (_ === ")") {
4576
+ if (g === "(") l++;
4577
+ else if (g === ")") {
4350
4578
  if (l === 0) return d === n ? o.substring(u, p).trim() : null;
4351
4579
  l--;
4352
- } else if (_ === "," && l === 0) {
4580
+ } else if (g === "," && l === 0) {
4353
4581
  if (d === n) return o.substring(u, p).trim();
4354
4582
  d++, u = p + 1;
4355
4583
  }
@@ -4358,28 +4586,28 @@ END-ISO-10303-21;
4358
4586
  return null;
4359
4587
  }
4360
4588
  };
4361
- function Oe(r, t) {
4589
+ function Pe(r, t) {
4362
4590
  const e = new TextEncoder, n = e.encode(`${r}DATA;
4363
4591
  `), s = e.encode(`ENDSEC;
4364
4592
  END-ISO-10303-21;
4365
4593
  `), i = e.encode(`
4366
4594
  `);
4367
4595
  let o = n.byteLength + s.byteLength;
4368
- const a = new Array(t.length);
4369
- for(let u = 0; u < t.length; u++)a[u] = e.encode(t[u]), o += a[u].byteLength + i.byteLength;
4596
+ const c = new Array(t.length);
4597
+ for(let u = 0; u < t.length; u++)c[u] = e.encode(t[u]), o += c[u].byteLength + i.byteLength;
4370
4598
  const l = new Uint8Array(o);
4371
4599
  let d = 0;
4372
4600
  l.set(n, d), d += n.byteLength;
4373
- for(let u = 0; u < a.length; u++)l.set(a[u], d), d += a[u].byteLength, l.set(i, d), d += i.byteLength;
4601
+ for(let u = 0; u < c.length; u++)l.set(c[u], d), d += c[u].byteLength, l.set(i, d), d += i.byteLength;
4374
4602
  return l.set(s, d), l;
4375
4603
  }
4376
- let Zt;
4377
- Zt = {
4604
+ let ee;
4605
+ ee = {
4378
4606
  IFC_CORE: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/ifc@v5a.ifcx",
4379
4607
  IFC_PROP: "https://ifcx.dev/@standards.buildingsmart.org/ifc/core/prop@v5a.ifcx",
4380
4608
  USD: "https://ifcx.dev/@openusd.org/usd@v1.ifcx"
4381
4609
  };
4382
- Le = new Set([
4610
+ Be = new Set([
4383
4611
  "UsageType",
4384
4612
  "TypeName",
4385
4613
  "IsExternal",
@@ -4398,7 +4626,7 @@ END-ISO-10303-21;
4398
4626
  "CrossSectionArea",
4399
4627
  "Station"
4400
4628
  ]);
4401
- cs = class {
4629
+ hs = class {
4402
4630
  dataStore;
4403
4631
  mutationView;
4404
4632
  geometryResult;
@@ -4414,58 +4642,58 @@ END-ISO-10303-21;
4414
4642
  const e = this.dataStore.schemaVersion || "IFC4";
4415
4643
  this.buildEntityMaps();
4416
4644
  const n = this.buildMeshLookup(t), s = this.buildVisibleSet(t), i = t.onlyTreeEntities !== !1 ? this.buildTreeEntitySet() : null, o = [];
4417
- let a = 0, l = 0;
4645
+ let c = 0, l = 0;
4418
4646
  const { entities: d, strings: u } = this.dataStore;
4419
4647
  let f = null;
4420
4648
  for(let y = 0; y < d.count; y++){
4421
- const m = d.expressId[y];
4422
- if (s && !s.has(m) || i && !i.has(m)) continue;
4423
- const b = d.typeEnum[y], w = ne(b) || "IfcElement", v = De(w.toUpperCase(), e, "IFC5"), L = ts(v);
4424
- L === "IfcProject" && (f = m);
4425
- const j = this.entityUuids.get(m) || te(m), O = {};
4649
+ const E = d.expressId[y];
4650
+ if (s && !s.has(E) || i && !i.has(E)) continue;
4651
+ const C = d.typeEnum[y], T = ie(C) || "IfcElement", $ = Ve(T.toUpperCase(), e, "IFC5"), x = rs($);
4652
+ x === "IfcProject" && (f = E);
4653
+ const Y = this.entityUuids.get(E) || ne(E), O = {};
4426
4654
  O["bsi::ifc::class"] = {
4427
- code: L,
4428
- uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${L}`
4655
+ code: x,
4656
+ uri: `https://identifier.buildingsmart.org/uri/buildingsmart/ifc/5/class/${x}`
4429
4657
  };
4430
- const U = u.get(d.name[y]) || this.spatialNodeNames.get(m);
4431
- U && (O["bsi::ifc::prop::Name"] = U);
4432
- const C = u.get(d.description[y]);
4433
- if (C && (O["bsi::ifc::prop::Description"] = C), t.includeProperties !== !1) {
4434
- const E = this.getPropertiesForEntity(m, t);
4435
- for (const [g, T] of Object.entries(E))O[g] = T, a++;
4658
+ const v = u.get(d.name[y]) || this.spatialNodeNames.get(E);
4659
+ v && (O["bsi::ifc::prop::Name"] = v);
4660
+ const b = u.get(d.description[y]);
4661
+ if (b && (O["bsi::ifc::prop::Description"] = b), t.includeProperties !== !1) {
4662
+ const m = this.getPropertiesForEntity(E, t);
4663
+ for (const [_, w] of Object.entries(m))O[_] = w, c++;
4436
4664
  }
4437
- const N = {
4438
- path: j
4439
- }, F = this.getChildrenForEntity(m);
4440
- if (Object.keys(F).length > 0 && (N.children = F), t.includeGeometry !== !1) {
4441
- const E = n.get(m);
4442
- if (E && E.length > 0) {
4443
- const g = this.convertToUsdMesh(E);
4444
- O["usd::usdgeom::mesh"] = g;
4445
- const [T, I, R, S] = E[0].color;
4665
+ const S = {
4666
+ path: Y
4667
+ }, F = this.getChildrenForEntity(E);
4668
+ if (Object.keys(F).length > 0 && (S.children = F), t.includeGeometry !== !1) {
4669
+ const m = n.get(E);
4670
+ if (m && m.length > 0) {
4671
+ const _ = this.convertToUsdMesh(m);
4672
+ O["usd::usdgeom::mesh"] = _;
4673
+ const [w, I, R, N] = m[0].color;
4446
4674
  O["bsi::ifc::presentation::diffuseColor"] = [
4447
- T,
4675
+ w,
4448
4676
  I,
4449
4677
  R
4450
- ], S < 1 && (O["bsi::ifc::presentation::opacity"] = S), l++;
4678
+ ], N < 1 && (O["bsi::ifc::presentation::opacity"] = N), l++;
4451
4679
  }
4452
4680
  }
4453
- Object.keys(O).length > 0 && (N.attributes = O), o.push(N);
4681
+ Object.keys(O).length > 0 && (S.attributes = O), o.push(S);
4454
4682
  }
4455
4683
  if (f !== null) {
4456
4684
  const y = this.entityUuids.get(f);
4457
4685
  if (y) {
4458
- const m = this.childNames.get(f) || u.get(d.name[this.findEntityIndex(f)]) || "Project", b = te(0);
4686
+ const E = this.childNames.get(f) || u.get(d.name[this.findEntityIndex(f)]) || "Project", C = ne(0);
4459
4687
  o.unshift({
4460
- path: b,
4688
+ path: C,
4461
4689
  children: {
4462
- [m]: y
4690
+ [E]: y
4463
4691
  },
4464
4692
  attributes: {}
4465
4693
  });
4466
4694
  }
4467
4695
  }
4468
- const p = Zn(o), _ = {
4696
+ const p = is(o), g = {
4469
4697
  header: {
4470
4698
  id: `ifcx_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
4471
4699
  ifcxVersion: "ifcx_alpha",
@@ -4476,12 +4704,12 @@ END-ISO-10303-21;
4476
4704
  imports: p,
4477
4705
  schemas: {},
4478
4706
  data: o
4479
- }, h = t.prettyPrint !== !1 ? JSON.stringify(_, null, 2) : JSON.stringify(_);
4707
+ }, h = t.prettyPrint !== !1 ? JSON.stringify(g, null, 2) : JSON.stringify(g);
4480
4708
  return {
4481
4709
  content: h,
4482
4710
  stats: {
4483
4711
  nodeCount: o.length,
4484
- propertyCount: a,
4712
+ propertyCount: c,
4485
4713
  meshCount: l,
4486
4714
  fileSize: new TextEncoder().encode(h).length
4487
4715
  }
@@ -4497,7 +4725,7 @@ END-ISO-10303-21;
4497
4725
  this.entityUuids.clear();
4498
4726
  for(let l = 0; l < e.count; l++){
4499
4727
  const d = e.expressId[l], u = n.get(e.globalId[l]);
4500
- this.entityUuids.set(d, u || te(d));
4728
+ this.entityUuids.set(d, u || ne(d));
4501
4729
  }
4502
4730
  const s = new Map, i = (l, d)=>{
4503
4731
  if (d) for (const u of d)s.set(u, l);
@@ -4524,19 +4752,19 @@ END-ISO-10303-21;
4524
4752
  const d = e.expressId[l];
4525
4753
  let u = n.get(e.name[l]) || "";
4526
4754
  if (u || (u = this.spatialNodeNames.get(d) || ""), !u) {
4527
- const f = ne(e.typeEnum[l]);
4755
+ const f = ie(e.typeEnum[l]);
4528
4756
  f !== "Unknown" && (u = f);
4529
4757
  }
4530
4758
  o.set(d, u);
4531
4759
  }
4532
- const a = new Map;
4533
- for (const [l, d] of s)a.has(d) || a.set(d, []), a.get(d).push(l);
4760
+ const c = new Map;
4761
+ for (const [l, d] of s)c.has(d) || c.set(d, []), c.get(d).push(l);
4534
4762
  for(let l = 0; l < e.count; l++){
4535
4763
  const d = e.expressId[l];
4536
- s.has(d) || (a.has(void 0) || a.set(void 0, []), a.get(void 0).push(d));
4764
+ s.has(d) || (c.has(void 0) || c.set(void 0, []), c.get(void 0).push(d));
4537
4765
  }
4538
4766
  this.childNames.clear();
4539
- for (const [, l] of a){
4767
+ for (const [, l] of c){
4540
4768
  const d = new Map;
4541
4769
  for (const u of l){
4542
4770
  const p = (o.get(u) || `e${u}`).replace(/[/\\]/g, "_").replace(/\s+/g, "_");
@@ -4553,16 +4781,16 @@ END-ISO-10303-21;
4553
4781
  if (this.mutationView && e.applyMutations !== !1) {
4554
4782
  const s = this.mutationView.getForEntity(t);
4555
4783
  for (const i of s)for (const o of i.properties){
4556
- if (e.onlyKnownProperties !== !1 && !Le.has(o.name)) continue;
4557
- const a = `bsi::ifc::prop::${o.name}`;
4558
- n[a] = this.convertPropertyValue(o.value, o.type);
4784
+ if (e.onlyKnownProperties !== !1 && !Be.has(o.name)) continue;
4785
+ const c = `bsi::ifc::prop::${o.name}`;
4786
+ n[c] = this.convertPropertyValue(o.value, o.type);
4559
4787
  }
4560
4788
  } else if (this.dataStore.properties) {
4561
4789
  const s = this.dataStore.properties.getForEntity(t);
4562
4790
  for (const i of s)for (const o of i.properties){
4563
- if (e.onlyKnownProperties !== !1 && !Le.has(o.name)) continue;
4564
- const a = `bsi::ifc::prop::${o.name}`;
4565
- n[a] = this.convertPropertyValue(o.value, o.type);
4791
+ if (e.onlyKnownProperties !== !1 && !Be.has(o.name)) continue;
4792
+ const c = `bsi::ifc::prop::${o.name}`;
4793
+ n[c] = this.convertPropertyValue(o.value, o.type);
4566
4794
  }
4567
4795
  }
4568
4796
  return n;
@@ -4570,12 +4798,12 @@ END-ISO-10303-21;
4570
4798
  convertPropertyValue(t, e) {
4571
4799
  if (t == null) return null;
4572
4800
  switch(e){
4573
- case tt.Real:
4801
+ case et.Real:
4574
4802
  return Number(t);
4575
- case tt.Integer:
4803
+ case et.Integer:
4576
4804
  return Math.round(Number(t));
4577
- case tt.Boolean:
4578
- case tt.Logical:
4805
+ case et.Boolean:
4806
+ case et.Logical:
4579
4807
  return !!t;
4580
4808
  default:
4581
4809
  return t;
@@ -4583,10 +4811,10 @@ END-ISO-10303-21;
4583
4811
  }
4584
4812
  getChildrenForEntity(t) {
4585
4813
  const e = {}, n = (o)=>{
4586
- const a = this.entityUuids.get(o);
4587
- if (!a) return;
4814
+ const c = this.entityUuids.get(o);
4815
+ if (!c) return;
4588
4816
  const l = this.childNames.get(o) || `e${o}`;
4589
- e[l] = a;
4817
+ e[l] = c;
4590
4818
  }, s = this.spatialChildIds.get(t);
4591
4819
  if (s) for (const o of s)n(o);
4592
4820
  const { spatialHierarchy: i } = this.dataStore;
@@ -4597,7 +4825,7 @@ END-ISO-10303-21;
4597
4825
  i.byStorey?.get(t),
4598
4826
  i.bySpace?.get(t)
4599
4827
  ];
4600
- for (const a of o)if (a) for (const l of a)n(l);
4828
+ for (const c of o)if (c) for (const l of c)n(l);
4601
4829
  }
4602
4830
  return e;
4603
4831
  }
@@ -4615,9 +4843,9 @@ END-ISO-10303-21;
4615
4843
  let s = 0;
4616
4844
  for (const i of t){
4617
4845
  for(let o = 0; o < i.positions.length; o += 3){
4618
- const a = i.positions[o], l = i.positions[o + 1], d = i.positions[o + 2];
4846
+ const c = i.positions[o], l = i.positions[o + 1], d = i.positions[o + 2];
4619
4847
  e.push([
4620
- a,
4848
+ c,
4621
4849
  -d,
4622
4850
  l
4623
4851
  ]);
@@ -4653,13 +4881,13 @@ END-ISO-10303-21;
4653
4881
  if (!t.visibleOnly) return null;
4654
4882
  const e = t.hiddenEntityIds ?? new Set, n = t.isolatedEntityIds ?? null, s = new Set, { entities: i } = this.dataStore;
4655
4883
  for(let o = 0; o < i.count; o++){
4656
- const a = i.expressId[o];
4657
- n ? n.has(a) && s.add(a) : e.has(a) || s.add(a);
4884
+ const c = i.expressId[o];
4885
+ n ? n.has(c) && s.add(c) : e.has(c) || s.add(c);
4658
4886
  }
4659
4887
  return s;
4660
4888
  }
4661
4889
  };
4662
- function Zn(r) {
4890
+ function is(r) {
4663
4891
  let t = !1, e = !1, n = !1;
4664
4892
  for (const i of r)if (i.attributes) {
4665
4893
  for (const o of Object.keys(i.attributes))if (!t && (o === "bsi::ifc::class" || o.startsWith("bsi::ifc::presentation::") || o === "bsi::ifc::material" || o === "bsi::ifc::spaceBoundary") && (t = !0), !e && o.startsWith("bsi::ifc::prop::") && (e = !0), !n && o.startsWith("usd::") && (n = !0), t && e && n) break;
@@ -4667,21 +4895,21 @@ END-ISO-10303-21;
4667
4895
  }
4668
4896
  const s = [];
4669
4897
  return t && s.push({
4670
- uri: Zt.IFC_CORE
4898
+ uri: ee.IFC_CORE
4671
4899
  }), e && s.push({
4672
- uri: Zt.IFC_PROP
4900
+ uri: ee.IFC_PROP
4673
4901
  }), n && s.push({
4674
- uri: Zt.USD
4902
+ uri: ee.USD
4675
4903
  }), s;
4676
4904
  }
4677
- function te(r) {
4905
+ function ne(r) {
4678
4906
  return `00000000-0000-4000-8000-${r.toString(16).padStart(12, "0")}`;
4679
4907
  }
4680
- function ts(r) {
4681
- const t = Xe(r), e = ne(t);
4908
+ function rs(r) {
4909
+ const t = Ke(r), e = ie(t);
4682
4910
  if (e !== "Unknown") return e;
4683
4911
  const n = r.toLowerCase();
4684
4912
  return n.startsWith("ifc") ? "Ifc" + n.charAt(3).toUpperCase() + n.slice(4) : r;
4685
4913
  }
4686
4914
  });
4687
- export { rs as C, is as G, Le as I, as as M, qn as S, Be as _, ss as a, In as b, cs as c, ie as d, os as e, ns as g, __tla };
4915
+ export { ds as C, ls as G, Be as I, us as M, ts as S, Ge as _, cs as a, En as b, hs as c, oe as d, fs as e, as as g, __tla };