@snaptrude/plugin-core 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/api-manifest.full.json +1350 -89
  3. package/api-manifest.json +826 -40
  4. package/dist/api/analysis/daylight.d.ts +603 -0
  5. package/dist/api/analysis/daylight.d.ts.map +1 -0
  6. package/dist/api/analysis/heatmaps.d.ts +438 -14
  7. package/dist/api/analysis/heatmaps.d.ts.map +1 -1
  8. package/dist/api/analysis/index.d.ts +15 -0
  9. package/dist/api/analysis/index.d.ts.map +1 -1
  10. package/dist/api/analysis/solar.d.ts +249 -0
  11. package/dist/api/analysis/solar.d.ts.map +1 -0
  12. package/dist/api/analysis/weather.d.ts +193 -0
  13. package/dist/api/analysis/weather.d.ts.map +1 -0
  14. package/dist/api/core/camera/index.d.ts +37 -0
  15. package/dist/api/core/camera/index.d.ts.map +1 -1
  16. package/dist/api/core/geom/create/index.d.ts +318 -1
  17. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  18. package/dist/api/core/index.d.ts +9 -0
  19. package/dist/api/core/index.d.ts.map +1 -1
  20. package/dist/api/core/io/export/index.d.ts +3 -1
  21. package/dist/api/core/io/export/index.d.ts.map +1 -1
  22. package/dist/api/core/io/import/index.d.ts +61 -0
  23. package/dist/api/core/io/import/index.d.ts.map +1 -1
  24. package/dist/api/core/mode/index.d.ts +99 -0
  25. package/dist/api/core/mode/index.d.ts.map +1 -0
  26. package/dist/api/core/storeys/index.d.ts +251 -0
  27. package/dist/api/core/storeys/index.d.ts.map +1 -0
  28. package/dist/api/core/tags.d.ts +24 -0
  29. package/dist/api/core/tags.d.ts.map +1 -1
  30. package/dist/api/core/zoom/index.d.ts +4 -0
  31. package/dist/api/core/zoom/index.d.ts.map +1 -1
  32. package/dist/api/design/create/index.d.ts +115 -4
  33. package/dist/api/design/create/index.d.ts.map +1 -1
  34. package/dist/api/design/delete/index.d.ts +3 -0
  35. package/dist/api/design/delete/index.d.ts.map +1 -1
  36. package/dist/api/design/query/geometry/index.d.ts +112 -0
  37. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  38. package/dist/api/design/query/index.d.ts +4 -0
  39. package/dist/api/design/query/index.d.ts.map +1 -1
  40. package/dist/api/design/query/referenceLines.d.ts +45 -0
  41. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  42. package/dist/api/design/query/spaces.d.ts +173 -0
  43. package/dist/api/design/query/spaces.d.ts.map +1 -1
  44. package/dist/api/design/transform/index.d.ts +12 -0
  45. package/dist/api/design/transform/index.d.ts.map +1 -1
  46. package/dist/api/design/update/index.d.ts +51 -1
  47. package/dist/api/design/update/index.d.ts.map +1 -1
  48. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  49. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  50. package/dist/api/entity/referenceLine.d.ts +8 -0
  51. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  52. package/dist/api/entity/story.d.ts +20 -0
  53. package/dist/api/entity/story.d.ts.map +1 -1
  54. package/dist/api/index.d.ts +5 -0
  55. package/dist/api/index.d.ts.map +1 -1
  56. package/dist/api/presentation/export.d.ts +4 -0
  57. package/dist/api/presentation/export.d.ts.map +1 -1
  58. package/dist/api/presentation/import.d.ts +6 -0
  59. package/dist/api/presentation/import.d.ts.map +1 -1
  60. package/dist/api/presentation/index.d.ts +9 -0
  61. package/dist/api/presentation/index.d.ts.map +1 -1
  62. package/dist/api/presentation/placedViews.d.ts +370 -0
  63. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  64. package/dist/api/presentation/shapes.d.ts +481 -0
  65. package/dist/api/presentation/shapes.d.ts.map +1 -0
  66. package/dist/api/program/site.d.ts +94 -0
  67. package/dist/api/program/site.d.ts.map +1 -1
  68. package/dist/api/program/spreadsheet.d.ts +260 -28
  69. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  70. package/dist/api/workspace/index.d.ts +460 -0
  71. package/dist/api/workspace/index.d.ts.map +1 -0
  72. package/dist/index.cjs +2625 -1758
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +2515 -1758
  75. package/dist/index.js.map +1 -1
  76. package/package.json +3 -2
  77. package/scripts/generate-manifest.mjs +45 -0
  78. package/src/api/analysis/daylight.ts +470 -0
  79. package/src/api/analysis/heatmaps.ts +444 -17
  80. package/src/api/analysis/index.ts +15 -0
  81. package/src/api/analysis/solar.ts +237 -0
  82. package/src/api/analysis/weather.ts +179 -0
  83. package/src/api/core/camera/index.ts +39 -0
  84. package/src/api/core/geom/create/index.ts +344 -1
  85. package/src/api/core/index.ts +9 -0
  86. package/src/api/core/io/export/index.ts +3 -1
  87. package/src/api/core/io/import/index.ts +64 -0
  88. package/src/api/core/mode/index.ts +96 -0
  89. package/src/api/core/storeys/index.ts +279 -0
  90. package/src/api/core/tags.ts +27 -0
  91. package/src/api/core/zoom/index.ts +4 -0
  92. package/src/api/design/create/index.ts +138 -1
  93. package/src/api/design/delete/index.ts +3 -0
  94. package/src/api/design/query/geometry/index.ts +125 -3
  95. package/src/api/design/query/index.ts +4 -0
  96. package/src/api/design/query/referenceLines.ts +52 -0
  97. package/src/api/design/query/spaces.ts +143 -0
  98. package/src/api/design/transform/index.ts +12 -0
  99. package/src/api/design/update/index.ts +66 -1
  100. package/src/api/entity/buildableEnvelope.ts +4 -0
  101. package/src/api/entity/referenceLine.ts +8 -0
  102. package/src/api/entity/story.ts +20 -0
  103. package/src/api/index.ts +5 -0
  104. package/src/api/presentation/export.ts +4 -0
  105. package/src/api/presentation/import.ts +6 -0
  106. package/src/api/presentation/index.ts +9 -0
  107. package/src/api/presentation/placedViews.ts +363 -0
  108. package/src/api/presentation/shapes.ts +274 -0
  109. package/src/api/program/site.ts +95 -0
  110. package/src/api/program/spreadsheet.ts +251 -6
  111. package/src/api/workspace/index.ts +516 -0
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../types";
3
- import { ComponentHandle } from "../../handles";
3
+ import { ComponentHandle, Vec3Components } from "../../handles";
4
4
  /**
5
5
  * Analysis heatmaps — render plugin-computed scalar data as a heatmap.
6
6
  *
@@ -15,15 +15,25 @@ import { ComponentHandle } from "../../handles";
15
15
  * - {@linkcode PluginAnalysisHeatmapsApi.renderGrid} — a coloured grid mesh
16
16
  * from point samples in world coordinates (wind, noise, microclimate — any
17
17
  * field sampled over an area).
18
+ * - {@linkcode PluginAnalysisHeatmapsApi.renderField} — arbitrary planar
19
+ * polygon cells (or pre-tessellated meshes), one scalar value each — for
20
+ * non-square analysis meshes straight from a solver.
18
21
  *
19
22
  * Shared semantics:
20
23
  *
21
- * - **Single active heatmap** — a render call **replaces** whatever heatmap
22
- * is currently showing (from either mode).
24
+ * - **Named overlays** — every render call targets a named overlay
25
+ * (`options.name`; a shared default overlay when omitted). Rendering an
26
+ * existing name replaces that overlay only; the newly rendered overlay
27
+ * becomes the visible one — **exactly one overlay is visible at a time**.
28
+ * Up to 16 overlays can be registered; manage them (list / show / hide /
29
+ * remove) via {@linkcode PluginAnalysisHeatmapsApi.overlays}.
23
30
  * - **Legend** — the host renders a legend card from
24
31
  * {@linkcode PluginAnalysisHeatmapOptions} (title, unit, min/max, colour
25
32
  * segments). Values outside `[min, max]` **clamp to the end colours** and
26
33
  * the legend shows `<` / `>` markers at the clamped ends.
34
+ * - **Hover tooltip** — pass `options.hover: true` to any render call and,
35
+ * while that overlay is visible, hovering a cell shows a tooltip with the
36
+ * cell's `value` (and its `meta` payload, when the cell carries one).
27
37
  * - **Ephemeral** — the heatmap is a transient overlay: never persisted,
28
38
  * never saved with views, and auto-cleared when a scene-mutating edit
29
39
  * invalidates it. Re-render after changing the model.
@@ -31,14 +41,21 @@ import { ComponentHandle } from "../../handles";
31
41
  * Accessed via `snaptrude.analysis.heatmaps`.
32
42
  */
