@hadoku/watchparty-ui 0.45.102 → 0.45.104

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.
@@ -1,11 +1,19 @@
1
1
  import { jsx as l, jsxs as E, Fragment as he } from "react/jsx-runtime";
2
2
  import Ze, { useState as $, useRef as P, useEffect as F, useCallback as H, useMemo as ye, Component as Ua, useContext as gr, createContext as pr, useLayoutEffect as dn, useSyncExternalStore as Wa, useId as br, useEffectEvent as ue } from "react";
3
- import { k as za, M as Ga, m as Ka, f as qa, a as Va, C as Mt, g as wn, i as Ja, S as Qa, b as Ya, r as Ot, d as _, e as ee, u as x, c as yr, h as Xa, A as mt, j as Za, l as es, n as wr, w as ts, o as Ue, p as vr, q as kr, s as ns, D as vt, t as N, v as rs, x as as, y as ss, z as Sr, B as xr, E as Er, F as is, L as os, G as fs, H as vn, I as ls, J as cs, K as ds, N as Mr, O as kn, P as _r, Q as Tr, R as us, T as hs, U as $e, V as $n, W as Vt, X as ms, Y as Ar, Z as gs, _ as ps, $ as bs, a0 as Ir, a1 as ys, a2 as X, a3 as ws, a4 as Cr, a5 as Nr, a6 as ut, a7 as vs, a8 as ks, a9 as Ss, aa as xs, ab as Es, ac as Pn, ad as st, ae as Ms, af as Dn, ag as _s, ah as Ts, ai as Bn, aj as As, ak as Is, al as Cs, am as Ns, an as Rs, ao as On, ap as jn, aq as Ls, ar as Rr, as as Hn, at as Fs, au as $t, av as $s, aw as Ps, ax as Ds, ay as Bs, az as Os, aA as js, aB as Hs, aC as Us, aD as Ws, aE as zs, aF as Gs } from "./index-a5Hs7VOW.js";
3
+ import { k as za, M as Ga, m as Ka, f as qa, a as Va, C as Mt, g as wn, i as Ja, S as Qa, b as Ya, r as Ot, d as _, e as ee, u as x, c as yr, h as Xa, A as mt, j as Za, l as es, n as wr, w as ts, o as Ue, p as vr, q as kr, s as ns, D as vt, t as N, v as rs, x as as, y as ss, z as Sr, B as xr, E as Er, F as is, L as os, G as fs, H as vn, I as ls, J as cs, K as ds, N as Mr, O as kn, P as _r, Q as Tr, R as us, T as hs, U as $e, V as $n, W as Vt, X as ms, Y as Ar, Z as gs, _ as ps, $ as bs, a0 as Ir, a1 as ys, a2 as X, a3 as ws, a4 as Cr, a5 as Nr, a6 as ut, a7 as vs, a8 as ks, a9 as Ss, aa as xs, ab as Es, ac as Pn, ad as st, ae as Ms, af as Dn, ag as _s, ah as Ts, ai as Bn, aj as As, ak as Is, al as Cs, am as Ns, an as Rs, ao as On, ap as jn, aq as Ls, ar as Rr, as as Hn, at as Fs, au as $t, av as $s, aw as Ps, ax as Ds, ay as Bs, az as Os, aA as js, aB as Hs, aC as Us, aD as Ws, aE as zs, aF as Gs } from "./index-DlwQHczp.js";
4
4
  import { createPortal as gt } from "react-dom";
5
5
  import { Icon as _t, THEMES as Ks, useHadokuThemeOptional as qs } from "@wolffm/themes";
6
6
  import { HadokuThemePicker as Vs, ConnectedSettings as Js } from "@wolffm/task-ui-components";
7
7
  import { createRoot as Qs } from "react-dom/client";
