@banou/media-player 0.4.5 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -2,12 +2,12 @@ import * as ce from "react";
2
2
  import mr, { forwardRef as pr, useContext as Ue, createContext as hr, useState as Z, useEffect as z, useCallback as ot, useRef as Ne, useMemo as pe } from "react";
3
3
  import { css as Q } from "@emotion/react";
4
4
  import { createActorContext as vr } from "@xstate/react";
5
- import { fromCallback as qt, setup as Er, enqueueActions as br, assign as Y, sendTo as X } from "xstate";
6
- import Xt from "p-queue";
5
+ import { fromCallback as Xt, setup as Er, enqueueActions as br, assign as Y, sendTo as q } from "xstate";
6
+ import qt from "p-queue";
7
7
  import { makeRemuxer as Ht } from "libav-wasm";
8
8
  import gr from "jassub";
9
9
  import { parse as Me, stringify as _t } from "ass-compiler";
10
- import { Settings as yr, ChevronRight as Ke, VolumeX as Sr, Volume1 as xr, Volume2 as Tr, RotateCcw as wr, Play as Ar, Pause as Rr, Minimize as _r, Maximize as Cr } from "react-feather";
10
+ import { Settings as yr, ChevronRight as Ke, VolumeX as Sr, Volume1 as xr, Volume2 as Tr, RotateCcw as wr, Play as Rr, Pause as Ar, Minimize as _r, Maximize as Cr } from "react-feather";
11
11
  import { Tooltip as Pr } from "react-tooltip";
12
12
  var Je = { exports: {} }, Ce = {};