33
43
  export declare abstract class PluginAnalysisHeatmapsApi {
44
+ /**
45
+ * Manage the named heatmap overlays created by the render calls —
46
+ * list / show / hide / remove. See
47
+ * {@linkcode PluginAnalysisHeatmapOverlaysApi}.
48
+ */
49
+ abstract overlays: PluginAnalysisHeatmapOverlaysApi;
34
50
  constructor();
35
51
  /**
36
52
  * Render a per-space heatmap — one flat colour per space's top face.
37
53
  *
38
54
  * Each entry maps a space to a scalar value; the value is mapped through
39
55
  * the colour ramp (see {@linkcode PluginAnalysisHeatmapOptions}) and the
40
- * space's top face is painted that single flat colour. Replaces any
41
- * heatmap currently showing (single active heatmap). Spaces whose top
56
+ * space's top face is painted that single flat colour. Renders into the
57
+ * overlay named `options.name` (the default overlay when omitted),
58
+ * replacing that overlay only and making it the visible one. Spaces whose top
42
59
  * face is not flat (pitched/sloped tops) are **skipped with a console
43
60
  * warning** — the rest of the heatmap still renders.
44
61
  *
@@ -57,6 +74,8 @@ export declare abstract class PluginAnalysisHeatmapsApi {
57
74
  * skipped).
58
75
  * @throws When `options.min` is greater than `options.max`.
59
76
  * @throws When a colour in `options.colors` is not a 6-digit hex colour.
77
+ * @throws When `options.name` is a new overlay name and the 16-overlay
78
+ * cap is reached.
60
79
  * @throws When plugin writes are disabled.
61
80
  *
62
81
  * @examplePrompt Color each room by its occupancy count
@@ -83,8 +102,9 @@ export declare abstract class PluginAnalysisHeatmapsApi {
83
102
  * {@linkcode PluginUnitsApi.convert}) — coloured by mapping the value
84
103
  * through the colour ramp
85
104
  * (see {@linkcode PluginAnalysisHeatmapOptions}). This is the mode for
86
- * field data — wind, noise, microclimate — sampled over an area. Replaces
87
- * any heatmap currently showing (single active heatmap).
105
+ * field data — wind, noise, microclimate — sampled over an area. Renders
106
+ * into the overlay named `options.name` (the default overlay when
107
+ * omitted), replacing that overlay only and making it the visible one.
88
108
  *
89
109
  * The heatmap is ephemeral: it is auto-cleared by scene-mutating edits
90
110
  * and is never persisted or saved with views.
@@ -102,6 +122,8 @@ export declare abstract class PluginAnalysisHeatmapsApi {
102
122
  * @throws When `cells` is empty or `cellSize` is not a positive, finite number.
103
123
  * @throws When `options.min` is greater than `options.max`.
104
124
  * @throws When a colour in `options.colors` is not a 6-digit hex colour.
125
+ * @throws When `options.name` is a new overlay name and the 16-overlay
126
+ * cap is reached.
105
127
  * @throws When plugin writes are disabled.
106
128
  *
107
129
  * @examplePrompt Overlay my CFD wind simulation results on the site
@@ -120,15 +142,142 @@ export declare abstract class PluginAnalysisHeatmapsApi {
120
142
  */
121
143
  abstract renderGrid(cells: PluginAnalysisHeatmapGridCell[], cellSize: number, options?: PluginAnalysisHeatmapOptions): PluginApiReturn<PluginAnalysisHeatmapsRenderResult>;
122
144
  /**
123
- * Clear the plugin heatmap from the scene.
145
+ * Render a grid heatmap on an **arbitrarily oriented plane** — a façade,
146
+ * a section cut, any flat surface.
147
+ *
148
+ * The same point-sample model as
149
+ * {@linkcode PluginAnalysisHeatmapsApi.renderGrid}, generalised: cells lie
150
+ * on the plane whose direction is given by `normal` (for a façade, the
151
+ * outward wall normal). Each cell is a square of edge `cellSize` centred
152
+ * on its **world-coordinate** `position` and oriented in that plane; the
153
+ * host derives the in-plane axes from the normal and offsets each cell a
154
+ * hair along it so the heatmap never z-fights the surface it annotates.
155
+ * Cell positions should lie on (or very near) the surface being
156
+ * annotated — the host does not project them. Renders into the overlay
157
+ * named `options.name` (the default overlay when omitted), replacing
158
+ * that overlay only and making it the visible one.
124
159
  *
125
- * Un-applies the rendered heatmap (either mode) and removes its legend.
126
- * A no-op (returns `false`) when no plugin heatmap is showing. Does not
127
- * touch the built-in study heatmaps (`sunlightHours` / `illuminance`) —
128
- * they have their own `reset`.
160
+ * This is the mode for per-façade data solar irradiance, glare, panel
161
+ * yield, wind pressure sampled over a vertical or sloped face. For
162
+ * horizontal ground fields prefer
163
+ * {@linkcode PluginAnalysisHeatmapsApi.renderGrid}, which is this call
164
+ * with `normal = { x: 0, y: 1, z: 0 }`.
129
165
  *
130
- * @returns `true` when a heatmap was cleared, `false` when none was
131
- * showing.
166
+ * The heatmap is ephemeral: it is auto-cleared by scene-mutating edits
167
+ * and is never persisted or saved with views.
168
+ *
169
+ * @param cells - One {@linkcode PluginAnalysisHeatmapGridCell} per
170
+ * sample: a world-coordinate `position` on the surface plane (y up)
171
+ * and its scalar `value`.
172
+ * @param cellSize - Edge length of each (square) cell, in the same
173
+ * Snaptrude internal units as `position` (see
174
+ * {@linkcode PluginUnitsApi.convert}). Must be a positive, finite number.
175
+ * @param normal - The plane's normal direction as `{ x, y, z }` (for a
176
+ * façade, the outward wall normal — read it via
177
+ * `core.geom.query.face.getNormal` on the wall's face). Any non-zero
178
+ * length; the host normalises it.
179
+ * @param options - {@linkcode PluginAnalysisHeatmapOptions} — legend
180
+ * title/unit, explicit min/max range (auto-derived from the data when
181
+ * omitted), and the colour ramp.
182
+ * @returns A {@linkcode PluginAnalysisHeatmapsRenderResult} —
183
+ * `{ success: true }` once the heatmap is rendered.
184
+ * @throws When `cells` is empty, `cellSize` is not a positive finite
185
+ * number, or `normal` has zero length.
186
+ * @throws When `options.min` is greater than `options.max`.
187
+ * @throws When a colour in `options.colors` is not a 6-digit hex colour.
188
+ * @throws When `options.name` is a new overlay name and the 16-overlay
189
+ * cap is reached.
190
+ * @throws When plugin writes are disabled.
191
+ *
192
+ * @examplePrompt Paint the solar irradiance results on the south façade
193
+ * @examplePrompt Show my daylight values as a heatmap on this wall
194
+ * @examplePrompt Render panel-level PV yield on the building face
195
+ * @examplePrompt Overlay wind pressure on the tower's west elevation
196
+ *
197
+ * # Example
198
+ * ```ts
199
+ * // Samples lie on a wall plane facing +X; colour each 1-unit cell by irradiance.
200
+ * await snaptrude.analysis.heatmaps.renderSurfaceGrid(
201
+ * samples.map((s) => ({ position: { x: wallX, y: s.y, z: s.z }, value: s.irradiance })),
202
+ * 1,
203
+ * { x: 1, y: 0, z: 0 }, // façade normal
204
+ * { title: "Irradiance", unit: "kWh/m²", colors: ["#0000ff", "#ffff00", "#ff0000"] },
205
+ * )
206
+ * ```
207
+ */
208
+ abstract renderSurfaceGrid(cells: PluginAnalysisHeatmapGridCell[], cellSize: number, normal: Vec3Components, options?: PluginAnalysisHeatmapOptions): PluginApiReturn<PluginAnalysisHeatmapsRenderResult>;
209
+ /**
210
+ * Render a heatmap from **arbitrary cell geometry** — planar polygons or
211
+ * pre-tessellated meshes, one scalar value each.
212
+ *
213
+ * The free-form sibling of the grid calls: instead of square cells, each
214
+ * {@linkcode PluginAnalysisHeatmapFieldCell} brings its own footprint in
215
+ * **world coordinates** (y up) — either a planar `polygon` ring (3+
216
+ * points, any orientation; the host triangulates it) or a pre-tessellated
217
+ * `vertices` + `indices` mesh (triangle list). This is the mode for
218
+ * analysis meshes straight from a solver: FEA/CFD cells, Voronoi regions,
219
+ * per-panel façade patches — anything not on a square grid. Each cell's
220
+ * `value` is mapped through the colour scale
221
+ * (see {@linkcode PluginAnalysisHeatmapOptions}, including
222
+ * `options.scale`); an optional `meta` payload is stored with the overlay
223
+ * for later features. Renders into the overlay named `options.name` (the
224
+ * default overlay when omitted), replacing that overlay only and making
225
+ * it the visible one.
226
+ *
227
+ * Degenerate polygon cells (collinear points, zero area) are **skipped
228
+ * with a console warning** — the rest of the heatmap still renders.
229
+ *
230
+ * The heatmap is ephemeral: it is auto-cleared by scene-mutating edits
231
+ * and is never persisted or saved with views.
232
+ *
233
+ * @param cells - One {@linkcode PluginAnalysisHeatmapFieldCell} per cell:
234
+ * a planar `polygon` ring OR a `vertices`/`indices` triangle mesh, plus
235
+ * its scalar `value` and optional `meta`.
236
+ * @param options - {@linkcode PluginAnalysisHeatmapOptions} — legend
237
+ * title/unit, min/max range, colour ramp, and the colour `scale`
238
+ * (bands / threshold / categorical).
239
+ * @returns A {@linkcode PluginAnalysisHeatmapsRenderResult} —
240
+ * `{ success: true }` once the heatmap is rendered.
241
+ * @throws When `cells` is empty, a polygon has fewer than 3 points, a
242
+ * pre-tessellated cell's `indices` length is not a multiple of 3, or an
243
+ * index is out of range of its `vertices`.
244
+ * @throws When every polygon cell was degenerate (nothing renderable).
245
+ * @throws When a `categorical` scale has no class for a cell's value.
246
+ * @throws When `options.min` is greater than `options.max`, or a colour
247
+ * is not a 6-digit hex colour.
248
+ * @throws When `options.name` is a new overlay name and the 16-overlay
249
+ * cap is reached.
250
+ * @throws When plugin writes are disabled.
251
+ *
252
+ * @examplePrompt Overlay my FEA stress results on their solver mesh
253
+ * @examplePrompt Color these Voronoi regions by footfall
254
+ * @examplePrompt Paint each façade panel polygon by its PV yield
255
+ * @examplePrompt Render pass/fail daylight compliance per zone polygon
256
+ *
257
+ * # Example
258
+ * ```ts
259
+ * // Two triangular cells at ground level, coloured pass/fail at 300 lux.
260
+ * await snaptrude.analysis.heatmaps.renderField(
261
+ * [
262
+ * { polygon: [{ x: 0, y: 0, z: 0 }, { x: 4, y: 0, z: 0 }, { x: 0, y: 0, z: 4 }], value: 420 },
263
+ * { polygon: [{ x: 4, y: 0, z: 4 }, { x: 0, y: 0, z: 4 }, { x: 4, y: 0, z: 0 }], value: 180 },
264
+ * ],
265
+ * { title: "Daylight", unit: "lux", scale: { type: "threshold", threshold: 300 } },
266
+ * )
267
+ * ```
268
+ */
269
+ abstract renderField(cells: PluginAnalysisHeatmapFieldCell[], options?: PluginAnalysisHeatmapOptions): PluginApiReturn<PluginAnalysisHeatmapsRenderResult>;
270
+ /**
271
+ * Clear every plugin heatmap overlay from the scene.
272
+ *
273
+ * Removes **all** registered overlays (equivalent to
274
+ * {@linkcode PluginAnalysisHeatmapOverlaysApi.removeAll}) and closes the
275
+ * legend. A no-op (returns `false`) when no plugin heatmap exists. Does
276
+ * not touch the built-in study heatmaps (`sunlightHours` /
277
+ * `illuminance`) — they have their own `reset`.
278
+ *
279
+ * @returns `true` when at least one overlay was cleared, `false` when
280
+ * none existed.
132
281
  * @throws When plugin writes are disabled.
133
282
  *
134
283
  * @examplePrompt Clear my custom heatmap
@@ -163,6 +312,132 @@ export declare abstract class PluginAnalysisHeatmapsApi {
163
312
  */
164
313
  abstract isActive(): PluginApiReturn<boolean>;
165
314
  }
