@wyxos/vibe 3.1.29 → 3.1.30

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 U = (e) => {
4
4
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
5
5
  return !1;
6
- }, W = (e) => e === "", G = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), te = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ne = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), K = (e) => {
7
- let t = ne(e);
6
+ }, te = (e) => e === "", W = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), G = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), K = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), q = (e) => {
7
+ let t = K(e);
8
8
  return t.charAt(0).toUpperCase() + t.slice(1);
9
- }, q = {
9
+ }, J = {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: 24,
12
12
  height: 24,
@@ -16,27 +16,27 @@ var U = (e) => {
16
16
  "stroke-width": 2,
17
17
  "stroke-linecap": "round",
18
18
  "stroke-linejoin": "round"
19
- }, re = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = q.width, color: s = q.stroke, ...c }, { slots: l }) => m("svg", {
20
- ...q,
19
+ }, ne = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = J.width, color: s = J.stroke, ...c }, { slots: l }) => m("svg", {
20
+ ...J,
21
21
  ...c,
22
22
  width: o,
23
23
  height: o,
24
24
  stroke: s,
25
- "stroke-width": W(n) || W(r) || n === !0 || r === !0 ? Number(i || a || q["stroke-width"]) * 24 / Number(o) : i || a || q["stroke-width"],
26
- class: G("lucide", c.class, ...e ? [`lucide-${te(K(e))}-icon`, `lucide-${te(e)}`] : ["lucide-icon"]),
25
+ "stroke-width": te(n) || te(r) || n === !0 || r === !0 ? Number(i || a || J["stroke-width"]) * 24 / Number(o) : i || a || J["stroke-width"],
26
+ class: W("lucide", c.class, ...e ? [`lucide-${G(q(e))}-icon`, `lucide-${G(e)}`] : ["lucide-icon"]),
27
27
  ...!l.default && !U(c) && { "aria-hidden": "true" }
28
- }, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), J = (e, t) => (n, { slots: r, attrs: i }) => m(re, {
28
+ }, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), Y = (e, t) => (n, { slots: r, attrs: i }) => m(ne, {
29
29
  ...i,
30
30
  ...n,
31
31
  iconNode: t,
32
32
  name: e
33
- }, r), Y = J("arrow-left", [["path", {
33
+ }, r), X = Y("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
- }]]), ie = J("audio-lines", [
39
+ }]]), re = Y("audio-lines", [
40
40
  ["path", {
41
41
  d: "M2 10v3",
42
42
  key: "1fnikh"
@@ -61,7 +61,7 @@ var U = (e) => {
61
61
  d: "M22 10v3",
62
62
  key: "154ddg"
63
63
  }]
64
- ]), ae = J("clapperboard", [
64
+ ]), ie = Y("clapperboard", [
65
65
  ["path", {
66
66
  d: "m12.296 3.464 3.02 3.956",
67
67
  key: "qash78"
@@ -78,13 +78,13 @@ var U = (e) => {
78
78
  d: "m6.18 5.276 3.1 3.899",
79
79
  key: "zjj9t3"
80
80
  }]
81
- ]), oe = J("file", [["path", {
81
+ ]), ae = Y("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
- }]]), X = J("image-plus", [
87
+ }]]), oe = Y("image-plus", [
88
88
  ["path", {
89
89
  d: "M16 5h6",
90
90
  key: "1vod17"
@@ -107,10 +107,10 @@ var U = (e) => {
107
107
  r: "2",
108
108
  key: "af1f0g"
109
109
  }]
110
- ]), se = J("loader-circle", [["path", {
110
+ ]), se = Y("loader-circle", [["path", {
111
111
  d: "M21 12a9 9 0 1 1-6.219-8.56",
112
112
  key: "13zald"
113
- }]]), ce = J("maximize-2", [
113
+ }]]), ce = Y("maximize-2", [
114
114
  ["path", {
115
115
  d: "M15 3h6v6",
116
116
  key: "1q9fwt"
@@ -127,7 +127,7 @@ var U = (e) => {
127
127
  d: "M9 21H3v-6",
128
128
  key: "wtvkvv"
129
129
  }]
130
- ]), le = J("pause", [["rect", {
130
+ ]), le = Y("pause", [["rect", {
131
131
  x: "14",
132
132
  y: "3",
133
133
  width: "5",
@@ -141,10 +141,10 @@ var U = (e) => {
141
141
  height: "18",
142
142
  rx: "1",
143
143
  key: "1wsw3u"
144
- }]]), ue = J("play", [["path", {
144
+ }]]), ue = Y("play", [["path", {
145
145
  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",
146
146
  key: "10ikf1"
147
- }]]), de = J("triangle-alert", [
147
+ }]]), de = Y("triangle-alert", [
148
148
  ["path", {
149
149
  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",
150
150
  key: "wmoenq"
@@ -157,13 +157,13 @@ var U = (e) => {
157
157
  d: "M12 17h.01",
158
158
  key: "p32p05"
159
159
  }]
160
- ]), fe = J("volume-1", [["path", {
160
+ ]), fe = Y("volume-1", [["path", {
161
161
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
162
162
  key: "uqj9uw"
163
163
  }], ["path", {
164
164
  d: "M16 9a5 5 0 0 1 0 6",
165
165
  key: "1q6k2b"
166
- }]]), pe = J("volume-2", [
166
+ }]]), pe = Y("volume-2", [
167
167
  ["path", {
168
168
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
169
169
  key: "uqj9uw"
@@ -176,7 +176,7 @@ var U = (e) => {
176
176
  d: "M19.364 18.364a9 9 0 0 0 0-12.728",
177
177
  key: "ijwkga"
178
178
  }]
179
- ]), me = J("volume-x", [
179
+ ]), me = Y("volume-x", [
180
180
  ["path", {
181
181
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
182
182
  key: "uqj9uw"
@@ -841,7 +841,7 @@ function dt(e) {
841
841
  setSequence: (e) => {
842
842
  w = e;
843
843
  }
844
- }), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), W = i(() => Oe(De(a.value), e.removedIds.value)), G = i(() => je(n.value, e.removedIds.value, P.value)), te = i(() => !N.value.length && !F.value && !!s.value), ne = Qe({
844
+ }), E = i(() => lt(e.fillDelayMs, at)), O = i(() => lt(e.fillDelayStepMs, ot)), k = i(() => typeof e.resolve == "function"), A = i(() => be(e.pageSize)), j = i(() => De(n.value)), M = rt(() => j.value.length), N = i(() => Oe(j.value, e.removedIds.value)), P = i(() => r.value), F = i(() => ye(c.value) || m.value), I = i(() => Ge(n.value, e.removedIds.value)), L = i(() => Ke(n.value, e.removedIds.value)), R = i(() => L.value?.nextCursor ?? null), ee = i(() => o.value ? null : I.value?.previousCursor ?? null), B = i(() => !!R.value && L.value?.nextCursorExhausted !== !0), V = i(() => !!ee.value), H = i(() => _.value || g.value), U = i(() => k.value && !!L.value?.items.length), te = i(() => Oe(De(a.value), e.removedIds.value)), W = i(() => je(n.value, e.removedIds.value, P.value)), G = i(() => !N.value.length && !F.value && !!s.value), K = Qe({
845
845
  autoBuckets: n,
846
846
  clearActiveResolveController(e) {
847
847
  y === e && (y = null);
@@ -878,17 +878,17 @@ function dt(e) {
878
878
  b = e;
879
879
  },
880
880
  waitFillDelay: (e) => d.wait(e)
881
- }), K = it({
881
+ }), q = it({
882
882
  canRefreshTrailingBoundary: U,
883
883
  hasNextPage: B,
884
884
  isInitialLoading: Te,
885
885
  isPageLoadingLocked: H,
886
886
  items: N,
887
887
  loading: F,
888
- prefetchNextPage: J,
888
+ prefetchNextPage: Y,
889
889
  removedIds: e.removedIds,
890
890
  trailingBoundaryBucket: L
891
- }), q = nt({
891
+ }), J = nt({
892
892
  autoBuckets: n,
893
893
  clearActiveResolveController(e) {
894
894
  y === e && (y = null);
@@ -923,19 +923,19 @@ function dt(e) {
923
923
  });
924
924
  z(() => N.value.length, (e) => {
925
925
  if (e === 0) {
926
- r.value = 0, K.schedule();
926
+ r.value = 0, q.schedule();
927
927
  return;
928
928
  }
929
- K.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
929
+ q.resetRefreshAttempt(), o.value &&= (ke(), !1), r.value > e - 1 && (r.value = e - 1);
930
930
  }), z(() => r.value, () => {
931
931
  h.value && ge();
932
932
  }), S(() => {
933
- we() || e.resolve && re();
933
+ we() || e.resolve && ne();
934
934
  }), x(() => {
935
935
  y?.abort(), y = null, d.clear(!0);
936
936
  });
937
- async function re() {
938
- b = re;
937
+ async function ne() {
938
+ b = ne;
939
939
  let t = await xe({
940
940
  continueUntilFilled: !0,
941
941
  cursor: e.initialCursor ?? null,
@@ -944,7 +944,7 @@ function dt(e) {
944
944
  });
945
945
  t && (n.value = t.buckets, r.value = 0, Q());
946
946
  }
947
- async function J() {
947
+ async function Y() {
948
948
  if (H.value || F.value) return;
949
949
  let e = !N.value.length, t = L.value, n = {
950
950
  commitImmediately: e,
@@ -972,7 +972,7 @@ function dt(e) {
972
972
  }
973
973
  await _e(R.value, n);
974
974
  }
975
- async function Y() {
975
+ async function X() {
976
976
  if (!(H.value || !V.value || F.value)) {
977
977
  if (Ee("leading")) {
978
978
  let e = await ve("leading");
@@ -982,43 +982,43 @@ function dt(e) {
982
982
  await Z(ee.value);
983
983
  }
984
984
  }
985
- async function ie() {
986
- if (te.value) {
985
+ async function re() {
986
+ if (G.value) {
987
987
  if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = k.value ? "initializing" : "idle", Ce(), M.reset(), m.value = !1, v.clear(), y?.abort(), y = null, d.clear(!0), we()) {
988
988
  Q();
989
989
  return;
990
990
  }
991
- await re();
991
+ await ne();
992
992
  }
993
993
  }
994
- async function ae() {
995
- if (te.value) return ie();
994
+ async function ie() {
995
+ if (G.value) return re();
996
996
  H.value || c.value !== "failed" || !b || (s.value = null, await b());
997
997
  }
998
- async function oe() {
998
+ async function ae() {
999
999
  if (!a.value.length) return m.value = !1, Q();
1000
1000
  n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
1001
1001
  }
1002
- function X(t) {
1002
+ function oe(t) {
1003
1003
  let n = N.value;
1004
1004
  if (!n.length) return;
1005
1005
  let i = Se(t, 0, n.length - 1);
1006
1006
  i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
1007
1007
  }
1008
1008
  function se(e) {
1009
- h.value = e, K.schedule();
1009
+ h.value = e, q.schedule();
1010
1010
  }
1011
1011
  function ce() {
1012
1012
  _.value = !0, d.clear(!0);
1013
1013
  }
1014
1014
  function le() {
1015
- _.value = !1, K.schedule();
1015
+ _.value = !1, q.schedule();
1016
1016
  }
1017
1017
  function ue() {
1018
- fe(), s.value = null, Ce(), ne.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
1018
+ fe(), s.value = null, Ce(), K.cancel(), a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), m.value = !1, o.value = !1, Q();
1019
1019
  }
1020
1020
  function de() {
1021
- g.value && (fe(), Ce(), ne.cancel(), m.value = !1, Q());
1021
+ g.value && (fe(), Ce(), K.cancel(), m.value = !1, Q());
1022
1022
  }
1023
1023
  function fe() {
1024
1024
  C += 1, y?.abort(), y = null, d.clear(!0), v.clear();
@@ -1045,15 +1045,15 @@ function dt(e) {
1045
1045
  r.value = He(N.value, P.value, e);
1046
1046
  }
1047
1047
  function he() {
1048
- a.value.length > 0 && (!W.value.length || !N.value.length) && oe();
1048
+ a.value.length > 0 && (!te.value.length || !N.value.length) && ae();
1049
1049
  }
1050
1050
  async function ge() {
1051
1051
  if (!(!h.value || Te())) {
1052
1052
  if (!N.value.length) {
1053
- (B.value || U.value) && await J();
1053
+ (B.value || U.value) && await Y();
1054
1054
  return;
1055
1055
  }
1056
- V.value && r.value < 3 && await Y(), B.value && r.value >= N.value.length - 3 && await J();
1056
+ V.value && r.value < 3 && await X(), B.value && r.value >= N.value.length - 3 && await Y();
1057
1057
  }
1058
1058
  }
1059
1059
  async function _e(e, t = {}) {
@@ -1069,7 +1069,7 @@ function dt(e) {
1069
1069
  if (r) {
1070
1070
  if (!r.visibleCount) return n.value = Je(n.value, t.originCursor, e, !0), a.value = [], m.value = !1, Q();
1071
1071
  if (r.canceled) return n.value = [...n.value, ...r.buckets], a.value = [], m.value = !1, Q();
1072
- if (a.value = r.buckets, t.commitImmediately || !N.value.length || !W.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
1072
+ if (a.value = r.buckets, t.commitImmediately || !N.value.length || !te.value.length) return n.value = [...n.value, ...a.value], a.value = [], m.value = !1, Q();
1073
1073
  m.value = !0;
1074
1074
  }
1075
1075
  }
@@ -1090,13 +1090,13 @@ function dt(e) {
1090
1090
  async function ve(e) {
1091
1091
  return b = async () => {
1092
1092
  await ve(e);
1093
- }, q.reloadBoundaryBucket(e);
1093
+ }, J.reloadBoundaryBucket(e);
1094
1094
  }
1095
1095
  function xe(e) {
1096
- return q.collectBuckets(e);
1096
+ return J.collectBuckets(e);
1097
1097
  }
1098
1098
  function Q() {
1099
- c.value = "idle", Ce(), d.clear(), K.schedule();
1099
+ c.value = "idle", Ce(), d.clear(), q.schedule();
1100
1100
  }
1101
1101
  function Ce() {
1102
1102
  l.value = null, u.value = null, p.value = null;
@@ -1121,20 +1121,20 @@ function dt(e) {
1121
1121
  }
1122
1122
  return {
1123
1123
  activeIndex: P,
1124
- canRetryInitialLoad: te,
1124
+ canRetryInitialLoad: G,
1125
1125
  cancel: ue,
1126
1126
  cancelFill: de,
1127
1127
  canRefreshTrailingBoundary: U,
1128
- commitPendingAppend: oe,
1129
- currentCursor: G,
1128
+ commitPendingAppend: ae,
1129
+ currentCursor: W,
1130
1130
  errorMessage: s,
1131
1131
  fillCollectedCount: l,
1132
1132
  fillCursor: u,
1133
1133
  fillDelayRemainingMs: f,
1134
1134
  fillTargetCount: p,
1135
1135
  ...M.refs,
1136
- fillUntil: ne.fillUntil,
1137
- fillUntilEnd: ne.fillUntilEnd,
1136
+ fillUntil: K.fillUntil,
1137
+ fillUntilEnd: K.fillUntilEnd,
1138
1138
  hasNextPage: B,
1139
1139
  hasPreviousPage: V,
1140
1140
  isAutoPrefetchEnabled: h,
@@ -1144,14 +1144,14 @@ function dt(e) {
1144
1144
  loading: F,
1145
1145
  maybePrefetchAround: ge,
1146
1146
  nextCursor: R,
1147
- pendingAppendItems: W,
1147
+ pendingAppendItems: te,
1148
1148
  phase: c,
1149
- prefetchNextPage: J,
1150
- prefetchPreviousPage: Y,
1149
+ prefetchNextPage: Y,
1150
+ prefetchPreviousPage: X,
1151
1151
  previousCursor: ee,
1152
- retryInitialLoad: ie,
1153
- retry: ae,
1154
- setActiveIndex: X,
1152
+ retryInitialLoad: re,
1153
+ retry: ie,
1154
+ setActiveIndex: oe,
1155
1155
  setAutoPrefetchEnabled: se,
1156
1156
  syncActiveIndexAfterVisibilityChange: me,
1157
1157
  unlockPageLoading: le,
@@ -1549,7 +1549,7 @@ var gt = {
1549
1549
  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",
1550
1550
  "aria-label": "Back to list",
1551
1551
  onClick: t[0] ||= (e) => r("back-to-list")
1552
- }, [u(F(Y), {
1552
+ }, [u(F(X), {
1553
1553
  class: "h-4 w-4 stroke-[2.2]",
1554
1554
  "aria-hidden": "true"
1555
1555
  })])) : o("", !0), n.title ? (w(), s("h2", It, M(n.title), 1)) : o("", !0)]), c("div", Lt, [c("span", Rt, [
@@ -1564,10 +1564,10 @@ var gt = {
1564
1564
  ]), k(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", Vt, [...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)]));
1565
1565
  }
1566
1566
  }), Ut = {
1567
- image: X,
1568
- video: ae,
1569
- audio: ie,
1570
- other: oe
1567
+ image: oe,
1568
+ video: ie,
1569
+ audio: re,
1570
+ other: ae
1571
1571
  }, Wt = {
1572
1572
  image: "Image",
1573
1573
  video: "Video",
@@ -2064,20 +2064,20 @@ function On(e) {
2064
2064
  });
2065
2065
  function v(e, t) {
2066
2066
  if (t instanceof HTMLVideoElement) {
2067
- s.set(e, t), G(e, t);
2067
+ s.set(e, t), W(e, t);
2068
2068
  return;
2069
2069
  }
2070
2070
  s.delete(e);
2071
2071
  }
2072
2072
  function y(e, t) {
2073
2073
  if (t instanceof HTMLAudioElement) {
2074
- c.set(e, t), G(e, t);
2074
+ c.set(e, t), W(e, t);
2075
2075
  return;
2076
2076
  }
2077
2077
  c.delete(e);
2078
2078
  }
2079
2079
  function b(e, r) {
2080
- r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
2080
+ r instanceof HTMLImageElement && hn(r) && (t.value[e] = !0, n.value[e] = null, Y(e, r.currentSrc || r.src || re(e)));
2081
2081
  }
2082
2082
  function x() {
2083
2083
  U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
@@ -2099,30 +2099,30 @@ function On(e) {
2099
2099
  H(i, n);
2100
2100
  continue;
2101
2101
  }
2102
- i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), G(n, i);
2102
+ i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Tn(i), W(n, i);
2103
2103
  }
2104
2104
  for (let [e, n] of c.entries()) {
2105
2105
  if (e !== t || r.value[e]?.errorKind) {
2106
2106
  H(n, e);
2107
2107
  continue;
2108
2108
  }
2109
- Tn(n), G(e, n);
2109
+ Tn(n), W(e, n);
2110
2110
  }
2111
2111
  }
2112
2112
  function w(e, t) {
2113
2113
  let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
2114
2114
  if (n) {
2115
2115
  let i = r.value[e]?.ready ?? !1;
2116
- G(e, n, t.type);
2116
+ W(e, n, t.type);
2117
2117
  let a = r.value[e]?.ready ?? !1;
2118
- !i && a && J(e, n.currentSrc || n.src || ie(e));
2118
+ !i && a && Y(e, n.currentSrc || n.src || re(e));
2119
2119
  }
2120
2120
  }
2121
2121
  function T(e, r) {
2122
- t.value[e] = !0, n.value[e] = null, J(e, r);
2122
+ t.value[e] = !0, n.value[e] = null, Y(e, r);
2123
2123
  }
2124
2124
  async function E(r, i) {
2125
- let a = Y(r) ?? e.activeItem.value;
2125
+ let a = X(r) ?? e.activeItem.value;
2126
2126
  t.value[r] = !1, n.value[r] = "generic";
2127
2127
  let o = await xn(i);
2128
2128
  n.value[r] = o, a && e.onAssetError?.({
@@ -2134,7 +2134,7 @@ function On(e) {
2134
2134
  });
2135
2135
  }
2136
2136
  async function O(t, n) {
2137
- let r = K(t), i = W(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2137
+ let r = q(t), i = te(t), a = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2138
2138
  if (r) {
2139
2139
  r.pause();
2140
2140
  try {
@@ -2152,28 +2152,28 @@ function On(e) {
2152
2152
  });
2153
2153
  }
2154
2154
  function k(e, t, n) {
2155
- e.button !== 0 || Date.now() < n || En(e.currentTarget) || re(s.get(t) ?? null);
2155
+ e.button !== 0 || Date.now() < n || En(e.currentTarget) || ne(s.get(t) ?? null);
2156
2156
  }
2157
2157
  function A(e, t, n) {
2158
- e.button !== 0 || Date.now() < n || re(K(t));
2158
+ e.button !== 0 || Date.now() < n || ne(q(t));
2159
2159
  }
2160
2160
  function j(e) {
2161
- let t = q(), n = d.value;
2161
+ let t = J(), n = d.value;
2162
2162
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
2163
2163
  let r = Number.parseFloat(e.target.value);
2164
2164
  if (!Number.isFinite(r)) return;
2165
2165
  let i = kn(r, 0, m.value || 0);
2166
- te(n, i, t), t.currentTime = i;
2166
+ G(n, i, t), t.currentTime = i;
2167
2167
  }
2168
2168
  function M(e) {
2169
- let t = q(), n = d.value;
2169
+ let t = J(), n = d.value;
2170
2170
  if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
2171
2171
  let r = kn(Number.parseFloat(e.target.value), 0, 1);
2172
- t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), G(n, t);
2172
+ t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
2173
2173
  }
2174
2174
  function N() {
2175
- let e = q(), t = d.value;
2176
- !e || !t || (e.muted || e.volume <= 0 ? (e.volume = ne(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), G(t, e));
2175
+ let e = J(), t = d.value;
2176
+ !e || !t || (e.muted || e.volume <= 0 ? (e.volume = K(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
2177
2177
  }
2178
2178
  function P(e) {
2179
2179
  return !!t.value[e] && !n.value[e];
@@ -2200,9 +2200,9 @@ function On(e) {
2200
2200
  async function V(e) {
2201
2201
  if (!ee(e)) return;
2202
2202
  t.value[e] = !1, n.value[e] = null;
2203
- let r = W(e);
2203
+ let r = te(e);
2204
2204
  r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
2205
- let i = K(e);
2205
+ let i = q(e);
2206
2206
  i && H(i, e), l.forEach((t) => {
2207
2207
  t.startsWith(`${e}|`) && l.delete(t);
2208
2208
  }), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
@@ -2212,32 +2212,32 @@ function On(e) {
2212
2212
  try {
2213
2213
  e.currentTime = 0;
2214
2214
  } catch {}
2215
- G(t, e);
2215
+ W(t, e);
2216
2216
  }
2217
2217
  function U() {
2218
2218
  for (let [e, t] of s.entries()) H(t, e);
2219
2219
  for (let [e, t] of c.entries()) H(t, e);
2220
2220
  }
2221
- function W(e) {
2221
+ function te(e) {
2222
2222
  return r.value[e] || (r.value[e] = mn()), r.value[e];
2223
2223
  }
2224
- function G(e, t, n) {
2225
- gn(W(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
2224
+ function W(e, t, n) {
2225
+ gn(te(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
2226
2226
  }
2227
- function te(e, t, n) {
2228
- let r = W(e);
2227
+ function G(e, t, n) {
2228
+ let r = te(e);
2229
2229
  r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.muted = n.muted, r.paused = n.paused, r.volume = Number.isFinite(n.volume) ? n.volume : r.volume;
2230
2230
  }
2231
- function ne(e) {
2231
+ function K(e) {
2232
2232
  return kn(o.value[e] ?? 1, 0, 1);
2233
2233
  }
2234
- function K(e) {
2234
+ function q(e) {
2235
2235
  return s.get(e) ?? c.get(e) ?? null;
2236
2236
  }
2237
- function q() {
2238
- return d.value ? K(d.value) : null;
2237
+ function J() {
2238
+ return d.value ? q(d.value) : null;
2239
2239
  }
2240
- function re(e) {
2240
+ function ne(e) {
2241
2241
  if (e) {
2242
2242
  if (e.paused) {
2243
2243
  Tn(e);
@@ -2246,8 +2246,8 @@ function On(e) {
2246
2246
  e.pause();
2247
2247
  }
2248
2248
  }
2249
- function J(t, n) {
2250
- let r = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2249
+ function Y(t, n) {
2250
+ let r = X(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
2251
2251
  if (!r || !n) return;
2252
2252
  let i = `${t}|${n}`;
2253
2253
  l.has(i) || (l.add(i), e.onAssetLoad?.({
@@ -2257,11 +2257,11 @@ function On(e) {
2257
2257
  url: n
2258
2258
  }));
2259
2259
  }
2260
- function Y(e) {
2260
+ function X(e) {
2261
2261
  return f.value.get(e) ?? null;
2262
2262
  }
2263
- function ie(e) {
2264
- return Y(e)?.url ?? null;
2263
+ function re(e) {
2264
+ return X(e)?.url ?? null;
2265
2265
  }
2266
2266
  return {
2267
2267
  activeAssetErrorKind: g,
@@ -2356,7 +2356,7 @@ function Pn(e, t, n = {}) {
2356
2356
  onEnable() {
2357
2357
  return T.syncMediaPlayback();
2358
2358
  },
2359
- onKeydown: G,
2359
+ onKeydown: W,
2360
2360
  onResize: F
2361
2361
  });
2362
2362
  function P(e, t, n) {
@@ -2395,37 +2395,37 @@ function Pn(e, t, n = {}) {
2395
2395
  function U() {
2396
2396
  m.value = 0, h.value = !1, v = null;
2397
2397
  }
2398
- function W(e) {
2398
+ function te(e) {
2399
2399
  if (!_.value || r.value.length === 0 || h.value || ve(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
2400
2400
  e.preventDefault();
2401
2401
  let t = Date.now();
2402
2402
  t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
2403
2403
  }
2404
- function G(e) {
2404
+ function W(e) {
2405
2405
  !_.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
2406
2406
  }
2407
- function te(e, t) {
2407
+ function G(e, t) {
2408
2408
  T.onVideoClick(e, t, x);
2409
2409
  }
2410
- function ne(e, t) {
2410
+ function K(e, t) {
2411
2411
  T.onAudioCoverClick(e, t, x);
2412
2412
  }
2413
- function K(e) {
2413
+ function q(e) {
2414
2414
  T.onMediaSeekInput(e);
2415
2415
  }
2416
- function q(e) {
2416
+ function J(e) {
2417
2417
  T.onMediaVolumeInput(e);
2418
2418
  }
2419
- function re() {
2419
+ function ne() {
2420
2420
  T.onMediaVolumeToggle();
2421
2421
  }
2422
- function J(e) {
2422
+ function Y(e) {
2423
2423
  return e.type === "image" || e.type === "video";
2424
2424
  }
2425
- function Y(e) {
2425
+ function X(e) {
2426
2426
  return e.type === "audio";
2427
2427
  }
2428
- function ie(e) {
2428
+ function re(e) {
2429
2429
  return Nn(e, S.value, g.value, m.value, h.value);
2430
2430
  }
2431
2431
  return {
@@ -2443,30 +2443,30 @@ function Pn(e, t, n = {}) {
2443
2443
  getAssetRenderKey: T.getAssetRenderKey,
2444
2444
  formatPlaybackTime: ln,
2445
2445
  getImageSource: T.getImageSource,
2446
- getSlideStyle: ie,
2446
+ getSlideStyle: re,
2447
2447
  hasNextPage: c,
2448
2448
  isAtEnd: E,
2449
- isAudio: Y,
2450
- isVisual: J,
2449
+ isAudio: X,
2450
+ isVisual: Y,
2451
2451
  items: r,
2452
2452
  loading: s,
2453
2453
  mediaStates: T.mediaStates,
2454
2454
  isImageReady: T.isImageReady,
2455
2455
  isMediaReady: T.isMediaReady,
2456
- onAudioCoverClick: ne,
2456
+ onAudioCoverClick: K,
2457
2457
  onImageError: T.onImageError,
2458
2458
  onImageLoad: T.onImageLoad,
2459
2459
  onMediaEvent: T.onMediaEvent,
2460
2460
  onMediaError: T.onMediaError,
2461
- onMediaSeekInput: K,
2462
- onMediaVolumeInput: q,
2463
- onMediaVolumeToggle: re,
2461
+ onMediaSeekInput: q,
2462
+ onMediaVolumeInput: J,
2463
+ onMediaVolumeToggle: ne,
2464
2464
  onPointerCancel: V,
2465
2465
  onPointerDown: z,
2466
2466
  onPointerMove: ee,
2467
2467
  onPointerUp: B,
2468
- onVideoClick: te,
2469
- onWheel: W,
2468
+ onVideoClick: G,
2469
+ onWheel: te,
2470
2470
  registerAudioElement: T.registerAudioElement,
2471
2471
  registerImageElement: T.registerImageElement,
2472
2472
  registerVideoElement: T.registerVideoElement,
@@ -2677,24 +2677,44 @@ var Gn = {
2677
2677
  }, null, 4)]))])) : o("", !0)
2678
2678
  ])]));
2679
2679
  }
2680
- }), er = 1, tr = .5;
2681
- function nr(e) {
2680
+ }), er = ["data-surface"], tr = ["data-surface"], nr = /* @__PURE__ */ d({
2681
+ inheritAttrs: !1,
2682
+ __name: "SurfaceEmptyState",
2683
+ props: {
2684
+ message: {},
2685
+ mode: {},
2686
+ surface: {}
2687
+ },
2688
+ setup(e) {
2689
+ let t = I();
2690
+ return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
2691
+ "data-testid": "vibe-empty-state-inline",
2692
+ "data-surface": e.surface,
2693
+ class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
2694
+ }), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, er)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
2695
+ "data-testid": "vibe-empty-state-badge",
2696
+ "data-surface": e.surface,
2697
+ class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
2698
+ }, M(e.message), 11, tr)])], 16));
2699
+ }
2700
+ }), rr = 1, ir = .5;
2701
+ function ar(e) {
2682
2702
  if (e.type !== "image" && e.type !== "video") return {
2683
- width: er,
2684
- height: er,
2703
+ width: rr,
2704
+ height: rr,
2685
2705
  source: "fallback"
2686
2706
  };
2687
2707
  let t = e.preview?.width, n = e.preview?.height;
2688
- if (dr(t) && dr(n)) {
2689
- let r = fr(e, t, n);
2708
+ if (mr(t) && mr(n)) {
2709
+ let r = hr(e, t, n);
2690
2710
  return {
2691
2711
  width: r.width,
2692
2712
  height: r.height,
2693
2713
  source: "preview"
2694
2714
  };
2695
2715
  }
2696
- if (dr(e.width) && dr(e.height)) {
2697
- let t = fr(e, e.width, e.height);
2716
+ if (mr(e.width) && mr(e.height)) {
2717
+ let t = hr(e, e.width, e.height);
2698
2718
  return {
2699
2719
  width: t.width,
2700
2720
  height: t.height,
@@ -2702,24 +2722,24 @@ function nr(e) {
2702
2722
  };
2703
2723
  }
2704
2724
  return {
2705
- width: er,
2706
- height: er,
2725
+ width: rr,
2726
+ height: rr,
2707
2727
  source: "fallback"
2708
2728
  };
2709
2729
  }
2710
- function rr(e, t) {
2730
+ function or(e, t) {
2711
2731
  return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
2712
2732
  }
2713
- function ir(e, t, n, r = 0) {
2733
+ function sr(e, t, n, r = 0) {
2714
2734
  if (!e || e <= 0 || !t || t <= 0) return n;
2715
2735
  let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
2716
2736
  return !a || a <= 0 ? n : a / t;
2717
2737
  }
2718
- function ar(e, t) {
2719
- let n = nr(e);
2738
+ function cr(e, t) {
2739
+ let n = ar(e);
2720
2740
  return n.height / n.width * t;
2721
2741
  }
2722
- function or(e, t) {
2742
+ function lr(e, t) {
2723
2743
  let n = Array.from({ length: t.columnCount }, () => 0), r = {
2724
2744
  positions: Array(e.length),
2725
2745
  heights: Array(e.length),
@@ -2728,18 +2748,18 @@ function or(e, t) {
2728
2748
  indexById: /* @__PURE__ */ new Map(),
2729
2749
  columnHeights: n
2730
2750
  };
2731
- return sr(r, e, {
2751
+ return ur(r, e, {
2732
2752
  ...t,
2733
2753
  startIndex: 0
2734
2754
  }), r;
2735
2755
  }
2736
- function sr(e, t, n) {
2756
+ function ur(e, t, n) {
2737
2757
  for (let r = 0; r < t.length; r += 1) {
2738
2758
  let i = t[r], a = n.startIndex + r;
2739
2759
  e.indexById.set($(i), a);
2740
2760
  let o = 0;
2741
2761
  for (let t = 1; t < e.columnHeights.length; t += 1) e.columnHeights[t] < e.columnHeights[o] && (o = t);
2742
- let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = ar(i, n.columnWidth);
2762
+ let s = o * (n.columnWidth + n.gapX), c = e.columnHeights[o], l = cr(i, n.columnWidth);
2743
2763
  e.positions[a] = {
2744
2764
  x: s + (n.positionOffsetX ?? 0),
2745
2765
  y: c + (n.positionOffsetY ?? 0)
@@ -2752,20 +2772,20 @@ function sr(e, t, n) {
2752
2772
  }
2753
2773
  return e;
2754
2774
  }
2755
- function cr(e, t) {
2775
+ function dr(e, t) {
2756
2776
  let n = [...t.columnHeights], r = t.contentHeight;
2757
2777
  for (let i of e) {
2758
2778
  let e = 0;
2759
2779
  for (let t = 1; t < n.length; t += 1) n[t] < n[e] && (e = t);
2760
- let a = n[e], o = ar(i, t.columnWidth);
2780
+ let a = n[e], o = cr(i, t.columnWidth);
2761
2781
  n[e] = a + o + t.gapY, r = Math.max(r, a + o);
2762
2782
  }
2763
2783
  return r;
2764
2784
  }
2765
- function lr(e) {
2785
+ function fr(e) {
2766
2786
  return e.addedItems.length === 0 || e.removedItemCount > 0 || e.isPrepend || e.previousItems.length === 0 || e.layoutItemCount !== e.previousItems.length || e.columnHeights.length !== e.columnCount || e.currentItems.length !== e.previousItems.length + e.addedItems.length ? !1 : e.previousItems.every((t, n) => $(t) === $(e.currentItems[n]));
2767
2787
  }
2768
- function ur(e) {
2788
+ function pr(e) {
2769
2789
  if (e.itemCount <= 0) return [];
2770
2790
  if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
2771
2791
  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();
@@ -2775,11 +2795,11 @@ function ur(e) {
2775
2795
  }
2776
2796
  return Array.from(a).sort((e, t) => e - t);
2777
2797
  }
2778
- function dr(e) {
2798
+ function mr(e) {
2779
2799
  return typeof e == "number" && Number.isFinite(e) && e > 0;
2780
2800
  }
2781
- function fr(e, t, n) {
2782
- return e.type !== "image" || n / t >= tr ? {
2801
+ function hr(e, t, n) {
2802
+ return e.type !== "image" || n / t >= ir ? {
2783
2803
  width: t,
2784
2804
  height: n
2785
2805
  } : {
@@ -2789,9 +2809,9 @@ function fr(e, t, n) {
2789
2809
  }
2790
2810
  //#endregion
2791
2811
  //#region src/components/viewer-core/listPreview.ts
2792
- var pr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, mr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, hr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
2793
- function gr(e) {
2794
- let t = _r(e), n = t?.url, r = nr(e), i = e.title?.trim() || Kt(e.type);
2812
+ var gr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, _r = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, vr = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
2813
+ function yr(e) {
2814
+ let t = br(e), n = t?.url, r = ar(e), i = e.title?.trim() || Kt(e.type);
2795
2815
  return t?.mediaType === "video" && typeof n == "string" ? {
2796
2816
  kind: "video",
2797
2817
  url: n,
@@ -2810,13 +2830,13 @@ function gr(e) {
2810
2830
  width: r.width,
2811
2831
  height: r.height,
2812
2832
  label: i
2813
- } : typeof n == "string" && yr(e, n) ? {
2833
+ } : typeof n == "string" && Sr(e, n) ? {
2814
2834
  kind: "video",
2815
2835
  url: n,
2816
2836
  width: r.width,
2817
2837
  height: r.height,
2818
2838
  label: i
2819
- } : typeof n == "string" && vr(e, n) ? {
2839
+ } : typeof n == "string" && xr(e, n) ? {
2820
2840
  kind: "image",
2821
2841
  url: n,
2822
2842
  width: r.width,
@@ -2830,188 +2850,51 @@ function gr(e) {
2830
2850
  label: i
2831
2851
  };
2832
2852
  }
2833
- function _r(e) {
2853
+ function br(e) {
2834
2854
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
2835
2855
  }
2836
- function vr(e, t) {
2837
- return e.type !== "image" || typeof t != "string" ? !1 : pr.test(t) || br(t);
2856
+ function xr(e, t) {
2857
+ return e.type !== "image" || typeof t != "string" ? !1 : gr.test(t) || Cr(t);
2838
2858
  }
2839
- function yr(e, t) {
2840
- return e.type !== "video" || typeof t != "string" ? !1 : mr.test(t) || xr(t);
2859
+ function Sr(e, t) {
2860
+ return e.type !== "video" || typeof t != "string" ? !1 : _r.test(t) || wr(t);
2841
2861
  }
2842
- function br(e) {
2862
+ function Cr(e) {
2843
2863
  return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
2844
2864
  }
2845
- function xr(e) {
2846
- return hr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
2865
+ function wr(e) {
2866
+ return vr.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
2847
2867
  }
2848
2868
  //#endregion
2849
- //#region src/components/FullscreenPreviewRail.vue?vue&type=script&setup=true&lang.ts
2850
- var Sr = {
2851
- key: 0,
2852
- "data-testid": "vibe-fullscreen-next-previews",
2853
- class: "pointer-events-auto absolute right-[clamp(1.25rem,2.6vw,2.25rem)] top-1/2 z-[4] flex -translate-y-1/2 items-center justify-end gap-3 max-[860px]:hidden"
2854
- }, Cr = [
2855
- "data-index",
2856
- "aria-label",
2857
- "title",
2858
- "onClick"
2859
- ], wr = [
2860
- "src",
2861
- "onError",
2862
- "onLoad"
2863
- ], Tr = [
2864
- "src",
2865
- "onError",
2866
- "onLoadedmetadata"
2867
- ], Er = {
2868
- key: 2,
2869
- class: "grid h-full w-full place-items-center bg-white/6",
2870
- "aria-hidden": "true"
2871
- }, Dr = {
2872
- key: 3,
2873
- class: "pointer-events-none absolute left-2 top-2 inline-flex h-6 w-6 items-center justify-center border border-white/14 bg-black/55 backdrop-blur-[14px]",
2874
- "aria-hidden": "true"
2875
- }, Or = {
2876
- key: 4,
2877
- "data-testid": "vibe-fullscreen-next-preview-spinner",
2878
- class: "pointer-events-none absolute inset-0 grid place-items-center bg-black/18",
2879
- "aria-hidden": "true"
2880
- }, kr = { class: "inline-flex h-9 w-9 items-center justify-center rounded-full bg-black/50 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ar = { class: "pointer-events-none absolute bottom-1.5 right-1.5 border border-white/14 bg-black/58 px-1.5 py-1 text-[0.56rem] font-bold leading-none tracking-[0.12em] text-[#f7f1ea]/78 backdrop-blur-[14px]" }, jr = /* @__PURE__ */ d({
2881
- __name: "FullscreenPreviewRail",
2882
- props: {
2883
- activeIndex: {},
2884
- items: {},
2885
- maxItems: { default: 2 }
2886
- },
2887
- emits: ["select"],
2888
- setup(e, { emit: n }) {
2889
- let r = e, l = n, d = D({}), f = i(() => {
2890
- let e = Math.min(Math.max(r.activeIndex + 1, 0), r.items.length);
2891
- return r.items.slice(e, e + r.maxItems).map((t, n) => ({
2892
- asset: gr(t),
2893
- index: e + n,
2894
- item: t
2895
- }));
2896
- });
2897
- z(f, (e) => {
2898
- let t = {};
2899
- for (let n of e) {
2900
- let e = p(n);
2901
- _(n) && (t[e] = d.value[e] ?? "loading");
2902
- }
2903
- d.value = t;
2904
- }, { immediate: !0 });
2905
- function p(e) {
2906
- return `${e.item.id}:${e.index}:${e.asset.url ?? "fallback"}`;
2907
- }
2908
- function m(e) {
2909
- return `Open item ${e.index + 1} of ${r.items.length}: ${e.asset.label}`;
2910
- }
2911
- function h(e) {
2912
- return g(e) ? "object-cover" : "object-contain";
2913
- }
2914
- function g(e) {
2915
- if (e.width <= 0 || e.height <= 0) return !1;
2916
- let t = e.width / e.height;
2917
- return (t >= 1 ? 1 - 1 / t : 1 - t) >= .3;
2918
- }
2919
- function _(e) {
2920
- return !!e.asset.url && (e.asset.kind === "image" || e.asset.kind === "video");
2921
- }
2922
- function y(e) {
2923
- return _(e) && d.value[p(e)] === "loading";
2924
- }
2925
- function b(e, t) {
2926
- return d.value[p(e)] === "ready" ? t : "opacity-0";
2927
- }
2928
- function x(e, t) {
2929
- d.value = {
2930
- ...d.value,
2931
- [p(e)]: t
2932
- };
2933
- }
2934
- function S(e) {
2935
- return e === 0 ? "h-[220px] w-[220px]" : "h-[140px] w-[140px]";
2936
- }
2937
- function C(e) {
2938
- return e === 0 ? "opacity-90" : "opacity-40";
2939
- }
2940
- return (e, n) => f.value.length ? (w(), s("div", Sr, [(w(!0), s(t, null, O(f.value, (e, t) => (w(), s("button", {
2941
- key: `${e.item.id}-${e.index}`,
2942
- type: "button",
2943
- "data-testid": "vibe-fullscreen-next-preview",
2944
- "data-index": e.index,
2945
- "aria-label": m(e),
2946
- title: e.asset.label,
2947
- class: v(["group relative overflow-hidden border border-white/14 bg-black/45 text-[#f7f1ea] shadow-[0_20px_50px_-30px_rgba(0,0,0,0.9)] backdrop-blur-[18px] transition hover:border-white/34 hover:bg-black/58 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]", S(t)]),
2948
- onClick: (t) => l("select", e.index)
2949
- }, [
2950
- e.asset.kind === "image" ? (w(), s("img", {
2951
- key: 0,
2952
- src: e.asset.url ?? void 0,
2953
- alt: "",
2954
- "aria-hidden": "true",
2955
- draggable: "false",
2956
- loading: "lazy",
2957
- class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, C(t))]]),
2958
- onError: (t) => x(e, "error"),
2959
- onLoad: (t) => x(e, "ready")
2960
- }, null, 42, wr)) : e.asset.kind === "video" ? (w(), s("video", {
2961
- key: 1,
2962
- src: e.asset.url ?? void 0,
2963
- "aria-hidden": "true",
2964
- class: v(["h-full w-full bg-black/18 object-center transition-[opacity,transform] duration-300 group-hover:scale-[1.04]", [h(e.asset), b(e, C(t))]]),
2965
- muted: "",
2966
- playsinline: "",
2967
- preload: "metadata",
2968
- onError: (t) => x(e, "error"),
2969
- onLoadedmetadata: (t) => x(e, "ready")
2970
- }, null, 42, Tr)) : (w(), s("span", Er, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-5 w-5 stroke-[1.9] text-[#f7f1ea]/70" }))])),
2971
- e.asset.kind === "video" ? (w(), s("span", Dr, [(w(), a(A(F(Gt)(e.item.type)), { class: "h-3.5 w-3.5 stroke-[2]" }))])) : o("", !0),
2972
- y(e) ? (w(), s("span", Or, [c("span", kr, [u(F(se), { class: "h-4 w-4 animate-spin stroke-[1.9] text-[#f7f1ea]/82" })])])) : o("", !0),
2973
- c("span", Ar, M(e.index + 1) + " / " + M(r.items.length), 1)
2974
- ], 10, Cr))), 128))])) : o("", !0);
2975
- }
2976
- }), Mr = ["data-surface"], Nr = ["data-surface"], Pr = /* @__PURE__ */ d({
2977
- inheritAttrs: !1,
2978
- __name: "SurfaceEmptyState",
2979
- props: {
2980
- message: {},
2981
- mode: {},
2982
- surface: {}
2983
- },
2984
- setup(e) {
2985
- let t = I();
2986
- return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, F(t), {
2987
- "data-testid": "vibe-empty-state-inline",
2988
- "data-surface": e.surface,
2989
- class: ["pointer-events-none absolute z-[4] text-center", e.surface === "grid" ? "inset-x-0 top-[clamp(6rem,22vh,11rem)] flex justify-center px-6" : "inset-0 grid place-items-center px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)]"]
2990
- }), [k(n.$slots, "default", {}, () => [c("p", { class: v(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, M(e.message), 3)])], 16, Mr)) : (w(), s("div", g({ key: 1 }, F(t), { class: ["pointer-events-none absolute z-[4]", e.surface === "grid" ? "inset-x-0 bottom-0 flex justify-center px-6" : "bottom-[1.8rem] left-1/2 -translate-x-1/2 max-[720px]:bottom-[1.3rem]"] }), [k(n.$slots, "default", {}, () => [c("span", {
2991
- "data-testid": "vibe-empty-state-badge",
2992
- "data-surface": e.surface,
2993
- class: v(["inline-flex items-center border border-white/14 backdrop-blur-[18px]", e.surface === "grid" ? "bg-black/55 px-4 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/72" : "w-auto bg-black/40 px-5 py-3 text-[0.82rem] font-medium tracking-[0.08em] text-[#f7f1ea]/74 max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center"])
2994
- }, M(e.message), 11, Nr)])], 16));
2995
- }
2996
- }), Fr = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Ir = {
2869
+ //#region src/components/viewer-core/fullscreenPreviews.ts
2870
+ function Tr(e, t, n = 2) {
2871
+ return e.slice(t + 1, t + 1 + n).map((e, n) => ({
2872
+ asset: yr(e),
2873
+ index: t + n + 1,
2874
+ item: e
2875
+ }));
2876
+ }
2877
+ //#endregion
2878
+ //#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
2879
+ var Er = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Dr = {
2997
2880
  key: 0,
2998
2881
  class: "relative h-full min-h-0"
2999
- }, Lr = [
2882
+ }, Or = [
3000
2883
  "data-item-id",
3001
2884
  "data-occurrence-key",
3002
2885
  "data-index",
3003
2886
  "data-active",
3004
2887
  "aria-hidden"
3005
- ], Rr = {
2888
+ ], kr = {
3006
2889
  key: 0,
3007
2890
  "data-testid": "vibe-asset-spinner",
3008
2891
  class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
3009
- }, zr = { 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 = ["data-kind"], Vr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Hr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Ur = ["onClick"], Wr = [
2892
+ }, Ar = { 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]" }, jr = ["data-kind"], Mr = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Nr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Pr = ["onClick"], Fr = [
3010
2893
  "src",
3011
2894
  "alt",
3012
2895
  "onLoad",
3013
2896
  "onError"
3014
- ], Gr = [
2897
+ ], Ir = [
3015
2898
  "loop",
3016
2899
  "src",
3017
2900
  "preload",
@@ -3030,15 +2913,15 @@ var Sr = {
3030
2913
  "onStalled",
3031
2914
  "onTimeupdate",
3032
2915
  "onWaiting"
3033
- ], Kr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, qr = [
2916
+ ], Lr = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Rr = [
3034
2917
  "aria-label",
3035
2918
  "disabled",
3036
2919
  "onClick"
3037
- ], Jr = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Yr = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Xr = {
2920
+ ], zr = { class: "relative z-[1] inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-emerald-500/12 p-4 backdrop-blur-[20px]" }, Br = { class: "pointer-events-none absolute bottom-4 right-4 inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 backdrop-blur-[18px]" }, Vr = {
3038
2921
  key: 0,
3039
2922
  "data-testid": "vibe-asset-spinner",
3040
2923
  class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
3041
- }, Zr = { 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]" }, Qr = ["data-kind"], $r = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, ei = ["onClick"], ti = [
2924
+ }, Hr = { 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]" }, Ur = ["data-kind"], Wr = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Gr = ["onClick"], Kr = [
3042
2925
  "src",
3043
2926
  "preload",
3044
2927
  "onCanplay",
@@ -3054,22 +2937,22 @@ var Sr = {
3054
2937
  "onStalled",
3055
2938
  "onTimeupdate",
3056
2939
  "onWaiting"
3057
- ], ni = {
2940
+ ], qr = {
3058
2941
  key: 2,
3059
2942
  class: "relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
3060
- }, ri = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, ii = {
2943
+ }, Jr = { class: "inline-flex min-h-[4.25rem] min-w-[4.25rem] items-center justify-center border border-white/18 bg-white/8 p-4 backdrop-blur-[20px]" }, Yr = {
3061
2944
  key: 0,
3062
2945
  "data-testid": "vibe-fullscreen-overlay",
3063
2946
  class: "pointer-events-none absolute inset-0 z-[6]"
3064
- }, ai = { class: "h-full w-full" }, oi = {
2947
+ }, Xr = { class: "h-full w-full" }, Zr = {
3065
2948
  key: 0,
3066
2949
  "data-testid": "vibe-fullscreen-aside",
3067
2950
  class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
3068
- }, si = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ci = {
2951
+ }, Qr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, $r = {
3069
2952
  key: 0,
3070
2953
  "data-testid": "vibe-fullscreen-aside",
3071
2954
  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]"
3072
- }, li = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ui = 1280, di = 768, fi = /* @__PURE__ */ d({
2955
+ }, ei = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, ti = 1280, ni = 768, ri = /* @__PURE__ */ d({
3073
2956
  __name: "FullscreenSurface",
3074
2957
  props: {
3075
2958
  active: {
@@ -3135,7 +3018,7 @@ var Sr = {
3135
3018
  enabled: N(d, "active"),
3136
3019
  onAssetError: d.reportAssetError ?? void 0,
3137
3020
  onAssetLoad: d.reportAssetLoad ?? void 0
3138
- }), _ = D(typeof window > "u" ? ui : window.innerWidth || ui), C = rn({
3021
+ }), _ = D(typeof window > "u" ? ti : window.innerWidth || ti), C = rn({
3139
3022
  active: N(d, "active"),
3140
3023
  items: h.items,
3141
3024
  resolvedActiveIndex: h.resolvedActiveIndex,
@@ -3152,24 +3035,25 @@ var Sr = {
3152
3035
  fullscreenMedia: C,
3153
3036
  updateDominantToneFromImageElement: ve,
3154
3037
  viewer: h
3155
- }), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < di ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), W = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), G = i(() => {
3038
+ }), z = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), ee = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), V = i(() => _.value < ni ? "vertical" : "horizontal"), U = i(() => ee.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), te = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => {
3156
3039
  let e = h.activeItem.value;
3157
3040
  return e ? {
3158
3041
  hasNextPage: d.hasNextPage,
3159
3042
  index: h.resolvedActiveIndex.value,
3160
3043
  item: e,
3161
3044
  loading: d.loading,
3045
+ nextPreviews: Tr(h.items.value, h.resolvedActiveIndex.value),
3162
3046
  paginationDetail: d.paginationDetail,
3163
3047
  total: d.items.length
3164
3048
  } : null;
3165
- }), te = i(() => !G.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](G.value)), ne = i(() => !G.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](G.value)), K = i(() => !d.showStatusBadges || !G.value || !h.statusKind.value || !h.statusMessage.value ? null : {
3166
- ...G.value,
3049
+ }), G = i(() => !W.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](W.value)), K = i(() => !W.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](W.value)), q = i(() => !d.showStatusBadges || !W.value || !h.statusKind.value || !h.statusMessage.value ? null : {
3050
+ ...W.value,
3167
3051
  kind: h.statusKind.value,
3168
3052
  message: h.statusMessage.value
3169
- }), q = i(() => !K.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](K.value)), re = i(() => ({
3170
- gridTemplateColumns: ie.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
3053
+ }), J = i(() => !q.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](q.value)), ne = i(() => ({
3054
+ gridTemplateColumns: re.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
3171
3055
  transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
3172
- })), J = i(() => an(te.value)), Y = i(() => an(ne.value)), ie = i(() => Y.value && _.value >= ui), ae = i(() => Y.value && !ie.value), oe = i(() => an(q.value)), { emptyStateProps: X, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
3056
+ })), Y = i(() => an(G.value)), X = i(() => an(K.value)), re = i(() => X.value && _.value >= ti), ie = i(() => X.value && !re.value), ae = i(() => an(J.value)), { emptyStateProps: oe, showBadgeEmptyState: ce, showCustomEmptyState: fe, showInlineEmptyState: pe } = cn({
3173
3057
  emptyStateMode: N(d, "emptyStateMode"),
3174
3058
  itemCount: i(() => d.items.length),
3175
3059
  loading: N(d, "loading"),
@@ -3182,7 +3066,7 @@ var Sr = {
3182
3066
  window.removeEventListener("resize", me);
3183
3067
  });
3184
3068
  function me() {
3185
- _.value = window.innerWidth || ui;
3069
+ _.value = window.innerWidth || ti;
3186
3070
  }
3187
3071
  function he(e, t) {
3188
3072
  C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ve(e, t);
@@ -3211,24 +3095,24 @@ var Sr = {
3211
3095
  let a = i.play();
3212
3096
  a && typeof a.catch == "function" && a.catch(() => {});
3213
3097
  }
3214
- return (e, n) => (w(), s("div", Fr, [
3098
+ return (e, n) => (w(), s("div", Er, [
3215
3099
  c("div", {
3216
3100
  class: v(["absolute inset-0 transition-[background] duration-200", E.value]),
3217
3101
  style: b(F(P))
3218
3102
  }, null, 6),
3219
3103
  c("div", {
3220
3104
  class: "relative z-[1] grid h-full min-h-0",
3221
- style: b(re.value)
3105
+ style: b(ne.value)
3222
3106
  }, [c("div", {
3223
3107
  ref: "viewer.stageRef",
3224
3108
  "data-testid": "vibe-stage",
3225
3109
  class: "relative h-full min-h-0 touch-none overflow-hidden",
3226
- onPointerdown: n[2] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
3227
- onPointermove: n[3] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
3228
- onPointerup: n[4] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
3229
- onPointercancel: n[5] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
3230
- onWheel: n[6] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
3231
- }, [F(h).activeItem.value ? (w(), s("div", Ir, [
3110
+ onPointerdown: n[1] ||= (...e) => F(h).onPointerDown && F(h).onPointerDown(...e),
3111
+ onPointermove: n[2] ||= (...e) => F(h).onPointerMove && F(h).onPointerMove(...e),
3112
+ onPointerup: n[3] ||= (...e) => F(h).onPointerUp && F(h).onPointerUp(...e),
3113
+ onPointercancel: n[4] ||= (...e) => F(h).onPointerCancel && F(h).onPointerCancel(...e),
3114
+ onWheel: n[5] ||= (...e) => F(h).onWheel && F(h).onWheel(...e)
3115
+ }, [F(h).activeItem.value ? (w(), s("div", Dr, [
3232
3116
  (w(!0), s(t, null, O(F(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
3233
3117
  key: F(C).getItemKey(r),
3234
3118
  "data-testid": "vibe-slide",
@@ -3245,7 +3129,7 @@ var Sr = {
3245
3129
  }, null, 6), F(h).isVisual(r) ? (w(), s("div", {
3246
3130
  key: 0,
3247
3131
  class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === F(h).resolvedActiveIndex.value ? U.value : ""])
3248
- }, [F(C).isAssetLoading(i, r) ? (w(), s("div", Rr, [c("span", zr, [u(F(se), {
3132
+ }, [F(C).isAssetLoading(i, r) ? (w(), s("div", kr, [c("span", Ar, [u(F(se), {
3249
3133
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3250
3134
  "aria-hidden": "true"
3251
3135
  })])])) : o("", !0), F(C).isAssetErrored(i, r) ? (w(), s("div", {
@@ -3253,19 +3137,19 @@ var Sr = {
3253
3137
  "data-testid": "vibe-asset-error",
3254
3138
  "data-kind": F(C).getAssetErrorKind(r),
3255
3139
  class: "grid h-full w-full place-items-center"
3256
- }, [c("div", Vr, [
3140
+ }, [c("div", Mr, [
3257
3141
  u(F(de), {
3258
3142
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
3259
3143
  "aria-hidden": "true"
3260
3144
  }),
3261
- c("p", Hr, M(F(C).getAssetErrorLabel(r)), 1),
3145
+ c("p", Nr, M(F(C).getAssetErrorLabel(r)), 1),
3262
3146
  F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
3263
3147
  key: 0,
3264
3148
  type: "button",
3265
3149
  class: "inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
3266
3150
  onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
3267
- }, " Retry ", 8, Ur)) : o("", !0)
3268
- ])], 8, Br)) : r.type === "image" ? (w(), s("img", {
3151
+ }, " Retry ", 8, Pr)) : o("", !0)
3152
+ ])], 8, jr)) : r.type === "image" ? (w(), s("img", {
3269
3153
  key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3270
3154
  src: F(C).getFullscreenImageSource(i, r),
3271
3155
  alt: r.title ?? "",
@@ -3276,7 +3160,7 @@ var Sr = {
3276
3160
  ref: (e) => he(F(C).getItemKey(r), e),
3277
3161
  onLoad: (e) => F(R).onFullscreenImageLoad(e, i, r),
3278
3162
  onError: (e) => F(R).onFullscreenImageError(i, r)
3279
- }, null, 42, Wr)) : (w(), s("video", {
3163
+ }, null, 42, Fr)) : (w(), s("video", {
3280
3164
  key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3281
3165
  class: v(["block h-auto max-h-full w-auto max-w-full cursor-pointer object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", F(h).isMediaReady(F(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
3282
3166
  playsinline: "",
@@ -3300,10 +3184,10 @@ var Sr = {
3300
3184
  onStalled: (e) => Z(i, r, e),
3301
3185
  onTimeupdate: (e) => Z(i, r, e),
3302
3186
  onWaiting: (e) => Z(i, r, e)
3303
- }, null, 42, Gr))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
3187
+ }, null, 42, Ir))], 2)) : F(h).isAudio(r) ? (w(), s("div", {
3304
3188
  key: 1,
3305
3189
  class: v(["relative z-[1] grid w-full max-w-[1100px] justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center", i === F(h).resolvedActiveIndex.value ? U.value : ""])
3306
- }, [c("div", Kr, [
3190
+ }, [c("div", Lr, [
3307
3191
  c("button", {
3308
3192
  type: "button",
3309
3193
  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]",
@@ -3311,25 +3195,25 @@ var Sr = {
3311
3195
  disabled: !!F(C).getAssetErrorKind(r),
3312
3196
  onClick: (e) => F(h).onAudioCoverClick(e, F(C).getItemKey(r))
3313
3197
  }, [
3314
- n[7] ||= 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),
3315
- n[8] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
3316
- c("span", Jr, [k(e.$slots, "item-icon", {
3198
+ 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),
3199
+ n[7] ||= c("span", { class: "pointer-events-none absolute h-[clamp(220px,30vw,360px)] w-[clamp(220px,30vw,360px)] border border-white/8 bg-[radial-gradient(circle,rgba(255,255,255,0.08),transparent_62%)]" }, null, -1),
3200
+ c("span", zr, [k(e.$slots, "item-icon", {
3317
3201
  icon: F(Gt)(r.type),
3318
3202
  item: r
3319
3203
  }, () => [(w(), a(A(F(Gt)(r.type)), {
3320
3204
  class: "h-6 w-6 stroke-[1.9]",
3321
3205
  "aria-hidden": "true"
3322
3206
  }))])]),
3323
- c("span", Yr, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
3207
+ c("span", Br, [(w(), a(A(F(h).mediaStates.value[F(C).getItemKey(r)]?.paused ?? !0 ? F(ue) : F(le)), {
3324
3208
  class: "h-4 w-4 stroke-2",
3325
3209
  "aria-hidden": "true"
3326
3210
  }))])
3327
- ], 8, qr),
3328
- F(C).isAssetLoading(i, r) ? (w(), s("div", Xr, [c("span", Zr, [u(F(se), {
3211
+ ], 8, Rr),
3212
+ F(C).isAssetLoading(i, r) ? (w(), s("div", Vr, [c("span", Hr, [u(F(se), {
3329
3213
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
3330
3214
  "aria-hidden": "true"
3331
3215
  })])])) : o("", !0),
3332
- F(C).getAssetErrorKind(r) ? (w(), s(t, { key: 1 }, [n[9] ||= 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", {
3216
+ F(C).getAssetErrorKind(r) ? (w(), 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", {
3333
3217
  "data-testid": "vibe-asset-error",
3334
3218
  "data-kind": F(C).getAssetErrorKind(r),
3335
3219
  class: "relative z-[1] grid justify-items-center gap-4"
@@ -3338,14 +3222,14 @@ var Sr = {
3338
3222
  class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
3339
3223
  "aria-hidden": "true"
3340
3224
  }),
3341
- c("p", $r, M(F(C).getAssetErrorLabel(r)), 1),
3225
+ c("p", Wr, M(F(C).getAssetErrorLabel(r)), 1),
3342
3226
  F(h).canRetryAsset(F(C).getItemKey(r)) ? (w(), s("button", {
3343
3227
  key: 0,
3344
3228
  type: "button",
3345
3229
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-4 py-2 text-[0.64rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
3346
3230
  onClick: H((e) => F(h).retryAsset(F(C).getItemKey(r)), ["stop"])
3347
- }, " Retry ", 8, ei)) : o("", !0)
3348
- ], 8, Qr)], 64)) : o("", !0)
3231
+ }, " Retry ", 8, Gr)) : o("", !0)
3232
+ ], 8, Ur)], 64)) : o("", !0)
3349
3233
  ]), (w(), s("audio", {
3350
3234
  key: F(h).getAssetRenderKey(F(C).getItemKey(r)),
3351
3235
  src: F(C).getFullscreenMediaSource(i, r),
@@ -3366,14 +3250,14 @@ var Sr = {
3366
3250
  onStalled: (e) => Z(i, r, e),
3367
3251
  onTimeupdate: (e) => Z(i, r, e),
3368
3252
  onWaiting: (e) => Z(i, r, e)
3369
- }, null, 40, ti))], 2)) : (w(), s("div", ni, [c("div", ri, [k(e.$slots, "item-icon", {
3253
+ }, null, 40, Kr))], 2)) : (w(), s("div", qr, [c("div", Jr, [k(e.$slots, "item-icon", {
3370
3254
  icon: F(Gt)(r.type),
3371
3255
  item: r
3372
3256
  }, () => [(w(), a(A(F(Gt)(r.type)), {
3373
3257
  class: "h-6 w-6 stroke-[1.9]",
3374
3258
  "aria-hidden": "true"
3375
- }))])])]))], 14, Lr))), 128)),
3376
- G.value && f["fullscreen-overlay"] ? (w(), s("div", ii, [c("div", ai, [k(e.$slots, "fullscreen-overlay", y(p(G.value)))])])) : o("", !0),
3259
+ }))])])]))], 14, Or))), 128)),
3260
+ W.value && f["fullscreen-overlay"] ? (w(), s("div", Yr, [c("div", Xr, [k(e.$slots, "fullscreen-overlay", y(p(W.value)))])])) : o("", !0),
3377
3261
  F(h).activeItem.value ? (w(), a(Ht, {
3378
3262
  key: 1,
3379
3263
  "current-index": F(h).resolvedActiveIndex.value,
@@ -3384,9 +3268,9 @@ var Sr = {
3384
3268
  title: F(h).activeItem.value.title ?? null,
3385
3269
  total: F(h).items.value.length,
3386
3270
  onBackToList: n[0] ||= (e) => m("back-to-list")
3387
- }, l({ _: 2 }, [J.value && G.value ? {
3271
+ }, l({ _: 2 }, [Y.value && W.value ? {
3388
3272
  name: "actions",
3389
- fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(G.value)))]),
3273
+ fn: B(() => [k(e.$slots, "fullscreen-header-actions", y(p(W.value)))]),
3390
3274
  key: "0"
3391
3275
  } : void 0]), 1032, [
3392
3276
  "current-index",
@@ -3397,11 +3281,6 @@ var Sr = {
3397
3281
  "title",
3398
3282
  "total"
3399
3283
  ])) : o("", !0),
3400
- u(jr, {
3401
- "active-index": F(h).resolvedActiveIndex.value,
3402
- items: F(h).items.value,
3403
- onSelect: n[1] ||= (e) => m("update:activeIndex", e)
3404
- }, null, 8, ["active-index", "items"]),
3405
3284
  ee.value ? (w(), a(jt, {
3406
3285
  key: 2,
3407
3286
  "current-time": F(h).activeMediaState.value.currentTime,
@@ -3432,15 +3311,15 @@ var Sr = {
3432
3311
  "onVolumeInput",
3433
3312
  "onVolumeToggle"
3434
3313
  ])) : o("", !0),
3435
- K.value ? (w(), s("div", {
3314
+ q.value ? (w(), s("div", {
3436
3315
  key: 3,
3437
3316
  class: v(["absolute left-1/2 z-[4] -translate-x-1/2", z.value])
3438
- }, [oe.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, K.value))) : (w(), s("div", {
3317
+ }, [ae.value ? k(e.$slots, "fullscreen-status", y(g({ key: 0 }, q.value))) : (w(), s("div", {
3439
3318
  key: 1,
3440
3319
  "data-testid": "vibe-fullscreen-status-badge",
3441
- class: v(["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", K.value.kind === "end" ? "border-amber-300/35 text-amber-200" : K.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
3442
- }, M(K.value.message), 3))], 2)) : o("", !0)
3443
- ])) : W.value ? (w(), a($n, {
3320
+ class: v(["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", q.value.kind === "end" ? "border-amber-300/35 text-amber-200" : q.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
3321
+ }, M(q.value.message), 3))], 2)) : o("", !0)
3322
+ ])) : te.value ? (w(), a($n, {
3444
3323
  key: 1,
3445
3324
  "fill-collected-count": d.fillCollectedCount,
3446
3325
  "fill-completed-calls": d.fillCompletedCalls,
@@ -3465,25 +3344,25 @@ var Sr = {
3465
3344
  "has-next-page",
3466
3345
  "phase",
3467
3346
  "status-message"
3468
- ])) : F(pe) && F(X) ? (w(), a(Pr, {
3347
+ ])) : F(pe) && F(oe) ? (w(), a(nr, {
3469
3348
  key: 2,
3470
- message: F(X).message,
3471
- mode: F(X).mode,
3472
- surface: F(X).surface
3349
+ message: F(oe).message,
3350
+ mode: F(oe).mode,
3351
+ surface: F(oe).surface
3473
3352
  }, {
3474
- default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
3353
+ default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
3475
3354
  _: 3
3476
3355
  }, 8, [
3477
3356
  "message",
3478
3357
  "mode",
3479
3358
  "surface"
3480
- ])) : o("", !0), F(ce) && F(X) ? (w(), a(Pr, {
3359
+ ])) : o("", !0), F(ce) && F(oe) ? (w(), a(nr, {
3481
3360
  key: 3,
3482
- message: F(X).message,
3483
- mode: F(X).mode,
3484
- surface: F(X).surface
3361
+ message: F(oe).message,
3362
+ mode: F(oe).mode,
3363
+ surface: F(oe).surface
3485
3364
  }, {
3486
- default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(X)))) : o("", !0)]),
3365
+ default: B(() => [F(fe) ? k(e.$slots, "empty-state", y(g({ key: 0 }, F(oe)))) : o("", !0)]),
3487
3366
  _: 3
3488
3367
  }, 8, [
3489
3368
  "message",
@@ -3497,7 +3376,7 @@ var Sr = {
3497
3376
  "leave-from-class": "translate-x-0 opacity-100",
3498
3377
  "leave-to-class": "translate-x-full opacity-0"
3499
3378
  }, {
3500
- default: B(() => [ie.value && G.value ? (w(), s("aside", oi, [c("div", si, [k(e.$slots, "fullscreen-aside", y(p(G.value)))])])) : o("", !0)]),
3379
+ default: B(() => [re.value && W.value ? (w(), s("aside", Zr, [c("div", Qr, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
3501
3380
  _: 3
3502
3381
  })], 4),
3503
3382
  u(r, {
@@ -3508,7 +3387,7 @@ var Sr = {
3508
3387
  "leave-from-class": "translate-x-0 opacity-100",
3509
3388
  "leave-to-class": "translate-x-full opacity-0"
3510
3389
  }, {
3511
- default: B(() => [ae.value && G.value ? (w(), s("aside", ci, [c("div", li, [k(e.$slots, "fullscreen-aside", y(p(G.value)))])])) : o("", !0)]),
3390
+ default: B(() => [ie.value && W.value ? (w(), s("aside", $r, [c("div", ei, [k(e.$slots, "fullscreen-aside", y(p(W.value)))])])) : o("", !0)]),
3512
3391
  _: 3
3513
3392
  })
3514
3393
  ]));
@@ -3516,10 +3395,10 @@ var Sr = {
3516
3395
  });
3517
3396
  //#endregion
3518
3397
  //#region src/components/viewer-core/masonryLayoutState.ts
3519
- function pi(e) {
3398
+ function ii(e) {
3520
3399
  let t = j([]), n = j([]), r = j(/* @__PURE__ */ new Map()), i = j(0), a = j(/* @__PURE__ */ new Map()), o = j([]);
3521
3400
  function s(s, c, l) {
3522
- let u = or(s, {
3401
+ let u = lr(s, {
3523
3402
  columnCount: c,
3524
3403
  columnWidth: l,
3525
3404
  gapX: e.gapPx,
@@ -3529,7 +3408,7 @@ function pi(e) {
3529
3408
  t.value = u.positions.map(d), n.value = u.heights, r.value = u.buckets, i.value = u.contentHeight, a.value = u.indexById, o.value = u.columnHeights;
3530
3409
  }
3531
3410
  function c(s, c, l, d) {
3532
- i.value = sr(u(), s, {
3411
+ i.value = ur(u(), s, {
3533
3412
  columnCount: l,
3534
3413
  columnWidth: d,
3535
3414
  gapX: e.gapPx,
@@ -3541,7 +3420,7 @@ function pi(e) {
3541
3420
  }).contentHeight, P(t), P(n), P(r), P(a), P(o);
3542
3421
  }
3543
3422
  function l(e, n, r, i) {
3544
- return lr({
3423
+ return fr({
3545
3424
  addedItems: r.addedItems,
3546
3425
  columnCount: i,
3547
3426
  columnHeights: o.value,
@@ -3582,21 +3461,24 @@ function pi(e) {
3582
3461
  }
3583
3462
  //#endregion
3584
3463
  //#region src/components/viewer-core/useMasonryMotion.ts
3585
- var mi = 300, hi = 600, gi = 40, _i = 300, vi = 400;
3586
- function yi(e, t) {
3464
+ var ai = 300, oi = 600, si = 40, ci = 300, li = 400, ui = 300;
3465
+ function di(e, t) {
3587
3466
  return t === "top" ? [...e].reverse() : e;
3588
3467
  }
3589
- function bi(e) {
3590
- return e <= 0 ? hi : hi + Math.min((e - 1) * gi, vi);
3468
+ function fi(e) {
3469
+ return e <= 0 ? oi : oi + Math.min((e - 1) * si, li);
3470
+ }
3471
+ function pi(e, t, n = ui) {
3472
+ return e + t > n;
3591
3473
  }
3592
- function xi() {
3593
- return _i;
3474
+ function mi() {
3475
+ return ci;
3594
3476
  }
3595
- function Si(e) {
3477
+ function hi(e) {
3596
3478
  let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
3597
3479
  return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
3598
3480
  }
3599
- function Ci(e) {
3481
+ function gi(e) {
3600
3482
  let t = D(/* @__PURE__ */ new Set()), n = D(/* @__PURE__ */ new Set()), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), o = D(/* @__PURE__ */ new Map()), s = D(/* @__PURE__ */ new Set()), c = D(/* @__PURE__ */ new Map()), l = D(/* @__PURE__ */ new Map()), u = D(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
3601
3483
  z(e.visibleIndices, (i) => {
3602
3484
  if (!i.length) return;
@@ -3606,20 +3488,20 @@ function Ci(e) {
3606
3488
  !r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
3607
3489
  }
3608
3490
  if (!o.length) return;
3609
- let s = yi(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
3610
- for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * gi, vi));
3611
- r.value = c, wi(() => {
3491
+ let s = di(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
3492
+ for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * si, li));
3493
+ r.value = c, _i(() => {
3612
3494
  let e = new Set(n.value);
3613
3495
  for (let t of o) e.add(t);
3614
3496
  n.value = e;
3615
- }), Ti(() => {
3497
+ }), vi(() => {
3616
3498
  let e = new Set(t.value);
3617
3499
  for (let t of o) e.delete(t);
3618
- t.value = e, S(() => {
3500
+ t.value = e, w(() => {
3619
3501
  let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
3620
3502
  for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
3621
3503
  n.value = e, r.value = t, a.value = i;
3622
- }, bi(o.length));
3504
+ }, fi(o.length));
3623
3505
  });
3624
3506
  }, { flush: "post" }), z(() => e.items.value.map((e) => $(e)), (e) => {
3625
3507
  if (!e.length || !o.value.size) return;
@@ -3630,33 +3512,51 @@ function Ci(e) {
3630
3512
  for (let e of f) clearTimeout(e);
3631
3513
  f.clear();
3632
3514
  });
3633
- function m(e, n = "bottom") {
3634
- if (!e.length) return;
3635
- let r = new Set(t.value), i = new Map(a.value);
3636
- for (let t of e) {
3637
- let e = $(t);
3638
- r.add(e), i.set(e, n);
3515
+ function m(n, r = "bottom") {
3516
+ if (!n.length) return;
3517
+ let i = pi(t.value.size, n.length), o = i ? new Set(e.visibleIndices.value) : null, s = o ? h(o) : new Set(t.value), c = i ? g(s) : new Map(a.value);
3518
+ for (let t of n) {
3519
+ let n = $(t), a = i ? e.indexById.value.get(n) : null;
3520
+ o && (a == null || !o.has(a)) || (s.add(n), c.set(n, r));
3521
+ }
3522
+ t.value = s, a.value = c;
3523
+ }
3524
+ function h(r) {
3525
+ let i = /* @__PURE__ */ new Set();
3526
+ for (let n of r) {
3527
+ let r = e.items.value[n], a = r ? $(r) : null;
3528
+ a && t.value.has(a) && i.add(a);
3639
3529
  }
3640
- t.value = r, a.value = i;
3530
+ for (let e of d) t.value.has(e) && i.add(e);
3531
+ for (let e of n.value) t.value.has(e) && i.add(e);
3532
+ return i;
3641
3533
  }
3642
- function h(e) {
3534
+ function g(e) {
3535
+ let t = /* @__PURE__ */ new Map();
3536
+ for (let n of e) {
3537
+ let e = a.value.get(n);
3538
+ e && t.set(n, e);
3539
+ }
3540
+ return t;
3541
+ }
3542
+ function _(e) {
3643
3543
  if (!e.length) return;
3644
3544
  let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
3645
3545
  for (let t of e) {
3646
3546
  let e = $(t.item);
3647
3547
  p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
3648
3548
  }
3649
- o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, wi(() => {
3549
+ o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, _i(() => {
3650
3550
  let e = new Set(s.value);
3651
3551
  for (let t of p) e.add(t);
3652
3552
  s.value = e;
3653
- }), S(() => {
3553
+ }), w(() => {
3654
3554
  let e = new Map(o.value), t = new Set(s.value);
3655
3555
  for (let n of p) e.delete(n), t.delete(n);
3656
3556
  o.value = e, s.value = t;
3657
- }, _i);
3557
+ }, ci);
3658
3558
  }
3659
- function g(t, n, r = mi) {
3559
+ function v(t, n, r = ai) {
3660
3560
  if (!t.size) return;
3661
3561
  let i = /* @__PURE__ */ new Map(), a = [];
3662
3562
  for (let [r, o] of t.entries()) {
@@ -3675,27 +3575,27 @@ function Ci(e) {
3675
3575
  c.value = i, u.value = /* @__PURE__ */ new Set();
3676
3576
  let o = new Map(l.value);
3677
3577
  for (let e of a) o.set(e, r);
3678
- l.value = o, wi(() => {
3679
- u.value = new Set(a), wi(() => {
3578
+ l.value = o, _i(() => {
3579
+ u.value = new Set(a), _i(() => {
3680
3580
  c.value = /* @__PURE__ */ new Map();
3681
3581
  });
3682
- }), S(() => {
3582
+ }), w(() => {
3683
3583
  u.value = /* @__PURE__ */ new Set();
3684
3584
  let e = new Map(l.value);
3685
3585
  for (let t of a) e.delete(t);
3686
3586
  l.value = e;
3687
3587
  }, r);
3688
3588
  }
3689
- function _(e) {
3690
- if (n.value.has(e)) return `transform ${hi}ms ease-out`;
3691
- if (u.value.has(e)) return `transform ${l.value.get(e) ?? mi}ms ease-out`;
3589
+ function y(e) {
3590
+ if (n.value.has(e)) return `transform ${oi}ms ease-out`;
3591
+ if (u.value.has(e)) return `transform ${l.value.get(e) ?? ai}ms ease-out`;
3692
3592
  }
3693
- function v(e) {
3593
+ function b(e) {
3694
3594
  if (!n.value.has(e)) return;
3695
3595
  let t = r.value.get(e) ?? 0;
3696
3596
  return t > 0 ? `${t}ms` : void 0;
3697
3597
  }
3698
- function y(n) {
3598
+ function S(n) {
3699
3599
  let r = e.items.value[n], i = e.positions.value[n] ?? {
3700
3600
  x: 0,
3701
3601
  y: 0
@@ -3705,7 +3605,7 @@ function Ci(e) {
3705
3605
  } : {
3706
3606
  dx: 0,
3707
3607
  dy: 0
3708
- }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Si({
3608
+ }, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? hi({
3709
3609
  columnWidth: e.columnWidth.value,
3710
3610
  direction: u,
3711
3611
  itemHeight: o,
@@ -3714,61 +3614,61 @@ function Ci(e) {
3714
3614
  }) : i.y;
3715
3615
  return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
3716
3616
  }
3717
- function b(t) {
3617
+ function C(t) {
3718
3618
  let n = $(t), r = o.value.get(n);
3719
3619
  if (!r) return {
3720
3620
  opacity: "0",
3721
3621
  transform: "translate3d(0, 0, 0) scale(0.96)",
3722
- transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`
3622
+ transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`
3723
3623
  };
3724
3624
  let i = s.value.has(n);
3725
3625
  return {
3726
3626
  height: `${r.height}px`,
3727
3627
  opacity: i ? "0" : "1",
3728
3628
  transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
3729
- transition: `opacity ${_i}ms ease-out, transform ${_i}ms ease-out`,
3629
+ transition: `opacity ${ci}ms ease-out, transform ${ci}ms ease-out`,
3730
3630
  width: `${e.columnWidth.value}px`
3731
3631
  };
3732
3632
  }
3733
- function S(e, t) {
3633
+ function w(e, t) {
3734
3634
  let n = setTimeout(() => {
3735
3635
  f.delete(n), e();
3736
3636
  }, t);
3737
3637
  f.add(n);
3738
3638
  }
3739
3639
  return {
3740
- getCardTransform: y,
3741
- getCardTransition: _,
3742
- getCardTransitionDelay: v,
3743
- getLeavingCardStyle: b,
3640
+ getCardTransform: S,
3641
+ getCardTransition: y,
3642
+ getCardTransitionDelay: b,
3643
+ getLeavingCardStyle: C,
3744
3644
  leavingItems: p,
3745
3645
  markEnter: m,
3746
- markLeave: h,
3747
- playFlipMoveAnimation: g
3646
+ markLeave: _,
3647
+ playFlipMoveAnimation: v
3748
3648
  };
3749
3649
  }
3750
- function wi(e) {
3650
+ function _i(e) {
3751
3651
  if (typeof requestAnimationFrame == "function") {
3752
3652
  requestAnimationFrame(() => e());
3753
3653
  return;
3754
3654
  }
3755
3655
  setTimeout(e, 0);
3756
3656
  }
3757
- function Ti(e) {
3758
- wi(() => wi(e));
3657
+ function vi(e) {
3658
+ _i(() => _i(e));
3759
3659
  }
3760
3660
  //#endregion
3761
3661
  //#region src/components/viewer-core/masonryViewport.ts
3762
- function Ei(e, t) {
3662
+ function yi(e, t) {
3763
3663
  return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
3764
3664
  }
3765
- function Di(e, t, n) {
3665
+ function bi(e, t, n) {
3766
3666
  return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
3767
3667
  }
3768
- function Oi(e, t, n, r) {
3668
+ function xi(e, t, n, r) {
3769
3669
  return Math.max(e?.scrollHeight ?? 0, r) - (t + n);
3770
3670
  }
3771
- function ki(e, t) {
3671
+ function Si(e, t) {
3772
3672
  return {
3773
3673
  height: `${e}px`,
3774
3674
  transform: `translate3d(0, ${t}px, 0)`
@@ -3776,11 +3676,11 @@ function ki(e, t) {
3776
3676
  }
3777
3677
  //#endregion
3778
3678
  //#region src/components/viewer-core/masonryScrollBehavior.ts
3779
- var Ai = 24, ji = 48;
3780
- function Mi(e) {
3679
+ var Ci = 24, wi = 48;
3680
+ function Ti(e) {
3781
3681
  let t = D(0), n = 0, r = 0;
3782
3682
  function i(e) {
3783
- if (t.value = Li(e), t.value <= 0) {
3683
+ if (t.value = Ai(e), t.value <= 0) {
3784
3684
  o();
3785
3685
  return;
3786
3686
  }
@@ -3800,7 +3700,7 @@ function Mi(e) {
3800
3700
  let s = e.getViewport();
3801
3701
  if (s && r > 0) {
3802
3702
  let n = Math.min(Math.max(0, i - r), 250), a = t.value * n / 1e3;
3803
- s.scrollTop = Ri(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
3703
+ s.scrollTop = ji(s.scrollTop + a, 0, e.getMaxScrollTop()), e.onScroll();
3804
3704
  }
3805
3705
  r = i, a();
3806
3706
  }
@@ -3810,44 +3710,44 @@ function Mi(e) {
3810
3710
  stop: o
3811
3711
  };
3812
3712
  }
3813
- function Ni(e) {
3713
+ function Ei(e) {
3814
3714
  if (!e.active || !e.triggerEnabled) return 0;
3815
3715
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3816
- return t <= 0 ? 1 : Ri(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3716
+ return t <= 0 ? 1 : ji(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
3817
3717
  }
3818
- function Pi(e) {
3718
+ function Di(e) {
3819
3719
  if (!e.active || !e.triggerEnabled) return 0;
3820
3720
  let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
3821
- return t <= 0 ? 1 : Ri(e.progressDistancePx / t, 0, 1);
3721
+ return t <= 0 ? 1 : ji(e.progressDistancePx / t, 0, 1);
3822
3722
  }
3823
- function Fi(e) {
3824
- let t = i(() => Math.max(0, e.viewportHeight.value - Ai * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
3723
+ function Oi(e) {
3724
+ let t = i(() => Math.max(0, e.viewportHeight.value - Ci * 2)), n = i(() => e.containerHeight.value > e.viewportHeight.value + 1 && t.value > 0), r = i(() => {
3825
3725
  if (!n.value) return 0;
3826
3726
  let r = e.viewportHeight.value / e.containerHeight.value * t.value;
3827
- return Math.min(t.value, Math.max(ji, r));
3727
+ return Math.min(t.value, Math.max(wi, r));
3828
3728
  }), a = i(() => {
3829
- if (!n.value) return Ai;
3729
+ if (!n.value) return Ci;
3830
3730
  let i = Math.max(0, e.containerHeight.value - e.viewportHeight.value);
3831
- return Ai + Math.max(0, t.value - r.value) * (i > 0 ? Ri(e.scrollTop.value / i, 0, 1) : 0);
3731
+ return Ci + Math.max(0, t.value - r.value) * (i > 0 ? ji(e.scrollTop.value / i, 0, 1) : 0);
3832
3732
  });
3833
3733
  return {
3834
- getScrollbarThumbStyle: () => ki(r.value, a.value),
3734
+ getScrollbarThumbStyle: () => Si(r.value, a.value),
3835
3735
  showScrollbar: n
3836
3736
  };
3837
3737
  }
3838
- function Ii(e) {
3738
+ function ki(e) {
3839
3739
  return typeof e == "number" && Number.isFinite(e) ? Math.max(0, e) : 0;
3840
3740
  }
3841
- function Li(e) {
3741
+ function Ai(e) {
3842
3742
  return Number.isFinite(e) ? Math.max(0, e) : 0;
3843
3743
  }
3844
- function Ri(e, t, n) {
3744
+ function ji(e, t, n) {
3845
3745
  return Math.min(Math.max(e, t), n);
3846
3746
  }
3847
3747
  //#endregion
3848
3748
  //#region src/components/viewer-core/useEdgeBoundary.ts
3849
- var zi = 250, Bi = 1e3;
3850
- function Vi(e) {
3749
+ var Mi = 250, Ni = 1e3;
3750
+ function Pi(e) {
3851
3751
  let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
3852
3752
  x(() => {
3853
3753
  S();
@@ -3870,7 +3770,7 @@ function Vi(e) {
3870
3770
  if (!C(t) || !e.isAtBoundary()) return;
3871
3771
  let n = Date.now();
3872
3772
  if (!(n < c)) {
3873
- if (c = n + zi, a.value) {
3773
+ if (c = n + Mi, a.value) {
3874
3774
  s.value = !0;
3875
3775
  return;
3876
3776
  }
@@ -3909,7 +3809,7 @@ function Vi(e) {
3909
3809
  return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3910
3810
  }
3911
3811
  function v() {
3912
- o.value = !1, y(Bi);
3812
+ o.value = !1, y(Ni);
3913
3813
  }
3914
3814
  function y(e) {
3915
3815
  S(), a.value = !0, l = setTimeout(() => {
@@ -3941,7 +3841,7 @@ function Vi(e) {
3941
3841
  }
3942
3842
  //#endregion
3943
3843
  //#region src/components/viewer-core/masonryBoundaryLock.ts
3944
- function Hi() {
3844
+ function Fi() {
3945
3845
  let e = D(!1), t = null;
3946
3846
  x(() => {
3947
3847
  r();
@@ -3962,8 +3862,8 @@ function Hi() {
3962
3862
  }
3963
3863
  //#endregion
3964
3864
  //#region src/components/viewer-core/masonryItemMutation.ts
3965
- function Ui(e) {
3966
- let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Gi(e.previousItems, e.layoutIndexById, e.layoutHeights), i = Ki(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Wi(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
3865
+ function Ii(e) {
3866
+ let t = e.currentItems.map((e) => $(e)), n = e.previousItems.map((e) => $(e)), r = Ri(e.previousItems, e.layoutIndexById, e.layoutHeights), i = zi(e.previousItems, e.layoutIndexById, e.layoutPositions), a = new Set(n), o = new Set(t), s = e.currentItems.filter((e) => !a.has($(e))), c = Li(e.previousItems, o, r, i), l = t.length > n.length && n.length > 0 && t[0] !== n[0], u = e.scrollTop > e.contentInsetPx + e.gapPx, d = l && u ? e.currentItems[e.activeIndex] : null;
3967
3867
  return {
3968
3868
  addedItems: s,
3969
3869
  anchorId: d ? $(d) : null,
@@ -3975,7 +3875,7 @@ function Ui(e) {
3975
3875
  shouldResetScrollForEmptyRemoval: e.currentItems.length === 0 && e.previousItems.length > 0 && c.length > 0 && e.scrollTop > 0
3976
3876
  };
3977
3877
  }
3978
- function Wi(e, t, n, r) {
3878
+ function Li(e, t, n, r) {
3979
3879
  return e.flatMap((e) => {
3980
3880
  let i = $(e);
3981
3881
  if (t.has(i)) return [];
@@ -3987,7 +3887,7 @@ function Wi(e, t, n, r) {
3987
3887
  }] : [];
3988
3888
  });
3989
3889
  }
3990
- function Gi(e, t, n) {
3890
+ function Ri(e, t, n) {
3991
3891
  let r = /* @__PURE__ */ new Map();
3992
3892
  for (let i of e) {
3993
3893
  let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
@@ -3995,7 +3895,7 @@ function Gi(e, t, n) {
3995
3895
  }
3996
3896
  return r;
3997
3897
  }
3998
- function Ki(e, t, n) {
3898
+ function zi(e, t, n) {
3999
3899
  let r = /* @__PURE__ */ new Map();
4000
3900
  for (let i of e) {
4001
3901
  let e = $(i), a = t.get(e), o = a == null ? void 0 : n[a];
@@ -4005,7 +3905,7 @@ function Ki(e, t, n) {
4005
3905
  }
4006
3906
  //#endregion
4007
3907
  //#region src/components/viewer-core/masonryPendingAppend.ts
4008
- function qi(e) {
3908
+ function Bi(e) {
4009
3909
  let t = D(null), n = D(!1), r = null;
4010
3910
  function i() {
4011
3911
  o(), e.pendingAppendItems.value.length && (t.value = c([...e.items.value, ...e.pendingAppendItems.value]), s());
@@ -4028,12 +3928,12 @@ function qi(e) {
4028
3928
  }, 300));
4029
3929
  }
4030
3930
  function c(t) {
4031
- return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? cr(e.pendingAppendItems.value, {
3931
+ return t.length ? e.pendingAppendItems.value.length && e.columnHeights.value.length === e.columnCount.value ? dr(e.pendingAppendItems.value, {
4032
3932
  columnHeights: e.columnHeights.value,
4033
3933
  columnWidth: e.columnWidth.value,
4034
3934
  contentHeight: e.contentHeight.value,
4035
3935
  gapY: e.gapPx
4036
- }) + e.contentInsetPx * 2 : or(t, {
3936
+ }) + e.contentInsetPx * 2 : lr(t, {
4037
3937
  bucketPx: e.bucketPx,
4038
3938
  columnCount: e.columnCount.value,
4039
3939
  columnWidth: e.columnWidth.value,
@@ -4050,42 +3950,42 @@ function qi(e) {
4050
3950
  }
4051
3951
  //#endregion
4052
3952
  //#region src/components/viewer-core/useMasonryList.ts
4053
- var Ji = 600, Yi = 24, Xi = 16, Zi = 300, Qi = 200, $i = 0, ea = 1, ta = Yi + Xi, na = 200, ra = 500, ia = 1e3;
4054
- function aa(e) {
4055
- let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Zi), o = pi({
4056
- bucketPx: Ji,
4057
- contentInsetPx: Yi,
4058
- gapPx: Xi
4059
- }), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Hi(), h = i(() => Math.max(Zi, a.value - Yi * 2)), g = i(() => rr(h.value, Zi)), v = i(() => ir(h.value, g.value, Zi, Xi)), y = i(() => Ii(e.bottomLoadBufferPx.value)), b = i(() => oa(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => ur({
3953
+ var Vi = 600, Hi = 24, Ui = 16, Wi = 300, Gi = 200, Ki = 0, qi = 1, Ji = Hi + Ui, Yi = 200, Xi = 500, Zi = 1e3;
3954
+ function Qi(e) {
3955
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || Wi), o = ii({
3956
+ bucketPx: Vi,
3957
+ contentInsetPx: Hi,
3958
+ gapPx: Ui
3959
+ }), { buckets: s, columnHeights: c, contentHeight: l, heights: u, indexById: d, positions: f } = o, p = D(null), m = Fi(), h = i(() => Math.max(Wi, a.value - Hi * 2)), g = i(() => or(h.value, Wi)), v = i(() => sr(h.value, g.value, Wi, Ui)), y = i(() => ki(e.bottomLoadBufferPx.value)), b = i(() => $i(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), C = i(() => pr({
4060
3960
  itemCount: e.items.value.length,
4061
3961
  viewportHeight: r.value,
4062
3962
  scrollTop: n.value,
4063
- overscanPx: Qi,
4064
- bucketPx: Ji,
3963
+ overscanPx: Gi,
3964
+ bucketPx: Vi,
4065
3965
  buckets: s.value
4066
3966
  })), w = i(() => C.value.map((t) => ({
4067
3967
  item: e.items.value[t],
4068
3968
  index: t
4069
3969
  }))), T = i(() => {
4070
- let e = l.value + Yi * 2, t = I.reservedContentHeight.value ?? 0;
4071
- return Math.max(e, t, r.value) + na + y.value;
4072
- }), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Pi({
3970
+ let e = l.value + Hi * 2, t = I.reservedContentHeight.value ?? 0;
3971
+ return Math.max(e, t, r.value) + Yi + y.value;
3972
+ }), E = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), O = i(() => Di({
4073
3973
  active: e.active.value,
4074
- maxScrollTop: Y(),
3974
+ maxScrollTop: X(),
4075
3975
  progressDistancePx: n.value,
4076
- thresholdPx: $i,
3976
+ thresholdPx: Ki,
4077
3977
  triggerEnabled: E.value
4078
- })), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ni({
3978
+ })), k = i(() => e.items.value.length > 0 ? `${b.value + 1} / ${e.items.value.length}` : "0 / 0"), A = i(() => Ei({
4079
3979
  active: e.active.value,
4080
- maxScrollTop: Y(),
3980
+ maxScrollTop: X(),
4081
3981
  progressDistancePx: n.value,
4082
- thresholdPx: ta,
3982
+ thresholdPx: Ji,
4083
3983
  triggerEnabled: e.hasPreviousPage.value
4084
- })), j = Fi({
3984
+ })), j = Oi({
4085
3985
  containerHeight: T,
4086
3986
  scrollTop: n,
4087
3987
  viewportHeight: r
4088
- }), M = Ci({
3988
+ }), M = gi({
4089
3989
  items: e.items,
4090
3990
  visibleIndices: C,
4091
3991
  positions: f,
@@ -4094,44 +3994,44 @@ function aa(e) {
4094
3994
  columnWidth: v,
4095
3995
  scrollTop: n,
4096
3996
  viewportHeight: r
4097
- }), N = Vi({
3997
+ }), N = Pi({
4098
3998
  direction: "top",
4099
3999
  getAnimationLockMs(e) {
4100
- return Math.max(ra, bi(e)) + ia;
4000
+ return Math.max(Xi, fi(e)) + Zi;
4101
4001
  },
4102
4002
  hasPage: e.hasPreviousPage,
4103
4003
  interactionLocked: m.isBoundaryInteractionLocked,
4104
4004
  isAtBoundary() {
4105
- return n.value <= ta;
4005
+ return n.value <= Ji;
4106
4006
  },
4107
4007
  loading: e.loading,
4108
4008
  requestPage: e.requestPreviousPage
4109
- }), P = Vi({
4009
+ }), P = Pi({
4110
4010
  direction: "bottom",
4111
4011
  getAnimationLockMs(e) {
4112
- return bi(e) + ia;
4012
+ return fi(e) + Zi;
4113
4013
  },
4114
4014
  hasPage: E,
4115
4015
  interactionLocked: m.isBoundaryInteractionLocked,
4116
4016
  isAtBoundary() {
4117
- return J() <= ea;
4017
+ return Y() <= qi;
4118
4018
  },
4119
4019
  loading: e.loading,
4120
4020
  requestPage: e.requestNextPage
4121
- }), F = Mi({
4021
+ }), F = Ti({
4122
4022
  active: e.active,
4123
- getMaxScrollTop: Y,
4023
+ getMaxScrollTop: X,
4124
4024
  getViewport: () => t.value,
4125
4025
  onScroll: ee
4126
- }), I = qi({
4127
- bucketPx: Ji,
4026
+ }), I = Bi({
4027
+ bucketPx: Vi,
4128
4028
  columnHeights: c,
4129
4029
  columnCount: g,
4130
4030
  columnWidth: v,
4131
4031
  commitPendingAppend: e.commitPendingAppend,
4132
4032
  contentHeight: l,
4133
- contentInsetPx: Yi,
4134
- gapPx: Xi,
4033
+ contentInsetPx: Hi,
4034
+ gapPx: Ui,
4135
4035
  items: e.items,
4136
4036
  pendingAppendItems: e.pendingAppendItems
4137
4037
  }), L = null, R = 0;
@@ -4140,20 +4040,20 @@ function aa(e) {
4140
4040
  g,
4141
4041
  v
4142
4042
  ], async ([t], [r = []]) => {
4143
- let i = Ui({
4043
+ let i = Ii({
4144
4044
  activeIndex: b.value,
4145
- contentInsetPx: Yi,
4045
+ contentInsetPx: Hi,
4146
4046
  currentItems: t,
4147
- gapPx: Xi,
4047
+ gapPx: Ui,
4148
4048
  layoutHeights: u.value,
4149
4049
  layoutIndexById: d.value,
4150
4050
  layoutPositions: f.value,
4151
4051
  previousItems: r ?? [],
4152
4052
  scrollTop: n.value
4153
4053
  });
4154
- i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(xi() + ia), i.shouldResetScrollForEmptyRemoval && W();
4054
+ i.shouldLockBoundaryInteractionForRemoval && m.lockBoundaryInteraction(mi() + Zi), i.shouldResetScrollForEmptyRemoval && te();
4155
4055
  let a = r ?? [];
4156
- o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? ra : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && te();
4056
+ o.canAppend(t, a, i, g.value) ? o.append(i.addedItems, a.length, g.value, v.value) : o.rebuild(t, g.value, v.value), i.removedItems.length > 0 && M.markLeave(i.removedItems), i.addedItems.length > 0 && (M.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? N.onItemsMutated(i.addedItems.length) : P.onItemsMutated(i.addedItems.length)), M.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => $(e))), i.isPrepend ? Xi : void 0), i.anchorId ? (await _(), U(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && G();
4157
4057
  }, { immediate: !0 }), z([
4158
4058
  () => e.pendingAppendItems.value.map((e) => $(e)),
4159
4059
  g,
@@ -4167,24 +4067,24 @@ function aa(e) {
4167
4067
  }
4168
4068
  if (F.start(), !a || i !== !1 || p.value == null) return;
4169
4069
  await _();
4170
- let o = Math.max(0, T.value - r.value), s = oa(p.value, 0, o);
4070
+ let o = Math.max(0, T.value - r.value), s = $i(p.value, 0, o);
4171
4071
  a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
4172
4072
  }), z(() => e.loading.value, async (e) => {
4173
4073
  I.clearReservedHeightWhenIdle(e), N.onLoadingChange(e), P.onLoadingChange(e), await _();
4174
4074
  }), S(async () => {
4175
- K(), await _(), b.value > 0 ? H(b.value, "center") : G(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
4176
- K();
4177
- }), t.value && L.observe(t.value)) : window.addEventListener("resize", K);
4075
+ q(), await _(), b.value > 0 ? H(b.value, "center") : W(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (L = new ResizeObserver(() => {
4076
+ q();
4077
+ }), t.value && L.observe(t.value)) : window.addEventListener("resize", q);
4178
4078
  }), x(() => {
4179
- L?.disconnect(), L = null, window.removeEventListener("resize", K), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
4079
+ L?.disconnect(), L = null, window.removeEventListener("resize", q), I.clearAppendCommitTimer(), m.clearBoundaryInteractionReleaseTimer(), R &&= (cancelAnimationFrame(R), 0), F.stop();
4180
4080
  });
4181
4081
  function ee() {
4182
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), ne(), !te() && (R ||= requestAnimationFrame(() => {
4183
- R = 0, G();
4082
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = J(), N.syncBoundary("scroll"), P.syncBoundary("scroll"), K(), !G() && (R ||= requestAnimationFrame(() => {
4083
+ R = 0, W();
4184
4084
  })));
4185
4085
  }
4186
4086
  function B(t) {
4187
- e.active.value && (N.onWheel(t), P.onWheel(t), ne());
4087
+ e.active.value && (N.onWheel(t), P.onWheel(t), K());
4188
4088
  }
4189
4089
  function V(t) {
4190
4090
  let n = e.items.value[t], r = n ? $(n) : "";
@@ -4200,7 +4100,7 @@ function aa(e) {
4200
4100
  let a = t.value, o = f.value[e], s = u.value[e];
4201
4101
  if (!a || !o || !s) return;
4202
4102
  let c = a.scrollTop, l = Math.max(0, T.value - r.value);
4203
- i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Yi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Yi), a.scrollTop = oa(c, 0, l), n.value = a.scrollTop, G();
4103
+ i === "center" ? c = o.y - (r.value - s) / 2 : o.y < a.scrollTop ? c = o.y - Hi : o.y + s > a.scrollTop + r.value && (c = o.y + s - r.value + Hi), a.scrollTop = $i(c, 0, l), n.value = a.scrollTop, W();
4204
4104
  }
4205
4105
  function U(e, r) {
4206
4106
  let i = t.value, a = r.get(e), o = d.value.get(e), s = o == null ? null : f.value[o];
@@ -4208,7 +4108,7 @@ function aa(e) {
4208
4108
  let c = s.y - a.y;
4209
4109
  i.scrollTop += c, n.value = i.scrollTop;
4210
4110
  }
4211
- function W() {
4111
+ function te() {
4212
4112
  let e = t.value;
4213
4113
  if (!e) {
4214
4114
  n.value = 0;
@@ -4216,8 +4116,8 @@ function aa(e) {
4216
4116
  }
4217
4117
  e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
4218
4118
  }
4219
- function G() {
4220
- if (!C.value.length || te()) return;
4119
+ function W() {
4120
+ if (!C.value.length || G()) return;
4221
4121
  let t = n.value + r.value / 2, i = b.value, a = Infinity;
4222
4122
  for (let e of C.value) {
4223
4123
  let n = f.value[e], r = u.value[e];
@@ -4227,26 +4127,26 @@ function aa(e) {
4227
4127
  }
4228
4128
  e.setActiveIndex(i);
4229
4129
  }
4230
- function te() {
4231
- let t = n.value <= ta, r = J() <= ea;
4130
+ function G() {
4131
+ let t = n.value <= Ji, r = Y() <= qi;
4232
4132
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
4233
4133
  }
4234
- function ne() {
4235
- N.maybeRequestPage(), P.maybeRequestPage();
4236
- }
4237
4134
  function K() {
4238
- r.value = q(), a.value = re();
4135
+ N.maybeRequestPage(), P.maybeRequestPage();
4239
4136
  }
4240
4137
  function q() {
4241
- return Ei(t.value, r.value);
4242
- }
4243
- function re() {
4244
- return Di(t.value, a.value, Zi);
4138
+ r.value = J(), a.value = ne();
4245
4139
  }
4246
4140
  function J() {
4247
- return Oi(t.value, n.value, r.value, T.value);
4141
+ return yi(t.value, r.value);
4142
+ }
4143
+ function ne() {
4144
+ return bi(t.value, a.value, Wi);
4248
4145
  }
4249
4146
  function Y() {
4147
+ return xi(t.value, n.value, r.value, T.value);
4148
+ }
4149
+ function X() {
4250
4150
  let e = Math.max(t.value?.scrollHeight ?? 0, T.value);
4251
4151
  return Math.max(0, e - r.value);
4252
4152
  }
@@ -4270,17 +4170,17 @@ function aa(e) {
4270
4170
  scrollViewportRef: t
4271
4171
  };
4272
4172
  }
4273
- function oa(e, t, n) {
4173
+ function $i(e, t, n) {
4274
4174
  return Math.min(Math.max(e, t), n);
4275
4175
  }
4276
4176
  //#endregion
4277
4177
  //#region src/components/viewer-core/listCardAsset.ts
4278
- function sa(e) {
4178
+ function ea(e) {
4279
4179
  if (e) try {
4280
4180
  e.removeAttribute("src"), e.src = "";
4281
4181
  } catch {}
4282
4182
  }
4283
- function ca(e) {
4183
+ function ta(e) {
4284
4184
  if (e) {
4285
4185
  try {
4286
4186
  e.currentTime = 0;
@@ -4291,12 +4191,12 @@ function ca(e) {
4291
4191
  } catch {}
4292
4192
  }
4293
4193
  }
4294
- function la(e, t) {
4194
+ function na(e, t) {
4295
4195
  if (t) return e.bottom > t.top && e.top < t.bottom;
4296
4196
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
4297
4197
  return e.bottom > 0 && e.top < n;
4298
4198
  }
4299
- function ua(e) {
4199
+ function ra(e) {
4300
4200
  if (!e) return null;
4301
4201
  try {
4302
4202
  return new URL(e, window.location.href).href;
@@ -4306,9 +4206,9 @@ function ua(e) {
4306
4206
  }
4307
4207
  //#endregion
4308
4208
  //#region src/components/viewer-core/useListCardHealthCheck.ts
4309
- function da(e) {
4209
+ function ia(e) {
4310
4210
  let t = D(null), n = i(() => {
4311
- let t = typeof e.item.value.healthCheck?.url == "string" ? ua(e.item.value.healthCheck.url) : null;
4211
+ let t = typeof e.item.value.healthCheck?.url == "string" ? ra(e.item.value.healthCheck.url) : null;
4312
4212
  return !t || t === e.attachedAssetUrl.value ? null : t;
4313
4213
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
4314
4214
  z(n, (e, n) => {
@@ -4386,14 +4286,14 @@ function da(e) {
4386
4286
  }
4387
4287
  //#endregion
4388
4288
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
4389
- var fa = ["aria-label"], pa = {
4289
+ var aa = ["aria-label"], oa = {
4390
4290
  key: 0,
4391
4291
  "data-testid": "vibe-list-card-spinner",
4392
4292
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
4393
- }, ma = { 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]" }, ha = ["src", "alt"], ga = ["src"], _a = ["data-kind"], va = { class: "grid justify-items-center gap-3 px-4 text-center" }, ya = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ba = {
4293
+ }, sa = { 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]" }, ca = ["src", "alt"], la = ["src"], ua = ["data-kind"], da = { class: "grid justify-items-center gap-3 px-4 text-center" }, fa = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, pa = {
4394
4294
  key: 4,
4395
4295
  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))]"
4396
- }, xa = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Sa = { class: "pointer-events-none absolute inset-0 z-[3]" }, Ca = /* @__PURE__ */ d({
4296
+ }, ma = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, ha = { class: "pointer-events-none absolute inset-0 z-[3]" }, ga = /* @__PURE__ */ d({
4397
4297
  __name: "ListCard",
4398
4298
  props: {
4399
4299
  active: {
@@ -4417,7 +4317,7 @@ var fa = ["aria-label"], pa = {
4417
4317
  },
4418
4318
  emits: ["open"],
4419
4319
  setup(e, { emit: t }) {
4420
- let n = e, r = t, l = i(() => gr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = da({
4320
+ let n = e, r = t, l = i(() => yr(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), j = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = ia({
4421
4321
  attachedAssetUrl: E,
4422
4322
  getPriority: ce,
4423
4323
  isInView: d,
@@ -4431,39 +4331,39 @@ var fa = ["aria-label"], pa = {
4431
4331
  let e = l.value.kind === "fallback";
4432
4332
  m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
4433
4333
  }), z(O, () => {
4434
- K();
4334
+ q();
4435
4335
  }), z([
4436
4336
  d,
4437
4337
  m,
4438
4338
  E
4439
4339
  ], () => {
4440
- q();
4340
+ J();
4441
4341
  }), z(() => n.surfaceActive, (e) => {
4442
4342
  if (!e) {
4443
- J(), q();
4343
+ Y(), J();
4444
4344
  return;
4445
4345
  }
4446
4346
  requestAnimationFrame(() => {
4447
- Y(), K(), q();
4347
+ X(), q(), J();
4448
4348
  });
4449
4349
  }), S(() => {
4450
4350
  if (!y.value || typeof IntersectionObserver > "u") {
4451
- b.value = null, d.value = !0, K();
4351
+ b.value = null, d.value = !0, q();
4452
4352
  return;
4453
4353
  }
4454
4354
  b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
4455
- for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
4355
+ for (let t of e) t.target === y.value && (n.surfaceActive && X(t), q(), J());
4456
4356
  }, {
4457
4357
  root: b.value,
4458
4358
  threshold: [0, 1]
4459
4359
  }), B.observe(y.value);
4460
4360
  }), x(() => {
4461
- re(), P.release(), B?.disconnect(), B = null;
4361
+ ne(), P.release(), B?.disconnect(), B = null;
4462
4362
  });
4463
- function W() {
4464
- le(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
4363
+ function te() {
4364
+ le(_.value) && (m.value = !0, g.value = null, re(E.value ?? n.item.url), Y());
4465
4365
  }
4466
- async function G() {
4366
+ async function W() {
4467
4367
  if (!le(_.value)) return;
4468
4368
  let e = E.value ?? n.item.url;
4469
4369
  m.value = !1, g.value = "generic";
@@ -4474,25 +4374,25 @@ var fa = ["aria-label"], pa = {
4474
4374
  url: e,
4475
4375
  kind: t,
4476
4376
  surface: "grid"
4477
- }), J();
4377
+ }), Y();
4478
4378
  }
4479
- function te() {
4480
- le(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
4379
+ function G() {
4380
+ le(C.value) && (h.value = !0, m.value = !0, g.value = null, re(E.value ?? n.item.url), Y(), J());
4481
4381
  }
4482
- function ne() {
4382
+ function K() {
4483
4383
  le(C.value) && (h.value || (m.value = !1));
4484
4384
  }
4485
- function K() {
4385
+ function q() {
4486
4386
  if (l.value.kind === "fallback") {
4487
- re(!1);
4387
+ ne(!1);
4488
4388
  return;
4489
4389
  }
4490
4390
  if (!n.surfaceActive) {
4491
- J();
4391
+ Y();
4492
4392
  return;
4493
4393
  }
4494
4394
  if (!O.value) {
4495
- re();
4395
+ ne();
4496
4396
  return;
4497
4397
  }
4498
4398
  if (T.value || V) {
@@ -4508,7 +4408,7 @@ var fa = ["aria-label"], pa = {
4508
4408
  url: l.value.url ?? n.item.url
4509
4409
  });
4510
4410
  }
4511
- function q() {
4411
+ function J() {
4512
4412
  let e = C.value;
4513
4413
  if (!(!e || l.value.kind !== "video")) {
4514
4414
  if (I.value) {
@@ -4525,21 +4425,21 @@ var fa = ["aria-label"], pa = {
4525
4425
  e.pause();
4526
4426
  }
4527
4427
  }
4528
- function re(e = !0) {
4529
- T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (oe(), X()), J();
4428
+ function ne(e = !0) {
4429
+ T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (ae(), oe()), Y();
4530
4430
  }
4531
- function J() {
4431
+ function Y() {
4532
4432
  V?.release(), V = null;
4533
4433
  }
4534
- function Y(e) {
4434
+ function X(e) {
4535
4435
  let t = y.value;
4536
4436
  if (!t) {
4537
4437
  d.value = !0;
4538
4438
  return;
4539
4439
  }
4540
- d.value = la(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
4440
+ d.value = na(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
4541
4441
  }
4542
- function ie(e) {
4442
+ function re(e) {
4543
4443
  if (!e) return;
4544
4444
  let t = $(n.item), r = `${t}|${e}`;
4545
4445
  U.has(r) || (U.add(r), n.reportAssetLoad?.({
@@ -4549,18 +4449,18 @@ var fa = ["aria-label"], pa = {
4549
4449
  url: e
4550
4450
  }));
4551
4451
  }
4552
- function ae() {
4452
+ function ie() {
4553
4453
  if (!R.value || P.retry()) return;
4554
4454
  let e = $(n.item);
4555
4455
  U.forEach((t) => {
4556
4456
  t.startsWith(`${e}|`) && U.delete(t);
4557
- }), g.value = null, m.value = !1, T.value = !1, J(), K();
4457
+ }), g.value = null, m.value = !1, T.value = !1, Y(), q();
4558
4458
  }
4559
- function oe() {
4560
- sa(_.value);
4459
+ function ae() {
4460
+ ea(_.value);
4561
4461
  }
4562
- function X() {
4563
- ca(C.value);
4462
+ function oe() {
4463
+ ta(C.value);
4564
4464
  }
4565
4465
  function ce() {
4566
4466
  let e = y.value;
@@ -4574,8 +4474,8 @@ var fa = ["aria-label"], pa = {
4574
4474
  return Math.abs((t.top + t.bottom) / 2 - n);
4575
4475
  }
4576
4476
  function le(e) {
4577
- let t = ua(E.value);
4578
- return !e || !t ? !1 : ua("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
4477
+ let t = ra(E.value);
4478
+ return !e || !t ? !1 : ra("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
4579
4479
  }
4580
4480
  function ue() {
4581
4481
  r("open");
@@ -4603,8 +4503,8 @@ var fa = ["aria-label"], pa = {
4603
4503
  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]",
4604
4504
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
4605
4505
  onClick: ue
4606
- }, null, 8, fa),
4607
- ee.value ? (w(), s("div", pa, [c("span", ma, [u(F(se), {
4506
+ }, null, 8, aa),
4507
+ ee.value ? (w(), s("div", oa, [c("span", sa, [u(F(se), {
4608
4508
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
4609
4509
  "aria-hidden": "true"
4610
4510
  })])])) : o("", !0),
@@ -4616,9 +4516,9 @@ var fa = ["aria-label"], pa = {
4616
4516
  alt: l.value.label,
4617
4517
  draggable: "false",
4618
4518
  class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
4619
- onLoad: W,
4620
- onError: G
4621
- }, null, 42, ha)) : N.value && E.value && !L.value ? (w(), s("video", {
4519
+ onLoad: te,
4520
+ onError: W
4521
+ }, null, 42, ca)) : N.value && E.value && !L.value ? (w(), s("video", {
4622
4522
  key: 2,
4623
4523
  ref_key: "videoRef",
4624
4524
  ref: C,
@@ -4628,37 +4528,37 @@ var fa = ["aria-label"], pa = {
4628
4528
  playsinline: "",
4629
4529
  preload: "metadata",
4630
4530
  class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
4631
- onCanplay: te,
4632
- onError: G,
4633
- onLoadstart: ne,
4634
- onPlaying: te,
4635
- onStalled: ne,
4636
- onWaiting: ne
4637
- }, null, 42, ga)) : L.value ? (w(), s("div", {
4531
+ onCanplay: G,
4532
+ onError: W,
4533
+ onLoadstart: K,
4534
+ onPlaying: G,
4535
+ onStalled: K,
4536
+ onWaiting: K
4537
+ }, null, 42, la)) : L.value ? (w(), s("div", {
4638
4538
  key: 3,
4639
4539
  "data-testid": "vibe-list-card-error",
4640
4540
  "data-kind": I.value,
4641
4541
  class: "pointer-events-none 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))]"
4642
- }, [c("div", va, [
4542
+ }, [c("div", da, [
4643
4543
  u(F(de), {
4644
4544
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
4645
4545
  "aria-hidden": "true"
4646
4546
  }),
4647
- c("span", ya, M(F(yn)(I.value)), 1),
4547
+ c("span", fa, M(F(yn)(I.value)), 1),
4648
4548
  R.value ? (w(), s("button", {
4649
4549
  key: 0,
4650
4550
  type: "button",
4651
4551
  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",
4652
- onClick: H(ae, ["stop"])
4552
+ onClick: H(ie, ["stop"])
4653
4553
  }, " Retry ")) : o("", !0)
4654
- ])], 8, _a)) : (w(), s("div", ba, [c("div", xa, [k(e.$slots, "item-icon", {
4554
+ ])], 8, ua)) : (w(), s("div", pa, [c("div", ma, [k(e.$slots, "item-icon", {
4655
4555
  icon: F(Gt)(n.item.type),
4656
4556
  item: n.item
4657
4557
  }, () => [(w(), a(A(F(Gt)(n.item.type)), {
4658
4558
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
4659
4559
  "aria-hidden": "true"
4660
4560
  }))])])])),
4661
- c("div", Sa, [k(e.$slots, "grid-item-overlay", {
4561
+ c("div", ha, [k(e.$slots, "grid-item-overlay", {
4662
4562
  active: n.active,
4663
4563
  focused: f.value,
4664
4564
  hovered: p.value,
@@ -4668,24 +4568,24 @@ var fa = ["aria-label"], pa = {
4668
4568
  })])
4669
4569
  ], 34));
4670
4570
  }
4671
- }), wa = { 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)]" }, Ta = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Ea = {
4571
+ }), _a = { 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)]" }, va = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ya = {
4672
4572
  "data-testid": "vibe-pagination",
4673
4573
  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]"
4674
- }, Da = { class: "whitespace-nowrap" }, Oa = {
4574
+ }, ba = { class: "whitespace-nowrap" }, xa = {
4675
4575
  key: 0,
4676
4576
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
4677
- }, ka = [
4577
+ }, Sa = [
4678
4578
  "data-active",
4679
4579
  "data-index",
4680
4580
  "data-item-id",
4681
4581
  "data-occurrence-key"
4682
- ], Aa = ["data-item-id"], ja = {
4582
+ ], Ca = ["data-item-id"], wa = {
4683
4583
  key: 0,
4684
4584
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
4685
- }, Ma = {
4585
+ }, Ta = {
4686
4586
  key: 1,
4687
4587
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
4688
- }, Na = { class: "mx-auto flex w-full justify-center" }, Pa = /* @__PURE__ */ d({
4588
+ }, Ea = { class: "mx-auto flex w-full justify-center" }, Da = /* @__PURE__ */ d({
4689
4589
  __name: "ListSurface",
4690
4590
  props: {
4691
4591
  active: {
@@ -4747,7 +4647,7 @@ var fa = ["aria-label"], pa = {
4747
4647
  "update:activeIndex"
4748
4648
  ],
4749
4649
  setup(e, { expose: n, emit: r }) {
4750
- let d = e, f = L(), p = r, m = aa({
4650
+ let d = e, f = L(), p = r, m = Qi({
4751
4651
  active: N(d, "active"),
4752
4652
  allowExhaustedNextPageRefresh: N(d, "allowExhaustedNextPageRefresh"),
4753
4653
  bottomLoadBufferPx: N(d, "bottomLoadBufferPx"),
@@ -4795,8 +4695,8 @@ var fa = ["aria-label"], pa = {
4795
4695
  nextBoundaryLoadProgress: e,
4796
4696
  previousBoundaryLoadProgress: t
4797
4697
  });
4798
- }, { immediate: !0 }), (e, n) => (w(), s("div", wa, [
4799
- c("div", Ta, [c("span", Ea, [c("span", Da, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", Oa, M(d.paginationDetail), 1)) : o("", !0)])]),
4698
+ }, { immediate: !0 }), (e, n) => (w(), s("div", _a, [
4699
+ c("div", va, [c("span", ya, [c("span", ba, M(F(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", xa, M(d.paginationDetail), 1)) : o("", !0)])]),
4800
4700
  c("div", {
4801
4701
  ref: F(m).scrollViewportRef,
4802
4702
  "data-testid": "vibe-list-scroll",
@@ -4817,7 +4717,7 @@ var fa = ["aria-label"], pa = {
4817
4717
  "data-occurrence-key": F($)(t),
4818
4718
  class: "absolute will-change-transform",
4819
4719
  style: b(F(m).getCardStyle(n))
4820
- }, [u(Ca, {
4720
+ }, [u(ga, {
4821
4721
  active: n === F(m).resolvedActiveIndex.value,
4822
4722
  index: n,
4823
4723
  item: t,
@@ -4841,14 +4741,14 @@ var fa = ["aria-label"], pa = {
4841
4741
  "report-asset-load",
4842
4742
  "surface-active",
4843
4743
  "onOpen"
4844
- ])], 12, ka))), 128)),
4744
+ ])], 12, Sa))), 128)),
4845
4745
  (w(!0), s(t, null, O(F(m).leavingItems.value, (t) => (w(), s("article", {
4846
4746
  key: `leaving-${F($)(t.item)}`,
4847
4747
  "data-testid": "vibe-list-card-leaving",
4848
4748
  "data-item-id": t.item.id,
4849
4749
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
4850
4750
  style: b(F(m).getLeavingCardStyle(t.item))
4851
- }, [u(Ca, {
4751
+ }, [u(ga, {
4852
4752
  active: !1,
4853
4753
  index: -1,
4854
4754
  item: t.item,
@@ -4863,8 +4763,8 @@ var fa = ["aria-label"], pa = {
4863
4763
  "item",
4864
4764
  "report-asset-error",
4865
4765
  "report-asset-load"
4866
- ])], 12, Aa))), 128)),
4867
- F(j) && F(E) ? (w(), a(Pr, {
4766
+ ])], 12, Ca))), 128)),
4767
+ F(j) && F(E) ? (w(), a(nr, {
4868
4768
  key: 0,
4869
4769
  message: F(E).message,
4870
4770
  mode: F(E).mode,
@@ -4878,12 +4778,12 @@ var fa = ["aria-label"], pa = {
4878
4778
  "surface"
4879
4779
  ])) : o("", !0)
4880
4780
  ], 4)], 544),
4881
- F(m).showScrollbar.value ? (w(), s("div", ja, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4781
+ F(m).showScrollbar.value ? (w(), s("div", wa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4882
4782
  "data-testid": "vibe-list-scrollbar-thumb",
4883
4783
  class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
4884
4784
  style: b(F(m).getScrollbarThumbStyle())
4885
4785
  }, null, 6)])) : o("", !0),
4886
- f["grid-footer"] ? (w(), s("div", Ma, [c("div", Na, [k(e.$slots, "grid-footer")])])) : o("", !0),
4786
+ f["grid-footer"] ? (w(), s("div", Ta, [c("div", Ea, [k(e.$slots, "grid-footer")])])) : o("", !0),
4887
4787
  x.value ? (w(), s("div", {
4888
4788
  key: 2,
4889
4789
  class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
@@ -4892,7 +4792,7 @@ var fa = ["aria-label"], pa = {
4892
4792
  "data-testid": "vibe-grid-status-badge",
4893
4793
  class: v(["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]", x.value.kind === "end" ? "border-amber-300/35 text-amber-200" : x.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
4894
4794
  }, M(x.value.message), 3))], 2)) : o("", !0),
4895
- F(D) && F(E) ? (w(), a(Pr, {
4795
+ F(D) && F(E) ? (w(), a(nr, {
4896
4796
  key: 3,
4897
4797
  class: v(["z-[3]", f["grid-footer"] ? "pb-24" : "pb-6"]),
4898
4798
  message: F(E).message,
@@ -4909,13 +4809,13 @@ var fa = ["aria-label"], pa = {
4909
4809
  ])) : o("", !0)
4910
4810
  ]));
4911
4811
  }
4912
- }), Fa = ["data-surface-mode"], Ia = {
4812
+ }), Oa = ["data-surface-mode"], ka = {
4913
4813
  key: 1,
4914
4814
  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"
4915
- }, La = ["data-visible", "inert"], Ra = ["data-visible", "inert"], za = {
4815
+ }, Aa = ["data-visible", "inert"], ja = ["data-visible", "inert"], Ma = {
4916
4816
  key: 3,
4917
4817
  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"
4918
- }, Ba = /* @__PURE__ */ d({
4818
+ }, Na = /* @__PURE__ */ d({
4919
4819
  name: "VibeLayout",
4920
4820
  __name: "Layout",
4921
4821
  props: {
@@ -4983,7 +4883,7 @@ var fa = ["aria-label"], pa = {
4983
4883
  type: "button",
4984
4884
  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",
4985
4885
  onClick: n[0] ||= (...e) => F(h).retryInitialLoad && F(h).retryInitialLoad(...e)
4986
- }, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", Ia, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4886
+ }, " Retry ")) : F(h).errorMessage.value && F(h).items.value.length > 0 ? (w(), s("div", ka, M(F(h).errorMessage.value), 1)) : o("", !0), F(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4987
4887
  appear: "",
4988
4888
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
4989
4889
  "enter-from-class": "translate-y-3 opacity-0",
@@ -4997,7 +4897,7 @@ var fa = ["aria-label"], pa = {
4997
4897
  "data-visible": F(h).surfaceMode.value === "list" ? "true" : "false",
4998
4898
  inert: F(h).surfaceMode.value !== "list",
4999
4899
  class: "absolute inset-0 z-[2]"
5000
- }, [u(Pa, {
4900
+ }, [u(Da, {
5001
4901
  ref_key: "listSurfaceRef",
5002
4902
  ref: g,
5003
4903
  active: F(h).surfaceMode.value === "list",
@@ -5071,7 +4971,7 @@ var fa = ["aria-label"], pa = {
5071
4971
  "onBoundaryLoadProgress",
5072
4972
  "onOpenFullscreen",
5073
4973
  "onUpdate:activeIndex"
5074
- ])], 8, La), [[R, F(h).surfaceMode.value === "list"]])]),
4974
+ ])], 8, Aa), [[R, F(h).surfaceMode.value === "list"]])]),
5075
4975
  _: 3
5076
4976
  }), u(r, {
5077
4977
  appear: "",
@@ -5087,7 +4987,7 @@ var fa = ["aria-label"], pa = {
5087
4987
  "data-visible": F(h).surfaceMode.value === "fullscreen" ? "true" : "false",
5088
4988
  inert: F(h).surfaceMode.value !== "fullscreen",
5089
4989
  class: "absolute inset-0 z-[3]"
5090
- }, [u(fi, {
4990
+ }, [u(ri, {
5091
4991
  items: F(h).items.value,
5092
4992
  active: F(h).surfaceMode.value === "fullscreen",
5093
4993
  "active-index": F(h).activeIndex.value,
@@ -5145,12 +5045,12 @@ var fa = ["aria-label"], pa = {
5145
5045
  fn: B((t) => [k(e.$slots, "item-icon", y(p(t)))]),
5146
5046
  key: "5"
5147
5047
  } : void 0
5148
- ]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, Ra), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
5048
+ ]), 1032, /* @__PURE__ */ "items.active.active-index.error-message.fill-collected-count.fill-completed-calls.fill-loaded-count.fill-mode.fill-progress.fill-target-calls.fill-target-count.fill-total-count.loading.has-next-page.pagination-detail.phase.report-asset-error.report-asset-load.empty-state-mode.loop-fullscreen-video.show-dominant-image-tone.show-end-badge.show-status-badges.show-back-to-list.onBackToList.onUpdate:activeIndex".split("."))], 8, ja), [[R, F(h).surfaceMode.value === "fullscreen"]])]),
5149
5049
  _: 3
5150
- })], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", za, [u(F(se), {
5050
+ })], 64)) : F(h).items.value.length === 0 && F(h).loading.value && F(h).phase.value === "initializing" ? (w(), s("div", Ma, [u(F(se), {
5151
5051
  class: "size-10 animate-spin text-[#f7f1ea]/82",
5152
5052
  "aria-hidden": "true"
5153
- }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(fi, {
5053
+ }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ri, {
5154
5054
  key: 4,
5155
5055
  items: F(h).items.value,
5156
5056
  active: !0,
@@ -5234,10 +5134,10 @@ var fa = ["aria-label"], pa = {
5234
5134
  "show-status-badges",
5235
5135
  "onBackToList",
5236
5136
  "onUpdate:activeIndex"
5237
- ]))], 8, Fa));
5137
+ ]))], 8, Oa));
5238
5138
  }
5239
- }), Va = { install(e) {
5240
- e.component("VibeLayout", Ba);
5139
+ }), Pa = { install(e) {
5140
+ e.component("VibeLayout", Na);
5241
5141
  } };
5242
5142
  //#endregion
5243
- export { Ba as VibeLayout, Va as VibePlugin, Va as default };
5143
+ export { Na as VibeLayout, Pa as VibePlugin, Pa as default };