@virtualdisplay.io/client 4.0.0-alpha.25 → 4.0.0-alpha.26

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.
@@ -15,76 +15,81 @@ const c = {
15
15
  PRICING: "pricing",
16
16
  QR_SHOWN: "qr_shown",
17
17
  SYNC: "sync",
18
- SELECTABLE: "selectable"
19
- }, tt = {
18
+ SELECTABLE: "selectable",
19
+ APP_RESOLVED: "app_resolved"
20
+ }, ee = {
20
21
  FOCUS: "focus",
21
22
  UNFOCUS: "unfocus"
22
- }, Tt = {
23
+ }, Ie = {
23
24
  FOCUSED: "focused"
24
- }, Rt = {
25
+ }, Le = {
25
26
  /** Behaves exactly like an unpriced combination: no price, no button. */
26
27
  HIDDEN: "hidden"
27
- }, It = new Set(Object.values(c));
28
- function Lt(n) {
28
+ }, Oe = new Set(Object.values(c));
29
+ function Ne(n) {
29
30
  if (typeof n != "object" || n === null)
30
31
  return !1;
31
- const t = n;
32
- return typeof t.target == "string" ? !1 : typeof t.type == "string" && It.has(t.type);
32
+ const e = n;
33
+ return typeof e.target == "string" ? !1 : typeof e.type == "string" && Oe.has(e.type);
33
34
  }