315
+ /**
316
+ * Heatmap overlay management — the named overlays created by the
317
+ * `analysis.heatmaps` render calls.
318
+ *
319
+ * Every render call registers (or replaces) an overlay under
320
+ * `options.name` — a shared default overlay when omitted. Overlays are
321
+ * in-session only: never persisted, never saved with views, and **all**
322
+ * of them are cleared together when a scene-mutating edit invalidates
323
+ * them. At most 16 overlays can be registered at once, and **exactly one
324
+ * overlay is visible at a time** — showing one hides the others, and the
325
+ * legend always describes the visible overlay.
326
+ *
327
+ * Accessed via `snaptrude.analysis.heatmaps.overlays`.
328
+ */
329
+ export declare abstract class PluginAnalysisHeatmapOverlaysApi {
330
+ constructor();
331
+ /**
332
+ * List the registered heatmap overlays.
333
+ *
334
+ * Returns every overlay's `name`, `kind` (which render call produced
335
+ * it: `"spaces"`, `"grid"`, `"surfaceGrid"` or `"field"`) and whether it is the
336
+ * currently visible one. At most one overlay has `visible: true`.
337
+ *
338
+ * @returns A {@linkcode PluginAnalysisHeatmapOverlaysListResult} —
339
+ * `{ overlays: [{ name, visible, kind }] }`, empty when nothing is
340
+ * registered.
341
+ *
342
+ * @examplePrompt Which heatmap overlays do I have?
343
+ * @examplePrompt List my rendered analysis overlays
344
+ * @examplePrompt Check which heatmap is currently visible
345
+ *
346
+ * # Example
347
+ * ```ts
348
+ * const { overlays } = await snaptrude.analysis.heatmaps.overlays.list()
349
+ * const visible = overlays.find((o) => o.visible)
350
+ * ```
351
+ */
352
+ abstract list(): PluginApiReturn<PluginAnalysisHeatmapOverlaysListResult>;
353
+ /**
354
+ * Make a registered overlay the visible one.
355
+ *
356
+ * Enables the named overlay's meshes, hides whichever overlay was
357
+ * visible before, and swaps the legend to the shown overlay's. A no-op
358
+ * returning `false` when no overlay of that name exists.
359
+ *
360
+ * @param name - The overlay's name (`options.name` at render time).
361
+ * @returns `true` when the overlay is now visible, `false` when no
362
+ * overlay of that name exists.
363
+ * @throws When plugin writes are disabled.
364
+ *
365
+ * @examplePrompt Switch back to my wind heatmap
366
+ * @examplePrompt Show the occupancy overlay
367
+ * @examplePrompt Flip between my two analysis overlays
368
+ *
369
+ * # Example
370
+ * ```ts
371
+ * await snaptrude.analysis.heatmaps.overlays.show("wind")
372
+ * ```
373
+ */
374
+ abstract show(name: string): PluginApiReturn<boolean>;
375
+ /**
376
+ * Hide an overlay without removing it.
377
+ *
378
+ * Disables the named overlay's meshes; when it was the visible one its
379
+ * legend closes too (nothing visible → no legend). The overlay stays
380
+ * registered and can be brought back with
381
+ * {@linkcode PluginAnalysisHeatmapOverlaysApi.show}. A no-op returning
382
+ * `false` when no overlay of that name exists.
383
+ *
384
+ * @param name - The overlay's name (`options.name` at render time).
385
+ * @returns `true` when the overlay exists (and is now hidden), `false`
386
+ * when no overlay of that name exists.
387
+ * @throws When plugin writes are disabled.
388
+ *
389
+ * @examplePrompt Hide the wind overlay but keep it around
390
+ * @examplePrompt Temporarily hide my heatmap
391
+ * @examplePrompt Turn off the occupancy colours without deleting them
392
+ *
393
+ * # Example
394
+ * ```ts
395
+ * await snaptrude.analysis.heatmaps.overlays.hide("wind")
396
+ * ```
397
+ */
398
+ abstract hide(name: string): PluginApiReturn<boolean>;
399
+ /**
400
+ * Remove an overlay — dispose its meshes and forget it.
401
+ *
402
+ * Frees the overlay's slot toward the 16-overlay cap; when it was the
403
+ * visible one its legend closes. A no-op returning `false` when no
404
+ * overlay of that name exists.
405
+ *
406
+ * @param name - The overlay's name (`options.name` at render time).
407
+ * @returns `true` when the overlay was removed, `false` when no overlay
408
+ * of that name exists.
409
+ * @throws When plugin writes are disabled.
410
+ *
411
+ * @examplePrompt Delete the wind overlay
412
+ * @examplePrompt Remove my occupancy heatmap for good
413
+ * @examplePrompt Free up an overlay slot
414
+ *
415
+ * # Example
416
+ * ```ts
417
+ * await snaptrude.analysis.heatmaps.overlays.remove("wind")
418
+ * ```
419
+ */
420
+ abstract remove(name: string): PluginApiReturn<boolean>;
421
+ /**
422
+ * Remove every registered overlay and close the legend.
423
+ *
424
+ * The bulk form of {@linkcode PluginAnalysisHeatmapOverlaysApi.remove};
425
+ * `analysis.heatmaps.reset()` is this call under its historical name.
426
+ *
427
+ * @returns The number of overlays removed (`0` when none existed).
428
+ * @throws When plugin writes are disabled.
429
+ *
430
+ * @examplePrompt Clear all my heatmap overlays
431
+ * @examplePrompt Remove every analysis overlay from the scene
432
+ * @examplePrompt Start over with a clean set of overlays
433
+ *
434
+ * # Example
435
+ * ```ts
436
+ * const removed = await snaptrude.analysis.heatmaps.overlays.removeAll()
437
+ * ```
438
+ */
439
+ abstract removeAll(): PluginApiReturn<number>;
440
+ }
166
441
  /**
167
442
  * One space's entry in {@linkcode PluginAnalysisHeatmapsApi.renderSpaces}.
168
443
  *
@@ -183,6 +458,7 @@ export type PluginAnalysisHeatmapSpaceEntry = z.infer<typeof PluginAnalysisHeatm
183
458
  * |---|---|---|
184
459
  * | `position` | `{ x, y, z }` | Cell centre in **world coordinates** (y is up) |
185
460
  * | `value` | `number` | The scalar value mapped to a colour |
461
+ * | `meta` | `unknown \| undefined` | Optional payload stored with the overlay — shown in the hover tooltip when `options.hover` is on |
186
462
  */
