strataplayer 1.2.10 → 1.2.12
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/dist/core/StrataCore.d.ts +2 -0
- package/dist/strataplayer.cjs.js +6 -216
- package/dist/strataplayer.cjs.js.map +1 -1
- package/dist/strataplayer.es.js +1075 -1457
- package/dist/strataplayer.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/Icons.d.ts +126 -41
- package/package.json +2 -4
package/dist/strataplayer.es.js
CHANGED
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import { jsxs as
|
|
1
|
+
var Xt = Object.defineProperty;
|
|
2
|
+
var Jt = (s, t, i) => t in s ? Xt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
|
|
3
|
+
var C = (s, t, i) => Jt(s, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
import ze, { useState as N, useEffect as P, useRef as I, useLayoutEffect as Kt, useMemo as Ce, useSyncExternalStore as Yt, useCallback as Ne } from "react";
|
|
5
|
+
import { createRoot as Zt } from "react-dom/client";
|
|
6
|
+
import { jsxs as l, jsx as e, Fragment as L } from "react/jsx-runtime";
|
|
7
|
+
import { createPortal as ei } from "react-dom";
|
|
7
8
|
class ti {
|
|
8
9
|
constructor() {
|
|
9
|
-
|
|
10
|
+
C(this, "events");
|
|
10
11
|
this.events = /* @__PURE__ */ new Map();
|
|
11
12
|
}
|
|
12
|
-
on(
|
|
13
|
-
var
|
|
14
|
-
return this.events.has(
|
|
13
|
+
on(t, i) {
|
|
14
|
+
var r;
|
|
15
|
+
return this.events.has(t) || this.events.set(t, []), (r = this.events.get(t)) == null || r.push(i), () => this.off(t, i);
|
|
15
16
|
}
|
|
16
|
-
off(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
off(t, i) {
|
|
18
|
+
const r = this.events.get(t);
|
|
19
|
+
r && this.events.set(
|
|
20
|
+
t,
|
|
21
|
+
r.filter((o) => o !== i)
|
|
21
22
|
);
|
|
22
23
|
}
|
|
23
|
-
emit(
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
emit(t, i) {
|
|
25
|
+
const r = this.events.get(t);
|
|
26
|
+
r && r.forEach((o) => o(i));
|
|
26
27
|
}
|
|
27
28
|
destroy() {
|
|
28
29
|
this.events.clear();
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
class ii {
|
|
32
|
-
constructor(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.state =
|
|
33
|
+
constructor(t) {
|
|
34
|
+
C(this, "state");
|
|
35
|
+
C(this, "listeners");
|
|
36
|
+
this.state = t, this.listeners = /* @__PURE__ */ new Set();
|
|
36
37
|
}
|
|
37
38
|
get() {
|
|
38
39
|
return this.state;
|
|
39
40
|
}
|
|
40
|
-
setState(
|
|
41
|
-
const i = this.state,
|
|
42
|
-
this.state = { ...i, ...
|
|
41
|
+
setState(t) {
|
|
42
|
+
const i = this.state, r = typeof t == "function" ? t(i) : t;
|
|
43
|
+
this.state = { ...i, ...r }, this.listeners.forEach((o) => o(this.state, i));
|
|
43
44
|
}
|
|
44
|
-
subscribe(
|
|
45
|
-
return this.listeners.add(
|
|
45
|
+
subscribe(t) {
|
|
46
|
+
return this.listeners.add(t), () => this.listeners.delete(t);
|
|
46
47
|
}
|
|
47
48
|
destroy() {
|
|
48
49
|
this.listeners.clear();
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
class si {
|
|
52
|
-
constructor(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.video =
|
|
53
|
+
constructor(t) {
|
|
54
|
+
C(this, "context", null);
|
|
55
|
+
C(this, "source", null);
|
|
56
|
+
C(this, "gainNode", null);
|
|
57
|
+
C(this, "video");
|
|
58
|
+
C(this, "isInitialized", !1);
|
|
59
|
+
this.video = t;
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
62
|
* Initialize the AudioContext. Must be called after user interaction.
|
|
@@ -70,14 +71,14 @@ class si {
|
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
setGain(
|
|
74
|
-
this.isInitialized || this.init(), this.gainNode && this.context && (this.gainNode.gain.value =
|
|
74
|
+
setGain(t) {
|
|
75
|
+
this.isInitialized || this.init(), this.gainNode && this.context && (this.gainNode.gain.value = t, this.context.state === "suspended" && this.context.resume());
|
|
75
76
|
}
|
|
76
77
|
destroy() {
|
|
77
78
|
this.context && this.context.close(), this.isInitialized = !1;
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
|
-
const
|
|
81
|
+
const Re = {
|
|
81
82
|
useNative: !1,
|
|
82
83
|
fixCapitalization: !1,
|
|
83
84
|
backgroundOpacity: 50,
|
|
@@ -88,7 +89,7 @@ const Le = {
|
|
|
88
89
|
isBold: !1,
|
|
89
90
|
textColor: "#ffffff",
|
|
90
91
|
verticalOffset: 40
|
|
91
|
-
},
|
|
92
|
+
}, yt = "strata-settings", B = {
|
|
92
93
|
isPlaying: !1,
|
|
93
94
|
isBuffering: !1,
|
|
94
95
|
isLive: !1,
|
|
@@ -105,11 +106,12 @@ const Le = {
|
|
|
105
106
|
currentAudioTrack: -1,
|
|
106
107
|
error: null,
|
|
107
108
|
isFullscreen: !1,
|
|
109
|
+
isWebFullscreen: !1,
|
|
108
110
|
isPip: !1,
|
|
109
111
|
subtitleTracks: [],
|
|
110
112
|
currentSubtitle: -1,
|
|
111
113
|
subtitleOffset: 0,
|
|
112
|
-
subtitleSettings:
|
|
114
|
+
subtitleSettings: Re,
|
|
113
115
|
activeCues: [],
|
|
114
116
|
viewMode: "normal",
|
|
115
117
|
notifications: [],
|
|
@@ -125,84 +127,84 @@ const Le = {
|
|
|
125
127
|
isAutoSized: !1,
|
|
126
128
|
isLooping: !1,
|
|
127
129
|
controlsVisible: !0
|
|
128
|
-
}, kt = (
|
|
129
|
-
let
|
|
130
|
-
if (!
|
|
130
|
+
}, kt = (s = {}) => {
|
|
131
|
+
let t = {};
|
|
132
|
+
if (!s.disablePersistence && typeof window < "u")
|
|
131
133
|
try {
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
+
const r = localStorage.getItem(yt);
|
|
135
|
+
r && (t = JSON.parse(r));
|
|
134
136
|
} catch {
|
|
135
137
|
}
|
|
136
138
|
const i = {
|
|
137
|
-
...
|
|
138
|
-
...
|
|
139
|
-
...
|
|
139
|
+
...Re,
|
|
140
|
+
...t.subtitleSettings || {},
|
|
141
|
+
...s.subtitleSettings || {}
|
|
140
142
|
};
|
|
141
143
|
return {
|
|
142
|
-
...
|
|
143
|
-
...
|
|
144
|
+
...B,
|
|
145
|
+
...t,
|
|
144
146
|
// Load saved first
|
|
145
147
|
// Override with config if present (not undefined)
|
|
146
|
-
volume:
|
|
147
|
-
isMuted:
|
|
148
|
-
playbackRate:
|
|
149
|
-
audioGain:
|
|
150
|
-
theme:
|
|
151
|
-
themeColor:
|
|
152
|
-
iconSize:
|
|
148
|
+
volume: s.volume ?? t.volume ?? B.volume,
|
|
149
|
+
isMuted: s.muted ?? t.isMuted ?? B.isMuted,
|
|
150
|
+
playbackRate: s.playbackRate ?? t.playbackRate ?? B.playbackRate,
|
|
151
|
+
audioGain: s.audioGain ?? t.audioGain ?? B.audioGain,
|
|
152
|
+
theme: s.theme ?? t.theme ?? B.theme,
|
|
153
|
+
themeColor: s.themeColor ?? t.themeColor ?? B.themeColor,
|
|
154
|
+
iconSize: s.iconSize ?? t.iconSize ?? B.iconSize,
|
|
153
155
|
subtitleSettings: i,
|
|
154
156
|
// Config overrides state for these visual modes
|
|
155
|
-
isAutoSized:
|
|
156
|
-
isLive:
|
|
157
|
-
isLooping:
|
|
157
|
+
isAutoSized: s.autoSize ?? B.isAutoSized,
|
|
158
|
+
isLive: s.isLive ?? t.isLive ?? B.isLive,
|
|
159
|
+
isLooping: s.loop ?? t.isLooping ?? B.isLooping
|
|
158
160
|
};
|
|
159
161
|
};
|
|
160
162
|
class ni {
|
|
161
|
-
constructor(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
163
|
+
constructor(t = {}, i) {
|
|
164
|
+
C(this, "video");
|
|
165
|
+
C(this, "container", null);
|
|
166
|
+
C(this, "events");
|
|
167
|
+
C(this, "store");
|
|
168
|
+
C(this, "plugins", /* @__PURE__ */ new Map());
|
|
169
|
+
C(this, "audioEngine");
|
|
170
|
+
C(this, "config");
|
|
171
|
+
C(this, "resizeObserver", null);
|
|
170
172
|
// Retry Logic
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
C(this, "retryCount", 0);
|
|
174
|
+
C(this, "maxRetries", 5);
|
|
175
|
+
C(this, "retryTimer", null);
|
|
176
|
+
C(this, "currentSource", null);
|
|
177
|
+
C(this, "currentSrc", "");
|
|
178
|
+
C(this, "currentTracks", []);
|
|
177
179
|
// Cast
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
this.config =
|
|
182
|
-
const
|
|
183
|
-
this.store = new ii(
|
|
184
|
-
const
|
|
185
|
-
if (this.store.setState({ isFullscreen:
|
|
180
|
+
C(this, "castInitialized", !1);
|
|
181
|
+
C(this, "boundCueChange");
|
|
182
|
+
C(this, "boundFullscreenChange");
|
|
183
|
+
this.config = t, this.config.autoOrientation = this.config.autoOrientation ?? !0, this.config.fetchTimeout = this.config.fetchTimeout ?? 3e4, this.config.centerControls = this.config.centerControls ?? !0, this.config.gestureSeek = this.config.gestureSeek ?? !1, this.video = i || document.createElement("video"), this.video.crossOrigin = "anonymous", t.playsInline !== !1 && (this.video.playsInline = !0), this.events = new ti();
|
|
184
|
+
const r = kt(t);
|
|
185
|
+
this.store = new ii(r), this.audioEngine = new si(this.video), this.boundCueChange = this.handleCueChange.bind(this), this.boundFullscreenChange = () => {
|
|
186
|
+
const o = !!document.fullscreenElement;
|
|
187
|
+
if (this.store.setState({ isFullscreen: o }), this.emit("resize"), this.emit(o ? "fullscreen" : "fullscreen_exit"), o && this.config.autoOrientation && screen.orientation && "lock" in screen.orientation) {
|
|
186
188
|
const m = this.video.videoWidth > this.video.videoHeight ? "landscape" : "portrait";
|
|
187
189
|
try {
|
|
188
190
|
screen.orientation.lock(m).catch(() => {
|
|
189
191
|
});
|
|
190
192
|
} catch {
|
|
191
193
|
}
|
|
192
|
-
} else !
|
|
193
|
-
}, this.video.volume =
|
|
194
|
-
const
|
|
195
|
-
volume:
|
|
196
|
-
isMuted:
|
|
197
|
-
playbackRate:
|
|
198
|
-
subtitleSettings:
|
|
199
|
-
iconSize:
|
|
200
|
-
themeColor:
|
|
201
|
-
theme:
|
|
202
|
-
isLive:
|
|
203
|
-
isLooping:
|
|
194
|
+
} else !o && screen.orientation && "unlock" in screen.orientation && screen.orientation.unlock();
|
|
195
|
+
}, this.video.volume = r.volume, this.video.muted = r.isMuted, this.video.playbackRate = r.playbackRate, this.video.loop = r.isLooping, r.audioGain > 1 && this.audioEngine.setGain(r.audioGain), r.isAutoSized && (this.video.style.objectFit = "cover"), this.initVideoListeners(), this.initMediaSession(), this.initCast(), t.disablePersistence || this.store.subscribe((o) => {
|
|
196
|
+
const d = {
|
|
197
|
+
volume: o.volume,
|
|
198
|
+
isMuted: o.isMuted,
|
|
199
|
+
playbackRate: o.playbackRate,
|
|
200
|
+
subtitleSettings: o.subtitleSettings,
|
|
201
|
+
iconSize: o.iconSize,
|
|
202
|
+
themeColor: o.themeColor,
|
|
203
|
+
theme: o.theme,
|
|
204
|
+
isLive: o.isLive,
|
|
205
|
+
isLooping: o.isLooping
|
|
204
206
|
};
|
|
205
|
-
localStorage.setItem(
|
|
207
|
+
localStorage.setItem(yt, JSON.stringify(d));
|
|
206
208
|
});
|
|
207
209
|
}
|
|
208
210
|
// --- Instance Properties ---
|
|
@@ -212,8 +214,8 @@ class ni {
|
|
|
212
214
|
get currentTime() {
|
|
213
215
|
return this.video.currentTime;
|
|
214
216
|
}
|
|
215
|
-
set currentTime(
|
|
216
|
-
this.seek(
|
|
217
|
+
set currentTime(t) {
|
|
218
|
+
this.seek(t);
|
|
217
219
|
}
|
|
218
220
|
get duration() {
|
|
219
221
|
return this.video.duration || 0;
|
|
@@ -224,46 +226,46 @@ class ni {
|
|
|
224
226
|
get volume() {
|
|
225
227
|
return this.video.volume;
|
|
226
228
|
}
|
|
227
|
-
set volume(
|
|
228
|
-
this.setVolume(
|
|
229
|
+
set volume(t) {
|
|
230
|
+
this.setVolume(t);
|
|
229
231
|
}
|
|
230
232
|
get muted() {
|
|
231
233
|
return this.video.muted;
|
|
232
234
|
}
|
|
233
|
-
set muted(
|
|
234
|
-
this.video.muted =
|
|
235
|
+
set muted(t) {
|
|
236
|
+
this.video.muted = t, this.store.setState({ isMuted: t });
|
|
235
237
|
}
|
|
236
238
|
get playbackRate() {
|
|
237
239
|
return this.video.playbackRate;
|
|
238
240
|
}
|
|
239
|
-
set playbackRate(
|
|
240
|
-
this.video.playbackRate =
|
|
241
|
+
set playbackRate(t) {
|
|
242
|
+
this.video.playbackRate = t;
|
|
241
243
|
}
|
|
242
244
|
get loop() {
|
|
243
245
|
return this.video.loop;
|
|
244
246
|
}
|
|
245
|
-
set loop(
|
|
246
|
-
this.video.loop =
|
|
247
|
+
set loop(t) {
|
|
248
|
+
this.video.loop = t, this.store.setState({ isLooping: t });
|
|
247
249
|
}
|
|
248
250
|
// --- Instance Methods ---
|
|
249
|
-
forward(
|
|
250
|
-
this.skip(
|
|
251
|
+
forward(t = 10) {
|
|
252
|
+
this.skip(t);
|
|
251
253
|
}
|
|
252
|
-
backward(
|
|
253
|
-
this.skip(-
|
|
254
|
+
backward(t = 10) {
|
|
255
|
+
this.skip(-t);
|
|
254
256
|
}
|
|
255
257
|
// --- Event API ---
|
|
256
|
-
on(
|
|
257
|
-
return this.events.on(
|
|
258
|
+
on(t, i) {
|
|
259
|
+
return this.events.on(t, i);
|
|
258
260
|
}
|
|
259
|
-
off(
|
|
260
|
-
return this.events.off(
|
|
261
|
+
off(t, i) {
|
|
262
|
+
return this.events.off(t, i);
|
|
261
263
|
}
|
|
262
|
-
emit(
|
|
263
|
-
return this.events.emit(
|
|
264
|
+
emit(t, i) {
|
|
265
|
+
return this.events.emit(t, i);
|
|
264
266
|
}
|
|
265
267
|
initVideoListeners() {
|
|
266
|
-
const
|
|
268
|
+
const t = (r) => this.store.setState(r);
|
|
267
269
|
[
|
|
268
270
|
"abort",
|
|
269
271
|
"canplay",
|
|
@@ -287,47 +289,47 @@ class ni {
|
|
|
287
289
|
"timeupdate",
|
|
288
290
|
"volumechange",
|
|
289
291
|
"waiting"
|
|
290
|
-
].forEach((
|
|
291
|
-
this.video.addEventListener(
|
|
292
|
-
switch (this.emit(`video:${
|
|
292
|
+
].forEach((r) => {
|
|
293
|
+
this.video.addEventListener(r, (o) => {
|
|
294
|
+
switch (this.emit(`video:${r}`, o), r === "play" && this.emit("play"), r === "pause" && this.emit("pause"), r === "ended" && this.emit("ended"), r === "error" && this.emit("error", this.video.error), r === "seeked" && this.emit("seek"), r) {
|
|
293
295
|
case "play":
|
|
294
|
-
|
|
296
|
+
t({ isPlaying: !0 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "playing"), this.updateMediaSessionPosition();
|
|
295
297
|
break;
|
|
296
298
|
case "pause":
|
|
297
|
-
|
|
299
|
+
t({ isPlaying: !1 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "paused");
|
|
298
300
|
break;
|
|
299
301
|
case "ended":
|
|
300
|
-
|
|
302
|
+
t({ isPlaying: !1 }), "mediaSession" in navigator && (navigator.mediaSession.playbackState = "paused");
|
|
301
303
|
break;
|
|
302
304
|
case "waiting":
|
|
303
|
-
|
|
305
|
+
t({ isBuffering: !0 }), this.emit("loading", !0);
|
|
304
306
|
break;
|
|
305
307
|
case "playing":
|
|
306
|
-
|
|
308
|
+
t({ isBuffering: !1 }), this.emit("loading", !1);
|
|
307
309
|
break;
|
|
308
310
|
case "canplay":
|
|
309
|
-
|
|
311
|
+
t({ isBuffering: !1 }), this.emit("loading", !1);
|
|
310
312
|
break;
|
|
311
313
|
case "loadeddata":
|
|
312
|
-
|
|
314
|
+
t({ isBuffering: !1 }), this.retryCount = 0, this.removeNotification("retry"), this.store.get().error && t({ error: null });
|
|
313
315
|
break;
|
|
314
316
|
case "loadedmetadata":
|
|
315
317
|
this.updateMediaSessionMetadata(), this.updateMediaSessionPosition();
|
|
316
318
|
break;
|
|
317
319
|
case "timeupdate":
|
|
318
|
-
this.video.seeking ||
|
|
320
|
+
this.video.seeking || t({ currentTime: this.video.currentTime }), this.updateMediaSessionPosition();
|
|
319
321
|
break;
|
|
320
322
|
case "seeked":
|
|
321
|
-
|
|
323
|
+
t({ currentTime: this.video.currentTime }), this.updateMediaSessionPosition();
|
|
322
324
|
break;
|
|
323
325
|
case "durationchange":
|
|
324
|
-
|
|
326
|
+
t({ duration: this.video.duration }), this.updateMediaSessionPosition();
|
|
325
327
|
break;
|
|
326
328
|
case "volumechange":
|
|
327
|
-
|
|
329
|
+
t({ volume: this.video.volume, isMuted: this.video.muted });
|
|
328
330
|
break;
|
|
329
331
|
case "ratechange":
|
|
330
|
-
|
|
332
|
+
t({ playbackRate: this.video.playbackRate }), this.updateMediaSessionPosition();
|
|
331
333
|
break;
|
|
332
334
|
case "error":
|
|
333
335
|
this.handleError();
|
|
@@ -336,156 +338,156 @@ class ni {
|
|
|
336
338
|
this.updateBuffer();
|
|
337
339
|
break;
|
|
338
340
|
case "enterpictureinpicture":
|
|
339
|
-
|
|
341
|
+
t({ isPip: !0 });
|
|
340
342
|
break;
|
|
341
343
|
case "leavepictureinpicture":
|
|
342
|
-
|
|
344
|
+
t({ isPip: !1 });
|
|
343
345
|
break;
|
|
344
346
|
}
|
|
345
347
|
});
|
|
346
348
|
}), this.video.addEventListener("enterpictureinpicture", () => {
|
|
347
|
-
|
|
349
|
+
t({ isPip: !0 }), this.emit("pip", !0);
|
|
348
350
|
}), this.video.addEventListener("leavepictureinpicture", () => {
|
|
349
|
-
|
|
351
|
+
t({ isPip: !1 }), this.emit("pip", !1);
|
|
350
352
|
}), document.addEventListener("fullscreenchange", this.boundFullscreenChange), this.video.textTracks.addEventListener("addtrack", this.updateSubtitles.bind(this)), this.video.textTracks.addEventListener("removetrack", this.updateSubtitles.bind(this));
|
|
351
353
|
}
|
|
352
354
|
// --- Media Session API ---
|
|
353
355
|
initMediaSession() {
|
|
354
356
|
if (!("mediaSession" in navigator)) return;
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
+
const t = navigator.mediaSession;
|
|
358
|
+
t.setActionHandler("play", () => this.play()), t.setActionHandler("pause", () => this.pause()), t.setActionHandler("seekbackward", (i) => this.skip(i.seekOffset ? -i.seekOffset : -10)), t.setActionHandler("seekforward", (i) => this.skip(i.seekOffset || 10)), t.setActionHandler("seekto", (i) => {
|
|
357
359
|
i.seekTime !== void 0 && this.seek(i.seekTime);
|
|
358
|
-
}),
|
|
360
|
+
}), t.setActionHandler("stop", () => {
|
|
359
361
|
this.pause(), this.seek(0);
|
|
360
|
-
}),
|
|
362
|
+
}), t.setActionHandler("previoustrack", () => {
|
|
361
363
|
const i = this.store.get().currentSourceIndex;
|
|
362
364
|
i > 0 && this.switchSource(i - 1);
|
|
363
|
-
}),
|
|
364
|
-
const i = this.store.get().currentSourceIndex,
|
|
365
|
-
i <
|
|
365
|
+
}), t.setActionHandler("nexttrack", () => {
|
|
366
|
+
const i = this.store.get().currentSourceIndex, r = this.store.get().sources.length;
|
|
367
|
+
i < r - 1 && this.switchSource(i + 1);
|
|
366
368
|
});
|
|
367
369
|
}
|
|
368
370
|
updateMediaSessionMetadata() {
|
|
369
|
-
var
|
|
371
|
+
var r, o;
|
|
370
372
|
if (!("mediaSession" in navigator)) return;
|
|
371
|
-
const
|
|
373
|
+
const t = ((r = this.currentSource) == null ? void 0 : r.name) || ((o = this.currentSource) == null ? void 0 : o.url.split("/").pop()) || "Video", i = [];
|
|
372
374
|
this.config.poster && i.push({ src: this.config.poster, sizes: "512x512", type: "image/jpeg" }), i.push({ src: "logo.png", sizes: "512x512", type: "image/png" }), navigator.mediaSession.metadata = new MediaMetadata({
|
|
373
|
-
title:
|
|
375
|
+
title: t,
|
|
374
376
|
artist: "StrataPlayer",
|
|
375
377
|
artwork: i
|
|
376
378
|
});
|
|
377
379
|
}
|
|
378
380
|
updateMediaSessionPosition() {
|
|
379
381
|
if (!("mediaSession" in navigator)) return;
|
|
380
|
-
const
|
|
381
|
-
if (!isNaN(
|
|
382
|
+
const t = this.video.duration, i = this.video.currentTime, r = this.video.playbackRate;
|
|
383
|
+
if (!isNaN(t) && isFinite(t) && !isNaN(i))
|
|
382
384
|
try {
|
|
383
385
|
navigator.mediaSession.setPositionState({
|
|
384
|
-
duration: Math.max(0,
|
|
385
|
-
playbackRate:
|
|
386
|
-
position: Math.max(0, Math.min(i,
|
|
386
|
+
duration: Math.max(0, t),
|
|
387
|
+
playbackRate: r,
|
|
388
|
+
position: Math.max(0, Math.min(i, t))
|
|
387
389
|
// Ensure within [0, duration]
|
|
388
390
|
});
|
|
389
|
-
} catch (
|
|
390
|
-
console.warn("MediaSession Position Error:",
|
|
391
|
+
} catch (o) {
|
|
392
|
+
console.warn("MediaSession Position Error:", o);
|
|
391
393
|
}
|
|
392
394
|
}
|
|
393
|
-
triggerError(
|
|
394
|
-
i ? this.handleError(
|
|
395
|
+
triggerError(t, i = !1) {
|
|
396
|
+
i ? this.handleError(t) : this.notify({ type: "warning", message: `Warning: ${t}`, duration: 5e3 });
|
|
395
397
|
}
|
|
396
|
-
handleError(
|
|
397
|
-
const i = this.video.error,
|
|
398
|
+
handleError(t) {
|
|
399
|
+
const i = this.video.error, r = t || (i == null ? void 0 : i.message) || (i ? `Code ${i.code}` : "Unknown Error");
|
|
398
400
|
if (this.removeNotification("retry"), this.emit("video:error", i), this.retryCount < this.maxRetries) {
|
|
399
401
|
this.retryCount++;
|
|
400
|
-
const
|
|
402
|
+
const o = Math.pow(2, this.retryCount - 1) * 1500;
|
|
401
403
|
this.notify({
|
|
402
404
|
id: "retry",
|
|
403
405
|
type: "loading",
|
|
404
|
-
message: `Error: ${
|
|
405
|
-
}), console.warn(`[StrataPlayer] Error: ${
|
|
406
|
+
message: `Error: ${r}. Retrying (${this.retryCount}/${this.maxRetries})...`
|
|
407
|
+
}), console.warn(`[StrataPlayer] Error: ${r}. Retrying in ${o}ms...`), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = setTimeout(() => {
|
|
406
408
|
if (this.currentSource) {
|
|
407
409
|
this.load(this.currentSource, this.currentTracks, !0);
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
+
const d = this.store.get().currentTime;
|
|
411
|
+
if (d > 0) {
|
|
410
412
|
const m = () => {
|
|
411
|
-
this.video.currentTime =
|
|
413
|
+
this.video.currentTime = d, this.video.removeEventListener("canplay", m);
|
|
412
414
|
};
|
|
413
415
|
this.video.addEventListener("canplay", m);
|
|
414
416
|
}
|
|
415
417
|
}
|
|
416
|
-
},
|
|
418
|
+
}, o);
|
|
417
419
|
} else {
|
|
418
420
|
this.removeNotification("retry");
|
|
419
|
-
const
|
|
420
|
-
this.store.setState({ error:
|
|
421
|
+
const o = `Failed to play after ${this.maxRetries} attempts: ${r}`;
|
|
422
|
+
this.store.setState({ error: o }), this.emit("error", o);
|
|
421
423
|
}
|
|
422
424
|
}
|
|
423
425
|
updateBuffer() {
|
|
424
|
-
const
|
|
426
|
+
const t = [];
|
|
425
427
|
for (let i = 0; i < this.video.buffered.length; i++)
|
|
426
|
-
|
|
428
|
+
t.push({
|
|
427
429
|
start: this.video.buffered.start(i),
|
|
428
430
|
end: this.video.buffered.end(i)
|
|
429
431
|
});
|
|
430
|
-
this.store.setState({ buffered:
|
|
432
|
+
this.store.setState({ buffered: t });
|
|
431
433
|
}
|
|
432
434
|
updateSubtitles() {
|
|
433
435
|
setTimeout(() => {
|
|
434
|
-
const
|
|
435
|
-
label:
|
|
436
|
-
language:
|
|
437
|
-
index:
|
|
436
|
+
const t = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions").map((r, o) => ({
|
|
437
|
+
label: r.label || r.language || `Track ${o + 1}`,
|
|
438
|
+
language: r.language,
|
|
439
|
+
index: o
|
|
438
440
|
}));
|
|
439
|
-
this.store.setState({ subtitleTracks:
|
|
441
|
+
this.store.setState({ subtitleTracks: t });
|
|
440
442
|
const i = this.store.get();
|
|
441
|
-
i.currentSubtitle !== -1 &&
|
|
443
|
+
i.currentSubtitle !== -1 && t.length > 0 && i.currentSubtitle < t.length && this.setSubtitle(i.currentSubtitle);
|
|
442
444
|
}, 50);
|
|
443
445
|
}
|
|
444
446
|
// --- Utility ---
|
|
445
|
-
async fetchWithRetry(
|
|
446
|
-
const
|
|
447
|
-
for (let
|
|
448
|
-
const m = new AbortController(), v = setTimeout(() => m.abort(),
|
|
447
|
+
async fetchWithRetry(t, i = 3, r) {
|
|
448
|
+
const o = r ?? this.config.fetchTimeout ?? 3e4;
|
|
449
|
+
for (let d = 0; d < i; d++) {
|
|
450
|
+
const m = new AbortController(), v = setTimeout(() => m.abort(), o);
|
|
449
451
|
try {
|
|
450
|
-
const
|
|
451
|
-
if (clearTimeout(v), !
|
|
452
|
-
return
|
|
453
|
-
} catch (
|
|
454
|
-
if (clearTimeout(v),
|
|
455
|
-
|
|
452
|
+
const w = await fetch(t, { signal: m.signal });
|
|
453
|
+
if (clearTimeout(v), !w.ok) throw new Error(`HTTP ${w.status}`);
|
|
454
|
+
return w;
|
|
455
|
+
} catch (w) {
|
|
456
|
+
if (clearTimeout(v), d === i - 1) throw w;
|
|
457
|
+
w.name === "AbortError" && console.warn(`Fetch timeout (${o}ms) for ${t}`), await new Promise((b) => setTimeout(b, 1e3 * Math.pow(2, d)));
|
|
456
458
|
}
|
|
457
459
|
}
|
|
458
460
|
throw new Error("Fetch failed");
|
|
459
461
|
}
|
|
460
462
|
// --- Core Methods ---
|
|
461
|
-
attach(
|
|
462
|
-
this.container =
|
|
463
|
-
for (const
|
|
464
|
-
this.emit("resize", { width:
|
|
463
|
+
attach(t) {
|
|
464
|
+
this.container = t, this.container.contains(this.video) || (this.video.style.width = "100%", this.video.style.height = "100%", this.video.style.objectFit = this.store.get().isAutoSized ? "cover" : "contain", this.video.style.backgroundColor = "black", this.container.appendChild(this.video)), this.resizeObserver = new ResizeObserver((i) => {
|
|
465
|
+
for (const r of i)
|
|
466
|
+
this.emit("resize", { width: r.contentRect.width, height: r.contentRect.height });
|
|
465
467
|
}), this.resizeObserver.observe(this.container), this.emit("ready");
|
|
466
468
|
}
|
|
467
|
-
use(
|
|
468
|
-
this.plugins.has(
|
|
469
|
+
use(t) {
|
|
470
|
+
this.plugins.has(t.name) || (t.init(this), this.plugins.set(t.name, t));
|
|
469
471
|
}
|
|
470
|
-
setSources(
|
|
471
|
-
this.store.setState({ sources:
|
|
472
|
+
setSources(t, i = []) {
|
|
473
|
+
this.store.setState({ sources: t }), this.currentTracks = i, t.length > 0 && this.load(t[0], i);
|
|
472
474
|
}
|
|
473
|
-
switchSource(
|
|
475
|
+
switchSource(t) {
|
|
474
476
|
const i = this.store.get().sources;
|
|
475
|
-
if (
|
|
476
|
-
const
|
|
477
|
-
this.load(i[
|
|
478
|
-
const
|
|
479
|
-
this.video.currentTime =
|
|
477
|
+
if (t >= 0 && t < i.length) {
|
|
478
|
+
const r = this.video.currentTime, o = !this.video.paused;
|
|
479
|
+
this.load(i[t], this.currentTracks);
|
|
480
|
+
const d = () => {
|
|
481
|
+
this.video.currentTime = r, o && this.video.play(), this.video.removeEventListener("canplay", d);
|
|
480
482
|
};
|
|
481
|
-
this.video.addEventListener("canplay",
|
|
483
|
+
this.video.addEventListener("canplay", d);
|
|
482
484
|
}
|
|
483
485
|
}
|
|
484
|
-
load(
|
|
486
|
+
load(t, i = [], r = !1) {
|
|
485
487
|
this.retryTimer && clearTimeout(this.retryTimer);
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
const m = this.store.get().sources.findIndex((b) => b.url ===
|
|
488
|
+
const o = typeof t == "string" ? { url: t, type: "auto" } : t;
|
|
489
|
+
r || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc = o.url, this.currentSource = o, this.currentTracks = i;
|
|
490
|
+
const m = this.store.get().sources.findIndex((b) => b.url === o.url);
|
|
489
491
|
this.store.setState({
|
|
490
492
|
isBuffering: !0,
|
|
491
493
|
qualityLevels: [],
|
|
@@ -497,44 +499,44 @@ class ni {
|
|
|
497
499
|
// subtitleTracks and currentSubtitle are purposely preserved
|
|
498
500
|
currentSourceIndex: m
|
|
499
501
|
}), this.updateMediaSessionMetadata();
|
|
500
|
-
let v =
|
|
501
|
-
v === "auto" && (
|
|
502
|
-
const
|
|
503
|
-
for (;
|
|
504
|
-
|
|
502
|
+
let v = o.type || "auto";
|
|
503
|
+
v === "auto" && (o.url.includes(".m3u8") ? v = "hls" : o.url.includes(".mpd") ? v = "dash" : o.url.includes(".flv") || o.url.includes(".ts") ? v = "mpegts" : o.url.startsWith("magnet:") || o.url.includes(".torrent") ? v = "webtorrent" : v = "mp4"), this.events.emit("load", { url: o.url, type: v });
|
|
504
|
+
const w = this.video.getElementsByTagName("track");
|
|
505
|
+
for (; w.length > 0; )
|
|
506
|
+
w[0].remove();
|
|
505
507
|
i.length > 0 && i.forEach((b) => {
|
|
506
508
|
this.fetchWithRetry(b.src).then(() => {
|
|
507
509
|
this.addTextTrackInternal(b.src, b.label, b.srcLang, b.default);
|
|
508
|
-
}).catch((
|
|
510
|
+
}).catch((h) => {
|
|
509
511
|
this.notify({ type: "warning", message: `Failed to load subtitle: ${b.label}`, duration: 4e3 });
|
|
510
512
|
});
|
|
511
|
-
}), (v === "mp4" || v === "webm" || v === "ogg") && (this.video.src =
|
|
513
|
+
}), (v === "mp4" || v === "webm" || v === "ogg") && (this.video.src = o.url);
|
|
512
514
|
}
|
|
513
515
|
// Wrapper for external subtitle API
|
|
514
|
-
loadSubtitle(
|
|
515
|
-
this.addTextTrackInternal(
|
|
516
|
-
}
|
|
517
|
-
addTextTrack(
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
var
|
|
521
|
-
if (!((
|
|
522
|
-
let
|
|
523
|
-
(
|
|
516
|
+
loadSubtitle(t, i = "Subtitle") {
|
|
517
|
+
this.addTextTrackInternal(t, i, void 0, !0);
|
|
518
|
+
}
|
|
519
|
+
addTextTrack(t, i) {
|
|
520
|
+
const r = new FileReader();
|
|
521
|
+
r.onload = (o) => {
|
|
522
|
+
var w;
|
|
523
|
+
if (!((w = o.target) != null && w.result)) return;
|
|
524
|
+
let d = o.target.result;
|
|
525
|
+
(t.name.toLowerCase().endsWith(".srt") || !d.trim().startsWith("WEBVTT")) && (d = d.replace(/(\d{2}:\d{2}:\d{2}),(\d{3})/g, "$1.$2"), d.trim().startsWith("WEBVTT") || (d = `WEBVTT
|
|
524
526
|
|
|
525
|
-
` +
|
|
526
|
-
const m = new Blob([
|
|
527
|
+
` + d));
|
|
528
|
+
const m = new Blob([d], { type: "text/vtt" }), v = URL.createObjectURL(m);
|
|
527
529
|
this.addTextTrackInternal(v, i, "user", !0), setTimeout(() => {
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
+
const h = this.store.get().subtitleTracks.findIndex((y) => y.label === i);
|
|
531
|
+
h !== -1 && (this.setSubtitle(h), this.notify({ type: "success", message: "Subtitle uploaded", duration: 3e3 }));
|
|
530
532
|
}, 200);
|
|
531
|
-
},
|
|
533
|
+
}, r.onerror = () => {
|
|
532
534
|
this.notify({ type: "error", message: "Failed to read file", duration: 3e3 });
|
|
533
|
-
},
|
|
535
|
+
}, r.readAsText(t);
|
|
534
536
|
}
|
|
535
|
-
addTextTrackInternal(
|
|
536
|
-
const
|
|
537
|
-
|
|
537
|
+
addTextTrackInternal(t, i, r = "", o = !1) {
|
|
538
|
+
const d = document.createElement("track");
|
|
539
|
+
d.kind = "subtitles", d.label = i, d.src = t, d.srclang = r, o && (d.default = !0), this.video.appendChild(d), this.updateSubtitles();
|
|
538
540
|
}
|
|
539
541
|
play() {
|
|
540
542
|
return this.video.play();
|
|
@@ -545,101 +547,108 @@ class ni {
|
|
|
545
547
|
togglePlay() {
|
|
546
548
|
this.video.paused ? this.play() : this.pause();
|
|
547
549
|
}
|
|
548
|
-
seek(
|
|
549
|
-
if (isNaN(
|
|
550
|
-
const i = Math.max(0, Math.min(
|
|
550
|
+
seek(t) {
|
|
551
|
+
if (isNaN(t)) return;
|
|
552
|
+
const i = Math.max(0, Math.min(t, this.video.duration));
|
|
551
553
|
this.store.setState({ currentTime: i }), this.video.currentTime = i;
|
|
552
554
|
}
|
|
553
|
-
skip(
|
|
554
|
-
this.seek(this.video.currentTime +
|
|
555
|
+
skip(t) {
|
|
556
|
+
this.seek(this.video.currentTime + t);
|
|
555
557
|
}
|
|
556
|
-
setVolume(
|
|
557
|
-
const i = Math.max(0, Math.min(
|
|
558
|
+
setVolume(t) {
|
|
559
|
+
const i = Math.max(0, Math.min(t, 1));
|
|
558
560
|
this.video.volume = i, i > 0 && this.video.muted && (this.video.muted = !1), i === 0 && (this.video.muted = !0);
|
|
559
561
|
}
|
|
560
562
|
toggleMute() {
|
|
561
563
|
this.video.muted = !this.video.muted;
|
|
562
564
|
}
|
|
563
|
-
setAudioGain(
|
|
564
|
-
this.store.setState({ audioGain:
|
|
565
|
+
setAudioGain(t) {
|
|
566
|
+
this.store.setState({ audioGain: t }), this.audioEngine.setGain(t);
|
|
565
567
|
}
|
|
566
|
-
setQuality(
|
|
567
|
-
this.store.setState({ currentQuality:
|
|
568
|
+
setQuality(t) {
|
|
569
|
+
this.store.setState({ currentQuality: t }), this.events.emit("quality-request", t);
|
|
568
570
|
}
|
|
569
|
-
setAudioTrack(
|
|
570
|
-
this.store.setState({ currentAudioTrack:
|
|
571
|
+
setAudioTrack(t) {
|
|
572
|
+
this.store.setState({ currentAudioTrack: t }), this.events.emit("audio-track-request", t);
|
|
571
573
|
}
|
|
572
|
-
setControlsVisible(
|
|
573
|
-
this.store.get().controlsVisible !==
|
|
574
|
+
setControlsVisible(t) {
|
|
575
|
+
this.store.get().controlsVisible !== t && (this.store.setState({ controlsVisible: t }), this.emit("control", t));
|
|
574
576
|
}
|
|
575
577
|
async toggleFullscreen() {
|
|
576
578
|
if (this.container)
|
|
577
579
|
try {
|
|
578
580
|
document.fullscreenElement ? await document.exitFullscreen() : await this.container.requestFullscreen();
|
|
579
|
-
} catch (
|
|
580
|
-
console.error("Fullscreen toggle failed",
|
|
581
|
+
} catch (t) {
|
|
582
|
+
console.error("Fullscreen toggle failed", t);
|
|
581
583
|
}
|
|
582
584
|
}
|
|
585
|
+
toggleWebFullscreen() {
|
|
586
|
+
const t = this.store.get().isWebFullscreen;
|
|
587
|
+
document.fullscreenElement && document.exitFullscreen().catch(() => {
|
|
588
|
+
});
|
|
589
|
+
const i = !t;
|
|
590
|
+
this.store.setState({ isWebFullscreen: i }), typeof document < "u" && (document.body.style.overflow = i ? "hidden" : ""), this.emit("webfullscreen", i);
|
|
591
|
+
}
|
|
583
592
|
togglePip() {
|
|
584
593
|
document.pictureInPictureElement ? document.exitPictureInPicture() : this.video !== document.pictureInPictureElement && this.video.requestPictureInPicture && this.video.requestPictureInPicture();
|
|
585
594
|
}
|
|
586
595
|
screenshot() {
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
const i =
|
|
596
|
+
const t = document.createElement("canvas");
|
|
597
|
+
t.width = this.video.videoWidth, t.height = this.video.videoHeight;
|
|
598
|
+
const i = t.getContext("2d");
|
|
590
599
|
if (i) {
|
|
591
|
-
i.drawImage(this.video, 0, 0,
|
|
600
|
+
i.drawImage(this.video, 0, 0, t.width, t.height);
|
|
592
601
|
try {
|
|
593
|
-
const
|
|
594
|
-
|
|
602
|
+
const r = t.toDataURL("image/png"), o = document.createElement("a");
|
|
603
|
+
o.download = `screenshot-${(/* @__PURE__ */ new Date()).toISOString()}.png`, o.href = r, o.click(), this.notify({ type: "success", message: "Screenshot saved", duration: 2e3 });
|
|
595
604
|
} catch {
|
|
596
605
|
this.notify({ type: "error", message: "Failed to take screenshot", duration: 3e3 });
|
|
597
606
|
}
|
|
598
607
|
}
|
|
599
608
|
}
|
|
600
609
|
toggleLock() {
|
|
601
|
-
this.store.setState((
|
|
610
|
+
this.store.setState((t) => ({ isLocked: !t.isLocked }));
|
|
602
611
|
}
|
|
603
612
|
toggleLoop() {
|
|
604
613
|
this.video.loop = !this.video.loop, this.store.setState({ isLooping: this.video.loop }), this.notify({ type: "info", message: `Loop: ${this.video.loop ? "On" : "Off"}`, duration: 1500 });
|
|
605
614
|
}
|
|
606
|
-
setFlip(
|
|
607
|
-
const i = this.store.get().flipState,
|
|
615
|
+
setFlip(t) {
|
|
616
|
+
const i = this.store.get().flipState, r = {
|
|
608
617
|
...i,
|
|
609
|
-
[
|
|
618
|
+
[t]: !i[t]
|
|
610
619
|
};
|
|
611
|
-
this.store.setState({ flipState:
|
|
612
|
-
const
|
|
613
|
-
this.video.style.transform = `scale(${
|
|
620
|
+
this.store.setState({ flipState: r });
|
|
621
|
+
const o = r.horizontal ? -1 : 1, d = r.vertical ? -1 : 1;
|
|
622
|
+
this.video.style.transform = `scale(${o}, ${d})`;
|
|
614
623
|
}
|
|
615
|
-
setAspectRatio(
|
|
616
|
-
if (this.store.setState({ aspectRatio:
|
|
624
|
+
setAspectRatio(t) {
|
|
625
|
+
if (this.store.setState({ aspectRatio: t }), t === "default") {
|
|
617
626
|
this.video.style.objectFit = this.store.get().isAutoSized ? "cover" : "contain", this.video.style.width = "100%", this.video.style.height = "100%";
|
|
618
627
|
return;
|
|
619
628
|
}
|
|
620
|
-
this.video.style.objectFit = "contain", this.notify({ type: "info", message: `Aspect Ratio: ${
|
|
629
|
+
this.video.style.objectFit = "contain", this.notify({ type: "info", message: `Aspect Ratio: ${t} (CSS support limited)`, duration: 2e3 });
|
|
621
630
|
}
|
|
622
631
|
initCast() {
|
|
623
|
-
const
|
|
632
|
+
const t = window, i = () => {
|
|
624
633
|
if (!this.castInitialized)
|
|
625
634
|
try {
|
|
626
|
-
|
|
627
|
-
receiverApplicationId:
|
|
628
|
-
autoJoinPolicy:
|
|
635
|
+
t.cast && t.cast.framework && t.chrome && t.chrome.cast && (t.cast.framework.CastContext.getInstance().setOptions({
|
|
636
|
+
receiverApplicationId: t.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
|
|
637
|
+
autoJoinPolicy: t.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED
|
|
629
638
|
}), this.castInitialized = !0);
|
|
630
|
-
} catch (
|
|
631
|
-
console.warn("Cast Init Error or already initialized",
|
|
639
|
+
} catch (r) {
|
|
640
|
+
console.warn("Cast Init Error or already initialized", r);
|
|
632
641
|
}
|
|
633
642
|
};
|
|
634
|
-
|
|
635
|
-
|
|
643
|
+
t.cast && t.cast.framework ? i() : t.__onGCastApiAvailable = (r) => {
|
|
644
|
+
r && i();
|
|
636
645
|
};
|
|
637
646
|
}
|
|
638
647
|
requestCast() {
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
648
|
+
const t = window;
|
|
649
|
+
if (t.cast && t.cast.framework)
|
|
641
650
|
try {
|
|
642
|
-
this.castInitialized || this.initCast(),
|
|
651
|
+
this.castInitialized || this.initCast(), t.cast.framework.CastContext.getInstance().requestSession().then(() => {
|
|
643
652
|
this.loadMediaToCast();
|
|
644
653
|
}).catch((i) => {
|
|
645
654
|
i !== "cancel" && this.notify({ type: "error", message: "Cast failed: " + i, duration: 3e3 });
|
|
@@ -651,733 +660,339 @@ class ni {
|
|
|
651
660
|
this.notify({ type: "warning", message: "Cast API not loaded", duration: 3e3 });
|
|
652
661
|
}
|
|
653
662
|
loadMediaToCast() {
|
|
654
|
-
const
|
|
663
|
+
const t = window;
|
|
655
664
|
try {
|
|
656
|
-
const i =
|
|
665
|
+
const i = t.cast.framework.CastContext.getInstance().getCurrentSession();
|
|
657
666
|
if (!i) return;
|
|
658
|
-
const
|
|
659
|
-
i.loadMedia(
|
|
667
|
+
const r = new t.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"), o = new t.chrome.cast.media.LoadRequest(r);
|
|
668
|
+
i.loadMedia(o).then(() => {
|
|
660
669
|
this.notify({ type: "success", message: "Casting...", duration: 3e3 });
|
|
661
|
-
}).catch((
|
|
670
|
+
}).catch((d) => console.error("Cast load error", d));
|
|
662
671
|
} catch (i) {
|
|
663
672
|
console.error("Failed to load media into Cast session", i);
|
|
664
673
|
}
|
|
665
674
|
}
|
|
666
675
|
handleCueChange() {
|
|
667
|
-
const
|
|
668
|
-
if (
|
|
676
|
+
const t = this.store.get();
|
|
677
|
+
if (t.currentSubtitle === -1) {
|
|
669
678
|
this.store.setState({ activeCues: [] });
|
|
670
679
|
return;
|
|
671
680
|
}
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
const
|
|
675
|
-
this.store.setState({ activeCues:
|
|
681
|
+
const r = Array.from(this.video.textTracks).filter((o) => o.kind === "subtitles" || o.kind === "captions")[t.currentSubtitle];
|
|
682
|
+
if (r && r.activeCues) {
|
|
683
|
+
const o = Array.from(r.activeCues).map((d) => d.text);
|
|
684
|
+
this.store.setState({ activeCues: o });
|
|
676
685
|
} else
|
|
677
686
|
this.store.setState({ activeCues: [] });
|
|
678
687
|
}
|
|
679
|
-
setSubtitle(
|
|
688
|
+
setSubtitle(t) {
|
|
680
689
|
if (Array.from(this.video.textTracks).forEach((i) => {
|
|
681
690
|
i.removeEventListener("cuechange", this.boundCueChange), i.mode = "hidden";
|
|
682
|
-
}), this.store.setState({ currentSubtitle:
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
685
|
-
const
|
|
686
|
-
|
|
691
|
+
}), this.store.setState({ currentSubtitle: t, subtitleOffset: 0, activeCues: [] }), t !== -1) {
|
|
692
|
+
const r = Array.from(this.video.textTracks).filter((o) => o.kind === "subtitles" || o.kind === "captions")[t];
|
|
693
|
+
if (r) {
|
|
694
|
+
const o = this.store.get().subtitleSettings;
|
|
695
|
+
r.mode = o.useNative ? "showing" : "hidden", r.addEventListener("cuechange", this.boundCueChange), this.handleCueChange();
|
|
687
696
|
}
|
|
688
697
|
}
|
|
689
698
|
}
|
|
690
|
-
updateSubtitleSettings(
|
|
691
|
-
const
|
|
692
|
-
this.store.setState({ subtitleSettings:
|
|
699
|
+
updateSubtitleSettings(t) {
|
|
700
|
+
const r = { ...this.store.get().subtitleSettings, ...t };
|
|
701
|
+
this.store.setState({ subtitleSettings: r }), t.useNative !== void 0 && this.setSubtitle(this.store.get().currentSubtitle);
|
|
693
702
|
}
|
|
694
703
|
resetSubtitleSettings() {
|
|
695
|
-
this.store.setState({ subtitleSettings:
|
|
704
|
+
this.store.setState({ subtitleSettings: Re }), this.setSubtitle(this.store.get().currentSubtitle);
|
|
696
705
|
}
|
|
697
|
-
setSubtitleOffset(
|
|
698
|
-
const i = this.store.get().subtitleOffset,
|
|
699
|
-
Math.abs(
|
|
700
|
-
(
|
|
701
|
-
|
|
706
|
+
setSubtitleOffset(t) {
|
|
707
|
+
const i = this.store.get().subtitleOffset, r = t - i;
|
|
708
|
+
Math.abs(r) < 1e-3 || (Array.from(this.video.textTracks).forEach((o) => {
|
|
709
|
+
(o.mode === "showing" || o.mode === "hidden") && o.cues && Array.from(o.cues).forEach((d) => {
|
|
710
|
+
d.startTime += r, d.endTime += r;
|
|
702
711
|
});
|
|
703
|
-
}), this.store.setState({ subtitleOffset:
|
|
712
|
+
}), this.store.setState({ subtitleOffset: t }), this.notify({ type: "info", message: `Subtitle Offset: ${t > 0 ? "+" : ""}${t.toFixed(1)}s`, duration: 1500 }));
|
|
704
713
|
}
|
|
705
714
|
async download() {
|
|
706
|
-
var
|
|
715
|
+
var r;
|
|
707
716
|
if (!this.video.src) return;
|
|
708
|
-
const
|
|
709
|
-
if (
|
|
717
|
+
const t = this.video.src;
|
|
718
|
+
if (t.includes("blob:") || t.includes(".m3u8")) {
|
|
710
719
|
this.notify({ type: "warning", message: "Stream download not supported in browser.", duration: 4e3 });
|
|
711
720
|
return;
|
|
712
721
|
}
|
|
713
722
|
const i = this.notify({ type: "loading", message: "Preparing download...", progress: 0 });
|
|
714
723
|
try {
|
|
715
|
-
const
|
|
716
|
-
if (!
|
|
717
|
-
const
|
|
718
|
-
let
|
|
724
|
+
const o = await this.fetchWithRetry(t);
|
|
725
|
+
if (!o.body) throw new Error("No body");
|
|
726
|
+
const d = o.body.getReader(), m = o.headers.get("Content-Length"), v = m ? parseInt(m, 10) : 0;
|
|
727
|
+
let w = 0;
|
|
719
728
|
const b = [];
|
|
720
729
|
for (; ; ) {
|
|
721
|
-
const { done:
|
|
722
|
-
if (
|
|
723
|
-
if (b.push(R),
|
|
724
|
-
const p = Math.round(
|
|
730
|
+
const { done: z, value: R } = await d.read();
|
|
731
|
+
if (z) break;
|
|
732
|
+
if (b.push(R), w += R.length, v) {
|
|
733
|
+
const p = Math.round(w / v * 100);
|
|
725
734
|
this.notify({ id: i, type: "loading", message: `Downloading... ${p}%`, progress: p });
|
|
726
735
|
}
|
|
727
736
|
}
|
|
728
|
-
const
|
|
729
|
-
k.style.display = "none", k.href =
|
|
737
|
+
const h = new Blob(b), y = window.URL.createObjectURL(h), k = document.createElement("a");
|
|
738
|
+
k.style.display = "none", k.href = y, k.download = ((r = t.split("/").pop()) == null ? void 0 : r.split("?")[0]) || "video.mp4", document.body.appendChild(k), k.click(), window.URL.revokeObjectURL(y), document.body.removeChild(k), this.notify({ id: i, type: "success", message: "Saved!", duration: 3e3 });
|
|
730
739
|
} catch {
|
|
731
|
-
this.notify({ id: i, type: "error", message: "Download failed.", duration: 4e3 }), window.open(
|
|
740
|
+
this.notify({ id: i, type: "error", message: "Download failed.", duration: 4e3 }), window.open(t, "_blank");
|
|
732
741
|
}
|
|
733
742
|
}
|
|
734
|
-
notify(
|
|
735
|
-
const i =
|
|
736
|
-
return this.store.setState({ notifications: [
|
|
743
|
+
notify(t) {
|
|
744
|
+
const i = t.id || Math.random().toString(36).substr(2, 9), r = { ...t, id: i };
|
|
745
|
+
return this.store.setState({ notifications: [r] }), t.duration && setTimeout(() => this.removeNotification(i), t.duration), i;
|
|
737
746
|
}
|
|
738
|
-
removeNotification(
|
|
747
|
+
removeNotification(t) {
|
|
739
748
|
const i = this.store.get().notifications;
|
|
740
|
-
this.store.setState({ notifications: i.filter((
|
|
749
|
+
this.store.setState({ notifications: i.filter((r) => r.id !== t) });
|
|
741
750
|
}
|
|
742
|
-
setAppearance(
|
|
751
|
+
setAppearance(t) {
|
|
743
752
|
this.store.setState((i) => ({
|
|
744
753
|
...i,
|
|
745
|
-
...
|
|
754
|
+
...t
|
|
746
755
|
}));
|
|
747
756
|
}
|
|
748
757
|
destroy() {
|
|
749
|
-
this.retryTimer && clearTimeout(this.retryTimer), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), document.removeEventListener("fullscreenchange", this.boundFullscreenChange), this.video.pause(), this.video.src = "";
|
|
750
|
-
const
|
|
751
|
-
for (;
|
|
758
|
+
this.retryTimer && clearTimeout(this.retryTimer), this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.store.get().isWebFullscreen && typeof document < "u" && (document.body.style.overflow = ""), document.removeEventListener("fullscreenchange", this.boundFullscreenChange), this.video.pause(), this.video.src = "";
|
|
759
|
+
const t = this.video.getElementsByTagName("track");
|
|
760
|
+
for (; t.length > 0; ) t[0].remove();
|
|
752
761
|
this.emit("destroy"), this.events.destroy(), this.store.destroy(), this.plugins.forEach((i) => i.destroy && i.destroy()), this.plugins.clear(), this.video.remove(), this.audioEngine.destroy();
|
|
753
762
|
}
|
|
754
763
|
}
|
|
755
|
-
const
|
|
756
|
-
if (isNaN(
|
|
757
|
-
const
|
|
758
|
-
return
|
|
759
|
-
}, ri = async (
|
|
760
|
-
for (let
|
|
761
|
-
const
|
|
764
|
+
const Te = (s) => {
|
|
765
|
+
if (isNaN(s)) return "00:00";
|
|
766
|
+
const t = Math.floor(s / 3600), i = Math.floor(s % 3600 / 60), r = Math.floor(s % 60);
|
|
767
|
+
return t > 0 ? `${t}:${i.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${i}:${r.toString().padStart(2, "0")}`;
|
|
768
|
+
}, ri = async (s, t = 3, i = 2e4) => {
|
|
769
|
+
for (let r = 0; r < t; r++) {
|
|
770
|
+
const o = new AbortController(), d = setTimeout(() => o.abort(), i);
|
|
762
771
|
try {
|
|
763
|
-
const m = await fetch(
|
|
764
|
-
if (clearTimeout(
|
|
772
|
+
const m = await fetch(s, { signal: o.signal });
|
|
773
|
+
if (clearTimeout(d), !m.ok) throw new Error(`HTTP ${m.status}`);
|
|
765
774
|
return await m.text();
|
|
766
775
|
} catch (m) {
|
|
767
|
-
if (clearTimeout(
|
|
776
|
+
if (clearTimeout(d), r === t - 1) throw m;
|
|
768
777
|
await new Promise((v) => setTimeout(v, 1e3));
|
|
769
778
|
}
|
|
770
779
|
}
|
|
771
780
|
throw new Error("Failed");
|
|
772
|
-
},
|
|
781
|
+
}, oi = async (s, t, i = 2e4) => {
|
|
773
782
|
try {
|
|
774
|
-
const
|
|
775
|
-
`),
|
|
783
|
+
const o = (await ri(s, 3, i)).split(`
|
|
784
|
+
`), d = [];
|
|
776
785
|
let m = null, v = null;
|
|
777
|
-
const
|
|
778
|
-
const
|
|
786
|
+
const w = s.substring(0, s.lastIndexOf("/") + 1), b = (h) => {
|
|
787
|
+
const y = h.split(":");
|
|
779
788
|
let k = 0;
|
|
780
|
-
return
|
|
789
|
+
return y.length === 3 ? (k += parseFloat(y[0]) * 3600, k += parseFloat(y[1]) * 60, k += parseFloat(y[2])) : (k += parseFloat(y[0]) * 60, k += parseFloat(y[1])), k;
|
|
781
790
|
};
|
|
782
|
-
for (let
|
|
783
|
-
if (
|
|
784
|
-
const
|
|
785
|
-
m = b(
|
|
786
|
-
} else if (m !== null && v !== null &&
|
|
787
|
-
let [
|
|
788
|
-
!
|
|
789
|
-
let
|
|
791
|
+
for (let h of o)
|
|
792
|
+
if (h = h.trim(), h.includes("-->")) {
|
|
793
|
+
const y = h.split("-->");
|
|
794
|
+
m = b(y[0].trim()), v = b(y[1].trim());
|
|
795
|
+
} else if (m !== null && v !== null && h.length > 0) {
|
|
796
|
+
let [y, k] = h.split("#");
|
|
797
|
+
!y.match(/^https?:\/\//) && !y.startsWith("data:") && (y = w + y);
|
|
798
|
+
let z = 0, R = 0, p = 0, W = 0;
|
|
790
799
|
if (k && k.startsWith("xywh=")) {
|
|
791
|
-
const
|
|
792
|
-
|
|
800
|
+
const D = k.replace("xywh=", "").split(",");
|
|
801
|
+
D.length === 4 && (z = parseInt(D[0]), R = parseInt(D[1]), p = parseInt(D[2]), W = parseInt(D[3]));
|
|
793
802
|
}
|
|
794
|
-
p > 0 &&
|
|
803
|
+
p > 0 && W > 0 && d.push({ start: m, end: v, url: y, x: z, y: R, w: p, h: W }), m = null, v = null;
|
|
795
804
|
}
|
|
796
|
-
return
|
|
805
|
+
return d;
|
|
797
806
|
} catch {
|
|
798
|
-
return
|
|
807
|
+
return t({ type: "warning", message: "Failed to load thumbnails", duration: 4e3 }), [];
|
|
799
808
|
}
|
|
800
|
-
},
|
|
801
|
-
const [i,
|
|
802
|
-
return
|
|
803
|
-
if (
|
|
804
|
-
|
|
809
|
+
}, ht = (s, t = 200) => {
|
|
810
|
+
const [i, r] = N(s), [o, d] = N(!1);
|
|
811
|
+
return P(() => {
|
|
812
|
+
if (s)
|
|
813
|
+
r(!0), requestAnimationFrame(() => {
|
|
805
814
|
requestAnimationFrame(() => {
|
|
806
|
-
|
|
815
|
+
d(!0);
|
|
807
816
|
});
|
|
808
817
|
});
|
|
809
818
|
else {
|
|
810
|
-
|
|
819
|
+
d(!1);
|
|
811
820
|
const m = setTimeout(() => {
|
|
812
|
-
|
|
813
|
-
},
|
|
821
|
+
r(!1);
|
|
822
|
+
}, t);
|
|
814
823
|
return () => clearTimeout(m);
|
|
815
824
|
}
|
|
816
|
-
}, [
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
*/
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
*/
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
)
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
*/
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
*/
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
*/
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
*/
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
])
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
*/
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
*/
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
])
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
*
|
|
967
|
-
* This source code is licensed under the ISC license.
|
|
968
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
969
|
-
*/
|
|
970
|
-
const bi = y("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
971
|
-
/**
|
|
972
|
-
* @license lucide-react v0.462.0 - ISC
|
|
973
|
-
*
|
|
974
|
-
* This source code is licensed under the ISC license.
|
|
975
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
976
|
-
*/
|
|
977
|
-
const vi = y("Clock", [
|
|
978
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
979
|
-
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
|
|
980
|
-
]);
|
|
981
|
-
/**
|
|
982
|
-
* @license lucide-react v0.462.0 - ISC
|
|
983
|
-
*
|
|
984
|
-
* This source code is licensed under the ISC license.
|
|
985
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
986
|
-
*/
|
|
987
|
-
const gi = y("Download", [
|
|
988
|
-
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
989
|
-
["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
|
|
990
|
-
["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
|
|
991
|
-
]);
|
|
992
|
-
/**
|
|
993
|
-
* @license lucide-react v0.462.0 - ISC
|
|
994
|
-
*
|
|
995
|
-
* This source code is licensed under the ISC license.
|
|
996
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
997
|
-
*/
|
|
998
|
-
const xi = y("Droplet", [
|
|
999
|
-
[
|
|
1000
|
-
"path",
|
|
1001
|
-
{
|
|
1002
|
-
d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",
|
|
1003
|
-
key: "c7niix"
|
|
1004
|
-
}
|
|
1005
|
-
]
|
|
1006
|
-
]);
|
|
1007
|
-
/**
|
|
1008
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1009
|
-
*
|
|
1010
|
-
* This source code is licensed under the ISC license.
|
|
1011
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1012
|
-
*/
|
|
1013
|
-
const yi = y("Eye", [
|
|
1014
|
-
[
|
|
1015
|
-
"path",
|
|
1016
|
-
{
|
|
1017
|
-
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
1018
|
-
key: "1nclc0"
|
|
1019
|
-
}
|
|
1020
|
-
],
|
|
1021
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
1022
|
-
]);
|
|
1023
|
-
/**
|
|
1024
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1025
|
-
*
|
|
1026
|
-
* This source code is licensed under the ISC license.
|
|
1027
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1028
|
-
*/
|
|
1029
|
-
const wi = y("Info", [
|
|
1030
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1031
|
-
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
1032
|
-
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
1033
|
-
]);
|
|
1034
|
-
/**
|
|
1035
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1036
|
-
*
|
|
1037
|
-
* This source code is licensed under the ISC license.
|
|
1038
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1039
|
-
*/
|
|
1040
|
-
const ki = y("LoaderCircle", [
|
|
1041
|
-
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
1042
|
-
]);
|
|
1043
|
-
/**
|
|
1044
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1045
|
-
*
|
|
1046
|
-
* This source code is licensed under the ISC license.
|
|
1047
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1048
|
-
*/
|
|
1049
|
-
const Si = y("LockOpen", [
|
|
1050
|
-
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
1051
|
-
["path", { d: "M7 11V7a5 5 0 0 1 9.9-1", key: "1mm8w8" }]
|
|
1052
|
-
]);
|
|
1053
|
-
/**
|
|
1054
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1055
|
-
*
|
|
1056
|
-
* This source code is licensed under the ISC license.
|
|
1057
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1058
|
-
*/
|
|
1059
|
-
const Ci = y("Lock", [
|
|
1060
|
-
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
1061
|
-
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
1062
|
-
]);
|
|
1063
|
-
/**
|
|
1064
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1065
|
-
*
|
|
1066
|
-
* This source code is licensed under the ISC license.
|
|
1067
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1068
|
-
*/
|
|
1069
|
-
const Ni = y("Maximize", [
|
|
1070
|
-
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
1071
|
-
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
1072
|
-
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
1073
|
-
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
1074
|
-
]);
|
|
1075
|
-
/**
|
|
1076
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1077
|
-
*
|
|
1078
|
-
* This source code is licensed under the ISC license.
|
|
1079
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1080
|
-
*/
|
|
1081
|
-
const zi = y("Minimize", [
|
|
1082
|
-
["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
|
|
1083
|
-
["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
|
|
1084
|
-
["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
|
|
1085
|
-
["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
|
|
1086
|
-
]);
|
|
1087
|
-
/**
|
|
1088
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1089
|
-
*
|
|
1090
|
-
* This source code is licensed under the ISC license.
|
|
1091
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1092
|
-
*/
|
|
1093
|
-
const Mi = y("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
|
|
1094
|
-
/**
|
|
1095
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1096
|
-
*
|
|
1097
|
-
* This source code is licensed under the ISC license.
|
|
1098
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1099
|
-
*/
|
|
1100
|
-
const Ti = y("Monitor", [
|
|
1101
|
-
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
1102
|
-
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
1103
|
-
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
1104
|
-
]);
|
|
1105
|
-
/**
|
|
1106
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1107
|
-
*
|
|
1108
|
-
* This source code is licensed under the ISC license.
|
|
1109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1110
|
-
*/
|
|
1111
|
-
const Ii = y("MoveVertical", [
|
|
1112
|
-
["path", { d: "M12 2v20", key: "t6zp3m" }],
|
|
1113
|
-
["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
|
|
1114
|
-
["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
|
|
1115
|
-
]);
|
|
1116
|
-
/**
|
|
1117
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1118
|
-
*
|
|
1119
|
-
* This source code is licensed under the ISC license.
|
|
1120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1121
|
-
*/
|
|
1122
|
-
const Ri = y("Palette", [
|
|
1123
|
-
["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
|
|
1124
|
-
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
1125
|
-
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }],
|
|
1126
|
-
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
1127
|
-
[
|
|
1128
|
-
"path",
|
|
1129
|
-
{
|
|
1130
|
-
d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",
|
|
1131
|
-
key: "12rzf8"
|
|
1132
|
-
}
|
|
1133
|
-
]
|
|
1134
|
-
]);
|
|
1135
|
-
/**
|
|
1136
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1137
|
-
*
|
|
1138
|
-
* This source code is licensed under the ISC license.
|
|
1139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1140
|
-
*/
|
|
1141
|
-
const Li = y("Pause", [
|
|
1142
|
-
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
1143
|
-
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
1144
|
-
]);
|
|
1145
|
-
/**
|
|
1146
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1147
|
-
*
|
|
1148
|
-
* This source code is licensed under the ISC license.
|
|
1149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1150
|
-
*/
|
|
1151
|
-
const $i = y("PictureInPicture", [
|
|
1152
|
-
[
|
|
1153
|
-
"path",
|
|
1154
|
-
{
|
|
1155
|
-
d: "M8 4.5v5H3m-1-6 6 6m13 0v-3c0-1.16-.84-2-2-2h-7m-9 9v2c0 1.05.95 2 2 2h3",
|
|
1156
|
-
key: "bcd8fb"
|
|
1157
|
-
}
|
|
1158
|
-
],
|
|
1159
|
-
["rect", { width: "10", height: "7", x: "12", y: "13.5", ry: "2", key: "136fx3" }]
|
|
1160
|
-
]);
|
|
1161
|
-
/**
|
|
1162
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1163
|
-
*
|
|
1164
|
-
* This source code is licensed under the ISC license.
|
|
1165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1166
|
-
*/
|
|
1167
|
-
const Pi = y("Play", [
|
|
1168
|
-
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
1169
|
-
]);
|
|
1170
|
-
/**
|
|
1171
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1172
|
-
*
|
|
1173
|
-
* This source code is licensed under the ISC license.
|
|
1174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1175
|
-
*/
|
|
1176
|
-
const Ei = y("Plus", [
|
|
1177
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
1178
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
1179
|
-
]);
|
|
1180
|
-
/**
|
|
1181
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1182
|
-
*
|
|
1183
|
-
* This source code is licensed under the ISC license.
|
|
1184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1185
|
-
*/
|
|
1186
|
-
const Ai = y("RefreshCcw", [
|
|
1187
|
-
["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
|
|
1188
|
-
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
|
|
1189
|
-
["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
|
|
1190
|
-
["path", { d: "M16 16h5v5", key: "ccwih5" }]
|
|
1191
|
-
]);
|
|
1192
|
-
/**
|
|
1193
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1194
|
-
*
|
|
1195
|
-
* This source code is licensed under the ISC license.
|
|
1196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1197
|
-
*/
|
|
1198
|
-
const Bi = y("RotateCcw", [
|
|
1199
|
-
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
1200
|
-
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
1201
|
-
]);
|
|
1202
|
-
/**
|
|
1203
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1204
|
-
*
|
|
1205
|
-
* This source code is licensed under the ISC license.
|
|
1206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1207
|
-
*/
|
|
1208
|
-
const Vi = y("RotateCw", [
|
|
1209
|
-
["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
|
|
1210
|
-
["path", { d: "M21 3v5h-5", key: "1q7to0" }]
|
|
1211
|
-
]);
|
|
1212
|
-
/**
|
|
1213
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1214
|
-
*
|
|
1215
|
-
* This source code is licensed under the ISC license.
|
|
1216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1217
|
-
*/
|
|
1218
|
-
const Fi = y("Settings", [
|
|
1219
|
-
[
|
|
1220
|
-
"path",
|
|
1221
|
-
{
|
|
1222
|
-
d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
|
|
1223
|
-
key: "1qme2f"
|
|
1224
|
-
}
|
|
1225
|
-
],
|
|
1226
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
1227
|
-
]);
|
|
1228
|
-
/**
|
|
1229
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1230
|
-
*
|
|
1231
|
-
* This source code is licensed under the ISC license.
|
|
1232
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1233
|
-
*/
|
|
1234
|
-
const Oi = y("SlidersHorizontal", [
|
|
1235
|
-
["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
|
|
1236
|
-
["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
|
|
1237
|
-
["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
|
|
1238
|
-
["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
|
|
1239
|
-
["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
|
|
1240
|
-
["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
|
|
1241
|
-
["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
|
|
1242
|
-
["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
|
|
1243
|
-
["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
|
|
1244
|
-
]);
|
|
1245
|
-
/**
|
|
1246
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1247
|
-
*
|
|
1248
|
-
* This source code is licensed under the ISC license.
|
|
1249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1250
|
-
*/
|
|
1251
|
-
const ji = y("Type", [
|
|
1252
|
-
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
1253
|
-
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
1254
|
-
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
1255
|
-
]);
|
|
1256
|
-
/**
|
|
1257
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1258
|
-
*
|
|
1259
|
-
* This source code is licensed under the ISC license.
|
|
1260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1261
|
-
*/
|
|
1262
|
-
const Hi = y("Upload", [
|
|
1263
|
-
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
1264
|
-
["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }],
|
|
1265
|
-
["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }]
|
|
1266
|
-
]);
|
|
1267
|
-
/**
|
|
1268
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1269
|
-
*
|
|
1270
|
-
* This source code is licensed under the ISC license.
|
|
1271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1272
|
-
*/
|
|
1273
|
-
const Di = y("Users", [
|
|
1274
|
-
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
1275
|
-
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
1276
|
-
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
1277
|
-
["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
|
|
1278
|
-
]);
|
|
1279
|
-
/**
|
|
1280
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1281
|
-
*
|
|
1282
|
-
* This source code is licensed under the ISC license.
|
|
1283
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1284
|
-
*/
|
|
1285
|
-
const Wi = y("Volume1", [
|
|
1286
|
-
[
|
|
1287
|
-
"path",
|
|
1288
|
-
{
|
|
1289
|
-
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1290
|
-
key: "uqj9uw"
|
|
1291
|
-
}
|
|
1292
|
-
],
|
|
1293
|
-
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }]
|
|
1294
|
-
]);
|
|
1295
|
-
/**
|
|
1296
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1297
|
-
*
|
|
1298
|
-
* This source code is licensed under the ISC license.
|
|
1299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1300
|
-
*/
|
|
1301
|
-
const qi = y("Volume2", [
|
|
1302
|
-
[
|
|
1303
|
-
"path",
|
|
1304
|
-
{
|
|
1305
|
-
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1306
|
-
key: "uqj9uw"
|
|
1307
|
-
}
|
|
1308
|
-
],
|
|
1309
|
-
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
|
|
1310
|
-
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
|
|
1311
|
-
]);
|
|
1312
|
-
/**
|
|
1313
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1314
|
-
*
|
|
1315
|
-
* This source code is licensed under the ISC license.
|
|
1316
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1317
|
-
*/
|
|
1318
|
-
const Ui = y("VolumeX", [
|
|
1319
|
-
[
|
|
1320
|
-
"path",
|
|
1321
|
-
{
|
|
1322
|
-
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1323
|
-
key: "uqj9uw"
|
|
1324
|
-
}
|
|
1325
|
-
],
|
|
1326
|
-
["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
|
|
1327
|
-
["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
|
|
1328
|
-
]);
|
|
1329
|
-
/**
|
|
1330
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1331
|
-
*
|
|
1332
|
-
* This source code is licensed under the ISC license.
|
|
1333
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1334
|
-
*/
|
|
1335
|
-
const Gi = y("X", [
|
|
1336
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
1337
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
1338
|
-
]);
|
|
1339
|
-
/**
|
|
1340
|
-
* @license lucide-react v0.462.0 - ISC
|
|
1341
|
-
*
|
|
1342
|
-
* This source code is licensed under the ISC license.
|
|
1343
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1344
|
-
*/
|
|
1345
|
-
const _i = y("Zap", [
|
|
1346
|
-
[
|
|
1347
|
-
"path",
|
|
1348
|
-
{
|
|
1349
|
-
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
1350
|
-
key: "1xq2db"
|
|
1351
|
-
}
|
|
1352
|
-
]
|
|
1353
|
-
]), ht = Pi, mt = Li, Xi = qi, Qi = Wi, Ji = Ui, Ki = Ni, Yi = zi, Zi = Fi, $e = bi, es = $i, ts = mi, is = gi, ss = Hi, ns = di, Re = ki, rs = pi, as = Di, os = vi, ls = Mi, cs = Ei, ds = Oi, us = ji, Ct = Ri, hs = yi, ms = Ii, fs = Ai, ps = ui, bs = fi, vs = xi, gs = hi, xs = Ci, ys = Si, ws = Ti, ks = _i, Ss = Gi, Cs = wi, ft = ({ className: o }) => /* @__PURE__ */ h("div", { className: `relative flex items-center justify-center ${o}`, children: [
|
|
1354
|
-
/* @__PURE__ */ t(Bi, { className: "w-full h-full", strokeWidth: 2 }),
|
|
1355
|
-
/* @__PURE__ */ t("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
1356
|
-
] }), pt = ({ className: o }) => /* @__PURE__ */ h("div", { className: `relative flex items-center justify-center ${o}`, children: [
|
|
1357
|
-
/* @__PURE__ */ t(Vi, { className: "w-full h-full", strokeWidth: 2 }),
|
|
1358
|
-
/* @__PURE__ */ t("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
1359
|
-
] }), Ns = ({ notifications: o }) => /* @__PURE__ */ t("div", { className: "absolute top-4 left-4 z-50 flex flex-col gap-2 pointer-events-none font-sans max-w-[85%] md:max-w-[400px]", children: o.map((e) => /* @__PURE__ */ h(
|
|
825
|
+
}, [s, t]), { isMounted: i, isVisible: o };
|
|
826
|
+
}, x = ({ className: s, children: t, fill: i = "none", strokeWidth: r = 2, viewBox: o = "0 0 24 24" }) => /* @__PURE__ */ e(
|
|
827
|
+
"svg",
|
|
828
|
+
{
|
|
829
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
830
|
+
viewBox: o,
|
|
831
|
+
fill: i,
|
|
832
|
+
stroke: "currentColor",
|
|
833
|
+
strokeWidth: r,
|
|
834
|
+
strokeLinecap: "round",
|
|
835
|
+
strokeLinejoin: "round",
|
|
836
|
+
className: s,
|
|
837
|
+
children: t
|
|
838
|
+
}
|
|
839
|
+
), mt = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("polygon", { points: "5 3 19 12 5 21 5 3" }) }), ft = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
840
|
+
/* @__PURE__ */ e("rect", { width: "4", height: "16", x: "6", y: "4", rx: "1" }),
|
|
841
|
+
/* @__PURE__ */ e("rect", { width: "4", height: "16", x: "14", y: "4", rx: "1" })
|
|
842
|
+
] }), ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
843
|
+
/* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
844
|
+
/* @__PURE__ */ e("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14" }),
|
|
845
|
+
/* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
846
|
+
] }), li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
847
|
+
/* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
848
|
+
/* @__PURE__ */ e("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
849
|
+
] }), ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
850
|
+
/* @__PURE__ */ e("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
851
|
+
/* @__PURE__ */ e("line", { x1: "23", x2: "17", y1: "9", y2: "15" }),
|
|
852
|
+
/* @__PURE__ */ e("line", { x1: "17", x2: "23", y1: "9", y2: "15" })
|
|
853
|
+
] }), di = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
854
|
+
/* @__PURE__ */ e("path", { d: "M8 3H5a2 2 0 0 0-2 2v3" }),
|
|
855
|
+
/* @__PURE__ */ e("path", { d: "M21 8V5a2 2 0 0 0-2-2h-3" }),
|
|
856
|
+
/* @__PURE__ */ e("path", { d: "M3 16v3a2 2 0 0 0 2 2h3" }),
|
|
857
|
+
/* @__PURE__ */ e("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
858
|
+
] }), ui = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
859
|
+
/* @__PURE__ */ e("path", { d: "M8 3v3a2 2 0 0 1-2 2H3" }),
|
|
860
|
+
/* @__PURE__ */ e("path", { d: "M21 8h-3a2 2 0 0 1-2-2V3" }),
|
|
861
|
+
/* @__PURE__ */ e("path", { d: "M3 16h3a2 2 0 0 1 2 2v3" }),
|
|
862
|
+
/* @__PURE__ */ e("path", { d: "M16 21v-3a2 2 0 0 1 2-2h3" })
|
|
863
|
+
] }), hi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
864
|
+
/* @__PURE__ */ e("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.47a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
|
|
865
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
866
|
+
] }), Le = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" }) }), mi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
867
|
+
/* @__PURE__ */ e("path", { d: "M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4" }),
|
|
868
|
+
/* @__PURE__ */ e("rect", { x: "12", y: "13", width: "10", height: "7", rx: "2" })
|
|
869
|
+
] }), fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
870
|
+
/* @__PURE__ */ e("rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2" }),
|
|
871
|
+
/* @__PURE__ */ e("path", { d: "M7 15h4" }),
|
|
872
|
+
/* @__PURE__ */ e("path", { d: "M15 15h2" }),
|
|
873
|
+
/* @__PURE__ */ e("path", { d: "M7 11h2" }),
|
|
874
|
+
/* @__PURE__ */ e("path", { d: "M13 11h4" })
|
|
875
|
+
] }), pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
876
|
+
/* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
877
|
+
/* @__PURE__ */ e("polyline", { points: "7 10 12 15 17 10" }),
|
|
878
|
+
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "15", y2: "3" })
|
|
879
|
+
] }), bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
880
|
+
/* @__PURE__ */ e("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
881
|
+
/* @__PURE__ */ e("polyline", { points: "17 8 12 3 7 8" }),
|
|
882
|
+
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
883
|
+
] }), vi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
884
|
+
/* @__PURE__ */ e("path", { d: "m12 19-7-7 7-7" }),
|
|
885
|
+
/* @__PURE__ */ e("path", { d: "M19 12H5" })
|
|
886
|
+
] }), Ie = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }), gi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
887
|
+
/* @__PURE__ */ e("path", { d: "M2 16.1A5 5 0 0 1 5.9 20" }),
|
|
888
|
+
/* @__PURE__ */ e("path", { d: "M2 12.05A9 9 0 0 1 9.95 20" }),
|
|
889
|
+
/* @__PURE__ */ e("path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }),
|
|
890
|
+
/* @__PURE__ */ e("line", { x1: "2", x2: "2.01", y1: "20", y2: "20" })
|
|
891
|
+
] }), xi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
892
|
+
/* @__PURE__ */ e("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
|
|
893
|
+
/* @__PURE__ */ e("circle", { cx: "9", cy: "7", r: "4" }),
|
|
894
|
+
/* @__PURE__ */ e("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
|
|
895
|
+
/* @__PURE__ */ e("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
896
|
+
] }), wi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
897
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
898
|
+
/* @__PURE__ */ e("polyline", { points: "12 6 12 12 16 14" })
|
|
899
|
+
] }), yi = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M5 12h14" }) }), ki = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
900
|
+
/* @__PURE__ */ e("path", { d: "M5 12h14" }),
|
|
901
|
+
/* @__PURE__ */ e("path", { d: "M12 5v14" })
|
|
902
|
+
] }), Si = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
903
|
+
/* @__PURE__ */ e("path", { d: "M4 21v-7" }),
|
|
904
|
+
/* @__PURE__ */ e("path", { d: "M4 10V3" }),
|
|
905
|
+
/* @__PURE__ */ e("path", { d: "M12 21v-9" }),
|
|
906
|
+
/* @__PURE__ */ e("path", { d: "M12 8V3" }),
|
|
907
|
+
/* @__PURE__ */ e("path", { d: "M20 21v-5" }),
|
|
908
|
+
/* @__PURE__ */ e("path", { d: "M20 12V3" }),
|
|
909
|
+
/* @__PURE__ */ e("path", { d: "M1 14h6" }),
|
|
910
|
+
/* @__PURE__ */ e("path", { d: "M9 8h6" }),
|
|
911
|
+
/* @__PURE__ */ e("path", { d: "M17 16h6" })
|
|
912
|
+
] }), Ci = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
913
|
+
/* @__PURE__ */ e("polyline", { points: "4 7 4 4 20 4 20 7" }),
|
|
914
|
+
/* @__PURE__ */ e("line", { x1: "9", x2: "15", y1: "20", y2: "20" }),
|
|
915
|
+
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "4", y2: "20" })
|
|
916
|
+
] }), St = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
917
|
+
/* @__PURE__ */ e("circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor" }),
|
|
918
|
+
/* @__PURE__ */ e("circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor" }),
|
|
919
|
+
/* @__PURE__ */ e("circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor" }),
|
|
920
|
+
/* @__PURE__ */ e("circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor" }),
|
|
921
|
+
/* @__PURE__ */ e("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z" })
|
|
922
|
+
] }), Ni = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
923
|
+
/* @__PURE__ */ e("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
924
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
925
|
+
] }), Ti = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
926
|
+
/* @__PURE__ */ e("polyline", { points: "8 18 12 22 16 18" }),
|
|
927
|
+
/* @__PURE__ */ e("polyline", { points: "8 6 12 2 16 6" }),
|
|
928
|
+
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "2", y2: "22" })
|
|
929
|
+
] }), Mi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
930
|
+
/* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
931
|
+
/* @__PURE__ */ e("path", { d: "M3 3v5h5" })
|
|
932
|
+
] }), zi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
933
|
+
/* @__PURE__ */ e("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
|
|
934
|
+
/* @__PURE__ */ e("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
|
|
935
|
+
] }), Ii = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
936
|
+
/* @__PURE__ */ e("path", { d: "m3 17 4-10 4 10" }),
|
|
937
|
+
/* @__PURE__ */ e("path", { d: "M4 13h6" }),
|
|
938
|
+
/* @__PURE__ */ e("path", { d: "M15 12h4.5a2.5 2.5 0 0 1 0 5H15V7h4a2.5 2.5 0 0 1 0 5h-4" })
|
|
939
|
+
] }), Ri = ({ className: s }) => /* @__PURE__ */ e(x, { className: s, children: /* @__PURE__ */ e("path", { d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z" }) }), Li = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
940
|
+
/* @__PURE__ */ e("path", { d: "M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z" }),
|
|
941
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "13", r: "3" })
|
|
942
|
+
] }), $i = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
943
|
+
/* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
944
|
+
/* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
945
|
+
] }), Ei = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
946
|
+
/* @__PURE__ */ e("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }),
|
|
947
|
+
/* @__PURE__ */ e("path", { d: "M7 11V7a5 5 0 0 1 9.9-1" })
|
|
948
|
+
] }), Pi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
949
|
+
/* @__PURE__ */ e("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
950
|
+
/* @__PURE__ */ e("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
951
|
+
/* @__PURE__ */ e("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
952
|
+
] }), Fi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
953
|
+
/* @__PURE__ */ e("polygon", { points: "13 19 22 12 13 5 13 19" }),
|
|
954
|
+
/* @__PURE__ */ e("polygon", { points: "2 19 11 12 2 5 2 19" })
|
|
955
|
+
] }), Ai = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
956
|
+
/* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
|
|
957
|
+
/* @__PURE__ */ e("path", { d: "m6 6 12 12" })
|
|
958
|
+
] }), Bi = ({ className: s }) => /* @__PURE__ */ l(x, { className: s, children: [
|
|
959
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
960
|
+
/* @__PURE__ */ e("path", { d: "M12 16v-4" }),
|
|
961
|
+
/* @__PURE__ */ e("path", { d: "M12 8h.01" })
|
|
962
|
+
] }), pt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
|
|
963
|
+
/* @__PURE__ */ l(x, { className: "w-full h-full", children: [
|
|
964
|
+
/* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
965
|
+
/* @__PURE__ */ e("path", { d: "M3 3v5h5" })
|
|
966
|
+
] }),
|
|
967
|
+
/* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
968
|
+
] }), bt = ({ className: s }) => /* @__PURE__ */ l("div", { className: `relative flex items-center justify-center ${s}`, children: [
|
|
969
|
+
/* @__PURE__ */ l(x, { className: "w-full h-full", children: [
|
|
970
|
+
/* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
971
|
+
/* @__PURE__ */ e("path", { d: "M21 3v5h-5" })
|
|
972
|
+
] }),
|
|
973
|
+
/* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
974
|
+
] }), Vi = ({ notifications: s }) => /* @__PURE__ */ e("div", { className: "absolute top-4 left-4 z-50 flex flex-col gap-2 pointer-events-none font-sans max-w-[85%] md:max-w-[400px]", children: s.map((t) => /* @__PURE__ */ l(
|
|
1360
975
|
"div",
|
|
1361
976
|
{
|
|
1362
977
|
className: `
|
|
1363
978
|
bg-zinc-950/90 backdrop-blur-md border border-white/10 text-white px-4 py-3 rounded-lg shadow-xl text-sm font-medium flex items-start gap-3 animate-in slide-in-from-left-2 fade-in duration-300 pointer-events-auto
|
|
1364
979
|
w-fit max-w-full
|
|
1365
|
-
${
|
|
1366
|
-
${
|
|
980
|
+
${t.type === "error" ? "border-red-500/50 text-red-100" : ""}
|
|
981
|
+
${t.type === "warning" ? "border-amber-500/50 text-amber-100" : ""}
|
|
1367
982
|
`,
|
|
1368
983
|
children: [
|
|
1369
|
-
|
|
1370
|
-
/* @__PURE__ */
|
|
1371
|
-
/* @__PURE__ */
|
|
1372
|
-
typeof
|
|
984
|
+
t.type === "loading" && /* @__PURE__ */ e(Ie, { className: "w-4 h-4 animate-spin text-[var(--accent)] shrink-0 mt-0.5" }),
|
|
985
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
986
|
+
/* @__PURE__ */ e("span", { className: "break-words line-clamp-4 leading-relaxed whitespace-pre-wrap", children: t.message }),
|
|
987
|
+
typeof t.progress == "number" && /* @__PURE__ */ e("div", { className: "h-1 w-full bg-white/10 rounded-full overflow-hidden mt-1.5", children: /* @__PURE__ */ e("div", { className: "h-full bg-[var(--accent)] transition-all duration-300", style: { width: `${t.progress}%` } }) })
|
|
1373
988
|
] })
|
|
1374
989
|
]
|
|
1375
990
|
},
|
|
1376
|
-
|
|
1377
|
-
)) }),
|
|
1378
|
-
if (
|
|
991
|
+
t.id
|
|
992
|
+
)) }), Oi = ({ cues: s, settings: t }) => {
|
|
993
|
+
if (t.useNative || s.length === 0) return null;
|
|
1379
994
|
const i = () => {
|
|
1380
|
-
switch (
|
|
995
|
+
switch (t.textStyle) {
|
|
1381
996
|
case "outline":
|
|
1382
997
|
return "0px 0px 4px black, 0px 0px 4px black";
|
|
1383
998
|
case "raised":
|
|
@@ -1390,118 +1005,118 @@ const _i = y("Zap", [
|
|
|
1390
1005
|
return "none";
|
|
1391
1006
|
}
|
|
1392
1007
|
};
|
|
1393
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ e(
|
|
1394
1009
|
"div",
|
|
1395
1010
|
{
|
|
1396
1011
|
className: "absolute inset-x-0 flex flex-col items-center justify-end text-center z-10 pointer-events-none transition-all duration-200",
|
|
1397
1012
|
style: {
|
|
1398
|
-
bottom: `${
|
|
1013
|
+
bottom: `${t.verticalOffset}px`
|
|
1399
1014
|
},
|
|
1400
|
-
children:
|
|
1015
|
+
children: s.map((r, o) => /* @__PURE__ */ e(
|
|
1401
1016
|
"div",
|
|
1402
1017
|
{
|
|
1403
1018
|
className: "mb-1 inline-block max-w-[80%]",
|
|
1404
1019
|
style: {
|
|
1405
|
-
fontSize: `${
|
|
1406
|
-
color:
|
|
1407
|
-
fontWeight:
|
|
1408
|
-
textTransform:
|
|
1020
|
+
fontSize: `${t.textSize}%`,
|
|
1021
|
+
color: t.textColor,
|
|
1022
|
+
fontWeight: t.isBold ? "bold" : "normal",
|
|
1023
|
+
textTransform: t.fixCapitalization ? "capitalize" : "none",
|
|
1409
1024
|
textShadow: i(),
|
|
1410
1025
|
lineHeight: 1.4
|
|
1411
1026
|
},
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1027
|
+
children: /* @__PURE__ */ e(
|
|
1413
1028
|
"span",
|
|
1414
1029
|
{
|
|
1415
1030
|
className: "px-2 py-0.5 rounded",
|
|
1416
1031
|
style: {
|
|
1417
|
-
backgroundColor: `rgba(0, 0, 0, ${
|
|
1418
|
-
backdropFilter:
|
|
1032
|
+
backgroundColor: `rgba(0, 0, 0, ${t.backgroundOpacity / 100})`,
|
|
1033
|
+
backdropFilter: t.backgroundBlur ? `blur(${t.backgroundBlurAmount}px)` : "none"
|
|
1419
1034
|
},
|
|
1420
|
-
dangerouslySetInnerHTML: { __html:
|
|
1035
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
1421
1036
|
}
|
|
1422
1037
|
)
|
|
1423
1038
|
},
|
|
1424
|
-
|
|
1039
|
+
o
|
|
1425
1040
|
))
|
|
1426
1041
|
}
|
|
1427
1042
|
);
|
|
1428
|
-
},
|
|
1429
|
-
const
|
|
1430
|
-
return /* @__PURE__ */
|
|
1043
|
+
}, Ct = ({ children: s, onClose: t, align: i = "right", maxHeight: r, className: o }) => {
|
|
1044
|
+
const d = I(null), m = i === "center" ? "left-1/2 -translate-x-1/2 origin-bottom" : "right-0 origin-bottom-right", v = r ? { maxHeight: `${r}px` } : {};
|
|
1045
|
+
return /* @__PURE__ */ e(
|
|
1431
1046
|
"div",
|
|
1432
1047
|
{
|
|
1433
|
-
className: `absolute bottom-full mb-4 ${m} bg-[var(--bg-panel)] backdrop-blur-xl border-[length:var(--border-width)] border-white/10 shadow-2xl overflow-hidden w-[300px] max-w-[calc(100vw-32px)] text-sm z-50 ring-1 ring-white/5 font-[family-name:var(--font-main)] flex flex-col p-1.5 transition-all duration-300 ease-out ${
|
|
1048
|
+
className: `absolute bottom-full mb-4 ${m} bg-[var(--bg-panel)] backdrop-blur-xl border-[length:var(--border-width)] border-white/10 shadow-2xl overflow-hidden w-[300px] max-w-[calc(100vw-32px)] text-sm z-50 ring-1 ring-white/5 font-[family-name:var(--font-main)] flex flex-col p-1.5 transition-all duration-300 ease-out ${o}`,
|
|
1434
1049
|
style: { ...v, borderRadius: "var(--radius-lg)" },
|
|
1435
|
-
onClick: (
|
|
1436
|
-
children: /* @__PURE__ */
|
|
1050
|
+
onClick: (w) => w.stopPropagation(),
|
|
1051
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-y-auto hide-scrollbar flex-1", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("div", { ref: d, children: s }) })
|
|
1437
1052
|
}
|
|
1438
1053
|
);
|
|
1439
|
-
},
|
|
1054
|
+
}, vt = ({ content: s, className: t }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { className: t, dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { className: t, children: s }) : /* @__PURE__ */ e("span", { className: t, children: s }), T = ({ label: s, value: t, active: i, onClick: r, hasSubmenu: o, icon: d }) => /* @__PURE__ */ l(
|
|
1440
1055
|
"button",
|
|
1441
1056
|
{
|
|
1442
|
-
onClick:
|
|
1057
|
+
onClick: r,
|
|
1443
1058
|
className: "w-full flex items-center justify-between px-3 py-2.5 hover:bg-white/10 transition-colors text-left text-zinc-200 active:bg-white/5 focus:outline-none focus:bg-white/10 group overflow-hidden my-0.5",
|
|
1444
1059
|
style: { borderRadius: "var(--radius)" },
|
|
1445
1060
|
children: [
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
|
|
1448
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
1062
|
+
d && /* @__PURE__ */ e("span", { className: "text-zinc-400 shrink-0 group-hover:text-zinc-300 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(vt, { content: d }) }),
|
|
1063
|
+
/* @__PURE__ */ e("span", { className: `font-medium truncate text-sm flex items-center ${i ? "text-[var(--accent)]" : ""}`, title: typeof s == "string" ? s : void 0, children: /* @__PURE__ */ e(vt, { content: s }) })
|
|
1449
1064
|
] }),
|
|
1450
|
-
/* @__PURE__ */
|
|
1451
|
-
|
|
1452
|
-
i && /* @__PURE__ */
|
|
1453
|
-
|
|
1065
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-zinc-400 shrink-0", children: [
|
|
1066
|
+
t && /* @__PURE__ */ e("span", { className: "text-xs font-medium truncate max-w-[60px]", title: t, children: t }),
|
|
1067
|
+
i && /* @__PURE__ */ e(Le, { className: "w-4 h-4 text-[var(--accent)] shrink-0" }),
|
|
1068
|
+
o && /* @__PURE__ */ e("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
|
|
1454
1069
|
] })
|
|
1455
1070
|
]
|
|
1456
1071
|
}
|
|
1457
|
-
), H = ({ label:
|
|
1072
|
+
), H = ({ label: s, onBack: t, rightAction: i }) => /* @__PURE__ */ l(
|
|
1458
1073
|
"div",
|
|
1459
1074
|
{
|
|
1460
1075
|
className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md",
|
|
1461
1076
|
style: { borderRadius: "var(--radius)" },
|
|
1462
1077
|
children: [
|
|
1463
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ l(
|
|
1464
1079
|
"button",
|
|
1465
1080
|
{
|
|
1466
1081
|
className: "flex items-center gap-2 hover:text-white transition-colors focus:outline-none",
|
|
1467
|
-
onClick:
|
|
1082
|
+
onClick: t,
|
|
1468
1083
|
children: [
|
|
1469
|
-
/* @__PURE__ */
|
|
1470
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ e(vi, { className: "w-3 h-3" }),
|
|
1085
|
+
/* @__PURE__ */ e("span", { children: s })
|
|
1471
1086
|
]
|
|
1472
1087
|
}
|
|
1473
1088
|
),
|
|
1474
1089
|
i
|
|
1475
1090
|
]
|
|
1476
1091
|
}
|
|
1477
|
-
),
|
|
1092
|
+
), gt = () => /* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }), de = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(L, { children: s }), K = ({ label: s, checked: t, onChange: i, icon: r, tooltip: o }) => /* @__PURE__ */ l(
|
|
1478
1093
|
"div",
|
|
1479
1094
|
{
|
|
1480
1095
|
className: "flex items-center justify-between py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
1481
1096
|
style: { borderRadius: "var(--radius)" },
|
|
1482
1097
|
children: [
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
|
|
1485
|
-
/* @__PURE__ */
|
|
1486
|
-
/* @__PURE__ */
|
|
1487
|
-
|
|
1098
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
1099
|
+
r && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(de, { content: r }) }),
|
|
1100
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col", children: [
|
|
1101
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors flex items-center", children: /* @__PURE__ */ e(de, { content: s }) }),
|
|
1102
|
+
o && /* @__PURE__ */ e("span", { className: "text-[10px] text-zinc-500", children: o })
|
|
1488
1103
|
] })
|
|
1489
1104
|
] }),
|
|
1490
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ e(
|
|
1491
1106
|
"button",
|
|
1492
1107
|
{
|
|
1493
|
-
onClick: () => i(!
|
|
1494
|
-
className: `w-11 h-6 shrink-0 transition-colors relative focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 ${
|
|
1108
|
+
onClick: () => i(!t),
|
|
1109
|
+
className: `w-11 h-6 shrink-0 transition-colors relative focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 ${t ? "bg-[var(--accent)]" : "bg-zinc-700"}`,
|
|
1495
1110
|
style: {
|
|
1496
1111
|
"--tw-ring-color": "var(--accent)",
|
|
1497
1112
|
borderRadius: "var(--radius-full)",
|
|
1498
1113
|
borderWidth: "var(--border-width)",
|
|
1499
1114
|
borderColor: "rgba(255,255,255,0.1)"
|
|
1500
1115
|
},
|
|
1501
|
-
children: /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ e(
|
|
1502
1117
|
"div",
|
|
1503
1118
|
{
|
|
1504
|
-
className: `absolute top-1/2 -translate-y-1/2 left-0.5 bg-white w-4 h-4 transition-transform shadow-sm ${
|
|
1119
|
+
className: `absolute top-1/2 -translate-y-1/2 left-0.5 bg-white w-4 h-4 transition-transform shadow-sm ${t ? "translate-x-5" : "translate-x-0"}`,
|
|
1505
1120
|
style: { borderRadius: "var(--radius-full)" }
|
|
1506
1121
|
}
|
|
1507
1122
|
)
|
|
@@ -1509,45 +1124,45 @@ const _i = y("Zap", [
|
|
|
1509
1124
|
)
|
|
1510
1125
|
]
|
|
1511
1126
|
}
|
|
1512
|
-
), ce = ({ label:
|
|
1127
|
+
), ce = ({ label: s, value: t, min: i, max: r, step: o, onChange: d, formatValue: m, icon: v }) => /* @__PURE__ */ l(
|
|
1513
1128
|
"div",
|
|
1514
1129
|
{
|
|
1515
1130
|
className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
1516
1131
|
style: { borderRadius: "var(--radius)" },
|
|
1517
1132
|
children: [
|
|
1518
|
-
/* @__PURE__ */
|
|
1519
|
-
/* @__PURE__ */
|
|
1520
|
-
v && /* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ l("div", { className: "flex justify-between items-center mb-2", children: [
|
|
1134
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
1135
|
+
v && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(de, { content: v }) }),
|
|
1136
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
|
|
1522
1137
|
] }),
|
|
1523
|
-
/* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ e(
|
|
1524
1139
|
"span",
|
|
1525
1140
|
{
|
|
1526
1141
|
className: "text-[10px] font-mono font-medium text-zinc-300 bg-white/10 px-1.5 py-0.5 tabular-nums",
|
|
1527
1142
|
style: { borderRadius: "var(--radius-sm)" },
|
|
1528
|
-
children: m ? m(
|
|
1143
|
+
children: m ? m(t) : t
|
|
1529
1144
|
}
|
|
1530
1145
|
)
|
|
1531
1146
|
] }),
|
|
1532
|
-
/* @__PURE__ */
|
|
1533
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ l("div", { className: "relative h-4 flex items-center px-1", children: [
|
|
1148
|
+
/* @__PURE__ */ e(
|
|
1534
1149
|
"input",
|
|
1535
1150
|
{
|
|
1536
1151
|
type: "range",
|
|
1537
1152
|
min: i,
|
|
1538
|
-
max:
|
|
1539
|
-
step:
|
|
1540
|
-
value:
|
|
1541
|
-
onChange: (
|
|
1153
|
+
max: r,
|
|
1154
|
+
step: o,
|
|
1155
|
+
value: t,
|
|
1156
|
+
onChange: (w) => d(parseFloat(w.target.value)),
|
|
1542
1157
|
className: "w-full h-1.5 appearance-none cursor-pointer focus:outline-none focus:ring-2 strata-range-input",
|
|
1543
1158
|
style: {
|
|
1544
1159
|
borderRadius: "var(--radius-full)",
|
|
1545
|
-
background: `linear-gradient(to right, var(--accent) 0%, var(--accent) ${(
|
|
1160
|
+
background: `linear-gradient(to right, var(--accent) 0%, var(--accent) ${(t - i) / (r - i) * 100}%, #3f3f46 ${(t - i) / (r - i) * 100}%, #3f3f46 100%)`,
|
|
1546
1161
|
"--tw-ring-color": "var(--accent)"
|
|
1547
1162
|
}
|
|
1548
1163
|
}
|
|
1549
1164
|
),
|
|
1550
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ e("style", { children: `
|
|
1551
1166
|
.strata-range-input::-webkit-slider-thumb {
|
|
1552
1167
|
-webkit-appearance: none;
|
|
1553
1168
|
height: 14px;
|
|
@@ -1567,151 +1182,151 @@ const _i = y("Zap", [
|
|
|
1567
1182
|
] })
|
|
1568
1183
|
]
|
|
1569
1184
|
}
|
|
1570
|
-
),
|
|
1185
|
+
), ji = ({ label: s, value: t, options: i, onChange: r, icon: o }) => /* @__PURE__ */ l(
|
|
1571
1186
|
"div",
|
|
1572
1187
|
{
|
|
1573
1188
|
className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
1574
1189
|
style: { borderRadius: "var(--radius)" },
|
|
1575
1190
|
children: [
|
|
1576
|
-
/* @__PURE__ */
|
|
1577
|
-
|
|
1578
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
1192
|
+
o && /* @__PURE__ */ e("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors flex items-center justify-center w-4 h-4", children: /* @__PURE__ */ e(de, { content: o }) }),
|
|
1193
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: s })
|
|
1579
1194
|
] }),
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1195
|
+
/* @__PURE__ */ l("div", { className: "relative", children: [
|
|
1196
|
+
/* @__PURE__ */ e(
|
|
1582
1197
|
"select",
|
|
1583
1198
|
{
|
|
1584
|
-
value:
|
|
1585
|
-
onChange: (
|
|
1199
|
+
value: t,
|
|
1200
|
+
onChange: (d) => r(d.target.value),
|
|
1586
1201
|
className: "w-full bg-zinc-800 border-[length:var(--border-width)] border-white/10 px-3 py-2 text-sm text-zinc-200 focus:outline-none focus:ring-2 appearance-none hover:bg-zinc-700 transition-colors cursor-pointer",
|
|
1587
1202
|
style: { "--tw-ring-color": "var(--accent)", borderRadius: "var(--radius)" },
|
|
1588
|
-
children: i.map((
|
|
1203
|
+
children: i.map((d) => /* @__PURE__ */ e("option", { value: d.value, children: d.label }, d.value))
|
|
1589
1204
|
}
|
|
1590
1205
|
),
|
|
1591
|
-
/* @__PURE__ */
|
|
1206
|
+
/* @__PURE__ */ e("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-zinc-400", children: /* @__PURE__ */ e("svg", { width: "10", height: "6", viewBox: "0 0 10 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M1 1L5 5L9 1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
1592
1207
|
] })
|
|
1593
1208
|
]
|
|
1594
1209
|
}
|
|
1595
|
-
), Y = ({ title:
|
|
1596
|
-
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
] }),
|
|
1599
|
-
const [k,
|
|
1600
|
-
return /* @__PURE__ */
|
|
1601
|
-
k === "main" && /* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1210
|
+
), Y = ({ title: s, children: t }) => /* @__PURE__ */ l("div", { className: "py-2", children: [
|
|
1211
|
+
s && /* @__PURE__ */ e("h4", { className: "px-3 text-[10px] font-bold text-[var(--accent)] uppercase tracking-wider mb-1 mt-2", children: s }),
|
|
1212
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t })
|
|
1213
|
+
] }), Hi = ({ tracks: s, current: t, onSelect: i, onUpload: r, onClose: o, settings: d, onSettingsChange: m, onReset: v, offset: w, onOffsetChange: b, maxHeight: h, animationClass: y }) => {
|
|
1214
|
+
const [k, z] = N("main"), R = I(null);
|
|
1215
|
+
return /* @__PURE__ */ l(Ct, { onClose: o, align: "right", maxHeight: h, className: y, children: [
|
|
1216
|
+
k === "main" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
|
|
1217
|
+
/* @__PURE__ */ e(
|
|
1603
1218
|
"div",
|
|
1604
1219
|
{
|
|
1605
1220
|
className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md",
|
|
1606
1221
|
style: { borderRadius: "var(--radius)" },
|
|
1607
|
-
children: /* @__PURE__ */
|
|
1222
|
+
children: /* @__PURE__ */ e("span", { children: "Subtitles" })
|
|
1608
1223
|
}
|
|
1609
1224
|
),
|
|
1610
|
-
/* @__PURE__ */
|
|
1611
|
-
/* @__PURE__ */
|
|
1612
|
-
|
|
1225
|
+
/* @__PURE__ */ l("div", { children: [
|
|
1226
|
+
/* @__PURE__ */ e(
|
|
1227
|
+
T,
|
|
1613
1228
|
{
|
|
1614
1229
|
label: "Upload Subtitle",
|
|
1615
|
-
icon: /* @__PURE__ */
|
|
1230
|
+
icon: /* @__PURE__ */ e(bi, { className: "w-4 h-4" }),
|
|
1616
1231
|
onClick: () => {
|
|
1617
1232
|
var p;
|
|
1618
1233
|
return (p = R.current) == null ? void 0 : p.click();
|
|
1619
1234
|
}
|
|
1620
1235
|
}
|
|
1621
1236
|
),
|
|
1622
|
-
/* @__PURE__ */
|
|
1623
|
-
var
|
|
1624
|
-
(
|
|
1237
|
+
/* @__PURE__ */ e("input", { type: "file", accept: ".vtt,.srt", ref: R, className: "hidden", onChange: (p) => {
|
|
1238
|
+
var W;
|
|
1239
|
+
(W = p.target.files) != null && W[0] && r(p.target.files[0]);
|
|
1625
1240
|
} }),
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
|
|
1241
|
+
/* @__PURE__ */ e(
|
|
1242
|
+
T,
|
|
1628
1243
|
{
|
|
1629
1244
|
label: "Customize",
|
|
1630
|
-
icon: /* @__PURE__ */
|
|
1631
|
-
onClick: () =>
|
|
1245
|
+
icon: /* @__PURE__ */ e(Si, { className: "w-4 h-4" }),
|
|
1246
|
+
onClick: () => z("customize"),
|
|
1632
1247
|
hasSubmenu: !0
|
|
1633
1248
|
}
|
|
1634
1249
|
),
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
|
|
1250
|
+
/* @__PURE__ */ e("div", { className: "h-px bg-white/5 mx-2 my-1" }),
|
|
1251
|
+
/* @__PURE__ */ e(
|
|
1252
|
+
T,
|
|
1638
1253
|
{
|
|
1639
1254
|
label: "Off",
|
|
1640
|
-
active:
|
|
1255
|
+
active: t === -1,
|
|
1641
1256
|
onClick: () => {
|
|
1642
|
-
i(-1),
|
|
1257
|
+
i(-1), o();
|
|
1643
1258
|
}
|
|
1644
1259
|
}
|
|
1645
1260
|
),
|
|
1646
|
-
|
|
1647
|
-
|
|
1261
|
+
s.map((p) => /* @__PURE__ */ e(
|
|
1262
|
+
T,
|
|
1648
1263
|
{
|
|
1649
1264
|
label: p.label,
|
|
1650
1265
|
value: p.language,
|
|
1651
|
-
active:
|
|
1266
|
+
active: t === p.index,
|
|
1652
1267
|
onClick: () => {
|
|
1653
|
-
i(p.index),
|
|
1268
|
+
i(p.index), o();
|
|
1654
1269
|
}
|
|
1655
1270
|
},
|
|
1656
1271
|
p.index
|
|
1657
1272
|
))
|
|
1658
1273
|
] })
|
|
1659
1274
|
] }),
|
|
1660
|
-
k === "customize" && /* @__PURE__ */
|
|
1661
|
-
/* @__PURE__ */
|
|
1275
|
+
k === "customize" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
1276
|
+
/* @__PURE__ */ e(
|
|
1662
1277
|
H,
|
|
1663
1278
|
{
|
|
1664
1279
|
label: "Customize",
|
|
1665
|
-
onBack: () =>
|
|
1666
|
-
rightAction: /* @__PURE__ */
|
|
1280
|
+
onBack: () => z("main"),
|
|
1281
|
+
rightAction: /* @__PURE__ */ e("button", { onClick: v, className: "p-1.5 text-zinc-400 hover:text-white transition-colors rounded-md hover:bg-white/10", title: "Reset All", children: /* @__PURE__ */ e(Mi, { className: "w-4 h-4" }) })
|
|
1667
1282
|
}
|
|
1668
1283
|
),
|
|
1669
|
-
/* @__PURE__ */
|
|
1670
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ l("div", { className: "pb-1", children: [
|
|
1285
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
1671
1286
|
K,
|
|
1672
1287
|
{
|
|
1673
1288
|
label: "Native Video Subtitle",
|
|
1674
|
-
checked:
|
|
1289
|
+
checked: d.useNative,
|
|
1675
1290
|
onChange: (p) => m({ useNative: p })
|
|
1676
1291
|
}
|
|
1677
1292
|
) }),
|
|
1678
|
-
!
|
|
1679
|
-
/* @__PURE__ */
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1683
|
-
/* @__PURE__ */
|
|
1293
|
+
!d.useNative && /* @__PURE__ */ l(L, { children: [
|
|
1294
|
+
/* @__PURE__ */ l(Y, { title: "Sync & Position", children: [
|
|
1295
|
+
/* @__PURE__ */ l("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
|
|
1296
|
+
/* @__PURE__ */ e("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
1297
|
+
/* @__PURE__ */ e(wi, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
|
|
1298
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Sync Offset" })
|
|
1684
1299
|
] }) }),
|
|
1685
|
-
/* @__PURE__ */
|
|
1686
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
1301
|
+
/* @__PURE__ */ e(
|
|
1687
1302
|
"button",
|
|
1688
1303
|
{
|
|
1689
|
-
onClick: () => b(Math.round((
|
|
1304
|
+
onClick: () => b(Math.round((w - 0.1) * 10) / 10),
|
|
1690
1305
|
className: "w-8 h-8 flex items-center justify-center bg-zinc-800 rounded-lg hover:bg-zinc-700 text-zinc-300 transition-colors active:scale-95",
|
|
1691
|
-
children: /* @__PURE__ */
|
|
1306
|
+
children: /* @__PURE__ */ e(yi, { className: "w-4 h-4" })
|
|
1692
1307
|
}
|
|
1693
1308
|
),
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
|
|
1696
|
-
(
|
|
1309
|
+
/* @__PURE__ */ l("div", { className: "flex-1 bg-zinc-900 border border-white/5 rounded-lg h-8 flex items-center justify-center text-xs font-mono font-medium text-[var(--accent)]", children: [
|
|
1310
|
+
w > 0 ? "+" : "",
|
|
1311
|
+
(w == null ? void 0 : w.toFixed(1)) || "0.0",
|
|
1697
1312
|
"s"
|
|
1698
1313
|
] }),
|
|
1699
|
-
/* @__PURE__ */
|
|
1314
|
+
/* @__PURE__ */ e(
|
|
1700
1315
|
"button",
|
|
1701
1316
|
{
|
|
1702
|
-
onClick: () => b(Math.round((
|
|
1317
|
+
onClick: () => b(Math.round((w + 0.1) * 10) / 10),
|
|
1703
1318
|
className: "w-8 h-8 flex items-center justify-center bg-zinc-800 rounded-lg hover:bg-zinc-700 text-zinc-300 transition-colors active:scale-95",
|
|
1704
|
-
children: /* @__PURE__ */
|
|
1319
|
+
children: /* @__PURE__ */ e(ki, { className: "w-4 h-4" })
|
|
1705
1320
|
}
|
|
1706
1321
|
)
|
|
1707
1322
|
] })
|
|
1708
1323
|
] }),
|
|
1709
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ e(
|
|
1710
1325
|
ce,
|
|
1711
1326
|
{
|
|
1712
1327
|
label: "Vertical Position",
|
|
1713
|
-
icon: /* @__PURE__ */
|
|
1714
|
-
value:
|
|
1328
|
+
icon: /* @__PURE__ */ e(Ti, { className: "w-4 h-4" }),
|
|
1329
|
+
value: d.verticalOffset,
|
|
1715
1330
|
min: 0,
|
|
1716
1331
|
max: 200,
|
|
1717
1332
|
step: 5,
|
|
@@ -1720,13 +1335,13 @@ const _i = y("Zap", [
|
|
|
1720
1335
|
}
|
|
1721
1336
|
)
|
|
1722
1337
|
] }),
|
|
1723
|
-
/* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ l(Y, { title: "Appearance", children: [
|
|
1339
|
+
/* @__PURE__ */ e(
|
|
1725
1340
|
ce,
|
|
1726
1341
|
{
|
|
1727
1342
|
label: "Text Size",
|
|
1728
|
-
icon: /* @__PURE__ */
|
|
1729
|
-
value:
|
|
1343
|
+
icon: /* @__PURE__ */ e(Ci, { className: "w-4 h-4" }),
|
|
1344
|
+
value: d.textSize,
|
|
1730
1345
|
min: 50,
|
|
1731
1346
|
max: 200,
|
|
1732
1347
|
step: 10,
|
|
@@ -1734,38 +1349,38 @@ const _i = y("Zap", [
|
|
|
1734
1349
|
formatValue: (p) => `${p}%`
|
|
1735
1350
|
}
|
|
1736
1351
|
),
|
|
1737
|
-
/* @__PURE__ */
|
|
1738
|
-
/* @__PURE__ */
|
|
1739
|
-
/* @__PURE__ */
|
|
1740
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ l("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
|
|
1353
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
1354
|
+
/* @__PURE__ */ e(St, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
|
|
1355
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Text Color" })
|
|
1741
1356
|
] }),
|
|
1742
|
-
/* @__PURE__ */
|
|
1743
|
-
["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((p) => /* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2 p-1 bg-zinc-800/50 rounded-lg", children: [
|
|
1358
|
+
["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((p) => /* @__PURE__ */ e(
|
|
1744
1359
|
"button",
|
|
1745
1360
|
{
|
|
1746
1361
|
onClick: () => m({ textColor: p }),
|
|
1747
|
-
className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${
|
|
1362
|
+
className: `w-6 h-6 rounded-full border border-white/10 transition-transform hover:scale-110 ${d.textColor === p ? "ring-2 scale-110" : ""}`,
|
|
1748
1363
|
style: { backgroundColor: p, "--tw-ring-color": "var(--accent)" }
|
|
1749
1364
|
},
|
|
1750
1365
|
p
|
|
1751
1366
|
)),
|
|
1752
|
-
/* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ e("div", { className: "w-px h-6 bg-white/10 mx-1" }),
|
|
1368
|
+
/* @__PURE__ */ e("div", { className: "relative w-6 h-6 rounded-full overflow-hidden ring-1 ring-white/20 cursor-pointer", children: /* @__PURE__ */ e(
|
|
1754
1369
|
"input",
|
|
1755
1370
|
{
|
|
1756
1371
|
type: "color",
|
|
1757
|
-
value:
|
|
1372
|
+
value: d.textColor,
|
|
1758
1373
|
onChange: (p) => m({ textColor: p.target.value }),
|
|
1759
1374
|
className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0"
|
|
1760
1375
|
}
|
|
1761
1376
|
) })
|
|
1762
1377
|
] })
|
|
1763
1378
|
] }),
|
|
1764
|
-
/* @__PURE__ */
|
|
1765
|
-
|
|
1379
|
+
/* @__PURE__ */ e(
|
|
1380
|
+
ji,
|
|
1766
1381
|
{
|
|
1767
1382
|
label: "Text Style",
|
|
1768
|
-
value:
|
|
1383
|
+
value: d.textStyle,
|
|
1769
1384
|
options: [
|
|
1770
1385
|
{ label: "None", value: "none" },
|
|
1771
1386
|
{ label: "Outline", value: "outline" },
|
|
@@ -1776,18 +1391,18 @@ const _i = y("Zap", [
|
|
|
1776
1391
|
onChange: (p) => m({ textStyle: p })
|
|
1777
1392
|
}
|
|
1778
1393
|
),
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-2 mt-1 px-1", children: [
|
|
1395
|
+
/* @__PURE__ */ e(K, { label: "Bold", icon: /* @__PURE__ */ e(zi, { className: "w-4 h-4" }), checked: d.isBold, onChange: (p) => m({ isBold: p }) }),
|
|
1396
|
+
/* @__PURE__ */ e(K, { label: "Fix Caps", icon: /* @__PURE__ */ e(Ii, { className: "w-4 h-4" }), checked: d.fixCapitalization, onChange: (p) => m({ fixCapitalization: p }) })
|
|
1782
1397
|
] })
|
|
1783
1398
|
] }),
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ l(Y, { title: "Background", children: [
|
|
1400
|
+
/* @__PURE__ */ e(
|
|
1786
1401
|
ce,
|
|
1787
1402
|
{
|
|
1788
1403
|
label: "Opacity",
|
|
1789
|
-
icon: /* @__PURE__ */
|
|
1790
|
-
value:
|
|
1404
|
+
icon: /* @__PURE__ */ e(Ni, { className: "w-4 h-4" }),
|
|
1405
|
+
value: d.backgroundOpacity,
|
|
1791
1406
|
min: 0,
|
|
1792
1407
|
max: 100,
|
|
1793
1408
|
step: 5,
|
|
@@ -1795,12 +1410,12 @@ const _i = y("Zap", [
|
|
|
1795
1410
|
formatValue: (p) => `${p}%`
|
|
1796
1411
|
}
|
|
1797
1412
|
),
|
|
1798
|
-
/* @__PURE__ */
|
|
1799
|
-
|
|
1413
|
+
/* @__PURE__ */ e(K, { label: "Blur Background", icon: /* @__PURE__ */ e(Ri, { className: "w-4 h-4" }), checked: d.backgroundBlur, onChange: (p) => m({ backgroundBlur: p }) }),
|
|
1414
|
+
d.backgroundBlur && /* @__PURE__ */ e(
|
|
1800
1415
|
ce,
|
|
1801
1416
|
{
|
|
1802
1417
|
label: "Blur Intensity",
|
|
1803
|
-
value:
|
|
1418
|
+
value: d.backgroundBlurAmount,
|
|
1804
1419
|
min: 0,
|
|
1805
1420
|
max: 20,
|
|
1806
1421
|
step: 1,
|
|
@@ -1813,30 +1428,30 @@ const _i = y("Zap", [
|
|
|
1813
1428
|
] })
|
|
1814
1429
|
] })
|
|
1815
1430
|
] });
|
|
1816
|
-
}, Me = ({ content:
|
|
1817
|
-
const m = I(null), [v,
|
|
1818
|
-
top:
|
|
1819
|
-
left:
|
|
1431
|
+
}, Me = ({ content: s }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("span", { children: s }) : /* @__PURE__ */ e(L, { children: s }), Wi = ({ x: s, y: t, items: i, onClose: r, containerWidth: o, containerHeight: d }) => {
|
|
1432
|
+
const m = I(null), [v, w] = N({
|
|
1433
|
+
top: t,
|
|
1434
|
+
left: s,
|
|
1820
1435
|
opacity: 0
|
|
1821
1436
|
});
|
|
1822
|
-
return
|
|
1437
|
+
return Kt(() => {
|
|
1823
1438
|
if (!m.current) return;
|
|
1824
|
-
const b = m.current.getBoundingClientRect(),
|
|
1825
|
-
let k =
|
|
1826
|
-
|
|
1827
|
-
let R =
|
|
1828
|
-
|
|
1829
|
-
top:
|
|
1439
|
+
const b = m.current.getBoundingClientRect(), h = b.width, y = b.height;
|
|
1440
|
+
let k = s, z = t;
|
|
1441
|
+
s + h > o - 10 && (k = s - h), k < 10 && (k = 10), k + h > o && (k = Math.max(10, o - h - 10)), t + y > d - 10 && (z = t - y);
|
|
1442
|
+
let R = d - 20;
|
|
1443
|
+
z < 10 && (z = 10), z + y > d - 10 && (z = Math.max(10, d - y - 10)), w({
|
|
1444
|
+
top: z,
|
|
1830
1445
|
left: k,
|
|
1831
1446
|
maxHeight: R,
|
|
1832
1447
|
opacity: 1
|
|
1833
1448
|
});
|
|
1834
|
-
}, [
|
|
1835
|
-
const b = (
|
|
1836
|
-
m.current && !m.current.contains(
|
|
1449
|
+
}, [s, t, i, o, d]), P(() => {
|
|
1450
|
+
const b = (h) => {
|
|
1451
|
+
m.current && !m.current.contains(h.target) && r();
|
|
1837
1452
|
};
|
|
1838
1453
|
return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
|
|
1839
|
-
}, [
|
|
1454
|
+
}, [r]), /* @__PURE__ */ e(
|
|
1840
1455
|
"div",
|
|
1841
1456
|
{
|
|
1842
1457
|
ref: m,
|
|
@@ -1849,37 +1464,37 @@ const _i = y("Zap", [
|
|
|
1849
1464
|
borderRadius: "var(--radius-lg)"
|
|
1850
1465
|
},
|
|
1851
1466
|
onClick: (b) => b.stopPropagation(),
|
|
1852
|
-
children: i.map((b,
|
|
1853
|
-
/* @__PURE__ */
|
|
1467
|
+
children: i.map((b, h) => b.separator ? /* @__PURE__ */ e("div", { className: "h-0 border-t border-white/10 mx-2 my-1.5" }, h) : b.isLabel ? /* @__PURE__ */ e("div", { className: "px-3 py-1.5 text-[10px] font-bold text-zinc-500 uppercase tracking-wider select-none", children: /* @__PURE__ */ e(Me, { content: b.html || "" }) }, h) : /* @__PURE__ */ l(ze.Fragment, { children: [
|
|
1468
|
+
/* @__PURE__ */ l(
|
|
1854
1469
|
"button",
|
|
1855
1470
|
{
|
|
1856
1471
|
onClick: () => {
|
|
1857
|
-
b.disabled || (b.click ? b.click(
|
|
1472
|
+
b.disabled || (b.click ? b.click(r) : b.onClick && b.onClick(r));
|
|
1858
1473
|
},
|
|
1859
1474
|
disabled: b.disabled,
|
|
1860
1475
|
className: "w-full text-left px-3 py-2.5 flex items-center justify-between hover:bg-white/10 focus:bg-white/10 focus:outline-none transition-colors text-sm text-zinc-200 disabled:opacity-50 disabled:cursor-not-allowed group my-0.5",
|
|
1861
1476
|
style: { borderRadius: "var(--radius)" },
|
|
1862
1477
|
children: [
|
|
1863
|
-
/* @__PURE__ */
|
|
1864
|
-
b.icon && /* @__PURE__ */
|
|
1865
|
-
/* @__PURE__ */
|
|
1478
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
1479
|
+
b.icon && /* @__PURE__ */ e("span", { className: "text-zinc-400 w-4 h-4 flex items-center justify-center shrink-0 group-hover:text-zinc-300 transition-colors", children: /* @__PURE__ */ e(Me, { content: b.icon }) }),
|
|
1480
|
+
/* @__PURE__ */ e("span", { className: `flex items-center font-medium truncate ${b.checked ? "text-[var(--accent)]" : ""}`, children: /* @__PURE__ */ e(Me, { content: b.html || "" }) })
|
|
1866
1481
|
] }),
|
|
1867
|
-
b.checked && /* @__PURE__ */
|
|
1482
|
+
b.checked && /* @__PURE__ */ e(Le, { className: "w-4 h-4 text-[var(--accent)] shrink-0 ml-2" })
|
|
1868
1483
|
]
|
|
1869
1484
|
}
|
|
1870
1485
|
),
|
|
1871
|
-
b.showBorder && /* @__PURE__ */
|
|
1872
|
-
] },
|
|
1486
|
+
b.showBorder && /* @__PURE__ */ e("div", { className: "h-0 border-t border-white/10 mx-2 my-1" })
|
|
1487
|
+
] }, h))
|
|
1873
1488
|
}
|
|
1874
1489
|
);
|
|
1875
|
-
},
|
|
1876
|
-
const [i,
|
|
1877
|
-
return
|
|
1878
|
-
const
|
|
1879
|
-
var
|
|
1880
|
-
if (!
|
|
1881
|
-
const m =
|
|
1882
|
-
|
|
1490
|
+
}, Di = ({ player: s, onClose: t }) => {
|
|
1491
|
+
const [i, r] = N({});
|
|
1492
|
+
return P(() => {
|
|
1493
|
+
const o = () => {
|
|
1494
|
+
var w;
|
|
1495
|
+
if (!s.video) return;
|
|
1496
|
+
const m = s.video, v = m.getVideoPlaybackQuality ? m.getVideoPlaybackQuality() : null;
|
|
1497
|
+
r({
|
|
1883
1498
|
"Player Size": `${m.offsetWidth} x ${m.offsetHeight}`,
|
|
1884
1499
|
"Video Resolution": `${m.videoWidth} x ${m.videoHeight}`,
|
|
1885
1500
|
"Current Time": `${m.currentTime.toFixed(3)}s`,
|
|
@@ -1887,211 +1502,214 @@ const _i = y("Zap", [
|
|
|
1887
1502
|
Volume: `${Math.round(m.volume * 100)}%`,
|
|
1888
1503
|
"Dropped Frames": v ? v.droppedVideoFrames : "N/A",
|
|
1889
1504
|
Buffer: m.buffered.length > 0 ? `${(m.buffered.end(m.buffered.length - 1) - m.currentTime).toFixed(2)}s` : "0s",
|
|
1890
|
-
Engine: ((
|
|
1505
|
+
Engine: ((w = s.store.get().sources[s.store.get().currentSourceIndex]) == null ? void 0 : w.type) || "native",
|
|
1891
1506
|
URL: m.currentSrc
|
|
1892
1507
|
});
|
|
1893
1508
|
};
|
|
1894
|
-
|
|
1895
|
-
const
|
|
1896
|
-
return () => clearInterval(
|
|
1897
|
-
}, [
|
|
1509
|
+
o();
|
|
1510
|
+
const d = setInterval(o, 1e3);
|
|
1511
|
+
return () => clearInterval(d);
|
|
1512
|
+
}, [s]), /* @__PURE__ */ e("div", { className: "absolute inset-0 z-[60] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200", children: /* @__PURE__ */ l(
|
|
1898
1513
|
"div",
|
|
1899
1514
|
{
|
|
1900
1515
|
className: "bg-[var(--bg-panel)] border border-white/10 rounded-xl w-full max-w-md shadow-2xl relative font-mono text-xs text-zinc-300 flex flex-col",
|
|
1901
1516
|
style: { borderRadius: "var(--radius)", maxHeight: "90%" },
|
|
1902
1517
|
children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
1904
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ l("div", { className: "p-5 pb-0 flex-shrink-0 relative", children: [
|
|
1519
|
+
/* @__PURE__ */ e(
|
|
1905
1520
|
"button",
|
|
1906
1521
|
{
|
|
1907
|
-
onClick: (
|
|
1908
|
-
|
|
1522
|
+
onClick: (o) => {
|
|
1523
|
+
o.stopPropagation(), t();
|
|
1909
1524
|
},
|
|
1910
1525
|
className: "absolute top-3 right-3 p-1.5 text-zinc-400 hover:text-white hover:bg-white/10 rounded-full transition-colors",
|
|
1911
|
-
children: /* @__PURE__ */
|
|
1526
|
+
children: /* @__PURE__ */ e(Ai, { className: "w-4 h-4" })
|
|
1912
1527
|
}
|
|
1913
1528
|
),
|
|
1914
|
-
/* @__PURE__ */
|
|
1529
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-bold text-white mb-4 uppercase tracking-wider border-b border-white/10 pb-2", children: "Video Statistics" })
|
|
1915
1530
|
] }),
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */
|
|
1918
|
-
/* @__PURE__ */
|
|
1919
|
-
] },
|
|
1531
|
+
/* @__PURE__ */ e("div", { className: "overflow-y-auto hide-scrollbar p-5 pt-0 space-y-2.5 flex-1 min-h-0", children: Object.entries(i).map(([o, d]) => /* @__PURE__ */ l("div", { className: "flex flex-col sm:flex-row sm:justify-between sm:items-center gap-1", children: [
|
|
1532
|
+
/* @__PURE__ */ e("span", { className: "text-zinc-500 font-bold shrink-0", children: o }),
|
|
1533
|
+
/* @__PURE__ */ e("span", { className: "text-zinc-200 truncate select-all font-medium bg-white/5 px-1.5 py-0.5 rounded break-all text-right", title: String(d), children: String(d) })
|
|
1534
|
+
] }, o)) })
|
|
1920
1535
|
]
|
|
1921
1536
|
}
|
|
1922
1537
|
) });
|
|
1923
|
-
},
|
|
1538
|
+
}, Ui = [
|
|
1924
1539
|
{ label: "Strata", value: "#6366f1" },
|
|
1925
1540
|
{ label: "Emerald", value: "#10b981" },
|
|
1926
1541
|
{ label: "Rose", value: "#f43f5e" },
|
|
1927
1542
|
{ label: "Amber", value: "#f59e0b" },
|
|
1928
1543
|
{ label: "Sky", value: "#0ea5e9" },
|
|
1929
1544
|
{ label: "Violet", value: "#8b5cf6" }
|
|
1930
|
-
],
|
|
1545
|
+
], Gi = [
|
|
1931
1546
|
{ label: "Default", value: "default", color: "#6366f1" },
|
|
1932
1547
|
{ label: "Pixel", value: "pixel", color: "#ef4444" },
|
|
1933
1548
|
{ label: "Game", value: "game", color: "#eab308" },
|
|
1934
1549
|
{ label: "Hacker", value: "hacker", color: "#22c55e" }
|
|
1935
|
-
],
|
|
1936
|
-
var
|
|
1937
|
-
const { src:
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1940
|
-
Ne((
|
|
1941
|
-
}, [
|
|
1942
|
-
() =>
|
|
1943
|
-
() =>
|
|
1944
|
-
), [$,
|
|
1945
|
-
|
|
1946
|
-
if (!
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1550
|
+
], xt = ({ content: s, className: t, style: i }) => typeof s == "string" ? s.trim().startsWith("<") ? /* @__PURE__ */ e("div", { className: t, style: i, dangerouslySetInnerHTML: { __html: s } }) : /* @__PURE__ */ e("div", { className: t, style: i, children: s }) : /* @__PURE__ */ e("div", { className: t, style: i, children: s }), wt = (s) => {
|
|
1551
|
+
var ct, dt;
|
|
1552
|
+
const { src: t, type: i, sources: r, poster: o, autoPlay: d, thumbnails: m, textTracks: v, plugins: w, onGetInstance: b, ...h } = s, y = h.screenshot ?? !1, k = h.pip ?? !0, z = h.setting ?? !0, R = h.fullscreen ?? !0, p = h.fullscreenWeb ?? !1, W = h.lock ?? !1, D = h.fastForward ?? !0, Nt = h.flip ?? !0, Tt = h.aspectRatio ?? !0, $e = h.hotKey ?? !0, Mt = h.backdrop ?? !0, ue = h.gestureSeek ?? !1, zt = h.centerControls ?? !0, Ee = h.fetchTimeout ?? 3e4;
|
|
1553
|
+
h.autoOrientation;
|
|
1554
|
+
const q = I(null), [n, Pe] = N(null), [he, me] = N(!1), [Fe, It] = N(0), [Rt, Lt] = N(0), Ae = Ce(() => kt(h), []), a = Yt(
|
|
1555
|
+
Ne((c) => n ? n.store.subscribe(c) : () => {
|
|
1556
|
+
}, [n]),
|
|
1557
|
+
() => n ? n.store.get() : Ae,
|
|
1558
|
+
() => Ae
|
|
1559
|
+
), [$, V] = N(!1), [E, U] = N(!1), [F, M] = N("main"), [Z, fe] = N({ x: 0, y: 0, visible: !1 }), [$t, Be] = N(!1), Ve = ht($, 200), Oe = ht(E, 200), [pe, ne] = N(!1), [re, be] = N(0), [Et, je] = N(!1), [Pt, He] = N(!1), [ve, oe] = N(!1), [We, De] = N([]), [Ue, Ge] = N(null), [Ft, At] = N(0), [G, _e] = N(null), [Q, ae] = N(null), [_i, qe] = N(null), [ge, Qe] = N(!1), xe = I(null), Xe = I(1), te = I(null), Je = I(0), ee = I(!1), ie = I(null), _ = I(null), we = I(null), ye = I(null), se = I(null);
|
|
1560
|
+
P(() => {
|
|
1561
|
+
if (!q.current) return;
|
|
1562
|
+
const c = new ni({ ...h, poster: o });
|
|
1563
|
+
w && w.length > 0 && w.forEach((g) => c.use(g)), c.attach(q.current), Pe(c), b && b(c);
|
|
1949
1564
|
const f = new ResizeObserver((g) => {
|
|
1950
|
-
for (const
|
|
1951
|
-
|
|
1565
|
+
for (const S of g)
|
|
1566
|
+
It(S.contentRect.height), Lt(S.contentRect.width);
|
|
1952
1567
|
});
|
|
1953
|
-
return f.observe(
|
|
1954
|
-
f.disconnect(),
|
|
1568
|
+
return f.observe(q.current), () => {
|
|
1569
|
+
f.disconnect(), c.destroy(), Pe(null);
|
|
1955
1570
|
};
|
|
1956
|
-
}, []),
|
|
1957
|
-
if (!
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1960
|
-
}, [
|
|
1961
|
-
if (!
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1964
|
-
}, [
|
|
1965
|
-
|
|
1571
|
+
}, []), P(() => {
|
|
1572
|
+
if (!n) return;
|
|
1573
|
+
const c = {};
|
|
1574
|
+
h.theme !== void 0 && h.theme !== a.theme && (c.theme = h.theme), h.themeColor !== void 0 && h.themeColor !== a.themeColor && (c.themeColor = h.themeColor), h.iconSize !== void 0 && h.iconSize !== a.iconSize && (c.iconSize = h.iconSize), Object.keys(c).length > 0 && n.setAppearance(c), h.volume !== void 0 && Math.abs(h.volume - a.volume) > 0.01 && n.setVolume(h.volume), h.muted !== void 0 && h.muted !== a.isMuted && (h.muted ? n.video.muted = !0 : n.video.muted = !1);
|
|
1575
|
+
}, [n, h.theme, h.themeColor, h.iconSize, h.volume, h.muted]), P(() => {
|
|
1576
|
+
if (!n) return;
|
|
1577
|
+
const c = v || [];
|
|
1578
|
+
r && r.length > 0 ? (me(!1), n.setSources(r, c)) : t && (me(!1), n.setSources([{ url: t, type: i || "auto" }], c));
|
|
1579
|
+
}, [t, i, r, v, n]), P(() => {
|
|
1580
|
+
n && d && (n.video.muted = !0, n.store.setState({ isMuted: !0 }), n.play().catch(() => {
|
|
1966
1581
|
}));
|
|
1967
|
-
}, [
|
|
1582
|
+
}, [n, d]), P(() => {
|
|
1968
1583
|
a.isPlaying && !he && me(!0);
|
|
1969
|
-
}, [a.isPlaying, he]),
|
|
1970
|
-
m &&
|
|
1971
|
-
}, [m,
|
|
1972
|
-
|
|
1584
|
+
}, [a.isPlaying, he]), P(() => {
|
|
1585
|
+
m && n ? oi(m, n.notify.bind(n), Ee).then((c) => De(c)) : De([]);
|
|
1586
|
+
}, [m, n, Ee]), P(() => (Q && (se.current && clearTimeout(se.current), se.current = setTimeout(() => {
|
|
1587
|
+
ae(null);
|
|
1973
1588
|
}, 600)), () => {
|
|
1974
1589
|
se.current && clearTimeout(se.current);
|
|
1975
|
-
}), [
|
|
1976
|
-
const
|
|
1977
|
-
var
|
|
1978
|
-
if (!
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1590
|
+
}), [Q]), P(() => {
|
|
1591
|
+
const c = (f) => {
|
|
1592
|
+
var S;
|
|
1593
|
+
if (!n || !$e || ((S = document.activeElement) == null ? void 0 : S.tagName) === "INPUT") return;
|
|
1594
|
+
switch (f.key.toLowerCase()) {
|
|
1595
|
+
case " ":
|
|
1596
|
+
case "k":
|
|
1597
|
+
f.preventDefault(), n.togglePlay();
|
|
1598
|
+
break;
|
|
1599
|
+
case "arrowright":
|
|
1600
|
+
f.preventDefault(), n.skip(5);
|
|
1601
|
+
break;
|
|
1602
|
+
case "arrowleft":
|
|
1603
|
+
f.preventDefault(), n.skip(-5);
|
|
1604
|
+
break;
|
|
1605
|
+
case "arrowup":
|
|
1606
|
+
f.preventDefault(), n.setVolume(n.video.volume + 0.1);
|
|
1607
|
+
break;
|
|
1608
|
+
case "arrowdown":
|
|
1609
|
+
f.preventDefault(), n.setVolume(n.video.volume - 0.1);
|
|
1610
|
+
break;
|
|
1611
|
+
case "f":
|
|
1612
|
+
f.preventDefault(), n.toggleFullscreen();
|
|
1613
|
+
break;
|
|
1614
|
+
case "m":
|
|
1615
|
+
f.preventDefault(), n.toggleMute();
|
|
1616
|
+
break;
|
|
1617
|
+
case "escape":
|
|
1618
|
+
n.store.get().isWebFullscreen && (f.preventDefault(), n.toggleWebFullscreen());
|
|
1619
|
+
break;
|
|
1620
|
+
}
|
|
2003
1621
|
};
|
|
2004
|
-
return window.addEventListener("keydown",
|
|
2005
|
-
}, [
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2008
|
-
!a.isPlaying || $ ||
|
|
1622
|
+
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
1623
|
+
}, [n, $e]);
|
|
1624
|
+
const Ke = () => {
|
|
1625
|
+
n && (n.setControlsVisible(!0), _.current && clearTimeout(_.current), !($ || E) && (_.current = setTimeout(() => {
|
|
1626
|
+
!a.isPlaying || $ || E || n.setControlsVisible(!1);
|
|
2009
1627
|
}, 2500)));
|
|
2010
1628
|
};
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
}, [$,
|
|
2014
|
-
const
|
|
2015
|
-
!
|
|
2016
|
-
|
|
1629
|
+
P(() => {
|
|
1630
|
+
n && (!$ && !E && a.isPlaying ? Ke() : ($ || E) && (n.setControlsVisible(!0), _.current && clearTimeout(_.current)));
|
|
1631
|
+
}, [$, E, a.isPlaying, n]);
|
|
1632
|
+
const Ye = Ne(() => {
|
|
1633
|
+
!D || !n || !a.isPlaying || a.isLocked || (Xe.current = n.video.playbackRate, xe.current = setTimeout(() => {
|
|
1634
|
+
n.video.playbackRate = 2, Qe(!0);
|
|
2017
1635
|
}, 500));
|
|
2018
|
-
}, [
|
|
2019
|
-
xe.current && clearTimeout(xe.current), ge &&
|
|
2020
|
-
}, [ge,
|
|
2021
|
-
|
|
2022
|
-
},
|
|
1636
|
+
}, [D, n, a.isPlaying, a.isLocked]), ke = Ne(() => {
|
|
1637
|
+
xe.current && clearTimeout(xe.current), ge && n && (n.video.playbackRate = Xe.current, Qe(!1));
|
|
1638
|
+
}, [ge, n]), Bt = (c) => {
|
|
1639
|
+
Ye(), ue && !a.isLocked && (te.current = c.touches[0].clientX, Je.current = a.currentTime, ee.current = !1);
|
|
1640
|
+
}, Vt = (c) => {
|
|
2023
1641
|
if (!a.isLocked && ue && te.current !== null) {
|
|
2024
|
-
const f =
|
|
2025
|
-
if (Math.abs(f) > 10 && (ke(), ee.current = !0, ne(!0),
|
|
2026
|
-
const g =
|
|
1642
|
+
const f = c.touches[0].clientX - te.current;
|
|
1643
|
+
if (Math.abs(f) > 10 && (ke(), ee.current = !0, ne(!0), q.current && a.duration)) {
|
|
1644
|
+
const g = q.current.getBoundingClientRect(), S = f / g.width, j = Math.max(0, Math.min(a.duration, Je.current + S * a.duration));
|
|
2027
1645
|
be(j);
|
|
2028
1646
|
}
|
|
2029
1647
|
}
|
|
2030
|
-
},
|
|
1648
|
+
}, Ot = (c) => {
|
|
2031
1649
|
if (ke(), ue && ee.current) {
|
|
2032
|
-
|
|
1650
|
+
n == null || n.seek(re), ne(!1), ee.current = !1, te.current = null;
|
|
2033
1651
|
return;
|
|
2034
1652
|
}
|
|
2035
1653
|
te.current = null;
|
|
2036
|
-
}, Se = (
|
|
2037
|
-
if (!
|
|
2038
|
-
const f =
|
|
1654
|
+
}, Se = (c) => {
|
|
1655
|
+
if (!we.current || !a.duration) return 0;
|
|
1656
|
+
const f = we.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
|
|
2039
1657
|
return Math.max(0, Math.min(1, (g - f.left) / f.width)) * a.duration;
|
|
2040
|
-
},
|
|
1658
|
+
}, Ze = (c) => {
|
|
2041
1659
|
if (a.isLocked) return;
|
|
2042
|
-
ne(!0), be(Se(
|
|
2043
|
-
const f = (
|
|
2044
|
-
|
|
1660
|
+
ne(!0), be(Se(c));
|
|
1661
|
+
const f = (S) => be(Se(S)), g = (S) => {
|
|
1662
|
+
n == null || n.seek(Se(S)), ne(!1), document.removeEventListener("mousemove", f), document.removeEventListener("touchmove", f), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
|
|
2045
1663
|
};
|
|
2046
1664
|
document.addEventListener("mousemove", f), document.addEventListener("touchmove", f), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
|
|
2047
|
-
},
|
|
2048
|
-
if (!
|
|
2049
|
-
const f =
|
|
1665
|
+
}, et = (c) => {
|
|
1666
|
+
if (!ye.current) return 0;
|
|
1667
|
+
const f = ye.current.getBoundingClientRect(), g = "touches" in c ? c.touches[0].clientX : c.clientX;
|
|
2050
1668
|
return Math.max(0, Math.min(1, (g - f.left) / f.width));
|
|
2051
|
-
},
|
|
2052
|
-
if (!
|
|
2053
|
-
|
|
2054
|
-
const f = (
|
|
2055
|
-
|
|
1669
|
+
}, tt = (c) => {
|
|
1670
|
+
if (!n || a.isLocked) return;
|
|
1671
|
+
je(!0), n.setVolume(et(c));
|
|
1672
|
+
const f = (S) => n.setVolume(et(S)), g = () => {
|
|
1673
|
+
je(!1), document.removeEventListener("mousemove", f), document.removeEventListener("touchmove", f), document.removeEventListener("mouseup", g), document.removeEventListener("touchend", g);
|
|
2056
1674
|
};
|
|
2057
1675
|
document.addEventListener("mousemove", f), document.addEventListener("touchmove", f), document.addEventListener("mouseup", g), document.addEventListener("touchend", g);
|
|
2058
|
-
},
|
|
1676
|
+
}, jt = (c) => {
|
|
2059
1677
|
if (!a.duration || a.isLive) return;
|
|
2060
|
-
const f =
|
|
2061
|
-
|
|
2062
|
-
}, le = (
|
|
2063
|
-
!
|
|
2064
|
-
},
|
|
2065
|
-
if (!
|
|
1678
|
+
const f = c.currentTarget.getBoundingClientRect(), g = (c.clientX - f.left) / f.width, S = g * a.duration;
|
|
1679
|
+
At(g * 100), Ge(S), We.length > 0 && _e(We.find((j) => S >= j.start && S < j.end) || null);
|
|
1680
|
+
}, le = (c) => {
|
|
1681
|
+
!n || a.isLocked || (n.skip(c === "forward" ? 10 : -10), qe(c), setTimeout(() => qe(null), 300));
|
|
1682
|
+
}, Ht = (c) => {
|
|
1683
|
+
if (!n) return;
|
|
2066
1684
|
if (ee.current) {
|
|
2067
1685
|
ee.current = !1;
|
|
2068
1686
|
return;
|
|
2069
1687
|
}
|
|
2070
|
-
if ($ &&
|
|
2071
|
-
!a.isPlaying || $ ||
|
|
1688
|
+
if ($ && V(!1), E && U(!1), ve && oe(!1), Z.visible && fe({ ...Z, visible: !1 }), n.setControlsVisible(!0), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
|
|
1689
|
+
!a.isPlaying || $ || E || n.setControlsVisible(!1);
|
|
2072
1690
|
}, 2500), a.isLocked) return;
|
|
2073
|
-
const f =
|
|
2074
|
-
ie.current ? (clearTimeout(ie.current), ie.current = null, g <
|
|
2075
|
-
|
|
1691
|
+
const f = c.currentTarget.getBoundingClientRect(), g = c.clientX - f.left, S = f.width, j = Date.now();
|
|
1692
|
+
ie.current ? (clearTimeout(ie.current), ie.current = null, g < S * 0.35 ? (le("rewind"), ae({ type: "rewind", id: j })) : g > S * 0.65 ? (le("forward"), ae({ type: "forward", id: j })) : n.toggleFullscreen()) : ie.current = setTimeout(() => {
|
|
1693
|
+
n.togglePlay(), ie.current = null;
|
|
2076
1694
|
}, 250);
|
|
2077
|
-
}, Wt = (
|
|
1695
|
+
}, Wt = (c) => {
|
|
2078
1696
|
var g;
|
|
2079
|
-
if (
|
|
2080
|
-
const f = (g =
|
|
1697
|
+
if (c.preventDefault(), a.isLocked) return;
|
|
1698
|
+
const f = (g = q.current) == null ? void 0 : g.getBoundingClientRect();
|
|
2081
1699
|
f && fe({
|
|
2082
1700
|
visible: !0,
|
|
2083
|
-
x:
|
|
2084
|
-
y:
|
|
1701
|
+
x: c.clientX - f.left,
|
|
1702
|
+
y: c.clientY - f.top
|
|
2085
1703
|
});
|
|
2086
|
-
},
|
|
2087
|
-
|
|
1704
|
+
}, Dt = (c) => {
|
|
1705
|
+
c.stopPropagation();
|
|
2088
1706
|
const f = "ontouchstart" in window || navigator.maxTouchPoints > 0, g = window.matchMedia("(hover: none)").matches || f;
|
|
2089
1707
|
if (ve) {
|
|
2090
|
-
|
|
1708
|
+
oe(!1);
|
|
2091
1709
|
return;
|
|
2092
1710
|
}
|
|
2093
|
-
g ?
|
|
2094
|
-
}, Ut = a.isMuted || a.volume === 0 ?
|
|
1711
|
+
g ? oe(!0) : n == null || n.toggleMute();
|
|
1712
|
+
}, Ut = a.isMuted || a.volume === 0 ? ci : a.volume < 0.5 ? li : ai, it = Math.max(100, Fe - 120), Gt = () => {
|
|
2095
1713
|
switch (a.iconSize) {
|
|
2096
1714
|
case "small":
|
|
2097
1715
|
return "w-4 h-4";
|
|
@@ -2109,7 +1727,7 @@ const _i = y("Zap", [
|
|
|
2109
1727
|
default:
|
|
2110
1728
|
return "p-2.5 min-w-[36px] min-h-[36px]";
|
|
2111
1729
|
}
|
|
2112
|
-
},
|
|
1730
|
+
}, A = Gt(), O = _t(), X = (() => {
|
|
2113
1731
|
switch (a.iconSize) {
|
|
2114
1732
|
case "small":
|
|
2115
1733
|
return {
|
|
@@ -2133,8 +1751,8 @@ const _i = y("Zap", [
|
|
|
2133
1751
|
skipIcon: "w-6 h-6"
|
|
2134
1752
|
};
|
|
2135
1753
|
}
|
|
2136
|
-
})(),
|
|
2137
|
-
const
|
|
1754
|
+
})(), qt = !a.isLocked && (a.controlsVisible || !a.isPlaying || $ || E), st = Pt || Et || ve, nt = Mt ? "backdrop-blur-xl bg-black/80" : "bg-black/95", rt = Ce(() => {
|
|
1755
|
+
const c = [
|
|
2138
1756
|
{ id: "play", position: "left", index: 10, isBuiltIn: !0 },
|
|
2139
1757
|
{ id: "volume", position: "left", index: 20, isBuiltIn: !0 },
|
|
2140
1758
|
{ id: "time", position: "left", index: 30, isBuiltIn: !0 },
|
|
@@ -2146,192 +1764,192 @@ const _i = y("Zap", [
|
|
|
2146
1764
|
{ id: "fullscreenWeb", position: "right", index: 110, isBuiltIn: !0 },
|
|
2147
1765
|
{ id: "fullscreen", position: "right", index: 120, isBuiltIn: !0 }
|
|
2148
1766
|
];
|
|
2149
|
-
return
|
|
2150
|
-
const g =
|
|
2151
|
-
g ? Object.assign(g, f) :
|
|
2152
|
-
}),
|
|
2153
|
-
}, [
|
|
2154
|
-
var f, g,
|
|
2155
|
-
if (!
|
|
2156
|
-
return /* @__PURE__ */
|
|
1767
|
+
return h.controls && h.controls.forEach((f) => {
|
|
1768
|
+
const g = c.find((S) => S.id === f.id);
|
|
1769
|
+
g ? Object.assign(g, f) : c.push(f);
|
|
1770
|
+
}), c.filter((f) => !(f.id === "screenshot" && !y || f.id === "pip" && !k || f.id === "settings" && !z || f.id === "fullscreen" && !R || f.id === "fullscreenWeb" && !p)).sort((f, g) => f.index - g.index);
|
|
1771
|
+
}, [h.controls, y, k, z, R, p]), ot = (c) => {
|
|
1772
|
+
var f, g, S, j, ut;
|
|
1773
|
+
if (!c.isBuiltIn)
|
|
1774
|
+
return /* @__PURE__ */ e(
|
|
2157
1775
|
"button",
|
|
2158
1776
|
{
|
|
2159
1777
|
onClick: () => {
|
|
2160
|
-
|
|
1778
|
+
c.click ? c.click(n) : c.onClick && c.onClick(n);
|
|
2161
1779
|
},
|
|
2162
|
-
className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none flex items-center justify-center ${O} ${
|
|
2163
|
-
style: { borderRadius: "var(--radius)", ...
|
|
2164
|
-
title:
|
|
2165
|
-
children: /* @__PURE__ */
|
|
1780
|
+
className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none flex items-center justify-center ${O} ${c.className || ""}`,
|
|
1781
|
+
style: { borderRadius: "var(--radius)", ...c.style },
|
|
1782
|
+
title: c.tooltip,
|
|
1783
|
+
children: /* @__PURE__ */ e(xt, { content: c.html || "" })
|
|
2166
1784
|
},
|
|
2167
|
-
|
|
1785
|
+
c.index
|
|
2168
1786
|
);
|
|
2169
|
-
switch (
|
|
1787
|
+
switch (c.id) {
|
|
2170
1788
|
case "play":
|
|
2171
|
-
return /* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.togglePlay(), className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: a.isPlaying ? /* @__PURE__ */ e(ft, { className: `${A} fill-current` }) : /* @__PURE__ */ e(mt, { className: `${A} fill-current` }) }, "play");
|
|
2172
1790
|
case "volume":
|
|
2173
|
-
return /* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ l(
|
|
2174
1792
|
"div",
|
|
2175
1793
|
{
|
|
2176
1794
|
className: "flex items-center gap-2 group/vol relative",
|
|
2177
1795
|
onMouseEnter: () => {
|
|
2178
|
-
window.matchMedia("(hover: hover)").matches &&
|
|
1796
|
+
window.matchMedia("(hover: hover)").matches && He(!0);
|
|
2179
1797
|
},
|
|
2180
1798
|
onMouseLeave: () => {
|
|
2181
|
-
window.matchMedia("(hover: hover)").matches &&
|
|
1799
|
+
window.matchMedia("(hover: hover)").matches && He(!1);
|
|
2182
1800
|
},
|
|
2183
1801
|
children: [
|
|
2184
|
-
/* @__PURE__ */
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
/* @__PURE__ */
|
|
2187
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ e("button", { onClick: Dt, className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(Ut, { className: A }) }),
|
|
1803
|
+
/* @__PURE__ */ e("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${st ? "w-28 opacity-100 ml-1" : "w-0 opacity-0"}`, children: /* @__PURE__ */ l("div", { ref: ye, className: "relative w-full h-full flex items-center cursor-pointer px-2", onMouseDown: tt, onTouchStart: tt, children: [
|
|
1804
|
+
/* @__PURE__ */ e("div", { className: "w-full h-1 bg-white/20 overflow-hidden", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ e("div", { className: "h-full bg-white", style: { width: `${(a.isMuted ? 0 : a.volume) * 100}%`, borderRadius: "var(--radius-full)" } }) }),
|
|
1805
|
+
/* @__PURE__ */ e("div", { className: "absolute h-3 w-3 bg-white shadow-md top-1/2 -translate-y-1/2 pointer-events-none", style: { left: `calc(${(a.isMuted ? 0 : a.volume) * 100}% * 0.85 + 4px)`, borderRadius: "var(--radius-full)" } })
|
|
2188
1806
|
] }) }),
|
|
2189
|
-
|
|
1807
|
+
st && /* @__PURE__ */ e("div", { className: "strata-tooltip absolute bottom-full mb-2 px-1.5 py-0.5 rounded text-[10px] font-bold font-mono shadow-lg pointer-events-none whitespace-nowrap z-50 transform -translate-x-1/2", style: { left: `calc(52px + ${(a.isMuted ? 0 : a.volume) * 80}px)` }, children: a.isMuted ? "0%" : `${Math.round(a.volume * 100)}%` })
|
|
2190
1808
|
]
|
|
2191
1809
|
},
|
|
2192
1810
|
"volume"
|
|
2193
1811
|
);
|
|
2194
1812
|
case "time":
|
|
2195
|
-
return
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
] }, "live") : /* @__PURE__ */
|
|
2199
|
-
|
|
1813
|
+
return h.isLive ? /* @__PURE__ */ l("div", { className: "flex items-center gap-2 px-2 py-0.5 bg-red-500/10 border border-red-500/20 rounded-md", children: [
|
|
1814
|
+
/* @__PURE__ */ e("div", { className: "w-2 h-2 rounded-full bg-red-500 animate-pulse" }),
|
|
1815
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-bold text-red-500 tracking-wider", children: "LIVE" })
|
|
1816
|
+
] }, "live") : /* @__PURE__ */ l("div", { className: "text-xs font-medium text-zinc-400 font-mono select-none hidden sm:block tabular-nums", children: [
|
|
1817
|
+
Te(pe ? re : a.currentTime),
|
|
2200
1818
|
" ",
|
|
2201
|
-
/* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ e("span", { className: "text-zinc-600", children: "/" }),
|
|
2202
1820
|
" ",
|
|
2203
|
-
|
|
1821
|
+
Te(a.duration)
|
|
2204
1822
|
] }, "time");
|
|
2205
1823
|
case "subtitle":
|
|
2206
|
-
return /* @__PURE__ */
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
u.stopPropagation(),
|
|
2209
|
-
}, className: `strata-control-btn transition-colors focus:outline-none ${O} ${
|
|
2210
|
-
|
|
2211
|
-
|
|
1824
|
+
return /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
1825
|
+
/* @__PURE__ */ e("button", { onClick: (u) => {
|
|
1826
|
+
u.stopPropagation(), U(!E), V(!1);
|
|
1827
|
+
}, className: `strata-control-btn transition-colors focus:outline-none ${O} ${E ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(fi, { className: A }) }),
|
|
1828
|
+
Oe.isMounted && /* @__PURE__ */ e(
|
|
1829
|
+
Hi,
|
|
2212
1830
|
{
|
|
2213
1831
|
tracks: a.subtitleTracks,
|
|
2214
1832
|
current: a.currentSubtitle,
|
|
2215
|
-
onSelect: (u) =>
|
|
2216
|
-
onUpload: (u) =>
|
|
2217
|
-
onClose: () =>
|
|
1833
|
+
onSelect: (u) => n == null ? void 0 : n.setSubtitle(u),
|
|
1834
|
+
onUpload: (u) => n == null ? void 0 : n.addTextTrack(u, u.name),
|
|
1835
|
+
onClose: () => U(!1),
|
|
2218
1836
|
settings: a.subtitleSettings,
|
|
2219
|
-
onSettingsChange: (u) =>
|
|
2220
|
-
onReset: () =>
|
|
1837
|
+
onSettingsChange: (u) => n == null ? void 0 : n.updateSubtitleSettings(u),
|
|
1838
|
+
onReset: () => n == null ? void 0 : n.resetSubtitleSettings(),
|
|
2221
1839
|
offset: a.subtitleOffset,
|
|
2222
|
-
onOffsetChange: (u) =>
|
|
2223
|
-
maxHeight:
|
|
2224
|
-
animationClass: `strata-backdrop ${
|
|
1840
|
+
onOffsetChange: (u) => n == null ? void 0 : n.setSubtitleOffset(u),
|
|
1841
|
+
maxHeight: it,
|
|
1842
|
+
animationClass: `strata-backdrop ${nt} ${Oe.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`
|
|
2225
1843
|
}
|
|
2226
1844
|
)
|
|
2227
1845
|
] }, "subtitle");
|
|
2228
1846
|
case "screenshot":
|
|
2229
|
-
return /* @__PURE__ */
|
|
1847
|
+
return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.screenshot(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, title: "Screenshot", children: /* @__PURE__ */ e(Li, { className: A }) }, "ss");
|
|
2230
1848
|
case "pip":
|
|
2231
|
-
return /* @__PURE__ */
|
|
1849
|
+
return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.togglePip(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(mi, { className: A }) }, "pip");
|
|
2232
1850
|
case "download":
|
|
2233
|
-
return /* @__PURE__ */
|
|
1851
|
+
return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.download(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(pi, { className: A }) }, "dl");
|
|
2234
1852
|
case "fullscreen":
|
|
2235
|
-
return /* @__PURE__ */
|
|
1853
|
+
return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.toggleFullscreen(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 rounded-lg transition-transform hover:scale-110 focus:outline-none ${O}`, style: { borderRadius: "var(--radius)" }, children: a.isFullscreen ? /* @__PURE__ */ e(ui, { className: A }) : /* @__PURE__ */ e(di, { className: A }) }, "fs");
|
|
2236
1854
|
case "fullscreenWeb":
|
|
2237
|
-
return /* @__PURE__ */
|
|
1855
|
+
return /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.toggleWebFullscreen(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 hidden sm:block focus:outline-none ${O} ${a.isWebFullscreen ? "text-[var(--accent)]" : ""}`, style: { borderRadius: "var(--radius)" }, title: "Web Fullscreen", children: /* @__PURE__ */ e(Pi, { className: A }) }, "fsw");
|
|
2238
1856
|
case "settings":
|
|
2239
|
-
return /* @__PURE__ */
|
|
2240
|
-
/* @__PURE__ */
|
|
2241
|
-
u.stopPropagation(),
|
|
2242
|
-
}, className: `strata-control-btn transition-all duration-300 focus:outline-none ${O} ${$ ? "rotate-90 text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
a.sources.length > 1 && /* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2254
|
-
/* @__PURE__ */
|
|
2255
|
-
/* @__PURE__ */
|
|
2256
|
-
|
|
1857
|
+
return /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
1858
|
+
/* @__PURE__ */ e("button", { onClick: (u) => {
|
|
1859
|
+
u.stopPropagation(), V(!$), U(!1), M("main");
|
|
1860
|
+
}, className: `strata-control-btn transition-all duration-300 focus:outline-none ${O} ${$ ? "rotate-90 text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e(hi, { className: A }) }),
|
|
1861
|
+
Ve.isMounted && /* @__PURE__ */ e(Ct, { onClose: () => V(!1), align: "right", maxHeight: it, className: `strata-backdrop ${nt} ${Ve.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"}`, children: /* @__PURE__ */ l("div", { className: "w-full", children: [
|
|
1862
|
+
F === "main" && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
|
|
1863
|
+
/* @__PURE__ */ e("div", { className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("span", { children: "Settings" }) }),
|
|
1864
|
+
a.sources.length > 1 && /* @__PURE__ */ e(T, { label: "Source", value: ((f = a.sources[a.currentSourceIndex]) == null ? void 0 : f.name) || `Source ${a.currentSourceIndex + 1}`, onClick: () => M("sources"), hasSubmenu: !0 }),
|
|
1865
|
+
/* @__PURE__ */ e(T, { label: "Speed", value: `${a.playbackRate}x`, onClick: () => M("speed"), hasSubmenu: !0 }),
|
|
1866
|
+
/* @__PURE__ */ e(T, { label: "Quality", value: a.currentQuality === -1 ? "Auto" : `${(g = a.qualityLevels[a.currentQuality]) == null ? void 0 : g.height}p`, onClick: () => M("quality"), hasSubmenu: !0 }),
|
|
1867
|
+
/* @__PURE__ */ e(T, { label: "Audio", value: ((S = a.audioTracks[a.currentAudioTrack]) == null ? void 0 : S.label) || "Default", onClick: () => M("audio"), hasSubmenu: !0 }),
|
|
1868
|
+
Nt && /* @__PURE__ */ e(T, { label: "Flip", value: a.flipState.horizontal ? "H" : a.flipState.vertical ? "V" : "Normal", onClick: () => M("flip"), hasSubmenu: !0 }),
|
|
1869
|
+
Tt && /* @__PURE__ */ e(T, { label: "Aspect Ratio", value: a.aspectRatio, onClick: () => M("ratio"), hasSubmenu: !0 }),
|
|
1870
|
+
/* @__PURE__ */ e(gt, {}),
|
|
1871
|
+
/* @__PURE__ */ e(T, { label: "Audio Boost", value: a.audioGain > 1 ? `${a.audioGain}x` : "Off", onClick: () => M("boost"), hasSubmenu: !0 }),
|
|
1872
|
+
/* @__PURE__ */ e(T, { label: "Watch Party", icon: /* @__PURE__ */ e(xi, { className: "w-4 h-4" }), onClick: () => M("party"), hasSubmenu: !0 }),
|
|
1873
|
+
/* @__PURE__ */ e(T, { label: "Cast to Device", icon: /* @__PURE__ */ e(gi, { className: "w-4 h-4" }), onClick: () => {
|
|
1874
|
+
n == null || n.requestCast(), V(!1);
|
|
2257
1875
|
} }),
|
|
2258
|
-
(j =
|
|
1876
|
+
(j = h.settings) == null ? void 0 : j.map((u, J) => u.switch !== void 0 ? /* @__PURE__ */ e("div", { className: "px-1", children: /* @__PURE__ */ e(
|
|
2259
1877
|
K,
|
|
2260
1878
|
{
|
|
2261
1879
|
label: u.html,
|
|
2262
1880
|
icon: u.icon,
|
|
2263
1881
|
checked: u.switch,
|
|
2264
1882
|
tooltip: u.tooltip,
|
|
2265
|
-
onChange: (
|
|
1883
|
+
onChange: (Qi) => {
|
|
2266
1884
|
u.onSwitch && u.onSwitch(u);
|
|
2267
1885
|
}
|
|
2268
1886
|
}
|
|
2269
|
-
) }, `cust-${J}`) : /* @__PURE__ */
|
|
2270
|
-
|
|
1887
|
+
) }, `cust-${J}`) : /* @__PURE__ */ e(
|
|
1888
|
+
T,
|
|
2271
1889
|
{
|
|
2272
1890
|
label: u.html,
|
|
2273
1891
|
icon: u.icon,
|
|
2274
1892
|
onClick: () => {
|
|
2275
|
-
u.click ? u.click() : u.onClick && u.onClick(),
|
|
1893
|
+
u.click ? u.click() : u.onClick && u.onClick(), V(!1);
|
|
2276
1894
|
}
|
|
2277
1895
|
},
|
|
2278
1896
|
`cust-${J}`
|
|
2279
1897
|
)),
|
|
2280
|
-
/* @__PURE__ */
|
|
2281
|
-
/* @__PURE__ */
|
|
1898
|
+
/* @__PURE__ */ e(gt, {}),
|
|
1899
|
+
/* @__PURE__ */ e(T, { label: "Appearance", icon: /* @__PURE__ */ e(St, { className: "w-4 h-4" }), onClick: () => M("appearance"), hasSubmenu: !0 })
|
|
2282
1900
|
] }),
|
|
2283
|
-
["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio"].includes(
|
|
2284
|
-
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
a.sources.map((u, J) => /* @__PURE__ */
|
|
1901
|
+
["speed", "quality", "audio", "boost", "party", "appearance", "sources", "flip", "ratio"].includes(F) && /* @__PURE__ */ l("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
1902
|
+
F === "sources" && /* @__PURE__ */ l(L, { children: [
|
|
1903
|
+
/* @__PURE__ */ e(H, { label: "Select Source", onBack: () => M("main") }),
|
|
1904
|
+
a.sources.map((u, J) => /* @__PURE__ */ e(T, { label: u.name || `Source ${J + 1}`, value: u.type, active: a.currentSourceIndex === J, onClick: () => n == null ? void 0 : n.switchSource(J) }, J))
|
|
2287
1905
|
] }),
|
|
2288
|
-
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
[0.5, 1, 1.5, 2].map((u) => /* @__PURE__ */
|
|
1906
|
+
F === "speed" && /* @__PURE__ */ l(L, { children: [
|
|
1907
|
+
/* @__PURE__ */ e(H, { label: "Speed", onBack: () => M("main") }),
|
|
1908
|
+
[0.5, 1, 1.5, 2].map((u) => /* @__PURE__ */ e(T, { label: `${u}x`, active: a.playbackRate === u, onClick: () => n.video.playbackRate = u }, u))
|
|
2291
1909
|
] }),
|
|
2292
|
-
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
/* @__PURE__ */
|
|
2295
|
-
a.qualityLevels.map((u) => /* @__PURE__ */
|
|
1910
|
+
F === "quality" && /* @__PURE__ */ l(L, { children: [
|
|
1911
|
+
/* @__PURE__ */ e(H, { label: "Quality", onBack: () => M("main") }),
|
|
1912
|
+
/* @__PURE__ */ e(T, { label: "Auto", active: a.currentQuality === -1, onClick: () => n == null ? void 0 : n.setQuality(-1) }),
|
|
1913
|
+
a.qualityLevels.map((u) => /* @__PURE__ */ e(T, { label: `${u.height}p`, value: `${Math.round(u.bitrate / 1e3)}k`, active: a.currentQuality === u.index, onClick: () => n == null ? void 0 : n.setQuality(u.index) }, u.index))
|
|
2296
1914
|
] }),
|
|
2297
|
-
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
a.audioTracks.length === 0 && /* @__PURE__ */
|
|
2300
|
-
a.audioTracks.map((u) => /* @__PURE__ */
|
|
1915
|
+
F === "audio" && /* @__PURE__ */ l(L, { children: [
|
|
1916
|
+
/* @__PURE__ */ e(H, { label: "Audio Track", onBack: () => M("main") }),
|
|
1917
|
+
a.audioTracks.length === 0 && /* @__PURE__ */ e("div", { className: "px-4 py-3 text-zinc-500 text-xs text-center", children: "No tracks available" }),
|
|
1918
|
+
a.audioTracks.map((u) => /* @__PURE__ */ e(T, { label: u.label, value: u.language, active: a.currentAudioTrack === u.index, onClick: () => n == null ? void 0 : n.setAudioTrack(u.index) }, u.index))
|
|
2301
1919
|
] }),
|
|
2302
|
-
|
|
2303
|
-
/* @__PURE__ */
|
|
2304
|
-
[1, 1.5, 2, 3].map((u) => /* @__PURE__ */
|
|
1920
|
+
F === "boost" && /* @__PURE__ */ l(L, { children: [
|
|
1921
|
+
/* @__PURE__ */ e(H, { label: "Audio Boost", onBack: () => M("main") }),
|
|
1922
|
+
[1, 1.5, 2, 3].map((u) => /* @__PURE__ */ e(T, { label: u === 1 ? "Off" : `${u}x`, active: a.audioGain === u, onClick: () => n == null ? void 0 : n.setAudioGain(u) }, u))
|
|
2305
1923
|
] }),
|
|
2306
|
-
|
|
2307
|
-
/* @__PURE__ */
|
|
2308
|
-
/* @__PURE__ */
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
/* @__PURE__ */
|
|
1924
|
+
F === "flip" && /* @__PURE__ */ l(L, { children: [
|
|
1925
|
+
/* @__PURE__ */ e(H, { label: "Video Flip", onBack: () => M("main") }),
|
|
1926
|
+
/* @__PURE__ */ l("div", { className: "p-2 space-y-1", children: [
|
|
1927
|
+
/* @__PURE__ */ e(K, { label: "Horizontal Flip", checked: a.flipState.horizontal, onChange: () => n == null ? void 0 : n.setFlip("horizontal") }),
|
|
1928
|
+
/* @__PURE__ */ e(K, { label: "Vertical Flip", checked: a.flipState.vertical, onChange: () => n == null ? void 0 : n.setFlip("vertical") })
|
|
2311
1929
|
] })
|
|
2312
1930
|
] }),
|
|
2313
|
-
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
["default", "16:9", "4:3"].map((u) => /* @__PURE__ */
|
|
1931
|
+
F === "ratio" && /* @__PURE__ */ l(L, { children: [
|
|
1932
|
+
/* @__PURE__ */ e(H, { label: "Aspect Ratio", onBack: () => M("main") }),
|
|
1933
|
+
["default", "16:9", "4:3"].map((u) => /* @__PURE__ */ e(T, { label: u === "default" ? "Default" : u, active: a.aspectRatio === u, onClick: () => n == null ? void 0 : n.setAspectRatio(u) }, u))
|
|
2316
1934
|
] }),
|
|
2317
|
-
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
1935
|
+
F === "party" && /* @__PURE__ */ l(L, { children: [
|
|
1936
|
+
/* @__PURE__ */ e(H, { label: "Watch Party", onBack: () => M("main") }),
|
|
1937
|
+
/* @__PURE__ */ l("div", { className: "p-4 space-y-3", children: [
|
|
1938
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-zinc-400 leading-relaxed", children: "Create a synchronized room on WatchParty.me to watch together." }),
|
|
1939
|
+
/* @__PURE__ */ e("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((ut = a.sources[a.currentSourceIndex]) == null ? void 0 : ut.url) || t || "")}`, target: "_blank", rel: "noopener noreferrer", className: "flex items-center justify-center w-full py-2.5 bg-[var(--accent)] hover:opacity-90 text-white font-medium transition-opacity text-xs", style: { borderRadius: "var(--radius)" }, children: "Create Room" })
|
|
2322
1940
|
] })
|
|
2323
1941
|
] }),
|
|
2324
|
-
|
|
2325
|
-
/* @__PURE__ */
|
|
2326
|
-
/* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
/* @__PURE__ */
|
|
2330
|
-
/* @__PURE__ */
|
|
2331
|
-
/* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
2333
|
-
/* @__PURE__ */
|
|
2334
|
-
/* @__PURE__ */
|
|
1942
|
+
F === "appearance" && /* @__PURE__ */ l(L, { children: [
|
|
1943
|
+
/* @__PURE__ */ e(H, { label: "Appearance", onBack: () => M("main") }),
|
|
1944
|
+
/* @__PURE__ */ l("div", { className: "pb-1", children: [
|
|
1945
|
+
/* @__PURE__ */ e(Y, { title: "Theme", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 px-3", children: Gi.map((u) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ theme: u.value, themeColor: u.color }), className: `py-2 text-xs font-bold uppercase tracking-wide transition-colors border-[length:var(--border-width)] border-white/10 ${a.theme === u.value ? "bg-[var(--accent)] text-white" : "bg-white/5 text-zinc-400 hover:text-white"}`, style: { borderRadius: "var(--radius)" }, children: u.label }, u.value)) }) }),
|
|
1946
|
+
/* @__PURE__ */ e(Y, { title: "Icon Size", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1 px-3", children: ["small", "medium", "large"].map((u) => /* @__PURE__ */ e("button", { onClick: () => n == null ? void 0 : n.setAppearance({ iconSize: u }), className: `py-1.5 text-xs font-medium transition-colors ${a.iconSize === u ? "bg-white text-black" : "bg-white/5 text-zinc-400 hover:text-zinc-200"}`, style: { borderRadius: "var(--radius)" }, children: u.charAt(0).toUpperCase() + u.slice(1) }, u)) }) }),
|
|
1947
|
+
/* @__PURE__ */ l(Y, { title: "Theme Color", children: [
|
|
1948
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-6 gap-2 px-3", children: Ui.map((u) => /* @__PURE__ */ e("button", { title: u.label, onClick: () => n == null ? void 0 : n.setAppearance({ themeColor: u.value }), className: `w-6 h-6 transition-transform hover:scale-110 ${a.themeColor === u.value ? "ring-2 ring-white scale-110" : "ring-1 ring-white/10"}`, style: { backgroundColor: u.value, borderRadius: "var(--radius-full)" }, children: a.themeColor === u.value && /* @__PURE__ */ e(Le, { className: "w-3 h-3 text-white mx-auto stroke-[3]" }) }, u.value)) }),
|
|
1949
|
+
/* @__PURE__ */ e("div", { className: "px-3 pt-4", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-3 bg-white/5 p-2 hover:bg-white/10 transition-colors group", style: { borderRadius: "var(--radius)" }, children: [
|
|
1950
|
+
/* @__PURE__ */ e("div", { className: "relative w-6 h-6 overflow-hidden ring-1 ring-white/20", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ e("input", { type: "color", value: a.themeColor, onChange: (u) => n == null ? void 0 : n.setAppearance({ themeColor: u.target.value }), className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0" }) }),
|
|
1951
|
+
/* @__PURE__ */ e("span", { className: "text-xs text-zinc-400 font-medium group-hover:text-zinc-200", children: "Custom Color" }),
|
|
1952
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-mono text-zinc-500 ml-auto uppercase", children: a.themeColor })
|
|
2335
1953
|
] }) })
|
|
2336
1954
|
] })
|
|
2337
1955
|
] })
|
|
@@ -2343,70 +1961,69 @@ const _i = y("Zap", [
|
|
|
2343
1961
|
return null;
|
|
2344
1962
|
}
|
|
2345
1963
|
}, Qt = Ce(() => {
|
|
2346
|
-
const
|
|
1964
|
+
const c = [
|
|
2347
1965
|
// Loop (Playback Group)
|
|
2348
1966
|
{ html: "Playback", isLabel: !0 },
|
|
2349
1967
|
{
|
|
2350
1968
|
html: "Loop",
|
|
2351
1969
|
checked: a.isLooping,
|
|
2352
|
-
onClick: () =>
|
|
1970
|
+
onClick: () => n == null ? void 0 : n.toggleLoop()
|
|
2353
1971
|
},
|
|
2354
1972
|
{ separator: !0 },
|
|
2355
1973
|
// Flip (Transform Group)
|
|
2356
1974
|
{ html: "Transform", isLabel: !0 },
|
|
2357
|
-
{ html: "Flip Horizontal", onClick: () =>
|
|
2358
|
-
{ html: "Flip Vertical", onClick: () =>
|
|
1975
|
+
{ html: "Flip Horizontal", onClick: () => n == null ? void 0 : n.setFlip("horizontal") },
|
|
1976
|
+
{ html: "Flip Vertical", onClick: () => n == null ? void 0 : n.setFlip("vertical") },
|
|
2359
1977
|
{ separator: !0 },
|
|
2360
1978
|
// Aspect Ratio Group
|
|
2361
1979
|
{ html: "Aspect Ratio", isLabel: !0 },
|
|
2362
|
-
{ html: "Default", checked: a.aspectRatio === "default", onClick: () =>
|
|
2363
|
-
{ html: "16:9", checked: a.aspectRatio === "16:9", onClick: () =>
|
|
2364
|
-
{ html: "4:3", checked: a.aspectRatio === "4:3", onClick: () =>
|
|
1980
|
+
{ html: "Default", checked: a.aspectRatio === "default", onClick: () => n == null ? void 0 : n.setAspectRatio("default") },
|
|
1981
|
+
{ html: "16:9", checked: a.aspectRatio === "16:9", onClick: () => n == null ? void 0 : n.setAspectRatio("16:9") },
|
|
1982
|
+
{ html: "4:3", checked: a.aspectRatio === "4:3", onClick: () => n == null ? void 0 : n.setAspectRatio("4:3") },
|
|
2365
1983
|
{ separator: !0 },
|
|
2366
1984
|
// Stats
|
|
2367
1985
|
{
|
|
2368
1986
|
html: "Video Info",
|
|
2369
|
-
icon: /* @__PURE__ */
|
|
2370
|
-
onClick: () =>
|
|
1987
|
+
icon: /* @__PURE__ */ e(Bi, { className: "w-3.5 h-3.5" }),
|
|
1988
|
+
onClick: () => Be(!0)
|
|
2371
1989
|
},
|
|
2372
1990
|
{ separator: !0 }
|
|
2373
1991
|
];
|
|
2374
|
-
return
|
|
2375
|
-
html: /* @__PURE__ */
|
|
1992
|
+
return h.contextmenu && c.push(...h.contextmenu), c.push({
|
|
1993
|
+
html: /* @__PURE__ */ e("span", { className: "text-zinc-500 text-xs font-semibold tracking-wide", children: "StrataPlayer" }),
|
|
2376
1994
|
disabled: !0
|
|
2377
|
-
}),
|
|
1995
|
+
}), c.push({
|
|
2378
1996
|
html: "Close",
|
|
2379
1997
|
onClick: (f) => f(),
|
|
2380
1998
|
// Wrapper handles close
|
|
2381
|
-
icon: /* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */
|
|
1999
|
+
icon: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ l("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2000
|
+
/* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
|
|
2001
|
+
/* @__PURE__ */ e("path", { d: "m6 6 12 12" })
|
|
2384
2002
|
] }) })
|
|
2385
|
-
}),
|
|
2386
|
-
}, [
|
|
2387
|
-
return /* @__PURE__ */ h(
|
|
2003
|
+
}), c;
|
|
2004
|
+
}, [h.contextmenu, a.aspectRatio, a.isLooping, n]), at = a.isWebFullscreen, lt = /* @__PURE__ */ l(
|
|
2388
2005
|
"div",
|
|
2389
2006
|
{
|
|
2390
|
-
id:
|
|
2391
|
-
ref:
|
|
2392
|
-
className: `group
|
|
2007
|
+
id: h.id,
|
|
2008
|
+
ref: q,
|
|
2009
|
+
className: `group bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none text-zinc-100 strata-player-reset ${at ? "fixed inset-0 z-[2147483647] w-screen h-screen rounded-none" : "relative w-full h-full rounded-[var(--radius)]"} ${h.container || ""}`,
|
|
2393
2010
|
style: { touchAction: "manipulation", "--accent": a.themeColor },
|
|
2394
|
-
onMouseMove:
|
|
2011
|
+
onMouseMove: Ke,
|
|
2395
2012
|
onMouseLeave: () => {
|
|
2396
|
-
a.isPlaying && !$ && !
|
|
2013
|
+
a.isPlaying && !$ && !E && n && n.setControlsVisible(!1);
|
|
2397
2014
|
},
|
|
2398
|
-
onMouseDown:
|
|
2015
|
+
onMouseDown: Ye,
|
|
2399
2016
|
onMouseUp: ke,
|
|
2400
|
-
onTouchStart:
|
|
2401
|
-
onTouchMove:
|
|
2402
|
-
onTouchEnd:
|
|
2017
|
+
onTouchStart: Bt,
|
|
2018
|
+
onTouchMove: Vt,
|
|
2019
|
+
onTouchEnd: Ot,
|
|
2403
2020
|
onContextMenu: Wt,
|
|
2404
2021
|
tabIndex: 0,
|
|
2405
2022
|
role: "region",
|
|
2406
2023
|
"aria-label": "Video Player",
|
|
2407
2024
|
"data-theme": a.theme,
|
|
2408
2025
|
children: [
|
|
2409
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ e("style", { children: `
|
|
2410
2027
|
[data-theme="default"] {
|
|
2411
2028
|
--radius: 0.75rem;
|
|
2412
2029
|
--radius-lg: 0.75rem;
|
|
@@ -2500,120 +2117,120 @@ const _i = y("Zap", [
|
|
|
2500
2117
|
[data-theme="pixel"] .strata-backdrop { backdrop-filter: none; background: #000; }
|
|
2501
2118
|
[data-theme="hacker"] .strata-backdrop { backdrop-filter: none; background: #000; }
|
|
2502
2119
|
` }),
|
|
2503
|
-
a.theme === "hacker" && /* @__PURE__ */
|
|
2504
|
-
!
|
|
2505
|
-
|
|
2506
|
-
(
|
|
2120
|
+
a.theme === "hacker" && /* @__PURE__ */ e("div", { className: "strata-scanlines" }),
|
|
2121
|
+
!n && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-zinc-950 z-50", children: /* @__PURE__ */ e(Ie, { className: "w-10 h-10 text-[var(--accent)] animate-spin" }) }),
|
|
2122
|
+
n && /* @__PURE__ */ l(L, { children: [
|
|
2123
|
+
(ct = h.layers) == null ? void 0 : ct.map((c, f) => /* @__PURE__ */ e(
|
|
2507
2124
|
"div",
|
|
2508
2125
|
{
|
|
2509
|
-
className: `absolute inset-0 pointer-events-none z-10 ${
|
|
2510
|
-
style:
|
|
2511
|
-
children: /* @__PURE__ */
|
|
2126
|
+
className: `absolute inset-0 pointer-events-none z-10 ${c.className || ""}`,
|
|
2127
|
+
style: c.style,
|
|
2128
|
+
children: /* @__PURE__ */ e(xt, { content: c.html || "", className: "w-full h-full" })
|
|
2512
2129
|
},
|
|
2513
2130
|
f
|
|
2514
2131
|
)),
|
|
2515
|
-
/* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2518
|
-
|
|
2132
|
+
/* @__PURE__ */ e(Vi, { notifications: a.notifications }),
|
|
2133
|
+
/* @__PURE__ */ e(Oi, { cues: a.activeCues, settings: a.subtitleSettings }),
|
|
2134
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 z-0", onClick: Ht, "aria-hidden": "true" }),
|
|
2135
|
+
o && !he && /* @__PURE__ */ e(
|
|
2519
2136
|
"div",
|
|
2520
2137
|
{
|
|
2521
2138
|
className: "absolute inset-0 bg-cover bg-center z-[5] pointer-events-none",
|
|
2522
|
-
style: { backgroundImage: `url(${
|
|
2139
|
+
style: { backgroundImage: `url(${o})` }
|
|
2523
2140
|
}
|
|
2524
2141
|
),
|
|
2525
|
-
Z.visible && /* @__PURE__ */
|
|
2526
|
-
|
|
2142
|
+
Z.visible && /* @__PURE__ */ e(
|
|
2143
|
+
Wi,
|
|
2527
2144
|
{
|
|
2528
2145
|
x: Z.x,
|
|
2529
2146
|
y: Z.y,
|
|
2530
2147
|
items: Qt,
|
|
2531
2148
|
onClose: () => fe({ ...Z, visible: !1 }),
|
|
2532
|
-
containerWidth:
|
|
2533
|
-
containerHeight:
|
|
2149
|
+
containerWidth: Rt,
|
|
2150
|
+
containerHeight: Fe
|
|
2534
2151
|
}
|
|
2535
2152
|
),
|
|
2536
|
-
|
|
2537
|
-
ge && /* @__PURE__ */
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2153
|
+
$t && n && /* @__PURE__ */ e(Di, { player: n, onClose: () => Be(!1) }),
|
|
2154
|
+
ge && /* @__PURE__ */ l("div", { className: "absolute top-8 left-1/2 -translate-x-1/2 bg-black/50 backdrop-blur-md px-4 py-2 rounded-full flex items-center gap-2 z-40 animate-in fade-in zoom-in duration-200", children: [
|
|
2155
|
+
/* @__PURE__ */ e(Fi, { className: "w-4 h-4 text-[var(--accent)] fill-current" }),
|
|
2156
|
+
/* @__PURE__ */ e("span", { className: "text-xs font-bold tracking-wider", children: "2x Speed" })
|
|
2540
2157
|
] }),
|
|
2541
|
-
|
|
2158
|
+
W && a.controlsVisible && /* @__PURE__ */ e(
|
|
2542
2159
|
"button",
|
|
2543
2160
|
{
|
|
2544
|
-
onClick: (
|
|
2545
|
-
|
|
2161
|
+
onClick: (c) => {
|
|
2162
|
+
c.stopPropagation(), n.toggleLock();
|
|
2546
2163
|
},
|
|
2547
2164
|
className: `absolute left-4 md:left-6 bottom-24 md:bottom-28 z-50 p-3 rounded-full bg-black/50 backdrop-blur-md border border-white/10 text-white transition-all active:scale-95 ${a.isLocked ? "text-[var(--accent)] bg-white/10" : "hover:bg-white/10"}`,
|
|
2548
|
-
children: a.isLocked ? /* @__PURE__ */
|
|
2165
|
+
children: a.isLocked ? /* @__PURE__ */ e($i, { className: "w-5 h-5" }) : /* @__PURE__ */ e(Ei, { className: "w-5 h-5" })
|
|
2549
2166
|
}
|
|
2550
2167
|
),
|
|
2551
|
-
|
|
2168
|
+
Q && /* @__PURE__ */ e(
|
|
2552
2169
|
"div",
|
|
2553
2170
|
{
|
|
2554
|
-
className: `absolute top-0 bottom-0 flex items-center justify-center w-[35%] z-20 bg-white/5 backdrop-blur-[1px] animate-out fade-out duration-500 fill-mode-forwards ${
|
|
2555
|
-
onAnimationEnd: () =>
|
|
2556
|
-
children: /* @__PURE__ */
|
|
2557
|
-
|
|
2558
|
-
/* @__PURE__ */
|
|
2171
|
+
className: `absolute top-0 bottom-0 flex items-center justify-center w-[35%] z-20 bg-white/5 backdrop-blur-[1px] animate-out fade-out duration-500 fill-mode-forwards ${Q.type === "rewind" ? "left-0 rounded-r-[4rem]" : "right-0 rounded-l-[4rem]"}`,
|
|
2172
|
+
onAnimationEnd: () => ae(null),
|
|
2173
|
+
children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center text-white drop-shadow-lg", children: [
|
|
2174
|
+
Q.type === "rewind" ? /* @__PURE__ */ e(pt, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ e(bt, { className: "w-12 h-12 animate-pulse" }),
|
|
2175
|
+
/* @__PURE__ */ e("span", { className: "font-bold text-sm mt-2 font-mono", children: Q.type === "rewind" ? "-10s" : "+10s" })
|
|
2559
2176
|
] })
|
|
2560
2177
|
},
|
|
2561
|
-
|
|
2178
|
+
Q.id
|
|
2562
2179
|
),
|
|
2563
|
-
a.isBuffering && /* @__PURE__ */
|
|
2564
|
-
a.error && /* @__PURE__ */
|
|
2565
|
-
/* @__PURE__ */
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
/* @__PURE__ */
|
|
2180
|
+
a.isBuffering && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ e(Ie, { className: "w-12 h-12 text-[var(--accent)] animate-spin drop-shadow-lg" }) }),
|
|
2181
|
+
a.error && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center z-30 bg-black/90 backdrop-blur-md animate-in fade-in", children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-4 text-red-500 p-8 max-w-md text-center", children: [
|
|
2182
|
+
/* @__PURE__ */ e("span", { className: "text-5xl mb-2", children: "⚠️" }),
|
|
2183
|
+
/* @__PURE__ */ e("h3", { className: "text-xl font-bold text-white", children: "Playback Error" }),
|
|
2184
|
+
/* @__PURE__ */ e("p", { className: "text-zinc-400 text-sm", children: a.error }),
|
|
2185
|
+
/* @__PURE__ */ e("button", { onClick: () => n.load(n.store.get().sources[n.store.get().currentSourceIndex] || { url: t || "" }, v), className: "px-6 py-2 bg-[var(--accent)] text-white font-medium rounded-full hover:opacity-90 transition-opacity mt-4 shadow-lg", children: "Try Again" })
|
|
2569
2186
|
] }) }),
|
|
2570
|
-
|
|
2187
|
+
zt && !a.isLocked && (!a.isPlaying && !a.isBuffering && !a.error || a.controlsVisible) && !a.isBuffering ? /* @__PURE__ */ e(
|
|
2571
2188
|
"div",
|
|
2572
2189
|
{
|
|
2573
2190
|
className: `absolute inset-0 flex items-center justify-center z-10 transition-opacity duration-300 pointer-events-none ${a.controlsVisible || !a.isPlaying ? "opacity-100" : "opacity-0"}`,
|
|
2574
|
-
children: /* @__PURE__ */
|
|
2575
|
-
/* @__PURE__ */
|
|
2576
|
-
|
|
2577
|
-
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-
|
|
2578
|
-
/* @__PURE__ */
|
|
2579
|
-
|
|
2580
|
-
}, className: `group relative flex items-center justify-center rounded-full bg-white/10 hover:bg-[var(--accent)] border border-white/10 shadow-2xl transition-all hover:scale-
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
|
|
2583
|
-
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-
|
|
2191
|
+
children: /* @__PURE__ */ l("div", { className: "flex items-center gap-8 md:gap-16 pointer-events-auto", children: [
|
|
2192
|
+
/* @__PURE__ */ e("button", { onClick: (c) => {
|
|
2193
|
+
c.stopPropagation(), V(!1), U(!1), le("rewind");
|
|
2194
|
+
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all duration-300 active:scale-125 active:opacity-80 text-white/90 focus:outline-none backdrop-blur-sm ${X.skipBtn}`, children: /* @__PURE__ */ e(pt, { className: X.skipIcon }) }),
|
|
2195
|
+
/* @__PURE__ */ e("button", { onClick: (c) => {
|
|
2196
|
+
c.stopPropagation(), V(!1), U(!1), n.togglePlay();
|
|
2197
|
+
}, className: `group relative flex items-center justify-center rounded-full bg-white/10 hover:bg-[var(--accent)] border border-white/10 shadow-2xl transition-all duration-300 hover:scale-110 active:scale-90 active:opacity-80 focus:outline-none backdrop-blur-md ${X.playBtn}`, children: a.isPlaying ? /* @__PURE__ */ e(ft, { className: `${X.playIcon} text-white fill-current` }) : /* @__PURE__ */ e(mt, { className: `${X.playIcon} text-white ml-1 fill-current` }) }),
|
|
2198
|
+
/* @__PURE__ */ e("button", { onClick: (c) => {
|
|
2199
|
+
c.stopPropagation(), V(!1), U(!1), le("forward");
|
|
2200
|
+
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all duration-300 active:scale-125 active:opacity-80 text-white/90 focus:outline-none backdrop-blur-sm ${X.skipBtn}`, children: /* @__PURE__ */ e(bt, { className: X.skipIcon }) })
|
|
2584
2201
|
] })
|
|
2585
2202
|
}
|
|
2586
2203
|
) : null,
|
|
2587
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ l(
|
|
2588
2205
|
"div",
|
|
2589
2206
|
{
|
|
2590
|
-
className: `absolute inset-x-0 bottom-0 z-30 transition-all duration-300 px-4 md:px-6
|
|
2591
|
-
onClick: (
|
|
2592
|
-
|
|
2207
|
+
className: `absolute inset-x-0 bottom-0 z-30 transition-all duration-300 px-4 md:px-6 py-4 bg-gradient-to-t from-black/90 via-black/50 to-transparent ${qt ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4 pointer-events-none"}`,
|
|
2208
|
+
onClick: (c) => {
|
|
2209
|
+
c.target === c.currentTarget && (V(!1), U(!1), oe(!1)), c.stopPropagation();
|
|
2593
2210
|
},
|
|
2594
2211
|
children: [
|
|
2595
|
-
!
|
|
2212
|
+
!h.isLive && /* @__PURE__ */ l(
|
|
2596
2213
|
"div",
|
|
2597
2214
|
{
|
|
2598
|
-
ref:
|
|
2215
|
+
ref: we,
|
|
2599
2216
|
className: "relative w-full h-3 group/slider mb-3 cursor-pointer touch-none flex items-center",
|
|
2600
|
-
onMouseMove:
|
|
2217
|
+
onMouseMove: jt,
|
|
2601
2218
|
onMouseLeave: () => {
|
|
2602
2219
|
Ge(null), _e(null);
|
|
2603
2220
|
},
|
|
2604
|
-
onMouseDown:
|
|
2605
|
-
onTouchStart:
|
|
2221
|
+
onMouseDown: Ze,
|
|
2222
|
+
onTouchStart: Ze,
|
|
2606
2223
|
children: [
|
|
2607
|
-
(
|
|
2608
|
-
Ue !== null && /* @__PURE__ */
|
|
2609
|
-
|
|
2610
|
-
/* @__PURE__ */
|
|
2224
|
+
(dt = h.highlight) == null ? void 0 : dt.map((c, f) => /* @__PURE__ */ e("div", { className: "absolute top-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-yellow-400 rounded-full z-10 pointer-events-none", style: { left: `${c.time / a.duration * 100}%` }, title: c.text }, f)),
|
|
2225
|
+
Ue !== null && /* @__PURE__ */ l("div", { className: "absolute bottom-full mb-1.5 flex flex-col items-center transform -translate-x-1/2 z-40 pointer-events-none transition-opacity duration-150", style: { left: `clamp(70px, ${Ft}%, calc(100% - 70px))` }, children: [
|
|
2226
|
+
G && /* @__PURE__ */ e("div", { className: "bg-black/90 border border-white/10 shadow-2xl overflow-hidden backdrop-blur-sm", style: { width: `${G.w * 0.5}px`, height: `${G.h * 0.5}px`, borderRadius: "var(--radius)" }, children: /* @__PURE__ */ e("div", { style: { backgroundImage: `url("${G.url}")`, width: `${G.w}px`, height: `${G.h}px`, backgroundPosition: `-${G.x}px -${G.y}px`, backgroundRepeat: "no-repeat", transform: "scale(0.5)", transformOrigin: "top left" } }) }),
|
|
2227
|
+
/* @__PURE__ */ e("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children: Te(Ue) })
|
|
2611
2228
|
] }),
|
|
2612
|
-
/* @__PURE__ */
|
|
2613
|
-
a.duration > 0 && a.buffered.map((
|
|
2614
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ l("div", { className: "w-full h-1 bg-white/20 overflow-hidden relative backdrop-blur-sm border-[length:var(--border-width)] border-white/10", style: { borderRadius: "var(--radius-full)" }, children: [
|
|
2230
|
+
a.duration > 0 && a.buffered.map((c, f) => /* @__PURE__ */ e("div", { className: "absolute top-0 bottom-0 bg-white/20", style: { left: `${c.start / a.duration * 100}%`, width: `${(c.end - c.start) / a.duration * 100}%` } }, f)),
|
|
2231
|
+
/* @__PURE__ */ e("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(pe ? re : a.currentTime) / a.duration * 100}%` } })
|
|
2615
2232
|
] }),
|
|
2616
|
-
/* @__PURE__ */
|
|
2233
|
+
/* @__PURE__ */ e(
|
|
2617
2234
|
"div",
|
|
2618
2235
|
{
|
|
2619
2236
|
className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-3.5 h-3.5 bg-white shadow-md scale-0 group-hover/slider:scale-100 transition-transform duration-100 z-10",
|
|
@@ -2626,9 +2243,9 @@ const _i = y("Zap", [
|
|
|
2626
2243
|
]
|
|
2627
2244
|
}
|
|
2628
2245
|
),
|
|
2629
|
-
/* @__PURE__ */
|
|
2630
|
-
/* @__PURE__ */
|
|
2631
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between pointer-events-auto", children: [
|
|
2247
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: rt.filter((c) => c.position === "left" || c.position === "center").map(ot) }),
|
|
2248
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: rt.filter((c) => c.position === "right").map(ot) })
|
|
2632
2249
|
] })
|
|
2633
2250
|
]
|
|
2634
2251
|
}
|
|
@@ -2637,20 +2254,21 @@ const _i = y("Zap", [
|
|
|
2637
2254
|
]
|
|
2638
2255
|
}
|
|
2639
2256
|
);
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2257
|
+
return at && typeof document < "u" ? ei(lt, document.body) : lt;
|
|
2258
|
+
}, es = (s, t) => {
|
|
2259
|
+
const i = Zt(s);
|
|
2260
|
+
return i.render(ze.createElement(wt, t)), {
|
|
2643
2261
|
unmount: () => {
|
|
2644
2262
|
i.unmount();
|
|
2645
2263
|
},
|
|
2646
|
-
update: (
|
|
2647
|
-
i.render(
|
|
2264
|
+
update: (r) => {
|
|
2265
|
+
i.render(ze.createElement(wt, { ...t, ...r }));
|
|
2648
2266
|
}
|
|
2649
2267
|
};
|
|
2650
2268
|
};
|
|
2651
2269
|
export {
|
|
2652
2270
|
ni as StrataCore,
|
|
2653
|
-
|
|
2654
|
-
|
|
2271
|
+
wt as StrataPlayer,
|
|
2272
|
+
es as mountStrataPlayer
|
|
2655
2273
|
};
|
|
2656
2274
|
//# sourceMappingURL=strataplayer.es.js.map
|