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.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 f = null;
20
- if (u !== void 0 && (f = "" + u), a.key !== void 0 && (f = "" + a.key), "key" in a) {
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: f,
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 l:
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 y:
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 f(o) {
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 d(o, x, T, L, $, I, le, de) {
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 m(o, x, T, L, $, I, le, de) {
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
- h(N[L]);
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 h(N);
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), f(x) && (r(x.key), N = "" + x.key), "key" in x) {
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
- ), d(
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 h(o) {
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"), y = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), l = 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() {
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 m(
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 m(
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 c = Ve(), ie = (e) => `--${e}`, Se = (e) => `var(--${e})`, Te = (e, t) => `--${e}: ${t};`;
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 f of Object.keys(n))
302
- a[ie(`${u}-${e}-${f}`)] = n[f];
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 f of Object.keys(n))
311
- a[ie(`${u}-${f}`)] = n[f];
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, f, b = [], s = !0, d = !1;
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 (m) {
352
- d = !0, a = m;
351
+ } catch (c) {
352
+ y = !0, a = c;
353
353
  } finally {
354
354
  try {
355
- if (!s && r.return != null && (f = r.return(), Object(f) !== f)) return;
355
+ if (!s && r.return != null && (l = r.return(), Object(l) !== l)) return;
356
356
  } finally {
357
- if (d) throw a;
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(d) {
376
- throw d;
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, f = !0, b = !1;
382
+ var u, l = !0, b = !1;
383
383
  return { s: function() {
384
384
  r = r.call(e);
385
385
  }, n: function() {
386
- var d = r.next();
387
- return f = d.done, d;
388
- }, e: function(d) {
389
- b = !0, u = d;
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
- f || r.return == null || r.return();
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, f = e.color, b = Ke(e, De), s = function(m) {
477
- var h = r || m.size || "1em", g, p = "", y = "";
478
- return m.className && (g = m.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)"), y = "rotate(".concat(u, "deg)")), /* @__PURE__ */ W.createElement("svg", se({
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
- }, m.attrs, t, b, {
480
+ }, c.attrs, t, b, {
481
481
  className: g,
482
482
  style: te(te({
483
- color: f || m.color,
483
+ color: l || c.color,
484
484
  msTransform: p,
485
- transform: y
486
- }, m.style), e.style),
487
- width: h,
488
- height: h
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(d) {
492
- return s(d);
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, f = u.split(":"), b = Be(f, 2), s = b[0], d = b[1];
500
- if (s && d) {
501
- var m = s.trim().replace(/-./g, function(h) {
502
- return h.charAt(1).toUpperCase();
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[m] = d.trim();
504
+ t[c] = y.trim();
505
505
  }
506
506
  }
507
- } catch (h) {
508
- n.e(h);
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), [f, b] = V(t), s = M(!1);
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 d = S(
616
- (m) => {
615
+ const y = S(
616
+ (c) => {
617
617
  s.current = !0;
618
- const h = me(m, u);
619
- b(h);
620
- const g = (y) => {
621
- const i = me(y, u);
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 = (y) => {
623
+ }, p = (h) => {
624
624
  document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", p);
625
- const i = me(y, u);
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__ */ c.jsx(
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: d,
637
+ onMouseDown: y,
638
638
  role: "slider",
639
639
  "aria-label": "Audio progress",
640
- "aria-valuenow": f ? f * 100 : 0,
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__ */ c.jsxs("div", { className: n.be("inner"), children: [
645
- typeof e < "u" ? /* @__PURE__ */ c.jsx(
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 f < "u" ? /* @__PURE__ */ c.jsx(
652
+ typeof l < "u" ? /* @__PURE__ */ d.jsx(
653
653
  "div",
654
654
  {
655
655
  className: n.be("played"),
656
656
  style: {
657
- width: `${f * 100}%`
657
+ width: `${l * 100}%`
658
658
  },
659
- children: /* @__PURE__ */ c.jsx(
659
+ children: /* @__PURE__ */ d.jsx(
660
660
  "span",
661
661
  {
662
662
  className: n.be("thumb"),
663
- children: /* @__PURE__ */ c.jsx("span", { className: w(a.bs("loading")), children: /* @__PURE__ */ c.jsx(rt, {}) })
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"), f = M(null), [b, s] = V(!1), d = S(
679
- (m) => {
680
- n(ve(m, f)), s(!0);
681
- const h = (p) => {
682
- n(ve(p, f));
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", h), s(!1), n(ve(p, f));
684
+ document.removeEventListener("mouseup", g), document.removeEventListener("mousemove", m), s(!1), n(ve(p, l));
685
685
  };
686
- document.addEventListener("mousemove", h), document.addEventListener("mouseup", g);
686
+ document.addEventListener("mousemove", m), document.addEventListener("mouseup", g);
687
687
  },
688
688
  [n]
689
689
  );
690
- return /* @__PURE__ */ c.jsxs("div", { className: w(a.b(), a.bs("vars")), children: [
691
- /* @__PURE__ */ c.jsx(
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__ */ c.jsx(ht, {}) : e >= 1 ? /* @__PURE__ */ c.jsx(yt, {}) : /* @__PURE__ */ c.jsx(vt, {})
698
+ children: t || !e ? /* @__PURE__ */ d.jsx(ht, {}) : e >= 1 ? /* @__PURE__ */ d.jsx(yt, {}) : /* @__PURE__ */ d.jsx(vt, {})
699
699
  }
700
700
  ),
701
- /* @__PURE__ */ c.jsx(
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: f,
708
- onMouseDown: d,
709
- children: /* @__PURE__ */ c.jsx("div", { className: a.be("bar"), children: /* @__PURE__ */ c.jsx(
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 = (f) => f < 10 ? `0${f}` : `${f}`, r = Math.trunc(e / 60), n = Math.trunc(e - r * 60), a = Math.trunc(r / 60), u = Math.trunc(
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: f,
739
+ onToggleMenu: l,
740
740
  onToggleMuted: b,
741
741
  order: s,
742
- onOrderChange: d,
743
- loop: m,
744
- onLoopChange: h,
742
+ onOrderChange: y,
743
+ loop: c,
744
+ onLoopChange: m,
745
745
  onSeek: g,
746
746
  isPlaying: p,
747
- onTogglePlay: y,
747
+ onTogglePlay: h,
748
748
  onSkipForward: i,
749
- onSkipBack: l,
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
- d(A);
759
- }, [s, d]), k = 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
- }[m];
765
- h(A);
766
- }, [m, h]);
767
- return /* @__PURE__ */ c.jsxs(
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__ */ c.jsx(
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__ */ c.jsxs("div", { className: E.be("time"), children: [
783
- /* @__PURE__ */ c.jsxs("span", { className: E.be("time-inner"), "aria-live": "polite", children: [
784
- /* @__PURE__ */ c.jsx("span", { className: E.be("ptime"), children: _e(n) }),
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__ */ c.jsx("span", { className: E.be("dtime"), children: _e(a) })
786
+ /* @__PURE__ */ d.jsx("span", { className: E.be("dtime"), children: _e(a) })
787
787
  ] }),
788
- /* @__PURE__ */ c.jsx(
788
+ /* @__PURE__ */ d.jsx(
789
789
  "button",
790
790
  {
791
791
  className: w(j.b(), j.bs("back")),
792
- onClick: l,
792
+ onClick: f,
793
793
  type: "button",
794
794
  "aria-label": "Previous track",
795
- children: /* @__PURE__ */ c.jsx(et, {})
795
+ children: /* @__PURE__ */ d.jsx(et, {})
796
796
  }
797
797
  ),
798
- /* @__PURE__ */ c.jsx(
798
+ /* @__PURE__ */ d.jsx(
799
799
  "button",
800
800
  {
801
801
  className: w(j.b(), j.bs("play")),
802
- onClick: y,
802
+ onClick: h,
803
803
  type: "button",
804
804
  "aria-label": p ? "Pause audio" : "Play audio",
805
- children: p ? /* @__PURE__ */ c.jsx(lt, {}) : /* @__PURE__ */ c.jsx(dt, {})
805
+ children: p ? /* @__PURE__ */ d.jsx(lt, {}) : /* @__PURE__ */ d.jsx(dt, {})
806
806
  }
807
807
  ),
808
- /* @__PURE__ */ c.jsx(
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__ */ c.jsx(tt, {})
815
+ children: /* @__PURE__ */ d.jsx(tt, {})
816
816
  }
817
817
  ),
818
- /* @__PURE__ */ c.jsx(
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__ */ c.jsx(
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__ */ c.jsx(st, {}), random: /* @__PURE__ */ c.jsx(ut, {}) }[s]
834
+ children: { list: /* @__PURE__ */ d.jsx(st, {}), random: /* @__PURE__ */ d.jsx(ut, {}) }[s]
835
835
  }
836
836
  ),
837
- /* @__PURE__ */ c.jsx(
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: ${m}`,
843
+ "aria-label": `Loop mode: ${c}`,
844
844
  children: {
845
- all: /* @__PURE__ */ c.jsx(mt, {}),
846
- one: /* @__PURE__ */ c.jsx(ft, {}),
847
- none: /* @__PURE__ */ c.jsx(it, {})
848
- }[m]
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__ */ c.jsx(
851
+ /* @__PURE__ */ d.jsx(
852
852
  "button",
853
853
  {
854
854
  type: "button",
855
855
  className: w(j.b(), j.bs("menu")),
856
- onClick: () => f == null ? void 0 : f(),
856
+ onClick: () => l == null ? void 0 : l(),
857
857
  "aria-label": "Toggle playlist menu",
858
- children: /* @__PURE__ */ c.jsx(ot, {})
858
+ children: /* @__PURE__ */ d.jsx(ot, {})
859
859
  }
860
860
  ),
861
- /* @__PURE__ */ c.jsx(
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__ */ c.jsx(ct, {})
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 u = z("aplayer-list"), f = a ? { maxHeight: a } : void 0, b = S((d) => d ? typeof d == "string" ? d : d.name ?? "Audio artist" : "Audio artist", []), s = M(null);
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 (s.current) {
889
- const d = s.current;
890
- return d.style.maxHeight = `${Math.min(
891
- d.scrollHeight,
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
- d.removeAttribute("style");
895
+ c.removeAttribute("style");
895
896
  };
896
897
  }
897
- }, [a]), /* @__PURE__ */ c.jsx(
898
+ }, [a, u]), /* @__PURE__ */ d.jsx(
898
899
  "div",
899
900
  {
900
- ref: s,
901
- className: w(u.b(), {
902
- [u.bm("hide")]: !e,
903
- [u.bs("vars")]: !0
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__ */ c.jsx("ol", { style: f, children: t.map((d, m) => /* @__PURE__ */ c.jsxs(
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
- [u.bm("active")]: d.url === r
912
+ [l.bm("active")]: c.url === r
912
913
  }),
913
914
  onClick: () => {
914
- d.url !== r && (n == null || n(d));
915
+ c.url !== r && (n == null || n(c));
915
916
  },
916
917
  role: "button",
917
- "aria-label": `${d.name ?? "Audio name"} by ${b(d.artist)}}`,
918
+ "aria-label": `${c.name ?? "Audio name"} by ${s(c.artist)}}`,
918
919
  children: [
919
- /* @__PURE__ */ c.jsx("span", { className: u.be("cur") }),
920
- /* @__PURE__ */ c.jsx("span", { className: u.be("index"), children: m + 1 }),
921
- /* @__PURE__ */ c.jsx("span", { className: u.be("title"), children: d.name ?? "Audio name" }),
922
- /* @__PURE__ */ c.jsx("span", { className: u.be("author"), children: b(d.artist) })
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
- d.name || m
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], d = a[b + 1];
934
- if (r >= s[0] && (!d || r < d[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]), f = B(() => ({
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__ */ c.jsx(
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__ */ c.jsx("div", { className: n.be("contents"), style: f, children: a.map(([, b], s) => /* @__PURE__ */ c.jsx(
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), f = 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
+ 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 d = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/.exec(u[s]), m = d[1] * 60, h = Number.parseInt(d[2]), g = d[4] ? Number.parseInt(d[4]) / (`${d[4]}`.length === 2 ? 100 : 1e3) : 0, p = m + h + g;
973
- r.push([p, f]);
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(h, g) {
997
- return h === g && (h !== 0 || 1 / h === 1 / g) || h !== h && g !== g;
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, f = e.useDebugValue;
1000
- function b(h, g) {
1001
- var p = g(), y = n({ inst: { value: p, getSnapshot: g } }), i = y[0].inst, l = y[1];
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) && l({ inst: i });
1005
+ i.value = p, i.getSnapshot = g, s(i) && f({ inst: i });
1005
1006
  },
1006
- [h, p, g]
1007
+ [m, p, g]
1007
1008
  ), a(
1008
1009
  function() {
1009
- return s(i) && l({ inst: i }), h(function() {
1010
- s(i) && l({ inst: i });
1010
+ return s(i) && f({ inst: i }), m(function() {
1011
+ s(i) && f({ inst: i });
1011
1012
  });
1012
1013
  },
1013
- [h]
1014
- ), f(p), p;
1014
+ [m]
1015
+ ), l(p), p;
1015
1016
  }
1016
- function s(h) {
1017
- var g = h.getSnapshot;
1018
- h = h.value;
1017
+ function s(m) {
1018
+ var g = m.getSnapshot;
1019
+ m = m.value;
1019
1020
  try {
1020
1021
  var p = g();
1021
- return !r(h, p);
1022
+ return !r(m, p);
1022
1023
  } catch {
1023
1024
  return !0;
1024
1025
  }
1025
1026
  }
1026
- function d(h, g) {
1027
+ function y(m, g) {
1027
1028
  return g();
1028
1029
  }
1029
- var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : b;
1030
- return he.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : m, he;
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, y) {
1046
- return p === y && (p !== 0 || 1 / p === 1 / y) || p !== p && y !== y;
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, y) {
1049
- m || a.startTransition === void 0 || (m = !0, console.error(
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 = y();
1053
- if (!h) {
1054
- var l = y();
1055
- u(i, l) || (console.error(
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
- ), h = !0);
1058
+ ), m = !0);
1058
1059
  }
1059
- l = f({
1060
- inst: { value: i, getSnapshot: y }
1060
+ f = l({
1061
+ inst: { value: i, getSnapshot: h }
1061
1062
  });
1062
- var v = l[0].inst, _ = l[1];
1063
+ var v = f[0].inst, _ = f[1];
1063
1064
  return s(
1064
1065
  function() {
1065
- v.value = i, v.getSnapshot = y, r(v) && _({ inst: v });
1066
+ v.value = i, v.getSnapshot = h, r(v) && _({ inst: v });
1066
1067
  },
1067
- [p, i, y]
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
- ), d(i), i;
1076
+ ), y(i), i;
1076
1077
  }
1077
1078
  function r(p) {
1078
- var y = p.getSnapshot;
1079
+ var h = p.getSnapshot;
1079
1080
  p = p.value;
1080
1081
  try {
1081
- var i = y();
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, y) {
1088
- return y();
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, f = a.useState, b = a.useEffect, s = a.useLayoutEffect, d = a.useDebugValue, m = !1, h = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : t;
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 l = 0; l < U.length; l++) {
1135
- const v = U[l];
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 l = t.current;
1142
- if (l) {
1143
- e.mutex && r(l), l.src !== i && (l.pause(), l.currentTime = 0, l.src = i);
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 l = t.current;
1154
- l && (l.paused ? n(i) : l.pause());
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
- ), f = S(() => {
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 l;
1173
- return (l = t.current) == null || l.addEventListener(
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
- ), d = H.useSyncExternalStore(
1193
+ ), y = H.useSyncExternalStore(
1193
1194
  S(
1194
1195
  (i) => {
1195
- var l;
1196
- return (l = t.current) == null || l.addEventListener(
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
- ), m = H.useSyncExternalStore(
1216
+ ), c = H.useSyncExternalStore(
1216
1217
  S(
1217
1218
  (i) => {
1218
- var l;
1219
- return (l = t.current) == null || l.addEventListener("timeupdate", i), () => {
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
- ), h = H.useSyncExternalStore(
1236
+ ), m = H.useSyncExternalStore(
1236
1237
  S(
1237
1238
  (i) => {
1238
- var l;
1239
- return (l = t.current) == null || l.addEventListener(
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 l;
1262
- return (l = t.current) == null || l.addEventListener("progress", i), () => {
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 l, v;
1282
- return (l = t.current) == null || l.addEventListener("play", i), (v = t.current) == null || v.addEventListener("pause", i), () => {
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
- ), y = H.useSyncExternalStore(
1296
+ ), h = H.useSyncExternalStore(
1296
1297
  S(
1297
1298
  (i) => {
1298
- var l, v;
1299
- return (l = t.current) == null || l.addEventListener("playing", i), (v = t.current) == null || v.addEventListener("waiting", i), () => {
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: f,
1325
+ toggleMuted: l,
1325
1326
  setVolume: b,
1326
1327
  volume: s,
1327
- muted: d,
1328
- currentTime: m,
1329
- duration: h,
1328
+ muted: y,
1329
+ currentTime: c,
1330
+ duration: m,
1330
1331
  bufferedSeconds: g,
1331
1332
  isPlaying: p,
1332
- isLoading: y
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, f = 2e3) => {
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
- }, f);
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: f,
1393
+ volume: l,
1438
1394
  autoPlay: b,
1439
1395
  listMaxHeight: s,
1440
- listFolded: d,
1441
- mutex: m,
1442
- theme: h,
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
- ), y = $t(p, {
1403
+ ), h = Mt(p, {
1448
1404
  initialLoop: a,
1449
1405
  initialOrder: u
1450
- }), [i, l] = At(), { mini: v, setMini: _ } = Rt(t.mini), E = qe(), j = M(null), C = S(() => {
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: y.currentSong.url,
1454
- initialVolume: f,
1409
+ src: h.currentSong.url,
1410
+ initialVolume: l,
1455
1411
  autoPlay: b,
1456
- mutex: m,
1412
+ mutex: c,
1457
1413
  onError(P) {
1458
1414
  const { error: o } = P.target;
1459
- o && l(
1415
+ o && f(
1460
1416
  "An audio error has occurred, player will skip forward in 2 seconds."
1461
- ), y.hasNextSong && (j.current = E(() => {
1462
- y.next();
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 } = y, { audio: $ } = A;
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
- y.next();
1431
+ h.next();
1476
1432
  }
1477
- }), D = y.length > 1, O = S(() => {
1478
- C(), A.togglePlay(y.currentSong.url);
1479
- }, [A, C, y.currentSong.url]), { prioritize: re } = y, G = S(
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 && !d), [J, ae] = V(!0), Y = M(null);
1440
+ ), [ne, ce] = V(() => D && !y), [J, ae] = V(!0), Y = M(null);
1485
1441
  q(() => {
1486
- b && A.playAudio(y.currentSong.url);
1442
+ b && A.playAudio(h.currentSong.url);
1487
1443
  }, []);
1488
- const K = M(!0), X = M(y.currentSong);
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
- y.currentSong && (y.loop === "one" || y.currentSong !== X.current) && (X.current = y.currentSong, A.playAudio(y.currentSong.url));
1499
- }, [y.currentSong]), q(() => {
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 = `${P.offsetWidth - 18}px`, () => {
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: f,
1465
+ volume: l,
1510
1466
  listMaxHeight: s,
1511
- theme: h,
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: y,
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: f,
1536
+ theme: l,
1536
1537
  border: b,
1537
1538
  notice: s,
1538
- audio: d,
1539
- audioControl: m,
1540
- handlePlayButtonClick: h,
1539
+ audio: y,
1540
+ audioControl: c,
1541
+ handlePlayButtonClick: m,
1541
1542
  handlePlayAudioFromList: g,
1542
1543
  isPlaylistOpen: p,
1543
- setPlaylistOpen: y,
1544
+ setPlaylistOpen: h,
1544
1545
  mini: i,
1545
- displayLyrics: l,
1546
+ displayLyrics: f,
1546
1547
  setDisplayLyrics: v,
1547
1548
  setMini: _,
1548
1549
  playlist: E,
1549
1550
  hasPlaylist: j
1550
- } = Mt(e), C = S((O) => O ? typeof O == "string" ? O : O.url ? /* @__PURE__ */ c.jsx("a", { href: O.url, target: "_blank", rel: "noreferrer", children: O.name ?? "Audio artist" }) : O.name ?? "Audio artist" : "Audio artist", []);
1551
- return /* @__PURE__ */ c.jsxs(
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(f)]: !0,
1556
+ [t.bs(l)]: !0,
1556
1557
  [t.bs("vars")]: !0,
1557
1558
  [t.bm(n)]: !0,
1558
- [t.bm("loading")]: m.isLoading,
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__ */ c.jsxs(
1569
+ /* @__PURE__ */ d.jsxs(
1569
1570
  "div",
1570
1571
  {
1571
1572
  ref: r,
1572
1573
  className: t.be("body"),
1573
1574
  children: [
1574
- /* @__PURE__ */ c.jsx(
1575
+ /* @__PURE__ */ d.jsx(
1575
1576
  "div",
1576
1577
  {
1577
1578
  className: t.be("pic"),
1578
- onClick: h,
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": m.isPlaying ? "Pause audio" : "Play audio",
1584
- children: /* @__PURE__ */ c.jsx(
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
- m.isPlaying ? t.bm("pause") : t.bm("play")
1590
+ c.isPlaying ? t.bm("pause") : t.bm("play")
1590
1591
  ),
1591
1592
  role: "presentation",
1592
- children: m.isPlaying ? /* @__PURE__ */ c.jsx(at, {}) : /* @__PURE__ */ c.jsx(bt, {})
1593
+ children: c.isPlaying ? /* @__PURE__ */ d.jsx(at, {}) : /* @__PURE__ */ d.jsx(bt, {})
1593
1594
  }
1594
1595
  )
1595
1596
  }
1596
1597
  ),
1597
- /* @__PURE__ */ c.jsxs("div", { className: w(t.be("info")), children: [
1598
- /* @__PURE__ */ c.jsxs("div", { className: w(t.be("music")), children: [
1599
- /* @__PURE__ */ c.jsx("span", { className: w(t.be("title")), children: ((A = E.currentSong) == null ? void 0 : A.name) ?? "Audio name" }),
1600
- /* @__PURE__ */ c.jsxs("span", { className: w(t.be("author")), children: [
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__ */ c.jsx(
1608
+ n === "fixed" ? null : /* @__PURE__ */ d.jsx(
1608
1609
  Oe,
1609
1610
  {
1610
- show: l,
1611
+ show: f,
1611
1612
  lrcText: E.currentSong.lrc,
1612
- currentTime: m.currentTime ?? 0
1613
+ currentTime: c.currentTime ?? 0
1613
1614
  }
1614
1615
  ),
1615
- /* @__PURE__ */ c.jsx(
1616
+ /* @__PURE__ */ d.jsx(
1616
1617
  xt,
1617
1618
  {
1618
- volume: m.volume ?? a,
1619
- onChangeVolume: m.setVolume,
1620
- muted: m.muted ?? !1,
1621
- onToggleMuted: () => m.toggleMuted(),
1622
- currentTime: m.currentTime,
1623
- audioDurationSeconds: m.duration,
1624
- bufferedSeconds: m.bufferedSeconds,
1625
- onSeek: (O) => m.seek(O),
1626
- onToggleMenu: () => y((O) => !O),
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: m.isPlaying ?? !1,
1632
- onTogglePlay: h,
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: l,
1640
+ showLyrics: f,
1640
1641
  onToggleLyrics: () => {
1641
1642
  v((O) => !O);
1642
1643
  }
1643
1644
  }
1644
1645
  )
1645
1646
  ] }),
1646
- /* @__PURE__ */ c.jsx("div", { className: t.be("notice"), style: s.style, children: s.text }),
1647
- /* @__PURE__ */ c.jsx(
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__ */ c.jsx("button", { className: w(t.bs("icon"), t.bs("icon-right")), type: "button", children: /* @__PURE__ */ c.jsx(nt, {}) })
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__ */ c.jsx(
1659
+ j ? /* @__PURE__ */ d.jsx(
1659
1660
  Et,
1660
1661
  {
1661
1662
  open: p,
1662
- audio: d,
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__ */ c.jsx(
1670
+ n === "fixed" && /* @__PURE__ */ d.jsx(
1669
1671
  Oe,
1670
1672
  {
1671
- show: l,
1673
+ show: f,
1672
1674
  lrcText: E.currentSong.lrc,
1673
- currentTime: m.currentTime ?? 0
1675
+ currentTime: c.currentTime ?? 0
1674
1676
  }
1675
1677
  )
1676
1678
  ]