@designcombo/state 0.1.25 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var fi = Object.defineProperty;
2
2
  var pi = (t, r, n) => r in t ? fi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
3
3
  var Ot = (t, r, n) => pi(t, typeof r != "symbol" ? r + "" : r, n);
4
- import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i, DESIGN_RESIZE as vi, HISTORY_UNDO as Ii, HISTORY_REDO as Si, LAYER_DELETE as wi, ADD_CAPTION as Ti, ADD_TEXT as ki, ADD_IMAGE as Ei, ADD_AUDIO as Ai, ADD_VIDEO as Oi, ACTIVE_SPLIT as xi, ACTIVE_CLONE as Mi, ACTIVE_PASTE as Pi, EDIT_OBJECT as Di } from "@designcombo/events";
4
+ import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i, DESIGN_RESIZE as vi, HISTORY_UNDO as Ii, HISTORY_REDO as Si, LAYER_DELETE as wi, ADD_CAPTION as Ti, ADD_TEXT as ki, ADD_IMAGE as Ei, ADD_AUDIO as Ai, ADD_VIDEO as Oi, ACTIVE_SPLIT as Mi, ACTIVE_CLONE as xi, ACTIVE_PASTE as Pi, EDIT_OBJECT as Di } from "@designcombo/events";
5
5
  var nn = function(t, r) {
6
6
  return nn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
7
7
  n.__proto__ = i;
@@ -9,7 +9,7 @@ var nn = function(t, r) {
9
9
  for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
10
10
  }, nn(t, r);
11
11
  };
