@designcombo/state 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +643 -590
- package/dist/index.umd.js +2 -2
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var At = (t, r, n) =>
|
4
|
-
import { subject as $t, filter as Kt, DESIGN_PREFIX as
|
5
|
-
var
|
6
|
-
return
|
1
|
+
var fi = Object.defineProperty;
|
2
|
+
var pi = (t, r, n) => r in t ? fi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
|
+
var At = (t, r, n) => pi(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
+
import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i, HISTORY_UNDO as vi, HISTORY_REDO as Ii, LAYER_DELETE as Si, ADD_CAPTION as wi, ADD_TEXT as Ti, ADD_IMAGE as ki, ADD_AUDIO as Ai, ADD_VIDEO as Ei, ACTIVE_SPLIT as Oi, ACTIVE_CLONE as xi, ACTIVE_PASTE as Mi, EDIT_OBJECT as Pi } from "@designcombo/events";
|
5
|
+
var nn = function(t, r) {
|
6
|
+
return nn = 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
|
+
}, nn(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
|
+
nn(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 an(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,7 +28,7 @@ function sn(t) {
|
|
28
28
|
};
|
29
29
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function sn(t, r) {
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!n) return t;
|
34
34
|
var i = n.call(t), o, c = [], f;
|
@@ -45,7 +45,7 @@ function on(t, r) {
|
|
45
45
|
}
|
46
46
|
return c;
|
47
47
|
}
|
48
|
-
function
|
48
|
+
function on(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));
|
@@ -53,13 +53,13 @@ function cn(t, r, n) {
|
|
53
53
|
function yt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
|
-
function
|
56
|
+
function Yn(t) {
|
57
57
|
var r = function(i) {
|
58
58
|
Error.call(i), i.stack = new Error().stack;
|
59
59
|
}, n = t(r);
|
60
60
|
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
61
61
|
}
|
62
|
-
var Zr =
|
62
|
+
var Zr = Yn(function(t) {
|
63
63
|
return function(n) {
|
64
64
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
65
65
|
` + n.map(function(i, o) {
|
@@ -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 cn(t, r) {
|
72
72
|
if (t) {
|
73
73
|
var n = t.indexOf(r);
|
74
74
|
0 <= n && t.splice(n, 1);
|
@@ -86,25 +86,25 @@ var tr = function() {
|
|
86
86
|
if (f)
|
87
87
|
if (this._parentage = null, Array.isArray(f))
|
88
88
|
try {
|
89
|
-
for (var d =
|
90
|
-
var
|
91
|
-
|
89
|
+
for (var d = an(f), M = d.next(); !M.done; M = d.next()) {
|
90
|
+
var R = M.value;
|
91
|
+
R.remove(this);
|
92
92
|
}
|
93
93
|
} catch (l) {
|
94
94
|
r = { error: l };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
|
97
|
+
M && !M.done && (n = d.return) && n.call(d);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
f.remove(this);
|
104
|
-
var
|
105
|
-
if (yt(
|
104
|
+
var T = this.initialTeardown;
|
105
|
+
if (yt(T))
|
106
106
|
try {
|
107
|
-
|
107
|
+
T();
|
108
108
|
} catch (l) {
|
109
109
|
c = l instanceof Zr ? l.errors : [l];
|
110
110
|
}
|
@@ -112,19 +112,19 @@ var tr = function() {
|
|
112
112
|
if (H) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var
|
115
|
+
for (var y = an(H), p = y.next(); !p.done; p = y.next()) {
|
116
116
|
var h = p.value;
|
117
117
|
try {
|
118
118
|
kn(h);
|
119
119
|
} catch (l) {
|
120
|
-
c = c ?? [], l instanceof Zr ? c =
|
120
|
+
c = c ?? [], l instanceof Zr ? c = on(on([], sn(c)), sn(l.errors)) : c.push(l);
|
121
121
|
}
|
122
122
|
}
|
123
123
|
} catch (l) {
|
124
124
|
i = { error: l };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
p && !p.done && (o =
|
127
|
+
p && !p.done && (o = y.return) && o.call(y);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
@@ -154,57 +154,57 @@ 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) && cn(n, r);
|
158
158
|
}, t.prototype.remove = function(r) {
|
159
159
|
var n = this._finalizers;
|
160
|
-
n &&
|
160
|
+
n && cn(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;
|
164
164
|
}(), t;
|
165
|
-
}(),
|
166
|
-
function
|
165
|
+
}(), Vn = tr.EMPTY;
|
166
|
+
function Xn(t) {
|
167
167
|
return t instanceof tr || t && "closed" in t && yt(t.remove) && yt(t.add) && yt(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function kn(t) {
|
170
170
|
yt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
|
-
var
|
172
|
+
var qn = {
|
173
173
|
onUnhandledError: null,
|
174
174
|
onStoppedNotification: null,
|
175
175
|
Promise: void 0,
|
176
176
|
useDeprecatedSynchronousErrorHandling: !1,
|
177
177
|
useDeprecatedNextContext: !1
|
178
|
-
},
|
178
|
+
}, Jn = {
|
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, on([t, r], sn(n)));
|
183
183
|
},
|
184
184
|
clearTimeout: function(t) {
|
185
|
-
var r =
|
185
|
+
var r = Jn.delegate;
|
186
186
|
return ((r == null ? void 0 : r.clearTimeout) || clearTimeout)(t);
|
187
187
|
},
|
188
188
|
delegate: void 0
|
189
189
|
};
|
190
|
-
function
|
191
|
-
|
190
|
+
function Di(t) {
|
191
|
+
Jn.setTimeout(function() {
|
192
192
|
throw t;
|
193
193
|
});
|
194
194
|
}
|
195
195
|
function An() {
|
196
196
|
}
|
197
|
-
function
|
197
|
+
function Xe(t) {
|
198
198
|
t();
|
199
199
|
}
|
200
|
-
var
|
200
|
+
var Zn = function(t) {
|
201
201
|
be(r, t);
|
202
202
|
function r(n) {
|
203
203
|
var i = t.call(this) || this;
|
204
|
-
return i.isStopped = !1, n ? (i.destination = n,
|
204
|
+
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination = Fi, i;
|
205
205
|
}
|
206
206
|
return r.create = function(n, i, o) {
|
207
|
-
return new
|
207
|
+
return new un(n, i, o);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -228,11 +228,11 @@ var Yn = function(t) {
|
|
228
228
|
this.unsubscribe();
|
229
229
|
}
|
230
230
|
}, r;
|
231
|
-
}(tr),
|
231
|
+
}(tr), Ci = Function.prototype.bind;
|
232
232
|
function Qr(t, r) {
|
233
|
-
return
|
233
|
+
return Ci.call(t, r);
|
234
234
|
}
|
235
|
-
var
|
235
|
+
var ji = function() {
|
236
236
|
function t(r) {
|
237
237
|
this.partialObserver = r;
|
238
238
|
}
|
@@ -263,7 +263,7 @@ var xi = function() {
|
|
263
263
|
Ye(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
|
-
}(),
|
266
|
+
}(), un = function(t) {
|
267
267
|
be(r, t);
|
268
268
|
function r(n, i, o) {
|
269
269
|
var c = t.call(this) || this, f;
|
@@ -275,7 +275,7 @@ var xi = function() {
|
|
275
275
|
};
|
276
276
|
else {
|
277
277
|
var d;
|
278
|
-
c &&
|
278
|
+
c && qn.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),
|
@@ -283,29 +283,29 @@ var xi = function() {
|
|
283
283
|
complete: n.complete && Qr(n.complete, d)
|
284
284
|
}) : f = n;
|
285
285
|
}
|
286
|
-
return c.destination = new
|
286
|
+
return c.destination = new ji(f), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
|
-
}(
|
289
|
+
}(Zn);
|
290
290
|
function Ye(t) {
|
291
|
-
|
291
|
+
Di(t);
|
292
292
|
}
|
293
|
-
function
|
293
|
+
function Ri(t) {
|
294
294
|
throw t;
|
295
295
|
}
|
296
|
-
var
|
296
|
+
var Fi = {
|
297
297
|
closed: !0,
|
298
298
|
next: An,
|
299
|
-
error:
|
299
|
+
error: Ri,
|
300
300
|
complete: An
|
301
|
-
},
|
301
|
+
}, zi = function() {
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
303
303
|
}();
|
304
|
-
function
|
304
|
+
function Ni(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
308
|
-
return t.length === 0 ?
|
307
|
+
function Hi(t) {
|
308
|
+
return t.length === 0 ? Ni : t.length === 1 ? t[0] : function(n) {
|
309
309
|
return t.reduce(function(i, o) {
|
310
310
|
return o(i);
|
311
311
|
}, n);
|
@@ -319,10 +319,10 @@ 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 =
|
323
|
-
return
|
324
|
-
var f = o, d = f.operator,
|
325
|
-
c.add(d ? d.call(c,
|
322
|
+
var o = this, c = Li(r) ? r : new un(r, n, i);
|
323
|
+
return Xe(function() {
|
324
|
+
var f = o, d = f.operator, M = f.source;
|
325
|
+
c.add(d ? d.call(c, M) : M ? o._subscribe(c) : o._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -333,12 +333,12 @@ var En = function() {
|
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
335
|
return n = On(n), new n(function(o, c) {
|
336
|
-
var f = new
|
336
|
+
var f = new un({
|
337
337
|
next: function(d) {
|
338
338
|
try {
|
339
339
|
r(d);
|
340
|
-
} catch (
|
341
|
-
c(
|
340
|
+
} catch (M) {
|
341
|
+
c(M), f.unsubscribe();
|
342
342
|
}
|
343
343
|
},
|
344
344
|
error: c,
|
@@ -349,12 +349,12 @@ var En = function() {
|
|
349
349
|
}, t.prototype._subscribe = function(r) {
|
350
350
|
var n;
|
351
351
|
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r);
|
352
|
-
}, t.prototype[
|
352
|
+
}, t.prototype[zi] = function() {
|
353
353
|
return this;
|
354
354
|
}, t.prototype.pipe = function() {
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
356
356
|
r[n] = arguments[n];
|
357
|
-
return
|
357
|
+
return Hi(r)(this);
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
359
359
|
var n = this;
|
360
360
|
return r = On(r), new r(function(i, o) {
|
@@ -373,19 +373,19 @@ var En = function() {
|
|
373
373
|
}();
|
374
374
|
function On(t) {
|
375
375
|
var r;
|
376
|
-
return (r = t ??
|
376
|
+
return (r = t ?? qn.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
|
-
function
|
378
|
+
function Ui(t) {
|
379
379
|
return t && yt(t.next) && yt(t.error) && yt(t.complete);
|
380
380
|
}
|
381
|
-
function
|
382
|
-
return t && t instanceof
|
381
|
+
function Li(t) {
|
382
|
+
return t && t instanceof Zn || Ui(t) && Xn(t);
|
383
383
|
}
|
384
|
-
var
|
384
|
+
var Gi = Yn(function(t) {
|
385
385
|
return function() {
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
387
387
|
};
|
388
|
-
}),
|
388
|
+
}), Qn = function(t) {
|
389
389
|
be(r, t);
|
390
390
|
function r() {
|
391
391
|
var n = t.call(this) || this;
|
@@ -396,20 +396,20 @@ var zi = Gn(function(t) {
|
|
396
396
|
return i.operator = n, i;
|
397
397
|
}, r.prototype._throwIfClosed = function() {
|
398
398
|
if (this.closed)
|
399
|
-
throw new
|
399
|
+
throw new Gi();
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
|
-
|
402
|
+
Xe(function() {
|
403
403
|
var o, c;
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
|
-
for (var f =
|
408
|
-
var
|
409
|
-
|
407
|
+
for (var f = an(i.currentObservers), d = f.next(); !d.done; d = f.next()) {
|
408
|
+
var M = d.value;
|
409
|
+
M.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
o = { error:
|
411
|
+
} catch (R) {
|
412
|
+
o = { error: R };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
415
|
d && !d.done && (c = f.return) && c.call(f);
|
@@ -421,7 +421,7 @@ var zi = Gn(function(t) {
|
|
421
421
|
});
|
422
422
|
}, r.prototype.error = function(n) {
|
423
423
|
var i = this;
|
424
|
-
|
424
|
+
Xe(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
427
|
for (var o = i.observers; o.length; )
|
@@ -430,7 +430,7 @@ var zi = Gn(function(t) {
|
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
432
432
|
var n = this;
|
433
|
-
|
433
|
+
Xe(function() {
|
434
434
|
if (n._throwIfClosed(), !n.isStopped) {
|
435
435
|
n.isStopped = !0;
|
436
436
|
for (var i = n.observers; i.length; )
|
@@ -452,8 +452,8 @@ var zi = Gn(function(t) {
|
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
454
|
var i = this, o = this, c = o.hasError, f = o.isStopped, d = o.observers;
|
455
|
-
return c || f ?
|
456
|
-
i.currentObservers = null,
|
455
|
+
return c || f ? Vn : (this.currentObservers = null, d.push(n), new tr(function() {
|
456
|
+
i.currentObservers = null, cn(d, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
459
|
var i = this, o = i.hasError, c = i.thrownError, f = i.isStopped;
|
@@ -481,9 +481,9 @@ var zi = Gn(function(t) {
|
|
481
481
|
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || i === void 0 || i.call(n);
|
482
482
|
}, r.prototype._subscribe = function(n) {
|
483
483
|
var i, o;
|
484
|
-
return (o = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && o !== void 0 ? o :
|
484
|
+
return (o = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && o !== void 0 ? o : Vn;
|
485
485
|
}, r;
|
486
|
-
}(
|
486
|
+
}(Qn), Mn = function(t) {
|
487
487
|
be(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
@@ -506,15 +506,15 @@ var zi = Gn(function(t) {
|
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(
|
510
|
-
function
|
509
|
+
}(Qn), et = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
|
+
function bn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
|
-
var
|
514
|
-
|
513
|
+
var qe = { exports: {} };
|
514
|
+
qe.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]",
|
517
|
-
N[Dt] = N[Ct] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", o = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", M = "[object Array]", R = "[object AsyncFunction]", T = "[object Boolean]", H = "[object Date]", y = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", b = "[object Number]", v = "[object Null]", m = "[object Object]", g = "[object Promise]", _ = "[object Proxy]", A = "[object RegExp]", w = "[object Set]", k = "[object String]", x = "[object Symbol]", S = "[object Undefined]", E = "[object WeakMap]", P = "[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*)$/, N = {};
|
517
|
+
N[Dt] = N[Ct] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[M] = N[P] = N[T] = N[F] = N[H] = N[y] = N[p] = N[l] = N[b] = N[m] = N[A] = N[w] = N[k] = N[E] = !1;
|
518
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");
|
@@ -522,15 +522,15 @@ Xe.exports;
|
|
522
522
|
}
|
523
523
|
}(), Xt = Ae && Ae.isTypedArray;
|
524
524
|
function Ee(e, a) {
|
525
|
-
for (var s = -1, u = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
a(
|
525
|
+
for (var s = -1, u = e == null ? 0 : e.length, O = 0, I = []; ++s < u; ) {
|
526
|
+
var C = e[s];
|
527
|
+
a(C, s, e) && (I[O++] = C);
|
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, O = e.length; ++s < u; )
|
533
|
+
e[O + s] = a[s];
|
534
534
|
return e;
|
535
535
|
}
|
536
536
|
function Oe(e, a) {
|
@@ -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, O) {
|
561
|
+
s[++a] = [O, u];
|
562
562
|
}), s;
|
563
563
|
}
|
564
564
|
function Me(e, a) {
|
@@ -708,14 +708,14 @@ Xe.exports;
|
|
708
708
|
}
|
709
709
|
ct.prototype.clear = se, ct.prototype.delete = Cr, ct.prototype.get = jr, ct.prototype.has = Rr, ct.prototype.set = Fr;
|
710
710
|
function zr(e, a) {
|
711
|
-
var s = Wt(e), u = !s && Le(e),
|
712
|
-
for (var
|
713
|
-
Q.call(e,
|
714
|
-
(
|
715
|
-
|
716
|
-
I && (
|
717
|
-
$r(
|
718
|
-
return
|
711
|
+
var s = Wt(e), u = !s && Le(e), O = !s && !u && Bt(e), I = !s && !u && !O && Be(e), C = s || u || O || I, D = C ? fr(e.length, String) : [], U = D.length;
|
712
|
+
for (var j in e)
|
713
|
+
Q.call(e, j) && !(C && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(j == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
O && (j == "offset" || j == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
I && (j == "buffer" || j == "byteLength" || j == "byteOffset") || // Skip index properties.
|
717
|
+
$r(j, U))) && D.push(j);
|
718
|
+
return D;
|
719
719
|
}
|
720
720
|
function Gt(e, a) {
|
721
721
|
for (var s = e.length; s--; )
|
@@ -728,33 +728,33 @@ Xe.exports;
|
|
728
728
|
return Wt(e) ? u : qt(u, s(e));
|
729
729
|
}
|
730
730
|
function wt(e) {
|
731
|
-
return e == null ? e === void 0 ?
|
731
|
+
return e == null ? e === void 0 ? S : v : it && it in Object(e) ? dt(e) : He(e);
|
732
732
|
}
|
733
733
|
function ze(e) {
|
734
734
|
return lt(e) && wt(e) == d;
|
735
735
|
}
|
736
|
-
function Ne(e, a, s, u,
|
737
|
-
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Nr(e, a, s, u, Ne,
|
736
|
+
function Ne(e, a, s, u, O) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !lt(e) && !lt(a) ? e !== e && a !== a : Nr(e, a, s, u, Ne, O);
|
738
738
|
}
|
739
|
-
function Nr(e, a, s, u,
|
740
|
-
var
|
741
|
-
U = U == d ?
|
742
|
-
var K = U ==
|
739
|
+
function Nr(e, a, s, u, O, I) {
|
740
|
+
var C = Wt(e), D = Wt(a), U = C ? M : ut(e), j = D ? M : ut(a);
|
741
|
+
U = U == d ? m : U, j = j == d ? m : j;
|
742
|
+
var K = U == m, q = j == m, L = U == j;
|
743
743
|
if (L && Bt(e)) {
|
744
744
|
if (!Bt(a))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
C = !0, K = !1;
|
747
747
|
}
|
748
748
|
if (L && !K)
|
749
|
-
return I || (I = new ct()),
|
749
|
+
return I || (I = new ct()), C || Be(e) ? ce(e, a, s, u, O, I) : Gr(e, a, U, s, u, O, 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 ct()),
|
754
|
+
return I || (I = new ct()), O(bt, ht, s, u, I);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return L ? (I || (I = new ct()), Wr(e, a, s, u,
|
757
|
+
return L ? (I || (I = new ct()), Wr(e, a, s, u, O, I)) : !1;
|
758
758
|
}
|
759
759
|
function Hr(e) {
|
760
760
|
if (!We(e) || Yr(e))
|
@@ -773,18 +773,18 @@ Xe.exports;
|
|
773
773
|
Q.call(e, s) && s != "constructor" && a.push(s);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function ce(e, a, s, u,
|
777
|
-
var
|
778
|
-
if (
|
776
|
+
function ce(e, a, s, u, O, I) {
|
777
|
+
var C = s & o, D = e.length, U = a.length;
|
778
|
+
if (D != U && !(C && U > D))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
780
|
+
var j = I.get(e);
|
781
|
+
if (j && I.get(a))
|
782
|
+
return j == a;
|
783
783
|
var K = -1, q = !0, L = s & c ? new Ut() : void 0;
|
784
|
-
for (I.set(e, a), I.set(a, e); ++K <
|
784
|
+
for (I.set(e, a), I.set(a, e); ++K < D; ) {
|
785
785
|
var Y = e[K], B = a[K];
|
786
786
|
if (u)
|
787
|
-
var bt =
|
787
|
+
var bt = C ? u(B, Y, K, a, e, I) : u(Y, B, K, e, a, I);
|
788
788
|
if (bt !== void 0) {
|
789
789
|
if (bt)
|
790
790
|
continue;
|
@@ -793,61 +793,61 @@ Xe.exports;
|
|
793
793
|
}
|
794
794
|
if (L) {
|
795
795
|
if (!Oe(a, function(ht, kt) {
|
796
|
-
if (!jt(L, kt) && (Y === ht ||
|
796
|
+
if (!jt(L, kt) && (Y === ht || O(Y, ht, s, u, I)))
|
797
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 || O(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, O, I, C) {
|
810
810
|
switch (s) {
|
811
811
|
case F:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
815
|
+
case P:
|
816
816
|
return !(e.byteLength != a.byteLength || !I(new Ce(e), new Ce(a)));
|
817
|
-
case
|
817
|
+
case T:
|
818
818
|
case H:
|
819
819
|
case b:
|
820
820
|
return Ue(+e, +a);
|
821
|
-
case
|
821
|
+
case y:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
824
|
-
case
|
823
|
+
case A:
|
824
|
+
case k:
|
825
825
|
return e == a + "";
|
826
826
|
case l:
|
827
|
-
var
|
828
|
-
case
|
827
|
+
var D = xe;
|
828
|
+
case w:
|
829
829
|
var U = u & o;
|
830
|
-
if (
|
830
|
+
if (D || (D = ot), e.size != a.size && !U)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
835
|
-
u |= c,
|
836
|
-
var K = ce(
|
837
|
-
return
|
838
|
-
case
|
832
|
+
var j = C.get(e);
|
833
|
+
if (j)
|
834
|
+
return j == a;
|
835
|
+
u |= c, C.set(e, a);
|
836
|
+
var K = ce(D(e), D(a), u, O, I, C);
|
837
|
+
return C.delete(e), K;
|
838
|
+
case x:
|
839
839
|
if (ae)
|
840
840
|
return ae.call(e) == ae.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Wr(e, a, s, u,
|
845
|
-
var
|
846
|
-
if (U != K && !
|
844
|
+
function Wr(e, a, s, u, O, I) {
|
845
|
+
var C = s & o, D = Tt(e), U = D.length, j = Tt(a), K = j.length;
|
846
|
+
if (U != K && !C)
|
847
847
|
return !1;
|
848
848
|
for (var q = U; q--; ) {
|
849
|
-
var L =
|
850
|
-
if (!(
|
849
|
+
var L = D[q];
|
850
|
+
if (!(C ? L in a : Q.call(a, L)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
853
|
var Y = I.get(e);
|
@@ -855,12 +855,12 @@ Xe.exports;
|
|
855
855
|
return Y == a;
|
856
856
|
var B = !0;
|
857
857
|
I.set(e, a), I.set(a, e);
|
858
|
-
for (var bt =
|
859
|
-
L =
|
858
|
+
for (var bt = C; ++q < U; ) {
|
859
|
+
L = D[q];
|
860
860
|
var ht = e[L], kt = a[L];
|
861
861
|
if (u)
|
862
|
-
var Tn =
|
863
|
-
if (!(Tn === void 0 ? ht === kt ||
|
862
|
+
var Tn = C ? u(kt, ht, L, a, e, I) : u(ht, kt, L, e, a, I);
|
863
|
+
if (!(Tn === void 0 ? ht === kt || O(ht, kt, s, u, I) : Tn)) {
|
864
864
|
B = !1;
|
865
865
|
break;
|
866
866
|
}
|
@@ -890,16 +890,16 @@ 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 O = De.call(e);
|
894
|
+
return u && (a ? e[it] = s : delete e[it]), O;
|
895
895
|
}
|
896
896
|
var Br = Ht ? function(e) {
|
897
897
|
return e == null ? [] : (e = Object(e), Ee(Ht(e), function(a) {
|
898
898
|
return Nt.call(e, a);
|
899
899
|
}));
|
900
900
|
} : qr, ut = wt;
|
901
|
-
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != g || ne && ut(new ne()) !=
|
902
|
-
var a = wt(e), s = a ==
|
901
|
+
(ee && ut(new ee(new ArrayBuffer(1))) != F || St && ut(new St()) != l || re && ut(re.resolve()) != g || ne && ut(new ne()) != w || ie && ut(new ie()) != E) && (ut = function(e) {
|
902
|
+
var a = wt(e), s = a == m ? e.constructor : void 0, u = s ? V(s) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
905
|
case je:
|
@@ -909,9 +909,9 @@ Xe.exports;
|
|
909
909
|
case yr:
|
910
910
|
return g;
|
911
911
|
case mr:
|
912
|
-
return
|
912
|
+
return w;
|
913
913
|
case br:
|
914
|
-
return
|
914
|
+
return E;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
@@ -964,7 +964,7 @@ Xe.exports;
|
|
964
964
|
if (!We(e))
|
965
965
|
return !1;
|
966
966
|
var a = wt(e);
|
967
|
-
return a == p || a == h || a ==
|
967
|
+
return a == p || a == h || a == R || a == _;
|
968
968
|
}
|
969
969
|
function le(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
@@ -987,14 +987,14 @@ Xe.exports;
|
|
987
987
|
return !1;
|
988
988
|
}
|
989
989
|
t.exports = Xr;
|
990
|
-
})(
|
991
|
-
var
|
992
|
-
const st = /* @__PURE__ */
|
993
|
-
var
|
994
|
-
|
990
|
+
})(qe, qe.exports);
|
991
|
+
var Wi = qe.exports;
|
992
|
+
const st = /* @__PURE__ */ bn(Wi);
|
993
|
+
var Je = { exports: {} };
|
994
|
+
Je.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]",
|
997
|
-
z[c] = z[f] = z[
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", o = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", M = "[object Date]", R = "[object Error]", T = "[object Function]", H = "[object GeneratorFunction]", y = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", b = "[object RegExp]", v = "[object Set]", m = "[object String]", g = "[object Symbol]", _ = "[object WeakMap]", A = "[object ArrayBuffer]", w = "[object DataView]", k = "[object Float32Array]", x = "[object Float64Array]", S = "[object Int8Array]", E = "[object Int16Array]", P = "[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[A] = z[w] = z[d] = z[M] = z[k] = z[x] = z[S] = z[E] = z[P] = z[y] = z[p] = z[h] = z[b] = z[v] = z[m] = z[g] = z[F] = z[Dt] = z[Ct] = z[Ie] = !0, z[R] = z[T] = z[_] = !1;
|
998
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, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
|
999
999
|
function lr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
@@ -1008,13 +1008,13 @@ qe.exports;
|
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function ke(e, a) {
|
1011
|
-
for (var s = -1, u = a.length,
|
1012
|
-
e[
|
1011
|
+
for (var s = -1, u = a.length, O = e.length; ++s < u; )
|
1012
|
+
e[O + 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 O = -1, I = e ? e.length : 0; ++O < I; )
|
1017
|
+
s = a(s, e[O], O, e);
|
1018
1018
|
return s;
|
1019
1019
|
}
|
1020
1020
|
function Vt(e, a) {
|
@@ -1036,8 +1036,8 @@ qe.exports;
|
|
1036
1036
|
}
|
1037
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, O) {
|
1040
|
+
s[++a] = [O, u];
|
1041
1041
|
}), s;
|
1042
1042
|
}
|
1043
1043
|
function qt(e, a) {
|
@@ -1170,9 +1170,9 @@ 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, O = !!u;
|
1174
1174
|
for (var I in e)
|
1175
|
-
ot.call(e, I) && !(
|
1175
|
+
ot.call(e, I) && !(O && (I == "length" || Kr(I, u))) && s.push(I);
|
1176
1176
|
return s;
|
1177
1177
|
}
|
1178
1178
|
function Fe(e, a, s) {
|
@@ -1188,40 +1188,40 @@ qe.exports;
|
|
1188
1188
|
function ct(e, a) {
|
1189
1189
|
return e && ce(a, fe(a), e);
|
1190
1190
|
}
|
1191
|
-
function se(e, a, s, u,
|
1192
|
-
var
|
1193
|
-
if (u && (
|
1194
|
-
return
|
1191
|
+
function se(e, a, s, u, O, I, C) {
|
1192
|
+
var D;
|
1193
|
+
if (u && (D = I ? u(e, O, I, C) : u(e)), D !== void 0)
|
1194
|
+
return D;
|
1195
1195
|
if (!lt(e))
|
1196
1196
|
return e;
|
1197
1197
|
var U = ue(e);
|
1198
1198
|
if (U) {
|
1199
|
-
if (
|
1200
|
-
return Lr(e,
|
1199
|
+
if (D = Br(e), !a)
|
1200
|
+
return Lr(e, D);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1202
|
+
var j = dt(e), K = j == T || j == H;
|
1203
1203
|
if (Ge(e))
|
1204
1204
|
return Gt(e, a);
|
1205
|
-
if (
|
1205
|
+
if (j == h || j == c || K && !I) {
|
1206
1206
|
if (Xt(e))
|
1207
1207
|
return I ? e : {};
|
1208
|
-
if (
|
1209
|
-
return Gr(e, ct(
|
1208
|
+
if (D = ut(K ? {} : e), !a)
|
1209
|
+
return Gr(e, ct(D, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!z[
|
1211
|
+
if (!z[j])
|
1212
1212
|
return I ? e : {};
|
1213
|
-
|
1213
|
+
D = $r(e, j, se, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var q =
|
1216
|
+
C || (C = new X());
|
1217
|
+
var q = C.get(e);
|
1218
1218
|
if (q)
|
1219
1219
|
return q;
|
1220
|
-
if (
|
1220
|
+
if (C.set(e, D), !U)
|
1221
1221
|
var L = s ? Wr(e) : fe(e);
|
1222
1222
|
return Te(L || e, function(Y, B) {
|
1223
|
-
L && (B = Y, Y = e[B]), Fe(
|
1224
|
-
}),
|
1223
|
+
L && (B = Y, Y = e[B]), Fe(D, B, se(Y, a, s, u, B, e, C));
|
1224
|
+
}), D;
|
1225
1225
|
}
|
1226
1226
|
function Cr(e) {
|
1227
1227
|
return lt(e) ? Pe(e) : {};
|
@@ -1288,9 +1288,9 @@ qe.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function ce(e, a, s, u) {
|
1290
1290
|
s || (s = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
Fe(s,
|
1291
|
+
for (var O = -1, I = a.length; ++O < I; ) {
|
1292
|
+
var C = a[O], D = void 0;
|
1293
|
+
Fe(s, C, D === void 0 ? e[C] : D);
|
1294
1294
|
}
|
1295
1295
|
return s;
|
1296
1296
|
}
|
@@ -1309,20 +1309,20 @@ qe.exports;
|
|
1309
1309
|
return Fr(s) ? s : void 0;
|
1310
1310
|
}
|
1311
1311
|
var pt = Qt ? qt(Qt, Object) : qr, dt = Rr;
|
1312
|
-
(Nt && dt(new Nt(new ArrayBuffer(1))) !=
|
1312
|
+
(Nt && dt(new Nt(new ArrayBuffer(1))) != w || vt && dt(new vt()) != y || it && dt(it.resolve()) != l || Ht && dt(new Ht()) != v || te && dt(new te()) != _) && (dt = function(e) {
|
1313
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 w;
|
1318
1318
|
case St:
|
1319
|
-
return
|
1319
|
+
return y;
|
1320
1320
|
case re:
|
1321
1321
|
return l;
|
1322
1322
|
case ne:
|
1323
1323
|
return v;
|
1324
1324
|
case ie:
|
1325
|
-
return
|
1325
|
+
return _;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
@@ -1334,30 +1334,30 @@ qe.exports;
|
|
1334
1334
|
return typeof e.constructor == "function" && !He(e) ? Cr(Q(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function $r(e, a, s, u) {
|
1337
|
-
var
|
1337
|
+
var O = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1339
|
+
case A:
|
1340
1340
|
return oe(e);
|
1341
1341
|
case d:
|
1342
|
-
case
|
1343
|
-
return new
|
1344
|
-
case A:
|
1345
|
-
return wt(e, u);
|
1346
|
-
case O:
|
1347
|
-
case D:
|
1342
|
+
case M:
|
1343
|
+
return new O(+e);
|
1348
1344
|
case w:
|
1349
|
-
|
1345
|
+
return wt(e, u);
|
1346
|
+
case k:
|
1350
1347
|
case x:
|
1348
|
+
case S:
|
1349
|
+
case E:
|
1350
|
+
case P:
|
1351
1351
|
case F:
|
1352
1352
|
case Dt:
|
1353
1353
|
case Ct:
|
1354
1354
|
case Ie:
|
1355
1355
|
return Ur(e, u);
|
1356
|
-
case
|
1356
|
+
case y:
|
1357
1357
|
return ze(e, u, s);
|
1358
1358
|
case p:
|
1359
|
-
case
|
1360
|
-
return new
|
1359
|
+
case m:
|
1360
|
+
return new O(e);
|
1361
1361
|
case b:
|
1362
1362
|
return Ne(e);
|
1363
1363
|
case v:
|
@@ -1412,7 +1412,7 @@ qe.exports;
|
|
1412
1412
|
var Ge = zt || Jr;
|
1413
1413
|
function le(e) {
|
1414
1414
|
var a = lt(e) ? Rt.call(e) : "";
|
1415
|
-
return a ==
|
1415
|
+
return a == T || a == H;
|
1416
1416
|
}
|
1417
1417
|
function We(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= o;
|
@@ -1434,9 +1434,9 @@ qe.exports;
|
|
1434
1434
|
return !1;
|
1435
1435
|
}
|
1436
1436
|
t.exports = Ue;
|
1437
|
-
})(
|
1438
|
-
var
|
1439
|
-
const tt = /* @__PURE__ */
|
1437
|
+
})(Je, Je.exports);
|
1438
|
+
var Bi = Je.exports;
|
1439
|
+
const tt = /* @__PURE__ */ bn(Bi), $i = (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;
|
@@ -1444,7 +1444,7 @@ const tt = /* @__PURE__ */ gn(Hi), Ui = (t) => new Promise((r, n) => {
|
|
1444
1444
|
}, i.onerror = (o) => {
|
1445
1445
|
n(o);
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
1447
|
-
}),
|
1447
|
+
}), Ki = (t) => new Promise((r, n) => {
|
1448
1448
|
const i = new Audio();
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1450
1450
|
const o = i.duration * 1e3;
|
@@ -1452,7 +1452,7 @@ const tt = /* @__PURE__ */ gn(Hi), Ui = (t) => new Promise((r, n) => {
|
|
1452
1452
|
}), i.addEventListener("error", (o) => {
|
1453
1453
|
n(o);
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
1455
|
-
}),
|
1455
|
+
}), Yi = (t) => new Promise((r, n) => {
|
1456
1456
|
const i = document.createElement("video");
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
1458
1458
|
const o = i.duration * 1e3, c = i.videoWidth, f = i.videoHeight;
|
@@ -1460,14 +1460,14 @@ const tt = /* @__PURE__ */ gn(Hi), Ui = (t) => new Promise((r, n) => {
|
|
1460
1460
|
}), i.addEventListener("error", (o) => {
|
1461
1461
|
n(o);
|
1462
1462
|
}), i.src = t, i.load();
|
1463
|
-
}),
|
1463
|
+
}), ti = (t, r) => {
|
1464
1464
|
const n = document.createElement("div");
|
1465
1465
|
Object.keys(r).forEach((o) => {
|
1466
1466
|
o !== "height" && (n.style[o] = r[o]);
|
1467
1467
|
}), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
|
1468
1468
|
const i = getComputedStyle(n).height;
|
1469
1469
|
return document.body.removeChild(n), parseFloat(i);
|
1470
|
-
},
|
1470
|
+
}, gn = (t) => {
|
1471
1471
|
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((i) => i));
|
1472
1472
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, i) => {
|
1473
1473
|
Promise.all(r).then((o) => {
|
@@ -1509,7 +1509,7 @@ const tt = /* @__PURE__ */ gn(Hi), Ui = (t) => new Promise((r, n) => {
|
|
1509
1509
|
), i;
|
1510
1510
|
}
|
1511
1511
|
return t;
|
1512
|
-
},
|
1512
|
+
}, ei = (t, r) => t ? t.from && !t.to ? {
|
1513
1513
|
from: t.from,
|
1514
1514
|
to: r.duration
|
1515
1515
|
} : t : {
|
@@ -1530,10 +1530,10 @@ function rr(t, r) {
|
|
1530
1530
|
transform: `scale(${o})`
|
1531
1531
|
};
|
1532
1532
|
}
|
1533
|
-
const
|
1534
|
-
const n = t.details.src, i = await
|
1533
|
+
const Pn = async (t, r) => {
|
1534
|
+
const n = t.details.src, i = await Yi(n), o = rr(r, {
|
1535
1535
|
...i
|
1536
|
-
}), c =
|
1536
|
+
}), c = ei(t.trim, { duration: i.duration }), f = {
|
1537
1537
|
width: i.width,
|
1538
1538
|
height: i.height,
|
1539
1539
|
duration: i.duration,
|
@@ -1568,8 +1568,8 @@ const Wi = async (t, r) => {
|
|
1568
1568
|
playbackRate: t.playbackRate || 1,
|
1569
1569
|
display: ge(t.display, { duration: i.duration, trim: c })
|
1570
1570
|
};
|
1571
|
-
},
|
1572
|
-
const r = t.id, n = t.details, o = (await
|
1571
|
+
}, Dn = async (t) => {
|
1572
|
+
const r = t.id, n = t.details, o = (await Ki(n.src)).duration, c = ei(t.trim, { duration: o });
|
1573
1573
|
return {
|
1574
1574
|
id: r,
|
1575
1575
|
name: "",
|
@@ -1585,8 +1585,8 @@ const Wi = async (t, r) => {
|
|
1585
1585
|
},
|
1586
1586
|
metadata: { ...t.metadata }
|
1587
1587
|
};
|
1588
|
-
},
|
1589
|
-
const n = t.details, i = await
|
1588
|
+
}, Cn = async (t, r) => {
|
1589
|
+
const n = t.details, i = await $i(n.src), o = rr(r, i);
|
1590
1590
|
return {
|
1591
1591
|
id: t.id,
|
1592
1592
|
type: "image",
|
@@ -1625,15 +1625,15 @@ const Wi = async (t, r) => {
|
|
1625
1625
|
},
|
1626
1626
|
metadata: t.metadata || {}
|
1627
1627
|
};
|
1628
|
-
},
|
1628
|
+
}, jn = async (t, r) => {
|
1629
1629
|
const n = t;
|
1630
|
-
await
|
1630
|
+
await gn([
|
1631
1631
|
{
|
1632
1632
|
fontFamily: n.details.fontFamily,
|
1633
1633
|
url: n.details.fontUrl
|
1634
1634
|
}
|
1635
1635
|
]);
|
1636
|
-
const i = n.id, o = n.details, c =
|
1636
|
+
const i = n.id, o = n.details, c = ri(o), f = ti(n.details.text, c), d = rr(r, {
|
1637
1637
|
width: c.width,
|
1638
1638
|
height: f
|
1639
1639
|
});
|
@@ -1658,14 +1658,14 @@ const Wi = async (t, r) => {
|
|
1658
1658
|
},
|
1659
1659
|
metadata: {}
|
1660
1660
|
};
|
1661
|
-
},
|
1662
|
-
await
|
1661
|
+
}, Rn = async (t, r) => {
|
1662
|
+
await gn([
|
1663
1663
|
{
|
1664
1664
|
fontFamily: t.details.fontFamily,
|
1665
1665
|
url: t.details.fontUrl
|
1666
1666
|
}
|
1667
1667
|
]);
|
1668
|
-
const n = t.id, i = t.details, o =
|
1668
|
+
const n = t.id, i = t.details, o = ri(i), c = ti(t.details.text, o), f = rr(r, {
|
1669
1669
|
width: o.width,
|
1670
1670
|
height: c
|
1671
1671
|
});
|
@@ -1689,7 +1689,7 @@ const Wi = async (t, r) => {
|
|
1689
1689
|
},
|
1690
1690
|
metadata: {}
|
1691
1691
|
};
|
1692
|
-
},
|
1692
|
+
}, ri = (t) => ({
|
1693
1693
|
fontFamily: t.fontFamily || "Arial",
|
1694
1694
|
// Default font family
|
1695
1695
|
fontSize: t.fontSize || "16px",
|
@@ -1731,7 +1731,7 @@ const Wi = async (t, r) => {
|
|
1731
1731
|
left: t.left || "0px",
|
1732
1732
|
textTransform: t.textTransform || "none"
|
1733
1733
|
}), Vi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1734
|
-
let
|
1734
|
+
let ln = (t = 21) => {
|
1735
1735
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1736
1736
|
for (; t--; )
|
1737
1737
|
r += Vi[n[t] & 63];
|
@@ -1743,163 +1743,216 @@ function Xi(t, r) {
|
|
1743
1743
|
items: i.items.filter((o) => !r.includes(o))
|
1744
1744
|
})).filter((i) => !i.items.length);
|
1745
1745
|
}
|
1746
|
-
function
|
1746
|
+
function Fn(t = 16) {
|
1747
1747
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
1748
|
-
let i =
|
1748
|
+
let i = ln(t - 1);
|
1749
1749
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1750
1750
|
}
|
1751
|
-
const
|
1751
|
+
const Ve = (t) => Object.keys(t).reduce((r, n) => {
|
1752
1752
|
const { display: i, playbackRate: o } = t[n];
|
1753
1753
|
return Math.max(r, i.to / (o || 1));
|
1754
1754
|
}, 0);
|
1755
1755
|
function qi(t) {
|
1756
1756
|
const r = $t.pipe(
|
1757
|
-
Kt(({ key: p }) => p.startsWith(
|
1757
|
+
Kt(({ key: p }) => p.startsWith(di))
|
1758
1758
|
), n = $t.pipe(
|
1759
|
-
Kt(({ key: p }) => p.startsWith(
|
1759
|
+
Kt(({ key: p }) => p.startsWith(hi))
|
1760
1760
|
), i = $t.pipe(
|
1761
|
-
Kt(({ key: p }) => p.startsWith(
|
1761
|
+
Kt(({ key: p }) => p.startsWith(yi))
|
1762
1762
|
), o = $t.pipe(
|
1763
|
-
Kt(({ key: p }) => p.startsWith(
|
1763
|
+
Kt(({ key: p }) => p.startsWith(mi))
|
1764
1764
|
), c = $t.pipe(
|
1765
|
-
Kt(({ key: p }) => p.startsWith(
|
1765
|
+
Kt(({ key: p }) => p.startsWith(bi))
|
1766
1766
|
), f = $t.pipe(
|
1767
|
-
Kt(({ key: p }) => p.startsWith(
|
1767
|
+
Kt(({ key: p }) => p.startsWith(gi))
|
1768
1768
|
), d = r.subscribe(async (p) => {
|
1769
1769
|
var h;
|
1770
|
-
if (p.key ===
|
1771
|
-
const l = (h = p.value) == null ? void 0 : h.payload, b = l.trackItemIds, v = l.trackItemDetailsMap;
|
1770
|
+
if (p.key === _i) {
|
1771
|
+
const l = (h = p.value) == null ? void 0 : h.payload, b = l.trackItemIds, v = {}, m = l.trackItemDetailsMap;
|
1772
1772
|
console.warn("IMPROVE FONTS LOADING");
|
1773
|
-
const
|
1774
|
-
|
1775
|
-
|
1776
|
-
{
|
1777
|
-
|
1778
|
-
|
1773
|
+
const g = b.map(async (A) => {
|
1774
|
+
try {
|
1775
|
+
const w = m[A];
|
1776
|
+
if (w.type === "image") {
|
1777
|
+
const k = await Cn(
|
1778
|
+
{ id: A, details: w.details },
|
1779
|
+
{
|
1780
|
+
size: {
|
1781
|
+
width: 1080,
|
1782
|
+
height: 1920
|
1783
|
+
}
|
1784
|
+
}
|
1785
|
+
), { details: x, ...S } = k;
|
1786
|
+
m[A] = { type: "image", details: x }, v[A] = S;
|
1787
|
+
} else if (w.type === "video") {
|
1788
|
+
const k = await Pn(
|
1789
|
+
{ id: A, details: w.details },
|
1790
|
+
{
|
1791
|
+
size: {
|
1792
|
+
width: 1080,
|
1793
|
+
height: 1920
|
1794
|
+
}
|
1795
|
+
}
|
1796
|
+
), { details: x, ...S } = k;
|
1797
|
+
m[A] = { type: "video", details: x }, v[A] = S;
|
1798
|
+
} else if (w.type === "audio") {
|
1799
|
+
const k = await Dn({
|
1800
|
+
id: A,
|
1801
|
+
details: w.details
|
1802
|
+
}), { details: x, ...S } = k;
|
1803
|
+
m[A] = { type: "audio", details: x }, v[A] = S;
|
1804
|
+
} else if (w.type === "caption") {
|
1805
|
+
const k = await jn(
|
1806
|
+
{ id: A, details: w.details },
|
1807
|
+
{
|
1808
|
+
size: {
|
1809
|
+
width: 1080,
|
1810
|
+
height: 1920
|
1811
|
+
}
|
1812
|
+
}
|
1813
|
+
), { details: x, ...S } = k;
|
1814
|
+
m[A] = { type: "caption", details: x }, v[A] = S;
|
1815
|
+
} else if (w.type === "text") {
|
1816
|
+
const k = await Rn(
|
1817
|
+
{ id: A, details: w.details },
|
1818
|
+
{
|
1819
|
+
size: {
|
1820
|
+
width: 1080,
|
1821
|
+
height: 1920
|
1822
|
+
}
|
1823
|
+
}
|
1824
|
+
), { details: x, ...S } = k;
|
1825
|
+
m[A] = { type: "caption", details: x }, v[A] = S;
|
1779
1826
|
}
|
1780
|
-
|
1827
|
+
return !0;
|
1828
|
+
} catch {
|
1829
|
+
return !1;
|
1830
|
+
}
|
1781
1831
|
});
|
1782
|
-
await Promise.all(
|
1783
|
-
|
1832
|
+
await Promise.all(g);
|
1833
|
+
const _ = Ve(v);
|
1834
|
+
t.updateState({
|
1835
|
+
...l,
|
1836
|
+
duration: _
|
1784
1837
|
});
|
1785
1838
|
}
|
1786
|
-
}),
|
1787
|
-
if (p.key ===
|
1788
|
-
if (p.key ===
|
1789
|
-
}),
|
1839
|
+
}), M = o.subscribe((p) => {
|
1840
|
+
if (p.key === vi) return t.undo();
|
1841
|
+
if (p.key === Ii) return t.redo();
|
1842
|
+
}), R = i.subscribe((p) => {
|
1790
1843
|
var l, b, v;
|
1791
1844
|
const h = [];
|
1792
|
-
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((b = p.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: h })), p.key ===
|
1793
|
-
const
|
1794
|
-
(F) => !
|
1795
|
-
),
|
1796
|
-
Object.entries(
|
1797
|
-
([F]) => !
|
1845
|
+
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((b = p.value) == null ? void 0 : b.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === Si) {
|
1846
|
+
const m = (v = p.value) == null ? void 0 : v.payload.trackItemIds, g = tt(t.getState()), _ = m && m.length ? m : g.activeIds, A = g.trackItemIds, w = g.trackItemDetailsMap, k = A.filter(
|
1847
|
+
(F) => !_.includes(F)
|
1848
|
+
), x = Object.fromEntries(
|
1849
|
+
Object.entries(w).filter(
|
1850
|
+
([F]) => !_.includes(F)
|
1798
1851
|
)
|
1799
|
-
),
|
1852
|
+
), S = Xi(
|
1800
1853
|
g.tracks,
|
1801
|
-
|
1802
|
-
),
|
1854
|
+
_
|
1855
|
+
), E = Object.fromEntries(
|
1803
1856
|
Object.entries(g.trackItemsMap).filter(
|
1804
|
-
([F]) => !
|
1857
|
+
([F]) => !_.includes(F)
|
1805
1858
|
)
|
1806
|
-
),
|
1859
|
+
), P = Ve(g.trackItemsMap);
|
1807
1860
|
t.updateState(
|
1808
1861
|
{
|
1809
|
-
trackItemIds:
|
1810
|
-
trackItemDetailsMap:
|
1862
|
+
trackItemIds: k,
|
1863
|
+
trackItemDetailsMap: x,
|
1811
1864
|
activeIds: [],
|
1812
|
-
trackItemsMap:
|
1813
|
-
tracks:
|
1814
|
-
duration:
|
1865
|
+
trackItemsMap: E,
|
1866
|
+
tracks: S,
|
1867
|
+
duration: P
|
1815
1868
|
},
|
1816
1869
|
{ updateHistory: !0, kind: "remove" }
|
1817
1870
|
);
|
1818
1871
|
}
|
1819
|
-
}),
|
1820
|
-
var
|
1872
|
+
}), T = n.subscribe(async (p) => {
|
1873
|
+
var m, g, _, A, w;
|
1821
1874
|
const h = tt(t.getState());
|
1822
1875
|
let l = [], b = "text";
|
1823
|
-
if (p.key ===
|
1876
|
+
if (p.key === wi) {
|
1824
1877
|
b = "caption";
|
1825
|
-
const
|
1826
|
-
for (const
|
1827
|
-
const F =
|
1878
|
+
const k = (m = p.value) == null ? void 0 : m.payload, x = [];
|
1879
|
+
for (const P of k) {
|
1880
|
+
const F = jn(P, {
|
1828
1881
|
size: {
|
1829
1882
|
width: 1080,
|
1830
1883
|
height: 1920
|
1831
1884
|
}
|
1832
1885
|
});
|
1833
|
-
|
1886
|
+
x.push(F);
|
1834
1887
|
}
|
1835
|
-
const
|
1836
|
-
for (const
|
1837
|
-
const F =
|
1838
|
-
|
1839
|
-
const { details: Dt, ...Ct } =
|
1888
|
+
const S = await Promise.all(x), E = [];
|
1889
|
+
for (const P of S) {
|
1890
|
+
const F = P.id;
|
1891
|
+
E.push(F);
|
1892
|
+
const { details: Dt, ...Ct } = P;
|
1840
1893
|
h.trackItemDetailsMap[F] = {
|
1841
1894
|
type: b,
|
1842
1895
|
details: Dt
|
1843
1896
|
}, h.trackItemsMap[F] = Ct, h.trackItemIds.push(F);
|
1844
1897
|
}
|
1845
|
-
l =
|
1898
|
+
l = E;
|
1846
1899
|
}
|
1847
|
-
if (p.key ===
|
1900
|
+
if (p.key === Ti) {
|
1848
1901
|
b = "text";
|
1849
|
-
const
|
1902
|
+
const k = await Rn((g = p.value) == null ? void 0 : g.payload, {
|
1850
1903
|
size: {
|
1851
1904
|
width: 1080,
|
1852
1905
|
height: 1920
|
1853
1906
|
}
|
1854
|
-
}), { details:
|
1855
|
-
h.trackItemDetailsMap[
|
1907
|
+
}), { details: x, ...S } = k;
|
1908
|
+
h.trackItemDetailsMap[S.id] = {
|
1856
1909
|
type: b,
|
1857
|
-
details:
|
1858
|
-
}, h.trackItemsMap[
|
1910
|
+
details: x
|
1911
|
+
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1859
1912
|
}
|
1860
|
-
if (p.key ===
|
1913
|
+
if (p.key === ki) {
|
1861
1914
|
b = "image";
|
1862
|
-
const
|
1915
|
+
const k = await Cn((_ = p.value) == null ? void 0 : _.payload, {
|
1863
1916
|
size: {
|
1864
1917
|
width: 1080,
|
1865
1918
|
height: 1920
|
1866
1919
|
}
|
1867
|
-
}), { details:
|
1868
|
-
h.trackItemDetailsMap[
|
1920
|
+
}), { details: x, ...S } = k;
|
1921
|
+
h.trackItemDetailsMap[S.id] = {
|
1869
1922
|
type: b,
|
1870
|
-
details:
|
1871
|
-
}, h.trackItemsMap[
|
1923
|
+
details: x
|
1924
|
+
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1872
1925
|
}
|
1873
|
-
if (p.key ===
|
1926
|
+
if (p.key === Ai) {
|
1874
1927
|
b = "audio";
|
1875
|
-
const
|
1876
|
-
h.trackItemDetailsMap[
|
1928
|
+
const k = await Dn((A = p.value) == null ? void 0 : A.payload), { details: x, ...S } = k;
|
1929
|
+
h.trackItemDetailsMap[S.id] = {
|
1877
1930
|
type: b,
|
1878
|
-
details:
|
1879
|
-
}, h.trackItemsMap[
|
1931
|
+
details: x
|
1932
|
+
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1880
1933
|
}
|
1881
|
-
if (p.key ===
|
1934
|
+
if (p.key === Ei) {
|
1882
1935
|
b = "video";
|
1883
|
-
const
|
1936
|
+
const k = await Pn((w = p.value) == null ? void 0 : w.payload, {
|
1884
1937
|
size: {
|
1885
1938
|
width: 1080,
|
1886
1939
|
height: 1920
|
1887
1940
|
}
|
1888
|
-
}), { details:
|
1889
|
-
h.trackItemDetailsMap[
|
1941
|
+
}), { details: x, ...S } = k;
|
1942
|
+
h.trackItemDetailsMap[S.id] = {
|
1890
1943
|
type: b,
|
1891
|
-
details:
|
1892
|
-
}, h.trackItemsMap[
|
1944
|
+
details: x
|
1945
|
+
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1893
1946
|
}
|
1894
1947
|
h.tracks.unshift({
|
1895
|
-
id:
|
1948
|
+
id: ln(),
|
1896
1949
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1897
1950
|
type: b,
|
1898
1951
|
items: l,
|
1899
1952
|
magnetic: !1,
|
1900
1953
|
static: !1
|
1901
1954
|
});
|
1902
|
-
const v =
|
1955
|
+
const v = Ve(h.trackItemsMap);
|
1903
1956
|
t.updateState(
|
1904
1957
|
{
|
1905
1958
|
trackItemIds: h.trackItemIds,
|
@@ -1915,26 +1968,26 @@ function qi(t) {
|
|
1915
1968
|
);
|
1916
1969
|
}), H = c.subscribe(async (p) => {
|
1917
1970
|
var h;
|
1918
|
-
if (p.key ===
|
1971
|
+
if (p.key === Oi) {
|
1919
1972
|
const l = tt(t.getState()), b = (h = p.value) == null ? void 0 : h.options.time;
|
1920
1973
|
if (l.activeIds.length === 1) {
|
1921
|
-
const v = l.activeIds[0],
|
1922
|
-
if (b >=
|
1974
|
+
const v = l.activeIds[0], m = l.trackItemsMap[v];
|
1975
|
+
if (b >= m.display.to || b <= m.display.from)
|
1923
1976
|
return;
|
1924
|
-
const g = l.trackItemDetailsMap[v],
|
1925
|
-
...
|
1926
|
-
id:
|
1977
|
+
const g = l.trackItemDetailsMap[v], _ = Fn(), A = {
|
1978
|
+
...m,
|
1979
|
+
id: _,
|
1927
1980
|
display: {
|
1928
1981
|
from: b,
|
1929
|
-
to:
|
1982
|
+
to: m.display.to
|
1930
1983
|
},
|
1931
1984
|
trim: {
|
1932
1985
|
from: b,
|
1933
|
-
to:
|
1986
|
+
to: m.display.to
|
1934
1987
|
}
|
1935
1988
|
};
|
1936
|
-
l.trackItemsMap[v].display.to = b, l.trackItemsMap[
|
1937
|
-
|
1989
|
+
l.trackItemsMap[v].display.to = b, l.trackItemsMap[_] = A, l.trackItemIds.push(_), l.trackItemDetailsMap[_] = g, l.tracks.forEach((w) => {
|
1990
|
+
w.items.includes(v) && w.items.push(_);
|
1938
1991
|
}), t.updateState(
|
1939
1992
|
{
|
1940
1993
|
trackItemDetailsMap: l.trackItemDetailsMap,
|
@@ -1950,49 +2003,49 @@ function qi(t) {
|
|
1950
2003
|
}
|
1951
2004
|
return;
|
1952
2005
|
}
|
1953
|
-
if (p.key ===
|
2006
|
+
if (p.key === xi) {
|
1954
2007
|
const l = tt(t.getState());
|
1955
2008
|
if (l.activeIds.length) {
|
1956
|
-
const b = l.activeIds, v = [],
|
2009
|
+
const b = l.activeIds, v = [], m = {
|
1957
2010
|
activeIds: b,
|
1958
2011
|
trackItemDetailsMap: {},
|
1959
2012
|
trackItemsMap: {},
|
1960
2013
|
tracks: []
|
1961
2014
|
};
|
1962
|
-
b.forEach((
|
1963
|
-
|
1964
|
-
l.tracks.find((
|
2015
|
+
b.forEach((_) => {
|
2016
|
+
m.trackItemDetailsMap[_] = l.trackItemDetailsMap[_], m.trackItemsMap[_] = l.trackItemsMap[_], v.push(
|
2017
|
+
l.tracks.find((A) => A.items.includes(_))
|
1965
2018
|
);
|
1966
2019
|
});
|
1967
2020
|
const g = /* @__PURE__ */ new Set();
|
1968
|
-
v.filter((
|
2021
|
+
v.filter((_) => g.has(_.id) ? !1 : (g.add(_), !0)), m.tracks = Array.from(g.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(m));
|
1969
2022
|
}
|
1970
2023
|
}
|
1971
|
-
if (p.key ===
|
2024
|
+
if (p.key === Mi) {
|
1972
2025
|
const l = localStorage.getItem("DesignComboTemp");
|
1973
2026
|
if (!l) return;
|
1974
|
-
const b = tt(t.getState()), v = JSON.parse(l),
|
1975
|
-
const
|
1976
|
-
(
|
2027
|
+
const b = tt(t.getState()), v = JSON.parse(l), m = {}, g = v.trackItemsMap, _ = v.trackItemDetailsMap, A = v.tracks, w = [], k = v.activeIds.map(async (x) => {
|
2028
|
+
const S = _[x];
|
2029
|
+
(S.type === "caption" || S.type === "text") && await gn([
|
1977
2030
|
{
|
1978
|
-
fontFamily:
|
1979
|
-
url:
|
2031
|
+
fontFamily: S.details.fontFamily,
|
2032
|
+
url: S.details.fontUrl
|
1980
2033
|
}
|
1981
2034
|
]);
|
1982
|
-
const
|
1983
|
-
return
|
1984
|
-
...g[
|
1985
|
-
id:
|
1986
|
-
}, b.trackItemDetailsMap[
|
2035
|
+
const E = Fn();
|
2036
|
+
return m[x] = E, b.trackItemsMap[E] = {
|
2037
|
+
...g[x],
|
2038
|
+
id: E
|
2039
|
+
}, b.trackItemDetailsMap[E] = S, b.trackItemIds.push(E), !0;
|
1987
2040
|
});
|
1988
|
-
await Promise.all(
|
1989
|
-
const
|
1990
|
-
...
|
1991
|
-
items:
|
1992
|
-
id:
|
2041
|
+
await Promise.all(k), A.forEach((x) => {
|
2042
|
+
const S = x.items.map((P) => m[P]), E = {
|
2043
|
+
...x,
|
2044
|
+
items: S,
|
2045
|
+
id: ln()
|
1993
2046
|
};
|
1994
|
-
|
1995
|
-
}), b.tracks = [...b.tracks, ...
|
2047
|
+
w.push(E);
|
2048
|
+
}), b.tracks = [...b.tracks, ...w], t.updateState(
|
1996
2049
|
{
|
1997
2050
|
trackItemDetailsMap: b.trackItemDetailsMap,
|
1998
2051
|
tracks: b.tracks,
|
@@ -2005,24 +2058,24 @@ function qi(t) {
|
|
2005
2058
|
}
|
2006
2059
|
);
|
2007
2060
|
}
|
2008
|
-
}),
|
2061
|
+
}), y = f.subscribe((p) => {
|
2009
2062
|
var h, l;
|
2010
|
-
if (p.key ===
|
2011
|
-
const b = tt(t.getState()), v = b.trackItemDetailsMap,
|
2063
|
+
if (p.key === Pi) {
|
2064
|
+
const b = tt(t.getState()), v = b.trackItemDetailsMap, m = b.trackItemsMap, g = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
2012
2065
|
if (!g.length) return;
|
2013
|
-
const
|
2014
|
-
g.forEach((
|
2015
|
-
|
2016
|
-
...v[
|
2017
|
-
...
|
2018
|
-
} :
|
2066
|
+
const _ = (l = p.value) == null ? void 0 : l.payload;
|
2067
|
+
g.forEach((w) => {
|
2068
|
+
_[w].details ? v[w].details = {
|
2069
|
+
...v[w].details,
|
2070
|
+
..._[w].details
|
2071
|
+
} : _[w].playbackRate && (m[w].playbackRate = _[w].playbackRate);
|
2019
2072
|
});
|
2020
|
-
const
|
2073
|
+
const A = Ve(m);
|
2021
2074
|
t.updateState(
|
2022
2075
|
{
|
2023
2076
|
trackItemDetailsMap: { ...v },
|
2024
|
-
trackItemsMap: { ...
|
2025
|
-
duration:
|
2077
|
+
trackItemsMap: { ...m },
|
2078
|
+
duration: A
|
2026
2079
|
},
|
2027
2080
|
{
|
2028
2081
|
updateHistory: !0,
|
@@ -2033,47 +2086,47 @@ function qi(t) {
|
|
2033
2086
|
});
|
2034
2087
|
return {
|
2035
2088
|
unsubscribe: () => {
|
2036
|
-
|
2089
|
+
T.unsubscribe(), H.unsubscribe(), y.unsubscribe(), M.unsubscribe(), R.unsubscribe(), d.unsubscribe();
|
2037
2090
|
}
|
2038
2091
|
};
|
2039
2092
|
}
|
2040
2093
|
const Ji = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2041
|
-
function
|
2042
|
-
var d,
|
2094
|
+
function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
2095
|
+
var d, M;
|
2043
2096
|
let o = [];
|
2044
2097
|
const c = Array.isArray(t);
|
2045
|
-
for (const
|
2046
|
-
const
|
2047
|
-
if (!(
|
2098
|
+
for (const R in t) {
|
2099
|
+
const T = t[R], H = c ? +R : R;
|
2100
|
+
if (!(R in r)) {
|
2048
2101
|
o.push({
|
2049
2102
|
type: "REMOVE",
|
2050
2103
|
path: [H],
|
2051
|
-
oldValue: t[
|
2104
|
+
oldValue: t[R]
|
2052
2105
|
});
|
2053
2106
|
continue;
|
2054
2107
|
}
|
2055
|
-
const
|
2056
|
-
if (
|
2057
|
-
const h =
|
2108
|
+
const y = r[R], p = typeof T == "object" && typeof y == "object" && Array.isArray(T) === Array.isArray(y);
|
2109
|
+
if (T && y && p && !Ji[(M = (d = Object.getPrototypeOf(T)) == null ? void 0 : d.constructor) == null ? void 0 : M.name] && (!n.cyclesFix || !i.includes(T))) {
|
2110
|
+
const h = ni(T, y, n, n.cyclesFix ? i.concat([T]) : []);
|
2058
2111
|
o.push.apply(o, h.map((l) => (l.path.unshift(H), l)));
|
2059
|
-
} else
|
2060
|
-
!(Number.isNaN(
|
2112
|
+
} else T !== y && // treat NaN values as equivalent
|
2113
|
+
!(Number.isNaN(T) && Number.isNaN(y)) && !(p && (isNaN(T) ? T + "" == y + "" : +T == +y)) && o.push({
|
2061
2114
|
path: [H],
|
2062
2115
|
type: "CHANGE",
|
2063
|
-
value:
|
2064
|
-
oldValue:
|
2116
|
+
value: y,
|
2117
|
+
oldValue: T
|
2065
2118
|
});
|
2066
2119
|
}
|
2067
2120
|
const f = Array.isArray(r);
|
2068
|
-
for (const
|
2069
|
-
|
2121
|
+
for (const R in r)
|
2122
|
+
R in t || o.push({
|
2070
2123
|
type: "CREATE",
|
2071
|
-
path: [f ? +
|
2072
|
-
value: r[
|
2124
|
+
path: [f ? +R : R],
|
2125
|
+
value: r[R]
|
2073
2126
|
});
|
2074
2127
|
return o;
|
2075
2128
|
}
|
2076
|
-
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Symbol.for("immer-state"),
|
2129
|
+
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
|
2077
2130
|
// All error codes, starting by 0:
|
2078
2131
|
function(t) {
|
2079
2132
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2106,7 +2159,7 @@ var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), J = Sy
|
|
2106
2159
|
] : [];
|
2107
2160
|
function G(t, ...r) {
|
2108
2161
|
if (process.env.NODE_ENV !== "production") {
|
2109
|
-
const n =
|
2162
|
+
const n = ii[t], i = typeof n == "function" ? n.apply(null, r) : n;
|
2110
2163
|
throw new Error(`[Immer] ${i}`);
|
2111
2164
|
}
|
2112
2165
|
throw new Error(
|
@@ -2119,10 +2172,10 @@ function xt(t) {
|
|
2119
2172
|
}
|
2120
2173
|
function gt(t) {
|
2121
2174
|
var r;
|
2122
|
-
return t ?
|
2175
|
+
return t ? ai(t) || Array.isArray(t) || !!t[pe] || !!((r = t.constructor) != null && r[pe]) || _e(t) || ve(t) : !1;
|
2123
2176
|
}
|
2124
2177
|
var Zi = Object.prototype.constructor.toString();
|
2125
|
-
function
|
2178
|
+
function ai(t) {
|
2126
2179
|
if (!t || typeof t != "object")
|
2127
2180
|
return !1;
|
2128
2181
|
const r = Ot(t);
|
@@ -2143,10 +2196,10 @@ function Mt(t) {
|
|
2143
2196
|
function he(t, r) {
|
2144
2197
|
return Mt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2145
2198
|
}
|
2146
|
-
function
|
2199
|
+
function tn(t, r) {
|
2147
2200
|
return Mt(t) === 2 ? t.get(r) : t[r];
|
2148
2201
|
}
|
2149
|
-
function
|
2202
|
+
function si(t, r, n) {
|
2150
2203
|
const i = Mt(t);
|
2151
2204
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2152
2205
|
}
|
@@ -2162,14 +2215,14 @@ function ve(t) {
|
|
2162
2215
|
function Et(t) {
|
2163
2216
|
return t.copy_ || t.base_;
|
2164
2217
|
}
|
2165
|
-
function
|
2218
|
+
function fn(t, r) {
|
2166
2219
|
if (_e(t))
|
2167
2220
|
return new Map(t);
|
2168
2221
|
if (ve(t))
|
2169
2222
|
return new Set(t);
|
2170
2223
|
if (Array.isArray(t))
|
2171
2224
|
return Array.prototype.slice.call(t);
|
2172
|
-
const n =
|
2225
|
+
const n = ai(t);
|
2173
2226
|
if (r === !0 || r === "class_only" && !n) {
|
2174
2227
|
const i = Object.getOwnPropertyDescriptors(t);
|
2175
2228
|
delete i[J];
|
@@ -2202,16 +2255,16 @@ function ta() {
|
|
2202
2255
|
function nr(t) {
|
2203
2256
|
return Object.isFrozen(t);
|
2204
2257
|
}
|
2205
|
-
var
|
2258
|
+
var pn = {};
|
2206
2259
|
function Pt(t) {
|
2207
|
-
const r =
|
2260
|
+
const r = pn[t];
|
2208
2261
|
return r || G(0, t), r;
|
2209
2262
|
}
|
2210
2263
|
function ea(t, r) {
|
2211
|
-
|
2264
|
+
pn[t] || (pn[t] = r);
|
2212
2265
|
}
|
2213
2266
|
var ye;
|
2214
|
-
function
|
2267
|
+
function oi() {
|
2215
2268
|
return ye;
|
2216
2269
|
}
|
2217
2270
|
function ra(t, r) {
|
@@ -2225,31 +2278,31 @@ function ra(t, r) {
|
|
2225
2278
|
unfinalizedDrafts_: 0
|
2226
2279
|
};
|
2227
2280
|
}
|
2228
|
-
function
|
2281
|
+
function zn(t, r) {
|
2229
2282
|
r && (Pt("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2230
2283
|
}
|
2231
|
-
function
|
2232
|
-
|
2284
|
+
function dn(t) {
|
2285
|
+
hn(t), t.drafts_.forEach(na), t.drafts_ = null;
|
2233
2286
|
}
|
2234
|
-
function
|
2287
|
+
function hn(t) {
|
2235
2288
|
t === ye && (ye = t.parent_);
|
2236
2289
|
}
|
2237
|
-
function
|
2290
|
+
function Nn(t) {
|
2238
2291
|
return ye = ra(ye, t);
|
2239
2292
|
}
|
2240
2293
|
function na(t) {
|
2241
2294
|
const r = t[J];
|
2242
2295
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2243
2296
|
}
|
2244
|
-
function
|
2297
|
+
function Hn(t, r) {
|
2245
2298
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2246
2299
|
const n = r.drafts_[0];
|
2247
|
-
return t !== void 0 && t !== n ? (n[J].modified_ && (
|
2300
|
+
return t !== void 0 && t !== n ? (n[J].modified_ && (dn(r), G(4)), gt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Pt("Patches").generateReplacementPatches_(
|
2248
2301
|
n[J].base_,
|
2249
2302
|
t,
|
2250
2303
|
r.patches_,
|
2251
2304
|
r.inversePatches_
|
2252
|
-
)) : t = Ze(r, n, []),
|
2305
|
+
)) : t = Ze(r, n, []), dn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== _n ? t : void 0;
|
2253
2306
|
}
|
2254
2307
|
function Ze(t, r, n) {
|
2255
2308
|
if (nr(r))
|
@@ -2258,7 +2311,7 @@ function Ze(t, r, n) {
|
|
2258
2311
|
if (!i)
|
2259
2312
|
return de(
|
2260
2313
|
r,
|
2261
|
-
(o, c) =>
|
2314
|
+
(o, c) => Un(t, i, r, o, c, n)
|
2262
2315
|
), r;
|
2263
2316
|
if (i.scope_ !== t)
|
2264
2317
|
return r;
|
@@ -2270,7 +2323,7 @@ function Ze(t, r, n) {
|
|
2270
2323
|
let c = o, f = !1;
|
2271
2324
|
i.type_ === 3 && (c = new Set(o), o.clear(), f = !0), de(
|
2272
2325
|
c,
|
2273
|
-
(d,
|
2326
|
+
(d, M) => Un(t, i, o, d, M, n, f)
|
2274
2327
|
), Qe(t, o, !1), n && t.patches_ && Pt("Patches").generatePatches_(
|
2275
2328
|
i,
|
2276
2329
|
n,
|
@@ -2280,11 +2333,11 @@ function Ze(t, r, n) {
|
|
2280
2333
|
}
|
2281
2334
|
return i.copy_;
|
2282
2335
|
}
|
2283
|
-
function
|
2336
|
+
function Un(t, r, n, i, o, c, f) {
|
2284
2337
|
if (process.env.NODE_ENV !== "production" && o === n && G(5), xt(o)) {
|
2285
2338
|
const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2286
|
-
!he(r.assigned_, i) ? c.concat(i) : void 0,
|
2287
|
-
if (
|
2339
|
+
!he(r.assigned_, i) ? c.concat(i) : void 0, M = Ze(t, o, d);
|
2340
|
+
if (si(n, i, M), xt(M))
|
2288
2341
|
t.canAutoFreeze_ = !1;
|
2289
2342
|
else
|
2290
2343
|
return;
|
@@ -2302,7 +2355,7 @@ function ia(t, r) {
|
|
2302
2355
|
const n = Array.isArray(t), i = {
|
2303
2356
|
type_: n ? 1 : 0,
|
2304
2357
|
// Track which produce call this is associated with.
|
2305
|
-
scope_: r ? r.scope_ :
|
2358
|
+
scope_: r ? r.scope_ : oi(),
|
2306
2359
|
// True for both shallow and deep changes.
|
2307
2360
|
modified_: !1,
|
2308
2361
|
// Used during finalization.
|
@@ -2335,7 +2388,7 @@ var In = {
|
|
2335
2388
|
if (!he(n, r))
|
2336
2389
|
return aa(t, n, r);
|
2337
2390
|
const i = n[r];
|
2338
|
-
return t.finalized_ || !gt(i) ? i : i ===
|
2391
|
+
return t.finalized_ || !gt(i) ? i : i === en(t.base_, r) ? (rn(t), t.copy_[r] = mn(i, t)) : i;
|
2339
2392
|
},
|
2340
2393
|
has(t, r) {
|
2341
2394
|
return r in Et(t);
|
@@ -2344,23 +2397,23 @@ var In = {
|
|
2344
2397
|
return Reflect.ownKeys(Et(t));
|
2345
2398
|
},
|
2346
2399
|
set(t, r, n) {
|
2347
|
-
const i =
|
2400
|
+
const i = ci(Et(t), r);
|
2348
2401
|
if (i != null && i.set)
|
2349
2402
|
return i.set.call(t.draft_, n), !0;
|
2350
2403
|
if (!t.modified_) {
|
2351
|
-
const o =
|
2404
|
+
const o = en(Et(t), r), c = o == null ? void 0 : o[J];
|
2352
2405
|
if (c && c.base_ === n)
|
2353
2406
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2354
2407
|
if (Qi(n, o) && (n !== void 0 || he(t.base_, r)))
|
2355
2408
|
return !0;
|
2356
|
-
|
2409
|
+
rn(t), yn(t);
|
2357
2410
|
}
|
2358
2411
|
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
2359
2412
|
(n !== void 0 || r in t.copy_) || // special case: NaN
|
2360
2413
|
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
2361
2414
|
},
|
2362
2415
|
deleteProperty(t, r) {
|
2363
|
-
return
|
2416
|
+
return en(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, rn(t), yn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
2364
2417
|
},
|
2365
2418
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2366
2419
|
// the same guarantee in ES5 mode.
|
@@ -2394,20 +2447,20 @@ me.deleteProperty = function(t, r) {
|
|
2394
2447
|
me.set = function(t, r, n) {
|
2395
2448
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
|
2396
2449
|
};
|
2397
|
-
function
|
2450
|
+
function en(t, r) {
|
2398
2451
|
const n = t[J];
|
2399
2452
|
return (n ? Et(n) : t)[r];
|
2400
2453
|
}
|
2401
2454
|
function aa(t, r, n) {
|
2402
2455
|
var o;
|
2403
|
-
const i =
|
2456
|
+
const i = ci(r, n);
|
2404
2457
|
return i ? "value" in i ? i.value : (
|
2405
2458
|
// This is a very special case, if the prop is a getter defined by the
|
2406
2459
|
// prototype, we should invoke it with the draft as context!
|
2407
2460
|
(o = i.get) == null ? void 0 : o.call(t.draft_)
|
2408
2461
|
) : void 0;
|
2409
2462
|
}
|
2410
|
-
function
|
2463
|
+
function ci(t, r) {
|
2411
2464
|
if (!(r in t))
|
2412
2465
|
return;
|
2413
2466
|
let n = Ot(t);
|
@@ -2418,11 +2471,11 @@ function ni(t, r) {
|
|
2418
2471
|
n = Ot(n);
|
2419
2472
|
}
|
2420
2473
|
}
|
2421
|
-
function
|
2422
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
2474
|
+
function yn(t) {
|
2475
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && yn(t.parent_));
|
2423
2476
|
}
|
2424
|
-
function
|
2425
|
-
t.copy_ || (t.copy_ =
|
2477
|
+
function rn(t) {
|
2478
|
+
t.copy_ || (t.copy_ = fn(
|
2426
2479
|
t.base_,
|
2427
2480
|
t.scope_.immer_.useStrictShallowCopy_
|
2428
2481
|
));
|
@@ -2434,21 +2487,21 @@ var sa = class {
|
|
2434
2487
|
const c = n;
|
2435
2488
|
n = r;
|
2436
2489
|
const f = this;
|
2437
|
-
return function(
|
2438
|
-
return f.produce(
|
2490
|
+
return function(M = c, ...R) {
|
2491
|
+
return f.produce(M, (T) => n.call(this, T, ...R));
|
2439
2492
|
};
|
2440
2493
|
}
|
2441
2494
|
typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
|
2442
2495
|
let o;
|
2443
2496
|
if (gt(r)) {
|
2444
|
-
const c =
|
2497
|
+
const c = Nn(this), f = mn(r, void 0);
|
2445
2498
|
let d = !0;
|
2446
2499
|
try {
|
2447
2500
|
o = n(f), d = !1;
|
2448
2501
|
} finally {
|
2449
|
-
d ?
|
2502
|
+
d ? dn(c) : hn(c);
|
2450
2503
|
}
|
2451
|
-
return
|
2504
|
+
return zn(c, i), Hn(o, c);
|
2452
2505
|
} else if (!r || typeof r != "object") {
|
2453
2506
|
if (o = n(r), o === void 0 && (o = r), o === _n && (o = void 0), this.autoFreeze_ && vn(o, !0), i) {
|
2454
2507
|
const c = [], f = [];
|
@@ -2459,7 +2512,7 @@ var sa = class {
|
|
2459
2512
|
G(1, r);
|
2460
2513
|
}, this.produceWithPatches = (r, n) => {
|
2461
2514
|
if (typeof r == "function")
|
2462
|
-
return (f, ...d) => this.produceWithPatches(f, (
|
2515
|
+
return (f, ...d) => this.produceWithPatches(f, (M) => r(M, ...d));
|
2463
2516
|
let i, o;
|
2464
2517
|
return [this.produce(r, n, (f, d) => {
|
2465
2518
|
i = f, o = d;
|
@@ -2468,14 +2521,14 @@ var sa = class {
|
|
2468
2521
|
}
|
2469
2522
|
createDraft(t) {
|
2470
2523
|
gt(t) || G(8), xt(t) && (t = oa(t));
|
2471
|
-
const r =
|
2472
|
-
return n[J].isManual_ = !0,
|
2524
|
+
const r = Nn(this), n = mn(t, void 0);
|
2525
|
+
return n[J].isManual_ = !0, hn(r), n;
|
2473
2526
|
}
|
2474
2527
|
finishDraft(t, r) {
|
2475
2528
|
const n = t && t[J];
|
2476
2529
|
(!n || !n.isManual_) && G(9);
|
2477
2530
|
const { scope_: i } = n;
|
2478
|
-
return
|
2531
|
+
return zn(i, r), Hn(void 0, i);
|
2479
2532
|
}
|
2480
2533
|
/**
|
2481
2534
|
* Pass true to automatically freeze all copies created by Immer.
|
@@ -2510,14 +2563,14 @@ var sa = class {
|
|
2510
2563
|
);
|
2511
2564
|
}
|
2512
2565
|
};
|
2513
|
-
function
|
2566
|
+
function mn(t, r) {
|
2514
2567
|
const n = _e(t) ? Pt("MapSet").proxyMap_(t, r) : ve(t) ? Pt("MapSet").proxySet_(t, r) : ia(t, r);
|
2515
|
-
return (r ? r.scope_ :
|
2568
|
+
return (r ? r.scope_ : oi()).drafts_.push(n), n;
|
2516
2569
|
}
|
2517
2570
|
function oa(t) {
|
2518
|
-
return xt(t) || G(10, t),
|
2571
|
+
return xt(t) || G(10, t), ui(t);
|
2519
2572
|
}
|
2520
|
-
function
|
2573
|
+
function ui(t) {
|
2521
2574
|
if (!gt(t) || nr(t))
|
2522
2575
|
return t;
|
2523
2576
|
const r = t[J];
|
@@ -2525,127 +2578,127 @@ function ii(t) {
|
|
2525
2578
|
if (r) {
|
2526
2579
|
if (!r.modified_)
|
2527
2580
|
return r.base_;
|
2528
|
-
r.finalized_ = !0, n =
|
2581
|
+
r.finalized_ = !0, n = fn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2529
2582
|
} else
|
2530
|
-
n =
|
2583
|
+
n = fn(t, !0);
|
2531
2584
|
return de(n, (i, o) => {
|
2532
|
-
|
2585
|
+
si(n, i, ui(o));
|
2533
2586
|
}), r && (r.finalized_ = !1), n;
|
2534
2587
|
}
|
2535
|
-
function
|
2536
|
-
process.env.NODE_ENV !== "production" &&
|
2588
|
+
function Ln() {
|
2589
|
+
process.env.NODE_ENV !== "production" && ii.push(
|
2537
2590
|
'Sets cannot have "replace" patches.',
|
2538
|
-
function(
|
2539
|
-
return "Unsupported patch operation: " +
|
2591
|
+
function(y) {
|
2592
|
+
return "Unsupported patch operation: " + y;
|
2540
2593
|
},
|
2541
|
-
function(
|
2542
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2594
|
+
function(y) {
|
2595
|
+
return "Cannot apply patch, path doesn't resolve: " + y;
|
2543
2596
|
},
|
2544
2597
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2545
2598
|
);
|
2546
2599
|
const r = "replace", n = "add", i = "remove";
|
2547
|
-
function o(
|
2548
|
-
switch (
|
2600
|
+
function o(y, p, h, l) {
|
2601
|
+
switch (y.type_) {
|
2549
2602
|
case 0:
|
2550
2603
|
case 2:
|
2551
2604
|
return f(
|
2552
|
-
|
2605
|
+
y,
|
2553
2606
|
p,
|
2554
2607
|
h,
|
2555
2608
|
l
|
2556
2609
|
);
|
2557
2610
|
case 1:
|
2558
|
-
return c(
|
2611
|
+
return c(y, p, h, l);
|
2559
2612
|
case 3:
|
2560
2613
|
return d(
|
2561
|
-
|
2614
|
+
y,
|
2562
2615
|
p,
|
2563
2616
|
h,
|
2564
2617
|
l
|
2565
2618
|
);
|
2566
2619
|
}
|
2567
2620
|
}
|
2568
|
-
function c(
|
2569
|
-
let { base_: b, assigned_: v } =
|
2570
|
-
|
2621
|
+
function c(y, p, h, l) {
|
2622
|
+
let { base_: b, assigned_: v } = y, m = y.copy_;
|
2623
|
+
m.length < b.length && ([b, m] = [m, b], [h, l] = [l, h]);
|
2571
2624
|
for (let g = 0; g < b.length; g++)
|
2572
|
-
if (v[g] &&
|
2573
|
-
const
|
2625
|
+
if (v[g] && m[g] !== b[g]) {
|
2626
|
+
const _ = p.concat([g]);
|
2574
2627
|
h.push({
|
2575
2628
|
op: r,
|
2576
|
-
path:
|
2629
|
+
path: _,
|
2577
2630
|
// Need to maybe clone it, as it can in fact be the original value
|
2578
2631
|
// due to the base/copy inversion at the start of this function
|
2579
|
-
value: H(
|
2632
|
+
value: H(m[g])
|
2580
2633
|
}), l.push({
|
2581
2634
|
op: r,
|
2582
|
-
path:
|
2635
|
+
path: _,
|
2583
2636
|
value: H(b[g])
|
2584
2637
|
});
|
2585
2638
|
}
|
2586
|
-
for (let g = b.length; g <
|
2587
|
-
const
|
2639
|
+
for (let g = b.length; g < m.length; g++) {
|
2640
|
+
const _ = p.concat([g]);
|
2588
2641
|
h.push({
|
2589
2642
|
op: n,
|
2590
|
-
path:
|
2643
|
+
path: _,
|
2591
2644
|
// Need to maybe clone it, as it can in fact be the original value
|
2592
2645
|
// due to the base/copy inversion at the start of this function
|
2593
|
-
value: H(
|
2646
|
+
value: H(m[g])
|
2594
2647
|
});
|
2595
2648
|
}
|
2596
|
-
for (let g =
|
2597
|
-
const
|
2649
|
+
for (let g = m.length - 1; b.length <= g; --g) {
|
2650
|
+
const _ = p.concat([g]);
|
2598
2651
|
l.push({
|
2599
2652
|
op: i,
|
2600
|
-
path:
|
2653
|
+
path: _
|
2601
2654
|
});
|
2602
2655
|
}
|
2603
2656
|
}
|
2604
|
-
function f(
|
2605
|
-
const { base_: b, copy_: v } =
|
2606
|
-
de(
|
2607
|
-
const
|
2608
|
-
if (
|
2657
|
+
function f(y, p, h, l) {
|
2658
|
+
const { base_: b, copy_: v } = y;
|
2659
|
+
de(y.assigned_, (m, g) => {
|
2660
|
+
const _ = tn(b, m), A = tn(v, m), w = g ? he(b, m) ? r : n : i;
|
2661
|
+
if (_ === A && w === r)
|
2609
2662
|
return;
|
2610
|
-
const
|
2611
|
-
h.push(
|
2612
|
-
|
2663
|
+
const k = p.concat(m);
|
2664
|
+
h.push(w === i ? { op: w, path: k } : { op: w, path: k, value: A }), l.push(
|
2665
|
+
w === n ? { op: i, path: k } : w === i ? { op: n, path: k, value: H(_) } : { op: r, path: k, value: H(_) }
|
2613
2666
|
);
|
2614
2667
|
});
|
2615
2668
|
}
|
2616
|
-
function d(
|
2617
|
-
let { base_: b, copy_: v } =
|
2669
|
+
function d(y, p, h, l) {
|
2670
|
+
let { base_: b, copy_: v } = y, m = 0;
|
2618
2671
|
b.forEach((g) => {
|
2619
2672
|
if (!v.has(g)) {
|
2620
|
-
const
|
2673
|
+
const _ = p.concat([m]);
|
2621
2674
|
h.push({
|
2622
2675
|
op: i,
|
2623
|
-
path:
|
2676
|
+
path: _,
|
2624
2677
|
value: g
|
2625
2678
|
}), l.unshift({
|
2626
2679
|
op: n,
|
2627
|
-
path:
|
2680
|
+
path: _,
|
2628
2681
|
value: g
|
2629
2682
|
});
|
2630
2683
|
}
|
2631
|
-
|
2632
|
-
}),
|
2684
|
+
m++;
|
2685
|
+
}), m = 0, v.forEach((g) => {
|
2633
2686
|
if (!b.has(g)) {
|
2634
|
-
const
|
2687
|
+
const _ = p.concat([m]);
|
2635
2688
|
h.push({
|
2636
2689
|
op: n,
|
2637
|
-
path:
|
2690
|
+
path: _,
|
2638
2691
|
value: g
|
2639
2692
|
}), l.unshift({
|
2640
2693
|
op: i,
|
2641
|
-
path:
|
2694
|
+
path: _,
|
2642
2695
|
value: g
|
2643
2696
|
});
|
2644
2697
|
}
|
2645
|
-
|
2698
|
+
m++;
|
2646
2699
|
});
|
2647
2700
|
}
|
2648
|
-
function
|
2701
|
+
function M(y, p, h, l) {
|
2649
2702
|
h.push({
|
2650
2703
|
op: r,
|
2651
2704
|
path: [],
|
@@ -2653,79 +2706,79 @@ function Fn() {
|
|
2653
2706
|
}), l.push({
|
2654
2707
|
op: r,
|
2655
2708
|
path: [],
|
2656
|
-
value:
|
2709
|
+
value: y
|
2657
2710
|
});
|
2658
2711
|
}
|
2659
|
-
function
|
2712
|
+
function R(y, p) {
|
2660
2713
|
return p.forEach((h) => {
|
2661
2714
|
const { path: l, op: b } = h;
|
2662
|
-
let v =
|
2663
|
-
for (let
|
2664
|
-
const
|
2665
|
-
let
|
2666
|
-
typeof
|
2715
|
+
let v = y;
|
2716
|
+
for (let A = 0; A < l.length - 1; A++) {
|
2717
|
+
const w = Mt(v);
|
2718
|
+
let k = l[A];
|
2719
|
+
typeof k != "string" && typeof k != "number" && (k = "" + k), (w === 0 || w === 1) && (k === "__proto__" || k === "constructor") && G(19), typeof v == "function" && k === "prototype" && G(19), v = tn(v, k), typeof v != "object" && G(18, l.join("/"));
|
2667
2720
|
}
|
2668
|
-
const
|
2721
|
+
const m = Mt(v), g = T(h.value), _ = l[l.length - 1];
|
2669
2722
|
switch (b) {
|
2670
2723
|
case r:
|
2671
|
-
switch (
|
2724
|
+
switch (m) {
|
2672
2725
|
case 2:
|
2673
|
-
return v.set(
|
2726
|
+
return v.set(_, g);
|
2674
2727
|
case 3:
|
2675
2728
|
G(16);
|
2676
2729
|
default:
|
2677
|
-
return v[
|
2730
|
+
return v[_] = g;
|
2678
2731
|
}
|
2679
2732
|
case n:
|
2680
|
-
switch (
|
2733
|
+
switch (m) {
|
2681
2734
|
case 1:
|
2682
|
-
return
|
2735
|
+
return _ === "-" ? v.push(g) : v.splice(_, 0, g);
|
2683
2736
|
case 2:
|
2684
|
-
return v.set(
|
2737
|
+
return v.set(_, g);
|
2685
2738
|
case 3:
|
2686
2739
|
return v.add(g);
|
2687
2740
|
default:
|
2688
|
-
return v[
|
2741
|
+
return v[_] = g;
|
2689
2742
|
}
|
2690
2743
|
case i:
|
2691
|
-
switch (
|
2744
|
+
switch (m) {
|
2692
2745
|
case 1:
|
2693
|
-
return v.splice(
|
2746
|
+
return v.splice(_, 1);
|
2694
2747
|
case 2:
|
2695
|
-
return v.delete(
|
2748
|
+
return v.delete(_);
|
2696
2749
|
case 3:
|
2697
2750
|
return v.delete(h.value);
|
2698
2751
|
default:
|
2699
|
-
return delete v[
|
2752
|
+
return delete v[_];
|
2700
2753
|
}
|
2701
2754
|
default:
|
2702
2755
|
G(17, b);
|
2703
2756
|
}
|
2704
|
-
}),
|
2705
|
-
}
|
2706
|
-
function
|
2707
|
-
if (!gt(
|
2708
|
-
return
|
2709
|
-
if (Array.isArray(
|
2710
|
-
return
|
2711
|
-
if (_e(
|
2757
|
+
}), y;
|
2758
|
+
}
|
2759
|
+
function T(y) {
|
2760
|
+
if (!gt(y))
|
2761
|
+
return y;
|
2762
|
+
if (Array.isArray(y))
|
2763
|
+
return y.map(T);
|
2764
|
+
if (_e(y))
|
2712
2765
|
return new Map(
|
2713
|
-
Array.from(
|
2766
|
+
Array.from(y.entries()).map(([h, l]) => [h, T(l)])
|
2714
2767
|
);
|
2715
|
-
if (ve(
|
2716
|
-
return new Set(Array.from(
|
2717
|
-
const p = Object.create(Ot(
|
2718
|
-
for (const h in
|
2719
|
-
p[h] =
|
2720
|
-
return he(
|
2768
|
+
if (ve(y))
|
2769
|
+
return new Set(Array.from(y).map(T));
|
2770
|
+
const p = Object.create(Ot(y));
|
2771
|
+
for (const h in y)
|
2772
|
+
p[h] = T(y[h]);
|
2773
|
+
return he(y, pe) && (p[pe] = y[pe]), p;
|
2721
2774
|
}
|
2722
|
-
function H(
|
2723
|
-
return xt(
|
2775
|
+
function H(y) {
|
2776
|
+
return xt(y) ? T(y) : y;
|
2724
2777
|
}
|
2725
2778
|
ea("Patches", {
|
2726
|
-
applyPatches_:
|
2779
|
+
applyPatches_: R,
|
2727
2780
|
generatePatches_: o,
|
2728
|
-
generateReplacementPatches_:
|
2781
|
+
generateReplacementPatches_: M
|
2729
2782
|
});
|
2730
2783
|
}
|
2731
2784
|
var Z = new sa(), ca = Z.produce;
|
@@ -2761,7 +2814,7 @@ function Ia(t, r) {
|
|
2761
2814
|
t[o + n] = r[n];
|
2762
2815
|
return t;
|
2763
2816
|
}
|
2764
|
-
var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString,
|
2817
|
+
var Sn = Object.prototype, Sa = Sn.hasOwnProperty, wn = Sn.toString, Gn = ga.Symbol, wa = Sn.propertyIsEnumerable, Wn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
2765
2818
|
function Ta(t, r, n, i, o) {
|
2766
2819
|
var c = -1, f = t.length;
|
2767
2820
|
for (n || (n = Oa), o || (o = []); ++c < f; ) {
|
@@ -2783,8 +2836,8 @@ function Aa(t, r, n) {
|
|
2783
2836
|
return c;
|
2784
2837
|
}
|
2785
2838
|
function Ea(t, r) {
|
2786
|
-
return r =
|
2787
|
-
for (var n = arguments, i = -1, o =
|
2839
|
+
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
2840
|
+
for (var n = arguments, i = -1, o = Bn(n.length - r, 0), c = Array(o); ++i < o; )
|
2788
2841
|
c[i] = n[r + i];
|
2789
2842
|
i = -1;
|
2790
2843
|
for (var f = Array(r + 1); ++i < r; )
|
@@ -2793,7 +2846,7 @@ function Ea(t, r) {
|
|
2793
2846
|
};
|
2794
2847
|
}
|
2795
2848
|
function Oa(t) {
|
2796
|
-
return Pa(t) || Ma(t) || !!(
|
2849
|
+
return Pa(t) || Ma(t) || !!(Wn && t && t[Wn]);
|
2797
2850
|
}
|
2798
2851
|
function xa(t) {
|
2799
2852
|
if (typeof t == "string" || za(t))
|
@@ -2809,7 +2862,7 @@ function Da(t) {
|
|
2809
2862
|
return t != null && Ra(t.length) && !ja(t);
|
2810
2863
|
}
|
2811
2864
|
function Ca(t) {
|
2812
|
-
return
|
2865
|
+
return li(t) && Da(t);
|
2813
2866
|
}
|
2814
2867
|
function ja(t) {
|
2815
2868
|
var r = Fa(t) ? wn.call(t) : "";
|
@@ -2822,16 +2875,16 @@ function Fa(t) {
|
|
2822
2875
|
var r = typeof t;
|
2823
2876
|
return !!t && (r == "object" || r == "function");
|
2824
2877
|
}
|
2825
|
-
function
|
2878
|
+
function li(t) {
|
2826
2879
|
return !!t && typeof t == "object";
|
2827
2880
|
}
|
2828
2881
|
function za(t) {
|
2829
|
-
return typeof t == "symbol" ||
|
2882
|
+
return typeof t == "symbol" || li(t) && wn.call(t) == ya;
|
2830
2883
|
}
|
2831
2884
|
var Na = Ea(function(t, r) {
|
2832
2885
|
return t == null ? {} : ka(t, va(Ta(r), xa));
|
2833
2886
|
}), Ha = Na;
|
2834
|
-
const
|
2887
|
+
const $n = /* @__PURE__ */ bn(Ha), Ua = {
|
2835
2888
|
tracks: [],
|
2836
2889
|
trackItemIds: [],
|
2837
2890
|
trackItemsMap: {},
|
@@ -2845,7 +2898,7 @@ const Un = /* @__PURE__ */ gn(Ha), Ua = {
|
|
2845
2898
|
duration: 0,
|
2846
2899
|
activeIds: [],
|
2847
2900
|
trackItemDetailsMap: {}
|
2848
|
-
},
|
2901
|
+
}, Kn = [
|
2849
2902
|
"tracks",
|
2850
2903
|
"trackItemsMap",
|
2851
2904
|
"trackItemDetailsMap",
|
@@ -2877,7 +2930,7 @@ class Wa {
|
|
2877
2930
|
this.destroyListeners();
|
2878
2931
|
}
|
2879
2932
|
updateHistory(r, n) {
|
2880
|
-
const i =
|
2933
|
+
const i = $n(r, Kn), o = $n(this.getState(), Kn), c = ni(o, i);
|
2881
2934
|
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
2882
2935
|
}
|
2883
2936
|
getStateHistory() {
|
@@ -2963,66 +3016,66 @@ class Wa {
|
|
2963
3016
|
undo() {
|
2964
3017
|
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, i = r == null ? void 0 : r.type;
|
2965
3018
|
if (!n || !i) return;
|
2966
|
-
|
3019
|
+
Ln();
|
2967
3020
|
const {
|
2968
3021
|
trackItemDetailsMap: o,
|
2969
3022
|
trackItemIds: c,
|
2970
3023
|
tracks: f,
|
2971
3024
|
transitionIds: d,
|
2972
|
-
transitionsMap:
|
2973
|
-
trackItemsMap:
|
2974
|
-
} = this.getState(),
|
3025
|
+
transitionsMap: M,
|
3026
|
+
trackItemsMap: R
|
3027
|
+
} = this.getState(), T = tt({
|
2975
3028
|
trackItemDetailsMap: o,
|
2976
3029
|
trackItemIds: c,
|
2977
3030
|
tracks: f,
|
2978
3031
|
transitionIds: d,
|
2979
|
-
transitionsMap:
|
2980
|
-
trackItemsMap:
|
2981
|
-
}), H = [],
|
2982
|
-
n.forEach((
|
2983
|
-
let
|
2984
|
-
const F =
|
2985
|
-
|
3032
|
+
transitionsMap: M,
|
3033
|
+
trackItemsMap: R
|
3034
|
+
}), H = [], y = [], p = [], h = [], l = [], b = [];
|
3035
|
+
n.forEach((E) => {
|
3036
|
+
let P;
|
3037
|
+
const F = E.path.slice(1);
|
3038
|
+
E.type === "CREATE" ? P = {
|
2986
3039
|
path: F,
|
2987
3040
|
op: "remove",
|
2988
|
-
value:
|
2989
|
-
} :
|
3041
|
+
value: E.value
|
3042
|
+
} : E.type === "CHANGE" ? P = {
|
2990
3043
|
path: F,
|
2991
3044
|
op: "replace",
|
2992
|
-
value:
|
2993
|
-
} :
|
3045
|
+
value: E.oldValue
|
3046
|
+
} : P = {
|
2994
3047
|
path: F,
|
2995
3048
|
op: "add",
|
2996
|
-
value:
|
2997
|
-
},
|
3049
|
+
value: E.oldValue
|
3050
|
+
}, E.path.includes("trackItemIds") ? p.push(P) : E.path.includes("transitionIds") ? y.push(P) : E.path.includes("trackItemsMap") ? l.push(P) : E.path.includes("transitionsMap") ? h.push(P) : E.path.includes("tracks") ? H.push(P) : E.path.includes("trackItemDetailsMap") && b.push(P);
|
2998
3051
|
});
|
2999
3052
|
const v = this.applyPatch(
|
3000
|
-
|
3053
|
+
T.tracks,
|
3001
3054
|
H
|
3002
|
-
),
|
3003
|
-
|
3004
|
-
|
3055
|
+
), m = this.applyPatch(
|
3056
|
+
T.transitionIds,
|
3057
|
+
y
|
3005
3058
|
), g = this.applyPatch(
|
3006
|
-
|
3059
|
+
T.trackItemIds,
|
3007
3060
|
p
|
3008
|
-
),
|
3009
|
-
|
3061
|
+
), _ = this.applyPatch(
|
3062
|
+
T.transitionsMap,
|
3010
3063
|
h
|
3011
|
-
), R = this.applyPatch(
|
3012
|
-
S.trackItemsMap,
|
3013
|
-
l
|
3014
3064
|
), A = this.applyPatch(
|
3015
|
-
|
3065
|
+
T.trackItemsMap,
|
3066
|
+
l
|
3067
|
+
), w = this.applyPatch(
|
3068
|
+
T.trackItemDetailsMap,
|
3016
3069
|
b
|
3017
|
-
),
|
3070
|
+
), k = tt({
|
3018
3071
|
tracks: v,
|
3019
|
-
transitionIds:
|
3072
|
+
transitionIds: m,
|
3020
3073
|
trackItemIds: g,
|
3021
|
-
transitionsMap:
|
3022
|
-
trackItemsMap:
|
3023
|
-
trackItemDetailsMap:
|
3024
|
-
}),
|
3025
|
-
this.prevState =
|
3074
|
+
transitionsMap: _,
|
3075
|
+
trackItemsMap: A,
|
3076
|
+
trackItemDetailsMap: w
|
3077
|
+
}), x = tt(this.getState()), S = { ...x, ...k };
|
3078
|
+
this.prevState = x, this.redos.push({ redos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3026
3079
|
}
|
3027
3080
|
applyPatch(r, n) {
|
3028
3081
|
return n.reverse().reduce((i, o) => ca(i, (c) => {
|
@@ -3032,66 +3085,66 @@ class Wa {
|
|
3032
3085
|
redo() {
|
3033
3086
|
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, i = r == null ? void 0 : r.type;
|
3034
3087
|
if (!n || !i) return;
|
3035
|
-
|
3088
|
+
Ln();
|
3036
3089
|
const {
|
3037
3090
|
trackItemDetailsMap: o,
|
3038
3091
|
trackItemIds: c,
|
3039
3092
|
tracks: f,
|
3040
3093
|
transitionIds: d,
|
3041
|
-
transitionsMap:
|
3042
|
-
trackItemsMap:
|
3043
|
-
} = this.getState(),
|
3094
|
+
transitionsMap: M,
|
3095
|
+
trackItemsMap: R
|
3096
|
+
} = this.getState(), T = tt({
|
3044
3097
|
trackItemDetailsMap: o,
|
3045
3098
|
trackItemIds: c,
|
3046
3099
|
tracks: f,
|
3047
3100
|
transitionIds: d,
|
3048
|
-
transitionsMap:
|
3049
|
-
trackItemsMap:
|
3050
|
-
}), H = [],
|
3051
|
-
n.forEach((
|
3052
|
-
let
|
3053
|
-
const F =
|
3054
|
-
|
3101
|
+
transitionsMap: M,
|
3102
|
+
trackItemsMap: R
|
3103
|
+
}), H = [], y = [], p = [], h = [], l = [], b = [];
|
3104
|
+
n.forEach((E) => {
|
3105
|
+
let P;
|
3106
|
+
const F = E.path.slice(1);
|
3107
|
+
E.type === "CREATE" ? P = {
|
3055
3108
|
path: F,
|
3056
3109
|
op: "add",
|
3057
|
-
value:
|
3058
|
-
} :
|
3110
|
+
value: E.value
|
3111
|
+
} : E.type === "CHANGE" ? P = {
|
3059
3112
|
path: F,
|
3060
3113
|
op: "replace",
|
3061
|
-
value:
|
3062
|
-
} :
|
3114
|
+
value: E.value
|
3115
|
+
} : P = {
|
3063
3116
|
path: F,
|
3064
3117
|
op: "remove",
|
3065
|
-
value:
|
3066
|
-
},
|
3118
|
+
value: E.oldValue
|
3119
|
+
}, E.path.includes("trackItemIds") ? p.push(P) : E.path.includes("transitionIds") ? y.push(P) : E.path.includes("trackItemsMap") ? l.push(P) : E.path.includes("transitionsMap") ? h.push(P) : E.path.includes("trackItemDetailsMap") ? b.push(P) : H.push(P);
|
3067
3120
|
});
|
3068
3121
|
const v = this.applyPatch(
|
3069
|
-
|
3122
|
+
T.tracks,
|
3070
3123
|
H
|
3071
|
-
),
|
3072
|
-
|
3073
|
-
|
3124
|
+
), m = this.applyPatch(
|
3125
|
+
T.transitionIds,
|
3126
|
+
y
|
3074
3127
|
), g = this.applyPatch(
|
3075
|
-
|
3128
|
+
T.trackItemIds,
|
3076
3129
|
p
|
3077
|
-
),
|
3078
|
-
|
3130
|
+
), _ = this.applyPatch(
|
3131
|
+
T.transitionsMap,
|
3079
3132
|
h
|
3080
|
-
), R = this.applyPatch(
|
3081
|
-
S.trackItemsMap,
|
3082
|
-
l
|
3083
3133
|
), A = this.applyPatch(
|
3084
|
-
|
3134
|
+
T.trackItemsMap,
|
3135
|
+
l
|
3136
|
+
), w = this.applyPatch(
|
3137
|
+
T.trackItemDetailsMap,
|
3085
3138
|
b
|
3086
|
-
),
|
3139
|
+
), k = tt({
|
3087
3140
|
tracks: v,
|
3088
|
-
transitionIds:
|
3141
|
+
transitionIds: m,
|
3089
3142
|
trackItemIds: g,
|
3090
|
-
transitionsMap:
|
3091
|
-
trackItemsMap:
|
3092
|
-
trackItemDetailsMap:
|
3093
|
-
}),
|
3094
|
-
this.prevState =
|
3143
|
+
transitionsMap: _,
|
3144
|
+
trackItemsMap: A,
|
3145
|
+
trackItemDetailsMap: w
|
3146
|
+
}), x = tt(this.getState()), S = { ...x, ...k };
|
3147
|
+
this.prevState = x, this.undos.push({ undos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3095
3148
|
}
|
3096
3149
|
}
|
3097
3150
|
export {
|