@wyxos/vibe 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -3,10 +3,10 @@ import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i,
3
3
  var z = (e) => {
4
4
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
5
5
  return !1;
6
- }, B = (e) => e === "", V = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), H = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), U = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), W = (e) => {
7
- let t = U(e);
6
+ }, B = (e) => e === "", V = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), H = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ee = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), U = (e) => {
7
+ let t = ee(e);
8
8
  return t.charAt(0).toUpperCase() + t.slice(1);
9
- }, G = {
9
+ }, W = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: 24,
12
12
  height: 24,
@@ -16,27 +16,27 @@ var z = (e) => {
16
16
  "stroke-width": 2,
17
17
  "stroke-linecap": "round",
18
18
  "stroke-linejoin": "round"
19
- }, K = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => p("svg", {
20
- ...G,
19
+ }, G = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = W.width, color: s = W.stroke, ...c }, { slots: l }) => p("svg", {
20
+ ...W,
21
21
  ...c,
22
22
  width: o,
23
23
  height: o,
24
24
  stroke: s,
25
- "stroke-width": B(n) || B(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
26
- class: V("lucide", c.class, ...e ? [`lucide-${H(W(e))}-icon`, `lucide-${H(e)}`] : ["lucide-icon"]),
25
+ "stroke-width": B(n) || B(r) || n === !0 || r === !0 ? Number(i || a || W["stroke-width"]) * 24 / Number(o) : i || a || W["stroke-width"],
26
+ class: V("lucide", c.class, ...e ? [`lucide-${H(U(e))}-icon`, `lucide-${H(e)}`] : ["lucide-icon"]),
27
27
  ...!l.default && !z(c) && { "aria-hidden": "true" }
28
- }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), q = (e, t) => (n, { slots: r, attrs: i }) => p(K, {
28
+ }, [...t.map((e) => p(...e)), ...l.default ? [l.default()] : []]), K = (e, t) => (n, { slots: r, attrs: i }) => p(G, {
29
29
  ...i,
30
30
  ...n,
31
31
  iconNode: t,
32
32
  name: e
33
- }, r), J = q("arrow-left", [["path", {
33
+ }, r), q = K("arrow-left", [["path", {
34
34
  d: "m12 19-7-7 7-7",
35
35
  key: "1l729n"
36
36
  }], ["path", {
37
37
  d: "M19 12H5",
38
38
  key: "x3x0zl"
39
- }]]), Y = q("audio-lines", [
39
+ }]]), J = K("audio-lines", [
40
40
  ["path", {
41
41
  d: "M2 10v3",
42
42
  key: "1fnikh"
@@ -61,7 +61,7 @@ var z = (e) => {
61
61
  d: "M22 10v3",
62
62
  key: "154ddg"
63
63
  }]
64
- ]), ee = q("clapperboard", [
64
+ ]), te = K("clapperboard", [
65
65
  ["path", {
66
66
  d: "m12.296 3.464 3.02 3.956",
67
67
  key: "qash78"
@@ -78,13 +78,13 @@ var z = (e) => {
78
78
  d: "m6.18 5.276 3.1 3.899",
79
79
  key: "zjj9t3"
80
80
  }]
81
- ]), te = q("file", [["path", {
81
+ ]), Y = K("file", [["path", {
82
82
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
83
83
  key: "1oefj6"
84
84
  }], ["path", {
85
85
  d: "M14 2v5a1 1 0 0 0 1 1h5",
86
86
  key: "wfsgrz"
87
- }]]), ne = q("image-plus", [
87
+ }]]), ne = K("image-plus", [
88
88
  ["path", {
89
89
  d: "M16 5h6",
90
90
  key: "1vod17"
@@ -107,10 +107,10 @@ var z = (e) => {
107
107
  r: "2",
108
108
  key: "af1f0g"
109
109
  }]
110
- ]), re = q("loader-circle", [["path", {
110
+ ]), re = K("loader-circle", [["path", {
111
111
  d: "M21 12a9 9 0 1 1-6.219-8.56",
112
112
  key: "13zald"
113
- }]]), ie = q("pause", [["rect", {
113
+ }]]), ie = K("pause", [["rect", {
114
114
  x: "14",
115
115
  y: "3",
116
116
  width: "5",
@@ -124,10 +124,10 @@ var z = (e) => {
124
124
  height: "18",
125
125
  rx: "1",
126
126
  key: "1wsw3u"
127
- }]]), ae = q("play", [["path", {
127
+ }]]), ae = K("play", [["path", {
128
128
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
129
129
  key: "10ikf1"
130
- }]]), oe = q("triangle-alert", [
130
+ }]]), oe = K("triangle-alert", [
131
131
  ["path", {
132
132
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
133
133
  key: "wmoenq"
@@ -407,7 +407,7 @@ function Le(e) {
407
407
  }
408
408
  n.value > e - 1 && (n.value = e - 1);
409
409
  }), P(() => n.value, () => {
410
- f.value && te();
410
+ f.value && Y();
411
411
  }), x(() => {
412
412
  e.resolve && (Z() || z());
413
413
  }), b(() => {
@@ -444,36 +444,36 @@ function Le(e) {
444
444
  await z();
445
445
  }
446
446
  }
447
- async function U() {
447
+ async function ee() {
448
448
  if (R.value) return H();
449
449
  o.value !== "failed" || !h || (a.value = null, await h());
450
450
  }
451
- async function W() {
451
+ async function U() {
452
452
  if (!r.value.length) return d.value = !1, X();
453
453
  t.value = [...t.value, ...r.value], r.value = [], d.value = !1, X();
454
454
  }
455
- function G(t) {
455
+ function W(t) {
456
456
  let r = E.value;
457
457
  if (!r.length) return;
458
458
  let i = we(t, 0, r.length - 1);
459
459
  i !== n.value && (n.value = i, e.emit("update:activeIndex", i));
460
460
  }
461
- function K(e) {
461
+ function G(e) {
462
462
  f.value = e;
463
463
  }
464
- function q() {
464
+ function K() {
465
465
  g += 1, m?.abort(), m = null, c.clear(!0), p.clear(), a.value = null, s.value = null, u.value = null, r.value.length > 0 && (t.value = [...t.value, ...r.value], r.value = []), d.value = !1, X();
466
466
  }
467
- function J() {
467
+ function q() {
468
468
  return ke(E.value, D.value);
469
469
  }
470
- function Y(e = null) {
470
+ function J(e = null) {
471
471
  n.value = Ae(E.value, D.value, e);
472
472
  }
473
- function ee() {
474
- r.value.length > 0 && !I.value.length && W();
473
+ function te() {
474
+ r.value.length > 0 && !I.value.length && U();
475
475
  }
476
- async function te() {
476
+ async function Y() {
477
477
  !E.value.length || se() || (F.value && n.value < 3 && await V(), N.value && n.value >= E.value.length - 3 && await B());
478
478
  }
479
479
  async function ne(e) {
@@ -503,8 +503,8 @@ function Le(e) {
503
503
  phase: "loading"
504
504
  });
505
505
  if (!n) return;
506
- let r = J();
507
- t.value = [...n.buckets, ...t.value], Y(r), X();
506
+ let r = q();
507
+ t.value = [...n.buckets, ...t.value], J(r), X();
508
508
  }
509
509
  async function ie(n) {
510
510
  if (h = async () => {
@@ -530,8 +530,8 @@ function Le(e) {
530
530
  nextItems: n.items,
531
531
  previousCursor: n.previousPage ?? null,
532
532
  previousItems: r.items
533
- }), a = J();
534
- t.value = ye(t.value, r.cursor, i), Y(a), X();
533
+ }), a = q();
534
+ t.value = ye(t.value, r.cursor, i), J(a), X();
535
535
  } catch (e) {
536
536
  if (Te(e) || c !== g) {
537
537
  X();
@@ -617,8 +617,8 @@ function Le(e) {
617
617
  return {
618
618
  activeIndex: D,
619
619
  canRetryInitialLoad: R,
620
- cancel: q,
621
- commitPendingAppend: W,
620
+ cancel: K,
621
+ commitPendingAppend: U,
622
622
  currentCursor: L,
623
623
  errorMessage: a,
624
624
  fillCollectedCount: s,
@@ -636,12 +636,12 @@ function Le(e) {
636
636
  prefetchPreviousPage: V,
637
637
  previousCursor: M,
638
638
  retryInitialLoad: H,
639
- retry: U,
640
- setActiveIndex: G,
641
- setAutoPrefetchEnabled: K,
642
- syncActiveIndexAfterVisibilityChange: Y,
643
- getActiveOccurrenceKey: J,
644
- maybeCommitPendingAppendWhenFilteredOut: ee
639
+ retry: ee,
640
+ setActiveIndex: W,
641
+ setAutoPrefetchEnabled: G,
642
+ syncActiveIndexAfterVisibilityChange: J,
643
+ getActiveOccurrenceKey: q,
644
+ maybeCommitPendingAppendWhenFilteredOut: te
645
645
  };
646
646
  }
647
647
  //#endregion
@@ -912,7 +912,7 @@ var Ve = {
912
912
  class: "pointer-events-auto inline-flex h-11 w-11 shrink-0 items-center justify-center border border-white/14 bg-black/40 text-[#f7f1ea]/78 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/55",
913
913
  "aria-label": "Back to list",
914
914
  onClick: t[0] ||= (e) => r("back-to-list")
915
- }, [u(j(J), {
915
+ }, [u(j(q), {
916
916
  class: "h-4 w-4 stroke-[2.2]",
917
917
  "aria-hidden": "true"
918
918
  })])) : o("", !0), n.title ? (S(), s("h2", Qe, k(n.title), 1)) : o("", !0)]), c("div", $e, [c("span", et, [c("span", tt, k(n.currentIndex + 1) + " / " + k(n.total), 1), n.paginationDetail ? (S(), s("span", nt, k(n.paginationDetail), 1)) : o("", !0)]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", rt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
@@ -1008,68 +1008,72 @@ function vt(e) {
1008
1008
  //#endregion
1009
1009
  //#region src/components/viewer-core/useMedia.ts
1010
1010
  function yt(e) {
1011
- let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = i(() => e.activeItem.value ? $(e.activeItem.value) : null), u = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), d = i(() => u.value ? r.value[u.value] ?? st : st), f = i(() => u.value ? d.value.duration : 0), p = i(() => f.value <= 0 ? 0 : bt(d.value.currentTime / f.value * 100, 0, 100)), m = i(() => l.value ? M(l.value) : null);
1011
+ let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = i(() => e.activeItem.value ? $(e.activeItem.value) : null), u = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), d = i(() => {
1012
+ let t = /* @__PURE__ */ new Map();
1013
+ for (let n of e.items.value) t.set($(n), n);
1014
+ return t;
1015
+ }), f = i(() => u.value ? r.value[u.value] ?? st : st), p = i(() => u.value ? f.value.duration : 0), m = i(() => p.value <= 0 ? 0 : bt(f.value.currentTime / p.value * 100, 0, 100)), h = i(() => l.value ? N(l.value) : null);
1012
1016
  P(() => l.value, async () => {
1013
- await b();
1017
+ await x();
1014
1018
  }), P(() => e.itemCount.value, async () => {
1015
- await b();
1019
+ await x();
1016
1020
  });
1017
- function h(e, t) {
1021
+ function _(e, t) {
1018
1022
  if (t instanceof HTMLVideoElement) {
1019
- o.set(e, t), V(e, t);
1023
+ o.set(e, t), H(e, t);
1020
1024
  return;
1021
1025
  }
1022
1026
  o.delete(e);
1023
1027
  }
1024
- function _(e, t) {
1028
+ function v(e, t) {
1025
1029
  if (t instanceof HTMLAudioElement) {
1026
- s.set(e, t), V(e, t);
1030
+ s.set(e, t), H(e, t);
1027
1031
  return;
1028
1032
  }
1029
1033
  s.delete(e);
1030
1034
  }
1031
- function v(e, r) {
1032
- r instanceof HTMLImageElement && lt(r) && (t.value[e] = !0, n.value[e] = null, K(e, r.currentSrc || r.src || q()));
1035
+ function y(e, r) {
1036
+ r instanceof HTMLImageElement && lt(r) && (t.value[e] = !0, n.value[e] = null, K(e, r.currentSrc || r.src || J(e)));
1033
1037
  }
1034
- function y() {
1035
- z(), a.value = {}, n.value = {}, t.value = {}, r.value = {}, c.clear();
1038
+ function b() {
1039
+ B(), a.value = {}, n.value = {}, t.value = {}, r.value = {}, c.clear();
1036
1040
  }
1037
- async function b() {
1041
+ async function x() {
1038
1042
  if (!e.isEnabled.value) {
1039
- z();
1043
+ B();
1040
1044
  return;
1041
1045
  }
1042
1046
  await g();
1043
1047
  let t = l.value;
1044
1048
  for (let [e, n] of o.entries()) {
1045
1049
  if (e !== t || r.value[e]?.errorKind) {
1046
- R(n, e);
1050
+ z(n, e);
1047
1051
  continue;
1048
1052
  }
1049
- n.muted = !0, n.loop = !1, n.playsInline = !0, vt(n), V(e, n);
1053
+ n.muted = !0, n.loop = !1, n.playsInline = !0, vt(n), H(e, n);
1050
1054
  }
1051
1055
  for (let [e, n] of s.entries()) {
1052
1056
  if (e !== t || r.value[e]?.errorKind) {
1053
- R(n, e);
1057
+ z(n, e);
1054
1058
  continue;
1055
1059
  }
1056
- vt(n), V(e, n);
1060
+ vt(n), H(e, n);
1057
1061
  }
1058
1062
  }
1059
- function x(e, t) {
1063
+ function S(e, t) {
1060
1064
  let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
1061
1065
  if (n) {
1062
1066
  let i = r.value[e]?.ready ?? !1;
1063
- V(e, n, t.type);
1067
+ H(e, n, t.type);
1064
1068
  let a = r.value[e]?.ready ?? !1;
1065
- !i && a && K(e, n.currentSrc || n.src || J());
1069
+ !i && a && K(e, n.currentSrc || n.src || J(e));
1066
1070
  }
1067
1071
  }
1068
- function S(e, r) {
1072
+ function C(e, r) {
1069
1073
  t.value[e] = !0, n.value[e] = null, K(e, r);
1070
1074
  }
1071
- async function C(r, i) {
1072
- let a = e.activeItem.value;
1075
+ async function w(r, i) {
1076
+ let a = q(r) ?? e.activeItem.value;
1073
1077
  t.value[r] = !1, n.value[r] = "generic";
1074
1078
  let o = await ht(i);
1075
1079
  n.value[r] = o, a && e.onAssetError?.({
@@ -1080,8 +1084,8 @@ function yt(e) {
1080
1084
  surface: "fullscreen"
1081
1085
  });
1082
1086
  }
1083
- async function w(t, n) {
1084
- let r = U(t), i = B(t), a = e.activeMediaItem.value ?? e.activeItem.value;
1087
+ async function E(t, n) {
1088
+ let r = U(t), i = V(t), a = q(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1085
1089
  if (r) {
1086
1090
  r.pause();
1087
1091
  try {
@@ -1098,71 +1102,71 @@ function yt(e) {
1098
1102
  surface: "fullscreen"
1099
1103
  });
1100
1104
  }
1101
- function E(e, t, n) {
1105
+ function D(e, t, n) {
1102
1106
  e.button !== 0 || Date.now() < n || G(o.get(t) ?? null);
1103
1107
  }
1104
- function D(e, t, n) {
1108
+ function O(e, t, n) {
1105
1109
  e.button !== 0 || Date.now() < n || G(U(t));
1106
1110
  }
1107
- function O(e) {
1111
+ function k(e) {
1108
1112
  let t = W(), n = u.value;
1109
1113
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
1110
1114
  let r = Number.parseFloat(e.target.value);
1111
1115
  if (!Number.isFinite(r)) return;
1112
- let i = bt(r, 0, f.value || 0);
1113
- H(n, i, t), t.currentTime = i;
1114
- }
1115
- function k(e) {
1116
- return !!t.value[e] && !n.value[e];
1116
+ let i = bt(r, 0, p.value || 0);
1117
+ ee(n, i, t), t.currentTime = i;
1117
1118
  }
1118
1119
  function A(e) {
1119
- return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
1120
+ return !!t.value[e] && !n.value[e];
1120
1121
  }
1121
1122
  function j(e) {
1122
- return e.url;
1123
+ return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
1123
1124
  }
1124
1125
  function M(e) {
1125
- return n.value[e] ?? r.value[e]?.errorKind ?? null;
1126
+ return e.url;
1126
1127
  }
1127
1128
  function N(e) {
1128
- let t = M(e);
1129
- return t ? pt(t) : null;
1129
+ return n.value[e] ?? r.value[e]?.errorKind ?? null;
1130
1130
  }
1131
1131
  function F(e) {
1132
- return mt(M(e));
1132
+ let t = N(e);
1133
+ return t ? pt(t) : null;
1133
1134
  }
1134
1135
  function I(e) {
1136
+ return mt(N(e));
1137
+ }
1138
+ function L(e) {
1135
1139
  return `${e}:${a.value[e] ?? 0}`;
1136
1140
  }
1137
- async function L(e) {
1138
- if (!F(e)) return;
1141
+ async function R(e) {
1142
+ if (!I(e)) return;
1139
1143
  t.value[e] = !1, n.value[e] = null;
1140
- let r = B(e);
1144
+ let r = V(e);
1141
1145
  r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
1142
1146
  let i = U(e);
1143
- i && R(i, e), c.forEach((t) => {
1147
+ i && z(i, e), c.forEach((t) => {
1144
1148
  t.startsWith(`${e}|`) && c.delete(t);
1145
- }), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await b();
1149
+ }), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await x();
1146
1150
  }
1147
- function R(e, t) {
1151
+ function z(e, t) {
1148
1152
  e.pause();
1149
1153
  try {
1150
1154
  e.currentTime = 0;
1151
1155
  } catch {}
1152
- V(t, e);
1156
+ H(t, e);
1153
1157
  }
1154
- function z() {
1155
- for (let [e, t] of o.entries()) R(t, e);
1156
- for (let [e, t] of s.entries()) R(t, e);
1158
+ function B() {
1159
+ for (let [e, t] of o.entries()) z(t, e);
1160
+ for (let [e, t] of s.entries()) z(t, e);
1157
1161
  }
1158
- function B(e) {
1162
+ function V(e) {
1159
1163
  return r.value[e] || (r.value[e] = ct()), r.value[e];
1160
1164
  }
1161
- function V(e, t, n) {
1162
- ut(B(e), t, n);
1163
- }
1164
1165
  function H(e, t, n) {
1165
- let r = B(e);
1166
+ ut(V(e), t, n);
1167
+ }
1168
+ function ee(e, t, n) {
1169
+ let r = V(e);
1166
1170
  r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.paused = n.paused;
1167
1171
  }
1168
1172
  function U(e) {
@@ -1181,7 +1185,7 @@ function yt(e) {
1181
1185
  }
1182
1186
  }
1183
1187
  function K(t, n) {
1184
- let r = e.activeMediaItem.value ?? e.activeItem.value;
1188
+ let r = q(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
1185
1189
  if (!r || !n) return;
1186
1190
  let i = `${t}|${n}`;
1187
1191
  c.has(i) || (c.add(i), e.onAssetLoad?.({
@@ -1191,38 +1195,38 @@ function yt(e) {
1191
1195
  url: n
1192
1196
  }));
1193
1197
  }
1194
- function q() {
1195
- return e.activeItem.value?.url ?? null;
1198
+ function q(e) {
1199
+ return d.value.get(e) ?? null;
1196
1200
  }
1197
- function J() {
1198
- return e.activeMediaItem.value?.url ?? e.activeItem.value?.url ?? null;
1201
+ function J(e) {
1202
+ return q(e)?.url ?? null;
1199
1203
  }
1200
1204
  return {
1201
- activeAssetErrorKind: m,
1202
- activeMediaDuration: f,
1203
- activeMediaProgress: p,
1204
- activeMediaState: d,
1205
- getAssetErrorKind: M,
1206
- getAssetErrorLabel: N,
1207
- getAssetRenderKey: I,
1208
- getImageSource: j,
1209
- isImageReady: k,
1210
- isMediaReady: A,
1211
- canRetryAsset: F,
1205
+ activeAssetErrorKind: h,
1206
+ activeMediaDuration: p,
1207
+ activeMediaProgress: m,
1208
+ activeMediaState: f,
1209
+ getAssetErrorKind: N,
1210
+ getAssetErrorLabel: F,
1211
+ getAssetRenderKey: L,
1212
+ getImageSource: M,
1213
+ isImageReady: A,
1214
+ isMediaReady: j,
1215
+ canRetryAsset: I,
1212
1216
  mediaStates: r,
1213
- onAudioCoverClick: D,
1214
- onImageError: C,
1215
- onImageLoad: S,
1216
- onMediaError: w,
1217
- onMediaEvent: x,
1218
- onMediaSeekInput: O,
1219
- onVideoClick: E,
1220
- registerAudioElement: _,
1221
- registerImageElement: v,
1222
- registerVideoElement: h,
1223
- resetMediaState: y,
1224
- retryAsset: L,
1225
- syncMediaPlayback: b
1217
+ onAudioCoverClick: O,
1218
+ onImageError: w,
1219
+ onImageLoad: C,
1220
+ onMediaError: E,
1221
+ onMediaEvent: S,
1222
+ onMediaSeekInput: k,
1223
+ onVideoClick: D,
1224
+ registerAudioElement: v,
1225
+ registerImageElement: y,
1226
+ registerVideoElement: _,
1227
+ resetMediaState: b,
1228
+ retryAsset: R,
1229
+ syncMediaPlayback: x
1226
1230
  };
1227
1231
  }
1228
1232
  function bt(e, t, n) {
@@ -1254,6 +1258,7 @@ function Ct(e, t, n, r, i) {
1254
1258
  //#region src/components/viewer-core/useViewer.ts
1255
1259
  function wt(e, t, n = {}) {
1256
1260
  let { activeIndex: r, canRetryInitialLoad: a, errorMessage: o, hasNextPage: s, items: c, loading: l, paginationDetail: u, retryInitialLoad: d, setActiveIndex: f } = Re(e, t), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => c.value.length === 0 ? 0 : M(r.value, 0, c.value.length - 1)), C = i(() => c.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), E = yt({
1261
+ items: c,
1257
1262
  activeItem: C,
1258
1263
  activeMediaItem: w,
1259
1264
  isEnabled: _,
@@ -1269,7 +1274,7 @@ function wt(e, t, n = {}) {
1269
1274
  onEnable() {
1270
1275
  return E.syncMediaPlayback();
1271
1276
  },
1272
- onKeydown: W,
1277
+ onKeydown: U,
1273
1278
  onResize: N
1274
1279
  });
1275
1280
  function M(e, t, n) {
@@ -1308,31 +1313,31 @@ function wt(e, t, n = {}) {
1308
1313
  function H() {
1309
1314
  m.value = 0, h.value = !1, v = null;
1310
1315
  }
1311
- function U(e) {
1316
+ function ee(e) {
1312
1317
  if (!_.value || c.value.length === 0 || h.value || Q(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
1313
1318
  e.preventDefault();
1314
1319
  let t = Date.now();
1315
1320
  t < b || (b = t + 400, F(e.deltaY > 0 ? 1 : -1));
1316
1321
  }
1317
- function W(e) {
1322
+ function U(e) {
1318
1323
  !_.value || c.value.length === 0 || ce(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), F(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), F(-1)));
1319
1324
  }
1320
- function G(e, t) {
1325
+ function W(e, t) {
1321
1326
  E.onVideoClick(e, t, x);
1322
1327
  }
1323
- function K(e, t) {
1328
+ function G(e, t) {
1324
1329
  E.onAudioCoverClick(e, t, x);
1325
1330
  }
1326
- function q(e) {
1331
+ function K(e) {
1327
1332
  E.onMediaSeekInput(e);
1328
1333
  }
1329
- function J(e) {
1334
+ function q(e) {
1330
1335
  return e.type === "image" || e.type === "video";
1331
1336
  }
1332
- function Y(e) {
1337
+ function J(e) {
1333
1338
  return e.type === "audio";
1334
1339
  }
1335
- function ee(e) {
1340
+ function te(e) {
1336
1341
  return Ct(e, S.value, g.value, m.value, h.value);
1337
1342
  }
1338
1343
  return {
@@ -1350,28 +1355,28 @@ function wt(e, t, n = {}) {
1350
1355
  getAssetRenderKey: E.getAssetRenderKey,
1351
1356
  formatPlaybackTime: at,
1352
1357
  getImageSource: E.getImageSource,
1353
- getSlideStyle: ee,
1358
+ getSlideStyle: te,
1354
1359
  hasNextPage: s,
1355
1360
  isAtEnd: D,
1356
- isAudio: Y,
1357
- isVisual: J,
1361
+ isAudio: J,
1362
+ isVisual: q,
1358
1363
  items: c,
1359
1364
  loading: l,
1360
1365
  mediaStates: E.mediaStates,
1361
1366
  isImageReady: E.isImageReady,
1362
1367
  isMediaReady: E.isMediaReady,
1363
- onAudioCoverClick: K,
1368
+ onAudioCoverClick: G,
1364
1369
  onImageError: E.onImageError,
1365
1370
  onImageLoad: E.onImageLoad,
1366
1371
  onMediaEvent: E.onMediaEvent,
1367
1372
  onMediaError: E.onMediaError,
1368
- onMediaSeekInput: q,
1373
+ onMediaSeekInput: K,
1369
1374
  onPointerCancel: B,
1370
1375
  onPointerDown: L,
1371
1376
  onPointerMove: R,
1372
1377
  onPointerUp: z,
1373
- onVideoClick: G,
1374
- onWheel: U,
1378
+ onVideoClick: W,
1379
+ onWheel: ee,
1375
1380
  registerAudioElement: E.registerAudioElement,
1376
1381
  registerImageElement: E.registerImageElement,
1377
1382
  registerVideoElement: E.registerVideoElement,
@@ -1389,9 +1394,9 @@ function wt(e, t, n = {}) {
1389
1394
  //#region src/components/viewer-core/media.ts
1390
1395
  var Tt = {
1391
1396
  image: ne,
1392
- video: ee,
1393
- audio: Y,
1394
- other: te
1397
+ video: te,
1398
+ audio: J,
1399
+ other: Y
1395
1400
  }, Et = {
1396
1401
  image: "Image",
1397
1402
  video: "Video",
@@ -1522,7 +1527,7 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1522
1527
  key: 0,
1523
1528
  "data-testid": "vibe-fullscreen-aside",
1524
1529
  class: "absolute inset-y-0 right-0 z-[6] w-full max-w-[22rem] overflow-hidden border-l border-white/10 bg-black/82 backdrop-blur-[18px]"
1525
- }, un = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, dn = 1280, fn = /* @__PURE__ */ d({
1530
+ }, un = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, dn = 1280, fn = 2, pn = /* @__PURE__ */ d({
1526
1531
  __name: "FullscreenSurface",
1527
1532
  props: {
1528
1533
  items: {},
@@ -1585,40 +1590,41 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1585
1590
  ...L.value,
1586
1591
  kind: g.isAtEnd.value && !g.hasNextPage.value && !g.loading.value ? "end" : "loading-more",
1587
1592
  message: g.statusMessage.value
1588
- }), H = i(() => !V.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](V.value)), U = i(() => ({
1589
- gridTemplateColumns: K.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1593
+ }), H = i(() => !V.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](V.value)), ee = i(() => ({
1594
+ gridTemplateColumns: G.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
1590
1595
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
1591
- })), W = i(() => kt(z.value)), G = i(() => kt(B.value)), K = i(() => G.value && C.value >= dn), q = i(() => G.value && !K.value), J = i(() => kt(H.value));
1596
+ })), U = i(() => kt(z.value)), W = i(() => kt(B.value)), G = i(() => W.value && C.value >= dn), K = i(() => W.value && !G.value), q = i(() => kt(H.value));
1592
1597
  x(() => {
1593
1598
  window.addEventListener("resize", le);
1594
1599
  }), b(() => {
1595
1600
  window.removeEventListener("resize", le);
1596
1601
  });
1597
- function Y(e, t) {
1602
+ function J(e, t) {
1598
1603
  let n = t.title?.trim();
1599
1604
  return n ? `${e} ${n}` : `${e} ${Ot(t.type).toLowerCase()}`;
1600
1605
  }
1601
- function ee(e, t) {
1606
+ function te(e, t) {
1602
1607
  let n = Q(t);
1603
1608
  return !Z(e) || e !== g.resolvedActiveIndex.value || g.getAssetErrorKind(n) ? !1 : t.type === "image" ? !g.isImageReady(n) : t.type === "video" || t.type === "audio" ? !g.isMediaReady(n) : !1;
1604
1609
  }
1605
- function te(e) {
1610
+ function Y(e) {
1606
1611
  return g.getAssetErrorKind(Q(e));
1607
1612
  }
1608
1613
  function ne(e) {
1609
1614
  return g.getAssetErrorLabel(Q(e)) ?? "Load error";
1610
1615
  }
1611
1616
  function X(e, t) {
1612
- return Z(e) && e === g.resolvedActiveIndex.value && !!te(t);
1617
+ return Z(e) && e === g.resolvedActiveIndex.value && !!Y(t);
1613
1618
  }
1614
1619
  function Z(e) {
1615
- return d.active && e === g.resolvedActiveIndex.value;
1620
+ let t = g.resolvedActiveIndex.value;
1621
+ return d.active && e >= t && e <= t + fn;
1616
1622
  }
1617
1623
  function se(e, t) {
1618
- if (Z(e)) return g.getImageSource(t);
1624
+ return Z(e) ? g.getImageSource(t) : void 0;
1619
1625
  }
1620
1626
  function ce(e, t) {
1621
- if (Z(e)) return t.url;
1627
+ return Z(e) ? t.url : void 0;
1622
1628
  }
1623
1629
  function Q(e) {
1624
1630
  return $(e);
@@ -1630,7 +1636,7 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1630
1636
  c("div", { class: _(["absolute inset-0 transition-[background] duration-200", w.value]) }, null, 2),
1631
1637
  c("div", {
1632
1638
  class: "relative z-[1] grid h-full min-h-0",
1633
- style: y(U.value)
1639
+ style: y(ee.value)
1634
1640
  }, [c("div", {
1635
1641
  ref: "viewer.stageRef",
1636
1642
  "data-testid": "vibe-stage",
@@ -1654,13 +1660,13 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1654
1660
  }, [c("div", { class: _(["absolute inset-0 opacity-85", j(Pt)(r.type)]) }, null, 2), j(g).isVisual(r) ? (S(), s("div", {
1655
1661
  key: 0,
1656
1662
  class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? F.value : ""])
1657
- }, [ee(i, r) ? (S(), s("div", Rt, [c("span", zt, [u(j(re), {
1663
+ }, [te(i, r) ? (S(), s("div", Rt, [c("span", zt, [u(j(re), {
1658
1664
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
1659
1665
  "aria-hidden": "true"
1660
1666
  })])])) : o("", !0), X(i, r) ? (S(), s("div", {
1661
1667
  key: 1,
1662
1668
  "data-testid": "vibe-asset-error",
1663
- "data-kind": te(r),
1669
+ "data-kind": Y(r),
1664
1670
  class: "grid h-full w-full place-items-center"
1665
1671
  }, [c("div", Vt, [
1666
1672
  u(j(oe), {
@@ -1714,8 +1720,8 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1714
1720
  c("button", {
1715
1721
  type: "button",
1716
1722
  class: "relative grid h-full w-full place-items-center border border-white/12 bg-[linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02)),radial-gradient(circle_at_center,rgba(16,185,129,0.14),transparent_58%)] text-[#f7f1ea] transition-[border-color,background] duration-200 hover:border-white/30 hover:bg-[linear-gradient(180deg,rgba(255,255,255,0.07),rgba(255,255,255,0.03)),radial-gradient(circle_at_center,rgba(16,185,129,0.18),transparent_58%)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
1717
- "aria-label": j(g).mediaStates.value[Q(r)]?.paused ?? !0 ? Y("Play", r) : Y("Pause", r),
1718
- disabled: !!te(r),
1723
+ "aria-label": j(g).mediaStates.value[Q(r)]?.paused ?? !0 ? J("Play", r) : J("Pause", r),
1724
+ disabled: !!Y(r),
1719
1725
  onClick: (e) => j(g).onAudioCoverClick(e, Q(r))
1720
1726
  }, [
1721
1727
  n[6] ||= c("span", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(16,185,129,0.16),transparent_66%)]" }, null, -1),
@@ -1732,13 +1738,13 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1732
1738
  "aria-hidden": "true"
1733
1739
  }))])
1734
1740
  ], 8, qt),
1735
- ee(i, r) ? (S(), s("div", Xt, [c("span", Zt, [u(j(re), {
1741
+ te(i, r) ? (S(), s("div", Xt, [c("span", Zt, [u(j(re), {
1736
1742
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
1737
1743
  "aria-hidden": "true"
1738
1744
  })])])) : o("", !0),
1739
- te(r) ? (S(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
1745
+ Y(r) ? (S(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
1740
1746
  "data-testid": "vibe-asset-error",
1741
- "data-kind": te(r),
1747
+ "data-kind": Y(r),
1742
1748
  class: "relative z-[1] grid justify-items-center gap-4"
1743
1749
  }, [
1744
1750
  u(j(oe), {
@@ -1790,7 +1796,7 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1790
1796
  title: j(g).activeItem.value.title ?? null,
1791
1797
  total: j(g).items.value.length,
1792
1798
  onBackToList: n[0] ||= (e) => m("back-to-list")
1793
- }, l({ _: 2 }, [W.value && L.value ? {
1799
+ }, l({ _: 2 }, [U.value && L.value ? {
1794
1800
  name: "actions",
1795
1801
  fn: I(() => [D(e.$slots, "fullscreen-header-actions", v(f(L.value)))]),
1796
1802
  key: "0"
@@ -1821,7 +1827,7 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1821
1827
  V.value ? (S(), s("div", {
1822
1828
  key: 3,
1823
1829
  class: _(["absolute left-1/2 z-[4] -translate-x-1/2", N.value])
1824
- }, [J.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, V.value))) : (S(), s("div", {
1830
+ }, [q.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, V.value))) : (S(), s("div", {
1825
1831
  key: 1,
1826
1832
  class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", V.value.kind === "end" ? "border-amber-300/35 text-amber-200" : ""])
1827
1833
  }, k(V.value.message), 3))], 2)) : o("", !0)
@@ -1833,7 +1839,7 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1833
1839
  "leave-from-class": "translate-x-0 opacity-100",
1834
1840
  "leave-to-class": "translate-x-full opacity-0"
1835
1841
  }, {
1836
- default: I(() => [K.value && L.value ? (S(), s("aside", sn, [c("div", cn, [D(e.$slots, "fullscreen-aside", v(f(L.value)))])])) : o("", !0)]),
1842
+ default: I(() => [G.value && L.value ? (S(), s("aside", sn, [c("div", cn, [D(e.$slots, "fullscreen-aside", v(f(L.value)))])])) : o("", !0)]),
1837
1843
  _: 3
1838
1844
  })], 4),
1839
1845
  u(r, {
@@ -1844,29 +1850,29 @@ var Ft = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
1844
1850
  "leave-from-class": "translate-x-0 opacity-100",
1845
1851
  "leave-to-class": "translate-x-full opacity-0"
1846
1852
  }, {
1847
- default: I(() => [q.value && L.value ? (S(), s("aside", ln, [c("div", un, [D(e.$slots, "fullscreen-aside", v(f(L.value)))])])) : o("", !0)]),
1853
+ default: I(() => [K.value && L.value ? (S(), s("aside", ln, [c("div", un, [D(e.$slots, "fullscreen-aside", v(f(L.value)))])])) : o("", !0)]),
1848
1854
  _: 3
1849
1855
  })
1850
1856
  ]));
1851
1857
  }
1852
- }), pn = 1, mn = .5;
1853
- function hn(e) {
1858
+ }), mn = 1, hn = .5;
1859
+ function gn(e) {
1854
1860
  if (e.type !== "image" && e.type !== "video") return {
1855
- width: pn,
1856
- height: pn,
1861
+ width: mn,
1862
+ height: mn,
1857
1863
  source: "fallback"
1858
1864
  };
1859
1865
  let t = e.preview?.width, n = e.preview?.height;
1860
- if (Sn(t) && Sn(n)) {
1861
- let r = Cn(e, t, n);
1866
+ if (Cn(t) && Cn(n)) {
1867
+ let r = wn(e, t, n);
1862
1868
  return {
1863
1869
  width: r.width,
1864
1870
  height: r.height,
1865
1871
  source: "preview"
1866
1872
  };
1867
1873
  }
1868
- if (Sn(e.width) && Sn(e.height)) {
1869
- let t = Cn(e, e.width, e.height);
1874
+ if (Cn(e.width) && Cn(e.height)) {
1875
+ let t = wn(e, e.width, e.height);
1870
1876
  return {
1871
1877
  width: t.width,
1872
1878
  height: t.height,
@@ -1874,31 +1880,31 @@ function hn(e) {
1874
1880
  };
1875
1881
  }
1876
1882
  return {
1877
- width: pn,
1878
- height: pn,
1883
+ width: mn,
1884
+ height: mn,
1879
1885
  source: "fallback"
1880
1886
  };
1881
1887
  }
1882
- function gn(e, t) {
1888
+ function _n(e, t) {
1883
1889
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
1884
1890
  }
1885
- function _n(e, t, n, r = 0) {
1891
+ function vn(e, t, n, r = 0) {
1886
1892
  if (!e || e <= 0 || !t || t <= 0) return n;
1887
1893
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
1888
1894
  return !a || a <= 0 ? n : a / t;
1889
1895
  }
1890
- function vn(e, t) {
1891
- let n = hn(e);
1896
+ function yn(e, t) {
1897
+ let n = gn(e);
1892
1898
  return n.height / n.width * t;
1893
1899
  }
1894
- function yn(e, t) {
1900
+ function bn(e, t) {
1895
1901
  let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
1896
1902
  for (let c = 0; c < e.length; c += 1) {
1897
1903
  let l = e[c];
1898
1904
  o.set($(l), c);
1899
1905
  let u = 0;
1900
1906
  for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
1901
- let d = u * (t.columnWidth + t.gapX), f = n[u], p = vn(l, t.columnWidth);
1907
+ let d = u * (t.columnWidth + t.gapX), f = n[u], p = yn(l, t.columnWidth);
1902
1908
  r[c] = {
1903
1909
  x: d,
1904
1910
  y: f
@@ -1917,7 +1923,7 @@ function yn(e, t) {
1917
1923
  indexById: o
1918
1924
  };
1919
1925
  }
1920
- function bn(e) {
1926
+ function xn(e) {
1921
1927
  if (e.itemCount <= 0) return [];
1922
1928
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
1923
1929
  let t = Math.max(0, e.scrollTop - e.overscanPx), n = e.scrollTop + e.viewportHeight + e.overscanPx, r = Math.floor(t / e.bucketPx), i = Math.floor(n / e.bucketPx), a = /* @__PURE__ */ new Set();
@@ -1927,7 +1933,7 @@ function bn(e) {
1927
1933
  }
1928
1934
  return Array.from(a).sort((e, t) => e - t);
1929
1935
  }
1930
- function xn(e, t, n) {
1936
+ function Sn(e, t, n) {
1931
1937
  let r = /* @__PURE__ */ new Map();
1932
1938
  for (let i of e) {
1933
1939
  let e = t.get($(i));
@@ -1937,11 +1943,11 @@ function xn(e, t, n) {
1937
1943
  }
1938
1944
  return r;
1939
1945
  }
1940
- function Sn(e) {
1946
+ function Cn(e) {
1941
1947
  return typeof e == "number" && Number.isFinite(e) && e > 0;
1942
1948
  }
1943
- function Cn(e, t, n) {
1944
- return e.type !== "image" || n / t >= mn ? {
1949
+ function wn(e, t, n) {
1950
+ return e.type !== "image" || n / t >= hn ? {
1945
1951
  width: t,
1946
1952
  height: n
1947
1953
  } : {
@@ -1951,18 +1957,18 @@ function Cn(e, t, n) {
1951
1957
  }
1952
1958
  //#endregion
1953
1959
  //#region src/components/viewer-core/useMasonryMotion.ts
1954
- var wn = 300, Tn = 600, En = 40, Dn = 400;
1955
- function On(e, t) {
1960
+ var Tn = 300, En = 600, Dn = 40, On = 400;
1961
+ function kn(e, t) {
1956
1962
  return t === "top" ? [...e].reverse() : e;
1957
1963
  }
1958
- function kn(e) {
1959
- return e <= 0 ? Tn : Tn + Math.min((e - 1) * En, Dn);
1960
- }
1961
1964
  function An(e) {
1965
+ return e <= 0 ? En : En + Math.min((e - 1) * Dn, On);
1966
+ }
1967
+ function jn(e) {
1962
1968
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
1963
1969
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
1964
1970
  }
1965
- function jn(e) {
1971
+ function Mn(e) {
1966
1972
  let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), i = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
1967
1973
  P(e.visibleIndices, (a) => {
1968
1974
  if (!a.length) return;
@@ -1972,20 +1978,20 @@ function jn(e) {
1972
1978
  !r || !t.value.has(r) || c.has(r) || (c.add(r), o.push(r));
1973
1979
  }
1974
1980
  if (!o.length) return;
1975
- let s = On(o, i.value.get(o[0]) ?? "bottom"), l = new Map(r.value);
1976
- for (let e = 0; e < s.length; e += 1) l.set(s[e], Math.min(e * En, Dn));
1977
- r.value = l, Mn(() => {
1981
+ let s = kn(o, i.value.get(o[0]) ?? "bottom"), l = new Map(r.value);
1982
+ for (let e = 0; e < s.length; e += 1) l.set(s[e], Math.min(e * Dn, On));
1983
+ r.value = l, Nn(() => {
1978
1984
  let e = new Set(n.value);
1979
1985
  for (let t of o) e.add(t);
1980
1986
  n.value = e;
1981
- }), Nn(() => {
1987
+ }), Pn(() => {
1982
1988
  let e = new Set(t.value);
1983
1989
  for (let t of o) e.delete(t);
1984
1990
  t.value = e, h(() => {
1985
1991
  let e = new Set(n.value), t = new Map(r.value), a = new Map(i.value);
1986
1992
  for (let n of o) e.delete(n), t.delete(n), a.delete(n), c.delete(n);
1987
1993
  n.value = e, r.value = t, i.value = a;
1988
- }, kn(o.length));
1994
+ }, An(o.length));
1989
1995
  });
1990
1996
  }, { flush: "post" }), b(() => {
1991
1997
  for (let e of l) clearTimeout(e);
@@ -2000,7 +2006,7 @@ function jn(e) {
2000
2006
  }
2001
2007
  t.value = r, i.value = a;
2002
2008
  }
2003
- function d(t, n, r = wn) {
2009
+ function d(t, n, r = Tn) {
2004
2010
  if (!t.size) return;
2005
2011
  let i = /* @__PURE__ */ new Map(), c = [];
2006
2012
  for (let [r, a] of t.entries()) {
@@ -2019,8 +2025,8 @@ function jn(e) {
2019
2025
  a.value = i, s.value = /* @__PURE__ */ new Set();
2020
2026
  let l = new Map(o.value);
2021
2027
  for (let e of c) l.set(e, r);
2022
- o.value = l, Mn(() => {
2023
- s.value = new Set(c), Mn(() => {
2028
+ o.value = l, Nn(() => {
2029
+ s.value = new Set(c), Nn(() => {
2024
2030
  a.value = /* @__PURE__ */ new Map();
2025
2031
  });
2026
2032
  }), h(() => {
@@ -2031,8 +2037,8 @@ function jn(e) {
2031
2037
  }, r);
2032
2038
  }
2033
2039
  function f(e) {
2034
- if (n.value.has(e)) return `transform ${Tn}ms ease-out`;
2035
- if (s.value.has(e)) return `transform ${o.value.get(e) ?? wn}ms ease-out`;
2040
+ if (n.value.has(e)) return `transform ${En}ms ease-out`;
2041
+ if (s.value.has(e)) return `transform ${o.value.get(e) ?? Tn}ms ease-out`;
2036
2042
  }
2037
2043
  function p(e) {
2038
2044
  if (!n.value.has(e)) return;
@@ -2049,7 +2055,7 @@ function jn(e) {
2049
2055
  } : {
2050
2056
  dx: 0,
2051
2057
  dy: 0
2052
- }, u = c ? i.value.get(c) ?? "bottom" : "bottom", d = c && t.value.has(c) ? An({
2058
+ }, u = c ? i.value.get(c) ?? "bottom" : "bottom", d = c && t.value.has(c) ? jn({
2053
2059
  columnWidth: e.columnWidth.value,
2054
2060
  direction: u,
2055
2061
  itemHeight: s,
@@ -2072,28 +2078,28 @@ function jn(e) {
2072
2078
  playFlipMoveAnimation: d
2073
2079
  };
2074
2080
  }
2075
- function Mn(e) {
2081
+ function Nn(e) {
2076
2082
  if (typeof requestAnimationFrame == "function") {
2077
2083
  requestAnimationFrame(() => e());
2078
2084
  return;
2079
2085
  }
2080
2086
  setTimeout(e, 0);
2081
2087
  }
2082
- function Nn(e) {
2083
- Mn(() => Mn(e));
2088
+ function Pn(e) {
2089
+ Nn(() => Nn(e));
2084
2090
  }
2085
2091
  //#endregion
2086
2092
  //#region src/components/viewer-core/masonryViewport.ts
2087
- function Pn(e, t) {
2093
+ function Fn(e, t) {
2088
2094
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || window.innerHeight || t || 1;
2089
2095
  }
2090
- function Fn(e, t, n) {
2096
+ function In(e, t, n) {
2091
2097
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || window.innerWidth || t || n;
2092
2098
  }
2093
- function In(e, t, n, r) {
2099
+ function Ln(e, t, n, r) {
2094
2100
  return (e?.scrollHeight ?? r) - (t + n);
2095
2101
  }
2096
- function Ln(e, t) {
2102
+ function Rn(e, t) {
2097
2103
  return {
2098
2104
  height: `${e}px`,
2099
2105
  transform: `translate3d(0, ${t}px, 0)`
@@ -2101,8 +2107,8 @@ function Ln(e, t) {
2101
2107
  }
2102
2108
  //#endregion
2103
2109
  //#region src/components/viewer-core/useEdgeBoundary.ts
2104
- var Rn = 250, zn = 1e3;
2105
- function Bn(e) {
2110
+ var zn = 250, Bn = 1e3;
2111
+ function Vn(e) {
2106
2112
  let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
2107
2113
  b(() => {
2108
2114
  y();
@@ -2118,7 +2124,7 @@ function Bn(e) {
2118
2124
  function u(t) {
2119
2125
  if (!x(t) || !e.isAtBoundary()) return;
2120
2126
  let n = Date.now();
2121
- n < s || (s = n + Rn, m());
2127
+ n < s || (s = n + zn, m());
2122
2128
  }
2123
2129
  function d() {
2124
2130
  if (!g()) return;
@@ -2152,7 +2158,7 @@ function Bn(e) {
2152
2158
  return e.hasPage.value && t.value && r.value > i.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
2153
2159
  }
2154
2160
  function _() {
2155
- o.value = !1, v(zn);
2161
+ o.value = !1, v(Bn);
2156
2162
  }
2157
2163
  function v(e) {
2158
2164
  y(), a.value = !0, c = setTimeout(() => {
@@ -2175,30 +2181,30 @@ function Bn(e) {
2175
2181
  }
2176
2182
  //#endregion
2177
2183
  //#region src/components/viewer-core/useMasonryList.ts
2178
- var Vn = 600, Hn = 24, Un = 16, Wn = 300, Gn = 200, Kn = 200, qn = 200, Jn = 300, Yn = 24, Xn = 48, Zn = 500, Qn = 1e3;
2179
- function $n(e) {
2180
- let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Wn), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = i(() => Math.max(Wn, a.value - Hn * 2)), p = i(() => gn(f.value, Wn)), m = i(() => _n(f.value, p.value, Wn, Un)), h = i(() => er(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), _ = i(() => bn({
2184
+ var Hn = 600, Un = 24, Wn = 16, Gn = 300, Kn = 200, qn = 200, Jn = 200, Yn = 300, Xn = 24, Zn = 48, Qn = 500, $n = 1e3;
2185
+ function er(e) {
2186
+ let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Gn), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = i(() => Math.max(Gn, a.value - Un * 2)), p = i(() => _n(f.value, Gn)), m = i(() => vn(f.value, p.value, Gn, Wn)), h = i(() => tr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), _ = i(() => xn({
2181
2187
  itemCount: e.items.value.length,
2182
2188
  viewportHeight: r.value,
2183
2189
  scrollTop: n.value,
2184
- overscanPx: Gn,
2185
- bucketPx: Vn,
2190
+ overscanPx: Kn,
2191
+ bucketPx: Hn,
2186
2192
  buckets: c.value
2187
2193
  })), v = i(() => _.value.map((t) => ({
2188
2194
  item: e.items.value[t],
2189
2195
  index: t
2190
2196
  }))), y = i(() => {
2191
- let e = l.value + Hn * 2, t = d.value ?? 0;
2192
- return Math.max(e, t, r.value) + qn;
2193
- }), S = i(() => e.loading.value ? e.items.value.length > 0 ? "Loading more items" : "Loading the first page" : !e.hasNextPage.value && e.items.value.length > 0 ? "End of list" : null), C = i(() => `${h.value + 1} / ${e.items.value.length}`), w = i(() => Math.max(0, r.value - Yn * 2)), E = i(() => y.value > r.value + 1 && w.value > 0), D = i(() => {
2197
+ let e = l.value + Un * 2, t = d.value ?? 0;
2198
+ return Math.max(e, t, r.value) + Jn;
2199
+ }), S = i(() => e.loading.value ? e.items.value.length > 0 ? "Loading more items" : "Loading the first page" : !e.hasNextPage.value && e.items.value.length > 0 ? "End of list" : null), C = i(() => `${h.value + 1} / ${e.items.value.length}`), w = i(() => Math.max(0, r.value - Xn * 2)), E = i(() => y.value > r.value + 1 && w.value > 0), D = i(() => {
2194
2200
  if (!E.value) return 0;
2195
2201
  let e = r.value / y.value * w.value;
2196
- return Math.min(w.value, Math.max(Xn, e));
2202
+ return Math.min(w.value, Math.max(Zn, e));
2197
2203
  }), O = i(() => {
2198
- if (!E.value) return Yn;
2204
+ if (!E.value) return Xn;
2199
2205
  let e = Math.max(0, y.value - r.value);
2200
- return Yn + Math.max(0, w.value - D.value) * (e > 0 ? er(n.value / e, 0, 1) : 0);
2201
- }), k = jn({
2206
+ return Xn + Math.max(0, w.value - D.value) * (e > 0 ? tr(n.value / e, 0, 1) : 0);
2207
+ }), k = Mn({
2202
2208
  items: e.items,
2203
2209
  visibleIndices: _,
2204
2210
  positions: o,
@@ -2207,25 +2213,25 @@ function $n(e) {
2207
2213
  columnWidth: m,
2208
2214
  scrollTop: n,
2209
2215
  viewportHeight: r
2210
- }), A = Bn({
2216
+ }), A = Vn({
2211
2217
  direction: "top",
2212
2218
  getAnimationLockMs(e) {
2213
- return Math.max(Zn, kn(e)) + Qn;
2219
+ return Math.max(Qn, An(e)) + $n;
2214
2220
  },
2215
2221
  hasPage: e.hasPreviousPage,
2216
2222
  isAtBoundary() {
2217
- return n.value <= Hn + Un;
2223
+ return n.value <= Un + Wn;
2218
2224
  },
2219
2225
  loading: e.loading,
2220
2226
  requestPage: e.requestPreviousPage
2221
- }), j = Bn({
2227
+ }), j = Vn({
2222
2228
  direction: "bottom",
2223
2229
  getAnimationLockMs(e) {
2224
- return kn(e) + Qn;
2230
+ return An(e) + $n;
2225
2231
  },
2226
2232
  hasPage: e.hasNextPage,
2227
2233
  isAtBoundary() {
2228
- return Y() <= Kn;
2234
+ return J() <= qn;
2229
2235
  },
2230
2236
  loading: e.loading,
2231
2237
  requestPage: e.requestNextPage
@@ -2235,46 +2241,46 @@ function $n(e) {
2235
2241
  p,
2236
2242
  m
2237
2243
  ], async ([t], [r = []]) => {
2238
- let i = xn(e.items.value, u.value, o.value), a = new Set(r), s = e.items.value.filter((e) => !a.has($(e))), c = t.length > r.length && r.length > 0 && t[0] !== r[0], l = c && n.value > Hn + Un ? e.items.value[h.value] : null, d = l ? $(l) : null;
2239
- L(), s.length > 0 && (k.markEnter(s, c ? "top" : "bottom"), c ? A.onItemsMutated(s.length) : j.onItemsMutated(s.length)), k.playFlipMoveAnimation(i, new Set(s.map((e) => $(e))), c ? Zn : void 0), d ? (await g(), H(d, i)) : e.active.value && r.length > 0 && W();
2244
+ let i = Sn(e.items.value, u.value, o.value), a = new Set(r), s = e.items.value.filter((e) => !a.has($(e))), c = t.length > r.length && r.length > 0 && t[0] !== r[0], l = c && n.value > Un + Wn ? e.items.value[h.value] : null, d = l ? $(l) : null;
2245
+ L(), s.length > 0 && (k.markEnter(s, c ? "top" : "bottom"), c ? A.onItemsMutated(s.length) : j.onItemsMutated(s.length)), k.playFlipMoveAnimation(i, new Set(s.map((e) => $(e))), c ? Qn : void 0), d ? (await g(), H(d, i)) : e.active.value && r.length > 0 && U();
2240
2246
  }, { immediate: !0 }), P([
2241
2247
  () => e.pendingAppendItems.value.map((e) => $(e)),
2242
2248
  p,
2243
2249
  m,
2244
2250
  r
2245
2251
  ], ([t]) => {
2246
- re(), t.length && (d.value = te([...e.items.value, ...e.pendingAppendItems.value]), ne());
2252
+ re(), t.length && (d.value = Y([...e.items.value, ...e.pendingAppendItems.value]), ne());
2247
2253
  }, { immediate: !0 }), P(() => e.restoreToken.value, async () => {
2248
2254
  await g(), V(h.value, "center");
2249
2255
  }), P(() => e.loading.value, async (t) => {
2250
2256
  !t && !e.pendingAppendItems.value.length && !F && !I && (d.value = null), A.onLoadingChange(t), j.onLoadingChange(t), await g();
2251
2257
  }), x(async () => {
2252
- K(), await g(), h.value > 0 ? V(h.value, "center") : U(), A.syncBoundary(), j.syncBoundary(), typeof ResizeObserver < "u" ? (M = new ResizeObserver(() => {
2253
- K();
2254
- }), t.value && M.observe(t.value)) : window.addEventListener("resize", K);
2258
+ G(), await g(), h.value > 0 ? V(h.value, "center") : ee(), A.syncBoundary(), j.syncBoundary(), typeof ResizeObserver < "u" ? (M = new ResizeObserver(() => {
2259
+ G();
2260
+ }), t.value && M.observe(t.value)) : window.addEventListener("resize", G);
2255
2261
  }), b(() => {
2256
- M?.disconnect(), M = null, window.removeEventListener("resize", K), re(), N &&= (cancelAnimationFrame(N), 0);
2262
+ M?.disconnect(), M = null, window.removeEventListener("resize", G), re(), N &&= (cancelAnimationFrame(N), 0);
2257
2263
  });
2258
2264
  function L() {
2259
- let t = yn(e.items.value, {
2265
+ let t = bn(e.items.value, {
2260
2266
  columnCount: p.value,
2261
2267
  columnWidth: m.value,
2262
- gapX: Un,
2263
- gapY: Un,
2264
- bucketPx: Vn
2268
+ gapX: Wn,
2269
+ gapY: Wn,
2270
+ bucketPx: Hn
2265
2271
  });
2266
2272
  o.value = t.positions.map((e) => ({
2267
- x: e.x + Hn,
2268
- y: e.y + Hn
2273
+ x: e.x + Un,
2274
+ y: e.y + Un
2269
2275
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
2270
2276
  }
2271
2277
  function R() {
2272
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), A.syncBoundary(), j.syncBoundary(), G(), !W() && (N ||= requestAnimationFrame(() => {
2273
- N = 0, U();
2278
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = K(), A.syncBoundary(), j.syncBoundary(), W(), !U() && (N ||= requestAnimationFrame(() => {
2279
+ N = 0, ee();
2274
2280
  })));
2275
2281
  }
2276
2282
  function z(t) {
2277
- e.active.value && (A.onWheel(t), j.onWheel(t), G());
2283
+ e.active.value && (A.onWheel(t), j.onWheel(t), W());
2278
2284
  }
2279
2285
  function B(t) {
2280
2286
  let n = e.items.value[t], r = n ? $(n) : "";
@@ -2290,7 +2296,7 @@ function $n(e) {
2290
2296
  let a = t.value, c = o.value[e], l = s.value[e];
2291
2297
  if (!a || !c || !l) return;
2292
2298
  let u = a.scrollTop, d = Math.max(0, y.value - r.value);
2293
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Hn : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Hn), a.scrollTop = er(u, 0, d), n.value = a.scrollTop, U();
2299
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Un : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Un), a.scrollTop = tr(u, 0, d), n.value = a.scrollTop, ee();
2294
2300
  }
2295
2301
  function H(e, r) {
2296
2302
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
@@ -2298,8 +2304,8 @@ function $n(e) {
2298
2304
  let l = c.y - a.y;
2299
2305
  i.scrollTop += l, n.value = i.scrollTop;
2300
2306
  }
2301
- function U() {
2302
- if (!_.value.length || W()) return;
2307
+ function ee() {
2308
+ if (!_.value.length || U()) return;
2303
2309
  let t = n.value + r.value / 2, i = h.value, a = Infinity;
2304
2310
  for (let e of _.value) {
2305
2311
  let n = o.value[e], r = s.value[e];
@@ -2309,36 +2315,36 @@ function $n(e) {
2309
2315
  }
2310
2316
  e.setActiveIndex(i);
2311
2317
  }
2312
- function W() {
2313
- let t = n.value <= Hn + Un, r = Y() <= Kn;
2318
+ function U() {
2319
+ let t = n.value <= Un + Wn, r = J() <= qn;
2314
2320
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
2315
2321
  }
2316
- function G() {
2322
+ function W() {
2317
2323
  A.maybeRequestPage(), j.maybeRequestPage();
2318
2324
  }
2325
+ function G() {
2326
+ r.value = K(), a.value = q();
2327
+ }
2319
2328
  function K() {
2320
- r.value = q(), a.value = J();
2329
+ return Fn(t.value, r.value);
2321
2330
  }
2322
2331
  function q() {
2323
- return Pn(t.value, r.value);
2332
+ return In(t.value, a.value, Gn);
2324
2333
  }
2325
2334
  function J() {
2326
- return Fn(t.value, a.value, Wn);
2335
+ return Ln(t.value, n.value, r.value, y.value);
2327
2336
  }
2328
- function Y() {
2329
- return In(t.value, n.value, r.value, y.value);
2337
+ function te() {
2338
+ return Rn(D.value, O.value);
2330
2339
  }
2331
- function ee() {
2332
- return Ln(D.value, O.value);
2333
- }
2334
- function te(e) {
2335
- return e.length ? yn(e, {
2340
+ function Y(e) {
2341
+ return e.length ? bn(e, {
2336
2342
  columnCount: p.value,
2337
2343
  columnWidth: m.value,
2338
- gapX: Un,
2339
- gapY: Un,
2340
- bucketPx: Vn
2341
- }).contentHeight + Hn * 2 : 0;
2344
+ gapX: Wn,
2345
+ gapY: Wn,
2346
+ bucketPx: Hn
2347
+ }).contentHeight + Un * 2 : 0;
2342
2348
  }
2343
2349
  function ne() {
2344
2350
  let t = e.commitPendingAppend.value;
@@ -2350,7 +2356,7 @@ function $n(e) {
2350
2356
  } finally {
2351
2357
  d.value = null, I = !1;
2352
2358
  }
2353
- }, Jn));
2359
+ }, Yn));
2354
2360
  }
2355
2361
  function re() {
2356
2362
  F &&= (clearTimeout(F), null);
@@ -2360,7 +2366,7 @@ function $n(e) {
2360
2366
  containerHeight: y,
2361
2367
  footerStatusMessage: S,
2362
2368
  getCardStyle: B,
2363
- getScrollbarThumbStyle: ee,
2369
+ getScrollbarThumbStyle: te,
2364
2370
  onScroll: R,
2365
2371
  onWheel: z,
2366
2372
  paginationLabel: C,
@@ -2371,17 +2377,17 @@ function $n(e) {
2371
2377
  scrollViewportRef: t
2372
2378
  };
2373
2379
  }
2374
- function er(e, t, n) {
2380
+ function tr(e, t, n) {
2375
2381
  return Math.min(Math.max(e, t), n);
2376
2382
  }
2377
2383
  //#endregion
2378
2384
  //#region src/components/viewer-core/listCardAsset.ts
2379
- function tr(e) {
2385
+ function nr(e) {
2380
2386
  if (e) try {
2381
2387
  e.removeAttribute("src"), e.src = "";
2382
2388
  } catch {}
2383
2389
  }
2384
- function nr(e) {
2390
+ function rr(e) {
2385
2391
  if (e) {
2386
2392
  try {
2387
2393
  e.currentTime = 0;
@@ -2392,12 +2398,12 @@ function nr(e) {
2392
2398
  } catch {}
2393
2399
  }
2394
2400
  }
2395
- function rr(e, t) {
2401
+ function ir(e, t) {
2396
2402
  if (t) return e.bottom > t.top && e.top < t.bottom;
2397
2403
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
2398
2404
  return e.bottom > 0 && e.top < n;
2399
2405
  }
2400
- function ir(e) {
2406
+ function ar(e) {
2401
2407
  if (!e) return null;
2402
2408
  try {
2403
2409
  return new URL(e, window.location.href).href;
@@ -2407,22 +2413,22 @@ function ir(e) {
2407
2413
  }
2408
2414
  //#endregion
2409
2415
  //#region src/components/viewer-core/listPreview.ts
2410
- var ar = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, or = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2411
- function sr(e) {
2412
- let t = e.preview?.url ?? e.url, n = hn(e), r = e.title?.trim() || Ot(e.type);
2416
+ var or = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, sr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
2417
+ function cr(e) {
2418
+ let t = e.preview?.url ?? e.url, n = gn(e), r = e.title?.trim() || Ot(e.type);
2413
2419
  return e.type !== "image" && e.type !== "video" ? {
2414
2420
  kind: "fallback",
2415
2421
  url: null,
2416
2422
  width: n.width,
2417
2423
  height: n.height,
2418
2424
  label: r
2419
- } : lr(e, t) ? {
2425
+ } : ur(e, t) ? {
2420
2426
  kind: "video",
2421
2427
  url: t,
2422
2428
  width: n.width,
2423
2429
  height: n.height,
2424
2430
  label: r
2425
- } : cr(e, t) ? {
2431
+ } : lr(e, t) ? {
2426
2432
  kind: "image",
2427
2433
  url: t,
2428
2434
  width: n.width,
@@ -2436,28 +2442,28 @@ function sr(e) {
2436
2442
  label: r
2437
2443
  };
2438
2444
  }
2439
- function cr(e, t) {
2440
- return e.type !== "image" || typeof t != "string" ? !1 : ar.test(t) || ur(t);
2441
- }
2442
2445
  function lr(e, t) {
2443
- return e.type === "video" && typeof t == "string" && or.test(t);
2446
+ return e.type !== "image" || typeof t != "string" ? !1 : or.test(t) || dr(t);
2447
+ }
2448
+ function ur(e, t) {
2449
+ return e.type === "video" && typeof t == "string" && sr.test(t);
2444
2450
  }
2445
- function ur(e) {
2451
+ function dr(e) {
2446
2452
  return /^https?:\/\//i.test(e);
2447
2453
  }
2448
2454
  //#endregion
2449
2455
  //#region src/components/viewer-core/useAssetLoadQueue.ts
2450
- var dr = {
2456
+ var fr = {
2451
2457
  maxGlobal: 10,
2452
2458
  maxPerDomain: 4,
2453
2459
  maxVideoPerDomain: 2
2454
2460
  };
2455
- function fr(e = dr) {
2461
+ function pr(e = fr) {
2456
2462
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
2457
2463
  function i(e) {
2458
2464
  let i = {
2459
2465
  ...e,
2460
- domain: hr(e.url),
2466
+ domain: gr(e.url),
2461
2467
  enqueuedAt: r,
2462
2468
  id: `vibe-asset-load-${r += 1}`
2463
2469
  };
@@ -2476,7 +2482,7 @@ function fr(e = dr) {
2476
2482
  function a() {
2477
2483
  if (n.size === 0) return;
2478
2484
  let r = [...n.values()].sort((e, t) => {
2479
- let n = mr(e) - mr(t);
2485
+ let n = hr(e) - hr(t);
2480
2486
  return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
2481
2487
  });
2482
2488
  for (let i of r) {
@@ -2497,8 +2503,8 @@ function fr(e = dr) {
2497
2503
  }
2498
2504
  return { request: i };
2499
2505
  }
2500
- var pr = fr();
2501
- function mr(e) {
2506
+ var mr = pr();
2507
+ function hr(e) {
2502
2508
  try {
2503
2509
  let t = e.getPriority();
2504
2510
  return Number.isFinite(t) ? t : Infinity;
@@ -2506,7 +2512,7 @@ function mr(e) {
2506
2512
  return Infinity;
2507
2513
  }
2508
2514
  }
2509
- function hr(e) {
2515
+ function gr(e) {
2510
2516
  try {
2511
2517
  return new URL(e).hostname || "local";
2512
2518
  } catch {
@@ -2515,14 +2521,14 @@ function hr(e) {
2515
2521
  }
2516
2522
  //#endregion
2517
2523
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
2518
- var gr = ["aria-label"], _r = {
2524
+ var _r = ["aria-label"], vr = {
2519
2525
  key: 0,
2520
2526
  "data-testid": "vibe-list-card-spinner",
2521
2527
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
2522
- }, vr = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, yr = ["src", "alt"], br = ["src"], xr = ["data-kind"], Sr = { class: "grid justify-items-center gap-3 px-4 text-center" }, Cr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, wr = {
2528
+ }, yr = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, br = ["src", "alt"], xr = ["src"], Sr = ["data-kind"], Cr = { class: "grid justify-items-center gap-3 px-4 text-center" }, wr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Tr = {
2523
2529
  key: 4,
2524
2530
  class: "grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
2525
- }, Tr = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Er = { class: "pointer-events-none absolute inset-0 z-[3]" }, Dr = /* @__PURE__ */ d({
2531
+ }, Er = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Dr = { class: "pointer-events-none absolute inset-0 z-[3]" }, Or = /* @__PURE__ */ d({
2526
2532
  __name: "ListCard",
2527
2533
  props: {
2528
2534
  active: {
@@ -2546,44 +2552,44 @@ var gr = ["aria-label"], _r = {
2546
2552
  },
2547
2553
  emits: ["open"],
2548
2554
  setup(e, { emit: t }) {
2549
- let n = e, r = t, l = i(() => sr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), F = i(() => !!h.value), I = i(() => mt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), z = null, B = null, V = /* @__PURE__ */ new Set();
2555
+ let n = e, r = t, l = i(() => cr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), F = i(() => !!h.value), I = i(() => mt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), z = null, B = null, V = /* @__PURE__ */ new Set();
2550
2556
  P([E, () => l.value.kind], () => {
2551
2557
  let e = l.value.kind === "fallback";
2552
2558
  m.value = e, h.value = null, e && (w.value = !0);
2553
2559
  }), P(A, () => {
2554
- K();
2560
+ G();
2555
2561
  }), P([
2556
2562
  d,
2557
2563
  m,
2558
2564
  E
2559
2565
  ], () => {
2560
- q();
2566
+ K();
2561
2567
  }), P(() => n.surfaceActive, (e) => {
2562
2568
  if (!e) {
2563
- Y(), q();
2569
+ J(), K();
2564
2570
  return;
2565
2571
  }
2566
2572
  requestAnimationFrame(() => {
2567
- ee(), K(), q();
2573
+ te(), G(), K();
2568
2574
  });
2569
2575
  }), x(() => {
2570
2576
  if (!v.value || typeof IntersectionObserver > "u") {
2571
- y.value = null, d.value = !0, K();
2577
+ y.value = null, d.value = !0, G();
2572
2578
  return;
2573
2579
  }
2574
2580
  y.value = v.value.closest("[data-testid=\"vibe-list-scroll\"]"), z = new IntersectionObserver((e) => {
2575
- for (let t of e) t.target === v.value && (n.surfaceActive && ee(t), K(), q());
2581
+ for (let t of e) t.target === v.value && (n.surfaceActive && te(t), G(), K());
2576
2582
  }, {
2577
2583
  root: y.value,
2578
2584
  threshold: [0, 1]
2579
2585
  }), z.observe(v.value);
2580
2586
  }), b(() => {
2581
- J(), z?.disconnect(), z = null;
2587
+ q(), z?.disconnect(), z = null;
2582
2588
  });
2583
2589
  function H() {
2584
- Z(g.value) && (m.value = !0, h.value = null, te(E.value ?? n.item.url), Y());
2590
+ Z(g.value) && (m.value = !0, h.value = null, Y(E.value ?? n.item.url), J());
2585
2591
  }
2586
- async function U() {
2592
+ async function ee() {
2587
2593
  if (!Z(g.value)) return;
2588
2594
  let e = E.value ?? n.item.url;
2589
2595
  m.value = !1, h.value = "generic";
@@ -2594,32 +2600,32 @@ var gr = ["aria-label"], _r = {
2594
2600
  url: e,
2595
2601
  kind: t,
2596
2602
  surface: "grid"
2597
- }), Y();
2603
+ }), J();
2598
2604
  }
2599
- function W() {
2600
- Z(C.value) && (m.value = !0, h.value = null, te(E.value ?? n.item.url), Y(), q());
2605
+ function U() {
2606
+ Z(C.value) && (m.value = !0, h.value = null, Y(E.value ?? n.item.url), J(), K());
2601
2607
  }
2602
- function G() {
2608
+ function W() {
2603
2609
  Z(C.value) && (m.value = !1);
2604
2610
  }
2605
- function K() {
2611
+ function G() {
2606
2612
  if (l.value.kind === "fallback") {
2607
- J(!1);
2613
+ q(!1);
2608
2614
  return;
2609
2615
  }
2610
2616
  if (!n.surfaceActive) {
2611
- Y();
2617
+ J();
2612
2618
  return;
2613
2619
  }
2614
2620
  if (!A.value) {
2615
- J();
2621
+ q();
2616
2622
  return;
2617
2623
  }
2618
2624
  if (w.value || B) {
2619
2625
  B?.refresh();
2620
2626
  return;
2621
2627
  }
2622
- B = pr.request({
2628
+ B = mr.request({
2623
2629
  assetType: l.value.kind,
2624
2630
  getPriority: X,
2625
2631
  onGrant() {
@@ -2628,7 +2634,7 @@ var gr = ["aria-label"], _r = {
2628
2634
  url: l.value.url ?? n.item.url
2629
2635
  });
2630
2636
  }
2631
- function q() {
2637
+ function K() {
2632
2638
  let e = C.value;
2633
2639
  if (!(!e || l.value.kind !== "video")) {
2634
2640
  if (h.value) {
@@ -2645,21 +2651,21 @@ var gr = ["aria-label"], _r = {
2645
2651
  e.pause();
2646
2652
  }
2647
2653
  }
2648
- function J(e = !0) {
2649
- w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ie(), ae()), Y();
2654
+ function q(e = !0) {
2655
+ w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ie(), ae()), J();
2650
2656
  }
2651
- function Y() {
2657
+ function J() {
2652
2658
  B?.release(), B = null;
2653
2659
  }
2654
- function ee(e) {
2660
+ function te(e) {
2655
2661
  let t = v.value;
2656
2662
  if (!t) {
2657
2663
  d.value = !0;
2658
2664
  return;
2659
2665
  }
2660
- d.value = rr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
2666
+ d.value = ir(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
2661
2667
  }
2662
- function te(e) {
2668
+ function Y(e) {
2663
2669
  if (!e) return;
2664
2670
  let t = $(n.item), r = `${t}|${e}`;
2665
2671
  V.has(r) || (V.add(r), n.reportAssetLoad?.({
@@ -2674,13 +2680,13 @@ var gr = ["aria-label"], _r = {
2674
2680
  let e = $(n.item);
2675
2681
  V.forEach((t) => {
2676
2682
  t.startsWith(`${e}|`) && V.delete(t);
2677
- }), h.value = null, m.value = !1, w.value = !1, Y(), K();
2683
+ }), h.value = null, m.value = !1, w.value = !1, J(), G();
2678
2684
  }
2679
2685
  function ie() {
2680
- tr(g.value);
2686
+ nr(g.value);
2681
2687
  }
2682
2688
  function ae() {
2683
- nr(C.value);
2689
+ rr(C.value);
2684
2690
  }
2685
2691
  function X() {
2686
2692
  let e = v.value;
@@ -2694,8 +2700,8 @@ var gr = ["aria-label"], _r = {
2694
2700
  return Math.abs((t.top + t.bottom) / 2 - n);
2695
2701
  }
2696
2702
  function Z(e) {
2697
- let t = ir(E.value);
2698
- return !e || !t ? !1 : ir("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
2703
+ let t = ar(E.value);
2704
+ return !e || !t ? !1 : ar("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
2699
2705
  }
2700
2706
  function se() {
2701
2707
  r("open");
@@ -2723,8 +2729,8 @@ var gr = ["aria-label"], _r = {
2723
2729
  class: "absolute inset-0 z-[1] block h-full w-full cursor-pointer text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
2724
2730
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
2725
2731
  onClick: se
2726
- }, null, 8, gr),
2727
- L.value ? (S(), s("div", _r, [c("span", vr, [u(j(re), {
2732
+ }, null, 8, _r),
2733
+ L.value ? (S(), s("div", vr, [c("span", yr, [u(j(re), {
2728
2734
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
2729
2735
  "aria-hidden": "true"
2730
2736
  })])])) : o("", !0),
@@ -2737,8 +2743,8 @@ var gr = ["aria-label"], _r = {
2737
2743
  draggable: "false",
2738
2744
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
2739
2745
  onLoad: H,
2740
- onError: U
2741
- }, null, 42, yr)) : N.value && E.value && !F.value ? (S(), s("video", {
2746
+ onError: ee
2747
+ }, null, 42, br)) : N.value && E.value && !F.value ? (S(), s("video", {
2742
2748
  key: 2,
2743
2749
  ref_key: "videoRef",
2744
2750
  ref: C,
@@ -2748,37 +2754,37 @@ var gr = ["aria-label"], _r = {
2748
2754
  playsinline: "",
2749
2755
  preload: "metadata",
2750
2756
  class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
2751
- onCanplay: W,
2752
- onError: U,
2753
- onLoadstart: G,
2754
- onPlaying: W,
2755
- onStalled: G,
2756
- onWaiting: G
2757
- }, null, 42, br)) : F.value ? (S(), s("div", {
2757
+ onCanplay: U,
2758
+ onError: ee,
2759
+ onLoadstart: W,
2760
+ onPlaying: U,
2761
+ onStalled: W,
2762
+ onWaiting: W
2763
+ }, null, 42, xr)) : F.value ? (S(), s("div", {
2758
2764
  key: 3,
2759
2765
  "data-testid": "vibe-list-card-error",
2760
2766
  "data-kind": h.value,
2761
2767
  class: "relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
2762
- }, [c("div", Sr, [
2768
+ }, [c("div", Cr, [
2763
2769
  u(j(oe), {
2764
2770
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
2765
2771
  "aria-hidden": "true"
2766
2772
  }),
2767
- c("span", Cr, k(j(pt)(h.value)), 1),
2773
+ c("span", wr, k(j(pt)(h.value)), 1),
2768
2774
  I.value ? (S(), s("button", {
2769
2775
  key: 0,
2770
2776
  type: "button",
2771
2777
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-3 py-2 text-[0.62rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
2772
2778
  onClick: R(ne, ["stop"])
2773
2779
  }, " Retry ")) : o("", !0)
2774
- ])], 8, xr)) : (S(), s("div", wr, [c("div", Tr, [D(e.$slots, "item-icon", {
2780
+ ])], 8, Sr)) : (S(), s("div", Tr, [c("div", Er, [D(e.$slots, "item-icon", {
2775
2781
  icon: j(Dt)(n.item.type),
2776
2782
  item: n.item
2777
2783
  }, () => [(S(), a(O(j(Dt)(n.item.type)), {
2778
2784
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
2779
2785
  "aria-hidden": "true"
2780
2786
  }))])])])),
2781
- c("div", Er, [D(e.$slots, "grid-item-overlay", {
2787
+ c("div", Dr, [D(e.$slots, "grid-item-overlay", {
2782
2788
  active: n.active,
2783
2789
  focused: f.value,
2784
2790
  hovered: p.value,
@@ -2788,27 +2794,27 @@ var gr = ["aria-label"], _r = {
2788
2794
  })])
2789
2795
  ], 34));
2790
2796
  }
2791
- }), Or = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, kr = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ar = {
2797
+ }), kr = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, Ar = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, jr = {
2792
2798
  "data-testid": "vibe-pagination",
2793
2799
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
2794
- }, jr = { class: "whitespace-nowrap" }, Mr = {
2800
+ }, Mr = { class: "whitespace-nowrap" }, Nr = {
2795
2801
  key: 0,
2796
2802
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
2797
- }, Nr = [
2803
+ }, Pr = [
2798
2804
  "data-active",
2799
2805
  "data-index",
2800
2806
  "data-item-id",
2801
2807
  "data-occurrence-key"
2802
- ], Pr = {
2808
+ ], Fr = {
2803
2809
  key: 0,
2804
2810
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
2805
- }, Fr = {
2811
+ }, Ir = {
2806
2812
  key: 1,
2807
2813
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
2808
- }, Ir = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, Lr = {
2814
+ }, Lr = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, Rr = {
2809
2815
  key: 1,
2810
2816
  class: "inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]"
2811
- }, Rr = /* @__PURE__ */ d({
2817
+ }, zr = /* @__PURE__ */ d({
2812
2818
  __name: "ListSurface",
2813
2819
  props: {
2814
2820
  active: {
@@ -2855,7 +2861,7 @@ var gr = ["aria-label"], _r = {
2855
2861
  },
2856
2862
  emits: ["open-fullscreen", "update:activeIndex"],
2857
2863
  setup(e, { emit: n }) {
2858
- let r = e, a = M(), d = n, f = $n({
2864
+ let r = e, a = M(), d = n, f = er({
2859
2865
  active: A(r, "active"),
2860
2866
  items: A(r, "items"),
2861
2867
  activeIndex: A(r, "activeIndex"),
@@ -2879,8 +2885,8 @@ var gr = ["aria-label"], _r = {
2879
2885
  paginationDetail: r.paginationDetail,
2880
2886
  total: r.items.length
2881
2887
  } : null), m = i(() => !p.value || !a["grid-status"] ? [] : a["grid-status"](p.value)), g = i(() => kt(m.value));
2882
- return (e, n) => (S(), s("div", Or, [
2883
- c("div", kr, [c("span", Ar, [c("span", jr, k(j(f).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Mr, k(r.paginationDetail), 1)) : o("", !0)])]),
2888
+ return (e, n) => (S(), s("div", kr, [
2889
+ c("div", Ar, [c("span", jr, [c("span", Mr, k(j(f).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Nr, k(r.paginationDetail), 1)) : o("", !0)])]),
2884
2890
  c("div", {
2885
2891
  ref: j(f).scrollViewportRef,
2886
2892
  "data-testid": "vibe-list-scroll",
@@ -2900,7 +2906,7 @@ var gr = ["aria-label"], _r = {
2900
2906
  "data-occurrence-key": j($)(t),
2901
2907
  class: "absolute will-change-transform",
2902
2908
  style: y(j(f).getCardStyle(n))
2903
- }, [u(Dr, {
2909
+ }, [u(Or, {
2904
2910
  active: n === j(f).resolvedActiveIndex.value,
2905
2911
  index: n,
2906
2912
  item: t,
@@ -2924,26 +2930,26 @@ var gr = ["aria-label"], _r = {
2924
2930
  "report-asset-load",
2925
2931
  "surface-active",
2926
2932
  "onOpen"
2927
- ])], 12, Nr))), 128))], 4)], 544),
2928
- j(f).showScrollbar.value ? (S(), s("div", Pr, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
2933
+ ])], 12, Pr))), 128))], 4)], 544),
2934
+ j(f).showScrollbar.value ? (S(), s("div", Fr, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
2929
2935
  "data-testid": "vibe-list-scrollbar-thumb",
2930
2936
  class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
2931
2937
  style: y(j(f).getScrollbarThumbStyle())
2932
2938
  }, null, 6)])) : o("", !0),
2933
- a["grid-footer"] ? (S(), s("div", Fr, [c("div", Ir, [D(e.$slots, "grid-footer")])])) : o("", !0),
2939
+ a["grid-footer"] ? (S(), s("div", Ir, [c("div", Lr, [D(e.$slots, "grid-footer")])])) : o("", !0),
2934
2940
  p.value ? (S(), s("div", {
2935
2941
  key: 2,
2936
2942
  class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", a["grid-footer"] ? "pb-24" : "pb-6"])
2937
- }, [g.value ? D(e.$slots, "grid-status", v(h({ key: 0 }, p.value))) : (S(), s("span", Lr, k(p.value.message), 1))], 2)) : o("", !0)
2943
+ }, [g.value ? D(e.$slots, "grid-status", v(h({ key: 0 }, p.value))) : (S(), s("span", Rr, k(p.value.message), 1))], 2)) : o("", !0)
2938
2944
  ]));
2939
2945
  }
2940
- }), zr = ["data-surface-mode"], Br = {
2946
+ }), Br = ["data-surface-mode"], Vr = {
2941
2947
  key: 1,
2942
2948
  class: "absolute left-5 top-5 z-30 border border-amber-400/45 bg-black/35 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-amber-100 backdrop-blur"
2943
- }, Vr = {
2949
+ }, Hr = {
2944
2950
  key: 2,
2945
2951
  class: "relative z-[1] grid h-full w-full content-center justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
2946
- }, Hr = ["data-visible", "inert"], Ur = ["data-visible", "inert"], Wr = /* @__PURE__ */ d({
2952
+ }, Ur = ["data-visible", "inert"], Wr = ["data-visible", "inert"], Gr = /* @__PURE__ */ d({
2947
2953
  name: "VibeLayout",
2948
2954
  __name: "Layout",
2949
2955
  props: {
@@ -2996,7 +3002,7 @@ var gr = ["aria-label"], _r = {
2996
3002
  type: "button",
2997
3003
  class: "absolute left-5 top-5 z-30 inline-flex items-center border border-rose-400/55 bg-rose-500/18 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-white backdrop-blur transition hover:bg-rose-500/28",
2998
3004
  onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
2999
- }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", Br, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).items.value.length === 0 ? (S(), s("div", Vr, [j(h).loading.value ? (S(), s(t, { key: 0 }, [u(j(re), {
3005
+ }, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", Vr, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).items.value.length === 0 ? (S(), s("div", Hr, [j(h).loading.value ? (S(), s(t, { key: 0 }, [u(j(re), {
3000
3006
  class: "size-10 animate-spin text-[#f7f1ea]/82",
3001
3007
  "aria-hidden": "true"
3002
3008
  }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)], 64)) : (S(), s(t, { key: 1 }, [
@@ -3017,7 +3023,7 @@ var gr = ["aria-label"], _r = {
3017
3023
  "data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
3018
3024
  inert: j(h).surfaceMode.value !== "list",
3019
3025
  class: "absolute inset-0 z-[2]"
3020
- }, [u(Rr, {
3026
+ }, [u(zr, {
3021
3027
  active: j(h).surfaceMode.value === "list",
3022
3028
  items: j(h).items.value,
3023
3029
  "active-index": j(h).activeIndex.value,
@@ -3072,7 +3078,7 @@ var gr = ["aria-label"], _r = {
3072
3078
  "restore-token",
3073
3079
  "onOpenFullscreen",
3074
3080
  "onUpdate:activeIndex"
3075
- ])], 8, Hr), [[N, j(h).surfaceMode.value === "list"]])]),
3081
+ ])], 8, Ur), [[N, j(h).surfaceMode.value === "list"]])]),
3076
3082
  _: 3
3077
3083
  }), u(r, {
3078
3084
  appear: "",
@@ -3088,7 +3094,7 @@ var gr = ["aria-label"], _r = {
3088
3094
  "data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
3089
3095
  inert: j(h).surfaceMode.value !== "fullscreen",
3090
3096
  class: "absolute inset-0 z-[3]"
3091
- }, [u(fn, {
3097
+ }, [u(pn, {
3092
3098
  items: j(h).items.value,
3093
3099
  active: j(h).surfaceMode.value === "fullscreen",
3094
3100
  "active-index": j(h).activeIndex.value,
@@ -3138,9 +3144,9 @@ var gr = ["aria-label"], _r = {
3138
3144
  "show-back-to-list",
3139
3145
  "onBackToList",
3140
3146
  "onUpdate:activeIndex"
3141
- ])], 8, Ur), [[N, j(h).surfaceMode.value === "fullscreen"]])]),
3147
+ ])], 8, Wr), [[N, j(h).surfaceMode.value === "fullscreen"]])]),
3142
3148
  _: 3
3143
- })], 64)) : (S(), a(fn, {
3149
+ })], 64)) : (S(), a(pn, {
3144
3150
  key: 4,
3145
3151
  items: j(h).items.value,
3146
3152
  active: !0,
@@ -3189,10 +3195,10 @@ var gr = ["aria-label"], _r = {
3189
3195
  "report-asset-load",
3190
3196
  "onBackToList",
3191
3197
  "onUpdate:activeIndex"
3192
- ]))], 8, zr));
3198
+ ]))], 8, Br));
3193
3199
  }
3194
- }), Gr = { install(e) {
3195
- e.component("VibeLayout", Wr);
3200
+ }), Kr = { install(e) {
3201
+ e.component("VibeLayout", Gr);
3196
3202
  } };
3197
3203
  //#endregion
3198
- export { Wr as VibeLayout, Gr as VibePlugin, Gr as default };
3204
+ export { Gr as VibeLayout, Kr as VibePlugin, Kr as default };