187
463
  export declare const PluginAnalysisHeatmapGridCell: z.ZodObject<{
188
464
  position: z.ZodObject<{
@@ -191,8 +467,93 @@ export declare const PluginAnalysisHeatmapGridCell: z.ZodObject<{
191
467
  z: z.ZodNumber;
192
468
  }, z.core.$strip>;
193
469
  value: z.ZodNumber;
470
+ meta: z.ZodOptional<z.ZodUnknown>;
194
471
  }, z.core.$strip>;
195
472
  export type PluginAnalysisHeatmapGridCell = z.infer<typeof PluginAnalysisHeatmapGridCell>;
473
+ /**
474
+ * One cell in {@linkcode PluginAnalysisHeatmapsApi.renderField} — either a
475
+ * planar polygon ring the host triangulates, or a pre-tessellated triangle
476
+ * mesh. All coordinates are **world coordinates** (y up).
477
+ *
478
+ * Polygon form:
479
+ *
480
+ * | Property | Type | Description |
481
+ * |---|---|---|
482
+ * | `polygon` | `{ x, y, z }[]` | Planar ring of 3+ points (any orientation; no self-intersections) |
483
+ * | `value` | `number` | The scalar value mapped to a colour |
484
+ * | `meta` | `unknown \| undefined` | Optional payload stored with the overlay |
485
+ *
486
+ * Pre-tessellated form:
487
+ *
488
+ * | Property | Type | Description |
489
+ * |---|---|---|
490
+ * | `vertices` | `{ x, y, z }[]` | Mesh vertices (3+) |
491
+ * | `indices` | `number[]` | Triangle list into `vertices` — length a multiple of 3, every index in range |
492
+ * | `value` | `number` | The scalar value mapped to a colour |
493
+ * | `meta` | `unknown \| undefined` | Optional payload stored with the overlay |
494
+ */
495
+ export declare const PluginAnalysisHeatmapFieldCell: z.ZodUnion<readonly [z.ZodObject<{
496
+ polygon: z.ZodArray<z.ZodObject<{
497
+ x: z.ZodNumber;
498
+ y: z.ZodNumber;
499
+ z: z.ZodNumber;
500
+ }, z.core.$strip>>;
501
+ value: z.ZodNumber;
502
+ meta: z.ZodOptional<z.ZodUnknown>;
503
+ }, z.core.$strip>, z.ZodObject<{
504
+ vertices: z.ZodArray<z.ZodObject<{
505
+ x: z.ZodNumber;
506
+ y: z.ZodNumber;
507
+ z: z.ZodNumber;
508
+ }, z.core.$strip>>;
509
+ indices: z.ZodArray<z.ZodNumber>;
510
+ value: z.ZodNumber;
511
+ meta: z.ZodOptional<z.ZodUnknown>;
512
+ }, z.core.$strip>]>;
513
+ export type PluginAnalysisHeatmapFieldCell = z.infer<typeof PluginAnalysisHeatmapFieldCell>;
514
+ /**
515
+ * The colour scale for a heatmap render — how values become colours and how
516
+ * the legend reads. Three kinds (discriminated by `type`):
517
+ *
518
+ * - **`bands`** — the default: the colour ramp quantised into `count`
519
+ * discrete bands (2–64, default 11). The rendered mesh and legend always
520
+ * use discrete bands; "continuous" is simply a high `count`.
521
+ * - **`threshold`** — binary pass/fail at a cut-off `threshold`: values
522
+ * `>= threshold` get `passColor`, the rest `failColor`; the legend shows
523
+ * the two labelled swatches.
524
+ * - **`categorical`** — exact-match classes: every cell value must equal
525
+ * one class's `value` (anything else is a validation error); the legend
526
+ * shows one labelled swatch per class.
527
+ *
528
+ * | Kind | Property | Type | Description |
529
+ * |---|---|---|---|
530
+ * | `bands` | `count` | `number \| undefined` | Number of discrete bands, 2–64 (default 11) |
531
+ * | `threshold` | `threshold` | `number` | Values `>= threshold` pass |
532
+ * | `threshold` | `passColor` | `string \| undefined` | Hex colour for passing values (host default green) |
533
+ * | `threshold` | `failColor` | `string \| undefined` | Hex colour for failing values (host default red) |
534
+ * | `threshold` | `passLabel` | `string \| undefined` | Legend label for the pass swatch (default `≥ threshold`) |
535
+ * | `threshold` | `failLabel` | `string \| undefined` | Legend label for the fail swatch (default `< threshold`) |
536
+ * | `categorical` | `classes` | `{ value, label, color }[]` | Exact-match classes: scalar `value`, legend `label`, hex `color` |
537
+ */
538
+ export declare const PluginAnalysisHeatmapScale: z.ZodDiscriminatedUnion<[z.ZodObject<{
539
+ type: z.ZodLiteral<"bands">;
540
+ count: z.ZodOptional<z.ZodNumber>;
541
+ }, z.core.$strip>, z.ZodObject<{
542
+ type: z.ZodLiteral<"threshold">;
543
+ threshold: z.ZodNumber;
544
+ passColor: z.ZodOptional<z.ZodString>;
545
+ failColor: z.ZodOptional<z.ZodString>;
546
+ passLabel: z.ZodOptional<z.ZodString>;
547
+ failLabel: z.ZodOptional<z.ZodString>;
548
+ }, z.core.$strip>, z.ZodObject<{
549
+ type: z.ZodLiteral<"categorical">;
550
+ classes: z.ZodArray<z.ZodObject<{
551
+ value: z.ZodNumber;
552
+ label: z.ZodString;
553
+ color: z.ZodString;
554
+ }, z.core.$strip>>;
555
+ }, z.core.$strip>], "type">;
556
+ export type PluginAnalysisHeatmapScale = z.infer<typeof PluginAnalysisHeatmapScale>;
196
557
  /**
197
558
  * Display options shared by both heatmap render modes.
198
559
  *
@@ -204,18 +565,41 @@ export type PluginAnalysisHeatmapGridCell = z.infer<typeof PluginAnalysisHeatmap
204
565
  *
205
566
  * | Property | Type | Description |
206
567
  * |---|---|---|
568
+ * | `name` | `string \| undefined` | Overlay name to render into (see {@linkcode PluginAnalysisHeatmapOverlaysApi}); a shared default overlay when omitted |
207
569
  * | `title` | `string \| undefined` | Legend title |
208
570
  * | `unit` | `string \| undefined` | Unit label shown on the legend (e.g. `"m/s"`) |
209
571
  * | `min` | `number \| undefined` | Value mapped to the first colour stop; data minimum when omitted |
210
572
  * | `max` | `number \| undefined` | Value mapped to the last colour stop; data maximum when omitted |
211
573
  * | `colors` | `string[] \| undefined` | Ordered 6-digit hex colour stops (e.g. `"#0000ff"`), low → high; host blue → cyan → green → yellow → red default |
574
+ * | `scale` | {@linkcode PluginAnalysisHeatmapScale}` \| undefined` | Colour scale: discrete `bands` (count 2–64, default 11), binary `threshold`, or exact-match `categorical` |
575
+ * | `hover` | `boolean \| undefined` | Show a tooltip with the hovered cell's `value` (+ its `meta`, when given) while this overlay is visible. Default `false` |
212
576
  */
213
577
  export declare const PluginAnalysisHeatmapOptions: z.ZodObject<{
578
+ name: z.ZodOptional<z.ZodString>;
214
579
  title: z.ZodOptional<z.ZodString>;
215
580
  unit: z.ZodOptional<z.ZodString>;
216
581
  min: z.ZodOptional<z.ZodNumber>;
217
582
  max: z.ZodOptional<z.ZodNumber>;
218
583
  colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
584
+ scale: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
585
+ type: z.ZodLiteral<"bands">;
586
+ count: z.ZodOptional<z.ZodNumber>;
587
+ }, z.core.$strip>, z.ZodObject<{
588
+ type: z.ZodLiteral<"threshold">;
589
+ threshold: z.ZodNumber;
590
+ passColor: z.ZodOptional<z.ZodString>;
591
+ failColor: z.ZodOptional<z.ZodString>;
592
+ passLabel: z.ZodOptional<z.ZodString>;
593
+ failLabel: z.ZodOptional<z.ZodString>;
594
+ }, z.core.$strip>, z.ZodObject<{
595
+ type: z.ZodLiteral<"categorical">;
596
+ classes: z.ZodArray<z.ZodObject<{
597
+ value: z.ZodNumber;
598
+ label: z.ZodString;
599
+ color: z.ZodString;
600
+ }, z.core.$strip>>;
601
+ }, z.core.$strip>], "type">>;
602
+ hover: z.ZodOptional<z.ZodBoolean>;
219
603
  }, z.core.$strip>;
