@wyxos/vibe 3.0.13 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/FullscreenMediaBar.vue.d.ts +7 -0
- package/lib/components/FullscreenSurface.vue.d.ts +4 -0
- package/lib/components/viewer-core/assetState.d.ts +2 -0
- package/lib/components/viewer-core/dominantImageTone.d.ts +6 -0
- package/lib/components/viewer-core/useDataSource.d.ts +2 -0
- package/lib/components/viewer-core/useFullscreenDominantTone.d.ts +12 -0
- package/lib/components/viewer-core/useMedia.d.ts +3 -0
- package/lib/components/viewer-core/useViewer.d.ts +3 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +976 -719
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var B = (e) => {
|
|
|
61
61
|
d: "M22 10v3",
|
|
62
62
|
key: "154ddg"
|
|
63
63
|
}]
|
|
64
|
-
]),
|
|
64
|
+
]), X = J("clapperboard", [
|
|
65
65
|
["path", {
|
|
66
66
|
d: "m12.296 3.464 3.02 3.956",
|
|
67
67
|
key: "qash78"
|
|
@@ -78,7 +78,7 @@ var B = (e) => {
|
|
|
78
78
|
d: "m6.18 5.276 3.1 3.899",
|
|
79
79
|
key: "zjj9t3"
|
|
80
80
|
}]
|
|
81
|
-
]),
|
|
81
|
+
]), te = J("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", {
|
|
@@ -140,14 +140,52 @@ var B = (e) => {
|
|
|
140
140
|
d: "M12 17h.01",
|
|
141
141
|
key: "p32p05"
|
|
142
142
|
}]
|
|
143
|
+
]), se = J("volume-1", [["path", {
|
|
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
|
+
key: "uqj9uw"
|
|
146
|
+
}], ["path", {
|
|
147
|
+
d: "M16 9a5 5 0 0 1 0 6",
|
|
148
|
+
key: "1q6k2b"
|
|
149
|
+
}]]), ce = J("volume-2", [
|
|
150
|
+
["path", {
|
|
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
|
+
key: "uqj9uw"
|
|
153
|
+
}],
|
|
154
|
+
["path", {
|
|
155
|
+
d: "M16 9a5 5 0 0 1 0 6",
|
|
156
|
+
key: "1q6k2b"
|
|
157
|
+
}],
|
|
158
|
+
["path", {
|
|
159
|
+
d: "M19.364 18.364a9 9 0 0 0 0-12.728",
|
|
160
|
+
key: "ijwkga"
|
|
161
|
+
}]
|
|
162
|
+
]), Z = J("volume-x", [
|
|
163
|
+
["path", {
|
|
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
|
+
key: "uqj9uw"
|
|
166
|
+
}],
|
|
167
|
+
["line", {
|
|
168
|
+
x1: "22",
|
|
169
|
+
x2: "16",
|
|
170
|
+
y1: "9",
|
|
171
|
+
y2: "15",
|
|
172
|
+
key: "1ewh16"
|
|
173
|
+
}],
|
|
174
|
+
["line", {
|
|
175
|
+
x1: "16",
|
|
176
|
+
x2: "22",
|
|
177
|
+
y1: "9",
|
|
178
|
+
y2: "15",
|
|
179
|
+
key: "5ykzw1"
|
|
180
|
+
}]
|
|
143
181
|
]);
|
|
144
|
-
function
|
|
145
|
-
return
|
|
182
|
+
function le(e, t = 150) {
|
|
183
|
+
return de(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
|
|
146
184
|
}
|
|
147
|
-
function
|
|
148
|
-
return
|
|
185
|
+
function ue(e, t = 150) {
|
|
186
|
+
return de(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
|
|
149
187
|
}
|
|
150
|
-
function
|
|
188
|
+
function de(e, t, n) {
|
|
151
189
|
let r = [], i = /* @__PURE__ */ new Set(), a = null;
|
|
152
190
|
function o(e) {
|
|
153
191
|
let o = t(e);
|
|
@@ -171,41 +209,41 @@ function le(e, t, n) {
|
|
|
171
209
|
}
|
|
172
210
|
//#endregion
|
|
173
211
|
//#region src/components/viewer-core/dom.ts
|
|
174
|
-
function
|
|
212
|
+
function Q(e) {
|
|
175
213
|
return e instanceof HTMLElement && [
|
|
176
214
|
"INPUT",
|
|
177
215
|
"TEXTAREA",
|
|
178
216
|
"SELECT"
|
|
179
217
|
].includes(e.tagName);
|
|
180
218
|
}
|
|
181
|
-
function
|
|
219
|
+
function fe(e) {
|
|
182
220
|
return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
|
|
183
221
|
}
|
|
184
|
-
function
|
|
222
|
+
function pe(e) {
|
|
185
223
|
return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
|
|
186
224
|
}
|
|
187
|
-
function
|
|
225
|
+
function me(e) {
|
|
188
226
|
return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
|
|
189
227
|
}
|
|
190
|
-
function
|
|
228
|
+
function he(e) {
|
|
191
229
|
return e ?? "__vibe_initial_cursor__";
|
|
192
230
|
}
|
|
193
|
-
function
|
|
231
|
+
function ge(e, t, n) {
|
|
194
232
|
return Math.min(Math.max(e, t), n);
|
|
195
233
|
}
|
|
196
234
|
//#endregion
|
|
197
235
|
//#region src/components/viewer-core/removalState.ts
|
|
198
|
-
function
|
|
236
|
+
function _e() {
|
|
199
237
|
let e = T(/* @__PURE__ */ new Set()), t = T([]);
|
|
200
238
|
function n(n) {
|
|
201
|
-
let r =
|
|
239
|
+
let r = ve(n).filter((t) => !e.value.has(t));
|
|
202
240
|
if (!r.length) return { ids: [] };
|
|
203
241
|
let i = new Set(e.value);
|
|
204
242
|
for (let e of r) i.add(e);
|
|
205
243
|
return e.value = i, t.value = [...t.value, r], { ids: r };
|
|
206
244
|
}
|
|
207
245
|
function r(t) {
|
|
208
|
-
let n =
|
|
246
|
+
let n = ve(t).filter((t) => e.value.has(t));
|
|
209
247
|
if (!n.length) return { ids: [] };
|
|
210
248
|
let r = new Set(e.value);
|
|
211
249
|
for (let e of n) r.delete(e);
|
|
@@ -236,68 +274,68 @@ function ge() {
|
|
|
236
274
|
undo: i
|
|
237
275
|
};
|
|
238
276
|
}
|
|
239
|
-
function
|
|
277
|
+
function ve(e) {
|
|
240
278
|
let t = Array.isArray(e) ? e : [e];
|
|
241
279
|
return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
|
|
242
280
|
}
|
|
243
281
|
//#endregion
|
|
244
282
|
//#region src/components/viewer-core/itemIdentity.ts
|
|
245
|
-
var
|
|
246
|
-
function
|
|
247
|
-
let t = e[
|
|
283
|
+
var ye = "__vibeOccurrenceKey";
|
|
284
|
+
function $(e) {
|
|
285
|
+
let t = e[ye];
|
|
248
286
|
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
249
287
|
}
|
|
250
|
-
function
|
|
288
|
+
function be(e, t, n) {
|
|
251
289
|
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
252
290
|
for (let e of t) {
|
|
253
|
-
let t = r.get(e.id), n =
|
|
291
|
+
let t = r.get(e.id), n = $(e);
|
|
254
292
|
t ? t.push(n) : r.set(e.id, [n]);
|
|
255
293
|
}
|
|
256
294
|
for (let t of e) {
|
|
257
295
|
let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
|
|
258
|
-
i.push(
|
|
296
|
+
i.push(xe(t, e));
|
|
259
297
|
}
|
|
260
298
|
return {
|
|
261
299
|
items: i,
|
|
262
300
|
nextSequence: a
|
|
263
301
|
};
|
|
264
302
|
}
|
|
265
|
-
function
|
|
266
|
-
return
|
|
303
|
+
function xe(e, t) {
|
|
304
|
+
return $(e) === t ? e : {
|
|
267
305
|
...e,
|
|
268
|
-
[
|
|
306
|
+
[ye]: t
|
|
269
307
|
};
|
|
270
308
|
}
|
|
271
309
|
//#endregion
|
|
272
310
|
//#region src/components/viewer-core/autoBuckets.ts
|
|
273
|
-
function
|
|
311
|
+
function Se(e) {
|
|
274
312
|
return e.flatMap((e) => e.items);
|
|
275
313
|
}
|
|
276
|
-
function
|
|
314
|
+
function Ce(e, t) {
|
|
277
315
|
return t.size ? e.filter((e) => !t.has(e.id)) : e;
|
|
278
316
|
}
|
|
279
|
-
function
|
|
280
|
-
return
|
|
317
|
+
function we(e, t) {
|
|
318
|
+
return Ce(e.items, t);
|
|
281
319
|
}
|
|
282
|
-
function
|
|
283
|
-
return
|
|
320
|
+
function Te(e, t) {
|
|
321
|
+
return we(e, t).length;
|
|
284
322
|
}
|
|
285
|
-
function
|
|
323
|
+
function Ee(e, t, n) {
|
|
286
324
|
if (n < 0) return null;
|
|
287
325
|
let r = 0;
|
|
288
326
|
for (let i of e) {
|
|
289
|
-
let e =
|
|
327
|
+
let e = we(i, t), a = r + e.length;
|
|
290
328
|
if (n < a) return i.cursor;
|
|
291
329
|
r = a;
|
|
292
330
|
}
|
|
293
331
|
return null;
|
|
294
332
|
}
|
|
295
|
-
function
|
|
333
|
+
function De(e, t, n) {
|
|
296
334
|
let r = [...e], i = r.findIndex((e) => e.cursor === t);
|
|
297
335
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
298
336
|
}
|
|
299
|
-
function
|
|
300
|
-
let r =
|
|
337
|
+
function Oe(e, t, n) {
|
|
338
|
+
let r = be(e, t, n);
|
|
301
339
|
return {
|
|
302
340
|
items: r.items,
|
|
303
341
|
nextSequence: r.nextSequence
|
|
@@ -305,11 +343,11 @@ function Ee(e, t, n) {
|
|
|
305
343
|
}
|
|
306
344
|
//#endregion
|
|
307
345
|
//#region src/components/viewer-core/autoResolveState.ts
|
|
308
|
-
function
|
|
346
|
+
function ke(e) {
|
|
309
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";
|
|
310
348
|
}
|
|
311
|
-
function
|
|
312
|
-
let t =
|
|
349
|
+
function Ae(e) {
|
|
350
|
+
let t = Oe(e.nextItems, e.previousItems, e.sequence);
|
|
313
351
|
return {
|
|
314
352
|
bucket: {
|
|
315
353
|
cursor: e.cursor,
|
|
@@ -320,7 +358,7 @@ function Oe(e) {
|
|
|
320
358
|
nextSequence: t.nextSequence
|
|
321
359
|
};
|
|
322
360
|
}
|
|
323
|
-
function
|
|
361
|
+
function je(e, t, n, r) {
|
|
324
362
|
if (!e.length) return r ? null : {
|
|
325
363
|
buckets: [],
|
|
326
364
|
canceled: r,
|
|
@@ -330,46 +368,46 @@ function ke(e, t, n, r) {
|
|
|
330
368
|
return {
|
|
331
369
|
buckets: i,
|
|
332
370
|
canceled: r,
|
|
333
|
-
visibleCount: i.reduce((e, t) => e +
|
|
371
|
+
visibleCount: i.reduce((e, t) => e + Te(t, n), 0)
|
|
334
372
|
};
|
|
335
373
|
}
|
|
336
|
-
function
|
|
337
|
-
let t =
|
|
374
|
+
function Me(e) {
|
|
375
|
+
let t = Ae({
|
|
338
376
|
cursor: e.initialState.cursor,
|
|
339
377
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
340
378
|
nextItems: e.initialState.items,
|
|
341
379
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
342
380
|
previousItems: [],
|
|
343
381
|
sequence: e.sequence
|
|
344
|
-
}), n =
|
|
382
|
+
}), n = Ce(t.bucket.items, e.removedIds);
|
|
345
383
|
return {
|
|
346
|
-
activeIndex:
|
|
384
|
+
activeIndex: ge(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
|
|
347
385
|
buckets: [t.bucket],
|
|
348
386
|
nextSequence: t.nextSequence
|
|
349
387
|
};
|
|
350
388
|
}
|
|
351
|
-
function
|
|
352
|
-
let n = e[
|
|
353
|
-
return n ?
|
|
389
|
+
function Ne(e, t) {
|
|
390
|
+
let n = e[ge(t, 0, Math.max(0, e.length - 1))];
|
|
391
|
+
return n ? $(n) : null;
|
|
354
392
|
}
|
|
355
|
-
function
|
|
393
|
+
function Pe(e, t, n = null) {
|
|
356
394
|
if (!e.length) return 0;
|
|
357
|
-
let r = n ? e.findIndex((e) =>
|
|
358
|
-
return r >= 0 ? r :
|
|
395
|
+
let r = n ? e.findIndex((e) => $(e) === n) : -1;
|
|
396
|
+
return r >= 0 ? r : ge(t, 0, e.length - 1);
|
|
359
397
|
}
|
|
360
|
-
function
|
|
361
|
-
return e ?
|
|
398
|
+
function Fe(e, t, n) {
|
|
399
|
+
return e ? Te(e, t) < n : !1;
|
|
362
400
|
}
|
|
363
401
|
//#endregion
|
|
364
402
|
//#region src/components/viewer-core/fillDelay.ts
|
|
365
|
-
var
|
|
366
|
-
function
|
|
403
|
+
var Ie = 2e3, Le = 1e3, Re = 100;
|
|
404
|
+
function ze(e, t = Ie, n = Le) {
|
|
367
405
|
return t + Math.max(0, e - 1) * n;
|
|
368
406
|
}
|
|
369
|
-
function
|
|
407
|
+
function Be(e, t) {
|
|
370
408
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
371
409
|
}
|
|
372
|
-
function
|
|
410
|
+
function Ve() {
|
|
373
411
|
let e = T(null), t = null, n = null, r = null;
|
|
374
412
|
function i(i = !1) {
|
|
375
413
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -387,7 +425,7 @@ function ze() {
|
|
|
387
425
|
let t = Math.max(0, a - (Date.now() - s));
|
|
388
426
|
e.value = t, t <= 0 && l();
|
|
389
427
|
};
|
|
390
|
-
t = setInterval(u,
|
|
428
|
+
t = setInterval(u, Re), n = setTimeout(l, a), u();
|
|
391
429
|
}));
|
|
392
430
|
}
|
|
393
431
|
return {
|
|
@@ -398,48 +436,48 @@ function ze() {
|
|
|
398
436
|
}
|
|
399
437
|
//#endregion
|
|
400
438
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
401
|
-
function
|
|
402
|
-
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u =
|
|
439
|
+
function He(e) {
|
|
440
|
+
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(!1), s = T(null), c = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), l = T(null), u = Ve(), d = u.remainingMs, f = T(null), p = T(!1), m = T(!0), h = T(!1), g = /* @__PURE__ */ new Set(), _ = null, v = null, y = 0, S = 0, C = i(() => Be(e.fillDelayMs, Ie)), w = i(() => Be(e.fillDelayStepMs, Le)), E = i(() => typeof e.resolve == "function"), D = i(() => e.mode ?? "dynamic"), O = i(() => me(e.pageSize)), k = i(() => Se(n.value)), A = i(() => Ce(k.value, e.removedIds.value)), j = i(() => r.value), M = i(() => pe(c.value) || p.value), N = i(() => Ue(n.value, e.removedIds.value)), P = i(() => We(n.value, e.removedIds.value)), I = i(() => P.value?.nextCursor ?? null), L = i(() => o.value ? null : N.value?.previousCursor ?? null), R = i(() => !!I.value), z = i(() => !!L.value), B = i(() => E.value && n.value.length > 0), V = i(() => Ce(Se(a.value), e.removedIds.value)), H = i(() => Ee(n.value, e.removedIds.value, j.value)), U = i(() => !A.value.length && !M.value && !!s.value);
|
|
403
441
|
F(() => A.value.length, (e) => {
|
|
404
442
|
if (e === 0) {
|
|
405
443
|
r.value = 0;
|
|
406
444
|
return;
|
|
407
445
|
}
|
|
408
|
-
o.value &&= (
|
|
446
|
+
o.value &&= (ye(), !1), r.value > e - 1 && (r.value = e - 1);
|
|
409
447
|
}), F(() => r.value, () => {
|
|
410
448
|
m.value && se();
|
|
411
449
|
}), x(() => {
|
|
412
|
-
|
|
450
|
+
fe() || e.resolve && W();
|
|
413
451
|
}), b(() => {
|
|
414
452
|
_?.abort(), _ = null, u.clear(!0);
|
|
415
453
|
});
|
|
416
454
|
async function W() {
|
|
417
455
|
v = W;
|
|
418
|
-
let t = await
|
|
456
|
+
let t = await ue({
|
|
419
457
|
continueUntilFilled: D.value === "dynamic",
|
|
420
458
|
cursor: e.initialCursor ?? null,
|
|
421
459
|
direction: "forward",
|
|
422
460
|
phase: "initializing"
|
|
423
461
|
});
|
|
424
|
-
t && (n.value = t.buckets, r.value = 0,
|
|
462
|
+
t && (n.value = t.buckets, r.value = 0, Q());
|
|
425
463
|
}
|
|
426
464
|
async function G() {
|
|
427
465
|
if (!(h.value || M.value)) {
|
|
428
|
-
if (!R.value) return B.value ?
|
|
429
|
-
if (D.value === "static" &&
|
|
466
|
+
if (!R.value) return B.value ? le("trailing") : void 0;
|
|
467
|
+
if (D.value === "static" && ve("trailing")) return le("trailing");
|
|
430
468
|
await ce(I.value);
|
|
431
469
|
}
|
|
432
470
|
}
|
|
433
471
|
async function K() {
|
|
434
472
|
if (!(h.value || !z.value || M.value)) {
|
|
435
|
-
if (D.value === "static" &&
|
|
436
|
-
await
|
|
473
|
+
if (D.value === "static" && ve("leading")) return le("leading");
|
|
474
|
+
await Z(L.value);
|
|
437
475
|
}
|
|
438
476
|
}
|
|
439
477
|
async function q() {
|
|
440
478
|
if (U.value) {
|
|
441
|
-
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0),
|
|
442
|
-
|
|
479
|
+
if (n.value = [], r.value = 0, a.value = [], o.value = !1, s.value = null, c.value = E.value ? "initializing" : "idle", l.value = null, f.value = null, p.value = !1, g.clear(), _?.abort(), _ = null, u.clear(!0), fe()) {
|
|
480
|
+
Q();
|
|
443
481
|
return;
|
|
444
482
|
}
|
|
445
483
|
await W();
|
|
@@ -450,29 +488,29 @@ function Be(e) {
|
|
|
450
488
|
h.value || c.value !== "failed" || !v || (s.value = null, await v());
|
|
451
489
|
}
|
|
452
490
|
async function Y() {
|
|
453
|
-
if (!a.value.length) return p.value = !1,
|
|
454
|
-
n.value = [...n.value, ...a.value], a.value = [], p.value = !1,
|
|
491
|
+
if (!a.value.length) return p.value = !1, Q();
|
|
492
|
+
n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
|
|
455
493
|
}
|
|
456
494
|
function ee(t) {
|
|
457
495
|
let n = A.value;
|
|
458
496
|
if (!n.length) return;
|
|
459
|
-
let i =
|
|
497
|
+
let i = ge(t, 0, n.length - 1);
|
|
460
498
|
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
461
499
|
}
|
|
462
|
-
function
|
|
500
|
+
function X(e) {
|
|
463
501
|
m.value = e;
|
|
464
502
|
}
|
|
465
|
-
function
|
|
503
|
+
function te() {
|
|
466
504
|
h.value = !0, u.clear(!0);
|
|
467
505
|
}
|
|
468
506
|
function ne() {
|
|
469
507
|
h.value = !1;
|
|
470
508
|
}
|
|
471
509
|
function re() {
|
|
472
|
-
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,
|
|
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, Q();
|
|
473
511
|
}
|
|
474
512
|
function ie() {
|
|
475
|
-
return
|
|
513
|
+
return Ne(A.value, j.value);
|
|
476
514
|
}
|
|
477
515
|
function ae(e = null, t = {}) {
|
|
478
516
|
if (A.value.length === 0) {
|
|
@@ -480,7 +518,7 @@ function Be(e) {
|
|
|
480
518
|
return;
|
|
481
519
|
}
|
|
482
520
|
if (e) {
|
|
483
|
-
let t = A.value.findIndex((t) =>
|
|
521
|
+
let t = A.value.findIndex((t) => $(t) === e);
|
|
484
522
|
if (t >= 0) {
|
|
485
523
|
r.value = t;
|
|
486
524
|
return;
|
|
@@ -490,13 +528,13 @@ function Be(e) {
|
|
|
490
528
|
r.value = A.value.length;
|
|
491
529
|
return;
|
|
492
530
|
}
|
|
493
|
-
r.value =
|
|
531
|
+
r.value = Pe(A.value, j.value, e);
|
|
494
532
|
}
|
|
495
533
|
function oe() {
|
|
496
534
|
a.value.length > 0 && !V.value.length && Y();
|
|
497
535
|
}
|
|
498
536
|
async function se() {
|
|
499
|
-
if (!(!m.value ||
|
|
537
|
+
if (!(!m.value || _e())) {
|
|
500
538
|
if (!A.value.length) {
|
|
501
539
|
R.value && await G();
|
|
502
540
|
return;
|
|
@@ -508,23 +546,23 @@ function Be(e) {
|
|
|
508
546
|
v = async () => {
|
|
509
547
|
await ce(e);
|
|
510
548
|
};
|
|
511
|
-
let t = await
|
|
549
|
+
let t = await ue({
|
|
512
550
|
continueUntilFilled: D.value === "dynamic",
|
|
513
551
|
cursor: e,
|
|
514
552
|
direction: "forward",
|
|
515
553
|
phase: "loading"
|
|
516
554
|
});
|
|
517
555
|
if (t) {
|
|
518
|
-
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1,
|
|
519
|
-
if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1,
|
|
556
|
+
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], p.value = !1, Q();
|
|
557
|
+
if (a.value = t.buckets, !V.value.length) return n.value = [...n.value, ...a.value], a.value = [], p.value = !1, Q();
|
|
520
558
|
p.value = !0;
|
|
521
559
|
}
|
|
522
560
|
}
|
|
523
|
-
async function
|
|
561
|
+
async function Z(e) {
|
|
524
562
|
v = async () => {
|
|
525
|
-
await
|
|
563
|
+
await Z(e);
|
|
526
564
|
};
|
|
527
|
-
let t = await
|
|
565
|
+
let t = await ue({
|
|
528
566
|
continueUntilFilled: D.value === "dynamic",
|
|
529
567
|
cursor: e,
|
|
530
568
|
direction: "backward",
|
|
@@ -532,15 +570,15 @@ function Be(e) {
|
|
|
532
570
|
});
|
|
533
571
|
if (!t) return;
|
|
534
572
|
let r = ie();
|
|
535
|
-
n.value = [...t.buckets, ...n.value], ae(r),
|
|
573
|
+
n.value = [...t.buckets, ...n.value], ae(r), Q();
|
|
536
574
|
}
|
|
537
|
-
async function
|
|
575
|
+
async function le(t) {
|
|
538
576
|
if (v = async () => {
|
|
539
|
-
await
|
|
577
|
+
await le(t);
|
|
540
578
|
}, !e.resolve) return;
|
|
541
579
|
let r = t === "leading" ? N.value : P.value;
|
|
542
580
|
if (!r) return;
|
|
543
|
-
let i =
|
|
581
|
+
let i = he(r.cursor);
|
|
544
582
|
if (g.has(i)) return;
|
|
545
583
|
g.add(i), s.value = null, c.value = "refreshing", l.value = null, f.value = null;
|
|
546
584
|
let a = ++y, o = typeof AbortController > "u" ? null : new AbortController();
|
|
@@ -551,18 +589,18 @@ function Be(e) {
|
|
|
551
589
|
pageSize: O.value,
|
|
552
590
|
signal: o?.signal
|
|
553
591
|
});
|
|
554
|
-
if (a !== y) return
|
|
555
|
-
let i =
|
|
592
|
+
if (a !== y) return Q();
|
|
593
|
+
let i = de({
|
|
556
594
|
cursor: r.cursor,
|
|
557
595
|
nextCursor: t.nextPage,
|
|
558
596
|
nextItems: t.items,
|
|
559
597
|
previousCursor: t.previousPage ?? null,
|
|
560
598
|
previousItems: r.items
|
|
561
599
|
}), s = ie();
|
|
562
|
-
n.value =
|
|
600
|
+
n.value = De(n.value, r.cursor, i), ae(s), Q();
|
|
563
601
|
} catch (e) {
|
|
564
|
-
if (
|
|
565
|
-
|
|
602
|
+
if (ke(e) || a !== y) {
|
|
603
|
+
Q();
|
|
566
604
|
return;
|
|
567
605
|
}
|
|
568
606
|
s.value = e instanceof Error ? e.message : "The viewer could not load items.", c.value = "failed", l.value = null, f.value = null;
|
|
@@ -570,13 +608,13 @@ function Be(e) {
|
|
|
570
608
|
_ === o && (_ = null), g.delete(i);
|
|
571
609
|
}
|
|
572
610
|
}
|
|
573
|
-
async function
|
|
611
|
+
async function ue(t) {
|
|
574
612
|
if (!e.resolve) return null;
|
|
575
613
|
let n = ++y, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, o = 0;
|
|
576
614
|
for (s.value = null, c.value = t.phase, l.value = null, f.value = null;;) {
|
|
577
|
-
if (n !== y) return
|
|
578
|
-
if (i.length > 0 && h.value) return
|
|
579
|
-
let d =
|
|
615
|
+
if (n !== y) return je(i, t.direction, e.removedIds.value, !0);
|
|
616
|
+
if (i.length > 0 && h.value) return je(i, t.direction, e.removedIds.value, !1);
|
|
617
|
+
let d = he(a);
|
|
580
618
|
if (r.has(d) || g.has(d)) break;
|
|
581
619
|
r.add(d), g.add(d);
|
|
582
620
|
let p = typeof AbortController > "u" ? null : new AbortController();
|
|
@@ -587,8 +625,8 @@ function Be(e) {
|
|
|
587
625
|
pageSize: O.value,
|
|
588
626
|
signal: p?.signal
|
|
589
627
|
});
|
|
590
|
-
if (n !== y) return
|
|
591
|
-
let s =
|
|
628
|
+
if (n !== y) return je(i, t.direction, e.removedIds.value, !0);
|
|
629
|
+
let s = de({
|
|
592
630
|
cursor: a,
|
|
593
631
|
nextCursor: r.nextPage,
|
|
594
632
|
nextItems: r.items,
|
|
@@ -596,27 +634,27 @@ function Be(e) {
|
|
|
596
634
|
previousItems: []
|
|
597
635
|
});
|
|
598
636
|
i.push(s);
|
|
599
|
-
let d = i.reduce((t, n) => t +
|
|
637
|
+
let d = i.reduce((t, n) => t + Te(n, e.removedIds.value), 0), m = t.direction === "forward" ? s.nextCursor : s.previousCursor;
|
|
600
638
|
if (!t.continueUntilFilled || d >= O.value || !m) return {
|
|
601
639
|
canceled: !1,
|
|
602
640
|
buckets: t.direction === "backward" ? [...i].reverse() : i,
|
|
603
641
|
visibleCount: d
|
|
604
642
|
};
|
|
605
|
-
if (h.value) return
|
|
643
|
+
if (h.value) return je(i, t.direction, e.removedIds.value, !1);
|
|
606
644
|
c.value = "filling", l.value = d, f.value = O.value, o += 1;
|
|
607
|
-
let g =
|
|
608
|
-
if (await u.wait(g), n !== y) return
|
|
645
|
+
let g = ze(o, C.value, w.value);
|
|
646
|
+
if (await u.wait(g), n !== y) return je(i, t.direction, e.removedIds.value, !0);
|
|
609
647
|
a = m;
|
|
610
648
|
} catch (r) {
|
|
611
|
-
return
|
|
649
|
+
return ke(r) || n !== y ? je(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);
|
|
612
650
|
} finally {
|
|
613
651
|
_ === p && (_ = null), g.delete(d);
|
|
614
652
|
}
|
|
615
653
|
}
|
|
616
|
-
return
|
|
654
|
+
return je(i, t.direction, e.removedIds.value, !1);
|
|
617
655
|
}
|
|
618
|
-
function
|
|
619
|
-
let t =
|
|
656
|
+
function de(e) {
|
|
657
|
+
let t = Ae({
|
|
620
658
|
cursor: e.cursor,
|
|
621
659
|
nextCursor: e.nextCursor,
|
|
622
660
|
nextItems: e.nextItems,
|
|
@@ -626,29 +664,29 @@ function Be(e) {
|
|
|
626
664
|
});
|
|
627
665
|
return S = t.nextSequence, t.bucket;
|
|
628
666
|
}
|
|
629
|
-
function
|
|
667
|
+
function Q() {
|
|
630
668
|
c.value = "idle", l.value = null, f.value = null, u.clear();
|
|
631
669
|
}
|
|
632
|
-
function
|
|
670
|
+
function fe() {
|
|
633
671
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
634
|
-
let t =
|
|
672
|
+
let t = Me({
|
|
635
673
|
initialState: e.initialState,
|
|
636
674
|
removedIds: e.removedIds.value,
|
|
637
675
|
sequence: S
|
|
638
676
|
});
|
|
639
677
|
return n.value = t.buckets, r.value = t.activeIndex, S = t.nextSequence, o.value = !1, s.value = null, a.value = [], p.value = !1, !0;
|
|
640
678
|
}
|
|
641
|
-
function
|
|
679
|
+
function _e() {
|
|
642
680
|
return c.value === "initializing";
|
|
643
681
|
}
|
|
644
|
-
function
|
|
645
|
-
return
|
|
682
|
+
function ve(t) {
|
|
683
|
+
return Fe(t === "leading" ? N.value : P.value, e.removedIds.value, O.value);
|
|
646
684
|
}
|
|
647
|
-
function
|
|
648
|
-
let t = n.value.findIndex((t) =>
|
|
685
|
+
function ye() {
|
|
686
|
+
let t = n.value.findIndex((t) => Te(t, e.removedIds.value) > 0);
|
|
649
687
|
if (t < 0) return;
|
|
650
688
|
let r = t;
|
|
651
|
-
for (let i = n.value.length - 1; i >= t; --i) if (
|
|
689
|
+
for (let i = n.value.length - 1; i >= t; --i) if (Te(n.value[i], e.removedIds.value) > 0) {
|
|
652
690
|
r = i;
|
|
653
691
|
break;
|
|
654
692
|
}
|
|
@@ -670,7 +708,7 @@ function Be(e) {
|
|
|
670
708
|
isAutoPrefetchEnabled: m,
|
|
671
709
|
isPageLoadingLocked: h,
|
|
672
710
|
items: A,
|
|
673
|
-
lockPageLoading:
|
|
711
|
+
lockPageLoading: te,
|
|
674
712
|
loading: M,
|
|
675
713
|
mode: D,
|
|
676
714
|
maybePrefetchAround: se,
|
|
@@ -683,27 +721,27 @@ function Be(e) {
|
|
|
683
721
|
retryInitialLoad: q,
|
|
684
722
|
retry: J,
|
|
685
723
|
setActiveIndex: ee,
|
|
686
|
-
setAutoPrefetchEnabled:
|
|
724
|
+
setAutoPrefetchEnabled: X,
|
|
687
725
|
syncActiveIndexAfterVisibilityChange: ae,
|
|
688
726
|
unlockPageLoading: ne,
|
|
689
727
|
getActiveOccurrenceKey: ie,
|
|
690
728
|
maybeCommitPendingAppendWhenFilteredOut: oe
|
|
691
729
|
};
|
|
692
730
|
}
|
|
693
|
-
function
|
|
694
|
-
return e.find((e) =>
|
|
731
|
+
function Ue(e, t) {
|
|
732
|
+
return e.find((e) => Te(e, t) > 0) ?? e[0] ?? null;
|
|
695
733
|
}
|
|
696
|
-
function
|
|
734
|
+
function We(e, t) {
|
|
697
735
|
for (let n = e.length - 1; n >= 0; --n) {
|
|
698
736
|
let r = e[n];
|
|
699
|
-
if (
|
|
737
|
+
if (Te(r, t) > 0) return r;
|
|
700
738
|
}
|
|
701
739
|
return e[e.length - 1] ?? null;
|
|
702
740
|
}
|
|
703
741
|
//#endregion
|
|
704
742
|
//#region src/components/viewer-core/useDataSource.ts
|
|
705
|
-
function
|
|
706
|
-
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } =
|
|
743
|
+
function Ge(e, t) {
|
|
744
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = _e(), l = He({
|
|
707
745
|
emit: t,
|
|
708
746
|
fillDelayMs: e.fillDelayMs,
|
|
709
747
|
fillDelayStepMs: e.fillDelayStepMs,
|
|
@@ -791,9 +829,9 @@ function Ue(e, t) {
|
|
|
791
829
|
}
|
|
792
830
|
//#endregion
|
|
793
831
|
//#region src/components/viewer-core/useController.ts
|
|
794
|
-
var
|
|
795
|
-
function
|
|
796
|
-
let n =
|
|
832
|
+
var Ke = 1024;
|
|
833
|
+
function qe(e, t) {
|
|
834
|
+
let n = Ge(e, t), r = T(0), a = T("list"), o = C({
|
|
797
835
|
activeIndex: 0,
|
|
798
836
|
currentCursor: null,
|
|
799
837
|
errorMessage: null,
|
|
@@ -812,7 +850,7 @@ function Ge(e, t) {
|
|
|
812
850
|
removedCount: 0,
|
|
813
851
|
removedIds: [],
|
|
814
852
|
surfaceMode: "list"
|
|
815
|
-
}), s = i(() => r.value >=
|
|
853
|
+
}), s = i(() => r.value >= Ke), c = i(() => s.value ? a.value : "fullscreen"), l = i(() => s.value && c.value === "fullscreen");
|
|
816
854
|
F(s, (e) => {
|
|
817
855
|
e && m();
|
|
818
856
|
}), F(() => e.surfaceMode, () => {
|
|
@@ -842,7 +880,7 @@ function Ge(e, t) {
|
|
|
842
880
|
!s.value || a.value === "list" || (a.value = "list", t("update:surfaceMode", "list"));
|
|
843
881
|
}
|
|
844
882
|
function f(e) {
|
|
845
|
-
e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" ||
|
|
883
|
+
e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" || Q(e.target) || (e.preventDefault(), d());
|
|
846
884
|
}
|
|
847
885
|
function p() {
|
|
848
886
|
r.value = window.innerWidth || 0;
|
|
@@ -868,29 +906,67 @@ function Ge(e, t) {
|
|
|
868
906
|
}
|
|
869
907
|
//#endregion
|
|
870
908
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
871
|
-
var
|
|
909
|
+
var Je = {
|
|
872
910
|
"data-testid": "vibe-media-bar",
|
|
873
911
|
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]"
|
|
874
|
-
},
|
|
912
|
+
}, Ye = { 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]" }, Xe = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Ze = { class: "relative h-4 w-full" }, Qe = [
|
|
875
913
|
"max",
|
|
876
914
|
"value",
|
|
877
915
|
"disabled"
|
|
878
|
-
],
|
|
916
|
+
], $e = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, et = ["data-layout"], tt = {
|
|
917
|
+
key: 0,
|
|
918
|
+
"data-testid": "vibe-media-volume-popover",
|
|
919
|
+
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]"
|
|
920
|
+
}, nt = { class: "relative flex h-28 w-4 items-center justify-center" }, rt = ["value"], it = { class: "flex items-center gap-3" }, at = ["aria-label"], ot = {
|
|
921
|
+
key: 0,
|
|
922
|
+
class: "relative h-4 w-24"
|
|
923
|
+
}, st = ["value"], ct = /* @__PURE__ */ d({
|
|
879
924
|
__name: "FullscreenMediaBar",
|
|
880
925
|
props: {
|
|
881
926
|
currentTime: {},
|
|
882
927
|
currentTimeLabel: {},
|
|
883
928
|
duration: {},
|
|
884
929
|
durationLabel: {},
|
|
885
|
-
|
|
930
|
+
muted: { type: Boolean },
|
|
931
|
+
progress: {},
|
|
932
|
+
volume: {},
|
|
933
|
+
volumeControlLayout: {}
|
|
886
934
|
},
|
|
887
|
-
emits: [
|
|
935
|
+
emits: [
|
|
936
|
+
"seek-input",
|
|
937
|
+
"volume-input",
|
|
938
|
+
"volume-toggle"
|
|
939
|
+
],
|
|
888
940
|
setup(e, { emit: t }) {
|
|
889
|
-
let n = e, r = t;
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
941
|
+
let n = e, r = t, l = T(null), u = T(!1), d = i(() => n.volumeControlLayout === "vertical"), f = i(() => w(n.volume, 0, 1)), p = i(() => Math.round(f.value * 100)), m = i(() => n.muted || f.value <= 0 ? Z : f.value < .5 ? se : ce), 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}%` });
|
|
942
|
+
F(d, (e) => {
|
|
943
|
+
e || (u.value = !1);
|
|
944
|
+
}), x(() => {
|
|
945
|
+
document.addEventListener("pointerdown", v);
|
|
946
|
+
}), b(() => {
|
|
947
|
+
document.removeEventListener("pointerdown", v);
|
|
948
|
+
});
|
|
949
|
+
function v(e) {
|
|
950
|
+
!d.value || !u.value || l.value && e.target instanceof Node && !l.value.contains(e.target) && (u.value = !1);
|
|
951
|
+
}
|
|
952
|
+
function C() {
|
|
953
|
+
if (!d.value) {
|
|
954
|
+
r("volume-toggle");
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
if (!u.value) {
|
|
958
|
+
u.value = !0;
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
r("volume-toggle");
|
|
962
|
+
}
|
|
963
|
+
function w(e, t, n) {
|
|
964
|
+
return Math.min(Math.max(e, t), n);
|
|
965
|
+
}
|
|
966
|
+
return (e, t) => (S(), s("div", Je, [c("div", Ye, [
|
|
967
|
+
c("span", Xe, k(n.currentTimeLabel), 1),
|
|
968
|
+
c("div", Ze, [
|
|
969
|
+
t[3] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
894
970
|
c("div", {
|
|
895
971
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
896
972
|
style: y({ width: `${n.progress}%` })
|
|
@@ -906,25 +982,77 @@ var Ke = {
|
|
|
906
982
|
disabled: n.duration <= 0,
|
|
907
983
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
908
984
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
909
|
-
}, null, 40,
|
|
985
|
+
}, null, 40, Qe)
|
|
910
986
|
]),
|
|
911
|
-
c("span",
|
|
987
|
+
c("span", $e, k(n.durationLabel), 1),
|
|
988
|
+
c("div", {
|
|
989
|
+
ref_key: "rootRef",
|
|
990
|
+
ref: l,
|
|
991
|
+
"data-testid": "vibe-media-volume",
|
|
992
|
+
"data-layout": n.volumeControlLayout,
|
|
993
|
+
class: "relative flex items-center justify-end"
|
|
994
|
+
}, [d.value && u.value ? (S(), s("div", tt, [c("div", nt, [
|
|
995
|
+
t[4] ||= c("div", { class: "absolute bottom-0 left-1/2 h-full w-px -translate-x-1/2 bg-white/12" }, null, -1),
|
|
996
|
+
c("div", {
|
|
997
|
+
class: "absolute bottom-0 left-1/2 w-px -translate-x-1/2 bg-[#f7f1ea]",
|
|
998
|
+
style: y(_.value)
|
|
999
|
+
}, null, 4),
|
|
1000
|
+
c("input", {
|
|
1001
|
+
"data-testid": "vibe-media-volume-slider",
|
|
1002
|
+
"data-swipe-lock": "true",
|
|
1003
|
+
type: "range",
|
|
1004
|
+
"aria-label": "Adjust active media volume",
|
|
1005
|
+
min: "0",
|
|
1006
|
+
max: "1",
|
|
1007
|
+
step: "0.05",
|
|
1008
|
+
value: f.value,
|
|
1009
|
+
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",
|
|
1010
|
+
onInput: t[1] ||= (e) => r("volume-input", e)
|
|
1011
|
+
}, null, 40, rt)
|
|
1012
|
+
])])) : o("", !0), c("div", it, [c("button", {
|
|
1013
|
+
type: "button",
|
|
1014
|
+
"data-testid": "vibe-media-volume-button",
|
|
1015
|
+
"aria-label": g.value,
|
|
1016
|
+
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",
|
|
1017
|
+
onClick: C
|
|
1018
|
+
}, [(S(), a(O(m.value), {
|
|
1019
|
+
class: "h-4 w-4 stroke-[1.9]",
|
|
1020
|
+
"aria-hidden": "true"
|
|
1021
|
+
}))], 8, at), n.volumeControlLayout === "horizontal" ? (S(), s("div", ot, [
|
|
1022
|
+
t[5] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
1023
|
+
c("div", {
|
|
1024
|
+
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
1025
|
+
style: y(_.value)
|
|
1026
|
+
}, null, 4),
|
|
1027
|
+
c("input", {
|
|
1028
|
+
"data-testid": "vibe-media-volume-slider",
|
|
1029
|
+
"data-swipe-lock": "true",
|
|
1030
|
+
type: "range",
|
|
1031
|
+
"aria-label": "Adjust active media volume",
|
|
1032
|
+
min: "0",
|
|
1033
|
+
max: "1",
|
|
1034
|
+
step: "0.05",
|
|
1035
|
+
value: f.value,
|
|
1036
|
+
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent",
|
|
1037
|
+
onInput: t[2] ||= (e) => r("volume-input", e)
|
|
1038
|
+
}, null, 40, st)
|
|
1039
|
+
])) : o("", !0)])], 8, et)
|
|
912
1040
|
])]));
|
|
913
1041
|
}
|
|
914
|
-
}),
|
|
1042
|
+
}), lt = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, ut = { class: "grid gap-4" }, dt = { class: "flex min-h-11 items-center justify-between gap-4" }, ft = { class: "min-w-0 flex flex-1 items-center gap-3" }, pt = {
|
|
915
1043
|
key: 1,
|
|
916
1044
|
"data-testid": "vibe-title",
|
|
917
1045
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
918
|
-
},
|
|
1046
|
+
}, mt = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, ht = {
|
|
919
1047
|
"data-testid": "vibe-pagination",
|
|
920
1048
|
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]"
|
|
921
|
-
},
|
|
1049
|
+
}, gt = { class: "whitespace-nowrap" }, _t = {
|
|
922
1050
|
key: 1,
|
|
923
1051
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
924
|
-
},
|
|
1052
|
+
}, vt = {
|
|
925
1053
|
key: 0,
|
|
926
1054
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
927
|
-
},
|
|
1055
|
+
}, yt = /* @__PURE__ */ d({
|
|
928
1056
|
__name: "FullscreenHeader",
|
|
929
1057
|
props: {
|
|
930
1058
|
currentIndex: {},
|
|
@@ -938,7 +1066,7 @@ var Ke = {
|
|
|
938
1066
|
emits: ["back-to-list"],
|
|
939
1067
|
setup(e, { emit: t }) {
|
|
940
1068
|
let n = e, r = t;
|
|
941
|
-
return (e, t) => (S(), s("div",
|
|
1069
|
+
return (e, t) => (S(), s("div", lt, [c("div", ut, [c("div", dt, [c("div", ft, [n.showBackToList ? (S(), s("button", {
|
|
942
1070
|
key: 0,
|
|
943
1071
|
type: "button",
|
|
944
1072
|
"data-testid": "vibe-back-to-list",
|
|
@@ -948,48 +1076,48 @@ var Ke = {
|
|
|
948
1076
|
}, [u(j(Y), {
|
|
949
1077
|
class: "h-4 w-4 stroke-[2.2]",
|
|
950
1078
|
"aria-hidden": "true"
|
|
951
|
-
})])) : o("", !0), n.title ? (S(), s("h2",
|
|
1079
|
+
})])) : o("", !0), n.title ? (S(), s("h2", pt, k(n.title), 1)) : o("", !0)]), c("div", mt, [c("span", ht, [
|
|
952
1080
|
n.loading ? (S(), a(j(re), {
|
|
953
1081
|
key: 0,
|
|
954
1082
|
"data-testid": "vibe-pagination-spinner",
|
|
955
1083
|
class: "h-3.5 w-3.5 animate-spin stroke-[1.9]",
|
|
956
1084
|
"aria-hidden": "true"
|
|
957
1085
|
})) : o("", !0),
|
|
958
|
-
c("span",
|
|
959
|
-
n.paginationDetail ? (S(), s("span",
|
|
960
|
-
]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div",
|
|
1086
|
+
c("span", gt, k(n.currentIndex + 1) + " / " + k(n.total), 1),
|
|
1087
|
+
n.paginationDetail ? (S(), s("span", _t, k(n.paginationDetail), 1)) : o("", !0)
|
|
1088
|
+
]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", vt, [...t[1] ||= [c("span", { class: "inline-flex items-center border border-amber-300/35 bg-black/40 px-4 py-3 text-[0.74rem] font-bold uppercase tracking-[0.2em] text-amber-200 backdrop-blur-[18px]" }, " End reached ", -1)]])) : o("", !0)]));
|
|
961
1089
|
}
|
|
962
|
-
}),
|
|
1090
|
+
}), bt = {
|
|
963
1091
|
image: ne,
|
|
964
|
-
video:
|
|
1092
|
+
video: X,
|
|
965
1093
|
audio: ee,
|
|
966
|
-
other:
|
|
967
|
-
},
|
|
1094
|
+
other: te
|
|
1095
|
+
}, xt = {
|
|
968
1096
|
image: "Image",
|
|
969
1097
|
video: "Video",
|
|
970
1098
|
audio: "Audio",
|
|
971
1099
|
other: "File"
|
|
972
1100
|
};
|
|
973
|
-
function
|
|
974
|
-
return
|
|
1101
|
+
function St(e) {
|
|
1102
|
+
return bt[e];
|
|
975
1103
|
}
|
|
976
|
-
function
|
|
977
|
-
return
|
|
1104
|
+
function Ct(e) {
|
|
1105
|
+
return xt[e];
|
|
978
1106
|
}
|
|
979
1107
|
//#endregion
|
|
980
1108
|
//#region src/components/viewer-core/useFullscreenSurfaceMedia.ts
|
|
981
|
-
var
|
|
982
|
-
function
|
|
1109
|
+
var wt = 2;
|
|
1110
|
+
function Tt(e) {
|
|
983
1111
|
function t(e, t) {
|
|
984
1112
|
let n = t.title?.trim();
|
|
985
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1113
|
+
return n ? `${e} ${n}` : `${e} ${Ct(t.type).toLowerCase()}`;
|
|
986
1114
|
}
|
|
987
1115
|
function n(e) {
|
|
988
|
-
return
|
|
1116
|
+
return $(e);
|
|
989
1117
|
}
|
|
990
1118
|
function r(t) {
|
|
991
1119
|
let n = e.resolvedActiveIndex.value;
|
|
992
|
-
return !!e.active.value && t >= n && t <= n +
|
|
1120
|
+
return !!e.active.value && t >= n && t <= n + wt;
|
|
993
1121
|
}
|
|
994
1122
|
function i(t, i) {
|
|
995
1123
|
let a = n(i);
|
|
@@ -1024,11 +1152,11 @@ function ht(e) {
|
|
|
1024
1152
|
}
|
|
1025
1153
|
//#endregion
|
|
1026
1154
|
//#region src/components/viewer-core/slotContent.ts
|
|
1027
|
-
function
|
|
1155
|
+
function Et(e) {
|
|
1028
1156
|
if (!Array.isArray(e)) return !1;
|
|
1029
1157
|
for (let t of e) {
|
|
1030
1158
|
if (Array.isArray(t)) {
|
|
1031
|
-
if (
|
|
1159
|
+
if (Et(t)) return !0;
|
|
1032
1160
|
continue;
|
|
1033
1161
|
}
|
|
1034
1162
|
if (!m(t)) {
|
|
@@ -1039,20 +1167,20 @@ function gt(e) {
|
|
|
1039
1167
|
if (t != null && t !== !1) return !0;
|
|
1040
1168
|
continue;
|
|
1041
1169
|
}
|
|
1042
|
-
if (!
|
|
1170
|
+
if (!Dt(t)) return !0;
|
|
1043
1171
|
}
|
|
1044
1172
|
return !1;
|
|
1045
1173
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1174
|
+
function Dt(r) {
|
|
1175
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Et(r.children) : !1;
|
|
1048
1176
|
}
|
|
1049
1177
|
//#endregion
|
|
1050
1178
|
//#region src/components/viewer-core/useSurfaceEmptyState.ts
|
|
1051
|
-
var
|
|
1052
|
-
function
|
|
1179
|
+
var Ot = "no items available";
|
|
1180
|
+
function kt(e) {
|
|
1053
1181
|
let t = i(() => e.loading.value || e.itemCount.value > 0 || e.emptyStateMode.value === "hidden" ? null : {
|
|
1054
1182
|
loading: !!e.loading.value,
|
|
1055
|
-
message:
|
|
1183
|
+
message: Ot,
|
|
1056
1184
|
mode: e.emptyStateMode.value === "badge" ? "badge" : "inline",
|
|
1057
1185
|
surface: e.surface,
|
|
1058
1186
|
total: e.itemCount.value
|
|
@@ -1060,23 +1188,23 @@ function yt(e) {
|
|
|
1060
1188
|
return {
|
|
1061
1189
|
emptyStateProps: t,
|
|
1062
1190
|
showBadgeEmptyState: i(() => t.value?.mode === "badge"),
|
|
1063
|
-
showCustomEmptyState: i(() =>
|
|
1191
|
+
showCustomEmptyState: i(() => Et(n.value)),
|
|
1064
1192
|
showInlineEmptyState: i(() => t.value?.mode === "inline")
|
|
1065
1193
|
};
|
|
1066
1194
|
}
|
|
1067
1195
|
//#endregion
|
|
1068
1196
|
//#region src/components/viewer-core/format.ts
|
|
1069
|
-
function
|
|
1197
|
+
function At(e) {
|
|
1070
1198
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1071
1199
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1072
1200
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1073
1201
|
}
|
|
1074
1202
|
//#endregion
|
|
1075
1203
|
//#region src/components/viewer-core/surfaceStatus.ts
|
|
1076
|
-
function
|
|
1204
|
+
function jt(e) {
|
|
1077
1205
|
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
1078
1206
|
}
|
|
1079
|
-
function
|
|
1207
|
+
function Mt(e) {
|
|
1080
1208
|
return e.phase === "failed" ? {
|
|
1081
1209
|
kind: "failed",
|
|
1082
1210
|
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
@@ -1099,7 +1227,7 @@ function St(e) {
|
|
|
1099
1227
|
}
|
|
1100
1228
|
//#endregion
|
|
1101
1229
|
//#region src/components/viewer-core/useActivation.ts
|
|
1102
|
-
function
|
|
1230
|
+
function Nt(e) {
|
|
1103
1231
|
let t = !1;
|
|
1104
1232
|
F(e.enabled, async (t) => {
|
|
1105
1233
|
if (n(t), t) {
|
|
@@ -1122,42 +1250,44 @@ function Ct(e) {
|
|
|
1122
1250
|
}
|
|
1123
1251
|
//#endregion
|
|
1124
1252
|
//#region src/components/viewer-core/assetState.ts
|
|
1125
|
-
var
|
|
1253
|
+
var Pt = {
|
|
1126
1254
|
currentTime: 0,
|
|
1127
1255
|
duration: 0,
|
|
1128
1256
|
errorKind: null,
|
|
1257
|
+
muted: !1,
|
|
1129
1258
|
paused: !0,
|
|
1130
|
-
ready: !1
|
|
1259
|
+
ready: !1,
|
|
1260
|
+
volume: 1
|
|
1131
1261
|
};
|
|
1132
|
-
function
|
|
1133
|
-
return { ...
|
|
1262
|
+
function Ft() {
|
|
1263
|
+
return { ...Pt };
|
|
1134
1264
|
}
|
|
1135
|
-
function
|
|
1265
|
+
function It(e) {
|
|
1136
1266
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1137
1267
|
}
|
|
1138
|
-
function
|
|
1139
|
-
e.currentTime = Number.isFinite(t.currentTime) ? t.currentTime : 0, e.duration = Number.isFinite(t.duration) ? t.duration : 0, e.paused = t.paused, n && n !== "error" && (e.errorKind = null), e.ready =
|
|
1268
|
+
function Lt(e, t, n) {
|
|
1269
|
+
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 = Rt(t, n);
|
|
1140
1270
|
}
|
|
1141
|
-
function
|
|
1271
|
+
function Rt(e, t) {
|
|
1142
1272
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1143
1273
|
}
|
|
1144
1274
|
//#endregion
|
|
1145
1275
|
//#region src/components/viewer-core/loadError.ts
|
|
1146
|
-
var
|
|
1147
|
-
function
|
|
1276
|
+
var zt = /* @__PURE__ */ new Map();
|
|
1277
|
+
function Bt(e) {
|
|
1148
1278
|
return e === "not-found" ? "404" : "Load error";
|
|
1149
1279
|
}
|
|
1150
|
-
function
|
|
1280
|
+
function Vt(e) {
|
|
1151
1281
|
return e === "generic";
|
|
1152
1282
|
}
|
|
1153
|
-
function
|
|
1154
|
-
let t =
|
|
1283
|
+
function Ht(e) {
|
|
1284
|
+
let t = zt.get(e);
|
|
1155
1285
|
if (t) return t;
|
|
1156
|
-
let n =
|
|
1157
|
-
return
|
|
1286
|
+
let n = Ut(e);
|
|
1287
|
+
return zt.set(e, n), n;
|
|
1158
1288
|
}
|
|
1159
|
-
async function
|
|
1160
|
-
if (!
|
|
1289
|
+
async function Ut(e) {
|
|
1290
|
+
if (!Wt(e)) return "generic";
|
|
1161
1291
|
try {
|
|
1162
1292
|
let t = await fetch(e, { method: "HEAD" });
|
|
1163
1293
|
if (!t.ok && t.status === 404) return "not-found";
|
|
@@ -1166,12 +1296,12 @@ async function Nt(e) {
|
|
|
1166
1296
|
}
|
|
1167
1297
|
return "generic";
|
|
1168
1298
|
}
|
|
1169
|
-
function
|
|
1299
|
+
function Wt(e) {
|
|
1170
1300
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1171
1301
|
}
|
|
1172
1302
|
//#endregion
|
|
1173
1303
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1174
|
-
function
|
|
1304
|
+
function Gt(e) {
|
|
1175
1305
|
try {
|
|
1176
1306
|
let t = e.play();
|
|
1177
1307
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1179,75 +1309,77 @@ function Ft(e) {
|
|
|
1179
1309
|
}
|
|
1180
1310
|
//#endregion
|
|
1181
1311
|
//#region src/components/viewer-core/useMedia.ts
|
|
1182
|
-
function
|
|
1183
|
-
let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(),
|
|
1312
|
+
function Kt(e) {
|
|
1313
|
+
let t = T({}), n = T({}), r = T({}), a = T({}), o = T({}), 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(() => {
|
|
1184
1314
|
let t = /* @__PURE__ */ new Map();
|
|
1185
|
-
for (let n of e.items.value) t.set(
|
|
1315
|
+
for (let n of e.items.value) t.set($(n), n);
|
|
1186
1316
|
return t;
|
|
1187
|
-
}),
|
|
1188
|
-
F(() =>
|
|
1189
|
-
await
|
|
1317
|
+
}), p = i(() => d.value ? r.value[d.value] ?? Pt : Pt), m = i(() => d.value ? p.value.duration : 0), h = i(() => m.value <= 0 ? 0 : qt(p.value.currentTime / m.value * 100, 0, 100)), _ = i(() => u.value ? L(u.value) : null);
|
|
1318
|
+
F(() => u.value, async () => {
|
|
1319
|
+
await S();
|
|
1190
1320
|
}), F(() => e.itemCount.value, async () => {
|
|
1191
|
-
await
|
|
1321
|
+
await S();
|
|
1322
|
+
}), F(() => e.loopFullscreenVideo.value, async () => {
|
|
1323
|
+
await S();
|
|
1192
1324
|
});
|
|
1193
|
-
function
|
|
1325
|
+
function v(e, t) {
|
|
1194
1326
|
if (t instanceof HTMLVideoElement) {
|
|
1195
|
-
|
|
1327
|
+
s.set(e, t), G(e, t);
|
|
1196
1328
|
return;
|
|
1197
1329
|
}
|
|
1198
|
-
|
|
1330
|
+
s.delete(e);
|
|
1199
1331
|
}
|
|
1200
|
-
function
|
|
1332
|
+
function y(e, t) {
|
|
1201
1333
|
if (t instanceof HTMLAudioElement) {
|
|
1202
|
-
|
|
1334
|
+
c.set(e, t), G(e, t);
|
|
1203
1335
|
return;
|
|
1204
1336
|
}
|
|
1205
|
-
|
|
1337
|
+
c.delete(e);
|
|
1206
1338
|
}
|
|
1207
|
-
function
|
|
1208
|
-
r instanceof HTMLImageElement &&
|
|
1339
|
+
function b(e, r) {
|
|
1340
|
+
r instanceof HTMLImageElement && It(r) && (t.value[e] = !0, n.value[e] = null, X(e, r.currentSrc || r.src || ne(e)));
|
|
1209
1341
|
}
|
|
1210
|
-
function
|
|
1211
|
-
|
|
1342
|
+
function x() {
|
|
1343
|
+
U(), a.value = {}, n.value = {}, t.value = {}, o.value = {}, r.value = {}, l.clear();
|
|
1212
1344
|
}
|
|
1213
|
-
async function
|
|
1345
|
+
async function S() {
|
|
1214
1346
|
if (!e.isEnabled.value) {
|
|
1215
|
-
|
|
1347
|
+
U();
|
|
1216
1348
|
return;
|
|
1217
1349
|
}
|
|
1218
1350
|
await g();
|
|
1219
|
-
let t =
|
|
1220
|
-
for (let [
|
|
1221
|
-
if (
|
|
1222
|
-
|
|
1351
|
+
let t = u.value;
|
|
1352
|
+
for (let [n, i] of s.entries()) {
|
|
1353
|
+
if (n !== t || r.value[n]?.errorKind) {
|
|
1354
|
+
H(i, n);
|
|
1223
1355
|
continue;
|
|
1224
1356
|
}
|
|
1225
|
-
|
|
1357
|
+
i.muted = !1, i.loop = e.loopFullscreenVideo.value, i.playsInline = !0, Gt(i), G(n, i);
|
|
1226
1358
|
}
|
|
1227
|
-
for (let [e, n] of
|
|
1359
|
+
for (let [e, n] of c.entries()) {
|
|
1228
1360
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1229
|
-
|
|
1361
|
+
H(n, e);
|
|
1230
1362
|
continue;
|
|
1231
1363
|
}
|
|
1232
|
-
|
|
1364
|
+
Gt(n), G(e, n);
|
|
1233
1365
|
}
|
|
1234
1366
|
}
|
|
1235
|
-
function
|
|
1367
|
+
function C(e, t) {
|
|
1236
1368
|
let n = t.currentTarget instanceof HTMLMediaElement ? t.currentTarget : t.target instanceof HTMLMediaElement ? t.target : null;
|
|
1237
1369
|
if (n) {
|
|
1238
1370
|
let i = r.value[e]?.ready ?? !1;
|
|
1239
|
-
|
|
1371
|
+
G(e, n, t.type);
|
|
1240
1372
|
let a = r.value[e]?.ready ?? !1;
|
|
1241
|
-
!i && a &&
|
|
1373
|
+
!i && a && X(e, n.currentSrc || n.src || ne(e));
|
|
1242
1374
|
}
|
|
1243
1375
|
}
|
|
1244
|
-
function
|
|
1245
|
-
t.value[e] = !0, n.value[e] = null,
|
|
1376
|
+
function w(e, r) {
|
|
1377
|
+
t.value[e] = !0, n.value[e] = null, X(e, r);
|
|
1246
1378
|
}
|
|
1247
|
-
async function
|
|
1248
|
-
let a =
|
|
1379
|
+
async function E(r, i) {
|
|
1380
|
+
let a = te(r) ?? e.activeItem.value;
|
|
1249
1381
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1250
|
-
let o = await
|
|
1382
|
+
let o = await Ht(i);
|
|
1251
1383
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1252
1384
|
item: a,
|
|
1253
1385
|
occurrenceKey: r,
|
|
@@ -1256,8 +1388,8 @@ function It(e) {
|
|
|
1256
1388
|
surface: "fullscreen"
|
|
1257
1389
|
});
|
|
1258
1390
|
}
|
|
1259
|
-
async function
|
|
1260
|
-
let r =
|
|
1391
|
+
async function D(t, n) {
|
|
1392
|
+
let r = J(t), i = W(t), a = te(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1261
1393
|
if (r) {
|
|
1262
1394
|
r.pause();
|
|
1263
1395
|
try {
|
|
@@ -1265,7 +1397,7 @@ function It(e) {
|
|
|
1265
1397
|
} catch {}
|
|
1266
1398
|
}
|
|
1267
1399
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1268
|
-
let o = await
|
|
1400
|
+
let o = await Ht(n);
|
|
1269
1401
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1270
1402
|
item: a,
|
|
1271
1403
|
occurrenceKey: t,
|
|
@@ -1274,137 +1406,152 @@ function It(e) {
|
|
|
1274
1406
|
surface: "fullscreen"
|
|
1275
1407
|
});
|
|
1276
1408
|
}
|
|
1277
|
-
function D(e, t, n) {
|
|
1278
|
-
e.button !== 0 || Date.now() < n || K(o.get(t) ?? null);
|
|
1279
|
-
}
|
|
1280
1409
|
function O(e, t, n) {
|
|
1281
|
-
e.button !== 0 || Date.now() < n ||
|
|
1410
|
+
e.button !== 0 || Date.now() < n || ee(s.get(t) ?? null);
|
|
1411
|
+
}
|
|
1412
|
+
function k(e, t, n) {
|
|
1413
|
+
e.button !== 0 || Date.now() < n || ee(J(t));
|
|
1282
1414
|
}
|
|
1283
|
-
function
|
|
1284
|
-
let t =
|
|
1415
|
+
function A(e) {
|
|
1416
|
+
let t = Y(), n = d.value;
|
|
1285
1417
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1286
1418
|
let r = Number.parseFloat(e.target.value);
|
|
1287
1419
|
if (!Number.isFinite(r)) return;
|
|
1288
|
-
let i =
|
|
1289
|
-
|
|
1290
|
-
}
|
|
1291
|
-
function A(e) {
|
|
1292
|
-
return !!t.value[e] && !n.value[e];
|
|
1420
|
+
let i = qt(r, 0, m.value || 0);
|
|
1421
|
+
K(n, i, t), t.currentTime = i;
|
|
1293
1422
|
}
|
|
1294
1423
|
function j(e) {
|
|
1295
|
-
|
|
1424
|
+
let t = Y(), n = d.value;
|
|
1425
|
+
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1426
|
+
let r = qt(Number.parseFloat(e.target.value), 0, 1);
|
|
1427
|
+
t.volume = r, t.muted = r <= 0, r > 0 && (o.value[n] = r), G(n, t);
|
|
1296
1428
|
}
|
|
1297
|
-
function M(
|
|
1298
|
-
|
|
1429
|
+
function M() {
|
|
1430
|
+
let e = Y(), t = d.value;
|
|
1431
|
+
!e || !t || (e.muted || e.volume <= 0 ? (e.volume = q(t), e.muted = !1, o.value[t] = e.volume) : (o.value[t] = e.volume, e.muted = !0), G(t, e));
|
|
1299
1432
|
}
|
|
1300
1433
|
function N(e) {
|
|
1301
|
-
return
|
|
1434
|
+
return !!t.value[e] && !n.value[e];
|
|
1302
1435
|
}
|
|
1303
1436
|
function P(e) {
|
|
1304
|
-
|
|
1305
|
-
return t ? At(t) : null;
|
|
1437
|
+
return (r.value[e]?.ready ?? !1) && !r.value[e]?.errorKind;
|
|
1306
1438
|
}
|
|
1307
1439
|
function I(e) {
|
|
1308
|
-
return
|
|
1440
|
+
return e.url;
|
|
1309
1441
|
}
|
|
1310
1442
|
function L(e) {
|
|
1443
|
+
return n.value[e] ?? r.value[e]?.errorKind ?? null;
|
|
1444
|
+
}
|
|
1445
|
+
function R(e) {
|
|
1446
|
+
let t = L(e);
|
|
1447
|
+
return t ? Bt(t) : null;
|
|
1448
|
+
}
|
|
1449
|
+
function z(e) {
|
|
1450
|
+
return Vt(L(e));
|
|
1451
|
+
}
|
|
1452
|
+
function B(e) {
|
|
1311
1453
|
return `${e}:${a.value[e] ?? 0}`;
|
|
1312
1454
|
}
|
|
1313
|
-
async function
|
|
1314
|
-
if (!
|
|
1455
|
+
async function V(e) {
|
|
1456
|
+
if (!z(e)) return;
|
|
1315
1457
|
t.value[e] = !1, n.value[e] = null;
|
|
1316
|
-
let r =
|
|
1458
|
+
let r = W(e);
|
|
1317
1459
|
r.currentTime = 0, r.duration = 0, r.paused = !0, r.ready = !1, r.errorKind = null;
|
|
1318
|
-
let i =
|
|
1319
|
-
i &&
|
|
1320
|
-
t.startsWith(`${e}|`) &&
|
|
1321
|
-
}), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await
|
|
1460
|
+
let i = J(e);
|
|
1461
|
+
i && H(i, e), l.forEach((t) => {
|
|
1462
|
+
t.startsWith(`${e}|`) && l.delete(t);
|
|
1463
|
+
}), a.value[e] = (a.value[e] ?? 0) + 1, await g(), await S();
|
|
1322
1464
|
}
|
|
1323
|
-
function
|
|
1465
|
+
function H(e, t) {
|
|
1324
1466
|
e.pause();
|
|
1325
1467
|
try {
|
|
1326
1468
|
e.currentTime = 0;
|
|
1327
1469
|
} catch {}
|
|
1328
|
-
|
|
1470
|
+
G(t, e);
|
|
1329
1471
|
}
|
|
1330
|
-
function
|
|
1331
|
-
for (let [e, t] of
|
|
1332
|
-
for (let [e, t] of
|
|
1472
|
+
function U() {
|
|
1473
|
+
for (let [e, t] of s.entries()) H(t, e);
|
|
1474
|
+
for (let [e, t] of c.entries()) H(t, e);
|
|
1333
1475
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return r.value[e] || (r.value[e] =
|
|
1476
|
+
function W(e) {
|
|
1477
|
+
return r.value[e] || (r.value[e] = Ft()), r.value[e];
|
|
1336
1478
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1479
|
+
function G(e, t, n) {
|
|
1480
|
+
Lt(W(e), t, n), !t.muted && t.volume > 0 && (o.value[e] = t.volume);
|
|
1339
1481
|
}
|
|
1340
|
-
function
|
|
1341
|
-
let r =
|
|
1342
|
-
r.currentTime = t, r.duration = Number.isFinite(n.duration) ? n.duration : r.duration, r.paused = n.paused;
|
|
1482
|
+
function K(e, t, n) {
|
|
1483
|
+
let r = W(e);
|
|
1484
|
+
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;
|
|
1343
1485
|
}
|
|
1344
|
-
function
|
|
1345
|
-
return o.
|
|
1486
|
+
function q(e) {
|
|
1487
|
+
return qt(o.value[e] ?? 1, 0, 1);
|
|
1346
1488
|
}
|
|
1347
|
-
function
|
|
1348
|
-
return
|
|
1489
|
+
function J(e) {
|
|
1490
|
+
return s.get(e) ?? c.get(e) ?? null;
|
|
1349
1491
|
}
|
|
1350
|
-
function
|
|
1492
|
+
function Y() {
|
|
1493
|
+
return d.value ? J(d.value) : null;
|
|
1494
|
+
}
|
|
1495
|
+
function ee(e) {
|
|
1351
1496
|
if (e) {
|
|
1352
1497
|
if (e.paused) {
|
|
1353
|
-
|
|
1498
|
+
Gt(e);
|
|
1354
1499
|
return;
|
|
1355
1500
|
}
|
|
1356
1501
|
e.pause();
|
|
1357
1502
|
}
|
|
1358
1503
|
}
|
|
1359
|
-
function
|
|
1360
|
-
let r =
|
|
1504
|
+
function X(t, n) {
|
|
1505
|
+
let r = te(t) ?? e.activeMediaItem.value ?? e.activeItem.value;
|
|
1361
1506
|
if (!r || !n) return;
|
|
1362
1507
|
let i = `${t}|${n}`;
|
|
1363
|
-
|
|
1508
|
+
l.has(i) || (l.add(i), e.onAssetLoad?.({
|
|
1364
1509
|
item: r,
|
|
1365
1510
|
occurrenceKey: t,
|
|
1366
1511
|
surface: "fullscreen",
|
|
1367
1512
|
url: n
|
|
1368
1513
|
}));
|
|
1369
1514
|
}
|
|
1370
|
-
function
|
|
1371
|
-
return
|
|
1515
|
+
function te(e) {
|
|
1516
|
+
return f.value.get(e) ?? null;
|
|
1372
1517
|
}
|
|
1373
|
-
function
|
|
1374
|
-
return
|
|
1518
|
+
function ne(e) {
|
|
1519
|
+
return te(e)?.url ?? null;
|
|
1375
1520
|
}
|
|
1376
1521
|
return {
|
|
1377
|
-
activeAssetErrorKind:
|
|
1378
|
-
activeMediaDuration:
|
|
1379
|
-
activeMediaProgress:
|
|
1380
|
-
activeMediaState:
|
|
1381
|
-
getAssetErrorKind:
|
|
1382
|
-
getAssetErrorLabel:
|
|
1383
|
-
getAssetRenderKey:
|
|
1384
|
-
getImageSource:
|
|
1385
|
-
isImageReady:
|
|
1386
|
-
isMediaReady:
|
|
1387
|
-
canRetryAsset:
|
|
1522
|
+
activeAssetErrorKind: _,
|
|
1523
|
+
activeMediaDuration: m,
|
|
1524
|
+
activeMediaProgress: h,
|
|
1525
|
+
activeMediaState: p,
|
|
1526
|
+
getAssetErrorKind: L,
|
|
1527
|
+
getAssetErrorLabel: R,
|
|
1528
|
+
getAssetRenderKey: B,
|
|
1529
|
+
getImageSource: I,
|
|
1530
|
+
isImageReady: N,
|
|
1531
|
+
isMediaReady: P,
|
|
1532
|
+
canRetryAsset: z,
|
|
1388
1533
|
mediaStates: r,
|
|
1389
|
-
onAudioCoverClick:
|
|
1390
|
-
onImageError:
|
|
1391
|
-
onImageLoad:
|
|
1392
|
-
onMediaError:
|
|
1393
|
-
onMediaEvent:
|
|
1394
|
-
onMediaSeekInput:
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1534
|
+
onAudioCoverClick: k,
|
|
1535
|
+
onImageError: E,
|
|
1536
|
+
onImageLoad: w,
|
|
1537
|
+
onMediaError: D,
|
|
1538
|
+
onMediaEvent: C,
|
|
1539
|
+
onMediaSeekInput: A,
|
|
1540
|
+
onMediaVolumeInput: j,
|
|
1541
|
+
onMediaVolumeToggle: M,
|
|
1542
|
+
onVideoClick: O,
|
|
1543
|
+
registerAudioElement: y,
|
|
1544
|
+
registerImageElement: b,
|
|
1545
|
+
registerVideoElement: v,
|
|
1546
|
+
resetMediaState: x,
|
|
1547
|
+
retryAsset: V,
|
|
1548
|
+
syncMediaPlayback: S
|
|
1402
1549
|
};
|
|
1403
1550
|
}
|
|
1404
|
-
function
|
|
1551
|
+
function qt(e, t, n) {
|
|
1405
1552
|
return Math.min(Math.max(e, t), n);
|
|
1406
1553
|
}
|
|
1407
|
-
function
|
|
1554
|
+
function Jt(e, t, n = 2) {
|
|
1408
1555
|
return t <= 0 ? {
|
|
1409
1556
|
start: 0,
|
|
1410
1557
|
end: -1
|
|
@@ -1413,14 +1560,14 @@ function Rt(e, t, n = 2) {
|
|
|
1413
1560
|
end: Math.min(t - 1, e + n)
|
|
1414
1561
|
};
|
|
1415
1562
|
}
|
|
1416
|
-
function
|
|
1417
|
-
let r =
|
|
1563
|
+
function Yt(e, t, n = 2) {
|
|
1564
|
+
let r = Jt(t, e.length, n);
|
|
1418
1565
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1419
1566
|
item: e,
|
|
1420
1567
|
index: r.start + t
|
|
1421
1568
|
}));
|
|
1422
1569
|
}
|
|
1423
|
-
function
|
|
1570
|
+
function Xt(e, t, n, r, i) {
|
|
1424
1571
|
return {
|
|
1425
1572
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1426
1573
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1428,174 +1575,232 @@ function Bt(e, t, n, r, i) {
|
|
|
1428
1575
|
}
|
|
1429
1576
|
//#endregion
|
|
1430
1577
|
//#region src/components/viewer-core/useViewer.ts
|
|
1431
|
-
function
|
|
1432
|
-
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.paginationDetail ?? null),
|
|
1578
|
+
function Zt(e, t, n = {}) {
|
|
1579
|
+
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(() => jt({
|
|
1433
1580
|
itemCount: r.value.length,
|
|
1434
1581
|
loading: s.value,
|
|
1435
1582
|
phase: e.phase
|
|
1436
|
-
})),
|
|
1583
|
+
})), f = i(() => !1), p = T(null), m = T(0), h = T(!1), g = T(1), _ = n.enabled ?? i(() => !0), v = null, y = 0, b = 0, x = 0, S = i(() => r.value.length === 0 ? 0 : P(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), E = Kt({
|
|
1437
1584
|
items: r,
|
|
1438
|
-
activeItem:
|
|
1439
|
-
activeMediaItem:
|
|
1440
|
-
isEnabled:
|
|
1585
|
+
activeItem: C,
|
|
1586
|
+
activeMediaItem: w,
|
|
1587
|
+
isEnabled: _,
|
|
1441
1588
|
itemCount: i(() => r.value.length),
|
|
1589
|
+
loopFullscreenVideo: l,
|
|
1442
1590
|
onAssetError: n.onAssetError,
|
|
1443
1591
|
onAssetLoad: n.onAssetLoad
|
|
1444
|
-
}),
|
|
1592
|
+
}), D = i(() => r.value.length > 0 && S.value === r.value.length - 1), O = i(() => Mt({
|
|
1445
1593
|
errorMessage: o.value,
|
|
1446
1594
|
hasItems: r.value.length > 0,
|
|
1447
1595
|
hasNextPage: c.value,
|
|
1448
|
-
phase:
|
|
1596
|
+
phase: d.value,
|
|
1449
1597
|
surface: "fullscreen"
|
|
1450
|
-
})),
|
|
1451
|
-
|
|
1452
|
-
enabled:
|
|
1598
|
+
})), k = i(() => O.value?.kind ?? null), A = i(() => O.value?.message ?? null), j = i(() => Math.min(96, g.value * .15 || 96)), M = i(() => Jt(S.value, r.value.length)), N = i(() => Yt(r.value, S.value));
|
|
1599
|
+
Nt({
|
|
1600
|
+
enabled: _,
|
|
1453
1601
|
onDisable() {
|
|
1454
|
-
|
|
1602
|
+
W(), E.resetMediaState();
|
|
1455
1603
|
},
|
|
1456
1604
|
onEnable() {
|
|
1457
|
-
return
|
|
1605
|
+
return E.syncMediaPlayback();
|
|
1458
1606
|
},
|
|
1459
|
-
onKeydown:
|
|
1460
|
-
onResize:
|
|
1607
|
+
onKeydown: K,
|
|
1608
|
+
onResize: F
|
|
1461
1609
|
});
|
|
1462
|
-
function
|
|
1610
|
+
function P(e, t, n) {
|
|
1463
1611
|
return Math.min(Math.max(e, t), n);
|
|
1464
1612
|
}
|
|
1465
|
-
function
|
|
1466
|
-
|
|
1467
|
-
}
|
|
1468
|
-
function F(e) {
|
|
1469
|
-
return r.value.length === 0 ? !1 : N(x.value + e, 0, r.value.length - 1) !== x.value;
|
|
1613
|
+
function F() {
|
|
1614
|
+
g.value = p.value?.clientHeight || window.innerHeight || 1;
|
|
1470
1615
|
}
|
|
1471
1616
|
function I(e) {
|
|
1472
|
-
|
|
1473
|
-
let n = N(x.value + e, 0, r.value.length - 1);
|
|
1474
|
-
n !== x.value && t("update:activeIndex", n);
|
|
1617
|
+
return r.value.length === 0 ? !1 : P(S.value + e, 0, r.value.length - 1) !== S.value;
|
|
1475
1618
|
}
|
|
1476
1619
|
function L(e) {
|
|
1477
|
-
|
|
1478
|
-
|
|
1620
|
+
if (r.value.length === 0) return;
|
|
1621
|
+
let n = P(S.value + e, 0, r.value.length - 1);
|
|
1622
|
+
n !== S.value && t("update:activeIndex", n);
|
|
1479
1623
|
}
|
|
1480
1624
|
function R(e) {
|
|
1481
|
-
|
|
1625
|
+
let t = e > 0, n = e < 0;
|
|
1626
|
+
return t && !I(-1) || n && !I(1) ? e * .24 : e;
|
|
1482
1627
|
}
|
|
1483
1628
|
function z(e) {
|
|
1484
|
-
!
|
|
1629
|
+
!_.value || r.value.length === 0 || e.pointerType === "mouse" || fe(e.target) || (v = e.pointerId, y = e.clientY, m.value = 0, h.value = !0, p.value?.setPointerCapture?.(e.pointerId));
|
|
1485
1630
|
}
|
|
1486
1631
|
function B(e) {
|
|
1487
|
-
!
|
|
1632
|
+
!_.value || !h.value || v !== e.pointerId || (m.value = R(e.clientY - y));
|
|
1488
1633
|
}
|
|
1489
1634
|
function V(e) {
|
|
1490
|
-
!
|
|
1635
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), U());
|
|
1491
1636
|
}
|
|
1492
|
-
function H() {
|
|
1493
|
-
|
|
1637
|
+
function H(e) {
|
|
1638
|
+
!_.value || v !== e.pointerId || (p.value?.releasePointerCapture?.(e.pointerId), W());
|
|
1494
1639
|
}
|
|
1495
1640
|
function U() {
|
|
1496
|
-
|
|
1641
|
+
Math.abs(m.value) >= j.value && (x = Date.now() + 250, L(m.value < 0 ? 1 : -1)), W();
|
|
1497
1642
|
}
|
|
1498
|
-
function W(
|
|
1499
|
-
|
|
1500
|
-
e.preventDefault();
|
|
1501
|
-
let t = Date.now();
|
|
1502
|
-
t < y || (y = t + 400, I(e.deltaY > 0 ? 1 : -1));
|
|
1643
|
+
function W() {
|
|
1644
|
+
m.value = 0, h.value = !1, v = null;
|
|
1503
1645
|
}
|
|
1504
1646
|
function G(e) {
|
|
1505
|
-
!
|
|
1647
|
+
if (!_.value || r.value.length === 0 || h.value || fe(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
1648
|
+
e.preventDefault();
|
|
1649
|
+
let t = Date.now();
|
|
1650
|
+
t < b || (b = t + 400, L(e.deltaY > 0 ? 1 : -1));
|
|
1506
1651
|
}
|
|
1507
|
-
function K(e
|
|
1508
|
-
|
|
1652
|
+
function K(e) {
|
|
1653
|
+
!_.value || r.value.length === 0 || Q(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), L(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), L(-1)));
|
|
1509
1654
|
}
|
|
1510
1655
|
function q(e, t) {
|
|
1511
|
-
|
|
1656
|
+
E.onVideoClick(e, t, x);
|
|
1512
1657
|
}
|
|
1513
|
-
function J(e) {
|
|
1514
|
-
|
|
1658
|
+
function J(e, t) {
|
|
1659
|
+
E.onAudioCoverClick(e, t, x);
|
|
1515
1660
|
}
|
|
1516
1661
|
function Y(e) {
|
|
1517
|
-
|
|
1662
|
+
E.onMediaSeekInput(e);
|
|
1518
1663
|
}
|
|
1519
1664
|
function ee(e) {
|
|
1520
|
-
|
|
1665
|
+
E.onMediaVolumeInput(e);
|
|
1666
|
+
}
|
|
1667
|
+
function X() {
|
|
1668
|
+
E.onMediaVolumeToggle();
|
|
1521
1669
|
}
|
|
1522
1670
|
function te(e) {
|
|
1523
|
-
return
|
|
1671
|
+
return e.type === "image" || e.type === "video";
|
|
1672
|
+
}
|
|
1673
|
+
function ne(e) {
|
|
1674
|
+
return e.type === "audio";
|
|
1675
|
+
}
|
|
1676
|
+
function re(e) {
|
|
1677
|
+
return Xt(e, S.value, g.value, m.value, h.value);
|
|
1524
1678
|
}
|
|
1525
1679
|
return {
|
|
1526
|
-
activeItem:
|
|
1527
|
-
activeAssetErrorKind:
|
|
1528
|
-
activeMediaDuration:
|
|
1529
|
-
activeMediaItem:
|
|
1530
|
-
activeMediaProgress:
|
|
1531
|
-
activeMediaState:
|
|
1532
|
-
canRetryAsset:
|
|
1533
|
-
canRetryInitialLoad:
|
|
1680
|
+
activeItem: C,
|
|
1681
|
+
activeAssetErrorKind: E.activeAssetErrorKind,
|
|
1682
|
+
activeMediaDuration: E.activeMediaDuration,
|
|
1683
|
+
activeMediaItem: w,
|
|
1684
|
+
activeMediaProgress: E.activeMediaProgress,
|
|
1685
|
+
activeMediaState: E.activeMediaState,
|
|
1686
|
+
canRetryAsset: E.canRetryAsset,
|
|
1687
|
+
canRetryInitialLoad: f,
|
|
1534
1688
|
errorMessage: o,
|
|
1535
|
-
getAssetErrorKind:
|
|
1536
|
-
getAssetErrorLabel:
|
|
1537
|
-
getAssetRenderKey:
|
|
1538
|
-
formatPlaybackTime:
|
|
1539
|
-
getImageSource:
|
|
1540
|
-
getSlideStyle:
|
|
1689
|
+
getAssetErrorKind: E.getAssetErrorKind,
|
|
1690
|
+
getAssetErrorLabel: E.getAssetErrorLabel,
|
|
1691
|
+
getAssetRenderKey: E.getAssetRenderKey,
|
|
1692
|
+
formatPlaybackTime: At,
|
|
1693
|
+
getImageSource: E.getImageSource,
|
|
1694
|
+
getSlideStyle: re,
|
|
1541
1695
|
hasNextPage: c,
|
|
1542
|
-
isAtEnd:
|
|
1543
|
-
isAudio:
|
|
1544
|
-
isVisual:
|
|
1696
|
+
isAtEnd: D,
|
|
1697
|
+
isAudio: ne,
|
|
1698
|
+
isVisual: te,
|
|
1545
1699
|
items: r,
|
|
1546
1700
|
loading: s,
|
|
1547
|
-
mediaStates:
|
|
1548
|
-
isImageReady:
|
|
1549
|
-
isMediaReady:
|
|
1550
|
-
onAudioCoverClick:
|
|
1551
|
-
onImageError:
|
|
1552
|
-
onImageLoad:
|
|
1553
|
-
onMediaEvent:
|
|
1554
|
-
onMediaError:
|
|
1555
|
-
onMediaSeekInput:
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1701
|
+
mediaStates: E.mediaStates,
|
|
1702
|
+
isImageReady: E.isImageReady,
|
|
1703
|
+
isMediaReady: E.isMediaReady,
|
|
1704
|
+
onAudioCoverClick: J,
|
|
1705
|
+
onImageError: E.onImageError,
|
|
1706
|
+
onImageLoad: E.onImageLoad,
|
|
1707
|
+
onMediaEvent: E.onMediaEvent,
|
|
1708
|
+
onMediaError: E.onMediaError,
|
|
1709
|
+
onMediaSeekInput: Y,
|
|
1710
|
+
onMediaVolumeInput: ee,
|
|
1711
|
+
onMediaVolumeToggle: X,
|
|
1712
|
+
onPointerCancel: H,
|
|
1713
|
+
onPointerDown: z,
|
|
1714
|
+
onPointerMove: B,
|
|
1715
|
+
onPointerUp: V,
|
|
1716
|
+
onVideoClick: q,
|
|
1717
|
+
onWheel: G,
|
|
1718
|
+
registerAudioElement: E.registerAudioElement,
|
|
1719
|
+
registerImageElement: E.registerImageElement,
|
|
1720
|
+
registerVideoElement: E.registerVideoElement,
|
|
1721
|
+
renderedItems: N,
|
|
1722
|
+
renderedRange: M,
|
|
1723
|
+
resolvedActiveIndex: S,
|
|
1568
1724
|
retryInitialLoad: async () => {},
|
|
1569
|
-
retryAsset:
|
|
1570
|
-
stageRef:
|
|
1571
|
-
statusKind:
|
|
1572
|
-
statusMessage:
|
|
1573
|
-
paginationDetail:
|
|
1574
|
-
phase:
|
|
1725
|
+
retryAsset: E.retryAsset,
|
|
1726
|
+
stageRef: p,
|
|
1727
|
+
statusKind: k,
|
|
1728
|
+
statusMessage: A,
|
|
1729
|
+
paginationDetail: u,
|
|
1730
|
+
phase: d
|
|
1575
1731
|
};
|
|
1576
1732
|
}
|
|
1577
1733
|
//#endregion
|
|
1578
1734
|
//#region src/components/viewer-core/theme.ts
|
|
1579
|
-
var
|
|
1580
|
-
image:
|
|
1581
|
-
video:
|
|
1582
|
-
audio:
|
|
1583
|
-
other:
|
|
1584
|
-
}, Ut = {
|
|
1585
|
-
image: "bg-[radial-gradient(circle_at_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
|
|
1586
|
-
video: "bg-[radial-gradient(circle_at_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
|
|
1587
|
-
audio: "bg-[radial-gradient(circle_at_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
|
|
1588
|
-
other: "bg-[radial-gradient(circle_at_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
|
|
1735
|
+
var Qt = "bg-[linear-gradient(180deg,#0a0b10,#05060a)]", $t = "bg-[linear-gradient(180deg,#0b0c11,#06070b)]", en = {
|
|
1736
|
+
image: !0,
|
|
1737
|
+
video: !0,
|
|
1738
|
+
audio: !0,
|
|
1739
|
+
other: !0
|
|
1589
1740
|
};
|
|
1590
|
-
function
|
|
1591
|
-
return
|
|
1741
|
+
function tn(e) {
|
|
1742
|
+
return en[e], Qt;
|
|
1592
1743
|
}
|
|
1593
|
-
function
|
|
1594
|
-
return
|
|
1744
|
+
function nn(e) {
|
|
1745
|
+
return en[e], $t;
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region src/components/viewer-core/dominantImageTone.ts
|
|
1749
|
+
function rn(e) {
|
|
1750
|
+
if (e.naturalWidth <= 0 || e.naturalHeight <= 0) return null;
|
|
1751
|
+
let t = document.createElement("canvas"), n = t.getContext("2d", { willReadFrequently: !0 });
|
|
1752
|
+
if (!n) return null;
|
|
1753
|
+
t.width = 24, t.height = 24;
|
|
1754
|
+
try {
|
|
1755
|
+
n.drawImage(e, 0, 0, 24, 24);
|
|
1756
|
+
let { data: t } = n.getImageData(0, 0, 24, 24), r = 0, i = 0, a = 0, o = 0;
|
|
1757
|
+
for (let e = 0; e < t.length; e += 4) {
|
|
1758
|
+
let n = t[e + 3] / 255;
|
|
1759
|
+
if (n <= .05) continue;
|
|
1760
|
+
let s = t[e], c = t[e + 1], l = t[e + 2], u = Math.max(s, c, l), d = n * (.65 + (u === 0 ? 0 : (u - Math.min(s, c, l)) / u) * .7);
|
|
1761
|
+
r += d, i += s * d, a += c * d, o += l * d;
|
|
1762
|
+
}
|
|
1763
|
+
return r <= 0 ? null : {
|
|
1764
|
+
r: an(Math.round(i / r)),
|
|
1765
|
+
g: an(Math.round(a / r)),
|
|
1766
|
+
b: an(Math.round(o / r))
|
|
1767
|
+
};
|
|
1768
|
+
} catch {
|
|
1769
|
+
return null;
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
function an(e) {
|
|
1773
|
+
return Math.min(235, Math.max(26, e));
|
|
1774
|
+
}
|
|
1775
|
+
//#endregion
|
|
1776
|
+
//#region src/components/viewer-core/useFullscreenDominantTone.ts
|
|
1777
|
+
function on(e) {
|
|
1778
|
+
let t = T({}), 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(() => {
|
|
1779
|
+
if (!r.value) return;
|
|
1780
|
+
let { r: e, g: t, b: n } = r.value;
|
|
1781
|
+
return { background: `radial-gradient(circle at top center, rgba(${e},${t},${n},0.34) 0%, transparent 44%), linear-gradient(180deg,#0a0b10,#05060a)` };
|
|
1782
|
+
}), o = i(() => {
|
|
1783
|
+
if (!r.value) return;
|
|
1784
|
+
let { r: e, g: t, b: n } = r.value;
|
|
1785
|
+
return { background: `radial-gradient(circle at center, rgba(${e},${t},${n},0.42) 0%, transparent 44%), linear-gradient(180deg,#0b0c11,#06070b)` };
|
|
1786
|
+
});
|
|
1787
|
+
F(() => e.showDominantImageTone.value, (e) => {
|
|
1788
|
+
e || (t.value = {});
|
|
1789
|
+
});
|
|
1790
|
+
function s(n, r) {
|
|
1791
|
+
if (!e.showDominantImageTone.value) return;
|
|
1792
|
+
let i = rn(r);
|
|
1793
|
+
i && (t.value[n] = i);
|
|
1794
|
+
}
|
|
1795
|
+
return {
|
|
1796
|
+
activeStageToneStyle: a,
|
|
1797
|
+
activeSlideToneStyle: o,
|
|
1798
|
+
updateFromImageElement: s
|
|
1799
|
+
};
|
|
1595
1800
|
}
|
|
1596
1801
|
//#endregion
|
|
1597
1802
|
//#region src/components/SurfaceEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
1598
|
-
var
|
|
1803
|
+
var sn = ["data-surface"], cn = ["data-surface"], ln = /* @__PURE__ */ d({
|
|
1599
1804
|
inheritAttrs: !1,
|
|
1600
1805
|
__name: "SurfaceEmptyState",
|
|
1601
1806
|
props: {
|
|
@@ -1609,31 +1814,32 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1609
1814
|
"data-testid": "vibe-empty-state-inline",
|
|
1610
1815
|
"data-surface": e.surface,
|
|
1611
1816
|
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)]"]
|
|
1612
|
-
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16,
|
|
1817
|
+
}), [D(n.$slots, "default", {}, () => [c("p", { class: _(["m-0 text-[0.82rem] font-medium tracking-[0.08em]", e.surface === "grid" ? "text-[#f7f1ea]/58" : "text-[#f7f1ea]/64"]) }, k(e.message), 3)])], 16, sn)) : (S(), s("div", h({ key: 1 }, j(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]"] }), [D(n.$slots, "default", {}, () => [c("span", {
|
|
1613
1818
|
"data-testid": "vibe-empty-state-badge",
|
|
1614
1819
|
"data-surface": e.surface,
|
|
1615
1820
|
class: _(["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"])
|
|
1616
|
-
}, k(e.message), 11,
|
|
1821
|
+
}, k(e.message), 11, cn)])], 16));
|
|
1617
1822
|
}
|
|
1618
|
-
}),
|
|
1823
|
+
}), un = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, dn = {
|
|
1619
1824
|
key: 0,
|
|
1620
1825
|
class: "relative h-full min-h-0"
|
|
1621
|
-
},
|
|
1826
|
+
}, fn = [
|
|
1622
1827
|
"data-item-id",
|
|
1623
1828
|
"data-occurrence-key",
|
|
1624
1829
|
"data-index",
|
|
1625
1830
|
"data-active",
|
|
1626
1831
|
"aria-hidden"
|
|
1627
|
-
],
|
|
1832
|
+
], pn = {
|
|
1628
1833
|
key: 0,
|
|
1629
1834
|
"data-testid": "vibe-asset-spinner",
|
|
1630
1835
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
1631
|
-
},
|
|
1836
|
+
}, mn = { 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]" }, hn = ["data-kind"], gn = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, _n = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, vn = ["onClick"], yn = [
|
|
1632
1837
|
"src",
|
|
1633
1838
|
"alt",
|
|
1634
1839
|
"onLoad",
|
|
1635
1840
|
"onError"
|
|
1636
|
-
],
|
|
1841
|
+
], bn = [
|
|
1842
|
+
"loop",
|
|
1637
1843
|
"src",
|
|
1638
1844
|
"preload",
|
|
1639
1845
|
"onClick",
|
|
@@ -1650,15 +1856,15 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1650
1856
|
"onStalled",
|
|
1651
1857
|
"onTimeupdate",
|
|
1652
1858
|
"onWaiting"
|
|
1653
|
-
],
|
|
1859
|
+
], xn = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Sn = [
|
|
1654
1860
|
"aria-label",
|
|
1655
1861
|
"disabled",
|
|
1656
1862
|
"onClick"
|
|
1657
|
-
],
|
|
1863
|
+
], Cn = { 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]" }, wn = { 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]" }, Tn = {
|
|
1658
1864
|
key: 0,
|
|
1659
1865
|
"data-testid": "vibe-asset-spinner",
|
|
1660
1866
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
1661
|
-
},
|
|
1867
|
+
}, En = { 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]" }, Dn = ["data-kind"], On = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, kn = ["onClick"], An = [
|
|
1662
1868
|
"src",
|
|
1663
1869
|
"preload",
|
|
1664
1870
|
"onCanplay",
|
|
@@ -1674,25 +1880,25 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1674
1880
|
"onStalled",
|
|
1675
1881
|
"onTimeupdate",
|
|
1676
1882
|
"onWaiting"
|
|
1677
|
-
],
|
|
1883
|
+
], jn = {
|
|
1678
1884
|
key: 2,
|
|
1679
1885
|
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"
|
|
1680
|
-
},
|
|
1886
|
+
}, Mn = { 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]" }, Nn = {
|
|
1681
1887
|
key: 0,
|
|
1682
1888
|
class: "pointer-events-none absolute inset-0 z-[4]"
|
|
1683
|
-
},
|
|
1889
|
+
}, Pn = { class: "h-full w-full" }, Fn = {
|
|
1684
1890
|
key: 1,
|
|
1685
1891
|
"data-testid": "vibe-forward-fill-placeholder",
|
|
1686
1892
|
class: "grid h-full min-h-0 place-items-center px-6 text-center"
|
|
1687
|
-
},
|
|
1893
|
+
}, In = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/40 px-8 py-7 backdrop-blur-[18px]" }, Ln = { 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)]" }, Rn = { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.24em] text-[#f7f1ea]/72" }, zn = {
|
|
1688
1894
|
key: 0,
|
|
1689
1895
|
"data-testid": "vibe-fullscreen-aside",
|
|
1690
1896
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
1691
|
-
},
|
|
1897
|
+
}, Bn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Vn = {
|
|
1692
1898
|
key: 0,
|
|
1693
1899
|
"data-testid": "vibe-fullscreen-aside",
|
|
1694
1900
|
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]"
|
|
1695
|
-
},
|
|
1901
|
+
}, Hn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, Un = 1280, Wn = 768, Gn = /* @__PURE__ */ d({
|
|
1696
1902
|
__name: "FullscreenSurface",
|
|
1697
1903
|
props: {
|
|
1698
1904
|
active: {
|
|
@@ -1711,6 +1917,10 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1711
1917
|
type: Boolean,
|
|
1712
1918
|
default: !1
|
|
1713
1919
|
},
|
|
1920
|
+
loopFullscreenVideo: {
|
|
1921
|
+
type: Boolean,
|
|
1922
|
+
default: !0
|
|
1923
|
+
},
|
|
1714
1924
|
paginationDetail: { default: null },
|
|
1715
1925
|
phase: { default: null },
|
|
1716
1926
|
reportAssetError: {
|
|
@@ -1721,6 +1931,10 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1721
1931
|
type: [Function, null],
|
|
1722
1932
|
default: null
|
|
1723
1933
|
},
|
|
1934
|
+
showDominantImageTone: {
|
|
1935
|
+
type: Boolean,
|
|
1936
|
+
default: !0
|
|
1937
|
+
},
|
|
1724
1938
|
showBackToList: {
|
|
1725
1939
|
type: Boolean,
|
|
1726
1940
|
default: !1
|
|
@@ -1736,17 +1950,22 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1736
1950
|
},
|
|
1737
1951
|
emits: ["back-to-list", "update:activeIndex"],
|
|
1738
1952
|
setup(e, { emit: n }) {
|
|
1739
|
-
let d = e, p = N(), m = n, g =
|
|
1953
|
+
let d = e, p = N(), m = n, g = Zt(d, (e, t) => {
|
|
1740
1954
|
m("update:activeIndex", t);
|
|
1741
1955
|
}, {
|
|
1742
1956
|
enabled: A(d, "active"),
|
|
1743
1957
|
onAssetError: d.reportAssetError ?? void 0,
|
|
1744
1958
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
1745
|
-
}), C = T(typeof window > "u" ?
|
|
1959
|
+
}), C = T(typeof window > "u" ? Un : window.innerWidth || Un), w = Tt({
|
|
1746
1960
|
active: A(d, "active"),
|
|
1747
1961
|
resolvedActiveIndex: g.resolvedActiveIndex,
|
|
1748
1962
|
viewer: g
|
|
1749
|
-
}), M = i(() =>
|
|
1963
|
+
}), M = i(() => tn(g.activeItem.value?.type ?? "image")), { activeSlideToneStyle: P, activeStageToneStyle: F, updateFromImageElement: I } = on({
|
|
1964
|
+
activeItem: g.activeItem,
|
|
1965
|
+
getItemKey: w.getItemKey,
|
|
1966
|
+
isImageReady: g.isImageReady,
|
|
1967
|
+
showDominantImageTone: A(d, "showDominantImageTone")
|
|
1968
|
+
}), R = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), B = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), V = i(() => C.value < Wn ? "vertical" : "horizontal"), H = i(() => B.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), U = i(() => d.activeIndex >= d.items.length && (d.loading || d.hasNextPage)), W = i(() => d.hasNextPage ? "Loading more items" : g.statusMessage.value ?? "Loading more items"), G = i(() => {
|
|
1750
1969
|
let e = g.activeItem.value;
|
|
1751
1970
|
return e ? {
|
|
1752
1971
|
hasNextPage: d.hasNextPage,
|
|
@@ -1756,14 +1975,14 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1756
1975
|
paginationDetail: d.paginationDetail,
|
|
1757
1976
|
total: d.items.length
|
|
1758
1977
|
} : null;
|
|
1759
|
-
}),
|
|
1760
|
-
...
|
|
1978
|
+
}), K = i(() => !G.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](G.value)), q = i(() => !G.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](G.value)), J = i(() => !d.showStatusBadges || !G.value || !g.statusKind.value || !g.statusMessage.value ? null : {
|
|
1979
|
+
...G.value,
|
|
1761
1980
|
kind: g.statusKind.value,
|
|
1762
1981
|
message: g.statusMessage.value
|
|
1763
|
-
}),
|
|
1764
|
-
gridTemplateColumns:
|
|
1982
|
+
}), Y = i(() => !J.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](J.value)), ee = i(() => ({
|
|
1983
|
+
gridTemplateColumns: ne.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
1765
1984
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1766
|
-
})),
|
|
1985
|
+
})), X = i(() => Et(K.value)), te = i(() => Et(q.value)), ne = i(() => te.value && C.value >= Un), se = i(() => te.value && !ne.value), ce = i(() => Et(Y.value)), { emptyStateProps: Z, showBadgeEmptyState: le, showCustomEmptyState: ue, showInlineEmptyState: de } = kt({
|
|
1767
1986
|
emptyStateMode: A(d, "emptyStateMode"),
|
|
1768
1987
|
itemCount: i(() => d.items.length),
|
|
1769
1988
|
loading: A(d, "loading"),
|
|
@@ -1771,18 +1990,32 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1771
1990
|
surface: "fullscreen"
|
|
1772
1991
|
});
|
|
1773
1992
|
x(() => {
|
|
1774
|
-
window.addEventListener("resize",
|
|
1993
|
+
window.addEventListener("resize", Q);
|
|
1775
1994
|
}), b(() => {
|
|
1776
|
-
window.removeEventListener("resize",
|
|
1995
|
+
window.removeEventListener("resize", Q);
|
|
1777
1996
|
});
|
|
1778
|
-
function
|
|
1779
|
-
C.value = window.innerWidth ||
|
|
1997
|
+
function Q() {
|
|
1998
|
+
C.value = window.innerWidth || Un;
|
|
1999
|
+
}
|
|
2000
|
+
function fe(e, t, n) {
|
|
2001
|
+
g.onImageLoad(t, n);
|
|
2002
|
+
let r = e.currentTarget;
|
|
2003
|
+
r instanceof HTMLImageElement && me(t, r);
|
|
2004
|
+
}
|
|
2005
|
+
function pe(e, t) {
|
|
2006
|
+
g.registerImageElement(e, t), t instanceof HTMLImageElement && me(e, t);
|
|
1780
2007
|
}
|
|
1781
|
-
|
|
1782
|
-
|
|
2008
|
+
function me(e, t) {
|
|
2009
|
+
I(e, t);
|
|
2010
|
+
}
|
|
2011
|
+
return (e, n) => (S(), s("div", un, [
|
|
2012
|
+
c("div", {
|
|
2013
|
+
class: _(["absolute inset-0 transition-[background] duration-200", M.value]),
|
|
2014
|
+
style: y(j(F))
|
|
2015
|
+
}, null, 6),
|
|
1783
2016
|
c("div", {
|
|
1784
2017
|
class: "relative z-[1] grid h-full min-h-0",
|
|
1785
|
-
style: y(
|
|
2018
|
+
style: y(ee.value)
|
|
1786
2019
|
}, [c("div", {
|
|
1787
2020
|
ref: "viewer.stageRef",
|
|
1788
2021
|
"data-testid": "vibe-stage",
|
|
@@ -1792,7 +2025,7 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1792
2025
|
onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
|
|
1793
2026
|
onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
|
|
1794
2027
|
onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
|
|
1795
|
-
}, [j(g).activeItem.value ? (S(), s("div",
|
|
2028
|
+
}, [j(g).activeItem.value ? (S(), s("div", dn, [
|
|
1796
2029
|
(S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
|
|
1797
2030
|
key: j(w).getItemKey(r),
|
|
1798
2031
|
"data-testid": "vibe-slide",
|
|
@@ -1803,10 +2036,13 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1803
2036
|
"aria-hidden": i === j(g).resolvedActiveIndex.value ? "false" : "true",
|
|
1804
2037
|
class: _(["absolute inset-0 flex h-full min-h-full items-center justify-center will-change-transform", i === j(g).resolvedActiveIndex.value ? "pointer-events-auto" : "pointer-events-none"]),
|
|
1805
2038
|
style: y(j(g).getSlideStyle(i))
|
|
1806
|
-
}, [c("div", {
|
|
2039
|
+
}, [c("div", {
|
|
2040
|
+
class: _(["absolute inset-0 opacity-85", j(nn)(r.type)]),
|
|
2041
|
+
style: y(i === j(g).resolvedActiveIndex.value && r.type === "image" ? j(P) : void 0)
|
|
2042
|
+
}, null, 6), j(g).isVisual(r) ? (S(), s("div", {
|
|
1807
2043
|
key: 0,
|
|
1808
|
-
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ?
|
|
1809
|
-
}, [j(w).isAssetLoading(i, r) ? (S(), s("div",
|
|
2044
|
+
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? H.value : ""])
|
|
2045
|
+
}, [j(w).isAssetLoading(i, r) ? (S(), s("div", pn, [c("span", mn, [u(j(re), {
|
|
1810
2046
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1811
2047
|
"aria-hidden": "true"
|
|
1812
2048
|
})])])) : o("", !0), j(w).isAssetErrored(i, r) ? (S(), s("div", {
|
|
@@ -1814,33 +2050,34 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1814
2050
|
"data-testid": "vibe-asset-error",
|
|
1815
2051
|
"data-kind": j(w).getAssetErrorKind(r),
|
|
1816
2052
|
class: "grid h-full w-full place-items-center"
|
|
1817
|
-
}, [c("div",
|
|
2053
|
+
}, [c("div", gn, [
|
|
1818
2054
|
u(j(oe), {
|
|
1819
2055
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
1820
2056
|
"aria-hidden": "true"
|
|
1821
2057
|
}),
|
|
1822
|
-
c("p",
|
|
2058
|
+
c("p", _n, k(j(w).getAssetErrorLabel(r)), 1),
|
|
1823
2059
|
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
1824
2060
|
key: 0,
|
|
1825
2061
|
type: "button",
|
|
1826
2062
|
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",
|
|
1827
2063
|
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
1828
|
-
}, " Retry ", 8,
|
|
1829
|
-
])], 8,
|
|
2064
|
+
}, " Retry ", 8, vn)) : o("", !0)
|
|
2065
|
+
])], 8, hn)) : r.type === "image" ? (S(), s("img", {
|
|
1830
2066
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
1831
2067
|
src: j(w).getFullscreenImageSource(i, r),
|
|
1832
2068
|
alt: r.title ?? "",
|
|
2069
|
+
crossorigin: "anonymous",
|
|
1833
2070
|
draggable: "false",
|
|
1834
2071
|
class: _(["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", j(g).isImageReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
1835
2072
|
ref_for: !0,
|
|
1836
|
-
ref: (e) =>
|
|
1837
|
-
onLoad: (e) =>
|
|
2073
|
+
ref: (e) => pe(j(w).getItemKey(r), e),
|
|
2074
|
+
onLoad: (e) => fe(e, j(w).getItemKey(r), r.url),
|
|
1838
2075
|
onError: (e) => j(g).onImageError(j(w).getItemKey(r), r.url)
|
|
1839
|
-
}, null, 42,
|
|
2076
|
+
}, null, 42, yn)) : (S(), s("video", {
|
|
1840
2077
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
1841
2078
|
class: _(["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", j(g).isMediaReady(j(w).getItemKey(r)) ? "opacity-100" : "opacity-0"]),
|
|
1842
2079
|
playsinline: "",
|
|
1843
|
-
|
|
2080
|
+
loop: d.loopFullscreenVideo,
|
|
1844
2081
|
src: j(w).getFullscreenMediaSource(i, r),
|
|
1845
2082
|
preload: j(w).shouldPreloadSlideAsset(i) ? "metadata" : "none",
|
|
1846
2083
|
ref_for: !0,
|
|
@@ -1859,10 +2096,10 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1859
2096
|
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1860
2097
|
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1861
2098
|
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
1862
|
-
}, null, 42,
|
|
2099
|
+
}, null, 42, bn))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
|
|
1863
2100
|
key: 1,
|
|
1864
|
-
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", i === j(g).resolvedActiveIndex.value ?
|
|
1865
|
-
}, [c("div",
|
|
2101
|
+
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", i === j(g).resolvedActiveIndex.value ? H.value : ""])
|
|
2102
|
+
}, [c("div", xn, [
|
|
1866
2103
|
c("button", {
|
|
1867
2104
|
type: "button",
|
|
1868
2105
|
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]",
|
|
@@ -1872,19 +2109,19 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1872
2109
|
}, [
|
|
1873
2110
|
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),
|
|
1874
2111
|
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),
|
|
1875
|
-
c("span",
|
|
1876
|
-
icon: j(
|
|
2112
|
+
c("span", Cn, [D(e.$slots, "item-icon", {
|
|
2113
|
+
icon: j(St)(r.type),
|
|
1877
2114
|
item: r
|
|
1878
|
-
}, () => [(S(), a(O(j(
|
|
2115
|
+
}, () => [(S(), a(O(j(St)(r.type)), {
|
|
1879
2116
|
class: "h-6 w-6 stroke-[1.9]",
|
|
1880
2117
|
"aria-hidden": "true"
|
|
1881
2118
|
}))])]),
|
|
1882
|
-
c("span",
|
|
2119
|
+
c("span", wn, [(S(), a(O(j(g).mediaStates.value[j(w).getItemKey(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
|
|
1883
2120
|
class: "h-4 w-4 stroke-2",
|
|
1884
2121
|
"aria-hidden": "true"
|
|
1885
2122
|
}))])
|
|
1886
|
-
], 8,
|
|
1887
|
-
j(w).isAssetLoading(i, r) ? (S(), s("div",
|
|
2123
|
+
], 8, Sn),
|
|
2124
|
+
j(w).isAssetLoading(i, r) ? (S(), s("div", Tn, [c("span", En, [u(j(re), {
|
|
1888
2125
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1889
2126
|
"aria-hidden": "true"
|
|
1890
2127
|
})])])) : o("", !0),
|
|
@@ -1897,14 +2134,14 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1897
2134
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
1898
2135
|
"aria-hidden": "true"
|
|
1899
2136
|
}),
|
|
1900
|
-
c("p",
|
|
2137
|
+
c("p", On, k(j(w).getAssetErrorLabel(r)), 1),
|
|
1901
2138
|
j(g).canRetryAsset(j(w).getItemKey(r)) ? (S(), s("button", {
|
|
1902
2139
|
key: 0,
|
|
1903
2140
|
type: "button",
|
|
1904
2141
|
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",
|
|
1905
2142
|
onClick: z((e) => j(g).retryAsset(j(w).getItemKey(r)), ["stop"])
|
|
1906
|
-
}, " Retry ", 8,
|
|
1907
|
-
], 8,
|
|
2143
|
+
}, " Retry ", 8, kn)) : o("", !0)
|
|
2144
|
+
], 8, Dn)], 64)) : o("", !0)
|
|
1908
2145
|
]), (S(), s("audio", {
|
|
1909
2146
|
key: j(g).getAssetRenderKey(j(w).getItemKey(r)),
|
|
1910
2147
|
src: j(w).getFullscreenMediaSource(i, r),
|
|
@@ -1925,15 +2162,15 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1925
2162
|
onStalled: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1926
2163
|
onTimeupdate: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e),
|
|
1927
2164
|
onWaiting: (e) => j(g).onMediaEvent(j(w).getItemKey(r), e)
|
|
1928
|
-
}, null, 40,
|
|
1929
|
-
icon: j(
|
|
2165
|
+
}, null, 40, An))], 2)) : (S(), s("div", jn, [c("div", Mn, [D(e.$slots, "item-icon", {
|
|
2166
|
+
icon: j(St)(r.type),
|
|
1930
2167
|
item: r
|
|
1931
|
-
}, () => [(S(), a(O(j(
|
|
2168
|
+
}, () => [(S(), a(O(j(St)(r.type)), {
|
|
1932
2169
|
class: "h-6 w-6 stroke-[1.9]",
|
|
1933
2170
|
"aria-hidden": "true"
|
|
1934
|
-
}))])])]))], 14,
|
|
1935
|
-
|
|
1936
|
-
j(g).activeItem.value ? (S(), a(
|
|
2171
|
+
}))])])]))], 14, fn))), 128)),
|
|
2172
|
+
G.value && p["fullscreen-overlay"] ? (S(), s("div", Nn, [c("div", Pn, [D(e.$slots, "fullscreen-overlay", v(f(G.value)))])])) : o("", !0),
|
|
2173
|
+
j(g).activeItem.value ? (S(), a(yt, {
|
|
1937
2174
|
key: 1,
|
|
1938
2175
|
"current-index": j(g).resolvedActiveIndex.value,
|
|
1939
2176
|
loading: d.loading,
|
|
@@ -1943,9 +2180,9 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1943
2180
|
title: j(g).activeItem.value.title ?? null,
|
|
1944
2181
|
total: j(g).items.value.length,
|
|
1945
2182
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
1946
|
-
}, l({ _: 2 }, [
|
|
2183
|
+
}, l({ _: 2 }, [X.value && G.value ? {
|
|
1947
2184
|
name: "actions",
|
|
1948
|
-
fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(
|
|
2185
|
+
fn: L(() => [D(e.$slots, "fullscreen-header-actions", v(f(G.value)))]),
|
|
1949
2186
|
key: "0"
|
|
1950
2187
|
} : void 0]), 1032, [
|
|
1951
2188
|
"current-index",
|
|
@@ -1956,52 +2193,62 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
1956
2193
|
"title",
|
|
1957
2194
|
"total"
|
|
1958
2195
|
])) : o("", !0),
|
|
1959
|
-
|
|
2196
|
+
B.value ? (S(), a(ct, {
|
|
1960
2197
|
key: 2,
|
|
1961
2198
|
"current-time": j(g).activeMediaState.value.currentTime,
|
|
1962
2199
|
"current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
|
|
1963
2200
|
duration: j(g).activeMediaDuration.value,
|
|
1964
2201
|
"duration-label": j(g).formatPlaybackTime(j(g).activeMediaDuration.value),
|
|
2202
|
+
muted: j(g).activeMediaState.value.muted,
|
|
1965
2203
|
progress: j(g).activeMediaProgress.value,
|
|
1966
|
-
|
|
2204
|
+
volume: j(g).activeMediaState.value.volume,
|
|
2205
|
+
"volume-control-layout": V.value,
|
|
2206
|
+
onSeekInput: j(g).onMediaSeekInput,
|
|
2207
|
+
onVolumeInput: j(g).onMediaVolumeInput,
|
|
2208
|
+
onVolumeToggle: j(g).onMediaVolumeToggle
|
|
1967
2209
|
}, null, 8, [
|
|
1968
2210
|
"current-time",
|
|
1969
2211
|
"current-time-label",
|
|
1970
2212
|
"duration",
|
|
1971
2213
|
"duration-label",
|
|
2214
|
+
"muted",
|
|
1972
2215
|
"progress",
|
|
1973
|
-
"
|
|
2216
|
+
"volume",
|
|
2217
|
+
"volume-control-layout",
|
|
2218
|
+
"onSeekInput",
|
|
2219
|
+
"onVolumeInput",
|
|
2220
|
+
"onVolumeToggle"
|
|
1974
2221
|
])) : o("", !0),
|
|
1975
|
-
|
|
2222
|
+
J.value ? (S(), s("div", {
|
|
1976
2223
|
key: 3,
|
|
1977
|
-
class: _(["absolute left-1/2 z-[4] -translate-x-1/2",
|
|
1978
|
-
}, [
|
|
2224
|
+
class: _(["absolute left-1/2 z-[4] -translate-x-1/2", R.value])
|
|
2225
|
+
}, [ce.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, J.value))) : (S(), s("div", {
|
|
1979
2226
|
key: 1,
|
|
1980
2227
|
"data-testid": "vibe-fullscreen-status-badge",
|
|
1981
|
-
class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center",
|
|
1982
|
-
}, k(
|
|
1983
|
-
])) :
|
|
2228
|
+
class: _(["inline-flex w-auto items-center border border-white/14 bg-black/40 px-5 py-3 text-[0.75rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74 backdrop-blur-[18px] max-[720px]:w-[calc(100%-2.5rem)] max-[720px]:justify-center", J.value.kind === "end" ? "border-amber-300/35 text-amber-200" : J.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
2229
|
+
}, k(J.value.message), 3))], 2)) : o("", !0)
|
|
2230
|
+
])) : U.value ? (S(), s("div", Fn, [c("div", In, [c("span", Ln, [u(j(re), {
|
|
1984
2231
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1985
2232
|
"aria-hidden": "true"
|
|
1986
|
-
})]), c("p",
|
|
2233
|
+
})]), c("p", Rn, k(W.value), 1)])])) : j(de) && j(Z) ? (S(), a(ln, {
|
|
1987
2234
|
key: 2,
|
|
1988
|
-
message: j(
|
|
1989
|
-
mode: j(
|
|
1990
|
-
surface: j(
|
|
2235
|
+
message: j(Z).message,
|
|
2236
|
+
mode: j(Z).mode,
|
|
2237
|
+
surface: j(Z).surface
|
|
1991
2238
|
}, {
|
|
1992
|
-
default: L(() => [j(
|
|
2239
|
+
default: L(() => [j(ue) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Z)))) : o("", !0)]),
|
|
1993
2240
|
_: 3
|
|
1994
2241
|
}, 8, [
|
|
1995
2242
|
"message",
|
|
1996
2243
|
"mode",
|
|
1997
2244
|
"surface"
|
|
1998
|
-
])) : o("", !0), j(
|
|
2245
|
+
])) : o("", !0), j(le) && j(Z) ? (S(), a(ln, {
|
|
1999
2246
|
key: 3,
|
|
2000
|
-
message: j(
|
|
2001
|
-
mode: j(
|
|
2002
|
-
surface: j(
|
|
2247
|
+
message: j(Z).message,
|
|
2248
|
+
mode: j(Z).mode,
|
|
2249
|
+
surface: j(Z).surface
|
|
2003
2250
|
}, {
|
|
2004
|
-
default: L(() => [j(
|
|
2251
|
+
default: L(() => [j(ue) ? D(e.$slots, "empty-state", v(h({ key: 0 }, j(Z)))) : o("", !0)]),
|
|
2005
2252
|
_: 3
|
|
2006
2253
|
}, 8, [
|
|
2007
2254
|
"message",
|
|
@@ -2015,7 +2262,7 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
2015
2262
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2016
2263
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2017
2264
|
}, {
|
|
2018
|
-
default: L(() => [
|
|
2265
|
+
default: L(() => [ne.value && G.value ? (S(), s("aside", zn, [c("div", Bn, [D(e.$slots, "fullscreen-aside", v(f(G.value)))])])) : o("", !0)]),
|
|
2019
2266
|
_: 3
|
|
2020
2267
|
})], 4),
|
|
2021
2268
|
u(r, {
|
|
@@ -2026,29 +2273,29 @@ var Kt = ["data-surface"], qt = ["data-surface"], Jt = /* @__PURE__ */ d({
|
|
|
2026
2273
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
2027
2274
|
"leave-to-class": "translate-x-full opacity-0"
|
|
2028
2275
|
}, {
|
|
2029
|
-
default: L(() => [
|
|
2276
|
+
default: L(() => [se.value && G.value ? (S(), s("aside", Vn, [c("div", Hn, [D(e.$slots, "fullscreen-aside", v(f(G.value)))])])) : o("", !0)]),
|
|
2030
2277
|
_: 3
|
|
2031
2278
|
})
|
|
2032
2279
|
]));
|
|
2033
2280
|
}
|
|
2034
|
-
}),
|
|
2035
|
-
function
|
|
2281
|
+
}), Kn = 1, qn = .5;
|
|
2282
|
+
function Jn(e) {
|
|
2036
2283
|
if (e.type !== "image" && e.type !== "video") return {
|
|
2037
|
-
width:
|
|
2038
|
-
height:
|
|
2284
|
+
width: Kn,
|
|
2285
|
+
height: Kn,
|
|
2039
2286
|
source: "fallback"
|
|
2040
2287
|
};
|
|
2041
2288
|
let t = e.preview?.width, n = e.preview?.height;
|
|
2042
|
-
if (
|
|
2043
|
-
let r =
|
|
2289
|
+
if (tr(t) && tr(n)) {
|
|
2290
|
+
let r = nr(e, t, n);
|
|
2044
2291
|
return {
|
|
2045
2292
|
width: r.width,
|
|
2046
2293
|
height: r.height,
|
|
2047
2294
|
source: "preview"
|
|
2048
2295
|
};
|
|
2049
2296
|
}
|
|
2050
|
-
if (
|
|
2051
|
-
let t =
|
|
2297
|
+
if (tr(e.width) && tr(e.height)) {
|
|
2298
|
+
let t = nr(e, e.width, e.height);
|
|
2052
2299
|
return {
|
|
2053
2300
|
width: t.width,
|
|
2054
2301
|
height: t.height,
|
|
@@ -2056,31 +2303,31 @@ function Nn(e) {
|
|
|
2056
2303
|
};
|
|
2057
2304
|
}
|
|
2058
2305
|
return {
|
|
2059
|
-
width:
|
|
2060
|
-
height:
|
|
2306
|
+
width: Kn,
|
|
2307
|
+
height: Kn,
|
|
2061
2308
|
source: "fallback"
|
|
2062
2309
|
};
|
|
2063
2310
|
}
|
|
2064
|
-
function
|
|
2311
|
+
function Yn(e, t) {
|
|
2065
2312
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
2066
2313
|
}
|
|
2067
|
-
function
|
|
2314
|
+
function Xn(e, t, n, r = 0) {
|
|
2068
2315
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
2069
2316
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
2070
2317
|
return !a || a <= 0 ? n : a / t;
|
|
2071
2318
|
}
|
|
2072
|
-
function
|
|
2073
|
-
let n =
|
|
2319
|
+
function Zn(e, t) {
|
|
2320
|
+
let n = Jn(e);
|
|
2074
2321
|
return n.height / n.width * t;
|
|
2075
2322
|
}
|
|
2076
|
-
function
|
|
2323
|
+
function Qn(e, t) {
|
|
2077
2324
|
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;
|
|
2078
2325
|
for (let c = 0; c < e.length; c += 1) {
|
|
2079
2326
|
let l = e[c];
|
|
2080
|
-
o.set(
|
|
2327
|
+
o.set($(l), c);
|
|
2081
2328
|
let u = 0;
|
|
2082
2329
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2083
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
2330
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = Zn(l, t.columnWidth);
|
|
2084
2331
|
r[c] = {
|
|
2085
2332
|
x: d,
|
|
2086
2333
|
y: f
|
|
@@ -2099,7 +2346,7 @@ function Ln(e, t) {
|
|
|
2099
2346
|
indexById: o
|
|
2100
2347
|
};
|
|
2101
2348
|
}
|
|
2102
|
-
function
|
|
2349
|
+
function $n(e) {
|
|
2103
2350
|
if (e.itemCount <= 0) return [];
|
|
2104
2351
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2105
2352
|
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();
|
|
@@ -2109,21 +2356,21 @@ function Rn(e) {
|
|
|
2109
2356
|
}
|
|
2110
2357
|
return Array.from(a).sort((e, t) => e - t);
|
|
2111
2358
|
}
|
|
2112
|
-
function
|
|
2359
|
+
function er(e, t, n) {
|
|
2113
2360
|
let r = /* @__PURE__ */ new Map();
|
|
2114
2361
|
for (let i of e) {
|
|
2115
|
-
let e = t.get(
|
|
2362
|
+
let e = t.get($(i));
|
|
2116
2363
|
if (e == null) continue;
|
|
2117
2364
|
let a = n[e];
|
|
2118
|
-
a && r.set(
|
|
2365
|
+
a && r.set($(i), a);
|
|
2119
2366
|
}
|
|
2120
2367
|
return r;
|
|
2121
2368
|
}
|
|
2122
|
-
function
|
|
2369
|
+
function tr(e) {
|
|
2123
2370
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2124
2371
|
}
|
|
2125
|
-
function
|
|
2126
|
-
return e.type !== "image" || n / t >=
|
|
2372
|
+
function nr(e, t, n) {
|
|
2373
|
+
return e.type !== "image" || n / t >= qn ? {
|
|
2127
2374
|
width: t,
|
|
2128
2375
|
height: n
|
|
2129
2376
|
} : {
|
|
@@ -2133,46 +2380,46 @@ function Vn(e, t, n) {
|
|
|
2133
2380
|
}
|
|
2134
2381
|
//#endregion
|
|
2135
2382
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2136
|
-
var
|
|
2137
|
-
function
|
|
2383
|
+
var rr = 300, ir = 600, ar = 40, or = 300, sr = 400;
|
|
2384
|
+
function cr(e, t) {
|
|
2138
2385
|
return t === "top" ? [...e].reverse() : e;
|
|
2139
2386
|
}
|
|
2140
|
-
function
|
|
2141
|
-
return e <= 0 ?
|
|
2387
|
+
function lr(e) {
|
|
2388
|
+
return e <= 0 ? ir : ir + Math.min((e - 1) * ar, sr);
|
|
2142
2389
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return
|
|
2390
|
+
function ur() {
|
|
2391
|
+
return or;
|
|
2145
2392
|
}
|
|
2146
|
-
function
|
|
2393
|
+
function dr(e) {
|
|
2147
2394
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2148
2395
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2149
2396
|
}
|
|
2150
|
-
function
|
|
2397
|
+
function fr(e) {
|
|
2151
2398
|
let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = T(/* @__PURE__ */ new Map()), l = T(/* @__PURE__ */ new Map()), u = T(/* @__PURE__ */ new Set()), d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = i(() => Array.from(o.value.values()));
|
|
2152
2399
|
F(e.visibleIndices, (i) => {
|
|
2153
2400
|
if (!i.length) return;
|
|
2154
2401
|
let o = [];
|
|
2155
2402
|
for (let n of i) {
|
|
2156
|
-
let r = e.items.value[n] ?
|
|
2403
|
+
let r = e.items.value[n] ? $(e.items.value[n]) : null;
|
|
2157
2404
|
!r || !t.value.has(r) || d.has(r) || (d.add(r), o.push(r));
|
|
2158
2405
|
}
|
|
2159
2406
|
if (!o.length) return;
|
|
2160
|
-
let s =
|
|
2161
|
-
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e *
|
|
2162
|
-
r.value = c,
|
|
2407
|
+
let s = cr(o, a.value.get(o[0]) ?? "bottom"), c = new Map(r.value);
|
|
2408
|
+
for (let e = 0; e < s.length; e += 1) c.set(s[e], Math.min(e * ar, sr));
|
|
2409
|
+
r.value = c, pr(() => {
|
|
2163
2410
|
let e = new Set(n.value);
|
|
2164
2411
|
for (let t of o) e.add(t);
|
|
2165
2412
|
n.value = e;
|
|
2166
|
-
}),
|
|
2413
|
+
}), mr(() => {
|
|
2167
2414
|
let e = new Set(t.value);
|
|
2168
2415
|
for (let t of o) e.delete(t);
|
|
2169
2416
|
t.value = e, S(() => {
|
|
2170
2417
|
let e = new Set(n.value), t = new Map(r.value), i = new Map(a.value);
|
|
2171
2418
|
for (let n of o) e.delete(n), t.delete(n), i.delete(n), d.delete(n);
|
|
2172
2419
|
n.value = e, r.value = t, a.value = i;
|
|
2173
|
-
},
|
|
2420
|
+
}, lr(o.length));
|
|
2174
2421
|
});
|
|
2175
|
-
}, { flush: "post" }), F(() => e.items.value.map((e) =>
|
|
2422
|
+
}, { flush: "post" }), F(() => e.items.value.map((e) => $(e)), (e) => {
|
|
2176
2423
|
if (!e.length || !o.value.size) return;
|
|
2177
2424
|
let t = new Set(e), n = null, r = null;
|
|
2178
2425
|
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));
|
|
@@ -2185,7 +2432,7 @@ function Zn(e) {
|
|
|
2185
2432
|
if (!e.length) return;
|
|
2186
2433
|
let r = new Set(t.value), i = new Map(a.value);
|
|
2187
2434
|
for (let t of e) {
|
|
2188
|
-
let e =
|
|
2435
|
+
let e = $(t);
|
|
2189
2436
|
r.add(e), i.set(e, n);
|
|
2190
2437
|
}
|
|
2191
2438
|
t.value = r, a.value = i;
|
|
@@ -2194,10 +2441,10 @@ function Zn(e) {
|
|
|
2194
2441
|
if (!e.length) return;
|
|
2195
2442
|
let i = new Map(o.value), c = new Set(t.value), l = new Set(n.value), u = new Map(r.value), f = new Map(a.value), p = [];
|
|
2196
2443
|
for (let t of e) {
|
|
2197
|
-
let e =
|
|
2444
|
+
let e = $(t.item);
|
|
2198
2445
|
p.push(e), i.set(e, t), c.delete(e), l.delete(e), u.delete(e), f.delete(e), d.delete(e);
|
|
2199
2446
|
}
|
|
2200
|
-
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f,
|
|
2447
|
+
o.value = i, t.value = c, n.value = l, r.value = u, a.value = f, pr(() => {
|
|
2201
2448
|
let e = new Set(s.value);
|
|
2202
2449
|
for (let t of p) e.add(t);
|
|
2203
2450
|
s.value = e;
|
|
@@ -2205,9 +2452,9 @@ function Zn(e) {
|
|
|
2205
2452
|
let e = new Map(o.value), t = new Set(s.value);
|
|
2206
2453
|
for (let n of p) e.delete(n), t.delete(n);
|
|
2207
2454
|
o.value = e, s.value = t;
|
|
2208
|
-
},
|
|
2455
|
+
}, or);
|
|
2209
2456
|
}
|
|
2210
|
-
function g(t, n, r =
|
|
2457
|
+
function g(t, n, r = rr) {
|
|
2211
2458
|
if (!t.size) return;
|
|
2212
2459
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
2213
2460
|
for (let [r, o] of t.entries()) {
|
|
@@ -2226,8 +2473,8 @@ function Zn(e) {
|
|
|
2226
2473
|
c.value = i, u.value = /* @__PURE__ */ new Set();
|
|
2227
2474
|
let o = new Map(l.value);
|
|
2228
2475
|
for (let e of a) o.set(e, r);
|
|
2229
|
-
l.value = o,
|
|
2230
|
-
u.value = new Set(a),
|
|
2476
|
+
l.value = o, pr(() => {
|
|
2477
|
+
u.value = new Set(a), pr(() => {
|
|
2231
2478
|
c.value = /* @__PURE__ */ new Map();
|
|
2232
2479
|
});
|
|
2233
2480
|
}), S(() => {
|
|
@@ -2238,8 +2485,8 @@ function Zn(e) {
|
|
|
2238
2485
|
}, r);
|
|
2239
2486
|
}
|
|
2240
2487
|
function _(e) {
|
|
2241
|
-
if (n.value.has(e)) return `transform ${
|
|
2242
|
-
if (u.value.has(e)) return `transform ${l.value.get(e) ??
|
|
2488
|
+
if (n.value.has(e)) return `transform ${ir}ms ease-out`;
|
|
2489
|
+
if (u.value.has(e)) return `transform ${l.value.get(e) ?? rr}ms ease-out`;
|
|
2243
2490
|
}
|
|
2244
2491
|
function v(e) {
|
|
2245
2492
|
if (!n.value.has(e)) return;
|
|
@@ -2250,13 +2497,13 @@ function Zn(e) {
|
|
|
2250
2497
|
let r = e.items.value[n], i = e.positions.value[n] ?? {
|
|
2251
2498
|
x: 0,
|
|
2252
2499
|
y: 0
|
|
2253
|
-
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ?
|
|
2500
|
+
}, o = e.heights.value[n] ?? e.columnWidth.value, s = r ? $(r) : null, l = s ? c.value.get(s) ?? {
|
|
2254
2501
|
dx: 0,
|
|
2255
2502
|
dy: 0
|
|
2256
2503
|
} : {
|
|
2257
2504
|
dx: 0,
|
|
2258
2505
|
dy: 0
|
|
2259
|
-
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ?
|
|
2506
|
+
}, u = s ? a.value.get(s) ?? "bottom" : "bottom", d = s && t.value.has(s) ? dr({
|
|
2260
2507
|
columnWidth: e.columnWidth.value,
|
|
2261
2508
|
direction: u,
|
|
2262
2509
|
itemHeight: o,
|
|
@@ -2266,18 +2513,18 @@ function Zn(e) {
|
|
|
2266
2513
|
return `translate3d(${i.x + l.dx}px, ${d + l.dy}px, 0)`;
|
|
2267
2514
|
}
|
|
2268
2515
|
function x(t) {
|
|
2269
|
-
let n =
|
|
2516
|
+
let n = $(t), r = o.value.get(n);
|
|
2270
2517
|
if (!r) return {
|
|
2271
2518
|
opacity: "0",
|
|
2272
2519
|
transform: "translate3d(0, 0, 0) scale(0.96)",
|
|
2273
|
-
transition: `opacity ${
|
|
2520
|
+
transition: `opacity ${or}ms ease-out, transform ${or}ms ease-out`
|
|
2274
2521
|
};
|
|
2275
2522
|
let i = s.value.has(n);
|
|
2276
2523
|
return {
|
|
2277
2524
|
height: `${r.height}px`,
|
|
2278
2525
|
opacity: i ? "0" : "1",
|
|
2279
2526
|
transform: `translate3d(${r.position.x}px, ${r.position.y}px, 0) scale(${i ? "0.96" : "1"})`,
|
|
2280
|
-
transition: `opacity ${
|
|
2527
|
+
transition: `opacity ${or}ms ease-out, transform ${or}ms ease-out`,
|
|
2281
2528
|
width: `${e.columnWidth.value}px`
|
|
2282
2529
|
};
|
|
2283
2530
|
}
|
|
@@ -2298,28 +2545,28 @@ function Zn(e) {
|
|
|
2298
2545
|
playFlipMoveAnimation: g
|
|
2299
2546
|
};
|
|
2300
2547
|
}
|
|
2301
|
-
function
|
|
2548
|
+
function pr(e) {
|
|
2302
2549
|
if (typeof requestAnimationFrame == "function") {
|
|
2303
2550
|
requestAnimationFrame(() => e());
|
|
2304
2551
|
return;
|
|
2305
2552
|
}
|
|
2306
2553
|
setTimeout(e, 0);
|
|
2307
2554
|
}
|
|
2308
|
-
function
|
|
2309
|
-
|
|
2555
|
+
function mr(e) {
|
|
2556
|
+
pr(() => pr(e));
|
|
2310
2557
|
}
|
|
2311
2558
|
//#endregion
|
|
2312
2559
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2313
|
-
function
|
|
2560
|
+
function hr(e, t) {
|
|
2314
2561
|
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2315
2562
|
}
|
|
2316
|
-
function
|
|
2563
|
+
function gr(e, t, n) {
|
|
2317
2564
|
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2318
2565
|
}
|
|
2319
|
-
function
|
|
2566
|
+
function _r(e, t, n, r) {
|
|
2320
2567
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2321
2568
|
}
|
|
2322
|
-
function
|
|
2569
|
+
function vr(e, t) {
|
|
2323
2570
|
return {
|
|
2324
2571
|
height: `${e}px`,
|
|
2325
2572
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2327,8 +2574,8 @@ function rr(e, t) {
|
|
|
2327
2574
|
}
|
|
2328
2575
|
//#endregion
|
|
2329
2576
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2330
|
-
var
|
|
2331
|
-
function
|
|
2577
|
+
var yr = 250, br = 1e3;
|
|
2578
|
+
function xr(e) {
|
|
2332
2579
|
let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
|
|
2333
2580
|
b(() => {
|
|
2334
2581
|
y();
|
|
@@ -2344,7 +2591,7 @@ function or(e) {
|
|
|
2344
2591
|
function u(t) {
|
|
2345
2592
|
if (!x(t) || !e.isAtBoundary()) return;
|
|
2346
2593
|
let n = Date.now();
|
|
2347
|
-
n < s || (s = n +
|
|
2594
|
+
n < s || (s = n + yr, m());
|
|
2348
2595
|
}
|
|
2349
2596
|
function d() {
|
|
2350
2597
|
if (!g()) return;
|
|
@@ -2378,7 +2625,7 @@ function or(e) {
|
|
|
2378
2625
|
return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2379
2626
|
}
|
|
2380
2627
|
function _() {
|
|
2381
|
-
o.value = !1, v(
|
|
2628
|
+
o.value = !1, v(br);
|
|
2382
2629
|
}
|
|
2383
2630
|
function v(e) {
|
|
2384
2631
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -2401,30 +2648,30 @@ function or(e) {
|
|
|
2401
2648
|
}
|
|
2402
2649
|
//#endregion
|
|
2403
2650
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
2404
|
-
var
|
|
2405
|
-
function
|
|
2406
|
-
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth ||
|
|
2651
|
+
var Sr = 600, Cr = 24, wr = 16, Tr = 300, Er = 200, Dr = 200, Or = 200, kr = 300, Ar = 24, jr = 48, Mr = 500, Nr = 1e3;
|
|
2652
|
+
function Pr(e) {
|
|
2653
|
+
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Tr), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = T(!1), m = i(() => Math.max(Tr, a.value - Cr * 2)), h = i(() => Yn(m.value, Tr)), _ = i(() => Xn(m.value, h.value, Tr, wr)), v = i(() => Fr(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => $n({
|
|
2407
2654
|
itemCount: e.items.value.length,
|
|
2408
2655
|
viewportHeight: r.value,
|
|
2409
2656
|
scrollTop: n.value,
|
|
2410
|
-
overscanPx:
|
|
2411
|
-
bucketPx:
|
|
2657
|
+
overscanPx: Er,
|
|
2658
|
+
bucketPx: Sr,
|
|
2412
2659
|
buckets: c.value
|
|
2413
2660
|
})), S = i(() => y.value.map((t) => ({
|
|
2414
2661
|
item: e.items.value[t],
|
|
2415
2662
|
index: t
|
|
2416
2663
|
}))), C = i(() => {
|
|
2417
|
-
let e = l.value +
|
|
2418
|
-
return Math.max(e, t, r.value) +
|
|
2419
|
-
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value -
|
|
2664
|
+
let e = l.value + Cr * 2, t = d.value ?? 0;
|
|
2665
|
+
return Math.max(e, t, r.value) + Or;
|
|
2666
|
+
}), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), E = i(() => e.items.value.length > 0 ? `${v.value + 1} / ${e.items.value.length}` : "0 / 0"), D = i(() => Math.max(0, r.value - Ar * 2)), O = i(() => C.value > r.value + 1 && D.value > 0), k = i(() => {
|
|
2420
2667
|
if (!O.value) return 0;
|
|
2421
2668
|
let e = r.value / C.value * D.value;
|
|
2422
|
-
return Math.min(D.value, Math.max(
|
|
2669
|
+
return Math.min(D.value, Math.max(jr, e));
|
|
2423
2670
|
}), A = i(() => {
|
|
2424
|
-
if (!O.value) return
|
|
2671
|
+
if (!O.value) return Ar;
|
|
2425
2672
|
let e = Math.max(0, C.value - r.value);
|
|
2426
|
-
return
|
|
2427
|
-
}), j =
|
|
2673
|
+
return Ar + Math.max(0, D.value - k.value) * (e > 0 ? Fr(n.value / e, 0, 1) : 0);
|
|
2674
|
+
}), j = fr({
|
|
2428
2675
|
items: e.items,
|
|
2429
2676
|
visibleIndices: y,
|
|
2430
2677
|
positions: o,
|
|
@@ -2433,27 +2680,27 @@ function vr(e) {
|
|
|
2433
2680
|
columnWidth: _,
|
|
2434
2681
|
scrollTop: n,
|
|
2435
2682
|
viewportHeight: r
|
|
2436
|
-
}), M =
|
|
2683
|
+
}), M = xr({
|
|
2437
2684
|
direction: "top",
|
|
2438
2685
|
getAnimationLockMs(e) {
|
|
2439
|
-
return Math.max(
|
|
2686
|
+
return Math.max(Mr, lr(e)) + Nr;
|
|
2440
2687
|
},
|
|
2441
2688
|
hasPage: e.hasPreviousPage,
|
|
2442
2689
|
interactionLocked: p,
|
|
2443
2690
|
isAtBoundary() {
|
|
2444
|
-
return n.value <=
|
|
2691
|
+
return n.value <= Cr + wr;
|
|
2445
2692
|
},
|
|
2446
2693
|
loading: e.loading,
|
|
2447
2694
|
requestPage: e.requestPreviousPage
|
|
2448
|
-
}), N =
|
|
2695
|
+
}), N = xr({
|
|
2449
2696
|
direction: "bottom",
|
|
2450
2697
|
getAnimationLockMs(e) {
|
|
2451
|
-
return
|
|
2698
|
+
return lr(e) + Nr;
|
|
2452
2699
|
},
|
|
2453
2700
|
hasPage: w,
|
|
2454
2701
|
interactionLocked: p,
|
|
2455
2702
|
isAtBoundary() {
|
|
2456
|
-
return re() <=
|
|
2703
|
+
return re() <= Dr;
|
|
2457
2704
|
},
|
|
2458
2705
|
loading: e.loading,
|
|
2459
2706
|
requestPage: e.requestNextPage
|
|
@@ -2463,8 +2710,8 @@ function vr(e) {
|
|
|
2463
2710
|
h,
|
|
2464
2711
|
_
|
|
2465
2712
|
], async ([t], [r = []]) => {
|
|
2466
|
-
let i = t.map((e) =>
|
|
2467
|
-
let t =
|
|
2713
|
+
let i = t.map((e) => $(e)), a = r ?? [], s = a.map((e) => $(e)), c = er(a, u.value, o.value), l = oe(a), d = new Set(s), f = new Set(i), p = t.filter((e) => !d.has($(e))), m = a.flatMap((e) => {
|
|
2714
|
+
let t = $(e);
|
|
2468
2715
|
if (f.has(t)) return [];
|
|
2469
2716
|
let n = c.get(t), r = l.get(t);
|
|
2470
2717
|
return !n || r == null ? [] : [{
|
|
@@ -2472,10 +2719,10 @@ function vr(e) {
|
|
|
2472
2719
|
item: e,
|
|
2473
2720
|
position: n
|
|
2474
2721
|
}];
|
|
2475
|
-
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value >
|
|
2476
|
-
y && q(
|
|
2722
|
+
}), h = i.length > s.length && s.length > 0 && i[0] !== s[0], _ = t.length === 0 && a.length > 0 && m.length > 0 && n.value > 0, y = m.length > 0 && n.value > Cr + wr, b = h && n.value > Cr + wr ? t[v.value] : null, x = b ? $(b) : null;
|
|
2723
|
+
y && q(ur() + Nr), _ && K(), B(), m.length > 0 && j.markLeave(m), p.length > 0 && (j.markEnter(p, h ? "top" : "bottom"), h ? M.onItemsMutated(p.length) : N.onItemsMutated(p.length)), j.playFlipMoveAnimation(c, new Set(p.map((e) => $(e))), h ? Mr : void 0), x ? (await g(), G(x, c)) : e.active.value && s.length > 0 && Y();
|
|
2477
2724
|
}, { immediate: !0 }), F([
|
|
2478
|
-
() => e.pendingAppendItems.value.map((e) =>
|
|
2725
|
+
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
2479
2726
|
h,
|
|
2480
2727
|
_,
|
|
2481
2728
|
r
|
|
@@ -2490,32 +2737,32 @@ function vr(e) {
|
|
|
2490
2737
|
}
|
|
2491
2738
|
if (i !== !1 || f.value == null) return;
|
|
2492
2739
|
await g();
|
|
2493
|
-
let o = Math.max(0, C.value - r.value), s =
|
|
2740
|
+
let o = Math.max(0, C.value - r.value), s = Fr(f.value, 0, o);
|
|
2494
2741
|
a.scrollTop = s, n.value = s, M.syncBoundary(), N.syncBoundary();
|
|
2495
2742
|
}), F(() => e.loading.value, async (t) => {
|
|
2496
2743
|
!t && !e.pendingAppendItems.value.length && !L && !z && (d.value = null), M.onLoadingChange(t), N.onLoadingChange(t), await g();
|
|
2497
2744
|
}), x(async () => {
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
}), t.value && P.observe(t.value)) : window.addEventListener("resize",
|
|
2745
|
+
X(), await g(), v.value > 0 ? W(v.value, "center") : J(), M.syncBoundary(), N.syncBoundary(), typeof ResizeObserver < "u" ? (P = new ResizeObserver(() => {
|
|
2746
|
+
X();
|
|
2747
|
+
}), t.value && P.observe(t.value)) : window.addEventListener("resize", X);
|
|
2501
2748
|
}), b(() => {
|
|
2502
|
-
P?.disconnect(), P = null, window.removeEventListener("resize",
|
|
2749
|
+
P?.disconnect(), P = null, window.removeEventListener("resize", X), ce(), Z(), I &&= (cancelAnimationFrame(I), 0);
|
|
2503
2750
|
});
|
|
2504
2751
|
function B() {
|
|
2505
|
-
let t =
|
|
2752
|
+
let t = Qn(e.items.value, {
|
|
2506
2753
|
columnCount: h.value,
|
|
2507
2754
|
columnWidth: _.value,
|
|
2508
|
-
gapX:
|
|
2509
|
-
gapY:
|
|
2510
|
-
bucketPx:
|
|
2755
|
+
gapX: wr,
|
|
2756
|
+
gapY: wr,
|
|
2757
|
+
bucketPx: Sr
|
|
2511
2758
|
});
|
|
2512
2759
|
o.value = t.positions.map((e) => ({
|
|
2513
|
-
x: e.x +
|
|
2514
|
-
y: e.y +
|
|
2760
|
+
x: e.x + Cr,
|
|
2761
|
+
y: e.y + Cr
|
|
2515
2762
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
2516
2763
|
}
|
|
2517
2764
|
function V() {
|
|
2518
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
2765
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = te(), M.syncBoundary(), N.syncBoundary(), ee(), !Y() && (I ||= requestAnimationFrame(() => {
|
|
2519
2766
|
I = 0, J();
|
|
2520
2767
|
})));
|
|
2521
2768
|
}
|
|
@@ -2523,7 +2770,7 @@ function vr(e) {
|
|
|
2523
2770
|
e.active.value && (M.onWheel(t), N.onWheel(t), ee());
|
|
2524
2771
|
}
|
|
2525
2772
|
function U(t) {
|
|
2526
|
-
let n = e.items.value[t], r = n ?
|
|
2773
|
+
let n = e.items.value[t], r = n ? $(n) : "";
|
|
2527
2774
|
return {
|
|
2528
2775
|
height: `${s.value[t] ?? _.value}px`,
|
|
2529
2776
|
width: `${_.value}px`,
|
|
@@ -2536,7 +2783,7 @@ function vr(e) {
|
|
|
2536
2783
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
2537
2784
|
if (!a || !c || !l) return;
|
|
2538
2785
|
let u = a.scrollTop, d = Math.max(0, C.value - r.value);
|
|
2539
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
2786
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Cr : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Cr), a.scrollTop = Fr(u, 0, d), n.value = a.scrollTop, J();
|
|
2540
2787
|
}
|
|
2541
2788
|
function G(e, r) {
|
|
2542
2789
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
@@ -2553,7 +2800,7 @@ function vr(e) {
|
|
|
2553
2800
|
e.scrollTop = 0, n.value = 0, M.syncBoundary(), N.syncBoundary();
|
|
2554
2801
|
}
|
|
2555
2802
|
function q(e) {
|
|
2556
|
-
|
|
2803
|
+
Z(), p.value = !0, R = setTimeout(() => {
|
|
2557
2804
|
R = null, p.value = !1;
|
|
2558
2805
|
}, Math.max(0, e));
|
|
2559
2806
|
}
|
|
@@ -2569,40 +2816,40 @@ function vr(e) {
|
|
|
2569
2816
|
e.setActiveIndex(i);
|
|
2570
2817
|
}
|
|
2571
2818
|
function Y() {
|
|
2572
|
-
let t = n.value <=
|
|
2819
|
+
let t = n.value <= Cr + wr, r = re() <= Dr;
|
|
2573
2820
|
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2574
2821
|
}
|
|
2575
2822
|
function ee() {
|
|
2576
2823
|
M.maybeRequestPage(), N.maybeRequestPage();
|
|
2577
2824
|
}
|
|
2578
|
-
function te() {
|
|
2579
|
-
r.value = X(), a.value = ne();
|
|
2580
|
-
}
|
|
2581
2825
|
function X() {
|
|
2582
|
-
|
|
2826
|
+
r.value = te(), a.value = ne();
|
|
2827
|
+
}
|
|
2828
|
+
function te() {
|
|
2829
|
+
return hr(t.value, r.value);
|
|
2583
2830
|
}
|
|
2584
2831
|
function ne() {
|
|
2585
|
-
return
|
|
2832
|
+
return gr(t.value, a.value, Tr);
|
|
2586
2833
|
}
|
|
2587
2834
|
function re() {
|
|
2588
|
-
return
|
|
2835
|
+
return _r(t.value, n.value, r.value, C.value);
|
|
2589
2836
|
}
|
|
2590
2837
|
function ie() {
|
|
2591
|
-
return
|
|
2838
|
+
return vr(k.value, A.value);
|
|
2592
2839
|
}
|
|
2593
2840
|
function ae(e) {
|
|
2594
|
-
return e.length ?
|
|
2841
|
+
return e.length ? Qn(e, {
|
|
2595
2842
|
columnCount: h.value,
|
|
2596
2843
|
columnWidth: _.value,
|
|
2597
|
-
gapX:
|
|
2598
|
-
gapY:
|
|
2599
|
-
bucketPx:
|
|
2600
|
-
}).contentHeight +
|
|
2844
|
+
gapX: wr,
|
|
2845
|
+
gapY: wr,
|
|
2846
|
+
bucketPx: Sr
|
|
2847
|
+
}).contentHeight + Cr * 2 : 0;
|
|
2601
2848
|
}
|
|
2602
2849
|
function oe(e) {
|
|
2603
2850
|
let t = /* @__PURE__ */ new Map();
|
|
2604
2851
|
for (let n of e) {
|
|
2605
|
-
let e =
|
|
2852
|
+
let e = $(n), r = u.value.get(e);
|
|
2606
2853
|
if (r == null) continue;
|
|
2607
2854
|
let i = s.value[r];
|
|
2608
2855
|
i != null && t.set(e, i);
|
|
@@ -2619,12 +2866,12 @@ function vr(e) {
|
|
|
2619
2866
|
} finally {
|
|
2620
2867
|
d.value = null, z = !1;
|
|
2621
2868
|
}
|
|
2622
|
-
},
|
|
2869
|
+
}, kr));
|
|
2623
2870
|
}
|
|
2624
2871
|
function ce() {
|
|
2625
2872
|
L &&= (clearTimeout(L), null);
|
|
2626
2873
|
}
|
|
2627
|
-
function
|
|
2874
|
+
function Z() {
|
|
2628
2875
|
R && (clearTimeout(R), R = null, p.value = !1);
|
|
2629
2876
|
}
|
|
2630
2877
|
return {
|
|
@@ -2644,17 +2891,17 @@ function vr(e) {
|
|
|
2644
2891
|
scrollViewportRef: t
|
|
2645
2892
|
};
|
|
2646
2893
|
}
|
|
2647
|
-
function
|
|
2894
|
+
function Fr(e, t, n) {
|
|
2648
2895
|
return Math.min(Math.max(e, t), n);
|
|
2649
2896
|
}
|
|
2650
2897
|
//#endregion
|
|
2651
2898
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
2652
|
-
function
|
|
2899
|
+
function Ir(e) {
|
|
2653
2900
|
if (e) try {
|
|
2654
2901
|
e.removeAttribute("src"), e.src = "";
|
|
2655
2902
|
} catch {}
|
|
2656
2903
|
}
|
|
2657
|
-
function
|
|
2904
|
+
function Lr(e) {
|
|
2658
2905
|
if (e) {
|
|
2659
2906
|
try {
|
|
2660
2907
|
e.currentTime = 0;
|
|
@@ -2665,12 +2912,12 @@ function xr(e) {
|
|
|
2665
2912
|
} catch {}
|
|
2666
2913
|
}
|
|
2667
2914
|
}
|
|
2668
|
-
function
|
|
2915
|
+
function Rr(e, t) {
|
|
2669
2916
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
2670
2917
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
2671
2918
|
return e.bottom > 0 && e.top < n;
|
|
2672
2919
|
}
|
|
2673
|
-
function
|
|
2920
|
+
function zr(e) {
|
|
2674
2921
|
if (!e) return null;
|
|
2675
2922
|
try {
|
|
2676
2923
|
return new URL(e, window.location.href).href;
|
|
@@ -2680,22 +2927,22 @@ function Cr(e) {
|
|
|
2680
2927
|
}
|
|
2681
2928
|
//#endregion
|
|
2682
2929
|
//#region src/components/viewer-core/listPreview.ts
|
|
2683
|
-
var
|
|
2684
|
-
function
|
|
2685
|
-
let t = e.preview?.url ?? e.url, n =
|
|
2930
|
+
var Br = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Vr = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
|
|
2931
|
+
function Hr(e) {
|
|
2932
|
+
let t = e.preview?.url ?? e.url, n = Jn(e), r = e.title?.trim() || Ct(e.type);
|
|
2686
2933
|
return e.type !== "image" && e.type !== "video" ? {
|
|
2687
2934
|
kind: "fallback",
|
|
2688
2935
|
url: null,
|
|
2689
2936
|
width: n.width,
|
|
2690
2937
|
height: n.height,
|
|
2691
2938
|
label: r
|
|
2692
|
-
} :
|
|
2939
|
+
} : Wr(e, t) ? {
|
|
2693
2940
|
kind: "video",
|
|
2694
2941
|
url: t,
|
|
2695
2942
|
width: n.width,
|
|
2696
2943
|
height: n.height,
|
|
2697
2944
|
label: r
|
|
2698
|
-
} :
|
|
2945
|
+
} : Ur(e, t) ? {
|
|
2699
2946
|
kind: "image",
|
|
2700
2947
|
url: t,
|
|
2701
2948
|
width: n.width,
|
|
@@ -2709,28 +2956,28 @@ function Er(e) {
|
|
|
2709
2956
|
label: r
|
|
2710
2957
|
};
|
|
2711
2958
|
}
|
|
2712
|
-
function
|
|
2713
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2959
|
+
function Ur(e, t) {
|
|
2960
|
+
return e.type !== "image" || typeof t != "string" ? !1 : Br.test(t) || Gr(t);
|
|
2714
2961
|
}
|
|
2715
|
-
function
|
|
2716
|
-
return e.type === "video" && typeof t == "string" &&
|
|
2962
|
+
function Wr(e, t) {
|
|
2963
|
+
return e.type === "video" && typeof t == "string" && Vr.test(t);
|
|
2717
2964
|
}
|
|
2718
|
-
function
|
|
2965
|
+
function Gr(e) {
|
|
2719
2966
|
return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
|
|
2720
2967
|
}
|
|
2721
2968
|
//#endregion
|
|
2722
2969
|
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
2723
|
-
var
|
|
2970
|
+
var Kr = {
|
|
2724
2971
|
maxGlobal: 10,
|
|
2725
2972
|
maxPerDomain: 4,
|
|
2726
2973
|
maxVideoPerDomain: 2
|
|
2727
2974
|
};
|
|
2728
|
-
function
|
|
2975
|
+
function qr(e = Kr) {
|
|
2729
2976
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
2730
2977
|
function i(e) {
|
|
2731
2978
|
let i = {
|
|
2732
2979
|
...e,
|
|
2733
|
-
domain:
|
|
2980
|
+
domain: Xr(e.url),
|
|
2734
2981
|
enqueuedAt: r,
|
|
2735
2982
|
id: `vibe-asset-load-${r += 1}`
|
|
2736
2983
|
};
|
|
@@ -2749,7 +2996,7 @@ function jr(e = Ar) {
|
|
|
2749
2996
|
function a() {
|
|
2750
2997
|
if (n.size === 0) return;
|
|
2751
2998
|
let r = [...n.values()].sort((e, t) => {
|
|
2752
|
-
let n =
|
|
2999
|
+
let n = Yr(e) - Yr(t);
|
|
2753
3000
|
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
2754
3001
|
});
|
|
2755
3002
|
for (let i of r) {
|
|
@@ -2770,8 +3017,8 @@ function jr(e = Ar) {
|
|
|
2770
3017
|
}
|
|
2771
3018
|
return { request: i };
|
|
2772
3019
|
}
|
|
2773
|
-
var
|
|
2774
|
-
function
|
|
3020
|
+
var Jr = qr();
|
|
3021
|
+
function Yr(e) {
|
|
2775
3022
|
try {
|
|
2776
3023
|
let t = e.getPriority();
|
|
2777
3024
|
return Number.isFinite(t) ? t : Infinity;
|
|
@@ -2779,7 +3026,7 @@ function Nr(e) {
|
|
|
2779
3026
|
return Infinity;
|
|
2780
3027
|
}
|
|
2781
3028
|
}
|
|
2782
|
-
function
|
|
3029
|
+
function Xr(e) {
|
|
2783
3030
|
try {
|
|
2784
3031
|
return new URL(e).hostname || "local";
|
|
2785
3032
|
} catch {
|
|
@@ -2788,14 +3035,14 @@ function Pr(e) {
|
|
|
2788
3035
|
}
|
|
2789
3036
|
//#endregion
|
|
2790
3037
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
2791
|
-
var
|
|
3038
|
+
var Zr = ["aria-label"], Qr = {
|
|
2792
3039
|
key: 0,
|
|
2793
3040
|
"data-testid": "vibe-list-card-spinner",
|
|
2794
3041
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
2795
|
-
},
|
|
3042
|
+
}, $r = { 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]" }, ei = ["src", "alt"], ti = ["src"], ni = ["data-kind"], ri = { class: "grid justify-items-center gap-3 px-4 text-center" }, ii = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, ai = {
|
|
2796
3043
|
key: 4,
|
|
2797
3044
|
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))]"
|
|
2798
|
-
},
|
|
3045
|
+
}, oi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, si = { class: "pointer-events-none absolute inset-0 z-[3]" }, ci = /* @__PURE__ */ d({
|
|
2799
3046
|
__name: "ListCard",
|
|
2800
3047
|
props: {
|
|
2801
3048
|
active: {
|
|
@@ -2819,7 +3066,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2819
3066
|
},
|
|
2820
3067
|
emits: ["open"],
|
|
2821
3068
|
setup(e, { emit: t }) {
|
|
2822
|
-
let n = e, r = t, l = i(() =>
|
|
3069
|
+
let n = e, r = t, l = i(() => Hr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), P = i(() => !!h.value), I = i(() => Vt(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, B = null, V = /* @__PURE__ */ new Set();
|
|
2823
3070
|
F([E, () => l.value.kind], () => {
|
|
2824
3071
|
let e = l.value.kind === "fallback";
|
|
2825
3072
|
m.value = e, h.value = null, e && (w.value = !0);
|
|
@@ -2854,23 +3101,23 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2854
3101
|
J(), R?.disconnect(), R = null;
|
|
2855
3102
|
});
|
|
2856
3103
|
function H() {
|
|
2857
|
-
se(g.value) && (m.value = !0, h.value = null,
|
|
3104
|
+
se(g.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), Y());
|
|
2858
3105
|
}
|
|
2859
3106
|
async function U() {
|
|
2860
3107
|
if (!se(g.value)) return;
|
|
2861
3108
|
let e = E.value ?? n.item.url;
|
|
2862
3109
|
m.value = !1, h.value = "generic";
|
|
2863
|
-
let t = await
|
|
3110
|
+
let t = await Ht(e);
|
|
2864
3111
|
h.value = t, n.reportAssetError?.({
|
|
2865
3112
|
item: n.item,
|
|
2866
|
-
occurrenceKey:
|
|
3113
|
+
occurrenceKey: $(n.item),
|
|
2867
3114
|
url: e,
|
|
2868
3115
|
kind: t,
|
|
2869
3116
|
surface: "grid"
|
|
2870
3117
|
}), Y();
|
|
2871
3118
|
}
|
|
2872
3119
|
function W() {
|
|
2873
|
-
se(C.value) && (m.value = !0, h.value = null,
|
|
3120
|
+
se(C.value) && (m.value = !0, h.value = null, X(E.value ?? n.item.url), Y(), q());
|
|
2874
3121
|
}
|
|
2875
3122
|
function G() {
|
|
2876
3123
|
se(C.value) && (m.value = !1);
|
|
@@ -2892,7 +3139,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2892
3139
|
B?.refresh();
|
|
2893
3140
|
return;
|
|
2894
3141
|
}
|
|
2895
|
-
B =
|
|
3142
|
+
B = Jr.request({
|
|
2896
3143
|
assetType: l.value.kind,
|
|
2897
3144
|
getPriority: ae,
|
|
2898
3145
|
onGrant() {
|
|
@@ -2909,7 +3156,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2909
3156
|
return;
|
|
2910
3157
|
}
|
|
2911
3158
|
if (E.value && d.value && m.value) {
|
|
2912
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
3159
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, Gt(e);
|
|
2913
3160
|
return;
|
|
2914
3161
|
}
|
|
2915
3162
|
try {
|
|
@@ -2930,11 +3177,11 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2930
3177
|
d.value = !0;
|
|
2931
3178
|
return;
|
|
2932
3179
|
}
|
|
2933
|
-
d.value =
|
|
3180
|
+
d.value = Rr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
|
|
2934
3181
|
}
|
|
2935
|
-
function
|
|
3182
|
+
function X(e) {
|
|
2936
3183
|
if (!e) return;
|
|
2937
|
-
let t =
|
|
3184
|
+
let t = $(n.item), r = `${t}|${e}`;
|
|
2938
3185
|
V.has(r) || (V.add(r), n.reportAssetLoad?.({
|
|
2939
3186
|
item: n.item,
|
|
2940
3187
|
occurrenceKey: t,
|
|
@@ -2942,18 +3189,18 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2942
3189
|
url: e
|
|
2943
3190
|
}));
|
|
2944
3191
|
}
|
|
2945
|
-
function
|
|
3192
|
+
function te() {
|
|
2946
3193
|
if (!I.value) return;
|
|
2947
|
-
let e =
|
|
3194
|
+
let e = $(n.item);
|
|
2948
3195
|
V.forEach((t) => {
|
|
2949
3196
|
t.startsWith(`${e}|`) && V.delete(t);
|
|
2950
3197
|
}), h.value = null, m.value = !1, w.value = !1, Y(), K();
|
|
2951
3198
|
}
|
|
2952
3199
|
function ne() {
|
|
2953
|
-
|
|
3200
|
+
Ir(g.value);
|
|
2954
3201
|
}
|
|
2955
3202
|
function ie() {
|
|
2956
|
-
|
|
3203
|
+
Lr(C.value);
|
|
2957
3204
|
}
|
|
2958
3205
|
function ae() {
|
|
2959
3206
|
let e = v.value;
|
|
@@ -2967,16 +3214,16 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2967
3214
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
2968
3215
|
}
|
|
2969
3216
|
function se(e) {
|
|
2970
|
-
let t =
|
|
2971
|
-
return !e || !t ? !1 :
|
|
3217
|
+
let t = zr(E.value);
|
|
3218
|
+
return !e || !t ? !1 : zr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
2972
3219
|
}
|
|
2973
3220
|
function ce() {
|
|
2974
3221
|
r("open");
|
|
2975
3222
|
}
|
|
2976
|
-
function
|
|
3223
|
+
function Z() {
|
|
2977
3224
|
f.value = !0;
|
|
2978
3225
|
}
|
|
2979
|
-
function
|
|
3226
|
+
function le(e) {
|
|
2980
3227
|
let t = e.relatedTarget;
|
|
2981
3228
|
v.value && t instanceof Node && v.value.contains(t) || (f.value = !1);
|
|
2982
3229
|
}
|
|
@@ -2985,8 +3232,8 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2985
3232
|
ref: v,
|
|
2986
3233
|
"data-testid": "vibe-list-card-inner",
|
|
2987
3234
|
class: _(["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"]),
|
|
2988
|
-
onFocusin:
|
|
2989
|
-
onFocusout:
|
|
3235
|
+
onFocusin: Z,
|
|
3236
|
+
onFocusout: le,
|
|
2990
3237
|
onPointerenter: t[0] ||= (e) => p.value = !0,
|
|
2991
3238
|
onPointerleave: t[1] ||= (e) => p.value = !1
|
|
2992
3239
|
}, [
|
|
@@ -2996,8 +3243,8 @@ var Fr = ["aria-label"], Ir = {
|
|
|
2996
3243
|
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]",
|
|
2997
3244
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
2998
3245
|
onClick: ce
|
|
2999
|
-
}, null, 8,
|
|
3000
|
-
L.value ? (S(), s("div",
|
|
3246
|
+
}, null, 8, Zr),
|
|
3247
|
+
L.value ? (S(), s("div", Qr, [c("span", $r, [u(j(re), {
|
|
3001
3248
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
3002
3249
|
"aria-hidden": "true"
|
|
3003
3250
|
})])])) : o("", !0),
|
|
@@ -3011,7 +3258,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3011
3258
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
3012
3259
|
onLoad: H,
|
|
3013
3260
|
onError: U
|
|
3014
|
-
}, null, 42,
|
|
3261
|
+
}, null, 42, ei)) : N.value && E.value && !P.value ? (S(), s("video", {
|
|
3015
3262
|
key: 2,
|
|
3016
3263
|
ref_key: "videoRef",
|
|
3017
3264
|
ref: C,
|
|
@@ -3027,31 +3274,31 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3027
3274
|
onPlaying: W,
|
|
3028
3275
|
onStalled: G,
|
|
3029
3276
|
onWaiting: G
|
|
3030
|
-
}, null, 42,
|
|
3277
|
+
}, null, 42, ti)) : P.value ? (S(), s("div", {
|
|
3031
3278
|
key: 3,
|
|
3032
3279
|
"data-testid": "vibe-list-card-error",
|
|
3033
3280
|
"data-kind": h.value,
|
|
3034
3281
|
class: "relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
|
|
3035
|
-
}, [c("div",
|
|
3282
|
+
}, [c("div", ri, [
|
|
3036
3283
|
u(j(oe), {
|
|
3037
3284
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3038
3285
|
"aria-hidden": "true"
|
|
3039
3286
|
}),
|
|
3040
|
-
c("span",
|
|
3287
|
+
c("span", ii, k(j(Bt)(h.value)), 1),
|
|
3041
3288
|
I.value ? (S(), s("button", {
|
|
3042
3289
|
key: 0,
|
|
3043
3290
|
type: "button",
|
|
3044
3291
|
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",
|
|
3045
|
-
onClick: z(
|
|
3292
|
+
onClick: z(te, ["stop"])
|
|
3046
3293
|
}, " Retry ")) : o("", !0)
|
|
3047
|
-
])], 8,
|
|
3048
|
-
icon: j(
|
|
3294
|
+
])], 8, ni)) : (S(), s("div", ai, [c("div", oi, [D(e.$slots, "item-icon", {
|
|
3295
|
+
icon: j(St)(n.item.type),
|
|
3049
3296
|
item: n.item
|
|
3050
|
-
}, () => [(S(), a(O(j(
|
|
3297
|
+
}, () => [(S(), a(O(j(St)(n.item.type)), {
|
|
3051
3298
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
3052
3299
|
"aria-hidden": "true"
|
|
3053
3300
|
}))])])])),
|
|
3054
|
-
c("div",
|
|
3301
|
+
c("div", si, [D(e.$slots, "grid-item-overlay", {
|
|
3055
3302
|
active: n.active,
|
|
3056
3303
|
focused: f.value,
|
|
3057
3304
|
hovered: p.value,
|
|
@@ -3061,24 +3308,24 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3061
3308
|
})])
|
|
3062
3309
|
], 34));
|
|
3063
3310
|
}
|
|
3064
|
-
}),
|
|
3311
|
+
}), li = { 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)]" }, ui = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, di = {
|
|
3065
3312
|
"data-testid": "vibe-pagination",
|
|
3066
3313
|
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]"
|
|
3067
|
-
},
|
|
3314
|
+
}, fi = { class: "whitespace-nowrap" }, pi = {
|
|
3068
3315
|
key: 0,
|
|
3069
3316
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
3070
|
-
},
|
|
3317
|
+
}, mi = [
|
|
3071
3318
|
"data-active",
|
|
3072
3319
|
"data-index",
|
|
3073
3320
|
"data-item-id",
|
|
3074
3321
|
"data-occurrence-key"
|
|
3075
|
-
],
|
|
3322
|
+
], hi = ["data-item-id"], gi = {
|
|
3076
3323
|
key: 0,
|
|
3077
3324
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
3078
|
-
},
|
|
3325
|
+
}, _i = {
|
|
3079
3326
|
key: 1,
|
|
3080
3327
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
3081
|
-
},
|
|
3328
|
+
}, vi = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, yi = /* @__PURE__ */ d({
|
|
3082
3329
|
__name: "ListSurface",
|
|
3083
3330
|
props: {
|
|
3084
3331
|
active: {
|
|
@@ -3135,7 +3382,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3135
3382
|
},
|
|
3136
3383
|
emits: ["open-fullscreen", "update:activeIndex"],
|
|
3137
3384
|
setup(e, { emit: n }) {
|
|
3138
|
-
let r = e, d = N(), f = n, p =
|
|
3385
|
+
let r = e, d = N(), f = n, p = Pr({
|
|
3139
3386
|
active: A(r, "active"),
|
|
3140
3387
|
allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
|
|
3141
3388
|
items: A(r, "items"),
|
|
@@ -3151,11 +3398,11 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3151
3398
|
setActiveIndex(e) {
|
|
3152
3399
|
f("update:activeIndex", e);
|
|
3153
3400
|
}
|
|
3154
|
-
}), m = i(() =>
|
|
3401
|
+
}), m = i(() => jt({
|
|
3155
3402
|
itemCount: r.items.length,
|
|
3156
3403
|
loading: r.loading,
|
|
3157
3404
|
phase: r.phase
|
|
3158
|
-
})), g = i(() =>
|
|
3405
|
+
})), g = i(() => Mt({
|
|
3159
3406
|
errorMessage: r.errorMessage,
|
|
3160
3407
|
hasItems: r.items.length > 0,
|
|
3161
3408
|
hasNextPage: r.hasNextPage,
|
|
@@ -3168,15 +3415,15 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3168
3415
|
message: g.value.message,
|
|
3169
3416
|
paginationDetail: r.paginationDetail,
|
|
3170
3417
|
total: r.items.length
|
|
3171
|
-
}), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() =>
|
|
3418
|
+
}), x = i(() => !b.value || !d["grid-status"] ? [] : d["grid-status"](b.value)), C = i(() => Et(x.value)), w = i(() => r.items.length + p.leavingItems.value.length), { emptyStateProps: T, showBadgeEmptyState: O, showCustomEmptyState: M, showInlineEmptyState: P } = kt({
|
|
3172
3419
|
emptyStateMode: A(r, "emptyStateMode"),
|
|
3173
3420
|
itemCount: w,
|
|
3174
3421
|
loading: A(r, "loading"),
|
|
3175
3422
|
renderSlot: d["empty-state"],
|
|
3176
3423
|
surface: "grid"
|
|
3177
3424
|
});
|
|
3178
|
-
return (e, n) => (S(), s("div",
|
|
3179
|
-
c("div",
|
|
3425
|
+
return (e, n) => (S(), s("div", li, [
|
|
3426
|
+
c("div", ui, [c("span", di, [c("span", fi, k(j(p).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", pi, k(r.paginationDetail), 1)) : o("", !0)])]),
|
|
3180
3427
|
c("div", {
|
|
3181
3428
|
ref: j(p).scrollViewportRef,
|
|
3182
3429
|
"data-testid": "vibe-list-scroll",
|
|
@@ -3189,15 +3436,15 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3189
3436
|
style: y({ height: `${j(p).containerHeight.value}px` })
|
|
3190
3437
|
}, [
|
|
3191
3438
|
(S(!0), s(t, null, E(j(p).renderedItems.value, ({ item: t, index: n }) => (S(), s("article", {
|
|
3192
|
-
key: j(
|
|
3439
|
+
key: j($)(t),
|
|
3193
3440
|
"data-testid": "vibe-list-card",
|
|
3194
3441
|
"data-active": n === j(p).resolvedActiveIndex.value ? "true" : "false",
|
|
3195
3442
|
"data-index": n,
|
|
3196
3443
|
"data-item-id": t.id,
|
|
3197
|
-
"data-occurrence-key": j(
|
|
3444
|
+
"data-occurrence-key": j($)(t),
|
|
3198
3445
|
class: "absolute will-change-transform",
|
|
3199
3446
|
style: y(j(p).getCardStyle(n))
|
|
3200
|
-
}, [u(
|
|
3447
|
+
}, [u(ci, {
|
|
3201
3448
|
active: n === j(p).resolvedActiveIndex.value,
|
|
3202
3449
|
index: n,
|
|
3203
3450
|
item: t,
|
|
@@ -3221,14 +3468,14 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3221
3468
|
"report-asset-load",
|
|
3222
3469
|
"surface-active",
|
|
3223
3470
|
"onOpen"
|
|
3224
|
-
])], 12,
|
|
3471
|
+
])], 12, mi))), 128)),
|
|
3225
3472
|
(S(!0), s(t, null, E(j(p).leavingItems.value, (t) => (S(), s("article", {
|
|
3226
|
-
key: `leaving-${j(
|
|
3473
|
+
key: `leaving-${j($)(t.item)}`,
|
|
3227
3474
|
"data-testid": "vibe-list-card-leaving",
|
|
3228
3475
|
"data-item-id": t.item.id,
|
|
3229
3476
|
class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
|
|
3230
3477
|
style: y(j(p).getLeavingCardStyle(t.item))
|
|
3231
|
-
}, [u(
|
|
3478
|
+
}, [u(ci, {
|
|
3232
3479
|
active: !1,
|
|
3233
3480
|
index: -1,
|
|
3234
3481
|
item: t.item,
|
|
@@ -3243,8 +3490,8 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3243
3490
|
"item",
|
|
3244
3491
|
"report-asset-error",
|
|
3245
3492
|
"report-asset-load"
|
|
3246
|
-
])], 12,
|
|
3247
|
-
j(P) && j(T) ? (S(), a(
|
|
3493
|
+
])], 12, hi))), 128)),
|
|
3494
|
+
j(P) && j(T) ? (S(), a(ln, {
|
|
3248
3495
|
key: 0,
|
|
3249
3496
|
message: j(T).message,
|
|
3250
3497
|
mode: j(T).mode,
|
|
@@ -3258,12 +3505,12 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3258
3505
|
"surface"
|
|
3259
3506
|
])) : o("", !0)
|
|
3260
3507
|
], 4)], 544),
|
|
3261
|
-
j(p).showScrollbar.value ? (S(), s("div",
|
|
3508
|
+
j(p).showScrollbar.value ? (S(), s("div", gi, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
3262
3509
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
3263
3510
|
class: _(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", r.loading ? "bg-white/52" : "bg-white/34"]),
|
|
3264
3511
|
style: y(j(p).getScrollbarThumbStyle())
|
|
3265
3512
|
}, null, 6)])) : o("", !0),
|
|
3266
|
-
d["grid-footer"] ? (S(), s("div",
|
|
3513
|
+
d["grid-footer"] ? (S(), s("div", _i, [c("div", vi, [D(e.$slots, "grid-footer")])])) : o("", !0),
|
|
3267
3514
|
b.value ? (S(), s("div", {
|
|
3268
3515
|
key: 2,
|
|
3269
3516
|
class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", d["grid-footer"] ? "pb-24" : "pb-6"])
|
|
@@ -3272,7 +3519,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3272
3519
|
"data-testid": "vibe-grid-status-badge",
|
|
3273
3520
|
class: _(["inline-flex items-center border border-white/14 bg-black/55 px-4 py-3 text-[0.7rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/72 backdrop-blur-[18px]", b.value.kind === "end" ? "border-amber-300/35 text-amber-200" : b.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
3274
3521
|
}, k(b.value.message), 3))], 2)) : o("", !0),
|
|
3275
|
-
j(O) && j(T) ? (S(), a(
|
|
3522
|
+
j(O) && j(T) ? (S(), a(ln, {
|
|
3276
3523
|
key: 3,
|
|
3277
3524
|
class: _(["z-[3]", d["grid-footer"] ? "pb-24" : "pb-6"]),
|
|
3278
3525
|
message: j(T).message,
|
|
@@ -3289,13 +3536,13 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3289
3536
|
])) : o("", !0)
|
|
3290
3537
|
]));
|
|
3291
3538
|
}
|
|
3292
|
-
}),
|
|
3539
|
+
}), bi = ["data-surface-mode"], xi = {
|
|
3293
3540
|
key: 1,
|
|
3294
3541
|
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"
|
|
3295
|
-
},
|
|
3542
|
+
}, Si = ["data-visible", "inert"], Ci = ["data-visible", "inert"], wi = {
|
|
3296
3543
|
key: 3,
|
|
3297
3544
|
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"
|
|
3298
|
-
},
|
|
3545
|
+
}, Ti = /* @__PURE__ */ d({
|
|
3299
3546
|
name: "VibeLayout",
|
|
3300
3547
|
__name: "Layout",
|
|
3301
3548
|
props: {
|
|
@@ -3304,10 +3551,12 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3304
3551
|
fillDelayStepMs: {},
|
|
3305
3552
|
initialCursor: {},
|
|
3306
3553
|
initialState: {},
|
|
3554
|
+
loopFullscreenVideo: { type: Boolean },
|
|
3307
3555
|
mode: {},
|
|
3308
3556
|
pageSize: {},
|
|
3309
3557
|
paginationDetail: {},
|
|
3310
3558
|
resolve: { type: Function },
|
|
3559
|
+
showDominantImageTone: { type: Boolean },
|
|
3311
3560
|
showEndBadge: { type: Boolean },
|
|
3312
3561
|
showStatusBadges: { type: Boolean },
|
|
3313
3562
|
surfaceMode: {}
|
|
@@ -3319,9 +3568,9 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3319
3568
|
"update:surfaceMode"
|
|
3320
3569
|
],
|
|
3321
3570
|
setup(e, { expose: n, emit: i }) {
|
|
3322
|
-
let d = e, p = N(), m = i, h =
|
|
3571
|
+
let d = e, p = N(), m = i, h = qe(d, m), g = le((e) => {
|
|
3323
3572
|
m("asset-errors", e);
|
|
3324
|
-
}), _ =
|
|
3573
|
+
}), _ = ue((e) => {
|
|
3325
3574
|
m("asset-loads", e);
|
|
3326
3575
|
});
|
|
3327
3576
|
return b(() => {
|
|
@@ -3348,7 +3597,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3348
3597
|
type: "button",
|
|
3349
3598
|
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",
|
|
3350
3599
|
onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
|
|
3351
|
-
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div",
|
|
3600
|
+
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", xi, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).isDesktop.value ? (S(), s(t, { key: 2 }, [u(r, {
|
|
3352
3601
|
appear: "",
|
|
3353
3602
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
3354
3603
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -3362,7 +3611,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3362
3611
|
"data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
|
|
3363
3612
|
inert: j(h).surfaceMode.value !== "list",
|
|
3364
3613
|
class: "absolute inset-0 z-[2]"
|
|
3365
|
-
}, [u(
|
|
3614
|
+
}, [u(yi, {
|
|
3366
3615
|
active: j(h).surfaceMode.value === "list",
|
|
3367
3616
|
"allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
|
|
3368
3617
|
items: j(h).items.value,
|
|
@@ -3430,7 +3679,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3430
3679
|
"show-status-badges",
|
|
3431
3680
|
"onOpenFullscreen",
|
|
3432
3681
|
"onUpdate:activeIndex"
|
|
3433
|
-
])], 8,
|
|
3682
|
+
])], 8, Si), [[P, j(h).surfaceMode.value === "list"]])]),
|
|
3434
3683
|
_: 3
|
|
3435
3684
|
}), u(r, {
|
|
3436
3685
|
appear: "",
|
|
@@ -3446,7 +3695,7 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3446
3695
|
"data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
3447
3696
|
inert: j(h).surfaceMode.value !== "fullscreen",
|
|
3448
3697
|
class: "absolute inset-0 z-[3]"
|
|
3449
|
-
}, [u(
|
|
3698
|
+
}, [u(Gn, {
|
|
3450
3699
|
items: j(h).items.value,
|
|
3451
3700
|
active: j(h).surfaceMode.value === "fullscreen",
|
|
3452
3701
|
"active-index": j(h).activeIndex.value,
|
|
@@ -3458,6 +3707,8 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3458
3707
|
"report-asset-error": j(g).report,
|
|
3459
3708
|
"report-asset-load": j(_).report,
|
|
3460
3709
|
"empty-state-mode": d.emptyStateMode,
|
|
3710
|
+
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
3711
|
+
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
3461
3712
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
3462
3713
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3463
3714
|
"show-back-to-list": j(h).showBackToList.value,
|
|
@@ -3506,17 +3757,19 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3506
3757
|
"report-asset-error",
|
|
3507
3758
|
"report-asset-load",
|
|
3508
3759
|
"empty-state-mode",
|
|
3760
|
+
"loop-fullscreen-video",
|
|
3761
|
+
"show-dominant-image-tone",
|
|
3509
3762
|
"show-end-badge",
|
|
3510
3763
|
"show-status-badges",
|
|
3511
3764
|
"show-back-to-list",
|
|
3512
3765
|
"onBackToList",
|
|
3513
3766
|
"onUpdate:activeIndex"
|
|
3514
|
-
])], 8,
|
|
3767
|
+
])], 8, Ci), [[P, j(h).surfaceMode.value === "fullscreen"]])]),
|
|
3515
3768
|
_: 3
|
|
3516
|
-
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div",
|
|
3769
|
+
})], 64)) : j(h).items.value.length === 0 && j(h).loading.value ? (S(), s("div", wi, [u(j(re), {
|
|
3517
3770
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3518
3771
|
"aria-hidden": "true"
|
|
3519
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(
|
|
3772
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (S(), a(Gn, {
|
|
3520
3773
|
key: 4,
|
|
3521
3774
|
items: j(h).items.value,
|
|
3522
3775
|
active: !0,
|
|
@@ -3529,6 +3782,8 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3529
3782
|
"report-asset-error": j(g).report,
|
|
3530
3783
|
"report-asset-load": j(_).report,
|
|
3531
3784
|
"empty-state-mode": d.emptyStateMode,
|
|
3785
|
+
"loop-fullscreen-video": d.loopFullscreenVideo ?? !0,
|
|
3786
|
+
"show-dominant-image-tone": d.showDominantImageTone ?? !0,
|
|
3532
3787
|
"show-end-badge": d.showEndBadge ?? !0,
|
|
3533
3788
|
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3534
3789
|
"show-back-to-list": !1,
|
|
@@ -3576,14 +3831,16 @@ var Fr = ["aria-label"], Ir = {
|
|
|
3576
3831
|
"report-asset-error",
|
|
3577
3832
|
"report-asset-load",
|
|
3578
3833
|
"empty-state-mode",
|
|
3834
|
+
"loop-fullscreen-video",
|
|
3835
|
+
"show-dominant-image-tone",
|
|
3579
3836
|
"show-end-badge",
|
|
3580
3837
|
"show-status-badges",
|
|
3581
3838
|
"onBackToList",
|
|
3582
3839
|
"onUpdate:activeIndex"
|
|
3583
|
-
]))], 8,
|
|
3840
|
+
]))], 8, bi));
|
|
3584
3841
|
}
|
|
3585
|
-
}),
|
|
3586
|
-
e.component("VibeLayout",
|
|
3842
|
+
}), Ei = { install(e) {
|
|
3843
|
+
e.component("VibeLayout", Ti);
|
|
3587
3844
|
} };
|
|
3588
3845
|
//#endregion
|
|
3589
|
-
export {
|
|
3846
|
+
export { Ti as VibeLayout, Ei as VibePlugin, Ei as default };
|