@wyxos/vibe 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -49
- package/lib/components/FullscreenSurface.vue.d.ts +18 -7
- package/lib/components/Layout.vue.d.ts +14 -3
- package/lib/components/ListCard.vue.d.ts +0 -3
- package/lib/components/ListSurface.vue.d.ts +11 -8
- package/lib/components/viewer-core/autoResolveHelpers.d.ts +1 -1
- package/lib/components/viewer-core/fillDelay.d.ts +2 -2
- package/lib/components/viewer-core/removalState.d.ts +3 -3
- package/lib/components/viewer-core/surfaceSlots.d.ts +1 -6
- package/lib/components/viewer-core/surfaceStatus.d.ts +18 -0
- package/lib/components/viewer-core/useAssetLoadQueue.d.ts +5 -6
- package/lib/components/viewer-core/useAutoResolveSource.d.ts +1 -0
- package/lib/components/viewer-core/useController.d.ts +10 -13
- package/lib/components/viewer-core/useDataSource.d.ts +18 -44
- package/lib/components/viewer-core/useMasonryList.d.ts +1 -2
- package/lib/components/viewer-core/useViewer.d.ts +23 -12
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +39 -3
- package/lib/index.js +1097 -1132
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/components/viewer-core/createFrameScheduler.d.ts +0 -4
package/lib/index.js
CHANGED
|
@@ -84,7 +84,7 @@ var R = (e) => {
|
|
|
84
84
|
}], ["path", {
|
|
85
85
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
86
86
|
key: "wfsgrz"
|
|
87
|
-
}]]),
|
|
87
|
+
}]]), ne = K("image-plus", [
|
|
88
88
|
["path", {
|
|
89
89
|
d: "M16 5h6",
|
|
90
90
|
key: "1vod17"
|
|
@@ -107,10 +107,10 @@ var R = (e) => {
|
|
|
107
107
|
r: "2",
|
|
108
108
|
key: "af1f0g"
|
|
109
109
|
}]
|
|
110
|
-
]),
|
|
110
|
+
]), re = K("loader-circle", [["path", {
|
|
111
111
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
112
112
|
key: "13zald"
|
|
113
|
-
}]]),
|
|
113
|
+
}]]), ie = K("pause", [["rect", {
|
|
114
114
|
x: "14",
|
|
115
115
|
y: "3",
|
|
116
116
|
width: "5",
|
|
@@ -124,10 +124,10 @@ var R = (e) => {
|
|
|
124
124
|
height: "18",
|
|
125
125
|
rx: "1",
|
|
126
126
|
key: "1wsw3u"
|
|
127
|
-
}]]),
|
|
127
|
+
}]]), ae = K("play", [["path", {
|
|
128
128
|
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
129
129
|
key: "10ikf1"
|
|
130
|
-
}]]),
|
|
130
|
+
}]]), oe = K("triangle-alert", [
|
|
131
131
|
["path", {
|
|
132
132
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
133
133
|
key: "wmoenq"
|
|
@@ -141,13 +141,13 @@ var R = (e) => {
|
|
|
141
141
|
key: "p32p05"
|
|
142
142
|
}]
|
|
143
143
|
]);
|
|
144
|
-
function
|
|
145
|
-
return
|
|
144
|
+
function se(e, t = 150) {
|
|
145
|
+
return ce(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}|${e.kind}`, t);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
return
|
|
147
|
+
function X(e, t = 150) {
|
|
148
|
+
return ce(e, (e) => `${e.surface}|${e.occurrenceKey}|${e.url}`, t);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function ce(e, t, n) {
|
|
151
151
|
let r = [], i = /* @__PURE__ */ new Set(), a = null;
|
|
152
152
|
function o(e) {
|
|
153
153
|
let o = t(e);
|
|
@@ -170,142 +170,30 @@ function se(e, t, n) {
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
|
-
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
174
|
-
var ce = {
|
|
175
|
-
maxGlobal: 10,
|
|
176
|
-
maxPerDomain: 4,
|
|
177
|
-
maxVideoPerDomain: 2
|
|
178
|
-
};
|
|
179
|
-
function le(e) {
|
|
180
|
-
return {
|
|
181
|
-
maxGlobal: e?.maxGlobal ?? ce.maxGlobal,
|
|
182
|
-
maxPerDomain: e?.maxPerDomain ?? ce.maxPerDomain,
|
|
183
|
-
maxVideoPerDomain: e?.maxVideoPerDomain ?? ce.maxVideoPerDomain
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
function Q(e) {
|
|
187
|
-
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = le(e), i = 0;
|
|
188
|
-
function a(e) {
|
|
189
|
-
let r = {
|
|
190
|
-
...e,
|
|
191
|
-
domain: de(e.url),
|
|
192
|
-
enqueuedAt: i,
|
|
193
|
-
id: `vibe-asset-load-${i += 1}`
|
|
194
|
-
};
|
|
195
|
-
return n.set(r.id, r), o(), {
|
|
196
|
-
cancel() {
|
|
197
|
-
(n.delete(r.id) || t.delete(r.id)) && o();
|
|
198
|
-
},
|
|
199
|
-
refresh() {
|
|
200
|
-
o();
|
|
201
|
-
},
|
|
202
|
-
release() {
|
|
203
|
-
(t.delete(r.id) || n.delete(r.id)) && o();
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
function o() {
|
|
208
|
-
if (n.size === 0) return;
|
|
209
|
-
let e = [...n.values()].sort((e, t) => {
|
|
210
|
-
let n = ue(e) - ue(t);
|
|
211
|
-
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
212
|
-
});
|
|
213
|
-
for (let i of e) {
|
|
214
|
-
if (t.size >= r.maxGlobal) return;
|
|
215
|
-
if (l(i)) {
|
|
216
|
-
n.delete(i.id), t.set(i.id, i);
|
|
217
|
-
try {
|
|
218
|
-
i.onGrant();
|
|
219
|
-
} catch {
|
|
220
|
-
t.delete(i.id);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function s() {
|
|
226
|
-
return { ...r };
|
|
227
|
-
}
|
|
228
|
-
function c(e) {
|
|
229
|
-
r = le(e), o();
|
|
230
|
-
}
|
|
231
|
-
function l(e) {
|
|
232
|
-
let n = [...t.values()].filter((t) => t.domain === e.domain);
|
|
233
|
-
return !(n.length >= r.maxPerDomain || e.assetType === "video" && n.filter((e) => e.assetType === "video").length >= r.maxVideoPerDomain);
|
|
234
|
-
}
|
|
235
|
-
return {
|
|
236
|
-
getLimits: s,
|
|
237
|
-
request: a,
|
|
238
|
-
setLimits: c
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
function ue(e) {
|
|
242
|
-
try {
|
|
243
|
-
let t = e.getPriority();
|
|
244
|
-
return Number.isFinite(t) ? t : Infinity;
|
|
245
|
-
} catch {
|
|
246
|
-
return Infinity;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
function de(e) {
|
|
250
|
-
try {
|
|
251
|
-
return new URL(e).hostname || "local";
|
|
252
|
-
} catch {
|
|
253
|
-
return "local";
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
//#endregion
|
|
257
173
|
//#region src/components/viewer-core/dom.ts
|
|
258
|
-
function
|
|
174
|
+
function Z(e) {
|
|
259
175
|
return e instanceof HTMLElement && [
|
|
260
176
|
"INPUT",
|
|
261
177
|
"TEXTAREA",
|
|
262
178
|
"SELECT"
|
|
263
179
|
].includes(e.tagName);
|
|
264
180
|
}
|
|
265
|
-
function
|
|
181
|
+
function Q(e) {
|
|
266
182
|
return e instanceof HTMLElement && !!e.closest("[data-swipe-lock], input, textarea, select, a");
|
|
267
183
|
}
|
|
268
184
|
//#endregion
|
|
269
|
-
//#region src/components/viewer-core/itemIdentity.ts
|
|
270
|
-
var me = "__vibeOccurrenceKey";
|
|
271
|
-
function $(e) {
|
|
272
|
-
let t = e[me];
|
|
273
|
-
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
274
|
-
}
|
|
275
|
-
function he(e, t, n) {
|
|
276
|
-
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
277
|
-
for (let e of t) {
|
|
278
|
-
let t = r.get(e.id), n = $(e);
|
|
279
|
-
t ? t.push(n) : r.set(e.id, [n]);
|
|
280
|
-
}
|
|
281
|
-
for (let t of e) {
|
|
282
|
-
let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
|
|
283
|
-
i.push(ge(t, e));
|
|
284
|
-
}
|
|
285
|
-
return {
|
|
286
|
-
items: i,
|
|
287
|
-
nextSequence: a
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
function ge(e, t) {
|
|
291
|
-
return $(e) === t ? e : {
|
|
292
|
-
...e,
|
|
293
|
-
[me]: t
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
185
|
//#region src/components/viewer-core/removalState.ts
|
|
298
|
-
function
|
|
186
|
+
function le() {
|
|
299
187
|
let e = T(/* @__PURE__ */ new Set()), t = T([]);
|
|
300
188
|
function n(n) {
|
|
301
|
-
let r =
|
|
189
|
+
let r = ue(n).filter((t) => !e.value.has(t));
|
|
302
190
|
if (!r.length) return { ids: [] };
|
|
303
191
|
let i = new Set(e.value);
|
|
304
192
|
for (let e of r) i.add(e);
|
|
305
193
|
return e.value = i, t.value = [...t.value, r], { ids: r };
|
|
306
194
|
}
|
|
307
195
|
function r(t) {
|
|
308
|
-
let n =
|
|
196
|
+
let n = ue(t).filter((t) => e.value.has(t));
|
|
309
197
|
if (!n.length) return { ids: [] };
|
|
310
198
|
let r = new Set(e.value);
|
|
311
199
|
for (let e of n) r.delete(e);
|
|
@@ -336,64 +224,92 @@ function _e() {
|
|
|
336
224
|
undo: i
|
|
337
225
|
};
|
|
338
226
|
}
|
|
339
|
-
function
|
|
227
|
+
function ue(e) {
|
|
340
228
|
let t = Array.isArray(e) ? e : [e];
|
|
341
229
|
return Array.from(new Set(t.filter((e) => typeof e == "string" && e.length > 0)));
|
|
342
230
|
}
|
|
343
231
|
//#endregion
|
|
232
|
+
//#region src/components/viewer-core/itemIdentity.ts
|
|
233
|
+
var de = "__vibeOccurrenceKey";
|
|
234
|
+
function $(e) {
|
|
235
|
+
let t = e[de];
|
|
236
|
+
return typeof t == "string" && t.length > 0 ? t : e.id;
|
|
237
|
+
}
|
|
238
|
+
function fe(e, t, n) {
|
|
239
|
+
let r = /* @__PURE__ */ new Map(), i = [], a = n;
|
|
240
|
+
for (let e of t) {
|
|
241
|
+
let t = r.get(e.id), n = $(e);
|
|
242
|
+
t ? t.push(n) : r.set(e.id, [n]);
|
|
243
|
+
}
|
|
244
|
+
for (let t of e) {
|
|
245
|
+
let e = r.get(t.id)?.shift() ?? `vibe-occurrence-${a += 1}`;
|
|
246
|
+
i.push(pe(t, e));
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
items: i,
|
|
250
|
+
nextSequence: a
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function pe(e, t) {
|
|
254
|
+
return $(e) === t ? e : {
|
|
255
|
+
...e,
|
|
256
|
+
[de]: t
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
//#endregion
|
|
344
260
|
//#region src/components/viewer-core/autoBuckets.ts
|
|
345
|
-
function
|
|
261
|
+
function me(e) {
|
|
346
262
|
return e.flatMap((e) => e.items);
|
|
347
263
|
}
|
|
348
|
-
function
|
|
264
|
+
function he(e, t) {
|
|
349
265
|
return t.size ? e.filter((e) => !t.has(e.id)) : e;
|
|
350
266
|
}
|
|
351
|
-
function
|
|
352
|
-
return
|
|
267
|
+
function ge(e, t) {
|
|
268
|
+
return he(e.items, t);
|
|
353
269
|
}
|
|
354
|
-
function
|
|
355
|
-
return
|
|
270
|
+
function _e(e, t) {
|
|
271
|
+
return ge(e, t).length;
|
|
356
272
|
}
|
|
357
|
-
function
|
|
273
|
+
function ve(e, t, n) {
|
|
358
274
|
if (n < 0) return null;
|
|
359
275
|
let r = 0;
|
|
360
276
|
for (let i of e) {
|
|
361
|
-
let e =
|
|
277
|
+
let e = ge(i, t), a = r + e.length;
|
|
362
278
|
if (n < a) return i.cursor;
|
|
363
279
|
r = a;
|
|
364
280
|
}
|
|
365
281
|
return null;
|
|
366
282
|
}
|
|
367
|
-
function
|
|
283
|
+
function ye(e, t, n) {
|
|
368
284
|
let r = [...e], i = r.findIndex((e) => e.cursor === t);
|
|
369
285
|
return i >= 0 && r.splice(i, 1, n), r;
|
|
370
286
|
}
|
|
371
|
-
function
|
|
372
|
-
let r =
|
|
287
|
+
function be(e, t, n) {
|
|
288
|
+
let r = fe(e, t, n);
|
|
373
289
|
return {
|
|
374
290
|
items: r.items,
|
|
375
291
|
nextSequence: r.nextSequence
|
|
376
292
|
};
|
|
377
293
|
}
|
|
378
|
-
function
|
|
379
|
-
return e === "filling" || e === "loading" || e === "
|
|
294
|
+
function xe(e) {
|
|
295
|
+
return e === "filling" || e === "initializing" || e === "loading" || e === "refreshing";
|
|
380
296
|
}
|
|
381
|
-
function
|
|
297
|
+
function Se(e) {
|
|
382
298
|
return !e || !Number.isFinite(e) || e < 1 ? 25 : Math.floor(e);
|
|
383
299
|
}
|
|
384
|
-
function
|
|
300
|
+
function Ce(e) {
|
|
385
301
|
return e ?? "__vibe_initial_cursor__";
|
|
386
302
|
}
|
|
387
|
-
function
|
|
303
|
+
function we(e, t, n) {
|
|
388
304
|
return Math.min(Math.max(e, t), n);
|
|
389
305
|
}
|
|
390
306
|
//#endregion
|
|
391
307
|
//#region src/components/viewer-core/autoResolveState.ts
|
|
392
|
-
function
|
|
308
|
+
function Te(e) {
|
|
393
309
|
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";
|
|
394
310
|
}
|
|
395
|
-
function
|
|
396
|
-
let t =
|
|
311
|
+
function Ee(e) {
|
|
312
|
+
let t = be(e.nextItems, e.previousItems, e.sequence);
|
|
397
313
|
return {
|
|
398
314
|
bucket: {
|
|
399
315
|
cursor: e.cursor,
|
|
@@ -404,7 +320,7 @@ function je(e) {
|
|
|
404
320
|
nextSequence: t.nextSequence
|
|
405
321
|
};
|
|
406
322
|
}
|
|
407
|
-
function
|
|
323
|
+
function De(e, t, n, r) {
|
|
408
324
|
if (!e.length) return r ? null : {
|
|
409
325
|
buckets: [],
|
|
410
326
|
canceled: r,
|
|
@@ -414,46 +330,46 @@ function Me(e, t, n, r) {
|
|
|
414
330
|
return {
|
|
415
331
|
buckets: i,
|
|
416
332
|
canceled: r,
|
|
417
|
-
visibleCount: i.reduce((e, t) => e +
|
|
333
|
+
visibleCount: i.reduce((e, t) => e + _e(t, n), 0)
|
|
418
334
|
};
|
|
419
335
|
}
|
|
420
|
-
function
|
|
421
|
-
let t =
|
|
336
|
+
function Oe(e) {
|
|
337
|
+
let t = Ee({
|
|
422
338
|
cursor: e.initialState.cursor,
|
|
423
339
|
nextCursor: e.initialState.nextCursor ?? null,
|
|
424
340
|
nextItems: e.initialState.items,
|
|
425
341
|
previousCursor: e.initialState.previousCursor ?? null,
|
|
426
342
|
previousItems: [],
|
|
427
343
|
sequence: e.sequence
|
|
428
|
-
}), n =
|
|
344
|
+
}), n = he(t.bucket.items, e.removedIds);
|
|
429
345
|
return {
|
|
430
|
-
activeIndex:
|
|
346
|
+
activeIndex: we(e.initialState.activeIndex ?? 0, 0, Math.max(0, n.length - 1)),
|
|
431
347
|
buckets: [t.bucket],
|
|
432
348
|
nextSequence: t.nextSequence
|
|
433
349
|
};
|
|
434
350
|
}
|
|
435
|
-
function
|
|
436
|
-
let n = e[
|
|
351
|
+
function ke(e, t) {
|
|
352
|
+
let n = e[we(t, 0, Math.max(0, e.length - 1))];
|
|
437
353
|
return n ? $(n) : null;
|
|
438
354
|
}
|
|
439
|
-
function
|
|
355
|
+
function Ae(e, t, n = null) {
|
|
440
356
|
if (!e.length) return 0;
|
|
441
357
|
let r = n ? e.findIndex((e) => $(e) === n) : -1;
|
|
442
|
-
return r >= 0 ? r :
|
|
358
|
+
return r >= 0 ? r : we(t, 0, e.length - 1);
|
|
443
359
|
}
|
|
444
|
-
function
|
|
445
|
-
return e ?
|
|
360
|
+
function je(e, t, n) {
|
|
361
|
+
return e ? _e(e, t) < n : !1;
|
|
446
362
|
}
|
|
447
363
|
//#endregion
|
|
448
364
|
//#region src/components/viewer-core/fillDelay.ts
|
|
449
|
-
var
|
|
450
|
-
function
|
|
365
|
+
var Me = 2e3, Ne = 1e3, Pe = 100;
|
|
366
|
+
function Fe(e, t = Me, n = Ne) {
|
|
451
367
|
return t + Math.max(0, e - 1) * n;
|
|
452
368
|
}
|
|
453
|
-
function
|
|
369
|
+
function Ie(e, t) {
|
|
454
370
|
return !Number.isFinite(e) || e == null || e < 0 ? t : Math.floor(e);
|
|
455
371
|
}
|
|
456
|
-
function
|
|
372
|
+
function Le() {
|
|
457
373
|
let e = T(null), t = null, n = null, r = null;
|
|
458
374
|
function i(i = !1) {
|
|
459
375
|
if (t &&= (clearInterval(t), null), n &&= (clearTimeout(n), null), e.value = null, i && r) {
|
|
@@ -471,7 +387,7 @@ function Ve() {
|
|
|
471
387
|
let t = Math.max(0, a - (Date.now() - s));
|
|
472
388
|
e.value = t, t <= 0 && l();
|
|
473
389
|
};
|
|
474
|
-
t = setInterval(u,
|
|
390
|
+
t = setInterval(u, Pe), n = setTimeout(l, a), u();
|
|
475
391
|
}));
|
|
476
392
|
}
|
|
477
393
|
return {
|
|
@@ -482,384 +398,345 @@ function Ve() {
|
|
|
482
398
|
}
|
|
483
399
|
//#endregion
|
|
484
400
|
//#region src/components/viewer-core/useAutoResolveSource.ts
|
|
485
|
-
function
|
|
486
|
-
let t = T([]),
|
|
487
|
-
P(() =>
|
|
401
|
+
function Re(e) {
|
|
402
|
+
let t = !!e.initialState?.items.length, n = T([]), r = T(0), a = T([]), o = T(null), s = T(!t && typeof e.resolve == "function" ? "initializing" : "idle"), c = T(null), l = Le(), u = l.remainingMs, d = T(null), f = T(!1), p = T(!0), m = /* @__PURE__ */ new Set(), h = null, g = null, _ = 0, v = 0, y = i(() => Ie(e.fillDelayMs, Me)), S = i(() => Ie(e.fillDelayStepMs, Ne)), C = i(() => typeof e.resolve == "function"), w = i(() => e.mode ?? "dynamic"), E = i(() => Se(e.pageSize)), D = i(() => me(n.value)), O = i(() => he(D.value, e.removedIds.value)), k = i(() => r.value), A = i(() => xe(s.value) || f.value), j = i(() => n.value[0] ?? null), M = i(() => n.value[n.value.length - 1] ?? null), N = i(() => M.value?.nextCursor ?? null), F = i(() => j.value?.previousCursor ?? null), I = i(() => !!N.value), L = i(() => !!F.value), ee = i(() => C.value && n.value.length > 0), R = i(() => he(me(a.value), e.removedIds.value)), z = i(() => ve(n.value, e.removedIds.value, k.value)), B = i(() => !O.value.length && !A.value && !!o.value);
|
|
403
|
+
P(() => O.value.length, (e) => {
|
|
488
404
|
if (e === 0) {
|
|
489
|
-
|
|
405
|
+
r.value = 0;
|
|
490
406
|
return;
|
|
491
407
|
}
|
|
492
|
-
|
|
493
|
-
}), P(() =>
|
|
494
|
-
|
|
408
|
+
r.value > e - 1 && (r.value = e - 1);
|
|
409
|
+
}), P(() => r.value, () => {
|
|
410
|
+
p.value && ie();
|
|
495
411
|
}), x(() => {
|
|
496
|
-
e.resolve && (
|
|
412
|
+
Q() || e.resolve && V();
|
|
497
413
|
}), b(() => {
|
|
498
|
-
|
|
414
|
+
h?.abort(), h = null, l.clear(!0);
|
|
499
415
|
});
|
|
500
|
-
async function
|
|
501
|
-
|
|
502
|
-
let
|
|
503
|
-
continueUntilFilled:
|
|
416
|
+
async function V() {
|
|
417
|
+
g = V;
|
|
418
|
+
let t = await X({
|
|
419
|
+
continueUntilFilled: w.value === "dynamic",
|
|
504
420
|
cursor: e.initialCursor ?? null,
|
|
505
421
|
direction: "forward",
|
|
506
|
-
phase: "
|
|
422
|
+
phase: "initializing"
|
|
507
423
|
});
|
|
508
|
-
|
|
424
|
+
t && (n.value = t.buckets, r.value = 0, Z());
|
|
509
425
|
}
|
|
510
|
-
async function
|
|
511
|
-
if (!
|
|
512
|
-
if (
|
|
513
|
-
|
|
426
|
+
async function H() {
|
|
427
|
+
if (!A.value) {
|
|
428
|
+
if (!I.value) return ee.value ? se("trailing") : void 0;
|
|
429
|
+
if (w.value === "static" && ue("trailing")) return se("trailing");
|
|
430
|
+
await ae(N.value);
|
|
514
431
|
}
|
|
515
432
|
}
|
|
516
|
-
async function
|
|
517
|
-
if (!(!
|
|
518
|
-
if (
|
|
519
|
-
await
|
|
433
|
+
async function U() {
|
|
434
|
+
if (!(!L.value || A.value)) {
|
|
435
|
+
if (w.value === "static" && ue("leading")) return se("leading");
|
|
436
|
+
await oe(F.value);
|
|
520
437
|
}
|
|
521
438
|
}
|
|
522
|
-
async function
|
|
523
|
-
if (
|
|
524
|
-
if (
|
|
439
|
+
async function W() {
|
|
440
|
+
if (B.value) {
|
|
441
|
+
if (n.value = [], r.value = 0, a.value = [], o.value = null, s.value = C.value ? "initializing" : "idle", c.value = null, d.value = null, f.value = !1, m.clear(), h?.abort(), h = null, l.clear(!0), Q()) {
|
|
525
442
|
Z();
|
|
526
443
|
return;
|
|
527
444
|
}
|
|
528
|
-
await
|
|
445
|
+
await V();
|
|
529
446
|
}
|
|
530
447
|
}
|
|
531
|
-
async function
|
|
532
|
-
if (
|
|
533
|
-
|
|
448
|
+
async function G() {
|
|
449
|
+
if (B.value) return W();
|
|
450
|
+
s.value !== "failed" || !g || (o.value = null, await g());
|
|
534
451
|
}
|
|
535
|
-
async function
|
|
536
|
-
if (!
|
|
537
|
-
|
|
452
|
+
async function K() {
|
|
453
|
+
if (!a.value.length) return f.value = !1, Z();
|
|
454
|
+
n.value = [...n.value, ...a.value], a.value = [], f.value = !1, Z();
|
|
538
455
|
}
|
|
539
|
-
function
|
|
540
|
-
let
|
|
541
|
-
if (!
|
|
542
|
-
let i =
|
|
543
|
-
i !==
|
|
456
|
+
function q(t) {
|
|
457
|
+
let n = O.value;
|
|
458
|
+
if (!n.length) return;
|
|
459
|
+
let i = we(t, 0, n.length - 1);
|
|
460
|
+
i !== r.value && (r.value = i, e.emit("update:activeIndex", i));
|
|
544
461
|
}
|
|
545
|
-
function
|
|
546
|
-
|
|
462
|
+
function J(e) {
|
|
463
|
+
p.value = e;
|
|
547
464
|
}
|
|
548
|
-
function
|
|
549
|
-
|
|
465
|
+
function te() {
|
|
466
|
+
_ += 1, h?.abort(), h = null, l.clear(!0), m.clear(), o.value = null, c.value = null, d.value = null, a.value.length > 0 && (n.value = [...n.value, ...a.value], a.value = []), f.value = !1, Z();
|
|
550
467
|
}
|
|
551
|
-
function
|
|
552
|
-
return
|
|
468
|
+
function Y() {
|
|
469
|
+
return ke(O.value, k.value);
|
|
553
470
|
}
|
|
554
|
-
function
|
|
555
|
-
|
|
471
|
+
function ne(e = null) {
|
|
472
|
+
r.value = Ae(O.value, k.value, e);
|
|
556
473
|
}
|
|
557
|
-
function
|
|
558
|
-
|
|
474
|
+
function re() {
|
|
475
|
+
a.value.length > 0 && !R.value.length && K();
|
|
559
476
|
}
|
|
560
|
-
async function
|
|
561
|
-
!
|
|
477
|
+
async function ie() {
|
|
478
|
+
!O.value.length || le() || (L.value && r.value < 3 && await U(), I.value && r.value >= O.value.length - 3 && await H());
|
|
562
479
|
}
|
|
563
|
-
async function
|
|
564
|
-
|
|
565
|
-
await
|
|
480
|
+
async function ae(e) {
|
|
481
|
+
g = async () => {
|
|
482
|
+
await ae(e);
|
|
566
483
|
};
|
|
567
|
-
let
|
|
568
|
-
continueUntilFilled:
|
|
484
|
+
let t = await X({
|
|
485
|
+
continueUntilFilled: w.value === "dynamic",
|
|
569
486
|
cursor: e,
|
|
570
487
|
direction: "forward",
|
|
571
488
|
phase: "loading"
|
|
572
489
|
});
|
|
573
|
-
if (
|
|
574
|
-
if (
|
|
575
|
-
if (
|
|
576
|
-
|
|
490
|
+
if (t) {
|
|
491
|
+
if (t.canceled) return n.value = [...n.value, ...t.buckets], a.value = [], f.value = !1, Z();
|
|
492
|
+
if (a.value = t.buckets, !R.value.length) return n.value = [...n.value, ...a.value], a.value = [], f.value = !1, Z();
|
|
493
|
+
f.value = !0;
|
|
577
494
|
}
|
|
578
495
|
}
|
|
579
|
-
async function
|
|
580
|
-
|
|
581
|
-
await
|
|
496
|
+
async function oe(e) {
|
|
497
|
+
g = async () => {
|
|
498
|
+
await oe(e);
|
|
582
499
|
};
|
|
583
|
-
let
|
|
584
|
-
continueUntilFilled:
|
|
500
|
+
let t = await X({
|
|
501
|
+
continueUntilFilled: w.value === "dynamic",
|
|
585
502
|
cursor: e,
|
|
586
503
|
direction: "backward",
|
|
587
504
|
phase: "loading"
|
|
588
505
|
});
|
|
589
|
-
if (!
|
|
590
|
-
let r =
|
|
591
|
-
|
|
506
|
+
if (!t) return;
|
|
507
|
+
let r = Y();
|
|
508
|
+
n.value = [...t.buckets, ...n.value], ne(r), Z();
|
|
592
509
|
}
|
|
593
|
-
async function
|
|
594
|
-
if (
|
|
595
|
-
await
|
|
510
|
+
async function se(t) {
|
|
511
|
+
if (g = async () => {
|
|
512
|
+
await se(t);
|
|
596
513
|
}, !e.resolve) return;
|
|
597
|
-
let r =
|
|
514
|
+
let r = t === "leading" ? j.value : M.value;
|
|
598
515
|
if (!r) return;
|
|
599
|
-
let i =
|
|
600
|
-
if (
|
|
601
|
-
|
|
602
|
-
let
|
|
603
|
-
|
|
516
|
+
let i = Ce(r.cursor);
|
|
517
|
+
if (m.has(i)) return;
|
|
518
|
+
m.add(i), o.value = null, s.value = "refreshing", c.value = null, d.value = null;
|
|
519
|
+
let a = ++_, l = typeof AbortController > "u" ? null : new AbortController();
|
|
520
|
+
h = l;
|
|
604
521
|
try {
|
|
605
|
-
let
|
|
522
|
+
let t = await e.resolve({
|
|
606
523
|
cursor: r.cursor,
|
|
607
|
-
pageSize:
|
|
524
|
+
pageSize: E.value,
|
|
608
525
|
signal: l?.signal
|
|
609
526
|
});
|
|
610
|
-
if (
|
|
611
|
-
let i =
|
|
527
|
+
if (a !== _) return Z();
|
|
528
|
+
let i = ce({
|
|
612
529
|
cursor: r.cursor,
|
|
613
|
-
nextCursor:
|
|
614
|
-
nextItems:
|
|
615
|
-
previousCursor:
|
|
530
|
+
nextCursor: t.nextPage,
|
|
531
|
+
nextItems: t.items,
|
|
532
|
+
previousCursor: t.previousPage ?? null,
|
|
616
533
|
previousItems: r.items
|
|
617
|
-
}),
|
|
618
|
-
|
|
534
|
+
}), o = Y();
|
|
535
|
+
n.value = ye(n.value, r.cursor, i), ne(o), Z();
|
|
619
536
|
} catch (e) {
|
|
620
|
-
if (
|
|
537
|
+
if (Te(e) || a !== _) {
|
|
621
538
|
Z();
|
|
622
539
|
return;
|
|
623
540
|
}
|
|
624
|
-
|
|
541
|
+
o.value = e instanceof Error ? e.message : "The viewer could not load items.", s.value = "failed", c.value = null, d.value = null;
|
|
625
542
|
} finally {
|
|
626
|
-
|
|
543
|
+
h === l && (h = null), m.delete(i);
|
|
627
544
|
}
|
|
628
545
|
}
|
|
629
|
-
async function
|
|
546
|
+
async function X(t) {
|
|
630
547
|
if (!e.resolve) return null;
|
|
631
|
-
let n = ++
|
|
632
|
-
for (
|
|
633
|
-
if (n !==
|
|
634
|
-
let f =
|
|
635
|
-
if (r.has(f) ||
|
|
636
|
-
r.add(f),
|
|
637
|
-
let
|
|
638
|
-
|
|
548
|
+
let n = ++_, r = /* @__PURE__ */ new Set(), i = [], a = t.cursor, u = 0;
|
|
549
|
+
for (o.value = null, s.value = t.phase, c.value = null, d.value = null;;) {
|
|
550
|
+
if (n !== _) return De(i, t.direction, e.removedIds.value, !0);
|
|
551
|
+
let f = Ce(a);
|
|
552
|
+
if (r.has(f) || m.has(f)) break;
|
|
553
|
+
r.add(f), m.add(f);
|
|
554
|
+
let p = typeof AbortController > "u" ? null : new AbortController();
|
|
555
|
+
h = p;
|
|
639
556
|
try {
|
|
640
557
|
let r = await e.resolve({
|
|
641
|
-
cursor:
|
|
642
|
-
pageSize:
|
|
643
|
-
signal:
|
|
558
|
+
cursor: a,
|
|
559
|
+
pageSize: E.value,
|
|
560
|
+
signal: p?.signal
|
|
644
561
|
});
|
|
645
|
-
if (n !==
|
|
646
|
-
let
|
|
647
|
-
cursor:
|
|
562
|
+
if (n !== _) return De(i, t.direction, e.removedIds.value, !0);
|
|
563
|
+
let o = ce({
|
|
564
|
+
cursor: a,
|
|
648
565
|
nextCursor: r.nextPage,
|
|
649
566
|
nextItems: r.items,
|
|
650
567
|
previousCursor: r.previousPage ?? null,
|
|
651
568
|
previousItems: []
|
|
652
569
|
});
|
|
653
|
-
i.push(
|
|
654
|
-
let f = i.reduce((t, n) => t +
|
|
655
|
-
if (!t.continueUntilFilled || f >=
|
|
570
|
+
i.push(o);
|
|
571
|
+
let f = i.reduce((t, n) => t + _e(n, e.removedIds.value), 0), m = t.direction === "forward" ? o.nextCursor : o.previousCursor;
|
|
572
|
+
if (!t.continueUntilFilled || f >= E.value || !m) return {
|
|
656
573
|
canceled: !1,
|
|
657
574
|
buckets: t.direction === "backward" ? [...i].reverse() : i,
|
|
658
575
|
visibleCount: f
|
|
659
576
|
};
|
|
660
|
-
|
|
661
|
-
let
|
|
662
|
-
if (await
|
|
663
|
-
|
|
577
|
+
s.value = "filling", c.value = f, d.value = E.value, u += 1;
|
|
578
|
+
let h = Fe(u, y.value, S.value);
|
|
579
|
+
if (await l.wait(h), n !== _) return De(i, t.direction, e.removedIds.value, !0);
|
|
580
|
+
a = m;
|
|
664
581
|
} catch (r) {
|
|
665
|
-
return
|
|
582
|
+
return Te(r) || n !== _ ? De(i, t.direction, e.removedIds.value, !0) : (o.value = r instanceof Error ? r.message : "The viewer could not load items.", s.value = "failed", c.value = null, d.value = null, null);
|
|
666
583
|
} finally {
|
|
667
|
-
|
|
584
|
+
h === p && (h = null), m.delete(f);
|
|
668
585
|
}
|
|
669
586
|
}
|
|
670
|
-
return
|
|
587
|
+
return De(i, t.direction, e.removedIds.value, !1);
|
|
671
588
|
}
|
|
672
|
-
function
|
|
673
|
-
let t =
|
|
589
|
+
function ce(e) {
|
|
590
|
+
let t = Ee({
|
|
674
591
|
cursor: e.cursor,
|
|
675
592
|
nextCursor: e.nextCursor,
|
|
676
593
|
nextItems: e.nextItems,
|
|
677
594
|
previousCursor: e.previousCursor,
|
|
678
595
|
previousItems: e.previousItems,
|
|
679
|
-
sequence:
|
|
596
|
+
sequence: v
|
|
680
597
|
});
|
|
681
|
-
return
|
|
598
|
+
return v = t.nextSequence, t.bucket;
|
|
682
599
|
}
|
|
683
600
|
function Z() {
|
|
684
|
-
|
|
601
|
+
s.value = "idle", c.value = null, d.value = null, l.clear();
|
|
685
602
|
}
|
|
686
|
-
function
|
|
603
|
+
function Q() {
|
|
687
604
|
if (!e.initialState || !e.initialState.items.length) return !1;
|
|
688
|
-
let
|
|
605
|
+
let t = Oe({
|
|
689
606
|
initialState: e.initialState,
|
|
690
607
|
removedIds: e.removedIds.value,
|
|
691
|
-
sequence:
|
|
608
|
+
sequence: v
|
|
692
609
|
});
|
|
693
|
-
return
|
|
610
|
+
return n.value = t.buckets, r.value = t.activeIndex, v = t.nextSequence, o.value = null, a.value = [], f.value = !1, !0;
|
|
694
611
|
}
|
|
695
|
-
function
|
|
696
|
-
return
|
|
612
|
+
function le() {
|
|
613
|
+
return s.value === "initializing";
|
|
697
614
|
}
|
|
698
|
-
function
|
|
699
|
-
return
|
|
615
|
+
function ue(t) {
|
|
616
|
+
return je(t === "leading" ? j.value : M.value, e.removedIds.value, E.value);
|
|
700
617
|
}
|
|
701
618
|
return {
|
|
702
|
-
activeIndex:
|
|
703
|
-
canRetryInitialLoad:
|
|
704
|
-
cancel:
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
619
|
+
activeIndex: k,
|
|
620
|
+
canRetryInitialLoad: B,
|
|
621
|
+
cancel: te,
|
|
622
|
+
canRefreshTrailingBoundary: ee,
|
|
623
|
+
commitPendingAppend: K,
|
|
624
|
+
currentCursor: z,
|
|
625
|
+
errorMessage: o,
|
|
626
|
+
fillCollectedCount: c,
|
|
627
|
+
fillDelayRemainingMs: u,
|
|
628
|
+
fillTargetCount: d,
|
|
629
|
+
hasNextPage: I,
|
|
630
|
+
hasPreviousPage: L,
|
|
631
|
+
items: O,
|
|
632
|
+
loading: A,
|
|
633
|
+
mode: w,
|
|
634
|
+
nextCursor: N,
|
|
635
|
+
pendingAppendItems: R,
|
|
636
|
+
phase: s,
|
|
637
|
+
prefetchNextPage: H,
|
|
638
|
+
prefetchPreviousPage: U,
|
|
639
|
+
previousCursor: F,
|
|
640
|
+
retryInitialLoad: W,
|
|
641
|
+
retry: G,
|
|
642
|
+
setActiveIndex: q,
|
|
643
|
+
setAutoPrefetchEnabled: J,
|
|
644
|
+
syncActiveIndexAfterVisibilityChange: ne,
|
|
645
|
+
getActiveOccurrenceKey: Y,
|
|
646
|
+
maybeCommitPendingAppendWhenFilteredOut: re
|
|
729
647
|
};
|
|
730
648
|
}
|
|
731
649
|
//#endregion
|
|
732
650
|
//#region src/components/viewer-core/useDataSource.ts
|
|
733
|
-
function
|
|
734
|
-
let
|
|
651
|
+
function ze(e, t) {
|
|
652
|
+
let { clearRemoved: n, getRemovedIds: r, remove: a, removedIds: o, restore: s, undo: c } = le(), l = Re({
|
|
735
653
|
emit: t,
|
|
736
|
-
fillDelayMs:
|
|
737
|
-
fillDelayStepMs:
|
|
738
|
-
initialCursor:
|
|
739
|
-
initialState:
|
|
740
|
-
mode:
|
|
741
|
-
pageSize:
|
|
742
|
-
removedIds:
|
|
743
|
-
resolve:
|
|
744
|
-
}),
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
if (h.value) return;
|
|
749
|
-
let t = he(e, m.value, p);
|
|
750
|
-
m.value = t.items, p = t.nextSequence;
|
|
751
|
-
}, {
|
|
752
|
-
deep: !0,
|
|
753
|
-
immediate: !0
|
|
754
|
-
});
|
|
755
|
-
function w(e) {
|
|
756
|
-
let r = _.value;
|
|
757
|
-
if (!r.length) return;
|
|
758
|
-
let i = M(e, 0, r.length - 1);
|
|
759
|
-
if (h.value) {
|
|
760
|
-
d.setActiveIndex(i);
|
|
761
|
-
return;
|
|
762
|
-
}
|
|
763
|
-
i !== (n.activeIndex ?? 0) && t("update:activeIndex", i);
|
|
654
|
+
fillDelayMs: e.fillDelayMs,
|
|
655
|
+
fillDelayStepMs: e.fillDelayStepMs,
|
|
656
|
+
initialCursor: e.initialCursor,
|
|
657
|
+
initialState: e.initialState,
|
|
658
|
+
mode: e.mode,
|
|
659
|
+
pageSize: e.pageSize,
|
|
660
|
+
removedIds: o,
|
|
661
|
+
resolve: e.resolve
|
|
662
|
+
}), u = l.items, d = l.activeIndex, f = l.loading, p = l.hasNextPage, m = l.hasPreviousPage, h = i(() => o.value.size), g = i(() => e.paginationDetail ?? null), _ = i(() => !l.hasNextPage.value && l.canRefreshTrailingBoundary.value);
|
|
663
|
+
function v(e) {
|
|
664
|
+
let t = u.value;
|
|
665
|
+
t.length && l.setActiveIndex(C(e, 0, t.length - 1));
|
|
764
666
|
}
|
|
765
|
-
function
|
|
766
|
-
let t =
|
|
767
|
-
return n.ids.length ?
|
|
667
|
+
function y(e) {
|
|
668
|
+
let t = l.getActiveOccurrenceKey(), n = a(e);
|
|
669
|
+
return n.ids.length ? (l.maybeCommitPendingAppendWhenFilteredOut(), l.syncActiveIndexAfterVisibilityChange(t), n) : n;
|
|
768
670
|
}
|
|
769
|
-
function
|
|
770
|
-
let t =
|
|
771
|
-
return n.ids.length
|
|
671
|
+
function b(e) {
|
|
672
|
+
let t = l.getActiveOccurrenceKey(), n = s(e);
|
|
673
|
+
return n.ids.length && l.syncActiveIndexAfterVisibilityChange(t), n;
|
|
772
674
|
}
|
|
773
|
-
function
|
|
774
|
-
let e =
|
|
775
|
-
return t?.ids.length
|
|
675
|
+
function x() {
|
|
676
|
+
let e = l.getActiveOccurrenceKey(), t = c();
|
|
677
|
+
return t?.ids.length && l.syncActiveIndexAfterVisibilityChange(e), t;
|
|
776
678
|
}
|
|
777
|
-
function
|
|
778
|
-
let e =
|
|
779
|
-
|
|
780
|
-
d.syncActiveIndexAfterVisibilityChange(e);
|
|
781
|
-
return;
|
|
782
|
-
}
|
|
783
|
-
j(e);
|
|
679
|
+
function S() {
|
|
680
|
+
let e = l.getActiveOccurrenceKey();
|
|
681
|
+
n(), l.syncActiveIndexAfterVisibilityChange(e);
|
|
784
682
|
}
|
|
785
|
-
function
|
|
786
|
-
let e = _.value[M(v.value, 0, Math.max(0, _.value.length - 1))];
|
|
787
|
-
return e ? $(e) : null;
|
|
788
|
-
}
|
|
789
|
-
function j(e = null) {
|
|
790
|
-
if (!_.value.length) return;
|
|
791
|
-
let r = e ? _.value.findIndex((t) => $(t) === e) : -1, i = r >= 0 ? r : M(v.value, 0, _.value.length - 1);
|
|
792
|
-
i !== (n.activeIndex ?? 0) && t("update:activeIndex", i);
|
|
793
|
-
}
|
|
794
|
-
function M(e, t, n) {
|
|
683
|
+
function C(e, t, n) {
|
|
795
684
|
return Math.min(Math.max(e, t), n);
|
|
796
685
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
686
|
+
function w() {
|
|
687
|
+
l.cancel();
|
|
799
688
|
}
|
|
800
|
-
async function
|
|
801
|
-
|
|
802
|
-
await d.prefetchNextPage();
|
|
803
|
-
return;
|
|
804
|
-
}
|
|
805
|
-
y.value || typeof n.requestNextPage != "function" || await n.requestNextPage();
|
|
689
|
+
async function T() {
|
|
690
|
+
await l.prefetchNextPage();
|
|
806
691
|
}
|
|
807
|
-
async function
|
|
808
|
-
|
|
809
|
-
await d.prefetchPreviousPage();
|
|
810
|
-
return;
|
|
811
|
-
}
|
|
812
|
-
y.value || typeof n.requestPreviousPage != "function" || await n.requestPreviousPage();
|
|
692
|
+
async function E() {
|
|
693
|
+
await l.prefetchPreviousPage();
|
|
813
694
|
}
|
|
814
|
-
async function
|
|
815
|
-
|
|
695
|
+
async function D() {
|
|
696
|
+
await l.retry();
|
|
816
697
|
}
|
|
817
698
|
return {
|
|
818
|
-
activeIndex:
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
items:
|
|
833
|
-
loading:
|
|
834
|
-
loadNext:
|
|
835
|
-
loadPrevious:
|
|
836
|
-
mode:
|
|
837
|
-
nextCursor:
|
|
838
|
-
paginationDetail:
|
|
839
|
-
pendingAppendItems:
|
|
840
|
-
phase:
|
|
841
|
-
prefetchNextPage:
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
retryInitialLoad: d.retryInitialLoad,
|
|
853
|
-
setActiveIndex: w,
|
|
854
|
-
setAutoPrefetchEnabled: d.setAutoPrefetchEnabled,
|
|
855
|
-
undo: O
|
|
699
|
+
activeIndex: d,
|
|
700
|
+
canRefreshExhaustedNextPage: _,
|
|
701
|
+
canRetryInitialLoad: l.canRetryInitialLoad,
|
|
702
|
+
cancel: w,
|
|
703
|
+
clearRemoved: S,
|
|
704
|
+
commitPendingAppend: l.commitPendingAppend,
|
|
705
|
+
currentCursor: l.currentCursor,
|
|
706
|
+
errorMessage: l.errorMessage,
|
|
707
|
+
fillCollectedCount: l.fillCollectedCount,
|
|
708
|
+
fillDelayRemainingMs: l.fillDelayRemainingMs,
|
|
709
|
+
fillTargetCount: l.fillTargetCount,
|
|
710
|
+
getRemovedIds: r,
|
|
711
|
+
hasNextPage: p,
|
|
712
|
+
hasPreviousPage: m,
|
|
713
|
+
items: u,
|
|
714
|
+
loading: f,
|
|
715
|
+
loadNext: T,
|
|
716
|
+
loadPrevious: E,
|
|
717
|
+
mode: l.mode,
|
|
718
|
+
nextCursor: l.nextCursor,
|
|
719
|
+
paginationDetail: g,
|
|
720
|
+
pendingAppendItems: l.pendingAppendItems,
|
|
721
|
+
phase: l.phase,
|
|
722
|
+
prefetchNextPage: l.prefetchNextPage,
|
|
723
|
+
prefetchPreviousPage: l.prefetchPreviousPage,
|
|
724
|
+
previousCursor: l.previousCursor,
|
|
725
|
+
removedCount: h,
|
|
726
|
+
remove: y,
|
|
727
|
+
restore: b,
|
|
728
|
+
retry: D,
|
|
729
|
+
retryInitialLoad: l.retryInitialLoad,
|
|
730
|
+
setActiveIndex: v,
|
|
731
|
+
setAutoPrefetchEnabled: l.setAutoPrefetchEnabled,
|
|
732
|
+
undo: x
|
|
856
733
|
};
|
|
857
734
|
}
|
|
858
735
|
//#endregion
|
|
859
736
|
//#region src/components/viewer-core/useController.ts
|
|
860
|
-
var
|
|
861
|
-
function
|
|
862
|
-
let n =
|
|
737
|
+
var Be = 1024;
|
|
738
|
+
function Ve(e, t) {
|
|
739
|
+
let n = ze(e, t), r = T(0), a = T("list"), o = C({
|
|
863
740
|
activeIndex: 0,
|
|
864
741
|
currentCursor: null,
|
|
865
742
|
errorMessage: null,
|
|
@@ -868,81 +745,70 @@ function Ge(e, t) {
|
|
|
868
745
|
fillTargetCount: null,
|
|
869
746
|
hasNextPage: !1,
|
|
870
747
|
hasPreviousPage: !1,
|
|
871
|
-
isAutoMode: !1,
|
|
872
748
|
itemCount: 0,
|
|
873
749
|
loadState: "loaded",
|
|
874
|
-
mode:
|
|
750
|
+
mode: "dynamic",
|
|
875
751
|
nextCursor: null,
|
|
876
752
|
phase: "idle",
|
|
877
753
|
previousCursor: null,
|
|
878
754
|
removedCount: 0,
|
|
755
|
+
removedIds: [],
|
|
879
756
|
surfaceMode: "list"
|
|
880
|
-
}),
|
|
881
|
-
P(
|
|
882
|
-
e && (
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
}), P([
|
|
757
|
+
}), s = i(() => r.value >= Be), c = i(() => s.value ? a.value : "fullscreen"), l = i(() => s.value && c.value === "fullscreen");
|
|
758
|
+
P(s, (e) => {
|
|
759
|
+
e && m();
|
|
760
|
+
}), P(() => e.surfaceMode, () => {
|
|
761
|
+
m();
|
|
762
|
+
}), P([c, () => n.pendingAppendItems.value.length], ([e, t]) => {
|
|
886
763
|
e === "list" || t <= 0 || n.commitPendingAppend();
|
|
887
|
-
}), P(
|
|
764
|
+
}), P(c, (e) => {
|
|
888
765
|
n.setAutoPrefetchEnabled(e === "fullscreen");
|
|
889
766
|
}, { immediate: !0 }), F(() => {
|
|
890
|
-
|
|
767
|
+
o.activeIndex = n.activeIndex.value, o.currentCursor = n.currentCursor.value, o.errorMessage = n.errorMessage.value, o.fillCollectedCount = n.fillCollectedCount.value, o.fillDelayRemainingMs = n.fillDelayRemainingMs.value, o.fillTargetCount = n.fillTargetCount.value, o.hasNextPage = n.hasNextPage.value, o.hasPreviousPage = n.hasPreviousPage.value, o.itemCount = n.items.value.length, o.loadState = n.loading.value ? "loading" : n.errorMessage.value ? "failed" : "loaded", o.mode = n.mode.value, o.nextCursor = n.nextCursor.value, o.phase = n.phase.value, o.previousCursor = n.previousCursor.value, o.removedCount = n.removedCount.value, o.removedIds = n.getRemovedIds(), o.surfaceMode = c.value;
|
|
891
768
|
}), x(() => {
|
|
892
|
-
|
|
769
|
+
p(), m(), window.addEventListener("keydown", f), window.addEventListener("resize", p);
|
|
893
770
|
}), b(() => {
|
|
894
|
-
window.removeEventListener("keydown",
|
|
771
|
+
window.removeEventListener("keydown", f), window.removeEventListener("resize", p);
|
|
895
772
|
});
|
|
896
|
-
function
|
|
897
|
-
n.setActiveIndex(e),
|
|
773
|
+
function u(e) {
|
|
774
|
+
n.setActiveIndex(e), s.value && a.value !== "fullscreen" && (a.value = "fullscreen", t("update:surfaceMode", "fullscreen"));
|
|
898
775
|
}
|
|
899
|
-
function
|
|
900
|
-
|
|
901
|
-
if (l.value) {
|
|
902
|
-
u.value !== "list" && t("update:surfaceMode", "list");
|
|
903
|
-
return;
|
|
904
|
-
}
|
|
905
|
-
a.value = "list", o.value += 1;
|
|
906
|
-
}
|
|
776
|
+
function d() {
|
|
777
|
+
!s.value || a.value === "list" || (a.value = "list", t("update:surfaceMode", "list"));
|
|
907
778
|
}
|
|
908
|
-
function
|
|
909
|
-
e.defaultPrevented || e.key !== "Escape" || !
|
|
779
|
+
function f(e) {
|
|
780
|
+
e.defaultPrevented || e.key !== "Escape" || !s.value || c.value !== "fullscreen" || Z(e.target) || (e.preventDefault(), d());
|
|
910
781
|
}
|
|
911
|
-
function
|
|
782
|
+
function p() {
|
|
912
783
|
r.value = window.innerWidth || 0;
|
|
913
784
|
}
|
|
914
|
-
function
|
|
915
|
-
|
|
916
|
-
e.surfaceMode !== n && t("update:surfaceMode", n);
|
|
917
|
-
return;
|
|
918
|
-
}
|
|
919
|
-
a.value = n;
|
|
785
|
+
function m() {
|
|
786
|
+
!s.value || !e.surfaceMode || e.surfaceMode === a.value || (a.value = e.surfaceMode);
|
|
920
787
|
}
|
|
921
788
|
return {
|
|
922
789
|
...n,
|
|
923
790
|
cancel: n.cancel,
|
|
924
|
-
isDesktop:
|
|
925
|
-
listRestoreToken: o,
|
|
791
|
+
isDesktop: s,
|
|
926
792
|
loadNext: n.loadNext,
|
|
927
793
|
loadPrevious: n.loadPrevious,
|
|
928
|
-
openFullscreen:
|
|
929
|
-
returnToList:
|
|
794
|
+
openFullscreen: u,
|
|
795
|
+
returnToList: d,
|
|
930
796
|
retry: n.retry,
|
|
931
|
-
showBackToList:
|
|
932
|
-
status: w(
|
|
933
|
-
surfaceMode:
|
|
797
|
+
showBackToList: l,
|
|
798
|
+
status: w(o),
|
|
799
|
+
surfaceMode: c
|
|
934
800
|
};
|
|
935
801
|
}
|
|
936
802
|
//#endregion
|
|
937
803
|
//#region src/components/FullscreenMediaBar.vue?vue&type=script&setup=true&lang.ts
|
|
938
|
-
var
|
|
804
|
+
var He = {
|
|
939
805
|
"data-testid": "vibe-media-bar",
|
|
940
806
|
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]"
|
|
941
|
-
},
|
|
807
|
+
}, Ue = { class: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 border-t border-white/12 bg-black/70 px-4 py-3 backdrop-blur-[18px]" }, We = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Ge = { class: "relative h-4 w-full" }, Ke = [
|
|
942
808
|
"max",
|
|
943
809
|
"value",
|
|
944
810
|
"disabled"
|
|
945
|
-
],
|
|
811
|
+
], qe = { class: "text-[0.76rem] font-bold uppercase tracking-[0.18em] text-[#f7f1ea]/74" }, Je = /* @__PURE__ */ d({
|
|
946
812
|
__name: "FullscreenMediaBar",
|
|
947
813
|
props: {
|
|
948
814
|
currentTime: {},
|
|
@@ -954,9 +820,9 @@ var Ke = {
|
|
|
954
820
|
emits: ["seek-input"],
|
|
955
821
|
setup(e, { emit: t }) {
|
|
956
822
|
let n = e, r = t;
|
|
957
|
-
return (e, t) => (S(), s("div",
|
|
958
|
-
c("span",
|
|
959
|
-
c("div",
|
|
823
|
+
return (e, t) => (S(), s("div", He, [c("div", Ue, [
|
|
824
|
+
c("span", We, k(n.currentTimeLabel), 1),
|
|
825
|
+
c("div", Ge, [
|
|
960
826
|
t[1] ||= c("div", { class: "absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-white/12" }, null, -1),
|
|
961
827
|
c("div", {
|
|
962
828
|
class: "absolute left-0 top-1/2 h-px -translate-y-1/2 bg-[#f7f1ea]",
|
|
@@ -973,25 +839,25 @@ var Ke = {
|
|
|
973
839
|
disabled: n.duration <= 0,
|
|
974
840
|
class: "vibe-media-slider absolute inset-0 z-10 h-4 w-full cursor-pointer bg-transparent disabled:cursor-default disabled:opacity-50",
|
|
975
841
|
onInput: t[0] ||= (e) => r("seek-input", e)
|
|
976
|
-
}, null, 40,
|
|
842
|
+
}, null, 40, Ke)
|
|
977
843
|
]),
|
|
978
|
-
c("span",
|
|
844
|
+
c("span", qe, k(n.durationLabel), 1)
|
|
979
845
|
])]));
|
|
980
846
|
}
|
|
981
|
-
}),
|
|
847
|
+
}), Ye = { class: "pointer-events-none absolute inset-0 z-[3] flex flex-col justify-between p-[clamp(1.25rem,2.6vw,2.25rem)]" }, Xe = { class: "grid gap-4" }, Ze = { class: "flex min-h-11 items-center justify-between gap-4" }, Qe = { class: "min-w-0 flex flex-1 items-center gap-3" }, $e = {
|
|
982
848
|
key: 1,
|
|
983
849
|
"data-testid": "vibe-title",
|
|
984
850
|
class: "m-0 truncate text-left text-[0.82rem] leading-none tracking-[-0.04em] min-[721px]:text-[1.2rem]"
|
|
985
|
-
},
|
|
851
|
+
}, et = { class: "pointer-events-auto flex shrink-0 items-center gap-2" }, tt = {
|
|
986
852
|
"data-testid": "vibe-pagination",
|
|
987
853
|
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]"
|
|
988
|
-
},
|
|
854
|
+
}, nt = { class: "whitespace-nowrap" }, rt = {
|
|
989
855
|
key: 0,
|
|
990
856
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
991
|
-
},
|
|
857
|
+
}, it = {
|
|
992
858
|
key: 0,
|
|
993
859
|
class: "grid gap-2 max-[720px]:justify-items-start"
|
|
994
|
-
},
|
|
860
|
+
}, at = /* @__PURE__ */ d({
|
|
995
861
|
__name: "FullscreenHeader",
|
|
996
862
|
props: {
|
|
997
863
|
currentIndex: {},
|
|
@@ -1004,7 +870,7 @@ var Ke = {
|
|
|
1004
870
|
emits: ["back-to-list"],
|
|
1005
871
|
setup(e, { emit: t }) {
|
|
1006
872
|
let n = e, r = t;
|
|
1007
|
-
return (e, t) => (S(), s("div",
|
|
873
|
+
return (e, t) => (S(), s("div", Ye, [c("div", Xe, [c("div", Ze, [c("div", Qe, [n.showBackToList ? (S(), s("button", {
|
|
1008
874
|
key: 0,
|
|
1009
875
|
type: "button",
|
|
1010
876
|
"data-testid": "vibe-back-to-list",
|
|
@@ -1014,19 +880,45 @@ var Ke = {
|
|
|
1014
880
|
}, [u(j(q), {
|
|
1015
881
|
class: "h-4 w-4 stroke-[2.2]",
|
|
1016
882
|
"aria-hidden": "true"
|
|
1017
|
-
})])) : o("", !0), n.title ? (S(), s("h2",
|
|
883
|
+
})])) : o("", !0), n.title ? (S(), s("h2", $e, k(n.title), 1)) : o("", !0)]), c("div", et, [c("span", tt, [c("span", nt, k(n.currentIndex + 1) + " / " + k(n.total), 1), n.paginationDetail ? (S(), s("span", rt, k(n.paginationDetail), 1)) : o("", !0)]), D(e.$slots, "actions")])])]), n.showEndBadge ? (S(), s("div", it, [...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)]));
|
|
1018
884
|
}
|
|
1019
885
|
});
|
|
1020
886
|
//#endregion
|
|
1021
887
|
//#region src/components/viewer-core/format.ts
|
|
1022
|
-
function
|
|
888
|
+
function ot(e) {
|
|
1023
889
|
if (!Number.isFinite(e) || e <= 0) return "0:00";
|
|
1024
890
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60;
|
|
1025
891
|
return n > 0 ? `${n}:${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}` : `${r}:${String(i).padStart(2, "0")}`;
|
|
1026
892
|
}
|
|
1027
893
|
//#endregion
|
|
894
|
+
//#region src/components/viewer-core/surfaceStatus.ts
|
|
895
|
+
function st(e) {
|
|
896
|
+
return e.phase ? e.phase : e.loading ? e.itemCount > 0 ? "loading" : "initializing" : "idle";
|
|
897
|
+
}
|
|
898
|
+
function ct(e) {
|
|
899
|
+
return e.phase === "failed" ? {
|
|
900
|
+
kind: "failed",
|
|
901
|
+
message: e.errorMessage ?? (e.hasItems ? "The viewer could not load more items." : "The viewer could not load items.")
|
|
902
|
+
} : e.phase === "initializing" ? {
|
|
903
|
+
kind: "initializing",
|
|
904
|
+
message: "Loading the first page"
|
|
905
|
+
} : e.phase === "loading" ? {
|
|
906
|
+
kind: "loading-more",
|
|
907
|
+
message: e.hasItems ? "Loading more items" : "Loading the first page"
|
|
908
|
+
} : e.phase === "filling" ? {
|
|
909
|
+
kind: "filling",
|
|
910
|
+
message: "Filling the view"
|
|
911
|
+
} : e.phase === "refreshing" ? {
|
|
912
|
+
kind: "refreshing",
|
|
913
|
+
message: !e.hasNextPage && e.hasItems ? e.surface === "grid" ? "Refreshing the end of the list" : "Refreshing the end of the feed" : "Refreshing visible items"
|
|
914
|
+
} : !e.hasItems || e.hasNextPage ? null : {
|
|
915
|
+
kind: "end",
|
|
916
|
+
message: e.surface === "grid" ? "End of list" : "End of feed"
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
//#endregion
|
|
1028
920
|
//#region src/components/viewer-core/useActivation.ts
|
|
1029
|
-
function
|
|
921
|
+
function lt(e) {
|
|
1030
922
|
let t = !1;
|
|
1031
923
|
P(e.enabled, async (t) => {
|
|
1032
924
|
if (n(t), t) {
|
|
@@ -1049,42 +941,42 @@ function dt(e) {
|
|
|
1049
941
|
}
|
|
1050
942
|
//#endregion
|
|
1051
943
|
//#region src/components/viewer-core/assetState.ts
|
|
1052
|
-
var
|
|
944
|
+
var ut = {
|
|
1053
945
|
currentTime: 0,
|
|
1054
946
|
duration: 0,
|
|
1055
947
|
errorKind: null,
|
|
1056
948
|
paused: !0,
|
|
1057
949
|
ready: !1
|
|
1058
950
|
};
|
|
1059
|
-
function
|
|
1060
|
-
return { ...
|
|
951
|
+
function dt() {
|
|
952
|
+
return { ...ut };
|
|
1061
953
|
}
|
|
1062
|
-
function
|
|
954
|
+
function ft(e) {
|
|
1063
955
|
return e.complete && !!(e.currentSrc || e.getAttribute("src"));
|
|
1064
956
|
}
|
|
1065
|
-
function
|
|
1066
|
-
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 =
|
|
957
|
+
function pt(e, t, n) {
|
|
958
|
+
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 = mt(t, n);
|
|
1067
959
|
}
|
|
1068
|
-
function
|
|
960
|
+
function mt(e, t) {
|
|
1069
961
|
return t === "error" || t === "loadstart" || t === "waiting" || t === "stalled" ? !1 : t === "canplay" || t === "canplaythrough" || t === "playing" ? !0 : e.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA;
|
|
1070
962
|
}
|
|
1071
963
|
//#endregion
|
|
1072
964
|
//#region src/components/viewer-core/loadError.ts
|
|
1073
|
-
var
|
|
1074
|
-
function
|
|
965
|
+
var ht = /* @__PURE__ */ new Map();
|
|
966
|
+
function gt(e) {
|
|
1075
967
|
return e === "not-found" ? "404" : "Load error";
|
|
1076
968
|
}
|
|
1077
|
-
function
|
|
969
|
+
function _t(e) {
|
|
1078
970
|
return e === "generic";
|
|
1079
971
|
}
|
|
1080
|
-
function
|
|
1081
|
-
let t =
|
|
972
|
+
function vt(e) {
|
|
973
|
+
let t = ht.get(e);
|
|
1082
974
|
if (t) return t;
|
|
1083
|
-
let n =
|
|
1084
|
-
return
|
|
975
|
+
let n = yt(e);
|
|
976
|
+
return ht.set(e, n), n;
|
|
1085
977
|
}
|
|
1086
|
-
async function
|
|
1087
|
-
if (!
|
|
978
|
+
async function yt(e) {
|
|
979
|
+
if (!bt(e)) return "generic";
|
|
1088
980
|
try {
|
|
1089
981
|
let t = await fetch(e, { method: "HEAD" });
|
|
1090
982
|
if (!t.ok && t.status === 404) return "not-found";
|
|
@@ -1093,12 +985,12 @@ async function xt(e) {
|
|
|
1093
985
|
}
|
|
1094
986
|
return "generic";
|
|
1095
987
|
}
|
|
1096
|
-
function
|
|
988
|
+
function bt(e) {
|
|
1097
989
|
return /^(https?:\/\/|\/)/i.test(e);
|
|
1098
990
|
}
|
|
1099
991
|
//#endregion
|
|
1100
992
|
//#region src/components/viewer-core/mediaPlayback.ts
|
|
1101
|
-
function
|
|
993
|
+
function xt(e) {
|
|
1102
994
|
try {
|
|
1103
995
|
let t = e.play();
|
|
1104
996
|
t && typeof t.catch == "function" && t.catch(() => {});
|
|
@@ -1106,12 +998,12 @@ function Ct(e) {
|
|
|
1106
998
|
}
|
|
1107
999
|
//#endregion
|
|
1108
1000
|
//#region src/components/viewer-core/useMedia.ts
|
|
1109
|
-
function
|
|
1001
|
+
function St(e) {
|
|
1110
1002
|
let t = T({}), n = T({}), r = T({}), a = T({}), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), l = i(() => e.activeItem.value ? $(e.activeItem.value) : null), u = i(() => e.activeMediaItem.value ? $(e.activeMediaItem.value) : null), d = i(() => {
|
|
1111
1003
|
let t = /* @__PURE__ */ new Map();
|
|
1112
1004
|
for (let n of e.items.value) t.set($(n), n);
|
|
1113
1005
|
return t;
|
|
1114
|
-
}), f = i(() => u.value ? r.value[u.value] ??
|
|
1006
|
+
}), f = i(() => u.value ? r.value[u.value] ?? ut : ut), p = i(() => u.value ? f.value.duration : 0), m = i(() => p.value <= 0 ? 0 : Ct(f.value.currentTime / p.value * 100, 0, 100)), h = i(() => l.value ? N(l.value) : null);
|
|
1115
1007
|
P(() => l.value, async () => {
|
|
1116
1008
|
await x();
|
|
1117
1009
|
}), P(() => e.itemCount.value, async () => {
|
|
@@ -1132,7 +1024,7 @@ function wt(e) {
|
|
|
1132
1024
|
s.delete(e);
|
|
1133
1025
|
}
|
|
1134
1026
|
function y(e, r) {
|
|
1135
|
-
r instanceof HTMLImageElement &&
|
|
1027
|
+
r instanceof HTMLImageElement && ft(r) && (t.value[e] = !0, n.value[e] = null, K(e, r.currentSrc || r.src || J(e)));
|
|
1136
1028
|
}
|
|
1137
1029
|
function b() {
|
|
1138
1030
|
z(), a.value = {}, n.value = {}, t.value = {}, r.value = {}, c.clear();
|
|
@@ -1149,14 +1041,14 @@ function wt(e) {
|
|
|
1149
1041
|
R(n, e);
|
|
1150
1042
|
continue;
|
|
1151
1043
|
}
|
|
1152
|
-
n.muted = !0, n.loop = !1, n.playsInline = !0,
|
|
1044
|
+
n.muted = !0, n.loop = !1, n.playsInline = !0, xt(n), V(e, n);
|
|
1153
1045
|
}
|
|
1154
1046
|
for (let [e, n] of s.entries()) {
|
|
1155
1047
|
if (e !== t || r.value[e]?.errorKind) {
|
|
1156
1048
|
R(n, e);
|
|
1157
1049
|
continue;
|
|
1158
1050
|
}
|
|
1159
|
-
|
|
1051
|
+
xt(n), V(e, n);
|
|
1160
1052
|
}
|
|
1161
1053
|
}
|
|
1162
1054
|
function S(e, t) {
|
|
@@ -1174,7 +1066,7 @@ function wt(e) {
|
|
|
1174
1066
|
async function w(r, i) {
|
|
1175
1067
|
let a = q(r) ?? e.activeItem.value;
|
|
1176
1068
|
t.value[r] = !1, n.value[r] = "generic";
|
|
1177
|
-
let o = await
|
|
1069
|
+
let o = await vt(i);
|
|
1178
1070
|
n.value[r] = o, a && e.onAssetError?.({
|
|
1179
1071
|
item: a,
|
|
1180
1072
|
occurrenceKey: r,
|
|
@@ -1192,7 +1084,7 @@ function wt(e) {
|
|
|
1192
1084
|
} catch {}
|
|
1193
1085
|
}
|
|
1194
1086
|
i.currentTime = 0, i.duration = 0, i.paused = !0, i.ready = !1, i.errorKind = "generic";
|
|
1195
|
-
let o = await
|
|
1087
|
+
let o = await vt(n);
|
|
1196
1088
|
i.errorKind = o, a && e.onAssetError?.({
|
|
1197
1089
|
item: a,
|
|
1198
1090
|
occurrenceKey: t,
|
|
@@ -1212,7 +1104,7 @@ function wt(e) {
|
|
|
1212
1104
|
if (!t || !n || !(e.target instanceof HTMLInputElement)) return;
|
|
1213
1105
|
let r = Number.parseFloat(e.target.value);
|
|
1214
1106
|
if (!Number.isFinite(r)) return;
|
|
1215
|
-
let i =
|
|
1107
|
+
let i = Ct(r, 0, p.value || 0);
|
|
1216
1108
|
H(n, i, t), t.currentTime = i;
|
|
1217
1109
|
}
|
|
1218
1110
|
function A(e) {
|
|
@@ -1229,10 +1121,10 @@ function wt(e) {
|
|
|
1229
1121
|
}
|
|
1230
1122
|
function F(e) {
|
|
1231
1123
|
let t = N(e);
|
|
1232
|
-
return t ?
|
|
1124
|
+
return t ? gt(t) : null;
|
|
1233
1125
|
}
|
|
1234
1126
|
function I(e) {
|
|
1235
|
-
return
|
|
1127
|
+
return _t(N(e));
|
|
1236
1128
|
}
|
|
1237
1129
|
function L(e) {
|
|
1238
1130
|
return `${e}:${a.value[e] ?? 0}`;
|
|
@@ -1259,10 +1151,10 @@ function wt(e) {
|
|
|
1259
1151
|
for (let [e, t] of s.entries()) R(t, e);
|
|
1260
1152
|
}
|
|
1261
1153
|
function B(e) {
|
|
1262
|
-
return r.value[e] || (r.value[e] =
|
|
1154
|
+
return r.value[e] || (r.value[e] = dt()), r.value[e];
|
|
1263
1155
|
}
|
|
1264
1156
|
function V(e, t, n) {
|
|
1265
|
-
|
|
1157
|
+
pt(B(e), t, n);
|
|
1266
1158
|
}
|
|
1267
1159
|
function H(e, t, n) {
|
|
1268
1160
|
let r = B(e);
|
|
@@ -1277,7 +1169,7 @@ function wt(e) {
|
|
|
1277
1169
|
function G(e) {
|
|
1278
1170
|
if (e) {
|
|
1279
1171
|
if (e.paused) {
|
|
1280
|
-
|
|
1172
|
+
xt(e);
|
|
1281
1173
|
return;
|
|
1282
1174
|
}
|
|
1283
1175
|
e.pause();
|
|
@@ -1328,10 +1220,10 @@ function wt(e) {
|
|
|
1328
1220
|
syncMediaPlayback: x
|
|
1329
1221
|
};
|
|
1330
1222
|
}
|
|
1331
|
-
function
|
|
1223
|
+
function Ct(e, t, n) {
|
|
1332
1224
|
return Math.min(Math.max(e, t), n);
|
|
1333
1225
|
}
|
|
1334
|
-
function
|
|
1226
|
+
function wt(e, t, n = 2) {
|
|
1335
1227
|
return t <= 0 ? {
|
|
1336
1228
|
start: 0,
|
|
1337
1229
|
end: -1
|
|
@@ -1340,14 +1232,14 @@ function Et(e, t, n = 2) {
|
|
|
1340
1232
|
end: Math.min(t - 1, e + n)
|
|
1341
1233
|
};
|
|
1342
1234
|
}
|
|
1343
|
-
function
|
|
1344
|
-
let r =
|
|
1235
|
+
function Tt(e, t, n = 2) {
|
|
1236
|
+
let r = wt(t, e.length, n);
|
|
1345
1237
|
return r.end < r.start ? [] : e.slice(r.start, r.end + 1).map((e, t) => ({
|
|
1346
1238
|
item: e,
|
|
1347
1239
|
index: r.start + t
|
|
1348
1240
|
}));
|
|
1349
1241
|
}
|
|
1350
|
-
function
|
|
1242
|
+
function Et(e, t, n, r, i) {
|
|
1351
1243
|
return {
|
|
1352
1244
|
transform: `translate3d(0, ${(e - t) * n + r}px, 0)`,
|
|
1353
1245
|
transition: i ? "none" : "transform 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
@@ -1355,166 +1247,178 @@ function Ot(e, t, n, r, i) {
|
|
|
1355
1247
|
}
|
|
1356
1248
|
//#endregion
|
|
1357
1249
|
//#region src/components/viewer-core/useViewer.ts
|
|
1358
|
-
function
|
|
1359
|
-
let
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1250
|
+
function Dt(e, t, n = {}) {
|
|
1251
|
+
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), u = i(() => st({
|
|
1252
|
+
itemCount: r.value.length,
|
|
1253
|
+
loading: s.value,
|
|
1254
|
+
phase: e.phase
|
|
1255
|
+
})), d = i(() => !1), f = T(null), p = T(0), m = T(!1), h = T(1), g = n.enabled ?? i(() => !0), _ = null, v = 0, y = 0, b = 0, x = i(() => r.value.length === 0 ? 0 : N(a.value, 0, r.value.length - 1)), S = i(() => r.value[x.value] ?? null), C = i(() => S.value?.type === "audio" || S.value?.type === "video" ? S.value : null), w = St({
|
|
1256
|
+
items: r,
|
|
1257
|
+
activeItem: S,
|
|
1258
|
+
activeMediaItem: C,
|
|
1259
|
+
isEnabled: g,
|
|
1260
|
+
itemCount: i(() => r.value.length),
|
|
1365
1261
|
onAssetError: n.onAssetError,
|
|
1366
1262
|
onAssetLoad: n.onAssetLoad
|
|
1367
|
-
}),
|
|
1368
|
-
|
|
1369
|
-
|
|
1263
|
+
}), E = i(() => r.value.length > 0 && x.value === r.value.length - 1), D = i(() => ct({
|
|
1264
|
+
errorMessage: o.value,
|
|
1265
|
+
hasItems: r.value.length > 0,
|
|
1266
|
+
hasNextPage: c.value,
|
|
1267
|
+
phase: u.value,
|
|
1268
|
+
surface: "fullscreen"
|
|
1269
|
+
})), O = i(() => D.value?.kind ?? null), k = i(() => D.value?.message ?? null), A = i(() => Math.min(96, h.value * .15 || 96)), j = i(() => wt(x.value, r.value.length)), M = i(() => Tt(r.value, x.value));
|
|
1270
|
+
lt({
|
|
1271
|
+
enabled: g,
|
|
1370
1272
|
onDisable() {
|
|
1371
|
-
|
|
1273
|
+
H(), w.resetMediaState();
|
|
1372
1274
|
},
|
|
1373
1275
|
onEnable() {
|
|
1374
|
-
return
|
|
1276
|
+
return w.syncMediaPlayback();
|
|
1375
1277
|
},
|
|
1376
|
-
onKeydown:
|
|
1377
|
-
onResize:
|
|
1278
|
+
onKeydown: W,
|
|
1279
|
+
onResize: P
|
|
1378
1280
|
});
|
|
1379
|
-
function
|
|
1281
|
+
function N(e, t, n) {
|
|
1380
1282
|
return Math.min(Math.max(e, t), n);
|
|
1381
1283
|
}
|
|
1382
|
-
function
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
function P(e) {
|
|
1386
|
-
return c.value.length === 0 ? !1 : M(S.value + e, 0, c.value.length - 1) !== S.value;
|
|
1284
|
+
function P() {
|
|
1285
|
+
h.value = f.value?.clientHeight || window.innerHeight || 1;
|
|
1387
1286
|
}
|
|
1388
1287
|
function F(e) {
|
|
1389
|
-
|
|
1390
|
-
let t = M(S.value + e, 0, c.value.length - 1);
|
|
1391
|
-
t !== S.value && f(t);
|
|
1288
|
+
return r.value.length === 0 ? !1 : N(x.value + e, 0, r.value.length - 1) !== x.value;
|
|
1392
1289
|
}
|
|
1393
1290
|
function I(e) {
|
|
1394
|
-
|
|
1395
|
-
|
|
1291
|
+
if (r.value.length === 0) return;
|
|
1292
|
+
let n = N(x.value + e, 0, r.value.length - 1);
|
|
1293
|
+
n !== x.value && t("update:activeIndex", n);
|
|
1396
1294
|
}
|
|
1397
1295
|
function L(e) {
|
|
1398
|
-
|
|
1296
|
+
let t = e > 0, n = e < 0;
|
|
1297
|
+
return t && !F(-1) || n && !F(1) ? e * .24 : e;
|
|
1399
1298
|
}
|
|
1400
1299
|
function ee(e) {
|
|
1401
|
-
!
|
|
1300
|
+
!g.value || r.value.length === 0 || e.pointerType === "mouse" || Q(e.target) || (_ = e.pointerId, v = e.clientY, p.value = 0, m.value = !0, f.value?.setPointerCapture?.(e.pointerId));
|
|
1402
1301
|
}
|
|
1403
1302
|
function R(e) {
|
|
1404
|
-
!
|
|
1303
|
+
!g.value || !m.value || _ !== e.pointerId || (p.value = L(e.clientY - v));
|
|
1405
1304
|
}
|
|
1406
1305
|
function z(e) {
|
|
1407
|
-
!
|
|
1306
|
+
!g.value || _ !== e.pointerId || (f.value?.releasePointerCapture?.(e.pointerId), V());
|
|
1408
1307
|
}
|
|
1409
|
-
function B() {
|
|
1410
|
-
|
|
1308
|
+
function B(e) {
|
|
1309
|
+
!g.value || _ !== e.pointerId || (f.value?.releasePointerCapture?.(e.pointerId), H());
|
|
1411
1310
|
}
|
|
1412
1311
|
function V() {
|
|
1413
|
-
|
|
1312
|
+
Math.abs(p.value) >= A.value && (b = Date.now() + 250, I(p.value < 0 ? 1 : -1)), H();
|
|
1414
1313
|
}
|
|
1415
|
-
function H(
|
|
1416
|
-
|
|
1417
|
-
e.preventDefault();
|
|
1418
|
-
let t = Date.now();
|
|
1419
|
-
t < b || (b = t + 400, F(e.deltaY > 0 ? 1 : -1));
|
|
1314
|
+
function H() {
|
|
1315
|
+
p.value = 0, m.value = !1, _ = null;
|
|
1420
1316
|
}
|
|
1421
1317
|
function U(e) {
|
|
1422
|
-
!
|
|
1318
|
+
if (!g.value || r.value.length === 0 || m.value || Q(e.target) || Math.abs(e.deltaY) < Math.max(Math.abs(e.deltaX), 24)) return;
|
|
1319
|
+
e.preventDefault();
|
|
1320
|
+
let t = Date.now();
|
|
1321
|
+
t < y || (y = t + 400, I(e.deltaY > 0 ? 1 : -1));
|
|
1423
1322
|
}
|
|
1424
|
-
function W(e
|
|
1425
|
-
|
|
1323
|
+
function W(e) {
|
|
1324
|
+
!g.value || r.value.length === 0 || Z(e.target) || ((e.key === "ArrowDown" || e.key === "PageDown") && (e.preventDefault(), I(1)), (e.key === "ArrowUp" || e.key === "PageUp") && (e.preventDefault(), I(-1)));
|
|
1426
1325
|
}
|
|
1427
1326
|
function G(e, t) {
|
|
1428
|
-
|
|
1327
|
+
w.onVideoClick(e, t, b);
|
|
1429
1328
|
}
|
|
1430
|
-
function K(e) {
|
|
1431
|
-
|
|
1329
|
+
function K(e, t) {
|
|
1330
|
+
w.onAudioCoverClick(e, t, b);
|
|
1432
1331
|
}
|
|
1433
1332
|
function q(e) {
|
|
1434
|
-
|
|
1333
|
+
w.onMediaSeekInput(e);
|
|
1435
1334
|
}
|
|
1436
1335
|
function J(e) {
|
|
1437
|
-
return e.type === "
|
|
1336
|
+
return e.type === "image" || e.type === "video";
|
|
1438
1337
|
}
|
|
1439
1338
|
function te(e) {
|
|
1440
|
-
return
|
|
1339
|
+
return e.type === "audio";
|
|
1340
|
+
}
|
|
1341
|
+
function Y(e) {
|
|
1342
|
+
return Et(e, x.value, h.value, p.value, m.value);
|
|
1441
1343
|
}
|
|
1442
1344
|
return {
|
|
1443
|
-
activeItem:
|
|
1444
|
-
activeAssetErrorKind:
|
|
1445
|
-
activeMediaDuration:
|
|
1446
|
-
activeMediaItem:
|
|
1447
|
-
activeMediaProgress:
|
|
1448
|
-
activeMediaState:
|
|
1449
|
-
canRetryAsset:
|
|
1450
|
-
canRetryInitialLoad:
|
|
1345
|
+
activeItem: S,
|
|
1346
|
+
activeAssetErrorKind: w.activeAssetErrorKind,
|
|
1347
|
+
activeMediaDuration: w.activeMediaDuration,
|
|
1348
|
+
activeMediaItem: C,
|
|
1349
|
+
activeMediaProgress: w.activeMediaProgress,
|
|
1350
|
+
activeMediaState: w.activeMediaState,
|
|
1351
|
+
canRetryAsset: w.canRetryAsset,
|
|
1352
|
+
canRetryInitialLoad: d,
|
|
1451
1353
|
errorMessage: o,
|
|
1452
|
-
getAssetErrorKind:
|
|
1453
|
-
getAssetErrorLabel:
|
|
1454
|
-
getAssetRenderKey:
|
|
1455
|
-
formatPlaybackTime:
|
|
1456
|
-
getImageSource:
|
|
1457
|
-
getSlideStyle:
|
|
1458
|
-
hasNextPage:
|
|
1459
|
-
isAtEnd:
|
|
1460
|
-
isAudio:
|
|
1461
|
-
isVisual:
|
|
1462
|
-
items:
|
|
1463
|
-
loading:
|
|
1464
|
-
mediaStates:
|
|
1465
|
-
isImageReady:
|
|
1466
|
-
isMediaReady:
|
|
1467
|
-
onAudioCoverClick:
|
|
1468
|
-
onImageError:
|
|
1469
|
-
onImageLoad:
|
|
1470
|
-
onMediaEvent:
|
|
1471
|
-
onMediaError:
|
|
1472
|
-
onMediaSeekInput:
|
|
1473
|
-
onPointerCancel:
|
|
1474
|
-
onPointerDown:
|
|
1475
|
-
onPointerMove:
|
|
1476
|
-
onPointerUp:
|
|
1477
|
-
onVideoClick:
|
|
1478
|
-
onWheel:
|
|
1479
|
-
registerAudioElement:
|
|
1480
|
-
registerImageElement:
|
|
1481
|
-
registerVideoElement:
|
|
1482
|
-
renderedItems:
|
|
1483
|
-
renderedRange:
|
|
1484
|
-
resolvedActiveIndex:
|
|
1485
|
-
retryInitialLoad:
|
|
1486
|
-
retryAsset:
|
|
1487
|
-
stageRef:
|
|
1488
|
-
|
|
1489
|
-
|
|
1354
|
+
getAssetErrorKind: w.getAssetErrorKind,
|
|
1355
|
+
getAssetErrorLabel: w.getAssetErrorLabel,
|
|
1356
|
+
getAssetRenderKey: w.getAssetRenderKey,
|
|
1357
|
+
formatPlaybackTime: ot,
|
|
1358
|
+
getImageSource: w.getImageSource,
|
|
1359
|
+
getSlideStyle: Y,
|
|
1360
|
+
hasNextPage: c,
|
|
1361
|
+
isAtEnd: E,
|
|
1362
|
+
isAudio: te,
|
|
1363
|
+
isVisual: J,
|
|
1364
|
+
items: r,
|
|
1365
|
+
loading: s,
|
|
1366
|
+
mediaStates: w.mediaStates,
|
|
1367
|
+
isImageReady: w.isImageReady,
|
|
1368
|
+
isMediaReady: w.isMediaReady,
|
|
1369
|
+
onAudioCoverClick: K,
|
|
1370
|
+
onImageError: w.onImageError,
|
|
1371
|
+
onImageLoad: w.onImageLoad,
|
|
1372
|
+
onMediaEvent: w.onMediaEvent,
|
|
1373
|
+
onMediaError: w.onMediaError,
|
|
1374
|
+
onMediaSeekInput: q,
|
|
1375
|
+
onPointerCancel: B,
|
|
1376
|
+
onPointerDown: ee,
|
|
1377
|
+
onPointerMove: R,
|
|
1378
|
+
onPointerUp: z,
|
|
1379
|
+
onVideoClick: G,
|
|
1380
|
+
onWheel: U,
|
|
1381
|
+
registerAudioElement: w.registerAudioElement,
|
|
1382
|
+
registerImageElement: w.registerImageElement,
|
|
1383
|
+
registerVideoElement: w.registerVideoElement,
|
|
1384
|
+
renderedItems: M,
|
|
1385
|
+
renderedRange: j,
|
|
1386
|
+
resolvedActiveIndex: x,
|
|
1387
|
+
retryInitialLoad: async () => {},
|
|
1388
|
+
retryAsset: w.retryAsset,
|
|
1389
|
+
stageRef: f,
|
|
1390
|
+
statusKind: O,
|
|
1391
|
+
statusMessage: k,
|
|
1392
|
+
paginationDetail: l,
|
|
1393
|
+
phase: u
|
|
1490
1394
|
};
|
|
1491
1395
|
}
|
|
1492
1396
|
//#endregion
|
|
1493
1397
|
//#region src/components/viewer-core/media.ts
|
|
1494
|
-
var
|
|
1495
|
-
image:
|
|
1398
|
+
var Ot = {
|
|
1399
|
+
image: ne,
|
|
1496
1400
|
video: te,
|
|
1497
1401
|
audio: J,
|
|
1498
1402
|
other: Y
|
|
1499
|
-
},
|
|
1403
|
+
}, kt = {
|
|
1500
1404
|
image: "Image",
|
|
1501
1405
|
video: "Video",
|
|
1502
1406
|
audio: "Audio",
|
|
1503
1407
|
other: "File"
|
|
1504
1408
|
};
|
|
1505
|
-
function
|
|
1506
|
-
return
|
|
1409
|
+
function At(e) {
|
|
1410
|
+
return Ot[e];
|
|
1507
1411
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return
|
|
1412
|
+
function jt(e) {
|
|
1413
|
+
return kt[e];
|
|
1510
1414
|
}
|
|
1511
1415
|
//#endregion
|
|
1512
1416
|
//#region src/components/viewer-core/slotContent.ts
|
|
1513
|
-
function
|
|
1417
|
+
function Mt(e) {
|
|
1514
1418
|
if (!Array.isArray(e)) return !1;
|
|
1515
1419
|
for (let t of e) {
|
|
1516
1420
|
if (Array.isArray(t)) {
|
|
1517
|
-
if (
|
|
1421
|
+
if (Mt(t)) return !0;
|
|
1518
1422
|
continue;
|
|
1519
1423
|
}
|
|
1520
1424
|
if (!m(t)) {
|
|
@@ -1525,53 +1429,53 @@ function Pt(e) {
|
|
|
1525
1429
|
if (t != null && t !== !1) return !0;
|
|
1526
1430
|
continue;
|
|
1527
1431
|
}
|
|
1528
|
-
if (!
|
|
1432
|
+
if (!Nt(t)) return !0;
|
|
1529
1433
|
}
|
|
1530
1434
|
return !1;
|
|
1531
1435
|
}
|
|
1532
|
-
function
|
|
1533
|
-
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !
|
|
1436
|
+
function Nt(r) {
|
|
1437
|
+
return r.type === e ? !0 : r.type === n ? typeof r.children == "string" ? r.children.trim().length === 0 : !0 : r.type === t ? !Mt(r.children) : !1;
|
|
1534
1438
|
}
|
|
1535
1439
|
//#endregion
|
|
1536
1440
|
//#region src/components/viewer-core/theme.ts
|
|
1537
|
-
var
|
|
1441
|
+
var Pt = {
|
|
1538
1442
|
image: "bg-[radial-gradient(circle_at_top_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
|
|
1539
1443
|
video: "bg-[radial-gradient(circle_at_top_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
|
|
1540
1444
|
audio: "bg-[radial-gradient(circle_at_top_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
|
|
1541
1445
|
other: "bg-[radial-gradient(circle_at_top_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
|
|
1542
|
-
},
|
|
1446
|
+
}, Ft = {
|
|
1543
1447
|
image: "bg-[radial-gradient(circle_at_center,rgba(251,191,36,0.4)_0,transparent_42%),linear-gradient(180deg,#120d08,#050507)]",
|
|
1544
1448
|
video: "bg-[radial-gradient(circle_at_center,rgba(56,189,248,0.38)_0,transparent_42%),linear-gradient(180deg,#07111c,#050608)]",
|
|
1545
1449
|
audio: "bg-[radial-gradient(circle_at_center,rgba(16,185,129,0.32)_0,transparent_42%),linear-gradient(180deg,#06120f,#040506)]",
|
|
1546
1450
|
other: "bg-[radial-gradient(circle_at_center,rgba(148,163,184,0.28)_0,transparent_42%),linear-gradient(180deg,#0d0c10,#040506)]"
|
|
1547
1451
|
};
|
|
1548
|
-
function
|
|
1549
|
-
return
|
|
1452
|
+
function It(e) {
|
|
1453
|
+
return Pt[e];
|
|
1550
1454
|
}
|
|
1551
|
-
function
|
|
1552
|
-
return
|
|
1455
|
+
function Lt(e) {
|
|
1456
|
+
return Ft[e];
|
|
1553
1457
|
}
|
|
1554
1458
|
//#endregion
|
|
1555
1459
|
//#region src/components/FullscreenSurface.vue?vue&type=script&setup=true&lang.ts
|
|
1556
|
-
var
|
|
1460
|
+
var Rt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]" }, zt = {
|
|
1557
1461
|
key: 0,
|
|
1558
1462
|
class: "relative h-full min-h-0"
|
|
1559
|
-
},
|
|
1463
|
+
}, Bt = [
|
|
1560
1464
|
"data-item-id",
|
|
1561
1465
|
"data-occurrence-key",
|
|
1562
1466
|
"data-index",
|
|
1563
1467
|
"data-active",
|
|
1564
1468
|
"aria-hidden"
|
|
1565
|
-
],
|
|
1469
|
+
], Vt = {
|
|
1566
1470
|
key: 0,
|
|
1567
1471
|
"data-testid": "vibe-asset-spinner",
|
|
1568
1472
|
class: "pointer-events-none absolute inset-0 z-[2] grid place-items-center"
|
|
1569
|
-
},
|
|
1473
|
+
}, Ht = { 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]" }, Ut = ["data-kind"], Wt = { class: "grid justify-items-center gap-4 border border-white/14 bg-black/45 px-8 py-7 text-center backdrop-blur-[18px]" }, Gt = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, Kt = ["onClick"], qt = [
|
|
1570
1474
|
"src",
|
|
1571
1475
|
"alt",
|
|
1572
1476
|
"onLoad",
|
|
1573
1477
|
"onError"
|
|
1574
|
-
],
|
|
1478
|
+
], Jt = [
|
|
1575
1479
|
"src",
|
|
1576
1480
|
"preload",
|
|
1577
1481
|
"onClick",
|
|
@@ -1588,15 +1492,15 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1588
1492
|
"onStalled",
|
|
1589
1493
|
"onTimeupdate",
|
|
1590
1494
|
"onWaiting"
|
|
1591
|
-
],
|
|
1495
|
+
], Yt = { class: "relative grid aspect-square w-[clamp(320px,46vw,560px)] max-w-[calc(100vw-2.5rem)] place-items-center" }, Xt = [
|
|
1592
1496
|
"aria-label",
|
|
1593
1497
|
"disabled",
|
|
1594
1498
|
"onClick"
|
|
1595
|
-
],
|
|
1499
|
+
], Zt = { 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]" }, Qt = { 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]" }, $t = {
|
|
1596
1500
|
key: 0,
|
|
1597
1501
|
"data-testid": "vibe-asset-spinner",
|
|
1598
1502
|
class: "pointer-events-none absolute inset-0 z-[3] grid place-items-center"
|
|
1599
|
-
},
|
|
1503
|
+
}, 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]" }, tn = ["data-kind"], nn = { class: "m-0 text-[0.82rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/70" }, rn = ["onClick"], an = [
|
|
1600
1504
|
"src",
|
|
1601
1505
|
"preload",
|
|
1602
1506
|
"onCanplay",
|
|
@@ -1612,54 +1516,40 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1612
1516
|
"onStalled",
|
|
1613
1517
|
"onTimeupdate",
|
|
1614
1518
|
"onWaiting"
|
|
1615
|
-
],
|
|
1519
|
+
], on = {
|
|
1616
1520
|
key: 2,
|
|
1617
1521
|
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"
|
|
1618
|
-
},
|
|
1522
|
+
}, sn = { 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]" }, cn = {
|
|
1619
1523
|
key: 0,
|
|
1620
1524
|
class: "pointer-events-none absolute inset-0 z-[4]"
|
|
1621
|
-
},
|
|
1525
|
+
}, ln = { class: "h-full w-full" }, un = {
|
|
1622
1526
|
key: 0,
|
|
1623
1527
|
"data-testid": "vibe-fullscreen-aside",
|
|
1624
1528
|
class: "h-full min-h-0 overflow-hidden border-l border-white/10 bg-black/45 backdrop-blur-[18px]"
|
|
1625
|
-
},
|
|
1529
|
+
}, dn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, fn = {
|
|
1626
1530
|
key: 0,
|
|
1627
1531
|
"data-testid": "vibe-fullscreen-aside",
|
|
1628
1532
|
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]"
|
|
1629
|
-
},
|
|
1533
|
+
}, pn = { class: "h-full min-h-0 overflow-y-auto overscroll-y-contain" }, mn = 1280, hn = 2, gn = /* @__PURE__ */ d({
|
|
1630
1534
|
__name: "FullscreenSurface",
|
|
1631
1535
|
props: {
|
|
1632
|
-
|
|
1633
|
-
activeIndex: { default: 0 },
|
|
1634
|
-
fillDelayMs: {},
|
|
1635
|
-
fillDelayStepMs: {},
|
|
1636
|
-
initialState: {},
|
|
1637
|
-
loading: {
|
|
1536
|
+
active: {
|
|
1638
1537
|
type: Boolean,
|
|
1639
|
-
default: !
|
|
1538
|
+
default: !0
|
|
1640
1539
|
},
|
|
1540
|
+
activeIndex: { default: 0 },
|
|
1541
|
+
errorMessage: { default: null },
|
|
1641
1542
|
hasNextPage: {
|
|
1642
1543
|
type: Boolean,
|
|
1643
1544
|
default: !1
|
|
1644
1545
|
},
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
initialCursor: {},
|
|
1648
|
-
pageSize: {},
|
|
1649
|
-
assetLoadLimits: {},
|
|
1650
|
-
hasPreviousPage: { type: Boolean },
|
|
1651
|
-
paginationDetail: { default: null },
|
|
1652
|
-
requestNextPage: {},
|
|
1653
|
-
requestPreviousPage: {},
|
|
1654
|
-
showStatusBadges: {
|
|
1655
|
-
type: Boolean,
|
|
1656
|
-
default: !0
|
|
1657
|
-
},
|
|
1658
|
-
surfaceMode: {},
|
|
1659
|
-
active: {
|
|
1546
|
+
items: {},
|
|
1547
|
+
loading: {
|
|
1660
1548
|
type: Boolean,
|
|
1661
|
-
default: !
|
|
1549
|
+
default: !1
|
|
1662
1550
|
},
|
|
1551
|
+
paginationDetail: { default: null },
|
|
1552
|
+
phase: { default: null },
|
|
1663
1553
|
reportAssetError: {
|
|
1664
1554
|
type: [Function, null],
|
|
1665
1555
|
default: null
|
|
@@ -1671,17 +1561,25 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1671
1561
|
showBackToList: {
|
|
1672
1562
|
type: Boolean,
|
|
1673
1563
|
default: !1
|
|
1564
|
+
},
|
|
1565
|
+
showEndBadge: {
|
|
1566
|
+
type: Boolean,
|
|
1567
|
+
default: !0
|
|
1568
|
+
},
|
|
1569
|
+
showStatusBadges: {
|
|
1570
|
+
type: Boolean,
|
|
1571
|
+
default: !0
|
|
1674
1572
|
}
|
|
1675
1573
|
},
|
|
1676
1574
|
emits: ["back-to-list", "update:activeIndex"],
|
|
1677
1575
|
setup(e, { emit: n }) {
|
|
1678
|
-
let d = e, p = M(), m = n, g =
|
|
1576
|
+
let d = e, p = M(), m = n, g = Dt(d, (e, t) => {
|
|
1679
1577
|
m("update:activeIndex", t);
|
|
1680
1578
|
}, {
|
|
1681
1579
|
enabled: A(d, "active"),
|
|
1682
1580
|
onAssetError: d.reportAssetError ?? void 0,
|
|
1683
1581
|
onAssetLoad: d.reportAssetLoad ?? void 0
|
|
1684
|
-
}), C = T(typeof window > "u" ?
|
|
1582
|
+
}), C = T(typeof window > "u" ? mn : window.innerWidth || mn), w = i(() => It(g.activeItem.value?.type ?? "image")), N = i(() => g.activeMediaItem.value && !g.activeAssetErrorKind.value ? "bottom-[5.8rem] max-[720px]:bottom-[7.4rem]" : "bottom-[1.8rem] max-[720px]:bottom-[1.3rem]"), P = i(() => !!g.activeMediaItem.value && !g.activeAssetErrorKind.value), F = i(() => P.value ? "pb-[5.75rem] max-[720px]:pb-[7rem]" : ""), L = i(() => {
|
|
1685
1583
|
let e = g.activeItem.value;
|
|
1686
1584
|
return e ? {
|
|
1687
1585
|
hasNextPage: d.hasNextPage,
|
|
@@ -1691,57 +1589,57 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1691
1589
|
paginationDetail: d.paginationDetail,
|
|
1692
1590
|
total: d.items.length
|
|
1693
1591
|
} : null;
|
|
1694
|
-
}), R = i(() => !L.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](L.value)), z = i(() => !L.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](L.value)), B = i(() =>
|
|
1592
|
+
}), R = i(() => !L.value || !p["fullscreen-header-actions"] ? [] : p["fullscreen-header-actions"](L.value)), z = i(() => !L.value || !p["fullscreen-aside"] ? [] : p["fullscreen-aside"](L.value)), B = i(() => !d.showStatusBadges || !L.value || !g.statusKind.value || !g.statusMessage.value ? null : {
|
|
1695
1593
|
...L.value,
|
|
1696
|
-
kind: g.
|
|
1697
|
-
message:
|
|
1698
|
-
}),
|
|
1699
|
-
gridTemplateColumns:
|
|
1594
|
+
kind: g.statusKind.value,
|
|
1595
|
+
message: g.statusMessage.value
|
|
1596
|
+
}), V = i(() => !B.value || !p["fullscreen-status"] ? [] : p["fullscreen-status"](B.value)), H = i(() => ({
|
|
1597
|
+
gridTemplateColumns: G.value ? "minmax(0, 1fr) 22rem" : "minmax(0, 1fr) 0rem",
|
|
1700
1598
|
transition: "grid-template-columns 320ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
1701
|
-
})),
|
|
1599
|
+
})), U = i(() => Mt(R.value)), W = i(() => Mt(z.value)), G = i(() => W.value && C.value >= mn), K = i(() => W.value && !G.value), q = i(() => Mt(V.value));
|
|
1702
1600
|
x(() => {
|
|
1703
|
-
window.addEventListener("resize",
|
|
1601
|
+
window.addEventListener("resize", le);
|
|
1704
1602
|
}), b(() => {
|
|
1705
|
-
window.removeEventListener("resize",
|
|
1603
|
+
window.removeEventListener("resize", le);
|
|
1706
1604
|
});
|
|
1707
|
-
function
|
|
1605
|
+
function J(e, t) {
|
|
1708
1606
|
let n = t.title?.trim();
|
|
1709
|
-
return n ? `${e} ${n}` : `${e} ${
|
|
1607
|
+
return n ? `${e} ${n}` : `${e} ${jt(t.type).toLowerCase()}`;
|
|
1710
1608
|
}
|
|
1711
|
-
function
|
|
1609
|
+
function te(e, t) {
|
|
1712
1610
|
let n = Q(t);
|
|
1713
|
-
return !
|
|
1611
|
+
return !X(e) || e !== g.resolvedActiveIndex.value || g.getAssetErrorKind(n) ? !1 : t.type === "image" ? !g.isImageReady(n) : t.type === "video" || t.type === "audio" ? !g.isMediaReady(n) : !1;
|
|
1714
1612
|
}
|
|
1715
|
-
function
|
|
1613
|
+
function Y(e) {
|
|
1716
1614
|
return g.getAssetErrorKind(Q(e));
|
|
1717
1615
|
}
|
|
1718
|
-
function
|
|
1616
|
+
function ne(e) {
|
|
1719
1617
|
return g.getAssetErrorLabel(Q(e)) ?? "Load error";
|
|
1720
1618
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1619
|
+
function se(e, t) {
|
|
1620
|
+
return X(e) && e === g.resolvedActiveIndex.value && !!Y(t);
|
|
1723
1621
|
}
|
|
1724
|
-
function
|
|
1622
|
+
function X(e) {
|
|
1725
1623
|
let t = g.resolvedActiveIndex.value;
|
|
1726
|
-
return d.active && e >= t && e <= t +
|
|
1624
|
+
return d.active && e >= t && e <= t + hn;
|
|
1727
1625
|
}
|
|
1728
1626
|
function ce(e, t) {
|
|
1729
|
-
return
|
|
1627
|
+
return X(e) ? g.getImageSource(t) : void 0;
|
|
1730
1628
|
}
|
|
1731
|
-
function
|
|
1732
|
-
return
|
|
1629
|
+
function Z(e, t) {
|
|
1630
|
+
return X(e) ? t.url : void 0;
|
|
1733
1631
|
}
|
|
1734
1632
|
function Q(e) {
|
|
1735
1633
|
return $(e);
|
|
1736
1634
|
}
|
|
1737
|
-
function
|
|
1738
|
-
C.value = window.innerWidth ||
|
|
1635
|
+
function le() {
|
|
1636
|
+
C.value = window.innerWidth || mn;
|
|
1739
1637
|
}
|
|
1740
|
-
return (e, n) => (S(), s("div",
|
|
1638
|
+
return (e, n) => (S(), s("div", Rt, [
|
|
1741
1639
|
c("div", { class: _(["absolute inset-0 transition-[background] duration-200", w.value]) }, null, 2),
|
|
1742
1640
|
c("div", {
|
|
1743
1641
|
class: "relative z-[1] grid h-full min-h-0",
|
|
1744
|
-
style: y(
|
|
1642
|
+
style: y(H.value)
|
|
1745
1643
|
}, [c("div", {
|
|
1746
1644
|
ref: "viewer.stageRef",
|
|
1747
1645
|
"data-testid": "vibe-stage",
|
|
@@ -1751,7 +1649,7 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1751
1649
|
onPointerup: n[3] ||= (...e) => j(g).onPointerUp && j(g).onPointerUp(...e),
|
|
1752
1650
|
onPointercancel: n[4] ||= (...e) => j(g).onPointerCancel && j(g).onPointerCancel(...e),
|
|
1753
1651
|
onWheel: n[5] ||= (...e) => j(g).onWheel && j(g).onWheel(...e)
|
|
1754
|
-
}, [j(g).items.value.length > 0 ? (S(), s("div",
|
|
1652
|
+
}, [j(g).items.value.length > 0 ? (S(), s("div", zt, [
|
|
1755
1653
|
(S(!0), s(t, null, E(j(g).renderedItems.value, ({ item: r, index: i }) => (S(), s("article", {
|
|
1756
1654
|
key: Q(r),
|
|
1757
1655
|
"data-testid": "vibe-slide",
|
|
@@ -1762,30 +1660,30 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1762
1660
|
"aria-hidden": i === j(g).resolvedActiveIndex.value ? "false" : "true",
|
|
1763
1661
|
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"]),
|
|
1764
1662
|
style: y(j(g).getSlideStyle(i))
|
|
1765
|
-
}, [c("div", { class: _(["absolute inset-0 opacity-85", j(
|
|
1663
|
+
}, [c("div", { class: _(["absolute inset-0 opacity-85", j(Lt)(r.type)]) }, null, 2), j(g).isVisual(r) ? (S(), s("div", {
|
|
1766
1664
|
key: 0,
|
|
1767
1665
|
class: _(["relative z-[1] flex h-full w-full items-center justify-center overflow-hidden", i === j(g).resolvedActiveIndex.value ? F.value : ""])
|
|
1768
|
-
}, [
|
|
1666
|
+
}, [te(i, r) ? (S(), s("div", Vt, [c("span", Ht, [u(j(re), {
|
|
1769
1667
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1770
1668
|
"aria-hidden": "true"
|
|
1771
|
-
})])])) : o("", !0),
|
|
1669
|
+
})])])) : o("", !0), se(i, r) ? (S(), s("div", {
|
|
1772
1670
|
key: 1,
|
|
1773
1671
|
"data-testid": "vibe-asset-error",
|
|
1774
|
-
"data-kind":
|
|
1672
|
+
"data-kind": Y(r),
|
|
1775
1673
|
class: "grid h-full w-full place-items-center"
|
|
1776
|
-
}, [c("div",
|
|
1777
|
-
u(j(
|
|
1674
|
+
}, [c("div", Wt, [
|
|
1675
|
+
u(j(oe), {
|
|
1778
1676
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
1779
1677
|
"aria-hidden": "true"
|
|
1780
1678
|
}),
|
|
1781
|
-
c("p",
|
|
1679
|
+
c("p", Gt, k(ne(r)), 1),
|
|
1782
1680
|
j(g).canRetryAsset(Q(r)) ? (S(), s("button", {
|
|
1783
1681
|
key: 0,
|
|
1784
1682
|
type: "button",
|
|
1785
1683
|
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",
|
|
1786
1684
|
onClick: ee((e) => j(g).retryAsset(Q(r)), ["stop"])
|
|
1787
|
-
}, " Retry ", 8,
|
|
1788
|
-
])], 8,
|
|
1685
|
+
}, " Retry ", 8, Kt)) : o("", !0)
|
|
1686
|
+
])], 8, Ut)) : r.type === "image" ? (S(), s("img", {
|
|
1789
1687
|
key: j(g).getAssetRenderKey(Q(r)),
|
|
1790
1688
|
src: ce(i, r),
|
|
1791
1689
|
alt: r.title ?? "",
|
|
@@ -1795,13 +1693,13 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1795
1693
|
ref: (e) => j(g).registerImageElement(Q(r), e),
|
|
1796
1694
|
onLoad: (e) => j(g).onImageLoad(Q(r), r.url),
|
|
1797
1695
|
onError: (e) => j(g).onImageError(Q(r), r.url)
|
|
1798
|
-
}, null, 42,
|
|
1696
|
+
}, null, 42, qt)) : (S(), s("video", {
|
|
1799
1697
|
key: j(g).getAssetRenderKey(Q(r)),
|
|
1800
1698
|
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(Q(r)) ? "opacity-100" : "opacity-0"]),
|
|
1801
1699
|
playsinline: "",
|
|
1802
1700
|
muted: "",
|
|
1803
|
-
src:
|
|
1804
|
-
preload:
|
|
1701
|
+
src: Z(i, r),
|
|
1702
|
+
preload: X(i) ? "metadata" : "none",
|
|
1805
1703
|
ref_for: !0,
|
|
1806
1704
|
ref: (e) => j(g).registerVideoElement(Q(r), e),
|
|
1807
1705
|
onClick: ee((e) => j(g).onVideoClick(e, Q(r)), ["stop"]),
|
|
@@ -1818,56 +1716,56 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1818
1716
|
onStalled: (e) => j(g).onMediaEvent(Q(r), e),
|
|
1819
1717
|
onTimeupdate: (e) => j(g).onMediaEvent(Q(r), e),
|
|
1820
1718
|
onWaiting: (e) => j(g).onMediaEvent(Q(r), e)
|
|
1821
|
-
}, null, 42,
|
|
1719
|
+
}, null, 42, Jt))], 2)) : j(g).isAudio(r) ? (S(), s("div", {
|
|
1822
1720
|
key: 1,
|
|
1823
1721
|
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 ? F.value : ""])
|
|
1824
|
-
}, [c("div",
|
|
1722
|
+
}, [c("div", Yt, [
|
|
1825
1723
|
c("button", {
|
|
1826
1724
|
type: "button",
|
|
1827
1725
|
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]",
|
|
1828
|
-
"aria-label": j(g).mediaStates.value[Q(r)]?.paused ?? !0 ?
|
|
1829
|
-
disabled: !!
|
|
1726
|
+
"aria-label": j(g).mediaStates.value[Q(r)]?.paused ?? !0 ? J("Play", r) : J("Pause", r),
|
|
1727
|
+
disabled: !!Y(r),
|
|
1830
1728
|
onClick: (e) => j(g).onAudioCoverClick(e, Q(r))
|
|
1831
1729
|
}, [
|
|
1832
1730
|
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),
|
|
1833
1731
|
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),
|
|
1834
|
-
c("span",
|
|
1835
|
-
icon: j(
|
|
1732
|
+
c("span", Zt, [D(e.$slots, "item-icon", {
|
|
1733
|
+
icon: j(At)(r.type),
|
|
1836
1734
|
item: r
|
|
1837
|
-
}, () => [(S(), a(O(j(
|
|
1735
|
+
}, () => [(S(), a(O(j(At)(r.type)), {
|
|
1838
1736
|
class: "h-6 w-6 stroke-[1.9]",
|
|
1839
1737
|
"aria-hidden": "true"
|
|
1840
1738
|
}))])]),
|
|
1841
|
-
c("span",
|
|
1739
|
+
c("span", Qt, [(S(), a(O(j(g).mediaStates.value[Q(r)]?.paused ?? !0 ? j(ae) : j(ie)), {
|
|
1842
1740
|
class: "h-4 w-4 stroke-2",
|
|
1843
1741
|
"aria-hidden": "true"
|
|
1844
1742
|
}))])
|
|
1845
|
-
], 8,
|
|
1846
|
-
|
|
1743
|
+
], 8, Xt),
|
|
1744
|
+
te(i, r) ? (S(), s("div", $t, [c("span", en, [u(j(re), {
|
|
1847
1745
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
1848
1746
|
"aria-hidden": "true"
|
|
1849
1747
|
})])])) : o("", !0),
|
|
1850
|
-
|
|
1748
|
+
Y(r) ? (S(), s(t, { key: 1 }, [n[8] ||= c("div", { class: "pointer-events-none absolute inset-0 border border-white/8 bg-[radial-gradient(circle,rgba(239,68,68,0.12),transparent_66%)]" }, null, -1), c("div", {
|
|
1851
1749
|
"data-testid": "vibe-asset-error",
|
|
1852
|
-
"data-kind":
|
|
1750
|
+
"data-kind": Y(r),
|
|
1853
1751
|
class: "relative z-[1] grid justify-items-center gap-4"
|
|
1854
1752
|
}, [
|
|
1855
|
-
u(j(
|
|
1753
|
+
u(j(oe), {
|
|
1856
1754
|
class: "h-7 w-7 stroke-[1.9] text-[#f7f1ea]/72",
|
|
1857
1755
|
"aria-hidden": "true"
|
|
1858
1756
|
}),
|
|
1859
|
-
c("p",
|
|
1757
|
+
c("p", nn, k(ne(r)), 1),
|
|
1860
1758
|
j(g).canRetryAsset(Q(r)) ? (S(), s("button", {
|
|
1861
1759
|
key: 0,
|
|
1862
1760
|
type: "button",
|
|
1863
1761
|
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",
|
|
1864
1762
|
onClick: ee((e) => j(g).retryAsset(Q(r)), ["stop"])
|
|
1865
|
-
}, " Retry ", 8,
|
|
1866
|
-
], 8,
|
|
1763
|
+
}, " Retry ", 8, rn)) : o("", !0)
|
|
1764
|
+
], 8, tn)], 64)) : o("", !0)
|
|
1867
1765
|
]), (S(), s("audio", {
|
|
1868
1766
|
key: j(g).getAssetRenderKey(Q(r)),
|
|
1869
|
-
src:
|
|
1870
|
-
preload:
|
|
1767
|
+
src: Z(i, r),
|
|
1768
|
+
preload: X(i) ? "metadata" : "none",
|
|
1871
1769
|
class: "pointer-events-none absolute h-px w-px opacity-0",
|
|
1872
1770
|
ref_for: !0,
|
|
1873
1771
|
ref: (e) => j(g).registerAudioElement(Q(r), e),
|
|
@@ -1884,24 +1782,24 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1884
1782
|
onStalled: (e) => j(g).onMediaEvent(Q(r), e),
|
|
1885
1783
|
onTimeupdate: (e) => j(g).onMediaEvent(Q(r), e),
|
|
1886
1784
|
onWaiting: (e) => j(g).onMediaEvent(Q(r), e)
|
|
1887
|
-
}, null, 40,
|
|
1888
|
-
icon: j(
|
|
1785
|
+
}, null, 40, an))], 2)) : (S(), s("div", on, [c("div", sn, [D(e.$slots, "item-icon", {
|
|
1786
|
+
icon: j(At)(r.type),
|
|
1889
1787
|
item: r
|
|
1890
|
-
}, () => [(S(), a(O(j(
|
|
1788
|
+
}, () => [(S(), a(O(j(At)(r.type)), {
|
|
1891
1789
|
class: "h-6 w-6 stroke-[1.9]",
|
|
1892
1790
|
"aria-hidden": "true"
|
|
1893
|
-
}))])])]))], 14,
|
|
1894
|
-
L.value && p["fullscreen-overlay"] ? (S(), s("div",
|
|
1895
|
-
j(g).activeItem.value ? (S(), a(
|
|
1791
|
+
}))])])]))], 14, Bt))), 128)),
|
|
1792
|
+
L.value && p["fullscreen-overlay"] ? (S(), s("div", cn, [c("div", ln, [D(e.$slots, "fullscreen-overlay", v(f(L.value)))])])) : o("", !0),
|
|
1793
|
+
j(g).activeItem.value ? (S(), a(at, {
|
|
1896
1794
|
key: 1,
|
|
1897
1795
|
"current-index": j(g).resolvedActiveIndex.value,
|
|
1898
1796
|
"pagination-detail": j(g).paginationDetail.value,
|
|
1899
1797
|
"show-back-to-list": d.showBackToList,
|
|
1900
|
-
"show-end-badge": d.
|
|
1798
|
+
"show-end-badge": d.showEndBadge && j(g).isAtEnd.value && !j(g).hasNextPage.value && !j(g).loading.value,
|
|
1901
1799
|
title: j(g).activeItem.value.title ?? null,
|
|
1902
1800
|
total: j(g).items.value.length,
|
|
1903
1801
|
onBackToList: n[0] ||= (e) => m("back-to-list")
|
|
1904
|
-
}, l({ _: 2 }, [
|
|
1802
|
+
}, l({ _: 2 }, [U.value && L.value ? {
|
|
1905
1803
|
name: "actions",
|
|
1906
1804
|
fn: I(() => [D(e.$slots, "fullscreen-header-actions", v(f(L.value)))]),
|
|
1907
1805
|
key: "0"
|
|
@@ -1913,7 +1811,7 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1913
1811
|
"title",
|
|
1914
1812
|
"total"
|
|
1915
1813
|
])) : o("", !0),
|
|
1916
|
-
P.value ? (S(), a(
|
|
1814
|
+
P.value ? (S(), a(Je, {
|
|
1917
1815
|
key: 2,
|
|
1918
1816
|
"current-time": j(g).activeMediaState.value.currentTime,
|
|
1919
1817
|
"current-time-label": j(g).formatPlaybackTime(j(g).activeMediaState.value.currentTime),
|
|
@@ -1929,13 +1827,14 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1929
1827
|
"progress",
|
|
1930
1828
|
"onSeekInput"
|
|
1931
1829
|
])) : o("", !0),
|
|
1932
|
-
|
|
1830
|
+
B.value ? (S(), s("div", {
|
|
1933
1831
|
key: 3,
|
|
1934
1832
|
class: _(["absolute left-1/2 z-[4] -translate-x-1/2", N.value])
|
|
1935
|
-
}, [
|
|
1833
|
+
}, [q.value ? D(e.$slots, "fullscreen-status", v(h({ key: 0 }, B.value))) : (S(), s("div", {
|
|
1936
1834
|
key: 1,
|
|
1937
|
-
|
|
1938
|
-
|
|
1835
|
+
"data-testid": "vibe-fullscreen-status-badge",
|
|
1836
|
+
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", B.value.kind === "end" ? "border-amber-300/35 text-amber-200" : B.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
1837
|
+
}, k(B.value.message), 3))], 2)) : o("", !0)
|
|
1939
1838
|
])) : o("", !0)], 544), u(r, {
|
|
1940
1839
|
"enter-active-class": "transform-gpu transition-all duration-320 ease-out",
|
|
1941
1840
|
"enter-from-class": "translate-x-full opacity-0",
|
|
@@ -1944,7 +1843,7 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1944
1843
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
1945
1844
|
"leave-to-class": "translate-x-full opacity-0"
|
|
1946
1845
|
}, {
|
|
1947
|
-
default: I(() => [
|
|
1846
|
+
default: I(() => [G.value && L.value ? (S(), s("aside", un, [c("div", dn, [D(e.$slots, "fullscreen-aside", v(f(L.value)))])])) : o("", !0)]),
|
|
1948
1847
|
_: 3
|
|
1949
1848
|
})], 4),
|
|
1950
1849
|
u(r, {
|
|
@@ -1955,29 +1854,29 @@ var Bt = { class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f
|
|
|
1955
1854
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
1956
1855
|
"leave-to-class": "translate-x-full opacity-0"
|
|
1957
1856
|
}, {
|
|
1958
|
-
default: I(() => [
|
|
1857
|
+
default: I(() => [K.value && L.value ? (S(), s("aside", fn, [c("div", pn, [D(e.$slots, "fullscreen-aside", v(f(L.value)))])])) : o("", !0)]),
|
|
1959
1858
|
_: 3
|
|
1960
1859
|
})
|
|
1961
1860
|
]));
|
|
1962
1861
|
}
|
|
1963
|
-
}),
|
|
1964
|
-
function
|
|
1862
|
+
}), _n = 1, vn = .5;
|
|
1863
|
+
function yn(e) {
|
|
1965
1864
|
if (e.type !== "image" && e.type !== "video") return {
|
|
1966
|
-
width:
|
|
1967
|
-
height:
|
|
1865
|
+
width: _n,
|
|
1866
|
+
height: _n,
|
|
1968
1867
|
source: "fallback"
|
|
1969
1868
|
};
|
|
1970
1869
|
let t = e.preview?.width, n = e.preview?.height;
|
|
1971
|
-
if (
|
|
1972
|
-
let r =
|
|
1870
|
+
if (En(t) && En(n)) {
|
|
1871
|
+
let r = Dn(e, t, n);
|
|
1973
1872
|
return {
|
|
1974
1873
|
width: r.width,
|
|
1975
1874
|
height: r.height,
|
|
1976
1875
|
source: "preview"
|
|
1977
1876
|
};
|
|
1978
1877
|
}
|
|
1979
|
-
if (
|
|
1980
|
-
let t =
|
|
1878
|
+
if (En(e.width) && En(e.height)) {
|
|
1879
|
+
let t = Dn(e, e.width, e.height);
|
|
1981
1880
|
return {
|
|
1982
1881
|
width: t.width,
|
|
1983
1882
|
height: t.height,
|
|
@@ -1985,31 +1884,31 @@ function xn(e) {
|
|
|
1985
1884
|
};
|
|
1986
1885
|
}
|
|
1987
1886
|
return {
|
|
1988
|
-
width:
|
|
1989
|
-
height:
|
|
1887
|
+
width: _n,
|
|
1888
|
+
height: _n,
|
|
1990
1889
|
source: "fallback"
|
|
1991
1890
|
};
|
|
1992
1891
|
}
|
|
1993
|
-
function
|
|
1892
|
+
function bn(e, t) {
|
|
1994
1893
|
return !e || e <= 0 || !t || t <= 0 ? 1 : Math.max(1, Math.floor(e / t));
|
|
1995
1894
|
}
|
|
1996
|
-
function
|
|
1895
|
+
function xn(e, t, n, r = 0) {
|
|
1997
1896
|
if (!e || e <= 0 || !t || t <= 0) return n;
|
|
1998
1897
|
let i = typeof r == "number" && r > 0 ? r : 0, a = e - Math.max(0, t - 1) * i;
|
|
1999
1898
|
return !a || a <= 0 ? n : a / t;
|
|
2000
1899
|
}
|
|
2001
|
-
function
|
|
2002
|
-
let n =
|
|
1900
|
+
function Sn(e, t) {
|
|
1901
|
+
let n = yn(e);
|
|
2003
1902
|
return n.height / n.width * t;
|
|
2004
1903
|
}
|
|
2005
|
-
function
|
|
1904
|
+
function Cn(e, t) {
|
|
2006
1905
|
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;
|
|
2007
1906
|
for (let c = 0; c < e.length; c += 1) {
|
|
2008
1907
|
let l = e[c];
|
|
2009
1908
|
o.set($(l), c);
|
|
2010
1909
|
let u = 0;
|
|
2011
1910
|
for (let e = 1; e < n.length; e += 1) n[e] < n[u] && (u = e);
|
|
2012
|
-
let d = u * (t.columnWidth + t.gapX), f = n[u], p =
|
|
1911
|
+
let d = u * (t.columnWidth + t.gapX), f = n[u], p = Sn(l, t.columnWidth);
|
|
2013
1912
|
r[c] = {
|
|
2014
1913
|
x: d,
|
|
2015
1914
|
y: f
|
|
@@ -2028,7 +1927,7 @@ function Tn(e, t) {
|
|
|
2028
1927
|
indexById: o
|
|
2029
1928
|
};
|
|
2030
1929
|
}
|
|
2031
|
-
function
|
|
1930
|
+
function wn(e) {
|
|
2032
1931
|
if (e.itemCount <= 0) return [];
|
|
2033
1932
|
if (e.viewportHeight <= 0) return Array.from({ length: e.itemCount }, (e, t) => t);
|
|
2034
1933
|
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();
|
|
@@ -2038,7 +1937,7 @@ function En(e) {
|
|
|
2038
1937
|
}
|
|
2039
1938
|
return Array.from(a).sort((e, t) => e - t);
|
|
2040
1939
|
}
|
|
2041
|
-
function
|
|
1940
|
+
function Tn(e, t, n) {
|
|
2042
1941
|
let r = /* @__PURE__ */ new Map();
|
|
2043
1942
|
for (let i of e) {
|
|
2044
1943
|
let e = t.get($(i));
|
|
@@ -2048,11 +1947,11 @@ function Dn(e, t, n) {
|
|
|
2048
1947
|
}
|
|
2049
1948
|
return r;
|
|
2050
1949
|
}
|
|
2051
|
-
function
|
|
1950
|
+
function En(e) {
|
|
2052
1951
|
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
2053
1952
|
}
|
|
2054
|
-
function
|
|
2055
|
-
return e.type !== "image" || n / t >=
|
|
1953
|
+
function Dn(e, t, n) {
|
|
1954
|
+
return e.type !== "image" || n / t >= vn ? {
|
|
2056
1955
|
width: t,
|
|
2057
1956
|
height: n
|
|
2058
1957
|
} : {
|
|
@@ -2062,18 +1961,18 @@ function kn(e, t, n) {
|
|
|
2062
1961
|
}
|
|
2063
1962
|
//#endregion
|
|
2064
1963
|
//#region src/components/viewer-core/useMasonryMotion.ts
|
|
2065
|
-
var
|
|
2066
|
-
function
|
|
1964
|
+
var On = 300, kn = 600, An = 40, jn = 400;
|
|
1965
|
+
function Mn(e, t) {
|
|
2067
1966
|
return t === "top" ? [...e].reverse() : e;
|
|
2068
1967
|
}
|
|
2069
|
-
function
|
|
2070
|
-
return e <= 0 ?
|
|
1968
|
+
function Nn(e) {
|
|
1969
|
+
return e <= 0 ? kn : kn + Math.min((e - 1) * An, jn);
|
|
2071
1970
|
}
|
|
2072
|
-
function
|
|
1971
|
+
function Pn(e) {
|
|
2073
1972
|
let t = e.itemHeight > 0 ? e.itemHeight : e.columnWidth;
|
|
2074
1973
|
return e.direction === "top" ? e.scrollTop - t : e.scrollTop + e.viewportHeight + t;
|
|
2075
1974
|
}
|
|
2076
|
-
function
|
|
1975
|
+
function Fn(e) {
|
|
2077
1976
|
let t = T(/* @__PURE__ */ new Set()), n = T(/* @__PURE__ */ new Set()), r = T(/* @__PURE__ */ new Map()), i = T(/* @__PURE__ */ new Map()), a = T(/* @__PURE__ */ new Map()), o = T(/* @__PURE__ */ new Map()), s = T(/* @__PURE__ */ new Set()), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
2078
1977
|
P(e.visibleIndices, (a) => {
|
|
2079
1978
|
if (!a.length) return;
|
|
@@ -2083,20 +1982,20 @@ function Ln(e) {
|
|
|
2083
1982
|
!r || !t.value.has(r) || c.has(r) || (c.add(r), o.push(r));
|
|
2084
1983
|
}
|
|
2085
1984
|
if (!o.length) return;
|
|
2086
|
-
let s =
|
|
2087
|
-
for (let e = 0; e < s.length; e += 1) l.set(s[e], Math.min(e *
|
|
2088
|
-
r.value = l,
|
|
1985
|
+
let s = Mn(o, i.value.get(o[0]) ?? "bottom"), l = new Map(r.value);
|
|
1986
|
+
for (let e = 0; e < s.length; e += 1) l.set(s[e], Math.min(e * An, jn));
|
|
1987
|
+
r.value = l, In(() => {
|
|
2089
1988
|
let e = new Set(n.value);
|
|
2090
1989
|
for (let t of o) e.add(t);
|
|
2091
1990
|
n.value = e;
|
|
2092
|
-
}),
|
|
1991
|
+
}), Ln(() => {
|
|
2093
1992
|
let e = new Set(t.value);
|
|
2094
1993
|
for (let t of o) e.delete(t);
|
|
2095
1994
|
t.value = e, h(() => {
|
|
2096
1995
|
let e = new Set(n.value), t = new Map(r.value), a = new Map(i.value);
|
|
2097
1996
|
for (let n of o) e.delete(n), t.delete(n), a.delete(n), c.delete(n);
|
|
2098
1997
|
n.value = e, r.value = t, i.value = a;
|
|
2099
|
-
},
|
|
1998
|
+
}, Nn(o.length));
|
|
2100
1999
|
});
|
|
2101
2000
|
}, { flush: "post" }), b(() => {
|
|
2102
2001
|
for (let e of l) clearTimeout(e);
|
|
@@ -2111,7 +2010,7 @@ function Ln(e) {
|
|
|
2111
2010
|
}
|
|
2112
2011
|
t.value = r, i.value = a;
|
|
2113
2012
|
}
|
|
2114
|
-
function d(t, n, r =
|
|
2013
|
+
function d(t, n, r = On) {
|
|
2115
2014
|
if (!t.size) return;
|
|
2116
2015
|
let i = /* @__PURE__ */ new Map(), c = [];
|
|
2117
2016
|
for (let [r, a] of t.entries()) {
|
|
@@ -2130,8 +2029,8 @@ function Ln(e) {
|
|
|
2130
2029
|
a.value = i, s.value = /* @__PURE__ */ new Set();
|
|
2131
2030
|
let l = new Map(o.value);
|
|
2132
2031
|
for (let e of c) l.set(e, r);
|
|
2133
|
-
o.value = l,
|
|
2134
|
-
s.value = new Set(c),
|
|
2032
|
+
o.value = l, In(() => {
|
|
2033
|
+
s.value = new Set(c), In(() => {
|
|
2135
2034
|
a.value = /* @__PURE__ */ new Map();
|
|
2136
2035
|
});
|
|
2137
2036
|
}), h(() => {
|
|
@@ -2142,8 +2041,8 @@ function Ln(e) {
|
|
|
2142
2041
|
}, r);
|
|
2143
2042
|
}
|
|
2144
2043
|
function f(e) {
|
|
2145
|
-
if (n.value.has(e)) return `transform ${
|
|
2146
|
-
if (s.value.has(e)) return `transform ${o.value.get(e) ??
|
|
2044
|
+
if (n.value.has(e)) return `transform ${kn}ms ease-out`;
|
|
2045
|
+
if (s.value.has(e)) return `transform ${o.value.get(e) ?? On}ms ease-out`;
|
|
2147
2046
|
}
|
|
2148
2047
|
function p(e) {
|
|
2149
2048
|
if (!n.value.has(e)) return;
|
|
@@ -2160,7 +2059,7 @@ function Ln(e) {
|
|
|
2160
2059
|
} : {
|
|
2161
2060
|
dx: 0,
|
|
2162
2061
|
dy: 0
|
|
2163
|
-
}, u = c ? i.value.get(c) ?? "bottom" : "bottom", d = c && t.value.has(c) ?
|
|
2062
|
+
}, u = c ? i.value.get(c) ?? "bottom" : "bottom", d = c && t.value.has(c) ? Pn({
|
|
2164
2063
|
columnWidth: e.columnWidth.value,
|
|
2165
2064
|
direction: u,
|
|
2166
2065
|
itemHeight: s,
|
|
@@ -2183,28 +2082,28 @@ function Ln(e) {
|
|
|
2183
2082
|
playFlipMoveAnimation: d
|
|
2184
2083
|
};
|
|
2185
2084
|
}
|
|
2186
|
-
function
|
|
2085
|
+
function In(e) {
|
|
2187
2086
|
if (typeof requestAnimationFrame == "function") {
|
|
2188
2087
|
requestAnimationFrame(() => e());
|
|
2189
2088
|
return;
|
|
2190
2089
|
}
|
|
2191
2090
|
setTimeout(e, 0);
|
|
2192
2091
|
}
|
|
2193
|
-
function
|
|
2194
|
-
|
|
2092
|
+
function Ln(e) {
|
|
2093
|
+
In(() => In(e));
|
|
2195
2094
|
}
|
|
2196
2095
|
//#endregion
|
|
2197
2096
|
//#region src/components/viewer-core/masonryViewport.ts
|
|
2198
|
-
function
|
|
2199
|
-
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || window.innerHeight ||
|
|
2097
|
+
function Rn(e, t) {
|
|
2098
|
+
return e?.clientHeight || Math.round(e?.getBoundingClientRect().height ?? 0) || t || window.innerHeight || 1;
|
|
2200
2099
|
}
|
|
2201
|
-
function
|
|
2202
|
-
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || window.innerWidth ||
|
|
2100
|
+
function zn(e, t, n) {
|
|
2101
|
+
return e?.clientWidth || Math.round(e?.getBoundingClientRect().width ?? 0) || t || window.innerWidth || n;
|
|
2203
2102
|
}
|
|
2204
|
-
function
|
|
2103
|
+
function Bn(e, t, n, r) {
|
|
2205
2104
|
return (e?.scrollHeight ?? r) - (t + n);
|
|
2206
2105
|
}
|
|
2207
|
-
function
|
|
2106
|
+
function Vn(e, t) {
|
|
2208
2107
|
return {
|
|
2209
2108
|
height: `${e}px`,
|
|
2210
2109
|
transform: `translate3d(0, ${t}px, 0)`
|
|
@@ -2212,8 +2111,8 @@ function Un(e, t) {
|
|
|
2212
2111
|
}
|
|
2213
2112
|
//#endregion
|
|
2214
2113
|
//#region src/components/viewer-core/useEdgeBoundary.ts
|
|
2215
|
-
var
|
|
2216
|
-
function
|
|
2114
|
+
var Hn = 250, Un = 1e3;
|
|
2115
|
+
function Wn(e) {
|
|
2217
2116
|
let t = T(!1), n = T(!1), r = T(0), i = T(0), a = T(!1), o = T(!1), s = 0, c = null;
|
|
2218
2117
|
b(() => {
|
|
2219
2118
|
y();
|
|
@@ -2229,7 +2128,7 @@ function Kn(e) {
|
|
|
2229
2128
|
function u(t) {
|
|
2230
2129
|
if (!x(t) || !e.isAtBoundary()) return;
|
|
2231
2130
|
let n = Date.now();
|
|
2232
|
-
n < s || (s = n +
|
|
2131
|
+
n < s || (s = n + Hn, m());
|
|
2233
2132
|
}
|
|
2234
2133
|
function d() {
|
|
2235
2134
|
if (!g()) return;
|
|
@@ -2263,7 +2162,7 @@ function Kn(e) {
|
|
|
2263
2162
|
return e.hasPage.value && t.value && r.value > i.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
|
|
2264
2163
|
}
|
|
2265
2164
|
function _() {
|
|
2266
|
-
o.value = !1, v(
|
|
2165
|
+
o.value = !1, v(Un);
|
|
2267
2166
|
}
|
|
2268
2167
|
function v(e) {
|
|
2269
2168
|
y(), a.value = !0, c = setTimeout(() => {
|
|
@@ -2286,133 +2185,142 @@ function Kn(e) {
|
|
|
2286
2185
|
}
|
|
2287
2186
|
//#endregion
|
|
2288
2187
|
//#region src/components/viewer-core/useMasonryList.ts
|
|
2289
|
-
var
|
|
2290
|
-
function
|
|
2291
|
-
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth ||
|
|
2188
|
+
var Gn = 600, Kn = 24, qn = 16, Jn = 300, Yn = 200, Xn = 200, Zn = 200, Qn = 300, $n = 24, er = 48, tr = 500, nr = 1e3;
|
|
2189
|
+
function rr(e) {
|
|
2190
|
+
let t = T(null), n = T(0), r = T(typeof window > "u" ? 0 : window.innerHeight || 0), a = T(typeof window > "u" ? 0 : window.innerWidth || Jn), o = T([]), s = T([]), c = T(/* @__PURE__ */ new Map()), l = T(0), u = T(/* @__PURE__ */ new Map()), d = T(null), f = T(null), p = i(() => Math.max(Jn, a.value - Kn * 2)), m = i(() => bn(p.value, Jn)), h = i(() => xn(p.value, m.value, Jn, qn)), _ = i(() => ir(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), v = i(() => wn({
|
|
2292
2191
|
itemCount: e.items.value.length,
|
|
2293
2192
|
viewportHeight: r.value,
|
|
2294
2193
|
scrollTop: n.value,
|
|
2295
|
-
overscanPx:
|
|
2296
|
-
bucketPx:
|
|
2194
|
+
overscanPx: Yn,
|
|
2195
|
+
bucketPx: Gn,
|
|
2297
2196
|
buckets: c.value
|
|
2298
|
-
})),
|
|
2197
|
+
})), y = i(() => v.value.map((t) => ({
|
|
2299
2198
|
item: e.items.value[t],
|
|
2300
2199
|
index: t
|
|
2301
|
-
}))),
|
|
2302
|
-
let e = l.value +
|
|
2303
|
-
return Math.max(e, t, r.value) +
|
|
2304
|
-
}),
|
|
2305
|
-
if (!
|
|
2306
|
-
let e = r.value /
|
|
2307
|
-
return Math.min(
|
|
2308
|
-
}),
|
|
2309
|
-
if (!
|
|
2310
|
-
let e = Math.max(0,
|
|
2311
|
-
return
|
|
2312
|
-
}),
|
|
2200
|
+
}))), S = i(() => {
|
|
2201
|
+
let e = l.value + Kn * 2, t = d.value ?? 0;
|
|
2202
|
+
return Math.max(e, t, r.value) + Zn;
|
|
2203
|
+
}), C = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), w = i(() => `${_.value + 1} / ${e.items.value.length}`), E = i(() => Math.max(0, r.value - $n * 2)), D = i(() => S.value > r.value + 1 && E.value > 0), O = i(() => {
|
|
2204
|
+
if (!D.value) return 0;
|
|
2205
|
+
let e = r.value / S.value * E.value;
|
|
2206
|
+
return Math.min(E.value, Math.max(er, e));
|
|
2207
|
+
}), k = i(() => {
|
|
2208
|
+
if (!D.value) return $n;
|
|
2209
|
+
let e = Math.max(0, S.value - r.value);
|
|
2210
|
+
return $n + Math.max(0, E.value - O.value) * (e > 0 ? ir(n.value / e, 0, 1) : 0);
|
|
2211
|
+
}), A = Fn({
|
|
2313
2212
|
items: e.items,
|
|
2314
|
-
visibleIndices:
|
|
2213
|
+
visibleIndices: v,
|
|
2315
2214
|
positions: o,
|
|
2316
2215
|
heights: s,
|
|
2317
2216
|
indexById: u,
|
|
2318
|
-
columnWidth:
|
|
2217
|
+
columnWidth: h,
|
|
2319
2218
|
scrollTop: n,
|
|
2320
2219
|
viewportHeight: r
|
|
2321
|
-
}),
|
|
2220
|
+
}), j = Wn({
|
|
2322
2221
|
direction: "top",
|
|
2323
2222
|
getAnimationLockMs(e) {
|
|
2324
|
-
return Math.max(
|
|
2223
|
+
return Math.max(tr, Nn(e)) + nr;
|
|
2325
2224
|
},
|
|
2326
2225
|
hasPage: e.hasPreviousPage,
|
|
2327
2226
|
isAtBoundary() {
|
|
2328
|
-
return n.value <=
|
|
2227
|
+
return n.value <= Kn + qn;
|
|
2329
2228
|
},
|
|
2330
2229
|
loading: e.loading,
|
|
2331
2230
|
requestPage: e.requestPreviousPage
|
|
2332
|
-
}),
|
|
2231
|
+
}), M = Wn({
|
|
2333
2232
|
direction: "bottom",
|
|
2334
2233
|
getAnimationLockMs(e) {
|
|
2335
|
-
return
|
|
2234
|
+
return Nn(e) + nr;
|
|
2336
2235
|
},
|
|
2337
|
-
hasPage:
|
|
2236
|
+
hasPage: C,
|
|
2338
2237
|
isAtBoundary() {
|
|
2339
|
-
return
|
|
2238
|
+
return te() <= Xn;
|
|
2340
2239
|
},
|
|
2341
2240
|
loading: e.loading,
|
|
2342
2241
|
requestPage: e.requestNextPage
|
|
2343
|
-
}),
|
|
2242
|
+
}), N = null, F = 0, I = null, L = !1;
|
|
2344
2243
|
P([
|
|
2345
2244
|
() => e.items.value.map((e) => $(e)),
|
|
2346
|
-
|
|
2347
|
-
|
|
2245
|
+
m,
|
|
2246
|
+
h
|
|
2348
2247
|
], async ([t], [r = []]) => {
|
|
2349
|
-
let i =
|
|
2350
|
-
|
|
2248
|
+
let i = Tn(e.items.value, u.value, o.value), a = new Set(r), s = e.items.value.filter((e) => !a.has($(e))), c = t.length > r.length && r.length > 0 && t[0] !== r[0], l = c && n.value > Kn + qn ? e.items.value[_.value] : null, d = l ? $(l) : null;
|
|
2249
|
+
ee(), s.length > 0 && (A.markEnter(s, c ? "top" : "bottom"), c ? j.onItemsMutated(s.length) : M.onItemsMutated(s.length)), A.playFlipMoveAnimation(i, new Set(s.map((e) => $(e))), c ? tr : void 0), d ? (await g(), H(d, i)) : e.active.value && r.length > 0 && W();
|
|
2351
2250
|
}, { immediate: !0 }), P([
|
|
2352
2251
|
() => e.pendingAppendItems.value.map((e) => $(e)),
|
|
2353
|
-
p,
|
|
2354
2252
|
m,
|
|
2253
|
+
h,
|
|
2355
2254
|
r
|
|
2356
2255
|
], ([t]) => {
|
|
2357
|
-
|
|
2358
|
-
}, { immediate: !0 }), P(() => e.
|
|
2359
|
-
|
|
2256
|
+
ie(), t.length && (d.value = ne([...e.items.value, ...e.pendingAppendItems.value]), re());
|
|
2257
|
+
}, { immediate: !0 }), P(() => e.active.value, async (e, i) => {
|
|
2258
|
+
let a = t.value;
|
|
2259
|
+
if (!a) return;
|
|
2260
|
+
if (!e) {
|
|
2261
|
+
f.value = a.scrollTop;
|
|
2262
|
+
return;
|
|
2263
|
+
}
|
|
2264
|
+
if (i !== !1 || f.value == null) return;
|
|
2265
|
+
await g();
|
|
2266
|
+
let o = Math.max(0, S.value - r.value), s = ir(f.value, 0, o);
|
|
2267
|
+
a.scrollTop = s, n.value = s, j.syncBoundary(), M.syncBoundary();
|
|
2360
2268
|
}), P(() => e.loading.value, async (t) => {
|
|
2361
|
-
!t && !e.pendingAppendItems.value.length && !
|
|
2269
|
+
!t && !e.pendingAppendItems.value.length && !I && !L && (d.value = null), j.onLoadingChange(t), M.onLoadingChange(t), await g();
|
|
2362
2270
|
}), x(async () => {
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
}), t.value &&
|
|
2271
|
+
K(), await g(), _.value > 0 ? V(_.value, "center") : U(), j.syncBoundary(), M.syncBoundary(), typeof ResizeObserver < "u" ? (N = new ResizeObserver(() => {
|
|
2272
|
+
K();
|
|
2273
|
+
}), t.value && N.observe(t.value)) : window.addEventListener("resize", K);
|
|
2366
2274
|
}), b(() => {
|
|
2367
|
-
|
|
2275
|
+
N?.disconnect(), N = null, window.removeEventListener("resize", K), ie(), F &&= (cancelAnimationFrame(F), 0);
|
|
2368
2276
|
});
|
|
2369
|
-
function
|
|
2370
|
-
let t =
|
|
2371
|
-
columnCount:
|
|
2372
|
-
columnWidth:
|
|
2373
|
-
gapX:
|
|
2374
|
-
gapY:
|
|
2375
|
-
bucketPx:
|
|
2277
|
+
function ee() {
|
|
2278
|
+
let t = Cn(e.items.value, {
|
|
2279
|
+
columnCount: m.value,
|
|
2280
|
+
columnWidth: h.value,
|
|
2281
|
+
gapX: qn,
|
|
2282
|
+
gapY: qn,
|
|
2283
|
+
bucketPx: Gn
|
|
2376
2284
|
});
|
|
2377
2285
|
o.value = t.positions.map((e) => ({
|
|
2378
|
-
x: e.x +
|
|
2379
|
-
y: e.y +
|
|
2286
|
+
x: e.x + Kn,
|
|
2287
|
+
y: e.y + Kn
|
|
2380
2288
|
})), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
|
|
2381
2289
|
}
|
|
2382
|
-
function
|
|
2383
|
-
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value =
|
|
2384
|
-
|
|
2290
|
+
function R() {
|
|
2291
|
+
e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = q(), j.syncBoundary(), M.syncBoundary(), G(), !W() && (F ||= requestAnimationFrame(() => {
|
|
2292
|
+
F = 0, U();
|
|
2385
2293
|
})));
|
|
2386
2294
|
}
|
|
2387
|
-
function R(t) {
|
|
2388
|
-
e.active.value && (A.onWheel(t), j.onWheel(t), W());
|
|
2389
|
-
}
|
|
2390
2295
|
function z(t) {
|
|
2296
|
+
e.active.value && (j.onWheel(t), M.onWheel(t), G());
|
|
2297
|
+
}
|
|
2298
|
+
function B(t) {
|
|
2391
2299
|
let n = e.items.value[t], r = n ? $(n) : "";
|
|
2392
2300
|
return {
|
|
2393
|
-
height: `${s.value[t] ??
|
|
2394
|
-
width: `${
|
|
2395
|
-
transition: r ?
|
|
2396
|
-
transitionDelay: r ?
|
|
2397
|
-
transform:
|
|
2301
|
+
height: `${s.value[t] ?? h.value}px`,
|
|
2302
|
+
width: `${h.value}px`,
|
|
2303
|
+
transition: r ? A.getCardTransition(r) : void 0,
|
|
2304
|
+
transitionDelay: r ? A.getCardTransitionDelay(r) : void 0,
|
|
2305
|
+
transform: A.getCardTransform(t)
|
|
2398
2306
|
};
|
|
2399
2307
|
}
|
|
2400
|
-
function
|
|
2308
|
+
function V(e, i) {
|
|
2401
2309
|
let a = t.value, c = o.value[e], l = s.value[e];
|
|
2402
2310
|
if (!a || !c || !l) return;
|
|
2403
|
-
let u = a.scrollTop, d = Math.max(0,
|
|
2404
|
-
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y -
|
|
2311
|
+
let u = a.scrollTop, d = Math.max(0, S.value - r.value);
|
|
2312
|
+
i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - Kn : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + Kn), a.scrollTop = ir(u, 0, d), n.value = a.scrollTop, U();
|
|
2405
2313
|
}
|
|
2406
|
-
function
|
|
2314
|
+
function H(e, r) {
|
|
2407
2315
|
let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
|
|
2408
2316
|
if (!i || !a || !c) return;
|
|
2409
2317
|
let l = c.y - a.y;
|
|
2410
2318
|
i.scrollTop += l, n.value = i.scrollTop;
|
|
2411
2319
|
}
|
|
2412
|
-
function
|
|
2413
|
-
if (!
|
|
2414
|
-
let t = n.value + r.value / 2, i =
|
|
2415
|
-
for (let e of
|
|
2320
|
+
function U() {
|
|
2321
|
+
if (!v.value.length || W()) return;
|
|
2322
|
+
let t = n.value + r.value / 2, i = _.value, a = Infinity;
|
|
2323
|
+
for (let e of v.value) {
|
|
2416
2324
|
let n = o.value[e], r = s.value[e];
|
|
2417
2325
|
if (!n || !r) continue;
|
|
2418
2326
|
let c = n.y + r / 2, l = Math.abs(c - t);
|
|
@@ -2420,79 +2328,78 @@ function ar(e) {
|
|
|
2420
2328
|
}
|
|
2421
2329
|
e.setActiveIndex(i);
|
|
2422
2330
|
}
|
|
2423
|
-
function U() {
|
|
2424
|
-
let t = n.value <= Jn + Yn, r = J() <= Qn;
|
|
2425
|
-
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2426
|
-
}
|
|
2427
2331
|
function W() {
|
|
2428
|
-
|
|
2332
|
+
let t = n.value <= Kn + qn, r = te() <= Xn;
|
|
2333
|
+
return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
|
|
2429
2334
|
}
|
|
2430
2335
|
function G() {
|
|
2431
|
-
|
|
2336
|
+
j.maybeRequestPage(), M.maybeRequestPage();
|
|
2432
2337
|
}
|
|
2433
2338
|
function K() {
|
|
2434
|
-
|
|
2339
|
+
r.value = q(), a.value = J();
|
|
2435
2340
|
}
|
|
2436
2341
|
function q() {
|
|
2437
|
-
return
|
|
2342
|
+
return Rn(t.value, r.value);
|
|
2438
2343
|
}
|
|
2439
2344
|
function J() {
|
|
2440
|
-
return
|
|
2345
|
+
return zn(t.value, a.value, Jn);
|
|
2441
2346
|
}
|
|
2442
2347
|
function te() {
|
|
2443
|
-
return
|
|
2348
|
+
return Bn(t.value, n.value, r.value, S.value);
|
|
2444
2349
|
}
|
|
2445
|
-
function Y(
|
|
2446
|
-
return
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2350
|
+
function Y() {
|
|
2351
|
+
return Vn(O.value, k.value);
|
|
2352
|
+
}
|
|
2353
|
+
function ne(e) {
|
|
2354
|
+
return e.length ? Cn(e, {
|
|
2355
|
+
columnCount: m.value,
|
|
2356
|
+
columnWidth: h.value,
|
|
2357
|
+
gapX: qn,
|
|
2358
|
+
gapY: qn,
|
|
2359
|
+
bucketPx: Gn
|
|
2360
|
+
}).contentHeight + Kn * 2 : 0;
|
|
2361
|
+
}
|
|
2362
|
+
function re() {
|
|
2455
2363
|
let t = e.commitPendingAppend.value;
|
|
2456
|
-
typeof t == "function" && (
|
|
2457
|
-
|
|
2364
|
+
typeof t == "function" && (I = setTimeout(async () => {
|
|
2365
|
+
I = null, L = !0;
|
|
2458
2366
|
try {
|
|
2459
2367
|
if (!e.pendingAppendItems.value.length) return;
|
|
2460
2368
|
await t(), await g(), await g();
|
|
2461
2369
|
} finally {
|
|
2462
|
-
d.value = null,
|
|
2370
|
+
d.value = null, L = !1;
|
|
2463
2371
|
}
|
|
2464
|
-
},
|
|
2372
|
+
}, Qn));
|
|
2465
2373
|
}
|
|
2466
|
-
function
|
|
2467
|
-
|
|
2374
|
+
function ie() {
|
|
2375
|
+
I &&= (clearTimeout(I), null);
|
|
2468
2376
|
}
|
|
2469
2377
|
return {
|
|
2470
|
-
columnWidth:
|
|
2471
|
-
containerHeight:
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
showScrollbar: E,
|
|
2378
|
+
columnWidth: h,
|
|
2379
|
+
containerHeight: S,
|
|
2380
|
+
getCardStyle: B,
|
|
2381
|
+
getScrollbarThumbStyle: Y,
|
|
2382
|
+
onScroll: R,
|
|
2383
|
+
onWheel: z,
|
|
2384
|
+
paginationLabel: w,
|
|
2385
|
+
renderedItems: y,
|
|
2386
|
+
resolvedActiveIndex: _,
|
|
2387
|
+
scrollToIndex: V,
|
|
2388
|
+
showScrollbar: D,
|
|
2482
2389
|
scrollViewportRef: t
|
|
2483
2390
|
};
|
|
2484
2391
|
}
|
|
2485
|
-
function
|
|
2392
|
+
function ir(e, t, n) {
|
|
2486
2393
|
return Math.min(Math.max(e, t), n);
|
|
2487
2394
|
}
|
|
2488
2395
|
//#endregion
|
|
2489
2396
|
//#region src/components/viewer-core/listCardAsset.ts
|
|
2490
|
-
function
|
|
2397
|
+
function ar(e) {
|
|
2491
2398
|
if (e) try {
|
|
2492
2399
|
e.removeAttribute("src"), e.src = "";
|
|
2493
2400
|
} catch {}
|
|
2494
2401
|
}
|
|
2495
|
-
function
|
|
2402
|
+
function or(e) {
|
|
2496
2403
|
if (e) {
|
|
2497
2404
|
try {
|
|
2498
2405
|
e.currentTime = 0;
|
|
@@ -2503,12 +2410,12 @@ function cr(e) {
|
|
|
2503
2410
|
} catch {}
|
|
2504
2411
|
}
|
|
2505
2412
|
}
|
|
2506
|
-
function
|
|
2413
|
+
function sr(e, t) {
|
|
2507
2414
|
if (t) return e.bottom > t.top && e.top < t.bottom;
|
|
2508
2415
|
let n = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
2509
2416
|
return e.bottom > 0 && e.top < n;
|
|
2510
2417
|
}
|
|
2511
|
-
function
|
|
2418
|
+
function cr(e) {
|
|
2512
2419
|
if (!e) return null;
|
|
2513
2420
|
try {
|
|
2514
2421
|
return new URL(e, window.location.href).href;
|
|
@@ -2518,22 +2425,22 @@ function ur(e) {
|
|
|
2518
2425
|
}
|
|
2519
2426
|
//#endregion
|
|
2520
2427
|
//#region src/components/viewer-core/listPreview.ts
|
|
2521
|
-
var
|
|
2522
|
-
function
|
|
2523
|
-
let t = e.preview?.url ?? e.url, n =
|
|
2428
|
+
var lr = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ur = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i;
|
|
2429
|
+
function dr(e) {
|
|
2430
|
+
let t = e.preview?.url ?? e.url, n = yn(e), r = e.title?.trim() || jt(e.type);
|
|
2524
2431
|
return e.type !== "image" && e.type !== "video" ? {
|
|
2525
2432
|
kind: "fallback",
|
|
2526
2433
|
url: null,
|
|
2527
2434
|
width: n.width,
|
|
2528
2435
|
height: n.height,
|
|
2529
2436
|
label: r
|
|
2530
|
-
} :
|
|
2437
|
+
} : pr(e, t) ? {
|
|
2531
2438
|
kind: "video",
|
|
2532
2439
|
url: t,
|
|
2533
2440
|
width: n.width,
|
|
2534
2441
|
height: n.height,
|
|
2535
2442
|
label: r
|
|
2536
|
-
} :
|
|
2443
|
+
} : fr(e, t) ? {
|
|
2537
2444
|
kind: "image",
|
|
2538
2445
|
url: t,
|
|
2539
2446
|
width: n.width,
|
|
@@ -2547,51 +2454,99 @@ function pr(e) {
|
|
|
2547
2454
|
label: r
|
|
2548
2455
|
};
|
|
2549
2456
|
}
|
|
2550
|
-
function
|
|
2551
|
-
return e.type !== "image" || typeof t != "string" ? !1 :
|
|
2457
|
+
function fr(e, t) {
|
|
2458
|
+
return e.type !== "image" || typeof t != "string" ? !1 : lr.test(t) || mr(t);
|
|
2552
2459
|
}
|
|
2553
|
-
function
|
|
2554
|
-
return e.type === "video" && typeof t == "string" &&
|
|
2460
|
+
function pr(e, t) {
|
|
2461
|
+
return e.type === "video" && typeof t == "string" && ur.test(t);
|
|
2555
2462
|
}
|
|
2556
|
-
function
|
|
2463
|
+
function mr(e) {
|
|
2557
2464
|
return /^https?:\/\//i.test(e);
|
|
2558
2465
|
}
|
|
2559
2466
|
//#endregion
|
|
2560
|
-
//#region src/components/viewer-core/
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2467
|
+
//#region src/components/viewer-core/useAssetLoadQueue.ts
|
|
2468
|
+
var hr = {
|
|
2469
|
+
maxGlobal: 10,
|
|
2470
|
+
maxPerDomain: 4,
|
|
2471
|
+
maxVideoPerDomain: 2
|
|
2472
|
+
};
|
|
2473
|
+
function gr(e = hr) {
|
|
2474
|
+
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = 0;
|
|
2475
|
+
function i(e) {
|
|
2476
|
+
let i = {
|
|
2477
|
+
...e,
|
|
2478
|
+
domain: yr(e.url),
|
|
2479
|
+
enqueuedAt: r,
|
|
2480
|
+
id: `vibe-asset-load-${r += 1}`
|
|
2481
|
+
};
|
|
2482
|
+
return n.set(i.id, i), a(), {
|
|
2483
|
+
cancel() {
|
|
2484
|
+
(n.delete(i.id) || t.delete(i.id)) && a();
|
|
2485
|
+
},
|
|
2486
|
+
refresh() {
|
|
2487
|
+
a();
|
|
2488
|
+
},
|
|
2489
|
+
release() {
|
|
2490
|
+
(t.delete(i.id) || n.delete(i.id)) && a();
|
|
2491
|
+
}
|
|
2492
|
+
};
|
|
2493
|
+
}
|
|
2494
|
+
function a() {
|
|
2495
|
+
if (n.size === 0) return;
|
|
2496
|
+
let r = [...n.values()].sort((e, t) => {
|
|
2497
|
+
let n = vr(e) - vr(t);
|
|
2498
|
+
return n === 0 ? e.enqueuedAt - t.enqueuedAt : n;
|
|
2499
|
+
});
|
|
2500
|
+
for (let i of r) {
|
|
2501
|
+
if (t.size >= e.maxGlobal) return;
|
|
2502
|
+
if (o(i)) {
|
|
2503
|
+
n.delete(i.id), t.set(i.id, i);
|
|
2504
|
+
try {
|
|
2505
|
+
i.onGrant();
|
|
2506
|
+
} catch {
|
|
2507
|
+
t.delete(i.id);
|
|
2508
|
+
}
|
|
2571
2509
|
}
|
|
2572
|
-
t ||= requestAnimationFrame(() => {
|
|
2573
|
-
t = 0, e();
|
|
2574
|
-
});
|
|
2575
2510
|
}
|
|
2576
|
-
}
|
|
2511
|
+
}
|
|
2512
|
+
function o(n) {
|
|
2513
|
+
let r = [...t.values()].filter((e) => e.domain === n.domain);
|
|
2514
|
+
return !(r.length >= e.maxPerDomain || n.assetType === "video" && r.filter((e) => e.assetType === "video").length >= e.maxVideoPerDomain);
|
|
2515
|
+
}
|
|
2516
|
+
return { request: i };
|
|
2517
|
+
}
|
|
2518
|
+
var _r = gr();
|
|
2519
|
+
function vr(e) {
|
|
2520
|
+
try {
|
|
2521
|
+
let t = e.getPriority();
|
|
2522
|
+
return Number.isFinite(t) ? t : Infinity;
|
|
2523
|
+
} catch {
|
|
2524
|
+
return Infinity;
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
function yr(e) {
|
|
2528
|
+
try {
|
|
2529
|
+
return new URL(e).hostname || "local";
|
|
2530
|
+
} catch {
|
|
2531
|
+
return "local";
|
|
2532
|
+
}
|
|
2577
2533
|
}
|
|
2578
2534
|
//#endregion
|
|
2579
2535
|
//#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
|
|
2580
|
-
var
|
|
2536
|
+
var br = ["aria-label"], xr = {
|
|
2581
2537
|
key: 0,
|
|
2582
2538
|
"data-testid": "vibe-list-card-spinner",
|
|
2583
2539
|
class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
|
|
2584
|
-
},
|
|
2540
|
+
}, Sr = { 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]" }, Cr = ["src", "alt"], wr = ["src"], Tr = ["data-kind"], Er = { class: "grid justify-items-center gap-3 px-4 text-center" }, Dr = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Or = {
|
|
2585
2541
|
key: 4,
|
|
2586
2542
|
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))]"
|
|
2587
|
-
},
|
|
2543
|
+
}, kr = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Ar = { class: "pointer-events-none absolute inset-0 z-[3]" }, jr = /* @__PURE__ */ d({
|
|
2588
2544
|
__name: "ListCard",
|
|
2589
2545
|
props: {
|
|
2590
2546
|
active: {
|
|
2591
2547
|
type: Boolean,
|
|
2592
2548
|
default: !1
|
|
2593
2549
|
},
|
|
2594
|
-
assetLoadQueue: { default: null },
|
|
2595
2550
|
index: { default: 0 },
|
|
2596
2551
|
item: {},
|
|
2597
2552
|
reportAssetError: {
|
|
@@ -2609,80 +2564,80 @@ var vr = ["aria-label"], yr = {
|
|
|
2609
2564
|
},
|
|
2610
2565
|
emits: ["open"],
|
|
2611
2566
|
setup(e, { emit: t }) {
|
|
2612
|
-
let n = e, r = t, l = i(() =>
|
|
2613
|
-
n.surfaceActive && (X(), q(), J());
|
|
2614
|
-
});
|
|
2567
|
+
let n = e, r = t, l = i(() => dr(n.item)), d = T(!1), f = T(!1), p = T(!1), m = T(l.value.kind === "fallback"), h = T(null), g = T(null), v = T(null), y = T(null), C = T(null), w = T(l.value.kind === "fallback"), E = i(() => w.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), A = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), N = i(() => l.value.kind === "video" && !!E.value), F = i(() => !!h.value), I = i(() => _t(h.value)), L = i(() => A.value && !h.value && (!w.value || !m.value)), R = null, z = null, B = /* @__PURE__ */ new Set();
|
|
2615
2568
|
P([E, () => l.value.kind], () => {
|
|
2616
2569
|
let e = l.value.kind === "fallback";
|
|
2617
2570
|
m.value = e, h.value = null, e && (w.value = !0);
|
|
2618
2571
|
}), P(A, () => {
|
|
2619
|
-
|
|
2572
|
+
G();
|
|
2620
2573
|
}), P([
|
|
2621
2574
|
d,
|
|
2622
2575
|
m,
|
|
2623
2576
|
E
|
|
2624
2577
|
], () => {
|
|
2625
|
-
|
|
2578
|
+
K();
|
|
2626
2579
|
}), P(() => n.surfaceActive, (e) => {
|
|
2627
2580
|
if (!e) {
|
|
2628
|
-
|
|
2581
|
+
J(), K();
|
|
2629
2582
|
return;
|
|
2630
2583
|
}
|
|
2631
|
-
|
|
2584
|
+
requestAnimationFrame(() => {
|
|
2585
|
+
te(), G(), K();
|
|
2586
|
+
});
|
|
2632
2587
|
}), x(() => {
|
|
2633
2588
|
if (!v.value || typeof IntersectionObserver > "u") {
|
|
2634
|
-
y.value = null, d.value = !0,
|
|
2589
|
+
y.value = null, d.value = !0, G();
|
|
2635
2590
|
return;
|
|
2636
2591
|
}
|
|
2637
|
-
y.value = v.value.closest("[data-testid=\"vibe-list-scroll\"]"),
|
|
2638
|
-
for (let t of e) t.target === v.value && (n.surfaceActive &&
|
|
2592
|
+
y.value = v.value.closest("[data-testid=\"vibe-list-scroll\"]"), R = new IntersectionObserver((e) => {
|
|
2593
|
+
for (let t of e) t.target === v.value && (n.surfaceActive && te(t), G(), K());
|
|
2639
2594
|
}, {
|
|
2640
2595
|
root: y.value,
|
|
2641
2596
|
threshold: [0, 1]
|
|
2642
2597
|
}), R.observe(v.value);
|
|
2643
2598
|
}), b(() => {
|
|
2644
|
-
|
|
2599
|
+
q(), R?.disconnect(), R = null;
|
|
2645
2600
|
});
|
|
2646
|
-
function
|
|
2647
|
-
|
|
2601
|
+
function V() {
|
|
2602
|
+
X(g.value) && (m.value = !0, h.value = null, Y(E.value ?? n.item.url), J());
|
|
2648
2603
|
}
|
|
2649
|
-
async function
|
|
2650
|
-
if (!
|
|
2604
|
+
async function H() {
|
|
2605
|
+
if (!X(g.value)) return;
|
|
2651
2606
|
let e = E.value ?? n.item.url;
|
|
2652
2607
|
m.value = !1, h.value = "generic";
|
|
2653
|
-
let t = await
|
|
2608
|
+
let t = await vt(e);
|
|
2654
2609
|
h.value = t, n.reportAssetError?.({
|
|
2655
2610
|
item: n.item,
|
|
2656
2611
|
occurrenceKey: $(n.item),
|
|
2657
2612
|
url: e,
|
|
2658
2613
|
kind: t,
|
|
2659
2614
|
surface: "grid"
|
|
2660
|
-
}),
|
|
2615
|
+
}), J();
|
|
2661
2616
|
}
|
|
2662
|
-
function
|
|
2663
|
-
|
|
2617
|
+
function U() {
|
|
2618
|
+
X(C.value) && (m.value = !0, h.value = null, Y(E.value ?? n.item.url), J(), K());
|
|
2664
2619
|
}
|
|
2665
|
-
function
|
|
2666
|
-
|
|
2620
|
+
function W() {
|
|
2621
|
+
X(C.value) && (m.value = !1);
|
|
2667
2622
|
}
|
|
2668
|
-
function
|
|
2623
|
+
function G() {
|
|
2669
2624
|
if (l.value.kind === "fallback") {
|
|
2670
|
-
|
|
2625
|
+
q(!1);
|
|
2671
2626
|
return;
|
|
2672
2627
|
}
|
|
2673
2628
|
if (!n.surfaceActive) {
|
|
2674
|
-
|
|
2629
|
+
J();
|
|
2675
2630
|
return;
|
|
2676
2631
|
}
|
|
2677
2632
|
if (!A.value) {
|
|
2678
|
-
|
|
2633
|
+
q();
|
|
2679
2634
|
return;
|
|
2680
2635
|
}
|
|
2681
2636
|
if (w.value || z) {
|
|
2682
2637
|
z?.refresh();
|
|
2683
2638
|
return;
|
|
2684
2639
|
}
|
|
2685
|
-
z =
|
|
2640
|
+
z = _r.request({
|
|
2686
2641
|
assetType: l.value.kind,
|
|
2687
2642
|
getPriority: se,
|
|
2688
2643
|
onGrant() {
|
|
@@ -2691,7 +2646,7 @@ var vr = ["aria-label"], yr = {
|
|
|
2691
2646
|
url: l.value.url ?? n.item.url
|
|
2692
2647
|
});
|
|
2693
2648
|
}
|
|
2694
|
-
function
|
|
2649
|
+
function K() {
|
|
2695
2650
|
let e = C.value;
|
|
2696
2651
|
if (!(!e || l.value.kind !== "video")) {
|
|
2697
2652
|
if (h.value) {
|
|
@@ -2699,7 +2654,7 @@ var vr = ["aria-label"], yr = {
|
|
|
2699
2654
|
return;
|
|
2700
2655
|
}
|
|
2701
2656
|
if (E.value && d.value && m.value) {
|
|
2702
|
-
e.muted = !0, e.loop = !0, e.playsInline = !0,
|
|
2657
|
+
e.muted = !0, e.loop = !0, e.playsInline = !0, xt(e);
|
|
2703
2658
|
return;
|
|
2704
2659
|
}
|
|
2705
2660
|
try {
|
|
@@ -2708,21 +2663,21 @@ var vr = ["aria-label"], yr = {
|
|
|
2708
2663
|
e.pause();
|
|
2709
2664
|
}
|
|
2710
2665
|
}
|
|
2711
|
-
function
|
|
2712
|
-
w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (
|
|
2666
|
+
function q(e = !0) {
|
|
2667
|
+
w.value = l.value.kind === "fallback", h.value = null, m.value = l.value.kind === "fallback", e && (ie(), ae()), J();
|
|
2713
2668
|
}
|
|
2714
|
-
function
|
|
2669
|
+
function J() {
|
|
2715
2670
|
z?.release(), z = null;
|
|
2716
2671
|
}
|
|
2717
|
-
function
|
|
2672
|
+
function te(e) {
|
|
2718
2673
|
let t = v.value;
|
|
2719
2674
|
if (!t) {
|
|
2720
2675
|
d.value = !0;
|
|
2721
2676
|
return;
|
|
2722
2677
|
}
|
|
2723
|
-
d.value =
|
|
2678
|
+
d.value = sr(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? y.value?.getBoundingClientRect() ?? null);
|
|
2724
2679
|
}
|
|
2725
|
-
function
|
|
2680
|
+
function Y(e) {
|
|
2726
2681
|
if (!e) return;
|
|
2727
2682
|
let t = $(n.item), r = `${t}|${e}`;
|
|
2728
2683
|
B.has(r) || (B.add(r), n.reportAssetLoad?.({
|
|
@@ -2732,18 +2687,18 @@ var vr = ["aria-label"], yr = {
|
|
|
2732
2687
|
url: e
|
|
2733
2688
|
}));
|
|
2734
2689
|
}
|
|
2735
|
-
function
|
|
2690
|
+
function ne() {
|
|
2736
2691
|
if (!I.value) return;
|
|
2737
2692
|
let e = $(n.item);
|
|
2738
2693
|
B.forEach((t) => {
|
|
2739
2694
|
t.startsWith(`${e}|`) && B.delete(t);
|
|
2740
|
-
}), h.value = null, m.value = !1, w.value = !1,
|
|
2695
|
+
}), h.value = null, m.value = !1, w.value = !1, J(), G();
|
|
2741
2696
|
}
|
|
2742
|
-
function
|
|
2743
|
-
|
|
2697
|
+
function ie() {
|
|
2698
|
+
ar(g.value);
|
|
2744
2699
|
}
|
|
2745
|
-
function
|
|
2746
|
-
|
|
2700
|
+
function ae() {
|
|
2701
|
+
or(C.value);
|
|
2747
2702
|
}
|
|
2748
2703
|
function se() {
|
|
2749
2704
|
let e = v.value;
|
|
@@ -2756,17 +2711,17 @@ var vr = ["aria-label"], yr = {
|
|
|
2756
2711
|
let n = window.innerHeight / 2;
|
|
2757
2712
|
return Math.abs((t.top + t.bottom) / 2 - n);
|
|
2758
2713
|
}
|
|
2759
|
-
function
|
|
2760
|
-
let t =
|
|
2761
|
-
return !e || !t ? !1 :
|
|
2714
|
+
function X(e) {
|
|
2715
|
+
let t = cr(E.value);
|
|
2716
|
+
return !e || !t ? !1 : cr("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
|
|
2762
2717
|
}
|
|
2763
|
-
function
|
|
2718
|
+
function ce() {
|
|
2764
2719
|
r("open");
|
|
2765
2720
|
}
|
|
2766
|
-
function
|
|
2721
|
+
function Z() {
|
|
2767
2722
|
f.value = !0;
|
|
2768
2723
|
}
|
|
2769
|
-
function
|
|
2724
|
+
function Q(e) {
|
|
2770
2725
|
let t = e.relatedTarget;
|
|
2771
2726
|
v.value && t instanceof Node && v.value.contains(t) || (f.value = !1);
|
|
2772
2727
|
}
|
|
@@ -2775,8 +2730,8 @@ var vr = ["aria-label"], yr = {
|
|
|
2775
2730
|
ref: v,
|
|
2776
2731
|
"data-testid": "vibe-list-card-inner",
|
|
2777
2732
|
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"]),
|
|
2778
|
-
onFocusin:
|
|
2779
|
-
onFocusout:
|
|
2733
|
+
onFocusin: Z,
|
|
2734
|
+
onFocusout: Q,
|
|
2780
2735
|
onPointerenter: t[0] ||= (e) => p.value = !0,
|
|
2781
2736
|
onPointerleave: t[1] ||= (e) => p.value = !1
|
|
2782
2737
|
}, [
|
|
@@ -2785,9 +2740,9 @@ var vr = ["aria-label"], yr = {
|
|
|
2785
2740
|
"data-testid": "vibe-list-card-open",
|
|
2786
2741
|
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]",
|
|
2787
2742
|
"aria-label": n.item.title || `Open item ${n.index + 1}`,
|
|
2788
|
-
onClick:
|
|
2789
|
-
}, null, 8,
|
|
2790
|
-
L.value ? (S(), s("div",
|
|
2743
|
+
onClick: ce
|
|
2744
|
+
}, null, 8, br),
|
|
2745
|
+
L.value ? (S(), s("div", xr, [c("span", Sr, [u(j(re), {
|
|
2791
2746
|
class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
|
|
2792
2747
|
"aria-hidden": "true"
|
|
2793
2748
|
})])])) : o("", !0),
|
|
@@ -2799,9 +2754,9 @@ var vr = ["aria-label"], yr = {
|
|
|
2799
2754
|
alt: l.value.label,
|
|
2800
2755
|
draggable: "false",
|
|
2801
2756
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
2802
|
-
onLoad:
|
|
2803
|
-
onError:
|
|
2804
|
-
}, null, 42,
|
|
2757
|
+
onLoad: V,
|
|
2758
|
+
onError: H
|
|
2759
|
+
}, null, 42, Cr)) : N.value && E.value && !F.value ? (S(), s("video", {
|
|
2805
2760
|
key: 2,
|
|
2806
2761
|
ref_key: "videoRef",
|
|
2807
2762
|
ref: C,
|
|
@@ -2811,67 +2766,64 @@ var vr = ["aria-label"], yr = {
|
|
|
2811
2766
|
playsinline: "",
|
|
2812
2767
|
preload: "metadata",
|
|
2813
2768
|
class: _(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
|
|
2814
|
-
onCanplay:
|
|
2815
|
-
onError:
|
|
2816
|
-
onLoadstart:
|
|
2817
|
-
onPlaying:
|
|
2818
|
-
onStalled:
|
|
2819
|
-
onWaiting:
|
|
2820
|
-
}, null, 42,
|
|
2769
|
+
onCanplay: U,
|
|
2770
|
+
onError: H,
|
|
2771
|
+
onLoadstart: W,
|
|
2772
|
+
onPlaying: U,
|
|
2773
|
+
onStalled: W,
|
|
2774
|
+
onWaiting: W
|
|
2775
|
+
}, null, 42, wr)) : F.value ? (S(), s("div", {
|
|
2821
2776
|
key: 3,
|
|
2822
2777
|
"data-testid": "vibe-list-card-error",
|
|
2823
2778
|
"data-kind": h.value,
|
|
2824
2779
|
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))]"
|
|
2825
|
-
}, [c("div",
|
|
2826
|
-
u(j(
|
|
2780
|
+
}, [c("div", Er, [
|
|
2781
|
+
u(j(oe), {
|
|
2827
2782
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
2828
2783
|
"aria-hidden": "true"
|
|
2829
2784
|
}),
|
|
2830
|
-
c("span",
|
|
2785
|
+
c("span", Dr, k(j(gt)(h.value)), 1),
|
|
2831
2786
|
I.value ? (S(), s("button", {
|
|
2832
2787
|
key: 0,
|
|
2833
2788
|
type: "button",
|
|
2834
2789
|
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",
|
|
2835
|
-
onClick: ee(
|
|
2790
|
+
onClick: ee(ne, ["stop"])
|
|
2836
2791
|
}, " Retry ")) : o("", !0)
|
|
2837
|
-
])], 8,
|
|
2838
|
-
icon: j(
|
|
2792
|
+
])], 8, Tr)) : (S(), s("div", Or, [c("div", kr, [D(e.$slots, "item-icon", {
|
|
2793
|
+
icon: j(At)(n.item.type),
|
|
2839
2794
|
item: n.item
|
|
2840
|
-
}, () => [(S(), a(O(j(
|
|
2795
|
+
}, () => [(S(), a(O(j(At)(n.item.type)), {
|
|
2841
2796
|
class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
|
|
2842
2797
|
"aria-hidden": "true"
|
|
2843
2798
|
}))])])])),
|
|
2844
|
-
c("div",
|
|
2799
|
+
c("div", Ar, [D(e.$slots, "grid-item-overlay", {
|
|
2845
2800
|
active: n.active,
|
|
2846
2801
|
focused: f.value,
|
|
2847
2802
|
hovered: p.value,
|
|
2848
2803
|
index: n.index,
|
|
2849
2804
|
item: n.item,
|
|
2850
|
-
openFullscreen:
|
|
2805
|
+
openFullscreen: ce
|
|
2851
2806
|
})])
|
|
2852
2807
|
], 34));
|
|
2853
2808
|
}
|
|
2854
|
-
}),
|
|
2809
|
+
}), Mr = { 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)]" }, Nr = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, Pr = {
|
|
2855
2810
|
"data-testid": "vibe-pagination",
|
|
2856
2811
|
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]"
|
|
2857
|
-
},
|
|
2812
|
+
}, Fr = { class: "whitespace-nowrap" }, Ir = {
|
|
2858
2813
|
key: 0,
|
|
2859
2814
|
class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
|
|
2860
|
-
},
|
|
2815
|
+
}, Lr = [
|
|
2861
2816
|
"data-active",
|
|
2862
2817
|
"data-index",
|
|
2863
2818
|
"data-item-id",
|
|
2864
2819
|
"data-occurrence-key"
|
|
2865
|
-
],
|
|
2820
|
+
], Rr = {
|
|
2866
2821
|
key: 0,
|
|
2867
2822
|
class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
|
|
2868
|
-
},
|
|
2823
|
+
}, zr = {
|
|
2869
2824
|
key: 1,
|
|
2870
2825
|
class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
|
|
2871
|
-
},
|
|
2872
|
-
key: 1,
|
|
2873
|
-
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]"
|
|
2874
|
-
}, Br = /* @__PURE__ */ d({
|
|
2826
|
+
}, Br = { class: "mx-auto flex w-full max-w-[1600px] justify-center" }, Vr = /* @__PURE__ */ d({
|
|
2875
2827
|
__name: "ListSurface",
|
|
2876
2828
|
props: {
|
|
2877
2829
|
active: {
|
|
@@ -2879,11 +2831,15 @@ var vr = ["aria-label"], yr = {
|
|
|
2879
2831
|
default: !0
|
|
2880
2832
|
},
|
|
2881
2833
|
activeIndex: { default: 0 },
|
|
2882
|
-
|
|
2834
|
+
allowExhaustedNextPageRefresh: {
|
|
2835
|
+
type: Boolean,
|
|
2836
|
+
default: !1
|
|
2837
|
+
},
|
|
2883
2838
|
commitPendingAppend: {
|
|
2884
2839
|
type: [Function, null],
|
|
2885
2840
|
default: null
|
|
2886
2841
|
},
|
|
2842
|
+
errorMessage: { default: null },
|
|
2887
2843
|
hasNextPage: {
|
|
2888
2844
|
type: Boolean,
|
|
2889
2845
|
default: !1
|
|
@@ -2899,6 +2855,7 @@ var vr = ["aria-label"], yr = {
|
|
|
2899
2855
|
},
|
|
2900
2856
|
pendingAppendItems: { default: () => [] },
|
|
2901
2857
|
paginationDetail: { default: null },
|
|
2858
|
+
phase: { default: null },
|
|
2902
2859
|
reportAssetError: {
|
|
2903
2860
|
type: [Function, null],
|
|
2904
2861
|
default: null
|
|
@@ -2915,7 +2872,6 @@ var vr = ["aria-label"], yr = {
|
|
|
2915
2872
|
type: [Function, null],
|
|
2916
2873
|
default: null
|
|
2917
2874
|
},
|
|
2918
|
-
restoreToken: {},
|
|
2919
2875
|
showStatusBadges: {
|
|
2920
2876
|
type: Boolean,
|
|
2921
2877
|
default: !0
|
|
@@ -2923,8 +2879,9 @@ var vr = ["aria-label"], yr = {
|
|
|
2923
2879
|
},
|
|
2924
2880
|
emits: ["open-fullscreen", "update:activeIndex"],
|
|
2925
2881
|
setup(e, { emit: n }) {
|
|
2926
|
-
let r = e, a = M(), d = n, f =
|
|
2882
|
+
let r = e, a = M(), d = n, f = rr({
|
|
2927
2883
|
active: A(r, "active"),
|
|
2884
|
+
allowExhaustedNextPageRefresh: A(r, "allowExhaustedNextPageRefresh"),
|
|
2928
2885
|
items: A(r, "items"),
|
|
2929
2886
|
activeIndex: A(r, "activeIndex"),
|
|
2930
2887
|
loading: A(r, "loading"),
|
|
@@ -2935,20 +2892,29 @@ var vr = ["aria-label"], yr = {
|
|
|
2935
2892
|
commitPendingAppend: A(r, "commitPendingAppend"),
|
|
2936
2893
|
requestNextPage: A(r, "requestNextPage"),
|
|
2937
2894
|
requestPreviousPage: A(r, "requestPreviousPage"),
|
|
2938
|
-
restoreToken: A(r, "restoreToken"),
|
|
2939
2895
|
setActiveIndex(e) {
|
|
2940
2896
|
d("update:activeIndex", e);
|
|
2941
2897
|
}
|
|
2942
|
-
}), p = i(() =>
|
|
2898
|
+
}), p = i(() => st({
|
|
2899
|
+
itemCount: r.items.length,
|
|
2900
|
+
loading: r.loading,
|
|
2901
|
+
phase: r.phase
|
|
2902
|
+
})), m = i(() => ct({
|
|
2903
|
+
errorMessage: r.errorMessage,
|
|
2904
|
+
hasItems: r.items.length > 0,
|
|
2905
|
+
hasNextPage: r.hasNextPage,
|
|
2906
|
+
phase: p.value,
|
|
2907
|
+
surface: "grid"
|
|
2908
|
+
})), g = i(() => !r.showStatusBadges || !m.value ? null : {
|
|
2943
2909
|
activeIndex: f.resolvedActiveIndex.value,
|
|
2944
|
-
kind:
|
|
2910
|
+
kind: m.value.kind,
|
|
2945
2911
|
loading: r.loading,
|
|
2946
|
-
message:
|
|
2912
|
+
message: m.value.message,
|
|
2947
2913
|
paginationDetail: r.paginationDetail,
|
|
2948
2914
|
total: r.items.length
|
|
2949
|
-
}),
|
|
2950
|
-
return (e, n) => (S(), s("div",
|
|
2951
|
-
c("div",
|
|
2915
|
+
}), b = i(() => !g.value || !a["grid-status"] ? [] : a["grid-status"](g.value)), x = i(() => Mt(b.value));
|
|
2916
|
+
return (e, n) => (S(), s("div", Mr, [
|
|
2917
|
+
c("div", Nr, [c("span", Pr, [c("span", Fr, k(j(f).paginationLabel.value), 1), r.paginationDetail ? (S(), s("span", Ir, k(r.paginationDetail), 1)) : o("", !0)])]),
|
|
2952
2918
|
c("div", {
|
|
2953
2919
|
ref: j(f).scrollViewportRef,
|
|
2954
2920
|
"data-testid": "vibe-list-scroll",
|
|
@@ -2968,9 +2934,8 @@ var vr = ["aria-label"], yr = {
|
|
|
2968
2934
|
"data-occurrence-key": j($)(t),
|
|
2969
2935
|
class: "absolute will-change-transform",
|
|
2970
2936
|
style: y(j(f).getCardStyle(n))
|
|
2971
|
-
}, [u(
|
|
2937
|
+
}, [u(jr, {
|
|
2972
2938
|
active: n === j(f).resolvedActiveIndex.value,
|
|
2973
|
-
"asset-load-queue": r.assetLoadQueue,
|
|
2974
2939
|
index: n,
|
|
2975
2940
|
item: t,
|
|
2976
2941
|
"report-asset-error": r.reportAssetError,
|
|
@@ -2987,56 +2952,49 @@ var vr = ["aria-label"], yr = {
|
|
|
2987
2952
|
key: "1"
|
|
2988
2953
|
} : void 0]), 1032, [
|
|
2989
2954
|
"active",
|
|
2990
|
-
"asset-load-queue",
|
|
2991
2955
|
"index",
|
|
2992
2956
|
"item",
|
|
2993
2957
|
"report-asset-error",
|
|
2994
2958
|
"report-asset-load",
|
|
2995
2959
|
"surface-active",
|
|
2996
2960
|
"onOpen"
|
|
2997
|
-
])], 12,
|
|
2998
|
-
j(f).showScrollbar.value ? (S(), s("div",
|
|
2961
|
+
])], 12, Lr))), 128))], 4)], 544),
|
|
2962
|
+
j(f).showScrollbar.value ? (S(), s("div", Rr, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
|
|
2999
2963
|
"data-testid": "vibe-list-scrollbar-thumb",
|
|
3000
2964
|
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"]),
|
|
3001
2965
|
style: y(j(f).getScrollbarThumbStyle())
|
|
3002
2966
|
}, null, 6)])) : o("", !0),
|
|
3003
|
-
a["grid-footer"] ? (S(), s("div",
|
|
3004
|
-
|
|
2967
|
+
a["grid-footer"] ? (S(), s("div", zr, [c("div", Br, [D(e.$slots, "grid-footer")])])) : o("", !0),
|
|
2968
|
+
g.value ? (S(), s("div", {
|
|
3005
2969
|
key: 2,
|
|
3006
2970
|
class: _(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", a["grid-footer"] ? "pb-24" : "pb-6"])
|
|
3007
|
-
}, [
|
|
2971
|
+
}, [x.value ? D(e.$slots, "grid-status", v(h({ key: 0 }, g.value))) : (S(), s("span", {
|
|
2972
|
+
key: 1,
|
|
2973
|
+
"data-testid": "vibe-grid-status-badge",
|
|
2974
|
+
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]", g.value.kind === "end" ? "border-amber-300/35 text-amber-200" : g.value.kind === "failed" ? "border-rose-400/45 text-rose-100" : ""])
|
|
2975
|
+
}, k(g.value.message), 3))], 2)) : o("", !0)
|
|
3008
2976
|
]));
|
|
3009
2977
|
}
|
|
3010
|
-
}),
|
|
2978
|
+
}), Hr = ["data-surface-mode"], Ur = {
|
|
3011
2979
|
key: 1,
|
|
3012
2980
|
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"
|
|
3013
|
-
},
|
|
2981
|
+
}, Wr = {
|
|
3014
2982
|
key: 2,
|
|
3015
2983
|
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"
|
|
3016
|
-
},
|
|
2984
|
+
}, Gr = ["data-visible", "inert"], Kr = ["data-visible", "inert"], qr = /* @__PURE__ */ d({
|
|
3017
2985
|
name: "VibeLayout",
|
|
3018
2986
|
__name: "Layout",
|
|
3019
2987
|
props: {
|
|
3020
|
-
items: {},
|
|
3021
|
-
activeIndex: {},
|
|
3022
2988
|
fillDelayMs: {},
|
|
3023
2989
|
fillDelayStepMs: {},
|
|
2990
|
+
initialCursor: {},
|
|
3024
2991
|
initialState: {},
|
|
3025
|
-
loading: { type: Boolean },
|
|
3026
|
-
hasNextPage: { type: Boolean },
|
|
3027
2992
|
mode: {},
|
|
3028
|
-
resolve: {},
|
|
3029
|
-
initialCursor: {},
|
|
3030
2993
|
pageSize: {},
|
|
3031
|
-
assetLoadLimits: {},
|
|
3032
|
-
hasPreviousPage: { type: Boolean },
|
|
3033
2994
|
paginationDetail: {},
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
showStatusBadges: {
|
|
3037
|
-
type: Boolean,
|
|
3038
|
-
default: !0
|
|
3039
|
-
},
|
|
2995
|
+
resolve: { type: Function },
|
|
2996
|
+
showEndBadge: { type: Boolean },
|
|
2997
|
+
showStatusBadges: { type: Boolean },
|
|
3040
2998
|
surfaceMode: {}
|
|
3041
2999
|
},
|
|
3042
3000
|
emits: [
|
|
@@ -3046,48 +3004,41 @@ var vr = ["aria-label"], yr = {
|
|
|
3046
3004
|
"update:surfaceMode"
|
|
3047
3005
|
],
|
|
3048
3006
|
setup(e, { expose: n, emit: i }) {
|
|
3049
|
-
let d = e, p = M(), m = i, h =
|
|
3007
|
+
let d = e, p = M(), m = i, h = Ve(d, m), g = se((e) => {
|
|
3050
3008
|
m("asset-errors", e);
|
|
3051
|
-
}),
|
|
3009
|
+
}), _ = X((e) => {
|
|
3052
3010
|
m("asset-loads", e);
|
|
3053
3011
|
});
|
|
3054
3012
|
return b(() => {
|
|
3055
|
-
|
|
3056
|
-
}),
|
|
3057
|
-
h.
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
status: g.status,
|
|
3068
|
-
undo: g.undo
|
|
3013
|
+
g.stop(), _.stop();
|
|
3014
|
+
}), n({
|
|
3015
|
+
cancel: h.cancel,
|
|
3016
|
+
clearRemoved: h.clearRemoved,
|
|
3017
|
+
getRemovedIds: h.getRemovedIds,
|
|
3018
|
+
loadNext: h.loadNext,
|
|
3019
|
+
loadPrevious: h.loadPrevious,
|
|
3020
|
+
remove: h.remove,
|
|
3021
|
+
restore: h.restore,
|
|
3022
|
+
retry: h.retry,
|
|
3023
|
+
status: h.status,
|
|
3024
|
+
undo: h.undo
|
|
3069
3025
|
}), (e, n) => (S(), s("section", {
|
|
3070
3026
|
"data-testid": "vibe",
|
|
3071
|
-
"data-surface-mode": j(
|
|
3027
|
+
"data-surface-mode": j(h).surfaceMode.value,
|
|
3072
3028
|
class: "relative h-full min-h-0 overflow-hidden bg-[#05060a] text-[#f7f1ea]"
|
|
3073
|
-
}, [j(
|
|
3029
|
+
}, [j(h).canRetryInitialLoad.value ? (S(), s("button", {
|
|
3074
3030
|
key: 0,
|
|
3075
3031
|
type: "button",
|
|
3076
3032
|
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",
|
|
3077
|
-
onClick: n[0] ||= (...e) => j(
|
|
3078
|
-
}, " Retry ")) : j(
|
|
3079
|
-
key: 0,
|
|
3080
|
-
canRetry: j(g).canRetryInitialLoad.value,
|
|
3081
|
-
loading: j(g).loading.value,
|
|
3082
|
-
retry: j(g).retryInitialLoad
|
|
3083
|
-
}) : j(g).loading.value ? (S(), s(t, { key: 1 }, [u(j(ne), {
|
|
3033
|
+
onClick: n[0] ||= (...e) => j(h).retryInitialLoad && j(h).retryInitialLoad(...e)
|
|
3034
|
+
}, " Retry ")) : j(h).errorMessage.value && j(h).items.value.length > 0 ? (S(), s("div", Ur, k(j(h).errorMessage.value), 1)) : o("", !0), j(h).items.value.length === 0 ? (S(), s("div", Wr, [j(h).loading.value ? (S(), s(t, { key: 0 }, [u(j(re), {
|
|
3084
3035
|
class: "size-10 animate-spin text-[#f7f1ea]/82",
|
|
3085
3036
|
"aria-hidden": "true"
|
|
3086
|
-
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)], 64)) : (S(), s(t, { key:
|
|
3037
|
+
}), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)], 64)) : (S(), s(t, { key: 1 }, [
|
|
3087
3038
|
n[2] ||= c("p", { class: "m-0 text-[0.78rem] font-bold uppercase tracking-[0.28em] text-[#f7f1ea]/68" }, " Viewer ready ", -1),
|
|
3088
3039
|
n[3] ||= c("h2", { class: "m-0 text-[clamp(2rem,4.4vw,3.6rem)] leading-[0.95] tracking-[-0.05em]" }, " No items available ", -1),
|
|
3089
3040
|
n[4] ||= c("p", { class: "m-0 text-[clamp(0.98rem,1.3vw,1.12rem)] leading-[1.8] text-[#f7f1ea]/70" }, " Attach items to VibeLayout to turn this screen into the viewer. ", -1)
|
|
3090
|
-
], 64))])) : j(
|
|
3041
|
+
], 64))])) : j(h).isDesktop.value ? (S(), s(t, { key: 3 }, [u(r, {
|
|
3091
3042
|
appear: "",
|
|
3092
3043
|
"enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
|
|
3093
3044
|
"enter-from-class": "translate-y-3 opacity-0",
|
|
@@ -3098,28 +3049,29 @@ var vr = ["aria-label"], yr = {
|
|
|
3098
3049
|
}, {
|
|
3099
3050
|
default: I(() => [L(c("div", {
|
|
3100
3051
|
"data-testid": "vibe-list-surface",
|
|
3101
|
-
"data-visible": j(
|
|
3102
|
-
inert: j(
|
|
3052
|
+
"data-visible": j(h).surfaceMode.value === "list" ? "true" : "false",
|
|
3053
|
+
inert: j(h).surfaceMode.value !== "list",
|
|
3103
3054
|
class: "absolute inset-0 z-[2]"
|
|
3104
|
-
}, [u(
|
|
3105
|
-
active: j(
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
"
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
"has-
|
|
3112
|
-
"
|
|
3113
|
-
"
|
|
3114
|
-
|
|
3115
|
-
"
|
|
3116
|
-
"
|
|
3117
|
-
"
|
|
3118
|
-
"
|
|
3119
|
-
"
|
|
3120
|
-
"
|
|
3121
|
-
|
|
3122
|
-
|
|
3055
|
+
}, [u(Vr, {
|
|
3056
|
+
active: j(h).surfaceMode.value === "list",
|
|
3057
|
+
"allow-exhausted-next-page-refresh": j(h).canRefreshExhaustedNextPage.value,
|
|
3058
|
+
items: j(h).items.value,
|
|
3059
|
+
"active-index": j(h).activeIndex.value,
|
|
3060
|
+
"error-message": j(h).errorMessage.value,
|
|
3061
|
+
loading: j(h).loading.value,
|
|
3062
|
+
"has-next-page": j(h).hasNextPage.value,
|
|
3063
|
+
"has-previous-page": j(h).hasPreviousPage.value,
|
|
3064
|
+
"pending-append-items": j(h).pendingAppendItems.value,
|
|
3065
|
+
phase: j(h).phase.value,
|
|
3066
|
+
"commit-pending-append": j(h).commitPendingAppend,
|
|
3067
|
+
"pagination-detail": j(h).paginationDetail.value,
|
|
3068
|
+
"report-asset-error": j(g).report,
|
|
3069
|
+
"report-asset-load": j(_).report,
|
|
3070
|
+
"request-next-page": j(h).prefetchNextPage,
|
|
3071
|
+
"request-previous-page": j(h).prefetchPreviousPage,
|
|
3072
|
+
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3073
|
+
onOpenFullscreen: j(h).openFullscreen,
|
|
3074
|
+
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3123
3075
|
}, l({ _: 2 }, [
|
|
3124
3076
|
p["grid-footer"] ? {
|
|
3125
3077
|
name: "grid-footer",
|
|
@@ -3131,7 +3083,7 @@ var vr = ["aria-label"], yr = {
|
|
|
3131
3083
|
fn: I((t) => [D(e.$slots, "grid-item-overlay", v(f(t)))]),
|
|
3132
3084
|
key: "1"
|
|
3133
3085
|
} : void 0,
|
|
3134
|
-
|
|
3086
|
+
p["grid-status"] ? {
|
|
3135
3087
|
name: "grid-status",
|
|
3136
3088
|
fn: I((t) => [D(e.$slots, "grid-status", v(f(t)))]),
|
|
3137
3089
|
key: "2"
|
|
@@ -3143,24 +3095,25 @@ var vr = ["aria-label"], yr = {
|
|
|
3143
3095
|
} : void 0
|
|
3144
3096
|
]), 1032, [
|
|
3145
3097
|
"active",
|
|
3098
|
+
"allow-exhausted-next-page-refresh",
|
|
3146
3099
|
"items",
|
|
3147
3100
|
"active-index",
|
|
3148
|
-
"
|
|
3101
|
+
"error-message",
|
|
3149
3102
|
"loading",
|
|
3150
3103
|
"has-next-page",
|
|
3151
3104
|
"has-previous-page",
|
|
3152
3105
|
"pending-append-items",
|
|
3106
|
+
"phase",
|
|
3153
3107
|
"commit-pending-append",
|
|
3154
3108
|
"pagination-detail",
|
|
3155
3109
|
"report-asset-error",
|
|
3156
3110
|
"report-asset-load",
|
|
3157
3111
|
"request-next-page",
|
|
3158
3112
|
"request-previous-page",
|
|
3159
|
-
"restore-token",
|
|
3160
3113
|
"show-status-badges",
|
|
3161
3114
|
"onOpenFullscreen",
|
|
3162
3115
|
"onUpdate:activeIndex"
|
|
3163
|
-
])], 8,
|
|
3116
|
+
])], 8, Gr), [[N, j(h).surfaceMode.value === "list"]])]),
|
|
3164
3117
|
_: 3
|
|
3165
3118
|
}), u(r, {
|
|
3166
3119
|
appear: "",
|
|
@@ -3173,22 +3126,25 @@ var vr = ["aria-label"], yr = {
|
|
|
3173
3126
|
}, {
|
|
3174
3127
|
default: I(() => [L(c("div", {
|
|
3175
3128
|
"data-testid": "vibe-fullscreen-surface",
|
|
3176
|
-
"data-visible": j(
|
|
3177
|
-
inert: j(
|
|
3129
|
+
"data-visible": j(h).surfaceMode.value === "fullscreen" ? "true" : "false",
|
|
3130
|
+
inert: j(h).surfaceMode.value !== "fullscreen",
|
|
3178
3131
|
class: "absolute inset-0 z-[3]"
|
|
3179
|
-
}, [u(
|
|
3180
|
-
items: j(
|
|
3181
|
-
active: j(
|
|
3182
|
-
"active-index": j(
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
"
|
|
3186
|
-
"
|
|
3187
|
-
|
|
3188
|
-
"
|
|
3189
|
-
"
|
|
3190
|
-
|
|
3191
|
-
"
|
|
3132
|
+
}, [u(gn, {
|
|
3133
|
+
items: j(h).items.value,
|
|
3134
|
+
active: j(h).surfaceMode.value === "fullscreen",
|
|
3135
|
+
"active-index": j(h).activeIndex.value,
|
|
3136
|
+
"error-message": j(h).errorMessage.value,
|
|
3137
|
+
loading: j(h).loading.value,
|
|
3138
|
+
"has-next-page": j(h).hasNextPage.value,
|
|
3139
|
+
"pagination-detail": j(h).paginationDetail.value,
|
|
3140
|
+
phase: j(h).phase.value,
|
|
3141
|
+
"report-asset-error": j(g).report,
|
|
3142
|
+
"report-asset-load": j(_).report,
|
|
3143
|
+
"show-end-badge": d.showEndBadge ?? !0,
|
|
3144
|
+
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3145
|
+
"show-back-to-list": j(h).showBackToList.value,
|
|
3146
|
+
onBackToList: j(h).returnToList,
|
|
3147
|
+
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3192
3148
|
}, l({ _: 2 }, [
|
|
3193
3149
|
p["fullscreen-overlay"] ? {
|
|
3194
3150
|
name: "fullscreen-overlay",
|
|
@@ -3205,7 +3161,7 @@ var vr = ["aria-label"], yr = {
|
|
|
3205
3161
|
fn: I((t) => [D(e.$slots, "fullscreen-header-actions", v(f(t)))]),
|
|
3206
3162
|
key: "2"
|
|
3207
3163
|
} : void 0,
|
|
3208
|
-
|
|
3164
|
+
p["fullscreen-status"] ? {
|
|
3209
3165
|
name: "fullscreen-status",
|
|
3210
3166
|
fn: I((t) => [D(e.$slots, "fullscreen-status", v(f(t)))]),
|
|
3211
3167
|
key: "3"
|
|
@@ -3219,31 +3175,37 @@ var vr = ["aria-label"], yr = {
|
|
|
3219
3175
|
"items",
|
|
3220
3176
|
"active",
|
|
3221
3177
|
"active-index",
|
|
3178
|
+
"error-message",
|
|
3222
3179
|
"loading",
|
|
3223
3180
|
"has-next-page",
|
|
3224
3181
|
"pagination-detail",
|
|
3182
|
+
"phase",
|
|
3225
3183
|
"report-asset-error",
|
|
3226
3184
|
"report-asset-load",
|
|
3227
|
-
"show-
|
|
3185
|
+
"show-end-badge",
|
|
3228
3186
|
"show-status-badges",
|
|
3187
|
+
"show-back-to-list",
|
|
3229
3188
|
"onBackToList",
|
|
3230
3189
|
"onUpdate:activeIndex"
|
|
3231
|
-
])], 8,
|
|
3190
|
+
])], 8, Kr), [[N, j(h).surfaceMode.value === "fullscreen"]])]),
|
|
3232
3191
|
_: 3
|
|
3233
|
-
})], 64)) : (S(), a(
|
|
3192
|
+
})], 64)) : (S(), a(gn, {
|
|
3234
3193
|
key: 4,
|
|
3235
|
-
items: j(
|
|
3194
|
+
items: j(h).items.value,
|
|
3236
3195
|
active: !0,
|
|
3237
|
-
"active-index": j(
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
"
|
|
3241
|
-
"
|
|
3242
|
-
|
|
3196
|
+
"active-index": j(h).activeIndex.value,
|
|
3197
|
+
"error-message": j(h).errorMessage.value,
|
|
3198
|
+
loading: j(h).loading.value,
|
|
3199
|
+
"has-next-page": j(h).hasNextPage.value,
|
|
3200
|
+
"pagination-detail": j(h).paginationDetail.value,
|
|
3201
|
+
phase: j(h).phase.value,
|
|
3202
|
+
"report-asset-error": j(g).report,
|
|
3203
|
+
"report-asset-load": j(_).report,
|
|
3204
|
+
"show-end-badge": d.showEndBadge ?? !0,
|
|
3205
|
+
"show-status-badges": d.showStatusBadges ?? !0,
|
|
3243
3206
|
"show-back-to-list": !1,
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
"onUpdate:activeIndex": j(g).setActiveIndex
|
|
3207
|
+
onBackToList: j(h).returnToList,
|
|
3208
|
+
"onUpdate:activeIndex": j(h).setActiveIndex
|
|
3247
3209
|
}, l({ _: 2 }, [
|
|
3248
3210
|
p["fullscreen-overlay"] ? {
|
|
3249
3211
|
name: "fullscreen-overlay",
|
|
@@ -3260,7 +3222,7 @@ var vr = ["aria-label"], yr = {
|
|
|
3260
3222
|
fn: I((t) => [D(e.$slots, "fullscreen-header-actions", v(f(t)))]),
|
|
3261
3223
|
key: "2"
|
|
3262
3224
|
} : void 0,
|
|
3263
|
-
|
|
3225
|
+
p["fullscreen-status"] ? {
|
|
3264
3226
|
name: "fullscreen-status",
|
|
3265
3227
|
fn: I((t) => [D(e.$slots, "fullscreen-status", v(f(t)))]),
|
|
3266
3228
|
key: "3"
|
|
@@ -3273,18 +3235,21 @@ var vr = ["aria-label"], yr = {
|
|
|
3273
3235
|
]), 1032, [
|
|
3274
3236
|
"items",
|
|
3275
3237
|
"active-index",
|
|
3238
|
+
"error-message",
|
|
3276
3239
|
"loading",
|
|
3277
3240
|
"has-next-page",
|
|
3278
3241
|
"pagination-detail",
|
|
3242
|
+
"phase",
|
|
3279
3243
|
"report-asset-error",
|
|
3280
3244
|
"report-asset-load",
|
|
3245
|
+
"show-end-badge",
|
|
3281
3246
|
"show-status-badges",
|
|
3282
3247
|
"onBackToList",
|
|
3283
3248
|
"onUpdate:activeIndex"
|
|
3284
|
-
]))], 8,
|
|
3249
|
+
]))], 8, Hr));
|
|
3285
3250
|
}
|
|
3286
|
-
}),
|
|
3287
|
-
e.component("VibeLayout",
|
|
3251
|
+
}), Jr = { install(e) {
|
|
3252
|
+
e.component("VibeLayout", qr);
|
|
3288
3253
|
} };
|
|
3289
3254
|
//#endregion
|
|
3290
|
-
export {
|
|
3255
|
+
export { qr as VibeLayout, Jr as VibePlugin, Jr as default };
|