220
604
  export type PluginAnalysisHeatmapOptions = z.infer<typeof PluginAnalysisHeatmapOptions>;
221
605
  /**
@@ -231,4 +615,44 @@ export declare const PluginAnalysisHeatmapsRenderResult: z.ZodObject<{
231
615
  success: z.ZodLiteral<true>;
232
616
  }, z.core.$strip>;
233
617
  export type PluginAnalysisHeatmapsRenderResult = z.infer<typeof PluginAnalysisHeatmapsRenderResult>;
618
+ /**
619
+ * One overlay row in {@linkcode PluginAnalysisHeatmapOverlaysApi.list}.
620
+ *
621
+ * | Property | Type | Description |
622
+ * |---|---|---|
623
+ * | `name` | `string` | The overlay's name (`options.name` at render time) |
624
+ * | `visible` | `boolean` | Whether this is the (single) visible overlay |
625
+ * | `kind` | `"spaces" \| "grid" \| "surfaceGrid" \| "field"` | Which render call produced it |
626
+ */
627
+ export declare const PluginAnalysisHeatmapOverlayInfo: z.ZodObject<{
628
+ name: z.ZodString;
629
+ visible: z.ZodBoolean;
630
+ kind: z.ZodEnum<{
631
+ spaces: "spaces";
632
+ grid: "grid";
633
+ surfaceGrid: "surfaceGrid";
634
+ field: "field";
635
+ }>;
636
+ }, z.core.$strip>;
637
+ export type PluginAnalysisHeatmapOverlayInfo = z.infer<typeof PluginAnalysisHeatmapOverlayInfo>;
638
+ /**
639
+ * Result of {@linkcode PluginAnalysisHeatmapOverlaysApi.list}.
640
+ *
641
+ * | Property | Type | Description |
642
+ * |---|---|---|
643
+ * | `overlays` | {@linkcode PluginAnalysisHeatmapOverlayInfo}`[]` | Every registered overlay; at most one has `visible: true` |
644
+ */
645
+ export declare const PluginAnalysisHeatmapOverlaysListResult: z.ZodObject<{
646
+ overlays: z.ZodArray<z.ZodObject<{
647
+ name: z.ZodString;
648
+ visible: z.ZodBoolean;
649
+ kind: z.ZodEnum<{
650
+ spaces: "spaces";
651
+ grid: "grid";
652
+ surfaceGrid: "surfaceGrid";
653
+ field: "field";
654
+ }>;
655
+ }, z.core.$strip>>;
656
+ }, z.core.$strip>;
657
+ export type PluginAnalysisHeatmapOverlaysListResult = z.infer<typeof PluginAnalysisHeatmapOverlaysListResult>;
234
658
  //# sourceMappingURL=heatmaps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"heatmaps.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/heatmaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAkB,MAAM,eAAe,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,YAAY,CAC1B,OAAO,EAAE,+BAA+B,EAAE,EAC1C,OAAO,CAAC,EAAE,4BAA4B,GACrC,eAAe,CAAC,kCAAkC,CAAC;IAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;aACa,UAAU,CACxB,KAAK,EAAE,6BAA6B,EAAE,EACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,4BAA4B,GACrC,eAAe,CAAC,kCAAkC,CAAC;IAEtD;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,KAAK,IAAI,eAAe,CAAC,OAAO,CAAC;IAEjD;;;;;;;;;;;;;;;;;;;OAmBG;aACa,QAAQ,IAAI,eAAe,CAAC,OAAO,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;iBAG1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B;;;;;;;iBAGxC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,6BAA6B,C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A6B,CACrC,CAAA;AAOD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;mBAYzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;2BAyBrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;iBASvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;iBAI3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uCAAuC;;;;;;;;;;;iBAElD,CAAA;AACF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,uCAAuC,CAC/C,CAAA"}
