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