12
- function be(t, r) {
12
+ function ge(t, r) {
13
13
  if (typeof r != "function" && r !== null)
14
14
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
15
15
  nn(t, r);
@@ -86,25 +86,25 @@ var tr = function() {
86
86
  if (f)
87
87
  if (this._parentage = null, Array.isArray(f))
88
88
  try {
89
- for (var d = an(f), x = d.next(); !x.done; x = d.next()) {
90
- var F = x.value;
89
+ for (var d = an(f), M = d.next(); !M.done; M = d.next()) {
90
+ var F = M.value;
91
91
  F.remove(this);
92
92
  }
93
93
  } catch (l) {
94
94
  r = { error: l };
95
95
  } finally {
96
96
  try {
97
- x && !x.done && (n = d.return) && n.call(d);
97
+ M && !M.done && (n = d.return) && n.call(d);
98
98
  } finally {
99
99
  if (r) throw r.error;
100
100
  }
101
101
  }
102
102
  else
103
103
  f.remove(this);
104
- var k = this.initialTeardown;
105
- if (mt(k))
104
+ var E = this.initialTeardown;
105
+ if (mt(E))
106
106
  try {
107
- k();
107
+ E();
108
108
  } catch (l) {
109
109
  c = l instanceof Zr ? l.errors : [l];
110
110
  }
@@ -112,7 +112,7 @@ var tr = function() {
112
112
  if (H) {
113
113
  this._finalizers = null;
114
114
  try {
115
- for (var m = an(H), p = m.next(); !p.done; p = m.next()) {
115
+ for (var b = an(H), p = b.next(); !p.done; p = b.next()) {
116
116
  var h = p.value;
117
117
  try {
118
118
  kn(h);
@@ -124,7 +124,7 @@ var tr = function() {
124
124
  i = { error: l };
125
125
  } finally {
126
126
  try {
127
- p && !p.done && (s = m.return) && s.call(m);
127
+ p && !p.done && (s = b.return) && s.call(b);
128
128
  } finally {
129
129
  if (i) throw i.error;
130
130
  }
@@ -198,7 +198,7 @@ function Xe(t) {
198
198
  t();
199
199
  }
200
200
  var Zn = function(t) {
201
- be(r, t);
201
+ ge(r, t);
202
202
  function r(n) {
203
203
  var i = t.call(this) || this;
204
204
  return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination = zi, i;
@@ -242,7 +242,7 @@ var Ri = function() {
242
242
  try {
243
243
  n.next(r);
244
244
  } catch (i) {
245
- Ye(i);
245
+ Ve(i);
246
246
  }
247
247
  }, t.prototype.error = function(r) {
248
248
  var n = this.partialObserver;
@@ -250,21 +250,21 @@ var Ri = function() {
250
250
  try {
251
251
  n.error(r);
252
252
  } catch (i) {
253
- Ye(i);
253
+ Ve(i);
254
254
  }
255
255
  else
256
- Ye(r);
256
+ Ve(r);
257
257
  }, t.prototype.complete = function() {
258
258
  var r = this.partialObserver;
259
259
  if (r.complete)
260
260
  try {
261
261
  r.complete();
262
262
  } catch (n) {
263
- Ye(n);
263
+ Ve(n);
264
264
  }
265
265
  }, t;
266
266
  }(), un = function(t) {
267
- be(r, t);
267
+ ge(r, t);
268
268
  function r(n, i, s) {
269
269
  var c = t.call(this) || this, f;
270
270
  if (mt(n) || !n)
@@ -287,7 +287,7 @@ var Ri = function() {
287
287
  }
288
288
  return r;
289
289
  }(Zn);
290
- function Ye(t) {
290
+ function Ve(t) {
291
291
  Ci(t);
292
292
  }
293
293
  function Fi(t) {
@@ -321,8 +321,8 @@ var An = function() {
321
321
  }, t.prototype.subscribe = function(r, n, i) {
322
322
  var s = this, c = Gi(r) ? r : new un(r, n, i);
323
323
  return Xe(function() {
324
- var f = s, d = f.operator, x = f.source;
325
- c.add(d ? d.call(c, x) : x ? s._subscribe(c) : s._trySubscribe(c));
324
+ var f = s, d = f.operator, M = f.source;
325
+ c.add(d ? d.call(c, M) : M ? s._subscribe(c) : s._trySubscribe(c));
326
326
  }), c;
327
327
  }, t.prototype._trySubscribe = function(r) {
328
328
  try {
@@ -337,8 +337,8 @@ var An = function() {
337
337
  next: function(d) {
338
338
  try {
339
339
  r(d);
340
- } catch (x) {
341
- c(x), f.unsubscribe();
340
+ } catch (M) {
341
+ c(M), f.unsubscribe();
342
342
  }
343
343
  },
344
344
  error: c,
@@ -386,13 +386,13 @@ var Wi = Yn(function(t) {
386
386
  t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
387
387
  };
388
388
  }), Qn = function(t) {
389
- be(r, t);
389
+ ge(r, t);
390
390
  function r() {
391
391
  var n = t.call(this) || this;
392
392
  return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
393
393
  }
394
394
  return r.prototype.lift = function(n) {
395
- var i = new xn(this, this);
395
+ var i = new Mn(this, this);
396
396
  return i.operator = n, i;
397
397
  }, r.prototype._throwIfClosed = function() {
398
398
  if (this.closed)
@@ -405,8 +405,8 @@ var Wi = Yn(function(t) {
405
405
  i.currentObservers || (i.currentObservers = Array.from(i.observers));
406
406
  try {
407
407
  for (var f = an(i.currentObservers), d = f.next(); !d.done; d = f.next()) {
408
- var x = d.value;
409
- x.next(n);
408
+ var M = d.value;
409
+ M.next(n);
410
410
  }
411
411
  } catch (F) {
412
412
  s = { error: F };
@@ -462,10 +462,10 @@ var Wi = Yn(function(t) {
462
462
  var n = new An();
463
463
  return n.source = this, n;
464
464
  }, r.create = function(n, i) {
465
- return new xn(n, i);
465
+ return new Mn(n, i);
466
466
  }, r;
467
- }(An), xn = function(t) {
468
- be(r, t);
467
+ }(An), Mn = function(t) {
468
+ ge(r, t);
469
469
  function r(n, i) {
470
470
  var s = t.call(this) || this;
471
471
  return s.destination = n, s.source = i, s;
@@ -483,8 +483,8 @@ var Wi = Yn(function(t) {
483
483
  var i, s;
484
484
  return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Vn;
485
485
  }, r;
486
- }(Qn), Mn = function(t) {
487
- be(r, t);
486
+ }(Qn), xn = function(t) {
487
+ ge(r, t);
488
488
  function r(n) {
489
489
  var i = t.call(this) || this;
490
490
  return i._value = n, i;
@@ -513,27 +513,27 @@ function bn(t) {
513
513
  var qe = { exports: {} };
514
514
  qe.exports;
515
515
  (function(t, r) {
516
- var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", k = "[object Boolean]", H = "[object Date]", m = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", b = "[object Number]", v = "[object Null]", _ = "[object Object]", y = "[object Promise]", g = "[object Proxy]", j = "[object RegExp]", O = "[object Set]", I = "[object String]", P = "[object Symbol]", S = "[object Undefined]", T = "[object WeakMap]", E = "[object ArrayBuffer]", M = "[object DataView]", $ = "[object Float32Array]", bt = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, N = {};
517
- N[$] = N[bt] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[x] = N[E] = N[k] = N[M] = N[H] = N[m] = N[p] = N[l] = N[b] = N[_] = N[j] = N[O] = N[I] = N[T] = !1;
518
- var we = typeof nt == "object" && nt && nt.Object === Object && nt, lr = typeof self == "object" && self && self.Object === Object && self, at = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ee = function() {
516
+ var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", M = "[object Array]", F = "[object AsyncFunction]", E = "[object Boolean]", H = "[object Date]", b = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", y = "[object Number]", v = "[object Null]", _ = "[object Object]", m = "[object Promise]", g = "[object Proxy]", C = "[object RegExp]", O = "[object Set]", I = "[object String]", x = "[object Symbol]", S = "[object Undefined]", j = "[object WeakMap]", k = "[object ArrayBuffer]", T = "[object DataView]", U = "[object Float32Array]", bt = "[object Float64Array]", Se = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, we = /^(?:0|[1-9]\d*)$/, N = {};
517
+ N[U] = N[bt] = N[Se] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[M] = N[k] = N[E] = N[T] = N[H] = N[b] = N[p] = N[l] = N[y] = N[_] = N[C] = N[O] = N[I] = N[j] = !1;
518
+ var Te = typeof nt == "object" && nt && nt.Object === Object && nt, lr = typeof self == "object" && self && self.Object === Object && self, at = Te || lr || Function("return this")(), ke = r && !r.nodeType && r, Ee = ke && !0 && t && !t.nodeType && t, Vt = Ee && Ee.exports === ke, Xt = Vt && Te.process, Ae = function() {
519
519
  try {
520
- return Vt && Vt.binding && Vt.binding("util");
520
+ return Xt && Xt.binding && Xt.binding("util");
521
521
  } catch {
522
522
  }
523
- }(), Xt = Ee && Ee.isTypedArray;
524
- function Ae(e, a) {
523
+ }(), qt = Ae && Ae.isTypedArray;
524
+ function Oe(e, a) {
525
525
  for (var o = -1, u = e == null ? 0 : e.length, A = 0, w = []; ++o < u; ) {
526
- var C = e[o];
527
- a(C, o, e) && (w[A++] = C);
526
+ var D = e[o];
527
+ a(D, o, e) && (w[A++] = D);
528
528
  }
529
529
  return w;
530
530
  }
531
- function qt(e, a) {
531
+ function Jt(e, a) {
532
532
  for (var o = -1, u = a.length, A = e.length; ++o < u; )
533
533
  e[A + o] = a[o];
534
534
  return e;
535
535
  }
536
- function Oe(e, a) {
536
+ function Me(e, a) {
537
537
  for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
538
538
  if (a(e[o], o, e))
539
539
  return !0;
@@ -552,7 +552,7 @@ qe.exports;
552
552
  function jt(e, a) {
553
553
  return e.has(a);
554
554
  }
555
- function Jt(e, a) {
555
+ function Zt(e, a) {
556
556
  return e == null ? void 0 : e[a];
557
557
  }
558
558
  function xe(e) {
@@ -561,7 +561,7 @@ qe.exports;
561
561
  o[++a] = [A, u];
562
562
  }), o;
563
563
  }
564
- function Me(e, a) {
564
+ function Pe(e, a) {
565
565
  return function(o) {
566
566
  return e(a(o));
567
567
  };
@@ -572,13 +572,13 @@ qe.exports;
572
572
  o[++a] = u;
573
573
  }), o;
574
574
  }
575
- var Rt = Array.prototype, dr = Function.prototype, It = Object.prototype, Ft = at["__core-js_shared__"], Zt = dr.toString, et = It.hasOwnProperty, Pe = function() {
575
+ var Rt = Array.prototype, dr = Function.prototype, It = Object.prototype, Ft = at["__core-js_shared__"], Qt = dr.toString, et = It.hasOwnProperty, De = function() {
576
576
  var e = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
577
577
  return e ? "Symbol(src)_1." + e : "";
578
- }(), De = It.toString, hr = RegExp(
579
- "^" + Zt.call(et).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
580
- ), Qt = Yt ? at.Buffer : void 0, zt = at.Symbol, Ce = at.Uint8Array, Nt = It.propertyIsEnumerable, St = Rt.splice, st = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, te = Qt ? Qt.isBuffer : void 0, wt = Me(Object.keys, Object), ee = dt(at, "DataView"), Tt = dt(at, "Map"), re = dt(at, "Promise"), ne = dt(at, "Set"), ie = dt(at, "WeakMap"), gt = dt(Object, "create"), je = X(ee), pt = X(Tt), yr = X(re), mr = X(ne), br = X(ie), Re = zt ? zt.prototype : void 0, ae = Re ? Re.valueOf : void 0;
581
- function W(e) {
578
+ }(), Ce = It.toString, hr = RegExp(
579
+ "^" + Qt.call(et).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
580
+ ), te = Vt ? at.Buffer : void 0, zt = at.Symbol, je = at.Uint8Array, Nt = It.propertyIsEnumerable, St = Rt.splice, st = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, ee = te ? te.isBuffer : void 0, wt = Pe(Object.keys, Object), re = dt(at, "DataView"), Tt = dt(at, "Map"), ne = dt(at, "Promise"), ie = dt(at, "Set"), ae = dt(at, "WeakMap"), gt = dt(Object, "create"), Re = X(re), pt = X(Tt), yr = X(ne), mr = X(ie), br = X(ae), Fe = zt ? zt.prototype : void 0, se = Fe ? Fe.valueOf : void 0;
581
+ function B(e) {
582
582
  var a = -1, o = e == null ? 0 : e.length;
583
583
  for (this.clear(); ++a < o; ) {
584
584
  var u = e[a];
@@ -608,7 +608,7 @@ qe.exports;
608
608
  var o = this.__data__;
609
609
  return this.size += this.has(e) ? 0 : 1, o[e] = gt && a === void 0 ? i : a, this;
610
610
  }
611
- W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
611
+ B.prototype.clear = gr, B.prototype.delete = _r, B.prototype.get = vr, B.prototype.has = Ir, B.prototype.set = Sr;
612
612
  function K(e) {
613
613
  var a = -1, o = e == null ? 0 : e.length;
614
614
  for (this.clear(); ++a < o; ) {
@@ -647,16 +647,16 @@ qe.exports;
647
647
  }
648
648
  function Or() {
649
649
  this.size = 0, this.__data__ = {
650
- hash: new W(),
650
+ hash: new B(),
651
651
  map: new (Tt || K)(),
652
- string: new W()
652
+ string: new B()
653
653
  };
654
654
  }
655
- function xr(e) {
655
+ function Mr(e) {
656
656
  var a = ot(this, e).delete(e);
657
657
  return this.size -= a ? 1 : 0, a;
658
658
  }
659
- function Mr(e) {
659
+ function xr(e) {
660
660
  return ot(this, e).get(e);
661
661
  }
662
662
  function Pr(e) {
@@ -666,24 +666,24 @@ qe.exports;
666
666
  var o = ot(this, e), u = o.size;
667
667
  return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
668
668
  }
669
- q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
669
+ q.prototype.clear = Or, q.prototype.delete = Mr, q.prototype.get = xr, q.prototype.has = Pr, q.prototype.set = Dr;
670
670
  function Ut(e) {
671
671
  var a = -1, o = e == null ? 0 : e.length;
672
672
  for (this.__data__ = new q(); ++a < o; )
673
673
  this.add(e[a]);
674
674
  }
675
- function Fe(e) {
675
+ function ze(e) {
676
676
  return this.__data__.set(e, i), this;
677
677
  }
678
678
  function Lt(e) {
679
679
  return this.__data__.has(e);
680
680
  }
681
- Ut.prototype.add = Ut.prototype.push = Fe, Ut.prototype.has = Lt;
681
+ Ut.prototype.add = Ut.prototype.push = ze, Ut.prototype.has = Lt;
682
682
  function ut(e) {
683
683
  var a = this.__data__ = new K(e);
684
684
  this.size = a.size;
685
685
  }
686
- function se() {
686
+ function oe() {
687
687
  this.__data__ = new K(), this.size = 0;
688
688
  }
689
689
  function Cr(e) {
@@ -706,64 +706,64 @@ qe.exports;
706
706
  }
707
707
  return o.set(e, a), this.size = o.size, this;
708
708
  }
709
- ut.prototype.clear = se, ut.prototype.delete = Cr, ut.prototype.get = jr, ut.prototype.has = Rr, ut.prototype.set = Fr;
709
+ ut.prototype.clear = oe, ut.prototype.delete = Cr, ut.prototype.get = jr, ut.prototype.has = Rr, ut.prototype.set = Fr;
710
710
  function zr(e, a) {
711
- var o = Wt(e), u = !o && Le(e), A = !o && !u && Bt(e), w = !o && !u && !A && Be(e), C = o || u || A || w, D = C ? fr(e.length, String) : [], U = D.length;
711
+ var o = Wt(e), u = !o && Ge(e), A = !o && !u && Bt(e), w = !o && !u && !A && $e(e), D = o || u || A || w, P = D ? fr(e.length, String) : [], L = P.length;
712
712
  for (var R in e)
713
- et.call(e, R) && !(C && // Safari 9 has enumerable `arguments.length` in strict mode.
713
+ et.call(e, R) && !(D && // Safari 9 has enumerable `arguments.length` in strict mode.
714
714
  (R == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
715
715
  A && (R == "offset" || R == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
716
716
  w && (R == "buffer" || R == "byteLength" || R == "byteOffset") || // Skip index properties.
717
- $r(R, U))) && D.push(R);
718
- return D;
717
+ $r(R, L))) && P.push(R);
718
+ return P;
719
719
  }
720
720
  function Gt(e, a) {
721
721
  for (var o = e.length; o--; )
722
- if (Ue(e[o][0], a))
722
+ if (Le(e[o][0], a))
723
723
  return o;
724
724
  return -1;
725
725
  }
726
- function oe(e, a, o) {
726
+ function ce(e, a, o) {
727
727
  var u = a(e);
728
- return Wt(e) ? u : qt(u, o(e));
728
+ return Wt(e) ? u : Jt(u, o(e));
729
729
  }
730
730
  function kt(e) {
731
- return e == null ? e === void 0 ? S : v : st && st in Object(e) ? ht(e) : He(e);
731
+ return e == null ? e === void 0 ? S : v : st && st in Object(e) ? ht(e) : Ue(e);
732
732
  }
733
- function ze(e) {
733
+ function Ne(e) {
734
734
  return ft(e) && kt(e) == d;
735
735
  }
736
- function Ne(e, a, o, u, A) {
737
- return e === a ? !0 : e == null || a == null || !ft(e) && !ft(a) ? e !== e && a !== a : Nr(e, a, o, u, Ne, A);
736
+ function He(e, a, o, u, A) {
737
+ return e === a ? !0 : e == null || a == null || !ft(e) && !ft(a) ? e !== e && a !== a : Nr(e, a, o, u, He, A);
738
738
  }
739
739
  function Nr(e, a, o, u, A, w) {
740
- var C = Wt(e), D = Wt(a), U = C ? x : lt(e), R = D ? x : lt(a);
741
- U = U == d ? _ : U, R = R == d ? _ : R;
742
- var Y = U == _, J = R == _, L = U == R;
743
- if (L && Bt(e)) {
740
+ var D = Wt(e), P = Wt(a), L = D ? M : lt(e), R = P ? M : lt(a);
741
+ L = L == d ? _ : L, R = R == d ? _ : R;
742
+ var Y = L == _, J = R == _, G = L == R;
743
+ if (G && Bt(e)) {
744
744
  if (!Bt(a))
745
745
  return !1;
746
- C = !0, Y = !1;
746
+ D = !0, Y = !1;
747
747
  }
748
- if (L && !Y)
749
- return w || (w = new ut()), C || Be(e) ? ce(e, a, o, u, A, w) : Gr(e, a, U, o, u, A, w);
748
+ if (G && !Y)
749
+ return w || (w = new ut()), D || $e(e) ? ue(e, a, o, u, A, w) : Gr(e, a, L, o, u, A, w);
750
750
  if (!(o & s)) {
751
- var V = Y && et.call(e, "__wrapped__"), B = J && et.call(a, "__wrapped__");
752
- if (V || B) {
753
- var _t = V ? e.value() : e, yt = B ? a.value() : a;
751
+ var V = Y && et.call(e, "__wrapped__"), $ = J && et.call(a, "__wrapped__");
752
+ if (V || $) {
753
+ var _t = V ? e.value() : e, yt = $ ? a.value() : a;
754
754
  return w || (w = new ut()), A(_t, yt, o, u, w);
755
755
  }
756
756
  }
757
- return L ? (w || (w = new ut()), Wr(e, a, o, u, A, w)) : !1;
757
+ return G ? (w || (w = new ut()), Wr(e, a, o, u, A, w)) : !1;
758
758
  }
759
759
  function Hr(e) {
760
- if (!We(e) || Yr(e))
760
+ if (!Be(e) || Yr(e))
761
761
  return !1;
762
- var a = Ge(e) ? hr : it;
762
+ var a = We(e) ? hr : it;
763
763
  return a.test(X(e));
764
764
  }
765
765
  function Ur(e) {
766
- return ft(e) && le(e.length) && !!N[kt(e)];
766
+ return ft(e) && fe(e.length) && !!N[kt(e)];
767
767
  }
768
768
  function Lr(e) {
769
769
  if (!Vr(e))
@@ -773,114 +773,114 @@ qe.exports;
773
773
  et.call(e, o) && o != "constructor" && a.push(o);
774
774
  return a;
775
775
  }
776
- function ce(e, a, o, u, A, w) {
777
- var C = o & s, D = e.length, U = a.length;
778
- if (D != U && !(C && U > D))
776
+ function ue(e, a, o, u, A, w) {
777
+ var D = o & s, P = e.length, L = a.length;
778
+ if (P != L && !(D && L > P))
779
779
  return !1;
780
780
  var R = w.get(e);
781
781
  if (R && w.get(a))
782
782
  return R == a;
783
- var Y = -1, J = !0, L = o & c ? new Ut() : void 0;
784
- for (w.set(e, a), w.set(a, e); ++Y < D; ) {
785
- var V = e[Y], B = a[Y];
783
+ var Y = -1, J = !0, G = o & c ? new Ut() : void 0;
784
+ for (w.set(e, a), w.set(a, e); ++Y < P; ) {
785
+ var V = e[Y], $ = a[Y];
786
786
  if (u)
787
- var _t = C ? u(B, V, Y, a, e, w) : u(V, B, Y, e, a, w);
787
+ var _t = D ? u($, V, Y, a, e, w) : u(V, $, Y, e, a, w);
788
788
  if (_t !== void 0) {
789
789
  if (_t)
790
790
  continue;
791
791
  J = !1;
792
792
  break;
793
793
  }
794
- if (L) {
795
- if (!Oe(a, function(yt, At) {
796
- if (!jt(L, At) && (V === yt || A(V, yt, o, u, w)))
797
- return L.push(At);
794
+ if (G) {
795
+ if (!Me(a, function(yt, At) {
796
+ if (!jt(G, At) && (V === yt || A(V, yt, o, u, w)))
797
+ return G.push(At);
798
798
  })) {
799
799
  J = !1;
800
800
  break;
801
801
  }
802
- } else if (!(V === B || A(V, B, o, u, w))) {
802
+ } else if (!(V === $ || A(V, $, o, u, w))) {
803
803
  J = !1;
804
804
  break;
805
805
  }
806
806
  }
807
807
  return w.delete(e), w.delete(a), J;
808
808
  }
809
- function Gr(e, a, o, u, A, w, C) {
809
+ function Gr(e, a, o, u, A, w, D) {
810
810
  switch (o) {
811
- case M:
811
+ case T:
812
812
  if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
813
813
  return !1;
814
814
  e = e.buffer, a = a.buffer;
815
- case E:
816
- return !(e.byteLength != a.byteLength || !w(new Ce(e), new Ce(a)));
817
815
  case k:
816
+ return !(e.byteLength != a.byteLength || !w(new je(e), new je(a)));
817
+ case E:
818
818
  case H:
819
+ case y:
820
+ return Le(+e, +a);
819
821
  case b:
820
- return Ue(+e, +a);
821
- case m:
822
822
  return e.name == a.name && e.message == a.message;
823
- case j:
823
+ case C:
824
824
  case I:
825
825
  return e == a + "";
826
826
  case l:
827
- var D = xe;
827
+ var P = xe;
828
828
  case O:
829
- var U = u & s;
830
- if (D || (D = ct), e.size != a.size && !U)
829
+ var L = u & s;
830
+ if (P || (P = ct), e.size != a.size && !L)
831
831
  return !1;
832
- var R = C.get(e);
832
+ var R = D.get(e);
833
833
  if (R)
834
834
  return R == a;
835
- u |= c, C.set(e, a);
836
- var Y = ce(D(e), D(a), u, A, w, C);
837
- return C.delete(e), Y;
838
- case P:
839
- if (ae)
840
- return ae.call(e) == ae.call(a);
835
+ u |= c, D.set(e, a);
836
+ var Y = ue(P(e), P(a), u, A, w, D);
837
+ return D.delete(e), Y;
838
+ case x:
839
+ if (se)
840
+ return se.call(e) == se.call(a);
841
841
  }
842
842
  return !1;
843
843
  }
844
844
  function Wr(e, a, o, u, A, w) {
845
- var C = o & s, D = Et(e), U = D.length, R = Et(a), Y = R.length;
846
- if (U != Y && !C)
845
+ var D = o & s, P = Et(e), L = P.length, R = Et(a), Y = R.length;
846
+ if (L != Y && !D)
847
847
  return !1;
848
- for (var J = U; J--; ) {
849
- var L = D[J];
850
- if (!(C ? L in a : et.call(a, L)))
848
+ for (var J = L; J--; ) {
849
+ var G = P[J];
850
+ if (!(D ? G in a : et.call(a, G)))
851
851
  return !1;
852
852
  }
853
853
  var V = w.get(e);
854
854
  if (V && w.get(a))
855
855
  return V == a;
856
- var B = !0;
856
+ var $ = !0;
857
857
  w.set(e, a), w.set(a, e);
858
- for (var _t = C; ++J < U; ) {
859
- L = D[J];
860
- var yt = e[L], At = a[L];
858
+ for (var _t = D; ++J < L; ) {
859
+ G = P[J];
860
+ var yt = e[G], At = a[G];
861
861
  if (u)
862
- var Tn = C ? u(At, yt, L, a, e, w) : u(yt, At, L, e, a, w);
862
+ var Tn = D ? u(At, yt, G, a, e, w) : u(yt, At, G, e, a, w);
863
863
  if (!(Tn === void 0 ? yt === At || A(yt, At, o, u, w) : Tn)) {
864
- B = !1;
864
+ $ = !1;
865
865
  break;
866
866
  }
867
- _t || (_t = L == "constructor");
867
+ _t || (_t = G == "constructor");
868
868
  }
869
- if (B && !_t) {
870
- var $e = e.constructor, Ke = a.constructor;
871
- $e != Ke && "constructor" in e && "constructor" in a && !(typeof $e == "function" && $e instanceof $e && typeof Ke == "function" && Ke instanceof Ke) && (B = !1);
869
+ if ($ && !_t) {
870
+ var Ke = e.constructor, Ye = a.constructor;
871
+ Ke != Ye && "constructor" in e && "constructor" in a && !(typeof Ke == "function" && Ke instanceof Ke && typeof Ye == "function" && Ye instanceof Ye) && ($ = !1);
872
872
  }
873
- return w.delete(e), w.delete(a), B;
873
+ return w.delete(e), w.delete(a), $;
874
874
  }
875
875
  function Et(e) {
876
- return oe(e, fe, Br);
876
+ return ce(e, pe, Br);
877
877
  }
878
878
  function ot(e, a) {
879
879
  var o = e.__data__;
880
880
  return Kr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
881
881
  }
882
882
  function dt(e, a) {
883
- var o = Jt(e, a);
883
+ var o = Zt(e, a);
884
884
  return Hr(o) ? o : void 0;
885
885
  }
886
886
  function ht(e) {
@@ -890,52 +890,52 @@ qe.exports;
890
890
  var u = !0;
891
891
  } catch {
892
892
  }
893
- var A = De.call(e);
893
+ var A = Ce.call(e);
894
894
  return u && (a ? e[st] = o : delete e[st]), A;
895
895
  }
896
896
  var Br = Ht ? function(e) {
897
- return e == null ? [] : (e = Object(e), Ae(Ht(e), function(a) {
897
+ return e == null ? [] : (e = Object(e), Oe(Ht(e), function(a) {
898
898
  return Nt.call(e, a);
899
899
  }));
900
900
  } : qr, lt = kt;
901
- (ee && lt(new ee(new ArrayBuffer(1))) != M || Tt && lt(new Tt()) != l || re && lt(re.resolve()) != y || ne && lt(new ne()) != O || ie && lt(new ie()) != T) && (lt = function(e) {
901
+ (re && lt(new re(new ArrayBuffer(1))) != T || Tt && lt(new Tt()) != l || ne && lt(ne.resolve()) != m || ie && lt(new ie()) != O || ae && lt(new ae()) != j) && (lt = function(e) {
902
902
  var a = kt(e), o = a == _ ? e.constructor : void 0, u = o ? X(o) : "";
903
903
  if (u)
904
904
  switch (u) {
905
- case je:
906
- return M;
905
+ case Re:
906
+ return T;
907
907
  case pt:
908
908
  return l;
909
909
  case yr:
910
- return y;
910
+ return m;
911
911
  case mr:
912
912
  return O;
913
913
  case br:
914
- return T;
914
+ return j;
915
915
  }
916
916
  return a;
917
917
  });
918
918
  function $r(e, a) {
919
- return a = a ?? f, !!a && (typeof e == "number" || Se.test(e)) && e > -1 && e % 1 == 0 && e < a;
919
+ return a = a ?? f, !!a && (typeof e == "number" || we.test(e)) && e > -1 && e % 1 == 0 && e < a;
920
920
  }
921
921
  function Kr(e) {
922
922
  var a = typeof e;
923
923
  return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
924
924
  }
925
925
  function Yr(e) {
926
- return !!Pe && Pe in e;
926
+ return !!De && De in e;
927
927
  }
928
928
  function Vr(e) {
929
929
  var a = e && e.constructor, o = typeof a == "function" && a.prototype || It;
930
930
  return e === o;
931
931
  }
932
- function He(e) {
933
- return De.call(e);
932
+ function Ue(e) {
933
+ return Ce.call(e);
934
934
  }
935
935
  function X(e) {
936
936
  if (e != null) {
937
937
  try {
938
- return Zt.call(e);
938
+ return Qt.call(e);
939
939
  } catch {
940
940
  }
941
941
  try {
@@ -945,40 +945,40 @@ qe.exports;
945
945
  }
946
946
  return "";
947
947
  }
948
- function Ue(e, a) {
948
+ function Le(e, a) {
949
949
  return e === a || e !== e && a !== a;
950
950
  }
951
- var Le = ze(/* @__PURE__ */ function() {
951
+ var Ge = Ne(/* @__PURE__ */ function() {
952
952
  return arguments;
953
- }()) ? ze : function(e) {
953
+ }()) ? Ne : function(e) {
954
954
  return ft(e) && et.call(e, "callee") && !Nt.call(e, "callee");
955
955
  }, Wt = Array.isArray;
956
- function ue(e) {
957
- return e != null && le(e.length) && !Ge(e);
956
+ function le(e) {
957
+ return e != null && fe(e.length) && !We(e);
958
958
  }
959
- var Bt = te || Jr;
959
+ var Bt = ee || Jr;
960
960
  function Xr(e, a) {
961
- return Ne(e, a);
961
+ return He(e, a);
962
962
  }
963
- function Ge(e) {
964
- if (!We(e))
963
+ function We(e) {
964
+ if (!Be(e))
965
965
  return !1;
966
966
  var a = kt(e);
967
967
  return a == p || a == h || a == F || a == g;
968
968
  }
969
- function le(e) {
969
+ function fe(e) {
970
970
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
971
971
  }
972
- function We(e) {
972
+ function Be(e) {
973
973
  var a = typeof e;
974
974
  return e != null && (a == "object" || a == "function");
975
975
  }
976
976
  function ft(e) {
977
977
  return e != null && typeof e == "object";
978
978
  }
979
- var Be = Xt ? pr(Xt) : Ur;
980
- function fe(e) {
981
- return ue(e) ? zr(e) : Lr(e);
979
+ var $e = qt ? pr(qt) : Ur;
980
+ function pe(e) {
981
+ return le(e) ? zr(e) : Lr(e);
982
982
  }
983
983
  function qr() {
984
984
  return [];
@@ -993,39 +993,39 @@ const rt = /* @__PURE__ */ bn(Bi);
993
993
  var Je = { exports: {} };
994
994
  Je.exports;
995
995
  (function(t, r) {
996
- var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", x = "[object Date]", F = "[object Error]", k = "[object Function]", H = "[object GeneratorFunction]", m = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", b = "[object RegExp]", v = "[object Set]", _ = "[object String]", y = "[object Symbol]", g = "[object WeakMap]", j = "[object ArrayBuffer]", O = "[object DataView]", I = "[object Float32Array]", P = "[object Float64Array]", S = "[object Int8Array]", T = "[object Int16Array]", E = "[object Int32Array]", M = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
997
- z[c] = z[f] = z[j] = z[O] = z[d] = z[x] = z[I] = z[P] = z[S] = z[T] = z[E] = z[m] = z[p] = z[h] = z[b] = z[v] = z[_] = z[y] = z[M] = z[$] = z[bt] = z[Ie] = !0, z[F] = z[k] = z[g] = !1;
998
- var cr = typeof nt == "object" && nt && nt.Object === Object && nt, ur = typeof self == "object" && self && self.Object === Object && self, it = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
996
+ var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", M = "[object Date]", F = "[object Error]", E = "[object Function]", H = "[object GeneratorFunction]", b = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", y = "[object RegExp]", v = "[object Set]", _ = "[object String]", m = "[object Symbol]", g = "[object WeakMap]", C = "[object ArrayBuffer]", O = "[object DataView]", I = "[object Float32Array]", x = "[object Float64Array]", S = "[object Int8Array]", j = "[object Int16Array]", k = "[object Int32Array]", T = "[object Uint8Array]", U = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", Se = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
997
+ z[c] = z[f] = z[C] = z[O] = z[d] = z[M] = z[I] = z[x] = z[S] = z[j] = z[k] = z[b] = z[p] = z[h] = z[y] = z[v] = z[_] = z[m] = z[T] = z[U] = z[bt] = z[Se] = !0, z[F] = z[E] = z[g] = !1;
998
+ var cr = typeof nt == "object" && nt && nt.Object === Object && nt, ur = typeof self == "object" && self && self.Object === Object && self, it = cr || ur || Function("return this")(), we = r && !r.nodeType && r, N = we && !0 && t && !t.nodeType && t, Te = N && N.exports === we;
999
999
  function lr(e, a) {
1000
1000
  return e.set(a[0], a[1]), e;
1001
1001
  }
1002
1002
  function at(e, a) {
1003
1003
  return e.add(a), e;
1004
1004
  }
1005
- function Te(e, a) {
1005
+ function ke(e, a) {
1006
1006
  for (var o = -1, u = e ? e.length : 0; ++o < u && a(e[o], o, e) !== !1; )
1007
1007
  ;
1008
1008
  return e;
1009
1009
  }
1010
- function ke(e, a) {
1010
+ function Ee(e, a) {
1011
1011
  for (var o = -1, u = a.length, A = e.length; ++o < u; )
1012
1012
  e[A + o] = a[o];
1013
1013
  return e;
1014
1014
  }
1015
- function Yt(e, a, o, u) {
1015
+ function Vt(e, a, o, u) {
1016
1016
  for (var A = -1, w = e ? e.length : 0; ++A < w; )
1017
1017
  o = a(o, e[A], A, e);
1018
1018
  return o;
1019
1019
  }
1020
- function Vt(e, a) {
1020
+ function Xt(e, a) {
1021
1021
  for (var o = -1, u = Array(e); ++o < e; )
1022
1022
  u[o] = a(o);
1023
1023
  return u;
1024
1024
  }
1025
- function Ee(e, a) {
1025
+ function Ae(e, a) {
1026
1026
  return e == null ? void 0 : e[a];
1027
1027
  }
1028
- function Xt(e) {
1028
+ function qt(e) {
1029
1029
  var a = !1;
1030
1030
  if (e != null && typeof e.toString != "function")
1031
1031
  try {
@@ -1034,29 +1034,29 @@ Je.exports;
1034
1034
  }
1035
1035
  return a;
1036
1036
  }
1037
- function Ae(e) {
1037
+ function Oe(e) {
1038
1038
  var a = -1, o = Array(e.size);
1039
1039
  return e.forEach(function(u, A) {
1040
1040
  o[++a] = [A, u];
1041
1041
  }), o;
1042
1042
  }
1043
- function qt(e, a) {
1043
+ function Jt(e, a) {
1044
1044
  return function(o) {
1045
1045
  return e(a(o));
1046
1046
  };
1047
1047
  }
1048
- function Oe(e) {
1048
+ function Me(e) {
1049
1049
  var a = -1, o = Array(e.size);
1050
1050
  return e.forEach(function(u) {
1051
1051
  o[++a] = u;
1052
1052
  }), o;
1053
1053
  }
1054
- var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = it["__core-js_shared__"], xe = function() {
1055
- var e = /[^.]+$/.exec(Jt && Jt.keys && Jt.keys.IE_PROTO || "");
1054
+ var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Zt = it["__core-js_shared__"], xe = function() {
1055
+ var e = /[^.]+$/.exec(Zt && Zt.keys && Zt.keys.IE_PROTO || "");
1056
1056
  return e ? "Symbol(src)_1." + e : "";
1057
- }(), Me = pr.toString, ct = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
1058
- "^" + Me.call(ct).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1059
- ), It = we ? it.Buffer : void 0, Ft = it.Symbol, Zt = it.Uint8Array, et = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = It ? It.isBuffer : void 0, Ce = qt(Object.keys, Object), Nt = ot(it, "DataView"), St = ot(it, "Map"), st = ot(it, "Promise"), Ht = ot(it, "Set"), te = ot(it, "WeakMap"), wt = ot(Object, "create"), ee = X(Nt), Tt = X(St), re = X(st), ne = X(Ht), ie = X(te), gt = Ft ? Ft.prototype : void 0, je = gt ? gt.valueOf : void 0;
1057
+ }(), Pe = pr.toString, ct = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
1058
+ "^" + Pe.call(ct).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1059
+ ), It = Te ? it.Buffer : void 0, Ft = it.Symbol, Qt = it.Uint8Array, et = Jt(Object.getPrototypeOf, Object), De = Object.create, Ce = jt.propertyIsEnumerable, hr = fr.splice, te = Object.getOwnPropertySymbols, zt = It ? It.isBuffer : void 0, je = Jt(Object.keys, Object), Nt = ot(it, "DataView"), St = ot(it, "Map"), st = ot(it, "Promise"), Ht = ot(it, "Set"), ee = ot(it, "WeakMap"), wt = ot(Object, "create"), re = X(Nt), Tt = X(St), ne = X(st), ie = X(Ht), ae = X(ee), gt = Ft ? Ft.prototype : void 0, Re = gt ? gt.valueOf : void 0;
1060
1060
  function pt(e) {
1061
1061
  var a = -1, o = e ? e.length : 0;
1062
1062
  for (this.clear(); ++a < o; ) {
@@ -1078,16 +1078,16 @@ Je.exports;
1078
1078
  }
1079
1079
  return ct.call(a, e) ? a[e] : void 0;
1080
1080
  }
1081
- function Re(e) {
1081
+ function Fe(e) {
1082
1082
  var a = this.__data__;
1083
1083
  return wt ? a[e] !== void 0 : ct.call(a, e);
1084
1084
  }
1085
- function ae(e, a) {
1085
+ function se(e, a) {
1086
1086
  var o = this.__data__;
1087
1087
  return o[e] = wt && a === void 0 ? i : a, this;
1088
1088
  }
1089
- pt.prototype.clear = yr, pt.prototype.delete = mr, pt.prototype.get = br, pt.prototype.has = Re, pt.prototype.set = ae;
1090
- function W(e) {
1089
+ pt.prototype.clear = yr, pt.prototype.delete = mr, pt.prototype.get = br, pt.prototype.has = Fe, pt.prototype.set = se;
1090
+ function B(e) {
1091
1091
  var a = -1, o = e ? e.length : 0;
1092
1092
  for (this.clear(); ++a < o; ) {
1093
1093
  var u = e[a];
@@ -1115,7 +1115,7 @@ Je.exports;
1115
1115
  var o = this.__data__, u = Lt(o, e);
1116
1116
  return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
1117
1117
  }
1118
- W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
1118
+ B.prototype.clear = gr, B.prototype.delete = _r, B.prototype.get = vr, B.prototype.has = Ir, B.prototype.set = Sr;
1119
1119
  function K(e) {
1120
1120
  var a = -1, o = e ? e.length : 0;
1121
1121
  for (this.clear(); ++a < o; ) {
@@ -1126,7 +1126,7 @@ Je.exports;
1126
1126
  function wr() {
1127
1127
  this.__data__ = {
1128
1128
  hash: new pt(),
1129
- map: new (St || W)(),
1129
+ map: new (St || B)(),
1130
1130
  string: new pt()
1131
1131
  };
1132
1132
  }
@@ -1144,15 +1144,15 @@ Je.exports;
1144
1144
  }
1145
1145
  K.prototype.clear = wr, K.prototype.delete = Tr, K.prototype.get = kr, K.prototype.has = Er, K.prototype.set = Ar;
1146
1146
  function q(e) {
1147
- this.__data__ = new W(e);
1147
+ this.__data__ = new B(e);
1148
1148
  }
1149
1149
  function Or() {
1150
- this.__data__ = new W();
1150
+ this.__data__ = new B();
1151
1151
  }
1152
- function xr(e) {
1152
+ function Mr(e) {
1153
1153
  return this.__data__.delete(e);
1154
1154
  }
1155
- function Mr(e) {
1155
+ function xr(e) {
1156
1156
  return this.__data__.get(e);
1157
1157
  }
1158
1158
  function Pr(e) {
@@ -1160,7 +1160,7 @@ Je.exports;
1160
1160
  }
1161
1161
  function Dr(e, a) {
1162
1162
  var o = this.__data__;
1163
- if (o instanceof W) {
1163
+ if (o instanceof B) {
1164
1164
  var u = o.__data__;
1165
1165
  if (!St || u.length < n - 1)
1166
1166
  return u.push([e, a]), this;
@@ -1168,67 +1168,67 @@ Je.exports;
1168
1168
  }
1169
1169
  return o.set(e, a), this;
1170
1170
  }
1171
- q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
1171
+ q.prototype.clear = Or, q.prototype.delete = Mr, q.prototype.get = xr, q.prototype.has = Pr, q.prototype.set = Dr;
1172
1172
  function Ut(e, a) {
1173
- var o = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = o.length, A = !!u;
1173
+ var o = le(e) || Wt(e) ? Xt(e.length, String) : [], u = o.length, A = !!u;
1174
1174
  for (var w in e)
1175
1175
  ct.call(e, w) && !(A && (w == "length" || Kr(w, u))) && o.push(w);
1176
1176
  return o;
1177
1177
  }
1178
- function Fe(e, a, o) {
1178
+ function ze(e, a, o) {
1179
1179
  var u = e[a];
1180
- (!(ct.call(e, a) && Le(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
1180
+ (!(ct.call(e, a) && Ge(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
1181
1181
  }
1182
1182
  function Lt(e, a) {
1183
1183
  for (var o = e.length; o--; )
1184
- if (Le(e[o][0], a))
1184
+ if (Ge(e[o][0], a))
1185
1185
  return o;
1186
1186
  return -1;
1187
1187
  }
1188
1188
  function ut(e, a) {
1189
- return e && ce(a, fe(a), e);
1189
+ return e && ue(a, pe(a), e);
1190
1190
  }
1191
- function se(e, a, o, u, A, w, C) {
1192
- var D;
1193
- if (u && (D = w ? u(e, A, w, C) : u(e)), D !== void 0)
1194
- return D;
1191
+ function oe(e, a, o, u, A, w, D) {
1192
+ var P;
1193
+ if (u && (P = w ? u(e, A, w, D) : u(e)), P !== void 0)
1194
+ return P;
1195
1195
  if (!ft(e))
1196
1196
  return e;
1197
- var U = ue(e);
1198
- if (U) {
1199
- if (D = Br(e), !a)
1200
- return Lr(e, D);
1197
+ var L = le(e);
1198
+ if (L) {
1199
+ if (P = Br(e), !a)
1200
+ return Lr(e, P);
1201
1201
  } else {
1202
- var R = ht(e), Y = R == k || R == H;
1203
- if (Ge(e))
1202
+ var R = ht(e), Y = R == E || R == H;
1203
+ if (We(e))
1204
1204
  return Gt(e, a);
1205
1205
  if (R == h || R == c || Y && !w) {
1206
- if (Xt(e))
1206
+ if (qt(e))
1207
1207
  return w ? e : {};
1208
- if (D = lt(Y ? {} : e), !a)
1209
- return Gr(e, ut(D, e));
1208
+ if (P = lt(Y ? {} : e), !a)
1209
+ return Gr(e, ut(P, e));
1210
1210
  } else {
1211
1211
  if (!z[R])
1212
1212
  return w ? e : {};
1213
- D = $r(e, R, se, a);
1213
+ P = $r(e, R, oe, a);
1214
1214
  }
1215
1215
  }
1216
- C || (C = new q());
1217
- var J = C.get(e);
1216
+ D || (D = new q());
1217
+ var J = D.get(e);
1218
1218
  if (J)
1219
1219
  return J;
1220
- if (C.set(e, D), !U)
1221
- var L = o ? Wr(e) : fe(e);
1222
- return Te(L || e, function(V, B) {
1223
- L && (B = V, V = e[B]), Fe(D, B, se(V, a, o, u, B, e, C));
1224
- }), D;
1220
+ if (D.set(e, P), !L)
1221
+ var G = o ? Wr(e) : pe(e);
1222
+ return ke(G || e, function(V, $) {
1223
+ G && ($ = V, V = e[$]), ze(P, $, oe(V, a, o, u, $, e, D));
1224
+ }), P;
1225
1225
  }
1226
1226
  function Cr(e) {
1227
- return ft(e) ? Pe(e) : {};
1227
+ return ft(e) ? De(e) : {};
1228
1228
  }
1229
1229
  function jr(e, a, o) {
1230
1230
  var u = a(e);
1231
- return ue(e) ? u : ke(u, o(e));
1231
+ return le(e) ? u : Ee(u, o(e));
1232
1232
  }
1233
1233
  function Rr(e) {
1234
1234
  return Rt.call(e);
@@ -1236,12 +1236,12 @@ Je.exports;
1236
1236
  function Fr(e) {
1237
1237
  if (!ft(e) || Vr(e))
1238
1238
  return !1;
1239
- var a = le(e) || Xt(e) ? dr : sr;
1239
+ var a = fe(e) || qt(e) ? dr : sr;
1240
1240
  return a.test(X(e));
1241
1241
  }
1242
1242
  function zr(e) {
1243
- if (!He(e))
1244
- return Ce(e);
1243
+ if (!Ue(e))
1244
+ return je(e);
1245
1245
  var a = [];
1246
1246
  for (var o in Object(e))
1247
1247
  ct.call(e, o) && o != "constructor" && a.push(o);
@@ -1253,31 +1253,31 @@ Je.exports;
1253
1253
  var o = new e.constructor(e.length);
1254
1254
  return e.copy(o), o;
1255
1255
  }
1256
- function oe(e) {
1256
+ function ce(e) {
1257
1257
  var a = new e.constructor(e.byteLength);
1258
- return new Zt(a).set(new Zt(e)), a;
1258
+ return new Qt(a).set(new Qt(e)), a;
1259
1259
  }
1260
1260
  function kt(e, a) {
1261
- var o = a ? oe(e.buffer) : e.buffer;
1261
+ var o = a ? ce(e.buffer) : e.buffer;
1262
1262
  return new e.constructor(o, e.byteOffset, e.byteLength);
1263
1263
  }
1264
- function ze(e, a, o) {
1265
- var u = a ? o(Ae(e), !0) : Ae(e);
1266
- return Yt(u, lr, new e.constructor());
1264
+ function Ne(e, a, o) {
1265
+ var u = a ? o(Oe(e), !0) : Oe(e);
1266
+ return Vt(u, lr, new e.constructor());
1267
1267
  }
1268
- function Ne(e) {
1268
+ function He(e) {
1269
1269
  var a = new e.constructor(e.source, ar.exec(e));
1270
1270
  return a.lastIndex = e.lastIndex, a;
1271
1271
  }
1272
1272
  function Nr(e, a, o) {
1273
- var u = a ? o(Oe(e), !0) : Oe(e);
1274
- return Yt(u, at, new e.constructor());
1273
+ var u = a ? o(Me(e), !0) : Me(e);
1274
+ return Vt(u, at, new e.constructor());
1275
1275
  }
1276
1276
  function Hr(e) {
1277
- return je ? Object(je.call(e)) : {};
1277
+ return Re ? Object(Re.call(e)) : {};
1278
1278
  }
1279
1279
  function Ur(e, a) {
1280
- var o = a ? oe(e.buffer) : e.buffer;
1280
+ var o = a ? ce(e.buffer) : e.buffer;
1281
1281
  return new e.constructor(o, e.byteOffset, e.length);
1282
1282
  }
1283
1283
  function Lr(e, a) {
@@ -1286,42 +1286,42 @@ Je.exports;
1286
1286
  a[o] = e[o];
1287
1287
  return a;
1288
1288
  }
1289
- function ce(e, a, o, u) {
1289
+ function ue(e, a, o, u) {
1290
1290
  o || (o = {});
1291
1291
  for (var A = -1, w = a.length; ++A < w; ) {
1292
- var C = a[A], D = void 0;
1293
- Fe(o, C, D === void 0 ? e[C] : D);
1292
+ var D = a[A], P = void 0;
1293
+ ze(o, D, P === void 0 ? e[D] : P);
1294
1294
  }
1295
1295
  return o;
1296
1296
  }
1297
1297
  function Gr(e, a) {
1298
- return ce(e, dt(e), a);
1298
+ return ue(e, dt(e), a);
1299
1299
  }
1300
1300
  function Wr(e) {
1301
- return jr(e, fe, dt);
1301
+ return jr(e, pe, dt);
1302
1302
  }
1303
1303
  function Et(e, a) {
1304
1304
  var o = e.__data__;
1305
1305
  return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
1306
1306
  }
1307
1307
  function ot(e, a) {
1308
- var o = Ee(e, a);
1308
+ var o = Ae(e, a);
1309
1309
  return Fr(o) ? o : void 0;
1310
1310
  }
1311
- var dt = Qt ? qt(Qt, Object) : qr, ht = Rr;
1312
- (Nt && ht(new Nt(new ArrayBuffer(1))) != O || St && ht(new St()) != m || st && ht(st.resolve()) != l || Ht && ht(new Ht()) != v || te && ht(new te()) != g) && (ht = function(e) {
1311
+ var dt = te ? Jt(te, Object) : qr, ht = Rr;
1312
+ (Nt && ht(new Nt(new ArrayBuffer(1))) != O || St && ht(new St()) != b || st && ht(st.resolve()) != l || Ht && ht(new Ht()) != v || ee && ht(new ee()) != g) && (ht = function(e) {
1313
1313
  var a = Rt.call(e), o = a == h ? e.constructor : void 0, u = o ? X(o) : void 0;
1314
1314
  if (u)
1315
1315
  switch (u) {
1316
- case ee:
1316
+ case re:
1317
1317
  return O;
1318
1318
  case Tt:
1319
- return m;
1320
- case re:
1321
- return l;
1319
+ return b;
1322
1320
  case ne:
1323
- return v;
1321
+ return l;
1324
1322
  case ie:
1323
+ return v;
1324
+ case ae:
1325
1325
  return g;
1326
1326
  }
1327
1327
  return a;
@@ -1331,38 +1331,38 @@ Je.exports;
1331
1331
  return a && typeof e[0] == "string" && ct.call(e, "index") && (o.index = e.index, o.input = e.input), o;
1332
1332
  }
1333
1333
  function lt(e) {
1334
- return typeof e.constructor == "function" && !He(e) ? Cr(et(e)) : {};
1334
+ return typeof e.constructor == "function" && !Ue(e) ? Cr(et(e)) : {};
1335
1335
  }
1336
1336
  function $r(e, a, o, u) {
1337
1337
  var A = e.constructor;
1338
1338
  switch (a) {
1339
- case j:
1340
- return oe(e);
1339
+ case C:
1340
+ return ce(e);
1341
1341
  case d:
1342
- case x:
1342
+ case M:
1343
1343
  return new A(+e);
1344
1344
  case O:
1345
1345
  return kt(e, u);
1346
1346
  case I:
1347
- case P:
1347
+ case x:
1348
1348
  case S:
1349
+ case j:
1350
+ case k:
1349
1351
  case T:
1350
- case E:
1351
- case M:
1352
- case $:
1352
+ case U:
1353
1353
  case bt:
1354
- case Ie:
1354
+ case Se:
1355
1355
  return Ur(e, u);
1356
- case m:
1357
- return ze(e, u, o);
1356
+ case b:
1357
+ return Ne(e, u, o);
1358
1358
  case p:
1359
1359
  case _:
1360
1360
  return new A(e);
1361
- case b:
1362
- return Ne(e);
1361
+ case y:
1362
+ return He(e);
1363
1363
  case v:
1364
1364
  return Nr(e, u, o);
1365
- case y:
1365
+ case m:
1366
1366
  return Hr(e);
1367
1367
  }
1368
1368
  }
@@ -1376,14 +1376,14 @@ Je.exports;
1376
1376
  function Vr(e) {
1377
1377
  return !!xe && xe in e;
1378
1378
  }
1379
- function He(e) {
1379
+ function Ue(e) {
1380
1380
  var a = e && e.constructor, o = typeof a == "function" && a.prototype || jt;
1381
1381
  return e === o;
1382
1382
  }
1383
1383
  function X(e) {
1384
1384
  if (e != null) {
1385
1385
  try {
1386
- return Me.call(e);
1386
+ return Pe.call(e);
1387
1387
  } catch {
1388
1388
  }
1389
1389
  try {
@@ -1393,38 +1393,38 @@ Je.exports;
1393
1393
  }
1394
1394
  return "";
1395
1395
  }
1396
- function Ue(e) {
1397
- return se(e, !0, !0);
1396
+ function Le(e) {
1397
+ return oe(e, !0, !0);
1398
1398
  }
1399
- function Le(e, a) {
1399
+ function Ge(e, a) {
1400
1400
  return e === a || e !== e && a !== a;
1401
1401
  }
1402
1402
  function Wt(e) {
1403
- return Xr(e) && ct.call(e, "callee") && (!De.call(e, "callee") || Rt.call(e) == c);
1403
+ return Xr(e) && ct.call(e, "callee") && (!Ce.call(e, "callee") || Rt.call(e) == c);
1404
1404
  }
1405
- var ue = Array.isArray;
1405
+ var le = Array.isArray;
1406
1406
  function Bt(e) {
1407
- return e != null && We(e.length) && !le(e);
1407
+ return e != null && Be(e.length) && !fe(e);
1408
1408
  }
1409
1409
  function Xr(e) {
1410
- return Be(e) && Bt(e);
1410
+ return $e(e) && Bt(e);
1411
1411
  }
1412
- var Ge = zt || Jr;
1413
- function le(e) {
1412
+ var We = zt || Jr;
1413
+ function fe(e) {
1414
1414
  var a = ft(e) ? Rt.call(e) : "";
1415
- return a == k || a == H;
1415
+ return a == E || a == H;
1416
1416
  }
1417
- function We(e) {
1417
+ function Be(e) {
1418
1418
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
1419
1419
  }
1420
1420
  function ft(e) {
1421
1421
  var a = typeof e;
1422
1422
  return !!e && (a == "object" || a == "function");
1423
1423
  }
1424
- function Be(e) {
1424
+ function $e(e) {
1425
1425
  return !!e && typeof e == "object";
1426
1426
  }
1427
- function fe(e) {
1427
+ function pe(e) {
1428
1428
  return Bt(e) ? Ut(e) : zr(e);
1429
1429
  }
1430
1430
  function qr() {
@@ -1433,7 +1433,7 @@ Je.exports;
1433
1433
  function Jr() {
1434
1434
  return !1;
1435
1435
  }
1436
- t.exports = Ue;
1436
+ t.exports = Le;
1437
1437
  })(Je, Je.exports);
1438
1438
  var $i = Je.exports;
1439
1439
  const Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
@@ -1481,7 +1481,7 @@ const Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
1481
1481
  x: 0,
1482
1482
  y: 0,
1483
1483
  blur: 0
1484
- }, ge = (t, r) => {
1484
+ }, _e = (t, r) => {
1485
1485
  let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
1486
1486
  const i = {
1487
1487
  from: 0,
@@ -1567,7 +1567,7 @@ const Pn = async (t, r) => {
1567
1567
  name: "video",
1568
1568
  details: f,
1569
1569
  playbackRate: t.playbackRate || 1,
1570
- display: ge(t.display, { duration: i.duration, trim: c })
1570
+ display: _e(t.display, { duration: i.duration, trim: c })
1571
1571
  };
1572
1572
  }, Dn = async (t) => {
1573
1573
  const r = t.id, n = t.details, s = (await Yi(n.src)).duration, c = ei(t.trim, { duration: s });
@@ -1575,7 +1575,7 @@ const Pn = async (t, r) => {
1575
1575
  id: r,
1576
1576
  name: "",
1577
1577
  type: "audio",
1578
- display: ge(t.display, { duration: s, trim: c }),
1578
+ display: _e(t.display, { duration: s, trim: c }),
1579
1579
  trim: c,
1580
1580
  playbackRate: t.playbackRate || 1,
1581
1581
  details: {
@@ -1592,7 +1592,7 @@ const Pn = async (t, r) => {
1592
1592
  id: t.id,
1593
1593
  type: "image",
1594
1594
  name: "image",
1595
- display: ge(t.display),
1595
+ display: _e(t.display),
1596
1596
  playbackRate: t.playbackRate || 1,
1597
1597
  details: {
1598
1598
  src: n.src || "",
@@ -1643,7 +1643,7 @@ const Pn = async (t, r) => {
1643
1643
  id: i,
1644
1644
  name: "caption",
1645
1645
  type: "caption",
1646
- display: ge(n.display),
1646
+ display: _e(n.display),
1647
1647
  details: {
1648
1648
  ...c,
1649
1649
  text: s.text || "",
@@ -1675,7 +1675,7 @@ const Pn = async (t, r) => {
1675
1675
  id: n,
1676
1676
  name: "text",
1677
1677
  type: "text",
1678
- display: ge(t.display),
1678
+ display: _e(t.display),
1679
1679
  details: {
1680
1680
  ...s,
1681
1681
  text: i.text || "",
@@ -1753,7 +1753,7 @@ function Fn(t = 16) {
1753
1753
  let i = ln(t - 1);
1754
1754
  return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
1755
1755
  }
1756
- const Ve = (t) => Object.keys(t).reduce((r, n) => {
1756
+ const Yt = (t) => Object.keys(t).reduce((r, n) => {
1757
1757
  const { display: i, playbackRate: s } = t[n];
1758
1758
  return Math.max(r, i.to / (s || 1));
1759
1759
  }, 0);
@@ -1773,190 +1773,178 @@ function Ji(t) {
1773
1773
  ), d = r.subscribe(async (p) => {
1774
1774
  var h, l;
1775
1775
  if (p.key === _i) {
1776
- const b = Z(t.getState()), v = (h = p.value) == null ? void 0 : h.payload, _ = v.trackItemIds, y = v.trackItemsMap, g = v.trackItemDetailsMap;
1776
+ const y = (h = p.value) == null ? void 0 : h.payload, v = y.size, _ = y.trackItemIds, m = y.trackItemsMap, g = y.trackItemDetailsMap;
1777
1777
  console.warn("IMPROVE FONTS LOADING");
1778
- const j = _.map(async (I) => {
1779
- var P;
1778
+ const C = _.map(async (I) => {
1779
+ var x;
1780
1780
  try {
1781
- const S = g[I], T = y[I];
1781
+ const S = g[I], j = m[I];
1782
1782
  if (S.type === "image") {
1783
- const E = await Cn(
1784
- { id: I, details: S.details, ...T },
1783
+ const k = await Cn(
1784
+ { id: I, details: S.details, ...j },
1785
1785
  {
1786
- size: b.size
1786
+ size: v
1787
1787
  }
1788
- ), { details: M, ...$ } = E;
1789
- g[I] = { type: "image", details: M }, y[I] = $;
1788
+ ), { details: T, ...U } = k;
1789
+ g[I] = { type: "image", details: T }, m[I] = U;
1790
1790
  } else if (S.type === "video") {
1791
- const E = Z(
1792
- (P = p.value) == null ? void 0 : P.payload.trackItemsMap[I]
1793
- ), M = await Pn(
1794
- { ...S, ...E, ...T },
1791
+ const k = Z(
1792
+ (x = p.value) == null ? void 0 : x.payload.trackItemsMap[I]
1793
+ ), T = await Pn(
1794
+ { ...S, ...k, ...j },
1795
1795
  {
1796
- size: {
1797
- width: 1080,
1798
- height: 1920
1799
- }
1796
+ size: v
1800
1797
  }
1801
- ), { details: $, ...bt } = M;
1802
- g[I] = { type: "video", details: $ }, y[I] = bt;
1798
+ ), { details: U, ...bt } = T;
1799
+ g[I] = { type: "video", details: U }, m[I] = bt;
1803
1800
  } else if (S.type === "audio") {
1804
- const E = await Dn({
1801
+ const k = await Dn({
1805
1802
  id: I,
1806
1803
  details: S.details,
1807
- ...T
1808
- }), { details: M, ...$ } = E;
1809
- g[I] = { type: "audio", details: M }, y[I] = $;
1804
+ ...j
1805
+ }), { details: T, ...U } = k;
1806
+ g[I] = { type: "audio", details: T }, m[I] = U;
1810
1807
  } else if (S.type === "caption") {
1811
- const E = await jn(
1812
- { id: I, details: S.details, ...T },
1808
+ const k = await jn(
1809
+ { id: I, details: S.details, ...j },
1813
1810
  {
1814
- size: {
1815
- width: 1080,
1816
- height: 1920
1817
- }
1811
+ size: v
1818
1812
  }
1819
- ), { details: M, ...$ } = E;
1820
- g[I] = { type: "caption", details: M }, y[I] = $;
1813
+ ), { details: T, ...U } = k;
1814
+ g[I] = { type: "caption", details: T }, m[I] = U;
1821
1815
  } else if (S.type === "text") {
1822
- const E = await Rn(
1823
- { id: I, details: S.details, ...T },
1816
+ const k = await Rn(
1817
+ { id: I, details: S.details, ...j },
1824
1818
  {
1825
- size: {
1826
- width: 1080,
1827
- height: 1920
1828
- }
1819
+ size: v
1829
1820
  }
1830
- ), { details: M, ...$ } = E;
1831
- g[I] = { type: "text", details: M }, y[I] = $;
1821
+ ), { details: T, ...U } = k;
1822
+ g[I] = { type: "text", details: T }, m[I] = U;
1832
1823
  }
1833
1824
  return !0;
1834
1825
  } catch {
1835
1826
  return !1;
1836
1827
  }
1837
1828
  });
1838
- await Promise.all(j);
1839
- const O = Ve(y);
1829
+ await Promise.all(C);
1830
+ const O = Yt(m);
1840
1831
  t.updateState({
1841
- ...v,
1842
- trackItemsMap: y,
1832
+ ...y,
1833
+ trackItemsMap: m,
1843
1834
  duration: O
1844
1835
  });
1845
1836
  }
1846
1837
  if (p.key === vi) {
1847
- const b = (l = p.value) == null ? void 0 : l.payload;
1838
+ const y = (l = p.value) == null ? void 0 : l.payload;
1848
1839
  t.updateState({
1849
- size: b
1840
+ size: y
1850
1841
  });
1851
1842
  }
1852
- }), x = s.subscribe((p) => {
1843
+ }), M = s.subscribe((p) => {
1853
1844
  if (p.key === Ii) return t.undo();
1854
1845
  if (p.key === Si) return t.redo();
1855
1846
  }), F = i.subscribe((p) => {
1856
- var l, b, v;
1847
+ var l, y, v;
1857
1848
  const h = [];
1858
- if ((l = p.value) != null && l.payload.trackItemIds && (h.push((b = p.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === wi) {
1859
- const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, y = Z(t.getState()), g = _ && _.length ? _ : y.activeIds, j = y.trackItemIds, O = y.trackItemDetailsMap, I = j.filter(
1860
- (M) => !g.includes(M)
1861
- ), P = Object.fromEntries(
1849
+ if ((l = p.value) != null && l.payload.trackItemIds && (h.push((y = p.value) == null ? void 0 : y.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === wi) {
1850
+ const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, m = Z(t.getState()), g = _ && _.length ? _ : m.activeIds, C = m.trackItemIds, O = m.trackItemDetailsMap, I = C.filter(
1851
+ (T) => !g.includes(T)
1852
+ ), x = Object.fromEntries(
1862
1853
  Object.entries(O).filter(
1863
- ([M]) => !g.includes(M)
1854
+ ([T]) => !g.includes(T)
1864
1855
  )
1865
1856
  ), S = qi(
1866
- y.tracks,
1857
+ m.tracks,
1867
1858
  g
1868
- ), T = Object.fromEntries(
1869
- Object.entries(y.trackItemsMap).filter(
1870
- ([M]) => !g.includes(M)
1859
+ ), j = Object.fromEntries(
1860
+ Object.entries(m.trackItemsMap).filter(
1861
+ ([T]) => !g.includes(T)
1871
1862
  )
1872
- ), E = Ve(y.trackItemsMap);
1863
+ ), k = Yt(j);
1873
1864
  t.updateState(
1874
1865
  {
1875
1866
  trackItemIds: I,
1876
- trackItemDetailsMap: P,
1867
+ trackItemDetailsMap: x,
1877
1868
  activeIds: [],
1878
- trackItemsMap: T,
1869
+ trackItemsMap: j,
1879
1870
  tracks: S,
1880
- duration: E
1871
+ duration: k
1881
1872
  },
1882
1873
  { updateHistory: !0, kind: "remove" }
1883
1874
  );
1884
1875
  }
1885
- }), k = n.subscribe(async (p) => {
1886
- var _, y, g, j, O;
1876
+ }), E = n.subscribe(async (p) => {
1877
+ var _, m, g, C, O;
1887
1878
  const h = Z(t.getState());
1888
- let l = [], b = "text";
1879
+ let l = [], y = "text";
1889
1880
  if (p.key === Ti) {
1890
- b = "caption";
1891
- const I = (_ = p.value) == null ? void 0 : _.payload, P = [];
1892
- for (const E of I) {
1893
- const M = jn(E, {
1881
+ y = "caption";
1882
+ const I = (_ = p.value) == null ? void 0 : _.payload, x = [];
1883
+ for (const k of I) {
1884
+ const T = jn(k, {
1894
1885
  size: h.size
1895
1886
  });
1896
- P.push(M);
1887
+ x.push(T);
1897
1888
  }
1898
- const S = await Promise.all(P), T = [];
1899
- for (const E of S) {
1900
- const M = E.id;
1901
- T.push(M);
1902
- const { details: $, ...bt } = E;
1903
- h.trackItemDetailsMap[M] = {
1904
- type: b,
1905
- details: $
1906
- }, h.trackItemsMap[M] = bt, h.trackItemIds.push(M);
1889
+ const S = await Promise.all(x), j = [];
1890
+ for (const k of S) {
1891
+ const T = k.id;
1892
+ j.push(T);
1893
+ const { details: U, ...bt } = k;
1894
+ h.trackItemDetailsMap[T] = {
1895
+ type: y,
1896
+ details: U
1897
+ }, h.trackItemsMap[T] = bt, h.trackItemIds.push(T);
1907
1898
  }
1908
- l = T;
1899
+ l = j;
1909
1900
  }
1910
1901
  if (p.key === ki) {
1911
- b = "text";
1912
- const I = await Rn((y = p.value) == null ? void 0 : y.payload, {
1902
+ y = "text";
1903
+ const I = await Rn((m = p.value) == null ? void 0 : m.payload, {
1913
1904
  size: h.size
1914
- }), { details: P, ...S } = I;
1905
+ }), { details: x, ...S } = I;
1915
1906
  h.trackItemDetailsMap[S.id] = {
1916
- type: b,
1917
- details: P
1907
+ type: y,
1908
+ details: x
1918
1909
  }, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
1919
1910
  }
1920
1911
  if (p.key === Ei) {
1921
- b = "image";
1912
+ y = "image";
1922
1913
  const I = await Cn((g = p.value) == null ? void 0 : g.payload, {
1923
- size: {
1924
- width: 1080,
1925
- height: 1920
1926
- }
1927
- }), { details: P, ...S } = I;
1914
+ size: h.size
1915
+ }), { details: x, ...S } = I;
1928
1916
  h.trackItemDetailsMap[S.id] = {
1929
- type: b,
1930
- details: P
1917
+ type: y,
1918
+ details: x
1931
1919
  }, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
1932
1920
  }
1933
1921
  if (p.key === Ai) {
1934
- b = "audio";
1935
- const I = await Dn((j = p.value) == null ? void 0 : j.payload), { details: P, ...S } = I;
1922
+ y = "audio";
1923
+ const I = await Dn((C = p.value) == null ? void 0 : C.payload), { details: x, ...S } = I;
1936
1924
  h.trackItemDetailsMap[S.id] = {
1937
- type: b,
1938
- details: P
1925
+ type: y,
1926
+ details: x
1939
1927
  }, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
1940
1928
  }
1941
1929
  if (p.key === Oi) {
1942
- b = "video";
1930
+ y = "video";
1943
1931
  const I = await Pn((O = p.value) == null ? void 0 : O.payload, {
1944
1932
  size: h.size
1945
- }), { details: P, ...S } = I;
1933
+ }), { details: x, ...S } = I;
1946
1934
  h.trackItemDetailsMap[S.id] = {
1947
- type: b,
1948
- details: P
1935
+ type: y,
1936
+ details: x
1949
1937
  }, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
1950
1938
  }
1951
1939
  h.tracks.unshift({
1952
1940
  id: ln(),
1953
1941
  accepts: ["text", "audio", "helper", "video", "image", "caption"],
1954
- type: b,
1942
+ type: y,
1955
1943
  items: l,
1956
1944
  magnetic: !1,
1957
1945
  static: !1
1958
1946
  });
1959
- const v = Ve(h.trackItemsMap);
1947
+ const v = Yt(h.trackItemsMap);
1960
1948
  t.updateState(
1961
1949
  {
1962
1950
  trackItemIds: h.trackItemIds,
@@ -1972,25 +1960,25 @@ function Ji(t) {
1972
1960
  );
1973
1961
  }), H = c.subscribe(async (p) => {
1974
1962
  var h;
1975
- if (p.key === xi) {
1976
- const l = Z(t.getState()), b = (h = p.value) == null ? void 0 : h.options.time;
1963
+ if (p.key === Mi) {
1964
+ const l = Z(t.getState()), y = (h = p.value) == null ? void 0 : h.options.time;
1977
1965
  if (l.activeIds.length === 1) {
1978
1966
  const v = l.activeIds[0], _ = l.trackItemsMap[v];
1979
- if (b >= _.display.to || b <= _.display.from)
1967
+ if (y >= _.display.to || y <= _.display.from)
1980
1968
  return;
1981
- const y = l.trackItemDetailsMap[v], g = Fn(), j = {
1969
+ const m = l.trackItemDetailsMap[v], g = Fn(), C = {
1982
1970
  ..._,
1983
1971
  id: g,
1984
1972
  display: {
1985
- from: b,
1973
+ from: y,
1986
1974
  to: _.display.to
1987
1975
  },
1988
1976
  trim: {
1989
- from: b,
1977
+ from: y,
1990
1978
  to: _.display.to
1991
1979
  }
1992
1980
  };
1993
- l.trackItemsMap[v].display.to = b, l.trackItemsMap[g] = j, l.trackItemIds.push(g), l.trackItemDetailsMap[g] = y, l.tracks.forEach((O) => {
1981
+ l.trackItemsMap[v].display.to = y, l.trackItemsMap[g] = C, l.trackItemIds.push(g), l.trackItemDetailsMap[g] = m, l.tracks.forEach((O) => {
1994
1982
  O.items.includes(v) && O.items.push(g);
1995
1983
  }), t.updateState(
1996
1984
  {
@@ -2007,54 +1995,54 @@ function Ji(t) {
2007
1995
  }
2008
1996
  return;
2009
1997
  }
2010
- if (p.key === Mi) {
1998
+ if (p.key === xi) {
2011
1999
  const l = Z(t.getState());
2012
2000
  if (l.activeIds.length) {
2013
- const b = l.activeIds, v = [], _ = {
2014
- activeIds: b,
2001
+ const y = l.activeIds, v = [], _ = {
2002
+ activeIds: y,
2015
2003
  trackItemDetailsMap: {},
2016
2004
  trackItemsMap: {},
2017
2005
  tracks: []
2018
2006
  };
2019
- b.forEach((g) => {
2007
+ y.forEach((g) => {
2020
2008
  _.trackItemDetailsMap[g] = l.trackItemDetailsMap[g], _.trackItemsMap[g] = l.trackItemsMap[g], v.push(
2021
- l.tracks.find((j) => j.items.includes(g))
2009
+ l.tracks.find((C) => C.items.includes(g))
2022
2010
  );
2023
2011
  });
2024
- const y = /* @__PURE__ */ new Set();
2025
- v.filter((g) => y.has(g.id) ? !1 : (y.add(g), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
2012
+ const m = /* @__PURE__ */ new Set();
2013
+ v.filter((g) => m.has(g.id) ? !1 : (m.add(g), !0)), _.tracks = Array.from(m.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
2026
2014
  }
2027
2015
  }
2028
2016
  if (p.key === Pi) {
2029
2017
  const l = localStorage.getItem("DesignComboTemp");
2030
2018
  if (!l) return;
2031
- const b = Z(t.getState()), v = JSON.parse(l), _ = {}, y = v.trackItemsMap, g = v.trackItemDetailsMap, j = v.tracks, O = [], I = v.activeIds.map(async (P) => {
2032
- const S = g[P];
2019
+ const y = Z(t.getState()), v = JSON.parse(l), _ = {}, m = v.trackItemsMap, g = v.trackItemDetailsMap, C = v.tracks, O = [], I = v.activeIds.map(async (x) => {
2020
+ const S = g[x];
2033
2021
  (S.type === "caption" || S.type === "text") && S.details.fontUrl && await gn([
2034
2022
  {
2035
2023
  fontFamily: S.details.fontFamily,
2036
2024
  url: S.details.fontUrl
2037
2025
  }
2038
2026
  ]);
2039
- const T = Fn();
2040
- return _[P] = T, b.trackItemsMap[T] = {
2041
- ...y[P],
2042
- id: T
2043
- }, b.trackItemDetailsMap[T] = S, b.trackItemIds.push(T), !0;
2027
+ const j = Fn();
2028
+ return _[x] = j, y.trackItemsMap[j] = {
2029
+ ...m[x],
2030
+ id: j
2031
+ }, y.trackItemDetailsMap[j] = S, y.trackItemIds.push(j), !0;
2044
2032
  });
2045
- await Promise.all(I), j.forEach((P) => {
2046
- const S = P.items.map((E) => _[E]), T = {
2047
- ...P,
2033
+ await Promise.all(I), C.forEach((x) => {
2034
+ const S = x.items.map((k) => _[k]), j = {
2035
+ ...x,
2048
2036
  items: S,
2049
2037
  id: ln()
2050
2038
  };
2051
- O.push(T);
2052
- }), b.tracks = [...b.tracks, ...O], t.updateState(
2039
+ O.push(j);
2040
+ }), y.tracks = [...y.tracks, ...O], t.updateState(
2053
2041
  {
2054
- trackItemDetailsMap: b.trackItemDetailsMap,
2055
- tracks: b.tracks,
2056
- trackItemIds: b.trackItemIds,
2057
- trackItemsMap: b.trackItemsMap
2042
+ trackItemDetailsMap: y.trackItemDetailsMap,
2043
+ tracks: y.tracks,
2044
+ trackItemIds: y.trackItemIds,
2045
+ trackItemsMap: y.trackItemsMap
2058
2046
  },
2059
2047
  {
2060
2048
  updateHistory: !0,
@@ -2062,25 +2050,25 @@ function Ji(t) {
2062
2050
  }
2063
2051
  );
2064
2052
  }
2065
- }), m = f.subscribe((p) => {
2053
+ }), b = f.subscribe((p) => {
2066
2054
  var h, l;
2067
2055
  if (p.key === Di) {
2068
- const b = Z(t.getState()), v = b.trackItemDetailsMap, _ = b.trackItemsMap, y = Object.keys((h = p.value) == null ? void 0 : h.payload);
2069
- if (!y.length) return;
2056
+ const y = Z(t.getState()), v = y.trackItemDetailsMap, _ = y.trackItemsMap, m = Object.keys((h = p.value) == null ? void 0 : h.payload);
2057
+ if (!m.length) return;
2070
2058
  const g = (l = p.value) == null ? void 0 : l.payload;
2071
- y.forEach((O) => {
2059
+ m.forEach((O) => {
2072
2060
  const I = g[O];
2073
2061
  I.details ? v[O].details = {
2074
2062
  ...v[O].details,
2075
2063
  ...I.details
2076
2064
  } : I.playbackRate && (_[O].playbackRate = I.playbackRate);
2077
2065
  });
2078
- const j = Ve(_);
2066
+ const C = Yt(_);
2079
2067
  t.updateState(
2080
2068
  {
2081
2069
  trackItemDetailsMap: { ...v },
2082
2070
  trackItemsMap: { ..._ },
2083
- duration: j
2071
+ duration: C
2084
2072
  },
2085
2073
  {
2086
2074
  updateHistory: !0,
@@ -2091,17 +2079,17 @@ function Ji(t) {
2091
2079
  });
2092
2080
  return {
2093
2081
  unsubscribe: () => {
2094
- k.unsubscribe(), H.unsubscribe(), m.unsubscribe(), x.unsubscribe(), F.unsubscribe(), d.unsubscribe();
2082
+ E.unsubscribe(), H.unsubscribe(), b.unsubscribe(), M.unsubscribe(), F.unsubscribe(), d.unsubscribe();
2095
2083
  }
2096
2084
  };
2097
2085
  }
2098
2086
  const Zi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
2099
2087
  function ni(t, r, n = { cyclesFix: !0 }, i = []) {
2100
- var d, x;
2088
+ var d, M;
2101
2089
  let s = [];
2102
2090
  const c = Array.isArray(t);
2103
2091
  for (const F in t) {
2104
- const k = t[F], H = c ? +F : F;
2092
+ const E = t[F], H = c ? +F : F;
2105
2093
  if (!(F in r)) {
2106
2094
  s.push({
2107
2095
  type: "REMOVE",
@@ -2110,16 +2098,16 @@ function ni(t, r, n = { cyclesFix: !0 }, i = []) {
2110
2098
  });
2111
2099
  continue;
2112
2100
  }
2113
- const m = r[F], p = typeof k == "object" && typeof m == "object" && Array.isArray(k) === Array.isArray(m);
2114
- if (k && m && p && !Zi[(x = (d = Object.getPrototypeOf(k)) == null ? void 0 : d.constructor) == null ? void 0 : x.name] && (!n.cyclesFix || !i.includes(k))) {
2115
- const h = ni(k, m, n, n.cyclesFix ? i.concat([k]) : []);
2101
+ const b = r[F], p = typeof E == "object" && typeof b == "object" && Array.isArray(E) === Array.isArray(b);
2102
+ if (E && b && p && !Zi[(M = (d = Object.getPrototypeOf(E)) == null ? void 0 : d.constructor) == null ? void 0 : M.name] && (!n.cyclesFix || !i.includes(E))) {
2103
+ const h = ni(E, b, n, n.cyclesFix ? i.concat([E]) : []);
2116
2104
  s.push.apply(s, h.map((l) => (l.path.unshift(H), l)));
2117
- } else k !== m && // treat NaN values as equivalent
2118
- !(Number.isNaN(k) && Number.isNaN(m)) && !(p && (isNaN(k) ? k + "" == m + "" : +k == +m)) && s.push({
2105
+ } else E !== b && // treat NaN values as equivalent
2106
+ !(Number.isNaN(E) && Number.isNaN(b)) && !(p && (isNaN(E) ? E + "" == b + "" : +E == +b)) && s.push({
2119
2107
  path: [H],
2120
2108
  type: "CHANGE",
2121
- value: m,
2122
- oldValue: k
2109
+ value: b,
2110
+ oldValue: E
2123
2111
  });
2124
2112
  }
2125
2113
  const f = Array.isArray(r);
@@ -2131,7 +2119,7 @@ function ni(t, r, n = { cyclesFix: !0 }, i = []) {
2131
2119
  });
2132
2120
  return s;
2133
2121
  }
2134
- var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), Q = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
2122
+ var _n = Symbol.for("immer-nothing"), de = Symbol.for("immer-draftable"), Q = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
2135
2123
  // All error codes, starting by 0:
2136
2124
  function(t) {
2137
2125
  return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
@@ -2162,7 +2150,7 @@ var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), Q = Sy
2162
2150
  // Note: if more errors are added, the errorOffset in Patches.ts should be increased
2163
2151
  // See Patches.ts for additional errors
2164
2152
  ] : [];
2165
- function G(t, ...r) {
2153
+ function W(t, ...r) {
2166
2154
  if (process.env.NODE_ENV !== "production") {
2167
2155
  const n = ii[t], i = typeof n == "function" ? n.apply(null, r) : n;
2168
2156
  throw new Error(`[Immer] ${i}`);
@@ -2171,34 +2159,34 @@ function G(t, ...r) {
2171
2159
  `[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
2172
2160
  );
2173
2161
  }
2174
- var Mt = Object.getPrototypeOf;
2162
+ var xt = Object.getPrototypeOf;
2175
2163
  function Pt(t) {
2176
2164
  return !!t && !!t[Q];
2177
2165
  }
2178
2166
  function vt(t) {
2179
2167
  var r;
2180
- return t ? ai(t) || Array.isArray(t) || !!t[pe] || !!((r = t.constructor) != null && r[pe]) || _e(t) || ve(t) : !1;
2168
+ return t ? ai(t) || Array.isArray(t) || !!t[de] || !!((r = t.constructor) != null && r[de]) || ve(t) || Ie(t) : !1;
2181
2169
  }
2182
2170
  var Qi = Object.prototype.constructor.toString();
2183
2171
  function ai(t) {
2184
2172
  if (!t || typeof t != "object")
2185
2173
  return !1;
2186
- const r = Mt(t);
2174
+ const r = xt(t);
2187
2175
  if (r === null)
2188
2176
  return !0;
2189
2177
  const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
2190
2178
  return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Qi;
2191
2179
  }
2192
- function de(t, r) {
2180
+ function he(t, r) {
2193
2181
  Dt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
2194
2182
  r(n, t[n], t);
2195
2183
  }) : t.forEach((n, i) => r(i, n, t));
2196
2184
  }
2197
2185
  function Dt(t) {
2198
2186
  const r = t[Q];
2199
- return r ? r.type_ : Array.isArray(t) ? 1 : _e(t) ? 2 : ve(t) ? 3 : 0;
2187
+ return r ? r.type_ : Array.isArray(t) ? 1 : ve(t) ? 2 : Ie(t) ? 3 : 0;
2200
2188
  }
2201
- function he(t, r) {
2189
+ function ye(t, r) {
2202
2190
  return Dt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
2203
2191
  }
2204
2192
  function tn(t, r) {
@@ -2211,19 +2199,19 @@ function si(t, r, n) {
2211
2199
  function ta(t, r) {
2212
2200
  return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
2213
2201
  }
2214
- function _e(t) {
2202
+ function ve(t) {
2215
2203
  return t instanceof Map;
2216
2204
  }
2217
- function ve(t) {
2205
+ function Ie(t) {
2218
2206
  return t instanceof Set;
2219
2207
  }
2220
- function xt(t) {
2208
+ function Mt(t) {
2221
2209
  return t.copy_ || t.base_;
2222
2210
  }
2223
2211
  function fn(t, r) {
2224
- if (_e(t))
2225
- return new Map(t);
2226
2212
  if (ve(t))
2213
+ return new Map(t);
2214
+ if (Ie(t))
2227
2215
  return new Set(t);
2228
2216
  if (Array.isArray(t))
2229
2217
  return Array.prototype.slice.call(t);
@@ -2242,9 +2230,9 @@ function fn(t, r) {
2242
2230
  value: t[f]
2243
2231
  });
2244
2232
  }
2245
- return Object.create(Mt(t), i);
2233
+ return Object.create(xt(t), i);
2246
2234
  } else {
2247
- const i = Mt(t);
2235
+ const i = xt(t);
2248
2236
  if (i !== null && n)
2249
2237
  return { ...t };
2250
2238
  const s = Object.create(i);
@@ -2255,7 +2243,7 @@ function vn(t, r = !1) {
2255
2243
  return nr(t) || Pt(t) || !vt(t) || (Dt(t) > 1 && (t.set = t.add = t.clear = t.delete = ea), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => vn(i, !0))), t;
2256
2244
  }
2257
2245
  function ea() {
2258
- G(2);
2246
+ W(2);
2259
2247
  }
2260
2248
  function nr(t) {
2261
2249
  return Object.isFrozen(t);
@@ -2263,14 +2251,14 @@ function nr(t) {
2263
2251
  var pn = {};
2264
2252
  function Ct(t) {
2265
2253
  const r = pn[t];
2266
- return r || G(0, t), r;
2254
+ return r || W(0, t), r;
2267
2255
  }
2268
2256
  function ra(t, r) {
2269
2257
  pn[t] || (pn[t] = r);
2270
2258
  }
2271
- var ye;
2259
+ var me;
2272
2260
  function oi() {
2273
- return ye;
2261
+ return me;
2274
2262
  }
2275
2263
  function na(t, r) {
2276
2264
  return {
@@ -2290,10 +2278,10 @@ function dn(t) {
2290
2278
  hn(t), t.drafts_.forEach(ia), t.drafts_ = null;
2291
2279
  }
2292
2280
  function hn(t) {
2293
- t === ye && (ye = t.parent_);
2281
+ t === me && (me = t.parent_);
2294
2282
  }
2295
2283
  function Nn(t) {
2296
- return ye = na(ye, t);
2284
+ return me = na(me, t);
2297
2285
  }
2298
2286
  function ia(t) {
2299
2287
  const r = t[Q];
@@ -2302,7 +2290,7 @@ function ia(t) {
2302
2290
  function Hn(t, r) {
2303
2291
  r.unfinalizedDrafts_ = r.drafts_.length;
2304
2292
  const n = r.drafts_[0];
2305
- return t !== void 0 && t !== n ? (n[Q].modified_ && (dn(r), G(4)), vt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Ct("Patches").generateReplacementPatches_(
2293
+ return t !== void 0 && t !== n ? (n[Q].modified_ && (dn(r), W(4)), vt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Ct("Patches").generateReplacementPatches_(
2306
2294
  n[Q].base_,
2307
2295
  t,
2308
2296
  r.patches_,
@@ -2314,7 +2302,7 @@ function Ze(t, r, n) {
2314
2302
  return r;
2315
2303
  const i = r[Q];
2316
2304
  if (!i)
2317
- return de(
2305
+ return he(
2318
2306
  r,
2319
2307
  (s, c) => Un(t, i, r, s, c, n)
2320
2308
  ), r;
@@ -2326,9 +2314,9 @@ function Ze(t, r, n) {
2326
2314
  i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
2327
2315
  const s = i.copy_;
2328
2316
  let c = s, f = !1;
2329
- i.type_ === 3 && (c = new Set(s), s.clear(), f = !0), de(
2317
+ i.type_ === 3 && (c = new Set(s), s.clear(), f = !0), he(
2330
2318
  c,
2331
- (d, x) => Un(t, i, s, d, x, n, f)
2319
+ (d, M) => Un(t, i, s, d, M, n, f)
2332
2320
  ), Qe(t, s, !1), n && t.patches_ && Ct("Patches").generatePatches_(
2333
2321
  i,
2334
2322
  n,
@@ -2339,10 +2327,10 @@ function Ze(t, r, n) {
2339
2327
  return i.copy_;
2340
2328
  }
2341
2329
  function Un(t, r, n, i, s, c, f) {
2342
- if (process.env.NODE_ENV !== "production" && s === n && G(5), Pt(s)) {
2330
+ if (process.env.NODE_ENV !== "production" && s === n && W(5), Pt(s)) {
2343
2331
  const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
2344
- !he(r.assigned_, i) ? c.concat(i) : void 0, x = Ze(t, s, d);
2345
- if (si(n, i, x), Pt(x))
2332
+ !ye(r.assigned_, i) ? c.concat(i) : void 0, M = Ze(t, s, d);
2333
+ if (si(n, i, M), Pt(M))
2346
2334
  t.canAutoFreeze_ = !1;
2347
2335
  else
2348
2336
  return;
@@ -2381,7 +2369,7 @@ function aa(t, r) {
2381
2369
  isManual_: !1
2382
2370
  };
2383
2371
  let s = i, c = In;
2384
- n && (s = [i], c = me);
2372
+ n && (s = [i], c = be);
2385
2373
  const { revoke: f, proxy: d } = Proxy.revocable(s, c);
2386
2374
  return i.draft_ = d, i.revoke_ = f, d;
2387
2375
  }
@@ -2389,27 +2377,27 @@ var In = {
2389
2377
  get(t, r) {
2390
2378
  if (r === Q)
2391
2379
  return t;
2392
- const n = xt(t);
2393
- if (!he(n, r))
2380
+ const n = Mt(t);
2381
+ if (!ye(n, r))
2394
2382
  return sa(t, n, r);
2395
2383
  const i = n[r];
2396
2384
  return t.finalized_ || !vt(i) ? i : i === en(t.base_, r) ? (rn(t), t.copy_[r] = mn(i, t)) : i;
2397
2385
  },
2398
2386
  has(t, r) {
2399
- return r in xt(t);
2387
+ return r in Mt(t);
2400
2388
  },
2401
2389
  ownKeys(t) {
2402
- return Reflect.ownKeys(xt(t));
2390
+ return Reflect.ownKeys(Mt(t));
2403
2391
  },
2404
2392
  set(t, r, n) {
2405
- const i = ci(xt(t), r);
2393
+ const i = ci(Mt(t), r);
2406
2394
  if (i != null && i.set)
2407
2395
  return i.set.call(t.draft_, n), !0;
2408
2396
  if (!t.modified_) {
2409
- const s = en(xt(t), r), c = s == null ? void 0 : s[Q];
2397
+ const s = en(Mt(t), r), c = s == null ? void 0 : s[Q];
2410
2398
  if (c && c.base_ === n)
2411
2399
  return t.copy_[r] = n, t.assigned_[r] = !1, !0;
2412
- if (ta(n, s) && (n !== void 0 || he(t.base_, r)))
2400
+ if (ta(n, s) && (n !== void 0 || ye(t.base_, r)))
2413
2401
  return !0;
2414
2402
  rn(t), yn(t);
2415
2403
  }
@@ -2423,7 +2411,7 @@ var In = {
2423
2411
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
2424
2412
  // the same guarantee in ES5 mode.
2425
2413
  getOwnPropertyDescriptor(t, r) {
2426
- const n = xt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
2414
+ const n = Mt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
2427
2415
  return i && {
2428
2416
  writable: !0,
2429
2417
  configurable: t.type_ !== 1 || r !== "length",
@@ -2432,29 +2420,29 @@ var In = {
2432
2420
  };
2433
2421
  },
2434
2422
  defineProperty() {
2435
- G(11);
2423
+ W(11);
2436
2424
  },
2437
2425
  getPrototypeOf(t) {
2438
- return Mt(t.base_);
2426
+ return xt(t.base_);
2439
2427
  },
2440
2428
  setPrototypeOf() {
2441
- G(12);
2429
+ W(12);
2442
2430
  }
2443
- }, me = {};
2444
- de(In, (t, r) => {
2445
- me[t] = function() {
2431
+ }, be = {};
2432
+ he(In, (t, r) => {
2433
+ be[t] = function() {
2446
2434
  return arguments[0] = arguments[0][0], r.apply(this, arguments);
2447
2435
  };
2448
2436
  });
2449
- me.deleteProperty = function(t, r) {
2450
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && G(13), me.set.call(this, t, r, void 0);
2437
+ be.deleteProperty = function(t, r) {
2438
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && W(13), be.set.call(this, t, r, void 0);
2451
2439
  };
2452
- me.set = function(t, r, n) {
2453
- return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
2440
+ be.set = function(t, r, n) {
2441
+ return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && W(14), In.set.call(this, t[0], r, n, t[0]);
2454
2442
  };
2455
2443
  function en(t, r) {
2456
2444
  const n = t[Q];
2457
- return (n ? xt(n) : t)[r];
2445
+ return (n ? Mt(n) : t)[r];
2458
2446
  }
2459
2447
  function sa(t, r, n) {
2460
2448
  var s;
@@ -2468,12 +2456,12 @@ function sa(t, r, n) {
2468
2456
  function ci(t, r) {
2469
2457
  if (!(r in t))
2470
2458
  return;
2471
- let n = Mt(t);
2459
+ let n = xt(t);
2472
2460
  for (; n; ) {
2473
2461
  const i = Object.getOwnPropertyDescriptor(n, r);
2474
2462
  if (i)
2475
2463
  return i;
2476
- n = Mt(n);
2464
+ n = xt(n);
2477
2465
  }
2478
2466
  }
2479
2467
  function yn(t) {
@@ -2492,11 +2480,11 @@ var oa = class {
2492
2480
  const c = n;
2493
2481
  n = r;
2494
2482
  const f = this;
2495
- return function(x = c, ...F) {
2496
- return f.produce(x, (k) => n.call(this, k, ...F));
2483
+ return function(M = c, ...F) {
2484
+ return f.produce(M, (E) => n.call(this, E, ...F));
2497
2485
  };
2498
2486
  }
2499
- typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
2487
+ typeof n != "function" && W(6), i !== void 0 && typeof i != "function" && W(7);
2500
2488
  let s;
2501
2489
  if (vt(r)) {
2502
2490
  const c = Nn(this), f = mn(r, void 0);
@@ -2514,10 +2502,10 @@ var oa = class {
2514
2502
  }
2515
2503
  return s;
2516
2504
  } else
2517
- G(1, r);
2505
+ W(1, r);
2518
2506
  }, this.produceWithPatches = (r, n) => {
2519
2507
  if (typeof r == "function")
2520
- return (f, ...d) => this.produceWithPatches(f, (x) => r(x, ...d));
2508
+ return (f, ...d) => this.produceWithPatches(f, (M) => r(M, ...d));
2521
2509
  let i, s;
2522
2510
  return [this.produce(r, n, (f, d) => {
2523
2511
  i = f, s = d;
@@ -2525,13 +2513,13 @@ var oa = class {
2525
2513
  }, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
2526
2514
  }
2527
2515
  createDraft(t) {
2528
- vt(t) || G(8), Pt(t) && (t = ca(t));
2516
+ vt(t) || W(8), Pt(t) && (t = ca(t));
2529
2517
  const r = Nn(this), n = mn(t, void 0);
2530
2518
  return n[Q].isManual_ = !0, hn(r), n;
2531
2519
  }
2532
2520
  finishDraft(t, r) {
2533
2521
  const n = t && t[Q];
2534
- (!n || !n.isManual_) && G(9);
2522
+ (!n || !n.isManual_) && W(9);
2535
2523
  const { scope_: i } = n;
2536
2524
  return zn(i, r), Hn(void 0, i);
2537
2525
  }
@@ -2569,11 +2557,11 @@ var oa = class {
2569
2557
  }
2570
2558
  };
2571
2559
  function mn(t, r) {
2572
- const n = _e(t) ? Ct("MapSet").proxyMap_(t, r) : ve(t) ? Ct("MapSet").proxySet_(t, r) : aa(t, r);
2560
+ const n = ve(t) ? Ct("MapSet").proxyMap_(t, r) : Ie(t) ? Ct("MapSet").proxySet_(t, r) : aa(t, r);
2573
2561
  return (r ? r.scope_ : oi()).drafts_.push(n), n;
2574
2562
  }
2575
2563
  function ca(t) {
2576
- return Pt(t) || G(10, t), ui(t);
2564
+ return Pt(t) || W(10, t), ui(t);
2577
2565
  }
2578
2566
  function ui(t) {
2579
2567
  if (!vt(t) || nr(t))
@@ -2586,124 +2574,124 @@ function ui(t) {
2586
2574
  r.finalized_ = !0, n = fn(t, r.scope_.immer_.useStrictShallowCopy_);
2587
2575
  } else
2588
2576
  n = fn(t, !0);
2589
- return de(n, (i, s) => {
2577
+ return he(n, (i, s) => {
2590
2578
  si(n, i, ui(s));
2591
2579
  }), r && (r.finalized_ = !1), n;
2592
2580
  }
2593
2581
  function Ln() {
2594
2582
  process.env.NODE_ENV !== "production" && ii.push(
2595
2583
  'Sets cannot have "replace" patches.',
2596
- function(m) {
2597
- return "Unsupported patch operation: " + m;
2584
+ function(b) {
2585
+ return "Unsupported patch operation: " + b;
2598
2586
  },
2599
- function(m) {
2600
- return "Cannot apply patch, path doesn't resolve: " + m;
2587
+ function(b) {
2588
+ return "Cannot apply patch, path doesn't resolve: " + b;
2601
2589
  },
2602
2590
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
2603
2591
  );
2604
2592
  const r = "replace", n = "add", i = "remove";
2605
- function s(m, p, h, l) {
2606
- switch (m.type_) {
2593
+ function s(b, p, h, l) {
2594
+ switch (b.type_) {
2607
2595
  case 0:
2608
2596
  case 2:
2609
2597
  return f(
2610
- m,
2598
+ b,
2611
2599
  p,
2612
2600
  h,
2613
2601
  l
2614
2602
  );
2615
2603
  case 1:
2616
- return c(m, p, h, l);
2604
+ return c(b, p, h, l);
2617
2605
  case 3:
2618
2606
  return d(
2619
- m,
2607
+ b,
2620
2608
  p,
2621
2609
  h,
2622
2610
  l
2623
2611
  );
2624
2612
  }
2625
2613
  }
2626
- function c(m, p, h, l) {
2627
- let { base_: b, assigned_: v } = m, _ = m.copy_;
2628
- _.length < b.length && ([b, _] = [_, b], [h, l] = [l, h]);
2629
- for (let y = 0; y < b.length; y++)
2630
- if (v[y] && _[y] !== b[y]) {
2631
- const g = p.concat([y]);
2614
+ function c(b, p, h, l) {
2615
+ let { base_: y, assigned_: v } = b, _ = b.copy_;
2616
+ _.length < y.length && ([y, _] = [_, y], [h, l] = [l, h]);
2617
+ for (let m = 0; m < y.length; m++)
2618
+ if (v[m] && _[m] !== y[m]) {
2619
+ const g = p.concat([m]);
2632
2620
  h.push({
2633
2621
  op: r,
2634
2622
  path: g,
2635
2623
  // Need to maybe clone it, as it can in fact be the original value
2636
2624
  // due to the base/copy inversion at the start of this function
2637
- value: H(_[y])
2625
+ value: H(_[m])
2638
2626
  }), l.push({
2639
2627
  op: r,
2640
2628
  path: g,
2641
- value: H(b[y])
2629
+ value: H(y[m])
2642
2630
  });
2643
2631
  }
2644
- for (let y = b.length; y < _.length; y++) {
2645
- const g = p.concat([y]);
2632
+ for (let m = y.length; m < _.length; m++) {
2633
+ const g = p.concat([m]);
2646
2634
  h.push({
2647
2635
  op: n,
2648
2636
  path: g,
2649
2637
  // Need to maybe clone it, as it can in fact be the original value
2650
2638
  // due to the base/copy inversion at the start of this function
2651
- value: H(_[y])
2639
+ value: H(_[m])
2652
2640
  });
2653
2641
  }
2654
- for (let y = _.length - 1; b.length <= y; --y) {
2655
- const g = p.concat([y]);
2642
+ for (let m = _.length - 1; y.length <= m; --m) {
2643
+ const g = p.concat([m]);
2656
2644
  l.push({
2657
2645
  op: i,
2658
2646
  path: g
2659
2647
  });
2660
2648
  }
2661
2649
  }
2662
- function f(m, p, h, l) {
2663
- const { base_: b, copy_: v } = m;
2664
- de(m.assigned_, (_, y) => {
2665
- const g = tn(b, _), j = tn(v, _), O = y ? he(b, _) ? r : n : i;
2666
- if (g === j && O === r)
2650
+ function f(b, p, h, l) {
2651
+ const { base_: y, copy_: v } = b;
2652
+ he(b.assigned_, (_, m) => {
2653
+ const g = tn(y, _), C = tn(v, _), O = m ? ye(y, _) ? r : n : i;
2654
+ if (g === C && O === r)
2667
2655
  return;
2668
2656
  const I = p.concat(_);
2669
- h.push(O === i ? { op: O, path: I } : { op: O, path: I, value: j }), l.push(
2657
+ h.push(O === i ? { op: O, path: I } : { op: O, path: I, value: C }), l.push(
2670
2658
  O === n ? { op: i, path: I } : O === i ? { op: n, path: I, value: H(g) } : { op: r, path: I, value: H(g) }
2671
2659
  );
2672
2660
  });
2673
2661
  }
2674
- function d(m, p, h, l) {
2675
- let { base_: b, copy_: v } = m, _ = 0;
2676
- b.forEach((y) => {
2677
- if (!v.has(y)) {
2662
+ function d(b, p, h, l) {
2663
+ let { base_: y, copy_: v } = b, _ = 0;
2664
+ y.forEach((m) => {
2665
+ if (!v.has(m)) {
2678
2666
  const g = p.concat([_]);
2679
2667
  h.push({
2680
2668
  op: i,
2681
2669
  path: g,
2682
- value: y
2670
+ value: m
2683
2671
  }), l.unshift({
2684
2672
  op: n,
2685
2673
  path: g,
2686
- value: y
2674
+ value: m
2687
2675
  });
2688
2676
  }
2689
2677
  _++;
2690
- }), _ = 0, v.forEach((y) => {
2691
- if (!b.has(y)) {
2678
+ }), _ = 0, v.forEach((m) => {
2679
+ if (!y.has(m)) {
2692
2680
  const g = p.concat([_]);
2693
2681
  h.push({
2694
2682
  op: n,
2695
2683
  path: g,
2696
- value: y
2684
+ value: m
2697
2685
  }), l.unshift({
2698
2686
  op: i,
2699
2687
  path: g,
2700
- value: y
2688
+ value: m
2701
2689
  });
2702
2690
  }
2703
2691
  _++;
2704
2692
  });
2705
2693
  }
2706
- function x(m, p, h, l) {
2694
+ function M(b, p, h, l) {
2707
2695
  h.push({
2708
2696
  op: r,
2709
2697
  path: [],
@@ -2711,39 +2699,39 @@ function Ln() {
2711
2699
  }), l.push({
2712
2700
  op: r,
2713
2701
  path: [],
2714
- value: m
2702
+ value: b
2715
2703
  });
2716
2704
  }
2717
- function F(m, p) {
2705
+ function F(b, p) {
2718
2706
  return p.forEach((h) => {
2719
- const { path: l, op: b } = h;
2720
- let v = m;
2721
- for (let j = 0; j < l.length - 1; j++) {
2707
+ const { path: l, op: y } = h;
2708
+ let v = b;
2709
+ for (let C = 0; C < l.length - 1; C++) {
2722
2710
  const O = Dt(v);
2723
- let I = l[j];
2724
- typeof I != "string" && typeof I != "number" && (I = "" + I), (O === 0 || O === 1) && (I === "__proto__" || I === "constructor") && G(19), typeof v == "function" && I === "prototype" && G(19), v = tn(v, I), typeof v != "object" && G(18, l.join("/"));
2711
+ let I = l[C];
2712
+ typeof I != "string" && typeof I != "number" && (I = "" + I), (O === 0 || O === 1) && (I === "__proto__" || I === "constructor") && W(19), typeof v == "function" && I === "prototype" && W(19), v = tn(v, I), typeof v != "object" && W(18, l.join("/"));
2725
2713
  }
2726
- const _ = Dt(v), y = k(h.value), g = l[l.length - 1];
2727
- switch (b) {
2714
+ const _ = Dt(v), m = E(h.value), g = l[l.length - 1];
2715
+ switch (y) {
2728
2716
  case r:
2729
2717
  switch (_) {
2730
2718
  case 2:
2731
- return v.set(g, y);
2719
+ return v.set(g, m);
2732
2720
  case 3:
2733
- G(16);
2721
+ W(16);
2734
2722
  default:
2735
- return v[g] = y;
2723
+ return v[g] = m;
2736
2724
  }
2737
2725
  case n:
2738
2726
  switch (_) {
2739
2727
  case 1:
2740
- return g === "-" ? v.push(y) : v.splice(g, 0, y);
2728
+ return g === "-" ? v.push(m) : v.splice(g, 0, m);
2741
2729
  case 2:
2742
- return v.set(g, y);
2730
+ return v.set(g, m);
2743
2731
  case 3:
2744
- return v.add(y);
2732
+ return v.add(m);
2745
2733
  default:
2746
- return v[g] = y;
2734
+ return v[g] = m;
2747
2735
  }
2748
2736
  case i:
2749
2737
  switch (_) {
@@ -2757,33 +2745,33 @@ function Ln() {
2757
2745
  return delete v[g];
2758
2746
  }
2759
2747
  default:
2760
- G(17, b);
2748
+ W(17, y);
2761
2749
  }
2762
- }), m;
2763
- }
2764
- function k(m) {
2765
- if (!vt(m))
2766
- return m;
2767
- if (Array.isArray(m))
2768
- return m.map(k);
2769
- if (_e(m))
2750
+ }), b;
2751
+ }
2752
+ function E(b) {
2753
+ if (!vt(b))
2754
+ return b;
2755
+ if (Array.isArray(b))
2756
+ return b.map(E);
2757
+ if (ve(b))
2770
2758
  return new Map(
2771
- Array.from(m.entries()).map(([h, l]) => [h, k(l)])
2759
+ Array.from(b.entries()).map(([h, l]) => [h, E(l)])
2772
2760
  );
2773
- if (ve(m))
2774
- return new Set(Array.from(m).map(k));
2775
- const p = Object.create(Mt(m));
2776
- for (const h in m)
2777
- p[h] = k(m[h]);
2778
- return he(m, pe) && (p[pe] = m[pe]), p;
2761
+ if (Ie(b))
2762
+ return new Set(Array.from(b).map(E));
2763
+ const p = Object.create(xt(b));
2764
+ for (const h in b)
2765
+ p[h] = E(b[h]);
2766
+ return ye(b, de) && (p[de] = b[de]), p;
2779
2767
  }
2780
- function H(m) {
2781
- return Pt(m) ? k(m) : m;
2768
+ function H(b) {
2769
+ return Pt(b) ? E(b) : b;
2782
2770
  }
2783
2771
  ra("Patches", {
2784
2772
  applyPatches_: F,
2785
2773
  generatePatches_: s,
2786
- generateReplacementPatches_: x
2774
+ generateReplacementPatches_: M
2787
2775
  });
2788
2776
  }
2789
2777
  var tt = new oa(), ua = tt.produce;
@@ -2822,7 +2810,7 @@ function Sa(t, r) {
2822
2810
  var Sn = Object.prototype, wa = Sn.hasOwnProperty, wn = Sn.toString, Gn = _a.Symbol, Ta = Sn.propertyIsEnumerable, Wn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
2823
2811
  function ka(t, r, n, i, s) {
2824
2812
  var c = -1, f = t.length;
2825
- for (n || (n = xa), s || (s = []); ++c < f; ) {
2813
+ for (n || (n = Ma), s || (s = []); ++c < f; ) {
2826
2814
  var d = t[c];
2827
2815
  n(d) ? Sa(s, d) : s[s.length] = d;
2828
2816
  }
@@ -2850,10 +2838,10 @@ function Oa(t, r) {
2850
2838
  return f[r] = c, va(t, this, f);
2851
2839
  };
2852
2840
  }
2853
- function xa(t) {
2841
+ function Ma(t) {
2854
2842
  return Da(t) || Pa(t) || !!(Wn && t && t[Wn]);
2855
2843
  }
2856
- function Ma(t) {
2844
+ function xa(t) {
2857
2845
  if (typeof t == "string" || Na(t))
2858
2846
  return t;
2859
2847
  var r = t + "";
@@ -2887,7 +2875,7 @@ function Na(t) {
2887
2875
  return typeof t == "symbol" || li(t) && wn.call(t) == ma;
2888
2876
  }
2889
2877
  var Ha = Oa(function(t, r) {
2890
- return t == null ? {} : Ea(t, Ia(ka(r), Ma));
2878
+ return t == null ? {} : Ea(t, Ia(ka(r), xa));
2891
2879
  }), Ua = Ha;
2892
2880
  const $n = /* @__PURE__ */ bn(Ua), La = {
2893
2881
  width: 1080,
@@ -2924,7 +2912,7 @@ class $a {
2924
2912
  Ot(this, "redos", []);
2925
2913
  Ot(this, "listener");
2926
2914
  const n = r || Ga;
2927
- this.stateSubject = new Mn(n), this.stateHistorySubject = new Mn({
2915
+ this.stateSubject = new xn(n), this.stateHistorySubject = new xn({
2928
2916
  handleRedo: !1,
2929
2917
  handleUndo: !1
2930
2918
  }), this.prevState = n, this.initListeners();
@@ -3037,60 +3025,62 @@ class $a {
3037
3025
  trackItemIds: c,
3038
3026
  tracks: f,
3039
3027
  transitionIds: d,
3040
- transitionsMap: x,
3028
+ transitionsMap: M,
3041
3029
  trackItemsMap: F
3042
- } = this.getState(), k = Z({
3030
+ } = this.getState(), E = Z({
3043
3031
  trackItemDetailsMap: s,
3044
3032
  trackItemIds: c,
3045
3033
  tracks: f,
3046
3034
  transitionIds: d,
3047
- transitionsMap: x,
3035
+ transitionsMap: M,
3048
3036
  trackItemsMap: F
3049
- }), H = [], m = [], p = [], h = [], l = [], b = [];
3050
- n.forEach((T) => {
3051
- let E;
3052
- const M = T.path.slice(1);
3053
- T.type === "CREATE" ? E = {
3054
- path: M,
3037
+ }), H = [], b = [], p = [], h = [], l = [], y = [];
3038
+ n.forEach((k) => {
3039
+ let T;
3040
+ const U = k.path.slice(1);
3041
+ k.type === "CREATE" ? T = {
3042
+ path: U,
3055
3043
  op: "remove",
3056
- value: T.value
3057
- } : T.type === "CHANGE" ? E = {
3058
- path: M,
3044
+ value: k.value
3045
+ } : k.type === "CHANGE" ? T = {
3046
+ path: U,
3059
3047
  op: "replace",
3060
- value: T.oldValue
3061
- } : E = {
3062
- path: M,
3048
+ value: k.oldValue
3049
+ } : T = {
3050
+ path: U,
3063
3051
  op: "add",
3064
- value: T.oldValue
3065
- }, T.path.includes("trackItemIds") ? p.push(E) : T.path.includes("transitionIds") ? m.push(E) : T.path.includes("trackItemsMap") ? l.push(E) : T.path.includes("transitionsMap") ? h.push(E) : T.path.includes("tracks") ? H.push(E) : T.path.includes("trackItemDetailsMap") && b.push(E);
3052
+ value: k.oldValue
3053
+ }, k.path.includes("trackItemIds") ? p.push(T) : k.path.includes("transitionIds") ? b.push(T) : k.path.includes("trackItemsMap") ? l.push(T) : k.path.includes("transitionsMap") ? h.push(T) : k.path.includes("tracks") ? H.push(T) : k.path.includes("trackItemDetailsMap") && y.push(T);
3066
3054
  });
3067
3055
  const v = this.applyPatch(
3068
- k.tracks,
3056
+ E.tracks,
3069
3057
  H
3070
3058
  ), _ = this.applyPatch(
3071
- k.transitionIds,
3072
- m
3073
- ), y = this.applyPatch(
3074
- k.trackItemIds,
3059
+ E.transitionIds,
3060
+ b
3061
+ ), m = this.applyPatch(
3062
+ E.trackItemIds,
3075
3063
  p
3076
3064
  ), g = this.applyPatch(
3077
- k.transitionsMap,
3065
+ E.transitionsMap,
3078
3066
  h
3079
- ), j = this.applyPatch(
3080
- k.trackItemsMap,
3067
+ ), C = this.applyPatch(
3068
+ E.trackItemsMap,
3081
3069
  l
3082
3070
  ), O = this.applyPatch(
3083
- k.trackItemDetailsMap,
3084
- b
3071
+ E.trackItemDetailsMap,
3072
+ y
3085
3073
  ), I = Z({
3086
3074
  tracks: v,
3087
3075
  transitionIds: _,
3088
- trackItemIds: y,
3076
+ trackItemIds: m,
3089
3077
  transitionsMap: g,
3090
- trackItemsMap: j,
3078
+ trackItemsMap: C,
3091
3079
  trackItemDetailsMap: O
3092
- }), P = Z(this.getState()), S = { ...P, ...I };
3093
- this.prevState = P, this.redos.push({ redos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
3080
+ }), x = Z(this.getState()), S = { ...x, ...I };
3081
+ this.prevState = x, this.redos.push({ redos: n, type: i });
3082
+ const j = Yt(S.trackItemsMap);
3083
+ this.stateSubject.next({ ...S, duration: j }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
3094
3084
  }
3095
3085
  applyPatch(r, n) {
3096
3086
  return n.reverse().reduce((i, s) => ua(i, (c) => {
@@ -3106,60 +3096,62 @@ class $a {
3106
3096
  trackItemIds: c,
3107
3097
  tracks: f,
3108
3098
  transitionIds: d,
3109
- transitionsMap: x,
3099
+ transitionsMap: M,
3110
3100
  trackItemsMap: F
3111
- } = this.getState(), k = Z({
3101
+ } = this.getState(), E = Z({
3112
3102
  trackItemDetailsMap: s,
3113
3103
  trackItemIds: c,
3114
3104
  tracks: f,
3115
3105
  transitionIds: d,
3116
- transitionsMap: x,
3106
+ transitionsMap: M,
3117
3107
  trackItemsMap: F
3118
- }), H = [], m = [], p = [], h = [], l = [], b = [];
3119
- n.forEach((T) => {
3120
- let E;
3121
- const M = T.path.slice(1);
3122
- T.type === "CREATE" ? E = {
3123
- path: M,
3108
+ }), H = [], b = [], p = [], h = [], l = [], y = [];
3109
+ n.forEach((k) => {
3110
+ let T;
3111
+ const U = k.path.slice(1);
3112
+ k.type === "CREATE" ? T = {
3113
+ path: U,
3124
3114
  op: "add",
3125
- value: T.value
3126
- } : T.type === "CHANGE" ? E = {
3127
- path: M,
3115
+ value: k.value
3116
+ } : k.type === "CHANGE" ? T = {
3117
+ path: U,
3128
3118
  op: "replace",
3129
- value: T.value
3130
- } : E = {
3131
- path: M,
3119
+ value: k.value
3120
+ } : T = {
3121
+ path: U,
3132
3122
  op: "remove",
3133
- value: T.oldValue
3134
- }, T.path.includes("trackItemIds") ? p.push(E) : T.path.includes("transitionIds") ? m.push(E) : T.path.includes("trackItemsMap") ? l.push(E) : T.path.includes("transitionsMap") ? h.push(E) : T.path.includes("trackItemDetailsMap") ? b.push(E) : H.push(E);
3123
+ value: k.oldValue
3124
+ }, k.path.includes("trackItemIds") ? p.push(T) : k.path.includes("transitionIds") ? b.push(T) : k.path.includes("trackItemsMap") ? l.push(T) : k.path.includes("transitionsMap") ? h.push(T) : k.path.includes("trackItemDetailsMap") ? y.push(T) : H.push(T);
3135
3125
  });
3136
3126
  const v = this.applyPatch(
3137
- k.tracks,
3127
+ E.tracks,
3138
3128
  H
3139
3129
  ), _ = this.applyPatch(
3140
- k.transitionIds,
3141
- m
3142
- ), y = this.applyPatch(
3143
- k.trackItemIds,
3130
+ E.transitionIds,
3131
+ b
3132
+ ), m = this.applyPatch(
3133
+ E.trackItemIds,
3144
3134
  p
3145
3135
  ), g = this.applyPatch(
3146
- k.transitionsMap,
3136
+ E.transitionsMap,
3147
3137
  h
3148
- ), j = this.applyPatch(
3149
- k.trackItemsMap,
3138
+ ), C = this.applyPatch(
3139
+ E.trackItemsMap,
3150
3140
  l
3151
3141
  ), O = this.applyPatch(
3152
- k.trackItemDetailsMap,
3153
- b
3142
+ E.trackItemDetailsMap,
3143
+ y
3154
3144
  ), I = Z({
3155
3145
  tracks: v,
3156
3146
  transitionIds: _,
3157
- trackItemIds: y,
3147
+ trackItemIds: m,
3158
3148
  transitionsMap: g,
3159
- trackItemsMap: j,
3149
+ trackItemsMap: C,
3160
3150
  trackItemDetailsMap: O
3161
- }), P = Z(this.getState()), S = { ...P, ...I };
3162
- this.prevState = P, this.undos.push({ undos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
3151
+ }), x = Z(this.getState()), S = { ...x, ...I };
3152
+ this.prevState = x, this.undos.push({ undos: n, type: i });
3153
+ const j = Yt(S.trackItemsMap);
3154
+ this.stateSubject.next({ ...S, duration: j }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
3163
3155
  }
3164
3156
  }
3165
3157
  export {