@pieai/swimmer-ui-kit 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,48 +1,48 @@
1
1
  "use client";
2
2
  import { S as e, a as t, t as n } from "./LiquidGroup-RTK_Uvgw.js";
3
- import { C as r, D as i, E as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, x as D, y as O } from "./GameStageTile-F41PxXDG.js";
4
- import { c as k, f as A, h as ee, i as j, m as te, n as M, o as N, p as ne, r as re, s as P, t as ie, y as ae } from "./GameAvatar-CRJ1r8l5.js";
5
- import { createElement as oe, forwardRef as F, useCallback as I, useEffect as L, useId as R, useRef as z, useState as B } from "react";
6
- import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
7
- import { FloatingPortal as W, autoUpdate as G, flip as K, offset as q, safePolygon as se, shift as ce, useClick as le, useDismiss as ue, useFloating as de, useFocus as fe, useHover as pe, useInteractions as me, useRole as he } from "@floating-ui/react";
3
+ import { C as r, D as i, O as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, k as _, l as v, m as y, n as b, o as x, p as S, r as C, s as w, t as T, u as E, v as D, w as O, x as k, y as A } from "./GameStageTile-BdG3tMV-.js";
4
+ import { c as j, f as M, h as N, i as P, m as ee, n as F, o as I, p as L, r as R, s as z, t as B, y as V } from "./GameAvatar-Cs5KVYFf.js";
5
+ import { cloneElement as te, createElement as H, forwardRef as ne, isValidElement as re, useCallback as U, useEffect as W, useId as G, useLayoutEffect as K, useRef as q, useState as J } from "react";
6
+ import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
7
+ import { FloatingFocusManager as ie, FloatingPortal as ae, autoUpdate as oe, flip as se, offset as ce, safePolygon as le, shift as ue, useClick as de, useDismiss as fe, useFloating as pe, useFocus as me, useHover as he, useInteractions as ge, useRole as _e } from "@floating-ui/react";
8
8
  //#region src/controls/GameListRow/GameListRow.tsx
