@banou/stub 0.0.54 → 0.0.56

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.
Files changed (62) hide show
  1. package/build/assets/anime-index-Dl2tJrXZ.js +1 -0
  2. package/build/assets/anime-seasons-Egf79hrL.js +1 -0
  3. package/build/assets/{build-mcPaLDi_.js → build-C4wtZmgD.js} +1 -1
  4. package/build/assets/dist-D2Wlyi7R.js +1328 -0
  5. package/build/assets/{preload-helper-BXrbqLIp.js → dist-SwCxXzZD.js} +1 -1
  6. package/build/assets/embed-C1Cncaqj.js +392 -0
  7. package/build/assets/embed-title-DY0iSLZj.js +1 -0
  8. package/build/assets/index-GI3b_BTS.js +2600 -0
  9. package/build/assets/{lib-build-JdIfVZn7.js → lib-build-B7te3F-u.js} +1 -1
  10. package/build/assets/{lib-emotion-react-jsx-runtime.browser.esm-BXK3nCt6.js → lib-emotion-react-jsx-runtime.browser.esm-C5mAgoyK.js} +913 -916
  11. package/build/assets/{lib-remote-Cgazpbxo.js → lib-remote-CszW77_t.js} +1 -1
  12. package/build/assets/lib-remote-DkrdRpDM.js +2 -0
  13. package/build/assets/{lib-theme-player-Ca8vejFM.js → lib-theme-player-w0MKAikK.js} +960 -936
  14. package/build/assets/{lib-worker-Z6aSHw7w.js → lib-worker-DxgAerh1.js} +1 -1
  15. package/build/assets/lib-worker-anime-index-Dl2tJrXZ.js +1 -0
  16. package/build/assets/lib-worker-anime-seasons-Egf79hrL.js +1 -0
  17. package/build/assets/lib-worker-index-uCN9UHKr.js +2600 -0
  18. package/build/assets/{lib-worker-PtOuAkPf.js → lib-worker-uEoF-jLP.js} +3244 -2320
  19. package/build/assets/main-BvwWBTz2.js +5228 -0
  20. package/build/assets/preload-helper-Bx4ePS05.js +1 -0
  21. package/build/assets/{remote-CAlKhZLk.js → remote-DQ5KVR01.js} +1 -1
  22. package/build/assets/remote-ZTdKmv4r.js +1 -0
  23. package/build/assets/site-status-BWHbNndL.js +72 -0
  24. package/build/assets/theme-player-B-ZX9FYo.js +1 -0
  25. package/build/assets/{worker-DuBkNi7w.js → worker-Buc1-1GE.js} +1 -1
  26. package/build/assets/{worker-DxIvGCqk.js → worker-DmLPM08h.js} +1 -1
  27. package/build/embed.html +8 -10
  28. package/build/index.html +8 -10
  29. package/build/index.js +9280 -8799
  30. package/fkn.json +1 -1
  31. package/package.json +7 -6
  32. package/store/home.webp +0 -0
  33. package/store/movie.webp +0 -0
  34. package/store/phone.webp +0 -0
  35. package/store/search.webp +0 -0
  36. package/store/series.webp +0 -0
  37. package/store/title.webp +0 -0
  38. package/build/assets/account-B2ETje0Z.js +0 -1
  39. package/build/assets/account-QzTt80xa.js +0 -1
  40. package/build/assets/anime-index-CWT8EUVb.js +0 -1
  41. package/build/assets/anime-seasons-CoquI0pK.js +0 -1
  42. package/build/assets/api-CXwRN66S.js +0 -1
  43. package/build/assets/api-DIgTslNb-Cs0uqWX1.js +0 -3
  44. package/build/assets/dist-BhdcN4JK.js +0 -1328
  45. package/build/assets/embed-BXVON2cN.js +0 -293
  46. package/build/assets/embed-title-BD9cgqvV.js +0 -1
  47. package/build/assets/emotion-react-jsx-runtime.browser.esm-BQbalngd.js +0 -1
  48. package/build/assets/index-CKS-vpo7.js +0 -2631
  49. package/build/assets/lib-account-COp-RaN5.js +0 -51
  50. package/build/assets/lib-account-CiFA5y4M.js +0 -2
  51. package/build/assets/lib-api-DIgTslNb-DP1_yG_t.js +0 -374
  52. package/build/assets/lib-api-Dqph3zoA.js +0 -2
  53. package/build/assets/lib-remote-C1YHVUVa.js +0 -2
  54. package/build/assets/lib-worker-anime-index-CWT8EUVb.js +0 -1
  55. package/build/assets/lib-worker-anime-seasons-CoquI0pK.js +0 -1
  56. package/build/assets/lib-worker-index-wTApHofM.js +0 -2631
  57. package/build/assets/main-L3DMTKgc.js +0 -5095
  58. package/build/assets/remote-BwnfCi4M.js +0 -1
  59. package/build/assets/site-status-c5cvFL2q.js +0 -71
  60. package/build/assets/theme-player-kjqP6iMr.js +0 -1
  61. package/store/season.webp +0 -0
  62. package/store/sources.webp +0 -0
@@ -1,6 +1,6 @@
1
1
  import { n as e, r as t, s as n, t as r } from "./lib-dist-DvqYL0NS.js";