13
13
  /**
@@ -62,7 +62,7 @@ function Nr() {
62
62
  switch (i) {
63
63
  case _:
64
64
  return "Fragment";
65
- case m:
65
+ case f:
66
66
  return "Portal";
67
67
  case W:
68
68
  return "Profiler";
@@ -119,7 +119,7 @@ function Nr() {
119
119
  }
120
120
  function o() {
121
121
  if (fe === 0) {
122
- Fe = console.log, Ve = console.info, We = console.warn, Be = console.error, Ge = console.group, qe = console.groupCollapsed, Xe = console.groupEnd;
122
+ Fe = console.log, Ve = console.info, We = console.warn, Be = console.error, Ge = console.group, Xe = console.groupCollapsed, qe = console.groupEnd;
123
123
  var i = {
124
124
  configurable: !0,
125
125
  enumerable: !0,
@@ -147,8 +147,8 @@ function Nr() {
147
147
  warn: ie({}, i, { value: We }),
148
148
  error: ie({}, i, { value: Be }),
149
149
  group: ie({}, i, { value: Ge }),
150
- groupCollapsed: ie({}, i, { value: qe }),
151
- groupEnd: ie({}, i, { value: Xe })
150
+ groupCollapsed: ie({}, i, { value: Xe }),
151
+ groupEnd: ie({}, i, { value: qe })
152
152
  });
153
153
  }
154
154
  0 > fe && console.error(
@@ -156,16 +156,16 @@ function Nr() {
156
156
  );
157
157
  }
158
158
  function s(i) {
159
- if (w === void 0)
159
+ if (R === void 0)
160
160
  try {
161
161
  throw Error();
162
162
  } catch (T) {
163
163
  var x = T.stack.trim().match(/\n( *(at )?)/);
164
- w = x && x[1] || "", he = -1 < T.stack.indexOf(`
164
+ R = x && x[1] || "", he = -1 < T.stack.indexOf(`
165
165
  at`) ? " (<anonymous>)" : -1 < T.stack.indexOf("@") ? "@unknown:0:0" : "";
166
166
  }
167
167
  return `
168
- ` + w + i + he;
168
+ ` + R + i + he;
169
169
  }
170
170
  function u(i, x) {
171
171
  if (!i || le) return "";
@@ -229,10 +229,10 @@ function Nr() {
229
229
  );
230
230
  var P = B.DetermineComponentFrameRoot(), ae = P[0], Ee = P[1];
231
231
  if (ae && Ee) {
232
- var q = ae.split(`
232
+ var X = ae.split(`
233
233
  `), me = Ee.split(`
234
234
  `);
235
- for (P = U = 0; U < q.length && !q[U].includes(
235
+ for (P = U = 0; U < X.length && !X[U].includes(
236
236
  "DetermineComponentFrameRoot"
237
237
  ); )
238
238
  U++;
@@ -240,16 +240,16 @@ function Nr() {
240
240
  "DetermineComponentFrameRoot"
241
241
  ); )
242
242
  P++;
243
- if (U === q.length || P === me.length)
244
- for (U = q.length - 1, P = me.length - 1; 1 <= U && 0 <= P && q[U] !== me[P]; )
243
+ if (U === X.length || P === me.length)
244
+ for (U = X.length - 1, P = me.length - 1; 1 <= U && 0 <= P && X[U] !== me[P]; )
245
245
  P--;
246
246
  for (; 1 <= U && 0 <= P; U--, P--)
247
- if (q[U] !== me[P]) {
247
+ if (X[U] !== me[P]) {
248
248
  if (U !== 1 || P !== 1)
249
249
  do
250
- if (U--, P--, 0 > P || q[U] !== me[P]) {
250
+ if (U--, P--, 0 > P || X[U] !== me[P]) {
251
251
  var _e = `
252
- ` + q[U].replace(
252
+ ` + X[U].replace(
253
253
  " at new ",
254
254
  " at "
255
255
  );
@@ -262,7 +262,7 @@ function Nr() {
262
262
  } finally {
263
263
  le = !1, oe.H = O, a(), Error.prepareStackTrace = T;
264
264
  }
265
- return q = (q = i ? i.displayName || i.name : "") ? s(q) : "", typeof i == "function" && ve.set(i, q), q;
265
+ return X = (X = i ? i.displayName || i.name : "") ? s(X) : "", typeof i == "function" && ve.set(i, X), X;
266
266
  }
267
267
  function l(i) {
268
268
  if (i == null) return "";
@@ -295,12 +295,12 @@ function Nr() {
295
295
  }
296
296
  return "";
297
297
  }
298
- function b() {
298
+ function E() {
299
299
  var i = oe.A;
300
300
  return i === null ? null : i.getOwner();
301
301
  }
302
302
  function d(i) {
303
- if (Ae.call(i, "key")) {
303
+ if (Re.call(i, "key")) {
304
304
  var x = Object.getOwnPropertyDescriptor(i, "key").get;
305
305
  if (x && x.isReactWarning) return !1;
306
306
  }
@@ -326,7 +326,7 @@ function Nr() {
326
326
  }
327
327
  function y(i, x, T, O, B, U) {
328
328
  return T = U.ref, i = {
329
- $$typeof: R,
329
+ $$typeof: A,
330
330
  type: i,
331
331
  key: x,
332
332
  props: U,
@@ -351,27 +351,27 @@ function Nr() {
351
351
  var P = x.children;
352
352
  if (P !== void 0)
353
353
  if (O)
354
- if (Re(P)) {
354
+ if (Ae(P)) {
355
355
  for (O = 0; O < P.length; O++)
356
- f(P[O], i);
356
+ m(P[O], i);
357
357
  Object.freeze && Object.freeze(P);
358
358
  } else
359
359
  console.error(
360
360
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
361
361
  );
362
- else f(P, i);
362
+ else m(P, i);
363
363
  } else
364
- P = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? O = "null" : Re(i) ? O = "array" : i !== void 0 && i.$$typeof === R ? (O = "<" + (e(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : O = typeof i, console.error(
364
+ P = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? O = "null" : Ae(i) ? O = "array" : i !== void 0 && i.$$typeof === A ? (O = "<" + (e(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : O = typeof i, console.error(
365
365
  "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
366
366
  O,
367
367
  P
368
368
  );
369
- if (Ae.call(x, "key")) {
369
+ if (Re.call(x, "key")) {
370
370
  P = e(i);
371
- var ae = Object.keys(x).filter(function(q) {
372
- return q !== "key";
371
+ var ae = Object.keys(x).filter(function(X) {
372
+ return X !== "key";
373
373
  });
374
- O = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}", At[P + O] || (ae = 0 < ae.length ? "{" + ae.join(": ..., ") + ": ...}" : "{}", console.error(
374
+ O = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}", Rt[P + O] || (ae = 0 < ae.length ? "{" + ae.join(": ..., ") + ": ...}" : "{}", console.error(
375
375
  `A props object containing a "key" prop is being spread into JSX:
376
376
  let props = %s;
377
377
  <%s {...props} />
@@ -382,7 +382,7 @@ React keys must be passed directly to JSX without using spread:
382
382
  P,
383
383
  ae,
384
384
  P
385
- ), At[P + O] = !0);
385
+ ), Rt[P + O] = !0);
386
386
  }
387
387
  if (P = null, T !== void 0 && (n(T), P = "" + T), d(x) && (n(x.key), P = "" + x.key), "key" in x) {
388
388
  T = {};
@@ -392,30 +392,30 @@ React keys must be passed directly to JSX without using spread:
392
392
  return P && g(
393
393
  T,
394
394
  typeof i == "function" ? i.displayName || i.name || "Unknown" : i
395
- ), y(i, P, U, B, b(), T);
395
+ ), y(i, P, U, B, E(), T);
396
396
  }
397
- function f(i, x) {
397
+ function m(i, x) {
398
398
  if (typeof i == "object" && i && i.$$typeof !== fr) {
399
- if (Re(i))
399
+ if (Ae(i))
400
400
  for (var T = 0; T < i.length; T++) {
401
401
  var O = i[T];
402
- c(O) && E(O, x);
402
+ c(O) && v(O, x);
403
403
  }
404
404
  else if (c(i))
405
405
  i._store && (i._store.validated = 1);
406
406
  else if (i === null || typeof i != "object" ? T = null : (T = Ye && i[Ye] || i["@@iterator"], T = typeof T == "function" ? T : null), typeof T == "function" && T !== i.entries && (T = T.call(i), T !== i))
407
407
  for (; !(i = T.next()).done; )
408
- c(i.value) && E(i.value, x);
408
+ c(i.value) && v(i.value, x);
409
409
  }
410
410
  }
411
411
  function c(i) {
412
- return typeof i == "object" && i !== null && i.$$typeof === R;
412
+ return typeof i == "object" && i !== null && i.$$typeof === A;
413
413
  }
414
- function E(i, x) {
415
- if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, x = h(x), !Rt[x])) {
416
- Rt[x] = !0;
414
+ function v(i, x) {
415
+ if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, x = b(x), !At[x])) {
416
+ At[x] = !0;
417
417
  var T = "";
418
- i && i._owner != null && i._owner !== b() && (T = null, typeof i._owner.tag == "number" ? T = e(i._owner.type) : typeof i._owner.name == "string" && (T = i._owner.name), T = " It was passed a child from " + T + ".");
418
+ i && i._owner != null && i._owner !== E() && (T = null, typeof i._owner.tag == "number" ? T = e(i._owner.type) : typeof i._owner.name == "string" && (T = i._owner.name), T = " It was passed a child from " + T + ".");
419
419
  var O = oe.getCurrentStack;
420
420
  oe.getCurrentStack = function() {
421
421
  var B = l(i.type);
@@ -427,17 +427,17 @@ React keys must be passed directly to JSX without using spread:
427
427
  ), oe.getCurrentStack = O;
428
428
  }
429
429
  }
430
- function h(i) {
431
- var x = "", T = b();
430
+ function b(i) {
431
+ var x = "", T = E();
432
432
  return T && (T = e(T.type)) && (x = `
433
433
 
434
434
  Check the render method of \`` + T + "`."), x || (i = e(i)) && (x = `
435
435
 
436
436
  Check the top-level render call using <` + i + ">."), x;
437
437
  }
438
- var A = mr, R = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), D = Symbol.for("react.consumer"), K = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), Te = Symbol.for("react.memo"), we = Symbol.for("react.lazy"), dt = Symbol.for("react.offscreen"), Ye = Symbol.iterator, ze = Symbol.for("react.client.reference"), oe = A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ae = Object.prototype.hasOwnProperty, ie = Object.assign, ft = Symbol.for("react.client.reference"), Re = Array.isArray, fe = 0, Fe, Ve, We, Be, Ge, qe, Xe;
438
+ var w = mr, A = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), D = Symbol.for("react.consumer"), K = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), Te = Symbol.for("react.memo"), we = Symbol.for("react.lazy"), dt = Symbol.for("react.offscreen"), Ye = Symbol.iterator, ze = Symbol.for("react.client.reference"), oe = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Re = Object.prototype.hasOwnProperty, ie = Object.assign, ft = Symbol.for("react.client.reference"), Ae = Array.isArray, fe = 0, Fe, Ve, We, Be, Ge, Xe, qe;
439
439
  r.__reactDisabledLog = !0;
440
- var w, he, le = !1, ve = new (typeof WeakMap == "function" ? WeakMap : Map)(), fr = Symbol.for("react.client.reference"), Tt, wt = {}, At = {}, Rt = {};
440
+ var R, he, le = !1, ve = new (typeof WeakMap == "function" ? WeakMap : Map)(), fr = Symbol.for("react.client.reference"), Tt, wt = {}, Rt = {}, At = {};
441
441
  Pe.Fragment = _, Pe.jsx = function(i, x, T, O, B) {
442
442
  return p(i, x, T, !1, O, B);
443
443
  }, Pe.jsxs = function(i, x, T, O, B) {
@@ -449,15 +449,15 @@ var Ot;
449
449
  function Mr() {
450
450
  return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Je.exports = Or() : Je.exports = Nr()), Je.exports;
451
451
  }
452
- var ke = Mr();
453
- function kr(e) {
452
+ var Le = Mr();
453
+ function Lr(e) {
454
454
  if (e.sheet)
455
455
  return e.sheet;
456
456
  for (var t = 0; t < document.styleSheets.length; t++)
457
457
  if (document.styleSheets[t].ownerNode === e)
458
458
  return document.styleSheets[t];
459
459
  }
460
- function Lr(e) {
460
+ function kr(e) {
461
461
  var t = document.createElement("style");
462
462
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
463
463
  }
@@ -473,10 +473,10 @@ var $r = /* @__PURE__ */ function() {
473
473
  return t.hydrate = function(r) {
474
474
  r.forEach(this._insertTag);
475
475
  }, t.insert = function(r) {
476
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Lr(this));
476
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(kr(this));
477
477
  var o = this.tags[this.tags.length - 1];
478
478
  if (this.isSpeedy) {
479
- var a = kr(o);
479
+ var a = Lr(o);
480
480
  try {
481
481
  a.insertRule(r, a.cssRules.length);
482
482
  } catch {
@@ -509,7 +509,7 @@ function ht(e, t) {
509
509
  function V(e, t) {
510
510
  return e.charCodeAt(t) | 0;
511
511
  }
512
- function Le(e, t, n) {
512
+ function ke(e, t, n) {
513
513
  return e.slice(t, n);
514
514
  }
515
515
  function te(e) {
@@ -547,7 +547,7 @@ function et() {
547
547
  return H;
548
548
  }
549
549
  function De(e, t) {
550
- return Le(xe, e, t);
550
+ return ke(xe, e, t);
551
551
  }
552
552
  function $e(e) {
553
553
  switch (e) {
@@ -628,13 +628,13 @@ function vt(e) {
628
628
  }
629
629
  return H;
630
630
  }
631
- function qr(e, t) {
631
+ function Xr(e, t) {
632
632
  for (; J() && e + j !== 57; )
633
633
  if (e + j === 84 && ne() === 47)
634
634
  break;
635
635
  return "/*" + De(t, H - 1) + "*" + at(e === 47 ? e : J());
636
636
  }
637
- function Xr(e) {
637
+ function qr(e) {
638
638
  for (; !$e(ne()); )
639
639
  J();
640
640
  return De(e, H);
@@ -643,19 +643,19 @@ function Hr(e) {
643
643
  return tr(rt("", null, null, null, [""], e = er(e), 0, [0], e));
644
644
  }
645
645
  function rt(e, t, n, r, o, a, s, u, l) {
646
- for (var b = 0, d = 0, g = s, S = 0, y = 0, p = 0, f = 1, c = 1, E = 1, h = 0, A = "", R = o, m = a, _ = r, C = A; c; )
647
- switch (p = h, h = J()) {
646
+ for (var E = 0, d = 0, g = s, S = 0, y = 0, p = 0, m = 1, c = 1, v = 1, b = 0, w = "", A = o, f = a, _ = r, C = w; c; )
647
+ switch (p = b, b = J()) {
648
648
  // (
649
649
  case 40:
650
650
  if (p != 108 && V(C, g - 1) == 58) {
651
- ht(C += M(tt(h), "&", "&\f"), "&\f") != -1 && (E = -1);
651
+ ht(C += M(tt(b), "&", "&\f"), "&\f") != -1 && (v = -1);
652
652
  break;
653
653
  }
654
654
  // " ' [
655
655
  case 34:
656
656
  case 39:
657
657
  case 91:
658
- C += tt(h);
658
+ C += tt(b);
659
659
  break;
660
660
  // \t \n \r \s
661
661
  case 9:
@@ -673,36 +673,36 @@ function rt(e, t, n, r, o, a, s, u, l) {
673
673
  switch (ne()) {
674
674
  case 42:
675
675
  case 47:
676
- Ze(Kr(qr(J(), et()), t, n), l);
676
+ Ze(Kr(Xr(J(), et()), t, n), l);
677
677
  break;
678
678
  default:
679
679
  C += "/";
680
680
  }
681
681
  break;
682
682
  // {
683
- case 123 * f:
684
- u[b++] = te(C) * E;
683
+ case 123 * m:
684
+ u[E++] = te(C) * v;
685
685
  // } ; \0
686
- case 125 * f:
686
+ case 125 * m:
687
687
  case 59:
688
688
  case 0:
689
- switch (h) {
689
+ switch (b) {
690
690
  // \0 }
691
691
  case 0:
692
692
  case 125:
693
693
  c = 0;
694
694
  // ;
695
695
  case 59 + d:
696
- E == -1 && (C = M(C, /\f/g, "")), y > 0 && te(C) - g && Ze(y > 32 ? Mt(C + ";", r, n, g - 1) : Mt(M(C, " ", "") + ";", r, n, g - 2), l);
696
+ v == -1 && (C = M(C, /\f/g, "")), y > 0 && te(C) - g && Ze(y > 32 ? Mt(C + ";", r, n, g - 1) : Mt(M(C, " ", "") + ";", r, n, g - 2), l);
697
697
  break;
698
698
  // @ ;
699
699
  case 59:
700
700
  C += ";";
701
701
  // { rule/at-rule
702
702
  default:
703
- if (Ze(_ = Nt(C, t, n, b, d, o, u, A, R = [], m = [], g), a), h === 123)
703
+ if (Ze(_ = Nt(C, t, n, E, d, o, u, w, A = [], f = [], g), a), b === 123)
704
704
  if (d === 0)
705
- rt(C, t, _, _, R, a, g, u, m);
705
+ rt(C, t, _, _, A, a, g, u, f);
706
706
  else
707
707
  switch (S === 99 && V(C, 3) === 110 ? 100 : S) {
708
708
  // d l m s
@@ -710,55 +710,55 @@ function rt(e, t, n, r, o, a, s, u, l) {
710
710
  case 108:
711
711
  case 109:
712
712
  case 115:
713
- rt(e, _, _, r && Ze(Nt(e, _, _, 0, 0, o, u, A, o, R = [], g), m), o, m, g, u, r ? R : m);
713
+ rt(e, _, _, r && Ze(Nt(e, _, _, 0, 0, o, u, w, o, A = [], g), f), o, f, g, u, r ? A : f);
714
714
  break;
715
715
  default:
716
- rt(C, _, _, _, [""], m, 0, u, m);
716
+ rt(C, _, _, _, [""], f, 0, u, f);
717
717
  }
718
718
  }
719
- b = d = y = 0, f = E = 1, A = C = "", g = s;
719
+ E = d = y = 0, m = v = 1, w = C = "", g = s;
720
720
  break;
721
721
  // :
722
722
  case 58:
723
723
  g = 1 + te(C), y = p;
724
724
  default:
725
- if (f < 1) {
726
- if (h == 123)
727
- --f;
728
- else if (h == 125 && f++ == 0 && Wr() == 125)
725
+ if (m < 1) {
726
+ if (b == 123)
727
+ --m;
728
+ else if (b == 125 && m++ == 0 && Wr() == 125)
729
729
  continue;
730
730
  }
731
- switch (C += at(h), h * f) {
731
+ switch (C += at(b), b * m) {
732
732
  // &
733
733
  case 38:
734
- E = d > 0 ? 1 : (C += "\f", -1);
734
+ v = d > 0 ? 1 : (C += "\f", -1);
735
735
  break;
736
736
  // ,
737
737
  case 44:
738
- u[b++] = (te(C) - 1) * E, E = 1;
738
+ u[E++] = (te(C) - 1) * v, v = 1;
739
739
  break;
740
740
  // @
741
741
  case 64:
742
- ne() === 45 && (C += tt(J())), S = ne(), d = g = te(A = C += Xr(et())), h++;
742
+ ne() === 45 && (C += tt(J())), S = ne(), d = g = te(w = C += qr(et())), b++;
743
743
  break;
744
744
  // -
745
745
  case 45:
746
- p === 45 && te(C) == 2 && (f = 0);
746
+ p === 45 && te(C) == 2 && (m = 0);
747
747
  }
748
748
  }
749
749
  return a;
750
750
  }
751
- function Nt(e, t, n, r, o, a, s, u, l, b, d) {
752
- for (var g = o - 1, S = o === 0 ? a : [""], y = St(S), p = 0, f = 0, c = 0; p < r; ++p)
753
- for (var E = 0, h = Le(e, g + 1, g = Dr(f = s[p])), A = e; E < y; ++E)
754
- (A = Zt(f > 0 ? S[E] + " " + h : M(h, /&\f/g, S[E]))) && (l[c++] = A);
755
- return ct(e, t, n, o === 0 ? gt : u, l, b, d);
751
+ function Nt(e, t, n, r, o, a, s, u, l, E, d) {
752
+ for (var g = o - 1, S = o === 0 ? a : [""], y = St(S), p = 0, m = 0, c = 0; p < r; ++p)
753
+ for (var v = 0, b = ke(e, g + 1, g = Dr(m = s[p])), w = e; v < y; ++v)
754
+ (w = Zt(m > 0 ? S[v] + " " + b : M(b, /&\f/g, S[v]))) && (l[c++] = w);
755
+ return ct(e, t, n, o === 0 ? gt : u, l, E, d);
756
756
  }
757
757
  function Kr(e, t, n) {
758
- return ct(e, t, n, Kt, at(Vr()), Le(e, 2, -2), 0);
758
+ return ct(e, t, n, Kt, at(Vr()), ke(e, 2, -2), 0);
759
759
  }
760
760
  function Mt(e, t, n, r) {
761
- return ct(e, t, n, yt, Le(e, 0, r), Le(e, r + 1, -1), r);
761
+ return ct(e, t, n, yt, ke(e, 0, r), ke(e, r + 1, -1), r);
762
762
  }
763
763
  function be(e, t) {
764
764
  for (var n = "", r = St(e), o = 0; o < r; o++)
@@ -827,17 +827,17 @@ var tn = function(t, n, r) {
827
827
  return t;
828
828
  }, nn = function(t, n) {
829
829
  return tr(rn(er(t), n));
830
- }, kt = /* @__PURE__ */ new WeakMap(), on = function(t) {
830
+ }, Lt = /* @__PURE__ */ new WeakMap(), on = function(t) {
831
831
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
832
832
  // negative .length indicates that this rule has been already prefixed
833
833
  t.length < 1)) {
834
834
  for (var n = t.value, r = t.parent, o = t.column === r.column && t.line === r.line; r.type !== "rule"; )
835
835
  if (r = r.parent, !r) return;
836
- if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !kt.get(r)) && !o) {
837
- kt.set(t, !0);
838
- for (var a = [], s = nn(n, a), u = r.props, l = 0, b = 0; l < s.length; l++)
839
- for (var d = 0; d < u.length; d++, b++)
840
- t.props[b] = a[l] ? s[l].replace(/&\f/g, u[d]) : u[d] + " " + s[l];
836
+ if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !Lt.get(r)) && !o) {
837
+ Lt.set(t, !0);
838
+ for (var a = [], s = nn(n, a), u = r.props, l = 0, E = 0; l < s.length; l++)
839
+ for (var d = 0; d < u.length; d++, E++)
840
+ t.props[E] = a[l] ? s[l].replace(/&\f/g, u[d]) : u[d] + " " + s[l];
841
841
  }
842
842
  }
843
843
  }, an = function(t) {
@@ -1025,9 +1025,9 @@ var sn = function(t, n, r, o) {
1025
1025
  var n = t.key;
1026
1026
  if (n === "css") {
1027
1027
  var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
1028
- Array.prototype.forEach.call(r, function(f) {
1029
- var c = f.getAttribute("data-emotion");
1030
- c.indexOf(" ") !== -1 && (document.head.appendChild(f), f.setAttribute("data-s", ""));
1028
+ Array.prototype.forEach.call(r, function(m) {
1029
+ var c = m.getAttribute("data-emotion");
1030
+ c.indexOf(" ") !== -1 && (document.head.appendChild(m), m.setAttribute("data-s", ""));
1031
1031
  });
1032
1032
  }
1033
1033
  var o = t.stylisPlugins || cn, a = {}, s, u = [];
@@ -1035,21 +1035,21 @@ var sn = function(t, n, r, o) {
1035
1035
  // this means we will ignore elements which don't have a space in them which
1036
1036
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1037
1037
  document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
1038
- function(f) {
1039
- for (var c = f.getAttribute("data-emotion").split(" "), E = 1; E < c.length; E++)
1040
- a[c[E]] = !0;
1041
- u.push(f);
1038
+ function(m) {
1039
+ for (var c = m.getAttribute("data-emotion").split(" "), v = 1; v < c.length; v++)
1040
+ a[c[v]] = !0;
1041
+ u.push(m);
1042
1042
  }
1043
1043
  );
1044
- var l, b = [on, an];
1044
+ var l, E = [on, an];
1045
1045
  {
1046
- var d, g = [Jr, Qr(function(f) {
1047
- d.insert(f);
1048
- })], S = Zr(b.concat(o, g)), y = function(c) {
1046
+ var d, g = [Jr, Qr(function(m) {
1047
+ d.insert(m);
1048
+ })], S = Zr(E.concat(o, g)), y = function(c) {
1049
1049
  return be(Hr(c), S);
1050
1050
  };
1051
- l = function(c, E, h, A) {
1052
- d = h, y(c ? c + "{" + E.styles + "}" : E.styles), A && (p.inserted[E.name] = !0);
1051
+ l = function(c, v, b, w) {
1052
+ d = b, y(c ? c + "{" + v.styles + "}" : v.styles), w && (p.inserted[v.name] = !0);
1053
1053
  };
1054
1054
  }
1055
1055
  var p = {
@@ -1068,7 +1068,7 @@ var sn = function(t, n, r, o) {
1068
1068
  insert: l
1069
1069
  };
1070
1070
  return p.sheet.hydrate(u), p;
1071
- }, Qe = { exports: {} }, k = {};
1071
+ }, Qe = { exports: {} }, L = {};
1072
1072
  /** @license React v16.13.1
1073
1073
  * react-is.production.min.js
1074
1074
  *
@@ -1077,32 +1077,32 @@ var sn = function(t, n, r, o) {
1077
1077
  * This source code is licensed under the MIT license found in the
1078
1078
  * LICENSE file in the root directory of this source tree.
1079
1079
  */
1080
- var Lt;
1080
+ var kt;
1081
1081
  function ln() {
1082
- if (Lt) return k;
1083
- Lt = 1;
1084
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, b = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, y = e ? Symbol.for("react.memo") : 60115, p = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, c = e ? Symbol.for("react.fundamental") : 60117, E = e ? Symbol.for("react.responder") : 60118, h = e ? Symbol.for("react.scope") : 60119;
1085
- function A(m) {
1086
- if (typeof m == "object" && m !== null) {
1087
- var _ = m.$$typeof;
1082
+ if (kt) return L;
1083
+ kt = 1;
1084
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, E = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, y = e ? Symbol.for("react.memo") : 60115, p = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, c = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
1085
+ function w(f) {
1086
+ if (typeof f == "object" && f !== null) {
1087
+ var _ = f.$$typeof;
1088
1088
  switch (_) {
1089
1089
  case t:
1090
- switch (m = m.type, m) {
1090
+ switch (f = f.type, f) {
1091
1091
  case l:
1092
- case b:
1092
+ case E:
1093
1093
  case r:
1094
1094
  case a:
1095
1095
  case o:
1096
1096
  case g:
1097
- return m;
1097
+ return f;
1098
1098
  default:
1099
- switch (m = m && m.$$typeof, m) {
1099
+ switch (f = f && f.$$typeof, f) {
1100
1100
  case u:
1101
1101
  case d:
1102
1102
  case p:
1103
1103
  case y:
1104
1104
  case s:
1105
- return m;
1105
+ return f;
1106
1106
  default:
1107
1107
  return _;
1108
1108
  }
@@ -1112,38 +1112,38 @@ function ln() {
1112
1112
  }
1113
1113
  }
1114
1114
  }
1115
- function R(m) {
1116
- return A(m) === b;
1115
+ function A(f) {
1116
+ return w(f) === E;
1117
1117
  }
1118
- return k.AsyncMode = l, k.ConcurrentMode = b, k.ContextConsumer = u, k.ContextProvider = s, k.Element = t, k.ForwardRef = d, k.Fragment = r, k.Lazy = p, k.Memo = y, k.Portal = n, k.Profiler = a, k.StrictMode = o, k.Suspense = g, k.isAsyncMode = function(m) {
1119
- return R(m) || A(m) === l;
1120
- }, k.isConcurrentMode = R, k.isContextConsumer = function(m) {
1121
- return A(m) === u;
1122
- }, k.isContextProvider = function(m) {
1123
- return A(m) === s;
1124
- }, k.isElement = function(m) {
1125
- return typeof m == "object" && m !== null && m.$$typeof === t;
1126
- }, k.isForwardRef = function(m) {
1127
- return A(m) === d;
1128
- }, k.isFragment = function(m) {
1129
- return A(m) === r;
1130
- }, k.isLazy = function(m) {
1131
- return A(m) === p;
1132
- }, k.isMemo = function(m) {
1133
- return A(m) === y;
1134
- }, k.isPortal = function(m) {
1135
- return A(m) === n;
1136
- }, k.isProfiler = function(m) {
1137
- return A(m) === a;
1138
- }, k.isStrictMode = function(m) {
1139
- return A(m) === o;
1140
- }, k.isSuspense = function(m) {
1141
- return A(m) === g;
1142
- }, k.isValidElementType = function(m) {
1143
- return typeof m == "string" || typeof m == "function" || m === r || m === b || m === a || m === o || m === g || m === S || typeof m == "object" && m !== null && (m.$$typeof === p || m.$$typeof === y || m.$$typeof === s || m.$$typeof === u || m.$$typeof === d || m.$$typeof === c || m.$$typeof === E || m.$$typeof === h || m.$$typeof === f);
1144
- }, k.typeOf = A, k;
1118
+ return L.AsyncMode = l, L.ConcurrentMode = E, L.ContextConsumer = u, L.ContextProvider = s, L.Element = t, L.ForwardRef = d, L.Fragment = r, L.Lazy = p, L.Memo = y, L.Portal = n, L.Profiler = a, L.StrictMode = o, L.Suspense = g, L.isAsyncMode = function(f) {
1119
+ return A(f) || w(f) === l;
1120
+ }, L.isConcurrentMode = A, L.isContextConsumer = function(f) {
1121
+ return w(f) === u;
1122
+ }, L.isContextProvider = function(f) {
1123
+ return w(f) === s;
1124
+ }, L.isElement = function(f) {
1125
+ return typeof f == "object" && f !== null && f.$$typeof === t;
1126
+ }, L.isForwardRef = function(f) {
1127
+ return w(f) === d;
1128
+ }, L.isFragment = function(f) {
1129
+ return w(f) === r;
1130
+ }, L.isLazy = function(f) {
1131
+ return w(f) === p;
1132
+ }, L.isMemo = function(f) {
1133
+ return w(f) === y;
1134
+ }, L.isPortal = function(f) {
1135
+ return w(f) === n;
1136
+ }, L.isProfiler = function(f) {
1137
+ return w(f) === a;
1138
+ }, L.isStrictMode = function(f) {
1139
+ return w(f) === o;
1140
+ }, L.isSuspense = function(f) {
1141
+ return w(f) === g;
1142
+ }, L.isValidElementType = function(f) {
1143
+ return typeof f == "string" || typeof f == "function" || f === r || f === E || f === a || f === o || f === g || f === S || typeof f == "object" && f !== null && (f.$$typeof === p || f.$$typeof === y || f.$$typeof === s || f.$$typeof === u || f.$$typeof === d || f.$$typeof === c || f.$$typeof === v || f.$$typeof === b || f.$$typeof === m);
1144
+ }, L.typeOf = w, L;
1145
1145
  }
1146
- var L = {};
1146
+ var k = {};
1147
1147
  /** @license React v16.13.1
1148
1148
  * react-is.development.js
1149
1149
  *
@@ -1155,20 +1155,20 @@ var L = {};
1155
1155
  var $t;
1156
1156
  function dn() {
1157
1157
  return $t || ($t = 1, process.env.NODE_ENV !== "production" && function() {
1158
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, b = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, y = e ? Symbol.for("react.memo") : 60115, p = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, c = e ? Symbol.for("react.fundamental") : 60117, E = e ? Symbol.for("react.responder") : 60118, h = e ? Symbol.for("react.scope") : 60119;
1159
- function A(w) {
1160
- return typeof w == "string" || typeof w == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1161
- w === r || w === b || w === a || w === o || w === g || w === S || typeof w == "object" && w !== null && (w.$$typeof === p || w.$$typeof === y || w.$$typeof === s || w.$$typeof === u || w.$$typeof === d || w.$$typeof === c || w.$$typeof === E || w.$$typeof === h || w.$$typeof === f);
1162
- }
1163
- function R(w) {
1164
- if (typeof w == "object" && w !== null) {
1165
- var he = w.$$typeof;
1158
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, E = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, y = e ? Symbol.for("react.memo") : 60115, p = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, c = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
1159
+ function w(R) {
1160
+ return typeof R == "string" || typeof R == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1161
+ R === r || R === E || R === a || R === o || R === g || R === S || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === y || R.$$typeof === s || R.$$typeof === u || R.$$typeof === d || R.$$typeof === c || R.$$typeof === v || R.$$typeof === b || R.$$typeof === m);
1162
+ }
1163
+ function A(R) {
1164
+ if (typeof R == "object" && R !== null) {
1165
+ var he = R.$$typeof;
1166
1166
  switch (he) {
1167
1167
  case t:
1168
- var le = w.type;
1168
+ var le = R.type;
1169
1169
  switch (le) {
1170
1170
  case l:
1171
- case b:
1171
+ case E:
1172
1172
  case r:
1173
1173
  case a:
1174
1174
  case o:
@@ -1192,48 +1192,48 @@ function dn() {
1192
1192
  }
1193
1193
  }
1194
1194
  }
1195
- var m = l, _ = b, C = u, W = s, D = t, K = d, F = r, ee = p, ue = y, Te = n, we = a, dt = o, Ye = g, ze = !1;
1196
- function oe(w) {
1197
- return ze || (ze = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Ae(w) || R(w) === l;
1195
+ var f = l, _ = E, C = u, W = s, D = t, K = d, F = r, ee = p, ue = y, Te = n, we = a, dt = o, Ye = g, ze = !1;
1196
+ function oe(R) {
1197
+ return ze || (ze = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Re(R) || A(R) === l;
1198
1198
  }
1199
- function Ae(w) {
1200
- return R(w) === b;
1199
+ function Re(R) {
1200
+ return A(R) === E;
1201
1201
  }
1202
- function ie(w) {
1203
- return R(w) === u;
1202
+ function ie(R) {
1203
+ return A(R) === u;
1204
1204
  }
1205
- function ft(w) {
1206
- return R(w) === s;
1205
+ function ft(R) {
1206
+ return A(R) === s;
1207
1207
  }
1208
- function Re(w) {
1209
- return typeof w == "object" && w !== null && w.$$typeof === t;
1208
+ function Ae(R) {
1209
+ return typeof R == "object" && R !== null && R.$$typeof === t;
1210
1210
  }
1211
- function fe(w) {
1212
- return R(w) === d;
1211
+ function fe(R) {
1212
+ return A(R) === d;
1213
1213
  }
1214
- function Fe(w) {
1215
- return R(w) === r;
1214
+ function Fe(R) {
1215
+ return A(R) === r;
1216
1216
  }
1217
- function Ve(w) {
1218
- return R(w) === p;
1217
+ function Ve(R) {
1218
+ return A(R) === p;
1219
1219
  }
1220
- function We(w) {
1221
- return R(w) === y;
1220
+ function We(R) {
1221
+ return A(R) === y;
1222
1222
  }
1223
- function Be(w) {
1224
- return R(w) === n;
1223
+ function Be(R) {
1224
+ return A(R) === n;
1225
1225
  }
1226
- function Ge(w) {
1227
- return R(w) === a;
1226
+ function Ge(R) {
1227
+ return A(R) === a;
1228
1228
  }
1229
- function qe(w) {
1230
- return R(w) === o;
1229
+ function Xe(R) {
1230
+ return A(R) === o;
1231
1231
  }
1232
- function Xe(w) {
1233
- return R(w) === g;
1232
+ function qe(R) {
1233
+ return A(R) === g;
1234
1234
  }
1235
- L.AsyncMode = m, L.ConcurrentMode = _, L.ContextConsumer = C, L.ContextProvider = W, L.Element = D, L.ForwardRef = K, L.Fragment = F, L.Lazy = ee, L.Memo = ue, L.Portal = Te, L.Profiler = we, L.StrictMode = dt, L.Suspense = Ye, L.isAsyncMode = oe, L.isConcurrentMode = Ae, L.isContextConsumer = ie, L.isContextProvider = ft, L.isElement = Re, L.isForwardRef = fe, L.isFragment = Fe, L.isLazy = Ve, L.isMemo = We, L.isPortal = Be, L.isProfiler = Ge, L.isStrictMode = qe, L.isSuspense = Xe, L.isValidElementType = A, L.typeOf = R;
1236
- }()), L;
1235
+ k.AsyncMode = f, k.ConcurrentMode = _, k.ContextConsumer = C, k.ContextProvider = W, k.Element = D, k.ForwardRef = K, k.Fragment = F, k.Lazy = ee, k.Memo = ue, k.Portal = Te, k.Profiler = we, k.StrictMode = dt, k.Suspense = Ye, k.isAsyncMode = oe, k.isConcurrentMode = Re, k.isContextConsumer = ie, k.isContextProvider = ft, k.isElement = Ae, k.isForwardRef = fe, k.isFragment = Fe, k.isLazy = Ve, k.isMemo = We, k.isPortal = Be, k.isProfiler = Ge, k.isStrictMode = Xe, k.isSuspense = qe, k.isValidElementType = w, k.typeOf = A;
1236
+ }()), k;
1237
1237
  }
1238
1238
  var It;
1239
1239
  function fn() {
@@ -1281,19 +1281,19 @@ function mn() {
1281
1281
  function s(p) {
1282
1282
  return e.isMemo(p) ? o : a[p.$$typeof] || t;
1283
1283
  }
1284
- var u = Object.defineProperty, l = Object.getOwnPropertyNames, b = Object.getOwnPropertySymbols, d = Object.getOwnPropertyDescriptor, g = Object.getPrototypeOf, S = Object.prototype;
1285
- function y(p, f, c) {
1286
- if (typeof f != "string") {
1284
+ var u = Object.defineProperty, l = Object.getOwnPropertyNames, E = Object.getOwnPropertySymbols, d = Object.getOwnPropertyDescriptor, g = Object.getPrototypeOf, S = Object.prototype;
1285
+ function y(p, m, c) {
1286
+ if (typeof m != "string") {
1287
1287
  if (S) {
1288
- var E = g(f);
1289
- E && E !== S && y(p, E, c);
1288
+ var v = g(m);
1289
+ v && v !== S && y(p, v, c);
1290
1290
  }
1291
- var h = l(f);
1292
- b && (h = h.concat(b(f)));
1293
- for (var A = s(p), R = s(f), m = 0; m < h.length; ++m) {
1294
- var _ = h[m];
1295
- if (!n[_] && !(c && c[_]) && !(R && R[_]) && !(A && A[_])) {
1296
- var C = d(f, _);
1291
+ var b = l(m);
1292
+ E && (b = b.concat(E(m)));
1293
+ for (var w = s(p), A = s(m), f = 0; f < b.length; ++f) {
1294
+ var _ = b[f];
1295
+ if (!n[_] && !(c && c[_]) && !(A && A[_]) && !(w && w[_])) {
1296
+ var C = d(m, _);
1297
1297
  try {
1298
1298
  u(p, _, C);
1299
1299
  } catch {
@@ -1458,8 +1458,8 @@ function Ie(e, t, n) {
1458
1458
  }
1459
1459
  case "function": {
1460
1460
  if (e !== void 0) {
1461
- var l = re, b = n(e);
1462
- return re = l, Ie(e, t, b);
1461
+ var l = re, E = n(e);
1462
+ return re = l, Ie(e, t, E);
1463
1463
  }
1464
1464
  break;
1465
1465
  }
@@ -1482,15 +1482,15 @@ function Sn(e, t, n) {
1482
1482
  for (var l = 0; l < s.length; l++)
1483
1483
  Dt(s[l]) && (r += pt(a) + ":" + jt(a, s[l]) + ";");
1484
1484
  else {
1485
- var b = Ie(e, t, s);
1485
+ var E = Ie(e, t, s);
1486
1486
  switch (a) {
1487
1487
  case "animation":
1488
1488
  case "animationName": {
1489
- r += pt(a) + ":" + b + ";";
1489
+ r += pt(a) + ":" + E + ";";
1490
1490
  break;
1491
1491
  }
1492
1492
  default:
1493
- r += a + "{" + b + "}";
1493
+ r += a + "{" + E + "}";
1494
1494
  }
1495
1495
  }
1496
1496
  }
@@ -1515,9 +1515,9 @@ function xn(e, t, n) {
1515
1515
  o += l[u];
1516
1516
  }
1517
1517
  Yt.lastIndex = 0;
1518
- for (var b = "", d; (d = Yt.exec(o)) !== null; )
1519
- b += "-" + d[1];
1520
- var g = En(o) + b;
1518
+ for (var E = "", d; (d = Yt.exec(o)) !== null; )
1519
+ E += "-" + d[1];
1520
+ var g = En(o) + E;
1521
1521
  return {
1522
1522
  name: g,
1523
1523
  styles: o,
@@ -1526,7 +1526,7 @@ function xn(e, t, n) {
1526
1526
  }
1527
1527
  var Tn = function(t) {
1528
1528
  return t();
1529
- }, wn = ce.useInsertionEffect ? ce.useInsertionEffect : !1, An = wn || Tn, ir = /* @__PURE__ */ ce.createContext(
1529
+ }, wn = ce.useInsertionEffect ? ce.useInsertionEffect : !1, Rn = wn || Tn, ir = /* @__PURE__ */ ce.createContext(
1530
1530
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1531
1531
  // because this module is primarily intended for the browser and node
1532
1532
  // but it's also required in react native and similar environments sometimes
@@ -1538,7 +1538,7 @@ var Tn = function(t) {
1538
1538
  }) : null
1539
1539
  );
1540
1540
  ir.Provider;
1541
- var Rn = function(t) {
1541
+ var An = function(t) {
1542
1542
  return /* @__PURE__ */ pr(function(n, r) {
1543
1543
  var o = Ue(ir);
1544
1544
  return t(n, o, r);
@@ -1550,10 +1550,10 @@ var Rn = function(t) {
1550
1550
  return r[Et] = t, r;
1551
1551
  }, Cn = function(t) {
1552
1552
  var n = t.cache, r = t.serialized, o = t.isStringTag;
1553
- return nr(n, r, o), An(function() {
1553
+ return nr(n, r, o), Rn(function() {
1554
1554
  return vn(n, r, o);
1555
1555
  }), null;
1556
- }, Pn = /* @__PURE__ */ Rn(function(e, t, n) {
1556
+ }, Pn = /* @__PURE__ */ An(function(e, t, n) {
1557
1557
  var r = e.css;
1558
1558
  typeof r == "string" && t.registered[r] !== void 0 && (r = t.registered[r]);
1559
1559
  var o = e[Et], a = [r], s = "";
@@ -1561,28 +1561,28 @@ var Rn = function(t) {
1561
1561
  var u = xn(a, void 0, ce.useContext(_n));
1562
1562
  s += t.key + "-" + u.name;
1563
1563
  var l = {};
1564
- for (var b in e)
1565
- ut.call(e, b) && b !== "css" && b !== Et && (l[b] = e[b]);
1564
+ for (var E in e)
1565
+ ut.call(e, E) && E !== "css" && E !== Et && (l[E] = e[E]);
1566
1566
  return l.className = s, n && (l.ref = n), /* @__PURE__ */ ce.createElement(ce.Fragment, null, /* @__PURE__ */ ce.createElement(Cn, {
1567
1567
  cache: t,
1568
1568
  serialized: u,
1569
1569
  isStringTag: typeof o == "string"
1570
1570
  }), /* @__PURE__ */ ce.createElement(o, l));
1571
- }), sr = Pn, cr = ke.Fragment, v = function(t, n, r) {
1572
- return ut.call(n, "css") ? ke.jsx(sr, ar(t, n), r) : ke.jsx(t, n, r);
1571
+ }), sr = Pn, cr = Le.Fragment, h = function(t, n, r) {
1572
+ return ut.call(n, "css") ? Le.jsx(sr, ar(t, n), r) : Le.jsx(t, n, r);
1573
1573
  }, I = function(t, n, r) {
1574
- return ut.call(n, "css") ? ke.jsxs(sr, ar(t, n), r) : ke.jsxs(t, n, r);
1574
+ return ut.call(n, "css") ? Le.jsxs(sr, ar(t, n), r) : Le.jsxs(t, n, r);
1575
1575
  };
1576
- const On = qt(({ sendBack: e, receive: t, input: n }) => {
1576
+ const On = Xt(({ sendBack: e, receive: t, input: n }) => {
1577
1577
  const { videoElement: r } = n;
1578
1578
  t((S) => {
1579
- S.type === "PLAY" && (r.play(), o()), S.type === "PAUSE" && (r.pause(), o()), S.type === "SET_TIME" && (r.currentTime = S.value, u()), S.type === "SET_VOLUME" && (r.volume = S.volume, r.muted = S.muted, l()), S.type === "SET_PLAYBACK_RATE" && (r.playbackRate = S.playbackRate, b());
1579
+ S.type === "PLAY" && (r.play(), o()), S.type === "PAUSE" && (r.pause(), o()), S.type === "SET_TIME" && (r.currentTime = S.value, u()), S.type === "SET_VOLUME" && (r.volume = S.volume, r.muted = S.muted, l()), S.type === "SET_PLAYBACK_RATE" && (r.playbackRate = S.playbackRate, E());
1580
1580
  });
1581
- const o = () => e({ type: "PLAYING" }), a = () => e({ type: "PAUSED" }), s = () => e({ type: "ENDED" }), u = () => e({ type: "TIME_UPDATE", currentTime: r.currentTime }), l = () => e({ type: "VOLUME_UPDATE", muted: r.muted, volume: r.volume }), b = () => e({ type: "PLAYBACK_RATE_UPDATE", playbackRate: r.playbackRate }), d = () => e({ type: "SEEKING", currentTime: r.currentTime }), g = () => e({ type: "DURATION_UPDATE", duration: r.duration });
1582
- return r.addEventListener("play", o), r.addEventListener("pause", a), r.addEventListener("ended", s), r.addEventListener("timeupdate", u), r.addEventListener("volumechange", l), r.addEventListener("ratechange", b), r.addEventListener("seeking", d), r.addEventListener("durationchange", g), () => {
1583
- r.removeEventListener("play", o), r.removeEventListener("pause", a), r.removeEventListener("ended", s), r.removeEventListener("timeupdate", u), r.removeEventListener("volumechange", l), r.removeEventListener("ratechange", b), r.removeEventListener("seeking", d), r.removeEventListener("durationchange", g);
1581
+ const o = () => e({ type: "PLAYING" }), a = () => e({ type: "PAUSED" }), s = () => e({ type: "ENDED" }), u = () => e({ type: "TIME_UPDATE", currentTime: r.currentTime }), l = () => e({ type: "VOLUME_UPDATE", muted: r.muted, volume: r.volume }), E = () => e({ type: "PLAYBACK_RATE_UPDATE", playbackRate: r.playbackRate }), d = () => e({ type: "SEEKING", currentTime: r.currentTime }), g = () => e({ type: "DURATION_UPDATE", duration: r.duration });
1582
+ return r.addEventListener("play", o), r.addEventListener("pause", a), r.addEventListener("ended", s), r.addEventListener("timeupdate", u), r.addEventListener("volumechange", l), r.addEventListener("ratechange", E), r.addEventListener("seeking", d), r.addEventListener("durationchange", g), () => {
1583
+ r.removeEventListener("play", o), r.removeEventListener("pause", a), r.removeEventListener("ended", s), r.removeEventListener("timeupdate", u), r.removeEventListener("volumechange", l), r.removeEventListener("ratechange", E), r.removeEventListener("seeking", d), r.removeEventListener("durationchange", g);
1584
1584
  };
1585
- }), lt = (e) => qt((...t) => {
1585
+ }), lt = (e) => Xt((...t) => {
1586
1586
  const n = e(...t);
1587
1587
  return () => {
1588
1588
  n.then((r) => r?.());
@@ -1603,7 +1603,7 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
1603
1603
  };
1604
1604
  e.addEventListener("updateend", r, { once: !0 }), e.addEventListener("abort", o, { once: !0 }), e.addEventListener("error", a, { once: !0 });
1605
1605
  }, Nn = (e) => {
1606
- const t = new Xt({ concurrency: 1 });
1606
+ const t = new qt({ concurrency: 1 });
1607
1607
  return {
1608
1608
  appendBuffer: (a) => t.add(
1609
1609
  () => new Promise((s, u) => {
@@ -1619,13 +1619,13 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
1619
1619
  e.timestampOffset = a;
1620
1620
  })
1621
1621
  };
1622
- }, Mn = -20, kn = 60, Ln = 30, $n = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
1623
- const { videoElement: a, preEvictionTime: s, postEvictionTime: u, bufferTargetTime: l } = n, b = () => console.error(a.error);
1624
- a.addEventListener("error", b);
1622
+ }, Mn = -20, Ln = 60, kn = 30, $n = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
1623
+ const { videoElement: a, preEvictionTime: s, postEvictionTime: u, bufferTargetTime: l } = n, E = () => console.error(a.error);
1624
+ a.addEventListener("error", E);
1625
1625
  const d = new MediaSource(), g = URL.createObjectURL(d);
1626
1626
  a.src = g;
1627
- const S = () => a.currentTime + (s ?? Mn), y = () => a.currentTime + (u ?? kn), p = () => a.currentTime + (l ?? Ln);
1628
- let f;
1627
+ const S = () => a.currentTime + (s ?? Mn), y = () => a.currentTime + (u ?? Ln), p = () => a.currentTime + (l ?? kn);
1628
+ let m;
1629
1629
  const c = await new Promise(
1630
1630
  (D) => d.addEventListener(
1631
1631
  "sourceopen",
@@ -1634,39 +1634,39 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
1634
1634
  t((F) => {
1635
1635
  if (!K && F.type === "METADATA") {
1636
1636
  const ee = d.addSourceBuffer(`video/mp4; codecs="${F.info.input.videoMimeType},${F.info.input.audioMimeType}"`);
1637
- ee.mode = "segments", d.duration = F.info.input.duration, f = F.data, K = !0, D(ee);
1637
+ ee.mode = "segments", d.duration = F.info.input.duration, m = F.data, K = !0, D(ee);
1638
1638
  }
1639
1639
  });
1640
1640
  },
1641
1641
  { once: !0 }
1642
1642
  )
1643
1643
  );
1644
- if (!f) throw new Error("No header buffer");
1645
- const { appendBuffer: E, unbufferRange: h, updateTimestampOffset: A } = Nn(c);
1646
- E(f), t(async (D) => {
1647
- D.type === "DATA" ? await E(D.data) : D.type === "TIMESTAMP_OFFSET" && await A(D.timestampOffset);
1644
+ if (!m) throw new Error("No header buffer");
1645
+ const { appendBuffer: v, unbufferRange: b, updateTimestampOffset: w } = Nn(c);
1646
+ v(m), t(async (D) => {
1647
+ D.type === "DATA" ? await v(D.data) : D.type === "TIMESTAMP_OFFSET" && await w(D.timestampOffset);
1648
1648
  });
1649
- const R = async () => {
1649
+ const A = async () => {
1650
1650
  const D = S(), K = y(), F = zt(c);
1651
1651
  for (const { start: ee, end: ue } of F)
1652
- ee < D && await h(
1652
+ ee < D && await b(
1653
1653
  ee,
1654
1654
  D
1655
- ), ue > K && await h(
1655
+ ), ue > K && await b(
1656
1656
  K,
1657
1657
  ue
1658
1658
  );
1659
- }, m = setInterval(async () => {
1660
- await R();
1659
+ }, f = setInterval(async () => {
1660
+ await A();
1661
1661
  const D = zt(c);
1662
1662
  Math.max(...D.map(({ end: F }) => F)) < p() && e({ type: "NEED_DATA" });
1663
1663
  }, 100), _ = () => e({ type: "SOURCE_OPEN" }), C = () => e({ type: "SOURCE_ENDED" }), W = () => e({ type: "SOURCE_ERROR" });
1664
1664
  return d.addEventListener("sourceopen", _), d.addEventListener("sourceended", C), d.addEventListener("error", W), () => {
1665
- URL.revokeObjectURL(g), clearInterval(m), a.removeEventListener("error", b), d.removeEventListener("sourceopen", _), d.removeEventListener("sourceended", C), d.removeEventListener("error", W);
1665
+ URL.revokeObjectURL(g), clearInterval(f), a.removeEventListener("error", E), d.removeEventListener("sourceopen", _), d.removeEventListener("sourceended", C), d.removeEventListener("error", W);
1666
1666
  };
1667
1667
  }), In = (e, t) => {
1668
1668
  let n, r, o;
1669
- const a = (s, u, l) => (b) => {
1669
+ const a = (s, u, l) => (E) => {
1670
1670
  const d = performance.now();
1671
1671
  return setTimeout(() => {
1672
1672
  if (!o) {
@@ -1678,10 +1678,10 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
1678
1678
  console.error(p), l(p);
1679
1679
  });
1680
1680
  let S, y;
1681
- r = new Promise((p, f) => {
1682
- S = p, y = f;
1681
+ r = new Promise((p, m) => {
1682
+ S = p, y = m;
1683
1683
  }), n = g.then(a(d, S, y)).catch((p) => (console.error(p), a(s, S, y)(p)));
1684
- }, e - (d - s)), b;
1684
+ }, e - (d - s)), E;
1685
1685
  };
1686
1686
  return (...s) => {
1687
1687
  if (o = s, n)
@@ -1689,27 +1689,27 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
1689
1689
  {
1690
1690
  const u = performance.now(), l = (async () => t(...s))();
1691
1691
  o = void 0;
1692
- let b, d;
1692
+ let E, d;
1693
1693
  return r = new Promise((g, S) => {
1694
- b = g, d = S;
1695
- }), n = l.then(a(u, b, d)).catch((g) => (console.error(g), a(u, b, d)(g))), l;
1694
+ E = g, d = S;
1695
+ }), n = l.then(a(u, E, d)).catch((g) => (console.error(g), a(u, E, d)(g))), l;
1696
1696
  }
1697
1697
  };
1698
1698
  }, Un = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
1699
- const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length: b, read: d } = a, g = await Ht({
1699
+ const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length: E, read: d } = a, g = await Ht({
1700
1700
  publicPath: s,
1701
1701
  workerUrl: u,
1702
1702
  bufferSize: l,
1703
- length: b,
1703
+ length: E,
1704
1704
  read: d
1705
1705
  }), S = await g.init();
1706
1706
  S.attachments?.length && e({ type: "NEW_ATTACHMENTS", attachments: S.attachments }), S.subtitles?.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: S.subtitles }), e({ type: "METADATA", ...S });
1707
1707
  let y = !1, p = [];
1708
- const f = In(100, async () => {
1708
+ const m = In(100, async () => {
1709
1709
  if (!(p.length || y))
1710
1710
  try {
1711
- const { data: c, subtitles: E, finished: h } = await g.read();
1712
- h && (y = !0), E.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: E }), e({ type: "DATA", data: c });
1711
+ const { data: c, subtitles: v, finished: b } = await g.read();
1712
+ b && (y = !0), v.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: v }), e({ type: "DATA", data: c });
1713
1713
  } catch (c) {
1714
1714
  if (c.message === "Cancelled") return;
1715
1715
  console.error(c);
@@ -1717,19 +1717,19 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
1717
1717
  });
1718
1718
  return t(async (c) => {
1719
1719
  if (c.type === "NEED_DATA")
1720
- f();
1720
+ m();
1721
1721
  else if (c.type === "SEEKING") {
1722
1722
  y = !1;
1723
- const { currentTime: E } = c, h = { currentTime: E };
1724
- p = [...p, h];
1723
+ const { currentTime: v } = c, b = { currentTime: v };
1724
+ p = [...p, b];
1725
1725
  try {
1726
- const { data: A, pts: R } = await g.seek(E).finally(() => {
1727
- p = p.filter((m) => m !== h);
1726
+ const { data: w, pts: A } = await g.seek(v).finally(() => {
1727
+ p = p.filter((f) => f !== b);
1728
1728
  });
1729
- e({ type: "TIMESTAMP_OFFSET", timestampOffset: R }), e({ type: "DATA", data: A });
1730
- } catch (A) {
1731
- if (A.message === "Cancelled") return;
1732
- console.error(A);
1729
+ e({ type: "TIMESTAMP_OFFSET", timestampOffset: A }), e({ type: "DATA", data: w });
1730
+ } catch (w) {
1731
+ if (w.message === "Cancelled") return;
1732
+ console.error(w);
1733
1733
  }
1734
1734
  }
1735
1735
  }), () => {
@@ -1802,113 +1802,129 @@ ${l}`),
1802
1802
  };
1803
1803
  }, Yn = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
1804
1804
  const { publicPath: a, subtitlesRendererOptions: s, videoElement: u, canvasElement: l } = n;
1805
- let b = [], d;
1805
+ let E = [], d;
1806
1806
  const g = /* @__PURE__ */ new Map();
1807
1807
  let S = [], y;
1808
1808
  return t((p) => {
1809
1809
  if (p.type === "SELECT_SUBTITLE_STREAM") {
1810
1810
  if (y = p.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: p.streamIndex }), !d) return;
1811
1811
  d.freeTrack(), S = [];
1812
- const f = g.get(y);
1813
- if (!f)
1812
+ const m = g.get(y);
1813
+ if (!m)
1814
1814
  throw new Error("newSubtitleStreams is undefined");
1815
- const c = Me(f.header.content), E = { ...c, info: { ...c.info, ScaledBorderAndShadow: "no" } };
1816
- d.setTrack(_t(E)), d.setCurrentTime(u.paused, u.currentTime, u.playbackRate);
1817
- for (const h in f.header.parsed.styles) {
1818
- const A = f.header.parsed.styles.style[Number(h)];
1815
+ const c = Me(m.header.content), v = {
1816
+ ...c,
1817
+ info: {
1818
+ ...c.info,
1819
+ ScaledBorderAndShadow: "no",
1820
+ LayoutResX: "",
1821
+ LayoutResY: ""
1822
+ }
1823
+ }, b = _t(v);
1824
+ d.setTrack(b), d.setCurrentTime(u.paused, u.currentTime, u.playbackRate);
1825
+ for (const w in m.header.parsed.styles) {
1826
+ const A = m.header.parsed.styles.style[Number(w)];
1819
1827
  A && Wt(d, A);
1820
1828
  }
1821
- for (const h of f?.dialogues ?? [])
1822
- S.filter((R) => R.type === "dialogue").find(
1823
- (R) => R.streamIndex === h.streamIndex && R.index === h.index
1824
- ) || y !== h.streamIndex || (d?.createEvent(h.assEvent), S.push(h));
1829
+ for (const w of m?.dialogues ?? [])
1830
+ S.filter((f) => f.type === "dialogue").find(
1831
+ (f) => f.streamIndex === w.streamIndex && f.index === w.index
1832
+ ) || y !== w.streamIndex || (d?.createEvent(w.assEvent), S.push(w));
1825
1833
  }
1826
1834
  if (p.type === "NEW_SUBTITLE_FRAGMENTS") {
1827
- const f = p.subtitles.map((c) => {
1835
+ const m = p.subtitles.map((c) => {
1828
1836
  if (c.type === "header") {
1829
- const E = Dn(c);
1830
- return g.set(c.streamIndex, { header: E, dialogues: [] }), y === void 0 && (y = c.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: c.streamIndex })), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), E;
1837
+ const v = Dn(c);
1838
+ return g.set(c.streamIndex, { header: v, dialogues: [] }), y === void 0 && (y = c.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: c.streamIndex })), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), v;
1831
1839
  } else {
1832
- const E = g.get(c.streamIndex)?.header;
1833
- if (!E)
1840
+ const v = g.get(c.streamIndex)?.header;
1841
+ if (!v)
1834
1842
  throw new Error("SubtitleStream or its header is undefined");
1835
- const h = jn(E, c);
1836
- return g.get(c.streamIndex)?.dialogues.push(h), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), h;
1843
+ const b = jn(v, c);
1844
+ return g.get(c.streamIndex)?.dialogues.push(b), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), b;
1837
1845
  }
1838
1846
  });
1839
- for (const c of f)
1847
+ for (const c of m)
1840
1848
  if (c.type === "dialogue") {
1841
- if (S.filter((h) => h.type === "dialogue").find(
1842
- (h) => h.streamIndex === c.streamIndex && h.index === c.index
1849
+ if (S.filter((b) => b.type === "dialogue").find(
1850
+ (b) => b.streamIndex === c.streamIndex && b.index === c.index
1843
1851
  ) || y !== c.streamIndex)
1844
1852
  continue;
1845
1853
  d?.createEvent(c.assEvent), S.push(c);
1846
1854
  } else if (c.type === "header") {
1847
1855
  if (!d) {
1848
- const E = Me(c.content), h = { ...E, info: { ...E.info, ScaledBorderAndShadow: "no" } };
1856
+ const v = Me(c.content), b = {
1857
+ ...v,
1858
+ info: {
1859
+ ...v.info,
1860
+ ScaledBorderAndShadow: "no",
1861
+ LayoutResX: "",
1862
+ LayoutResY: ""
1863
+ }
1864
+ }, w = _t(b);
1849
1865
  d = new gr({
1850
1866
  video: u,
1851
1867
  canvas: l,
1852
- subContent: _t(h),
1868
+ subContent: w,
1853
1869
  workerUrl: s.workerUrl,
1854
1870
  modernWasmUrl: s.wasmUrl,
1855
- fonts: b.filter(Boolean).map(([A, R]) => R),
1856
- availableFonts: { ...Object.fromEntries(b), "liberation sans": `${a}default.woff2` }
1871
+ fonts: E.filter(Boolean).map(([A, f]) => f),
1872
+ availableFonts: { ...Object.fromEntries(E), "liberation sans": `${a}default.woff2` }
1857
1873
  // fallbackFont: 'liberation sans',
1858
1874
  });
1859
1875
  }
1860
- for (const E in c.parsed.styles) {
1861
- const h = c.parsed.styles.style[Number(E)];
1862
- h && Wt(d, h);
1876
+ for (const v in c.parsed.styles) {
1877
+ const b = c.parsed.styles.style[Number(v)];
1878
+ b && Wt(d, b);
1863
1879
  }
1864
1880
  } else
1865
1881
  throw new Error("Unknown subtitlePart type");
1866
1882
  }
1867
- p.type === "NEW_ATTACHMENTS" && (b = p.attachments.map((f) => [
1868
- f.filename,
1869
- new Uint8Array(f.data)
1883
+ p.type === "NEW_ATTACHMENTS" && (E = p.attachments.map((m) => [
1884
+ m.filename,
1885
+ new Uint8Array(m.data)
1870
1886
  ]));
1871
1887
  }), () => {
1872
1888
  d?.destroy();
1873
1889
  };
1874
1890
  }), zn = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
1875
- const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length: b, read: d } = a;
1891
+ const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length: E, read: d } = a;
1876
1892
  let g;
1877
- const S = new Promise((h) => {
1878
- g = h;
1893
+ const S = new Promise((b) => {
1894
+ g = b;
1879
1895
  });
1880
- t(async (h) => {
1881
- await S, h.type === "DOWNLOADED_RANGES_UPDATED" && p.indexes.reduce((m, _) => {
1882
- const C = m.at(-1);
1896
+ t(async (b) => {
1897
+ await S, b.type === "DOWNLOADED_RANGES_UPDATED" && p.indexes.reduce((f, _) => {
1898
+ const C = f.at(-1);
1883
1899
  if (C && _.timestamp - C.timestamp < 5)
1884
- return m;
1900
+ return f;
1885
1901
  {
1886
1902
  const W = p.indexes.slice(_.index + 1).find((D) => D.timestamp > _.timestamp + 5);
1887
- return W ? [...m, { ..._, duration: W.timestamp - _.timestamp }] : [...m, _];
1903
+ return W ? [...f, { ..._, duration: W.timestamp - _.timestamp }] : [...f, _];
1888
1904
  }
1889
- }, []).filter((m) => {
1890
- const _ = p.indexes.at(m.index + 1), C = _ ? _.pos : a.length, W = m.pos;
1891
- return h.downloadedRanges.some(
1905
+ }, []).filter((f) => {
1906
+ const _ = p.indexes.at(f.index + 1), C = _ ? _.pos : a.length, W = f.pos;
1907
+ return b.downloadedRanges.some(
1892
1908
  ({ startByteOffset: K, endByteOffset: F }) => K <= W && C <= F
1893
1909
  );
1894
- }).sort((m, _) => m.timestamp - _.timestamp).forEach((m) => E(m));
1910
+ }).sort((f, _) => f.timestamp - _.timestamp).forEach((f) => v(f));
1895
1911
  });
1896
1912
  const y = await Ht({
1897
1913
  publicPath: s,
1898
1914
  workerUrl: u,
1899
1915
  bufferSize: l,
1900
- length: b,
1916
+ length: E,
1901
1917
  read: d
1902
- }), p = await y.init(), f = new Xt({ concurrency: 1 });
1918
+ }), p = await y.init(), m = new qt({ concurrency: 1 });
1903
1919
  let c = [];
1904
- const E = (h) => f.add(async () => {
1905
- if (c.find((D) => D.index.index === h.index)) return;
1906
- const A = await y.readKeyframe(h.timestamp), R = new Blob([A], { type: "image/png" }), m = URL.createObjectURL(R), _ = p.indexes.at(h.index + 1), C = _ ? _.timestamp - h.timestamp : p.info.input.duration - h.timestamp, W = {
1907
- blob: R,
1908
- url: m,
1909
- timestamp: h.timestamp,
1910
- duration: h.duration ?? C,
1911
- index: h
1920
+ const v = (b) => m.add(async () => {
1921
+ if (c.find((D) => D.index.index === b.index)) return;
1922
+ const w = await y.readKeyframe(b.timestamp), A = new Blob([w], { type: "image/png" }), f = URL.createObjectURL(A), _ = p.indexes.at(b.index + 1), C = _ ? _.timestamp - b.timestamp : p.info.input.duration - b.timestamp, W = {
1923
+ blob: A,
1924
+ url: f,
1925
+ timestamp: b.timestamp,
1926
+ duration: b.duration ?? C,
1927
+ index: b
1912
1928
  };
1913
1929
  c.push(W), e({ type: "NEW_THUMBNAIL", thumbnail: W });
1914
1930
  });
@@ -2038,47 +2054,47 @@ ${l}`),
2038
2054
  }
2039
2055
  ],
2040
2056
  on: {
2041
- PLAY: { actions: X("media", ({ event: e }) => e) },
2042
- PAUSE: { actions: X("media", ({ event: e }) => e) },
2043
- SET_TIME: { actions: X("media", ({ event: e }) => e) },
2044
- SET_PLAYBACK_RATE: { actions: X("media", ({ event: e }) => e) },
2057
+ PLAY: { actions: q("media", ({ event: e }) => e) },
2058
+ PAUSE: { actions: q("media", ({ event: e }) => e) },
2059
+ SET_TIME: { actions: q("media", ({ event: e }) => e) },
2060
+ SET_PLAYBACK_RATE: { actions: q("media", ({ event: e }) => e) },
2045
2061
  PLAYING: { actions: Y({ media: ({ context: e }) => ({ ...e.media, paused: !1 }) }) },
2046
2062
  PAUSED: { actions: Y({ media: ({ context: e }) => ({ ...e.media, paused: !0 }) }) },
2047
2063
  ENDED: { actions: Y({ media: ({ context: e }) => ({ ...e.media, paused: !0 }) }) },
2048
2064
  TIME_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, currentTime: t.currentTime }) }) },
2049
2065
  VOLUME_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, muted: t.muted, volume: t.volume }) }) },
2050
- SET_VOLUME: { actions: X("media", ({ event: e }) => e) },
2066
+ SET_VOLUME: { actions: q("media", ({ event: e }) => e) },
2051
2067
  PLAYBACK_RATE_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, playbackRate: t.playbackRate }) }) },
2052
2068
  DURATION_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, duration: t.duration }) }) },
2053
- NEED_DATA: { actions: X("dataSource", ({ event: e }) => e) },
2054
- METADATA: { actions: X("mediaSource", ({ event: e }) => e) },
2055
- SEEKING: { actions: X("dataSource", ({ event: e }) => e) },
2056
- DATA: { actions: X("mediaSource", ({ event: e }) => e) },
2057
- TIMESTAMP_OFFSET: { actions: X("mediaSource", ({ event: e }) => e) },
2069
+ NEED_DATA: { actions: q("dataSource", ({ event: e }) => e) },
2070
+ METADATA: { actions: q("mediaSource", ({ event: e }) => e) },
2071
+ SEEKING: { actions: q("dataSource", ({ event: e }) => e) },
2072
+ DATA: { actions: q("mediaSource", ({ event: e }) => e) },
2073
+ TIMESTAMP_OFFSET: { actions: q("mediaSource", ({ event: e }) => e) },
2058
2074
  NEW_THUMBNAIL: { actions: [Y({ thumbnails: ({ context: e, event: t }) => [...e.thumbnails, t.thumbnail] })] },
2059
- DOWNLOADED_RANGES_UPDATED: { actions: X("thumbnails", ({ event: e }) => e) },
2075
+ DOWNLOADED_RANGES_UPDATED: { actions: q("thumbnails", ({ event: e }) => e) },
2060
2076
  NEW_ATTACHMENTS: {
2061
2077
  actions: [
2062
2078
  Y({ attachments: ({ context: e, event: t }) => [...e.attachments, ...t.attachments] }),
2063
- X("subtitles", ({ event: e }) => e)
2079
+ q("subtitles", ({ event: e }) => e)
2064
2080
  ]
2065
2081
  },
2066
2082
  NEW_SUBTITLE_FRAGMENTS: {
2067
2083
  actions: [
2068
2084
  Y({ subtitleFragments: ({ context: e, event: t }) => [...e.subtitleFragments, ...t.subtitles] }),
2069
- X("subtitles", ({ event: e }) => e)
2085
+ q("subtitles", ({ event: e }) => e)
2070
2086
  // emit(({ event }) => ({ type: 'NEW_SUBTITLE_FRAGMENTS', subtitles: event.subtitles }))
2071
2087
  ]
2072
2088
  },
2073
2089
  SUBTITLE_STREAMS_UPDATED: {
2074
2090
  actions: [
2075
2091
  Y({ subtitleStreams: ({ event: e }) => e.subtitlesStreams }),
2076
- X("subtitles", ({ event: e }) => e)
2092
+ q("subtitles", ({ event: e }) => e)
2077
2093
  ]
2078
2094
  },
2079
2095
  SELECT_SUBTITLE_STREAM: {
2080
2096
  actions: [
2081
- X("subtitles", ({ event: e }) => e)
2097
+ q("subtitles", ({ event: e }) => e)
2082
2098
  ]
2083
2099
  },
2084
2100
  SELECTED_SUBTITLE_STREAM_UPDATED: {
@@ -2123,7 +2139,7 @@ ${l}`),
2123
2139
  type: "SET_CANVAS_ELEMENT",
2124
2140
  canvasElement: t
2125
2141
  });
2126
- }, [t]), /* @__PURE__ */ v(cr, { children: /* @__PURE__ */ v("canvas", { ref: r, css: Vn }) });
2142
+ }, [t]), /* @__PURE__ */ h(cr, { children: /* @__PURE__ */ h("canvas", { ref: r, css: Vn }) });
2127
2143
  }, ur = 1e-4, bt = 1, lr = 2, dr = (e) => {
2128
2144
  const t = Math.max(ur, Math.min(bt, e));
2129
2145
  return Math.pow(t, lr);
@@ -2196,7 +2212,7 @@ ${l}`),
2196
2212
  size: l = "md"
2197
2213
  /* md */
2198
2214
  }) => /* @__PURE__ */ I(cr, { children: [
2199
- /* @__PURE__ */ v(
2215
+ /* @__PURE__ */ h(
2200
2216
  "div",
2201
2217
  {
2202
2218
  "data-tooltip-id": e,
@@ -2208,7 +2224,7 @@ ${l}`),
2208
2224
  children: n
2209
2225
  }
2210
2226
  ),
2211
- !u && /* @__PURE__ */ v(
2227
+ !u && /* @__PURE__ */ h(
2212
2228
  Pr,
2213
2229
  {
2214
2230
  css: Bn(l),
@@ -2220,14 +2236,14 @@ ${l}`),
2220
2236
  ] }), Gn = ({ ref: e, defaultValue: t }) => {
2221
2237
  const [n, r] = Z(t), [o, a] = Z(!1), s = (u) => {
2222
2238
  if (a(!0), !e.current) return;
2223
- const { clientX: l } = u, { left: b, right: d } = e.current.getBoundingClientRect();
2224
- r(Math.min(Math.max((l - b) / (d - b), 0), 1));
2239
+ const { clientX: l } = u, { left: E, right: d } = e.current.getBoundingClientRect();
2240
+ r(Math.min(Math.max((l - E) / (d - E), 0), 1));
2225
2241
  };
2226
2242
  return z(() => {
2227
2243
  if (!o) return;
2228
- const u = () => a(!1), l = (b) => {
2244
+ const u = () => a(!1), l = (E) => {
2229
2245
  if (!e.current) return;
2230
- const { clientX: d } = b, { left: g, right: S } = e.current.getBoundingClientRect();
2246
+ const { clientX: d } = E, { left: g, right: S } = e.current.getBoundingClientRect();
2231
2247
  r(Math.min(Math.max((d - g) / (S - g), 0), 1));
2232
2248
  };
2233
2249
  return document.addEventListener("mousemove", l), document.addEventListener("mouseup", u), () => {
@@ -2239,7 +2255,7 @@ ${l}`),
2239
2255
  scrub: s,
2240
2256
  setValue: r
2241
2257
  };
2242
- }, qn = Q`
2258
+ }, Xn = Q`
2243
2259
  position: relative;
2244
2260
  height: .4rem;
2245
2261
 
@@ -2350,48 +2366,48 @@ ${l}`),
2350
2366
  object-fit: cover;
2351
2367
  }
2352
2368
  }
2353
- `, Xn = () => {
2354
- const e = $.useActorRef(), t = $.useSelector((c) => c.context.media.currentTime), n = $.useSelector((c) => c.context.media.duration), r = $.useSelector((c) => c.context.thumbnails), o = Ue(je), a = Ne(null), { scrub: s, value: u } = Gn({ ref: a }), [l, b] = Z(void 0), d = (c) => {
2355
- const h = c.nativeEvent.offsetX / c.currentTarget.offsetWidth * (n ?? 0);
2356
- b(h);
2369
+ `, qn = () => {
2370
+ const e = $.useActorRef(), t = $.useSelector((c) => c.context.media.currentTime), n = $.useSelector((c) => c.context.media.duration), r = $.useSelector((c) => c.context.thumbnails), o = Ue(je), a = Ne(null), { scrub: s, value: u } = Gn({ ref: a }), [l, E] = Z(void 0), d = (c) => {
2371
+ const b = c.nativeEvent.offsetX / c.currentTarget.offsetWidth * (n ?? 0);
2372
+ E(b);
2357
2373
  }, g = () => {
2358
- a.current && b(void 0);
2374
+ a.current && E(void 0);
2359
2375
  }, S = pe(
2360
- () => o.downloadedRanges?.map((c, E) => {
2376
+ () => o.downloadedRanges?.map((c, v) => {
2361
2377
  if ("startByteOffset" in c && "endByteOffset" in c && o.size) {
2362
- const h = c.startByteOffset / o.size, R = c.endByteOffset / o.size - h, m = h * 100;
2363
- return /* @__PURE__ */ v("div", { className: "loaded-part", style: { transform: `scaleX(${R})`, marginLeft: `${m}%` } }, E);
2378
+ const b = c.startByteOffset / o.size, A = c.endByteOffset / o.size - b, f = b * 100;
2379
+ return /* @__PURE__ */ h("div", { className: "loaded-part", style: { transform: `scaleX(${A})`, marginLeft: `${f}%` } }, v);
2364
2380
  } else
2365
2381
  return null;
2366
2382
  }) ?? [],
2367
- [o.downloadedRanges?.map(({ startByteOffset: c, endByteOffset: E }) => `${c}/${E}`).join(",")]
2383
+ [o.downloadedRanges?.map(({ startByteOffset: c, endByteOffset: v }) => `${c}/${v}`).join(",")]
2368
2384
  ), y = pe(() => {
2369
2385
  if (!l || l < 0) return;
2370
- const c = Math.floor(l / 3600), E = Math.floor((l - c * 3600) / 60), h = Math.floor(l - c * 3600 - E * 60);
2371
- return `${c > 0 ? `${c}:` : ""}${E < 10 ? "0" : ""}${E}:${h < 10 ? "0" : ""}${h}`;
2386
+ const c = Math.floor(l / 3600), v = Math.floor((l - c * 3600) / 60), b = Math.floor(l - c * 3600 - v * 60);
2387
+ return `${c > 0 ? `${c}:` : ""}${v < 10 ? "0" : ""}${v}:${b < 10 ? "0" : ""}${b}`;
2372
2388
  }, [l]);
2373
2389
  z(() => {
2374
2390
  if (!e || u === void 0 || !n) return;
2375
2391
  const c = u * n;
2376
2392
  e.send({ type: "SET_TIME", value: c });
2377
2393
  }, [e, u, n]);
2378
- const p = pe(() => typeof n != "number" || typeof t != "number" ? 0 : 1 / ((n ?? 0) / (t ?? 0)), [n, t]), f = pe(() => {
2394
+ const p = pe(() => typeof n != "number" || typeof t != "number" ? 0 : 1 / ((n ?? 0) / (t ?? 0)), [n, t]), m = pe(() => {
2379
2395
  if (!(!r.length || !l))
2380
2396
  return r.find(
2381
- ({ timestamp: c, duration: E }) => c <= l && l <= c + E
2397
+ ({ timestamp: c, duration: v }) => c <= l && l <= c + v
2382
2398
  );
2383
2399
  }, [r.length, l]);
2384
2400
  return /* @__PURE__ */ I(
2385
2401
  "div",
2386
2402
  {
2387
- css: qn,
2403
+ css: Xn,
2388
2404
  ref: a,
2389
2405
  className: "progress-bar",
2390
2406
  onMouseMove: d,
2391
2407
  onMouseOut: g,
2392
2408
  children: [
2393
- /* @__PURE__ */ v("div", { className: "background-bar" }),
2394
- l ? /* @__PURE__ */ v(
2409
+ /* @__PURE__ */ h("div", { className: "background-bar" }),
2410
+ l ? /* @__PURE__ */ h(
2395
2411
  "div",
2396
2412
  {
2397
2413
  className: "cursor-time",
@@ -2399,19 +2415,19 @@ ${l}`),
2399
2415
  children: y
2400
2416
  }
2401
2417
  ) : void 0,
2402
- /* @__PURE__ */ v("div", { className: "progress" }),
2403
- /* @__PURE__ */ v("div", { className: "loaded", children: S }),
2404
- /* @__PURE__ */ v("div", { className: "hover" }),
2405
- /* @__PURE__ */ v("div", { className: "play-container", children: /* @__PURE__ */ v("div", { className: "play", style: { transform: `scaleX(${p})` } }) }),
2406
- /* @__PURE__ */ v("div", { className: "chapters" }),
2407
- /* @__PURE__ */ v("div", { className: "scrubber" }),
2408
- /* @__PURE__ */ v("div", { className: "padding", onMouseDown: s }),
2409
- /* @__PURE__ */ v(
2418
+ /* @__PURE__ */ h("div", { className: "progress" }),
2419
+ /* @__PURE__ */ h("div", { className: "loaded", children: S }),
2420
+ /* @__PURE__ */ h("div", { className: "hover" }),
2421
+ /* @__PURE__ */ h("div", { className: "play-container", children: /* @__PURE__ */ h("div", { className: "play", style: { transform: `scaleX(${p})` } }) }),
2422
+ /* @__PURE__ */ h("div", { className: "chapters" }),
2423
+ /* @__PURE__ */ h("div", { className: "scrubber" }),
2424
+ /* @__PURE__ */ h("div", { className: "padding", onMouseDown: s }),
2425
+ /* @__PURE__ */ h(
2410
2426
  "div",
2411
2427
  {
2412
2428
  className: "thumbnail",
2413
2429
  style: { left: `clamp(12.5rem, ${1 / ((n ?? 0) / (l ?? 1)) * 100}%, calc(100% - 12.5rem))` },
2414
- children: f ? /* @__PURE__ */ v("img", { src: f.url }) : void 0
2430
+ children: m ? /* @__PURE__ */ h("img", { src: m.url }) : void 0
2415
2431
  }
2416
2432
  )
2417
2433
  ]
@@ -2486,7 +2502,7 @@ position: relative;
2486
2502
  const e = $.useActorRef(), t = $.useSelector((p) => p.context.media.playbackRate), n = $.useSelector((p) => p.context.subtitleStreams), r = $.useSelector((p) => p.context.selectedSubtitleStreamIndex), [o, a] = Z(!1), [s, u] = Z(
2487
2503
  0
2488
2504
  /* Default */
2489
- ), l = Ne(null), b = () => {
2505
+ ), l = Ne(null), E = () => {
2490
2506
  a(!o), u(
2491
2507
  0
2492
2508
  /* Default */
@@ -2498,8 +2514,8 @@ position: relative;
2498
2514
  );
2499
2515
  };
2500
2516
  z(() => {
2501
- const p = (f) => {
2502
- o && l.current && !l.current.contains(f.target) && b();
2517
+ const p = (m) => {
2518
+ o && l.current && !l.current.contains(m.target) && E();
2503
2519
  };
2504
2520
  return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
2505
2521
  }, [o]);
@@ -2507,26 +2523,26 @@ position: relative;
2507
2523
  () => n.map(({ header: p }) => ({ streamIndex: p.streamIndex, language: p.parsed.info.Title })),
2508
2524
  [n.length]
2509
2525
  ), S = (p) => () => {
2510
- e.send({ type: "SELECT_SUBTITLE_STREAM", streamIndex: p.streamIndex }), b();
2526
+ e.send({ type: "SELECT_SUBTITLE_STREAM", streamIndex: p.streamIndex }), E();
2511
2527
  }, y = (p) => () => {
2512
2528
  u(p);
2513
2529
  };
2514
2530
  return /* @__PURE__ */ I("div", { css: Jn, ref: l, children: [
2515
- /* @__PURE__ */ v(
2531
+ /* @__PURE__ */ h(
2516
2532
  ge,
2517
2533
  {
2518
2534
  id: "settings",
2519
2535
  disabled: o,
2520
- text: /* @__PURE__ */ v(
2536
+ text: /* @__PURE__ */ h(
2521
2537
  "button",
2522
2538
  {
2523
2539
  className: "settings",
2524
2540
  type: "button",
2525
- onClick: b,
2526
- children: /* @__PURE__ */ v(yr, {})
2541
+ onClick: E,
2542
+ children: /* @__PURE__ */ h(yr, {})
2527
2543
  }
2528
2544
  ),
2529
- toolTipText: /* @__PURE__ */ v("span", { children: "Settings" })
2545
+ toolTipText: /* @__PURE__ */ h("span", { children: "Settings" })
2530
2546
  }
2531
2547
  ),
2532
2548
  o && s === 0 && /* @__PURE__ */ I("div", { className: "popover", children: [
@@ -2534,31 +2550,31 @@ position: relative;
2534
2550
  2
2535
2551
  /* Advanced */
2536
2552
  ), children: [
2537
- /* @__PURE__ */ v("span", { children: "Advanced" }),
2538
- /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Ke, {}) })
2553
+ /* @__PURE__ */ h("span", { children: "Advanced" }),
2554
+ /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(Ke, {}) })
2539
2555
  ] }),
2540
2556
  /* @__PURE__ */ I("div", { onClick: y(
2541
2557
  3
2542
2558
  /* SelectNewSources */
2543
2559
  ), children: [
2544
- /* @__PURE__ */ v("div", { children: "Select new sources" }),
2545
- /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Ke, {}) })
2560
+ /* @__PURE__ */ h("div", { children: "Select new sources" }),
2561
+ /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(Ke, {}) })
2546
2562
  ] }),
2547
2563
  /* @__PURE__ */ I("div", { onClick: y(
2548
2564
  4
2549
2565
  /* Subtitles */
2550
2566
  ), children: [
2551
- /* @__PURE__ */ v("div", { children: "Subtitles" }),
2552
- /* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Ke, {}) })
2567
+ /* @__PURE__ */ h("div", { children: "Subtitles" }),
2568
+ /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(Ke, {}) })
2553
2569
  ] }),
2554
2570
  /* @__PURE__ */ I("div", { onClick: y(
2555
2571
  1
2556
2572
  /* PlaybackRate */
2557
2573
  ), children: [
2558
- /* @__PURE__ */ v("div", { children: "Playback speed" }),
2574
+ /* @__PURE__ */ h("div", { children: "Playback speed" }),
2559
2575
  /* @__PURE__ */ I("div", { children: [
2560
- /* @__PURE__ */ v("span", { className: "secondary", children: t === 1 ? "(Default)" : t.toFixed(2) }),
2561
- /* @__PURE__ */ v(Ke, {})
2576
+ /* @__PURE__ */ h("span", { className: "secondary", children: t === 1 ? "(Default)" : t.toFixed(2) }),
2577
+ /* @__PURE__ */ h(Ke, {})
2562
2578
  ] })
2563
2579
  ] })
2564
2580
  ] }),
@@ -2567,13 +2583,13 @@ position: relative;
2567
2583
  0
2568
2584
  /* Default */
2569
2585
  ), children: [
2570
- /* @__PURE__ */ v("div", { children: "Back" }),
2571
- /* @__PURE__ */ v("div", {})
2586
+ /* @__PURE__ */ h("div", { children: "Back" }),
2587
+ /* @__PURE__ */ h("div", {})
2572
2588
  ] }),
2573
2589
  /* @__PURE__ */ I("div", { children: [
2574
- /* @__PURE__ */ v("div", { children: "Playback speed" }),
2590
+ /* @__PURE__ */ h("div", { children: "Playback speed" }),
2575
2591
  /* @__PURE__ */ I("div", { children: [
2576
- /* @__PURE__ */ v(
2592
+ /* @__PURE__ */ h(
2577
2593
  "button",
2578
2594
  {
2579
2595
  type: "button",
@@ -2581,7 +2597,7 @@ position: relative;
2581
2597
  children: "0.5x"
2582
2598
  }
2583
2599
  ),
2584
- /* @__PURE__ */ v(
2600
+ /* @__PURE__ */ h(
2585
2601
  "button",
2586
2602
  {
2587
2603
  type: "button",
@@ -2589,7 +2605,7 @@ position: relative;
2589
2605
  children: "1x"
2590
2606
  }
2591
2607
  ),
2592
- /* @__PURE__ */ v(
2608
+ /* @__PURE__ */ h(
2593
2609
  "button",
2594
2610
  {
2595
2611
  type: "button",
@@ -2597,7 +2613,7 @@ position: relative;
2597
2613
  children: "1.5x"
2598
2614
  }
2599
2615
  ),
2600
- /* @__PURE__ */ v(
2616
+ /* @__PURE__ */ h(
2601
2617
  "button",
2602
2618
  {
2603
2619
  type: "button",
@@ -2608,19 +2624,19 @@ position: relative;
2608
2624
  ] })
2609
2625
  ] })
2610
2626
  ] }),
2611
- o && s === 2 && /* @__PURE__ */ v("div", { className: "popover", children: /* @__PURE__ */ I("div", { onClick: y(
2627
+ o && s === 2 && /* @__PURE__ */ h("div", { className: "popover", children: /* @__PURE__ */ I("div", { onClick: y(
2612
2628
  0
2613
2629
  /* Default */
2614
2630
  ), children: [
2615
- /* @__PURE__ */ v("div", { children: "Back" }),
2616
- /* @__PURE__ */ v("div", {})
2631
+ /* @__PURE__ */ h("div", { children: "Back" }),
2632
+ /* @__PURE__ */ h("div", {})
2617
2633
  ] }) }),
2618
- o && s === 3 && /* @__PURE__ */ v("div", { className: "popover", children: /* @__PURE__ */ I("div", { onClick: y(
2634
+ o && s === 3 && /* @__PURE__ */ h("div", { className: "popover", children: /* @__PURE__ */ I("div", { onClick: y(
2619
2635
  0
2620
2636
  /* Default */
2621
2637
  ), children: [
2622
- /* @__PURE__ */ v("div", { children: "Back" }),
2623
- /* @__PURE__ */ v("div", {})
2638
+ /* @__PURE__ */ h("div", { children: "Back" }),
2639
+ /* @__PURE__ */ h("div", {})
2624
2640
  ] }) }),
2625
2641
  o && s === 4 && /* @__PURE__ */ I("div", { className: "popover", children: [
2626
2642
  g.map((p) => /* @__PURE__ */ I(
@@ -2628,8 +2644,8 @@ position: relative;
2628
2644
  {
2629
2645
  onClick: S(p),
2630
2646
  children: [
2631
- /* @__PURE__ */ v("div", { children: p.language }),
2632
- /* @__PURE__ */ v("div", { children: r === p.streamIndex ? "✓" : "" })
2647
+ /* @__PURE__ */ h("div", { children: p.language }),
2648
+ /* @__PURE__ */ h("div", { children: r === p.streamIndex ? "✓" : "" })
2633
2649
  ]
2634
2650
  },
2635
2651
  p.streamIndex
@@ -2638,8 +2654,8 @@ position: relative;
2638
2654
  0
2639
2655
  /* Default */
2640
2656
  ), children: [
2641
- /* @__PURE__ */ v("div", { children: "Back" }),
2642
- /* @__PURE__ */ v("div", {})
2657
+ /* @__PURE__ */ h("div", { children: "Back" }),
2658
+ /* @__PURE__ */ h("div", {})
2643
2659
  ] })
2644
2660
  ] })
2645
2661
  ] });
@@ -2679,47 +2695,47 @@ position: relative;
2679
2695
  `, to = ({ value: e, onChange: t }) => {
2680
2696
  const n = $.useSelector((c) => c.context.media.volume), r = $.useSelector((c) => c.context.media.muted), o = Ne(null), [a, s] = Z(!1), u = (c) => {
2681
2697
  if (!o.current) return e;
2682
- const E = o.current.getBoundingClientRect(), h = c - E.left;
2683
- return Math.max(0, Math.min(h, E.width)) / E.width;
2698
+ const v = o.current.getBoundingClientRect(), b = c - v.left;
2699
+ return Math.max(0, Math.min(b, v.width)) / v.width;
2684
2700
  }, l = (c) => {
2685
2701
  s(!0);
2686
- const E = u(c.clientX);
2687
- t(E);
2688
- }, b = (c) => {
2702
+ const v = u(c.clientX);
2703
+ t(v);
2704
+ }, E = (c) => {
2689
2705
  if (!a) return;
2690
- const E = u(c.clientX);
2691
- t(E);
2706
+ const v = u(c.clientX);
2707
+ t(v);
2692
2708
  }, d = () => {
2693
2709
  s(!1);
2694
2710
  }, g = (c) => {
2695
2711
  c.preventDefault();
2696
- const E = 0.05;
2697
- let h = e;
2698
- c.deltaY < 0 ? h = Math.min(1, h + E) : h = Math.max(0, h - E), t(h);
2712
+ const v = 0.05;
2713
+ let b = e;
2714
+ c.deltaY < 0 ? b = Math.min(1, b + v) : b = Math.max(0, b - v), t(b);
2699
2715
  };
2700
- z(() => (window.addEventListener("mousemove", b), window.addEventListener("mouseup", d), () => {
2701
- window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", d);
2716
+ z(() => (window.addEventListener("mousemove", E), window.addEventListener("mouseup", d), () => {
2717
+ window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", d);
2702
2718
  }), [a]), z(() => {
2703
2719
  const c = o.current;
2704
2720
  return c && c.addEventListener("wheel", g, { passive: !1 }), () => {
2705
2721
  c && c.removeEventListener("wheel", g);
2706
2722
  };
2707
2723
  }, [e]);
2708
- const S = e * 100, y = "#fff", p = "#3A3A3A", f = pe(
2724
+ const S = e * 100, y = "#fff", p = "#3A3A3A", m = pe(
2709
2725
  () => Math.round(r ? 0 : xt(n) * 100),
2710
2726
  [n]
2711
2727
  );
2712
- return /* @__PURE__ */ v(
2728
+ return /* @__PURE__ */ h(
2713
2729
  ge,
2714
2730
  {
2715
2731
  id: "volume-slider",
2716
- text: /* @__PURE__ */ v(
2732
+ text: /* @__PURE__ */ h(
2717
2733
  "div",
2718
2734
  {
2719
2735
  ref: o,
2720
2736
  css: eo,
2721
2737
  onMouseDown: l,
2722
- children: /* @__PURE__ */ v(
2738
+ children: /* @__PURE__ */ h(
2723
2739
  "div",
2724
2740
  {
2725
2741
  style: {
@@ -2728,7 +2744,7 @@ position: relative;
2728
2744
  ${p} ${S}% 100%
2729
2745
  )`
2730
2746
  },
2731
- children: /* @__PURE__ */ v(
2747
+ children: /* @__PURE__ */ h(
2732
2748
  "div",
2733
2749
  {
2734
2750
  className: "volume-handle",
@@ -2742,7 +2758,7 @@ position: relative;
2742
2758
  }
2743
2759
  ),
2744
2760
  toolTipText: /* @__PURE__ */ I("div", { className: "volume-value", children: [
2745
- f,
2761
+ m,
2746
2762
  "%"
2747
2763
  ] })
2748
2764
  }
@@ -2793,24 +2809,24 @@ position: relative;
2793
2809
  volume: dr(s)
2794
2810
  });
2795
2811
  return /* @__PURE__ */ I("div", { css: ro, children: [
2796
- /* @__PURE__ */ v(
2812
+ /* @__PURE__ */ h(
2797
2813
  ge,
2798
2814
  {
2799
2815
  id: "sound",
2800
- text: /* @__PURE__ */ v(
2816
+ text: /* @__PURE__ */ h(
2801
2817
  "button",
2802
2818
  {
2803
2819
  className: "sound",
2804
2820
  type: "button",
2805
2821
  onClick: () => a(o, !r),
2806
2822
  ref: e,
2807
- children: r || n === 0 ? /* @__PURE__ */ v(Sr, { size: 18, color: "#fff" }) : n <= 0.5 ? /* @__PURE__ */ v(xr, { size: 18, color: "#fff" }) : /* @__PURE__ */ v(Tr, { size: 18, color: "#fff" })
2823
+ children: r || n === 0 ? /* @__PURE__ */ h(Sr, { size: 18, color: "#fff" }) : n <= 0.5 ? /* @__PURE__ */ h(xr, { size: 18, color: "#fff" }) : /* @__PURE__ */ h(Tr, { size: 18, color: "#fff" })
2808
2824
  }
2809
2825
  ),
2810
- toolTipText: /* @__PURE__ */ v("span", { children: r ? "Unmute (m)" : "Mute (m)" })
2826
+ toolTipText: /* @__PURE__ */ h("span", { children: r ? "Unmute (m)" : "Mute (m)" })
2811
2827
  }
2812
2828
  ),
2813
- /* @__PURE__ */ v("div", { className: "volume-slider-container", children: /* @__PURE__ */ v("div", { className: "volume-slider-background", children: /* @__PURE__ */ v(
2829
+ /* @__PURE__ */ h("div", { className: "volume-slider-container", children: /* @__PURE__ */ h("div", { className: "volume-slider-background", children: /* @__PURE__ */ h(
2814
2830
  to,
2815
2831
  {
2816
2832
  value: r ? 0 : o,
@@ -2933,29 +2949,29 @@ position: relative;
2933
2949
  `, io = ({
2934
2950
  containerRef: e
2935
2951
  }) => {
2936
- const t = $.useActorRef(), n = Ue(je), r = $.useSelector((f) => f.context.media.paused), o = $.useSelector((f) => f.context.media.volume), a = $.useSelector((f) => f.context.media.muted), s = $.useSelector((f) => f.context.media.currentTime), u = $.useSelector((f) => f.context.media.duration), [l, b] = Z(), [d, g] = Z(!1);
2952
+ const t = $.useActorRef(), n = Ue(je), r = $.useSelector((m) => m.context.media.paused), o = $.useSelector((m) => m.context.media.volume), a = $.useSelector((m) => m.context.media.muted), s = $.useSelector((m) => m.context.media.currentTime), u = $.useSelector((m) => m.context.media.duration), [l, E] = Z(), [d, g] = Z(!1);
2937
2953
  z(() => {
2938
- const f = () => {
2954
+ const m = () => {
2939
2955
  g(!!document.fullscreenElement);
2940
2956
  };
2941
- return document.addEventListener("fullscreenchange", f), () => {
2942
- document.removeEventListener("fullscreenchange", f);
2957
+ return document.addEventListener("fullscreenchange", m), () => {
2958
+ document.removeEventListener("fullscreenchange", m);
2943
2959
  };
2944
2960
  }, []);
2945
2961
  const S = () => {
2946
2962
  document.fullscreenElement ? document.exitFullscreen() : e.current && e.current.requestFullscreen();
2947
- }, y = ot(({ direction: f, stepSize: c }) => {
2963
+ }, y = ot(({ direction: m, stepSize: c }) => {
2948
2964
  if (!t) return;
2949
- const E = xt(o), h = f === "up" ? c : -c, A = Math.max(0, Math.min(1, E + h)), R = dr(A);
2965
+ const v = xt(o), b = m === "up" ? c : -c, w = Math.max(0, Math.min(1, v + b)), A = dr(w);
2950
2966
  t.send({
2951
2967
  type: "SET_VOLUME",
2952
2968
  muted: a,
2953
- volume: R
2969
+ volume: A
2954
2970
  });
2955
2971
  }, [t.id, a, o]);
2956
2972
  z(() => {
2957
- const f = (c) => {
2958
- let E = !0;
2973
+ const m = (c) => {
2974
+ let v = !0;
2959
2975
  if (c.key === "f") S();
2960
2976
  else if (c.key === "k") nt(t, r, u, s);
2961
2977
  else if (c.key === " ") nt(t, r, u, s);
@@ -2968,73 +2984,73 @@ position: relative;
2968
2984
  else if (c.key === "ArrowRight") {
2969
2985
  if (!u) return;
2970
2986
  s + 5 >= u ? t.send({ type: "SET_TIME", value: u }) : t.send({ type: "SET_TIME", value: s + 5 });
2971
- } else c.key === "ArrowLeft" ? s - 5 < 0 ? t.send({ type: "SET_TIME", value: 0 }) : t.send({ type: "SET_TIME", value: s - 5 }) : E = !1;
2972
- E && c.preventDefault();
2987
+ } else c.key === "ArrowLeft" ? s - 5 < 0 ? t.send({ type: "SET_TIME", value: 0 }) : t.send({ type: "SET_TIME", value: s - 5 }) : v = !1;
2988
+ v && c.preventDefault();
2973
2989
  };
2974
- return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
2990
+ return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
2975
2991
  }, [t, o, a, r, s, u]);
2976
- const p = ot((f) => {
2977
- f.preventDefault(), f.deltaY < 0 ? y({ direction: "up", stepSize: 0.05 }) : y({ direction: "down", stepSize: 0.05 });
2992
+ const p = ot((m) => {
2993
+ m.preventDefault(), m.deltaY < 0 ? y({ direction: "up", stepSize: 0.05 }) : y({ direction: "down", stepSize: 0.05 });
2978
2994
  }, [y]);
2979
2995
  return z(() => {
2980
2996
  if (l)
2981
2997
  return l.addEventListener("wheel", p, { passive: !1 }), () => l.removeEventListener("wheel", p);
2982
2998
  }, [l, y]), /* @__PURE__ */ I("div", { css: oo, style: { ...n.hideUI ? { opacity: "0", pointerEvents: "none" } : {} }, children: [
2983
- /* @__PURE__ */ v(Xn, {}),
2999
+ /* @__PURE__ */ h(qn, {}),
2984
3000
  /* @__PURE__ */ I("div", { className: "actions", children: [
2985
3001
  /* @__PURE__ */ I("div", { className: "left", children: [
2986
- /* @__PURE__ */ v(
3002
+ /* @__PURE__ */ h(
2987
3003
  ge,
2988
3004
  {
2989
3005
  id: "play",
2990
3006
  tooltipPlace: "top-start",
2991
- text: /* @__PURE__ */ v(
3007
+ text: /* @__PURE__ */ h(
2992
3008
  "button",
2993
3009
  {
2994
3010
  className: "play",
2995
3011
  type: "button",
2996
3012
  onClick: () => nt(t, r, u, s),
2997
- children: u === s ? /* @__PURE__ */ v(wr, {}) : r ? /* @__PURE__ */ v(Ar, {}) : /* @__PURE__ */ v(Rr, {})
3013
+ children: u === s ? /* @__PURE__ */ h(wr, {}) : r ? /* @__PURE__ */ h(Rr, {}) : /* @__PURE__ */ h(Ar, {})
2998
3014
  }
2999
3015
  ),
3000
- toolTipText: /* @__PURE__ */ v("span", { children: u === s ? "Replay (k)" : r ? "Play (k)" : "Pause (k)" })
3016
+ toolTipText: /* @__PURE__ */ h("span", { children: u === s ? "Replay (k)" : r ? "Play (k)" : "Pause (k)" })
3001
3017
  }
3002
3018
  ),
3003
- /* @__PURE__ */ v(no, { ref: b }),
3004
- /* @__PURE__ */ v("div", { className: "time", children: Hn(s, u) })
3019
+ /* @__PURE__ */ h(no, { ref: E }),
3020
+ /* @__PURE__ */ h("div", { className: "time", children: Hn(s, u) })
3005
3021
  ] }),
3006
3022
  /* @__PURE__ */ I("div", { className: "right", children: [
3007
- /* @__PURE__ */ v(Zn, {}),
3008
- /* @__PURE__ */ v(
3023
+ /* @__PURE__ */ h(Zn, {}),
3024
+ /* @__PURE__ */ h(
3009
3025
  ge,
3010
3026
  {
3011
3027
  id: "picture-in-picture",
3012
- text: /* @__PURE__ */ v(
3028
+ text: /* @__PURE__ */ h(
3013
3029
  "button",
3014
3030
  {
3015
3031
  className: "picture-in-picture",
3016
3032
  type: "button",
3017
- children: /* @__PURE__ */ v("img", { src: Kn })
3033
+ children: /* @__PURE__ */ h("img", { src: Kn })
3018
3034
  }
3019
3035
  ),
3020
- toolTipText: /* @__PURE__ */ v("span", { children: "Picture in picture" })
3036
+ toolTipText: /* @__PURE__ */ h("span", { children: "Picture in picture" })
3021
3037
  }
3022
3038
  ),
3023
- /* @__PURE__ */ v(
3039
+ /* @__PURE__ */ h(
3024
3040
  ge,
3025
3041
  {
3026
3042
  id: "full-screen",
3027
3043
  tooltipPlace: "top-end",
3028
- text: /* @__PURE__ */ v(
3044
+ text: /* @__PURE__ */ h(
3029
3045
  "button",
3030
3046
  {
3031
3047
  className: "full-screen",
3032
3048
  type: "button",
3033
3049
  onClick: S,
3034
- children: d ? /* @__PURE__ */ v(_r, {}) : /* @__PURE__ */ v(Cr, {})
3050
+ children: d ? /* @__PURE__ */ h(_r, {}) : /* @__PURE__ */ h(Cr, {})
3035
3051
  }
3036
3052
  ),
3037
- toolTipText: /* @__PURE__ */ v("span", { children: d ? "Exit full screen (f)" : "Full screen (f)" })
3053
+ toolTipText: /* @__PURE__ */ h("span", { children: d ? "Exit full screen (f)" : "Full screen (f)" })
3038
3054
  }
3039
3055
  )
3040
3056
  ] })
@@ -3046,6 +3062,8 @@ position: relative;
3046
3062
  display: flex;
3047
3063
  justify-content: center;
3048
3064
  align-items: center;
3065
+ height: 100%;
3066
+ width: 100%;
3049
3067
 
3050
3068
  & > div:not(:last-of-type) {
3051
3069
  position: absolute;
@@ -3064,6 +3082,7 @@ position: relative;
3064
3082
  height: 100%;
3065
3083
  width: 100%;
3066
3084
  background-color: black;
3085
+ object-fit: contain;
3067
3086
  }
3068
3087
 
3069
3088
  &.hide {
@@ -3088,9 +3107,9 @@ position: relative;
3088
3107
  },
3089
3108
  className: n.hideUI ? "hide" : "",
3090
3109
  children: [
3091
- /* @__PURE__ */ v(Wn, {}),
3092
- /* @__PURE__ */ v(io, { containerRef: u }),
3093
- /* @__PURE__ */ v(
3110
+ /* @__PURE__ */ h(Wn, {}),
3111
+ /* @__PURE__ */ h(io, { containerRef: u }),
3112
+ /* @__PURE__ */ h(
3094
3113
  "div",
3095
3114
  {
3096
3115
  className: "video",
@@ -3106,9 +3125,10 @@ position: relative;
3106
3125
  justify-content: center;
3107
3126
  background-color: #111;
3108
3127
  height: 100%;
3128
+ width: 100%;
3109
3129
  overflow: hidden;
3110
3130
  `, lo = ({ options: e, videoElement: t, children: n }) => {
3111
- const r = Ue(je), o = $.useActorRef(), a = $.useSelector((f) => f.value), s = $.useSelector((f) => f.context.media.volume), u = $.useSelector((f) => f.context.media.muted), l = $.useSelector((f) => f.context.isReady), [b, d] = Bt("mediaVolume", "1"), [g, S] = Bt("mediaMute", "false"), [y, p] = Z(!0);
3131
+ const r = Ue(je), o = $.useActorRef(), a = $.useSelector((m) => m.value), s = $.useSelector((m) => m.context.media.volume), u = $.useSelector((m) => m.context.media.muted), l = $.useSelector((m) => m.context.isReady), [E, d] = Bt("mediaVolume", "1"), [g, S] = Bt("mediaMute", "false"), [y, p] = Z(!0);
3112
3132
  return z(
3113
3133
  () => o.send({
3114
3134
  type: "MEDIA_SOURCE_OPTIONS",
@@ -3125,28 +3145,28 @@ position: relative;
3125
3145
  [
3126
3146
  o,
3127
3147
  l,
3128
- (r.downloadedRanges?.map((f) => `${f.startByteOffset}-${f.endByteOffset}`) ?? []).join(",")
3148
+ (r.downloadedRanges?.map((m) => `${m.startByteOffset}-${m.endByteOffset}`) ?? []).join(",")
3129
3149
  ]
3130
3150
  ), z(() => {
3131
- const { size: f, read: c, publicPath: E, libavWorkerUrl: h, jassubWasmUrl: A } = e;
3132
- !c || !f || !E || !h || !A || o.send({
3151
+ const { size: m, read: c, publicPath: v, libavWorkerUrl: b, jassubWasmUrl: w } = e;
3152
+ !c || !m || !v || !b || !w || o.send({
3133
3153
  type: "REMUXER_OPTIONS",
3134
3154
  remuxerOptions: {
3135
- publicPath: E,
3136
- workerUrl: h,
3155
+ publicPath: v,
3156
+ workerUrl: b,
3137
3157
  bufferSize: e.bufferSize ?? co,
3138
- length: f,
3158
+ length: m,
3139
3159
  read: c
3140
3160
  }
3141
3161
  });
3142
3162
  }, [e.read, e.size, e.publicPath, e.libavWorkerUrl, e.bufferSize]), z(() => {
3143
- const { jassubWorkerUrl: f, jassubWasmUrl: c, jassubModernWasmUrl: E } = e;
3144
- !f || !c || !E || o.send({
3163
+ const { jassubWorkerUrl: m, jassubWasmUrl: c, jassubModernWasmUrl: v } = e;
3164
+ !m || !c || !v || o.send({
3145
3165
  type: "SUBTITLES_RENDERER_OPTIONS",
3146
3166
  subtitlesRendererOptions: {
3147
- workerUrl: f,
3167
+ workerUrl: m,
3148
3168
  wasmUrl: c,
3149
- modernWasmUrl: E
3169
+ modernWasmUrl: v
3150
3170
  }
3151
3171
  });
3152
3172
  }, [e.publicPath, e.jassubWorkerUrl, e.jassubWasmUrl]), z(() => {
@@ -3158,14 +3178,14 @@ position: relative;
3158
3178
  l && (y ? (o.send({
3159
3179
  type: "SET_VOLUME",
3160
3180
  muted: g === "true",
3161
- volume: isNaN(Number(b)) ? 1 : Number(b)
3181
+ volume: isNaN(Number(E)) ? 1 : Number(E)
3162
3182
  }), p(!1)) : (d(s.toString()), S(u ? "true" : "false")));
3163
3183
  }, [l, s, u, y]), z(() => {
3164
3184
  if (a === "OK")
3165
3185
  return () => {
3166
3186
  o.send({ type: "DESTROY" });
3167
3187
  };
3168
- }, [a]), /* @__PURE__ */ v("div", { css: uo, children: /* @__PURE__ */ v(so, { children: n }) });
3188
+ }, [a]), /* @__PURE__ */ h("div", { css: uo, children: /* @__PURE__ */ h(so, { children: n }) });
3169
3189
  }, xo = ({ ref: e, ...t }) => {
3170
3190
  const n = (l) => o({ ...l, update: n }), [r, o] = Z({ update: n }), [a, s] = Z(), u = ot((l) => {
3171
3191
  typeof e == "function" ? e(l) : e && "current" in e && (e.current = l), s(l ?? void 0);
@@ -3178,7 +3198,7 @@ position: relative;
3178
3198
  size: t?.size,
3179
3199
  downloadedRanges: t?.downloadedRanges
3180
3200
  }));
3181
- }, [a, t?.title, t?.size, t?.downloadedRanges]), /* @__PURE__ */ v(je.Provider, { value: r, children: /* @__PURE__ */ v($.Provider, { children: /* @__PURE__ */ v(lo, { options: t, videoElement: a, children: /* @__PURE__ */ v("video", { ref: u, controls: !1 }) }) }) });
3201
+ }, [a, t?.title, t?.size, t?.downloadedRanges]), /* @__PURE__ */ h(je.Provider, { value: r, children: /* @__PURE__ */ h($.Provider, { children: /* @__PURE__ */ h(lo, { options: t, videoElement: a, children: /* @__PURE__ */ h("video", { ref: u, controls: !1 }) }) }) });
3182
3202
  };
3183
3203
  export {
3184
3204
  lo as FKNVideoRoot,