@designcombo/state 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +548 -530
- 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 +6 -6
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 =
|
89
|
+
for (var d = sn(f), E = d.next(); !E.done; E = d.next()) {
|
90
90
|
var j = E.value;
|
91
91
|
j.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,31 +100,31 @@ 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
|
115
|
+
for (var m = sn(N), p = m.next(); !p.done; p = m.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
|
-
p && !p.done && (o =
|
127
|
+
p && !p.done && (o = m.return) && o.call(m);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -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,7 +404,7 @@ 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
|
}
|
@@ -412,7 +412,7 @@ var zi = Gn(function(t) {
|
|
412
412
|
o = { error: j };
|
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]", j = "[object AsyncFunction]", S = "[object Boolean]", N = "[object Date]", m = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", b = "[object Promise]", y = "[object Proxy]", R = "[object RegExp]", A = "[object Set]", O = "[object String]", D = "[object Symbol]", w = "[object Undefined]", T = "[object WeakMap]", x = "[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[x] = H[S] = H[F] = H[N] = H[m] = H[p] = H[l] = H[g] = H[_] = H[R] = H[A] = H[O] = 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,
|
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
526
|
var P = e[s];
|
527
|
-
a(P, s, e) && (I[
|
527
|
+
a(P, s, e) && (I[k++] = P);
|
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,13 +706,13 @@ 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),
|
711
|
+
var s = Wt(e), u = !s && Le(e), k = !s && !u && Bt(e), I = !s && !u && !k && Be(e), P = s || u || k || I, M = P ? fr(e.length, String) : [], U = M.length;
|
712
712
|
for (var C in e)
|
713
713
|
Q.call(e, C) && !(P && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
(C == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
-
|
715
|
+
k && (C == "offset" || C == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
716
|
I && (C == "buffer" || C == "byteLength" || C == "byteOffset") || // Skip index properties.
|
717
717
|
$r(C, U))) && M.push(C);
|
718
718
|
return M;
|
@@ -731,13 +731,13 @@ 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 P = Wt(e), M = Wt(a), U = P ? E :
|
739
|
+
function Hr(e, a, s, u, k, I) {
|
740
|
+
var P = Wt(e), M = Wt(a), U = P ? E : ut(e), C = M ? E : ut(a);
|
741
741
|
U = U == d ? _ : U, C = C == d ? _ : C;
|
742
742
|
var K = U == _, q = C == _, L = U == C;
|
743
743
|
if (L && Bt(e)) {
|
@@ -746,15 +746,15 @@ Xe.exports;
|
|
746
746
|
P = !0, K = !1;
|
747
747
|
}
|
748
748
|
if (L && !K)
|
749
|
-
return I || (I = new
|
749
|
+
return I || (I = new ct()), P || 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,7 +773,7 @@ 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,
|
776
|
+
function ce(e, a, s, u, k, I) {
|
777
777
|
var P = s & o, M = e.length, U = a.length;
|
778
778
|
if (M != U && !(P && U > M))
|
779
779
|
return !1;
|
@@ -792,21 +792,21 @@ 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, P) {
|
810
810
|
switch (s) {
|
811
811
|
case F:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
@@ -818,22 +818,22 @@ Xe.exports;
|
|
818
818
|
case N:
|
819
819
|
case g:
|
820
820
|
return Ue(+e, +a);
|
821
|
-
case
|
821
|
+
case m:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
824
|
-
case
|
823
|
+
case R:
|
824
|
+
case O:
|
825
825
|
return e == a + "";
|
826
|
-
case
|
826
|
+
case l:
|
827
827
|
var M = xe;
|
828
|
-
case
|
828
|
+
case A:
|
829
829
|
var U = u & o;
|
830
|
-
if (M || (M =
|
830
|
+
if (M || (M = ot), e.size != a.size && !U)
|
831
831
|
return !1;
|
832
832
|
var C = P.get(e);
|
833
833
|
if (C)
|
834
834
|
return C == a;
|
835
835
|
u |= c, P.set(e, a);
|
836
|
-
var K = ce(M(e), M(a), u,
|
836
|
+
var K = ce(M(e), M(a), u, k, I, P);
|
837
837
|
return P.delete(e), K;
|
838
838
|
case D:
|
839
839
|
if (ae)
|
@@ -841,7 +841,7 @@ Xe.exports;
|
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Wr(e, a, s, u,
|
844
|
+
function Wr(e, a, s, u, k, I) {
|
845
845
|
var P = s & o, M = Tt(e), U = M.length, C = Tt(a), K = C.length;
|
846
846
|
if (U != K && !P)
|
847
847
|
return !1;
|
@@ -857,10 +857,10 @@ Xe.exports;
|
|
857
857
|
I.set(e, a), I.set(a, e);
|
858
858
|
for (var bt = P; ++q < U; ) {
|
859
859
|
L = M[q];
|
860
|
-
var ht = e[L],
|
860
|
+
var ht = e[L], kt = a[L];
|
861
861
|
if (u)
|
862
|
-
var
|
863
|
-
if (!(
|
862
|
+
var Tn = P ? 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,33 +890,33 @@ 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()) != b || ne && ut(new ne()) != A || 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
910
|
return b;
|
911
911
|
case mr:
|
912
|
-
return
|
912
|
+
return A;
|
913
913
|
case br:
|
914
914
|
return T;
|
915
915
|
}
|
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 == j || a ==
|
967
|
+
return a == p || a == h || a == j || a == y;
|
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]", j = "[object Error]", S = "[object Function]", N = "[object GeneratorFunction]", m = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", b = "[object Symbol]", y = "[object WeakMap]", R = "[object ArrayBuffer]", A = "[object DataView]", O = "[object Float32Array]", D = "[object Float64Array]", w = "[object Int8Array]", T = "[object Int16Array]", x = "[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[R] = z[A] = z[d] = z[E] = z[O] = z[D] = z[w] = z[T] = z[x] = z[m] = z[p] = z[h] = z[g] = z[v] = z[_] = z[b] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[j] = z[S] = z[y] = !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,14 +1185,14 @@ 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,
|
1191
|
+
function se(e, a, s, u, k, I, P) {
|
1192
1192
|
var M;
|
1193
|
-
if (u && (M = I ? u(e,
|
1193
|
+
if (u && (M = I ? u(e, k, I, P) : u(e)), M !== void 0)
|
1194
1194
|
return M;
|
1195
|
-
if (!
|
1195
|
+
if (!lt(e))
|
1196
1196
|
return e;
|
1197
1197
|
var U = ue(e);
|
1198
1198
|
if (U) {
|
@@ -1205,10 +1205,10 @@ qe.exports;
|
|
1205
1205
|
if (C == h || C == c || K && !I) {
|
1206
1206
|
if (Xt(e))
|
1207
1207
|
return I ? e : {};
|
1208
|
-
if (M =
|
1209
|
-
return Gr(e,
|
1208
|
+
if (M = ut(K ? {} : e), !a)
|
1209
|
+
return Gr(e, ct(M, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!
|
1211
|
+
if (!z[C])
|
1212
1212
|
return I ? e : {};
|
1213
1213
|
M = $r(e, C, se, a);
|
1214
1214
|
}
|
@@ -1218,25 +1218,25 @@ qe.exports;
|
|
1218
1218
|
if (q)
|
1219
1219
|
return q;
|
1220
1220
|
if (P.set(e, M), !U)
|
1221
|
-
var L = s ? Wr(e) :
|
1221
|
+
var L = s ? Wr(e) : fe(e);
|
1222
1222
|
return Te(L || e, function(Y, B) {
|
1223
|
-
L && (B = Y, Y = e[B]),
|
1223
|
+
L && (B = Y, Y = e[B]), Fe(M, B, se(Y, a, s, u, B, e, P));
|
1224
1224
|
}), M;
|
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 P = a[
|
1293
|
-
|
1291
|
+
for (var k = -1, I = a.length; ++k < I; ) {
|
1292
|
+
var P = a[k], M = void 0;
|
1293
|
+
Fe(s, P, M === void 0 ? e[P] : M);
|
1294
1294
|
}
|
1295
1295
|
return s;
|
1296
1296
|
}
|
@@ -1298,52 +1298,52 @@ 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))) !=
|
1313
|
-
var a =
|
1311
|
+
var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
|
1312
|
+
(Ht && dt(new Ht(new ArrayBuffer(1))) != A || vt && dt(new vt()) != m || it && dt(it.resolve()) != l || Nt && dt(new Nt()) != v || te && dt(new te()) != y) && (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:
|
1317
|
-
return
|
1317
|
+
return A;
|
1318
1318
|
case St:
|
1319
|
-
return
|
1319
|
+
return m;
|
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 y;
|
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 R:
|
1340
1340
|
return oe(e);
|
1341
1341
|
case d:
|
1342
1342
|
case E:
|
1343
|
-
return new
|
1344
|
-
case
|
1343
|
+
return new k(+e);
|
1344
|
+
case A:
|
1345
1345
|
return wt(e, u);
|
1346
|
-
case
|
1346
|
+
case O:
|
1347
1347
|
case D:
|
1348
1348
|
case w:
|
1349
1349
|
case T:
|
@@ -1353,11 +1353,11 @@ qe.exports;
|
|
1353
1353
|
case Ct:
|
1354
1354
|
case Ie:
|
1355
1355
|
return Ur(e, u);
|
1356
|
-
case
|
1356
|
+
case m:
|
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:
|
@@ -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,53 +1758,53 @@ 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 (b) => {
|
1772
|
+
const y = v[b];
|
1773
|
+
return (y.type === "caption" || y.type === "text") && await Je([
|
1769
1774
|
{
|
1770
|
-
fontFamily:
|
1771
|
-
url:
|
1775
|
+
fontFamily: y.details.fontFamily,
|
1776
|
+
url: y.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
1787
|
}), j = i.subscribe((p) => {
|
1783
|
-
var
|
1788
|
+
var l, g, v;
|
1784
1789
|
const h = [];
|
1785
|
-
if ((
|
1786
|
-
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, b = tt(t.getState()),
|
1787
|
-
(F) => !
|
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, b = tt(t.getState()), y = _ && _.length ? _ : b.activeIds, R = b.trackItemIds, A = b.trackItemDetailsMap, O = R.filter(
|
1792
|
+
(F) => !y.includes(F)
|
1788
1793
|
), D = Object.fromEntries(
|
1789
|
-
Object.entries(
|
1790
|
-
([F]) => !
|
1794
|
+
Object.entries(A).filter(
|
1795
|
+
([F]) => !y.includes(F)
|
1791
1796
|
)
|
1792
1797
|
), w = Xi(
|
1793
1798
|
b.tracks,
|
1794
|
-
|
1799
|
+
y
|
1795
1800
|
), T = Object.fromEntries(
|
1796
1801
|
Object.entries(b.trackItemsMap).filter(
|
1797
|
-
([F]) => !
|
1802
|
+
([F]) => !y.includes(F)
|
1798
1803
|
)
|
1799
|
-
), x =
|
1804
|
+
), x = tn(b.trackItemsMap);
|
1800
1805
|
t.updateState(
|
1801
1806
|
{
|
1802
|
-
trackItemIds:
|
1807
|
+
trackItemIds: O,
|
1803
1808
|
trackItemDetailsMap: D,
|
1804
1809
|
activeIds: [],
|
1805
1810
|
trackItemsMap: T,
|
@@ -1810,12 +1815,12 @@ function qi(t) {
|
|
1810
1815
|
);
|
1811
1816
|
}
|
1812
1817
|
}), S = n.subscribe(async (p) => {
|
1813
|
-
var _, b,
|
1818
|
+
var _, b, y, R, A;
|
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 x of
|
1822
|
+
const O = (_ = p.value) == null ? void 0 : _.payload, D = [];
|
1823
|
+
for (const x of O) {
|
1819
1824
|
const F = Ki(x, {
|
1820
1825
|
size: {
|
1821
1826
|
width: 1080,
|
@@ -1834,64 +1839,64 @@ function qi(t) {
|
|
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 O = await Yi((b = p.value) == null ? void 0 : b.payload, {
|
1842
1847
|
size: {
|
1843
1848
|
width: 1080,
|
1844
1849
|
height: 1920
|
1845
1850
|
}
|
1846
|
-
}), { details: D, ...w } =
|
1851
|
+
}), { details: D, ...w } = O;
|
1847
1852
|
h.trackItemDetailsMap[w.id] = {
|
1848
1853
|
type: g,
|
1849
1854
|
details: D
|
1850
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
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 O = await $i((y = p.value) == null ? void 0 : y.payload, {
|
1855
1860
|
size: {
|
1856
1861
|
width: 1080,
|
1857
1862
|
height: 1920
|
1858
1863
|
}
|
1859
|
-
}), { details: D, ...w } =
|
1864
|
+
}), { details: D, ...w } = O;
|
1860
1865
|
h.trackItemDetailsMap[w.id] = {
|
1861
1866
|
type: g,
|
1862
1867
|
details: D
|
1863
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
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 O = await Bi((R = p.value) == null ? void 0 : R.payload), { details: D, ...w } = O;
|
1868
1873
|
h.trackItemDetailsMap[w.id] = {
|
1869
1874
|
type: g,
|
1870
1875
|
details: D
|
1871
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
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 O = await Wi((A = p.value) == null ? void 0 : A.payload, {
|
1876
1881
|
size: {
|
1877
1882
|
width: 1080,
|
1878
1883
|
height: 1920
|
1879
1884
|
}
|
1880
|
-
}), { details: D, ...w } =
|
1885
|
+
}), { details: D, ...w } = O;
|
1881
1886
|
h.trackItemDetailsMap[w.id] = {
|
1882
1887
|
type: g,
|
1883
1888
|
details: D
|
1884
|
-
}, h.trackItemsMap[w.id] = w, h.trackItemIds.push(w.id),
|
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 b =
|
1921
|
+
const b = l.trackItemDetailsMap[v], y = Pn(), R = {
|
1917
1922
|
..._,
|
1918
|
-
id:
|
1923
|
+
id: y,
|
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
|
-
|
1933
|
+
l.trackItemsMap[v].display.to = g, l.trackItemsMap[y] = R, l.trackItemIds.push(y), l.trackItemDetailsMap[y] = b, l.tracks.forEach((A) => {
|
1934
|
+
A.items.includes(v) && A.items.push(y);
|
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,48 +1948,48 @@ 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((y) => {
|
1960
|
+
_.trackItemDetailsMap[y] = l.trackItemDetailsMap[y], _.trackItemsMap[y] = l.trackItemsMap[y], v.push(
|
1961
|
+
l.tracks.find((R) => R.items.includes(y))
|
1953
1962
|
);
|
1954
1963
|
});
|
1955
1964
|
const b = /* @__PURE__ */ new Set();
|
1956
|
-
v.filter((
|
1965
|
+
v.filter((y) => b.has(y.id) ? !1 : (b.add(y), !0)), _.tracks = Array.from(b.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), _ = {}, b = v.trackItemsMap, y = v.trackItemDetailsMap, R = v.tracks, A = [], O = v.activeIds.map(async (D) => {
|
1972
|
+
const w = y[D];
|
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 =
|
1979
|
+
const T = Pn();
|
1971
1980
|
return _[D] = T, g.trackItemsMap[T] = {
|
1972
1981
|
...b[D],
|
1973
1982
|
id: T
|
1974
1983
|
}, g.trackItemDetailsMap[T] = w, g.trackItemIds.push(T), !0;
|
1975
1984
|
});
|
1976
|
-
await Promise.all(
|
1985
|
+
await Promise.all(O), R.forEach((D) => {
|
1977
1986
|
const w = D.items.map((x) => _[x]), T = {
|
1978
1987
|
...D,
|
1979
1988
|
items: w,
|
1980
1989
|
id: fn()
|
1981
1990
|
};
|
1982
|
-
|
1983
|
-
}), g.tracks = [...g.tracks, ...
|
1991
|
+
A.push(T);
|
1992
|
+
}), g.tracks = [...g.tracks, ...A], t.updateState(
|
1984
1993
|
{
|
1985
1994
|
trackItemDetailsMap: g.trackItemDetailsMap,
|
1986
1995
|
tracks: g.tracks,
|
@@ -1993,20 +2002,24 @@ function qi(t) {
|
|
1993
2002
|
}
|
1994
2003
|
);
|
1995
2004
|
}
|
1996
|
-
}),
|
1997
|
-
var h,
|
1998
|
-
if (p.key ===
|
1999
|
-
const g = t.getState(), v =
|
2000
|
-
if (!
|
2001
|
-
const
|
2002
|
-
|
2003
|
-
v[
|
2004
|
-
...v[
|
2005
|
-
...
|
2006
|
-
};
|
2007
|
-
})
|
2005
|
+
}), m = f.subscribe((p) => {
|
2006
|
+
var h, l;
|
2007
|
+
if (p.key === Ai) {
|
2008
|
+
const g = tt(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, b = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2009
|
+
if (!b.length) return;
|
2010
|
+
const y = (l = p.value) == null ? void 0 : l.payload;
|
2011
|
+
b.forEach((A) => {
|
2012
|
+
y[A].details ? v[A].details = {
|
2013
|
+
...v[A].details,
|
2014
|
+
...y[A].details
|
2015
|
+
} : y[A].playbackRate && (_[A].playbackRate = y[A].playbackRate);
|
2016
|
+
});
|
2017
|
+
const R = tn(_);
|
2018
|
+
t.updateState(
|
2008
2019
|
{
|
2009
|
-
trackItemDetailsMap: { ...v }
|
2020
|
+
trackItemDetailsMap: { ...v },
|
2021
|
+
trackItemsMap: { ..._ },
|
2022
|
+
duration: R
|
2010
2023
|
},
|
2011
2024
|
{
|
2012
2025
|
updateHistory: !0,
|
@@ -2017,7 +2030,7 @@ function qi(t) {
|
|
2017
2030
|
});
|
2018
2031
|
return {
|
2019
2032
|
unsubscribe: () => {
|
2020
|
-
S.unsubscribe(), N.unsubscribe(),
|
2033
|
+
S.unsubscribe(), N.unsubscribe(), m.unsubscribe(), E.unsubscribe(), j.unsubscribe(), d.unsubscribe();
|
2021
2034
|
}
|
2022
2035
|
};
|
2023
2036
|
}
|
@@ -2036,28 +2049,28 @@ function Zn(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2036
2049
|
});
|
2037
2050
|
continue;
|
2038
2051
|
}
|
2039
|
-
const
|
2040
|
-
if (S &&
|
2041
|
-
const h = Zn(S,
|
2042
|
-
o.push.apply(o, h.map((
|
2043
|
-
} else S !==
|
2044
|
-
!(Number.isNaN(S) && Number.isNaN(
|
2052
|
+
const m = r[j], p = typeof S == "object" && typeof m == "object" && Array.isArray(S) === Array.isArray(m);
|
2053
|
+
if (S && m && p && !Ji[(E = (d = Object.getPrototypeOf(S)) == null ? void 0 : d.constructor) == null ? void 0 : E.name] && (!n.cyclesFix || !i.includes(S))) {
|
2054
|
+
const h = Zn(S, m, n, n.cyclesFix ? i.concat([S]) : []);
|
2055
|
+
o.push.apply(o, h.map((l) => (l.path.unshift(N), l)));
|
2056
|
+
} else S !== m && // treat NaN values as equivalent
|
2057
|
+
!(Number.isNaN(S) && Number.isNaN(m)) && !(p && (isNaN(S) ? S + "" == m + "" : +S == +m)) && o.push({
|
2045
2058
|
path: [N],
|
2046
2059
|
type: "CHANGE",
|
2047
|
-
value:
|
2060
|
+
value: m,
|
2048
2061
|
oldValue: S
|
2049
2062
|
});
|
2050
2063
|
}
|
2051
|
-
const
|
2064
|
+
const f = Array.isArray(r);
|
2052
2065
|
for (const j in r)
|
2053
2066
|
j in t || o.push({
|
2054
2067
|
type: "CREATE",
|
2055
|
-
path: [
|
2068
|
+
path: [f ? +j : j],
|
2056
2069
|
value: r[j]
|
2057
2070
|
});
|
2058
2071
|
return o;
|
2059
2072
|
}
|
2060
|
-
var
|
2073
|
+
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Symbol.for("immer-state"), Qn = process.env.NODE_ENV !== "production" ? [
|
2061
2074
|
// All error codes, starting by 0:
|
2062
2075
|
function(t) {
|
2063
2076
|
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 +2140,7 @@ function Mt(t) {
|
|
2127
2140
|
function he(t, r) {
|
2128
2141
|
return Mt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2129
2142
|
}
|
2130
|
-
function
|
2143
|
+
function en(t, r) {
|
2131
2144
|
return Mt(t) === 2 ? t.get(r) : t[r];
|
2132
2145
|
}
|
2133
2146
|
function ei(t, r, n) {
|
@@ -2143,10 +2156,10 @@ function _e(t) {
|
|
2143
2156
|
function ve(t) {
|
2144
2157
|
return t instanceof Set;
|
2145
2158
|
}
|
2146
|
-
function
|
2159
|
+
function Et(t) {
|
2147
2160
|
return t.copy_ || t.base_;
|
2148
2161
|
}
|
2149
|
-
function
|
2162
|
+
function pn(t, r) {
|
2150
2163
|
if (_e(t))
|
2151
2164
|
return new Map(t);
|
2152
2165
|
if (ve(t))
|
@@ -2159,13 +2172,13 @@ function ln(t, r) {
|
|
2159
2172
|
delete i[J];
|
2160
2173
|
let o = Reflect.ownKeys(i);
|
2161
2174
|
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[
|
2175
|
+
const f = o[c], d = i[f];
|
2176
|
+
d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (i[f] = {
|
2164
2177
|
configurable: !0,
|
2165
2178
|
writable: !0,
|
2166
2179
|
// could live with !!desc.set as well here...
|
2167
2180
|
enumerable: d.enumerable,
|
2168
|
-
value: t[
|
2181
|
+
value: t[f]
|
2169
2182
|
});
|
2170
2183
|
}
|
2171
2184
|
return Object.create(Ot(t), i);
|
@@ -2177,8 +2190,8 @@ function ln(t, r) {
|
|
2177
2190
|
return Object.assign(o, t);
|
2178
2191
|
}
|
2179
2192
|
}
|
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]) =>
|
2193
|
+
function vn(t, r = !1) {
|
2194
|
+
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
2195
|
}
|
2183
2196
|
function ta() {
|
2184
2197
|
G(2);
|
@@ -2186,13 +2199,13 @@ function ta() {
|
|
2186
2199
|
function nr(t) {
|
2187
2200
|
return Object.isFrozen(t);
|
2188
2201
|
}
|
2189
|
-
var
|
2202
|
+
var dn = {};
|
2190
2203
|
function Pt(t) {
|
2191
|
-
const r =
|
2204
|
+
const r = dn[t];
|
2192
2205
|
return r || G(0, t), r;
|
2193
2206
|
}
|
2194
2207
|
function ea(t, r) {
|
2195
|
-
|
2208
|
+
dn[t] || (dn[t] = r);
|
2196
2209
|
}
|
2197
2210
|
var ye;
|
2198
2211
|
function ri() {
|
@@ -2212,10 +2225,10 @@ function ra(t, r) {
|
|
2212
2225
|
function Dn(t, r) {
|
2213
2226
|
r && (Pt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2214
2227
|
}
|
2215
|
-
function dn(t) {
|
2216
|
-
hn(t), t.drafts_.forEach(na), t.drafts_ = null;
|
2217
|
-
}
|
2218
2228
|
function hn(t) {
|
2229
|
+
yn(t), t.drafts_.forEach(na), t.drafts_ = null;
|
2230
|
+
}
|
2231
|
+
function yn(t) {
|
2219
2232
|
t === ye && (ye = t.parent_);
|
2220
2233
|
}
|
2221
2234
|
function Cn(t) {
|
@@ -2228,12 +2241,12 @@ function na(t) {
|
|
2228
2241
|
function jn(t, r) {
|
2229
2242
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2230
2243
|
const n = r.drafts_[0];
|
2231
|
-
return t !== void 0 && t !== n ? (n[J].modified_ && (
|
2244
|
+
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
2245
|
n[J].base_,
|
2233
2246
|
t,
|
2234
2247
|
r.patches_,
|
2235
2248
|
r.inversePatches_
|
2236
|
-
)) : t = Ze(r, n, []),
|
2249
|
+
)) : t = Ze(r, n, []), hn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== _n ? t : void 0;
|
2237
2250
|
}
|
2238
2251
|
function Ze(t, r, n) {
|
2239
2252
|
if (nr(r))
|
@@ -2242,7 +2255,7 @@ function Ze(t, r, n) {
|
|
2242
2255
|
if (!i)
|
2243
2256
|
return de(
|
2244
2257
|
r,
|
2245
|
-
(o, c) =>
|
2258
|
+
(o, c) => Rn(t, i, r, o, c, n)
|
2246
2259
|
), r;
|
2247
2260
|
if (i.scope_ !== t)
|
2248
2261
|
return r;
|
@@ -2251,10 +2264,10 @@ function Ze(t, r, n) {
|
|
2251
2264
|
if (!i.finalized_) {
|
2252
2265
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2253
2266
|
const o = i.copy_;
|
2254
|
-
let c = o,
|
2255
|
-
i.type_ === 3 && (c = new Set(o), o.clear(),
|
2267
|
+
let c = o, f = !1;
|
2268
|
+
i.type_ === 3 && (c = new Set(o), o.clear(), f = !0), de(
|
2256
2269
|
c,
|
2257
|
-
(d, E) =>
|
2270
|
+
(d, E) => Rn(t, i, o, d, E, n, f)
|
2258
2271
|
), Qe(t, o, !1), n && t.patches_ && Pt("Patches").generatePatches_(
|
2259
2272
|
i,
|
2260
2273
|
n,
|
@@ -2264,7 +2277,7 @@ function Ze(t, r, n) {
|
|
2264
2277
|
}
|
2265
2278
|
return i.copy_;
|
2266
2279
|
}
|
2267
|
-
function
|
2280
|
+
function Rn(t, r, n, i, o, c, f) {
|
2268
2281
|
if (process.env.NODE_ENV !== "production" && o === n && G(5), xt(o)) {
|
2269
2282
|
const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2270
2283
|
!he(r.assigned_, i) ? c.concat(i) : void 0, E = Ze(t, o, d);
|
@@ -2272,7 +2285,7 @@ function Fn(t, r, n, i, o, c, l) {
|
|
2272
2285
|
t.canAutoFreeze_ = !1;
|
2273
2286
|
else
|
2274
2287
|
return;
|
2275
|
-
} else
|
2288
|
+
} else f && n.add(o);
|
2276
2289
|
if (gt(o) && !nr(o)) {
|
2277
2290
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2278
2291
|
return;
|
@@ -2280,7 +2293,7 @@ function Fn(t, r, n, i, o, c, l) {
|
|
2280
2293
|
}
|
2281
2294
|
}
|
2282
2295
|
function Qe(t, r, n = !1) {
|
2283
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
2296
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && vn(r, n);
|
2284
2297
|
}
|
2285
2298
|
function ia(t, r) {
|
2286
2299
|
const n = Array.isArray(t), i = {
|
@@ -2306,50 +2319,50 @@ function ia(t, r) {
|
|
2306
2319
|
revoke_: null,
|
2307
2320
|
isManual_: !1
|
2308
2321
|
};
|
2309
|
-
let o = i, c =
|
2322
|
+
let o = i, c = In;
|
2310
2323
|
n && (o = [i], c = me);
|
2311
|
-
const { revoke:
|
2312
|
-
return i.draft_ = d, i.revoke_ =
|
2324
|
+
const { revoke: f, proxy: d } = Proxy.revocable(o, c);
|
2325
|
+
return i.draft_ = d, i.revoke_ = f, d;
|
2313
2326
|
}
|
2314
|
-
var
|
2327
|
+
var In = {
|
2315
2328
|
get(t, r) {
|
2316
2329
|
if (r === J)
|
2317
2330
|
return t;
|
2318
|
-
const n =
|
2331
|
+
const n = Et(t);
|
2319
2332
|
if (!he(n, r))
|
2320
2333
|
return aa(t, n, r);
|
2321
2334
|
const i = n[r];
|
2322
|
-
return t.finalized_ || !gt(i) ? i : i ===
|
2335
|
+
return t.finalized_ || !gt(i) ? i : i === rn(t.base_, r) ? (nn(t), t.copy_[r] = bn(i, t)) : i;
|
2323
2336
|
},
|
2324
2337
|
has(t, r) {
|
2325
|
-
return r in
|
2338
|
+
return r in Et(t);
|
2326
2339
|
},
|
2327
2340
|
ownKeys(t) {
|
2328
|
-
return Reflect.ownKeys(
|
2341
|
+
return Reflect.ownKeys(Et(t));
|
2329
2342
|
},
|
2330
2343
|
set(t, r, n) {
|
2331
|
-
const i = ni(
|
2344
|
+
const i = ni(Et(t), r);
|
2332
2345
|
if (i != null && i.set)
|
2333
2346
|
return i.set.call(t.draft_, n), !0;
|
2334
2347
|
if (!t.modified_) {
|
2335
|
-
const o =
|
2348
|
+
const o = rn(Et(t), r), c = o == null ? void 0 : o[J];
|
2336
2349
|
if (c && c.base_ === n)
|
2337
2350
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2338
2351
|
if (Qi(n, o) && (n !== void 0 || he(t.base_, r)))
|
2339
2352
|
return !0;
|
2340
|
-
|
2353
|
+
nn(t), mn(t);
|
2341
2354
|
}
|
2342
2355
|
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
2343
2356
|
(n !== void 0 || r in t.copy_) || // special case: NaN
|
2344
2357
|
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
2345
2358
|
},
|
2346
2359
|
deleteProperty(t, r) {
|
2347
|
-
return
|
2360
|
+
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
2361
|
},
|
2349
2362
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2350
2363
|
// the same guarantee in ES5 mode.
|
2351
2364
|
getOwnPropertyDescriptor(t, r) {
|
2352
|
-
const n =
|
2365
|
+
const n = Et(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2353
2366
|
return i && {
|
2354
2367
|
writable: !0,
|
2355
2368
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2367,7 +2380,7 @@ var vn = {
|
|
2367
2380
|
G(12);
|
2368
2381
|
}
|
2369
2382
|
}, me = {};
|
2370
|
-
de(
|
2383
|
+
de(In, (t, r) => {
|
2371
2384
|
me[t] = function() {
|
2372
2385
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2373
2386
|
};
|
@@ -2376,11 +2389,11 @@ me.deleteProperty = function(t, r) {
|
|
2376
2389
|
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && G(13), me.set.call(this, t, r, void 0);
|
2377
2390
|
};
|
2378
2391
|
me.set = function(t, r, n) {
|
2379
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14),
|
2392
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
|
2380
2393
|
};
|
2381
|
-
function
|
2394
|
+
function rn(t, r) {
|
2382
2395
|
const n = t[J];
|
2383
|
-
return (n ?
|
2396
|
+
return (n ? Et(n) : t)[r];
|
2384
2397
|
}
|
2385
2398
|
function aa(t, r, n) {
|
2386
2399
|
var o;
|
@@ -2402,11 +2415,11 @@ function ni(t, r) {
|
|
2402
2415
|
n = Ot(n);
|
2403
2416
|
}
|
2404
2417
|
}
|
2405
|
-
function
|
2406
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
2418
|
+
function mn(t) {
|
2419
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && mn(t.parent_));
|
2407
2420
|
}
|
2408
|
-
function
|
2409
|
-
t.copy_ || (t.copy_ =
|
2421
|
+
function nn(t) {
|
2422
|
+
t.copy_ || (t.copy_ = pn(
|
2410
2423
|
t.base_,
|
2411
2424
|
t.scope_.immer_.useStrictShallowCopy_
|
2412
2425
|
));
|
@@ -2417,43 +2430,43 @@ var sa = class {
|
|
2417
2430
|
if (typeof r == "function" && typeof n != "function") {
|
2418
2431
|
const c = n;
|
2419
2432
|
n = r;
|
2420
|
-
const
|
2433
|
+
const f = this;
|
2421
2434
|
return function(E = c, ...j) {
|
2422
|
-
return
|
2435
|
+
return f.produce(E, (S) => n.call(this, S, ...j));
|
2423
2436
|
};
|
2424
2437
|
}
|
2425
2438
|
typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
|
2426
2439
|
let o;
|
2427
2440
|
if (gt(r)) {
|
2428
|
-
const c = Cn(this),
|
2441
|
+
const c = Cn(this), f = bn(r, void 0);
|
2429
2442
|
let d = !0;
|
2430
2443
|
try {
|
2431
|
-
o = n(
|
2444
|
+
o = n(f), d = !1;
|
2432
2445
|
} finally {
|
2433
|
-
d ?
|
2446
|
+
d ? hn(c) : yn(c);
|
2434
2447
|
}
|
2435
2448
|
return Dn(c, i), jn(o, c);
|
2436
2449
|
} 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,
|
2450
|
+
if (o = n(r), o === void 0 && (o = r), o === _n && (o = void 0), this.autoFreeze_ && vn(o, !0), i) {
|
2451
|
+
const c = [], f = [];
|
2452
|
+
Pt("Patches").generateReplacementPatches_(r, o, c, f), i(c, f);
|
2440
2453
|
}
|
2441
2454
|
return o;
|
2442
2455
|
} else
|
2443
2456
|
G(1, r);
|
2444
2457
|
}, this.produceWithPatches = (r, n) => {
|
2445
2458
|
if (typeof r == "function")
|
2446
|
-
return (
|
2459
|
+
return (f, ...d) => this.produceWithPatches(f, (E) => r(E, ...d));
|
2447
2460
|
let i, o;
|
2448
|
-
return [this.produce(r, n, (
|
2449
|
-
i =
|
2461
|
+
return [this.produce(r, n, (f, d) => {
|
2462
|
+
i = f, o = d;
|
2450
2463
|
}), i, o];
|
2451
2464
|
}, 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
2465
|
}
|
2453
2466
|
createDraft(t) {
|
2454
2467
|
gt(t) || G(8), xt(t) && (t = oa(t));
|
2455
|
-
const r = Cn(this), n =
|
2456
|
-
return n[J].isManual_ = !0,
|
2468
|
+
const r = Cn(this), n = bn(t, void 0);
|
2469
|
+
return n[J].isManual_ = !0, yn(r), n;
|
2457
2470
|
}
|
2458
2471
|
finishDraft(t, r) {
|
2459
2472
|
const n = t && t[J];
|
@@ -2494,7 +2507,7 @@ var sa = class {
|
|
2494
2507
|
);
|
2495
2508
|
}
|
2496
2509
|
};
|
2497
|
-
function
|
2510
|
+
function bn(t, r) {
|
2498
2511
|
const n = _e(t) ? Pt("MapSet").proxyMap_(t, r) : ve(t) ? Pt("MapSet").proxySet_(t, r) : ia(t, r);
|
2499
2512
|
return (r ? r.scope_ : ri()).drafts_.push(n), n;
|
2500
2513
|
}
|
@@ -2509,202 +2522,202 @@ function ii(t) {
|
|
2509
2522
|
if (r) {
|
2510
2523
|
if (!r.modified_)
|
2511
2524
|
return r.base_;
|
2512
|
-
r.finalized_ = !0, n =
|
2525
|
+
r.finalized_ = !0, n = pn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2513
2526
|
} else
|
2514
|
-
n =
|
2527
|
+
n = pn(t, !0);
|
2515
2528
|
return de(n, (i, o) => {
|
2516
2529
|
ei(n, i, ii(o));
|
2517
2530
|
}), r && (r.finalized_ = !1), n;
|
2518
2531
|
}
|
2519
|
-
function
|
2532
|
+
function Fn() {
|
2520
2533
|
process.env.NODE_ENV !== "production" && Qn.push(
|
2521
2534
|
'Sets cannot have "replace" patches.',
|
2522
|
-
function(
|
2523
|
-
return "Unsupported patch operation: " +
|
2535
|
+
function(m) {
|
2536
|
+
return "Unsupported patch operation: " + m;
|
2524
2537
|
},
|
2525
|
-
function(
|
2526
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2538
|
+
function(m) {
|
2539
|
+
return "Cannot apply patch, path doesn't resolve: " + m;
|
2527
2540
|
},
|
2528
2541
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2529
2542
|
);
|
2530
2543
|
const r = "replace", n = "add", i = "remove";
|
2531
|
-
function o(
|
2532
|
-
switch (
|
2544
|
+
function o(m, p, h, l) {
|
2545
|
+
switch (m.type_) {
|
2533
2546
|
case 0:
|
2534
2547
|
case 2:
|
2535
|
-
return
|
2536
|
-
|
2548
|
+
return f(
|
2549
|
+
m,
|
2537
2550
|
p,
|
2538
2551
|
h,
|
2539
|
-
|
2552
|
+
l
|
2540
2553
|
);
|
2541
2554
|
case 1:
|
2542
|
-
return c(
|
2555
|
+
return c(m, p, h, l);
|
2543
2556
|
case 3:
|
2544
2557
|
return d(
|
2545
|
-
|
2558
|
+
m,
|
2546
2559
|
p,
|
2547
2560
|
h,
|
2548
|
-
|
2561
|
+
l
|
2549
2562
|
);
|
2550
2563
|
}
|
2551
2564
|
}
|
2552
|
-
function c(
|
2553
|
-
let { base_: g, assigned_: v } =
|
2554
|
-
_.length < g.length && ([g, _] = [_, g], [h,
|
2565
|
+
function c(m, p, h, l) {
|
2566
|
+
let { base_: g, assigned_: v } = m, _ = m.copy_;
|
2567
|
+
_.length < g.length && ([g, _] = [_, g], [h, l] = [l, h]);
|
2555
2568
|
for (let b = 0; b < g.length; b++)
|
2556
2569
|
if (v[b] && _[b] !== g[b]) {
|
2557
|
-
const
|
2570
|
+
const y = p.concat([b]);
|
2558
2571
|
h.push({
|
2559
2572
|
op: r,
|
2560
|
-
path:
|
2573
|
+
path: y,
|
2561
2574
|
// Need to maybe clone it, as it can in fact be the original value
|
2562
2575
|
// due to the base/copy inversion at the start of this function
|
2563
2576
|
value: N(_[b])
|
2564
|
-
}),
|
2577
|
+
}), l.push({
|
2565
2578
|
op: r,
|
2566
|
-
path:
|
2579
|
+
path: y,
|
2567
2580
|
value: N(g[b])
|
2568
2581
|
});
|
2569
2582
|
}
|
2570
2583
|
for (let b = g.length; b < _.length; b++) {
|
2571
|
-
const
|
2584
|
+
const y = p.concat([b]);
|
2572
2585
|
h.push({
|
2573
2586
|
op: n,
|
2574
|
-
path:
|
2587
|
+
path: y,
|
2575
2588
|
// Need to maybe clone it, as it can in fact be the original value
|
2576
2589
|
// due to the base/copy inversion at the start of this function
|
2577
2590
|
value: N(_[b])
|
2578
2591
|
});
|
2579
2592
|
}
|
2580
2593
|
for (let b = _.length - 1; g.length <= b; --b) {
|
2581
|
-
const
|
2582
|
-
|
2594
|
+
const y = p.concat([b]);
|
2595
|
+
l.push({
|
2583
2596
|
op: i,
|
2584
|
-
path:
|
2597
|
+
path: y
|
2585
2598
|
});
|
2586
2599
|
}
|
2587
2600
|
}
|
2588
|
-
function
|
2589
|
-
const { base_: g, copy_: v } =
|
2590
|
-
de(
|
2591
|
-
const
|
2592
|
-
if (
|
2601
|
+
function f(m, p, h, l) {
|
2602
|
+
const { base_: g, copy_: v } = m;
|
2603
|
+
de(m.assigned_, (_, b) => {
|
2604
|
+
const y = en(g, _), R = en(v, _), A = b ? he(g, _) ? r : n : i;
|
2605
|
+
if (y === R && A === r)
|
2593
2606
|
return;
|
2594
|
-
const
|
2595
|
-
h.push(
|
2596
|
-
|
2607
|
+
const O = p.concat(_);
|
2608
|
+
h.push(A === i ? { op: A, path: O } : { op: A, path: O, value: R }), l.push(
|
2609
|
+
A === n ? { op: i, path: O } : A === i ? { op: n, path: O, value: N(y) } : { op: r, path: O, value: N(y) }
|
2597
2610
|
);
|
2598
2611
|
});
|
2599
2612
|
}
|
2600
|
-
function d(
|
2601
|
-
let { base_: g, copy_: v } =
|
2613
|
+
function d(m, p, h, l) {
|
2614
|
+
let { base_: g, copy_: v } = m, _ = 0;
|
2602
2615
|
g.forEach((b) => {
|
2603
2616
|
if (!v.has(b)) {
|
2604
|
-
const
|
2617
|
+
const y = p.concat([_]);
|
2605
2618
|
h.push({
|
2606
2619
|
op: i,
|
2607
|
-
path:
|
2620
|
+
path: y,
|
2608
2621
|
value: b
|
2609
|
-
}),
|
2622
|
+
}), l.unshift({
|
2610
2623
|
op: n,
|
2611
|
-
path:
|
2624
|
+
path: y,
|
2612
2625
|
value: b
|
2613
2626
|
});
|
2614
2627
|
}
|
2615
2628
|
_++;
|
2616
2629
|
}), _ = 0, v.forEach((b) => {
|
2617
2630
|
if (!g.has(b)) {
|
2618
|
-
const
|
2631
|
+
const y = p.concat([_]);
|
2619
2632
|
h.push({
|
2620
2633
|
op: n,
|
2621
|
-
path:
|
2634
|
+
path: y,
|
2622
2635
|
value: b
|
2623
|
-
}),
|
2636
|
+
}), l.unshift({
|
2624
2637
|
op: i,
|
2625
|
-
path:
|
2638
|
+
path: y,
|
2626
2639
|
value: b
|
2627
2640
|
});
|
2628
2641
|
}
|
2629
2642
|
_++;
|
2630
2643
|
});
|
2631
2644
|
}
|
2632
|
-
function E(
|
2645
|
+
function E(m, p, h, l) {
|
2633
2646
|
h.push({
|
2634
2647
|
op: r,
|
2635
2648
|
path: [],
|
2636
|
-
value: p ===
|
2637
|
-
}),
|
2649
|
+
value: p === _n ? void 0 : p
|
2650
|
+
}), l.push({
|
2638
2651
|
op: r,
|
2639
2652
|
path: [],
|
2640
|
-
value:
|
2653
|
+
value: m
|
2641
2654
|
});
|
2642
2655
|
}
|
2643
|
-
function j(
|
2656
|
+
function j(m, p) {
|
2644
2657
|
return p.forEach((h) => {
|
2645
|
-
const { path:
|
2646
|
-
let v =
|
2647
|
-
for (let
|
2648
|
-
const
|
2649
|
-
let
|
2650
|
-
typeof
|
2658
|
+
const { path: l, op: g } = h;
|
2659
|
+
let v = m;
|
2660
|
+
for (let R = 0; R < l.length - 1; R++) {
|
2661
|
+
const A = Mt(v);
|
2662
|
+
let O = l[R];
|
2663
|
+
typeof O != "string" && typeof O != "number" && (O = "" + O), (A === 0 || A === 1) && (O === "__proto__" || O === "constructor") && G(19), typeof v == "function" && O === "prototype" && G(19), v = en(v, O), typeof v != "object" && G(18, l.join("/"));
|
2651
2664
|
}
|
2652
|
-
const _ = Mt(v), b = S(h.value),
|
2665
|
+
const _ = Mt(v), b = S(h.value), y = l[l.length - 1];
|
2653
2666
|
switch (g) {
|
2654
2667
|
case r:
|
2655
2668
|
switch (_) {
|
2656
2669
|
case 2:
|
2657
|
-
return v.set(
|
2670
|
+
return v.set(y, b);
|
2658
2671
|
case 3:
|
2659
2672
|
G(16);
|
2660
2673
|
default:
|
2661
|
-
return v[
|
2674
|
+
return v[y] = b;
|
2662
2675
|
}
|
2663
2676
|
case n:
|
2664
2677
|
switch (_) {
|
2665
2678
|
case 1:
|
2666
|
-
return
|
2679
|
+
return y === "-" ? v.push(b) : v.splice(y, 0, b);
|
2667
2680
|
case 2:
|
2668
|
-
return v.set(
|
2681
|
+
return v.set(y, b);
|
2669
2682
|
case 3:
|
2670
2683
|
return v.add(b);
|
2671
2684
|
default:
|
2672
|
-
return v[
|
2685
|
+
return v[y] = b;
|
2673
2686
|
}
|
2674
2687
|
case i:
|
2675
2688
|
switch (_) {
|
2676
2689
|
case 1:
|
2677
|
-
return v.splice(
|
2690
|
+
return v.splice(y, 1);
|
2678
2691
|
case 2:
|
2679
|
-
return v.delete(
|
2692
|
+
return v.delete(y);
|
2680
2693
|
case 3:
|
2681
2694
|
return v.delete(h.value);
|
2682
2695
|
default:
|
2683
|
-
return delete v[
|
2696
|
+
return delete v[y];
|
2684
2697
|
}
|
2685
2698
|
default:
|
2686
2699
|
G(17, g);
|
2687
2700
|
}
|
2688
|
-
}),
|
2689
|
-
}
|
2690
|
-
function S(
|
2691
|
-
if (!gt(
|
2692
|
-
return
|
2693
|
-
if (Array.isArray(
|
2694
|
-
return
|
2695
|
-
if (_e(
|
2701
|
+
}), m;
|
2702
|
+
}
|
2703
|
+
function S(m) {
|
2704
|
+
if (!gt(m))
|
2705
|
+
return m;
|
2706
|
+
if (Array.isArray(m))
|
2707
|
+
return m.map(S);
|
2708
|
+
if (_e(m))
|
2696
2709
|
return new Map(
|
2697
|
-
Array.from(
|
2710
|
+
Array.from(m.entries()).map(([h, l]) => [h, S(l)])
|
2698
2711
|
);
|
2699
|
-
if (ve(
|
2700
|
-
return new Set(Array.from(
|
2701
|
-
const p = Object.create(Ot(
|
2702
|
-
for (const h in
|
2703
|
-
p[h] = S(
|
2704
|
-
return he(
|
2712
|
+
if (ve(m))
|
2713
|
+
return new Set(Array.from(m).map(S));
|
2714
|
+
const p = Object.create(Ot(m));
|
2715
|
+
for (const h in m)
|
2716
|
+
p[h] = S(m[h]);
|
2717
|
+
return he(m, pe) && (p[pe] = m[pe]), p;
|
2705
2718
|
}
|
2706
|
-
function N(
|
2707
|
-
return xt(
|
2719
|
+
function N(m) {
|
2720
|
+
return xt(m) ? S(m) : m;
|
2708
2721
|
}
|
2709
2722
|
ea("Patches", {
|
2710
2723
|
applyPatches_: j,
|
@@ -2721,7 +2734,7 @@ Z.setUseStrictShallowCopy.bind(Z);
|
|
2721
2734
|
var ua = Z.applyPatches.bind(Z);
|
2722
2735
|
Z.createDraft.bind(Z);
|
2723
2736
|
Z.finishDraft.bind(Z);
|
2724
|
-
var
|
2737
|
+
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
2738
|
function _a(t, r, n) {
|
2726
2739
|
switch (n.length) {
|
2727
2740
|
case 0:
|
@@ -2745,35 +2758,35 @@ function Ia(t, r) {
|
|
2745
2758
|
t[o + n] = r[n];
|
2746
2759
|
return t;
|
2747
2760
|
}
|
2748
|
-
var
|
2761
|
+
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
2762
|
function Ta(t, r, n, i, o) {
|
2750
|
-
var c = -1,
|
2751
|
-
for (n || (n = Oa), o || (o = []); ++c <
|
2763
|
+
var c = -1, f = t.length;
|
2764
|
+
for (n || (n = Oa), o || (o = []); ++c < f; ) {
|
2752
2765
|
var d = t[c];
|
2753
2766
|
n(d) ? Ia(o, d) : o[o.length] = d;
|
2754
2767
|
}
|
2755
2768
|
return o;
|
2756
2769
|
}
|
2757
|
-
function
|
2758
|
-
return t = Object(t),
|
2770
|
+
function ka(t, r) {
|
2771
|
+
return t = Object(t), Aa(t, r, function(n, i) {
|
2759
2772
|
return i in t;
|
2760
2773
|
});
|
2761
2774
|
}
|
2762
|
-
function
|
2775
|
+
function Aa(t, r, n) {
|
2763
2776
|
for (var i = -1, o = r.length, c = {}; ++i < o; ) {
|
2764
|
-
var
|
2765
|
-
n(d,
|
2777
|
+
var f = r[i], d = t[f];
|
2778
|
+
n(d, f) && (c[f] = d);
|
2766
2779
|
}
|
2767
2780
|
return c;
|
2768
2781
|
}
|
2769
|
-
function
|
2782
|
+
function Ea(t, r) {
|
2770
2783
|
return r = Nn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2771
2784
|
for (var n = arguments, i = -1, o = Nn(n.length - r, 0), c = Array(o); ++i < o; )
|
2772
2785
|
c[i] = n[r + i];
|
2773
2786
|
i = -1;
|
2774
|
-
for (var
|
2775
|
-
|
2776
|
-
return
|
2787
|
+
for (var f = Array(r + 1); ++i < r; )
|
2788
|
+
f[i] = n[i];
|
2789
|
+
return f[r] = c, _a(t, this, f);
|
2777
2790
|
};
|
2778
2791
|
}
|
2779
2792
|
function Oa(t) {
|
@@ -2783,26 +2796,26 @@ function xa(t) {
|
|
2783
2796
|
if (typeof t == "string" || za(t))
|
2784
2797
|
return t;
|
2785
2798
|
var r = t + "";
|
2786
|
-
return r == "0" && 1 / t == -
|
2799
|
+
return r == "0" && 1 / t == -la ? "-0" : r;
|
2787
2800
|
}
|
2788
2801
|
function Ma(t) {
|
2789
|
-
return Ca(t) && Sa.call(t, "callee") && (!wa.call(t, "callee") ||
|
2802
|
+
return Ca(t) && Sa.call(t, "callee") && (!wa.call(t, "callee") || wn.call(t) == pa);
|
2790
2803
|
}
|
2791
2804
|
var Pa = Array.isArray;
|
2792
2805
|
function Da(t) {
|
2793
|
-
return t != null &&
|
2806
|
+
return t != null && Ra(t.length) && !ja(t);
|
2794
2807
|
}
|
2795
2808
|
function Ca(t) {
|
2796
2809
|
return ai(t) && Da(t);
|
2797
2810
|
}
|
2798
2811
|
function ja(t) {
|
2799
|
-
var r =
|
2812
|
+
var r = Fa(t) ? wn.call(t) : "";
|
2800
2813
|
return r == da || r == ha;
|
2801
2814
|
}
|
2802
|
-
function Fa(t) {
|
2803
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= la;
|
2804
|
-
}
|
2805
2815
|
function Ra(t) {
|
2816
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= fa;
|
2817
|
+
}
|
2818
|
+
function Fa(t) {
|
2806
2819
|
var r = typeof t;
|
2807
2820
|
return !!t && (r == "object" || r == "function");
|
2808
2821
|
}
|
@@ -2810,12 +2823,12 @@ function ai(t) {
|
|
2810
2823
|
return !!t && typeof t == "object";
|
2811
2824
|
}
|
2812
2825
|
function za(t) {
|
2813
|
-
return typeof t == "symbol" || ai(t) &&
|
2826
|
+
return typeof t == "symbol" || ai(t) && wn.call(t) == ya;
|
2814
2827
|
}
|
2815
|
-
var Ha =
|
2816
|
-
return t == null ? {} :
|
2828
|
+
var Ha = Ea(function(t, r) {
|
2829
|
+
return t == null ? {} : ka(t, va(Ta(r), xa));
|
2817
2830
|
}), Na = Ha;
|
2818
|
-
const Un = /* @__PURE__ */
|
2831
|
+
const Un = /* @__PURE__ */ gn(Na), Ua = {
|
2819
2832
|
tracks: [],
|
2820
2833
|
trackItemIds: [],
|
2821
2834
|
trackItemsMap: {},
|
@@ -2839,14 +2852,14 @@ const Un = /* @__PURE__ */ bn(Na), Ua = {
|
|
2839
2852
|
];
|
2840
2853
|
class Wa {
|
2841
2854
|
constructor(r) {
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
2846
|
-
|
2847
|
-
|
2855
|
+
At(this, "stateSubject");
|
2856
|
+
At(this, "stateHistorySubject");
|
2857
|
+
At(this, "prevState");
|
2858
|
+
At(this, "undos", []);
|
2859
|
+
At(this, "redos", []);
|
2860
|
+
At(this, "listener");
|
2848
2861
|
const n = r || Ua;
|
2849
|
-
this.stateSubject = new
|
2862
|
+
this.stateSubject = new Mn(n), this.stateHistorySubject = new Mn({
|
2850
2863
|
handleRedo: !1,
|
2851
2864
|
handleUndo: !1
|
2852
2865
|
}), this.prevState = n, this.initListeners();
|
@@ -2884,17 +2897,22 @@ class Wa {
|
|
2884
2897
|
...i,
|
2885
2898
|
...r
|
2886
2899
|
};
|
2887
|
-
|
2900
|
+
st(i, o) || (n.updateHistory && this.updateHistory(o, n.kind), this.prevState = i, this.stateSubject.next(o));
|
2888
2901
|
}
|
2889
2902
|
// Selectively subscribe to scale changes
|
2890
2903
|
subscribeToScale(r) {
|
2891
2904
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2892
|
-
|
2905
|
+
st(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
2906
|
+
});
|
2907
|
+
}
|
2908
|
+
subscribeToUpdateTrackItem(r) {
|
2909
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
2910
|
+
st(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
2893
2911
|
});
|
2894
2912
|
}
|
2895
2913
|
subscribeToUpdateItemDetails(r) {
|
2896
2914
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2897
|
-
|
2915
|
+
st(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
2898
2916
|
});
|
2899
2917
|
}
|
2900
2918
|
// Selectively subscribe to duration changes
|
@@ -2917,19 +2935,19 @@ class Wa {
|
|
2917
2935
|
}
|
2918
2936
|
subscribeToAddOrRemoveItems(r) {
|
2919
2937
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2920
|
-
|
2938
|
+
st(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
2921
2939
|
});
|
2922
2940
|
}
|
2923
2941
|
// Selectively subscribe to activeIds changes
|
2924
2942
|
subscribeToActiveIds(r) {
|
2925
2943
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2926
|
-
|
2944
|
+
st(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
2927
2945
|
});
|
2928
2946
|
}
|
2929
2947
|
// Selectively subscribe to multiple track-related properties
|
2930
2948
|
subscribeToTracks(r) {
|
2931
2949
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2932
|
-
(!
|
2950
|
+
(!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
2951
|
tracks: n.tracks,
|
2934
2952
|
trackItemIds: n.trackItemIds,
|
2935
2953
|
trackItemsMap: n.trackItemsMap,
|
@@ -2942,22 +2960,22 @@ class Wa {
|
|
2942
2960
|
undo() {
|
2943
2961
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
2944
2962
|
if (!n || !i) return;
|
2945
|
-
|
2963
|
+
Fn();
|
2946
2964
|
const {
|
2947
2965
|
trackItemDetailsMap: o,
|
2948
2966
|
trackItemIds: c,
|
2949
|
-
tracks:
|
2967
|
+
tracks: f,
|
2950
2968
|
transitionIds: d,
|
2951
2969
|
transitionsMap: E,
|
2952
2970
|
trackItemsMap: j
|
2953
2971
|
} = this.getState(), S = tt({
|
2954
2972
|
trackItemDetailsMap: o,
|
2955
2973
|
trackItemIds: c,
|
2956
|
-
tracks:
|
2974
|
+
tracks: f,
|
2957
2975
|
transitionIds: d,
|
2958
2976
|
transitionsMap: E,
|
2959
2977
|
trackItemsMap: j
|
2960
|
-
}), N = [],
|
2978
|
+
}), N = [], m = [], p = [], h = [], l = [], g = [];
|
2961
2979
|
n.forEach((T) => {
|
2962
2980
|
let x;
|
2963
2981
|
const F = T.path.slice(1);
|
@@ -2973,34 +2991,34 @@ class Wa {
|
|
2973
2991
|
path: F,
|
2974
2992
|
op: "add",
|
2975
2993
|
value: T.oldValue
|
2976
|
-
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ?
|
2994
|
+
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("tracks") ? N.push(x) : T.path.includes("trackItemDetailsMap") && g.push(x);
|
2977
2995
|
});
|
2978
2996
|
const v = this.applyPatch(
|
2979
2997
|
S.tracks,
|
2980
2998
|
N
|
2981
2999
|
), _ = this.applyPatch(
|
2982
3000
|
S.transitionIds,
|
2983
|
-
|
3001
|
+
m
|
2984
3002
|
), b = this.applyPatch(
|
2985
3003
|
S.trackItemIds,
|
2986
3004
|
p
|
2987
|
-
),
|
3005
|
+
), y = this.applyPatch(
|
2988
3006
|
S.transitionsMap,
|
2989
3007
|
h
|
2990
|
-
),
|
3008
|
+
), R = this.applyPatch(
|
2991
3009
|
S.trackItemsMap,
|
2992
|
-
|
2993
|
-
),
|
3010
|
+
l
|
3011
|
+
), A = this.applyPatch(
|
2994
3012
|
S.trackItemDetailsMap,
|
2995
3013
|
g
|
2996
|
-
),
|
3014
|
+
), O = tt({
|
2997
3015
|
tracks: v,
|
2998
3016
|
transitionIds: _,
|
2999
3017
|
trackItemIds: b,
|
3000
|
-
transitionsMap:
|
3001
|
-
trackItemsMap:
|
3002
|
-
trackItemDetailsMap:
|
3003
|
-
}), D = tt(this.getState()), w = { ...D, ...
|
3018
|
+
transitionsMap: y,
|
3019
|
+
trackItemsMap: R,
|
3020
|
+
trackItemDetailsMap: A
|
3021
|
+
}), D = tt(this.getState()), w = { ...D, ...O };
|
3004
3022
|
this.prevState = D, this.redos.push({ redos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3005
3023
|
}
|
3006
3024
|
applyPatch(r, n) {
|
@@ -3011,22 +3029,22 @@ class Wa {
|
|
3011
3029
|
redo() {
|
3012
3030
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
3013
3031
|
if (!n || !i) return;
|
3014
|
-
|
3032
|
+
Fn();
|
3015
3033
|
const {
|
3016
3034
|
trackItemDetailsMap: o,
|
3017
3035
|
trackItemIds: c,
|
3018
|
-
tracks:
|
3036
|
+
tracks: f,
|
3019
3037
|
transitionIds: d,
|
3020
3038
|
transitionsMap: E,
|
3021
3039
|
trackItemsMap: j
|
3022
3040
|
} = this.getState(), S = tt({
|
3023
3041
|
trackItemDetailsMap: o,
|
3024
3042
|
trackItemIds: c,
|
3025
|
-
tracks:
|
3043
|
+
tracks: f,
|
3026
3044
|
transitionIds: d,
|
3027
3045
|
transitionsMap: E,
|
3028
3046
|
trackItemsMap: j
|
3029
|
-
}), N = [],
|
3047
|
+
}), N = [], m = [], p = [], h = [], l = [], g = [];
|
3030
3048
|
n.forEach((T) => {
|
3031
3049
|
let x;
|
3032
3050
|
const F = T.path.slice(1);
|
@@ -3042,34 +3060,34 @@ class Wa {
|
|
3042
3060
|
path: F,
|
3043
3061
|
op: "remove",
|
3044
3062
|
value: T.oldValue
|
3045
|
-
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ?
|
3063
|
+
}, T.path.includes("trackItemIds") ? p.push(x) : T.path.includes("transitionIds") ? m.push(x) : T.path.includes("trackItemsMap") ? l.push(x) : T.path.includes("transitionsMap") ? h.push(x) : T.path.includes("trackItemDetailsMap") ? g.push(x) : N.push(x);
|
3046
3064
|
});
|
3047
3065
|
const v = this.applyPatch(
|
3048
3066
|
S.tracks,
|
3049
3067
|
N
|
3050
3068
|
), _ = this.applyPatch(
|
3051
3069
|
S.transitionIds,
|
3052
|
-
|
3070
|
+
m
|
3053
3071
|
), b = this.applyPatch(
|
3054
3072
|
S.trackItemIds,
|
3055
3073
|
p
|
3056
|
-
),
|
3074
|
+
), y = this.applyPatch(
|
3057
3075
|
S.transitionsMap,
|
3058
3076
|
h
|
3059
|
-
),
|
3077
|
+
), R = this.applyPatch(
|
3060
3078
|
S.trackItemsMap,
|
3061
|
-
|
3062
|
-
),
|
3079
|
+
l
|
3080
|
+
), A = this.applyPatch(
|
3063
3081
|
S.trackItemDetailsMap,
|
3064
3082
|
g
|
3065
|
-
),
|
3083
|
+
), O = tt({
|
3066
3084
|
tracks: v,
|
3067
3085
|
transitionIds: _,
|
3068
3086
|
trackItemIds: b,
|
3069
|
-
transitionsMap:
|
3070
|
-
trackItemsMap:
|
3071
|
-
trackItemDetailsMap:
|
3072
|
-
}), D = tt(this.getState()), w = { ...D, ...
|
3087
|
+
transitionsMap: y,
|
3088
|
+
trackItemsMap: R,
|
3089
|
+
trackItemDetailsMap: A
|
3090
|
+
}), D = tt(this.getState()), w = { ...D, ...O };
|
3073
3091
|
this.prevState = D, this.undos.push({ undos: n, type: i }), this.stateSubject.next(w), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3074
3092
|
}
|
3075
3093
|
}
|