@designcombo/state 0.1.10 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +631 -600
- package/dist/index.umd.js +2 -2
- package/dist/state.d.ts +3 -0
- package/dist/utils/load-item.d.ts +5 -0
- package/package.json +15 -8
- package/src/index.ts +0 -1
package/dist/index.es.js
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
var si = Object.defineProperty;
|
2
2
|
var oi = (t, r, n) => r in t ? si(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
-
var
|
4
|
-
import { subject as $t, filter as Kt, DESIGN_PREFIX as ci, ADD_PREFIX as ui, LAYER_PREFIX as
|
5
|
-
var
|
6
|
-
return
|
3
|
+
var At = (t, r, n) => oi(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as $t, filter as Kt, DESIGN_PREFIX as ci, ADD_PREFIX as ui, LAYER_PREFIX as li, HISTORY_PREFIX as fi, ACTIVE_PREFIX as pi, EDIT_PREFIX as di, DESIGN_LOAD as hi, HISTORY_UNDO as yi, HISTORY_REDO as mi, LAYER_DELETE as bi, ADD_CAPTION as gi, ADD_TEXT as _i, ADD_IMAGE as vi, ADD_AUDIO as Ii, ADD_VIDEO as Si, ACTIVE_SPLIT as wi, ACTIVE_CLONE as Ti, ACTIVE_PASTE as ki, EDIT_OBJECT as Ai } from "@designcombo/events";
|
5
|
+
var an = function(t, r) {
|
6
|
+
return an = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
8
8
|
} || function(n, i) {
|
9
9
|
for (var o in i) Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o]);
|
10
|
-
},
|
10
|
+
}, an(t, r);
|
11
11
|
};
|
12
12
|
function be(t, r) {
|
13
13
|
if (typeof r != "function" && r !== null)
|
14
14
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
15
|
-
|
15
|
+
an(t, r);
|
16
16
|
function n() {
|
17
17
|
this.constructor = t;
|
18
18
|
}
|
19
19
|
t.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function sn(t) {
|
22
22
|
var r = typeof Symbol == "function" && Symbol.iterator, n = r && t[r], i = 0;
|
23
23
|
if (n) return n.call(t);
|
24
24
|
if (t && typeof t.length == "number") return {
|
@@ -28,24 +28,24 @@ function an(t) {
|
|
28
28
|
};
|
29
29
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function on(t, r) {
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!n) return t;
|
34
|
-
var i = n.call(t), o, c = [],
|
34
|
+
var i = n.call(t), o, c = [], f;
|
35
35
|
try {
|
36
36
|
for (; (r === void 0 || r-- > 0) && !(o = i.next()).done; ) c.push(o.value);
|
37
37
|
} catch (d) {
|
38
|
-
|
38
|
+
f = { error: d };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
41
|
o && !o.done && (n = i.return) && n.call(i);
|
42
42
|
} finally {
|
43
|
-
if (
|
43
|
+
if (f) throw f.error;
|
44
44
|
}
|
45
45
|
}
|
46
46
|
return c;
|
47
47
|
}
|
48
|
-
function
|
48
|
+
function cn(t, r, n) {
|
49
49
|
if (n || arguments.length === 2) for (var i = 0, o = r.length, c; i < o; 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));
|
@@ -68,7 +68,7 @@ var Zr = Gn(function(t) {
|
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
69
69
|
};
|
70
70
|
});
|
71
|
-
function
|
71
|
+
function un(t, r) {
|
72
72
|
if (t) {
|
73
73
|
var n = t.indexOf(r);
|
74
74
|
0 <= n && t.splice(n, 1);
|
@@ -82,16 +82,16 @@ var tr = function() {
|
|
82
82
|
var r, n, i, o, c;
|
83
83
|
if (!this.closed) {
|
84
84
|
this.closed = !0;
|
85
|
-
var
|
86
|
-
if (
|
87
|
-
if (this._parentage = null, Array.isArray(
|
85
|
+
var f = this._parentage;
|
86
|
+
if (f)
|
87
|
+
if (this._parentage = null, Array.isArray(f))
|
88
88
|
try {
|
89
|
-
for (var d =
|
90
|
-
var
|
91
|
-
|
89
|
+
for (var d = sn(f), E = d.next(); !E.done; E = d.next()) {
|
90
|
+
var R = E.value;
|
91
|
+
R.remove(this);
|
92
92
|
}
|
93
|
-
} catch (
|
94
|
-
r = { error:
|
93
|
+
} catch (l) {
|
94
|
+
r = { error: l };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
97
|
E && !E.done && (n = d.return) && n.call(d);
|
@@ -100,28 +100,28 @@ var tr = function() {
|
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
|
-
|
103
|
+
f.remove(this);
|
104
104
|
var S = this.initialTeardown;
|
105
105
|
if (yt(S))
|
106
106
|
try {
|
107
107
|
S();
|
108
|
-
} catch (
|
109
|
-
c =
|
108
|
+
} catch (l) {
|
109
|
+
c = l instanceof Zr ? l.errors : [l];
|
110
110
|
}
|
111
111
|
var N = this._finalizers;
|
112
112
|
if (N) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var y =
|
115
|
+
for (var y = sn(N), p = y.next(); !p.done; p = y.next()) {
|
116
116
|
var h = p.value;
|
117
117
|
try {
|
118
|
-
|
119
|
-
} catch (
|
120
|
-
c = c ?? [],
|
118
|
+
kn(h);
|
119
|
+
} catch (l) {
|
120
|
+
c = c ?? [], l instanceof Zr ? c = cn(cn([], on(c)), on(l.errors)) : c.push(l);
|
121
121
|
}
|
122
122
|
}
|
123
|
-
} catch (
|
124
|
-
i = { error:
|
123
|
+
} catch (l) {
|
124
|
+
i = { error: l };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
127
|
p && !p.done && (o = y.return) && o.call(y);
|
@@ -137,7 +137,7 @@ var tr = function() {
|
|
137
137
|
var n;
|
138
138
|
if (r && r !== this)
|
139
139
|
if (this.closed)
|
140
|
-
|
140
|
+
kn(r);
|
141
141
|
else {
|
142
142
|
if (r instanceof t) {
|
143
143
|
if (r.closed || r._hasParent(this))
|
@@ -154,10 +154,10 @@ var tr = function() {
|
|
154
154
|
this._parentage = Array.isArray(n) ? (n.push(r), n) : n ? [n, r] : r;
|
155
155
|
}, t.prototype._removeParent = function(r) {
|
156
156
|
var n = this._parentage;
|
157
|
-
n === r ? this._parentage = null : Array.isArray(n) &&
|
157
|
+
n === r ? this._parentage = null : Array.isArray(n) && un(n, r);
|
158
158
|
}, t.prototype.remove = function(r) {
|
159
159
|
var n = this._finalizers;
|
160
|
-
n &&
|
160
|
+
n && un(n, r), r instanceof t && r._removeParent(this);
|
161
161
|
}, t.EMPTY = function() {
|
162
162
|
var r = new t();
|
163
163
|
return r.closed = !0, r;
|
@@ -166,7 +166,7 @@ var tr = function() {
|
|
166
166
|
function Bn(t) {
|
167
167
|
return t instanceof tr || t && "closed" in t && yt(t.remove) && yt(t.add) && yt(t.unsubscribe);
|
168
168
|
}
|
169
|
-
function
|
169
|
+
function kn(t) {
|
170
170
|
yt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
172
|
var $n = {
|
@@ -179,7 +179,7 @@ var $n = {
|
|
179
179
|
setTimeout: function(t, r) {
|
180
180
|
for (var n = [], i = 2; i < arguments.length; i++)
|
181
181
|
n[i - 2] = arguments[i];
|
182
|
-
return setTimeout.apply(void 0,
|
182
|
+
return setTimeout.apply(void 0, cn([t, r], on(n)));
|
183
183
|
},
|
184
184
|
clearTimeout: function(t) {
|
185
185
|
var r = Kn.delegate;
|
@@ -187,7 +187,7 @@ var $n = {
|
|
187
187
|
},
|
188
188
|
delegate: void 0
|
189
189
|
};
|
190
|
-
function
|
190
|
+
function Ei(t) {
|
191
191
|
Kn.setTimeout(function() {
|
192
192
|
throw t;
|
193
193
|
});
|
@@ -204,7 +204,7 @@ var Yn = function(t) {
|
|
204
204
|
return i.isStopped = !1, n ? (i.destination = n, Bn(n) && n.add(i)) : i.destination = Pi, i;
|
205
205
|
}
|
206
206
|
return r.create = function(n, i, o) {
|
207
|
-
return new
|
207
|
+
return new ln(n, i, o);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -263,12 +263,12 @@ var xi = function() {
|
|
263
263
|
Ye(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
|
-
}(),
|
266
|
+
}(), ln = function(t) {
|
267
267
|
be(r, t);
|
268
268
|
function r(n, i, o) {
|
269
|
-
var c = t.call(this) || this,
|
269
|
+
var c = t.call(this) || this, f;
|
270
270
|
if (yt(n) || !n)
|
271
|
-
|
271
|
+
f = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
274
274
|
complete: o ?? void 0
|
@@ -277,18 +277,18 @@ var xi = function() {
|
|
277
277
|
var d;
|
278
278
|
c && $n.useDeprecatedNextContext ? (d = Object.create(n), d.unsubscribe = function() {
|
279
279
|
return c.unsubscribe();
|
280
|
-
},
|
280
|
+
}, f = {
|
281
281
|
next: n.next && Qr(n.next, d),
|
282
282
|
error: n.error && Qr(n.error, d),
|
283
283
|
complete: n.complete && Qr(n.complete, d)
|
284
|
-
}) :
|
284
|
+
}) : f = n;
|
285
285
|
}
|
286
|
-
return c.destination = new xi(
|
286
|
+
return c.destination = new xi(f), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
289
|
}(Yn);
|
290
290
|
function Ye(t) {
|
291
|
-
|
291
|
+
Ei(t);
|
292
292
|
}
|
293
293
|
function Mi(t) {
|
294
294
|
throw t;
|
@@ -319,9 +319,9 @@ var En = 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 o = this, c =
|
322
|
+
var o = this, c = Fi(r) ? r : new ln(r, n, i);
|
323
323
|
return Ve(function() {
|
324
|
-
var
|
324
|
+
var f = o, d = f.operator, E = f.source;
|
325
325
|
c.add(d ? d.call(c, E) : E ? o._subscribe(c) : o._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
@@ -332,19 +332,19 @@ var En = function() {
|
|
332
332
|
}
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
|
-
return n =
|
336
|
-
var
|
335
|
+
return n = On(n), new n(function(o, c) {
|
336
|
+
var f = new ln({
|
337
337
|
next: function(d) {
|
338
338
|
try {
|
339
339
|
r(d);
|
340
340
|
} catch (E) {
|
341
|
-
c(E),
|
341
|
+
c(E), f.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
345
345
|
complete: o
|
346
346
|
});
|
347
|
-
i.subscribe(
|
347
|
+
i.subscribe(f);
|
348
348
|
});
|
349
349
|
}, t.prototype._subscribe = function(r) {
|
350
350
|
var n;
|
@@ -357,12 +357,12 @@ var En = function() {
|
|
357
357
|
return ji(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
|
-
return r =
|
360
|
+
return r = On(r), new r(function(i, o) {
|
361
361
|
var c;
|
362
|
-
n.subscribe(function(
|
363
|
-
return c =
|
364
|
-
}, function(
|
365
|
-
return o(
|
362
|
+
n.subscribe(function(f) {
|
363
|
+
return c = f;
|
364
|
+
}, function(f) {
|
365
|
+
return o(f);
|
366
366
|
}, function() {
|
367
367
|
return i(c);
|
368
368
|
});
|
@@ -371,15 +371,15 @@ var En = function() {
|
|
371
371
|
return new t(r);
|
372
372
|
}, t;
|
373
373
|
}();
|
374
|
-
function
|
374
|
+
function On(t) {
|
375
375
|
var r;
|
376
376
|
return (r = t ?? $n.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
|
-
function
|
378
|
+
function Ri(t) {
|
379
379
|
return t && yt(t.next) && yt(t.error) && yt(t.complete);
|
380
380
|
}
|
381
|
-
function
|
382
|
-
return t && t instanceof Yn ||
|
381
|
+
function Fi(t) {
|
382
|
+
return t && t instanceof Yn || Ri(t) && Bn(t);
|
383
383
|
}
|
384
384
|
var zi = Gn(function(t) {
|
385
385
|
return function() {
|
@@ -392,7 +392,7 @@ var zi = Gn(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 xn(this, this);
|
396
396
|
return i.operator = n, i;
|
397
397
|
}, r.prototype._throwIfClosed = function() {
|
398
398
|
if (this.closed)
|
@@ -404,15 +404,15 @@ var zi = Gn(function(t) {
|
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
|
-
for (var
|
407
|
+
for (var f = sn(i.currentObservers), d = f.next(); !d.done; d = f.next()) {
|
408
408
|
var E = d.value;
|
409
409
|
E.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
o = { error:
|
411
|
+
} catch (R) {
|
412
|
+
o = { error: R };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
|
-
d && !d.done && (c =
|
415
|
+
d && !d.done && (c = f.return) && c.call(f);
|
416
416
|
} finally {
|
417
417
|
if (o) throw o.error;
|
418
418
|
}
|
@@ -451,20 +451,20 @@ var zi = Gn(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, o = this, c = o.hasError,
|
455
|
-
return c ||
|
456
|
-
i.currentObservers = null,
|
454
|
+
var i = this, o = this, c = o.hasError, f = o.isStopped, d = o.observers;
|
455
|
+
return c || f ? Wn : (this.currentObservers = null, d.push(n), new tr(function() {
|
456
|
+
i.currentObservers = null, un(d, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
|
-
var i = this, o = i.hasError, c = i.thrownError,
|
460
|
-
o ? n.error(c) :
|
459
|
+
var i = this, o = i.hasError, c = i.thrownError, f = i.isStopped;
|
460
|
+
o ? n.error(c) : f && n.complete();
|
461
461
|
}, r.prototype.asObservable = function() {
|
462
462
|
var n = new En();
|
463
463
|
return n.source = this, n;
|
464
464
|
}, r.create = function(n, i) {
|
465
|
-
return new
|
465
|
+
return new xn(n, i);
|
466
466
|
}, r;
|
467
|
-
}(En),
|
467
|
+
}(En), xn = function(t) {
|
468
468
|
be(r, t);
|
469
469
|
function r(n, i) {
|
470
470
|
var o = t.call(this) || this;
|
@@ -483,7 +483,7 @@ var zi = Gn(function(t) {
|
|
483
483
|
var i, o;
|
484
484
|
return (o = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && o !== void 0 ? o : Wn;
|
485
485
|
}, r;
|
486
|
-
}(Vn),
|
486
|
+
}(Vn), Mn = function(t) {
|
487
487
|
be(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
@@ -507,30 +507,30 @@ var zi = Gn(function(t) {
|
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
509
|
}(Vn), et = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
|
-
function
|
510
|
+
function gn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
513
|
var Xe = { exports: {} };
|
514
514
|
Xe.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2,
|
517
|
-
|
518
|
-
var we = typeof et == "object" && et && et.Object === Object && et,
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", E = "[object Array]", R = "[object AsyncFunction]", S = "[object Boolean]", N = "[object Date]", y = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", m = "[object Promise]", b = "[object Proxy]", x = "[object RegExp]", O = "[object Set]", A = "[object String]", C = "[object Symbol]", w = "[object Undefined]", T = "[object WeakMap]", M = "[object ArrayBuffer]", F = "[object DataView]", Dt = "[object Float32Array]", Ct = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, rt = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, H = {};
|
517
|
+
H[Dt] = H[Ct] = H[Ie] = H[ir] = H[ar] = H[sr] = H[or] = H[z] = H[cr] = !0, H[d] = H[E] = H[M] = H[S] = H[F] = H[N] = H[y] = H[p] = H[l] = H[g] = H[_] = H[x] = H[O] = H[A] = H[T] = !1;
|
518
|
+
var we = typeof et == "object" && et && et.Object === Object && et, lr = typeof self == "object" && self && self.Object === Object && self, nt = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ae = function() {
|
519
519
|
try {
|
520
520
|
return Vt && Vt.binding && Vt.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
|
-
}(), Xt =
|
524
|
-
function
|
525
|
-
for (var s = -1, u = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
a(
|
523
|
+
}(), Xt = Ae && Ae.isTypedArray;
|
524
|
+
function Ee(e, a) {
|
525
|
+
for (var s = -1, u = e == null ? 0 : e.length, k = 0, I = []; ++s < u; ) {
|
526
|
+
var D = e[s];
|
527
|
+
a(D, s, e) && (I[k++] = D);
|
528
528
|
}
|
529
529
|
return I;
|
530
530
|
}
|
531
531
|
function qt(e, a) {
|
532
|
-
for (var s = -1, u = a.length,
|
533
|
-
e[
|
532
|
+
for (var s = -1, u = a.length, k = e.length; ++s < u; )
|
533
|
+
e[k + s] = a[s];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function Oe(e, a) {
|
@@ -539,7 +539,7 @@ Xe.exports;
|
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function fr(e, a) {
|
543
543
|
for (var s = -1, u = Array(e); ++s < e; )
|
544
544
|
u[s] = a(s);
|
545
545
|
return u;
|
@@ -557,8 +557,8 @@ Xe.exports;
|
|
557
557
|
}
|
558
558
|
function xe(e) {
|
559
559
|
var a = -1, s = Array(e.size);
|
560
|
-
return e.forEach(function(u,
|
561
|
-
s[++a] = [
|
560
|
+
return e.forEach(function(u, k) {
|
561
|
+
s[++a] = [k, u];
|
562
562
|
}), s;
|
563
563
|
}
|
564
564
|
function Me(e, a) {
|
@@ -566,18 +566,18 @@ Xe.exports;
|
|
566
566
|
return e(a(s));
|
567
567
|
};
|
568
568
|
}
|
569
|
-
function
|
569
|
+
function ot(e) {
|
570
570
|
var a = -1, s = Array(e.size);
|
571
571
|
return e.forEach(function(u) {
|
572
572
|
s[++a] = u;
|
573
573
|
}), s;
|
574
574
|
}
|
575
|
-
var
|
576
|
-
var e = /[^.]+$/.exec(
|
575
|
+
var Rt = Array.prototype, dr = Function.prototype, _t = Object.prototype, Ft = nt["__core-js_shared__"], Zt = dr.toString, Q = _t.hasOwnProperty, Pe = function() {
|
576
|
+
var e = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
578
|
}(), De = _t.toString, hr = RegExp(
|
579
579
|
"^" + Zt.call(Q).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
-
), Qt = Yt ? nt.Buffer : void 0, zt = nt.Symbol, Ce = nt.Uint8Array, Ht = _t.propertyIsEnumerable, vt =
|
580
|
+
), Qt = Yt ? nt.Buffer : void 0, zt = nt.Symbol, Ce = nt.Uint8Array, Ht = _t.propertyIsEnumerable, vt = Rt.splice, it = zt ? zt.toStringTag : void 0, Nt = Object.getOwnPropertySymbols, te = Qt ? Qt.isBuffer : void 0, It = Me(Object.keys, Object), ee = pt(nt, "DataView"), St = pt(nt, "Map"), re = pt(nt, "Promise"), ne = pt(nt, "Set"), ie = pt(nt, "WeakMap"), mt = pt(Object, "create"), je = V(ee), ft = V(St), yr = V(re), mr = V(ne), br = V(ie), Re = zt ? zt.prototype : void 0, ae = Re ? Re.valueOf : void 0;
|
581
581
|
function W(e) {
|
582
582
|
var a = -1, s = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < s; ) {
|
@@ -626,18 +626,18 @@ Xe.exports;
|
|
626
626
|
var u = a.length - 1;
|
627
627
|
return s == u ? a.pop() : vt.call(a, s, 1), --this.size, !0;
|
628
628
|
}
|
629
|
-
function
|
629
|
+
function kr(e) {
|
630
630
|
var a = this.__data__, s = Gt(a, e);
|
631
631
|
return s < 0 ? void 0 : a[s][1];
|
632
632
|
}
|
633
|
-
function
|
633
|
+
function Ar(e) {
|
634
634
|
return Gt(this.__data__, e) > -1;
|
635
635
|
}
|
636
|
-
function
|
636
|
+
function Er(e, a) {
|
637
637
|
var s = this.__data__, u = Gt(s, e);
|
638
638
|
return u < 0 ? (++this.size, s.push([e, a])) : s[u][1] = a, this;
|
639
639
|
}
|
640
|
-
$.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get =
|
640
|
+
$.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = kr, $.prototype.has = Ar, $.prototype.set = Er;
|
641
641
|
function X(e) {
|
642
642
|
var a = -1, s = e == null ? 0 : e.length;
|
643
643
|
for (this.clear(); ++a < s; ) {
|
@@ -672,14 +672,14 @@ Xe.exports;
|
|
672
672
|
for (this.__data__ = new X(); ++a < s; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
|
-
function
|
675
|
+
function Fe(e) {
|
676
676
|
return this.__data__.set(e, i), this;
|
677
677
|
}
|
678
678
|
function Lt(e) {
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
|
-
Ut.prototype.add = Ut.prototype.push =
|
682
|
-
function
|
681
|
+
Ut.prototype.add = Ut.prototype.push = Fe, Ut.prototype.has = Lt;
|
682
|
+
function ct(e) {
|
683
683
|
var a = this.__data__ = new $(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
@@ -693,10 +693,10 @@ Xe.exports;
|
|
693
693
|
function jr(e) {
|
694
694
|
return this.__data__.get(e);
|
695
695
|
}
|
696
|
-
function
|
696
|
+
function Rr(e) {
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function Fr(e, a) {
|
700
700
|
var s = this.__data__;
|
701
701
|
if (s instanceof $) {
|
702
702
|
var u = s.__data__;
|
@@ -706,16 +706,16 @@ Xe.exports;
|
|
706
706
|
}
|
707
707
|
return s.set(e, a), this.size = s.size, this;
|
708
708
|
}
|
709
|
-
|
709
|
+
ct.prototype.clear = se, ct.prototype.delete = Cr, ct.prototype.get = jr, ct.prototype.has = Rr, ct.prototype.set = Fr;
|
710
710
|
function zr(e, a) {
|
711
|
-
var s = Wt(e), u = !s && Le(e),
|
712
|
-
for (var
|
713
|
-
Q.call(e,
|
714
|
-
(
|
715
|
-
|
716
|
-
I && (
|
717
|
-
$r(
|
718
|
-
return
|
711
|
+
var s = Wt(e), u = !s && Le(e), k = !s && !u && Bt(e), I = !s && !u && !k && Be(e), D = s || u || k || I, P = D ? fr(e.length, String) : [], U = P.length;
|
712
|
+
for (var j in e)
|
713
|
+
Q.call(e, j) && !(D && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(j == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
k && (j == "offset" || j == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
I && (j == "buffer" || j == "byteLength" || j == "byteOffset") || // Skip index properties.
|
717
|
+
$r(j, U))) && P.push(j);
|
718
|
+
return P;
|
719
719
|
}
|
720
720
|
function Gt(e, a) {
|
721
721
|
for (var s = e.length; s--; )
|
@@ -731,30 +731,30 @@ Xe.exports;
|
|
731
731
|
return e == null ? e === void 0 ? w : v : it && it in Object(e) ? dt(e) : Ne(e);
|
732
732
|
}
|
733
733
|
function ze(e) {
|
734
|
-
return
|
734
|
+
return lt(e) && wt(e) == d;
|
735
735
|
}
|
736
|
-
function He(e, a, s, u,
|
737
|
-
return e === a ? !0 : e == null || a == null || !
|
736
|
+
function He(e, a, s, u, k) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Hr(e, a, s, u, He, k);
|
738
738
|
}
|
739
|
-
function Hr(e, a, s, u,
|
740
|
-
var
|
741
|
-
U = U == d ? _ : U,
|
742
|
-
var K = U == _, q =
|
739
|
+
function Hr(e, a, s, u, k, I) {
|
740
|
+
var D = Wt(e), P = Wt(a), U = D ? E : ut(e), j = P ? E : ut(a);
|
741
|
+
U = U == d ? _ : U, j = j == d ? _ : j;
|
742
|
+
var K = U == _, q = j == _, L = U == j;
|
743
743
|
if (L && Bt(e)) {
|
744
744
|
if (!Bt(a))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
D = !0, K = !1;
|
747
747
|
}
|
748
748
|
if (L && !K)
|
749
|
-
return I || (I = new
|
749
|
+
return I || (I = new ct()), D || Be(e) ? ce(e, a, s, u, k, I) : Gr(e, a, U, s, u, k, I);
|
750
750
|
if (!(s & o)) {
|
751
751
|
var Y = K && Q.call(e, "__wrapped__"), B = q && Q.call(a, "__wrapped__");
|
752
752
|
if (Y || B) {
|
753
753
|
var bt = Y ? e.value() : e, ht = B ? a.value() : a;
|
754
|
-
return I || (I = new
|
754
|
+
return I || (I = new ct()), k(bt, ht, s, u, I);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return L ? (I || (I = new
|
757
|
+
return L ? (I || (I = new ct()), Wr(e, a, s, u, k, I)) : !1;
|
758
758
|
}
|
759
759
|
function Nr(e) {
|
760
760
|
if (!We(e) || Yr(e))
|
@@ -763,7 +763,7 @@ Xe.exports;
|
|
763
763
|
return a.test(V(e));
|
764
764
|
}
|
765
765
|
function Ur(e) {
|
766
|
-
return
|
766
|
+
return lt(e) && le(e.length) && !!H[wt(e)];
|
767
767
|
}
|
768
768
|
function Lr(e) {
|
769
769
|
if (!Vr(e))
|
@@ -773,18 +773,18 @@ Xe.exports;
|
|
773
773
|
Q.call(e, s) && s != "constructor" && a.push(s);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function ce(e, a, s, u,
|
777
|
-
var
|
778
|
-
if (
|
776
|
+
function ce(e, a, s, u, k, I) {
|
777
|
+
var D = s & o, P = e.length, U = a.length;
|
778
|
+
if (P != U && !(D && U > P))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
780
|
+
var j = I.get(e);
|
781
|
+
if (j && I.get(a))
|
782
|
+
return j == a;
|
783
783
|
var K = -1, q = !0, L = s & c ? new Ut() : void 0;
|
784
|
-
for (I.set(e, a), I.set(a, e); ++K <
|
784
|
+
for (I.set(e, a), I.set(a, e); ++K < P; ) {
|
785
785
|
var Y = e[K], B = a[K];
|
786
786
|
if (u)
|
787
|
-
var bt =
|
787
|
+
var bt = D ? u(B, Y, K, a, e, I) : u(Y, B, K, e, a, I);
|
788
788
|
if (bt !== void 0) {
|
789
789
|
if (bt)
|
790
790
|
continue;
|
@@ -792,27 +792,27 @@ Xe.exports;
|
|
792
792
|
break;
|
793
793
|
}
|
794
794
|
if (L) {
|
795
|
-
if (!Oe(a, function(ht,
|
796
|
-
if (!jt(L,
|
797
|
-
return L.push(
|
795
|
+
if (!Oe(a, function(ht, kt) {
|
796
|
+
if (!jt(L, kt) && (Y === ht || k(Y, ht, s, u, I)))
|
797
|
+
return L.push(kt);
|
798
798
|
})) {
|
799
799
|
q = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(Y === B ||
|
802
|
+
} else if (!(Y === B || k(Y, B, s, u, I))) {
|
803
803
|
q = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
807
|
return I.delete(e), I.delete(a), q;
|
808
808
|
}
|
809
|
-
function Gr(e, a, s, u,
|
809
|
+
function Gr(e, a, s, u, k, I, D) {
|
810
810
|
switch (s) {
|
811
811
|
case F:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
815
|
+
case M:
|
816
816
|
return !(e.byteLength != a.byteLength || !I(new Ce(e), new Ce(a)));
|
817
817
|
case S:
|
818
818
|
case N:
|
@@ -820,34 +820,34 @@ Xe.exports;
|
|
820
820
|
return Ue(+e, +a);
|
821
821
|
case y:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
824
|
-
case
|
823
|
+
case x:
|
824
|
+
case A:
|
825
825
|
return e == a + "";
|
826
|
-
case
|
827
|
-
var
|
826
|
+
case l:
|
827
|
+
var P = xe;
|
828
828
|
case O:
|
829
829
|
var U = u & o;
|
830
|
-
if (
|
830
|
+
if (P || (P = ot), e.size != a.size && !U)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
835
|
-
u |= c,
|
836
|
-
var K = ce(
|
837
|
-
return
|
838
|
-
case
|
832
|
+
var j = D.get(e);
|
833
|
+
if (j)
|
834
|
+
return j == a;
|
835
|
+
u |= c, D.set(e, a);
|
836
|
+
var K = ce(P(e), P(a), u, k, I, D);
|
837
|
+
return D.delete(e), K;
|
838
|
+
case C:
|
839
839
|
if (ae)
|
840
840
|
return ae.call(e) == ae.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Wr(e, a, s, u,
|
845
|
-
var
|
846
|
-
if (U != K && !
|
844
|
+
function Wr(e, a, s, u, k, I) {
|
845
|
+
var D = s & o, P = Tt(e), U = P.length, j = Tt(a), K = j.length;
|
846
|
+
if (U != K && !D)
|
847
847
|
return !1;
|
848
848
|
for (var q = U; q--; ) {
|
849
|
-
var L =
|
850
|
-
if (!(
|
849
|
+
var L = P[q];
|
850
|
+
if (!(D ? L in a : Q.call(a, L)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
853
|
var Y = I.get(e);
|
@@ -855,12 +855,12 @@ Xe.exports;
|
|
855
855
|
return Y == a;
|
856
856
|
var B = !0;
|
857
857
|
I.set(e, a), I.set(a, e);
|
858
|
-
for (var bt =
|
859
|
-
L =
|
860
|
-
var ht = e[L],
|
858
|
+
for (var bt = D; ++q < U; ) {
|
859
|
+
L = P[q];
|
860
|
+
var ht = e[L], kt = a[L];
|
861
861
|
if (u)
|
862
|
-
var
|
863
|
-
if (!(
|
862
|
+
var Tn = D ? u(kt, ht, L, a, e, I) : u(ht, kt, L, e, a, I);
|
863
|
+
if (!(Tn === void 0 ? ht === kt || k(ht, kt, s, u, I) : Tn)) {
|
864
864
|
B = !1;
|
865
865
|
break;
|
866
866
|
}
|
@@ -873,7 +873,7 @@ Xe.exports;
|
|
873
873
|
return I.delete(e), I.delete(a), B;
|
874
874
|
}
|
875
875
|
function Tt(e) {
|
876
|
-
return oe(e,
|
876
|
+
return oe(e, fe, Br);
|
877
877
|
}
|
878
878
|
function at(e, a) {
|
879
879
|
var s = e.__data__;
|
@@ -890,24 +890,24 @@ Xe.exports;
|
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return u && (a ? e[it] = s : delete e[it]),
|
893
|
+
var k = De.call(e);
|
894
|
+
return u && (a ? e[it] = s : delete e[it]), k;
|
895
895
|
}
|
896
896
|
var Br = Nt ? function(e) {
|
897
|
-
return e == null ? [] : (e = Object(e),
|
897
|
+
return e == null ? [] : (e = Object(e), Ee(Nt(e), function(a) {
|
898
898
|
return Ht.call(e, a);
|
899
899
|
}));
|
900
|
-
} : qr,
|
901
|
-
(ee &&
|
900
|
+
} : qr, ut = wt;
|
901
|
+
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != m || ne && ut(new ne()) != O || ie && ut(new ie()) != T) && (ut = function(e) {
|
902
902
|
var a = wt(e), s = a == _ ? e.constructor : void 0, u = s ? V(s) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
905
|
case je:
|
906
906
|
return F;
|
907
|
-
case
|
908
|
-
return
|
907
|
+
case ft:
|
908
|
+
return l;
|
909
909
|
case yr:
|
910
|
-
return
|
910
|
+
return m;
|
911
911
|
case mr:
|
912
912
|
return O;
|
913
913
|
case br:
|
@@ -916,7 +916,7 @@ Xe.exports;
|
|
916
916
|
return a;
|
917
917
|
});
|
918
918
|
function $r(e, a) {
|
919
|
-
return a = a ??
|
919
|
+
return a = a ?? f, !!a && (typeof e == "number" || Se.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
920
920
|
}
|
921
921
|
function Kr(e) {
|
922
922
|
var a = typeof e;
|
@@ -951,10 +951,10 @@ Xe.exports;
|
|
951
951
|
var Le = ze(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? ze : function(e) {
|
954
|
-
return
|
954
|
+
return lt(e) && Q.call(e, "callee") && !Ht.call(e, "callee");
|
955
955
|
}, Wt = Array.isArray;
|
956
956
|
function ue(e) {
|
957
|
-
return e != null &&
|
957
|
+
return e != null && le(e.length) && !Ge(e);
|
958
958
|
}
|
959
959
|
var Bt = te || Jr;
|
960
960
|
function Xr(e, a) {
|
@@ -964,20 +964,20 @@ Xe.exports;
|
|
964
964
|
if (!We(e))
|
965
965
|
return !1;
|
966
966
|
var a = wt(e);
|
967
|
-
return a == p || a == h || a ==
|
967
|
+
return a == p || a == h || a == R || a == b;
|
968
968
|
}
|
969
|
-
function
|
970
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
969
|
+
function le(e) {
|
970
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
971
971
|
}
|
972
972
|
function We(e) {
|
973
973
|
var a = typeof e;
|
974
974
|
return e != null && (a == "object" || a == "function");
|
975
975
|
}
|
976
|
-
function
|
976
|
+
function lt(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
979
|
var Be = Xt ? pr(Xt) : Ur;
|
980
|
-
function
|
980
|
+
function fe(e) {
|
981
981
|
return ue(e) ? zr(e) : Lr(e);
|
982
982
|
}
|
983
983
|
function qr() {
|
@@ -989,14 +989,14 @@ Xe.exports;
|
|
989
989
|
t.exports = Xr;
|
990
990
|
})(Xe, Xe.exports);
|
991
991
|
var Hi = Xe.exports;
|
992
|
-
const
|
992
|
+
const st = /* @__PURE__ */ gn(Hi);
|
993
993
|
var qe = { exports: {} };
|
994
994
|
qe.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]",
|
997
|
-
|
998
|
-
var cr = typeof et == "object" && et && et.Object === Object && et, ur = typeof self == "object" && self && self.Object === Object && self, rt = cr || ur || Function("return this")(), Se = r && !r.nodeType && r,
|
999
|
-
function
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", E = "[object Date]", R = "[object Error]", S = "[object Function]", N = "[object GeneratorFunction]", y = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", m = "[object Symbol]", b = "[object WeakMap]", x = "[object ArrayBuffer]", O = "[object DataView]", A = "[object Float32Array]", C = "[object Float64Array]", w = "[object Int8Array]", T = "[object Int16Array]", M = "[object Int32Array]", F = "[object Uint8Array]", Dt = "[object Uint8ClampedArray]", Ct = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
|
997
|
+
z[c] = z[f] = z[x] = z[O] = z[d] = z[E] = z[A] = z[C] = z[w] = z[T] = z[M] = z[y] = z[p] = z[h] = z[g] = z[v] = z[_] = z[m] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[R] = z[S] = z[b] = !1;
|
998
|
+
var cr = typeof et == "object" && et && et.Object === Object && et, ur = typeof self == "object" && self && self.Object === Object && self, rt = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, H = Se && !0 && t && !t.nodeType && t, we = H && H.exports === Se;
|
999
|
+
function lr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
1002
1002
|
function nt(e, a) {
|
@@ -1007,14 +1007,14 @@ qe.exports;
|
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
|
-
function
|
1011
|
-
for (var s = -1, u = a.length,
|
1012
|
-
e[
|
1010
|
+
function ke(e, a) {
|
1011
|
+
for (var s = -1, u = a.length, k = e.length; ++s < u; )
|
1012
|
+
e[k + s] = a[s];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
1015
|
function Yt(e, a, s, u) {
|
1016
|
-
for (var
|
1017
|
-
s = a(s, e[
|
1016
|
+
for (var k = -1, I = e ? e.length : 0; ++k < I; )
|
1017
|
+
s = a(s, e[k], k, e);
|
1018
1018
|
return s;
|
1019
1019
|
}
|
1020
1020
|
function Vt(e, a) {
|
@@ -1022,7 +1022,7 @@ qe.exports;
|
|
1022
1022
|
u[s] = a(s);
|
1023
1023
|
return u;
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function Ae(e, a) {
|
1026
1026
|
return e == null ? void 0 : e[a];
|
1027
1027
|
}
|
1028
1028
|
function Xt(e) {
|
@@ -1034,10 +1034,10 @@ qe.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function Ee(e) {
|
1038
1038
|
var a = -1, s = Array(e.size);
|
1039
|
-
return e.forEach(function(u,
|
1040
|
-
s[++a] = [
|
1039
|
+
return e.forEach(function(u, k) {
|
1040
|
+
s[++a] = [k, u];
|
1041
1041
|
}), s;
|
1042
1042
|
}
|
1043
1043
|
function qt(e, a) {
|
@@ -1051,13 +1051,13 @@ qe.exports;
|
|
1051
1051
|
s[++a] = u;
|
1052
1052
|
}), s;
|
1053
1053
|
}
|
1054
|
-
var
|
1054
|
+
var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = rt["__core-js_shared__"], xe = function() {
|
1055
1055
|
var e = /[^.]+$/.exec(Jt && Jt.keys && Jt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(), Me = pr.toString,
|
1058
|
-
"^" + Me.call(
|
1059
|
-
), _t = we ? rt.Buffer : void 0,
|
1060
|
-
function
|
1057
|
+
}(), Me = pr.toString, ot = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
|
1058
|
+
"^" + Me.call(ot).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), _t = we ? rt.Buffer : void 0, Ft = rt.Symbol, Zt = rt.Uint8Array, Q = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = _t ? _t.isBuffer : void 0, Ce = qt(Object.keys, Object), Ht = at(rt, "DataView"), vt = at(rt, "Map"), it = at(rt, "Promise"), Nt = at(rt, "Set"), te = at(rt, "WeakMap"), It = at(Object, "create"), ee = V(Ht), St = V(vt), re = V(it), ne = V(Nt), ie = V(te), mt = Ft ? Ft.prototype : void 0, je = mt ? mt.valueOf : void 0;
|
1060
|
+
function ft(e) {
|
1061
1061
|
var a = -1, s = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < s; ) {
|
1063
1063
|
var u = e[a];
|
@@ -1076,17 +1076,17 @@ qe.exports;
|
|
1076
1076
|
var s = a[e];
|
1077
1077
|
return s === i ? void 0 : s;
|
1078
1078
|
}
|
1079
|
-
return
|
1079
|
+
return ot.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
|
-
function
|
1081
|
+
function Re(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return It ? a[e] !== void 0 :
|
1083
|
+
return It ? a[e] !== void 0 : ot.call(a, e);
|
1084
1084
|
}
|
1085
1085
|
function ae(e, a) {
|
1086
1086
|
var s = this.__data__;
|
1087
1087
|
return s[e] = It && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
|
1089
|
+
ft.prototype.clear = yr, ft.prototype.delete = mr, ft.prototype.get = br, ft.prototype.has = Re, ft.prototype.set = ae;
|
1090
1090
|
function W(e) {
|
1091
1091
|
var a = -1, s = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++a < s; ) {
|
@@ -1125,24 +1125,24 @@ qe.exports;
|
|
1125
1125
|
}
|
1126
1126
|
function wr() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1128
|
+
hash: new ft(),
|
1129
1129
|
map: new (vt || W)(),
|
1130
|
-
string: new
|
1130
|
+
string: new ft()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Tr(e) {
|
1134
1134
|
return Tt(this, e).delete(e);
|
1135
1135
|
}
|
1136
|
-
function
|
1136
|
+
function kr(e) {
|
1137
1137
|
return Tt(this, e).get(e);
|
1138
1138
|
}
|
1139
|
-
function
|
1139
|
+
function Ar(e) {
|
1140
1140
|
return Tt(this, e).has(e);
|
1141
1141
|
}
|
1142
|
-
function
|
1142
|
+
function Er(e, a) {
|
1143
1143
|
return Tt(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
$.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get =
|
1145
|
+
$.prototype.clear = wr, $.prototype.delete = Tr, $.prototype.get = kr, $.prototype.has = Ar, $.prototype.set = Er;
|
1146
1146
|
function X(e) {
|
1147
1147
|
this.__data__ = new W(e);
|
1148
1148
|
}
|
@@ -1170,14 +1170,14 @@ qe.exports;
|
|
1170
1170
|
}
|
1171
1171
|
X.prototype.clear = Or, X.prototype.delete = xr, X.prototype.get = Mr, X.prototype.has = Pr, X.prototype.set = Dr;
|
1172
1172
|
function Ut(e, a) {
|
1173
|
-
var s = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = s.length,
|
1173
|
+
var s = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = s.length, k = !!u;
|
1174
1174
|
for (var I in e)
|
1175
|
-
|
1175
|
+
ot.call(e, I) && !(k && (I == "length" || Kr(I, u))) && s.push(I);
|
1176
1176
|
return s;
|
1177
1177
|
}
|
1178
|
-
function
|
1178
|
+
function Fe(e, a, s) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(
|
1180
|
+
(!(ot.call(e, a) && Le(u, s)) || s === void 0 && !(a in e)) && (e[a] = s);
|
1181
1181
|
}
|
1182
1182
|
function Lt(e, a) {
|
1183
1183
|
for (var s = e.length; s--; )
|
@@ -1185,58 +1185,58 @@ qe.exports;
|
|
1185
1185
|
return s;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1189
|
-
return e && ce(a,
|
1188
|
+
function ct(e, a) {
|
1189
|
+
return e && ce(a, fe(a), e);
|
1190
1190
|
}
|
1191
|
-
function se(e, a, s, u,
|
1192
|
-
var
|
1193
|
-
if (u && (
|
1194
|
-
return
|
1195
|
-
if (!
|
1191
|
+
function se(e, a, s, u, k, I, D) {
|
1192
|
+
var P;
|
1193
|
+
if (u && (P = I ? u(e, k, I, D) : u(e)), P !== void 0)
|
1194
|
+
return P;
|
1195
|
+
if (!lt(e))
|
1196
1196
|
return e;
|
1197
1197
|
var U = ue(e);
|
1198
1198
|
if (U) {
|
1199
|
-
if (
|
1200
|
-
return Lr(e,
|
1199
|
+
if (P = Br(e), !a)
|
1200
|
+
return Lr(e, P);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1202
|
+
var j = dt(e), K = j == S || j == N;
|
1203
1203
|
if (Ge(e))
|
1204
1204
|
return Gt(e, a);
|
1205
|
-
if (
|
1205
|
+
if (j == h || j == c || K && !I) {
|
1206
1206
|
if (Xt(e))
|
1207
1207
|
return I ? e : {};
|
1208
|
-
if (
|
1209
|
-
return Gr(e,
|
1208
|
+
if (P = ut(K ? {} : e), !a)
|
1209
|
+
return Gr(e, ct(P, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!
|
1211
|
+
if (!z[j])
|
1212
1212
|
return I ? e : {};
|
1213
|
-
|
1213
|
+
P = $r(e, j, se, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var q =
|
1216
|
+
D || (D = new X());
|
1217
|
+
var q = D.get(e);
|
1218
1218
|
if (q)
|
1219
1219
|
return q;
|
1220
|
-
if (
|
1221
|
-
var L = s ? Wr(e) :
|
1220
|
+
if (D.set(e, P), !U)
|
1221
|
+
var L = s ? Wr(e) : fe(e);
|
1222
1222
|
return Te(L || e, function(Y, B) {
|
1223
|
-
L && (B = Y, Y = e[B]),
|
1224
|
-
}),
|
1223
|
+
L && (B = Y, Y = e[B]), Fe(P, B, se(Y, a, s, u, B, e, D));
|
1224
|
+
}), P;
|
1225
1225
|
}
|
1226
1226
|
function Cr(e) {
|
1227
|
-
return
|
1227
|
+
return lt(e) ? Pe(e) : {};
|
1228
1228
|
}
|
1229
1229
|
function jr(e, a, s) {
|
1230
1230
|
var u = a(e);
|
1231
|
-
return ue(e) ? u :
|
1232
|
-
}
|
1233
|
-
function Fr(e) {
|
1234
|
-
return Ft.call(e);
|
1231
|
+
return ue(e) ? u : ke(u, s(e));
|
1235
1232
|
}
|
1236
1233
|
function Rr(e) {
|
1237
|
-
|
1234
|
+
return Rt.call(e);
|
1235
|
+
}
|
1236
|
+
function Fr(e) {
|
1237
|
+
if (!lt(e) || Vr(e))
|
1238
1238
|
return !1;
|
1239
|
-
var a =
|
1239
|
+
var a = le(e) || Xt(e) ? dr : sr;
|
1240
1240
|
return a.test(V(e));
|
1241
1241
|
}
|
1242
1242
|
function zr(e) {
|
@@ -1244,7 +1244,7 @@ qe.exports;
|
|
1244
1244
|
return Ce(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var s in Object(e))
|
1247
|
-
|
1247
|
+
ot.call(e, s) && s != "constructor" && a.push(s);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
1250
|
function Gt(e, a) {
|
@@ -1262,8 +1262,8 @@ qe.exports;
|
|
1262
1262
|
return new e.constructor(s, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
1264
|
function ze(e, a, s) {
|
1265
|
-
var u = a ? s(
|
1266
|
-
return Yt(u,
|
1265
|
+
var u = a ? s(Ee(e), !0) : Ee(e);
|
1266
|
+
return Yt(u, lr, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function He(e) {
|
1269
1269
|
var a = new e.constructor(e.source, ar.exec(e));
|
@@ -1288,9 +1288,9 @@ qe.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function ce(e, a, s, u) {
|
1290
1290
|
s || (s = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
|
1291
|
+
for (var k = -1, I = a.length; ++k < I; ) {
|
1292
|
+
var D = a[k], P = void 0;
|
1293
|
+
Fe(s, D, P === void 0 ? e[D] : P);
|
1294
1294
|
}
|
1295
1295
|
return s;
|
1296
1296
|
}
|
@@ -1298,19 +1298,19 @@ qe.exports;
|
|
1298
1298
|
return ce(e, pt(e), a);
|
1299
1299
|
}
|
1300
1300
|
function Wr(e) {
|
1301
|
-
return jr(e,
|
1301
|
+
return jr(e, fe, pt);
|
1302
1302
|
}
|
1303
1303
|
function Tt(e, a) {
|
1304
1304
|
var s = e.__data__;
|
1305
1305
|
return Yr(a) ? s[typeof a == "string" ? "string" : "hash"] : s.map;
|
1306
1306
|
}
|
1307
1307
|
function at(e, a) {
|
1308
|
-
var s =
|
1309
|
-
return
|
1308
|
+
var s = Ae(e, a);
|
1309
|
+
return Fr(s) ? s : void 0;
|
1310
1310
|
}
|
1311
|
-
var pt = Qt ? qt(Qt, Object) : qr, dt =
|
1312
|
-
(Ht && dt(new Ht(new ArrayBuffer(1))) != O || vt && dt(new vt()) != y || it && dt(it.resolve()) !=
|
1313
|
-
var a =
|
1311
|
+
var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
|
1312
|
+
(Ht && dt(new Ht(new ArrayBuffer(1))) != O || vt && dt(new vt()) != y || it && dt(it.resolve()) != l || Nt && dt(new Nt()) != v || te && dt(new te()) != b) && (dt = function(e) {
|
1313
|
+
var a = Rt.call(e), s = a == h ? e.constructor : void 0, u = s ? V(s) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
1316
|
case ee:
|
@@ -1318,36 +1318,36 @@ qe.exports;
|
|
1318
1318
|
case St:
|
1319
1319
|
return y;
|
1320
1320
|
case re:
|
1321
|
-
return
|
1321
|
+
return l;
|
1322
1322
|
case ne:
|
1323
1323
|
return v;
|
1324
1324
|
case ie:
|
1325
|
-
return
|
1325
|
+
return b;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
1329
1329
|
function Br(e) {
|
1330
1330
|
var a = e.length, s = e.constructor(a);
|
1331
|
-
return a && typeof e[0] == "string" &&
|
1331
|
+
return a && typeof e[0] == "string" && ot.call(e, "index") && (s.index = e.index, s.input = e.input), s;
|
1332
1332
|
}
|
1333
|
-
function
|
1333
|
+
function ut(e) {
|
1334
1334
|
return typeof e.constructor == "function" && !Ne(e) ? Cr(Q(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function $r(e, a, s, u) {
|
1337
|
-
var
|
1337
|
+
var k = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1339
|
+
case x:
|
1340
1340
|
return oe(e);
|
1341
1341
|
case d:
|
1342
1342
|
case E:
|
1343
|
-
return new
|
1343
|
+
return new k(+e);
|
1344
1344
|
case O:
|
1345
1345
|
return wt(e, u);
|
1346
|
-
case
|
1347
|
-
case
|
1346
|
+
case A:
|
1347
|
+
case C:
|
1348
1348
|
case w:
|
1349
1349
|
case T:
|
1350
|
-
case
|
1350
|
+
case M:
|
1351
1351
|
case F:
|
1352
1352
|
case Dt:
|
1353
1353
|
case Ct:
|
@@ -1357,12 +1357,12 @@ qe.exports;
|
|
1357
1357
|
return ze(e, u, s);
|
1358
1358
|
case p:
|
1359
1359
|
case _:
|
1360
|
-
return new
|
1360
|
+
return new k(e);
|
1361
1361
|
case g:
|
1362
1362
|
return He(e);
|
1363
1363
|
case v:
|
1364
1364
|
return Hr(e, u, s);
|
1365
|
-
case
|
1365
|
+
case m:
|
1366
1366
|
return Nr(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
@@ -1400,31 +1400,31 @@ qe.exports;
|
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
1402
|
function Wt(e) {
|
1403
|
-
return Xr(e) &&
|
1403
|
+
return Xr(e) && ot.call(e, "callee") && (!De.call(e, "callee") || Rt.call(e) == c);
|
1404
1404
|
}
|
1405
1405
|
var ue = Array.isArray;
|
1406
1406
|
function Bt(e) {
|
1407
|
-
return e != null && We(e.length) && !
|
1407
|
+
return e != null && We(e.length) && !le(e);
|
1408
1408
|
}
|
1409
1409
|
function Xr(e) {
|
1410
1410
|
return Be(e) && Bt(e);
|
1411
1411
|
}
|
1412
1412
|
var Ge = zt || Jr;
|
1413
|
-
function
|
1414
|
-
var a =
|
1413
|
+
function le(e) {
|
1414
|
+
var a = lt(e) ? Rt.call(e) : "";
|
1415
1415
|
return a == S || a == N;
|
1416
1416
|
}
|
1417
1417
|
function We(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= o;
|
1419
1419
|
}
|
1420
|
-
function
|
1420
|
+
function lt(e) {
|
1421
1421
|
var a = typeof e;
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
1423
1423
|
}
|
1424
1424
|
function Be(e) {
|
1425
1425
|
return !!e && typeof e == "object";
|
1426
1426
|
}
|
1427
|
-
function
|
1427
|
+
function fe(e) {
|
1428
1428
|
return Bt(e) ? Ut(e) : zr(e);
|
1429
1429
|
}
|
1430
1430
|
function qr() {
|
@@ -1436,7 +1436,7 @@ qe.exports;
|
|
1436
1436
|
t.exports = Ue;
|
1437
1437
|
})(qe, qe.exports);
|
1438
1438
|
var Ni = qe.exports;
|
1439
|
-
const tt = /* @__PURE__ */
|
1439
|
+
const tt = /* @__PURE__ */ gn(Ni), Ui = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
1442
|
const o = i.width, c = i.height;
|
@@ -1455,8 +1455,8 @@ const tt = /* @__PURE__ */ bn(Ni), Ui = (t) => new Promise((r, n) => {
|
|
1455
1455
|
}), Gi = (t) => new Promise((r, n) => {
|
1456
1456
|
const i = document.createElement("video");
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1458
|
-
const o = i.duration * 1e3, c = i.videoWidth,
|
1459
|
-
r({ duration: o, width: c, height:
|
1458
|
+
const o = i.duration * 1e3, c = i.videoWidth, f = i.videoHeight;
|
1459
|
+
r({ duration: o, width: c, height: f });
|
1460
1460
|
}), i.addEventListener("error", (o) => {
|
1461
1461
|
n(o);
|
1462
1462
|
}), i.src = t, i.load();
|
@@ -1533,7 +1533,7 @@ function rr(t, r) {
|
|
1533
1533
|
const Wi = async (t, r) => {
|
1534
1534
|
const n = t.details.src, i = await Gi(n), o = rr(r, {
|
1535
1535
|
...i
|
1536
|
-
}), c = qn(t.trim, { duration: i.duration }),
|
1536
|
+
}), c = qn(t.trim, { duration: i.duration }), f = {
|
1537
1537
|
width: i.width,
|
1538
1538
|
height: i.height,
|
1539
1539
|
duration: i.duration,
|
@@ -1564,7 +1564,8 @@ const Wi = async (t, r) => {
|
|
1564
1564
|
trim: c,
|
1565
1565
|
type: "video",
|
1566
1566
|
name: "video",
|
1567
|
-
details:
|
1567
|
+
details: f,
|
1568
|
+
playbackRate: t.playbackRate || 1,
|
1568
1569
|
display: ge(t.display, { duration: i.duration, trim: c })
|
1569
1570
|
};
|
1570
1571
|
}, Bi = async (t) => {
|
@@ -1575,6 +1576,7 @@ const Wi = async (t, r) => {
|
|
1575
1576
|
type: "audio",
|
1576
1577
|
display: ge(t.display, { duration: o, trim: c }),
|
1577
1578
|
trim: c,
|
1579
|
+
playbackRate: t.playbackRate || 1,
|
1578
1580
|
details: {
|
1579
1581
|
src: n.src,
|
1580
1582
|
duration: o,
|
@@ -1590,6 +1592,7 @@ const Wi = async (t, r) => {
|
|
1590
1592
|
type: "image",
|
1591
1593
|
name: "image",
|
1592
1594
|
display: ge(t.display),
|
1595
|
+
playbackRate: t.playbackRate || 1,
|
1593
1596
|
details: {
|
1594
1597
|
src: n.src || "",
|
1595
1598
|
// Default source URL
|
@@ -1629,7 +1632,7 @@ const Wi = async (t, r) => {
|
|
1629
1632
|
url: t.details.fontUrl
|
1630
1633
|
}
|
1631
1634
|
]);
|
1632
|
-
const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o),
|
1635
|
+
const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o), f = rr(r, {
|
1633
1636
|
width: o.width,
|
1634
1637
|
height: c
|
1635
1638
|
});
|
@@ -1638,6 +1641,7 @@ const Wi = async (t, r) => {
|
|
1638
1641
|
name: "caption",
|
1639
1642
|
type: "caption",
|
1640
1643
|
display: ge(t.display),
|
1644
|
+
playbackRate: t.playbackRate || 1,
|
1641
1645
|
details: {
|
1642
1646
|
...o,
|
1643
1647
|
text: i.text || "",
|
@@ -1645,8 +1649,8 @@ const Wi = async (t, r) => {
|
|
1645
1649
|
height: c,
|
1646
1650
|
// Default height
|
1647
1651
|
fontUrl: i.fontUrl,
|
1648
|
-
top:
|
1649
|
-
left:
|
1652
|
+
top: f.top,
|
1653
|
+
left: f.left,
|
1650
1654
|
borderWidth: i.borderWidth || 0,
|
1651
1655
|
borderColor: i.borderColor || "#000000",
|
1652
1656
|
boxShadow: i.boxShadow || er
|
@@ -1660,7 +1664,7 @@ const Wi = async (t, r) => {
|
|
1660
1664
|
url: t.details.fontUrl
|
1661
1665
|
}
|
1662
1666
|
]);
|
1663
|
-
const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o),
|
1667
|
+
const n = t.id, i = t.details, o = Jn(i), c = Xn(t.details.text, o), f = rr(r, {
|
1664
1668
|
width: o.width,
|
1665
1669
|
height: c
|
1666
1670
|
});
|
@@ -1669,6 +1673,7 @@ const Wi = async (t, r) => {
|
|
1669
1673
|
name: "text",
|
1670
1674
|
type: "text",
|
1671
1675
|
display: ge(t.display),
|
1676
|
+
playbackRate: t.playbackRate || 1,
|
1672
1677
|
details: {
|
1673
1678
|
...o,
|
1674
1679
|
text: i.text || "",
|
@@ -1676,8 +1681,8 @@ const Wi = async (t, r) => {
|
|
1676
1681
|
height: c,
|
1677
1682
|
// Default height
|
1678
1683
|
fontUrl: i.fontUrl,
|
1679
|
-
top:
|
1680
|
-
left:
|
1684
|
+
top: f.top,
|
1685
|
+
left: f.left,
|
1681
1686
|
borderWidth: i.borderWidth || 0,
|
1682
1687
|
borderColor: i.borderColor || "#000000",
|
1683
1688
|
boxShadow: i.boxShadow || er
|
@@ -1738,12 +1743,12 @@ function Xi(t, r) {
|
|
1738
1743
|
items: i.items.filter((o) => !r.includes(o))
|
1739
1744
|
})).filter((i) => !i.items.length);
|
1740
1745
|
}
|
1741
|
-
function
|
1746
|
+
function Pn(t = 16) {
|
1742
1747
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
1743
1748
|
let i = fn(t - 1);
|
1744
1749
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1745
1750
|
}
|
1746
|
-
const
|
1751
|
+
const tn = (t) => Object.keys(t).reduce((r, n) => {
|
1747
1752
|
const { display: i } = t[n];
|
1748
1753
|
return Math.max(r, i.to);
|
1749
1754
|
}, 0);
|
@@ -1753,145 +1758,145 @@ function qi(t) {
|
|
1753
1758
|
), n = $t.pipe(
|
1754
1759
|
Kt(({ key: p }) => p.startsWith(ui))
|
1755
1760
|
), i = $t.pipe(
|
1756
|
-
Kt(({ key: p }) => p.startsWith(fi))
|
1757
|
-
), o = $t.pipe(
|
1758
1761
|
Kt(({ key: p }) => p.startsWith(li))
|
1762
|
+
), o = $t.pipe(
|
1763
|
+
Kt(({ key: p }) => p.startsWith(fi))
|
1759
1764
|
), c = $t.pipe(
|
1760
1765
|
Kt(({ key: p }) => p.startsWith(pi))
|
1761
|
-
),
|
1766
|
+
), f = $t.pipe(
|
1762
1767
|
Kt(({ key: p }) => p.startsWith(di))
|
1763
1768
|
), d = r.subscribe(async (p) => {
|
1764
1769
|
var h;
|
1765
1770
|
if (p.key === hi) {
|
1766
|
-
const
|
1767
|
-
const
|
1768
|
-
return (
|
1771
|
+
const l = (h = p.value) == null ? void 0 : h.payload, g = l.trackItemIds, v = l.trackItemDetailsMap, _ = g.map(async (m) => {
|
1772
|
+
const b = v[m];
|
1773
|
+
return (b.type === "caption" || b.type === "text") && await Je([
|
1769
1774
|
{
|
1770
|
-
fontFamily:
|
1771
|
-
url:
|
1775
|
+
fontFamily: b.details.fontFamily,
|
1776
|
+
url: b.details.fontUrl
|
1772
1777
|
}
|
1773
1778
|
]), !0;
|
1774
1779
|
});
|
1775
1780
|
await Promise.all(_), t.updateState({
|
1776
|
-
...
|
1781
|
+
...l
|
1777
1782
|
});
|
1778
1783
|
}
|
1779
1784
|
}), E = o.subscribe((p) => {
|
1780
1785
|
if (p.key === yi) return t.undo();
|
1781
1786
|
if (p.key === mi) return t.redo();
|
1782
|
-
}),
|
1783
|
-
var
|
1787
|
+
}), R = i.subscribe((p) => {
|
1788
|
+
var l, g, v;
|
1784
1789
|
const h = [];
|
1785
|
-
if ((
|
1786
|
-
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds,
|
1787
|
-
(F) => !
|
1788
|
-
),
|
1790
|
+
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((g = p.value) == null ? void 0 : g.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === bi) {
|
1791
|
+
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, m = tt(t.getState()), b = _ && _.length ? _ : m.activeIds, x = m.trackItemIds, O = m.trackItemDetailsMap, A = x.filter(
|
1792
|
+
(F) => !b.includes(F)
|
1793
|
+
), C = Object.fromEntries(
|
1789
1794
|
Object.entries(O).filter(
|
1790
|
-
([F]) => !
|
1795
|
+
([F]) => !b.includes(F)
|
1791
1796
|
)
|
1792
1797
|
), w = Xi(
|
1793
|
-
|
1794
|
-
|
1798
|
+
m.tracks,
|
1799
|
+
b
|
1795
1800
|
), T = Object.fromEntries(
|
1796
|
-
Object.entries(
|
1797
|
-
([F]) => !
|
1801
|
+
Object.entries(m.trackItemsMap).filter(
|
1802
|
+
([F]) => !b.includes(F)
|
1798
1803
|
)
|
1799
|
-
),
|
1804
|
+
), M = tn(m.trackItemsMap);
|
1800
1805
|
t.updateState(
|
1801
1806
|
{
|
1802
|
-
trackItemIds:
|
1803
|
-
trackItemDetailsMap:
|
1807
|
+
trackItemIds: A,
|
1808
|
+
trackItemDetailsMap: C,
|
1804
1809
|
activeIds: [],
|
1805
1810
|
trackItemsMap: T,
|
1806
1811
|
tracks: w,
|
1807
|
-
duration:
|
1812
|
+
duration: M
|
1808
1813
|
},
|
1809
1814
|
{ updateHistory: !0, kind: "remove" }
|
1810
1815
|
);
|
1811
1816
|
}
|
1812
1817
|
}), S = n.subscribe(async (p) => {
|
1813
|
-
var _,
|
1818
|
+
var _, m, b, x, O;
|
1814
1819
|
const h = tt(t.getState());
|
1815
|
-
let
|
1820
|
+
let l = [], g = "text";
|
1816
1821
|
if (p.key === gi) {
|
1817
|
-
const
|
1818
|
-
for (const
|
1819
|
-
const F = Ki(
|
1822
|
+
const A = (_ = p.value) == null ? void 0 : _.payload, C = [];
|
1823
|
+
for (const M of A) {
|
1824
|
+
const F = Ki(M, {
|
1820
1825
|
size: {
|
1821
1826
|
width: 1080,
|
1822
1827
|
height: 1920
|
1823
1828
|
}
|
1824
1829
|
});
|
1825
|
-
|
1830
|
+
C.push(F);
|
1826
1831
|
}
|
1827
|
-
const w = await Promise.all(
|
1828
|
-
for (const
|
1829
|
-
const F =
|
1832
|
+
const w = await Promise.all(C), T = [];
|
1833
|
+
for (const M of w) {
|
1834
|
+
const F = M.id;
|
1830
1835
|
T.push(F);
|
1831
|
-
const { details: Dt, ...Ct } =
|
1836
|
+
const { details: Dt, ...Ct } = M;
|
1832
1837
|
h.trackItemDetailsMap[F] = {
|
1833
1838
|
type: g,
|
1834
1839
|
details: Dt
|
1835
1840
|
}, h.trackItemsMap[F] = Ct, h.trackItemIds.push(F);
|
1836
1841
|
}
|
1837
|
-
|
1842
|
+
l = T;
|
1838
1843
|
}
|
1839
1844
|
if (p.key === _i) {
|
1840
1845
|
g = "text";
|
1841
|
-
const
|
1846
|
+
const A = await Yi((m = p.value) == null ? void 0 : m.payload, {
|
1842
1847
|
size: {
|
1843
1848
|
width: 1080,
|
1844
1849
|
height: 1920
|
1845
1850
|
}
|
1846
|
-
}), { details:
|
1851
|
+
}), { details: C, ...w } = A;
|
1847
1852
|
h.trackItemDetailsMap[w.id] = {
|
1848
1853
|
type: g,
|
1849
|
-
details:
|
1850
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
1854
|
+
details: C
|
1855
|
+
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1851
1856
|
}
|
1852
1857
|
if (p.key === vi) {
|
1853
1858
|
g = "image";
|
1854
|
-
const
|
1859
|
+
const A = await $i((b = p.value) == null ? void 0 : b.payload, {
|
1855
1860
|
size: {
|
1856
1861
|
width: 1080,
|
1857
1862
|
height: 1920
|
1858
1863
|
}
|
1859
|
-
}), { details:
|
1864
|
+
}), { details: C, ...w } = A;
|
1860
1865
|
h.trackItemDetailsMap[w.id] = {
|
1861
1866
|
type: g,
|
1862
|
-
details:
|
1863
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
1867
|
+
details: C
|
1868
|
+
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1864
1869
|
}
|
1865
1870
|
if (p.key === Ii) {
|
1866
1871
|
g = "audio";
|
1867
|
-
const
|
1872
|
+
const A = await Bi((x = p.value) == null ? void 0 : x.payload), { details: C, ...w } = A;
|
1868
1873
|
h.trackItemDetailsMap[w.id] = {
|
1869
1874
|
type: g,
|
1870
|
-
details:
|
1871
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
1875
|
+
details: C
|
1876
|
+
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1872
1877
|
}
|
1873
1878
|
if (p.key === Si) {
|
1874
1879
|
g = "video";
|
1875
|
-
const
|
1880
|
+
const A = await Wi((O = p.value) == null ? void 0 : O.payload, {
|
1876
1881
|
size: {
|
1877
1882
|
width: 1080,
|
1878
1883
|
height: 1920
|
1879
1884
|
}
|
1880
|
-
}), { details:
|
1885
|
+
}), { details: C, ...w } = A;
|
1881
1886
|
h.trackItemDetailsMap[w.id] = {
|
1882
1887
|
type: g,
|
1883
|
-
details:
|
1884
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
1888
|
+
details: C
|
1889
|
+
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id), l = [w.id];
|
1885
1890
|
}
|
1886
1891
|
h.tracks.unshift({
|
1887
1892
|
id: fn(),
|
1888
1893
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1889
1894
|
type: g,
|
1890
|
-
items:
|
1895
|
+
items: l,
|
1891
1896
|
magnetic: !1,
|
1892
1897
|
static: !1
|
1893
1898
|
});
|
1894
|
-
const v =
|
1899
|
+
const v = tn(h.trackItemsMap);
|
1895
1900
|
t.updateState(
|
1896
1901
|
{
|
1897
1902
|
trackItemIds: h.trackItemIds,
|
@@ -1908,27 +1913,31 @@ function qi(t) {
|
|
1908
1913
|
}), N = c.subscribe(async (p) => {
|
1909
1914
|
var h;
|
1910
1915
|
if (p.key === wi) {
|
1911
|
-
const
|
1912
|
-
if (
|
1913
|
-
const v =
|
1916
|
+
const l = tt(t.getState()), g = (h = p.value) == null ? void 0 : h.options.time;
|
1917
|
+
if (l.activeIds.length === 1) {
|
1918
|
+
const v = l.activeIds[0], _ = l.trackItemsMap[v];
|
1914
1919
|
if (g >= _.display.to || g <= _.display.from)
|
1915
1920
|
return;
|
1916
|
-
const
|
1921
|
+
const m = l.trackItemDetailsMap[v], b = Pn(), x = {
|
1917
1922
|
..._,
|
1918
|
-
id:
|
1923
|
+
id: b,
|
1919
1924
|
display: {
|
1920
1925
|
from: g,
|
1921
1926
|
to: _.display.to
|
1927
|
+
},
|
1928
|
+
trim: {
|
1929
|
+
from: g,
|
1930
|
+
to: _.display.to
|
1922
1931
|
}
|
1923
1932
|
};
|
1924
|
-
|
1925
|
-
O.items.includes(v) && O.items.push(
|
1933
|
+
l.trackItemsMap[v].display.to = g, l.trackItemsMap[b] = x, l.trackItemIds.push(b), l.trackItemDetailsMap[b] = m, l.tracks.forEach((O) => {
|
1934
|
+
O.items.includes(v) && O.items.push(b);
|
1926
1935
|
}), t.updateState(
|
1927
1936
|
{
|
1928
|
-
trackItemDetailsMap:
|
1929
|
-
tracks:
|
1930
|
-
trackItemIds:
|
1931
|
-
trackItemsMap:
|
1937
|
+
trackItemDetailsMap: l.trackItemDetailsMap,
|
1938
|
+
tracks: l.tracks,
|
1939
|
+
trackItemIds: l.trackItemIds,
|
1940
|
+
trackItemsMap: l.trackItemsMap
|
1932
1941
|
},
|
1933
1942
|
{
|
1934
1943
|
updateHistory: !0,
|
@@ -1939,43 +1948,43 @@ function qi(t) {
|
|
1939
1948
|
return;
|
1940
1949
|
}
|
1941
1950
|
if (p.key === Ti) {
|
1942
|
-
const
|
1943
|
-
if (
|
1944
|
-
const g =
|
1951
|
+
const l = tt(t.getState());
|
1952
|
+
if (l.activeIds.length) {
|
1953
|
+
const g = l.activeIds, v = [], _ = {
|
1945
1954
|
activeIds: g,
|
1946
1955
|
trackItemDetailsMap: {},
|
1947
1956
|
trackItemsMap: {},
|
1948
1957
|
tracks: []
|
1949
1958
|
};
|
1950
|
-
g.forEach((
|
1951
|
-
_.trackItemDetailsMap[
|
1952
|
-
|
1959
|
+
g.forEach((b) => {
|
1960
|
+
_.trackItemDetailsMap[b] = l.trackItemDetailsMap[b], _.trackItemsMap[b] = l.trackItemsMap[b], v.push(
|
1961
|
+
l.tracks.find((x) => x.items.includes(b))
|
1953
1962
|
);
|
1954
1963
|
});
|
1955
|
-
const
|
1956
|
-
v.filter((
|
1964
|
+
const m = /* @__PURE__ */ new Set();
|
1965
|
+
v.filter((b) => m.has(b.id) ? !1 : (m.add(b), !0)), _.tracks = Array.from(m.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
1957
1966
|
}
|
1958
1967
|
}
|
1959
|
-
if (p.key ===
|
1960
|
-
const
|
1961
|
-
if (!
|
1962
|
-
const g = tt(t.getState()), v = JSON.parse(
|
1963
|
-
const w =
|
1968
|
+
if (p.key === ki) {
|
1969
|
+
const l = localStorage.getItem("DesignComboTemp");
|
1970
|
+
if (!l) return;
|
1971
|
+
const g = tt(t.getState()), v = JSON.parse(l), _ = {}, m = v.trackItemsMap, b = v.trackItemDetailsMap, x = v.tracks, O = [], A = v.activeIds.map(async (C) => {
|
1972
|
+
const w = b[C];
|
1964
1973
|
(w.type === "caption" || w.type === "text") && await Je([
|
1965
1974
|
{
|
1966
1975
|
fontFamily: w.details.fontFamily,
|
1967
1976
|
url: w.details.fontUrl
|
1968
1977
|
}
|
1969
1978
|
]);
|
1970
|
-
const T =
|
1971
|
-
return _[
|
1972
|
-
...
|
1979
|
+
const T = Pn();
|
1980
|
+
return _[C] = T, g.trackItemsMap[T] = {
|
1981
|
+
...m[C],
|
1973
1982
|
id: T
|
1974
1983
|
}, g.trackItemDetailsMap[T] = w, g.trackItemIds.push(T), !0;
|
1975
1984
|
});
|
1976
|
-
await Promise.all(
|
1977
|
-
const w =
|
1978
|
-
...
|
1985
|
+
await Promise.all(A), x.forEach((C) => {
|
1986
|
+
const w = C.items.map((M) => _[M]), T = {
|
1987
|
+
...C,
|
1979
1988
|
items: w,
|
1980
1989
|
id: fn()
|
1981
1990
|
};
|
@@ -1993,31 +2002,48 @@ function qi(t) {
|
|
1993
2002
|
}
|
1994
2003
|
);
|
1995
2004
|
}
|
1996
|
-
}), y =
|
1997
|
-
var h,
|
1998
|
-
if (p.key ===
|
1999
|
-
const g = t.getState(), v =
|
2000
|
-
if (!
|
2001
|
-
const b = (
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2005
|
+
}), y = f.subscribe((p) => {
|
2006
|
+
var h, l;
|
2007
|
+
if (p.key === Ai) {
|
2008
|
+
const g = tt(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, m = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2009
|
+
if (!m.length) return;
|
2010
|
+
const b = (l = p.value) == null ? void 0 : l.payload;
|
2011
|
+
if (m.length === 1) {
|
2012
|
+
const x = m[0], O = b[x];
|
2013
|
+
if (!O.playbackRate) return;
|
2014
|
+
_[x].playbackRate = O.playbackRate;
|
2015
|
+
const A = tn(_);
|
2016
|
+
t.updateState(
|
2017
|
+
{
|
2018
|
+
trackItemsMap: { ..._ },
|
2019
|
+
duration: A
|
2020
|
+
},
|
2021
|
+
{
|
2022
|
+
updateHistory: !0,
|
2023
|
+
kind: "update:details"
|
2024
|
+
}
|
2025
|
+
);
|
2026
|
+
} else
|
2027
|
+
m.forEach((x) => {
|
2028
|
+
b[x].details && (v[x].details = {
|
2029
|
+
...v[x].details,
|
2030
|
+
...b[x].details
|
2031
|
+
});
|
2032
|
+
}), t.updateState(
|
2033
|
+
{
|
2034
|
+
trackItemDetailsMap: { ...v },
|
2035
|
+
trackItemsMap: { ..._ }
|
2036
|
+
},
|
2037
|
+
{
|
2038
|
+
updateHistory: !0,
|
2039
|
+
kind: "update:details"
|
2040
|
+
}
|
2041
|
+
);
|
2016
2042
|
}
|
2017
2043
|
});
|
2018
2044
|
return {
|
2019
2045
|
unsubscribe: () => {
|
2020
|
-
S.unsubscribe(), N.unsubscribe(), y.unsubscribe(), E.unsubscribe(),
|
2046
|
+
S.unsubscribe(), N.unsubscribe(), y.unsubscribe(), E.unsubscribe(), R.unsubscribe(), d.unsubscribe();
|
2021
2047
|
}
|
2022
2048
|
};
|
2023
2049
|
}
|
@@ -2026,20 +2052,20 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2026
2052
|
var d, E;
|
2027
2053
|
let o = [];
|
2028
2054
|
const c = Array.isArray(t);
|
2029
|
-
for (const
|
2030
|
-
const S = t[
|
2031
|
-
if (!(
|
2055
|
+
for (const R in t) {
|
2056
|
+
const S = t[R], N = c ? +R : R;
|
2057
|
+
if (!(R in r)) {
|
2032
2058
|
o.push({
|
2033
2059
|
type: "REMOVE",
|
2034
2060
|
path: [N],
|
2035
|
-
oldValue: t[
|
2061
|
+
oldValue: t[R]
|
2036
2062
|
});
|
2037
2063
|
continue;
|
2038
2064
|
}
|
2039
|
-
const y = r[
|
2065
|
+
const y = r[R], p = typeof S == "object" && typeof y == "object" && Array.isArray(S) === Array.isArray(y);
|
2040
2066
|
if (S && y && p && !Ji[(E = (d = Object.getPrototypeOf(S)) == null ? void 0 : d.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
|
2041
2067
|
const h = Zn(S, y, n, n.cyclesFix ? i.concat([S]) : []);
|
2042
|
-
o.push.apply(o, h.map((
|
2068
|
+
o.push.apply(o, h.map((l) => (l.path.unshift(N), l)));
|
2043
2069
|
} else S !== y && // treat NaN values as equivalent
|
2044
2070
|
!(Number.isNaN(S) && Number.isNaN(y)) && !(p && (isNaN(S) ? S + "" == y + "" : +S == +y)) && o.push({
|
2045
2071
|
path: [N],
|
@@ -2048,16 +2074,16 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2048
2074
|
oldValue: S
|
2049
2075
|
});
|
2050
2076
|
}
|
2051
|
-
const
|
2052
|
-
for (const
|
2053
|
-
|
2077
|
+
const f = Array.isArray(r);
|
2078
|
+
for (const R in r)
|
2079
|
+
R in t || o.push({
|
2054
2080
|
type: "CREATE",
|
2055
|
-
path: [
|
2056
|
-
value: r[
|
2081
|
+
path: [f ? +R : R],
|
2082
|
+
value: r[R]
|
2057
2083
|
});
|
2058
2084
|
return o;
|
2059
2085
|
}
|
2060
|
-
var
|
2086
|
+
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Symbol.for("immer-state"), Qn = process.env.NODE_ENV !== "production" ? [
|
2061
2087
|
// All error codes, starting by 0:
|
2062
2088
|
function(t) {
|
2063
2089
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2127,7 +2153,7 @@ function Mt(t) {
|
|
2127
2153
|
function he(t, r) {
|
2128
2154
|
return Mt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2129
2155
|
}
|
2130
|
-
function
|
2156
|
+
function en(t, r) {
|
2131
2157
|
return Mt(t) === 2 ? t.get(r) : t[r];
|
2132
2158
|
}
|
2133
2159
|
function ei(t, r, n) {
|
@@ -2143,10 +2169,10 @@ function _e(t) {
|
|
2143
2169
|
function ve(t) {
|
2144
2170
|
return t instanceof Set;
|
2145
2171
|
}
|
2146
|
-
function
|
2172
|
+
function Et(t) {
|
2147
2173
|
return t.copy_ || t.base_;
|
2148
2174
|
}
|
2149
|
-
function
|
2175
|
+
function pn(t, r) {
|
2150
2176
|
if (_e(t))
|
2151
2177
|
return new Map(t);
|
2152
2178
|
if (ve(t))
|
@@ -2159,13 +2185,13 @@ function ln(t, r) {
|
|
2159
2185
|
delete i[J];
|
2160
2186
|
let o = Reflect.ownKeys(i);
|
2161
2187
|
for (let c = 0; c < o.length; c++) {
|
2162
|
-
const
|
2163
|
-
d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[
|
2188
|
+
const f = o[c], d = i[f];
|
2189
|
+
d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[f] = {
|
2164
2190
|
configurable: !0,
|
2165
2191
|
writable: !0,
|
2166
2192
|
// could live with !!desc.set as well here...
|
2167
2193
|
enumerable: d.enumerable,
|
2168
|
-
value: t[
|
2194
|
+
value: t[f]
|
2169
2195
|
});
|
2170
2196
|
}
|
2171
2197
|
return Object.create(Ot(t), i);
|
@@ -2177,8 +2203,8 @@ function ln(t, r) {
|
|
2177
2203
|
return Object.assign(o, t);
|
2178
2204
|
}
|
2179
2205
|
}
|
2180
|
-
function
|
2181
|
-
return nr(t) || xt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete = ta), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) =>
|
2206
|
+
function vn(t, r = !1) {
|
2207
|
+
return nr(t) || xt(t) || !gt(t) || (Mt(t) > 1 && (t.set = t.add = t.clear = t.delete = ta), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => vn(i, !0))), t;
|
2182
2208
|
}
|
2183
2209
|
function ta() {
|
2184
2210
|
G(2);
|
@@ -2186,13 +2212,13 @@ function ta() {
|
|
2186
2212
|
function nr(t) {
|
2187
2213
|
return Object.isFrozen(t);
|
2188
2214
|
}
|
2189
|
-
var
|
2215
|
+
var dn = {};
|
2190
2216
|
function Pt(t) {
|
2191
|
-
const r =
|
2217
|
+
const r = dn[t];
|
2192
2218
|
return r || G(0, t), r;
|
2193
2219
|
}
|
2194
2220
|
function ea(t, r) {
|
2195
|
-
|
2221
|
+
dn[t] || (dn[t] = r);
|
2196
2222
|
}
|
2197
2223
|
var ye;
|
2198
2224
|
function ri() {
|
@@ -2212,10 +2238,10 @@ function ra(t, r) {
|
|
2212
2238
|
function Dn(t, r) {
|
2213
2239
|
r && (Pt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2214
2240
|
}
|
2215
|
-
function dn(t) {
|
2216
|
-
hn(t), t.drafts_.forEach(na), t.drafts_ = null;
|
2217
|
-
}
|
2218
2241
|
function hn(t) {
|
2242
|
+
yn(t), t.drafts_.forEach(na), t.drafts_ = null;
|
2243
|
+
}
|
2244
|
+
function yn(t) {
|
2219
2245
|
t === ye && (ye = t.parent_);
|
2220
2246
|
}
|
2221
2247
|
function Cn(t) {
|
@@ -2228,12 +2254,12 @@ function na(t) {
|
|
2228
2254
|
function jn(t, r) {
|
2229
2255
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2230
2256
|
const n = r.drafts_[0];
|
2231
|
-
return t !== void 0 && t !== n ? (n[J].modified_ && (
|
2257
|
+
return t !== void 0 && t !== n ? (n[J].modified_ && (hn(r), G(4)), gt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Pt("Patches").generateReplacementPatches_(
|
2232
2258
|
n[J].base_,
|
2233
2259
|
t,
|
2234
2260
|
r.patches_,
|
2235
2261
|
r.inversePatches_
|
2236
|
-
)) : t = Ze(r, n, []),
|
2262
|
+
)) : t = Ze(r, n, []), hn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== _n ? t : void 0;
|
2237
2263
|
}
|
2238
2264
|
function Ze(t, r, n) {
|
2239
2265
|
if (nr(r))
|
@@ -2242,7 +2268,7 @@ function Ze(t, r, n) {
|
|
2242
2268
|
if (!i)
|
2243
2269
|
return de(
|
2244
2270
|
r,
|
2245
|
-
(o, c) =>
|
2271
|
+
(o, c) => Rn(t, i, r, o, c, n)
|
2246
2272
|
), r;
|
2247
2273
|
if (i.scope_ !== t)
|
2248
2274
|
return r;
|
@@ -2251,10 +2277,10 @@ function Ze(t, r, n) {
|
|
2251
2277
|
if (!i.finalized_) {
|
2252
2278
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2253
2279
|
const o = i.copy_;
|
2254
|
-
let c = o,
|
2255
|
-
i.type_ === 3 && (c = new Set(o), o.clear(),
|
2280
|
+
let c = o, f = !1;
|
2281
|
+
i.type_ === 3 && (c = new Set(o), o.clear(), f = !0), de(
|
2256
2282
|
c,
|
2257
|
-
(d, E) =>
|
2283
|
+
(d, E) => Rn(t, i, o, d, E, n, f)
|
2258
2284
|
), Qe(t, o, !1), n && t.patches_ && Pt("Patches").generatePatches_(
|
2259
2285
|
i,
|
2260
2286
|
n,
|
@@ -2264,7 +2290,7 @@ function Ze(t, r, n) {
|
|
2264
2290
|
}
|
2265
2291
|
return i.copy_;
|
2266
2292
|
}
|
2267
|
-
function
|
2293
|
+
function Rn(t, r, n, i, o, c, f) {
|
2268
2294
|
if (process.env.NODE_ENV !== "production" && o === n && G(5), xt(o)) {
|
2269
2295
|
const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2270
2296
|
!he(r.assigned_, i) ? c.concat(i) : void 0, E = Ze(t, o, d);
|
@@ -2272,7 +2298,7 @@ function Fn(t, r, n, i, o, c, l) {
|
|
2272
2298
|
t.canAutoFreeze_ = !1;
|
2273
2299
|
else
|
2274
2300
|
return;
|
2275
|
-
} else
|
2301
|
+
} else f && n.add(o);
|
2276
2302
|
if (gt(o) && !nr(o)) {
|
2277
2303
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2278
2304
|
return;
|
@@ -2280,7 +2306,7 @@ function Fn(t, r, n, i, o, c, l) {
|
|
2280
2306
|
}
|
2281
2307
|
}
|
2282
2308
|
function Qe(t, r, n = !1) {
|
2283
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
2309
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && vn(r, n);
|
2284
2310
|
}
|
2285
2311
|
function ia(t, r) {
|
2286
2312
|
const n = Array.isArray(t), i = {
|
@@ -2306,50 +2332,50 @@ function ia(t, r) {
|
|
2306
2332
|
revoke_: null,
|
2307
2333
|
isManual_: !1
|
2308
2334
|
};
|
2309
|
-
let o = i, c =
|
2335
|
+
let o = i, c = In;
|
2310
2336
|
n && (o = [i], c = me);
|
2311
|
-
const { revoke:
|
2312
|
-
return i.draft_ = d, i.revoke_ =
|
2337
|
+
const { revoke: f, proxy: d } = Proxy.revocable(o, c);
|
2338
|
+
return i.draft_ = d, i.revoke_ = f, d;
|
2313
2339
|
}
|
2314
|
-
var
|
2340
|
+
var In = {
|
2315
2341
|
get(t, r) {
|
2316
2342
|
if (r === J)
|
2317
2343
|
return t;
|
2318
|
-
const n =
|
2344
|
+
const n = Et(t);
|
2319
2345
|
if (!he(n, r))
|
2320
2346
|
return aa(t, n, r);
|
2321
2347
|
const i = n[r];
|
2322
|
-
return t.finalized_ || !gt(i) ? i : i ===
|
2348
|
+
return t.finalized_ || !gt(i) ? i : i === rn(t.base_, r) ? (nn(t), t.copy_[r] = bn(i, t)) : i;
|
2323
2349
|
},
|
2324
2350
|
has(t, r) {
|
2325
|
-
return r in
|
2351
|
+
return r in Et(t);
|
2326
2352
|
},
|
2327
2353
|
ownKeys(t) {
|
2328
|
-
return Reflect.ownKeys(
|
2354
|
+
return Reflect.ownKeys(Et(t));
|
2329
2355
|
},
|
2330
2356
|
set(t, r, n) {
|
2331
|
-
const i = ni(
|
2357
|
+
const i = ni(Et(t), r);
|
2332
2358
|
if (i != null && i.set)
|
2333
2359
|
return i.set.call(t.draft_, n), !0;
|
2334
2360
|
if (!t.modified_) {
|
2335
|
-
const o =
|
2361
|
+
const o = rn(Et(t), r), c = o == null ? void 0 : o[J];
|
2336
2362
|
if (c && c.base_ === n)
|
2337
2363
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2338
2364
|
if (Qi(n, o) && (n !== void 0 || he(t.base_, r)))
|
2339
2365
|
return !0;
|
2340
|
-
|
2366
|
+
nn(t), mn(t);
|
2341
2367
|
}
|
2342
2368
|
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
2343
2369
|
(n !== void 0 || r in t.copy_) || // special case: NaN
|
2344
2370
|
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
2345
2371
|
},
|
2346
2372
|
deleteProperty(t, r) {
|
2347
|
-
return
|
2373
|
+
return rn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, nn(t), mn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
2348
2374
|
},
|
2349
2375
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2350
2376
|
// the same guarantee in ES5 mode.
|
2351
2377
|
getOwnPropertyDescriptor(t, r) {
|
2352
|
-
const n =
|
2378
|
+
const n = Et(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2353
2379
|
return i && {
|
2354
2380
|
writable: !0,
|
2355
2381
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2367,7 +2393,7 @@ var vn = {
|
|
2367
2393
|
G(12);
|
2368
2394
|
}
|
2369
2395
|
}, me = {};
|
2370
|
-
de(
|
2396
|
+
de(In, (t, r) => {
|
2371
2397
|
me[t] = function() {
|
2372
2398
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2373
2399
|
};
|
@@ -2376,11 +2402,11 @@ me.deleteProperty = function(t, r) {
|
|
2376
2402
|
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && G(13), me.set.call(this, t, r, void 0);
|
2377
2403
|
};
|
2378
2404
|
me.set = function(t, r, n) {
|
2379
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14),
|
2405
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
|
2380
2406
|
};
|
2381
|
-
function
|
2407
|
+
function rn(t, r) {
|
2382
2408
|
const n = t[J];
|
2383
|
-
return (n ?
|
2409
|
+
return (n ? Et(n) : t)[r];
|
2384
2410
|
}
|
2385
2411
|
function aa(t, r, n) {
|
2386
2412
|
var o;
|
@@ -2402,11 +2428,11 @@ function ni(t, r) {
|
|
2402
2428
|
n = Ot(n);
|
2403
2429
|
}
|
2404
2430
|
}
|
2405
|
-
function
|
2406
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
2431
|
+
function mn(t) {
|
2432
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && mn(t.parent_));
|
2407
2433
|
}
|
2408
|
-
function
|
2409
|
-
t.copy_ || (t.copy_ =
|
2434
|
+
function nn(t) {
|
2435
|
+
t.copy_ || (t.copy_ = pn(
|
2410
2436
|
t.base_,
|
2411
2437
|
t.scope_.immer_.useStrictShallowCopy_
|
2412
2438
|
));
|
@@ -2417,43 +2443,43 @@ var sa = class {
|
|
2417
2443
|
if (typeof r == "function" && typeof n != "function") {
|
2418
2444
|
const c = n;
|
2419
2445
|
n = r;
|
2420
|
-
const
|
2421
|
-
return function(E = c, ...
|
2422
|
-
return
|
2446
|
+
const f = this;
|
2447
|
+
return function(E = c, ...R) {
|
2448
|
+
return f.produce(E, (S) => n.call(this, S, ...R));
|
2423
2449
|
};
|
2424
2450
|
}
|
2425
2451
|
typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
|
2426
2452
|
let o;
|
2427
2453
|
if (gt(r)) {
|
2428
|
-
const c = Cn(this),
|
2454
|
+
const c = Cn(this), f = bn(r, void 0);
|
2429
2455
|
let d = !0;
|
2430
2456
|
try {
|
2431
|
-
o = n(
|
2457
|
+
o = n(f), d = !1;
|
2432
2458
|
} finally {
|
2433
|
-
d ?
|
2459
|
+
d ? hn(c) : yn(c);
|
2434
2460
|
}
|
2435
2461
|
return Dn(c, i), jn(o, c);
|
2436
2462
|
} else if (!r || typeof r != "object") {
|
2437
|
-
if (o = n(r), o === void 0 && (o = r), o ===
|
2438
|
-
const c = [],
|
2439
|
-
Pt("Patches").generateReplacementPatches_(r, o, c,
|
2463
|
+
if (o = n(r), o === void 0 && (o = r), o === _n && (o = void 0), this.autoFreeze_ && vn(o, !0), i) {
|
2464
|
+
const c = [], f = [];
|
2465
|
+
Pt("Patches").generateReplacementPatches_(r, o, c, f), i(c, f);
|
2440
2466
|
}
|
2441
2467
|
return o;
|
2442
2468
|
} else
|
2443
2469
|
G(1, r);
|
2444
2470
|
}, this.produceWithPatches = (r, n) => {
|
2445
2471
|
if (typeof r == "function")
|
2446
|
-
return (
|
2472
|
+
return (f, ...d) => this.produceWithPatches(f, (E) => r(E, ...d));
|
2447
2473
|
let i, o;
|
2448
|
-
return [this.produce(r, n, (
|
2449
|
-
i =
|
2474
|
+
return [this.produce(r, n, (f, d) => {
|
2475
|
+
i = f, o = d;
|
2450
2476
|
}), i, o];
|
2451
2477
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2452
2478
|
}
|
2453
2479
|
createDraft(t) {
|
2454
2480
|
gt(t) || G(8), xt(t) && (t = oa(t));
|
2455
|
-
const r = Cn(this), n =
|
2456
|
-
return n[J].isManual_ = !0,
|
2481
|
+
const r = Cn(this), n = bn(t, void 0);
|
2482
|
+
return n[J].isManual_ = !0, yn(r), n;
|
2457
2483
|
}
|
2458
2484
|
finishDraft(t, r) {
|
2459
2485
|
const n = t && t[J];
|
@@ -2494,7 +2520,7 @@ var sa = class {
|
|
2494
2520
|
);
|
2495
2521
|
}
|
2496
2522
|
};
|
2497
|
-
function
|
2523
|
+
function bn(t, r) {
|
2498
2524
|
const n = _e(t) ? Pt("MapSet").proxyMap_(t, r) : ve(t) ? Pt("MapSet").proxySet_(t, r) : ia(t, r);
|
2499
2525
|
return (r ? r.scope_ : ri()).drafts_.push(n), n;
|
2500
2526
|
}
|
@@ -2509,14 +2535,14 @@ function ii(t) {
|
|
2509
2535
|
if (r) {
|
2510
2536
|
if (!r.modified_)
|
2511
2537
|
return r.base_;
|
2512
|
-
r.finalized_ = !0, n =
|
2538
|
+
r.finalized_ = !0, n = pn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2513
2539
|
} else
|
2514
|
-
n =
|
2540
|
+
n = pn(t, !0);
|
2515
2541
|
return de(n, (i, o) => {
|
2516
2542
|
ei(n, i, ii(o));
|
2517
2543
|
}), r && (r.finalized_ = !1), n;
|
2518
2544
|
}
|
2519
|
-
function
|
2545
|
+
function Fn() {
|
2520
2546
|
process.env.NODE_ENV !== "production" && Qn.push(
|
2521
2547
|
'Sets cannot have "replace" patches.',
|
2522
2548
|
function(y) {
|
@@ -2528,159 +2554,159 @@ function Rn() {
|
|
2528
2554
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2529
2555
|
);
|
2530
2556
|
const r = "replace", n = "add", i = "remove";
|
2531
|
-
function o(y, p, h,
|
2557
|
+
function o(y, p, h, l) {
|
2532
2558
|
switch (y.type_) {
|
2533
2559
|
case 0:
|
2534
2560
|
case 2:
|
2535
|
-
return
|
2561
|
+
return f(
|
2536
2562
|
y,
|
2537
2563
|
p,
|
2538
2564
|
h,
|
2539
|
-
|
2565
|
+
l
|
2540
2566
|
);
|
2541
2567
|
case 1:
|
2542
|
-
return c(y, p, h,
|
2568
|
+
return c(y, p, h, l);
|
2543
2569
|
case 3:
|
2544
2570
|
return d(
|
2545
2571
|
y,
|
2546
2572
|
p,
|
2547
2573
|
h,
|
2548
|
-
|
2574
|
+
l
|
2549
2575
|
);
|
2550
2576
|
}
|
2551
2577
|
}
|
2552
|
-
function c(y, p, h,
|
2578
|
+
function c(y, p, h, l) {
|
2553
2579
|
let { base_: g, assigned_: v } = y, _ = y.copy_;
|
2554
|
-
_.length < g.length && ([g, _] = [_, g], [h,
|
2555
|
-
for (let
|
2556
|
-
if (v[
|
2557
|
-
const
|
2580
|
+
_.length < g.length && ([g, _] = [_, g], [h, l] = [l, h]);
|
2581
|
+
for (let m = 0; m < g.length; m++)
|
2582
|
+
if (v[m] && _[m] !== g[m]) {
|
2583
|
+
const b = p.concat([m]);
|
2558
2584
|
h.push({
|
2559
2585
|
op: r,
|
2560
|
-
path:
|
2586
|
+
path: b,
|
2561
2587
|
// Need to maybe clone it, as it can in fact be the original value
|
2562
2588
|
// due to the base/copy inversion at the start of this function
|
2563
|
-
value: N(_[
|
2564
|
-
}),
|
2589
|
+
value: N(_[m])
|
2590
|
+
}), l.push({
|
2565
2591
|
op: r,
|
2566
|
-
path:
|
2567
|
-
value: N(g[
|
2592
|
+
path: b,
|
2593
|
+
value: N(g[m])
|
2568
2594
|
});
|
2569
2595
|
}
|
2570
|
-
for (let
|
2571
|
-
const
|
2596
|
+
for (let m = g.length; m < _.length; m++) {
|
2597
|
+
const b = p.concat([m]);
|
2572
2598
|
h.push({
|
2573
2599
|
op: n,
|
2574
|
-
path:
|
2600
|
+
path: b,
|
2575
2601
|
// Need to maybe clone it, as it can in fact be the original value
|
2576
2602
|
// due to the base/copy inversion at the start of this function
|
2577
|
-
value: N(_[
|
2603
|
+
value: N(_[m])
|
2578
2604
|
});
|
2579
2605
|
}
|
2580
|
-
for (let
|
2581
|
-
const
|
2582
|
-
|
2606
|
+
for (let m = _.length - 1; g.length <= m; --m) {
|
2607
|
+
const b = p.concat([m]);
|
2608
|
+
l.push({
|
2583
2609
|
op: i,
|
2584
|
-
path:
|
2610
|
+
path: b
|
2585
2611
|
});
|
2586
2612
|
}
|
2587
2613
|
}
|
2588
|
-
function
|
2614
|
+
function f(y, p, h, l) {
|
2589
2615
|
const { base_: g, copy_: v } = y;
|
2590
|
-
de(y.assigned_, (_,
|
2591
|
-
const
|
2592
|
-
if (
|
2616
|
+
de(y.assigned_, (_, m) => {
|
2617
|
+
const b = en(g, _), x = en(v, _), O = m ? he(g, _) ? r : n : i;
|
2618
|
+
if (b === x && O === r)
|
2593
2619
|
return;
|
2594
|
-
const
|
2595
|
-
h.push(O === i ? { op: O, path:
|
2596
|
-
O === n ? { op: i, path:
|
2620
|
+
const A = p.concat(_);
|
2621
|
+
h.push(O === i ? { op: O, path: A } : { op: O, path: A, value: x }), l.push(
|
2622
|
+
O === n ? { op: i, path: A } : O === i ? { op: n, path: A, value: N(b) } : { op: r, path: A, value: N(b) }
|
2597
2623
|
);
|
2598
2624
|
});
|
2599
2625
|
}
|
2600
|
-
function d(y, p, h,
|
2626
|
+
function d(y, p, h, l) {
|
2601
2627
|
let { base_: g, copy_: v } = y, _ = 0;
|
2602
|
-
g.forEach((
|
2603
|
-
if (!v.has(
|
2604
|
-
const
|
2628
|
+
g.forEach((m) => {
|
2629
|
+
if (!v.has(m)) {
|
2630
|
+
const b = p.concat([_]);
|
2605
2631
|
h.push({
|
2606
2632
|
op: i,
|
2607
|
-
path:
|
2608
|
-
value:
|
2609
|
-
}),
|
2633
|
+
path: b,
|
2634
|
+
value: m
|
2635
|
+
}), l.unshift({
|
2610
2636
|
op: n,
|
2611
|
-
path:
|
2612
|
-
value:
|
2637
|
+
path: b,
|
2638
|
+
value: m
|
2613
2639
|
});
|
2614
2640
|
}
|
2615
2641
|
_++;
|
2616
|
-
}), _ = 0, v.forEach((
|
2617
|
-
if (!g.has(
|
2618
|
-
const
|
2642
|
+
}), _ = 0, v.forEach((m) => {
|
2643
|
+
if (!g.has(m)) {
|
2644
|
+
const b = p.concat([_]);
|
2619
2645
|
h.push({
|
2620
2646
|
op: n,
|
2621
|
-
path:
|
2622
|
-
value:
|
2623
|
-
}),
|
2647
|
+
path: b,
|
2648
|
+
value: m
|
2649
|
+
}), l.unshift({
|
2624
2650
|
op: i,
|
2625
|
-
path:
|
2626
|
-
value:
|
2651
|
+
path: b,
|
2652
|
+
value: m
|
2627
2653
|
});
|
2628
2654
|
}
|
2629
2655
|
_++;
|
2630
2656
|
});
|
2631
2657
|
}
|
2632
|
-
function E(y, p, h,
|
2658
|
+
function E(y, p, h, l) {
|
2633
2659
|
h.push({
|
2634
2660
|
op: r,
|
2635
2661
|
path: [],
|
2636
|
-
value: p ===
|
2637
|
-
}),
|
2662
|
+
value: p === _n ? void 0 : p
|
2663
|
+
}), l.push({
|
2638
2664
|
op: r,
|
2639
2665
|
path: [],
|
2640
2666
|
value: y
|
2641
2667
|
});
|
2642
2668
|
}
|
2643
|
-
function
|
2669
|
+
function R(y, p) {
|
2644
2670
|
return p.forEach((h) => {
|
2645
|
-
const { path:
|
2671
|
+
const { path: l, op: g } = h;
|
2646
2672
|
let v = y;
|
2647
|
-
for (let
|
2673
|
+
for (let x = 0; x < l.length - 1; x++) {
|
2648
2674
|
const O = Mt(v);
|
2649
|
-
let
|
2650
|
-
typeof
|
2675
|
+
let A = l[x];
|
2676
|
+
typeof A != "string" && typeof A != "number" && (A = "" + A), (O === 0 || O === 1) && (A === "__proto__" || A === "constructor") && G(19), typeof v == "function" && A === "prototype" && G(19), v = en(v, A), typeof v != "object" && G(18, l.join("/"));
|
2651
2677
|
}
|
2652
|
-
const _ = Mt(v),
|
2678
|
+
const _ = Mt(v), m = S(h.value), b = l[l.length - 1];
|
2653
2679
|
switch (g) {
|
2654
2680
|
case r:
|
2655
2681
|
switch (_) {
|
2656
2682
|
case 2:
|
2657
|
-
return v.set(
|
2683
|
+
return v.set(b, m);
|
2658
2684
|
case 3:
|
2659
2685
|
G(16);
|
2660
2686
|
default:
|
2661
|
-
return v[
|
2687
|
+
return v[b] = m;
|
2662
2688
|
}
|
2663
2689
|
case n:
|
2664
2690
|
switch (_) {
|
2665
2691
|
case 1:
|
2666
|
-
return
|
2692
|
+
return b === "-" ? v.push(m) : v.splice(b, 0, m);
|
2667
2693
|
case 2:
|
2668
|
-
return v.set(
|
2694
|
+
return v.set(b, m);
|
2669
2695
|
case 3:
|
2670
|
-
return v.add(
|
2696
|
+
return v.add(m);
|
2671
2697
|
default:
|
2672
|
-
return v[
|
2698
|
+
return v[b] = m;
|
2673
2699
|
}
|
2674
2700
|
case i:
|
2675
2701
|
switch (_) {
|
2676
2702
|
case 1:
|
2677
|
-
return v.splice(
|
2703
|
+
return v.splice(b, 1);
|
2678
2704
|
case 2:
|
2679
|
-
return v.delete(
|
2705
|
+
return v.delete(b);
|
2680
2706
|
case 3:
|
2681
2707
|
return v.delete(h.value);
|
2682
2708
|
default:
|
2683
|
-
return delete v[
|
2709
|
+
return delete v[b];
|
2684
2710
|
}
|
2685
2711
|
default:
|
2686
2712
|
G(17, g);
|
@@ -2694,7 +2720,7 @@ function Rn() {
|
|
2694
2720
|
return y.map(S);
|
2695
2721
|
if (_e(y))
|
2696
2722
|
return new Map(
|
2697
|
-
Array.from(y.entries()).map(([h,
|
2723
|
+
Array.from(y.entries()).map(([h, l]) => [h, S(l)])
|
2698
2724
|
);
|
2699
2725
|
if (ve(y))
|
2700
2726
|
return new Set(Array.from(y).map(S));
|
@@ -2707,7 +2733,7 @@ function Rn() {
|
|
2707
2733
|
return xt(y) ? S(y) : y;
|
2708
2734
|
}
|
2709
2735
|
ea("Patches", {
|
2710
|
-
applyPatches_:
|
2736
|
+
applyPatches_: R,
|
2711
2737
|
generatePatches_: o,
|
2712
2738
|
generateReplacementPatches_: E
|
2713
2739
|
});
|
@@ -2721,7 +2747,7 @@ Z.setUseStrictShallowCopy.bind(Z);
|
|
2721
2747
|
var ua = Z.applyPatches.bind(Z);
|
2722
2748
|
Z.createDraft.bind(Z);
|
2723
2749
|
Z.finishDraft.bind(Z);
|
2724
|
-
var
|
2750
|
+
var la = 1 / 0, fa = 9007199254740991, pa = "[object Arguments]", da = "[object Function]", ha = "[object GeneratorFunction]", ya = "[object Symbol]", ma = typeof et == "object" && et && et.Object === Object && et, ba = typeof self == "object" && self && self.Object === Object && self, ga = ma || ba || Function("return this")();
|
2725
2751
|
function _a(t, r, n) {
|
2726
2752
|
switch (n.length) {
|
2727
2753
|
case 0:
|
@@ -2745,35 +2771,35 @@ function Ia(t, r) {
|
|
2745
2771
|
t[o + n] = r[n];
|
2746
2772
|
return t;
|
2747
2773
|
}
|
2748
|
-
var
|
2774
|
+
var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString, zn = ga.Symbol, wa = Sn.propertyIsEnumerable, Hn = zn ? zn.isConcatSpreadable : void 0, Nn = Math.max;
|
2749
2775
|
function Ta(t, r, n, i, o) {
|
2750
|
-
var c = -1,
|
2751
|
-
for (n || (n = Oa), o || (o = []); ++c <
|
2776
|
+
var c = -1, f = t.length;
|
2777
|
+
for (n || (n = Oa), o || (o = []); ++c < f; ) {
|
2752
2778
|
var d = t[c];
|
2753
2779
|
n(d) ? Ia(o, d) : o[o.length] = d;
|
2754
2780
|
}
|
2755
2781
|
return o;
|
2756
2782
|
}
|
2757
|
-
function
|
2758
|
-
return t = Object(t),
|
2783
|
+
function ka(t, r) {
|
2784
|
+
return t = Object(t), Aa(t, r, function(n, i) {
|
2759
2785
|
return i in t;
|
2760
2786
|
});
|
2761
2787
|
}
|
2762
|
-
function
|
2788
|
+
function Aa(t, r, n) {
|
2763
2789
|
for (var i = -1, o = r.length, c = {}; ++i < o; ) {
|
2764
|
-
var
|
2765
|
-
n(d,
|
2790
|
+
var f = r[i], d = t[f];
|
2791
|
+
n(d, f) && (c[f] = d);
|
2766
2792
|
}
|
2767
2793
|
return c;
|
2768
2794
|
}
|
2769
|
-
function
|
2795
|
+
function Ea(t, r) {
|
2770
2796
|
return r = Nn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2771
2797
|
for (var n = arguments, i = -1, o = Nn(n.length - r, 0), c = Array(o); ++i < o; )
|
2772
2798
|
c[i] = n[r + i];
|
2773
2799
|
i = -1;
|
2774
|
-
for (var
|
2775
|
-
|
2776
|
-
return
|
2800
|
+
for (var f = Array(r + 1); ++i < r; )
|
2801
|
+
f[i] = n[i];
|
2802
|
+
return f[r] = c, _a(t, this, f);
|
2777
2803
|
};
|
2778
2804
|
}
|
2779
2805
|
function Oa(t) {
|
@@ -2783,26 +2809,26 @@ function xa(t) {
|
|
2783
2809
|
if (typeof t == "string" || za(t))
|
2784
2810
|
return t;
|
2785
2811
|
var r = t + "";
|
2786
|
-
return r == "0" && 1 / t == -
|
2812
|
+
return r == "0" && 1 / t == -la ? "-0" : r;
|
2787
2813
|
}
|
2788
2814
|
function Ma(t) {
|
2789
|
-
return Ca(t) && Sa.call(t, "callee") && (!wa.call(t, "callee") ||
|
2815
|
+
return Ca(t) && Sa.call(t, "callee") && (!wa.call(t, "callee") || wn.call(t) == pa);
|
2790
2816
|
}
|
2791
2817
|
var Pa = Array.isArray;
|
2792
2818
|
function Da(t) {
|
2793
|
-
return t != null &&
|
2819
|
+
return t != null && Ra(t.length) && !ja(t);
|
2794
2820
|
}
|
2795
2821
|
function Ca(t) {
|
2796
2822
|
return ai(t) && Da(t);
|
2797
2823
|
}
|
2798
2824
|
function ja(t) {
|
2799
|
-
var r =
|
2825
|
+
var r = Fa(t) ? wn.call(t) : "";
|
2800
2826
|
return r == da || r == ha;
|
2801
2827
|
}
|
2802
|
-
function Fa(t) {
|
2803
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= la;
|
2804
|
-
}
|
2805
2828
|
function Ra(t) {
|
2829
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= fa;
|
2830
|
+
}
|
2831
|
+
function Fa(t) {
|
2806
2832
|
var r = typeof t;
|
2807
2833
|
return !!t && (r == "object" || r == "function");
|
2808
2834
|
}
|
@@ -2810,12 +2836,12 @@ function ai(t) {
|
|
2810
2836
|
return !!t && typeof t == "object";
|
2811
2837
|
}
|
2812
2838
|
function za(t) {
|
2813
|
-
return typeof t == "symbol" || ai(t) &&
|
2839
|
+
return typeof t == "symbol" || ai(t) && wn.call(t) == ya;
|
2814
2840
|
}
|
2815
|
-
var Ha =
|
2816
|
-
return t == null ? {} :
|
2841
|
+
var Ha = Ea(function(t, r) {
|
2842
|
+
return t == null ? {} : ka(t, va(Ta(r), xa));
|
2817
2843
|
}), Na = Ha;
|
2818
|
-
const Un = /* @__PURE__ */
|
2844
|
+
const Un = /* @__PURE__ */ gn(Na), Ua = {
|
2819
2845
|
tracks: [],
|
2820
2846
|
trackItemIds: [],
|
2821
2847
|
trackItemsMap: {},
|
@@ -2839,14 +2865,14 @@ const Un = /* @__PURE__ */ bn(Na), Ua = {
|
|
2839
2865
|
];
|
2840
2866
|
class Wa {
|
2841
2867
|
constructor(r) {
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2868
|
+
At(this, "stateSubject");
|
2869
|
+
At(this, "stateHistorySubject");
|
2870
|
+
At(this, "prevState");
|
2871
|
+
At(this, "undos", []);
|
2872
|
+
At(this, "redos", []);
|
2873
|
+
At(this, "listener");
|
2848
2874
|
const n = r || Ua;
|
2849
|
-
this.stateSubject = new
|
2875
|
+
this.stateSubject = new Mn(n), this.stateHistorySubject = new Mn({
|
2850
2876
|
handleRedo: !1,
|
2851
2877
|
handleUndo: !1
|
2852
2878
|
}), this.prevState = n, this.initListeners();
|
@@ -2884,17 +2910,22 @@ class Wa {
|
|
2884
2910
|
...i,
|
2885
2911
|
...r
|
2886
2912
|
};
|
2887
|
-
|
2913
|
+
st(i, o) || (n.updateHistory && this.updateHistory(o, n.kind), this.prevState = i, this.stateSubject.next(o));
|
2888
2914
|
}
|
2889
2915
|
// Selectively subscribe to scale changes
|
2890
2916
|
subscribeToScale(r) {
|
2891
2917
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2892
|
-
|
2918
|
+
st(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
2919
|
+
});
|
2920
|
+
}
|
2921
|
+
subscribeToUpdateTrackItem(r) {
|
2922
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
2923
|
+
st(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
2893
2924
|
});
|
2894
2925
|
}
|
2895
2926
|
subscribeToUpdateItemDetails(r) {
|
2896
2927
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2897
|
-
|
2928
|
+
st(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
2898
2929
|
});
|
2899
2930
|
}
|
2900
2931
|
// Selectively subscribe to duration changes
|
@@ -2917,19 +2948,19 @@ class Wa {
|
|
2917
2948
|
}
|
2918
2949
|
subscribeToAddOrRemoveItems(r) {
|
2919
2950
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2920
|
-
|
2951
|
+
st(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
2921
2952
|
});
|
2922
2953
|
}
|
2923
2954
|
// Selectively subscribe to activeIds changes
|
2924
2955
|
subscribeToActiveIds(r) {
|
2925
2956
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2926
|
-
|
2957
|
+
st(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
2927
2958
|
});
|
2928
2959
|
}
|
2929
2960
|
// Selectively subscribe to multiple track-related properties
|
2930
2961
|
subscribeToTracks(r) {
|
2931
2962
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2932
|
-
(!
|
2963
|
+
(!st(n.tracks, this.prevState.tracks) || !st(n.trackItemIds, this.prevState.trackItemIds) || !st(n.trackItemsMap, this.prevState.trackItemsMap) || !st(n.transitionIds, this.prevState.transitionIds) || !st(n.transitionsMap, this.prevState.transitionsMap)) && r({
|
2933
2964
|
tracks: n.tracks,
|
2934
2965
|
trackItemIds: n.trackItemIds,
|
2935
2966
|
trackItemsMap: n.trackItemsMap,
|
@@ -2942,38 +2973,38 @@ class Wa {
|
|
2942
2973
|
undo() {
|
2943
2974
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
2944
2975
|
if (!n || !i) return;
|
2945
|
-
|
2976
|
+
Fn();
|
2946
2977
|
const {
|
2947
2978
|
trackItemDetailsMap: o,
|
2948
2979
|
trackItemIds: c,
|
2949
|
-
tracks:
|
2980
|
+
tracks: f,
|
2950
2981
|
transitionIds: d,
|
2951
2982
|
transitionsMap: E,
|
2952
|
-
trackItemsMap:
|
2983
|
+
trackItemsMap: R
|
2953
2984
|
} = this.getState(), S = tt({
|
2954
2985
|
trackItemDetailsMap: o,
|
2955
2986
|
trackItemIds: c,
|
2956
|
-
tracks:
|
2987
|
+
tracks: f,
|
2957
2988
|
transitionIds: d,
|
2958
2989
|
transitionsMap: E,
|
2959
|
-
trackItemsMap:
|
2960
|
-
}), N = [], y = [], p = [], h = [],
|
2990
|
+
trackItemsMap: R
|
2991
|
+
}), N = [], y = [], p = [], h = [], l = [], g = [];
|
2961
2992
|
n.forEach((T) => {
|
2962
|
-
let
|
2993
|
+
let M;
|
2963
2994
|
const F = T.path.slice(1);
|
2964
|
-
T.type === "CREATE" ?
|
2995
|
+
T.type === "CREATE" ? M = {
|
2965
2996
|
path: F,
|
2966
2997
|
op: "remove",
|
2967
2998
|
value: T.value
|
2968
|
-
} : T.type === "CHANGE" ?
|
2999
|
+
} : T.type === "CHANGE" ? M = {
|
2969
3000
|
path: F,
|
2970
3001
|
op: "replace",
|
2971
3002
|
value: T.oldValue
|
2972
|
-
} :
|
3003
|
+
} : M = {
|
2973
3004
|
path: F,
|
2974
3005
|
op: "add",
|
2975
3006
|
value: T.oldValue
|
2976
|
-
}, T.path.includes("trackItemIds") ? p.push(
|
3007
|
+
}, T.path.includes("trackItemIds") ? p.push(M) : T.path.includes("transitionIds") ? y.push(M) : T.path.includes("trackItemsMap") ? l.push(M) : T.path.includes("transitionsMap") ? h.push(M) : T.path.includes("tracks") ? N.push(M) : T.path.includes("trackItemDetailsMap") && g.push(M);
|
2977
3008
|
});
|
2978
3009
|
const v = this.applyPatch(
|
2979
3010
|
S.tracks,
|
@@ -2981,27 +3012,27 @@ class Wa {
|
|
2981
3012
|
), _ = this.applyPatch(
|
2982
3013
|
S.transitionIds,
|
2983
3014
|
y
|
2984
|
-
),
|
3015
|
+
), m = this.applyPatch(
|
2985
3016
|
S.trackItemIds,
|
2986
3017
|
p
|
2987
|
-
),
|
3018
|
+
), b = this.applyPatch(
|
2988
3019
|
S.transitionsMap,
|
2989
3020
|
h
|
2990
|
-
),
|
3021
|
+
), x = this.applyPatch(
|
2991
3022
|
S.trackItemsMap,
|
2992
|
-
|
3023
|
+
l
|
2993
3024
|
), O = this.applyPatch(
|
2994
3025
|
S.trackItemDetailsMap,
|
2995
3026
|
g
|
2996
|
-
),
|
3027
|
+
), A = tt({
|
2997
3028
|
tracks: v,
|
2998
3029
|
transitionIds: _,
|
2999
|
-
trackItemIds:
|
3000
|
-
transitionsMap:
|
3001
|
-
trackItemsMap:
|
3030
|
+
trackItemIds: m,
|
3031
|
+
transitionsMap: b,
|
3032
|
+
trackItemsMap: x,
|
3002
3033
|
trackItemDetailsMap: O
|
3003
|
-
}),
|
3004
|
-
this.prevState =
|
3034
|
+
}), C = tt(this.getState()), w = { ...C, ...A };
|
3035
|
+
this.prevState = C, this.redos.push({ redos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3005
3036
|
}
|
3006
3037
|
applyPatch(r, n) {
|
3007
3038
|
return n.reverse().reduce((i, o) => ca(i, (c) => {
|
@@ -3011,38 +3042,38 @@ class Wa {
|
|
3011
3042
|
redo() {
|
3012
3043
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
3013
3044
|
if (!n || !i) return;
|
3014
|
-
|
3045
|
+
Fn();
|
3015
3046
|
const {
|
3016
3047
|
trackItemDetailsMap: o,
|
3017
3048
|
trackItemIds: c,
|
3018
|
-
tracks:
|
3049
|
+
tracks: f,
|
3019
3050
|
transitionIds: d,
|
3020
3051
|
transitionsMap: E,
|
3021
|
-
trackItemsMap:
|
3052
|
+
trackItemsMap: R
|
3022
3053
|
} = this.getState(), S = tt({
|
3023
3054
|
trackItemDetailsMap: o,
|
3024
3055
|
trackItemIds: c,
|
3025
|
-
tracks:
|
3056
|
+
tracks: f,
|
3026
3057
|
transitionIds: d,
|
3027
3058
|
transitionsMap: E,
|
3028
|
-
trackItemsMap:
|
3029
|
-
}), N = [], y = [], p = [], h = [],
|
3059
|
+
trackItemsMap: R
|
3060
|
+
}), N = [], y = [], p = [], h = [], l = [], g = [];
|
3030
3061
|
n.forEach((T) => {
|
3031
|
-
let
|
3062
|
+
let M;
|
3032
3063
|
const F = T.path.slice(1);
|
3033
|
-
T.type === "CREATE" ?
|
3064
|
+
T.type === "CREATE" ? M = {
|
3034
3065
|
path: F,
|
3035
3066
|
op: "add",
|
3036
3067
|
value: T.value
|
3037
|
-
} : T.type === "CHANGE" ?
|
3068
|
+
} : T.type === "CHANGE" ? M = {
|
3038
3069
|
path: F,
|
3039
3070
|
op: "replace",
|
3040
3071
|
value: T.value
|
3041
|
-
} :
|
3072
|
+
} : M = {
|
3042
3073
|
path: F,
|
3043
3074
|
op: "remove",
|
3044
3075
|
value: T.oldValue
|
3045
|
-
}, T.path.includes("trackItemIds") ? p.push(
|
3076
|
+
}, T.path.includes("trackItemIds") ? p.push(M) : T.path.includes("transitionIds") ? y.push(M) : T.path.includes("trackItemsMap") ? l.push(M) : T.path.includes("transitionsMap") ? h.push(M) : T.path.includes("trackItemDetailsMap") ? g.push(M) : N.push(M);
|
3046
3077
|
});
|
3047
3078
|
const v = this.applyPatch(
|
3048
3079
|
S.tracks,
|
@@ -3050,27 +3081,27 @@ class Wa {
|
|
3050
3081
|
), _ = this.applyPatch(
|
3051
3082
|
S.transitionIds,
|
3052
3083
|
y
|
3053
|
-
),
|
3084
|
+
), m = this.applyPatch(
|
3054
3085
|
S.trackItemIds,
|
3055
3086
|
p
|
3056
|
-
),
|
3087
|
+
), b = this.applyPatch(
|
3057
3088
|
S.transitionsMap,
|
3058
3089
|
h
|
3059
|
-
),
|
3090
|
+
), x = this.applyPatch(
|
3060
3091
|
S.trackItemsMap,
|
3061
|
-
|
3092
|
+
l
|
3062
3093
|
), O = this.applyPatch(
|
3063
3094
|
S.trackItemDetailsMap,
|
3064
3095
|
g
|
3065
|
-
),
|
3096
|
+
), A = tt({
|
3066
3097
|
tracks: v,
|
3067
3098
|
transitionIds: _,
|
3068
|
-
trackItemIds:
|
3069
|
-
transitionsMap:
|
3070
|
-
trackItemsMap:
|
3099
|
+
trackItemIds: m,
|
3100
|
+
transitionsMap: b,
|
3101
|
+
trackItemsMap: x,
|
3071
3102
|
trackItemDetailsMap: O
|
3072
|
-
}),
|
3073
|
-
this.prevState =
|
3103
|
+
}), C = tt(this.getState()), w = { ...C, ...A };
|
3104
|
+
this.prevState = C, this.undos.push({ undos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3074
3105
|
}
|
3075
3106
|
}
|
3076
3107
|
export {
|