react-modern-audio-player 2.0.0-beta.1 → 2.1.0

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.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import './index.css';
3
- import { jsx as i, Fragment as R, jsxs as S } from "react/jsx-runtime";
4
- import te, { createContext as $, useReducer as nt, useMemo as D, useContext as st, forwardRef as ve, useCallback as T, useRef as E, useEffect as A, memo as z, useState as k, useId as ke, useLayoutEffect as it, cloneElement as lt } from "react";
5
- import ct, { flushSync as ut } from "react-dom";
3
+ import { jsx as i, Fragment as z, jsxs as w } from "react/jsx-runtime";
4
+ import te, { createContext as H, useReducer as it, useMemo as D, useContext as lt, forwardRef as ve, useCallback as f, useRef as A, useEffect as E, memo as W, useState as C, useId as Ne, useLayoutEffect as ct, cloneElement as ut } from "react";
5
+ import dt, { flushSync as be } from "react-dom";
6
6
  const F = {
7
7
  isPlaying: !1,
8
8
  volume: 1,
@@ -10,7 +10,7 @@ const F = {
10
10
  repeatType: "ALL",
11
11
  currentTime: 0,
12
12
  duration: 0
13
- }, mr = 10, L = {
13
+ }, pr = 10, N = {
14
14
  templateArea: {
15
15
  artwork: "row1-1",
16
16
  trackInfo: "row1-2",
@@ -22,17 +22,18 @@ const F = {
22
22
  playButton: "row1-8",
23
23
  playList: "row1-9"
24
24
  }
25
- }, w = $(null);
26
- w.displayName = "AudioPlayerDispatchContext";
27
- const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) => Math.round(Math.random() * (t - e) + e), dt = 1, Le = (e, t, o) => {
25
+ }, P = H(null);
26
+ P.displayName = "AudioPlayerDispatchContext";
27
+ const Ce = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Le = (e, t) => Math.round(Math.random() * (t - e) + e), mt = 1, ke = (e, t, o) => {
28
28
  if (o - t < 1) return e;
29
- let r = Ne(t, o);
29
+ let r = Le(t, o);
30
30
  for (; r === e; )
31
- r = Ne(t, o);
31
+ r = Le(t, o);
32
32
  return r;
33
- }, mt = (e, t) => {
33
+ }, pt = (e, t) => {
34
34
  switch (t.type) {
35
35
  case "NEXT_AUDIO": {
36
+ if (e.playList.length === 0) return e;
36
37
  if (e.curAudioState.repeatType === "NONE" && e.curIdx + 1 === e.playList.length)
37
38
  return {
38
39
  ...e,
@@ -50,7 +51,7 @@ const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) =>
50
51
  audioResetKey: e.audioResetKey + 1,
51
52
  curAudioState: { ...e.curAudioState, currentTime: 0 }
52
53
  };
53
- const r = Le(
54
+ const r = ke(
54
55
  e.curIdx,
55
56
  0,
56
57
  e.playList.length - 1
@@ -77,7 +78,7 @@ const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) =>
77
78
  };
78
79
  }
79
80
  case "PREV_AUDIO": {
80
- const o = e.playList.length <= 1, r = t.currentTime > dt, a = e.curAudioState.repeatType === "NONE" && e.curIdx === 0;
81
+ const o = e.playList.length <= 1, r = t.currentTime > mt, a = e.curAudioState.repeatType === "NONE" && e.curIdx === 0;
81
82
  if (o || r || a)
82
83
  return {
83
84
  ...e,
@@ -85,7 +86,7 @@ const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) =>
85
86
  curAudioState: { ...e.curAudioState, currentTime: 0 }
86
87
  };
87
88
  if (e.curAudioState.repeatType === "SHUFFLE") {
88
- const n = Le(
89
+ const n = ke(
89
90
  e.curIdx,
90
91
  0,
91
92
  e.playList.length - 1
@@ -110,12 +111,35 @@ const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) =>
110
111
  };
111
112
  }
112
113
  case "UPDATE_PLAY_LIST": {
114
+ if (t.playList.length === 0)
115
+ return {
116
+ ...e,
117
+ playList: t.playList,
118
+ curPlayId: 0,
119
+ curIdx: -1,
120
+ curAudioState: {
121
+ ...e.curAudioState,
122
+ isPlaying: !1,
123
+ currentTime: 0,
124
+ duration: 0,
125
+ isLoadedMetaData: !1
126
+ }
127
+ };
113
128
  if (!t.playList.find(
114
129
  (a) => a.id === e.curPlayId
115
130
  ))
116
- return console.error(
117
- "UPDATE_PLAY_LIST ERROR - curPlayId is not found on playList"
118
- ), e;
131
+ return {
132
+ ...e,
133
+ playList: t.playList,
134
+ curPlayId: t.playList[0].id,
135
+ curIdx: 0,
136
+ audioResetKey: e.audioResetKey + 1,
137
+ curAudioState: {
138
+ ...e.curAudioState,
139
+ currentTime: 0,
140
+ isLoadedMetaData: !1
141
+ }
142
+ };
119
143
  const r = t.playList.findIndex(
120
144
  (a) => a.id === e.curPlayId
121
145
  );
@@ -130,7 +154,7 @@ const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) =>
130
154
  ...e,
131
155
  curAudioState: {
132
156
  ...e.curAudioState,
133
- volume: be(t.volume)
157
+ volume: Ce(t.volume)
134
158
  }
135
159
  };
136
160
  case "SET_AUDIO_STATE":
@@ -223,19 +247,19 @@ const be = (e) => isFinite(e) ? Math.min(Math.max(e, 0), 1) : 1, Ne = (e, t) =>
223
247
  default:
224
248
  throw new Error("Unhandled action");
225
249
  }
226
- }, he = $(null);
227
- he.displayName = "PlaybackContext";
228
- const Te = $(null);
229
- Te.displayName = "AudioAttrsContext";
230
- const ge = $(null);
231
- ge.displayName = "TrackContext";
232
- const fe = $(null);
233
- fe.displayName = "UIContext";
234
- const Ee = $(null);
235
- Ee.displayName = "ResourceContext";
236
- const Ae = $(null);
237
- Ae.displayName = "TimeContext";
238
- function pt(e) {
250
+ }, Te = H(null);
251
+ Te.displayName = "PlaybackContext";
252
+ const he = H(null);
253
+ he.displayName = "AudioAttrsContext";
254
+ const fe = H(null);
255
+ fe.displayName = "TrackContext";
256
+ const ge = H(null);
257
+ ge.displayName = "UIContext";
258
+ const Ae = H(null);
259
+ Ae.displayName = "ResourceContext";
260
+ const Ee = H(null);
261
+ Ee.displayName = "TimeContext";
262
+ function yt(e) {
239
263
  const {
240
264
  playList: t,
241
265
  audioInitialState: o,
@@ -246,43 +270,41 @@ function pt(e) {
246
270
  } = e, c = {
247
271
  isPlaying: (o == null ? void 0 : o.isPlaying) ?? F.isPlaying,
248
272
  repeatType: (o == null ? void 0 : o.repeatType) ?? F.repeatType,
249
- volume: typeof (o == null ? void 0 : o.volume) == "number" ? be(o.volume) : F.volume,
273
+ volume: typeof (o == null ? void 0 : o.volume) == "number" ? Ce(o.volume) : F.volume,
250
274
  muted: (o == null ? void 0 : o.muted) ?? F.muted
251
- }, l = r || { playButton: !0 }, u = {
275
+ }, d = r || { playButton: !0 }, m = {
252
276
  playerPlacement: a == null ? void 0 : a.player,
253
277
  playListPlacement: (a == null ? void 0 : a.playList) || "bottom",
254
278
  interfacePlacement: (a == null ? void 0 : a.interface) || {
255
279
  templateArea: {
256
- playButton: L.templateArea.playButton
280
+ playButton: N.templateArea.playButton
257
281
  }
258
282
  },
259
283
  volumeSliderPlacement: a == null ? void 0 : a.volumeSlider
260
- };
284
+ }, l = t.length === 0, y = o == null ? void 0 : o.curPlayId, u = y == null ? -1 : t.findIndex((p) => p.id === y);
261
285
  return {
262
286
  playList: t,
263
- curPlayId: (o == null ? void 0 : o.curPlayId) || 1,
264
- curIdx: o != null && o.curPlayId ? t.findIndex(
265
- (p) => p.id === (o == null ? void 0 : o.curPlayId)
266
- ) : 0,
287
+ curPlayId: l ? 0 : u >= 0 ? y : t[0].id,
288
+ curIdx: l ? -1 : u >= 0 ? u : 0,
267
289
  curAudioState: c,
268
- activeUI: l,
290
+ activeUI: d,
269
291
  audioResetKey: 0,
270
292
  seekRequestKey: 0,
271
- ...u,
293
+ ...m,
272
294
  customIcons: s,
273
295
  coverImgsCss: n
274
296
  };
275
297
  }
