@designcombo/state 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1219 -1194
- package/dist/index.umd.js +2 -2
- package/dist/utils/load-item.d.ts +2 -2
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
var vi = Object.defineProperty;
|
2
2
|
var Si = (t, r, n) => r in t ? vi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
-
var
|
4
|
-
import { subject as
|
3
|
+
var Zt = (t, r, n) => Si(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as Qt, filter as te } from "@designcombo/events";
|
5
5
|
var dn = function(t, r) {
|
6
6
|
return dn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
8
8
|
} || function(n, i) {
|
9
|
-
for (var
|
9
|
+
for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (n[a] = i[a]);
|
10
10
|
}, dn(t, r);
|
11
11
|
};
|
12
12
|
function $e(t, r) {
|
@@ -31,14 +31,14 @@ function pn(t) {
|
|
31
31
|
function hn(t, r) {
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!n) return t;
|
34
|
-
var i = n.call(t),
|
34
|
+
var i = n.call(t), a, c = [], d;
|
35
35
|
try {
|
36
|
-
for (; (r === void 0 || r-- > 0) && !(
|
36
|
+
for (; (r === void 0 || r-- > 0) && !(a = i.next()).done; ) c.push(a.value);
|
37
37
|
} catch (p) {
|
38
38
|
d = { error: p };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
|
-
|
41
|
+
a && !a.done && (n = i.return) && n.call(i);
|
42
42
|
} finally {
|
43
43
|
if (d) throw d.error;
|
44
44
|
}
|
@@ -46,11 +46,11 @@ function hn(t, r) {
|
|
46
46
|
return c;
|
47
47
|
}
|
48
48
|
function mn(t, r, n) {
|
49
|
-
if (n || arguments.length === 2) for (var i = 0,
|
49
|
+
if (n || arguments.length === 2) for (var i = 0, a = r.length, c; i < a; i++)
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function jt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
56
|
function Vn(t) {
|
@@ -62,8 +62,8 @@ function Vn(t) {
|
|
62
62
|
var on = Vn(function(t) {
|
63
63
|
return function(n) {
|
64
64
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
65
|
-
` + n.map(function(i,
|
66
|
-
return
|
65
|
+
` + n.map(function(i, a) {
|
66
|
+
return a + 1 + ") " + i.toString();
|
67
67
|
}).join(`
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
69
69
|
};
|
@@ -79,7 +79,7 @@ var yr = function() {
|
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
81
81
|
return t.prototype.unsubscribe = function() {
|
82
|
-
var r, n, i,
|
82
|
+
var r, n, i, a, c;
|
83
83
|
if (!this.closed) {
|
84
84
|
this.closed = !0;
|
85
85
|
var d = this._parentage;
|
@@ -87,8 +87,8 @@ var yr = function() {
|
|
87
87
|
if (this._parentage = null, Array.isArray(d))
|
88
88
|
try {
|
89
89
|
for (var p = pn(d), E = p.next(); !E.done; E = p.next()) {
|
90
|
-
var
|
91
|
-
|
90
|
+
var x = E.value;
|
91
|
+
x.remove(this);
|
92
92
|
}
|
93
93
|
} catch (u) {
|
94
94
|
r = { error: u };
|
@@ -101,10 +101,10 @@ var yr = function() {
|
|
101
101
|
}
|
102
102
|
else
|
103
103
|
d.remove(this);
|
104
|
-
var
|
105
|
-
if (
|
104
|
+
var S = this.initialTeardown;
|
105
|
+
if (jt(S))
|
106
106
|
try {
|
107
|
-
|
107
|
+
S();
|
108
108
|
} catch (u) {
|
109
109
|
c = u instanceof on ? u.errors : [u];
|
110
110
|
}
|
@@ -124,7 +124,7 @@ var yr = function() {
|
|
124
124
|
i = { error: u };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
M && !M.done && (
|
127
|
+
M && !M.done && (a = m.return) && a.call(m);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -164,10 +164,10 @@ var yr = function() {
|
|
164
164
|
}(), t;
|
165
165
|
}(), qn = yr.EMPTY;
|
166
166
|
function Jn(t) {
|
167
|
-
return t instanceof yr || t && "closed" in t &&
|
167
|
+
return t instanceof yr || t && "closed" in t && jt(t.remove) && jt(t.add) && jt(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function Cn(t) {
|
170
|
-
|
170
|
+
jt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
172
|
var Zn = {
|
173
173
|
onUnhandledError: null,
|
@@ -203,8 +203,8 @@ var ti = function(t) {
|
|
203
203
|
var i = t.call(this) || this;
|
204
204
|
return i.isStopped = !1, n ? (i.destination = n, Jn(n) && n.add(i)) : i.destination = Mi, i;
|
205
205
|
}
|
206
|
-
return r.create = function(n, i,
|
207
|
-
return new gn(n, i,
|
206
|
+
return r.create = function(n, i, a) {
|
207
|
+
return new gn(n, i, a);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -265,13 +265,13 @@ var Ti = function() {
|
|
265
265
|
}, t;
|
266
266
|
}(), gn = function(t) {
|
267
267
|
$e(r, t);
|
268
|
-
function r(n, i,
|
268
|
+
function r(n, i, a) {
|
269
269
|
var c = t.call(this) || this, d;
|
270
|
-
if (
|
270
|
+
if (jt(n) || !n)
|
271
271
|
d = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
274
|
-
complete:
|
274
|
+
complete: a ?? void 0
|
275
275
|
};
|
276
276
|
else {
|
277
277
|
var p;
|
@@ -301,13 +301,13 @@ var Mi = {
|
|
301
301
|
}, Ai = function() {
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
303
303
|
}();
|
304
|
-
function
|
304
|
+
function xi(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
308
|
-
return t.length === 0 ?
|
309
|
-
return t.reduce(function(i,
|
310
|
-
return
|
307
|
+
function Di(t) {
|
308
|
+
return t.length === 0 ? xi : t.length === 1 ? t[0] : function(n) {
|
309
|
+
return t.reduce(function(i, a) {
|
310
|
+
return a(i);
|
311
311
|
}, n);
|
312
312
|
};
|
313
313
|
}
|
@@ -319,10 +319,10 @@ var Fn = function() {
|
|
319
319
|
var n = new t();
|
320
320
|
return n.source = this, n.operator = r, n;
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
|
-
var
|
322
|
+
var a = this, c = Pi(r) ? r : new gn(r, n, i);
|
323
323
|
return ur(function() {
|
324
|
-
var d =
|
325
|
-
c.add(p ? p.call(c, E) : E ?
|
324
|
+
var d = a, p = d.operator, E = d.source;
|
325
|
+
c.add(p ? p.call(c, E) : E ? a._subscribe(c) : a._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -332,7 +332,7 @@ var Fn = function() {
|
|
332
332
|
}
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
|
-
return n =
|
335
|
+
return n = jn(n), new n(function(a, c) {
|
336
336
|
var d = new gn({
|
337
337
|
next: function(p) {
|
338
338
|
try {
|
@@ -342,7 +342,7 @@ var Fn = function() {
|
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
345
|
-
complete:
|
345
|
+
complete: a
|
346
346
|
});
|
347
347
|
i.subscribe(d);
|
348
348
|
});
|
@@ -354,15 +354,15 @@ var Fn = function() {
|
|
354
354
|
}, t.prototype.pipe = function() {
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
356
356
|
r[n] = arguments[n];
|
357
|
-
return
|
357
|
+
return Di(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
|
-
return r =
|
360
|
+
return r = jn(r), new r(function(i, a) {
|
361
361
|
var c;
|
362
362
|
n.subscribe(function(d) {
|
363
363
|
return c = d;
|
364
364
|
}, function(d) {
|
365
|
-
return
|
365
|
+
return a(d);
|
366
366
|
}, function() {
|
367
367
|
return i(c);
|
368
368
|
});
|
@@ -371,12 +371,12 @@ var Fn = function() {
|
|
371
371
|
return new t(r);
|
372
372
|
}, t;
|
373
373
|
}();
|
374
|
-
function
|
374
|
+
function jn(t) {
|
375
375
|
var r;
|
376
376
|
return (r = t ?? Zn.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
378
|
function Oi(t) {
|
379
|
-
return t &&
|
379
|
+
return t && jt(t.next) && jt(t.error) && jt(t.complete);
|
380
380
|
}
|
381
381
|
function Pi(t) {
|
382
382
|
return t && t instanceof ti || Oi(t) && Jn(t);
|
@@ -392,7 +392,7 @@ var Ci = Vn(function(t) {
|
|
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
|
395
|
+
var i = new zn(this, this);
|
396
396
|
return i.operator = n, i;
|
397
397
|
}, r.prototype._throwIfClosed = function() {
|
398
398
|
if (this.closed)
|
@@ -400,7 +400,7 @@ var Ci = Vn(function(t) {
|
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
402
|
ur(function() {
|
403
|
-
var
|
403
|
+
var a, c;
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
@@ -408,13 +408,13 @@ var Ci = Vn(function(t) {
|
|
408
408
|
var E = p.value;
|
409
409
|
E.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
|
411
|
+
} catch (x) {
|
412
|
+
a = { error: x };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
415
|
p && !p.done && (c = d.return) && c.call(d);
|
416
416
|
} finally {
|
417
|
-
if (
|
417
|
+
if (a) throw a.error;
|
418
418
|
}
|
419
419
|
}
|
420
420
|
}
|
@@ -424,8 +424,8 @@ var Ci = Vn(function(t) {
|
|
424
424
|
ur(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
|
-
for (var
|
428
|
-
|
427
|
+
for (var a = i.observers; a.length; )
|
428
|
+
a.shift().error(n);
|
429
429
|
}
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
@@ -451,39 +451,39 @@ var Ci = Vn(function(t) {
|
|
451
451
|
}, r.prototype._subscribe = function(n) {
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
|
-
var i = this,
|
454
|
+
var i = this, a = this, c = a.hasError, d = a.isStopped, p = a.observers;
|
455
455
|
return c || d ? qn : (this.currentObservers = null, p.push(n), new yr(function() {
|
456
456
|
i.currentObservers = null, yn(p, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
|
-
var i = this,
|
460
|
-
|
459
|
+
var i = this, a = i.hasError, c = i.thrownError, d = i.isStopped;
|
460
|
+
a ? n.error(c) : d && n.complete();
|
461
461
|
}, r.prototype.asObservable = function() {
|
462
462
|
var n = new Fn();
|
463
463
|
return n.source = this, n;
|
464
464
|
}, r.create = function(n, i) {
|
465
|
-
return new
|
465
|
+
return new zn(n, i);
|
466
466
|
}, r;
|
467
|
-
}(Fn),
|
467
|
+
}(Fn), zn = function(t) {
|
468
468
|
$e(r, t);
|
469
469
|
function r(n, i) {
|
470
|
-
var
|
471
|
-
return
|
470
|
+
var a = t.call(this) || this;
|
471
|
+
return a.destination = n, a.source = i, a;
|
472
472
|
}
|
473
473
|
return r.prototype.next = function(n) {
|
474
|
-
var i,
|
475
|
-
(
|
474
|
+
var i, a;
|
475
|
+
(a = (i = this.destination) === null || i === void 0 ? void 0 : i.next) === null || a === void 0 || a.call(i, n);
|
476
476
|
}, r.prototype.error = function(n) {
|
477
|
-
var i,
|
478
|
-
(
|
477
|
+
var i, a;
|
478
|
+
(a = (i = this.destination) === null || i === void 0 ? void 0 : i.error) === null || a === void 0 || a.call(i, n);
|
479
479
|
}, r.prototype.complete = function() {
|
480
480
|
var n, i;
|
481
481
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || i === void 0 || i.call(n);
|
482
482
|
}, r.prototype._subscribe = function(n) {
|
483
|
-
var i,
|
484
|
-
return (
|
483
|
+
var i, a;
|
484
|
+
return (a = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && a !== void 0 ? a : qn;
|
485
485
|
}, r;
|
486
|
-
}(ei),
|
486
|
+
}(ei), Hn = function(t) {
|
487
487
|
$e(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
@@ -499,120 +499,120 @@ var Ci = Vn(function(t) {
|
|
499
499
|
var i = t.prototype._subscribe.call(this, n);
|
500
500
|
return !i.closed && n.next(this._value), i;
|
501
501
|
}, r.prototype.getValue = function() {
|
502
|
-
var n = this, i = n.hasError,
|
502
|
+
var n = this, i = n.hasError, a = n.thrownError, c = n._value;
|
503
503
|
if (i)
|
504
|
-
throw
|
504
|
+
throw a;
|
505
505
|
return this._throwIfClosed(), c;
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(ei),
|
509
|
+
}(ei), _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
510
|
function Tn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
513
|
var fr = { exports: {} };
|
514
514
|
fr.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__",
|
517
|
-
|
518
|
-
var
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", a = 1, c = 2, d = 9007199254740991, p = "[object Arguments]", E = "[object Array]", x = "[object AsyncFunction]", S = "[object Boolean]", P = "[object Date]", m = "[object Error]", M = "[object Function]", A = "[object GeneratorFunction]", u = "[object Map]", f = "[object Number]", b = "[object Null]", y = "[object Object]", h = "[object Promise]", I = "[object Proxy]", _ = "[object RegExp]", g = "[object Set]", v = "[object String]", U = "[object Symbol]", C = "[object Undefined]", O = "[object WeakMap]", T = "[object ArrayBuffer]", k = "[object DataView]", H = "[object Float32Array]", X = "[object Float64Array]", Z = "[object Int8Array]", zt = "[object Int16Array]", Ht = "[object Int32Array]", mt = "[object Uint8Array]", Wt = "[object Uint8ClampedArray]", F = "[object Uint16Array]", W = "[object Uint32Array]", lt = /[\\^$.*+?()[\]{}|]/g, G = /^\[object .+?Constructor\]$/, It = /^(?:0|[1-9]\d*)$/, j = {};
|
517
|
+
j[H] = j[X] = j[Z] = j[zt] = j[Ht] = j[mt] = j[Wt] = j[F] = j[W] = !0, j[p] = j[E] = j[T] = j[S] = j[k] = j[P] = j[m] = j[M] = j[u] = j[f] = j[y] = j[_] = j[g] = j[v] = j[O] = !1;
|
518
|
+
var St = typeof _t == "object" && _t && _t.Object === Object && _t, ce = typeof self == "object" && self && self.Object === Object && self, N = St || ce || Function("return this")(), B = r && !r.nodeType && r, R = B && !0 && t && !t.nodeType && t, ft = R && R.exports === B, rt = ft && St.process, nt = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return rt && rt.binding && rt.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(),
|
524
|
-
function
|
525
|
-
for (var o = -1, l = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
|
523
|
+
}(), dt = nt && nt.isTypedArray;
|
524
|
+
function Q(e, s) {
|
525
|
+
for (var o = -1, l = e == null ? 0 : e.length, D = 0, w = []; ++o < l; ) {
|
526
|
+
var L = e[o];
|
527
|
+
s(L, o, e) && (w[D++] = L);
|
528
528
|
}
|
529
|
-
return
|
529
|
+
return w;
|
530
530
|
}
|
531
|
-
function
|
532
|
-
for (var o = -1, l =
|
533
|
-
e[
|
531
|
+
function Ot(e, s) {
|
532
|
+
for (var o = -1, l = s.length, D = e.length; ++o < l; )
|
533
|
+
e[D + o] = s[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
|
-
function ue(e,
|
536
|
+
function ue(e, s) {
|
537
537
|
for (var o = -1, l = e == null ? 0 : e.length; ++o < l; )
|
538
|
-
if (
|
538
|
+
if (s(e[o], o, e))
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function J(e, s) {
|
543
543
|
for (var o = -1, l = Array(e); ++o < e; )
|
544
|
-
l[o] =
|
544
|
+
l[o] = s(o);
|
545
545
|
return l;
|
546
546
|
}
|
547
|
-
function
|
548
|
-
return function(
|
549
|
-
return e(
|
547
|
+
function Tt(e) {
|
548
|
+
return function(s) {
|
549
|
+
return e(s);
|
550
550
|
};
|
551
551
|
}
|
552
|
-
function
|
553
|
-
return e.has(
|
552
|
+
function Et(e, s) {
|
553
|
+
return e.has(s);
|
554
554
|
}
|
555
|
-
function
|
556
|
-
return e == null ? void 0 : e[
|
555
|
+
function Gt(e, s) {
|
556
|
+
return e == null ? void 0 : e[s];
|
557
557
|
}
|
558
|
-
function
|
559
|
-
var
|
560
|
-
return e.forEach(function(l,
|
561
|
-
o[++
|
558
|
+
function Nt(e) {
|
559
|
+
var s = -1, o = Array(e.size);
|
560
|
+
return e.forEach(function(l, D) {
|
561
|
+
o[++s] = [D, l];
|
562
562
|
}), o;
|
563
563
|
}
|
564
|
-
function Ye(e,
|
564
|
+
function Ye(e, s) {
|
565
565
|
return function(o) {
|
566
|
-
return e(
|
566
|
+
return e(s(o));
|
567
567
|
};
|
568
568
|
}
|
569
|
-
function
|
570
|
-
var
|
569
|
+
function Mt(e) {
|
570
|
+
var s = -1, o = Array(e.size);
|
571
571
|
return e.forEach(function(l) {
|
572
|
-
o[++
|
572
|
+
o[++s] = l;
|
573
573
|
}), o;
|
574
574
|
}
|
575
|
-
var le = Array.prototype, vr = Function.prototype,
|
575
|
+
var le = Array.prototype, vr = Function.prototype, Yt = Object.prototype, fe = N["__core-js_shared__"], Se = vr.toString, bt = Yt.hasOwnProperty, Be = function() {
|
576
576
|
var e = /[^.]+$/.exec(fe && fe.keys && fe.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(), Ke =
|
579
|
-
"^" + Se.call(
|
580
|
-
), ke =
|
581
|
-
function
|
582
|
-
var
|
583
|
-
for (this.clear(); ++
|
584
|
-
var l = e[
|
578
|
+
}(), Ke = Yt.toString, Sr = RegExp(
|
579
|
+
"^" + Se.call(bt).replace(lt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), ke = ft ? N.Buffer : void 0, de = N.Symbol, Xe = N.Uint8Array, pe = Yt.propertyIsEnumerable, Bt = le.splice, kt = de ? de.toStringTag : void 0, he = Object.getOwnPropertySymbols, we = ke ? ke.isBuffer : void 0, Kt = Ye(Object.keys, Object), Te = Ct(N, "DataView"), Xt = Ct(N, "Map"), Ee = Ct(N, "Promise"), Me = Ct(N, "Set"), Ae = Ct(N, "WeakMap"), Lt = Ct(Object, "create"), Ve = ct(Te), Pt = ct(Xt), kr = ct(Ee), wr = ct(Me), Tr = ct(Ae), qe = de ? de.prototype : void 0, xe = qe ? qe.valueOf : void 0;
|
581
|
+
function tt(e) {
|
582
|
+
var s = -1, o = e == null ? 0 : e.length;
|
583
|
+
for (this.clear(); ++s < o; ) {
|
584
|
+
var l = e[s];
|
585
585
|
this.set(l[0], l[1]);
|
586
586
|
}
|
587
587
|
}
|
588
588
|
function Er() {
|
589
|
-
this.__data__ =
|
589
|
+
this.__data__ = Lt ? Lt(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function Mr(e) {
|
592
|
-
var
|
593
|
-
return this.size -=
|
592
|
+
var s = this.has(e) && delete this.__data__[e];
|
593
|
+
return this.size -= s ? 1 : 0, s;
|
594
594
|
}
|
595
595
|
function Ar(e) {
|
596
|
-
var
|
597
|
-
if (
|
598
|
-
var o =
|
596
|
+
var s = this.__data__;
|
597
|
+
if (Lt) {
|
598
|
+
var o = s[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
601
|
-
return
|
601
|
+
return bt.call(s, e) ? s[e] : void 0;
|
602
602
|
}
|
603
|
-
function
|
604
|
-
var
|
605
|
-
return
|
603
|
+
function xr(e) {
|
604
|
+
var s = this.__data__;
|
605
|
+
return Lt ? s[e] !== void 0 : bt.call(s, e);
|
606
606
|
}
|
607
|
-
function
|
607
|
+
function Dr(e, s) {
|
608
608
|
var o = this.__data__;
|
609
|
-
return this.size += this.has(e) ? 0 : 1, o[e] =
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = Lt && s === void 0 ? i : s, this;
|
610
610
|
}
|
611
|
-
|
612
|
-
function
|
613
|
-
var
|
614
|
-
for (this.clear(); ++
|
615
|
-
var l = e[
|
611
|
+
tt.prototype.clear = Er, tt.prototype.delete = Mr, tt.prototype.get = Ar, tt.prototype.has = xr, tt.prototype.set = Dr;
|
612
|
+
function it(e) {
|
613
|
+
var s = -1, o = e == null ? 0 : e.length;
|
614
|
+
for (this.clear(); ++s < o; ) {
|
615
|
+
var l = e[s];
|
616
616
|
this.set(l[0], l[1]);
|
617
617
|
}
|
618
618
|
}
|
@@ -620,57 +620,57 @@ fr.exports;
|
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Pr(e) {
|
623
|
-
var
|
623
|
+
var s = this.__data__, o = ge(s, e);
|
624
624
|
if (o < 0)
|
625
625
|
return !1;
|
626
|
-
var l =
|
627
|
-
return o == l ?
|
626
|
+
var l = s.length - 1;
|
627
|
+
return o == l ? s.pop() : Bt.call(s, o, 1), --this.size, !0;
|
628
628
|
}
|
629
629
|
function Cr(e) {
|
630
|
-
var
|
631
|
-
return o < 0 ? void 0 :
|
630
|
+
var s = this.__data__, o = ge(s, e);
|
631
|
+
return o < 0 ? void 0 : s[o][1];
|
632
632
|
}
|
633
633
|
function Rr(e) {
|
634
634
|
return ge(this.__data__, e) > -1;
|
635
635
|
}
|
636
|
-
function Fr(e,
|
636
|
+
function Fr(e, s) {
|
637
637
|
var o = this.__data__, l = ge(o, e);
|
638
|
-
return l < 0 ? (++this.size, o.push([e,
|
638
|
+
return l < 0 ? (++this.size, o.push([e, s])) : o[l][1] = s, this;
|
639
639
|
}
|
640
|
-
|
641
|
-
function
|
642
|
-
var
|
643
|
-
for (this.clear(); ++
|
644
|
-
var l = e[
|
640
|
+
it.prototype.clear = Or, it.prototype.delete = Pr, it.prototype.get = Cr, it.prototype.has = Rr, it.prototype.set = Fr;
|
641
|
+
function pt(e) {
|
642
|
+
var s = -1, o = e == null ? 0 : e.length;
|
643
|
+
for (this.clear(); ++s < o; ) {
|
644
|
+
var l = e[s];
|
645
645
|
this.set(l[0], l[1]);
|
646
646
|
}
|
647
647
|
}
|
648
|
-
function
|
648
|
+
function jr() {
|
649
649
|
this.size = 0, this.__data__ = {
|
650
|
-
hash: new
|
651
|
-
map: new (
|
652
|
-
string: new
|
650
|
+
hash: new tt(),
|
651
|
+
map: new (Xt || it)(),
|
652
|
+
string: new tt()
|
653
653
|
};
|
654
654
|
}
|
655
|
-
function
|
656
|
-
var
|
657
|
-
return this.size -=
|
655
|
+
function zr(e) {
|
656
|
+
var s = wt(this, e).delete(e);
|
657
|
+
return this.size -= s ? 1 : 0, s;
|
658
658
|
}
|
659
|
-
function
|
660
|
-
return
|
659
|
+
function Hr(e) {
|
660
|
+
return wt(this, e).get(e);
|
661
661
|
}
|
662
662
|
function Nr(e) {
|
663
|
-
return
|
663
|
+
return wt(this, e).has(e);
|
664
664
|
}
|
665
|
-
function Lr(e,
|
666
|
-
var o =
|
667
|
-
return o.set(e,
|
665
|
+
function Lr(e, s) {
|
666
|
+
var o = wt(this, e), l = o.size;
|
667
|
+
return o.set(e, s), this.size += o.size == l ? 0 : 1, this;
|
668
668
|
}
|
669
|
-
|
669
|
+
pt.prototype.clear = jr, pt.prototype.delete = zr, pt.prototype.get = Hr, pt.prototype.has = Nr, pt.prototype.set = Lr;
|
670
670
|
function me(e) {
|
671
|
-
var
|
672
|
-
for (this.__data__ = new
|
673
|
-
this.add(e[
|
671
|
+
var s = -1, o = e == null ? 0 : e.length;
|
672
|
+
for (this.__data__ = new pt(); ++s < o; )
|
673
|
+
this.add(e[s]);
|
674
674
|
}
|
675
675
|
function Je(e) {
|
676
676
|
return this.__data__.set(e, i), this;
|
@@ -679,16 +679,16 @@ fr.exports;
|
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
681
|
me.prototype.add = me.prototype.push = Je, me.prototype.has = ye;
|
682
|
-
function
|
683
|
-
var
|
684
|
-
this.size =
|
682
|
+
function At(e) {
|
683
|
+
var s = this.__data__ = new it(e);
|
684
|
+
this.size = s.size;
|
685
685
|
}
|
686
|
-
function
|
687
|
-
this.__data__ = new
|
686
|
+
function De() {
|
687
|
+
this.__data__ = new it(), this.size = 0;
|
688
688
|
}
|
689
689
|
function $r(e) {
|
690
|
-
var
|
691
|
-
return this.size =
|
690
|
+
var s = this.__data__, o = s.delete(e);
|
691
|
+
return this.size = s.size, o;
|
692
692
|
}
|
693
693
|
function Ur(e) {
|
694
694
|
return this.__data__.get(e);
|
@@ -696,243 +696,243 @@ fr.exports;
|
|
696
696
|
function Wr(e) {
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
|
-
function Gr(e,
|
699
|
+
function Gr(e, s) {
|
700
700
|
var o = this.__data__;
|
701
|
-
if (o instanceof
|
701
|
+
if (o instanceof it) {
|
702
702
|
var l = o.__data__;
|
703
|
-
if (!
|
704
|
-
return l.push([e,
|
705
|
-
o = this.__data__ = new
|
703
|
+
if (!Xt || l.length < n - 1)
|
704
|
+
return l.push([e, s]), this.size = ++o.size, this;
|
705
|
+
o = this.__data__ = new pt(l);
|
706
706
|
}
|
707
|
-
return o.set(e,
|
707
|
+
return o.set(e, s), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
|
710
|
-
function Yr(e,
|
711
|
-
var o = Ie(e), l = !o && rr(e),
|
709
|
+
At.prototype.clear = De, At.prototype.delete = $r, At.prototype.get = Ur, At.prototype.has = Wr, At.prototype.set = Gr;
|
710
|
+
function Yr(e, s) {
|
711
|
+
var o = Ie(e), l = !o && rr(e), D = !o && !l && be(e), w = !o && !l && !D && sr(e), L = o || l || D || w, z = L ? J(e.length, String) : [], K = z.length;
|
712
712
|
for (var $ in e)
|
713
|
-
|
713
|
+
bt.call(e, $) && !(L && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
($ == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
-
|
716
|
-
|
717
|
-
Qr($,
|
715
|
+
D && ($ == "offset" || $ == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
w && ($ == "buffer" || $ == "byteLength" || $ == "byteOffset") || // Skip index properties.
|
717
|
+
Qr($, K))) && z.push($);
|
718
718
|
return z;
|
719
719
|
}
|
720
|
-
function ge(e,
|
720
|
+
function ge(e, s) {
|
721
721
|
for (var o = e.length; o--; )
|
722
|
-
if (er(e[o][0],
|
722
|
+
if (er(e[o][0], s))
|
723
723
|
return o;
|
724
724
|
return -1;
|
725
725
|
}
|
726
|
-
function Oe(e,
|
727
|
-
var l =
|
728
|
-
return Ie(e) ? l :
|
726
|
+
function Oe(e, s, o) {
|
727
|
+
var l = s(e);
|
728
|
+
return Ie(e) ? l : Ot(l, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ? C :
|
730
|
+
function Vt(e) {
|
731
|
+
return e == null ? e === void 0 ? C : b : kt && kt in Object(e) ? Rt(e) : tr(e);
|
732
732
|
}
|
733
733
|
function Ze(e) {
|
734
|
-
return
|
734
|
+
return Dt(e) && Vt(e) == p;
|
735
735
|
}
|
736
|
-
function Qe(e,
|
737
|
-
return e ===
|
736
|
+
function Qe(e, s, o, l, D) {
|
737
|
+
return e === s ? !0 : e == null || s == null || !Dt(e) && !Dt(s) ? e !== e && s !== s : Br(e, s, o, l, Qe, D);
|
738
738
|
}
|
739
|
-
function Br(e,
|
740
|
-
var
|
741
|
-
|
742
|
-
var
|
743
|
-
if (
|
744
|
-
if (!be(
|
739
|
+
function Br(e, s, o, l, D, w) {
|
740
|
+
var L = Ie(e), z = Ie(s), K = L ? E : xt(e), $ = z ? E : xt(s);
|
741
|
+
K = K == p ? y : K, $ = $ == p ? y : $;
|
742
|
+
var st = K == y, ht = $ == y, V = K == $;
|
743
|
+
if (V && be(e)) {
|
744
|
+
if (!be(s))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
L = !0, st = !1;
|
747
747
|
}
|
748
|
-
if (
|
749
|
-
return
|
750
|
-
if (!(o &
|
751
|
-
var at =
|
752
|
-
if (at ||
|
753
|
-
var
|
754
|
-
return
|
748
|
+
if (V && !st)
|
749
|
+
return w || (w = new At()), L || sr(e) ? Pe(e, s, o, l, D, w) : qr(e, s, K, o, l, D, w);
|
750
|
+
if (!(o & a)) {
|
751
|
+
var at = st && bt.call(e, "__wrapped__"), et = ht && bt.call(s, "__wrapped__");
|
752
|
+
if (at || et) {
|
753
|
+
var $t = at ? e.value() : e, Ft = et ? s.value() : s;
|
754
|
+
return w || (w = new At()), D($t, Ft, o, l, w);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return
|
757
|
+
return V ? (w || (w = new At()), Jr(e, s, o, l, D, w)) : !1;
|
758
758
|
}
|
759
759
|
function Kr(e) {
|
760
760
|
if (!ir(e) || en(e))
|
761
761
|
return !1;
|
762
|
-
var
|
763
|
-
return
|
762
|
+
var s = nr(e) ? Sr : G;
|
763
|
+
return s.test(ct(e));
|
764
764
|
}
|
765
765
|
function Xr(e) {
|
766
|
-
return
|
766
|
+
return Dt(e) && Re(e.length) && !!j[Vt(e)];
|
767
767
|
}
|
768
768
|
function Vr(e) {
|
769
769
|
if (!rn(e))
|
770
|
-
return
|
771
|
-
var
|
770
|
+
return Kt(e);
|
771
|
+
var s = [];
|
772
772
|
for (var o in Object(e))
|
773
|
-
|
774
|
-
return
|
773
|
+
bt.call(e, o) && o != "constructor" && s.push(o);
|
774
|
+
return s;
|
775
775
|
}
|
776
|
-
function Pe(e,
|
777
|
-
var
|
778
|
-
if (z !=
|
776
|
+
function Pe(e, s, o, l, D, w) {
|
777
|
+
var L = o & a, z = e.length, K = s.length;
|
778
|
+
if (z != K && !(L && K > z))
|
779
779
|
return !1;
|
780
|
-
var $ =
|
781
|
-
if ($ &&
|
782
|
-
return $ ==
|
783
|
-
var
|
784
|
-
for (
|
785
|
-
var at = e[
|
780
|
+
var $ = w.get(e);
|
781
|
+
if ($ && w.get(s))
|
782
|
+
return $ == s;
|
783
|
+
var st = -1, ht = !0, V = o & c ? new me() : void 0;
|
784
|
+
for (w.set(e, s), w.set(s, e); ++st < z; ) {
|
785
|
+
var at = e[st], et = s[st];
|
786
786
|
if (l)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var $t = L ? l(et, at, st, s, e, w) : l(at, et, st, e, s, w);
|
788
|
+
if ($t !== void 0) {
|
789
|
+
if ($t)
|
790
790
|
continue;
|
791
|
-
|
791
|
+
ht = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
|
-
if (
|
795
|
-
if (!ue(
|
796
|
-
if (!
|
797
|
-
return
|
794
|
+
if (V) {
|
795
|
+
if (!ue(s, function(Ft, Jt) {
|
796
|
+
if (!Et(V, Jt) && (at === Ft || D(at, Ft, o, l, w)))
|
797
|
+
return V.push(Jt);
|
798
798
|
})) {
|
799
|
-
|
799
|
+
ht = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(at ===
|
803
|
-
|
802
|
+
} else if (!(at === et || D(at, et, o, l, w))) {
|
803
|
+
ht = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return
|
807
|
+
return w.delete(e), w.delete(s), ht;
|
808
808
|
}
|
809
|
-
function qr(e,
|
809
|
+
function qr(e, s, o, l, D, w, L) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
812
|
-
if (e.byteLength !=
|
811
|
+
case k:
|
812
|
+
if (e.byteLength != s.byteLength || e.byteOffset != s.byteOffset)
|
813
813
|
return !1;
|
814
|
-
e = e.buffer,
|
814
|
+
e = e.buffer, s = s.buffer;
|
815
815
|
case T:
|
816
|
-
return !(e.byteLength !=
|
817
|
-
case
|
816
|
+
return !(e.byteLength != s.byteLength || !w(new Xe(e), new Xe(s)));
|
817
|
+
case S:
|
818
818
|
case P:
|
819
819
|
case f:
|
820
|
-
return er(+e, +
|
820
|
+
return er(+e, +s);
|
821
821
|
case m:
|
822
|
-
return e.name ==
|
822
|
+
return e.name == s.name && e.message == s.message;
|
823
823
|
case _:
|
824
|
-
case
|
825
|
-
return e ==
|
824
|
+
case v:
|
825
|
+
return e == s + "";
|
826
826
|
case u:
|
827
|
-
var z =
|
828
|
-
case
|
829
|
-
var
|
830
|
-
if (z || (z =
|
827
|
+
var z = Nt;
|
828
|
+
case g:
|
829
|
+
var K = l & a;
|
830
|
+
if (z || (z = Mt), e.size != s.size && !K)
|
831
831
|
return !1;
|
832
|
-
var $ =
|
832
|
+
var $ = L.get(e);
|
833
833
|
if ($)
|
834
|
-
return $ ==
|
835
|
-
l |= c,
|
836
|
-
var
|
837
|
-
return
|
834
|
+
return $ == s;
|
835
|
+
l |= c, L.set(e, s);
|
836
|
+
var st = Pe(z(e), z(s), l, D, w, L);
|
837
|
+
return L.delete(e), st;
|
838
838
|
case U:
|
839
|
-
if (
|
840
|
-
return
|
839
|
+
if (xe)
|
840
|
+
return xe.call(e) == xe.call(s);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Jr(e,
|
845
|
-
var
|
846
|
-
if (
|
844
|
+
function Jr(e, s, o, l, D, w) {
|
845
|
+
var L = o & a, z = qt(e), K = z.length, $ = qt(s), st = $.length;
|
846
|
+
if (K != st && !L)
|
847
847
|
return !1;
|
848
|
-
for (var
|
849
|
-
var
|
850
|
-
if (!(
|
848
|
+
for (var ht = K; ht--; ) {
|
849
|
+
var V = z[ht];
|
850
|
+
if (!(L ? V in s : bt.call(s, V)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
|
-
var at =
|
854
|
-
if (at &&
|
855
|
-
return at ==
|
856
|
-
var
|
857
|
-
|
858
|
-
for (var
|
859
|
-
|
860
|
-
var
|
853
|
+
var at = w.get(e);
|
854
|
+
if (at && w.get(s))
|
855
|
+
return at == s;
|
856
|
+
var et = !0;
|
857
|
+
w.set(e, s), w.set(s, e);
|
858
|
+
for (var $t = L; ++ht < K; ) {
|
859
|
+
V = z[ht];
|
860
|
+
var Ft = e[V], Jt = s[V];
|
861
861
|
if (l)
|
862
|
-
var Pn =
|
863
|
-
if (!(Pn === void 0 ?
|
864
|
-
|
862
|
+
var Pn = L ? l(Jt, Ft, V, s, e, w) : l(Ft, Jt, V, e, s, w);
|
863
|
+
if (!(Pn === void 0 ? Ft === Jt || D(Ft, Jt, o, l, w) : Pn)) {
|
864
|
+
et = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
$t || ($t = V == "constructor");
|
868
868
|
}
|
869
|
-
if (
|
870
|
-
var
|
871
|
-
|
869
|
+
if (et && !$t) {
|
870
|
+
var ar = e.constructor, or = s.constructor;
|
871
|
+
ar != or && "constructor" in e && "constructor" in s && !(typeof ar == "function" && ar instanceof ar && typeof or == "function" && or instanceof or) && (et = !1);
|
872
872
|
}
|
873
|
-
return
|
873
|
+
return w.delete(e), w.delete(s), et;
|
874
874
|
}
|
875
|
-
function
|
875
|
+
function qt(e) {
|
876
876
|
return Oe(e, Fe, Zr);
|
877
877
|
}
|
878
|
-
function
|
878
|
+
function wt(e, s) {
|
879
879
|
var o = e.__data__;
|
880
|
-
return tn(
|
880
|
+
return tn(s) ? o[typeof s == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
|
-
function
|
883
|
-
var o =
|
882
|
+
function Ct(e, s) {
|
883
|
+
var o = Gt(e, s);
|
884
884
|
return Kr(o) ? o : void 0;
|
885
885
|
}
|
886
|
-
function
|
887
|
-
var
|
886
|
+
function Rt(e) {
|
887
|
+
var s = bt.call(e, kt), o = e[kt];
|
888
888
|
try {
|
889
|
-
e[
|
889
|
+
e[kt] = void 0;
|
890
890
|
var l = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return l && (
|
893
|
+
var D = Ke.call(e);
|
894
|
+
return l && (s ? e[kt] = o : delete e[kt]), D;
|
895
895
|
}
|
896
896
|
var Zr = he ? function(e) {
|
897
|
-
return e == null ? [] : (e = Object(e),
|
898
|
-
return pe.call(e,
|
897
|
+
return e == null ? [] : (e = Object(e), Q(he(e), function(s) {
|
898
|
+
return pe.call(e, s);
|
899
899
|
}));
|
900
|
-
} :
|
901
|
-
(Te &&
|
902
|
-
var
|
900
|
+
} : sn, xt = Vt;
|
901
|
+
(Te && xt(new Te(new ArrayBuffer(1))) != k || Xt && xt(new Xt()) != u || Ee && xt(Ee.resolve()) != h || Me && xt(new Me()) != g || Ae && xt(new Ae()) != O) && (xt = function(e) {
|
902
|
+
var s = Vt(e), o = s == y ? e.constructor : void 0, l = o ? ct(o) : "";
|
903
903
|
if (l)
|
904
904
|
switch (l) {
|
905
905
|
case Ve:
|
906
|
-
return
|
907
|
-
case
|
906
|
+
return k;
|
907
|
+
case Pt:
|
908
908
|
return u;
|
909
909
|
case kr:
|
910
910
|
return h;
|
911
911
|
case wr:
|
912
|
-
return
|
912
|
+
return g;
|
913
913
|
case Tr:
|
914
914
|
return O;
|
915
915
|
}
|
916
|
-
return
|
916
|
+
return s;
|
917
917
|
});
|
918
|
-
function Qr(e,
|
919
|
-
return
|
918
|
+
function Qr(e, s) {
|
919
|
+
return s = s ?? d, !!s && (typeof e == "number" || It.test(e)) && e > -1 && e % 1 == 0 && e < s;
|
920
920
|
}
|
921
921
|
function tn(e) {
|
922
|
-
var
|
923
|
-
return
|
922
|
+
var s = typeof e;
|
923
|
+
return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? e !== "__proto__" : e === null;
|
924
924
|
}
|
925
925
|
function en(e) {
|
926
926
|
return !!Be && Be in e;
|
927
927
|
}
|
928
928
|
function rn(e) {
|
929
|
-
var
|
929
|
+
var s = e && e.constructor, o = typeof s == "function" && s.prototype || Yt;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
932
|
function tr(e) {
|
933
933
|
return Ke.call(e);
|
934
934
|
}
|
935
|
-
function
|
935
|
+
function ct(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
938
|
return Se.call(e);
|
@@ -945,152 +945,152 @@ fr.exports;
|
|
945
945
|
}
|
946
946
|
return "";
|
947
947
|
}
|
948
|
-
function er(e,
|
949
|
-
return e ===
|
948
|
+
function er(e, s) {
|
949
|
+
return e === s || e !== e && s !== s;
|
950
950
|
}
|
951
951
|
var rr = Ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? Ze : function(e) {
|
954
|
-
return
|
954
|
+
return Dt(e) && bt.call(e, "callee") && !pe.call(e, "callee");
|
955
955
|
}, Ie = Array.isArray;
|
956
956
|
function Ce(e) {
|
957
957
|
return e != null && Re(e.length) && !nr(e);
|
958
958
|
}
|
959
|
-
var be = we ||
|
960
|
-
function nn(e,
|
961
|
-
return Qe(e,
|
959
|
+
var be = we || an;
|
960
|
+
function nn(e, s) {
|
961
|
+
return Qe(e, s);
|
962
962
|
}
|
963
963
|
function nr(e) {
|
964
964
|
if (!ir(e))
|
965
965
|
return !1;
|
966
|
-
var
|
967
|
-
return
|
966
|
+
var s = Vt(e);
|
967
|
+
return s == M || s == A || s == x || s == I;
|
968
968
|
}
|
969
969
|
function Re(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= d;
|
971
971
|
}
|
972
972
|
function ir(e) {
|
973
|
-
var
|
974
|
-
return e != null && (
|
973
|
+
var s = typeof e;
|
974
|
+
return e != null && (s == "object" || s == "function");
|
975
975
|
}
|
976
|
-
function
|
976
|
+
function Dt(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var
|
979
|
+
var sr = dt ? Tt(dt) : Xr;
|
980
980
|
function Fe(e) {
|
981
981
|
return Ce(e) ? Yr(e) : Vr(e);
|
982
982
|
}
|
983
|
-
function
|
983
|
+
function sn() {
|
984
984
|
return [];
|
985
985
|
}
|
986
|
-
function
|
986
|
+
function an() {
|
987
987
|
return !1;
|
988
988
|
}
|
989
989
|
t.exports = nn;
|
990
990
|
})(fr, fr.exports);
|
991
991
|
var Ri = fr.exports;
|
992
|
-
const ot = /* @__PURE__ */ Tn(Ri),
|
992
|
+
const ot = /* @__PURE__ */ Tn(Ri), ca = "add", Fi = "track", ji = "trackItems", ua = `${Fi}:changed`, la = `${ji}:changed`, zi = "state", fa = `${zi}:changed`, En = "design", Hi = `${En}:load`, Ni = `${En}:resize`, vt = "add", Li = `${vt}:text`, $i = `${vt}:video`, Ui = `${vt}:audio`, da = `${vt}:placeholder`, Wi = `${vt}:image`, pa = `${vt}:mask`, ha = `${vt}:transition`, ma = `${vt}:animation`, Gi = `${vt}:caption`, Yi = `${vt}:template`, Bi = `${vt}:items`, oe = "edit", Ki = `${oe}:object`, Xi = `${oe}:replaceMedia`, ya = `${oe}:text`, ga = `${oe}:shape`, Ia = `${oe}:templateItem`, ba = `${oe}:deleteTemplateItem`, _a = "enterEditMode", ve = "active", va = `${ve}:set`, Sa = `${ve}:delete`, Vi = `${ve}:paste`, qi = `${ve}:clone`, Ji = `${ve}:split`, ut = "layer", ka = `${ut}:locked`, wa = `${ut}:hidden`, Ta = `${ut}:move`, Ea = `${ut}:select`, Ma = `${ut}:selection`, Aa = `${ut}:sendTo`, xa = `${ut}:rename`, Da = `${ut}:editingName`, Oa = `${ut}:copy`, Pa = `${ut}:paste`, Zi = `${ut}:clone`, Ca = `${ut}:split`, Ra = `${ut}:cut`, Qi = `${ut}:delete`, gr = "history", ts = `${gr}:undo`, es = `${gr}:redo`, Fa = `${gr}:reset`, ri = "scale", rs = `${ri}:changed`;
|
993
993
|
var dr = { exports: {} };
|
994
994
|
dr.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__",
|
997
|
-
|
998
|
-
var
|
999
|
-
function ce(e,
|
1000
|
-
return e.set(
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", a = 9007199254740991, c = "[object Arguments]", d = "[object Array]", p = "[object Boolean]", E = "[object Date]", x = "[object Error]", S = "[object Function]", P = "[object GeneratorFunction]", m = "[object Map]", M = "[object Number]", A = "[object Object]", u = "[object Promise]", f = "[object RegExp]", b = "[object Set]", y = "[object String]", h = "[object Symbol]", I = "[object WeakMap]", _ = "[object ArrayBuffer]", g = "[object DataView]", v = "[object Float32Array]", U = "[object Float64Array]", C = "[object Int8Array]", O = "[object Int16Array]", T = "[object Int32Array]", k = "[object Uint8Array]", H = "[object Uint8ClampedArray]", X = "[object Uint16Array]", Z = "[object Uint32Array]", zt = /[\\^$.*+?()[\]{}|]/g, Ht = /\w*$/, mt = /^\[object .+?Constructor\]$/, Wt = /^(?:0|[1-9]\d*)$/, F = {};
|
997
|
+
F[c] = F[d] = F[_] = F[g] = F[p] = F[E] = F[v] = F[U] = F[C] = F[O] = F[T] = F[m] = F[M] = F[A] = F[f] = F[b] = F[y] = F[h] = F[k] = F[H] = F[X] = F[Z] = !0, F[x] = F[S] = F[I] = !1;
|
998
|
+
var W = typeof _t == "object" && _t && _t.Object === Object && _t, lt = typeof self == "object" && self && self.Object === Object && self, G = W || lt || Function("return this")(), It = r && !r.nodeType && r, j = It && !0 && t && !t.nodeType && t, St = j && j.exports === It;
|
999
|
+
function ce(e, s) {
|
1000
|
+
return e.set(s[0], s[1]), e;
|
1001
1001
|
}
|
1002
|
-
function
|
1003
|
-
return e.add(
|
1002
|
+
function N(e, s) {
|
1003
|
+
return e.add(s), e;
|
1004
1004
|
}
|
1005
|
-
function
|
1006
|
-
for (var o = -1, l = e ? e.length : 0; ++o < l &&
|
1005
|
+
function B(e, s) {
|
1006
|
+
for (var o = -1, l = e ? e.length : 0; ++o < l && s(e[o], o, e) !== !1; )
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
|
-
function
|
1011
|
-
for (var o = -1, l =
|
1012
|
-
e[
|
1010
|
+
function R(e, s) {
|
1011
|
+
for (var o = -1, l = s.length, D = e.length; ++o < l; )
|
1012
|
+
e[D + o] = s[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
|
-
function
|
1016
|
-
for (var
|
1017
|
-
o =
|
1015
|
+
function ft(e, s, o, l) {
|
1016
|
+
for (var D = -1, w = e ? e.length : 0; ++D < w; )
|
1017
|
+
o = s(o, e[D], D, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function rt(e, s) {
|
1021
1021
|
for (var o = -1, l = Array(e); ++o < e; )
|
1022
|
-
l[o] =
|
1022
|
+
l[o] = s(o);
|
1023
1023
|
return l;
|
1024
1024
|
}
|
1025
|
-
function
|
1026
|
-
return e == null ? void 0 : e[
|
1025
|
+
function nt(e, s) {
|
1026
|
+
return e == null ? void 0 : e[s];
|
1027
1027
|
}
|
1028
|
-
function
|
1029
|
-
var
|
1028
|
+
function dt(e) {
|
1029
|
+
var s = !1;
|
1030
1030
|
if (e != null && typeof e.toString != "function")
|
1031
1031
|
try {
|
1032
|
-
|
1032
|
+
s = !!(e + "");
|
1033
1033
|
} catch {
|
1034
1034
|
}
|
1035
|
-
return
|
1035
|
+
return s;
|
1036
1036
|
}
|
1037
|
-
function
|
1038
|
-
var
|
1039
|
-
return e.forEach(function(l,
|
1040
|
-
o[++
|
1037
|
+
function Q(e) {
|
1038
|
+
var s = -1, o = Array(e.size);
|
1039
|
+
return e.forEach(function(l, D) {
|
1040
|
+
o[++s] = [D, l];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
|
-
function
|
1043
|
+
function Ot(e, s) {
|
1044
1044
|
return function(o) {
|
1045
|
-
return e(
|
1045
|
+
return e(s(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
1048
|
function ue(e) {
|
1049
|
-
var
|
1049
|
+
var s = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(l) {
|
1051
|
-
o[++
|
1051
|
+
o[++s] = l;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var
|
1055
|
-
var e = /[^.]+$/.exec(
|
1054
|
+
var J = Array.prototype, Tt = Function.prototype, Et = Object.prototype, Gt = G["__core-js_shared__"], Nt = function() {
|
1055
|
+
var e = /[^.]+$/.exec(Gt && Gt.keys && Gt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(), Ye =
|
1058
|
-
"^" + Ye.call(
|
1059
|
-
),
|
1060
|
-
function
|
1061
|
-
var
|
1062
|
-
for (this.clear(); ++
|
1063
|
-
var l = e[
|
1057
|
+
}(), Ye = Tt.toString, Mt = Et.hasOwnProperty, le = Et.toString, vr = RegExp(
|
1058
|
+
"^" + Ye.call(Mt).replace(zt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), Yt = St ? G.Buffer : void 0, fe = G.Symbol, Se = G.Uint8Array, bt = Ot(Object.getPrototypeOf, Object), Be = Object.create, Ke = Et.propertyIsEnumerable, Sr = J.splice, ke = Object.getOwnPropertySymbols, de = Yt ? Yt.isBuffer : void 0, Xe = Ot(Object.keys, Object), pe = wt(G, "DataView"), Bt = wt(G, "Map"), kt = wt(G, "Promise"), he = wt(G, "Set"), we = wt(G, "WeakMap"), Kt = wt(Object, "create"), Te = ct(pe), Xt = ct(Bt), Ee = ct(kt), Me = ct(he), Ae = ct(we), Lt = fe ? fe.prototype : void 0, Ve = Lt ? Lt.valueOf : void 0;
|
1060
|
+
function Pt(e) {
|
1061
|
+
var s = -1, o = e ? e.length : 0;
|
1062
|
+
for (this.clear(); ++s < o; ) {
|
1063
|
+
var l = e[s];
|
1064
1064
|
this.set(l[0], l[1]);
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
1067
|
function kr() {
|
1068
|
-
this.__data__ =
|
1068
|
+
this.__data__ = Kt ? Kt(null) : {};
|
1069
1069
|
}
|
1070
1070
|
function wr(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
1073
|
function Tr(e) {
|
1074
|
-
var
|
1075
|
-
if (
|
1076
|
-
var o =
|
1074
|
+
var s = this.__data__;
|
1075
|
+
if (Kt) {
|
1076
|
+
var o = s[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
|
-
return
|
1079
|
+
return Mt.call(s, e) ? s[e] : void 0;
|
1080
1080
|
}
|
1081
1081
|
function qe(e) {
|
1082
|
-
var
|
1083
|
-
return
|
1082
|
+
var s = this.__data__;
|
1083
|
+
return Kt ? s[e] !== void 0 : Mt.call(s, e);
|
1084
1084
|
}
|
1085
|
-
function
|
1085
|
+
function xe(e, s) {
|
1086
1086
|
var o = this.__data__;
|
1087
|
-
return o[e] =
|
1087
|
+
return o[e] = Kt && s === void 0 ? i : s, this;
|
1088
1088
|
}
|
1089
|
-
|
1090
|
-
function
|
1091
|
-
var
|
1092
|
-
for (this.clear(); ++
|
1093
|
-
var l = e[
|
1089
|
+
Pt.prototype.clear = kr, Pt.prototype.delete = wr, Pt.prototype.get = Tr, Pt.prototype.has = qe, Pt.prototype.set = xe;
|
1090
|
+
function tt(e) {
|
1091
|
+
var s = -1, o = e ? e.length : 0;
|
1092
|
+
for (this.clear(); ++s < o; ) {
|
1093
|
+
var l = e[s];
|
1094
1094
|
this.set(l[0], l[1]);
|
1095
1095
|
}
|
1096
1096
|
}
|
@@ -1098,289 +1098,289 @@ dr.exports;
|
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function Mr(e) {
|
1101
|
-
var
|
1101
|
+
var s = this.__data__, o = ye(s, e);
|
1102
1102
|
if (o < 0)
|
1103
1103
|
return !1;
|
1104
|
-
var l =
|
1105
|
-
return o == l ?
|
1104
|
+
var l = s.length - 1;
|
1105
|
+
return o == l ? s.pop() : Sr.call(s, o, 1), !0;
|
1106
1106
|
}
|
1107
1107
|
function Ar(e) {
|
1108
|
-
var
|
1109
|
-
return o < 0 ? void 0 :
|
1108
|
+
var s = this.__data__, o = ye(s, e);
|
1109
|
+
return o < 0 ? void 0 : s[o][1];
|
1110
1110
|
}
|
1111
|
-
function
|
1111
|
+
function xr(e) {
|
1112
1112
|
return ye(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
|
-
function
|
1114
|
+
function Dr(e, s) {
|
1115
1115
|
var o = this.__data__, l = ye(o, e);
|
1116
|
-
return l < 0 ? o.push([e,
|
1116
|
+
return l < 0 ? o.push([e, s]) : o[l][1] = s, this;
|
1117
1117
|
}
|
1118
|
-
|
1119
|
-
function
|
1120
|
-
var
|
1121
|
-
for (this.clear(); ++
|
1122
|
-
var l = e[
|
1118
|
+
tt.prototype.clear = Er, tt.prototype.delete = Mr, tt.prototype.get = Ar, tt.prototype.has = xr, tt.prototype.set = Dr;
|
1119
|
+
function it(e) {
|
1120
|
+
var s = -1, o = e ? e.length : 0;
|
1121
|
+
for (this.clear(); ++s < o; ) {
|
1122
|
+
var l = e[s];
|
1123
1123
|
this.set(l[0], l[1]);
|
1124
1124
|
}
|
1125
1125
|
}
|
1126
1126
|
function Or() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1129
|
-
map: new (
|
1130
|
-
string: new
|
1128
|
+
hash: new Pt(),
|
1129
|
+
map: new (Bt || tt)(),
|
1130
|
+
string: new Pt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Pr(e) {
|
1134
|
-
return
|
1134
|
+
return qt(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function Cr(e) {
|
1137
|
-
return
|
1137
|
+
return qt(this, e).get(e);
|
1138
1138
|
}
|
1139
1139
|
function Rr(e) {
|
1140
|
-
return
|
1140
|
+
return qt(this, e).has(e);
|
1141
1141
|
}
|
1142
|
-
function Fr(e,
|
1143
|
-
return
|
1142
|
+
function Fr(e, s) {
|
1143
|
+
return qt(this, e).set(e, s), this;
|
1144
1144
|
}
|
1145
|
-
|
1146
|
-
function
|
1147
|
-
this.__data__ = new
|
1145
|
+
it.prototype.clear = Or, it.prototype.delete = Pr, it.prototype.get = Cr, it.prototype.has = Rr, it.prototype.set = Fr;
|
1146
|
+
function pt(e) {
|
1147
|
+
this.__data__ = new tt(e);
|
1148
1148
|
}
|
1149
|
-
function
|
1150
|
-
this.__data__ = new
|
1149
|
+
function jr() {
|
1150
|
+
this.__data__ = new tt();
|
1151
1151
|
}
|
1152
|
-
function
|
1152
|
+
function zr(e) {
|
1153
1153
|
return this.__data__.delete(e);
|
1154
1154
|
}
|
1155
|
-
function
|
1155
|
+
function Hr(e) {
|
1156
1156
|
return this.__data__.get(e);
|
1157
1157
|
}
|
1158
1158
|
function Nr(e) {
|
1159
1159
|
return this.__data__.has(e);
|
1160
1160
|
}
|
1161
|
-
function Lr(e,
|
1161
|
+
function Lr(e, s) {
|
1162
1162
|
var o = this.__data__;
|
1163
|
-
if (o instanceof
|
1163
|
+
if (o instanceof tt) {
|
1164
1164
|
var l = o.__data__;
|
1165
|
-
if (!
|
1166
|
-
return l.push([e,
|
1167
|
-
o = this.__data__ = new
|
1165
|
+
if (!Bt || l.length < n - 1)
|
1166
|
+
return l.push([e, s]), this;
|
1167
|
+
o = this.__data__ = new it(l);
|
1168
1168
|
}
|
1169
|
-
return o.set(e,
|
1169
|
+
return o.set(e, s), this;
|
1170
1170
|
}
|
1171
|
-
|
1172
|
-
function me(e,
|
1173
|
-
var o = Ce(e) || Ie(e) ?
|
1174
|
-
for (var
|
1175
|
-
|
1171
|
+
pt.prototype.clear = jr, pt.prototype.delete = zr, pt.prototype.get = Hr, pt.prototype.has = Nr, pt.prototype.set = Lr;
|
1172
|
+
function me(e, s) {
|
1173
|
+
var o = Ce(e) || Ie(e) ? rt(e.length, String) : [], l = o.length, D = !!l;
|
1174
|
+
for (var w in e)
|
1175
|
+
Mt.call(e, w) && !(D && (w == "length" || tn(w, l))) && o.push(w);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
|
-
function Je(e,
|
1179
|
-
var l = e[
|
1180
|
-
(!(
|
1178
|
+
function Je(e, s, o) {
|
1179
|
+
var l = e[s];
|
1180
|
+
(!(Mt.call(e, s) && rr(l, o)) || o === void 0 && !(s in e)) && (e[s] = o);
|
1181
1181
|
}
|
1182
|
-
function ye(e,
|
1182
|
+
function ye(e, s) {
|
1183
1183
|
for (var o = e.length; o--; )
|
1184
|
-
if (rr(e[o][0],
|
1184
|
+
if (rr(e[o][0], s))
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1189
|
-
return e && Pe(
|
1188
|
+
function At(e, s) {
|
1189
|
+
return e && Pe(s, Fe(s), e);
|
1190
1190
|
}
|
1191
|
-
function
|
1191
|
+
function De(e, s, o, l, D, w, L) {
|
1192
1192
|
var z;
|
1193
|
-
if (l && (z =
|
1193
|
+
if (l && (z = w ? l(e, D, w, L) : l(e)), z !== void 0)
|
1194
1194
|
return z;
|
1195
|
-
if (!
|
1195
|
+
if (!Dt(e))
|
1196
1196
|
return e;
|
1197
|
-
var
|
1198
|
-
if (
|
1199
|
-
if (z = Zr(e), !
|
1197
|
+
var K = Ce(e);
|
1198
|
+
if (K) {
|
1199
|
+
if (z = Zr(e), !s)
|
1200
1200
|
return Vr(e, z);
|
1201
1201
|
} else {
|
1202
|
-
var $ =
|
1202
|
+
var $ = Rt(e), st = $ == S || $ == P;
|
1203
1203
|
if (nr(e))
|
1204
|
-
return ge(e,
|
1205
|
-
if ($ == A || $ == c ||
|
1206
|
-
if (
|
1207
|
-
return
|
1208
|
-
if (z =
|
1209
|
-
return qr(e,
|
1204
|
+
return ge(e, s);
|
1205
|
+
if ($ == A || $ == c || st && !w) {
|
1206
|
+
if (dt(e))
|
1207
|
+
return w ? e : {};
|
1208
|
+
if (z = xt(st ? {} : e), !s)
|
1209
|
+
return qr(e, At(z, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!
|
1212
|
-
return
|
1213
|
-
z = Qr(e, $,
|
1211
|
+
if (!F[$])
|
1212
|
+
return w ? e : {};
|
1213
|
+
z = Qr(e, $, De, s);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var
|
1218
|
-
if (
|
1219
|
-
return
|
1220
|
-
if (
|
1221
|
-
var
|
1222
|
-
return
|
1223
|
-
|
1216
|
+
L || (L = new pt());
|
1217
|
+
var ht = L.get(e);
|
1218
|
+
if (ht)
|
1219
|
+
return ht;
|
1220
|
+
if (L.set(e, z), !K)
|
1221
|
+
var V = o ? Jr(e) : Fe(e);
|
1222
|
+
return B(V || e, function(at, et) {
|
1223
|
+
V && (et = at, at = e[et]), Je(z, et, De(at, s, o, l, et, e, L));
|
1224
1224
|
}), z;
|
1225
1225
|
}
|
1226
1226
|
function $r(e) {
|
1227
|
-
return
|
1227
|
+
return Dt(e) ? Be(e) : {};
|
1228
1228
|
}
|
1229
|
-
function Ur(e,
|
1230
|
-
var l =
|
1231
|
-
return Ce(e) ? l :
|
1229
|
+
function Ur(e, s, o) {
|
1230
|
+
var l = s(e);
|
1231
|
+
return Ce(e) ? l : R(l, o(e));
|
1232
1232
|
}
|
1233
1233
|
function Wr(e) {
|
1234
1234
|
return le.call(e);
|
1235
1235
|
}
|
1236
1236
|
function Gr(e) {
|
1237
|
-
if (!
|
1237
|
+
if (!Dt(e) || rn(e))
|
1238
1238
|
return !1;
|
1239
|
-
var
|
1240
|
-
return
|
1239
|
+
var s = Re(e) || dt(e) ? vr : mt;
|
1240
|
+
return s.test(ct(e));
|
1241
1241
|
}
|
1242
1242
|
function Yr(e) {
|
1243
1243
|
if (!tr(e))
|
1244
1244
|
return Xe(e);
|
1245
|
-
var
|
1245
|
+
var s = [];
|
1246
1246
|
for (var o in Object(e))
|
1247
|
-
|
1248
|
-
return
|
1247
|
+
Mt.call(e, o) && o != "constructor" && s.push(o);
|
1248
|
+
return s;
|
1249
1249
|
}
|
1250
|
-
function ge(e,
|
1251
|
-
if (
|
1250
|
+
function ge(e, s) {
|
1251
|
+
if (s)
|
1252
1252
|
return e.slice();
|
1253
1253
|
var o = new e.constructor(e.length);
|
1254
1254
|
return e.copy(o), o;
|
1255
1255
|
}
|
1256
1256
|
function Oe(e) {
|
1257
|
-
var
|
1258
|
-
return new Se(
|
1257
|
+
var s = new e.constructor(e.byteLength);
|
1258
|
+
return new Se(s).set(new Se(e)), s;
|
1259
1259
|
}
|
1260
|
-
function
|
1261
|
-
var o =
|
1260
|
+
function Vt(e, s) {
|
1261
|
+
var o = s ? Oe(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
|
-
function Ze(e,
|
1265
|
-
var l =
|
1266
|
-
return
|
1264
|
+
function Ze(e, s, o) {
|
1265
|
+
var l = s ? o(Q(e), !0) : Q(e);
|
1266
|
+
return ft(l, ce, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function Qe(e) {
|
1269
|
-
var
|
1270
|
-
return
|
1269
|
+
var s = new e.constructor(e.source, Ht.exec(e));
|
1270
|
+
return s.lastIndex = e.lastIndex, s;
|
1271
1271
|
}
|
1272
|
-
function Br(e,
|
1273
|
-
var l =
|
1274
|
-
return
|
1272
|
+
function Br(e, s, o) {
|
1273
|
+
var l = s ? o(ue(e), !0) : ue(e);
|
1274
|
+
return ft(l, N, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Kr(e) {
|
1277
1277
|
return Ve ? Object(Ve.call(e)) : {};
|
1278
1278
|
}
|
1279
|
-
function Xr(e,
|
1280
|
-
var o =
|
1279
|
+
function Xr(e, s) {
|
1280
|
+
var o = s ? Oe(e.buffer) : e.buffer;
|
1281
1281
|
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
|
-
function Vr(e,
|
1283
|
+
function Vr(e, s) {
|
1284
1284
|
var o = -1, l = e.length;
|
1285
|
-
for (
|
1286
|
-
|
1287
|
-
return
|
1285
|
+
for (s || (s = Array(l)); ++o < l; )
|
1286
|
+
s[o] = e[o];
|
1287
|
+
return s;
|
1288
1288
|
}
|
1289
|
-
function Pe(e,
|
1289
|
+
function Pe(e, s, o, l) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
Je(o,
|
1291
|
+
for (var D = -1, w = s.length; ++D < w; ) {
|
1292
|
+
var L = s[D], z = void 0;
|
1293
|
+
Je(o, L, z === void 0 ? e[L] : z);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
1296
1296
|
}
|
1297
|
-
function qr(e,
|
1298
|
-
return Pe(e,
|
1297
|
+
function qr(e, s) {
|
1298
|
+
return Pe(e, Ct(e), s);
|
1299
1299
|
}
|
1300
1300
|
function Jr(e) {
|
1301
|
-
return Ur(e, Fe,
|
1301
|
+
return Ur(e, Fe, Ct);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function qt(e, s) {
|
1304
1304
|
var o = e.__data__;
|
1305
|
-
return en(
|
1305
|
+
return en(s) ? o[typeof s == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
|
-
function
|
1308
|
-
var o =
|
1307
|
+
function wt(e, s) {
|
1308
|
+
var o = nt(e, s);
|
1309
1309
|
return Gr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var
|
1312
|
-
(pe &&
|
1313
|
-
var
|
1311
|
+
var Ct = ke ? Ot(ke, Object) : sn, Rt = Wr;
|
1312
|
+
(pe && Rt(new pe(new ArrayBuffer(1))) != g || Bt && Rt(new Bt()) != m || kt && Rt(kt.resolve()) != u || he && Rt(new he()) != b || we && Rt(new we()) != I) && (Rt = function(e) {
|
1313
|
+
var s = le.call(e), o = s == A ? e.constructor : void 0, l = o ? ct(o) : void 0;
|
1314
1314
|
if (l)
|
1315
1315
|
switch (l) {
|
1316
1316
|
case Te:
|
1317
|
-
return
|
1318
|
-
case
|
1317
|
+
return g;
|
1318
|
+
case Xt:
|
1319
1319
|
return m;
|
1320
1320
|
case Ee:
|
1321
1321
|
return u;
|
1322
1322
|
case Me:
|
1323
|
-
return
|
1323
|
+
return b;
|
1324
1324
|
case Ae:
|
1325
|
-
return
|
1325
|
+
return I;
|
1326
1326
|
}
|
1327
|
-
return
|
1327
|
+
return s;
|
1328
1328
|
});
|
1329
1329
|
function Zr(e) {
|
1330
|
-
var
|
1331
|
-
return
|
1330
|
+
var s = e.length, o = e.constructor(s);
|
1331
|
+
return s && typeof e[0] == "string" && Mt.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
|
-
function
|
1334
|
-
return typeof e.constructor == "function" && !tr(e) ? $r(
|
1333
|
+
function xt(e) {
|
1334
|
+
return typeof e.constructor == "function" && !tr(e) ? $r(bt(e)) : {};
|
1335
1335
|
}
|
1336
|
-
function Qr(e,
|
1337
|
-
var
|
1338
|
-
switch (
|
1336
|
+
function Qr(e, s, o, l) {
|
1337
|
+
var D = e.constructor;
|
1338
|
+
switch (s) {
|
1339
1339
|
case _:
|
1340
1340
|
return Oe(e);
|
1341
1341
|
case p:
|
1342
1342
|
case E:
|
1343
|
-
return new
|
1344
|
-
case
|
1345
|
-
return
|
1346
|
-
case
|
1343
|
+
return new D(+e);
|
1344
|
+
case g:
|
1345
|
+
return Vt(e, l);
|
1346
|
+
case v:
|
1347
1347
|
case U:
|
1348
1348
|
case C:
|
1349
1349
|
case O:
|
1350
1350
|
case T:
|
1351
|
-
case
|
1351
|
+
case k:
|
1352
1352
|
case H:
|
1353
|
-
case
|
1354
|
-
case
|
1353
|
+
case X:
|
1354
|
+
case Z:
|
1355
1355
|
return Xr(e, l);
|
1356
1356
|
case m:
|
1357
1357
|
return Ze(e, l, o);
|
1358
1358
|
case M:
|
1359
1359
|
case y:
|
1360
|
-
return new
|
1360
|
+
return new D(e);
|
1361
1361
|
case f:
|
1362
1362
|
return Qe(e);
|
1363
|
-
case
|
1363
|
+
case b:
|
1364
1364
|
return Br(e, l, o);
|
1365
1365
|
case h:
|
1366
1366
|
return Kr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
|
-
function tn(e,
|
1370
|
-
return
|
1369
|
+
function tn(e, s) {
|
1370
|
+
return s = s ?? a, !!s && (typeof e == "number" || Wt.test(e)) && e > -1 && e % 1 == 0 && e < s;
|
1371
1371
|
}
|
1372
1372
|
function en(e) {
|
1373
|
-
var
|
1374
|
-
return
|
1373
|
+
var s = typeof e;
|
1374
|
+
return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
1376
|
function rn(e) {
|
1377
|
-
return !!
|
1377
|
+
return !!Nt && Nt in e;
|
1378
1378
|
}
|
1379
1379
|
function tr(e) {
|
1380
|
-
var
|
1380
|
+
var s = e && e.constructor, o = typeof s == "function" && s.prototype || Et;
|
1381
1381
|
return e === o;
|
1382
1382
|
}
|
1383
|
-
function
|
1383
|
+
function ct(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
1386
|
return Ye.call(e);
|
@@ -1394,93 +1394,93 @@ dr.exports;
|
|
1394
1394
|
return "";
|
1395
1395
|
}
|
1396
1396
|
function er(e) {
|
1397
|
-
return
|
1397
|
+
return De(e, !0, !0);
|
1398
1398
|
}
|
1399
|
-
function rr(e,
|
1400
|
-
return e ===
|
1399
|
+
function rr(e, s) {
|
1400
|
+
return e === s || e !== e && s !== s;
|
1401
1401
|
}
|
1402
1402
|
function Ie(e) {
|
1403
|
-
return nn(e) &&
|
1403
|
+
return nn(e) && Mt.call(e, "callee") && (!Ke.call(e, "callee") || le.call(e) == c);
|
1404
1404
|
}
|
1405
1405
|
var Ce = Array.isArray;
|
1406
1406
|
function be(e) {
|
1407
1407
|
return e != null && ir(e.length) && !Re(e);
|
1408
1408
|
}
|
1409
1409
|
function nn(e) {
|
1410
|
-
return
|
1410
|
+
return sr(e) && be(e);
|
1411
1411
|
}
|
1412
|
-
var nr = de ||
|
1412
|
+
var nr = de || an;
|
1413
1413
|
function Re(e) {
|
1414
|
-
var
|
1415
|
-
return
|
1414
|
+
var s = Dt(e) ? le.call(e) : "";
|
1415
|
+
return s == S || s == P;
|
1416
1416
|
}
|
1417
1417
|
function ir(e) {
|
1418
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
1418
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= a;
|
1419
1419
|
}
|
1420
|
-
function
|
1421
|
-
var
|
1422
|
-
return !!e && (
|
1420
|
+
function Dt(e) {
|
1421
|
+
var s = typeof e;
|
1422
|
+
return !!e && (s == "object" || s == "function");
|
1423
1423
|
}
|
1424
|
-
function
|
1424
|
+
function sr(e) {
|
1425
1425
|
return !!e && typeof e == "object";
|
1426
1426
|
}
|
1427
1427
|
function Fe(e) {
|
1428
1428
|
return be(e) ? me(e) : Yr(e);
|
1429
1429
|
}
|
1430
|
-
function
|
1430
|
+
function sn() {
|
1431
1431
|
return [];
|
1432
1432
|
}
|
1433
|
-
function
|
1433
|
+
function an() {
|
1434
1434
|
return !1;
|
1435
1435
|
}
|
1436
1436
|
t.exports = er;
|
1437
1437
|
})(dr, dr.exports);
|
1438
|
-
var
|
1439
|
-
const
|
1438
|
+
var ns = dr.exports;
|
1439
|
+
const Y = /* @__PURE__ */ Tn(ns), ni = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
|
-
const
|
1443
|
-
r({ width:
|
1444
|
-
}, i.onerror = (
|
1445
|
-
n(
|
1442
|
+
const a = i.width, c = i.height;
|
1443
|
+
r({ width: a, height: c });
|
1444
|
+
}, i.onerror = (a) => {
|
1445
|
+
n(a);
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
1447
|
-
}),
|
1447
|
+
}), is = (t) => new Promise((r, n) => {
|
1448
1448
|
const i = new Audio();
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1450
|
-
const
|
1451
|
-
r({ duration:
|
1452
|
-
}), i.addEventListener("error", (
|
1453
|
-
n(
|
1450
|
+
const a = i.duration * 1e3;
|
1451
|
+
r({ duration: a });
|
1452
|
+
}), i.addEventListener("error", (a) => {
|
1453
|
+
n(a);
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
1455
1455
|
}), ii = (t) => new Promise((r, n) => {
|
1456
1456
|
const i = document.createElement("video");
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1458
|
-
const
|
1459
|
-
r({ duration:
|
1460
|
-
}), i.addEventListener("error", (
|
1461
|
-
n(
|
1458
|
+
const a = i.duration * 1e3, c = i.videoWidth, d = i.videoHeight;
|
1459
|
+
r({ duration: a, width: c, height: d });
|
1460
|
+
}), i.addEventListener("error", (a) => {
|
1461
|
+
n(a);
|
1462
1462
|
}), i.src = t, i.load();
|
1463
|
-
}),
|
1463
|
+
}), si = (t, r) => {
|
1464
1464
|
const n = document.createElement("div");
|
1465
|
-
Object.keys(r).forEach((
|
1466
|
-
|
1465
|
+
Object.keys(r).forEach((a) => {
|
1466
|
+
a !== "height" && (n.style[a] = r[a]);
|
1467
1467
|
}), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
|
1468
1468
|
const i = getComputedStyle(n).height;
|
1469
1469
|
return document.body.removeChild(n), parseFloat(i);
|
1470
1470
|
}, pr = (t) => {
|
1471
1471
|
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((i) => i));
|
1472
1472
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, i) => {
|
1473
|
-
Promise.all(r).then((
|
1474
|
-
|
1473
|
+
Promise.all(r).then((a) => {
|
1474
|
+
a.forEach((c) => {
|
1475
1475
|
c && c.family && (document.fonts.add(c), n(!0));
|
1476
1476
|
});
|
1477
|
-
}).catch((
|
1477
|
+
}).catch((a) => i(a));
|
1478
1478
|
});
|
1479
|
-
},
|
1479
|
+
}, ss = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1480
1480
|
let lr = (t = 21) => {
|
1481
1481
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1482
1482
|
for (; t--; )
|
1483
|
-
r +=
|
1483
|
+
r += ss[n[t] & 63];
|
1484
1484
|
return r;
|
1485
1485
|
};
|
1486
1486
|
function _e(t = 16) {
|
@@ -1521,7 +1521,7 @@ const Ir = {
|
|
1521
1521
|
), i;
|
1522
1522
|
}
|
1523
1523
|
return t;
|
1524
|
-
},
|
1524
|
+
}, ai = (t, r) => t ? t.from && !t.to ? {
|
1525
1525
|
from: t.from,
|
1526
1526
|
to: r.duration
|
1527
1527
|
} : t : {
|
@@ -1532,20 +1532,20 @@ function br(t, r) {
|
|
1532
1532
|
const n = {
|
1533
1533
|
x: t.size.width / 2,
|
1534
1534
|
y: t.size.height / 2
|
1535
|
-
}, i = { x: r.width / 2, y: r.height / 2 },
|
1535
|
+
}, i = { x: r.width / 2, y: r.height / 2 }, a = Math.min(
|
1536
1536
|
t.size.width / r.width,
|
1537
1537
|
t.size.height / r.height
|
1538
1538
|
), c = n.x - i.x;
|
1539
1539
|
return {
|
1540
1540
|
top: `${n.y - i.y}px`,
|
1541
1541
|
left: `${c}px`,
|
1542
|
-
transform: `scale(${
|
1542
|
+
transform: `scale(${a})`
|
1543
1543
|
};
|
1544
1544
|
}
|
1545
1545
|
const oi = async (t, r) => {
|
1546
|
-
const n = t.details.src, i = await ii(n),
|
1546
|
+
const n = t.details.src, i = await ii(n), a = br(r, {
|
1547
1547
|
...i
|
1548
|
-
}), c =
|
1548
|
+
}), c = ai(t.trim, { duration: i.duration }), d = {
|
1549
1549
|
width: i.width,
|
1550
1550
|
height: i.height,
|
1551
1551
|
opacity: 100,
|
@@ -1559,11 +1559,11 @@ const oi = async (t, r) => {
|
|
1559
1559
|
borderColor: t.details.borderColor || "#000000",
|
1560
1560
|
// Default border color
|
1561
1561
|
boxShadow: t.details.boxShadow || Ir,
|
1562
|
-
top: t.details.top ||
|
1562
|
+
top: t.details.top || a.top || "0px",
|
1563
1563
|
// Default top
|
1564
|
-
left: t.details.left ||
|
1564
|
+
left: t.details.left || a.left || "0px",
|
1565
1565
|
// Default left
|
1566
|
-
transform: t.details.transform ||
|
1566
|
+
transform: t.details.transform || a.transform,
|
1567
1567
|
// Default transform
|
1568
1568
|
blur: t.details.blur || 0,
|
1569
1569
|
brightness: t.details.brightness || 100,
|
@@ -1585,12 +1585,12 @@ const oi = async (t, r) => {
|
|
1585
1585
|
duration: i.duration
|
1586
1586
|
};
|
1587
1587
|
}, ci = async (t) => {
|
1588
|
-
const r = t.id, n = t.details,
|
1588
|
+
const r = t.id, n = t.details, a = (await is(n.src)).duration, c = ai(t.trim, { duration: a });
|
1589
1589
|
return {
|
1590
1590
|
id: r,
|
1591
1591
|
name: "",
|
1592
1592
|
type: "audio",
|
1593
|
-
display: Ue(t.display, { duration:
|
1593
|
+
display: Ue(t.display, { duration: a, trim: c }),
|
1594
1594
|
trim: c,
|
1595
1595
|
playbackRate: t.playbackRate || 1,
|
1596
1596
|
details: {
|
@@ -1599,39 +1599,39 @@ const oi = async (t, r) => {
|
|
1599
1599
|
// Default volume
|
1600
1600
|
},
|
1601
1601
|
metadata: { ...t.metadata },
|
1602
|
-
duration:
|
1602
|
+
duration: a
|
1603
1603
|
};
|
1604
|
-
},
|
1604
|
+
}, as = async (t, r) => {
|
1605
1605
|
var P, m, M;
|
1606
1606
|
const n = t.trackItemIds, i = t.size || {
|
1607
1607
|
width: t.details.width,
|
1608
1608
|
height: t.details.height
|
1609
|
-
},
|
1609
|
+
}, a = Math.min(
|
1610
1610
|
r.size.width / i.width,
|
1611
1611
|
r.size.height / i.height
|
1612
1612
|
), c = ((P = t.details) == null ? void 0 : P.rotate) || 0, d = {
|
1613
1613
|
top: ((m = t.details) == null ? void 0 : m.top) || 0,
|
1614
1614
|
left: ((M = t.details) == null ? void 0 : M.left) || 0
|
1615
1615
|
}, p = t.display, E = t.trim || t.display;
|
1616
|
-
let
|
1616
|
+
let x = 1 / 0, S = 0;
|
1617
1617
|
return n.forEach((A) => {
|
1618
1618
|
const u = t.trackItemsMap[A];
|
1619
|
-
u.display.from <
|
1619
|
+
u.display.from < x && (x = u.display.from), u.display.to > S && (S = u.display.to);
|
1620
1620
|
}), {
|
1621
1621
|
id: t.id,
|
1622
1622
|
details: {
|
1623
1623
|
...i,
|
1624
1624
|
top: d.top,
|
1625
1625
|
left: d.left,
|
1626
|
-
scale:
|
1626
|
+
scale: a,
|
1627
1627
|
rotate: c
|
1628
1628
|
},
|
1629
1629
|
trim: E,
|
1630
|
-
display: p || { from:
|
1630
|
+
display: p || { from: x, to: S },
|
1631
1631
|
activeEdit: !1
|
1632
1632
|
};
|
1633
1633
|
}, ui = async (t, r) => {
|
1634
|
-
const n = t.details, i = await ni(n.src),
|
1634
|
+
const n = t.details, i = await ni(n.src), a = br(r, i);
|
1635
1635
|
return {
|
1636
1636
|
id: t.id,
|
1637
1637
|
type: "image",
|
@@ -1647,7 +1647,7 @@ const oi = async (t, r) => {
|
|
1647
1647
|
// Default height
|
1648
1648
|
opacity: n.opacity ?? 100,
|
1649
1649
|
// Default opacity
|
1650
|
-
transform: n.transform ||
|
1650
|
+
transform: n.transform || a.transform,
|
1651
1651
|
// Default transform
|
1652
1652
|
border: n.border || "none",
|
1653
1653
|
// Default border
|
@@ -1655,9 +1655,9 @@ const oi = async (t, r) => {
|
|
1655
1655
|
// Default border radius
|
1656
1656
|
boxShadow: n.boxShadow || Ir,
|
1657
1657
|
// Default box shadow
|
1658
|
-
top: n.top ||
|
1658
|
+
top: n.top || a.top || "0px",
|
1659
1659
|
// Default top
|
1660
|
-
left: n.left ||
|
1660
|
+
left: n.left || a.left || "0px",
|
1661
1661
|
// Default left
|
1662
1662
|
borderWidth: n.borderWidth ?? 0,
|
1663
1663
|
// Default border width
|
@@ -1682,7 +1682,7 @@ const oi = async (t, r) => {
|
|
1682
1682
|
url: n.details.fontUrl
|
1683
1683
|
}
|
1684
1684
|
]);
|
1685
|
-
const i = n.id,
|
1685
|
+
const i = n.id, a = n.details, c = di(a), d = si(n.details.text, c), p = br(r, {
|
1686
1686
|
width: c.width,
|
1687
1687
|
height: d
|
1688
1688
|
});
|
@@ -1693,17 +1693,17 @@ const oi = async (t, r) => {
|
|
1693
1693
|
display: Ue(n.display),
|
1694
1694
|
details: {
|
1695
1695
|
...c,
|
1696
|
-
text:
|
1696
|
+
text: a.text || "",
|
1697
1697
|
// Default text content
|
1698
1698
|
height: d,
|
1699
1699
|
// Default height
|
1700
|
-
fontUrl:
|
1700
|
+
fontUrl: a.fontUrl,
|
1701
1701
|
top: c.top || p.top,
|
1702
1702
|
left: c.left || p.left,
|
1703
|
-
borderWidth:
|
1704
|
-
borderColor:
|
1705
|
-
boxShadow:
|
1706
|
-
words:
|
1703
|
+
borderWidth: a.borderWidth || 0,
|
1704
|
+
borderColor: a.borderColor || "#000000",
|
1705
|
+
boxShadow: a.boxShadow || Ir,
|
1706
|
+
words: a.words || []
|
1707
1707
|
},
|
1708
1708
|
metadata: t.metadata || {}
|
1709
1709
|
};
|
@@ -1714,8 +1714,8 @@ const oi = async (t, r) => {
|
|
1714
1714
|
url: t.details.fontUrl
|
1715
1715
|
}
|
1716
1716
|
]);
|
1717
|
-
const n = t.id, i = t.details,
|
1718
|
-
width:
|
1717
|
+
const n = t.id, i = t.details, a = di(i), c = si(t.details.text, a), d = br(r, {
|
1718
|
+
width: a.width,
|
1719
1719
|
height: c
|
1720
1720
|
});
|
1721
1721
|
return {
|
@@ -1724,14 +1724,14 @@ const oi = async (t, r) => {
|
|
1724
1724
|
type: "text",
|
1725
1725
|
display: Ue(t.display),
|
1726
1726
|
details: {
|
1727
|
-
...
|
1727
|
+
...a,
|
1728
1728
|
text: i.text || "",
|
1729
1729
|
// Default text content
|
1730
1730
|
height: c,
|
1731
1731
|
// Default height
|
1732
1732
|
fontUrl: i.fontUrl,
|
1733
|
-
top:
|
1734
|
-
left:
|
1733
|
+
top: a.top || d.top,
|
1734
|
+
left: a.left || d.left,
|
1735
1735
|
borderWidth: i.borderWidth || 0,
|
1736
1736
|
borderColor: i.borderColor || "#000000",
|
1737
1737
|
boxShadow: i.boxShadow || Ir
|
@@ -1782,7 +1782,7 @@ const oi = async (t, r) => {
|
|
1782
1782
|
transform: t.transform || "none",
|
1783
1783
|
skewX: t.skewX || 0,
|
1784
1784
|
skewY: t.skewY || 0
|
1785
|
-
}),
|
1785
|
+
}), os = async (t, r) => {
|
1786
1786
|
switch (t.type) {
|
1787
1787
|
case "video":
|
1788
1788
|
return oi(t, r || {});
|
@@ -1798,12 +1798,12 @@ const oi = async (t, r) => {
|
|
1798
1798
|
throw new Error("Unsupported track item");
|
1799
1799
|
}
|
1800
1800
|
};
|
1801
|
-
function
|
1801
|
+
function cs(t, r) {
|
1802
1802
|
return r.some(
|
1803
1803
|
(n) => t.some((i) => i.id === n.id)
|
1804
1804
|
);
|
1805
1805
|
}
|
1806
|
-
const
|
1806
|
+
const us = (t = [], r = []) => t.length === 0 ? r.map((i) => ({
|
1807
1807
|
id: _e(),
|
1808
1808
|
items: [i.id],
|
1809
1809
|
type: i.type,
|
@@ -1817,36 +1817,36 @@ const ua = (t = [], r = []) => t.length === 0 ? r.map((i) => ({
|
|
1817
1817
|
static: n.static || !1,
|
1818
1818
|
id: n.id || _e()
|
1819
1819
|
}));
|
1820
|
-
function
|
1820
|
+
function ls(t, r) {
|
1821
1821
|
return t.filter((i) => {
|
1822
|
-
if (r.forEach((
|
1823
|
-
i.items.includes(
|
1822
|
+
if (r.forEach((a) => {
|
1823
|
+
i.items.includes(a) && (i.items = i.items.filter((c) => c !== a));
|
1824
1824
|
}), i.items.length !== 0 || i.static)
|
1825
1825
|
return i;
|
1826
1826
|
});
|
1827
1827
|
}
|
1828
|
-
const
|
1829
|
-
const { display: i, playbackRate:
|
1830
|
-
return Math.max(r, i.to / (
|
1828
|
+
const re = (t) => Object.keys(t).reduce((r, n) => {
|
1829
|
+
const { display: i, playbackRate: a } = t[n];
|
1830
|
+
return Math.max(r, i.to / (a || 1));
|
1831
1831
|
}, 0);
|
1832
1832
|
function In(t, r, n) {
|
1833
1833
|
return Math.min(Math.max(t, r), n);
|
1834
1834
|
}
|
1835
|
-
const
|
1836
|
-
if (i === void 0 &&
|
1835
|
+
const fs = (t, r, n, i, a) => {
|
1836
|
+
if (i === void 0 && a === void 0)
|
1837
1837
|
return { trackId: void 0, trackIndex: void 0 };
|
1838
|
-
const c =
|
1838
|
+
const c = a !== void 0 ? r[In(a, 0, r.length)] : r.find((E) => E.id === i);
|
1839
1839
|
if (!c)
|
1840
1840
|
return {
|
1841
1841
|
trackId: void 0,
|
1842
|
-
trackIndex:
|
1842
|
+
trackIndex: a !== void 0 ? In(a, 0, r.length) : void 0
|
1843
1843
|
};
|
1844
1844
|
const d = c.items.map((E) => n[E]), p = t.map((E) => n[E]);
|
1845
1845
|
for (const E of d) {
|
1846
|
-
const
|
1846
|
+
const x = E.display.from, S = E.display.to;
|
1847
1847
|
for (const P of p) {
|
1848
1848
|
const m = P.display.from;
|
1849
|
-
if (!(P.display.to <=
|
1849
|
+
if (!(P.display.to <= x || m >= S))
|
1850
1850
|
return {
|
1851
1851
|
trackId: void 0,
|
1852
1852
|
trackIndex: r.indexOf(c)
|
@@ -1858,32 +1858,32 @@ const fa = (t, r, n, i, s) => {
|
|
1858
1858
|
trackIndex: r.indexOf(c)
|
1859
1859
|
};
|
1860
1860
|
};
|
1861
|
-
function
|
1861
|
+
function ds(t, r) {
|
1862
1862
|
let i = r.reduce(
|
1863
|
-
(
|
1863
|
+
(a, c) => c.display.to > a.display.to ? c : a,
|
1864
1864
|
{ display: { to: 0 } }
|
1865
1865
|
).display.to;
|
1866
|
-
t.forEach((
|
1867
|
-
const c =
|
1868
|
-
|
1866
|
+
t.forEach((a) => {
|
1867
|
+
const c = a.display.from, p = a.display.to - c;
|
1868
|
+
a.display.from = i, a.display.to = a.display.from + p, i = a.display.to;
|
1869
1869
|
});
|
1870
1870
|
}
|
1871
|
-
function
|
1872
|
-
const r = t, n = r.tracks, i = r.trackItemsMap,
|
1871
|
+
function ps(t) {
|
1872
|
+
const r = t, n = r.tracks, i = r.trackItemsMap, a = [], c = {};
|
1873
1873
|
return n.forEach((d) => {
|
1874
1874
|
var E;
|
1875
|
-
const p = d.items.map((
|
1876
|
-
for (let
|
1877
|
-
const
|
1878
|
-
if (Math.abs(
|
1879
|
-
const m = `${
|
1875
|
+
const p = d.items.map((x) => i[x]).sort((x, S) => x.display.from - S.display.from);
|
1876
|
+
for (let x = 0; x < p.length - 1; x++) {
|
1877
|
+
const S = p[x], P = p[x + 1];
|
1878
|
+
if (Math.abs(S.display.to - P.display.from) <= 1) {
|
1879
|
+
const m = `${S.id}-${P.id}`;
|
1880
1880
|
if ((E = r.transitionIds) == null ? void 0 : E.includes(m))
|
1881
1881
|
c[m] = r.transitionsMap[m];
|
1882
1882
|
else {
|
1883
1883
|
const A = {
|
1884
1884
|
id: m,
|
1885
1885
|
duration: 1500,
|
1886
|
-
fromId:
|
1886
|
+
fromId: S.id,
|
1887
1887
|
toId: P.id,
|
1888
1888
|
kind: "none",
|
1889
1889
|
trackId: d.id,
|
@@ -1891,45 +1891,45 @@ function pa(t) {
|
|
1891
1891
|
};
|
1892
1892
|
c[m] = A;
|
1893
1893
|
}
|
1894
|
-
|
1894
|
+
a.push(m);
|
1895
1895
|
}
|
1896
1896
|
}
|
1897
|
-
}), r.transitionIds =
|
1898
|
-
transitionIds:
|
1897
|
+
}), r.transitionIds = a, r.transitionsMap = c, {
|
1898
|
+
transitionIds: a,
|
1899
1899
|
transitionsMap: c
|
1900
1900
|
};
|
1901
1901
|
}
|
1902
|
-
function
|
1903
|
-
const r =
|
1904
|
-
|
1905
|
-
), n =
|
1906
|
-
|
1907
|
-
), i =
|
1908
|
-
|
1909
|
-
),
|
1910
|
-
|
1911
|
-
), c =
|
1912
|
-
|
1913
|
-
), d =
|
1914
|
-
|
1915
|
-
), p =
|
1916
|
-
|
1902
|
+
function hs(t) {
|
1903
|
+
const r = Qt.pipe(
|
1904
|
+
te(({ key: u }) => u.startsWith(En))
|
1905
|
+
), n = Qt.pipe(
|
1906
|
+
te(({ key: u }) => u.startsWith(vt))
|
1907
|
+
), i = Qt.pipe(
|
1908
|
+
te(({ key: u }) => u.startsWith(ut))
|
1909
|
+
), a = Qt.pipe(
|
1910
|
+
te(({ key: u }) => u.startsWith(gr))
|
1911
|
+
), c = Qt.pipe(
|
1912
|
+
te(({ key: u }) => u.startsWith(ve))
|
1913
|
+
), d = Qt.pipe(
|
1914
|
+
te(({ key: u }) => u.startsWith(oe))
|
1915
|
+
), p = Qt.pipe(
|
1916
|
+
te(({ key: u }) => u.startsWith(ri))
|
1917
1917
|
), E = r.subscribe(async (u) => {
|
1918
|
-
var f,
|
1919
|
-
if (u.key ===
|
1920
|
-
const y = (f = u.value) == null ? void 0 : f.payload, h = y.trackItemsMap,
|
1918
|
+
var f, b;
|
1919
|
+
if (u.key === Hi) {
|
1920
|
+
const y = (f = u.value) == null ? void 0 : f.payload, h = y.trackItemsMap, I = y.trackItemDetailsMap;
|
1921
1921
|
console.warn("IMPROVE FONTS LOADING");
|
1922
|
-
for (const
|
1923
|
-
if (g
|
1924
|
-
const
|
1922
|
+
for (const g in I)
|
1923
|
+
if (I[g].type === "text" || I[g].type === "caption") {
|
1924
|
+
const v = I[g].details;
|
1925
1925
|
await pr([
|
1926
1926
|
{
|
1927
|
-
fontFamily:
|
1928
|
-
url:
|
1927
|
+
fontFamily: v.fontFamily,
|
1928
|
+
url: v.fontUrl
|
1929
1929
|
}
|
1930
1930
|
]);
|
1931
1931
|
}
|
1932
|
-
const _ =
|
1932
|
+
const _ = re(h);
|
1933
1933
|
t.updateState(
|
1934
1934
|
{
|
1935
1935
|
...y,
|
@@ -1942,7 +1942,7 @@ function ha(t) {
|
|
1942
1942
|
);
|
1943
1943
|
}
|
1944
1944
|
if (u.key === Ni) {
|
1945
|
-
const y = (
|
1945
|
+
const y = (b = u.value) == null ? void 0 : b.payload;
|
1946
1946
|
t.updateState(
|
1947
1947
|
{
|
1948
1948
|
size: y
|
@@ -1953,16 +1953,16 @@ function ha(t) {
|
|
1953
1953
|
}
|
1954
1954
|
);
|
1955
1955
|
}
|
1956
|
-
}),
|
1957
|
-
if (u.key ===
|
1958
|
-
if (u.key ===
|
1959
|
-
}),
|
1956
|
+
}), x = a.subscribe((u) => {
|
1957
|
+
if (u.key === ts) return t.undo();
|
1958
|
+
if (u.key === es) return t.redo();
|
1959
|
+
}), S = p.subscribe((u) => {
|
1960
1960
|
var f;
|
1961
|
-
if (u.key ===
|
1962
|
-
const
|
1961
|
+
if (u.key === rs) {
|
1962
|
+
const b = (f = u.value) == null ? void 0 : f.payload.scale;
|
1963
1963
|
t.updateState(
|
1964
1964
|
{
|
1965
|
-
scale:
|
1965
|
+
scale: b
|
1966
1966
|
},
|
1967
1967
|
{
|
1968
1968
|
kind: "update",
|
@@ -1971,77 +1971,101 @@ function ha(t) {
|
|
1971
1971
|
);
|
1972
1972
|
}
|
1973
1973
|
}), P = i.subscribe((u) => {
|
1974
|
-
var
|
1974
|
+
var b, y, h, I;
|
1975
1975
|
const f = [];
|
1976
|
-
if ((
|
1976
|
+
if ((b = u.value) != null && b.payload.trackItemIds && (f.push((y = u.value) == null ? void 0 : y.payload.trackItemIds), t.updateState(
|
1977
1977
|
{ activeIds: f },
|
1978
1978
|
{
|
1979
1979
|
kind: "update",
|
1980
1980
|
updateHistory: !1
|
1981
1981
|
}
|
1982
1982
|
)), u.key === Qi) {
|
1983
|
-
const _ = (h = u.value) == null ? void 0 : h.payload.trackItemIds,
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1983
|
+
const _ = (h = u.value) == null ? void 0 : h.payload.trackItemIds, g = Y(t.getState()), v = _ && _.length ? _ : g.activeIds, U = g.trackItemIds, C = g.transitionIds, O = g.trackItemDetailsMap, T = Y(g.tracks), k = Y(g.structure);
|
1984
|
+
v.forEach((W) => {
|
1985
|
+
var G;
|
1986
|
+
const lt = g.trackItemsMap[W] || g.transitionsMap[W];
|
1987
|
+
if (lt.type === "template") {
|
1988
|
+
const It = (G = g.structure.find(
|
1989
|
+
(St) => St.id === lt.id
|
1990
|
+
)) == null ? void 0 : G.items;
|
1991
|
+
v.push(...It);
|
1992
|
+
const j = k.findIndex(
|
1993
|
+
(St) => St.id === lt.id
|
1994
|
+
);
|
1995
|
+
k.splice(j, 1);
|
1996
|
+
}
|
1997
|
+
});
|
1998
|
+
const H = U.filter(
|
1999
|
+
(W) => !v.includes(W)
|
2000
|
+
), X = C.filter(
|
2001
|
+
(W) => !v.includes(W)
|
2002
|
+
), Z = Object.fromEntries(
|
2003
|
+
Object.entries(O).filter(
|
2004
|
+
([W]) => !v.includes(W)
|
2005
|
+
)
|
2006
|
+
), zt = Object.fromEntries(
|
2007
|
+
Object.entries(g.transitionsMap).filter(
|
2008
|
+
([W]) => !v.includes(W)
|
1988
2009
|
)
|
1989
|
-
),
|
1990
|
-
|
1991
|
-
|
1992
|
-
),
|
1993
|
-
Object.entries(
|
1994
|
-
([
|
2010
|
+
), Ht = ls(
|
2011
|
+
g.tracks,
|
2012
|
+
v
|
2013
|
+
), mt = Object.fromEntries(
|
2014
|
+
Object.entries(g.trackItemsMap).filter(
|
2015
|
+
([W]) => !v.includes(W)
|
1995
2016
|
)
|
1996
2017
|
);
|
1997
|
-
|
1998
|
-
let
|
1999
|
-
|
2000
|
-
if (
|
2001
|
-
const
|
2002
|
-
|
2003
|
-
from:
|
2004
|
-
to:
|
2005
|
-
},
|
2018
|
+
T.filter((W) => W.magnetic).forEach((W) => {
|
2019
|
+
let lt = 0;
|
2020
|
+
W == null || W.items.forEach((G) => {
|
2021
|
+
if (mt[G]) {
|
2022
|
+
const It = mt[G].display.to - mt[G].display.from;
|
2023
|
+
mt[G].display = {
|
2024
|
+
from: lt,
|
2025
|
+
to: lt + It
|
2026
|
+
}, lt += It;
|
2006
2027
|
}
|
2007
2028
|
});
|
2008
2029
|
});
|
2009
|
-
const
|
2030
|
+
const F = re(mt);
|
2010
2031
|
t.updateState(
|
2011
2032
|
{
|
2012
|
-
trackItemIds:
|
2013
|
-
trackItemDetailsMap:
|
2033
|
+
trackItemIds: H,
|
2034
|
+
trackItemDetailsMap: Z,
|
2014
2035
|
activeIds: [],
|
2015
|
-
trackItemsMap:
|
2016
|
-
tracks:
|
2017
|
-
duration:
|
2036
|
+
trackItemsMap: mt,
|
2037
|
+
tracks: Ht,
|
2038
|
+
duration: F,
|
2039
|
+
structure: k,
|
2040
|
+
transitionIds: X,
|
2041
|
+
transitionsMap: zt
|
2018
2042
|
},
|
2019
2043
|
{ updateHistory: !0, kind: "remove" }
|
2020
2044
|
);
|
2021
2045
|
}
|
2022
2046
|
if (u.key === Zi) {
|
2023
|
-
const _ =
|
2024
|
-
if (
|
2025
|
-
|
2026
|
-
const O = _.trackItemsMap[C], T = _.trackItemDetailsMap[C],
|
2027
|
-
_.trackItemsMap[
|
2028
|
-
...
|
2029
|
-
id:
|
2030
|
-
}, _.trackItemDetailsMap[
|
2031
|
-
...
|
2032
|
-
}, _.trackItemIds.push(
|
2047
|
+
const _ = Y(t.getState()), g = {}, v = ((I = u.value) == null ? void 0 : I.payload.trackItemIds) || _.activeIds;
|
2048
|
+
if (v.length === 0) return;
|
2049
|
+
v.forEach((C) => {
|
2050
|
+
const O = _.trackItemsMap[C], T = _.trackItemDetailsMap[C], k = _e();
|
2051
|
+
_.trackItemsMap[k] = {
|
2052
|
+
...Y(O),
|
2053
|
+
id: k
|
2054
|
+
}, _.trackItemDetailsMap[k] = {
|
2055
|
+
...Y(T)
|
2056
|
+
}, _.trackItemIds.push(k);
|
2033
2057
|
const H = _.tracks.find(
|
2034
|
-
(
|
2058
|
+
(X) => X.items.includes(C)
|
2035
2059
|
);
|
2036
|
-
|
2060
|
+
g[H.id] ? g[H.id].items.push(k) : g[H.id] = {
|
2037
2061
|
...H,
|
2038
2062
|
id: _e(),
|
2039
|
-
items: [
|
2063
|
+
items: [k],
|
2040
2064
|
static: !1,
|
2041
2065
|
magnetic: !1
|
2042
2066
|
};
|
2043
2067
|
});
|
2044
|
-
const U = Object.values(
|
2068
|
+
const U = Object.values(g);
|
2045
2069
|
_.tracks = [...U, ..._.tracks], t.updateState(
|
2046
2070
|
{
|
2047
2071
|
trackItemDetailsMap: _.trackItemDetailsMap,
|
@@ -2056,62 +2080,62 @@ function ha(t) {
|
|
2056
2080
|
);
|
2057
2081
|
}
|
2058
2082
|
}), m = n.subscribe(async (u) => {
|
2059
|
-
var
|
2060
|
-
const f =
|
2083
|
+
var v, U, C, O, T, k, H, X, Z, zt, Ht, mt, Wt, F, W, lt, G, It, j, St, ce;
|
2084
|
+
const f = Y(t.getState()), b = ((U = (v = u.value) == null ? void 0 : v.options) == null ? void 0 : U.isSelected) || !1;
|
2061
2085
|
let y = [], h = "text";
|
2062
|
-
const
|
2063
|
-
let _ = (
|
2086
|
+
const I = (O = (C = u.value) == null ? void 0 : C.options) == null ? void 0 : O.trackId;
|
2087
|
+
let _ = (k = (T = u.value) == null ? void 0 : T.options) == null ? void 0 : k.trackIndex;
|
2064
2088
|
if (u.key === Bi) {
|
2065
|
-
const
|
2066
|
-
(
|
2089
|
+
const N = (H = u.value) == null ? void 0 : H.payload, B = N.trackItems.map(
|
2090
|
+
(J) => os(J, {
|
2067
2091
|
size: f.size
|
2068
2092
|
})
|
2069
|
-
),
|
2070
|
-
if (
|
2071
|
-
const { details:
|
2072
|
-
|
2073
|
-
type:
|
2074
|
-
details:
|
2075
|
-
},
|
2076
|
-
}),
|
2093
|
+
), R = await Promise.all(B), ft = us(N.tracks, N.trackItems), rt = [], nt = {}, dt = {};
|
2094
|
+
if (R.forEach((J) => {
|
2095
|
+
const { details: Tt, ...Et } = J;
|
2096
|
+
rt.push(J.id), nt[J.id] = {
|
2097
|
+
type: J.type,
|
2098
|
+
details: Tt
|
2099
|
+
}, dt[J.id] = Et;
|
2100
|
+
}), cs(
|
2077
2101
|
f.tracks,
|
2078
|
-
|
2102
|
+
ft
|
2079
2103
|
))
|
2080
|
-
f.tracks.forEach((
|
2081
|
-
|
2082
|
-
if (
|
2083
|
-
if (
|
2084
|
-
const
|
2085
|
-
(
|
2104
|
+
f.tracks.forEach((J) => {
|
2105
|
+
ft.forEach((Tt) => {
|
2106
|
+
if (J.id === Tt.id) {
|
2107
|
+
if (J.magnetic) {
|
2108
|
+
const Et = Tt.items.map((Nt) => dt[Nt]), Gt = J.items.map(
|
2109
|
+
(Nt) => f.trackItemsMap[Nt]
|
2086
2110
|
);
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2111
|
+
ds(
|
2112
|
+
Et,
|
2113
|
+
Gt
|
2090
2114
|
);
|
2091
2115
|
}
|
2092
|
-
|
2116
|
+
J.items.push(...rt);
|
2093
2117
|
}
|
2094
2118
|
});
|
2095
2119
|
});
|
2096
2120
|
else {
|
2097
|
-
const
|
2098
|
-
|
2121
|
+
const J = ((Z = (X = u.value) == null ? void 0 : X.options) == null ? void 0 : Z.trackIndex) || 0, Tt = In(
|
2122
|
+
J,
|
2099
2123
|
0,
|
2100
2124
|
f.tracks.length
|
2101
2125
|
);
|
2102
|
-
f.tracks.splice(
|
2126
|
+
f.tracks.splice(Tt, 0, ...ft);
|
2103
2127
|
}
|
2104
2128
|
f.trackItemDetailsMap = {
|
2105
2129
|
...f.trackItemDetailsMap,
|
2106
|
-
...
|
2130
|
+
...nt
|
2107
2131
|
}, f.trackItemsMap = {
|
2108
2132
|
...f.trackItemsMap,
|
2109
|
-
...
|
2133
|
+
...dt
|
2110
2134
|
}, f.trackItemIds = [
|
2111
2135
|
...f.trackItemIds,
|
2112
|
-
...
|
2113
|
-
], f.duration =
|
2114
|
-
const { transitionIds:
|
2136
|
+
...rt
|
2137
|
+
], f.duration = re(f.trackItemsMap);
|
2138
|
+
const { transitionIds: Ot, transitionsMap: ue } = ps(
|
2115
2139
|
f
|
2116
2140
|
);
|
2117
2141
|
t.updateState(
|
@@ -2121,7 +2145,7 @@ function ha(t) {
|
|
2121
2145
|
trackItemsMap: f.trackItemsMap,
|
2122
2146
|
tracks: f.tracks,
|
2123
2147
|
duration: f.duration,
|
2124
|
-
transitionIds:
|
2148
|
+
transitionIds: Ot,
|
2125
2149
|
transitionsMap: ue
|
2126
2150
|
},
|
2127
2151
|
{
|
@@ -2133,109 +2157,110 @@ function ha(t) {
|
|
2133
2157
|
}
|
2134
2158
|
if (u.key === Gi) {
|
2135
2159
|
h = "caption";
|
2136
|
-
const
|
2137
|
-
for (const
|
2138
|
-
const
|
2160
|
+
const N = (zt = u.value) == null ? void 0 : zt.payload, B = [];
|
2161
|
+
for (const rt of N) {
|
2162
|
+
const nt = li(rt, {
|
2139
2163
|
size: f.size
|
2140
2164
|
});
|
2141
|
-
|
2165
|
+
B.push(nt);
|
2142
2166
|
}
|
2143
|
-
const
|
2144
|
-
for (const
|
2145
|
-
const
|
2146
|
-
|
2147
|
-
const { details:
|
2148
|
-
f.trackItemDetailsMap[
|
2167
|
+
const R = await Promise.all(B), ft = [];
|
2168
|
+
for (const rt of R) {
|
2169
|
+
const nt = rt.id;
|
2170
|
+
ft.push(nt);
|
2171
|
+
const { details: dt, ...Q } = rt;
|
2172
|
+
f.trackItemDetailsMap[nt] = {
|
2149
2173
|
type: h,
|
2150
|
-
details:
|
2151
|
-
}, f.trackItemsMap[
|
2174
|
+
details: dt
|
2175
|
+
}, f.trackItemsMap[nt] = Q, f.trackItemIds.push(nt);
|
2152
2176
|
}
|
2153
|
-
y =
|
2177
|
+
y = ft;
|
2154
2178
|
}
|
2155
2179
|
if (u.key === Li) {
|
2156
2180
|
h = "text";
|
2157
|
-
const
|
2181
|
+
const N = await fi((Ht = u.value) == null ? void 0 : Ht.payload, {
|
2158
2182
|
size: f.size
|
2159
|
-
}), { details:
|
2160
|
-
f.trackItemDetailsMap[
|
2183
|
+
}), { details: B, ...R } = N;
|
2184
|
+
f.trackItemDetailsMap[R.id] = {
|
2161
2185
|
type: h,
|
2162
|
-
details:
|
2163
|
-
}, f.trackItemsMap[
|
2186
|
+
details: B
|
2187
|
+
}, f.trackItemsMap[R.id] = R, f.trackItemIds.push(R.id), y = [R.id];
|
2164
2188
|
}
|
2165
2189
|
if (u.key === Yi) {
|
2166
2190
|
h = "template";
|
2167
|
-
const
|
2191
|
+
const N = (mt = u.value) == null ? void 0 : mt.payload.trackItemsMap, B = (Wt = u.value) == null ? void 0 : Wt.payload.trackItemDetailsMap, R = (F = u.value) == null ? void 0 : F.payload.transitionsMap, ft = ((W = u.value) == null ? void 0 : W.payload.transitionIds) || [], rt = (lt = u.value) == null ? void 0 : lt.payload.trackItemIds, nt = ((G = u.value) == null ? void 0 : G.payload.tracks) || [], { details: dt, ...Q } = await as((It = u.value) == null ? void 0 : It.payload, {
|
2168
2192
|
size: f.size
|
2169
|
-
}),
|
2170
|
-
id:
|
2171
|
-
items:
|
2172
|
-
transitions:
|
2173
|
-
tracks:
|
2193
|
+
}), Ot = {
|
2194
|
+
id: Q.id,
|
2195
|
+
items: rt,
|
2196
|
+
transitions: ft,
|
2197
|
+
tracks: nt
|
2174
2198
|
};
|
2175
|
-
f.trackItemDetailsMap[
|
2199
|
+
f.trackItemDetailsMap[Q.id] = {
|
2176
2200
|
type: h,
|
2177
|
-
details:
|
2178
|
-
}, f.trackItemsMap[
|
2201
|
+
details: dt
|
2202
|
+
}, f.trackItemsMap[Q.id] = Q, f.trackItemIds.push(Q.id), y = [Q.id], f.trackItemsMap = {
|
2179
2203
|
...f.trackItemsMap,
|
2180
|
-
...
|
2181
|
-
[
|
2204
|
+
...N,
|
2205
|
+
[Q.id]: {
|
2182
2206
|
type: "template",
|
2183
|
-
...
|
2207
|
+
...Q
|
2184
2208
|
}
|
2185
2209
|
}, f.trackItemDetailsMap = {
|
2186
2210
|
...f.trackItemDetailsMap,
|
2187
|
-
...
|
2188
|
-
[
|
2211
|
+
...B,
|
2212
|
+
[Q.id]: {
|
2189
2213
|
type: "template",
|
2190
|
-
details:
|
2214
|
+
details: dt
|
2191
2215
|
}
|
2192
2216
|
}, f.transitionsMap = {
|
2193
2217
|
...f.transitionsMap,
|
2194
|
-
...
|
2195
|
-
}, f.structure = [...f.structure,
|
2218
|
+
...R
|
2219
|
+
}, f.structure = [...f.structure, Ot];
|
2196
2220
|
}
|
2197
2221
|
if (u.key === Wi) {
|
2198
2222
|
h = "image";
|
2199
|
-
const
|
2223
|
+
const N = await ui((j = u.value) == null ? void 0 : j.payload, {
|
2200
2224
|
size: f.size
|
2201
|
-
}), { details:
|
2202
|
-
f.trackItemDetailsMap[
|
2225
|
+
}), { details: B, ...R } = N;
|
2226
|
+
f.trackItemDetailsMap[R.id] = {
|
2203
2227
|
type: h,
|
2204
|
-
details:
|
2205
|
-
}, f.trackItemsMap[
|
2228
|
+
details: B
|
2229
|
+
}, f.trackItemsMap[R.id] = R, f.trackItemIds.push(R.id), y = [R.id];
|
2206
2230
|
}
|
2207
2231
|
if (u.key === Ui) {
|
2208
2232
|
h = "audio";
|
2209
|
-
const
|
2210
|
-
f.trackItemDetailsMap[
|
2233
|
+
const N = await ci((St = u.value) == null ? void 0 : St.payload), { details: B, ...R } = N;
|
2234
|
+
f.trackItemDetailsMap[R.id] = {
|
2211
2235
|
type: h,
|
2212
|
-
details:
|
2213
|
-
}, f.trackItemsMap[
|
2236
|
+
details: B
|
2237
|
+
}, f.trackItemsMap[R.id] = R, f.trackItemIds.push(R.id), y = [R.id];
|
2214
2238
|
}
|
2215
2239
|
if (u.key === $i) {
|
2216
2240
|
h = "video";
|
2217
|
-
const
|
2241
|
+
const N = await oi((ce = u.value) == null ? void 0 : ce.payload, {
|
2218
2242
|
size: f.size
|
2219
|
-
}), { details:
|
2220
|
-
f.trackItemDetailsMap[
|
2243
|
+
}), { details: B, ...R } = N;
|
2244
|
+
f.trackItemDetailsMap[R.id] = {
|
2221
2245
|
type: h,
|
2222
|
-
details:
|
2223
|
-
|
2246
|
+
details: B,
|
2247
|
+
metadata: R.metadata
|
2248
|
+
}, f.trackItemsMap[R.id] = R, f.trackItemIds.push(R.id), y = [R.id];
|
2224
2249
|
}
|
2225
|
-
const
|
2250
|
+
const g = fs(
|
2226
2251
|
y,
|
2227
2252
|
f.tracks,
|
2228
2253
|
f.trackItemsMap,
|
2229
|
-
|
2254
|
+
I,
|
2230
2255
|
_
|
2231
2256
|
);
|
2232
|
-
if (
|
2233
|
-
const
|
2234
|
-
(
|
2257
|
+
if (g.trackId) {
|
2258
|
+
const N = f.tracks.find(
|
2259
|
+
(B) => B.id === g.trackId
|
2235
2260
|
);
|
2236
|
-
|
2237
|
-
} else if (
|
2238
|
-
const
|
2261
|
+
N && N.items.push(...y);
|
2262
|
+
} else if (g.trackIndex !== void 0) {
|
2263
|
+
const N = {
|
2239
2264
|
id: lr(),
|
2240
2265
|
accepts: [
|
2241
2266
|
"text",
|
@@ -2251,7 +2276,7 @@ function ha(t) {
|
|
2251
2276
|
magnetic: !1,
|
2252
2277
|
static: !1
|
2253
2278
|
};
|
2254
|
-
f.tracks.splice(
|
2279
|
+
f.tracks.splice(g.trackIndex, 0, N);
|
2255
2280
|
} else
|
2256
2281
|
f.tracks.unshift({
|
2257
2282
|
id: lr(),
|
@@ -2269,7 +2294,7 @@ function ha(t) {
|
|
2269
2294
|
magnetic: !1,
|
2270
2295
|
static: !1
|
2271
2296
|
});
|
2272
|
-
|
2297
|
+
b && (f.activeIds = y), f.duration = re(f.trackItemsMap), t.updateState(
|
2273
2298
|
{
|
2274
2299
|
activeIds: f.activeIds,
|
2275
2300
|
trackItemIds: f.trackItemIds,
|
@@ -2288,43 +2313,43 @@ function ha(t) {
|
|
2288
2313
|
}), M = c.subscribe(async (u) => {
|
2289
2314
|
var f;
|
2290
2315
|
if (u.key === Ji) {
|
2291
|
-
const
|
2292
|
-
if (
|
2293
|
-
const h =
|
2294
|
-
if (y >=
|
2316
|
+
const b = Y(t.getState()), y = (f = u.value) == null ? void 0 : f.options.time;
|
2317
|
+
if (b.activeIds.length === 1) {
|
2318
|
+
const h = b.activeIds[0], I = Y(b.trackItemsMap[h]);
|
2319
|
+
if (y >= I.display.to || y <= I.display.from)
|
2295
2320
|
return;
|
2296
|
-
const _ =
|
2297
|
-
...
|
2321
|
+
const _ = Y(b.trackItemDetailsMap[h]), g = _e(), v = Y({
|
2322
|
+
...I,
|
2298
2323
|
display: {
|
2299
|
-
from:
|
2324
|
+
from: I.display.from,
|
2300
2325
|
to: y
|
2301
2326
|
}
|
2302
|
-
}, U = {
|
2303
|
-
...
|
2304
|
-
id:
|
2327
|
+
}), U = Y({
|
2328
|
+
...I,
|
2329
|
+
id: g,
|
2305
2330
|
display: {
|
2306
2331
|
from: y,
|
2307
|
-
to:
|
2332
|
+
to: I.display.to
|
2308
2333
|
}
|
2309
|
-
};
|
2310
|
-
if (
|
2311
|
-
const C = y -
|
2312
|
-
|
2313
|
-
from:
|
2314
|
-
to:
|
2334
|
+
});
|
2335
|
+
if (I.type === "video" || I.type === "audio") {
|
2336
|
+
const C = y - v.display.from;
|
2337
|
+
v.trim = {
|
2338
|
+
from: I.trim.from,
|
2339
|
+
to: I.trim.from + C
|
2315
2340
|
}, U.trim = {
|
2316
|
-
from:
|
2317
|
-
to:
|
2341
|
+
from: I.trim.from + C,
|
2342
|
+
to: I.trim.to
|
2318
2343
|
};
|
2319
2344
|
}
|
2320
|
-
|
2321
|
-
C.items.includes(h) && C.items.push(
|
2345
|
+
b.trackItemsMap[h] = v, b.trackItemsMap[g] = U, b.trackItemIds.push(g), b.trackItemDetailsMap[g] = _, b.tracks.forEach((C) => {
|
2346
|
+
C.items.includes(h) && C.items.push(g);
|
2322
2347
|
}), t.updateState(
|
2323
2348
|
{
|
2324
|
-
trackItemDetailsMap:
|
2325
|
-
tracks:
|
2326
|
-
trackItemIds:
|
2327
|
-
trackItemsMap:
|
2349
|
+
trackItemDetailsMap: b.trackItemDetailsMap,
|
2350
|
+
tracks: b.tracks,
|
2351
|
+
trackItemIds: b.trackItemIds,
|
2352
|
+
trackItemsMap: b.trackItemsMap
|
2328
2353
|
},
|
2329
2354
|
{
|
2330
2355
|
updateHistory: !0,
|
@@ -2335,47 +2360,47 @@ function ha(t) {
|
|
2335
2360
|
return;
|
2336
2361
|
}
|
2337
2362
|
if (u.key === qi) {
|
2338
|
-
const
|
2339
|
-
if (
|
2340
|
-
const y =
|
2363
|
+
const b = Y(t.getState());
|
2364
|
+
if (b.activeIds.length) {
|
2365
|
+
const y = b.activeIds, h = [], I = {
|
2341
2366
|
activeIds: y,
|
2342
2367
|
trackItemDetailsMap: {},
|
2343
2368
|
trackItemsMap: {},
|
2344
2369
|
tracks: []
|
2345
2370
|
};
|
2346
|
-
y.forEach((
|
2347
|
-
|
2348
|
-
|
2371
|
+
y.forEach((g) => {
|
2372
|
+
I.trackItemDetailsMap[g] = b.trackItemDetailsMap[g], I.trackItemsMap[g] = b.trackItemsMap[g], h.push(
|
2373
|
+
b.tracks.find((v) => v.items.includes(g))
|
2349
2374
|
);
|
2350
2375
|
});
|
2351
2376
|
const _ = /* @__PURE__ */ new Set();
|
2352
|
-
h.filter((
|
2377
|
+
h.filter((g) => _.has(g.id) ? !1 : (_.add(g), !0)), I.tracks = Array.from(_.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(I));
|
2353
2378
|
}
|
2354
2379
|
}
|
2355
2380
|
if (u.key === Vi) {
|
2356
|
-
const
|
2357
|
-
if (!
|
2358
|
-
const y =
|
2359
|
-
const T =
|
2381
|
+
const b = localStorage.getItem("DesignComboTemp");
|
2382
|
+
if (!b) return;
|
2383
|
+
const y = Y(t.getState()), h = JSON.parse(b), I = {}, _ = h.trackItemsMap, g = h.trackItemDetailsMap, v = h.tracks, U = [], C = h.activeIds.map(async (O) => {
|
2384
|
+
const T = g[O];
|
2360
2385
|
(T.type === "caption" || T.type === "text") && T.details.fontUrl && await pr([
|
2361
2386
|
{
|
2362
2387
|
fontFamily: T.details.fontFamily,
|
2363
2388
|
url: T.details.fontUrl
|
2364
2389
|
}
|
2365
2390
|
]);
|
2366
|
-
const
|
2367
|
-
return
|
2391
|
+
const k = _e();
|
2392
|
+
return I[O] = k, y.trackItemsMap[k] = {
|
2368
2393
|
..._[O],
|
2369
|
-
id:
|
2370
|
-
}, y.trackItemDetailsMap[
|
2394
|
+
id: k
|
2395
|
+
}, y.trackItemDetailsMap[k] = T, y.trackItemIds.push(k), !0;
|
2371
2396
|
});
|
2372
|
-
await Promise.all(C),
|
2373
|
-
const T = O.items.map((H) =>
|
2397
|
+
await Promise.all(C), v.forEach((O) => {
|
2398
|
+
const T = O.items.map((H) => I[H]), k = {
|
2374
2399
|
...O,
|
2375
2400
|
items: T,
|
2376
2401
|
id: lr()
|
2377
2402
|
};
|
2378
|
-
U.push(
|
2403
|
+
U.push(k);
|
2379
2404
|
}), y.tracks = [...y.tracks, ...U], t.updateState(
|
2380
2405
|
{
|
2381
2406
|
trackItemDetailsMap: y.trackItemDetailsMap,
|
@@ -2390,22 +2415,22 @@ function ha(t) {
|
|
2390
2415
|
);
|
2391
2416
|
}
|
2392
2417
|
}), A = d.subscribe(async (u) => {
|
2393
|
-
var f,
|
2418
|
+
var f, b, y;
|
2394
2419
|
if (u.key === Ki) {
|
2395
|
-
const h =
|
2396
|
-
if (!
|
2397
|
-
const
|
2398
|
-
|
2399
|
-
const O =
|
2400
|
-
O.details ?
|
2401
|
-
...
|
2420
|
+
const h = Y(t.getState()), I = h.trackItemDetailsMap, _ = h.trackItemsMap, g = Object.keys((f = u.value) == null ? void 0 : f.payload);
|
2421
|
+
if (!g.length) return;
|
2422
|
+
const v = (b = u.value) == null ? void 0 : b.payload;
|
2423
|
+
g.forEach((C) => {
|
2424
|
+
const O = v[C];
|
2425
|
+
O.details ? I[C].details = {
|
2426
|
+
...I[C].details,
|
2402
2427
|
...O.details
|
2403
|
-
} :
|
2428
|
+
} : v[C].playbackRate && (_[C].playbackRate = v[C].playbackRate);
|
2404
2429
|
});
|
2405
|
-
const U =
|
2430
|
+
const U = re(_);
|
2406
2431
|
t.updateState(
|
2407
2432
|
{
|
2408
|
-
trackItemDetailsMap: { ...
|
2433
|
+
trackItemDetailsMap: { ...I },
|
2409
2434
|
trackItemsMap: { ..._ },
|
2410
2435
|
duration: U
|
2411
2436
|
},
|
@@ -2416,34 +2441,34 @@ function ha(t) {
|
|
2416
2441
|
);
|
2417
2442
|
}
|
2418
2443
|
if (u.key === Xi) {
|
2419
|
-
const h = (y = u.value) == null ? void 0 : y.payload,
|
2444
|
+
const h = (y = u.value) == null ? void 0 : y.payload, I = Object.keys(h)[0], _ = Object.values(h)[0], g = Y(t.getState()), v = g.trackItemDetailsMap[I];
|
2420
2445
|
if (_.details) {
|
2421
2446
|
if (_.type === "image" && _.details.src) {
|
2422
|
-
const O = await ni(_.details.src), T =
|
2423
|
-
let H = O.width,
|
2424
|
-
const
|
2425
|
-
T /
|
2447
|
+
const O = await ni(_.details.src), T = v.details.width || 0, k = v.details.height || 0;
|
2448
|
+
let H = O.width, X = O.height;
|
2449
|
+
const Z = O.width / O.height;
|
2450
|
+
T / k > Z ? (H = T, X = T / Z) : (X = k, H = k * Z), _.details.mediaWidth = H, _.details.mediaHeight = X;
|
2426
2451
|
}
|
2427
2452
|
if (_.type === "video" && _.details.src) {
|
2428
|
-
const O = await ii(_.details.src), T =
|
2429
|
-
let H = O.width,
|
2430
|
-
const
|
2431
|
-
T /
|
2453
|
+
const O = await ii(_.details.src), T = v.details.width || 0, k = v.details.height || 0;
|
2454
|
+
let H = O.width, X = O.height;
|
2455
|
+
const Z = O.width / O.height;
|
2456
|
+
T / k > Z ? (H = T, X = T / Z) : (X = k, H = k * Z), _.details.mediaWidth = H, _.details.mediaHeight = X;
|
2432
2457
|
}
|
2433
|
-
const C =
|
2434
|
-
|
2458
|
+
const C = v.details;
|
2459
|
+
v.details = { ...C, ..._.details }, _.details = v.details;
|
2435
2460
|
}
|
2436
|
-
const U = { ...
|
2437
|
-
|
2438
|
-
...
|
2461
|
+
const U = { ...v, ..._ };
|
2462
|
+
g.trackItemDetailsMap[I] = U, g.trackItemsMap[I] = {
|
2463
|
+
...g.trackItemsMap[I],
|
2439
2464
|
type: _.type
|
2440
2465
|
}, t.updateState(
|
2441
2466
|
{
|
2442
2467
|
trackItemDetailsMap: {
|
2443
|
-
...
|
2468
|
+
...g.trackItemDetailsMap
|
2444
2469
|
},
|
2445
2470
|
trackItemsMap: {
|
2446
|
-
...
|
2471
|
+
...g.trackItemsMap
|
2447
2472
|
}
|
2448
2473
|
},
|
2449
2474
|
{
|
@@ -2455,47 +2480,47 @@ function ha(t) {
|
|
2455
2480
|
});
|
2456
2481
|
return {
|
2457
2482
|
unsubscribe: () => {
|
2458
|
-
m.unsubscribe(), M.unsubscribe(), A.unsubscribe(),
|
2483
|
+
m.unsubscribe(), M.unsubscribe(), A.unsubscribe(), x.unsubscribe(), P.unsubscribe(), E.unsubscribe(), S.unsubscribe();
|
2459
2484
|
}
|
2460
2485
|
};
|
2461
2486
|
}
|
2462
|
-
const
|
2487
|
+
const ms = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2463
2488
|
function pi(t, r, n = { cyclesFix: !0 }, i = []) {
|
2464
2489
|
var p, E;
|
2465
|
-
let
|
2490
|
+
let a = [];
|
2466
2491
|
const c = Array.isArray(t);
|
2467
|
-
for (const
|
2468
|
-
const
|
2469
|
-
if (!(
|
2470
|
-
|
2492
|
+
for (const x in t) {
|
2493
|
+
const S = t[x], P = c ? +x : x;
|
2494
|
+
if (!(x in r)) {
|
2495
|
+
a.push({
|
2471
2496
|
type: "REMOVE",
|
2472
2497
|
path: [P],
|
2473
|
-
oldValue: t[
|
2498
|
+
oldValue: t[x]
|
2474
2499
|
});
|
2475
2500
|
continue;
|
2476
2501
|
}
|
2477
|
-
const m = r[
|
2478
|
-
if (
|
2479
|
-
const A = pi(
|
2480
|
-
|
2481
|
-
} else
|
2482
|
-
!(Number.isNaN(
|
2502
|
+
const m = r[x], M = typeof S == "object" && typeof m == "object" && Array.isArray(S) === Array.isArray(m);
|
2503
|
+
if (S && m && M && !ms[(E = (p = Object.getPrototypeOf(S)) == null ? void 0 : p.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
|
2504
|
+
const A = pi(S, m, n, n.cyclesFix ? i.concat([S]) : []);
|
2505
|
+
a.push.apply(a, A.map((u) => (u.path.unshift(P), u)));
|
2506
|
+
} else S !== m && // treat NaN values as equivalent
|
2507
|
+
!(Number.isNaN(S) && Number.isNaN(m)) && !(M && (isNaN(S) ? S + "" == m + "" : +S == +m)) && a.push({
|
2483
2508
|
path: [P],
|
2484
2509
|
type: "CHANGE",
|
2485
2510
|
value: m,
|
2486
|
-
oldValue:
|
2511
|
+
oldValue: S
|
2487
2512
|
});
|
2488
2513
|
}
|
2489
2514
|
const d = Array.isArray(r);
|
2490
|
-
for (const
|
2491
|
-
|
2515
|
+
for (const x in r)
|
2516
|
+
x in t || a.push({
|
2492
2517
|
type: "CREATE",
|
2493
|
-
path: [d ? +
|
2494
|
-
value: r[
|
2518
|
+
path: [d ? +x : x],
|
2519
|
+
value: r[x]
|
2495
2520
|
});
|
2496
|
-
return
|
2521
|
+
return a;
|
2497
2522
|
}
|
2498
|
-
var Mn = Symbol.for("immer-nothing"),
|
2523
|
+
var Mn = Symbol.for("immer-nothing"), je = Symbol.for("immer-draftable"), yt = Symbol.for("immer-state"), hi = process.env.NODE_ENV !== "production" ? [
|
2499
2524
|
// All error codes, starting by 0:
|
2500
2525
|
function(t) {
|
2501
2526
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2526,7 +2551,7 @@ var Mn = Symbol.for("immer-nothing"), ze = Symbol.for("immer-draftable"), ht = S
|
|
2526
2551
|
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
2527
2552
|
// See Patches.ts for additional errors
|
2528
2553
|
] : [];
|
2529
|
-
function
|
2554
|
+
function q(t, ...r) {
|
2530
2555
|
if (process.env.NODE_ENV !== "production") {
|
2531
2556
|
const n = hi[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
2532
2557
|
throw new Error(`[Immer] ${i}`);
|
@@ -2535,44 +2560,44 @@ function K(t, ...r) {
|
|
2535
2560
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2536
2561
|
);
|
2537
2562
|
}
|
2538
|
-
var
|
2539
|
-
function
|
2540
|
-
return !!t && !!t[
|
2563
|
+
var ne = Object.getPrototypeOf;
|
2564
|
+
function ie(t) {
|
2565
|
+
return !!t && !!t[yt];
|
2541
2566
|
}
|
2542
|
-
function
|
2567
|
+
function Ut(t) {
|
2543
2568
|
var r;
|
2544
|
-
return t ? mi(t) || Array.isArray(t) || !!t[
|
2569
|
+
return t ? mi(t) || Array.isArray(t) || !!t[je] || !!((r = t.constructor) != null && r[je]) || We(t) || Ge(t) : !1;
|
2545
2570
|
}
|
2546
|
-
var
|
2571
|
+
var ys = Object.prototype.constructor.toString();
|
2547
2572
|
function mi(t) {
|
2548
2573
|
if (!t || typeof t != "object")
|
2549
2574
|
return !1;
|
2550
|
-
const r =
|
2575
|
+
const r = ne(t);
|
2551
2576
|
if (r === null)
|
2552
2577
|
return !0;
|
2553
2578
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2554
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
2579
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ys;
|
2555
2580
|
}
|
2556
|
-
function
|
2557
|
-
|
2581
|
+
function ze(t, r) {
|
2582
|
+
se(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2558
2583
|
r(n, t[n], t);
|
2559
2584
|
}) : t.forEach((n, i) => r(i, n, t));
|
2560
2585
|
}
|
2561
|
-
function
|
2562
|
-
const r = t[
|
2586
|
+
function se(t) {
|
2587
|
+
const r = t[yt];
|
2563
2588
|
return r ? r.type_ : Array.isArray(t) ? 1 : We(t) ? 2 : Ge(t) ? 3 : 0;
|
2564
2589
|
}
|
2565
|
-
function
|
2566
|
-
return
|
2590
|
+
function He(t, r) {
|
2591
|
+
return se(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2567
2592
|
}
|
2568
2593
|
function un(t, r) {
|
2569
|
-
return
|
2594
|
+
return se(t) === 2 ? t.get(r) : t[r];
|
2570
2595
|
}
|
2571
2596
|
function yi(t, r, n) {
|
2572
|
-
const i =
|
2597
|
+
const i = se(t);
|
2573
2598
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2574
2599
|
}
|
2575
|
-
function
|
2600
|
+
function gs(t, r) {
|
2576
2601
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2577
2602
|
}
|
2578
2603
|
function We(t) {
|
@@ -2581,7 +2606,7 @@ function We(t) {
|
|
2581
2606
|
function Ge(t) {
|
2582
2607
|
return t instanceof Set;
|
2583
2608
|
}
|
2584
|
-
function
|
2609
|
+
function ee(t) {
|
2585
2610
|
return t.copy_ || t.base_;
|
2586
2611
|
}
|
2587
2612
|
function bn(t, r) {
|
@@ -2594,10 +2619,10 @@ function bn(t, r) {
|
|
2594
2619
|
const n = mi(t);
|
2595
2620
|
if (r === !0 || r === "class_only" && !n) {
|
2596
2621
|
const i = Object.getOwnPropertyDescriptors(t);
|
2597
|
-
delete i[
|
2598
|
-
let
|
2599
|
-
for (let c = 0; c <
|
2600
|
-
const d =
|
2622
|
+
delete i[yt];
|
2623
|
+
let a = Reflect.ownKeys(i);
|
2624
|
+
for (let c = 0; c < a.length; c++) {
|
2625
|
+
const d = a[c], p = i[d];
|
2601
2626
|
p.writable === !1 && (p.writable = !0, p.configurable = !0), (p.get || p.set) && (i[d] = {
|
2602
2627
|
configurable: !0,
|
2603
2628
|
writable: !0,
|
@@ -2606,37 +2631,37 @@ function bn(t, r) {
|
|
2606
2631
|
value: t[d]
|
2607
2632
|
});
|
2608
2633
|
}
|
2609
|
-
return Object.create(
|
2634
|
+
return Object.create(ne(t), i);
|
2610
2635
|
} else {
|
2611
|
-
const i =
|
2636
|
+
const i = ne(t);
|
2612
2637
|
if (i !== null && n)
|
2613
2638
|
return { ...t };
|
2614
|
-
const
|
2615
|
-
return Object.assign(
|
2639
|
+
const a = Object.create(i);
|
2640
|
+
return Object.assign(a, t);
|
2616
2641
|
}
|
2617
2642
|
}
|
2618
2643
|
function An(t, r = !1) {
|
2619
|
-
return _r(t) ||
|
2644
|
+
return _r(t) || ie(t) || !Ut(t) || (se(t) > 1 && (t.set = t.add = t.clear = t.delete = Is), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => An(i, !0))), t;
|
2620
2645
|
}
|
2621
|
-
function
|
2622
|
-
|
2646
|
+
function Is() {
|
2647
|
+
q(2);
|
2623
2648
|
}
|
2624
2649
|
function _r(t) {
|
2625
2650
|
return Object.isFrozen(t);
|
2626
2651
|
}
|
2627
2652
|
var _n = {};
|
2628
|
-
function
|
2653
|
+
function ae(t) {
|
2629
2654
|
const r = _n[t];
|
2630
|
-
return r ||
|
2655
|
+
return r || q(0, t), r;
|
2631
2656
|
}
|
2632
|
-
function
|
2657
|
+
function bs(t, r) {
|
2633
2658
|
_n[t] || (_n[t] = r);
|
2634
2659
|
}
|
2635
2660
|
var Ne;
|
2636
2661
|
function gi() {
|
2637
2662
|
return Ne;
|
2638
2663
|
}
|
2639
|
-
function
|
2664
|
+
function _s(t, r) {
|
2640
2665
|
return {
|
2641
2666
|
drafts_: [],
|
2642
2667
|
parent_: t,
|
@@ -2648,26 +2673,26 @@ function _a(t, r) {
|
|
2648
2673
|
};
|
2649
2674
|
}
|
2650
2675
|
function Nn(t, r) {
|
2651
|
-
r && (
|
2676
|
+
r && (ae("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2652
2677
|
}
|
2653
2678
|
function vn(t) {
|
2654
|
-
Sn(t), t.drafts_.forEach(
|
2679
|
+
Sn(t), t.drafts_.forEach(vs), t.drafts_ = null;
|
2655
2680
|
}
|
2656
2681
|
function Sn(t) {
|
2657
2682
|
t === Ne && (Ne = t.parent_);
|
2658
2683
|
}
|
2659
2684
|
function Ln(t) {
|
2660
|
-
return Ne =
|
2685
|
+
return Ne = _s(Ne, t);
|
2661
2686
|
}
|
2662
|
-
function
|
2663
|
-
const r = t[
|
2687
|
+
function vs(t) {
|
2688
|
+
const r = t[yt];
|
2664
2689
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2665
2690
|
}
|
2666
2691
|
function $n(t, r) {
|
2667
2692
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2668
2693
|
const n = r.drafts_[0];
|
2669
|
-
return t !== void 0 && t !== n ? (n[
|
2670
|
-
n[
|
2694
|
+
return t !== void 0 && t !== n ? (n[yt].modified_ && (vn(r), q(4)), Ut(t) && (t = hr(r, t), r.parent_ || mr(r, t)), r.patches_ && ae("Patches").generateReplacementPatches_(
|
2695
|
+
n[yt].base_,
|
2671
2696
|
t,
|
2672
2697
|
r.patches_,
|
2673
2698
|
r.inversePatches_
|
@@ -2676,11 +2701,11 @@ function $n(t, r) {
|
|
2676
2701
|
function hr(t, r, n) {
|
2677
2702
|
if (_r(r))
|
2678
2703
|
return r;
|
2679
|
-
const i = r[
|
2704
|
+
const i = r[yt];
|
2680
2705
|
if (!i)
|
2681
|
-
return
|
2706
|
+
return ze(
|
2682
2707
|
r,
|
2683
|
-
(
|
2708
|
+
(a, c) => Un(t, i, r, a, c, n)
|
2684
2709
|
), r;
|
2685
2710
|
if (i.scope_ !== t)
|
2686
2711
|
return r;
|
@@ -2688,12 +2713,12 @@ function hr(t, r, n) {
|
|
2688
2713
|
return mr(t, i.base_, !0), i.base_;
|
2689
2714
|
if (!i.finalized_) {
|
2690
2715
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2691
|
-
const
|
2692
|
-
let c =
|
2693
|
-
i.type_ === 3 && (c = new Set(
|
2716
|
+
const a = i.copy_;
|
2717
|
+
let c = a, d = !1;
|
2718
|
+
i.type_ === 3 && (c = new Set(a), a.clear(), d = !0), ze(
|
2694
2719
|
c,
|
2695
|
-
(p, E) => Un(t, i,
|
2696
|
-
), mr(t,
|
2720
|
+
(p, E) => Un(t, i, a, p, E, n, d)
|
2721
|
+
), mr(t, a, !1), n && t.patches_ && ae("Patches").generatePatches_(
|
2697
2722
|
i,
|
2698
2723
|
n,
|
2699
2724
|
t.patches_,
|
@@ -2702,25 +2727,25 @@ function hr(t, r, n) {
|
|
2702
2727
|
}
|
2703
2728
|
return i.copy_;
|
2704
2729
|
}
|
2705
|
-
function Un(t, r, n, i,
|
2706
|
-
if (process.env.NODE_ENV !== "production" &&
|
2730
|
+
function Un(t, r, n, i, a, c, d) {
|
2731
|
+
if (process.env.NODE_ENV !== "production" && a === n && q(5), ie(a)) {
|
2707
2732
|
const p = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2708
|
-
!
|
2709
|
-
if (yi(n, i, E),
|
2733
|
+
!He(r.assigned_, i) ? c.concat(i) : void 0, E = hr(t, a, p);
|
2734
|
+
if (yi(n, i, E), ie(E))
|
2710
2735
|
t.canAutoFreeze_ = !1;
|
2711
2736
|
else
|
2712
2737
|
return;
|
2713
|
-
} else d && n.add(
|
2714
|
-
if (
|
2738
|
+
} else d && n.add(a);
|
2739
|
+
if (Ut(a) && !_r(a)) {
|
2715
2740
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2716
2741
|
return;
|
2717
|
-
hr(t,
|
2742
|
+
hr(t, a), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && mr(t, a);
|
2718
2743
|
}
|
2719
2744
|
}
|
2720
2745
|
function mr(t, r, n = !1) {
|
2721
2746
|
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && An(r, n);
|
2722
2747
|
}
|
2723
|
-
function
|
2748
|
+
function Ss(t, r) {
|
2724
2749
|
const n = Array.isArray(t), i = {
|
2725
2750
|
type_: n ? 1 : 0,
|
2726
2751
|
// Track which produce call this is associated with.
|
@@ -2744,36 +2769,36 @@ function Sa(t, r) {
|
|
2744
2769
|
revoke_: null,
|
2745
2770
|
isManual_: !1
|
2746
2771
|
};
|
2747
|
-
let
|
2748
|
-
n && (
|
2749
|
-
const { revoke: d, proxy: p } = Proxy.revocable(
|
2772
|
+
let a = i, c = xn;
|
2773
|
+
n && (a = [i], c = Le);
|
2774
|
+
const { revoke: d, proxy: p } = Proxy.revocable(a, c);
|
2750
2775
|
return i.draft_ = p, i.revoke_ = d, p;
|
2751
2776
|
}
|
2752
|
-
var
|
2777
|
+
var xn = {
|
2753
2778
|
get(t, r) {
|
2754
|
-
if (r ===
|
2779
|
+
if (r === yt)
|
2755
2780
|
return t;
|
2756
|
-
const n =
|
2757
|
-
if (!
|
2758
|
-
return
|
2781
|
+
const n = ee(t);
|
2782
|
+
if (!He(n, r))
|
2783
|
+
return ks(t, n, r);
|
2759
2784
|
const i = n[r];
|
2760
|
-
return t.finalized_ || !
|
2785
|
+
return t.finalized_ || !Ut(i) ? i : i === ln(t.base_, r) ? (fn(t), t.copy_[r] = wn(i, t)) : i;
|
2761
2786
|
},
|
2762
2787
|
has(t, r) {
|
2763
|
-
return r in
|
2788
|
+
return r in ee(t);
|
2764
2789
|
},
|
2765
2790
|
ownKeys(t) {
|
2766
|
-
return Reflect.ownKeys(
|
2791
|
+
return Reflect.ownKeys(ee(t));
|
2767
2792
|
},
|
2768
2793
|
set(t, r, n) {
|
2769
|
-
const i = Ii(
|
2794
|
+
const i = Ii(ee(t), r);
|
2770
2795
|
if (i != null && i.set)
|
2771
2796
|
return i.set.call(t.draft_, n), !0;
|
2772
2797
|
if (!t.modified_) {
|
2773
|
-
const
|
2798
|
+
const a = ln(ee(t), r), c = a == null ? void 0 : a[yt];
|
2774
2799
|
if (c && c.base_ === n)
|
2775
2800
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2776
|
-
if (
|
2801
|
+
if (gs(n, a) && (n !== void 0 || He(t.base_, r)))
|
2777
2802
|
return !0;
|
2778
2803
|
fn(t), kn(t);
|
2779
2804
|
}
|
@@ -2787,7 +2812,7 @@ var Dn = {
|
|
2787
2812
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2788
2813
|
// the same guarantee in ES5 mode.
|
2789
2814
|
getOwnPropertyDescriptor(t, r) {
|
2790
|
-
const n =
|
2815
|
+
const n = ee(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2791
2816
|
return i && {
|
2792
2817
|
writable: !0,
|
2793
2818
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2796,48 +2821,48 @@ var Dn = {
|
|
2796
2821
|
};
|
2797
2822
|
},
|
2798
2823
|
defineProperty() {
|
2799
|
-
|
2824
|
+
q(11);
|
2800
2825
|
},
|
2801
2826
|
getPrototypeOf(t) {
|
2802
|
-
return
|
2827
|
+
return ne(t.base_);
|
2803
2828
|
},
|
2804
2829
|
setPrototypeOf() {
|
2805
|
-
|
2830
|
+
q(12);
|
2806
2831
|
}
|
2807
2832
|
}, Le = {};
|
2808
|
-
|
2833
|
+
ze(xn, (t, r) => {
|
2809
2834
|
Le[t] = function() {
|
2810
2835
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2811
2836
|
};
|
2812
2837
|
});
|
2813
2838
|
Le.deleteProperty = function(t, r) {
|
2814
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) &&
|
2839
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && q(13), Le.set.call(this, t, r, void 0);
|
2815
2840
|
};
|
2816
2841
|
Le.set = function(t, r, n) {
|
2817
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) &&
|
2842
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && q(14), xn.set.call(this, t[0], r, n, t[0]);
|
2818
2843
|
};
|
2819
2844
|
function ln(t, r) {
|
2820
|
-
const n = t[
|
2821
|
-
return (n ?
|
2845
|
+
const n = t[yt];
|
2846
|
+
return (n ? ee(n) : t)[r];
|
2822
2847
|
}
|
2823
|
-
function
|
2824
|
-
var
|
2848
|
+
function ks(t, r, n) {
|
2849
|
+
var a;
|
2825
2850
|
const i = Ii(r, n);
|
2826
2851
|
return i ? "value" in i ? i.value : (
|
2827
2852
|
// This is a very special case, if the prop is a getter defined by the
|
2828
2853
|
// prototype, we should invoke it with the draft as context!
|
2829
|
-
(
|
2854
|
+
(a = i.get) == null ? void 0 : a.call(t.draft_)
|
2830
2855
|
) : void 0;
|
2831
2856
|
}
|
2832
2857
|
function Ii(t, r) {
|
2833
2858
|
if (!(r in t))
|
2834
2859
|
return;
|
2835
|
-
let n =
|
2860
|
+
let n = ne(t);
|
2836
2861
|
for (; n; ) {
|
2837
2862
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2838
2863
|
if (i)
|
2839
2864
|
return i;
|
2840
|
-
n =
|
2865
|
+
n = ne(n);
|
2841
2866
|
}
|
2842
2867
|
}
|
2843
2868
|
function kn(t) {
|
@@ -2849,53 +2874,53 @@ function fn(t) {
|
|
2849
2874
|
t.scope_.immer_.useStrictShallowCopy_
|
2850
2875
|
));
|
2851
2876
|
}
|
2852
|
-
var
|
2877
|
+
var ws = class {
|
2853
2878
|
constructor(t) {
|
2854
2879
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
2855
2880
|
if (typeof r == "function" && typeof n != "function") {
|
2856
2881
|
const c = n;
|
2857
2882
|
n = r;
|
2858
2883
|
const d = this;
|
2859
|
-
return function(E = c, ...
|
2860
|
-
return d.produce(E, (
|
2884
|
+
return function(E = c, ...x) {
|
2885
|
+
return d.produce(E, (S) => n.call(this, S, ...x));
|
2861
2886
|
};
|
2862
2887
|
}
|
2863
|
-
typeof n != "function" &&
|
2864
|
-
let
|
2865
|
-
if (
|
2888
|
+
typeof n != "function" && q(6), i !== void 0 && typeof i != "function" && q(7);
|
2889
|
+
let a;
|
2890
|
+
if (Ut(r)) {
|
2866
2891
|
const c = Ln(this), d = wn(r, void 0);
|
2867
2892
|
let p = !0;
|
2868
2893
|
try {
|
2869
|
-
|
2894
|
+
a = n(d), p = !1;
|
2870
2895
|
} finally {
|
2871
2896
|
p ? vn(c) : Sn(c);
|
2872
2897
|
}
|
2873
|
-
return Nn(c, i), $n(
|
2898
|
+
return Nn(c, i), $n(a, c);
|
2874
2899
|
} else if (!r || typeof r != "object") {
|
2875
|
-
if (
|
2900
|
+
if (a = n(r), a === void 0 && (a = r), a === Mn && (a = void 0), this.autoFreeze_ && An(a, !0), i) {
|
2876
2901
|
const c = [], d = [];
|
2877
|
-
|
2902
|
+
ae("Patches").generateReplacementPatches_(r, a, c, d), i(c, d);
|
2878
2903
|
}
|
2879
|
-
return
|
2904
|
+
return a;
|
2880
2905
|
} else
|
2881
|
-
|
2906
|
+
q(1, r);
|
2882
2907
|
}, this.produceWithPatches = (r, n) => {
|
2883
2908
|
if (typeof r == "function")
|
2884
2909
|
return (d, ...p) => this.produceWithPatches(d, (E) => r(E, ...p));
|
2885
|
-
let i,
|
2910
|
+
let i, a;
|
2886
2911
|
return [this.produce(r, n, (d, p) => {
|
2887
|
-
i = d,
|
2888
|
-
}), i,
|
2912
|
+
i = d, a = p;
|
2913
|
+
}), i, a];
|
2889
2914
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2890
2915
|
}
|
2891
2916
|
createDraft(t) {
|
2892
|
-
|
2917
|
+
Ut(t) || q(8), ie(t) && (t = Ts(t));
|
2893
2918
|
const r = Ln(this), n = wn(t, void 0);
|
2894
|
-
return n[
|
2919
|
+
return n[yt].isManual_ = !0, Sn(r), n;
|
2895
2920
|
}
|
2896
2921
|
finishDraft(t, r) {
|
2897
|
-
const n = t && t[
|
2898
|
-
(!n || !n.isManual_) &&
|
2922
|
+
const n = t && t[yt];
|
2923
|
+
(!n || !n.isManual_) && q(9);
|
2899
2924
|
const { scope_: i } = n;
|
2900
2925
|
return Nn(i, r), $n(void 0, i);
|
2901
2926
|
}
|
@@ -2918,31 +2943,31 @@ var wa = class {
|
|
2918
2943
|
applyPatches(t, r) {
|
2919
2944
|
let n;
|
2920
2945
|
for (n = r.length - 1; n >= 0; n--) {
|
2921
|
-
const
|
2922
|
-
if (
|
2923
|
-
t =
|
2946
|
+
const a = r[n];
|
2947
|
+
if (a.path.length === 0 && a.op === "replace") {
|
2948
|
+
t = a.value;
|
2924
2949
|
break;
|
2925
2950
|
}
|
2926
2951
|
}
|
2927
2952
|
n > -1 && (r = r.slice(n + 1));
|
2928
|
-
const i =
|
2929
|
-
return
|
2953
|
+
const i = ae("Patches").applyPatches_;
|
2954
|
+
return ie(t) ? i(t, r) : this.produce(
|
2930
2955
|
t,
|
2931
|
-
(
|
2956
|
+
(a) => i(a, r)
|
2932
2957
|
);
|
2933
2958
|
}
|
2934
2959
|
};
|
2935
2960
|
function wn(t, r) {
|
2936
|
-
const n = We(t) ?
|
2961
|
+
const n = We(t) ? ae("MapSet").proxyMap_(t, r) : Ge(t) ? ae("MapSet").proxySet_(t, r) : Ss(t, r);
|
2937
2962
|
return (r ? r.scope_ : gi()).drafts_.push(n), n;
|
2938
2963
|
}
|
2939
|
-
function
|
2940
|
-
return
|
2964
|
+
function Ts(t) {
|
2965
|
+
return ie(t) || q(10, t), bi(t);
|
2941
2966
|
}
|
2942
2967
|
function bi(t) {
|
2943
|
-
if (!
|
2968
|
+
if (!Ut(t) || _r(t))
|
2944
2969
|
return t;
|
2945
|
-
const r = t[
|
2970
|
+
const r = t[yt];
|
2946
2971
|
let n;
|
2947
2972
|
if (r) {
|
2948
2973
|
if (!r.modified_)
|
@@ -2950,8 +2975,8 @@ function bi(t) {
|
|
2950
2975
|
r.finalized_ = !0, n = bn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2951
2976
|
} else
|
2952
2977
|
n = bn(t, !0);
|
2953
|
-
return
|
2954
|
-
yi(n, i, bi(
|
2978
|
+
return ze(n, (i, a) => {
|
2979
|
+
yi(n, i, bi(a));
|
2955
2980
|
}), r && (r.finalized_ = !1), n;
|
2956
2981
|
}
|
2957
2982
|
function Wn() {
|
@@ -2966,7 +2991,7 @@ function Wn() {
|
|
2966
2991
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2967
2992
|
);
|
2968
2993
|
const r = "replace", n = "add", i = "remove";
|
2969
|
-
function
|
2994
|
+
function a(m, M, A, u) {
|
2970
2995
|
switch (m.type_) {
|
2971
2996
|
case 0:
|
2972
2997
|
case 2:
|
@@ -2988,79 +3013,79 @@ function Wn() {
|
|
2988
3013
|
}
|
2989
3014
|
}
|
2990
3015
|
function c(m, M, A, u) {
|
2991
|
-
let { base_: f, assigned_:
|
3016
|
+
let { base_: f, assigned_: b } = m, y = m.copy_;
|
2992
3017
|
y.length < f.length && ([f, y] = [y, f], [A, u] = [u, A]);
|
2993
3018
|
for (let h = 0; h < f.length; h++)
|
2994
|
-
if (
|
2995
|
-
const
|
3019
|
+
if (b[h] && y[h] !== f[h]) {
|
3020
|
+
const I = M.concat([h]);
|
2996
3021
|
A.push({
|
2997
3022
|
op: r,
|
2998
|
-
path:
|
3023
|
+
path: I,
|
2999
3024
|
// Need to maybe clone it, as it can in fact be the original value
|
3000
3025
|
// due to the base/copy inversion at the start of this function
|
3001
3026
|
value: P(y[h])
|
3002
3027
|
}), u.push({
|
3003
3028
|
op: r,
|
3004
|
-
path:
|
3029
|
+
path: I,
|
3005
3030
|
value: P(f[h])
|
3006
3031
|
});
|
3007
3032
|
}
|
3008
3033
|
for (let h = f.length; h < y.length; h++) {
|
3009
|
-
const
|
3034
|
+
const I = M.concat([h]);
|
3010
3035
|
A.push({
|
3011
3036
|
op: n,
|
3012
|
-
path:
|
3037
|
+
path: I,
|
3013
3038
|
// Need to maybe clone it, as it can in fact be the original value
|
3014
3039
|
// due to the base/copy inversion at the start of this function
|
3015
3040
|
value: P(y[h])
|
3016
3041
|
});
|
3017
3042
|
}
|
3018
3043
|
for (let h = y.length - 1; f.length <= h; --h) {
|
3019
|
-
const
|
3044
|
+
const I = M.concat([h]);
|
3020
3045
|
u.push({
|
3021
3046
|
op: i,
|
3022
|
-
path:
|
3047
|
+
path: I
|
3023
3048
|
});
|
3024
3049
|
}
|
3025
3050
|
}
|
3026
3051
|
function d(m, M, A, u) {
|
3027
|
-
const { base_: f, copy_:
|
3028
|
-
|
3029
|
-
const
|
3030
|
-
if (
|
3052
|
+
const { base_: f, copy_: b } = m;
|
3053
|
+
ze(m.assigned_, (y, h) => {
|
3054
|
+
const I = un(f, y), _ = un(b, y), g = h ? He(f, y) ? r : n : i;
|
3055
|
+
if (I === _ && g === r)
|
3031
3056
|
return;
|
3032
|
-
const
|
3033
|
-
A.push(
|
3034
|
-
|
3057
|
+
const v = M.concat(y);
|
3058
|
+
A.push(g === i ? { op: g, path: v } : { op: g, path: v, value: _ }), u.push(
|
3059
|
+
g === n ? { op: i, path: v } : g === i ? { op: n, path: v, value: P(I) } : { op: r, path: v, value: P(I) }
|
3035
3060
|
);
|
3036
3061
|
});
|
3037
3062
|
}
|
3038
3063
|
function p(m, M, A, u) {
|
3039
|
-
let { base_: f, copy_:
|
3064
|
+
let { base_: f, copy_: b } = m, y = 0;
|
3040
3065
|
f.forEach((h) => {
|
3041
|
-
if (!
|
3042
|
-
const
|
3066
|
+
if (!b.has(h)) {
|
3067
|
+
const I = M.concat([y]);
|
3043
3068
|
A.push({
|
3044
3069
|
op: i,
|
3045
|
-
path:
|
3070
|
+
path: I,
|
3046
3071
|
value: h
|
3047
3072
|
}), u.unshift({
|
3048
3073
|
op: n,
|
3049
|
-
path:
|
3074
|
+
path: I,
|
3050
3075
|
value: h
|
3051
3076
|
});
|
3052
3077
|
}
|
3053
3078
|
y++;
|
3054
|
-
}), y = 0,
|
3079
|
+
}), y = 0, b.forEach((h) => {
|
3055
3080
|
if (!f.has(h)) {
|
3056
|
-
const
|
3081
|
+
const I = M.concat([y]);
|
3057
3082
|
A.push({
|
3058
3083
|
op: n,
|
3059
|
-
path:
|
3084
|
+
path: I,
|
3060
3085
|
value: h
|
3061
3086
|
}), u.unshift({
|
3062
3087
|
op: i,
|
3063
|
-
path:
|
3088
|
+
path: I,
|
3064
3089
|
value: h
|
3065
3090
|
});
|
3066
3091
|
}
|
@@ -3078,89 +3103,89 @@ function Wn() {
|
|
3078
3103
|
value: m
|
3079
3104
|
});
|
3080
3105
|
}
|
3081
|
-
function
|
3106
|
+
function x(m, M) {
|
3082
3107
|
return M.forEach((A) => {
|
3083
3108
|
const { path: u, op: f } = A;
|
3084
|
-
let
|
3109
|
+
let b = m;
|
3085
3110
|
for (let _ = 0; _ < u.length - 1; _++) {
|
3086
|
-
const
|
3087
|
-
let
|
3088
|
-
typeof
|
3111
|
+
const g = se(b);
|
3112
|
+
let v = u[_];
|
3113
|
+
typeof v != "string" && typeof v != "number" && (v = "" + v), (g === 0 || g === 1) && (v === "__proto__" || v === "constructor") && q(19), typeof b == "function" && v === "prototype" && q(19), b = un(b, v), typeof b != "object" && q(18, u.join("/"));
|
3089
3114
|
}
|
3090
|
-
const y =
|
3115
|
+
const y = se(b), h = S(A.value), I = u[u.length - 1];
|
3091
3116
|
switch (f) {
|
3092
3117
|
case r:
|
3093
3118
|
switch (y) {
|
3094
3119
|
case 2:
|
3095
|
-
return
|
3120
|
+
return b.set(I, h);
|
3096
3121
|
case 3:
|
3097
|
-
|
3122
|
+
q(16);
|
3098
3123
|
default:
|
3099
|
-
return I
|
3124
|
+
return b[I] = h;
|
3100
3125
|
}
|
3101
3126
|
case n:
|
3102
3127
|
switch (y) {
|
3103
3128
|
case 1:
|
3104
|
-
return
|
3129
|
+
return I === "-" ? b.push(h) : b.splice(I, 0, h);
|
3105
3130
|
case 2:
|
3106
|
-
return
|
3131
|
+
return b.set(I, h);
|
3107
3132
|
case 3:
|
3108
|
-
return
|
3133
|
+
return b.add(h);
|
3109
3134
|
default:
|
3110
|
-
return I
|
3135
|
+
return b[I] = h;
|
3111
3136
|
}
|
3112
3137
|
case i:
|
3113
3138
|
switch (y) {
|
3114
3139
|
case 1:
|
3115
|
-
return
|
3140
|
+
return b.splice(I, 1);
|
3116
3141
|
case 2:
|
3117
|
-
return
|
3142
|
+
return b.delete(I);
|
3118
3143
|
case 3:
|
3119
|
-
return
|
3144
|
+
return b.delete(A.value);
|
3120
3145
|
default:
|
3121
|
-
return delete I
|
3146
|
+
return delete b[I];
|
3122
3147
|
}
|
3123
3148
|
default:
|
3124
|
-
|
3149
|
+
q(17, f);
|
3125
3150
|
}
|
3126
3151
|
}), m;
|
3127
3152
|
}
|
3128
|
-
function
|
3129
|
-
if (!
|
3153
|
+
function S(m) {
|
3154
|
+
if (!Ut(m))
|
3130
3155
|
return m;
|
3131
3156
|
if (Array.isArray(m))
|
3132
|
-
return m.map(
|
3157
|
+
return m.map(S);
|
3133
3158
|
if (We(m))
|
3134
3159
|
return new Map(
|
3135
|
-
Array.from(m.entries()).map(([A, u]) => [A,
|
3160
|
+
Array.from(m.entries()).map(([A, u]) => [A, S(u)])
|
3136
3161
|
);
|
3137
3162
|
if (Ge(m))
|
3138
|
-
return new Set(Array.from(m).map(
|
3139
|
-
const M = Object.create(
|
3163
|
+
return new Set(Array.from(m).map(S));
|
3164
|
+
const M = Object.create(ne(m));
|
3140
3165
|
for (const A in m)
|
3141
|
-
M[A] =
|
3142
|
-
return
|
3166
|
+
M[A] = S(m[A]);
|
3167
|
+
return He(m, je) && (M[je] = m[je]), M;
|
3143
3168
|
}
|
3144
3169
|
function P(m) {
|
3145
|
-
return
|
3170
|
+
return ie(m) ? S(m) : m;
|
3146
3171
|
}
|
3147
|
-
|
3148
|
-
applyPatches_:
|
3149
|
-
generatePatches_:
|
3172
|
+
bs("Patches", {
|
3173
|
+
applyPatches_: x,
|
3174
|
+
generatePatches_: a,
|
3150
3175
|
generateReplacementPatches_: E
|
3151
3176
|
});
|
3152
3177
|
}
|
3153
|
-
var
|
3154
|
-
|
3155
|
-
|
3178
|
+
var gt = new ws(), Es = gt.produce;
|
3179
|
+
gt.produceWithPatches.bind(
|
3180
|
+
gt
|
3156
3181
|
);
|
3157
|
-
|
3158
|
-
|
3159
|
-
var
|
3160
|
-
|
3161
|
-
|
3162
|
-
var
|
3163
|
-
function
|
3182
|
+
gt.setAutoFreeze.bind(gt);
|
3183
|
+
gt.setUseStrictShallowCopy.bind(gt);
|
3184
|
+
var Ms = gt.applyPatches.bind(gt);
|
3185
|
+
gt.createDraft.bind(gt);
|
3186
|
+
gt.finishDraft.bind(gt);
|
3187
|
+
var As = 1 / 0, xs = 9007199254740991, Ds = "[object Arguments]", Os = "[object Function]", Ps = "[object GeneratorFunction]", Cs = "[object Symbol]", Rs = typeof _t == "object" && _t && _t.Object === Object && _t, Fs = typeof self == "object" && self && self.Object === Object && self, js = Rs || Fs || Function("return this")();
|
3188
|
+
function zs(t, r, n) {
|
3164
3189
|
switch (n.length) {
|
3165
3190
|
case 0:
|
3166
3191
|
return t.call(r);
|
@@ -3173,91 +3198,91 @@ function Ha(t, r, n) {
|
|
3173
3198
|
}
|
3174
3199
|
return t.apply(r, n);
|
3175
3200
|
}
|
3176
|
-
function
|
3177
|
-
for (var n = -1, i = t ? t.length : 0,
|
3178
|
-
|
3179
|
-
return
|
3201
|
+
function Hs(t, r) {
|
3202
|
+
for (var n = -1, i = t ? t.length : 0, a = Array(i); ++n < i; )
|
3203
|
+
a[n] = r(t[n], n, t);
|
3204
|
+
return a;
|
3180
3205
|
}
|
3181
|
-
function
|
3182
|
-
for (var n = -1, i = r.length,
|
3183
|
-
t[
|
3206
|
+
function Ns(t, r) {
|
3207
|
+
for (var n = -1, i = r.length, a = t.length; ++n < i; )
|
3208
|
+
t[a + n] = r[n];
|
3184
3209
|
return t;
|
3185
3210
|
}
|
3186
|
-
var
|
3187
|
-
function
|
3211
|
+
var Dn = Object.prototype, Ls = Dn.hasOwnProperty, On = Dn.toString, Gn = js.Symbol, $s = Dn.propertyIsEnumerable, Yn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
3212
|
+
function Us(t, r, n, i, a) {
|
3188
3213
|
var c = -1, d = t.length;
|
3189
|
-
for (n || (n =
|
3214
|
+
for (n || (n = Bs), a || (a = []); ++c < d; ) {
|
3190
3215
|
var p = t[c];
|
3191
|
-
n(p) ?
|
3216
|
+
n(p) ? Ns(a, p) : a[a.length] = p;
|
3192
3217
|
}
|
3193
|
-
return
|
3218
|
+
return a;
|
3194
3219
|
}
|
3195
|
-
function
|
3196
|
-
return t = Object(t),
|
3220
|
+
function Ws(t, r) {
|
3221
|
+
return t = Object(t), Gs(t, r, function(n, i) {
|
3197
3222
|
return i in t;
|
3198
3223
|
});
|
3199
3224
|
}
|
3200
|
-
function
|
3201
|
-
for (var i = -1,
|
3225
|
+
function Gs(t, r, n) {
|
3226
|
+
for (var i = -1, a = r.length, c = {}; ++i < a; ) {
|
3202
3227
|
var d = r[i], p = t[d];
|
3203
3228
|
n(p, d) && (c[d] = p);
|
3204
3229
|
}
|
3205
3230
|
return c;
|
3206
3231
|
}
|
3207
|
-
function
|
3232
|
+
function Ys(t, r) {
|
3208
3233
|
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
3209
|
-
for (var n = arguments, i = -1,
|
3234
|
+
for (var n = arguments, i = -1, a = Bn(n.length - r, 0), c = Array(a); ++i < a; )
|
3210
3235
|
c[i] = n[r + i];
|
3211
3236
|
i = -1;
|
3212
3237
|
for (var d = Array(r + 1); ++i < r; )
|
3213
3238
|
d[i] = n[i];
|
3214
|
-
return d[r] = c,
|
3239
|
+
return d[r] = c, zs(t, this, d);
|
3215
3240
|
};
|
3216
3241
|
}
|
3217
|
-
function
|
3218
|
-
return
|
3242
|
+
function Bs(t) {
|
3243
|
+
return Vs(t) || Xs(t) || !!(Yn && t && t[Yn]);
|
3219
3244
|
}
|
3220
|
-
function
|
3221
|
-
if (typeof t == "string" ||
|
3245
|
+
function Ks(t) {
|
3246
|
+
if (typeof t == "string" || ea(t))
|
3222
3247
|
return t;
|
3223
3248
|
var r = t + "";
|
3224
|
-
return r == "0" && 1 / t == -
|
3249
|
+
return r == "0" && 1 / t == -As ? "-0" : r;
|
3225
3250
|
}
|
3226
|
-
function
|
3227
|
-
return
|
3251
|
+
function Xs(t) {
|
3252
|
+
return Js(t) && Ls.call(t, "callee") && (!$s.call(t, "callee") || On.call(t) == Ds);
|
3228
3253
|
}
|
3229
|
-
var
|
3230
|
-
function
|
3231
|
-
return t != null &&
|
3254
|
+
var Vs = Array.isArray;
|
3255
|
+
function qs(t) {
|
3256
|
+
return t != null && Qs(t.length) && !Zs(t);
|
3232
3257
|
}
|
3233
|
-
function
|
3234
|
-
return _i(t) &&
|
3258
|
+
function Js(t) {
|
3259
|
+
return _i(t) && qs(t);
|
3235
3260
|
}
|
3236
|
-
function
|
3237
|
-
var r =
|
3238
|
-
return r ==
|
3261
|
+
function Zs(t) {
|
3262
|
+
var r = ta(t) ? On.call(t) : "";
|
3263
|
+
return r == Os || r == Ps;
|
3239
3264
|
}
|
3240
|
-
function
|
3241
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <=
|
3265
|
+
function Qs(t) {
|
3266
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= xs;
|
3242
3267
|
}
|
3243
|
-
function
|
3268
|
+
function ta(t) {
|
3244
3269
|
var r = typeof t;
|
3245
3270
|
return !!t && (r == "object" || r == "function");
|
3246
3271
|
}
|
3247
3272
|
function _i(t) {
|
3248
3273
|
return !!t && typeof t == "object";
|
3249
3274
|
}
|
3250
|
-
function
|
3251
|
-
return typeof t == "symbol" || _i(t) && On.call(t) ==
|
3275
|
+
function ea(t) {
|
3276
|
+
return typeof t == "symbol" || _i(t) && On.call(t) == Cs;
|
3252
3277
|
}
|
3253
|
-
var
|
3254
|
-
return t == null ? {} :
|
3255
|
-
}),
|
3256
|
-
const Kn = /* @__PURE__ */ Tn(
|
3278
|
+
var ra = Ys(function(t, r) {
|
3279
|
+
return t == null ? {} : Ws(t, Hs(Us(r), Ks));
|
3280
|
+
}), na = ra;
|
3281
|
+
const Kn = /* @__PURE__ */ Tn(na), ia = {
|
3257
3282
|
width: 1080,
|
3258
3283
|
height: 1920
|
3259
|
-
},
|
3260
|
-
size:
|
3284
|
+
}, sa = {
|
3285
|
+
size: ia,
|
3261
3286
|
tracks: [],
|
3262
3287
|
trackItemIds: [],
|
3263
3288
|
trackItemsMap: {},
|
@@ -3281,22 +3306,22 @@ const Kn = /* @__PURE__ */ Tn(ns), is = {
|
|
3281
3306
|
"transitionsMap",
|
3282
3307
|
"trackItemIds"
|
3283
3308
|
];
|
3284
|
-
class
|
3309
|
+
class ja {
|
3285
3310
|
constructor(r) {
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
const n = r ||
|
3293
|
-
this.stateSubject = new
|
3311
|
+
Zt(this, "stateSubject");
|
3312
|
+
Zt(this, "stateHistorySubject");
|
3313
|
+
Zt(this, "prevState");
|
3314
|
+
Zt(this, "undos", []);
|
3315
|
+
Zt(this, "redos", []);
|
3316
|
+
Zt(this, "listener");
|
3317
|
+
const n = r || sa;
|
3318
|
+
this.stateSubject = new Hn(n), this.stateHistorySubject = new Hn({
|
3294
3319
|
handleRedo: !1,
|
3295
3320
|
handleUndo: !1
|
3296
3321
|
}), this.prevState = n, this.initListeners();
|
3297
3322
|
}
|
3298
3323
|
initListeners() {
|
3299
|
-
|
3324
|
+
hs(this);
|
3300
3325
|
}
|
3301
3326
|
destroyListeners() {
|
3302
3327
|
this.listener && this.listener.unsubscribe();
|
@@ -3305,7 +3330,7 @@ class zs {
|
|
3305
3330
|
this.destroyListeners();
|
3306
3331
|
}
|
3307
3332
|
updateHistory(r, n) {
|
3308
|
-
const i = Kn(r, Xn),
|
3333
|
+
const i = Kn(r, Xn), a = Kn(this.getState(), Xn), c = pi(a, i);
|
3309
3334
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
3310
3335
|
}
|
3311
3336
|
getStateHistory() {
|
@@ -3324,11 +3349,11 @@ class zs {
|
|
3324
3349
|
}
|
3325
3350
|
// Update the state, emitting only if the part of the state has changed
|
3326
3351
|
updateState(r, n = { updateHistory: !1 }) {
|
3327
|
-
const i = this.getState(),
|
3352
|
+
const i = this.getState(), a = {
|
3328
3353
|
...i,
|
3329
3354
|
...r
|
3330
3355
|
};
|
3331
|
-
ot(i,
|
3356
|
+
ot(i, a) || (n.updateHistory && this.updateHistory(a, n.kind), this.prevState = i, this.stateSubject.next(a));
|
3332
3357
|
}
|
3333
3358
|
// emit changes for design size
|
3334
3359
|
subscribeToSize(r) {
|
@@ -3372,7 +3397,7 @@ class zs {
|
|
3372
3397
|
}
|
3373
3398
|
subscribeToAddOrRemoveItems(r) {
|
3374
3399
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3375
|
-
(!ot(n.trackItemIds, this.prevState.trackItemIds) || !ot(n.tracks, this.prevState.tracks)) && r({ trackItemIds: n.trackItemIds });
|
3400
|
+
(!ot(n.trackItemIds, this.prevState.trackItemIds) || !ot(n.tracks, this.prevState.tracks) || !ot(n.transitionIds, this.prevState.transitionIds)) && r({ trackItemIds: n.trackItemIds });
|
3376
3401
|
});
|
3377
3402
|
}
|
3378
3403
|
// Selectively subscribe to activeIds changes
|
@@ -3403,70 +3428,70 @@ class zs {
|
|
3403
3428
|
if (!n || !i) return;
|
3404
3429
|
Wn();
|
3405
3430
|
const {
|
3406
|
-
trackItemDetailsMap:
|
3431
|
+
trackItemDetailsMap: a,
|
3407
3432
|
trackItemIds: c,
|
3408
3433
|
tracks: d,
|
3409
3434
|
transitionIds: p,
|
3410
3435
|
transitionsMap: E,
|
3411
|
-
trackItemsMap:
|
3412
|
-
} = this.getState(),
|
3413
|
-
trackItemDetailsMap:
|
3436
|
+
trackItemsMap: x
|
3437
|
+
} = this.getState(), S = Y({
|
3438
|
+
trackItemDetailsMap: a,
|
3414
3439
|
trackItemIds: c,
|
3415
3440
|
tracks: d,
|
3416
3441
|
transitionIds: p,
|
3417
3442
|
transitionsMap: E,
|
3418
|
-
trackItemsMap:
|
3443
|
+
trackItemsMap: x
|
3419
3444
|
}), P = [], m = [], M = [], A = [], u = [], f = [];
|
3420
3445
|
n.forEach((T) => {
|
3421
|
-
let
|
3446
|
+
let k;
|
3422
3447
|
const H = T.path.slice(1);
|
3423
|
-
T.type === "CREATE" ?
|
3448
|
+
T.type === "CREATE" ? k = {
|
3424
3449
|
path: H,
|
3425
3450
|
op: "remove",
|
3426
3451
|
value: T.value
|
3427
|
-
} : T.type === "CHANGE" ?
|
3452
|
+
} : T.type === "CHANGE" ? k = {
|
3428
3453
|
path: H,
|
3429
3454
|
op: "replace",
|
3430
3455
|
value: T.oldValue
|
3431
|
-
} :
|
3456
|
+
} : k = {
|
3432
3457
|
path: H,
|
3433
3458
|
op: "add",
|
3434
3459
|
value: T.oldValue
|
3435
|
-
}, T.path.includes("trackItemIds") ? M.push(
|
3460
|
+
}, T.path.includes("trackItemIds") ? M.push(k) : T.path.includes("transitionIds") ? m.push(k) : T.path.includes("trackItemsMap") ? u.push(k) : T.path.includes("transitionsMap") ? A.push(k) : T.path.includes("tracks") ? P.push(k) : T.path.includes("trackItemDetailsMap") && f.push(k);
|
3436
3461
|
});
|
3437
|
-
const
|
3438
|
-
|
3462
|
+
const b = this.applyPatch(
|
3463
|
+
S.tracks,
|
3439
3464
|
P
|
3440
3465
|
), y = this.applyPatch(
|
3441
|
-
|
3466
|
+
S.transitionIds,
|
3442
3467
|
m
|
3443
3468
|
), h = this.applyPatch(
|
3444
|
-
|
3469
|
+
S.trackItemIds,
|
3445
3470
|
M
|
3446
|
-
),
|
3447
|
-
|
3471
|
+
), I = this.applyPatch(
|
3472
|
+
S.transitionsMap,
|
3448
3473
|
A
|
3449
3474
|
), _ = this.applyPatch(
|
3450
|
-
|
3475
|
+
S.trackItemsMap,
|
3451
3476
|
u
|
3452
|
-
),
|
3453
|
-
|
3477
|
+
), g = this.applyPatch(
|
3478
|
+
S.trackItemDetailsMap,
|
3454
3479
|
f
|
3455
|
-
),
|
3456
|
-
tracks:
|
3480
|
+
), v = Y({
|
3481
|
+
tracks: b,
|
3457
3482
|
transitionIds: y,
|
3458
3483
|
trackItemIds: h,
|
3459
|
-
transitionsMap:
|
3484
|
+
transitionsMap: I,
|
3460
3485
|
trackItemsMap: _,
|
3461
|
-
trackItemDetailsMap:
|
3462
|
-
}), U =
|
3486
|
+
trackItemDetailsMap: g
|
3487
|
+
}), U = Y(this.getState()), C = { ...U, ...v };
|
3463
3488
|
this.prevState = U, this.redos.push({ redos: n, type: i });
|
3464
|
-
const O =
|
3489
|
+
const O = re(C.trackItemsMap);
|
3465
3490
|
this.stateSubject.next({ ...C, duration: O }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3466
3491
|
}
|
3467
3492
|
applyPatch(r, n) {
|
3468
|
-
return n.reverse().reduce((i,
|
3469
|
-
|
3493
|
+
return n.reverse().reduce((i, a) => Es(i, (c) => {
|
3494
|
+
Ms(c, [a]);
|
3470
3495
|
}), r);
|
3471
3496
|
}
|
3472
3497
|
redo() {
|
@@ -3474,125 +3499,125 @@ class zs {
|
|
3474
3499
|
if (!n || !i) return;
|
3475
3500
|
Wn();
|
3476
3501
|
const {
|
3477
|
-
trackItemDetailsMap:
|
3502
|
+
trackItemDetailsMap: a,
|
3478
3503
|
trackItemIds: c,
|
3479
3504
|
tracks: d,
|
3480
3505
|
transitionIds: p,
|
3481
3506
|
transitionsMap: E,
|
3482
|
-
trackItemsMap:
|
3483
|
-
} = this.getState(),
|
3484
|
-
trackItemDetailsMap:
|
3507
|
+
trackItemsMap: x
|
3508
|
+
} = this.getState(), S = Y({
|
3509
|
+
trackItemDetailsMap: a,
|
3485
3510
|
trackItemIds: c,
|
3486
3511
|
tracks: d,
|
3487
3512
|
transitionIds: p,
|
3488
3513
|
transitionsMap: E,
|
3489
|
-
trackItemsMap:
|
3514
|
+
trackItemsMap: x
|
3490
3515
|
}), P = [], m = [], M = [], A = [], u = [], f = [];
|
3491
3516
|
n.forEach((T) => {
|
3492
|
-
let
|
3517
|
+
let k;
|
3493
3518
|
const H = T.path.slice(1);
|
3494
|
-
T.type === "CREATE" ?
|
3519
|
+
T.type === "CREATE" ? k = {
|
3495
3520
|
path: H,
|
3496
3521
|
op: "add",
|
3497
3522
|
value: T.value
|
3498
|
-
} : T.type === "CHANGE" ?
|
3523
|
+
} : T.type === "CHANGE" ? k = {
|
3499
3524
|
path: H,
|
3500
3525
|
op: "replace",
|
3501
3526
|
value: T.value
|
3502
|
-
} :
|
3527
|
+
} : k = {
|
3503
3528
|
path: H,
|
3504
3529
|
op: "remove",
|
3505
3530
|
value: T.oldValue
|
3506
|
-
}, T.path.includes("trackItemIds") ? M.push(
|
3531
|
+
}, T.path.includes("trackItemIds") ? M.push(k) : T.path.includes("transitionIds") ? m.push(k) : T.path.includes("trackItemsMap") ? u.push(k) : T.path.includes("transitionsMap") ? A.push(k) : T.path.includes("trackItemDetailsMap") ? f.push(k) : P.push(k);
|
3507
3532
|
});
|
3508
|
-
const
|
3509
|
-
|
3533
|
+
const b = this.applyPatch(
|
3534
|
+
S.tracks,
|
3510
3535
|
P
|
3511
3536
|
), y = this.applyPatch(
|
3512
|
-
|
3537
|
+
S.transitionIds,
|
3513
3538
|
m
|
3514
3539
|
), h = this.applyPatch(
|
3515
|
-
|
3540
|
+
S.trackItemIds,
|
3516
3541
|
M
|
3517
|
-
),
|
3518
|
-
|
3542
|
+
), I = this.applyPatch(
|
3543
|
+
S.transitionsMap,
|
3519
3544
|
A
|
3520
3545
|
), _ = this.applyPatch(
|
3521
|
-
|
3546
|
+
S.trackItemsMap,
|
3522
3547
|
u
|
3523
|
-
),
|
3524
|
-
|
3548
|
+
), g = this.applyPatch(
|
3549
|
+
S.trackItemDetailsMap,
|
3525
3550
|
f
|
3526
|
-
),
|
3527
|
-
tracks:
|
3551
|
+
), v = Y({
|
3552
|
+
tracks: b,
|
3528
3553
|
transitionIds: y,
|
3529
3554
|
trackItemIds: h,
|
3530
|
-
transitionsMap:
|
3555
|
+
transitionsMap: I,
|
3531
3556
|
trackItemsMap: _,
|
3532
|
-
trackItemDetailsMap:
|
3533
|
-
}), U =
|
3557
|
+
trackItemDetailsMap: g
|
3558
|
+
}), U = Y(this.getState()), C = { ...U, ...v };
|
3534
3559
|
this.prevState = U, this.undos.push({ undos: n, type: i });
|
3535
|
-
const O =
|
3560
|
+
const O = re(C.trackItemsMap);
|
3536
3561
|
this.stateSubject.next({ ...C, duration: O }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3537
3562
|
}
|
3538
3563
|
}
|
3539
3564
|
export {
|
3540
3565
|
qi as ACTIVE_CLONE,
|
3541
|
-
|
3566
|
+
Sa as ACTIVE_DELETE,
|
3542
3567
|
Vi as ACTIVE_PASTE,
|
3543
3568
|
ve as ACTIVE_PREFIX,
|
3544
|
-
|
3569
|
+
va as ACTIVE_SET,
|
3545
3570
|
Ji as ACTIVE_SPLIT,
|
3546
|
-
|
3571
|
+
ma as ADD_ANIMATION,
|
3547
3572
|
Ui as ADD_AUDIO,
|
3548
3573
|
Gi as ADD_CAPTION,
|
3549
3574
|
Wi as ADD_IMAGE,
|
3550
3575
|
Bi as ADD_ITEMS,
|
3551
|
-
|
3552
|
-
|
3553
|
-
|
3554
|
-
|
3576
|
+
pa as ADD_MASK,
|
3577
|
+
da as ADD_PLACEHOLDER,
|
3578
|
+
vt as ADD_PREFIX,
|
3579
|
+
ca as ADD_SUFFIX,
|
3555
3580
|
Yi as ADD_TEMPLATE,
|
3556
3581
|
Li as ADD_TEXT,
|
3557
|
-
|
3582
|
+
ha as ADD_TRANSITION,
|
3558
3583
|
$i as ADD_VIDEO,
|
3559
|
-
|
3560
|
-
|
3584
|
+
ba as DELETE_TEMPLATE_ITEM,
|
3585
|
+
Hi as DESIGN_LOAD,
|
3561
3586
|
En as DESIGN_PREFIX,
|
3562
3587
|
Ni as DESIGN_RESIZE,
|
3563
3588
|
Ki as EDIT_OBJECT,
|
3564
|
-
|
3565
|
-
|
3566
|
-
|
3567
|
-
|
3568
|
-
|
3589
|
+
oe as EDIT_PREFIX,
|
3590
|
+
ga as EDIT_SHAPE,
|
3591
|
+
Ia as EDIT_TEMPLATE_ITEM,
|
3592
|
+
ya as EDIT_TEXT,
|
3593
|
+
_a as ENTER_EDIT_MODE,
|
3569
3594
|
gr as HISTORY_PREFIX,
|
3570
|
-
|
3571
|
-
|
3572
|
-
|
3595
|
+
es as HISTORY_REDO,
|
3596
|
+
Fa as HISTORY_RESET,
|
3597
|
+
ts as HISTORY_UNDO,
|
3573
3598
|
Zi as LAYER_CLONE,
|
3574
|
-
|
3575
|
-
|
3599
|
+
Oa as LAYER_COPY,
|
3600
|
+
Ra as LAYER_CUT,
|
3576
3601
|
Qi as LAYER_DELETE,
|
3577
|
-
|
3578
|
-
|
3579
|
-
|
3580
|
-
|
3581
|
-
|
3582
|
-
|
3583
|
-
|
3584
|
-
|
3585
|
-
|
3586
|
-
|
3587
|
-
|
3602
|
+
Da as LAYER_EDITING_NAME,
|
3603
|
+
wa as LAYER_HIDDEN,
|
3604
|
+
ka as LAYER_LOCKED,
|
3605
|
+
Ta as LAYER_MOVE,
|
3606
|
+
Pa as LAYER_PASTE,
|
3607
|
+
ut as LAYER_PREFIX,
|
3608
|
+
xa as LAYER_RENAME,
|
3609
|
+
Ea as LAYER_SELECT,
|
3610
|
+
Ma as LAYER_SELECTION,
|
3611
|
+
Aa as LAYER_SEND_TO,
|
3612
|
+
Ca as LAYER_SPLIT,
|
3588
3613
|
Xi as REPLACE_MEDIA,
|
3589
|
-
|
3590
|
-
|
3591
|
-
|
3614
|
+
fa as STATE_CHANGED,
|
3615
|
+
zi as STATE_PREFIX,
|
3616
|
+
rs as TIMELINE_SCALE_CHANGED,
|
3592
3617
|
ri as TIMELINE_SCALE_PREFIX,
|
3593
|
-
|
3594
|
-
|
3595
|
-
|
3618
|
+
ua as TRACKS_CHANGED,
|
3619
|
+
la as TRACK_ITEMS_CHANGED,
|
3620
|
+
ji as TRACK_ITEMS_PREFIX,
|
3596
3621
|
Fi as TRACK_PREFIX,
|
3597
|
-
|
3622
|
+
ja as default
|
3598
3623
|
};
|