8
- function Ys(t) {
8
+ const Ys = "output/fmp4/youtube", Xs = /^(.*) \[([A-Za-z0-9_-]{11})\]$/;
9
+ function Zs(t) {
10
+ const e = `${Ys}/`;
11
+ if (!t.startsWith(e))
12
+ return null;
13
+ const n = Xs.exec(t.slice(e.length));
14
+ return n ? n[1] : null;
15
+ }
16
+ function ei(t) {
9
17
  return t.kind === "file";
10
18
  }
11
19
  class Lr extends Error {
@@ -33,42 +41,42 @@ function Bt(t) {
33
41
  return "Image upload failed";
34
42
  }
35
43
  }
36
- function Xs(t) {
44
+ function ti(t) {
37
45
  return t instanceof Mt ? Bt(t.reason) : t instanceof Lr ? t.message : "Image upload failed";
38
46
  }
39
- function Zs(t) {
47
+ function ni(t) {
40
48
  const e = t.type.toLowerCase().split(";")[0].trim();
41
49
  return e && za(e) !== "image" ? Bt("unsupported-type") : t.size > Ga.image ? Bt("too-large") : t.size === 0 ? Bt("invalid") : null;
42
50
  }
43
- function ei(t) {
51
+ function ri(t) {
44
52
  return qa(t);
45
53
  }
46
- function ti(t) {
54
+ function ai(t) {
47
55
  return Va(t);
48
56
  }
49
- async function ni(t) {
57
+ async function si(t) {
50
58
  const e = await Ka(t);
51
59
  return { w: e?.width ?? 0, h: e?.height ?? 0 };
52
60
  }
53
- async function ri(t, e = {}) {
61
+ async function ii(t, e = {}) {
54
62
  const n = await wn().upload(t, { signal: e.signal });
55
63
  if (!Ja(n.key))
56
64
  throw new Lr("Image upload returned an unusable key");
57
65
  return { key: n.key, deduplicated: n.deduplicated === !0 };
58
66
  }
59
- async function ai(t, e = {}) {
67
+ async function oi(t, e = {}) {
60
68
  const n = [];
61
69
  for (const r of t) {
62
70
  if (r.kind === "remote") {
63
71
  n.push({ key: r.key, w: r.w, h: r.h, ...r.title ? { title: r.title } : {} });
64
72
  continue;
65
73
  }
66
- const { key: s } = await ri(r.file, e);
74
+ const { key: s } = await ii(r.file, e);
67
75
  n.push({ key: s, w: r.w, h: r.h });
68
76
  }
69
77
  return n;
70
78
  }
71
- function si(t) {
79
+ function fi(t) {
72
80
  return {
73
81
  error: t instanceof Error ? t.message : String(t),
74
82
  name: t instanceof Error ? t.name : typeof t,
@@ -76,14 +84,14 @@ function si(t) {
76
84
  status: t instanceof Mt ? t.status : void 0
77
85
  };
78
86
  }
79
- function ii(t) {
87
+ function li(t) {
80
88
  const e = P(t);
81
89
  return F(() => {
82
90
  e.current = t;
83
91
  }), [e, `${t.cdnBase}|${t.uploadPath}`];
84
92
  }
85
- function oi(t, e, n, r = {}) {
86
- const { limit: s, debounceMs: i = Qa } = r, [a, o] = ii(t), [f, c] = $([]), [d, u] = $(null), [g, b] = $(!1), [y, h] = $(null), [m, p] = $(0), M = P(null);
93
+ function ci(t, e, n, r = {}) {
94
+ const { limit: s, debounceMs: i = Qa } = r, [a, o] = li(t), [f, c] = $([]), [d, u] = $(null), [g, b] = $(!1), [y, h] = $(null), [m, p] = $(0), M = P(null);
87
95
  F(() => {
88
96
  p(0), u(null);
89
97
  }, [n, e]), F(() => {
@@ -130,7 +138,7 @@ function oi(t, e, n, r = {}) {
130
138
  function We(t) {
131
139
  return t.key === "Escape" || t.key === "GoBack" || t.key === "BrowserBack" || t.key === "XF86Back" || t.keyCode === 461 || t.keyCode === 10009;
132
140
  }
133
- const fi = /* @__PURE__ */ new Set([
141
+ const di = /* @__PURE__ */ new Set([
134
142
  "Enter",
135
143
  " ",
136
144
  "ArrowLeft",
@@ -140,15 +148,15 @@ const fi = /* @__PURE__ */ new Set([
140
148
  "MediaPlayPause",
141
149
  "Select"
142
150
  ]);
143
- function li(t) {
151
+ function ui(t) {
144
152
  const { key: e, back: n, modifier: r, barVisible: s, focus: i } = t;
145
153
  if (r || i === "text") return "ignore";
146
154
  if (i === "elsewhere") return n ? "ignore" : "show";
147
155
  if (n) return i === "bar" && s ? "leave-bar" : "ignore";
148
- const a = fi.has(e);
156
+ const a = di.has(e);
149
157
  return i === "bar" ? !s && a ? "wake" : "show" : a ? "enter-bar" : "show";
150
158
  }
151
- function ci(t, e, n = !1, r = { atStart: !1, atEnd: !1 }) {
159
+ function hi(t, e, n = !1, r = { atStart: !1, atEnd: !1 }) {
152
160
  const s = t === "ArrowLeft" ? -1 : t === "ArrowRight" ? 1 : null, i = t === "ArrowUp" ? -1 : t === "ArrowDown" ? 1 : null;
153
161
  switch (e) {
154
162
  case "range":
@@ -169,9 +177,9 @@ const dt = "data-remote-engaged";
169
177
  function Fr(t) {
170
178
  return t instanceof HTMLSelectElement ? "select" : t instanceof HTMLInputElement ? t.type === "range" ? "range" : "text" : t instanceof HTMLTextAreaElement ? "text" : "button";
171
179
  }
172
- const di = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])';
180
+ const mi = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])';
173
181
  function $r(t) {
174
- return Array.from(t.querySelectorAll(di)).filter((e) => e.tabIndex >= 0 && e.getClientRects().length > 0);
182
+ return Array.from(t.querySelectorAll(mi)).filter((e) => e.tabIndex >= 0 && e.getClientRects().length > 0);
175
183
  }
176
184
  function Pr(t) {
177
185
  const e = $r(t);
@@ -180,17 +188,17 @@ function Pr(t) {
180
188
  function Dr(t) {
181
189
  return t ? t instanceof HTMLTextAreaElement ? !0 : t instanceof HTMLInputElement ? !["range", "checkbox", "radio", "button", "submit"].includes(t.type) : t.isContentEditable === !0 : !1;
182
190
  }
183
- const un = 240, Je = 8, ui = 28, Br = 240;
184
- function hi(t, e, n) {
191
+ const un = 240, Je = 8, gi = 28, Br = 240;
192
+ function pi(t, e, n) {
185
193
  let r = e.left - un - Je;
186
194
  r < Je && (r = e.right + Je), r = Math.min(r, n.width - un - Je), r = Math.max(Je, r);
187
- const s = Br + ui;
195
+ const s = Br + gi;
188
196
  let i = t.top + t.height / 2 - s / 2;
189
197
  return i = Math.min(i, n.height - s - Je), i = Math.max(Je, i), { left: r, top: i };
190
198
  }
191
- const Or = "/dataplatform/api/memes", mi = 120;
192
- function gi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
193
- const [s, i] = $(""), a = P(null), o = P(null), f = wn(), { items: c, loading: d, error: u, hasMore: g, loadMore: b } = oi(
199
+ const Or = "/dataplatform/api/memes", bi = 120;
200
+ function yi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
201
+ const [s, i] = $(""), a = P(null), o = P(null), f = wn(), { items: c, loading: d, error: u, hasMore: g, loadMore: b } = ci(
194
202
  f,
195
203
  Or,
196
204
  s.trim()
@@ -207,12 +215,12 @@ function gi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
207
215
  if (!B) return;
208
216
  const O = () => p({
209
217
  item: v,
210
- ...hi(C.getBoundingClientRect(), B.getBoundingClientRect(), {
218
+ ...pi(C.getBoundingClientRect(), B.getBoundingClientRect(), {
211
219
  width: window.innerWidth,
212
220
  height: window.innerHeight
213
221
  })
214
222
  });
215
- R(), D ? O() : M.current = window.setTimeout(O, mi);
223
+ R(), D ? O() : M.current = window.setTimeout(O, bi);
216
224
  },
217
225
  [R]
218
226
  );
@@ -359,18 +367,18 @@ function gi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
359
367
  );
360
368
  }
361
369
  function jr({ open: t, ...e }) {
362
- return t ? /* @__PURE__ */ l(gi, { ...e }) : null;
370
+ return t ? /* @__PURE__ */ l(yi, { ...e }) : null;
363
371
  }
364
- function pi(t) {
372
+ function wi(t) {
365
373
  return typeof t == "object" && t !== null && typeof t.mount == "function";
366
374
  }
367
- function bi(t) {
375
+ function vi(t) {
368
376
  if (typeof t != "object" || t === null)
369
377
  return !1;
370
378
  const e = t;
371
379
  return typeof e.unmount == "function" && typeof e.update == "function" && (e.mountSettings === void 0 || typeof e.mountSettings == "function");
372
380
  }
373
- function yi(t) {
381
+ function ki(t) {
374
382
  if (!t.startsWith("/") || t.startsWith("//") || /[\\\s]/.test(t) || [...t].some((e) => e.charCodeAt(0) < 32 || e.charCodeAt(0) === 127))
375
383
  return !1;
376
384
  try {
@@ -379,21 +387,21 @@ function yi(t) {
379
387
  return !1;
380
388
  }
381
389
  }
382
- function wi(t, e) {
383
- if (!yi(t))
390
+ function Si(t, e) {
391
+ if (!ki(t))
384
392
  return null;
385
393
  const n = new URL(t, e);
386
394
  return n.origin === e ? n.href : null;
387
395
  }
388
- function vi(t, e) {
389
- const n = wi(t.url, e);
396
+ function xi(t, e) {
397
+ const n = Si(t.url, e);
390
398
  return { id: t.id, name: t.name, load: n ? () => import(
391
399
  /* @vite-ignore */
392
400
  n
393
401
  ) : null };
394
402
  }
395
403
  const it = (t) => t instanceof Error ? t.message : String(t);
396
- function ki(t) {
404
+ function Ei(t) {
397
405
  let e = t.ctx, n = null, r = !1, s = !1;
398
406
  const i = /* @__PURE__ */ new Set(), a = (g, b) => t.onSettingsError?.(g, b), o = (g) => {
399
407
  if (i.delete(g))
@@ -437,7 +445,7 @@ function ki(t) {
437
445
  }
438
446
  if (r)
439
447
  return;
440
- if (!pi(g)) {
448
+ if (!wi(g)) {
441
449
  d("the game module does not export mount()");
442
450
  return;
443
451
  }
@@ -449,7 +457,7 @@ function ki(t) {
449
457
  d(`the game failed to start: ${it(h)}`, h);
450
458
  return;
451
459
  }
452
- if (!bi(y)) {
460
+ if (!vi(y)) {
453
461
  d("the game's mount() did not return { unmount, update }");
454
462
  return;
455
463
  }
@@ -518,7 +526,7 @@ function It() {
518
526
  function Ut(t) {
519
527
  return t.hasMedia && (t.chatCollapsed || t.isFullscreen);
520
528
  }
521
- function Si(t, e) {
529
+ function Mi(t, e) {
522
530
  return t && Ut(e);
523
531
  }
524
532
  function Sn(t) {
@@ -527,7 +535,7 @@ function Sn(t) {
527
535
  function Wr(t) {
528
536
  return t.hasMedia ? t.gameOverlay && !t.isFullscreen ? "room-corner" : "control-bar" : "none";
529
537
  }
530
- function xi(t, e) {
538
+ function _i(t, e) {
531
539
  if (e.clientId) {
532
540
  const n = t[e.clientId];
533
541
  if (n && (!e.author || !n.author || n.author === e.author)) return n;
@@ -537,7 +545,7 @@ function xi(t, e) {
537
545
  }
538
546
  }
539
547
  function zr(t, e, n) {
540
- const r = xi(t, e);
548
+ const r = _i(t, e);
541
549
  return r ? {
542
550
  name: r.name || n.name,
543
551
  // A connection briefly without a character (a reconnect waiting for one to
@@ -548,16 +556,16 @@ function zr(t, e, n) {
548
556
  here: !0
549
557
  } : { name: n.name, sprite: n.sprite, pictureUrl: n.pictureUrl, here: !1 };
550
558
  }
551
- function Ei(t, e, n) {
559
+ function Ti(t, e, n) {
552
560
  return !e || !n.here ? t : e.split(yr).join(n.name);
553
561
  }
554
562
  function Wt(t, e) {
555
563
  const n = x((r) => JSON.stringify(zr(r.roster, t, e)));
556
564
  return ye(() => JSON.parse(n), [n]);
557
565
  }
558
- const Mi = pr(!0);
566
+ const Ai = pr(!0);
559
567
  function Gr() {
560
- const t = gr(Mi);
568
+ const t = gr(Ai);
561
569
  F(() => {
562
570
  t && Xa();
563
571
  }, [t]);
@@ -571,7 +579,7 @@ const Tt = Ze.memo(
571
579
  },
572
580
  (t, e) => t.html === e.html && t.as === e.as && t.className === e.className && JSON.stringify(t.style) === JSON.stringify(e.style)
573
581
  );
574
- function _i(t, e) {
582
+ function Ii(t, e) {
575
583
  F(() => {
576
584
  const n = t.current;
577
585
  if (!n || !e || typeof IntersectionObserver > "u") return;
@@ -598,14 +606,14 @@ function qr({ sprite: t, url: e, alt: n, worn: r }) {
598
606
  r?.overlay && /* @__PURE__ */ l(Tt, { html: Za(r), style: { display: "contents" } })
599
607
  ] });
600
608
  }
601
- function Ti(t) {
609
+ function Ci(t) {
602
610
  return !(t.button !== 0 || t.ctrlKey || t.metaKey || t.shiftKey || t.altKey);
603
611
  }
604
- const Ai = pr(null);
612
+ const Ni = pr(null);
605
613
  function Vr() {
606
- return gr(Ai);
614
+ return gr(Ni);
607
615
  }
608
- function Ii({ src: t, title: e, onClose: n }) {
616
+ function Ri({ src: t, title: e, onClose: n }) {
609
617
  F(() => {
610
618
  const i = (a) => {
611
619
  We(a) && (a.stopPropagation(), n());
@@ -651,11 +659,11 @@ function Ii({ src: t, title: e, onClose: n }) {
651
659
  s
652
660
  ) : null;
653
661
  }
654
- const Jt = 240, Ci = 320;
655
- function Ni({ image: t }) {
662
+ const Jt = 240, Li = 320;
663
+ function Fi({ image: t }) {
656
664
  const [e, n] = $(!1), r = Ot(t.key);
657
665
  if (!r) return null;
658
- const s = t.w > 0 && t.h > 0, i = s ? Math.min(1, Ci / t.w, Jt / t.h) : 1;
666
+ const s = t.w > 0 && t.h > 0, i = s ? Math.min(1, Li / t.w, Jt / t.h) : 1;
659
667
  return /* @__PURE__ */ E(he, { children: [
660
668
  /* @__PURE__ */ l(
661
669
  "a",
@@ -666,7 +674,7 @@ function Ni({ image: t }) {
666
674
  className: "block max-w-full cursor-zoom-in",
667
675
  "data-testid": "chat-image",
668
676
  onClick: (a) => {
669
- Ti(a) && (a.preventDefault(), n(!0));
677
+ Ci(a) && (a.preventDefault(), n(!0));
670
678
  },
671
679
  children: /* @__PURE__ */ l(
672
680
  "img",
@@ -684,7 +692,7 @@ function Ni({ image: t }) {
684
692
  }
685
693
  ),
686
694
  e && /* @__PURE__ */ l(
687
- Ii,
695
+ Ri,
688
696
  {
689
697
  src: r,
690
698
  title: t.title,
@@ -694,12 +702,12 @@ function Ni({ image: t }) {
694
702
  ] });
695
703
  }
696
704
  function Jr({ images: t }) {
697
- return t?.length ? /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1 mt-1", "data-testid": "chat-images", children: t.map((e, n) => /* @__PURE__ */ l(Ni, { image: e }, `${e.key}-${n}`)) }) : null;
705
+ return t?.length ? /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1 mt-1", "data-testid": "chat-images", children: t.map((e, n) => /* @__PURE__ */ l(Fi, { image: e }, `${e.key}-${n}`)) }) : null;
698
706
  }
699
- function Ri(t, e) {
707
+ function $i(t, e) {
700
708
  return t.author && e.author ? t.author === e.author : !!e.clientId && t.clientId === e.clientId;
701
709
  }
702
- const Li = [
710
+ const Pi = [
703
711
  { id: "smileys", label: "Smileys & Emotion", data: "1f600:grinning face|1f603:grinning face with big eyes|1f604:grinning face with smiling eyes|1f601:beaming face with smiling eyes|1f606:grinning squinting face|1f605:grinning face with sweat|1f923:rolling on the floor laughing|1f602:face with tears of joy|1f642:slightly smiling face|1f643:upside-down face|1fae0:melting face|1f609:winking face|1f60a:smiling face with smiling eyes|1f607:smiling face with halo|1f970:smiling face with hearts|1f60d:smiling face with heart-eyes|1f929:star-struck|1f618:face blowing a kiss|1f617:kissing face|263a-fe0f:smiling face|1f61a:kissing face with closed eyes|1f619:kissing face with smiling eyes|1f972:smiling face with tear|1f60b:face savoring food|1f61b:face with tongue|1f61c:winking face with tongue|1f92a:zany face|1f61d:squinting face with tongue|1f911:money-mouth face|1f917:smiling face with open hands|1f92d:face with hand over mouth|1fae2:face with open eyes and hand over mouth|1fae3:face with peeking eye|1f92b:shushing face|1f914:thinking face|1fae1:saluting face|1f910:zipper-mouth face|1f928:face with raised eyebrow|1f610:neutral face|1f611:expressionless face|1f636:face without mouth|1fae5:dotted line face|1f636-200d-1f32b-fe0f:face in clouds|1f60f:smirking face|1f612:unamused face|1f644:face with rolling eyes|1f62c:grimacing face|1f62e-200d-1f4a8:face exhaling|1f925:lying face|1fae8:shaking face|1f60c:relieved face|1f614:pensive face|1f62a:sleepy face|1f924:drooling face|1f634:sleeping face|1f637:face with medical mask|1f912:face with thermometer|1f915:face with head-bandage|1f922:nauseated face|1f92e:face vomiting|1f927:sneezing face|1f975:hot face|1f976:cold face|1f974:woozy face|1f635:face with crossed-out eyes|1f635-200d-1f4ab:face with spiral eyes|1f92f:exploding head|1f920:cowboy hat face|1f973:partying face|1f978:disguised face|1f60e:smiling face with sunglasses|1f913:nerd face|1f9d0:face with monocle|1f615:confused face|1fae4:face with diagonal mouth|1f61f:worried face|1f641:slightly frowning face|2639-fe0f:frowning face|1f62e:face with open mouth|1f62f:hushed face|1f632:astonished face|1f633:flushed face|1f97a:pleading face|1f979:face holding back tears|1f626:frowning face with open mouth|1f627:anguished face|1f628:fearful face|1f630:anxious face with sweat|1f625:sad but relieved face|1f622:crying face|1f62d:loudly crying face|1f631:face screaming in fear|1f616:confounded face|1f623:persevering face|1f61e:disappointed face|1f613:downcast face with sweat|1f629:weary face|1f62b:tired face|1f971:yawning face|1f624:face with steam from nose|1f621:enraged face|1f620:angry face|1f92c:face with symbols on mouth|1f608:smiling face with horns|1f47f:angry face with horns|1f480:skull|2620-fe0f:skull and crossbones|1f4a9:pile of poo|1f921:clown face|1f479:ogre|1f47a:goblin|1f47b:ghost|1f47d:alien|1f47e:alien monster|1f916:robot|1f63a:grinning cat|1f638:grinning cat with smiling eyes|1f639:cat with tears of joy|1f63b:smiling cat with heart-eyes|1f63c:cat with wry smile|1f63d:kissing cat|1f640:weary cat|1f63f:crying cat|1f63e:pouting cat|1f648:see-no-evil monkey|1f649:hear-no-evil monkey|1f64a:speak-no-evil monkey|1f48c:love letter|1f498:heart with arrow|1f49d:heart with ribbon|1f496:sparkling heart|1f497:growing heart|1f493:beating heart|1f49e:revolving hearts|1f495:two hearts|1f49f:heart decoration|2763-fe0f:heart exclamation|1f494:broken heart|2764-fe0f-200d-1f525:heart on fire|2764-fe0f-200d-1fa79:mending heart|2764-fe0f:red heart|1fa77:pink heart|1f9e1:orange heart|1f49b:yellow heart|1f49a:green heart|1f499:blue heart|1fa75:light blue heart|1f49c:purple heart|1f90e:brown heart|1f5a4:black heart|1fa76:grey heart|1f90d:white heart|1f48b:kiss mark|1f4af:hundred points|1f4a2:anger symbol|1f4a5:collision|1f4ab:dizzy|1f4a6:sweat droplets|1f4a8:dashing away|1f573-fe0f:hole|1f4ac:speech balloon|1f441-fe0f-200d-1f5e8-fe0f:eye in speech bubble|1f5e8-fe0f:left speech bubble|1f5ef-fe0f:right anger bubble|1f4ad:thought balloon|1f4a4:zzz" },
704
712
  { id: "people", label: "People & Body", data: "1f44b:waving hand|1f91a:raised back of hand|1f590-fe0f:hand with fingers splayed|270b:raised hand|1f596:vulcan salute|1faf1:rightwards hand|1faf2:leftwards hand|1faf3:palm down hand|1faf4:palm up hand|1faf7:leftwards pushing hand|1faf8:rightwards pushing hand|1f44c:ok hand|1f90c:pinched fingers|1f90f:pinching hand|270c-fe0f:victory hand|1f91e:crossed fingers|1faf0:hand with index finger and thumb crossed|1f91f:love-you gesture|1f918:sign of the horns|1f919:call me hand|1f448:backhand index pointing left|1f449:backhand index pointing right|1f446:backhand index pointing up|1f595:middle finger|1f447:backhand index pointing down|261d-fe0f:index pointing up|1faf5:index pointing at the viewer|1f44d:thumbs up|1f44e:thumbs down|270a:raised fist|1f44a:oncoming fist|1f91b:left-facing fist|1f91c:right-facing fist|1f44f:clapping hands|1f64c:raising hands|1faf6:heart hands|1f450:open hands|1f932:palms up together|1f91d:handshake|1f64f:folded hands|270d-fe0f:writing hand|1f485:nail polish|1f933:selfie|1f4aa:flexed biceps|1f9be:mechanical arm|1f9bf:mechanical leg|1f9b5:leg|1f9b6:foot|1f442:ear|1f9bb:ear with hearing aid|1f443:nose|1f9e0:brain|1fac0:anatomical heart|1fac1:lungs|1f9b7:tooth|1f9b4:bone|1f440:eyes|1f441-fe0f:eye|1f445:tongue|1f444:mouth|1fae6:biting lip|1f476:baby|1f9d2:child|1f466:boy|1f467:girl|1f9d1:person|1f471:person blond hair|1f468:man|1f9d4:person beard|1f9d4-200d-2642-fe0f:man beard|1f9d4-200d-2640-fe0f:woman beard|1f468-200d-1f9b0:man red hair|1f468-200d-1f9b1:man curly hair|1f468-200d-1f9b3:man white hair|1f468-200d-1f9b2:man bald|1f469:woman|1f469-200d-1f9b0:woman red hair|1f9d1-200d-1f9b0:person red hair|1f469-200d-1f9b1:woman curly hair|1f9d1-200d-1f9b1:person curly hair|1f469-200d-1f9b3:woman white hair|1f9d1-200d-1f9b3:person white hair|1f469-200d-1f9b2:woman bald|1f9d1-200d-1f9b2:person bald|1f471-200d-2640-fe0f:woman blond hair|1f471-200d-2642-fe0f:man blond hair|1f9d3:older person|1f474:old man|1f475:old woman|1f64d:person frowning|1f64d-200d-2642-fe0f:man frowning|1f64d-200d-2640-fe0f:woman frowning|1f64e:person pouting|1f64e-200d-2642-fe0f:man pouting|1f64e-200d-2640-fe0f:woman pouting|1f645:person gesturing no|1f645-200d-2642-fe0f:man gesturing no|1f645-200d-2640-fe0f:woman gesturing no|1f646:person gesturing ok|1f646-200d-2642-fe0f:man gesturing ok|1f646-200d-2640-fe0f:woman gesturing ok|1f481:person tipping hand|1f481-200d-2642-fe0f:man tipping hand|1f481-200d-2640-fe0f:woman tipping hand|1f64b:person raising hand|1f64b-200d-2642-fe0f:man raising hand|1f64b-200d-2640-fe0f:woman raising hand|1f9cf:deaf person|1f9cf-200d-2642-fe0f:deaf man|1f9cf-200d-2640-fe0f:deaf woman|1f647:person bowing|1f647-200d-2642-fe0f:man bowing|1f647-200d-2640-fe0f:woman bowing|1f926:person facepalming|1f926-200d-2642-fe0f:man facepalming|1f926-200d-2640-fe0f:woman facepalming|1f937:person shrugging|1f937-200d-2642-fe0f:man shrugging|1f937-200d-2640-fe0f:woman shrugging|1f9d1-200d-2695-fe0f:health worker|1f468-200d-2695-fe0f:man health worker|1f469-200d-2695-fe0f:woman health worker|1f9d1-200d-1f393:student|1f468-200d-1f393:man student|1f469-200d-1f393:woman student|1f9d1-200d-1f3eb:teacher|1f468-200d-1f3eb:man teacher|1f469-200d-1f3eb:woman teacher|1f9d1-200d-2696-fe0f:judge|1f468-200d-2696-fe0f:man judge|1f469-200d-2696-fe0f:woman judge|1f9d1-200d-1f33e:farmer|1f468-200d-1f33e:man farmer|1f469-200d-1f33e:woman farmer|1f9d1-200d-1f373:cook|1f468-200d-1f373:man cook|1f469-200d-1f373:woman cook|1f9d1-200d-1f527:mechanic|1f468-200d-1f527:man mechanic|1f469-200d-1f527:woman mechanic|1f9d1-200d-1f3ed:factory worker|1f468-200d-1f3ed:man factory worker|1f469-200d-1f3ed:woman factory worker|1f9d1-200d-1f4bc:office worker|1f468-200d-1f4bc:man office worker|1f469-200d-1f4bc:woman office worker|1f9d1-200d-1f52c:scientist|1f468-200d-1f52c:man scientist|1f469-200d-1f52c:woman scientist|1f9d1-200d-1f4bb:technologist|1f468-200d-1f4bb:man technologist|1f469-200d-1f4bb:woman technologist|1f9d1-200d-1f3a4:singer|1f468-200d-1f3a4:man singer|1f469-200d-1f3a4:woman singer|1f9d1-200d-1f3a8:artist|1f468-200d-1f3a8:man artist|1f469-200d-1f3a8:woman artist|1f9d1-200d-2708-fe0f:pilot|1f468-200d-2708-fe0f:man pilot|1f469-200d-2708-fe0f:woman pilot|1f9d1-200d-1f680:astronaut|1f468-200d-1f680:man astronaut|1f469-200d-1f680:woman astronaut|1f9d1-200d-1f692:firefighter|1f468-200d-1f692:man firefighter|1f469-200d-1f692:woman firefighter|1f46e:police officer|1f46e-200d-2642-fe0f:man police officer|1f46e-200d-2640-fe0f:woman police officer|1f575-fe0f:detective|1f575-fe0f-200d-2642-fe0f:man detective|1f575-fe0f-200d-2640-fe0f:woman detective|1f482:guard|1f482-200d-2642-fe0f:man guard|1f482-200d-2640-fe0f:woman guard|1f977:ninja|1f477:construction worker|1f477-200d-2642-fe0f:man construction worker|1f477-200d-2640-fe0f:woman construction worker|1fac5:person with crown|1f934:prince|1f478:princess|1f473:person wearing turban|1f473-200d-2642-fe0f:man wearing turban|1f473-200d-2640-fe0f:woman wearing turban|1f472:person with skullcap|1f9d5:woman with headscarf|1f935:person in tuxedo|1f935-200d-2642-fe0f:man in tuxedo|1f935-200d-2640-fe0f:woman in tuxedo|1f470:person with veil|1f470-200d-2642-fe0f:man with veil|1f470-200d-2640-fe0f:woman with veil|1f930:pregnant woman|1fac3:pregnant man|1fac4:pregnant person|1f931:breast-feeding|1f469-200d-1f37c:woman feeding baby|1f468-200d-1f37c:man feeding baby|1f9d1-200d-1f37c:person feeding baby|1f47c:baby angel|1f385:santa claus|1f936:mrs. claus|1f9d1-200d-1f384:mx claus|1f9b8:superhero|1f9b8-200d-2642-fe0f:man superhero|1f9b8-200d-2640-fe0f:woman superhero|1f9b9:supervillain|1f9b9-200d-2642-fe0f:man supervillain|1f9b9-200d-2640-fe0f:woman supervillain|1f9d9:mage|1f9d9-200d-2642-fe0f:man mage|1f9d9-200d-2640-fe0f:woman mage|1f9da:fairy|1f9da-200d-2642-fe0f:man fairy|1f9da-200d-2640-fe0f:woman fairy|1f9db:vampire|1f9db-200d-2642-fe0f:man vampire|1f9db-200d-2640-fe0f:woman vampire|1f9dc:merperson|1f9dc-200d-2642-fe0f:merman|1f9dc-200d-2640-fe0f:mermaid|1f9dd:elf|1f9dd-200d-2642-fe0f:man elf|1f9dd-200d-2640-fe0f:woman elf|1f9de:genie|1f9de-200d-2642-fe0f:man genie|1f9de-200d-2640-fe0f:woman genie|1f9df:zombie|1f9df-200d-2642-fe0f:man zombie|1f9df-200d-2640-fe0f:woman zombie|1f9cc:troll|1f486:person getting massage|1f486-200d-2642-fe0f:man getting massage|1f486-200d-2640-fe0f:woman getting massage|1f487:person getting haircut|1f487-200d-2642-fe0f:man getting haircut|1f487-200d-2640-fe0f:woman getting haircut|1f6b6:person walking|1f6b6-200d-2642-fe0f:man walking|1f6b6-200d-2640-fe0f:woman walking|1f9cd:person standing|1f9cd-200d-2642-fe0f:man standing|1f9cd-200d-2640-fe0f:woman standing|1f9ce:person kneeling|1f9ce-200d-2642-fe0f:man kneeling|1f9ce-200d-2640-fe0f:woman kneeling|1f9d1-200d-1f9af:person with white cane|1f468-200d-1f9af:man with white cane|1f469-200d-1f9af:woman with white cane|1f9d1-200d-1f9bc:person in motorized wheelchair|1f468-200d-1f9bc:man in motorized wheelchair|1f469-200d-1f9bc:woman in motorized wheelchair|1f9d1-200d-1f9bd:person in manual wheelchair|1f468-200d-1f9bd:man in manual wheelchair|1f469-200d-1f9bd:woman in manual wheelchair|1f3c3:person running|1f3c3-200d-2642-fe0f:man running|1f3c3-200d-2640-fe0f:woman running|1f483:woman dancing|1f57a:man dancing|1f574-fe0f:person in suit levitating|1f46f:people with bunny ears|1f46f-200d-2642-fe0f:men with bunny ears|1f46f-200d-2640-fe0f:women with bunny ears|1f9d6:person in steamy room|1f9d6-200d-2642-fe0f:man in steamy room|1f9d6-200d-2640-fe0f:woman in steamy room|1f9d7:person climbing|1f9d7-200d-2642-fe0f:man climbing|1f9d7-200d-2640-fe0f:woman climbing|1f93a:person fencing|1f3c7:horse racing|26f7-fe0f:skier|1f3c2:snowboarder|1f3cc-fe0f:person golfing|1f3cc-fe0f-200d-2642-fe0f:man golfing|1f3cc-fe0f-200d-2640-fe0f:woman golfing|1f3c4:person surfing|1f3c4-200d-2642-fe0f:man surfing|1f3c4-200d-2640-fe0f:woman surfing|1f6a3:person rowing boat|1f6a3-200d-2642-fe0f:man rowing boat|1f6a3-200d-2640-fe0f:woman rowing boat|1f3ca:person swimming|1f3ca-200d-2642-fe0f:man swimming|1f3ca-200d-2640-fe0f:woman swimming|26f9-fe0f:person bouncing ball|26f9-fe0f-200d-2642-fe0f:man bouncing ball|26f9-fe0f-200d-2640-fe0f:woman bouncing ball|1f3cb-fe0f:person lifting weights|1f3cb-fe0f-200d-2642-fe0f:man lifting weights|1f3cb-fe0f-200d-2640-fe0f:woman lifting weights|1f6b4:person biking|1f6b4-200d-2642-fe0f:man biking|1f6b4-200d-2640-fe0f:woman biking|1f6b5:person mountain biking|1f6b5-200d-2642-fe0f:man mountain biking|1f6b5-200d-2640-fe0f:woman mountain biking|1f938:person cartwheeling|1f938-200d-2642-fe0f:man cartwheeling|1f938-200d-2640-fe0f:woman cartwheeling|1f93c:people wrestling|1f93c-200d-2642-fe0f:men wrestling|1f93c-200d-2640-fe0f:women wrestling|1f93d:person playing water polo|1f93d-200d-2642-fe0f:man playing water polo|1f93d-200d-2640-fe0f:woman playing water polo|1f93e:person playing handball|1f93e-200d-2642-fe0f:man playing handball|1f93e-200d-2640-fe0f:woman playing handball|1f939:person juggling|1f939-200d-2642-fe0f:man juggling|1f939-200d-2640-fe0f:woman juggling|1f9d8:person in lotus position|1f9d8-200d-2642-fe0f:man in lotus position|1f9d8-200d-2640-fe0f:woman in lotus position|1f6c0:person taking bath|1f6cc:person in bed|1f9d1-200d-1f91d-200d-1f9d1:people holding hands|1f46d:women holding hands|1f46b:woman and man holding hands|1f46c:men holding hands|1f48f:kiss|1f469-200d-2764-fe0f-200d-1f48b-200d-1f468:kiss woman, man|1f468-200d-2764-fe0f-200d-1f48b-200d-1f468:kiss man, man|1f469-200d-2764-fe0f-200d-1f48b-200d-1f469:kiss woman, woman|1f491:couple with heart|1f469-200d-2764-fe0f-200d-1f468:couple with heart woman, man|1f468-200d-2764-fe0f-200d-1f468:couple with heart man, man|1f469-200d-2764-fe0f-200d-1f469:couple with heart woman, woman|1f468-200d-1f469-200d-1f466:family man, woman, boy|1f468-200d-1f469-200d-1f467:family man, woman, girl|1f468-200d-1f469-200d-1f467-200d-1f466:family man, woman, girl, boy|1f468-200d-1f469-200d-1f466-200d-1f466:family man, woman, boy, boy|1f468-200d-1f469-200d-1f467-200d-1f467:family man, woman, girl, girl|1f468-200d-1f468-200d-1f466:family man, man, boy|1f468-200d-1f468-200d-1f467:family man, man, girl|1f468-200d-1f468-200d-1f467-200d-1f466:family man, man, girl, boy|1f468-200d-1f468-200d-1f466-200d-1f466:family man, man, boy, boy|1f468-200d-1f468-200d-1f467-200d-1f467:family man, man, girl, girl|1f469-200d-1f469-200d-1f466:family woman, woman, boy|1f469-200d-1f469-200d-1f467:family woman, woman, girl|1f469-200d-1f469-200d-1f467-200d-1f466:family woman, woman, girl, boy|1f469-200d-1f469-200d-1f466-200d-1f466:family woman, woman, boy, boy|1f469-200d-1f469-200d-1f467-200d-1f467:family woman, woman, girl, girl|1f468-200d-1f466:family man, boy|1f468-200d-1f466-200d-1f466:family man, boy, boy|1f468-200d-1f467:family man, girl|1f468-200d-1f467-200d-1f466:family man, girl, boy|1f468-200d-1f467-200d-1f467:family man, girl, girl|1f469-200d-1f466:family woman, boy|1f469-200d-1f466-200d-1f466:family woman, boy, boy|1f469-200d-1f467:family woman, girl|1f469-200d-1f467-200d-1f466:family woman, girl, boy|1f469-200d-1f467-200d-1f467:family woman, girl, girl|1f5e3-fe0f:speaking head|1f464:bust in silhouette|1f465:busts in silhouette|1fac2:people hugging|1f46a:family|1f463:footprints" },
705
713
  { id: "nature", label: "Animals & Nature", data: "1f435:monkey face|1f412:monkey|1f98d:gorilla|1f9a7:orangutan|1f436:dog face|1f415:dog|1f9ae:guide dog|1f415-200d-1f9ba:service dog|1f429:poodle|1f43a:wolf|1f98a:fox|1f99d:raccoon|1f431:cat face|1f408:cat|1f408-200d-2b1b:black cat|1f981:lion|1f42f:tiger face|1f405:tiger|1f406:leopard|1f434:horse face|1face:moose|1facf:donkey|1f40e:horse|1f984:unicorn|1f993:zebra|1f98c:deer|1f9ac:bison|1f42e:cow face|1f402:ox|1f403:water buffalo|1f404:cow|1f437:pig face|1f416:pig|1f417:boar|1f43d:pig nose|1f40f:ram|1f411:ewe|1f410:goat|1f42a:camel|1f42b:two-hump camel|1f999:llama|1f992:giraffe|1f418:elephant|1f9a3:mammoth|1f98f:rhinoceros|1f99b:hippopotamus|1f42d:mouse face|1f401:mouse|1f400:rat|1f439:hamster|1f430:rabbit face|1f407:rabbit|1f43f-fe0f:chipmunk|1f9ab:beaver|1f994:hedgehog|1f987:bat|1f43b:bear|1f43b-200d-2744-fe0f:polar bear|1f428:koala|1f43c:panda|1f9a5:sloth|1f9a6:otter|1f9a8:skunk|1f998:kangaroo|1f9a1:badger|1f43e:paw prints|1f983:turkey|1f414:chicken|1f413:rooster|1f423:hatching chick|1f424:baby chick|1f425:front-facing baby chick|1f426:bird|1f427:penguin|1f54a-fe0f:dove|1f985:eagle|1f986:duck|1f9a2:swan|1f989:owl|1f9a4:dodo|1fab6:feather|1f9a9:flamingo|1f99a:peacock|1f99c:parrot|1fabd:wing|1f426-200d-2b1b:black bird|1fabf:goose|1f438:frog|1f40a:crocodile|1f422:turtle|1f98e:lizard|1f40d:snake|1f432:dragon face|1f409:dragon|1f995:sauropod|1f996:t-rex|1f433:spouting whale|1f40b:whale|1f42c:dolphin|1f9ad:seal|1f41f:fish|1f420:tropical fish|1f421:blowfish|1f988:shark|1f419:octopus|1f41a:spiral shell|1fab8:coral|1fabc:jellyfish|1f980:crab|1f99e:lobster|1f990:shrimp|1f991:squid|1f9aa:oyster|1f40c:snail|1f98b:butterfly|1f41b:bug|1f41c:ant|1f41d:honeybee|1fab2:beetle|1f41e:lady beetle|1f997:cricket|1fab3:cockroach|1f577-fe0f:spider|1f578-fe0f:spider web|1f982:scorpion|1f99f:mosquito|1fab0:fly|1fab1:worm|1f9a0:microbe|1f490:bouquet|1f338:cherry blossom|1f4ae:white flower|1fab7:lotus|1f3f5-fe0f:rosette|1f339:rose|1f940:wilted flower|1f33a:hibiscus|1f33b:sunflower|1f33c:blossom|1f337:tulip|1fabb:hyacinth|1f331:seedling|1fab4:potted plant|1f332:evergreen tree|1f333:deciduous tree|1f334:palm tree|1f335:cactus|1f33e:sheaf of rice|1f33f:herb|2618-fe0f:shamrock|1f340:four leaf clover|1f341:maple leaf|1f342:fallen leaf|1f343:leaf fluttering in wind|1fab9:empty nest|1faba:nest with eggs|1f344:mushroom" },
@@ -710,13 +718,13 @@ const Li = [
710
718
  { id: "symbols", label: "Symbols", data: "1f3e7:atm sign|1f6ae:litter in bin sign|1f6b0:potable water|267f:wheelchair symbol|1f6b9:men’s room|1f6ba:women’s room|1f6bb:restroom|1f6bc:baby symbol|1f6be:water closet|1f6c2:passport control|1f6c3:customs|1f6c4:baggage claim|1f6c5:left luggage|26a0-fe0f:warning|1f6b8:children crossing|26d4:no entry|1f6ab:prohibited|1f6b3:no bicycles|1f6ad:no smoking|1f6af:no littering|1f6b1:non-potable water|1f6b7:no pedestrians|1f4f5:no mobile phones|1f51e:no one under eighteen|2622-fe0f:radioactive|2623-fe0f:biohazard|2b06-fe0f:up arrow|2197-fe0f:up-right arrow|27a1-fe0f:right arrow|2198-fe0f:down-right arrow|2b07-fe0f:down arrow|2199-fe0f:down-left arrow|2b05-fe0f:left arrow|2196-fe0f:up-left arrow|2195-fe0f:up-down arrow|2194-fe0f:left-right arrow|21a9-fe0f:right arrow curving left|21aa-fe0f:left arrow curving right|2934-fe0f:right arrow curving up|2935-fe0f:right arrow curving down|1f503:clockwise vertical arrows|1f504:counterclockwise arrows button|1f519:back arrow|1f51a:end arrow|1f51b:on! arrow|1f51c:soon arrow|1f51d:top arrow|1f6d0:place of worship|269b-fe0f:atom symbol|1f549-fe0f:om|2721-fe0f:star of david|2638-fe0f:wheel of dharma|262f-fe0f:yin yang|271d-fe0f:latin cross|2626-fe0f:orthodox cross|262a-fe0f:star and crescent|262e-fe0f:peace symbol|1f54e:menorah|1f52f:dotted six-pointed star|1faaf:khanda|2648:aries|2649:taurus|264a:gemini|264b:cancer|264c:leo|264d:virgo|264e:libra|264f:scorpio|2650:sagittarius|2651:capricorn|2652:aquarius|2653:pisces|26ce:ophiuchus|1f500:shuffle tracks button|1f501:repeat button|1f502:repeat single button|25b6-fe0f:play button|23e9:fast-forward button|23ed-fe0f:next track button|23ef-fe0f:play or pause button|25c0-fe0f:reverse button|23ea:fast reverse button|23ee-fe0f:last track button|1f53c:upwards button|23eb:fast up button|1f53d:downwards button|23ec:fast down button|23f8-fe0f:pause button|23f9-fe0f:stop button|23fa-fe0f:record button|23cf-fe0f:eject button|1f3a6:cinema|1f505:dim button|1f506:bright button|1f4f6:antenna bars|1f6dc:wireless|1f4f3:vibration mode|1f4f4:mobile phone off|2640-fe0f:female sign|2642-fe0f:male sign|26a7-fe0f:transgender symbol|2716-fe0f:multiply|2795:plus|2796:minus|2797:divide|1f7f0:heavy equals sign|267e-fe0f:infinity|203c-fe0f:double exclamation mark|2049-fe0f:exclamation question mark|2753:red question mark|2754:white question mark|2755:white exclamation mark|2757:red exclamation mark|3030-fe0f:wavy dash|1f4b1:currency exchange|1f4b2:heavy dollar sign|2695-fe0f:medical symbol|267b-fe0f:recycling symbol|269c-fe0f:fleur-de-lis|1f531:trident emblem|1f4db:name badge|1f530:japanese symbol for beginner|2b55:hollow red circle|2705:check mark button|2611-fe0f:check box with check|2714-fe0f:check mark|274c:cross mark|274e:cross mark button|27b0:curly loop|27bf:double curly loop|303d-fe0f:part alternation mark|2733-fe0f:eight-spoked asterisk|2734-fe0f:eight-pointed star|2747-fe0f:sparkle|00a9-fe0f:copyright|00ae-fe0f:registered|2122-fe0f:trade mark|0023-fe0f-20e3:keycap #|002a-fe0f-20e3:keycap *|0030-fe0f-20e3:keycap 0|0031-fe0f-20e3:keycap 1|0032-fe0f-20e3:keycap 2|0033-fe0f-20e3:keycap 3|0034-fe0f-20e3:keycap 4|0035-fe0f-20e3:keycap 5|0036-fe0f-20e3:keycap 6|0037-fe0f-20e3:keycap 7|0038-fe0f-20e3:keycap 8|0039-fe0f-20e3:keycap 9|1f51f:keycap 10|1f520:input latin uppercase|1f521:input latin lowercase|1f522:input numbers|1f523:input symbols|1f524:input latin letters|1f170-fe0f:a button (blood type)|1f18e:ab button (blood type)|1f171-fe0f:b button (blood type)|1f191:cl button|1f192:cool button|1f193:free button|2139-fe0f:information|1f194:id button|24c2-fe0f:circled m|1f195:new button|1f196:ng button|1f17e-fe0f:o button (blood type)|1f197:ok button|1f17f-fe0f:p button|1f198:sos button|1f199:up! button|1f19a:vs button|1f201:japanese “here” button|1f202-fe0f:japanese “service charge” button|1f237-fe0f:japanese “monthly amount” button|1f236:japanese “not free of charge” button|1f22f:japanese “reserved” button|1f250:japanese “bargain” button|1f239:japanese “discount” button|1f21a:japanese “free of charge” button|1f232:japanese “prohibited” button|1f251:japanese “acceptable” button|1f238:japanese “application” button|1f234:japanese “passing grade” button|1f233:japanese “vacancy” button|3297-fe0f:japanese “congratulations” button|3299-fe0f:japanese “secret” button|1f23a:japanese “open for business” button|1f235:japanese “no vacancy” button|1f534:red circle|1f7e0:orange circle|1f7e1:yellow circle|1f7e2:green circle|1f535:blue circle|1f7e3:purple circle|1f7e4:brown circle|26ab:black circle|26aa:white circle|1f7e5:red square|1f7e7:orange square|1f7e8:yellow square|1f7e9:green square|1f7e6:blue square|1f7ea:purple square|1f7eb:brown square|2b1b:black large square|2b1c:white large square|25fc-fe0f:black medium square|25fb-fe0f:white medium square|25fe:black medium-small square|25fd:white medium-small square|25aa-fe0f:black small square|25ab-fe0f:white small square|1f536:large orange diamond|1f537:large blue diamond|1f538:small orange diamond|1f539:small blue diamond|1f53a:red triangle pointed up|1f53b:red triangle pointed down|1f4a0:diamond with a dot|1f518:radio button|1f533:white square button|1f532:black square button" },
711
719
  { id: "flags", label: "Flags", data: "1f3c1:chequered flag|1f6a9:triangular flag|1f38c:crossed flags|1f3f4:black flag|1f3f3-fe0f:white flag|1f3f3-fe0f-200d-1f308:rainbow flag|1f3f3-fe0f-200d-26a7-fe0f:transgender flag|1f3f4-200d-2620-fe0f:pirate flag|1f1e6-1f1e8:flag ascension island|1f1e6-1f1e9:flag andorra|1f1e6-1f1ea:flag united arab emirates|1f1e6-1f1eb:flag afghanistan|1f1e6-1f1ec:flag antigua & barbuda|1f1e6-1f1ee:flag anguilla|1f1e6-1f1f1:flag albania|1f1e6-1f1f2:flag armenia|1f1e6-1f1f4:flag angola|1f1e6-1f1f6:flag antarctica|1f1e6-1f1f7:flag argentina|1f1e6-1f1f8:flag american samoa|1f1e6-1f1f9:flag austria|1f1e6-1f1fa:flag australia|1f1e6-1f1fc:flag aruba|1f1e6-1f1fd:flag åland islands|1f1e6-1f1ff:flag azerbaijan|1f1e7-1f1e6:flag bosnia & herzegovina|1f1e7-1f1e7:flag barbados|1f1e7-1f1e9:flag bangladesh|1f1e7-1f1ea:flag belgium|1f1e7-1f1eb:flag burkina faso|1f1e7-1f1ec:flag bulgaria|1f1e7-1f1ed:flag bahrain|1f1e7-1f1ee:flag burundi|1f1e7-1f1ef:flag benin|1f1e7-1f1f1:flag st. barthélemy|1f1e7-1f1f2:flag bermuda|1f1e7-1f1f3:flag brunei|1f1e7-1f1f4:flag bolivia|1f1e7-1f1f6:flag caribbean netherlands|1f1e7-1f1f7:flag brazil|1f1e7-1f1f8:flag bahamas|1f1e7-1f1f9:flag bhutan|1f1e7-1f1fb:flag bouvet island|1f1e7-1f1fc:flag botswana|1f1e7-1f1fe:flag belarus|1f1e7-1f1ff:flag belize|1f1e8-1f1e6:flag canada|1f1e8-1f1e8:flag cocos (keeling) islands|1f1e8-1f1e9:flag congo - kinshasa|1f1e8-1f1eb:flag central african republic|1f1e8-1f1ec:flag congo - brazzaville|1f1e8-1f1ed:flag switzerland|1f1e8-1f1ee:flag côte d’ivoire|1f1e8-1f1f0:flag cook islands|1f1e8-1f1f1:flag chile|1f1e8-1f1f2:flag cameroon|1f1e8-1f1f3:flag china|1f1e8-1f1f4:flag colombia|1f1e8-1f1f5:flag clipperton island|1f1e8-1f1f7:flag costa rica|1f1e8-1f1fa:flag cuba|1f1e8-1f1fb:flag cape verde|1f1e8-1f1fc:flag curaçao|1f1e8-1f1fd:flag christmas island|1f1e8-1f1fe:flag cyprus|1f1e8-1f1ff:flag czechia|1f1e9-1f1ea:flag germany|1f1e9-1f1ec:flag diego garcia|1f1e9-1f1ef:flag djibouti|1f1e9-1f1f0:flag denmark|1f1e9-1f1f2:flag dominica|1f1e9-1f1f4:flag dominican republic|1f1e9-1f1ff:flag algeria|1f1ea-1f1e6:flag ceuta & melilla|1f1ea-1f1e8:flag ecuador|1f1ea-1f1ea:flag estonia|1f1ea-1f1ec:flag egypt|1f1ea-1f1ed:flag western sahara|1f1ea-1f1f7:flag eritrea|1f1ea-1f1f8:flag spain|1f1ea-1f1f9:flag ethiopia|1f1ea-1f1fa:flag european union|1f1eb-1f1ee:flag finland|1f1eb-1f1ef:flag fiji|1f1eb-1f1f0:flag falkland islands|1f1eb-1f1f2:flag micronesia|1f1eb-1f1f4:flag faroe islands|1f1eb-1f1f7:flag france|1f1ec-1f1e6:flag gabon|1f1ec-1f1e7:flag united kingdom|1f1ec-1f1e9:flag grenada|1f1ec-1f1ea:flag georgia|1f1ec-1f1eb:flag french guiana|1f1ec-1f1ec:flag guernsey|1f1ec-1f1ed:flag ghana|1f1ec-1f1ee:flag gibraltar|1f1ec-1f1f1:flag greenland|1f1ec-1f1f2:flag gambia|1f1ec-1f1f3:flag guinea|1f1ec-1f1f5:flag guadeloupe|1f1ec-1f1f6:flag equatorial guinea|1f1ec-1f1f7:flag greece|1f1ec-1f1f8:flag south georgia & south sandwich islands|1f1ec-1f1f9:flag guatemala|1f1ec-1f1fa:flag guam|1f1ec-1f1fc:flag guinea-bissau|1f1ec-1f1fe:flag guyana|1f1ed-1f1f0:flag hong kong sar china|1f1ed-1f1f2:flag heard island & mcdonald islands|1f1ed-1f1f3:flag honduras|1f1ed-1f1f7:flag croatia|1f1ed-1f1f9:flag haiti|1f1ed-1f1fa:flag hungary|1f1ee-1f1e8:flag canary islands|1f1ee-1f1e9:flag indonesia|1f1ee-1f1ea:flag ireland|1f1ee-1f1f1:flag israel|1f1ee-1f1f2:flag isle of man|1f1ee-1f1f3:flag india|1f1ee-1f1f4:flag british indian ocean territory|1f1ee-1f1f6:flag iraq|1f1ee-1f1f7:flag iran|1f1ee-1f1f8:flag iceland|1f1ee-1f1f9:flag italy|1f1ef-1f1ea:flag jersey|1f1ef-1f1f2:flag jamaica|1f1ef-1f1f4:flag jordan|1f1ef-1f1f5:flag japan|1f1f0-1f1ea:flag kenya|1f1f0-1f1ec:flag kyrgyzstan|1f1f0-1f1ed:flag cambodia|1f1f0-1f1ee:flag kiribati|1f1f0-1f1f2:flag comoros|1f1f0-1f1f3:flag st. kitts & nevis|1f1f0-1f1f5:flag north korea|1f1f0-1f1f7:flag south korea|1f1f0-1f1fc:flag kuwait|1f1f0-1f1fe:flag cayman islands|1f1f0-1f1ff:flag kazakhstan|1f1f1-1f1e6:flag laos|1f1f1-1f1e7:flag lebanon|1f1f1-1f1e8:flag st. lucia|1f1f1-1f1ee:flag liechtenstein|1f1f1-1f1f0:flag sri lanka|1f1f1-1f1f7:flag liberia|1f1f1-1f1f8:flag lesotho|1f1f1-1f1f9:flag lithuania|1f1f1-1f1fa:flag luxembourg|1f1f1-1f1fb:flag latvia|1f1f1-1f1fe:flag libya|1f1f2-1f1e6:flag morocco|1f1f2-1f1e8:flag monaco|1f1f2-1f1e9:flag moldova|1f1f2-1f1ea:flag montenegro|1f1f2-1f1eb:flag st. martin|1f1f2-1f1ec:flag madagascar|1f1f2-1f1ed:flag marshall islands|1f1f2-1f1f0:flag north macedonia|1f1f2-1f1f1:flag mali|1f1f2-1f1f2:flag myanmar (burma)|1f1f2-1f1f3:flag mongolia|1f1f2-1f1f4:flag macao sar china|1f1f2-1f1f5:flag northern mariana islands|1f1f2-1f1f6:flag martinique|1f1f2-1f1f7:flag mauritania|1f1f2-1f1f8:flag montserrat|1f1f2-1f1f9:flag malta|1f1f2-1f1fa:flag mauritius|1f1f2-1f1fb:flag maldives|1f1f2-1f1fc:flag malawi|1f1f2-1f1fd:flag mexico|1f1f2-1f1fe:flag malaysia|1f1f2-1f1ff:flag mozambique|1f1f3-1f1e6:flag namibia|1f1f3-1f1e8:flag new caledonia|1f1f3-1f1ea:flag niger|1f1f3-1f1eb:flag norfolk island|1f1f3-1f1ec:flag nigeria|1f1f3-1f1ee:flag nicaragua|1f1f3-1f1f1:flag netherlands|1f1f3-1f1f4:flag norway|1f1f3-1f1f5:flag nepal|1f1f3-1f1f7:flag nauru|1f1f3-1f1fa:flag niue|1f1f3-1f1ff:flag new zealand|1f1f4-1f1f2:flag oman|1f1f5-1f1e6:flag panama|1f1f5-1f1ea:flag peru|1f1f5-1f1eb:flag french polynesia|1f1f5-1f1ec:flag papua new guinea|1f1f5-1f1ed:flag philippines|1f1f5-1f1f0:flag pakistan|1f1f5-1f1f1:flag poland|1f1f5-1f1f2:flag st. pierre & miquelon|1f1f5-1f1f3:flag pitcairn islands|1f1f5-1f1f7:flag puerto rico|1f1f5-1f1f8:flag palestinian territories|1f1f5-1f1f9:flag portugal|1f1f5-1f1fc:flag palau|1f1f5-1f1fe:flag paraguay|1f1f6-1f1e6:flag qatar|1f1f7-1f1ea:flag réunion|1f1f7-1f1f4:flag romania|1f1f7-1f1f8:flag serbia|1f1f7-1f1fa:flag russia|1f1f7-1f1fc:flag rwanda|1f1f8-1f1e6:flag saudi arabia|1f1f8-1f1e7:flag solomon islands|1f1f8-1f1e8:flag seychelles|1f1f8-1f1e9:flag sudan|1f1f8-1f1ea:flag sweden|1f1f8-1f1ec:flag singapore|1f1f8-1f1ed:flag st. helena, ascension & tristan da cunha|1f1f8-1f1ee:flag slovenia|1f1f8-1f1ef:flag svalbard & jan mayen|1f1f8-1f1f0:flag slovakia|1f1f8-1f1f1:flag sierra leone|1f1f8-1f1f2:flag san marino|1f1f8-1f1f3:flag senegal|1f1f8-1f1f4:flag somalia|1f1f8-1f1f7:flag suriname|1f1f8-1f1f8:flag south sudan|1f1f8-1f1f9:flag são tomé & príncipe|1f1f8-1f1fb:flag el salvador|1f1f8-1f1fd:flag sint maarten|1f1f8-1f1fe:flag syria|1f1f8-1f1ff:flag eswatini|1f1f9-1f1e6:flag tristan da cunha|1f1f9-1f1e8:flag turks & caicos islands|1f1f9-1f1e9:flag chad|1f1f9-1f1eb:flag french southern and antarctic lands|1f1f9-1f1ec:flag togo|1f1f9-1f1ed:flag thailand|1f1f9-1f1ef:flag tajikistan|1f1f9-1f1f0:flag tokelau|1f1f9-1f1f1:flag timor-leste|1f1f9-1f1f2:flag turkmenistan|1f1f9-1f1f3:flag tunisia|1f1f9-1f1f4:flag tonga|1f1f9-1f1f7:flag türkiye|1f1f9-1f1f9:flag trinidad & tobago|1f1f9-1f1fb:flag tuvalu|1f1f9-1f1fc:flag taiwan|1f1f9-1f1ff:flag tanzania|1f1fa-1f1e6:flag ukraine|1f1fa-1f1ec:flag uganda|1f1fa-1f1f2:flag u.s. outlying islands|1f1fa-1f1f3:flag united nations|1f1fa-1f1f8:flag united states|1f1fa-1f1fe:flag uruguay|1f1fa-1f1ff:flag uzbekistan|1f1fb-1f1e6:flag vatican city|1f1fb-1f1e8:flag st. vincent & grenadines|1f1fb-1f1ea:flag venezuela|1f1fb-1f1ec:flag british virgin islands|1f1fb-1f1ee:flag u.s. virgin islands|1f1fb-1f1f3:flag vietnam|1f1fb-1f1fa:flag vanuatu|1f1fc-1f1eb:flag wallis & futuna|1f1fc-1f1f8:flag samoa|1f1fd-1f1f0:flag kosovo|1f1fe-1f1ea:flag yemen|1f1fe-1f1f9:flag mayotte|1f1ff-1f1e6:flag south africa|1f1ff-1f1f2:flag zambia|1f1ff-1f1fc:flag zimbabwe|1f3f4-e0067-e0062-e0065-e006e-e0067-e007f:flag england|1f3f4-e0067-e0062-e0073-e0063-e0074-e007f:flag scotland|1f3f4-e0067-e0062-e0077-e006c-e0073-e007f:flag wales" }
712
720
  ];
713
- function Fi(t) {
721
+ function Di(t) {
714
722
  const e = t.indexOf(":"), n = t.slice(0, e);
715
723
  return { char: String.fromCodePoint(...n.split("-").map((r) => parseInt(r, 16))), name: t.slice(e + 1) };
716
724
  }
717
725
  let Un = null;
718
726
  function xn() {
719
- return Un ??= Li.map((t) => ({ id: t.id, label: t.label, emoji: t.data.split("|").map(Fi) })), Un;
727
+ return Un ??= Pi.map((t) => ({ id: t.id, label: t.label, emoji: t.data.split("|").map(Di) })), Un;
720
728
  }
721
729
  let Qe = null;
722
730
  function jt(t) {
@@ -730,7 +738,7 @@ function jt(t) {
730
738
  }
731
739
  return Qe.get(t) ?? Qe.get(t.replace(/\ufe0f/g, ""));
732
740
  }
733
- function $i(t, e = 120) {
741
+ function Bi(t, e = 120) {
734
742
  const n = t.toLowerCase().trim().split(/\s+/).filter(Boolean);
735
743
  if (!n.length) return [];
736
744
  const s = xn().flatMap((o) => o.emoji).filter((o) => {
@@ -743,7 +751,7 @@ function $i(t, e = 120) {
743
751
  };
744
752
  return s.sort((o, f) => a(o) - a(f)), s.slice(0, e);
745
753
  }
746
- const Pi = [
754
+ const Oi = [
747
755
  [128077],
748
756
  [10084, 65039],
749
757
  [128514],
@@ -761,20 +769,20 @@ function En() {
761
769
  return [];
762
770
  }
763
771
  }
764
- function Di(t) {
772
+ function ji(t) {
765
773
  const e = [t, ...En().filter((n) => n !== t)].slice(0, Qr);
766
774
  ts(wr.RECENT_EMOJI, JSON.stringify(e));
767
775
  }
768
- function Bi(t = 3) {
776
+ function Hi(t = 3) {
769
777
  const e = [];
770
- for (const n of [...En(), ...Pi])
778
+ for (const n of [...En(), ...Oi])
771
779
  if (e.includes(n) || e.push(n), e.length === t) break;
772
780
  return e;
773
781
  }
774
782
  function Yr(t, e) {
775
783
  return t.by.some((n) => n === e.author || !!e.clientId && n === e.clientId);
776
784
  }
777
- function Oi(t, e, n) {
785
+ function Ui(t, e, n) {
778
786
  const r = /* @__PURE__ */ new Map();
779
787
  for (const o of Object.values(e))
780
788
  o.author && r.set(o.author, o.name), r.set(o.clientId, o.name);
@@ -790,16 +798,16 @@ function Oi(t, e, n) {
790
798
  }
791
799
  return i && s.unshift("You"), a && s.push(a === 1 ? "1 other" : `${a} others`), s;
792
800
  }
793
- function ji(t, e) {
801
+ function Wi(t, e) {
794
802
  return `${t.length <= 1 ? t[0] ?? "Someone" : `${t.slice(0, -1).join(", ")} and ${t[t.length - 1]}`} reacted with ${e ? `:${e.replace(/\s+/g, "_")}:` : "this"}`;
795
803
  }
796
804
  const Ie = 8;
797
- function Hi(t) {
805
+ function zi(t) {
798
806
  return document.addEventListener("fullscreenchange", t), () => document.removeEventListener("fullscreenchange", t);
799
807
  }
800
808
  function Xr() {
801
809
  const t = Vr();
802
- return Wa(Hi, () => document.fullscreenElement, () => null) ?? t ?? document.body;
810
+ return Wa(zi, () => document.fullscreenElement, () => null) ?? t ?? document.body;
803
811
  }
804
812
  function Zr({
805
813
  anchor: t,
@@ -864,7 +872,7 @@ function Zr({
864
872
  u
865
873
  );
866
874
  }
867
- function Ui({ anchor: t, width: e, children: n }) {
875
+ function Gi({ anchor: t, width: e, children: n }) {
868
876
  const r = Xr(), [s, i] = $(null);
869
877
  return dn(() => {
870
878
  if (!t) return;
@@ -880,12 +888,12 @@ function Ui({ anchor: t, width: e, children: n }) {
880
888
  r
881
889
  ) : null;
882
890
  }
883
- const Wi = 340;
884
- function zi({ anchor: t, onPick: e, onClose: n }) {
891
+ const Ki = 340;
892
+ function qi({ anchor: t, onPick: e, onClose: n }) {
885
893
  const [r, s] = $(""), [i, a] = $(null), o = P(null), f = P(null), c = ye(() => xn(), []), d = ye(
886
894
  () => En().map((m) => jt(m) ?? { char: m, name: "" }).slice(0, 16),
887
895
  []
888
- ), u = ye(() => $i(r), [r]), g = r.trim().length > 0;
896
+ ), u = ye(() => Bi(r), [r]), g = r.trim().length > 0;
889
897
  F(() => {
890
898
  o.current?.focus({ preventScroll: !0 });
891
899
  }, []);
@@ -908,7 +916,7 @@ function zi({ anchor: t, onPick: e, onClose: n }) {
908
916
  },
909
917
  p
910
918
  );
911
- return /* @__PURE__ */ E(Zr, { anchor: t, onClose: n, width: Wi, className: "emoji-picker", ariaLabel: "Emoji picker", testId: "emoji-picker", children: [
919
+ return /* @__PURE__ */ E(Zr, { anchor: t, onClose: n, width: Ki, className: "emoji-picker", ariaLabel: "Emoji picker", testId: "emoji-picker", children: [
912
920
  /* @__PURE__ */ l("div", { className: "emoji-picker-search", children: /* @__PURE__ */ l(
913
921
  "input",
914
922
  {
@@ -949,43 +957,43 @@ function zi({ anchor: t, onPick: e, onClose: n }) {
949
957
  ] }) : null })
950
958
  ] });
951
959
  }
952
- function nc({ className: t = "w-5 h-5" }) {
960
+ function sc({ className: t = "w-5 h-5" }) {
953
961
  return /* @__PURE__ */ l("svg", { className: t, fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" }) });
954
962
  }
955
- function Gi({ className: t = "w-5 h-5" }) {
963
+ function Vi({ className: t = "w-5 h-5" }) {
956
964
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "M8 5v14l11-7z" }) });
957
965
  }
958
- function Ki({ className: t = "w-5 h-5" }) {
966
+ function Ji({ className: t = "w-5 h-5" }) {
959
967
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "M6 19h4V5H6v14zm8-14v14h4V5h-4z" }) });
960
968
  }
961
- function qi({ className: t = "w-5 h-5" }) {
969
+ function Qi({ className: t = "w-5 h-5" }) {
962
970
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
963
971
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" }),
964
972
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" })
965
973
  ] });
966
974
  }
967
- function Vi({ className: t = "w-5 h-5" }) {
975
+ function Yi({ className: t = "w-5 h-5" }) {
968
976
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
969
977
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" }),
970
978
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.536 8.464a5 5 0 010 7.072" })
971
979
  ] });
972
980
  }
973
- function Ji({ className: t = "w-5 h-5" }) {
981
+ function Xi({ className: t = "w-5 h-5" }) {
974
982
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
975
983
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" }),
976
984
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.536 8.464a5 5 0 010 7.072M18.364 5.636a9 9 0 010 12.728" })
977
985
  ] });
978
986
  }
979
- function Qi({ className: t = "w-5 h-5" }) {
987
+ function Zi({ className: t = "w-5 h-5" }) {
980
988
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4" }) });
981
989
  }
982
- function Yi({ className: t = "w-5 h-5" }) {
990
+ function eo({ className: t = "w-5 h-5" }) {
983
991
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 9V4H4m0 0l5 5M9 15v5H4m0 0l5-5M15 9V4h5m0 0l-5 5M15 15v5h5m0 0l-5-5" }) });
984
992
  }
985
993
  function ea({ className: t = "w-5 h-5" }) {
986
994
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) });
987
995
  }
988
- function Xi({ className: t = "w-5 h-5" }) {
996
+ function to({ className: t = "w-5 h-5" }) {
989
997
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
990
998
  }
991
999
  function ta({ className: t = "w-4 h-4" }) {
@@ -994,7 +1002,7 @@ function ta({ className: t = "w-4 h-4" }) {
994
1002
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12l-5 4v-8l5 4z" })
995
1003
  ] });
996
1004
  }
997
- function Zi({ className: t = "w-4 h-4" }) {
1005
+ function no({ className: t = "w-4 h-4" }) {
998
1006
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
999
1007
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 4v16" }),
1000
1008
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12l5 4v-8l-5 4z" })
@@ -1003,13 +1011,13 @@ function Zi({ className: t = "w-4 h-4" }) {
1003
1011
  function na({ className: t = "w-5 h-5" }) {
1004
1012
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l12 12M18 6L6 18" }) });
1005
1013
  }
1006
- function eo({ className: t = "w-5 h-5" }) {
1014
+ function ro({ className: t = "w-5 h-5" }) {
1007
1015
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: [
1008
1016
  /* @__PURE__ */ l("path", { d: "M12 5l8 11H4z" }),
1009
1017
  /* @__PURE__ */ l("rect", { x: "4", y: "17", width: "16", height: "3", rx: "0.5" })
1010
1018
  ] });
1011
1019
  }
1012
- function to({ className: t = "w-5 h-5" }) {
1020
+ function ao({ className: t = "w-5 h-5" }) {
1013
1021
  return /* @__PURE__ */ l("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 4h16a1 1 0 011 1v14a1 1 0 01-1 1H4a1 1 0 01-1-1V5a1 1 0 011-1z" }) });
1014
1022
  }
1015
1023
  function ra({ className: t = "w-4 h-4" }) {
@@ -1020,7 +1028,7 @@ function ra({ className: t = "w-4 h-4" }) {
1020
1028
  /* @__PURE__ */ l("path", { strokeLinecap: "round", d: "M19 2v6M16 5h6" })
1021
1029
  ] });
1022
1030
  }
1023
- function no({ className: t = "w-4 h-4" }) {
1031
+ function so({ className: t = "w-4 h-4" }) {
1024
1032
  return /* @__PURE__ */ E("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
1025
1033
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 7L4 12l6 5" }),
1026
1034
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 12h9a7 7 0 017 7" })
@@ -1029,12 +1037,12 @@ function no({ className: t = "w-4 h-4" }) {
1029
1037
  function Qt(t) {
1030
1038
  return new Date(t).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
1031
1039
  }
1032
- const ro = Ze.memo(function({ message: e }) {
1033
- const n = x((p) => p.me.clientId), r = x((p) => p.me.clientId ? p.roster[p.me.clientId]?.author : void 0), s = Ri(e, { clientId: n, author: r }), i = Wt(
1040
+ const io = Ze.memo(function({ message: e }) {
1041
+ const n = x((p) => p.me.clientId), r = x((p) => p.me.clientId ? p.roster[p.me.clientId]?.author : void 0), s = $i(e, { clientId: n, author: r }), i = Wt(
1034
1042
  { clientId: e.clientId, author: e.author },
1035
1043
  { name: e.name, sprite: e.sprite }
1036
1044
  ), a = Ue(i.sprite, i.pictureUrl), o = e.isSystem ? void 0 : i.cosmetics, f = P(null);
1037
- _i(f, !!o);
1045
+ Ii(f, !!o);
1038
1046
  const [c] = $(
1039
1047
  () => e.live && e.text ? vr(e.text, o) : null
1040
1048
  ), [d, u] = $(!1), [g, b] = $(null), y = x((p) => p.setReplyingTo);
@@ -1048,12 +1056,12 @@ const ro = Ze.memo(function({ message: e }) {
1048
1056
  ] }) });
1049
1057
  if (e.isSystem)
1050
1058
  return /* @__PURE__ */ E("div", { className: "px-2 py-0.5 text-[11px] text-text-muted italic text-center leading-tight", children: [
1051
- Ei(e.text, e.template, i),
1059
+ Ti(e.text, e.template, i),
1052
1060
  /* @__PURE__ */ l("span", { className: "ml-1 text-[10px] opacity-50", children: Qt(e.ts) })
1053
1061
  ] });
1054
1062
  const h = { clientId: n, author: r }, m = (p) => {
1055
1063
  const M = e.reactions?.find((T) => T.emoji === p), R = !(M && Yr(M, h));
1056
- R && Di(p), ns(e.id, p, R);
1064
+ R && ji(p), ns(e.id, p, R);
1057
1065
  };
1058
1066
  return /* @__PURE__ */ E(
1059
1067
  "div",
@@ -1070,7 +1078,7 @@ const ro = Ze.memo(function({ message: e }) {
1070
1078
  },
1071
1079
  "data-active": d || g ? "true" : void 0,
1072
1080
  children: [
1073
- e.replyTo && /* @__PURE__ */ l(ao, { replyTo: e.replyTo }),
1081
+ e.replyTo && /* @__PURE__ */ l(oo, { replyTo: e.replyTo }),
1074
1082
  /* @__PURE__ */ E("div", { className: "flex items-start gap-2", children: [
1075
1083
  /* @__PURE__ */ l(qr, { sprite: i.sprite, url: i.pictureUrl, alt: i.name, worn: o }),
1076
1084
  /* @__PURE__ */ E("div", { className: "flex-1 min-w-0 -mt-0.5", children: [
@@ -1078,11 +1086,11 @@ const ro = Ze.memo(function({ message: e }) {
1078
1086
  /* @__PURE__ */ l("span", { className: "text-[10px] text-text-muted opacity-60 ml-1.5", children: Qt(e.ts) }),
1079
1087
  e.text && (c ? /* @__PURE__ */ l(Tt, { as: "p", html: c, className: "text-[13px] text-text break-words leading-snug m-0" }) : /* @__PURE__ */ l("p", { className: "text-[13px] text-text break-words leading-snug m-0", children: e.text })),
1080
1088
  /* @__PURE__ */ l(Jr, { images: e.images }),
1081
- e.reactions && e.reactions.length > 0 && /* @__PURE__ */ l(so, { reactions: e.reactions, me: h, onToggle: m, onAdd: b })
1089
+ e.reactions && e.reactions.length > 0 && /* @__PURE__ */ l(fo, { reactions: e.reactions, me: h, onToggle: m, onAdd: b })
1082
1090
  ] })
1083
1091
  ] }),
1084
1092
  (d || g) && /* @__PURE__ */ E("div", { className: "chat-msg-actions", role: "toolbar", "aria-label": "Message actions", "data-testid": "chat-msg-actions", children: [
1085
- Bi().map((p) => /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn chat-action-emoji", onClick: () => m(p), "aria-label": `React with ${jt(p)?.name ?? p}`, title: jt(p)?.name, children: p }, p)),
1093
+ Hi().map((p) => /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn chat-action-emoji", onClick: () => m(p), "aria-label": `React with ${jt(p)?.name ?? p}`, title: jt(p)?.name, children: p }, p)),
1086
1094
  /* @__PURE__ */ l(
1087
1095
  "button",
1088
1096
  {
@@ -1095,16 +1103,16 @@ const ro = Ze.memo(function({ message: e }) {
1095
1103
  children: /* @__PURE__ */ l(ra, {})
1096
1104
  }
1097
1105
  ),
1098
- !s && /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn", onClick: () => y(e.id), "aria-label": "Reply", title: "Reply", children: /* @__PURE__ */ l(no, {}) })
1106
+ !s && /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn", onClick: () => y(e.id), "aria-label": "Reply", title: "Reply", children: /* @__PURE__ */ l(so, {}) })
1099
1107
  ] }),
1100
- g && /* @__PURE__ */ l(zi, { anchor: g, onPick: m, onClose: () => {
1108
+ g && /* @__PURE__ */ l(qi, { anchor: g, onPick: m, onClose: () => {
1101
1109
  b(null), u(!1);
1102
1110
  } })
1103
1111
  ]
1104
1112
  }
1105
1113
  );
1106
1114
  });
1107
- function ao({ replyTo: t }) {
1115
+ function oo({ replyTo: t }) {
1108
1116
  const e = x((a) => a.chat.find((o) => o.id === t)), n = x((a) => a.jumpToMessage), r = Wt(
1109
1117
  { clientId: e?.clientId ?? "", author: e?.author },
1110
1118
  { name: e?.name ?? "", sprite: e?.sprite ?? null }
@@ -1141,7 +1149,7 @@ function ao({ replyTo: t }) {
1141
1149
  }
1142
1150
  );
1143
1151
  }
1144
- function so({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1152
+ function fo({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1145
1153
  const s = x((i) => i.roster);
1146
1154
  return /* @__PURE__ */ E("div", { className: "chat-reactions", "data-testid": "chat-reactions", children: [
1147
1155
  t.map((i) => {
@@ -1154,7 +1162,7 @@ function so({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1154
1162
  "data-mine": a ? "true" : void 0,
1155
1163
  "aria-pressed": a,
1156
1164
  onClick: () => n(i.emoji),
1157
- title: ji(Oi(i, s, e), jt(i.emoji)?.name),
1165
+ title: Wi(Ui(i, s, e), jt(i.emoji)?.name),
1158
1166
  "data-emoji": i.emoji,
1159
1167
  children: [
1160
1168
  /* @__PURE__ */ l("span", { className: "chat-reaction-emoji", children: i.emoji }),
@@ -1167,7 +1175,7 @@ function so({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1167
1175
  /* @__PURE__ */ l("button", { type: "button", className: "chat-reaction chat-reaction-add", onClick: (i) => r(i.currentTarget), "aria-label": "Add reaction", title: "Add reaction", children: /* @__PURE__ */ l(ra, {}) })
1168
1176
  ] });
1169
1177
  }
1170
- function io() {
1178
+ function lo() {
1171
1179
  Gr();
1172
1180
  const t = x((i) => i.chat), e = P(null), n = P(!1), r = H(() => {
1173
1181
  const i = e.current;
@@ -1203,7 +1211,7 @@ function io() {
1203
1211
  /* @__PURE__ */ l("span", { className: "text-[10px] text-text-muted whitespace-nowrap", children: new Date(i.ts).toLocaleDateString([], { weekday: "short", month: "short", day: "numeric" }) }),
1204
1212
  /* @__PURE__ */ l("div", { className: "flex-1 h-px bg-border" })
1205
1213
  ] }),
1206
- /* @__PURE__ */ l(ro, { message: i })
1214
+ /* @__PURE__ */ l(io, { message: i })
1207
1215
  ] }, i.id);
1208
1216
  }) })
1209
1217
  }
@@ -1230,12 +1238,12 @@ const Mn = [
1230
1238
  scope: "local"
1231
1239
  }
1232
1240
  ], ht = "/";
1233
- function oo(t) {
1241
+ function co(t) {
1234
1242
  if (!t.startsWith(ht)) return null;
1235
1243
  const e = t.slice(ht.length);
1236
1244
  return /\s/.test(e) ? null : e.toLowerCase();
1237
1245
  }
1238
- function fo(t, e = Mn) {
1246
+ function uo(t, e = Mn) {
1239
1247
  const n = t.toLowerCase();
1240
1248
  if (!n) return [...e].sort((s, i) => s.name.localeCompare(i.name));
1241
1249
  const r = [];
@@ -1245,23 +1253,23 @@ function fo(t, e = Mn) {
1245
1253
  }
1246
1254
  return r.sort((s, i) => s.rank - i.rank || s.cmd.name.localeCompare(i.cmd.name)).map((s) => s.cmd);
1247
1255
  }
1248
- function lo(t) {
1256
+ function ho(t) {
1249
1257
  return `${ht}${t.name} `;
1250
1258
  }
1251
1259
  function Yt(t, e) {
1252
1260
  return e <= 0 ? 0 : (t % e + e) % e;
1253
1261
  }
1254
- function co(t, e = Mn) {
1262
+ function mo(t, e = Mn) {
1255
1263
  const n = t.trim();
1256
1264
  if (!n) return null;
1257
1265
  if (!n.startsWith(ht)) return { kind: "chat", text: n };
1258
1266
  const r = n.slice(ht.length), s = r.search(/\s/), i = (s === -1 ? r : r.slice(0, s)).toLowerCase(), a = s === -1 ? "" : r.slice(s).trim(), o = e.find((f) => f.name.toLowerCase() === i);
1259
1267
  return o ? { kind: "command", command: o, args: a } : { kind: "chat", text: n };
1260
1268
  }
1261
- function uo(t, e) {
1269
+ function go(t, e) {
1262
1270
  return t.requiresMedia && !e.hasMedia ? `${ht}${t.name} needs an episode loaded.` : null;
1263
1271
  }
1264
- function ho({
1272
+ function po({
1265
1273
  commands: t,
1266
1274
  activeIndex: e,
1267
1275
  hasMedia: n,
@@ -1337,17 +1345,17 @@ function sa() {
1337
1345
  i.current.clear();
1338
1346
  }, []);
1339
1347
  const a = H((h) => {
1340
- Ys(h) && (URL.revokeObjectURL(h.previewUrl), i.current.delete(h.previewUrl));
1348
+ ei(h) && (URL.revokeObjectURL(h.previewUrl), i.current.delete(h.previewUrl));
1341
1349
  }, []), o = H(async (h) => {
1342
1350
  if (!h.length) return;
1343
1351
  const m = [];
1344
1352
  for (const p of h) {
1345
- const M = Zs(p);
1353
+ const M = ni(p);
1346
1354
  if (M) {
1347
1355
  s("error", M);
1348
1356
  continue;
1349
1357
  }
1350
- const { w: R, h: T } = await ni(p), w = URL.createObjectURL(p);
1358
+ const { w: R, h: T } = await si(p), w = URL.createObjectURL(p);
1351
1359
  i.current.add(w), m.push({
1352
1360
  kind: "file",
1353
1361
  id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
@@ -1394,10 +1402,10 @@ function sa() {
1394
1402
  return [];
1395
1403
  });
1396
1404
  }, [a]), u = H((h) => {
1397
- const m = ei(h.clipboardData);
1405
+ const m = ri(h.clipboardData);
1398
1406
  m.length && (h.preventDefault(), o(m));
1399
1407
  }, [o]), g = H((h) => {
1400
- const m = ti(h.dataTransfer);
1408
+ const m = ai(h.dataTransfer);
1401
1409
  m.length && (h.preventDefault(), o(m));
1402
1410
  }, [o]), b = H((h) => {
1403
1411
  h.dataTransfer?.types?.includes("Files") && h.preventDefault();
@@ -1405,9 +1413,9 @@ function sa() {
1405
1413
  if (!t.length) return [];
1406
1414
  r(!0);
1407
1415
  try {
1408
- return await ai(t);
1416
+ return await oi(t);
1409
1417
  } catch (h) {
1410
- return N("chat", "Image upload failed", si(h)), s("error", Xs(h)), null;
1418
+ return N("chat", "Image upload failed", fi(h)), s("error", ti(h)), null;
1411
1419
  } finally {
1412
1420
  r(!1);
1413
1421
  }
@@ -1425,8 +1433,8 @@ function sa() {
1425
1433
  onDragOver: b
1426
1434
  };
1427
1435
  }
1428
- const mo = 2500, go = 5e3;
1429
- class po {
1436
+ const bo = 2500, yo = 5e3;
1437
+ class wo {
1430
1438
  constructor(e, n = Date.now) {
1431
1439
  this.send = e, this.now = n;
1432
1440
  }
@@ -1441,20 +1449,20 @@ class po {
1441
1449
  return;
1442
1450
  }
1443
1451
  const n = this.now();
1444
- (!this.typing || n - this.lastSent >= mo) && (this.typing = !0, this.lastSent = n, this.send(!0)), this.idle && clearTimeout(this.idle), this.idle = setTimeout(() => this.stop(), go);
1452
+ (!this.typing || n - this.lastSent >= bo) && (this.typing = !0, this.lastSent = n, this.send(!0)), this.idle && clearTimeout(this.idle), this.idle = setTimeout(() => this.stop(), yo);
1445
1453
  }
1446
1454
  stop() {
1447
1455
  this.idle && (clearTimeout(this.idle), this.idle = null), this.typing && (this.typing = !1, this.send(!1));
1448
1456
  }
1449
1457
  }
1450
1458
  function ia() {
1451
- const [t] = $(() => new po(rs));
1459
+ const [t] = $(() => new wo(rs));
1452
1460
  return F(() => () => t.stop(), [t]), t;
1453
1461
  }
1454
- function bo(t) {
1462
+ function vo(t) {
1455
1463
  return t.length === 0 ? null : t.length === 1 ? `${t[0]} is typing…` : t.length === 2 ? `${t[0]} and ${t[1]} are typing…` : t.length === 3 ? `${t[0]}, ${t[1]} and ${t[2]} are typing…` : "Several people are typing…";
1456
1464
  }
1457
- function yo({ replyTo: t, onCancel: e }) {
1465
+ function ko({ replyTo: t, onCancel: e }) {
1458
1466
  const n = x((i) => i.chat.find((a) => a.id === t)), r = Wt(
1459
1467
  { clientId: n?.clientId ?? "", author: n?.author },
1460
1468
  { name: n?.name ?? "a message", sprite: n?.sprite ?? null }
@@ -1467,7 +1475,7 @@ function yo({ replyTo: t, onCancel: e }) {
1467
1475
  /* @__PURE__ */ l("button", { type: "button", className: "chat-reply-cancel", onClick: e, "aria-label": "Cancel reply", title: "Cancel reply", children: /* @__PURE__ */ l(na, { className: "w-3.5 h-3.5" }) })
1468
1476
  ] });
1469
1477
  }
1470
- function wo() {
1478
+ function So() {
1471
1479
  const t = x((a) => a.typing), e = x((a) => a.roster), n = x((a) => a.me.clientId), r = x((a) => a.setTyping);
1472
1480
  F(() => {
1473
1481
  const a = Object.keys(t);
@@ -1478,7 +1486,7 @@ function wo() {
1478
1486
  }, Math.max(0, o - Date.now()) + 50);
1479
1487
  return () => clearTimeout(f);
1480
1488
  }, [t, r]);
1481
- const s = Object.keys(t).filter((a) => a !== n && e[a]).map((a) => e[a].name || "Someone").sort((a, o) => a.localeCompare(o)), i = bo(s);
1489
+ const s = Object.keys(t).filter((a) => a !== n && e[a]).map((a) => e[a].name || "Someone").sort((a, o) => a.localeCompare(o)), i = vo(s);
1482
1490
  return /* @__PURE__ */ l("div", { className: "chat-typing", "aria-live": "polite", "data-testid": "chat-typing", children: i && /* @__PURE__ */ E(he, { children: [
1483
1491
  /* @__PURE__ */ E("span", { className: "chat-typing-dots", "aria-hidden": "true", children: [
1484
1492
  /* @__PURE__ */ l("i", {}),
@@ -1488,20 +1496,20 @@ function wo() {
1488
1496
  /* @__PURE__ */ l("span", { className: "truncate", children: i })
1489
1497
  ] }) });
1490
1498
  }
1491
- const Wn = Er, vo = xr;
1492
- function ko({ commands: t = Mn }) {
1499
+ const Wn = Er, xo = xr;
1500
+ function Eo({ commands: t = Mn }) {
1493
1501
  const [e, n] = $(""), [r, s] = $(!1), [i, a] = $({ q: null, i: 0 }), [o, f] = $(!1), c = P(null), d = br(), [u, g] = $(!1), [b, y] = $(!1), h = sa(), m = ia(), p = x((I) => I.replyingTo), M = x((I) => I.setReplyingTo);
1494
1502
  F(() => {
1495
1503
  p && !document.hidden && c.current?.focus({ preventScroll: !0 });
1496
1504
  }, [p]);
1497
- const R = x((I) => I.snapshot.mediaId), T = x((I) => I.pushToast), w = x((I) => I.setTierlistOpen), S = !!R, L = oo(e), k = ye(
1498
- () => L === null ? [] : fo(L, t),
1505
+ const R = x((I) => I.snapshot.mediaId), T = x((I) => I.pushToast), w = x((I) => I.setTierlistOpen), S = !!R, L = co(e), k = ye(
1506
+ () => L === null ? [] : uo(L, t),
1499
1507
  [L, t]
1500
1508
  ), v = L !== null && !o && k.length > 0, C = i.q === L ? Yt(i.i, k.length) : 0, D = H(
1501
1509
  (I) => a({ q: L, i: I }),
1502
1510
  [L]
1503
1511
  ), B = H((I, K) => {
1504
- const Q = uo(I, { hasMedia: S });
1512
+ const Q = go(I, { hasMedia: S });
1505
1513
  if (Q) {
1506
1514
  T("info", Q);
1507
1515
  return;
@@ -1520,10 +1528,10 @@ function ko({ commands: t = Mn }) {
1520
1528
  T("info", `${I.usage} is not implemented yet.`);
1521
1529
  }
1522
1530
  }, [S, T, t, w]), O = H((I) => {
1523
- n(lo(I)), f(!1), c.current?.focus();
1531
+ n(ho(I)), f(!1), c.current?.focus();
1524
1532
  }, []), U = H(async (I) => {
1525
1533
  if (I.preventDefault(), r || h.uploading) return;
1526
- const K = co(e, t);
1534
+ const K = mo(e, t);
1527
1535
  if (!K && !h.pending.length) return;
1528
1536
  if (K?.kind === "command" && h.pending.length) {
1529
1537
  T("info", "Send images on their own, not with a command.");
@@ -1534,7 +1542,7 @@ function ko({ commands: t = Mn }) {
1534
1542
  return;
1535
1543
  }
1536
1544
  const Q = await h.uploadPending();
1537
- Q !== null && (Sr(K?.text ?? "", Q, p), n(""), m.stop(), M(null), h.clear(), s(!0), setTimeout(() => s(!1), vo), !document.hidden && document.hasFocus() && c.current?.focus());
1545
+ Q !== null && (Sr(K?.text ?? "", Q, p), n(""), m.stop(), M(null), h.clear(), s(!0), setTimeout(() => s(!1), xo), !document.hidden && document.hasFocus() && c.current?.focus());
1538
1546
  }, [e, r, B, h, T, t, p, M, m]), V = H((I) => {
1539
1547
  if (I.key === "Escape" && v) {
1540
1548
  I.preventDefault(), f(!0);
@@ -1578,11 +1586,11 @@ function ko({ commands: t = Mn }) {
1578
1586
  onDragOver: h.onDragOver,
1579
1587
  className: "p-2 border-t border-border",
1580
1588
  children: [
1581
- p && /* @__PURE__ */ l(yo, { replyTo: p, onCancel: () => M(null) }),
1589
+ p && /* @__PURE__ */ l(ko, { replyTo: p, onCancel: () => M(null) }),
1582
1590
  /* @__PURE__ */ l(aa, { pending: h.pending, uploading: h.uploading, onRemove: h.remove }),
1583
1591
  /* @__PURE__ */ E("div", { className: "relative", children: [
1584
1592
  v && /* @__PURE__ */ l(
1585
- ho,
1593
+ po,
1586
1594
  {
1587
1595
  commands: k,
1588
1596
  activeIndex: C,
@@ -1642,16 +1650,16 @@ function ko({ commands: t = Mn }) {
1642
1650
  )
1643
1651
  ] })
1644
1652
  ] }),
1645
- /* @__PURE__ */ l(wo, {})
1653
+ /* @__PURE__ */ l(So, {})
1646
1654
  ]
1647
1655
  }
1648
1656
  );
1649
1657
  }
1650
- function So() {
1658
+ function Mo() {
1651
1659
  const t = x((n) => n.roster), e = Object.values(t);
1652
- return e.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: e.map((n) => /* @__PURE__ */ l(xo, { u: n }, n.clientId)) }) : /* @__PURE__ */ l("div", { className: "text-xs text-text-muted", children: "No users online" });
1660
+ return e.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: e.map((n) => /* @__PURE__ */ l(_o, { u: n }, n.clientId)) }) : /* @__PURE__ */ l("div", { className: "text-xs text-text-muted", children: "No users online" });
1653
1661
  }
1654
- function xo({ u: t }) {
1662
+ function _o({ u: t }) {
1655
1663
  const e = Ue(t.sprite, t.avatarUrl);
1656
1664
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2 py-0.5", children: [
1657
1665
  /* @__PURE__ */ l(
@@ -1668,7 +1676,7 @@ function xo({ u: t }) {
1668
1676
  t.isLeader && /* @__PURE__ */ l("span", { className: "ml-auto px-1.5 py-0.5 rounded text-[9px] font-medium bg-success/20 text-success", children: "Leader" })
1669
1677
  ] });
1670
1678
  }
1671
- function Eo() {
1679
+ function To() {
1672
1680
  const t = x((i) => Object.keys(i.roster).length), [e, n] = $(!1), r = P(null), s = P(null);
1673
1681
  return F(() => {
1674
1682
  if (!e) return;
@@ -1704,20 +1712,20 @@ function Eo() {
1704
1712
  t,
1705
1713
  " online"
1706
1714
  ] }),
1707
- /* @__PURE__ */ l(So, {})
1715
+ /* @__PURE__ */ l(Mo, {})
1708
1716
  ] })
1709
1717
  ] });
1710
1718
  }
1711
- function Mo({ leaderId: t, clientId: e, keyType: n }) {
1719
+ function Ao({ leaderId: t, clientId: e, keyType: n }) {
1712
1720
  return t !== null ? t === e : n === "leader";
1713
1721
  }
1714
- const _o = /-[0-9a-fA-F]{16}$/;
1715
- function To(t) {
1716
- return t && _o.test(t) ? "leader" : null;
1722
+ const Io = /-[0-9a-fA-F]{16}$/;
1723
+ function Co(t) {
1724
+ return t && Io.test(t) ? "leader" : null;
1717
1725
  }
1718
- const Ao = /\/room\/([^/]+)\/?$/;
1719
- function Io(t) {
1720
- const e = t ? Ao.exec(t) : null;
1726
+ const No = /\/room\/([^/]+)\/?$/;
1727
+ function Ro(t) {
1728
+ const e = t ? No.exec(t) : null;
1721
1729
  if (!e) return null;
1722
1730
  try {
1723
1731
  return decodeURIComponent(e[1]);
@@ -1725,8 +1733,8 @@ function Io(t) {
1725
1733
  return e[1];
1726
1734
  }
1727
1735
  }
1728
- function Co(t, e) {
1729
- return t && e?.roomKey === t ? e.type : To(t);
1736
+ function Lo(t, e) {
1737
+ return t && e?.roomKey === t ? e.type : Co(t);
1730
1738
  }
1731
1739
  function et() {
1732
1740
  return x((t) => !!t.snapshot.leaderId && t.snapshot.leaderId === t.me.clientId);
@@ -1736,28 +1744,28 @@ function zt() {
1736
1744
  return t ? e.find((n) => n.id === t) ?? null : null;
1737
1745
  }
1738
1746
  function _n() {
1739
- return x((t) => Mo({
1747
+ return x((t) => Ao({
1740
1748
  leaderId: t.snapshot.leaderId,
1741
1749
  clientId: t.me.clientId,
1742
- keyType: Co(Io(globalThis.location?.pathname), t.roomKeyType)
1750
+ keyType: Lo(Ro(globalThis.location?.pathname), t.roomKeyType)
1743
1751
  }));
1744
1752
  }
1745
1753
  function oa() {
1746
1754
  return x((t) => t.readiness);
1747
1755
  }
1748
- function No() {
1756
+ function Fo() {
1749
1757
  return x((t) => t.snapshot);
1750
1758
  }
1751
- const Ro = 3e4;
1759
+ const $o = 3e4;
1752
1760
  function fa() {
1753
1761
  const t = oa(), [e, n] = $(!1), [r, s] = $({ mediaId: t.mediaId, ready: t.ready });
1754
1762
  return (r.mediaId !== t.mediaId || r.ready !== t.ready) && (s({ mediaId: t.mediaId, ready: t.ready }), n(!1)), F(() => {
1755
1763
  if (t.ready) return;
1756
- const i = setTimeout(() => n(!0), Ro);
1764
+ const i = setTimeout(() => n(!0), $o);
1757
1765
  return () => clearTimeout(i);
1758
1766
  }, [t.mediaId, t.ready]), e;
1759
1767
  }
1760
- function Lo({ draw: t }) {
1768
+ function Po({ draw: t }) {
1761
1769
  const e = P(null);
1762
1770
  return F(() => {
1763
1771
  const n = e.current;
@@ -1765,8 +1773,8 @@ function Lo({ draw: t }) {
1765
1773
  return t(n) ?? void 0;
1766
1774
  }, [t]), /* @__PURE__ */ l("div", { ref: e, "data-testid": "game-settings" });
1767
1775
  }
1768
- const Fo = vn(() => import("./AdminPanel-BG3WWWkO.js")), $o = vn(() => import("./PlaylistPanel-C5OQMAqg.js"));
1769
- function Po() {
1776
+ const Do = vn(() => import("./AdminPanel-DcGc-1vo.js")), Bo = vn(() => import("./PlaylistPanel-CTgSeMHH.js"));
1777
+ function Oo() {
1770
1778
  const t = x((g) => g.chatCollapsed), e = It(), n = x((g) => g.sidebarTab), r = x((g) => g.setSidebarTab), s = x((g) => g.healthSnapshot?.clients.length ?? 0), i = x((g) => !!g.playlist), a = et(), o = _n(), f = x((g) => g.gameSettings), c = x((g) => g.snapshot.mediaId), d = zt() !== null;
1771
1779
  if (Ut({ hasMedia: !!c, chatCollapsed: t, isFullscreen: e }))
1772
1780
  return null;
@@ -1797,8 +1805,8 @@ function Po() {
1797
1805
  }
1798
1806
  ),
1799
1807
  /* @__PURE__ */ l(Vs, {}),
1800
- /* @__PURE__ */ l(Js, { children: f ? /* @__PURE__ */ l(Lo, { draw: f }) : null }),
1801
- /* @__PURE__ */ l(Eo, {})
1808
+ /* @__PURE__ */ l(Js, { children: f ? /* @__PURE__ */ l(Po, { draw: f }) : null }),
1809
+ /* @__PURE__ */ l(To, {})
1802
1810
  ] }),
1803
1811
  (a || i) && /* @__PURE__ */ E("div", { role: "tablist", "aria-label": "Sidebar", className: "flex border-b border-border shrink-0", children: [
1804
1812
  /* @__PURE__ */ l(
@@ -1835,18 +1843,18 @@ function Po() {
1835
1843
  }
1836
1844
  )
1837
1845
  ] }),
1838
- u === "health" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Fo, {}) }) : u === "playlist" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l($o, {}) }) : /* @__PURE__ */ E(he, { children: [
1839
- /* @__PURE__ */ l(io, {}),
1840
- /* @__PURE__ */ l(ko, {})
1846
+ u === "health" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Do, {}) }) : u === "playlist" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Bo, {}) }) : /* @__PURE__ */ E(he, { children: [
1847
+ /* @__PURE__ */ l(lo, {}),
1848
+ /* @__PURE__ */ l(Eo, {})
1841
1849
  ] })
1842
1850
  ] });
1843
1851
  }
1844
1852
  const zn = (t) => typeof t == "string" && Ks.includes(t);
1845
- function Do(t, e, n) {
1853
+ function jo(t, e, n) {
1846
1854
  return zn(e) ? e : zn(n) ? n : "dark";
1847
1855
  }
1848
1856
  function Gn({ activity: t, roomKey: e, layer: n }) {
1849
- const r = P(null), s = P(null), [i, a] = $(null), [o, f] = $(!1), c = x((T) => T.snapshot.leaderId), d = x((T) => T.me.clientId), u = !!c && c === d, g = x((T) => T.name), b = qs()?.theme, y = Do(void 0, b, ls().theme), h = ye(() => ({
1857
+ const r = P(null), s = P(null), [i, a] = $(null), [o, f] = $(!1), c = x((T) => T.snapshot.leaderId), d = x((T) => T.me.clientId), u = !!c && c === d, g = x((T) => T.name), b = qs()?.theme, y = jo(void 0, b, ls().theme), h = ye(() => ({
1850
1858
  roomKey: e,
1851
1859
  identity: {
1852
1860
  // The registry userId — what RoomChrome's `userId` prop is.
@@ -1868,7 +1876,7 @@ function Gn({ activity: t, roomKey: e, layer: n }) {
1868
1876
  const T = r.current, w = t.load;
1869
1877
  if (!T || !w || o) return;
1870
1878
  _("game", "bundle mount", { gameId: t.id });
1871
- const { setGameSettings: S } = x.getState(), L = (v) => k.mountSettings(v), k = ki({
1879
+ const { setGameSettings: S } = x.getState(), L = (v) => k.mountSettings(v), k = Ei({
1872
1880
  load: w,
1873
1881
  el: T,
1874
1882
  ctx: m(),
@@ -1906,8 +1914,8 @@ function Gn({ activity: t, roomKey: e, layer: n }) {
1906
1914
  }
1907
1915
  );
1908
1916
  }
1909
- const rc = "drawer-btn", Bo = "drawer-icon-btn";
1910
- function Oo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children: i }) {
1917
+ const ic = "drawer-btn", Ho = "drawer-icon-btn";
1918
+ function Uo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children: i }) {
1911
1919
  const a = P(null);
1912
1920
  return F(() => {
1913
1921
  if (!t) return;
@@ -1930,7 +1938,7 @@ function Oo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children:
1930
1938
  onClick: (o) => o.stopPropagation(),
1931
1939
  children: [
1932
1940
  /* @__PURE__ */ E("div", { className: "px-3 py-2 border-b border-border flex items-center gap-2 text-sm min-w-0", children: [
1933
- /* @__PURE__ */ l("button", { ref: a, onClick: e, className: Bo, "aria-label": n ? "Back" : "Close", title: n ? "Back" : "Close", children: n ? /* @__PURE__ */ l(ea, { className: "w-4 h-4" }) : /* @__PURE__ */ l(ta, { className: "w-4 h-4" }) }),
1941
+ /* @__PURE__ */ l("button", { ref: a, onClick: e, className: Ho, "aria-label": n ? "Back" : "Close", title: n ? "Back" : "Close", children: n ? /* @__PURE__ */ l(ea, { className: "w-4 h-4" }) : /* @__PURE__ */ l(ta, { className: "w-4 h-4" }) }),
1934
1942
  r
1935
1943
  ] }),
1936
1944
  i,
@@ -1939,10 +1947,10 @@ function Oo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children:
1939
1947
  }
1940
1948
  ) }) : null;
1941
1949
  }
1942
- function jo({ open: t, onClose: e }) {
1943
- return /* @__PURE__ */ l(Oo, { open: t, onClose: e, children: /* @__PURE__ */ l("div", { className: "px-4 py-3 text-xs text-text-muted", children: "Loading…" }) });
1950
+ function Wo({ open: t, onClose: e }) {
1951
+ return /* @__PURE__ */ l(Uo, { open: t, onClose: e, children: /* @__PURE__ */ l("div", { className: "px-4 py-3 text-xs text-text-muted", children: "Loading…" }) });
1944
1952
  }
1945
- const la = 9e3, Kn = 1500, Ho = {
1953
+ const la = 9e3, Kn = 1500, zo = {
1946
1954
  classic: "[text-shadow:_-1px_-1px_0_#000,_1px_-1px_0_#000,_-1px_1px_0_#000,_1px_1px_0_#000,_0_-1px_0_#000,_0_1px_0_#000,_-1px_0_0_#000,_1px_0_0_#000]",
1947
1955
  cinema: "drop-shadow-[0_2px_4px_rgba(0,0,0,0.9)]",
1948
1956
  minimal: "drop-shadow-[0_2px_4px_rgba(0,0,0,0.9)] drop-shadow-[0_0_8px_rgba(0,0,0,0.7)]",
@@ -1951,11 +1959,11 @@ const la = 9e3, Kn = 1500, Ho = {
1951
1959
  textShadow: "none",
1952
1960
  filter: "drop-shadow(0 0 1px black) drop-shadow(0 0 1px black)"
1953
1961
  };
1954
- function Uo({ message: t, age: e, ccStyle: n }) {
1962
+ function Go({ message: t, age: e, ccStyle: n }) {
1955
1963
  const r = la - Kn;
1956
1964
  let s = 1;
1957
1965
  e > r && (s = Math.max(0, 1 - (e - r) / Kn));
1958
- const i = Ho[n], a = Wt(
1966
+ const i = zo[n], a = Wt(
1959
1967
  { clientId: t.clientId, author: t.author },
1960
1968
  { name: t.name, sprite: t.sprite }
1961
1969
  ), o = Ue(a.sprite, a.pictureUrl), f = a.cosmetics, [c] = $(
@@ -1977,7 +1985,7 @@ function Uo({ message: t, age: e, ccStyle: n }) {
1977
1985
  }
1978
1986
  );
1979
1987
  }
1980
- function Wo({ shown: t, className: e }) {
1988
+ function Ko({ shown: t, className: e }) {
1981
1989
  Gr();
1982
1990
  const n = x((f) => f.chat), r = x((f) => f.mediaPrefs.subtitleStyle), [s, i] = $(() => Date.now()), a = n.length > 0;
1983
1991
  F(() => {
@@ -1996,7 +2004,7 @@ function Wo({ shown: t, className: e }) {
1996
2004
  className: `wp-floating-chat pointer-events-none flex flex-col ${e}`,
1997
2005
  "data-testid": "floating-chat",
1998
2006
  children: o.map((f) => /* @__PURE__ */ l(
1999
- Uo,
2007
+ Go,
2000
2008
  {
2001
2009
  message: f,
2002
2010
  age: s - f.ts,
@@ -2007,18 +2015,18 @@ function Wo({ shown: t, className: e }) {
2007
2015
  }
2008
2016
  );
2009
2017
  }
2010
- const zo = 2;
2018
+ const qo = 2;
2011
2019
  function ca(t) {
2012
2020
  return t.duration_ms > 0 && t.duration_ms - t.playhead_ms <= kn;
2013
2021
  }
2014
2022
  function da(t) {
2015
2023
  const e = t.video_ready_state ?? -1;
2016
- return e < 0 ? !0 : !(e <= zo && t.buffered_ahead_ms > kn);
2024
+ return e < 0 ? !0 : !(e <= qo && t.buffered_ahead_ms > kn);
2017
2025
  }
2018
- function ac(t) {
2026
+ function oc(t) {
2019
2027
  return t.playhead_ms === 0 && !t.is_buffering && t.buffered_ahead_ms === 0 ? "idle" : t.is_buffering ? "buffering" : ca(t) ? "healthy" : !da(t) || t.buffered_ahead_ms <= _r ? "critical" : t.buffered_ahead_ms <= kn ? "warning" : "healthy";
2020
2028
  }
2021
- const sc = {
2029
+ const fc = {
2022
2030
  idle: "Idle",
2023
2031
  buffering: "Buffering",
2024
2032
  critical: "Critical",
@@ -2075,7 +2083,7 @@ Tr("__WP_SOUNDS__", {
2075
2083
  off: ba
2076
2084
  });
2077
2085
  const Jn = { on: 0, off: 0 };
2078
- function Go(t, e, n, r) {
2086
+ function Vo(t, e, n, r) {
2079
2087
  if (!n || !r) return Jn;
2080
2088
  const s = new Set(t), i = new Set(e);
2081
2089
  let a = 0;
@@ -2084,15 +2092,15 @@ function Go(t, e, n, r) {
2084
2092
  for (const f of s) i.has(f) || o++;
2085
2093
  return a === 0 && o === 0 ? Jn : { on: a, off: o };
2086
2094
  }
2087
- const Ko = 1200, ve = 52, Ht = 4, mn = (ve - Ht) / 2, Qn = 2 * Math.PI * mn, je = ve - Ht * 2 - 4;
2088
- function qo(t) {
2095
+ const Jo = 1200, ve = 52, Ht = 4, mn = (ve - Ht) / 2, Qn = 2 * Math.PI * mn, je = ve - Ht * 2 - 4;
2096
+ function Qo(t) {
2089
2097
  return ca(t) ? !0 : da(t) ? t.buffered_ahead_ms >= $e : !1;
2090
2098
  }
2091
- function Vo(t) {
2099
+ function Yo(t) {
2092
2100
  return `hsl(${Math.round(t * 120)}, 90%, 55%)`;
2093
2101
  }
2094
- function Jo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2095
- const s = Math.min(1, t.buffered_ahead_ms / $e), i = Qn * (1 - s), a = Vo(s), o = Ue(e.sprite, e.pictureUrl);
2102
+ function Xo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2103
+ const s = Math.min(1, t.buffered_ahead_ms / $e), i = Qn * (1 - s), a = Yo(s), o = Ue(e.sprite, e.pictureUrl);
2096
2104
  return /* @__PURE__ */ E(
2097
2105
  "div",
2098
2106
  {
@@ -2100,7 +2108,7 @@ function Jo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2100
2108
  "data-client-id": t.client_id,
2101
2109
  className: "flex flex-col items-center gap-1",
2102
2110
  style: n ? {
2103
- animation: `bufferFadeOut ${Ko}ms ease forwards`
2111
+ animation: `bufferFadeOut ${Jo}ms ease forwards`
2104
2112
  } : void 0,
2105
2113
  onAnimationEnd: n ? r : void 0,
2106
2114
  children: [
@@ -2179,7 +2187,7 @@ function Jo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2179
2187
  }
2180
2188
  );
2181
2189
  }
2182
- function Qo({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf: i, onToggle: a }) {
2190
+ function Zo({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf: i, onToggle: a }) {
2183
2191
  const o = Ue(e, n), f = s ? "success" : "neutral", c = s ? /* @__PURE__ */ l(_t, { name: "tick" }) : /* @__PURE__ */ l(_t, { name: "hourglass" });
2184
2192
  return /* @__PURE__ */ E(
2185
2193
  "button",
@@ -2251,18 +2259,18 @@ function Qo({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf
2251
2259
  }
2252
2260
  );
2253
2261
  }
2254
- const Yo = { status: null, entries: [], completed: /* @__PURE__ */ new Set(), below: /* @__PURE__ */ new Set() };
2262
+ const ef = { status: null, entries: [], completed: /* @__PURE__ */ new Set(), below: /* @__PURE__ */ new Set() };
2255
2263
  function Yn(t, e) {
2256
2264
  if (!e || e.clients.length === 0) return { ...t, status: e, entries: [] };
2257
2265
  const n = new Set(t.completed), r = new Set(t.below), s = [];
2258
2266
  for (const i of e.clients) {
2259
2267
  const a = i.client_id;
2260
- qo(i) ? r.has(a) && !n.has(a) ? (n.add(a), s.push({ client: i, completed: !0 })) : n.has(a) && s.push({ client: i, completed: !0 }) : (n.delete(a), r.add(a), s.push({ client: i, completed: !1 }));
2268
+ Qo(i) ? r.has(a) && !n.has(a) ? (n.add(a), s.push({ client: i, completed: !0 })) : n.has(a) && s.push({ client: i, completed: !0 }) : (n.delete(a), r.add(a), s.push({ client: i, completed: !1 }));
2261
2269
  }
2262
2270
  return { status: e, entries: s, completed: n, below: r };
2263
2271
  }
2264
- function Xo() {
2265
- const t = x((w) => w.bufferStatus), e = x((w) => w.readyCheck), n = x((w) => w.roster), r = x((w) => w.me.clientId), s = x((w) => w.snapshot.playing), i = et(), [a, o] = $(() => Yn(Yo, t));
2272
+ function tf() {
2273
+ const t = x((w) => w.bufferStatus), e = x((w) => w.readyCheck), n = x((w) => w.roster), r = x((w) => w.me.clientId), s = x((w) => w.snapshot.playing), i = et(), [a, o] = $(() => Yn(ef, t));
2266
2274
  a.status !== t && o(Yn(a, t));
2267
2275
  const f = a.entries, c = (w) => {
2268
2276
  o((S) => {
@@ -2277,7 +2285,7 @@ function Xo() {
2277
2285
  }, [b]);
2278
2286
  const m = P(e.ready), p = P(e.active);
2279
2287
  F(() => {
2280
- const { on: w, off: S } = Go(
2288
+ const { on: w, off: S } = Vo(
2281
2289
  m.current,
2282
2290
  e.ready,
2283
2291
  p.current,
@@ -2316,7 +2324,7 @@ function Xo() {
2316
2324
  }
2317
2325
  ),
2318
2326
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-3", children: u.map((w) => /* @__PURE__ */ l(
2319
- Qo,
2327
+ Zo,
2320
2328
  {
2321
2329
  clientId: w.clientId,
2322
2330
  sprite: w.sprite,
@@ -2330,7 +2338,7 @@ function Xo() {
2330
2338
  )) })
2331
2339
  ] }),
2332
2340
  R && f.map(({ client: w, completed: S }) => /* @__PURE__ */ l(
2333
- Jo,
2341
+ Xo,
2334
2342
  {
2335
2343
  client: w,
2336
2344
  look: zr(n, { clientId: w.client_id }, { name: w.name, sprite: w.sprite_id ?? null }),
@@ -2414,7 +2422,7 @@ function Xn({
2414
2422
  }
2415
2423
  );
2416
2424
  }
2417
- function Zo({ sprite: t, url: e }) {
2425
+ function nf({ sprite: t, url: e }) {
2418
2426
  const n = Ue(t, e);
2419
2427
  return /* @__PURE__ */ l(
2420
2428
  mt,
@@ -2427,7 +2435,7 @@ function Zo({ sprite: t, url: e }) {
2427
2435
  }
2428
2436
  );
2429
2437
  }
2430
- function ef({
2438
+ function rf({
2431
2439
  anchor: t,
2432
2440
  itemId: e,
2433
2441
  snap: n
@@ -2454,7 +2462,7 @@ function ef({
2454
2462
  children: [
2455
2463
  /* @__PURE__ */ l("div", { className: "text-[11px] font-semibold text-text leading-snug pb-1.5 mb-1.5 border-b border-border", children: o }),
2456
2464
  Object.entries(a.votes).map(([f, c]) => /* @__PURE__ */ E("div", { className: "flex items-center gap-2 py-0.5", children: [
2457
- /* @__PURE__ */ l(Zo, { sprite: n.sprites[f], url: n.pictures?.[f] }),
2465
+ /* @__PURE__ */ l(nf, { sprite: n.sprites[f], url: n.pictures?.[f] }),
2458
2466
  /* @__PURE__ */ l("span", { className: "flex-1 text-[11px] text-text-secondary truncate", children: n.names[f] ?? "viewer" }),
2459
2467
  /* @__PURE__ */ l(
2460
2468
  "span",
@@ -2471,7 +2479,7 @@ function ef({
2471
2479
  document.body
2472
2480
  );
2473
2481
  }
2474
- function tf() {
2482
+ function af() {
2475
2483
  const t = x((k) => k.tierlistOpen), e = x((k) => k.setTierlistOpen), n = x((k) => k.tierlist), r = x((k) => k.tierlistDraft), s = x((k) => k.tierlistSaving), i = x((k) => k.moveTierlistItem), [a, o] = $(null), [f, c] = $(null), [d, u] = $(null), [g, b] = $(null), [y, h] = $("mine");
2476
2484
  F(() => {
2477
2485
  $n(!0);
@@ -2670,14 +2678,14 @@ function tf() {
2670
2678
  ]
2671
2679
  }
2672
2680
  ),
2673
- d && n && /* @__PURE__ */ l(ef, { anchor: d.anchor, itemId: d.itemId, snap: n })
2681
+ d && n && /* @__PURE__ */ l(rf, { anchor: d.anchor, itemId: d.itemId, snap: n })
2674
2682
  ]
2675
2683
  }
2676
2684
  ),
2677
2685
  document.body
2678
2686
  );
2679
2687
  }
2680
- function nf({ children: t }) {
2688
+ function sf({ children: t }) {
2681
2689
  const [e, n] = $(null);
2682
2690
  return F(() => {
2683
2691
  const r = () => n(document.fullscreenElement);
@@ -2692,11 +2700,11 @@ function va({ site: t = "control bar", className: e = "ctr-btn" }) {
2692
2700
  className: e,
2693
2701
  title: "Select Media",
2694
2702
  "aria-label": "Select Media",
2695
- children: /* @__PURE__ */ l(to, {})
2703
+ children: /* @__PURE__ */ l(ao, {})
2696
2704
  }
2697
2705
  );
2698
2706
  }
2699
- function rf() {
2707
+ function of() {
2700
2708
  const t = x((a) => a.chatCollapsed), e = x((a) => a.toggleChatCollapsed), n = x((a) => !!a.snapshot.mediaId), r = It(), s = Ut({ hasMedia: n, chatCollapsed: t, isFullscreen: r });
2701
2709
  return { panelHidden: s, toggle: () => {
2702
2710
  if (_("chat", s ? "Show chat" : "Hide chat", { isFullscreen: r, chatCollapsed: t }), !s) {
@@ -2709,7 +2717,7 @@ function rf() {
2709
2717
  } };
2710
2718
  }
2711
2719
  function ka({ className: t }) {
2712
- const { panelHidden: e, toggle: n } = rf(), r = e ? "Show chat" : "Hide chat";
2720
+ const { panelHidden: e, toggle: n } = of(), r = e ? "Show chat" : "Hide chat";
2713
2721
  return /* @__PURE__ */ l(
2714
2722
  "button",
2715
2723
  {
@@ -2719,11 +2727,11 @@ function ka({ className: t }) {
2719
2727
  title: r,
2720
2728
  "aria-label": r,
2721
2729
  "aria-expanded": !e,
2722
- children: e ? /* @__PURE__ */ l(Zi, { className: "w-5 h-5" }) : /* @__PURE__ */ l(ta, { className: "w-5 h-5" })
2730
+ children: e ? /* @__PURE__ */ l(no, { className: "w-5 h-5" }) : /* @__PURE__ */ l(ta, { className: "w-5 h-5" })
2723
2731
  }
2724
2732
  );
2725
2733
  }
2726
- function af() {
2734
+ function ff() {
2727
2735
  const t = x((d) => d.chatCollapsed), e = x((d) => !!d.snapshot.mediaId), n = It(), r = zt(), s = et(), i = _n(), a = Sn({
2728
2736
  isLeader: i,
2729
2737
  hasMedia: e,
@@ -2739,14 +2747,14 @@ function af() {
2739
2747
  f && /* @__PURE__ */ l(ka, { className: "corner-btn" })
2740
2748
  ] });
2741
2749
  }
2742
- const pn = "hadoku:avatar", bn = "hadoku:name", sf = "hadoku:identity", Dt = /* @__PURE__ */ Symbol.for("hadoku:identity-relay"), Zn = /* @__PURE__ */ Symbol.for("hadoku:identity-relayed");
2743
- function of() {
2744
- return typeof globalThis.BroadcastChannel > "u" ? null : new globalThis.BroadcastChannel(sf);
2750
+ const pn = "hadoku:avatar", bn = "hadoku:name", lf = "hadoku:identity", Dt = /* @__PURE__ */ Symbol.for("hadoku:identity-relay"), Zn = /* @__PURE__ */ Symbol.for("hadoku:identity-relayed");
2751
+ function cf() {
2752
+ return typeof globalThis.BroadcastChannel > "u" ? null : new globalThis.BroadcastChannel(lf);
2745
2753
  }
2746
2754
  function er(t) {
2747
2755
  return t === bn || t === pn;
2748
2756
  }
2749
- function ff(t, e) {
2757
+ function df(t, e) {
2750
2758
  const n = (r) => {
2751
2759
  if (r[Zn]) return;
2752
2760
  const s = r.detail;
@@ -2761,7 +2769,7 @@ function ff(t, e) {
2761
2769
  t.removeEventListener(bn, n), t.removeEventListener(pn, n), e.close();
2762
2770
  };
2763
2771
  }
2764
- function lf(t = typeof window > "u" ? void 0 : window, e = of) {
2772
+ function uf(t = typeof window > "u" ? void 0 : window, e = cf) {
2765
2773
  if (!t) return () => {
2766
2774
  };
2767
2775
  const n = t;
@@ -2770,7 +2778,7 @@ function lf(t = typeof window > "u" ? void 0 : window, e = of) {
2770
2778
  const a = e();
2771
2779
  if (!a) return () => {
2772
2780
  };
2773
- r = { count: 0, stop: ff(t, a) }, n[Dt] = r;
2781
+ r = { count: 0, stop: df(t, a) }, n[Dt] = r;
2774
2782
  }
2775
2783
  r.count++;
2776
2784
  const s = r;
@@ -2779,9 +2787,9 @@ function lf(t = typeof window > "u" ? void 0 : window, e = of) {
2779
2787
  i || (i = !0, !(--s.count > 0) && (s.stop(), n[Dt] === s && delete n[Dt]));
2780
2788
  };
2781
2789
  }
2782
- function cf() {
2790
+ function hf() {
2783
2791
  F(() => {
2784
- const t = lf(), e = gs((r, s) => {
2792
+ const t = uf(), e = gs((r, s) => {
2785
2793
  const i = bs(s);
2786
2794
  _("avatar", "Avatar changed in the settings popout", { sprite: i, source: s.avatar?.source }), Ir(i);
2787
2795
  }), n = ps((r) => {
@@ -2806,19 +2814,19 @@ function ot() {
2806
2814
  }
2807
2815
  }
2808
2816
  let Zt = !1;
2809
- function df() {
2817
+ function mf() {
2810
2818
  return Zt ? () => {
2811
2819
  } : (Zt = !0, document.addEventListener("click", ot, { capture: !0, passive: !0 }), document.addEventListener("touchend", ot, { capture: !0, passive: !0 }), document.addEventListener("keydown", ot, { capture: !0, passive: !0 }), () => {
2812
2820
  document.removeEventListener("click", ot, { capture: !0 }), document.removeEventListener("touchend", ot, { capture: !0 }), document.removeEventListener("keydown", ot, { capture: !0 }), Zt = !1;
2813
2821
  });
2814
2822
  }
2815
- const en = "data-wp-input", uf = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
2816
- function hf(t, e) {
2817
- return Dr(e) ? !1 : uf.has(t.key) || We(t) && t.key !== "Escape";
2823
+ const en = "data-wp-input", gf = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
2824
+ function pf(t, e) {
2825
+ return Dr(e) ? !1 : gf.has(t.key) || We(t) && t.key !== "Escape";
2818
2826
  }
2819
- function mf() {
2827
+ function bf() {
2820
2828
  const t = document.documentElement, e = (r) => {
2821
- hf(r, document.activeElement) && t.setAttribute(en, "remote");
2829
+ pf(r, document.activeElement) && t.setAttribute(en, "remote");
2822
2830
  }, n = (r) => {
2823
2831
  r.detail > 0 && t.setAttribute(en, "pointer");
2824
2832
  };
@@ -2826,26 +2834,26 @@ function mf() {
2826
2834
  window.removeEventListener("keydown", e, !0), window.removeEventListener("click", n, !0), t.removeAttribute(en);
2827
2835
  };
2828
2836
  }
2829
- const gf = 400;
2830
- function pf(t) {
2837
+ const yf = 400;
2838
+ function wf(t) {
2831
2839
  return t === "leader" || t === "viewer" ? t : null;
2832
2840
  }
2833
- async function bf(t) {
2841
+ async function vf(t) {
2834
2842
  const e = ws(), n = await fetch(`${e}/api/rooms/validate/${encodeURIComponent(t)}`);
2835
2843
  if (n.status === 404) return null;
2836
2844
  if (!n.ok) throw new Error(`validate returned ${n.status}`);
2837
2845
  const r = await n.json();
2838
- return pf(r?.type);
2846
+ return wf(r?.type);
2839
2847
  }
2840
- async function yf(t) {
2848
+ async function kf(t) {
2841
2849
  for (let e = 0; e < 2; e++)
2842
2850
  try {
2843
- const n = await bf(t);
2851
+ const n = await vf(t);
2844
2852
  x.getState().setRoomKeyType({ roomKey: t, type: n }), _("room", "Room key type probed", { roomKey: t, type: n });
2845
2853
  return;
2846
2854
  } catch (n) {
2847
2855
  if (e === 0) {
2848
- await new Promise((r) => setTimeout(r, gf));
2856
+ await new Promise((r) => setTimeout(r, yf));
2849
2857
  continue;
2850
2858
  }
2851
2859
  N("room", "Room key type probe failed, falling back to socket truth", X(n));
@@ -2855,14 +2863,14 @@ function Pe(t, e) {
2855
2863
  const r = x.getState().allocateClientSeq(), s = { kind: t, client_seq: r, ...e || {} };
2856
2864
  return Cr().emit(Nr.CONTROL, s), r;
2857
2865
  }
2858
- function ic(t) {
2866
+ function lc(t) {
2859
2867
  return Pe("load", { media_id: t });
2860
2868
  }
2861
- function wf() {
2869
+ function Sf() {
2862
2870
  return Pe("home");
2863
2871
  }
2864
- function vf() {
2865
- const t = No(), e = oa(), n = et(), r = fa(), s = n && r && !e.ready, i = !e.ready && !s;
2872
+ function xf() {
2873
+ const t = Fo(), e = oa(), n = et(), r = fa(), s = n && r && !e.ready, i = !e.ready && !s;
2866
2874
  return /* @__PURE__ */ l(
2867
2875
  "button",
2868
2876
  {
@@ -2883,13 +2891,13 @@ function vf() {
2883
2891
  className: "ctr-btn",
2884
2892
  title: s ? "Some viewers still loading — play anyway" : i ? "Waiting for sync..." : n ? t.playing ? "Pause" : "Play" : "Only the leader can control playback",
2885
2893
  "data-active": !i && n && t.playing ? "1" : "0",
2886
- children: t.playing ? /* @__PURE__ */ l(Ki, {}) : /* @__PURE__ */ l(Gi, {})
2894
+ children: t.playing ? /* @__PURE__ */ l(Ji, {}) : /* @__PURE__ */ l(Vi, {})
2887
2895
  }
2888
2896
  );
2889
2897
  }
2890
- function kf() {
2898
+ function Ef() {
2891
2899
  function t() {
2892
- _("controls", "Unload episode clicked"), wf();
2900
+ _("controls", "Unload episode clicked"), Sf();
2893
2901
  }
2894
2902
  return /* @__PURE__ */ l(
2895
2903
  "button",
@@ -2899,21 +2907,21 @@ function kf() {
2899
2907
  title: "Unload episode (return to lobby)",
2900
2908
  "data-remote-destructive": "",
2901
2909
  "aria-label": "Unload episode",
2902
- children: /* @__PURE__ */ l(eo, {})
2910
+ children: /* @__PURE__ */ l(ro, {})
2903
2911
  }
2904
2912
  );
2905
2913
  }
2906
- function Sf(t) {
2914
+ function Mf(t) {
2907
2915
  return !t.isLeader || t.durationMs === 0 ? !0 : !t.ready && !t.canOverride;
2908
2916
  }
2909
- function xf(t) {
2917
+ function _f(t) {
2910
2918
  return t.localValue !== null ? t.localValue : t.displayPlayheadMs ?? t.snapshotPlayheadMs;
2911
2919
  }
2912
- function Ef(t, e) {
2920
+ function Tf(t, e) {
2913
2921
  return e <= 0 ? 0 : t / e;
2914
2922
  }
2915
2923
  const nr = 1e4, rr = 6e4;
2916
- function Mf(t, e, n) {
2924
+ function Af(t, e, n) {
2917
2925
  if (n <= 0) return null;
2918
2926
  let r;
2919
2927
  switch (t) {
@@ -2940,17 +2948,17 @@ function Mf(t, e, n) {
2940
2948
  }
2941
2949
  return Math.round(Math.min(n, Math.max(0, r)));
2942
2950
  }
2943
- const _f = 600;
2951
+ const If = 600;
2944
2952
  function tn(t) {
2945
2953
  const e = Math.floor(t / 1e3), n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = e % 60;
2946
2954
  return n > 0 ? `${n}:${r.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}` : `${r}:${s.toString().padStart(2, "0")}`;
2947
2955
  }
2948
- function Tf({ durationMs: t, displayPlayheadMs: e }) {
2956
+ function Cf({ durationMs: t, displayPlayheadMs: e }) {
2949
2957
  const n = x((D) => D.snapshot), r = x((D) => D.readiness), s = et(), i = fa(), a = s && i && !r.ready, o = P(null), [f, c] = $(null), [d, u] = $(0), [g, b] = $(!1), [y, h] = $(null), m = P(0), [p, M] = $(n.mediaId);
2950
2958
  p !== n.mediaId && (M(n.mediaId), h(null), b(!1));
2951
2959
  const R = e ?? n.playheadMs;
2952
2960
  !g && y !== null && Math.abs(R - y) < _r && h(null);
2953
- const T = t || 0, w = xf({ localValue: y, displayPlayheadMs: e, snapshotPlayheadMs: n.playheadMs }), S = P(0);
2961
+ const T = t || 0, w = _f({ localValue: y, displayPlayheadMs: e, snapshotPlayheadMs: n.playheadMs }), S = P(0);
2954
2962
  F(() => {
2955
2963
  if (g || y === null) return;
2956
2964
  const D = 1e4 - (Date.now() - S.current), B = setTimeout(() => {
@@ -2973,10 +2981,10 @@ function Tf({ durationMs: t, displayPlayheadMs: e }) {
2973
2981
  }, []);
2974
2982
  const C = H((D) => {
2975
2983
  if (D.defaultPrevented) return;
2976
- const B = Mf(D.key, w, T);
2984
+ const B = Af(D.key, w, T);
2977
2985
  B !== null && (D.preventDefault(), h(B), S.current = Date.now(), v.current && clearTimeout(v.current), v.current = setTimeout(() => {
2978
2986
  v.current = null, _("seek", "Keyboard seek", { to_ms: B }), Pe("seek", { to_ms: B }), m.current = B;
2979
- }, _f));
2987
+ }, If));
2980
2988
  }, [w, T]);
2981
2989
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2 flex-1", children: [
2982
2990
  /* @__PURE__ */ l("span", { className: "text-[11px] font-mono text-text-secondary w-[45px] text-right shrink-0", children: tn(w) }),
@@ -2988,8 +2996,8 @@ function Tf({ durationMs: t, displayPlayheadMs: e }) {
2988
2996
  min: 0,
2989
2997
  max: T,
2990
2998
  value: w,
2991
- disabled: Sf({ isLeader: s, ready: r.ready, canOverride: a, durationMs: T }),
2992
- style: { "--progress": `${Ef(w, T) * 100}%` },
2999
+ disabled: Mf({ isLeader: s, ready: r.ready, canOverride: a, durationMs: T }),
3000
+ style: { "--progress": `${Tf(w, T) * 100}%` },
2993
3001
  onChange: (D) => {
2994
3002
  const B = Number(D.target.value);
2995
3003
  h(B), S.current = Date.now();
@@ -3022,7 +3030,7 @@ function Tf({ durationMs: t, displayPlayheadMs: e }) {
3022
3030
  /* @__PURE__ */ l("span", { className: "text-[11px] font-mono text-text-muted w-[45px] text-left shrink-0", children: tn(T) })
3023
3031
  ] });
3024
3032
  }
3025
- function Af({ videoRef: t }) {
3033
+ function Nf({ videoRef: t }) {
3026
3034
  const e = x((d) => d.mediaPrefs.volume), n = x((d) => d.mediaPrefs.muted), r = x((d) => d.setVolume), s = x((d) => d.setMuted);
3027
3035
  F(() => {
3028
3036
  const d = t.current;
@@ -3033,7 +3041,7 @@ function Af({ videoRef: t }) {
3033
3041
  r(u), u > 0 && n && s(!1);
3034
3042
  }, a = () => {
3035
3043
  s(!n);
3036
- }, o = () => n || e === 0 ? /* @__PURE__ */ l(qi, {}) : e < 0.5 ? /* @__PURE__ */ l(Vi, {}) : /* @__PURE__ */ l(Ji, {}), f = n ? 0 : e, c = Math.round(f * 100);
3044
+ }, o = () => n || e === 0 ? /* @__PURE__ */ l(Qi, {}) : e < 0.5 ? /* @__PURE__ */ l(Yi, {}) : /* @__PURE__ */ l(Xi, {}), f = n ? 0 : e, c = Math.round(f * 100);
3037
3045
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
3038
3046
  /* @__PURE__ */ l(
3039
3047
  "button",
@@ -3156,7 +3164,7 @@ function Tn({
3156
3164
  )
3157
3165
  ] });
3158
3166
  }
3159
- function If({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
3167
+ function Rf({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
3160
3168
  if (t.length === 0) return null;
3161
3169
  const s = t.length === 1;
3162
3170
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
@@ -3176,7 +3184,7 @@ function If({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
3176
3184
  )
3177
3185
  ] });
3178
3186
  }
3179
- function Cf({
3187
+ function Lf({
3180
3188
  tracks: t,
3181
3189
  selectedIndex: e,
3182
3190
  onSelect: n,
@@ -3211,7 +3219,7 @@ function Cf({
3211
3219
  )
3212
3220
  ] });
3213
3221
  }
3214
- const ft = 3, Nf = 1e3, Rf = 15e3;
3222
+ const ft = 3, Ff = 1e3, $f = 15e3;
3215
3223
  function Ae(t) {
3216
3224
  const e = t?.readyState;
3217
3225
  return e === "open" || e === "ended";
@@ -3223,10 +3231,10 @@ const Z = {
3223
3231
  FALLBACK: 1
3224
3232
  }, nn = 0.5, rn = 3e3;
3225
3233
  function xt(t, e = {}) {
3226
- const { baseMs: n = Nf, capMs: r = Rf, jitter: s = 0.25 } = e, i = Math.min(n * Math.pow(2, t - 1), r), a = s > 0 ? Math.round(i * Math.random() * s) : 0;
3234
+ const { baseMs: n = Ff, capMs: r = $f, jitter: s = 0.25 } = e, i = Math.min(n * Math.pow(2, t - 1), r), a = s > 0 ? Math.round(i * Math.random() * s) : 0;
3227
3235
  return i + a;
3228
3236
  }
3229
- const ar = 15, Lf = 35e3, Ff = 2e3, an = 10;
3237
+ const ar = 15, Pf = 35e3, Df = 2e3, an = 10;
3230
3238
  function Fe(t, e) {
3231
3239
  if (t.length === 0) return 0;
3232
3240
  if (e >= t[t.length - 1].end_ms) return t.length - 1;
@@ -3260,15 +3268,15 @@ function sn(t, e, n, r = Z.RANGE) {
3260
3268
  function we(t) {
3261
3269
  return t ? Array.from({ length: t.length }, (e, n) => `${t.start(n).toFixed(2)}-${t.end(n).toFixed(2)}`) : [];
3262
3270
  }
3263
- function $f(t) {
3271
+ function Bf(t) {
3264
3272
  if (t.length === 0) return 0;
3265
3273
  const e = t.reduce((r, s) => r + s.bytes, 0), n = t.reduce((r, s) => r + s.durationMs, 0);
3266
3274
  return n === 0 ? 0 : e / n * 1e3;
3267
3275
  }
3268
- const Pf = 8e5, Df = 4;
3276
+ const Of = 8e5, jf = 4;
3269
3277
  function kt(t) {
3270
3278
  if (t === 0) return 6e4;
3271
- const e = Pf / t * 1e3 * Df;
3279
+ const e = Of / t * 1e3 * jf;
3272
3280
  return Math.max(3e4, Math.min(12e4, Math.round(e)));
3273
3281
  }
3274
3282
  function sr(t, e) {
@@ -3276,7 +3284,7 @@ function sr(t, e) {
3276
3284
  if (t[n]?.keyframe) return n;
3277
3285
  return -1;
3278
3286
  }
3279
- function Bf(t, e, n, r) {
3287
+ function Hf(t, e, n, r) {
3280
3288
  const s = t * 1e3 - 100, i = e * 1e3 + 100;
3281
3289
  for (const a of r) {
3282
3290
  const o = n[a];
@@ -3285,7 +3293,7 @@ function Bf(t, e, n, r) {
3285
3293
  }
3286
3294
  return !1;
3287
3295
  }
3288
- function Of(t) {
3296
+ function Uf(t) {
3289
3297
  const e = [], n = t.replace(/\r\n/g, `
3290
3298
  `).split(`
3291
3299
  `);
@@ -3340,7 +3348,7 @@ function ir(t) {
3340
3348
  let n = 0, r, s;
3341
3349
  return e.length === 3 ? (n = parseInt(e[0], 10), r = parseInt(e[1], 10), s = parseFloat(e[2])) : (r = parseInt(e[0], 10), s = parseFloat(e[1])), isNaN(n) || isNaN(r) || isNaN(s) ? null : n * 3600 + r * 60 + s;
3342
3350
  }
3343
- function jf(t) {
3351
+ function Wf(t) {
3344
3352
  return t.replace(/<\/?[^>]+(>|$)/g, "").replace(/\{[^}]+\}/g, "").replace(/\\N/g, " ").replace(/\s*\n\s*/g, " ").replace(/\s{2,}/g, " ").trim();
3345
3353
  }
3346
3354
  const xa = {
@@ -3353,7 +3361,7 @@ const xa = {
3353
3361
  // Accessibility-focused: bold white text on solid black box
3354
3362
  contrast: "text-white font-bold bg-black px-3 py-1"
3355
3363
  };
3356
- function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3364
+ function zf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3357
3365
  const [s, i] = $([]), [a, o] = $([]), f = P(null), [c, d] = $(40), [u, g] = $(18), [b, y] = $(t);
3358
3366
  b !== t && (y(t), t || i([])), F(() => {
3359
3367
  if (!t) return;
@@ -3367,7 +3375,7 @@ function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3367
3375
  if (!k.ok) throw new Error(`Failed to fetch subtitles (status ${k.status})`);
3368
3376
  const v = await k.text();
3369
3377
  if (w) return;
3370
- const C = Of(v);
3378
+ const C = Uf(v);
3371
3379
  i(C);
3372
3380
  return;
3373
3381
  } catch (k) {
@@ -3438,7 +3446,7 @@ function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3438
3446
  "div",
3439
3447
  {
3440
3448
  className: `${L} font-medium max-w-[95%] inline-block antialiased ${xa[n]}`,
3441
- children: jf(k.text)
3449
+ children: Wf(k.text)
3442
3450
  }
3443
3451
  )
3444
3452
  },
@@ -3475,13 +3483,13 @@ function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3475
3483
  T(M.bl, M.bc, M.br, { bottom: `${c}px` }, f)
3476
3484
  ] });
3477
3485
  }
3478
- const Uf = [
3486
+ const Gf = [
3479
3487
  { value: "classic", label: "Classic" },
3480
3488
  { value: "cinema", label: "Cinema" },
3481
3489
  { value: "minimal", label: "Minimal" },
3482
3490
  { value: "contrast", label: "High Contrast" }
3483
3491
  ];
3484
- function Wf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3492
+ function Kf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3485
3493
  return n ? /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
3486
3494
  /* @__PURE__ */ l("span", { className: "text-[10px] opacity-60 uppercase tracking-wide", children: "Style" }),
3487
3495
  /* @__PURE__ */ l(
@@ -3489,7 +3497,7 @@ function Wf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3489
3497
  {
3490
3498
  ariaLabel: "Subtitle style selection",
3491
3499
  title: "Select subtitle style",
3492
- options: Uf.map((s) => ({
3500
+ options: Gf.map((s) => ({
3493
3501
  ...s,
3494
3502
  render: /* @__PURE__ */ l("span", { className: "subtitle-style-preview", "data-style": s.value, children: /* @__PURE__ */ l("span", { className: `font-medium text-[15px] leading-tight inline-block antialiased ${xa[s.value]}`, children: s.label }) })
3495
3503
  })),
@@ -3501,7 +3509,7 @@ function Wf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3501
3509
  )
3502
3510
  ] }) : null;
3503
3511
  }
3504
- function zf({ videoRef: t }) {
3512
+ function qf({ videoRef: t }) {
3505
3513
  const [e, n] = $(!1);
3506
3514
  F(() => {
3507
3515
  const s = () => {
@@ -3531,11 +3539,11 @@ function zf({ videoRef: t }) {
3531
3539
  },
3532
3540
  className: "ctr-btn",
3533
3541
  title: e ? "Exit Fullscreen" : "Enter Fullscreen",
3534
- children: e ? /* @__PURE__ */ l(Yi, {}) : /* @__PURE__ */ l(Qi, {})
3542
+ children: e ? /* @__PURE__ */ l(eo, {}) : /* @__PURE__ */ l(Zi, {})
3535
3543
  }
3536
3544
  );
3537
3545
  }
3538
- function Gf({
3546
+ function Vf({
3539
3547
  videoRef: t,
3540
3548
  mediaId: e,
3541
3549
  durationMs: n,
@@ -3606,18 +3614,18 @@ function Gf({
3606
3614
  return /* @__PURE__ */ E("div", { className: `ctr-bar-wrapper ${rt ? "show" : ""}`, children: [
3607
3615
  /* @__PURE__ */ E("div", { ref: v, className: Lt, children: [
3608
3616
  p && /* @__PURE__ */ E("div", { className: "cluster", children: [
3609
- /* @__PURE__ */ l(vf, {}),
3617
+ /* @__PURE__ */ l(xf, {}),
3610
3618
  S && /* @__PURE__ */ l(va, {}),
3611
- /* @__PURE__ */ l(kf, {})
3619
+ /* @__PURE__ */ l(Ef, {})
3612
3620
  ] }),
3613
- /* @__PURE__ */ l("div", { className: "cluster-seek", children: /* @__PURE__ */ l(Tf, { durationMs: n, displayPlayheadMs: y }) }),
3621
+ /* @__PURE__ */ l("div", { className: "cluster-seek", children: /* @__PURE__ */ l(Cf, { durationMs: n, displayPlayheadMs: y }) }),
3614
3622
  /* @__PURE__ */ E("div", { className: "cluster", children: [
3615
- /* @__PURE__ */ l(Af, { videoRef: t }),
3623
+ /* @__PURE__ */ l(Nf, { videoRef: t }),
3616
3624
  s.length > 1 && /* @__PURE__ */ E(he, { children: [
3617
3625
  /* @__PURE__ */ l("div", { className: "w-px h-5 bg-white/20" }),
3618
3626
  " ",
3619
3627
  /* @__PURE__ */ l(
3620
- If,
3628
+ Rf,
3621
3629
  {
3622
3630
  tracks: s,
3623
3631
  selectedIndex: i,
@@ -3629,7 +3637,7 @@ function Gf({
3629
3637
  ] }),
3630
3638
  o.length > 0 && /* @__PURE__ */ E("div", { className: "cluster", children: [
3631
3639
  /* @__PURE__ */ l(
3632
- Cf,
3640
+ Lf,
3633
3641
  {
3634
3642
  tracks: o,
3635
3643
  selectedIndex: f,
@@ -3640,7 +3648,7 @@ function Gf({
3640
3648
  }
3641
3649
  ),
3642
3650
  /* @__PURE__ */ l(
3643
- Wf,
3651
+ Kf,
3644
3652
  {
3645
3653
  style: g,
3646
3654
  onStyleChange: b,
@@ -3658,7 +3666,7 @@ function Gf({
3658
3666
  onDragOver: I.onDragOver,
3659
3667
  children: [
3660
3668
  /* @__PURE__ */ l(aa, { pending: I.pending, uploading: I.uploading, onRemove: I.remove }),
3661
- K && /* @__PURE__ */ l(Ui, { anchor: tt, width: 340, children: /* @__PURE__ */ l(
3669
+ K && /* @__PURE__ */ l(Gi, { anchor: tt, width: 340, children: /* @__PURE__ */ l(
3662
3670
  jr,
3663
3671
  {
3664
3672
  open: !0,
@@ -3707,7 +3715,7 @@ function Gf({
3707
3715
  ),
3708
3716
  /* @__PURE__ */ E("div", { className: "cluster cluster-tight", children: [
3709
3717
  L && /* @__PURE__ */ l(ka, { className: "ctr-btn" }),
3710
- /* @__PURE__ */ l(zf, { videoRef: t })
3718
+ /* @__PURE__ */ l(qf, { videoRef: t })
3711
3719
  ] })
3712
3720
  ] }),
3713
3721
  Kt && /* @__PURE__ */ E("div", { className: "ctr-scroll-group", children: [
@@ -3728,40 +3736,42 @@ function Gf({
3728
3736
  onClick: () => Rt("right"),
3729
3737
  tabIndex: -1,
3730
3738
  "aria-label": "Scroll right",
3731
- children: /* @__PURE__ */ l(Xi, {})
3739
+ children: /* @__PURE__ */ l(to, {})
3732
3740
  }
3733
3741
  )
3734
3742
  ] })
3735
3743
  ] });
3736
3744
  }
3737
- const Kf = 1e3;
3738
- function qf(t) {
3739
- return t.hidden && t.roomPlaying && !t.seekInFlight && !t.ended && !t.localPause && t.sinceUserPauseMs >= Kf;
3745
+ const Jf = 1e3;
3746
+ function Qf(t) {
3747
+ return t.hidden && t.roomPlaying && !t.seekInFlight && !t.ended && !t.localPause && t.sinceUserPauseMs >= Jf;
3740
3748
  }
3741
- function Vf(t, e) {
3749
+ function Yf(t, e) {
3742
3750
  return e.isLeader ? t === "play" && e.roomPlaying ? { kind: "resync" } : t === "pause" && !e.roomPlaying ? { kind: "none" } : { kind: "control", control: t } : t === "pause" ? { kind: "local-pause" } : e.roomPlaying ? { kind: "resync" } : { kind: "none" };
3743
3751
  }
3744
- const Jf = 1e3;
3745
- function Qf(t) {
3752
+ const Xf = 1e3;
3753
+ function Zf(t) {
3746
3754
  if (!t.roomPlaying || t.seekInFlight) return { kind: "none" };
3747
3755
  const e = t.durationMs > 0 ? Math.min(t.roomMs, t.durationMs) : t.roomMs;
3748
3756
  return Math.abs(e - t.elementMs) > t.driftToleranceMs ? { kind: "seek", targetMs: Math.round(e) } : t.elementPaused ? { kind: "resume" } : { kind: "none" };
3749
3757
  }
3750
- function Yf(t, e, n) {
3758
+ function el(t, e, n) {
3751
3759
  return t.playheadMs + (t.playing ? Math.max(0, n - e) : 0);
3752
3760
  }
3753
3761
  function Ea(t) {
3754
- const e = t.split("/").filter(Boolean);
3755
- return e.length >= 2 ? e.slice(-2).join(" ") : e[e.length - 1] || t;
3762
+ const e = Zs(t);
3763
+ if (e !== null) return e;
3764
+ const n = t.split("/").filter(Boolean);
3765
+ return n.length >= 2 ? n.slice(-2).join(" ") : n[n.length - 1] || t;
3756
3766
  }
3757
- function Xf(t) {
3767
+ function tl(t) {
3758
3768
  const e = t.split("/").filter(Boolean), n = [`${e.join("/")}/poster.jpg`];
3759
3769
  return e.length >= 2 && n.push(`${e.slice(0, -1).join("/")}/poster.jpg`), n;
3760
3770
  }
3761
- function Zf({ mediaId: t, visible: e }) {
3771
+ function nl({ mediaId: t, visible: e }) {
3762
3772
  return t ? /* @__PURE__ */ l("div", { className: `media-title ${e ? "show" : ""}`, children: Ea(t) }) : null;
3763
3773
  }
3764
- const el = 300, tl = 50, nl = 100, rl = 100, al = 100, sl = 100;
3774
+ const rl = 300, al = 50, sl = 100, il = 100, ol = 100, fl = 100;
3765
3775
  function on(t, e) {
3766
3776
  if (t.length === 0) return 0;
3767
3777
  const n = Math.min(Math.floor(e / 100 * t.length), t.length - 1);
@@ -3779,10 +3789,10 @@ function Be(t) {
3779
3789
  max: Math.round(e[e.length - 1])
3780
3790
  };
3781
3791
  }
3782
- function Oe(t, e = el) {
3792
+ function Oe(t, e = rl) {
3783
3793
  t.length > e && t.splice(0, t.length - e);
3784
3794
  }
3785
- class il {
3795
+ class ll {
3786
3796
  // Fetch
3787
3797
  _fetches = [];
3788
3798
  _fetchTimeoutCount = 0;
@@ -3840,11 +3850,11 @@ class il {
3840
3850
  }
3841
3851
  /** Called when waitForAppend times out. */
3842
3852
  recordAppendTimeout(e, n, r) {
3843
- this._appendTimeouts.push({ index: e, timeoutMs: n, queueDepth: r, ts: performance.now() }), Oe(this._appendTimeouts, tl);
3853
+ this._appendTimeouts.push({ index: e, timeoutMs: n, queueDepth: r, ts: performance.now() }), Oe(this._appendTimeouts, al);
3844
3854
  }
3845
3855
  /** Called when a seek completes (COMPLETED path in _execute). */
3846
3856
  recordSeekCompleted(e, n, r) {
3847
- this._seeks.push({ caller: e, targetMs: n, durationMs: r, ts: performance.now() }), Oe(this._seeks, nl);
3857
+ this._seeks.push({ caller: e, targetMs: n, durationMs: r, ts: performance.now() }), Oe(this._seeks, sl);
3848
3858
  }
3849
3859
  /** Called when waitForSeeked resolves via timeout rather than the 'seeked' event. */
3850
3860
  recordWaitForSeekedTimeout() {
@@ -3866,11 +3876,11 @@ class il {
3866
3876
  this._stallStart && (this._stalls.push({
3867
3877
  ...this._stallStart,
3868
3878
  durationMs: Math.round(performance.now() - this._stallStart.ts)
3869
- }), Oe(this._stalls, rl), this._stallStart = null);
3879
+ }), Oe(this._stalls, il), this._stallStart = null);
3870
3880
  }
3871
3881
  /** Called from _doEvict with the reason tag passed by the caller. */
3872
3882
  recordEvict(e, n, r) {
3873
- this._evictCounts[e] = (this._evictCounts[e] ?? 0) + 1, this._evicts.push({ reason: e, start: n, end: r, ts: performance.now() }), Oe(this._evicts, al);
3883
+ this._evictCounts[e] = (this._evictCounts[e] ?? 0) + 1, this._evicts.push({ reason: e, start: n, end: r, ts: performance.now() }), Oe(this._evicts, ol);
3874
3884
  }
3875
3885
  /** Called from FragmentManager.reconcileLoadedStates() when the browser's
3876
3886
  * own silent quota eviction is detected (fragments 'loaded' but gone from
@@ -3912,7 +3922,7 @@ class il {
3912
3922
  },
3913
3923
  audio: {
3914
3924
  driftMs: Be(this._audioDrifts),
3915
- highDriftCount: this._audioDrifts.filter((c) => c > sl).length,
3925
+ highDriftCount: this._audioDrifts.filter((c) => c > fl).length,
3916
3926
  samples: this._audioDrifts.slice(-20).map((c) => Math.round(c))
3917
3927
  },
3918
3928
  stalls: {
@@ -3961,9 +3971,9 @@ class il {
3961
3971
  this._fetches = [], this._fetchTimeoutCount = 0, this._fetchErrorCount = 0, this._appends = [], this._appendStarts.clear(), this._appendTimeouts = [], this._seeks = [], this._waitForSeekedTimeouts = 0, this._audioDrifts = [], this._stalls = [], this._stallStart = null, this._evictCounts = {}, this._evicts = [], this._browserEvictions = [];
3962
3972
  }
3963
3973
  }
3964
- const de = new il();
3974
+ const de = new ll();
3965
3975
  Tr("__WP_PERF__", de);
3966
- class ol {
3976
+ class cl {
3967
3977
  cache = /* @__PURE__ */ new Map();
3968
3978
  getOrCreate(e) {
3969
3979
  let n = this.cache.get(e);
@@ -4002,8 +4012,8 @@ class ol {
4002
4012
  this.cache.clear();
4003
4013
  }
4004
4014
  }
4005
- const Me = new ol(), or = 60, fl = 5e3;
4006
- class ll {
4015
+ const Me = new cl(), or = 60, dl = 5e3;
4016
+ class ul {
4007
4017
  constructor(e) {
4008
4018
  this.deps = e;
4009
4019
  }
@@ -4083,7 +4093,7 @@ class ll {
4083
4093
  if (this.evictStartedAt === 0)
4084
4094
  return this.evictStartedAt = Date.now(), !0;
4085
4095
  const e = Date.now() - this.evictStartedAt;
4086
- return e < fl ? !0 : (N("buffer", `EVICT-STUCK isEvicting held ${e}ms — clearing; a remove() updateend was lost, eviction was disabled`), de.recordEvict("stuck-recovered", 0, 0), this._isEvicting = !1, this.evictStartedAt = 0, !1);
4096
+ return e < dl ? !0 : (N("buffer", `EVICT-STUCK isEvicting held ${e}ms — clearing; a remove() updateend was lost, eviction was disabled`), de.recordEvict("stuck-recovered", 0, 0), this._isEvicting = !1, this.evictStartedAt = 0, !1);
4087
4097
  }
4088
4098
  /** Called on dispose, on SourceBuffer error, and on media change
4089
4099
  * (FragmentManager.setIndex) — see the note at that call site. */
@@ -4249,13 +4259,13 @@ class He {
4249
4259
  * hold began. Lets processAppendQueue bound a hold that would otherwise
4250
4260
  * never end — see APPEND_HOLD_MAX_MS. */
4251
4261
  appendHold = null;
4252
- eviction = new ll({
4262
+ eviction = new ul({
4253
4263
  getFragments: () => this.fragments,
4254
4264
  getSourceBuffer: () => this.sourceBuffer,
4255
4265
  getMediaSource: () => this.mediaSource,
4256
4266
  isDisposed: () => this.disposed,
4257
4267
  fragmentStates: this.fragmentStates,
4258
- getPendingSeekTargetMs: () => this.pendingSeekTargetMs !== null && Date.now() - this.pendingSeekSetAtMs > Lf ? null : this.pendingSeekTargetMs
4268
+ getPendingSeekTargetMs: () => this.pendingSeekTargetMs !== null && Date.now() - this.pendingSeekSetAtMs > Pf ? null : this.pendingSeekTargetMs
4259
4269
  });
4260
4270
  lastGapWarnMs = 0;
4261
4271
  stableGapSignature = null;
@@ -4584,7 +4594,7 @@ class He {
4584
4594
  ]), r = [], s = this.currentPlayheadMs / 1e3;
4585
4595
  for (let o = 1; o < e.buffered.length; o++) {
4586
4596
  const f = e.buffered.end(o - 1), c = e.buffered.start(o);
4587
- c <= s || Bf(f, c, this.fragments, n) || r.push(`${f.toFixed(2)}-${c.toFixed(2)}`);
4597
+ c <= s || Hf(f, c, this.fragments, n) || r.push(`${f.toFixed(2)}-${c.toFixed(2)}`);
4588
4598
  }
4589
4599
  if (r.length === 0) {
4590
4600
  this.stableGapSignature = null, this.stableGapSince = 0;
@@ -5118,7 +5128,7 @@ class He {
5118
5128
  /** Public eviction entry point used by MediaPlayer / prefetch. Delegates
5119
5129
  * to the strategy which owns the isEvicting state + range choice logic. */
5120
5130
  evictBefore(e) {
5121
- this.pendingSeekTargetMs !== null && Math.abs(e - this.pendingSeekTargetMs) <= Ff && (this.pendingSeekTargetMs = null), this.eviction.evictBefore(e);
5131
+ this.pendingSeekTargetMs !== null && Math.abs(e - this.pendingSeekTargetMs) <= Df && (this.pendingSeekTargetMs = null), this.eviction.evictBefore(e);
5122
5132
  }
5123
5133
  // Public entry point for socket reconnect scenarios. Clears stale in-flight
5124
5134
  // fetches and their pendingFetchIndices entries so the queue is unblocked on
@@ -5266,7 +5276,7 @@ class He {
5266
5276
  return { ranges: e, gaps: e.length > 1, fragmentStates: n };
5267
5277
  }
5268
5278
  getAverageDownloadRate() {
5269
- return $f(this.downloadSamples);
5279
+ return Bf(this.downloadSamples);
5270
5280
  }
5271
5281
  /** Nominal media end time (ms) = last fragment's end. 0 if no index loaded.
5272
5282
  * Reported in health so the leader's status card can tell "near end-of-stream,
@@ -5384,14 +5394,14 @@ class He {
5384
5394
  this.disposed = !0, this.mediaSource && ct.get(this.mediaSource)?.delete(this), this.eosRetryTimer && (clearTimeout(this.eosRetryTimer), this.eosRetryTimer = null), this.pendingEndOfStream = !1, this.endOfStreamEligible = !1, this.abortAllJobs("dispose"), this.rejectAllWaiters(new Error("FragmentManager disposed")), this.appendQueue = [], this.isAppending = !1, this.eviction.reset(), this.appendingIndex = null, this.fragmentStates.clear(), this.errorTimestamps.clear(), this.discardCounts.clear(), this.fetchErrorCycles.clear(), this.downloadSamples = [], this.preAppendRanges = [], this.sourceBuffer = null, this.mediaSource = null, this.initState = "pending", this.initRange = null;
5385
5395
  }
5386
5396
  }
5387
- function cl(t, e) {
5397
+ function hl(t, e) {
5388
5398
  return !!t && t !== "eng" && e;
5389
5399
  }
5390
- function dl(t) {
5391
- return t.override !== null ? t.override : t.globalEnabled || cl(t.selectedAudioLang, t.hasEngSub);
5400
+ function ml(t) {
5401
+ return t.override !== null ? t.override : t.globalEnabled || hl(t.selectedAudioLang, t.hasEngSub);
5392
5402
  }
5393
5403
  const Ma = "wp_reload_history", In = "wp_phantom_reload", _a = 5 * 6e4, fr = 3;
5394
- function ul() {
5404
+ function gl() {
5395
5405
  try {
5396
5406
  const t = sessionStorage.getItem(Ma);
5397
5407
  return (t ? JSON.parse(t) : []).filter((n) => Date.now() - n < _a);
@@ -5400,7 +5410,7 @@ function ul() {
5400
5410
  }
5401
5411
  }
5402
5412
  function yn(t, e) {
5403
- const n = ul();
5413
+ const n = gl();
5404
5414
  if (n.length >= fr) {
5405
5415
  Bn(
5406
5416
  "error",
@@ -5436,13 +5446,13 @@ function lr() {
5436
5446
  return null;
5437
5447
  }
5438
5448
  }
5439
- function hl() {
5449
+ function pl() {
5440
5450
  try {
5441
5451
  sessionStorage.removeItem(In);
5442
5452
  } catch {
5443
5453
  }
5444
5454
  }
5445
- function ml() {
5455
+ function bl() {
5446
5456
  const t = navigator;
5447
5457
  try {
5448
5458
  return typeof t.getAutoplayPolicy == "function" ? t.getAutoplayPolicy("mediaelement") : void 0;
@@ -5450,11 +5460,11 @@ function ml() {
5450
5460
  return;
5451
5461
  }
5452
5462
  }
5453
- function gl(t, e) {
5463
+ function yl(t, e) {
5454
5464
  return t === "disallowed" ? "deferred" : e ? "user-muted" : t === "allowed-muted" ? "muted-bridge" : "audible";
5455
5465
  }
5456
5466
  function Ta(t, e) {
5457
- const n = ml(), r = gl(n, e.userWantsMuted);
5467
+ const n = bl(), r = yl(n, e.userWantsMuted);
5458
5468
  _(e.label, "autoplay plan", { policy: n ?? "unknown", plan: r, userWantsMuted: e.userWantsMuted });
5459
5469
  const s = () => {
5460
5470
  t.muted = !0, t.play().then(() => {
@@ -5494,7 +5504,7 @@ function Aa(t, e = 3e3) {
5494
5504
  t.addEventListener("seeked", s, { once: !0 });
5495
5505
  });
5496
5506
  }
5497
- class pl {
5507
+ class wl {
5498
5508
  // ── State ──
5499
5509
  _seekInFlight = !1;
5500
5510
  /** Route taken by the in-flight seek (buffered/loading/nearby-pending/far) —
@@ -5686,10 +5696,10 @@ class pl {
5686
5696
  }
5687
5697
  }
5688
5698
  let Et = null;
5689
- function bl() {
5699
+ function vl() {
5690
5700
  Et === null && (_("health", "Starting health reporting"), cr(), Et = window.setInterval(cr, As));
5691
5701
  }
5692
- function yl() {
5702
+ function kl() {
5693
5703
  Et !== null && (_("health", "Stopping health reporting"), window.clearInterval(Et), Et = null);
5694
5704
  }
5695
5705
  function cr() {
@@ -5724,12 +5734,12 @@ function cr() {
5724
5734
  video_ready_state: r?.readyState ?? -1,
5725
5735
  duration_ms: n.getMediaEndMs(),
5726
5736
  delivery_arm: Cs(),
5727
- ...wl(r),
5737
+ ...Sl(r),
5728
5738
  pong_age_ms: Is(),
5729
5739
  reported_at: Date.now()
5730
5740
  });
5731
5741
  }
5732
- function wl(t) {
5742
+ function Sl(t) {
5733
5743
  const e = typeof navigator > "u" ? void 0 : navigator, n = e?.connection;
5734
5744
  return {
5735
5745
  page_visible: typeof document.visibilityState == "string" ? document.visibilityState === "visible" : void 0,
@@ -5741,8 +5751,8 @@ function wl(t) {
5741
5751
  net_downlink_mbps: typeof n?.downlink == "number" && n.downlink >= 0 ? n.downlink : void 0
5742
5752
  };
5743
5753
  }
5744
- const vl = 3e3;
5745
- function kl() {
5754
+ const xl = 3e3;
5755
+ function El() {
5746
5756
  const [t, e] = $(!1), n = P(null), r = P(!1), s = () => {
5747
5757
  n.current && (clearTimeout(n.current), n.current = null);
5748
5758
  }, i = H((f = 3e3) => {
@@ -5752,7 +5762,7 @@ function kl() {
5752
5762
  }, []), a = H(() => {
5753
5763
  r.current || (s(), e(!1));
5754
5764
  }, []), o = H((f) => {
5755
- r.current !== f && (r.current = f, f ? (s(), e(!0)) : i(vl));
5765
+ r.current !== f && (r.current = f, f ? (s(), e(!0)) : i(xl));
5756
5766
  }, [i]);
5757
5767
  return F(() => {
5758
5768
  const f = () => {
@@ -5763,7 +5773,7 @@ function kl() {
5763
5773
  };
5764
5774
  }, [i]), { controlsVisible: t, showControls: i, hideControls: a, setControlsHeld: o };
5765
5775
  }
5766
- const Ia = [], Ca = [], Sl = {
5776
+ const Ia = [], Ca = [], Ml = {
5767
5777
  fragments: Ia,
5768
5778
  durationMs: null,
5769
5779
  mseCodec: null,
@@ -5771,8 +5781,8 @@ const Ia = [], Ca = [], Sl = {
5771
5781
  audioTracks: Ca,
5772
5782
  contentToken: null
5773
5783
  };
5774
- function xl(t, e) {
5775
- if (!t || t.url !== e) return Sl;
5784
+ function _l(t, e) {
5785
+ if (!t || t.url !== e) return Ml;
5776
5786
  const n = t.data;
5777
5787
  return {
5778
5788
  fragments: n.fragments || Ia,
@@ -5801,7 +5811,7 @@ function dr(t) {
5801
5811
  return null;
5802
5812
  }
5803
5813
  }
5804
- function El(t) {
5814
+ function Tl(t) {
5805
5815
  const [e, n] = $(null);
5806
5816
  return F(() => {
5807
5817
  const r = new AbortController();
@@ -5854,7 +5864,7 @@ function El(t) {
5854
5864
  return s(), () => {
5855
5865
  r.abort();
5856
5866
  };
5857
- }, [t]), ye(() => xl(e, t), [e, t]);
5867
+ }, [t]), ye(() => _l(e, t), [e, t]);
5858
5868
  }
5859
5869
  const fn = {
5860
5870
  audioTracks: [],
@@ -5862,7 +5872,7 @@ const fn = {
5862
5872
  selectedAudioIndex: 0,
5863
5873
  selectedSubtitleIndex: 0
5864
5874
  };
5865
- function Ml(t) {
5875
+ function Al(t) {
5866
5876
  const [e, n] = $(fn), r = Ns(), s = x((d) => d.mediaPrefs.preferredAudioLang), [i, a] = $(t);
5867
5877
  i !== t && (a(t), t && n(fn));
5868
5878
  const o = ue(() => ({ origin: Rs(r), preferredAudioLang: s }));
@@ -5898,12 +5908,12 @@ function Ml(t) {
5898
5908
  setSelectedSubtitleIndex: c
5899
5909
  };
5900
5910
  }
5901
- const _l = 100;
5902
- function Tl(t) {
5903
- return !t.roomPlaying || t.videoPaused ? "not-playing" : t.seekInFlight ? "seeking" : t.advancedMs > _l ? "advancing" : "stalled";
5911
+ const Il = 100;
5912
+ function Cl(t) {
5913
+ return !t.roomPlaying || t.videoPaused ? "not-playing" : t.seekInFlight ? "seeking" : t.advancedMs > Il ? "advancing" : "stalled";
5904
5914
  }
5905
- const ln = 4e4, Al = 3e3;
5906
- function Il(t, e, n, r, s, i) {
5915
+ const ln = 4e4, Nl = 3e3;
5916
+ function Rl(t, e, n, r, s, i) {
5907
5917
  const a = ue((p) => {
5908
5918
  const M = {};
5909
5919
  return (i?.current ?? []).forEach((T, w) => {
@@ -5928,13 +5938,13 @@ function Il(t, e, n, r, s, i) {
5928
5938
  function R() {
5929
5939
  M();
5930
5940
  const v = t.current;
5931
- v && (h.current = v.currentTime, y.current = setTimeout(T, Al));
5941
+ v && (h.current = v.currentTime, y.current = setTimeout(T, Nl));
5932
5942
  }
5933
5943
  function T() {
5934
5944
  y.current = null;
5935
5945
  const v = t.current;
5936
5946
  if (!v) return;
5937
- const C = x.getState(), D = n.current, B = Tl({
5947
+ const C = x.getState(), D = n.current, B = Cl({
5938
5948
  roomPlaying: C.snapshot.playing,
5939
5949
  videoPaused: v.paused,
5940
5950
  seekInFlight: !!D?.seekInFlight,
@@ -6094,8 +6104,8 @@ function Il(t, e, n, r, s, i) {
6094
6104
  };
6095
6105
  }, [r, t, e, n]);
6096
6106
  }
6097
- const Cl = 1.5;
6098
- function Nl(t, e, n, r, s, i) {
6107
+ const Ll = 1.5;
6108
+ function Fl(t, e, n, r, s, i) {
6099
6109
  const a = P(null), o = P(null), f = H(() => {
6100
6110
  a.current && (clearInterval(a.current), a.current = null), o.current?.(), o.current = null;
6101
6111
  }, []);
@@ -6124,7 +6134,7 @@ function Nl(t, e, n, r, s, i) {
6124
6134
  };
6125
6135
  a.current = setInterval(b, jn);
6126
6136
  const y = () => {
6127
- performance.now() - g >= jn * Cl && b();
6137
+ performance.now() - g >= jn * Ll && b();
6128
6138
  };
6129
6139
  if (c && (c.addEventListener("timeupdate", y), o.current = () => c.removeEventListener("timeupdate", y)), c && !n.current?.seekInFlight) {
6130
6140
  g = performance.now();
@@ -6134,7 +6144,7 @@ function Nl(t, e, n, r, s, i) {
6134
6144
  return f;
6135
6145
  }, [r, s, t, e, n, i, f]), { stopPrefetch: f };
6136
6146
  }
6137
- function Rl(t, e, n, r, s, i) {
6147
+ function $l(t, e, n, r, s, i) {
6138
6148
  const a = x((u) => u.snapshot), o = x((u) => u.loadGeneration), f = P(o), c = ue((u) => s(u)), d = ue((u) => i(u));
6139
6149
  F(() => {
6140
6150
  const u = t.current;
@@ -6166,7 +6176,7 @@ function ur(t, e) {
6166
6176
  }, { once: !0 });
6167
6177
  });
6168
6178
  }
6169
- function Ll(t) {
6179
+ function Pl(t) {
6170
6180
  const e = x((a) => a.playlist), n = x((a) => a.activePlaylistIndex), r = x((a) => a.snapshot.mediaId), s = e?.id, i = ue(() => e);
6171
6181
  F(() => {
6172
6182
  const a = i();
@@ -6265,11 +6275,11 @@ function Ll(t) {
6265
6275
  }, [s, n, r, t]);
6266
6276
  }
6267
6277
  const Le = "bg-play";
6268
- function Fl() {
6278
+ function Dl() {
6269
6279
  const t = x.getState();
6270
6280
  return !!t.snapshot.leaderId && t.snapshot.leaderId === t.me.clientId;
6271
6281
  }
6272
- function $l(t) {
6282
+ function Bl(t) {
6273
6283
  return typeof Image > "u" ? Promise.resolve(null) : t.reduce(
6274
6284
  (e, n) => e.then((r) => r ?? new Promise((s) => {
6275
6285
  const i = new Image();
@@ -6278,18 +6288,18 @@ function $l(t) {
6278
6288
  Promise.resolve(null)
6279
6289
  );
6280
6290
  }
6281
- function Pl(t, e, n, r, s, i) {
6291
+ function Ol(t, e, n, r, s, i) {
6282
6292
  const a = P(!1), o = P(0), f = ue((d) => i(d)), c = ue((d) => {
6283
6293
  const u = t.current, g = e.current;
6284
6294
  if (!u || !s) return;
6285
- const b = x.getState(), y = u.currentTime * 1e3, h = Yf(b.snapshot, b.snapshotReceivedAt, Date.now()), m = Qf({
6295
+ const b = x.getState(), y = u.currentTime * 1e3, h = el(b.snapshot, b.snapshotReceivedAt, Date.now()), m = Zf({
6286
6296
  roomPlaying: b.snapshot.playing,
6287
6297
  seekInFlight: !!g?.seekInFlight,
6288
6298
  elementPaused: u.paused,
6289
6299
  elementMs: y,
6290
6300
  roomMs: h,
6291
6301
  durationMs: r,
6292
- driftToleranceMs: Jf
6302
+ driftToleranceMs: Xf
6293
6303
  }), p = Math.round(h - y);
6294
6304
  if (m.kind === "none") {
6295
6305
  _(Le, "resync not needed", { reason: d, driftMs: p });
@@ -6302,7 +6312,7 @@ function Pl(t, e, n, r, s, i) {
6302
6312
  if (!d || !s) return;
6303
6313
  const u = () => {
6304
6314
  const b = x.getState();
6305
- qf({
6315
+ Qf({
6306
6316
  hidden: document.visibilityState === "hidden",
6307
6317
  roomPlaying: b.snapshot.playing,
6308
6318
  seekInFlight: !!e.current?.seekInFlight,
@@ -6328,9 +6338,9 @@ function Pl(t, e, n, r, s, i) {
6328
6338
  artwork: T ? [{ src: T }] : []
6329
6339
  }));
6330
6340
  };
6331
- y(null), $l(Xf(n).map(Fs)).then(y);
6341
+ y(null), Bl(tl(n).map(Fs)).then(y);
6332
6342
  const h = (T) => () => {
6333
- const w = x.getState(), S = Vf(T, { isLeader: Fl(), roomPlaying: w.snapshot.playing });
6343
+ const w = x.getState(), S = Yf(T, { isLeader: Dl(), roomPlaying: w.snapshot.playing });
6334
6344
  switch (_(Le, "media session press", { action: T, result: S.kind }), T === "pause" && (o.current = Date.now()), S.kind) {
6335
6345
  case "control":
6336
6346
  Pe(S.control), S.control === "pause" && d.pause();
@@ -6404,11 +6414,11 @@ function Pl(t, e, n, r, s, i) {
6404
6414
  }, [t]);
6405
6415
  }
6406
6416
  const St = 5e3, hr = ".ctr-bar-wrapper";
6407
- function Dl(t, e, n, r) {
6417
+ function jl(t, e, n, r) {
6408
6418
  const s = ue((a) => {
6409
6419
  const o = t.current;
6410
6420
  if (!o) return;
6411
- const f = o.querySelector(hr), c = document.activeElement, d = Dr(c) ? "text" : f && c && f.contains(c) ? "bar" : !c || c === document.body || c === o ? "idle" : "elsewhere", u = li({
6421
+ const f = o.querySelector(hr), c = document.activeElement, d = Dr(c) ? "text" : f && c && f.contains(c) ? "bar" : !c || c === document.body || c === o ? "idle" : "elsewhere", u = ui({
6412
6422
  key: a.key,
6413
6423
  back: We(a),
6414
6424
  modifier: a.ctrlKey || a.metaKey || a.altKey,
@@ -6459,19 +6469,19 @@ function Dl(t, e, n, r) {
6459
6469
  }, [t]);
6460
6470
  }
6461
6471
  function mr(t, e, n) {
6462
- const r = n instanceof HTMLInputElement && n.type !== "range" ? n : null, s = r ? { atStart: (r.selectionEnd ?? 0) === 0, atEnd: (r.selectionStart ?? 0) === r.value.length } : void 0, i = ci(t.key, Fr(n), n.hasAttribute(dt), s);
6472
+ const r = n instanceof HTMLInputElement && n.type !== "range" ? n : null, s = r ? { atStart: (r.selectionEnd ?? 0) === 0, atEnd: (r.selectionStart ?? 0) === r.value.length } : void 0, i = hi(t.key, Fr(n), n.hasAttribute(dt), s);
6463
6473
  if (i === null) return;
6464
6474
  t.preventDefault();
6465
6475
  const a = $r(e), o = a.indexOf(n);
6466
6476
  a[Math.min(a.length - 1, Math.max(0, o + i))]?.focus({ preventScroll: !1 });
6467
6477
  }
6468
- const Bl = 3e5, Ol = 1, jl = 1;
6478
+ const Hl = 3e5, Ul = 1, Wl = 1;
6469
6479
  function cn(t) {
6470
6480
  ee("buffer", "initializePlayback threw", X(t));
6471
6481
  }
6472
- function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6473
- const r = P(null), s = P(null), [i, a] = $(!1), [o, f] = $(!1), { controlsVisible: c, showControls: d, hideControls: u, setControlsHeld: g } = kl();
6474
- Dl(s, c, d, u), F(() => {
6482
+ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6483
+ const r = P(null), s = P(null), [i, a] = $(!1), [o, f] = $(!1), { controlsVisible: c, showControls: d, hideControls: u, setControlsHeld: g } = El();
6484
+ jl(s, c, d, u), F(() => {
6475
6485
  const A = () => f(!!document.fullscreenElement);
6476
6486
  return document.addEventListener("fullscreenchange", A), () => document.removeEventListener("fullscreenchange", A);
6477
6487
  }, []);
@@ -6482,7 +6492,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6482
6492
  initSegment: m,
6483
6493
  audioTracks: p,
6484
6494
  contentToken: M
6485
- } = El(e), R = H((A) => {
6495
+ } = Tl(e), R = H((A) => {
6486
6496
  if (!M) return null;
6487
6497
  const j = t.replace(new RegExp(`/${$t.replace(/\./g, "\\.")}$`), "");
6488
6498
  return j === t ? null : { baseUrl: j, token: M, trackId: A };
@@ -6502,7 +6512,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6502
6512
  setSelectedAudioIndex: pt,
6503
6513
  selectedSubtitleIndex: bt,
6504
6514
  setSelectedSubtitleIndex: Gt
6505
- } = Ml(n), rt = x((A) => A.mediaPrefs), Ge = x((A) => A.mutedForAutoplay), Rt = x((A) => A.setMutedForAutoplay), Lt = x((A) => A.setSubtitlesEnabled), Kt = x((A) => A.setSubtitleStyle), W = x((A) => A.setPreferredAudioLang), se = rt.subtitlesEnabled, Ee = rt.subtitleStyle, at = xe[_e]?.lang, Na = pe.some((A) => A.lang === "eng"), [Ra, Cn] = $(null), yt = dl({
6515
+ } = Al(n), rt = x((A) => A.mediaPrefs), Ge = x((A) => A.mutedForAutoplay), Rt = x((A) => A.setMutedForAutoplay), Lt = x((A) => A.setSubtitlesEnabled), Kt = x((A) => A.setSubtitleStyle), W = x((A) => A.setPreferredAudioLang), se = rt.subtitlesEnabled, Ee = rt.subtitleStyle, at = xe[_e]?.lang, Na = pe.some((A) => A.lang === "eng"), [Ra, Cn] = $(null), yt = ml({
6506
6516
  override: Ra,
6507
6517
  globalEnabled: se,
6508
6518
  selectedAudioLang: at,
@@ -6532,7 +6542,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6532
6542
  const wt = H((A) => {
6533
6543
  nt({ isBuffering: A });
6534
6544
  }, [nt]), Ln = H((A) => {
6535
- if (V.current >= jl) {
6545
+ if (V.current >= Wl) {
6536
6546
  yn("phantom-recreate-exhausted", { reason: A, recreates: V.current, mediaId: n });
6537
6547
  return;
6538
6548
  }
@@ -6566,7 +6576,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6566
6576
  aheadMs: Math.round(A.getBufferedAheadMs(G)),
6567
6577
  targetMs: $e
6568
6578
  }), A.isDisposed) return;
6569
- if (A.getBufferedAheadMs(G) > Bl && A.getLoadedCount() === 0) {
6579
+ if (A.getBufferedAheadMs(G) > Hl && A.getLoadedCount() === 0) {
6570
6580
  A.dumpBufferDiagnostics(G, "phantom-detected"), N("buffer", "PHANTOM-BUFFER detected at gate — recreating MediaSource", {
6571
6581
  gateAheadMs: Math.round(A.getBufferedAheadMs(G)),
6572
6582
  loaded: A.getLoadedCount(),
@@ -6592,7 +6602,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6592
6602
  }
6593
6603
  j.currentTime = Y / 1e3, await Aa(j, 3e3);
6594
6604
  }
6595
- tt.current = Y, a(!0), C.current = !0, U.current = 0, lr() && N("buffer", "RECOVERY-SUCCESS — playback initialized after an auto-reload", { mediaId: n }), hl(), _("buffer", "initializePlayback complete", {
6605
+ tt.current = Y, a(!0), C.current = !0, U.current = 0, lr() && N("buffer", "RECOVERY-SUCCESS — playback initialized after an auto-reload", { mediaId: n }), pl(), _("buffer", "initializePlayback complete", {
6596
6606
  mediaId: n,
6597
6607
  startMs: G,
6598
6608
  seekMs: Y,
@@ -6657,7 +6667,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6657
6667
  return;
6658
6668
  }
6659
6669
  const re = ne.includes("SourceBuffer is full"), J = ne.includes("init segment failed");
6660
- U.current += 1, re || J || U.current > Ol ? (ee("buffer", "Initialize playback failed — recreating MediaSource", {
6670
+ U.current += 1, re || J || U.current > Ul ? (ee("buffer", "Initialize playback failed — recreating MediaSource", {
6661
6671
  error: ne,
6662
6672
  mediaId: n,
6663
6673
  attempt: U.current,
@@ -6705,12 +6715,12 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6705
6715
  O.current = Te;
6706
6716
  const Ke = ++ze.current;
6707
6717
  window.__FRAGMENT_MANAGER__ = Te, window.__AUDIO_FRAGMENT_MANAGERS__ = I.current;
6708
- const Ce = new pl({
6718
+ const Ce = new wl({
6709
6719
  videoRef: r,
6710
6720
  fragmentManagerRef: O,
6711
6721
  audioFragmentManagersRef: I
6712
6722
  });
6713
- Se.current = Ce, window.__SEEK_COORDINATOR__ = Ce, bl();
6723
+ Se.current = Ce, window.__SEEK_COORDINATOR__ = Ce, vl();
6714
6724
  const Y = r.current, qe = () => {
6715
6725
  const z = Y?.error;
6716
6726
  z && (ee("video", `Media error code=${z.code}: ${z.message}`, {
@@ -6776,7 +6786,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6776
6786
  }
6777
6787
  };
6778
6788
  return Y && (J.addEventListener("sourceopen", Ne, { once: !0 }), re = URL.createObjectURL(J), Y.src = re, Y.addEventListener("error", qe)), () => {
6779
- Y?.pause(), Y && Y.removeEventListener("error", qe), J.removeEventListener("sourceopen", Ne), yl(), Ce.dispose(), Se.current = null, Te.dispose(), O.current = null, window.__FRAGMENT_MANAGER__ = null, window.__AUDIO_FRAGMENT_MANAGERS__ = null;
6789
+ Y?.pause(), Y && Y.removeEventListener("error", qe), J.removeEventListener("sourceopen", Ne), kl(), Ce.dispose(), Se.current = null, Te.dispose(), O.current = null, window.__FRAGMENT_MANAGER__ = null, window.__AUDIO_FRAGMENT_MANAGERS__ = null;
6780
6790
  for (const z of I.current) z.dispose();
6781
6791
  if (I.current = [], J.readyState === "open") {
6782
6792
  for (const z of [D.current, ...K.current])
@@ -6893,9 +6903,9 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6893
6903
  ke.current = !1;
6894
6904
  }
6895
6905
  })().catch((ne) => ee("audio", "MSE audio swap failed", X(ne)));
6896
- }, [w, i, _e, p, n, t, wt, R]), Rl(Se, r, tt, i, Ft, Nn), Il(r, O, Se, i, Nn, I), Pl(r, Se, n, y ?? 0, i, Ft);
6897
- const { stopPrefetch: Fn } = Nl(r, O, Se, i, nt, I);
6898
- Ll(O), F(() => {
6906
+ }, [w, i, _e, p, n, t, wt, R]), $l(Se, r, tt, i, Ft, Nn), Rl(r, O, Se, i, Nn, I), Ol(r, Se, n, y ?? 0, i, Ft);
6907
+ const { stopPrefetch: Fn } = Fl(r, O, Se, i, nt, I);
6908
+ Pl(O), F(() => {
6899
6909
  Ct.current = Fn;
6900
6910
  }, [Fn]);
6901
6911
  const Oa = H(() => {
@@ -6926,7 +6936,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6926
6936
  }
6927
6937
  ),
6928
6938
  /* @__PURE__ */ l(
6929
- Hf,
6939
+ zf,
6930
6940
  {
6931
6941
  subtitleUrl: Ha,
6932
6942
  videoRef: r,
@@ -6934,9 +6944,9 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6934
6944
  enabled: yt
6935
6945
  }
6936
6946
  ),
6937
- /* @__PURE__ */ l(Zf, { mediaId: n, visible: c }),
6947
+ /* @__PURE__ */ l(nl, { mediaId: n, visible: c }),
6938
6948
  /* @__PURE__ */ l(
6939
- Gf,
6949
+ Vf,
6940
6950
  {
6941
6951
  videoRef: r,
6942
6952
  mediaId: n,
@@ -6984,14 +6994,14 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6984
6994
  }
6985
6995
  );
6986
6996
  }
6987
- function Ul() {
6997
+ function Gl() {
6988
6998
  const t = x((n) => n.snapshot.mediaId), e = ye(() => t ? { mediaId: t, ...Rr(t) } : null, [t]);
6989
- return e ? /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(Hl, { mediaUrl: e.mediaUrl, indexUrl: e.indexUrl, mediaId: e.mediaId }) }) : /* @__PURE__ */ l(js, {});
6999
+ return e ? /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(zl, { mediaUrl: e.mediaUrl, indexUrl: e.indexUrl, mediaId: e.mediaId }) }) : /* @__PURE__ */ l(js, {});
6990
7000
  }
6991
- const Wl = (t) => {
7001
+ const Kl = (t) => {
6992
7002
  const e = Qs(t);
6993
7003
  return e.render(
6994
- /* @__PURE__ */ l(Bs.Provider, { value: Os(), children: /* @__PURE__ */ l(Ul, {}) })
7004
+ /* @__PURE__ */ l(Bs.Provider, { value: Os(), children: /* @__PURE__ */ l(Gl, {}) })
6995
7005
  ), {
6996
7006
  update() {
6997
7007
  },
@@ -7002,21 +7012,21 @@ const Wl = (t) => {
7002
7012
  queueMicrotask(() => e.unmount());
7003
7013
  }
7004
7014
  };
7005
- }, zl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7015
+ }, ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7006
7016
  __proto__: null,
7007
- mount: Wl
7008
- }, Symbol.toStringTag, { value: "Module" })), Gl = {
7017
+ mount: Kl
7018
+ }, Symbol.toStringTag, { value: "Module" })), Vl = {
7009
7019
  id: "player",
7010
7020
  name: "Media player",
7011
- load: () => Promise.resolve(zl)
7012
- }, Kl = vn(() => import("./MediaDrawer-DhGwMKkY.js"));
7013
- function ql() {
7021
+ load: () => Promise.resolve(ql)
7022
+ }, Jl = vn(() => import("./MediaDrawer-BUvcV9QZ.js"));
7023
+ function Ql() {
7014
7024
  const t = x((d) => d.snapshot), e = x((d) => d.ensureAutoIdentity), n = zt(), r = ye(
7015
- () => n ? vi(n, window.location.origin) : null,
7025
+ () => n ? xi(n, window.location.origin) : null,
7016
7026
  [n]
7017
7027
  ), s = Hs(), i = P(!1), [a, o] = $(!1), f = s.roomKey || null;
7018
- cf(), F(() => df(), []), F(() => mf(), []), F(() => {
7019
- f && yf(f);
7028
+ hf(), F(() => mf(), []), F(() => bf(), []), F(() => {
7029
+ f && kf(f);
7020
7030
  }, [f]), F(() => {
7021
7031
  const d = () => o(!0);
7022
7032
  return window.addEventListener(hn, d), () => window.removeEventListener(hn, d);
@@ -7055,52 +7065,53 @@ function ql() {
7055
7065
  }
7056
7066
  return f ? /* @__PURE__ */ E("div", { className: "relative flex-1 flex overflow-hidden min-h-0", children: [
7057
7067
  /* @__PURE__ */ E("div", { className: "flex-1 relative bg-black overflow-hidden min-w-0", children: [
7058
- /* @__PURE__ */ l(Gn, { activity: Gl, roomKey: t.roomId ?? "", layer: "base" }),
7068
+ /* @__PURE__ */ l(Gn, { activity: Vl, roomKey: t.roomId ?? "", layer: "base" }),
7059
7069
  r && t.roomId && /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(Gn, { activity: r, roomKey: t.roomId, layer: "overlay" }, r.id) }),
7060
- /* @__PURE__ */ E(nf, { children: [
7061
- /* @__PURE__ */ l(Vl, {}),
7062
- /* @__PURE__ */ l(Xo, {}),
7063
- /* @__PURE__ */ l(af, {}),
7064
- /* @__PURE__ */ l(tf, {})
7070
+ /* @__PURE__ */ E(sf, { children: [
7071
+ /* @__PURE__ */ l(Yl, {}),
7072
+ /* @__PURE__ */ l(tf, {}),
7073
+ /* @__PURE__ */ l(ff, {}),
7074
+ /* @__PURE__ */ l(af, {})
7065
7075
  ] })
7066
7076
  ] }),
7067
- /* @__PURE__ */ l(Po, {}),
7068
- /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l(jo, { open: a, onClose: c }), children: /* @__PURE__ */ l(Kl, { open: a, onClose: c }) })
7077
+ /* @__PURE__ */ l(Oo, {}),
7078
+ /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l(Wo, { open: a, onClose: c }), children: /* @__PURE__ */ l(Jl, { open: a, onClose: c }) })
7069
7079
  ] }) : (N("room", "No room key provided"), /* @__PURE__ */ l("div", { className: "flex-1 flex items-center justify-center p-6", children: /* @__PURE__ */ E("div", { className: "text-text-secondary", children: [
7070
7080
  "No room key provided. Go to the ",
7071
7081
  /* @__PURE__ */ l("a", { href: "/", className: "underline", children: "home page" }),
7072
7082
  " to select a room."
7073
7083
  ] }) }));
7074
7084
  }
7075
- function Vl() {
7085
+ function Yl() {
7076
7086
  const t = x((s) => s.floatingChatEnabled), e = x((s) => s.chatCollapsed), n = x((s) => !!s.snapshot.mediaId), r = It();
7077
7087
  return /* @__PURE__ */ l(
7078
- Wo,
7088
+ Ko,
7079
7089
  {
7080
- shown: Si(t, { hasMedia: n, chatCollapsed: e, isFullscreen: r }),
7090
+ shown: Mi(t, { hasMedia: n, chatCollapsed: e, isFullscreen: r }),
7081
7091
  className: "absolute right-4 bottom-[35%] w-80 z-20"
7082
7092
  }
7083
7093
  );
7084
7094
  }
7085
- const oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7095
+ const cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7086
7096
  __proto__: null,
7087
- default: ql
7097
+ default: Ql
7088
7098
  }, Symbol.toStringTag, { value: "Module" }));
7089
7099
  export {
7090
- sc as B,
7091
- Xi as C,
7092
- Oo as D,
7093
- eo as E,
7094
- oc as R,
7095
- nc as S,
7096
- Bo as a,
7097
- rc as b,
7098
- wf as c,
7099
- ac as d,
7100
+ fc as B,
7101
+ to as C,
7102
+ Uo as D,
7103
+ ro as E,
7104
+ Vi as P,
7105
+ cc as R,
7106
+ sc as S,
7107
+ Ho as a,
7108
+ ic as b,
7109
+ Sf as c,
7110
+ oc as d,
7100
7111
  et as e,
7101
7112
  We as i,
7102
7113
  zr as p,
7103
- ic as s,
7114
+ lc as s,
7104
7115
  _n as u
7105
7116
  };
7106
- //# sourceMappingURL=Room-BYlcg8RE.js.map
7117
+ //# sourceMappingURL=Room-HSQO8Lrm.js.map