2
- import { $ as i, A as a, B as o, C as s, D as c, E as l, I as u, J as d, L as f, M as p, N as m, O as h, P as g, T as _, U as v, V as y, X as b, Z as x, a as S, at as C, c as w, ct as T, d as ee, dt as E, et as D, i as O, it as k, j as te, k as ne, l as A, n as j, nt as M, o as re, ot as ie, q as N, r as P, rt as ae, s as oe, t as se, tt as F, w as ce, z as I } from "./lib-emotion-react-jsx-runtime.browser.esm-BXK3nCt6.js";
3
- var L = g("captions-off", [
2
+ import { $ as i, B as a, C as o, I as s, J as c, L as l, U as u, V as d, X as f, Z as p, _ as m, a as h, at as g, b as _, c as v, ct as y, d as b, dt as x, et as S, f as C, g as w, h as T, i as E, it as ee, l as D, m as O, n as k, nt as A, o as j, ot as te, p as ne, q as M, r as N, rt as re, s as P, t as F, tt as I, u as ie, v as ae, x as oe, y as se, z as L } from "./lib-emotion-react-jsx-runtime.browser.esm-C5mAgoyK.js";
3
+ var R = T("captions-off", [
4
4
  ["path", {
5
5
  d: "M10.5 5H19a2 2 0 0 1 2 2v8.5",
6
6
  key: "jqtk4d"
@@ -25,7 +25,7 @@ var L = g("captions-off", [
25
25
  d: "M7 15h2.5",
26
26
  key: "1ina1g"
27
27
  }]
28
- ]), le = g("maximize", [
28
+ ]), ce = T("maximize", [
29
29
  ["path", {
30
30
  d: "M8 3H5a2 2 0 0 0-2 2v3",
31
31
  key: "1dcmit"
@@ -42,7 +42,7 @@ var L = g("captions-off", [
42
42
  d: "M16 21h3a2 2 0 0 0 2-2v-3",
43
43
  key: "18trek"
44
44
  }]
45
- ]), R = g("minimize", [
45
+ ]), z = T("minimize", [
46
46
  ["path", {
47
47
  d: "M8 3v3a2 2 0 0 1-2 2H3",
48
48
  key: "hohbtr"
@@ -59,13 +59,13 @@ var L = g("captions-off", [
59
59
  d: "M16 21v-3a2 2 0 0 1 2-2h3",
60
60
  key: "ph8mxp"
61
61
  }]
62
- ]), ue = g("rotate-ccw", [["path", {
62
+ ]), le = T("rotate-ccw", [["path", {
63
63
  d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
64
64
  key: "1357e3"
65
65
  }], ["path", {
66
66
  d: "M3 3v5h5",
67
67
  key: "1xhq8a"
68
- }]]), de = g("triangle-alert", [
68
+ }]]), ue = T("triangle-alert", [
69
69
  ["path", {
70
70
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
71
71
  key: "wmoenq"
@@ -78,7 +78,7 @@ var L = g("captions-off", [
78
78
  d: "M12 17h.01",
79
79
  key: "p32p05"
80
80
  }]
81
- ]), fe = {};
81
+ ]), de = {};
82
82
  (function(e) {
83
83
  var t = Object.prototype.hasOwnProperty, n = "~";
84
84
  function r() {}
@@ -168,25 +168,25 @@ var L = g("captions-off", [
168
168
  }, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype.on, s.prefixed = n, s.EventEmitter = s, e.exports = s;
169
169
  })({
170
170
  get exports() {
171
- return fe;
171
+ return de;
172
172
  },
173
173
  set exports(e) {
174
- fe = e;
174
+ de = e;
175
175
  }
176
176
  });
177
- var z = fe, pe = class extends Error {
177
+ var B = de, fe = class extends Error {
178
178
  constructor(e) {
179
179
  super(e), this.name = "TimeoutError";
180
180
  }
181
- }, me = class extends Error {
181
+ }, pe = class extends Error {
182
182
  constructor(e) {
183
183
  super(), this.name = "AbortError", this.message = e;
184
184
  }
185
- }, he = (e) => globalThis.DOMException === void 0 ? new me(e) : new DOMException(e), ge = (e) => {
186
- let t = e.reason === void 0 ? he("This operation was aborted.") : e.reason;
187
- return t instanceof Error ? t : he(t);
185
+ }, me = (e) => globalThis.DOMException === void 0 ? new pe(e) : new DOMException(e), he = (e) => {
186
+ let t = e.reason === void 0 ? me("This operation was aborted.") : e.reason;
187
+ return t instanceof Error ? t : me(t);
188
188
  };
189
- function _e(e, t, n, r) {
189
+ function ge(e, t, n, r) {
190
190
  let i, a = new Promise((a, o) => {
191
191
  if (typeof t != "number" || Math.sign(t) !== 1) throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);
192
192
  if (t === Infinity) {
@@ -201,8 +201,8 @@ function _e(e, t, n, r) {
201
201
  ...r
202
202
  }, r.signal) {
203
203
  let { signal: e } = r;
204
- e.aborted && o(ge(e)), e.addEventListener("abort", () => {
205
- o(ge(e));
204
+ e.aborted && o(he(e)), e.addEventListener("abort", () => {
205
+ o(he(e));
206
206
  });
207
207
  }
208
208
  i = r.customTimers.setTimeout.call(void 0, () => {
@@ -214,7 +214,7 @@ function _e(e, t, n, r) {
214
214
  }
215
215
  return;
216
216
  }
217
- let r = typeof n == "string" ? n : `Promise timed out after ${t} milliseconds`, i = n instanceof Error ? n : new pe(r);
217
+ let r = typeof n == "string" ? n : `Promise timed out after ${t} milliseconds`, i = n instanceof Error ? n : new fe(r);
218
218
  typeof e.cancel == "function" && e.cancel(), o(i);
219
219
  }, t), (async () => {
220
220
  try {
@@ -230,7 +230,7 @@ function _e(e, t, n, r) {
230
230
  clearTimeout(i), i = void 0;
231
231
  }, a;
232
232
  }
233
- function ve(e, t, n) {
233
+ function _e(e, t, n) {
234
234
  let r = 0, i = e.length;
235
235
  for (; i > 0;) {
236
236
  let a = Math.trunc(i / 2), o = r + a;
@@ -238,13 +238,13 @@ function ve(e, t, n) {
238
238
  }
239
239
  return r;
240
240
  }
241
- var B = function(e, t, n, r) {
241
+ var V = function(e, t, n, r) {
242
242
  if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
243
243
  if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
244
244
  return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
245
- }, ye, be = class {
245
+ }, ve, ye = class {
246
246
  constructor() {
247
- ye.set(this, []);
247
+ ve.set(this, []);
248
248
  }
249
249
  enqueue(e, t) {
250
250
  t = {
@@ -255,36 +255,36 @@ var B = function(e, t, n, r) {
255
255
  priority: t.priority,
256
256
  run: e
257
257
  };
258
- if (this.size && B(this, ye, "f")[this.size - 1].priority >= t.priority) {
259
- B(this, ye, "f").push(n);
258
+ if (this.size && V(this, ve, "f")[this.size - 1].priority >= t.priority) {
259
+ V(this, ve, "f").push(n);
260
260
  return;
261
261
  }
262
- let r = ve(B(this, ye, "f"), n, (e, t) => t.priority - e.priority);
263
- B(this, ye, "f").splice(r, 0, n);
262
+ let r = _e(V(this, ve, "f"), n, (e, t) => t.priority - e.priority);
263
+ V(this, ve, "f").splice(r, 0, n);
264
264
  }
265
265
  dequeue() {
266
- return B(this, ye, "f").shift()?.run;
266
+ return V(this, ve, "f").shift()?.run;
267
267
  }
268
268
  filter(e) {
269
- return B(this, ye, "f").filter((t) => t.priority === e.priority).map((e) => e.run);
269
+ return V(this, ve, "f").filter((t) => t.priority === e.priority).map((e) => e.run);
270
270
  }
271
271
  get size() {
272
- return B(this, ye, "f").length;
272
+ return V(this, ve, "f").length;
273
273
  }
274
274
  };
275
- ye = /* @__PURE__ */ new WeakMap();
276
- var V = function(e, t, n, r, i) {
275
+ ve = /* @__PURE__ */ new WeakMap();
276
+ var H = function(e, t, n, r, i) {
277
277
  if (r === "m") throw TypeError("Private method is not writable");
278
278
  if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
279
279
  if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
280
280
  return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
281
- }, H = function(e, t, n, r) {
281
+ }, U = function(e, t, n, r) {
282
282
  if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
283
283
  if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
284
284
  return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
285
- }, U, xe, W, Se, Ce, we, Te, Ee, De, G, Oe, K, ke, q, Ae, je, Me, Ne, Pe, Fe, Ie, Le, Re, ze, Be, Ve, He = new pe(), Ue = class extends Error {}, We = class extends z {
285
+ }, W, be, G, xe, Se, Ce, we, Te, Ee, De, Oe, K, ke, q, Ae, je, Me, Ne, Pe, Fe, Ie, Le, Re, ze, Be, Ve, He = new fe(), Ue = class extends Error {}, We = class extends B {
286
286
  constructor(e) {
287
- if (super(), U.add(this), xe.set(this, void 0), W.set(this, void 0), Se.set(this, 0), Ce.set(this, void 0), we.set(this, void 0), Te.set(this, 0), Ee.set(this, void 0), De.set(this, void 0), G.set(this, void 0), Oe.set(this, void 0), K.set(this, 0), ke.set(this, void 0), q.set(this, void 0), Ae.set(this, void 0), Object.defineProperty(this, "timeout", {
287
+ if (super(), W.add(this), be.set(this, void 0), G.set(this, void 0), xe.set(this, 0), Se.set(this, void 0), Ce.set(this, void 0), we.set(this, 0), Te.set(this, void 0), Ee.set(this, void 0), De.set(this, void 0), Oe.set(this, void 0), K.set(this, 0), ke.set(this, void 0), q.set(this, void 0), Ae.set(this, void 0), Object.defineProperty(this, "timeout", {
288
288
  enumerable: !0,
289
289
  configurable: !0,
290
290
  writable: !0,
@@ -295,113 +295,113 @@ var V = function(e, t, n, r, i) {
295
295
  interval: 0,
296
296
  concurrency: Infinity,
297
297
  autoStart: !0,
298
- queueClass: be,
298
+ queueClass: ye,
299
299
  ...e
300
300
  }, !(typeof e.intervalCap == "number" && e.intervalCap >= 1)) throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString() ?? ""}\` (${typeof e.intervalCap})`);
301
301
  if (e.interval === void 0 || !(Number.isFinite(e.interval) && e.interval >= 0)) throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString() ?? ""}\` (${typeof e.interval})`);
302
- V(this, xe, e.carryoverConcurrencyCount, "f"), V(this, W, e.intervalCap === Infinity || e.interval === 0, "f"), V(this, Ce, e.intervalCap, "f"), V(this, we, e.interval, "f"), V(this, G, new e.queueClass(), "f"), V(this, Oe, e.queueClass, "f"), this.concurrency = e.concurrency, this.timeout = e.timeout, V(this, Ae, e.throwOnTimeout === !0, "f"), V(this, q, e.autoStart === !1, "f");
302
+ H(this, be, e.carryoverConcurrencyCount, "f"), H(this, G, e.intervalCap === Infinity || e.interval === 0, "f"), H(this, Se, e.intervalCap, "f"), H(this, Ce, e.interval, "f"), H(this, De, new e.queueClass(), "f"), H(this, Oe, e.queueClass, "f"), this.concurrency = e.concurrency, this.timeout = e.timeout, H(this, Ae, e.throwOnTimeout === !0, "f"), H(this, q, e.autoStart === !1, "f");
303
303
  }
304
304
  get concurrency() {
305
- return H(this, ke, "f");
305
+ return U(this, ke, "f");
306
306
  }
307
307
  set concurrency(e) {
308
308
  if (!(typeof e == "number" && e >= 1)) throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);
309
- V(this, ke, e, "f"), H(this, U, "m", Be).call(this);
309
+ H(this, ke, e, "f"), U(this, W, "m", Be).call(this);
310
310
  }
311
311
  async add(e, t = {}) {
312
312
  return new Promise((n, r) => {
313
- H(this, G, "f").enqueue(async () => {
313
+ U(this, De, "f").enqueue(async () => {
314
314
  var i, a;
315
- V(this, K, (i = H(this, K, "f"), i++, i), "f"), V(this, Se, (a = H(this, Se, "f"), a++, a), "f");
315
+ H(this, K, (i = U(this, K, "f"), i++, i), "f"), H(this, xe, (a = U(this, xe, "f"), a++, a), "f");
316
316
  try {
317
317
  if (t.signal?.aborted) {
318
318
  r(new Ue("The task was aborted."));
319
319
  return;
320
320
  }
321
- let i = await (this.timeout === void 0 && t.timeout === void 0 ? e({ signal: t.signal }) : _e(Promise.resolve(e({ signal: t.signal })), t.timeout === void 0 ? this.timeout : t.timeout, () => {
322
- (t.throwOnTimeout === void 0 ? H(this, Ae, "f") : t.throwOnTimeout) && r(He);
321
+ let i = await (this.timeout === void 0 && t.timeout === void 0 ? e({ signal: t.signal }) : ge(Promise.resolve(e({ signal: t.signal })), t.timeout === void 0 ? this.timeout : t.timeout, () => {
322
+ (t.throwOnTimeout === void 0 ? U(this, Ae, "f") : t.throwOnTimeout) && r(He);
323
323
  }));
324
324
  n(i), this.emit("completed", i);
325
325
  } catch (e) {
326
326
  r(e), this.emit("error", e);
327
327
  }
328
- H(this, U, "m", Ne).call(this);
329
- }, t), H(this, U, "m", Le).call(this), this.emit("add");
328
+ U(this, W, "m", Ne).call(this);
329
+ }, t), U(this, W, "m", Le).call(this), this.emit("add");
330
330
  });
331
331
  }
332
332
  async addAll(e, t) {
333
333
  return Promise.all(e.map(async (e) => this.add(e, t)));
334
334
  }
335
335
  start() {
336
- return H(this, q, "f") ? (V(this, q, !1, "f"), H(this, U, "m", Be).call(this), this) : this;
336
+ return U(this, q, "f") ? (H(this, q, !1, "f"), U(this, W, "m", Be).call(this), this) : this;
337
337
  }
338
338
  pause() {
339
- V(this, q, !0, "f");
339
+ H(this, q, !0, "f");
340
340
  }
341
341
  clear() {
342
- V(this, G, new (H(this, Oe, "f"))(), "f");
342
+ H(this, De, new (U(this, Oe, "f"))(), "f");
343
343
  }
344
344
  async onEmpty() {
345
- H(this, G, "f").size !== 0 && await H(this, U, "m", Ve).call(this, "empty");
345
+ U(this, De, "f").size !== 0 && await U(this, W, "m", Ve).call(this, "empty");
346
346
  }
347
347
  async onSizeLessThan(e) {
348
- H(this, G, "f").size < e || await H(this, U, "m", Ve).call(this, "next", () => H(this, G, "f").size < e);
348
+ U(this, De, "f").size < e || await U(this, W, "m", Ve).call(this, "next", () => U(this, De, "f").size < e);
349
349
  }
350
350
  async onIdle() {
351
- (H(this, K, "f") !== 0 || H(this, G, "f").size !== 0) && await H(this, U, "m", Ve).call(this, "idle");
351
+ (U(this, K, "f") !== 0 || U(this, De, "f").size !== 0) && await U(this, W, "m", Ve).call(this, "idle");
352
352
  }
353
353
  get size() {
354
- return H(this, G, "f").size;
354
+ return U(this, De, "f").size;
355
355
  }
356
356
  sizeBy(e) {
357
- return H(this, G, "f").filter(e).length;
357
+ return U(this, De, "f").filter(e).length;
358
358
  }
359
359
  get pending() {
360
- return H(this, K, "f");
360
+ return U(this, K, "f");
361
361
  }
362
362
  get isPaused() {
363
- return H(this, q, "f");
363
+ return U(this, q, "f");
364
364
  }
365
365
  };
366
- xe = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakSet(), je = function() {
367
- return H(this, W, "f") || H(this, Se, "f") < H(this, Ce, "f");
366
+ be = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), je = function() {
367
+ return U(this, G, "f") || U(this, xe, "f") < U(this, Se, "f");
368
368
  }, Me = function() {
369
- return H(this, K, "f") < H(this, ke, "f");
369
+ return U(this, K, "f") < U(this, ke, "f");
370
370
  }, Ne = function() {
371
371
  var e;
372
- V(this, K, (e = H(this, K, "f"), e--, e), "f"), H(this, U, "m", Le).call(this), this.emit("next");
372
+ H(this, K, (e = U(this, K, "f"), e--, e), "f"), U(this, W, "m", Le).call(this), this.emit("next");
373
373
  }, Pe = function() {
374
- this.emit("empty"), H(this, K, "f") === 0 && this.emit("idle");
374
+ this.emit("empty"), U(this, K, "f") === 0 && this.emit("idle");
375
375
  }, Fe = function() {
376
- H(this, U, "m", ze).call(this), H(this, U, "m", Re).call(this), V(this, De, void 0, "f");
376
+ U(this, W, "m", ze).call(this), U(this, W, "m", Re).call(this), H(this, Ee, void 0, "f");
377
377
  }, Ie = function() {
378
378
  let e = Date.now();
379
- if (H(this, Ee, "f") === void 0) {
380
- let t = H(this, Te, "f") - e;
381
- if (t < 0) V(this, Se, H(this, xe, "f") ? H(this, K, "f") : 0, "f");
382
- else return H(this, De, "f") === void 0 && V(this, De, setTimeout(() => {
383
- H(this, U, "m", Fe).call(this);
379
+ if (U(this, Te, "f") === void 0) {
380
+ let t = U(this, we, "f") - e;
381
+ if (t < 0) H(this, xe, U(this, be, "f") ? U(this, K, "f") : 0, "f");
382
+ else return U(this, Ee, "f") === void 0 && H(this, Ee, setTimeout(() => {
383
+ U(this, W, "m", Fe).call(this);
384
384
  }, t), "f"), !0;
385
385
  }
386
386
  return !1;
387
387
  }, Le = function() {
388
- if (H(this, G, "f").size === 0) return H(this, Ee, "f") && clearInterval(H(this, Ee, "f")), V(this, Ee, void 0, "f"), H(this, U, "m", Pe).call(this), !1;
389
- if (!H(this, q, "f")) {
390
- let e = !H(this, U, "a", Ie);
391
- if (H(this, U, "a", je) && H(this, U, "a", Me)) {
392
- let t = H(this, G, "f").dequeue();
393
- return t ? (this.emit("active"), t(), e && H(this, U, "m", Re).call(this), !0) : !1;
388
+ if (U(this, De, "f").size === 0) return U(this, Te, "f") && clearInterval(U(this, Te, "f")), H(this, Te, void 0, "f"), U(this, W, "m", Pe).call(this), !1;
389
+ if (!U(this, q, "f")) {
390
+ let e = !U(this, W, "a", Ie);
391
+ if (U(this, W, "a", je) && U(this, W, "a", Me)) {
392
+ let t = U(this, De, "f").dequeue();
393
+ return t ? (this.emit("active"), t(), e && U(this, W, "m", Re).call(this), !0) : !1;
394
394
  }
395
395
  }
396
396
  return !1;
397
397
  }, Re = function() {
398
- H(this, W, "f") || H(this, Ee, "f") !== void 0 || (V(this, Ee, setInterval(() => {
399
- H(this, U, "m", ze).call(this);
400
- }, H(this, we, "f")), "f"), V(this, Te, Date.now() + H(this, we, "f"), "f"));
398
+ U(this, G, "f") || U(this, Te, "f") !== void 0 || (H(this, Te, setInterval(() => {
399
+ U(this, W, "m", ze).call(this);
400
+ }, U(this, Ce, "f")), "f"), H(this, we, Date.now() + U(this, Ce, "f"), "f"));
401
401
  }, ze = function() {
402
- H(this, Se, "f") === 0 && H(this, K, "f") === 0 && H(this, Ee, "f") && (clearInterval(H(this, Ee, "f")), V(this, Ee, void 0, "f")), V(this, Se, H(this, xe, "f") ? H(this, K, "f") : 0, "f"), H(this, U, "m", Be).call(this);
402
+ U(this, xe, "f") === 0 && U(this, K, "f") === 0 && U(this, Te, "f") && (clearInterval(U(this, Te, "f")), H(this, Te, void 0, "f")), H(this, xe, U(this, be, "f") ? U(this, K, "f") : 0, "f"), U(this, W, "m", Be).call(this);
403
403
  }, Be = function() {
404
- for (; H(this, U, "m", Le).call(this););
404
+ for (; U(this, W, "m", Le).call(this););
405
405
  }, Ve = async function(e, t) {
406
406
  return new Promise((n) => {
407
407
  let r = () => {
@@ -3143,7 +3143,7 @@ function ns(e) {
3143
3143
  }).join("");
3144
3144
  }
3145
3145
  //#endregion
3146
- //#region node_modules/@banou/media-player/dist/engine-C9vSEJYW.js
3146
+ //#region node_modules/@banou/media-player/dist/engine-C4Gj_4zs.js
3147
3147
  var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3148
3148
  index: n,
3149
3149
  start: e.buffered.start(n),
@@ -3168,8 +3168,8 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3168
3168
  updateTimestampOffset: (t) => r(async () => {
3169
3169
  e.timestampOffset = t;
3170
3170
  }),
3171
- endOfStream: () => r(async () => {
3172
- if (!(t.readyState !== "open" || e.updating)) try {
3171
+ endOfStream: (n = () => !0) => r(async () => {
3172
+ if (t.readyState === "open" && !e.updating && n()) try {
3173
3173
  t.endOfStream();
3174
3174
  } catch {}
3175
3175
  })
@@ -3379,138 +3379,138 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3379
3379
  i(), n(/* @__PURE__ */ Error("The MediaSource closed before a SourceBuffer could be created"));
3380
3380
  };
3381
3381
  C.addEventListener("sourceopen", a, { once: !0 }), C.addEventListener("sourceclose", o, { once: !0 }), C.addEventListener("error", o, { once: !0 });
3382
- }), { appendBuffer: ee, unbufferRange: E, updateTimestampOffset: D, endOfStream: O } = as(T, C);
3383
- await ee(e.data), e.subtitles?.length && a.pushFragments(e.subtitles), p?.();
3384
- let k = !1, te = !1, ne = 0, A, j = () => A ?? t.currentTime, M = !1, re = !1, ie = 0, N = 0, P = null, ae = 0, oe = 0, se = !1, F = 0, ce = !0, I = (e, t, n = !1) => {
3382
+ }), { appendBuffer: E, unbufferRange: ee, updateTimestampOffset: D, endOfStream: O } = as(T, C);
3383
+ await E(e.data), e.subtitles?.length && a.pushFragments(e.subtitles), p?.();
3384
+ let k = !1, A = !1, j = 0, te, ne = () => te ?? t.currentTime, M = !1, N = !1, re = 0, P = 0, F = null, I = 0, ie = 0, ae = !1, oe = 0, se = !0, L = (e, t, n = !1) => {
3385
3385
  let r = e?.message === "Cancelled";
3386
- t && r || (console.error(e), (!se || n) && (se = !0, m?.(r ? Error("Reading the video file failed", { cause: e }) : e)));
3387
- }, L = async (e = !1) => {
3388
- if (ne > 0 && !e) return;
3389
- let n = t.currentTime, r = e ? ys : gs, i = e ? bs : _s, a = rs(T), o = (e, t) => (ce = !1, E(e, t));
3386
+ t && r || (console.error(e), (!ae || n) && (ae = !0, m?.(r ? Error("Reading the video file failed", { cause: e }) : e)));
3387
+ }, R = async (e = !1) => {
3388
+ if (j > 0 && !e) return;
3389
+ let n = t.currentTime, r = e ? ys : gs, i = e ? bs : _s, a = rs(T), o = (e, t) => (se = !1, ee(e, t));
3390
3390
  a.length && a[0].start < n + r && await o(0, n + r);
3391
3391
  for (let { end: e } of a) e > n + i && await o(n + i, e);
3392
- }, le = () => {
3392
+ }, ce = () => {
3393
3393
  let e = rs(T);
3394
3394
  if (!e.length) return !0;
3395
- let t = j(), n = e.find((e) => e.start <= t + Cs && t < e.end);
3396
- return z() && de(t) && (!n || n.start <= t) || n && n.end >= t + _s ? !1 : !n || n.end < t + vs;
3397
- }, R = (e) => rs(T).find((t) => t.start <= e + Cs && e < t.end), ue = () => R(t.currentTime), de = (e = t.currentTime) => {
3398
- let n = R(e);
3399
- return e >= oe - .1 || !!n && n.end >= oe - .1;
3400
- }, fe = () => {
3395
+ let t = ne(), n = e.find((e) => e.start <= t + Cs && t < e.end);
3396
+ return B() && ue(t) && (!n || n.start <= t) || n && n.end >= t + _s ? !1 : !n || n.end < t + vs;
3397
+ }, z = (e) => rs(T).find((t) => t.start <= e + Cs && e < t.end), le = () => z(t.currentTime), ue = (e = t.currentTime) => {
3398
+ let n = z(e);
3399
+ return e >= ie - .1 || !!n && n.end >= ie - .1;
3400
+ }, de = () => {
3401
3401
  let e = rs(T).map((e) => e.end);
3402
- e.length && (oe = Math.max(oe, ...e)), M && (re = !0);
3403
- }, z = () => M || re && (rs(T).at(-1)?.end ?? 0) >= oe - .1, pe = async (e) => {
3404
- te = !0, P = null, ae = 0, F = e, ce = !0;
3405
- let t = ++N;
3402
+ e.length && (ie = Math.max(ie, ...e)), M && (N = !0);
3403
+ }, B = () => M || N && (rs(T).at(-1)?.end ?? 0) >= ie - .1, fe = async (e) => {
3404
+ A = !0, F = null, I = 0, oe = e, se = !0;
3405
+ let t = ++P;
3406
3406
  try {
3407
3407
  let { data: n, pts: r, subtitles: i, finished: o } = await y.seek(e);
3408
- if (x || t !== N || (o && (M = !0), i?.length && a.pushFragments(i), await D(r), x || t !== N)) return;
3409
- n.byteLength && (await ee(n), fe());
3408
+ if (x || t !== P || (o && (M = !0), i?.length && a.pushFragments(i), await D(r), x || t !== P)) return;
3409
+ n.byteLength && (await E(n), de());
3410
3410
  } catch (e) {
3411
- t === N && (ce = !1), I(e, x || t !== N);
3411
+ t === P && (se = !1), L(e, x || t !== P);
3412
3412
  } finally {
3413
- t === N && (te = !1);
3413
+ t === P && (A = !1);
3414
3414
  }
3415
- }, me = async () => {
3416
- let e = P;
3415
+ }, pe = async () => {
3416
+ let e = F;
3417
3417
  if (e) try {
3418
- await ee(e), fe(), P === e && (P = null, ae = 0);
3418
+ await E(e), de(), F === e && (F = null, I = 0);
3419
3419
  } catch (n) {
3420
- if (P !== e) return;
3420
+ if (F !== e) return;
3421
3421
  if (n?.name === "QuotaExceededError") {
3422
- let n = await L(!0).then(() => !0, () => !1);
3423
- if (P !== e) return;
3422
+ let n = await R(!0).then(() => !0, () => !1);
3423
+ if (F !== e) return;
3424
3424
  if (n) {
3425
- M = !1, await pe(ue()?.end ?? t.currentTime);
3425
+ M = !1, await fe(le()?.end ?? t.currentTime);
3426
3426
  return;
3427
3427
  }
3428
3428
  }
3429
- if (ae += 1, ae < xs) return;
3430
- throw P = null, n;
3429
+ if (I += 1, I < xs) return;
3430
+ throw F = null, n;
3431
3431
  }
3432
- }, he = async () => {
3433
- if (k || te || W !== void 0 || x || !P && (M || !le())) return;
3434
- let e = ++ie, t = N, n = () => x || e !== ie || t !== N;
3432
+ }, me = async () => {
3433
+ if (k || A || G !== void 0 || x || !F && (M || !ce())) return;
3434
+ let e = ++re, t = P, n = () => x || e !== re || t !== P;
3435
3435
  k = !0;
3436
3436
  try {
3437
- if (!P) {
3437
+ if (!F) {
3438
3438
  let { data: e, subtitles: t, finished: r } = await y.read();
3439
3439
  if (n() || (r && (M = !0), t?.length && a.pushFragments(t), !e.byteLength)) return;
3440
- P = e, ae = 0;
3440
+ F = e, I = 0;
3441
3441
  }
3442
- await me(), !n() && se && (se = !1, h?.());
3442
+ await pe(), !n() && ae && (ae = !1, h?.());
3443
3443
  } catch (e) {
3444
- I(e, n());
3444
+ L(e, n());
3445
3445
  } finally {
3446
- e === ie && (k = !1);
3446
+ e === re && (k = !1);
3447
3447
  }
3448
- }, ge = (e) => e >= F && _e(e) && B(e), _e = (e) => rs(T).some((t) => t.start <= e && e < t.end), ve = (e) => {
3449
- let t = R(e);
3448
+ }, he = (e) => e >= oe && ge(e) && V(e), ge = (e) => rs(T).some((t) => t.start <= e && e < t.end), _e = (e) => {
3449
+ let t = z(e);
3450
3450
  return t ? t.end - e : 0;
3451
- }, B = (e) => ve(e) >= ws || z() && de(e), ye = async (e) => {
3452
- if (!x && !(_e(e) && B(e))) {
3453
- M = !1, ne++, A = e;
3451
+ }, V = (e) => _e(e) >= ws || B() && ue(e), ve = async (e) => {
3452
+ if (!x && !(ge(e) && V(e))) {
3453
+ M = !1, j++, te = e;
3454
3454
  try {
3455
- await pe(e);
3456
- let t = N;
3457
- for (let n = 0; n < Ts && !(x || t !== N || M || ve(e) >= ws); n++) {
3458
- let t = ve(e);
3459
- if (await he(), ve(e) <= t) break;
3455
+ await fe(e);
3456
+ let t = P;
3457
+ for (let n = 0; n < Ts && !(x || t !== P || M || _e(e) >= ws); n++) {
3458
+ let t = _e(e);
3459
+ if (await me(), _e(e) <= t) break;
3460
3460
  }
3461
3461
  } finally {
3462
- ne--, A === e && (A = void 0);
3462
+ j--, te === e && (te = void 0);
3463
3463
  }
3464
3464
  }
3465
- }, be = 0, V = null, H, U = (e) => {
3466
- let t = performance.now(), n = t - be;
3465
+ }, ye = 0, H = null, U, W = (e) => {
3466
+ let t = performance.now(), n = t - ye;
3467
3467
  if (n >= Es) {
3468
- be = t, V = null, g?.(e);
3468
+ ye = t, H = null, g?.(e);
3469
3469
  return;
3470
3470
  }
3471
- V = e, !H && (H = setTimeout(() => {
3472
- H = void 0;
3473
- let e = V;
3474
- V = null, !(e === null || x) && (be = performance.now(), g?.(e));
3471
+ H = e, !U && (U = setTimeout(() => {
3472
+ U = void 0;
3473
+ let e = H;
3474
+ H = null, !(e === null || x) && (ye = performance.now(), g?.(e));
3475
3475
  }, Es - n));
3476
3476
  };
3477
3477
  b.push(() => {
3478
- H && clearTimeout(H);
3478
+ U && clearTimeout(U);
3479
3479
  });
3480
- let xe = 0, W;
3480
+ let be = 0, G;
3481
3481
  b.push(() => {
3482
- W && clearTimeout(W);
3482
+ G && clearTimeout(G);
3483
3483
  });
3484
- let Se = () => {
3484
+ let xe = () => {
3485
3485
  let n = t.currentTime, r = e.info.input.duration || t.duration;
3486
- r > 0 && U(Math.min(Math.max(n / r, 0), 1));
3487
- let i = performance.now(), a = i - xe < Ds;
3488
- if (xe = i, !ge(n) && !(ce && (te || ve(n) > 0) && Math.abs(n - F) < .001)) {
3489
- if (M = !1, W && clearTimeout(W), !a) {
3490
- W = void 0, pe(n);
3486
+ r > 0 && W(Math.min(Math.max(n / r, 0), 1));
3487
+ let i = performance.now(), a = i - be < Ds;
3488
+ if (be = i, !he(n) && !(se && (A || _e(n) > 0) && Math.abs(n - oe) < .001)) {
3489
+ if (M = !1, G && clearTimeout(G), !a) {
3490
+ G = void 0, fe(n);
3491
3491
  return;
3492
3492
  }
3493
- W = setTimeout(() => {
3494
- if (W = void 0, x) return;
3493
+ G = setTimeout(() => {
3494
+ if (G = void 0, x) return;
3495
3495
  let e = t.currentTime;
3496
- ge(e) || (M = !1, pe(e));
3496
+ he(e) || (M = !1, fe(e));
3497
3497
  }, Ds);
3498
3498
  }
3499
3499
  };
3500
- t.addEventListener("seeking", Se), b.push(() => t.removeEventListener("seeking", Se));
3501
- let Ce = !1, we = () => {
3502
- if (Ce) return;
3503
- Ce = !0;
3500
+ t.addEventListener("seeking", xe), b.push(() => t.removeEventListener("seeking", xe));
3501
+ let Se = !1, Ce = () => {
3502
+ if (Se) return;
3503
+ Se = !0;
3504
3504
  let e = t.error;
3505
- I(new ms(`the media element failed: ${e?.message ?? "unknown"}`, { cause: e }), !1, !0);
3505
+ L(new ms(`the media element failed: ${e?.message ?? "unknown"}`, { cause: e }), !1, !0);
3506
3506
  };
3507
- t.addEventListener("error", we), b.push(() => t.removeEventListener("error", we));
3508
- let Te = setInterval(() => {
3509
- Ce || t.error || (L().catch(() => {}), he().catch((e) => I(e, !1)), z() && !P && de() && C.readyState === "open" && O().catch(() => {}));
3507
+ t.addEventListener("error", Ce), b.push(() => t.removeEventListener("error", Ce));
3508
+ let we = setInterval(() => {
3509
+ Se || t.error || (R().catch(() => {}), me().catch((e) => L(e, !1)), B() && !F && ue() && C.readyState === "open" && O(() => !A).catch(() => {}));
3510
3510
  }, 100);
3511
- return b.push(() => clearInterval(Te)), {
3511
+ return b.push(() => clearInterval(we)), {
3512
3512
  destroy: S,
3513
- prepareSeek: ye,
3513
+ prepareSeek: ve,
3514
3514
  videoElement: t,
3515
3515
  selectSubtitleStream: (e) => a.selectStream(e),
3516
3516
  indexes: e.indexes ?? [],
@@ -3595,7 +3595,7 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3595
3595
  g = !1;
3596
3596
  let e = v;
3597
3597
  w(T(e)).then(() => {
3598
- ee(e), S();
3598
+ E(e), S();
3599
3599
  });
3600
3600
  return;
3601
3601
  }
@@ -3629,7 +3629,7 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3629
3629
  } catch {} finally {
3630
3630
  _ = !1;
3631
3631
  }
3632
- }, T = (e) => e ? e.reduce((e, [, t]) => Math.max(e, t), 0) : r, ee = (e) => {
3632
+ }, T = (e) => e ? e.reduce((e, [, t]) => Math.max(e, t), 0) : r, E = (e) => {
3633
3633
  for (let t of c) t.done || (!e || e.some(([e, n]) => e <= t.startByte && t.endByte <= n)) && C(t);
3634
3634
  };
3635
3635
  return b(), {
@@ -3637,7 +3637,7 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3637
3637
  if (d) return;
3638
3638
  v = e;
3639
3639
  let t = T(e);
3640
- h < 0 ? h = t : (t >= Math.max(h * Ls, h + Rs) || t >= r && h < r) && (g = !0), ee(e), S();
3640
+ h < 0 ? h = t : (t >= Math.max(h * Ls, h + Rs) || t >= r && h < r) && (g = !0), E(e), S();
3641
3641
  },
3642
3642
  prioritize: (e) => {
3643
3643
  d || (m = e);
@@ -3687,14 +3687,14 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3687
3687
  l = !1;
3688
3688
  }, Ws);
3689
3689
  });
3690
- }, ee = [["play", () => {
3690
+ }, E = [["play", () => {
3691
3691
  t.play().catch(() => {});
3692
- }], ["pause", () => t.pause()]], E = (e) => {
3693
- if ("mediaSession" in navigator) for (let [t, n] of ee) try {
3692
+ }], ["pause", () => t.pause()]], ee = (e) => {
3693
+ if ("mediaSession" in navigator) for (let [t, n] of E) try {
3694
3694
  navigator.mediaSession.setActionHandler(t, e ? n : null);
3695
3695
  } catch {}
3696
3696
  }, D = () => {
3697
- if (y(), E(!1), t.removeEventListener("play", C), t.removeEventListener("pause", w), t.removeEventListener("seeked", T), !a) {
3697
+ if (y(), ee(!1), t.removeEventListener("play", C), t.removeEventListener("pause", w), t.removeEventListener("seeked", T), !a) {
3698
3698
  f?.();
3699
3699
  return;
3700
3700
  }
@@ -3707,7 +3707,7 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3707
3707
  e.style.cssText = "position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000;z-index:1", t.style.opacity = "0", n.style.display = "none", f = () => {
3708
3708
  f = void 0, t.style.opacity = r, n.style.display = i;
3709
3709
  };
3710
- }, te = async () => {
3710
+ }, A = async () => {
3711
3711
  let n = Math.min(t.videoWidth || i, i), o = Math.round(n * ((t.videoHeight || 9) / (t.videoWidth || 16))), c = document.createElement("canvas");
3712
3712
  c.width = n, c.height = o;
3713
3713
  let l = c.getContext("2d");
@@ -3731,7 +3731,7 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3731
3731
  u.remove();
3732
3732
  return;
3733
3733
  }
3734
- if (u.addEventListener("play", x), u.addEventListener("pause", S), u.addEventListener("leavepictureinpicture", O), t.addEventListener("play", C), t.addEventListener("pause", w), t.addEventListener("seeked", T), E(!0), b(), r === "burn-in") {
3734
+ if (u.addEventListener("play", x), u.addEventListener("pause", S), u.addEventListener("leavepictureinpicture", O), t.addEventListener("play", C), t.addEventListener("pause", w), t.addEventListener("seeked", T), ee(!0), b(), r === "burn-in") {
3735
3735
  t.paused && u.pause(), e.onBurnedInChange?.(!0);
3736
3736
  return;
3737
3737
  }
@@ -3752,7 +3752,7 @@ var rs = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
3752
3752
  }
3753
3753
  r !== "burn-in" && document.pictureInPictureElement && await document.exitPictureInPicture().catch(() => {});
3754
3754
  try {
3755
- await te();
3755
+ await A();
3756
3756
  } catch (t) {
3757
3757
  console.warn("subtitle compositing for picture in picture failed", t), D(), r === "burn-in" && e.onBurnedInChange?.(!1);
3758
3758
  }
@@ -3853,13 +3853,13 @@ function fc(e, t) {
3853
3853
  }
3854
3854
  //#endregion
3855
3855
  //#region node_modules/@videojs/react/dist/default/i18n/context.js
3856
- N();
3857
- var pc = T(null);
3858
- T(void 0);
3856
+ M();
3857
+ var pc = y(null);
3858
+ y(void 0);
3859
3859
  function mc() {
3860
- let e = k(pc), [t, n] = ie((e) => e + 1, 0);
3861
- D(() => lc(() => n()), []);
3862
- let r = C(() => fc(cc("en"), "en"), [t]);
3860
+ let e = ee(pc), [t, n] = te((e) => e + 1, 0);
3861
+ S(() => lc(() => n()), []);
3862
+ let r = g(() => fc(cc("en"), "en"), [t]);
3863
3863
  return e ? e.translator : r;
3864
3864
  }
3865
3865
  //#endregion
@@ -3942,7 +3942,7 @@ function Tc(e) {
3942
3942
  }
3943
3943
  //#endregion
3944
3944
  //#region node_modules/@videojs/react/dist/default/utils/use-composed-refs.js
3945
- N();
3945
+ M();
3946
3946
  function Ec(e, t) {
3947
3947
  if (X(e)) return e(t);
3948
3948
  e != null && (e.current = t);
@@ -3960,17 +3960,17 @@ function Dc(...e) {
3960
3960
  };
3961
3961
  }
3962
3962
  function Oc(...e) {
3963
- return F(Dc(...e), [...e]);
3963
+ return I(Dc(...e), [...e]);
3964
3964
  }
3965
3965
  //#endregion
3966
3966
  //#region node_modules/@videojs/store/dist/default/react/hooks/use-selector.js
3967
- N();
3967
+ M();
3968
3968
  function kc(e, t, n, r = $s) {
3969
- let i = x(void 0), a = () => {
3969
+ let i = p(void 0), a = () => {
3970
3970
  let e = n(t());
3971
3971
  return i.current !== void 0 && r(i.current, e) ? i.current : (i.current = e, e);
3972
3972
  };
3973
- return I(e, a, a);
3973
+ return L(e, a, a);
3974
3974
  }
3975
3975
  //#endregion
3976
3976
  //#region node_modules/@videojs/utils/dist/function/identity.js
@@ -3988,16 +3988,16 @@ function Nc(e, t, n) {
3988
3988
  }
3989
3989
  //#endregion
3990
3990
  //#region node_modules/@videojs/react/dist/default/player/context.js
3991
- N();
3992
- var Pc = T(null);
3991
+ M();
3992
+ var Pc = y(null);
3993
3993
  function Fc({ value: e, children: t }) {
3994
- return /* @__PURE__ */ ee(Pc.Provider, {
3994
+ return /* @__PURE__ */ o(Pc.Provider, {
3995
3995
  value: e,
3996
3996
  children: t
3997
3997
  });
3998
3998
  }
3999
3999
  function Ic() {
4000
- let e = k(Pc);
4000
+ let e = ee(Pc);
4001
4001
  if (!e) throw Error("usePlayerContext must be used within a Player Provider");
4002
4002
  return e;
4003
4003
  }
@@ -4006,10 +4006,10 @@ function Lc() {
4006
4006
  return e;
4007
4007
  }
4008
4008
  function Rc() {
4009
- return k(Pc)?.setMedia;
4009
+ return ee(Pc)?.setMedia;
4010
4010
  }
4011
4011
  function zc() {
4012
- return k(Pc)?.setContainer;
4012
+ return ee(Pc)?.setContainer;
4013
4013
  }
4014
4014
  //#endregion
4015
4015
  //#region node_modules/@videojs/utils/dist/events/abort.js
@@ -4958,41 +4958,41 @@ var hu = {
4958
4958
  };
4959
4959
  //#endregion
4960
4960
  //#region node_modules/@videojs/react/dist/default/player/container.js
4961
- N();
4962
- var gu = v(function({ children: e, tabIndex: t = 0, role: n = fu, "aria-label": r, "aria-labelledby": i, ...a }, o) {
4963
- let s = zc(), c = mc(), l = x(null), u = Oc(o, l);
4964
- D(() => (s?.(l.current), () => s?.(null)), [s]);
4965
- let d = (e) => {
4961
+ M();
4962
+ var gu = u(function({ children: e, tabIndex: t = 0, role: n = fu, "aria-label": r, "aria-labelledby": i, ...a }, s) {
4963
+ let c = zc(), l = mc(), u = p(null), d = Oc(s, u);
4964
+ S(() => (c?.(u.current), () => c?.(null)), [c]);
4965
+ let f = (e) => {
4966
4966
  a.onPointerUp?.(e);
4967
- let t = l.current;
4967
+ let t = u.current;
4968
4968
  t && pu(t);
4969
4969
  };
4970
- return /* @__PURE__ */ ee("div", {
4971
- ref: u,
4970
+ return /* @__PURE__ */ o("div", {
4971
+ ref: d,
4972
4972
  role: n,
4973
4973
  tabIndex: t,
4974
4974
  ...r !== void 0 || i !== void 0 ? {
4975
4975
  "aria-label": r,
4976
4976
  "aria-labelledby": i
4977
- } : { "aria-label": c(hu) },
4977
+ } : { "aria-label": l(hu) },
4978
4978
  ...a,
4979
- onPointerUp: d,
4979
+ onPointerUp: f,
4980
4980
  children: e
4981
4981
  });
4982
4982
  });
4983
4983
  //#endregion
4984
4984
  //#region node_modules/@videojs/react/dist/default/utils/use-latest-ref.js
4985
- N();
4985
+ M();
4986
4986
  function _u(e) {
4987
- let t = x(e);
4987
+ let t = p(e);
4988
4988
  return t.current = e, t;
4989
4989
  }
4990
4990
  //#endregion
4991
4991
  //#region node_modules/@videojs/react/dist/default/utils/use-destroy.js
4992
- N();
4992
+ M();
4993
4993
  function vu(e, t, n) {
4994
- let r = x(null), i = _u(t), a = _u(n);
4995
- D(() => (r.current === null ? i.current?.() : (clearTimeout(r.current), r.current = null), () => {
4994
+ let r = p(null), i = _u(t), a = _u(n);
4995
+ S(() => (r.current === null ? i.current?.() : (clearTimeout(r.current), r.current = null), () => {
4996
4996
  r.current = setTimeout(() => {
4997
4997
  a.current?.(), e.destroy();
4998
4998
  }, 0);
@@ -5000,11 +5000,11 @@ function vu(e, t, n) {
5000
5000
  }
5001
5001
  //#endregion
5002
5002
  //#region node_modules/@videojs/react/dist/default/player/create-player.js
5003
- N();
5003
+ M();
5004
5004
  function yu(e) {
5005
5005
  function t({ children: t }) {
5006
- let [n, r] = M(() => tl()(Hc(...e.features))), [i] = M(() => mu()), [a, o] = M(null), [s, c] = M(null);
5007
- return vu(n), D(() => {
5006
+ let [n, r] = A(() => tl()(Hc(...e.features))), [i] = A(() => mu()), [a, s] = A(null), [c, l] = A(null);
5007
+ return vu(n), S(() => {
5008
5008
  if (a) {
5009
5009
  if (n.destroyed) {
5010
5010
  r(tl()(Hc(...e.features)));
@@ -5012,25 +5012,25 @@ function yu(e) {
5012
5012
  }
5013
5013
  return n.attach({
5014
5014
  media: a,
5015
- container: s
5015
+ container: c
5016
5016
  });
5017
5017
  }
5018
5018
  }, [
5019
5019
  a,
5020
- s,
5020
+ c,
5021
5021
  n
5022
- ]), /* @__PURE__ */ ee(Fc, {
5023
- value: C(() => ({
5022
+ ]), /* @__PURE__ */ o(Fc, {
5023
+ value: g(() => ({
5024
5024
  store: n,
5025
5025
  media: a,
5026
- setMedia: o,
5027
- container: s,
5028
- setContainer: c,
5026
+ setMedia: s,
5027
+ container: c,
5028
+ setContainer: l,
5029
5029
  popupGroup: i
5030
5030
  }), [
5031
5031
  n,
5032
5032
  a,
5033
- s,
5033
+ c,
5034
5034
  i
5035
5035
  ]),
5036
5036
  children: t
@@ -5049,7 +5049,7 @@ function yu(e) {
5049
5049
  }
5050
5050
  //#endregion
5051
5051
  //#region node_modules/@banou/ponyfill/build/web-audio.js
5052
- ae();
5052
+ re();
5053
5053
  var bu = (e, t) => {
5054
5054
  if (globalThis.navigator?.vendor === "Apple Computer, Inc.") throw new DOMException("A media element routed into Web Audio loses its volume and mute, or its sound, in this engine", "NotSupportedError");
5055
5055
  return e.createMediaElementSource(t);
@@ -5080,7 +5080,7 @@ var bu = (e, t) => {
5080
5080
  }) : window.classNames = n;
5081
5081
  })();
5082
5082
  }));
5083
- r(), N();
5083
+ r(), M();
5084
5084
  var Su = /* @__PURE__ */ n(xu(), 1), Cu = "react-tooltip-core-styles", wu = "react-tooltip-base-styles", Tu = {
5085
5085
  core: !1,
5086
5086
  base: !1
@@ -5094,9 +5094,9 @@ function Eu({ css: t, id: n = wu, type: r = "base", ref: i }) {
5094
5094
  s.id = n, s.type = "text/css", a === "top" && o.firstChild ? o.insertBefore(s, o.firstChild) : o.appendChild(s), s.styleSheet ? s.styleSheet.cssText = t : s.appendChild(document.createTextNode(t)), Tu[r] = !0;
5095
5095
  }
5096
5096
  var Du = async ({ elementReference: e = null, tooltipReference: t = null, tooltipArrowReference: n = null, place: r = "top", offset: i = 10, strategy: a = "absolute", middlewares: o = [
5097
- w(Number(i)),
5098
- oe({ fallbackAxisSideDirection: "start" }),
5099
- A({ padding: 5 })
5097
+ _(Number(i)),
5098
+ se({ fallbackAxisSideDirection: "start" }),
5099
+ oe({ padding: 5 })
5100
5100
  ], border: s, arrowSize: c = 8 }) => {
5101
5101
  if (!e || t === null) return {
5102
5102
  tooltipStyles: {},
@@ -5104,10 +5104,10 @@ var Du = async ({ elementReference: e = null, tooltipReference: t = null, toolti
5104
5104
  place: r
5105
5105
  };
5106
5106
  let l = o;
5107
- return n ? (l.push(O({
5107
+ return n ? (l.push(w({
5108
5108
  element: n,
5109
5109
  padding: 5
5110
- })), re(e, t, {
5110
+ })), ae(e, t, {
5111
5111
  placement: r,
5112
5112
  strategy: a,
5113
5113
  middleware: l
@@ -5144,7 +5144,7 @@ var Du = async ({ elementReference: e = null, tooltipReference: t = null, toolti
5144
5144
  },
5145
5145
  place: n
5146
5146
  };
5147
- }))) : re(e, t, {
5147
+ }))) : ae(e, t, {
5148
5148
  placement: "bottom",
5149
5149
  strategy: a,
5150
5150
  middleware: l
@@ -5192,7 +5192,7 @@ var Du = async ({ elementReference: e = null, tooltipReference: t = null, toolti
5192
5192
  t = t.parentElement;
5193
5193
  }
5194
5194
  return document.scrollingElement || document.documentElement;
5195
- }, Pu = typeof window < "u" ? b : D, Fu = (e) => {
5195
+ }, Pu = typeof window < "u" ? f : S, Fu = (e) => {
5196
5196
  e.current &&= (clearTimeout(e.current), null);
5197
5197
  }, Iu = "DEFAULT_TOOLTIP_ID", Lu = {
5198
5198
  anchorRefs: /* @__PURE__ */ new Set(),
@@ -5200,9 +5200,9 @@ var Du = async ({ elementReference: e = null, tooltipReference: t = null, toolti
5200
5200
  attach: () => {},
5201
5201
  detach: () => {},
5202
5202
  setActiveAnchor: () => {}
5203
- }, Ru = T({ getTooltipData: () => Lu });
5203
+ }, Ru = y({ getTooltipData: () => Lu });
5204
5204
  function zu(e = Iu) {
5205
- return k(Ru).getTooltipData(e);
5205
+ return ee(Ru).getTooltipData(e);
5206
5206
  }
5207
5207
  var Bu = {
5208
5208
  tooltip: "core-styles-module_tooltip__3vRRp",
@@ -5223,12 +5223,12 @@ var Bu = {
5223
5223
  warning: "styles-module_warning__SCK0X",
5224
5224
  error: "styles-module_error__JvumD",
5225
5225
  info: "styles-module_info__BWdHW"
5226
- }, Hu = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: a = "dark", anchorId: s, anchorSelect: c, place: l = "top", offset: u = 10, events: d = ["hover"], openOnClick: f = !1, positionStrategy: p = "absolute", middlewares: m, wrapper: h, delayShow: g = 0, delayHide: _ = 0, float: v = !1, hidden: y = !1, noArrow: b = !1, clickable: C = !1, closeOnEsc: w = !1, closeOnScroll: T = !1, closeOnResize: ee = !1, openEvents: E, closeEvents: O, globalCloseEvents: k, imperativeModeOnly: te, style: ne, position: A, afterShow: j, afterHide: re, disableTooltip: ie, content: N, contentWrapperRef: P, isOpen: ae, defaultIsOpen: oe = !1, setIsOpen: se, previousActiveAnchor: ce, activeAnchor: I, setActiveAnchor: L, border: le, opacity: R, arrowColor: ue, arrowSize: de = 8, role: fe = "tooltip" }) => {
5227
- let z = x(null), pe = x(null), me = x(null), he = x(null), ge = x(null), [_e, ve] = M({
5226
+ }, Hu = ({ forwardRef: e, id: t, className: n, classNameArrow: r, variant: o = "dark", anchorId: s, anchorSelect: c, place: l = "top", offset: u = 10, events: d = ["hover"], openOnClick: f = !1, positionStrategy: h = "absolute", middlewares: g, wrapper: _, delayShow: v = 0, delayHide: y = 0, float: b = !1, hidden: x = !1, noArrow: C = !1, clickable: w = !1, closeOnEsc: T = !1, closeOnScroll: E = !1, closeOnResize: ee = !1, openEvents: D, closeEvents: O, globalCloseEvents: k, imperativeModeOnly: j, style: te, position: ne, afterShow: M, afterHide: N, disableTooltip: re, content: P, contentWrapperRef: F, isOpen: ie, defaultIsOpen: ae = !1, setIsOpen: oe, previousActiveAnchor: se, activeAnchor: L, setActiveAnchor: R, border: ce, opacity: z, arrowColor: le, arrowSize: ue = 8, role: de = "tooltip" }) => {
5227
+ let B = p(null), fe = p(null), pe = p(null), me = p(null), he = p(null), [ge, _e] = A({
5228
5228
  tooltipStyles: {},
5229
5229
  tooltipArrowStyles: {},
5230
5230
  place: l
5231
- }), [B, ye] = M(!1), [be, V] = M(!1), [H, U] = M(null), xe = x(!1), W = x(null), { anchorRefs: Se, setActiveAnchor: Ce } = zu(t), we = x(!1), [Te, Ee] = M([]), De = x(!1), G = f || d.includes("click"), Oe = G || E?.click || E?.dblclick || E?.mousedown, K = E ? { ...E } : {
5231
+ }), [V, ve] = A(!1), [ye, H] = A(!1), [U, W] = A(null), be = p(!1), G = p(null), { anchorRefs: xe, setActiveAnchor: Se } = zu(t), Ce = p(!1), [we, Te] = A([]), Ee = p(!1), De = f || d.includes("click"), Oe = De || D?.click || D?.dblclick || D?.mousedown, K = D ? { ...D } : {
5232
5232
  mouseover: !0,
5233
5233
  focus: !0,
5234
5234
  mouseenter: !1,
@@ -5236,7 +5236,7 @@ var Bu = {
5236
5236
  dblclick: !1,
5237
5237
  mousedown: !1
5238
5238
  };
5239
- !E && G && Object.assign(K, {
5239
+ !D && De && Object.assign(K, {
5240
5240
  mouseenter: !1,
5241
5241
  focus: !1,
5242
5242
  mouseover: !1,
@@ -5250,18 +5250,18 @@ var Bu = {
5250
5250
  dblclick: !1,
5251
5251
  mouseup: !1
5252
5252
  };
5253
- !O && G && Object.assign(ke, {
5253
+ !O && De && Object.assign(ke, {
5254
5254
  mouseleave: !1,
5255
5255
  blur: !1,
5256
5256
  mouseout: !1
5257
5257
  });
5258
5258
  let q = k ? { ...k } : {
5259
- escape: w || !1,
5260
- scroll: T || !1,
5259
+ escape: T || !1,
5260
+ scroll: E || !1,
5261
5261
  resize: ee || !1,
5262
5262
  clickOutsideAnchor: Oe || !1
5263
5263
  };
5264
- te && (Object.assign(K, {
5264
+ j && (Object.assign(K, {
5265
5265
  mouseover: !1,
5266
5266
  focus: !1,
5267
5267
  mouseenter: !1,
@@ -5280,23 +5280,23 @@ var Bu = {
5280
5280
  scroll: !1,
5281
5281
  resize: !1,
5282
5282
  clickOutsideAnchor: !1
5283
- })), Pu((() => (De.current = !0, () => {
5284
- De.current = !1;
5283
+ })), Pu((() => (Ee.current = !0, () => {
5284
+ Ee.current = !1;
5285
5285
  })), []);
5286
5286
  let Ae = (e) => {
5287
- De.current && (e && V(!0), setTimeout((() => {
5288
- De.current && (se?.(e), ae === void 0 && ye(e));
5287
+ Ee.current && (e && H(!0), setTimeout((() => {
5288
+ Ee.current && (oe?.(e), ie === void 0 && ve(e));
5289
5289
  }), 10));
5290
5290
  };
5291
- D((() => {
5291
+ S((() => {
5292
5292
  if (t) {
5293
- if (B) {
5294
- n(ce);
5295
- let r = e(I), i = [.../* @__PURE__ */ new Set([...r, t])].filter(Boolean).join(" ");
5296
- I?.setAttribute("aria-describedby", i);
5297
- } else n(I);
5293
+ if (V) {
5294
+ n(se);
5295
+ let r = e(L), i = [.../* @__PURE__ */ new Set([...r, t])].filter(Boolean).join(" ");
5296
+ L?.setAttribute("aria-describedby", i);
5297
+ } else n(L);
5298
5298
  return () => {
5299
- n(I), n(ce);
5299
+ n(L), n(se);
5300
5300
  };
5301
5301
  }
5302
5302
  function e(e) {
@@ -5307,22 +5307,22 @@ var Bu = {
5307
5307
  r.length ? n?.setAttribute("aria-describedby", r.join(" ")) : n?.removeAttribute("aria-describedby");
5308
5308
  }
5309
5309
  }), [
5310
- I,
5311
- B,
5310
+ L,
5311
+ V,
5312
5312
  t,
5313
- ce
5314
- ]), D((() => {
5315
- if (ae === void 0) return () => null;
5316
- ae && V(!0);
5313
+ se
5314
+ ]), S((() => {
5315
+ if (ie === void 0) return () => null;
5316
+ ie && H(!0);
5317
5317
  let e = setTimeout((() => {
5318
- ye(ae);
5318
+ ve(ie);
5319
5319
  }), 10);
5320
5320
  return () => {
5321
5321
  clearTimeout(e);
5322
5322
  };
5323
- }), [ae]), D((() => {
5324
- if (B !== xe.current) {
5325
- if (Fu(ge), xe.current = B, B) j?.();
5323
+ }), [ie]), S((() => {
5324
+ if (V !== be.current) {
5325
+ if (Fu(he), be.current = V, V) M?.();
5326
5326
  else {
5327
5327
  let e = ((e) => {
5328
5328
  let t = e.match(/^([\d.]+)(ms|s)$/);
@@ -5330,32 +5330,32 @@ var Bu = {
5330
5330
  let [, n, r] = t;
5331
5331
  return Number(n) * (r === "ms" ? 1 : 1e3);
5332
5332
  })(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));
5333
- ge.current = setTimeout((() => {
5334
- V(!1), U(null), re?.();
5333
+ he.current = setTimeout((() => {
5334
+ H(!1), W(null), N?.();
5335
5335
  }), e + 25);
5336
5336
  }
5337
5337
  }
5338
- }), [B]);
5338
+ }), [V]);
5339
5339
  let je = (e) => {
5340
- ve(((t) => ju(t, e) ? t : e));
5341
- }, Me = (e = g) => {
5342
- Fu(me), be ? Ae(!0) : me.current = setTimeout((() => {
5340
+ _e(((t) => ju(t, e) ? t : e));
5341
+ }, Me = (e = v) => {
5342
+ Fu(pe), ye ? Ae(!0) : pe.current = setTimeout((() => {
5343
5343
  Ae(!0);
5344
5344
  }), e);
5345
- }, Ne = (e = _) => {
5346
- Fu(he), he.current = setTimeout((() => {
5347
- we.current || Ae(!1);
5345
+ }, Ne = (e = y) => {
5346
+ Fu(me), me.current = setTimeout((() => {
5347
+ Ce.current || Ae(!1);
5348
5348
  }), e);
5349
5349
  }, Pe = (e) => {
5350
5350
  if (!e) return;
5351
5351
  let t = e.currentTarget ?? e.target;
5352
- if (!t?.isConnected) return L(null), void Ce({ current: null });
5353
- g ? Me() : Ae(!0), L(t), Ce({ current: t }), Fu(he);
5352
+ if (!t?.isConnected) return R(null), void Se({ current: null });
5353
+ v ? Me() : Ae(!0), R(t), Se({ current: t }), Fu(me);
5354
5354
  }, Fe = () => {
5355
- C ? Ne(_ || 100) : _ ? Ne() : Ae(!1), Fu(me);
5355
+ w ? Ne(y || 100) : y ? Ne() : Ae(!1), Fu(pe);
5356
5356
  }, Ie = ({ x: e, y: t }) => {
5357
5357
  Du({
5358
- place: H?.place ?? l,
5358
+ place: U?.place ?? l,
5359
5359
  offset: u,
5360
5360
  elementReference: { getBoundingClientRect: () => ({
5361
5361
  x: e,
@@ -5367,12 +5367,12 @@ var Bu = {
5367
5367
  right: e,
5368
5368
  bottom: t
5369
5369
  }) },
5370
- tooltipReference: z.current,
5371
- tooltipArrowReference: pe.current,
5372
- strategy: p,
5373
- middlewares: m,
5374
- border: le,
5375
- arrowSize: de
5370
+ tooltipReference: B.current,
5371
+ tooltipArrowReference: fe.current,
5372
+ strategy: h,
5373
+ middlewares: g,
5374
+ border: ce,
5375
+ arrowSize: ue
5376
5376
  }).then(((e) => {
5377
5377
  je(e);
5378
5378
  }));
@@ -5382,58 +5382,58 @@ var Bu = {
5382
5382
  x: t.clientX,
5383
5383
  y: t.clientY
5384
5384
  };
5385
- Ie(n), W.current = n;
5385
+ Ie(n), G.current = n;
5386
5386
  }, Re = (e) => {
5387
- if (!B) return;
5387
+ if (!V) return;
5388
5388
  let t = e.target;
5389
- t.isConnected && (z.current?.contains(t) || [document.querySelector(`[id='${s}']`), ...Te].some(((e) => e?.contains(t))) || (Ae(!1), Fu(me)));
5389
+ t.isConnected && (B.current?.contains(t) || [document.querySelector(`[id='${s}']`), ...we].some(((e) => e?.contains(t))) || (Ae(!1), Fu(pe)));
5390
5390
  }, ze = ku(Pe, 50, !0), Be = ku(Fe, 50, !0), Ve = (e) => {
5391
5391
  Be.cancel(), ze(e);
5392
5392
  }, He = () => {
5393
5393
  ze.cancel(), Be();
5394
- }, Ue = F((() => {
5395
- let e = H?.position ?? A;
5396
- e ? Ie(e) : v ? W.current && Ie(W.current) : I != null && I.isConnected && Du({
5397
- place: H?.place ?? l,
5394
+ }, Ue = I((() => {
5395
+ let e = U?.position ?? ne;
5396
+ e ? Ie(e) : b ? G.current && Ie(G.current) : L != null && L.isConnected && Du({
5397
+ place: U?.place ?? l,
5398
5398
  offset: u,
5399
- elementReference: I,
5400
- tooltipReference: z.current,
5401
- tooltipArrowReference: pe.current,
5402
- strategy: p,
5403
- middlewares: m,
5404
- border: le,
5405
- arrowSize: de
5399
+ elementReference: L,
5400
+ tooltipReference: B.current,
5401
+ tooltipArrowReference: fe.current,
5402
+ strategy: h,
5403
+ middlewares: g,
5404
+ border: ce,
5405
+ arrowSize: ue
5406
5406
  }).then(((e) => {
5407
- De.current && je(e);
5407
+ Ee.current && je(e);
5408
5408
  }));
5409
5409
  }), [
5410
- B,
5411
- I,
5412
- N,
5413
- ne,
5410
+ V,
5411
+ L,
5412
+ P,
5413
+ te,
5414
5414
  l,
5415
- H?.place,
5415
+ U?.place,
5416
5416
  u,
5417
- p,
5418
- A,
5419
- H?.position,
5420
- v,
5421
- de
5417
+ h,
5418
+ ne,
5419
+ U?.position,
5420
+ b,
5421
+ ue
5422
5422
  ]);
5423
- D((() => {
5423
+ S((() => {
5424
5424
  var e, t;
5425
- let n = new Set(Se);
5426
- Te.forEach(((e) => {
5427
- ie != null && ie(e) || n.add({ current: e });
5425
+ let n = new Set(xe);
5426
+ we.forEach(((e) => {
5427
+ re != null && re(e) || n.add({ current: e });
5428
5428
  }));
5429
5429
  let r = document.querySelector(`[id='${s}']`);
5430
- r && !(ie != null && ie(r)) && n.add({ current: r });
5430
+ r && !(re != null && re(r)) && n.add({ current: r });
5431
5431
  let i = () => {
5432
5432
  Ae(!1);
5433
- }, a = Nu(I), o = Nu(z.current);
5433
+ }, a = Nu(L), o = Nu(B.current);
5434
5434
  q.scroll && (window.addEventListener("scroll", i), a?.addEventListener("scroll", i), o?.addEventListener("scroll", i));
5435
5435
  let c = null;
5436
- q.resize ? window.addEventListener("resize", i) : I && z.current && (c = S(I, z.current, Ue, {
5436
+ q.resize ? window.addEventListener("resize", i) : L && B.current && (c = m(L, B.current, Ue, {
5437
5437
  ancestorResize: !0,
5438
5438
  elementResize: !0,
5439
5439
  layoutShift: !0
@@ -5442,56 +5442,56 @@ var Bu = {
5442
5442
  e.key === "Escape" && Ae(!1);
5443
5443
  };
5444
5444
  q.escape && window.addEventListener("keydown", l), q.clickOutsideAnchor && window.addEventListener("click", Re);
5445
- let u = [], d = (e) => !!(e?.target && I?.contains(e.target)), f = (e) => {
5446
- B && d(e) || Pe(e);
5445
+ let u = [], d = (e) => !!(e?.target && L?.contains(e.target)), f = (e) => {
5446
+ V && d(e) || Pe(e);
5447
5447
  }, p = (e) => {
5448
- B && d(e) && Fe();
5449
- }, m = [
5448
+ V && d(e) && Fe();
5449
+ }, h = [
5450
5450
  "mouseover",
5451
5451
  "mouseout",
5452
5452
  "mouseenter",
5453
5453
  "mouseleave",
5454
5454
  "focus",
5455
5455
  "blur"
5456
- ], h = [
5456
+ ], g = [
5457
5457
  "click",
5458
5458
  "dblclick",
5459
5459
  "mousedown",
5460
5460
  "mouseup"
5461
5461
  ];
5462
5462
  Object.entries(K).forEach((([e, t]) => {
5463
- t && (m.includes(e) ? u.push({
5463
+ t && (h.includes(e) ? u.push({
5464
5464
  event: e,
5465
5465
  listener: Ve
5466
- }) : h.includes(e) && u.push({
5466
+ }) : g.includes(e) && u.push({
5467
5467
  event: e,
5468
5468
  listener: f
5469
5469
  }));
5470
5470
  })), Object.entries(ke).forEach((([e, t]) => {
5471
- t && (m.includes(e) ? u.push({
5471
+ t && (h.includes(e) ? u.push({
5472
5472
  event: e,
5473
5473
  listener: He
5474
- }) : h.includes(e) && u.push({
5474
+ }) : g.includes(e) && u.push({
5475
5475
  event: e,
5476
5476
  listener: p
5477
5477
  }));
5478
- })), v && u.push({
5478
+ })), b && u.push({
5479
5479
  event: "pointermove",
5480
5480
  listener: Le
5481
5481
  });
5482
- let g = () => {
5483
- we.current = !0;
5484
- }, _ = () => {
5485
- we.current = !1, Fe();
5486
- }, y = C && (ke.mouseout || ke.mouseleave);
5487
- return y && ((e = z.current) == null || e.addEventListener("mouseover", g), (t = z.current) == null || t.addEventListener("mouseout", _)), u.forEach((({ event: e, listener: t }) => {
5482
+ let _ = () => {
5483
+ Ce.current = !0;
5484
+ }, v = () => {
5485
+ Ce.current = !1, Fe();
5486
+ }, y = w && (ke.mouseout || ke.mouseleave);
5487
+ return y && ((e = B.current) == null || e.addEventListener("mouseover", _), (t = B.current) == null || t.addEventListener("mouseout", v)), u.forEach((({ event: e, listener: t }) => {
5488
5488
  n.forEach(((n) => {
5489
5489
  var r;
5490
5490
  (r = n.current) == null || r.addEventListener(e, t);
5491
5491
  }));
5492
5492
  })), () => {
5493
5493
  var e, t;
5494
- q.scroll && (window.removeEventListener("scroll", i), a?.removeEventListener("scroll", i), o?.removeEventListener("scroll", i)), q.resize ? window.removeEventListener("resize", i) : c?.(), q.clickOutsideAnchor && window.removeEventListener("click", Re), q.escape && window.removeEventListener("keydown", l), y && ((e = z.current) == null || e.removeEventListener("mouseover", g), (t = z.current) == null || t.removeEventListener("mouseout", _)), u.forEach((({ event: e, listener: t }) => {
5494
+ q.scroll && (window.removeEventListener("scroll", i), a?.removeEventListener("scroll", i), o?.removeEventListener("scroll", i)), q.resize ? window.removeEventListener("resize", i) : c?.(), q.clickOutsideAnchor && window.removeEventListener("click", Re), q.escape && window.removeEventListener("keydown", l), y && ((e = B.current) == null || e.removeEventListener("mouseover", _), (t = B.current) == null || t.removeEventListener("mouseout", v)), u.forEach((({ event: e, listener: t }) => {
5495
5495
  n.forEach(((n) => {
5496
5496
  var r;
5497
5497
  (r = n.current) == null || r.removeEventListener(e, t);
@@ -5499,37 +5499,37 @@ var Bu = {
5499
5499
  }));
5500
5500
  };
5501
5501
  }), [
5502
- I,
5502
+ L,
5503
5503
  Ue,
5504
- be,
5505
- Se,
5506
- Te,
5507
- E,
5504
+ ye,
5505
+ xe,
5506
+ we,
5507
+ D,
5508
5508
  O,
5509
5509
  k,
5510
- G,
5511
- g,
5512
- _
5513
- ]), D((() => {
5514
- let e = H?.anchorSelect ?? c ?? "";
5510
+ De,
5511
+ v,
5512
+ y
5513
+ ]), S((() => {
5514
+ let e = U?.anchorSelect ?? c ?? "";
5515
5515
  !e && t && (e = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`);
5516
5516
  let n = new MutationObserver(((n) => {
5517
5517
  let r = [], i = [];
5518
5518
  n.forEach(((n) => {
5519
5519
  if (n.type === "attributes" && n.attributeName === "data-tooltip-id" && (n.target.getAttribute("data-tooltip-id") === t ? r.push(n.target) : n.oldValue === t && i.push(n.target)), n.type === "childList") {
5520
- if (I) {
5520
+ if (L) {
5521
5521
  let t = [...n.removedNodes].filter(((e) => e.nodeType === 1));
5522
5522
  if (e) try {
5523
5523
  i.push(...t.filter(((t) => t.matches(e)))), i.push(...t.flatMap(((t) => [...t.querySelectorAll(e)])));
5524
5524
  } catch {}
5525
- t.some(((e) => !!(e?.contains)?.call(e, I) && (V(!1), Ae(!1), L(null), Fu(me), Fu(he), !0)));
5525
+ t.some(((e) => !!(e?.contains)?.call(e, L) && (H(!1), Ae(!1), R(null), Fu(pe), Fu(me), !0)));
5526
5526
  }
5527
5527
  if (e) try {
5528
5528
  let t = [...n.addedNodes].filter(((e) => e.nodeType === 1));
5529
5529
  r.push(...t.filter(((t) => t.matches(e)))), r.push(...t.flatMap(((t) => [...t.querySelectorAll(e)])));
5530
5530
  } catch {}
5531
5531
  }
5532
- })), (r.length || i.length) && Ee(((e) => [...e.filter(((e) => !i.includes(e))), ...r]));
5532
+ })), (r.length || i.length) && Te(((e) => [...e.filter(((e) => !i.includes(e))), ...r]));
5533
5533
  }));
5534
5534
  return n.observe(document.body, {
5535
5535
  childList: !0,
@@ -5543,43 +5543,43 @@ var Bu = {
5543
5543
  }), [
5544
5544
  t,
5545
5545
  c,
5546
- H?.anchorSelect,
5547
- I
5548
- ]), D((() => {
5546
+ U?.anchorSelect,
5547
+ L
5548
+ ]), S((() => {
5549
5549
  Ue();
5550
- }), [Ue]), D((() => {
5551
- if (!P?.current) return () => null;
5550
+ }), [Ue]), S((() => {
5551
+ if (!F?.current) return () => null;
5552
5552
  let e = new ResizeObserver((() => {
5553
5553
  setTimeout((() => Ue()));
5554
5554
  }));
5555
- return e.observe(P.current), () => {
5555
+ return e.observe(F.current), () => {
5556
5556
  e.disconnect();
5557
5557
  };
5558
- }), [N, P?.current]), D((() => {
5559
- let e = document.querySelector(`[id='${s}']`), t = [...Te, e];
5560
- I && t.includes(I) || L(Te[0] ?? e);
5558
+ }), [P, F?.current]), S((() => {
5559
+ let e = document.querySelector(`[id='${s}']`), t = [...we, e];
5560
+ L && t.includes(L) || R(we[0] ?? e);
5561
5561
  }), [
5562
5562
  s,
5563
- Te,
5564
- I
5565
- ]), D((() => (oe && Ae(!0), () => {
5566
- Fu(me), Fu(he);
5567
- })), []), D((() => {
5568
- let e = H?.anchorSelect ?? c;
5563
+ we,
5564
+ L
5565
+ ]), S((() => (ae && Ae(!0), () => {
5566
+ Fu(pe), Fu(me);
5567
+ })), []), S((() => {
5568
+ let e = U?.anchorSelect ?? c;
5569
5569
  if (!e && t && (e = `[data-tooltip-id='${t.replace(/'/g, "\\'")}']`), e) try {
5570
5570
  let t = Array.from(document.querySelectorAll(e));
5571
- Ee(t);
5571
+ Te(t);
5572
5572
  } catch {
5573
- Ee([]);
5573
+ Te([]);
5574
5574
  }
5575
5575
  }), [
5576
5576
  t,
5577
5577
  c,
5578
- H?.anchorSelect
5579
- ]), D((() => {
5580
- me.current && (Fu(me), Me(g));
5581
- }), [g]);
5582
- let We = H?.content ?? N, Ge = B && Object.keys(_e.tooltipStyles).length > 0;
5578
+ U?.anchorSelect
5579
+ ]), S((() => {
5580
+ pe.current && (Fu(pe), Me(v));
5581
+ }), [v]);
5582
+ let We = U?.content ?? P, Ge = V && Object.keys(ge.tooltipStyles).length > 0;
5583
5583
  return i(e, (() => ({
5584
5584
  open: (e) => {
5585
5585
  if (e?.anchorSelect) try {
@@ -5588,75 +5588,75 @@ var Bu = {
5588
5588
  console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`);
5589
5589
  return;
5590
5590
  }
5591
- U(e ?? null), e?.delay ? Me(e.delay) : Ae(!0);
5591
+ W(e ?? null), e?.delay ? Me(e.delay) : Ae(!0);
5592
5592
  },
5593
5593
  close: (e) => {
5594
5594
  e?.delay ? Ne(e.delay) : Ae(!1);
5595
5595
  },
5596
- activeAnchor: I,
5597
- place: _e.place,
5598
- isOpen: !!(be && !y && We && Ge)
5599
- }))), be && !y && We ? o.createElement(h, {
5596
+ activeAnchor: L,
5597
+ place: ge.place,
5598
+ isOpen: !!(ye && !x && We && Ge)
5599
+ }))), ye && !x && We ? a.createElement(_, {
5600
5600
  id: t,
5601
- role: fe,
5602
- className: (0, Su.default)("react-tooltip", Bu.tooltip, Vu.tooltip, Vu[a], n, `react-tooltip__place-${_e.place}`, Bu[Ge ? "show" : "closing"], Ge ? "react-tooltip__show" : "react-tooltip__closing", p === "fixed" && Bu.fixed, C && Bu.clickable),
5601
+ role: de,
5602
+ className: (0, Su.default)("react-tooltip", Bu.tooltip, Vu.tooltip, Vu[o], n, `react-tooltip__place-${ge.place}`, Bu[Ge ? "show" : "closing"], Ge ? "react-tooltip__show" : "react-tooltip__closing", h === "fixed" && Bu.fixed, w && Bu.clickable),
5603
5603
  onTransitionEnd: (e) => {
5604
- Fu(ge), B || e.propertyName !== "opacity" || (V(!1), U(null), re?.());
5604
+ Fu(he), V || e.propertyName !== "opacity" || (H(!1), W(null), N?.());
5605
5605
  },
5606
5606
  style: {
5607
- ...ne,
5608
- ..._e.tooltipStyles,
5609
- opacity: R !== void 0 && Ge ? R : void 0
5607
+ ...te,
5608
+ ...ge.tooltipStyles,
5609
+ opacity: z !== void 0 && Ge ? z : void 0
5610
5610
  },
5611
- ref: z
5612
- }, o.createElement(h, { className: (0, Su.default)("react-tooltip-content-wrapper", Bu.content, Vu.content) }, We), o.createElement(h, {
5613
- className: (0, Su.default)("react-tooltip-arrow", Bu.arrow, Vu.arrow, r, b && Bu.noArrow),
5611
+ ref: B
5612
+ }, a.createElement(_, { className: (0, Su.default)("react-tooltip-content-wrapper", Bu.content, Vu.content) }, We), a.createElement(_, {
5613
+ className: (0, Su.default)("react-tooltip-arrow", Bu.arrow, Vu.arrow, r, C && Bu.noArrow),
5614
5614
  style: {
5615
- ..._e.tooltipArrowStyles,
5616
- background: ue ? `linear-gradient(to right bottom, transparent 50%, ${ue} 50%)` : void 0,
5617
- "--rt-arrow-size": `${de}px`
5615
+ ...ge.tooltipArrowStyles,
5616
+ background: le ? `linear-gradient(to right bottom, transparent 50%, ${le} 50%)` : void 0,
5617
+ "--rt-arrow-size": `${ue}px`
5618
5618
  },
5619
- ref: pe
5619
+ ref: fe
5620
5620
  })) : null;
5621
- }, Uu = ({ content: e }) => o.createElement("span", { dangerouslySetInnerHTML: { __html: e } }), Wu = o.forwardRef((({ id: e, anchorId: t, anchorSelect: n, content: r, html: i, render: a, className: s, classNameArrow: c, variant: l = "dark", place: u = "top", offset: d = 10, wrapper: f = "div", children: p = null, events: m = ["hover"], openOnClick: h = !1, positionStrategy: g = "absolute", middlewares: _, delayShow: v = 0, delayHide: y = 0, float: b = !1, hidden: S = !1, noArrow: C = !1, clickable: w = !1, closeOnEsc: T = !1, closeOnScroll: ee = !1, closeOnResize: E = !1, openEvents: O, closeEvents: k, globalCloseEvents: te, imperativeModeOnly: ne = !1, style: A, position: j, isOpen: re, defaultIsOpen: ie = !1, disableStyleInjection: N = !1, border: P, opacity: ae, arrowColor: oe, arrowSize: se, setIsOpen: F, afterShow: ce, afterHide: I, disableTooltip: L, role: le = "tooltip" }, R) => {
5622
- let [ue, de] = M(r), [fe, z] = M(i), [pe, me] = M(u), [he, ge] = M(l), [_e, ve] = M(d), [B, ye] = M(v), [be, V] = M(y), [H, U] = M(b), [xe, W] = M(S), [Se, Ce] = M(f), [we, Te] = M(m), [Ee, De] = M(g), [G, Oe] = M(null), [K, ke] = M(null), q = x(null), Ae = x(N), { anchorRefs: je, activeAnchor: Me } = zu(e), Ne = (e) => e?.getAttributeNames().reduce(((t, n) => (n.startsWith("data-tooltip-") && (t[n.replace(/^data-tooltip-/, "")] = e?.getAttribute(n) ?? null), t)), {}), Pe = (e) => {
5621
+ }, Uu = ({ content: e }) => a.createElement("span", { dangerouslySetInnerHTML: { __html: e } }), Wu = a.forwardRef((({ id: e, anchorId: t, anchorSelect: n, content: r, html: i, render: o, className: s, classNameArrow: c, variant: l = "dark", place: u = "top", offset: d = 10, wrapper: f = "div", children: m = null, events: h = ["hover"], openOnClick: g = !1, positionStrategy: _ = "absolute", middlewares: v, delayShow: y = 0, delayHide: b = 0, float: x = !1, hidden: C = !1, noArrow: w = !1, clickable: T = !1, closeOnEsc: E = !1, closeOnScroll: ee = !1, closeOnResize: D = !1, openEvents: O, closeEvents: k, globalCloseEvents: j, imperativeModeOnly: te = !1, style: ne, position: M, isOpen: N, defaultIsOpen: re = !1, disableStyleInjection: P = !1, border: F, opacity: I, arrowColor: ie, arrowSize: ae, setIsOpen: oe, afterShow: se, afterHide: L, disableTooltip: R, role: ce = "tooltip" }, z) => {
5622
+ let [le, ue] = A(r), [de, B] = A(i), [fe, pe] = A(u), [me, he] = A(l), [ge, _e] = A(d), [V, ve] = A(y), [ye, H] = A(b), [U, W] = A(x), [be, G] = A(C), [xe, Se] = A(f), [Ce, we] = A(h), [Te, Ee] = A(_), [De, Oe] = A(null), [K, ke] = A(null), q = p(null), Ae = p(P), { anchorRefs: je, activeAnchor: Me } = zu(e), Ne = (e) => e?.getAttributeNames().reduce(((t, n) => (n.startsWith("data-tooltip-") && (t[n.replace(/^data-tooltip-/, "")] = e?.getAttribute(n) ?? null), t)), {}), Pe = (e) => {
5623
5623
  let t = {
5624
5624
  place: (e) => {
5625
- me(e ?? u);
5625
+ pe(e ?? u);
5626
5626
  },
5627
5627
  content: (e) => {
5628
- de(e ?? r);
5628
+ ue(e ?? r);
5629
5629
  },
5630
5630
  html: (e) => {
5631
- z(e ?? i);
5631
+ B(e ?? i);
5632
5632
  },
5633
5633
  variant: (e) => {
5634
- ge(e ?? l);
5634
+ he(e ?? l);
5635
5635
  },
5636
5636
  offset: (e) => {
5637
- ve(e === null ? d : Number(e));
5637
+ _e(e === null ? d : Number(e));
5638
5638
  },
5639
5639
  wrapper: (e) => {
5640
- Ce(e ?? f);
5640
+ Se(e ?? f);
5641
5641
  },
5642
5642
  events: (e) => {
5643
5643
  let t = e?.split(" ");
5644
- Te(t ?? m);
5644
+ we(t ?? h);
5645
5645
  },
5646
5646
  "position-strategy": (e) => {
5647
- De(e ?? g);
5647
+ Ee(e ?? _);
5648
5648
  },
5649
5649
  "delay-show": (e) => {
5650
- ye(e === null ? v : Number(e));
5650
+ ve(e === null ? y : Number(e));
5651
5651
  },
5652
5652
  "delay-hide": (e) => {
5653
- V(e === null ? y : Number(e));
5653
+ H(e === null ? b : Number(e));
5654
5654
  },
5655
5655
  float: (e) => {
5656
- U(e === null ? b : e === "true");
5656
+ W(e === null ? x : e === "true");
5657
5657
  },
5658
5658
  hidden: (e) => {
5659
- W(e === null ? S : e === "true");
5659
+ G(e === null ? C : e === "true");
5660
5660
  },
5661
5661
  "class-name": (e) => {
5662
5662
  Oe(e);
@@ -5667,34 +5667,34 @@ var Bu = {
5667
5667
  (r = t[e]) == null || r.call(t, n);
5668
5668
  }));
5669
5669
  };
5670
- D((() => {
5671
- de(r);
5672
- }), [r]), D((() => {
5673
- z(i);
5674
- }), [i]), D((() => {
5675
- me(u);
5676
- }), [u]), D((() => {
5677
- ge(l);
5678
- }), [l]), D((() => {
5679
- ve(d);
5680
- }), [d]), D((() => {
5681
- ye(v);
5682
- }), [v]), D((() => {
5683
- V(y);
5684
- }), [y]), D((() => {
5685
- U(b);
5686
- }), [b]), D((() => {
5687
- W(S);
5688
- }), [S]), D((() => {
5689
- De(g);
5690
- }), [g]), D((() => {
5691
- Ae.current !== N && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
5692
- }), [N]), D((() => {
5670
+ S((() => {
5671
+ ue(r);
5672
+ }), [r]), S((() => {
5673
+ B(i);
5674
+ }), [i]), S((() => {
5675
+ pe(u);
5676
+ }), [u]), S((() => {
5677
+ he(l);
5678
+ }), [l]), S((() => {
5679
+ _e(d);
5680
+ }), [d]), S((() => {
5681
+ ve(y);
5682
+ }), [y]), S((() => {
5683
+ H(b);
5684
+ }), [b]), S((() => {
5685
+ W(x);
5686
+ }), [x]), S((() => {
5687
+ G(C);
5688
+ }), [C]), S((() => {
5689
+ Ee(_);
5690
+ }), [_]), S((() => {
5691
+ Ae.current !== P && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
5692
+ }), [P]), S((() => {
5693
5693
  typeof window < "u" && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", { detail: {
5694
- disableCore: N === "core",
5695
- disableBase: N
5694
+ disableCore: P === "core",
5695
+ disableBase: P
5696
5696
  } }));
5697
- }), []), D((() => {
5697
+ }), []), S((() => {
5698
5698
  let r = new Set(je), i = n;
5699
5699
  if (!i && e && (i = `[data-tooltip-id='${e.replace(/'/g, "\\'")}']`), i) try {
5700
5700
  document.querySelectorAll(i).forEach(((e) => {
@@ -5729,71 +5729,71 @@ var Bu = {
5729
5729
  K,
5730
5730
  t,
5731
5731
  n
5732
- ]), D((() => {
5733
- A != null && A.border && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), P && !Ou("border", `${P}`) && console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`), A != null && A.opacity && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), ae && !Ou("opacity", `${ae}`) && console.warn(`[react-tooltip] "${ae}" is not a valid \`opacity\`.`);
5732
+ ]), S((() => {
5733
+ ne != null && ne.border && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), F && !Ou("border", `${F}`) && console.warn(`[react-tooltip] "${F}" is not a valid \`border\`.`), ne != null && ne.opacity && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), I && !Ou("opacity", `${I}`) && console.warn(`[react-tooltip] "${I}" is not a valid \`opacity\`.`);
5734
5734
  }), []);
5735
- let Fe = p, Ie = x(null);
5736
- if (a) {
5737
- let e = a({
5738
- content: K?.getAttribute("data-tooltip-content") || ue || null,
5735
+ let Fe = m, Ie = p(null);
5736
+ if (o) {
5737
+ let e = o({
5738
+ content: K?.getAttribute("data-tooltip-content") || le || null,
5739
5739
  activeAnchor: K
5740
5740
  });
5741
- Fe = e ? o.createElement("div", {
5741
+ Fe = e ? a.createElement("div", {
5742
5742
  ref: Ie,
5743
5743
  className: "react-tooltip-content-wrapper"
5744
5744
  }, e) : null;
5745
- } else ue && (Fe = ue);
5746
- fe && (Fe = o.createElement(Uu, { content: fe }));
5745
+ } else le && (Fe = le);
5746
+ de && (Fe = a.createElement(Uu, { content: de }));
5747
5747
  let Le = {
5748
- forwardRef: R,
5748
+ forwardRef: z,
5749
5749
  id: e,
5750
5750
  anchorId: t,
5751
5751
  anchorSelect: n,
5752
- className: (0, Su.default)(s, G),
5752
+ className: (0, Su.default)(s, De),
5753
5753
  classNameArrow: c,
5754
5754
  content: Fe,
5755
5755
  contentWrapperRef: Ie,
5756
- place: pe,
5757
- variant: he,
5758
- offset: _e,
5759
- wrapper: Se,
5760
- events: we,
5761
- openOnClick: h,
5762
- positionStrategy: Ee,
5763
- middlewares: _,
5764
- delayShow: B,
5765
- delayHide: be,
5766
- float: H,
5767
- hidden: xe,
5768
- noArrow: C,
5769
- clickable: w,
5770
- closeOnEsc: T,
5756
+ place: fe,
5757
+ variant: me,
5758
+ offset: ge,
5759
+ wrapper: xe,
5760
+ events: Ce,
5761
+ openOnClick: g,
5762
+ positionStrategy: Te,
5763
+ middlewares: v,
5764
+ delayShow: V,
5765
+ delayHide: ye,
5766
+ float: U,
5767
+ hidden: be,
5768
+ noArrow: w,
5769
+ clickable: T,
5770
+ closeOnEsc: E,
5771
5771
  closeOnScroll: ee,
5772
- closeOnResize: E,
5772
+ closeOnResize: D,
5773
5773
  openEvents: O,
5774
5774
  closeEvents: k,
5775
- globalCloseEvents: te,
5776
- imperativeModeOnly: ne,
5777
- style: A,
5778
- position: j,
5779
- isOpen: re,
5780
- defaultIsOpen: ie,
5781
- border: P,
5782
- opacity: ae,
5783
- arrowColor: oe,
5784
- arrowSize: se,
5785
- setIsOpen: F,
5786
- afterShow: ce,
5787
- afterHide: I,
5788
- disableTooltip: L,
5775
+ globalCloseEvents: j,
5776
+ imperativeModeOnly: te,
5777
+ style: ne,
5778
+ position: M,
5779
+ isOpen: N,
5780
+ defaultIsOpen: re,
5781
+ border: F,
5782
+ opacity: I,
5783
+ arrowColor: ie,
5784
+ arrowSize: ae,
5785
+ setIsOpen: oe,
5786
+ afterShow: se,
5787
+ afterHide: L,
5788
+ disableTooltip: R,
5789
5789
  activeAnchor: K,
5790
5790
  previousActiveAnchor: q.current,
5791
5791
  setActiveAnchor: (e) => {
5792
5792
  ke(((t) => (e != null && e.isSameNode(t) || (q.current = t), e)));
5793
5793
  },
5794
- role: le
5794
+ role: ce
5795
5795
  };
5796
- return o.createElement(Hu, { ...Le });
5796
+ return a.createElement(Hu, { ...Le });
5797
5797
  }));
5798
5798
  //#endregion
5799
5799
  //#region node_modules/@banou/media-player/dist/index.js
@@ -5805,7 +5805,7 @@ typeof window < "u" && window.addEventListener("react-tooltip-inject-styles", ((
5805
5805
  css: "\n.styles-module_tooltip__mnnfp{border-radius:3px;font-size:90%;width:max-content}.styles-module_content__ydYdI{background:inherit;border-radius:inherit;padding:8px 16px}.styles-module_arrow__K0L3T{width:var(--rt-arrow-size);height:var(--rt-arrow-size)}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}",
5806
5806
  type: "base"
5807
5807
  });
5808
- })), N();
5808
+ })), M();
5809
5809
  var Gu = {
5810
5810
  indexes: [],
5811
5811
  chapters: [],
@@ -5818,6 +5818,7 @@ var Gu = {
5818
5818
  audioTracks: [],
5819
5819
  selectedAudioTrack: void 0,
5820
5820
  selectAudioTrack: () => {},
5821
+ quality: null,
5821
5822
  hideUI: !1,
5822
5823
  setHideUI: () => {},
5823
5824
  hasMedia: !1,
@@ -5883,30 +5884,30 @@ var Gu = {
5883
5884
  }
5884
5885
  return t.length ? t.join("\n") : void 0;
5885
5886
  }, id = (e, t, n) => {
5886
- let r = $(), { read: i, size: a, publicPath: o = "", libavWorkerUrl: s = "", jassubWorkerUrl: c = "", jassubWasmUrl: l = "", jassubLegacyWasmUrl: u, defaultFontUrl: d, bufferSize: f, autoplay: p = !1, chapters: m, seekPrepareBudgetMs: h = ed } = n ?? {}, g = x(m);
5887
- g.current = m;
5888
- let [_, v] = M(void 0), [y, b] = M(0), S = x({
5887
+ let r = $(), { read: i, size: a, publicPath: o = "", libavWorkerUrl: s = "", jassubWorkerUrl: c = "", jassubWasmUrl: l = "", jassubLegacyWasmUrl: u, defaultFontUrl: d, bufferSize: f, autoplay: m = !1, chapters: h, seekPrepareBudgetMs: g = ed } = n ?? {}, _ = p(h);
5888
+ _.current = h;
5889
+ let [v, y] = A(void 0), [b, x] = A(0), C = p({
5889
5890
  count: 0,
5890
5891
  at: 0
5891
- }), C = x(void 0);
5892
- D(() => (S.current = {
5892
+ }), w = p(void 0);
5893
+ S(() => (C.current = {
5893
5894
  count: 0,
5894
5895
  at: 0
5895
5896
  }, r.setSourceState({ playbackErrors: [] }), () => {
5896
- C.current && clearTimeout(C.current);
5897
+ w.current && clearTimeout(w.current);
5897
5898
  }), [a]);
5898
- let w = x(null), T = x(null), ee = x(!1), E = x(i);
5899
- E.current = i;
5900
- let O = x(n?.onSeek);
5899
+ let T = p(null), E = p(null), ee = p(!1), D = p(i);
5900
+ D.current = i;
5901
+ let O = p(n?.onSeek);
5901
5902
  O.current = n?.onSeek;
5902
- let k = x(n?.onPlaybackError);
5903
+ let k = p(n?.onPlaybackError);
5903
5904
  k.current = n?.onPlaybackError;
5904
- let te = F((e) => {
5905
+ let j = I((e) => {
5905
5906
  let t = typeof e == "number" ? e : void 0;
5906
- ee.current = !0, r.setSourceState({ selectedSubtitleTrack: t }), w.current?.selectSubtitleStream(t);
5907
- }, [r]), ne = F((e) => {
5908
- let t = w.current;
5909
- if (!t || h <= 0) {
5907
+ ee.current = !0, r.setSourceState({ selectedSubtitleTrack: t }), T.current?.selectSubtitleStream(t);
5908
+ }, [r]), te = I((e) => {
5909
+ let t = T.current;
5910
+ if (!t || g <= 0) {
5910
5911
  r.seek(e);
5911
5912
  return;
5912
5913
  }
@@ -5924,32 +5925,32 @@ var Gu = {
5924
5925
  c?.addEventListener("seeked", l);
5925
5926
  let d = setTimeout(() => {
5926
5927
  o = "deadline", s();
5927
- }, h);
5928
+ }, g);
5928
5929
  t.prepareSeek(e).catch(() => {}).finally(() => {
5929
5930
  clearTimeout(d), s();
5930
5931
  });
5931
- }, [r, h]), A = F((e) => {
5932
- typeof e == "number" && (r.setSourceState({ selectedAudioTrack: e }), v(e));
5933
- }, [r]), j = $((e) => e.setSourceState);
5934
- D(() => {
5935
- j({
5936
- selectSubtitleTrack: te,
5937
- selectAudioTrack: A,
5938
- requestSeek: ne
5932
+ }, [r, g]), ne = I((e) => {
5933
+ typeof e == "number" && (r.setSourceState({ selectedAudioTrack: e }), y(e));
5934
+ }, [r]), M = $((e) => e.setSourceState);
5935
+ S(() => {
5936
+ M({
5937
+ selectSubtitleTrack: j,
5938
+ selectAudioTrack: ne,
5939
+ requestSeek: te
5939
5940
  });
5940
5941
  }, [
5942
+ M,
5941
5943
  j,
5942
- te,
5943
- A,
5944
- ne
5945
- ]), D(() => {
5944
+ ne,
5945
+ te
5946
+ ]), S(() => {
5946
5947
  if (!e || !t || !a || !i) return;
5947
5948
  let n = !1;
5948
5949
  r.setSourceState({
5949
5950
  playbackError: null,
5950
5951
  ready: !1
5951
5952
  });
5952
- let m = (t, n) => {
5953
+ let p = (t, n) => {
5953
5954
  let i = Date.now(), a = nd(t), o = rd(t), s = r.playbackErrors, c = s[s.length - 1];
5954
5955
  if (c && c.message === a && c.detail === o && c.recovered === n) {
5955
5956
  let e = {
@@ -5973,17 +5974,17 @@ var Gu = {
5973
5974
  }, h = (e) => {
5974
5975
  if (n) return;
5975
5976
  let t = hs(e);
5976
- if (m(e, t), t) {
5977
+ if (p(e, t), t) {
5977
5978
  let t = performance.now();
5978
- t - S.current.at > $u && (S.current = {
5979
+ t - C.current.at > $u && (C.current = {
5979
5980
  count: 0,
5980
5981
  at: t
5981
5982
  });
5982
- let n = Qu[Math.min(S.current.count, Qu.length - 1)];
5983
- S.current = {
5984
- count: S.current.count + 1,
5983
+ let n = Qu[Math.min(C.current.count, Qu.length - 1)];
5984
+ C.current = {
5985
+ count: C.current.count + 1,
5985
5986
  at: t
5986
- }, console.warn(`the media element failed; rebuilding the pipeline${n ? ` in ${n}ms` : ""}`, e), C.current && clearTimeout(C.current), C.current = setTimeout(() => b((e) => e + 1), n);
5987
+ }, console.warn(`the media element failed; rebuilding the pipeline${n ? ` in ${n}ms` : ""}`, e), w.current && clearTimeout(w.current), w.current = setTimeout(() => x((e) => e + 1), n);
5987
5988
  return;
5988
5989
  }
5989
5990
  console.error("playback failed", e), r.setSourceState({ playbackError: e }), k.current?.(e);
@@ -5993,7 +5994,7 @@ var Gu = {
5993
5994
  let i = await As({
5994
5995
  videoElement: e,
5995
5996
  subtitleContainer: t,
5996
- read: (e, t) => E.current(e, t),
5997
+ read: (e, t) => D.current(e, t),
5997
5998
  length: a,
5998
5999
  publicPath: o,
5999
6000
  libavWorkerUrl: s,
@@ -6002,12 +6003,12 @@ var Gu = {
6002
6003
  jassubLegacyWasmUrl: u,
6003
6004
  defaultFontUrl: d,
6004
6005
  bufferSize: f,
6005
- audioStreamIndex: _,
6006
+ audioStreamIndex: v,
6006
6007
  onReady: () => {
6007
6008
  if (n) return;
6008
6009
  r.setSourceState({ ready: !0 });
6009
- let t = T.current;
6010
- T.current = null, t && t.size === a && t.time > 0 && (e.currentTime = t.time), p && e.play().catch(() => {});
6010
+ let t = E.current;
6011
+ E.current = null, t && t.size === a && t.time > 0 && (e.currentTime = t.time), m && e.play().catch(() => {});
6011
6012
  },
6012
6013
  onError: h,
6013
6014
  onRecovered: () => {
@@ -6031,20 +6032,20 @@ var Gu = {
6031
6032
  i.destroy();
6032
6033
  return;
6033
6034
  }
6034
- w.current = i, r.setSourceState({
6035
+ T.current = i, r.setSourceState({
6035
6036
  indexes: i.indexes,
6036
- chapters: g.current ?? i.chapters
6037
+ chapters: _.current ?? i.chapters
6037
6038
  });
6038
- let m = r.selectedSubtitleTrack;
6039
- typeof m == "number" && i.selectSubtitleStream(m);
6039
+ let p = r.selectedSubtitleTrack;
6040
+ typeof p == "number" && i.selectSubtitleStream(p);
6040
6041
  } catch (e) {
6041
6042
  h(e);
6042
6043
  }
6043
6044
  })(), () => {
6044
- n = !0, T.current = {
6045
+ n = !0, E.current = {
6045
6046
  time: e.currentTime,
6046
6047
  size: a
6047
- }, w.current?.destroy(), w.current = null, r.setSourceState({ ready: !1 });
6048
+ }, T.current?.destroy(), T.current = null, r.setSourceState({ ready: !1 });
6048
6049
  };
6049
6050
  }, [
6050
6051
  r,
@@ -6058,15 +6059,15 @@ var Gu = {
6058
6059
  u,
6059
6060
  d,
6060
6061
  f,
6061
- _,
6062
- p,
6063
- y
6062
+ v,
6063
+ m,
6064
+ b
6064
6065
  ]);
6065
6066
  }, ad = 5e3, od = 6e4, sd = ({ publicPath: e, workerUrl: t, length: n, read: r, downloadedRanges: i }) => {
6066
- let [a, o] = M([]), s = x(null), c = x(r);
6067
+ let [a, o] = A([]), s = p(null), c = p(r);
6067
6068
  c.current = r;
6068
- let l = C(() => i?.map(({ startByteOffset: e, endByteOffset: t }) => [e, t]), [i?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}-${t}`).join(",")]), u = x(l);
6069
- return u.current = l, D(() => {
6069
+ let l = g(() => i?.map(({ startByteOffset: e, endByteOffset: t }) => [e, t]), [i?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}-${t}`).join(",")]), u = p(l);
6070
+ return u.current = l, S(() => {
6070
6071
  if (!n || !r || !e || !t) return;
6071
6072
  let i = !1, a = null, l, d = ad, f = () => {
6072
6073
  Bs({
@@ -6094,17 +6095,17 @@ var Gu = {
6094
6095
  n,
6095
6096
  e,
6096
6097
  t
6097
- ]), D(() => {
6098
+ ]), S(() => {
6098
6099
  s.current?.update(l);
6099
6100
  }, [l]), {
6100
6101
  thumbnails: a,
6101
- requestThumbnail: F((e) => {
6102
+ requestThumbnail: I((e) => {
6102
6103
  s.current?.prioritize(e);
6103
6104
  }, [])
6104
6105
  };
6105
6106
  }, cd = (e, t) => {
6106
- let n = x(null), [r, i] = M(!1), [a] = M(() => Js());
6107
- D(() => {
6107
+ let n = p(null), [r, i] = A(!1), [a] = A(() => Js());
6108
+ S(() => {
6108
6109
  if (!e || !t || !a) return;
6109
6110
  let r = Ys({
6110
6111
  video: e,
@@ -6120,7 +6121,7 @@ var Gu = {
6120
6121
  t,
6121
6122
  a
6122
6123
  ]);
6123
- let o = F(() => {
6124
+ let o = I(() => {
6124
6125
  n.current?.toggle().catch((e) => {
6125
6126
  console.warn("picture in picture was refused", e);
6126
6127
  });
@@ -6134,16 +6135,16 @@ var Gu = {
6134
6135
  let t = ud();
6135
6136
  return t?.addEventListener("change", e), () => t?.removeEventListener("change", e);
6136
6137
  }, fd = () => !!ud()?.matches, pd = () => !1, md = (e, t) => {
6137
- let [n, r] = M(!1), [i, a] = M(), o = x(t);
6138
+ let [n, r] = A(!1), [i, a] = A(), o = p(t);
6138
6139
  t && (o.current = t);
6139
- let s = x(!1), c = F((e) => {
6140
+ let s = p(!1), c = I((e) => {
6140
6141
  s.current !== e && (s.current = e, o.current?.onArmedChange(e));
6141
- }, []), l = F((t) => {
6142
+ }, []), l = I((t) => {
6142
6143
  !e || e.readyState < 1 || e.error || (a(t), c(!0));
6143
- }, [e, c]), u = F(() => {
6144
+ }, [e, c]), u = I(() => {
6144
6145
  a(void 0), c(!1);
6145
6146
  }, [c]), d = !!t && !!e;
6146
- D(() => {
6147
+ S(() => {
6147
6148
  if (!d || !e) return;
6148
6149
  let t = () => {
6149
6150
  r(!0), u();
@@ -6156,13 +6157,13 @@ var Gu = {
6156
6157
  d,
6157
6158
  u
6158
6159
  ]);
6159
- let f = I(dd, fd, pd), [p, m] = M(!1);
6160
- D(() => {
6160
+ let f = L(dd, fd, pd), [m, h] = A(!1);
6161
+ S(() => {
6161
6162
  if (!d) return;
6162
6163
  let e = (e) => {
6163
- e.pointerType === "touch" && m(!0);
6164
+ e.pointerType === "touch" && h(!0);
6164
6165
  }, t = (e) => {
6165
- e.pointerType !== "touch" && m(!1);
6166
+ e.pointerType !== "touch" && h(!1);
6166
6167
  };
6167
6168
  return window.addEventListener("pointerdown", e, {
6168
6169
  capture: !0,
@@ -6174,28 +6175,28 @@ var Gu = {
6174
6175
  window.removeEventListener("pointerdown", e, { capture: !0 }), window.removeEventListener("pointermove", t, { capture: !0 });
6175
6176
  };
6176
6177
  }, [d]);
6177
- let h = d && f && !p;
6178
- D(() => {
6179
- h || u();
6180
- }, [h, u]);
6181
- let g = F(() => {
6178
+ let _ = d && f && !m;
6179
+ S(() => {
6180
+ _ || u();
6181
+ }, [_, u]);
6182
+ let v = I(() => {
6182
6183
  Promise.resolve(e?.exitPictureInPicture?.()).catch((e) => {
6183
6184
  console.warn("leaving picture in picture was refused", e);
6184
6185
  });
6185
6186
  }, [e]);
6186
- return C(() => h ? {
6187
+ return g(() => _ ? {
6187
6188
  active: n,
6188
6189
  armed: i,
6189
6190
  arm: l,
6190
6191
  disarm: u,
6191
- exit: g
6192
+ exit: v
6192
6193
  } : null, [
6193
- h,
6194
+ _,
6194
6195
  n,
6195
6196
  i,
6196
6197
  l,
6197
6198
  u,
6198
- g
6199
+ v
6199
6200
  ]);
6200
6201
  }, hd = async (e, t, n = {}) => (await e.audioWorklet.addModule(t), new AudioWorkletNode(e, "banou-volume-normalizer", {
6201
6202
  channelCountMode: "max",
@@ -6252,8 +6253,8 @@ var Gu = {
6252
6253
  };
6253
6254
  return gd.set(e, m), m;
6254
6255
  }, yd = (e, t, n) => {
6255
- let r = x(null), [i, a] = M(!1);
6256
- return D(() => {
6256
+ let r = p(null), [i, a] = A(!1);
6257
+ return S(() => {
6257
6258
  if (e && t) {
6258
6259
  if (n && !r.current) {
6259
6260
  let i = vd(e, t, { enabled: n });
@@ -6267,7 +6268,7 @@ var Gu = {
6267
6268
  e,
6268
6269
  t,
6269
6270
  n
6270
- ]), D(() => () => {
6271
+ ]), S(() => () => {
6271
6272
  r.current?.release(), r.current = null;
6272
6273
  }, [e]), { refused: i };
6273
6274
  }, bd = {
@@ -6297,7 +6298,7 @@ var Gu = {
6297
6298
  medium: "\n font-weight: 500;\n font-size: calc(0.8 * var(--mp-unit));\n line-height: calc(1.1 * var(--mp-unit));\n @media (min-width: 960px) {\n font-size: calc(1 * var(--mp-unit));\n line-height: calc(1.4 * var(--mp-unit));\n }\n ",
6298
6299
  regular: "\n font-weight: 400;\n font-size: calc(0.8 * var(--mp-unit));\n line-height: calc(1.1 * var(--mp-unit));\n @media (min-width: 960px) {\n font-size: calc(1 * var(--mp-unit));\n line-height: calc(1.4 * var(--mp-unit));\n }\n "
6299
6300
  }
6300
- }, xd = u`
6301
+ }, xd = s`
6301
6302
  display: flex;
6302
6303
  justify-content: center;
6303
6304
  align-items: center;
@@ -6310,7 +6311,7 @@ var Gu = {
6310
6311
  margin: auto;
6311
6312
  pointer-events: none;
6312
6313
  }
6313
- `, Sd = u`
6314
+ `, Sd = s`
6314
6315
  position: absolute;
6315
6316
  top: 0;
6316
6317
  left: 0;
@@ -6339,9 +6340,9 @@ var Gu = {
6339
6340
 
6340
6341
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 80%, transparent 100%);
6341
6342
  transition: opacity 0.1s cubic-bezier(.4,0,1,1);
6342
- `, Cd = f`
6343
+ `, Cd = l`
6343
6344
  to { transform: rotate(360deg); }
6344
- `, wd = u`
6345
+ `, wd = s`
6345
6346
  position: absolute;
6346
6347
  inset: 0;
6347
6348
  z-index: 2;
@@ -6359,7 +6360,7 @@ var Gu = {
6359
6360
  border-top-color: #fff;
6360
6361
  animation: ${Cd} 0.8s linear infinite;
6361
6362
  }
6362
- `, Td = u`
6363
+ `, Td = s`
6363
6364
  position: absolute;
6364
6365
  inset: auto 0 20%;
6365
6366
  z-index: 3;
@@ -6371,8 +6372,8 @@ var Gu = {
6371
6372
  pointer-events: none;
6372
6373
  `, Ed = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : "Playback failed", Dd = ({ onSubtitleRef: e }) => {
6373
6374
  let t = $((e) => e.title), n = $((e) => e.hideUI), r = $((e) => e.playbackError), i = $((e) => e.ready), a = $((e) => e.size), o = $((e) => e.waiting), s = $((e) => e.seekingTo);
6374
- return /* @__PURE__ */ P(se, { children: [
6375
- t ? /* @__PURE__ */ j("div", {
6375
+ return /* @__PURE__ */ N(F, { children: [
6376
+ t ? /* @__PURE__ */ k("div", {
6376
6377
  className: "title",
6377
6378
  css: Sd,
6378
6379
  style: { ...n ? {
@@ -6381,12 +6382,12 @@ var Gu = {
6381
6382
  } : {} },
6382
6383
  children: t
6383
6384
  }) : void 0,
6384
- ((a ? !i : o) || s !== void 0) && !r ? /* @__PURE__ */ j("div", { css: wd }) : void 0,
6385
- r ? /* @__PURE__ */ j("div", {
6385
+ ((a ? !i : o) || s !== void 0) && !r ? /* @__PURE__ */ k("div", { css: wd }) : void 0,
6386
+ r ? /* @__PURE__ */ k("div", {
6386
6387
  css: Td,
6387
6388
  children: Ed(r)
6388
6389
  }) : void 0,
6389
- /* @__PURE__ */ j("div", {
6390
+ /* @__PURE__ */ k("div", {
6390
6391
  className: "subtitles",
6391
6392
  ref: e,
6392
6393
  css: xd
@@ -6396,7 +6397,7 @@ var Gu = {
6396
6397
  if (e === void 0) return "0:00";
6397
6398
  let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
6398
6399
  return t > 0 ? `${t}:${n < 10 ? "0" : ""}${n}:${r < 10 ? "0" : ""}${r}` : `${n}:${r < 10 ? "0" : ""}${r}`;
6399
- }, Nd = (e, t) => `${Md(e)} / ${Md(t)}`, Pd = (e) => u`
6400
+ }, Nd = (e, t) => `${Md(e)} / ${Md(t)}`, Pd = (e) => s`
6400
6401
  display: flex;
6401
6402
  justify-content: flex-start;
6402
6403
 
@@ -6431,13 +6432,13 @@ var Gu = {
6431
6432
  ${bd.bMedium.regular}
6432
6433
  }
6433
6434
 
6434
- ${e === "sm" && u`
6435
+ ${e === "sm" && s`
6435
6436
  padding: calc(0.4 * var(--mp-unit))!important;
6436
6437
  `}
6437
- ${e === "md" && u`
6438
+ ${e === "md" && s`
6438
6439
  padding: calc(0.6 * var(--mp-unit))!important;
6439
6440
  `}
6440
- ${e === "lg" && u`
6441
+ ${e === "lg" && s`
6441
6442
  padding: calc(1.2 * var(--mp-unit))!important;
6442
6443
  `}
6443
6444
  `, Fd = {
@@ -6452,8 +6453,8 @@ var Gu = {
6452
6453
  }), () => {
6453
6454
  --Fd.anchors === 0 && window.removeEventListener("pointermove", Id, { capture: !0 });
6454
6455
  }), Rd = ({ id: e, toolTipText: t, text: n, delayShow: r = 0, closeDelay: i = 0, offset: a = 20, tooltipPlace: o = "top", disabled: s = !1, size: c = "md" }) => {
6455
- let l = x(null), u = x(null);
6456
- return D(() => {
6456
+ let l = p(null), u = p(null);
6457
+ return S(() => {
6457
6458
  let e = Ld(), t = () => {
6458
6459
  let e = l.current;
6459
6460
  if (!e) return;
@@ -6465,7 +6466,7 @@ var Gu = {
6465
6466
  e();
6466
6467
  for (let e of n) document.removeEventListener(e, t);
6467
6468
  };
6468
- }, []), /* @__PURE__ */ P(se, { children: [/* @__PURE__ */ j("div", {
6469
+ }, []), /* @__PURE__ */ N(F, { children: [/* @__PURE__ */ k("div", {
6469
6470
  ref: l,
6470
6471
  "data-tooltip-id": e,
6471
6472
  "data-open": !0,
@@ -6474,7 +6475,7 @@ var Gu = {
6474
6475
  "data-tooltip-delay-hide": i,
6475
6476
  "data-tooltip-place": o,
6476
6477
  children: n
6477
- }), !s && /* @__PURE__ */ j(Wu, {
6478
+ }), !s && /* @__PURE__ */ k(Wu, {
6478
6479
  ref: u,
6479
6480
  css: Pd(c),
6480
6481
  id: e,
@@ -6482,14 +6483,14 @@ var Gu = {
6482
6483
  children: t
6483
6484
  })] });
6484
6485
  }, zd = ({ ref: e, onChange: t, orientation: n = "horizontal", disabled: r = !1 }) => {
6485
- let [i, a] = M(!1), o = x(t);
6486
+ let [i, a] = A(!1), o = p(t);
6486
6487
  o.current = t;
6487
- let s = x(null), c = F((t, r) => {
6488
+ let s = p(null), c = I((t, r) => {
6488
6489
  let i = e.current;
6489
6490
  if (!i) return 0;
6490
6491
  let { left: a, right: o, top: s, bottom: c } = i.getBoundingClientRect(), l = n === "horizontal" ? (t - a) / (o - a) : (c - r) / (c - s);
6491
6492
  return Math.min(Math.max(l, 0), 1);
6492
- }, [e, n]), l = F((e) => {
6493
+ }, [e, n]), l = I((e) => {
6493
6494
  if (!(r || e.button > 0)) {
6494
6495
  s.current = e.pointerId;
6495
6496
  try {
@@ -6497,9 +6498,9 @@ var Gu = {
6497
6498
  } catch {}
6498
6499
  a(!0), o.current(c(e.clientX, e.clientY));
6499
6500
  }
6500
- }, [r, c]), u = F((e) => {
6501
+ }, [r, c]), u = I((e) => {
6501
6502
  s.current === e.pointerId && o.current(c(e.clientX, e.clientY));
6502
- }, [c]), d = F((e) => {
6503
+ }, [c]), d = I((e) => {
6503
6504
  if (s.current === e.pointerId) {
6504
6505
  s.current = null;
6505
6506
  try {
@@ -6508,7 +6509,7 @@ var Gu = {
6508
6509
  a(!1);
6509
6510
  }
6510
6511
  }, []);
6511
- return D(() => {
6512
+ return S(() => {
6512
6513
  r && (s.current = null, a(!1));
6513
6514
  }, [r]), {
6514
6515
  dragging: i,
@@ -6631,7 +6632,7 @@ var Gu = {
6631
6632
  return i && !t.includes(i) ? i : void 0;
6632
6633
  });
6633
6634
  return e.every(({ title: e }) => ef(e)) ? cf(e) : i;
6634
- }, uf = u`
6635
+ }, uf = s`
6635
6636
  position: relative;
6636
6637
  height: calc(.4 * var(--mp-unit));
6637
6638
 
@@ -6851,57 +6852,57 @@ var Gu = {
6851
6852
  --thumbnail-half: calc(9 * var(--mp-unit));
6852
6853
  }
6853
6854
  `, df = 4, ff = () => {
6854
- let e = $(), t = $((e) => e.currentTime), n = $((e) => e.requestSeek), r = $((e) => e.duration), i = $((e) => e.size), a = $((e) => e.downloadedRanges), o = $((e) => e.buffered), s = $((e) => e.indexes), c = $((e) => e.thumbnails), l = $((e) => e.thumbnailAt), u = $((e) => e.requestThumbnail), d = $((e) => e.chapters), f = $((e) => e.seekingTo), p = $((e) => e.setSourceState), m = $((e) => e.hideUI), h = x(null), [g, _] = M(void 0), [v, y] = M(void 0), b = (e) => {
6855
- y(e), u(e);
6856
- }, S = !!v;
6857
- D(() => {
6858
- if (S) return p({ seekPreview: !0 }), () => p({ seekPreview: !1 });
6859
- }, [p, S]), D(() => {
6860
- m && b(void 0);
6861
- }, [m]);
6862
- let w = x(void 0), T = x(0), ee = x(void 0), E = x(void 0), O = x(!1), { dragging: k, handlers: te } = zd({
6863
- ref: h,
6855
+ let e = $(), t = $((e) => e.currentTime), n = $((e) => e.requestSeek), r = $((e) => e.duration), i = $((e) => e.size), a = $((e) => e.downloadedRanges), o = $((e) => e.buffered), s = $((e) => e.indexes), c = $((e) => e.thumbnails), l = $((e) => e.thumbnailAt), u = $((e) => e.requestThumbnail), d = $((e) => e.chapters), f = $((e) => e.seekingTo), m = $((e) => e.setSourceState), h = $((e) => e.hideUI), _ = p(null), [v, y] = A(void 0), [b, x] = A(void 0), C = (e) => {
6856
+ x(e), u(e);
6857
+ }, w = !!b;
6858
+ S(() => {
6859
+ if (w) return m({ seekPreview: !0 }), () => m({ seekPreview: !1 });
6860
+ }, [m, w]), S(() => {
6861
+ h && C(void 0);
6862
+ }, [h]);
6863
+ let T = p(void 0), E = p(0), ee = p(void 0), D = p(void 0), O = p(!1), { dragging: j, handlers: te } = zd({
6864
+ ref: _,
6864
6865
  onChange: (e) => {
6865
- if (T.current += 1, ee.current = e, E.current === void 0) E.current = e;
6866
+ if (E.current += 1, ee.current = e, D.current === void 0) D.current = e;
6866
6867
  else if (!O.current) {
6867
- let t = h.current?.getBoundingClientRect().width ?? 0;
6868
- Math.abs(e - E.current) * t > df && (O.current = !0);
6868
+ let t = _.current?.getBoundingClientRect().width ?? 0;
6869
+ Math.abs(e - D.current) * t > df && (O.current = !0);
6869
6870
  }
6870
- _(e), w.current !== "mouse" && b(e * r);
6871
+ y(e), T.current !== "mouse" && C(e * r);
6871
6872
  }
6872
6873
  }), ne = (e) => {
6873
- w.current = e.pointerType, T.current = 0, E.current = void 0, O.current = !1, te.onPointerDown(e);
6874
- }, A = (t) => {
6874
+ T.current = e.pointerType, E.current = 0, D.current = void 0, O.current = !1, te.onPointerDown(e);
6875
+ }, M = (t) => {
6875
6876
  te.onPointerUp(t);
6876
- let i = T.current > 0 ? ee.current : void 0;
6877
+ let i = E.current > 0 ? ee.current : void 0;
6877
6878
  if (i !== void 0 && r) {
6878
6879
  let t = i * r;
6879
6880
  n ? n(t) : e.seek(t);
6880
6881
  }
6881
- T.current = 0, O.current = !1, E.current = void 0, t.pointerType !== "mouse" && b(void 0);
6882
+ E.current = 0, O.current = !1, D.current = void 0, t.pointerType !== "mouse" && C(void 0);
6882
6883
  }, re = (e) => {
6883
- if (!h.current) return;
6884
- let { left: t, right: n } = h.current.getBoundingClientRect();
6884
+ if (!_.current) return;
6885
+ let { left: t, right: n } = _.current.getBoundingClientRect();
6885
6886
  return Math.min(Math.max((e - t) / (n - t), 0), 1) * r;
6886
- }, ie = x("mouse"), N = (e) => {
6887
- ie.current = e.pointerType;
6888
- }, ae = (e) => {
6889
- ie.current !== "touch" && b(re(e.clientX));
6890
- }, oe = () => {
6891
- h.current && b(void 0);
6892
- }, se = (e) => r ? e / r * 100 : 0, F = (e, t, n) => {
6887
+ }, P = p("mouse"), F = (e) => {
6888
+ P.current = e.pointerType;
6889
+ }, I = (e) => {
6890
+ P.current !== "touch" && C(re(e.clientX));
6891
+ }, ie = () => {
6892
+ _.current && C(void 0);
6893
+ }, ae = (e) => r ? e / r * 100 : 0, oe = (e, t, n) => {
6893
6894
  let r = Number((n - t).toFixed(4)), i = t * 100;
6894
- return /* @__PURE__ */ j("div", {
6895
+ return /* @__PURE__ */ k("div", {
6895
6896
  className: "loaded-part",
6896
6897
  style: {
6897
6898
  transform: `scaleX(${r})`,
6898
6899
  marginLeft: `${i}%`
6899
6900
  }
6900
6901
  }, e);
6901
- }, ce = C(() => i === void 0 ? r ? o.map(([e, t], n) => F(n, e / r, t / r)) : [] : a?.map((e, t) => {
6902
+ }, se = g(() => i === void 0 ? r ? o.map(([e, t], n) => oe(n, e / r, t / r)) : [] : a?.map((e, t) => {
6902
6903
  if (!i || !r) return null;
6903
6904
  let n = s.filter((t) => e.startByteOffset <= t.pos && t.pos <= e.endByteOffset), a = n.at(0), o = n.at(-1);
6904
- return !a || !o ? null : F(t, a.timestamp / r, o.timestamp / r);
6905
+ return !a || !o ? null : oe(t, a.timestamp / r, o.timestamp / r);
6905
6906
  }) ?? [], [
6906
6907
  r,
6907
6908
  i,
@@ -6909,110 +6910,110 @@ var Gu = {
6909
6910
  s.length,
6910
6911
  a?.map(({ startByteOffset: e, endByteOffset: t }) => `${e}/${t}`).join(",")
6911
6912
  ]);
6912
- D(() => {
6913
- g !== void 0 && r && k && O.current && e.seek(g * r);
6913
+ S(() => {
6914
+ v !== void 0 && r && j && O.current && e.seek(v * r);
6914
6915
  }, [
6915
6916
  e,
6916
- k,
6917
- g,
6917
+ j,
6918
+ v,
6918
6919
  r
6919
6920
  ]);
6920
- let I = C(() => {
6921
+ let L = g(() => {
6921
6922
  if (!r) return 0;
6922
- if (k && g !== void 0) return g;
6923
+ if (j && v !== void 0) return v;
6923
6924
  let e = f ?? t;
6924
6925
  return typeof e == "number" ? e / r : 0;
6925
6926
  }, [
6926
6927
  r,
6927
6928
  t,
6928
- k,
6929
- g,
6929
+ j,
6930
+ v,
6930
6931
  f
6931
- ]), L = C(() => Wd(d, r), [d, r]), le = L.length > 0, R = C(() => {
6932
- if (!le || v === void 0 || !r) return -1;
6933
- let e = v / r * 100, t = L.findIndex((t, n) => n < L.length - 1 && e >= t && e < L[n + 1]);
6934
- return t >= 0 ? t : L.length - 2;
6932
+ ]), R = g(() => Wd(d, r), [d, r]), ce = R.length > 0, z = g(() => {
6933
+ if (!ce || b === void 0 || !r) return -1;
6934
+ let e = b / r * 100, t = R.findIndex((t, n) => n < R.length - 1 && e >= t && e < R[n + 1]);
6935
+ return t >= 0 ? t : R.length - 2;
6935
6936
  }, [
6936
- le,
6937
- L,
6938
- v,
6937
+ ce,
6938
+ R,
6939
+ b,
6939
6940
  r
6940
- ]), ue = C(() => le ? Gd(L, (e) => e !== R) : void 0, [
6941
- le,
6942
- L,
6943
- R
6944
- ]), de = C(() => R >= 0 ? Gd(L, (e) => e === R) : void 0, [L, R]), fe = C(() => {
6945
- if (v !== void 0) return d.find(({ start: e, end: t }) => e <= v && v < t);
6946
- }, [d, v]), z = C(() => {
6947
- if (v) {
6948
- if (l) return l(v);
6949
- if (c.length) return c.find(({ startTime: e, endTime: t }) => e <= v && v < t);
6941
+ ]), le = g(() => ce ? Gd(R, (e) => e !== z) : void 0, [
6942
+ ce,
6943
+ R,
6944
+ z
6945
+ ]), ue = g(() => z >= 0 ? Gd(R, (e) => e === z) : void 0, [R, z]), de = g(() => {
6946
+ if (b !== void 0) return d.find(({ start: e, end: t }) => e <= b && b < t);
6947
+ }, [d, b]), B = g(() => {
6948
+ if (b) {
6949
+ if (l) return l(b);
6950
+ if (c.length) return c.find(({ startTime: e, endTime: t }) => e <= b && b < t);
6950
6951
  }
6951
6952
  }, [
6952
6953
  c,
6953
6954
  l,
6954
- v
6955
- ]), pe = (e, t) => /* @__PURE__ */ P("div", {
6955
+ b
6956
+ ]), fe = (e, t) => /* @__PURE__ */ N("div", {
6956
6957
  className: e ? `track ${e}` : "track",
6957
6958
  style: t ? { maskImage: t } : void 0,
6958
6959
  children: [
6959
- /* @__PURE__ */ j("div", { className: "background-bar" }),
6960
- /* @__PURE__ */ j("div", {
6960
+ /* @__PURE__ */ k("div", { className: "background-bar" }),
6961
+ /* @__PURE__ */ k("div", {
6961
6962
  className: "loaded",
6962
- children: ce
6963
+ children: se
6963
6964
  }),
6964
- /* @__PURE__ */ j("div", {
6965
+ /* @__PURE__ */ k("div", {
6965
6966
  className: "play-container",
6966
- children: /* @__PURE__ */ j("div", {
6967
+ children: /* @__PURE__ */ k("div", {
6967
6968
  className: "play",
6968
- style: { transform: `scaleX(${I})` }
6969
+ style: { transform: `scaleX(${L})` }
6969
6970
  })
6970
6971
  })
6971
6972
  ]
6972
6973
  });
6973
- return /* @__PURE__ */ P("div", {
6974
+ return /* @__PURE__ */ N("div", {
6974
6975
  css: uf,
6975
- ref: h,
6976
+ ref: _,
6976
6977
  className: [
6977
6978
  "progress-bar",
6978
- k ? "dragging" : "",
6979
- le ? "segmented" : ""
6979
+ j ? "dragging" : "",
6980
+ ce ? "segmented" : ""
6980
6981
  ].filter(Boolean).join(" "),
6981
- onPointerDown: N,
6982
- onPointerMove: N,
6983
- onMouseMove: ae,
6984
- onMouseOut: oe,
6982
+ onPointerDown: F,
6983
+ onPointerMove: F,
6984
+ onMouseMove: I,
6985
+ onMouseOut: ie,
6985
6986
  children: [
6986
- pe(void 0, ue),
6987
- v ? /* @__PURE__ */ P("div", {
6987
+ fe(void 0, le),
6988
+ b ? /* @__PURE__ */ N("div", {
6988
6989
  className: "cursor-time",
6989
6990
  style: {
6990
- left: fe ? `clamp(var(--thumbnail-half), ${se(v)}%, calc(100% - var(--thumbnail-half)))` : `clamp(calc(3 * var(--mp-unit)), ${se(v)}%, calc(100% - calc(3 * var(--mp-unit))))`,
6991
- maxWidth: fe ? "var(--thumbnail-width)" : void 0
6991
+ left: de ? `clamp(var(--thumbnail-half), ${ae(b)}%, calc(100% - var(--thumbnail-half)))` : `clamp(calc(3 * var(--mp-unit)), ${ae(b)}%, calc(100% - calc(3 * var(--mp-unit))))`,
6992
+ maxWidth: de ? "var(--thumbnail-width)" : void 0
6992
6993
  },
6993
- children: [/* @__PURE__ */ j("span", {
6994
+ children: [/* @__PURE__ */ k("span", {
6994
6995
  className: "cursor-time-value",
6995
- children: Md(v)
6996
- }), fe ? /* @__PURE__ */ j("span", {
6996
+ children: Md(b)
6997
+ }), de ? /* @__PURE__ */ k("span", {
6997
6998
  className: "chapter-title",
6998
- children: fe.title
6999
+ children: de.title
6999
7000
  }) : void 0]
7000
7001
  }) : void 0,
7001
- /* @__PURE__ */ j("div", { className: "progress" }),
7002
- /* @__PURE__ */ j("div", { className: "hover" }),
7003
- de ? pe("focus", de) : void 0,
7004
- /* @__PURE__ */ j("div", { className: "scrubber" }),
7005
- /* @__PURE__ */ j("div", {
7002
+ /* @__PURE__ */ k("div", { className: "progress" }),
7003
+ /* @__PURE__ */ k("div", { className: "hover" }),
7004
+ ue ? fe("focus", ue) : void 0,
7005
+ /* @__PURE__ */ k("div", { className: "scrubber" }),
7006
+ /* @__PURE__ */ k("div", {
7006
7007
  className: "padding",
7007
7008
  ...te,
7008
7009
  onPointerDown: ne,
7009
- onPointerUp: A,
7010
- onPointerCancel: A
7010
+ onPointerUp: M,
7011
+ onPointerCancel: M
7011
7012
  }),
7012
- /* @__PURE__ */ j("div", {
7013
+ /* @__PURE__ */ k("div", {
7013
7014
  className: "thumbnail",
7014
- style: { left: `clamp(var(--thumbnail-half), ${se(v ?? 1)}%, calc(100% - var(--thumbnail-half)))` },
7015
- children: z?.url ? /* @__PURE__ */ j("img", { src: z.url }) : void 0
7015
+ style: { left: `clamp(var(--thumbnail-half), ${ae(b ?? 1)}%, calc(100% - var(--thumbnail-half)))` },
7016
+ children: B?.url ? /* @__PURE__ */ k("img", { src: B.url }) : void 0
7016
7017
  })
7017
7018
  ]
7018
7019
  });
@@ -7026,12 +7027,12 @@ var Gu = {
7026
7027
  strokeWidth: 2,
7027
7028
  strokeLinecap: "round",
7028
7029
  strokeLinejoin: "round"
7029
- }, hf = (e) => /* @__PURE__ */ P("svg", {
7030
+ }, hf = (e) => /* @__PURE__ */ N("svg", {
7030
7031
  ...mf,
7031
7032
  ...e,
7032
7033
  children: [
7033
- /* @__PURE__ */ j("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
7034
- /* @__PURE__ */ j("rect", {
7034
+ /* @__PURE__ */ k("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
7035
+ /* @__PURE__ */ k("rect", {
7035
7036
  x: "12",
7036
7037
  y: "13",
7037
7038
  width: "10",
@@ -7039,14 +7040,14 @@ var Gu = {
7039
7040
  rx: "1",
7040
7041
  ry: "1"
7041
7042
  }),
7042
- /* @__PURE__ */ j("path", { d: "M14.5 18.5h2m2 0h1" })
7043
+ /* @__PURE__ */ k("path", { d: "M14.5 18.5h2m2 0h1" })
7043
7044
  ]
7044
- }), gf = (e) => /* @__PURE__ */ P("svg", {
7045
+ }), gf = (e) => /* @__PURE__ */ N("svg", {
7045
7046
  ...mf,
7046
7047
  ...e,
7047
7048
  children: [
7048
- /* @__PURE__ */ j("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
7049
- /* @__PURE__ */ j("rect", {
7049
+ /* @__PURE__ */ k("path", { d: "M21 11V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h5" }),
7050
+ /* @__PURE__ */ k("rect", {
7050
7051
  x: "12",
7051
7052
  y: "13",
7052
7053
  width: "10",
@@ -7054,9 +7055,9 @@ var Gu = {
7054
7055
  rx: "1",
7055
7056
  ry: "1"
7056
7057
  }),
7057
- /* @__PURE__ */ j("path", { d: "M6 9h3m2 0h2" })
7058
+ /* @__PURE__ */ k("path", { d: "M6 9h3m2 0h2" })
7058
7059
  ]
7059
- }), _f = u`
7060
+ }), _f = s`
7060
7061
  .popover {
7061
7062
  position: absolute;
7062
7063
  /* Anchored to the PLAYER's right edge, never to the gear. The gear is not the last control in the
@@ -7186,23 +7187,23 @@ var Gu = {
7186
7187
  `, vf = ({ title: e, tracks: t, selected: n, onSelect: r, onBack: i, offLabel: a, pending: o, failed: s }) => {
7187
7188
  let c = o !== void 0, l = (e, i, a) => {
7188
7189
  let s = c && o === e, l = c || t.find((t) => t.id === e)?.disabled;
7189
- return /* @__PURE__ */ P("div", {
7190
+ return /* @__PURE__ */ N("div", {
7190
7191
  onClick: () => {
7191
7192
  l || r(e ?? void 0);
7192
7193
  },
7193
7194
  className: [a, l ? "unavailable" : null].filter(Boolean).join(" ") || void 0,
7194
- children: [/* @__PURE__ */ j("span", { children: i }), /* @__PURE__ */ j("span", { children: s ? "…" : (n ?? null) === e ? "✓" : "" })]
7195
+ children: [/* @__PURE__ */ k("span", { children: i }), /* @__PURE__ */ k("span", { children: s ? "…" : (n ?? null) === e ? "✓" : "" })]
7195
7196
  }, e ?? "__off__");
7196
7197
  };
7197
- return /* @__PURE__ */ P("div", {
7198
+ return /* @__PURE__ */ N("div", {
7198
7199
  className: "popover track-list",
7199
7200
  children: [
7200
- /* @__PURE__ */ P("div", {
7201
+ /* @__PURE__ */ N("div", {
7201
7202
  className: i ? "back" : "back no-hover",
7202
7203
  onClick: i,
7203
- children: [i ? /* @__PURE__ */ j(te, {}) : null, /* @__PURE__ */ j("span", { children: e })]
7204
+ children: [i ? /* @__PURE__ */ k(C, {}) : null, /* @__PURE__ */ k("span", { children: e })]
7204
7205
  }),
7205
- s ? /* @__PURE__ */ j("div", {
7206
+ s ? /* @__PURE__ */ k("div", {
7206
7207
  className: "no-hover failed",
7207
7208
  children: "Could not switch. Try again."
7208
7209
  }) : null,
@@ -7211,12 +7212,12 @@ var Gu = {
7211
7212
  ]
7212
7213
  });
7213
7214
  }, yf = ({ onReset: e } = {}) => {
7214
- let t = x(null), [n, r] = M(!1), [i, a] = M(void 0), [o, s] = M(!1), c = x(e);
7215
+ let t = p(null), [n, r] = A(!1), [i, a] = A(void 0), [o, s] = A(!1), c = p(e);
7215
7216
  c.current = e;
7216
7217
  let l = () => {
7217
7218
  r(!1), c.current?.();
7218
7219
  };
7219
- return D(() => {
7220
+ return S(() => {
7220
7221
  let e = (e) => {
7221
7222
  n && t.current && !t.current.contains(e.target) && l();
7222
7223
  };
@@ -7251,7 +7252,7 @@ var Gu = {
7251
7252
  });
7252
7253
  }
7253
7254
  };
7254
- }, bf = u`
7255
+ }, bf = s`
7255
7256
  /* Not a containing block, for the reason given on popoverStyle: the menu anchors to the control bar,
7256
7257
  which is the width of the player box, so it can be clamped to it. */
7257
7258
  position: static;
@@ -7347,60 +7348,60 @@ ${_f}
7347
7348
  e.detail
7348
7349
  ].filter(Boolean).join("\n");
7349
7350
  }).join("\n\n"), Tf = () => {
7350
- let e = $((e) => e.playbackErrors), { open: t, toggle: n, containerRef: r } = yf(), [i, a] = M(!1);
7351
+ let e = $((e) => e.playbackErrors), { open: t, toggle: n, containerRef: r } = yf(), [i, a] = A(!1);
7351
7352
  if (e.length === 0) return null;
7352
7353
  let o = () => {
7353
7354
  navigator.clipboard?.writeText(wf(e)).then(() => {
7354
7355
  a(!0), setTimeout(() => a(!1), 2e3);
7355
7356
  }, (e) => console.warn("[media-player] could not copy the errors:", e));
7356
7357
  }, s = `Playback errors (${Cf(e)})`;
7357
- return /* @__PURE__ */ P("div", {
7358
+ return /* @__PURE__ */ N("div", {
7358
7359
  css: bf,
7359
7360
  ref: r,
7360
- children: [/* @__PURE__ */ j(Rd, {
7361
+ children: [/* @__PURE__ */ k(Rd, {
7361
7362
  id: "errors",
7362
7363
  disabled: t,
7363
- text: /* @__PURE__ */ j("button", {
7364
+ text: /* @__PURE__ */ k("button", {
7364
7365
  className: "errors",
7365
7366
  type: "button",
7366
7367
  onClick: n,
7367
7368
  "aria-label": s,
7368
7369
  "aria-expanded": t,
7369
- children: /* @__PURE__ */ j(de, { className: "alert-triangle" })
7370
+ children: /* @__PURE__ */ k(ue, { className: "alert-triangle" })
7370
7371
  }),
7371
- toolTipText: /* @__PURE__ */ j("span", { children: s })
7372
- }), t && /* @__PURE__ */ P("div", {
7372
+ toolTipText: /* @__PURE__ */ k("span", { children: s })
7373
+ }), t && /* @__PURE__ */ N("div", {
7373
7374
  className: "popover error-list",
7374
- children: [/* @__PURE__ */ P("div", {
7375
+ children: [/* @__PURE__ */ N("div", {
7375
7376
  className: "back no-hover",
7376
- children: [/* @__PURE__ */ j("span", { children: s }), /* @__PURE__ */ P("button", {
7377
+ children: [/* @__PURE__ */ k("span", { children: s }), /* @__PURE__ */ N("button", {
7377
7378
  className: "copy",
7378
7379
  type: "button",
7379
7380
  onClick: o,
7380
7381
  "aria-label": "Copy the errors",
7381
- children: [j(i ? p : ne, {}), /* @__PURE__ */ j("span", { children: i ? "Copied" : "Copy" })]
7382
+ children: [k(i ? ne : ie, {}), /* @__PURE__ */ k("span", { children: i ? "Copied" : "Copy" })]
7382
7383
  })]
7383
- }), e.map((e, t) => /* @__PURE__ */ P("div", {
7384
+ }), e.map((e, t) => /* @__PURE__ */ N("div", {
7384
7385
  className: "entry no-hover",
7385
7386
  children: [
7386
- /* @__PURE__ */ P("span", {
7387
+ /* @__PURE__ */ N("span", {
7387
7388
  className: "when",
7388
7389
  children: [
7389
7390
  xf(e.at),
7390
7391
  e.count > 1 ? ` to ${xf(e.lastAt)}` : "",
7391
7392
  Sf(e.atMediaTime) ? ` at ${Sf(e.atMediaTime)}` : "",
7392
7393
  e.recovered ? " recovered" : "",
7393
- e.count > 1 ? /* @__PURE__ */ j("span", {
7394
+ e.count > 1 ? /* @__PURE__ */ k("span", {
7394
7395
  className: "count",
7395
7396
  children: `×${e.count}`
7396
7397
  }) : null
7397
7398
  ]
7398
7399
  }),
7399
- /* @__PURE__ */ j("span", {
7400
+ /* @__PURE__ */ k("span", {
7400
7401
  className: "what",
7401
7402
  children: e.message
7402
7403
  }),
7403
- e.detail ? /* @__PURE__ */ j("span", {
7404
+ e.detail ? /* @__PURE__ */ k("span", {
7404
7405
  className: "cause",
7405
7406
  children: e.detail
7406
7407
  }) : null
@@ -7408,7 +7409,7 @@ ${_f}
7408
7409
  }, `${e.at}-${t}`))]
7409
7410
  })]
7410
7411
  });
7411
- }, Ef = u`
7412
+ }, Ef = s`
7412
7413
  display: flex;
7413
7414
  align-items: center;
7414
7415
  justify-content: center;
@@ -7462,7 +7463,7 @@ width: 100%;
7462
7463
  }
7463
7464
  }
7464
7465
  `, Df = () => {
7465
- let e = $(), t = $((e) => e.playbackRate), n = x(null), r = x(null), i = .25, a = 2.75, o = (e, t = .05) => Math.round(e / t) * t, s = o(t || 1), c = (e) => (e - i) / a * 100, l = (e) => o(i + e * a), { handlers: u } = zd({
7466
+ let e = $(), t = $((e) => e.playbackRate), n = p(null), r = p(null), i = .25, a = 2.75, o = (e, t = .05) => Math.round(e / t) * t, s = o(t || 1), c = (e) => (e - i) / a * 100, l = (e) => o(i + e * a), { handlers: u } = zd({
7466
7467
  ref: r,
7467
7468
  onChange: (t) => e.setPlaybackRate(l(t))
7468
7469
  }), d = (t) => {
@@ -7470,33 +7471,33 @@ width: 100%;
7470
7471
  let n = .05, r = s;
7471
7472
  r = t.deltaY < 0 ? Math.min(3, r + n) : Math.max(i, r - n), e.setPlaybackRate(r);
7472
7473
  };
7473
- D(() => {
7474
+ S(() => {
7474
7475
  let e = n.current;
7475
7476
  return e && e.addEventListener("wheel", d, { passive: !1 }), () => {
7476
7477
  e && e.removeEventListener("wheel", d);
7477
7478
  };
7478
7479
  }, [t]);
7479
7480
  let f = c(s);
7480
- return /* @__PURE__ */ P("div", {
7481
+ return /* @__PURE__ */ N("div", {
7481
7482
  css: Ef,
7482
- children: [/* @__PURE__ */ P("div", { children: [s.toFixed(2), "x"] }), /* @__PURE__ */ j("div", {
7483
+ children: [/* @__PURE__ */ N("div", { children: [s.toFixed(2), "x"] }), /* @__PURE__ */ k("div", {
7483
7484
  className: "playback-slider",
7484
7485
  ref: n,
7485
7486
  ...u,
7486
- children: /* @__PURE__ */ j("div", {
7487
+ children: /* @__PURE__ */ k("div", {
7487
7488
  ref: r,
7488
7489
  style: { background: `linear-gradient(to right,
7489
7490
  #fff 0% ${f}%,
7490
7491
  #3A3A3A ${f}% 100%
7491
7492
  )` },
7492
- children: /* @__PURE__ */ j("div", {
7493
+ children: /* @__PURE__ */ k("div", {
7493
7494
  className: "playback-handle",
7494
7495
  style: { left: `${f}%` }
7495
7496
  })
7496
7497
  })
7497
7498
  })]
7498
7499
  });
7499
- }, Of = u`
7500
+ }, Of = s`
7500
7501
  /* Deliberately NOT a containing block. The menu anchors to the control bar instead, which is exactly
7501
7502
  as wide as the player box and can therefore be clamped to it. The outside-click check uses
7502
7503
  \`contains\` on the ref, which is DOM containment and needs no position, and the bar's other
@@ -7591,45 +7592,54 @@ ${_f}
7591
7592
  }
7592
7593
 
7593
7594
  `, kf = () => {
7594
- let e = $(), t = $((e) => e.playbackRate), n = $((e) => e.audioTracks), r = $((e) => e.selectedAudioTrack), i = $((e) => e.selectAudioTrack), o = $((e) => e.volumeNormalizer), [s, c] = M(0), { open: u, toggle: d, containerRef: f, pending: p, failed: m, runSelect: h } = yf({ onReset: () => c(0) }), g = (t) => {
7595
+ let e = $(), t = $((e) => e.playbackRate), n = $((e) => e.audioTracks), r = $((e) => e.selectedAudioTrack), i = $((e) => e.selectAudioTrack), a = $((e) => e.quality), o = $((e) => e.volumeNormalizer), [s, c] = A(0), { open: l, toggle: u, containerRef: d, pending: f, failed: p, runSelect: m } = yf({ onReset: () => c(0) }), h = (t) => {
7595
7596
  e.setPlaybackRate(t), c(0);
7597
+ }, g = (e) => {
7598
+ e !== void 0 && m(e, () => i(e));
7596
7599
  }, _ = (e) => {
7597
- e !== void 0 && h(e, () => i(e));
7598
- }, v = (e) => () => {
7600
+ a && m(e ?? null, () => a.select(e === void 0 ? null : String(e)));
7601
+ }, v = a ? a.options.length + +!!a.offLabel : 0, y = a?.selectedId == null ? a?.offLabel : a.options.find(({ id: e }) => e === a.selectedId)?.label, x = (e) => () => {
7599
7602
  c(e);
7600
7603
  };
7601
- return /* @__PURE__ */ P("div", {
7604
+ return /* @__PURE__ */ N("div", {
7602
7605
  css: Of,
7603
- ref: f,
7606
+ ref: d,
7604
7607
  children: [
7605
- /* @__PURE__ */ j(Rd, {
7608
+ /* @__PURE__ */ k(Rd, {
7606
7609
  id: "settings",
7607
- disabled: u,
7608
- text: /* @__PURE__ */ j("button", {
7610
+ disabled: l,
7611
+ text: /* @__PURE__ */ k("button", {
7609
7612
  className: "settings",
7610
7613
  type: "button",
7611
- onClick: d,
7614
+ onClick: u,
7612
7615
  "aria-label": "Settings",
7613
- "aria-expanded": u,
7614
- children: /* @__PURE__ */ j(l, {})
7616
+ "aria-expanded": l,
7617
+ children: /* @__PURE__ */ k(P, {})
7615
7618
  }),
7616
- toolTipText: /* @__PURE__ */ j("span", { children: "Settings" })
7619
+ toolTipText: /* @__PURE__ */ k("span", { children: "Settings" })
7617
7620
  }),
7618
- u && s === 0 && /* @__PURE__ */ P("div", {
7621
+ l && s === 0 && /* @__PURE__ */ N("div", {
7619
7622
  className: "popover menu",
7620
7623
  children: [
7621
- n.length > 1 ? /* @__PURE__ */ P("div", {
7622
- onClick: v(2),
7623
- children: [/* @__PURE__ */ j("div", { children: "Audio" }), /* @__PURE__ */ j("div", { children: /* @__PURE__ */ j(a, {}) })]
7624
+ n.length > 1 ? /* @__PURE__ */ N("div", {
7625
+ onClick: x(2),
7626
+ children: [/* @__PURE__ */ k("div", { children: "Audio" }), /* @__PURE__ */ k("div", { children: /* @__PURE__ */ k(b, {}) })]
7627
+ }) : null,
7628
+ v > 1 ? /* @__PURE__ */ N("div", {
7629
+ onClick: x(3),
7630
+ children: [/* @__PURE__ */ k("div", { children: "Quality" }), /* @__PURE__ */ N("div", { children: [y ? /* @__PURE__ */ k("span", {
7631
+ className: "secondary",
7632
+ children: y
7633
+ }) : null, /* @__PURE__ */ k(b, {})] })]
7624
7634
  }) : null,
7625
- /* @__PURE__ */ P("div", {
7626
- onClick: v(1),
7627
- children: [/* @__PURE__ */ j("div", { children: "Playback speed" }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ j("span", {
7635
+ /* @__PURE__ */ N("div", {
7636
+ onClick: x(1),
7637
+ children: [/* @__PURE__ */ k("div", { children: "Playback speed" }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ k("span", {
7628
7638
  className: "secondary",
7629
7639
  children: t === 1 ? "(Default)" : t.toFixed(2)
7630
- }), /* @__PURE__ */ j(a, {})] })]
7640
+ }), /* @__PURE__ */ k(b, {})] })]
7631
7641
  }),
7632
- o ? /* @__PURE__ */ P("div", {
7642
+ o ? /* @__PURE__ */ N("div", {
7633
7643
  role: "switch",
7634
7644
  "aria-checked": o.available && o.enabled,
7635
7645
  "aria-disabled": !o.available,
@@ -7637,60 +7647,70 @@ ${_f}
7637
7647
  onClick: () => {
7638
7648
  o.available && o.setEnabled(!o.enabled);
7639
7649
  },
7640
- children: [/* @__PURE__ */ j("div", { children: "Normalize volume" }), /* @__PURE__ */ j("div", { children: o.available ? /* @__PURE__ */ j("span", { className: o.enabled ? "switch on" : "switch" }) : /* @__PURE__ */ j("span", {
7650
+ children: [/* @__PURE__ */ k("div", { children: "Normalize volume" }), /* @__PURE__ */ k("div", { children: o.available ? /* @__PURE__ */ k("span", { className: o.enabled ? "switch on" : "switch" }) : /* @__PURE__ */ k("span", {
7641
7651
  className: "secondary",
7642
7652
  children: "Unavailable"
7643
7653
  }) })]
7644
7654
  }) : null
7645
7655
  ]
7646
7656
  }),
7647
- u && s === 1 && /* @__PURE__ */ P("div", {
7657
+ l && s === 1 && /* @__PURE__ */ N("div", {
7648
7658
  className: "popover playback-rate",
7649
7659
  children: [
7650
- /* @__PURE__ */ P("div", {
7660
+ /* @__PURE__ */ N("div", {
7651
7661
  className: "back",
7652
- onClick: v(0),
7653
- children: [/* @__PURE__ */ j(te, {}), /* @__PURE__ */ j("span", { children: "Playback speed" })]
7662
+ onClick: x(0),
7663
+ children: [/* @__PURE__ */ k(C, {}), /* @__PURE__ */ k("span", { children: "Playback speed" })]
7654
7664
  }),
7655
- /* @__PURE__ */ j("div", {
7665
+ /* @__PURE__ */ k("div", {
7656
7666
  className: "slider no-hover",
7657
- children: /* @__PURE__ */ j(Df, {})
7667
+ children: /* @__PURE__ */ k(Df, {})
7658
7668
  }),
7659
- /* @__PURE__ */ P("div", {
7669
+ /* @__PURE__ */ N("div", {
7660
7670
  className: "options no-hover",
7661
7671
  children: [
7662
- /* @__PURE__ */ j("div", {
7663
- onClick: () => g(.5),
7672
+ /* @__PURE__ */ k("div", {
7673
+ onClick: () => h(.5),
7664
7674
  children: "0.5x"
7665
7675
  }),
7666
- /* @__PURE__ */ j("div", {
7667
- onClick: () => g(1),
7676
+ /* @__PURE__ */ k("div", {
7677
+ onClick: () => h(1),
7668
7678
  children: "1x"
7669
7679
  }),
7670
- /* @__PURE__ */ j("div", {
7671
- onClick: () => g(1.5),
7680
+ /* @__PURE__ */ k("div", {
7681
+ onClick: () => h(1.5),
7672
7682
  children: "1.5x"
7673
7683
  }),
7674
- /* @__PURE__ */ j("div", {
7675
- onClick: () => g(2),
7684
+ /* @__PURE__ */ k("div", {
7685
+ onClick: () => h(2),
7676
7686
  children: "2x"
7677
7687
  })
7678
7688
  ]
7679
7689
  })
7680
7690
  ]
7681
7691
  }),
7682
- u && s === 2 && /* @__PURE__ */ j(vf, {
7692
+ l && s === 2 && /* @__PURE__ */ k(vf, {
7683
7693
  title: "Audio",
7684
7694
  tracks: n,
7685
7695
  selected: r,
7696
+ onSelect: g,
7697
+ onBack: x(0),
7698
+ pending: f,
7699
+ failed: p
7700
+ }),
7701
+ l && s === 3 && a && /* @__PURE__ */ k(vf, {
7702
+ title: "Quality",
7703
+ tracks: a.options,
7704
+ selected: a.selectedId ?? void 0,
7686
7705
  onSelect: _,
7687
- onBack: v(0),
7688
- pending: p,
7689
- failed: m
7706
+ onBack: x(0),
7707
+ offLabel: a.offLabel,
7708
+ pending: f,
7709
+ failed: p
7690
7710
  })
7691
7711
  ]
7692
7712
  });
7693
- }, Af = u`
7713
+ }, Af = s`
7694
7714
  /* Not a containing block, for the reason given on popoverStyle: the menu anchors to the control bar,
7695
7715
  which is the width of the player box, so it can be clamped to it. */
7696
7716
  position: static;
@@ -7711,23 +7731,23 @@ ${_f}
7711
7731
  let e = $((e) => e.subtitleTracks), t = $((e) => e.selectedSubtitleTrack), n = $((e) => e.selectSubtitleTrack), r = $((e) => e.subtitleOffLabel), { open: i, toggle: a, containerRef: o, pending: s, failed: c, runSelect: l } = yf();
7712
7732
  if (e.length === 0) return null;
7713
7733
  let u = t !== void 0;
7714
- return /* @__PURE__ */ P("div", {
7734
+ return /* @__PURE__ */ N("div", {
7715
7735
  css: Af,
7716
7736
  ref: o,
7717
- children: [/* @__PURE__ */ j(Rd, {
7737
+ children: [/* @__PURE__ */ k(Rd, {
7718
7738
  id: "subtitles",
7719
7739
  disabled: i,
7720
- text: /* @__PURE__ */ j("button", {
7740
+ text: /* @__PURE__ */ k("button", {
7721
7741
  className: "subtitles",
7722
7742
  type: "button",
7723
7743
  onClick: a,
7724
7744
  "aria-label": "Subtitles",
7725
7745
  "aria-expanded": i,
7726
7746
  "aria-pressed": u,
7727
- children: u ? /* @__PURE__ */ j(m, { className: "captions" }) : /* @__PURE__ */ j(L, { className: "captions-off" })
7747
+ children: u ? /* @__PURE__ */ k(O, { className: "captions" }) : /* @__PURE__ */ k(R, { className: "captions-off" })
7728
7748
  }),
7729
- toolTipText: /* @__PURE__ */ j("span", { children: "Subtitles" })
7730
- }), i && /* @__PURE__ */ j(vf, {
7749
+ toolTipText: /* @__PURE__ */ k("span", { children: "Subtitles" })
7750
+ }), i && /* @__PURE__ */ k(vf, {
7731
7751
  title: "Subtitles",
7732
7752
  tracks: e,
7733
7753
  selected: t,
@@ -7743,7 +7763,7 @@ ${_f}
7743
7763
  hover: "rgba(255, 255, 255, 0.13)",
7744
7764
  borderPrimary: "#384F70",
7745
7765
  backgroundTooltip: "#222222"
7746
- }, Nf = u`
7766
+ }, Nf = s`
7747
7767
  display: flex;
7748
7768
  align-items: center;
7749
7769
 
@@ -7787,7 +7807,7 @@ ${_f}
7787
7807
  height: 10px;
7788
7808
  }
7789
7809
  `, Pf = ({ value: e, onChange: t }) => {
7790
- let n = $((e) => e.volume), r = $((e) => e.muted), i = x(null), a = x(null), { handlers: o } = zd({
7810
+ let n = $((e) => e.volume), r = $((e) => e.muted), i = p(null), a = p(null), { handlers: o } = zd({
7791
7811
  ref: a,
7792
7812
  onChange: t
7793
7813
  }), s = (n) => {
@@ -7795,37 +7815,37 @@ ${_f}
7795
7815
  let r = .05, i = e;
7796
7816
  i = n.deltaY < 0 ? Math.min(1, i + r) : Math.max(0, i - r), t(i);
7797
7817
  };
7798
- D(() => {
7818
+ S(() => {
7799
7819
  let e = i.current;
7800
7820
  return e && e.addEventListener("wheel", s, { passive: !1 }), () => {
7801
7821
  e && e.removeEventListener("wheel", s);
7802
7822
  };
7803
7823
  }, [e]);
7804
- let c = e * 100, l = C(() => Math.round(r ? 0 : jd(n) * 100), [n, r]);
7805
- return /* @__PURE__ */ j(Rd, {
7824
+ let c = e * 100, l = g(() => Math.round(r ? 0 : jd(n) * 100), [n, r]);
7825
+ return /* @__PURE__ */ k(Rd, {
7806
7826
  id: "volume-slider",
7807
- text: /* @__PURE__ */ j("div", {
7827
+ text: /* @__PURE__ */ k("div", {
7808
7828
  ref: i,
7809
7829
  css: Nf,
7810
7830
  ...o,
7811
- children: /* @__PURE__ */ j("div", {
7831
+ children: /* @__PURE__ */ k("div", {
7812
7832
  ref: a,
7813
7833
  style: { background: `linear-gradient(to right,
7814
7834
  #fff 0% ${c}%,
7815
7835
  #3A3A3A ${c}% 100%
7816
7836
  )` },
7817
- children: /* @__PURE__ */ j("div", {
7837
+ children: /* @__PURE__ */ k("div", {
7818
7838
  className: "volume-handle",
7819
7839
  style: { left: `${e * 100}%` }
7820
7840
  })
7821
7841
  })
7822
7842
  }),
7823
- toolTipText: /* @__PURE__ */ P("div", {
7843
+ toolTipText: /* @__PURE__ */ N("div", {
7824
7844
  className: "volume-value",
7825
7845
  children: [l, "%"]
7826
7846
  })
7827
7847
  });
7828
- }, Ff = u`
7848
+ }, Ff = s`
7829
7849
  position: relative;
7830
7850
  display: flex;
7831
7851
  align-items: center;
@@ -7889,29 +7909,29 @@ ${_f}
7889
7909
  }
7890
7910
 
7891
7911
  `, If = ({ ref: e }) => {
7892
- let t = $(), n = $((e) => e.volume), r = $((e) => e.muted), i = C(() => jd(n), [n]);
7893
- return /* @__PURE__ */ P("div", {
7912
+ let t = $(), n = $((e) => e.volume), r = $((e) => e.muted), i = g(() => jd(n), [n]);
7913
+ return /* @__PURE__ */ N("div", {
7894
7914
  css: Ff,
7895
- children: [/* @__PURE__ */ j(Rd, {
7915
+ children: [/* @__PURE__ */ k(Rd, {
7896
7916
  id: "sound",
7897
- text: /* @__PURE__ */ j("button", {
7917
+ text: /* @__PURE__ */ k("button", {
7898
7918
  className: "sound",
7899
7919
  type: "button",
7900
7920
  onClick: () => t.toggleMuted(),
7901
7921
  ref: e,
7902
7922
  "aria-label": "Mute",
7903
7923
  "aria-pressed": r || n === 0,
7904
- children: j(r || n === 0 ? s : n <= .5 ? _ : ce, {
7924
+ children: k(r || n === 0 ? E : n <= .5 ? j : h, {
7905
7925
  size: 18,
7906
7926
  color: "#fff"
7907
7927
  })
7908
7928
  }),
7909
- toolTipText: /* @__PURE__ */ j("span", { children: r ? "Unmute (m)" : "Mute (m)" })
7910
- }), /* @__PURE__ */ j("div", {
7929
+ toolTipText: /* @__PURE__ */ k("span", { children: r ? "Unmute (m)" : "Mute (m)" })
7930
+ }), /* @__PURE__ */ k("div", {
7911
7931
  className: "volume-slider-container",
7912
- children: /* @__PURE__ */ j("div", {
7932
+ children: /* @__PURE__ */ k("div", {
7913
7933
  className: "volume-slider-background",
7914
- children: /* @__PURE__ */ j(Pf, {
7934
+ children: /* @__PURE__ */ k(Pf, {
7915
7935
  value: r ? 0 : i,
7916
7936
  onChange: (e) => {
7917
7937
  t.setVolume(Ad(e));
@@ -7920,7 +7940,7 @@ ${_f}
7920
7940
  })
7921
7941
  })]
7922
7942
  });
7923
- }, Lf = .05, Rf = 5, zf = 50, Bf = 1e3, Vf = u`
7943
+ }, Lf = .05, Rf = 5, zf = 50, Bf = 1e3, Vf = s`
7924
7944
  position: absolute;
7925
7945
  bottom: 0;
7926
7946
  width: 100%;
@@ -8051,17 +8071,17 @@ ${_f}
8051
8071
  }
8052
8072
  }
8053
8073
  `, Hf = ({ shortcuts: e = "window", root: t }) => {
8054
- let n = $(), r = $((e) => e.paused), i = $((e) => e.currentTime), a = $((e) => e.duration), o = $((e) => e.seekingTo), s = $((e) => e.fullscreen), l = $((e) => e.hideUI), u = $((e) => e.togglePictureInPicture), d = $((e) => e.pictureInPictureMode), f = $((e) => e.burnedInSubtitles), p = $((e) => e.passThroughPictureInPicture), m = $((e) => e.subtitleTracks), g = $((e) => e.requestSeek), [_, v] = M(null), y = x(null), b = x(void 0), S = d === "burn-in", C = m.length > 0, w = a > 0 && i === a, T = F(({ direction: e, stepSize: t }) => {
8074
+ let n = $(), r = $((e) => e.paused), i = $((e) => e.currentTime), a = $((e) => e.duration), o = $((e) => e.seekingTo), s = $((e) => e.fullscreen), c = $((e) => e.hideUI), l = $((e) => e.togglePictureInPicture), u = $((e) => e.pictureInPictureMode), d = $((e) => e.burnedInSubtitles), f = $((e) => e.passThroughPictureInPicture), m = $((e) => e.subtitleTracks), h = $((e) => e.requestSeek), [g, _] = A(null), y = p(null), b = p(void 0), x = u === "burn-in", C = m.length > 0, w = a > 0 && i === a, T = I(({ direction: e, stepSize: t }) => {
8055
8075
  let r = jd(n.volume), i = e === "up" ? t : -t, a = Math.max(0, Math.min(1, r + i)), o = n.muted;
8056
8076
  n.setVolume(Ad(a)), o && !n.muted && n.toggleMuted();
8057
- }, [n]), ee = x(!1);
8058
- D(() => {
8059
- let r = (e) => g ? g(e) : n.seek(e), i = (e) => e.composedPath()[0], a = (e) => {
8060
- ee.current = !!t.current?.contains(i(e) ?? null);
8077
+ }, [n]), E = p(!1);
8078
+ S(() => {
8079
+ let r = (e) => h ? h(e) : n.seek(e), i = (e) => e.composedPath()[0], a = (e) => {
8080
+ E.current = !!t.current?.contains(i(e) ?? null);
8061
8081
  }, o = (a) => {
8062
8082
  let o = i(a);
8063
8083
  if (o?.isContentEditable || /^(input|textarea|select)$/i.test(o?.tagName ?? "")) return;
8064
- let s = t.current?.contains(o ?? null) || o === document.body && ee.current;
8084
+ let s = t.current?.contains(o ?? null) || o === document.body && E.current;
8065
8085
  if (e === "player" && !n.fullscreen && !s) return;
8066
8086
  let c = !0;
8067
8087
  if (a.key === "f") n.toggleFullscreen();
@@ -8088,11 +8108,11 @@ ${_f}
8088
8108
  }, [
8089
8109
  n,
8090
8110
  T,
8091
- g,
8111
+ h,
8092
8112
  e,
8093
8113
  t
8094
8114
  ]);
8095
- let E = F((e) => {
8115
+ let ee = I((e) => {
8096
8116
  e.preventDefault(), e.deltaY < 0 ? T({
8097
8117
  direction: "up",
8098
8118
  stepSize: Lf
@@ -8101,21 +8121,21 @@ ${_f}
8101
8121
  stepSize: Lf
8102
8122
  });
8103
8123
  }, [T]);
8104
- D(() => {
8105
- if (_) return _.addEventListener("wheel", E, { passive: !1 }), () => _.removeEventListener("wheel", E);
8106
- }, [_, E]);
8124
+ S(() => {
8125
+ if (g) return g.addEventListener("wheel", ee, { passive: !1 }), () => g.removeEventListener("wheel", ee);
8126
+ }, [g, ee]);
8107
8127
  let O = (e) => {
8108
- if (!p || p.active || p.armed || e.pointerType === "touch") return;
8128
+ if (!f || f.active || f.armed || e.pointerType === "touch") return;
8109
8129
  let { left: t, top: n, width: r, height: i } = e.currentTarget.getBoundingClientRect();
8110
- p.arm({
8130
+ f.arm({
8111
8131
  left: t,
8112
8132
  top: n,
8113
8133
  width: r,
8114
8134
  height: i
8115
8135
  });
8116
- }, k = !!p?.armed;
8117
- return D(() => {
8118
- if (!k) return;
8136
+ }, j = !!f?.armed;
8137
+ return S(() => {
8138
+ if (!j) return;
8119
8139
  clearInterval(b.current);
8120
8140
  let e = Infinity, t = setInterval(() => {
8121
8141
  if (Date.now() > e) {
@@ -8128,94 +8148,94 @@ ${_f}
8128
8148
  return b.current = t, () => {
8129
8149
  e = Date.now() + Bf;
8130
8150
  };
8131
- }, [k]), D(() => () => clearInterval(b.current), []), /* @__PURE__ */ P("div", {
8151
+ }, [j]), S(() => () => clearInterval(b.current), []), /* @__PURE__ */ N("div", {
8132
8152
  css: Vf,
8133
- style: { ...l ? {
8153
+ style: { ...c ? {
8134
8154
  opacity: "0",
8135
8155
  pointerEvents: "none"
8136
- } : k ? { pointerEvents: "none" } : {} },
8137
- children: [/* @__PURE__ */ j(ff, {}), /* @__PURE__ */ P("div", {
8156
+ } : j ? { pointerEvents: "none" } : {} },
8157
+ children: [/* @__PURE__ */ k(ff, {}), /* @__PURE__ */ N("div", {
8138
8158
  className: "actions",
8139
- children: [/* @__PURE__ */ P("div", {
8159
+ children: [/* @__PURE__ */ N("div", {
8140
8160
  className: "left",
8141
8161
  children: [
8142
- /* @__PURE__ */ j(Rd, {
8162
+ /* @__PURE__ */ k(Rd, {
8143
8163
  id: "play",
8144
8164
  tooltipPlace: "top-start",
8145
- text: /* @__PURE__ */ j("button", {
8165
+ text: /* @__PURE__ */ k("button", {
8146
8166
  className: "play",
8147
8167
  type: "button",
8148
8168
  onClick: () => n.togglePaused(),
8149
8169
  "aria-label": w ? "Replay" : r ? "Play" : "Pause",
8150
- children: j(w ? ue : r ? c : h, {})
8170
+ children: k(w ? le : r ? v : D, {})
8151
8171
  }),
8152
- toolTipText: /* @__PURE__ */ j("span", { children: w ? "Replay (k)" : r ? "Play (k)" : "Pause (k)" })
8172
+ toolTipText: /* @__PURE__ */ k("span", { children: w ? "Replay (k)" : r ? "Play (k)" : "Pause (k)" })
8153
8173
  }),
8154
- /* @__PURE__ */ j(If, { ref: v }),
8155
- /* @__PURE__ */ j("div", {
8174
+ /* @__PURE__ */ k(If, { ref: _ }),
8175
+ /* @__PURE__ */ k("div", {
8156
8176
  className: "time",
8157
8177
  children: Nd(o ?? i, a)
8158
8178
  })
8159
8179
  ]
8160
- }), /* @__PURE__ */ P("div", {
8180
+ }), /* @__PURE__ */ N("div", {
8161
8181
  className: "right",
8162
8182
  children: [
8163
- /* @__PURE__ */ j(Tf, {}),
8164
- /* @__PURE__ */ j(jf, {}),
8165
- /* @__PURE__ */ j(kf, {}),
8166
- p ? /* @__PURE__ */ j(Rd, {
8183
+ /* @__PURE__ */ k(Tf, {}),
8184
+ /* @__PURE__ */ k(jf, {}),
8185
+ /* @__PURE__ */ k(kf, {}),
8186
+ f ? /* @__PURE__ */ k(Rd, {
8167
8187
  id: "picture-in-picture",
8168
8188
  tooltipPlace: "top-end",
8169
- text: /* @__PURE__ */ j("button", {
8189
+ text: /* @__PURE__ */ k("button", {
8170
8190
  ref: y,
8171
- className: p.armed ? "picture-in-picture armed" : "picture-in-picture",
8191
+ className: f.armed ? "picture-in-picture armed" : "picture-in-picture",
8172
8192
  type: "button",
8173
8193
  onPointerEnter: O,
8174
8194
  onPointerMove: O,
8175
- onClick: p.active ? p.exit : void 0,
8195
+ onClick: f.active ? f.exit : void 0,
8176
8196
  "aria-label": "Picture in picture",
8177
- "aria-pressed": p.active,
8178
- children: /* @__PURE__ */ j("img", {
8197
+ "aria-pressed": f.active,
8198
+ children: /* @__PURE__ */ k("img", {
8179
8199
  src: pf,
8180
8200
  alt: ""
8181
8201
  })
8182
8202
  }),
8183
- toolTipText: /* @__PURE__ */ j("span", { children: p.active ? "Exit picture in picture" : "Picture in picture" })
8184
- }) : u ? /* @__PURE__ */ j(Rd, {
8203
+ toolTipText: /* @__PURE__ */ k("span", { children: f.active ? "Exit picture in picture" : "Picture in picture" })
8204
+ }) : l ? /* @__PURE__ */ k(Rd, {
8185
8205
  id: "picture-in-picture",
8186
8206
  tooltipPlace: "top-end",
8187
- text: /* @__PURE__ */ j("button", {
8207
+ text: /* @__PURE__ */ k("button", {
8188
8208
  className: "picture-in-picture",
8189
8209
  type: "button",
8190
- onClick: u,
8191
- disabled: S && !C,
8192
- "aria-label": S ? "Put the subtitles in the video" : "Picture in picture",
8193
- "aria-pressed": S ? f : void 0,
8194
- children: S ? j(f ? hf : gf, {}) : /* @__PURE__ */ j("img", {
8210
+ onClick: l,
8211
+ disabled: x && !C,
8212
+ "aria-label": x ? "Put the subtitles in the video" : "Picture in picture",
8213
+ "aria-pressed": x ? d : void 0,
8214
+ children: x ? k(d ? hf : gf, {}) : /* @__PURE__ */ k("img", {
8195
8215
  src: pf,
8196
8216
  alt: ""
8197
8217
  })
8198
8218
  }),
8199
- toolTipText: /* @__PURE__ */ j("span", { children: S ? C ? f ? "Subtitles are in the picture" : "Put the subtitles in the picture" : "This file has no subtitles" : "Picture in picture" })
8219
+ toolTipText: /* @__PURE__ */ k("span", { children: x ? C ? d ? "Subtitles are in the picture" : "Put the subtitles in the picture" : "This file has no subtitles" : "Picture in picture" })
8200
8220
  }) : null,
8201
- /* @__PURE__ */ j(Rd, {
8221
+ /* @__PURE__ */ k(Rd, {
8202
8222
  id: "full-screen",
8203
8223
  tooltipPlace: "top-end",
8204
- text: /* @__PURE__ */ j("button", {
8224
+ text: /* @__PURE__ */ k("button", {
8205
8225
  className: "full-screen",
8206
8226
  type: "button",
8207
8227
  onClick: () => n.toggleFullscreen(),
8208
8228
  "aria-label": "Full screen",
8209
8229
  "aria-pressed": s,
8210
- children: j(s ? R : le, {})
8230
+ children: k(s ? z : ce, {})
8211
8231
  }),
8212
- toolTipText: /* @__PURE__ */ j("span", { children: s ? "Exit full screen (f)" : "Full screen (f)" })
8232
+ toolTipText: /* @__PURE__ */ k("span", { children: s ? "Exit full screen (f)" : "Full screen (f)" })
8213
8233
  })
8214
8234
  ]
8215
8235
  })]
8216
8236
  })]
8217
8237
  });
8218
- }, Uf = 9e3, Wf = u`
8238
+ }, Uf = 9e3, Wf = s`
8219
8239
  position: absolute;
8220
8240
  inset: 0;
8221
8241
  z-index: 2;
@@ -8259,8 +8279,8 @@ ${_f}
8259
8279
  color: #fff;
8260
8280
  }
8261
8281
  `, Gf = () => {
8262
- let e = $((e) => e.burnedInSubtitles), t = $((e) => e.pictureInPictureMode), [n, r] = M(!1);
8263
- return D(() => {
8282
+ let e = $((e) => e.burnedInSubtitles), t = $((e) => e.pictureInPictureMode), [n, r] = A(!1);
8283
+ return S(() => {
8264
8284
  if (t !== "burn-in" || !e) {
8265
8285
  r(!1);
8266
8286
  return;
@@ -8268,16 +8288,16 @@ ${_f}
8268
8288
  r(!0);
8269
8289
  let n = setTimeout(() => r(!1), Uf);
8270
8290
  return () => clearTimeout(n);
8271
- }, [t, e]), t !== "burn-in" || !e ? null : /* @__PURE__ */ j("div", {
8291
+ }, [t, e]), t !== "burn-in" || !e ? null : /* @__PURE__ */ k("div", {
8272
8292
  css: Wf,
8273
8293
  className: n ? "show" : "",
8274
8294
  role: "status",
8275
- children: /* @__PURE__ */ P("div", {
8295
+ children: /* @__PURE__ */ N("div", {
8276
8296
  className: "card",
8277
- children: [/* @__PURE__ */ j("div", {
8297
+ children: [/* @__PURE__ */ k("div", {
8278
8298
  className: "text",
8279
8299
  children: "Now click your browser's pop out button"
8280
- }), /* @__PURE__ */ j("div", {
8300
+ }), /* @__PURE__ */ k("div", {
8281
8301
  className: "arrow",
8282
8302
  "aria-hidden": "true",
8283
8303
  children: "→"
@@ -8287,7 +8307,7 @@ ${_f}
8287
8307
  }, Kf = 1, qf = 6e3, Jf = 1, Yf = {
8288
8308
  opening: "Skip Opening",
8289
8309
  ending: "Skip Ending"
8290
- }, Xf = u`
8310
+ }, Xf = s`
8291
8311
  position: absolute;
8292
8312
  inset: 0;
8293
8313
  z-index: 2;
@@ -8339,7 +8359,7 @@ ${_f}
8339
8359
  }
8340
8360
  }
8341
8361
  `, Zf = () => {
8342
- let e = $((e) => e.chapters), t = $((e) => e.currentTime), n = $((e) => e.requestSeek), r = $((e) => e.seekPreview), i = $(), a = C(() => lf(e), [e]), o = C(() => {
8362
+ let e = $((e) => e.chapters), t = $((e) => e.currentTime), n = $((e) => e.requestSeek), r = $((e) => e.seekPreview), i = $(), a = g(() => lf(e), [e]), o = g(() => {
8343
8363
  if (typeof t != "number") return;
8344
8364
  let n = e.findIndex((e, n) => a[n] !== void 0 && e.start - Kf <= t && t < e.end), r = n >= 0 ? a[n] : void 0;
8345
8365
  return r ? {
@@ -8350,13 +8370,13 @@ ${_f}
8350
8370
  e,
8351
8371
  a,
8352
8372
  t
8353
- ]), s = x(0), [c, l] = M(0);
8354
- D(() => {
8373
+ ]), s = p(0), [c, l] = A(0);
8374
+ S(() => {
8355
8375
  let e = typeof t == "number" ? t : 0, n = s.current;
8356
8376
  s.current = e, e < n - Jf && l((e) => e + 1);
8357
8377
  }, [t]);
8358
- let [u, d] = M(!1), f = o ? `${o.kind}@${o.end}` : "";
8359
- return D(() => {
8378
+ let [u, d] = A(!1), f = o ? `${o.kind}@${o.end}` : "";
8379
+ return S(() => {
8360
8380
  if (!f) {
8361
8381
  d(!1);
8362
8382
  return;
@@ -8364,12 +8384,12 @@ ${_f}
8364
8384
  d(!0);
8365
8385
  let e = setTimeout(() => d(!1), qf);
8366
8386
  return () => clearTimeout(e);
8367
- }, [f, c]), D(() => {
8387
+ }, [f, c]), S(() => {
8368
8388
  o || d(!1);
8369
- }, [o]), o ? /* @__PURE__ */ j("div", {
8389
+ }, [o]), o ? /* @__PURE__ */ k("div", {
8370
8390
  css: Xf,
8371
8391
  className: u && !r ? "show" : "",
8372
- children: /* @__PURE__ */ j("button", {
8392
+ children: /* @__PURE__ */ k("button", {
8373
8393
  type: "button",
8374
8394
  className: "skip-chapter",
8375
8395
  onClick: () => {
@@ -8378,7 +8398,7 @@ ${_f}
8378
8398
  children: Yf[o.kind]
8379
8399
  })
8380
8400
  }) : null;
8381
- }, Qf = 3e3, $f = u`
8401
+ }, Qf = 3e3, $f = s`
8382
8402
  position: absolute;
8383
8403
  inset: 0;
8384
8404
  z-index: 2;
@@ -8392,7 +8412,7 @@ ${_f}
8392
8412
  `, ep = (e, t) => {
8393
8413
  let n = e.left - t.left, r = e.top - t.top;
8394
8414
  return `path(evenodd, 'M0 0H${t.width}V${t.height}H0Z M${n} ${r}H${n + e.width}V${r + e.height}H${n}Z')`;
8395
- }, tp = u`
8415
+ }, tp = s`
8396
8416
  position: relative;
8397
8417
  background-color: black;
8398
8418
  display: flex;
@@ -8449,63 +8469,63 @@ ${_f}
8449
8469
  &.hide {
8450
8470
  cursor: none;
8451
8471
  }
8452
- `, np = (e, t = "") => y.toArray(e).flatMap((e, n) => {
8453
- let r = `${t}${d(e) && e.key != null ? e.key : n}`;
8454
- return d(e) && e.type === E ? np(e.props.children, `${r}/`) : [{
8472
+ `, np = (e, t = "") => d.toArray(e).flatMap((e, n) => {
8473
+ let r = `${t}${c(e) && e.key != null ? e.key : n}`;
8474
+ return c(e) && e.type === x ? np(e.props.children, `${r}/`) : [{
8455
8475
  key: r,
8456
8476
  item: e
8457
8477
  }];
8458
8478
  }), rp = ({ ref: e, onVideoRef: t, onSubtitleRef: n, overlay: r, controls: i, shortcuts: a, children: o }) => {
8459
- let s = $(), c = $((e) => e.hideUI), l = $((e) => e.setHideUI), u = $((e) => e.hasMedia), d = $((e) => e.passThroughPictureInPicture), f = x(void 0), p = x("mouse"), m = x({
8479
+ let s = $(), c = $((e) => e.hideUI), l = $((e) => e.setHideUI), u = $((e) => e.hasMedia), d = $((e) => e.passThroughPictureInPicture), f = p(void 0), m = p("mouse"), h = p({
8460
8480
  x: -1,
8461
8481
  y: -1
8462
- }), h = x(null);
8463
- D(() => () => clearTimeout(f.current), []), D(() => {
8482
+ }), g = p(null);
8483
+ S(() => () => clearTimeout(f.current), []), S(() => {
8464
8484
  u || (clearTimeout(f.current), l(!1));
8465
8485
  }, [u, l]);
8466
- let g = () => {
8486
+ let _ = () => {
8467
8487
  u && l(!0);
8468
- }, _ = (t) => {
8469
- h.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
8470
- }, v = () => {
8488
+ }, v = (t) => {
8489
+ g.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
8490
+ }, y = () => {
8471
8491
  if (s.passThroughPictureInPicture?.armed) return !0;
8472
- if (p.current !== "mouse") return !1;
8473
- let { x: e, y: t } = m.current;
8474
- if (!h.current || e < 0) return !1;
8492
+ if (m.current !== "mouse") return !1;
8493
+ let { x: e, y: t } = h.current;
8494
+ if (!g.current || e < 0) return !1;
8475
8495
  let n = document.elementFromPoint(e, t);
8476
- return !!n && h.current.contains(n) && !n.closest(".video");
8477
- }, y = () => {
8478
- if (v()) {
8479
- f.current = setTimeout(y, Qf);
8496
+ return !!n && g.current.contains(n) && !n.closest(".video");
8497
+ }, b = () => {
8498
+ if (y()) {
8499
+ f.current = setTimeout(b, Qf);
8480
8500
  return;
8481
8501
  }
8482
- g();
8483
- }, b = () => {
8484
- l(!1), clearTimeout(f.current), f.current = setTimeout(y, Qf);
8502
+ _();
8503
+ }, x = () => {
8504
+ l(!1), clearTimeout(f.current), f.current = setTimeout(b, Qf);
8485
8505
  };
8486
- return /* @__PURE__ */ P("div", {
8506
+ return /* @__PURE__ */ N("div", {
8487
8507
  css: tp,
8488
- ref: _,
8508
+ ref: v,
8489
8509
  onPointerMove: (e) => {
8490
- p.current = e.pointerType, e.pointerType === "mouse" && (m.current = {
8510
+ m.current = e.pointerType, e.pointerType === "mouse" && (h.current = {
8491
8511
  x: e.clientX,
8492
8512
  y: e.clientY
8493
- }, b());
8513
+ }, x());
8494
8514
  },
8495
8515
  onPointerDown: (e) => {
8496
- p.current = e.pointerType;
8516
+ m.current = e.pointerType;
8497
8517
  },
8498
8518
  onMouseOut: (e) => {
8499
8519
  let t = e.relatedTarget;
8500
8520
  if (t && e.currentTarget.contains(t)) return;
8501
8521
  let { left: n, right: r, top: i, bottom: a } = e.currentTarget.getBoundingClientRect();
8502
- e.clientX >= n && e.clientX < r && e.clientY >= i && e.clientY < a || (clearTimeout(f.current), g());
8522
+ e.clientX >= n && e.clientX < r && e.clientY >= i && e.clientY < a || (clearTimeout(f.current), _());
8503
8523
  },
8504
8524
  className: c ? "hide" : "",
8505
8525
  tabIndex: a === "player" ? -1 : void 0,
8506
8526
  children: [
8507
- /* @__PURE__ */ j(Dd, { onSubtitleRef: n }),
8508
- np(r).map(({ key: e, item: t }) => /* @__PURE__ */ j("div", {
8527
+ /* @__PURE__ */ k(Dd, { onSubtitleRef: n }),
8528
+ np(r).map(({ key: e, item: t }) => /* @__PURE__ */ k("div", {
8509
8529
  css: $f,
8510
8530
  style: { ...c ? {
8511
8531
  opacity: "0",
@@ -8514,27 +8534,27 @@ ${_f}
8514
8534
  } : {} },
8515
8535
  children: t
8516
8536
  }, e)),
8517
- i === !1 ? null : /* @__PURE__ */ j(Hf, {
8537
+ i === !1 ? null : /* @__PURE__ */ k(Hf, {
8518
8538
  shortcuts: a,
8519
- root: h
8539
+ root: g
8520
8540
  }),
8521
- /* @__PURE__ */ j(Gf, {}),
8522
- /* @__PURE__ */ j(Zf, {}),
8523
- d?.armed && h.current ? /* @__PURE__ */ j("div", {
8541
+ /* @__PURE__ */ k(Gf, {}),
8542
+ /* @__PURE__ */ k(Zf, {}),
8543
+ d?.armed && g.current ? /* @__PURE__ */ k("div", {
8524
8544
  className: "pass-through",
8525
- style: { clipPath: ep(d.armed, h.current.getBoundingClientRect()) },
8545
+ style: { clipPath: ep(d.armed, g.current.getBoundingClientRect()) },
8526
8546
  onPointerOver: d.disarm
8527
8547
  }) : null,
8528
- /* @__PURE__ */ P("div", {
8548
+ /* @__PURE__ */ N("div", {
8529
8549
  className: "video",
8530
8550
  onClick: () => {
8531
- if (p.current === "mouse") {
8551
+ if (m.current === "mouse") {
8532
8552
  s.togglePaused();
8533
8553
  return;
8534
8554
  }
8535
- c ? b() : (clearTimeout(f.current), g());
8555
+ c ? x() : (clearTimeout(f.current), _());
8536
8556
  },
8537
- children: [t ? /* @__PURE__ */ j("video", {
8557
+ children: [t ? /* @__PURE__ */ k("video", {
8538
8558
  ref: t,
8539
8559
  playsInline: !0
8540
8560
  }) : null, o]
@@ -8542,120 +8562,124 @@ ${_f}
8542
8562
  ]
8543
8563
  });
8544
8564
  }, ip = ({ options: e, children: t }) => {
8545
- let n = "media" in e ? e : null, r = n ? null : e, { title: i, chapters: a } = e, { size: o, downloadedRanges: s, publicPath: c, libavWorkerUrl: l, read: u, thumbnailRead: d, thumbnailsEnabled: f } = r ?? {}, p = Rc(), m = zc(), [h, g] = M(null), [_, v] = M(null), y = n?.media ?? h;
8546
- D(() => (p?.(y), () => p?.(null)), [y, p]);
8547
- let { expose: b } = e, S = b === !0 ? {} : b || void 0, w = x(S);
8548
- w.current = S;
8549
- let T = S ? S.id : void 0, ee = S ? S.origin : void 0, E = S ? S.channel : void 0;
8550
- D(() => {
8551
- if (!b || !y) return;
8565
+ let n = "media" in e ? e : null, r = n ? null : e, { title: i, chapters: a } = e, { size: o, downloadedRanges: s, publicPath: c, libavWorkerUrl: l, read: u, thumbnailRead: d, thumbnailsEnabled: f } = r ?? {}, m = Rc(), h = zc(), [_, v] = A(null), [y, b] = A(null), x = n?.media ?? _;
8566
+ S(() => (m?.(x), () => m?.(null)), [x, m]);
8567
+ let { expose: C } = e, w = C === !0 ? {} : C || void 0, T = p(w);
8568
+ T.current = w;
8569
+ let E = w ? w.id : void 0, ee = w ? w.origin : void 0, D = w ? w.channel : void 0;
8570
+ S(() => {
8571
+ if (!C || !x) return;
8552
8572
  let e, t = !1;
8553
- return import("./lib-remote-C1YHVUVa.js").then(({ exposePlayer: n }) => {
8554
- t || (e = n(y, w.current ?? {}));
8573
+ return import("./lib-remote-DkrdRpDM.js").then(({ exposePlayer: n }) => {
8574
+ t || (e = n(x, T.current ?? {}));
8555
8575
  }).catch(() => {}), () => {
8556
8576
  t = !0, e?.();
8557
8577
  };
8558
8578
  }, [
8559
- y,
8560
- !!b,
8561
- T,
8579
+ x,
8580
+ !!C,
8581
+ E,
8562
8582
  ee,
8563
- E
8564
- ]), id(h, _, r);
8565
- let O = r?.normalizeVolume, [k, te] = M(!!O);
8566
- D(() => {
8583
+ D
8584
+ ]), id(_, y, r);
8585
+ let O = r?.normalizeVolume, [j, te] = A(!!O);
8586
+ S(() => {
8567
8587
  te(!!O);
8568
8588
  }, [O]);
8569
- let ne = x(r?.onNormalizeVolumeChange);
8589
+ let ne = p(r?.onNormalizeVolumeChange);
8570
8590
  ne.current = r?.onNormalizeVolumeChange;
8571
- let A = r?.normalizerWorkletUrl, { refused: re } = yd(h, A, k), ie = C(() => A && typeof AudioWorkletNode == "function" ? {
8572
- enabled: k,
8573
- available: !re,
8591
+ let M = r?.normalizerWorkletUrl, { refused: N } = yd(_, M, j), re = g(() => M && typeof AudioWorkletNode == "function" ? {
8592
+ enabled: j,
8593
+ available: !N,
8574
8594
  setEnabled: (e) => {
8575
8595
  te(e), ne.current?.(e);
8576
8596
  }
8577
8597
  } : null, [
8578
- A,
8579
- k,
8580
- re
8581
- ]), { thumbnails: N, requestThumbnail: P } = sd({
8598
+ M,
8599
+ j,
8600
+ N
8601
+ ]), { thumbnails: P, requestThumbnail: F } = sd({
8582
8602
  publicPath: c,
8583
8603
  workerUrl: l,
8584
8604
  length: f === !1 ? void 0 : o,
8585
8605
  read: d ?? u,
8586
8606
  downloadedRanges: s
8587
- }), ae = n?.thumbnails?.all ?? N, { toggle: oe, mode: se, burnedIn: F } = cd(h, _), ce = md(n?.media ?? null, n?.pictureInPicture), I = $((e) => e.setSourceState), L = n ? !!n.media : o !== void 0;
8588
- D(() => {
8589
- I({
8607
+ }), I = n?.thumbnails?.all ?? P, { toggle: ie, mode: ae, burnedIn: oe } = cd(_, y), se = md(n?.media ?? null, n?.pictureInPicture), L = $((e) => e.setSourceState), R = n ? !!n.media : o !== void 0;
8608
+ S(() => {
8609
+ L({
8590
8610
  title: i,
8591
8611
  size: o,
8592
8612
  downloadedRanges: s,
8593
- hasMedia: L
8613
+ hasMedia: R
8594
8614
  });
8595
8615
  }, [
8596
- I,
8616
+ L,
8597
8617
  i,
8598
8618
  o,
8599
8619
  s,
8600
- L
8620
+ R
8601
8621
  ]);
8602
- let le = n?.thumbnails?.at;
8603
- D(() => {
8604
- I({
8605
- thumbnails: ae,
8606
- thumbnailAt: le,
8607
- requestThumbnail: P,
8608
- togglePictureInPicture: oe,
8609
- pictureInPictureMode: se,
8610
- burnedInSubtitles: F
8622
+ let ce = n?.thumbnails?.at;
8623
+ S(() => {
8624
+ L({
8625
+ thumbnails: I,
8626
+ thumbnailAt: ce,
8627
+ requestThumbnail: F,
8628
+ togglePictureInPicture: ie,
8629
+ pictureInPictureMode: ae,
8630
+ burnedInSubtitles: oe
8611
8631
  });
8612
8632
  }, [
8633
+ L,
8613
8634
  I,
8635
+ ce,
8636
+ F,
8637
+ ie,
8614
8638
  ae,
8615
- le,
8616
- P,
8617
- oe,
8618
- se,
8619
- F
8620
- ]), D(() => {
8621
- I({ volumeNormalizer: ie });
8622
- }, [I, ie]), D(() => {
8623
- I({ passThroughPictureInPicture: ce });
8624
- }, [I, ce]);
8625
- let R = n?.subtitles?.selection, ue = n?.audioTracks?.selection;
8626
- return D(() => {
8627
- R && I({
8628
- subtitleTracks: R.options.map(({ id: e, label: t, disabled: n }) => ({
8639
+ oe
8640
+ ]), S(() => {
8641
+ L({ volumeNormalizer: re });
8642
+ }, [L, re]), S(() => {
8643
+ L({ passThroughPictureInPicture: se });
8644
+ }, [L, se]);
8645
+ let z = n?.subtitles?.selection, le = n?.audioTracks?.selection;
8646
+ S(() => {
8647
+ z && L({
8648
+ subtitleTracks: z.options.map(({ id: e, label: t, disabled: n }) => ({
8629
8649
  id: e,
8630
8650
  label: t,
8631
8651
  disabled: n
8632
8652
  })),
8633
- selectedSubtitleTrack: R.selectedId ?? void 0,
8634
- selectSubtitleTrack: (e) => R.select(e == null ? null : String(e)),
8635
- subtitleOffLabel: R.offLabel
8653
+ selectedSubtitleTrack: z.selectedId ?? void 0,
8654
+ selectSubtitleTrack: (e) => z.select(e == null ? null : String(e)),
8655
+ subtitleOffLabel: z.offLabel
8636
8656
  });
8637
- }, [I, R]), D(() => {
8638
- ue && I({
8639
- audioTracks: ue.options.map(({ id: e, label: t, disabled: n }) => ({
8657
+ }, [L, z]), S(() => {
8658
+ le && L({
8659
+ audioTracks: le.options.map(({ id: e, label: t, disabled: n }) => ({
8640
8660
  id: e,
8641
8661
  label: t,
8642
8662
  disabled: n
8643
8663
  })),
8644
- selectedAudioTrack: ue.selectedId ?? void 0,
8645
- selectAudioTrack: (e) => ue.select(String(e))
8664
+ selectedAudioTrack: le.selectedId ?? void 0,
8665
+ selectAudioTrack: (e) => le.select(String(e))
8646
8666
  });
8647
- }, [I, ue]), D(() => {
8648
- a && I({ chapters: a });
8649
- }, [I, a]), /* @__PURE__ */ j(rp, {
8650
- ref: m,
8651
- onVideoRef: n ? void 0 : g,
8652
- onSubtitleRef: v,
8667
+ }, [L, le]);
8668
+ let ue = n?.quality?.selection ?? null;
8669
+ return S(() => {
8670
+ L({ quality: ue });
8671
+ }, [L, ue]), S(() => {
8672
+ a && L({ chapters: a });
8673
+ }, [L, a]), /* @__PURE__ */ k(rp, {
8674
+ ref: h,
8675
+ onVideoRef: n ? void 0 : v,
8676
+ onSubtitleRef: b,
8653
8677
  overlay: e.overlay,
8654
8678
  controls: e.controls,
8655
8679
  shortcuts: e.shortcuts,
8656
8680
  children: t
8657
8681
  });
8658
- }, ap = u`
8682
+ }, ap = s`
8659
8683
  /**
8660
8684
  * The chrome's whole scale, in one place.
8661
8685
  *
@@ -8725,20 +8749,20 @@ ${_f}
8725
8749
  height: 100%;
8726
8750
  width: 100%;
8727
8751
  overflow: hidden;
8728
- `, op = (e) => /* @__PURE__ */ j("div", {
8752
+ `, op = (e) => /* @__PURE__ */ k("div", {
8729
8753
  css: ap,
8730
- children: /* @__PURE__ */ j(qu.Provider, { children: /* @__PURE__ */ j(ip, {
8754
+ children: /* @__PURE__ */ k(qu.Provider, { children: /* @__PURE__ */ k(ip, {
8731
8755
  options: e,
8732
8756
  children: e.children
8733
8757
  }) })
8734
8758
  }), sp = ({ url: e }) => {
8735
- let [t, n] = M(null);
8736
- return D(() => {
8759
+ let [t, n] = A(null);
8760
+ return S(() => {
8737
8761
  t?.play().catch(() => {});
8738
- }, [t]), /* @__PURE__ */ j(op, {
8762
+ }, [t]), /* @__PURE__ */ k(op, {
8739
8763
  media: t,
8740
8764
  shortcuts: "player",
8741
- children: /* @__PURE__ */ j("video", {
8765
+ children: /* @__PURE__ */ k("video", {
8742
8766
  ref: n,
8743
8767
  src: e,
8744
8768
  playsInline: !0