@@ -3,6 +3,9 @@ import { PluginAnalysisShadowsApi } from "./shadows";
3
3
  import { PluginAnalysisSunlightHoursApi } from "./sunlightHours";
4
4
  import { PluginAnalysisIlluminanceApi } from "./illuminance";
5
5
  import { PluginAnalysisHeatmapsApi } from "./heatmaps";
6
+ import { PluginAnalysisWeatherApi } from "./weather";
7
+ import { PluginAnalysisSolarApi } from "./solar";
8
+ import { PluginAnalysisDaylightApi } from "./daylight";
6
9
  /**
7
10
  * Sustainability-analysis APIs.
8
11
  *
@@ -20,6 +23,9 @@ import { PluginAnalysisHeatmapsApi } from "./heatmaps";
20
23
  * - {@linkcode PluginAnalysisApi.sunlightHours} — Direct-sunlight-hours heatmap job (start / poll / cancel / clear)
21
24
  * - {@linkcode PluginAnalysisApi.illuminance} — Daylight-illuminance heatmap job, Pro-gated (start / poll / cancel / clear)
22
25
  * - {@linkcode PluginAnalysisApi.heatmaps} — Render plugin-computed scalar data as a heatmap (per-space / grid)
26
+ * - {@linkcode PluginAnalysisApi.weather} — Read the site's typical-year weather series (numeric, paged)
27
+ * - {@linkcode PluginAnalysisApi.solar} — Sample solar exposure at caller-chosen points (numeric)
28
+ * - {@linkcode PluginAnalysisApi.daylight} — Standards-grade annual daylight metrics (IES LM-83, numeric)
23
29
  *
24
30
  * Accessed via `snaptrude.analysis`.
25
31
  */