9
- function ge({ title: e, description: t, thumbnail: n, current: r = !1, selected: i, disabled: a = !1, onSelect: o, selectLabel: s, actions: c, className: l, hue: u, ...d }) {
10
- let f = z(null), p = /* @__PURE__ */ U(V, { children: [
11
- n ? /* @__PURE__ */ H("span", {
9
+ function ve({ title: e, description: t, thumbnail: n, current: r = !1, selected: i, disabled: a = !1, onSelect: o, selectLabel: s, actions: c, className: l, hue: u, ...d }) {
10
+ let f = q(null), p = /* @__PURE__ */ Z(Y, { children: [
11
+ n ? /* @__PURE__ */ X("span", {
12
12
  className: "game-ui-list-row-thumbnail",
13
13
  children: n
14
14
  }) : null,
15
- /* @__PURE__ */ U("span", {
15
+ /* @__PURE__ */ Z("span", {
16
16
  className: "game-ui-list-row-copy",
17
- children: [/* @__PURE__ */ H("span", {
17
+ children: [/* @__PURE__ */ X("span", {
18
18
  className: "game-ui-list-row-title",
19
19
  children: e
20
- }), t ? /* @__PURE__ */ H("span", {
20
+ }), t ? /* @__PURE__ */ X("span", {
21
21
  className: "game-ui-list-row-description",
22
22
  children: t
23
23
  }) : null]
24
24
  }),
25
- r ? /* @__PURE__ */ H("span", {
25
+ r ? /* @__PURE__ */ X("span", {
26
26
  className: "game-ui-list-row-current",
27
27
  "aria-hidden": "true"
28
28
  }) : null
29
29
  ] });
30
- return /* @__PURE__ */ U("div", {
30
+ return /* @__PURE__ */ Z("div", {
31
31
  ...d,
32
32
  className: ["game-ui-list-row", l].filter(Boolean).join(" "),
33
33
  "data-selected": i || void 0,
34
34
  "data-game-ui-disabled": a || void 0,
35
35
  "data-game-ui-paint": "",
36
36
  style: {
37
- ...N(u),
37
+ ...I(u),
38
38
  ...d.style
39
39
  },
40
40
  children: [
41
- /* @__PURE__ */ H(P, {
41
+ /* @__PURE__ */ X(z, {
42
42
  static: !o,
43
43
  pressTarget: f
44
44
  }),
45
- o ? /* @__PURE__ */ U("button", {
45
+ o ? /* @__PURE__ */ Z("button", {
46
46
  type: "button",
47
47
  className: "game-ui-list-row-main",
48
48
  ref: f,
@@ -51,13 +51,13 @@ function ge({ title: e, description: t, thumbnail: n, current: r = !1, selected:
51
51
  "aria-label": s,
52
52
  "aria-current": r ? "true" : void 0,
53
53
  "aria-pressed": i,
54
- children: [p, /* @__PURE__ */ H(k, {})]
55
- }) : /* @__PURE__ */ U("div", {
54
+ children: [p, /* @__PURE__ */ X(j, {})]
55
+ }) : /* @__PURE__ */ Z("div", {
56
56
  className: "game-ui-list-row-main",
57
57
  "aria-current": r ? "true" : void 0,
58
- children: [p, /* @__PURE__ */ H(k, {})]
58
+ children: [p, /* @__PURE__ */ X(j, {})]
59
59
  }),
60
- c ? /* @__PURE__ */ H("div", {
60
+ c ? /* @__PURE__ */ X("div", {
61
61
  className: "game-ui-list-row-actions",
62
62
  children: c
63
63
  }) : null
@@ -66,19 +66,19 @@ function ge({ title: e, description: t, thumbnail: n, current: r = !1, selected:
66
66
  }
67
67
  //#endregion
68
68
  //#region src/controls/GameOtpInput/GameOtpInput.tsx
69
- function J(e) {
69
+ function ye(e) {
70
70
  return e.normalize("NFKC").replace(/[^0-9]/g, "");
71
71
  }
72
- function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i = !1, disabled: a = !1, readOnly: o = !1, getSlotLabel: s = (e, t) => `${e + 1} / ${t}`, getSlotDescription: c, className: l, "aria-describedby": u, ...d }) {
72
+ function be({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i = !1, disabled: a = !1, readOnly: o = !1, getSlotLabel: s = (e, t) => `${e + 1} / ${t}`, getSlotDescription: c, className: l, "aria-describedby": u, ...d }) {
73
73
  if (!Number.isSafeInteger(e) || e < 1 || e > 32) throw RangeError("GameOtpInput length must be an integer from 1 to 32.");
74
- let f = R(), p = z([]), m = z(!1), [h, g] = B(null), _ = J(t).slice(0, e), v = (t) => {
74
+ let f = G(), p = q([]), m = q(!1), [h, g] = J(null), _ = ye(t).slice(0, e), v = (t) => {
75
75
  let n = p.current[Math.max(0, Math.min(t, e - 1))];
76
76
  n?.focus(), n?.select();
77
77
  }, y = (t) => {
78
78
  t !== _ && (n(t), t.length === e && r?.(t));
79
79
  }, b = (t, n) => {
80
80
  if (a || o) return;
81
- let r = J(n);
81
+ let r = ye(n);
82
82
  if (!r) {
83
83
  let e = p.current[t];
84
84
  e && (e.value = _[t] ?? "");
@@ -104,7 +104,7 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
104
104
  }[t.key];
105
105
  r === void 0 ? (t.key === "Backspace" || t.key === "Delete") && (t.preventDefault(), x(n, t.key === "Backspace")) : (t.preventDefault(), v(r));
106
106
  };
107
- return /* @__PURE__ */ H("div", {
107
+ return /* @__PURE__ */ X("div", {
108
108
  ...d,
109
109
  role: "group",
110
110
  "aria-describedby": u,
@@ -113,9 +113,9 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
113
113
  dir: "ltr",
114
114
  children: Array.from({ length: e }, (t, n) => {
115
115
  let r = c?.(n, e), l = r ? `${f}-${n}-description` : void 0;
116
- return /* @__PURE__ */ U("span", {
116
+ return /* @__PURE__ */ Z("span", {
117
117
  className: "game-ui-otp-slot",
118
- children: [/* @__PURE__ */ H("input", {
118
+ children: [/* @__PURE__ */ X("input", {
119
119
  ref: (e) => {
120
120
  p.current[n] = e;
121
121
  },
@@ -154,7 +154,7 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
154
154
  m.current = !1, g(null), b(n, t);
155
155
  },
156
156
  "data-game-ui-paint": ""
157
- }), r ? /* @__PURE__ */ H("span", {
157
+ }), r ? /* @__PURE__ */ X("span", {
158
158
  id: l,
159
159
  className: "game-ui-sr-only",
160
160
  children: r
@@ -165,10 +165,10 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
165
165
  }
166
166
  //#endregion
167
167
  //#region src/controls/GameSelect/GameSelect.tsx
168
- var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
169
- return /* @__PURE__ */ H("span", {
168
+ var xe = ne(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
169
+ return /* @__PURE__ */ X("span", {
170
170
  className: "game-ui-select-frame",
171
- children: /* @__PURE__ */ oe("select", {
171
+ children: /* @__PURE__ */ H("select", {
172
172
  ...i,
173
173
  ref: a,
174
174
  key: "control",
@@ -176,7 +176,7 @@ var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
176
176
  "data-invalid": t ? "true" : void 0,
177
177
  "data-game-ui-paint": "",
178
178
  style: {
179
- ...N(n),
179
+ ...I(n),
180
180
  ...r
181
181
  },
182
182
  className: [
@@ -189,13 +189,13 @@ var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
189
189
  });
190
190
  //#endregion
191
191
  //#region src/feedback/GameCallout/GameCallout.tsx
192
- function ye({ heading: e, children: t, tone: n = "info", className: r, style: i, ...a }) {
192
+ function Se({ heading: e, children: t, tone: n = "info", className: r, style: i, ...a }) {
193
193
  let o = [
194
194
  "game-ui-callout",
195
195
  `game-ui-callout--${n}`,
196
196
  r
197
197
  ].filter(Boolean).join(" ");
198
- return /* @__PURE__ */ U("div", {
198
+ return /* @__PURE__ */ Z("div", {
199
199
  ...a,
200
200
  className: o,
201
201
  role: a.role ?? "note",
@@ -204,16 +204,16 @@ function ye({ heading: e, children: t, tone: n = "info", className: r, style: i,
204
204
  "data-game-ui-meaning": n !== "neutral" && n !== "danger" ? "true" : void 0,
205
205
  "data-game-ui-danger": n === "danger" ? "true" : void 0,
206
206
  style: {
207
- ...N(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
207
+ ...I(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
208
208
  ...i
209
209
  },
210
210
  children: [
211
- /* @__PURE__ */ H(P, { static: !0 }),
212
- e ? /* @__PURE__ */ H("div", {
211
+ /* @__PURE__ */ X(z, { static: !0 }),
212
+ e ? /* @__PURE__ */ X("div", {
213
213
  className: "game-ui-callout-title",
214
214
  children: e
215
215
  }) : null,
216
- /* @__PURE__ */ H("div", {
216
+ /* @__PURE__ */ X("div", {
217
217
  className: "game-ui-callout-body",
218
218
  children: t
219
219
  })
@@ -222,8 +222,8 @@ function ye({ heading: e, children: t, tone: n = "info", className: r, style: i,
222
222
  }
223
223
  //#endregion
224
224
  //#region src/feedback/GameHelpTip/GameHelpTip.tsx
225
- function be({ label: e, children: t }) {
226
- let [n, r] = B(!1), [i, a] = B(void 0), { refs: o, floatingStyles: s, context: c } = de({
225
+ function Ce({ label: e, children: t }) {
226
+ let [n, r] = J(!1), [i, a] = J(void 0), { refs: o, floatingStyles: s, context: c } = pe({
227
227
  open: n,
228
228
  onOpenChange(e, t, n) {
229
229
  !e && n === "escape-key" && (t?.preventDefault(), t?.stopPropagation()), r(e);
@@ -231,29 +231,29 @@ function be({ label: e, children: t }) {
231
231
  placement: "bottom-start",
232
232
  strategy: "fixed",
233
233
  middleware: [
234
- q(8),
235
- K(),
236
- ce({ padding: 12 })
234
+ ce(8),
235
+ se(),
236
+ ue({ padding: 12 })
237
237
  ],
238
- whileElementsMounted: G
239
- }), l = I((e) => {
238
+ whileElementsMounted: oe
239
+ }), l = U((e) => {
240
240
  o.setReference(e), a(e?.closest("dialog") ?? void 0);
241
- }, [o]), { getReferenceProps: u, getFloatingProps: d } = me([
242
- pe(c, {
241
+ }, [o]), { getReferenceProps: u, getFloatingProps: d } = ge([
242
+ he(c, {
243
243
  mouseOnly: !0,
244
244
  move: !1,
245
245
  delay: {
246
246
  open: 300,
247
247
  close: 120
248
248
  },
249
- handleClose: se()
249
+ handleClose: le()
250
250
  }),
251
+ me(c),
252
+ de(c),
251
253
  fe(c),
252
- le(c),
253
- ue(c),
254
- he(c, { role: "tooltip" })
254
+ _e(c, { role: "tooltip" })
255
255
  ]);
256
- return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ U("button", {
256
+ return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ Z("button", {
257
257
  ref: l,
258
258
  type: "button",
259
259
  className: "game-ui-help-trigger",
@@ -262,27 +262,27 @@ function be({ label: e, children: t }) {
262
262
  n && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), r(!1));
263
263
  } }),
264
264
  "data-game-ui-paint": "",
265
- children: [/* @__PURE__ */ H(P, {}), /* @__PURE__ */ U("svg", {
265
+ children: [/* @__PURE__ */ X(z, {}), /* @__PURE__ */ Z("svg", {
266
266
  width: "20",
267
267
  height: "20",
268
268
  viewBox: "0 0 24 24",
269
269
  fill: "none",
270
270
  "aria-hidden": "true",
271
271
  children: [
272
- /* @__PURE__ */ H("circle", {
272
+ /* @__PURE__ */ X("circle", {
273
273
  cx: "12",
274
274
  cy: "12",
275
275
  r: "9",
276
276
  stroke: "currentColor",
277
277
  strokeWidth: "1.6"
278
278
  }),
279
- /* @__PURE__ */ H("path", {
279
+ /* @__PURE__ */ X("path", {
280
280
  d: "M9.8 8.5a2.5 2.5 0 0 1 4.7 1.2c0 1.8-2.5 1.9-2.5 3.6",
281
281
  stroke: "currentColor",
282
282
  strokeWidth: "1.6",
283
283
  strokeLinecap: "round"
284
284
  }),
285
- /* @__PURE__ */ H("circle", {
285
+ /* @__PURE__ */ X("circle", {
286
286
  cx: "12",
287
287
  cy: "16.7",
288
288
  r: "1",
@@ -290,9 +290,9 @@ function be({ label: e, children: t }) {
290
290
  })
291
291
  ]
292
292
  })]
293
- }), n && /* @__PURE__ */ H(W, {
293
+ }), n && /* @__PURE__ */ X(ae, {
294
294
  root: i,
295
- children: /* @__PURE__ */ H("div", {
295
+ children: /* @__PURE__ */ X("div", {
296
296
  ref: o.setFloating,
297
297
  className: "game-ui-help-tip",
298
298
  style: s,
@@ -302,12 +302,255 @@ function be({ label: e, children: t }) {
302
302
  })] });
303
303
  }
304
304
  //#endregion
305
+ //#region src/feedback/GameHelpCard/GameHelpCard.tsx
306
+ var we = 150;
307
+ function Te({ children: e, label: t, topics: n, link: r, placement: i = "bottom", align: a = "center", openDelay: o = 200 }) {
308
+ let s = G(), [c, l] = J(!1), [u, d] = J(""), [f, m] = J(void 0), h = q(null), g = q(void 0), _ = q(!1), v = q(!1), y = (e) => {
309
+ e && d(""), l(e);
310
+ }, { refs: b, floatingStyles: x, context: C } = pe({
311
+ open: c,
312
+ onOpenChange(e, t, n) {
313
+ if (!e && n === "escape-key") {
314
+ t?.preventDefault(), t?.stopPropagation();
315
+ let e = h.current;
316
+ e && b.floating.current?.contains(document.activeElement) && (v.current = !0, e.focus(), v.current = !1);
317
+ }
318
+ y(e);
319
+ },
320
+ placement: a === "center" ? i : `${i}-${a}`,
321
+ strategy: "fixed",
322
+ middleware: [
323
+ ce(8),
324
+ se(),
325
+ ue({ padding: 12 })
326
+ ],
327
+ whileElementsMounted: oe
328
+ }), { getReferenceProps: w, getFloatingProps: T } = ge([he(C, {
329
+ mouseOnly: !0,
330
+ move: !1,
331
+ delay: {
332
+ open: o,
333
+ close: we
334
+ },
335
+ handleClose: le()
336
+ }), fe(C)]), E = re(e), D = E ? e.props : {}, O = D.ref, k = U((e) => {
337
+ h.current = e, b.setReference(e), m(e?.closest("dialog") ?? void 0), typeof O == "function" ? O(e) : O && (O.current = e);
338
+ }, [O, b]), A = q(null), j = S(A, {
339
+ component: "GameHelpCard",
340
+ lazy: !E && p(e),
341
+ active: !E
342
+ }), M = `${s}-card`;
343
+ K(() => {
344
+ E || (h.current = j, b.setReference(j), m(j?.closest("dialog") ?? void 0));
345
+ }, [
346
+ E,
347
+ j,
348
+ b
349
+ ]), K(() => {
350
+ if (!(E || !j)) return j.setAttribute("aria-expanded", String(c)), c ? j.setAttribute("aria-controls", M) : j.removeAttribute("aria-controls"), () => {
351
+ j.removeAttribute("aria-expanded"), j.removeAttribute("aria-controls");
352
+ };
353
+ }, [
354
+ E,
355
+ j,
356
+ c,
357
+ M
358
+ ]);
359
+ let N = n.find((e) => e.id === u) ?? n[0];
360
+ if (!N) return e;
361
+ let P = `${s}-tabs`, ee = (e) => `${P}-${e}`, F = (e) => `${s}-panel-${e}`, I = (e) => {
362
+ g.current = e.pointerType, _.current = !0;
363
+ }, L = () => {
364
+ let e = _.current;
365
+ _.current = !1, !e && !c && !v.current && y(!0);
366
+ }, B = () => {
367
+ _.current = !1;
368
+ }, V = (e) => {
369
+ let t = g.current === "touch";
370
+ return g.current = void 0, !t || c ? !1 : (e.preventDefault(), e.stopPropagation(), y(!0), !0);
371
+ }, H = (e) => !c || e.key !== "Escape" ? !1 : (e.preventDefault(), e.stopPropagation(), y(!1), !0);
372
+ return /* @__PURE__ */ Z(Y, { children: [E ? te(e, {
373
+ ...w({
374
+ onPointerDown(e) {
375
+ I(e), D.onPointerDown?.(e);
376
+ },
377
+ onFocus(e) {
378
+ L(), D.onFocus?.(e);
379
+ },
380
+ onBlur(e) {
381
+ B(), D.onBlur?.(e);
382
+ },
383
+ onClick(e) {
384
+ V(e) || D.onClick?.(e);
385
+ },
386
+ onKeyDown(e) {
387
+ H(e) || D.onKeyDown?.(e);
388
+ }
389
+ }),
390
+ ref: k,
391
+ "aria-expanded": c,
392
+ "aria-controls": c ? M : void 0
393
+ }) : /* @__PURE__ */ X("span", {
394
+ className: "game-ui-trigger-slot",
395
+ ref: A,
396
+ ...w({
397
+ onPointerDownCapture: I,
398
+ onFocus: L,
399
+ onBlur: B,
400
+ onClickCapture: (e) => {
401
+ V(e);
402
+ },
403
+ onKeyDown: (e) => {
404
+ H(e);
405
+ }
406
+ }),
407
+ children: e
408
+ }), c && /* @__PURE__ */ X(ae, {
409
+ root: f,
410
+ children: /* @__PURE__ */ X(ie, {
411
+ context: C,
412
+ modal: !1,
413
+ initialFocus: -1,
414
+ returnFocus: !1,
415
+ order: ["reference", "content"],
416
+ children: /* @__PURE__ */ Z("div", {
417
+ ref: b.setFloating,
418
+ id: M,
419
+ role: "dialog",
420
+ "aria-label": t,
421
+ className: "game-ui-help-card",
422
+ style: x,
423
+ ...T(),
424
+ children: [/* @__PURE__ */ X(Oe, { source: h.current }), /* @__PURE__ */ Z("div", {
425
+ className: "game-ui-help-card-paint",
426
+ "data-game-ui-paint": "",
427
+ children: [/* @__PURE__ */ X(z, { static: !0 }), /* @__PURE__ */ Z("div", {
428
+ className: "game-ui-help-card-content",
429
+ children: [
430
+ n.length > 1 ? /* @__PURE__ */ X(R, {
431
+ id: P,
432
+ activeId: N.id,
433
+ "aria-label": t,
434
+ tabs: n.map((e) => ({
435
+ id: e.id,
436
+ label: e.label,
437
+ panelId: F(e.id)
438
+ })),
439
+ onSelect: d
440
+ }) : null,
441
+ n.length > 1 ? n.map((e) => /* @__PURE__ */ X("div", {
442
+ id: F(e.id),
443
+ role: "tabpanel",
444
+ "aria-labelledby": ee(e.id),
445
+ hidden: e.id !== N.id,
446
+ children: /* @__PURE__ */ X(ke, {
447
+ topic: e,
448
+ showMedia: e.id === N.id
449
+ })
450
+ }, e.id)) : /* @__PURE__ */ X(ke, {
451
+ topic: N,
452
+ showMedia: !0
453
+ }),
454
+ r ? /* @__PURE__ */ X("a", {
455
+ className: "game-ui-help-card-link",
456
+ href: r.href,
457
+ children: r.label
458
+ }) : null
459
+ ]
460
+ })]
461
+ })]
462
+ })
463
+ })
464
+ })] });
465
+ }
466
+ var Ee = ["data-game-ui-theme", "data-game-ui-style"], De = [
467
+ "class",
468
+ "style",
469
+ ...Ee
470
+ ];
471
+ function Oe({ source: e }) {
472
+ let t = q(null);
473
+ return K(() => {
474
+ let n = t.current?.parentElement;
475
+ if (!n || !e) return;
476
+ let r = (e) => e.closest("[data-game-ui-theme], [data-game-ui-style]") ?? document.documentElement, i = () => {
477
+ let t = r(e);
478
+ for (let e of Ee) {
479
+ let r = t.closest(`[${e}]`)?.getAttribute(e);
480
+ r ? n.setAttribute(e, r) : n.removeAttribute(e);
481
+ }
482
+ let i = getComputedStyle(t);
483
+ for (let e of i) {
484
+ if (!e.startsWith("--game-ui-") || e === "--game-ui-droplet-radius") continue;
485
+ let t = i.getPropertyValue(e).trim();
486
+ n.style.getPropertyValue(e) !== t && n.style.setProperty(e, t);
487
+ }
488
+ }, a = new MutationObserver(i);
489
+ for (let t = r(e); t; t = t.parentElement) a.observe(t, {
490
+ attributes: !0,
491
+ attributeFilter: De
492
+ });
493
+ return i(), () => a.disconnect();
494
+ }, [e]), /* @__PURE__ */ X("span", {
495
+ ref: t,
496
+ hidden: !0
497
+ });
498
+ }
499
+ function ke({ topic: e, showMedia: t }) {
500
+ return /* @__PURE__ */ Z(Y, { children: [
501
+ /* @__PURE__ */ X("h3", {
502
+ className: "game-ui-help-card-title",
503
+ children: e.title
504
+ }),
505
+ /* @__PURE__ */ X("p", {
506
+ className: "game-ui-help-card-body",
507
+ children: e.body
508
+ }),
509
+ t && e.media ? /* @__PURE__ */ X(Ae, { media: e.media }) : null
510
+ ] });
511
+ }
512
+ function Ae({ media: e }) {
513
+ return e.kind === "image" ? /* @__PURE__ */ X("img", {
514
+ className: "game-ui-help-card-media",
515
+ src: e.src,
516
+ alt: e.alt,
517
+ width: e.width,
518
+ height: e.height,
519
+ decoding: "async",
520
+ style: { aspectRatio: `${e.width} / ${e.height}` }
521
+ }) : /* @__PURE__ */ X(je, { media: e });
522
+ }
523
+ function je({ media: e }) {
524
+ let n = t(), r = q(null);
525
+ return W(() => {
526
+ let e = r.current;
527
+ if (!(!e || n)) return e.play().catch(() => void 0), () => e.pause();
528
+ }, [n]), /* @__PURE__ */ X("video", {
529
+ ref: r,
530
+ className: "game-ui-help-card-media",
531
+ width: e.width,
532
+ height: e.height,
533
+ style: { aspectRatio: `${e.width} / ${e.height}` },
534
+ poster: e.poster,
535
+ muted: !0,
536
+ loop: !0,
537
+ playsInline: !0,
538
+ preload: "metadata",
539
+ role: "img",
540
+ "aria-label": e.alt,
541
+ children: e.sources.map((e) => /* @__PURE__ */ X("source", {
542
+ src: e.src,
543
+ type: e.type
544
+ }, e.src))
545
+ });
546
+ }
547
+ //#endregion
305
548
  //#region src/feedback/GamePrompt/GamePrompt.tsx
306
- function xe({ actionLabel: e, children: t, title: n }) {
307
- return /* @__PURE__ */ U("section", {
549
+ function Me({ actionLabel: e, children: t, title: n }) {
550
+ return /* @__PURE__ */ Z("section", {
308
551
  "aria-label": n,
309
552
  className: "game-ui-prompt",
310
- children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h3", { children: n }), /* @__PURE__ */ H("p", { children: t })] }), e ? /* @__PURE__ */ H(j, {
553
+ children: [/* @__PURE__ */ Z("div", { children: [/* @__PURE__ */ X("h3", { children: n }), /* @__PURE__ */ X("p", { children: t })] }), e ? /* @__PURE__ */ X(P, {
311
554
  variant: "primary",
312
555
  children: e
313
556
  }) : null]
@@ -315,33 +558,33 @@ function xe({ actionLabel: e, children: t, title: n }) {
315
558
  }
316
559
  //#endregion
317
560
  //#region src/containers/shared/classes.ts
318
- function Y(...e) {
561
+ function Ne(...e) {
319
562
  return e.filter(Boolean).join(" ");
320
563
  }
321
564
  //#endregion
322
565
  //#region src/containers/GameCollapsiblePanel/GameCollapsiblePanel.tsx
323
- var Se = {
566
+ var Pe = {
324
567
  collapse: "Collapse",
325
568
  expand: "Expand"
326
569
  };
327
- function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels: i, onOpenChange: a, open: o, title: s, tone: c = "default", ...l }) {
328
- let u = R(), [d, f] = B(r), p = o ?? d, m = {
329
- ...Se,
570
+ function Fe({ actions: e, children: t, className: n, defaultOpen: r = !0, labels: i, onOpenChange: a, open: o, title: s, tone: c = "default", ...l }) {
571
+ let u = G(), [d, f] = J(r), p = o ?? d, m = {
572
+ ...Pe,
330
573
  ...i
331
574
  }, h = () => {
332
575
  let e = !p;
333
576
  o === void 0 && f(e), a?.(e);
334
577
  };
335
- return /* @__PURE__ */ U("section", {
578
+ return /* @__PURE__ */ Z("section", {
336
579
  ...l,
337
- className: Y("game-ui-collapsible", n),
580
+ className: Ne("game-ui-collapsible", n),
338
581
  "data-open": p,
339
582
  "data-panel-tone": c,
340
- children: [/* @__PURE__ */ U("header", {
583
+ children: [/* @__PURE__ */ Z("header", {
341
584
  className: "game-ui-collapsible-header",
342
- children: [/* @__PURE__ */ H("h3", {
585
+ children: [/* @__PURE__ */ X("h3", {
343
586
  className: "game-ui-collapsible-heading",
344
- children: /* @__PURE__ */ U("button", {
587
+ children: /* @__PURE__ */ Z("button", {
345
588
  "aria-controls": u,
346
589
  "aria-expanded": p,
347
590
  className: "game-ui-collapsible-toggle",
@@ -350,27 +593,27 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
350
593
  type: "button",
351
594
  "data-game-ui-paint": "",
352
595
  children: [
353
- /* @__PURE__ */ H(P, {}),
354
- /* @__PURE__ */ H("span", {
596
+ /* @__PURE__ */ X(z, {}),
597
+ /* @__PURE__ */ X("span", {
355
598
  "aria-hidden": "true",
356
599
  className: "game-ui-collapsible-chevron"
357
600
  }),
358
- /* @__PURE__ */ H("span", {
601
+ /* @__PURE__ */ X("span", {
359
602
  className: "game-ui-collapsible-title",
360
603
  children: s
361
604
  })
362
605
  ]
363
606
  })
364
- }), e ? /* @__PURE__ */ H("span", {
607
+ }), e ? /* @__PURE__ */ X("span", {
365
608
  className: "game-ui-collapsible-actions",
366
609
  children: e
367
610
  }) : null]
368
- }), /* @__PURE__ */ H("div", {
611
+ }), /* @__PURE__ */ X("div", {
369
612
  className: "game-ui-collapsible-region",
370
613
  id: u,
371
- children: /* @__PURE__ */ H("div", {
614
+ children: /* @__PURE__ */ X("div", {
372
615
  className: "game-ui-collapsible-clip",
373
- children: /* @__PURE__ */ H("div", {
616
+ children: /* @__PURE__ */ X("div", {
374
617
  className: "game-ui-collapsible-content",
375
618
  children: t
376
619
  })
@@ -380,14 +623,14 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
380
623
  }
381
624
  //#endregion
382
625
  //#region src/containers/GameWindowPanel/GameWindowPanel.tsx
383
- function we({ kind: e }) {
384
- return /* @__PURE__ */ H("svg", {
626
+ function Ie({ kind: e }) {
627
+ return /* @__PURE__ */ X("svg", {
385
628
  "aria-hidden": "true",
386
629
  fill: "none",
387
630
  height: "14",
388
631
  viewBox: "0 0 14 14",
389
632
  width: "14",
390
- children: /* @__PURE__ */ H("path", {
633
+ children: /* @__PURE__ */ X("path", {
391
634
  d: {
392
635
  close: "M3 3l8 8M11 3l-8 8",
393
636
  maximize: "M3 5V3h2M9 3h2v2M11 9v2H9M5 11H3V9",
@@ -402,9 +645,9 @@ function we({ kind: e }) {
402
645
  }
403
646
  //#endregion
404
647
  //#region src/containers/GameModal/GameModal.tsx
405
- function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdrop: r = !0, footer: i, keepMounted: a = !1, onClose: o, open: s, position: c = "center", size: l = "md", title: u }) {
406
- let d = z(null), f = z(null), p = R(), [m, h] = B(!s);
407
- return L(() => {
648
+ function Le({ children: e, className: t, closeLabel: n = "Close", closeOnBackdrop: r = !0, footer: i, keepMounted: a = !1, onClose: o, open: s, position: c = "center", size: l = "md", title: u }) {
649
+ let d = q(null), f = q(null), p = G(), [m, h] = J(!s);
650
+ return W(() => {
408
651
  let e = d.current, t = f.current;
409
652
  if (!(!e || !t)) {
410
653
  if (s) {
@@ -413,9 +656,9 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
413
656
  }
414
657
  e.open && e.close(), t.setAttribute("aria-hidden", "true"), t.setAttribute("inert", ""), h(!0);
415
658
  }
416
- }, [m, s]), /* @__PURE__ */ H("dialog", {
659
+ }, [m, s]), /* @__PURE__ */ X("dialog", {
417
660
  "aria-labelledby": p,
418
- className: Y("game-ui-modal", t),
661
+ className: Ne("game-ui-modal", t),
419
662
  "data-position": c,
420
663
  "data-size": l,
421
664
  onCancel: (e) => {
@@ -425,32 +668,32 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
425
668
  r && e.target === d.current && o();
426
669
  },
427
670
  ref: d,
428
- children: /* @__PURE__ */ U("div", {
671
+ children: /* @__PURE__ */ Z("div", {
429
672
  "aria-hidden": m ? !0 : void 0,
430
673
  className: "game-ui-modal-frame",
431
674
  inert: m || void 0,
432
675
  ref: f,
433
676
  children: [
434
- /* @__PURE__ */ U("header", {
677
+ /* @__PURE__ */ Z("header", {
435
678
  className: "game-ui-modal-header",
436
- children: [/* @__PURE__ */ H("h2", {
679
+ children: [/* @__PURE__ */ X("h2", {
437
680
  className: "game-ui-modal-title",
438
681
  id: p,
439
682
  children: u
440
- }), /* @__PURE__ */ U("button", {
683
+ }), /* @__PURE__ */ Z("button", {
441
684
  "aria-label": n,
442
685
  className: "game-ui-icon-button game-ui-window-button",
443
686
  onClick: o,
444
687
  type: "button",
445
688
  "data-game-ui-paint": "",
446
- children: [/* @__PURE__ */ H(P, {}), /* @__PURE__ */ H(we, { kind: "close" })]
689
+ children: [/* @__PURE__ */ X(z, {}), /* @__PURE__ */ X(Ie, { kind: "close" })]
447
690
  })]
448
691
  }),
449
- /* @__PURE__ */ H("div", {
692
+ /* @__PURE__ */ X("div", {
450
693
  className: "game-ui-modal-body",
451
694
  children: s || a ? e : null
452
695
  }),
453
- i ? /* @__PURE__ */ H("footer", {
696
+ i ? /* @__PURE__ */ X("footer", {
454
697
  className: "game-ui-modal-footer",
455
698
  children: i
456
699
  }) : null
@@ -460,38 +703,38 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
460
703
  }
461
704
  //#endregion
462
705
  //#region src/containers/GameShell/GameShell.tsx
463
- function Ee({ assetLibrary: e, bottomBar: t, children: n, className: r, density: i = "comfortable", hud: a, layout: o = "auto", movementPad: s, overlay: c, sidePanel: l, title: u }) {
464
- return /* @__PURE__ */ U("section", {
706
+ function Re({ assetLibrary: e, bottomBar: t, children: n, className: r, density: i = "comfortable", hud: a, layout: o = "auto", movementPad: s, overlay: c, sidePanel: l, title: u }) {
707
+ return /* @__PURE__ */ Z("section", {
465
708
  "aria-label": u,
466
709
  className: ["game-ui-shell", r].filter(Boolean).join(" "),
467
710
  "data-density": i,
468
711
  "data-layout": o,
469
712
  children: [
470
- /* @__PURE__ */ H("div", {
713
+ /* @__PURE__ */ X("div", {
471
714
  className: "game-ui-shell-scene",
472
715
  children: n
473
716
  }),
474
- a ? /* @__PURE__ */ H("div", {
717
+ a ? /* @__PURE__ */ X("div", {
475
718
  className: "game-ui-shell-hud",
476
719
  children: a
477
720
  }) : null,
478
- e ? /* @__PURE__ */ H("aside", {
721
+ e ? /* @__PURE__ */ X("aside", {
479
722
  className: "game-ui-shell-library",
480
723
  children: e
481
724
  }) : null,
482
- l ? /* @__PURE__ */ H("aside", {
725
+ l ? /* @__PURE__ */ X("aside", {
483
726
  className: "game-ui-shell-side-panel",
484
727
  children: l
485
728
  }) : null,
486
- s ? /* @__PURE__ */ H("div", {
729
+ s ? /* @__PURE__ */ X("div", {
487
730
  className: "game-ui-shell-movement",
488
731
  children: s
489
732
  }) : null,
490
- t ? /* @__PURE__ */ H("div", {
733
+ t ? /* @__PURE__ */ X("div", {
491
734
  className: "game-ui-shell-bottom-bar",
492
735
  children: t
493
736
  }) : null,
494
- c ? /* @__PURE__ */ H("div", {
737
+ c ? /* @__PURE__ */ X("div", {
495
738
  className: "game-ui-shell-overlay",
496
739
  children: c
497
740
  }) : null
@@ -500,63 +743,63 @@ function Ee({ assetLibrary: e, bottomBar: t, children: n, className: r, density:
500
743
  }
501
744
  //#endregion
502
745
  //#region src/game/GameCollectibleCard/GameCollectibleCard.tsx
503
- var X = 10, De = 6;
504
- function Oe({ filled: e, total: t }) {
505
- return /* @__PURE__ */ H("span", {
746
+ var Q = 10, ze = 6;
747
+ function Be({ filled: e, total: t }) {
748
+ return /* @__PURE__ */ X("span", {
506
749
  className: "game-ui-collect-card-pips",
507
750
  "aria-hidden": "true",
508
- children: Array.from({ length: Math.max(0, t) }, (t, n) => /* @__PURE__ */ H("i", { "data-on": n < e ? "true" : void 0 }, n))
751
+ children: Array.from({ length: Math.max(0, t) }, (t, n) => /* @__PURE__ */ X("i", { "data-on": n < e ? "true" : void 0 }, n))
509
752
  });
510
753
  }
511
- function ke({ rarity: e }) {
512
- return e === "legendary" ? /* @__PURE__ */ U("svg", {
754
+ function Ve({ rarity: e }) {
755
+ return e === "legendary" ? /* @__PURE__ */ Z("svg", {
513
756
  className: "game-ui-collect-card-inlay",
514
757
  viewBox: "0 0 34 22",
515
758
  "aria-hidden": "true",
516
- children: [/* @__PURE__ */ H("path", {
759
+ children: [/* @__PURE__ */ X("path", {
517
760
  className: "game-ui-collect-card-crown",
518
761
  d: "M3 19 L5 5 L12 11 L17 2 L22 11 L29 5 L31 19 Z"
519
- }), /* @__PURE__ */ H("circle", {
762
+ }), /* @__PURE__ */ X("circle", {
520
763
  className: "game-ui-collect-card-jewel",
521
764
  cx: "17",
522
765
  cy: "14",
523
766
  r: "2.6"
524
767
  })]
525
- }) : e === "rare" ? /* @__PURE__ */ U("svg", {
768
+ }) : e === "rare" ? /* @__PURE__ */ Z("svg", {
526
769
  className: "game-ui-collect-card-inlay",
527
770
  viewBox: "0 0 22 22",
528
771
  "aria-hidden": "true",
529
- children: [/* @__PURE__ */ H("path", {
772
+ children: [/* @__PURE__ */ X("path", {
530
773
  className: "game-ui-collect-card-gem",
531
774
  d: "M11 2 L19 10 L11 20 L3 10 Z"
532
- }), /* @__PURE__ */ H("path", {
775
+ }), /* @__PURE__ */ X("path", {
533
776
  className: "game-ui-collect-card-gem-light",
534
777
  d: "M11 2 L14 10 L11 20"
535
778
  })]
536
779
  }) : null;
537
780
  }
538
- function Ae() {
539
- return /* @__PURE__ */ U("svg", {
781
+ function He() {
782
+ return /* @__PURE__ */ Z("svg", {
540
783
  viewBox: "0 0 100 100",
541
784
  "aria-hidden": "true",
542
785
  children: [
543
- /* @__PURE__ */ H("circle", {
786
+ /* @__PURE__ */ X("circle", {
544
787
  className: "game-ui-collect-card-back-ring",
545
788
  cx: "50",
546
789
  cy: "50",
547
790
  r: "38"
548
791
  }),
549
- /* @__PURE__ */ H("circle", {
792
+ /* @__PURE__ */ X("circle", {
550
793
  className: "game-ui-collect-card-back-dash",
551
794
  cx: "50",
552
795
  cy: "50",
553
796
  r: "28"
554
797
  }),
555
- /* @__PURE__ */ H("path", {
798
+ /* @__PURE__ */ X("path", {
556
799
  className: "game-ui-collect-card-back-star",
557
800
  d: "M50 14 L57 43 L86 50 L57 57 L50 86 L43 57 L14 50 L43 43 Z"
558
801
  }),
559
- /* @__PURE__ */ H("circle", {
802
+ /* @__PURE__ */ X("circle", {
560
803
  className: "game-ui-collect-card-back-core",
561
804
  cx: "50",
562
805
  cy: "50",
@@ -565,13 +808,13 @@ function Ae() {
565
808
  ]
566
809
  });
567
810
  }
568
- function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art: o, pips: s, sticker: c, back: l, label: u, faceDown: d, defaultFaceDown: f = !1, onFlip: p, spotlight: m = !1, sound: h = !1, tilt: g, className: _ }) {
569
- let v = t(), [y, b] = B(f), x = d ?? y, [S, C] = B({
811
+ function Ue({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art: o, pips: s, sticker: c, back: l, label: u, faceDown: d, defaultFaceDown: f = !1, onFlip: p, spotlight: m = !1, sound: h = !1, tilt: g, className: _ }) {
812
+ let v = t(), [y, b] = J(f), x = d ?? y, [S, C] = J({
570
813
  x: 50,
571
814
  y: 50,
572
815
  active: !1
573
- }), w = z(null);
574
- L(() => {
816
+ }), w = q(null);
817
+ W(() => {
575
818
  v && C({
576
819
  x: 50,
577
820
  y: 50,
@@ -580,7 +823,7 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
580
823
  }, [v]);
581
824
  let T = (e) => {
582
825
  let t = w.current;
583
- if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > De && (t.moved = !0), v) return;
826
+ if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > ze && (t.moved = !0), v) return;
584
827
  let n = e.currentTarget.getBoundingClientRect();
585
828
  if (n.width === 0 || n.height === 0) return;
586
829
  let r = Math.min(100, Math.max(0, (e.clientX - n.left) / n.width * 100)), i = Math.min(100, Math.max(0, (e.clientY - n.top) / n.height * 100));
@@ -591,7 +834,7 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
591
834
  });
592
835
  }, E = () => {
593
836
  let t = !x;
594
- d === void 0 && b(t), p?.(t), h && A(t ? "common" : e);
837
+ d === void 0 && b(t), p?.(t), h && M(t ? "common" : e);
595
838
  }, D = g && Number.isFinite(g.x) && Number.isFinite(g.y) ? {
596
839
  x: 50 + Math.min(1, Math.max(-1, g.x)) * 50,
597
840
  y: 50 + Math.min(1, Math.max(-1, g.y)) * 50,
@@ -603,10 +846,10 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
603
846
  } : S.active ? S : D ?? S, k = {
604
847
  "--card-mx": `${O.x}%`,
605
848
  "--card-my": `${O.y}%`,
606
- "--card-rx": `${O.active ? (50 - O.y) / 50 * X : 0}deg`,
607
- "--card-ry": `${O.active ? (O.x - 50) / 50 * X : 0}deg`
849
+ "--card-rx": `${O.active ? (50 - O.y) / 50 * Q : 0}deg`,
850
+ "--card-ry": `${O.active ? (O.x - 50) / 50 * Q : 0}deg`
608
851
  };
609
- return /* @__PURE__ */ U("button", {
852
+ return /* @__PURE__ */ Z("button", {
610
853
  type: "button",
611
854
  className: [
612
855
  "game-ui-collect-card",
@@ -641,60 +884,60 @@ function je({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art:
641
884
  let t = e.detail !== 0 && (w.current?.moved ?? !1);
642
885
  w.current = null, t || E();
643
886
  },
644
- children: [/* @__PURE__ */ U("span", {
887
+ children: [/* @__PURE__ */ Z("span", {
645
888
  className: "game-ui-collect-card-face",
646
889
  "aria-hidden": "true",
647
890
  children: [
648
- c ? /* @__PURE__ */ H("span", {
891
+ c ? /* @__PURE__ */ X("span", {
649
892
  className: "game-ui-collect-card-sticker",
650
893
  children: c
651
894
  }) : null,
652
- /* @__PURE__ */ H(ke, { rarity: e }),
653
- e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null,
654
- /* @__PURE__ */ U("span", {
895
+ /* @__PURE__ */ X(Ve, { rarity: e }),
896
+ e === "legendary" ? /* @__PURE__ */ X("span", { className: "game-ui-collect-card-foil" }) : null,
897
+ /* @__PURE__ */ Z("span", {
655
898
  className: "game-ui-collect-card-inner",
656
899
  children: [
657
- i || a ? /* @__PURE__ */ U("span", {
900
+ i || a ? /* @__PURE__ */ Z("span", {
658
901
  className: "game-ui-collect-card-band",
659
- children: [a ? /* @__PURE__ */ H("span", {
902
+ children: [a ? /* @__PURE__ */ X("span", {
660
903
  className: "game-ui-collect-card-chip",
661
904
  children: a
662
- }) : null, i ? /* @__PURE__ */ H("span", { children: i }) : null]
905
+ }) : null, i ? /* @__PURE__ */ X("span", { children: i }) : null]
663
906
  }) : null,
664
- /* @__PURE__ */ U("span", {
907
+ /* @__PURE__ */ Z("span", {
665
908
  className: "game-ui-collect-card-art",
666
- children: [o, e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null]
909
+ children: [o, e === "legendary" ? /* @__PURE__ */ X("span", { className: "game-ui-collect-card-foil" }) : null]
667
910
  }),
668
- /* @__PURE__ */ H("span", {
911
+ /* @__PURE__ */ X("span", {
669
912
  className: "game-ui-collect-card-title",
670
913
  children: n
671
914
  }),
672
- r ? /* @__PURE__ */ H("span", {
915
+ r ? /* @__PURE__ */ X("span", {
673
916
  className: "game-ui-collect-card-caption",
674
917
  children: r
675
918
  }) : null,
676
- s ? /* @__PURE__ */ H(Oe, {
919
+ s ? /* @__PURE__ */ X(Be, {
677
920
  filled: s.filled,
678
921
  total: s.total
679
922
  }) : null
680
923
  ]
681
924
  }),
682
- /* @__PURE__ */ H("span", { className: "game-ui-collect-card-glare" })
925
+ /* @__PURE__ */ X("span", { className: "game-ui-collect-card-glare" })
683
926
  ]
684
- }), /* @__PURE__ */ H("span", {
927
+ }), /* @__PURE__ */ X("span", {
685
928
  className: "game-ui-collect-card-back",
686
929
  "aria-hidden": "true",
687
- children: l ?? /* @__PURE__ */ H(Ae, {})
930
+ children: l ?? /* @__PURE__ */ X(He, {})
688
931
  })]
689
932
  });
690
933
  }
691
934
  //#endregion
692
935
  //#region src/game/GameCollectibleCard/orientation.ts
693
- function Z() {
936
+ function $() {
694
937
  return typeof window > "u" || !window.isSecureContext || !window.DeviceOrientationEvent ? null : window.DeviceOrientationEvent;
695
938
  }
696
- var Q = () => document.visibilityState === "hidden";
697
- function Me(e, t, n, r) {
939
+ var We = () => document.visibilityState === "hidden";
940
+ function Ge(e, t, n, r) {
698
941
  if (e === null || t === null || ![
699
942
  e,
700
943
  t,
@@ -708,14 +951,14 @@ function Me(e, t, n, r) {
708
951
  y: s(o * Math.cos(i) - a * Math.sin(i))
709
952
  };
710
953
  }
711
- function Ne() {
712
- let e = t(), [n, r] = B("off"), [i, a] = B(null), o = z(!1), s = z(0), c = z(!1), l = z(e);
954
+ function Ke() {
955
+ let e = t(), [n, r] = J("off"), [i, a] = J(null), o = q(!1), s = q(0), c = q(!1), l = q(e);
713
956
  l.current = e;
714
- let u = I(() => {
957
+ let u = U(() => {
715
958
  s.current++, c.current = !1;
716
959
  }, []);
717
- L(() => {
718
- o.current = !0, Z() || r("unavailable");
960
+ W(() => {
961
+ o.current = !0, $() || r("unavailable");
719
962
  let e = () => {
720
963
  document.visibilityState !== "hidden" || !c.current || (u(), r("off"), a(null));
721
964
  };
@@ -723,22 +966,22 @@ function Ne() {
723
966
  document.removeEventListener("visibilitychange", e), o.current = !1, u();
724
967
  };
725
968
  }, [u]);
726
- let d = I(() => {
727
- u(), a(null), r(Z() ? "off" : "unavailable");
969
+ let d = U(() => {
970
+ u(), a(null), r($() ? "off" : "unavailable");
728
971
  }, [u]);
729
- L(() => {
972
+ W(() => {
730
973
  e && d();
731
974
  }, [e, d]);
732
- let f = I(async () => {
733
- let e = Z();
734
- if (!o.current || c.current || l.current || Q()) return !1;
975
+ let f = U(async () => {
976
+ let e = $();
977
+ if (!o.current || c.current || l.current || We()) return !1;
735
978
  if (!e) return r("unavailable"), !1;
736
979
  let t = ++s.current;
737
980
  c.current = !0, r("requesting"), a(null);
738
981
  try {
739
982
  let n = e.requestPermission ? await e.requestPermission() : "granted";
740
983
  if (!o.current || t !== s.current || l.current) return !1;
741
- if (Q()) return d(), !1;
984
+ if (We()) return d(), !1;
742
985
  let i = n === "granted";
743
986
  return r(i ? "enabled" : "denied"), i;
744
987
  } catch {
@@ -747,7 +990,7 @@ function Ne() {
747
990
  t === s.current && (c.current = !1);
748
991
  }
749
992
  }, [d]);
750
- return L(() => {
993
+ return W(() => {
751
994
  if (n !== "enabled" || e) return;
752
995
  let t = null, r = !1, i = -Infinity, o = (e) => {
753
996
  if (document.visibilityState === "hidden" || e.beta === null || e.gamma === null || !Number.isFinite(e.beta) || !Number.isFinite(e.gamma)) return;
@@ -761,7 +1004,7 @@ function Ne() {
761
1004
  let r = performance.now();
762
1005
  if (r - i < 50) return;
763
1006
  i = r;
764
- let o = Me(e.beta, e.gamma, t, n);
1007
+ let o = Ge(e.beta, e.gamma, t, n);
765
1008
  o && a((e) => e?.x === o.x && e.y === o.y ? e : o);
766
1009
  }, s = () => {
767
1010
  let e = document.visibilityState !== "hidden";
@@ -780,41 +1023,41 @@ function Ne() {
780
1023
  }
781
1024
  //#endregion
782
1025
  //#region src/game/GameCollectibleCardSlot/GameCollectibleCardSlot.tsx
783
- function Pe({ label: e, className: t }) {
784
- return /* @__PURE__ */ U("div", {
1026
+ function qe({ label: e, className: t }) {
1027
+ return /* @__PURE__ */ Z("div", {
785
1028
  className: ["game-ui-collect-card-slot", t].filter(Boolean).join(" "),
786
1029
  role: "img",
787
1030
  "aria-label": e,
788
- children: [/* @__PURE__ */ H("span", {
1031
+ children: [/* @__PURE__ */ X("span", {
789
1032
  "aria-hidden": "true",
790
1033
  children: "?"
791
- }), /* @__PURE__ */ H("span", { children: e })]
1034
+ }), /* @__PURE__ */ X("span", { children: e })]
792
1035
  });
793
1036
  }
794
1037
  //#endregion
795
1038
  //#region src/game/GameFactList/GameFactList.tsx
796
- function Fe({ className: e, density: t = "comfortable", facts: n, label: r, variant: i = "facts" }) {
797
- return /* @__PURE__ */ H("section", {
1039
+ function Je({ className: e, density: t = "comfortable", facts: n, label: r, variant: i = "facts" }) {
1040
+ return /* @__PURE__ */ X("section", {
798
1041
  "aria-label": r,
799
1042
  className: ["game-ui-fact-list", e].filter(Boolean).join(" "),
800
1043
  "data-density": t,
801
1044
  "data-variant": i,
802
- children: n.map((e) => /* @__PURE__ */ U("article", {
1045
+ children: n.map((e) => /* @__PURE__ */ Z("article", {
803
1046
  className: "game-ui-fact",
804
1047
  children: [
805
- e.icon ? /* @__PURE__ */ H(E, {
1048
+ e.icon ? /* @__PURE__ */ X(u, {
806
1049
  icon: e.icon,
807
1050
  size: t === "dense" ? "sm" : "md"
808
1051
  }) : null,
809
- /* @__PURE__ */ U("span", {
1052
+ /* @__PURE__ */ Z("span", {
810
1053
  className: "game-ui-fact-copy",
811
1054
  children: [
812
- /* @__PURE__ */ H("small", { children: e.label }),
813
- /* @__PURE__ */ H("strong", { children: e.value }),
814
- e.meta ? /* @__PURE__ */ H("em", { children: e.meta }) : null
1055
+ /* @__PURE__ */ X("small", { children: e.label }),
1056
+ /* @__PURE__ */ X("strong", { children: e.value }),
1057
+ e.meta ? /* @__PURE__ */ X("em", { children: e.meta }) : null
815
1058
  ]
816
1059
  }),
817
- e.tone ? /* @__PURE__ */ H(M, {
1060
+ e.tone ? /* @__PURE__ */ X(F, {
818
1061
  tone: e.tone,
819
1062
  children: i === "stats" ? e.label : e.value
820
1063
  }) : null
@@ -824,7 +1067,7 @@ function Fe({ className: e, density: t = "comfortable", facts: n, label: r, vari
824
1067
  }
825
1068
  //#endregion
826
1069
  //#region src/game/GameMovementPad/GameMovementPad.tsx
827
- var Ie = [
1070
+ var Ye = [
828
1071
  {
829
1072
  direction: "forward",
830
1073
  label: "Move forward",
@@ -849,7 +1092,7 @@ var Ie = [
849
1092
  shortcut: "S / ↓",
850
1093
  symbol: "↓"
851
1094
  }
852
- ], Le = {
1095
+ ], Xe = {
853
1096
  ArrowUp: "forward",
854
1097
  w: "forward",
855
1098
  W: "forward",
@@ -864,57 +1107,57 @@ var Ie = [
864
1107
  S: "backward",
865
1108
  " ": "reset"
866
1109
  };
867
- function $({ actions: e = Ie, className: t, density: n = "comfortable", disabled: r = !1, helpText: i, label: a, layout: o = "dpad", onMove: s }) {
868
- let c = ["game-ui-movement-pad", t].filter(Boolean).join(" "), l = (e) => {
869
- r || s?.(e);
1110
+ function Ze({ actions: e = Ye, className: t, density: n = "comfortable", disabled: i = !1, helpText: a, label: o, layout: s = "dpad", onMove: c }) {
1111
+ let l = ["game-ui-movement-pad", t].filter(Boolean).join(" "), d = (e) => {
1112
+ i || c?.(e);
870
1113
  };
871
- return /* @__PURE__ */ U("section", {
872
- "aria-label": a,
873
- className: c,
1114
+ return /* @__PURE__ */ Z("section", {
1115
+ "aria-label": o,
1116
+ className: l,
874
1117
  "data-density": n,
875
- "data-layout": o,
1118
+ "data-layout": s,
876
1119
  onKeyDown: (t) => {
877
- let n = Le[t.key];
1120
+ let n = Xe[t.key];
878
1121
  if (!n) return;
879
- let i = e.find((e) => e.direction === n);
880
- !i || i.disabled || r || (t.preventDefault(), l(n));
1122
+ let r = e.find((e) => e.direction === n);
1123
+ !r || r.disabled || i || (t.preventDefault(), d(n));
881
1124
  },
882
1125
  tabIndex: 0,
883
- children: [/* @__PURE__ */ H("div", {
1126
+ children: [/* @__PURE__ */ X("div", {
884
1127
  className: "game-ui-movement-pad-grid",
885
- children: e.map((e) => /* @__PURE__ */ U(D, {
1128
+ children: e.map((e) => /* @__PURE__ */ Z(r, {
886
1129
  className: "game-ui-movement-button",
887
1130
  "data-direction": e.direction,
888
- disabled: r || e.disabled,
1131
+ disabled: i || e.disabled,
889
1132
  label: e.label,
890
- onClick: () => l(e.direction),
891
- children: [e.icon ? /* @__PURE__ */ H(E, {
1133
+ onClick: () => d(e.direction),
1134
+ children: [e.icon ? /* @__PURE__ */ X(u, {
892
1135
  icon: e.icon,
893
1136
  size: n === "dense" ? "sm" : "md"
894
- }) : /* @__PURE__ */ H("span", {
1137
+ }) : /* @__PURE__ */ X("span", {
895
1138
  "aria-hidden": "true",
896
1139
  children: e.symbol ?? e.label
897
- }), e.shortcut ? /* @__PURE__ */ H("kbd", { children: e.shortcut }) : null]
1140
+ }), e.shortcut ? /* @__PURE__ */ X("kbd", { children: e.shortcut }) : null]
898
1141
  }, e.direction))
899
- }), i ? /* @__PURE__ */ H("p", { children: i }) : null]
1142
+ }), a ? /* @__PURE__ */ X("p", { children: a }) : null]
900
1143
  });
901
1144
  }
902
1145
  //#endregion
903
1146
  //#region src/game/GameSplash/GameSplash.tsx
904
- function Re(e) {
1147
+ function Qe(e) {
905
1148
  let t = e.highlight ? e.text.indexOf(e.highlight) : -1;
906
- return !e.highlight || t < 0 ? e.text : /* @__PURE__ */ U(V, { children: [
1149
+ return !e.highlight || t < 0 ? e.text : /* @__PURE__ */ Z(Y, { children: [
907
1150
  e.text.slice(0, t),
908
- /* @__PURE__ */ H("mark", {
1151
+ /* @__PURE__ */ X("mark", {
909
1152
  className: "game-ui-splash-mark",
910
1153
  children: e.highlight
911
1154
  }),
912
1155
  e.text.slice(t + e.highlight.length)
913
1156
  ] });
914
1157
  }
915
- function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode: o = "opening", startLabel: s, onStart: c, autoStart: l = !1, lineSeconds: u = 2.6, className: d }) {
916
- let f = o === "transition" ? n.slice(0, 1) : n, p = t(), [m, h] = B(0);
917
- L(() => {
1158
+ function $e({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode: o = "opening", startLabel: s, onStart: c, autoStart: l = !1, lineSeconds: u = 2.6, className: d }) {
1159
+ let f = o === "transition" ? n.slice(0, 1) : n, p = t(), [m, h] = J(0);
1160
+ W(() => {
918
1161
  if (f.length < 2 || p) return;
919
1162
  let e = window.setInterval(() => h((e) => (e + 1) % f.length), Math.max(1, u) * 1e3);
920
1163
  return () => window.clearInterval(e);
@@ -923,8 +1166,8 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
923
1166
  u,
924
1167
  p
925
1168
  ]);
926
- let g = z(!1), _ = c;
927
- L(() => {
1169
+ let g = q(!1), _ = c;
1170
+ W(() => {
928
1171
  !a || !l || g.current || !_ || (g.current = !0, _());
929
1172
  }, [
930
1173
  a,
@@ -932,7 +1175,7 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
932
1175
  _
933
1176
  ]);
934
1177
  let v = f[m % Math.max(1, f.length)], y = Math.round(Math.max(0, Math.min(1, Number.isFinite(r) ? r : 0)) * 100);
935
- return /* @__PURE__ */ H("section", {
1178
+ return /* @__PURE__ */ X("section", {
936
1179
  className: [
937
1180
  "game-ui-splash",
938
1181
  `game-ui-splash--${o}`,
@@ -941,27 +1184,27 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
941
1184
  "aria-busy": !a,
942
1185
  "aria-label": e,
943
1186
  "data-splash-ready": a,
944
- children: /* @__PURE__ */ U("div", {
1187
+ children: /* @__PURE__ */ Z("div", {
945
1188
  className: "game-ui-splash-body",
946
1189
  children: [
947
- o === "opening" ? /* @__PURE__ */ H("h1", {
1190
+ o === "opening" ? /* @__PURE__ */ X("h1", {
948
1191
  className: "game-ui-splash-title",
949
1192
  children: e
950
1193
  }) : null,
951
- v ? /* @__PURE__ */ H("p", {
1194
+ v ? /* @__PURE__ */ X("p", {
952
1195
  className: "game-ui-splash-line",
953
1196
  "aria-live": "polite",
954
- children: Re(v)
1197
+ children: Qe(v)
955
1198
  }, m) : null,
956
- /* @__PURE__ */ H(T, {
1199
+ /* @__PURE__ */ X(E, {
957
1200
  className: "game-ui-splash-progress",
958
1201
  label: i,
959
1202
  value: y,
960
1203
  valueLabel: i
961
1204
  }),
962
- o === "opening" && a && !l && c ? /* @__PURE__ */ H("div", {
1205
+ o === "opening" && a && !l && c ? /* @__PURE__ */ X("div", {
963
1206
  className: "game-ui-splash-start",
964
- children: /* @__PURE__ */ H(j, {
1207
+ children: /* @__PURE__ */ X(P, {
965
1208
  variant: "primary",
966
1209
  autoFocus: !0,
967
1210
  onClick: () => c(),
@@ -974,14 +1217,14 @@ function ze({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode:
974
1217
  }
975
1218
  //#endregion
976
1219
  //#region src/controls/GameMaterialSwatches/GameMaterialSwatches.tsx
977
- function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, materials: i, onMaterialChange: a, variant: o = "desktop", "data-testid": s }) {
978
- return /* @__PURE__ */ H("section", {
1220
+ function et({ activeMaterialId: e, className: t, disabled: n = !1, label: r, materials: i, onMaterialChange: a, variant: o = "desktop", "data-testid": s }) {
1221
+ return /* @__PURE__ */ X("section", {
979
1222
  "aria-label": r,
980
1223
  className: ["game-ui-material-swatches", t].filter(Boolean).join(" "),
981
1224
  "data-ui-hook": "material-swatches",
982
1225
  "data-variant": o,
983
1226
  "data-testid": s,
984
- children: /* @__PURE__ */ H("div", {
1227
+ children: /* @__PURE__ */ X("div", {
985
1228
  className: "game-ui-material-swatch-grid",
986
1229
  role: "listbox",
987
1230
  "aria-label": r,
@@ -990,7 +1233,7 @@ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, mat
990
1233
  "--swatch-color": t.color,
991
1234
  "--swatch-secondary-color": t.secondaryColor ?? t.color
992
1235
  };
993
- return /* @__PURE__ */ U("button", {
1236
+ return /* @__PURE__ */ Z("button", {
994
1237
  "aria-describedby": t.meta ? `${t.id}-material-meta` : void 0,
995
1238
  "aria-label": t.label,
996
1239
  "aria-selected": r,
@@ -1002,21 +1245,21 @@ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, mat
1002
1245
  type: "button",
1003
1246
  "data-game-ui-paint": "",
1004
1247
  children: [
1005
- /* @__PURE__ */ H(P, {}),
1006
- /* @__PURE__ */ H("span", {
1248
+ /* @__PURE__ */ X(z, {}),
1249
+ /* @__PURE__ */ X("span", {
1007
1250
  "aria-hidden": "true",
1008
1251
  className: "game-ui-material-swatch-chip",
1009
1252
  "data-swatch-pattern": t.pattern ?? "solid",
1010
1253
  style: c
1011
1254
  }),
1012
- /* @__PURE__ */ U("span", {
1255
+ /* @__PURE__ */ Z("span", {
1013
1256
  className: "game-ui-material-swatch-copy",
1014
- children: [/* @__PURE__ */ H("strong", { children: s }), t.meta ? /* @__PURE__ */ H("small", {
1257
+ children: [/* @__PURE__ */ X("strong", { children: s }), t.meta ? /* @__PURE__ */ X("small", {
1015
1258
  id: `${t.id}-material-meta`,
1016
1259
  children: t.meta
1017
1260
  }) : null]
1018
1261
  }),
1019
- /* @__PURE__ */ H(k, {})
1262
+ /* @__PURE__ */ X(j, {})
1020
1263
  ]
1021
1264
  }, t.id);
1022
1265
  })
@@ -1025,13 +1268,13 @@ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, mat
1025
1268
  }
1026
1269
  //#endregion
1027
1270
  //#region src/tokens/styles.ts
1028
- var Ve = [
1271
+ var tt = [
1029
1272
  "candy",
1030
1273
  "pastel",
1031
1274
  "mist",
1032
1275
  "grey",
1033
1276
  "outline",
1034
1277
  "ink"
1035
- ], He = "pastel";
1278
+ ], nt = "pastel";
1036
1279
  //#endregion
1037
- export { S as FirstSessionOnboarding, O as GAME_ICON_NAMES, He as GAME_UI_DEFAULT_STYLE, Ve as GAME_UI_STYLES, s as GAME_UI_TARGETS, a as GAME_UI_THEME_CONTRACT, i as GAME_UI_TOKENS, ie as GameAvatar, M as GameBadge, j as GameButton, ye as GameCallout, r as GameCheckbox, Ce as GameCollapsiblePanel, je as GameCollectibleCard, Pe as GameCollectibleCardSlot, C as GameDialog, p as GameEmptyState, Fe as GameFactList, o as GameField, be as GameHelpTip, b as GameHistoryPanel, l as GameHudActions, E as GameIcon, D as GameIconButton, u as GameInput, c as GameLanguageMenu, ge as GameListRow, f as GameLoadingState, Be as GameMaterialSwatches, Te as GameModal, $ as GameMovementPad, _e as GameOtpInput, g as GamePanel, T as GameProgress, xe as GamePrompt, y as GameRadialMenu, m as GameSegmentedControl, ve as GameSelect, Ee as GameShell, h as GameSlider, ze as GameSplash, w as GameStageTile, re as GameTabs, v as GameTextArea, _ as GameToast, x as GameToggle, d as GameTooltip, n as LiquidGroup, ee as LiquidSurface, ae as liquidFormItem, A as playGameCardRevealSound, ne as playGameInteractionSound, te as playGameInteractionSoundForContext, e as setLiquidGooeyBudget, Ne as useGameCardOrientation };
1280
+ export { C as FirstSessionOnboarding, k as GAME_ICON_NAMES, nt as GAME_UI_DEFAULT_STYLE, tt as GAME_UI_STYLES, i as GAME_UI_TARGETS, a as GAME_UI_THEME_CONTRACT, _ as GAME_UI_TOKENS, B as GameAvatar, F as GameBadge, P as GameButton, Se as GameCallout, s as GameCheckbox, Fe as GameCollapsiblePanel, Ue as GameCollectibleCard, qe as GameCollectibleCardSlot, w as GameDialog, y as GameEmptyState, Je as GameFactList, O as GameField, Te as GameHelpCard, Ce as GameHelpTip, x as GameHistoryPanel, l as GameHudActions, u as GameIcon, r as GameIconButton, o as GameInput, A as GameLanguageMenu, ve as GameListRow, f as GameLoadingState, et as GameMaterialSwatches, Le as GameModal, Ze as GameMovementPad, be as GameOtpInput, g as GamePanel, E as GameProgress, Me as GamePrompt, b as GameRadialMenu, D as GameSegmentedControl, xe as GameSelect, Re as GameShell, c as GameSlider, $e as GameSplash, T as GameStageTile, R as GameTabs, m as GameTextArea, v as GameToast, h as GameToggle, d as GameTooltip, n as LiquidGroup, N as LiquidSurface, V as liquidFormItem, M as playGameCardRevealSound, L as playGameInteractionSound, ee as playGameInteractionSoundForContext, e as setLiquidGooeyBudget, Ke as useGameCardOrientation };