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