@wyxos/vibe 3.1.6 → 3.1.8
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/README.md +13 -19
- package/lib/components/ListCard.vue.d.ts +1 -1
- package/lib/components/viewer-core/autoResolveState.d.ts +1 -1
- package/lib/components/viewer-core/fillDelay.d.ts +4 -4
- package/lib/components/viewer-core/removalState.d.ts +0 -2
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +1 -3
- package/lib/components/viewer-core/useController.d.ts +0 -2
- package/lib/components/viewer-core/useDataSource.d.ts +1 -3
- package/lib/components/viewer-core/useFullscreenPreloadController.d.ts +15 -0
- package/lib/components/viewer-core/useFullscreenSurfaceMedia.d.ts +6 -0
- package/lib/components/viewer-core/useMedia.d.ts +1 -0
- package/lib/components/viewer-core/useViewer.d.ts +2 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1468 -1261
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d,
|
|
1
|
+
import { Comment as e, Fragment as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, getCurrentScope as f, guardReactiveProps as p, h as m, isVNode as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, openBlock as w, reactive as T, readonly as E, ref as D, renderList as ee, renderSlot as O, resolveDynamicComponent as k, toDisplayString as A, toRef as j, unref as M, useAttrs as N, useSlots as P, vShow as F, watch as I, watchEffect as L, withCtx as R, withDirectives as z, withModifiers as te } from "vue";
|
|
2
2
|
//#region node_modules/lucide-vue-next/dist/esm/shared/src/utils/hasA11yProp.js
|
|
3
3
|
var B = (e) => {
|
|
4
4
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
5
5
|
return !1;
|
|
6
|
-
},
|
|
7
|
-
let t =
|
|
6
|
+
}, V = (e) => e === "", H = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), U = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), W = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ne = (e) => {
|
|
7
|
+
let t = W(e);
|
|
8
8
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
9
9
|
}, G = {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16,27 +16,27 @@ var B = (e) => {
|
|
|
16
16
|
"stroke-width": 2,
|
|
17
17
|
"stroke-linecap": "round",
|
|
18
18
|
"stroke-linejoin": "round"
|
|
19
|
-
},
|
|
19
|
+
}, K = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": a, size: o = G.width, color: s = G.stroke, ...c }, { slots: l }) => m("svg", {
|
|
20
20
|
...G,
|
|
21
21
|
...c,
|
|
22
22
|
width: o,
|
|
23
23
|
height: o,
|
|
24
24
|
stroke: s,
|
|
25
|
-
"stroke-width":
|
|
26
|
-
class:
|
|
25
|
+
"stroke-width": V(n) || V(r) || n === !0 || r === !0 ? Number(i || a || G["stroke-width"]) * 24 / Number(o) : i || a || G["stroke-width"],
|
|
26
|
+
class: H("lucide", c.class, ...e ? [`lucide-${U(ne(e))}-icon`, `lucide-${U(e)}`] : ["lucide-icon"]),
|
|
27
27
|
...!l.default && !B(c) && { "aria-hidden": "true" }
|
|
28
|
-
}, [...t.map((e) =>
|
|
28
|
+
}, [...t.map((e) => m(...e)), ...l.default ? [l.default()] : []]), q = (e, t) => (n, { slots: r, attrs: i }) => m(K, {
|
|
29
29
|
...i,
|
|
30
30
|
...n,
|
|
31
31
|
iconNode: t,
|
|
32
32
|
name: e
|
|
33
|
-
}, r),
|
|
33
|
+
}, r), re = q("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
|
-
}]]), J =
|
|
39
|
+
}]]), J = q("audio-lines", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M2 10v3",
|
|
42
42
|
key: "1fnikh"
|
|
@@ -61,7 +61,7 @@ var B = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), Y = q("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,13 +78,13 @@ var B = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), ie = q("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
|
-
}]]),
|
|
87
|
+
}]]), ae = q("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var B = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]),
|
|
110
|
+
]), oe = q("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]),
|
|
113
|
+
}]]), se = q("pause", [["rect", {
|
|
114
114
|
x: "14",
|
|
115
115
|
y: "3",
|
|
116
116
|
width: "5",
|
|
@@ -124,10 +124,10 @@ var B = (e) => {
|
|
|
124
124
|
height: "18",
|
|
125
125
|
rx: "1",
|
|
126
126
|
key: "1wsw3u"
|
|
127
|
-
}]]),
|
|
127
|
+
}]]), ce = q("play", [["path", {
|
|
128
128
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
129
129
|
key: "10ikf1"
|
|
130
|
-
}]]),
|
|
130
|
+
}]]), le = q("triangle-alert", [
|
|
131
131
|
["path", {
|
|
132
132
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
133
133
|
key: "wmoenq"
|
|
@@ -140,13 +140,13 @@ var B = (e) => {
|
|
|
140
140
|
d: "M12 17h.01",
|
|
141
141
|
key: "p32p05"
|
|
142
142
|
}]
|
|
143
|
-
]),
|
|
143
|
+
]), X = q("volume-1", [["path", {
|
|
144
144
|
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",
|
|
145
145
|
key: "uqj9uw"
|
|
146
146
|
}], ["path", {
|
|
147
147
|
d: "M16 9a5 5 0 0 1 0 6",
|
|
148
148
|
key: "1q6k2b"
|
|
149
|
-
}]]),
|
|
149
|
+
}]]), ue = q("volume-2", [
|
|
150
150
|
["path", {
|
|
151
151
|
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",
|
|
152
152
|
key: "uqj9uw"
|
|
@@ -159,7 +159,7 @@ var B = (e) => {
|
|
|
159
159
|
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
160
160
|
key: "ijwkga"
|
|
161
161
|
}]
|
|
162
|
-
]),
|
|
162
|
+
]), de = q("volume-x", [
|
|
163
163
|
["path", {
|
|
164
164
|
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",
|
|
165
165
|
key: "uqj9uw"
|
|
@@ -179,13 +179,13 @@ var B = (e) => {
|
|
|
179
179
|
key: "5ykzw1"
|
|
180
180
|
}]
|
|
181
181
|
]);
|
|
182
|
-
function
|
|
183
|
-
return
|
|
182
|
+
function Z(e, t = 150) {
|
|
183
|
+
return pe(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
return
|
|
185
|
+
function fe(e, t = 150) {
|
|
186
|
+
return pe(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function pe(e, t, n) {
|
|
189
189
|
let r = [], i = /* @__PURE__ */ new Set(), a = null;
|
|
190
190
|
function o(e) {
|
|
191
191
|
let o = t(e);
|
|
@@ -209,41 +209,41 @@ function de(e, t, n) {
|
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region src/components/viewer-core/dom.ts
|
|
212
|
-
function
|
|
212
|
+
function me(e) {
|
|
213
213
|
return e instanceof HTMLElement && [
|
|
214
214
|
"INPUT",
|
|
215
215
|
"TEXTAREA",
|
|
216
216
|
"SELECT"
|
|
217
217
|
].includes(e.tagName);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function he(e) {
|
|
220
220
|
return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function ge(e) {
|
|
223
223
|
return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function _e(e) {
|
|
226
226
|
return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function ve(e) {
|
|
229
229
|
return e ?? "__vibe_initial_cursor__";
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Q(e, t, n) {
|
|
232
232
|
return Math.min(Math.max(e, t), n);
|
|
233
233
|
}
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/components/viewer-core/removalState.ts
|
|
236
|
-
function
|
|
237
|
-
let e =
|
|
236
|
+
function ye() {
|
|
237
|
+
let e = D(/* @__PURE__ */ new Set()), t = D([]);
|
|
238
238
|
function n(n) {
|
|
239
|
-
let r =
|
|
239
|
+
let r = be(n).filter((t) => !e.value.has(t));
|
|
240
240
|
if (!r.length) return { ids: [] };
|
|
241
241
|
let i = new Set(e.value);
|
|
242
242
|
for (let e of r) i.add(e);
|
|
243
243
|
return e.value = i, t.value = [...t.value, r], { ids: r };
|
|
244
244
|
}
|
|
245
245
|
function r(t) {
|
|
246
|
-
let n =
|
|
246
|
+
let n = be(t).filter((t) => e.value.has(t));
|
|
247
247
|
if (!n.length) return { ids: [] };
|
|
248
248
|
let r = new Set(e.value);
|
|
249
249
|
for (let e of n) r.delete(e);
|
|
@@ -274,18 +274,18 @@ function _e() {
|
|
|
274
274
|
undo: i
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function be(e) {
|
|
278
278
|
let t = Array.isArray(e) ? e : [e];
|
|
279
279
|
return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
|
|
280
280
|
}
|
|
281
281
|
//#endregion
|
|
282
282
|
//#region src/components/viewer-core/itemIdentity.ts
|
|
283
|
-
var
|
|
283
|
+
var xe = "__vibeOccurrenceKey";
|
|
284
284
|
function $(e) {
|
|
285
|
-
let t = e[
|
|
285
|
+
let t = e[xe];
|
|
286
286
|
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Se(e, t, n) {
|
|
289
289
|
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
290
290
|
for (let e of t) {
|
|
291
291
|
let t = r.get(e.id), n = $(e);
|
|
@@ -293,49 +293,49 @@ function be(e, t, n) {
|
|
|
293
293
|
}
|
|
294
294
|
for (let t of e) {
|
|
295
295
|
let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
|
|
296
|
-
i.push(
|
|
296
|
+
i.push(Ce(t, e));
|
|
297
297
|
}
|
|
298
298
|
return {
|
|
299
299
|
items: i,
|
|
300
300
|
nextSequence: a
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Ce(e, t) {
|
|
304
304
|
return $(e) === t ? e : {
|
|
305
305
|
...e,
|
|
306
|
-
[
|
|
306
|
+
[xe]: t
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/components/viewer-core/autoBuckets.ts
|
|
311
|
-
function
|
|
311
|
+
function we(e) {
|
|
312
312
|
return e.flatMap((e) => e.items);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Te(e, t) {
|
|
315
315
|
return t.size ? e.filter((e) => !t.has(e.id)) : e;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
317
|
+
function Ee(e, t) {
|
|
318
|
+
return Te(e.items, t);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
321
|
-
return
|
|
320
|
+
function De(e, t) {
|
|
321
|
+
return Ee(e, t).length;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Oe(e, t, n) {
|
|
324
324
|
if (n < 0) return null;
|
|
325
325
|
let r = 0;
|
|
326
326
|
for (let i of e) {
|
|
327
|
-
let e =
|
|
327
|
+
let e = Ee(i, t), a = r + e.length;
|
|
328
328
|
if (n < a) return i.cursor;
|
|
329
329
|
r = a;
|
|
330
330
|
}
|
|
331
331
|
return null;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ke(e, t, n) {
|
|
334
334
|
let r = [...e], i = r.findIndex((e) => e.cursor === t);
|
|
335
335
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
let r =
|
|
337
|
+
function Ae(e, t, n) {
|
|
338
|
+
let r = Se(e, t, n);
|
|
339
339
|
return {
|
|
340
340
|
items: r.items,
|
|
341
341
|
nextSequence: r.nextSequence
|
|
@@ -343,11 +343,11 @@ function Oe(e, t, n) {
|
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
345
|
//#region src/components/viewer-core/autoResolveState.ts
|
|
346
|
-
function
|
|
346
|
+
function je(e) {
|
|
347
347
|
return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && (e.name === "AbortError" || e.name === "CanceledError") ? !0 : typeof e == "object" && !!e && "code" in e && e.code === "ERR_CANCELED";
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
let t =
|
|
349
|
+
function Me(e) {
|
|
350
|
+
let t = Ae(e.nextItems, e.previousItems, e.sequence);
|
|
351
351
|
return {
|
|
352
352
|
bucket: {
|
|
353
353
|
cursor: e.cursor,
|
|
@@ -358,7 +358,7 @@ function Ae(e) {
|
|
|
358
358
|
nextSequence: t.nextSequence
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Ne(e, t, n, r) {
|
|
362
362
|
if (!e.length) return r ? null : {
|
|
363
363
|
buckets: [],
|
|
364
364
|
canceled: r,
|
|
@@ -368,47 +368,47 @@ function je(e, t, n, r) {
|
|
|
368
368
|
return {
|
|
369
369
|
buckets: i,
|
|
370
370
|
canceled: r,
|
|
371
|
-
visibleCount: i.reduce((e, t) => e +
|
|
371
|
+
visibleCount: i.reduce((e, t) => e + De(t, n), 0)
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
let t =
|
|
374
|
+
function Pe(e) {
|
|
375
|
+
let t = Me({
|
|
376
376
|
cursor: e.initialState.cursor,
|
|
377
377
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
378
378
|
nextItems: e.initialState.items,
|
|
379
379
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
380
380
|
previousItems: [],
|
|
381
381
|
sequence: e.sequence
|
|
382
|
-
}), n =
|
|
382
|
+
}), n = Te(t.bucket.items, e.removedIds);
|
|
383
383
|
return {
|
|
384
|
-
activeIndex:
|
|
384
|
+
activeIndex: Q(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
|
|
385
385
|
buckets: [t.bucket],
|
|
386
386
|
nextSequence: t.nextSequence
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
let n = e[
|
|
389
|
+
function Fe(e, t) {
|
|
390
|
+
let n = e[Q(t, 0, Math.max(0, e.length - 1))];
|
|
391
391
|
return n ? $(n) : null;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Ie(e, t, n = null) {
|
|
394
394
|
if (!e.length) return 0;
|
|
395
395
|
let r = n ? e.findIndex((e) => $(e) === n) : -1;
|
|
396
|
-
return r >= 0 ? r :
|
|
396
|
+
return r >= 0 ? r : Q(t, 0, e.length - 1);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
return e ?
|
|
398
|
+
function Le(e, t, n) {
|
|
399
|
+
return e ? De(e, t) < n : !1;
|
|
400
400
|
}
|
|
401
401
|
//#endregion
|
|
402
402
|
//#region src/components/viewer-core/fillDelay.ts
|
|
403
|
-
var
|
|
404
|
-
function
|
|
403
|
+
var Re = 2e3, ze = 1e3, Be = 100;
|
|
404
|
+
function Ve(e, t = Re, n = ze) {
|
|
405
405
|
return t + Math.max(0, e - 1) * n;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function He(e, t) {
|
|
408
408
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
let e =
|
|
410
|
+
function Ue() {
|
|
411
|
+
let e = D(null), t = null, n = null, r = null;
|
|
412
412
|
function i(i = !1) {
|
|
413
413
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
414
414
|
let e = r;
|
|
@@ -425,7 +425,7 @@ function Ve() {
|
|
|
425
425
|
let t = Math.max(0, a - (Date.now() - s));
|
|
426
426
|
e.value = t, t <= 0 && l();
|
|
427
427
|
};
|
|
428
|
-
t = setInterval(u,
|
|
428
|
+
t = setInterval(u, Be), n = setTimeout(l, a), u();
|
|
429
429
|
}));
|
|
430
430
|
}
|
|
431
431
|
return {
|
|
@@ -436,110 +436,118 @@ function Ve() {
|
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
439
|
-
function
|
|
440
|
-
let t = !!e.initialState?.items.length, n =
|
|
441
|
-
|
|
439
|
+
function We(e) {
|
|
440
|
+
let t = !!e.initialState?.items.length, n = D([]), r = D(0), a = D([]), o = D(!1), s = D(null), c = D(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = D(null), u = Ue(), d = u.remainingMs, f = D(null), p = D(!1), m = D(!0), h = D(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, b = 0, C = i(() => He(e.fillDelayMs, Re)), w = i(() => He(e.fillDelayStepMs, ze)), T = i(() => typeof e.resolve == "function"), E = i(() => _e(e.pageSize)), ee = i(() => we(n.value)), O = i(() => Te(ee.value, e.removedIds.value)), k = i(() => r.value), A = i(() => ge(c.value) || p.value), j = i(() => Ge(n.value, e.removedIds.value)), M = i(() => Ke(n.value, e.removedIds.value)), N = i(() => M.value?.nextCursor ?? null), P = i(() => o.value ? null : j.value?.previousCursor ?? null), F = i(() => !!N.value), L = i(() => !!P.value), R = i(() => T.value && n.value.length > 0), z = i(() => Te(we(a.value), e.removedIds.value)), te = i(() => Oe(n.value, e.removedIds.value, k.value)), B = i(() => !O.value.length && !A.value && !!s.value);
|
|
441
|
+
I(() => O.value.length, (e) => {
|
|
442
442
|
if (e === 0) {
|
|
443
443
|
r.value = 0;
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
|
-
o.value &&= (
|
|
447
|
-
}),
|
|
446
|
+
o.value &&= (he(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
447
|
+
}), I(() => r.value, () => {
|
|
448
448
|
m.value && se();
|
|
449
|
+
}), S(() => {
|
|
450
|
+
fe() || e.resolve && V();
|
|
449
451
|
}), x(() => {
|
|
450
|
-
fe() || e.resolve && U();
|
|
451
|
-
}), b(() => {
|
|
452
452
|
_?.abort(), _ = null, u.clear(!0);
|
|
453
453
|
});
|
|
454
|
-
async function
|
|
455
|
-
v =
|
|
454
|
+
async function V() {
|
|
455
|
+
v = V;
|
|
456
456
|
let t = await ue({
|
|
457
|
-
continueUntilFilled:
|
|
457
|
+
continueUntilFilled: !0,
|
|
458
458
|
cursor: e.initialCursor ?? null,
|
|
459
459
|
direction: "forward",
|
|
460
460
|
phase: "initializing"
|
|
461
461
|
});
|
|
462
|
-
t && (n.value = t.buckets, r.value = 0,
|
|
463
|
-
}
|
|
464
|
-
async function
|
|
465
|
-
if (!(h.value ||
|
|
466
|
-
if (
|
|
467
|
-
|
|
468
|
-
|
|
462
|
+
t && (n.value = t.buckets, r.value = 0, Z());
|
|
463
|
+
}
|
|
464
|
+
async function H() {
|
|
465
|
+
if (!(h.value || A.value)) {
|
|
466
|
+
if (me("trailing") || !F.value) {
|
|
467
|
+
if (!R.value) return;
|
|
468
|
+
let e = await X("trailing");
|
|
469
|
+
e?.itemsLoaded === 0 && e.followCursor && await ce(e.followCursor);
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
await ce(N.value);
|
|
469
473
|
}
|
|
470
474
|
}
|
|
471
|
-
async function
|
|
472
|
-
if (!(h.value || !
|
|
473
|
-
if (
|
|
474
|
-
|
|
475
|
+
async function U() {
|
|
476
|
+
if (!(h.value || !L.value || A.value)) {
|
|
477
|
+
if (me("leading")) {
|
|
478
|
+
let e = await X("leading");
|
|
479
|
+
e?.itemsLoaded === 0 && e.followCursor && await le(e.followCursor);
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
await le(P.value);
|
|
475
483
|
}
|
|
476
484
|
}
|
|
477
|
-
async function
|
|
478
|
-
if (
|
|
479
|
-
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value =
|
|
480
|
-
|
|
485
|
+
async function W() {
|
|
486
|
+
if (B.value) {
|
|
487
|
+
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = T.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
|
|
488
|
+
Z();
|
|
481
489
|
return;
|
|
482
490
|
}
|
|
483
|
-
await
|
|
491
|
+
await V();
|
|
484
492
|
}
|
|
485
493
|
}
|
|
486
|
-
async function
|
|
487
|
-
if (
|
|
494
|
+
async function ne() {
|
|
495
|
+
if (B.value) return W();
|
|
488
496
|
h.value || c.value !== "failed" || !v || (s.value = null, await v());
|
|
489
497
|
}
|
|
490
|
-
async function
|
|
491
|
-
if (!a.value.length) return p.value = !1,
|
|
492
|
-
n.value = [...n.value, ...a.value], a.value = [], p.value = !1,
|
|
498
|
+
async function G() {
|
|
499
|
+
if (!a.value.length) return p.value = !1, Z();
|
|
500
|
+
n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
|
|
493
501
|
}
|
|
494
|
-
function
|
|
495
|
-
let n =
|
|
502
|
+
function K(t) {
|
|
503
|
+
let n = O.value;
|
|
496
504
|
if (!n.length) return;
|
|
497
|
-
let i =
|
|
505
|
+
let i = Q(t, 0, n.length - 1);
|
|
498
506
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
499
507
|
}
|
|
500
|
-
function
|
|
508
|
+
function q(e) {
|
|
501
509
|
m.value = e;
|
|
502
510
|
}
|
|
503
|
-
function
|
|
511
|
+
function re() {
|
|
504
512
|
h.value = !0, u.clear(!0);
|
|
505
513
|
}
|
|
506
|
-
function
|
|
514
|
+
function J() {
|
|
507
515
|
h.value = !1;
|
|
508
516
|
}
|
|
509
|
-
function
|
|
510
|
-
y += 1, _?.abort(), _ = null, u.clear(!0), g.clear(), s.value = null, l.value = null, f.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), p.value = !1, o.value = !1,
|
|
517
|
+
function Y() {
|
|
518
|
+
y += 1, _?.abort(), _ = null, u.clear(!0), g.clear(), s.value = null, l.value = null, f.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), p.value = !1, o.value = !1, Z();
|
|
511
519
|
}
|
|
512
520
|
function ie() {
|
|
513
|
-
return
|
|
521
|
+
return Fe(O.value, k.value);
|
|
514
522
|
}
|
|
515
523
|
function ae(e = null, t = {}) {
|
|
516
|
-
if (
|
|
524
|
+
if (O.value.length === 0) {
|
|
517
525
|
r.value = 0, !t.preserveTrailingPlaceholder && n.value.length > 0 && (o.value = !0);
|
|
518
526
|
return;
|
|
519
527
|
}
|
|
520
528
|
if (e) {
|
|
521
|
-
let t =
|
|
529
|
+
let t = O.value.findIndex((t) => $(t) === e);
|
|
522
530
|
if (t >= 0) {
|
|
523
531
|
r.value = t;
|
|
524
532
|
return;
|
|
525
533
|
}
|
|
526
534
|
}
|
|
527
|
-
if (t.preserveTrailingPlaceholder && r.value >=
|
|
528
|
-
r.value =
|
|
535
|
+
if (t.preserveTrailingPlaceholder && r.value >= O.value.length) {
|
|
536
|
+
r.value = O.value.length;
|
|
529
537
|
return;
|
|
530
538
|
}
|
|
531
|
-
r.value =
|
|
539
|
+
r.value = Ie(O.value, k.value, e);
|
|
532
540
|
}
|
|
533
541
|
function oe() {
|
|
534
|
-
a.value.length > 0 && !
|
|
542
|
+
a.value.length > 0 && !z.value.length && G();
|
|
535
543
|
}
|
|
536
544
|
async function se() {
|
|
537
|
-
if (!(!m.value ||
|
|
538
|
-
if (!
|
|
539
|
-
|
|
545
|
+
if (!(!m.value || pe())) {
|
|
546
|
+
if (!O.value.length) {
|
|
547
|
+
F.value && await H();
|
|
540
548
|
return;
|
|
541
549
|
}
|
|
542
|
-
|
|
550
|
+
L.value && r.value < 3 && await U(), F.value && r.value >= O.value.length - 3 && await H();
|
|
543
551
|
}
|
|
544
552
|
}
|
|
545
553
|
async function ce(e) {
|
|
@@ -547,63 +555,62 @@ function He(e) {
|
|
|
547
555
|
await ce(e);
|
|
548
556
|
};
|
|
549
557
|
let t = await ue({
|
|
550
|
-
continueUntilFilled:
|
|
558
|
+
continueUntilFilled: !0,
|
|
551
559
|
cursor: e,
|
|
552
560
|
direction: "forward",
|
|
553
561
|
phase: "loading"
|
|
554
562
|
});
|
|
555
563
|
if (t) {
|
|
556
|
-
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1,
|
|
557
|
-
if (a.value = t.buckets, !
|
|
564
|
+
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Z();
|
|
565
|
+
if (a.value = t.buckets, !z.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Z();
|
|
558
566
|
p.value = !0;
|
|
559
567
|
}
|
|
560
568
|
}
|
|
561
|
-
async function
|
|
569
|
+
async function le(e) {
|
|
562
570
|
v = async () => {
|
|
563
|
-
await
|
|
571
|
+
await le(e);
|
|
564
572
|
};
|
|
565
573
|
let t = await ue({
|
|
566
|
-
continueUntilFilled:
|
|
574
|
+
continueUntilFilled: !0,
|
|
567
575
|
cursor: e,
|
|
568
576
|
direction: "backward",
|
|
569
577
|
phase: "loading"
|
|
570
578
|
});
|
|
571
579
|
if (!t) return;
|
|
572
580
|
let r = ie();
|
|
573
|
-
n.value = [...t.buckets, ...n.value], ae(r),
|
|
581
|
+
n.value = [...t.buckets, ...n.value], ae(r), Z();
|
|
574
582
|
}
|
|
575
|
-
async function
|
|
583
|
+
async function X(t) {
|
|
576
584
|
if (v = async () => {
|
|
577
|
-
await
|
|
578
|
-
}, !e.resolve) return;
|
|
579
|
-
let r = t === "leading" ?
|
|
580
|
-
if (!r) return;
|
|
581
|
-
let i =
|
|
582
|
-
if (g.has(i)) return;
|
|
585
|
+
await X(t);
|
|
586
|
+
}, !e.resolve) return null;
|
|
587
|
+
let r = t === "leading" ? j.value : M.value;
|
|
588
|
+
if (!r) return null;
|
|
589
|
+
let i = ve(r.cursor);
|
|
590
|
+
if (g.has(i)) return null;
|
|
583
591
|
g.add(i), s.value = null, c.value = "refreshing", l.value = null, f.value = null;
|
|
584
592
|
let a = ++y, o = typeof AbortController > "u" ? null : new AbortController();
|
|
585
593
|
_ = o;
|
|
586
594
|
try {
|
|
587
|
-
let
|
|
595
|
+
let i = await e.resolve({
|
|
588
596
|
cursor: r.cursor,
|
|
589
|
-
pageSize:
|
|
597
|
+
pageSize: E.value,
|
|
590
598
|
signal: o?.signal
|
|
591
599
|
});
|
|
592
|
-
if (a !== y) return
|
|
593
|
-
let
|
|
600
|
+
if (a !== y) return Z(), null;
|
|
601
|
+
let s = de({
|
|
594
602
|
cursor: r.cursor,
|
|
595
|
-
nextCursor:
|
|
596
|
-
nextItems:
|
|
597
|
-
previousCursor:
|
|
603
|
+
nextCursor: i.nextPage,
|
|
604
|
+
nextItems: i.items,
|
|
605
|
+
previousCursor: i.previousPage ?? null,
|
|
598
606
|
previousItems: r.items
|
|
599
|
-
}),
|
|
600
|
-
n.value =
|
|
607
|
+
}), c = ie();
|
|
608
|
+
return n.value = ke(n.value, r.cursor, s), ae(c), Z(), {
|
|
609
|
+
followCursor: t === "leading" ? i.previousPage ?? null : i.nextPage,
|
|
610
|
+
itemsLoaded: i.items.length
|
|
611
|
+
};
|
|
601
612
|
} catch (e) {
|
|
602
|
-
|
|
603
|
-
Q();
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
|
-
s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null;
|
|
613
|
+
return je(e) || a !== y ? (Z(), null) : (s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null, null);
|
|
607
614
|
} finally {
|
|
608
615
|
_ === o && (_ = null), g.delete(i);
|
|
609
616
|
}
|
|
@@ -612,9 +619,9 @@ function He(e) {
|
|
|
612
619
|
if (!e.resolve) return null;
|
|
613
620
|
let n = ++y, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
|
|
614
621
|
for (s.value = null, c.value = t.phase, l.value = null, f.value = null;;) {
|
|
615
|
-
if (n !== y) return
|
|
616
|
-
if (i.length > 0 && h.value) return
|
|
617
|
-
let d =
|
|
622
|
+
if (n !== y) return Ne(i, t.direction, e.removedIds.value, !0);
|
|
623
|
+
if (i.length > 0 && h.value) return Ne(i, t.direction, e.removedIds.value, !1);
|
|
624
|
+
let d = ve(a);
|
|
618
625
|
if (r.has(d) || g.has(d)) break;
|
|
619
626
|
r.add(d), g.add(d);
|
|
620
627
|
let p = typeof AbortController > "u" ? null : new AbortController();
|
|
@@ -622,10 +629,10 @@ function He(e) {
|
|
|
622
629
|
try {
|
|
623
630
|
let r = await e.resolve({
|
|
624
631
|
cursor: a,
|
|
625
|
-
pageSize:
|
|
632
|
+
pageSize: E.value,
|
|
626
633
|
signal: p?.signal
|
|
627
634
|
});
|
|
628
|
-
if (n !== y) return
|
|
635
|
+
if (n !== y) return Ne(i, t.direction, e.removedIds.value, !0);
|
|
629
636
|
let s = de({
|
|
630
637
|
cursor: a,
|
|
631
638
|
nextCursor: r.nextPage,
|
|
@@ -634,120 +641,118 @@ function He(e) {
|
|
|
634
641
|
previousItems: []
|
|
635
642
|
});
|
|
636
643
|
i.push(s);
|
|
637
|
-
let d = i.reduce((t, n) => t +
|
|
638
|
-
if (!t.continueUntilFilled || d >=
|
|
644
|
+
let d = i.reduce((t, n) => t + De(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
|
|
645
|
+
if (!t.continueUntilFilled || d >= E.value || !m) return {
|
|
639
646
|
canceled: !1,
|
|
640
647
|
buckets: t.direction === "backward" ? [...i].reverse() : i,
|
|
641
648
|
visibleCount: d
|
|
642
649
|
};
|
|
643
|
-
if (h.value) return
|
|
644
|
-
c.value = "filling", l.value = d, f.value =
|
|
645
|
-
let g =
|
|
646
|
-
if (await u.wait(g), n !== y) return
|
|
650
|
+
if (h.value) return Ne(i, t.direction, e.removedIds.value, !1);
|
|
651
|
+
c.value = "filling", l.value = d, f.value = E.value, o += 1;
|
|
652
|
+
let g = Ve(o, C.value, w.value);
|
|
653
|
+
if (await u.wait(g), n !== y) return Ne(i, t.direction, e.removedIds.value, !0);
|
|
647
654
|
a = m;
|
|
648
655
|
} catch (r) {
|
|
649
|
-
return
|
|
656
|
+
return je(r) || n !== y ? Ne(i, t.direction, e.removedIds.value, !0) : (s.value = r instanceof Error ? r.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null, null);
|
|
650
657
|
} finally {
|
|
651
658
|
_ === p && (_ = null), g.delete(d);
|
|
652
659
|
}
|
|
653
660
|
}
|
|
654
|
-
return
|
|
661
|
+
return Ne(i, t.direction, e.removedIds.value, !1);
|
|
655
662
|
}
|
|
656
663
|
function de(e) {
|
|
657
|
-
let t =
|
|
664
|
+
let t = Me({
|
|
658
665
|
cursor: e.cursor,
|
|
659
666
|
nextCursor: e.nextCursor,
|
|
660
667
|
nextItems: e.nextItems,
|
|
661
668
|
previousCursor: e.previousCursor,
|
|
662
669
|
previousItems: e.previousItems,
|
|
663
|
-
sequence:
|
|
670
|
+
sequence: b
|
|
664
671
|
});
|
|
665
|
-
return
|
|
672
|
+
return b = t.nextSequence, t.bucket;
|
|
666
673
|
}
|
|
667
|
-
function
|
|
674
|
+
function Z() {
|
|
668
675
|
c.value = "idle", l.value = null, f.value = null, u.clear();
|
|
669
676
|
}
|
|
670
677
|
function fe() {
|
|
671
678
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
672
|
-
let t =
|
|
679
|
+
let t = Pe({
|
|
673
680
|
initialState: e.initialState,
|
|
674
681
|
removedIds: e.removedIds.value,
|
|
675
|
-
sequence:
|
|
682
|
+
sequence: b
|
|
676
683
|
});
|
|
677
|
-
return n.value = t.buckets, r.value = t.activeIndex,
|
|
684
|
+
return n.value = t.buckets, r.value = t.activeIndex, b = t.nextSequence, o.value = !1, s.value = null, a.value = [], p.value = !1, !0;
|
|
678
685
|
}
|
|
679
|
-
function
|
|
686
|
+
function pe() {
|
|
680
687
|
return c.value === "initializing";
|
|
681
688
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
689
|
+
function me(t) {
|
|
690
|
+
return Le(t === "leading" ? j.value : M.value, e.removedIds.value, E.value);
|
|
684
691
|
}
|
|
685
|
-
function
|
|
686
|
-
let t = n.value.findIndex((t) =>
|
|
692
|
+
function he() {
|
|
693
|
+
let t = n.value.findIndex((t) => De(t, e.removedIds.value) > 0);
|
|
687
694
|
if (t < 0) return;
|
|
688
695
|
let r = t;
|
|
689
|
-
for (let i = n.value.length - 1; i >= t; --i) if (
|
|
696
|
+
for (let i = n.value.length - 1; i >= t; --i) if (De(n.value[i], e.removedIds.value) > 0) {
|
|
690
697
|
r = i;
|
|
691
698
|
break;
|
|
692
699
|
}
|
|
693
700
|
n.value = n.value.slice(t, r + 1);
|
|
694
701
|
}
|
|
695
702
|
return {
|
|
696
|
-
activeIndex:
|
|
697
|
-
canRetryInitialLoad:
|
|
698
|
-
cancel:
|
|
699
|
-
canRefreshTrailingBoundary:
|
|
700
|
-
commitPendingAppend:
|
|
701
|
-
currentCursor:
|
|
703
|
+
activeIndex: k,
|
|
704
|
+
canRetryInitialLoad: B,
|
|
705
|
+
cancel: Y,
|
|
706
|
+
canRefreshTrailingBoundary: R,
|
|
707
|
+
commitPendingAppend: G,
|
|
708
|
+
currentCursor: te,
|
|
702
709
|
errorMessage: s,
|
|
703
710
|
fillCollectedCount: l,
|
|
704
711
|
fillDelayRemainingMs: d,
|
|
705
712
|
fillTargetCount: f,
|
|
706
|
-
hasNextPage:
|
|
707
|
-
hasPreviousPage:
|
|
713
|
+
hasNextPage: F,
|
|
714
|
+
hasPreviousPage: L,
|
|
708
715
|
isAutoPrefetchEnabled: m,
|
|
709
716
|
isPageLoadingLocked: h,
|
|
710
|
-
items:
|
|
711
|
-
lockPageLoading:
|
|
712
|
-
loading:
|
|
713
|
-
mode: D,
|
|
717
|
+
items: O,
|
|
718
|
+
lockPageLoading: re,
|
|
719
|
+
loading: A,
|
|
714
720
|
maybePrefetchAround: se,
|
|
715
|
-
nextCursor:
|
|
716
|
-
pendingAppendItems:
|
|
721
|
+
nextCursor: N,
|
|
722
|
+
pendingAppendItems: z,
|
|
717
723
|
phase: c,
|
|
718
|
-
prefetchNextPage:
|
|
719
|
-
prefetchPreviousPage:
|
|
720
|
-
previousCursor:
|
|
721
|
-
retryInitialLoad:
|
|
722
|
-
retry:
|
|
723
|
-
setActiveIndex:
|
|
724
|
-
setAutoPrefetchEnabled:
|
|
724
|
+
prefetchNextPage: H,
|
|
725
|
+
prefetchPreviousPage: U,
|
|
726
|
+
previousCursor: P,
|
|
727
|
+
retryInitialLoad: W,
|
|
728
|
+
retry: ne,
|
|
729
|
+
setActiveIndex: K,
|
|
730
|
+
setAutoPrefetchEnabled: q,
|
|
725
731
|
syncActiveIndexAfterVisibilityChange: ae,
|
|
726
|
-
unlockPageLoading:
|
|
732
|
+
unlockPageLoading: J,
|
|
727
733
|
getActiveOccurrenceKey: ie,
|
|
728
734
|
maybeCommitPendingAppendWhenFilteredOut: oe
|
|
729
735
|
};
|
|
730
736
|
}
|
|
731
|
-
function
|
|
732
|
-
return e.find((e) =>
|
|
737
|
+
function Ge(e, t) {
|
|
738
|
+
return e.find((e) => De(e, t) > 0) ?? e[0] ?? null;
|
|
733
739
|
}
|
|
734
|
-
function
|
|
740
|
+
function Ke(e, t) {
|
|
735
741
|
for (let n = e.length - 1; n >= 0; --n) {
|
|
736
742
|
let r = e[n];
|
|
737
|
-
if (
|
|
743
|
+
if (De(r, t) > 0) return r;
|
|
738
744
|
}
|
|
739
745
|
return e[e.length - 1] ?? null;
|
|
740
746
|
}
|
|
741
747
|
//#endregion
|
|
742
748
|
//#region src/components/viewer-core/useDataSource.ts
|
|
743
|
-
function
|
|
744
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } =
|
|
749
|
+
function qe(e, t) {
|
|
750
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = ye(), l = We({
|
|
745
751
|
emit: t,
|
|
746
752
|
fillDelayMs: e.fillDelayMs,
|
|
747
753
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
748
754
|
initialCursor: e.initialCursor,
|
|
749
755
|
initialState: e.initialState,
|
|
750
|
-
mode: e.mode,
|
|
751
756
|
pageSize: e.pageSize,
|
|
752
757
|
removedIds: o,
|
|
753
758
|
resolve: e.resolve
|
|
@@ -808,7 +813,6 @@ function Ge(e, t) {
|
|
|
808
813
|
loading: f,
|
|
809
814
|
loadNext: T,
|
|
810
815
|
loadPrevious: E,
|
|
811
|
-
mode: l.mode,
|
|
812
816
|
nextCursor: l.nextCursor,
|
|
813
817
|
paginationDetail: g,
|
|
814
818
|
pendingAppendItems: l.pendingAppendItems,
|
|
@@ -829,12 +833,12 @@ function Ge(e, t) {
|
|
|
829
833
|
}
|
|
830
834
|
//#endregion
|
|
831
835
|
//#region src/components/viewer-core/useController.ts
|
|
832
|
-
var
|
|
833
|
-
function
|
|
834
|
-
let n =
|
|
836
|
+
var Je = 1024;
|
|
837
|
+
function Ye(e, t) {
|
|
838
|
+
let n = qe(e, t), r = T({
|
|
835
839
|
nextBoundaryLoadProgress: 0,
|
|
836
840
|
previousBoundaryLoadProgress: 0
|
|
837
|
-
}), a =
|
|
841
|
+
}), a = D(0), o = D("list"), s = T({
|
|
838
842
|
activeIndex: 0,
|
|
839
843
|
currentCursor: null,
|
|
840
844
|
errorMessage: null,
|
|
@@ -845,7 +849,6 @@ function qe(e, t) {
|
|
|
845
849
|
hasPreviousPage: !1,
|
|
846
850
|
itemCount: 0,
|
|
847
851
|
loadState: "loaded",
|
|
848
|
-
mode: "dynamic",
|
|
849
852
|
nextBoundaryLoadProgress: 0,
|
|
850
853
|
nextCursor: null,
|
|
851
854
|
pageLoadingLocked: !1,
|
|
@@ -855,27 +858,27 @@ function qe(e, t) {
|
|
|
855
858
|
removedCount: 0,
|
|
856
859
|
removedIds: [],
|
|
857
860
|
surfaceMode: "list"
|
|
858
|
-
}), c = i(() => a.value >=
|
|
859
|
-
|
|
861
|
+
}), c = i(() => a.value >= Je), l = i(() => c.value ? o.value : "fullscreen"), u = i(() => c.value && l.value === "fullscreen");
|
|
862
|
+
I(c, (e) => {
|
|
860
863
|
e && h();
|
|
861
|
-
}),
|
|
864
|
+
}), I(() => e.surfaceMode, () => {
|
|
862
865
|
h();
|
|
863
|
-
}),
|
|
866
|
+
}), I([l, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
864
867
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
865
|
-
}),
|
|
868
|
+
}), I([
|
|
866
869
|
() => n.items.value.length,
|
|
867
870
|
() => n.loading.value,
|
|
868
871
|
() => n.hasNextPage.value,
|
|
869
872
|
() => n.pendingAppendItems.value.length
|
|
870
873
|
], ([e, n, r, i]) => {
|
|
871
874
|
!c.value || e > 0 || o.value === "list" || n || r || i > 0 || (o.value = "list", t("update:surfaceMode", "list"));
|
|
872
|
-
}),
|
|
875
|
+
}), I(l, (e) => {
|
|
873
876
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
874
|
-
}, { immediate: !0 }),
|
|
875
|
-
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillTargetCount = n.fillTargetCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.itemCount = n.items.value.length, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.
|
|
876
|
-
}),
|
|
877
|
+
}, { immediate: !0 }), L(() => {
|
|
878
|
+
s.activeIndex = n.activeIndex.value, s.currentCursor = n.currentCursor.value, s.errorMessage = n.errorMessage.value, s.fillCollectedCount = n.fillCollectedCount.value, s.fillDelayRemainingMs = n.fillDelayRemainingMs.value, s.fillTargetCount = n.fillTargetCount.value, s.hasNextPage = n.hasNextPage.value, s.hasPreviousPage = n.hasPreviousPage.value, s.itemCount = n.items.value.length, s.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", s.nextBoundaryLoadProgress = r.nextBoundaryLoadProgress, s.nextCursor = n.nextCursor.value, s.pageLoadingLocked = n.isPageLoadingLocked.value, s.phase = n.phase.value, s.previousBoundaryLoadProgress = r.previousBoundaryLoadProgress, s.previousCursor = n.previousCursor.value, s.removedCount = n.removedCount.value, s.removedIds = n.getRemovedIds(), s.surfaceMode = l.value;
|
|
879
|
+
}), S(() => {
|
|
877
880
|
m(), h(), window.addEventListener("keydown", p), window.addEventListener("resize", m);
|
|
878
|
-
}),
|
|
881
|
+
}), x(() => {
|
|
879
882
|
window.removeEventListener("keydown", p), window.removeEventListener("resize", m);
|
|
880
883
|
});
|
|
881
884
|
function d(e) {
|
|
@@ -885,7 +888,7 @@ function qe(e, t) {
|
|
|
885
888
|
!c.value || o.value === "list" || (o.value = "list", t("update:surfaceMode", "list"));
|
|
886
889
|
}
|
|
887
890
|
function p(e) {
|
|
888
|
-
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" ||
|
|
891
|
+
e.defaultPrevented || e.key !== "Escape" || !c.value || l.value !== "fullscreen" || me(e.target) || (e.preventDefault(), f());
|
|
889
892
|
}
|
|
890
893
|
function m() {
|
|
891
894
|
a.value = window.innerWidth || 0;
|
|
@@ -894,7 +897,7 @@ function qe(e, t) {
|
|
|
894
897
|
!c.value || !e.surfaceMode || e.surfaceMode === o.value || (o.value = e.surfaceMode);
|
|
895
898
|
}
|
|
896
899
|
function g(e) {
|
|
897
|
-
r.nextBoundaryLoadProgress =
|
|
900
|
+
r.nextBoundaryLoadProgress = Xe(e.nextBoundaryLoadProgress), r.previousBoundaryLoadProgress = Xe(e.previousBoundaryLoadProgress);
|
|
898
901
|
}
|
|
899
902
|
return {
|
|
900
903
|
...n,
|
|
@@ -908,31 +911,31 @@ function qe(e, t) {
|
|
|
908
911
|
retry: n.retry,
|
|
909
912
|
setBoundaryLoadProgress: g,
|
|
910
913
|
showBackToList: u,
|
|
911
|
-
status:
|
|
914
|
+
status: E(s),
|
|
912
915
|
surfaceMode: l,
|
|
913
916
|
unlockPageLoading: n.unlockPageLoading
|
|
914
917
|
};
|
|
915
918
|
}
|
|
916
|
-
function
|
|
919
|
+
function Xe(e) {
|
|
917
920
|
return Math.min(Math.max(e, 0), 1);
|
|
918
921
|
}
|
|
919
922
|
//#endregion
|
|
920
923
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
921
|
-
var
|
|
924
|
+
var Ze = {
|
|
922
925
|
"data-testid": "vibe-media-bar",
|
|
923
926
|
class: "absolute inset-x-0 bottom-0 z-[5] bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.42)_24%,rgba(0,0,0,0.78))] px-[clamp(1rem,2.6vw,2.25rem)] pt-4 pb-[1.15rem]"
|
|
924
|
-
},
|
|
927
|
+
}, Qe = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, $e = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, et = { class: "relative h-4 w-full" }, tt = [
|
|
925
928
|
"max",
|
|
926
929
|
"value",
|
|
927
930
|
"disabled"
|
|
928
|
-
],
|
|
931
|
+
], nt = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, rt = ["data-layout"], it = {
|
|
929
932
|
key: 0,
|
|
930
933
|
"data-testid": "vibe-media-volume-popover",
|
|
931
934
|
class: "absolute bottom-[calc(100%+0.8rem)] right-0 grid justify-items-center gap-3 border border-white/12 bg-black/82 px-3 py-4 shadow-[0_20px_50px_-20px_rgba(0,0,0,0.85)] backdrop-blur-[18px]"
|
|
932
|
-
},
|
|
935
|
+
}, at = { class: "relative flex h-28 w-4 items-center justify-center" }, ot = ["value"], st = { class: "flex items-center gap-3" }, ct = ["aria-label"], lt = {
|
|
933
936
|
key: 0,
|
|
934
937
|
class: "relative h-4 w-24"
|
|
935
|
-
},
|
|
938
|
+
}, ut = ["value"], dt = /* @__PURE__ */ d({
|
|
936
939
|
__name: "FullscreenMediaBar",
|
|
937
940
|
props: {
|
|
938
941
|
currentTime: {},
|
|
@@ -950,18 +953,18 @@ var Ye = {
|
|
|
950
953
|
"volume-toggle"
|
|
951
954
|
],
|
|
952
955
|
setup(e, { emit: t }) {
|
|
953
|
-
let n = e, r = t, l =
|
|
954
|
-
|
|
956
|
+
let n = e, r = t, l = D(null), u = D(!1), d = i(() => n.volumeControlLayout === "vertical"), f = i(() => C(n.volume, 0, 1)), p = i(() => Math.round(f.value * 100)), m = i(() => n.muted || f.value <= 0 ? de : f.value < .5 ? X : ue), h = i(() => n.muted || f.value <= 0 ? "Unmute active media" : "Mute active media"), g = i(() => d.value && !u.value ? "Show volume controls" : h.value), _ = i(() => n.volumeControlLayout === "vertical" ? { height: `${p.value}%` } : { width: `${p.value}%` });
|
|
957
|
+
I(d, (e) => {
|
|
955
958
|
e || (u.value = !1);
|
|
956
|
-
}),
|
|
959
|
+
}), S(() => {
|
|
957
960
|
document.addEventListener("pointerdown", v);
|
|
958
|
-
}),
|
|
961
|
+
}), x(() => {
|
|
959
962
|
document.removeEventListener("pointerdown", v);
|
|
960
963
|
});
|
|
961
964
|
function v(e) {
|
|
962
965
|
!d.value || !u.value || l.value && e.target instanceof Node && !l.value.contains(e.target) && (u.value = !1);
|
|
963
966
|
}
|
|
964
|
-
function
|
|
967
|
+
function y() {
|
|
965
968
|
if (!d.value) {
|
|
966
969
|
r("volume-toggle");
|
|
967
970
|
return;
|
|
@@ -972,16 +975,16 @@ var Ye = {
|
|
|
972
975
|
}
|
|
973
976
|
r("volume-toggle");
|
|
974
977
|
}
|
|
975
|
-
function
|
|
978
|
+
function C(e, t, n) {
|
|
976
979
|
return Math.min(Math.max(e, t), n);
|
|
977
980
|
}
|
|
978
|
-
return (e, t) => (
|
|
979
|
-
c("span",
|
|
980
|
-
c("div",
|
|
981
|
+
return (e, t) => (w(), s("div", Ze, [c("div", Qe, [
|
|
982
|
+
c("span", $e, A(n.currentTimeLabel), 1),
|
|
983
|
+
c("div", et, [
|
|
981
984
|
t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
982
985
|
c("div", {
|
|
983
986
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
984
|
-
style:
|
|
987
|
+
style: b({ width: `${n.progress}%` })
|
|
985
988
|
}, null, 4),
|
|
986
989
|
c("input", {
|
|
987
990
|
"data-swipe-lock": "true",
|
|
@@ -994,20 +997,20 @@ var Ye = {
|
|
|
994
997
|
disabled: n.duration <= 0,
|
|
995
998
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
996
999
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
997
|
-
}, null, 40,
|
|
1000
|
+
}, null, 40, tt)
|
|
998
1001
|
]),
|
|
999
|
-
c("span",
|
|
1002
|
+
c("span", nt, A(n.durationLabel), 1),
|
|
1000
1003
|
c("div", {
|
|
1001
1004
|
ref_key: "rootRef",
|
|
1002
1005
|
ref: l,
|
|
1003
1006
|
"data-testid": "vibe-media-volume",
|
|
1004
1007
|
"data-layout": n.volumeControlLayout,
|
|
1005
1008
|
class: "relative flex items-center justify-end"
|
|
1006
|
-
}, [d.value && u.value ? (
|
|
1009
|
+
}, [d.value && u.value ? (w(), s("div", it, [c("div", at, [
|
|
1007
1010
|
t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
1008
1011
|
c("div", {
|
|
1009
1012
|
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
1010
|
-
style:
|
|
1013
|
+
style: b(_.value)
|
|
1011
1014
|
}, null, 4),
|
|
1012
1015
|
c("input", {
|
|
1013
1016
|
"data-testid": "vibe-media-volume-slider",
|
|
@@ -1020,21 +1023,21 @@ var Ye = {
|
|
|
1020
1023
|
value: f.value,
|
|
1021
1024
|
class: "vibe-media-slider absolute left-1/2 top-1/2 h-4 w-28 -translate-x-1/2 -translate-y-1/2 -rotate-90 bg-transparent",
|
|
1022
1025
|
onInput: t[1] ||= (e) => r("volume-input", e)
|
|
1023
|
-
}, null, 40,
|
|
1024
|
-
])])) : o("", !0), c("div",
|
|
1026
|
+
}, null, 40, ot)
|
|
1027
|
+
])])) : o("", !0), c("div", st, [c("button", {
|
|
1025
1028
|
type: "button",
|
|
1026
1029
|
"data-testid": "vibe-media-volume-button",
|
|
1027
1030
|
"aria-label": g.value,
|
|
1028
1031
|
class: "inline-flex h-10 w-10 items-center justify-center border border-white/14 bg-black/50 text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/65",
|
|
1029
|
-
onClick:
|
|
1030
|
-
}, [(
|
|
1032
|
+
onClick: y
|
|
1033
|
+
}, [(w(), a(k(m.value), {
|
|
1031
1034
|
class: "h-4 w-4 stroke-[1.9]",
|
|
1032
1035
|
"aria-hidden": "true"
|
|
1033
|
-
}))], 8,
|
|
1036
|
+
}))], 8, ct), n.volumeControlLayout === "horizontal" ? (w(), s("div", lt, [
|
|
1034
1037
|
t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1035
1038
|
c("div", {
|
|
1036
1039
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
1037
|
-
style:
|
|
1040
|
+
style: b(_.value)
|
|
1038
1041
|
}, null, 4),
|
|
1039
1042
|
c("input", {
|
|
1040
1043
|
"data-testid": "vibe-media-volume-slider",
|
|
@@ -1047,24 +1050,24 @@ var Ye = {
|
|
|
1047
1050
|
value: f.value,
|
|
1048
1051
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1049
1052
|
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1050
|
-
}, null, 40,
|
|
1051
|
-
])) : o("", !0)])], 8,
|
|
1053
|
+
}, null, 40, ut)
|
|
1054
|
+
])) : o("", !0)])], 8, rt)
|
|
1052
1055
|
])]));
|
|
1053
1056
|
}
|
|
1054
|
-
}),
|
|
1057
|
+
}), ft = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, pt = { class: "grid gap-4" }, mt = { class: "flex min-h-11 items-center justify-between gap-4" }, ht = { class: "min-w-0 flex flex-1 items-center gap-3" }, gt = {
|
|
1055
1058
|
key: 1,
|
|
1056
1059
|
"data-testid": "vibe-title",
|
|
1057
1060
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
1058
|
-
},
|
|
1061
|
+
}, _t = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, vt = {
|
|
1059
1062
|
"data-testid": "vibe-pagination",
|
|
1060
1063
|
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]"
|
|
1061
|
-
},
|
|
1064
|
+
}, yt = { class: "whitespace-nowrap" }, bt = {
|
|
1062
1065
|
key: 1,
|
|
1063
1066
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
1064
|
-
},
|
|
1067
|
+
}, xt = {
|
|
1065
1068
|
key: 0,
|
|
1066
1069
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
1067
|
-
},
|
|
1070
|
+
}, St = /* @__PURE__ */ d({
|
|
1068
1071
|
__name: "FullscreenHeader",
|
|
1069
1072
|
props: {
|
|
1070
1073
|
currentIndex: {},
|
|
@@ -1078,100 +1081,348 @@ var Ye = {
|
|
|
1078
1081
|
emits: ["back-to-list"],
|
|
1079
1082
|
setup(e, { emit: t }) {
|
|
1080
1083
|
let n = e, r = t;
|
|
1081
|
-
return (e, t) => (
|
|
1084
|
+
return (e, t) => (w(), s("div", ft, [c("div", pt, [c("div", mt, [c("div", ht, [n.showBackToList ? (w(), s("button", {
|
|
1082
1085
|
key: 0,
|
|
1083
1086
|
type: "button",
|
|
1084
1087
|
"data-testid": "vibe-back-to-list",
|
|
1085
1088
|
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",
|
|
1086
1089
|
"aria-label": "Back to list",
|
|
1087
1090
|
onClick: t[0] ||= (e) => r("back-to-list")
|
|
1088
|
-
}, [u(
|
|
1091
|
+
}, [u(M(re), {
|
|
1089
1092
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1090
1093
|
"aria-hidden": "true"
|
|
1091
|
-
})])) : o("", !0), n.title ? (
|
|
1092
|
-
n.loading ? (
|
|
1094
|
+
})])) : o("", !0), n.title ? (w(), s("h2", gt, A(n.title), 1)) : o("", !0)]), c("div", _t, [c("span", vt, [
|
|
1095
|
+
n.loading ? (w(), a(M(oe), {
|
|
1093
1096
|
key: 0,
|
|
1094
1097
|
"data-testid": "vibe-pagination-spinner",
|
|
1095
1098
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
1096
1099
|
"aria-hidden": "true"
|
|
1097
1100
|
})) : o("", !0),
|
|
1098
|
-
c("span",
|
|
1099
|
-
n.paginationDetail ? (
|
|
1100
|
-
]),
|
|
1101
|
+
c("span", yt, A(n.currentIndex + 1) + " / " + A(n.total), 1),
|
|
1102
|
+
n.paginationDetail ? (w(), s("span", bt, A(n.paginationDetail), 1)) : o("", !0)
|
|
1103
|
+
]), O(e.$slots, "actions")])])]), n.showEndBadge ? (w(), s("div", xt, [...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)]));
|
|
1101
1104
|
}
|
|
1102
|
-
}),
|
|
1103
|
-
image:
|
|
1104
|
-
video:
|
|
1105
|
+
}), Ct = {
|
|
1106
|
+
image: ae,
|
|
1107
|
+
video: Y,
|
|
1105
1108
|
audio: J,
|
|
1106
|
-
other:
|
|
1107
|
-
},
|
|
1109
|
+
other: ie
|
|
1110
|
+
}, wt = {
|
|
1108
1111
|
image: "Image",
|
|
1109
1112
|
video: "Video",
|
|
1110
1113
|
audio: "Audio",
|
|
1111
1114
|
other: "File"
|
|
1112
1115
|
};
|
|
1113
|
-
function
|
|
1114
|
-
return
|
|
1116
|
+
function Tt(e) {
|
|
1117
|
+
return Ct[e];
|
|
1115
1118
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return
|
|
1119
|
+
function Et(e) {
|
|
1120
|
+
return wt[e];
|
|
1121
|
+
}
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
1124
|
+
var Dt = {
|
|
1125
|
+
maxGlobal: 10,
|
|
1126
|
+
maxPerDomain: 4,
|
|
1127
|
+
maxVideoPerDomain: 2
|
|
1128
|
+
};
|
|
1129
|
+
function Ot(e = Dt) {
|
|
1130
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
1131
|
+
function i(e) {
|
|
1132
|
+
let i = {
|
|
1133
|
+
...e,
|
|
1134
|
+
domain: jt(e.url),
|
|
1135
|
+
enqueuedAt: r,
|
|
1136
|
+
id: `vibe-asset-load-${r += 1}`
|
|
1137
|
+
};
|
|
1138
|
+
return n.set(i.id, i), a(), {
|
|
1139
|
+
cancel() {
|
|
1140
|
+
(n.delete(i.id) || t.delete(i.id)) && a();
|
|
1141
|
+
},
|
|
1142
|
+
refresh() {
|
|
1143
|
+
a();
|
|
1144
|
+
},
|
|
1145
|
+
release() {
|
|
1146
|
+
(t.delete(i.id) || n.delete(i.id)) && a();
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
function a() {
|
|
1151
|
+
if (n.size === 0) return;
|
|
1152
|
+
let r = [...n.values()].sort((e, t) => {
|
|
1153
|
+
let n = At(e) - At(t);
|
|
1154
|
+
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
1155
|
+
});
|
|
1156
|
+
for (let i of r) {
|
|
1157
|
+
if (t.size >= e.maxGlobal) return;
|
|
1158
|
+
if (o(i)) {
|
|
1159
|
+
n.delete(i.id), t.set(i.id, i);
|
|
1160
|
+
try {
|
|
1161
|
+
i.onGrant();
|
|
1162
|
+
} catch {
|
|
1163
|
+
t.delete(i.id);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
function o(n) {
|
|
1169
|
+
let r = [...t.values()].filter((e) => e.domain === n.domain);
|
|
1170
|
+
return !(r.length >= e.maxPerDomain || n.assetType === "video" && r.filter((e) => e.assetType === "video").length >= e.maxVideoPerDomain);
|
|
1171
|
+
}
|
|
1172
|
+
return { request: i };
|
|
1173
|
+
}
|
|
1174
|
+
var kt = Ot();
|
|
1175
|
+
function At(e) {
|
|
1176
|
+
try {
|
|
1177
|
+
let t = e.getPriority();
|
|
1178
|
+
return Number.isFinite(t) ? t : Infinity;
|
|
1179
|
+
} catch {
|
|
1180
|
+
return Infinity;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
function jt(e) {
|
|
1184
|
+
try {
|
|
1185
|
+
return new URL(e).hostname || "local";
|
|
1186
|
+
} catch {
|
|
1187
|
+
return "local";
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
//#endregion
|
|
1191
|
+
//#region src/components/viewer-core/useFullscreenPreloadController.ts
|
|
1192
|
+
var Mt = {
|
|
1193
|
+
1: 0,
|
|
1194
|
+
2: 1,
|
|
1195
|
+
[-1]: 2
|
|
1196
|
+
};
|
|
1197
|
+
function Nt(e) {
|
|
1198
|
+
let t = D({}), n = Ot({
|
|
1199
|
+
maxGlobal: 1,
|
|
1200
|
+
maxPerDomain: 1,
|
|
1201
|
+
maxVideoPerDomain: 1
|
|
1202
|
+
}), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
|
|
1203
|
+
I([
|
|
1204
|
+
e.active,
|
|
1205
|
+
e.items,
|
|
1206
|
+
e.resolvedActiveIndex
|
|
1207
|
+
], () => {
|
|
1208
|
+
p();
|
|
1209
|
+
}, { immediate: !0 }), f() && C(() => {
|
|
1210
|
+
d();
|
|
1211
|
+
});
|
|
1212
|
+
function s(n) {
|
|
1213
|
+
if (!e.active.value) return !1;
|
|
1214
|
+
let r = e.items.value[n];
|
|
1215
|
+
if (!r || !Lt(r)) return !1;
|
|
1216
|
+
let i = e.getItemKey(r);
|
|
1217
|
+
return i === h() || !!t.value[i];
|
|
1218
|
+
}
|
|
1219
|
+
function c(e, t) {
|
|
1220
|
+
if (t instanceof HTMLImageElement) {
|
|
1221
|
+
i.set(e, t), Ft(t) && u(e);
|
|
1222
|
+
return;
|
|
1223
|
+
}
|
|
1224
|
+
i.delete(e);
|
|
1225
|
+
}
|
|
1226
|
+
function l(e, t) {
|
|
1227
|
+
if (t instanceof HTMLMediaElement) {
|
|
1228
|
+
a.set(e, t), It(t) && u(e);
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
a.delete(e);
|
|
1232
|
+
}
|
|
1233
|
+
function u(e) {
|
|
1234
|
+
let t = r.get(e);
|
|
1235
|
+
t && (t.lease.release(), r.delete(e));
|
|
1236
|
+
}
|
|
1237
|
+
function d() {
|
|
1238
|
+
for (let e of r.values()) e.lease.release();
|
|
1239
|
+
r.clear(), t.value = {}, _();
|
|
1240
|
+
}
|
|
1241
|
+
function p() {
|
|
1242
|
+
if (!e.active.value) {
|
|
1243
|
+
d();
|
|
1244
|
+
return;
|
|
1245
|
+
}
|
|
1246
|
+
let s = m(), c = new Set(s.map((e) => e.key)), l = h();
|
|
1247
|
+
for (let e of o) e !== l && c.has(e) && v(e, !0);
|
|
1248
|
+
for (let e of Object.keys(t.value)) c.has(e) || v(e, !1);
|
|
1249
|
+
for (let [e, t] of r.entries()) {
|
|
1250
|
+
if (!c.has(e)) {
|
|
1251
|
+
t.lease.release(), r.delete(e);
|
|
1252
|
+
continue;
|
|
1253
|
+
}
|
|
1254
|
+
let n = s.find((t) => t.key === e);
|
|
1255
|
+
n && (t.index = n.index);
|
|
1256
|
+
}
|
|
1257
|
+
for (let e of s) {
|
|
1258
|
+
if (r.has(e.key) || t.value[e.key]) continue;
|
|
1259
|
+
let o;
|
|
1260
|
+
o = {
|
|
1261
|
+
index: e.index,
|
|
1262
|
+
key: e.key,
|
|
1263
|
+
lease: n.request({
|
|
1264
|
+
assetType: e.item.type === "image" ? "image" : "video",
|
|
1265
|
+
getPriority: () => g(o.index),
|
|
1266
|
+
onGrant: () => {
|
|
1267
|
+
v(e.key, !0), Pt(e.key, i, a) && u(e.key);
|
|
1268
|
+
},
|
|
1269
|
+
url: e.item.url
|
|
1270
|
+
})
|
|
1271
|
+
}, r.set(e.key, o);
|
|
1272
|
+
}
|
|
1273
|
+
for (let e of r.values()) e.lease.refresh();
|
|
1274
|
+
_();
|
|
1275
|
+
}
|
|
1276
|
+
function m() {
|
|
1277
|
+
let t = e.resolvedActiveIndex.value;
|
|
1278
|
+
return [
|
|
1279
|
+
1,
|
|
1280
|
+
2,
|
|
1281
|
+
-1
|
|
1282
|
+
].map((n) => {
|
|
1283
|
+
let r = t + n, i = e.items.value[r];
|
|
1284
|
+
return !i || !Lt(i) ? null : {
|
|
1285
|
+
index: r,
|
|
1286
|
+
item: i,
|
|
1287
|
+
key: e.getItemKey(i)
|
|
1288
|
+
};
|
|
1289
|
+
}).filter((e) => !!e);
|
|
1290
|
+
}
|
|
1291
|
+
function h() {
|
|
1292
|
+
let t = e.items.value[e.resolvedActiveIndex.value];
|
|
1293
|
+
return !e.active.value || !t || !Lt(t) ? null : e.getItemKey(t);
|
|
1294
|
+
}
|
|
1295
|
+
function g(t) {
|
|
1296
|
+
return e.active.value ? Mt[t - e.resolvedActiveIndex.value] ?? Infinity : Infinity;
|
|
1297
|
+
}
|
|
1298
|
+
function _() {
|
|
1299
|
+
let n = /* @__PURE__ */ new Set(), r = h();
|
|
1300
|
+
r && n.add(r);
|
|
1301
|
+
for (let e of Object.keys(t.value)) n.add(e);
|
|
1302
|
+
for (let t of o) n.has(t) || (y(t), e.onResetAssetState(t));
|
|
1303
|
+
o = n;
|
|
1304
|
+
}
|
|
1305
|
+
function v(e, n) {
|
|
1306
|
+
if (n) {
|
|
1307
|
+
if (t.value[e]) return;
|
|
1308
|
+
t.value = {
|
|
1309
|
+
...t.value,
|
|
1310
|
+
[e]: !0
|
|
1311
|
+
};
|
|
1312
|
+
return;
|
|
1313
|
+
}
|
|
1314
|
+
if (!t.value[e]) return;
|
|
1315
|
+
let r = { ...t.value };
|
|
1316
|
+
delete r[e], t.value = r;
|
|
1317
|
+
}
|
|
1318
|
+
function y(e) {
|
|
1319
|
+
let t = i.get(e);
|
|
1320
|
+
if (t) try {
|
|
1321
|
+
t.removeAttribute("src"), t.src = "";
|
|
1322
|
+
} catch {}
|
|
1323
|
+
let n = a.get(e);
|
|
1324
|
+
if (n) {
|
|
1325
|
+
try {
|
|
1326
|
+
n.currentTime = 0;
|
|
1327
|
+
} catch {}
|
|
1328
|
+
n.pause();
|
|
1329
|
+
try {
|
|
1330
|
+
n.removeAttribute("src"), n.load();
|
|
1331
|
+
} catch {}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
return {
|
|
1335
|
+
clearBackgroundPreloads: d,
|
|
1336
|
+
registerImageElement: c,
|
|
1337
|
+
registerMediaElement: l,
|
|
1338
|
+
settleBackgroundPreload: u,
|
|
1339
|
+
shouldAttachSlideAsset: s
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
function Pt(e, t, n) {
|
|
1343
|
+
let r = t.get(e);
|
|
1344
|
+
if (r) return Ft(r);
|
|
1345
|
+
let i = n.get(e);
|
|
1346
|
+
return i ? It(i) : !1;
|
|
1347
|
+
}
|
|
1348
|
+
function Ft(e) {
|
|
1349
|
+
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1350
|
+
}
|
|
1351
|
+
function It(e) {
|
|
1352
|
+
let t = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
1353
|
+
return e.readyState >= t;
|
|
1354
|
+
}
|
|
1355
|
+
function Lt(e) {
|
|
1356
|
+
return e.type === "image" || e.type === "video" || e.type === "audio";
|
|
1118
1357
|
}
|
|
1119
1358
|
//#endregion
|
|
1120
1359
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1360
|
+
function Rt(e) {
|
|
1361
|
+
let t = Nt({
|
|
1362
|
+
active: e.active,
|
|
1363
|
+
getItemKey: r,
|
|
1364
|
+
items: e.items,
|
|
1365
|
+
onResetAssetState: e.viewer.resetAssetState,
|
|
1366
|
+
resolvedActiveIndex: e.resolvedActiveIndex
|
|
1367
|
+
});
|
|
1368
|
+
function n(e, t) {
|
|
1124
1369
|
let n = t.title?.trim();
|
|
1125
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1370
|
+
return n ? `${e} ${n}` : `${e} ${Et(t.type).toLowerCase()}`;
|
|
1126
1371
|
}
|
|
1127
|
-
function
|
|
1372
|
+
function r(e) {
|
|
1128
1373
|
return $(e);
|
|
1129
1374
|
}
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1132
|
-
return !!e.active.value && t >= n - Tt && t <= n + Et;
|
|
1133
|
-
}
|
|
1134
|
-
function i(t, i) {
|
|
1135
|
-
let a = n(i);
|
|
1136
|
-
return !r(t) || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(a) ? !1 : i.type === "image" ? !e.viewer.isImageReady(a) : i.type === "video" || i.type === "audio" ? !e.viewer.isMediaReady(a) : !1;
|
|
1375
|
+
function i(e) {
|
|
1376
|
+
return t.shouldAttachSlideAsset(e);
|
|
1137
1377
|
}
|
|
1138
|
-
function a(t) {
|
|
1139
|
-
|
|
1378
|
+
function a(t, n) {
|
|
1379
|
+
let a = r(n);
|
|
1380
|
+
return !i(t) || t !== e.resolvedActiveIndex.value || e.viewer.getAssetErrorKind(a) ? !1 : n.type === "image" ? !e.viewer.isImageReady(a) : n.type === "video" || n.type === "audio" ? !e.viewer.isMediaReady(a) : !1;
|
|
1140
1381
|
}
|
|
1141
1382
|
function o(t) {
|
|
1142
|
-
return e.viewer.
|
|
1383
|
+
return e.viewer.getAssetErrorKind(r(t));
|
|
1143
1384
|
}
|
|
1144
|
-
function s(t
|
|
1145
|
-
return r(t)
|
|
1385
|
+
function s(t) {
|
|
1386
|
+
return e.viewer.getAssetErrorLabel(r(t)) ?? "Load error";
|
|
1146
1387
|
}
|
|
1147
1388
|
function c(t, n) {
|
|
1148
|
-
return
|
|
1389
|
+
return i(t) && t === e.resolvedActiveIndex.value && !!o(n);
|
|
1149
1390
|
}
|
|
1150
|
-
function l(
|
|
1151
|
-
return
|
|
1391
|
+
function l(t, n) {
|
|
1392
|
+
return i(t) ? e.viewer.getImageSource(n) : void 0;
|
|
1393
|
+
}
|
|
1394
|
+
function u(e) {
|
|
1395
|
+
return i(e) ? "metadata" : "none";
|
|
1396
|
+
}
|
|
1397
|
+
function d(e, t) {
|
|
1398
|
+
return i(e) ? t.url : void 0;
|
|
1152
1399
|
}
|
|
1153
1400
|
return {
|
|
1154
|
-
getAssetErrorKind:
|
|
1155
|
-
getAssetErrorLabel:
|
|
1156
|
-
getFullscreenImageSource:
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1401
|
+
getAssetErrorKind: o,
|
|
1402
|
+
getAssetErrorLabel: s,
|
|
1403
|
+
getFullscreenImageSource: l,
|
|
1404
|
+
getFullscreenMediaPreload: u,
|
|
1405
|
+
getFullscreenMediaSource: d,
|
|
1406
|
+
getItemKey: r,
|
|
1407
|
+
getMediaActionLabel: n,
|
|
1408
|
+
isAssetErrored: c,
|
|
1409
|
+
isAssetLoading: a,
|
|
1410
|
+
registerImageElement: t.registerImageElement,
|
|
1411
|
+
registerMediaElement: t.registerMediaElement,
|
|
1412
|
+
settleBackgroundPreload: t.settleBackgroundPreload,
|
|
1413
|
+
shouldPreloadSlideAsset: i
|
|
1163
1414
|
};
|
|
1164
1415
|
}
|
|
1165
1416
|
//#endregion
|
|
1166
1417
|
//#region src/components/viewer-core/slotContent.ts
|
|
1167
|
-
function
|
|
1418
|
+
function zt(e) {
|
|
1168
1419
|
if (!Array.isArray(e)) return !1;
|
|
1169
1420
|
for (let t of e) {
|
|
1170
1421
|
if (Array.isArray(t)) {
|
|
1171
|
-
if (
|
|
1422
|
+
if (zt(t)) return !0;
|
|
1172
1423
|
continue;
|
|
1173
1424
|
}
|
|
1174
|
-
if (!
|
|
1425
|
+
if (!h(t)) {
|
|
1175
1426
|
if (typeof t == "string") {
|
|
1176
1427
|
if (t.trim().length > 0) return !0;
|
|
1177
1428
|
continue;
|
|
@@ -1179,20 +1430,20 @@ function Ot(e) {
|
|
|
1179
1430
|
if (t != null && t !== !1) return !0;
|
|
1180
1431
|
continue;
|
|
1181
1432
|
}
|
|
1182
|
-
if (!
|
|
1433
|
+
if (!Bt(t)) return !0;
|
|
1183
1434
|
}
|
|
1184
1435
|
return !1;
|
|
1185
1436
|
}
|
|
1186
|
-
function
|
|
1187
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1437
|
+
function Bt(r) {
|
|
1438
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !zt(r.children) : !1;
|
|
1188
1439
|
}
|
|
1189
1440
|
//#endregion
|
|
1190
1441
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1191
|
-
var
|
|
1192
|
-
function
|
|
1442
|
+
var Vt = "no items available";
|
|
1443
|
+
function Ht(e) {
|
|
1193
1444
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1194
1445
|
loading: !!e.loading.value,
|
|
1195
|
-
message:
|
|
1446
|
+
message: Vt,
|
|
1196
1447
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1197
1448
|
surface: e.surface,
|
|
1198
1449
|
total: e.itemCount.value
|
|
@@ -1200,23 +1451,23 @@ function jt(e) {
|
|
|
1200
1451
|
return {
|
|
1201
1452
|
emptyStateProps: t,
|
|
1202
1453
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1203
|
-
showCustomEmptyState: i(() =>
|
|
1454
|
+
showCustomEmptyState: i(() => zt(n.value)),
|
|
1204
1455
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1205
1456
|
};
|
|
1206
1457
|
}
|
|
1207
1458
|
//#endregion
|
|
1208
1459
|
//#region src/components/viewer-core/format.ts
|
|
1209
|
-
function
|
|
1460
|
+
function Ut(e) {
|
|
1210
1461
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1211
1462
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1212
1463
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1213
1464
|
}
|
|
1214
1465
|
//#endregion
|
|
1215
1466
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1216
|
-
function
|
|
1467
|
+
function Wt(e) {
|
|
1217
1468
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1218
1469
|
}
|
|
1219
|
-
function
|
|
1470
|
+
function Gt(e) {
|
|
1220
1471
|
return e.phase === "failed" ? {
|
|
1221
1472
|
kind: "failed",
|
|
1222
1473
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1239,17 +1490,17 @@ function Pt(e) {
|
|
|
1239
1490
|
}
|
|
1240
1491
|
//#endregion
|
|
1241
1492
|
//#region src/components/viewer-core/useActivation.ts
|
|
1242
|
-
function
|
|
1493
|
+
function Kt(e) {
|
|
1243
1494
|
let t = !1;
|
|
1244
|
-
|
|
1495
|
+
I(e.enabled, async (t) => {
|
|
1245
1496
|
if (n(t), t) {
|
|
1246
1497
|
e.onResize(), await e.onEnable();
|
|
1247
1498
|
return;
|
|
1248
1499
|
}
|
|
1249
1500
|
e.onDisable();
|
|
1250
|
-
}, { immediate: !0 }),
|
|
1501
|
+
}, { immediate: !0 }), S(() => {
|
|
1251
1502
|
e.onResize(), e.enabled.value && e.onEnable();
|
|
1252
|
-
}),
|
|
1503
|
+
}), x(() => {
|
|
1253
1504
|
n(!1), e.onDisable();
|
|
1254
1505
|
});
|
|
1255
1506
|
function n(n) {
|
|
@@ -1262,7 +1513,7 @@ function Ft(e) {
|
|
|
1262
1513
|
}
|
|
1263
1514
|
//#endregion
|
|
1264
1515
|
//#region src/components/viewer-core/assetState.ts
|
|
1265
|
-
var
|
|
1516
|
+
var qt = {
|
|
1266
1517
|
currentTime: 0,
|
|
1267
1518
|
duration: 0,
|
|
1268
1519
|
errorKind: null,
|
|
@@ -1271,38 +1522,38 @@ var It = {
|
|
|
1271
1522
|
ready: !1,
|
|
1272
1523
|
volume: 1
|
|
1273
1524
|
};
|
|
1274
|
-
function
|
|
1275
|
-
return { ...
|
|
1525
|
+
function Jt() {
|
|
1526
|
+
return { ...qt };
|
|
1276
1527
|
}
|
|
1277
|
-
function
|
|
1528
|
+
function Yt(e) {
|
|
1278
1529
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1279
1530
|
}
|
|
1280
|
-
function
|
|
1281
|
-
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready =
|
|
1531
|
+
function Xt(e, t, n) {
|
|
1532
|
+
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.muted = t.muted, e.paused = t.paused, e.volume = Number.isFinite(t.volume) ? t.volume : e.volume, n && n !== "error" && (e.errorKind = null), e.ready = Zt(t, n);
|
|
1282
1533
|
}
|
|
1283
|
-
function
|
|
1534
|
+
function Zt(e, t) {
|
|
1284
1535
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1285
1536
|
}
|
|
1286
1537
|
//#endregion
|
|
1287
1538
|
//#region src/components/viewer-core/loadError.ts
|
|
1288
|
-
var
|
|
1289
|
-
function
|
|
1539
|
+
var Qt = /* @__PURE__ */ new Map();
|
|
1540
|
+
function $t(e) {
|
|
1290
1541
|
return e === "not-found" ? "404" : "Load error";
|
|
1291
1542
|
}
|
|
1292
|
-
function
|
|
1543
|
+
function en(e) {
|
|
1293
1544
|
return e === "generic";
|
|
1294
1545
|
}
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1546
|
+
function tn(e) {
|
|
1547
|
+
return nn(e).then((e) => e ?? "generic");
|
|
1297
1548
|
}
|
|
1298
|
-
function
|
|
1299
|
-
let t =
|
|
1549
|
+
function nn(e) {
|
|
1550
|
+
let t = Qt.get(e);
|
|
1300
1551
|
if (t) return t;
|
|
1301
|
-
let n =
|
|
1302
|
-
return
|
|
1552
|
+
let n = rn(e);
|
|
1553
|
+
return Qt.set(e, n), n;
|
|
1303
1554
|
}
|
|
1304
|
-
async function
|
|
1305
|
-
if (!
|
|
1555
|
+
async function rn(e) {
|
|
1556
|
+
if (!an(e)) return null;
|
|
1306
1557
|
try {
|
|
1307
1558
|
let t = await fetch(e, { method: "HEAD" });
|
|
1308
1559
|
return t.ok ? null : t.status === 404 ? "not-found" : "generic";
|
|
@@ -1310,12 +1561,12 @@ async function Kt(e) {
|
|
|
1310
1561
|
return "generic";
|
|
1311
1562
|
}
|
|
1312
1563
|
}
|
|
1313
|
-
function
|
|
1564
|
+
function an(e) {
|
|
1314
1565
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1315
1566
|
}
|
|
1316
1567
|
//#endregion
|
|
1317
1568
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1318
|
-
function
|
|
1569
|
+
function on(e) {
|
|
1319
1570
|
try {
|
|
1320
1571
|
let t = e.play();
|
|
1321
1572
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1323,18 +1574,18 @@ function Jt(e) {
|
|
|
1323
1574
|
}
|
|
1324
1575
|
//#endregion
|
|
1325
1576
|
//#region src/components/viewer-core/useMedia.ts
|
|
1326
|
-
function
|
|
1327
|
-
let t =
|
|
1577
|
+
function sn(e) {
|
|
1578
|
+
let t = D({}), n = D({}), r = D({}), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = i(() => e.activeItem.value ? $(e.activeItem.value) : null), d = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), f = i(() => {
|
|
1328
1579
|
let t = /* @__PURE__ */ new Map();
|
|
1329
1580
|
for (let n of e.items.value) t.set($(n), n);
|
|
1330
1581
|
return t;
|
|
1331
|
-
}), p = i(() => d.value ? r.value[d.value] ??
|
|
1332
|
-
|
|
1333
|
-
await
|
|
1334
|
-
}),
|
|
1335
|
-
await
|
|
1336
|
-
}),
|
|
1337
|
-
await
|
|
1582
|
+
}), p = i(() => d.value ? r.value[d.value] ?? qt : qt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : cn(p.value.currentTime / m.value * 100, 0, 100)), g = i(() => u.value ? L(u.value) : null);
|
|
1583
|
+
I(() => u.value, async () => {
|
|
1584
|
+
await C();
|
|
1585
|
+
}), I(() => e.itemCount.value, async () => {
|
|
1586
|
+
await C();
|
|
1587
|
+
}), I(() => e.loopFullscreenVideo.value, async () => {
|
|
1588
|
+
await C();
|
|
1338
1589
|
});
|
|
1339
1590
|
function v(e, t) {
|
|
1340
1591
|
if (t instanceof HTMLVideoElement) {
|
|
@@ -1351,49 +1602,54 @@ function Yt(e) {
|
|
|
1351
1602
|
c.delete(e);
|
|
1352
1603
|
}
|
|
1353
1604
|
function b(e, r) {
|
|
1354
|
-
r instanceof HTMLImageElement &&
|
|
1605
|
+
r instanceof HTMLImageElement && Yt(r) && (t.value[e] = !0, n.value[e] = null, J(e, r.currentSrc || r.src || ie(e)));
|
|
1355
1606
|
}
|
|
1356
1607
|
function x() {
|
|
1357
1608
|
H(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
1358
1609
|
}
|
|
1359
|
-
|
|
1610
|
+
function S(e) {
|
|
1611
|
+
delete t.value[e], delete n.value[e], delete o.value[e], delete r.value[e], l.forEach((t) => {
|
|
1612
|
+
t.startsWith(`${e}|`) && l.delete(t);
|
|
1613
|
+
});
|
|
1614
|
+
}
|
|
1615
|
+
async function C() {
|
|
1360
1616
|
if (!e.isEnabled.value) {
|
|
1361
1617
|
H();
|
|
1362
1618
|
return;
|
|
1363
1619
|
}
|
|
1364
|
-
await
|
|
1620
|
+
await _();
|
|
1365
1621
|
let t = u.value;
|
|
1366
1622
|
for (let [n, i] of s.entries()) {
|
|
1367
1623
|
if (n !== t || r.value[n]?.errorKind) {
|
|
1368
1624
|
V(i, n);
|
|
1369
1625
|
continue;
|
|
1370
1626
|
}
|
|
1371
|
-
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0,
|
|
1627
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, on(i), W(n, i);
|
|
1372
1628
|
}
|
|
1373
1629
|
for (let [e, n] of c.entries()) {
|
|
1374
1630
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1375
1631
|
V(n, e);
|
|
1376
1632
|
continue;
|
|
1377
1633
|
}
|
|
1378
|
-
|
|
1634
|
+
on(n), W(e, n);
|
|
1379
1635
|
}
|
|
1380
1636
|
}
|
|
1381
|
-
function
|
|
1637
|
+
function w(e, t) {
|
|
1382
1638
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
1383
1639
|
if (n) {
|
|
1384
1640
|
let i = r.value[e]?.ready ?? !1;
|
|
1385
1641
|
W(e, n, t.type);
|
|
1386
1642
|
let a = r.value[e]?.ready ?? !1;
|
|
1387
|
-
!i && a &&
|
|
1643
|
+
!i && a && J(e, n.currentSrc || n.src || ie(e));
|
|
1388
1644
|
}
|
|
1389
1645
|
}
|
|
1390
|
-
function
|
|
1391
|
-
t.value[e] = !0, n.value[e] = null,
|
|
1646
|
+
function T(e, r) {
|
|
1647
|
+
t.value[e] = !0, n.value[e] = null, J(e, r);
|
|
1392
1648
|
}
|
|
1393
1649
|
async function E(r, i) {
|
|
1394
1650
|
let a = Y(r) ?? e.activeItem.value;
|
|
1395
1651
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1396
|
-
let o = await
|
|
1652
|
+
let o = await tn(i);
|
|
1397
1653
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1398
1654
|
item: a,
|
|
1399
1655
|
occurrenceKey: r,
|
|
@@ -1402,7 +1658,7 @@ function Yt(e) {
|
|
|
1402
1658
|
surface: "fullscreen"
|
|
1403
1659
|
});
|
|
1404
1660
|
}
|
|
1405
|
-
async function
|
|
1661
|
+
async function ee(t, n) {
|
|
1406
1662
|
let r = K(t), i = U(t), a = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1407
1663
|
if (r) {
|
|
1408
1664
|
r.pause();
|
|
@@ -1411,7 +1667,7 @@ function Yt(e) {
|
|
|
1411
1667
|
} catch {}
|
|
1412
1668
|
}
|
|
1413
1669
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1414
|
-
let o = await
|
|
1670
|
+
let o = await tn(n);
|
|
1415
1671
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1416
1672
|
item: a,
|
|
1417
1673
|
occurrenceKey: t,
|
|
@@ -1421,28 +1677,28 @@ function Yt(e) {
|
|
|
1421
1677
|
});
|
|
1422
1678
|
}
|
|
1423
1679
|
function O(e, t, n) {
|
|
1424
|
-
e.button !== 0 || Date.now() < n ||
|
|
1680
|
+
e.button !== 0 || Date.now() < n || re(s.get(t) ?? null);
|
|
1425
1681
|
}
|
|
1426
1682
|
function k(e, t, n) {
|
|
1427
|
-
e.button !== 0 || Date.now() < n ||
|
|
1683
|
+
e.button !== 0 || Date.now() < n || re(K(t));
|
|
1428
1684
|
}
|
|
1429
1685
|
function A(e) {
|
|
1430
1686
|
let t = q(), n = d.value;
|
|
1431
1687
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1432
1688
|
let r = Number.parseFloat(e.target.value);
|
|
1433
1689
|
if (!Number.isFinite(r)) return;
|
|
1434
|
-
let i =
|
|
1435
|
-
|
|
1690
|
+
let i = cn(r, 0, m.value || 0);
|
|
1691
|
+
ne(n, i, t), t.currentTime = i;
|
|
1436
1692
|
}
|
|
1437
1693
|
function j(e) {
|
|
1438
1694
|
let t = q(), n = d.value;
|
|
1439
1695
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1440
|
-
let r =
|
|
1696
|
+
let r = cn(Number.parseFloat(e.target.value), 0, 1);
|
|
1441
1697
|
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), W(n, t);
|
|
1442
1698
|
}
|
|
1443
1699
|
function M() {
|
|
1444
1700
|
let e = q(), t = d.value;
|
|
1445
|
-
!e || !t || (e.muted || e.volume <= 0 ? (e.volume =
|
|
1701
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = G(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), W(t, e));
|
|
1446
1702
|
}
|
|
1447
1703
|
function N(e) {
|
|
1448
1704
|
return !!t.value[e] && !n.value[e];
|
|
@@ -1450,7 +1706,7 @@ function Yt(e) {
|
|
|
1450
1706
|
function P(e) {
|
|
1451
1707
|
return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
|
|
1452
1708
|
}
|
|
1453
|
-
function
|
|
1709
|
+
function F(e) {
|
|
1454
1710
|
return e.url;
|
|
1455
1711
|
}
|
|
1456
1712
|
function L(e) {
|
|
@@ -1458,15 +1714,15 @@ function Yt(e) {
|
|
|
1458
1714
|
}
|
|
1459
1715
|
function R(e) {
|
|
1460
1716
|
let t = L(e);
|
|
1461
|
-
return t ?
|
|
1717
|
+
return t ? $t(t) : null;
|
|
1462
1718
|
}
|
|
1463
1719
|
function z(e) {
|
|
1464
|
-
return
|
|
1720
|
+
return en(L(e));
|
|
1465
1721
|
}
|
|
1466
|
-
function
|
|
1722
|
+
function te(e) {
|
|
1467
1723
|
return `${e}:${a.value[e] ?? 0}`;
|
|
1468
1724
|
}
|
|
1469
|
-
async function
|
|
1725
|
+
async function B(e) {
|
|
1470
1726
|
if (!z(e)) return;
|
|
1471
1727
|
t.value[e] = !1, n.value[e] = null;
|
|
1472
1728
|
let r = U(e);
|
|
@@ -1474,7 +1730,7 @@ function Yt(e) {
|
|
|
1474
1730
|
let i = K(e);
|
|
1475
1731
|
i && V(i, e), l.forEach((t) => {
|
|
1476
1732
|
t.startsWith(`${e}|`) && l.delete(t);
|
|
1477
|
-
}), a.value[e] = (a.value[e] ?? 0) + 1, await
|
|
1733
|
+
}), a.value[e] = (a.value[e] ?? 0) + 1, await _(), await C();
|
|
1478
1734
|
}
|
|
1479
1735
|
function V(e, t) {
|
|
1480
1736
|
e.pause();
|
|
@@ -1488,17 +1744,17 @@ function Yt(e) {
|
|
|
1488
1744
|
for (let [e, t] of c.entries()) V(t, e);
|
|
1489
1745
|
}
|
|
1490
1746
|
function U(e) {
|
|
1491
|
-
return r.value[e] || (r.value[e] =
|
|
1747
|
+
return r.value[e] || (r.value[e] = Jt()), r.value[e];
|
|
1492
1748
|
}
|
|
1493
1749
|
function W(e, t, n) {
|
|
1494
|
-
|
|
1750
|
+
Xt(U(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
1495
1751
|
}
|
|
1496
|
-
function
|
|
1752
|
+
function ne(e, t, n) {
|
|
1497
1753
|
let r = U(e);
|
|
1498
1754
|
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;
|
|
1499
1755
|
}
|
|
1500
|
-
function
|
|
1501
|
-
return
|
|
1756
|
+
function G(e) {
|
|
1757
|
+
return cn(o.value[e] ?? 1, 0, 1);
|
|
1502
1758
|
}
|
|
1503
1759
|
function K(e) {
|
|
1504
1760
|
return s.get(e) ?? c.get(e) ?? null;
|
|
@@ -1506,16 +1762,16 @@ function Yt(e) {
|
|
|
1506
1762
|
function q() {
|
|
1507
1763
|
return d.value ? K(d.value) : null;
|
|
1508
1764
|
}
|
|
1509
|
-
function
|
|
1765
|
+
function re(e) {
|
|
1510
1766
|
if (e) {
|
|
1511
1767
|
if (e.paused) {
|
|
1512
|
-
|
|
1768
|
+
on(e);
|
|
1513
1769
|
return;
|
|
1514
1770
|
}
|
|
1515
1771
|
e.pause();
|
|
1516
1772
|
}
|
|
1517
1773
|
}
|
|
1518
|
-
function
|
|
1774
|
+
function J(t, n) {
|
|
1519
1775
|
let r = Y(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1520
1776
|
if (!r || !n) return;
|
|
1521
1777
|
let i = `${t}|${n}`;
|
|
@@ -1529,27 +1785,27 @@ function Yt(e) {
|
|
|
1529
1785
|
function Y(e) {
|
|
1530
1786
|
return f.value.get(e) ?? null;
|
|
1531
1787
|
}
|
|
1532
|
-
function
|
|
1788
|
+
function ie(e) {
|
|
1533
1789
|
return Y(e)?.url ?? null;
|
|
1534
1790
|
}
|
|
1535
1791
|
return {
|
|
1536
|
-
activeAssetErrorKind:
|
|
1792
|
+
activeAssetErrorKind: g,
|
|
1537
1793
|
activeMediaDuration: m,
|
|
1538
1794
|
activeMediaProgress: h,
|
|
1539
1795
|
activeMediaState: p,
|
|
1540
1796
|
getAssetErrorKind: L,
|
|
1541
1797
|
getAssetErrorLabel: R,
|
|
1542
|
-
getAssetRenderKey:
|
|
1543
|
-
getImageSource:
|
|
1798
|
+
getAssetRenderKey: te,
|
|
1799
|
+
getImageSource: F,
|
|
1544
1800
|
isImageReady: N,
|
|
1545
1801
|
isMediaReady: P,
|
|
1546
1802
|
canRetryAsset: z,
|
|
1547
1803
|
mediaStates: r,
|
|
1548
1804
|
onAudioCoverClick: k,
|
|
1549
1805
|
onImageError: E,
|
|
1550
|
-
onImageLoad:
|
|
1551
|
-
onMediaError:
|
|
1552
|
-
onMediaEvent:
|
|
1806
|
+
onImageLoad: T,
|
|
1807
|
+
onMediaError: ee,
|
|
1808
|
+
onMediaEvent: w,
|
|
1553
1809
|
onMediaSeekInput: A,
|
|
1554
1810
|
onMediaVolumeInput: j,
|
|
1555
1811
|
onMediaVolumeToggle: M,
|
|
@@ -1557,15 +1813,16 @@ function Yt(e) {
|
|
|
1557
1813
|
registerAudioElement: y,
|
|
1558
1814
|
registerImageElement: b,
|
|
1559
1815
|
registerVideoElement: v,
|
|
1816
|
+
resetAssetState: S,
|
|
1560
1817
|
resetMediaState: x,
|
|
1561
|
-
retryAsset:
|
|
1562
|
-
syncMediaPlayback:
|
|
1818
|
+
retryAsset: B,
|
|
1819
|
+
syncMediaPlayback: C
|
|
1563
1820
|
};
|
|
1564
1821
|
}
|
|
1565
|
-
function
|
|
1822
|
+
function cn(e, t, n) {
|
|
1566
1823
|
return Math.min(Math.max(e, t), n);
|
|
1567
1824
|
}
|
|
1568
|
-
function
|
|
1825
|
+
function ln(e, t, n = 2) {
|
|
1569
1826
|
return t <= 0 ? {
|
|
1570
1827
|
start: 0,
|
|
1571
1828
|
end: -1
|
|
@@ -1574,14 +1831,14 @@ function Zt(e, t, n = 2) {
|
|
|
1574
1831
|
end: Math.min(t - 1, e + n)
|
|
1575
1832
|
};
|
|
1576
1833
|
}
|
|
1577
|
-
function
|
|
1578
|
-
let r =
|
|
1834
|
+
function un(e, t, n = 2) {
|
|
1835
|
+
let r = ln(t, e.length, n);
|
|
1579
1836
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1580
1837
|
item: e,
|
|
1581
1838
|
index: r.start + t
|
|
1582
1839
|
}));
|
|
1583
1840
|
}
|
|
1584
|
-
function
|
|
1841
|
+
function dn(e, t, n, r, i) {
|
|
1585
1842
|
return {
|
|
1586
1843
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1587
1844
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1589,12 +1846,12 @@ function $t(e, t, n, r, i) {
|
|
|
1589
1846
|
}
|
|
1590
1847
|
//#endregion
|
|
1591
1848
|
//#region src/components/viewer-core/useViewer.ts
|
|
1592
|
-
function
|
|
1593
|
-
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() =>
|
|
1849
|
+
function fn(e, t, n = {}) {
|
|
1850
|
+
let r = i(() => e.items), a = i(() => e.activeIndex ?? 0), o = i(() => e.errorMessage ?? null), s = i(() => e.loading ?? !1), c = i(() => e.hasNextPage ?? !1), l = i(() => e.loopFullscreenVideo ?? !0), u = i(() => e.paginationDetail ?? null), d = i(() => Wt({
|
|
1594
1851
|
itemCount: r.value.length,
|
|
1595
1852
|
loading: s.value,
|
|
1596
1853
|
phase: e.phase
|
|
1597
|
-
})), f = i(() => !1), p =
|
|
1854
|
+
})), f = i(() => !1), p = D(null), m = D(0), h = D(!1), g = D(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), C = i(() => r.value[S.value] ?? null), w = i(() => C.value?.type === "audio" || C.value?.type === "video" ? C.value : null), T = sn({
|
|
1598
1855
|
items: r,
|
|
1599
1856
|
activeItem: C,
|
|
1600
1857
|
activeMediaItem: w,
|
|
@@ -1603,164 +1860,165 @@ function en(e, t, n = {}) {
|
|
|
1603
1860
|
loopFullscreenVideo: l,
|
|
1604
1861
|
onAssetError: n.onAssetError,
|
|
1605
1862
|
onAssetLoad: n.onAssetLoad
|
|
1606
|
-
}),
|
|
1863
|
+
}), E = i(() => r.value.length > 0 && S.value === r.value.length - 1), ee = i(() => Gt({
|
|
1607
1864
|
errorMessage: o.value,
|
|
1608
1865
|
hasItems: r.value.length > 0,
|
|
1609
1866
|
hasNextPage: c.value,
|
|
1610
1867
|
phase: d.value,
|
|
1611
1868
|
surface: "fullscreen"
|
|
1612
|
-
})),
|
|
1613
|
-
|
|
1869
|
+
})), O = i(() => ee.value?.kind ?? null), k = i(() => ee.value?.message ?? null), A = i(() => Math.min(96, g.value * .15 || 96)), j = i(() => ln(S.value, r.value.length)), M = i(() => un(r.value, S.value));
|
|
1870
|
+
Kt({
|
|
1614
1871
|
enabled: _,
|
|
1615
1872
|
onDisable() {
|
|
1616
|
-
|
|
1873
|
+
H(), T.resetMediaState();
|
|
1617
1874
|
},
|
|
1618
1875
|
onEnable() {
|
|
1619
|
-
return
|
|
1876
|
+
return T.syncMediaPlayback();
|
|
1620
1877
|
},
|
|
1621
|
-
onKeydown:
|
|
1622
|
-
onResize:
|
|
1878
|
+
onKeydown: W,
|
|
1879
|
+
onResize: P
|
|
1623
1880
|
});
|
|
1624
|
-
function
|
|
1881
|
+
function N(e, t, n) {
|
|
1625
1882
|
return Math.min(Math.max(e, t), n);
|
|
1626
1883
|
}
|
|
1627
|
-
function
|
|
1884
|
+
function P() {
|
|
1628
1885
|
g.value = p.value?.clientHeight || window.innerHeight || 1;
|
|
1629
1886
|
}
|
|
1630
|
-
function
|
|
1631
|
-
return r.value.length === 0 ? !1 :
|
|
1887
|
+
function F(e) {
|
|
1888
|
+
return r.value.length === 0 ? !1 : N(S.value + e, 0, r.value.length - 1) !== S.value;
|
|
1632
1889
|
}
|
|
1633
|
-
function
|
|
1890
|
+
function I(e) {
|
|
1634
1891
|
if (r.value.length === 0) return;
|
|
1635
|
-
let n =
|
|
1892
|
+
let n = N(S.value + e, 0, r.value.length - 1);
|
|
1636
1893
|
n !== S.value && t("update:activeIndex", n);
|
|
1637
1894
|
}
|
|
1638
|
-
function
|
|
1895
|
+
function L(e) {
|
|
1639
1896
|
let t = e > 0, n = e < 0;
|
|
1640
|
-
return t && !
|
|
1897
|
+
return t && !F(-1) || n && !F(1) ? e * .24 : e;
|
|
1898
|
+
}
|
|
1899
|
+
function R(e) {
|
|
1900
|
+
!_.value || r.value.length === 0 || e.pointerType === "mouse" || he(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
1641
1901
|
}
|
|
1642
1902
|
function z(e) {
|
|
1643
|
-
!_.value ||
|
|
1903
|
+
!_.value || !h.value || v !== e.pointerId || (m.value = L(e.clientY - y));
|
|
1644
1904
|
}
|
|
1645
|
-
function
|
|
1646
|
-
!_.value ||
|
|
1905
|
+
function te(e) {
|
|
1906
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), V());
|
|
1647
1907
|
}
|
|
1648
|
-
function
|
|
1908
|
+
function B(e) {
|
|
1649
1909
|
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), H());
|
|
1650
1910
|
}
|
|
1651
|
-
function V(
|
|
1652
|
-
|
|
1911
|
+
function V() {
|
|
1912
|
+
Math.abs(m.value) >= A.value && (x = Date.now() + 250, I(m.value < 0 ? 1 : -1)), H();
|
|
1653
1913
|
}
|
|
1654
1914
|
function H() {
|
|
1655
|
-
Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), U();
|
|
1656
|
-
}
|
|
1657
|
-
function U() {
|
|
1658
1915
|
m.value = 0, h.value = !1, v = null;
|
|
1659
1916
|
}
|
|
1660
|
-
function
|
|
1661
|
-
if (!_.value || r.value.length === 0 || h.value ||
|
|
1917
|
+
function U(e) {
|
|
1918
|
+
if (!_.value || r.value.length === 0 || h.value || he(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
1662
1919
|
e.preventDefault();
|
|
1663
1920
|
let t = Date.now();
|
|
1664
|
-
t < b || (b = t + 400,
|
|
1921
|
+
t < b || (b = t + 400, I(e.deltaY > 0 ? 1 : -1));
|
|
1665
1922
|
}
|
|
1666
|
-
function
|
|
1667
|
-
!_.value || r.value.length === 0 ||
|
|
1923
|
+
function W(e) {
|
|
1924
|
+
!_.value || r.value.length === 0 || me(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
|
|
1668
1925
|
}
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1926
|
+
function ne(e, t) {
|
|
1927
|
+
T.onVideoClick(e, t, x);
|
|
1671
1928
|
}
|
|
1672
|
-
function
|
|
1673
|
-
|
|
1929
|
+
function G(e, t) {
|
|
1930
|
+
T.onAudioCoverClick(e, t, x);
|
|
1674
1931
|
}
|
|
1675
|
-
function
|
|
1676
|
-
|
|
1932
|
+
function K(e) {
|
|
1933
|
+
T.onMediaSeekInput(e);
|
|
1677
1934
|
}
|
|
1678
|
-
function
|
|
1679
|
-
|
|
1935
|
+
function q(e) {
|
|
1936
|
+
T.onMediaVolumeInput(e);
|
|
1680
1937
|
}
|
|
1681
|
-
function
|
|
1682
|
-
|
|
1938
|
+
function re() {
|
|
1939
|
+
T.onMediaVolumeToggle();
|
|
1683
1940
|
}
|
|
1684
|
-
function
|
|
1941
|
+
function J(e) {
|
|
1685
1942
|
return e.type === "image" || e.type === "video";
|
|
1686
1943
|
}
|
|
1687
|
-
function
|
|
1944
|
+
function Y(e) {
|
|
1688
1945
|
return e.type === "audio";
|
|
1689
1946
|
}
|
|
1690
|
-
function
|
|
1691
|
-
return
|
|
1947
|
+
function ie(e) {
|
|
1948
|
+
return dn(e, S.value, g.value, m.value, h.value);
|
|
1692
1949
|
}
|
|
1693
1950
|
return {
|
|
1694
1951
|
activeItem: C,
|
|
1695
|
-
activeAssetErrorKind:
|
|
1696
|
-
activeMediaDuration:
|
|
1952
|
+
activeAssetErrorKind: T.activeAssetErrorKind,
|
|
1953
|
+
activeMediaDuration: T.activeMediaDuration,
|
|
1697
1954
|
activeMediaItem: w,
|
|
1698
|
-
activeMediaProgress:
|
|
1699
|
-
activeMediaState:
|
|
1700
|
-
canRetryAsset:
|
|
1955
|
+
activeMediaProgress: T.activeMediaProgress,
|
|
1956
|
+
activeMediaState: T.activeMediaState,
|
|
1957
|
+
canRetryAsset: T.canRetryAsset,
|
|
1701
1958
|
canRetryInitialLoad: f,
|
|
1702
1959
|
errorMessage: o,
|
|
1703
|
-
getAssetErrorKind:
|
|
1704
|
-
getAssetErrorLabel:
|
|
1705
|
-
getAssetRenderKey:
|
|
1706
|
-
formatPlaybackTime:
|
|
1707
|
-
getImageSource:
|
|
1708
|
-
getSlideStyle:
|
|
1960
|
+
getAssetErrorKind: T.getAssetErrorKind,
|
|
1961
|
+
getAssetErrorLabel: T.getAssetErrorLabel,
|
|
1962
|
+
getAssetRenderKey: T.getAssetRenderKey,
|
|
1963
|
+
formatPlaybackTime: Ut,
|
|
1964
|
+
getImageSource: T.getImageSource,
|
|
1965
|
+
getSlideStyle: ie,
|
|
1709
1966
|
hasNextPage: c,
|
|
1710
|
-
isAtEnd:
|
|
1711
|
-
isAudio:
|
|
1712
|
-
isVisual:
|
|
1967
|
+
isAtEnd: E,
|
|
1968
|
+
isAudio: Y,
|
|
1969
|
+
isVisual: J,
|
|
1713
1970
|
items: r,
|
|
1714
1971
|
loading: s,
|
|
1715
|
-
mediaStates:
|
|
1716
|
-
isImageReady:
|
|
1717
|
-
isMediaReady:
|
|
1718
|
-
onAudioCoverClick:
|
|
1719
|
-
onImageError:
|
|
1720
|
-
onImageLoad:
|
|
1721
|
-
onMediaEvent:
|
|
1722
|
-
onMediaError:
|
|
1723
|
-
onMediaSeekInput:
|
|
1724
|
-
onMediaVolumeInput:
|
|
1725
|
-
onMediaVolumeToggle:
|
|
1726
|
-
onPointerCancel:
|
|
1727
|
-
onPointerDown:
|
|
1728
|
-
onPointerMove:
|
|
1729
|
-
onPointerUp:
|
|
1730
|
-
onVideoClick:
|
|
1731
|
-
onWheel:
|
|
1732
|
-
registerAudioElement:
|
|
1733
|
-
registerImageElement:
|
|
1734
|
-
registerVideoElement:
|
|
1735
|
-
renderedItems:
|
|
1736
|
-
renderedRange:
|
|
1972
|
+
mediaStates: T.mediaStates,
|
|
1973
|
+
isImageReady: T.isImageReady,
|
|
1974
|
+
isMediaReady: T.isMediaReady,
|
|
1975
|
+
onAudioCoverClick: G,
|
|
1976
|
+
onImageError: T.onImageError,
|
|
1977
|
+
onImageLoad: T.onImageLoad,
|
|
1978
|
+
onMediaEvent: T.onMediaEvent,
|
|
1979
|
+
onMediaError: T.onMediaError,
|
|
1980
|
+
onMediaSeekInput: K,
|
|
1981
|
+
onMediaVolumeInput: q,
|
|
1982
|
+
onMediaVolumeToggle: re,
|
|
1983
|
+
onPointerCancel: B,
|
|
1984
|
+
onPointerDown: R,
|
|
1985
|
+
onPointerMove: z,
|
|
1986
|
+
onPointerUp: te,
|
|
1987
|
+
onVideoClick: ne,
|
|
1988
|
+
onWheel: U,
|
|
1989
|
+
registerAudioElement: T.registerAudioElement,
|
|
1990
|
+
registerImageElement: T.registerImageElement,
|
|
1991
|
+
registerVideoElement: T.registerVideoElement,
|
|
1992
|
+
renderedItems: M,
|
|
1993
|
+
renderedRange: j,
|
|
1737
1994
|
resolvedActiveIndex: S,
|
|
1995
|
+
resetAssetState: T.resetAssetState,
|
|
1738
1996
|
retryInitialLoad: async () => {},
|
|
1739
|
-
retryAsset:
|
|
1997
|
+
retryAsset: T.retryAsset,
|
|
1740
1998
|
stageRef: p,
|
|
1741
|
-
statusKind:
|
|
1742
|
-
statusMessage:
|
|
1999
|
+
statusKind: O,
|
|
2000
|
+
statusMessage: k,
|
|
1743
2001
|
paginationDetail: u,
|
|
1744
2002
|
phase: d
|
|
1745
2003
|
};
|
|
1746
2004
|
}
|
|
1747
2005
|
//#endregion
|
|
1748
2006
|
//#region src/components/viewer-core/theme.ts
|
|
1749
|
-
var
|
|
2007
|
+
var pn = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", mn = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", hn = {
|
|
1750
2008
|
image: !0,
|
|
1751
2009
|
video: !0,
|
|
1752
2010
|
audio: !0,
|
|
1753
2011
|
other: !0
|
|
1754
2012
|
};
|
|
1755
|
-
function
|
|
1756
|
-
return
|
|
2013
|
+
function gn(e) {
|
|
2014
|
+
return hn[e], pn;
|
|
1757
2015
|
}
|
|
1758
|
-
function
|
|
1759
|
-
return
|
|
2016
|
+
function _n(e) {
|
|
2017
|
+
return hn[e], mn;
|
|
1760
2018
|
}
|
|
1761
2019
|
//#endregion
|
|
1762
2020
|
//#region src/components/viewer-core/dominantImageTone.ts
|
|
1763
|
-
function
|
|
2021
|
+
function vn(e) {
|
|
1764
2022
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
1765
2023
|
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
1766
2024
|
if (!n) return null;
|
|
@@ -1775,21 +2033,21 @@ function sn(e) {
|
|
|
1775
2033
|
r += d, i += s * d, a += c * d, o += l * d;
|
|
1776
2034
|
}
|
|
1777
2035
|
return r <= 0 ? null : {
|
|
1778
|
-
r:
|
|
1779
|
-
g:
|
|
1780
|
-
b:
|
|
2036
|
+
r: yn(Math.round(i / r)),
|
|
2037
|
+
g: yn(Math.round(a / r)),
|
|
2038
|
+
b: yn(Math.round(o / r))
|
|
1781
2039
|
};
|
|
1782
2040
|
} catch {
|
|
1783
2041
|
return null;
|
|
1784
2042
|
}
|
|
1785
2043
|
}
|
|
1786
|
-
function
|
|
2044
|
+
function yn(e) {
|
|
1787
2045
|
return Math.min(235, Math.max(26, e));
|
|
1788
2046
|
}
|
|
1789
2047
|
//#endregion
|
|
1790
2048
|
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
1791
|
-
function
|
|
1792
|
-
let t =
|
|
2049
|
+
function bn(e) {
|
|
2050
|
+
let t = D({}), n = i(() => e.activeItem.value ? e.getItemKey(e.activeItem.value) : null), r = i(() => !e.showDominantImageTone.value || e.activeItem.value?.type !== "image" || !n.value || !e.isImageReady(n.value) ? null : t.value[n.value] ?? null), a = i(() => {
|
|
1793
2051
|
if (!r.value) return;
|
|
1794
2052
|
let { r: e, g: t, b: n } = r.value;
|
|
1795
2053
|
return { background: `radial-gradient(circle at top center, rgba(${e},${t},${n},0.34) 0%, transparent 44%), linear-gradient(180deg,#0a0b10,#05060a)` };
|
|
@@ -1798,12 +2056,12 @@ function ln(e) {
|
|
|
1798
2056
|
let { r: e, g: t, b: n } = r.value;
|
|
1799
2057
|
return { background: `radial-gradient(circle at center, rgba(${e},${t},${n},0.42) 0%, transparent 44%), linear-gradient(180deg,#0b0c11,#06070b)` };
|
|
1800
2058
|
});
|
|
1801
|
-
|
|
2059
|
+
I(() => e.showDominantImageTone.value, (e) => {
|
|
1802
2060
|
e || (t.value = {});
|
|
1803
2061
|
});
|
|
1804
2062
|
function s(n, r) {
|
|
1805
2063
|
if (!e.showDominantImageTone.value) return;
|
|
1806
|
-
let i =
|
|
2064
|
+
let i = vn(r);
|
|
1807
2065
|
i && (t.value[n] = i);
|
|
1808
2066
|
}
|
|
1809
2067
|
return {
|
|
@@ -1814,7 +2072,7 @@ function ln(e) {
|
|
|
1814
2072
|
}
|
|
1815
2073
|
//#endregion
|
|
1816
2074
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
1817
|
-
var
|
|
2075
|
+
var xn = ["data-surface"], Sn = ["data-surface"], Cn = /* @__PURE__ */ d({
|
|
1818
2076
|
inheritAttrs: !1,
|
|
1819
2077
|
__name: "SurfaceEmptyState",
|
|
1820
2078
|
props: {
|
|
@@ -1823,36 +2081,36 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
1823
2081
|
surface: {}
|
|
1824
2082
|
},
|
|
1825
2083
|
setup(e) {
|
|
1826
|
-
let t =
|
|
1827
|
-
return (n, r) => e.mode === "inline" ? (
|
|
2084
|
+
let t = N();
|
|
2085
|
+
return (n, r) => e.mode === "inline" ? (w(), s("div", g({ key: 0 }, M(t), {
|
|
1828
2086
|
"data-testid": "vibe-empty-state-inline",
|
|
1829
2087
|
"data-surface": e.surface,
|
|
1830
2088
|
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)]"]
|
|
1831
|
-
}), [
|
|
2089
|
+
}), [O(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"]) }, A(e.message), 3)])], 16, xn)) : (w(), s("div", g({ key: 1 }, M(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]"] }), [O(n.$slots, "default", {}, () => [c("span", {
|
|
1832
2090
|
"data-testid": "vibe-empty-state-badge",
|
|
1833
2091
|
"data-surface": e.surface,
|
|
1834
|
-
class:
|
|
1835
|
-
},
|
|
2092
|
+
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"])
|
|
2093
|
+
}, A(e.message), 11, Sn)])], 16));
|
|
1836
2094
|
}
|
|
1837
|
-
}),
|
|
2095
|
+
}), wn = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, Tn = {
|
|
1838
2096
|
key: 0,
|
|
1839
2097
|
class: "relative h-full min-h-0"
|
|
1840
|
-
},
|
|
2098
|
+
}, En = [
|
|
1841
2099
|
"data-item-id",
|
|
1842
2100
|
"data-occurrence-key",
|
|
1843
2101
|
"data-index",
|
|
1844
2102
|
"data-active",
|
|
1845
2103
|
"aria-hidden"
|
|
1846
|
-
],
|
|
2104
|
+
], Dn = {
|
|
1847
2105
|
key: 0,
|
|
1848
2106
|
"data-testid": "vibe-asset-spinner",
|
|
1849
2107
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
1850
|
-
},
|
|
2108
|
+
}, On = { 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]" }, kn = ["data-kind"], An = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, jn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Mn = ["onClick"], Nn = [
|
|
1851
2109
|
"src",
|
|
1852
2110
|
"alt",
|
|
1853
2111
|
"onLoad",
|
|
1854
2112
|
"onError"
|
|
1855
|
-
],
|
|
2113
|
+
], Pn = [
|
|
1856
2114
|
"loop",
|
|
1857
2115
|
"src",
|
|
1858
2116
|
"preload",
|
|
@@ -1871,15 +2129,15 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
1871
2129
|
"onStalled",
|
|
1872
2130
|
"onTimeupdate",
|
|
1873
2131
|
"onWaiting"
|
|
1874
|
-
],
|
|
2132
|
+
], Fn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, In = [
|
|
1875
2133
|
"aria-label",
|
|
1876
2134
|
"disabled",
|
|
1877
2135
|
"onClick"
|
|
1878
|
-
],
|
|
2136
|
+
], Ln = { 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]" }, Rn = { 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]" }, zn = {
|
|
1879
2137
|
key: 0,
|
|
1880
2138
|
"data-testid": "vibe-asset-spinner",
|
|
1881
2139
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
1882
|
-
},
|
|
2140
|
+
}, Bn = { 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]" }, Vn = ["data-kind"], Hn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Un = ["onClick"], Wn = [
|
|
1883
2141
|
"src",
|
|
1884
2142
|
"preload",
|
|
1885
2143
|
"onCanplay",
|
|
@@ -1895,26 +2153,26 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
1895
2153
|
"onStalled",
|
|
1896
2154
|
"onTimeupdate",
|
|
1897
2155
|
"onWaiting"
|
|
1898
|
-
],
|
|
2156
|
+
], Gn = {
|
|
1899
2157
|
key: 2,
|
|
1900
2158
|
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"
|
|
1901
|
-
},
|
|
2159
|
+
}, Kn = { 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]" }, qn = {
|
|
1902
2160
|
key: 0,
|
|
1903
2161
|
"data-testid": "vibe-fullscreen-overlay",
|
|
1904
2162
|
class: "pointer-events-none absolute inset-0 z-[6]"
|
|
1905
|
-
},
|
|
2163
|
+
}, Jn = { class: "h-full w-full" }, Yn = {
|
|
1906
2164
|
key: 1,
|
|
1907
2165
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
1908
2166
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
1909
|
-
},
|
|
2167
|
+
}, Xn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Zn = { 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)]" }, Qn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, $n = {
|
|
1910
2168
|
key: 0,
|
|
1911
2169
|
"data-testid": "vibe-fullscreen-aside",
|
|
1912
2170
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
1913
|
-
},
|
|
2171
|
+
}, er = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, tr = {
|
|
1914
2172
|
key: 0,
|
|
1915
2173
|
"data-testid": "vibe-fullscreen-aside",
|
|
1916
2174
|
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]"
|
|
1917
|
-
},
|
|
2175
|
+
}, nr = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, rr = 1280, ir = 768, ar = /* @__PURE__ */ d({
|
|
1918
2176
|
__name: "FullscreenSurface",
|
|
1919
2177
|
props: {
|
|
1920
2178
|
active: {
|
|
@@ -1966,66 +2224,84 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
1966
2224
|
},
|
|
1967
2225
|
emits: ["back-to-list", "update:activeIndex"],
|
|
1968
2226
|
setup(e, { emit: n }) {
|
|
1969
|
-
let d = e,
|
|
2227
|
+
let d = e, f = P(), m = n, h = fn(d, (e, t) => {
|
|
1970
2228
|
m("update:activeIndex", t);
|
|
1971
2229
|
}, {
|
|
1972
|
-
enabled:
|
|
2230
|
+
enabled: j(d, "active"),
|
|
1973
2231
|
onAssetError: d.reportAssetError ?? void 0,
|
|
1974
2232
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
1975
|
-
}),
|
|
1976
|
-
active:
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
2233
|
+
}), _ = D(typeof window > "u" ? rr : window.innerWidth || rr), C = Rt({
|
|
2234
|
+
active: j(d, "active"),
|
|
2235
|
+
items: h.items,
|
|
2236
|
+
resolvedActiveIndex: h.resolvedActiveIndex,
|
|
2237
|
+
viewer: h
|
|
2238
|
+
}), T = i(() => gn(h.activeItem.value?.type ?? "image")), { activeSlideToneStyle: E, activeStageToneStyle: N, updateFromImageElement: F } = bn({
|
|
2239
|
+
activeItem: h.activeItem,
|
|
2240
|
+
getItemKey: C.getItemKey,
|
|
2241
|
+
isImageReady: h.isImageReady,
|
|
2242
|
+
showDominantImageTone: j(d, "showDominantImageTone")
|
|
2243
|
+
}), I = i(() => h.activeMediaItem.value && !h.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), L = i(() => !!h.activeMediaItem.value && !h.activeAssetErrorKind.value), z = i(() => _.value < ir ? "vertical" : "horizontal"), B = i(() => L.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), V = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), H = i(() => d.hasNextPage ? "Loading more items" : h.statusMessage.value ?? "Loading more items"), U = i(() => {
|
|
2244
|
+
let e = h.activeItem.value;
|
|
1986
2245
|
return e ? {
|
|
1987
2246
|
hasNextPage: d.hasNextPage,
|
|
1988
|
-
index:
|
|
2247
|
+
index: h.resolvedActiveIndex.value,
|
|
1989
2248
|
item: e,
|
|
1990
2249
|
loading: d.loading,
|
|
1991
2250
|
paginationDetail: d.paginationDetail,
|
|
1992
2251
|
total: d.items.length
|
|
1993
2252
|
} : null;
|
|
1994
|
-
}),
|
|
1995
|
-
...
|
|
1996
|
-
kind:
|
|
1997
|
-
message:
|
|
1998
|
-
}),
|
|
1999
|
-
gridTemplateColumns:
|
|
2253
|
+
}), W = i(() => !U.value || !f["fullscreen-header-actions"] ? [] : f["fullscreen-header-actions"](U.value)), ne = i(() => !U.value || !f["fullscreen-aside"] ? [] : f["fullscreen-aside"](U.value)), G = i(() => !d.showStatusBadges || !U.value || !h.statusKind.value || !h.statusMessage.value ? null : {
|
|
2254
|
+
...U.value,
|
|
2255
|
+
kind: h.statusKind.value,
|
|
2256
|
+
message: h.statusMessage.value
|
|
2257
|
+
}), K = i(() => !G.value || !f["fullscreen-status"] ? [] : f["fullscreen-status"](G.value)), q = i(() => ({
|
|
2258
|
+
gridTemplateColumns: Y.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
2000
2259
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
2001
|
-
})),
|
|
2002
|
-
emptyStateMode:
|
|
2260
|
+
})), re = i(() => zt(W.value)), J = i(() => zt(ne.value)), Y = i(() => J.value && _.value >= rr), ie = i(() => J.value && !Y.value), ae = i(() => zt(K.value)), { emptyStateProps: X, showBadgeEmptyState: ue, showCustomEmptyState: de, showInlineEmptyState: Z } = Ht({
|
|
2261
|
+
emptyStateMode: j(d, "emptyStateMode"),
|
|
2003
2262
|
itemCount: i(() => d.items.length),
|
|
2004
|
-
loading:
|
|
2005
|
-
renderSlot:
|
|
2263
|
+
loading: j(d, "loading"),
|
|
2264
|
+
renderSlot: f["empty-state"],
|
|
2006
2265
|
surface: "fullscreen"
|
|
2007
2266
|
});
|
|
2008
|
-
|
|
2009
|
-
window.addEventListener("resize",
|
|
2010
|
-
}),
|
|
2011
|
-
window.removeEventListener("resize",
|
|
2267
|
+
S(() => {
|
|
2268
|
+
window.addEventListener("resize", fe);
|
|
2269
|
+
}), x(() => {
|
|
2270
|
+
window.removeEventListener("resize", fe);
|
|
2012
2271
|
});
|
|
2013
|
-
function
|
|
2014
|
-
|
|
2272
|
+
function fe() {
|
|
2273
|
+
_.value = window.innerWidth || rr;
|
|
2015
2274
|
}
|
|
2016
|
-
function
|
|
2017
|
-
|
|
2275
|
+
function pe(e, t, n) {
|
|
2276
|
+
C.settleBackgroundPreload(t), h.onImageLoad(t, n);
|
|
2018
2277
|
let r = e.currentTarget;
|
|
2019
|
-
r instanceof HTMLImageElement &&
|
|
2020
|
-
}
|
|
2021
|
-
function pe(e, t) {
|
|
2022
|
-
g.registerImageElement(e, t), t instanceof HTMLImageElement && me(e, t);
|
|
2278
|
+
r instanceof HTMLImageElement && ye(t, r);
|
|
2023
2279
|
}
|
|
2024
|
-
function me(e, t) {
|
|
2025
|
-
|
|
2280
|
+
async function me(e, t) {
|
|
2281
|
+
C.settleBackgroundPreload(e), await h.onImageError(e, t);
|
|
2026
2282
|
}
|
|
2027
2283
|
function he(e, t) {
|
|
2028
|
-
|
|
2284
|
+
C.registerImageElement(e, t), h.registerImageElement(e, t), t instanceof HTMLImageElement && ye(e, t);
|
|
2285
|
+
}
|
|
2286
|
+
function ge(e, t) {
|
|
2287
|
+
C.registerMediaElement(e, t), h.registerVideoElement(e, t);
|
|
2288
|
+
}
|
|
2289
|
+
function _e(e, t) {
|
|
2290
|
+
C.registerMediaElement(e, t), h.registerAudioElement(e, t);
|
|
2291
|
+
}
|
|
2292
|
+
async function ve(e, t) {
|
|
2293
|
+
C.settleBackgroundPreload(e), await h.onMediaError(e, t);
|
|
2294
|
+
}
|
|
2295
|
+
function Q(e, t) {
|
|
2296
|
+
h.onMediaEvent(e, t);
|
|
2297
|
+
let n = t.currentTarget, r = typeof HTMLMediaElement > "u" ? 1 : HTMLMediaElement.HAVE_METADATA;
|
|
2298
|
+
n instanceof HTMLMediaElement && n.readyState >= r && C.settleBackgroundPreload(e);
|
|
2299
|
+
}
|
|
2300
|
+
function ye(e, t) {
|
|
2301
|
+
F(e, t);
|
|
2302
|
+
}
|
|
2303
|
+
function be(e, t) {
|
|
2304
|
+
if (Q(t, e), !d.loopFullscreenVideo) return;
|
|
2029
2305
|
let n = e.currentTarget;
|
|
2030
2306
|
if (!(n instanceof HTMLVideoElement)) return;
|
|
2031
2307
|
try {
|
|
@@ -2034,182 +2310,182 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
2034
2310
|
let r = n.play();
|
|
2035
2311
|
r && typeof r.catch == "function" && r.catch(() => {});
|
|
2036
2312
|
}
|
|
2037
|
-
return (e, n) => (
|
|
2313
|
+
return (e, n) => (w(), s("div", wn, [
|
|
2038
2314
|
c("div", {
|
|
2039
|
-
class:
|
|
2040
|
-
style:
|
|
2315
|
+
class: v(["absolute inset-0 transition-[background] duration-200", T.value]),
|
|
2316
|
+
style: b(M(N))
|
|
2041
2317
|
}, null, 6),
|
|
2042
2318
|
c("div", {
|
|
2043
2319
|
class: "relative z-[1] grid h-full min-h-0",
|
|
2044
|
-
style:
|
|
2320
|
+
style: b(q.value)
|
|
2045
2321
|
}, [c("div", {
|
|
2046
2322
|
ref: "viewer.stageRef",
|
|
2047
2323
|
"data-testid": "vibe-stage",
|
|
2048
2324
|
class: "relative h-full min-h-0 touch-none overflow-hidden",
|
|
2049
|
-
onPointerdown: n[1] ||= (...e) =>
|
|
2050
|
-
onPointermove: n[2] ||= (...e) =>
|
|
2051
|
-
onPointerup: n[3] ||= (...e) =>
|
|
2052
|
-
onPointercancel: n[4] ||= (...e) =>
|
|
2053
|
-
onWheel: n[5] ||= (...e) =>
|
|
2054
|
-
}, [
|
|
2055
|
-
(
|
|
2056
|
-
key:
|
|
2325
|
+
onPointerdown: n[1] ||= (...e) => M(h).onPointerDown && M(h).onPointerDown(...e),
|
|
2326
|
+
onPointermove: n[2] ||= (...e) => M(h).onPointerMove && M(h).onPointerMove(...e),
|
|
2327
|
+
onPointerup: n[3] ||= (...e) => M(h).onPointerUp && M(h).onPointerUp(...e),
|
|
2328
|
+
onPointercancel: n[4] ||= (...e) => M(h).onPointerCancel && M(h).onPointerCancel(...e),
|
|
2329
|
+
onWheel: n[5] ||= (...e) => M(h).onWheel && M(h).onWheel(...e)
|
|
2330
|
+
}, [M(h).activeItem.value ? (w(), s("div", Tn, [
|
|
2331
|
+
(w(!0), s(t, null, ee(M(h).renderedItems.value, ({ item: r, index: i }) => (w(), s("article", {
|
|
2332
|
+
key: M(C).getItemKey(r),
|
|
2057
2333
|
"data-testid": "vibe-slide",
|
|
2058
2334
|
"data-item-id": r.id,
|
|
2059
|
-
"data-occurrence-key":
|
|
2335
|
+
"data-occurrence-key": M(C).getItemKey(r),
|
|
2060
2336
|
"data-index": i,
|
|
2061
|
-
"data-active": i ===
|
|
2062
|
-
"aria-hidden": i ===
|
|
2063
|
-
class:
|
|
2064
|
-
style:
|
|
2337
|
+
"data-active": i === M(h).resolvedActiveIndex.value,
|
|
2338
|
+
"aria-hidden": i === M(h).resolvedActiveIndex.value ? "false" : "true",
|
|
2339
|
+
class: v(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === M(h).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
2340
|
+
style: b(M(h).getSlideStyle(i))
|
|
2065
2341
|
}, [c("div", {
|
|
2066
|
-
class:
|
|
2067
|
-
style:
|
|
2068
|
-
}, null, 6),
|
|
2342
|
+
class: v(["absolute inset-0 opacity-85", M(_n)(r.type)]),
|
|
2343
|
+
style: b(i === M(h).resolvedActiveIndex.value && r.type === "image" ? M(E) : void 0)
|
|
2344
|
+
}, null, 6), M(h).isVisual(r) ? (w(), s("div", {
|
|
2069
2345
|
key: 0,
|
|
2070
|
-
class:
|
|
2071
|
-
}, [
|
|
2346
|
+
class: v(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === M(h).resolvedActiveIndex.value ? B.value : ""])
|
|
2347
|
+
}, [M(C).isAssetLoading(i, r) ? (w(), s("div", Dn, [c("span", On, [u(M(oe), {
|
|
2072
2348
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2073
2349
|
"aria-hidden": "true"
|
|
2074
|
-
})])])) : o("", !0),
|
|
2350
|
+
})])])) : o("", !0), M(C).isAssetErrored(i, r) ? (w(), s("div", {
|
|
2075
2351
|
key: 1,
|
|
2076
2352
|
"data-testid": "vibe-asset-error",
|
|
2077
|
-
"data-kind":
|
|
2353
|
+
"data-kind": M(C).getAssetErrorKind(r),
|
|
2078
2354
|
class: "grid h-full w-full place-items-center"
|
|
2079
|
-
}, [c("div",
|
|
2080
|
-
u(
|
|
2355
|
+
}, [c("div", An, [
|
|
2356
|
+
u(M(le), {
|
|
2081
2357
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2082
2358
|
"aria-hidden": "true"
|
|
2083
2359
|
}),
|
|
2084
|
-
c("p",
|
|
2085
|
-
|
|
2360
|
+
c("p", jn, A(M(C).getAssetErrorLabel(r)), 1),
|
|
2361
|
+
M(h).canRetryAsset(M(C).getItemKey(r)) ? (w(), s("button", {
|
|
2086
2362
|
key: 0,
|
|
2087
2363
|
type: "button",
|
|
2088
2364
|
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",
|
|
2089
|
-
onClick:
|
|
2090
|
-
}, " Retry ", 8,
|
|
2091
|
-
])], 8,
|
|
2092
|
-
key:
|
|
2093
|
-
src:
|
|
2365
|
+
onClick: te((e) => M(h).retryAsset(M(C).getItemKey(r)), ["stop"])
|
|
2366
|
+
}, " Retry ", 8, Mn)) : o("", !0)
|
|
2367
|
+
])], 8, kn)) : r.type === "image" ? (w(), s("img", {
|
|
2368
|
+
key: M(h).getAssetRenderKey(M(C).getItemKey(r)),
|
|
2369
|
+
src: M(C).getFullscreenImageSource(i, r),
|
|
2094
2370
|
alt: r.title ?? "",
|
|
2095
2371
|
crossorigin: "anonymous",
|
|
2096
2372
|
draggable: "false",
|
|
2097
|
-
class:
|
|
2373
|
+
class: v(["block h-auto max-h-full w-auto max-w-full object-contain shadow-[0_40px_120px_-60px_rgba(0,0,0,0.9)] transition-opacity duration-300", M(h).isImageReady(M(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2098
2374
|
ref_for: !0,
|
|
2099
|
-
ref: (e) =>
|
|
2100
|
-
onLoad: (e) =>
|
|
2101
|
-
onError: (e) =>
|
|
2102
|
-
}, null, 42,
|
|
2103
|
-
key:
|
|
2104
|
-
class:
|
|
2375
|
+
ref: (e) => he(M(C).getItemKey(r), e),
|
|
2376
|
+
onLoad: (e) => pe(e, M(C).getItemKey(r), r.url),
|
|
2377
|
+
onError: (e) => me(M(C).getItemKey(r), r.url)
|
|
2378
|
+
}, null, 42, Nn)) : (w(), s("video", {
|
|
2379
|
+
key: M(h).getAssetRenderKey(M(C).getItemKey(r)),
|
|
2380
|
+
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", M(h).isMediaReady(M(C).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
2105
2381
|
playsinline: "",
|
|
2106
2382
|
loop: d.loopFullscreenVideo,
|
|
2107
|
-
src:
|
|
2108
|
-
preload:
|
|
2383
|
+
src: M(C).getFullscreenMediaSource(i, r),
|
|
2384
|
+
preload: M(C).getFullscreenMediaPreload(i),
|
|
2109
2385
|
ref_for: !0,
|
|
2110
|
-
ref: (e) =>
|
|
2111
|
-
onClick:
|
|
2112
|
-
onCanplay: (e) =>
|
|
2113
|
-
onDurationchange: (e) =>
|
|
2114
|
-
onEnded: (e) =>
|
|
2115
|
-
onError: (e) =>
|
|
2116
|
-
onLoadstart: (e) =>
|
|
2117
|
-
onLoadedmetadata: (e) =>
|
|
2118
|
-
onPause: (e) =>
|
|
2119
|
-
onPlay: (e) =>
|
|
2120
|
-
onPlaying: (e) =>
|
|
2121
|
-
onSeeking: (e) =>
|
|
2122
|
-
onSeeked: (e) =>
|
|
2123
|
-
onStalled: (e) =>
|
|
2124
|
-
onTimeupdate: (e) =>
|
|
2125
|
-
onWaiting: (e) =>
|
|
2126
|
-
}, null, 42,
|
|
2386
|
+
ref: (e) => ge(M(C).getItemKey(r), e),
|
|
2387
|
+
onClick: te((e) => M(h).onVideoClick(e, M(C).getItemKey(r)), ["stop"]),
|
|
2388
|
+
onCanplay: (e) => Q(M(C).getItemKey(r), e),
|
|
2389
|
+
onDurationchange: (e) => Q(M(C).getItemKey(r), e),
|
|
2390
|
+
onEnded: (e) => be(e, M(C).getItemKey(r)),
|
|
2391
|
+
onError: (e) => ve(M(C).getItemKey(r), r.url),
|
|
2392
|
+
onLoadstart: (e) => Q(M(C).getItemKey(r), e),
|
|
2393
|
+
onLoadedmetadata: (e) => Q(M(C).getItemKey(r), e),
|
|
2394
|
+
onPause: (e) => Q(M(C).getItemKey(r), e),
|
|
2395
|
+
onPlay: (e) => Q(M(C).getItemKey(r), e),
|
|
2396
|
+
onPlaying: (e) => Q(M(C).getItemKey(r), e),
|
|
2397
|
+
onSeeking: (e) => Q(M(C).getItemKey(r), e),
|
|
2398
|
+
onSeeked: (e) => Q(M(C).getItemKey(r), e),
|
|
2399
|
+
onStalled: (e) => Q(M(C).getItemKey(r), e),
|
|
2400
|
+
onTimeupdate: (e) => Q(M(C).getItemKey(r), e),
|
|
2401
|
+
onWaiting: (e) => Q(M(C).getItemKey(r), e)
|
|
2402
|
+
}, null, 42, Pn))], 2)) : M(h).isAudio(r) ? (w(), s("div", {
|
|
2127
2403
|
key: 1,
|
|
2128
|
-
class:
|
|
2129
|
-
}, [c("div",
|
|
2404
|
+
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 === M(h).resolvedActiveIndex.value ? B.value : ""])
|
|
2405
|
+
}, [c("div", Fn, [
|
|
2130
2406
|
c("button", {
|
|
2131
2407
|
type: "button",
|
|
2132
2408
|
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]",
|
|
2133
|
-
"aria-label":
|
|
2134
|
-
disabled: !!
|
|
2135
|
-
onClick: (e) =>
|
|
2409
|
+
"aria-label": M(h).mediaStates.value[M(C).getItemKey(r)]?.paused ?? !0 ? M(C).getMediaActionLabel("Play", r) : M(C).getMediaActionLabel("Pause", r),
|
|
2410
|
+
disabled: !!M(C).getAssetErrorKind(r),
|
|
2411
|
+
onClick: (e) => M(h).onAudioCoverClick(e, M(C).getItemKey(r))
|
|
2136
2412
|
}, [
|
|
2137
2413
|
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),
|
|
2138
2414
|
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),
|
|
2139
|
-
c("span",
|
|
2140
|
-
icon:
|
|
2415
|
+
c("span", Ln, [O(e.$slots, "item-icon", {
|
|
2416
|
+
icon: M(Tt)(r.type),
|
|
2141
2417
|
item: r
|
|
2142
|
-
}, () => [(
|
|
2418
|
+
}, () => [(w(), a(k(M(Tt)(r.type)), {
|
|
2143
2419
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2144
2420
|
"aria-hidden": "true"
|
|
2145
2421
|
}))])]),
|
|
2146
|
-
c("span",
|
|
2422
|
+
c("span", Rn, [(w(), a(k(M(h).mediaStates.value[M(C).getItemKey(r)]?.paused ?? !0 ? M(ce) : M(se)), {
|
|
2147
2423
|
class: "h-4 w-4 stroke-2",
|
|
2148
2424
|
"aria-hidden": "true"
|
|
2149
2425
|
}))])
|
|
2150
|
-
], 8,
|
|
2151
|
-
|
|
2426
|
+
], 8, In),
|
|
2427
|
+
M(C).isAssetLoading(i, r) ? (w(), s("div", zn, [c("span", Bn, [u(M(oe), {
|
|
2152
2428
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2153
2429
|
"aria-hidden": "true"
|
|
2154
2430
|
})])])) : o("", !0),
|
|
2155
|
-
|
|
2431
|
+
M(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", {
|
|
2156
2432
|
"data-testid": "vibe-asset-error",
|
|
2157
|
-
"data-kind":
|
|
2433
|
+
"data-kind": M(C).getAssetErrorKind(r),
|
|
2158
2434
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
2159
2435
|
}, [
|
|
2160
|
-
u(
|
|
2436
|
+
u(M(le), {
|
|
2161
2437
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
2162
2438
|
"aria-hidden": "true"
|
|
2163
2439
|
}),
|
|
2164
|
-
c("p",
|
|
2165
|
-
|
|
2440
|
+
c("p", Hn, A(M(C).getAssetErrorLabel(r)), 1),
|
|
2441
|
+
M(h).canRetryAsset(M(C).getItemKey(r)) ? (w(), s("button", {
|
|
2166
2442
|
key: 0,
|
|
2167
2443
|
type: "button",
|
|
2168
2444
|
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",
|
|
2169
|
-
onClick:
|
|
2170
|
-
}, " Retry ", 8,
|
|
2171
|
-
], 8,
|
|
2172
|
-
]), (
|
|
2173
|
-
key:
|
|
2174
|
-
src:
|
|
2175
|
-
preload:
|
|
2445
|
+
onClick: te((e) => M(h).retryAsset(M(C).getItemKey(r)), ["stop"])
|
|
2446
|
+
}, " Retry ", 8, Un)) : o("", !0)
|
|
2447
|
+
], 8, Vn)], 64)) : o("", !0)
|
|
2448
|
+
]), (w(), s("audio", {
|
|
2449
|
+
key: M(h).getAssetRenderKey(M(C).getItemKey(r)),
|
|
2450
|
+
src: M(C).getFullscreenMediaSource(i, r),
|
|
2451
|
+
preload: M(C).getFullscreenMediaPreload(i),
|
|
2176
2452
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
2177
2453
|
ref_for: !0,
|
|
2178
|
-
ref: (e) =>
|
|
2179
|
-
onCanplay: (e) =>
|
|
2180
|
-
onDurationchange: (e) =>
|
|
2181
|
-
onError: (e) =>
|
|
2182
|
-
onLoadstart: (e) =>
|
|
2183
|
-
onLoadedmetadata: (e) =>
|
|
2184
|
-
onPause: (e) =>
|
|
2185
|
-
onPlay: (e) =>
|
|
2186
|
-
onPlaying: (e) =>
|
|
2187
|
-
onSeeking: (e) =>
|
|
2188
|
-
onSeeked: (e) =>
|
|
2189
|
-
onStalled: (e) =>
|
|
2190
|
-
onTimeupdate: (e) =>
|
|
2191
|
-
onWaiting: (e) =>
|
|
2192
|
-
}, null, 40,
|
|
2193
|
-
icon:
|
|
2454
|
+
ref: (e) => _e(M(C).getItemKey(r), e),
|
|
2455
|
+
onCanplay: (e) => Q(M(C).getItemKey(r), e),
|
|
2456
|
+
onDurationchange: (e) => Q(M(C).getItemKey(r), e),
|
|
2457
|
+
onError: (e) => ve(M(C).getItemKey(r), r.url),
|
|
2458
|
+
onLoadstart: (e) => Q(M(C).getItemKey(r), e),
|
|
2459
|
+
onLoadedmetadata: (e) => Q(M(C).getItemKey(r), e),
|
|
2460
|
+
onPause: (e) => Q(M(C).getItemKey(r), e),
|
|
2461
|
+
onPlay: (e) => Q(M(C).getItemKey(r), e),
|
|
2462
|
+
onPlaying: (e) => Q(M(C).getItemKey(r), e),
|
|
2463
|
+
onSeeking: (e) => Q(M(C).getItemKey(r), e),
|
|
2464
|
+
onSeeked: (e) => Q(M(C).getItemKey(r), e),
|
|
2465
|
+
onStalled: (e) => Q(M(C).getItemKey(r), e),
|
|
2466
|
+
onTimeupdate: (e) => Q(M(C).getItemKey(r), e),
|
|
2467
|
+
onWaiting: (e) => Q(M(C).getItemKey(r), e)
|
|
2468
|
+
}, null, 40, Wn))], 2)) : (w(), s("div", Gn, [c("div", Kn, [O(e.$slots, "item-icon", {
|
|
2469
|
+
icon: M(Tt)(r.type),
|
|
2194
2470
|
item: r
|
|
2195
|
-
}, () => [(
|
|
2471
|
+
}, () => [(w(), a(k(M(Tt)(r.type)), {
|
|
2196
2472
|
class: "h-6 w-6 stroke-[1.9]",
|
|
2197
2473
|
"aria-hidden": "true"
|
|
2198
|
-
}))])])]))], 14,
|
|
2199
|
-
|
|
2200
|
-
|
|
2474
|
+
}))])])]))], 14, En))), 128)),
|
|
2475
|
+
U.value && f["fullscreen-overlay"] ? (w(), s("div", qn, [c("div", Jn, [O(e.$slots, "fullscreen-overlay", y(p(U.value)))])])) : o("", !0),
|
|
2476
|
+
M(h).activeItem.value ? (w(), a(St, {
|
|
2201
2477
|
key: 1,
|
|
2202
|
-
"current-index":
|
|
2478
|
+
"current-index": M(h).resolvedActiveIndex.value,
|
|
2203
2479
|
loading: d.loading,
|
|
2204
|
-
"pagination-detail":
|
|
2480
|
+
"pagination-detail": M(h).paginationDetail.value,
|
|
2205
2481
|
"show-back-to-list": d.showBackToList,
|
|
2206
|
-
"show-end-badge": d.showEndBadge &&
|
|
2207
|
-
title:
|
|
2208
|
-
total:
|
|
2482
|
+
"show-end-badge": d.showEndBadge && M(h).isAtEnd.value && !M(h).hasNextPage.value && !M(h).loading.value,
|
|
2483
|
+
title: M(h).activeItem.value.title ?? null,
|
|
2484
|
+
total: M(h).items.value.length,
|
|
2209
2485
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
2210
|
-
}, l({ _: 2 }, [
|
|
2486
|
+
}, l({ _: 2 }, [re.value && U.value ? {
|
|
2211
2487
|
name: "actions",
|
|
2212
|
-
fn:
|
|
2488
|
+
fn: R(() => [O(e.$slots, "fullscreen-header-actions", y(p(U.value)))]),
|
|
2213
2489
|
key: "0"
|
|
2214
2490
|
} : void 0]), 1032, [
|
|
2215
2491
|
"current-index",
|
|
@@ -2220,19 +2496,19 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
2220
2496
|
"title",
|
|
2221
2497
|
"total"
|
|
2222
2498
|
])) : o("", !0),
|
|
2223
|
-
|
|
2499
|
+
L.value ? (w(), a(dt, {
|
|
2224
2500
|
key: 2,
|
|
2225
|
-
"current-time":
|
|
2226
|
-
"current-time-label":
|
|
2227
|
-
duration:
|
|
2228
|
-
"duration-label":
|
|
2229
|
-
muted:
|
|
2230
|
-
progress:
|
|
2231
|
-
volume:
|
|
2232
|
-
"volume-control-layout":
|
|
2233
|
-
onSeekInput:
|
|
2234
|
-
onVolumeInput:
|
|
2235
|
-
onVolumeToggle:
|
|
2501
|
+
"current-time": M(h).activeMediaState.value.currentTime,
|
|
2502
|
+
"current-time-label": M(h).formatPlaybackTime(M(h).activeMediaState.value.currentTime),
|
|
2503
|
+
duration: M(h).activeMediaDuration.value,
|
|
2504
|
+
"duration-label": M(h).formatPlaybackTime(M(h).activeMediaDuration.value),
|
|
2505
|
+
muted: M(h).activeMediaState.value.muted,
|
|
2506
|
+
progress: M(h).activeMediaProgress.value,
|
|
2507
|
+
volume: M(h).activeMediaState.value.volume,
|
|
2508
|
+
"volume-control-layout": z.value,
|
|
2509
|
+
onSeekInput: M(h).onMediaSeekInput,
|
|
2510
|
+
onVolumeInput: M(h).onMediaVolumeInput,
|
|
2511
|
+
onVolumeToggle: M(h).onMediaVolumeToggle
|
|
2236
2512
|
}, null, 8, [
|
|
2237
2513
|
"current-time",
|
|
2238
2514
|
"current-time-label",
|
|
@@ -2246,36 +2522,36 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
2246
2522
|
"onVolumeInput",
|
|
2247
2523
|
"onVolumeToggle"
|
|
2248
2524
|
])) : o("", !0),
|
|
2249
|
-
|
|
2525
|
+
G.value ? (w(), s("div", {
|
|
2250
2526
|
key: 3,
|
|
2251
|
-
class:
|
|
2252
|
-
}, [
|
|
2527
|
+
class: v(["absolute left-1/2 z-[4] -translate-x-1/2", I.value])
|
|
2528
|
+
}, [ae.value ? O(e.$slots, "fullscreen-status", y(g({ key: 0 }, G.value))) : (w(), s("div", {
|
|
2253
2529
|
key: 1,
|
|
2254
2530
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
2255
|
-
class:
|
|
2256
|
-
},
|
|
2257
|
-
])) :
|
|
2531
|
+
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", G.value.kind === "end" ? "border-amber-300/35 text-amber-200" : G.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
2532
|
+
}, A(G.value.message), 3))], 2)) : o("", !0)
|
|
2533
|
+
])) : V.value ? (w(), s("div", Yn, [c("div", Xn, [c("span", Zn, [u(M(oe), {
|
|
2258
2534
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2259
2535
|
"aria-hidden": "true"
|
|
2260
|
-
})]), c("p",
|
|
2536
|
+
})]), c("p", Qn, A(H.value), 1)])])) : M(Z) && M(X) ? (w(), a(Cn, {
|
|
2261
2537
|
key: 2,
|
|
2262
|
-
message:
|
|
2263
|
-
mode:
|
|
2264
|
-
surface:
|
|
2538
|
+
message: M(X).message,
|
|
2539
|
+
mode: M(X).mode,
|
|
2540
|
+
surface: M(X).surface
|
|
2265
2541
|
}, {
|
|
2266
|
-
default:
|
|
2542
|
+
default: R(() => [M(de) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(X)))) : o("", !0)]),
|
|
2267
2543
|
_: 3
|
|
2268
2544
|
}, 8, [
|
|
2269
2545
|
"message",
|
|
2270
2546
|
"mode",
|
|
2271
2547
|
"surface"
|
|
2272
|
-
])) : o("", !0),
|
|
2548
|
+
])) : o("", !0), M(ue) && M(X) ? (w(), a(Cn, {
|
|
2273
2549
|
key: 3,
|
|
2274
|
-
message:
|
|
2275
|
-
mode:
|
|
2276
|
-
surface:
|
|
2550
|
+
message: M(X).message,
|
|
2551
|
+
mode: M(X).mode,
|
|
2552
|
+
surface: M(X).surface
|
|
2277
2553
|
}, {
|
|
2278
|
-
default:
|
|
2554
|
+
default: R(() => [M(de) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(X)))) : o("", !0)]),
|
|
2279
2555
|
_: 3
|
|
2280
2556
|
}, 8, [
|
|
2281
2557
|
"message",
|
|
@@ -2289,7 +2565,7 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
2289
2565
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2290
2566
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2291
2567
|
}, {
|
|
2292
|
-
default:
|
|
2568
|
+
default: R(() => [Y.value && U.value ? (w(), s("aside", $n, [c("div", er, [O(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
2293
2569
|
_: 3
|
|
2294
2570
|
})], 4),
|
|
2295
2571
|
u(r, {
|
|
@@ -2300,29 +2576,29 @@ var un = ["data-surface"], dn = ["data-surface"], fn = /* @__PURE__ */ d({
|
|
|
2300
2576
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2301
2577
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2302
2578
|
}, {
|
|
2303
|
-
default:
|
|
2579
|
+
default: R(() => [ie.value && U.value ? (w(), s("aside", tr, [c("div", nr, [O(e.$slots, "fullscreen-aside", y(p(U.value)))])])) : o("", !0)]),
|
|
2304
2580
|
_: 3
|
|
2305
2581
|
})
|
|
2306
2582
|
]));
|
|
2307
2583
|
}
|
|
2308
|
-
}),
|
|
2309
|
-
function
|
|
2584
|
+
}), or = 1, sr = .5;
|
|
2585
|
+
function cr(e) {
|
|
2310
2586
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2311
|
-
width:
|
|
2312
|
-
height:
|
|
2587
|
+
width: or,
|
|
2588
|
+
height: or,
|
|
2313
2589
|
source: "fallback"
|
|
2314
2590
|
};
|
|
2315
2591
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2316
|
-
if (
|
|
2317
|
-
let r =
|
|
2592
|
+
if (hr(t) && hr(n)) {
|
|
2593
|
+
let r = gr(e, t, n);
|
|
2318
2594
|
return {
|
|
2319
2595
|
width: r.width,
|
|
2320
2596
|
height: r.height,
|
|
2321
2597
|
source: "preview"
|
|
2322
2598
|
};
|
|
2323
2599
|
}
|
|
2324
|
-
if (
|
|
2325
|
-
let t =
|
|
2600
|
+
if (hr(e.width) && hr(e.height)) {
|
|
2601
|
+
let t = gr(e, e.width, e.height);
|
|
2326
2602
|
return {
|
|
2327
2603
|
width: t.width,
|
|
2328
2604
|
height: t.height,
|
|
@@ -2330,31 +2606,31 @@ function Zn(e) {
|
|
|
2330
2606
|
};
|
|
2331
2607
|
}
|
|
2332
2608
|
return {
|
|
2333
|
-
width:
|
|
2334
|
-
height:
|
|
2609
|
+
width: or,
|
|
2610
|
+
height: or,
|
|
2335
2611
|
source: "fallback"
|
|
2336
2612
|
};
|
|
2337
2613
|
}
|
|
2338
|
-
function
|
|
2614
|
+
function lr(e, t) {
|
|
2339
2615
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2340
2616
|
}
|
|
2341
|
-
function
|
|
2617
|
+
function ur(e, t, n, r = 0) {
|
|
2342
2618
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2343
2619
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2344
2620
|
return !a || a <= 0 ? n : a / t;
|
|
2345
2621
|
}
|
|
2346
|
-
function
|
|
2347
|
-
let n =
|
|
2622
|
+
function dr(e, t) {
|
|
2623
|
+
let n = cr(e);
|
|
2348
2624
|
return n.height / n.width * t;
|
|
2349
2625
|
}
|
|
2350
|
-
function
|
|
2626
|
+
function fr(e, t) {
|
|
2351
2627
|
let n = Array.from({ length: t.columnCount }, () => 0), r = Array(e.length), i = Array(e.length), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = 0;
|
|
2352
2628
|
for (let c = 0; c < e.length; c += 1) {
|
|
2353
2629
|
let l = e[c];
|
|
2354
2630
|
o.set($(l), c);
|
|
2355
2631
|
let u = 0;
|
|
2356
2632
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2357
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2633
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = dr(l, t.columnWidth);
|
|
2358
2634
|
r[c] = {
|
|
2359
2635
|
x: d,
|
|
2360
2636
|
y: f
|
|
@@ -2373,7 +2649,7 @@ function tr(e, t) {
|
|
|
2373
2649
|
indexById: o
|
|
2374
2650
|
};
|
|
2375
2651
|
}
|
|
2376
|
-
function
|
|
2652
|
+
function pr(e) {
|
|
2377
2653
|
if (e.itemCount <= 0) return [];
|
|
2378
2654
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2379
2655
|
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();
|
|
@@ -2383,7 +2659,7 @@ function nr(e) {
|
|
|
2383
2659
|
}
|
|
2384
2660
|
return Array.from(a).sort((e, t) => e - t);
|
|
2385
2661
|
}
|
|
2386
|
-
function
|
|
2662
|
+
function mr(e, t, n) {
|
|
2387
2663
|
let r = /* @__PURE__ */ new Map();
|
|
2388
2664
|
for (let i of e) {
|
|
2389
2665
|
let e = t.get($(i));
|
|
@@ -2393,11 +2669,11 @@ function rr(e, t, n) {
|
|
|
2393
2669
|
}
|
|
2394
2670
|
return r;
|
|
2395
2671
|
}
|
|
2396
|
-
function
|
|
2672
|
+
function hr(e) {
|
|
2397
2673
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2398
2674
|
}
|
|
2399
|
-
function
|
|
2400
|
-
return e.type !== "image" || n / t >=
|
|
2675
|
+
function gr(e, t, n) {
|
|
2676
|
+
return e.type !== "image" || n / t >= sr ? {
|
|
2401
2677
|
width: t,
|
|
2402
2678
|
height: n
|
|
2403
2679
|
} : {
|
|
@@ -2407,23 +2683,23 @@ function ar(e, t, n) {
|
|
|
2407
2683
|
}
|
|
2408
2684
|
//#endregion
|
|
2409
2685
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2410
|
-
var
|
|
2411
|
-
function
|
|
2686
|
+
var _r = 300, vr = 600, yr = 40, br = 300, xr = 400;
|
|
2687
|
+
function Sr(e, t) {
|
|
2412
2688
|
return t === "top" ? [...e].reverse() : e;
|
|
2413
2689
|
}
|
|
2414
|
-
function
|
|
2415
|
-
return e <= 0 ?
|
|
2690
|
+
function Cr(e) {
|
|
2691
|
+
return e <= 0 ? vr : vr + Math.min((e - 1) * yr, xr);
|
|
2416
2692
|
}
|
|
2417
|
-
function
|
|
2418
|
-
return
|
|
2693
|
+
function wr() {
|
|
2694
|
+
return br;
|
|
2419
2695
|
}
|
|
2420
|
-
function
|
|
2696
|
+
function Tr(e) {
|
|
2421
2697
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2422
2698
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2423
2699
|
}
|
|
2424
|
-
function
|
|
2425
|
-
let t =
|
|
2426
|
-
|
|
2700
|
+
function Er(e) {
|
|
2701
|
+
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()));
|
|
2702
|
+
I(e.visibleIndices, (i) => {
|
|
2427
2703
|
if (!i.length) return;
|
|
2428
2704
|
let o = [];
|
|
2429
2705
|
for (let n of i) {
|
|
@@ -2431,27 +2707,27 @@ function hr(e) {
|
|
|
2431
2707
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2432
2708
|
}
|
|
2433
2709
|
if (!o.length) return;
|
|
2434
|
-
let s =
|
|
2435
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
2436
|
-
r.value = c,
|
|
2710
|
+
let s = Sr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2711
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * yr, xr));
|
|
2712
|
+
r.value = c, Dr(() => {
|
|
2437
2713
|
let e = new Set(n.value);
|
|
2438
2714
|
for (let t of o) e.add(t);
|
|
2439
2715
|
n.value = e;
|
|
2440
|
-
}),
|
|
2716
|
+
}), Or(() => {
|
|
2441
2717
|
let e = new Set(t.value);
|
|
2442
2718
|
for (let t of o) e.delete(t);
|
|
2443
2719
|
t.value = e, S(() => {
|
|
2444
2720
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2445
2721
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2446
2722
|
n.value = e, r.value = t, a.value = i;
|
|
2447
|
-
},
|
|
2723
|
+
}, Cr(o.length));
|
|
2448
2724
|
});
|
|
2449
|
-
}, { flush: "post" }),
|
|
2725
|
+
}, { flush: "post" }), I(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2450
2726
|
if (!e.length || !o.value.size) return;
|
|
2451
2727
|
let t = new Set(e), n = null, r = null;
|
|
2452
2728
|
for (let e of o.value.keys()) t.has(e) && (n ||= new Map(o.value), r ||= new Set(s.value), n.delete(e), r.delete(e));
|
|
2453
2729
|
n && (o.value = n), r && (s.value = r);
|
|
2454
|
-
}),
|
|
2730
|
+
}), x(() => {
|
|
2455
2731
|
for (let e of f) clearTimeout(e);
|
|
2456
2732
|
f.clear();
|
|
2457
2733
|
});
|
|
@@ -2471,7 +2747,7 @@ function hr(e) {
|
|
|
2471
2747
|
let e = $(t.item);
|
|
2472
2748
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2473
2749
|
}
|
|
2474
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2750
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, Dr(() => {
|
|
2475
2751
|
let e = new Set(s.value);
|
|
2476
2752
|
for (let t of p) e.add(t);
|
|
2477
2753
|
s.value = e;
|
|
@@ -2479,9 +2755,9 @@ function hr(e) {
|
|
|
2479
2755
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2480
2756
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2481
2757
|
o.value = e, s.value = t;
|
|
2482
|
-
},
|
|
2758
|
+
}, br);
|
|
2483
2759
|
}
|
|
2484
|
-
function g(t, n, r =
|
|
2760
|
+
function g(t, n, r = _r) {
|
|
2485
2761
|
if (!t.size) return;
|
|
2486
2762
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2487
2763
|
for (let [r, o] of t.entries()) {
|
|
@@ -2500,8 +2776,8 @@ function hr(e) {
|
|
|
2500
2776
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2501
2777
|
let o = new Map(l.value);
|
|
2502
2778
|
for (let e of a) o.set(e, r);
|
|
2503
|
-
l.value = o,
|
|
2504
|
-
u.value = new Set(a),
|
|
2779
|
+
l.value = o, Dr(() => {
|
|
2780
|
+
u.value = new Set(a), Dr(() => {
|
|
2505
2781
|
c.value = /* @__PURE__ */ new Map();
|
|
2506
2782
|
});
|
|
2507
2783
|
}), S(() => {
|
|
@@ -2512,8 +2788,8 @@ function hr(e) {
|
|
|
2512
2788
|
}, r);
|
|
2513
2789
|
}
|
|
2514
2790
|
function _(e) {
|
|
2515
|
-
if (n.value.has(e)) return `transform ${
|
|
2516
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2791
|
+
if (n.value.has(e)) return `transform ${vr}ms ease-out`;
|
|
2792
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? _r}ms ease-out`;
|
|
2517
2793
|
}
|
|
2518
2794
|
function v(e) {
|
|
2519
2795
|
if (!n.value.has(e)) return;
|
|
@@ -2530,7 +2806,7 @@ function hr(e) {
|
|
|
2530
2806
|
} : {
|
|
2531
2807
|
dx: 0,
|
|
2532
2808
|
dy: 0
|
|
2533
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2809
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? Tr({
|
|
2534
2810
|
columnWidth: e.columnWidth.value,
|
|
2535
2811
|
direction: u,
|
|
2536
2812
|
itemHeight: o,
|
|
@@ -2539,19 +2815,19 @@ function hr(e) {
|
|
|
2539
2815
|
}) : i.y;
|
|
2540
2816
|
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
2541
2817
|
}
|
|
2542
|
-
function
|
|
2818
|
+
function b(t) {
|
|
2543
2819
|
let n = $(t), r = o.value.get(n);
|
|
2544
2820
|
if (!r) return {
|
|
2545
2821
|
opacity: "0",
|
|
2546
2822
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2547
|
-
transition: `opacity ${
|
|
2823
|
+
transition: `opacity ${br}ms ease-out, transform ${br}ms ease-out`
|
|
2548
2824
|
};
|
|
2549
2825
|
let i = s.value.has(n);
|
|
2550
2826
|
return {
|
|
2551
2827
|
height: `${r.height}px`,
|
|
2552
2828
|
opacity: i ? "0" : "1",
|
|
2553
2829
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2554
|
-
transition: `opacity ${
|
|
2830
|
+
transition: `opacity ${br}ms ease-out, transform ${br}ms ease-out`,
|
|
2555
2831
|
width: `${e.columnWidth.value}px`
|
|
2556
2832
|
};
|
|
2557
2833
|
}
|
|
@@ -2565,35 +2841,35 @@ function hr(e) {
|
|
|
2565
2841
|
getCardTransform: y,
|
|
2566
2842
|
getCardTransition: _,
|
|
2567
2843
|
getCardTransitionDelay: v,
|
|
2568
|
-
getLeavingCardStyle:
|
|
2844
|
+
getLeavingCardStyle: b,
|
|
2569
2845
|
leavingItems: p,
|
|
2570
2846
|
markEnter: m,
|
|
2571
2847
|
markLeave: h,
|
|
2572
2848
|
playFlipMoveAnimation: g
|
|
2573
2849
|
};
|
|
2574
2850
|
}
|
|
2575
|
-
function
|
|
2851
|
+
function Dr(e) {
|
|
2576
2852
|
if (typeof requestAnimationFrame == "function") {
|
|
2577
2853
|
requestAnimationFrame(() => e());
|
|
2578
2854
|
return;
|
|
2579
2855
|
}
|
|
2580
2856
|
setTimeout(e, 0);
|
|
2581
2857
|
}
|
|
2582
|
-
function
|
|
2583
|
-
|
|
2858
|
+
function Or(e) {
|
|
2859
|
+
Dr(() => Dr(e));
|
|
2584
2860
|
}
|
|
2585
2861
|
//#endregion
|
|
2586
2862
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2587
|
-
function
|
|
2863
|
+
function kr(e, t) {
|
|
2588
2864
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2589
2865
|
}
|
|
2590
|
-
function
|
|
2866
|
+
function Ar(e, t, n) {
|
|
2591
2867
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2592
2868
|
}
|
|
2593
|
-
function
|
|
2869
|
+
function jr(e, t, n, r) {
|
|
2594
2870
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2595
2871
|
}
|
|
2596
|
-
function
|
|
2872
|
+
function Mr(e, t) {
|
|
2597
2873
|
return {
|
|
2598
2874
|
height: `${e}px`,
|
|
2599
2875
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2601,10 +2877,10 @@ function xr(e, t) {
|
|
|
2601
2877
|
}
|
|
2602
2878
|
//#endregion
|
|
2603
2879
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2604
|
-
var
|
|
2605
|
-
function
|
|
2606
|
-
let t =
|
|
2607
|
-
|
|
2880
|
+
var Nr = 250, Pr = 1e3;
|
|
2881
|
+
function Fr(e) {
|
|
2882
|
+
let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
|
|
2883
|
+
x(() => {
|
|
2608
2884
|
y();
|
|
2609
2885
|
});
|
|
2610
2886
|
function l() {
|
|
@@ -2616,9 +2892,9 @@ function wr(e) {
|
|
|
2616
2892
|
!r && n.value && m();
|
|
2617
2893
|
}
|
|
2618
2894
|
function u(t) {
|
|
2619
|
-
if (!
|
|
2895
|
+
if (!b(t) || !e.isAtBoundary()) return;
|
|
2620
2896
|
let n = Date.now();
|
|
2621
|
-
n < s || (s = n +
|
|
2897
|
+
n < s || (s = n + Nr, m());
|
|
2622
2898
|
}
|
|
2623
2899
|
function d() {
|
|
2624
2900
|
if (!g()) return;
|
|
@@ -2652,7 +2928,7 @@ function wr(e) {
|
|
|
2652
2928
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2653
2929
|
}
|
|
2654
2930
|
function _() {
|
|
2655
|
-
o.value = !1, v(
|
|
2931
|
+
o.value = !1, v(Pr);
|
|
2656
2932
|
}
|
|
2657
2933
|
function v(e) {
|
|
2658
2934
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -2662,7 +2938,7 @@ function wr(e) {
|
|
|
2662
2938
|
function y() {
|
|
2663
2939
|
c &&= (clearTimeout(c), null);
|
|
2664
2940
|
}
|
|
2665
|
-
function
|
|
2941
|
+
function b(t) {
|
|
2666
2942
|
return e.direction === "top" ? t.deltaY < 0 : t.deltaY > 0;
|
|
2667
2943
|
}
|
|
2668
2944
|
return {
|
|
@@ -2675,81 +2951,81 @@ function wr(e) {
|
|
|
2675
2951
|
}
|
|
2676
2952
|
//#endregion
|
|
2677
2953
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
2678
|
-
var
|
|
2679
|
-
function
|
|
2680
|
-
let t =
|
|
2954
|
+
var Ir = 600, Lr = 24, Rr = 16, zr = 300, Br = 200, Vr = 200, Hr = Lr + Rr, Ur = 200, Wr = 300, Gr = 24, Kr = 48, qr = 500, Jr = 1e3;
|
|
2955
|
+
function Yr(e) {
|
|
2956
|
+
let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || zr), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = D(null), p = D(!1), m = i(() => Math.max(zr, a.value - Lr * 2)), h = i(() => lr(m.value, zr)), g = i(() => ur(m.value, h.value, zr, Rr)), v = i(() => Xr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => pr({
|
|
2681
2957
|
itemCount: e.items.value.length,
|
|
2682
2958
|
viewportHeight: r.value,
|
|
2683
2959
|
scrollTop: n.value,
|
|
2684
|
-
overscanPx:
|
|
2685
|
-
bucketPx:
|
|
2960
|
+
overscanPx: Br,
|
|
2961
|
+
bucketPx: Ir,
|
|
2686
2962
|
buckets: c.value
|
|
2687
|
-
})),
|
|
2963
|
+
})), b = i(() => y.value.map((t) => ({
|
|
2688
2964
|
item: e.items.value[t],
|
|
2689
2965
|
index: t
|
|
2690
2966
|
}))), C = i(() => {
|
|
2691
|
-
let e = l.value +
|
|
2692
|
-
return Math.max(e, t, r.value) +
|
|
2693
|
-
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value),
|
|
2967
|
+
let e = l.value + Lr * 2, t = d.value ?? 0;
|
|
2968
|
+
return Math.max(e, t, r.value) + Ur;
|
|
2969
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => Qr({
|
|
2694
2970
|
active: e.active.value,
|
|
2695
|
-
maxScrollTop:
|
|
2971
|
+
maxScrollTop: se(),
|
|
2696
2972
|
progressDistancePx: n.value,
|
|
2697
|
-
thresholdPx:
|
|
2973
|
+
thresholdPx: Vr,
|
|
2698
2974
|
triggerEnabled: w.value
|
|
2699
|
-
})),
|
|
2975
|
+
})), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), ee = i(() => Zr({
|
|
2700
2976
|
active: e.active.value,
|
|
2701
|
-
maxScrollTop:
|
|
2977
|
+
maxScrollTop: se(),
|
|
2702
2978
|
progressDistancePx: n.value,
|
|
2703
|
-
thresholdPx:
|
|
2979
|
+
thresholdPx: Hr,
|
|
2704
2980
|
triggerEnabled: e.hasPreviousPage.value
|
|
2705
|
-
})),
|
|
2706
|
-
if (!
|
|
2707
|
-
let e = r.value / C.value *
|
|
2708
|
-
return Math.min(
|
|
2709
|
-
}),
|
|
2710
|
-
if (!
|
|
2981
|
+
})), O = i(() => Math.max(0, r.value - Gr * 2)), k = i(() => C.value > r.value + 1 && O.value > 0), A = i(() => {
|
|
2982
|
+
if (!k.value) return 0;
|
|
2983
|
+
let e = r.value / C.value * O.value;
|
|
2984
|
+
return Math.min(O.value, Math.max(Kr, e));
|
|
2985
|
+
}), j = i(() => {
|
|
2986
|
+
if (!k.value) return Gr;
|
|
2711
2987
|
let e = Math.max(0, C.value - r.value);
|
|
2712
|
-
return
|
|
2713
|
-
}),
|
|
2988
|
+
return Gr + Math.max(0, O.value - A.value) * (e > 0 ? Xr(n.value / e, 0, 1) : 0);
|
|
2989
|
+
}), M = Er({
|
|
2714
2990
|
items: e.items,
|
|
2715
2991
|
visibleIndices: y,
|
|
2716
2992
|
positions: o,
|
|
2717
2993
|
heights: s,
|
|
2718
2994
|
indexById: u,
|
|
2719
|
-
columnWidth:
|
|
2995
|
+
columnWidth: g,
|
|
2720
2996
|
scrollTop: n,
|
|
2721
2997
|
viewportHeight: r
|
|
2722
|
-
}),
|
|
2998
|
+
}), N = Fr({
|
|
2723
2999
|
direction: "top",
|
|
2724
3000
|
getAnimationLockMs(e) {
|
|
2725
|
-
return Math.max(
|
|
3001
|
+
return Math.max(qr, Cr(e)) + Jr;
|
|
2726
3002
|
},
|
|
2727
3003
|
hasPage: e.hasPreviousPage,
|
|
2728
3004
|
interactionLocked: p,
|
|
2729
3005
|
isAtBoundary() {
|
|
2730
|
-
return n.value <=
|
|
3006
|
+
return n.value <= Hr;
|
|
2731
3007
|
},
|
|
2732
3008
|
loading: e.loading,
|
|
2733
3009
|
requestPage: e.requestPreviousPage
|
|
2734
|
-
}),
|
|
3010
|
+
}), P = Fr({
|
|
2735
3011
|
direction: "bottom",
|
|
2736
3012
|
getAnimationLockMs(e) {
|
|
2737
|
-
return
|
|
3013
|
+
return Cr(e) + Jr;
|
|
2738
3014
|
},
|
|
2739
3015
|
hasPage: w,
|
|
2740
3016
|
interactionLocked: p,
|
|
2741
3017
|
isAtBoundary() {
|
|
2742
|
-
return
|
|
3018
|
+
return oe() <= Vr;
|
|
2743
3019
|
},
|
|
2744
3020
|
loading: e.loading,
|
|
2745
3021
|
requestPage: e.requestNextPage
|
|
2746
|
-
}),
|
|
2747
|
-
|
|
3022
|
+
}), F = null, L = 0, R = null, z = null, te = !1;
|
|
3023
|
+
I([
|
|
2748
3024
|
() => e.items.value,
|
|
2749
3025
|
h,
|
|
2750
|
-
|
|
3026
|
+
g
|
|
2751
3027
|
], async ([t], [r = []]) => {
|
|
2752
|
-
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c =
|
|
3028
|
+
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = mr(a, u.value, o.value), l = X(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
|
|
2753
3029
|
let t = $(e);
|
|
2754
3030
|
if (f.has(t)) return [];
|
|
2755
3031
|
let n = c.get(t), r = l.get(t);
|
|
@@ -2758,16 +3034,16 @@ function Rr(e) {
|
|
|
2758
3034
|
item: e,
|
|
2759
3035
|
position: n
|
|
2760
3036
|
}];
|
|
2761
|
-
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0],
|
|
2762
|
-
y &&
|
|
2763
|
-
}, { immediate: !0 }),
|
|
3037
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], g = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Lr + Rr, b = h && n.value > Lr + Rr ? t[v.value] : null, x = b ? $(b) : null;
|
|
3038
|
+
y && K(wr() + Jr), g && G(), B(), m.length > 0 && M.markLeave(m), p.length > 0 && (M.markEnter(p, h ? "top" : "bottom"), h ? N.onItemsMutated(p.length) : P.onItemsMutated(p.length)), M.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? qr : void 0), x ? (await _(), ne(x, c)) : e.active.value && s.length > 0 && re();
|
|
3039
|
+
}, { immediate: !0 }), I([
|
|
2764
3040
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
2765
3041
|
h,
|
|
2766
|
-
|
|
3042
|
+
g,
|
|
2767
3043
|
r
|
|
2768
3044
|
], ([t]) => {
|
|
2769
|
-
|
|
2770
|
-
}, { immediate: !0 }),
|
|
3045
|
+
de(), t.length && (d.value = le([...e.items.value, ...e.pendingAppendItems.value]), ue());
|
|
3046
|
+
}, { immediate: !0 }), I(() => e.active.value, async (e, i) => {
|
|
2771
3047
|
let a = t.value;
|
|
2772
3048
|
if (!a) return;
|
|
2773
3049
|
if (!e) {
|
|
@@ -2775,76 +3051,76 @@ function Rr(e) {
|
|
|
2775
3051
|
return;
|
|
2776
3052
|
}
|
|
2777
3053
|
if (i !== !1 || f.value == null) return;
|
|
2778
|
-
await
|
|
2779
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
2780
|
-
a.scrollTop = s, n.value = s,
|
|
2781
|
-
}),
|
|
2782
|
-
!t && !e.pendingAppendItems.value.length && !
|
|
2783
|
-
}),
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
}), t.value &&
|
|
2787
|
-
}),
|
|
2788
|
-
|
|
3054
|
+
await _();
|
|
3055
|
+
let o = Math.max(0, C.value - r.value), s = Xr(f.value, 0, o);
|
|
3056
|
+
a.scrollTop = s, n.value = s, N.syncBoundary(), P.syncBoundary();
|
|
3057
|
+
}), I(() => e.loading.value, async (t) => {
|
|
3058
|
+
!t && !e.pendingAppendItems.value.length && !R && !te && (d.value = null), N.onLoadingChange(t), P.onLoadingChange(t), await _();
|
|
3059
|
+
}), S(async () => {
|
|
3060
|
+
Y(), await _(), v.value > 0 ? W(v.value, "center") : q(), N.syncBoundary(), P.syncBoundary(), typeof ResizeObserver < "u" ? (F = new ResizeObserver(() => {
|
|
3061
|
+
Y();
|
|
3062
|
+
}), t.value && F.observe(t.value)) : window.addEventListener("resize", Y);
|
|
3063
|
+
}), x(() => {
|
|
3064
|
+
F?.disconnect(), F = null, window.removeEventListener("resize", Y), de(), Z(), L &&= (cancelAnimationFrame(L), 0);
|
|
2789
3065
|
});
|
|
2790
|
-
function
|
|
2791
|
-
let t =
|
|
3066
|
+
function B() {
|
|
3067
|
+
let t = fr(e.items.value, {
|
|
2792
3068
|
columnCount: h.value,
|
|
2793
|
-
columnWidth:
|
|
2794
|
-
gapX:
|
|
2795
|
-
gapY:
|
|
2796
|
-
bucketPx:
|
|
3069
|
+
columnWidth: g.value,
|
|
3070
|
+
gapX: Rr,
|
|
3071
|
+
gapY: Rr,
|
|
3072
|
+
bucketPx: Ir
|
|
2797
3073
|
});
|
|
2798
3074
|
o.value = t.positions.map((e) => ({
|
|
2799
|
-
x: e.x +
|
|
2800
|
-
y: e.y +
|
|
3075
|
+
x: e.x + Lr,
|
|
3076
|
+
y: e.y + Lr
|
|
2801
3077
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
2802
3078
|
}
|
|
2803
|
-
function
|
|
2804
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
2805
|
-
|
|
3079
|
+
function V() {
|
|
3080
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = ie(), N.syncBoundary(), P.syncBoundary(), J(), !re() && (L ||= requestAnimationFrame(() => {
|
|
3081
|
+
L = 0, q();
|
|
2806
3082
|
})));
|
|
2807
3083
|
}
|
|
2808
|
-
function
|
|
2809
|
-
e.active.value && (
|
|
3084
|
+
function H(t) {
|
|
3085
|
+
e.active.value && (N.onWheel(t), P.onWheel(t), J());
|
|
2810
3086
|
}
|
|
2811
|
-
function
|
|
3087
|
+
function U(t) {
|
|
2812
3088
|
let n = e.items.value[t], r = n ? $(n) : "";
|
|
2813
3089
|
return {
|
|
2814
|
-
height: `${s.value[t] ??
|
|
2815
|
-
width: `${
|
|
2816
|
-
transition: r ?
|
|
2817
|
-
transitionDelay: r ?
|
|
2818
|
-
transform:
|
|
3090
|
+
height: `${s.value[t] ?? g.value}px`,
|
|
3091
|
+
width: `${g.value}px`,
|
|
3092
|
+
transition: r ? M.getCardTransition(r) : void 0,
|
|
3093
|
+
transitionDelay: r ? M.getCardTransitionDelay(r) : void 0,
|
|
3094
|
+
transform: M.getCardTransform(t)
|
|
2819
3095
|
};
|
|
2820
3096
|
}
|
|
2821
|
-
function
|
|
3097
|
+
function W(e, i) {
|
|
2822
3098
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
2823
3099
|
if (!a || !c || !l) return;
|
|
2824
3100
|
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
2825
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
3101
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Lr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Lr), a.scrollTop = Xr(u, 0, d), n.value = a.scrollTop, q();
|
|
2826
3102
|
}
|
|
2827
|
-
function
|
|
3103
|
+
function ne(e, r) {
|
|
2828
3104
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
2829
3105
|
if (!i || !a || !c) return;
|
|
2830
3106
|
let l = c.y - a.y;
|
|
2831
3107
|
i.scrollTop += l, n.value = i.scrollTop;
|
|
2832
3108
|
}
|
|
2833
|
-
function
|
|
3109
|
+
function G() {
|
|
2834
3110
|
let e = t.value;
|
|
2835
3111
|
if (!e) {
|
|
2836
3112
|
n.value = 0;
|
|
2837
3113
|
return;
|
|
2838
3114
|
}
|
|
2839
|
-
e.scrollTop = 0, n.value = 0,
|
|
3115
|
+
e.scrollTop = 0, n.value = 0, N.syncBoundary(), P.syncBoundary();
|
|
2840
3116
|
}
|
|
2841
|
-
function
|
|
2842
|
-
|
|
2843
|
-
|
|
3117
|
+
function K(e) {
|
|
3118
|
+
Z(), p.value = !0, z = setTimeout(() => {
|
|
3119
|
+
z = null, p.value = !1;
|
|
2844
3120
|
}, Math.max(0, e));
|
|
2845
3121
|
}
|
|
2846
|
-
function
|
|
2847
|
-
if (!y.value.length ||
|
|
3122
|
+
function q() {
|
|
3123
|
+
if (!y.value.length || re()) return;
|
|
2848
3124
|
let t = n.value + r.value / 2, i = v.value, a = Infinity;
|
|
2849
3125
|
for (let e of y.value) {
|
|
2850
3126
|
let n = o.value[e], r = s.value[e];
|
|
@@ -2854,42 +3130,42 @@ function Rr(e) {
|
|
|
2854
3130
|
}
|
|
2855
3131
|
e.setActiveIndex(i);
|
|
2856
3132
|
}
|
|
2857
|
-
function
|
|
2858
|
-
let t = n.value <=
|
|
3133
|
+
function re() {
|
|
3134
|
+
let t = n.value <= Hr, r = oe() <= Vr;
|
|
2859
3135
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2860
3136
|
}
|
|
2861
|
-
function
|
|
2862
|
-
|
|
2863
|
-
}
|
|
2864
|
-
function X() {
|
|
2865
|
-
r.value = re(), a.value = ie();
|
|
3137
|
+
function J() {
|
|
3138
|
+
N.maybeRequestPage(), P.maybeRequestPage();
|
|
2866
3139
|
}
|
|
2867
|
-
function
|
|
2868
|
-
|
|
3140
|
+
function Y() {
|
|
3141
|
+
r.value = ie(), a.value = ae();
|
|
2869
3142
|
}
|
|
2870
3143
|
function ie() {
|
|
2871
|
-
return
|
|
3144
|
+
return kr(t.value, r.value);
|
|
2872
3145
|
}
|
|
2873
3146
|
function ae() {
|
|
2874
|
-
return
|
|
3147
|
+
return Ar(t.value, a.value, zr);
|
|
2875
3148
|
}
|
|
2876
3149
|
function oe() {
|
|
3150
|
+
return jr(t.value, n.value, r.value, C.value);
|
|
3151
|
+
}
|
|
3152
|
+
function se() {
|
|
2877
3153
|
let e = Math.max(t.value?.scrollHeight ?? 0, C.value);
|
|
2878
3154
|
return Math.max(0, e - r.value);
|
|
2879
3155
|
}
|
|
2880
|
-
function
|
|
2881
|
-
return
|
|
3156
|
+
function ce() {
|
|
3157
|
+
return Mr(A.value, j.value);
|
|
2882
3158
|
}
|
|
2883
|
-
function
|
|
2884
|
-
return e.length ?
|
|
3159
|
+
function le(e) {
|
|
3160
|
+
return e.length ? fr(e, {
|
|
2885
3161
|
columnCount: h.value,
|
|
2886
|
-
columnWidth:
|
|
2887
|
-
gapX:
|
|
2888
|
-
gapY:
|
|
2889
|
-
bucketPx:
|
|
2890
|
-
}).contentHeight +
|
|
3162
|
+
columnWidth: g.value,
|
|
3163
|
+
gapX: Rr,
|
|
3164
|
+
gapY: Rr,
|
|
3165
|
+
bucketPx: Ir
|
|
3166
|
+
}).contentHeight + Lr * 2 : 0;
|
|
2891
3167
|
}
|
|
2892
|
-
function
|
|
3168
|
+
function X(e) {
|
|
2893
3169
|
let t = /* @__PURE__ */ new Map();
|
|
2894
3170
|
for (let n of e) {
|
|
2895
3171
|
let e = $(n), r = u.value.get(e);
|
|
@@ -2899,64 +3175,64 @@ function Rr(e) {
|
|
|
2899
3175
|
}
|
|
2900
3176
|
return t;
|
|
2901
3177
|
}
|
|
2902
|
-
function
|
|
3178
|
+
function ue() {
|
|
2903
3179
|
let t = e.commitPendingAppend.value;
|
|
2904
|
-
typeof t == "function" && (
|
|
2905
|
-
|
|
3180
|
+
typeof t == "function" && (R = setTimeout(async () => {
|
|
3181
|
+
R = null, te = !0;
|
|
2906
3182
|
try {
|
|
2907
3183
|
if (!e.pendingAppendItems.value.length) return;
|
|
2908
|
-
await t(), await
|
|
3184
|
+
await t(), await _(), await _();
|
|
2909
3185
|
} finally {
|
|
2910
|
-
d.value = null,
|
|
3186
|
+
d.value = null, te = !1;
|
|
2911
3187
|
}
|
|
2912
|
-
},
|
|
2913
|
-
}
|
|
2914
|
-
function ue() {
|
|
2915
|
-
z &&= (clearTimeout(z), null);
|
|
3188
|
+
}, Wr));
|
|
2916
3189
|
}
|
|
2917
3190
|
function de() {
|
|
2918
|
-
|
|
3191
|
+
R &&= (clearTimeout(R), null);
|
|
3192
|
+
}
|
|
3193
|
+
function Z() {
|
|
3194
|
+
z && (clearTimeout(z), z = null, p.value = !1);
|
|
2919
3195
|
}
|
|
2920
3196
|
return {
|
|
2921
|
-
columnWidth:
|
|
3197
|
+
columnWidth: g,
|
|
2922
3198
|
containerHeight: C,
|
|
2923
|
-
getCardStyle:
|
|
2924
|
-
getLeavingCardStyle:
|
|
2925
|
-
getScrollbarThumbStyle:
|
|
2926
|
-
leavingItems:
|
|
2927
|
-
nextBoundaryLoadProgress:
|
|
2928
|
-
onScroll:
|
|
2929
|
-
onWheel:
|
|
2930
|
-
paginationLabel:
|
|
2931
|
-
previousBoundaryLoadProgress:
|
|
2932
|
-
renderedItems:
|
|
3199
|
+
getCardStyle: U,
|
|
3200
|
+
getLeavingCardStyle: M.getLeavingCardStyle,
|
|
3201
|
+
getScrollbarThumbStyle: ce,
|
|
3202
|
+
leavingItems: M.leavingItems,
|
|
3203
|
+
nextBoundaryLoadProgress: T,
|
|
3204
|
+
onScroll: V,
|
|
3205
|
+
onWheel: H,
|
|
3206
|
+
paginationLabel: E,
|
|
3207
|
+
previousBoundaryLoadProgress: ee,
|
|
3208
|
+
renderedItems: b,
|
|
2933
3209
|
resolvedActiveIndex: v,
|
|
2934
|
-
scrollToIndex:
|
|
2935
|
-
showScrollbar:
|
|
3210
|
+
scrollToIndex: W,
|
|
3211
|
+
showScrollbar: k,
|
|
2936
3212
|
scrollViewportRef: t
|
|
2937
3213
|
};
|
|
2938
3214
|
}
|
|
2939
|
-
function
|
|
3215
|
+
function Xr(e, t, n) {
|
|
2940
3216
|
return Math.min(Math.max(e, t), n);
|
|
2941
3217
|
}
|
|
2942
|
-
function
|
|
3218
|
+
function Zr(e) {
|
|
2943
3219
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
2944
3220
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
2945
|
-
return t <= 0 ? 1 :
|
|
3221
|
+
return t <= 0 ? 1 : Xr(1 - (e.progressDistancePx - e.thresholdPx) / t, 0, 1);
|
|
2946
3222
|
}
|
|
2947
|
-
function
|
|
3223
|
+
function Qr(e) {
|
|
2948
3224
|
if (!e.active || !e.triggerEnabled) return 0;
|
|
2949
3225
|
let t = Math.max(0, e.maxScrollTop - e.thresholdPx);
|
|
2950
|
-
return t <= 0 ? 1 :
|
|
3226
|
+
return t <= 0 ? 1 : Xr(e.progressDistancePx / t, 0, 1);
|
|
2951
3227
|
}
|
|
2952
3228
|
//#endregion
|
|
2953
3229
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
2954
|
-
function
|
|
3230
|
+
function $r(e) {
|
|
2955
3231
|
if (e) try {
|
|
2956
3232
|
e.removeAttribute("src"), e.src = "";
|
|
2957
3233
|
} catch {}
|
|
2958
3234
|
}
|
|
2959
|
-
function
|
|
3235
|
+
function ei(e) {
|
|
2960
3236
|
if (e) {
|
|
2961
3237
|
try {
|
|
2962
3238
|
e.currentTime = 0;
|
|
@@ -2967,12 +3243,12 @@ function Ur(e) {
|
|
|
2967
3243
|
} catch {}
|
|
2968
3244
|
}
|
|
2969
3245
|
}
|
|
2970
|
-
function
|
|
3246
|
+
function ti(e, t) {
|
|
2971
3247
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
2972
3248
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
2973
3249
|
return e.bottom > 0 && e.top < n;
|
|
2974
3250
|
}
|
|
2975
|
-
function
|
|
3251
|
+
function ni(e) {
|
|
2976
3252
|
if (!e) return null;
|
|
2977
3253
|
try {
|
|
2978
3254
|
return new URL(e, window.location.href).href;
|
|
@@ -2982,9 +3258,9 @@ function Gr(e) {
|
|
|
2982
3258
|
}
|
|
2983
3259
|
//#endregion
|
|
2984
3260
|
//#region src/components/viewer-core/listPreview.ts
|
|
2985
|
-
var
|
|
2986
|
-
function
|
|
2987
|
-
let t =
|
|
3261
|
+
var ri = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ii = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, ai = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
|
|
3262
|
+
function oi(e) {
|
|
3263
|
+
let t = si(e), n = t?.url, r = cr(e), i = e.title?.trim() || Et(e.type);
|
|
2988
3264
|
return t?.mediaType === "video" && typeof n == "string" ? {
|
|
2989
3265
|
kind: "video",
|
|
2990
3266
|
url: n,
|
|
@@ -3003,13 +3279,13 @@ function Yr(e) {
|
|
|
3003
3279
|
width: r.width,
|
|
3004
3280
|
height: r.height,
|
|
3005
3281
|
label: i
|
|
3006
|
-
} : typeof n == "string" &&
|
|
3282
|
+
} : typeof n == "string" && li(e, n) ? {
|
|
3007
3283
|
kind: "video",
|
|
3008
3284
|
url: n,
|
|
3009
3285
|
width: r.width,
|
|
3010
3286
|
height: r.height,
|
|
3011
3287
|
label: i
|
|
3012
|
-
} : typeof n == "string" &&
|
|
3288
|
+
} : typeof n == "string" && ci(e, n) ? {
|
|
3013
3289
|
kind: "image",
|
|
3014
3290
|
url: n,
|
|
3015
3291
|
width: r.width,
|
|
@@ -3023,99 +3299,31 @@ function Yr(e) {
|
|
|
3023
3299
|
label: i
|
|
3024
3300
|
};
|
|
3025
3301
|
}
|
|
3026
|
-
function
|
|
3302
|
+
function si(e) {
|
|
3027
3303
|
return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
|
|
3028
3304
|
}
|
|
3029
|
-
function
|
|
3030
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
3305
|
+
function ci(e, t) {
|
|
3306
|
+
return e.type !== "image" || typeof t != "string" ? !1 : ri.test(t) || ui(t);
|
|
3031
3307
|
}
|
|
3032
|
-
function
|
|
3033
|
-
return e.type !== "video" || typeof t != "string" ? !1 :
|
|
3308
|
+
function li(e, t) {
|
|
3309
|
+
return e.type !== "video" || typeof t != "string" ? !1 : ii.test(t) || di(t);
|
|
3034
3310
|
}
|
|
3035
|
-
function
|
|
3311
|
+
function ui(e) {
|
|
3036
3312
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
3037
3313
|
}
|
|
3038
|
-
function
|
|
3039
|
-
return
|
|
3040
|
-
}
|
|
3041
|
-
//#endregion
|
|
3042
|
-
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
3043
|
-
var ti = {
|
|
3044
|
-
maxGlobal: 10,
|
|
3045
|
-
maxPerDomain: 4,
|
|
3046
|
-
maxVideoPerDomain: 2
|
|
3047
|
-
};
|
|
3048
|
-
function ni(e = ti) {
|
|
3049
|
-
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
3050
|
-
function i(e) {
|
|
3051
|
-
let i = {
|
|
3052
|
-
...e,
|
|
3053
|
-
domain: ai(e.url),
|
|
3054
|
-
enqueuedAt: r,
|
|
3055
|
-
id: `vibe-asset-load-${r += 1}`
|
|
3056
|
-
};
|
|
3057
|
-
return n.set(i.id, i), a(), {
|
|
3058
|
-
cancel() {
|
|
3059
|
-
(n.delete(i.id) || t.delete(i.id)) && a();
|
|
3060
|
-
},
|
|
3061
|
-
refresh() {
|
|
3062
|
-
a();
|
|
3063
|
-
},
|
|
3064
|
-
release() {
|
|
3065
|
-
(t.delete(i.id) || n.delete(i.id)) && a();
|
|
3066
|
-
}
|
|
3067
|
-
};
|
|
3068
|
-
}
|
|
3069
|
-
function a() {
|
|
3070
|
-
if (n.size === 0) return;
|
|
3071
|
-
let r = [...n.values()].sort((e, t) => {
|
|
3072
|
-
let n = ii(e) - ii(t);
|
|
3073
|
-
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
3074
|
-
});
|
|
3075
|
-
for (let i of r) {
|
|
3076
|
-
if (t.size >= e.maxGlobal) return;
|
|
3077
|
-
if (o(i)) {
|
|
3078
|
-
n.delete(i.id), t.set(i.id, i);
|
|
3079
|
-
try {
|
|
3080
|
-
i.onGrant();
|
|
3081
|
-
} catch {
|
|
3082
|
-
t.delete(i.id);
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
function o(n) {
|
|
3088
|
-
let r = [...t.values()].filter((e) => e.domain === n.domain);
|
|
3089
|
-
return !(r.length >= e.maxPerDomain || n.assetType === "video" && r.filter((e) => e.assetType === "video").length >= e.maxVideoPerDomain);
|
|
3090
|
-
}
|
|
3091
|
-
return { request: i };
|
|
3092
|
-
}
|
|
3093
|
-
var ri = ni();
|
|
3094
|
-
function ii(e) {
|
|
3095
|
-
try {
|
|
3096
|
-
let t = e.getPriority();
|
|
3097
|
-
return Number.isFinite(t) ? t : Infinity;
|
|
3098
|
-
} catch {
|
|
3099
|
-
return Infinity;
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3102
|
-
function ai(e) {
|
|
3103
|
-
try {
|
|
3104
|
-
return new URL(e).hostname || "local";
|
|
3105
|
-
} catch {
|
|
3106
|
-
return "local";
|
|
3107
|
-
}
|
|
3314
|
+
function di(e) {
|
|
3315
|
+
return ai.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
|
|
3108
3316
|
}
|
|
3109
3317
|
//#endregion
|
|
3110
3318
|
//#region src/components/viewer-core/useListCardHealthCheck.ts
|
|
3111
|
-
function
|
|
3112
|
-
let t =
|
|
3113
|
-
let t = typeof e.item.value.healthCheck?.url == "string" ?
|
|
3319
|
+
function fi(e) {
|
|
3320
|
+
let t = D(null), n = i(() => {
|
|
3321
|
+
let t = typeof e.item.value.healthCheck?.url == "string" ? ni(e.item.value.healthCheck.url) : null;
|
|
3114
3322
|
return !t || t === e.attachedAssetUrl.value ? null : t;
|
|
3115
3323
|
}), r = null, a = 0, o = /* @__PURE__ */ new Map();
|
|
3116
|
-
|
|
3324
|
+
I(n, (e, n) => {
|
|
3117
3325
|
e !== n && (t.value = null, l(), a += 1);
|
|
3118
|
-
}),
|
|
3326
|
+
}), I([
|
|
3119
3327
|
n,
|
|
3120
3328
|
e.surfaceActive,
|
|
3121
3329
|
e.isInView,
|
|
@@ -3142,7 +3350,7 @@ function oi(e) {
|
|
|
3142
3350
|
r.refresh();
|
|
3143
3351
|
return;
|
|
3144
3352
|
}
|
|
3145
|
-
r =
|
|
3353
|
+
r = kt.request({
|
|
3146
3354
|
assetType: "probe",
|
|
3147
3355
|
getPriority: e.getPriority,
|
|
3148
3356
|
onGrant() {
|
|
@@ -3152,7 +3360,7 @@ function oi(e) {
|
|
|
3152
3360
|
return;
|
|
3153
3361
|
}
|
|
3154
3362
|
let i = ++a;
|
|
3155
|
-
|
|
3363
|
+
nn(r).then((s) => {
|
|
3156
3364
|
if (!(i !== a || n.value !== r)) {
|
|
3157
3365
|
if (o.set(r, s ?? null), !s) {
|
|
3158
3366
|
t.value = null;
|
|
@@ -3188,14 +3396,14 @@ function oi(e) {
|
|
|
3188
3396
|
}
|
|
3189
3397
|
//#endregion
|
|
3190
3398
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
3191
|
-
var
|
|
3399
|
+
var pi = ["aria-label"], mi = {
|
|
3192
3400
|
key: 0,
|
|
3193
3401
|
"data-testid": "vibe-list-card-spinner",
|
|
3194
3402
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
3195
|
-
},
|
|
3403
|
+
}, hi = { 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]" }, gi = ["src", "alt"], _i = ["src"], vi = ["data-kind"], yi = { class: "grid justify-items-center gap-3 px-4 text-center" }, bi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, xi = {
|
|
3196
3404
|
key: 4,
|
|
3197
3405
|
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))]"
|
|
3198
|
-
},
|
|
3406
|
+
}, Si = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ci = { class: "pointer-events-none absolute inset-0 z-[3]" }, wi = /* @__PURE__ */ d({
|
|
3199
3407
|
__name: "ListCard",
|
|
3200
3408
|
props: {
|
|
3201
3409
|
active: {
|
|
@@ -3219,106 +3427,106 @@ var si = ["aria-label"], ci = {
|
|
|
3219
3427
|
},
|
|
3220
3428
|
emits: ["open"],
|
|
3221
3429
|
setup(e, { emit: t }) {
|
|
3222
|
-
let n = e, r = t, l = i(() =>
|
|
3223
|
-
attachedAssetUrl:
|
|
3224
|
-
getPriority:
|
|
3430
|
+
let n = e, r = t, l = i(() => oi(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), ee = 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 = fi({
|
|
3431
|
+
attachedAssetUrl: E,
|
|
3432
|
+
getPriority: X,
|
|
3225
3433
|
isInView: d,
|
|
3226
3434
|
isReady: m,
|
|
3227
3435
|
item: i(() => n.item),
|
|
3228
3436
|
loadErrorKind: g,
|
|
3229
3437
|
reportAssetError: n.reportAssetError,
|
|
3230
3438
|
surfaceActive: i(() => n.surfaceActive)
|
|
3231
|
-
}),
|
|
3232
|
-
|
|
3439
|
+
}), F = i(() => P.errorKind.value ?? g.value), L = i(() => !!F.value), R = i(() => en(F.value)), z = i(() => ee.value && !g.value && (!T.value || !m.value)), B = null, V = null, H = /* @__PURE__ */ new Set();
|
|
3440
|
+
I([E, () => l.value.kind], () => {
|
|
3233
3441
|
let e = l.value.kind === "fallback";
|
|
3234
|
-
m.value = e, h.value = !1, g.value = null, e && (
|
|
3235
|
-
}),
|
|
3236
|
-
|
|
3237
|
-
}),
|
|
3442
|
+
m.value = e, h.value = !1, g.value = null, e && (T.value = !0);
|
|
3443
|
+
}), I(ee, () => {
|
|
3444
|
+
K();
|
|
3445
|
+
}), I([
|
|
3238
3446
|
d,
|
|
3239
3447
|
m,
|
|
3240
|
-
|
|
3448
|
+
E
|
|
3241
3449
|
], () => {
|
|
3242
|
-
|
|
3243
|
-
}),
|
|
3450
|
+
q();
|
|
3451
|
+
}), I(() => n.surfaceActive, (e) => {
|
|
3244
3452
|
if (!e) {
|
|
3245
|
-
|
|
3453
|
+
J(), q();
|
|
3246
3454
|
return;
|
|
3247
3455
|
}
|
|
3248
3456
|
requestAnimationFrame(() => {
|
|
3249
|
-
|
|
3457
|
+
Y(), K(), q();
|
|
3250
3458
|
});
|
|
3251
|
-
}),
|
|
3459
|
+
}), S(() => {
|
|
3252
3460
|
if (!y.value || typeof IntersectionObserver > "u") {
|
|
3253
|
-
|
|
3461
|
+
b.value = null, d.value = !0, K();
|
|
3254
3462
|
return;
|
|
3255
3463
|
}
|
|
3256
|
-
|
|
3257
|
-
for (let t of e) t.target === y.value && (n.surfaceActive &&
|
|
3464
|
+
b.value = y.value.closest("[data-testid=\"vibe-list-scroll\"]"), B = new IntersectionObserver((e) => {
|
|
3465
|
+
for (let t of e) t.target === y.value && (n.surfaceActive && Y(t), K(), q());
|
|
3258
3466
|
}, {
|
|
3259
|
-
root:
|
|
3467
|
+
root: b.value,
|
|
3260
3468
|
threshold: [0, 1]
|
|
3261
|
-
}),
|
|
3262
|
-
}),
|
|
3263
|
-
|
|
3469
|
+
}), B.observe(y.value);
|
|
3470
|
+
}), x(() => {
|
|
3471
|
+
re(), P.release(), B?.disconnect(), B = null;
|
|
3264
3472
|
});
|
|
3265
|
-
function
|
|
3266
|
-
|
|
3473
|
+
function U() {
|
|
3474
|
+
ue(_.value) && (m.value = !0, g.value = null, ie(E.value ?? n.item.url), J());
|
|
3267
3475
|
}
|
|
3268
|
-
async function
|
|
3269
|
-
if (!
|
|
3270
|
-
let e =
|
|
3476
|
+
async function W() {
|
|
3477
|
+
if (!ue(_.value)) return;
|
|
3478
|
+
let e = E.value ?? n.item.url;
|
|
3271
3479
|
m.value = !1, g.value = "generic";
|
|
3272
|
-
let t = await
|
|
3480
|
+
let t = await tn(e);
|
|
3273
3481
|
g.value = t, n.reportAssetError?.({
|
|
3274
3482
|
item: n.item,
|
|
3275
3483
|
occurrenceKey: $(n.item),
|
|
3276
3484
|
url: e,
|
|
3277
3485
|
kind: t,
|
|
3278
3486
|
surface: "grid"
|
|
3279
|
-
}),
|
|
3487
|
+
}), J();
|
|
3280
3488
|
}
|
|
3281
|
-
function
|
|
3282
|
-
|
|
3489
|
+
function ne() {
|
|
3490
|
+
ue(C.value) && (h.value = !0, m.value = !0, g.value = null, ie(E.value ?? n.item.url), J(), q());
|
|
3283
3491
|
}
|
|
3284
|
-
function
|
|
3285
|
-
|
|
3492
|
+
function G() {
|
|
3493
|
+
ue(C.value) && (h.value || (m.value = !1));
|
|
3286
3494
|
}
|
|
3287
|
-
function
|
|
3495
|
+
function K() {
|
|
3288
3496
|
if (l.value.kind === "fallback") {
|
|
3289
|
-
|
|
3497
|
+
re(!1);
|
|
3290
3498
|
return;
|
|
3291
3499
|
}
|
|
3292
3500
|
if (!n.surfaceActive) {
|
|
3293
|
-
|
|
3501
|
+
J();
|
|
3294
3502
|
return;
|
|
3295
3503
|
}
|
|
3296
|
-
if (!
|
|
3297
|
-
|
|
3504
|
+
if (!ee.value) {
|
|
3505
|
+
re();
|
|
3298
3506
|
return;
|
|
3299
3507
|
}
|
|
3300
|
-
if (
|
|
3301
|
-
|
|
3508
|
+
if (T.value || V) {
|
|
3509
|
+
V?.refresh();
|
|
3302
3510
|
return;
|
|
3303
3511
|
}
|
|
3304
|
-
|
|
3512
|
+
V = kt.request({
|
|
3305
3513
|
assetType: l.value.kind,
|
|
3306
|
-
getPriority:
|
|
3514
|
+
getPriority: X,
|
|
3307
3515
|
onGrant() {
|
|
3308
|
-
|
|
3516
|
+
T.value = !0, m.value = !1, g.value = null;
|
|
3309
3517
|
},
|
|
3310
3518
|
url: l.value.url ?? n.item.url
|
|
3311
3519
|
});
|
|
3312
3520
|
}
|
|
3313
|
-
function
|
|
3314
|
-
let e =
|
|
3521
|
+
function q() {
|
|
3522
|
+
let e = C.value;
|
|
3315
3523
|
if (!(!e || l.value.kind !== "video")) {
|
|
3316
|
-
if (
|
|
3524
|
+
if (F.value) {
|
|
3317
3525
|
e.pause();
|
|
3318
3526
|
return;
|
|
3319
3527
|
}
|
|
3320
|
-
if (
|
|
3321
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
3528
|
+
if (E.value && d.value && m.value) {
|
|
3529
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, on(e);
|
|
3322
3530
|
return;
|
|
3323
3531
|
}
|
|
3324
3532
|
try {
|
|
@@ -3327,24 +3535,24 @@ var si = ["aria-label"], ci = {
|
|
|
3327
3535
|
e.pause();
|
|
3328
3536
|
}
|
|
3329
3537
|
}
|
|
3330
|
-
function
|
|
3331
|
-
|
|
3538
|
+
function re(e = !0) {
|
|
3539
|
+
T.value = l.value.kind === "fallback", g.value = null, m.value = l.value.kind === "fallback", e && (se(), ce()), J();
|
|
3332
3540
|
}
|
|
3333
|
-
function
|
|
3334
|
-
|
|
3541
|
+
function J() {
|
|
3542
|
+
V?.release(), V = null;
|
|
3335
3543
|
}
|
|
3336
|
-
function
|
|
3544
|
+
function Y(e) {
|
|
3337
3545
|
let t = y.value;
|
|
3338
3546
|
if (!t) {
|
|
3339
3547
|
d.value = !0;
|
|
3340
3548
|
return;
|
|
3341
3549
|
}
|
|
3342
|
-
d.value =
|
|
3550
|
+
d.value = ti(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
|
|
3343
3551
|
}
|
|
3344
3552
|
function ie(e) {
|
|
3345
3553
|
if (!e) return;
|
|
3346
3554
|
let t = $(n.item), r = `${t}|${e}`;
|
|
3347
|
-
|
|
3555
|
+
H.has(r) || (H.add(r), n.reportAssetLoad?.({
|
|
3348
3556
|
item: n.item,
|
|
3349
3557
|
occurrenceKey: t,
|
|
3350
3558
|
surface: "grid",
|
|
@@ -3352,50 +3560,50 @@ var si = ["aria-label"], ci = {
|
|
|
3352
3560
|
}));
|
|
3353
3561
|
}
|
|
3354
3562
|
function ae() {
|
|
3355
|
-
if (!
|
|
3563
|
+
if (!R.value || P.retry()) return;
|
|
3356
3564
|
let e = $(n.item);
|
|
3357
|
-
|
|
3358
|
-
t.startsWith(`${e}|`) &&
|
|
3359
|
-
}), g.value = null, m.value = !1,
|
|
3565
|
+
H.forEach((t) => {
|
|
3566
|
+
t.startsWith(`${e}|`) && H.delete(t);
|
|
3567
|
+
}), g.value = null, m.value = !1, T.value = !1, J(), K();
|
|
3360
3568
|
}
|
|
3361
3569
|
function se() {
|
|
3362
|
-
|
|
3570
|
+
$r(_.value);
|
|
3363
3571
|
}
|
|
3364
3572
|
function ce() {
|
|
3365
|
-
|
|
3573
|
+
ei(C.value);
|
|
3366
3574
|
}
|
|
3367
|
-
function
|
|
3575
|
+
function X() {
|
|
3368
3576
|
let e = y.value;
|
|
3369
3577
|
if (!e) return Infinity;
|
|
3370
3578
|
let t = e.getBoundingClientRect();
|
|
3371
|
-
if (
|
|
3372
|
-
let e =
|
|
3579
|
+
if (b.value) {
|
|
3580
|
+
let e = b.value.getBoundingClientRect(), n = e.top + e.height / 2;
|
|
3373
3581
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3374
3582
|
}
|
|
3375
3583
|
let n = window.innerHeight / 2;
|
|
3376
3584
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
3377
3585
|
}
|
|
3378
|
-
function
|
|
3379
|
-
let t =
|
|
3380
|
-
return !e || !t ? !1 :
|
|
3586
|
+
function ue(e) {
|
|
3587
|
+
let t = ni(E.value);
|
|
3588
|
+
return !e || !t ? !1 : ni("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
3381
3589
|
}
|
|
3382
|
-
function
|
|
3590
|
+
function de() {
|
|
3383
3591
|
r("open");
|
|
3384
3592
|
}
|
|
3385
|
-
function
|
|
3593
|
+
function Z() {
|
|
3386
3594
|
f.value = !0;
|
|
3387
3595
|
}
|
|
3388
|
-
function
|
|
3596
|
+
function fe(e) {
|
|
3389
3597
|
let t = e.relatedTarget;
|
|
3390
3598
|
y.value && t instanceof Node && y.value.contains(t) || (f.value = !1);
|
|
3391
3599
|
}
|
|
3392
|
-
return (e, t) => (
|
|
3600
|
+
return (e, t) => (w(), s("div", {
|
|
3393
3601
|
ref_key: "rootRef",
|
|
3394
3602
|
ref: y,
|
|
3395
3603
|
"data-testid": "vibe-list-card-inner",
|
|
3396
|
-
class:
|
|
3397
|
-
onFocusin:
|
|
3398
|
-
onFocusout:
|
|
3604
|
+
class: v(["group relative h-full w-full overflow-hidden border bg-[#0a0b0f] text-[#f7f1ea] transition-[border-color,transform] duration-300", n.active ? "border-white/28" : "border-white/12 hover:border-white/24"]),
|
|
3605
|
+
onFocusin: Z,
|
|
3606
|
+
onFocusout: fe,
|
|
3399
3607
|
onPointerenter: t[0] ||= (e) => p.value = !0,
|
|
3400
3608
|
onPointerleave: t[1] ||= (e) => p.value = !1
|
|
3401
3609
|
}, [
|
|
@@ -3404,90 +3612,90 @@ var si = ["aria-label"], ci = {
|
|
|
3404
3612
|
"data-testid": "vibe-list-card-open",
|
|
3405
3613
|
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]",
|
|
3406
3614
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
3407
|
-
onClick:
|
|
3408
|
-
}, null, 8,
|
|
3409
|
-
|
|
3615
|
+
onClick: de
|
|
3616
|
+
}, null, 8, pi),
|
|
3617
|
+
z.value ? (w(), s("div", mi, [c("span", hi, [u(M(oe), {
|
|
3410
3618
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3411
3619
|
"aria-hidden": "true"
|
|
3412
3620
|
})])])) : o("", !0),
|
|
3413
|
-
|
|
3621
|
+
j.value && E.value && !L.value ? (w(), s("img", {
|
|
3414
3622
|
key: 1,
|
|
3415
3623
|
ref_key: "imageRef",
|
|
3416
|
-
ref:
|
|
3417
|
-
src:
|
|
3624
|
+
ref: _,
|
|
3625
|
+
src: E.value,
|
|
3418
3626
|
alt: l.value.label,
|
|
3419
3627
|
draggable: "false",
|
|
3420
|
-
class:
|
|
3421
|
-
onLoad:
|
|
3422
|
-
onError:
|
|
3423
|
-
}, null, 42,
|
|
3628
|
+
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"]),
|
|
3629
|
+
onLoad: U,
|
|
3630
|
+
onError: W
|
|
3631
|
+
}, null, 42, gi)) : N.value && E.value && !L.value ? (w(), s("video", {
|
|
3424
3632
|
key: 2,
|
|
3425
3633
|
ref_key: "videoRef",
|
|
3426
|
-
ref:
|
|
3427
|
-
src:
|
|
3634
|
+
ref: C,
|
|
3635
|
+
src: E.value,
|
|
3428
3636
|
muted: "",
|
|
3429
3637
|
loop: "",
|
|
3430
3638
|
playsinline: "",
|
|
3431
3639
|
preload: "metadata",
|
|
3432
|
-
class:
|
|
3433
|
-
onCanplay:
|
|
3434
|
-
onError:
|
|
3435
|
-
onLoadstart:
|
|
3436
|
-
onPlaying:
|
|
3437
|
-
onStalled:
|
|
3438
|
-
onWaiting:
|
|
3439
|
-
}, null, 42,
|
|
3640
|
+
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"]),
|
|
3641
|
+
onCanplay: ne,
|
|
3642
|
+
onError: W,
|
|
3643
|
+
onLoadstart: G,
|
|
3644
|
+
onPlaying: ne,
|
|
3645
|
+
onStalled: G,
|
|
3646
|
+
onWaiting: G
|
|
3647
|
+
}, null, 42, _i)) : L.value ? (w(), s("div", {
|
|
3440
3648
|
key: 3,
|
|
3441
3649
|
"data-testid": "vibe-list-card-error",
|
|
3442
|
-
"data-kind":
|
|
3650
|
+
"data-kind": F.value,
|
|
3443
3651
|
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))]"
|
|
3444
|
-
}, [c("div",
|
|
3445
|
-
u(
|
|
3652
|
+
}, [c("div", yi, [
|
|
3653
|
+
u(M(le), {
|
|
3446
3654
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3447
3655
|
"aria-hidden": "true"
|
|
3448
3656
|
}),
|
|
3449
|
-
c("span",
|
|
3450
|
-
|
|
3657
|
+
c("span", bi, A(M($t)(F.value)), 1),
|
|
3658
|
+
R.value ? (w(), s("button", {
|
|
3451
3659
|
key: 0,
|
|
3452
3660
|
type: "button",
|
|
3453
3661
|
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",
|
|
3454
|
-
onClick:
|
|
3662
|
+
onClick: te(ae, ["stop"])
|
|
3455
3663
|
}, " Retry ")) : o("", !0)
|
|
3456
|
-
])], 8,
|
|
3457
|
-
icon:
|
|
3664
|
+
])], 8, vi)) : (w(), s("div", xi, [c("div", Si, [O(e.$slots, "item-icon", {
|
|
3665
|
+
icon: M(Tt)(n.item.type),
|
|
3458
3666
|
item: n.item
|
|
3459
|
-
}, () => [(
|
|
3667
|
+
}, () => [(w(), a(k(M(Tt)(n.item.type)), {
|
|
3460
3668
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3461
3669
|
"aria-hidden": "true"
|
|
3462
3670
|
}))])])])),
|
|
3463
|
-
c("div",
|
|
3671
|
+
c("div", Ci, [O(e.$slots, "grid-item-overlay", {
|
|
3464
3672
|
active: n.active,
|
|
3465
3673
|
focused: f.value,
|
|
3466
3674
|
hovered: p.value,
|
|
3467
3675
|
index: n.index,
|
|
3468
3676
|
item: n.item,
|
|
3469
|
-
openFullscreen:
|
|
3677
|
+
openFullscreen: de
|
|
3470
3678
|
})])
|
|
3471
3679
|
], 34));
|
|
3472
3680
|
}
|
|
3473
|
-
}),
|
|
3681
|
+
}), Ti = { 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)]" }, Ei = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Di = {
|
|
3474
3682
|
"data-testid": "vibe-pagination",
|
|
3475
3683
|
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]"
|
|
3476
|
-
},
|
|
3684
|
+
}, Oi = { class: "whitespace-nowrap" }, ki = {
|
|
3477
3685
|
key: 0,
|
|
3478
3686
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3479
|
-
},
|
|
3687
|
+
}, Ai = [
|
|
3480
3688
|
"data-active",
|
|
3481
3689
|
"data-index",
|
|
3482
3690
|
"data-item-id",
|
|
3483
3691
|
"data-occurrence-key"
|
|
3484
|
-
],
|
|
3692
|
+
], ji = ["data-item-id"], Mi = {
|
|
3485
3693
|
key: 0,
|
|
3486
3694
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3487
|
-
},
|
|
3695
|
+
}, Ni = {
|
|
3488
3696
|
key: 1,
|
|
3489
3697
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3490
|
-
},
|
|
3698
|
+
}, Pi = { class: "mx-auto flex w-full justify-center" }, Fi = /* @__PURE__ */ d({
|
|
3491
3699
|
__name: "ListSurface",
|
|
3492
3700
|
props: {
|
|
3493
3701
|
active: {
|
|
@@ -3548,75 +3756,75 @@ var si = ["aria-label"], ci = {
|
|
|
3548
3756
|
"update:activeIndex"
|
|
3549
3757
|
],
|
|
3550
3758
|
setup(e, { emit: n }) {
|
|
3551
|
-
let r = e, d =
|
|
3552
|
-
active:
|
|
3553
|
-
allowExhaustedNextPageRefresh:
|
|
3554
|
-
items:
|
|
3555
|
-
activeIndex:
|
|
3556
|
-
loading:
|
|
3557
|
-
hasNextPage:
|
|
3558
|
-
hasPreviousPage:
|
|
3559
|
-
paginationDetail:
|
|
3560
|
-
pendingAppendItems:
|
|
3561
|
-
commitPendingAppend:
|
|
3562
|
-
requestNextPage:
|
|
3563
|
-
requestPreviousPage:
|
|
3759
|
+
let r = e, d = P(), f = n, p = Yr({
|
|
3760
|
+
active: j(r, "active"),
|
|
3761
|
+
allowExhaustedNextPageRefresh: j(r, "allowExhaustedNextPageRefresh"),
|
|
3762
|
+
items: j(r, "items"),
|
|
3763
|
+
activeIndex: j(r, "activeIndex"),
|
|
3764
|
+
loading: j(r, "loading"),
|
|
3765
|
+
hasNextPage: j(r, "hasNextPage"),
|
|
3766
|
+
hasPreviousPage: j(r, "hasPreviousPage"),
|
|
3767
|
+
paginationDetail: j(r, "paginationDetail"),
|
|
3768
|
+
pendingAppendItems: j(r, "pendingAppendItems"),
|
|
3769
|
+
commitPendingAppend: j(r, "commitPendingAppend"),
|
|
3770
|
+
requestNextPage: j(r, "requestNextPage"),
|
|
3771
|
+
requestPreviousPage: j(r, "requestPreviousPage"),
|
|
3564
3772
|
setActiveIndex(e) {
|
|
3565
3773
|
f("update:activeIndex", e);
|
|
3566
3774
|
}
|
|
3567
|
-
}), m = i(() =>
|
|
3775
|
+
}), m = i(() => Wt({
|
|
3568
3776
|
itemCount: r.items.length,
|
|
3569
3777
|
loading: r.loading,
|
|
3570
3778
|
phase: r.phase
|
|
3571
|
-
})),
|
|
3779
|
+
})), h = i(() => Gt({
|
|
3572
3780
|
errorMessage: r.errorMessage,
|
|
3573
3781
|
hasItems: r.items.length > 0,
|
|
3574
3782
|
hasNextPage: r.hasNextPage,
|
|
3575
3783
|
phase: m.value,
|
|
3576
3784
|
surface: "grid"
|
|
3577
|
-
})),
|
|
3785
|
+
})), _ = i(() => !r.showStatusBadges || !h.value ? null : {
|
|
3578
3786
|
activeIndex: p.resolvedActiveIndex.value,
|
|
3579
|
-
kind:
|
|
3787
|
+
kind: h.value.kind,
|
|
3580
3788
|
loading: r.loading,
|
|
3581
|
-
message:
|
|
3789
|
+
message: h.value.message,
|
|
3582
3790
|
paginationDetail: r.paginationDetail,
|
|
3583
3791
|
total: r.items.length
|
|
3584
|
-
}), x = i(() => !
|
|
3585
|
-
emptyStateMode:
|
|
3586
|
-
itemCount:
|
|
3587
|
-
loading:
|
|
3792
|
+
}), x = i(() => !_.value || !d["grid-status"] ? [] : d["grid-status"](_.value)), S = i(() => zt(x.value)), C = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: E, showCustomEmptyState: D, showInlineEmptyState: k } = Ht({
|
|
3793
|
+
emptyStateMode: j(r, "emptyStateMode"),
|
|
3794
|
+
itemCount: C,
|
|
3795
|
+
loading: j(r, "loading"),
|
|
3588
3796
|
renderSlot: d["empty-state"],
|
|
3589
3797
|
surface: "grid"
|
|
3590
3798
|
});
|
|
3591
|
-
return
|
|
3799
|
+
return I([p.nextBoundaryLoadProgress, p.previousBoundaryLoadProgress], ([e, t]) => {
|
|
3592
3800
|
f("boundary-load-progress", {
|
|
3593
3801
|
nextBoundaryLoadProgress: e,
|
|
3594
3802
|
previousBoundaryLoadProgress: t
|
|
3595
3803
|
});
|
|
3596
|
-
}, { immediate: !0 }), (e, n) => (
|
|
3597
|
-
c("div",
|
|
3804
|
+
}, { immediate: !0 }), (e, n) => (w(), s("div", Ti, [
|
|
3805
|
+
c("div", Ei, [c("span", Di, [c("span", Oi, A(M(p).paginationLabel.value), 1), r.paginationDetail ? (w(), s("span", ki, A(r.paginationDetail), 1)) : o("", !0)])]),
|
|
3598
3806
|
c("div", {
|
|
3599
|
-
ref:
|
|
3807
|
+
ref: M(p).scrollViewportRef,
|
|
3600
3808
|
"data-testid": "vibe-list-scroll",
|
|
3601
3809
|
class: "h-full min-h-0 overflow-y-auto overflow-x-hidden [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
|
|
3602
|
-
onScroll: n[0] ||= (...e) =>
|
|
3603
|
-
onWheel: n[1] ||= (...e) =>
|
|
3810
|
+
onScroll: n[0] ||= (...e) => M(p).onScroll && M(p).onScroll(...e),
|
|
3811
|
+
onWheel: n[1] ||= (...e) => M(p).onWheel && M(p).onWheel(...e)
|
|
3604
3812
|
}, [c("div", {
|
|
3605
3813
|
"data-testid": "vibe-list-content",
|
|
3606
3814
|
class: "relative",
|
|
3607
|
-
style:
|
|
3815
|
+
style: b({ height: `${M(p).containerHeight.value}px` })
|
|
3608
3816
|
}, [
|
|
3609
|
-
(
|
|
3610
|
-
key:
|
|
3817
|
+
(w(!0), s(t, null, ee(M(p).renderedItems.value, ({ item: t, index: n }) => (w(), s("article", {
|
|
3818
|
+
key: M($)(t),
|
|
3611
3819
|
"data-testid": "vibe-list-card",
|
|
3612
|
-
"data-active": n ===
|
|
3820
|
+
"data-active": n === M(p).resolvedActiveIndex.value ? "true" : "false",
|
|
3613
3821
|
"data-index": n,
|
|
3614
3822
|
"data-item-id": t.id,
|
|
3615
|
-
"data-occurrence-key":
|
|
3823
|
+
"data-occurrence-key": M($)(t),
|
|
3616
3824
|
class: "absolute will-change-transform",
|
|
3617
|
-
style:
|
|
3618
|
-
}, [u(
|
|
3619
|
-
active: n ===
|
|
3825
|
+
style: b(M(p).getCardStyle(n))
|
|
3826
|
+
}, [u(wi, {
|
|
3827
|
+
active: n === M(p).resolvedActiveIndex.value,
|
|
3620
3828
|
index: n,
|
|
3621
3829
|
item: t,
|
|
3622
3830
|
"report-asset-error": r.reportAssetError,
|
|
@@ -3625,11 +3833,11 @@ var si = ["aria-label"], ci = {
|
|
|
3625
3833
|
onOpen: (e) => f("open-fullscreen", n)
|
|
3626
3834
|
}, l({ _: 2 }, [d["grid-item-overlay"] ? {
|
|
3627
3835
|
name: "grid-item-overlay",
|
|
3628
|
-
fn:
|
|
3836
|
+
fn: R((t) => [O(e.$slots, "grid-item-overlay", g({ ref_for: !0 }, t))]),
|
|
3629
3837
|
key: "0"
|
|
3630
3838
|
} : void 0, d["item-icon"] ? {
|
|
3631
3839
|
name: "item-icon",
|
|
3632
|
-
fn:
|
|
3840
|
+
fn: R((t) => [O(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
|
|
3633
3841
|
key: "1"
|
|
3634
3842
|
} : void 0]), 1032, [
|
|
3635
3843
|
"active",
|
|
@@ -3639,14 +3847,14 @@ var si = ["aria-label"], ci = {
|
|
|
3639
3847
|
"report-asset-load",
|
|
3640
3848
|
"surface-active",
|
|
3641
3849
|
"onOpen"
|
|
3642
|
-
])], 12,
|
|
3643
|
-
(
|
|
3644
|
-
key: `leaving-${
|
|
3850
|
+
])], 12, Ai))), 128)),
|
|
3851
|
+
(w(!0), s(t, null, ee(M(p).leavingItems.value, (t) => (w(), s("article", {
|
|
3852
|
+
key: `leaving-${M($)(t.item)}`,
|
|
3645
3853
|
"data-testid": "vibe-list-card-leaving",
|
|
3646
3854
|
"data-item-id": t.item.id,
|
|
3647
3855
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3648
|
-
style:
|
|
3649
|
-
}, [u(
|
|
3856
|
+
style: b(M(p).getLeavingCardStyle(t.item))
|
|
3857
|
+
}, [u(wi, {
|
|
3650
3858
|
active: !1,
|
|
3651
3859
|
index: -1,
|
|
3652
3860
|
item: t.item,
|
|
@@ -3655,20 +3863,20 @@ var si = ["aria-label"], ci = {
|
|
|
3655
3863
|
"surface-active": !1
|
|
3656
3864
|
}, l({ _: 2 }, [d["item-icon"] ? {
|
|
3657
3865
|
name: "item-icon",
|
|
3658
|
-
fn:
|
|
3866
|
+
fn: R((t) => [O(e.$slots, "item-icon", g({ ref_for: !0 }, t))]),
|
|
3659
3867
|
key: "0"
|
|
3660
3868
|
} : void 0]), 1032, [
|
|
3661
3869
|
"item",
|
|
3662
3870
|
"report-asset-error",
|
|
3663
3871
|
"report-asset-load"
|
|
3664
|
-
])], 12,
|
|
3665
|
-
|
|
3872
|
+
])], 12, ji))), 128)),
|
|
3873
|
+
M(k) && M(T) ? (w(), a(Cn, {
|
|
3666
3874
|
key: 0,
|
|
3667
|
-
message:
|
|
3668
|
-
mode:
|
|
3669
|
-
surface:
|
|
3875
|
+
message: M(T).message,
|
|
3876
|
+
mode: M(T).mode,
|
|
3877
|
+
surface: M(T).surface
|
|
3670
3878
|
}, {
|
|
3671
|
-
default:
|
|
3879
|
+
default: R(() => [M(D) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(T)))) : o("", !0)]),
|
|
3672
3880
|
_: 3
|
|
3673
3881
|
}, 8, [
|
|
3674
3882
|
"message",
|
|
@@ -3676,28 +3884,28 @@ var si = ["aria-label"], ci = {
|
|
|
3676
3884
|
"surface"
|
|
3677
3885
|
])) : o("", !0)
|
|
3678
3886
|
], 4)], 544),
|
|
3679
|
-
|
|
3887
|
+
M(p).showScrollbar.value ? (w(), s("div", Mi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
3680
3888
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
3681
|
-
class:
|
|
3682
|
-
style:
|
|
3889
|
+
class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
3890
|
+
style: b(M(p).getScrollbarThumbStyle())
|
|
3683
3891
|
}, null, 6)])) : o("", !0),
|
|
3684
|
-
d["grid-footer"] ? (
|
|
3685
|
-
|
|
3892
|
+
d["grid-footer"] ? (w(), s("div", Ni, [c("div", Pi, [O(e.$slots, "grid-footer")])])) : o("", !0),
|
|
3893
|
+
_.value ? (w(), s("div", {
|
|
3686
3894
|
key: 2,
|
|
3687
|
-
class:
|
|
3688
|
-
}, [
|
|
3895
|
+
class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
3896
|
+
}, [S.value ? O(e.$slots, "grid-status", y(g({ key: 0 }, _.value))) : (w(), s("span", {
|
|
3689
3897
|
key: 1,
|
|
3690
3898
|
"data-testid": "vibe-grid-status-badge",
|
|
3691
|
-
class:
|
|
3692
|
-
},
|
|
3693
|
-
|
|
3899
|
+
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]", _.value.kind === "end" ? "border-amber-300/35 text-amber-200" : _.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3900
|
+
}, A(_.value.message), 3))], 2)) : o("", !0),
|
|
3901
|
+
M(E) && M(T) ? (w(), a(Cn, {
|
|
3694
3902
|
key: 3,
|
|
3695
|
-
class:
|
|
3696
|
-
message:
|
|
3697
|
-
mode:
|
|
3698
|
-
surface:
|
|
3903
|
+
class: v(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
3904
|
+
message: M(T).message,
|
|
3905
|
+
mode: M(T).mode,
|
|
3906
|
+
surface: M(T).surface
|
|
3699
3907
|
}, {
|
|
3700
|
-
default:
|
|
3908
|
+
default: R(() => [M(D) ? O(e.$slots, "empty-state", y(g({ key: 0 }, M(T)))) : o("", !0)]),
|
|
3701
3909
|
_: 3
|
|
3702
3910
|
}, 8, [
|
|
3703
3911
|
"class",
|
|
@@ -3707,13 +3915,13 @@ var si = ["aria-label"], ci = {
|
|
|
3707
3915
|
])) : o("", !0)
|
|
3708
3916
|
]));
|
|
3709
3917
|
}
|
|
3710
|
-
}),
|
|
3918
|
+
}), Ii = ["data-surface-mode"], Li = {
|
|
3711
3919
|
key: 1,
|
|
3712
3920
|
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"
|
|
3713
|
-
},
|
|
3921
|
+
}, Ri = ["data-visible", "inert"], zi = ["data-visible", "inert"], Bi = {
|
|
3714
3922
|
key: 3,
|
|
3715
3923
|
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"
|
|
3716
|
-
},
|
|
3924
|
+
}, Vi = /* @__PURE__ */ d({
|
|
3717
3925
|
name: "VibeLayout",
|
|
3718
3926
|
__name: "Layout",
|
|
3719
3927
|
props: {
|
|
@@ -3723,7 +3931,6 @@ var si = ["aria-label"], ci = {
|
|
|
3723
3931
|
initialCursor: {},
|
|
3724
3932
|
initialState: {},
|
|
3725
3933
|
loopFullscreenVideo: { type: Boolean },
|
|
3726
|
-
mode: {},
|
|
3727
3934
|
pageSize: {},
|
|
3728
3935
|
paginationDetail: {},
|
|
3729
3936
|
resolve: { type: Function },
|
|
@@ -3739,12 +3946,12 @@ var si = ["aria-label"], ci = {
|
|
|
3739
3946
|
"update:surfaceMode"
|
|
3740
3947
|
],
|
|
3741
3948
|
setup(e, { expose: n, emit: i }) {
|
|
3742
|
-
let d = e,
|
|
3949
|
+
let d = e, f = P(), m = i, h = Ye(d, m), g = Z((e) => {
|
|
3743
3950
|
m("asset-errors", e);
|
|
3744
|
-
}), _ =
|
|
3951
|
+
}), _ = fe((e) => {
|
|
3745
3952
|
m("asset-loads", e);
|
|
3746
3953
|
});
|
|
3747
|
-
return
|
|
3954
|
+
return x(() => {
|
|
3748
3955
|
g.stop(), _.stop();
|
|
3749
3956
|
}), n({
|
|
3750
3957
|
cancel: h.cancel,
|
|
@@ -3759,16 +3966,16 @@ var si = ["aria-label"], ci = {
|
|
|
3759
3966
|
status: h.status,
|
|
3760
3967
|
undo: h.undo,
|
|
3761
3968
|
unlockPageLoading: h.unlockPageLoading
|
|
3762
|
-
}), (e, n) => (
|
|
3969
|
+
}), (e, n) => (w(), s("section", {
|
|
3763
3970
|
"data-testid": "vibe",
|
|
3764
|
-
"data-surface-mode":
|
|
3971
|
+
"data-surface-mode": M(h).surfaceMode.value,
|
|
3765
3972
|
class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]"
|
|
3766
|
-
}, [
|
|
3973
|
+
}, [M(h).canRetryInitialLoad.value ? (w(), s("button", {
|
|
3767
3974
|
key: 0,
|
|
3768
3975
|
type: "button",
|
|
3769
3976
|
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",
|
|
3770
|
-
onClick: n[0] ||= (...e) =>
|
|
3771
|
-
}, " Retry ")) :
|
|
3977
|
+
onClick: n[0] ||= (...e) => M(h).retryInitialLoad && M(h).retryInitialLoad(...e)
|
|
3978
|
+
}, " Retry ")) : M(h).errorMessage.value && M(h).items.value.length > 0 ? (w(), s("div", Li, A(M(h).errorMessage.value), 1)) : o("", !0), M(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
|
|
3772
3979
|
appear: "",
|
|
3773
3980
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
3774
3981
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -3777,57 +3984,57 @@ var si = ["aria-label"], ci = {
|
|
|
3777
3984
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
3778
3985
|
"leave-to-class": "translate-y-3 opacity-0"
|
|
3779
3986
|
}, {
|
|
3780
|
-
default:
|
|
3987
|
+
default: R(() => [z(c("div", {
|
|
3781
3988
|
"data-testid": "vibe-list-surface",
|
|
3782
|
-
"data-visible":
|
|
3783
|
-
inert:
|
|
3989
|
+
"data-visible": M(h).surfaceMode.value === "list" ? "true" : "false",
|
|
3990
|
+
inert: M(h).surfaceMode.value !== "list",
|
|
3784
3991
|
class: "absolute inset-0 z-[2]"
|
|
3785
|
-
}, [u(
|
|
3786
|
-
active:
|
|
3787
|
-
"allow-exhausted-next-page-refresh":
|
|
3788
|
-
items:
|
|
3789
|
-
"active-index":
|
|
3790
|
-
"error-message":
|
|
3791
|
-
loading:
|
|
3792
|
-
"has-next-page":
|
|
3793
|
-
"has-previous-page":
|
|
3794
|
-
"pending-append-items":
|
|
3795
|
-
phase:
|
|
3796
|
-
"commit-pending-append":
|
|
3797
|
-
"pagination-detail":
|
|
3798
|
-
"report-asset-error":
|
|
3799
|
-
"report-asset-load":
|
|
3800
|
-
"request-next-page":
|
|
3801
|
-
"request-previous-page":
|
|
3992
|
+
}, [u(Fi, {
|
|
3993
|
+
active: M(h).surfaceMode.value === "list",
|
|
3994
|
+
"allow-exhausted-next-page-refresh": M(h).canRefreshExhaustedNextPage.value,
|
|
3995
|
+
items: M(h).items.value,
|
|
3996
|
+
"active-index": M(h).activeIndex.value,
|
|
3997
|
+
"error-message": M(h).errorMessage.value,
|
|
3998
|
+
loading: M(h).loading.value,
|
|
3999
|
+
"has-next-page": M(h).hasNextPage.value,
|
|
4000
|
+
"has-previous-page": M(h).hasPreviousPage.value,
|
|
4001
|
+
"pending-append-items": M(h).pendingAppendItems.value,
|
|
4002
|
+
phase: M(h).phase.value,
|
|
4003
|
+
"commit-pending-append": M(h).commitPendingAppend,
|
|
4004
|
+
"pagination-detail": M(h).paginationDetail.value,
|
|
4005
|
+
"report-asset-error": M(g).report,
|
|
4006
|
+
"report-asset-load": M(_).report,
|
|
4007
|
+
"request-next-page": M(h).prefetchNextPage,
|
|
4008
|
+
"request-previous-page": M(h).prefetchPreviousPage,
|
|
3802
4009
|
"empty-state-mode": d.emptyStateMode,
|
|
3803
4010
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3804
|
-
onBoundaryLoadProgress:
|
|
3805
|
-
onOpenFullscreen:
|
|
3806
|
-
"onUpdate:activeIndex":
|
|
4011
|
+
onBoundaryLoadProgress: M(h).setBoundaryLoadProgress,
|
|
4012
|
+
onOpenFullscreen: M(h).openFullscreen,
|
|
4013
|
+
"onUpdate:activeIndex": M(h).setActiveIndex
|
|
3807
4014
|
}, l({ _: 2 }, [
|
|
3808
|
-
|
|
4015
|
+
f["empty-state"] ? {
|
|
3809
4016
|
name: "empty-state",
|
|
3810
|
-
fn:
|
|
4017
|
+
fn: R((t) => [O(e.$slots, "empty-state", y(p(t)))]),
|
|
3811
4018
|
key: "0"
|
|
3812
4019
|
} : void 0,
|
|
3813
|
-
|
|
4020
|
+
f["grid-footer"] ? {
|
|
3814
4021
|
name: "grid-footer",
|
|
3815
|
-
fn:
|
|
4022
|
+
fn: R(() => [O(e.$slots, "grid-footer")]),
|
|
3816
4023
|
key: "1"
|
|
3817
4024
|
} : void 0,
|
|
3818
|
-
|
|
4025
|
+
f["grid-item-overlay"] ? {
|
|
3819
4026
|
name: "grid-item-overlay",
|
|
3820
|
-
fn:
|
|
4027
|
+
fn: R((t) => [O(e.$slots, "grid-item-overlay", y(p(t)))]),
|
|
3821
4028
|
key: "2"
|
|
3822
4029
|
} : void 0,
|
|
3823
|
-
|
|
4030
|
+
f["grid-status"] ? {
|
|
3824
4031
|
name: "grid-status",
|
|
3825
|
-
fn:
|
|
4032
|
+
fn: R((t) => [O(e.$slots, "grid-status", y(p(t)))]),
|
|
3826
4033
|
key: "3"
|
|
3827
4034
|
} : void 0,
|
|
3828
|
-
|
|
4035
|
+
f["item-icon"] ? {
|
|
3829
4036
|
name: "item-icon",
|
|
3830
|
-
fn:
|
|
4037
|
+
fn: R((t) => [O(e.$slots, "item-icon", y(p(t)))]),
|
|
3831
4038
|
key: "4"
|
|
3832
4039
|
} : void 0
|
|
3833
4040
|
]), 1032, [
|
|
@@ -3852,7 +4059,7 @@ var si = ["aria-label"], ci = {
|
|
|
3852
4059
|
"onBoundaryLoadProgress",
|
|
3853
4060
|
"onOpenFullscreen",
|
|
3854
4061
|
"onUpdate:activeIndex"
|
|
3855
|
-
])], 8,
|
|
4062
|
+
])], 8, Ri), [[F, M(h).surfaceMode.value === "list"]])]),
|
|
3856
4063
|
_: 3
|
|
3857
4064
|
}), u(r, {
|
|
3858
4065
|
appear: "",
|
|
@@ -3863,59 +4070,59 @@ var si = ["aria-label"], ci = {
|
|
|
3863
4070
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
3864
4071
|
"leave-to-class": "-translate-y-3 opacity-0"
|
|
3865
4072
|
}, {
|
|
3866
|
-
default:
|
|
4073
|
+
default: R(() => [z(c("div", {
|
|
3867
4074
|
"data-testid": "vibe-fullscreen-surface",
|
|
3868
|
-
"data-visible":
|
|
3869
|
-
inert:
|
|
4075
|
+
"data-visible": M(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
4076
|
+
inert: M(h).surfaceMode.value !== "fullscreen",
|
|
3870
4077
|
class: "absolute inset-0 z-[3]"
|
|
3871
|
-
}, [u(
|
|
3872
|
-
items:
|
|
3873
|
-
active:
|
|
3874
|
-
"active-index":
|
|
3875
|
-
"error-message":
|
|
3876
|
-
loading:
|
|
3877
|
-
"has-next-page":
|
|
3878
|
-
"pagination-detail":
|
|
3879
|
-
phase:
|
|
3880
|
-
"report-asset-error":
|
|
3881
|
-
"report-asset-load":
|
|
4078
|
+
}, [u(ar, {
|
|
4079
|
+
items: M(h).items.value,
|
|
4080
|
+
active: M(h).surfaceMode.value === "fullscreen",
|
|
4081
|
+
"active-index": M(h).activeIndex.value,
|
|
4082
|
+
"error-message": M(h).errorMessage.value,
|
|
4083
|
+
loading: M(h).loading.value,
|
|
4084
|
+
"has-next-page": M(h).hasNextPage.value,
|
|
4085
|
+
"pagination-detail": M(h).paginationDetail.value,
|
|
4086
|
+
phase: M(h).phase.value,
|
|
4087
|
+
"report-asset-error": M(g).report,
|
|
4088
|
+
"report-asset-load": M(_).report,
|
|
3882
4089
|
"empty-state-mode": d.emptyStateMode,
|
|
3883
4090
|
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
3884
4091
|
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
3885
4092
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
3886
4093
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3887
|
-
"show-back-to-list":
|
|
3888
|
-
onBackToList:
|
|
3889
|
-
"onUpdate:activeIndex":
|
|
4094
|
+
"show-back-to-list": M(h).showBackToList.value,
|
|
4095
|
+
onBackToList: M(h).returnToList,
|
|
4096
|
+
"onUpdate:activeIndex": M(h).setActiveIndex
|
|
3890
4097
|
}, l({ _: 2 }, [
|
|
3891
|
-
|
|
4098
|
+
f["empty-state"] ? {
|
|
3892
4099
|
name: "empty-state",
|
|
3893
|
-
fn:
|
|
4100
|
+
fn: R((t) => [O(e.$slots, "empty-state", y(p(t)))]),
|
|
3894
4101
|
key: "0"
|
|
3895
4102
|
} : void 0,
|
|
3896
|
-
|
|
4103
|
+
f["fullscreen-overlay"] ? {
|
|
3897
4104
|
name: "fullscreen-overlay",
|
|
3898
|
-
fn:
|
|
4105
|
+
fn: R((t) => [O(e.$slots, "fullscreen-overlay", y(p(t)))]),
|
|
3899
4106
|
key: "1"
|
|
3900
4107
|
} : void 0,
|
|
3901
|
-
|
|
4108
|
+
f["fullscreen-aside"] ? {
|
|
3902
4109
|
name: "fullscreen-aside",
|
|
3903
|
-
fn:
|
|
4110
|
+
fn: R((t) => [O(e.$slots, "fullscreen-aside", y(p(t)))]),
|
|
3904
4111
|
key: "2"
|
|
3905
4112
|
} : void 0,
|
|
3906
|
-
|
|
4113
|
+
f["fullscreen-header-actions"] ? {
|
|
3907
4114
|
name: "fullscreen-header-actions",
|
|
3908
|
-
fn:
|
|
4115
|
+
fn: R((t) => [O(e.$slots, "fullscreen-header-actions", y(p(t)))]),
|
|
3909
4116
|
key: "3"
|
|
3910
4117
|
} : void 0,
|
|
3911
|
-
|
|
4118
|
+
f["fullscreen-status"] ? {
|
|
3912
4119
|
name: "fullscreen-status",
|
|
3913
|
-
fn:
|
|
4120
|
+
fn: R((t) => [O(e.$slots, "fullscreen-status", y(p(t)))]),
|
|
3914
4121
|
key: "4"
|
|
3915
4122
|
} : void 0,
|
|
3916
|
-
|
|
4123
|
+
f["item-icon"] ? {
|
|
3917
4124
|
name: "item-icon",
|
|
3918
|
-
fn:
|
|
4125
|
+
fn: R((t) => [O(e.$slots, "item-icon", y(p(t)))]),
|
|
3919
4126
|
key: "5"
|
|
3920
4127
|
} : void 0
|
|
3921
4128
|
]), 1032, [
|
|
@@ -3937,60 +4144,60 @@ var si = ["aria-label"], ci = {
|
|
|
3937
4144
|
"show-back-to-list",
|
|
3938
4145
|
"onBackToList",
|
|
3939
4146
|
"onUpdate:activeIndex"
|
|
3940
|
-
])], 8,
|
|
4147
|
+
])], 8, zi), [[F, M(h).surfaceMode.value === "fullscreen"]])]),
|
|
3941
4148
|
_: 3
|
|
3942
|
-
})], 64)) :
|
|
4149
|
+
})], 64)) : M(h).items.value.length === 0 && M(h).loading.value ? (w(), s("div", Bi, [u(M(oe), {
|
|
3943
4150
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3944
4151
|
"aria-hidden": "true"
|
|
3945
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (
|
|
4152
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(ar, {
|
|
3946
4153
|
key: 4,
|
|
3947
|
-
items:
|
|
4154
|
+
items: M(h).items.value,
|
|
3948
4155
|
active: !0,
|
|
3949
|
-
"active-index":
|
|
3950
|
-
"error-message":
|
|
3951
|
-
loading:
|
|
3952
|
-
"has-next-page":
|
|
3953
|
-
"pagination-detail":
|
|
3954
|
-
phase:
|
|
3955
|
-
"report-asset-error":
|
|
3956
|
-
"report-asset-load":
|
|
4156
|
+
"active-index": M(h).activeIndex.value,
|
|
4157
|
+
"error-message": M(h).errorMessage.value,
|
|
4158
|
+
loading: M(h).loading.value,
|
|
4159
|
+
"has-next-page": M(h).hasNextPage.value,
|
|
4160
|
+
"pagination-detail": M(h).paginationDetail.value,
|
|
4161
|
+
phase: M(h).phase.value,
|
|
4162
|
+
"report-asset-error": M(g).report,
|
|
4163
|
+
"report-asset-load": M(_).report,
|
|
3957
4164
|
"empty-state-mode": d.emptyStateMode,
|
|
3958
4165
|
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
3959
4166
|
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
3960
4167
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
3961
4168
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3962
4169
|
"show-back-to-list": !1,
|
|
3963
|
-
onBackToList:
|
|
3964
|
-
"onUpdate:activeIndex":
|
|
4170
|
+
onBackToList: M(h).returnToList,
|
|
4171
|
+
"onUpdate:activeIndex": M(h).setActiveIndex
|
|
3965
4172
|
}, l({ _: 2 }, [
|
|
3966
|
-
|
|
4173
|
+
f["empty-state"] ? {
|
|
3967
4174
|
name: "empty-state",
|
|
3968
|
-
fn:
|
|
4175
|
+
fn: R((t) => [O(e.$slots, "empty-state", y(p(t)))]),
|
|
3969
4176
|
key: "0"
|
|
3970
4177
|
} : void 0,
|
|
3971
|
-
|
|
4178
|
+
f["fullscreen-overlay"] ? {
|
|
3972
4179
|
name: "fullscreen-overlay",
|
|
3973
|
-
fn:
|
|
4180
|
+
fn: R((t) => [O(e.$slots, "fullscreen-overlay", y(p(t)))]),
|
|
3974
4181
|
key: "1"
|
|
3975
4182
|
} : void 0,
|
|
3976
|
-
|
|
4183
|
+
f["fullscreen-aside"] ? {
|
|
3977
4184
|
name: "fullscreen-aside",
|
|
3978
|
-
fn:
|
|
4185
|
+
fn: R((t) => [O(e.$slots, "fullscreen-aside", y(p(t)))]),
|
|
3979
4186
|
key: "2"
|
|
3980
4187
|
} : void 0,
|
|
3981
|
-
|
|
4188
|
+
f["fullscreen-header-actions"] ? {
|
|
3982
4189
|
name: "fullscreen-header-actions",
|
|
3983
|
-
fn:
|
|
4190
|
+
fn: R((t) => [O(e.$slots, "fullscreen-header-actions", y(p(t)))]),
|
|
3984
4191
|
key: "3"
|
|
3985
4192
|
} : void 0,
|
|
3986
|
-
|
|
4193
|
+
f["fullscreen-status"] ? {
|
|
3987
4194
|
name: "fullscreen-status",
|
|
3988
|
-
fn:
|
|
4195
|
+
fn: R((t) => [O(e.$slots, "fullscreen-status", y(p(t)))]),
|
|
3989
4196
|
key: "4"
|
|
3990
4197
|
} : void 0,
|
|
3991
|
-
|
|
4198
|
+
f["item-icon"] ? {
|
|
3992
4199
|
name: "item-icon",
|
|
3993
|
-
fn:
|
|
4200
|
+
fn: R((t) => [O(e.$slots, "item-icon", y(p(t)))]),
|
|
3994
4201
|
key: "5"
|
|
3995
4202
|
} : void 0
|
|
3996
4203
|
]), 1032, [
|
|
@@ -4010,10 +4217,10 @@ var si = ["aria-label"], ci = {
|
|
|
4010
4217
|
"show-status-badges",
|
|
4011
4218
|
"onBackToList",
|
|
4012
4219
|
"onUpdate:activeIndex"
|
|
4013
|
-
]))], 8,
|
|
4220
|
+
]))], 8, Ii));
|
|
4014
4221
|
}
|
|
4015
|
-
}),
|
|
4016
|
-
e.component("VibeLayout",
|
|
4222
|
+
}), Hi = { install(e) {
|
|
4223
|
+
e.component("VibeLayout", Vi);
|
|
4017
4224
|
} };
|
|
4018
4225
|
//#endregion
|
|
4019
|
-
export {
|
|
4226
|
+
export { Vi as VibeLayout, Hi as VibePlugin, Hi as default };
|