twist-aplayer 1.5.0 → 1.5.1
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/index.d.ts +5 -1
- package/dist/index.js +9 -9
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +343 -341
- package/dist/twist-aplayer.umd.js +9 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16,8 +16,8 @@ function ke() {
|
|
|
16
16
|
ge = 1;
|
|
17
17
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
18
18
|
function r(n, a, u) {
|
|
19
|
-
var
|
|
20
|
-
if (u !== void 0 && (
|
|
19
|
+
var l = null;
|
|
20
|
+
if (u !== void 0 && (l = "" + u), a.key !== void 0 && (l = "" + a.key), "key" in a) {
|
|
21
21
|
u = {};
|
|
22
22
|
for (var b in a)
|
|
23
23
|
b !== "key" && (u[b] = a[b]);
|
|
@@ -25,7 +25,7 @@ function ke() {
|
|
|
25
25
|
return a = u.ref, {
|
|
26
26
|
$$typeof: e,
|
|
27
27
|
type: n,
|
|
28
|
-
key:
|
|
28
|
+
key: l,
|
|
29
29
|
ref: a !== void 0 ? a : null,
|
|
30
30
|
props: u
|
|
31
31
|
};
|
|
@@ -55,7 +55,7 @@ function Ie() {
|
|
|
55
55
|
return "Fragment";
|
|
56
56
|
case v:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case f:
|
|
59
59
|
return "StrictMode";
|
|
60
60
|
case C:
|
|
61
61
|
return "Suspense";
|
|
@@ -68,7 +68,7 @@ function Ie() {
|
|
|
68
68
|
switch (typeof o.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), o.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case h:
|
|
72
72
|
return "Portal";
|
|
73
73
|
case E:
|
|
74
74
|
return (o.displayName || "Context") + ".Provider";
|
|
@@ -126,7 +126,7 @@ function Ie() {
|
|
|
126
126
|
function u() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function l(o) {
|
|
130
130
|
if (ne.call(o, "key")) {
|
|
131
131
|
var x = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
132
132
|
if (x && x.isReactWarning) return !1;
|
|
@@ -151,7 +151,7 @@ function Ie() {
|
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function y(o, x, T, L, $, I, le, de) {
|
|
155
155
|
return T = I.ref, o = {
|
|
156
156
|
$$typeof: p,
|
|
157
157
|
type: o,
|
|
@@ -183,19 +183,19 @@ function Ie() {
|
|
|
183
183
|
value: de
|
|
184
184
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function c(o, x, T, L, $, I, le, de) {
|
|
187
187
|
var N = x.children;
|
|
188
188
|
if (N !== void 0)
|
|
189
189
|
if (L)
|
|
190
190
|
if (ce(N)) {
|
|
191
191
|
for (L = 0; L < N.length; L++)
|
|
192
|
-
|
|
192
|
+
m(N[L]);
|
|
193
193
|
Object.freeze && Object.freeze(N);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else
|
|
198
|
+
else m(N);
|
|
199
199
|
if (ne.call(x, "key")) {
|
|
200
200
|
N = e(o);
|
|
201
201
|
var F = Object.keys(x).filter(function(Ce) {
|
|
@@ -214,7 +214,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
214
214
|
N
|
|
215
215
|
), P[N + L] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (N = null, T !== void 0 && (r(T), N = "" + T),
|
|
217
|
+
if (N = null, T !== void 0 && (r(T), N = "" + T), l(x) && (r(x.key), N = "" + x.key), "key" in x) {
|
|
218
218
|
T = {};
|
|
219
219
|
for (var fe in x)
|
|
220
220
|
fe !== "key" && (T[fe] = x[fe]);
|
|
@@ -222,7 +222,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
222
222
|
return N && b(
|
|
223
223
|
T,
|
|
224
224
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
225
|
-
),
|
|
225
|
+
), y(
|
|
226
226
|
o,
|
|
227
227
|
N,
|
|
228
228
|
I,
|
|
@@ -233,10 +233,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
233
|
de
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function m(o) {
|
|
237
237
|
typeof o == "object" && o !== null && o.$$typeof === p && o._store && (o._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var g = pe, p = Symbol.for("react.transitional.element"),
|
|
239
|
+
var g = pe, p = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), E = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), G = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ne = Object.prototype.hasOwnProperty, ce = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
242
|
g = {
|
|
@@ -250,7 +250,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
250
250
|
)(), X = J(n(u)), P = {};
|
|
251
251
|
Z.Fragment = i, Z.jsx = function(o, x, T, L, $) {
|
|
252
252
|
var I = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
253
|
-
return
|
|
253
|
+
return c(
|
|
254
254
|
o,
|
|
255
255
|
x,
|
|
256
256
|
T,
|
|
@@ -262,7 +262,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
262
262
|
);
|
|
263
263
|
}, Z.jsxs = function(o, x, T, L, $) {
|
|
264
264
|
var I = 1e4 > G.recentlyCreatedOwnerStacks++;
|
|
265
|
-
return
|
|
265
|
+
return c(
|
|
266
266
|
o,
|
|
267
267
|
x,
|
|
268
268
|
T,
|
|
@@ -279,7 +279,7 @@ var Ee;
|
|
|
279
279
|
function Ve() {
|
|
280
280
|
return Ee || (Ee = 1, process.env.NODE_ENV === "production" ? oe.exports = ke() : oe.exports = Ie()), oe.exports;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var d = Ve(), ie = (e) => `--${e}`, Se = (e) => `var(--${e})`, Te = (e, t) => `--${e}: ${t};`;
|
|
283
283
|
function ze(e, t) {
|
|
284
284
|
const r = (n) => t;
|
|
285
285
|
return {
|
|
@@ -298,8 +298,8 @@ function ze(e, t) {
|
|
|
298
298
|
cv: (n) => ie(`${r()}-${e}-${n}`),
|
|
299
299
|
cvm: (n, a = {}) => {
|
|
300
300
|
const u = r();
|
|
301
|
-
for (const
|
|
302
|
-
a[ie(`${u}-${e}-${
|
|
301
|
+
for (const l of Object.keys(n))
|
|
302
|
+
a[ie(`${u}-${e}-${l}`)] = n[l];
|
|
303
303
|
return a;
|
|
304
304
|
},
|
|
305
305
|
gcv: (n) => Se(`${r()}-${e}-${n}`),
|
|
@@ -307,8 +307,8 @@ function ze(e, t) {
|
|
|
307
307
|
nv: (n) => ie(`${r()}-${n}`),
|
|
308
308
|
nvm: (n, a = {}) => {
|
|
309
309
|
const u = r();
|
|
310
|
-
for (const
|
|
311
|
-
a[ie(`${u}-${
|
|
310
|
+
for (const l of Object.keys(n))
|
|
311
|
+
a[ie(`${u}-${l}`)] = n[l];
|
|
312
312
|
return a;
|
|
313
313
|
},
|
|
314
314
|
gnv: (n) => Se(`${r()}-${n}`),
|
|
@@ -345,16 +345,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
345
345
|
function Ye(e, t) {
|
|
346
346
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
347
347
|
if (r != null) {
|
|
348
|
-
var n, a, u,
|
|
348
|
+
var n, a, u, l, b = [], s = !0, y = !1;
|
|
349
349
|
try {
|
|
350
350
|
if (u = (r = r.call(e)).next, t !== 0) for (; !(s = (n = u.call(r)).done) && (b.push(n.value), b.length !== t); s = !0) ;
|
|
351
|
-
} catch (
|
|
352
|
-
|
|
351
|
+
} catch (c) {
|
|
352
|
+
y = !0, a = c;
|
|
353
353
|
} finally {
|
|
354
354
|
try {
|
|
355
|
-
if (!s && r.return != null && (
|
|
355
|
+
if (!s && r.return != null && (l = r.return(), Object(l) !== l)) return;
|
|
356
356
|
} finally {
|
|
357
|
-
if (
|
|
357
|
+
if (y) throw a;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
return b;
|
|
@@ -372,24 +372,24 @@ function Ue(e, t) {
|
|
|
372
372
|
};
|
|
373
373
|
return { s: a, n: function() {
|
|
374
374
|
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
375
|
-
}, e: function(
|
|
376
|
-
throw
|
|
375
|
+
}, e: function(y) {
|
|
376
|
+
throw y;
|
|
377
377
|
}, f: a };
|
|
378
378
|
}
|
|
379
379
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
380
380
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
381
381
|
}
|
|
382
|
-
var u,
|
|
382
|
+
var u, l = !0, b = !1;
|
|
383
383
|
return { s: function() {
|
|
384
384
|
r = r.call(e);
|
|
385
385
|
}, n: function() {
|
|
386
|
-
var
|
|
387
|
-
return
|
|
388
|
-
}, e: function(
|
|
389
|
-
b = !0, u =
|
|
386
|
+
var y = r.next();
|
|
387
|
+
return l = y.done, y;
|
|
388
|
+
}, e: function(y) {
|
|
389
|
+
b = !0, u = y;
|
|
390
390
|
}, f: function() {
|
|
391
391
|
try {
|
|
392
|
-
|
|
392
|
+
l || r.return == null || r.return();
|
|
393
393
|
} finally {
|
|
394
394
|
if (b) throw u;
|
|
395
395
|
}
|
|
@@ -473,39 +473,39 @@ function Xe(e, t) {
|
|
|
473
473
|
return r;
|
|
474
474
|
}
|
|
475
475
|
function Qe(e) {
|
|
476
|
-
var t = e.attrs, r = e.size, n = e.title, a = e.spin, u = e.rotate,
|
|
477
|
-
var
|
|
478
|
-
return
|
|
476
|
+
var t = e.attrs, r = e.size, n = e.title, a = e.spin, u = e.rotate, l = e.color, b = Ke(e, De), s = function(c) {
|
|
477
|
+
var m = r || c.size || "1em", g, p = "", h = "";
|
|
478
|
+
return c.className && (g = c.className), e.className && (g = g ? "".concat(g, " ").concat(e.className) : e.className), a && (g ? g += " twist-icon-loading" : g = "twist-icon-loading"), u && (p = "rotate(".concat(u, "deg)"), h = "rotate(".concat(u, "deg)")), /* @__PURE__ */ W.createElement("svg", se({
|
|
479
479
|
xmlns: "http://www.w3.org/2000/svg"
|
|
480
|
-
},
|
|
480
|
+
}, c.attrs, t, b, {
|
|
481
481
|
className: g,
|
|
482
482
|
style: te(te({
|
|
483
|
-
color:
|
|
483
|
+
color: l || c.color,
|
|
484
484
|
msTransform: p,
|
|
485
|
-
transform:
|
|
486
|
-
},
|
|
487
|
-
width:
|
|
488
|
-
height:
|
|
485
|
+
transform: h
|
|
486
|
+
}, c.style), e.style),
|
|
487
|
+
width: m,
|
|
488
|
+
height: m
|
|
489
489
|
}), n && /* @__PURE__ */ W.createElement("title", null, n), e.children);
|
|
490
490
|
};
|
|
491
|
-
return be !== void 0 ? /* @__PURE__ */ W.createElement(be.Consumer, null, function(
|
|
492
|
-
return s(
|
|
491
|
+
return be !== void 0 ? /* @__PURE__ */ W.createElement(be.Consumer, null, function(y) {
|
|
492
|
+
return s(y);
|
|
493
493
|
}) : s(Ne);
|
|
494
494
|
}
|
|
495
495
|
function Ze(e) {
|
|
496
496
|
var t = {}, r = e.split(";"), n = Ue(r), a;
|
|
497
497
|
try {
|
|
498
498
|
for (n.s(); !(a = n.n()).done; ) {
|
|
499
|
-
var u = a.value,
|
|
500
|
-
if (s &&
|
|
501
|
-
var
|
|
502
|
-
return
|
|
499
|
+
var u = a.value, l = u.split(":"), b = Be(l, 2), s = b[0], y = b[1];
|
|
500
|
+
if (s && y) {
|
|
501
|
+
var c = s.trim().replace(/-./g, function(m) {
|
|
502
|
+
return m.charAt(1).toUpperCase();
|
|
503
503
|
});
|
|
504
|
-
t[
|
|
504
|
+
t[c] = y.trim();
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
} catch (
|
|
508
|
-
n.e(
|
|
507
|
+
} catch (m) {
|
|
508
|
+
n.e(m);
|
|
509
509
|
} finally {
|
|
510
510
|
n.f();
|
|
511
511
|
}
|
|
@@ -608,59 +608,59 @@ function pt({
|
|
|
608
608
|
playedPercentage: t,
|
|
609
609
|
onSeek: r
|
|
610
610
|
}) {
|
|
611
|
-
const n = z("aplayer-bar"), a = z("aplayer-icon"), u = M(null), [
|
|
611
|
+
const n = z("aplayer-bar"), a = z("aplayer-icon"), u = M(null), [l, b] = V(t), s = M(!1);
|
|
612
612
|
q(() => {
|
|
613
613
|
s.current || b(t);
|
|
614
614
|
}, [t]);
|
|
615
|
-
const
|
|
616
|
-
(
|
|
615
|
+
const y = S(
|
|
616
|
+
(c) => {
|
|
617
617
|
s.current = !0;
|
|
618
|
-
const
|
|
619
|
-
b(
|
|
620
|
-
const g = (
|
|
621
|
-
const i = me(
|
|
618
|
+
const m = me(c, u);
|
|
619
|
+
b(m);
|
|
620
|
+
const g = (h) => {
|
|
621
|
+
const i = me(h, u);
|
|
622
622
|
b(i);
|
|
623
|
-
}, p = (
|
|
623
|
+
}, p = (h) => {
|
|
624
624
|
document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", p);
|
|
625
|
-
const i = me(
|
|
625
|
+
const i = me(h, u);
|
|
626
626
|
b(i), r == null || r(i), s.current = !1;
|
|
627
627
|
};
|
|
628
628
|
document.addEventListener("mousemove", g), document.addEventListener("mouseup", p);
|
|
629
629
|
},
|
|
630
630
|
[r]
|
|
631
631
|
);
|
|
632
|
-
return /* @__PURE__ */
|
|
632
|
+
return /* @__PURE__ */ d.jsx(
|
|
633
633
|
"div",
|
|
634
634
|
{
|
|
635
635
|
ref: u,
|
|
636
636
|
className: w(n.b(), n.bs("vars")),
|
|
637
|
-
onMouseDown:
|
|
637
|
+
onMouseDown: y,
|
|
638
638
|
role: "slider",
|
|
639
639
|
"aria-label": "Audio progress",
|
|
640
|
-
"aria-valuenow":
|
|
640
|
+
"aria-valuenow": l ? l * 100 : 0,
|
|
641
641
|
"aria-valuemin": 0,
|
|
642
642
|
"aria-valuemax": 100,
|
|
643
643
|
"aria-live": "polite",
|
|
644
|
-
children: /* @__PURE__ */
|
|
645
|
-
typeof e < "u" ? /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ d.jsxs("div", { className: n.be("inner"), children: [
|
|
645
|
+
typeof e < "u" ? /* @__PURE__ */ d.jsx(
|
|
646
646
|
"div",
|
|
647
647
|
{
|
|
648
648
|
className: n.be("loaded"),
|
|
649
649
|
style: { width: `${e * 100}%` }
|
|
650
650
|
}
|
|
651
651
|
) : null,
|
|
652
|
-
typeof
|
|
652
|
+
typeof l < "u" ? /* @__PURE__ */ d.jsx(
|
|
653
653
|
"div",
|
|
654
654
|
{
|
|
655
655
|
className: n.be("played"),
|
|
656
656
|
style: {
|
|
657
|
-
width: `${
|
|
657
|
+
width: `${l * 100}%`
|
|
658
658
|
},
|
|
659
|
-
children: /* @__PURE__ */
|
|
659
|
+
children: /* @__PURE__ */ d.jsx(
|
|
660
660
|
"span",
|
|
661
661
|
{
|
|
662
662
|
className: n.be("thumb"),
|
|
663
|
-
children: /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ d.jsx("span", { className: w(a.bs("loading")), children: /* @__PURE__ */ d.jsx(rt, {}) })
|
|
664
664
|
}
|
|
665
665
|
)
|
|
666
666
|
}
|
|
@@ -675,38 +675,38 @@ function gt({
|
|
|
675
675
|
onToggleMuted: r,
|
|
676
676
|
onChangeVolume: n
|
|
677
677
|
}) {
|
|
678
|
-
const a = z("aplayer-volumn"), u = z("aplayer-icon"),
|
|
679
|
-
(
|
|
680
|
-
n(ve(
|
|
681
|
-
const
|
|
682
|
-
n(ve(p,
|
|
678
|
+
const a = z("aplayer-volumn"), u = z("aplayer-icon"), l = M(null), [b, s] = V(!1), y = S(
|
|
679
|
+
(c) => {
|
|
680
|
+
n(ve(c, l)), s(!0);
|
|
681
|
+
const m = (p) => {
|
|
682
|
+
n(ve(p, l));
|
|
683
683
|
}, g = (p) => {
|
|
684
|
-
document.removeEventListener("mouseup", g), document.removeEventListener("mousemove",
|
|
684
|
+
document.removeEventListener("mouseup", g), document.removeEventListener("mousemove", m), s(!1), n(ve(p, l));
|
|
685
685
|
};
|
|
686
|
-
document.addEventListener("mousemove",
|
|
686
|
+
document.addEventListener("mousemove", m), document.addEventListener("mouseup", g);
|
|
687
687
|
},
|
|
688
688
|
[n]
|
|
689
689
|
);
|
|
690
|
-
return /* @__PURE__ */
|
|
691
|
-
/* @__PURE__ */
|
|
690
|
+
return /* @__PURE__ */ d.jsxs("div", { className: w(a.b(), a.bs("vars")), children: [
|
|
691
|
+
/* @__PURE__ */ d.jsx(
|
|
692
692
|
"button",
|
|
693
693
|
{
|
|
694
694
|
type: "button",
|
|
695
695
|
className: w(u.b(), u.bs("volume-down")),
|
|
696
696
|
onClick: () => r(),
|
|
697
697
|
"aria-label": t || !e ? "Muted" : "unMuted",
|
|
698
|
-
children: t || !e ? /* @__PURE__ */
|
|
698
|
+
children: t || !e ? /* @__PURE__ */ d.jsx(ht, {}) : e >= 1 ? /* @__PURE__ */ d.jsx(yt, {}) : /* @__PURE__ */ d.jsx(vt, {})
|
|
699
699
|
}
|
|
700
700
|
),
|
|
701
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ d.jsx(
|
|
702
702
|
"div",
|
|
703
703
|
{
|
|
704
704
|
className: w(a.be("bar-wrap"), {
|
|
705
705
|
[a.bem("bar-wrap", "active")]: b
|
|
706
706
|
}),
|
|
707
|
-
ref:
|
|
708
|
-
onMouseDown:
|
|
709
|
-
children: /* @__PURE__ */
|
|
707
|
+
ref: l,
|
|
708
|
+
onMouseDown: y,
|
|
709
|
+
children: /* @__PURE__ */ d.jsx("div", { className: a.be("bar"), children: /* @__PURE__ */ d.jsx(
|
|
710
710
|
"div",
|
|
711
711
|
{
|
|
712
712
|
className: a.be("thumb"),
|
|
@@ -724,7 +724,7 @@ function _e(e) {
|
|
|
724
724
|
return "--:--";
|
|
725
725
|
if (Number.isNaN(e))
|
|
726
726
|
return "00:00";
|
|
727
|
-
const t = (
|
|
727
|
+
const t = (l) => l < 10 ? `0${l}` : `${l}`, r = Math.trunc(e / 60), n = Math.trunc(e - r * 60), a = Math.trunc(r / 60), u = Math.trunc(
|
|
728
728
|
e / 60 - 60 * Math.trunc(e / 60 / 60)
|
|
729
729
|
);
|
|
730
730
|
return e >= 3600 ? `${t(a)}:${t(u)}:${t(n)}` : `${t(r)}:${t(n)}`;
|
|
@@ -736,17 +736,17 @@ function xt({
|
|
|
736
736
|
currentTime: n,
|
|
737
737
|
audioDurationSeconds: a,
|
|
738
738
|
bufferedSeconds: u,
|
|
739
|
-
onToggleMenu:
|
|
739
|
+
onToggleMenu: l,
|
|
740
740
|
onToggleMuted: b,
|
|
741
741
|
order: s,
|
|
742
|
-
onOrderChange:
|
|
743
|
-
loop:
|
|
744
|
-
onLoopChange:
|
|
742
|
+
onOrderChange: y,
|
|
743
|
+
loop: c,
|
|
744
|
+
onLoopChange: m,
|
|
745
745
|
onSeek: g,
|
|
746
746
|
isPlaying: p,
|
|
747
|
-
onTogglePlay:
|
|
747
|
+
onTogglePlay: h,
|
|
748
748
|
onSkipForward: i,
|
|
749
|
-
onSkipBack:
|
|
749
|
+
onSkipBack: f,
|
|
750
750
|
showLyrics: v = !0,
|
|
751
751
|
onToggleLyrics: _
|
|
752
752
|
}) {
|
|
@@ -755,23 +755,23 @@ function xt({
|
|
|
755
755
|
list: "random",
|
|
756
756
|
random: "list"
|
|
757
757
|
}[s];
|
|
758
|
-
|
|
759
|
-
}, [s,
|
|
758
|
+
y(A);
|
|
759
|
+
}, [s, y]), k = S(() => {
|
|
760
760
|
const A = {
|
|
761
761
|
all: "one",
|
|
762
762
|
one: "none",
|
|
763
763
|
none: "all"
|
|
764
|
-
}[
|
|
765
|
-
|
|
766
|
-
}, [
|
|
767
|
-
return /* @__PURE__ */
|
|
764
|
+
}[c];
|
|
765
|
+
m(A);
|
|
766
|
+
}, [c, m]);
|
|
767
|
+
return /* @__PURE__ */ d.jsxs(
|
|
768
768
|
"div",
|
|
769
769
|
{
|
|
770
770
|
className: w(E.b(), E.bs("vars")),
|
|
771
771
|
role: "group",
|
|
772
772
|
"aria-label": "Audio Controls",
|
|
773
773
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ d.jsx(
|
|
775
775
|
pt,
|
|
776
776
|
{
|
|
777
777
|
playedPercentage: typeof n > "u" || typeof a > "u" ? void 0 : n / a,
|
|
@@ -779,43 +779,43 @@ function xt({
|
|
|
779
779
|
onSeek: (A) => g == null ? void 0 : g(A * a)
|
|
780
780
|
}
|
|
781
781
|
),
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ d.jsxs("div", { className: E.be("time"), children: [
|
|
783
|
+
/* @__PURE__ */ d.jsxs("span", { className: E.be("time-inner"), "aria-live": "polite", children: [
|
|
784
|
+
/* @__PURE__ */ d.jsx("span", { className: E.be("ptime"), children: _e(n) }),
|
|
785
785
|
" / ",
|
|
786
|
-
/* @__PURE__ */
|
|
786
|
+
/* @__PURE__ */ d.jsx("span", { className: E.be("dtime"), children: _e(a) })
|
|
787
787
|
] }),
|
|
788
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ d.jsx(
|
|
789
789
|
"button",
|
|
790
790
|
{
|
|
791
791
|
className: w(j.b(), j.bs("back")),
|
|
792
|
-
onClick:
|
|
792
|
+
onClick: f,
|
|
793
793
|
type: "button",
|
|
794
794
|
"aria-label": "Previous track",
|
|
795
|
-
children: /* @__PURE__ */
|
|
795
|
+
children: /* @__PURE__ */ d.jsx(et, {})
|
|
796
796
|
}
|
|
797
797
|
),
|
|
798
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ d.jsx(
|
|
799
799
|
"button",
|
|
800
800
|
{
|
|
801
801
|
className: w(j.b(), j.bs("play")),
|
|
802
|
-
onClick:
|
|
802
|
+
onClick: h,
|
|
803
803
|
type: "button",
|
|
804
804
|
"aria-label": p ? "Pause audio" : "Play audio",
|
|
805
|
-
children: p ? /* @__PURE__ */
|
|
805
|
+
children: p ? /* @__PURE__ */ d.jsx(lt, {}) : /* @__PURE__ */ d.jsx(dt, {})
|
|
806
806
|
}
|
|
807
807
|
),
|
|
808
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ d.jsx(
|
|
809
809
|
"button",
|
|
810
810
|
{
|
|
811
811
|
className: w(j.b(), j.bs("forward")),
|
|
812
812
|
onClick: i,
|
|
813
813
|
type: "button",
|
|
814
814
|
"aria-label": "Next track",
|
|
815
|
-
children: /* @__PURE__ */
|
|
815
|
+
children: /* @__PURE__ */ d.jsx(tt, {})
|
|
816
816
|
}
|
|
817
817
|
),
|
|
818
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ d.jsx(
|
|
819
819
|
gt,
|
|
820
820
|
{
|
|
821
821
|
volume: e,
|
|
@@ -824,41 +824,41 @@ function xt({
|
|
|
824
824
|
onChangeVolume: t
|
|
825
825
|
}
|
|
826
826
|
),
|
|
827
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ d.jsx(
|
|
828
828
|
"button",
|
|
829
829
|
{
|
|
830
830
|
className: w(j.b(), j.bs("order")),
|
|
831
831
|
onClick: C,
|
|
832
832
|
type: "button",
|
|
833
833
|
"aria-label": `Playback order: ${s}`,
|
|
834
|
-
children: { list: /* @__PURE__ */
|
|
834
|
+
children: { list: /* @__PURE__ */ d.jsx(st, {}), random: /* @__PURE__ */ d.jsx(ut, {}) }[s]
|
|
835
835
|
}
|
|
836
836
|
),
|
|
837
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ d.jsx(
|
|
838
838
|
"button",
|
|
839
839
|
{
|
|
840
840
|
className: w(j.b(), j.bs("order")),
|
|
841
841
|
onClick: k,
|
|
842
842
|
type: "button",
|
|
843
|
-
"aria-label": `Loop mode: ${
|
|
843
|
+
"aria-label": `Loop mode: ${c}`,
|
|
844
844
|
children: {
|
|
845
|
-
all: /* @__PURE__ */
|
|
846
|
-
one: /* @__PURE__ */
|
|
847
|
-
none: /* @__PURE__ */
|
|
848
|
-
}[
|
|
845
|
+
all: /* @__PURE__ */ d.jsx(mt, {}),
|
|
846
|
+
one: /* @__PURE__ */ d.jsx(ft, {}),
|
|
847
|
+
none: /* @__PURE__ */ d.jsx(it, {})
|
|
848
|
+
}[c]
|
|
849
849
|
}
|
|
850
850
|
),
|
|
851
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ d.jsx(
|
|
852
852
|
"button",
|
|
853
853
|
{
|
|
854
854
|
type: "button",
|
|
855
855
|
className: w(j.b(), j.bs("menu")),
|
|
856
|
-
onClick: () =>
|
|
856
|
+
onClick: () => l == null ? void 0 : l(),
|
|
857
857
|
"aria-label": "Toggle playlist menu",
|
|
858
|
-
children: /* @__PURE__ */
|
|
858
|
+
children: /* @__PURE__ */ d.jsx(ot, {})
|
|
859
859
|
}
|
|
860
860
|
),
|
|
861
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ d.jsx(
|
|
862
862
|
"button",
|
|
863
863
|
{
|
|
864
864
|
type: "button",
|
|
@@ -868,7 +868,7 @@ function xt({
|
|
|
868
868
|
onClick: _,
|
|
869
869
|
"aria-label": v ? "Hide lyrics" : "Show lyrics",
|
|
870
870
|
"aria-pressed": v,
|
|
871
|
-
children: /* @__PURE__ */
|
|
871
|
+
children: /* @__PURE__ */ d.jsx(ct, {})
|
|
872
872
|
}
|
|
873
873
|
)
|
|
874
874
|
] })
|
|
@@ -881,48 +881,49 @@ function Et({
|
|
|
881
881
|
audio: t,
|
|
882
882
|
playingAudioUrl: r,
|
|
883
883
|
onPlayAudio: n,
|
|
884
|
-
listMaxHeight: a
|
|
884
|
+
listMaxHeight: a,
|
|
885
|
+
mini: u
|
|
885
886
|
}) {
|
|
886
|
-
const
|
|
887
|
+
const l = z("aplayer-list"), b = a ? { maxHeight: a } : void 0, s = S((c) => c ? typeof c == "string" ? c : c.name ?? "Audio artist" : "Audio artist", []), y = M(null);
|
|
887
888
|
return q(() => {
|
|
888
|
-
if (
|
|
889
|
-
const
|
|
890
|
-
return
|
|
891
|
-
|
|
889
|
+
if (y.current) {
|
|
890
|
+
const c = y.current;
|
|
891
|
+
return c.style.maxHeight = `${Math.min(
|
|
892
|
+
c.scrollHeight,
|
|
892
893
|
a ?? 1 / 0
|
|
893
894
|
)}px`, () => {
|
|
894
|
-
|
|
895
|
+
c.removeAttribute("style");
|
|
895
896
|
};
|
|
896
897
|
}
|
|
897
|
-
}, [a]), /* @__PURE__ */
|
|
898
|
+
}, [a, u]), /* @__PURE__ */ d.jsx(
|
|
898
899
|
"div",
|
|
899
900
|
{
|
|
900
|
-
ref:
|
|
901
|
-
className: w(
|
|
902
|
-
[
|
|
903
|
-
[
|
|
901
|
+
ref: y,
|
|
902
|
+
className: w(l.b(), {
|
|
903
|
+
[l.bm("hide")]: !e,
|
|
904
|
+
[l.bs("vars")]: !0
|
|
904
905
|
}),
|
|
905
906
|
"aria-label": "Audio playlist",
|
|
906
907
|
"aria-live": "polite",
|
|
907
|
-
children: /* @__PURE__ */
|
|
908
|
+
children: /* @__PURE__ */ d.jsx("ol", { style: b, children: t.map((c, m) => /* @__PURE__ */ d.jsxs(
|
|
908
909
|
"li",
|
|
909
910
|
{
|
|
910
911
|
className: w({
|
|
911
|
-
[
|
|
912
|
+
[l.bm("active")]: c.url === r
|
|
912
913
|
}),
|
|
913
914
|
onClick: () => {
|
|
914
|
-
|
|
915
|
+
c.url !== r && (n == null || n(c));
|
|
915
916
|
},
|
|
916
917
|
role: "button",
|
|
917
|
-
"aria-label": `${
|
|
918
|
+
"aria-label": `${c.name ?? "Audio name"} by ${s(c.artist)}}`,
|
|
918
919
|
children: [
|
|
919
|
-
/* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ d.jsx("span", { className: l.be("cur") }),
|
|
921
|
+
/* @__PURE__ */ d.jsx("span", { className: l.be("index"), children: m + 1 }),
|
|
922
|
+
/* @__PURE__ */ d.jsx("span", { className: l.be("title"), children: c.name ?? "Audio name" }),
|
|
923
|
+
/* @__PURE__ */ d.jsx("span", { className: l.be("author"), children: s(c.artist) })
|
|
923
924
|
]
|
|
924
925
|
},
|
|
925
|
-
|
|
926
|
+
c.name || m
|
|
926
927
|
)) })
|
|
927
928
|
}
|
|
928
929
|
);
|
|
@@ -930,22 +931,22 @@ function Et({
|
|
|
930
931
|
function Oe({ show: e, lrcText: t, currentTime: r }) {
|
|
931
932
|
const n = z("aplayer-lrc"), a = B(() => St(t), [t]), u = B(() => {
|
|
932
933
|
for (let b = 0; b < a.length; b++) {
|
|
933
|
-
const s = a[b],
|
|
934
|
-
if (r >= s[0] && (!
|
|
934
|
+
const s = a[b], y = a[b + 1];
|
|
935
|
+
if (r >= s[0] && (!y || r < y[0]))
|
|
935
936
|
return b;
|
|
936
937
|
}
|
|
937
938
|
return 0;
|
|
938
|
-
}, [r, a]),
|
|
939
|
+
}, [r, a]), l = B(() => ({
|
|
939
940
|
transform: `translateY(${-u * 16}px)`,
|
|
940
941
|
WebkitTransform: `translateY(${-u * 16}px)`
|
|
941
942
|
}), [u]);
|
|
942
|
-
return /* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ d.jsx(
|
|
943
944
|
"div",
|
|
944
945
|
{
|
|
945
946
|
className: w(n.b(), {
|
|
946
947
|
[n.bm("hide")]: !e
|
|
947
948
|
}),
|
|
948
|
-
children: t ? /* @__PURE__ */
|
|
949
|
+
children: t ? /* @__PURE__ */ d.jsx("div", { className: n.be("contents"), style: l, children: a.map(([, b], s) => /* @__PURE__ */ d.jsx(
|
|
949
950
|
"p",
|
|
950
951
|
{
|
|
951
952
|
className: w({
|
|
@@ -965,12 +966,12 @@ function St(e) {
|
|
|
965
966
|
const t = e.split(`
|
|
966
967
|
`), r = [], n = t.length;
|
|
967
968
|
for (let a = 0; a < n; a++) {
|
|
968
|
-
const u = t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g),
|
|
969
|
+
const u = t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g), l = t[a].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g, "").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, "").replace(/^\s+|\s+$/g, "");
|
|
969
970
|
if (u) {
|
|
970
971
|
const b = u.length;
|
|
971
972
|
for (let s = 0; s < b; s++) {
|
|
972
|
-
const
|
|
973
|
-
r.push([p,
|
|
973
|
+
const y = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/.exec(u[s]), c = y[1] * 60, m = Number.parseInt(y[2]), g = y[4] ? Number.parseInt(y[4]) / (`${y[4]}`.length === 2 ? 100 : 1e3) : 0, p = c + m + g;
|
|
974
|
+
r.push([p, l]);
|
|
974
975
|
}
|
|
975
976
|
}
|
|
976
977
|
}
|
|
@@ -993,41 +994,41 @@ function Tt() {
|
|
|
993
994
|
if (Le) return he;
|
|
994
995
|
Le = 1;
|
|
995
996
|
var e = pe;
|
|
996
|
-
function t(
|
|
997
|
-
return
|
|
997
|
+
function t(m, g) {
|
|
998
|
+
return m === g && (m !== 0 || 1 / m === 1 / g) || m !== m && g !== g;
|
|
998
999
|
}
|
|
999
|
-
var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, a = e.useEffect, u = e.useLayoutEffect,
|
|
1000
|
-
function b(
|
|
1001
|
-
var p = g(),
|
|
1000
|
+
var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, a = e.useEffect, u = e.useLayoutEffect, l = e.useDebugValue;
|
|
1001
|
+
function b(m, g) {
|
|
1002
|
+
var p = g(), h = n({ inst: { value: p, getSnapshot: g } }), i = h[0].inst, f = h[1];
|
|
1002
1003
|
return u(
|
|
1003
1004
|
function() {
|
|
1004
|
-
i.value = p, i.getSnapshot = g, s(i) &&
|
|
1005
|
+
i.value = p, i.getSnapshot = g, s(i) && f({ inst: i });
|
|
1005
1006
|
},
|
|
1006
|
-
[
|
|
1007
|
+
[m, p, g]
|
|
1007
1008
|
), a(
|
|
1008
1009
|
function() {
|
|
1009
|
-
return s(i) &&
|
|
1010
|
-
s(i) &&
|
|
1010
|
+
return s(i) && f({ inst: i }), m(function() {
|
|
1011
|
+
s(i) && f({ inst: i });
|
|
1011
1012
|
});
|
|
1012
1013
|
},
|
|
1013
|
-
[
|
|
1014
|
-
),
|
|
1014
|
+
[m]
|
|
1015
|
+
), l(p), p;
|
|
1015
1016
|
}
|
|
1016
|
-
function s(
|
|
1017
|
-
var g =
|
|
1018
|
-
|
|
1017
|
+
function s(m) {
|
|
1018
|
+
var g = m.getSnapshot;
|
|
1019
|
+
m = m.value;
|
|
1019
1020
|
try {
|
|
1020
1021
|
var p = g();
|
|
1021
|
-
return !r(
|
|
1022
|
+
return !r(m, p);
|
|
1022
1023
|
} catch {
|
|
1023
1024
|
return !0;
|
|
1024
1025
|
}
|
|
1025
1026
|
}
|
|
1026
|
-
function
|
|
1027
|
+
function y(m, g) {
|
|
1027
1028
|
return g();
|
|
1028
1029
|
}
|
|
1029
|
-
var
|
|
1030
|
-
return he.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore :
|
|
1030
|
+
var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : b;
|
|
1031
|
+
return he.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : c, he;
|
|
1031
1032
|
}
|
|
1032
1033
|
var ye = {};
|
|
1033
1034
|
/**
|
|
@@ -1042,29 +1043,29 @@ var ye = {};
|
|
|
1042
1043
|
var Re;
|
|
1043
1044
|
function jt() {
|
|
1044
1045
|
return Re || (Re = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1045
|
-
function e(p,
|
|
1046
|
-
return p ===
|
|
1046
|
+
function e(p, h) {
|
|
1047
|
+
return p === h && (p !== 0 || 1 / p === 1 / h) || p !== p && h !== h;
|
|
1047
1048
|
}
|
|
1048
|
-
function t(p,
|
|
1049
|
-
|
|
1049
|
+
function t(p, h) {
|
|
1050
|
+
c || a.startTransition === void 0 || (c = !0, console.error(
|
|
1050
1051
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
1051
1052
|
));
|
|
1052
|
-
var i =
|
|
1053
|
-
if (!
|
|
1054
|
-
var
|
|
1055
|
-
u(i,
|
|
1053
|
+
var i = h();
|
|
1054
|
+
if (!m) {
|
|
1055
|
+
var f = h();
|
|
1056
|
+
u(i, f) || (console.error(
|
|
1056
1057
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1057
|
-
),
|
|
1058
|
+
), m = !0);
|
|
1058
1059
|
}
|
|
1059
|
-
|
|
1060
|
-
inst: { value: i, getSnapshot:
|
|
1060
|
+
f = l({
|
|
1061
|
+
inst: { value: i, getSnapshot: h }
|
|
1061
1062
|
});
|
|
1062
|
-
var v =
|
|
1063
|
+
var v = f[0].inst, _ = f[1];
|
|
1063
1064
|
return s(
|
|
1064
1065
|
function() {
|
|
1065
|
-
v.value = i, v.getSnapshot =
|
|
1066
|
+
v.value = i, v.getSnapshot = h, r(v) && _({ inst: v });
|
|
1066
1067
|
},
|
|
1067
|
-
[p, i,
|
|
1068
|
+
[p, i, h]
|
|
1068
1069
|
), b(
|
|
1069
1070
|
function() {
|
|
1070
1071
|
return r(v) && _({ inst: v }), p(function() {
|
|
@@ -1072,23 +1073,23 @@ function jt() {
|
|
|
1072
1073
|
});
|
|
1073
1074
|
},
|
|
1074
1075
|
[p]
|
|
1075
|
-
),
|
|
1076
|
+
), y(i), i;
|
|
1076
1077
|
}
|
|
1077
1078
|
function r(p) {
|
|
1078
|
-
var
|
|
1079
|
+
var h = p.getSnapshot;
|
|
1079
1080
|
p = p.value;
|
|
1080
1081
|
try {
|
|
1081
|
-
var i =
|
|
1082
|
+
var i = h();
|
|
1082
1083
|
return !u(p, i);
|
|
1083
1084
|
} catch {
|
|
1084
1085
|
return !0;
|
|
1085
1086
|
}
|
|
1086
1087
|
}
|
|
1087
|
-
function n(p,
|
|
1088
|
-
return
|
|
1088
|
+
function n(p, h) {
|
|
1089
|
+
return h();
|
|
1089
1090
|
}
|
|
1090
1091
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1091
|
-
var a = pe, u = typeof Object.is == "function" ? Object.is : e,
|
|
1092
|
+
var a = pe, u = typeof Object.is == "function" ? Object.is : e, l = a.useState, b = a.useEffect, s = a.useLayoutEffect, y = a.useDebugValue, c = !1, m = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : t;
|
|
1092
1093
|
ye.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1093
1094
|
}()), ye;
|
|
1094
1095
|
}
|
|
@@ -1131,16 +1132,16 @@ function _t(e) {
|
|
|
1131
1132
|
}
|
|
1132
1133
|
function Ot(e) {
|
|
1133
1134
|
const t = _t(e), r = S((i) => {
|
|
1134
|
-
for (let
|
|
1135
|
-
const v = U[
|
|
1135
|
+
for (let f = 0; f < U.length; f++) {
|
|
1136
|
+
const v = U[f];
|
|
1136
1137
|
v !== i && !v.paused && v.pause();
|
|
1137
1138
|
}
|
|
1138
1139
|
}, []), n = S(
|
|
1139
1140
|
async (i) => {
|
|
1140
1141
|
var v;
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1143
|
-
e.mutex && r(
|
|
1142
|
+
const f = t.current;
|
|
1143
|
+
if (f) {
|
|
1144
|
+
e.mutex && r(f), f.src !== i && (f.pause(), f.currentTime = 0, f.src = i);
|
|
1144
1145
|
try {
|
|
1145
1146
|
await ((v = t.current) == null ? void 0 : v.play());
|
|
1146
1147
|
} catch {
|
|
@@ -1150,8 +1151,8 @@ function Ot(e) {
|
|
|
1150
1151
|
[t, e.mutex, r]
|
|
1151
1152
|
), a = S(
|
|
1152
1153
|
(i) => {
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1154
|
+
const f = t.current;
|
|
1155
|
+
f && (f.paused ? n(i) : f.pause());
|
|
1155
1156
|
},
|
|
1156
1157
|
[t, n]
|
|
1157
1158
|
), u = S(
|
|
@@ -1159,7 +1160,7 @@ function Ot(e) {
|
|
|
1159
1160
|
t.current.currentTime = i;
|
|
1160
1161
|
},
|
|
1161
1162
|
[t]
|
|
1162
|
-
),
|
|
1163
|
+
), l = S(() => {
|
|
1163
1164
|
t.current && (t.current.muted = !t.current.muted);
|
|
1164
1165
|
}, [t]), b = S(
|
|
1165
1166
|
(i) => {
|
|
@@ -1169,8 +1170,8 @@ function Ot(e) {
|
|
|
1169
1170
|
), s = H.useSyncExternalStore(
|
|
1170
1171
|
S(
|
|
1171
1172
|
(i) => {
|
|
1172
|
-
var
|
|
1173
|
-
return (
|
|
1173
|
+
var f;
|
|
1174
|
+
return (f = t.current) == null || f.addEventListener(
|
|
1174
1175
|
"volumechange",
|
|
1175
1176
|
i
|
|
1176
1177
|
), () => {
|
|
@@ -1189,11 +1190,11 @@ function Ot(e) {
|
|
|
1189
1190
|
},
|
|
1190
1191
|
() => {
|
|
1191
1192
|
}
|
|
1192
|
-
),
|
|
1193
|
+
), y = H.useSyncExternalStore(
|
|
1193
1194
|
S(
|
|
1194
1195
|
(i) => {
|
|
1195
|
-
var
|
|
1196
|
-
return (
|
|
1196
|
+
var f;
|
|
1197
|
+
return (f = t.current) == null || f.addEventListener(
|
|
1197
1198
|
"volumechange",
|
|
1198
1199
|
i
|
|
1199
1200
|
), () => {
|
|
@@ -1212,11 +1213,11 @@ function Ot(e) {
|
|
|
1212
1213
|
},
|
|
1213
1214
|
() => {
|
|
1214
1215
|
}
|
|
1215
|
-
),
|
|
1216
|
+
), c = H.useSyncExternalStore(
|
|
1216
1217
|
S(
|
|
1217
1218
|
(i) => {
|
|
1218
|
-
var
|
|
1219
|
-
return (
|
|
1219
|
+
var f;
|
|
1220
|
+
return (f = t.current) == null || f.addEventListener("timeupdate", i), () => {
|
|
1220
1221
|
var v;
|
|
1221
1222
|
(v = t.current) == null || v.removeEventListener(
|
|
1222
1223
|
"timeupdate",
|
|
@@ -1232,11 +1233,11 @@ function Ot(e) {
|
|
|
1232
1233
|
},
|
|
1233
1234
|
() => {
|
|
1234
1235
|
}
|
|
1235
|
-
),
|
|
1236
|
+
), m = H.useSyncExternalStore(
|
|
1236
1237
|
S(
|
|
1237
1238
|
(i) => {
|
|
1238
|
-
var
|
|
1239
|
-
return (
|
|
1239
|
+
var f;
|
|
1240
|
+
return (f = t.current) == null || f.addEventListener(
|
|
1240
1241
|
"durationchange",
|
|
1241
1242
|
i
|
|
1242
1243
|
), () => {
|
|
@@ -1258,8 +1259,8 @@ function Ot(e) {
|
|
|
1258
1259
|
), g = H.useSyncExternalStore(
|
|
1259
1260
|
S(
|
|
1260
1261
|
(i) => {
|
|
1261
|
-
var
|
|
1262
|
-
return (
|
|
1262
|
+
var f;
|
|
1263
|
+
return (f = t.current) == null || f.addEventListener("progress", i), () => {
|
|
1263
1264
|
var v;
|
|
1264
1265
|
(v = t.current) == null || v.removeEventListener(
|
|
1265
1266
|
"progress",
|
|
@@ -1278,8 +1279,8 @@ function Ot(e) {
|
|
|
1278
1279
|
), p = H.useSyncExternalStore(
|
|
1279
1280
|
S(
|
|
1280
1281
|
(i) => {
|
|
1281
|
-
var
|
|
1282
|
-
return (
|
|
1282
|
+
var f, v;
|
|
1283
|
+
return (f = t.current) == null || f.addEventListener("play", i), (v = t.current) == null || v.addEventListener("pause", i), () => {
|
|
1283
1284
|
var _, E;
|
|
1284
1285
|
(_ = t.current) == null || _.removeEventListener("play", i), (E = t.current) == null || E.removeEventListener("pause", i);
|
|
1285
1286
|
};
|
|
@@ -1292,11 +1293,11 @@ function Ot(e) {
|
|
|
1292
1293
|
},
|
|
1293
1294
|
() => {
|
|
1294
1295
|
}
|
|
1295
|
-
),
|
|
1296
|
+
), h = H.useSyncExternalStore(
|
|
1296
1297
|
S(
|
|
1297
1298
|
(i) => {
|
|
1298
|
-
var
|
|
1299
|
-
return (
|
|
1299
|
+
var f, v;
|
|
1300
|
+
return (f = t.current) == null || f.addEventListener("playing", i), (v = t.current) == null || v.addEventListener("waiting", i), () => {
|
|
1300
1301
|
var _, E;
|
|
1301
1302
|
(_ = t.current) == null || _.removeEventListener(
|
|
1302
1303
|
"playing",
|
|
@@ -1321,15 +1322,15 @@ function Ot(e) {
|
|
|
1321
1322
|
playAudio: n,
|
|
1322
1323
|
togglePlay: a,
|
|
1323
1324
|
seek: u,
|
|
1324
|
-
toggleMuted:
|
|
1325
|
+
toggleMuted: l,
|
|
1325
1326
|
setVolume: b,
|
|
1326
1327
|
volume: s,
|
|
1327
|
-
muted:
|
|
1328
|
-
currentTime:
|
|
1329
|
-
duration:
|
|
1328
|
+
muted: y,
|
|
1329
|
+
currentTime: c,
|
|
1330
|
+
duration: m,
|
|
1330
1331
|
bufferedSeconds: g,
|
|
1331
1332
|
isPlaying: p,
|
|
1332
|
-
isLoading:
|
|
1333
|
+
isLoading: h
|
|
1333
1334
|
};
|
|
1334
1335
|
}
|
|
1335
1336
|
function Lt(e, t) {
|
|
@@ -1364,61 +1365,16 @@ function qe() {
|
|
|
1364
1365
|
}
|
|
1365
1366
|
function At() {
|
|
1366
1367
|
const e = M(null), [t, r] = V({ text: "", style: { opacity: 0 } }), n = qe(), a = S(
|
|
1367
|
-
(u,
|
|
1368
|
+
(u, l = 2e3) => {
|
|
1368
1369
|
e.current && clearTimeout(e.current), r({ text: u, style: { opacity: 1 } }), e.current = n(() => {
|
|
1369
1370
|
r({ text: u, style: { opacity: 0 } });
|
|
1370
|
-
},
|
|
1371
|
+
}, l);
|
|
1371
1372
|
},
|
|
1372
1373
|
[n]
|
|
1373
1374
|
);
|
|
1374
1375
|
return [t, a];
|
|
1375
1376
|
}
|
|
1376
1377
|
function Nt(e) {
|
|
1377
|
-
return Pt(e.slice());
|
|
1378
|
-
}
|
|
1379
|
-
function Pt(e) {
|
|
1380
|
-
let t = e.length, r;
|
|
1381
|
-
for (; t !== 0; )
|
|
1382
|
-
r = Math.floor(Math.random() * t), t--, [e[t], e[r]] = [
|
|
1383
|
-
e[r],
|
|
1384
|
-
e[t]
|
|
1385
|
-
];
|
|
1386
|
-
return e;
|
|
1387
|
-
}
|
|
1388
|
-
function $t(e, t) {
|
|
1389
|
-
const { initialLoop: r = "all", initialOrder: n = "list" } = t, [a, u] = V(r), [f, b] = V(n), s = B(() => f === "list" ? e : Nt(e), [e, f]), [d, m] = V(s[0]), h = S((l) => l.url, []), g = B(() => s.findIndex((v) => h(v) === h(d)) < s.length - 1 || a !== "none", [s, d, a, h]), p = S(() => {
|
|
1390
|
-
m((l) => {
|
|
1391
|
-
const v = s.findIndex((_) => h(_) === h(l));
|
|
1392
|
-
return v < s.length - 1 ? s[v + 1] : { ...s[0] };
|
|
1393
|
-
});
|
|
1394
|
-
}, [a, s, h]), y = S(() => {
|
|
1395
|
-
m((l) => {
|
|
1396
|
-
const v = s.indexOf(l);
|
|
1397
|
-
return v > 0 ? s[v - 1] : l;
|
|
1398
|
-
});
|
|
1399
|
-
}, [s]), i = S((l) => {
|
|
1400
|
-
m(l);
|
|
1401
|
-
}, []);
|
|
1402
|
-
return q(() => {
|
|
1403
|
-
const l = s.find(
|
|
1404
|
-
(v) => h(v) === h(d)
|
|
1405
|
-
);
|
|
1406
|
-
m(l || s[0]);
|
|
1407
|
-
}, [s, h, d]), {
|
|
1408
|
-
list: s,
|
|
1409
|
-
currentSong: d,
|
|
1410
|
-
hasNextSong: g,
|
|
1411
|
-
next: p,
|
|
1412
|
-
previous: y,
|
|
1413
|
-
prioritize: i,
|
|
1414
|
-
order: f,
|
|
1415
|
-
setOrder: b,
|
|
1416
|
-
loop: a,
|
|
1417
|
-
setLoop: u,
|
|
1418
|
-
length: s.length
|
|
1419
|
-
};
|
|
1420
|
-
}
|
|
1421
|
-
function Mt(e) {
|
|
1422
1378
|
const t = Lt(e, {
|
|
1423
1379
|
appearance: "normal",
|
|
1424
1380
|
volume: 0.7,
|
|
@@ -1434,36 +1390,36 @@ function Mt(e) {
|
|
|
1434
1390
|
appearance: n,
|
|
1435
1391
|
initialLoop: a,
|
|
1436
1392
|
initialOrder: u,
|
|
1437
|
-
volume:
|
|
1393
|
+
volume: l,
|
|
1438
1394
|
autoPlay: b,
|
|
1439
1395
|
listMaxHeight: s,
|
|
1440
|
-
listFolded:
|
|
1441
|
-
mutex:
|
|
1442
|
-
theme:
|
|
1396
|
+
listFolded: y,
|
|
1397
|
+
mutex: c,
|
|
1398
|
+
theme: m,
|
|
1443
1399
|
border: g
|
|
1444
1400
|
} = t, p = B(
|
|
1445
1401
|
() => Array.isArray(r) ? r : [r],
|
|
1446
1402
|
[r]
|
|
1447
|
-
),
|
|
1403
|
+
), h = Mt(p, {
|
|
1448
1404
|
initialLoop: a,
|
|
1449
1405
|
initialOrder: u
|
|
1450
|
-
}), [i,
|
|
1406
|
+
}), [i, f] = At(), { mini: v, setMini: _ } = Rt(t.mini), E = qe(), j = M(null), C = S(() => {
|
|
1451
1407
|
j.current && (clearTimeout(j.current), j.current = null);
|
|
1452
1408
|
}, []), k = M(!1), A = Ot({
|
|
1453
|
-
src:
|
|
1454
|
-
initialVolume:
|
|
1409
|
+
src: h.currentSong.url,
|
|
1410
|
+
initialVolume: l,
|
|
1455
1411
|
autoPlay: b,
|
|
1456
|
-
mutex:
|
|
1412
|
+
mutex: c,
|
|
1457
1413
|
onError(P) {
|
|
1458
1414
|
const { error: o } = P.target;
|
|
1459
|
-
o &&
|
|
1415
|
+
o && f(
|
|
1460
1416
|
"An audio error has occurred, player will skip forward in 2 seconds."
|
|
1461
|
-
),
|
|
1462
|
-
|
|
1417
|
+
), h.hasNextSong && (j.current = E(() => {
|
|
1418
|
+
h.next();
|
|
1463
1419
|
}, 2e3));
|
|
1464
1420
|
},
|
|
1465
1421
|
onEnded() {
|
|
1466
|
-
const { list: P, currentSong: o, loop: x, prioritize: T, hasNextSong: L } =
|
|
1422
|
+
const { list: P, currentSong: o, loop: x, prioritize: T, hasNextSong: L } = h, { audio: $ } = A;
|
|
1467
1423
|
if (x === "one") {
|
|
1468
1424
|
T({ ...o });
|
|
1469
1425
|
return;
|
|
@@ -1472,20 +1428,20 @@ function Mt(e) {
|
|
|
1472
1428
|
k.current = !0, $.currentTime = 0, $.pause(), $.src = P[0].url, T(P[0]);
|
|
1473
1429
|
return;
|
|
1474
1430
|
}
|
|
1475
|
-
|
|
1431
|
+
h.next();
|
|
1476
1432
|
}
|
|
1477
|
-
}), D =
|
|
1478
|
-
C(), A.togglePlay(
|
|
1479
|
-
}, [A, C,
|
|
1433
|
+
}), D = h.length > 1, O = S(() => {
|
|
1434
|
+
C(), A.togglePlay(h.currentSong.url);
|
|
1435
|
+
}, [A, C, h.currentSong.url]), { prioritize: re } = h, G = S(
|
|
1480
1436
|
(P) => {
|
|
1481
1437
|
C(), re(P);
|
|
1482
1438
|
},
|
|
1483
1439
|
[C, re]
|
|
1484
|
-
), [ne, ce] = V(() => D && !
|
|
1440
|
+
), [ne, ce] = V(() => D && !y), [J, ae] = V(!0), Y = M(null);
|
|
1485
1441
|
q(() => {
|
|
1486
|
-
b && A.playAudio(
|
|
1442
|
+
b && A.playAudio(h.currentSong.url);
|
|
1487
1443
|
}, []);
|
|
1488
|
-
const K = M(!0), X = M(
|
|
1444
|
+
const K = M(!0), X = M(h.currentSong);
|
|
1489
1445
|
return q(() => {
|
|
1490
1446
|
if (K.current) {
|
|
1491
1447
|
K.current = !1;
|
|
@@ -1495,20 +1451,20 @@ function Mt(e) {
|
|
|
1495
1451
|
k.current = !1;
|
|
1496
1452
|
return;
|
|
1497
1453
|
}
|
|
1498
|
-
|
|
1499
|
-
}, [
|
|
1454
|
+
h.currentSong && (h.loop === "one" || h.currentSong !== X.current) && (X.current = h.currentSong, A.playAudio(h.currentSong.url));
|
|
1455
|
+
}, [h.currentSong]), q(() => {
|
|
1500
1456
|
if (n === "fixed" && Y.current) {
|
|
1501
1457
|
const P = Y.current;
|
|
1502
|
-
return P.style.width =
|
|
1458
|
+
return P.style.width = "400px", () => {
|
|
1503
1459
|
P.removeAttribute("style");
|
|
1504
1460
|
};
|
|
1505
1461
|
}
|
|
1506
1462
|
}, [n]), {
|
|
1507
1463
|
bodyRef: Y,
|
|
1508
1464
|
appearance: n,
|
|
1509
|
-
volume:
|
|
1465
|
+
volume: l,
|
|
1510
1466
|
listMaxHeight: s,
|
|
1511
|
-
theme:
|
|
1467
|
+
theme: m,
|
|
1512
1468
|
border: g,
|
|
1513
1469
|
notice: i,
|
|
1514
1470
|
audioControl: A,
|
|
@@ -1521,10 +1477,55 @@ function Mt(e) {
|
|
|
1521
1477
|
displayLyrics: J,
|
|
1522
1478
|
setDisplayLyrics: ae,
|
|
1523
1479
|
setMini: _,
|
|
1524
|
-
playlist:
|
|
1480
|
+
playlist: h,
|
|
1525
1481
|
hasPlaylist: D
|
|
1526
1482
|
};
|
|
1527
1483
|
}
|
|
1484
|
+
function Pt(e) {
|
|
1485
|
+
return $t(e.slice());
|
|
1486
|
+
}
|
|
1487
|
+
function $t(e) {
|
|
1488
|
+
let t = e.length, r;
|
|
1489
|
+
for (; t !== 0; )
|
|
1490
|
+
r = Math.floor(Math.random() * t), t--, [e[t], e[r]] = [
|
|
1491
|
+
e[r],
|
|
1492
|
+
e[t]
|
|
1493
|
+
];
|
|
1494
|
+
return e;
|
|
1495
|
+
}
|
|
1496
|
+
function Mt(e, t) {
|
|
1497
|
+
const { initialLoop: r = "all", initialOrder: n = "list" } = t, [a, u] = V(r), [l, b] = V(n), s = B(() => l === "list" ? e : Pt(e), [e, l]), [y, c] = V(s[0]), m = S((f) => f.url, []), g = B(() => s.findIndex((v) => m(v) === m(y)) < s.length - 1 || a !== "none", [s, y, a, m]), p = S(() => {
|
|
1498
|
+
c((f) => {
|
|
1499
|
+
const v = s.findIndex((_) => m(_) === m(f));
|
|
1500
|
+
return v < s.length - 1 ? s[v + 1] : { ...s[0] };
|
|
1501
|
+
});
|
|
1502
|
+
}, [a, s, m]), h = S(() => {
|
|
1503
|
+
c((f) => {
|
|
1504
|
+
const v = s.indexOf(f);
|
|
1505
|
+
return v > 0 ? s[v - 1] : f;
|
|
1506
|
+
});
|
|
1507
|
+
}, [s]), i = S((f) => {
|
|
1508
|
+
c(f);
|
|
1509
|
+
}, []);
|
|
1510
|
+
return q(() => {
|
|
1511
|
+
const f = s.find(
|
|
1512
|
+
(v) => m(v) === m(y)
|
|
1513
|
+
);
|
|
1514
|
+
c(f || s[0]);
|
|
1515
|
+
}, [s, m, y]), {
|
|
1516
|
+
list: s,
|
|
1517
|
+
currentSong: y,
|
|
1518
|
+
hasNextSong: g,
|
|
1519
|
+
next: p,
|
|
1520
|
+
previous: h,
|
|
1521
|
+
prioritize: i,
|
|
1522
|
+
order: l,
|
|
1523
|
+
setOrder: b,
|
|
1524
|
+
loop: a,
|
|
1525
|
+
setLoop: u,
|
|
1526
|
+
length: s.length
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1528
1529
|
function Ct(e) {
|
|
1529
1530
|
var k, A, D;
|
|
1530
1531
|
const t = z("aplayer"), {
|
|
@@ -1532,30 +1533,30 @@ function Ct(e) {
|
|
|
1532
1533
|
appearance: n,
|
|
1533
1534
|
volume: a,
|
|
1534
1535
|
listMaxHeight: u,
|
|
1535
|
-
theme:
|
|
1536
|
+
theme: l,
|
|
1536
1537
|
border: b,
|
|
1537
1538
|
notice: s,
|
|
1538
|
-
audio:
|
|
1539
|
-
audioControl:
|
|
1540
|
-
handlePlayButtonClick:
|
|
1539
|
+
audio: y,
|
|
1540
|
+
audioControl: c,
|
|
1541
|
+
handlePlayButtonClick: m,
|
|
1541
1542
|
handlePlayAudioFromList: g,
|
|
1542
1543
|
isPlaylistOpen: p,
|
|
1543
|
-
setPlaylistOpen:
|
|
1544
|
+
setPlaylistOpen: h,
|
|
1544
1545
|
mini: i,
|
|
1545
|
-
displayLyrics:
|
|
1546
|
+
displayLyrics: f,
|
|
1546
1547
|
setDisplayLyrics: v,
|
|
1547
1548
|
setMini: _,
|
|
1548
1549
|
playlist: E,
|
|
1549
1550
|
hasPlaylist: j
|
|
1550
|
-
} =
|
|
1551
|
-
return /* @__PURE__ */
|
|
1551
|
+
} = Nt(e), C = S((O) => O ? typeof O == "string" ? O : O.url ? /* @__PURE__ */ d.jsx("a", { href: O.url, target: "_blank", rel: "noreferrer", children: O.name ?? "Audio artist" }) : O.name ?? "Audio artist" : "Audio artist", []);
|
|
1552
|
+
return /* @__PURE__ */ d.jsxs(
|
|
1552
1553
|
"div",
|
|
1553
1554
|
{
|
|
1554
1555
|
className: w(t.b(), {
|
|
1555
|
-
[t.bs(
|
|
1556
|
+
[t.bs(l)]: !0,
|
|
1556
1557
|
[t.bs("vars")]: !0,
|
|
1557
1558
|
[t.bm(n)]: !0,
|
|
1558
|
-
[t.bm("loading")]:
|
|
1559
|
+
[t.bm("loading")]: c.isLoading,
|
|
1559
1560
|
[t.bm("withlist")]: j,
|
|
1560
1561
|
[t.bm("list-folded")]: !p,
|
|
1561
1562
|
[t.bm("withlrc")]: !!E.currentSong.lrc && n !== "fixed",
|
|
@@ -1565,112 +1566,113 @@ function Ct(e) {
|
|
|
1565
1566
|
role: "region",
|
|
1566
1567
|
"aria-label": "Audio Player",
|
|
1567
1568
|
children: [
|
|
1568
|
-
/* @__PURE__ */
|
|
1569
|
+
/* @__PURE__ */ d.jsxs(
|
|
1569
1570
|
"div",
|
|
1570
1571
|
{
|
|
1571
1572
|
ref: r,
|
|
1572
1573
|
className: t.be("body"),
|
|
1573
1574
|
children: [
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ d.jsx(
|
|
1575
1576
|
"div",
|
|
1576
1577
|
{
|
|
1577
1578
|
className: t.be("pic"),
|
|
1578
|
-
onClick:
|
|
1579
|
+
onClick: m,
|
|
1579
1580
|
style: {
|
|
1580
1581
|
backgroundImage: `url("${(k = E.currentSong) == null ? void 0 : k.cover}")`
|
|
1581
1582
|
},
|
|
1582
1583
|
role: "button",
|
|
1583
|
-
"aria-label":
|
|
1584
|
-
children: /* @__PURE__ */
|
|
1584
|
+
"aria-label": c.isPlaying ? "Pause audio" : "Play audio",
|
|
1585
|
+
children: /* @__PURE__ */ d.jsx(
|
|
1585
1586
|
"div",
|
|
1586
1587
|
{
|
|
1587
1588
|
className: w(
|
|
1588
1589
|
t.be("button"),
|
|
1589
|
-
|
|
1590
|
+
c.isPlaying ? t.bm("pause") : t.bm("play")
|
|
1590
1591
|
),
|
|
1591
1592
|
role: "presentation",
|
|
1592
|
-
children:
|
|
1593
|
+
children: c.isPlaying ? /* @__PURE__ */ d.jsx(at, {}) : /* @__PURE__ */ d.jsx(bt, {})
|
|
1593
1594
|
}
|
|
1594
1595
|
)
|
|
1595
1596
|
}
|
|
1596
1597
|
),
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
/* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
1598
|
+
/* @__PURE__ */ d.jsxs("div", { className: w(t.be("info")), children: [
|
|
1599
|
+
/* @__PURE__ */ d.jsxs("div", { className: w(t.be("music")), children: [
|
|
1600
|
+
/* @__PURE__ */ d.jsx("span", { className: w(t.be("title")), children: ((A = E.currentSong) == null ? void 0 : A.name) ?? "Audio name" }),
|
|
1601
|
+
/* @__PURE__ */ d.jsxs("span", { className: w(t.be("author")), children: [
|
|
1601
1602
|
" ",
|
|
1602
1603
|
"-",
|
|
1603
1604
|
" ",
|
|
1604
1605
|
C((D = E.currentSong) == null ? void 0 : D.artist)
|
|
1605
1606
|
] })
|
|
1606
1607
|
] }),
|
|
1607
|
-
n === "fixed" ? null : /* @__PURE__ */
|
|
1608
|
+
n === "fixed" ? null : /* @__PURE__ */ d.jsx(
|
|
1608
1609
|
Oe,
|
|
1609
1610
|
{
|
|
1610
|
-
show:
|
|
1611
|
+
show: f,
|
|
1611
1612
|
lrcText: E.currentSong.lrc,
|
|
1612
|
-
currentTime:
|
|
1613
|
+
currentTime: c.currentTime ?? 0
|
|
1613
1614
|
}
|
|
1614
1615
|
),
|
|
1615
|
-
/* @__PURE__ */
|
|
1616
|
+
/* @__PURE__ */ d.jsx(
|
|
1616
1617
|
xt,
|
|
1617
1618
|
{
|
|
1618
|
-
volume:
|
|
1619
|
-
onChangeVolume:
|
|
1620
|
-
muted:
|
|
1621
|
-
onToggleMuted: () =>
|
|
1622
|
-
currentTime:
|
|
1623
|
-
audioDurationSeconds:
|
|
1624
|
-
bufferedSeconds:
|
|
1625
|
-
onSeek: (O) =>
|
|
1626
|
-
onToggleMenu: () =>
|
|
1619
|
+
volume: c.volume ?? a,
|
|
1620
|
+
onChangeVolume: c.setVolume,
|
|
1621
|
+
muted: c.muted ?? !1,
|
|
1622
|
+
onToggleMuted: () => c.toggleMuted(),
|
|
1623
|
+
currentTime: c.currentTime,
|
|
1624
|
+
audioDurationSeconds: c.duration,
|
|
1625
|
+
bufferedSeconds: c.bufferedSeconds,
|
|
1626
|
+
onSeek: (O) => c.seek(O),
|
|
1627
|
+
onToggleMenu: () => h((O) => !O),
|
|
1627
1628
|
order: E.order,
|
|
1628
1629
|
onOrderChange: E.setOrder,
|
|
1629
1630
|
loop: E.loop,
|
|
1630
1631
|
onLoopChange: E.setLoop,
|
|
1631
|
-
isPlaying:
|
|
1632
|
-
onTogglePlay:
|
|
1632
|
+
isPlaying: c.isPlaying ?? !1,
|
|
1633
|
+
onTogglePlay: m,
|
|
1633
1634
|
onSkipForward: () => {
|
|
1634
1635
|
E.hasNextSong && E.next();
|
|
1635
1636
|
},
|
|
1636
1637
|
onSkipBack: () => {
|
|
1637
1638
|
E.previous();
|
|
1638
1639
|
},
|
|
1639
|
-
showLyrics:
|
|
1640
|
+
showLyrics: f,
|
|
1640
1641
|
onToggleLyrics: () => {
|
|
1641
1642
|
v((O) => !O);
|
|
1642
1643
|
}
|
|
1643
1644
|
}
|
|
1644
1645
|
)
|
|
1645
1646
|
] }),
|
|
1646
|
-
/* @__PURE__ */
|
|
1647
|
-
/* @__PURE__ */
|
|
1647
|
+
/* @__PURE__ */ d.jsx("div", { className: t.be("notice"), style: s.style, children: s.text }),
|
|
1648
|
+
/* @__PURE__ */ d.jsx(
|
|
1648
1649
|
"div",
|
|
1649
1650
|
{
|
|
1650
1651
|
className: t.be("miniswitcher"),
|
|
1651
1652
|
onClick: () => _((O) => !O),
|
|
1652
|
-
children: /* @__PURE__ */
|
|
1653
|
+
children: /* @__PURE__ */ d.jsx("button", { className: w(t.bs("icon"), t.bs("icon-right")), type: "button", children: /* @__PURE__ */ d.jsx(nt, {}) })
|
|
1653
1654
|
}
|
|
1654
1655
|
)
|
|
1655
1656
|
]
|
|
1656
1657
|
}
|
|
1657
1658
|
),
|
|
1658
|
-
j ? /* @__PURE__ */
|
|
1659
|
+
j ? /* @__PURE__ */ d.jsx(
|
|
1659
1660
|
Et,
|
|
1660
1661
|
{
|
|
1661
1662
|
open: p,
|
|
1662
|
-
audio:
|
|
1663
|
+
audio: y,
|
|
1663
1664
|
playingAudioUrl: E.currentSong.url,
|
|
1664
1665
|
onPlayAudio: g,
|
|
1665
|
-
listMaxHeight: u
|
|
1666
|
+
listMaxHeight: u,
|
|
1667
|
+
mini: i
|
|
1666
1668
|
}
|
|
1667
1669
|
) : null,
|
|
1668
|
-
n === "fixed" && /* @__PURE__ */
|
|
1670
|
+
n === "fixed" && /* @__PURE__ */ d.jsx(
|
|
1669
1671
|
Oe,
|
|
1670
1672
|
{
|
|
1671
|
-
show:
|
|
1673
|
+
show: f,
|
|
1672
1674
|
lrcText: E.currentSong.lrc,
|
|
1673
|
-
currentTime:
|
|
1675
|
+
currentTime: c.currentTime ?? 0
|
|
1674
1676
|
}
|
|
1675
1677
|
)
|
|
1676
1678
|
]
|