@aigamo/hydrangean-diva 0.0.1-alpha.34 → 0.0.1-alpha.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,19 +1,19 @@
1
- import { makeObservable as zr, action as m, computed as g, observable as Z, reaction as Lr } from "mobx";
1
+ import { makeObservable as Lr, action as m, computed as g, observable as Z, reaction as qr } from "mobx";
2
2
  import * as re from "react";
3
- import Ut, { forwardRef as qr, useContext as Oe, createContext as Ue, useState as $, useEffect as Yt, memo as ne, useCallback as B, useMemo as Ye, useLayoutEffect as Qr } from "react";
3
+ import Ut, { forwardRef as Qr, useContext as Oe, createContext as Ue, useState as $, useEffect as Yt, memo as ne, useCallback as B, useMemo as Ye, useLayoutEffect as Wt } from "react";
4
4
  import Vr from "@emotion/cache";
5
5
  import Ur from "ajv";
6
6
  import { useNostalgicDiva as ce, nullPlayerController as Yr, NostalgicDivaProvider as Wr, findVideoService as Hr, NostalgicDiva as Gr } from "@aigamo/nostalgic-diva";
7
7
  import { pull as At } from "lodash-es";
8
- import { EuiSelectable as Jr, EuiPopoverTitle as Kr, EuiPopoverFooter as Xr, EuiButton as J, EuiPopover as ke, useGeneratedHtmlId as Zr, EuiModalHeaderTitle as en, EuiModalHeader as tn, EuiForm as rn, EuiFormRow as ut, EuiFieldText as Ft, EuiModalBody as nn, EuiModalFooter as an, EuiButtonEmpty as Wt, EuiModal as on, EuiCodeBlock as sn, EuiFlyout as ln, useEuiTheme as Ht, EuiCheckbox as Gt, EuiTableHeaderCellCheckbox as cn, EuiTableHeaderCell as ot, EuiTableHeader as un, EuiIcon as U, EuiContextMenu as mt, EuiButtonIcon as Y, EuiTableRowCell as dt, EuiTableRowCellCheckbox as dn, EuiLink as fn, EuiTableRow as pn, EuiTable as mn, EuiFlexGroup as le, EuiFlexItem as G, EuiSpacer as Jt, EuiEmptyPrompt as hn, EuiPageTemplate as ht, EuiRange as Kt, EuiBottomBar as yn } from "@elastic/eui";
9
- import { AddRegular as Ee, WindowDevToolsRegular as vn, ArrowUploadRegular as gn, ArrowDownloadRegular as bn, MoreHorizontalFilled as Xt, PlayRegular as Pn, DismissRegular as yt, DeleteRegular as Sn, ArrowShuffleFilled as wn, ArrowShuffleOffFilled as Tn, PreviousFilled as Rn, SkipBack10Regular as Zt, PauseFilled as Cn, PlayFilled as En, SkipForward30Regular as er, NextFilled as In, ArrowRepeat1Filled as xn, ArrowRepeatAllFilled as On, ArrowRepeatAllOffFilled as kn, OpenRegular as _n, Speaker2Regular as tr, TopSpeedRegular as An, NavigationPlayRegular as Fn } from "@fluentui/react-icons";
8
+ import { EuiSelectable as Jr, EuiPopoverTitle as Kr, EuiPopoverFooter as Xr, EuiButton as J, EuiPopover as ke, useGeneratedHtmlId as Zr, EuiModalHeaderTitle as en, EuiModalHeader as tn, EuiForm as rn, EuiFormRow as ut, EuiFieldText as Ft, EuiModalBody as nn, EuiModalFooter as an, EuiButtonEmpty as Ht, EuiModal as on, EuiCodeBlock as sn, EuiFlyout as ln, useEuiTheme as Gt, EuiCheckbox as Jt, EuiTableHeaderCellCheckbox as cn, EuiTableHeaderCell as ot, EuiTableHeader as un, EuiIcon as U, EuiContextMenu as mt, EuiButtonIcon as Y, EuiTableRowCell as dt, EuiTableRowCellCheckbox as dn, EuiLink as fn, EuiTableRow as pn, EuiTable as mn, EuiFlexGroup as le, EuiFlexItem as G, EuiSpacer as Kt, EuiEmptyPrompt as hn, EuiPageTemplate as ht, EuiRange as Xt, EuiBottomBar as yn } from "@elastic/eui";
9
+ import { AddRegular as Ee, WindowDevToolsRegular as vn, ArrowUploadRegular as gn, ArrowDownloadRegular as bn, MoreHorizontalFilled as Zt, PlayRegular as Pn, DismissRegular as yt, DeleteRegular as Sn, ArrowShuffleFilled as wn, ArrowShuffleOffFilled as Tn, PreviousFilled as Rn, SkipBack10Regular as er, PauseFilled as Cn, PlayFilled as En, SkipForward30Regular as tr, NextFilled as In, ArrowRepeat1Filled as xn, ArrowRepeatAllFilled as On, ArrowRepeatAllOffFilled as kn, OpenRegular as _n, Speaker2Regular as rr, TopSpeedRegular as An, NavigationPlayRegular as Fn } from "@fluentui/react-icons";
10
10
  import { observer as I } from "mobx-react-lite";
11
11
  import { ReactSortable as Mn } from "react-sortablejs";
12
12
  import { useRouter as Dn } from "@tanstack/react-router";