276
- const yt = ({
298
+ const vt = ({
277
299
  children: e,
278
300
  colorScheme: t,
279
301
  ...o
280
302
  }) => {
281
- var d, y;
282
- const [r, a] = nt(
283
- mt,
303
+ var u, p;
304
+ const [r, a] = it(
305
+ pt,
284
306
  o,
285
- pt
307
+ yt
286
308
  ), s = D(
287
309
  () => ({
288
310
  currentTime: r.curAudioState.currentTime ?? F.currentTime,
@@ -318,7 +340,7 @@ const yt = ({
318
340
  curIdx: r.curIdx
319
341
  }),
320
342
  [r.playList, r.curPlayId, r.curIdx]
321
- ), l = D(
343
+ ), d = D(
322
344
  () => ({
323
345
  activeUI: r.activeUI,
324
346
  playListPlacement: r.playListPlacement,
@@ -335,56 +357,56 @@ const yt = ({
335
357
  r.volumeSliderPlacement,
336
358
  t
337
359
  ]
338
- ), { audioInitialState: u } = o, p = D(() => {
339
- if (!u) return {};
360
+ ), { audioInitialState: m } = o, l = D(() => {
361
+ if (!m) return {};
340
362
  const {
341
- isPlaying: v,
342
- repeatType: h,
343
- isLoadedMetaData: g,
344
- currentTime: C,
345
- duration: N,
346
- volume: W,
347
- muted: H,
363
+ isPlaying: T,
364
+ repeatType: v,
365
+ isLoadedMetaData: h,
366
+ currentTime: S,
367
+ duration: k,
368
+ volume: B,
369
+ muted: R,
348
370
  curPlayId: G,
349
371
  ...ae
350
- } = u;
372
+ } = m;
351
373
  return ae;
352
- }, [u]), m = D(
374
+ }, [m]), y = D(
353
375
  () => ({
354
376
  elementRefs: r.elementRefs,
355
377
  customIcons: r.customIcons,
356
378
  coverImgsCss: r.coverImgsCss
357
379
  }),
358
380
  [
359
- (d = r.elementRefs) == null ? void 0 : d.audioEl,
360
- (y = r.elementRefs) == null ? void 0 : y.waveformInst,
381
+ (u = r.elementRefs) == null ? void 0 : u.audioEl,
382
+ (p = r.elementRefs) == null ? void 0 : p.waveformInst,
361
383
  r.customIcons,
362
384
  r.coverImgsCss
363
385
  ]
364
386
  );
365
- return /* @__PURE__ */ i(Ae.Provider, { value: s, children: /* @__PURE__ */ i(he.Provider, { value: n, children: /* @__PURE__ */ i(ge.Provider, { value: c, children: /* @__PURE__ */ i(fe.Provider, { value: l, children: /* @__PURE__ */ i(Ee.Provider, { value: m, children: /* @__PURE__ */ i(Te.Provider, { value: p, children: /* @__PURE__ */ i(w.Provider, { value: a, children: e }) }) }) }) }) }) });
366
- }, f = (e) => {
367
- const t = st(e);
387
+ return /* @__PURE__ */ i(Ee.Provider, { value: s, children: /* @__PURE__ */ i(Te.Provider, { value: n, children: /* @__PURE__ */ i(fe.Provider, { value: c, children: /* @__PURE__ */ i(ge.Provider, { value: d, children: /* @__PURE__ */ i(Ae.Provider, { value: y, children: /* @__PURE__ */ i(he.Provider, { value: l, children: /* @__PURE__ */ i(P.Provider, { value: a, children: e }) }) }) }) }) }) });
388
+ }, g = (e) => {
389
+ const t = lt(e);
368
390
  if (!t) {
369
391
  const o = e.displayName || "Context";
370
392
  throw new Error(`${o} is not provided`);
371
393
  }
372
394
  return t;
373
- }, O = () => f(fe), J = {
395
+ }, O = () => g(ge), J = {
374
396
  top: "auto",
375
397
  right: "auto",
376
398
  bottom: "auto",
377
399
  left: "auto"
378
- }, vt = {
400
+ }, Tt = {
379
401
  bottom: { ...J, bottom: 0 },
380
402
  top: { ...J, top: 0 },
381
403
  "bottom-left": { ...J, bottom: 0, left: 0 },
382
404
  "bottom-right": { ...J, bottom: 0, right: 0 },
383
405
  "top-left": { ...J, top: 0, left: 0 },
384
406
  "top-right": { ...J, top: 0, right: 0 }
385
- }, Ce = te.memo(({ children: e, rootContainerProps: t }) => {
407
+ }, Me = te.memo(({ children: e, rootContainerProps: t }) => {
386
408
  const { playerPlacement: o, colorScheme: r } = O(), a = D(
387
- () => o ? vt[o] : void 0,
409
+ () => o ? Tt[o] : void 0,
388
410
  [o]
389
411
  ), n = {
390
412
  width: "100%",
@@ -403,7 +425,7 @@ const yt = ({
403
425
  }
404
426
  );
405
427
  });
406
- Ce.displayName = "AudioPlayerContainer";
428
+ Me.displayName = "AudioPlayerContainer";
407
429
  const ht = ({
408
430
  areas: e,
409
431
  columns: t,
@@ -415,14 +437,14 @@ const ht = ({
415
437
  }) => {
416
438
  const c = {
417
439
  display: "grid",
418
- gridTemplateAreas: e == null ? void 0 : e.map((l) => `"${l}"`).join(" "),
440
+ gridTemplateAreas: e == null ? void 0 : e.map((d) => `"${d}"`).join(" "),
419
441
  gridTemplateColumns: t == null ? void 0 : t.join(" "),
420
442
  alignItems: o,
421
443
  justifyContent: r,
422
444
  minHeight: a
423
445
  };
424
446
  return /* @__PURE__ */ i("div", { className: s, style: c, children: n });
425
- }, Tt = ht, Me = ve(
447
+ }, ft = ht, xe = ve(
426
448
  ({
427
449
  children: e,
428
450
  visible: t = !0,
@@ -432,29 +454,29 @@ const ht = ({
432
454
  padding: s,
433
455
  UNSAFE_className: n,
434
456
  style: c,
435
- ...l
436
- }, u) => {
457
+ ...d
458
+ }, m) => {
437
459
  if (!t) return null;
438
- const p = {
460
+ const l = {
439
461
  gridArea: o,
440
462
  width: r,
441
463
  justifySelf: a,
442
464
  padding: s ?? "0 5px",
443
465
  ...c
444
466
  };
445
- return /* @__PURE__ */ i("div", { ref: u, className: n, style: p, ...l, children: e });
467
+ return /* @__PURE__ */ i("div", { ref: m, className: n, style: l, ...d, children: e });
446
468
  }
447
469
  );
448
- Me.displayName = "GridItem";
449
- const M = Tt;
450
- M.Item = Me;
451
- const b = () => f(he), re = () => f(Ae), V = () => f(ge), P = () => f(Ee), xe = ({
470
+ xe.displayName = "GridItem";
471
+ const M = ft;
472
+ M.Item = xe;
473
+ const b = () => g(Te), re = () => g(Ee), V = () => g(fe), L = () => g(Ae), _e = ({
452
474
  children: e,
453
475
  id: t,
454
476
  ...o
455
477
  }) => {
456
- var p, m;
457
- const r = b(), a = re(), s = V(), n = O(), c = P(), l = {
478
+ var l, y;
479
+ const r = b(), a = re(), s = V(), n = O(), c = L(), d = {
458
480
  curAudioState: {
459
481
  isPlaying: r.isPlaying,
460
482
  volume: r.volume,
@@ -469,96 +491,96 @@ const b = () => f(he), re = () => f(Ae), V = () => f(ge), P = () => f(Ee), xe =
469
491
  ...s,
470
492
  ...n,
471
493
  ...c
472
- }, u = (m = (p = n.interfacePlacement) == null ? void 0 : p.customComponentsArea) == null ? void 0 : m[t];
494
+ }, m = (y = (l = n.interfacePlacement) == null ? void 0 : l.customComponentsArea) == null ? void 0 : y[t];
473
495
  return /* @__PURE__ */ i(
474
496
  M.Item,
475
497
  {
476
498
  UNSAFE_className: "rmap-custom-component",
477
- gridArea: u,
499
+ gridArea: m,
478
500
  ...o,
479
- children: te.cloneElement(e, { audioPlayerState: l })
501
+ children: te.cloneElement(e, { audioPlayerState: d })
480
502
  }
481
503
  );
482
- }, gt = () => f(Te), ft = () => {
504
+ }, gt = () => g(he), At = () => {
483
505
  const {
484
506
  isPlaying: e,
485
507
  volume: t,
486
508
  repeatType: o,
487
509
  audioResetKey: r
488
- } = b(), { currentTime: a, seekRequestKey: s } = re(), { elementRefs: n } = P(), c = f(w), l = T(
489
- (y) => {
490
- if (y.currentTarget.readyState === 0) return;
491
- const v = y.currentTarget.currentTime;
510
+ } = b(), { currentTime: a, seekRequestKey: s } = re(), { elementRefs: n } = L(), c = g(P), d = f(
511
+ (p) => {
512
+ if (p.currentTarget.readyState === 0) return;
513
+ const T = p.currentTarget.currentTime;
492
514
  c({
493
515
  type: "SET_AUDIO_STATE",
494
- audioState: { currentTime: v }
516
+ audioState: { currentTime: T }
495
517
  });
496
518
  },
497
519
  [c]
498
- ), u = T(() => {
520
+ ), m = f(() => {
499
521
  if (n != null && n.audioEl) {
500
522
  if (o === "ONE") {
501
- ut(() => {
523
+ be(() => {
502
524
  c({ type: "SEEK", time: 0 });
503
525
  }), n.audioEl.play();
504
526
  return;
505
527
  }
506
528
  c({ type: "NEXT_AUDIO" });
507
529
  }
508
- }, [c, o, n == null ? void 0 : n.audioEl]), p = T(
509
- (y) => {
510
- const { duration: v } = y.currentTarget;
511
- t != null && (y.currentTarget.volume = t), c({
530
+ }, [c, o, n == null ? void 0 : n.audioEl]), l = f(
531
+ (p) => {
532
+ const { duration: T } = p.currentTarget;
533
+ t != null && (p.currentTarget.volume = t), c({
512
534
  type: "SET_AUDIO_STATE",
513
- audioState: { isLoadedMetaData: !0, duration: v }
535
+ audioState: { isLoadedMetaData: !0, duration: T }
514
536
  });
515
537
  },
516
538
  [c, t]
517
- ), m = E(!1);
518
- A(() => {
539
+ ), y = A(!1);
540
+ E(() => {
519
541
  if (n != null && n.audioEl) {
520
- if (!m.current) {
521
- m.current = !0;
542
+ if (!y.current) {
543
+ y.current = !0;
522
544
  return;
523
545
  }
524
546
  n.audioEl.currentTime = 0;
525
547
  }
526
- }, [r, n == null ? void 0 : n.audioEl]), A(() => {
548
+ }, [r, n == null ? void 0 : n.audioEl]), E(() => {
527
549
  n != null && n.audioEl && (e ? n.audioEl.play().catch(() => {
528
550
  c({
529
551
  type: "SET_AUDIO_STATE",
530
552
  audioState: { isPlaying: !1 }
531
553
  });
532
554
  }) : n.audioEl.pause());
533
- }, [n == null ? void 0 : n.audioEl, e, c]), A(() => {
555
+ }, [n == null ? void 0 : n.audioEl, e, c]), E(() => {
534
556
  !(n != null && n.audioEl) || t == null || (n.audioEl.volume = t);
535
557
  }, [n == null ? void 0 : n.audioEl, t]);
536
- const d = E(0);
537
- return A(() => {
538
- if (s === d.current) return;
539
- d.current = s;
540
- const y = n == null ? void 0 : n.audioEl;
541
- if (!y || a == null) return;
542
- y.currentTime = a;
543
- const v = n == null ? void 0 : n.waveformInst, h = y.duration, g = Number.isFinite(h) && h > 0;
544
- if (!v || !g) return;
545
- const C = a / h, N = Math.min(1, Math.max(0, C));
546
- v.seekTo(N);
558
+ const u = A(0);
559
+ return E(() => {
560
+ if (s === u.current) return;
561
+ u.current = s;
562
+ const p = n == null ? void 0 : n.audioEl;
563
+ if (!p || a == null) return;
564
+ p.currentTime = a;
565
+ const T = n == null ? void 0 : n.waveformInst, v = p.duration, h = Number.isFinite(v) && v > 0;
566
+ if (!T || !h) return;
567
+ const S = a / v, k = Math.min(1, Math.max(0, S));
568
+ T.seekTo(k);
547
569
  }, [
548
570
  s,
549
571
  a,
550
572
  n == null ? void 0 : n.audioEl,
551
573
  n == null ? void 0 : n.waveformInst
552
574
  ]), {
553
- onTimeUpdate: l,
554
- onEnded: u,
555
- onLoadedMetadata: p
575
+ onTimeUpdate: d,
576
+ onEnded: m,
577
+ onLoadedMetadata: l
556
578
  };
557
- }, _e = te.memo(({ audioRef: e }) => {
558
- const t = E(null), { muted: o } = b(), { curPlayId: r, playList: a } = V(), s = gt(), n = f(w), c = a.find(
559
- (u) => u.id === r
560
- ), l = ft();
561
- return A(() => {
579
+ }, De = te.memo(({ audioRef: e }) => {
580
+ const t = A(null), { muted: o } = b(), { curPlayId: r, playList: a } = V(), s = gt(), n = g(P), c = a.find(
581
+ (m) => m.id === r
582
+ ), d = At();
583
+ return E(() => {
562
584
  t.current && (n({
563
585
  type: "SET_ELEMENT_REFS",
564
586
  elementRefs: { audioEl: t.current }
@@ -571,11 +593,11 @@ const b = () => f(he), re = () => f(Ae), V = () => f(ge), P = () => f(Ee), xe =
571
593
  muted: o,
572
594
  ref: t,
573
595
  src: c == null ? void 0 : c.src,
574
- ...l
596
+ ...d
575
597
  }
576
598
  );
577
599
  });
578
- _e.displayName = "Audio";
600
+ De.displayName = "Audio";
579
601
  const q = ve(({ className: e, type: t = "button", ...o }, r) => /* @__PURE__ */ i(
580
602
  "button",
581
603
  {
@@ -628,7 +650,7 @@ const Ie = (e) => (
628
650
  dangerouslySetInnerHTML: { __html: e }
629
651
  }
630
652
  )
631
- ), De = (e, t = "0 0 16 16") => (
653
+ ), Oe = (e, t = "0 0 16 16") => (
632
654
  // eslint-disable-next-line react/display-name
633
655
  ({ size: o = "1em", color: r, style: a, ...s }) => /* @__PURE__ */ i(
634
656
  "svg",
@@ -648,56 +670,56 @@ const Ie = (e) => (
648
670
  dangerouslySetInnerHTML: { __html: e }
649
671
  }
650
672
  )
651
- ), Oe = Ie(
673
+ ), Ue = Ie(
652
674
  '<path fill="none" d="M0 0h24v24H0z"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/>'
653
675
  );
654
- Oe.displayName = "MdPlayCircleFilled";
655
- const Ue = Ie(
676
+ Ue.displayName = "MdPlayCircleFilled";
677
+ const Ve = Ie(
656
678
  '<path fill="none" d="M0 0h24v24H0z"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/>'
657
679
  );
658
- Ue.displayName = "MdPauseCircleFilled";
659
- const Ve = Ie(
680
+ Ve.displayName = "MdPauseCircleFilled";
681
+ const Be = Ie(
660
682
  '<path fill="none" d="M0 0h24v24H0z"/><path d="M3 10h11v2H3zM3 6h11v2H3zM3 14h7v2H3zM16 13v8l6-4z"/>'
661
683
  );
662
- Ve.displayName = "MdPlaylistPlay";
663
- const Be = Y(
684
+ Be.displayName = "MdPlaylistPlay";
685
+ const Ke = Y(
664
686
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3"/><path d="M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3"/>'
665
687
  );
666
- Be.displayName = "TbRepeat";
667
- const Ke = Y(
688
+ Ke.displayName = "TbRepeat";
689
+ const $e = Y(
668
690
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3"/><path d="M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3"/><path d="M11 11l1 -1v4"/>'
669
691
  );
670
- Ke.displayName = "TbRepeatOnce";
692
+ $e.displayName = "TbRepeatOnce";
671
693
  const Fe = Y(
672
694
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 12v-3c0 -1.336 .873 -2.468 2.08 -2.856m3.92 -.144h10m-3 -3l3 3l-3 3"/><path d="M20 12v3a3 3 0 0 1 -.133 .886m-1.99 1.984a3 3 0 0 1 -.877 .13h-13m3 3l-3 -3l3 -3"/><path d="M3 3l18 18"/>'
673
695
  );
674
696
  Fe.displayName = "TbRepeatOff";
675
- const $e = Y(
697
+ const He = Y(
676
698
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 4l3 3l-3 3"/><path d="M18 20l3 -3l-3 -3"/><path d="M3 7h3a5 5 0 0 1 5 5a5 5 0 0 0 5 5h5"/><path d="M21 7h-5a4.978 4.978 0 0 0 -2.998 .998m-4.002 8.003a4.984 4.984 0 0 1 -3 .999h-3"/>'
677
699
  );
678
- $e.displayName = "TbArrowsShuffle";
679
- const He = Y(
700
+ He.displayName = "TbArrowsShuffle";
701
+ const Re = Y(
680
702
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 8a5 5 0 0 1 0 8"/><path d="M17.7 5a9 9 0 0 1 0 14"/><path d="M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"/>'
681
703
  );
682
- He.displayName = "TbVolume";
683
- const Re = Y(
704
+ Re.displayName = "TbVolume";
705
+ const ze = Y(
684
706
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 8a5 5 0 0 1 0 8"/><path d="M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"/>'
685
707
  );
686
- Re.displayName = "TbVolume2";
687
- const ze = Y(
708
+ ze.displayName = "TbVolume2";
709
+ const We = Y(
688
710
  '<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a0.8 .8 0 0 1 1.5 .5v14a0.8 .8 0 0 1 -1.5 .5l-3.5 -4.5"/><path d="M16 10l4 4m0 -4l-4 4"/>'
689
711
  );
690
- ze.displayName = "TbVolume3";
691
- const We = De(
712
+ We.displayName = "TbVolume3";
713
+ const Ge = Oe(
692
714
  '<path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"/><path d="M7 8l4-3v6z"/><path d="M5 5h2v6h-2v-6z"/>'
693
715
  );
694
- We.displayName = "ImPrevious";
695
- const Ge = De(
716
+ Ge.displayName = "ImPrevious";
717
+ const je = Oe(
696
718
  '<path d="M8 0c4.418 0 8 3.582 8 8s-3.582 8-8 8-8-3.582-8-8 3.582-8 8-8zM8 14.5c3.59 0 6.5-2.91 6.5-6.5s-2.91-6.5-6.5-6.5-6.5 2.91-6.5 6.5 2.91 6.5 6.5 6.5z"/><path d="M9 8l-4-3v6z"/><path d="M11 5h-2v6h2v-6z"/>'
697
719
  );
698
- Ge.displayName = "ImNext";
699
- const x = ({ render: e, customIcon: t }) => /* @__PURE__ */ i(R, { children: t ?? e }), Et = z(function() {
700
- const { isPlaying: t } = b(), { customIcons: o } = P(), r = f(w);
720
+ je.displayName = "ImNext";
721
+ const x = ({ render: e, customIcon: t }) => /* @__PURE__ */ i(z, { children: t ?? e }), Et = W(function() {
722
+ const { isPlaying: t } = b(), { customIcons: o } = L(), r = g(P);
701
723
  return /* @__PURE__ */ i(
702
724
  q,
703
725
  {
@@ -709,14 +731,14 @@ const x = ({ render: e, customIcon: t }) => /* @__PURE__ */ i(R, { children: t ?
709
731
  children: t ? /* @__PURE__ */ i(
710
732
  x,
711
733
  {
712
- render: /* @__PURE__ */ i(Ue, {}),
734
+ render: /* @__PURE__ */ i(Ve, {}),
713
735
  customIcon: o == null ? void 0 : o.pause
714
736
  }
715
- ) : /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Oe, {}), customIcon: o == null ? void 0 : o.play })
737
+ ) : /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Ue, {}), customIcon: o == null ? void 0 : o.play })
716
738
  }
717
739
  );
718
- }), At = z(function({ isVisible: t }) {
719
- const { customIcons: o, elementRefs: r } = P(), a = f(w);
740
+ }), It = W(function({ isVisible: t }) {
741
+ const { customIcons: o, elementRefs: r } = L(), a = g(P);
720
742
  return t ? /* @__PURE__ */ i(
721
743
  q,
722
744
  {
@@ -729,11 +751,11 @@ const x = ({ render: e, customIcon: t }) => /* @__PURE__ */ i(R, { children: t ?
729
751
  },
730
752
  className: "rmap-prev-btn",
731
753
  "data-testid": "prev-btn",
732
- children: /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(We, {}), customIcon: o == null ? void 0 : o.prev })
754
+ children: /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Ge, {}), customIcon: o == null ? void 0 : o.prev })
733
755
  }
734
756
  ) : null;
735
- }), It = z(function({ isVisible: t }) {
736
- const { customIcons: o } = P(), r = f(w);
757
+ }), St = W(function({ isVisible: t }) {
758
+ const { customIcons: o } = L(), r = g(P);
737
759
  return t ? /* @__PURE__ */ i(
738
760
  q,
739
761
  {
@@ -744,97 +766,77 @@ const x = ({ render: e, customIcon: t }) => /* @__PURE__ */ i(R, { children: t ?
744
766
  },
745
767
  className: "rmap-next-btn",
746
768
  "data-testid": "next-btn",
747
- children: /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Ge, {}), customIcon: o == null ? void 0 : o.next })
769
+ children: /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(je, {}), customIcon: o == null ? void 0 : o.next })
748
770
  }
749
771
  ) : null;
750
- }), St = {
772
+ }), wt = {
751
773
  ALL: "Repeat: All tracks",
752
774
  ONE: "Repeat: One track",
753
775
  NONE: "Repeat: Off",
754
776
  SHUFFLE: "Shuffle"
755
- }, wt = {
777
+ }, Pt = {
756
778
  ALL: "ONE",
757
779
  ONE: "NONE",
758
780
  NONE: "SHUFFLE",
759
781
  SHUFFLE: "ALL"
760
- }, Pt = z(function() {
761
- const { repeatType: t } = b(), { customIcons: o } = P(), r = f(w), a = () => {
782
+ }, Lt = W(function() {
783
+ const { repeatType: t } = b(), { customIcons: o } = L(), r = g(P), a = () => {
762
784
  r({
763
785
  type: "SET_REPEAT_TYPE",
764
- repeatType: wt[t]
786
+ repeatType: Pt[t]
765
787
  });
766
788
  };
767
- return /* @__PURE__ */ S(
789
+ return /* @__PURE__ */ w(
768
790
  q,
769
791
  {
770
792
  type: "button",
771
- "aria-label": St[t],
793
+ "aria-label": wt[t],
772
794
  onClick: a,
773
795
  className: "rmap-repeat-btn",
774
796
  "data-testid": "repeat-btn",
775
797
  "data-repeattype": t,
776
798
  children: [
777
- t === "ALL" && /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Be, {}), customIcon: o == null ? void 0 : o.repeatAll }),
778
- t === "ONE" && /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Ke, {}), customIcon: o == null ? void 0 : o.repeatOne }),
799
+ t === "ALL" && /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Ke, {}), customIcon: o == null ? void 0 : o.repeatAll }),
800
+ t === "ONE" && /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i($e, {}), customIcon: o == null ? void 0 : o.repeatOne }),
779
801
  t === "NONE" && /* @__PURE__ */ i(x, { render: /* @__PURE__ */ i(Fe, {}), customIcon: o == null ? void 0 : o.repeatNone }),
780
802
  t === "SHUFFLE" && /* @__PURE__ */ i(
781
803
  x,
782
804
  {
783
- render: /* @__PURE__ */ i($e, {}),
805
+ render: /* @__PURE__ */ i(He, {}),
784
806
  customIcon: o == null ? void 0 : o.repeatShuffle
785
807
  }
786
808
  )
787
809
  ]
788
810
  }
789
811
  );
790
- }), me = { size: "100%" }, je = z(
791
- ve((e, t) => {
792
- var m;
793
- const { volume: o, muted: r } = b(), { customIcons: a, elementRefs: s } = P(), n = f(
794
- w
795
- ), c = T(
796
- () => n({ type: "SET_MUTED", muted: !r }),
797
- [n, r]
798
- ), l = o ?? ((m = s == null ? void 0 : s.audioEl) == null ? void 0 : m.volume) ?? 0, u = l > 0 && l <= 0.5, p = l > 0.5;
799
- return /* @__PURE__ */ i(
800
- q,
801
- {
802
- type: "button",
803
- "aria-label": r ? "Unmute" : "Mute",
804
- "aria-pressed": r,
805
- onClick: c,
806
- className: "rmap-volume-trigger",
807
- "data-testid": "volume-trigger-btn",
808
- "data-muted": String(r),
809
- ref: t,
810
- children: r || l === 0 ? /* @__PURE__ */ i(
811
- x,
812
- {
813
- render: /* @__PURE__ */ i(ze, { ...me }),
814
- customIcon: a == null ? void 0 : a.volumeMuted
815
- }
816
- ) : u ? /* @__PURE__ */ i(
817
- x,
818
- {
819
- render: /* @__PURE__ */ i(Re, { ...me }),
820
- customIcon: a == null ? void 0 : a.volumeHalf
821
- }
822
- ) : p ? /* @__PURE__ */ i(
823
- x,
824
- {
825
- render: /* @__PURE__ */ i(He, { ...me }),
826
- customIcon: a == null ? void 0 : a.volumeFull
827
- }
828
- ) : null
829
- }
830
- );
831
- })
832
- );
833
- je.displayName = "VolumeTriggerBtn";
834
- const le = $(null);
812
+ }), me = { size: "100%" }, qe = W(() => {
813
+ var n;
814
+ const { volume: e, muted: t } = b(), { customIcons: o, elementRefs: r } = L(), a = e ?? ((n = r == null ? void 0 : r.audioEl) == null ? void 0 : n.volume) ?? 0, s = a > 0 && a <= 0.5;
815
+ return t || a === 0 ? /* @__PURE__ */ i(
816
+ x,
817
+ {
818
+ render: /* @__PURE__ */ i(We, { ...me }),
819
+ customIcon: o == null ? void 0 : o.volumeMuted
820
+ }
821
+ ) : s ? /* @__PURE__ */ i(
822
+ x,
823
+ {
824
+ render: /* @__PURE__ */ i(ze, { ...me }),
825
+ customIcon: o == null ? void 0 : o.volumeHalf
826
+ }
827
+ ) : /* @__PURE__ */ i(
828
+ x,
829
+ {
830
+ render: /* @__PURE__ */ i(Re, { ...me }),
831
+ customIcon: o == null ? void 0 : o.volumeFull
832
+ }
833
+ );
834
+ });
835
+ qe.displayName = "VolumeIcon";
836
+ const le = H(null);
835
837
  le.displayName = "DrawerContext";
836
- const qe = (e, t) => {
837
- A(() => {
838
+ const Ye = (e, t) => {
839
+ E(() => {
838
840
  const o = (r) => {
839
841
  const a = e.current, { target: s } = r;
840
842
  !r || !a || a.contains(s) || t(r);
@@ -848,22 +850,22 @@ const qe = (e, t) => {
848
850
  isOpen: r,
849
851
  onOpenChange: a
850
852
  }) => {
851
- const s = E(null), [n, c] = te.Children.toArray(o), [l, u] = k(!1), p = ke();
852
- qe(s, () => {
853
- e && (u(!1), a && a(!1));
854
- }), A(() => {
855
- r !== void 0 && u(r);
853
+ const s = A(null), [n, c] = te.Children.toArray(o), [d, m] = C(!1), l = Ne();
854
+ Ye(s, () => {
855
+ e && (m(!1), a && a(!1));
856
+ }), E(() => {
857
+ r !== void 0 && m(r);
856
858
  }, [r]);
857
- const m = D(
858
- () => ({ isOpen: l, setIsOpen: u, onOpenChange: a, drawerId: p }),
859
- [l, u, a, p]
859
+ const y = D(
860
+ () => ({ isOpen: d, setIsOpen: m, onOpenChange: a, drawerId: l }),
861
+ [d, m, a, l]
860
862
  );
861
- return /* @__PURE__ */ i("div", { className: "rmap-drawer-container", ref: s, children: /* @__PURE__ */ i(le.Provider, { value: m, children: /* @__PURE__ */ S(R, { children: [
863
+ return /* @__PURE__ */ i("div", { className: "rmap-drawer-container", ref: s, children: /* @__PURE__ */ i(le.Provider, { value: y, children: /* @__PURE__ */ w(z, { children: [
862
864
  t === "top" && c,
863
865
  n,
864
866
  t === "bottom" && c
865
867
  ] }) }) });
866
- }, Ye = typeof window < "u", pe = Ye ? it : A, Se = ({
868
+ }, Xe = typeof window < "u", pe = Xe ? ct : E, Se = ({
867
869
  visible: e,
868
870
  name: t,
869
871
  leaveTime: o,
@@ -873,65 +875,65 @@ const qe = (e, t) => {
873
875
  onEntered: n,
874
876
  children: c
875
877
  }) => {
876
- const [l, u] = k(""), [p, m] = k(!1), d = E(n), y = E(s), v = E(t), h = E(r), g = E(o), C = E(a);
878
+ const [d, m] = C(""), [l, y] = C(!1), u = A(n), p = A(s), T = A(t), v = A(r), h = A(o), S = A(a);
877
879
  return pe(() => {
878
- d.current = n, y.current = s, v.current = t, h.current = r, g.current = o, C.current = a;
880
+ u.current = n, p.current = s, T.current = t, v.current = r, h.current = o, S.current = a;
879
881
  }), pe(() => {
880
- const N = e ? "enter" : "leave", W = v.current, H = e ? h.current : g.current;
881
- e && !p && m(!0), u(`${W}-${N}`);
882
+ const k = e ? "enter" : "leave", B = T.current, R = e ? v.current : h.current;
883
+ e && !l && y(!0), m(`${B}-${k}`);
882
884
  const G = setTimeout(() => {
883
885
  var X, oe;
884
- u(
885
- `${W}-${N} ${W}-${N}-active`
886
- ), N === "leave" ? (X = y.current) == null || X.call(y) : (oe = d.current) == null || oe.call(d);
887
- }, H), ae = setTimeout(() => {
888
- e || (u(W), m(!1));
889
- }, H + C.current);
886
+ m(
887
+ `${B}-${k} ${B}-${k}-active`
888
+ ), k === "leave" ? (X = p.current) == null || X.call(p) : (oe = u.current) == null || oe.call(u);
889
+ }, R), ae = setTimeout(() => {
890
+ e || (m(B), y(!1));
891
+ }, R + S.current);
890
892
  return () => {
891
893
  clearTimeout(G), clearTimeout(ae);
892
894
  };
893
- }, [e, p]), p ? lt(c, {
894
- className: `${c.props.className} ${l}`
895
+ }, [e, l]), l ? ut(c, {
896
+ className: `${c.props.className} ${d}`
895
897
  }) : null;
896
- }, Nt = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [role="button"]:not([aria-disabled="true"])', Lt = ({
898
+ }, kt = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [role="button"]:not([aria-disabled="true"])', Nt = ({
897
899
  children: e,
898
900
  isWithAnimation: t = !0,
899
901
  "aria-label": o = "Dialog"
900
902
  }) => {
901
- const { isOpen: r, setIsOpen: a, onOpenChange: s, drawerId: n } = f(le), c = E(null), l = E(null), u = T(
903
+ const { isOpen: r, setIsOpen: a, onOpenChange: s, drawerId: n } = g(le), c = A(null), d = A(null), m = f(
902
904
  () => {
903
- var h;
904
- return (h = c.current) == null ? void 0 : h.querySelectorAll(Nt);
905
+ var v;
906
+ return (v = c.current) == null ? void 0 : v.querySelectorAll(kt);
905
907
  },
906
908
  []
907
- ), p = T(() => {
908
- var h, g;
909
- (g = (h = u()) == null ? void 0 : h[0]) == null || g.focus();
910
- }, [u]), m = T(() => {
911
- l.current = document.activeElement, p();
912
- }, [p]), d = T(() => {
913
- var h;
914
- (h = l.current) == null || h.focus();
909
+ ), l = f(() => {
910
+ var v, h;
911
+ (h = (v = m()) == null ? void 0 : v[0]) == null || h.focus();
912
+ }, [m]), y = f(() => {
913
+ d.current = document.activeElement, l();
914
+ }, [l]), u = f(() => {
915
+ var v;
916
+ (v = d.current) == null || v.focus();
915
917
  }, []);
916
- A(() => {
917
- var h;
918
- r && !t ? (l.current = document.activeElement, p()) : !r && !t && ((h = l.current) == null || h.focus());
919
- }, [r, t, p]);
920
- const y = T(
921
- (h) => {
922
- if (h.key === "Escape") {
918
+ E(() => {
919
+ var v;
920
+ r && !t ? (d.current = document.activeElement, l()) : !r && !t && ((v = d.current) == null || v.focus());
921
+ }, [r, t, l]);
922
+ const p = f(
923
+ (v) => {
924
+ if (v.key === "Escape") {
923
925
  a(!1), s && s(!1);
924
926
  return;
925
927
  }
926
- if (h.key === "Tab") {
927
- const g = u();
928
- if (!g || g.length === 0) return;
929
- const C = g[0], N = g[g.length - 1];
930
- h.shiftKey ? document.activeElement === C && (h.preventDefault(), N.focus()) : document.activeElement === N && (h.preventDefault(), C.focus());
928
+ if (v.key === "Tab") {
929
+ const h = m();
930
+ if (!h || h.length === 0) return;
931
+ const S = h[0], k = h[h.length - 1];
932
+ v.shiftKey ? document.activeElement === S && (v.preventDefault(), k.focus()) : document.activeElement === k && (v.preventDefault(), S.focus());
931
933
  }
932
934
  },
933
- [a, s, u]
934
- ), v = /* @__PURE__ */ i(
935
+ [a, s, m]
936
+ ), T = /* @__PURE__ */ i(
935
937
  "div",
936
938
  {
937
939
  ref: c,
@@ -940,7 +942,7 @@ const qe = (e, t) => {
940
942
  "aria-modal": "true",
941
943
  "aria-label": o,
942
944
  id: n,
943
- onKeyDown: y,
945
+ onKeyDown: p,
944
946
  children: e
945
947
  }
946
948
  );
@@ -952,19 +954,19 @@ const qe = (e, t) => {
952
954
  enterTime: 20,
953
955
  leaveTime: 60,
954
956
  clearTime: 300,
955
- onEntered: m,
956
- onExited: d,
957
- children: v
957
+ onEntered: y,
958
+ onExited: u,
959
+ children: T
958
960
  }
959
- ) : r ? v : null;
960
- }, kt = ({
961
+ ) : r ? T : null;
962
+ }, bt = ({
961
963
  children: e,
962
964
  "aria-label": t,
963
965
  "data-testid": o
964
966
  }) => {
965
- const { isOpen: r, setIsOpen: a, onOpenChange: s, drawerId: n } = f(le), c = T(() => {
966
- const l = !r;
967
- a(l), s == null || s(l);
967
+ const { isOpen: r, setIsOpen: a, onOpenChange: s, drawerId: n } = g(le), c = f(() => {
968
+ const d = !r;
969
+ a(d), s == null || s(d);
968
970
  }, [r, a, s]);
969
971
  return /* @__PURE__ */ i(
970
972
  q,
@@ -980,9 +982,9 @@ const qe = (e, t) => {
980
982
  }
981
983
  );
982
984
  };
983
- se.Content = Lt;
984
- se.Trigger = kt;
985
- const ye = ({ children: e }) => /* @__PURE__ */ i("ul", { className: "rmap-sortable-list-container", "aria-label": "Sortable list", children: e }), bt = ({
985
+ se.Content = Nt;
986
+ se.Trigger = bt;
987
+ const ye = ({ children: e }) => /* @__PURE__ */ i("ul", { className: "rmap-sortable-list-container", "aria-label": "Sortable list", children: e }), Ct = ({
986
988
  index: e,
987
989
  dragStartIdx: t,
988
990
  listData: o,
@@ -990,58 +992,97 @@ const ye = ({ children: e }) => /* @__PURE__ */ i("ul", { className: "rmap-sorta
990
992
  onDragStart: a,
991
993
  onDragOver: s,
992
994
  onDrop: n,
993
- onClick: c
994
- }) => ({
995
- draggable: r,
996
- onDragStart: (l) => {
997
- l.stopPropagation(), l.currentTarget.classList.add("rmap-drag-start"), a == null || a(l);
998
- },
999
- onDragEnd: (l) => {
1000
- l.stopPropagation(), l.currentTarget.classList.remove("rmap-drag-start");
1001
- },
1002
- onDragEnter: (l) => {
1003
- l.stopPropagation(), l.currentTarget.classList.add("rmap-drag-over");
1004
- },
1005
- onDragLeave: (l) => {
1006
- l.stopPropagation(), l.currentTarget.classList.remove("rmap-drag-over");
1007
- },
1008
- onDragOver: (l) => {
1009
- l.preventDefault(), l.stopPropagation(), s == null || s(l);
1010
- },
1011
- onDrop: (l) => {
1012
- l.stopPropagation(), l.currentTarget.classList.remove("rmap-drag-over");
1013
- const u = [...o], p = o[t];
1014
- u.splice(t, 1);
1015
- const m = (t < e ? [
1016
- ...u.slice(0, e),
1017
- p,
1018
- ...u.slice(e, u.length)
1019
- ] : [
1020
- ...u.slice(0, e),
1021
- p,
1022
- ...u.slice(e, u.length)
1023
- ]).map((d, y) => ({ ...d, index: y }));
1024
- n == null || n(l, m);
1025
- },
1026
- onClick: (l) => {
1027
- l.stopPropagation(), c == null || c(l);
1028
- }
1029
- }), Ct = (e) => {
1030
- const { children: t, ...o } = e, r = bt(o);
995
+ onReorder: c,
996
+ onClick: d
997
+ }) => {
998
+ const m = (l, y) => {
999
+ if (l < 0 || l >= o.length) return;
1000
+ const u = [...o], p = u.splice(e, 1)[0];
1001
+ u.splice(l, 0, p);
1002
+ const T = u.map((h, S) => ({
1003
+ ...h,
1004
+ index: S
1005
+ })), v = (y == null ? void 0 : y.parentElement) ?? null;
1006
+ if (be(() => {
1007
+ c == null || c(T);
1008
+ }), v) {
1009
+ const h = v.children[l];
1010
+ h == null || h.focus();
1011
+ }
1012
+ };
1013
+ return {
1014
+ tabIndex: 0,
1015
+ draggable: r,
1016
+ onKeyDown: (l) => {
1017
+ switch (l.key) {
1018
+ case "Enter":
1019
+ case " ":
1020
+ l.preventDefault(), l.currentTarget.click();
1021
+ break;
1022
+ case "ArrowUp":
1023
+ if (l.preventDefault(), r && l.altKey)
1024
+ m(e - 1, l.currentTarget);
1025
+ else {
1026
+ const y = l.currentTarget.previousElementSibling;
1027
+ y == null || y.focus();
1028
+ }
1029
+ break;
1030
+ case "ArrowDown":
1031
+ if (l.preventDefault(), r && l.altKey)
1032
+ m(e + 1, l.currentTarget);
1033
+ else {
1034
+ const y = l.currentTarget.nextElementSibling;
1035
+ y == null || y.focus();
1036
+ }
1037
+ break;
1038
+ }
1039
+ },
1040
+ onDragStart: (l) => {
1041
+ l.stopPropagation(), l.currentTarget.classList.add("rmap-drag-start"), a == null || a(l);
1042
+ },
1043
+ onDragEnd: (l) => {
1044
+ l.stopPropagation(), l.currentTarget.classList.remove("rmap-drag-start");
1045
+ },
1046
+ onDragEnter: (l) => {
1047
+ l.stopPropagation(), l.currentTarget.classList.add("rmap-drag-over");
1048
+ },
1049
+ onDragLeave: (l) => {
1050
+ l.stopPropagation(), l.currentTarget.classList.remove("rmap-drag-over");
1051
+ },
1052
+ onDragOver: (l) => {
1053
+ l.preventDefault(), l.stopPropagation(), s == null || s(l);
1054
+ },
1055
+ onDrop: (l) => {
1056
+ l.stopPropagation(), l.currentTarget.classList.remove("rmap-drag-over");
1057
+ const y = [...o], u = o[t];
1058
+ y.splice(t, 1);
1059
+ const p = [
1060
+ ...y.slice(0, e),
1061
+ u,
1062
+ ...y.slice(e, y.length)
1063
+ ].map((T, v) => ({ ...T, index: v }));
1064
+ n == null || n(l, p);
1065
+ },
1066
+ onClick: (l) => {
1067
+ l.stopPropagation(), d == null || d(l);
1068
+ }
1069
+ };
1070
+ }, Mt = (e) => {
1071
+ const { children: t, ...o } = e, r = Ct(o);
1031
1072
  return /* @__PURE__ */ i("li", { className: "rmap-sortable-item", ...r, children: /* @__PURE__ */ i("div", { className: "rmap-sortable-item-inner", children: t }) });
1032
1073
  };
1033
- ye.Item = Ct;
1034
- const Mt = z(function({
1074
+ ye.Item = Mt;
1075
+ const xt = W(function({
1035
1076
  data: t
1036
1077
  }) {
1037
- const { curPlayId: o } = V(), { coverImgsCss: r } = P(), a = o === t.id;
1078
+ const { curPlayId: o } = V(), { coverImgsCss: r } = L(), a = o === t.id;
1038
1079
  return /* @__PURE__ */ i(
1039
1080
  "div",
1040
1081
  {
1041
1082
  className: `rmap-playlist-item${a ? " rmap-cur-played" : ""}`,
1042
1083
  "data-testid": "playlist-item",
1043
1084
  "aria-current": a ? "true" : void 0,
1044
- children: /* @__PURE__ */ S("div", { className: "rmap-playlist-item-contents", children: [
1085
+ children: /* @__PURE__ */ w("div", { className: "rmap-playlist-item-contents", children: [
1045
1086
  /* @__PURE__ */ i("div", { className: "rmap-playlist-album-cover", children: t.img && /* @__PURE__ */ i(
1046
1087
  "img",
1047
1088
  {
@@ -1050,7 +1091,7 @@ const Mt = z(function({
1050
1091
  style: r == null ? void 0 : r.listThumbnail
1051
1092
  }
1052
1093
  ) }),
1053
- /* @__PURE__ */ S("div", { className: "rmap-playlist-album-info", children: [
1094
+ /* @__PURE__ */ w("div", { className: "rmap-playlist-album-info", children: [
1054
1095
  t.writer && /* @__PURE__ */ i("span", { className: "rmap-playlist-writer", children: t.writer }),
1055
1096
  t.name && /* @__PURE__ */ i("span", { className: "rmap-playlist-title", children: t.name }),
1056
1097
  t.description && /* @__PURE__ */ i("div", { className: "rmap-playlist-description", children: t.description })
@@ -1058,10 +1099,10 @@ const Mt = z(function({
1058
1099
  ] })
1059
1100
  }
1060
1101
  );
1061
- }), xt = ({
1102
+ }), _t = ({
1062
1103
  setIsOpen: e
1063
1104
  }) => {
1064
- const { playList: t } = V(), { activeUI: o } = O(), r = f(w), [a, s] = k(0), n = T(
1105
+ const { playList: t } = V(), { activeUI: o } = O(), r = g(P), [a, s] = C(0), n = f(
1065
1106
  (c) => {
1066
1107
  r({
1067
1108
  type: "SET_CURRENT_AUDIO",
@@ -1080,22 +1121,26 @@ const Mt = z(function({
1080
1121
  draggable: o.playList !== "unSortable",
1081
1122
  dragStartIdx: a,
1082
1123
  onDragStart: (c) => s(c),
1083
- onDrop: (c, l) => r({
1124
+ onDrop: (c, d) => r({
1084
1125
  type: "UPDATE_PLAY_LIST",
1085
- playList: l
1126
+ playList: d
1127
+ }),
1128
+ onReorder: (c) => r({
1129
+ type: "UPDATE_PLAY_LIST",
1130
+ playList: c
1086
1131
  }),
1087
1132
  onClick: (c) => n(c)
1088
1133
  }
1089
1134
  };
1090
- }, _t = () => {
1091
- const { playList: e } = V(), { isOpen: t, setIsOpen: o } = f(le), { cssTransitionEventProps: r, sortableItemEventProps: a } = xt({
1135
+ }, Dt = () => {
1136
+ const { playList: e } = V(), { isOpen: t, setIsOpen: o } = g(le), { cssTransitionEventProps: r, sortableItemEventProps: a } = _t({
1092
1137
  setIsOpen: o
1093
1138
  }), {
1094
1139
  onClick: s,
1095
1140
  onDragStart: n,
1096
1141
  ...c
1097
1142
  } = a;
1098
- return e.length !== 0 ? ct.createPortal(
1143
+ return e.length !== 0 ? dt.createPortal(
1099
1144
  /* @__PURE__ */ i(
1100
1145
  Se,
1101
1146
  {
@@ -1105,34 +1150,34 @@ const Mt = z(function({
1105
1150
  leaveTime: 20,
1106
1151
  clearTime: 300,
1107
1152
  ...r,
1108
- children: /* @__PURE__ */ i("div", { className: "rmap-playlist-container", children: /* @__PURE__ */ i(ye, { children: e.map((l, u) => /* @__PURE__ */ i(
1153
+ children: /* @__PURE__ */ i("div", { className: "rmap-playlist-container", children: /* @__PURE__ */ i(ye, { children: e.map((d, m) => /* @__PURE__ */ i(
1109
1154
  ye.Item,
1110
1155
  {
1111
- index: u,
1156
+ index: m,
1112
1157
  listData: e,
1113
- onClick: () => s(u),
1114
- onDragStart: () => n(u),
1158
+ onClick: () => s(m),
1159
+ onDragStart: () => n(m),
1115
1160
  ...c,
1116
- children: /* @__PURE__ */ i(Mt, { data: l })
1161
+ children: /* @__PURE__ */ i(xt, { data: d })
1117
1162
  },
1118
- `sortable-item-${u}`
1163
+ `sortable-item-${m}`
1119
1164
  )) }) })
1120
1165
  }
1121
1166
  ),
1122
1167
  document.querySelector(".rmap-sortable-playlist") ?? document.body
1123
- ) : /* @__PURE__ */ i(R, {});
1124
- }, Dt = () => {
1125
- const { customIcons: e } = P();
1168
+ ) : /* @__PURE__ */ i(z, {});
1169
+ }, Ot = () => {
1170
+ const { customIcons: e } = L();
1126
1171
  return /* @__PURE__ */ i(
1127
1172
  x,
1128
1173
  {
1129
- render: /* @__PURE__ */ i(Ve, { size: "100%" }),
1174
+ render: /* @__PURE__ */ i(Be, { size: "100%" }),
1130
1175
  customIcon: e == null ? void 0 : e.playList
1131
1176
  }
1132
1177
  );
1133
- }, Ot = () => /* @__PURE__ */ S(se, { children: [
1134
- /* @__PURE__ */ i(se.Trigger, { "aria-label": "Playlist", "data-testid": "playlist-trigger-btn", children: /* @__PURE__ */ i(Dt, {}) }),
1135
- /* @__PURE__ */ i(se.Content, { "aria-label": "Playlist", children: /* @__PURE__ */ i(_t, {}) })
1178
+ }, Ut = () => /* @__PURE__ */ w(se, { children: [
1179
+ /* @__PURE__ */ i(se.Trigger, { "aria-label": "Playlist", "data-testid": "playlist-trigger-btn", children: /* @__PURE__ */ i(Ot, {}) }),
1180
+ /* @__PURE__ */ i(se.Content, { "aria-label": "Playlist", children: /* @__PURE__ */ i(Dt, {}) })
1136
1181
  ] }), ee = (e) => {
1137
1182
  const t = `${Math.floor(e / 60)}`.padStart(2, "0"), o = `${Math.floor(e % 60)}`.padStart(2, "0");
1138
1183
  return `${t}:${o}`;
@@ -1140,16 +1185,16 @@ const Mt = z(function({
1140
1185
  if (!t) return o;
1141
1186
  const r = e / t;
1142
1187
  return isFinite(r) ? r : o;
1143
- }, Xe = () => {
1144
- const { isLoadedMetaData: e } = b(), { elementRefs: t } = P(), [o, r] = k(!1), a = T(
1188
+ }, Qe = () => {
1189
+ const { isLoadedMetaData: e } = b(), { elementRefs: t } = L(), [o, r] = C(!1), a = f(
1145
1190
  (s) => {
1146
1191
  if (!(t != null && t.audioEl) || !e) return;
1147
- const { clientX: n } = s, { clientWidth: c } = s.currentTarget, l = s.currentTarget.getBoundingClientRect(), u = n - l.x, p = ce(u, c) * t.audioEl.duration;
1148
- t.audioEl.currentTime = p;
1192
+ const { clientX: n } = s, { clientWidth: c } = s.currentTarget, d = s.currentTarget.getBoundingClientRect(), m = n - d.x, l = ce(m, c) * t.audioEl.duration;
1193
+ t.audioEl.currentTime = l;
1149
1194
  },
1150
1195
  [e, t == null ? void 0 : t.audioEl]
1151
1196
  );
1152
- return A(() => {
1197
+ return E(() => {
1153
1198
  if (!o) return;
1154
1199
  const s = (n) => n.preventDefault();
1155
1200
  return document.addEventListener("selectstart", s), () => {
@@ -1162,9 +1207,9 @@ const Mt = z(function({
1162
1207
  onMouseMove: o ? a : void 0,
1163
1208
  onClick: a
1164
1209
  };
1165
- }, Qe = (e) => {
1166
- const { isLoadedMetaData: t } = b(), { elementRefs: o } = P();
1167
- return T(
1210
+ }, Je = (e) => {
1211
+ const { isLoadedMetaData: t } = b(), { elementRefs: o } = L();
1212
+ return f(
1168
1213
  (r) => {
1169
1214
  if (!(o != null && o.audioEl) || !t) return;
1170
1215
  const a = o.audioEl;
@@ -1189,19 +1234,19 @@ const Mt = z(function({
1189
1234
  },
1190
1235
  [o == null ? void 0 : o.audioEl, t, e]
1191
1236
  );
1192
- }, Ut = () => {
1193
- const { currentTime: e, duration: t } = re(), o = E(null), [r, a] = k(0);
1194
- A(() => {
1195
- const u = o.current;
1196
- if (!u) return;
1197
- a(u.offsetWidth);
1198
- const p = new ResizeObserver(([m]) => {
1199
- a(m.contentBoxSize[0].inlineSize);
1237
+ }, Vt = () => {
1238
+ const { currentTime: e, duration: t } = re(), o = A(null), [r, a] = C(0);
1239
+ E(() => {
1240
+ const m = o.current;
1241
+ if (!m) return;
1242
+ a(m.offsetWidth);
1243
+ const l = new ResizeObserver(([y]) => {
1244
+ a(y.contentBoxSize[0].inlineSize);
1200
1245
  });
1201
- return p.observe(u), () => p.disconnect();
1246
+ return l.observe(m), () => l.disconnect();
1202
1247
  }, []);
1203
- const s = ce(e, t), n = Xe(), c = Qe(), l = s * r;
1204
- return /* @__PURE__ */ S(
1248
+ const s = ce(e, t), n = Qe(), c = Je(), d = s * r;
1249
+ return /* @__PURE__ */ w(
1205
1250
  "div",
1206
1251
  {
1207
1252
  ref: o,
@@ -1231,23 +1276,23 @@ const Mt = z(function({
1231
1276
  {
1232
1277
  className: "rmap-progress-handle",
1233
1278
  style: {
1234
- transform: `translateX(${l}px)`
1279
+ transform: `translateX(${d}px)`
1235
1280
  }
1236
1281
  }
1237
1282
  )
1238
1283
  ]
1239
1284
  }
1240
1285
  );
1241
- }, Vt = (e, t) => {
1242
- const o = E(), r = T(() => {
1286
+ }, Bt = (e, t) => {
1287
+ const o = A(), r = f(() => {
1243
1288
  const a = document.getElementsByClassName("rmap-player-provider")[0];
1244
1289
  if (!a) return;
1245
1290
  const s = Object.entries(
1246
1291
  e
1247
1292
  ).reduce(
1248
- (n, [c, l]) => ({
1293
+ (n, [c, d]) => ({
1249
1294
  ...n,
1250
- [c]: window.getComputedStyle(a).getPropertyValue(`${l}`)
1295
+ [c]: window.getComputedStyle(a).getPropertyValue(`${d}`)
1251
1296
  }),
1252
1297
  {}
1253
1298
  );
@@ -1258,19 +1303,24 @@ const Mt = z(function({
1258
1303
  const a = window.matchMedia("(prefers-color-scheme: dark)");
1259
1304
  return a.addEventListener("change", r), () => a.removeEventListener("change", r);
1260
1305
  }, [r, t]), o;
1261
- }, Bt = {
1306
+ }, Kt = {
1262
1307
  progressColor: "--rm-audio-player-waveform-bar",
1263
1308
  waveColor: "--rm-audio-player-waveform-background"
1264
- }, Kt = (e) => {
1265
- const t = f(w), { isPlaying: o } = b(), { curPlayId: r } = V(), { elementRefs: a } = P(), { colorScheme: s } = O(), n = Vt(Bt, s), c = E(a == null ? void 0 : a.waveformInst);
1266
- c.current = a == null ? void 0 : a.waveformInst, A(() => {
1267
- var d, y;
1268
- if (a != null && a.waveformInst || !((d = n.current) != null && d.progressColor) || !((y = n.current) != null && y.waveColor))
1309
+ }, $t = (e) => {
1310
+ const t = e.backend;
1311
+ if (!(!(t != null && t.media) || !t.mediaListeners))
1312
+ for (const [o, r] of Object.entries(t.mediaListeners))
1313
+ t.media.removeEventListener(o, r);
1314
+ }, Ft = (e) => {
1315
+ const t = g(P), { isPlaying: o } = b(), { curPlayId: r } = V(), { elementRefs: a } = L(), { colorScheme: s } = O(), n = Bt(Kt, s), c = A(a == null ? void 0 : a.waveformInst);
1316
+ c.current = a == null ? void 0 : a.waveformInst, E(() => {
1317
+ var p, T;
1318
+ if (a != null && a.waveformInst || !((p = n.current) != null && p.progressColor) || !((T = n.current) != null && T.waveColor))
1269
1319
  return;
1270
- let m = !1;
1320
+ let u = !1;
1271
1321
  return import("./wavesurfer-_j5aw4gZ.mjs").then((v) => v.w).then(({ default: v }) => {
1272
- var g, C;
1273
- if (m || !e.current || !((g = n.current) != null && g.progressColor) || !((C = n.current) != null && C.waveColor)) {
1322
+ var S, k;
1323
+ if (u || !e.current || !((S = n.current) != null && S.progressColor) || !((k = n.current) != null && k.waveColor)) {
1274
1324
  console.error("[useWaveSurfer] missing required dependencies");
1275
1325
  return;
1276
1326
  }
@@ -1288,10 +1338,10 @@ const Mt = z(function({
1288
1338
  backend: "MediaElement",
1289
1339
  removeMediaElementOnDestroy: !1
1290
1340
  });
1291
- } catch (N) {
1341
+ } catch (B) {
1292
1342
  console.error(
1293
1343
  "[useWaveSurfer] failed to create WaveSurfer instance",
1294
- N
1344
+ B
1295
1345
  );
1296
1346
  return;
1297
1347
  }
@@ -1302,36 +1352,38 @@ const Mt = z(function({
1302
1352
  }).catch((v) => {
1303
1353
  console.error("[useWaveSurfer] failed to load wavesurfer.js", v);
1304
1354
  }), () => {
1305
- m = !0;
1355
+ u = !0;
1306
1356
  };
1307
1357
  }, [a == null ? void 0 : a.waveformInst, t, n]);
1308
- const l = E(r);
1309
- A(() => {
1358
+ const d = A(r);
1359
+ E(() => {
1310
1360
  if (!(a != null && a.audioEl) || !(a != null && a.waveformInst)) return;
1311
- const m = a.audioEl, d = a.waveformInst, y = l.current !== r;
1312
- l.current = r;
1313
- const v = y ? 0 : m.currentTime, h = o;
1314
- d.load(m);
1315
- const g = () => {
1316
- !y && v > 0 && m.duration && (m.currentTime = v, d.seekTo(v / m.duration)), h && m.play();
1361
+ const u = a.audioEl;
1362
+ if (!u.getAttribute("src")) return;
1363
+ const p = a.waveformInst, T = d.current !== r;
1364
+ d.current = r;
1365
+ const v = T ? 0 : u.currentTime, h = o;
1366
+ $t(p), p.load(u);
1367
+ const S = () => {
1368
+ !T && v > 0 && u.duration && (u.currentTime = v, p.seekTo(v / u.duration)), h && u.play();
1317
1369
  };
1318
- return d.on("ready", g), () => {
1319
- d.un("ready", g);
1370
+ return p.on("ready", S), () => {
1371
+ p.un("ready", S);
1320
1372
  };
1321
- }, [r, a == null ? void 0 : a.audioEl, a == null ? void 0 : a.waveformInst]), A(() => {
1373
+ }, [r, a == null ? void 0 : a.audioEl, a == null ? void 0 : a.waveformInst]), E(() => {
1322
1374
  if (!e.current || !(a != null && a.waveformInst)) return;
1323
- const m = () => {
1324
- var y, v;
1325
- (v = (y = a.waveformInst) == null ? void 0 : y.drawer) == null || v.fireEvent("redraw");
1326
- }, d = new ResizeObserver(m);
1327
- return d.observe(e.current), () => {
1328
- d.disconnect();
1375
+ const u = () => {
1376
+ var T, v;
1377
+ (v = (T = a.waveformInst) == null ? void 0 : T.drawer) == null || v.fireEvent("redraw");
1378
+ }, p = new ResizeObserver(u);
1379
+ return p.observe(e.current), () => {
1380
+ p.disconnect();
1329
1381
  };
1330
- }, [a == null ? void 0 : a.waveformInst, e]), A(
1382
+ }, [a == null ? void 0 : a.waveformInst, e]), E(
1331
1383
  () => () => {
1332
- var d, y;
1333
- const m = (d = e.current) == null ? void 0 : d.querySelector("wave");
1334
- m && m.remove(), (y = c.current) == null || y.destroy(), t({
1384
+ var p, T;
1385
+ const u = (p = e.current) == null ? void 0 : p.querySelector("wave");
1386
+ u && u.remove(), (T = c.current) == null || T.destroy(), t({
1335
1387
  type: "SET_ELEMENT_REFS",
1336
1388
  elementRefs: { waveformInst: void 0 }
1337
1389
  });
@@ -1339,37 +1391,32 @@ const Mt = z(function({
1339
1391
  // eslint-disable-next-line react-hooks/exhaustive-deps
1340
1392
  [t]
1341
1393
  );
1342
- const u = E(void 0);
1343
- u.current = () => {
1344
- var d, y;
1345
- const m = (d = e.current) == null ? void 0 : d.querySelector("wave");
1346
- m && m.remove(), (y = a == null ? void 0 : a.waveformInst) == null || y.destroy(), t({
1347
- type: "SET_ELEMENT_REFS",
1348
- elementRefs: { waveformInst: void 0 }
1349
- });
1350
- }, A(() => {
1351
- const m = () => {
1352
- var y;
1353
- return (y = u.current) == null ? void 0 : y.call(u);
1354
- }, d = window.matchMedia("(prefers-color-scheme: dark)");
1355
- return d.addEventListener("change", m), () => d.removeEventListener("change", m);
1394
+ const m = () => {
1395
+ var v, h;
1396
+ const u = c.current;
1397
+ if (!(u != null && u.isReady)) return;
1398
+ const p = (v = n.current) == null ? void 0 : v.waveColor, T = (h = n.current) == null ? void 0 : h.progressColor;
1399
+ p && u.setWaveColor(p), T && u.setProgressColor(T);
1400
+ }, l = A(m);
1401
+ l.current = m;
1402
+ const y = A(s);
1403
+ E(() => {
1404
+ y.current !== s && (y.current = s, l.current());
1405
+ }, [s, a == null ? void 0 : a.waveformInst]), E(() => {
1406
+ const u = () => l.current(), p = window.matchMedia("(prefers-color-scheme: dark)");
1407
+ return p.addEventListener("change", u), () => p.removeEventListener("change", u);
1356
1408
  }, []);
1357
- const p = E(s);
1358
- A(() => {
1359
- var m;
1360
- p.current !== s && (p.current = s, (m = u.current) == null || m.call(u));
1361
- }, [s]);
1362
- }, Ft = ({ isActive: e }) => {
1363
- var l, u, p, m;
1364
- const t = E(null), { isLoadedMetaData: o, isPlaying: r } = b(), { elementRefs: a } = P();
1365
- Kt(t), A(() => {
1409
+ }, Ht = ({ isActive: e }) => {
1410
+ var d, m, l, y;
1411
+ const t = A(null), { isLoadedMetaData: o, isPlaying: r } = b(), { elementRefs: a } = L();
1412
+ Ft(t), E(() => {
1366
1413
  if (!e || !(a != null && a.waveformInst) || !(a != null && a.audioEl) || !o || r)
1367
1414
  return;
1368
- const d = ce(
1415
+ const u = ce(
1369
1416
  a.audioEl.currentTime,
1370
1417
  a.audioEl.duration
1371
1418
  );
1372
- a.waveformInst.seekTo(d);
1419
+ a.waveformInst.seekTo(u);
1373
1420
  }, [
1374
1421
  e,
1375
1422
  o,
@@ -1377,13 +1424,13 @@ const Mt = z(function({
1377
1424
  a == null ? void 0 : a.audioEl,
1378
1425
  r
1379
1426
  ]);
1380
- const s = Xe(), n = T(
1381
- (d, y) => {
1382
- var v;
1383
- y && ((v = a == null ? void 0 : a.waveformInst) == null || v.seekTo(ce(d, y)));
1427
+ const s = Qe(), n = f(
1428
+ (u, p) => {
1429
+ var T;
1430
+ p && ((T = a == null ? void 0 : a.waveformInst) == null || T.seekTo(ce(u, p)));
1384
1431
  },
1385
1432
  [a == null ? void 0 : a.waveformInst]
1386
- ), c = Qe(n);
1433
+ ), c = Je(n);
1387
1434
  return /* @__PURE__ */ i("div", { className: "rmap-waveform-wrapper", "data-active": e, children: /* @__PURE__ */ i(
1388
1435
  "div",
1389
1436
  {
@@ -1395,42 +1442,42 @@ const Mt = z(function({
1395
1442
  "aria-valuemin": 0,
1396
1443
  "aria-valuemax": 100,
1397
1444
  "aria-valuenow": Math.round(
1398
- (((l = a == null ? void 0 : a.audioEl) == null ? void 0 : l.currentTime) ?? 0) / (((u = a == null ? void 0 : a.audioEl) == null ? void 0 : u.duration) || 1) * 100
1445
+ (((d = a == null ? void 0 : a.audioEl) == null ? void 0 : d.currentTime) ?? 0) / (((m = a == null ? void 0 : a.audioEl) == null ? void 0 : m.duration) || 1) * 100
1399
1446
  ),
1400
1447
  "aria-valuetext": `${ee(
1401
- ((p = a == null ? void 0 : a.audioEl) == null ? void 0 : p.currentTime) ?? 0
1402
- )} of ${ee(((m = a == null ? void 0 : a.audioEl) == null ? void 0 : m.duration) ?? 0)}`,
1448
+ ((l = a == null ? void 0 : a.audioEl) == null ? void 0 : l.currentTime) ?? 0
1449
+ )} of ${ee(((y = a == null ? void 0 : a.audioEl) == null ? void 0 : y.duration) ?? 0)}`,
1403
1450
  onKeyDown: c,
1404
1451
  ...s
1405
1452
  }
1406
1453
  ) });
1407
- }, $t = () => {
1408
- const { activeUI: e } = O(), t = e.progress ?? (e.all ? "bar" : !1), o = t === "waveform", r = t === "bar", [a, s] = k(o);
1409
- return A(() => {
1454
+ }, Rt = () => {
1455
+ const { activeUI: e } = O(), t = e.progress ?? (e.all ? "bar" : !1), o = t === "waveform", r = t === "bar", [a, s] = C(o);
1456
+ return E(() => {
1410
1457
  o && !a && s(!0);
1411
- }, [o, a]), /* @__PURE__ */ S("div", { className: "rmap-progress-container", children: [
1412
- a && /* @__PURE__ */ i(Ft, { isActive: o }),
1413
- r && /* @__PURE__ */ i(Ut, {})
1458
+ }, [o, a]), /* @__PURE__ */ w("div", { className: "rmap-progress-container", children: [
1459
+ a && /* @__PURE__ */ i(Ht, { isActive: o }),
1460
+ r && /* @__PURE__ */ i(Vt, {})
1414
1461
  ] });
1415
- }, Ht = ({
1462
+ }, zt = ({
1416
1463
  placement: e
1417
1464
  }) => {
1418
- var m;
1419
- const t = E(null), { volume: o, muted: r } = b(), { elementRefs: a } = P(), s = f(w), n = T(
1420
- (d) => {
1421
- d.stopPropagation(), d.preventDefault(), r && s({ type: "SET_MUTED", muted: !1 });
1422
- const { value: y } = d.target, v = parseFloat(y);
1465
+ var y;
1466
+ const t = A(null), { volume: o, muted: r } = b(), { elementRefs: a } = L(), s = g(P), n = f(
1467
+ (u) => {
1468
+ u.stopPropagation(), u.preventDefault(), r && s({ type: "SET_MUTED", muted: !1 });
1469
+ const { value: p } = u.target, T = parseFloat(p);
1423
1470
  s({
1424
1471
  type: "SET_VOLUME",
1425
- volume: v
1472
+ volume: T
1426
1473
  });
1427
1474
  },
1428
1475
  [r, s]
1429
- ), c = o ?? ((m = a == null ? void 0 : a.audioEl) == null ? void 0 : m.volume) ?? 0, l = c * 100, u = Math.round(l), p = D(
1476
+ ), c = o ?? ((y = a == null ? void 0 : a.audioEl) == null ? void 0 : y.volume) ?? 0, d = c * 100, m = Math.round(d), l = D(
1430
1477
  () => ({
1431
- "--rm-audio-player-volume-value": `${l}%`
1478
+ "--rm-audio-player-volume-value": `${d}%`
1432
1479
  }),
1433
- [l]
1480
+ [d]
1434
1481
  );
1435
1482
  return /* @__PURE__ */ i(
1436
1483
  "div",
@@ -1439,7 +1486,7 @@ const Mt = z(function({
1439
1486
  className: "rmap-volume-container",
1440
1487
  "data-placement": e,
1441
1488
  "data-testid": "volume-slider",
1442
- style: p,
1489
+ style: l,
1443
1490
  children: /* @__PURE__ */ i("div", { className: "rmap-volume-panel", children: /* @__PURE__ */ i(
1444
1491
  "input",
1445
1492
  {
@@ -1452,37 +1499,37 @@ const Mt = z(function({
1452
1499
  max: "1",
1453
1500
  step: "0.01",
1454
1501
  "aria-label": r ? "Volume (muted)" : "Volume",
1455
- "aria-valuetext": `${u} percent`
1502
+ "aria-valuetext": `${m} percent`
1456
1503
  }
1457
1504
  ) })
1458
1505
  }
1459
1506
  );
1460
- }, ue = $(null);
1507
+ }, ue = H(null);
1461
1508
  ue.displayName = "DropdownContext";
1462
- const Je = ({
1509
+ const Ze = ({
1463
1510
  clickArea: e,
1464
1511
  triggerType: t,
1465
1512
  isOpen: o,
1466
1513
  setIsOpen: r,
1467
1514
  onOpenChange: a
1468
1515
  }) => {
1469
- const s = E(), n = (p) => {
1470
- const m = () => {
1516
+ const s = A(), n = (l) => {
1517
+ const y = () => {
1471
1518
  clearTimeout(s.current), s.current = void 0;
1472
- }, d = (y) => {
1473
- r(y), a && a(y), m();
1519
+ }, u = (p) => {
1520
+ r(p), a && a(p), y();
1474
1521
  };
1475
- if (m(), p) {
1476
- s.current = window.setTimeout(() => d(!0), 100);
1522
+ if (y(), l) {
1523
+ s.current = window.setTimeout(() => u(!0), 100);
1477
1524
  return;
1478
1525
  }
1479
- s.current = window.setTimeout(() => d(!1), 100);
1480
- }, c = (p) => {
1481
- t === "hover" && n(p);
1526
+ s.current = window.setTimeout(() => u(!1), 100);
1527
+ }, c = (l) => {
1528
+ t === "hover" && n(l);
1482
1529
  };
1483
1530
  return {
1484
- onClick: e === "content" ? (p) => {
1485
- p.stopPropagation(), p.nativeEvent.stopImmediatePropagation();
1531
+ onClick: e === "content" ? (l) => {
1532
+ l.stopPropagation(), l.nativeEvent.stopImmediatePropagation();
1486
1533
  } : () => {
1487
1534
  t === "click" && (r(!o), a && a(!o));
1488
1535
  },
@@ -1502,40 +1549,40 @@ const Je = ({
1502
1549
  onOpenChange: n,
1503
1550
  "data-testid": c
1504
1551
  }) => {
1505
- const l = E(null), [u, p] = te.Children.toArray(o), [m, d] = k(!1), y = Je({
1506
- setIsOpen: d,
1507
- isOpen: m,
1552
+ const d = A(null), [m, l] = te.Children.toArray(o), [y, u] = C(!1), p = Ze({
1553
+ setIsOpen: u,
1554
+ isOpen: y,
1508
1555
  triggerType: e,
1509
1556
  clickArea: "root"
1510
- }), v = ke();
1511
- qe(l, () => t && d(!1)), A(() => {
1512
- r !== void 0 && d(r);
1557
+ }), T = Ne();
1558
+ Ye(d, () => t && u(!1)), E(() => {
1559
+ r !== void 0 && u(r);
1513
1560
  }, [r]);
1514
- const h = D(
1561
+ const v = D(
1515
1562
  () => ({
1516
- dropdownRef: l,
1563
+ dropdownRef: d,
1517
1564
  placement: a,
1518
- isOpen: m,
1519
- setIsOpen: d,
1565
+ isOpen: y,
1566
+ setIsOpen: u,
1520
1567
  onOpenChange: n,
1521
- dropdownId: v
1568
+ dropdownId: T
1522
1569
  }),
1523
- [a, m, n, v]
1570
+ [a, y, n, T]
1524
1571
  );
1525
- return /* @__PURE__ */ i(ue.Provider, { value: h, children: /* @__PURE__ */ i(
1572
+ return /* @__PURE__ */ i(ue.Provider, { value: v, children: /* @__PURE__ */ i(
1526
1573
  "div",
1527
1574
  {
1528
1575
  className: "rmap-dropdown-container",
1529
- ref: l,
1576
+ ref: d,
1530
1577
  "data-testid": c,
1531
- ...y,
1532
- children: /* @__PURE__ */ S(R, { children: [
1533
- u,
1534
- !s && p
1578
+ ...p,
1579
+ children: /* @__PURE__ */ w(z, { children: [
1580
+ m,
1581
+ !s && l
1535
1582
  ] })
1536
1583
  }
1537
1584
  ) });
1538
- }, Rt = (e, t) => D(() => {
1585
+ }, Wt = (e, t) => D(() => {
1539
1586
  if (t)
1540
1587
  return {
1541
1588
  position: "absolute",
@@ -1546,29 +1593,29 @@ const Je = ({
1546
1593
  left: e === "right" ? `${t.width}px` : void 0,
1547
1594
  right: e === "left" ? `${t.width}px` : void 0
1548
1595
  };
1549
- }, [t, e]), zt = ({
1596
+ }, [t, e]), Gt = ({
1550
1597
  children: e,
1551
1598
  isWithAnimation: t = !0,
1552
1599
  ...o
1553
1600
  }) => {
1554
- const { dropdownRef: r, placement: a, isOpen: s, setIsOpen: n, dropdownId: c } = f(ue), [l, u] = k(), { onClick: p } = Je({
1601
+ const { dropdownRef: r, placement: a, isOpen: s, setIsOpen: n, dropdownId: c } = g(ue), [d, m] = C(), { onClick: l } = Ze({
1555
1602
  setIsOpen: n,
1556
1603
  isOpen: s,
1557
1604
  clickArea: "content"
1558
- }), m = () => n(!1), d = () => n(!0);
1559
- A(() => {
1560
- r.current && u({
1605
+ }), y = () => n(!1), u = () => n(!0);
1606
+ E(() => {
1607
+ r.current && m({
1561
1608
  width: r.current.offsetWidth,
1562
1609
  height: r.current.offsetHeight
1563
1610
  });
1564
1611
  }, [r]);
1565
- const y = Rt(a, l), v = l ? /* @__PURE__ */ i(
1612
+ const p = Wt(a, d), T = d ? /* @__PURE__ */ i(
1566
1613
  "div",
1567
1614
  {
1568
1615
  ...o,
1569
1616
  id: c,
1570
- style: { ...y, ...o.style },
1571
- onClick: p,
1617
+ style: { ...p, ...o.style },
1618
+ onClick: l,
1572
1619
  children: e
1573
1620
  }
1574
1621
  ) : null;
@@ -1580,36 +1627,36 @@ const Je = ({
1580
1627
  enterTime: 20,
1581
1628
  leaveTime: 60,
1582
1629
  clearTime: 300,
1583
- onExited: m,
1584
- onEntered: d,
1585
- children: v
1630
+ onExited: y,
1631
+ onEntered: u,
1632
+ children: T
1586
1633
  }
1587
- ) : s ? v : null;
1588
- }, Wt = ({ children: e }) => {
1589
- const { isOpen: t, setIsOpen: o, dropdownId: r } = f(ue);
1634
+ ) : s ? T : null;
1635
+ }, et = ve(({ children: e, className: t, ...o }, r) => {
1636
+ const { isOpen: a, dropdownId: s } = g(ue), n = t ? `rmap-dropdown-trigger ${t}` : "rmap-dropdown-trigger";
1590
1637
  return /* @__PURE__ */ i(
1591
- "div",
1638
+ q,
1592
1639
  {
1593
- className: "rmap-dropdown-trigger",
1594
- role: "button",
1595
- tabIndex: 0,
1596
- "aria-expanded": t,
1597
- "aria-controls": r,
1598
- onKeyDown: (s) => {
1599
- (s.key === "Enter" || s.key === " ") && (s.preventDefault(), o((n) => !n));
1600
- },
1640
+ className: n,
1641
+ type: "button",
1642
+ ...o,
1643
+ "aria-haspopup": "true",
1644
+ "aria-expanded": a,
1645
+ "aria-controls": s,
1646
+ ref: r,
1601
1647
  children: e
1602
1648
  }
1603
1649
  );
1604
- };
1605
- ie.Content = zt;
1606
- ie.Trigger = Wt;
1607
- const Gt = ({
1650
+ });
1651
+ et.displayName = "DropdownTrigger";
1652
+ ie.Content = Gt;
1653
+ ie.Trigger = et;
1654
+ const jt = ({
1608
1655
  triggerRef: e,
1609
1656
  initialState: t
1610
1657
  }) => {
1611
- const { playerPlacement: o } = O(), [r, a] = k(t);
1612
- return A(() => {
1658
+ const { playerPlacement: o } = O(), [r, a] = C(t);
1659
+ return E(() => {
1613
1660
  if (e.current) {
1614
1661
  const s = () => e.current.getBoundingClientRect().top < window.innerHeight / 2 ? "bottom" : "top", n = setTimeout(() => {
1615
1662
  a(s());
@@ -1619,84 +1666,99 @@ const Gt = ({
1619
1666
  };
1620
1667
  }
1621
1668
  }, [o, e]), r;
1622
- }, jt = () => {
1623
- const e = E(null), {
1624
- activeUI: { volumeSlider: t },
1625
- volumeSliderPlacement: o
1626
- } = O(), r = Gt({
1669
+ }, qt = () => {
1670
+ const e = A(null), { muted: t } = b(), o = g(P), r = f(
1671
+ () => o({ type: "SET_MUTED", muted: !t }),
1672
+ [o, t]
1673
+ ), {
1674
+ activeUI: { volumeSlider: a },
1675
+ volumeSliderPlacement: s
1676
+ } = O(), n = jt({
1627
1677
  triggerRef: e,
1628
1678
  initialState: "bottom"
1629
1679
  });
1630
- return /* @__PURE__ */ S(
1680
+ return /* @__PURE__ */ w(
1631
1681
  ie,
1632
1682
  {
1633
- placement: o || r,
1683
+ placement: s || n,
1634
1684
  triggerType: "hover",
1635
- disabled: t === !1,
1685
+ disabled: a === !1,
1636
1686
  "data-testid": "volume-dropdown",
1637
1687
  children: [
1638
- /* @__PURE__ */ i(ie.Trigger, { children: /* @__PURE__ */ i(je, { ref: e }) }),
1688
+ /* @__PURE__ */ i(
1689
+ ie.Trigger,
1690
+ {
1691
+ ref: e,
1692
+ "aria-label": t ? "Unmute" : "Mute",
1693
+ "aria-pressed": t,
1694
+ onClick: r,
1695
+ className: "rmap-volume-trigger",
1696
+ "data-testid": "volume-trigger-btn",
1697
+ "data-muted": String(t),
1698
+ children: /* @__PURE__ */ i(qe, {})
1699
+ }
1700
+ ),
1639
1701
  /* @__PURE__ */ i(ie.Content, { role: "tooltip", children: /* @__PURE__ */ i(
1640
- Ht,
1702
+ zt,
1641
1703
  {
1642
- placement: o || r
1704
+ placement: s || n
1643
1705
  }
1644
1706
  ) })
1645
1707
  ]
1646
1708
  }
1647
1709
  );
1648
- }, qt = () => {
1649
- var r, a, s, n, c, l, u, p, m, d;
1710
+ }, Yt = () => {
1711
+ var r, a, s, n, c, d, m, l, y, u;
1650
1712
  const { interfacePlacement: e, activeUI: t } = O(), o = !!(t.prevNnext ?? t.all);
1651
- return /* @__PURE__ */ S(R, { children: [
1713
+ return /* @__PURE__ */ w(z, { children: [
1652
1714
  /* @__PURE__ */ i(
1653
1715
  M.Item,
1654
1716
  {
1655
- gridArea: ((r = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : r.progress) || ((a = e == null ? void 0 : e.templateArea) == null ? void 0 : a.progress) || L.templateArea.progress,
1717
+ gridArea: ((r = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : r.progress) || ((a = e == null ? void 0 : e.templateArea) == null ? void 0 : a.progress) || N.templateArea.progress,
1656
1718
  width: "100%",
1657
1719
  visible: !!(t.progress !== void 0 ? t.progress : t.all),
1658
- children: /* @__PURE__ */ i($t, {})
1720
+ children: /* @__PURE__ */ i(Rt, {})
1659
1721
  }
1660
1722
  ),
1661
1723
  /* @__PURE__ */ i(
1662
1724
  M.Item,
1663
1725
  {
1664
- gridArea: ((s = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : s.repeatType) || ((n = e == null ? void 0 : e.templateArea) == null ? void 0 : n.repeatType) || L.templateArea.repeatType,
1726
+ gridArea: ((s = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : s.repeatType) || ((n = e == null ? void 0 : e.templateArea) == null ? void 0 : n.repeatType) || N.templateArea.repeatType,
1665
1727
  visible: !!(t.repeatType ?? t.all),
1666
- children: /* @__PURE__ */ i(Pt, {})
1728
+ children: /* @__PURE__ */ i(Lt, {})
1667
1729
  }
1668
1730
  ),
1669
1731
  /* @__PURE__ */ i(
1670
1732
  M.Item,
1671
1733
  {
1672
- gridArea: ((c = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : c.playButton) || ((l = e == null ? void 0 : e.templateArea) == null ? void 0 : l.playButton) || L.templateArea.playButton,
1734
+ gridArea: ((c = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : c.playButton) || ((d = e == null ? void 0 : e.templateArea) == null ? void 0 : d.playButton) || N.templateArea.playButton,
1673
1735
  visible: !!(t.playButton ?? t.all),
1674
- children: /* @__PURE__ */ S("div", { className: "rmap-ctrl-btn-wrapper", children: [
1675
- /* @__PURE__ */ i(At, { isVisible: o }),
1736
+ children: /* @__PURE__ */ w("div", { className: "rmap-ctrl-btn-wrapper", children: [
1737
+ /* @__PURE__ */ i(It, { isVisible: o }),
1676
1738
  /* @__PURE__ */ i(Et, {}),
1677
- /* @__PURE__ */ i(It, { isVisible: o })
1739
+ /* @__PURE__ */ i(St, { isVisible: o })
1678
1740
  ] })
1679
1741
  }
1680
1742
  ),
1681
1743
  /* @__PURE__ */ i(
1682
1744
  M.Item,
1683
1745
  {
1684
- gridArea: ((u = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : u.volume) || ((p = e == null ? void 0 : e.templateArea) == null ? void 0 : p.volume) || L.templateArea.volume,
1746
+ gridArea: ((m = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : m.volume) || ((l = e == null ? void 0 : e.templateArea) == null ? void 0 : l.volume) || N.templateArea.volume,
1685
1747
  visible: !!(t.volume ?? t.all),
1686
- children: /* @__PURE__ */ i(jt, {})
1748
+ children: /* @__PURE__ */ i(qt, {})
1687
1749
  }
1688
1750
  ),
1689
1751
  /* @__PURE__ */ i(
1690
1752
  M.Item,
1691
1753
  {
1692
- gridArea: ((m = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : m.playList) || ((d = e == null ? void 0 : e.templateArea) == null ? void 0 : d.playList) || L.templateArea.playList,
1754
+ gridArea: ((y = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : y.playList) || ((u = e == null ? void 0 : e.templateArea) == null ? void 0 : u.playList) || N.templateArea.playList,
1693
1755
  visible: !!(t.playList ?? t.all),
1694
- children: /* @__PURE__ */ i(Ot, {})
1756
+ children: /* @__PURE__ */ i(Ut, {})
1695
1757
  }
1696
1758
  )
1697
1759
  ] });
1698
- }, Yt = z(function() {
1699
- const { playList: t, curIdx: o } = V(), { coverImgsCss: r } = P(), a = t[o], s = [a == null ? void 0 : a.writer, a == null ? void 0 : a.name].filter(Boolean).join(" - ") || "Album artwork";
1760
+ }, Xt = W(function() {
1761
+ const { playList: t, curIdx: o } = V(), { coverImgsCss: r } = L(), a = t[o], s = [a == null ? void 0 : a.writer, a == null ? void 0 : a.name].filter(Boolean).join(" - ") || "Album artwork";
1700
1762
  return /* @__PURE__ */ i("div", { className: "rmap-artwork-container", children: a != null && a.img ? /* @__PURE__ */ i("img", { src: a.img, alt: s, style: r == null ? void 0 : r.artwork }) : /* @__PURE__ */ i(
1701
1763
  "div",
1702
1764
  {
@@ -1707,13 +1769,13 @@ const Gt = ({
1707
1769
  children: (a == null ? void 0 : a.name) || "♪"
1708
1770
  }
1709
1771
  ) });
1710
- }), Xt = z(function() {
1772
+ }), Qt = W(function() {
1711
1773
  const { playList: t, curIdx: o } = V(), r = t[o];
1712
- return /* @__PURE__ */ i("div", { className: "rmap-track-info-container", children: r != null && r.customTrackInfo ? r.customTrackInfo : /* @__PURE__ */ S(R, { children: [
1774
+ return /* @__PURE__ */ i("div", { className: "rmap-track-info-container", children: r != null && r.customTrackInfo ? r.customTrackInfo : /* @__PURE__ */ w(z, { children: [
1713
1775
  (r == null ? void 0 : r.name) && /* @__PURE__ */ i("span", { className: "title", "data-testid": "track-title", children: r.name }),
1714
1776
  (r == null ? void 0 : r.writer) && /* @__PURE__ */ i("span", { className: "writer", children: r.writer })
1715
1777
  ] }) });
1716
- }), Ze = ({ position: e, className: t, children: o, ...r }) => /* @__PURE__ */ i(
1778
+ }), tt = ({ position: e, className: t, children: o, ...r }) => /* @__PURE__ */ i(
1717
1779
  "div",
1718
1780
  {
1719
1781
  className: `rmap-track-time-container${t ? ` ${t}` : ""}`,
@@ -1721,9 +1783,9 @@ const Gt = ({
1721
1783
  ...r,
1722
1784
  children: o
1723
1785
  }
1724
- ), Qt = ({ position: e }) => {
1786
+ ), Jt = ({ position: e }) => {
1725
1787
  const { currentTime: t } = re();
1726
- return /* @__PURE__ */ i(Ze, { position: e, className: "rmap-track-time-current", children: /* @__PURE__ */ i(
1788
+ return /* @__PURE__ */ i(tt, { position: e, className: "rmap-track-time-current", children: /* @__PURE__ */ i(
1727
1789
  "span",
1728
1790
  {
1729
1791
  className: "rmap-track-current-time",
@@ -1731,28 +1793,28 @@ const Gt = ({
1731
1793
  children: ee(t)
1732
1794
  }
1733
1795
  ) });
1734
- }, Jt = ({ position: e }) => {
1796
+ }, Zt = ({ position: e }) => {
1735
1797
  const { duration: t } = re();
1736
1798
  return /* @__PURE__ */ i(
1737
- Ze,
1799
+ tt,
1738
1800
  {
1739
1801
  position: e,
1740
1802
  className: "rmap-track-time-duration",
1741
1803
  children: /* @__PURE__ */ i("span", { className: "rmap-track-duration", children: ee(t) })
1742
1804
  }
1743
1805
  );
1744
- }, Zt = () => {
1745
- var c, l, u, p, m, d, y, v;
1746
- const { interfacePlacement: e, activeUI: t } = O(), o = T(
1747
- (h) => +h.split(/[^\d]/).join(""),
1806
+ }, er = () => {
1807
+ var c, d, m, l, y, u, p, T;
1808
+ const { interfacePlacement: e, activeUI: t } = O(), o = f(
1809
+ (v) => +v.split(/[^\d]/).join(""),
1748
1810
  []
1749
1811
  ), r = o(
1750
- ((c = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : c.trackTimeCurrent) || ((l = e == null ? void 0 : e.templateArea) == null ? void 0 : l.trackTimeCurrent) || L.templateArea.trackTimeCurrent
1812
+ ((c = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : c.trackTimeCurrent) || ((d = e == null ? void 0 : e.templateArea) == null ? void 0 : d.trackTimeCurrent) || N.templateArea.trackTimeCurrent
1751
1813
  ), a = o(
1752
- ((u = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : u.trackTimeDuration) || ((p = e == null ? void 0 : e.templateArea) == null ? void 0 : p.trackTimeDuration) || L.templateArea.trackTimeDuration
1753
- ), s = T(
1754
- (h) => {
1755
- switch (h) {
1814
+ ((m = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : m.trackTimeDuration) || ((l = e == null ? void 0 : e.templateArea) == null ? void 0 : l.trackTimeDuration) || N.templateArea.trackTimeDuration
1815
+ ), s = f(
1816
+ (v) => {
1817
+ switch (v) {
1756
1818
  case 1:
1757
1819
  return "right";
1758
1820
  case -1:
@@ -1766,138 +1828,138 @@ const Gt = ({
1766
1828
  current: s(r - a),
1767
1829
  duration: s(a - r)
1768
1830
  };
1769
- return /* @__PURE__ */ S(R, { children: [
1831
+ return /* @__PURE__ */ w(z, { children: [
1770
1832
  /* @__PURE__ */ i(
1771
1833
  M.Item,
1772
1834
  {
1773
- gridArea: ((m = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : m.trackTimeCurrent) || ((d = e == null ? void 0 : e.templateArea) == null ? void 0 : d.trackTimeCurrent) || L.templateArea.trackTimeCurrent,
1835
+ gridArea: ((y = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : y.trackTimeCurrent) || ((u = e == null ? void 0 : e.templateArea) == null ? void 0 : u.trackTimeCurrent) || N.templateArea.trackTimeCurrent,
1774
1836
  visible: !!(t.trackTime ?? t.all),
1775
- children: /* @__PURE__ */ i(Qt, { position: n.current })
1837
+ children: /* @__PURE__ */ i(Jt, { position: n.current })
1776
1838
  }
1777
1839
  ),
1778
1840
  /* @__PURE__ */ i(
1779
1841
  M.Item,
1780
1842
  {
1781
- gridArea: ((y = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : y.trackTimeDuration) || ((v = e == null ? void 0 : e.templateArea) == null ? void 0 : v.trackTimeDuration) || L.templateArea.trackTimeDuration,
1843
+ gridArea: ((p = e == null ? void 0 : e.itemCustomArea) == null ? void 0 : p.trackTimeDuration) || ((T = e == null ? void 0 : e.templateArea) == null ? void 0 : T.trackTimeDuration) || N.templateArea.trackTimeDuration,
1782
1844
  visible: !!(t.trackTime ?? t.all),
1783
- children: /* @__PURE__ */ i(Jt, { position: n.duration })
1845
+ children: /* @__PURE__ */ i(Zt, { position: n.duration })
1784
1846
  }
1785
1847
  )
1786
1848
  ] });
1787
- }, er = () => {
1788
- var s, n, c, l, u, p, m, d;
1849
+ }, tr = () => {
1850
+ var s, n, c, d, m, l, y, u;
1789
1851
  const { playList: e, curIdx: t } = V(), { interfacePlacement: o, activeUI: r } = O(), a = !!(((s = e[t]) == null ? void 0 : s.customTrackInfo) ?? ((n = e[t]) == null ? void 0 : n.writer) ?? ((c = e[t]) == null ? void 0 : c.name)) && !!(r.trackInfo ?? r.all);
1790
- return /* @__PURE__ */ S(R, { children: [
1852
+ return /* @__PURE__ */ w(z, { children: [
1791
1853
  /* @__PURE__ */ i(
1792
1854
  M.Item,
1793
1855
  {
1794
- gridArea: ((l = o == null ? void 0 : o.itemCustomArea) == null ? void 0 : l.artwork) || ((u = o == null ? void 0 : o.templateArea) == null ? void 0 : u.artwork) || L.templateArea.artwork,
1795
- visible: !!((p = e[t]) != null && p.img && (r.artwork ?? r.all)),
1796
- children: /* @__PURE__ */ i(Yt, {})
1856
+ gridArea: ((d = o == null ? void 0 : o.itemCustomArea) == null ? void 0 : d.artwork) || ((m = o == null ? void 0 : o.templateArea) == null ? void 0 : m.artwork) || N.templateArea.artwork,
1857
+ visible: !!((l = e[t]) != null && l.img && (r.artwork ?? r.all)),
1858
+ children: /* @__PURE__ */ i(Xt, {})
1797
1859
  }
1798
1860
  ),
1799
1861
  /* @__PURE__ */ i(
1800
1862
  M.Item,
1801
1863
  {
1802
- gridArea: ((m = o == null ? void 0 : o.itemCustomArea) == null ? void 0 : m.trackInfo) || ((d = o == null ? void 0 : o.templateArea) == null ? void 0 : d.trackInfo) || L.templateArea.trackInfo,
1864
+ gridArea: ((y = o == null ? void 0 : o.itemCustomArea) == null ? void 0 : y.trackInfo) || ((u = o == null ? void 0 : o.templateArea) == null ? void 0 : u.trackInfo) || N.templateArea.trackInfo,
1803
1865
  visible: a,
1804
- children: /* @__PURE__ */ i(Xt, {})
1866
+ children: /* @__PURE__ */ i(Qt, {})
1805
1867
  }
1806
1868
  ),
1807
- /* @__PURE__ */ i(Zt, {})
1869
+ /* @__PURE__ */ i(er, {})
1808
1870
  ] });
1809
- }, tr = (e, t, o) => {
1810
- const r = T(
1811
- (d, y, v) => {
1812
- const h = Object.keys(
1813
- L.templateArea
1814
- ).filter((I) => (I === "trackTimeCurrent" || I === "trackTimeDuration") && d.trackTime === !1 ? !1 : d[I] !== void 0 ? d[I] : !0), g = d.all ? h : Object.entries(d).filter(([, I]) => I).map(([I]) => I);
1871
+ }, rr = (e, t, o) => {
1872
+ const r = f(
1873
+ (u, p, T) => {
1874
+ const v = Object.keys(
1875
+ N.templateArea
1876
+ ).filter((I) => (I === "trackTimeCurrent" || I === "trackTimeDuration") && u.trackTime === !1 ? !1 : u[I] !== void 0 ? u[I] : !0), h = u.all ? v : Object.entries(u).filter(([, I]) => I).map(([I]) => I);
1815
1877
  (() => {
1816
- g.find((I) => I === "trackTime") && (g.splice(g.indexOf("trackTime"), 1), g.push("trackTimeCurrent"), g.push("trackTimeDuration"));
1878
+ h.find((I) => I === "trackTime") && (h.splice(h.indexOf("trackTime"), 1), h.push("trackTimeCurrent"), h.push("trackTimeDuration"));
1817
1879
  })();
1818
- const N = {
1819
- ...L.templateArea,
1820
- ...y
1821
- }, W = Object.entries(
1822
- N
1823
- ).filter(([I]) => g.includes(I));
1824
- let H = 1;
1880
+ const k = {
1881
+ ...N.templateArea,
1882
+ ...p
1883
+ }, B = Object.entries(
1884
+ k
1885
+ ).filter(([I]) => h.includes(I));
1886
+ let R = 1;
1825
1887
  const G = {}, ae = [
1826
- ...W,
1827
- ...Object.entries(v || {})
1888
+ ...B,
1889
+ ...Object.entries(T || {})
1828
1890
  ].flatMap(([I, _]) => {
1829
1891
  if (_ == null) return [];
1830
- const [B, K] = _.split("-"), j = +B.split("row")[1];
1831
- return H = Math.max(H, j), G[j] = G[j] ? G[j] + 1 : 1, [
1892
+ const [K, $] = _.split("-"), j = +K.split("row")[1];
1893
+ return R = Math.max(R, j), G[j] = G[j] ? G[j] + 1 : 1, [
1832
1894
  {
1833
1895
  key: I,
1834
1896
  row: j,
1835
- col: +K
1897
+ col: +$
1836
1898
  }
1837
1899
  ];
1838
1900
  }).sort((I, _) => I.col - _.col), X = Math.max(...Object.values(G));
1839
1901
  let oe;
1840
- const et = new Array(H).fill("").map((I, _) => {
1841
- let B = "", K;
1842
- const j = ae.filter((U) => U.row !== _ + 1 ? !1 : (U.key === "progress" && (K = U), !0));
1843
- if (K) {
1902
+ const rt = new Array(R).fill("").map((I, _) => {
1903
+ let K = "", $;
1904
+ const j = ae.filter((U) => U.row !== _ + 1 ? !1 : (U.key === "progress" && ($ = U), !0));
1905
+ if ($) {
1844
1906
  const U = /* @__PURE__ */ new Map();
1845
1907
  j.forEach((Q) => U.set(Q.col, Q));
1846
- const de = `row${_ + 1}-${K.col}`, ne = [];
1908
+ const de = `row${_ + 1}-${$.col}`, ne = [];
1847
1909
  for (let Q = 0; Q < X; Q++) {
1848
1910
  const Pe = Q + 1;
1849
1911
  U.has(Pe) ? ne.push(`row${_ + 1}-${Pe}`) : ne.push(de);
1850
1912
  }
1851
- const at = ne.indexOf(de), ot = ne.lastIndexOf(de);
1852
- oe = Math.floor((at + ot) / 2), B = " " + ne.join(" ");
1913
+ const nt = ne.indexOf(de), st = ne.lastIndexOf(de);
1914
+ oe = Math.floor((nt + st) / 2), K = " " + ne.join(" ");
1853
1915
  } else
1854
1916
  for (let U = 0; U < X; U++)
1855
- B += ` row${_ + 1}-${U + 1}`;
1856
- return B.trimStart();
1857
- }), tt = Ye ? window.innerWidth - 100 : 1500, rt = new Array(H).fill("").map((I, _) => {
1858
- let B = "";
1859
- for (let K = 0; K < X; K++) {
1860
- if (oe === K && _ === 0) {
1861
- B += " 1fr";
1917
+ K += ` row${_ + 1}-${U + 1}`;
1918
+ return K.trimStart();
1919
+ }), at = Xe ? window.innerWidth - 100 : 1500, ot = new Array(R).fill("").map((I, _) => {
1920
+ let K = "";
1921
+ for (let $ = 0; $ < X; $++) {
1922
+ if (oe === $ && _ === 0) {
1923
+ K += " 1fr";
1862
1924
  continue;
1863
1925
  }
1864
- B += ` fit-content(${tt}px)`;
1926
+ K += ` fit-content(${at}px)`;
1865
1927
  }
1866
- return B.trimStart();
1928
+ return K.trimStart();
1867
1929
  });
1868
- return { gridAreas: et, gridColumns: rt };
1930
+ return { gridAreas: rt, gridColumns: ot };
1869
1931
  },
1870
1932
  []
1871
- ), [a, s] = k(e), [n, c] = k({
1933
+ ), [a, s] = C(e), [n, c] = C({
1872
1934
  templateArea: t,
1873
1935
  customComponentsArea: o
1874
- }), [l, u] = k();
1875
- if (!l) {
1876
- const { gridAreas: d, gridColumns: y } = r(
1936
+ }), [d, m] = C();
1937
+ if (!d) {
1938
+ const { gridAreas: u, gridColumns: p } = r(
1877
1939
  a,
1878
1940
  n.templateArea,
1879
1941
  n.customComponentsArea
1880
1942
  );
1881
- return u({ gridAreas: d, gridColumns: y }), [d, y];
1943
+ return m({ gridAreas: u, gridColumns: p }), [u, p];
1882
1944
  }
1883
1945
  if (a !== e || n.templateArea !== t || n.customComponentsArea !== o) {
1884
1946
  s(e), c({ templateArea: t, customComponentsArea: o });
1885
- const { gridAreas: d, gridColumns: y } = r(
1947
+ const { gridAreas: u, gridColumns: p } = r(
1886
1948
  e,
1887
1949
  t,
1888
1950
  o
1889
1951
  );
1890
- u({ gridAreas: d, gridColumns: y });
1952
+ m({ gridAreas: u, gridColumns: p });
1891
1953
  }
1892
- const { gridAreas: p, gridColumns: m } = l;
1893
- return [p, m];
1894
- }, rr = ({ children: e }) => {
1895
- const { interfacePlacement: t, activeUI: o, playListPlacement: r } = O(), a = te.Children.toArray(e), [s, n] = tr(
1954
+ const { gridAreas: l, gridColumns: y } = d;
1955
+ return [l, y];
1956
+ }, ar = ({ children: e }) => {
1957
+ const { interfacePlacement: t, activeUI: o, playListPlacement: r } = O(), a = te.Children.toArray(e), [s, n] = rr(
1896
1958
  o,
1897
1959
  t == null ? void 0 : t.templateArea,
1898
1960
  t == null ? void 0 : t.customComponentsArea
1899
1961
  );
1900
- return /* @__PURE__ */ S(
1962
+ return /* @__PURE__ */ w(
1901
1963
  "div",
1902
1964
  {
1903
1965
  className: "rmap-interface-container",
@@ -1906,7 +1968,7 @@ const Gt = ({
1906
1968
  "aria-label": "Audio player",
1907
1969
  children: [
1908
1970
  r === "top" && /* @__PURE__ */ i("div", { className: "rmap-sortable-playlist" }),
1909
- /* @__PURE__ */ S(
1971
+ /* @__PURE__ */ w(
1910
1972
  M,
1911
1973
  {
1912
1974
  alignItems: "center",
@@ -1916,8 +1978,8 @@ const Gt = ({
1916
1978
  columns: n,
1917
1979
  UNSAFE_className: "rmap-interface-grid",
1918
1980
  children: [
1919
- /* @__PURE__ */ i(er, {}),
1920
- /* @__PURE__ */ i(qt, {}),
1981
+ /* @__PURE__ */ i(tr, {}),
1982
+ /* @__PURE__ */ i(Yt, {}),
1921
1983
  a
1922
1984
  ]
1923
1985
  }
@@ -1927,14 +1989,14 @@ const Gt = ({
1927
1989
  }
1928
1990
  );
1929
1991
  }, Z = (e, t) => {
1930
- const o = E(!1);
1931
- A(() => {
1992
+ const o = A(!1);
1993
+ E(() => {
1932
1994
  if (o.current)
1933
1995
  return e();
1934
- }, t), A(() => (o.current = !0, () => {
1996
+ }, t), E(() => (o.current = !0, () => {
1935
1997
  o.current = !1;
1936
1998
  }), []);
1937
- }, ar = ({
1999
+ }, or = ({
1938
2000
  placement: e = {},
1939
2001
  activeUI: t,
1940
2002
  coverImgsCss: o,
@@ -1942,20 +2004,20 @@ const Gt = ({
1942
2004
  playList: a,
1943
2005
  customIcons: s
1944
2006
  }) => {
1945
- const n = f(w);
2007
+ const n = g(P);
1946
2008
  Z(() => {
1947
2009
  const {
1948
2010
  player: c,
1949
- playList: l,
1950
- interface: u,
1951
- volumeSlider: p
2011
+ playList: d,
2012
+ interface: m,
2013
+ volumeSlider: l
1952
2014
  } = e;
1953
2015
  n({
1954
2016
  type: "SET_PLACEMENTS",
1955
2017
  playerPlacement: c,
1956
- playListPlacement: l,
1957
- interfacePlacement: u,
1958
- volumeSliderPlacement: p
2018
+ playListPlacement: d,
2019
+ interfacePlacement: m,
2020
+ volumeSliderPlacement: l
1959
2021
  });
1960
2022
  }, [n, e]), Z(() => {
1961
2023
  t && n({ type: "SET_ACTIVE_UI", activeUI: t });
@@ -1972,49 +2034,49 @@ const Gt = ({
1972
2034
  }, [n, a]), Z(() => {
1973
2035
  s && n({ type: "SET_CUSTOM_ICONS", customIcons: s });
1974
2036
  }, [s, n]);
1975
- }, or = ({
2037
+ }, nr = ({
1976
2038
  audioRef: e,
1977
2039
  children: t,
1978
2040
  ...o
1979
- }) => (ar(o), /* @__PURE__ */ S("div", { id: "rm-audio-player", className: "rmap-player-container", children: [
1980
- /* @__PURE__ */ i(_e, { audioRef: e }),
1981
- /* @__PURE__ */ i(rr, { children: t })
2041
+ }) => (or(o), /* @__PURE__ */ w("div", { id: "rm-audio-player", className: "rmap-player-container", children: [
2042
+ /* @__PURE__ */ i(De, { audioRef: e }),
2043
+ /* @__PURE__ */ i(ar, { children: t })
1982
2044
  ] }));
1983
2045
  function we({
1984
2046
  rootContainerProps: e,
1985
2047
  ...t
1986
2048
  }) {
1987
- return /* @__PURE__ */ i(yt, { ...t, children: /* @__PURE__ */ i(Ce, { rootContainerProps: e, children: /* @__PURE__ */ i(or, { ...t }) }) });
2049
+ return /* @__PURE__ */ i(vt, { ...t, children: /* @__PURE__ */ i(Me, { rootContainerProps: e, children: /* @__PURE__ */ i(nr, { ...t }) }) });
1988
2050
  }
1989
2051
  we.displayName = "AudioPlayerWithProviders";
1990
- we.CustomComponent = xe;
1991
- const nr = () => {
1992
- const e = f(w), { isPlaying: t, repeatType: o } = b(), r = T(() => {
2052
+ we.CustomComponent = _e;
2053
+ const sr = () => {
2054
+ const e = g(P), { isPlaying: t, repeatType: o } = b(), r = f(() => {
1993
2055
  e({ type: "CHANGE_PLAYING_STATE", state: !0 });
1994
- }, [e]), a = T(() => {
2056
+ }, [e]), a = f(() => {
1995
2057
  e({ type: "CHANGE_PLAYING_STATE", state: !1 });
1996
- }, [e]), s = T(() => {
2058
+ }, [e]), s = f(() => {
1997
2059
  e({ type: "CHANGE_PLAYING_STATE" });
1998
2060
  }, [e]);
1999
2061
  return { isPlaying: t, repeatType: o, play: r, pause: a, togglePlay: s };
2000
- }, sr = () => {
2001
- const e = f(w), { playList: t, curIdx: o, curPlayId: r } = V(), { elementRefs: a } = P(), s = T(
2002
- (l) => {
2003
- const u = t[l];
2004
- u && e({
2062
+ }, ir = () => {
2063
+ const e = g(P), { playList: t, curIdx: o, curPlayId: r } = V(), { elementRefs: a } = L(), s = f(
2064
+ (d) => {
2065
+ const m = t[d];
2066
+ m && e({
2005
2067
  type: "SET_CURRENT_AUDIO",
2006
- currentIndex: l,
2007
- currentAudioId: u.id
2068
+ currentIndex: d,
2069
+ currentAudioId: m.id
2008
2070
  });
2009
2071
  },
2010
2072
  [e, t]
2011
- ), n = T(() => {
2073
+ ), n = f(() => {
2012
2074
  t.length !== 0 && e({ type: "NEXT_AUDIO" });
2013
- }, [e, t.length]), c = T(() => {
2014
- var u;
2075
+ }, [e, t.length]), c = f(() => {
2076
+ var m;
2015
2077
  if (t.length === 0) return;
2016
- const l = ((u = a == null ? void 0 : a.audioEl) == null ? void 0 : u.currentTime) ?? 0;
2017
- e({ type: "PREV_AUDIO", currentTime: l });
2078
+ const d = ((m = a == null ? void 0 : a.audioEl) == null ? void 0 : m.currentTime) ?? 0;
2079
+ e({ type: "PREV_AUDIO", currentTime: d });
2018
2080
  }, [e, t.length, a == null ? void 0 : a.audioEl]);
2019
2081
  return {
2020
2082
  currentPlayId: r,
@@ -2025,26 +2087,26 @@ const nr = () => {
2025
2087
  next: n,
2026
2088
  prev: c
2027
2089
  };
2028
- }, ir = () => {
2029
- const e = f(w), { volume: t, muted: o } = b(), r = T(
2090
+ }, lr = () => {
2091
+ const e = g(P), { volume: t, muted: o } = b(), r = f(
2030
2092
  (s) => {
2031
2093
  e({ type: "SET_VOLUME", volume: s });
2032
2094
  },
2033
2095
  [e]
2034
- ), a = T(() => {
2096
+ ), a = f(() => {
2035
2097
  e({ type: "SET_MUTED", muted: !o });
2036
2098
  }, [e, o]);
2037
2099
  return { volume: t, muted: o, setVolume: r, toggleMute: a };
2038
- }, lr = () => {
2039
- const e = f(w), { currentTime: t, duration: o } = re(), r = T(
2100
+ }, cr = () => {
2101
+ const e = g(P), { currentTime: t, duration: o } = re(), r = f(
2040
2102
  (a) => {
2041
2103
  e({ type: "SEEK", time: a });
2042
2104
  },
2043
2105
  [e]
2044
2106
  );
2045
2107
  return { currentTime: t, duration: o, seek: r };
2046
- }, pr = () => {
2047
- const e = nr(), t = sr(), o = ir(), r = lr();
2108
+ }, yr = () => {
2109
+ const e = sr(), t = ir(), o = lr(), r = cr();
2048
2110
  return {
2049
2111
  isPlaying: e.isPlaying,
2050
2112
  volume: o.volume,
@@ -2065,34 +2127,34 @@ const nr = () => {
2065
2127
  toggleMute: o.toggleMute,
2066
2128
  setTrack: t.setTrack
2067
2129
  };
2068
- }, yr = () => {
2069
- const { elementRefs: e } = P();
2130
+ }, vr = () => {
2131
+ const { elementRefs: e } = L();
2070
2132
  return {
2071
2133
  audioEl: e == null ? void 0 : e.audioEl,
2072
2134
  waveformInst: e == null ? void 0 : e.waveformInst
2073
2135
  };
2074
2136
  };
2075
- we.CustomComponent = xe;
2137
+ we.CustomComponent = _e;
2076
2138
  export {
2077
- or as AudioPlayer,
2078
- Ce as AudioPlayerContainer,
2079
- yt as AudioPlayerStateProvider,
2139
+ nr as AudioPlayer,
2140
+ Me as AudioPlayerContainer,
2141
+ vt as AudioPlayerStateProvider,
2080
2142
  F as DEFAULT_AUDIO_STATE,
2081
- Te as audioAttrsContext,
2082
- w as audioPlayerDispatchContext,
2083
- mt as audioPlayerReducer,
2143
+ he as audioAttrsContext,
2144
+ P as audioPlayerDispatchContext,
2145
+ pt as audioPlayerReducer,
2084
2146
  we as default,
2085
- L as defaultInterfacePlacement,
2086
- mr as defaultInterfacePlacementMaxLength,
2087
- he as playbackContext,
2088
- Ee as resourceContext,
2089
- Ae as timeContext,
2090
- ge as trackContext,
2091
- fe as uiContext,
2092
- pr as useAudioPlayer,
2093
- yr as useAudioPlayerElement,
2094
- nr as useAudioPlayerPlayback,
2095
- lr as useAudioPlayerTime,
2096
- sr as useAudioPlayerTrack,
2097
- ir as useAudioPlayerVolume
2147
+ N as defaultInterfacePlacement,
2148
+ pr as defaultInterfacePlacementMaxLength,
2149
+ Te as playbackContext,
2150
+ Ae as resourceContext,
2151
+ Ee as timeContext,
2152
+ fe as trackContext,
2153
+ ge as uiContext,
2154
+ yr as useAudioPlayer,
2155
+ vr as useAudioPlayerElement,
2156
+ sr as useAudioPlayerPlayback,
2157
+ cr as useAudioPlayerTime,
2158
+ ir as useAudioPlayerTrack,
2159
+ lr as useAudioPlayerVolume
2098
2160
  };