34
- function Ot(n) {
35
- const t = S(n);
36
- return t !== null && t.type === c.HANDSHAKE;
35
+ function Me(n) {
36
+ const e = S(n);
37
+ return e !== null && e.type === c.HANDSHAKE;
37
38
  }
38
- function Nt(n) {
39
- const t = S(n);
40
- return t !== null && t.type === c.SESSION && typeof t.sessionId == "string";
39
+ function ze(n) {
40
+ const e = S(n);
41
+ return e !== null && e.type === c.SESSION && typeof e.sessionId == "string";
41
42
  }
42
- function Mt(n) {
43
- const t = S(n);
44
- return t !== null && t.type === c.MUTATION && Array.isArray(t.results);
43
+ function Pe(n) {
44
+ const e = S(n);
45
+ return e !== null && e.type === c.APP_RESOLVED && typeof e.appType == "string" && e.appType !== "" && typeof e.name == "string";
45
46
  }
46
- function zt(n) {
47
- const t = S(n);
48
- return t !== null && t.type === c.SNAPSHOT && ("data" in t || "error" in t);
47
+ function Fe(n) {
48
+ const e = S(n);
49
+ return e !== null && e.type === c.MUTATION && Array.isArray(e.results);
49
50
  }
50
- function Pt(n) {
51
- const t = S(n);
52
- return t !== null && t.type === c.CAMERA && Array.isArray(t.transforms);
51
+ function $e(n) {
52
+ const e = S(n);
53
+ return e !== null && e.type === c.SNAPSHOT && ("data" in e || "error" in e);
53
54
  }
54
- function Ft(n) {
55
- const t = S(n);
56
- return t !== null && t.type === c.MAPPING && Array.isArray(t.attributes);
55
+ function De(n) {
56
+ const e = S(n);
57
+ return e !== null && e.type === c.CAMERA && Array.isArray(e.transforms);
57
58
  }
58
- function $t(n) {
59
- const t = S(n);
60
- return t !== null && t.type === c.LOADING_INDICATOR && typeof t.progress == "number";
59
+ function Ue(n) {
60
+ const e = S(n);
61
+ return e !== null && e.type === c.MAPPING && Array.isArray(e.attributes);
61
62
  }
62
- function Dt(n) {
63
- const t = S(n);
64
- return t !== null && t.type === c.SYNC && typeof t.connected == "boolean";
63
+ function Be(n) {
64
+ const e = S(n);
65
+ return e !== null && e.type === c.LOADING_INDICATOR && typeof e.progress == "number";
65
66
  }
66
- function Bt(n) {
67
- const t = S(n);
68
- return t !== null && t.type === c.SELECTABLE && Array.isArray(t.attributes);
67
+ function Ve(n) {
68
+ const e = S(n);
69
+ return e !== null && e.type === c.SYNC && typeof e.connected == "boolean";
69
70
  }
70
- function Ut(n) {
71
- const t = S(n);
72
- return t !== null && t.type === c.CONFIG && typeof t.viewerSettings == "object";
71
+ function je(n) {
72
+ const e = S(n);
73
+ return e !== null && e.type === c.SELECTABLE && Array.isArray(e.attributes);
73
74
  }
74
- function Vt(n) {
75
- const t = S(n);
76
- return t !== null && t.type === c.FOCUS && typeof t.state == "string";
75
+ function He(n) {
76
+ const e = S(n);
77
+ return e !== null && e.type === c.CONFIG && typeof e.viewerSettings == "object";
77
78
  }
78
- function jt(n) {
79
- const t = S(n);
80
- return t !== null && t.type === c.PRICING && typeof t.pricing == "object" && t.pricing !== null;
79
+ function qe(n) {
80
+ const e = S(n);
81
+ return e !== null && e.type === c.FOCUS && typeof e.state == "string";
82
+ }
83
+ function Ge(n) {
84
+ const e = S(n);
85
+ return e !== null && e.type === c.PRICING && typeof e.pricing == "object" && e.pricing !== null;
81
86
  }
82
87
  function S(n) {
83
88
  return typeof n != "object" || n === null ? null : n;
84
89
  }
85
- class et {
86
- constructor(t) {
87
- this.processor = t;
90
+ class te {
91
+ constructor(e) {
92
+ this.processor = e;
88
93
  }
89
94
  processor;
90
95
  pending = [];
@@ -92,12 +97,12 @@ class et {
92
97
  /**
93
98
  * Add a message — processed immediately if ready, queued otherwise
94
99
  */
95
- enqueue(t) {
100
+ enqueue(e) {
96
101
  if (this.isReady) {
97
- this.processor(t);
102
+ this.processor(e);
98
103
  return;
99
104
  }
100
- this.pending.push(t);
105
+ this.pending.push(e);
101
106
  }
102
107
  /**
103
108
  * Mark as ready and flush all pending messages
@@ -105,10 +110,10 @@ class et {
105
110
  markReady() {
106
111
  if (this.isReady || (this.isReady = !0, this.pending.length === 0))
107
112
  return;
108
- const t = [...this.pending];
113
+ const e = [...this.pending];
109
114
  this.pending.length = 0;
110
- for (const e of t)
111
- this.processor(e);
115
+ for (const t of e)
116
+ this.processor(t);
112
117
  }
113
118
  get ready() {
114
119
  return this.isReady;
@@ -119,8 +124,8 @@ class et {
119
124
  /**
120
125
  * Check if a message of a specific type is pending
121
126
  */
122
- hasPending(t) {
123
- return this.pending.some((e) => e.type === t);
127
+ hasPending(e) {
128
+ return this.pending.some((t) => t.type === e);
124
129
  }
125
130
  /**
126
131
  * Clear all pending messages
@@ -129,9 +134,9 @@ class et {
129
134
  this.pending.length = 0;
130
135
  }
131
136
  }
132
- class Ht {
133
- constructor(t, e) {
134
- this.getTarget = t, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = e?.isValid ?? Lt, this.publisher = new et((i) => this.post(i)), this.consumer = new et((i) => this.routeToHandler(i)), e?.bufferIncoming !== !0 && this.consumer.markReady();
137
+ class Ze {
138
+ constructor(e, t) {
139
+ this.getTarget = e, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = t?.isValid ?? Ne, this.publisher = new te((i) => this.post(i)), this.consumer = new te((i) => this.routeToHandler(i)), t?.bufferIncoming !== !0 && this.consumer.markReady();
135
140
  }
136
141
  getTarget;
137
142
  handlers = /* @__PURE__ */ new Map();
@@ -144,22 +149,22 @@ class Ht {
144
149
  /**
145
150
  * Register a handler for a specific message type
146
151
  */
147
- on(t, e) {
148
- this.handlers.set(t, e);
152
+ on(e, t) {
153
+ this.handlers.set(e, t);
149
154
  }
150
155
  /**
151
156
  * Update the target origin for outgoing postMessage calls.
152
157
  * Use when the target origin is discovered at runtime (e.g. from the first incoming message).
153
158
  */
154
- setTargetOrigin(t) {
155
- this.targetOrigin = t;
159
+ setTargetOrigin(e) {
160
+ this.targetOrigin = e;
156
161
  }
157
162
  /**
158
163
  * Send a message to the target window
159
164
  * Queued until markReady() is called
160
165
  */
161
- send(t) {
162
- this.publisher.enqueue(t);
166
+ send(e) {
167
+ this.publisher.enqueue(e);
163
168
  }
164
169
  /**
165
170
  * Feed a message through the same routing path as one that just arrived via
@@ -170,8 +175,8 @@ class Ht {
170
175
  * viewer engine's SSE-sourced live sync channel, ar-session-handoff) and
171
176
  * needs them to land exactly where a postMessage would.
172
177
  */
173
- receive(t) {
174
- this.isValid(t) && this.consumer.enqueue(t);
178
+ receive(e) {
179
+ this.isValid(e) && this.consumer.enqueue(e);
175
180
  }
176
181
  /**
177
182
  * Enable sending and flush queued outgoing messages
@@ -189,22 +194,22 @@ class Ht {
189
194
  /**
190
195
  * Check if an incoming message of a specific type is pending in the consumer buffer
191
196
  */
192
- consumerHasPending(t) {
193
- return this.consumer.hasPending(t);
197
+ consumerHasPending(e) {
198
+ return this.consumer.hasPending(e);
194
199
  }
195
200
  /**
196
201
  * Start listening for incoming messages
197
202
  */
198
203
  start() {
199
- this.listener === null && (this.listener = (t) => {
200
- const { data: e } = t;
201
- if (!this.isValid(e) || e._source === this.sourceId)
204
+ this.listener === null && (this.listener = (e) => {
205
+ const { data: t } = e;
206
+ if (!this.isValid(t) || t._source === this.sourceId)
202
207
  return;
203
208
  const i = this.getTarget();
204
- if (i !== null && t.source !== null && t.source !== i)
209
+ if (i !== null && e.source !== null && e.source !== i)
205
210
  return;
206
- const o = e;
207
- this.consumer.enqueue(o);
211
+ const s = t;
212
+ this.consumer.enqueue(s);
208
213
  }, window.addEventListener("message", this.listener));
209
214
  }
210
215
  /**
@@ -225,36 +230,36 @@ class Ht {
225
230
  get pendingCount() {
226
231
  return this.publisher.pendingCount;
227
232
  }
228
- post(t) {
229
- const e = this.getTarget();
230
- e !== null && e.postMessage({ ...t, _source: this.sourceId }, this.targetOrigin);
233
+ post(e) {
234
+ const t = this.getTarget();
235
+ t !== null && t.postMessage({ ...e, _source: this.sourceId }, this.targetOrigin);
231
236
  }
232
- routeToHandler(t) {
233
- const e = this.handlers.get(t.type);
234
- if (e === void 0)
237
+ routeToHandler(e) {
238
+ const t = this.handlers.get(e.type);
239
+ if (t === void 0)
235
240
  return;
236
- const i = e(t);
237
- i instanceof Promise && i.catch((o) => {
238
- const s = o instanceof Error ? o.message : String(o);
239
- console.error(`Virtualdisplay: error handling ${t.type}: ${s}`);
241
+ const i = t(e);
242
+ i instanceof Promise && i.catch((s) => {
243
+ const o = s instanceof Error ? s.message : String(s);
244
+ console.error(`Virtualdisplay: error handling ${e.type}: ${o}`);
240
245
  });
241
246
  }
242
247
  }
243
- class qt {
244
- constructor(t) {
245
- this.send = t;
248
+ class We {
249
+ constructor(e) {
250
+ this.send = e;
246
251
  }
247
252
  send;
248
- setEnabled(t) {
253
+ setEnabled(e) {
249
254
  this.send({
250
255
  type: c.ANNOTATION_TOGGLE,
251
- enabled: t
256
+ enabled: e
252
257
  });
253
258
  }
254
259
  }
255
- class Gt {
256
- constructor(t, e) {
257
- this.value = t, this.attribute = e;
260
+ class Ye {
261
+ constructor(e, t) {
262
+ this.value = e, this.attribute = t;
258
263
  }
259
264
  value;
260
265
  attribute;
@@ -262,8 +267,8 @@ class Gt {
262
267
  get isSelected() {
263
268
  return this.isSelectedValue;
264
269
  }
265
- setSelected(t) {
266
- this.isSelectedValue = t;
270
+ setSelected(e) {
271
+ this.isSelectedValue = e;
267
272
  }
268
273
  }
269
274
  const A = {
@@ -274,286 +279,286 @@ const A = {
274
279
  INVALID_PARAMETER: "INVALID_PARAMETER",
275
280
  SNAPSHOT_FAILED: "SNAPSHOT_FAILED"
276
281
  };
277
- class f extends Error {
282
+ class g extends Error {
278
283
  code;
279
- constructor(t, e) {
280
- super(t), this.name = "VirtualdisplayError", this.code = e;
284
+ constructor(e, t) {
285
+ super(e), this.name = "VirtualdisplayError", this.code = t;
281
286
  }
282
- static valueNotFound(t, e) {
283
- return new f(
284
- `Value "${e}" not found for attribute "${t}"`,
287
+ static valueNotFound(e, t) {
288
+ return new g(
289
+ `Value "${t}" not found for attribute "${e}"`,
285
290
  A.VALUE_NOT_FOUND
286
291
  );
287
292
  }
288
- static parentNotFound(t) {
289
- return new f(
290
- `Parent element not found: ${t}`,
293
+ static parentNotFound(e) {
294
+ return new g(
295
+ `Parent element not found: ${e}`,
291
296
  A.PARENT_NOT_FOUND
292
297
  );
293
298
  }
294
- static invalidParameter(t) {
295
- return new f(t, A.INVALID_PARAMETER);
299
+ static invalidParameter(e) {
300
+ return new g(e, A.INVALID_PARAMETER);
296
301
  }
297
302
  }
298
- class Zt {
303
+ class Qe {
299
304
  name;
300
305
  defaultValue;
301
306
  values;
302
307
  onSelect;
303
308
  onChangeCallback;
304
- constructor(t) {
305
- this.name = t.name, this.defaultValue = t.defaultValue, this.onSelect = t.onSelect, this.values = this.createValues(t.values);
309
+ constructor(e) {
310
+ this.name = e.name, this.defaultValue = e.defaultValue, this.onSelect = e.onSelect, this.values = this.createValues(e.values);
306
311
  }
307
312
  /**
308
313
  * Select a value for this attribute
309
314
  * @throws {VirtualdisplayError} When value not found
310
315
  */
311
- select(t) {
312
- if (!this.values.has(t))
313
- throw f.valueNotFound(this.name, t);
314
- this.onSelect(this.name, t);
316
+ select(e) {
317
+ if (!this.values.has(e))
318
+ throw g.valueNotFound(this.name, e);
319
+ this.onSelect(this.name, e);
315
320
  }
316
321
  getValues() {
317
322
  return Array.from(this.values.values());
318
323
  }
319
- getValue(t) {
320
- return this.values.get(t);
324
+ getValue(e) {
325
+ return this.values.get(e);
321
326
  }
322
327
  /** The currently selected value, or undefined before any selection lands. */
323
328
  get selected() {
324
- for (const t of this.values.values())
325
- if (t.isSelected)
326
- return t.value;
329
+ for (const e of this.values.values())
330
+ if (e.isSelected)
331
+ return e.value;
327
332
  }
328
333
  /**
329
334
  * Register callback that fires when selection changes
330
335
  * Receives the newly selected AttributeValue
331
336
  */
332
- onChange(t) {
333
- this.onChangeCallback = t;
337
+ onChange(e) {
338
+ this.onChangeCallback = e;
334
339
  }
335
340
  /**
336
341
  * Update selection state from server mutation result
337
342
  * Direct value comparison - no source/target translation
338
343
  */
339
- handleResult(t) {
340
- let e;
344
+ handleResult(e) {
345
+ let t;
341
346
  for (const i of this.values.values()) {
342
- const o = i.value === t;
343
- i.setSelected(o), o && (e = i);
347
+ const s = i.value === e;
348
+ i.setSelected(s), s && (t = i);
344
349
  }
345
- e !== void 0 && this.onChangeCallback !== void 0 && this.onChangeCallback(e);
350
+ t !== void 0 && this.onChangeCallback !== void 0 && this.onChangeCallback(t);
346
351
  }
347
- createValues(t) {
348
- const e = /* @__PURE__ */ new Map();
349
- for (const i of t) {
350
- const o = new Gt(i, this.name);
351
- i === this.defaultValue && o.setSelected(!0), e.set(i, o);
352
+ createValues(e) {
353
+ const t = /* @__PURE__ */ new Map();
354
+ for (const i of e) {
355
+ const s = new Ye(i, this.name);
356
+ i === this.defaultValue && s.setSelected(!0), t.set(i, s);
352
357
  }
353
- return e;
358
+ return t;
354
359
  }
355
360
  }
356
- class Wt {
361
+ class Ke {
357
362
  attributes = /* @__PURE__ */ new Map();
358
- constructor(t, e, i) {
359
- for (const o of t) {
360
- const s = this.buildOptions(o, e);
361
- this.attributes.set(o.name, new Zt(s));
363
+ constructor(e, t, i) {
364
+ for (const s of e) {
365
+ const o = this.buildOptions(s, t);
366
+ this.attributes.set(s.name, new Qe(o));
362
367
  }
363
368
  this.onMutationFailed = i;
364
369
  }
365
370
  onMutationFailed;
366
- get(t) {
367
- return this.attributes.get(t);
371
+ get(e) {
372
+ return this.attributes.get(e);
368
373
  }
369
374
  /** The current selection as attribute name→value pairs, skipping unset attributes. */
370
375
  getSelection() {
371
- const t = {};
372
- for (const [e, i] of this.attributes) {
373
- const o = i.selected;
374
- o !== void 0 && (t[e] = o);
376
+ const e = {};
377
+ for (const [t, i] of this.attributes) {
378
+ const s = i.selected;
379
+ s !== void 0 && (e[t] = s);
375
380
  }
376
- return t;
381
+ return e;
377
382
  }
378
- handleResults(t) {
379
- for (const e of t) {
380
- if (!e.success) {
381
- this.onMutationFailed?.(e.name, e.value);
383
+ handleResults(e) {
384
+ for (const t of e) {
385
+ if (!t.success) {
386
+ this.onMutationFailed?.(t.name, t.value);
382
387
  continue;
383
388
  }
384
- this.get(e.name)?.handleResult(e.value);
389
+ this.get(t.name)?.handleResult(t.value);
385
390
  }
386
391
  }
387
- buildOptions(t, e) {
392
+ buildOptions(e, t) {
388
393
  const i = {
389
- name: t.name,
390
- values: t.values,
391
- onSelect: (o, s) => {
392
- e([{ name: o, value: s }], !1);
394
+ name: e.name,
395
+ values: e.values,
396
+ onSelect: (s, o) => {
397
+ t([{ name: s, value: o }], !1);
393
398
  }
394
399
  };
395
- return t.defaultValue !== void 0 ? { ...i, defaultValue: t.defaultValue } : i;
400
+ return e.defaultValue !== void 0 ? { ...i, defaultValue: e.defaultValue } : i;
396
401
  }
397
402
  }
398
- const N = 4096, F = 16384, Yt = [1024, 256, 64], Qt = 20, Y = ["timestamp", "level", "msg", "service", "trace_id", "span_id"];
399
- function Kt(n) {
400
- const t = new Date(n.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), e = n.level.toUpperCase().padEnd(5), i = n.trace_id?.slice(0, 8) ?? "--------", o = n.msg, s = Object.entries(n).filter(([r]) => !Y.includes(r)).map(([r, a]) => `${r}=${I(a, N).line}`).join(" ");
401
- return `${t} ${e} [${i}] ${o}${s ? " " + s : ""}`;
403
+ const N = 4096, F = 16384, Xe = [1024, 256, 64], Je = 20, W = ["timestamp", "level", "msg", "service", "trace_id", "span_id"];
404
+ function et(n) {
405
+ const e = new Date(n.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), t = n.level.toUpperCase().padEnd(5), i = n.trace_id?.slice(0, 8) ?? "--------", s = n.msg, o = Object.entries(n).filter(([r]) => !W.includes(r)).map(([r, a]) => `${r}=${L(a, N).line}`).join(" ");
406
+ return `${e} ${t} [${i}] ${s}${o ? " " + o : ""}`;
402
407
  }
403
- function Xt(n) {
404
- for (const o of [N, ...Yt]) {
405
- const { line: s, truncated: r } = I(n, o);
408
+ function tt(n) {
409
+ for (const s of [N, ...Xe]) {
410
+ const { line: o, truncated: r } = L(n, s);
406
411
  if (!r) {
407
- if (s.length <= F)
408
- return s;
412
+ if (o.length <= F)
413
+ return o;
409
414
  continue;
410
415
  }
411
- const { line: a } = I({ ...n, log_truncated: !0 }, o);
416
+ const { line: a } = L({ ...n, log_truncated: !0 }, s);
412
417
  if (a.length <= F)
413
418
  return a;
414
419
  }
415
- const t = Object.keys(n).filter((o) => !Y.includes(o)), e = { ...te(n, Y), log_truncated: !0, log_dropped_count: t.length }, i = I({ ...e, log_dropped_attrs: t.slice(0, Qt) }, N);
416
- return i.line.length <= F ? i.line : I(e, N).line;
420
+ const e = Object.keys(n).filter((s) => !W.includes(s)), t = { ...it(n, W), log_truncated: !0, log_dropped_count: e.length }, i = L({ ...t, log_dropped_attrs: e.slice(0, Je) }, N);
421
+ return i.line.length <= F ? i.line : L(t, N).line;
417
422
  }
418
- function I(n, t) {
419
- const e = [];
423
+ function L(n, e) {
424
+ const t = [];
420
425
  let i = !1;
421
426
  return { line: JSON.stringify(n, function(r, a) {
422
427
  if (typeof a == "string")
423
- return a.length > t && (i = !0), Jt(a, t);
428
+ return a.length > e && (i = !0), nt(a, e);
424
429
  if (typeof a == "bigint")
425
430
  return a.toString();
426
431
  if (typeof a != "object" || a === null)
427
432
  return a;
428
- for (; e.length > 0 && e.at(-1) !== this; )
429
- e.pop();
430
- return e.includes(a) ? "[Circular]" : (e.push(a), a);
433
+ for (; t.length > 0 && t.at(-1) !== this; )
434
+ t.pop();
435
+ return t.includes(a) ? "[Circular]" : (t.push(a), a);
431
436
  }), truncated: i };
432
437
  }
433
- function Jt(n, t) {
434
- return n.length <= t ? n : `${n.slice(0, t)}...[truncated ${n.length - t} chars]`;
438
+ function nt(n, e) {
439
+ return n.length <= e ? n : `${n.slice(0, e)}...[truncated ${n.length - e} chars]`;
435
440
  }
436
- function te(n, t) {
437
- const e = {};
438
- for (const i of t)
439
- n[i] !== void 0 && (e[i] = n[i]);
440
- return e;
441
+ function it(n, e) {
442
+ const t = {};
443
+ for (const i of e)
444
+ n[i] !== void 0 && (t[i] = n[i]);
445
+ return t;
441
446
  }
442
- function ee(n, t) {
443
- const e = t ? Kt(n) : Xt(n);
444
- n.level === "error" ? console.error(e) : n.level === "warn" ? console.warn(e) : console.log(e);
447
+ function st(n, e) {
448
+ const t = e ? et(n) : tt(n);
449
+ n.level === "error" ? console.error(t) : n.level === "warn" ? console.warn(t) : console.log(t);
445
450
  }
446
- function mt(n, t = 0) {
447
- const e = {
451
+ function pe(n, e = 0) {
452
+ const t = {
448
453
  name: n.name,
449
454
  message: n.message
450
455
  };
451
- n.stack !== void 0 && (e.stack = n.stack);
456
+ n.stack !== void 0 && (t.stack = n.stack);
452
457
  for (const i of Object.getOwnPropertyNames(n)) {
453
458
  if (i === "name" || i === "message" || i === "stack" || i === "cause")
454
459
  continue;
455
- const o = n[i];
456
- o !== void 0 && (e[i] = o);
460
+ const s = n[i];
461
+ s !== void 0 && (t[i] = s);
457
462
  }
458
- return n.cause !== void 0 && n.cause !== null && (e.cause = n.cause instanceof Error && t < 5 ? mt(n.cause, t + 1) : String(n.cause)), e;
463
+ return n.cause !== void 0 && n.cause !== null && (t.cause = n.cause instanceof Error && e < 5 ? pe(n.cause, e + 1) : String(n.cause)), t;
459
464
  }
460
- function ne(n) {
461
- const t = {};
462
- for (const [e, i] of Object.entries(n))
463
- t[e] = i instanceof Error ? mt(i) : i;
464
- return t;
465
+ function ot(n) {
466
+ const e = {};
467
+ for (const [t, i] of Object.entries(n))
468
+ e[t] = i instanceof Error ? pe(i) : i;
469
+ return e;
465
470
  }
466
- function ie() {
471
+ function rt() {
467
472
  return /* @__PURE__ */ new Date();
468
473
  }
469
- function oe(n) {
474
+ function at(n) {
470
475
  return n.toISOString();
471
476
  }
472
- function pt() {
477
+ function fe() {
473
478
  return typeof navigator > "u" ? "" : navigator.userAgent;
474
479
  }
475
- function se() {
480
+ function lt() {
476
481
  return typeof navigator > "u" ? !1 : navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
477
482
  }
478
- function re() {
479
- return /iPhone|iPad|iPod/i.test(pt()) || se();
483
+ function ct() {
484
+ return /iPhone|iPad|iPod/i.test(fe()) || lt();
480
485
  }
481
- function ae() {
482
- return /Android/i.test(pt());
486
+ function dt() {
487
+ return /Android/i.test(fe());
483
488
  }
484
- function le() {
485
- return re() || ae();
489
+ function ut() {
490
+ return ct() || dt();
486
491
  }
487
- class ce {
488
- constructor(t) {
489
- this.config = t;
492
+ class ht {
493
+ constructor(e) {
494
+ this.config = e;
490
495
  }
491
496
  config;
492
497
  /**
493
498
  * Log at specified level with optional attributes.
494
499
  */
495
- log(t, e, i = {}) {
496
- const o = this.config.traceProvider?.() ?? {}, s = {
497
- timestamp: oe(ie()),
498
- level: t,
499
- msg: e,
500
+ log(e, t, i = {}) {
501
+ const s = this.config.traceProvider?.() ?? {}, o = {
502
+ timestamp: at(rt()),
503
+ level: e,
504
+ msg: t,
500
505
  service: this.config.service,
501
- ...o,
502
- ...ne(i)
506
+ ...s,
507
+ ...ot(i)
503
508
  };
504
- ee(s, this.config.isDev);
509
+ st(o, this.config.isDev);
505
510
  }
506
511
  /**
507
512
  * Log at DEBUG level (development only).
508
513
  */
509
- debug(t, e) {
510
- this.config.isDev && this.log("debug", t, e);
514
+ debug(e, t) {
515
+ this.config.isDev && this.log("debug", e, t);
511
516
  }
512
517
  /**
513
518
  * Log at INFO level.
514
519
  */
515
- info(t, e) {
516
- this.log("info", t, e);
520
+ info(e, t) {
521
+ this.log("info", e, t);
517
522
  }
518
523
  /**
519
524
  * Log at WARN level.
520
525
  */
521
- warn(t, e) {
522
- this.log("warn", t, e);
526
+ warn(e, t) {
527
+ this.log("warn", e, t);
523
528
  }
524
529
  /**
525
530
  * Log at ERROR level.
526
531
  */
527
- error(t, e) {
528
- this.log("error", t, e);
532
+ error(e, t) {
533
+ this.log("error", e, t);
529
534
  }
530
535
  }
531
- function ft(n, t) {
532
- const e = t?.isDev !== void 0 ? t.isDev : typeof process < "u" ? process.env.NODE_ENV !== "production" : !0;
533
- return new ce({ service: n, isDev: e, traceProvider: t?.traceProvider });
536
+ function ge(n, e) {
537
+ const t = e?.isDev !== void 0 ? e.isDev : typeof process < "u" ? process.env.NODE_ENV !== "production" : !0;
538
+ return new ht({ service: n, isDev: t, traceProvider: e?.traceProvider });
534
539
  }
535
540
  function O(n) {
536
541
  if (n !== void 0)
537
542
  return typeof n == "object" && n !== null && !Array.isArray(n) && !(n instanceof Error) ? n : n instanceof Error ? { error: n.message } : { value: n };
538
543
  }
539
- function gt(n) {
544
+ function be(n) {
540
545
  return {
541
- debug: (t, e) => n.debug(t, O(e)),
542
- info: (t, e) => n.info(t, O(e)),
543
- warn: (t, e) => n.warn(t, O(e)),
544
- error: (t, e) => n.error(t, O(e))
546
+ debug: (e, t) => n.debug(e, O(t)),
547
+ info: (e, t) => n.info(e, O(t)),
548
+ warn: (e, t) => n.warn(e, O(t)),
549
+ error: (e, t) => n.error(e, O(t))
545
550
  };
546
551
  }
547
- let bt = !1, _ = gt(ft("client", { isDev: !1 }));
548
- function de() {
549
- bt = !0, _ = gt(ft("client", { isDev: !0 }));
552
+ let ve = !1, C = be(ge("client", { isDev: !1 }));
553
+ function mt() {
554
+ ve = !0, C = be(ge("client", { isDev: !0 }));
550
555
  }
551
- function uo() {
552
- return bt;
556
+ function vs() {
557
+ return ve;
553
558
  }
554
- class ue {
555
- constructor(t, e) {
556
- this.send = t, this.onMutationFailed = e;
559
+ class pt {
560
+ constructor(e, t) {
561
+ this.send = e, this.onMutationFailed = t;
557
562
  }
558
563
  send;
559
564
  onMutationFailed;
@@ -562,50 +567,61 @@ class ue {
562
567
  /**
563
568
  * Handle incoming MAPPING message from server
564
569
  */
565
- handleMappingReceived(t) {
566
- _.debug("Initializing from server mapping", {
567
- attributeCount: t.attributes.length
568
- }), this.registry = new Wt(
569
- t.attributes,
570
- (e, i) => this.sendMutation(e, i),
570
+ handleMappingReceived(e) {
571
+ C.debug("Initializing from server mapping", {
572
+ attributeCount: e.attributes.length
573
+ }), this.registry = new Ke(
574
+ e.attributes,
575
+ (t, i) => this.sendMutation(t, i),
571
576
  this.onMutationFailed
572
577
  ), this.replayPendingCallbacks();
573
578
  }
574
- handleMutationResult(t) {
575
- this.registry?.handleResults(t.results);
579
+ handleMutationResult(e) {
580
+ this.registry?.handleResults(e.results);
576
581
  }
577
582
  /**
578
583
  * Select a value for an attribute - sends mutation to server.
579
584
  * Can be called before the mapping arrives — the mutation is sent immediately
580
585
  * and the messenger's publisher queue holds it until the iframe is ready.
581
586
  */
582
- select(t, e) {
583
- this.sendMutation([{ name: t, value: e }], !1);
587
+ select(e, t) {
588
+ this.sendMutation([{ name: e, value: t }], !1);
589
+ }
590
+ /**
591
+ * A drag's intermediate step (parametric dimensions): the viewer applies it
592
+ * so the model follows the hand, but it is never recorded as a choice; the
593
+ * settling `select()` is the one tracked value. Used by the measurement
594
+ * slider per step crossed. Deliberately not delegated on the public client:
595
+ * `select()` staying the whole choice API is the spec's own evidence the
596
+ * shape is right, and no integrator has asked for live-follow yet.
597
+ */
598
+ selectTransient(e, t) {
599
+ this.sendMutation([{ name: e, value: t }], !1, !0);
584
600
  }
585
- getValues(t) {
586
- return this.registry?.get(t)?.getValues() ?? [];
601
+ getValues(e) {
602
+ return this.registry?.get(e)?.getValues() ?? [];
587
603
  }
588
- getValue(t, e) {
589
- return this.registry?.get(t)?.getValue(e);
604
+ getValue(e, t) {
605
+ return this.registry?.get(e)?.getValue(t);
590
606
  }
591
607
  /**
592
608
  * Register onChange callback for an attribute.
593
609
  * Buffers the callback if the mapping hasn't arrived yet.
594
610
  */
595
- onChange(t, e) {
611
+ onChange(e, t) {
596
612
  if (this.registry === void 0) {
597
- this.pendingCallbacks.push({ name: t, callback: e });
613
+ this.pendingCallbacks.push({ name: e, callback: t });
598
614
  return;
599
615
  }
600
- const i = this.registry.get(t);
616
+ const i = this.registry.get(e);
601
617
  if (i === void 0) {
602
- _.warn(`onChange: attribute "${t}" not found — callback will not fire`);
618
+ C.warn(`onChange: attribute "${e}" not found — callback will not fire`);
603
619
  return;
604
620
  }
605
- i.onChange(e);
621
+ i.onChange(t);
606
622
  }
607
- getAttribute(t) {
608
- return this.registry?.get(t);
623
+ getAttribute(e) {
624
+ return this.registry?.get(e);
609
625
  }
610
626
  /** The current selection as attribute name→value pairs, empty before the mapping arrives. */
611
627
  getSelection() {
@@ -614,45 +630,46 @@ class ue {
614
630
  get hasMapping() {
615
631
  return this.registry !== void 0;
616
632
  }
617
- sendMutation(t, e) {
618
- const i = {
633
+ sendMutation(e, t, i = !1) {
634
+ const s = {
619
635
  type: c.MUTATION,
620
- mutations: t,
621
- isInitial: e
636
+ mutations: e,
637
+ isInitial: t,
638
+ ...i && { transient: !0 }
622
639
  };
623
- this.send(i);
640
+ this.send(s);
624
641
  }
625
642
  replayPendingCallbacks() {
626
- for (const { name: t, callback: e } of this.pendingCallbacks) {
627
- const i = this.registry?.get(t);
628
- i === void 0 && _.warn(`onChange: attribute "${t}" not found — buffered callback will not fire`), i?.onChange(e);
643
+ for (const { name: e, callback: t } of this.pendingCallbacks) {
644
+ const i = this.registry?.get(e);
645
+ i === void 0 && C.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`), i?.onChange(t);
629
646
  }
630
647
  this.pendingCallbacks.length = 0;
631
648
  }
632
649
  }
633
- class he {
650
+ class ft {
634
651
  snapshot;
635
652
  callbacks = [];
636
- handleSnapshot(t) {
637
- this.snapshot = t.attributes;
638
- for (const e of this.callbacks)
639
- e(t.attributes);
653
+ handleSnapshot(e) {
654
+ this.snapshot = e.attributes;
655
+ for (const t of this.callbacks)
656
+ t(e.attributes);
640
657
  }
641
- onChange(t) {
642
- this.callbacks.push(t), this.snapshot !== void 0 && t(this.snapshot);
658
+ onChange(e) {
659
+ this.callbacks.push(e), this.snapshot !== void 0 && e(this.snapshot);
643
660
  }
644
661
  /** The selectable values for one attribute, or null when unrestricted. */
645
- selectableFor(t) {
646
- return this.snapshot?.find((i) => i.name === t)?.selectable ?? null;
662
+ selectableFor(e) {
663
+ return this.snapshot?.find((i) => i.name === e)?.selectable ?? null;
647
664
  }
648
665
  /** The latest snapshot; empty before the viewer has reported anything. */
649
666
  get current() {
650
667
  return this.snapshot ?? [];
651
668
  }
652
669
  }
653
- let me = class {
654
- constructor(t) {
655
- this.send = t;
670
+ let gt = class {
671
+ constructor(e) {
672
+ this.send = e;
656
673
  }
657
674
  send;
658
675
  commands = [];
@@ -661,24 +678,24 @@ let me = class {
661
678
  * @param degrees - Absolute rotation in degrees (0 = front view)
662
679
  * @throws VirtualdisplayError if value is not a finite number
663
680
  */
664
- rotate(t) {
665
- return this.validateFiniteNumber(t, "rotate"), this.commands.push({ action: "rotate", value: t }), this;
681
+ rotate(e) {
682
+ return this.validateFiniteNumber(e, "rotate"), this.commands.push({ action: "rotate", value: e }), this;
666
683
  }
667
684
  /**
668
685
  * Tilt camera vertically
669
686
  * @param degrees - Absolute tilt in degrees (0 = top view, 90 = horizontal)
670
687
  * @throws VirtualdisplayError if value is not a finite number
671
688
  */
672
- tilt(t) {
673
- return this.validateFiniteNumber(t, "tilt"), this.commands.push({ action: "tilt", value: t }), this;
689
+ tilt(e) {
690
+ return this.validateFiniteNumber(e, "tilt"), this.commands.push({ action: "tilt", value: e }), this;
674
691
  }
675
692
  /**
676
693
  * Zoom camera
677
694
  * @param percentage - Zoom percentage (100 = normal, >100 = zoom in, <100 = zoom out)
678
695
  * @throws VirtualdisplayError if value is not a finite number
679
696
  */
680
- zoom(t) {
681
- return this.validateFiniteNumber(t, "zoom"), this.commands.push({ action: "zoom", value: t }), this;
697
+ zoom(e) {
698
+ return this.validateFiniteNumber(e, "zoom"), this.commands.push({ action: "zoom", value: e }), this;
682
699
  }
683
700
  /**
684
701
  * Execute accumulated camera commands
@@ -686,19 +703,19 @@ let me = class {
686
703
  */
687
704
  set() {
688
705
  if (this.commands.length === 0)
689
- throw f.invalidParameter(
706
+ throw g.invalidParameter(
690
707
  "No camera commands to execute. Call rotate(), tilt(), or zoom() before set()."
691
708
  );
692
- const t = {
709
+ const e = {
693
710
  type: c.CAMERA,
694
711
  commands: this.commands
695
712
  };
696
- this.send(t), this.commands = [];
713
+ this.send(e), this.commands = [];
697
714
  }
698
- validateFiniteNumber(t, e) {
699
- if (!Number.isFinite(t))
700
- throw f.invalidParameter(
701
- `${e}() requires a finite number, got ${String(t)}`
715
+ validateFiniteNumber(e, t) {
716
+ if (!Number.isFinite(e))
717
+ throw g.invalidParameter(
718
+ `${t}() requires a finite number, got ${String(e)}`
702
719
  );
703
720
  }
704
721
  /**
@@ -706,14 +723,14 @@ let me = class {
706
723
  * This is not chainable and executes immediately
707
724
  */
708
725
  reset() {
709
- const t = {
726
+ const e = {
710
727
  type: c.CAMERA,
711
728
  commands: [{ action: "reset" }]
712
729
  };
713
- this.send(t);
730
+ this.send(e);
714
731
  }
715
732
  };
716
- class pe {
733
+ class bt {
717
734
  state;
718
735
  limitsState;
719
736
  changeCallbacks = [];
@@ -747,8 +764,8 @@ class pe {
747
764
  * Also fires when limits are applied via applyLimits() so components
748
765
  * can re-evaluate disabled states without a separate callback.
749
766
  */
750
- onChange(t) {
751
- this.changeCallbacks.push(t);
767
+ onChange(e) {
768
+ this.changeCallbacks.push(e);
752
769
  }
753
770
  /**
754
771
  * Current camera movement limits (set from CONFIG message).
@@ -761,62 +778,62 @@ class pe {
761
778
  * Apply camera limits received from the server CONFIG message.
762
779
  * Fires onChange callbacks so button disabled states update immediately.
763
780
  */
764
- applyLimits(t) {
765
- this.limitsState = t;
766
- const e = { rotation: this.rotation, tilt: this.tilt, zoom: this.zoom };
781
+ applyLimits(e) {
782
+ this.limitsState = e;
783
+ const t = { rotation: this.rotation, tilt: this.tilt, zoom: this.zoom };
767
784
  for (const i of this.changeCallbacks)
768
- i(e);
785
+ i(t);
769
786
  }
770
787
  /**
771
788
  * Handle incoming camera position message from server
772
789
  */
773
- handlePositionUpdate(t) {
774
- this.update(t.transforms);
790
+ handlePositionUpdate(e) {
791
+ this.update(e.transforms);
775
792
  }
776
793
  /**
777
794
  * Update camera position from server transforms
778
795
  */
779
- update(t) {
780
- let e = !1;
781
- for (const i of t)
796
+ update(e) {
797
+ let t = !1;
798
+ for (const i of e)
782
799
  switch (i.type) {
783
800
  case "rotation":
784
- this.state.rotation = i.value, e = !0;
801
+ this.state.rotation = i.value, t = !0;
785
802
  break;
786
803
  case "tilt":
787
- this.state.tilt = i.value, e = !0;
804
+ this.state.tilt = i.value, t = !0;
788
805
  break;
789
806
  case "zoom":
790
- this.state.zoom = i.value, e = !0;
807
+ this.state.zoom = i.value, t = !0;
791
808
  break;
792
809
  }
793
- if (e) {
810
+ if (t) {
794
811
  const i = {
795
812
  rotation: this.rotation,
796
813
  tilt: this.tilt,
797
814
  zoom: this.zoom
798
815
  };
799
- for (const o of this.changeCallbacks)
800
- o(i);
816
+ for (const s of this.changeCallbacks)
817
+ s(i);
801
818
  }
802
819
  }
803
820
  }
804
- function fe(n, t) {
805
- const e = n.filter((s) => ge(s, t));
806
- if (e.length === 0)
821
+ function vt(n, e) {
822
+ const t = n.filter((o) => yt(o, e));
823
+ if (t.length === 0)
807
824
  return;
808
- const i = Math.max(...e.map(nt)), o = e.filter((s) => nt(s) === i);
809
- return o.length === 1 ? o[0] : void 0;
825
+ const i = Math.max(...t.map(ne)), s = t.filter((o) => ne(o) === i);
826
+ return s.length === 1 ? s[0] : void 0;
810
827
  }
811
- function ge(n, t) {
812
- return Object.entries(n.attributes).every(([e, i]) => t[e] === i);
828
+ function yt(n, e) {
829
+ return Object.entries(n.attributes).every(([t, i]) => e[t] === i);
813
830
  }
814
- function nt(n) {
831
+ function ne(n) {
815
832
  return Object.keys(n.attributes).length;
816
833
  }
817
- class be {
818
- constructor(t, e) {
819
- this.dispatchChange = t, this.dispatchSubmit = e;
834
+ class St {
835
+ constructor(e, t) {
836
+ this.dispatchChange = e, this.dispatchSubmit = t;
820
837
  }
821
838
  dispatchChange;
822
839
  dispatchSubmit;
@@ -841,9 +858,9 @@ class be {
841
858
  * it says, so the CTA does not render.
842
859
  */
843
860
  get buttonLabel() {
844
- const t = this.pricing?.buttonLabel;
845
- if (t != null && t !== "")
846
- return t;
861
+ const e = this.pricing?.buttonLabel;
862
+ if (e != null && e !== "")
863
+ return e;
847
864
  if (this.submitDefaultLabel !== void 0 && this.submitDefaultLabel !== "")
848
865
  return this.submitDefaultLabel;
849
866
  }
@@ -868,16 +885,16 @@ class be {
868
885
  * Subscribe to configuration changes. Fires after every selection change with
869
886
  * the resolved configuration, including undefined when nothing matches.
870
887
  */
871
- onChange(t) {
872
- this.changeCallbacks.push(t);
888
+ onChange(e) {
889
+ this.changeCallbacks.push(e);
873
890
  }
874
891
  /**
875
892
  * Register the submit handler the CTA hands the configuration to. Registering
876
893
  * one is what switches the button on (capability driven). `defaultLabel` fills
877
894
  * in when the customer authored no button label.
878
895
  */
879
- onSubmit(t, e) {
880
- this.submitCallback = t, this.submitDefaultLabel = e?.defaultLabel, this.notifyRender();
896
+ onSubmit(e, t) {
897
+ this.submitCallback = e, this.submitDefaultLabel = t?.defaultLabel, this.notifyRender();
881
898
  }
882
899
  /**
883
900
  * Subscribe the built-in UI to re-render the price + CTA. Fires on every
@@ -885,10 +902,10 @@ class be {
885
902
  * on without a configuration change). Separate from `onChange`, which stays the
886
903
  * host-facing, mutation-driven contract. Returns a disposer.
887
904
  */
888
- onRender(t) {
889
- return this.renderCallbacks.push(t), () => {
890
- const e = this.renderCallbacks.indexOf(t);
891
- e !== -1 && this.renderCallbacks.splice(e, 1);
905
+ onRender(e) {
906
+ return this.renderCallbacks.push(e), () => {
907
+ const t = this.renderCallbacks.indexOf(e);
908
+ t !== -1 && this.renderCallbacks.splice(t, 1);
892
909
  };
893
910
  }
894
911
  /**
@@ -900,44 +917,44 @@ class be {
900
917
  async submit() {
901
918
  if (!this.submittable)
902
919
  return;
903
- const t = this.resolved !== void 0 ? { attributes: this.resolved.attributes, reference: this.resolved.reference } : { attributes: { ...this.selection }, reference: "" };
904
- this.dispatchSubmit(t), await this.submitCallback?.(t);
920
+ const e = this.resolved !== void 0 ? { attributes: this.resolved.attributes, reference: this.resolved.reference } : { attributes: { ...this.selection }, reference: "" };
921
+ this.dispatchSubmit(e), await this.submitCallback?.(e);
905
922
  }
906
923
  /** Called by the client when a PRICING message arrives from the viewer. */
907
- handlePricingReceived(t) {
908
- this.pricing = t, this.recompute();
924
+ handlePricingReceived(e) {
925
+ this.pricing = e, this.recompute();
909
926
  }
910
927
  /** Called by the client after every mutation result, with the full selection. */
911
- handleSelectionChanged(t) {
912
- this.selection = t, this.recompute();
928
+ handleSelectionChanged(e) {
929
+ this.selection = e, this.recompute();
913
930
  }
914
931
  recompute() {
915
932
  this.resolved = this.resolve();
916
- for (const t of this.changeCallbacks)
917
- t(this.resolved);
933
+ for (const e of this.changeCallbacks)
934
+ e(this.resolved);
918
935
  this.dispatchChange(this.resolved), this.notifyRender();
919
936
  }
920
937
  notifyRender() {
921
- for (const t of this.renderCallbacks)
922
- t();
938
+ for (const e of this.renderCallbacks)
939
+ e();
923
940
  }
924
941
  resolve() {
925
942
  if (this.pricing === void 0)
926
943
  return;
927
- const t = fe(this.pricing.rules, this.selection);
928
- if (!(t === void 0 || t.availability === Rt.HIDDEN))
944
+ const e = vt(this.pricing.rules, this.selection);
945
+ if (!(e === void 0 || e.availability === Le.HIDDEN))
929
946
  return {
930
947
  attributes: { ...this.selection },
931
- reference: t.reference,
932
- price: t.priceCents,
948
+ reference: e.reference,
949
+ price: e.priceCents,
933
950
  currency: this.pricing.currency,
934
- availability: t.availability
951
+ availability: e.availability
935
952
  };
936
953
  }
937
954
  }
938
- class ve {
939
- constructor(t, e) {
940
- this.send = t, this.dispatch = e;
955
+ class wt {
956
+ constructor(e, t) {
957
+ this.send = e, this.dispatch = t;
941
958
  }
942
959
  send;
943
960
  dispatch;
@@ -952,36 +969,36 @@ class ve {
952
969
  * Focus a component by name. Sends a focus message to the viewer.
953
970
  * @throws VirtualdisplayError if component is not a non-empty string
954
971
  */
955
- set(t) {
956
- if (typeof t != "string" || t.length === 0)
957
- throw f.invalidParameter(
958
- `set() requires a non-empty component name, got ${String(t)}`
972
+ set(e) {
973
+ if (typeof e != "string" || e.length === 0)
974
+ throw g.invalidParameter(
975
+ `set() requires a non-empty component name, got ${String(e)}`
959
976
  );
960
- this.send({ type: c.FOCUS, action: tt.FOCUS, component: t });
977
+ this.send({ type: c.FOCUS, action: ee.FOCUS, component: e });
961
978
  }
962
979
  /** Return to the overview — unfocus the current component. */
963
980
  clear() {
964
- this.send({ type: c.FOCUS, action: tt.UNFOCUS });
981
+ this.send({ type: c.FOCUS, action: ee.UNFOCUS });
965
982
  }
966
983
  /**
967
984
  * Subscribe to focus changes. The callback fires with the focus state when a
968
985
  * component is focused, and with null when returning to overview.
969
986
  */
970
- onChange(t) {
971
- this.changeCallbacks.push(t);
987
+ onChange(e) {
988
+ this.changeCallbacks.push(e);
972
989
  }
973
990
  /** Called by the client when a FocusStateMessage is received from the viewer. */
974
- handleStateReceived(t) {
975
- t.state === Tt.FOCUSED && t.component !== void 0 ? (this.focused = t.component, this.attributes = t.attributes ?? []) : (this.focused = null, this.attributes = []);
976
- const e = this.focused !== null ? { component: this.focused, attributes: this.attributes } : null;
991
+ handleStateReceived(e) {
992
+ e.state === Ie.FOCUSED && e.component !== void 0 ? (this.focused = e.component, this.attributes = e.attributes ?? []) : (this.focused = null, this.attributes = []);
993
+ const t = this.focused !== null ? { component: this.focused, attributes: this.attributes } : null;
977
994
  for (const i of this.changeCallbacks)
978
- i(e);
979
- this.dispatch(e);
995
+ i(t);
996
+ this.dispatch(t);
980
997
  }
981
998
  }
982
- class ye {
983
- constructor(t) {
984
- this.filename = t;
999
+ class Ct {
1000
+ constructor(e) {
1001
+ this.filename = e;
985
1002
  }
986
1003
  filename;
987
1004
  developedCallbacks = /* @__PURE__ */ new Set();
@@ -996,8 +1013,8 @@ class ye {
996
1013
  * @param callback Function to call with photo data
997
1014
  * @returns This Photo instance for chaining
998
1015
  */
999
- onDeveloped(t) {
1000
- return this.developed && this.photoData !== null ? (t(this.photoData), this) : (this.developedCallbacks.add(t), this);
1016
+ onDeveloped(e) {
1017
+ return this.developed && this.photoData !== null ? (e(this.photoData), this) : (this.developedCallbacks.add(e), this);
1001
1018
  }
1002
1019
  /**
1003
1020
  * Register a callback for when the photo capture fails
@@ -1005,8 +1022,8 @@ class ye {
1005
1022
  * @param callback Function to call with error
1006
1023
  * @returns This Photo instance for chaining
1007
1024
  */
1008
- onError(t) {
1009
- return this.errorCallbacks.add(t), this;
1025
+ onError(e) {
1026
+ return this.errorCallbacks.add(e), this;
1010
1027
  }
1011
1028
  /**
1012
1029
  * Get the filename for this photo
@@ -1018,24 +1035,24 @@ class ye {
1018
1035
  * Mark the photo as developed and notify all callbacks
1019
1036
  * This method is called by Snapshot when the photo data arrives from the server
1020
1037
  */
1021
- develop(t) {
1022
- this.developed || this.failed || (this.photoData = t, this.developed = !0, this.developedCallbacks.forEach((e) => {
1023
- e(this.photoData);
1038
+ develop(e) {
1039
+ this.developed || this.failed || (this.photoData = e, this.developed = !0, this.developedCallbacks.forEach((t) => {
1040
+ t(this.photoData);
1024
1041
  }), this.developedCallbacks.clear(), this.errorCallbacks.clear());
1025
1042
  }
1026
1043
  /**
1027
1044
  * Mark the photo as failed and notify error callbacks
1028
1045
  */
1029
- fail(t) {
1030
- this.developed || this.failed || (this.failed = !0, this.errorCallbacks.forEach((e) => {
1031
- e(t);
1046
+ fail(e) {
1047
+ this.developed || this.failed || (this.failed = !0, this.errorCallbacks.forEach((t) => {
1048
+ t(e);
1032
1049
  }), this.developedCallbacks.clear(), this.errorCallbacks.clear());
1033
1050
  }
1034
1051
  }
1035
- const it = 3e4;
1036
- class we {
1037
- constructor(t) {
1038
- this.send = t;
1052
+ const ie = 3e4;
1053
+ class _t {
1054
+ constructor(e) {
1055
+ this.send = e;
1039
1056
  }
1040
1057
  send;
1041
1058
  validExtensions = [".png"];
@@ -1047,39 +1064,39 @@ class we {
1047
1064
  * @returns Photo object for registering callbacks
1048
1065
  * @throws VirtualdisplayError if filename is invalid
1049
1066
  */
1050
- take(t) {
1051
- this.validateFilename(t), _.debug("Taking snapshot", { filename: t });
1052
- const e = new ye(t), i = setTimeout(() => {
1053
- this.pendingPhotos.delete(t), _.warn("Snapshot timed out", { filename: t }), e.fail(new f(
1054
- `Snapshot timed out: the viewer did not respond within ${it}ms`,
1067
+ take(e) {
1068
+ this.validateFilename(e), C.debug("Taking snapshot", { filename: e });
1069
+ const t = new Ct(e), i = setTimeout(() => {
1070
+ this.pendingPhotos.delete(e), C.warn("Snapshot timed out", { filename: e }), t.fail(new g(
1071
+ `Snapshot timed out: the viewer did not respond within ${ie}ms`,
1055
1072
  A.SNAPSHOT_FAILED
1056
1073
  ));
1057
- }, it);
1058
- return this.pendingPhotos.set(t, { photo: e, timeout: i }), this.send({
1074
+ }, ie);
1075
+ return this.pendingPhotos.set(e, { photo: t, timeout: i }), this.send({
1059
1076
  type: c.SNAPSHOT,
1060
- filename: t
1061
- }), e;
1077
+ filename: e
1078
+ }), t;
1062
1079
  }
1063
1080
  /**
1064
1081
  * Handle incoming snapshot result from server
1065
1082
  * Matches the message to a pending photo by filename, then develops or fails it
1066
1083
  */
1067
- handleSnapshotResult(t) {
1068
- const e = this.pendingPhotos.get(t.filename);
1069
- if (e === void 0) {
1070
- _.warn("No pending photo found for filename", {
1071
- filename: t.filename,
1084
+ handleSnapshotResult(e) {
1085
+ const t = this.pendingPhotos.get(e.filename);
1086
+ if (t === void 0) {
1087
+ C.warn("No pending photo found for filename", {
1088
+ filename: e.filename,
1072
1089
  pendingFilenames: Array.from(this.pendingPhotos.keys())
1073
1090
  });
1074
1091
  return;
1075
1092
  }
1076
- clearTimeout(e.timeout), this.pendingPhotos.delete(t.filename);
1077
- const { photo: i } = e;
1078
- if (t.error !== void 0) {
1079
- i.fail(new f(t.error, A.SNAPSHOT_FAILED));
1093
+ clearTimeout(t.timeout), this.pendingPhotos.delete(e.filename);
1094
+ const { photo: i } = t;
1095
+ if (e.error !== void 0) {
1096
+ i.fail(new g(e.error, A.SNAPSHOT_FAILED));
1080
1097
  return;
1081
1098
  }
1082
- t.data !== void 0 && i.develop({ filename: t.filename, data: t.data });
1099
+ e.data !== void 0 && i.develop({ filename: e.filename, data: e.data });
1083
1100
  }
1084
1101
  /**
1085
1102
  * Fail any pending photos and forget them. Called from client destroy
@@ -1089,688 +1106,688 @@ class we {
1089
1106
  clear() {
1090
1107
  if (this.pendingPhotos.size === 0)
1091
1108
  return;
1092
- const t = new f(
1109
+ const e = new g(
1093
1110
  "Client destroyed before snapshot completed",
1094
1111
  A.SNAPSHOT_FAILED
1095
1112
  );
1096
- for (const { photo: e, timeout: i } of this.pendingPhotos.values())
1097
- clearTimeout(i), e.fail(t);
1113
+ for (const { photo: t, timeout: i } of this.pendingPhotos.values())
1114
+ clearTimeout(i), t.fail(e);
1098
1115
  this.pendingPhotos.clear();
1099
1116
  }
1100
1117
  /**
1101
1118
  * Validate filename has a valid image extension
1102
1119
  */
1103
- validateFilename(t) {
1104
- if (t === "" || typeof t != "string")
1105
- throw new f(
1120
+ validateFilename(e) {
1121
+ if (e === "" || typeof e != "string")
1122
+ throw new g(
1106
1123
  "Filename must be a non-empty string",
1107
1124
  A.INVALID_PARAMETER
1108
1125
  );
1109
1126
  if (!this.validExtensions.some(
1110
- (i) => t.toLowerCase().endsWith(i)
1127
+ (i) => e.toLowerCase().endsWith(i)
1111
1128
  ))
1112
- throw new f(
1113
- `Invalid filename: "${t}". Filename must end with one of: ${this.validExtensions.join(", ")}`,
1129
+ throw new g(
1130
+ `Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(", ")}`,
1114
1131
  A.INVALID_PARAMETER
1115
1132
  );
1116
- if (t.includes("..") || t.includes("/") || t.includes("\\"))
1117
- throw new f(
1133
+ if (e.includes("..") || e.includes("/") || e.includes("\\"))
1134
+ throw new g(
1118
1135
  'Filename cannot contain path separators or ".."',
1119
1136
  A.INVALID_PARAMETER
1120
1137
  );
1121
1138
  }
1122
1139
  }
1123
- class Se {
1140
+ class kt {
1124
1141
  container = null;
1125
- attach(t) {
1126
- this.container = t;
1142
+ attach(e) {
1143
+ this.container = e;
1127
1144
  }
1128
- dispatch(t, e, i = !1) {
1129
- const o = new CustomEvent(t, { detail: e, cancelable: i });
1130
- return this.container?.dispatchEvent(o), o;
1145
+ dispatch(e, t, i = !1) {
1146
+ const s = new CustomEvent(e, { detail: t, cancelable: i });
1147
+ return this.container?.dispatchEvent(s), s;
1131
1148
  }
1132
- on(t, e) {
1133
- const i = (o) => {
1134
- const s = o, r = { ...s.detail, preventDefault: () => {
1135
- s.preventDefault();
1149
+ on(e, t) {
1150
+ const i = (s) => {
1151
+ const o = s, r = { ...o.detail, preventDefault: () => {
1152
+ o.preventDefault();
1136
1153
  } };
1137
- e(r);
1154
+ t(r);
1138
1155
  };
1139
- return this.container?.addEventListener(t, i), () => {
1140
- this.container?.removeEventListener(t, i);
1156
+ return this.container?.addEventListener(e, i), () => {
1157
+ this.container?.removeEventListener(e, i);
1141
1158
  };
1142
1159
  }
1143
1160
  }
1144
- const _e = {}, Ce = "en", vt = (
1161
+ const At = {}, Et = "en", ye = (
1145
1162
  /** @type {const} */
1146
1163
  ["en", "nl", "de"]
1147
1164
  ), K = [
1148
1165
  "baseLocale"
1149
- ], ot = [], Q = typeof window > "u";
1166
+ ], se = [], Y = typeof window > "u";
1150
1167
  globalThis.__paraglide = /** @type {any} */
1151
1168
  globalThis.__paraglide ?? {};
1152
1169
  globalThis.__paraglide.ssr = /** @type {any} */
1153
1170
  globalThis.__paraglide.ssr ?? {};
1154
- let st = !1, u = () => {
1171
+ let oe = !1, m = () => {
1155
1172
  let n = K;
1156
- !Q && typeof window < "u" && window.location?.href && (n = wt(window.location.href));
1157
- const t = ke(n);
1158
- if (t)
1159
- return st || (st = !0, yt(t, { reload: !1 })), t;
1173
+ !Y && typeof window < "u" && window.location?.href && (n = we(window.location.href));
1174
+ const e = xt(n);
1175
+ if (e)
1176
+ return oe || (oe = !0, Se(e, { reload: !1 })), e;
1160
1177
  throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
1161
1178
  };
1162
- function ke(n, t) {
1163
- let e;
1179
+ function xt(n, e) {
1180
+ let t;
1164
1181
  for (const i of n) {
1165
1182
  if (i === "baseLocale")
1166
- e = Ce;
1167
- else if (St(i) && M.has(i)) {
1168
- const s = M.get(i);
1169
- if (s) {
1170
- const r = s.getLocale();
1183
+ t = Et;
1184
+ else if (Ce(i) && M.has(i)) {
1185
+ const o = M.get(i);
1186
+ if (o) {
1187
+ const r = o.getLocale();
1171
1188
  if (r instanceof Promise)
1172
1189
  continue;
1173
1190
  if (r !== void 0)
1174
- return xe(r);
1191
+ return It(r);
1175
1192
  }
1176
1193
  }
1177
- const o = X(e);
1178
- if (o)
1179
- return o;
1194
+ const s = X(t);
1195
+ if (s)
1196
+ return s;
1180
1197
  }
1181
1198
  }
1182
- const Ae = (n) => {
1199
+ const Tt = (n) => {
1183
1200
  window.location.reload();
1184
1201
  };
1185
- let yt = (n, t) => {
1186
- const e = {
1202
+ let Se = (n, e) => {
1203
+ const t = {
1187
1204
  reload: !0,
1188
- ...t
1205
+ ...e
1189
1206
  };
1190
1207
  let i;
1191
1208
  try {
1192
- i = u();
1209
+ i = m();
1193
1210
  } catch {
1194
1211
  }
1195
- const o = [];
1196
- let s = K;
1197
- !Q && typeof window < "u" && window.location?.href && (s = wt(window.location.href));
1198
- for (const a of s)
1199
- if (a !== "baseLocale" && St(a) && M.has(a)) {
1200
- const h = M.get(a);
1201
- if (h) {
1202
- let d = h.setLocale(n);
1203
- d instanceof Promise && (d = d.catch((m) => {
1212
+ const s = [];
1213
+ let o = K;
1214
+ !Y && typeof window < "u" && window.location?.href && (o = we(window.location.href));
1215
+ for (const a of o)
1216
+ if (a !== "baseLocale" && Ce(a) && M.has(a)) {
1217
+ const d = M.get(a);
1218
+ if (d) {
1219
+ let u = d.setLocale(n);
1220
+ u instanceof Promise && (u = u.catch((f) => {
1204
1221
  throw new Error(`Custom strategy "${a}" setLocale failed.`, {
1205
- cause: m
1222
+ cause: f
1206
1223
  });
1207
- }), o.push(d));
1224
+ }), s.push(u));
1208
1225
  }
1209
1226
  }
1210
1227
  const r = () => {
1211
- !Q && e.reload && window.location && n !== i && Ae();
1228
+ !Y && t.reload && window.location && n !== i && Tt();
1212
1229
  };
1213
- if (o.length)
1214
- return Promise.all(o).then(() => {
1230
+ if (s.length)
1231
+ return Promise.all(s).then(() => {
1215
1232
  r();
1216
1233
  });
1217
1234
  r();
1218
- }, Ee = () => typeof window < "u" ? window.location.origin : "http://fallback.com";
1235
+ }, Rt = () => typeof window < "u" ? window.location.origin : "http://fallback.com";
1219
1236
  function X(n) {
1220
1237
  if (typeof n != "string")
1221
1238
  return;
1222
- const t = n.toLowerCase();
1223
- for (const e of vt)
1224
- if (e.toLowerCase() === t)
1225
- return e;
1239
+ const e = n.toLowerCase();
1240
+ for (const t of ye)
1241
+ if (t.toLowerCase() === e)
1242
+ return t;
1226
1243
  }
1227
- function xe(n) {
1228
- const t = X(n);
1229
- if (t)
1230
- return t;
1231
- throw new Error(`Invalid locale: ${n}. Expected one of: ${vt.join(", ")}`);
1244
+ function It(n) {
1245
+ const e = X(n);
1246
+ if (e)
1247
+ return e;
1248
+ throw new Error(`Invalid locale: ${n}. Expected one of: ${ye.join(", ")}`);
1232
1249
  }
1233
- function Te(n) {
1234
- return Re(n);
1250
+ function Lt(n) {
1251
+ return Ot(n);
1235
1252
  }
1236
- function Re(n) {
1237
- const t = typeof n == "string" ? new URL(n, Ee()) : new URL(n), e = t.pathname.split("/").filter(Boolean);
1238
- return e.length > 0 && X(e[0]) && (t.pathname = "/" + e.slice(1).join("/")), t;
1253
+ function Ot(n) {
1254
+ const e = typeof n == "string" ? new URL(n, Rt()) : new URL(n), t = e.pathname.split("/").filter(Boolean);
1255
+ return t.length > 0 && X(t[0]) && (e.pathname = "/" + t.slice(1).join("/")), e;
1239
1256
  }
1240
- let rt, at;
1241
- function Ie(n) {
1242
- if (ot.length === 0)
1257
+ let re, ae;
1258
+ function Nt(n) {
1259
+ if (se.length === 0)
1243
1260
  return;
1244
- const t = typeof n == "string" ? n : n.href;
1245
- if (rt === t)
1246
- return at;
1247
- const e = new URL(t, "http://example.com"), i = Te(e), o = i.href === e.href ? [e] : [e, i];
1248
- let s;
1249
- for (const r of o) {
1250
- for (const a of ot)
1251
- if (new _e(a.match, r.href).exec(r.href)) {
1252
- s = a;
1261
+ const e = typeof n == "string" ? n : n.href;
1262
+ if (re === e)
1263
+ return ae;
1264
+ const t = new URL(e, "http://example.com"), i = Lt(t), s = i.href === t.href ? [t] : [t, i];
1265
+ let o;
1266
+ for (const r of s) {
1267
+ for (const a of se)
1268
+ if (new At(a.match, r.href).exec(r.href)) {
1269
+ o = a;
1253
1270
  break;
1254
1271
  }
1255
- if (s)
1272
+ if (o)
1256
1273
  break;
1257
1274
  }
1258
- return rt = t, at = s, s;
1275
+ return re = e, ae = o, o;
1259
1276
  }
1260
- function wt(n) {
1261
- const t = Ie(n);
1262
- return t && t.exclude !== !0 && Array.isArray(t.strategy) ? t.strategy : K;
1277
+ function we(n) {
1278
+ const e = Nt(n);
1279
+ return e && e.exclude !== !0 && Array.isArray(e.strategy) ? e.strategy : K;
1263
1280
  }
1264
1281
  const M = /* @__PURE__ */ new Map();
1265
- function St(n) {
1282
+ function Ce(n) {
1266
1283
  return typeof n == "string" && /^custom-[A-Za-z0-9_-]+$/.test(n);
1267
1284
  }
1268
- const Le = (
1285
+ const Mt = (
1269
1286
  /** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
1270
1287
  () => (
1271
1288
  /** @type {LocalizedString} */
1272
1289
  "Activate AR"
1273
1290
  )
1274
- ), Oe = (
1291
+ ), zt = (
1275
1292
  /** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
1276
1293
  () => (
1277
1294
  /** @type {LocalizedString} */
1278
1295
  "AR activeren"
1279
1296
  )
1280
- ), Ne = (
1297
+ ), Pt = (
1281
1298
  /** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
1282
1299
  () => (
1283
1300
  /** @type {LocalizedString} */
1284
1301
  "AR aktivieren"
1285
1302
  )
1286
- ), Me = (
1303
+ ), Ft = (
1287
1304
  /** @type {((inputs?: Controls_Ar_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Ar_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1288
- ((n = {}, t = {}) => {
1289
- const e = t.locale ?? u();
1290
- return e === "nl" ? Oe() : e === "de" ? Ne() : Le();
1305
+ ((n = {}, e = {}) => {
1306
+ const t = e.locale ?? m();
1307
+ return t === "nl" ? zt() : t === "de" ? Pt() : Mt();
1291
1308
  })
1292
- ), ze = (
1309
+ ), $t = (
1293
1310
  /** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
1294
1311
  () => (
1295
1312
  /** @type {LocalizedString} */
1296
1313
  "Scan to view in AR"
1297
1314
  )
1298
- ), Pe = (
1315
+ ), Dt = (
1299
1316
  /** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
1300
1317
  () => (
1301
1318
  /** @type {LocalizedString} */
1302
1319
  "Scan om in AR te bekijken"
1303
1320
  )
1304
- ), Fe = (
1321
+ ), Ut = (
1305
1322
  /** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
1306
1323
  () => (
1307
1324
  /** @type {LocalizedString} */
1308
1325
  "Scannen für AR-Ansicht"
1309
1326
  )
1310
- ), $e = (
1327
+ ), Bt = (
1311
1328
  /** @type {((inputs?: Controls_Qr_Modaltitle1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modaltitle1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1312
- ((n = {}, t = {}) => {
1313
- const e = t.locale ?? u();
1314
- return e === "nl" ? Pe() : e === "de" ? Fe() : ze();
1329
+ ((n = {}, e = {}) => {
1330
+ const t = e.locale ?? m();
1331
+ return t === "nl" ? Dt() : t === "de" ? Ut() : $t();
1315
1332
  })
1316
- ), De = (
1333
+ ), Vt = (
1317
1334
  /** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
1318
1335
  () => (
1319
1336
  /** @type {LocalizedString} */
1320
1337
  "Use your smartphone camera to scan this QR code"
1321
1338
  )
1322
- ), Be = (
1339
+ ), jt = (
1323
1340
  /** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
1324
1341
  () => (
1325
1342
  /** @type {LocalizedString} */
1326
1343
  "Gebruik de camera van je smartphone om deze QR-code te scannen"
1327
1344
  )
1328
- ), Ue = (
1345
+ ), Ht = (
1329
1346
  /** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
1330
1347
  () => (
1331
1348
  /** @type {LocalizedString} */
1332
1349
  "Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen"
1333
1350
  )
1334
- ), Ve = (
1351
+ ), qt = (
1335
1352
  /** @type {((inputs?: Controls_Qr_Modaldescription1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modaldescription1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1336
- ((n = {}, t = {}) => {
1337
- const e = t.locale ?? u();
1338
- return e === "nl" ? Be() : e === "de" ? Ue() : De();
1353
+ ((n = {}, e = {}) => {
1354
+ const t = e.locale ?? m();
1355
+ return t === "nl" ? jt() : t === "de" ? Ht() : Vt();
1339
1356
  })
1340
- ), je = (
1357
+ ), Gt = (
1341
1358
  /** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
1342
1359
  () => (
1343
1360
  /** @type {LocalizedString} */
1344
1361
  "Your phone will open the 3D model in AR mode."
1345
1362
  )
1346
- ), He = (
1363
+ ), Zt = (
1347
1364
  /** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
1348
1365
  () => (
1349
1366
  /** @type {LocalizedString} */
1350
1367
  "Je telefoon opent het 3D-model in AR-modus."
1351
1368
  )
1352
- ), qe = (
1369
+ ), Wt = (
1353
1370
  /** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
1354
1371
  () => (
1355
1372
  /** @type {LocalizedString} */
1356
1373
  "Dein Telefon öffnet das 3D-Modell im AR-Modus."
1357
1374
  )
1358
- ), Ge = (
1375
+ ), Yt = (
1359
1376
  /** @type {((inputs?: Controls_Qr_Modalinstructions1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modalinstructions1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1360
- ((n = {}, t = {}) => {
1361
- const e = t.locale ?? u();
1362
- return e === "nl" ? He() : e === "de" ? qe() : je();
1377
+ ((n = {}, e = {}) => {
1378
+ const t = e.locale ?? m();
1379
+ return t === "nl" ? Zt() : t === "de" ? Wt() : Gt();
1363
1380
  })
1364
- ), Ze = (
1381
+ ), Qt = (
1365
1382
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1366
1383
  () => (
1367
1384
  /** @type {LocalizedString} */
1368
1385
  "Close"
1369
1386
  )
1370
- ), We = (
1387
+ ), Kt = (
1371
1388
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1372
1389
  () => (
1373
1390
  /** @type {LocalizedString} */
1374
1391
  "Sluiten"
1375
1392
  )
1376
- ), Ye = (
1393
+ ), Xt = (
1377
1394
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1378
1395
  () => (
1379
1396
  /** @type {LocalizedString} */
1380
1397
  "Schließen"
1381
1398
  )
1382
- ), Qe = (
1399
+ ), Jt = (
1383
1400
  /** @type {((inputs?: Controls_Qr_Closebutton1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Closebutton1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1384
- ((n = {}, t = {}) => {
1385
- const e = t.locale ?? u();
1386
- return e === "nl" ? We() : e === "de" ? Ye() : Ze();
1401
+ ((n = {}, e = {}) => {
1402
+ const t = e.locale ?? m();
1403
+ return t === "nl" ? Kt() : t === "de" ? Xt() : Qt();
1387
1404
  })
1388
- ), Ke = (
1405
+ ), en = (
1389
1406
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
1390
1407
  () => (
1391
1408
  /** @type {LocalizedString} */
1392
1409
  "Fullscreen"
1393
1410
  )
1394
- ), Xe = (
1411
+ ), tn = (
1395
1412
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
1396
1413
  () => (
1397
1414
  /** @type {LocalizedString} */
1398
1415
  "Volledig scherm"
1399
1416
  )
1400
- ), Je = (
1417
+ ), nn = (
1401
1418
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
1402
1419
  () => (
1403
1420
  /** @type {LocalizedString} */
1404
1421
  "Vollbild"
1405
1422
  )
1406
- ), tn = (
1423
+ ), sn = (
1407
1424
  /** @type {((inputs?: Controls_Fullscreen_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Fullscreen_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1408
- ((n = {}, t = {}) => {
1409
- const e = t.locale ?? u();
1410
- return e === "nl" ? Xe() : e === "de" ? Je() : Ke();
1425
+ ((n = {}, e = {}) => {
1426
+ const t = e.locale ?? m();
1427
+ return t === "nl" ? tn() : t === "de" ? nn() : en();
1411
1428
  })
1412
- ), en = (
1429
+ ), on = (
1413
1430
  /** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
1414
1431
  () => (
1415
1432
  /** @type {LocalizedString} */
1416
1433
  "Downloading"
1417
1434
  )
1418
- ), nn = (
1435
+ ), rn = (
1419
1436
  /** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
1420
1437
  () => (
1421
1438
  /** @type {LocalizedString} */
1422
1439
  "Downloaden"
1423
1440
  )
1424
- ), on = (
1441
+ ), an = (
1425
1442
  /** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
1426
1443
  () => (
1427
1444
  /** @type {LocalizedString} */
1428
1445
  "Herunterladen"
1429
1446
  )
1430
- ), _t = (
1447
+ ), _e = (
1431
1448
  /** @type {((inputs?: Loading_Downloadingshort1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Loading_Downloadingshort1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1432
- ((n = {}, t = {}) => {
1433
- const e = t.locale ?? u();
1434
- return e === "nl" ? nn() : e === "de" ? on() : en();
1449
+ ((n = {}, e = {}) => {
1450
+ const t = e.locale ?? m();
1451
+ return t === "nl" ? rn() : t === "de" ? an() : on();
1435
1452
  })
1436
- ), sn = (
1453
+ ), ln = (
1437
1454
  /** @type {(inputs: Loading_RenderingInputs) => LocalizedString} */
1438
1455
  () => (
1439
1456
  /** @type {LocalizedString} */
1440
1457
  "Rendering"
1441
1458
  )
1442
- ), rn = (
1459
+ ), cn = (
1443
1460
  /** @type {(inputs: Loading_RenderingInputs) => LocalizedString} */
1444
1461
  () => (
1445
1462
  /** @type {LocalizedString} */
1446
1463
  "Renderen"
1447
1464
  )
1448
- ), an = (
1465
+ ), dn = (
1449
1466
  /** @type {(inputs: Loading_RenderingInputs) => LocalizedString} */
1450
1467
  () => (
1451
1468
  /** @type {LocalizedString} */
1452
1469
  "Rendern"
1453
1470
  )
1454
- ), ln = (
1471
+ ), un = (
1455
1472
  /** @type {((inputs?: Loading_RenderingInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Loading_RenderingInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1456
- ((n = {}, t = {}) => {
1457
- const e = t.locale ?? u();
1458
- return e === "nl" ? rn() : e === "de" ? an() : sn();
1473
+ ((n = {}, e = {}) => {
1474
+ const t = e.locale ?? m();
1475
+ return t === "nl" ? cn() : t === "de" ? dn() : ln();
1459
1476
  })
1460
- ), cn = (
1477
+ ), hn = (
1461
1478
  /** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
1462
1479
  () => (
1463
1480
  /** @type {LocalizedString} */
1464
1481
  "Screenshot"
1465
1482
  )
1466
- ), dn = (
1483
+ ), mn = (
1467
1484
  /** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
1468
1485
  () => (
1469
1486
  /** @type {LocalizedString} */
1470
1487
  "Screenshot"
1471
1488
  )
1472
- ), un = (
1489
+ ), pn = (
1473
1490
  /** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
1474
1491
  () => (
1475
1492
  /** @type {LocalizedString} */
1476
1493
  "Screenshot"
1477
1494
  )
1478
- ), hn = (
1495
+ ), fn = (
1479
1496
  /** @type {((inputs?: Controls_Screenshot_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Screenshot_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1480
- ((n = {}, t = {}) => {
1481
- const e = t.locale ?? u();
1482
- return e === "nl" ? dn() : e === "de" ? un() : cn();
1497
+ ((n = {}, e = {}) => {
1498
+ const t = e.locale ?? m();
1499
+ return t === "nl" ? mn() : t === "de" ? pn() : hn();
1483
1500
  })
1484
- ), mn = (
1501
+ ), gn = (
1485
1502
  /** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
1486
1503
  () => (
1487
1504
  /** @type {LocalizedString} */
1488
1505
  "Configure"
1489
1506
  )
1490
- ), pn = (
1507
+ ), bn = (
1491
1508
  /** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
1492
1509
  () => (
1493
1510
  /** @type {LocalizedString} */
1494
1511
  "Configureren"
1495
1512
  )
1496
- ), fn = (
1513
+ ), vn = (
1497
1514
  /** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
1498
1515
  () => (
1499
1516
  /** @type {LocalizedString} */
1500
1517
  "Konfigurieren"
1501
1518
  )
1502
- ), gn = (
1519
+ ), yn = (
1503
1520
  /** @type {((inputs?: Controls_Configurator_OpenInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Configurator_OpenInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1504
- ((n = {}, t = {}) => {
1505
- const e = t.locale ?? u();
1506
- return e === "nl" ? pn() : e === "de" ? fn() : mn();
1521
+ ((n = {}, e = {}) => {
1522
+ const t = e.locale ?? m();
1523
+ return t === "nl" ? bn() : t === "de" ? vn() : gn();
1507
1524
  })
1508
- ), bn = (
1525
+ ), Sn = (
1509
1526
  /** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
1510
1527
  () => (
1511
1528
  /** @type {LocalizedString} */
1512
1529
  "Close"
1513
1530
  )
1514
- ), vn = (
1531
+ ), wn = (
1515
1532
  /** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
1516
1533
  () => (
1517
1534
  /** @type {LocalizedString} */
1518
1535
  "Sluiten"
1519
1536
  )
1520
- ), yn = (
1537
+ ), Cn = (
1521
1538
  /** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
1522
1539
  () => (
1523
1540
  /** @type {LocalizedString} */
1524
1541
  "Schließen"
1525
1542
  )
1526
- ), wn = (
1543
+ ), _n = (
1527
1544
  /** @type {((inputs?: Controls_Configurator_CloseInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Configurator_CloseInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1528
- ((n = {}, t = {}) => {
1529
- const e = t.locale ?? u();
1530
- return e === "nl" ? vn() : e === "de" ? yn() : bn();
1545
+ ((n = {}, e = {}) => {
1546
+ const t = e.locale ?? m();
1547
+ return t === "nl" ? wn() : t === "de" ? Cn() : Sn();
1531
1548
  })
1532
- ), Sn = (
1549
+ ), kn = (
1533
1550
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1534
1551
  () => (
1535
1552
  /** @type {LocalizedString} */
1536
1553
  "Reset camera"
1537
1554
  )
1538
- ), _n = (
1555
+ ), An = (
1539
1556
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1540
1557
  () => (
1541
1558
  /** @type {LocalizedString} */
1542
1559
  "Camera resetten"
1543
1560
  )
1544
- ), Cn = (
1561
+ ), En = (
1545
1562
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1546
1563
  () => (
1547
1564
  /** @type {LocalizedString} */
1548
1565
  "Kamera zurücksetzen"
1549
1566
  )
1550
- ), kn = (
1567
+ ), xn = (
1551
1568
  /** @type {((inputs?: Controls_Camera_ResetInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_ResetInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1552
- ((n = {}, t = {}) => {
1553
- const e = t.locale ?? u();
1554
- return e === "nl" ? _n() : e === "de" ? Cn() : Sn();
1569
+ ((n = {}, e = {}) => {
1570
+ const t = e.locale ?? m();
1571
+ return t === "nl" ? An() : t === "de" ? En() : kn();
1555
1572
  })
1556
- ), An = (
1573
+ ), Tn = (
1557
1574
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
1558
1575
  () => (
1559
1576
  /** @type {LocalizedString} */
1560
1577
  "Zoom in"
1561
1578
  )
1562
- ), En = (
1579
+ ), Rn = (
1563
1580
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
1564
1581
  () => (
1565
1582
  /** @type {LocalizedString} */
1566
1583
  "Inzoomen"
1567
1584
  )
1568
- ), xn = (
1585
+ ), In = (
1569
1586
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
1570
1587
  () => (
1571
1588
  /** @type {LocalizedString} */
1572
1589
  "Hineinzoomen"
1573
1590
  )
1574
- ), Tn = (
1591
+ ), Ln = (
1575
1592
  /** @type {((inputs?: Controls_Camera_Zoomin1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Zoomin1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1576
- ((n = {}, t = {}) => {
1577
- const e = t.locale ?? u();
1578
- return e === "nl" ? En() : e === "de" ? xn() : An();
1593
+ ((n = {}, e = {}) => {
1594
+ const t = e.locale ?? m();
1595
+ return t === "nl" ? Rn() : t === "de" ? In() : Tn();
1579
1596
  })
1580
- ), Rn = (
1597
+ ), On = (
1581
1598
  /** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
1582
1599
  () => (
1583
1600
  /** @type {LocalizedString} */
1584
1601
  "Zoom out"
1585
1602
  )
1586
- ), In = (
1603
+ ), Nn = (
1587
1604
  /** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
1588
1605
  () => (
1589
1606
  /** @type {LocalizedString} */
1590
1607
  "Uitzoomen"
1591
1608
  )
1592
- ), Ln = (
1609
+ ), Mn = (
1593
1610
  /** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
1594
1611
  () => (
1595
1612
  /** @type {LocalizedString} */
1596
1613
  "Herauszoomen"
1597
1614
  )
1598
- ), On = (
1615
+ ), zn = (
1599
1616
  /** @type {((inputs?: Controls_Camera_Zoomout1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Zoomout1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1600
- ((n = {}, t = {}) => {
1601
- const e = t.locale ?? u();
1602
- return e === "nl" ? In() : e === "de" ? Ln() : Rn();
1617
+ ((n = {}, e = {}) => {
1618
+ const t = e.locale ?? m();
1619
+ return t === "nl" ? Nn() : t === "de" ? Mn() : On();
1603
1620
  })
1604
- ), Nn = (
1621
+ ), Pn = (
1605
1622
  /** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
1606
1623
  () => (
1607
1624
  /** @type {LocalizedString} */
1608
1625
  "Rotate left"
1609
1626
  )
1610
- ), Mn = (
1627
+ ), Fn = (
1611
1628
  /** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
1612
1629
  () => (
1613
1630
  /** @type {LocalizedString} */
1614
1631
  "Naar links draaien"
1615
1632
  )
1616
- ), zn = (
1633
+ ), $n = (
1617
1634
  /** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
1618
1635
  () => (
1619
1636
  /** @type {LocalizedString} */
1620
1637
  "Nach links drehen"
1621
1638
  )
1622
- ), Pn = (
1639
+ ), Dn = (
1623
1640
  /** @type {((inputs?: Controls_Camera_Rotateleft1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Rotateleft1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1624
- ((n = {}, t = {}) => {
1625
- const e = t.locale ?? u();
1626
- return e === "nl" ? Mn() : e === "de" ? zn() : Nn();
1641
+ ((n = {}, e = {}) => {
1642
+ const t = e.locale ?? m();
1643
+ return t === "nl" ? Fn() : t === "de" ? $n() : Pn();
1627
1644
  })
1628
- ), Fn = (
1645
+ ), Un = (
1629
1646
  /** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
1630
1647
  () => (
1631
1648
  /** @type {LocalizedString} */
1632
1649
  "Rotate right"
1633
1650
  )
1634
- ), $n = (
1651
+ ), Bn = (
1635
1652
  /** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
1636
1653
  () => (
1637
1654
  /** @type {LocalizedString} */
1638
1655
  "Naar rechts draaien"
1639
1656
  )
1640
- ), Dn = (
1657
+ ), Vn = (
1641
1658
  /** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
1642
1659
  () => (
1643
1660
  /** @type {LocalizedString} */
1644
1661
  "Nach rechts drehen"
1645
1662
  )
1646
- ), Bn = (
1663
+ ), jn = (
1647
1664
  /** @type {((inputs?: Controls_Camera_Rotateright1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Rotateright1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1648
- ((n = {}, t = {}) => {
1649
- const e = t.locale ?? u();
1650
- return e === "nl" ? $n() : e === "de" ? Dn() : Fn();
1665
+ ((n = {}, e = {}) => {
1666
+ const t = e.locale ?? m();
1667
+ return t === "nl" ? Bn() : t === "de" ? Vn() : Un();
1651
1668
  })
1652
- ), Un = (
1669
+ ), Hn = (
1653
1670
  /** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
1654
1671
  () => (
1655
1672
  /** @type {LocalizedString} */
1656
1673
  "Tilt up"
1657
1674
  )
1658
- ), Vn = (
1675
+ ), qn = (
1659
1676
  /** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
1660
1677
  () => (
1661
1678
  /** @type {LocalizedString} */
1662
1679
  "Omhoog kantelen"
1663
1680
  )
1664
- ), jn = (
1681
+ ), Gn = (
1665
1682
  /** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
1666
1683
  () => (
1667
1684
  /** @type {LocalizedString} */
1668
1685
  "Nach oben kippen"
1669
1686
  )
1670
- ), Hn = (
1687
+ ), Zn = (
1671
1688
  /** @type {((inputs?: Controls_Camera_Tiltup1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltup1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1672
- ((n = {}, t = {}) => {
1673
- const e = t.locale ?? u();
1674
- return e === "nl" ? Vn() : e === "de" ? jn() : Un();
1689
+ ((n = {}, e = {}) => {
1690
+ const t = e.locale ?? m();
1691
+ return t === "nl" ? qn() : t === "de" ? Gn() : Hn();
1675
1692
  })
1676
- ), qn = (
1693
+ ), Wn = (
1677
1694
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1678
1695
  () => (
1679
1696
  /** @type {LocalizedString} */
1680
1697
  "Tilt down"
1681
1698
  )
1682
- ), Gn = (
1699
+ ), Yn = (
1683
1700
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1684
1701
  () => (
1685
1702
  /** @type {LocalizedString} */
1686
1703
  "Omlaag kantelen"
1687
1704
  )
1688
- ), Zn = (
1705
+ ), Qn = (
1689
1706
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1690
1707
  () => (
1691
1708
  /** @type {LocalizedString} */
1692
1709
  "Nach unten kippen"
1693
1710
  )
1694
- ), Wn = (
1711
+ ), Kn = (
1695
1712
  /** @type {((inputs?: Controls_Camera_Tiltdown1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltdown1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1696
- ((n = {}, t = {}) => {
1697
- const e = t.locale ?? u();
1698
- return e === "nl" ? Gn() : e === "de" ? Zn() : qn();
1713
+ ((n = {}, e = {}) => {
1714
+ const t = e.locale ?? m();
1715
+ return t === "nl" ? Yn() : t === "de" ? Qn() : Wn();
1699
1716
  })
1700
- ), Yn = (
1717
+ ), Xn = (
1701
1718
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
1702
1719
  () => (
1703
1720
  /** @type {LocalizedString} */
1704
1721
  "Working…"
1705
1722
  )
1706
- ), Qn = (
1723
+ ), Jn = (
1707
1724
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
1708
1725
  () => (
1709
1726
  /** @type {LocalizedString} */
1710
1727
  "Bezig…"
1711
1728
  )
1712
- ), Kn = (
1729
+ ), ei = (
1713
1730
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
1714
1731
  () => (
1715
1732
  /** @type {LocalizedString} */
1716
1733
  "Läuft…"
1717
1734
  )
1718
- ), Xn = (
1735
+ ), ti = (
1719
1736
  /** @type {((inputs?: Commerce_Submit_BusyInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_BusyInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1720
- ((n = {}, t = {}) => {
1721
- const e = t.locale ?? u();
1722
- return e === "nl" ? Qn() : e === "de" ? Kn() : Yn();
1737
+ ((n = {}, e = {}) => {
1738
+ const t = e.locale ?? m();
1739
+ return t === "nl" ? Jn() : t === "de" ? ei() : Xn();
1723
1740
  })
1724
- ), Jn = (
1741
+ ), ni = (
1725
1742
  /** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
1726
1743
  () => (
1727
1744
  /** @type {LocalizedString} */
1728
1745
  "Done"
1729
1746
  )
1730
- ), ti = (
1747
+ ), ii = (
1731
1748
  /** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
1732
1749
  () => (
1733
1750
  /** @type {LocalizedString} */
1734
1751
  "Gelukt"
1735
1752
  )
1736
- ), ei = (
1753
+ ), si = (
1737
1754
  /** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
1738
1755
  () => (
1739
1756
  /** @type {LocalizedString} */
1740
1757
  "Fertig"
1741
1758
  )
1742
- ), ni = (
1759
+ ), oi = (
1743
1760
  /** @type {((inputs?: Commerce_Submit_SuccessInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_SuccessInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1744
- ((n = {}, t = {}) => {
1745
- const e = t.locale ?? u();
1746
- return e === "nl" ? ti() : e === "de" ? ei() : Jn();
1761
+ ((n = {}, e = {}) => {
1762
+ const t = e.locale ?? m();
1763
+ return t === "nl" ? ii() : t === "de" ? si() : ni();
1747
1764
  })
1748
- ), ii = (
1765
+ ), ri = (
1749
1766
  /** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
1750
1767
  () => (
1751
1768
  /** @type {LocalizedString} */
1752
1769
  "Failed"
1753
1770
  )
1754
- ), oi = (
1771
+ ), ai = (
1755
1772
  /** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
1756
1773
  () => (
1757
1774
  /** @type {LocalizedString} */
1758
1775
  "Mislukt"
1759
1776
  )
1760
- ), si = (
1777
+ ), li = (
1761
1778
  /** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
1762
1779
  () => (
1763
1780
  /** @type {LocalizedString} */
1764
1781
  "Fehlgeschlagen"
1765
1782
  )
1766
- ), ri = (
1783
+ ), ci = (
1767
1784
  /** @type {((inputs?: Commerce_Submit_FailedInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_FailedInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1768
- ((n = {}, t = {}) => {
1769
- const e = t.locale ?? u();
1770
- return e === "nl" ? oi() : e === "de" ? si() : ii();
1785
+ ((n = {}, e = {}) => {
1786
+ const t = e.locale ?? m();
1787
+ return t === "nl" ? ai() : t === "de" ? li() : ri();
1771
1788
  })
1772
1789
  );
1773
- const ai = {
1790
+ const di = {
1774
1791
  xmlns: "http://www.w3.org/2000/svg",
1775
1792
  width: 24,
1776
1793
  height: 24,
@@ -1781,22 +1798,22 @@ const ai = {
1781
1798
  "stroke-linecap": "round",
1782
1799
  "stroke-linejoin": "round"
1783
1800
  };
1784
- const Ct = ([n, t, e]) => {
1801
+ const ke = ([n, e, t]) => {
1785
1802
  const i = document.createElementNS("http://www.w3.org/2000/svg", n);
1786
- return Object.keys(t).forEach((o) => {
1787
- i.setAttribute(o, String(t[o]));
1788
- }), e?.length && e.forEach((o) => {
1789
- const s = Ct(o);
1790
- i.appendChild(s);
1803
+ return Object.keys(e).forEach((s) => {
1804
+ i.setAttribute(s, String(e[s]));
1805
+ }), t?.length && t.forEach((s) => {
1806
+ const o = ke(s);
1807
+ i.appendChild(o);
1791
1808
  }), i;
1792
- }, kt = (n, t = {}) => {
1809
+ }, Ae = (n, e = {}) => {
1793
1810
  const i = {
1794
- ...ai,
1795
- ...t
1811
+ ...di,
1812
+ ...e
1796
1813
  };
1797
- return Ct(["svg", i, n]);
1814
+ return ke(["svg", i, n]);
1798
1815
  };
1799
- const li = [
1816
+ const ui = [
1800
1817
  [
1801
1818
  "path",
1802
1819
  {
@@ -1806,7 +1823,7 @@ const li = [
1806
1823
  ["path", { d: "m3.3 7 8.7 5 8.7-5" }],
1807
1824
  ["path", { d: "M12 22V12" }]
1808
1825
  ];
1809
- const ci = [
1826
+ const hi = [
1810
1827
  [
1811
1828
  "path",
1812
1829
  {
@@ -1815,27 +1832,27 @@ const ci = [
1815
1832
  ],
1816
1833
  ["circle", { cx: "12", cy: "13", r: "3" }]
1817
1834
  ];
1818
- const At = [["path", { d: "m6 9 6 6 6-6" }]];
1819
- const di = [["path", { d: "m15 18-6-6 6-6" }]];
1820
- const ui = [["path", { d: "m9 18 6-6-6-6" }]];
1821
- const hi = [["path", { d: "m18 15-6-6-6 6" }]];
1822
- const mi = [
1835
+ const Ee = [["path", { d: "m6 9 6 6 6-6" }]];
1836
+ const mi = [["path", { d: "m15 18-6-6 6-6" }]];
1837
+ const pi = [["path", { d: "m9 18 6-6-6-6" }]];
1838
+ const fi = [["path", { d: "m18 15-6-6-6 6" }]];
1839
+ const gi = [
1823
1840
  ["path", { d: "M15 3h6v6" }],
1824
1841
  ["path", { d: "m21 3-7 7" }],
1825
1842
  ["path", { d: "m3 21 7-7" }],
1826
1843
  ["path", { d: "M9 21H3v-6" }]
1827
1844
  ];
1828
- const pi = [
1845
+ const bi = [
1829
1846
  ["path", { d: "m14 10 7-7" }],
1830
1847
  ["path", { d: "M20 10h-6V4" }],
1831
1848
  ["path", { d: "m3 21 7-7" }],
1832
1849
  ["path", { d: "M4 14h6v6" }]
1833
1850
  ];
1834
- const fi = [
1851
+ const vi = [
1835
1852
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }],
1836
1853
  ["path", { d: "M3 3v5h5" }]
1837
1854
  ];
1838
- const gi = [
1855
+ const yi = [
1839
1856
  ["path", { d: "M10 5H3" }],
1840
1857
  ["path", { d: "M12 19H3" }],
1841
1858
  ["path", { d: "M14 3v4" }],
@@ -1846,47 +1863,47 @@ const gi = [
1846
1863
  ["path", { d: "M8 10v4" }],
1847
1864
  ["path", { d: "M8 12H3" }]
1848
1865
  ];
1849
- const bi = [
1866
+ const Si = [
1850
1867
  ["path", { d: "M18 6 6 18" }],
1851
1868
  ["path", { d: "m6 6 12 12" }]
1852
1869
  ];
1853
- const vi = [
1870
+ const wi = [
1854
1871
  ["circle", { cx: "11", cy: "11", r: "8" }],
1855
1872
  ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }],
1873
+ ["line", { x1: "11", x2: "11", y1: "8", y2: "14" }],
1856
1874
  ["line", { x1: "8", x2: "14", y1: "11", y2: "11" }]
1857
1875
  ];
1858
- const yi = [
1876
+ const Ci = [
1859
1877
  ["circle", { cx: "11", cy: "11", r: "8" }],
1860
1878
  ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }],
1861
- ["line", { x1: "11", x2: "11", y1: "8", y2: "14" }],
1862
1879
  ["line", { x1: "8", x2: "14", y1: "11", y2: "11" }]
1863
1880
  ];
1864
- function y(n, { size: t = 20, strokeWidth: e = 1.75 } = {}) {
1865
- return kt(n, { width: t, height: t, "stroke-width": e });
1866
- }
1867
- const g = {
1868
- ar: (n) => y(li, n),
1869
- fullscreen: (n) => y(mi, n),
1870
- exitFullscreen: (n) => y(pi, n),
1871
- screenshot: (n) => y(ci, n),
1872
- tiltUp: (n) => y(hi, n),
1873
- tiltDown: (n) => y(At, n),
1874
- rotateLeft: (n) => y(di, n),
1875
- rotateRight: (n) => y(ui, n),
1876
- zoomIn: (n) => y(yi, n),
1877
- zoomOut: (n) => y(vi, n),
1878
- reset: (n) => y(fi, n),
1879
- configurator: (n) => y(gi, n),
1880
- close: (n) => y(bi, n)
1881
+ function y(n, { size: e = 20, strokeWidth: t = 1.75 } = {}) {
1882
+ return Ae(n, { width: e, height: e, "stroke-width": t });
1883
+ }
1884
+ const b = {
1885
+ ar: (n) => y(ui, n),
1886
+ fullscreen: (n) => y(gi, n),
1887
+ exitFullscreen: (n) => y(bi, n),
1888
+ screenshot: (n) => y(hi, n),
1889
+ tiltUp: (n) => y(fi, n),
1890
+ tiltDown: (n) => y(Ee, n),
1891
+ rotateLeft: (n) => y(mi, n),
1892
+ rotateRight: (n) => y(pi, n),
1893
+ zoomIn: (n) => y(wi, n),
1894
+ zoomOut: (n) => y(Ci, n),
1895
+ reset: (n) => y(vi, n),
1896
+ configurator: (n) => y(yi, n),
1897
+ close: (n) => y(Si, n)
1881
1898
  };
1882
- class b {
1899
+ class v {
1883
1900
  element;
1884
- constructor({ variant: t = "default", size: e = "default", label: i, icon: o, onClick: s, disabled: r = !1 } = {}) {
1885
- this.element = document.createElement("button"), this.element.className = `ui-btn ui-btn--${t} ui-btn--size-${e}`, i !== void 0 && (this.element.setAttribute("aria-label", i), this.element.title = i), o !== void 0 ? this.element.appendChild(o) : i !== void 0 && (this.element.textContent = i), s && this.element.addEventListener("click", s), this.element.disabled = r;
1901
+ constructor({ variant: e = "default", size: t = "default", label: i, icon: s, onClick: o, disabled: r = !1 } = {}) {
1902
+ this.element = document.createElement("button"), this.element.className = `ui-btn ui-btn--${e} ui-btn--size-${t}`, i !== void 0 && (this.element.setAttribute("aria-label", i), this.element.title = i), s !== void 0 ? this.element.appendChild(s) : i !== void 0 && (this.element.textContent = i), o && this.element.addEventListener("click", o), this.element.disabled = r;
1886
1903
  }
1887
- setIcon(t) {
1888
- const e = this.element.querySelector("svg");
1889
- e !== null ? e.replaceWith(t) : this.element.appendChild(t);
1904
+ setIcon(e) {
1905
+ const t = this.element.querySelector("svg");
1906
+ t !== null ? t.replaceWith(e) : this.element.appendChild(e);
1890
1907
  }
1891
1908
  }
1892
1909
  const p = {
@@ -1923,7 +1940,7 @@ const p = {
1923
1940
  // 32px
1924
1941
  9: "2.25rem"
1925
1942
  };
1926
- class wi {
1943
+ class _i {
1927
1944
  element;
1928
1945
  constructor() {
1929
1946
  this.element = document.createElement("div"), Object.assign(this.element.style, {
@@ -1936,25 +1953,25 @@ class wi {
1936
1953
  });
1937
1954
  }
1938
1955
  }
1939
- class Si {
1940
- constructor(t = {}) {
1941
- this.options = t, this.card = new wi(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
1956
+ class ki {
1957
+ constructor(e = {}) {
1958
+ this.options = e, this.card = new _i(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
1942
1959
  }
1943
1960
  options;
1944
1961
  card;
1945
1962
  backdrop;
1946
1963
  keyHandler = null;
1947
1964
  open() {
1948
- document.body.appendChild(this.backdrop), this.keyHandler = (t) => {
1949
- t.key === "Escape" && this.close();
1965
+ document.body.appendChild(this.backdrop), this.keyHandler = (e) => {
1966
+ e.key === "Escape" && this.close();
1950
1967
  }, document.addEventListener("keydown", this.keyHandler);
1951
1968
  }
1952
1969
  close() {
1953
1970
  this.backdrop.remove(), this.keyHandler !== null && (document.removeEventListener("keydown", this.keyHandler), this.keyHandler = null), this.options.onClose?.();
1954
1971
  }
1955
1972
  createBackdrop() {
1956
- const t = document.createElement("div");
1957
- return Object.assign(t.style, {
1973
+ const e = document.createElement("div");
1974
+ return Object.assign(e.style, {
1958
1975
  position: "fixed",
1959
1976
  inset: l[0],
1960
1977
  background: "oklch(0% 0 0 / 50%)",
@@ -1962,72 +1979,137 @@ class Si {
1962
1979
  display: "flex",
1963
1980
  alignItems: "center",
1964
1981
  justifyContent: "center"
1965
- }), t.addEventListener("click", (e) => {
1966
- e.target === t && this.close();
1967
- }), t;
1982
+ }), e.addEventListener("click", (t) => {
1983
+ t.target === e && this.close();
1984
+ }), e;
1968
1985
  }
1969
1986
  }
1970
- class _i {
1987
+ class Ai {
1971
1988
  element;
1972
1989
  selectCallback = null;
1973
- constructor(t, e, i) {
1990
+ constructor(e, t, i) {
1974
1991
  this.element = document.createElement("div"), this.element.className = "ui-toggle-group";
1975
- for (let o = 0; o < t.length; o++) {
1976
- const s = t[o], r = document.createElement("button");
1977
- r.className = "ui-toggle-group-item", r.dataset.value = s, r.textContent = i?.[o] ?? s, r.dataset.state = s === e ? "on" : "off", r.setAttribute("aria-pressed", s === e ? "true" : "false"), r.addEventListener("click", () => {
1978
- this.selectCallback?.(s);
1992
+ for (let s = 0; s < e.length; s++) {
1993
+ const o = e[s], r = document.createElement("button");
1994
+ r.className = "ui-toggle-group-item", r.dataset.value = o, r.textContent = i?.[s] ?? o, r.dataset.state = o === t ? "on" : "off", r.setAttribute("aria-pressed", o === t ? "true" : "false"), r.addEventListener("click", () => {
1995
+ this.selectCallback?.(o);
1979
1996
  }), this.element.appendChild(r);
1980
1997
  }
1981
1998
  }
1982
- setSelected(t) {
1983
- for (const e of this.element.querySelectorAll(".ui-toggle-group-item")) {
1984
- const i = e.dataset.value === t;
1985
- e.dataset.state = i ? "on" : "off", e.setAttribute("aria-pressed", i ? "true" : "false");
1999
+ setSelected(e) {
2000
+ for (const t of this.element.querySelectorAll(".ui-toggle-group-item")) {
2001
+ const i = t.dataset.value === e;
2002
+ t.dataset.state = i ? "on" : "off", t.setAttribute("aria-pressed", i ? "true" : "false");
1986
2003
  }
1987
2004
  }
1988
- onSelect(t) {
1989
- this.selectCallback = t;
2005
+ onSelect(e) {
2006
+ this.selectCallback = e;
1990
2007
  }
1991
2008
  /**
1992
2009
  * Enable only the given values; null lifts every restriction. A disabled
1993
2010
  * value stays visible (the buyer sees the option exists) but cannot be
1994
2011
  * picked: the selectable snapshot's "not in the list = grey".
1995
2012
  */
1996
- setEnabled(t) {
1997
- for (const e of this.element.querySelectorAll(".ui-toggle-group-item")) {
1998
- const i = t === null || t.includes(e.dataset.value ?? "");
1999
- e.disabled = !i, e.setAttribute("aria-disabled", i ? "false" : "true");
2013
+ setEnabled(e) {
2014
+ for (const t of this.element.querySelectorAll(".ui-toggle-group-item")) {
2015
+ const i = e === null || e.includes(t.dataset.value ?? "");
2016
+ t.disabled = !i, t.setAttribute("aria-disabled", i ? "false" : "true");
2000
2017
  }
2001
2018
  }
2002
2019
  }
2003
- class Ci {
2020
+ class Ei {
2004
2021
  element;
2005
2022
  select;
2006
- constructor(t, e, i, o, s) {
2007
- this.select = document.createElement("select"), this.select.className = "ui-native-select", this.select.dataset.name = t, this.select.setAttribute("aria-label", i);
2023
+ constructor(e, t, i, s, o) {
2024
+ this.select = document.createElement("select"), this.select.className = "ui-native-select", this.select.dataset.name = e, this.select.setAttribute("aria-label", i);
2008
2025
  const r = document.createElement("option");
2009
2026
  r.value = "", r.disabled = !0, r.textContent = i, this.select.appendChild(r);
2010
2027
  let a = !1;
2011
- for (let d = 0; d < e.length; d++) {
2012
- const m = e[d], v = document.createElement("option");
2013
- v.value = m, v.textContent = s?.[d] ?? m, m === o && (v.selected = !0, a = !0), this.select.appendChild(v);
2028
+ for (let u = 0; u < t.length; u++) {
2029
+ const f = t[u], h = document.createElement("option");
2030
+ h.value = f, h.textContent = o?.[u] ?? f, f === s && (h.selected = !0, a = !0), this.select.appendChild(h);
2014
2031
  }
2015
2032
  a || (r.selected = !0);
2016
- const h = kt(At, { width: 16, height: 16, "stroke-width": 2 });
2017
- h.classList.add("ui-native-select-icon"), this.element = document.createElement("div"), this.element.className = "ui-native-select-wrap", this.element.appendChild(this.select), this.element.appendChild(h);
2033
+ const d = Ae(Ee, { width: 16, height: 16, "stroke-width": 2 });
2034
+ d.classList.add("ui-native-select-icon"), this.element = document.createElement("div"), this.element.className = "ui-native-select-wrap", this.element.appendChild(this.select), this.element.appendChild(d);
2018
2035
  }
2019
- setSelected(t) {
2020
- this.select.value = t;
2036
+ setSelected(e) {
2037
+ this.select.value = e;
2021
2038
  }
2022
- onSelect(t) {
2039
+ onSelect(e) {
2023
2040
  this.select.addEventListener("change", () => {
2024
- t(this.select.value);
2041
+ e(this.select.value);
2025
2042
  });
2026
2043
  }
2027
2044
  /** Enable only the given values; null lifts every restriction (see ToggleGroup.setEnabled). */
2028
- setEnabled(t) {
2029
- for (const e of this.select.options)
2030
- e.value !== "" && (e.disabled = t !== null && !t.includes(e.value));
2045
+ setEnabled(e) {
2046
+ for (const t of this.select.options)
2047
+ t.value !== "" && (t.disabled = e !== null && !e.includes(t.value));
2048
+ }
2049
+ }
2050
+ class xi {
2051
+ element;
2052
+ input;
2053
+ valueText;
2054
+ values;
2055
+ options;
2056
+ selectCallback = null;
2057
+ settleCallback = null;
2058
+ constructor(e, t) {
2059
+ if (e.length === 0)
2060
+ throw new Error("Virtualdisplay: Slider needs at least one value");
2061
+ this.values = e, this.options = t, this.input = document.createElement("input"), this.input.type = "range", this.input.className = "ui-slider-input", this.input.min = "0", this.input.max = String(e.length - 1), this.input.step = "1", this.input.setAttribute("aria-label", t.label), this.valueText = document.createElement("span"), this.valueText.className = "ui-slider-value", this.valueText.setAttribute("aria-hidden", "true");
2062
+ const i = document.createElement("div");
2063
+ i.className = "ui-slider-track", i.appendChild(this.input), i.appendChild(this.buildEnds()), this.element = document.createElement("div"), this.element.className = "ui-slider", this.element.appendChild(i), this.element.appendChild(this.valueText);
2064
+ const s = t.initialSelected === void 0 ? 0 : e.indexOf(t.initialSelected);
2065
+ this.applyIndex(s === -1 ? 0 : s), this.listen();
2066
+ }
2067
+ setSelected(e) {
2068
+ const t = this.values.indexOf(e);
2069
+ t !== -1 && this.applyIndex(t);
2070
+ }
2071
+ /** Fires on every step a drag or keypress crosses, with the value it lands on. */
2072
+ onSelect(e) {
2073
+ this.selectCallback = e;
2074
+ }
2075
+ /** Fires once per interaction, when the value commits (drag released, key released). */
2076
+ onSettle(e) {
2077
+ this.settleCallback = e;
2078
+ }
2079
+ listen() {
2080
+ this.input.addEventListener("input", () => {
2081
+ const e = this.values[this.currentIndex];
2082
+ e !== void 0 && (this.applyIndex(this.currentIndex), this.selectCallback?.(e));
2083
+ }), this.input.addEventListener("change", () => {
2084
+ const e = this.values[this.currentIndex];
2085
+ e !== void 0 && this.settleCallback?.(e);
2086
+ });
2087
+ }
2088
+ get currentIndex() {
2089
+ return Number(this.input.value);
2090
+ }
2091
+ applyIndex(e) {
2092
+ this.input.value = String(e);
2093
+ const t = this.displayAt(e);
2094
+ this.valueText.textContent = t, this.input.setAttribute("aria-valuetext", t);
2095
+ const i = this.values.length === 1 ? 100 : e / (this.values.length - 1) * 100;
2096
+ this.element.style.setProperty("--ui-slider-pct", `${i}%`);
2097
+ }
2098
+ buildEnds() {
2099
+ const e = document.createElement("div");
2100
+ e.className = "ui-slider-ends", e.setAttribute("aria-hidden", "true");
2101
+ for (const t of [0, this.values.length - 1]) {
2102
+ const i = document.createElement("span");
2103
+ i.textContent = this.labelAt(t), e.appendChild(i);
2104
+ }
2105
+ return e;
2106
+ }
2107
+ labelAt(e) {
2108
+ return this.options.labels?.[e] ?? this.values[e] ?? "";
2109
+ }
2110
+ displayAt(e) {
2111
+ const t = this.labelAt(e);
2112
+ return this.options.unit === void 0 ? t : `${t} ${this.options.unit}`;
2031
2113
  }
2032
2114
  }
2033
2115
  const w = {
@@ -2047,7 +2129,7 @@ const w = {
2047
2129
  medium: "500",
2048
2130
  semibold: "600"
2049
2131
  }
2050
- }, x = w.fontFamily.sans.join(", "), ki = `
2132
+ }, x = w.fontFamily.sans.join(", "), Ti = `
2051
2133
  --primary: oklch(5% 0 0);
2052
2134
  --primary-foreground: oklch(100% 0 0);
2053
2135
  --secondary: oklch(92% 0 0);
@@ -2060,8 +2142,8 @@ const w = {
2060
2142
  --accent: oklch(92% 0 0);
2061
2143
  --accent-foreground: oklch(5% 0 0);
2062
2144
  --muted-foreground: oklch(44% 0 0);
2063
- `, Ai = `
2064
- :root { ${ki} }
2145
+ `, Ri = `
2146
+ :root { ${Ti} }
2065
2147
 
2066
2148
  /* ── Button ──────────────────────────────────────────────── */
2067
2149
  .ui-btn {
@@ -2192,6 +2274,97 @@ const w = {
2192
2274
  pointer-events: none;
2193
2275
  }
2194
2276
 
2277
+ /* ── Slider ──────────────────────────────────────────────── */
2278
+ .ui-slider {
2279
+ display: flex;
2280
+ align-items: center;
2281
+ gap: 0.75rem;
2282
+ inline-size: 100%;
2283
+ }
2284
+
2285
+ .ui-slider-track {
2286
+ flex: 1;
2287
+ min-inline-size: 0;
2288
+ }
2289
+
2290
+ /* Tabular figures keep the readout and layout steady mid-drag. */
2291
+ .ui-slider-value {
2292
+ font-family: ${x};
2293
+ font-size: 0.875rem;
2294
+ font-weight: 600;
2295
+ color: var(--foreground);
2296
+ font-variant-numeric: tabular-nums;
2297
+ white-space: nowrap;
2298
+ }
2299
+
2300
+ .ui-slider-ends {
2301
+ display: flex;
2302
+ justify-content: space-between;
2303
+ font-family: ${x};
2304
+ font-size: 0.75rem;
2305
+ color: var(--muted-foreground);
2306
+ font-variant-numeric: tabular-nums;
2307
+ }
2308
+
2309
+ /* 2.75rem tall: the whole input is the touch target (44px). */
2310
+ .ui-slider-input {
2311
+ appearance: none;
2312
+ display: block;
2313
+ inline-size: 100%;
2314
+ block-size: 2.75rem;
2315
+ margin: 0;
2316
+ padding: 0;
2317
+ background: transparent;
2318
+ cursor: pointer;
2319
+ }
2320
+ .ui-slider-input:focus-visible { outline: none; }
2321
+
2322
+ /* --ui-slider-pct is set by the component; it fills the track up to the thumb. */
2323
+ .ui-slider-input::-webkit-slider-runnable-track {
2324
+ block-size: 0.375rem;
2325
+ border-radius: 9999px;
2326
+ background: linear-gradient(to right, var(--primary) var(--ui-slider-pct, 0%), var(--secondary) var(--ui-slider-pct, 0%));
2327
+ }
2328
+ .ui-slider-input::-webkit-slider-thumb {
2329
+ appearance: none;
2330
+ inline-size: 1.25rem;
2331
+ block-size: 1.25rem;
2332
+ margin-block-start: -0.4375rem; /* centre the 1.25rem thumb on the 0.375rem track */
2333
+ border-radius: 50%;
2334
+ border: 2px solid var(--primary);
2335
+ background: var(--background);
2336
+ box-shadow: 0 1px 3px oklch(5% 0 0 / 20%);
2337
+ transition: box-shadow 200ms, border-color 200ms;
2338
+ }
2339
+ .ui-slider-input:focus-visible::-webkit-slider-thumb {
2340
+ border-color: var(--ring);
2341
+ box-shadow: 0 0 0 3px oklch(5% 0 0 / 12%);
2342
+ }
2343
+
2344
+ .ui-slider-input::-moz-range-track {
2345
+ block-size: 0.375rem;
2346
+ border-radius: 9999px;
2347
+ background: var(--secondary);
2348
+ }
2349
+ .ui-slider-input::-moz-range-progress {
2350
+ block-size: 0.375rem;
2351
+ border-radius: 9999px;
2352
+ background: var(--primary);
2353
+ }
2354
+ .ui-slider-input::-moz-range-thumb {
2355
+ inline-size: 1.25rem;
2356
+ block-size: 1.25rem;
2357
+ border-radius: 50%;
2358
+ border: 2px solid var(--primary);
2359
+ background: var(--background);
2360
+ box-shadow: 0 1px 3px oklch(5% 0 0 / 20%);
2361
+ transition: box-shadow 200ms, border-color 200ms;
2362
+ }
2363
+ .ui-slider-input:focus-visible::-moz-range-thumb {
2364
+ border-color: var(--ring);
2365
+ box-shadow: 0 0 0 3px oklch(5% 0 0 / 12%);
2366
+ }
2367
+
2195
2368
  /* ── Annotation layer ───────────────────────────────────── */
2196
2369
  .vd-annotations-layer {
2197
2370
  position: absolute;
@@ -2340,114 +2513,114 @@ const w = {
2340
2513
  50% { opacity: 0.55; }
2341
2514
  }
2342
2515
  `;
2343
- let lt = !1;
2344
- function Et() {
2345
- if (lt || typeof document > "u")
2516
+ let le = !1;
2517
+ function xe() {
2518
+ if (le || typeof document > "u")
2346
2519
  return;
2347
- lt = !0;
2520
+ le = !0;
2348
2521
  const n = document.createElement("style");
2349
- n.id = "vd-ui-vanilla", n.textContent = Ai, document.head.appendChild(n);
2522
+ n.id = "vd-ui-vanilla", n.textContent = Ri, document.head.appendChild(n);
2350
2523
  }
2351
- const Ei = w.fontFamily.sans.join(", ");
2352
- class xi {
2524
+ const Ii = w.fontFamily.sans.join(", ");
2525
+ class Li {
2353
2526
  qrLib = null;
2354
2527
  dialog = null;
2355
2528
  qrSlot = null;
2356
2529
  /** Open the modal immediately, with a loading placeholder in the QR slot. */
2357
2530
  show() {
2358
- this.hide(), Et(), this.dialog = new Si({ onClose: () => {
2531
+ this.hide(), xe(), this.dialog = new ki({ onClose: () => {
2359
2532
  this.dialog = null, this.qrSlot = null;
2360
2533
  } }), Object.assign(this.dialog.card.element.style, {
2361
2534
  display: "flex",
2362
2535
  flexDirection: "column",
2363
2536
  alignItems: "center",
2364
2537
  gap: l[3],
2365
- fontFamily: Ei
2366
- }), this.dialog.card.element.appendChild(this.createText($e(), {
2538
+ fontFamily: Ii
2539
+ }), this.dialog.card.element.appendChild(this.createText(Bt(), {
2367
2540
  fontSize: w.fontSize.base,
2368
2541
  fontWeight: w.fontWeight.semibold,
2369
2542
  color: p.neutral[900]
2370
- })), this.dialog.card.element.appendChild(this.createText(Ve(), {
2543
+ })), this.dialog.card.element.appendChild(this.createText(qt(), {
2371
2544
  fontSize: w.fontSize.sm,
2372
2545
  color: p.neutral[600]
2373
- })), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(Ge(), {
2546
+ })), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(Yt(), {
2374
2547
  fontSize: w.fontSize.xs,
2375
2548
  color: p.neutral[500]
2376
2549
  }));
2377
- const t = new b({
2550
+ const e = new v({
2378
2551
  variant: "outline",
2379
- label: Qe(),
2552
+ label: Jt(),
2380
2553
  onClick: () => {
2381
2554
  this.hide();
2382
2555
  }
2383
2556
  });
2384
- this.dialog.card.element.appendChild(t.element), this.dialog.open();
2557
+ this.dialog.card.element.appendChild(e.element), this.dialog.open();
2385
2558
  }
2386
2559
  /**
2387
2560
  * Render the QR for `url` into the open modal's slot, replacing the loading
2388
2561
  * placeholder. Resolves `true` once the QR is actually on screen; `false`
2389
2562
  * when the modal was closed before it could render (nothing reopens).
2390
2563
  */
2391
- async update(t) {
2564
+ async update(e) {
2392
2565
  this.qrLib ??= await import("./browser-ey6Iih3j.js").then((i) => i.b);
2393
- const e = await this.qrLib.toDataURL(t, {
2566
+ const t = await this.qrLib.toDataURL(e, {
2394
2567
  width: 256,
2395
2568
  margin: 4,
2396
2569
  errorCorrectionLevel: "M",
2397
2570
  color: { dark: p.black, light: p.white }
2398
2571
  });
2399
- return this.qrSlot === null ? !1 : (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createQrImage(e)), !0);
2572
+ return this.qrSlot === null ? !1 : (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createQrImage(t)), !0);
2400
2573
  }
2401
2574
  hide() {
2402
2575
  this.dialog?.close(), this.dialog = null, this.qrSlot = null;
2403
2576
  }
2404
- createText(t, e) {
2577
+ createText(e, t) {
2405
2578
  const i = document.createElement("p");
2406
- return i.textContent = t, Object.assign(i.style, { margin: "0", textAlign: "center", ...e }), i;
2579
+ return i.textContent = e, Object.assign(i.style, { margin: "0", textAlign: "center", ...t }), i;
2407
2580
  }
2408
2581
  createQrSlot() {
2409
- const t = document.createElement("div");
2410
- return t.className = "ui-qr-slot ui-qr-slot--loading", t;
2582
+ const e = document.createElement("div");
2583
+ return e.className = "ui-qr-slot ui-qr-slot--loading", e;
2411
2584
  }
2412
- createQrImage(t) {
2413
- const e = document.createElement("img");
2414
- return e.src = t, e.alt = "QR code", e;
2585
+ createQrImage(e) {
2586
+ const t = document.createElement("img");
2587
+ return t.src = e, t.alt = "QR code", t;
2415
2588
  }
2416
2589
  }
2417
- function ct(n) {
2418
- const t = Math.max(0, Math.min(1, n));
2419
- return t * t * (3 - 2 * t);
2590
+ function ce(n) {
2591
+ const e = Math.max(0, Math.min(1, n));
2592
+ return e * e * (3 - 2 * e);
2420
2593
  }
2421
- function Ti(n, t, e, i, o, s) {
2422
- const [r, a, h] = n, d = Math.cos(t), m = Math.sin(t), v = d * r + m * h, E = -m * r + d * h, k = Math.cos(e), C = Math.sin(e), R = k * a - C * E, P = C * a + k * E, J = 0.55;
2423
- return [i + v * s * J, o - R * s * J, P];
2594
+ function Oi(n, e, t, i, s, o) {
2595
+ const [r, a, d] = n, u = Math.cos(e), f = Math.sin(e), h = u * r + f * d, E = -f * r + u * d, k = Math.cos(t), _ = Math.sin(t), I = k * a - _ * E, P = _ * a + k * E, J = 0.55;
2596
+ return [i + h * o * J, s - I * o * J, P];
2424
2597
  }
2425
- function Ri(n, t, e) {
2426
- n.beginPath(), n.moveTo(t[0], t[1]), n.lineTo(e[0], e[1]), n.strokeStyle = "#000", n.lineWidth = 2, n.stroke();
2598
+ function Ni(n, e, t) {
2599
+ n.beginPath(), n.moveTo(e[0], e[1]), n.lineTo(t[0], t[1]), n.strokeStyle = "#000", n.lineWidth = 2, n.stroke();
2427
2600
  }
2428
- function Ii(n, t, e, i, o) {
2429
- const s = t(e), r = t(i), a = [
2430
- s[0] + (r[0] - s[0]) * o,
2431
- s[1] + (r[1] - s[1]) * o,
2432
- s[2]
2601
+ function Mi(n, e, t, i, s) {
2602
+ const o = e(t), r = e(i), a = [
2603
+ o[0] + (r[0] - o[0]) * s,
2604
+ o[1] + (r[1] - o[1]) * s,
2605
+ o[2]
2433
2606
  ];
2434
- Ri(n, s, a);
2607
+ Ni(n, o, a);
2435
2608
  }
2436
- const $ = [-1, -1, 1], D = [1, -1, 1], B = [1, -1, -1], U = [-1, -1, -1], V = [-1, 1, 1], j = [1, 1, 1], H = [1, 1, -1], q = [-1, 1, -1], dt = [
2609
+ const $ = [-1, -1, 1], D = [1, -1, 1], U = [1, -1, -1], B = [-1, -1, -1], V = [-1, 1, 1], j = [1, 1, 1], H = [1, 1, -1], q = [-1, 1, -1], de = [
2437
2610
  [$, D],
2438
- [D, B],
2439
- [B, U],
2440
- [U, $],
2611
+ [D, U],
2612
+ [U, B],
2613
+ [B, $],
2441
2614
  [$, V],
2442
2615
  [D, j],
2443
- [B, H],
2444
- [U, q],
2616
+ [U, H],
2617
+ [B, q],
2445
2618
  [V, j],
2446
2619
  [j, H],
2447
2620
  [H, q],
2448
2621
  [q, V]
2449
- ], Li = 400, ut = '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';
2450
- function Oi() {
2622
+ ], zi = 400, ue = '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';
2623
+ function Pi() {
2451
2624
  const n = document.createElement("div");
2452
2625
  Object.assign(n.style, {
2453
2626
  position: "absolute",
@@ -2461,15 +2634,15 @@ function Oi() {
2461
2634
  opacity: "0",
2462
2635
  transition: "opacity 0.3s ease-in-out"
2463
2636
  });
2464
- const t = document.createElement("canvas");
2465
- Object.assign(t.style, {
2637
+ const e = document.createElement("canvas");
2638
+ Object.assign(e.style, {
2466
2639
  width: "100%",
2467
2640
  height: "100%",
2468
2641
  position: "absolute",
2469
2642
  inset: "0"
2470
2643
  });
2471
- const e = document.createElement("div");
2472
- Object.assign(e.style, {
2644
+ const t = document.createElement("div");
2645
+ Object.assign(t.style, {
2473
2646
  position: "absolute",
2474
2647
  top: "56%",
2475
2648
  left: "0",
@@ -2483,16 +2656,16 @@ function Oi() {
2483
2656
  fontWeight: "400",
2484
2657
  color: "#000",
2485
2658
  fontVariantNumeric: "tabular-nums",
2486
- fontFamily: ut
2659
+ fontFamily: ue
2487
2660
  });
2488
- const o = document.createElement("span");
2489
- return Object.assign(o.style, {
2661
+ const s = document.createElement("span");
2662
+ return Object.assign(s.style, {
2490
2663
  fontSize: "13px",
2491
2664
  color: "#000",
2492
- fontFamily: ut
2493
- }), o.textContent = _t(), e.appendChild(i), e.appendChild(o), n.appendChild(t), n.appendChild(e), { overlay: n, canvas: t, pctEl: i, phaseEl: o };
2665
+ fontFamily: ue
2666
+ }), s.textContent = _e(), t.appendChild(i), t.appendChild(s), n.appendChild(e), n.appendChild(t), { overlay: n, canvas: e, pctEl: i, phaseEl: s };
2494
2667
  }
2495
- class Ni {
2668
+ class Fi {
2496
2669
  overlay;
2497
2670
  canvas;
2498
2671
  ctx;
@@ -2503,34 +2676,34 @@ class Ni {
2503
2676
  startTime;
2504
2677
  hidden = !1;
2505
2678
  visible = !1;
2506
- constructor(t, e = {}) {
2679
+ constructor(e, t = {}) {
2507
2680
  this.startTime = performance.now();
2508
- const i = Oi();
2509
- this.overlay = i.overlay, this.canvas = i.canvas, this.pctEl = i.pctEl, this.phaseEl = i.phaseEl, t.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick());
2510
- const o = e.showDelay ?? Li;
2681
+ const i = Pi();
2682
+ this.overlay = i.overlay, this.canvas = i.canvas, this.pctEl = i.pctEl, this.phaseEl = i.phaseEl, e.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick());
2683
+ const s = t.showDelay ?? zi;
2511
2684
  this.showTimerId = setTimeout(() => {
2512
2685
  this.reveal();
2513
- }, o);
2686
+ }, s);
2514
2687
  }
2515
2688
  get loadingTexts() {
2516
2689
  return {
2517
- downloading: _t(),
2518
- rendering: ln()
2690
+ downloading: _e(),
2691
+ rendering: un()
2519
2692
  };
2520
2693
  }
2521
- updateProgress(t, e) {
2522
- this.hidden || (this.pctEl.textContent = `${Math.round(t)}%`, this.phaseEl.textContent = e !== "" ? ` · ${e}` : "");
2694
+ updateProgress(e, t) {
2695
+ this.hidden || (this.pctEl.textContent = `${Math.round(e)}%`, this.phaseEl.textContent = t !== "" ? ` · ${t}` : "");
2523
2696
  }
2524
2697
  /**
2525
2698
  * Show an error state — stops animation and displays the error message.
2526
2699
  * The overlay stays visible so the user knows something went wrong.
2527
2700
  */
2528
- showError(t) {
2701
+ showError(e) {
2529
2702
  if (this.hidden = !1, this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.ctx !== null) {
2530
- const e = Math.min(devicePixelRatio, 2), i = this.canvas.width / e, o = this.canvas.height / e;
2531
- this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, i * e, o * e);
2703
+ const t = Math.min(devicePixelRatio, 2), i = this.canvas.width / t, s = this.canvas.height / t;
2704
+ this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, i * t, s * t);
2532
2705
  }
2533
- this.pctEl.textContent = "", this.phaseEl.textContent = t, this.phaseEl.style.color = "#b91c1c", this.reveal();
2706
+ this.pctEl.textContent = "", this.phaseEl.textContent = e, this.phaseEl.style.color = "#b91c1c", this.reveal();
2534
2707
  }
2535
2708
  hide() {
2536
2709
  if (!this.hidden) {
@@ -2557,8 +2730,8 @@ class Ni {
2557
2730
  sizeCanvas() {
2558
2731
  if (this.ctx === null)
2559
2732
  return;
2560
- const t = Math.min(devicePixelRatio, 2), e = this.overlay.clientWidth || 440, i = this.overlay.clientHeight || 360;
2561
- this.canvas.width = e * t, this.canvas.height = i * t, this.ctx.scale(t, t), this.ctx.lineCap = "round", this.ctx.lineJoin = "round";
2733
+ const e = Math.min(devicePixelRatio, 2), t = this.overlay.clientWidth || 440, i = this.overlay.clientHeight || 360;
2734
+ this.canvas.width = t * e, this.canvas.height = i * e, this.ctx.scale(e, e), this.ctx.lineCap = "round", this.ctx.lineJoin = "round";
2562
2735
  }
2563
2736
  tick = () => {
2564
2737
  this.hidden || (this.drawFrame(), this.animationId = requestAnimationFrame(this.tick));
@@ -2566,24 +2739,24 @@ class Ni {
2566
2739
  drawFrame() {
2567
2740
  if (this.ctx === null)
2568
2741
  return;
2569
- const t = this.canvas.width / Math.min(devicePixelRatio, 2), e = this.canvas.height / Math.min(devicePixelRatio, 2), i = (performance.now() - this.startTime) / 1e3;
2570
- this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, t, e);
2571
- const o = t / 2, s = e * 0.44, r = Math.min(t, e) * 0.08, a = 0.785, h = 0.615, d = (C) => Ti(C, a, h, o, s, r), m = 6, v = i % m / m, E = dt.length;
2742
+ const e = this.canvas.width / Math.min(devicePixelRatio, 2), t = this.canvas.height / Math.min(devicePixelRatio, 2), i = (performance.now() - this.startTime) / 1e3;
2743
+ this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, e, t);
2744
+ const s = e / 2, o = t * 0.44, r = Math.min(e, t) * 0.08, a = 0.785, d = 0.615, u = (_) => Oi(_, a, d, s, o, r), f = 6, h = i % f / f, E = de.length;
2572
2745
  let k;
2573
- v < 0.35 ? k = ct(v / 0.35) * E : v < 0.55 ? k = E : v < 0.9 ? k = (1 - ct((v - 0.55) / 0.35)) * E : k = 0, this.ctx.shadowBlur = 5, this.ctx.shadowColor = "rgba(30,30,30,0.08)";
2574
- for (let C = 0; C < E && !(C >= k); C++) {
2575
- const R = dt[C];
2576
- if (R === void 0)
2746
+ h < 0.35 ? k = ce(h / 0.35) * E : h < 0.55 ? k = E : h < 0.9 ? k = (1 - ce((h - 0.55) / 0.35)) * E : k = 0, this.ctx.shadowBlur = 5, this.ctx.shadowColor = "rgba(30,30,30,0.08)";
2747
+ for (let _ = 0; _ < E && !(_ >= k); _++) {
2748
+ const I = de[_];
2749
+ if (I === void 0)
2577
2750
  continue;
2578
- const P = Math.min(1, k - C);
2579
- Ii(this.ctx, d, R[0], R[1], P);
2751
+ const P = Math.min(1, k - _);
2752
+ Mi(this.ctx, u, I[0], I[1], P);
2580
2753
  }
2581
2754
  this.ctx.shadowBlur = 0;
2582
2755
  }
2583
2756
  }
2584
- class Mi {
2585
- constructor(t) {
2586
- this.options = t, this.element = document.createElement("div"), Object.assign(this.element.style, { display: "flex", gap: "0.375rem" }), this.onFullscreenChange = () => {
2757
+ class $i {
2758
+ constructor(e) {
2759
+ this.options = e, this.element = document.createElement("div"), Object.assign(this.element.style, { display: "flex", gap: "0.375rem" }), this.onFullscreenChange = () => {
2587
2760
  this.setFullscreenIcon(document.fullscreenElement !== null);
2588
2761
  }, document.addEventListener("fullscreenchange", this.onFullscreenChange);
2589
2762
  }
@@ -2592,30 +2765,30 @@ class Mi {
2592
2765
  arBtn = null;
2593
2766
  fullscreenBtn = null;
2594
2767
  onFullscreenChange;
2595
- setFullscreenIcon(t) {
2596
- this.fullscreenBtn !== null && this.fullscreenBtn.setIcon(t ? g.exitFullscreen() : g.fullscreen());
2768
+ setFullscreenIcon(e) {
2769
+ this.fullscreenBtn !== null && this.fullscreenBtn.setIcon(e ? b.exitFullscreen() : b.fullscreen());
2597
2770
  }
2598
- syncButton(t, e, i) {
2599
- if (e && t === null) {
2600
- const o = i();
2601
- return this.element.appendChild(o.element), o;
2771
+ syncButton(e, t, i) {
2772
+ if (t && e === null) {
2773
+ const s = i();
2774
+ return this.element.appendChild(s.element), s;
2602
2775
  }
2603
- return !e && t !== null ? (t.element.remove(), null) : t;
2776
+ return !t && e !== null ? (e.element.remove(), null) : e;
2604
2777
  }
2605
- applySettings(t) {
2606
- this.arBtn = this.syncButton(this.arBtn, t.ar !== !1 && this.options.onAr !== void 0, () => new b({
2778
+ applySettings(e) {
2779
+ this.arBtn = this.syncButton(this.arBtn, e.ar !== !1 && this.options.onAr !== void 0, () => new v({
2607
2780
  variant: "outline",
2608
2781
  size: "icon",
2609
- label: Me(),
2610
- icon: g.ar(),
2782
+ label: Ft(),
2783
+ icon: b.ar(),
2611
2784
  onClick: () => {
2612
2785
  this.options.onAr?.();
2613
2786
  }
2614
- })), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, t.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new b({
2787
+ })), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, e.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new v({
2615
2788
  variant: "outline",
2616
2789
  size: "icon",
2617
- label: tn(),
2618
- icon: g.fullscreen(),
2790
+ label: sn(),
2791
+ icon: b.fullscreen(),
2619
2792
  onClick: () => {
2620
2793
  this.options.onFullscreen?.();
2621
2794
  }
@@ -2625,81 +2798,81 @@ class Mi {
2625
2798
  document.removeEventListener("fullscreenchange", this.onFullscreenChange);
2626
2799
  }
2627
2800
  }
2628
- const T = 0.5;
2801
+ const R = 0.5;
2629
2802
  class z {
2630
2803
  element;
2631
- constructor(t, e) {
2804
+ constructor(e, t) {
2632
2805
  this.element = Object.assign(document.createElement("div"), { className: "vd-camera-controls" });
2633
2806
  const i = {
2634
- targetRotation: e.rotation,
2635
- targetTilt: e.tilt,
2636
- targetZoom: e.zoom,
2807
+ targetRotation: t.rotation,
2808
+ targetTilt: t.tilt,
2809
+ targetZoom: t.zoom,
2637
2810
  thetaOffset: 0
2638
- }, o = zi(t, e, i);
2639
- e.onChange((s) => {
2640
- i.targetRotation = s.rotation - i.thetaOffset, i.targetTilt = s.tilt, i.targetZoom = s.zoom, Pi(o, e, s);
2641
- }), this.element.appendChild(z.buildZoom(o.zoomOut, o.zoomIn)), this.element.appendChild(z.buildDpad(o.tiltUp, o.rotateLeft, o.reset, o.rotateRight, o.tiltDown));
2811
+ }, s = Di(e, t, i);
2812
+ t.onChange((o) => {
2813
+ i.targetRotation = o.rotation - i.thetaOffset, i.targetTilt = o.tilt, i.targetZoom = o.zoom, Ui(s, t, o);
2814
+ }), this.element.appendChild(z.buildZoom(s.zoomOut, s.zoomIn)), this.element.appendChild(z.buildDpad(s.tiltUp, s.rotateLeft, s.reset, s.rotateRight, s.tiltDown));
2642
2815
  }
2643
- static buildZoom(t, e) {
2816
+ static buildZoom(e, t) {
2644
2817
  const i = document.createElement("div");
2645
- return i.className = "vd-zoom", i.appendChild(t.element), i.appendChild(e.element), i;
2818
+ return i.className = "vd-zoom", i.appendChild(e.element), i.appendChild(t.element), i;
2646
2819
  }
2647
- static buildDpad(t, e, i, o, s) {
2820
+ static buildDpad(e, t, i, s, o) {
2648
2821
  const r = document.createElement("div");
2649
2822
  r.className = "vd-dpad";
2650
- for (const [a, h] of [
2651
- [t, "up"],
2652
- [e, "left"],
2823
+ for (const [a, d] of [
2824
+ [e, "up"],
2825
+ [t, "left"],
2653
2826
  [i, "center"],
2654
- [o, "right"],
2655
- [s, "down"]
2827
+ [s, "right"],
2828
+ [o, "down"]
2656
2829
  ])
2657
- a.element.classList.add(`vd-dpad-${h}`), r.appendChild(a.element);
2830
+ a.element.classList.add(`vd-dpad-${d}`), r.appendChild(a.element);
2658
2831
  return r;
2659
2832
  }
2660
2833
  }
2661
- function zi(n, t, e) {
2662
- const i = (r) => Math.max(t.limits?.minZoom ?? 1, Math.min(t.limits?.maxZoom ?? 1 / 0, r)), o = (r) => {
2663
- const a = t.limits?.minRotate, h = t.limits?.maxRotate;
2664
- return a !== void 0 || h !== void 0 ? Math.max(a ?? -1 / 0, Math.min(h ?? 1 / 0, r)) : r;
2665
- }, s = (r) => {
2666
- const a = t.limits?.minTilt, h = t.limits?.maxTilt;
2667
- if (a !== void 0 || h !== void 0) {
2668
- e.targetTilt = Math.max(a ?? 0, Math.min(h ?? 180, e.targetTilt + r)), n.tilt(e.targetTilt).set();
2834
+ function Di(n, e, t) {
2835
+ const i = (r) => Math.max(e.limits?.minZoom ?? 1, Math.min(e.limits?.maxZoom ?? 1 / 0, r)), s = (r) => {
2836
+ const a = e.limits?.minRotate, d = e.limits?.maxRotate;
2837
+ return a !== void 0 || d !== void 0 ? Math.max(a ?? -1 / 0, Math.min(d ?? 1 / 0, r)) : r;
2838
+ }, o = (r) => {
2839
+ const a = e.limits?.minTilt, d = e.limits?.maxTilt;
2840
+ if (a !== void 0 || d !== void 0) {
2841
+ t.targetTilt = Math.max(a ?? 0, Math.min(d ?? 180, t.targetTilt + r)), n.tilt(t.targetTilt).set();
2669
2842
  return;
2670
2843
  }
2671
- const d = e.targetTilt + r;
2672
- d > 180 || d < 0 ? (e.targetTilt = d > 180 ? 360 - d : -d, e.thetaOffset = (e.thetaOffset + 180) % 360, n.tilt(e.targetTilt).rotate(e.targetRotation + e.thetaOffset).set()) : (e.targetTilt = d, n.tilt(e.targetTilt).set());
2844
+ const u = t.targetTilt + r;
2845
+ u > 180 || u < 0 ? (t.targetTilt = u > 180 ? 360 - u : -u, t.thetaOffset = (t.thetaOffset + 180) % 360, n.tilt(t.targetTilt).rotate(t.targetRotation + t.thetaOffset).set()) : (t.targetTilt = u, n.tilt(t.targetTilt).set());
2673
2846
  };
2674
2847
  return {
2675
- zoomOut: new b({ variant: "outline", size: "icon", label: On(), icon: g.zoomOut(), onClick: () => {
2676
- e.targetZoom = i(e.targetZoom - 10), n.zoom(e.targetZoom).set();
2848
+ zoomOut: new v({ variant: "outline", size: "icon", label: zn(), icon: b.zoomOut(), onClick: () => {
2849
+ t.targetZoom = i(t.targetZoom - 10), n.zoom(t.targetZoom).set();
2677
2850
  } }),
2678
- zoomIn: new b({ variant: "outline", size: "icon", label: Tn(), icon: g.zoomIn(), onClick: () => {
2679
- e.targetZoom = i(e.targetZoom + 10), n.zoom(e.targetZoom).set();
2851
+ zoomIn: new v({ variant: "outline", size: "icon", label: Ln(), icon: b.zoomIn(), onClick: () => {
2852
+ t.targetZoom = i(t.targetZoom + 10), n.zoom(t.targetZoom).set();
2680
2853
  } }),
2681
- tiltUp: new b({ variant: "outline", size: "icon", label: Hn(), icon: g.tiltUp(), onClick: () => {
2682
- s(-15);
2854
+ tiltUp: new v({ variant: "outline", size: "icon", label: Zn(), icon: b.tiltUp(), onClick: () => {
2855
+ o(-15);
2683
2856
  } }),
2684
- rotateLeft: new b({ variant: "outline", size: "icon", label: Pn(), icon: g.rotateLeft(), onClick: () => {
2685
- e.targetRotation = o(e.targetRotation - 15), n.rotate(e.targetRotation + e.thetaOffset).set();
2857
+ rotateLeft: new v({ variant: "outline", size: "icon", label: Dn(), icon: b.rotateLeft(), onClick: () => {
2858
+ t.targetRotation = s(t.targetRotation - 15), n.rotate(t.targetRotation + t.thetaOffset).set();
2686
2859
  } }),
2687
- reset: new b({ variant: "outline", size: "icon", label: kn(), icon: g.reset(), onClick: () => {
2688
- e.thetaOffset = 0, n.reset();
2860
+ reset: new v({ variant: "outline", size: "icon", label: xn(), icon: b.reset(), onClick: () => {
2861
+ t.thetaOffset = 0, n.reset();
2689
2862
  } }),
2690
- rotateRight: new b({ variant: "outline", size: "icon", label: Bn(), icon: g.rotateRight(), onClick: () => {
2691
- e.targetRotation = o(e.targetRotation + 15), n.rotate(e.targetRotation + e.thetaOffset).set();
2863
+ rotateRight: new v({ variant: "outline", size: "icon", label: jn(), icon: b.rotateRight(), onClick: () => {
2864
+ t.targetRotation = s(t.targetRotation + 15), n.rotate(t.targetRotation + t.thetaOffset).set();
2692
2865
  } }),
2693
- tiltDown: new b({ variant: "outline", size: "icon", label: Wn(), icon: g.tiltDown(), onClick: () => {
2694
- s(15);
2866
+ tiltDown: new v({ variant: "outline", size: "icon", label: Kn(), icon: b.tiltDown(), onClick: () => {
2867
+ o(15);
2695
2868
  } })
2696
2869
  };
2697
2870
  }
2698
- function Pi(n, t, e) {
2699
- const i = t.limits;
2700
- i !== void 0 && (n.zoomOut.element.disabled = i.minZoom !== void 0 && e.zoom <= i.minZoom + T, n.zoomIn.element.disabled = i.maxZoom !== void 0 && e.zoom >= i.maxZoom - T, n.tiltUp.element.disabled = i.minTilt !== void 0 && e.tilt <= i.minTilt + T, n.tiltDown.element.disabled = i.maxTilt !== void 0 && e.tilt >= i.maxTilt - T, n.rotateLeft.element.disabled = i.minRotate !== void 0 && e.rotation <= i.minRotate + T, n.rotateRight.element.disabled = i.maxRotate !== void 0 && e.rotation >= i.maxRotate - T);
2871
+ function Ui(n, e, t) {
2872
+ const i = e.limits;
2873
+ i !== void 0 && (n.zoomOut.element.disabled = i.minZoom !== void 0 && t.zoom <= i.minZoom + R, n.zoomIn.element.disabled = i.maxZoom !== void 0 && t.zoom >= i.maxZoom - R, n.tiltUp.element.disabled = i.minTilt !== void 0 && t.tilt <= i.minTilt + R, n.tiltDown.element.disabled = i.maxTilt !== void 0 && t.tilt >= i.maxTilt - R, n.rotateLeft.element.disabled = i.minRotate !== void 0 && t.rotation <= i.minRotate + R, n.rotateRight.element.disabled = i.maxRotate !== void 0 && t.rotation >= i.maxRotate - R);
2701
2874
  }
2702
- const L = {
2875
+ const T = {
2703
2876
  /** Attribute selection requested (cancelable). `detail`: `{ attribute, value }`. */
2704
2877
  SELECT: "ui:select",
2705
2878
  /** Attribute selection applied. `detail`: `{ attribute, value }`. */
@@ -2710,32 +2883,97 @@ const L = {
2710
2883
  CONFIGURATION_CHANGE: "vd:configuration-change",
2711
2884
  /** Configuration submitted (bubbles). `detail`: the resolved configuration handed to the host. */
2712
2885
  CONFIGURATION_SUBMIT: "vd:configuration-submit"
2713
- }, Fi = 5;
2714
- let $i = 0;
2715
- function G(n) {
2716
- const t = n.replace(/([A-Z])/g, " $1").trim();
2717
- return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
2718
- }
2719
- function Di(n, t, e, i, o) {
2720
- const s = document.createElement("div");
2721
- s.className = "vd-attribute", s.dataset.name = n.name;
2722
- const r = document.createElement("span");
2723
- r.className = "vd-attribute-label", r.textContent = G(n.name), r.id = `vd-attribute-label-${$i++}`, s.appendChild(r), s.setAttribute("role", "group"), s.setAttribute("aria-labelledby", r.id);
2724
- const a = n.values.find((m) => t.getValue(n.name, m)?.isSelected === !0), h = n.values.map(G), d = n.values.length <= Fi ? new _i(n.values, a, h) : new Ci(n.name, n.values, G(n.name), a, h);
2725
- return d.onSelect((m) => {
2726
- e.dispatch(L.SELECT, { attribute: n.name, value: m }, !0).defaultPrevented || i(n.name, m);
2727
- }), o(n.name, (m) => {
2728
- d.setSelected(m.value), e.dispatch(L.SELECTED, { attribute: n.name, value: m.value });
2729
- }), s.appendChild(d.element), { element: s, setSelectable: (m) => {
2730
- d.setEnabled(m);
2731
- } };
2732
- }
2733
- const Bi = 80, Ui = 2500;
2734
- class Vi {
2735
- constructor(t, e = Ui) {
2736
- this.configuration = t, this.resetMs = e, this.element = document.createElement("div"), this.element.className = "vd-commerce vd-hidden";
2886
+ }, Te = {
2887
+ mm: 1,
2888
+ cm: 10,
2889
+ m: 1e3,
2890
+ in: 25.4
2891
+ }, he = 3;
2892
+ function Bi(n) {
2893
+ const e = n.stepMm / Te[n.displayUnit];
2894
+ for (let t = 0; t <= he; t++) {
2895
+ const i = e * 10 ** t;
2896
+ if (Math.abs(i - Math.round(i)) < 1e-9)
2897
+ return t;
2898
+ }
2899
+ return he;
2900
+ }
2901
+ function Vi(n, e, t) {
2902
+ const i = Bi(e), s = n / Te[e.displayUnit];
2903
+ return new Intl.NumberFormat(t, {
2904
+ minimumFractionDigits: i,
2905
+ maximumFractionDigits: i
2906
+ }).format(s);
2907
+ }
2908
+ function ji(n, e, t, i, s, o, r) {
2909
+ const a = m(), d = n.values.map((h) => Vi(Number(h), e, a)), u = n.values.find((h) => t.getValue(n.name, h)?.isSelected === !0) ?? n.defaultValue, f = new xi(n.values, {
2910
+ label: n.name,
2911
+ labels: d,
2912
+ unit: e.displayUnit,
2913
+ ...u !== void 0 && { initialSelected: u }
2914
+ });
2915
+ return f.onSelect((h) => {
2916
+ s(n.name, h);
2917
+ }), f.onSettle((h) => {
2918
+ i.dispatch(T.SELECT, { attribute: n.name, value: h }, !0).defaultPrevented || o(n.name, h);
2919
+ }), r(n.name, (h) => {
2920
+ f.setSelected(h.value), i.dispatch(T.SELECTED, { attribute: n.name, value: h.value });
2921
+ }), {
2922
+ element: f.element,
2923
+ // No per-notch grey-out on the slider in v1: a range control cannot
2924
+ // honestly disable one notch. The exclusion still works, the way it
2925
+ // always does, on the other side: the viewer's selectable snapshot greys
2926
+ // the leg that cannot do this size. A slider-side treatment is a later
2927
+ // refinement, noted in task 040.
2928
+ setSelectable: () => {
2929
+ }
2930
+ };
2931
+ }
2932
+ const Hi = 5;
2933
+ let qi = 0;
2934
+ function Q(n) {
2935
+ const e = n.replace(/([A-Z])/g, " $1").trim();
2936
+ return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
2937
+ }
2938
+ function Gi(n, e, t, i, s, o) {
2939
+ const r = document.createElement("div");
2940
+ r.className = "vd-attribute", r.dataset.name = n.name;
2941
+ const a = document.createElement("span");
2942
+ a.className = "vd-attribute-label", a.textContent = Q(n.name), a.id = `vd-attribute-label-${qi++}`, r.appendChild(a), r.setAttribute("role", "group"), r.setAttribute("aria-labelledby", a.id);
2943
+ const d = (f) => {
2944
+ r.style.display = f ? "none" : "";
2945
+ }, u = n.dimension !== void 0 ? ji(
2946
+ n,
2947
+ n.dimension,
2948
+ e,
2949
+ t,
2950
+ s,
2951
+ i,
2952
+ o
2953
+ ) : Zi(n, e, t, i, o);
2954
+ return r.appendChild(u.element), { element: r, setSelectable: u.setSelectable, setHidden: d };
2955
+ }
2956
+ function Zi(n, e, t, i, s) {
2957
+ const o = n.values.find(
2958
+ (d) => e.getValue(n.name, d)?.isSelected === !0
2959
+ ), r = n.values.map(Q), a = n.values.length <= Hi ? new Ai(n.values, o, r) : new Ei(n.name, n.values, Q(n.name), o, r);
2960
+ return a.onSelect((d) => {
2961
+ t.dispatch(T.SELECT, { attribute: n.name, value: d }, !0).defaultPrevented || i(n.name, d);
2962
+ }), s(n.name, (d) => {
2963
+ a.setSelected(d.value), t.dispatch(T.SELECTED, { attribute: n.name, value: d.value });
2964
+ }), {
2965
+ element: a.element,
2966
+ setSelectable: (d) => {
2967
+ a.setEnabled(d);
2968
+ }
2969
+ };
2970
+ }
2971
+ const Wi = 80, Yi = 2500;
2972
+ class Qi {
2973
+ constructor(e, t = Yi) {
2974
+ this.configuration = e, this.resetMs = t, this.element = document.createElement("div"), this.element.className = "vd-commerce vd-hidden";
2737
2975
  const i = document.createElement("div");
2738
- i.className = "vd-commerce-price", this.priceEl = document.createElement("span"), this.priceEl.className = "vd-price", this.vatEl = document.createElement("span"), this.vatEl.className = "vd-vat", i.append(this.priceEl, this.vatEl), this.button = new b({ variant: "default", onClick: () => {
2976
+ i.className = "vd-commerce-price", this.priceEl = document.createElement("span"), this.priceEl.className = "vd-price", this.vatEl = document.createElement("span"), this.vatEl.className = "vd-vat", i.append(this.priceEl, this.vatEl), this.button = new v({ variant: "default", onClick: () => {
2739
2977
  this.handleSubmit();
2740
2978
  } }), this.button.element.classList.add("vd-cta", "vd-hidden"), this.element.append(i, this.button.element), this.unsubscribe = this.configuration.onRender(() => {
2741
2979
  this.update();
@@ -2753,30 +2991,30 @@ class Vi {
2753
2991
  /** Re-render from the facade. Called on every resolve and on submit-handler registration. */
2754
2992
  update() {
2755
2993
  this.renderPrice(this.configuration.current), this.renderButton();
2756
- const t = this.configuration.current !== void 0 || this.configuration.submitEnabled;
2757
- this.element.classList.toggle("vd-hidden", !t);
2994
+ const e = this.configuration.current !== void 0 || this.configuration.submitEnabled;
2995
+ this.element.classList.toggle("vd-hidden", !e);
2758
2996
  }
2759
2997
  destroy() {
2760
2998
  this.unsubscribe(), this.resetTimer !== void 0 && clearTimeout(this.resetTimer), this.element.remove();
2761
2999
  }
2762
- renderPrice(t) {
2763
- if (t === void 0) {
3000
+ renderPrice(e) {
3001
+ if (e === void 0) {
2764
3002
  this.priceEl.textContent = "", this.vatEl.textContent = "";
2765
3003
  return;
2766
3004
  }
2767
- this.priceEl.textContent = ji(t.price, t.currency), this.vatEl.textContent = ht(this.configuration.vatDisplay);
3005
+ this.priceEl.textContent = Ki(e.price, e.currency), this.vatEl.textContent = me(this.configuration.vatDisplay);
2768
3006
  }
2769
3007
  renderButton() {
2770
- const t = this.configuration.submitEnabled;
2771
- this.button.element.classList.toggle("vd-hidden", !t), t && this.state === "idle" && this.setButtonText(ht(this.configuration.buttonLabel));
3008
+ const e = this.configuration.submitEnabled;
3009
+ this.button.element.classList.toggle("vd-hidden", !e), e && this.state === "idle" && this.setButtonText(me(this.configuration.buttonLabel));
2772
3010
  }
2773
3011
  async handleSubmit() {
2774
3012
  if (this.state !== "busy") {
2775
- this.setState("busy", Xn());
3013
+ this.setState("busy", ti());
2776
3014
  try {
2777
- await this.configuration.submit(), this.setState("success", ni());
3015
+ await this.configuration.submit(), this.setState("success", oi());
2778
3016
  } catch {
2779
- this.setState("failed", ri());
3017
+ this.setState("failed", ci());
2780
3018
  }
2781
3019
  this.scheduleReset();
2782
3020
  }
@@ -2786,43 +3024,43 @@ class Vi {
2786
3024
  this.state = "idle", this.update();
2787
3025
  }, this.resetMs);
2788
3026
  }
2789
- setState(t, e) {
2790
- this.state = t, this.element.dataset.submit = t, this.button.element.disabled = t === "busy", this.setButtonText(e);
3027
+ setState(e, t) {
3028
+ this.state = e, this.element.dataset.submit = e, this.button.element.disabled = e === "busy", this.setButtonText(t);
2791
3029
  }
2792
- setButtonText(t) {
2793
- this.button.element.textContent = t, this.button.element.setAttribute("aria-label", t);
3030
+ setButtonText(e) {
3031
+ this.button.element.textContent = e, this.button.element.setAttribute("aria-label", e);
2794
3032
  }
2795
3033
  }
2796
- function ht(n) {
2797
- return (n ?? "").slice(0, Bi);
3034
+ function me(n) {
3035
+ return (n ?? "").slice(0, Wi);
2798
3036
  }
2799
- function ji(n, t) {
3037
+ function Ki(n, e) {
2800
3038
  try {
2801
- const e = new Intl.NumberFormat(u(), { style: "currency", currency: t }), i = e.resolvedOptions().maximumFractionDigits ?? 2;
2802
- return e.format(n / 10 ** i);
3039
+ const t = new Intl.NumberFormat(m(), { style: "currency", currency: e }), i = t.resolvedOptions().maximumFractionDigits ?? 2;
3040
+ return t.format(n / 10 ** i);
2803
3041
  } catch {
2804
- return `${t} ${(n / 100).toFixed(2)}`;
3042
+ return `${e} ${(n / 100).toFixed(2)}`;
2805
3043
  }
2806
3044
  }
2807
- class xt {
3045
+ class Re {
2808
3046
  slot = null;
2809
3047
  panel = null;
2810
- attach(t, e) {
2811
- this.panel = e, e.style.display = "none", this.slot = document.createElement("div"), this.slot.className = "vd-slot-bottom-left", this.slot.appendChild(e), t.appendChild(this.slot);
3048
+ attach(e, t) {
3049
+ this.panel = t, t.style.display = "none", this.slot = document.createElement("div"), this.slot.className = "vd-slot-bottom-left", this.slot.appendChild(t), e.appendChild(this.slot);
2812
3050
  }
2813
- setVisible(t) {
2814
- this.panel !== null && (this.panel.style.display = t ? "flex" : "none");
3051
+ setVisible(e) {
3052
+ this.panel !== null && (this.panel.style.display = e ? "flex" : "none");
2815
3053
  }
2816
3054
  destroy() {
2817
3055
  this.slot?.remove(), this.slot = null, this.panel = null;
2818
3056
  }
2819
3057
  }
2820
- const Hi = 572;
2821
- class qi {
3058
+ const Xi = 572;
3059
+ class Ji {
2822
3060
  /** @param actionBarSlot The shared corner slot the AR/fullscreen buttons live in — the
2823
3061
  * "open configurator" toggle joins them there instead of floating as its own overlay. */
2824
- constructor(t) {
2825
- this.actionBarSlot = t;
3062
+ constructor(e) {
3063
+ this.actionBarSlot = e;
2826
3064
  }
2827
3065
  actionBarSlot;
2828
3066
  element = null;
@@ -2834,71 +3072,71 @@ class qi {
2834
3072
  collapsible = !1;
2835
3073
  expanded = !0;
2836
3074
  visible = !1;
2837
- attach(t, e) {
2838
- this.container = t, e.classList.add("vd-attributes-sidebar"), this.closeButton = new b({
3075
+ attach(e, t) {
3076
+ this.container = e, t.classList.add("vd-attributes-sidebar"), this.closeButton = new v({
2839
3077
  variant: "ghost",
2840
3078
  size: "icon-sm",
2841
- label: wn(),
2842
- icon: g.close({ size: 18 }),
3079
+ label: _n(),
3080
+ icon: b.close({ size: 18 }),
2843
3081
  onClick: () => {
2844
3082
  this.expanded = !1, this.render();
2845
3083
  }
2846
3084
  });
2847
3085
  const i = document.createElement("div");
2848
- i.className = "vd-sidebar-header", i.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(e), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(i, this.body), t.appendChild(this.element), this.openButton = new b({
3086
+ i.className = "vd-sidebar-header", i.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(t), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(i, this.body), e.appendChild(this.element), this.openButton = new v({
2849
3087
  variant: "outline",
2850
3088
  size: "icon",
2851
- label: gn(),
2852
- icon: g.configurator({ size: 18 }),
3089
+ label: yn(),
3090
+ icon: b.configurator({ size: 18 }),
2853
3091
  onClick: () => {
2854
3092
  this.expanded = !0, this.render();
2855
3093
  }
2856
3094
  }), this.openButton.element.classList.add("vd-configurator-toggle", "vd-hidden"), this.actionBarSlot.appendChild(this.openButton.element), this.observe();
2857
3095
  }
2858
- setVisible(t) {
2859
- this.visible = t, this.render();
3096
+ setVisible(e) {
3097
+ this.visible = e, this.render();
2860
3098
  }
2861
3099
  destroy() {
2862
3100
  this.observer?.disconnect(), this.observer = null, this.openButton?.element.remove(), this.element?.remove(), this.container?.classList.remove("vd-layout-sidebar-right", "vd-layout-sidebar-permanent"), this.container = null;
2863
3101
  }
2864
3102
  observe() {
2865
- typeof ResizeObserver > "u" || this.container === null || (this.observer = new ResizeObserver((t) => {
2866
- const e = t[0]?.contentRect.width ?? 0;
2867
- this.setCollapsible(e > 0 && e < Hi);
3103
+ typeof ResizeObserver > "u" || this.container === null || (this.observer = new ResizeObserver((e) => {
3104
+ const t = e[0]?.contentRect.width ?? 0;
3105
+ this.setCollapsible(t > 0 && t < Xi);
2868
3106
  }), this.observer.observe(this.container));
2869
3107
  }
2870
- setCollapsible(t) {
2871
- t !== this.collapsible && (this.collapsible = t, this.expanded = !t, this.render());
3108
+ setCollapsible(e) {
3109
+ e !== this.collapsible && (this.collapsible = e, this.expanded = !e, this.render());
2872
3110
  }
2873
3111
  render() {
2874
3112
  if (this.element === null || this.openButton === null || this.closeButton === null || this.container === null)
2875
3113
  return;
2876
- const t = this.visible && this.expanded, e = this.visible && !this.expanded;
2877
- this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", e), this.openButton.element.classList.toggle("vd-hidden", !e), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", t), this.container.classList.toggle("vd-layout-sidebar-permanent", t && !this.collapsible);
3114
+ const e = this.visible && this.expanded, t = this.visible && !this.expanded;
3115
+ this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", t), this.openButton.element.classList.toggle("vd-hidden", !t), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", e), this.container.classList.toggle("vd-layout-sidebar-permanent", e && !this.collapsible);
2878
3116
  }
2879
3117
  }
2880
- class Gi {
2881
- attach(t, e) {
3118
+ class es {
3119
+ attach(e, t) {
2882
3120
  }
2883
- setVisible(t) {
3121
+ setVisible(e) {
2884
3122
  }
2885
3123
  destroy() {
2886
3124
  }
2887
3125
  }
2888
- const Zi = {
2889
- "inframe-bottom-left": () => new xt(),
2890
- "sidebar-right": (n) => new qi(n),
2891
- hidden: () => new Gi()
3126
+ const ts = {
3127
+ "inframe-bottom-left": () => new Re(),
3128
+ "sidebar-right": (n) => new Ji(n),
3129
+ hidden: () => new es()
2892
3130
  };
2893
- function Wi(n, t) {
2894
- return (Zi[n ?? ""] ?? (() => new xt()))(t);
3131
+ function ns(n, e) {
3132
+ return (ts[n ?? ""] ?? (() => new Re()))(e);
2895
3133
  }
2896
- const Z = w.fontFamily.sans.join(", "), W = `
3134
+ const G = w.fontFamily.sans.join(", "), Z = `
2897
3135
  position: absolute;
2898
3136
  display: flex;
2899
3137
  z-index: 10;
2900
3138
  transition: inset-inline-end 0.18s ease;
2901
- `, Yi = `
3139
+ `, is = `
2902
3140
  /* Override browser's default black fullscreen backdrop */
2903
3141
  .vd-container:fullscreen {
2904
3142
  background: oklch(100% 0 0);
@@ -2906,7 +3144,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
2906
3144
 
2907
3145
  /* Layout slots — four corners */
2908
3146
  .vd-slot-top-right {
2909
- ${W}
3147
+ ${Z}
2910
3148
  inset-block-start: ${l[3]};
2911
3149
  inset-inline-end: ${l[3]};
2912
3150
  flex-direction: column;
@@ -2915,7 +3153,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
2915
3153
  }
2916
3154
 
2917
3155
  .vd-slot-bottom-left {
2918
- ${W}
3156
+ ${Z}
2919
3157
  inset-block-end: ${l[3]};
2920
3158
  inset-inline-start: ${l[3]};
2921
3159
  flex-direction: column;
@@ -2924,7 +3162,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
2924
3162
  }
2925
3163
 
2926
3164
  .vd-slot-bottom-right {
2927
- ${W}
3165
+ ${Z}
2928
3166
  inset-block-end: ${l[3]};
2929
3167
  inset-inline-end: ${l[3]};
2930
3168
  flex-direction: row;
@@ -2970,7 +3208,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
2970
3208
  border-radius: ${l[3]};
2971
3209
  padding: ${l[3]};
2972
3210
  box-shadow: 0 ${l[1]} ${l[4]} color-mix(in oklch, ${p.neutral[900]} 6%, transparent);
2973
- font-family: ${Z};
3211
+ font-family: ${G};
2974
3212
  }
2975
3213
 
2976
3214
  .vd-attribute {
@@ -2986,7 +3224,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
2986
3224
  color: ${p.neutral[500]};
2987
3225
  text-transform: uppercase;
2988
3226
  letter-spacing: 0.05em;
2989
- font-family: ${Z};
3227
+ font-family: ${G};
2990
3228
  }
2991
3229
 
2992
3230
  /* sidebar-right layout — a docked, full-height right panel */
@@ -3068,7 +3306,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
3068
3306
  gap: ${l[2]};
3069
3307
  padding-block-start: ${l[3]};
3070
3308
  border-block-start: 1px solid color-mix(in oklch, ${p.neutral[900]} 8%, transparent);
3071
- font-family: ${Z};
3309
+ font-family: ${G};
3072
3310
  }
3073
3311
 
3074
3312
  .vd-commerce-price {
@@ -3101,17 +3339,17 @@ const Z = w.fontFamily.sans.join(", "), W = `
3101
3339
  }
3102
3340
 
3103
3341
  `;
3104
- function Qi() {
3105
- if (Et(), document.getElementById("vd-styles") !== null)
3342
+ function ss() {
3343
+ if (xe(), document.getElementById("vd-styles") !== null)
3106
3344
  return;
3107
3345
  const n = document.createElement("style");
3108
- n.id = "vd-styles", n.textContent = Yi, document.head.appendChild(n);
3346
+ n.id = "vd-styles", n.textContent = is, document.head.appendChild(n);
3109
3347
  }
3110
- function Ki(n, t) {
3111
- const e = document.createElement("a");
3112
- e.href = `data:image/png;base64,${n}`, e.download = t, e.click();
3348
+ function os(n, e) {
3349
+ const t = document.createElement("a");
3350
+ t.href = `data:image/png;base64,${n}`, t.download = e, t.click();
3113
3351
  }
3114
- class Xi {
3352
+ class rs {
3115
3353
  options;
3116
3354
  settings = {};
3117
3355
  container = null;
@@ -3127,11 +3365,11 @@ class Xi {
3127
3365
  lastSelectable = null;
3128
3366
  layout = null;
3129
3367
  commerce = null;
3130
- constructor(t) {
3131
- this.options = t;
3368
+ constructor(e) {
3369
+ this.options = e;
3132
3370
  }
3133
- attach(t) {
3134
- Qi(), this.container = t, this.loading = new Ni(t), this.slots.topRight = this.createSlot(t, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(t, "vd-slot-bottom-right");
3371
+ attach(e) {
3372
+ ss(), this.container = e, this.loading = new Fi(e), this.slots.topRight = this.createSlot(e, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(e, "vd-slot-bottom-right");
3135
3373
  }
3136
3374
  onReady() {
3137
3375
  this.loading?.hide(), this.loading = null, this.mountToolbar(), this.cameraControls !== null && (this.cameraControls.element.style.display = "flex"), this.layout?.setVisible(!0);
@@ -3139,10 +3377,10 @@ class Xi {
3139
3377
  mountToolbar() {
3140
3378
  if (this.actionBar !== null || this.slots.bottomRight === null || this.container === null)
3141
3379
  return;
3142
- const t = typeof this.container.requestFullscreen == "function";
3143
- this.actionBar = new Mi({
3380
+ const e = typeof this.container.requestFullscreen == "function";
3381
+ this.actionBar = new $i({
3144
3382
  onAr: this.options.onAr,
3145
- onFullscreen: t ? () => {
3383
+ onFullscreen: e ? () => {
3146
3384
  this.toggleFullscreen();
3147
3385
  } : void 0
3148
3386
  }), this.actionBar.applySettings(this.settings), this.slots.bottomRight.appendChild(this.actionBar.element), this.syncScreenshotButton(), this.placeScreenshotButton();
@@ -3150,29 +3388,36 @@ class Xi {
3150
3388
  toggleFullscreen() {
3151
3389
  this.container !== null && (document.fullscreenElement !== null ? document.exitFullscreen() : (this.options.onFullscreenEnter?.(), this.container.requestFullscreen()));
3152
3390
  }
3153
- updateProgress(t, e) {
3154
- this.loading?.updateProgress(t, e);
3391
+ updateProgress(e, t) {
3392
+ this.loading?.updateProgress(e, t);
3155
3393
  }
3156
- showError(t) {
3157
- this.loading?.showError(t);
3394
+ showError(e) {
3395
+ this.loading?.showError(e);
3158
3396
  }
3159
- applyViewerSettings(t) {
3160
- this.settings = t, t.language !== void 0 && yt(t.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(t), this.cameraControls !== null && (this.cameraControls.element.style.display = t.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
3397
+ applyViewerSettings(e) {
3398
+ this.settings = e, e.language !== void 0 && Se(e.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(e), this.cameraControls !== null && (this.cameraControls.element.style.display = e.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
3161
3399
  }
3162
- renderAttributeControls(t, e) {
3163
- if (!(this.container === null || this.slots.topRight === null || this.slots.bottomRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new z(this.options.cameraApi, this.options.cameraPositionApi), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), e.length !== 0)) {
3400
+ renderAttributeControls(e, t) {
3401
+ if (!(this.container === null || this.slots.topRight === null || this.slots.bottomRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new z(
3402
+ this.options.cameraApi,
3403
+ this.options.cameraPositionApi
3404
+ ), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), t.length !== 0)) {
3164
3405
  this.attributes = document.createElement("div"), this.attributes.className = "vd-attributes", this.groupHandles = /* @__PURE__ */ new Map();
3165
- for (const i of e) {
3166
- const o = Di(
3406
+ for (const i of t) {
3407
+ const s = Gi(
3167
3408
  i,
3168
- t,
3409
+ e,
3169
3410
  this.options.eventBus,
3170
3411
  this.options.onSelect,
3412
+ this.options.onSelectTransient,
3171
3413
  this.options.onSubscribe
3172
3414
  );
3173
- this.groupHandles.set(i.name, o), this.attributes.appendChild(o.element);
3415
+ this.groupHandles.set(i.name, s), this.attributes.appendChild(s.element);
3174
3416
  }
3175
- this.commerce = new Vi(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = Wi(this.settings.configuratorLayout, this.slots.bottomRight), this.layout.attach(this.container, this.attributes), this.lastSelectable !== null && this.applySelectable(this.lastSelectable);
3417
+ this.commerce = new Qi(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = ns(
3418
+ this.settings.configuratorLayout,
3419
+ this.slots.bottomRight
3420
+ ), this.layout.attach(this.container, this.attributes), this.lastSelectable !== null && this.applySelectable(this.lastSelectable);
3176
3421
  }
3177
3422
  }
3178
3423
  /**
@@ -3181,11 +3426,11 @@ class Xi {
3181
3426
  * does not name are unrestricted. The interface renders, it never knows
3182
3427
  * the exclusion rules (kiesbaarheid live, binding-studio task 17).
3183
3428
  */
3184
- applySelectable(t) {
3185
- this.lastSelectable = t;
3186
- for (const [e, i] of this.groupHandles) {
3187
- const o = t.find((s) => s.name === e);
3188
- i.setSelectable(o?.selectable ?? null);
3429
+ applySelectable(e) {
3430
+ this.lastSelectable = e;
3431
+ for (const [t, i] of this.groupHandles) {
3432
+ const s = e.find((o) => o.name === t);
3433
+ i.setSelectable(s?.selectable ?? null), i.setHidden(s?.hidden === !0);
3189
3434
  }
3190
3435
  }
3191
3436
  get viewerSettings() {
@@ -3197,126 +3442,141 @@ class Xi {
3197
3442
  }
3198
3443
  destroy() {
3199
3444
  this.loading?.destroy(), this.screenshotBtn?.element.remove(), this.actionBar?.destroy(), this.actionBar?.element.remove(), this.cameraControls?.element.remove(), this.teardownConfigurator();
3200
- for (const t of Object.values(this.slots))
3201
- t?.remove();
3445
+ for (const e of Object.values(this.slots))
3446
+ e?.remove();
3202
3447
  this.container = null;
3203
3448
  }
3204
- createSlot(t, e) {
3449
+ createSlot(e, t) {
3205
3450
  const i = document.createElement("div");
3206
- return i.className = e, t.appendChild(i), i;
3451
+ return i.className = t, e.appendChild(i), i;
3207
3452
  }
3208
3453
  syncScreenshotButton() {
3209
- const t = this.settings.screenshot === !0;
3210
- t && this.screenshotBtn === null && (this.screenshotBtn = new b({
3454
+ const e = this.settings.screenshot === !0;
3455
+ e && this.screenshotBtn === null && (this.screenshotBtn = new v({
3211
3456
  variant: "outline",
3212
3457
  size: "icon",
3213
- label: hn(),
3214
- icon: g.screenshot(),
3458
+ label: fn(),
3459
+ icon: b.screenshot(),
3215
3460
  onClick: () => {
3216
- this.options.snapshotApi.take("snapshot.png").onDeveloped(({ data: e, filename: i }) => {
3217
- Ki(e, i);
3461
+ this.options.snapshotApi.take("snapshot.png").onDeveloped(({ data: t, filename: i }) => {
3462
+ os(t, i);
3218
3463
  });
3219
3464
  }
3220
- })), !t && this.screenshotBtn !== null && (this.screenshotBtn.element.remove(), this.screenshotBtn = null);
3465
+ })), !e && this.screenshotBtn !== null && (this.screenshotBtn.element.remove(), this.screenshotBtn = null);
3221
3466
  }
3222
3467
  placeScreenshotButton() {
3223
3468
  this.screenshotBtn === null || this.slots.topRight === null || (this.cameraControls !== null ? this.cameraControls.element.appendChild(this.screenshotBtn.element) : this.slots.topRight.appendChild(this.screenshotBtn.element));
3224
3469
  }
3225
3470
  }
3226
- const Ji = {};
3227
- class to {
3471
+ const as = {};
3472
+ class ls {
3228
3473
  defaultServer = "https://server.virtualdisplay.io";
3229
3474
  options;
3230
3475
  serverHost;
3231
3476
  extraParams;
3232
- constructor(t, e, i) {
3233
- this.options = t, this.serverHost = e, this.extraParams = i;
3477
+ constructor(e, t, i) {
3478
+ this.options = e, this.serverHost = t, this.extraParams = i;
3234
3479
  }
3235
3480
  /**
3236
3481
  * Create container and iframe, attach to parent element
3237
3482
  */
3238
3483
  create() {
3239
- const t = this.createContainer(), e = this.createIframe();
3240
- return t.appendChild(e), this.attachToParent(t), { container: t, iframe: e };
3484
+ const e = this.createContainer(), t = this.createIframe();
3485
+ return e.appendChild(t), this.attachToParent(e), { container: e, iframe: t };
3241
3486
  }
3242
3487
  createContainer() {
3243
- const t = document.createElement("div");
3244
- return t.className = "vd-container", Object.assign(t.style, {
3488
+ const e = document.createElement("div");
3489
+ return e.className = "vd-container", Object.assign(e.style, {
3245
3490
  position: "relative",
3246
3491
  width: "100%",
3247
3492
  height: "100%",
3248
3493
  overflow: "hidden"
3249
- }), t;
3494
+ }), e;
3250
3495
  }
3251
3496
  createIframe() {
3252
- const t = document.createElement("iframe");
3253
- return t.src = this.buildUrl(), t.setAttribute("allow", "xr-spatial-tracking; fullscreen"), t;
3497
+ const e = document.createElement("iframe");
3498
+ return e.src = this.buildUrl(), e.setAttribute("allow", "xr-spatial-tracking; fullscreen"), e;
3254
3499
  }
3255
- attachToParent(t) {
3256
- this.getParentElement().appendChild(t);
3500
+ attachToParent(e) {
3501
+ this.getParentElement().appendChild(e);
3257
3502
  }
3258
3503
  buildUrl() {
3259
- const t = this.getServerUrl(), e = new URL(t);
3260
- e.searchParams.set("license", this.options.license), e.searchParams.set("model", this.options.model), this.options.language !== void 0 && e.searchParams.set("language", this.options.language), this.options.session !== void 0 && e.searchParams.set("session", this.options.session), this.options.debug === !0 && e.searchParams.set("debug", "true"), this.options.traceparent !== void 0 && e.searchParams.set("traceparent", this.options.traceparent);
3261
- for (const [i, o] of Object.entries(this.extraParams ?? {}))
3262
- e.searchParams.set(i, o);
3263
- return e.toString();
3504
+ const e = this.getServerUrl(), t = new URL(e);
3505
+ this.setAddressParams(t), this.options.language !== void 0 && t.searchParams.set("language", this.options.language), this.options.session !== void 0 && t.searchParams.set("session", this.options.session), this.options.debug === !0 && t.searchParams.set("debug", "true"), this.options.traceparent !== void 0 && t.searchParams.set("traceparent", this.options.traceparent);
3506
+ for (const [i, s] of Object.entries(this.extraParams ?? {}))
3507
+ t.searchParams.set(i, s);
3508
+ return t.toString();
3509
+ }
3510
+ /**
3511
+ * Put the address form on the URL. `app` names an app row; the
3512
+ * `license`/`model` pair resolves to the model's default app. When both are
3513
+ * given, `app` wins and the pair is ignored with a warning, so adding `app`
3514
+ * to an existing integration is additive rather than a swap.
3515
+ */
3516
+ setAddressParams(e) {
3517
+ if (this.options.app === void 0) {
3518
+ e.searchParams.set("license", this.options.license), e.searchParams.set("model", this.options.model);
3519
+ return;
3520
+ }
3521
+ e.searchParams.set("app", this.options.app), (this.options.license !== void 0 || this.options.model !== void 0) && C.warn("Both `app` and `license`/`model` were supplied: `app` wins, the pair was ignored");
3264
3522
  }
3265
3523
  getServerUrl() {
3266
3524
  if (this.serverHost !== void 0)
3267
3525
  return this.serverHost;
3268
- if (Ji?.VITE_VIRTUALDISPLAY_SERVER_HOST === void 0)
3526
+ if (as?.VITE_VIRTUALDISPLAY_SERVER_HOST === void 0)
3269
3527
  return this.defaultServer;
3270
3528
  }
3271
3529
  getParentElement() {
3272
3530
  if (typeof this.options.parent != "string")
3273
3531
  return this.options.parent;
3274
- const t = document.querySelector(this.options.parent);
3275
- if (t === null)
3276
- throw f.parentNotFound(this.options.parent);
3277
- return t;
3532
+ const e = document.querySelector(this.options.parent);
3533
+ if (e === null)
3534
+ throw g.parentNotFound(this.options.parent);
3535
+ return e;
3278
3536
  }
3279
3537
  }
3280
- function eo(n) {
3281
- const { messenger: t } = n;
3282
- t.on(c.HANDSHAKE, (e) => {
3283
- Ot(e) && (_.info("Server handshake received, flushing publisher queue"), t.markReady());
3284
- }), t.on(c.SESSION, (e) => {
3285
- Nt(e) && n.onSession(e.sessionId);
3286
- }), t.on(c.MUTATION, (e) => {
3287
- Mt(e) && (n.attributes.handleMutationResult(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()));
3288
- }), t.on(c.SNAPSHOT, (e) => {
3289
- zt(e) && n.snapshot.handleSnapshotResult(e);
3290
- }), t.on(c.CAMERA, (e) => {
3291
- Pt(e) && n.cameraPosition.handlePositionUpdate(e);
3292
- }), t.on(c.LOADING_INDICATOR, (e) => {
3293
- $t(e) && (e.error !== void 0 ? n.ui.showError(e.error) : n.ui.updateProgress(e.progress, e.phase));
3294
- }), t.on(c.CONFIG, (e) => {
3295
- Ut(e) && n.applyConfig(e);
3296
- }), t.on(c.MAPPING, (e) => {
3297
- Ft(e) && (n.attributes.handleMappingReceived(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, e.attributes), n.readyStateTracker.handleMappingReceived());
3298
- }), no(n);
3299
- }
3300
- function no(n) {
3301
- const { messenger: t } = n;
3302
- t.on(c.FOCUS, (e) => {
3303
- Vt(e) && n.focus.handleStateReceived(e);
3304
- }), t.on(c.PRICING, (e) => {
3305
- jt(e) && n.configuration.handlePricingReceived(e.pricing);
3306
- }), t.on(c.SYNC, (e) => {
3307
- Dt(e) && n.onSync(e.connected);
3308
- }), t.on(c.SELECTABLE, (e) => {
3309
- Bt(e) && (n.selectable.handleSnapshot(e), n.ui.applySelectable(e.attributes));
3538
+ function cs(n) {
3539
+ const { messenger: e } = n;
3540
+ e.on(c.HANDSHAKE, (t) => {
3541
+ Me(t) && (C.info("Server handshake received, flushing publisher queue"), e.markReady());
3542
+ }), e.on(c.SESSION, (t) => {
3543
+ ze(t) && n.onSession(t.sessionId);
3544
+ }), e.on(c.MUTATION, (t) => {
3545
+ Fe(t) && (n.attributes.handleMutationResult(t), n.configuration.handleSelectionChanged(n.attributes.getSelection()));
3546
+ }), e.on(c.SNAPSHOT, (t) => {
3547
+ $e(t) && n.snapshot.handleSnapshotResult(t);
3548
+ }), e.on(c.CAMERA, (t) => {
3549
+ De(t) && n.cameraPosition.handlePositionUpdate(t);
3550
+ }), e.on(c.LOADING_INDICATOR, (t) => {
3551
+ Be(t) && (t.error !== void 0 ? n.ui.showError(t.error) : n.ui.updateProgress(t.progress, t.phase));
3552
+ }), e.on(c.CONFIG, (t) => {
3553
+ He(t) && n.applyConfig(t);
3554
+ }), e.on(c.MAPPING, (t) => {
3555
+ Ue(t) && (n.attributes.handleMappingReceived(t), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, t.attributes), n.readyStateTracker.handleMappingReceived());
3556
+ }), ds(n);
3557
+ }
3558
+ function ds(n) {
3559
+ const { messenger: e } = n;
3560
+ e.on(c.FOCUS, (t) => {
3561
+ qe(t) && n.focus.handleStateReceived(t);
3562
+ }), e.on(c.PRICING, (t) => {
3563
+ Ge(t) && n.configuration.handlePricingReceived(t.pricing);
3564
+ }), e.on(c.SYNC, (t) => {
3565
+ Ve(t) && n.onSync(t.connected);
3566
+ }), e.on(c.SELECTABLE, (t) => {
3567
+ je(t) && (n.selectable.handleSnapshot(t), n.ui.applySelectable(t.attributes));
3568
+ }), e.on(c.APP_RESOLVED, (t) => {
3569
+ Pe(t) && n.onAppResolved(t);
3310
3570
  });
3311
3571
  }
3312
- class io {
3572
+ class us {
3313
3573
  ready = !1;
3314
3574
  onReady;
3315
- constructor(t) {
3316
- this.onReady = t;
3575
+ constructor(e) {
3576
+ this.onReady = e;
3317
3577
  }
3318
3578
  handleMappingReceived() {
3319
- this.ready || (this.ready = !0, _.info("Mapping received from server, client is now ready"), this.onReady?.());
3579
+ this.ready || (this.ready = !0, C.info("Mapping received from server, client is now ready"), this.onReady?.());
3320
3580
  }
3321
3581
  get isReady() {
3322
3582
  return this.ready;
@@ -3325,7 +3585,7 @@ class io {
3325
3585
  this.ready = !1;
3326
3586
  }
3327
3587
  }
3328
- class oo {
3588
+ class hs {
3329
3589
  attributes;
3330
3590
  selectableState;
3331
3591
  readyStateTracker;
@@ -3351,50 +3611,59 @@ class oo {
3351
3611
  mutationFailedCallbacks = [];
3352
3612
  /** The viewer's tracking session id, once the server announces it (SESSION). */
3353
3613
  viewerSessionId;
3354
- constructor(t, e) {
3355
- this.options = t;
3356
- const i = e ?? {};
3357
- this.serverHost = i.serverHost, this.iframeParams = i.iframeParams, this.initializeLogging(), this.messenger = new Ht(
3614
+ /** Which app the viewer resolved, once reported (APP_RESOLVED). */
3615
+ resolvedApp;
3616
+ appResolvedCallbacks = [];
3617
+ constructor(e, t) {
3618
+ this.options = e;
3619
+ const i = t ?? {};
3620
+ this.serverHost = i.serverHost, this.iframeParams = i.iframeParams, this.initializeLogging(), this.messenger = new Ze(
3358
3621
  () => this.iframe?.contentWindow ?? null,
3359
3622
  i.messengerOptions
3360
3623
  );
3361
- const o = (r) => {
3362
- this.messenger.send(r);
3624
+ const s = (o) => {
3625
+ this.messenger.send(o);
3363
3626
  };
3364
- this.attributes = new ue(o, (r, a) => {
3365
- this.notifyMutationFailed(r, a);
3366
- }), this.selectableState = new he(), this.snapshotApi = new we(o), this.annotationsApi = new qt(o), this.cameraApi = new me(o), this.cameraPositionApi = new pe(), this.focusApi = new ve(o, (r) => {
3367
- this.dispatchFocusChange(r);
3368
- }), this.configurationApi = new be(
3369
- (r) => {
3370
- this.dispatchConfigurationChange(r);
3627
+ this.attributes = new pt(s, (o, r) => {
3628
+ this.notifyMutationFailed(o, r);
3629
+ }), this.selectableState = new ft(), this.snapshotApi = new _t(s), this.annotationsApi = new We(s), this.cameraApi = new gt(s), this.cameraPositionApi = new bt(), this.focusApi = new wt(s, (o) => {
3630
+ this.dispatchFocusChange(o);
3631
+ }), this.configurationApi = new St(
3632
+ (o) => {
3633
+ this.dispatchConfigurationChange(o);
3371
3634
  },
3372
- (r) => {
3373
- this.dispatchConfigurationSubmit(r);
3635
+ (o) => {
3636
+ this.dispatchConfigurationSubmit(o);
3374
3637
  }
3375
- ), this.eventBus = new Se(), this.arActivation = i.createArActivation?.(o), this.syncTracker = i.createSyncTracker?.(), this.readyStateTracker = new io(() => {
3638
+ ), this.eventBus = new kt(), this.arActivation = i.createArActivation?.(s), this.syncTracker = i.createSyncTracker?.(), this.readyStateTracker = new us(() => {
3376
3639
  this.notifyReady();
3377
- });
3378
- const s = this.arActivation;
3379
- this.ui = new Xi({
3640
+ }), this.ui = this.createStandardInterface(), this.wireIncomingMessages(), i.registerHandlers?.(this.messenger, s), this.messenger.start(), this.createAndConnectIframe();
3641
+ }
3642
+ /** The configurator UI, every callback bridging it to the facade that owns the action. */
3643
+ createStandardInterface() {
3644
+ const e = this.arActivation;
3645
+ return new rs({
3380
3646
  snapshotApi: this.snapshotApi,
3381
3647
  cameraApi: this.cameraApi,
3382
3648
  cameraPositionApi: this.cameraPositionApi,
3383
3649
  eventBus: this.eventBus,
3384
3650
  configuration: this.configurationApi,
3385
- onSelect: (r, a) => this.attributes.select(r, a),
3386
- onSubscribe: (r, a) => this.attributes.onChange(r, a),
3387
- ...s !== void 0 && { onAr: () => {
3388
- s.activate();
3389
- } },
3651
+ onSelect: (t, i) => this.attributes.select(t, i),
3652
+ onSelectTransient: (t, i) => this.attributes.selectTransient(t, i),
3653
+ onSubscribe: (t, i) => this.attributes.onChange(t, i),
3654
+ ...e !== void 0 && {
3655
+ onAr: () => {
3656
+ e.activate();
3657
+ }
3658
+ },
3390
3659
  onFullscreenEnter: () => {
3391
3660
  this.trackFullscreen();
3392
3661
  }
3393
- }), this.wireIncomingMessages(), i.registerHandlers?.(this.messenger, o), this.messenger.start(), this.createAndConnectIframe();
3662
+ });
3394
3663
  }
3395
3664
  /** Wire the inbound viewer protocol to the facades. */
3396
3665
  wireIncomingMessages() {
3397
- eo({
3666
+ cs({
3398
3667
  messenger: this.messenger,
3399
3668
  attributes: this.attributes,
3400
3669
  selectable: this.selectableState,
@@ -3404,113 +3673,131 @@ class oo {
3404
3673
  focus: this.focusApi,
3405
3674
  ui: this.ui,
3406
3675
  readyStateTracker: this.readyStateTracker,
3407
- applyConfig: (t) => {
3408
- this.handleConfig(t);
3676
+ applyConfig: (e) => {
3677
+ this.handleConfig(e);
3678
+ },
3679
+ onSession: (e) => {
3680
+ this.handleSession(e);
3409
3681
  },
3410
- onSession: (t) => {
3411
- this.handleSession(t);
3682
+ onSync: (e) => {
3683
+ this.syncTracker?.handleSync(e);
3412
3684
  },
3413
- onSync: (t) => {
3414
- this.syncTracker?.handleSync(t);
3685
+ onAppResolved: (e) => {
3686
+ this.handleAppResolved({
3687
+ appType: e.appType,
3688
+ name: e.name,
3689
+ ...e.slug !== void 0 && { slug: e.slug },
3690
+ ...e.submit !== void 0 && { submit: e.submit }
3691
+ });
3415
3692
  }
3416
3693
  });
3417
3694
  }
3695
+ /** Store the resolved app and notify every registered `onAppResolved` callback. */
3696
+ handleAppResolved(e) {
3697
+ this.resolvedApp = e;
3698
+ for (const t of this.appResolvedCallbacks)
3699
+ t(e);
3700
+ }
3418
3701
  /** Store the tracking session id and hand it to the AR flow, which waits on it for the QR. */
3419
- handleSession(t) {
3420
- this.viewerSessionId = t, this.arActivation?.onSession(t);
3702
+ handleSession(e) {
3703
+ this.viewerSessionId = e, this.arActivation?.onSession(e);
3421
3704
  }
3422
3705
  /** Forward a failed mutation to every registered `onMutationFailed` callback. */
3423
- notifyMutationFailed(t, e) {
3706
+ notifyMutationFailed(e, t) {
3424
3707
  for (const i of this.mutationFailedCallbacks)
3425
- i({ attribute: t, value: e });
3708
+ i({ attribute: e, value: t });
3426
3709
  }
3427
3710
  /** Flush the queued `onReady` callbacks once, then let the standard interface know. */
3428
3711
  notifyReady() {
3429
- const t = this.readyCallbacks;
3712
+ const e = this.readyCallbacks;
3430
3713
  this.readyCallbacks = [];
3431
- for (const e of t)
3432
- e(this);
3714
+ for (const t of e)
3715
+ t(this);
3433
3716
  this.ui.onReady();
3434
3717
  }
3435
3718
  /**
3436
3719
  * Dispatch a bubbling `vd:focus-change` event on the container so a page can
3437
3720
  * react to focus without registering an `onChange` callback.
3438
3721
  */
3439
- dispatchFocusChange(t) {
3722
+ dispatchFocusChange(e) {
3440
3723
  this.container?.dispatchEvent(
3441
- new CustomEvent(L.FOCUS_CHANGE, { detail: t, bubbles: !0 })
3724
+ new CustomEvent(T.FOCUS_CHANGE, { detail: e, bubbles: !0 })
3442
3725
  );
3443
3726
  }
3444
3727
  /**
3445
3728
  * Dispatch a bubbling `vd:configuration-change` event on the container so a
3446
3729
  * page or tag manager can react to price changes without a client callback.
3447
3730
  */
3448
- dispatchConfigurationChange(t) {
3731
+ dispatchConfigurationChange(e) {
3449
3732
  this.container?.dispatchEvent(
3450
- new CustomEvent(L.CONFIGURATION_CHANGE, { detail: t ?? null, bubbles: !0 })
3733
+ new CustomEvent(T.CONFIGURATION_CHANGE, { detail: e ?? null, bubbles: !0 })
3451
3734
  );
3452
3735
  }
3453
3736
  /** Dispatch a bubbling `vd:configuration-submit` event when the CTA is used. */
3454
- dispatchConfigurationSubmit(t) {
3737
+ dispatchConfigurationSubmit(e) {
3455
3738
  this.container?.dispatchEvent(
3456
- new CustomEvent(L.CONFIGURATION_SUBMIT, { detail: t, bubbles: !0 })
3739
+ new CustomEvent(T.CONFIGURATION_SUBMIT, { detail: e, bubbles: !0 })
3457
3740
  );
3458
3741
  }
3459
- handleConfig(t) {
3460
- const e = t.viewerSettings, i = this.options.viewerSettings;
3461
- if (e !== void 0 || i !== void 0) {
3462
- const o = i !== void 0 ? { ...e ?? {}, ...i } : e;
3463
- if (i !== void 0 && e !== void 0) {
3464
- const s = Object.entries(i).filter(([r, a]) => e[r] !== a).map(([r, a]) => `${r} (metadata: ${e[r] ?? "undefined"}, override: ${a})`);
3465
- s.length > 0 && _.warn(`Viewer settings override active: ${s.join(", ")}`);
3742
+ handleConfig(e) {
3743
+ const t = e.viewerSettings, i = this.options.viewerSettings;
3744
+ if (t !== void 0 || i !== void 0) {
3745
+ const s = i !== void 0 ? { ...t ?? {}, ...i } : t;
3746
+ if (i !== void 0 && t !== void 0) {
3747
+ const o = Object.entries(i).filter(([r, a]) => t[r] !== a).map(
3748
+ ([r, a]) => `${r} (metadata: ${t[r] ?? "undefined"}, override: ${a})`
3749
+ );
3750
+ o.length > 0 && C.warn(`Viewer settings override active: ${o.join(", ")}`);
3466
3751
  }
3467
- this.ui.applyViewerSettings(o), this.annotationsApi.setEnabled(o.annotations !== !1);
3752
+ this.ui.applyViewerSettings(s), this.annotationsApi.setEnabled(s.annotations !== !1);
3468
3753
  }
3469
- this.cameraPositionApi.applyLimits(t.cameraLimits);
3754
+ this.cameraPositionApi.applyLimits(e.cameraLimits);
3470
3755
  }
3471
3756
  /** Tell the viewer the user entered fullscreen, so it records the engagement. */
3472
3757
  trackFullscreen() {
3473
3758
  this.messenger.send({ type: c.FULLSCREEN });
3474
3759
  }
3475
3760
  initializeLogging() {
3476
- this.options.debug === !0 && de(), _.info("Initializing Virtualdisplay client", { model: this.options.model });
3761
+ this.options.debug === !0 && mt(), C.info("Initializing Virtualdisplay client", {
3762
+ ...this.options.app === void 0 ? { model: this.options.model } : { app: this.options.app }
3763
+ });
3477
3764
  }
3478
3765
  createAndConnectIframe() {
3479
- const e = new to(this.options, this.serverHost, this.iframeParams).create();
3480
- this.container = e.container, this.iframe = e.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container);
3766
+ const t = new ls(this.options, this.serverHost, this.iframeParams).create();
3767
+ this.container = t.container, this.iframe = t.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container);
3481
3768
  try {
3482
3769
  const i = new URL(this.iframe.src).origin;
3483
3770
  this.messenger.setTargetOrigin(i);
3484
3771
  } catch {
3485
3772
  }
3486
3773
  }
3487
- select(t, e) {
3488
- this.attributes.select(t, e);
3774
+ select(e, t) {
3775
+ this.attributes.select(e, t);
3489
3776
  }
3490
- getValues(t) {
3491
- return this.attributes.getValues(t);
3777
+ getValues(e) {
3778
+ return this.attributes.getValues(e);
3492
3779
  }
3493
- getValue(t, e) {
3494
- return this.attributes.getValue(t, e);
3780
+ getValue(e, t) {
3781
+ return this.attributes.getValue(e, t);
3495
3782
  }
3496
- onChange(t, e) {
3497
- this.attributes.onChange(t, e);
3783
+ onChange(e, t) {
3784
+ this.attributes.onChange(e, t);
3498
3785
  }
3499
- getAttribute(t) {
3500
- return this.attributes.getAttribute(t);
3786
+ getAttribute(e) {
3787
+ return this.attributes.getAttribute(e);
3501
3788
  }
3502
3789
  get isReady() {
3503
3790
  return this.readyStateTracker.isReady;
3504
3791
  }
3505
- onReady(t) {
3792
+ onReady(e) {
3506
3793
  if (this.readyStateTracker.isReady) {
3507
- t(this);
3794
+ e(this);
3508
3795
  return;
3509
3796
  }
3510
- this.readyCallbacks.push(t);
3797
+ this.readyCallbacks.push(e);
3511
3798
  }
3512
- onMutationFailed(t) {
3513
- this.mutationFailedCallbacks.push(t);
3799
+ onMutationFailed(e) {
3800
+ this.mutationFailedCallbacks.push(e);
3514
3801
  }
3515
3802
  /**
3516
3803
  * Subscribe to the viewer's selectability snapshots (kiesbaarheid live):
@@ -3519,12 +3806,20 @@ class oo {
3519
3806
  * exclusions never sends one: everything stays selectable and this never
3520
3807
  * fires.
3521
3808
  */
3522
- onSelectableChange(t) {
3523
- this.selectableState.onChange(t);
3809
+ onSelectableChange(e) {
3810
+ this.selectableState.onChange(e);
3811
+ }
3812
+ /**
3813
+ * Subscribe to which app this viewer resolved (type, name, public submit
3814
+ * settings). Reported once by the viewer after its resolve; fires immediately
3815
+ * when the report already arrived, so registration order does not matter.
3816
+ */
3817
+ onAppResolved(e) {
3818
+ this.appResolvedCallbacks.push(e), this.resolvedApp !== void 0 && e(this.resolvedApp);
3524
3819
  }
3525
3820
  /** The selectable values for one attribute right now, or null when unrestricted. */
3526
- getSelectable(t) {
3527
- return this.selectableState.selectableFor(t);
3821
+ getSelectable(e) {
3822
+ return this.selectableState.selectableFor(e);
3528
3823
  }
3529
3824
  /**
3530
3825
  * Trigger the composed AR flow directly (ar-session-handoff task 035): a host
@@ -3536,8 +3831,8 @@ class oo {
3536
3831
  activateAr() {
3537
3832
  this.arActivation?.activate();
3538
3833
  }
3539
- on(t, e) {
3540
- this.eventBus.on(t, e);
3834
+ on(e, t) {
3835
+ this.eventBus.on(e, t);
3541
3836
  }
3542
3837
  get annotations() {
3543
3838
  return this.annotationsApi;
@@ -3568,15 +3863,15 @@ class oo {
3568
3863
  this.readyStateTracker.clear(), this.readyCallbacks = [], this.mutationFailedCallbacks.length = 0, this.snapshotApi.clear(), this.messenger.destroy(), this.arActivation?.destroy(), this.ui.destroy(), this.container?.parentElement !== null && this.container?.parentElement !== void 0 && this.container.parentElement.removeChild(this.container), this.container = void 0, this.iframe = void 0;
3569
3864
  }
3570
3865
  }
3571
- const so = "ar.virtualdisplay.io";
3572
- function ro(n) {
3573
- const t = new URL(`https://${so}/go`);
3574
- return n.sessionId !== void 0 ? t.searchParams.set("session", n.sessionId) : (t.searchParams.set("license", n.license), t.searchParams.set("model", n.model)), t.toString();
3866
+ const ms = "ar.virtualdisplay.io";
3867
+ function ps(n) {
3868
+ const e = new URL(`https://${ms}/go`);
3869
+ return n.sessionId !== void 0 ? e.searchParams.set("session", n.sessionId) : n.app !== void 0 ? e.searchParams.set("app", n.app) : n.license !== void 0 && n.model !== void 0 && (e.searchParams.set("license", n.license), e.searchParams.set("model", n.model)), e.toString();
3575
3870
  }
3576
- const ao = 1500;
3577
- class lo {
3871
+ const fs = 1500;
3872
+ class gs {
3578
3873
  options;
3579
- qrModal = new xi();
3874
+ qrModal = new Li();
3580
3875
  /** The viewer's tracking session id, once the engine announces it (SESSION). */
3581
3876
  sessionId;
3582
3877
  /** Callbacks waiting on the SESSION message, resolved (or timed out) exactly once each. */
@@ -3585,20 +3880,20 @@ class lo {
3585
3880
  pendingTimers = /* @__PURE__ */ new Set();
3586
3881
  /** Set on destroy: an in-flight hand-off must not re-mount the modal or send QR_SHOWN. */
3587
3882
  destroyed = !1;
3588
- constructor(t) {
3589
- this.options = t;
3883
+ constructor(e) {
3884
+ this.options = e;
3590
3885
  }
3591
3886
  /** Store the engine-announced tracking session id and resolve anyone waiting on it. */
3592
- onSession(t) {
3593
- this.sessionId = t;
3594
- const e = this.waiters;
3887
+ onSession(e) {
3888
+ this.sessionId = e;
3889
+ const t = this.waiters;
3595
3890
  this.waiters = [];
3596
- for (const i of e)
3597
- i(t);
3891
+ for (const i of t)
3892
+ i(e);
3598
3893
  }
3599
3894
  /** The AR button handler: mobile activates AR in the engine, desktop shows the hand-off QR. */
3600
3895
  activate() {
3601
- if (le()) {
3896
+ if (ut()) {
3602
3897
  this.options.send({ type: c.AR_ACTIVATE });
3603
3898
  return;
3604
3899
  }
@@ -3606,8 +3901,8 @@ class lo {
3606
3901
  }
3607
3902
  destroy() {
3608
3903
  this.destroyed = !0;
3609
- for (const t of this.pendingTimers)
3610
- clearTimeout(t);
3904
+ for (const e of this.pendingTimers)
3905
+ clearTimeout(e);
3611
3906
  this.pendingTimers.clear(), this.waiters = [], this.qrModal.hide();
3612
3907
  }
3613
3908
  /**
@@ -3619,14 +3914,15 @@ class lo {
3619
3914
  */
3620
3915
  async showQrCode() {
3621
3916
  this.qrModal.show();
3622
- const t = await this.waitForSessionId();
3917
+ const e = await this.waitForSessionId();
3623
3918
  if (this.destroyed)
3624
3919
  return;
3625
- const e = ro({
3626
- sessionId: t,
3920
+ const t = ps({
3921
+ sessionId: e,
3922
+ app: this.options.app,
3627
3923
  license: this.options.license,
3628
3924
  model: this.options.model
3629
- }), i = await this.qrModal.update(e);
3925
+ }), i = await this.qrModal.update(t);
3630
3926
  if (this.destroyed) {
3631
3927
  this.qrModal.hide();
3632
3928
  return;
@@ -3640,60 +3936,61 @@ class lo {
3640
3936
  * rather than encoding a wrong one.
3641
3937
  */
3642
3938
  waitForSessionId() {
3643
- return this.sessionId !== void 0 ? Promise.resolve(this.sessionId) : new Promise((t) => {
3644
- const e = setTimeout(() => {
3645
- this.pendingTimers.delete(e), t(void 0);
3646
- }, ao);
3647
- this.pendingTimers.add(e), this.waiters.push((i) => {
3648
- this.pendingTimers.delete(e), clearTimeout(e), t(i);
3939
+ return this.sessionId !== void 0 ? Promise.resolve(this.sessionId) : new Promise((e) => {
3940
+ const t = setTimeout(() => {
3941
+ this.pendingTimers.delete(t), e(void 0);
3942
+ }, fs);
3943
+ this.pendingTimers.add(t), this.waiters.push((i) => {
3944
+ this.pendingTimers.delete(t), clearTimeout(t), e(i);
3649
3945
  });
3650
3946
  });
3651
3947
  }
3652
3948
  }
3653
- class co {
3949
+ class bs {
3654
3950
  callbacks = [];
3655
3951
  lastKnown;
3656
- handleSync(t) {
3657
- this.lastKnown = t;
3658
- for (const e of this.callbacks)
3659
- e(t);
3952
+ handleSync(e) {
3953
+ this.lastKnown = e;
3954
+ for (const t of this.callbacks)
3955
+ t(e);
3660
3956
  }
3661
- onChange(t) {
3662
- this.callbacks.push(t), this.lastKnown !== void 0 && t(this.lastKnown);
3957
+ onChange(e) {
3958
+ this.callbacks.push(e), this.lastKnown !== void 0 && e(this.lastKnown);
3663
3959
  }
3664
3960
  }
3665
- class mo extends oo {
3961
+ class Ss extends hs {
3666
3962
  syncStatusTracker;
3667
- constructor(t) {
3668
- const e = new co();
3669
- super(t, {
3670
- createArActivation: (i) => new lo({
3671
- license: t.license,
3672
- model: t.model,
3963
+ constructor(e) {
3964
+ const t = new bs();
3965
+ super(e, {
3966
+ createArActivation: (i) => new gs({
3967
+ app: e.app,
3968
+ license: e.license,
3969
+ model: e.model,
3673
3970
  send: i
3674
3971
  }),
3675
- createSyncTracker: () => e
3676
- }), this.syncStatusTracker = e;
3972
+ createSyncTracker: () => t
3973
+ }), this.syncStatusTracker = t;
3677
3974
  }
3678
3975
  /** Subscribe to the live sync channel's connection state (ar-session-handoff). Latest-wins, no buffering. */
3679
- onSyncChange(t) {
3680
- this.syncStatusTracker.onChange(t);
3976
+ onSyncChange(e) {
3977
+ this.syncStatusTracker.onChange(e);
3681
3978
  }
3682
3979
  }
3683
3980
  export {
3684
- qt as Annotations,
3685
- Zt as Attribute,
3686
- Gt as AttributeValue,
3687
- me as Camera,
3688
- be as Configuration,
3981
+ We as Annotations,
3982
+ Qe as Attribute,
3983
+ Ye as AttributeValue,
3984
+ gt as Camera,
3985
+ St as Configuration,
3689
3986
  A as ERROR_CODES,
3690
- ve as Focus,
3691
- ye as Photo,
3692
- we as Snapshot,
3693
- L as VD_EVENTS,
3694
- mo as VirtualdisplayClient,
3695
- f as VirtualdisplayError,
3696
- de as enableDebugMode,
3697
- uo as isDebugMode,
3698
- _ as logger
3987
+ wt as Focus,
3988
+ Ct as Photo,
3989
+ _t as Snapshot,
3990
+ T as VD_EVENTS,
3991
+ Ss as VirtualdisplayClient,
3992
+ g as VirtualdisplayError,
3993
+ mt as enableDebugMode,
3994
+ vs as isDebugMode,
3995
+ C as logger
3699
3996
  };