13
- const rr = 81;
13
+ const nr = 81;
14
14
  class We {
15
15
  makeObservable(e, r) {
16
- return zr(e, r);
16
+ return Lr(e, r);
17
17
  }
18
18
  }
19
19
  class Mi {
@@ -325,7 +325,7 @@ function $n() {
325
325
  } else
326
326
  bt.setExtraStackFrame(null);
327
327
  }
328
- function gr(n, l, d, v, T) {
328
+ function br(n, l, d, v, T) {
329
329
  {
330
330
  var E = Function.call.bind(we);
331
331
  for (var S in n)
@@ -344,17 +344,17 @@ function $n() {
344
344
  }
345
345
  }
346
346
  }
347
- var br = Array.isArray;
347
+ var Pr = Array.isArray;
348
348
  function tt(n) {
349
- return br(n);
349
+ return Pr(n);
350
350
  }
351
- function Pr(n) {
351
+ function Sr(n) {
352
352
  {
353
353
  var l = typeof Symbol == "function" && Symbol.toStringTag, d = l && n[Symbol.toStringTag] || n.constructor.name || "Object";
354
354
  return d;
355
355
  }
356
356
  }
357
- function Sr(n) {
357
+ function wr(n) {
358
358
  try {
359
359
  return Pt(n), !1;
360
360
  } catch {
@@ -365,16 +365,16 @@ function $n() {
365
365
  return "" + n;
366
366
  }
367
367
  function St(n) {
368
- if (Sr(n))
369
- return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pr(n)), Pt(n);
368
+ if (wr(n))
369
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Sr(n)), Pt(n);
370
370
  }
371
- var wt = q.ReactCurrentOwner, wr = {
371
+ var wt = q.ReactCurrentOwner, Tr = {
372
372
  key: !0,
373
373
  ref: !0,
374
374
  __self: !0,
375
375
  __source: !0
376
376
  }, Tt, Rt;
377
- function Tr(n) {
377
+ function Rr(n) {
378
378
  if (we.call(n, "ref")) {
379
379
  var l = Object.getOwnPropertyDescriptor(n, "ref").get;
380
380
  if (l && l.isReactWarning)
@@ -382,7 +382,7 @@ function $n() {
382
382
  }
383
383
  return n.ref !== void 0;
384
384
  }
385
- function Rr(n) {
385
+ function Cr(n) {
386
386
  if (we.call(n, "key")) {
387
387
  var l = Object.getOwnPropertyDescriptor(n, "key").get;
388
388
  if (l && l.isReactWarning)
@@ -390,10 +390,10 @@ function $n() {
390
390
  }
391
391
  return n.key !== void 0;
392
392
  }
393
- function Cr(n, l) {
393
+ function Er(n, l) {
394
394
  typeof n.ref == "string" && wt.current;
395
395
  }
396
- function Er(n, l) {
396
+ function Ir(n, l) {
397
397
  {
398
398
  var d = function() {
399
399
  Tt || (Tt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
@@ -404,7 +404,7 @@ function $n() {
404
404
  });
405
405
  }
406
406
  }
407
- function Ir(n, l) {
407
+ function xr(n, l) {
408
408
  {
409
409
  var d = function() {
410
410
  Rt || (Rt = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
@@ -415,7 +415,7 @@ function $n() {
415
415
  });
416
416
  }
417
417
  }
418
- var xr = function(n, l, d, v, T, E, S) {
418
+ var Or = function(n, l, d, v, T, E, S) {
419
419
  var b = {
420
420
  // This tag allows us to uniquely identify this as a React Element
421
421
  $$typeof: e,
@@ -444,12 +444,12 @@ function $n() {
444
444
  value: T
445
445
  }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
446
446
  };
447
- function Or(n, l, d, v, T) {
447
+ function kr(n, l, d, v, T) {
448
448
  {
449
449
  var E, S = {}, b = null, j = null;
450
- d !== void 0 && (St(d), b = "" + d), Rr(l) && (St(l.key), b = "" + l.key), Tr(l) && (j = l.ref, Cr(l, T));
450
+ d !== void 0 && (St(d), b = "" + d), Cr(l) && (St(l.key), b = "" + l.key), Rr(l) && (j = l.ref, Er(l, T));
451
451
  for (E in l)
452
- we.call(l, E) && !wr.hasOwnProperty(E) && (S[E] = l[E]);
452
+ we.call(l, E) && !Tr.hasOwnProperty(E) && (S[E] = l[E]);
453
453
  if (n && n.defaultProps) {
454
454
  var _ = n.defaultProps;
455
455
  for (E in _)
@@ -457,9 +457,9 @@ function $n() {
457
457
  }
458
458
  if (b || j) {
459
459
  var M = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
460
- b && Er(S, M), j && Ir(S, M);
460
+ b && Ir(S, M), j && xr(S, M);
461
461
  }
462
- return xr(n, b, j, T, v, wt.current, S);
462
+ return Or(n, b, j, T, v, wt.current, S);
463
463
  }
464
464
  }
465
465
  var rt = q.ReactCurrentOwner, Ct = q.ReactDebugCurrentFrame;
@@ -487,11 +487,11 @@ Check the render method of \`` + n + "`.";
487
487
  return "";
488
488
  }
489
489
  }
490
- function kr(n) {
490
+ function _r(n) {
491
491
  return "";
492
492
  }
493
493
  var It = {};
494
- function _r(n) {
494
+ function Ar(n) {
495
495
  {
496
496
  var l = Et();
497
497
  if (!l) {
@@ -508,7 +508,7 @@ Check the top-level render call using <` + d + ">.");
508
508
  if (!n._store || n._store.validated || n.key != null)
509
509
  return;
510
510
  n._store.validated = !0;
511
- var d = _r(l);
511
+ var d = Ar(l);
512
512
  if (It[d])
513
513
  return;
514
514
  It[d] = !0;
@@ -535,7 +535,7 @@ Check the top-level render call using <` + d + ">.");
535
535
  }
536
536
  }
537
537
  }
538
- function Ar(n) {
538
+ function Fr(n) {
539
539
  {
540
540
  var l = n.type;
541
541
  if (l == null || typeof l == "string")
@@ -551,7 +551,7 @@ Check the top-level render call using <` + d + ">.");
551
551
  return;
552
552
  if (d) {
553
553
  var v = K(l);
554
- gr(d, n.props, "prop", v, n);
554
+ br(d, n.props, "prop", v, n);
555
555
  } else if (l.PropTypes !== void 0 && !nt) {
556
556
  nt = !0;
557
557
  var T = K(l);
@@ -560,7 +560,7 @@ Check the top-level render call using <` + d + ">.");
560
560
  typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
561
  }
562
562
  }
563
- function Fr(n) {
563
+ function Mr(n) {
564
564
  {
565
565
  for (var l = Object.keys(n.props), d = 0; d < l.length; d++) {
566
566
  var v = l[d];
@@ -579,12 +579,12 @@ Check the top-level render call using <` + d + ">.");
579
579
  if (!S) {
580
580
  var b = "";
581
581
  (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
582
- var j = kr();
582
+ var j = _r();
583
583
  j ? b += j : b += Et();
584
584
  var _;
585
585
  n === null ? _ = "null" : tt(n) ? _ = "array" : n !== void 0 && n.$$typeof === e ? (_ = "<" + (K(n.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof n, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, b);
586
586
  }
587
- var M = Or(n, l, d, T, E);
587
+ var M = kr(n, l, d, T, E);
588
588
  if (M == null)
589
589
  return M;
590
590
  if (S) {
@@ -601,30 +601,30 @@ Check the top-level render call using <` + d + ">.");
601
601
  Ot(H, n);
602
602
  }
603
603
  if (we.call(l, "key")) {
604
- var oe = K(n), V = Object.keys(l).filter(function(jr) {
605
- return jr !== "key";
604
+ var oe = K(n), V = Object.keys(l).filter(function(zr) {
605
+ return zr !== "key";
606
606
  }), it = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}";
607
607
  if (!kt[oe + it]) {
608
- var Br = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}";
608
+ var jr = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}";
609
609
  x(`A props object containing a "key" prop is being spread into JSX:
610
610
  let props = %s;
611
611
  <%s {...props} />
612
612
  React keys must be passed directly to JSX without using spread:
613
613
  let props = %s;
614
- <%s key={someKey} {...props} />`, it, oe, Br, oe), kt[oe + it] = !0;
614
+ <%s key={someKey} {...props} />`, it, oe, jr, oe), kt[oe + it] = !0;
615
615
  }
616
616
  }
617
- return n === a ? Fr(M) : Ar(M), M;
617
+ return n === a ? Mr(M) : Fr(M), M;
618
618
  }
619
619
  }
620
- function Mr(n, l, d) {
620
+ function Dr(n, l, d) {
621
621
  return _t(n, l, d, !0);
622
622
  }
623
- function Dr(n, l, d) {
623
+ function Nr(n, l, d) {
624
624
  return _t(n, l, d, !1);
625
625
  }
626
- var Nr = Dr, $r = Mr;
627
- Re.Fragment = a, Re.jsx = Nr, Re.jsxs = $r;
626
+ var $r = Nr, Br = Dr;
627
+ Re.Fragment = a, Re.jsx = $r, Re.jsxs = Br;
628
628
  })()), Re;
629
629
  }
630
630
  var Nt;
@@ -860,7 +860,7 @@ function Vn(t, e, r) {
860
860
  t[i] !== void 0 ? e.push(t[i] + ";") : i && (a += i + " ");
861
861
  }), a;
862
862
  }
863
- var nr = function(e, r, a) {
863
+ var ar = function(e, r, a) {
864
864
  var i = e.key + "-" + r.name;
865
865
  // we only need to add the styles to the registered cache if the
866
866
  // class name could be used further down
@@ -873,7 +873,7 @@ var nr = function(e, r, a) {
873
873
  // also, note that this check will be dead code eliminated in the browser
874
874
  Qn === !1) && e.registered[i] === void 0 && (e.registered[i] = r.styles);
875
875
  }, Un = function(e, r, a) {
876
- nr(e, r, a);
876
+ ar(e, r, a);
877
877
  var i = e.key + "-" + r.name;
878
878
  if (e.inserted[r.name] === void 0) {
879
879
  var s = r;
@@ -957,12 +957,12 @@ function Hn(t) {
957
957
  return e[r] === void 0 && (e[r] = t(r)), e[r];
958
958
  };
959
959
  }
960
- var Gn = /[A-Z]|^ms/g, Jn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ar = function(e) {
960
+ var Gn = /[A-Z]|^ms/g, Jn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ir = function(e) {
961
961
  return e.charCodeAt(1) === 45;
962
962
  }, Lt = function(e) {
963
963
  return e != null && typeof e != "boolean";
964
964
  }, lt = /* @__PURE__ */ Hn(function(t) {
965
- return ar(t) ? t : t.replace(Gn, "-$&").toLowerCase();
965
+ return ir(t) ? t : t.replace(Gn, "-$&").toLowerCase();
966
966
  }), qt = function(e, r) {
967
967
  switch (e) {
968
968
  case "animation":
@@ -976,7 +976,7 @@ var Gn = /[A-Z]|^ms/g, Jn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ar = function(e) {
976
976
  }, i;
977
977
  });
978
978
  }
979
- return Wn[e] !== 1 && !ar(e) && typeof r == "number" && r !== 0 ? r + "px" : r;
979
+ return Wn[e] !== 1 && !ir(e) && typeof r == "number" && r !== 0 ? r + "px" : r;
980
980
  };
981
981
  function xe(t, e, r) {
982
982
  if (r == null)
@@ -1080,7 +1080,7 @@ function Xn(t, e, r) {
1080
1080
  }
1081
1081
  var Zn = function(e) {
1082
1082
  return e();
1083
- }, ea = re.useInsertionEffect ? re.useInsertionEffect : !1, ta = ea || Zn, ir = /* @__PURE__ */ re.createContext(
1083
+ }, ea = re.useInsertionEffect ? re.useInsertionEffect : !1, ta = ea || Zn, or = /* @__PURE__ */ re.createContext(
1084
1084
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1085
1085
  // because this module is primarily intended for the browser and node
1086
1086
  // but it's also required in react native and similar environments sometimes
@@ -1091,20 +1091,20 @@ var Zn = function(e) {
1091
1091
  key: "css"
1092
1092
  }) : null
1093
1093
  );
1094
- ir.Provider;
1094
+ or.Provider;
1095
1095
  var ra = function(e) {
1096
- return /* @__PURE__ */ qr(function(r, a) {
1097
- var i = Oe(ir);
1096
+ return /* @__PURE__ */ Qr(function(r, a) {
1097
+ var i = Oe(or);
1098
1098
  return e(r, i, a);
1099
1099
  });
1100
- }, na = /* @__PURE__ */ re.createContext({}), He = {}.hasOwnProperty, ft = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", or = function(e, r) {
1100
+ }, na = /* @__PURE__ */ re.createContext({}), He = {}.hasOwnProperty, ft = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", sr = function(e, r) {
1101
1101
  var a = {};
1102
1102
  for (var i in r)
1103
1103
  He.call(r, i) && (a[i] = r[i]);
1104
1104
  return a[ft] = e, a;
1105
1105
  }, aa = function(e) {
1106
1106
  var r = e.cache, a = e.serialized, i = e.isStringTag;
1107
- return nr(r, a, i), ta(function() {
1107
+ return ar(r, a, i), ta(function() {
1108
1108
  return Un(r, a, i);
1109
1109
  }), null;
1110
1110
  }, ia = /* @__PURE__ */ ra(function(t, e, r) {
@@ -1122,10 +1122,10 @@ var ra = function(e) {
1122
1122
  serialized: f,
1123
1123
  isStringTag: typeof i == "string"
1124
1124
  }), /* @__PURE__ */ re.createElement(i, p));
1125
- }), sr = ia, _e = Ie.Fragment, o = function(e, r, a) {
1126
- return He.call(r, "css") ? Ie.jsx(sr, or(e, r), a) : Ie.jsx(e, r, a);
1125
+ }), lr = ia, _e = Ie.Fragment, o = function(e, r, a) {
1126
+ return He.call(r, "css") ? Ie.jsx(lr, sr(e, r), a) : Ie.jsx(e, r, a);
1127
1127
  }, D = function(e, r, a) {
1128
- return He.call(r, "css") ? Ie.jsxs(sr, or(e, r), a) : Ie.jsxs(e, r, a);
1128
+ return He.call(r, "css") ? Ie.jsxs(lr, sr(e, r), a) : Ie.jsxs(e, r, a);
1129
1129
  };
1130
1130
  const oa = ({
1131
1131
  components: t = [],
@@ -1133,7 +1133,7 @@ const oa = ({
1133
1133
  }) => /* @__PURE__ */ o(_e, { children: t.reduceRight(
1134
1134
  (r, a) => /* @__PURE__ */ o(a, { children: r }),
1135
1135
  e
1136
- ) }), lr = Ue(void 0), Ge = () => Oe(lr), ct = new Ur({
1136
+ ) }), cr = Ue(void 0), Ge = () => Oe(cr), ct = new Ur({
1137
1137
  coerceTypes: !0
1138
1138
  });
1139
1139
  function sa(t, e) {
@@ -1303,7 +1303,6 @@ class Ve {
1303
1303
  class ua {
1304
1304
  constructor(e) {
1305
1305
  this.observableStateProvider = e, e.makeObservable(this, {
1306
- interacted: Z,
1307
1306
  items: Z,
1308
1307
  currentId: Z,
1309
1308
  repeat: Z,
@@ -1327,7 +1326,6 @@ class ua {
1327
1326
  canPlaySelectedItemsNext: g,
1328
1327
  canRemoveSelectedItems: g,
1329
1328
  setItems: m,
1330
- interact: m,
1331
1329
  clear: m.bound,
1332
1330
  unselectAll: m,
1333
1331
  selectAll: m,
@@ -1351,7 +1349,6 @@ class ua {
1351
1349
  next: m.bound
1352
1350
  });
1353
1351
  }
1354
- interacted = !1;
1355
1352
  items = [];
1356
1353
  currentId;
1357
1354
  repeat = O.Off;
@@ -1439,11 +1436,8 @@ class ua {
1439
1436
  setItems(e) {
1440
1437
  this.items = e;
1441
1438
  }
1442
- interact() {
1443
- this.interacted = !0;
1444
- }
1445
1439
  clear() {
1446
- this.interact(), this.currentIndex = void 0, this.items = [];
1440
+ this.currentIndex = void 0, this.items = [];
1447
1441
  }
1448
1442
  unselectAll() {
1449
1443
  for (const e of this.items)
@@ -1454,7 +1448,7 @@ class ua {
1454
1448
  e.select();
1455
1449
  }
1456
1450
  setCurrentItem(e) {
1457
- this.interact(), this.currentId = e?.id;
1451
+ this.currentId = e?.id;
1458
1452
  }
1459
1453
  setNextItems(e) {
1460
1454
  this.currentIndex !== void 0 && this.items.splice(this.currentIndex + 1, 0, ...e);
@@ -1492,7 +1486,7 @@ class ua {
1492
1486
  return;
1493
1487
  }
1494
1488
  const { currentIndex: r } = this;
1495
- r !== void 0 && (this.interact(), this.items.splice(r, 0, ...e), this.currentIndex = r);
1489
+ r !== void 0 && (this.items.splice(r, 0, ...e), this.currentIndex = r);
1496
1490
  }
1497
1491
  moveItem(e, r) {
1498
1492
  const a = this.items.splice(this.items.indexOf(e), 1)[0];
@@ -1508,7 +1502,7 @@ class ua {
1508
1502
  At(
1509
1503
  this.items,
1510
1504
  e.find((s) => s === r)
1511
- ), this.currentItem !== r && (this.interact(), i ? await this.goToFirst() : this.currentIndex = a);
1505
+ ), this.currentItem !== r && (i ? await this.goToFirst() : this.currentIndex = a);
1512
1506
  }
1513
1507
  async removeSelectedItems() {
1514
1508
  await this.removeItems(this.selectedItemsOrAllItems), this.unselectAll();
@@ -1542,10 +1536,10 @@ class ua {
1542
1536
  this.shuffle = !this.shuffle;
1543
1537
  }
1544
1538
  async previous() {
1545
- this.currentIndex !== void 0 && this.hasPreviousItem && (this.interact(), this.currentIndex--);
1539
+ this.currentIndex !== void 0 && this.hasPreviousItem && this.currentIndex--;
1546
1540
  }
1547
1541
  async next() {
1548
- this.currentIndex !== void 0 && this.hasNextItem && (this.interact(), this.currentIndex++);
1542
+ this.currentIndex !== void 0 && this.hasNextItem && this.currentIndex++;
1549
1543
  }
1550
1544
  }
1551
1545
  const da = ({
@@ -1554,13 +1548,13 @@ const da = ({
1554
1548
  const [e] = $(
1555
1549
  () => new ua(new We())
1556
1550
  ), r = ce();
1557
- return Yt(() => Lr(
1551
+ return Yt(() => qr(
1558
1552
  () => e.currentItem,
1559
1553
  async (a, i) => {
1560
1554
  a === void 0 || i === void 0 || a.type === i.type && a.videoId === i.videoId && await r.setCurrentTime(0);
1561
1555
  }
1562
- ), [e, r]), /* @__PURE__ */ o(lr.Provider, { value: e, children: t });
1563
- }, cr = Ue(void 0), ur = () => Oe(cr);
1556
+ ), [e, r]), /* @__PURE__ */ o(cr.Provider, { value: e, children: t });
1557
+ }, ur = Ue(void 0), dr = () => Oe(ur);
1564
1558
  class fa {
1565
1559
  controller = Yr;
1566
1560
  playing = !1;
@@ -1613,8 +1607,8 @@ const pa = ({
1613
1607
  const [e] = $(
1614
1608
  () => new fa(new We())
1615
1609
  );
1616
- return /* @__PURE__ */ o(cr.Provider, { value: e, children: t });
1617
- }, dr = Ue(void 0), z = () => Oe(dr);
1610
+ return /* @__PURE__ */ o(ur.Provider, { value: e, children: t });
1611
+ }, fr = Ue(void 0), z = () => Oe(fr);
1618
1612
  class ma {
1619
1613
  constructor(e, r, a) {
1620
1614
  this.player = r, this.playQueue = a, e.makeObservable(this, {
@@ -1738,20 +1732,22 @@ class ma {
1738
1732
  const ha = ({
1739
1733
  children: t
1740
1734
  }) => {
1741
- const e = ur(), r = Ge(), [a] = $(
1735
+ const e = dr(), r = Ge(), [a] = $(
1742
1736
  () => new ma(
1743
1737
  new We(),
1744
1738
  e,
1745
1739
  r
1746
1740
  )
1747
1741
  );
1748
- return /* @__PURE__ */ o(dr.Provider, { value: a, children: t });
1749
- }, fr = Ue(void 0), ya = () => Oe(fr);
1742
+ return /* @__PURE__ */ o(fr.Provider, { value: a, children: t });
1743
+ }, pr = Ue(void 0), ya = () => Oe(pr);
1750
1744
  class va {
1751
1745
  constructor(e, r, a) {
1752
1746
  this.player = r, this.playQueue = a, e.makeObservable(this, {
1747
+ interacted: Z,
1753
1748
  controller: g,
1754
1749
  currentItem: g,
1750
+ interact: m.bound,
1755
1751
  onLoaded: m.bound,
1756
1752
  onPlay: m.bound,
1757
1753
  onPause: m.bound,
@@ -1760,14 +1756,18 @@ class va {
1760
1756
  onControllerChange: m.bound
1761
1757
  });
1762
1758
  }
1759
+ interacted = !1;
1763
1760
  get controller() {
1764
1761
  return this.player.controller;
1765
1762
  }
1766
1763
  get currentItem() {
1767
1764
  return this.playQueue.currentItem;
1768
1765
  }
1766
+ interact() {
1767
+ this.interacted = !0;
1768
+ }
1769
1769
  async onLoaded() {
1770
- this.playQueue.interacted && await this.controller.play();
1770
+ this.interacted && await this.controller.play();
1771
1771
  }
1772
1772
  onPlay() {
1773
1773
  this.player.onPlay();
@@ -1806,14 +1806,14 @@ class va {
1806
1806
  const ga = ({
1807
1807
  children: t
1808
1808
  }) => {
1809
- const e = ur(), r = Ge(), [a] = $(
1809
+ const e = dr(), r = Ge(), [a] = $(
1810
1810
  () => new va(
1811
1811
  new We(),
1812
1812
  e,
1813
1813
  r
1814
1814
  )
1815
1815
  );
1816
- return /* @__PURE__ */ o(fr.Provider, { value: a, children: t });
1816
+ return /* @__PURE__ */ o(pr.Provider, { value: a, children: t });
1817
1817
  }, Di = ({
1818
1818
  children: t,
1819
1819
  nostalgicDivaProps: e
@@ -1833,7 +1833,7 @@ const ga = ({
1833
1833
  enablePlaylists: process.env.NODE_ENV !== "production"
1834
1834
  }
1835
1835
  }, Pa = "http://localhost".replace(/\/+$/, "");
1836
- class pr {
1836
+ class mr {
1837
1837
  constructor(e = {}) {
1838
1838
  this.configuration = e;
1839
1839
  }
@@ -1850,7 +1850,7 @@ class pr {
1850
1850
  return this.configuration.middleware || [];
1851
1851
  }
1852
1852
  get queryParamsStringify() {
1853
- return this.configuration.queryParamsStringify || mr;
1853
+ return this.configuration.queryParamsStringify || hr;
1854
1854
  }
1855
1855
  get username() {
1856
1856
  return this.configuration.username;
@@ -1875,7 +1875,7 @@ class pr {
1875
1875
  return this.configuration.credentials;
1876
1876
  }
1877
1877
  }
1878
- const Sa = new pr();
1878
+ const Sa = new mr();
1879
1879
  class vt {
1880
1880
  constructor(e = Sa) {
1881
1881
  this.configuration = e, this.middleware = e.middleware;
@@ -2002,10 +2002,10 @@ class Ce extends Error {
2002
2002
  }
2003
2003
  name = "RequiredError";
2004
2004
  }
2005
- function mr(t, e = "") {
2006
- return Object.keys(t).map((r) => hr(r, t[r], e)).filter((r) => r.length > 0).join("&");
2005
+ function hr(t, e = "") {
2006
+ return Object.keys(t).map((r) => yr(r, t[r], e)).filter((r) => r.length > 0).join("&");
2007
2007
  }
2008
- function hr(t, e, r = "") {
2008
+ function yr(t, e, r = "") {
2009
2009
  const a = r + (r.length ? `[${t}]` : t);
2010
2010
  if (e instanceof Array) {
2011
2011
  const i = e.map((s) => encodeURIComponent(String(s))).join(`&${encodeURIComponent(a)}=`);
@@ -2013,9 +2013,9 @@ function hr(t, e, r = "") {
2013
2013
  }
2014
2014
  if (e instanceof Set) {
2015
2015
  const i = Array.from(e);
2016
- return hr(t, i, r);
2016
+ return yr(t, i, r);
2017
2017
  }
2018
- return e instanceof Date ? `${encodeURIComponent(a)}=${encodeURIComponent(e.toISOString())}` : e instanceof Object ? mr(e, a) : `${encodeURIComponent(a)}=${encodeURIComponent(String(e))}`;
2018
+ return e instanceof Date ? `${encodeURIComponent(a)}=${encodeURIComponent(e.toISOString())}` : e instanceof Object ? hr(e, a) : `${encodeURIComponent(a)}=${encodeURIComponent(String(e))}`;
2019
2019
  }
2020
2020
  class se {
2021
2021
  constructor(e, r = (a) => a) {
@@ -2025,7 +2025,7 @@ class se {
2025
2025
  return this.transformer(await this.raw.json());
2026
2026
  }
2027
2027
  }
2028
- function yr(t) {
2028
+ function vr(t) {
2029
2029
  return Ea(t);
2030
2030
  }
2031
2031
  function Ea(t, e) {
@@ -2039,7 +2039,7 @@ function Ia(t) {
2039
2039
  }
2040
2040
  function xa(t, e) {
2041
2041
  return t == null ? t : {
2042
- playlist: yr(t.playlist)
2042
+ playlist: vr(t.playlist)
2043
2043
  };
2044
2044
  }
2045
2045
  function Oa(t) {
@@ -2047,7 +2047,7 @@ function Oa(t) {
2047
2047
  }
2048
2048
  function ka(t, e) {
2049
2049
  return t == null ? t : {
2050
- items: t.items.map(yr)
2050
+ items: t.items.map(vr)
2051
2051
  };
2052
2052
  }
2053
2053
  function _a(t) {
@@ -2245,7 +2245,7 @@ class ja extends vt {
2245
2245
  return await (await this.mediaPlayerPlaylistsPostRaw(e, r)).value();
2246
2246
  }
2247
2247
  }
2248
- const za = new pr({
2248
+ const za = new mr({
2249
2249
  basePath: new URL("api", window.location.origin).toString()
2250
2250
  }), La = new ja(
2251
2251
  za
@@ -2343,7 +2343,7 @@ const za = new pr({
2343
2343
  }
2344
2344
  ) }),
2345
2345
  /* @__PURE__ */ D(an, { children: [
2346
- /* @__PURE__ */ o(Wt, { onClick: t, children: "Cancel" }),
2346
+ /* @__PURE__ */ o(Ht, { onClick: t, children: "Cancel" }),
2347
2347
  /* @__PURE__ */ o(
2348
2348
  J,
2349
2349
  {
@@ -2422,7 +2422,7 @@ I(
2422
2422
  ] });
2423
2423
  }
2424
2424
  );
2425
- const vr = {
2425
+ const gr = {
2426
2426
  Audio: "",
2427
2427
  Dailymotion: "https://www.dailymotion.com/favicon.ico",
2428
2428
  Niconico: "https://www.nicovideo.jp/favicon.ico",
@@ -2432,7 +2432,7 @@ const vr = {
2432
2432
  YouTube: "https://www.youtube.com/favicon.ico"
2433
2433
  }, Va = I(
2434
2434
  ({ playQueue: t }) => {
2435
- const { euiTheme: e } = Ht();
2435
+ const { euiTheme: e } = Gt();
2436
2436
  return /* @__PURE__ */ D(
2437
2437
  un,
2438
2438
  {
@@ -2444,7 +2444,7 @@ const vr = {
2444
2444
  },
2445
2445
  children: [
2446
2446
  /* @__PURE__ */ o(cn, { children: /* @__PURE__ */ o(
2447
- Gt,
2447
+ Jt,
2448
2448
  {
2449
2449
  id: "",
2450
2450
  checked: t.allItemsSelected,
@@ -2547,7 +2547,7 @@ const vr = {
2547
2547
  {
2548
2548
  title: "More options",
2549
2549
  "aria-label": "More options",
2550
- iconType: Xt,
2550
+ iconType: Zt,
2551
2551
  size: "s",
2552
2552
  color: "text",
2553
2553
  onClick: a
@@ -2599,7 +2599,7 @@ const vr = {
2599
2599
  const e = ce();
2600
2600
  return /* @__PURE__ */ D(pn, { isSelected: t.isCurrent, children: [
2601
2601
  /* @__PURE__ */ o(dn, { children: /* @__PURE__ */ o(
2602
- Gt,
2602
+ Jt,
2603
2603
  {
2604
2604
  id: t.id.toString(),
2605
2605
  checked: t.isSelected,
@@ -2609,7 +2609,7 @@ const vr = {
2609
2609
  /* @__PURE__ */ o(dt, { textOnly: !1, children: /* @__PURE__ */ o(
2610
2610
  "img",
2611
2611
  {
2612
- src: vr[t.type],
2612
+ src: gr[t.type],
2613
2613
  width: 16,
2614
2614
  height: 16,
2615
2615
  alt: t.type
@@ -2659,7 +2659,7 @@ const Xa = I(
2659
2659
  )
2660
2660
  ), Za = I(
2661
2661
  ({ playQueue: t }) => {
2662
- const { euiTheme: e } = Ht(), r = B(async () => {
2662
+ const { euiTheme: e } = Gt(), r = B(async () => {
2663
2663
  }, []), a = B(
2664
2664
  async (i) => {
2665
2665
  const s = Hr(i.url);
@@ -2738,7 +2738,7 @@ const Xa = I(
2738
2738
  }
2739
2739
  ),
2740
2740
  /* @__PURE__ */ o(
2741
- Jt,
2741
+ Kt,
2742
2742
  {
2743
2743
  size: "l",
2744
2744
  style: {
@@ -2838,7 +2838,7 @@ const Xa = I(
2838
2838
  {
2839
2839
  title: "Skip back 10 seconds",
2840
2840
  "aria-label": "Skip back 10 seconds",
2841
- iconType: Zt,
2841
+ iconType: er,
2842
2842
  size: "s",
2843
2843
  iconSize: "l",
2844
2844
  onClick: t.skipBack10,
@@ -2880,7 +2880,7 @@ const Xa = I(
2880
2880
  {
2881
2881
  title: "Skip forward 30 seconds",
2882
2882
  "aria-label": "Skip forward 30 seconds",
2883
- iconType: er,
2883
+ iconType: tr,
2884
2884
  size: "s",
2885
2885
  iconSize: "l",
2886
2886
  onClick: t.skipForward30,
@@ -2985,9 +2985,9 @@ const Xa = I(
2985
2985
  ke,
2986
2986
  {
2987
2987
  button: /* @__PURE__ */ o(
2988
- Wt,
2988
+ Ht,
2989
2989
  {
2990
- iconType: vr[t.type],
2990
+ iconType: gr[t.type],
2991
2991
  size: "s",
2992
2992
  onClick: a,
2993
2993
  children: t.title
@@ -3026,7 +3026,7 @@ const Xa = I(
3026
3026
  {
3027
3027
  title: "Mute",
3028
3028
  "aria-label": "Mute",
3029
- iconType: tr,
3029
+ iconType: rr,
3030
3030
  size: "s",
3031
3031
  iconSize: "l",
3032
3032
  disabled: !t.controller.supports("setMuted")
@@ -3035,7 +3035,7 @@ const Xa = I(
3035
3035
  }), hi = I(
3036
3036
  ({ button: t, isOpen: e, closePopover: r }) => {
3037
3037
  const a = z(), [i, s] = $("0"), c = ce();
3038
- Qr(() => {
3038
+ Wt(() => {
3039
3039
  e && c.getVolume().then((p) => {
3040
3040
  p !== void 0 && s(Math.floor(p * 100).toString());
3041
3041
  });
@@ -3063,7 +3063,7 @@ const Xa = I(
3063
3063
  children: [
3064
3064
  /* @__PURE__ */ o(mi, {}),
3065
3065
  /* @__PURE__ */ o(
3066
- Kt,
3066
+ Xt,
3067
3067
  {
3068
3068
  min: 0,
3069
3069
  max: 100,
@@ -3090,7 +3090,7 @@ const Xa = I(
3090
3090
  {
3091
3091
  title: "Volume",
3092
3092
  "aria-label": "Volume",
3093
- iconType: tr,
3093
+ iconType: rr,
3094
3094
  size: "s",
3095
3095
  iconSize: "l",
3096
3096
  onClick: () => r(!e),
@@ -3144,13 +3144,13 @@ const Xa = I(
3144
3144
  },
3145
3145
  {
3146
3146
  name: "Skip back 10 seconds",
3147
- icon: /* @__PURE__ */ o(U, { type: Zt }),
3147
+ icon: /* @__PURE__ */ o(U, { type: er }),
3148
3148
  onClick: a,
3149
3149
  disabled: !e.canSkipBack10
3150
3150
  },
3151
3151
  {
3152
3152
  name: "Skip forward 30 seconds",
3153
- icon: /* @__PURE__ */ o(U, { type: er }),
3153
+ icon: /* @__PURE__ */ o(U, { type: tr }),
3154
3154
  onClick: i,
3155
3155
  disabled: !e.canSkipForward30
3156
3156
  },
@@ -3218,7 +3218,7 @@ const Xa = I(
3218
3218
  {
3219
3219
  title: "More options",
3220
3220
  "aria-label": "More options",
3221
- iconType: Xt,
3221
+ iconType: Zt,
3222
3222
  size: "s",
3223
3223
  iconSize: "l",
3224
3224
  onClick: () => e(!t)
@@ -3272,7 +3272,7 @@ const Xa = I(
3272
3272
  [t, e]
3273
3273
  );
3274
3274
  return /* @__PURE__ */ o(
3275
- Kt,
3275
+ Xt,
3276
3276
  {
3277
3277
  min: 0,
3278
3278
  max: 100,
@@ -3315,13 +3315,15 @@ const Xa = I(
3315
3315
  }),
3316
3316
  [t]
3317
3317
  );
3318
- return /* @__PURE__ */ o(
3318
+ return Wt(() => (window.addEventListener("click", t.interact, { once: !0 }), () => {
3319
+ window.removeEventListener("click", t.interact);
3320
+ }), [t]), /* @__PURE__ */ o(
3319
3321
  "div",
3320
3322
  {
3321
3323
  css: {
3322
3324
  position: "fixed",
3323
3325
  right: 0,
3324
- bottom: rr,
3326
+ bottom: nr,
3325
3327
  width: pt.width,
3326
3328
  height: pt.height,
3327
3329
  zIndex: 998,
@@ -3347,11 +3349,11 @@ const Xa = I(
3347
3349
  {
3348
3350
  panelled: !0,
3349
3351
  style: {
3350
- minBlockSize: `max(460px, 100vh - ${rr}px)`
3352
+ minBlockSize: `max(460px, 100vh - ${nr}px)`
3351
3353
  },
3352
3354
  children: [
3353
3355
  t,
3354
- !e.isEmpty && /* @__PURE__ */ o(Jt, { style: { blockSize: pt.height } })
3356
+ !e.isEmpty && /* @__PURE__ */ o(Kt, { style: { blockSize: pt.height } })
3355
3357
  ]
3356
3358
  }
3357
3359
  );
@@ -3365,10 +3367,10 @@ export {
3365
3367
  We as MobXObservableStateProvider,
3366
3368
  Mi as ObservableStateProvider,
3367
3369
  Za as PlayQueue,
3368
- lr as PlayQueueContext,
3370
+ cr as PlayQueueContext,
3369
3371
  Ni as PlayQueuePage,
3370
3372
  O as RepeatMode,
3371
- rr as bottomBarHeight,
3373
+ nr as bottomBarHeight,
3372
3374
  Ge as usePlayQueue
3373
3375
  };
3374
3376
  //# sourceMappingURL=index.es.js.map