@@ -34,6 +40,12 @@ export declare abstract class PluginAnalysisApi {
34
40
  abstract illuminance: PluginAnalysisIlluminanceApi;
35
41
  /** Plugin-supplied scalar-data heatmaps. See {@linkcode PluginAnalysisHeatmapsApi}. */
36
42
  abstract heatmaps: PluginAnalysisHeatmapsApi;
43
+ /** Site typical-year weather series (numeric, paged). See {@linkcode PluginAnalysisWeatherApi}. */
44
+ abstract weather: PluginAnalysisWeatherApi;
45
+ /** Per-point solar exposure sampling (numeric). See {@linkcode PluginAnalysisSolarApi}. */
46
+ abstract solar: PluginAnalysisSolarApi;
47
+ /** IES LM-83 annual daylight metrics (numeric). See {@linkcode PluginAnalysisDaylightApi}. */
48
+ abstract daylight: PluginAnalysisDaylightApi;
37
49
  constructor();
38
50
  }
39
51
  export * from "./sunpath";
@@ -41,4 +53,7 @@ export * from "./shadows";
41
53
  export * from "./sunlightHours";
42
54
  export * from "./illuminance";
43
55
  export * from "./heatmaps";
56
+ export * from "./weather";
57
+ export * from "./solar";
58
+ export * from "./daylight";
44
59
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8BAAsB,iBAAiB;IACrC,oGAAoG;IACpG,SAAgB,OAAO,EAAE,wBAAwB,CAAA;IACjD,uFAAuF;IACvF,SAAgB,OAAO,EAAE,wBAAwB,CAAA;IACjD,yFAAyF;IACzF,SAAgB,aAAa,EAAE,8BAA8B,CAAA;IAC7D,4FAA4F;IAC5F,SAAgB,WAAW,EAAE,4BAA4B,CAAA;IACzD,uFAAuF;IACvF,SAAgB,QAAQ,EAAE,yBAAyB,CAAA;;CAGpD;AAED,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/analysis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,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