@ifc-lite/geometry 4.1.0 → 4.3.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/README.md +6 -3
- package/dist/byte-streaming-prepass-result.d.ts +20 -0
- package/dist/byte-streaming-prepass-result.d.ts.map +1 -0
- package/dist/byte-streaming-prepass-result.js +5 -0
- package/dist/byte-streaming-prepass-result.js.map +1 -0
- package/dist/diagnostics.d.ts +42 -3
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +37 -8
- package/dist/diagnostics.js.map +1 -1
- package/dist/energy-export-bridge.d.ts +35 -0
- package/dist/energy-export-bridge.d.ts.map +1 -0
- package/dist/energy-export-bridge.js +31 -0
- package/dist/energy-export-bridge.js.map +1 -0
- package/dist/geometry-parallel-options.d.ts +96 -0
- package/dist/geometry-parallel-options.d.ts.map +1 -0
- package/dist/geometry-parallel-options.js +5 -0
- package/dist/geometry-parallel-options.js.map +1 -0
- package/dist/geometry-parallel.d.ts +2 -92
- package/dist/geometry-parallel.d.ts.map +1 -1
- package/dist/geometry-parallel.js +37 -90
- package/dist/geometry-parallel.js.map +1 -1
- package/dist/geometry.worker.d.ts +13 -0
- package/dist/geometry.worker.d.ts.map +1 -1
- package/dist/geometry.worker.js +71 -63
- package/dist/geometry.worker.js.map +1 -1
- package/dist/hbjson-stats.d.ts +28 -0
- package/dist/hbjson-stats.d.ts.map +1 -0
- package/dist/hbjson-stats.js +5 -0
- package/dist/hbjson-stats.js.map +1 -0
- package/dist/ifc-lite-bridge.d.ts +11 -14
- package/dist/ifc-lite-bridge.d.ts.map +1 -1
- package/dist/ifc-lite-bridge.js +12 -16
- package/dist/ifc-lite-bridge.js.map +1 -1
- package/dist/index.d.ts +26 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -65
- package/dist/index.js.map +1 -1
- package/dist/packed-instanced-decoder.d.ts +20 -3
- package/dist/packed-instanced-decoder.d.ts.map +1 -1
- package/dist/packed-instanced-decoder.js +122 -17
- package/dist/packed-instanced-decoder.js.map +1 -1
- package/dist/prepass-source-fingerprint.d.ts +8 -0
- package/dist/prepass-source-fingerprint.d.ts.map +1 -0
- package/dist/prepass-source-fingerprint.js +34 -0
- package/dist/prepass-source-fingerprint.js.map +1 -0
- package/dist/shard-stitch.d.ts +110 -0
- package/dist/shard-stitch.d.ts.map +1 -0
- package/dist/shard-stitch.js +112 -0
- package/dist/shard-stitch.js.map +1 -0
- package/dist/symbolic-types.d.ts +3 -2
- package/dist/symbolic-types.d.ts.map +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/wasm-asset-error.d.ts +17 -0
- package/dist/wasm-asset-error.d.ts.map +1 -1
- package/dist/wasm-asset-error.js +32 -0
- package/dist/wasm-asset-error.js.map +1 -1
- package/dist/wasm-owned-buffer.d.ts +4 -0
- package/dist/wasm-owned-buffer.d.ts.map +1 -0
- package/dist/wasm-owned-buffer.js +13 -0
- package/dist/wasm-owned-buffer.js.map +1 -0
- package/dist/worker-prepass-source.d.ts +38 -0
- package/dist/worker-prepass-source.d.ts.map +1 -0
- package/dist/worker-prepass-source.js +9 -0
- package/dist/worker-prepass-source.js.map +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -26,9 +26,11 @@ console.log(`${result.meshes.length} meshes, ${result.totalTriangles} triangles`
|
|
|
26
26
|
## Stream geometry (recommended for large models)
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
|
+
const buffer = new Uint8Array(await file.arrayBuffer());
|
|
30
|
+
|
|
29
31
|
for await (const event of processor.processStreaming(buffer)) {
|
|
30
32
|
if (event.type === 'batch') {
|
|
31
|
-
renderer.
|
|
33
|
+
renderer.addMeshes(event.meshes, true);
|
|
32
34
|
console.log(`Loaded ${event.totalSoFar} meshes so far`);
|
|
33
35
|
} else if (event.type === 'complete') {
|
|
34
36
|
console.log(`Done: ${event.totalMeshes} meshes`);
|
|
@@ -54,8 +56,7 @@ Unset / `'medium'` reproduces the engine's historical densities byte-for-byte. L
|
|
|
54
56
|
## Coordinate handling
|
|
55
57
|
|
|
56
58
|
```typescript
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
const buffer = new Uint8Array(await file.arrayBuffer());
|
|
59
60
|
const result = await processor.process(buffer);
|
|
60
61
|
|
|
61
62
|
// Models with large world coordinates (geo-referenced) get auto-shifted
|
|
@@ -92,6 +93,8 @@ If your bundler can't transform
|
|
|
92
93
|
wasm URLs through the `processAdaptive` / `processParallel` `wasmUrls`
|
|
93
94
|
option:
|
|
94
95
|
|
|
96
|
+
<!-- Reason: Vite-only `?url` import specifier, unresolvable by tsc. -->
|
|
97
|
+
<!-- docs-check: skip -->
|
|
95
98
|
```ts
|
|
96
99
|
// Vite's `?url` suffix yields a fully-resolved URL string at build time.
|
|
97
100
|
// `@ifc-lite/wasm` exposes the binary at the `./ifc-lite_bg.wasm` subpath
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ByteStreamingPrePassResult {
|
|
2
|
+
jobs: Uint32Array;
|
|
3
|
+
totalJobs: number;
|
|
4
|
+
unitScale: number;
|
|
5
|
+
rtcOffset?: Float64Array;
|
|
6
|
+
needsShift: boolean;
|
|
7
|
+
buildingRotation?: number | null;
|
|
8
|
+
voidKeys: Uint32Array;
|
|
9
|
+
voidCounts: Uint32Array;
|
|
10
|
+
voidValues: Uint32Array;
|
|
11
|
+
styleIds: Uint32Array;
|
|
12
|
+
styleColors: Uint8Array;
|
|
13
|
+
/** Prepass-resolved plane-angle→radians scale (additive wire field). */
|
|
14
|
+
planeAngleToRadians?: number;
|
|
15
|
+
/** #407/#913 §2.3 per-element material colour lists (flat encoding). */
|
|
16
|
+
materialElementIds?: Uint32Array;
|
|
17
|
+
materialColorCounts?: Uint32Array;
|
|
18
|
+
materialColors?: Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=byte-streaming-prepass-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"byte-streaming-prepass-result.d.ts","sourceRoot":"","sources":["../src/byte-streaming-prepass-result.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,UAAU,CAAC;IACxB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wEAAwE;IACxE,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=byte-streaming-prepass-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"byte-streaming-prepass-result.js","sourceRoot":"","sources":["../src/byte-streaming-prepass-result.ts"],"names":[],"mappings":"AAAA;;+DAE+D"}
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -15,9 +15,19 @@
|
|
|
15
15
|
export interface GeometryDiagnostics {
|
|
16
16
|
/**
|
|
17
17
|
* Contract version handshake (mirrors Rust
|
|
18
|
-
* `GEOMETRY_DIAGNOSTICS_SCHEMA_VERSION`, currently
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* `GEOMETRY_DIAGNOSTICS_SCHEMA_VERSION`, currently 3 — that constant carries
|
|
19
|
+
* the per-version changelog and is the single source of truth). Bumped on
|
|
20
|
+
* field renames, field removals, and count-semantics changes; also on an
|
|
21
|
+
* additive field whose absence a consumer must tell apart from a real zero,
|
|
22
|
+
* which is why 2 (removed `guardSaved`) and 3 (added
|
|
23
|
+
* `totalUnsupportedItems`) both bumped. A purely additive optional field
|
|
24
|
+
* that no consumer gates on does not bump.
|
|
25
|
+
*
|
|
26
|
+
* REQUIRED, not optional: the Rust field is a plain `u32` serialized
|
|
27
|
+
* unconditionally, so every producer since #1514 writes the key. A value of
|
|
28
|
+
* `0` is what Rust's `#[serde(default)]` yields when it READS a payload
|
|
29
|
+
* written before #1514, and is the only "pre-versioned producer" signal a
|
|
30
|
+
* consumer sees.
|
|
21
31
|
*/
|
|
22
32
|
schemaVersion: number;
|
|
23
33
|
/** Total CSG boolean failures (un-cut openings, emptied hosts, kernel fallbacks). */
|
|
@@ -58,6 +68,13 @@ export interface GeometryDiagnostics {
|
|
|
58
68
|
/** Optional: absent on payloads produced before this counter existed (#1649). */
|
|
59
69
|
deferTooManyOpenings?: number;
|
|
60
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Content-hash references the geometry pass refused because they exceeded
|
|
73
|
+
* `u32::MAX` (#3421 / #3752). Nonzero means some instancing was skipped, not
|
|
74
|
+
* that geometry is wrong. Optional: absent on payloads from producers
|
|
75
|
+
* predating the counter.
|
|
76
|
+
*/
|
|
77
|
+
oversizedRefDrops?: number;
|
|
61
78
|
/** Bounded top-N worst-failing hosts (opt-in per-product detail). */
|
|
62
79
|
worstHosts: Array<{
|
|
63
80
|
productId: number;
|
|
@@ -75,6 +92,28 @@ export interface GeometryDiagnostics {
|
|
|
75
92
|
* subtraction ran, otherwise the pre-cut count). */
|
|
76
93
|
triangleCount?: number;
|
|
77
94
|
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Representation items dropped from the output: no processor is registered
|
|
97
|
+
* for the IFC type, or the registered processor errored (degenerate/failed
|
|
98
|
+
* geometry). Excludes elements with no Body representation at all — those
|
|
99
|
+
* are correctly absent from the 3D view and never counted here. Absent on
|
|
100
|
+
* a payload produced before this counter existed (schemaVersion < 3).
|
|
101
|
+
*
|
|
102
|
+
* A lower bound on instances: a drop inside a `RepresentationMap` source is
|
|
103
|
+
* counted once per walking router, not once per `IfcMappedItem` occurrence
|
|
104
|
+
* that reuses the cached source. That is once model-wide on the wasm batch
|
|
105
|
+
* path, which uses one router; the native pool builds a router per element,
|
|
106
|
+
* and a source whose items ALL drop is never published to the shared cache
|
|
107
|
+
* (it meshes to nothing), so there it contributes once per owning element.
|
|
108
|
+
* Read it as "these types were dropped", never as a count of affected
|
|
109
|
+
* elements or of distinct sources.
|
|
110
|
+
*/
|
|
111
|
+
totalUnsupportedItems?: number;
|
|
112
|
+
/** `totalUnsupportedItems` broken down by IFC type, sorted desc by count. */
|
|
113
|
+
unsupportedItemsByType?: Array<{
|
|
114
|
+
reason: string;
|
|
115
|
+
count: number;
|
|
116
|
+
}>;
|
|
78
117
|
}
|
|
79
118
|
/**
|
|
80
119
|
* Merge two GeometryDiagnostics (per-batch -> per-load, or per-worker ->
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;;;;;;;OAeG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,oBAAoB,EAAE,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;;;;OAeG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6EAA6E;IAC7E,sBAAsB,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE;AA0BD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,EACzC,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GACxC,mBAAmB,GAAG,IAAI,CAgF5B;AAED,2EAA2E;AAC3E,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB;0EACsE;IACtE,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAChD,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,mBAAmB,GAAG,IAAI,GACtC,6BAA6B,CAM/B"}
|
package/dist/diagnostics.js
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
/** Cap on the merged worst-hosts detail list (matches the Rust WORST_HOSTS_LIMIT). */
|
|
5
5
|
const WORST_HOSTS_LIMIT = 16;
|
|
6
|
+
/**
|
|
7
|
+
* Sum two reason-keyed lists by key, count-desc then reason-asc. The tie-break
|
|
8
|
+
* is load-bearing, not cosmetic: without it equal counts come out in Map
|
|
9
|
+
* insertion order, so the same model could render a different string on two
|
|
10
|
+
* runs. Shared by `failuresByReason` and `unsupportedItemsByType` so the two
|
|
11
|
+
* cannot order themselves differently. Agrees with the Rust `summarize` for the
|
|
12
|
+
* ASCII `Ifc*` type names and reason labels that actually reach here; the two
|
|
13
|
+
* are not identical orderings in general, since Rust ties break on byte order
|
|
14
|
+
* and `localeCompare` does not.
|
|
15
|
+
*/
|
|
16
|
+
function mergeReasonCounts(a, b) {
|
|
17
|
+
const byKey = new Map();
|
|
18
|
+
for (const r of [...a, ...b])
|
|
19
|
+
byKey.set(r.reason, (byKey.get(r.reason) ?? 0) + r.count);
|
|
20
|
+
return [...byKey.entries()]
|
|
21
|
+
.map(([reason, count]) => ({ reason, count }))
|
|
22
|
+
.sort((x, y) => y.count - x.count || x.reason.localeCompare(y.reason));
|
|
23
|
+
}
|
|
6
24
|
/**
|
|
7
25
|
* Merge two GeometryDiagnostics (per-batch -> per-load, or per-worker ->
|
|
8
26
|
* per-model). Scalars sum; classification + rectFast sum field-wise;
|
|
@@ -15,14 +33,7 @@ export function mergeGeometryDiagnostics(a, b) {
|
|
|
15
33
|
if (!b)
|
|
16
34
|
return a;
|
|
17
35
|
const schemaVersion = Math.max(a.schemaVersion ?? 0, b.schemaVersion ?? 0);
|
|
18
|
-
const
|
|
19
|
-
for (const r of a.failuresByReason)
|
|
20
|
-
reasons.set(r.reason, (reasons.get(r.reason) ?? 0) + r.count);
|
|
21
|
-
for (const r of b.failuresByReason)
|
|
22
|
-
reasons.set(r.reason, (reasons.get(r.reason) ?? 0) + r.count);
|
|
23
|
-
const failuresByReason = [...reasons.entries()]
|
|
24
|
-
.map(([reason, count]) => ({ reason, count }))
|
|
25
|
-
.sort((x, y) => y.count - x.count || x.reason.localeCompare(y.reason));
|
|
36
|
+
const failuresByReason = mergeReasonCounts(a.failuresByReason, b.failuresByReason);
|
|
26
37
|
// Fold by productId first (a host whose geometry spans batches/workers can
|
|
27
38
|
// appear in both operands' lists) before re-ranking and capping, mirroring the
|
|
28
39
|
// failuresByReason merge-by-key above. Copy each entry so the operands are not
|
|
@@ -47,6 +58,22 @@ export function mergeGeometryDiagnostics(a, b) {
|
|
|
47
58
|
const worstHosts = [...hostById.values()]
|
|
48
59
|
.sort((x, y) => y.csgFailures - x.csgFailures || x.productId - y.productId)
|
|
49
60
|
.slice(0, WORST_HOSTS_LIMIT);
|
|
61
|
+
// Whether EITHER operand actually carried the counter. Folding an absent field
|
|
62
|
+
// to 0 here would hand back `totalUnsupportedItems: 0` on a payload still
|
|
63
|
+
// labelled `schemaVersion: 2` — "we counted, and nothing was dropped" built out
|
|
64
|
+
// of "this producer never counted". That is the precise confusion the v3 bump
|
|
65
|
+
// exists to prevent, so absence has to survive the merge: the fields are
|
|
66
|
+
// omitted unless at least one side supplied one.
|
|
67
|
+
const countedUnsupported = a.totalUnsupportedItems !== undefined ||
|
|
68
|
+
b.totalUnsupportedItems !== undefined ||
|
|
69
|
+
a.unsupportedItemsByType !== undefined ||
|
|
70
|
+
b.unsupportedItemsByType !== undefined;
|
|
71
|
+
const unsupportedFields = countedUnsupported
|
|
72
|
+
? {
|
|
73
|
+
totalUnsupportedItems: (a.totalUnsupportedItems ?? 0) + (b.totalUnsupportedItems ?? 0),
|
|
74
|
+
unsupportedItemsByType: mergeReasonCounts(a.unsupportedItemsByType ?? [], b.unsupportedItemsByType ?? []),
|
|
75
|
+
}
|
|
76
|
+
: {};
|
|
50
77
|
return {
|
|
51
78
|
schemaVersion,
|
|
52
79
|
totalCsgFailures: a.totalCsgFailures + b.totalCsgFailures,
|
|
@@ -70,7 +97,9 @@ export function mergeGeometryDiagnostics(a, b) {
|
|
|
70
97
|
deferNoOpenings: a.rectFast.deferNoOpenings + b.rectFast.deferNoOpenings,
|
|
71
98
|
deferTooManyOpenings: (a.rectFast.deferTooManyOpenings ?? 0) + (b.rectFast.deferTooManyOpenings ?? 0),
|
|
72
99
|
},
|
|
100
|
+
oversizedRefDrops: (a.oversizedRefDrops ?? 0) + (b.oversizedRefDrops ?? 0),
|
|
73
101
|
worstHosts,
|
|
102
|
+
...unsupportedFields,
|
|
74
103
|
};
|
|
75
104
|
}
|
|
76
105
|
/**
|
package/dist/diagnostics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
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cLiteBridge`, split out to keep
|
|
3
|
+
* `ifc-lite-bridge.ts` under the module-size ratchet (`scripts/check-module-size.mjs`).
|
|
4
|
+
* Pure functions over an already-initialized `IfcAPI` handle — no bridge state, so
|
|
5
|
+
* `IfcLiteBridge` just forwards into these through its existing `runExport` error
|
|
6
|
+
* wrapper (init guard + structured error logging + fatal-wasm-error marking stay
|
|
7
|
+
* there, not duplicated here).
|
|
8
|
+
*/
|
|
9
|
+
import type { IfcAPI } from '@ifc-lite/wasm';
|
|
10
|
+
import type { HbjsonStats } from './hbjson-stats.js';
|
|
11
|
+
/**
|
|
12
|
+
* Export the `IfcSpace` volumes in `content` as a Honeybee HBJSON string
|
|
13
|
+
* (Ladybug Tools energy/daylight model). Rooms are built analytically from
|
|
14
|
+
* extruded-area profiles (watertight by construction).
|
|
15
|
+
*/
|
|
16
|
+
export declare function callExportHbjson(api: IfcAPI, content: Uint8Array, name: string): Uint8Array;
|
|
17
|
+
/**
|
|
18
|
+
* Like {@link callExportHbjson}, but also returns the export's coverage stats
|
|
19
|
+
* (`HbjsonStats`: spaces seen, rooms emitted, spaces skipped as degenerate, plus
|
|
20
|
+
* apertures / doors / shades / constructions / interior adjacencies) so a caller
|
|
21
|
+
* can tell whether a "successful" export silently dropped `IfcSpace` volumes.
|
|
22
|
+
* Runs the export once — `content` and `stats` come from the same wasm call.
|
|
23
|
+
*/
|
|
24
|
+
export declare function callExportHbjsonWithStats(api: IfcAPI, content: Uint8Array, name: string): {
|
|
25
|
+
content: Uint8Array;
|
|
26
|
+
stats: HbjsonStats;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Export the `IfcSpace` volumes in `content` as a Dragonfly DFJSON string
|
|
30
|
+
* (Ladybug Tools energy model). Each space becomes an extruded `Room2D`
|
|
31
|
+
* (floor polygon + height) grouped into stories — the simpler target for
|
|
32
|
+
* mostly-vertical-wall models.
|
|
33
|
+
*/
|
|
34
|
+
export declare function callExportDfjson(api: IfcAPI, content: Uint8Array, name: string): string;
|
|
35
|
+
//# sourceMappingURL=energy-export-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energy-export-bridge.d.ts","sourceRoot":"","sources":["../src/energy-export-bridge.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAE3F;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,GACX;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Export the `IfcSpace` volumes in `content` as a Honeybee HBJSON string
|
|
6
|
+
* (Ladybug Tools energy/daylight model). Rooms are built analytically from
|
|
7
|
+
* extruded-area profiles (watertight by construction).
|
|
8
|
+
*/
|
|
9
|
+
export function callExportHbjson(api, content, name) {
|
|
10
|
+
return api.exportHbjson(content, name);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Like {@link callExportHbjson}, but also returns the export's coverage stats
|
|
14
|
+
* (`HbjsonStats`: spaces seen, rooms emitted, spaces skipped as degenerate, plus
|
|
15
|
+
* apertures / doors / shades / constructions / interior adjacencies) so a caller
|
|
16
|
+
* can tell whether a "successful" export silently dropped `IfcSpace` volumes.
|
|
17
|
+
* Runs the export once — `content` and `stats` come from the same wasm call.
|
|
18
|
+
*/
|
|
19
|
+
export function callExportHbjsonWithStats(api, content, name) {
|
|
20
|
+
return api.exportHbjsonWithStats(content, name);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Export the `IfcSpace` volumes in `content` as a Dragonfly DFJSON string
|
|
24
|
+
* (Ladybug Tools energy model). Each space becomes an extruded `Room2D`
|
|
25
|
+
* (floor polygon + height) grouped into stories — the simpler target for
|
|
26
|
+
* mostly-vertical-wall models.
|
|
27
|
+
*/
|
|
28
|
+
export function callExportDfjson(api, content, name) {
|
|
29
|
+
return api.exportDfjson(content, name);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=energy-export-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energy-export-bridge.js","sourceRoot":"","sources":["../src/energy-export-bridge.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAc/D;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW,EAAE,OAAmB,EAAE,IAAY;IAC7E,OAAO,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,GAAW,EACX,OAAmB,EACnB,IAAY;IAEZ,OAAO,GAAG,CAAC,qBAAqB,CAAC,OAAO,EAAE,IAAI,CAAgD,CAAC;AACjG,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW,EAAE,OAAmB,EAAE,IAAY;IAC7E,OAAO,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { TessellationQuality } from './types.js';
|
|
2
|
+
import type { BatchSizingConfig } from './batch-sizing.js';
|
|
3
|
+
export interface ProcessParallelOptions {
|
|
4
|
+
/** Fresh per-load fingerprint cell shared only with the matching parser. */
|
|
5
|
+
sourceFingerprint?: SharedArrayBuffer;
|
|
6
|
+
/**
|
|
7
|
+
* Fires when the streaming pre-pass finishes building the entity index
|
|
8
|
+
* (after styles), with SAB-backed Uint32Array views over the shared
|
|
9
|
+
* column buffers. The parser worker uses this to skip its own
|
|
10
|
+
* `scanEntitiesFastBytes` call (~10 s on 1 GB files under WASM
|
|
11
|
+
* contention with the geometry workers).
|
|
12
|
+
*/
|
|
13
|
+
onEntityIndex?: (ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array, oversizedIdCount?: number, // #3395 refused records
|
|
14
|
+
malformedRecordCount?: number) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Issue #540 — "Merge Multilayer Walls" load-time toggle. When
|
|
17
|
+
* `true`, the geometry workers' IfcAPI receive
|
|
18
|
+
* `setMergeLayers(true)` before the first stream-chunk lands, so
|
|
19
|
+
* Revit-style multilayer-wall part meshes are suppressed at the
|
|
20
|
+
* Rust layer. Default `false` keeps existing behaviour.
|
|
21
|
+
*/
|
|
22
|
+
mergeLayers?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* GPU-instancing partition toggle (default true). Set false for FEDERATED loads:
|
|
25
|
+
* the instanced render path is primary-model only, so a federated model must keep
|
|
26
|
+
* all geometry on the flat path or its opaque repeated occurrences are dropped.
|
|
27
|
+
*/
|
|
28
|
+
enableInstancing?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Issue #924 — per-entity geometry-hash tolerance in metres. When a
|
|
31
|
+
* positive value is given, each geometry worker's IfcAPI receives
|
|
32
|
+
* `setComputeGeometryHashes(tol)` before the first stream-chunk, so the
|
|
33
|
+
* RTC-invariant `geometryHash` lands on every emitted mesh for the
|
|
34
|
+
* model-diff / compare feature. `undefined`/`null` ⇒ off (zero overhead).
|
|
35
|
+
*/
|
|
36
|
+
geometryHashTolerance?: number | null;
|
|
37
|
+
/**
|
|
38
|
+
* Issue #976 — tessellation detail level for curved geometry. When set,
|
|
39
|
+
* each geometry worker's IfcAPI receives `setTessellationQuality(level)`
|
|
40
|
+
* before the first stream-chunk. `undefined`/`null` ⇒ engine default
|
|
41
|
+
* (`'medium'`, output identical to the pre-quality pipeline).
|
|
42
|
+
*/
|
|
43
|
+
tessellationQuality?: TessellationQuality | null;
|
|
44
|
+
/**
|
|
45
|
+
* Issue #1286 — tier-independent small-cut skip. When true, each geometry
|
|
46
|
+
* worker's IfcAPI receives `setSkipSmallCuts(true)` before the first
|
|
47
|
+
* stream-chunk, dropping tiny `IfcBooleanResult` detail cuts while keeping the
|
|
48
|
+
* tessellation tier. `undefined`/`false` ⇒ every cut runs (default).
|
|
49
|
+
*/
|
|
50
|
+
skipSmallCuts?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Explicit URL for the wasm-bindgen `.wasm` binary. When provided,
|
|
53
|
+
* forwarded to the geometry workers' init messages so they call
|
|
54
|
+
* `init(wasmUrl)` instead of relying on wasm-bindgen's default
|
|
55
|
+
* `import.meta.url`-based resolution.
|
|
56
|
+
*
|
|
57
|
+
* Vite + webpack 5 consumers don't need to set this — the bundler
|
|
58
|
+
* rewrites the `new URL('ifc-lite_bg.wasm', import.meta.url)` literal
|
|
59
|
+
* inside the wasm-bindgen glue at build time. This option exists for
|
|
60
|
+
* consumers whose bundler doesn't transform that pattern, or who
|
|
61
|
+
* serve the wasm from a CDN at a different origin (e.g., self-hosted
|
|
62
|
+
* deployments, Tauri custom protocols, embedded usage).
|
|
63
|
+
*/
|
|
64
|
+
wasmUrls?: {
|
|
65
|
+
wasm?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Issue #1097 — optional override for the worker's adaptive batch sizing
|
|
69
|
+
* (the watchdog↔throughput knob). Takes precedence over the `globalThis`
|
|
70
|
+
* tuning hook; omitted ⇒ `DEFAULT_BATCH_SIZING`. Forwarded to every worker
|
|
71
|
+
* in its `stream-start` message and validated there.
|
|
72
|
+
*/
|
|
73
|
+
batchSizing?: Partial<BatchSizingConfig>;
|
|
74
|
+
/**
|
|
75
|
+
* #1097 load-time visibility filter. `disabledTypes` (uppercase STEP keywords)
|
|
76
|
+
* and `skipTypeGeometry` are forwarded to the prepass so the matching geometry
|
|
77
|
+
* jobs are never produced — cutting decode + CSG + tessellation + upload for
|
|
78
|
+
* hidden types (spaces/annotations/grids/type-library). Takes precedence over
|
|
79
|
+
* the `globalThis.__IFC_LITE_VISIBILITY_FILTER` hook. Toggling a type back on
|
|
80
|
+
* requires a reload.
|
|
81
|
+
*/
|
|
82
|
+
visibilityFilter?: {
|
|
83
|
+
disabledTypes?: string[];
|
|
84
|
+
skipTypeGeometry?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Explicit geometry-worker count for A/B tuning (the viewer's
|
|
88
|
+
* `?geomWorkers=N` knob). Overrides the cores-tier heuristic but stays
|
|
89
|
+
* clamped to the memory budget — see the worker-count policy. `undefined`
|
|
90
|
+
* ⇒ use the heuristic. Lets a user measure their host's true thermal optimum
|
|
91
|
+
* (which is machine-specific). Geometry output is unaffected by the count
|
|
92
|
+
* (workers process disjoint, deterministic element slices).
|
|
93
|
+
*/
|
|
94
|
+
workerCountOverride?: number;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=geometry-parallel-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry-parallel-options.d.ts","sourceRoot":"","sources":["../src/geometry-parallel-options.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CACd,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,WAAW,EAAE,gBAAgB,CAAC,EAAE,MAAM,EAAE,wBAAwB;IACzE,oBAAoB,CAAC,EAAE,MAAM,KAC1B,IAAI,CAAC;IACV;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACjD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC5E;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=geometry-parallel-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry-parallel-options.js","sourceRoot":"","sources":["../src/geometry-parallel-options.ts"],"names":[],"mappings":"AAAA;;+DAE+D"}
|
|
@@ -19,10 +19,9 @@
|
|
|
19
19
|
* (full pre-pass + worker spawn + first batch) to ~3-5 s (pre-pass
|
|
20
20
|
* scans first 100 K bytes → meta → first chunk → first batch).
|
|
21
21
|
*/
|
|
22
|
+
import type { ProcessParallelOptions } from './geometry-parallel-options.js';
|
|
22
23
|
import type { CoordinateHandler } from './coordinate-handler.js';
|
|
23
|
-
import type { TessellationQuality } from './types.js';
|
|
24
24
|
import type { StreamingGeometryEvent } from './index.js';
|
|
25
|
-
import type { BatchSizingConfig } from './batch-sizing.js';
|
|
26
25
|
/**
|
|
27
26
|
* Prepass class-byte layout, mirroring the `PREPASS_CLASS_*` definitions in
|
|
28
27
|
* `rust/processing/src/shard_classes.rs` (the source of truth — these are
|
|
@@ -70,96 +69,7 @@ export declare function planAffinityRouting(affinity: Uint32Array, totalJobs: nu
|
|
|
70
69
|
buckets: number[][];
|
|
71
70
|
nextWorker: number;
|
|
72
71
|
};
|
|
73
|
-
export
|
|
74
|
-
/**
|
|
75
|
-
* Fires when the streaming pre-pass finishes building the entity index
|
|
76
|
-
* (after styles), with SAB-backed Uint32Array views over the shared
|
|
77
|
-
* column buffers. The parser worker uses this to skip its own
|
|
78
|
-
* `scanEntitiesFastBytes` call (~10 s on 1 GB files under WASM
|
|
79
|
-
* contention with the geometry workers).
|
|
80
|
-
*/
|
|
81
|
-
onEntityIndex?: (ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array) => void;
|
|
82
|
-
/**
|
|
83
|
-
* Issue #540 — "Merge Multilayer Walls" load-time toggle. When
|
|
84
|
-
* `true`, the geometry workers' IfcAPI receive
|
|
85
|
-
* `setMergeLayers(true)` before the first stream-chunk lands, so
|
|
86
|
-
* Revit-style multilayer-wall part meshes are suppressed at the
|
|
87
|
-
* Rust layer. Default `false` keeps existing behaviour.
|
|
88
|
-
*/
|
|
89
|
-
mergeLayers?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* GPU-instancing partition toggle (default true). Set false for FEDERATED loads:
|
|
92
|
-
* the instanced render path is primary-model only, so a federated model must keep
|
|
93
|
-
* all geometry on the flat path or its opaque repeated occurrences are dropped.
|
|
94
|
-
*/
|
|
95
|
-
enableInstancing?: boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Issue #924 — per-entity geometry-hash tolerance in metres. When a
|
|
98
|
-
* positive value is given, each geometry worker's IfcAPI receives
|
|
99
|
-
* `setComputeGeometryHashes(tol)` before the first stream-chunk, so the
|
|
100
|
-
* RTC-invariant `geometryHash` lands on every emitted mesh for the
|
|
101
|
-
* model-diff / compare feature. `undefined`/`null` ⇒ off (zero overhead).
|
|
102
|
-
*/
|
|
103
|
-
geometryHashTolerance?: number | null;
|
|
104
|
-
/**
|
|
105
|
-
* Issue #976 — tessellation detail level for curved geometry. When set,
|
|
106
|
-
* each geometry worker's IfcAPI receives `setTessellationQuality(level)`
|
|
107
|
-
* before the first stream-chunk. `undefined`/`null` ⇒ engine default
|
|
108
|
-
* (`'medium'`, output identical to the pre-quality pipeline).
|
|
109
|
-
*/
|
|
110
|
-
tessellationQuality?: TessellationQuality | null;
|
|
111
|
-
/**
|
|
112
|
-
* Issue #1286 — tier-independent small-cut skip. When true, each geometry
|
|
113
|
-
* worker's IfcAPI receives `setSkipSmallCuts(true)` before the first
|
|
114
|
-
* stream-chunk, dropping tiny `IfcBooleanResult` detail cuts while keeping the
|
|
115
|
-
* tessellation tier. `undefined`/`false` ⇒ every cut runs (default).
|
|
116
|
-
*/
|
|
117
|
-
skipSmallCuts?: boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Explicit URL for the wasm-bindgen `.wasm` binary. When provided,
|
|
120
|
-
* forwarded to the geometry workers' init messages so they call
|
|
121
|
-
* `init(wasmUrl)` instead of relying on wasm-bindgen's default
|
|
122
|
-
* `import.meta.url`-based resolution.
|
|
123
|
-
*
|
|
124
|
-
* Vite + webpack 5 consumers don't need to set this — the bundler
|
|
125
|
-
* rewrites the `new URL('ifc-lite_bg.wasm', import.meta.url)` literal
|
|
126
|
-
* inside the wasm-bindgen glue at build time. This option exists for
|
|
127
|
-
* consumers whose bundler doesn't transform that pattern, or who
|
|
128
|
-
* serve the wasm from a CDN at a different origin (e.g., self-hosted
|
|
129
|
-
* deployments, Tauri custom protocols, embedded usage).
|
|
130
|
-
*/
|
|
131
|
-
wasmUrls?: {
|
|
132
|
-
wasm?: string;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Issue #1097 — optional override for the worker's adaptive batch sizing
|
|
136
|
-
* (the watchdog↔throughput knob). Takes precedence over the `globalThis`
|
|
137
|
-
* tuning hook; omitted ⇒ `DEFAULT_BATCH_SIZING`. Forwarded to every worker
|
|
138
|
-
* in its `stream-start` message and validated there.
|
|
139
|
-
*/
|
|
140
|
-
batchSizing?: Partial<BatchSizingConfig>;
|
|
141
|
-
/**
|
|
142
|
-
* #1097 load-time visibility filter. `disabledTypes` (uppercase STEP keywords)
|
|
143
|
-
* and `skipTypeGeometry` are forwarded to the prepass so the matching geometry
|
|
144
|
-
* jobs are never produced — cutting decode + CSG + tessellation + upload for
|
|
145
|
-
* hidden types (spaces/annotations/grids/type-library). Takes precedence over
|
|
146
|
-
* the `globalThis.__IFC_LITE_VISIBILITY_FILTER` hook. Toggling a type back on
|
|
147
|
-
* requires a reload.
|
|
148
|
-
*/
|
|
149
|
-
visibilityFilter?: {
|
|
150
|
-
disabledTypes?: string[];
|
|
151
|
-
skipTypeGeometry?: boolean;
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* Explicit geometry-worker count for A/B tuning (the viewer's
|
|
155
|
-
* `?geomWorkers=N` knob). Overrides the cores-tier heuristic but stays
|
|
156
|
-
* clamped to the memory budget — see {@link computeWorkerCount}. `undefined`
|
|
157
|
-
* ⇒ use the heuristic. Lets a user measure their host's true thermal optimum
|
|
158
|
-
* (which is machine-specific). Geometry output is unaffected by the count
|
|
159
|
-
* (workers process disjoint, deterministic element slices).
|
|
160
|
-
*/
|
|
161
|
-
workerCountOverride?: number;
|
|
162
|
-
}
|
|
72
|
+
export type { ProcessParallelOptions } from './geometry-parallel-options.js';
|
|
163
73
|
export declare function processParallel(buffer: Uint8Array, coordinator: CoordinateHandler, sharedRtcOffset?: {
|
|
164
74
|
x: number;
|
|
165
75
|
y: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry-parallel.d.ts","sourceRoot":"","sources":["../src/geometry-parallel.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"geometry-parallel.d.ts","sourceRoot":"","sources":["../src/geometry-parallel.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAWzD;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,KAAO,CAAC;AAC5C,uBAAuB;AACvB,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,6BAA6B;AAC7B,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,6CAA6C;AAC7C,eAAO,MAAM,+BAA+B,IAAI,CAAC;AACjD,kCAAkC;AAClC,eAAO,MAAM,qCAAqC,IAAI,CAAC;AACvD,4BAA4B;AAC5B,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,4BAA4B;AAC5B,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,0BAA0B;AAC1B,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAa/C;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,UAAU,EACnB,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,WAAW,GACnB,GAAG,CAA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