@ifc-lite/viewer 1.23.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +34 -31
- package/CHANGELOG.md +96 -0
- package/dist/assets/{basketViewActivator-Dn_bHUl2.js → basketViewActivator-CU8_toGq.js} +7 -7
- package/dist/assets/{bcf-B9SFl84i.js → bcf-DXGDhw56.js} +23 -23
- package/dist/assets/{deflate-yMpdCIqk.js → deflate-Bb1_H2Yf.js} +1 -1
- package/dist/assets/{exporters-D-BvrNIg.js → exporters-DZhLN0ux.js} +1861 -1658
- package/dist/assets/geometry-controller.worker-DQOSYqtw.js +7 -0
- package/dist/assets/geometry.worker-B62e03Ao.js +1 -0
- package/dist/assets/{geotiff-D1tvcDCb.js → geotiff-y0ZxbRJd.js} +10 -10
- package/dist/assets/{ids-DZLs0snJ.js → ids-DruUNtfD.js} +4 -4
- package/dist/assets/ifc-lite-Ch2T9pP9.js +7 -0
- package/dist/assets/{ifc-lite_bg-DyHX37GQ.wasm → ifc-lite_bg-D7O1WHgP.wasm} +0 -0
- package/dist/assets/{ifc-lite_bg-BIryVCXQ.wasm → ifc-lite_bg-iH_07wf8.wasm} +0 -0
- package/dist/assets/index-Bws3UAkj.css +1 -0
- package/dist/assets/{index-CXSBhkcJ.js → index-Dr88ZlSY.js} +64100 -47030
- package/dist/assets/{jpeg-DUMcZp24.js → jpeg-B3_loqFe.js} +1 -1
- package/dist/assets/lens-PYsLu_MA.js +1 -0
- package/dist/assets/{lerc-IN4uWojP.js → lerc-nkwS8ZUe.js} +1 -1
- package/dist/assets/{lzw-Cnw0hH-m.js → lzw-D3cW5Wpg.js} +1 -1
- package/dist/assets/{native-bridge-BVf2uzoH.js → native-bridge-BcYJooq8.js} +2 -2
- package/dist/assets/{packbits-BskJCwk0.js → packbits-DDN4xzB5.js} +1 -1
- package/dist/assets/{parser.worker-BdtkkaGf.js → parser.worker-BW1IMUed.js} +3 -3
- package/dist/assets/raw-CoIXstQ-.js +1 -0
- package/dist/assets/{sandbox-VLI_y7cl.js → sandbox-DETNEyQb.js} +498 -470
- package/dist/assets/{server-client-BLcKaWQB.js → server-client-CmzJOeS7.js} +1 -1
- package/dist/assets/{wasm-bridge-BAfZh7YT.js → wasm-bridge-CT7mK9W0.js} +1 -1
- package/dist/assets/{webimage-Db2xzze3.js → webimage-CBjgg4up.js} +1 -1
- package/dist/assets/{workerHelpers--sAYm9yN.js → workerHelpers-IEQDo8r3.js} +1 -1
- package/dist/assets/{zstd-BDToOQyD.js → zstd-C8oQ6qdS.js} +1 -1
- package/dist/index.html +8 -8
- package/package.json +11 -9
- package/src/App.tsx +5 -2
- package/src/components/extensions/AuditLogPanel.tsx +259 -0
- package/src/components/extensions/BundlePreview.tsx +102 -0
- package/src/components/extensions/CapabilityReview.tsx +333 -0
- package/src/components/extensions/ExtensionDockHost.tsx +192 -0
- package/src/components/extensions/ExtensionToolbarSlot.tsx +106 -0
- package/src/components/extensions/ExtensionsPanel.tsx +481 -0
- package/src/components/extensions/FlavorDialog.tsx +398 -0
- package/src/components/extensions/FlavorImportPreview.tsx +79 -0
- package/src/components/extensions/FlavorIndicator.tsx +81 -0
- package/src/components/extensions/FlavorListView.tsx +318 -0
- package/src/components/extensions/FlavorMergeDialog.tsx +326 -0
- package/src/components/extensions/HelpHint.tsx +182 -0
- package/src/components/extensions/IdeasPanel.tsx +344 -0
- package/src/components/extensions/PlanCard.tsx +227 -0
- package/src/components/extensions/PrivacyPanel.tsx +312 -0
- package/src/components/extensions/PromoteToolDialog.tsx +313 -0
- package/src/components/extensions/RepairQueuePanel.tsx +222 -0
- package/src/components/extensions/icon-registry.ts +92 -0
- package/src/components/extensions/toast-helpers.ts +49 -0
- package/src/components/extensions/widget/WidgetErrorBoundary.tsx +62 -0
- package/src/components/extensions/widget/WidgetRenderer.tsx +428 -0
- package/src/components/viewer/ChatPanel.tsx +251 -3
- package/src/components/viewer/CommandPalette.tsx +74 -4
- package/src/components/viewer/Drawing2DCanvas.tsx +178 -1
- package/src/components/viewer/EntityContextMenu.tsx +70 -0
- package/src/components/viewer/ExportDialog.tsx +9 -1
- package/src/components/viewer/KeyboardShortcutsDialog.tsx +21 -6
- package/src/components/viewer/LensPanel.tsx +50 -0
- package/src/components/viewer/MainToolbar.tsx +170 -87
- package/src/components/viewer/ScriptPanel.tsx +105 -1
- package/src/components/viewer/Section2DPanel.tsx +58 -2
- package/src/components/viewer/StatusBar.tsx +18 -0
- package/src/components/viewer/ViewerLayout.tsx +53 -4
- package/src/components/viewer/Viewport.tsx +72 -0
- package/src/hooks/useActionLogger.test.ts +161 -0
- package/src/hooks/useActionLogger.ts +141 -0
- package/src/hooks/useForkExtension.ts +51 -0
- package/src/hooks/useIfcFederation.ts +7 -1
- package/src/hooks/useInstalledExtensions.ts +43 -0
- package/src/hooks/usePrivacyDisclosure.ts +48 -0
- package/src/hooks/useRunExtensionTests.ts +67 -0
- package/src/hooks/useSlotContributions.ts +38 -0
- package/src/hooks/useSymbolicAnnotations.test.ts +124 -0
- package/src/hooks/useSymbolicAnnotations.ts +776 -0
- package/src/lib/desktop-product.ts +7 -1
- package/src/lib/lens/adapter.ts +14 -0
- package/src/lib/llm/prompt-cache.ts +77 -0
- package/src/lib/llm/stream-client.ts +20 -2
- package/src/lib/llm/stream-direct.ts +11 -1
- package/src/lib/llm/system-prompt.ts +42 -0
- package/src/lib/safe-mode.ts +30 -0
- package/src/sdk/ExtensionHostProvider.tsx +103 -0
- package/src/services/extensions/flavor-service.ts +183 -0
- package/src/services/extensions/host-commands.ts +112 -0
- package/src/services/extensions/host-installer.ts +289 -0
- package/src/services/extensions/host.ts +514 -0
- package/src/services/extensions/idb-flavor-storage.test.ts +140 -0
- package/src/services/extensions/idb-flavor-storage.ts +241 -0
- package/src/services/extensions/idb-log-storage.test.ts +110 -0
- package/src/services/extensions/idb-log-storage.ts +171 -0
- package/src/services/extensions/idb-storage.ts +228 -0
- package/src/services/extensions/runtime-errors.ts +26 -0
- package/src/services/extensions/sandbox-factory.ts +217 -0
- package/src/store/constants.ts +48 -6
- package/src/store/index.ts +6 -1
- package/src/store/slices/drawing2DSlice.ts +8 -0
- package/src/store/slices/extensionsSlice.ts +90 -0
- package/src/store/slices/lensSlice.ts +28 -0
- package/src/store/slices/visibilitySlice.test.ts +6 -0
- package/src/store/slices/visibilitySlice.ts +17 -8
- package/src/store/types.ts +2 -0
- package/dist/assets/geometry-controller.worker-Cm5pvyR6.js +0 -7
- package/dist/assets/geometry.worker-ClNvXIrj.js +0 -1
- package/dist/assets/ifc-lite-BDg0iIbj.js +0 -7
- package/dist/assets/index-DS_xJQfP.css +0 -1
- package/dist/assets/lens-CpjUdqpw.js +0 -1
- package/dist/assets/raw-DzTtEZIY.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import { h as
|
|
3
|
-
let
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dr88ZlSY.js","assets/zip-BJqVbRkU.js","assets/arrow-CXWhTnNT.js","assets/exporters-DZhLN0ux.js","assets/drawing-2d-C71b8Ugx.js","assets/lens-PYsLu_MA.js","assets/bcf-DXGDhw56.js","assets/server-client-CmzJOeS7.js","assets/ids-DruUNtfD.js","assets/three-CQBzFWY2.js","assets/index-Bws3UAkj.css","assets/browser-DXS29_v9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { h as Ss, B as tr } from "./lens-PYsLu_MA.js";
|
|
3
|
+
let cc, ec, Mc, Di, gT, J, DT, nc, Dc, Xt, Ye, WT, jt, XT, gn, uc, wi, _i, Hr, SI, vt, Lc, Aa, Rc, rc, oc, Cc, Ue, bo, Va, Ic, fc, pc, Tc, Ac, lc, Ec, Kr, Xr, Oc, or, Pc, Yl, he, Dr, Sc, Ll, mc, Wr, wr, Nc, oe, gc, aI, zi, Qr, Ba, vr, _T, xc, La, _r, Pa, Sr, Li, ur, _t, Ar, Ma, dc, yc, nI, Sa, Oa, KT, ac, QT, Rt, Fc, H, yt, $t, x, ye, PT, bc, U, Bs, jT, Je, JT, $T, zT, sc, ic, tc, ZT, fI, qT;
|
|
4
4
|
let __tla = (async ()=>{
|
|
5
5
|
Je = class {
|
|
6
6
|
strings = [
|
|
@@ -921,7 +921,7 @@ let __tla = (async ()=>{
|
|
|
921
921
|
$t = function(i) {
|
|
922
922
|
return sr.get(i) ?? "Unknown";
|
|
923
923
|
};
|
|
924
|
-
const
|
|
924
|
+
const da = {
|
|
925
925
|
IFCACTIONREQUEST: "IfcActionRequest",
|
|
926
926
|
IFCACTOR: "IfcActor",
|
|
927
927
|
IFCACTORROLE: "IfcActorRole",
|
|
@@ -1800,9 +1800,9 @@ let __tla = (async ()=>{
|
|
|
1800
1800
|
IFCZONE: "IfcZone"
|
|
1801
1801
|
};
|
|
1802
1802
|
function ar(i) {
|
|
1803
|
-
return
|
|
1803
|
+
return da[i] ?? i;
|
|
1804
1804
|
}
|
|
1805
|
-
class
|
|
1805
|
+
class Wi {
|
|
1806
1806
|
count = 0;
|
|
1807
1807
|
strings;
|
|
1808
1808
|
expressId;
|
|
@@ -1838,7 +1838,7 @@ let __tla = (async ()=>{
|
|
|
1838
1838
|
end: a + n
|
|
1839
1839
|
});
|
|
1840
1840
|
}
|
|
1841
|
-
return
|
|
1841
|
+
return Aa({
|
|
1842
1842
|
count: this.count,
|
|
1843
1843
|
expressId: e(this.expressId),
|
|
1844
1844
|
typeEnum: e(this.typeEnum),
|
|
@@ -1855,7 +1855,7 @@ let __tla = (async ()=>{
|
|
|
1855
1855
|
}, this.strings);
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
|
-
|
|
1858
|
+
Aa = function(i, e) {
|
|
1859
1859
|
const { count: t, expressId: s, typeEnum: a, globalId: n, name: r, description: I, objectType: E, flags: l, containedInStorey: o, definedByType: c, geometryIndex: f } = i, T = i.rawTypeName ?? new Uint32Array(t), p = new Map;
|
|
1860
1860
|
for(let m = 0; m < t; m++){
|
|
1861
1861
|
const A = a[m];
|
|
@@ -1946,7 +1946,7 @@ let __tla = (async ()=>{
|
|
|
1946
1946
|
typeRanges: i.typeRanges
|
|
1947
1947
|
};
|
|
1948
1948
|
}
|
|
1949
|
-
|
|
1949
|
+
wi = class {
|
|
1950
1950
|
strings;
|
|
1951
1951
|
rows = [];
|
|
1952
1952
|
constructor(e){
|
|
@@ -1985,7 +1985,7 @@ let __tla = (async ()=>{
|
|
|
1985
1985
|
}
|
|
1986
1986
|
T.unitId !== void 0 && (c[f] = T.unitId);
|
|
1987
1987
|
}
|
|
1988
|
-
return
|
|
1988
|
+
return Sa({
|
|
1989
1989
|
count: e,
|
|
1990
1990
|
entityId: t,
|
|
1991
1991
|
psetName: s,
|
|
@@ -2000,7 +2000,7 @@ let __tla = (async ()=>{
|
|
|
2000
2000
|
}, this.strings);
|
|
2001
2001
|
}
|
|
2002
2002
|
};
|
|
2003
|
-
|
|
2003
|
+
Sa = function(i, e) {
|
|
2004
2004
|
const { count: t, entityId: s, psetName: a, psetGlobalId: n, propName: r, propType: I, valueString: E, valueReal: l, valueInt: o, valueBool: c, unitId: f } = i, T = new Map, p = new Map, C = new Map;
|
|
2005
2005
|
for(let y = 0; y < t; y++)Ii(T, s[y], y), Ii(p, a[y], y), Ii(C, r[y], y);
|
|
2006
2006
|
const R = {
|
|
@@ -2130,7 +2130,7 @@ let __tla = (async ()=>{
|
|
|
2130
2130
|
}
|
|
2131
2131
|
return !1;
|
|
2132
2132
|
}
|
|
2133
|
-
|
|
2133
|
+
_i = class {
|
|
2134
2134
|
strings;
|
|
2135
2135
|
rows = [];
|
|
2136
2136
|
constructor(e){
|
|
@@ -2145,7 +2145,7 @@ let __tla = (async ()=>{
|
|
|
2145
2145
|
const o = this.rows[l];
|
|
2146
2146
|
t[l] = o.entityId, s[l] = this.strings.intern(o.qsetName), a[l] = this.strings.intern(o.quantityName), n[l] = o.quantityType, r[l] = o.value, o.unitId !== void 0 && (I[l] = o.unitId), o.formula && (E[l] = this.strings.intern(o.formula));
|
|
2147
2147
|
}
|
|
2148
|
-
return
|
|
2148
|
+
return Oa({
|
|
2149
2149
|
count: e,
|
|
2150
2150
|
entityId: t,
|
|
2151
2151
|
qsetName: s,
|
|
@@ -2157,7 +2157,7 @@ let __tla = (async ()=>{
|
|
|
2157
2157
|
}, this.strings);
|
|
2158
2158
|
}
|
|
2159
2159
|
};
|
|
2160
|
-
|
|
2160
|
+
Oa = function(i, e) {
|
|
2161
2161
|
const { count: t, entityId: s, qsetName: a, quantityName: n, quantityType: r, value: I, unitId: E, formula: l } = i, o = new Map, c = new Map, f = new Map;
|
|
2162
2162
|
for(let T = 0; T < t; T++)li(o, s[T], T), li(c, a[T], T), li(f, n[T], T);
|
|
2163
2163
|
return {
|
|
@@ -2221,7 +2221,7 @@ let __tla = (async ()=>{
|
|
|
2221
2221
|
let s = i.get(e);
|
|
2222
2222
|
s || (s = [], i.set(e, s)), s.push(t);
|
|
2223
2223
|
}
|
|
2224
|
-
class
|
|
2224
|
+
class Xi {
|
|
2225
2225
|
_sources = [];
|
|
2226
2226
|
_targets = [];
|
|
2227
2227
|
_types = [];
|
|
@@ -2231,7 +2231,7 @@ let __tla = (async ()=>{
|
|
|
2231
2231
|
}
|
|
2232
2232
|
build() {
|
|
2233
2233
|
const e = this._sources.length, t = Fi(e, this._sources, this._targets, this._types, this._relIds), s = Fi(e, this._targets, this._sources, this._types, this._relIds);
|
|
2234
|
-
return
|
|
2234
|
+
return ji(t, s);
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
2237
|
function Fi(i, e, t, s, a) {
|
|
@@ -2294,7 +2294,7 @@ let __tla = (async ()=>{
|
|
|
2294
2294
|
};
|
|
2295
2295
|
return r;
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2297
|
+
function ji(i, e) {
|
|
2298
2298
|
return {
|
|
2299
2299
|
forward: i,
|
|
2300
2300
|
inverse: e,
|
|
@@ -2308,7 +2308,7 @@ let __tla = (async ()=>{
|
|
|
2308
2308
|
};
|
|
2309
2309
|
}
|
|
2310
2310
|
or = function(i) {
|
|
2311
|
-
return
|
|
2311
|
+
return ji(mt(i.forward), mt(i.inverse));
|
|
2312
2312
|
};
|
|
2313
2313
|
function Tr(i) {
|
|
2314
2314
|
return {
|
|
@@ -2347,7 +2347,7 @@ let __tla = (async ()=>{
|
|
|
2347
2347
|
[U.ReferencedInSpatialStructure]: "IfcRelReferencedInSpatialStructure"
|
|
2348
2348
|
}[i] || "Unknown";
|
|
2349
2349
|
}
|
|
2350
|
-
const
|
|
2350
|
+
const Ki = [
|
|
2351
2351
|
H.IfcProject,
|
|
2352
2352
|
H.IfcSite,
|
|
2353
2353
|
H.IfcBuilding,
|
|
@@ -2362,25 +2362,25 @@ let __tla = (async ()=>{
|
|
|
2362
2362
|
H.IfcRailway,
|
|
2363
2363
|
H.IfcRailwayPart,
|
|
2364
2364
|
H.IfcMarineFacility
|
|
2365
|
-
],
|
|
2365
|
+
], Qi = [
|
|
2366
2366
|
H.IfcBuilding,
|
|
2367
2367
|
H.IfcFacility,
|
|
2368
2368
|
H.IfcBridge,
|
|
2369
2369
|
H.IfcRoad,
|
|
2370
2370
|
H.IfcRailway,
|
|
2371
2371
|
H.IfcMarineFacility
|
|
2372
|
-
], Oa = [
|
|
2373
|
-
H.IfcBuildingStorey
|
|
2374
2372
|
], Na = [
|
|
2373
|
+
H.IfcBuildingStorey
|
|
2374
|
+
], Fa = [
|
|
2375
2375
|
H.IfcSpace
|
|
2376
|
-
], fr = new Set(
|
|
2376
|
+
], fr = new Set(Ki), pr = new Set(Qi), Cr = new Set(Na), Rr = new Set(Fa), mr = new Set(Ki.map((i)=>$t(i))), yr = new Set(Qi.map((i)=>$t(i)));
|
|
2377
2377
|
Li = function(i) {
|
|
2378
2378
|
return fr.has(i);
|
|
2379
2379
|
};
|
|
2380
2380
|
ur = function(i) {
|
|
2381
2381
|
return i ? mr.has(i) : !1;
|
|
2382
2382
|
};
|
|
2383
|
-
|
|
2383
|
+
La = function(i) {
|
|
2384
2384
|
return pr.has(i);
|
|
2385
2385
|
};
|
|
2386
2386
|
function dr(i) {
|
|
@@ -2392,18 +2392,18 @@ let __tla = (async ()=>{
|
|
|
2392
2392
|
Ar = function(i) {
|
|
2393
2393
|
return i ? _t(yt(i)) : !1;
|
|
2394
2394
|
};
|
|
2395
|
-
|
|
2395
|
+
Pa = function(i) {
|
|
2396
2396
|
return Rr.has(i);
|
|
2397
2397
|
};
|
|
2398
2398
|
Sr = function(i) {
|
|
2399
|
-
return i ?
|
|
2399
|
+
return i ? Pa(yt(i)) : !1;
|
|
2400
2400
|
};
|
|
2401
|
-
let Or, Nr,
|
|
2401
|
+
let Or, Nr, Os;
|
|
2402
2402
|
Or = "modulepreload";
|
|
2403
2403
|
Nr = function(i) {
|
|
2404
2404
|
return "/" + i;
|
|
2405
2405
|
};
|
|
2406
|
-
|
|
2406
|
+
Os = {};
|
|
2407
2407
|
Ue = function(e, t, s) {
|
|
2408
2408
|
let a = Promise.resolve();
|
|
2409
2409
|
if (t && t.length > 0) {
|
|
@@ -2419,8 +2419,8 @@ let __tla = (async ()=>{
|
|
|
2419
2419
|
document.getElementsByTagName("link");
|
|
2420
2420
|
const r = document.querySelector("meta[property=csp-nonce]"), I = r?.nonce || r?.getAttribute("nonce");
|
|
2421
2421
|
a = E(t.map((l)=>{
|
|
2422
|
-
if (l = Nr(l), l in
|
|
2423
|
-
|
|
2422
|
+
if (l = Nr(l), l in Os) return;
|
|
2423
|
+
Os[l] = !0;
|
|
2424
2424
|
const o = l.endsWith(".css"), c = o ? '[rel="stylesheet"]' : "";
|
|
2425
2425
|
if (document.querySelector(`link[href="${l}"]${c}`)) return;
|
|
2426
2426
|
const f = document.createElement("link");
|
|
@@ -2444,7 +2444,7 @@ let __tla = (async ()=>{
|
|
|
2444
2444
|
function Fr(i) {
|
|
2445
2445
|
return i.trim().toLowerCase();
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2447
|
+
function ga(i, e = 25) {
|
|
2448
2448
|
const t = typeof i == "number" ? i : Number(i);
|
|
2449
2449
|
return Number.isFinite(t) ? Math.max(1, Math.floor(t)) : e;
|
|
2450
2450
|
}
|
|
@@ -2470,7 +2470,7 @@ let __tla = (async ()=>{
|
|
|
2470
2470
|
throw Ft = null, i;
|
|
2471
2471
|
})), Ft;
|
|
2472
2472
|
}
|
|
2473
|
-
async function
|
|
2473
|
+
async function Da() {
|
|
2474
2474
|
return Nt || (Nt = qt().then((i)=>new Map(i.map((e)=>[
|
|
2475
2475
|
e.code,
|
|
2476
2476
|
e
|
|
@@ -2478,28 +2478,28 @@ let __tla = (async ()=>{
|
|
|
2478
2478
|
throw Nt = null, i;
|
|
2479
2479
|
})), Nt;
|
|
2480
2480
|
}
|
|
2481
|
-
|
|
2481
|
+
Ma = async function(i, e = {}) {
|
|
2482
2482
|
const t = String(i).trim();
|
|
2483
2483
|
if (!t) return;
|
|
2484
2484
|
if (e.prefix) {
|
|
2485
|
-
const a =
|
|
2485
|
+
const a = ga(e.limit, 25), n = e.includeDeprecated ?? !1;
|
|
2486
2486
|
return (await qt()).filter((I)=>I.code.startsWith(t)).filter((I)=>n || !I.deprecated).sort((I, E)=>Number(I.code) - Number(E.code)).slice(0, a);
|
|
2487
2487
|
}
|
|
2488
|
-
return (await
|
|
2488
|
+
return (await Da()).get(t);
|
|
2489
2489
|
};
|
|
2490
2490
|
async function gr(i) {
|
|
2491
|
-
return (await
|
|
2491
|
+
return (await Ma(String(i).trim()))?.proj4;
|
|
2492
2492
|
}
|
|
2493
2493
|
Dr = async function(i, e = {}) {
|
|
2494
2494
|
const t = Fr(i);
|
|
2495
2495
|
if (!t) return [];
|
|
2496
|
-
const s =
|
|
2496
|
+
const s = ga(e.limit, 25), a = e.includeDeprecated ?? !1;
|
|
2497
2497
|
return (await qt()).filter((r)=>a || !r.deprecated).map((r)=>({
|
|
2498
2498
|
entry: r,
|
|
2499
2499
|
score: Lr(r, t)
|
|
2500
2500
|
})).filter((r)=>r.score > 0).sort((r, I)=>I.score - r.score || Number(r.entry.code) - Number(I.entry.code)).slice(0, s).map((r)=>r.entry);
|
|
2501
2501
|
};
|
|
2502
|
-
let Mr, br,
|
|
2502
|
+
let Mr, br, Ns, ba, xr, Ur, Fs, hr, Br, Ls, Gr, Yr, Ps, xa, Ua, Vr, kr;
|
|
2503
2503
|
Mr = [
|
|
2504
2504
|
{
|
|
2505
2505
|
name: "Contents",
|
|
@@ -44960,7 +44960,7 @@ let __tla = (async ()=>{
|
|
|
44960
44960
|
}
|
|
44961
44961
|
}
|
|
44962
44962
|
];
|
|
44963
|
-
|
|
44963
|
+
Ns = [
|
|
44964
44964
|
{
|
|
44965
44965
|
name: "GlobalId",
|
|
44966
44966
|
simpleValueEntities: [
|
|
@@ -70327,7 +70327,7 @@ let __tla = (async ()=>{
|
|
|
70327
70327
|
}
|
|
70328
70328
|
}
|
|
70329
70329
|
];
|
|
70330
|
-
|
|
70330
|
+
ba = [
|
|
70331
70331
|
{
|
|
70332
70332
|
name: "IFCABSORBEDDOSEMEASURE",
|
|
70333
70333
|
versions: [
|
|
@@ -101334,7 +101334,7 @@ let __tla = (async ()=>{
|
|
|
101334
101334
|
source: "Ifc4.ActorResource"
|
|
101335
101335
|
}
|
|
101336
101336
|
];
|
|
101337
|
-
|
|
101337
|
+
Fs = [
|
|
101338
101338
|
{
|
|
101339
101339
|
name: "IfcBorehole",
|
|
101340
101340
|
parent: "IfcGeotechnicalAssembly",
|
|
@@ -119664,7 +119664,7 @@ let __tla = (async ()=>{
|
|
|
119664
119664
|
member: "IFCELEMENT"
|
|
119665
119665
|
}
|
|
119666
119666
|
];
|
|
119667
|
-
|
|
119667
|
+
Ls = [
|
|
119668
119668
|
{
|
|
119669
119669
|
relation: "IFCRELAGGREGATES",
|
|
119670
119670
|
owner: "IFCOBJECTDEFINITION",
|
|
@@ -148252,7 +148252,7 @@ let __tla = (async ()=>{
|
|
|
148252
148252
|
]
|
|
148253
148253
|
}
|
|
148254
148254
|
];
|
|
148255
|
-
|
|
148255
|
+
Ps = [
|
|
148256
148256
|
{
|
|
148257
148257
|
name: "Pset_ActionRequest",
|
|
148258
148258
|
applicableEntities: [
|
|
@@ -179303,41 +179303,41 @@ let __tla = (async ()=>{
|
|
|
179303
179303
|
]
|
|
179304
179304
|
}
|
|
179305
179305
|
];
|
|
179306
|
-
|
|
179306
|
+
xa = {
|
|
179307
179307
|
IFC2X3: Mr,
|
|
179308
179308
|
IFC4: br,
|
|
179309
|
-
IFC4X3:
|
|
179310
|
-
IFC4X3_ADD2:
|
|
179309
|
+
IFC4X3: Ns,
|
|
179310
|
+
IFC4X3_ADD2: Ns
|
|
179311
179311
|
};
|
|
179312
179312
|
Hr = [
|
|
179313
179313
|
"Pset_",
|
|
179314
179314
|
"Qto_"
|
|
179315
179315
|
];
|
|
179316
|
-
|
|
179316
|
+
Ua = {
|
|
179317
179317
|
IFC2X3: xr,
|
|
179318
179318
|
IFC4: Ur,
|
|
179319
|
-
IFC4X3:
|
|
179320
|
-
IFC4X3_ADD2:
|
|
179319
|
+
IFC4X3: Fs,
|
|
179320
|
+
IFC4X3_ADD2: Fs
|
|
179321
179321
|
};
|
|
179322
179322
|
Vr = {
|
|
179323
179323
|
IFC2X3: Gr,
|
|
179324
179324
|
IFC4: Yr,
|
|
179325
|
-
IFC4X3:
|
|
179326
|
-
IFC4X3_ADD2:
|
|
179325
|
+
IFC4X3: Ps,
|
|
179326
|
+
IFC4X3_ADD2: Ps
|
|
179327
179327
|
};
|
|
179328
179328
|
kr = {
|
|
179329
179329
|
IFC2X3: hr,
|
|
179330
179330
|
IFC4: Br,
|
|
179331
|
-
IFC4X3:
|
|
179332
|
-
IFC4X3_ADD2:
|
|
179331
|
+
IFC4X3: Ls,
|
|
179332
|
+
IFC4X3_ADD2: Ls
|
|
179333
179333
|
};
|
|
179334
179334
|
function Zt(i) {
|
|
179335
|
-
if (!(i in
|
|
179335
|
+
if (!(i in Ua)) throw new Error(`Unsupported IFC schema version: ${i}`);
|
|
179336
179336
|
}
|
|
179337
|
-
async function
|
|
179338
|
-
return Zt(i),
|
|
179337
|
+
async function $i(i) {
|
|
179338
|
+
return Zt(i), Ua[i];
|
|
179339
179339
|
}
|
|
179340
|
-
async function
|
|
179340
|
+
async function ha(i) {
|
|
179341
179341
|
return Zt(i), Vr[i];
|
|
179342
179342
|
}
|
|
179343
179343
|
vr = async function(i) {
|
|
@@ -179345,13 +179345,13 @@ let __tla = (async ()=>{
|
|
|
179345
179345
|
};
|
|
179346
179346
|
Wr = async function(i, e) {
|
|
179347
179347
|
const t = e.toUpperCase();
|
|
179348
|
-
return (await
|
|
179348
|
+
return (await $i(i)).find((a)=>a.name.toUpperCase() === t);
|
|
179349
179349
|
};
|
|
179350
179350
|
wr = async function(i, e) {
|
|
179351
|
-
return (await
|
|
179351
|
+
return (await ha(i)).find((s)=>s.name === e);
|
|
179352
179352
|
};
|
|
179353
|
-
|
|
179354
|
-
const t = await
|
|
179353
|
+
Ba = async function(i, e) {
|
|
179354
|
+
const t = await $i(i), s = new Map;
|
|
179355
179355
|
for (const I of t)s.set(I.name.toUpperCase(), I);
|
|
179356
179356
|
const a = [];
|
|
179357
179357
|
let n = s.get(e.toUpperCase());
|
|
@@ -179360,22 +179360,22 @@ let __tla = (async ()=>{
|
|
|
179360
179360
|
return a;
|
|
179361
179361
|
};
|
|
179362
179362
|
_r = async function(i, e, t) {
|
|
179363
|
-
const s = await
|
|
179363
|
+
const s = await Ba(i, e), a = t.toUpperCase();
|
|
179364
179364
|
return s.some((n)=>n.name.toUpperCase() === a);
|
|
179365
179365
|
};
|
|
179366
179366
|
Xr = async function(i, e) {
|
|
179367
179367
|
const t = e.toUpperCase(), s = i === "IFC4X3_ADD2" ? "IFC4X3" : i;
|
|
179368
|
-
for (const a of
|
|
179368
|
+
for (const a of ba)if (a.name === t && a.versions.some((n)=>n === s || n === "IFC4X3" && i === "IFC4X3_ADD2")) return a;
|
|
179369
179369
|
};
|
|
179370
179370
|
async function jr(i) {
|
|
179371
179371
|
const e = i === "IFC4X3_ADD2" ? "IFC4X3" : i;
|
|
179372
|
-
return
|
|
179372
|
+
return ba.filter((t)=>t.versions.some((s)=>s === e || s === "IFC4X3" && i === "IFC4X3_ADD2"));
|
|
179373
179373
|
}
|
|
179374
|
-
async function
|
|
179375
|
-
return Zt(i),
|
|
179374
|
+
async function Ga(i) {
|
|
179375
|
+
return Zt(i), xa[i];
|
|
179376
179376
|
}
|
|
179377
179377
|
Kr = async function(i, e) {
|
|
179378
|
-
const t = await
|
|
179378
|
+
const t = await Ga(i), s = e.toLowerCase();
|
|
179379
179379
|
return t.find((a)=>a.name.toLowerCase() === s);
|
|
179380
179380
|
};
|
|
179381
179381
|
Qr = function(i, e, t) {
|
|
@@ -179384,11 +179384,11 @@ let __tla = (async ()=>{
|
|
|
179384
179384
|
const a = s.get(e.toUpperCase());
|
|
179385
179385
|
if (a) return a.get(t.toLowerCase());
|
|
179386
179386
|
};
|
|
179387
|
-
const
|
|
179387
|
+
const gs = new Map;
|
|
179388
179388
|
function $r(i) {
|
|
179389
|
-
const e =
|
|
179389
|
+
const e = xa[i];
|
|
179390
179390
|
if (!e) return;
|
|
179391
|
-
const t =
|
|
179391
|
+
const t = gs.get(i);
|
|
179392
179392
|
if (t) return t;
|
|
179393
179393
|
const s = new Map;
|
|
179394
179394
|
for (const a of e){
|
|
@@ -179407,14 +179407,14 @@ let __tla = (async ()=>{
|
|
|
179407
179407
|
} else E.set(n, I);
|
|
179408
179408
|
}
|
|
179409
179409
|
}
|
|
179410
|
-
return
|
|
179410
|
+
return gs.set(i, s), s;
|
|
179411
179411
|
}
|
|
179412
|
-
var
|
|
179412
|
+
var Ds = {};
|
|
179413
179413
|
function oi() {
|
|
179414
179414
|
if (typeof localStorage < "u") try {
|
|
179415
179415
|
return localStorage.getItem("IFC_DEBUG") === "true";
|
|
179416
179416
|
} catch {}
|
|
179417
|
-
return typeof process < "u" &&
|
|
179417
|
+
return typeof process < "u" && Ds ? Ds.IFC_DEBUG === "true" : !1;
|
|
179418
179418
|
}
|
|
179419
179419
|
function nt(i) {
|
|
179420
179420
|
let e = `[${i.component}]`;
|
|
@@ -179481,7 +179481,7 @@ ${i.stack}` : ""}` : String(i);
|
|
|
179481
179481
|
}
|
|
179482
179482
|
}, Pi = new TextDecoder;
|
|
179483
179483
|
let ve = null;
|
|
179484
|
-
function
|
|
179484
|
+
function Ya() {
|
|
179485
179485
|
if (ve !== null) return ve;
|
|
179486
179486
|
if (typeof SharedArrayBuffer > "u") return ve = !0, !0;
|
|
179487
179487
|
try {
|
|
@@ -179502,7 +179502,7 @@ ${i.stack}` : ""}` : String(i);
|
|
|
179502
179502
|
}
|
|
179503
179503
|
he = function(i, e, t) {
|
|
179504
179504
|
const s = e === void 0 && t === void 0 ? i : i.subarray(e ?? 0, t ?? i.length);
|
|
179505
|
-
if (
|
|
179505
|
+
if (Ya()) return Pi.decode(s);
|
|
179506
179506
|
const a = s.length;
|
|
179507
179507
|
if (a === 0) return "";
|
|
179508
179508
|
const n = Zr(a);
|
|
@@ -179510,65 +179510,65 @@ ${i.stack}` : ""}` : String(i);
|
|
|
179510
179510
|
};
|
|
179511
179511
|
_T = Object.freeze(Object.defineProperty({
|
|
179512
179512
|
__proto__: null,
|
|
179513
|
-
BUILDING_LIKE_SPATIAL_TYPE_ENUMS:
|
|
179513
|
+
BUILDING_LIKE_SPATIAL_TYPE_ENUMS: Qi,
|
|
179514
179514
|
EntityFlags: Rt,
|
|
179515
|
-
EntityTableBuilder:
|
|
179516
|
-
IFC_ENTITY_NAMES:
|
|
179515
|
+
EntityTableBuilder: Wi,
|
|
179516
|
+
IFC_ENTITY_NAMES: da,
|
|
179517
179517
|
IfcTypeEnum: H,
|
|
179518
179518
|
IfcTypeEnumFromString: yt,
|
|
179519
179519
|
IfcTypeEnumToString: $t,
|
|
179520
|
-
PropertyTableBuilder:
|
|
179520
|
+
PropertyTableBuilder: wi,
|
|
179521
179521
|
PropertyValueType: x,
|
|
179522
|
-
QuantityTableBuilder:
|
|
179522
|
+
QuantityTableBuilder: _i,
|
|
179523
179523
|
QuantityType: ye,
|
|
179524
179524
|
RESERVED_PSET_PREFIXES: Hr,
|
|
179525
|
-
RelationshipGraphBuilder:
|
|
179525
|
+
RelationshipGraphBuilder: Xi,
|
|
179526
179526
|
RelationshipType: U,
|
|
179527
|
-
SPACE_LIKE_SPATIAL_TYPE_ENUMS:
|
|
179528
|
-
SPATIAL_STRUCTURE_TYPE_ENUMS:
|
|
179529
|
-
STOREY_LIKE_SPATIAL_TYPE_ENUMS:
|
|
179527
|
+
SPACE_LIKE_SPATIAL_TYPE_ENUMS: Fa,
|
|
179528
|
+
SPATIAL_STRUCTURE_TYPE_ENUMS: Ki,
|
|
179529
|
+
STOREY_LIKE_SPATIAL_TYPE_ENUMS: Na,
|
|
179530
179530
|
StringTable: Je,
|
|
179531
179531
|
buildCSR: Fi,
|
|
179532
179532
|
createLogger: Ye,
|
|
179533
|
-
entityTableFromColumns:
|
|
179533
|
+
entityTableFromColumns: Aa,
|
|
179534
179534
|
entityTableToColumns: nr,
|
|
179535
179535
|
findAttribute: Kr,
|
|
179536
179536
|
findDataType: Xr,
|
|
179537
179537
|
findEntity: Wr,
|
|
179538
179538
|
findPropertySet: wr,
|
|
179539
179539
|
getAttributeXsdTypes: Qr,
|
|
179540
|
-
getAttributes:
|
|
179540
|
+
getAttributes: Ga,
|
|
179541
179541
|
getDataTypes: jr,
|
|
179542
|
-
getEntities:
|
|
179543
|
-
getInheritanceChain:
|
|
179542
|
+
getEntities: $i,
|
|
179543
|
+
getInheritanceChain: Ba,
|
|
179544
179544
|
getPartOfRelations: vr,
|
|
179545
|
-
getPropertySets:
|
|
179546
|
-
isBuildingLikeSpatialType:
|
|
179545
|
+
getPropertySets: ha,
|
|
179546
|
+
isBuildingLikeSpatialType: La,
|
|
179547
179547
|
isBuildingLikeSpatialTypeName: dr,
|
|
179548
179548
|
isEntitySubtypeOf: _r,
|
|
179549
|
-
isSpaceLikeSpatialType:
|
|
179549
|
+
isSpaceLikeSpatialType: Pa,
|
|
179550
179550
|
isSpaceLikeSpatialTypeName: Sr,
|
|
179551
179551
|
isSpatialStructureType: Li,
|
|
179552
179552
|
isSpatialStructureTypeName: ur,
|
|
179553
179553
|
isStoreyLikeSpatialType: _t,
|
|
179554
179554
|
isStoreyLikeSpatialTypeName: Ar,
|
|
179555
179555
|
loadEpsgIndex: qt,
|
|
179556
|
-
loadEpsgIndexByCode:
|
|
179556
|
+
loadEpsgIndexByCode: Da,
|
|
179557
179557
|
loadEpsgIndexDatasetVersion: Pr,
|
|
179558
179558
|
logger: qr,
|
|
179559
|
-
lookupEpsgByCode:
|
|
179559
|
+
lookupEpsgByCode: Ma,
|
|
179560
179560
|
lookupProj4: gr,
|
|
179561
|
-
propertyTableFromColumns:
|
|
179561
|
+
propertyTableFromColumns: Sa,
|
|
179562
179562
|
propertyTableToColumns: rr,
|
|
179563
|
-
quantityTableFromColumns:
|
|
179563
|
+
quantityTableFromColumns: Oa,
|
|
179564
179564
|
quantityTableToColumns: Er,
|
|
179565
179565
|
relationshipEdgesFromColumns: mt,
|
|
179566
179566
|
relationshipGraphFromColumns: or,
|
|
179567
|
-
relationshipGraphFromEdges:
|
|
179567
|
+
relationshipGraphFromEdges: ji,
|
|
179568
179568
|
relationshipGraphToColumns: Tr,
|
|
179569
179569
|
safeUtf8Decode: he,
|
|
179570
179570
|
searchEpsgIndex: Dr,
|
|
179571
|
-
textDecoderAcceptsSab:
|
|
179571
|
+
textDecoderAcceptsSab: Ya
|
|
179572
179572
|
}, Symbol.toStringTag, {
|
|
179573
179573
|
value: "Module"
|
|
179574
179574
|
}));
|
|
@@ -179581,7 +179581,7 @@ ${i.stack}` : ""}` : String(i);
|
|
|
179581
179581
|
function Pt(i, e, t) {
|
|
179582
179582
|
return `${i}:${e}:${t}`;
|
|
179583
179583
|
}
|
|
179584
|
-
function
|
|
179584
|
+
function Ms(i, e) {
|
|
179585
179585
|
return `${i}:attr:${e}`;
|
|
179586
179586
|
}
|
|
179587
179587
|
XT = class {
|
|
@@ -179972,7 +179972,7 @@ ${i.stack}` : ""}` : String(i);
|
|
|
179972
179972
|
return I || this.mutationHistory.push(C), C;
|
|
179973
179973
|
}
|
|
179974
179974
|
setAttribute(e, t, s, a, n = !1) {
|
|
179975
|
-
const r =
|
|
179975
|
+
const r = Ms(e, t);
|
|
179976
179976
|
this.attributeMutations.set(r, {
|
|
179977
179977
|
attribute: t,
|
|
179978
179978
|
value: s,
|
|
@@ -180106,7 +180106,7 @@ ${i.stack}` : ""}` : String(i);
|
|
|
180106
180106
|
}
|
|
180107
180107
|
}
|
|
180108
180108
|
removeAttributeMutation(e, t) {
|
|
180109
|
-
const s =
|
|
180109
|
+
const s = Ms(e, t);
|
|
180110
180110
|
this.attributeMutations.delete(s);
|
|
180111
180111
|
}
|
|
180112
180112
|
getMutations() {
|
|
@@ -180685,10 +180685,10 @@ ${i.stack}` : ""}` : String(i);
|
|
|
180685
180685
|
const e = i.toString();
|
|
180686
180686
|
return e.includes("e") || e.includes("E") ? i.toFixed(10).replace(/0+$/, "0") : e.includes(".") ? e : e + ".";
|
|
180687
180687
|
}
|
|
180688
|
-
function
|
|
180688
|
+
function Ha(i) {
|
|
180689
180689
|
return Math.sqrt(i[0] * i[0] + i[1] * i[1] + i[2] * i[2]);
|
|
180690
180690
|
}
|
|
180691
|
-
const
|
|
180691
|
+
const bs = new Set([
|
|
180692
180692
|
"IFCBUILDING",
|
|
180693
180693
|
"IFCSITE",
|
|
180694
180694
|
"IFCBUILDINGSTOREY",
|
|
@@ -180699,7 +180699,7 @@ ${i.stack}` : ""}` : String(i);
|
|
|
180699
180699
|
"IFCGROUP"
|
|
180700
180700
|
]);
|
|
180701
180701
|
function z(i) {
|
|
180702
|
-
const e =
|
|
180702
|
+
const e = Ha(i);
|
|
180703
180703
|
if (e === 0) throw new Error("Cannot normalize zero-length vector (check that Start and End are not identical)");
|
|
180704
180704
|
return [
|
|
180705
180705
|
i[0] / e,
|
|
@@ -181958,7 +181958,7 @@ ENDSEC;
|
|
|
181958
181958
|
]), E = this.addProductDefinitionShape([
|
|
181959
181959
|
I
|
|
181960
181960
|
]), l = this.id(), o = this.newGlobalId(), c = t.Name ?? t.IfcType, f = t.Description ? `'${S(t.Description)}'` : "$", T = t.ObjectType ? `'${S(t.ObjectType)}'` : "$", p = t.Tag ? `'${S(t.Tag)}'` : "$", C = t.IfcType.toUpperCase();
|
|
181961
|
-
if (
|
|
181961
|
+
if (bs.has(C)) this.line(l, t.IfcType, `'${o}',#${this.ownerHistoryId},'${S(c)}',${f},${T},#${s},#${E}`);
|
|
181962
181962
|
else {
|
|
181963
181963
|
const R = t.PredefinedType ? `.${t.PredefinedType}.` : ".NOTDEFINED.";
|
|
181964
181964
|
this.line(l, t.IfcType, `'${o}',#${this.ownerHistoryId},'${S(c)}',${f},${T},#${s},#${E},${p},${R}`);
|
|
@@ -181982,7 +181982,7 @@ ENDSEC;
|
|
|
181982
181982
|
0,
|
|
181983
181983
|
1
|
|
181984
181984
|
]);
|
|
181985
|
-
|
|
181985
|
+
Ha(l) < 1e-6 && (l = $e(I, [
|
|
181986
181986
|
1,
|
|
181987
181987
|
0,
|
|
181988
181988
|
0
|
|
@@ -181996,7 +181996,7 @@ ENDSEC;
|
|
|
181996
181996
|
]), p = this.addProductDefinitionShape([
|
|
181997
181997
|
T
|
|
181998
181998
|
]), C = this.id(), R = this.newGlobalId(), y = t.Name ?? t.IfcType, u = t.Description ? `'${S(t.Description)}'` : "$", m = t.ObjectType ? `'${S(t.ObjectType)}'` : "$", A = t.Tag ? `'${S(t.Tag)}'` : "$", d = t.IfcType.toUpperCase();
|
|
181999
|
-
if (
|
|
181999
|
+
if (bs.has(d)) this.line(C, t.IfcType, `'${R}',#${this.ownerHistoryId},'${S(y)}',${u},${m},#${o},#${p}`);
|
|
182000
182000
|
else {
|
|
182001
182001
|
const O = t.PredefinedType ? `.${t.PredefinedType}.` : ".NOTDEFINED.";
|
|
182002
182002
|
this.line(C, t.IfcType, `'${R}',#${this.ownerHistoryId},'${S(y)}',${u},${m},#${o},#${p},${A},${O}`);
|
|
@@ -182222,7 +182222,7 @@ ENDSEC;
|
|
|
182222
182222
|
".T.": "True",
|
|
182223
182223
|
".F.": "False",
|
|
182224
182224
|
".U.": "Unknown"
|
|
182225
|
-
},
|
|
182225
|
+
}, xs = {
|
|
182226
182226
|
IFCBOOLEAN: "Boolean",
|
|
182227
182227
|
IFCLOGICAL: "Logical",
|
|
182228
182228
|
IFCIDENTIFIER: "Identifier",
|
|
@@ -182251,7 +182251,7 @@ ENDSEC;
|
|
|
182251
182251
|
displayValue: "—"
|
|
182252
182252
|
};
|
|
182253
182253
|
if (Array.isArray(i) && i.length === 2 && typeof i[0] == "string") {
|
|
182254
|
-
const [e, t] = i, s = e.toUpperCase(), a =
|
|
182254
|
+
const [e, t] = i, s = e.toUpperCase(), a = xs[s] || s.replace(/^IFC/, "");
|
|
182255
182255
|
return {
|
|
182256
182256
|
displayValue: nI(t).displayValue,
|
|
182257
182257
|
ifcType: a
|
|
@@ -182265,7 +182265,7 @@ ENDSEC;
|
|
|
182265
182265
|
};
|
|
182266
182266
|
const t = i.match(/^(IFC[A-Z0-9_]+),(.*)$/i);
|
|
182267
182267
|
if (t) {
|
|
182268
|
-
const [, s, a] = t, n = s.toUpperCase(), r =
|
|
182268
|
+
const [, s, a] = t, n = s.toUpperCase(), r = xs[n] || n.replace(/^IFC/, "");
|
|
182269
182269
|
if (!a || a.trim() === "") return {
|
|
182270
182270
|
displayValue: "—",
|
|
182271
182271
|
ifcType: r
|
|
@@ -182483,7 +182483,7 @@ ENDSEC;
|
|
|
182483
182483
|
relContainedId: X
|
|
182484
182484
|
};
|
|
182485
182485
|
};
|
|
182486
|
-
const
|
|
182486
|
+
const Us = 1e-6;
|
|
182487
182487
|
function rI(i) {
|
|
182488
182488
|
return i.Profile === "polygon";
|
|
182489
182489
|
}
|
|
@@ -182507,7 +182507,7 @@ ENDSEC;
|
|
|
182507
182507
|
}
|
|
182508
182508
|
function EI(i, e) {
|
|
182509
182509
|
if (e.length < 3) throw new Error("addSlabToStore: polygon OuterCurve needs at least 3 points");
|
|
182510
|
-
const t = e[0], s = e[e.length - 1], r = (Math.abs(t[0] - s[0]) <
|
|
182510
|
+
const t = e[0], s = e[e.length - 1], r = (Math.abs(t[0] - s[0]) < Us && Math.abs(t[1] - s[1]) < Us ? e : [
|
|
182511
182511
|
...e,
|
|
182512
182512
|
t
|
|
182513
182513
|
]).map((E)=>i.addEntity("IfcCartesianPoint", [
|
|
@@ -182715,7 +182715,7 @@ ENDSEC;
|
|
|
182715
182715
|
relContainedId: L
|
|
182716
182716
|
};
|
|
182717
182717
|
};
|
|
182718
|
-
const
|
|
182718
|
+
const hs = 1e-6;
|
|
182719
182719
|
function ze(i, e, t, s, a) {
|
|
182720
182720
|
const n = i.addEntity("IfcCartesianPoint", [
|
|
182721
182721
|
t
|
|
@@ -182751,9 +182751,9 @@ ENDSEC;
|
|
|
182751
182751
|
t
|
|
182752
182752
|
]).expressId;
|
|
182753
182753
|
}
|
|
182754
|
-
function
|
|
182754
|
+
function qi(i, e) {
|
|
182755
182755
|
if (e.length < 3) throw new Error("emitPolygonProfile: outline needs at least 3 points");
|
|
182756
|
-
const t = e[0], s = e[e.length - 1], r = (Math.abs(t[0] - s[0]) <
|
|
182756
|
+
const t = e[0], s = e[e.length - 1], r = (Math.abs(t[0] - s[0]) < hs && Math.abs(t[1] - s[1]) < hs ? e : [
|
|
182757
182757
|
...e,
|
|
182758
182758
|
t
|
|
182759
182759
|
]).map((E)=>i.addEntity("IfcCartesianPoint", [
|
|
@@ -182925,7 +182925,7 @@ ENDSEC;
|
|
|
182925
182925
|
] : t.Position;
|
|
182926
182926
|
if (t.Height <= 0) throw new Error("addSpaceToStore: Height must be positive");
|
|
182927
182927
|
if (!s && (t.Width <= 0 || t.Depth <= 0)) throw new Error("addSpaceToStore: Width and Depth must be positive");
|
|
182928
|
-
const n = ze(i, e.storeyPlacementId, a), r = s ?
|
|
182928
|
+
const n = ze(i, e.storeyPlacementId, a), r = s ? qi(i, t.OuterCurve) : et(i, t.Width, t.Depth, t.Width / 2, t.Depth / 2), I = tt(i, r, t.Height), { shapeRepId: E, productShapeId: l } = it(i, e.bodyContextId, I), o = [
|
|
182929
182929
|
oe(),
|
|
182930
182930
|
`#${e.ownerHistoryId}`,
|
|
182931
182931
|
t.Name ?? "Space",
|
|
@@ -182968,7 +182968,7 @@ ENDSEC;
|
|
|
182968
182968
|
] : t.Position;
|
|
182969
182969
|
if (t.Thickness <= 0) throw new Error("addRoofToStore: Thickness must be positive");
|
|
182970
182970
|
if (!s && (t.Width <= 0 || t.Depth <= 0)) throw new Error("addRoofToStore: Width and Depth must be positive");
|
|
182971
|
-
const n = ze(i, e.storeyPlacementId, a), r = s ?
|
|
182971
|
+
const n = ze(i, e.storeyPlacementId, a), r = s ? qi(i, t.OuterCurve) : et(i, t.Width, t.Depth, t.Width / 2, t.Depth / 2), I = tt(i, r, t.Thickness), { shapeRepId: E, productShapeId: l } = it(i, e.bodyContextId, I), o = dt(e.ownerHistoryId, n, l, t, "Roof");
|
|
182972
182972
|
(e.schema ?? "IFC4") !== "IFC2X3" && o.push(".FLAT_ROOF.");
|
|
182973
182973
|
const c = i.addEntity("IfcRoof", o).expressId, f = ut(i, e.ownerHistoryId, c, e.storeyId);
|
|
182974
182974
|
return {
|
|
@@ -182992,7 +182992,7 @@ ENDSEC;
|
|
|
182992
182992
|
] : t.Position;
|
|
182993
182993
|
if (t.Thickness <= 0) throw new Error("addPlateToStore: Thickness must be positive");
|
|
182994
182994
|
if (!s && (t.Width <= 0 || t.Depth <= 0)) throw new Error("addPlateToStore: Width and Depth must be positive");
|
|
182995
|
-
const n = ze(i, e.storeyPlacementId, a), r = s ?
|
|
182995
|
+
const n = ze(i, e.storeyPlacementId, a), r = s ? qi(i, t.OuterCurve) : et(i, t.Width, t.Depth, t.Width / 2, t.Depth / 2), I = tt(i, r, t.Thickness), { shapeRepId: E, productShapeId: l } = it(i, e.bodyContextId, I), o = dt(e.ownerHistoryId, n, l, t, "Plate");
|
|
182996
182996
|
(e.schema ?? "IFC4") !== "IFC2X3" && o.push(`.${t.PredefinedType ?? "NOTDEFINED"}.`);
|
|
182997
182997
|
const c = i.addEntity("IfcPlate", o).expressId, f = ut(i, e.ownerHistoryId, c, e.storeyId);
|
|
182998
182998
|
return {
|
|
@@ -183038,7 +183038,7 @@ ENDSEC;
|
|
|
183038
183038
|
relContainedId: R
|
|
183039
183039
|
};
|
|
183040
183040
|
};
|
|
183041
|
-
|
|
183041
|
+
Bs = class {
|
|
183042
183042
|
buffer;
|
|
183043
183043
|
position = 0;
|
|
183044
183044
|
lineNumber = 1;
|
|
@@ -183220,7 +183220,7 @@ ENDSEC;
|
|
|
183220
183220
|
};
|
|
183221
183221
|
}
|
|
183222
183222
|
}
|
|
183223
|
-
const
|
|
183223
|
+
const Gs = Ye("EntityExtractor"), yI = 100;
|
|
183224
183224
|
J = class {
|
|
183225
183225
|
buffer;
|
|
183226
183226
|
constructor(e){
|
|
@@ -183237,7 +183237,7 @@ ENDSEC;
|
|
|
183237
183237
|
attributes: I
|
|
183238
183238
|
};
|
|
183239
183239
|
} catch (t) {
|
|
183240
|
-
return
|
|
183240
|
+
return Gs.error("Failed to extract entity", t, {
|
|
183241
183241
|
operation: "extractEntity",
|
|
183242
183242
|
entityId: e.expressId,
|
|
183243
183243
|
entityType: e.type
|
|
@@ -183264,7 +183264,7 @@ ENDSEC;
|
|
|
183264
183264
|
return a.trim() && t.push(this.parseAttributeValue(a.trim())), t;
|
|
183265
183265
|
}
|
|
183266
183266
|
parseAttributeValue(e, t = 0) {
|
|
183267
|
-
if (t > yI) return
|
|
183267
|
+
if (t > yI) return Gs.warn("Maximum parse depth exceeded - truncating nested structure", {
|
|
183268
183268
|
operation: "parseAttributeValue",
|
|
183269
183269
|
data: {
|
|
183270
183270
|
depth: t,
|
|
@@ -183413,7 +183413,7 @@ ENDSEC;
|
|
|
183413
183413
|
return this.expressIds.byteLength + this.byteOffsets.byteLength + this.byteLengths.byteLength + this.typeIndices.byteLength + this.typeStrings.reduce((e, t)=>e + t.length * 2, 0);
|
|
183414
183414
|
}
|
|
183415
183415
|
};
|
|
183416
|
-
function
|
|
183416
|
+
function Ys() {
|
|
183417
183417
|
const i = globalThis.scheduler;
|
|
183418
183418
|
return typeof i?.yield == "function" ? i.yield() : new Promise((e)=>{
|
|
183419
183419
|
const t = new MessageChannel;
|
|
@@ -183470,17 +183470,17 @@ ENDSEC;
|
|
|
183470
183470
|
return new Di(this.expressIds.slice(0, t), this.byteOffsets.slice(0, t), this.byteLengths.slice(0, t), this.typeIndices.slice(0, t), this.typeStrings, e);
|
|
183471
183471
|
}
|
|
183472
183472
|
};
|
|
183473
|
-
async function
|
|
183473
|
+
async function Hs(i, e, t = 8192, s = 50) {
|
|
183474
183474
|
const a = i.length;
|
|
183475
183475
|
let n = performance.now(), r = !0;
|
|
183476
|
-
for(let p = 1; p < a; p++)if (p % t === 0 && performance.now() - n >= s && (await
|
|
183476
|
+
for(let p = 1; p < a; p++)if (p % t === 0 && performance.now() - n >= s && (await Ys(), n = performance.now()), i[p].expressId < i[p - 1].expressId) {
|
|
183477
183477
|
r = !1;
|
|
183478
183478
|
break;
|
|
183479
183479
|
}
|
|
183480
183480
|
const I = r ? i : i.slice().sort((p, C)=>p.expressId - C.expressId), E = new Map, l = [], o = new Uint32Array(a), c = new Uint32Array(a), f = new Uint32Array(a), T = new Uint16Array(a);
|
|
183481
183481
|
n = performance.now();
|
|
183482
183482
|
for(let p = 0; p < a; p++){
|
|
183483
|
-
p % t === 0 && performance.now() - n >= s && (await
|
|
183483
|
+
p % t === 0 && performance.now() - n >= s && (await Ys(), n = performance.now());
|
|
183484
183484
|
const C = I[p];
|
|
183485
183485
|
o[p] = C.expressId, c[p] = C.byteOffset, f[p] = C.byteLength;
|
|
183486
183486
|
let R = E.get(C.type);
|
|
@@ -183685,7 +183685,7 @@ ENDSEC;
|
|
|
183685
183685
|
d.push(g);
|
|
183686
183686
|
}
|
|
183687
183687
|
}
|
|
183688
|
-
if (_t(C) ? I.set(e, m) :
|
|
183688
|
+
if (_t(C) ? I.set(e, m) : La(C) ? E.set(e, m) : C === H.IfcSite ? l.set(e, m) : C === H.IfcSpace && o.set(e, m), _t(C)) for (const O of m)f.set(O, e);
|
|
183689
183689
|
return {
|
|
183690
183690
|
expressId: e,
|
|
183691
183691
|
type: C,
|
|
@@ -183725,7 +183725,7 @@ ENDSEC;
|
|
|
183725
183725
|
}
|
|
183726
183726
|
}
|
|
183727
183727
|
};
|
|
183728
|
-
const
|
|
183728
|
+
const Vs = {
|
|
183729
183729
|
ATTO: 1e-18,
|
|
183730
183730
|
FEMTO: 1e-15,
|
|
183731
183731
|
PICO: 1e-12,
|
|
@@ -183753,7 +183753,7 @@ ENDSEC;
|
|
|
183753
183753
|
MILE: 1609.344,
|
|
183754
183754
|
"'MILE'": 1609.344
|
|
183755
183755
|
};
|
|
183756
|
-
|
|
183756
|
+
Va = function(i, e) {
|
|
183757
183757
|
const t = new J(i), s = e.byType.get("IFCPROJECT") || [];
|
|
183758
183758
|
if (s.length === 0) return console.warn("[UnitExtractor] No IFCPROJECT found, defaulting to meters"), 1;
|
|
183759
183759
|
const a = e.byId.get(s[0]);
|
|
@@ -183780,7 +183780,7 @@ ENDSEC;
|
|
|
183780
183780
|
if (!(typeof R == "string" && R.replace(/\./g, "").toUpperCase() === "LENGTHUNIT")) continue;
|
|
183781
183781
|
const u = C[2];
|
|
183782
183782
|
if (u == null || u === "$") return 1;
|
|
183783
|
-
const m = typeof u == "string" ? u.replace(/\./g, "").toUpperCase() : "", A =
|
|
183783
|
+
const m = typeof u == "string" ? u.replace(/\./g, "").toUpperCase() : "", A = Vs[m];
|
|
183784
183784
|
return A !== void 0 ? A : 1;
|
|
183785
183785
|
}
|
|
183786
183786
|
if (p === "IFCCONVERSIONBASEDUNIT") {
|
|
@@ -183808,7 +183808,7 @@ ENDSEC;
|
|
|
183808
183808
|
if (X && X.type.toUpperCase() === "IFCSIUNIT") {
|
|
183809
183809
|
const L = (X.attributes || [])[2];
|
|
183810
183810
|
if (L != null && L !== "$") {
|
|
183811
|
-
const D = typeof L == "string" ? L.replace(/\./g, "").toUpperCase() : "", G =
|
|
183811
|
+
const D = typeof L == "string" ? L.replace(/\./g, "").toUpperCase() : "", G = Vs[D];
|
|
183812
183812
|
G !== void 0 && (V = G);
|
|
183813
183813
|
}
|
|
183814
183814
|
}
|
|
@@ -183823,7 +183823,7 @@ ENDSEC;
|
|
|
183823
183823
|
}
|
|
183824
183824
|
return 1;
|
|
183825
183825
|
};
|
|
183826
|
-
const
|
|
183826
|
+
const Zi = {
|
|
183827
183827
|
entities: {
|
|
183828
183828
|
IfcActionRequest: {
|
|
183829
183829
|
name: "IfcActionRequest",
|
|
@@ -252788,41 +252788,41 @@ ENDSEC;
|
|
|
252788
252788
|
}
|
|
252789
252789
|
}
|
|
252790
252790
|
};
|
|
252791
|
-
function
|
|
252792
|
-
const e =
|
|
252793
|
-
return
|
|
252791
|
+
function Ji(i) {
|
|
252792
|
+
const e = ka(i);
|
|
252793
|
+
return Zi.entities[e];
|
|
252794
252794
|
}
|
|
252795
252795
|
function NI(i) {
|
|
252796
|
-
return
|
|
252796
|
+
return Ji(i)?.allAttributes || [];
|
|
252797
252797
|
}
|
|
252798
252798
|
function FI(i) {
|
|
252799
|
-
return
|
|
252799
|
+
return Ji(i)?.inheritanceChain || [];
|
|
252800
252800
|
}
|
|
252801
252801
|
function LI(i) {
|
|
252802
|
-
return
|
|
252802
|
+
return ka(i) in Zi.entities;
|
|
252803
252803
|
}
|
|
252804
|
-
function
|
|
252804
|
+
function ka(i) {
|
|
252805
252805
|
if (i.startsWith("Ifc") && i.length > 3 && i[3] >= "A" && i[3] <= "Z") return i;
|
|
252806
252806
|
const e = i.toUpperCase();
|
|
252807
252807
|
if (e.startsWith("IFC")) {
|
|
252808
252808
|
const t = e.substring(3);
|
|
252809
|
-
for (const s of Object.keys(
|
|
252809
|
+
for (const s of Object.keys(Zi.entities))if (s.toUpperCase() === "IFC" + t) return s;
|
|
252810
252810
|
return "Ifc" + t.charAt(0) + t.substring(1).toLowerCase();
|
|
252811
252811
|
}
|
|
252812
252812
|
return i;
|
|
252813
252813
|
}
|
|
252814
|
-
|
|
252814
|
+
zi = function(i) {
|
|
252815
252815
|
return NI(i).map((t)=>t.name);
|
|
252816
252816
|
};
|
|
252817
|
-
function
|
|
252817
|
+
function va(i) {
|
|
252818
252818
|
return LI(i);
|
|
252819
252819
|
}
|
|
252820
252820
|
function PI(i) {
|
|
252821
252821
|
return FI(i);
|
|
252822
252822
|
}
|
|
252823
|
-
function
|
|
252823
|
+
function Wa(i) {
|
|
252824
252824
|
if (typeof i != "string" || i.length === 0) return i;
|
|
252825
|
-
const e =
|
|
252825
|
+
const e = Ji(i);
|
|
252826
252826
|
return e ? e.name : i;
|
|
252827
252827
|
}
|
|
252828
252828
|
function _e(i) {
|
|
@@ -252869,10 +252869,10 @@ ENDSEC;
|
|
|
252869
252869
|
return t;
|
|
252870
252870
|
}
|
|
252871
252871
|
function Ti(i, e) {
|
|
252872
|
-
const s =
|
|
252872
|
+
const s = zi(i.type).indexOf(e);
|
|
252873
252873
|
if (!(s < 0)) return i.attributes[s];
|
|
252874
252874
|
}
|
|
252875
|
-
function
|
|
252875
|
+
function ks(i) {
|
|
252876
252876
|
if (!Array.isArray(i) || i.length < 3) return;
|
|
252877
252877
|
const e = i.map((c)=>Me(c)).filter((c)=>c !== void 0);
|
|
252878
252878
|
if (e.length < 3) return;
|
|
@@ -252884,7 +252884,7 @@ ENDSEC;
|
|
|
252884
252884
|
for (const s of t){
|
|
252885
252885
|
const a = i.get(s);
|
|
252886
252886
|
if (!a) continue;
|
|
252887
|
-
const n =
|
|
252887
|
+
const n = ks(Ti(a, "RefLatitude")), r = ks(Ti(a, "RefLongitude")), I = Me(Ti(a, "RefElevation")) ?? 0;
|
|
252888
252888
|
if (!(n === void 0 || r === void 0)) return {
|
|
252889
252889
|
hasGeoreference: !0,
|
|
252890
252890
|
source: "siteLocation",
|
|
@@ -253104,15 +253104,16 @@ ENDSEC;
|
|
|
253104
253104
|
const T = f.attributes || [], p = typeof T[0] == "number" ? T[0] : void 0;
|
|
253105
253105
|
let C, R;
|
|
253106
253106
|
if (p) {
|
|
253107
|
-
const
|
|
253108
|
-
if (
|
|
253109
|
-
const
|
|
253110
|
-
|
|
253107
|
+
const A = i.entityIndex.byId.get(p);
|
|
253108
|
+
if (A) {
|
|
253109
|
+
const d = e.extractEntity(A);
|
|
253110
|
+
d && (C = typeof d.attributes?.[0] == "string" ? d.attributes[0] : void 0, R = typeof d.attributes?.[2] == "string" ? d.attributes[2] : void 0);
|
|
253111
253111
|
}
|
|
253112
253112
|
}
|
|
253113
|
+
const y = typeof T[1] == "number" ? T[1] : void 0, u = i.lengthUnitScale ?? 1, m = y !== void 0 ? y * u : void 0;
|
|
253113
253114
|
l.push({
|
|
253114
253115
|
materialName: C,
|
|
253115
|
-
thickness:
|
|
253116
|
+
thickness: m,
|
|
253116
253117
|
isVentilated: T[2] === !0 || T[2] === ".T.",
|
|
253117
253118
|
name: typeof T[3] == "string" ? T[3] : void 0,
|
|
253118
253119
|
category: typeof T[5] == "string" ? T[5] : void 0,
|
|
@@ -253225,7 +253226,7 @@ ENDSEC;
|
|
|
253225
253226
|
return null;
|
|
253226
253227
|
}
|
|
253227
253228
|
}
|
|
253228
|
-
function
|
|
253229
|
+
function wa(i) {
|
|
253229
253230
|
const e = i.attributes || [];
|
|
253230
253231
|
switch(i.type.toUpperCase()){
|
|
253231
253232
|
case "IFCPROPERTYENUMERATEDVALUE":
|
|
@@ -253348,7 +253349,7 @@ ENDSEC;
|
|
|
253348
253349
|
if (!p) continue;
|
|
253349
253350
|
const C = p.attributes || [], R = typeof C[0] == "string" ? C[0] : "";
|
|
253350
253351
|
if (!R) continue;
|
|
253351
|
-
const y =
|
|
253352
|
+
const y = wa(p), u = {
|
|
253352
253353
|
name: R,
|
|
253353
253354
|
type: y.type,
|
|
253354
253355
|
value: y.value
|
|
@@ -253559,7 +253560,7 @@ ENDSEC;
|
|
|
253559
253560
|
}
|
|
253560
253561
|
return a.size === 0 ? null : gI(a, n);
|
|
253561
253562
|
};
|
|
253562
|
-
function
|
|
253563
|
+
function vs(i, e, t, s) {
|
|
253563
253564
|
const a = e + t;
|
|
253564
253565
|
let n = e;
|
|
253565
253566
|
for(; n < a && i[n] !== 40;)n++;
|
|
@@ -253647,13 +253648,13 @@ ENDSEC;
|
|
|
253647
253648
|
e
|
|
253648
253649
|
];
|
|
253649
253650
|
}
|
|
253650
|
-
async function
|
|
253651
|
+
async function Ws(i, e, t) {
|
|
253651
253652
|
const s = new Map;
|
|
253652
253653
|
if (e.length === 0) return s;
|
|
253653
253654
|
const a = 2048, n = [], r = [], I = [];
|
|
253654
253655
|
for(let m = 0; m < e.length; m++){
|
|
253655
253656
|
t && (m & a - 1) === 0 && await t();
|
|
253656
|
-
const A = e[m], d =
|
|
253657
|
+
const A = e[m], d = vs(i, A.byteOffset, A.byteLength, 0), O = vs(i, A.byteOffset, A.byteLength, 2);
|
|
253657
253658
|
n.push(d ?? [
|
|
253658
253659
|
0,
|
|
253659
253660
|
0
|
|
@@ -253686,7 +253687,7 @@ ENDSEC;
|
|
|
253686
253687
|
}
|
|
253687
253688
|
return s;
|
|
253688
253689
|
}
|
|
253689
|
-
const
|
|
253690
|
+
const ws = new Set([
|
|
253690
253691
|
"IFCWALL",
|
|
253691
253692
|
"IFCWALLSTANDARDCASE",
|
|
253692
253693
|
"IFCDOOR",
|
|
@@ -253740,7 +253741,7 @@ ENDSEC;
|
|
|
253740
253741
|
IFCQUANTITYCOUNT: ye.Count,
|
|
253741
253742
|
IFCQUANTITYWEIGHT: ye.Weight,
|
|
253742
253743
|
IFCQUANTITYTIME: ye.Time
|
|
253743
|
-
},
|
|
253744
|
+
}, _s = new Set([
|
|
253744
253745
|
"IFCPROJECT",
|
|
253745
253746
|
"IFCSITE",
|
|
253746
253747
|
"IFCBUILDING",
|
|
@@ -253875,7 +253876,7 @@ ENDSEC;
|
|
|
253875
253876
|
t.port1.onmessage = ()=>e(), t.port2.postMessage(null);
|
|
253876
253877
|
});
|
|
253877
253878
|
}
|
|
253878
|
-
class
|
|
253879
|
+
class es {
|
|
253879
253880
|
async parseLite(e, t, s = {}) {
|
|
253880
253881
|
const a = performance.now(), n = new Uint8Array(e), r = t.length;
|
|
253881
253882
|
let I = a;
|
|
@@ -253889,7 +253890,7 @@ ENDSEC;
|
|
|
253889
253890
|
phase: "building",
|
|
253890
253891
|
percent: 0
|
|
253891
253892
|
});
|
|
253892
|
-
const o = _I(n), c = new Je, f = new
|
|
253893
|
+
const o = _I(n), c = new Je, f = new wi(c), T = new _i(c), p = new Xi;
|
|
253893
253894
|
l("init builders");
|
|
253894
253895
|
const C = new Map, R = s.deferPropertyAtomIndex === !0, y = new Map, u = (M)=>{
|
|
253895
253896
|
let P = y.get(M);
|
|
@@ -253957,7 +253958,7 @@ ENDSEC;
|
|
|
253957
253958
|
let P = D.get(M);
|
|
253958
253959
|
if (P !== void 0) return P;
|
|
253959
253960
|
const B = u(M);
|
|
253960
|
-
return
|
|
253961
|
+
return _s.has(B) || L(B, _s) ? P = d : ws.has(B) || L(B, ws) ? P = O : YI.has(B) ? P = F : HI.has(B) ? P = g : vI.has(B) ? P = V : VI.has(B) ? P = v : WI(B) ? P = X : m.has(B) || B.startsWith("IFCREL") ? P = N : P = A, D.set(M, P), P;
|
|
253961
253962
|
}
|
|
253962
253963
|
const k = Math.max(16, s.yieldIntervalMs ?? 80);
|
|
253963
253964
|
let Q = performance.now();
|
|
@@ -253982,7 +253983,7 @@ ENDSEC;
|
|
|
253982
253983
|
const P = pi(n, M.byteOffset, M.byteLength);
|
|
253983
253984
|
P && ti.add(P.relatingDef);
|
|
253984
253985
|
}
|
|
253985
|
-
const
|
|
253986
|
+
const Es = new Set;
|
|
253986
253987
|
for (const M of [
|
|
253987
253988
|
ee,
|
|
253988
253989
|
te,
|
|
@@ -253995,15 +253996,15 @@ ENDSEC;
|
|
|
253995
253996
|
...R ? [] : [
|
|
253996
253997
|
Ne
|
|
253997
253998
|
]
|
|
253998
|
-
])for (const P of M)
|
|
253999
|
+
])for (const P of M)Es.add(P.expressId);
|
|
253999
254000
|
const ii = [];
|
|
254000
|
-
for (const M of t)ti.has(M.expressId) && !
|
|
254001
|
+
for (const M of t)ti.has(M.expressId) && !Es.has(M.expressId) && ii.push(M);
|
|
254001
254002
|
l(`association target pre-scan: ${ti.size} targets, ${ii.length} extra refs`);
|
|
254002
|
-
const
|
|
254003
|
-
E(`index input: indexedRefs=${
|
|
254004
|
-
const Xn = await
|
|
254003
|
+
const ls = R ? t.filter((M)=>G(M.type) !== V || fi.has(u(M.type))) : t;
|
|
254004
|
+
E(`index input: indexedRefs=${ls.length} deferredPropertyAtoms=${R ? Ne.length : 0} extraAssocTargets=${ii.length}`);
|
|
254005
|
+
const Xn = await Hs(ls);
|
|
254005
254006
|
l("compact entity index");
|
|
254006
|
-
const jn = ee.length + te.length + ke.length + se.length + st.length,
|
|
254007
|
+
const jn = ee.length + te.length + ke.length + se.length + st.length, os = new Wi(jn, c), si = {
|
|
254007
254008
|
byId: Xn,
|
|
254008
254009
|
byType: C
|
|
254009
254010
|
};
|
|
@@ -254026,10 +254027,10 @@ ENDSEC;
|
|
|
254026
254027
|
phase: "parsing geometry names",
|
|
254027
254028
|
percent: 12
|
|
254028
254029
|
});
|
|
254029
|
-
const Qn = await
|
|
254030
|
+
const Qn = await Ws(n, te, w);
|
|
254030
254031
|
for (const [M, P] of Qn)At.set(M, P);
|
|
254031
254032
|
await w();
|
|
254032
|
-
const $n = await
|
|
254033
|
+
const $n = await Ws(n, ke, w);
|
|
254033
254034
|
for (const [M, P] of $n)At.set(M, P);
|
|
254034
254035
|
l("batch geom GlobalId+Name"), await w(), s.onProgress?.({
|
|
254035
254036
|
phase: "parsing relationships",
|
|
@@ -254050,29 +254051,29 @@ ENDSEC;
|
|
|
254050
254051
|
const at = (M, P, B)=>{
|
|
254051
254052
|
for (const Z of M){
|
|
254052
254053
|
const ie = At.get(Z.expressId);
|
|
254053
|
-
|
|
254054
|
+
os.add(Z.expressId, Z.type, ie?.globalId || "", ie?.name || "", "", "", P, B);
|
|
254054
254055
|
}
|
|
254055
254056
|
};
|
|
254056
254057
|
at(ee, !1, !1), at(te, !0, !1), at(ke, !1, !0), at(se, !1, !1), at(st, !1, !1), l("add entity batches");
|
|
254057
|
-
const
|
|
254058
|
+
const Ts = os.build();
|
|
254058
254059
|
l("entity table build()");
|
|
254059
|
-
const qn = f.build(), Zn = T.build(),
|
|
254060
|
+
const qn = f.build(), Zn = T.build(), cs = p.build();
|
|
254060
254061
|
l("hierarchy rel graph build()"), await w(), s.onProgress?.({
|
|
254061
254062
|
phase: "extracting units",
|
|
254062
254063
|
percent: 85
|
|
254063
254064
|
});
|
|
254064
|
-
const ai =
|
|
254065
|
+
const ai = Va(n, si);
|
|
254065
254066
|
s.onProgress?.({
|
|
254066
254067
|
phase: "building hierarchy",
|
|
254067
254068
|
percent: 90
|
|
254068
254069
|
});
|
|
254069
|
-
let
|
|
254070
|
+
let fs;
|
|
254070
254071
|
try {
|
|
254071
|
-
|
|
254072
|
+
fs = new SI().build(Ts, cs, c, n, si, ai), l("spatial hierarchy");
|
|
254072
254073
|
} catch (M) {
|
|
254073
254074
|
console.warn("[ColumnarParser] Failed to build spatial hierarchy:", M);
|
|
254074
254075
|
}
|
|
254075
|
-
const
|
|
254076
|
+
const ps = {
|
|
254076
254077
|
fileSize: e.byteLength,
|
|
254077
254078
|
schemaVersion: o,
|
|
254078
254079
|
entityCount: r,
|
|
@@ -254080,21 +254081,21 @@ ENDSEC;
|
|
|
254080
254081
|
source: n,
|
|
254081
254082
|
entityIndex: si,
|
|
254082
254083
|
strings: c,
|
|
254083
|
-
entities:
|
|
254084
|
+
entities: Ts,
|
|
254084
254085
|
properties: qn,
|
|
254085
254086
|
quantities: Zn,
|
|
254086
|
-
relationships:
|
|
254087
|
-
spatialHierarchy:
|
|
254087
|
+
relationships: cs,
|
|
254088
|
+
spatialHierarchy: fs,
|
|
254088
254089
|
lengthUnitScale: ai
|
|
254089
254090
|
};
|
|
254090
|
-
s.onSpatialReady?.(
|
|
254091
|
+
s.onSpatialReady?.(ps), await w(), s.onProgress?.({
|
|
254091
254092
|
phase: "parsing property refs",
|
|
254092
254093
|
percent: 92
|
|
254093
254094
|
});
|
|
254094
|
-
const
|
|
254095
|
+
const Cs = new Map, Rs = new Map, ms = new Set, ys = new Set;
|
|
254095
254096
|
for (const M of Oe){
|
|
254096
254097
|
const P = u(M.type);
|
|
254097
|
-
P === "IFCPROPERTYSET" ?
|
|
254098
|
+
P === "IFCPROPERTYSET" ? ms.add(M.expressId) : P === "IFCELEMENTQUANTITY" && ys.add(M.expressId);
|
|
254098
254099
|
}
|
|
254099
254100
|
let Jn = 0;
|
|
254100
254101
|
for(let M = 0; M < de.length; M++){
|
|
@@ -254104,12 +254105,12 @@ ENDSEC;
|
|
|
254104
254105
|
const { relatedObjects: Z, relatingDef: ie } = B;
|
|
254105
254106
|
Jn += Z.length;
|
|
254106
254107
|
for (const Te of Z)p.addEdge(ie, Te, U.DefinesByProperties, P.expressId);
|
|
254107
|
-
const fe =
|
|
254108
|
+
const fe = ms.has(ie), ae = !fe && ys.has(ie);
|
|
254108
254109
|
if (fe || ae) {
|
|
254109
|
-
const Te = fe ?
|
|
254110
|
-
for (const
|
|
254111
|
-
let St = Te.get(
|
|
254112
|
-
St || (St = [], Te.set(
|
|
254110
|
+
const Te = fe ? Cs : Rs;
|
|
254111
|
+
for (const As of Z){
|
|
254112
|
+
let St = Te.get(As);
|
|
254113
|
+
St || (St = [], Te.set(As, St)), St.push(ie);
|
|
254113
254114
|
}
|
|
254114
254115
|
}
|
|
254115
254116
|
}
|
|
@@ -254118,7 +254119,7 @@ ENDSEC;
|
|
|
254118
254119
|
phase: "parsing associations",
|
|
254119
254120
|
percent: 95
|
|
254120
254121
|
});
|
|
254121
|
-
const ni = new Map,
|
|
254122
|
+
const ni = new Map, us = new Map, ri = new Map;
|
|
254122
254123
|
for(let M = 0; M < Ve.length; M++){
|
|
254123
254124
|
(M & 1023) === 0 && await w();
|
|
254124
254125
|
const P = Ve[M], B = pi(n, P.byteOffset, P.byteLength);
|
|
@@ -254128,7 +254129,7 @@ ENDSEC;
|
|
|
254128
254129
|
let Te = ni.get(ae);
|
|
254129
254130
|
Te || (Te = [], ni.set(ae, Te)), Te.push(ie), p.addEdge(ie, ae, U.AssociatesClassification, P.expressId);
|
|
254130
254131
|
}
|
|
254131
|
-
else if (fe === "IFCRELASSOCIATESMATERIAL") for (const ae of Z)
|
|
254132
|
+
else if (fe === "IFCRELASSOCIATESMATERIAL") for (const ae of Z)us.set(ae, ie), p.addEdge(ie, ae, U.AssociatesMaterial, P.expressId);
|
|
254132
254133
|
else if (fe === "IFCRELASSOCIATESDOCUMENT") for (const ae of Z){
|
|
254133
254134
|
let Te = ri.get(ae);
|
|
254134
254135
|
Te || (Te = [], ri.set(ae, Te)), Te.push(ie), p.addEdge(ie, ae, U.AssociatesDocument, P.expressId);
|
|
@@ -254138,24 +254139,24 @@ ENDSEC;
|
|
|
254138
254139
|
l("property+association rels");
|
|
254139
254140
|
const zn = p.build();
|
|
254140
254141
|
l("relationship graph build()");
|
|
254141
|
-
let
|
|
254142
|
+
let ds;
|
|
254142
254143
|
R && Ne.length > 0 && (s.onProgress?.({
|
|
254143
254144
|
phase: "indexing property atoms",
|
|
254144
254145
|
percent: 98
|
|
254145
|
-
}),
|
|
254146
|
+
}), ds = await Hs(Ne, void 0, 1024, 2), l("deferred property atom index"));
|
|
254146
254147
|
const er = performance.now() - a;
|
|
254147
254148
|
return s.onProgress?.({
|
|
254148
254149
|
phase: "complete",
|
|
254149
254150
|
percent: 100
|
|
254150
254151
|
}), {
|
|
254151
|
-
...
|
|
254152
|
+
...ps,
|
|
254152
254153
|
parseTime: er,
|
|
254153
254154
|
relationships: zn,
|
|
254154
|
-
deferredEntityIndex:
|
|
254155
|
-
onDemandPropertyMap:
|
|
254156
|
-
onDemandQuantityMap:
|
|
254155
|
+
deferredEntityIndex: ds,
|
|
254156
|
+
onDemandPropertyMap: Cs,
|
|
254157
|
+
onDemandQuantityMap: Rs,
|
|
254157
254158
|
onDemandClassificationMap: ni,
|
|
254158
|
-
onDemandMaterialMap:
|
|
254159
|
+
onDemandMaterialMap: us,
|
|
254159
254160
|
onDemandDocumentMap: ri,
|
|
254160
254161
|
lengthUnitScale: ai
|
|
254161
254162
|
};
|
|
@@ -254179,7 +254180,7 @@ ENDSEC;
|
|
|
254179
254180
|
if (!R) continue;
|
|
254180
254181
|
const y = R.attributes || [], u = typeof y[0] == "string" ? y[0] : "";
|
|
254181
254182
|
if (!u) continue;
|
|
254182
|
-
const m =
|
|
254183
|
+
const m = wa(R), A = {
|
|
254183
254184
|
name: u,
|
|
254184
254185
|
type: m.type,
|
|
254185
254186
|
value: m.value
|
|
@@ -254229,10 +254230,10 @@ ENDSEC;
|
|
|
254229
254230
|
}
|
|
254230
254231
|
}
|
|
254231
254232
|
fc = function(i, e) {
|
|
254232
|
-
return new
|
|
254233
|
+
return new es().extractPropertiesOnDemand(i, e);
|
|
254233
254234
|
};
|
|
254234
254235
|
pc = function(i, e) {
|
|
254235
|
-
return new
|
|
254236
|
+
return new es().extractQuantitiesOnDemand(i, e);
|
|
254236
254237
|
};
|
|
254237
254238
|
function Dt(i, e) {
|
|
254238
254239
|
return i.entityIndex.byId.get(e) ?? i.deferredEntityIndex?.get(e);
|
|
@@ -254268,7 +254269,7 @@ ENDSEC;
|
|
|
254268
254269
|
if (!t) return [];
|
|
254269
254270
|
const a = new J(i.source).extractEntity(t);
|
|
254270
254271
|
if (!a) return [];
|
|
254271
|
-
const n = a.attributes || [], r = i.entities.getTypeName(e), I = r && r !== "Unknown" ? r : t.type, E =
|
|
254272
|
+
const n = a.attributes || [], r = i.entities.getTypeName(e), I = r && r !== "Unknown" ? r : t.type, E = zi(I), l = [], o = Math.min(n.length, E.length);
|
|
254272
254273
|
for(let c = 0; c < o; c++){
|
|
254273
254274
|
const f = E[c];
|
|
254274
254275
|
if (kI.has(f)) continue;
|
|
@@ -254381,7 +254382,7 @@ ENDSEC;
|
|
|
254381
254382
|
OPACITY: "bsi::ifc::presentation::opacity",
|
|
254382
254383
|
MATERIAL: "bsi::ifc::material",
|
|
254383
254384
|
SPACE_BOUNDARY: "bsi::ifc::spaceBoundary"
|
|
254384
|
-
},
|
|
254385
|
+
}, _a = new Set([
|
|
254385
254386
|
"IfcProject",
|
|
254386
254387
|
"IfcSite",
|
|
254387
254388
|
"IfcBuilding",
|
|
@@ -254405,8 +254406,8 @@ ENDSEC;
|
|
|
254405
254406
|
])));
|
|
254406
254407
|
return e;
|
|
254407
254408
|
}
|
|
254408
|
-
function
|
|
254409
|
-
for (const t of $I(i))
|
|
254409
|
+
function Xa(i, e) {
|
|
254410
|
+
for (const t of $I(i))Ka(t, null, null, new Set([
|
|
254410
254411
|
t.path
|
|
254411
254412
|
]), e);
|
|
254412
254413
|
}
|
|
@@ -254416,7 +254417,7 @@ ENDSEC;
|
|
|
254416
254417
|
for(; t;)e.unshift(t), t = t.parent;
|
|
254417
254418
|
return e;
|
|
254418
254419
|
}
|
|
254419
|
-
function
|
|
254420
|
+
function ja(i) {
|
|
254420
254421
|
return qI(i).map((e)=>e.node);
|
|
254421
254422
|
}
|
|
254422
254423
|
function ZI(i) {
|
|
@@ -254455,7 +254456,7 @@ ENDSEC;
|
|
|
254455
254456
|
}
|
|
254456
254457
|
}
|
|
254457
254458
|
}
|
|
254458
|
-
function
|
|
254459
|
+
function Ka(i, e, t, s, a) {
|
|
254459
254460
|
const n = {
|
|
254460
254461
|
node: i,
|
|
254461
254462
|
parent: e,
|
|
@@ -254466,7 +254467,7 @@ ENDSEC;
|
|
|
254466
254467
|
for (const [r, I] of i.children){
|
|
254467
254468
|
if (s.has(I.path)) continue;
|
|
254468
254469
|
const E = new Set(s);
|
|
254469
|
-
E.add(I.path),
|
|
254470
|
+
E.add(I.path), Ka(I, n, r, E, a);
|
|
254470
254471
|
}
|
|
254471
254472
|
}
|
|
254472
254473
|
function zI(i, e) {
|
|
@@ -254497,7 +254498,7 @@ ENDSEC;
|
|
|
254497
254498
|
if (a !== e) throw new Error(`LZF: decompressed ${a} bytes, expected ${e}`);
|
|
254498
254499
|
return t;
|
|
254499
254500
|
}
|
|
254500
|
-
const
|
|
254501
|
+
const Qa = new TextDecoder;
|
|
254501
254502
|
function eE(i) {
|
|
254502
254503
|
const e = tE(i);
|
|
254503
254504
|
let t, s;
|
|
@@ -254509,7 +254510,7 @@ ENDSEC;
|
|
|
254509
254510
|
};
|
|
254510
254511
|
}
|
|
254511
254512
|
function tE(i) {
|
|
254512
|
-
const e = Math.min(65536, i.length), t =
|
|
254513
|
+
const e = Math.min(65536, i.length), t = Qa.decode(i.subarray(0, e)), s = t.search(/^DATA\s+(\S+)/m);
|
|
254513
254514
|
if (s < 0) throw new Error("PCD: missing DATA line in header (scanned first " + e + " bytes)");
|
|
254514
254515
|
const a = t.slice(0, s), n = t.slice(s).match(/^DATA\s+(\S+)\s*\n/);
|
|
254515
254516
|
if (!n) throw new Error("PCD: malformed DATA line");
|
|
@@ -254553,7 +254554,7 @@ ENDSEC;
|
|
|
254553
254554
|
bodyOffset: I
|
|
254554
254555
|
};
|
|
254555
254556
|
}
|
|
254556
|
-
function
|
|
254557
|
+
function ts(i) {
|
|
254557
254558
|
const e = {};
|
|
254558
254559
|
for (const t of i.fields){
|
|
254559
254560
|
const s = t.name.toLowerCase();
|
|
@@ -254563,7 +254564,7 @@ ENDSEC;
|
|
|
254563
254564
|
return e;
|
|
254564
254565
|
}
|
|
254565
254566
|
function iE(i, e) {
|
|
254566
|
-
const t =
|
|
254567
|
+
const t = ts(e), s = Qa.decode(i.subarray(e.bodyOffset)), a = new Float32Array(e.pointCount * 3), n = t.rgbField ? new Float32Array(e.pointCount * 3) : void 0, r = sE(e, t);
|
|
254567
254568
|
let I = 0, E = 0, l = 0;
|
|
254568
254569
|
for(; l < e.pointCount && E < s.length;){
|
|
254569
254570
|
let o = s.indexOf(`
|
|
@@ -254595,7 +254596,7 @@ ENDSEC;
|
|
|
254595
254596
|
};
|
|
254596
254597
|
}
|
|
254597
254598
|
function aE(i, e) {
|
|
254598
|
-
const t =
|
|
254599
|
+
const t = ts(e), s = new DataView(i.buffer, i.byteOffset + e.bodyOffset, e.pointCount * e.pointStride), a = new Float32Array(e.pointCount * 3), n = t.rgbField ? new Float32Array(e.pointCount * 3) : void 0;
|
|
254599
254600
|
for(let r = 0; r < e.pointCount; r++){
|
|
254600
254601
|
const I = r * e.pointStride;
|
|
254601
254602
|
if (a[r * 3] = qe(s, I + t.xField.offset, t.xField), a[r * 3 + 1] = qe(s, I + t.yField.offset, t.yField), a[r * 3 + 2] = qe(s, I + t.zField.offset, t.zField), n && t.rgbField) {
|
|
@@ -254612,7 +254613,7 @@ ENDSEC;
|
|
|
254612
254613
|
if (i.length < e.bodyOffset + 8) throw new Error("PCD binary_compressed: truncated size header");
|
|
254613
254614
|
const t = new DataView(i.buffer, i.byteOffset + e.bodyOffset, 8), s = t.getUint32(0, !0), a = t.getUint32(4, !0), n = e.pointCount * e.pointStride;
|
|
254614
254615
|
if (a !== n) throw new Error(`PCD binary_compressed: declared uncompressed=${a} does not match fields*points=${n}`);
|
|
254615
|
-
const r = i.subarray(e.bodyOffset + 8, e.bodyOffset + 8 + s), I = zI(r, a), E =
|
|
254616
|
+
const r = i.subarray(e.bodyOffset + 8, e.bodyOffset + 8 + s), I = zI(r, a), E = ts(e), l = new Map;
|
|
254616
254617
|
let o = 0;
|
|
254617
254618
|
for (const u of e.fields)l.set(u, o), o += e.pointCount * u.size * u.count;
|
|
254618
254619
|
const c = new DataView(I.buffer, I.byteOffset, I.byteLength), f = new Float32Array(e.pointCount * 3), T = E.rgbField ? new Float32Array(e.pointCount * 3) : void 0, p = l.get(E.xField), C = l.get(E.yField), R = l.get(E.zField), y = E.rgbField ? l.get(E.rgbField) : 0;
|
|
@@ -254638,7 +254639,7 @@ ENDSEC;
|
|
|
254638
254639
|
}
|
|
254639
254640
|
throw new Error(`PCD: unsupported field width ${t.size} for type ${t.type}`);
|
|
254640
254641
|
}
|
|
254641
|
-
const
|
|
254642
|
+
const $a = new ArrayBuffer(4), rE = new Float32Array($a), IE = new Uint32Array($a);
|
|
254642
254643
|
function EE(i, e) {
|
|
254643
254644
|
return e.type === "F" ? (rE[0] = Number(i), IE[0]) : Number(i) >>> 0;
|
|
254644
254645
|
}
|
|
@@ -254686,28 +254687,28 @@ ENDSEC;
|
|
|
254686
254687
|
positions: t,
|
|
254687
254688
|
colors: s,
|
|
254688
254689
|
pointCount: e,
|
|
254689
|
-
bbox:
|
|
254690
|
+
bbox: qa(t)
|
|
254690
254691
|
};
|
|
254691
254692
|
}
|
|
254692
254693
|
function TE(i) {
|
|
254693
254694
|
if (typeof i.positions != "string" || i.positions.length === 0) throw new Error("points::base64: positions must be a non-empty base64 string");
|
|
254694
|
-
const e =
|
|
254695
|
+
const e = Xs(i.positions);
|
|
254695
254696
|
if (e.length % 3 !== 0) throw new Error(`points::base64: positions buffer length (${e.length}) is not a multiple of 3 floats`);
|
|
254696
254697
|
const t = e.length / 3;
|
|
254697
254698
|
if (t === 0) throw new Error("points::base64: positions must contain at least one point");
|
|
254698
254699
|
let s;
|
|
254699
254700
|
if (i.colors !== void 0 && i.colors !== null) {
|
|
254700
254701
|
if (typeof i.colors != "string" || i.colors.length === 0) throw new Error("points::base64: colors must be a non-empty base64 string when provided");
|
|
254701
|
-
if (s =
|
|
254702
|
+
if (s = Xs(i.colors), s.length !== e.length) throw new Error(`points::base64: colors length (${s.length}) does not match positions length (${e.length})`);
|
|
254702
254703
|
}
|
|
254703
254704
|
return {
|
|
254704
254705
|
positions: e,
|
|
254705
254706
|
colors: s,
|
|
254706
254707
|
pointCount: t,
|
|
254707
|
-
bbox:
|
|
254708
|
+
bbox: qa(e)
|
|
254708
254709
|
};
|
|
254709
254710
|
}
|
|
254710
|
-
function
|
|
254711
|
+
function Xs(i) {
|
|
254711
254712
|
const e = cE(i), t = e.byteOffset % 4 === 0 ? new Float32Array(e.buffer, e.byteOffset, e.byteLength / 4) : new Float32Array(e.slice().buffer);
|
|
254712
254713
|
return new Float32Array(t);
|
|
254713
254714
|
}
|
|
@@ -254721,7 +254722,7 @@ ENDSEC;
|
|
|
254721
254722
|
if (e && typeof e.from == "function") return new Uint8Array(e.from(i, "base64"));
|
|
254722
254723
|
throw new Error("No base64 decoder available in this environment");
|
|
254723
254724
|
}
|
|
254724
|
-
function
|
|
254725
|
+
function qa(i) {
|
|
254725
254726
|
if (i.length < 3) return {
|
|
254726
254727
|
min: [
|
|
254727
254728
|
0,
|
|
@@ -254767,7 +254768,7 @@ ENDSEC;
|
|
|
254767
254768
|
PCD_BASE64: "pcd::base64",
|
|
254768
254769
|
POINTS_ARRAY: "points::array",
|
|
254769
254770
|
POINTS_BASE64: "points::base64"
|
|
254770
|
-
},
|
|
254771
|
+
}, Za = new Set(Object.values(Vt));
|
|
254771
254772
|
function fE(i) {
|
|
254772
254773
|
const e = i.get(Vt.PCD_BASE64);
|
|
254773
254774
|
if (typeof e == "string" && e.length > 0) return eE(pE(e));
|
|
@@ -254864,7 +254865,7 @@ ENDSEC;
|
|
|
254864
254865
|
return {
|
|
254865
254866
|
async open (n) {
|
|
254866
254867
|
if (a) return a;
|
|
254867
|
-
|
|
254868
|
+
js(n);
|
|
254868
254869
|
const I = await (await t()).send((E)=>({
|
|
254869
254870
|
kind: "open",
|
|
254870
254871
|
requestId: E,
|
|
@@ -254877,7 +254878,7 @@ ENDSEC;
|
|
|
254877
254878
|
},
|
|
254878
254879
|
async next (n, r) {
|
|
254879
254880
|
if (s === null) throw new Error("decode-worker source not opened");
|
|
254880
|
-
|
|
254881
|
+
js(r);
|
|
254881
254882
|
const I = await t(), E = s, l = ()=>{
|
|
254882
254883
|
I.notify({
|
|
254883
254884
|
kind: "abort",
|
|
@@ -254912,7 +254913,7 @@ ENDSEC;
|
|
|
254912
254913
|
}
|
|
254913
254914
|
};
|
|
254914
254915
|
}
|
|
254915
|
-
function
|
|
254916
|
+
function js(i) {
|
|
254916
254917
|
if (i?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
254917
254918
|
}
|
|
254918
254919
|
const dE = 25e6, AE = 4 * 1024 * 1024 * 1024, SE = 2e5;
|
|
@@ -254987,18 +254988,18 @@ ENDSEC;
|
|
|
254987
254988
|
}
|
|
254988
254989
|
return s.signal;
|
|
254989
254990
|
}
|
|
254990
|
-
function
|
|
254991
|
-
for (const e of
|
|
254991
|
+
function Ks(i) {
|
|
254992
|
+
for (const e of Za)if (i.attributes.has(e)) return !0;
|
|
254992
254993
|
return !1;
|
|
254993
254994
|
}
|
|
254994
|
-
function
|
|
254995
|
+
function Ja(i, e) {
|
|
254995
254996
|
const t = new Map, s = new Map, a = ZI(i), n = JI(i, $.MESH);
|
|
254996
254997
|
let r = 0;
|
|
254997
|
-
for (const l of i.values())(l.attributes.get($.CLASS) ||
|
|
254998
|
-
const I = new
|
|
254998
|
+
for (const l of i.values())(l.attributes.get($.CLASS) || Ks(l)) && r++;
|
|
254999
|
+
const I = new Wi(Math.max(r, 100), e);
|
|
254999
255000
|
let E = 1;
|
|
255000
255001
|
for (const l of i.values()){
|
|
255001
|
-
const o = l.attributes.get($.CLASS), c =
|
|
255002
|
+
const o = l.attributes.get($.CLASS), c = Ks(l);
|
|
255002
255003
|
if (!o && !c) continue;
|
|
255003
255004
|
const f = o?.code ?? (c ? "IfcGeographicElement" : ""), T = E++;
|
|
255004
255005
|
t.set(l.path, T), s.set(T, l.path);
|
|
@@ -255032,8 +255033,8 @@ ENDSEC;
|
|
|
255032
255033
|
$.OPACITY,
|
|
255033
255034
|
$.MATERIAL
|
|
255034
255035
|
]);
|
|
255035
|
-
function
|
|
255036
|
-
const s = new
|
|
255036
|
+
function za(i, e, t) {
|
|
255037
|
+
const s = new wi(t);
|
|
255037
255038
|
for (const a of i.values()){
|
|
255038
255039
|
const n = e.get(a.path);
|
|
255039
255040
|
if (n === void 0) continue;
|
|
@@ -255059,7 +255060,7 @@ ENDSEC;
|
|
|
255059
255060
|
const a = t.lastIndexOf("::");
|
|
255060
255061
|
if (a === -1) continue;
|
|
255061
255062
|
const n = t.slice(0, a), r = t.slice(a + 2);
|
|
255062
|
-
if (typeof s == "number" &&
|
|
255063
|
+
if (typeof s == "number" && en(r)) continue;
|
|
255063
255064
|
const I = PE(n);
|
|
255064
255065
|
e.has(I) || e.set(I, new Map), e.get(I).set(r, s);
|
|
255065
255066
|
}
|
|
@@ -255103,7 +255104,7 @@ ENDSEC;
|
|
|
255103
255104
|
propValue: ""
|
|
255104
255105
|
};
|
|
255105
255106
|
}
|
|
255106
|
-
function
|
|
255107
|
+
function en(i) {
|
|
255107
255108
|
const e = new Set([
|
|
255108
255109
|
"Volume",
|
|
255109
255110
|
"Area",
|
|
@@ -255128,10 +255129,10 @@ ENDSEC;
|
|
|
255128
255129
|
];
|
|
255129
255130
|
return e.has(i) ? !0 : t.some((s)=>i.endsWith(s) && i !== s);
|
|
255130
255131
|
}
|
|
255131
|
-
function
|
|
255132
|
+
function tn(i, e) {
|
|
255132
255133
|
const t = [], s = new WeakMap, a = new WeakMap;
|
|
255133
|
-
return
|
|
255134
|
-
const r = n.parent ? s.get(n.parent) ?? null : null, I = n.parent ? a.get(n.parent) ?? null : null, E = DE(n.node, r, e), l = UE(xE(n.node), I), o =
|
|
255134
|
+
return Xa(i, (n)=>{
|
|
255135
|
+
const r = n.parent ? s.get(n.parent) ?? null : null, I = n.parent ? a.get(n.parent) ?? null : null, E = DE(n.node, r, e), l = UE(xE(n.node), I), o = ja(n);
|
|
255135
255136
|
s.set(n, E), a.set(n, l);
|
|
255136
255137
|
const c = n.node.attributes.get($.MESH);
|
|
255137
255138
|
if (c && E && !E.isTypeDefinition && !YE(o)) {
|
|
@@ -255261,11 +255262,11 @@ ENDSEC;
|
|
|
255261
255262
|
}
|
|
255262
255263
|
return t;
|
|
255263
255264
|
}
|
|
255264
|
-
function
|
|
255265
|
+
function sn(i, e) {
|
|
255265
255266
|
const t = [], s = new WeakMap, a = new WeakMap;
|
|
255266
|
-
return
|
|
255267
|
+
return Xa(i, (n)=>{
|
|
255267
255268
|
const r = n.parent ? s.get(n.parent) ?? null : null, I = n.parent ? a.get(n.parent) ?? null : null, E = WE(n.node, r, e), l = XE(_E(n.node), I);
|
|
255268
|
-
if (s.set(n, E), a.set(n, l), !E || E.isTypeDefinition || !wE(n.node.attributes) || $E(
|
|
255269
|
+
if (s.set(n, E), a.set(n, l), !E || E.isTypeDefinition || !wE(n.node.attributes) || $E(ja(n))) return;
|
|
255269
255270
|
const o = fE(n.node.attributes);
|
|
255270
255271
|
o && (qE(o.positions, l), t.push({
|
|
255271
255272
|
expressId: E.expressId,
|
|
@@ -255286,7 +255287,7 @@ ENDSEC;
|
|
|
255286
255287
|
};
|
|
255287
255288
|
}
|
|
255288
255289
|
function wE(i) {
|
|
255289
|
-
for (const e of
|
|
255290
|
+
for (const e of Za)if (i.has(e)) return !0;
|
|
255290
255291
|
return !1;
|
|
255291
255292
|
}
|
|
255292
255293
|
function _E(i) {
|
|
@@ -255355,11 +255356,11 @@ ENDSEC;
|
|
|
255355
255356
|
]
|
|
255356
255357
|
};
|
|
255357
255358
|
}
|
|
255358
|
-
function
|
|
255359
|
+
function an(i, e) {
|
|
255359
255360
|
const t = JE(i);
|
|
255360
255361
|
if (!t) return zE();
|
|
255361
|
-
const s =
|
|
255362
|
-
return
|
|
255362
|
+
const s = nn(t, e), a = new Map, n = new Map, r = new Map, I = new Map, E = new Map, l = new Map, o = new Map;
|
|
255363
|
+
return rn(s, null, null, null, e, a, n, r, I, E, o), {
|
|
255363
255364
|
project: s,
|
|
255364
255365
|
byStorey: a,
|
|
255365
255366
|
byBuilding: n,
|
|
@@ -255398,7 +255399,7 @@ ENDSEC;
|
|
|
255398
255399
|
for (const e of i.values())if (e.attributes.get($.CLASS)?.code === "IfcProject") return e;
|
|
255399
255400
|
return null;
|
|
255400
255401
|
}
|
|
255401
|
-
function
|
|
255402
|
+
function nn(i, e) {
|
|
255402
255403
|
const t = i.attributes.get($.CLASS), s = e.get(i.path) ?? 0, a = yt(t?.code ?? ""), n = new Set, r = {
|
|
255403
255404
|
expressId: s,
|
|
255404
255405
|
type: a,
|
|
@@ -255412,23 +255413,23 @@ ENDSEC;
|
|
|
255412
255413
|
}
|
|
255413
255414
|
for (const [, I] of i.children){
|
|
255414
255415
|
const E = I.attributes.get($.CLASS);
|
|
255415
|
-
if (E &&
|
|
255416
|
+
if (E && _a.has(E.code)) r.children.push(nn(I, e));
|
|
255416
255417
|
else {
|
|
255417
|
-
if (t?.code === "IfcSpace" &&
|
|
255418
|
-
|
|
255418
|
+
if (t?.code === "IfcSpace" && En(E?.code)) {
|
|
255419
|
+
Qs(I, e, n);
|
|
255419
255420
|
continue;
|
|
255420
255421
|
}
|
|
255421
|
-
|
|
255422
|
+
In(I, e, n, new Set), t?.code === "IfcSpace" && Qs(I, e, n);
|
|
255422
255423
|
}
|
|
255423
255424
|
}
|
|
255424
255425
|
return r.elements = [
|
|
255425
255426
|
...n
|
|
255426
255427
|
], r;
|
|
255427
255428
|
}
|
|
255428
|
-
function
|
|
255429
|
+
function rn(i, e, t, s, a, n, r, I, E, l, o) {
|
|
255429
255430
|
i.type === H.IfcBuildingStorey ? (e = i.expressId, i.elevation !== void 0 && l.set(i.expressId, i.elevation), n.set(i.expressId, [])) : i.type === H.IfcBuilding ? (t = i.expressId, r.set(i.expressId, [])) : i.type === H.IfcSite ? (s = i.expressId, I.set(i.expressId, [])) : i.type === H.IfcSpace && E.set(i.expressId, []);
|
|
255430
255431
|
for (const c of i.elements)e !== null && (Mt(n, e, c), o.set(c, e)), t !== null && Mt(r, t, c), s !== null && Mt(I, s, c), i.type === H.IfcSpace && Mt(E, i.expressId, c);
|
|
255431
|
-
for (const c of i.children)
|
|
255432
|
+
for (const c of i.children)rn(c, e, t, s, a, n, r, I, E, l, o);
|
|
255432
255433
|
}
|
|
255433
255434
|
function zE() {
|
|
255434
255435
|
return {
|
|
@@ -255452,24 +255453,24 @@ ENDSEC;
|
|
|
255452
255453
|
getPath: ()=>[]
|
|
255453
255454
|
};
|
|
255454
255455
|
}
|
|
255455
|
-
function
|
|
255456
|
+
function In(i, e, t, s) {
|
|
255456
255457
|
if (s.has(i.path)) return;
|
|
255457
255458
|
s.add(i.path);
|
|
255458
255459
|
const a = i.attributes.get($.CLASS);
|
|
255459
255460
|
if (a?.code) {
|
|
255460
|
-
if (
|
|
255461
|
+
if (_a.has(a.code) || En(a.code)) return;
|
|
255461
255462
|
const n = e.get(i.path);
|
|
255462
255463
|
n !== void 0 && t.add(n);
|
|
255463
255464
|
}
|
|
255464
|
-
for (const n of i.children.values())
|
|
255465
|
+
for (const n of i.children.values())In(n, e, t, s);
|
|
255465
255466
|
}
|
|
255466
|
-
function
|
|
255467
|
+
function Qs(i, e, t) {
|
|
255467
255468
|
const a = i.attributes.get($.SPACE_BOUNDARY)?.relatedelement?.ref;
|
|
255468
255469
|
if (!a) return;
|
|
255469
255470
|
const n = e.get(a);
|
|
255470
255471
|
n !== void 0 && t.add(n);
|
|
255471
255472
|
}
|
|
255472
|
-
function
|
|
255473
|
+
function En(i) {
|
|
255473
255474
|
return typeof i == "string" && i.startsWith("IfcRelSpaceBoundary");
|
|
255474
255475
|
}
|
|
255475
255476
|
function Mt(i, e, t) {
|
|
@@ -255625,7 +255626,7 @@ ENDSEC;
|
|
|
255625
255626
|
function il() {
|
|
255626
255627
|
return new tl;
|
|
255627
255628
|
}
|
|
255628
|
-
class
|
|
255629
|
+
class $s {
|
|
255629
255630
|
byUuid = new Map;
|
|
255630
255631
|
byHierarchy = new Map;
|
|
255631
255632
|
childNameIndex = new Map;
|
|
@@ -255720,7 +255721,7 @@ ENDSEC;
|
|
|
255720
255721
|
const a = i.getEnabledLayers();
|
|
255721
255722
|
if (a.length === 0) return {
|
|
255722
255723
|
composed: new Map,
|
|
255723
|
-
pathIndex: new
|
|
255724
|
+
pathIndex: new $s,
|
|
255724
255725
|
roots: [],
|
|
255725
255726
|
stats: {
|
|
255726
255727
|
totalNodes: 0,
|
|
@@ -255729,7 +255730,7 @@ ENDSEC;
|
|
|
255729
255730
|
crossLayerReferences: 0
|
|
255730
255731
|
}
|
|
255731
255732
|
};
|
|
255732
|
-
const n = new
|
|
255733
|
+
const n = new $s;
|
|
255733
255734
|
n.buildIndex(a), t?.("indexing", 100), t?.("merging", 0);
|
|
255734
255735
|
const r = new Map, I = i.getAllPaths();
|
|
255735
255736
|
let E = 0;
|
|
@@ -255743,12 +255744,12 @@ ENDSEC;
|
|
|
255743
255744
|
let o = 0, c = 0;
|
|
255744
255745
|
const f = new Set;
|
|
255745
255746
|
for (const [C, R] of r){
|
|
255746
|
-
const y =
|
|
255747
|
+
const y = ln(C, R, r, n, f, new Set, s);
|
|
255747
255748
|
o += y.resolutions, c += y.crossLayer;
|
|
255748
255749
|
}
|
|
255749
255750
|
t?.("inheritance", 100), t?.("tree", 0);
|
|
255750
255751
|
const T = new Map;
|
|
255751
|
-
for (const [C] of r)T.has(C) ||
|
|
255752
|
+
for (const [C] of r)T.has(C) || on(C, r, T, new Set, a, n);
|
|
255752
255753
|
t?.("tree", 100);
|
|
255753
255754
|
const p = rl(T);
|
|
255754
255755
|
return {
|
|
@@ -255785,7 +255786,7 @@ ENDSEC;
|
|
|
255785
255786
|
}
|
|
255786
255787
|
return t;
|
|
255787
255788
|
}
|
|
255788
|
-
function
|
|
255789
|
+
function ln(i, e, t, s, a, n, r, I = 0) {
|
|
255789
255790
|
if (a.has(i)) return {
|
|
255790
255791
|
resolutions: 0,
|
|
255791
255792
|
crossLayer: 0
|
|
@@ -255810,7 +255811,7 @@ ENDSEC;
|
|
|
255810
255811
|
[
|
|
255811
255812
|
...e.definedInLayers
|
|
255812
255813
|
].some((R)=>T.has(R)) || l++;
|
|
255813
|
-
const C =
|
|
255814
|
+
const C = ln(c, f, t, s, a, n, r, I + 1);
|
|
255814
255815
|
E += C.resolutions, l += C.crossLayer;
|
|
255815
255816
|
for (const [R, y] of Object.entries(f.attributes))if (!(R in e.attributes)) {
|
|
255816
255817
|
e.attributes[R] = y;
|
|
@@ -255825,7 +255826,7 @@ ENDSEC;
|
|
|
255825
255826
|
crossLayer: l
|
|
255826
255827
|
};
|
|
255827
255828
|
}
|
|
255828
|
-
function
|
|
255829
|
+
function on(i, e, t, s, a, n) {
|
|
255829
255830
|
const r = t.get(i);
|
|
255830
255831
|
if (r) return r;
|
|
255831
255832
|
if (s.has(i)) {
|
|
@@ -255862,7 +255863,7 @@ ENDSEC;
|
|
|
255862
255863
|
if (!o) continue;
|
|
255863
255864
|
const c = n.resolvePath(o) || o;
|
|
255864
255865
|
if (e.get(c)) {
|
|
255865
|
-
const T =
|
|
255866
|
+
const T = on(c, e, t, s, a, n);
|
|
255866
255867
|
E.children.set(l, T);
|
|
255867
255868
|
}
|
|
255868
255869
|
}
|
|
@@ -255905,7 +255906,7 @@ ENDSEC;
|
|
|
255905
255906
|
phase: "entities",
|
|
255906
255907
|
percent: 0
|
|
255907
255908
|
});
|
|
255908
|
-
const r = new Je, { entities: I, pathToId: E, idToPath: l } =
|
|
255909
|
+
const r = new Je, { entities: I, pathToId: E, idToPath: l } = Ja(n, r);
|
|
255909
255910
|
e.onProgress?.({
|
|
255910
255911
|
phase: "entities",
|
|
255911
255912
|
percent: 100
|
|
@@ -255913,7 +255914,7 @@ ENDSEC;
|
|
|
255913
255914
|
phase: "properties",
|
|
255914
255915
|
percent: 0
|
|
255915
255916
|
});
|
|
255916
|
-
const o =
|
|
255917
|
+
const o = za(n, E, r);
|
|
255917
255918
|
e.onProgress?.({
|
|
255918
255919
|
phase: "properties",
|
|
255919
255920
|
percent: 100
|
|
@@ -255921,7 +255922,7 @@ ENDSEC;
|
|
|
255921
255922
|
phase: "geometry",
|
|
255922
255923
|
percent: 0
|
|
255923
255924
|
});
|
|
255924
|
-
const c =
|
|
255925
|
+
const c = tn(n, E), f = sn(n, E);
|
|
255925
255926
|
e.onProgress?.({
|
|
255926
255927
|
phase: "geometry",
|
|
255927
255928
|
percent: 100
|
|
@@ -255929,7 +255930,7 @@ ENDSEC;
|
|
|
255929
255930
|
phase: "hierarchy",
|
|
255930
255931
|
percent: 0
|
|
255931
255932
|
});
|
|
255932
|
-
const T =
|
|
255933
|
+
const T = an(n, E);
|
|
255933
255934
|
e.onProgress?.({
|
|
255934
255935
|
phase: "hierarchy",
|
|
255935
255936
|
percent: 100
|
|
@@ -255937,12 +255938,12 @@ ENDSEC;
|
|
|
255937
255938
|
phase: "relationships",
|
|
255938
255939
|
percent: 0
|
|
255939
255940
|
});
|
|
255940
|
-
const p =
|
|
255941
|
+
const p = Tn(n, E);
|
|
255941
255942
|
e.onProgress?.({
|
|
255942
255943
|
phase: "relationships",
|
|
255943
255944
|
percent: 100
|
|
255944
255945
|
});
|
|
255945
|
-
const C =
|
|
255946
|
+
const C = cn(n, E, r), R = performance.now() - t;
|
|
255946
255947
|
return {
|
|
255947
255948
|
entities: I,
|
|
255948
255949
|
properties: o,
|
|
@@ -255960,8 +255961,8 @@ ENDSEC;
|
|
|
255960
255961
|
parseTime: R
|
|
255961
255962
|
};
|
|
255962
255963
|
};
|
|
255963
|
-
function
|
|
255964
|
-
const t = new
|
|
255964
|
+
function Tn(i, e) {
|
|
255965
|
+
const t = new Xi;
|
|
255965
255966
|
let s = 1;
|
|
255966
255967
|
for (const a of i.values()){
|
|
255967
255968
|
const n = e.get(a.path);
|
|
@@ -255988,15 +255989,15 @@ ENDSEC;
|
|
|
255988
255989
|
"IfcSpace"
|
|
255989
255990
|
].includes(i) : !1;
|
|
255990
255991
|
}
|
|
255991
|
-
function
|
|
255992
|
-
const s = new
|
|
255992
|
+
function cn(i, e, t) {
|
|
255993
|
+
const s = new _i(t), a = (n)=>n === "Volume" || n.endsWith("Volume") ? 2 : n === "Area" || n.endsWith("Area") ? 1 : n === "Count" || n.endsWith("Count") ? 3 : n === "Weight" || n === "Mass" || n.endsWith("Weight") || n.endsWith("Mass") ? 4 : 0;
|
|
255993
255994
|
for (const n of i.values()){
|
|
255994
255995
|
const r = e.get(n.path);
|
|
255995
255996
|
if (r === void 0) continue;
|
|
255996
255997
|
const I = n.attributes.get("bsi::ifc::class")?.code, E = I ? `Qto_${I.replace("Ifc", "")}BaseQuantities` : "BaseQuantities";
|
|
255997
255998
|
for (const [l, o] of n.attributes){
|
|
255998
255999
|
const c = l.split("::").pop() ?? "";
|
|
255999
|
-
typeof o == "number" &&
|
|
256000
|
+
typeof o == "number" && en(c) && s.add({
|
|
256000
256001
|
entityId: r,
|
|
256001
256002
|
qsetName: E,
|
|
256002
256003
|
quantityName: c,
|
|
@@ -256064,7 +256065,7 @@ ENDSEC;
|
|
|
256064
256065
|
phase: "entities",
|
|
256065
256066
|
percent: 0
|
|
256066
256067
|
});
|
|
256067
|
-
const I = new Je, { entities: E, pathToId: l, idToPath: o } =
|
|
256068
|
+
const I = new Je, { entities: E, pathToId: l, idToPath: o } = Ja(r, I);
|
|
256068
256069
|
e.onProgress?.({
|
|
256069
256070
|
phase: "entities",
|
|
256070
256071
|
percent: 100
|
|
@@ -256072,7 +256073,7 @@ ENDSEC;
|
|
|
256072
256073
|
phase: "properties",
|
|
256073
256074
|
percent: 0
|
|
256074
256075
|
});
|
|
256075
|
-
const c =
|
|
256076
|
+
const c = za(r, l, I);
|
|
256076
256077
|
e.onProgress?.({
|
|
256077
256078
|
phase: "properties",
|
|
256078
256079
|
percent: 100
|
|
@@ -256080,7 +256081,7 @@ ENDSEC;
|
|
|
256080
256081
|
phase: "geometry",
|
|
256081
256082
|
percent: 0
|
|
256082
256083
|
});
|
|
256083
|
-
const f =
|
|
256084
|
+
const f = tn(r, l), T = sn(r, l);
|
|
256084
256085
|
e.onProgress?.({
|
|
256085
256086
|
phase: "geometry",
|
|
256086
256087
|
percent: 100
|
|
@@ -256088,7 +256089,7 @@ ENDSEC;
|
|
|
256088
256089
|
phase: "hierarchy",
|
|
256089
256090
|
percent: 0
|
|
256090
256091
|
});
|
|
256091
|
-
const p =
|
|
256092
|
+
const p = an(r, l);
|
|
256092
256093
|
e.onProgress?.({
|
|
256093
256094
|
phase: "hierarchy",
|
|
256094
256095
|
percent: 100
|
|
@@ -256096,12 +256097,12 @@ ENDSEC;
|
|
|
256096
256097
|
phase: "relationships",
|
|
256097
256098
|
percent: 0
|
|
256098
256099
|
});
|
|
256099
|
-
const C =
|
|
256100
|
+
const C = Tn(r, l);
|
|
256100
256101
|
e.onProgress?.({
|
|
256101
256102
|
phase: "relationships",
|
|
256102
256103
|
percent: 100
|
|
256103
256104
|
});
|
|
256104
|
-
const R =
|
|
256105
|
+
const R = cn(r, l, I), y = new Map;
|
|
256105
256106
|
for (const [m, A] of n.composed)y.set(m, Array.from(A.contributingLayers));
|
|
256106
256107
|
const u = performance.now() - t;
|
|
256107
256108
|
return {
|
|
@@ -256177,16 +256178,16 @@ ENDSEC;
|
|
|
256177
256178
|
TimeLag: 6,
|
|
256178
256179
|
SequenceType: 7,
|
|
256179
256180
|
UserDefinedSequenceType: 8
|
|
256180
|
-
},
|
|
256181
|
+
}, qs = {
|
|
256181
256182
|
RelatedObjects: 4,
|
|
256182
256183
|
RelatingProcess: 6
|
|
256183
|
-
},
|
|
256184
|
+
}, Zs = {
|
|
256184
256185
|
RelatedObjects: 4,
|
|
256185
256186
|
RelatingControl: 6
|
|
256186
|
-
},
|
|
256187
|
+
}, Js = {
|
|
256187
256188
|
RelatingObject: 4,
|
|
256188
256189
|
RelatedObjects: 5
|
|
256189
|
-
},
|
|
256190
|
+
}, fn = {
|
|
256190
256191
|
GlobalId: 0,
|
|
256191
256192
|
Name: 2,
|
|
256192
256193
|
Description: 3,
|
|
@@ -256197,7 +256198,7 @@ ENDSEC;
|
|
|
256197
256198
|
StartTime: 11,
|
|
256198
256199
|
FinishTime: 12,
|
|
256199
256200
|
PredefinedType: 13
|
|
256200
|
-
}, El =
|
|
256201
|
+
}, El = fn, ll = {
|
|
256201
256202
|
LagValue: 3
|
|
256202
256203
|
};
|
|
256203
256204
|
function Y(i) {
|
|
@@ -256253,7 +256254,7 @@ ENDSEC;
|
|
|
256253
256254
|
return;
|
|
256254
256255
|
}
|
|
256255
256256
|
}
|
|
256256
|
-
function
|
|
256257
|
+
function zs(i) {
|
|
256257
256258
|
if (!i) return;
|
|
256258
256259
|
const e = i.match(/^P(?:(\d+(?:\.\d+)?)Y)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/);
|
|
256259
256260
|
if (!e) return;
|
|
@@ -256300,11 +256301,11 @@ ENDSEC;
|
|
|
256300
256301
|
if (Array.isArray(r) && r.length === 2) {
|
|
256301
256302
|
const I = String(r[0]).toUpperCase(), E = r[1];
|
|
256302
256303
|
if (I === "IFCDURATION" && typeof E == "string") return {
|
|
256303
|
-
seconds:
|
|
256304
|
+
seconds: zs(E),
|
|
256304
256305
|
duration: E
|
|
256305
256306
|
};
|
|
256306
256307
|
} else if (typeof r == "string") return {
|
|
256307
|
-
seconds:
|
|
256308
|
+
seconds: zs(r),
|
|
256308
256309
|
duration: r
|
|
256309
256310
|
};
|
|
256310
256311
|
return {};
|
|
@@ -256376,7 +256377,7 @@ ENDSEC;
|
|
|
256376
256377
|
if (!m) continue;
|
|
256377
256378
|
const A = o.extractEntity(m);
|
|
256378
256379
|
if (!A) continue;
|
|
256379
|
-
const d = A.attributes || [], O = De(d[
|
|
256380
|
+
const d = A.attributes || [], O = De(d[Js.RelatingObject]), F = Ci(d[Js.RelatedObjects]);
|
|
256380
256381
|
if (O === void 0) continue;
|
|
256381
256382
|
const g = f.get(O);
|
|
256382
256383
|
if (g) for (const V of F){
|
|
@@ -256389,7 +256390,7 @@ ENDSEC;
|
|
|
256389
256390
|
if (!m) continue;
|
|
256390
256391
|
const A = o.extractEntity(m);
|
|
256391
256392
|
if (!A) continue;
|
|
256392
|
-
const d = A.attributes || [], O = De(d[
|
|
256393
|
+
const d = A.attributes || [], O = De(d[qs.RelatingProcess]), F = Ci(d[qs.RelatedObjects]);
|
|
256393
256394
|
if (O === void 0) continue;
|
|
256394
256395
|
const g = f.get(O);
|
|
256395
256396
|
if (g) for (const V of F){
|
|
@@ -256402,7 +256403,7 @@ ENDSEC;
|
|
|
256402
256403
|
if (!A) return null;
|
|
256403
256404
|
const d = o.extractEntity(A);
|
|
256404
256405
|
if (!d) return null;
|
|
256405
|
-
const O = d.attributes || [], F = m === "WorkPlan" ? El :
|
|
256406
|
+
const O = d.attributes || [], F = m === "WorkPlan" ? El : fn, g = Y(O[F.GlobalId]) ?? "", V = {
|
|
256406
256407
|
expressId: u,
|
|
256407
256408
|
kind: m,
|
|
256408
256409
|
globalId: g,
|
|
@@ -256432,7 +256433,7 @@ ENDSEC;
|
|
|
256432
256433
|
if (!m) continue;
|
|
256433
256434
|
const A = o.extractEntity(m);
|
|
256434
256435
|
if (!A) continue;
|
|
256435
|
-
const d = A.attributes || [], O = De(d[
|
|
256436
|
+
const d = A.attributes || [], O = De(d[Zs.RelatingControl]), F = Ci(d[Zs.RelatedObjects]);
|
|
256436
256437
|
if (O === void 0) continue;
|
|
256437
256438
|
const g = C.get(O);
|
|
256438
256439
|
if (g) for (const V of F){
|
|
@@ -256512,7 +256513,7 @@ ENDSEC;
|
|
|
256512
256513
|
function Ri(i) {
|
|
256513
256514
|
return i.length === 0 ? "$" : `(${i.map((e)=>`#${e}`).join(",")})`;
|
|
256514
256515
|
}
|
|
256515
|
-
function
|
|
256516
|
+
function is(i, e) {
|
|
256516
256517
|
return i && i.length > 0 ? i : vt(e);
|
|
256517
256518
|
}
|
|
256518
256519
|
Sc = function(i, e) {
|
|
@@ -256580,7 +256581,7 @@ ENDSEC;
|
|
|
256580
256581
|
const y = t++;
|
|
256581
256582
|
s.push(`#${y}=IFCLAGTIME($,$,$,IFCDURATION('${He(c)}'),.WORKTIME.);`), f = `#${y}`, n.lagTimes += 1;
|
|
256582
256583
|
}
|
|
256583
|
-
const T = t++, p =
|
|
256584
|
+
const T = t++, p = is(E.globalId, `rel-seq|${E.relatingTaskGlobalId}|${E.relatedTaskGlobalId}`), C = Jt(E.sequenceType ?? "FINISH_START"), R = K(E.userDefinedSequenceType);
|
|
256584
256585
|
s.push(`#${T}=IFCRELSEQUENCE('${p}',${a},$,$,#${l},#${o},${f},${C},${R});`), n.sequences += 1;
|
|
256585
256586
|
}
|
|
256586
256587
|
return {
|
|
@@ -256590,7 +256591,7 @@ ENDSEC;
|
|
|
256590
256591
|
};
|
|
256591
256592
|
};
|
|
256592
256593
|
function ul(i, e, t) {
|
|
256593
|
-
const s = e.kind === "WorkPlan" ? "IFCWORKPLAN" : "IFCWORKSCHEDULE", a =
|
|
256594
|
+
const s = e.kind === "WorkPlan" ? "IFCWORKPLAN" : "IFCWORKSCHEDULE", a = is(e.globalId, `ws|${e.kind}|${e.name}`), n = e.creationDate ?? e.startTime ?? e.finishTime ?? "1970-01-01T00:00:00", r = e.startTime ?? e.finishTime ?? n, I = e.finishTime ?? r;
|
|
256594
256595
|
return [
|
|
256595
256596
|
`#${i}=${s}(`,
|
|
256596
256597
|
`'${a}',`,
|
|
@@ -256638,7 +256639,7 @@ ENDSEC;
|
|
|
256638
256639
|
].join("");
|
|
256639
256640
|
}
|
|
256640
256641
|
function Sl(i, e, t, s) {
|
|
256641
|
-
const a =
|
|
256642
|
+
const a = is(e.globalId, `task|${e.name}`), n = s !== void 0 ? `#${s}` : "$";
|
|
256642
256643
|
return [
|
|
256643
256644
|
`#${i}=IFCTASK(`,
|
|
256644
256645
|
`'${a}',`,
|
|
@@ -256922,7 +256923,7 @@ self.onmessage = function(e) {
|
|
|
256922
256923
|
}
|
|
256923
256924
|
});
|
|
256924
256925
|
}
|
|
256925
|
-
const bl = 61, xl = 40,
|
|
256926
|
+
const bl = 61, xl = 40, ea = 32, ta = 9, Ul = 10, hl = 13;
|
|
256926
256927
|
function Bl(i, e, t) {
|
|
256927
256928
|
let s = "";
|
|
256928
256929
|
for(let a = e; a < t; a++)s += String.fromCharCode(i[a]);
|
|
@@ -256940,9 +256941,9 @@ self.onmessage = function(e) {
|
|
|
256940
256941
|
const T = c + f;
|
|
256941
256942
|
let p = c;
|
|
256942
256943
|
for(; p < T && i[p] !== bl;)p++;
|
|
256943
|
-
for(p++; p < T && (i[p] ===
|
|
256944
|
+
for(p++; p < T && (i[p] === ea || i[p] === ta);)p++;
|
|
256944
256945
|
const C = p;
|
|
256945
|
-
for(; p < T && i[p] !== xl && i[p] !==
|
|
256946
|
+
for(; p < T && i[p] !== xl && i[p] !== ea && i[p] !== ta && i[p] !== Ul && i[p] !== hl;)p++;
|
|
256946
256947
|
const y = Bl(i, C, p);
|
|
256947
256948
|
let u = I.get(y);
|
|
256948
256949
|
u === void 0 && (I.set(y, y), u = y), r[l] = {
|
|
@@ -256962,7 +256963,7 @@ self.onmessage = function(e) {
|
|
|
256962
256963
|
phase: "scan",
|
|
256963
256964
|
percent: 0
|
|
256964
256965
|
});
|
|
256965
|
-
const a = new
|
|
256966
|
+
const a = new Bs(s), n = new mI, r = [];
|
|
256966
256967
|
for (const p of a.scanEntities())n.addEntity({
|
|
256967
256968
|
expressId: p.expressId,
|
|
256968
256969
|
type: p.type,
|
|
@@ -257054,7 +257055,7 @@ self.onmessage = function(e) {
|
|
|
257054
257055
|
console.warn("[IfcParser] WASM scan failed, falling back to TypeScript:", T), r.length = 0, I = 0;
|
|
257055
257056
|
}
|
|
257056
257057
|
if (r.length === 0) {
|
|
257057
|
-
const T = new
|
|
257058
|
+
const T = new Bs(s), p = 5e3, C = Math.max(a * 13500, 1e4);
|
|
257058
257059
|
for (const R of T.scanEntitiesFast())if (r.push({
|
|
257059
257060
|
expressId: R.expressId,
|
|
257060
257061
|
type: R.type,
|
|
@@ -257073,7 +257074,7 @@ self.onmessage = function(e) {
|
|
|
257073
257074
|
return console.log(`[IfcParser] Fast scan: ${I} entities in ${o.toFixed(0)}ms (path=${E})`), t.onDiagnostic?.(`scan complete: entities=${I} elapsed=${o.toFixed(0)}ms`), t.onProgress?.({
|
|
257074
257075
|
phase: "scanning",
|
|
257075
257076
|
percent: 100
|
|
257076
|
-
}), await new
|
|
257077
|
+
}), await new es().parseLite(e, r, t);
|
|
257077
257078
|
}
|
|
257078
257079
|
};
|
|
257079
257080
|
Yl = function(i, e) {
|
|
@@ -257141,7 +257142,7 @@ self.onmessage = function(e) {
|
|
|
257141
257142
|
if (!t) return null;
|
|
257142
257143
|
const a = new J(i.source).extractEntity(t);
|
|
257143
257144
|
if (!a) return null;
|
|
257144
|
-
const r =
|
|
257145
|
+
const r = zi(a.type).indexOf("ObjectPlacement"), I = r >= 0 ? r : 5, E = a.attributes?.[I];
|
|
257145
257146
|
return typeof E == "number" ? E : null;
|
|
257146
257147
|
}
|
|
257147
257148
|
Lc = function(i, e, t = {}) {
|
|
@@ -257214,7 +257215,7 @@ self.onmessage = function(e) {
|
|
|
257214
257215
|
function wl(i) {
|
|
257215
257216
|
return i == null ? "$" : typeof i == "number" ? `#${i}` : typeof i == "string" ? i : "$";
|
|
257216
257217
|
}
|
|
257217
|
-
function
|
|
257218
|
+
function ia(i) {
|
|
257218
257219
|
const e = wl(i);
|
|
257219
257220
|
return e === "$" ? null : e;
|
|
257220
257221
|
}
|
|
@@ -257239,7 +257240,7 @@ self.onmessage = function(e) {
|
|
|
257239
257240
|
if (!T) throw new Error(`resolveDuplicateSource: axis placement #${f} missing`);
|
|
257240
257241
|
const p = s.extractEntity(T);
|
|
257241
257242
|
if (!p) throw new Error(`resolveDuplicateSource: could not parse axis #${f}`);
|
|
257242
|
-
const C = Ae(p.attributes[0]), R =
|
|
257243
|
+
const C = Ae(p.attributes[0]), R = ia(p.attributes[1]), y = ia(p.attributes[2]);
|
|
257243
257244
|
let u = [
|
|
257244
257245
|
0,
|
|
257245
257246
|
0,
|
|
@@ -257302,7 +257303,7 @@ self.onmessage = function(e) {
|
|
|
257302
257303
|
}
|
|
257303
257304
|
return s;
|
|
257304
257305
|
}
|
|
257305
|
-
const Xl = .05, jl = .5,
|
|
257306
|
+
const Xl = .05, jl = .5, pn = 1e-9;
|
|
257306
257307
|
function Kl(i, e = {}) {
|
|
257307
257308
|
const t = e.snapTolerance ?? Xl, s = e.minArea ?? jl, n = !!e.debug ? (...N)=>console.debug("[auto-space-detect]", ...N) : ()=>{}, r = {
|
|
257308
257309
|
inputSegments: i.length,
|
|
@@ -257318,7 +257319,7 @@ self.onmessage = function(e) {
|
|
|
257318
257319
|
spaces: [],
|
|
257319
257320
|
stats: r
|
|
257320
257321
|
};
|
|
257321
|
-
const I = [], E = Math.max(t,
|
|
257322
|
+
const I = [], E = Math.max(t, pn), l = new Map, o = (N, L)=>`${N},${L}`, c = (N)=>{
|
|
257322
257323
|
const L = t * t, D = Math.floor(N[0] / E), G = Math.floor(N[1] / E);
|
|
257323
257324
|
for(let ee = -1; ee <= 1; ee++)for(let te = -1; te <= 1; te++){
|
|
257324
257325
|
const se = l.get(o(D + ee, G + te));
|
|
@@ -257545,7 +257546,7 @@ self.onmessage = function(e) {
|
|
|
257545
257546
|
}
|
|
257546
257547
|
function $l(i, e, t, s) {
|
|
257547
257548
|
const a = i[0], n = i[1], r = e[0], I = e[1], E = t[0], l = t[1], o = s[0], c = s[1], f = (a - r) * (l - c) - (n - I) * (E - o);
|
|
257548
|
-
if (Math.abs(f) <
|
|
257549
|
+
if (Math.abs(f) < pn) return null;
|
|
257549
257550
|
const T = ((a - E) * (l - c) - (n - l) * (E - o)) / f, p = -((a - r) * (n - l) - (n - I) * (a - E)) / f, C = 1e-7;
|
|
257550
257551
|
return T < -C || T > 1 + C || p < -C || p > 1 + C || (T < C || T > 1 - C) && (p < C || p > 1 - C) ? null : {
|
|
257551
257552
|
point: [
|
|
@@ -257565,12 +257566,12 @@ self.onmessage = function(e) {
|
|
|
257565
257566
|
"ifcplate",
|
|
257566
257567
|
"ifcmember",
|
|
257567
257568
|
"ifcrailing"
|
|
257568
|
-
]),
|
|
257569
|
+
]), ss = 1e-6;
|
|
257569
257570
|
function Zl(i, e, t, s = {}) {
|
|
257570
257571
|
const a = [], n = [], r = [], I = !!s.debug, E = I ? (...p)=>console.debug("[extract-walls]", ...p) : ()=>{};
|
|
257571
257572
|
let l = 1;
|
|
257572
257573
|
if (i.source) try {
|
|
257573
|
-
l =
|
|
257574
|
+
l = Va(i.source, i.entityIndex), (!Number.isFinite(l) || l <= 0) && (l = 1);
|
|
257574
257575
|
} catch {
|
|
257575
257576
|
l = 1;
|
|
257576
257577
|
}
|
|
@@ -257635,7 +257636,7 @@ self.onmessage = function(e) {
|
|
|
257635
257636
|
function eo(i, e, t, s, a) {
|
|
257636
257637
|
const n = [], r = new Set;
|
|
257637
257638
|
if (!i.source) return n;
|
|
257638
|
-
const I =
|
|
257639
|
+
const I = sa(i, e, "IFCRELAGGREGATES", 4, 5), E = sa(i, e, "IFCRELCONTAINEDINSPATIALSTRUCTURE", 5, 4), l = (T)=>{
|
|
257639
257640
|
if (r.has(T)) return;
|
|
257640
257641
|
const p = i.entities.getTypeName(T);
|
|
257641
257642
|
if (p && zl(p, s)) {
|
|
@@ -257660,7 +257661,7 @@ self.onmessage = function(e) {
|
|
|
257660
257661
|
...s
|
|
257661
257662
|
].join(", ")}`), n;
|
|
257662
257663
|
}
|
|
257663
|
-
function
|
|
257664
|
+
function sa(i, e, t, s, a) {
|
|
257664
257665
|
const n = new Map, r = i.entityIndex.byType.get(t);
|
|
257665
257666
|
if (!r) return n;
|
|
257666
257667
|
for (const I of r){
|
|
@@ -257696,7 +257697,7 @@ self.onmessage = function(e) {
|
|
|
257696
257697
|
} : I === null ? {
|
|
257697
257698
|
segment: null,
|
|
257698
257699
|
reason: "no-representation"
|
|
257699
|
-
} :
|
|
257700
|
+
} : Cn(i, e, r, I, void 0, t, s);
|
|
257700
257701
|
}
|
|
257701
257702
|
function io(i, e, t, s, a) {
|
|
257702
257703
|
const n = re(s.attributes[5]), r = re(s.attributes[6]);
|
|
@@ -257706,9 +257707,9 @@ self.onmessage = function(e) {
|
|
|
257706
257707
|
} : r === null ? {
|
|
257707
257708
|
segment: null,
|
|
257708
257709
|
reason: "no-representation"
|
|
257709
|
-
} :
|
|
257710
|
+
} : Cn(i, e, n, r, t, s.expressId, a);
|
|
257710
257711
|
}
|
|
257711
|
-
function
|
|
257712
|
+
function Cn(i, e, t, s, a, n, r) {
|
|
257712
257713
|
const I = so(i, e, a, t);
|
|
257713
257714
|
if (!I) return r(`wall #${n}: placement chain not resolvable (placement=#${t})`), {
|
|
257714
257715
|
segment: null,
|
|
@@ -257716,25 +257717,25 @@ self.onmessage = function(e) {
|
|
|
257716
257717
|
};
|
|
257717
257718
|
const E = ao(i, e, a, s);
|
|
257718
257719
|
if (E) {
|
|
257719
|
-
const o =
|
|
257720
|
-
return
|
|
257720
|
+
const o = na(I, E[0]), c = na(I, E[1]);
|
|
257721
|
+
return aa(o, c, n, r, "axis-rep");
|
|
257721
257722
|
}
|
|
257722
257723
|
const l = no(i, e, a, s);
|
|
257723
|
-
if (l !== null && l >
|
|
257724
|
+
if (l !== null && l > ss) {
|
|
257724
257725
|
const o = I.origin, c = [
|
|
257725
257726
|
I.origin[0] + I.axisX[0] * l,
|
|
257726
257727
|
I.origin[1] + I.axisX[1] * l
|
|
257727
257728
|
];
|
|
257728
|
-
return
|
|
257729
|
+
return aa(o, c, n, r, "rect-profile");
|
|
257729
257730
|
}
|
|
257730
257731
|
return r(`wall #${n}: no Axis representation and no IfcRectangleProfileDef body — skipping`), {
|
|
257731
257732
|
segment: null,
|
|
257732
257733
|
reason: "no-axis-or-rect-profile"
|
|
257733
257734
|
};
|
|
257734
257735
|
}
|
|
257735
|
-
function
|
|
257736
|
+
function aa(i, e, t, s, a) {
|
|
257736
257737
|
const n = e[0] - i[0], r = e[1] - i[1], I = Math.hypot(n, r);
|
|
257737
|
-
return I <
|
|
257738
|
+
return I < ss ? (s(`wall #${t}: degenerate axis length=${I.toExponential(2)} (source=${a})`), {
|
|
257738
257739
|
segment: null,
|
|
257739
257740
|
reason: "zero-length-axis"
|
|
257740
257741
|
}) : (s(`wall #${t}: axis (${i[0].toFixed(3)},${i[1].toFixed(3)})→(${e[0].toFixed(3)},${e[1].toFixed(3)}) len=${I.toFixed(3)} source=${a}`), {
|
|
@@ -257767,7 +257768,7 @@ self.onmessage = function(e) {
|
|
|
257767
257768
|
const T = Gi(f.attributes[0]);
|
|
257768
257769
|
if (T) {
|
|
257769
257770
|
const p = Math.hypot(T[0], T[1]);
|
|
257770
|
-
p >
|
|
257771
|
+
p > ss && (c = [
|
|
257771
257772
|
T[0] / p,
|
|
257772
257773
|
T[1] / p
|
|
257773
257774
|
]);
|
|
@@ -257782,7 +257783,7 @@ self.onmessage = function(e) {
|
|
|
257782
257783
|
axisX: c
|
|
257783
257784
|
};
|
|
257784
257785
|
}
|
|
257785
|
-
function
|
|
257786
|
+
function na(i, e) {
|
|
257786
257787
|
const t = i.axisX[0], s = i.axisX[1], a = -s, n = t;
|
|
257787
257788
|
return [
|
|
257788
257789
|
i.origin[0] + t * e[0] + a * e[1],
|
|
@@ -257809,7 +257810,7 @@ self.onmessage = function(e) {
|
|
|
257809
257810
|
if (!T || (i.entities.getTypeName(f) || T.type || "").toLowerCase() !== "ifcpolyline") continue;
|
|
257810
257811
|
const C = T.attributes[0];
|
|
257811
257812
|
if (!Array.isArray(C) || C.length < 2) continue;
|
|
257812
|
-
const R =
|
|
257813
|
+
const R = ra(i, e, t, C[0]), y = ra(i, e, t, C[C.length - 1]);
|
|
257813
257814
|
if (R && y) return [
|
|
257814
257815
|
R,
|
|
257815
257816
|
y
|
|
@@ -257818,7 +257819,7 @@ self.onmessage = function(e) {
|
|
|
257818
257819
|
}
|
|
257819
257820
|
return null;
|
|
257820
257821
|
}
|
|
257821
|
-
function
|
|
257822
|
+
function ra(i, e, t, s) {
|
|
257822
257823
|
const a = re(s);
|
|
257823
257824
|
if (a === null) return null;
|
|
257824
257825
|
const n = ue(i, e, t, a);
|
|
@@ -258042,7 +258043,7 @@ self.onmessage = function(e) {
|
|
|
258042
258043
|
}
|
|
258043
258044
|
return typeof e.modelId == "string" && typeof e.expressId == "number" ? e : null;
|
|
258044
258045
|
}
|
|
258045
|
-
function
|
|
258046
|
+
function Ia(i) {
|
|
258046
258047
|
return i.map((e)=>({
|
|
258047
258048
|
name: e.name,
|
|
258048
258049
|
Name: e.name,
|
|
@@ -258147,7 +258148,7 @@ self.onmessage = function(e) {
|
|
|
258147
258148
|
call: (i, e)=>{
|
|
258148
258149
|
const t = q(e[0]);
|
|
258149
258150
|
return t ? i.properties(t).map((s)=>{
|
|
258150
|
-
const a =
|
|
258151
|
+
const a = Ia(s.properties);
|
|
258151
258152
|
return {
|
|
258152
258153
|
name: s.name,
|
|
258153
258154
|
Name: s.name,
|
|
@@ -258184,7 +258185,7 @@ self.onmessage = function(e) {
|
|
|
258184
258185
|
call: (i, e)=>{
|
|
258185
258186
|
const t = q(e[0]);
|
|
258186
258187
|
return t ? i.quantities(t).map((s)=>{
|
|
258187
|
-
const a =
|
|
258188
|
+
const a = Ia(s.quantities);
|
|
258188
258189
|
return {
|
|
258189
258190
|
name: s.name,
|
|
258190
258191
|
Name: s.name,
|
|
@@ -259431,7 +259432,7 @@ self.onmessage = function(e) {
|
|
|
259431
259432
|
this.backend = e;
|
|
259432
259433
|
}
|
|
259433
259434
|
colorize(e, t) {
|
|
259434
|
-
const s =
|
|
259435
|
+
const s = Ss(t, 1);
|
|
259435
259436
|
this.backend.viewer.colorize(e, s);
|
|
259436
259437
|
}
|
|
259437
259438
|
colorizeRgba(e, t) {
|
|
@@ -259440,7 +259441,7 @@ self.onmessage = function(e) {
|
|
|
259440
259441
|
colorizeAll(e) {
|
|
259441
259442
|
const t = e.map((s)=>({
|
|
259442
259443
|
refs: s.refs,
|
|
259443
|
-
color:
|
|
259444
|
+
color: Ss(s.color, 1)
|
|
259444
259445
|
}));
|
|
259445
259446
|
this.backend.viewer.colorizeAll(t);
|
|
259446
259447
|
}
|
|
@@ -259526,9 +259527,9 @@ self.onmessage = function(e) {
|
|
|
259526
259527
|
}
|
|
259527
259528
|
addEntity(e, t) {
|
|
259528
259529
|
if (!t || typeof t.type != "string" || t.type.length === 0) throw new TypeError("addEntity: def.type must be a non-empty IFC type string");
|
|
259529
|
-
if (!
|
|
259530
|
+
if (!va(t.type)) throw new TypeError(`addEntity: unknown IFC type '${t.type}'. Pass a canonical PascalCase name (e.g. 'IfcWall').`);
|
|
259530
259531
|
return this.backend.store.addEntity(e, {
|
|
259531
|
-
type:
|
|
259532
|
+
type: Wa(t.type),
|
|
259532
259533
|
attributes: t.attributes
|
|
259533
259534
|
});
|
|
259534
259535
|
}
|
|
@@ -260096,11 +260097,11 @@ self.onmessage = function(e) {
|
|
|
260096
260097
|
}
|
|
260097
260098
|
}
|
|
260098
260099
|
const Do = "https://identifier.buildingsmart.org/uri/buildingsmart/ifc/4.3";
|
|
260099
|
-
function
|
|
260100
|
+
function Ea(i, e, t) {
|
|
260100
260101
|
const s = i.get(e);
|
|
260101
260102
|
return s && Date.now() - s.ts < t ? s.data : (s && i.delete(e), null);
|
|
260102
260103
|
}
|
|
260103
|
-
function
|
|
260104
|
+
function la(i, e, t) {
|
|
260104
260105
|
i.set(e, {
|
|
260105
260106
|
data: t,
|
|
260106
260107
|
ts: Date.now()
|
|
@@ -260131,7 +260132,7 @@ self.onmessage = function(e) {
|
|
|
260131
260132
|
if (!e.ok) throw new ft(e.status, e.statusText, i, Mo(e.headers.get("retry-after")));
|
|
260132
260133
|
return e.json();
|
|
260133
260134
|
}
|
|
260134
|
-
function
|
|
260135
|
+
function Rn(i, e) {
|
|
260135
260136
|
return {
|
|
260136
260137
|
name: String(i.name ?? i.propertyCode ?? ""),
|
|
260137
260138
|
uri: String(i.propertyUri ?? i.uri ?? ""),
|
|
@@ -260147,7 +260148,7 @@ self.onmessage = function(e) {
|
|
|
260147
260148
|
isIfcStandard: e
|
|
260148
260149
|
};
|
|
260149
260150
|
}
|
|
260150
|
-
function
|
|
260151
|
+
function oa(i, e) {
|
|
260151
260152
|
const t = i.classProperties;
|
|
260152
260153
|
return {
|
|
260153
260154
|
uri: String(i.uri ?? ""),
|
|
@@ -260156,7 +260157,7 @@ self.onmessage = function(e) {
|
|
|
260156
260157
|
definition: i.definition ? String(i.definition) : null,
|
|
260157
260158
|
parentClassUri: i.parentClassReference ? String(i.parentClassReference.uri ?? "") : null,
|
|
260158
260159
|
relatedIfcEntityNames: i.relatedIfcEntityNames,
|
|
260159
|
-
classProperties: (t ?? []).map((s)=>
|
|
260160
|
+
classProperties: (t ?? []).map((s)=>Rn(s, e))
|
|
260160
260161
|
};
|
|
260161
260162
|
}
|
|
260162
260163
|
bo = class {
|
|
@@ -260173,7 +260174,7 @@ self.onmessage = function(e) {
|
|
|
260173
260174
|
return `https://search.bsdd.buildingsmart.org/uri/buildingsmart/ifc/4.3/class/${e}`;
|
|
260174
260175
|
}
|
|
260175
260176
|
async fetchClassInfo(e) {
|
|
260176
|
-
const t = this.ifcClassUri(e), s =
|
|
260177
|
+
const t = this.ifcClassUri(e), s = Ea(this.cache, t, this.cacheTtl);
|
|
260177
260178
|
if (s) return s;
|
|
260178
260179
|
let a;
|
|
260179
260180
|
try {
|
|
@@ -260182,22 +260183,22 @@ self.onmessage = function(e) {
|
|
|
260182
260183
|
if (r instanceof ft && r.status === 404) return null;
|
|
260183
260184
|
throw r;
|
|
260184
260185
|
}
|
|
260185
|
-
let n =
|
|
260186
|
+
let n = oa(a, !0);
|
|
260186
260187
|
if (n.classProperties.length === 0) try {
|
|
260187
260188
|
const I = (await ot(`${this.apiBase}/api/Class/Properties/v1?ClassUri=${encodeURIComponent(t)}`)).classProperties;
|
|
260188
260189
|
I && I.length > 0 && (n = {
|
|
260189
260190
|
...n,
|
|
260190
|
-
classProperties: I.map((E)=>
|
|
260191
|
+
classProperties: I.map((E)=>Rn(E, !0))
|
|
260191
260192
|
});
|
|
260192
260193
|
} catch {}
|
|
260193
|
-
return
|
|
260194
|
+
return la(this.cache, t, n), n;
|
|
260194
260195
|
}
|
|
260195
260196
|
async fetchClassByUri(e) {
|
|
260196
|
-
const t =
|
|
260197
|
+
const t = Ea(this.cache, e, this.cacheTtl);
|
|
260197
260198
|
if (t) return t;
|
|
260198
260199
|
try {
|
|
260199
|
-
const s = await ot(`${this.apiBase}/api/Class/v1?Uri=${encodeURIComponent(e)}&IncludeClassProperties=true`), a =
|
|
260200
|
-
return
|
|
260200
|
+
const s = await ot(`${this.apiBase}/api/Class/v1?Uri=${encodeURIComponent(e)}&IncludeClassProperties=true`), a = oa(s, !1);
|
|
260201
|
+
return la(this.cache, e, a), a;
|
|
260201
260202
|
} catch (s) {
|
|
260202
260203
|
if (s instanceof ft && s.status === 404) return null;
|
|
260203
260204
|
throw s;
|
|
@@ -260289,7 +260290,7 @@ self.onmessage = function(e) {
|
|
|
260289
260290
|
}
|
|
260290
260291
|
});
|
|
260291
260292
|
}
|
|
260292
|
-
class
|
|
260293
|
+
class mn {
|
|
260293
260294
|
constructor(e){
|
|
260294
260295
|
this.transport = e;
|
|
260295
260296
|
}
|
|
@@ -260318,7 +260319,7 @@ self.onmessage = function(e) {
|
|
|
260318
260319
|
});
|
|
260319
260320
|
}
|
|
260320
260321
|
function xo(i) {
|
|
260321
|
-
return !i || typeof i != "object" ? !1 : i._backend instanceof
|
|
260322
|
+
return !i || typeof i != "object" ? !1 : i._backend instanceof mn;
|
|
260322
260323
|
}
|
|
260323
260324
|
class Uo {
|
|
260324
260325
|
bimContext;
|
|
@@ -260432,7 +260433,7 @@ self.onmessage = function(e) {
|
|
|
260432
260433
|
_boundOn;
|
|
260433
260434
|
constructor(e){
|
|
260434
260435
|
if (e.backend) this._backend = e.backend;
|
|
260435
|
-
else if (e.transport) this._backend = new
|
|
260436
|
+
else if (e.transport) this._backend = new mn(e.transport);
|
|
260436
260437
|
else throw new Error("BimContext requires either a backend or transport");
|
|
260437
260438
|
this.model = new fo(this._backend), this._queryNamespace = new Co(this._backend), this.viewer = new Ro(this._backend), this.mutate = new mo(this._backend), this.store = new yo(this._backend), this.lens = new uo, this.export = new Ao(this._backend), this.ids = new So, this.bcf = new Oo, this.drawing = new No, this.list = new Fo, this.spatial = new Lo(this._backend), this.events = new Po(this._backend), this.create = new go(this._backend), this.bsdd = new bo, this.sandbox = new Uo(this), this.files = new ho(this._backend), this.schedule = new Bo(this._backend), this._boundOn = this.events.on.bind(this.events);
|
|
260438
260439
|
}
|
|
@@ -260586,7 +260587,7 @@ self.onmessage = function(e) {
|
|
|
260586
260587
|
this.channels = [], this.ports = [], this.eventSubscriptions = [];
|
|
260587
260588
|
}
|
|
260588
260589
|
};
|
|
260589
|
-
zr((i)=>
|
|
260590
|
+
zr((i)=>va(i) ? Wa(i) : "");
|
|
260590
260591
|
function Be(i, e, t, s) {
|
|
260591
260592
|
return {
|
|
260592
260593
|
name: i,
|
|
@@ -261833,7 +261834,7 @@ self.onmessage = function(e) {
|
|
|
261833
261834
|
optional: s
|
|
261834
261835
|
};
|
|
261835
261836
|
}
|
|
261836
|
-
const
|
|
261837
|
+
const yn = [
|
|
261837
261838
|
h("ScheduleStart", "scheduleStart", "string"),
|
|
261838
261839
|
h("ScheduleFinish", "scheduleFinish", "string"),
|
|
261839
261840
|
h("ScheduleDuration", "scheduleDuration", "string"),
|
|
@@ -261851,7 +261852,7 @@ self.onmessage = function(e) {
|
|
|
261851
261852
|
h("IsCritical", "isCritical", "boolean"),
|
|
261852
261853
|
h("Completion", "completion", "number"),
|
|
261853
261854
|
h("DurationType", "durationType", "'WORKTIME' | 'ELAPSEDTIME' | 'NOTDEFINED'")
|
|
261854
|
-
],
|
|
261855
|
+
], un = [
|
|
261855
261856
|
h("GlobalId", "globalId", "string", !1),
|
|
261856
261857
|
h("ExpressId", "expressId", "number", !1),
|
|
261857
261858
|
h("Name", "name", "string", !1),
|
|
@@ -261869,7 +261870,7 @@ self.onmessage = function(e) {
|
|
|
261869
261870
|
h("AssignedProductExpressIds", "productExpressIds", "number[]", !1),
|
|
261870
261871
|
h("AssignedProductGlobalIds", "productGlobalIds", "string[]", !1),
|
|
261871
261872
|
h("ControllingScheduleGlobalIds", "controllingScheduleGlobalIds", "string[]", !1)
|
|
261872
|
-
],
|
|
261873
|
+
], dn = [
|
|
261873
261874
|
h("GlobalId", "globalId", "string", !1),
|
|
261874
261875
|
h("ExpressId", "expressId", "number", !1),
|
|
261875
261876
|
h("Name", "name", "string", !1),
|
|
@@ -261883,7 +261884,7 @@ self.onmessage = function(e) {
|
|
|
261883
261884
|
h("PredefinedType", "predefinedType", "string"),
|
|
261884
261885
|
h("Kind", "kind", "'WorkSchedule' | 'WorkPlan'", !1),
|
|
261885
261886
|
h("TaskGlobalIds", "taskGlobalIds", "string[]", !1)
|
|
261886
|
-
],
|
|
261887
|
+
], An = [
|
|
261887
261888
|
h("RelatingProcessGlobalId", "relatingTaskGlobalId", "string", !1),
|
|
261888
261889
|
h("RelatedProcessGlobalId", "relatedTaskGlobalId", "string", !1),
|
|
261889
261890
|
h("SequenceType", "sequenceType", "'START_START' | 'START_FINISH' | 'FINISH_START' | 'FINISH_FINISH' | 'USERDEFINED' | 'NOTDEFINED'", !1),
|
|
@@ -261895,33 +261896,33 @@ self.onmessage = function(e) {
|
|
|
261895
261896
|
const t = i.map((s)=>`${s.pascalKey}${s.optional ? "?" : ""}: ${s.tsType}`);
|
|
261896
261897
|
return e && t.push(e), `{ ${t.join("; ")} }`;
|
|
261897
261898
|
}
|
|
261898
|
-
const $o = zt(
|
|
261899
|
+
const $o = zt(yn), Sn = zt(un, `TaskTime?: ${$o}`), On = zt(dn), Nn = zt(An), qo = `{ HasSchedule: boolean; WorkSchedules: Array<${On}>; Tasks: Array<${Sn}>; Sequences: Array<${Nn}> }`;
|
|
261899
261900
|
function ei(i, e) {
|
|
261900
261901
|
const t = {};
|
|
261901
261902
|
for (const s of e)t[s.pascalKey] = i[s.camelKey];
|
|
261902
261903
|
return t;
|
|
261903
261904
|
}
|
|
261904
261905
|
function Zo(i) {
|
|
261905
|
-
if (i) return ei(i,
|
|
261906
|
+
if (i) return ei(i, yn);
|
|
261906
261907
|
}
|
|
261907
|
-
function
|
|
261908
|
+
function Fn(i) {
|
|
261908
261909
|
return {
|
|
261909
|
-
...ei(i,
|
|
261910
|
+
...ei(i, un),
|
|
261910
261911
|
TaskTime: Zo(i.taskTime)
|
|
261911
261912
|
};
|
|
261912
261913
|
}
|
|
261913
|
-
function Fn(i) {
|
|
261914
|
-
return ei(i, un);
|
|
261915
|
-
}
|
|
261916
261914
|
function Ln(i) {
|
|
261917
261915
|
return ei(i, dn);
|
|
261918
261916
|
}
|
|
261917
|
+
function Pn(i) {
|
|
261918
|
+
return ei(i, An);
|
|
261919
|
+
}
|
|
261919
261920
|
function Jo(i) {
|
|
261920
261921
|
return {
|
|
261921
261922
|
HasSchedule: i.hasSchedule,
|
|
261922
|
-
WorkSchedules: (i.workSchedules ?? []).map(
|
|
261923
|
-
Tasks: (i.tasks ?? []).map(
|
|
261924
|
-
Sequences: (i.sequences ?? []).map(
|
|
261923
|
+
WorkSchedules: (i.workSchedules ?? []).map(Ln),
|
|
261924
|
+
Tasks: (i.tasks ?? []).map(Fn),
|
|
261925
|
+
Sequences: (i.sequences ?? []).map(Pn)
|
|
261925
261926
|
};
|
|
261926
261927
|
}
|
|
261927
261928
|
function zo() {
|
|
@@ -261964,8 +261965,8 @@ self.onmessage = function(e) {
|
|
|
261964
261965
|
tsParamTypes: [
|
|
261965
261966
|
"string | undefined"
|
|
261966
261967
|
],
|
|
261967
|
-
tsReturn: `Array<${
|
|
261968
|
-
call: (i, e)=>(i.schedule.tasks(e[0]) ?? []).map(
|
|
261968
|
+
tsReturn: `Array<${Sn}>`,
|
|
261969
|
+
call: (i, e)=>(i.schedule.tasks(e[0]) ?? []).map(Fn),
|
|
261969
261970
|
returns: "value",
|
|
261970
261971
|
llmSemantics: {
|
|
261971
261972
|
taskTags: [
|
|
@@ -261986,8 +261987,8 @@ self.onmessage = function(e) {
|
|
|
261986
261987
|
tsParamTypes: [
|
|
261987
261988
|
"string | undefined"
|
|
261988
261989
|
],
|
|
261989
|
-
tsReturn: `Array<${
|
|
261990
|
-
call: (i, e)=>(i.schedule.workSchedules(e[0]) ?? []).map(
|
|
261990
|
+
tsReturn: `Array<${On}>`,
|
|
261991
|
+
call: (i, e)=>(i.schedule.workSchedules(e[0]) ?? []).map(Ln),
|
|
261991
261992
|
returns: "value",
|
|
261992
261993
|
llmSemantics: {
|
|
261993
261994
|
taskTags: [
|
|
@@ -262008,8 +262009,8 @@ self.onmessage = function(e) {
|
|
|
262008
262009
|
tsParamTypes: [
|
|
262009
262010
|
"string | undefined"
|
|
262010
262011
|
],
|
|
262011
|
-
tsReturn: `Array<${
|
|
262012
|
-
call: (i, e)=>(i.schedule.sequences(e[0]) ?? []).map(
|
|
262012
|
+
tsReturn: `Array<${Nn}>`,
|
|
262013
|
+
call: (i, e)=>(i.schedule.sequences(e[0]) ?? []).map(Pn),
|
|
262013
262014
|
returns: "value",
|
|
262014
262015
|
llmSemantics: {
|
|
262015
262016
|
taskTags: [
|
|
@@ -262021,7 +262022,7 @@ self.onmessage = function(e) {
|
|
|
262021
262022
|
]
|
|
262022
262023
|
};
|
|
262023
262024
|
}
|
|
262024
|
-
|
|
262025
|
+
gn = [
|
|
262025
262026
|
Eo(),
|
|
262026
262027
|
lo(),
|
|
262027
262028
|
oo(),
|
|
@@ -262053,14 +262054,19 @@ self.onmessage = function(e) {
|
|
|
262053
262054
|
Qo()
|
|
262054
262055
|
];
|
|
262055
262056
|
function eT(i, e, t, s, a) {
|
|
262056
|
-
for (const n of
|
|
262057
|
+
for (const n of gn)s[n.permission] && tT(i, e, t, n, a);
|
|
262057
262058
|
}
|
|
262058
262059
|
function tT(i, e, t, s, a) {
|
|
262059
262060
|
const n = i.newObject();
|
|
262060
262061
|
for (const r of s.methods){
|
|
262061
262062
|
const I = i.newFunction(r.name, (...E)=>{
|
|
262062
|
-
|
|
262063
|
-
|
|
262063
|
+
try {
|
|
262064
|
+
const l = sT(i, E, r.args), o = r.call(t, l, a);
|
|
262065
|
+
return aT(i, o, r.returns);
|
|
262066
|
+
} catch (l) {
|
|
262067
|
+
const o = l instanceof Error ? l.message : String(l);
|
|
262068
|
+
throw new Error(`bim.${s.name}.${r.name}: ${o}`);
|
|
262069
|
+
}
|
|
262064
262070
|
});
|
|
262065
262071
|
i.setProp(n, r.name, I), I.dispose();
|
|
262066
262072
|
}
|
|
@@ -262117,11 +262123,11 @@ self.onmessage = function(e) {
|
|
|
262117
262123
|
case "string":
|
|
262118
262124
|
return typeof e == "string" ? i.newString(e) : i.null;
|
|
262119
262125
|
case "value":
|
|
262120
|
-
return
|
|
262126
|
+
return Dn(i, e);
|
|
262121
262127
|
}
|
|
262122
262128
|
}
|
|
262123
262129
|
const nT = 64;
|
|
262124
|
-
function
|
|
262130
|
+
function Dn(i, e) {
|
|
262125
262131
|
return Yi(i, e, 0, new WeakSet);
|
|
262126
262132
|
}
|
|
262127
262133
|
function Yi(i, e, t, s) {
|
|
@@ -262159,7 +262165,7 @@ self.onmessage = function(e) {
|
|
|
262159
262165
|
JS_EVAL_FLAG_STRIP: 16,
|
|
262160
262166
|
JS_EVAL_FLAG_COMPILE_ONLY: 32,
|
|
262161
262167
|
JS_EVAL_FLAG_BACKTRACE_BARRIER: 64
|
|
262162
|
-
},
|
|
262168
|
+
}, Ta = {
|
|
262163
262169
|
BaseObjects: 1,
|
|
262164
262170
|
Date: 2,
|
|
262165
262171
|
Eval: 4,
|
|
@@ -262200,26 +262206,26 @@ self.onmessage = function(e) {
|
|
|
262200
262206
|
function Bt(...i) {}
|
|
262201
262207
|
var ET = {};
|
|
262202
262208
|
IT(ET, {
|
|
262203
|
-
QuickJSAsyncifyError: ()=>
|
|
262204
|
-
QuickJSAsyncifySuspended: ()=>
|
|
262205
|
-
QuickJSEmptyGetOwnPropertyNames: ()=>
|
|
262209
|
+
QuickJSAsyncifyError: ()=>xn,
|
|
262210
|
+
QuickJSAsyncifySuspended: ()=>Un,
|
|
262211
|
+
QuickJSEmptyGetOwnPropertyNames: ()=>Gn,
|
|
262206
262212
|
QuickJSEmscriptenModuleError: ()=>oT,
|
|
262207
262213
|
QuickJSHostRefInvalid: ()=>xe,
|
|
262208
|
-
QuickJSHostRefRangeExceeded: ()=>
|
|
262214
|
+
QuickJSHostRefRangeExceeded: ()=>Yn,
|
|
262209
262215
|
QuickJSMemoryLeakDetected: ()=>lT,
|
|
262210
|
-
QuickJSNotImplemented: ()=>
|
|
262211
|
-
QuickJSPromisePending: ()=>
|
|
262212
|
-
QuickJSUnknownIntrinsic: ()=>
|
|
262216
|
+
QuickJSNotImplemented: ()=>bn,
|
|
262217
|
+
QuickJSPromisePending: ()=>Bn,
|
|
262218
|
+
QuickJSUnknownIntrinsic: ()=>hn,
|
|
262213
262219
|
QuickJSUnwrapError: ()=>Hi,
|
|
262214
262220
|
QuickJSUseAfterFree: ()=>Vi,
|
|
262215
|
-
QuickJSWrongOwner: ()=>
|
|
262221
|
+
QuickJSWrongOwner: ()=>Mn
|
|
262216
262222
|
});
|
|
262217
262223
|
var Hi = class extends Error {
|
|
262218
262224
|
constructor(i, e){
|
|
262219
262225
|
let t = typeof i == "object" && i && "message" in i ? String(i.message) : String(i);
|
|
262220
262226
|
super(t), this.cause = i, this.context = e, this.name = "QuickJSUnwrapError";
|
|
262221
262227
|
}
|
|
262222
|
-
},
|
|
262228
|
+
}, Mn = class extends Error {
|
|
262223
262229
|
constructor(){
|
|
262224
262230
|
super(...arguments), this.name = "QuickJSWrongOwner";
|
|
262225
262231
|
}
|
|
@@ -262227,15 +262233,15 @@ self.onmessage = function(e) {
|
|
|
262227
262233
|
constructor(){
|
|
262228
262234
|
super(...arguments), this.name = "QuickJSUseAfterFree";
|
|
262229
262235
|
}
|
|
262230
|
-
},
|
|
262236
|
+
}, bn = class extends Error {
|
|
262231
262237
|
constructor(){
|
|
262232
262238
|
super(...arguments), this.name = "QuickJSNotImplemented";
|
|
262233
262239
|
}
|
|
262234
|
-
},
|
|
262240
|
+
}, xn = class extends Error {
|
|
262235
262241
|
constructor(){
|
|
262236
262242
|
super(...arguments), this.name = "QuickJSAsyncifyError";
|
|
262237
262243
|
}
|
|
262238
|
-
},
|
|
262244
|
+
}, Un = class extends Error {
|
|
262239
262245
|
constructor(){
|
|
262240
262246
|
super(...arguments), this.name = "QuickJSAsyncifySuspended";
|
|
262241
262247
|
}
|
|
@@ -262247,19 +262253,19 @@ self.onmessage = function(e) {
|
|
|
262247
262253
|
constructor(){
|
|
262248
262254
|
super(...arguments), this.name = "QuickJSEmscriptenModuleError";
|
|
262249
262255
|
}
|
|
262250
|
-
},
|
|
262256
|
+
}, hn = class extends TypeError {
|
|
262251
262257
|
constructor(){
|
|
262252
262258
|
super(...arguments), this.name = "QuickJSUnknownIntrinsic";
|
|
262253
262259
|
}
|
|
262254
|
-
},
|
|
262260
|
+
}, Bn = class extends Error {
|
|
262255
262261
|
constructor(){
|
|
262256
262262
|
super(...arguments), this.name = "QuickJSPromisePending";
|
|
262257
262263
|
}
|
|
262258
|
-
},
|
|
262264
|
+
}, Gn = class extends Error {
|
|
262259
262265
|
constructor(){
|
|
262260
262266
|
super(...arguments), this.name = "QuickJSEmptyGetOwnPropertyNames";
|
|
262261
262267
|
}
|
|
262262
|
-
},
|
|
262268
|
+
}, Yn = class extends Error {
|
|
262263
262269
|
constructor(){
|
|
262264
262270
|
super(...arguments), this.name = "QuickJSHostRefRangeExceeded";
|
|
262265
262271
|
}
|
|
@@ -262268,25 +262274,25 @@ self.onmessage = function(e) {
|
|
|
262268
262274
|
super(...arguments), this.name = "QuickJSHostRefInvalid";
|
|
262269
262275
|
}
|
|
262270
262276
|
};
|
|
262271
|
-
function*
|
|
262277
|
+
function* Hn(i) {
|
|
262272
262278
|
return yield i;
|
|
262273
262279
|
}
|
|
262274
262280
|
function TT(i) {
|
|
262275
|
-
return
|
|
262281
|
+
return Hn(ns(i));
|
|
262276
262282
|
}
|
|
262277
|
-
var
|
|
262278
|
-
|
|
262279
|
-
function
|
|
262283
|
+
var as = Hn;
|
|
262284
|
+
as.of = TT;
|
|
262285
|
+
function ca(i, e) {
|
|
262280
262286
|
return (...t)=>{
|
|
262281
|
-
let s = e.call(i,
|
|
262282
|
-
return
|
|
262287
|
+
let s = e.call(i, as, ...t);
|
|
262288
|
+
return ns(s);
|
|
262283
262289
|
};
|
|
262284
262290
|
}
|
|
262285
262291
|
function cT(i, e) {
|
|
262286
|
-
let t = e.call(i,
|
|
262287
|
-
return
|
|
262292
|
+
let t = e.call(i, as);
|
|
262293
|
+
return ns(t);
|
|
262288
262294
|
}
|
|
262289
|
-
function
|
|
262295
|
+
function ns(i) {
|
|
262290
262296
|
function e(t) {
|
|
262291
262297
|
return t.done ? t.value : t.value instanceof Promise ? t.value.then((s)=>e(i.next(s)), (s)=>e(i.throw(s))) : e(i.next(t.value));
|
|
262292
262298
|
}
|
|
@@ -262296,11 +262302,11 @@ self.onmessage = function(e) {
|
|
|
262296
262302
|
[Symbol.dispose]() {
|
|
262297
262303
|
return this.dispose();
|
|
262298
262304
|
}
|
|
262299
|
-
}, ki = Symbol.dispose ?? Symbol.for("Symbol.dispose"),
|
|
262300
|
-
|
|
262305
|
+
}, ki = Symbol.dispose ?? Symbol.for("Symbol.dispose"), fa = Pe.prototype;
|
|
262306
|
+
fa[ki] || (fa[ki] = function() {
|
|
262301
262307
|
return this.dispose();
|
|
262302
262308
|
});
|
|
262303
|
-
var le = class
|
|
262309
|
+
var le = class Vn extends Pe {
|
|
262304
262310
|
constructor(e, t, s, a){
|
|
262305
262311
|
super(), this._value = e, this.copier = t, this.disposer = s, this._owner = a, this._alive = !0, this._constructorStack = void 0;
|
|
262306
262312
|
}
|
|
@@ -262318,7 +262324,7 @@ self.onmessage = function(e) {
|
|
|
262318
262324
|
}
|
|
262319
262325
|
dup() {
|
|
262320
262326
|
if (this.assertAlive(), !this.copier) throw new Error("Non-dupable lifetime");
|
|
262321
|
-
return new
|
|
262327
|
+
return new Vn(this.copier(this._value), this.copier, this.disposer, this._owner);
|
|
262322
262328
|
}
|
|
262323
262329
|
consume(e) {
|
|
262324
262330
|
this.assertAlive();
|
|
@@ -262350,7 +262356,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262350
262356
|
return this;
|
|
262351
262357
|
}
|
|
262352
262358
|
dispose() {}
|
|
262353
|
-
},
|
|
262359
|
+
}, pa = class extends le {
|
|
262354
262360
|
constructor(i, e, t, s){
|
|
262355
262361
|
super(i, e, t, s);
|
|
262356
262362
|
}
|
|
@@ -262442,7 +262448,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262442
262448
|
function Qt(i) {
|
|
262443
262449
|
return !!(i && (typeof i == "object" || typeof i == "function") && "alive" in i && typeof i.alive == "boolean" && "dispose" in i && typeof i.dispose == "function");
|
|
262444
262450
|
}
|
|
262445
|
-
var
|
|
262451
|
+
var rs = class kn extends Pe {
|
|
262446
262452
|
static success(e) {
|
|
262447
262453
|
return new pT(e);
|
|
262448
262454
|
}
|
|
@@ -262450,9 +262456,9 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262450
262456
|
return new CT(e, t);
|
|
262451
262457
|
}
|
|
262452
262458
|
static is(e) {
|
|
262453
|
-
return e instanceof
|
|
262459
|
+
return e instanceof kn;
|
|
262454
262460
|
}
|
|
262455
|
-
}, pT = class extends
|
|
262461
|
+
}, pT = class extends rs {
|
|
262456
262462
|
constructor(i){
|
|
262457
262463
|
super(), this.value = i;
|
|
262458
262464
|
}
|
|
@@ -262468,7 +262474,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262468
262474
|
unwrapOr(i) {
|
|
262469
262475
|
return this.value;
|
|
262470
262476
|
}
|
|
262471
|
-
}, CT = class extends
|
|
262477
|
+
}, CT = class extends rs {
|
|
262472
262478
|
constructor(i, e){
|
|
262473
262479
|
super(), this.error = i, this.onUnwrap = e;
|
|
262474
262480
|
}
|
|
@@ -262484,7 +262490,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262484
262490
|
unwrapOr(i) {
|
|
262485
262491
|
return i;
|
|
262486
262492
|
}
|
|
262487
|
-
}, Ze =
|
|
262493
|
+
}, Ze = rs, RT = class extends Pe {
|
|
262488
262494
|
constructor(i){
|
|
262489
262495
|
super(), this.resolve = (e)=>{
|
|
262490
262496
|
this.resolveHandle.alive && (this.context.unwrapResult(this.context.callFunction(this.resolveHandle, this.context.undefined, e || this.context.undefined)).dispose(), this.disposeResolvers(), this.onSettled());
|
|
@@ -262502,7 +262508,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262502
262508
|
disposeResolvers() {
|
|
262503
262509
|
this.resolveHandle.alive && this.resolveHandle.dispose(), this.rejectHandle.alive && this.rejectHandle.dispose();
|
|
262504
262510
|
}
|
|
262505
|
-
},
|
|
262511
|
+
}, vn = class {
|
|
262506
262512
|
constructor(i){
|
|
262507
262513
|
this.module = i;
|
|
262508
262514
|
}
|
|
@@ -262543,8 +262549,8 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262543
262549
|
if (!i) return 0;
|
|
262544
262550
|
let e = 0;
|
|
262545
262551
|
for (let [t, s] of Object.entries(i)){
|
|
262546
|
-
if (!(t in
|
|
262547
|
-
s && (e |=
|
|
262552
|
+
if (!(t in Ta)) throw new hn(t);
|
|
262553
|
+
s && (e |= Ta[t]);
|
|
262548
262554
|
}
|
|
262549
262555
|
return e;
|
|
262550
262556
|
}
|
|
@@ -262618,14 +262624,14 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262618
262624
|
done: s
|
|
262619
262625
|
};
|
|
262620
262626
|
}
|
|
262621
|
-
},
|
|
262627
|
+
}, Ca = -2147483648, Ra = 2147483647, wt = 0;
|
|
262622
262628
|
function di(i) {
|
|
262623
262629
|
return i >> 8;
|
|
262624
262630
|
}
|
|
262625
|
-
let ST,
|
|
262631
|
+
let ST, ma, OT, NT, FT, LT;
|
|
262626
262632
|
ST = class {
|
|
262627
262633
|
constructor(){
|
|
262628
|
-
this.nextId =
|
|
262634
|
+
this.nextId = Ca, this.freelist = [], this.groups = new Map;
|
|
262629
262635
|
}
|
|
262630
262636
|
put(i) {
|
|
262631
262637
|
let e = this.allocateId(), t = di(e), s = this.groups.get(t);
|
|
@@ -262647,11 +262653,11 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262647
262653
|
}
|
|
262648
262654
|
allocateId() {
|
|
262649
262655
|
if (this.freelist.length > 0) return this.freelist.shift();
|
|
262650
|
-
if (this.nextId === wt && this.nextId++, this.nextId >
|
|
262656
|
+
if (this.nextId === wt && this.nextId++, this.nextId > Ra) throw new Yn(`HostRefMap: too many host refs created without disposing. Max simultaneous host refs: ${Ra - Ca}`);
|
|
262651
262657
|
return this.nextId++;
|
|
262652
262658
|
}
|
|
262653
262659
|
};
|
|
262654
|
-
|
|
262660
|
+
ma = class extends Pe {
|
|
262655
262661
|
constructor(i, e, t){
|
|
262656
262662
|
if (t === wt) throw new xe("cannot create HostRef with undefined id");
|
|
262657
262663
|
super(), this.runtime = i, this.handle = e, this.id = t;
|
|
@@ -262666,7 +262672,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262666
262672
|
return this.runtime.hostRefs.get(this.id);
|
|
262667
262673
|
}
|
|
262668
262674
|
};
|
|
262669
|
-
OT = class extends
|
|
262675
|
+
OT = class extends vn {
|
|
262670
262676
|
constructor(i){
|
|
262671
262677
|
super(i.module), this.scope = new Se, this.copyJSValue = (e)=>this.ffi.QTS_DupValuePointer(this.ctx.value, e), this.freeJSValue = (e)=>{
|
|
262672
262678
|
this.ffi.QTS_FreeValuePointer(this.ctx.value, e);
|
|
@@ -262705,10 +262711,10 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262705
262711
|
if (e !== this.ctx.value) throw new Error("QuickJSContext instance received C -> JS call with mismatched ctx");
|
|
262706
262712
|
let r = this.getFunction(n);
|
|
262707
262713
|
return Se.withScopeMaybeAsync(this, function*(I, E) {
|
|
262708
|
-
let l = E.manage(new
|
|
262714
|
+
let l = E.manage(new pa(t, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime)), o = new Array(s);
|
|
262709
262715
|
for(let c = 0; c < s; c++){
|
|
262710
262716
|
let f = this.ffi.QTS_ArgvGetJSValueConstPointer(a, c);
|
|
262711
|
-
o[c] = E.manage(new
|
|
262717
|
+
o[c] = E.manage(new pa(f, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime));
|
|
262712
262718
|
}
|
|
262713
262719
|
try {
|
|
262714
262720
|
let c = yield* I(r.apply(l, o));
|
|
@@ -262846,14 +262852,14 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262846
262852
|
let e = this.runtime.hostRefs.put(i);
|
|
262847
262853
|
try {
|
|
262848
262854
|
let t = this.memory.heapValueHandle(this.ffi.QTS_NewHostRef(this.ctx.value, e));
|
|
262849
|
-
return new
|
|
262855
|
+
return new ma(this.runtime, t, e);
|
|
262850
262856
|
} catch (t) {
|
|
262851
262857
|
throw this.runtime.hostRefs.delete(e), t;
|
|
262852
262858
|
}
|
|
262853
262859
|
}
|
|
262854
262860
|
toHostRef(i) {
|
|
262855
262861
|
let e = this.ffi.QTS_GetHostRefId(i.value);
|
|
262856
|
-
if (e !== 0) return this.runtime.hostRefs.get(e), new
|
|
262862
|
+
if (e !== 0) return this.runtime.hostRefs.get(e), new ma(this.runtime, i.dup(), e);
|
|
262857
262863
|
}
|
|
262858
262864
|
unwrapHostRef(i) {
|
|
262859
262865
|
let e = this.ffi.QTS_GetHostRefId(i.value);
|
|
@@ -262896,7 +262902,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262896
262902
|
if (e === yi.Pending) return {
|
|
262897
262903
|
type: "pending",
|
|
262898
262904
|
get error () {
|
|
262899
|
-
return new
|
|
262905
|
+
return new Bn("Cannot unwrap a pending promise");
|
|
262900
262906
|
}
|
|
262901
262907
|
};
|
|
262902
262908
|
let t = this.ffi.QTS_PromiseResult(this.ctx.value, i.value), s = this.memory.heapValueHandle(t);
|
|
@@ -262931,7 +262937,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262931
262937
|
if (i === e) return !0;
|
|
262932
262938
|
this.runtime.assertOwned(i), this.runtime.assertOwned(e);
|
|
262933
262939
|
let s = this.ffi.QTS_IsEqual(this.ctx.value, i.value, e.value, t);
|
|
262934
|
-
if (s === -1) throw new
|
|
262940
|
+
if (s === -1) throw new bn("WASM variant does not expose equality");
|
|
262935
262941
|
return !!s;
|
|
262936
262942
|
}
|
|
262937
262943
|
eq(i, e) {
|
|
@@ -262957,7 +262963,7 @@ Lifetime used`) : new Vi("Lifetime not alive");
|
|
|
262957
262963
|
}) {
|
|
262958
262964
|
this.runtime.assertOwned(i), i.value;
|
|
262959
262965
|
let t = uT(e);
|
|
262960
|
-
if (t === 0) throw new
|
|
262966
|
+
if (t === 0) throw new Gn("No options set, will return an empty array");
|
|
262961
262967
|
return Se.withScope((s)=>{
|
|
262962
262968
|
let a = s.manage(this.memory.newMutablePointerArray(1)), n = this.ffi.QTS_GetOwnPropertyNames(this.ctx.value, a.value.ptr, this.uint32Out.value.ptr, i.value, t);
|
|
262963
262969
|
if (n) return this.fail(this.memory.heapValueHandle(n));
|
|
@@ -263085,7 +263091,7 @@ ${t.stack}Host: ${E}`), Object.assign(I, r), I;
|
|
|
263085
263091
|
if (!t) throw new Error("QuickJSContext had no interrupt handler");
|
|
263086
263092
|
return t(this) ? 1 : 0;
|
|
263087
263093
|
},
|
|
263088
|
-
loadModuleSource:
|
|
263094
|
+
loadModuleSource: ca(this, function*(e, t, s, a) {
|
|
263089
263095
|
let n = this.moduleLoader;
|
|
263090
263096
|
if (!n) throw new Error("Runtime has no module loader");
|
|
263091
263097
|
if (t !== this.rt.value) throw new Error("Runtime pointer mismatch");
|
|
@@ -263101,7 +263107,7 @@ ${t.stack}Host: ${E}`), Object.assign(I, r), I;
|
|
|
263101
263107
|
return this.debugLog("cToHostLoadModule: caught error", I), r.throw(I), 0;
|
|
263102
263108
|
}
|
|
263103
263109
|
}),
|
|
263104
|
-
normalizeModule:
|
|
263110
|
+
normalizeModule: ca(this, function*(e, t, s, a, n) {
|
|
263105
263111
|
let r = this.moduleNormalizer;
|
|
263106
263112
|
if (!r) throw new Error("Runtime has no module normalizer");
|
|
263107
263113
|
if (t !== this.rt.value) throw new Error("Runtime pointer mismatch");
|
|
@@ -263117,7 +263123,7 @@ ${t.stack}Host: ${E}`), Object.assign(I, r), I;
|
|
|
263117
263123
|
return this.debugLog("normalizeModule: caught error", E), I.throw(E), 0;
|
|
263118
263124
|
}
|
|
263119
263125
|
})
|
|
263120
|
-
}, i.ownedLifetimes?.forEach((e)=>this.scope.manage(e)), this.module = i.module, this.memory = new
|
|
263126
|
+
}, i.ownedLifetimes?.forEach((e)=>this.scope.manage(e)), this.module = i.module, this.memory = new vn(this.module), this.ffi = i.ffi, this.rt = i.rt, this.callbacks = i.callbacks, this.scope.manage(this.rt), this.callbacks.setRuntimeCallbacks(this.rt.value, this.cToHostCallbacks), this.executePendingJobs = this.executePendingJobs.bind(this);
|
|
263121
263127
|
}
|
|
263122
263128
|
get alive() {
|
|
263123
263129
|
return this.scope.alive;
|
|
@@ -263187,7 +263193,7 @@ ${t.stack}Host: ${E}`), Object.assign(I, r), I;
|
|
|
263187
263193
|
this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value, i);
|
|
263188
263194
|
}
|
|
263189
263195
|
assertOwned(i) {
|
|
263190
|
-
if (i.owner && i.owner.rt !== this.rt) throw new
|
|
263196
|
+
if (i.owner && i.owner.rt !== this.rt) throw new Mn(`Handle is not owned by this runtime: ${i.owner.rt.value} != ${this.rt.value}`);
|
|
263191
263197
|
}
|
|
263192
263198
|
setDebugMode(i) {
|
|
263193
263199
|
this._debugMode = i, this.ffi.DEBUG && this.rt.alive && this.ffi.QTS_SetDebugLogEnabled(this.rt.value, i ? 1 : 0);
|
|
@@ -263280,9 +263286,9 @@ ${t.stack}Host: ${E}`), Object.assign(I, r), I;
|
|
|
263280
263286
|
Bt("asyncify.handleSleep: not suspending:", a), s(a);
|
|
263281
263287
|
return;
|
|
263282
263288
|
}
|
|
263283
|
-
if (this.suspended) throw new
|
|
263289
|
+
if (this.suspended) throw new xn(`Already suspended at: ${this.suspended.stack}
|
|
263284
263290
|
Attempted to suspend at:`);
|
|
263285
|
-
this.suspended = new
|
|
263291
|
+
this.suspended = new Un(`(${this.suspendedCount++})`), Bt("asyncify.handleSleep: suspending:", this.suspended), a.then((n)=>{
|
|
263286
263292
|
this.suspended = void 0, Bt("asyncify.handleSleep: resolved:", n), s(n);
|
|
263287
263293
|
}, (n)=>{
|
|
263288
263294
|
Bt("asyncify.handleSleep: rejected:", n), console.error("QuickJS: cannot handle error in suspended function", n), this.suspended = void 0;
|
|
@@ -263346,7 +263352,7 @@ Attempted to suspend at:`);
|
|
|
263346
263352
|
let e = Ai(await i), [t, s, { QuickJSWASMModule: a }] = await Promise.all([
|
|
263347
263353
|
e.importModuleLoader().then(Ai),
|
|
263348
263354
|
e.importFFI(),
|
|
263349
|
-
Ue(()=>import("./index-
|
|
263355
|
+
Ue(()=>import("./index-Dr88ZlSY.js").then(async (m)=>{
|
|
263350
263356
|
await m.__tla;
|
|
263351
263357
|
return m;
|
|
263352
263358
|
}).then((I)=>I.m), __vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(Ai)
|
|
@@ -263370,7 +263376,7 @@ Attempted to suspend at:`);
|
|
|
263370
263376
|
async function hT() {
|
|
263371
263377
|
return Si ?? (Si = UT().then((i)=>i)), await Si;
|
|
263372
263378
|
}
|
|
263373
|
-
const
|
|
263379
|
+
const Is = {
|
|
263374
263380
|
model: !0,
|
|
263375
263381
|
query: !0,
|
|
263376
263382
|
viewer: !0,
|
|
@@ -263384,9 +263390,9 @@ Attempted to suspend at:`);
|
|
|
263384
263390
|
timeoutMs: 3e4,
|
|
263385
263391
|
maxStackBytes: 512 * 1024
|
|
263386
263392
|
};
|
|
263387
|
-
function
|
|
263393
|
+
function Wn(i, e, t = {}, s) {
|
|
263388
263394
|
const a = {
|
|
263389
|
-
...
|
|
263395
|
+
...Is,
|
|
263390
263396
|
...t
|
|
263391
263397
|
}, n = [];
|
|
263392
263398
|
BT(i, n);
|
|
@@ -263438,7 +263444,7 @@ Attempted to suspend at:`);
|
|
|
263438
263444
|
}
|
|
263439
263445
|
})(), Yt);
|
|
263440
263446
|
}
|
|
263441
|
-
async function
|
|
263447
|
+
async function wn(i) {
|
|
263442
263448
|
let e;
|
|
263443
263449
|
const t = YT(i);
|
|
263444
263450
|
try {
|
|
@@ -263446,9 +263452,9 @@ Attempted to suspend at:`);
|
|
|
263446
263452
|
s ? (e = (await s.transform(i, {
|
|
263447
263453
|
loader: "ts",
|
|
263448
263454
|
target: "es2022"
|
|
263449
|
-
})).code, Oi = "esbuild") : (e = t ?
|
|
263455
|
+
})).code, Oi = "esbuild") : (e = t ? ya(i) : i, Oi = t ? "fallback-ts" : "fallback-js", Gt || (Gt = !0, console.warn("[ifc-lite/sandbox] esbuild unavailable, using fallback transpiler")));
|
|
263450
263456
|
} catch {
|
|
263451
|
-
e = t ?
|
|
263457
|
+
e = t ? ya(i) : i, Oi = t ? "fallback-ts" : "fallback-js", Gt || (Gt = !0, console.warn("[ifc-lite/sandbox] esbuild failed, using fallback transpiler"));
|
|
263452
263458
|
}
|
|
263453
263459
|
return HT(e);
|
|
263454
263460
|
}
|
|
@@ -263459,7 +263465,7 @@ Attempted to suspend at:`);
|
|
|
263459
263465
|
let e = i;
|
|
263460
263466
|
return e = e.replace(/^\s*import\s+(?:(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)(?:\s*,\s*(?:\{[^}]*\}|\*\s+as\s+\w+|\w+))*\s+from\s+)?['"][^'"]*['"];?\s*$/gm, ""), e = e.replace(/^\s*export\s+(default\s+)?(const|let|var|function|class|async\s+function)\s/gm, "$2 "), e = e.replace(/^\s*export\s+default\s+/gm, ""), e = e.replace(/^\s*export\s+\{[^}]*\}(?:\s+from\s+['"][^'"]*['"])?\s*;?\s*$/gm, ""), e;
|
|
263461
263467
|
}
|
|
263462
|
-
function
|
|
263468
|
+
function ya(i) {
|
|
263463
263469
|
let e = i;
|
|
263464
263470
|
return e = e.replace(/^\s*(?:export\s+)?interface\s+\w+[^{]*\{[^}]*\}/gm, ""), e = e.replace(/^\s*(?:export\s+)?type\s+\w+\s*=\s*[^;]+;/gm, ""), e = VT(e), e = e.replace(/([,(]\s*)(\w+)\s*:\s*(?:string|number|boolean|void|any|unknown|never|null|undefined|Record<[^>]+>|Array<[^>]+>|Map<[^>]+>|Set<[^>]+>|\[[^\]]*\](?:\[\])?|[A-Za-z_]\w*(?:\[\])?(?:\s*\|\s*(?:string|number|boolean|null|undefined|[A-Za-z_]\w*))*)\s*(?=[,)])/g, "$1$2"), e = e.replace(/\):\s*[^{]+\{/g, ") {"), e = e.replace(/(?<![{,]\s*\w+\s)\s+as\s+\w+(?:\[\])?/g, ""), e = e.replace(/<\w+(?:\s+extends\s+\w+)?>/g, ""), e;
|
|
263465
263471
|
}
|
|
@@ -263486,19 +263492,19 @@ Attempted to suspend at:`);
|
|
|
263486
263492
|
return e.join(`
|
|
263487
263493
|
`);
|
|
263488
263494
|
}
|
|
263489
|
-
let Ni = null,
|
|
263495
|
+
let Ni = null, ua = 1;
|
|
263490
263496
|
function kT() {
|
|
263491
263497
|
return Ni || (Ni = hT()), Ni;
|
|
263492
263498
|
}
|
|
263493
263499
|
function vT() {
|
|
263494
|
-
const i =
|
|
263495
|
-
return
|
|
263500
|
+
const i = ua;
|
|
263501
|
+
return ua += 1, `sandbox-${i}`;
|
|
263496
263502
|
}
|
|
263497
|
-
class
|
|
263503
|
+
class _n {
|
|
263498
263504
|
constructor(e, t = {}){
|
|
263499
263505
|
this.sdk = e, this.config = {
|
|
263500
263506
|
permissions: {
|
|
263501
|
-
...
|
|
263507
|
+
...Is,
|
|
263502
263508
|
...t.permissions
|
|
263503
263509
|
},
|
|
263504
263510
|
limits: {
|
|
@@ -263519,7 +263525,7 @@ Attempted to suspend at:`);
|
|
|
263519
263525
|
this.runtime = e.newRuntime(), this.runtime.setMemoryLimit(this.config.limits.memoryBytes ?? pt.memoryBytes), this.runtime.setMaxStackSize(this.config.limits.maxStackBytes ?? pt.maxStackBytes);
|
|
263520
263526
|
const t = this.config.limits.timeoutMs ?? pt.timeoutMs;
|
|
263521
263527
|
this.runtime.setInterruptHandler(()=>this.evalStartTime > 0 && Date.now() - this.evalStartTime > t), this.vm = this.runtime.newContext();
|
|
263522
|
-
const { logs: s, dispose: a } =
|
|
263528
|
+
const { logs: s, dispose: a } = Wn(this.vm, this.sdk, this.config.permissions, {
|
|
263523
263529
|
sandboxSessionId: this.sessionId
|
|
263524
263530
|
});
|
|
263525
263531
|
this.logs = s, this.bridgeDispose = a;
|
|
@@ -263528,15 +263534,37 @@ Attempted to suspend at:`);
|
|
|
263528
263534
|
if (!this.vm) throw new Error("Sandbox not initialized. Call init() first.");
|
|
263529
263535
|
this.logs.length = 0;
|
|
263530
263536
|
let s = e;
|
|
263531
|
-
t?.typescript !== !1 && (s = await
|
|
263532
|
-
const a = this.vm.evalCode(s, t?.filename ?? "script.js")
|
|
263533
|
-
if (this.
|
|
263534
|
-
|
|
263535
|
-
|
|
263536
|
-
|
|
263537
|
-
|
|
263538
|
-
|
|
263539
|
-
|
|
263537
|
+
t?.typescript !== !1 && (s = await wn(e)), this.evalStartTime = Date.now();
|
|
263538
|
+
const a = this.vm.evalCode(s, t?.filename ?? "script.js");
|
|
263539
|
+
if (this.runtime) try {
|
|
263540
|
+
this.runtime.executePendingJobs();
|
|
263541
|
+
} catch {}
|
|
263542
|
+
const n = Date.now() - this.evalStartTime;
|
|
263543
|
+
this.evalStartTime = 0;
|
|
263544
|
+
const r = (E)=>{
|
|
263545
|
+
if (E) try {
|
|
263546
|
+
E.dispose();
|
|
263547
|
+
} catch {}
|
|
263548
|
+
};
|
|
263549
|
+
if (a.error) {
|
|
263550
|
+
let E;
|
|
263551
|
+
try {
|
|
263552
|
+
E = this.vm.dump(a.error);
|
|
263553
|
+
} catch (l) {
|
|
263554
|
+
E = {
|
|
263555
|
+
message: l instanceof Error ? l.message : String(l)
|
|
263556
|
+
};
|
|
263557
|
+
}
|
|
263558
|
+
throw r(a.error), new vi(typeof E == "object" && E !== null && "message" in E ? String(E.message) : String(E), this.logs, n);
|
|
263559
|
+
}
|
|
263560
|
+
let I;
|
|
263561
|
+
try {
|
|
263562
|
+
I = this.vm.dump(a.value);
|
|
263563
|
+
} catch (E) {
|
|
263564
|
+
throw r(a.value), new vi(`Sandbox realm became invalid during execution: ${E instanceof Error ? E.message : String(E)}`, this.logs, n);
|
|
263565
|
+
}
|
|
263566
|
+
return r(a.value), {
|
|
263567
|
+
value: I,
|
|
263540
263568
|
logs: [
|
|
263541
263569
|
...this.logs
|
|
263542
263570
|
],
|
|
@@ -263547,28 +263575,28 @@ Attempted to suspend at:`);
|
|
|
263547
263575
|
this.bridgeDispose && (this.bridgeDispose(), this.bridgeDispose = null), this.vm && (this.vm.dispose(), this.vm = null), this.runtime && (this.runtime.dispose(), this.runtime = null);
|
|
263548
263576
|
}
|
|
263549
263577
|
}
|
|
263550
|
-
class
|
|
263578
|
+
class vi extends Error {
|
|
263551
263579
|
constructor(e, t, s){
|
|
263552
263580
|
super(e), this.logs = t, this.durationMs = s, this.name = "ScriptError";
|
|
263553
263581
|
}
|
|
263554
263582
|
}
|
|
263555
|
-
async function
|
|
263556
|
-
const t = new
|
|
263583
|
+
WT = async function(i, e) {
|
|
263584
|
+
const t = new _n(i, e);
|
|
263557
263585
|
return await t.init(), t;
|
|
263558
|
-
}
|
|
263586
|
+
};
|
|
263559
263587
|
xc = Object.freeze(Object.defineProperty({
|
|
263560
263588
|
__proto__: null,
|
|
263561
263589
|
DEFAULT_LIMITS: pt,
|
|
263562
|
-
DEFAULT_PERMISSIONS:
|
|
263563
|
-
NAMESPACE_SCHEMAS:
|
|
263564
|
-
Sandbox:
|
|
263565
|
-
ScriptError:
|
|
263566
|
-
buildBridge:
|
|
263590
|
+
DEFAULT_PERMISSIONS: Is,
|
|
263591
|
+
NAMESPACE_SCHEMAS: gn,
|
|
263592
|
+
Sandbox: _n,
|
|
263593
|
+
ScriptError: vi,
|
|
263594
|
+
buildBridge: Wn,
|
|
263567
263595
|
createSandbox: WT,
|
|
263568
|
-
marshalValue:
|
|
263569
|
-
transpileTypeScript:
|
|
263596
|
+
marshalValue: Dn,
|
|
263597
|
+
transpileTypeScript: wn
|
|
263570
263598
|
}, Symbol.toStringTag, {
|
|
263571
263599
|
value: "Module"
|
|
263572
263600
|
}));
|
|
263573
263601
|
})();
|
|
263574
|
-
export {
|
|
263602
|
+
export { cc as $, ec as A, Mc as B, Di as C, gT as D, J as E, DT as F, nc as G, Dc as H, Xt as I, Ye as J, WT as K, jt as L, XT as M, gn as N, uc as O, wi as P, _i as Q, Hr as R, SI as S, vt as T, Lc as U, Aa as V, Rc as W, rc as X, oc as Y, Cc as Z, Ue as _, bo as a, Va as a0, Ic as a1, fc as a2, pc as a3, Tc as a4, Ac as a5, lc as a6, Ec as a7, Kr as a8, Xr as a9, Oc as aA, or as aB, Pc as aC, Yl as aD, he as aE, Dr as aF, Sc as aG, Ll as aH, mc as aI, Wr as aa, wr as ab, Nc as ac, oe as ad, gc as ae, aI as af, zi as ag, Qr as ah, Ba as ai, vr as aj, _T as ak, xc as al, La as am, _r as an, Pa as ao, Sr as ap, Li as aq, ur as ar, _t as as, Ar as at, Ma as au, dc as av, yc as aw, nI as ax, Sa as ay, Oa as az, KT as b, ac as c, QT as d, Rt as e, Fc as f, H as g, yt as h, $t as i, x as j, ye as k, PT as l, bc as m, U as n, Bs as o, jT as p, Je as q, JT as r, $T as s, zT as t, sc as u, ic as v, tc as w, ZT as x, fI as y, qT as z, __tla };
|