@designcombo/state 0.1.38 → 0.1.40
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/index.es.js +783 -776
- package/dist/index.umd.js +2 -2
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var Si = Object.defineProperty;
|
2
2
|
var Ei = (t, r, n) => r in t ? Si(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
3
3
|
var Ut = (t, r, n) => Ei(t, typeof r != "symbol" ? r + "" : r, n);
|
4
|
-
import { subject as de, filter as pe, DESIGN_PREFIX as Ti, ADD_PREFIX as
|
4
|
+
import { subject as de, filter as pe, DESIGN_PREFIX as Ti, ADD_PREFIX as wi, LAYER_PREFIX as ki, HISTORY_PREFIX as Ai, ACTIVE_PREFIX as Di, EDIT_PREFIX as Mi, DESIGN_LOAD as Oi, DESIGN_RESIZE as xi, HISTORY_UNDO as Pi, HISTORY_REDO as Ci, LAYER_DELETE as Ri, LAYER_CLONE as Li, ADD_CAPTION as Fi, ADD_TEXT as $i, ADD_TEMPLATE as Ni, ADD_IMAGE as Hi, ADD_AUDIO as zi, ADD_VIDEO as ji, ACTIVE_SPLIT as Ui, ACTIVE_CLONE as Gi, ACTIVE_PASTE as Yi, EDIT_OBJECT as Wi, REPLACE_MEDIA as Xi } from "@designcombo/events";
|
5
5
|
var dn = function(t, r) {
|
6
6
|
return dn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
@@ -9,7 +9,7 @@ var dn = function(t, r) {
|
|
9
9
|
for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
|
10
10
|
}, dn(t, r);
|
11
11
|
};
|
12
|
-
function
|
12
|
+
function Ne(t, r) {
|
13
13
|
if (typeof r != "function" && r !== null)
|
14
14
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
15
15
|
dn(t, r);
|
@@ -34,8 +34,8 @@ function hn(t, r) {
|
|
34
34
|
var i = n.call(t), s, c = [], d;
|
35
35
|
try {
|
36
36
|
for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
|
37
|
-
} catch (
|
38
|
-
d = { error:
|
37
|
+
} catch (m) {
|
38
|
+
d = { error: m };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
41
|
s && !s.done && (n = i.return) && n.call(i);
|
@@ -50,7 +50,7 @@ function mn(t, r, n) {
|
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function Dt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
56
|
function Vn(t) {
|
@@ -86,15 +86,15 @@ var mr = function() {
|
|
86
86
|
if (d)
|
87
87
|
if (this._parentage = null, Array.isArray(d))
|
88
88
|
try {
|
89
|
-
for (var
|
90
|
-
var
|
91
|
-
|
89
|
+
for (var m = pn(d), T = m.next(); !T.done; T = m.next()) {
|
90
|
+
var R = T.value;
|
91
|
+
R.remove(this);
|
92
92
|
}
|
93
|
-
} catch (
|
94
|
-
r = { error:
|
93
|
+
} catch (p) {
|
94
|
+
r = { error: p };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
T && !T.done && (n =
|
97
|
+
T && !T.done && (n = m.return) && n.call(m);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
@@ -102,11 +102,11 @@ var mr = function() {
|
|
102
102
|
else
|
103
103
|
d.remove(this);
|
104
104
|
var S = this.initialTeardown;
|
105
|
-
if (
|
105
|
+
if (Dt(S))
|
106
106
|
try {
|
107
107
|
S();
|
108
|
-
} catch (
|
109
|
-
c =
|
108
|
+
} catch (p) {
|
109
|
+
c = p instanceof on ? p.errors : [p];
|
110
110
|
}
|
111
111
|
var F = this._finalizers;
|
112
112
|
if (F) {
|
@@ -116,12 +116,12 @@ var mr = function() {
|
|
116
116
|
var l = f.value;
|
117
117
|
try {
|
118
118
|
Cn(l);
|
119
|
-
} catch (
|
120
|
-
c = c ?? [],
|
119
|
+
} catch (p) {
|
120
|
+
c = c ?? [], p instanceof on ? c = mn(mn([], hn(c)), hn(p.errors)) : c.push(p);
|
121
121
|
}
|
122
122
|
}
|
123
|
-
} catch (
|
124
|
-
i = { error:
|
123
|
+
} catch (p) {
|
124
|
+
i = { error: p };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
127
|
f && !f.done && (s = _.return) && s.call(_);
|
@@ -164,10 +164,10 @@ var mr = function() {
|
|
164
164
|
}(), t;
|
165
165
|
}(), Jn = mr.EMPTY;
|
166
166
|
function Zn(t) {
|
167
|
-
return t instanceof mr || t && "closed" in t &&
|
167
|
+
return t instanceof mr || t && "closed" in t && Dt(t.remove) && Dt(t.add) && Dt(t.unsubscribe);
|
168
168
|
}
|
169
169
|
function Cn(t) {
|
170
|
-
|
170
|
+
Dt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
172
|
var qn = {
|
173
173
|
onUnhandledError: null,
|
@@ -194,11 +194,11 @@ function Bi(t) {
|
|
194
194
|
}
|
195
195
|
function Rn() {
|
196
196
|
}
|
197
|
-
function
|
197
|
+
function ur(t) {
|
198
198
|
t();
|
199
199
|
}
|
200
200
|
var ti = function(t) {
|
201
|
-
|
201
|
+
Ne(r, t);
|
202
202
|
function r(n) {
|
203
203
|
var i = t.call(this) || this;
|
204
204
|
return i.isStopped = !1, n ? (i.destination = n, Zn(n) && n.add(i)) : i.destination = Zi, i;
|
@@ -242,7 +242,7 @@ var Vi = function() {
|
|
242
242
|
try {
|
243
243
|
n.next(r);
|
244
244
|
} catch (i) {
|
245
|
-
|
245
|
+
cr(i);
|
246
246
|
}
|
247
247
|
}, t.prototype.error = function(r) {
|
248
248
|
var n = this.partialObserver;
|
@@ -250,44 +250,44 @@ var Vi = function() {
|
|
250
250
|
try {
|
251
251
|
n.error(r);
|
252
252
|
} catch (i) {
|
253
|
-
|
253
|
+
cr(i);
|
254
254
|
}
|
255
255
|
else
|
256
|
-
|
256
|
+
cr(r);
|
257
257
|
}, t.prototype.complete = function() {
|
258
258
|
var r = this.partialObserver;
|
259
259
|
if (r.complete)
|
260
260
|
try {
|
261
261
|
r.complete();
|
262
262
|
} catch (n) {
|
263
|
-
|
263
|
+
cr(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
266
|
}(), _n = function(t) {
|
267
|
-
|
267
|
+
Ne(r, t);
|
268
268
|
function r(n, i, s) {
|
269
269
|
var c = t.call(this) || this, d;
|
270
|
-
if (
|
270
|
+
if (Dt(n) || !n)
|
271
271
|
d = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
274
274
|
complete: s ?? void 0
|
275
275
|
};
|
276
276
|
else {
|
277
|
-
var
|
278
|
-
c && qn.useDeprecatedNextContext ? (
|
277
|
+
var m;
|
278
|
+
c && qn.useDeprecatedNextContext ? (m = Object.create(n), m.unsubscribe = function() {
|
279
279
|
return c.unsubscribe();
|
280
280
|
}, d = {
|
281
|
-
next: n.next && cn(n.next,
|
282
|
-
error: n.error && cn(n.error,
|
283
|
-
complete: n.complete && cn(n.complete,
|
281
|
+
next: n.next && cn(n.next, m),
|
282
|
+
error: n.error && cn(n.error, m),
|
283
|
+
complete: n.complete && cn(n.complete, m)
|
284
284
|
}) : d = n;
|
285
285
|
}
|
286
286
|
return c.destination = new Vi(d), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
289
|
}(ti);
|
290
|
-
function
|
290
|
+
function cr(t) {
|
291
291
|
Bi(t);
|
292
292
|
}
|
293
293
|
function Ji(t) {
|
@@ -320,9 +320,9 @@ var Ln = function() {
|
|
320
320
|
return n.source = this, n.operator = r, n;
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
322
322
|
var s = this, c = ra(r) ? r : new _n(r, n, i);
|
323
|
-
return
|
324
|
-
var d = s,
|
325
|
-
c.add(
|
323
|
+
return ur(function() {
|
324
|
+
var d = s, m = d.operator, T = d.source;
|
325
|
+
c.add(m ? m.call(c, T) : T ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -334,9 +334,9 @@ var Ln = function() {
|
|
334
334
|
var i = this;
|
335
335
|
return n = Fn(n), new n(function(s, c) {
|
336
336
|
var d = new _n({
|
337
|
-
next: function(
|
337
|
+
next: function(m) {
|
338
338
|
try {
|
339
|
-
r(
|
339
|
+
r(m);
|
340
340
|
} catch (T) {
|
341
341
|
c(T), d.unsubscribe();
|
342
342
|
}
|
@@ -376,7 +376,7 @@ function Fn(t) {
|
|
376
376
|
return (r = t ?? qn.Promise) !== null && r !== void 0 ? r : Promise;
|
377
377
|
}
|
378
378
|
function ea(t) {
|
379
|
-
return t &&
|
379
|
+
return t && Dt(t.next) && Dt(t.error) && Dt(t.complete);
|
380
380
|
}
|
381
381
|
function ra(t) {
|
382
382
|
return t && t instanceof ti || ea(t) && Zn(t);
|
@@ -386,7 +386,7 @@ var na = Vn(function(t) {
|
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
387
387
|
};
|
388
388
|
}), ei = function(t) {
|
389
|
-
|
389
|
+
Ne(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;
|
@@ -399,20 +399,20 @@ var na = Vn(function(t) {
|
|
399
399
|
throw new na();
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
|
-
|
402
|
+
ur(function() {
|
403
403
|
var s, c;
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
|
-
for (var d = pn(i.currentObservers),
|
408
|
-
var T =
|
407
|
+
for (var d = pn(i.currentObservers), m = d.next(); !m.done; m = d.next()) {
|
408
|
+
var T = m.value;
|
409
409
|
T.next(n);
|
410
410
|
}
|
411
|
-
} catch (
|
412
|
-
s = { error:
|
411
|
+
} catch (R) {
|
412
|
+
s = { error: R };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
|
-
|
415
|
+
m && !m.done && (c = d.return) && c.call(d);
|
416
416
|
} finally {
|
417
417
|
if (s) throw s.error;
|
418
418
|
}
|
@@ -421,7 +421,7 @@ var na = Vn(function(t) {
|
|
421
421
|
});
|
422
422
|
}, r.prototype.error = function(n) {
|
423
423
|
var i = this;
|
424
|
-
|
424
|
+
ur(function() {
|
425
425
|
if (i._throwIfClosed(), !i.isStopped) {
|
426
426
|
i.hasError = i.isStopped = !0, i.thrownError = n;
|
427
427
|
for (var s = i.observers; s.length; )
|
@@ -430,7 +430,7 @@ var na = Vn(function(t) {
|
|
430
430
|
});
|
431
431
|
}, r.prototype.complete = function() {
|
432
432
|
var n = this;
|
433
|
-
|
433
|
+
ur(function() {
|
434
434
|
if (n._throwIfClosed(), !n.isStopped) {
|
435
435
|
n.isStopped = !0;
|
436
436
|
for (var i = n.observers; i.length; )
|
@@ -451,9 +451,9 @@ var na = Vn(function(t) {
|
|
451
451
|
}, r.prototype._subscribe = function(n) {
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
|
-
var i = this, s = this, c = s.hasError, d = s.isStopped,
|
455
|
-
return c || d ? Jn : (this.currentObservers = null,
|
456
|
-
i.currentObservers = null, yn(
|
454
|
+
var i = this, s = this, c = s.hasError, d = s.isStopped, m = s.observers;
|
455
|
+
return c || d ? Jn : (this.currentObservers = null, m.push(n), new mr(function() {
|
456
|
+
i.currentObservers = null, yn(m, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
459
459
|
var i = this, s = i.hasError, c = i.thrownError, d = i.isStopped;
|
@@ -465,7 +465,7 @@ var na = Vn(function(t) {
|
|
465
465
|
return new $n(n, i);
|
466
466
|
}, r;
|
467
467
|
}(Ln), $n = function(t) {
|
468
|
-
|
468
|
+
Ne(r, t);
|
469
469
|
function r(n, i) {
|
470
470
|
var s = t.call(this) || this;
|
471
471
|
return s.destination = n, s.source = i, s;
|
@@ -484,7 +484,7 @@ var na = Vn(function(t) {
|
|
484
484
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Jn;
|
485
485
|
}, r;
|
486
486
|
}(ei), Nn = function(t) {
|
487
|
-
|
487
|
+
Ne(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
490
490
|
return i._value = n, i;
|
@@ -506,34 +506,34 @@ var na = Vn(function(t) {
|
|
506
506
|
}, r.prototype.next = function(n) {
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
508
508
|
}, r;
|
509
|
-
}(ei),
|
510
|
-
function
|
509
|
+
}(ei), mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
|
+
function wn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
513
|
var lr = { exports: {} };
|
514
514
|
lr.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, d = 9007199254740991,
|
517
|
-
H[
|
518
|
-
var U = typeof
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, d = 9007199254740991, m = "[object Arguments]", T = "[object Array]", R = "[object AsyncFunction]", S = "[object Boolean]", F = "[object Date]", _ = "[object Error]", f = "[object Function]", l = "[object GeneratorFunction]", p = "[object Map]", g = "[object Number]", I = "[object Null]", b = "[object Object]", y = "[object Promise]", h = "[object Proxy]", E = "[object RegExp]", A = "[object Set]", w = "[object String]", x = "[object Symbol]", C = "[object Undefined]", P = "[object WeakMap]", k = "[object ArrayBuffer]", M = "[object DataView]", j = "[object Float32Array]", ut = "[object Float64Array]", Pt = "[object Int8Array]", Vt = "[object Int16Array]", Jt = "[object Int32Array]", Zt = "[object Uint8Array]", qt = "[object Uint8ClampedArray]", N = "[object Uint16Array]", Qt = "[object Uint32Array]", te = /[\\^$.*+?()[\]{}|]/g, at = /^\[object .+?Constructor\]$/, Ct = /^(?:0|[1-9]\d*)$/, H = {};
|
517
|
+
H[j] = H[ut] = H[Pt] = H[Vt] = H[Jt] = H[Zt] = H[qt] = H[N] = H[Qt] = !0, H[m] = H[T] = H[k] = H[S] = H[M] = H[F] = H[_] = H[f] = H[p] = H[g] = H[b] = H[E] = H[A] = H[w] = H[P] = !1;
|
518
|
+
var U = typeof mt == "object" && mt && mt.Object === Object && mt, G = typeof self == "object" && self && self.Object === Object && self, O = U || G || Function("return this")(), lt = r && !r.nodeType && r, rt = lt && !0 && t && !t.nodeType && t, K = rt && rt.exports === lt, ft = K && U.process, V = function() {
|
519
519
|
try {
|
520
|
-
return
|
520
|
+
return ft && ft.binding && ft.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
523
|
}(), Y = V && V.isTypedArray;
|
524
|
-
function
|
525
|
-
for (var o = -1, u = e == null ? 0 : e.length,
|
524
|
+
function gt(e, a) {
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, D = 0, v = []; ++o < u; ) {
|
526
526
|
var $ = e[o];
|
527
|
-
a($, o, e) && (v[
|
527
|
+
a($, o, e) && (v[D++] = $);
|
528
528
|
}
|
529
529
|
return v;
|
530
530
|
}
|
531
531
|
function Rt(e, a) {
|
532
|
-
for (var o = -1, u = a.length,
|
533
|
-
e[
|
532
|
+
for (var o = -1, u = a.length, D = e.length; ++o < u; )
|
533
|
+
e[D + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
|
-
function
|
536
|
+
function Ge(e, a) {
|
537
537
|
for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
|
538
538
|
if (a(e[o], o, e))
|
539
539
|
return !0;
|
@@ -552,32 +552,32 @@ lr.exports;
|
|
552
552
|
function ee(e, a) {
|
553
553
|
return e.has(a);
|
554
554
|
}
|
555
|
-
function
|
555
|
+
function ye(e, a) {
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
|
-
function
|
558
|
+
function Ye(e) {
|
559
559
|
var a = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(u,
|
561
|
-
o[++a] = [
|
560
|
+
return e.forEach(function(u, D) {
|
561
|
+
o[++a] = [D, u];
|
562
562
|
}), o;
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function We(e, a) {
|
565
565
|
return function(o) {
|
566
566
|
return e(a(o));
|
567
567
|
};
|
568
568
|
}
|
569
|
-
function
|
569
|
+
function bt(e) {
|
570
570
|
var a = -1, o = Array(e.size);
|
571
571
|
return e.forEach(function(u) {
|
572
572
|
o[++a] = u;
|
573
573
|
}), o;
|
574
574
|
}
|
575
|
-
var re = Array.prototype, vr = Function.prototype, Lt = Object.prototype, ne =
|
575
|
+
var re = Array.prototype, vr = Function.prototype, Lt = Object.prototype, ne = O["__core-js_shared__"], _e = vr.toString, ht = Lt.hasOwnProperty, Xe = function() {
|
576
576
|
var e = /[^.]+$/.exec(ne && ne.keys && ne.keys.IE_PROTO || "");
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
578
|
-
}(),
|
579
|
-
"^" +
|
580
|
-
),
|
578
|
+
}(), Be = Lt.toString, Sr = RegExp(
|
579
|
+
"^" + _e.call(ht).replace(te, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), Ie = K ? O.Buffer : void 0, ie = O.Symbol, Ke = O.Uint8Array, ae = Lt.propertyIsEnumerable, Ft = re.splice, yt = ie ? ie.toStringTag : void 0, se = Object.getOwnPropertySymbols, ge = Ie ? Ie.isBuffer : void 0, $t = We(Object.keys, Object), be = wt(O, "DataView"), Nt = wt(O, "Map"), ve = wt(O, "Promise"), Se = wt(O, "Set"), Ee = wt(O, "WeakMap"), Mt = wt(Object, "create"), Ve = nt(be), Tt = nt(Nt), Er = nt(ve), Tr = nt(Se), wr = nt(Ee), Je = ie ? ie.prototype : void 0, Te = Je ? Je.valueOf : void 0;
|
581
581
|
function J(e) {
|
582
582
|
var a = -1, o = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < o; ) {
|
@@ -585,8 +585,8 @@ lr.exports;
|
|
585
585
|
this.set(u[0], u[1]);
|
586
586
|
}
|
587
587
|
}
|
588
|
-
function
|
589
|
-
this.__data__ =
|
588
|
+
function kr() {
|
589
|
+
this.__data__ = Mt ? Mt(null) : {}, this.size = 0;
|
590
590
|
}
|
591
591
|
function Ar(e) {
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
@@ -594,21 +594,21 @@ lr.exports;
|
|
594
594
|
}
|
595
595
|
function Dr(e) {
|
596
596
|
var a = this.__data__;
|
597
|
-
if (
|
597
|
+
if (Mt) {
|
598
598
|
var o = a[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
601
|
-
return
|
601
|
+
return ht.call(a, e) ? a[e] : void 0;
|
602
602
|
}
|
603
603
|
function Mr(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return
|
605
|
+
return Mt ? a[e] !== void 0 : ht.call(a, e);
|
606
606
|
}
|
607
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] = Mt && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
|
-
J.prototype.clear =
|
611
|
+
J.prototype.clear = kr, J.prototype.delete = Ar, J.prototype.get = Dr, J.prototype.has = Mr, J.prototype.set = Or;
|
612
612
|
function q(e) {
|
613
613
|
var a = -1, o = e == null ? 0 : e.length;
|
614
614
|
for (this.clear(); ++a < o; ) {
|
@@ -616,10 +616,10 @@ lr.exports;
|
|
616
616
|
this.set(u[0], u[1]);
|
617
617
|
}
|
618
618
|
}
|
619
|
-
function
|
619
|
+
function xr() {
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
|
-
function
|
622
|
+
function Pr(e) {
|
623
623
|
var a = this.__data__, o = ue(a, e);
|
624
624
|
if (o < 0)
|
625
625
|
return !1;
|
@@ -637,7 +637,7 @@ lr.exports;
|
|
637
637
|
var o = this.__data__, u = ue(o, e);
|
638
638
|
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
639
639
|
}
|
640
|
-
q.prototype.clear =
|
640
|
+
q.prototype.clear = xr, q.prototype.delete = Pr, q.prototype.get = Cr, q.prototype.has = Rr, q.prototype.set = Lr;
|
641
641
|
function st(e) {
|
642
642
|
var a = -1, o = e == null ? 0 : e.length;
|
643
643
|
for (this.clear(); ++a < o; ) {
|
@@ -653,40 +653,40 @@ lr.exports;
|
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function $r(e) {
|
656
|
-
var a =
|
656
|
+
var a = _t(this, e).delete(e);
|
657
657
|
return this.size -= a ? 1 : 0, a;
|
658
658
|
}
|
659
659
|
function Nr(e) {
|
660
|
-
return
|
660
|
+
return _t(this, e).get(e);
|
661
661
|
}
|
662
662
|
function Hr(e) {
|
663
|
-
return
|
663
|
+
return _t(this, e).has(e);
|
664
664
|
}
|
665
|
-
function
|
666
|
-
var o =
|
665
|
+
function zr(e, a) {
|
666
|
+
var o = _t(this, e), u = o.size;
|
667
667
|
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
668
668
|
}
|
669
|
-
st.prototype.clear = Fr, st.prototype.delete = $r, st.prototype.get = Nr, st.prototype.has = Hr, st.prototype.set =
|
669
|
+
st.prototype.clear = Fr, st.prototype.delete = $r, st.prototype.get = Nr, st.prototype.has = Hr, st.prototype.set = zr;
|
670
670
|
function oe(e) {
|
671
671
|
var a = -1, o = e == null ? 0 : e.length;
|
672
672
|
for (this.__data__ = new st(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
|
-
function
|
675
|
+
function Ze(e) {
|
676
676
|
return this.__data__.set(e, i), this;
|
677
677
|
}
|
678
678
|
function ce(e) {
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
|
-
oe.prototype.add = oe.prototype.push =
|
682
|
-
function
|
681
|
+
oe.prototype.add = oe.prototype.push = Ze, oe.prototype.has = ce;
|
682
|
+
function vt(e) {
|
683
683
|
var a = this.__data__ = new q(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
686
686
|
function we() {
|
687
687
|
this.__data__ = new q(), this.size = 0;
|
688
688
|
}
|
689
|
-
function
|
689
|
+
function jr(e) {
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
691
691
|
return this.size = a.size, o;
|
692
692
|
}
|
@@ -706,148 +706,148 @@ lr.exports;
|
|
706
706
|
}
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
|
709
|
+
vt.prototype.clear = we, vt.prototype.delete = jr, vt.prototype.get = Ur, vt.prototype.has = Gr, vt.prototype.set = Yr;
|
710
710
|
function Wr(e, a) {
|
711
|
-
var o = le(e), u = !o &&
|
712
|
-
for (var
|
713
|
-
|
714
|
-
(
|
715
|
-
|
716
|
-
v && (
|
717
|
-
Qr(
|
711
|
+
var o = le(e), u = !o && rr(e), D = !o && !u && fe(e), v = !o && !u && !D && ar(e), $ = o || u || D || v, L = $ ? gr(e.length, String) : [], W = L.length;
|
712
|
+
for (var z in e)
|
713
|
+
ht.call(e, z) && !($ && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
|
+
(z == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
+
D && (z == "offset" || z == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
|
+
v && (z == "buffer" || z == "byteLength" || z == "byteOffset") || // Skip index properties.
|
717
|
+
Qr(z, W))) && L.push(z);
|
718
718
|
return L;
|
719
719
|
}
|
720
720
|
function ue(e, a) {
|
721
721
|
for (var o = e.length; o--; )
|
722
|
-
if (
|
722
|
+
if (er(e[o][0], a))
|
723
723
|
return o;
|
724
724
|
return -1;
|
725
725
|
}
|
726
|
-
function
|
726
|
+
function ke(e, a, o) {
|
727
727
|
var u = a(e);
|
728
728
|
return le(e) ? u : Rt(u, o(e));
|
729
729
|
}
|
730
730
|
function Ht(e) {
|
731
|
-
return e == null ? e === void 0 ?
|
731
|
+
return e == null ? e === void 0 ? C : I : yt && yt in Object(e) ? kt(e) : tr(e);
|
732
732
|
}
|
733
|
-
function
|
734
|
-
return
|
733
|
+
function qe(e) {
|
734
|
+
return Et(e) && Ht(e) == m;
|
735
735
|
}
|
736
|
-
function
|
737
|
-
return e === a ? !0 : e == null || a == null || !
|
736
|
+
function Qe(e, a, o, u, D) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !Et(e) && !Et(a) ? e !== e && a !== a : Xr(e, a, o, u, Qe, D);
|
738
738
|
}
|
739
|
-
function Xr(e, a, o, u,
|
740
|
-
var $ = le(e), L = le(a), W = $ ? T :
|
741
|
-
W = W ==
|
742
|
-
var Q = W == b, ot =
|
739
|
+
function Xr(e, a, o, u, D, v) {
|
740
|
+
var $ = le(e), L = le(a), W = $ ? T : St(e), z = L ? T : St(a);
|
741
|
+
W = W == m ? b : W, z = z == m ? b : z;
|
742
|
+
var Q = W == b, ot = z == b, X = W == z;
|
743
743
|
if (X && fe(e)) {
|
744
744
|
if (!fe(a))
|
745
745
|
return !1;
|
746
746
|
$ = !0, Q = !1;
|
747
747
|
}
|
748
748
|
if (X && !Q)
|
749
|
-
return v || (v = new
|
749
|
+
return v || (v = new vt()), $ || ar(e) ? Ae(e, a, o, u, D, v) : Jr(e, a, W, o, u, D, v);
|
750
750
|
if (!(o & s)) {
|
751
|
-
var tt = Q &&
|
751
|
+
var tt = Q && ht.call(e, "__wrapped__"), Z = ot && ht.call(a, "__wrapped__");
|
752
752
|
if (tt || Z) {
|
753
|
-
var
|
754
|
-
return v || (v = new
|
753
|
+
var Ot = tt ? e.value() : e, At = Z ? a.value() : a;
|
754
|
+
return v || (v = new vt()), D(Ot, At, o, u, v);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return X ? (v || (v = new
|
757
|
+
return X ? (v || (v = new vt()), Zr(e, a, o, u, D, v)) : !1;
|
758
758
|
}
|
759
759
|
function Br(e) {
|
760
|
-
if (!
|
760
|
+
if (!ir(e) || en(e))
|
761
761
|
return !1;
|
762
|
-
var a =
|
762
|
+
var a = nr(e) ? Sr : at;
|
763
763
|
return a.test(nt(e));
|
764
764
|
}
|
765
765
|
function Kr(e) {
|
766
|
-
return
|
766
|
+
return Et(e) && Me(e.length) && !!H[Ht(e)];
|
767
767
|
}
|
768
768
|
function Vr(e) {
|
769
769
|
if (!rn(e))
|
770
770
|
return $t(e);
|
771
771
|
var a = [];
|
772
772
|
for (var o in Object(e))
|
773
|
-
|
773
|
+
ht.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function
|
776
|
+
function Ae(e, a, o, u, D, v) {
|
777
777
|
var $ = o & s, L = e.length, W = a.length;
|
778
778
|
if (L != W && !($ && W > L))
|
779
779
|
return !1;
|
780
|
-
var
|
781
|
-
if (
|
782
|
-
return
|
780
|
+
var z = v.get(e);
|
781
|
+
if (z && v.get(a))
|
782
|
+
return z == a;
|
783
783
|
var Q = -1, ot = !0, X = o & c ? new oe() : void 0;
|
784
784
|
for (v.set(e, a), v.set(a, e); ++Q < L; ) {
|
785
785
|
var tt = e[Q], Z = a[Q];
|
786
786
|
if (u)
|
787
|
-
var
|
788
|
-
if (
|
789
|
-
if (
|
787
|
+
var Ot = $ ? u(Z, tt, Q, a, e, v) : u(tt, Z, Q, e, a, v);
|
788
|
+
if (Ot !== void 0) {
|
789
|
+
if (Ot)
|
790
790
|
continue;
|
791
791
|
ot = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
794
|
if (X) {
|
795
|
-
if (!
|
796
|
-
if (!ee(X,
|
797
|
-
return X.push(
|
795
|
+
if (!Ge(a, function(At, jt) {
|
796
|
+
if (!ee(X, jt) && (tt === At || D(tt, At, o, u, v)))
|
797
|
+
return X.push(jt);
|
798
798
|
})) {
|
799
799
|
ot = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(tt === Z ||
|
802
|
+
} else if (!(tt === Z || D(tt, Z, o, u, v))) {
|
803
803
|
ot = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
807
|
return v.delete(e), v.delete(a), ot;
|
808
808
|
}
|
809
|
-
function Jr(e, a, o, u,
|
809
|
+
function Jr(e, a, o, u, D, v, $) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
811
|
+
case M:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
|
-
case
|
816
|
-
return !(e.byteLength != a.byteLength || !v(new
|
815
|
+
case k:
|
816
|
+
return !(e.byteLength != a.byteLength || !v(new Ke(e), new Ke(a)));
|
817
817
|
case S:
|
818
818
|
case F:
|
819
819
|
case g:
|
820
|
-
return
|
820
|
+
return er(+e, +a);
|
821
821
|
case _:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
823
|
+
case E:
|
824
824
|
case w:
|
825
825
|
return e == a + "";
|
826
|
-
case
|
827
|
-
var L =
|
828
|
-
case
|
826
|
+
case p:
|
827
|
+
var L = Ye;
|
828
|
+
case A:
|
829
829
|
var W = u & s;
|
830
|
-
if (L || (L =
|
830
|
+
if (L || (L = bt), e.size != a.size && !W)
|
831
831
|
return !1;
|
832
|
-
var
|
833
|
-
if (
|
834
|
-
return
|
832
|
+
var z = $.get(e);
|
833
|
+
if (z)
|
834
|
+
return z == a;
|
835
835
|
u |= c, $.set(e, a);
|
836
|
-
var Q =
|
836
|
+
var Q = Ae(L(e), L(a), u, D, v, $);
|
837
837
|
return $.delete(e), Q;
|
838
838
|
case x:
|
839
|
-
if (
|
840
|
-
return
|
839
|
+
if (Te)
|
840
|
+
return Te.call(e) == Te.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function Zr(e, a, o, u,
|
845
|
-
var $ = o & s, L =
|
844
|
+
function Zr(e, a, o, u, D, v) {
|
845
|
+
var $ = o & s, L = zt(e), W = L.length, z = zt(a), Q = z.length;
|
846
846
|
if (W != Q && !$)
|
847
847
|
return !1;
|
848
848
|
for (var ot = W; ot--; ) {
|
849
849
|
var X = L[ot];
|
850
|
-
if (!($ ? X in a :
|
850
|
+
if (!($ ? X in a : ht.call(a, X)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
853
|
var tt = v.get(e);
|
@@ -855,62 +855,62 @@ lr.exports;
|
|
855
855
|
return tt == a;
|
856
856
|
var Z = !0;
|
857
857
|
v.set(e, a), v.set(a, e);
|
858
|
-
for (var
|
858
|
+
for (var Ot = $; ++ot < W; ) {
|
859
859
|
X = L[ot];
|
860
|
-
var
|
860
|
+
var At = e[X], jt = a[X];
|
861
861
|
if (u)
|
862
|
-
var
|
863
|
-
if (!(
|
862
|
+
var Pn = $ ? u(jt, At, X, a, e, v) : u(At, jt, X, e, a, v);
|
863
|
+
if (!(Pn === void 0 ? At === jt || D(At, jt, o, u, v) : Pn)) {
|
864
864
|
Z = !1;
|
865
865
|
break;
|
866
866
|
}
|
867
|
-
|
867
|
+
Ot || (Ot = X == "constructor");
|
868
868
|
}
|
869
|
-
if (Z && !
|
870
|
-
var
|
871
|
-
|
869
|
+
if (Z && !Ot) {
|
870
|
+
var sr = e.constructor, or = a.constructor;
|
871
|
+
sr != or && "constructor" in e && "constructor" in a && !(typeof sr == "function" && sr instanceof sr && typeof or == "function" && or instanceof or) && (Z = !1);
|
872
872
|
}
|
873
873
|
return v.delete(e), v.delete(a), Z;
|
874
874
|
}
|
875
|
-
function
|
876
|
-
return
|
875
|
+
function zt(e) {
|
876
|
+
return ke(e, Oe, qr);
|
877
877
|
}
|
878
|
-
function
|
878
|
+
function _t(e, a) {
|
879
879
|
var o = e.__data__;
|
880
880
|
return tn(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
|
-
function
|
883
|
-
var o =
|
882
|
+
function wt(e, a) {
|
883
|
+
var o = ye(e, a);
|
884
884
|
return Br(o) ? o : void 0;
|
885
885
|
}
|
886
886
|
function kt(e) {
|
887
|
-
var a =
|
887
|
+
var a = ht.call(e, yt), o = e[yt];
|
888
888
|
try {
|
889
|
-
e[
|
889
|
+
e[yt] = void 0;
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return u && (a ? e[
|
893
|
+
var D = Be.call(e);
|
894
|
+
return u && (a ? e[yt] = o : delete e[yt]), D;
|
895
895
|
}
|
896
896
|
var qr = se ? function(e) {
|
897
|
-
return e == null ? [] : (e = Object(e),
|
897
|
+
return e == null ? [] : (e = Object(e), gt(se(e), function(a) {
|
898
898
|
return ae.call(e, a);
|
899
899
|
}));
|
900
|
-
} : an,
|
901
|
-
(
|
900
|
+
} : an, St = Ht;
|
901
|
+
(be && St(new be(new ArrayBuffer(1))) != M || Nt && St(new Nt()) != p || ve && St(ve.resolve()) != y || Se && St(new Se()) != A || Ee && St(new Ee()) != P) && (St = function(e) {
|
902
902
|
var a = Ht(e), o = a == b ? e.constructor : void 0, u = o ? nt(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
|
-
case
|
906
|
-
return
|
907
|
-
case
|
908
|
-
return h;
|
909
|
-
case Er:
|
905
|
+
case Ve:
|
906
|
+
return M;
|
907
|
+
case Tt:
|
910
908
|
return p;
|
909
|
+
case Er:
|
910
|
+
return y;
|
911
911
|
case Tr:
|
912
|
-
return
|
913
|
-
case
|
912
|
+
return A;
|
913
|
+
case wr:
|
914
914
|
return P;
|
915
915
|
}
|
916
916
|
return a;
|
@@ -923,19 +923,19 @@ lr.exports;
|
|
923
923
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
924
924
|
}
|
925
925
|
function en(e) {
|
926
|
-
return !!
|
926
|
+
return !!Xe && Xe in e;
|
927
927
|
}
|
928
928
|
function rn(e) {
|
929
929
|
var a = e && e.constructor, o = typeof a == "function" && a.prototype || Lt;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
|
-
function
|
933
|
-
return
|
932
|
+
function tr(e) {
|
933
|
+
return Be.call(e);
|
934
934
|
}
|
935
935
|
function nt(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
|
-
return
|
938
|
+
return _e.call(e);
|
939
939
|
} catch {
|
940
940
|
}
|
941
941
|
try {
|
@@ -945,40 +945,40 @@ lr.exports;
|
|
945
945
|
}
|
946
946
|
return "";
|
947
947
|
}
|
948
|
-
function
|
948
|
+
function er(e, a) {
|
949
949
|
return e === a || e !== e && a !== a;
|
950
950
|
}
|
951
|
-
var
|
951
|
+
var rr = qe(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
|
-
}()) ?
|
954
|
-
return
|
953
|
+
}()) ? qe : function(e) {
|
954
|
+
return Et(e) && ht.call(e, "callee") && !ae.call(e, "callee");
|
955
955
|
}, le = Array.isArray;
|
956
|
-
function
|
957
|
-
return e != null &&
|
956
|
+
function De(e) {
|
957
|
+
return e != null && Me(e.length) && !nr(e);
|
958
958
|
}
|
959
|
-
var fe =
|
959
|
+
var fe = ge || sn;
|
960
960
|
function nn(e, a) {
|
961
|
-
return
|
961
|
+
return Qe(e, a);
|
962
962
|
}
|
963
|
-
function
|
964
|
-
if (!
|
963
|
+
function nr(e) {
|
964
|
+
if (!ir(e))
|
965
965
|
return !1;
|
966
966
|
var a = Ht(e);
|
967
|
-
return a == f || a == l || a ==
|
967
|
+
return a == f || a == l || a == R || a == h;
|
968
968
|
}
|
969
|
-
function
|
969
|
+
function Me(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= d;
|
971
971
|
}
|
972
|
-
function
|
972
|
+
function ir(e) {
|
973
973
|
var a = typeof e;
|
974
974
|
return e != null && (a == "object" || a == "function");
|
975
975
|
}
|
976
|
-
function
|
976
|
+
function Et(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var
|
980
|
-
function
|
981
|
-
return
|
979
|
+
var ar = Y ? br(Y) : Kr;
|
980
|
+
function Oe(e) {
|
981
|
+
return De(e) ? Wr(e) : Vr(e);
|
982
982
|
}
|
983
983
|
function an() {
|
984
984
|
return [];
|
@@ -989,35 +989,35 @@ lr.exports;
|
|
989
989
|
t.exports = nn;
|
990
990
|
})(lr, lr.exports);
|
991
991
|
var ia = lr.exports;
|
992
|
-
const it = /* @__PURE__ */
|
992
|
+
const it = /* @__PURE__ */ wn(ia);
|
993
993
|
var fr = { exports: {} };
|
994
994
|
fr.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", d = "[object Array]",
|
997
|
-
N[c] = N[d] = N[
|
998
|
-
var Qt = typeof
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", d = "[object Array]", m = "[object Boolean]", T = "[object Date]", R = "[object Error]", S = "[object Function]", F = "[object GeneratorFunction]", _ = "[object Map]", f = "[object Number]", l = "[object Object]", p = "[object Promise]", g = "[object RegExp]", I = "[object Set]", b = "[object String]", y = "[object Symbol]", h = "[object WeakMap]", E = "[object ArrayBuffer]", A = "[object DataView]", w = "[object Float32Array]", x = "[object Float64Array]", C = "[object Int8Array]", P = "[object Int16Array]", k = "[object Int32Array]", M = "[object Uint8Array]", j = "[object Uint8ClampedArray]", ut = "[object Uint16Array]", Pt = "[object Uint32Array]", Vt = /[\\^$.*+?()[\]{}|]/g, Jt = /\w*$/, Zt = /^\[object .+?Constructor\]$/, qt = /^(?:0|[1-9]\d*)$/, N = {};
|
997
|
+
N[c] = N[d] = N[E] = N[A] = N[m] = N[T] = N[w] = N[x] = N[C] = N[P] = N[k] = N[_] = N[f] = N[l] = N[g] = N[I] = N[b] = N[y] = N[M] = N[j] = N[ut] = N[Pt] = !0, N[R] = N[S] = N[h] = !1;
|
998
|
+
var Qt = typeof mt == "object" && mt && mt.Object === Object && mt, te = typeof self == "object" && self && self.Object === Object && self, at = Qt || te || Function("return this")(), Ct = r && !r.nodeType && r, H = Ct && !0 && t && !t.nodeType && t, U = H && H.exports === Ct;
|
999
999
|
function G(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
1002
|
-
function
|
1002
|
+
function O(e, a) {
|
1003
1003
|
return e.add(a), e;
|
1004
1004
|
}
|
1005
|
-
function
|
1005
|
+
function lt(e, a) {
|
1006
1006
|
for (var o = -1, u = e ? e.length : 0; ++o < u && a(e[o], o, e) !== !1; )
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function rt(e, a) {
|
1011
|
-
for (var o = -1, u = a.length,
|
1012
|
-
e[
|
1011
|
+
for (var o = -1, u = a.length, D = e.length; ++o < u; )
|
1012
|
+
e[D + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
1015
|
function K(e, a, o, u) {
|
1016
|
-
for (var
|
1017
|
-
o = a(o, e[
|
1016
|
+
for (var D = -1, v = e ? e.length : 0; ++D < v; )
|
1017
|
+
o = a(o, e[D], D, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
|
-
function
|
1020
|
+
function ft(e, a) {
|
1021
1021
|
for (var o = -1, u = Array(e); ++o < e; )
|
1022
1022
|
u[o] = a(o);
|
1023
1023
|
return u;
|
@@ -1034,10 +1034,10 @@ fr.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function gt(e) {
|
1038
1038
|
var a = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(u,
|
1040
|
-
o[++a] = [
|
1039
|
+
return e.forEach(function(u, D) {
|
1040
|
+
o[++a] = [D, u];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
1043
|
function Rt(e, a) {
|
@@ -1045,19 +1045,19 @@ fr.exports;
|
|
1045
1045
|
return e(a(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
|
-
function
|
1048
|
+
function Ge(e) {
|
1049
1049
|
var a = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(u) {
|
1051
1051
|
o[++a] = u;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var gr = Array.prototype, br = Function.prototype, ee = Object.prototype,
|
1055
|
-
var e = /[^.]+$/.exec(
|
1054
|
+
var gr = Array.prototype, br = Function.prototype, ee = Object.prototype, ye = at["__core-js_shared__"], Ye = function() {
|
1055
|
+
var e = /[^.]+$/.exec(ye && ye.keys && ye.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(),
|
1058
|
-
"^" +
|
1059
|
-
), Lt = U ? at.Buffer : void 0, ne = at.Symbol,
|
1060
|
-
function
|
1057
|
+
}(), We = br.toString, bt = ee.hasOwnProperty, re = ee.toString, vr = RegExp(
|
1058
|
+
"^" + We.call(bt).replace(Vt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), Lt = U ? at.Buffer : void 0, ne = at.Symbol, _e = at.Uint8Array, ht = Rt(Object.getPrototypeOf, Object), Xe = Object.create, Be = ee.propertyIsEnumerable, Sr = gr.splice, Ie = Object.getOwnPropertySymbols, ie = Lt ? Lt.isBuffer : void 0, Ke = Rt(Object.keys, Object), ae = _t(at, "DataView"), Ft = _t(at, "Map"), yt = _t(at, "Promise"), se = _t(at, "Set"), ge = _t(at, "WeakMap"), $t = _t(Object, "create"), be = nt(ae), Nt = nt(Ft), ve = nt(yt), Se = nt(se), Ee = nt(ge), Mt = ne ? ne.prototype : void 0, Ve = Mt ? Mt.valueOf : void 0;
|
1060
|
+
function Tt(e) {
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
1063
1063
|
var u = e[a];
|
@@ -1070,23 +1070,23 @@ fr.exports;
|
|
1070
1070
|
function Tr(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
|
-
function
|
1073
|
+
function wr(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
1075
|
if ($t) {
|
1076
1076
|
var o = a[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
|
-
return
|
1079
|
+
return bt.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
|
-
function
|
1081
|
+
function Je(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return $t ? a[e] !== void 0 :
|
1083
|
+
return $t ? a[e] !== void 0 : bt.call(a, e);
|
1084
1084
|
}
|
1085
|
-
function
|
1085
|
+
function Te(e, a) {
|
1086
1086
|
var o = this.__data__;
|
1087
1087
|
return o[e] = $t && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
|
1089
|
+
Tt.prototype.clear = Er, Tt.prototype.delete = Tr, Tt.prototype.get = wr, Tt.prototype.has = Je, Tt.prototype.set = Te;
|
1090
1090
|
function J(e) {
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
@@ -1094,7 +1094,7 @@ fr.exports;
|
|
1094
1094
|
this.set(u[0], u[1]);
|
1095
1095
|
}
|
1096
1096
|
}
|
1097
|
-
function
|
1097
|
+
function kr() {
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
1100
|
function Ar(e) {
|
@@ -1115,7 +1115,7 @@ fr.exports;
|
|
1115
1115
|
var o = this.__data__, u = ce(o, e);
|
1116
1116
|
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
1117
1117
|
}
|
1118
|
-
J.prototype.clear =
|
1118
|
+
J.prototype.clear = kr, J.prototype.delete = Ar, J.prototype.get = Dr, J.prototype.has = Mr, J.prototype.set = Or;
|
1119
1119
|
function q(e) {
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
@@ -1123,26 +1123,26 @@ fr.exports;
|
|
1123
1123
|
this.set(u[0], u[1]);
|
1124
1124
|
}
|
1125
1125
|
}
|
1126
|
-
function
|
1126
|
+
function xr() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1128
|
+
hash: new Tt(),
|
1129
1129
|
map: new (Ft || J)(),
|
1130
|
-
string: new
|
1130
|
+
string: new Tt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
|
-
function
|
1134
|
-
return
|
1133
|
+
function Pr(e) {
|
1134
|
+
return zt(this, e).delete(e);
|
1135
1135
|
}
|
1136
1136
|
function Cr(e) {
|
1137
|
-
return
|
1137
|
+
return zt(this, e).get(e);
|
1138
1138
|
}
|
1139
1139
|
function Rr(e) {
|
1140
|
-
return
|
1140
|
+
return zt(this, e).has(e);
|
1141
1141
|
}
|
1142
1142
|
function Lr(e, a) {
|
1143
|
-
return
|
1143
|
+
return zt(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
q.prototype.clear =
|
1145
|
+
q.prototype.clear = xr, q.prototype.delete = Pr, q.prototype.get = Cr, q.prototype.has = Rr, q.prototype.set = Lr;
|
1146
1146
|
function st(e) {
|
1147
1147
|
this.__data__ = new J(e);
|
1148
1148
|
}
|
@@ -1158,7 +1158,7 @@ fr.exports;
|
|
1158
1158
|
function Hr(e) {
|
1159
1159
|
return this.__data__.has(e);
|
1160
1160
|
}
|
1161
|
-
function
|
1161
|
+
function zr(e, a) {
|
1162
1162
|
var o = this.__data__;
|
1163
1163
|
if (o instanceof J) {
|
1164
1164
|
var u = o.__data__;
|
@@ -1168,49 +1168,49 @@ fr.exports;
|
|
1168
1168
|
}
|
1169
1169
|
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
|
-
st.prototype.clear = Fr, st.prototype.delete = $r, st.prototype.get = Nr, st.prototype.has = Hr, st.prototype.set =
|
1171
|
+
st.prototype.clear = Fr, st.prototype.delete = $r, st.prototype.get = Nr, st.prototype.has = Hr, st.prototype.set = zr;
|
1172
1172
|
function oe(e, a) {
|
1173
|
-
var o =
|
1173
|
+
var o = De(e) || le(e) ? ft(e.length, String) : [], u = o.length, D = !!u;
|
1174
1174
|
for (var v in e)
|
1175
|
-
|
1175
|
+
bt.call(e, v) && !(D && (v == "length" || tn(v, u))) && o.push(v);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
|
-
function
|
1178
|
+
function Ze(e, a, o) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(
|
1180
|
+
(!(bt.call(e, a) && rr(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
1181
1181
|
}
|
1182
1182
|
function ce(e, a) {
|
1183
1183
|
for (var o = e.length; o--; )
|
1184
|
-
if (
|
1184
|
+
if (rr(e[o][0], a))
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1189
|
-
return e &&
|
1188
|
+
function vt(e, a) {
|
1189
|
+
return e && Ae(a, Oe(a), e);
|
1190
1190
|
}
|
1191
|
-
function we(e, a, o, u,
|
1191
|
+
function we(e, a, o, u, D, v, $) {
|
1192
1192
|
var L;
|
1193
|
-
if (u && (L = v ? u(e,
|
1193
|
+
if (u && (L = v ? u(e, D, v, $) : u(e)), L !== void 0)
|
1194
1194
|
return L;
|
1195
|
-
if (!
|
1195
|
+
if (!Et(e))
|
1196
1196
|
return e;
|
1197
|
-
var W =
|
1197
|
+
var W = De(e);
|
1198
1198
|
if (W) {
|
1199
1199
|
if (L = qr(e), !a)
|
1200
1200
|
return Vr(e, L);
|
1201
1201
|
} else {
|
1202
|
-
var
|
1203
|
-
if (
|
1202
|
+
var z = kt(e), Q = z == S || z == F;
|
1203
|
+
if (nr(e))
|
1204
1204
|
return ue(e, a);
|
1205
|
-
if (
|
1205
|
+
if (z == l || z == c || Q && !v) {
|
1206
1206
|
if (Y(e))
|
1207
1207
|
return v ? e : {};
|
1208
|
-
if (L =
|
1209
|
-
return Jr(e,
|
1208
|
+
if (L = St(Q ? {} : e), !a)
|
1209
|
+
return Jr(e, vt(L, e));
|
1210
1210
|
} else {
|
1211
|
-
if (!N[
|
1211
|
+
if (!N[z])
|
1212
1212
|
return v ? e : {};
|
1213
|
-
L = Qr(e,
|
1213
|
+
L = Qr(e, z, we, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
1216
|
$ || ($ = new st());
|
@@ -1218,33 +1218,33 @@ fr.exports;
|
|
1218
1218
|
if (ot)
|
1219
1219
|
return ot;
|
1220
1220
|
if ($.set(e, L), !W)
|
1221
|
-
var X = o ? Zr(e) :
|
1222
|
-
return
|
1223
|
-
X && (Z = tt, tt = e[Z]),
|
1221
|
+
var X = o ? Zr(e) : Oe(e);
|
1222
|
+
return lt(X || e, function(tt, Z) {
|
1223
|
+
X && (Z = tt, tt = e[Z]), Ze(L, Z, we(tt, a, o, u, Z, e, $));
|
1224
1224
|
}), L;
|
1225
1225
|
}
|
1226
|
-
function
|
1227
|
-
return
|
1226
|
+
function jr(e) {
|
1227
|
+
return Et(e) ? Xe(e) : {};
|
1228
1228
|
}
|
1229
1229
|
function Ur(e, a, o) {
|
1230
1230
|
var u = a(e);
|
1231
|
-
return
|
1231
|
+
return De(e) ? u : rt(u, o(e));
|
1232
1232
|
}
|
1233
1233
|
function Gr(e) {
|
1234
1234
|
return re.call(e);
|
1235
1235
|
}
|
1236
1236
|
function Yr(e) {
|
1237
|
-
if (!
|
1237
|
+
if (!Et(e) || rn(e))
|
1238
1238
|
return !1;
|
1239
|
-
var a =
|
1239
|
+
var a = Me(e) || Y(e) ? vr : Zt;
|
1240
1240
|
return a.test(nt(e));
|
1241
1241
|
}
|
1242
1242
|
function Wr(e) {
|
1243
|
-
if (!
|
1244
|
-
return
|
1243
|
+
if (!tr(e))
|
1244
|
+
return Ke(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var o in Object(e))
|
1247
|
-
|
1247
|
+
bt.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
1250
|
function ue(e, a) {
|
@@ -1253,31 +1253,31 @@ fr.exports;
|
|
1253
1253
|
var o = new e.constructor(e.length);
|
1254
1254
|
return e.copy(o), o;
|
1255
1255
|
}
|
1256
|
-
function
|
1256
|
+
function ke(e) {
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
|
-
return new
|
1258
|
+
return new _e(a).set(new _e(e)), a;
|
1259
1259
|
}
|
1260
1260
|
function Ht(e, a) {
|
1261
|
-
var o = a ?
|
1261
|
+
var o = a ? ke(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
|
-
function
|
1265
|
-
var u = a ? o(
|
1264
|
+
function qe(e, a, o) {
|
1265
|
+
var u = a ? o(gt(e), !0) : gt(e);
|
1266
1266
|
return K(u, G, new e.constructor());
|
1267
1267
|
}
|
1268
|
-
function
|
1268
|
+
function Qe(e) {
|
1269
1269
|
var a = new e.constructor(e.source, Jt.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
1272
|
function Xr(e, a, o) {
|
1273
|
-
var u = a ? o(
|
1274
|
-
return K(u,
|
1273
|
+
var u = a ? o(Ge(e), !0) : Ge(e);
|
1274
|
+
return K(u, O, new e.constructor());
|
1275
1275
|
}
|
1276
1276
|
function Br(e) {
|
1277
|
-
return
|
1277
|
+
return Ve ? Object(Ve.call(e)) : {};
|
1278
1278
|
}
|
1279
1279
|
function Kr(e, a) {
|
1280
|
-
var o = a ?
|
1280
|
+
var o = a ? ke(e.buffer) : e.buffer;
|
1281
1281
|
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
1283
|
function Vr(e, a) {
|
@@ -1286,83 +1286,83 @@ fr.exports;
|
|
1286
1286
|
a[o] = e[o];
|
1287
1287
|
return a;
|
1288
1288
|
}
|
1289
|
-
function
|
1289
|
+
function Ae(e, a, o, u) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var $ = a[
|
1293
|
-
|
1291
|
+
for (var D = -1, v = a.length; ++D < v; ) {
|
1292
|
+
var $ = a[D], L = void 0;
|
1293
|
+
Ze(o, $, L === void 0 ? e[$] : L);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
1296
1296
|
}
|
1297
1297
|
function Jr(e, a) {
|
1298
|
-
return
|
1298
|
+
return Ae(e, wt(e), a);
|
1299
1299
|
}
|
1300
1300
|
function Zr(e) {
|
1301
|
-
return Ur(e,
|
1301
|
+
return Ur(e, Oe, wt);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function zt(e, a) {
|
1304
1304
|
var o = e.__data__;
|
1305
1305
|
return en(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
|
-
function
|
1307
|
+
function _t(e, a) {
|
1308
1308
|
var o = V(e, a);
|
1309
1309
|
return Yr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var
|
1312
|
-
(ae && kt(new ae(new ArrayBuffer(1))) !=
|
1311
|
+
var wt = Ie ? Rt(Ie, Object) : an, kt = Gr;
|
1312
|
+
(ae && kt(new ae(new ArrayBuffer(1))) != A || Ft && kt(new Ft()) != _ || yt && kt(yt.resolve()) != p || se && kt(new se()) != I || ge && kt(new ge()) != h) && (kt = function(e) {
|
1313
1313
|
var a = re.call(e), o = a == l ? e.constructor : void 0, u = o ? nt(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
|
-
case
|
1317
|
-
return
|
1316
|
+
case be:
|
1317
|
+
return A;
|
1318
1318
|
case Nt:
|
1319
1319
|
return _;
|
1320
|
+
case ve:
|
1321
|
+
return p;
|
1320
1322
|
case Se:
|
1321
|
-
return h;
|
1322
|
-
case Ee:
|
1323
1323
|
return I;
|
1324
|
-
case
|
1325
|
-
return
|
1324
|
+
case Ee:
|
1325
|
+
return h;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
1329
1329
|
function qr(e) {
|
1330
1330
|
var a = e.length, o = e.constructor(a);
|
1331
|
-
return a && typeof e[0] == "string" &&
|
1331
|
+
return a && typeof e[0] == "string" && bt.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
|
-
function
|
1334
|
-
return typeof e.constructor == "function" && !
|
1333
|
+
function St(e) {
|
1334
|
+
return typeof e.constructor == "function" && !tr(e) ? jr(ht(e)) : {};
|
1335
1335
|
}
|
1336
1336
|
function Qr(e, a, o, u) {
|
1337
|
-
var
|
1337
|
+
var D = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1340
|
-
return
|
1341
|
-
case
|
1339
|
+
case E:
|
1340
|
+
return ke(e);
|
1341
|
+
case m:
|
1342
1342
|
case T:
|
1343
|
-
return new
|
1344
|
-
case
|
1343
|
+
return new D(+e);
|
1344
|
+
case A:
|
1345
1345
|
return Ht(e, u);
|
1346
1346
|
case w:
|
1347
1347
|
case x:
|
1348
|
-
case
|
1348
|
+
case C:
|
1349
1349
|
case P:
|
1350
|
-
case
|
1351
|
-
case
|
1352
|
-
case
|
1350
|
+
case k:
|
1351
|
+
case M:
|
1352
|
+
case j:
|
1353
|
+
case ut:
|
1353
1354
|
case Pt:
|
1354
|
-
case xt:
|
1355
1355
|
return Kr(e, u);
|
1356
1356
|
case _:
|
1357
|
-
return
|
1357
|
+
return qe(e, u, o);
|
1358
1358
|
case f:
|
1359
1359
|
case b:
|
1360
|
-
return new
|
1360
|
+
return new D(e);
|
1361
1361
|
case g:
|
1362
|
-
return
|
1362
|
+
return Qe(e);
|
1363
1363
|
case I:
|
1364
1364
|
return Xr(e, u, o);
|
1365
|
-
case
|
1365
|
+
case y:
|
1366
1366
|
return Br(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
@@ -1374,16 +1374,16 @@ fr.exports;
|
|
1374
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 !!Ye && Ye in e;
|
1378
1378
|
}
|
1379
|
-
function
|
1379
|
+
function tr(e) {
|
1380
1380
|
var a = e && e.constructor, o = typeof a == "function" && a.prototype || ee;
|
1381
1381
|
return e === o;
|
1382
1382
|
}
|
1383
1383
|
function nt(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
|
-
return
|
1386
|
+
return We.call(e);
|
1387
1387
|
} catch {
|
1388
1388
|
}
|
1389
1389
|
try {
|
@@ -1393,38 +1393,38 @@ fr.exports;
|
|
1393
1393
|
}
|
1394
1394
|
return "";
|
1395
1395
|
}
|
1396
|
-
function
|
1396
|
+
function er(e) {
|
1397
1397
|
return we(e, !0, !0);
|
1398
1398
|
}
|
1399
|
-
function
|
1399
|
+
function rr(e, a) {
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
1402
|
function le(e) {
|
1403
|
-
return nn(e) &&
|
1403
|
+
return nn(e) && bt.call(e, "callee") && (!Be.call(e, "callee") || re.call(e) == c);
|
1404
1404
|
}
|
1405
|
-
var
|
1405
|
+
var De = Array.isArray;
|
1406
1406
|
function fe(e) {
|
1407
|
-
return e != null &&
|
1407
|
+
return e != null && ir(e.length) && !Me(e);
|
1408
1408
|
}
|
1409
1409
|
function nn(e) {
|
1410
|
-
return
|
1410
|
+
return ar(e) && fe(e);
|
1411
1411
|
}
|
1412
|
-
var
|
1413
|
-
function
|
1414
|
-
var a =
|
1412
|
+
var nr = ie || sn;
|
1413
|
+
function Me(e) {
|
1414
|
+
var a = Et(e) ? re.call(e) : "";
|
1415
1415
|
return a == S || a == F;
|
1416
1416
|
}
|
1417
|
-
function
|
1417
|
+
function ir(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
1419
1419
|
}
|
1420
|
-
function
|
1420
|
+
function Et(e) {
|
1421
1421
|
var a = typeof e;
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
1423
1423
|
}
|
1424
|
-
function
|
1424
|
+
function ar(e) {
|
1425
1425
|
return !!e && typeof e == "object";
|
1426
1426
|
}
|
1427
|
-
function
|
1427
|
+
function Oe(e) {
|
1428
1428
|
return fe(e) ? oe(e) : Wr(e);
|
1429
1429
|
}
|
1430
1430
|
function an() {
|
@@ -1433,10 +1433,10 @@ fr.exports;
|
|
1433
1433
|
function sn() {
|
1434
1434
|
return !1;
|
1435
1435
|
}
|
1436
|
-
t.exports =
|
1436
|
+
t.exports = er;
|
1437
1437
|
})(fr, fr.exports);
|
1438
1438
|
var aa = fr.exports;
|
1439
|
-
const et = /* @__PURE__ */
|
1439
|
+
const et = /* @__PURE__ */ wn(aa), ri = (t) => new Promise((r, n) => {
|
1440
1440
|
const i = new Image();
|
1441
1441
|
console.warn("update cdn config for cors?"), i.onload = () => {
|
1442
1442
|
const s = i.width, c = i.height;
|
@@ -1477,15 +1477,15 @@ const et = /* @__PURE__ */ kn(aa), ri = (t) => new Promise((r, n) => {
|
|
1477
1477
|
}).catch((s) => i(s));
|
1478
1478
|
});
|
1479
1479
|
}, oa = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1480
|
-
let
|
1480
|
+
let xe = (t = 21) => {
|
1481
1481
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1482
1482
|
for (; t--; )
|
1483
1483
|
r += oa[n[t] & 63];
|
1484
1484
|
return r;
|
1485
1485
|
};
|
1486
|
-
function
|
1486
|
+
function Pe(t = 16) {
|
1487
1487
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
1488
|
-
let i =
|
1488
|
+
let i = xe(t - 1);
|
1489
1489
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1490
1490
|
}
|
1491
1491
|
const yr = {
|
@@ -1493,7 +1493,7 @@ const yr = {
|
|
1493
1493
|
x: 0,
|
1494
1494
|
y: 0,
|
1495
1495
|
blur: 0
|
1496
|
-
},
|
1496
|
+
}, He = (t, r) => {
|
1497
1497
|
let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
1498
1498
|
const i = {
|
1499
1499
|
from: 0,
|
@@ -1581,7 +1581,7 @@ const si = async (t, r) => {
|
|
1581
1581
|
name: "video",
|
1582
1582
|
details: d,
|
1583
1583
|
playbackRate: t.playbackRate || 1,
|
1584
|
-
display:
|
1584
|
+
display: He(t.display, { duration: i.duration, trim: c }),
|
1585
1585
|
duration: i.duration
|
1586
1586
|
};
|
1587
1587
|
}, oi = async (t) => {
|
@@ -1590,7 +1590,7 @@ const si = async (t, r) => {
|
|
1590
1590
|
id: r,
|
1591
1591
|
name: "",
|
1592
1592
|
type: "audio",
|
1593
|
-
display:
|
1593
|
+
display: He(t.display, { duration: s, trim: c }),
|
1594
1594
|
trim: c,
|
1595
1595
|
playbackRate: t.playbackRate || 1,
|
1596
1596
|
details: {
|
@@ -1612,11 +1612,11 @@ const si = async (t, r) => {
|
|
1612
1612
|
), c = ((F = t.details) == null ? void 0 : F.rotate) || 0, d = {
|
1613
1613
|
top: ((_ = t.details) == null ? void 0 : _.top) || 0,
|
1614
1614
|
left: ((f = t.details) == null ? void 0 : f.left) || 0
|
1615
|
-
},
|
1616
|
-
let
|
1615
|
+
}, m = t.display, T = t.trim || t.display;
|
1616
|
+
let R = 1 / 0, S = 0;
|
1617
1617
|
return n.forEach((l) => {
|
1618
|
-
const
|
1619
|
-
|
1618
|
+
const p = t.trackItemsMap[l];
|
1619
|
+
p.display.from < R && (R = p.display.from), p.display.to > S && (S = p.display.to);
|
1620
1620
|
}), {
|
1621
1621
|
id: t.id,
|
1622
1622
|
details: {
|
@@ -1627,7 +1627,7 @@ const si = async (t, r) => {
|
|
1627
1627
|
rotate: c
|
1628
1628
|
},
|
1629
1629
|
trim: T,
|
1630
|
-
display:
|
1630
|
+
display: m || { from: R, to: S },
|
1631
1631
|
activeEdit: !1
|
1632
1632
|
};
|
1633
1633
|
}, ci = async (t, r) => {
|
@@ -1636,7 +1636,7 @@ const si = async (t, r) => {
|
|
1636
1636
|
id: t.id,
|
1637
1637
|
type: "image",
|
1638
1638
|
name: "image",
|
1639
|
-
display:
|
1639
|
+
display: He(t.display),
|
1640
1640
|
playbackRate: t.playbackRate || 1,
|
1641
1641
|
details: {
|
1642
1642
|
src: n.src || "",
|
@@ -1682,7 +1682,7 @@ const si = async (t, r) => {
|
|
1682
1682
|
url: n.details.fontUrl
|
1683
1683
|
}
|
1684
1684
|
]);
|
1685
|
-
const i = n.id, s = n.details, c = fi(s), d = ii(n.details.text, c),
|
1685
|
+
const i = n.id, s = n.details, c = fi(s), d = ii(n.details.text, c), m = _r(r, {
|
1686
1686
|
width: c.width,
|
1687
1687
|
height: d
|
1688
1688
|
});
|
@@ -1690,7 +1690,7 @@ const si = async (t, r) => {
|
|
1690
1690
|
id: i,
|
1691
1691
|
name: "caption",
|
1692
1692
|
type: "caption",
|
1693
|
-
display:
|
1693
|
+
display: He(n.display),
|
1694
1694
|
details: {
|
1695
1695
|
...c,
|
1696
1696
|
text: s.text || "",
|
@@ -1698,8 +1698,8 @@ const si = async (t, r) => {
|
|
1698
1698
|
height: d,
|
1699
1699
|
// Default height
|
1700
1700
|
fontUrl: s.fontUrl,
|
1701
|
-
top: c.top ||
|
1702
|
-
left: c.left ||
|
1701
|
+
top: c.top || m.top,
|
1702
|
+
left: c.left || m.left,
|
1703
1703
|
borderWidth: s.borderWidth || 0,
|
1704
1704
|
borderColor: s.borderColor || "#000000",
|
1705
1705
|
boxShadow: s.boxShadow || yr,
|
@@ -1722,7 +1722,7 @@ const si = async (t, r) => {
|
|
1722
1722
|
id: n,
|
1723
1723
|
name: "text",
|
1724
1724
|
type: "text",
|
1725
|
-
display:
|
1725
|
+
display: He(t.display),
|
1726
1726
|
details: {
|
1727
1727
|
...s,
|
1728
1728
|
text: i.text || "",
|
@@ -1804,7 +1804,7 @@ function la(t, r) {
|
|
1804
1804
|
);
|
1805
1805
|
}
|
1806
1806
|
const fa = (t = [], r = []) => t.length === 0 ? r.map((i) => ({
|
1807
|
-
id:
|
1807
|
+
id: Pe(),
|
1808
1808
|
items: [i.id],
|
1809
1809
|
type: i.type,
|
1810
1810
|
accepts: ["text", "image", "video", "audio", "caption", "template"]
|
@@ -1815,13 +1815,13 @@ const fa = (t = [], r = []) => t.length === 0 ? r.map((i) => ({
|
|
1815
1815
|
type: n.type || "text",
|
1816
1816
|
magnetic: n.magnetic || !1,
|
1817
1817
|
static: n.static || !1,
|
1818
|
-
id: n.id ||
|
1818
|
+
id: n.id || Pe()
|
1819
1819
|
}));
|
1820
1820
|
function da(t, r) {
|
1821
1821
|
return t.filter((i) => {
|
1822
1822
|
if (r.forEach((s) => {
|
1823
1823
|
i.items.includes(s) && (i.items = i.items.filter((c) => c !== s));
|
1824
|
-
}), i.items.length !== 0
|
1824
|
+
}), i.items.length !== 0)
|
1825
1825
|
return i;
|
1826
1826
|
});
|
1827
1827
|
}
|
@@ -1841,12 +1841,12 @@ const pa = (t, r, n, i, s) => {
|
|
1841
1841
|
trackId: void 0,
|
1842
1842
|
trackIndex: s !== void 0 ? In(s, 0, r.length) : void 0
|
1843
1843
|
};
|
1844
|
-
const d = c.items.map((T) => n[T]),
|
1844
|
+
const d = c.items.map((T) => n[T]), m = t.map((T) => n[T]);
|
1845
1845
|
for (const T of d) {
|
1846
|
-
const
|
1847
|
-
for (const F of
|
1846
|
+
const R = T.display.from, S = T.display.to;
|
1847
|
+
for (const F of m) {
|
1848
1848
|
const _ = F.display.from;
|
1849
|
-
if (!(F.display.to <=
|
1849
|
+
if (!(F.display.to <= R || _ >= S))
|
1850
1850
|
return {
|
1851
1851
|
trackId: void 0,
|
1852
1852
|
trackIndex: r.indexOf(c)
|
@@ -1862,35 +1862,35 @@ function ha(t) {
|
|
1862
1862
|
const r = de.pipe(
|
1863
1863
|
pe(({ key: f }) => f.startsWith(Ti))
|
1864
1864
|
), n = de.pipe(
|
1865
|
-
pe(({ key: f }) => f.startsWith(ki))
|
1866
|
-
), i = de.pipe(
|
1867
1865
|
pe(({ key: f }) => f.startsWith(wi))
|
1866
|
+
), i = de.pipe(
|
1867
|
+
pe(({ key: f }) => f.startsWith(ki))
|
1868
1868
|
), s = de.pipe(
|
1869
1869
|
pe(({ key: f }) => f.startsWith(Ai))
|
1870
1870
|
), c = de.pipe(
|
1871
1871
|
pe(({ key: f }) => f.startsWith(Di))
|
1872
1872
|
), d = de.pipe(
|
1873
1873
|
pe(({ key: f }) => f.startsWith(Mi))
|
1874
|
-
),
|
1875
|
-
var l,
|
1874
|
+
), m = r.subscribe(async (f) => {
|
1875
|
+
var l, p;
|
1876
1876
|
if (f.key === Oi) {
|
1877
1877
|
const g = (l = f.value) == null ? void 0 : l.payload, I = g.trackItemsMap, b = g.trackItemDetailsMap;
|
1878
1878
|
console.warn("IMPROVE FONTS LOADING");
|
1879
|
-
for (const
|
1880
|
-
if (b[
|
1881
|
-
const
|
1879
|
+
for (const h in b)
|
1880
|
+
if (b[h].type === "text" || b[h].type === "caption") {
|
1881
|
+
const E = b[h].details;
|
1882
1882
|
await dr([
|
1883
1883
|
{
|
1884
|
-
fontFamily:
|
1885
|
-
url:
|
1884
|
+
fontFamily: E.fontFamily,
|
1885
|
+
url: E.fontUrl
|
1886
1886
|
}
|
1887
1887
|
]);
|
1888
1888
|
}
|
1889
|
-
const
|
1889
|
+
const y = Yt(I);
|
1890
1890
|
t.updateState(
|
1891
1891
|
{
|
1892
1892
|
...g,
|
1893
|
-
duration:
|
1893
|
+
duration: y
|
1894
1894
|
},
|
1895
1895
|
{
|
1896
1896
|
kind: "design:load",
|
@@ -1898,8 +1898,8 @@ function ha(t) {
|
|
1898
1898
|
}
|
1899
1899
|
);
|
1900
1900
|
}
|
1901
|
-
if (f.key ===
|
1902
|
-
const g = (
|
1901
|
+
if (f.key === xi) {
|
1902
|
+
const g = (p = f.value) == null ? void 0 : p.payload;
|
1903
1903
|
t.updateState(
|
1904
1904
|
{
|
1905
1905
|
size: g
|
@@ -1911,73 +1911,80 @@ function ha(t) {
|
|
1911
1911
|
);
|
1912
1912
|
}
|
1913
1913
|
}), T = s.subscribe((f) => {
|
1914
|
-
if (f.key ===
|
1914
|
+
if (f.key === Pi) return t.undo();
|
1915
1915
|
if (f.key === Ci) return t.redo();
|
1916
|
-
}),
|
1917
|
-
var
|
1918
|
-
const l = [];
|
1919
|
-
if ((
|
1916
|
+
}), R = i.subscribe((f) => {
|
1917
|
+
var g, I, b, y;
|
1918
|
+
const l = [], p = [];
|
1919
|
+
if ((g = f.value) != null && g.payload.trackItemIds && (l.push((I = f.value) == null ? void 0 : I.payload.trackItemIds), t.updateState(
|
1920
1920
|
{ activeIds: l },
|
1921
1921
|
{
|
1922
1922
|
kind: "update",
|
1923
1923
|
updateHistory: !1
|
1924
1924
|
}
|
1925
1925
|
)), f.key === Ri) {
|
1926
|
-
const
|
1927
|
-
(
|
1928
|
-
),
|
1929
|
-
Object.entries(
|
1930
|
-
([
|
1926
|
+
const h = (b = f.value) == null ? void 0 : b.payload.trackItemIds, E = et(t.getState()), A = h && h.length ? h : E.activeIds, w = E.trackItemIds, x = E.trackItemDetailsMap, C = w.filter(
|
1927
|
+
(ut) => !A.includes(ut)
|
1928
|
+
), P = Object.fromEntries(
|
1929
|
+
Object.entries(x).filter(
|
1930
|
+
([ut]) => !A.includes(ut)
|
1931
1931
|
)
|
1932
|
-
),
|
1933
|
-
|
1934
|
-
|
1935
|
-
),
|
1936
|
-
Object.entries(
|
1937
|
-
([
|
1932
|
+
), k = da(
|
1933
|
+
E.tracks,
|
1934
|
+
A
|
1935
|
+
), M = Object.fromEntries(
|
1936
|
+
Object.entries(E.trackItemsMap).filter(
|
1937
|
+
([ut]) => !A.includes(ut)
|
1938
1938
|
)
|
1939
|
-
),
|
1939
|
+
), j = Yt(M);
|
1940
1940
|
t.updateState(
|
1941
1941
|
{
|
1942
|
-
trackItemIds:
|
1943
|
-
trackItemDetailsMap:
|
1942
|
+
trackItemIds: C,
|
1943
|
+
trackItemDetailsMap: P,
|
1944
1944
|
activeIds: [],
|
1945
|
-
trackItemsMap:
|
1946
|
-
tracks:
|
1947
|
-
duration:
|
1945
|
+
trackItemsMap: M,
|
1946
|
+
tracks: k,
|
1947
|
+
duration: j
|
1948
1948
|
},
|
1949
1949
|
{ updateHistory: !0, kind: "remove" }
|
1950
1950
|
);
|
1951
1951
|
}
|
1952
1952
|
if (f.key === Li) {
|
1953
|
-
const
|
1954
|
-
if (
|
1955
|
-
|
1956
|
-
const x =
|
1957
|
-
p.
|
1958
|
-
...
|
1959
|
-
id: P
|
1960
|
-
},
|
1961
|
-
...
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
);
|
1966
|
-
m[E.id] ? m[E.id].items.push(P) : m[E.id] = {
|
1967
|
-
...E,
|
1968
|
-
id: he(),
|
1969
|
-
items: [P],
|
1970
|
-
static: !1,
|
1971
|
-
magnetic: !1
|
1972
|
-
};
|
1953
|
+
const h = et(t.getState()), E = ((y = f.value) == null ? void 0 : y.payload.trackItemIds) || h.activeIds;
|
1954
|
+
if (E.length === 0) return;
|
1955
|
+
E.forEach((w) => {
|
1956
|
+
const x = h.trackItemsMap[w], C = h.trackItemDetailsMap[w], P = Pe();
|
1957
|
+
p.push(P), h.trackItemsMap = {
|
1958
|
+
...h.trackItemsMap,
|
1959
|
+
[P]: { ...et(x), id: P }
|
1960
|
+
}, h.trackItemDetailsMap = {
|
1961
|
+
...h.trackItemDetailsMap,
|
1962
|
+
[P]: {
|
1963
|
+
...et(C)
|
1964
|
+
}
|
1965
|
+
}, h.trackItemIds.push(P);
|
1973
1966
|
});
|
1974
|
-
const
|
1975
|
-
|
1967
|
+
const A = [];
|
1968
|
+
h.tracks.forEach((w) => {
|
1969
|
+
const x = {
|
1970
|
+
...w,
|
1971
|
+
items: [],
|
1972
|
+
id: xe()
|
1973
|
+
};
|
1974
|
+
w.items.forEach((C) => {
|
1975
|
+
if (E.includes(C)) {
|
1976
|
+
const P = E.indexOf(C);
|
1977
|
+
x.items.push(p[P]);
|
1978
|
+
}
|
1979
|
+
}), A.push(x);
|
1980
|
+
}), A.forEach((w) => {
|
1981
|
+
w.items.length !== 0 && h.tracks.unshift(w);
|
1982
|
+
}), t.updateState(
|
1976
1983
|
{
|
1977
|
-
trackItemDetailsMap:
|
1978
|
-
tracks:
|
1979
|
-
trackItemIds:
|
1980
|
-
trackItemsMap:
|
1984
|
+
trackItemDetailsMap: h.trackItemDetailsMap,
|
1985
|
+
tracks: h.tracks,
|
1986
|
+
trackItemIds: h.trackItemIds,
|
1987
|
+
trackItemsMap: h.trackItemsMap
|
1981
1988
|
},
|
1982
1989
|
{
|
1983
1990
|
updateHistory: !0,
|
@@ -1986,46 +1993,46 @@ function ha(t) {
|
|
1986
1993
|
);
|
1987
1994
|
}
|
1988
1995
|
}), S = n.subscribe(async (f) => {
|
1989
|
-
var
|
1990
|
-
const l = et(t.getState()),
|
1996
|
+
var E, A, w, x, C, P, k, M, j, ut, Pt, Vt, Jt, Zt, qt, N, Qt, te, at, Ct, H;
|
1997
|
+
const l = et(t.getState()), p = ((A = (E = f.value) == null ? void 0 : E.options) == null ? void 0 : A.isSelected) || !1;
|
1991
1998
|
let g = [], I = "text";
|
1992
1999
|
const b = (x = (w = f.value) == null ? void 0 : w.options) == null ? void 0 : x.trackId;
|
1993
|
-
let
|
2000
|
+
let y = (P = (C = f.value) == null ? void 0 : C.options) == null ? void 0 : P.trackIndex;
|
1994
2001
|
if (f.key === us) {
|
1995
|
-
const U = (
|
2002
|
+
const U = (k = f.value) == null ? void 0 : k.payload, G = U.trackItems.map(
|
1996
2003
|
(Y) => ua(Y, {
|
1997
2004
|
size: l.size
|
1998
2005
|
})
|
1999
|
-
),
|
2000
|
-
if (
|
2001
|
-
const { details:
|
2006
|
+
), O = await Promise.all(G), lt = fa(U.tracks, U.trackItems), rt = [], K = {}, ft = {};
|
2007
|
+
if (O.forEach((Y) => {
|
2008
|
+
const { details: gt, ...Rt } = Y;
|
2002
2009
|
rt.push(Y.id), K[Y.id] = {
|
2003
2010
|
type: Y.type,
|
2004
|
-
details:
|
2005
|
-
},
|
2011
|
+
details: gt
|
2012
|
+
}, ft[Y.id] = Rt;
|
2006
2013
|
}), la(
|
2007
2014
|
l.tracks,
|
2008
|
-
|
2015
|
+
lt
|
2009
2016
|
))
|
2010
2017
|
l.tracks.forEach((Y) => {
|
2011
|
-
|
2012
|
-
Y.id ===
|
2018
|
+
lt.forEach((gt) => {
|
2019
|
+
Y.id === gt.id && Y.items.push(...rt);
|
2013
2020
|
});
|
2014
2021
|
});
|
2015
2022
|
else {
|
2016
|
-
const Y = ((
|
2023
|
+
const Y = ((j = (M = f.value) == null ? void 0 : M.options) == null ? void 0 : j.trackIndex) || 0, gt = In(
|
2017
2024
|
Y,
|
2018
2025
|
0,
|
2019
2026
|
l.tracks.length
|
2020
2027
|
);
|
2021
|
-
l.tracks.splice(
|
2028
|
+
l.tracks.splice(gt, 0, ...lt);
|
2022
2029
|
}
|
2023
2030
|
l.trackItemDetailsMap = {
|
2024
2031
|
...l.trackItemDetailsMap,
|
2025
2032
|
...K
|
2026
2033
|
}, l.trackItemsMap = {
|
2027
2034
|
...l.trackItemsMap,
|
2028
|
-
...
|
2035
|
+
...ft
|
2029
2036
|
}, l.trackItemIds = [
|
2030
2037
|
...l.trackItemIds,
|
2031
2038
|
...rt
|
@@ -2046,48 +2053,48 @@ function ha(t) {
|
|
2046
2053
|
}
|
2047
2054
|
if (f.key === Fi) {
|
2048
2055
|
I = "caption";
|
2049
|
-
const U = (
|
2056
|
+
const U = (ut = f.value) == null ? void 0 : ut.payload, G = [];
|
2050
2057
|
for (const rt of U) {
|
2051
2058
|
const K = ui(rt, {
|
2052
2059
|
size: l.size
|
2053
2060
|
});
|
2054
2061
|
G.push(K);
|
2055
2062
|
}
|
2056
|
-
const
|
2057
|
-
for (const rt of
|
2063
|
+
const O = await Promise.all(G), lt = [];
|
2064
|
+
for (const rt of O) {
|
2058
2065
|
const K = rt.id;
|
2059
|
-
|
2060
|
-
const { details:
|
2066
|
+
lt.push(K);
|
2067
|
+
const { details: ft, ...V } = rt;
|
2061
2068
|
l.trackItemDetailsMap[K] = {
|
2062
2069
|
type: I,
|
2063
|
-
details:
|
2070
|
+
details: ft
|
2064
2071
|
}, l.trackItemsMap[K] = V, l.trackItemIds.push(K);
|
2065
2072
|
}
|
2066
|
-
g =
|
2073
|
+
g = lt;
|
2067
2074
|
}
|
2068
2075
|
if (f.key === $i) {
|
2069
2076
|
I = "text";
|
2070
|
-
const U = await li((
|
2077
|
+
const U = await li((Pt = f.value) == null ? void 0 : Pt.payload, {
|
2071
2078
|
size: l.size
|
2072
|
-
}), { details: G, ...
|
2073
|
-
l.trackItemDetailsMap[
|
2079
|
+
}), { details: G, ...O } = U;
|
2080
|
+
l.trackItemDetailsMap[O.id] = {
|
2074
2081
|
type: I,
|
2075
2082
|
details: G
|
2076
|
-
}, l.trackItemsMap[
|
2083
|
+
}, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
|
2077
2084
|
}
|
2078
2085
|
if (f.key === Ni) {
|
2079
2086
|
I = "template";
|
2080
|
-
const U = (Vt = f.value) == null ? void 0 : Vt.payload.trackItemsMap, G = (Jt = f.value) == null ? void 0 : Jt.payload.trackItemDetailsMap,
|
2087
|
+
const U = (Vt = f.value) == null ? void 0 : Vt.payload.trackItemsMap, G = (Jt = f.value) == null ? void 0 : Jt.payload.trackItemDetailsMap, O = (Zt = f.value) == null ? void 0 : Zt.payload.transitionsMap, lt = ((qt = f.value) == null ? void 0 : qt.payload.transitionIds) || [], rt = (N = f.value) == null ? void 0 : N.payload.trackItemIds, K = ((Qt = f.value) == null ? void 0 : Qt.payload.tracks) || [], { details: ft, ...V } = await ca((te = f.value) == null ? void 0 : te.payload, {
|
2081
2088
|
size: l.size
|
2082
2089
|
}), Y = {
|
2083
2090
|
id: V.id,
|
2084
2091
|
items: rt,
|
2085
|
-
transitions:
|
2092
|
+
transitions: lt,
|
2086
2093
|
tracks: K
|
2087
2094
|
};
|
2088
2095
|
l.trackItemDetailsMap[V.id] = {
|
2089
2096
|
type: I,
|
2090
|
-
details:
|
2097
|
+
details: ft
|
2091
2098
|
}, l.trackItemsMap[V.id] = V, l.trackItemIds.push(V.id), g = [V.id], l.trackItemsMap = {
|
2092
2099
|
...l.trackItemsMap,
|
2093
2100
|
...U,
|
@@ -2100,56 +2107,56 @@ function ha(t) {
|
|
2100
2107
|
...G,
|
2101
2108
|
[V.id]: {
|
2102
2109
|
type: "template",
|
2103
|
-
details:
|
2110
|
+
details: ft
|
2104
2111
|
}
|
2105
2112
|
}, l.transitionsMap = {
|
2106
2113
|
...l.transitionsMap,
|
2107
|
-
...
|
2114
|
+
...O
|
2108
2115
|
}, l.structure = [...l.structure, Y];
|
2109
2116
|
}
|
2110
2117
|
if (f.key === Hi) {
|
2111
2118
|
I = "image";
|
2112
2119
|
const U = await ci((at = f.value) == null ? void 0 : at.payload, {
|
2113
2120
|
size: l.size
|
2114
|
-
}), { details: G, ...
|
2115
|
-
l.trackItemDetailsMap[
|
2121
|
+
}), { details: G, ...O } = U;
|
2122
|
+
l.trackItemDetailsMap[O.id] = {
|
2116
2123
|
type: I,
|
2117
2124
|
details: G
|
2118
|
-
}, l.trackItemsMap[
|
2125
|
+
}, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
|
2119
2126
|
}
|
2120
|
-
if (f.key ===
|
2127
|
+
if (f.key === zi) {
|
2121
2128
|
I = "audio";
|
2122
|
-
const U = await oi((Ct = f.value) == null ? void 0 : Ct.payload), { details: G, ...
|
2123
|
-
l.trackItemDetailsMap[
|
2129
|
+
const U = await oi((Ct = f.value) == null ? void 0 : Ct.payload), { details: G, ...O } = U;
|
2130
|
+
l.trackItemDetailsMap[O.id] = {
|
2124
2131
|
type: I,
|
2125
2132
|
details: G
|
2126
|
-
}, l.trackItemsMap[
|
2133
|
+
}, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
|
2127
2134
|
}
|
2128
|
-
if (f.key ===
|
2135
|
+
if (f.key === ji) {
|
2129
2136
|
I = "video";
|
2130
2137
|
const U = await si((H = f.value) == null ? void 0 : H.payload, {
|
2131
2138
|
size: l.size
|
2132
|
-
}), { details: G, ...
|
2133
|
-
l.trackItemDetailsMap[
|
2139
|
+
}), { details: G, ...O } = U;
|
2140
|
+
l.trackItemDetailsMap[O.id] = {
|
2134
2141
|
type: I,
|
2135
2142
|
details: G
|
2136
|
-
}, l.trackItemsMap[
|
2143
|
+
}, l.trackItemsMap[O.id] = O, l.trackItemIds.push(O.id), g = [O.id];
|
2137
2144
|
}
|
2138
|
-
const
|
2145
|
+
const h = pa(
|
2139
2146
|
g,
|
2140
2147
|
l.tracks,
|
2141
2148
|
l.trackItemsMap,
|
2142
2149
|
b,
|
2143
|
-
|
2150
|
+
y
|
2144
2151
|
);
|
2145
|
-
if (
|
2152
|
+
if (h.trackId) {
|
2146
2153
|
const U = l.tracks.find(
|
2147
|
-
(G) => G.id ===
|
2154
|
+
(G) => G.id === h.trackId
|
2148
2155
|
);
|
2149
2156
|
U && U.items.push(...g);
|
2150
|
-
} else if (
|
2157
|
+
} else if (h.trackIndex !== void 0) {
|
2151
2158
|
const U = {
|
2152
|
-
id:
|
2159
|
+
id: xe(),
|
2153
2160
|
accepts: [
|
2154
2161
|
"text",
|
2155
2162
|
"audio",
|
@@ -2164,10 +2171,10 @@ function ha(t) {
|
|
2164
2171
|
magnetic: !1,
|
2165
2172
|
static: !1
|
2166
2173
|
};
|
2167
|
-
l.tracks.splice(
|
2174
|
+
l.tracks.splice(h.trackIndex, 0, U);
|
2168
2175
|
} else
|
2169
2176
|
l.tracks.unshift({
|
2170
|
-
id:
|
2177
|
+
id: xe(),
|
2171
2178
|
accepts: [
|
2172
2179
|
"text",
|
2173
2180
|
"audio",
|
@@ -2182,7 +2189,7 @@ function ha(t) {
|
|
2182
2189
|
magnetic: !1,
|
2183
2190
|
static: !1
|
2184
2191
|
});
|
2185
|
-
|
2192
|
+
p && (l.activeIds = g), l.duration = Yt(l.trackItemsMap), t.updateState(
|
2186
2193
|
{
|
2187
2194
|
activeIds: l.activeIds,
|
2188
2195
|
trackItemIds: l.trackItemIds,
|
@@ -2201,14 +2208,14 @@ function ha(t) {
|
|
2201
2208
|
}), F = c.subscribe(async (f) => {
|
2202
2209
|
var l;
|
2203
2210
|
if (f.key === Ui) {
|
2204
|
-
const
|
2205
|
-
if (
|
2206
|
-
const I =
|
2211
|
+
const p = et(t.getState()), g = (l = f.value) == null ? void 0 : l.options.time;
|
2212
|
+
if (p.activeIds.length === 1) {
|
2213
|
+
const I = p.activeIds[0], b = p.trackItemsMap[I];
|
2207
2214
|
if (g >= b.display.to || g <= b.display.from)
|
2208
2215
|
return;
|
2209
|
-
const
|
2216
|
+
const y = p.trackItemDetailsMap[I], h = Pe(), E = {
|
2210
2217
|
...b,
|
2211
|
-
id:
|
2218
|
+
id: h,
|
2212
2219
|
display: {
|
2213
2220
|
from: g,
|
2214
2221
|
to: b.display.to
|
@@ -2218,14 +2225,14 @@ function ha(t) {
|
|
2218
2225
|
to: b.display.to
|
2219
2226
|
}
|
2220
2227
|
};
|
2221
|
-
|
2222
|
-
|
2228
|
+
p.trackItemsMap[I].display.to = g, p.trackItemsMap[h] = E, p.trackItemIds.push(h), p.trackItemDetailsMap[h] = y, p.tracks.forEach((A) => {
|
2229
|
+
A.items.includes(I) && A.items.push(h);
|
2223
2230
|
}), t.updateState(
|
2224
2231
|
{
|
2225
|
-
trackItemDetailsMap:
|
2226
|
-
tracks:
|
2227
|
-
trackItemIds:
|
2228
|
-
trackItemsMap:
|
2232
|
+
trackItemDetailsMap: p.trackItemDetailsMap,
|
2233
|
+
tracks: p.tracks,
|
2234
|
+
trackItemIds: p.trackItemIds,
|
2235
|
+
trackItemsMap: p.trackItemsMap
|
2229
2236
|
},
|
2230
2237
|
{
|
2231
2238
|
updateHistory: !0,
|
@@ -2236,48 +2243,48 @@ function ha(t) {
|
|
2236
2243
|
return;
|
2237
2244
|
}
|
2238
2245
|
if (f.key === Gi) {
|
2239
|
-
const
|
2240
|
-
if (
|
2241
|
-
const g =
|
2246
|
+
const p = et(t.getState());
|
2247
|
+
if (p.activeIds.length) {
|
2248
|
+
const g = p.activeIds, I = [], b = {
|
2242
2249
|
activeIds: g,
|
2243
2250
|
trackItemDetailsMap: {},
|
2244
2251
|
trackItemsMap: {},
|
2245
2252
|
tracks: []
|
2246
2253
|
};
|
2247
|
-
g.forEach((
|
2248
|
-
b.trackItemDetailsMap[
|
2249
|
-
|
2254
|
+
g.forEach((h) => {
|
2255
|
+
b.trackItemDetailsMap[h] = p.trackItemDetailsMap[h], b.trackItemsMap[h] = p.trackItemsMap[h], I.push(
|
2256
|
+
p.tracks.find((E) => E.items.includes(h))
|
2250
2257
|
);
|
2251
2258
|
});
|
2252
|
-
const
|
2253
|
-
I.filter((
|
2259
|
+
const y = /* @__PURE__ */ new Set();
|
2260
|
+
I.filter((h) => y.has(h.id) ? !1 : (y.add(h), !0)), b.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(b));
|
2254
2261
|
}
|
2255
2262
|
}
|
2256
2263
|
if (f.key === Yi) {
|
2257
|
-
const
|
2258
|
-
if (!
|
2259
|
-
const g = et(t.getState()), I = JSON.parse(
|
2260
|
-
const
|
2261
|
-
(
|
2264
|
+
const p = localStorage.getItem("DesignComboTemp");
|
2265
|
+
if (!p) return;
|
2266
|
+
const g = et(t.getState()), I = JSON.parse(p), b = {}, y = I.trackItemsMap, h = I.trackItemDetailsMap, E = I.tracks, A = [], w = I.activeIds.map(async (x) => {
|
2267
|
+
const C = h[x];
|
2268
|
+
(C.type === "caption" || C.type === "text") && C.details.fontUrl && await dr([
|
2262
2269
|
{
|
2263
|
-
fontFamily:
|
2264
|
-
url:
|
2270
|
+
fontFamily: C.details.fontFamily,
|
2271
|
+
url: C.details.fontUrl
|
2265
2272
|
}
|
2266
2273
|
]);
|
2267
|
-
const P =
|
2274
|
+
const P = Pe();
|
2268
2275
|
return b[x] = P, g.trackItemsMap[P] = {
|
2269
|
-
...
|
2276
|
+
...y[x],
|
2270
2277
|
id: P
|
2271
|
-
}, g.trackItemDetailsMap[P] =
|
2278
|
+
}, g.trackItemDetailsMap[P] = C, g.trackItemIds.push(P), !0;
|
2272
2279
|
});
|
2273
|
-
await Promise.all(w),
|
2274
|
-
const
|
2280
|
+
await Promise.all(w), E.forEach((x) => {
|
2281
|
+
const C = x.items.map((k) => b[k]), P = {
|
2275
2282
|
...x,
|
2276
|
-
items:
|
2277
|
-
id:
|
2283
|
+
items: C,
|
2284
|
+
id: xe()
|
2278
2285
|
};
|
2279
|
-
|
2280
|
-
}), g.tracks = [...g.tracks, ...
|
2286
|
+
A.push(P);
|
2287
|
+
}), g.tracks = [...g.tracks, ...A], t.updateState(
|
2281
2288
|
{
|
2282
2289
|
trackItemDetailsMap: g.trackItemDetailsMap,
|
2283
2290
|
tracks: g.tracks,
|
@@ -2291,24 +2298,24 @@ function ha(t) {
|
|
2291
2298
|
);
|
2292
2299
|
}
|
2293
2300
|
}), _ = d.subscribe(async (f) => {
|
2294
|
-
var l,
|
2301
|
+
var l, p, g;
|
2295
2302
|
if (f.key === Wi) {
|
2296
|
-
const I = et(t.getState()), b = I.trackItemDetailsMap,
|
2297
|
-
if (!
|
2298
|
-
const
|
2299
|
-
|
2300
|
-
const x =
|
2303
|
+
const I = et(t.getState()), b = I.trackItemDetailsMap, y = I.trackItemsMap, h = Object.keys((l = f.value) == null ? void 0 : l.payload);
|
2304
|
+
if (!h.length) return;
|
2305
|
+
const E = (p = f.value) == null ? void 0 : p.payload;
|
2306
|
+
h.forEach((w) => {
|
2307
|
+
const x = E[w];
|
2301
2308
|
x.details ? b[w].details = {
|
2302
2309
|
...b[w].details,
|
2303
2310
|
...x.details
|
2304
|
-
} :
|
2311
|
+
} : E[w].playbackRate && (y[w].playbackRate = E[w].playbackRate);
|
2305
2312
|
});
|
2306
|
-
const
|
2313
|
+
const A = Yt(y);
|
2307
2314
|
t.updateState(
|
2308
2315
|
{
|
2309
2316
|
trackItemDetailsMap: { ...b },
|
2310
|
-
trackItemsMap: { ...
|
2311
|
-
duration:
|
2317
|
+
trackItemsMap: { ...y },
|
2318
|
+
duration: A
|
2312
2319
|
},
|
2313
2320
|
{
|
2314
2321
|
updateHistory: !0,
|
@@ -2317,34 +2324,34 @@ function ha(t) {
|
|
2317
2324
|
);
|
2318
2325
|
}
|
2319
2326
|
if (f.key === Xi) {
|
2320
|
-
const I = (g = f.value) == null ? void 0 : g.payload, b = Object.keys(I)[0],
|
2321
|
-
if (
|
2322
|
-
if (
|
2323
|
-
const x = await ri(
|
2324
|
-
let
|
2325
|
-
const
|
2326
|
-
|
2327
|
+
const I = (g = f.value) == null ? void 0 : g.payload, b = Object.keys(I)[0], y = Object.values(I)[0], h = et(t.getState()), E = h.trackItemDetailsMap[b];
|
2328
|
+
if (y.details) {
|
2329
|
+
if (y.type === "image" && y.details.src) {
|
2330
|
+
const x = await ri(y.details.src), C = E.details.width || 0, P = E.details.height || 0;
|
2331
|
+
let k = x.width, M = x.height;
|
2332
|
+
const j = x.width / x.height;
|
2333
|
+
C / P > j ? (k = C, M = C / j) : (M = P, k = P * j), y.details.mediaWidth = k, y.details.mediaHeight = M;
|
2327
2334
|
}
|
2328
|
-
if (
|
2329
|
-
const x = await ni(
|
2330
|
-
let
|
2331
|
-
const
|
2332
|
-
|
2335
|
+
if (y.type === "video" && y.details.src) {
|
2336
|
+
const x = await ni(y.details.src), C = E.details.width || 0, P = E.details.height || 0;
|
2337
|
+
let k = x.width, M = x.height;
|
2338
|
+
const j = x.width / x.height;
|
2339
|
+
C / P > j ? (k = C, M = C / j) : (M = P, k = P * j), y.details.mediaWidth = k, y.details.mediaHeight = M;
|
2333
2340
|
}
|
2334
|
-
const w =
|
2335
|
-
|
2341
|
+
const w = E.details;
|
2342
|
+
E.details = { ...w, ...y.details }, y.details = E.details;
|
2336
2343
|
}
|
2337
|
-
const
|
2338
|
-
|
2339
|
-
...
|
2340
|
-
type:
|
2344
|
+
const A = { ...E, ...y };
|
2345
|
+
h.trackItemDetailsMap[b] = A, h.trackItemsMap[b] = {
|
2346
|
+
...h.trackItemsMap[b],
|
2347
|
+
type: y.type
|
2341
2348
|
}, t.updateState(
|
2342
2349
|
{
|
2343
2350
|
trackItemDetailsMap: {
|
2344
|
-
...
|
2351
|
+
...h.trackItemDetailsMap
|
2345
2352
|
},
|
2346
2353
|
trackItemsMap: {
|
2347
|
-
...
|
2354
|
+
...h.trackItemsMap
|
2348
2355
|
}
|
2349
2356
|
},
|
2350
2357
|
{
|
@@ -2356,29 +2363,29 @@ function ha(t) {
|
|
2356
2363
|
});
|
2357
2364
|
return {
|
2358
2365
|
unsubscribe: () => {
|
2359
|
-
S.unsubscribe(), F.unsubscribe(), _.unsubscribe(), T.unsubscribe(),
|
2366
|
+
S.unsubscribe(), F.unsubscribe(), _.unsubscribe(), T.unsubscribe(), R.unsubscribe(), m.unsubscribe();
|
2360
2367
|
}
|
2361
2368
|
};
|
2362
2369
|
}
|
2363
2370
|
const ma = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2364
2371
|
function di(t, r, n = { cyclesFix: !0 }, i = []) {
|
2365
|
-
var
|
2372
|
+
var m, T;
|
2366
2373
|
let s = [];
|
2367
2374
|
const c = Array.isArray(t);
|
2368
|
-
for (const
|
2369
|
-
const S = t[
|
2370
|
-
if (!(
|
2375
|
+
for (const R in t) {
|
2376
|
+
const S = t[R], F = c ? +R : R;
|
2377
|
+
if (!(R in r)) {
|
2371
2378
|
s.push({
|
2372
2379
|
type: "REMOVE",
|
2373
2380
|
path: [F],
|
2374
|
-
oldValue: t[
|
2381
|
+
oldValue: t[R]
|
2375
2382
|
});
|
2376
2383
|
continue;
|
2377
2384
|
}
|
2378
|
-
const _ = r[
|
2379
|
-
if (S && _ && f && !ma[(T = (
|
2385
|
+
const _ = r[R], f = typeof S == "object" && typeof _ == "object" && Array.isArray(S) === Array.isArray(_);
|
2386
|
+
if (S && _ && f && !ma[(T = (m = Object.getPrototypeOf(S)) == null ? void 0 : m.constructor) == null ? void 0 : T.name] && (!n.cyclesFix || !i.includes(S))) {
|
2380
2387
|
const l = di(S, _, n, n.cyclesFix ? i.concat([S]) : []);
|
2381
|
-
s.push.apply(s, l.map((
|
2388
|
+
s.push.apply(s, l.map((p) => (p.path.unshift(F), p)));
|
2382
2389
|
} else S !== _ && // treat NaN values as equivalent
|
2383
2390
|
!(Number.isNaN(S) && Number.isNaN(_)) && !(f && (isNaN(S) ? S + "" == _ + "" : +S == +_)) && s.push({
|
2384
2391
|
path: [F],
|
@@ -2388,15 +2395,15 @@ function di(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2388
2395
|
});
|
2389
2396
|
}
|
2390
2397
|
const d = Array.isArray(r);
|
2391
|
-
for (const
|
2392
|
-
|
2398
|
+
for (const R in r)
|
2399
|
+
R in t || s.push({
|
2393
2400
|
type: "CREATE",
|
2394
|
-
path: [d ? +
|
2395
|
-
value: r[
|
2401
|
+
path: [d ? +R : R],
|
2402
|
+
value: r[R]
|
2396
2403
|
});
|
2397
2404
|
return s;
|
2398
2405
|
}
|
2399
|
-
var
|
2406
|
+
var kn = Symbol.for("immer-nothing"), Ce = Symbol.for("immer-draftable"), dt = Symbol.for("immer-state"), pi = process.env.NODE_ENV !== "production" ? [
|
2400
2407
|
// All error codes, starting by 0:
|
2401
2408
|
function(t) {
|
2402
2409
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2438,11 +2445,11 @@ function B(t, ...r) {
|
|
2438
2445
|
}
|
2439
2446
|
var Wt = Object.getPrototypeOf;
|
2440
2447
|
function Xt(t) {
|
2441
|
-
return !!t && !!t[
|
2448
|
+
return !!t && !!t[dt];
|
2442
2449
|
}
|
2443
|
-
function
|
2450
|
+
function xt(t) {
|
2444
2451
|
var r;
|
2445
|
-
return t ? hi(t) || Array.isArray(t) || !!t[
|
2452
|
+
return t ? hi(t) || Array.isArray(t) || !!t[Ce] || !!((r = t.constructor) != null && r[Ce]) || ze(t) || je(t) : !1;
|
2446
2453
|
}
|
2447
2454
|
var ya = Object.prototype.constructor.toString();
|
2448
2455
|
function hi(t) {
|
@@ -2454,16 +2461,16 @@ function hi(t) {
|
|
2454
2461
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2455
2462
|
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ya;
|
2456
2463
|
}
|
2457
|
-
function
|
2464
|
+
function Re(t, r) {
|
2458
2465
|
Bt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2459
2466
|
r(n, t[n], t);
|
2460
2467
|
}) : t.forEach((n, i) => r(i, n, t));
|
2461
2468
|
}
|
2462
2469
|
function Bt(t) {
|
2463
|
-
const r = t[
|
2464
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
2470
|
+
const r = t[dt];
|
2471
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : ze(t) ? 2 : je(t) ? 3 : 0;
|
2465
2472
|
}
|
2466
|
-
function
|
2473
|
+
function Le(t, r) {
|
2467
2474
|
return Bt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2468
2475
|
}
|
2469
2476
|
function un(t, r) {
|
@@ -2476,7 +2483,7 @@ function mi(t, r, n) {
|
|
2476
2483
|
function _a(t, r) {
|
2477
2484
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2478
2485
|
}
|
2479
|
-
function
|
2486
|
+
function ze(t) {
|
2480
2487
|
return t instanceof Map;
|
2481
2488
|
}
|
2482
2489
|
function je(t) {
|
@@ -2486,7 +2493,7 @@ function Gt(t) {
|
|
2486
2493
|
return t.copy_ || t.base_;
|
2487
2494
|
}
|
2488
2495
|
function gn(t, r) {
|
2489
|
-
if (
|
2496
|
+
if (ze(t))
|
2490
2497
|
return new Map(t);
|
2491
2498
|
if (je(t))
|
2492
2499
|
return new Set(t);
|
@@ -2495,15 +2502,15 @@ function gn(t, r) {
|
|
2495
2502
|
const n = hi(t);
|
2496
2503
|
if (r === !0 || r === "class_only" && !n) {
|
2497
2504
|
const i = Object.getOwnPropertyDescriptors(t);
|
2498
|
-
delete i[
|
2505
|
+
delete i[dt];
|
2499
2506
|
let s = Reflect.ownKeys(i);
|
2500
2507
|
for (let c = 0; c < s.length; c++) {
|
2501
|
-
const d = s[c],
|
2502
|
-
|
2508
|
+
const d = s[c], m = i[d];
|
2509
|
+
m.writable === !1 && (m.writable = !0, m.configurable = !0), (m.get || m.set) && (i[d] = {
|
2503
2510
|
configurable: !0,
|
2504
2511
|
writable: !0,
|
2505
2512
|
// could live with !!desc.set as well here...
|
2506
|
-
enumerable:
|
2513
|
+
enumerable: m.enumerable,
|
2507
2514
|
value: t[d]
|
2508
2515
|
});
|
2509
2516
|
}
|
@@ -2517,7 +2524,7 @@ function gn(t, r) {
|
|
2517
2524
|
}
|
2518
2525
|
}
|
2519
2526
|
function An(t, r = !1) {
|
2520
|
-
return Ir(t) || Xt(t) || !
|
2527
|
+
return Ir(t) || Xt(t) || !xt(t) || (Bt(t) > 1 && (t.set = t.add = t.clear = t.delete = Ia), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => An(i, !0))), t;
|
2521
2528
|
}
|
2522
2529
|
function Ia() {
|
2523
2530
|
B(2);
|
@@ -2533,9 +2540,9 @@ function Kt(t) {
|
|
2533
2540
|
function ga(t, r) {
|
2534
2541
|
bn[t] || (bn[t] = r);
|
2535
2542
|
}
|
2536
|
-
var
|
2543
|
+
var Fe;
|
2537
2544
|
function yi() {
|
2538
|
-
return
|
2545
|
+
return Fe;
|
2539
2546
|
}
|
2540
2547
|
function ba(t, r) {
|
2541
2548
|
return {
|
@@ -2555,31 +2562,31 @@ function vn(t) {
|
|
2555
2562
|
Sn(t), t.drafts_.forEach(va), t.drafts_ = null;
|
2556
2563
|
}
|
2557
2564
|
function Sn(t) {
|
2558
|
-
t ===
|
2565
|
+
t === Fe && (Fe = t.parent_);
|
2559
2566
|
}
|
2560
|
-
function
|
2561
|
-
return
|
2567
|
+
function zn(t) {
|
2568
|
+
return Fe = ba(Fe, t);
|
2562
2569
|
}
|
2563
2570
|
function va(t) {
|
2564
|
-
const r = t[
|
2571
|
+
const r = t[dt];
|
2565
2572
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2566
2573
|
}
|
2567
|
-
function
|
2574
|
+
function jn(t, r) {
|
2568
2575
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2569
2576
|
const n = r.drafts_[0];
|
2570
|
-
return t !== void 0 && t !== n ? (n[
|
2571
|
-
n[
|
2577
|
+
return t !== void 0 && t !== n ? (n[dt].modified_ && (vn(r), B(4)), xt(t) && (t = pr(r, t), r.parent_ || hr(r, t)), r.patches_ && Kt("Patches").generateReplacementPatches_(
|
2578
|
+
n[dt].base_,
|
2572
2579
|
t,
|
2573
2580
|
r.patches_,
|
2574
2581
|
r.inversePatches_
|
2575
|
-
)) : t = pr(r, n, []), vn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !==
|
2582
|
+
)) : t = pr(r, n, []), vn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== kn ? t : void 0;
|
2576
2583
|
}
|
2577
2584
|
function pr(t, r, n) {
|
2578
2585
|
if (Ir(r))
|
2579
2586
|
return r;
|
2580
|
-
const i = r[
|
2587
|
+
const i = r[dt];
|
2581
2588
|
if (!i)
|
2582
|
-
return
|
2589
|
+
return Re(
|
2583
2590
|
r,
|
2584
2591
|
(s, c) => Un(t, i, r, s, c, n)
|
2585
2592
|
), r;
|
@@ -2591,9 +2598,9 @@ function pr(t, r, n) {
|
|
2591
2598
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2592
2599
|
const s = i.copy_;
|
2593
2600
|
let c = s, d = !1;
|
2594
|
-
i.type_ === 3 && (c = new Set(s), s.clear(), d = !0),
|
2601
|
+
i.type_ === 3 && (c = new Set(s), s.clear(), d = !0), Re(
|
2595
2602
|
c,
|
2596
|
-
(
|
2603
|
+
(m, T) => Un(t, i, s, m, T, n, d)
|
2597
2604
|
), hr(t, s, !1), n && t.patches_ && Kt("Patches").generatePatches_(
|
2598
2605
|
i,
|
2599
2606
|
n,
|
@@ -2605,14 +2612,14 @@ function pr(t, r, n) {
|
|
2605
2612
|
}
|
2606
2613
|
function Un(t, r, n, i, s, c, d) {
|
2607
2614
|
if (process.env.NODE_ENV !== "production" && s === n && B(5), Xt(s)) {
|
2608
|
-
const
|
2609
|
-
!
|
2615
|
+
const m = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2616
|
+
!Le(r.assigned_, i) ? c.concat(i) : void 0, T = pr(t, s, m);
|
2610
2617
|
if (mi(n, i, T), Xt(T))
|
2611
2618
|
t.canAutoFreeze_ = !1;
|
2612
2619
|
else
|
2613
2620
|
return;
|
2614
2621
|
} else d && n.add(s);
|
2615
|
-
if (
|
2622
|
+
if (xt(s) && !Ir(s)) {
|
2616
2623
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2617
2624
|
return;
|
2618
2625
|
pr(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && hr(t, s);
|
@@ -2646,19 +2653,19 @@ function Sa(t, r) {
|
|
2646
2653
|
isManual_: !1
|
2647
2654
|
};
|
2648
2655
|
let s = i, c = Dn;
|
2649
|
-
n && (s = [i], c =
|
2650
|
-
const { revoke: d, proxy:
|
2651
|
-
return i.draft_ =
|
2656
|
+
n && (s = [i], c = $e);
|
2657
|
+
const { revoke: d, proxy: m } = Proxy.revocable(s, c);
|
2658
|
+
return i.draft_ = m, i.revoke_ = d, m;
|
2652
2659
|
}
|
2653
2660
|
var Dn = {
|
2654
2661
|
get(t, r) {
|
2655
|
-
if (r ===
|
2662
|
+
if (r === dt)
|
2656
2663
|
return t;
|
2657
2664
|
const n = Gt(t);
|
2658
|
-
if (!
|
2665
|
+
if (!Le(n, r))
|
2659
2666
|
return Ea(t, n, r);
|
2660
2667
|
const i = n[r];
|
2661
|
-
return t.finalized_ || !
|
2668
|
+
return t.finalized_ || !xt(i) ? i : i === ln(t.base_, r) ? (fn(t), t.copy_[r] = Tn(i, t)) : i;
|
2662
2669
|
},
|
2663
2670
|
has(t, r) {
|
2664
2671
|
return r in Gt(t);
|
@@ -2671,10 +2678,10 @@ var Dn = {
|
|
2671
2678
|
if (i != null && i.set)
|
2672
2679
|
return i.set.call(t.draft_, n), !0;
|
2673
2680
|
if (!t.modified_) {
|
2674
|
-
const s = ln(Gt(t), r), c = s == null ? void 0 : s[
|
2681
|
+
const s = ln(Gt(t), r), c = s == null ? void 0 : s[dt];
|
2675
2682
|
if (c && c.base_ === n)
|
2676
2683
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2677
|
-
if (_a(n, s) && (n !== void 0 ||
|
2684
|
+
if (_a(n, s) && (n !== void 0 || Le(t.base_, r)))
|
2678
2685
|
return !0;
|
2679
2686
|
fn(t), En(t);
|
2680
2687
|
}
|
@@ -2705,20 +2712,20 @@ var Dn = {
|
|
2705
2712
|
setPrototypeOf() {
|
2706
2713
|
B(12);
|
2707
2714
|
}
|
2708
|
-
},
|
2709
|
-
|
2710
|
-
|
2715
|
+
}, $e = {};
|
2716
|
+
Re(Dn, (t, r) => {
|
2717
|
+
$e[t] = function() {
|
2711
2718
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2712
2719
|
};
|
2713
2720
|
});
|
2714
|
-
|
2715
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && B(13),
|
2721
|
+
$e.deleteProperty = function(t, r) {
|
2722
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && B(13), $e.set.call(this, t, r, void 0);
|
2716
2723
|
};
|
2717
|
-
|
2724
|
+
$e.set = function(t, r, n) {
|
2718
2725
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && B(14), Dn.set.call(this, t[0], r, n, t[0]);
|
2719
2726
|
};
|
2720
2727
|
function ln(t, r) {
|
2721
|
-
const n = t[
|
2728
|
+
const n = t[dt];
|
2722
2729
|
return (n ? Gt(n) : t)[r];
|
2723
2730
|
}
|
2724
2731
|
function Ea(t, r, n) {
|
@@ -2757,23 +2764,23 @@ var Ta = class {
|
|
2757
2764
|
const c = n;
|
2758
2765
|
n = r;
|
2759
2766
|
const d = this;
|
2760
|
-
return function(T = c, ...
|
2761
|
-
return d.produce(T, (S) => n.call(this, S, ...
|
2767
|
+
return function(T = c, ...R) {
|
2768
|
+
return d.produce(T, (S) => n.call(this, S, ...R));
|
2762
2769
|
};
|
2763
2770
|
}
|
2764
2771
|
typeof n != "function" && B(6), i !== void 0 && typeof i != "function" && B(7);
|
2765
2772
|
let s;
|
2766
|
-
if (
|
2767
|
-
const c =
|
2768
|
-
let
|
2773
|
+
if (xt(r)) {
|
2774
|
+
const c = zn(this), d = Tn(r, void 0);
|
2775
|
+
let m = !0;
|
2769
2776
|
try {
|
2770
|
-
s = n(d),
|
2777
|
+
s = n(d), m = !1;
|
2771
2778
|
} finally {
|
2772
|
-
|
2779
|
+
m ? vn(c) : Sn(c);
|
2773
2780
|
}
|
2774
|
-
return Hn(c, i),
|
2781
|
+
return Hn(c, i), jn(s, c);
|
2775
2782
|
} else if (!r || typeof r != "object") {
|
2776
|
-
if (s = n(r), s === void 0 && (s = r), s ===
|
2783
|
+
if (s = n(r), s === void 0 && (s = r), s === kn && (s = void 0), this.autoFreeze_ && An(s, !0), i) {
|
2777
2784
|
const c = [], d = [];
|
2778
2785
|
Kt("Patches").generateReplacementPatches_(r, s, c, d), i(c, d);
|
2779
2786
|
}
|
@@ -2782,23 +2789,23 @@ var Ta = class {
|
|
2782
2789
|
B(1, r);
|
2783
2790
|
}, this.produceWithPatches = (r, n) => {
|
2784
2791
|
if (typeof r == "function")
|
2785
|
-
return (d, ...
|
2792
|
+
return (d, ...m) => this.produceWithPatches(d, (T) => r(T, ...m));
|
2786
2793
|
let i, s;
|
2787
|
-
return [this.produce(r, n, (d,
|
2788
|
-
i = d, s =
|
2794
|
+
return [this.produce(r, n, (d, m) => {
|
2795
|
+
i = d, s = m;
|
2789
2796
|
}), i, s];
|
2790
2797
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2791
2798
|
}
|
2792
2799
|
createDraft(t) {
|
2793
|
-
|
2794
|
-
const r =
|
2795
|
-
return n[
|
2800
|
+
xt(t) || B(8), Xt(t) && (t = wa(t));
|
2801
|
+
const r = zn(this), n = Tn(t, void 0);
|
2802
|
+
return n[dt].isManual_ = !0, Sn(r), n;
|
2796
2803
|
}
|
2797
2804
|
finishDraft(t, r) {
|
2798
|
-
const n = t && t[
|
2805
|
+
const n = t && t[dt];
|
2799
2806
|
(!n || !n.isManual_) && B(9);
|
2800
2807
|
const { scope_: i } = n;
|
2801
|
-
return Hn(i, r),
|
2808
|
+
return Hn(i, r), jn(void 0, i);
|
2802
2809
|
}
|
2803
2810
|
/**
|
2804
2811
|
* Pass true to automatically freeze all copies created by Immer.
|
@@ -2834,16 +2841,16 @@ var Ta = class {
|
|
2834
2841
|
}
|
2835
2842
|
};
|
2836
2843
|
function Tn(t, r) {
|
2837
|
-
const n =
|
2844
|
+
const n = ze(t) ? Kt("MapSet").proxyMap_(t, r) : je(t) ? Kt("MapSet").proxySet_(t, r) : Sa(t, r);
|
2838
2845
|
return (r ? r.scope_ : yi()).drafts_.push(n), n;
|
2839
2846
|
}
|
2840
|
-
function
|
2847
|
+
function wa(t) {
|
2841
2848
|
return Xt(t) || B(10, t), Ii(t);
|
2842
2849
|
}
|
2843
2850
|
function Ii(t) {
|
2844
|
-
if (!
|
2851
|
+
if (!xt(t) || Ir(t))
|
2845
2852
|
return t;
|
2846
|
-
const r = t[
|
2853
|
+
const r = t[dt];
|
2847
2854
|
let n;
|
2848
2855
|
if (r) {
|
2849
2856
|
if (!r.modified_)
|
@@ -2851,7 +2858,7 @@ function Ii(t) {
|
|
2851
2858
|
r.finalized_ = !0, n = gn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2852
2859
|
} else
|
2853
2860
|
n = gn(t, !0);
|
2854
|
-
return
|
2861
|
+
return Re(n, (i, s) => {
|
2855
2862
|
mi(n, i, Ii(s));
|
2856
2863
|
}), r && (r.finalized_ = !1), n;
|
2857
2864
|
}
|
@@ -2867,7 +2874,7 @@ function Gn() {
|
|
2867
2874
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2868
2875
|
);
|
2869
2876
|
const r = "replace", n = "add", i = "remove";
|
2870
|
-
function s(_, f, l,
|
2877
|
+
function s(_, f, l, p) {
|
2871
2878
|
switch (_.type_) {
|
2872
2879
|
case 0:
|
2873
2880
|
case 2:
|
@@ -2875,151 +2882,151 @@ function Gn() {
|
|
2875
2882
|
_,
|
2876
2883
|
f,
|
2877
2884
|
l,
|
2878
|
-
|
2885
|
+
p
|
2879
2886
|
);
|
2880
2887
|
case 1:
|
2881
|
-
return c(_, f, l,
|
2888
|
+
return c(_, f, l, p);
|
2882
2889
|
case 3:
|
2883
|
-
return
|
2890
|
+
return m(
|
2884
2891
|
_,
|
2885
2892
|
f,
|
2886
2893
|
l,
|
2887
|
-
|
2894
|
+
p
|
2888
2895
|
);
|
2889
2896
|
}
|
2890
2897
|
}
|
2891
|
-
function c(_, f, l,
|
2898
|
+
function c(_, f, l, p) {
|
2892
2899
|
let { base_: g, assigned_: I } = _, b = _.copy_;
|
2893
|
-
b.length < g.length && ([g, b] = [b, g], [l,
|
2894
|
-
for (let
|
2895
|
-
if (I[
|
2896
|
-
const
|
2900
|
+
b.length < g.length && ([g, b] = [b, g], [l, p] = [p, l]);
|
2901
|
+
for (let y = 0; y < g.length; y++)
|
2902
|
+
if (I[y] && b[y] !== g[y]) {
|
2903
|
+
const h = f.concat([y]);
|
2897
2904
|
l.push({
|
2898
2905
|
op: r,
|
2899
|
-
path:
|
2906
|
+
path: h,
|
2900
2907
|
// Need to maybe clone it, as it can in fact be the original value
|
2901
2908
|
// due to the base/copy inversion at the start of this function
|
2902
|
-
value: F(b[
|
2903
|
-
}),
|
2909
|
+
value: F(b[y])
|
2910
|
+
}), p.push({
|
2904
2911
|
op: r,
|
2905
|
-
path:
|
2906
|
-
value: F(g[
|
2912
|
+
path: h,
|
2913
|
+
value: F(g[y])
|
2907
2914
|
});
|
2908
2915
|
}
|
2909
|
-
for (let
|
2910
|
-
const
|
2916
|
+
for (let y = g.length; y < b.length; y++) {
|
2917
|
+
const h = f.concat([y]);
|
2911
2918
|
l.push({
|
2912
2919
|
op: n,
|
2913
|
-
path:
|
2920
|
+
path: h,
|
2914
2921
|
// Need to maybe clone it, as it can in fact be the original value
|
2915
2922
|
// due to the base/copy inversion at the start of this function
|
2916
|
-
value: F(b[
|
2923
|
+
value: F(b[y])
|
2917
2924
|
});
|
2918
2925
|
}
|
2919
|
-
for (let
|
2920
|
-
const
|
2921
|
-
|
2926
|
+
for (let y = b.length - 1; g.length <= y; --y) {
|
2927
|
+
const h = f.concat([y]);
|
2928
|
+
p.push({
|
2922
2929
|
op: i,
|
2923
|
-
path:
|
2930
|
+
path: h
|
2924
2931
|
});
|
2925
2932
|
}
|
2926
2933
|
}
|
2927
|
-
function d(_, f, l,
|
2934
|
+
function d(_, f, l, p) {
|
2928
2935
|
const { base_: g, copy_: I } = _;
|
2929
|
-
|
2930
|
-
const
|
2931
|
-
if (
|
2936
|
+
Re(_.assigned_, (b, y) => {
|
2937
|
+
const h = un(g, b), E = un(I, b), A = y ? Le(g, b) ? r : n : i;
|
2938
|
+
if (h === E && A === r)
|
2932
2939
|
return;
|
2933
2940
|
const w = f.concat(b);
|
2934
|
-
l.push(
|
2935
|
-
|
2941
|
+
l.push(A === i ? { op: A, path: w } : { op: A, path: w, value: E }), p.push(
|
2942
|
+
A === n ? { op: i, path: w } : A === i ? { op: n, path: w, value: F(h) } : { op: r, path: w, value: F(h) }
|
2936
2943
|
);
|
2937
2944
|
});
|
2938
2945
|
}
|
2939
|
-
function
|
2946
|
+
function m(_, f, l, p) {
|
2940
2947
|
let { base_: g, copy_: I } = _, b = 0;
|
2941
|
-
g.forEach((
|
2942
|
-
if (!I.has(
|
2943
|
-
const
|
2948
|
+
g.forEach((y) => {
|
2949
|
+
if (!I.has(y)) {
|
2950
|
+
const h = f.concat([b]);
|
2944
2951
|
l.push({
|
2945
2952
|
op: i,
|
2946
|
-
path:
|
2947
|
-
value:
|
2948
|
-
}),
|
2953
|
+
path: h,
|
2954
|
+
value: y
|
2955
|
+
}), p.unshift({
|
2949
2956
|
op: n,
|
2950
|
-
path:
|
2951
|
-
value:
|
2957
|
+
path: h,
|
2958
|
+
value: y
|
2952
2959
|
});
|
2953
2960
|
}
|
2954
2961
|
b++;
|
2955
|
-
}), b = 0, I.forEach((
|
2956
|
-
if (!g.has(
|
2957
|
-
const
|
2962
|
+
}), b = 0, I.forEach((y) => {
|
2963
|
+
if (!g.has(y)) {
|
2964
|
+
const h = f.concat([b]);
|
2958
2965
|
l.push({
|
2959
2966
|
op: n,
|
2960
|
-
path:
|
2961
|
-
value:
|
2962
|
-
}),
|
2967
|
+
path: h,
|
2968
|
+
value: y
|
2969
|
+
}), p.unshift({
|
2963
2970
|
op: i,
|
2964
|
-
path:
|
2965
|
-
value:
|
2971
|
+
path: h,
|
2972
|
+
value: y
|
2966
2973
|
});
|
2967
2974
|
}
|
2968
2975
|
b++;
|
2969
2976
|
});
|
2970
2977
|
}
|
2971
|
-
function T(_, f, l,
|
2978
|
+
function T(_, f, l, p) {
|
2972
2979
|
l.push({
|
2973
2980
|
op: r,
|
2974
2981
|
path: [],
|
2975
|
-
value: f ===
|
2976
|
-
}),
|
2982
|
+
value: f === kn ? void 0 : f
|
2983
|
+
}), p.push({
|
2977
2984
|
op: r,
|
2978
2985
|
path: [],
|
2979
2986
|
value: _
|
2980
2987
|
});
|
2981
2988
|
}
|
2982
|
-
function
|
2989
|
+
function R(_, f) {
|
2983
2990
|
return f.forEach((l) => {
|
2984
|
-
const { path:
|
2991
|
+
const { path: p, op: g } = l;
|
2985
2992
|
let I = _;
|
2986
|
-
for (let
|
2987
|
-
const
|
2988
|
-
let w =
|
2989
|
-
typeof w != "string" && typeof w != "number" && (w = "" + w), (
|
2993
|
+
for (let E = 0; E < p.length - 1; E++) {
|
2994
|
+
const A = Bt(I);
|
2995
|
+
let w = p[E];
|
2996
|
+
typeof w != "string" && typeof w != "number" && (w = "" + w), (A === 0 || A === 1) && (w === "__proto__" || w === "constructor") && B(19), typeof I == "function" && w === "prototype" && B(19), I = un(I, w), typeof I != "object" && B(18, p.join("/"));
|
2990
2997
|
}
|
2991
|
-
const b = Bt(I),
|
2998
|
+
const b = Bt(I), y = S(l.value), h = p[p.length - 1];
|
2992
2999
|
switch (g) {
|
2993
3000
|
case r:
|
2994
3001
|
switch (b) {
|
2995
3002
|
case 2:
|
2996
|
-
return I.set(
|
3003
|
+
return I.set(h, y);
|
2997
3004
|
case 3:
|
2998
3005
|
B(16);
|
2999
3006
|
default:
|
3000
|
-
return I[
|
3007
|
+
return I[h] = y;
|
3001
3008
|
}
|
3002
3009
|
case n:
|
3003
3010
|
switch (b) {
|
3004
3011
|
case 1:
|
3005
|
-
return
|
3012
|
+
return h === "-" ? I.push(y) : I.splice(h, 0, y);
|
3006
3013
|
case 2:
|
3007
|
-
return I.set(
|
3014
|
+
return I.set(h, y);
|
3008
3015
|
case 3:
|
3009
|
-
return I.add(
|
3016
|
+
return I.add(y);
|
3010
3017
|
default:
|
3011
|
-
return I[
|
3018
|
+
return I[h] = y;
|
3012
3019
|
}
|
3013
3020
|
case i:
|
3014
3021
|
switch (b) {
|
3015
3022
|
case 1:
|
3016
|
-
return I.splice(
|
3023
|
+
return I.splice(h, 1);
|
3017
3024
|
case 2:
|
3018
|
-
return I.delete(
|
3025
|
+
return I.delete(h);
|
3019
3026
|
case 3:
|
3020
3027
|
return I.delete(l.value);
|
3021
3028
|
default:
|
3022
|
-
return delete I[
|
3029
|
+
return delete I[h];
|
3023
3030
|
}
|
3024
3031
|
default:
|
3025
3032
|
B(17, g);
|
@@ -3027,40 +3034,40 @@ function Gn() {
|
|
3027
3034
|
}), _;
|
3028
3035
|
}
|
3029
3036
|
function S(_) {
|
3030
|
-
if (!
|
3037
|
+
if (!xt(_))
|
3031
3038
|
return _;
|
3032
3039
|
if (Array.isArray(_))
|
3033
3040
|
return _.map(S);
|
3034
|
-
if (
|
3041
|
+
if (ze(_))
|
3035
3042
|
return new Map(
|
3036
|
-
Array.from(_.entries()).map(([l,
|
3043
|
+
Array.from(_.entries()).map(([l, p]) => [l, S(p)])
|
3037
3044
|
);
|
3038
3045
|
if (je(_))
|
3039
3046
|
return new Set(Array.from(_).map(S));
|
3040
3047
|
const f = Object.create(Wt(_));
|
3041
3048
|
for (const l in _)
|
3042
3049
|
f[l] = S(_[l]);
|
3043
|
-
return
|
3050
|
+
return Le(_, Ce) && (f[Ce] = _[Ce]), f;
|
3044
3051
|
}
|
3045
3052
|
function F(_) {
|
3046
3053
|
return Xt(_) ? S(_) : _;
|
3047
3054
|
}
|
3048
3055
|
ga("Patches", {
|
3049
|
-
applyPatches_:
|
3056
|
+
applyPatches_: R,
|
3050
3057
|
generatePatches_: s,
|
3051
3058
|
generateReplacementPatches_: T
|
3052
3059
|
});
|
3053
3060
|
}
|
3054
|
-
var
|
3055
|
-
|
3056
|
-
|
3061
|
+
var pt = new Ta(), ka = pt.produce;
|
3062
|
+
pt.produceWithPatches.bind(
|
3063
|
+
pt
|
3057
3064
|
);
|
3058
|
-
|
3059
|
-
|
3060
|
-
var Aa =
|
3061
|
-
|
3062
|
-
|
3063
|
-
var Da = 1 / 0, Ma = 9007199254740991, Oa = "[object Arguments]",
|
3065
|
+
pt.setAutoFreeze.bind(pt);
|
3066
|
+
pt.setUseStrictShallowCopy.bind(pt);
|
3067
|
+
var Aa = pt.applyPatches.bind(pt);
|
3068
|
+
pt.createDraft.bind(pt);
|
3069
|
+
pt.finishDraft.bind(pt);
|
3070
|
+
var Da = 1 / 0, Ma = 9007199254740991, Oa = "[object Arguments]", xa = "[object Function]", Pa = "[object GeneratorFunction]", Ca = "[object Symbol]", Ra = typeof mt == "object" && mt && mt.Object === Object && mt, La = typeof self == "object" && self && self.Object === Object && self, Fa = Ra || La || Function("return this")();
|
3064
3071
|
function $a(t, r, n) {
|
3065
3072
|
switch (n.length) {
|
3066
3073
|
case 0:
|
@@ -3084,12 +3091,12 @@ function Ha(t, r) {
|
|
3084
3091
|
t[s + n] = r[n];
|
3085
3092
|
return t;
|
3086
3093
|
}
|
3087
|
-
var Mn = Object.prototype,
|
3094
|
+
var Mn = Object.prototype, za = Mn.hasOwnProperty, On = Mn.toString, Yn = Fa.Symbol, ja = Mn.propertyIsEnumerable, Wn = Yn ? Yn.isConcatSpreadable : void 0, Xn = Math.max;
|
3088
3095
|
function Ua(t, r, n, i, s) {
|
3089
3096
|
var c = -1, d = t.length;
|
3090
3097
|
for (n || (n = Xa), s || (s = []); ++c < d; ) {
|
3091
|
-
var
|
3092
|
-
n(
|
3098
|
+
var m = t[c];
|
3099
|
+
n(m) ? Ha(s, m) : s[s.length] = m;
|
3093
3100
|
}
|
3094
3101
|
return s;
|
3095
3102
|
}
|
@@ -3100,8 +3107,8 @@ function Ga(t, r) {
|
|
3100
3107
|
}
|
3101
3108
|
function Ya(t, r, n) {
|
3102
3109
|
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
3103
|
-
var d = r[i],
|
3104
|
-
n(
|
3110
|
+
var d = r[i], m = t[d];
|
3111
|
+
n(m, d) && (c[d] = m);
|
3105
3112
|
}
|
3106
3113
|
return c;
|
3107
3114
|
}
|
@@ -3125,7 +3132,7 @@ function Ba(t) {
|
|
3125
3132
|
return r == "0" && 1 / t == -Da ? "-0" : r;
|
3126
3133
|
}
|
3127
3134
|
function Ka(t) {
|
3128
|
-
return Za(t) &&
|
3135
|
+
return Za(t) && za.call(t, "callee") && (!ja.call(t, "callee") || On.call(t) == Oa);
|
3129
3136
|
}
|
3130
3137
|
var Va = Array.isArray;
|
3131
3138
|
function Ja(t) {
|
@@ -3136,7 +3143,7 @@ function Za(t) {
|
|
3136
3143
|
}
|
3137
3144
|
function qa(t) {
|
3138
3145
|
var r = ts(t) ? On.call(t) : "";
|
3139
|
-
return r ==
|
3146
|
+
return r == xa || r == Pa;
|
3140
3147
|
}
|
3141
3148
|
function Qa(t) {
|
3142
3149
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ma;
|
@@ -3154,7 +3161,7 @@ function es(t) {
|
|
3154
3161
|
var rs = Wa(function(t, r) {
|
3155
3162
|
return t == null ? {} : Ga(t, Na(Ua(r), Ba));
|
3156
3163
|
}), ns = rs;
|
3157
|
-
const Bn = /* @__PURE__ */
|
3164
|
+
const Bn = /* @__PURE__ */ wn(ns), is = {
|
3158
3165
|
width: 1080,
|
3159
3166
|
height: 1920
|
3160
3167
|
}, as = {
|
@@ -3307,33 +3314,33 @@ class hs {
|
|
3307
3314
|
trackItemDetailsMap: s,
|
3308
3315
|
trackItemIds: c,
|
3309
3316
|
tracks: d,
|
3310
|
-
transitionIds:
|
3317
|
+
transitionIds: m,
|
3311
3318
|
transitionsMap: T,
|
3312
|
-
trackItemsMap:
|
3319
|
+
trackItemsMap: R
|
3313
3320
|
} = this.getState(), S = et({
|
3314
3321
|
trackItemDetailsMap: s,
|
3315
3322
|
trackItemIds: c,
|
3316
3323
|
tracks: d,
|
3317
|
-
transitionIds:
|
3324
|
+
transitionIds: m,
|
3318
3325
|
transitionsMap: T,
|
3319
|
-
trackItemsMap:
|
3320
|
-
}), F = [], _ = [], f = [], l = [],
|
3321
|
-
n.forEach((
|
3322
|
-
let
|
3323
|
-
const
|
3324
|
-
|
3325
|
-
path:
|
3326
|
+
trackItemsMap: R
|
3327
|
+
}), F = [], _ = [], f = [], l = [], p = [], g = [];
|
3328
|
+
n.forEach((k) => {
|
3329
|
+
let M;
|
3330
|
+
const j = k.path.slice(1);
|
3331
|
+
k.type === "CREATE" ? M = {
|
3332
|
+
path: j,
|
3326
3333
|
op: "remove",
|
3327
|
-
value:
|
3328
|
-
} :
|
3329
|
-
path:
|
3334
|
+
value: k.value
|
3335
|
+
} : k.type === "CHANGE" ? M = {
|
3336
|
+
path: j,
|
3330
3337
|
op: "replace",
|
3331
|
-
value:
|
3332
|
-
} :
|
3333
|
-
path:
|
3338
|
+
value: k.oldValue
|
3339
|
+
} : M = {
|
3340
|
+
path: j,
|
3334
3341
|
op: "add",
|
3335
|
-
value:
|
3336
|
-
},
|
3342
|
+
value: k.oldValue
|
3343
|
+
}, k.path.includes("trackItemIds") ? f.push(M) : k.path.includes("transitionIds") ? _.push(M) : k.path.includes("trackItemsMap") ? p.push(M) : k.path.includes("transitionsMap") ? l.push(M) : k.path.includes("tracks") ? F.push(M) : k.path.includes("trackItemDetailsMap") && g.push(M);
|
3337
3344
|
});
|
3338
3345
|
const I = this.applyPatch(
|
3339
3346
|
S.tracks,
|
@@ -3341,32 +3348,32 @@ class hs {
|
|
3341
3348
|
), b = this.applyPatch(
|
3342
3349
|
S.transitionIds,
|
3343
3350
|
_
|
3344
|
-
),
|
3351
|
+
), y = this.applyPatch(
|
3345
3352
|
S.trackItemIds,
|
3346
3353
|
f
|
3347
|
-
),
|
3354
|
+
), h = this.applyPatch(
|
3348
3355
|
S.transitionsMap,
|
3349
3356
|
l
|
3350
|
-
),
|
3357
|
+
), E = this.applyPatch(
|
3351
3358
|
S.trackItemsMap,
|
3352
|
-
|
3353
|
-
),
|
3359
|
+
p
|
3360
|
+
), A = this.applyPatch(
|
3354
3361
|
S.trackItemDetailsMap,
|
3355
3362
|
g
|
3356
3363
|
), w = et({
|
3357
3364
|
tracks: I,
|
3358
3365
|
transitionIds: b,
|
3359
|
-
trackItemIds:
|
3360
|
-
transitionsMap:
|
3361
|
-
trackItemsMap:
|
3362
|
-
trackItemDetailsMap:
|
3363
|
-
}), x = et(this.getState()),
|
3366
|
+
trackItemIds: y,
|
3367
|
+
transitionsMap: h,
|
3368
|
+
trackItemsMap: E,
|
3369
|
+
trackItemDetailsMap: A
|
3370
|
+
}), x = et(this.getState()), C = { ...x, ...w };
|
3364
3371
|
this.prevState = x, this.redos.push({ redos: n, type: i });
|
3365
|
-
const P = Yt(
|
3366
|
-
this.stateSubject.next({ ...
|
3372
|
+
const P = Yt(C.trackItemsMap);
|
3373
|
+
this.stateSubject.next({ ...C, duration: P }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3367
3374
|
}
|
3368
3375
|
applyPatch(r, n) {
|
3369
|
-
return n.reverse().reduce((i, s) =>
|
3376
|
+
return n.reverse().reduce((i, s) => ka(i, (c) => {
|
3370
3377
|
Aa(c, [s]);
|
3371
3378
|
}), r);
|
3372
3379
|
}
|
@@ -3378,33 +3385,33 @@ class hs {
|
|
3378
3385
|
trackItemDetailsMap: s,
|
3379
3386
|
trackItemIds: c,
|
3380
3387
|
tracks: d,
|
3381
|
-
transitionIds:
|
3388
|
+
transitionIds: m,
|
3382
3389
|
transitionsMap: T,
|
3383
|
-
trackItemsMap:
|
3390
|
+
trackItemsMap: R
|
3384
3391
|
} = this.getState(), S = et({
|
3385
3392
|
trackItemDetailsMap: s,
|
3386
3393
|
trackItemIds: c,
|
3387
3394
|
tracks: d,
|
3388
|
-
transitionIds:
|
3395
|
+
transitionIds: m,
|
3389
3396
|
transitionsMap: T,
|
3390
|
-
trackItemsMap:
|
3391
|
-
}), F = [], _ = [], f = [], l = [],
|
3392
|
-
n.forEach((
|
3393
|
-
let
|
3394
|
-
const
|
3395
|
-
|
3396
|
-
path:
|
3397
|
+
trackItemsMap: R
|
3398
|
+
}), F = [], _ = [], f = [], l = [], p = [], g = [];
|
3399
|
+
n.forEach((k) => {
|
3400
|
+
let M;
|
3401
|
+
const j = k.path.slice(1);
|
3402
|
+
k.type === "CREATE" ? M = {
|
3403
|
+
path: j,
|
3397
3404
|
op: "add",
|
3398
|
-
value:
|
3399
|
-
} :
|
3400
|
-
path:
|
3405
|
+
value: k.value
|
3406
|
+
} : k.type === "CHANGE" ? M = {
|
3407
|
+
path: j,
|
3401
3408
|
op: "replace",
|
3402
|
-
value:
|
3403
|
-
} :
|
3404
|
-
path:
|
3409
|
+
value: k.value
|
3410
|
+
} : M = {
|
3411
|
+
path: j,
|
3405
3412
|
op: "remove",
|
3406
|
-
value:
|
3407
|
-
},
|
3413
|
+
value: k.oldValue
|
3414
|
+
}, k.path.includes("trackItemIds") ? f.push(M) : k.path.includes("transitionIds") ? _.push(M) : k.path.includes("trackItemsMap") ? p.push(M) : k.path.includes("transitionsMap") ? l.push(M) : k.path.includes("trackItemDetailsMap") ? g.push(M) : F.push(M);
|
3408
3415
|
});
|
3409
3416
|
const I = this.applyPatch(
|
3410
3417
|
S.tracks,
|
@@ -3412,47 +3419,47 @@ class hs {
|
|
3412
3419
|
), b = this.applyPatch(
|
3413
3420
|
S.transitionIds,
|
3414
3421
|
_
|
3415
|
-
),
|
3422
|
+
), y = this.applyPatch(
|
3416
3423
|
S.trackItemIds,
|
3417
3424
|
f
|
3418
|
-
),
|
3425
|
+
), h = this.applyPatch(
|
3419
3426
|
S.transitionsMap,
|
3420
3427
|
l
|
3421
|
-
),
|
3428
|
+
), E = this.applyPatch(
|
3422
3429
|
S.trackItemsMap,
|
3423
|
-
|
3424
|
-
),
|
3430
|
+
p
|
3431
|
+
), A = this.applyPatch(
|
3425
3432
|
S.trackItemDetailsMap,
|
3426
3433
|
g
|
3427
3434
|
), w = et({
|
3428
3435
|
tracks: I,
|
3429
3436
|
transitionIds: b,
|
3430
|
-
trackItemIds:
|
3431
|
-
transitionsMap:
|
3432
|
-
trackItemsMap:
|
3433
|
-
trackItemDetailsMap:
|
3434
|
-
}), x = et(this.getState()),
|
3437
|
+
trackItemIds: y,
|
3438
|
+
transitionsMap: h,
|
3439
|
+
trackItemsMap: E,
|
3440
|
+
trackItemDetailsMap: A
|
3441
|
+
}), x = et(this.getState()), C = { ...x, ...w };
|
3435
3442
|
this.prevState = x, this.undos.push({ undos: n, type: i });
|
3436
|
-
const P = Yt(
|
3437
|
-
this.stateSubject.next({ ...
|
3443
|
+
const P = Yt(C.trackItemsMap);
|
3444
|
+
this.stateSubject.next({ ...C, duration: P }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3438
3445
|
}
|
3439
3446
|
}
|
3440
|
-
const ms = "add", ss = "track", os = "trackItems", ys = `${ss}:changed`, _s = `${os}:changed`, cs = "state", Is = `${cs}:changed`, bi = "design", gs = `${bi}:load`, bs = `${bi}:resize`,
|
3447
|
+
const ms = "add", ss = "track", os = "trackItems", ys = `${ss}:changed`, _s = `${os}:changed`, cs = "state", Is = `${cs}:changed`, bi = "design", gs = `${bi}:load`, bs = `${bi}:resize`, It = "add", vs = `${It}:text`, Ss = `${It}:video`, Es = `${It}:audio`, Ts = `${It}:placeholder`, ws = `${It}:image`, ks = `${It}:mask`, us = `${It}:items`, As = `${It}:transition`, Ds = `${It}:animation`, Ms = `${It}:caption`, Os = `${It}:template`, he = "edit", xs = `${he}:object`, Ps = `${he}:text`, Cs = `${he}:shape`, Rs = `${he}:templateItem`, Ls = `${he}:closeTemplate`, Fs = `${he}:deleteTemplateItem`, $s = "enterEditMode", me = "player", Ns = `${me}:play`, Hs = `${me}:pause`, zs = `${me}:seek`, js = `${me}:seekTo`, Us = `${me}:seekBy`, Gs = `${me}:togglePlay`, Ue = "active", Ys = `${Ue}:set`, Ws = `${Ue}:delete`, Xs = `${Ue}:paste`, Bs = `${Ue}:clone`, Ks = `${Ue}:split`, ct = "layer", Vs = `${ct}:locked`, Js = `${ct}:hidden`, Zs = `${ct}:move`, qs = `${ct}:select`, Qs = `${ct}:selection`, to = `${ct}:sendTo`, eo = `${ct}:rename`, ro = `${ct}:editingName`, no = `${ct}:copy`, io = `${ct}:paste`, ao = `${ct}:clone`, so = `${ct}:split`, oo = `${ct}:cut`, co = `${ct}:delete`, xn = "history", uo = `${xn}:undo`, lo = `${xn}:redo`, fo = `${xn}:reset`, ls = "scale", po = `${ls}:changed`, vi = "drag", ho = `${vi}:start`, mo = `${vi}:end`, fs = "timeline", yo = `${fs}:boundingChanged`;
|
3441
3448
|
export {
|
3442
3449
|
Bs as ACTIVE_CLONE,
|
3443
3450
|
Ws as ACTIVE_DELETE,
|
3444
3451
|
Xs as ACTIVE_PASTE,
|
3445
|
-
|
3452
|
+
Ue as ACTIVE_PREFIX,
|
3446
3453
|
Ys as ACTIVE_SET,
|
3447
3454
|
Ks as ACTIVE_SPLIT,
|
3448
3455
|
Ds as ADD_ANIMATION,
|
3449
3456
|
Es as ADD_AUDIO,
|
3450
3457
|
Ms as ADD_CAPTION,
|
3451
|
-
|
3458
|
+
ws as ADD_IMAGE,
|
3452
3459
|
us as ADD_ITEMS,
|
3453
|
-
|
3460
|
+
ks as ADD_MASK,
|
3454
3461
|
Ts as ADD_PLACEHOLDER,
|
3455
|
-
|
3462
|
+
It as ADD_PREFIX,
|
3456
3463
|
ms as ADD_SUFFIX,
|
3457
3464
|
Os as ADD_TEMPLATE,
|
3458
3465
|
vs as ADD_TEXT,
|
@@ -3466,13 +3473,13 @@ export {
|
|
3466
3473
|
mo as DRAG_END,
|
3467
3474
|
vi as DRAG_PREFIX,
|
3468
3475
|
ho as DRAG_START,
|
3469
|
-
|
3470
|
-
|
3476
|
+
xs as EDIT_OBJECT,
|
3477
|
+
he as EDIT_PREFIX,
|
3471
3478
|
Cs as EDIT_SHAPE,
|
3472
3479
|
Rs as EDIT_TEMPLATE_ITEM,
|
3473
|
-
|
3480
|
+
Ps as EDIT_TEXT,
|
3474
3481
|
$s as ENTER_EDIT_MODE,
|
3475
|
-
|
3482
|
+
xn as HISTORY_PREFIX,
|
3476
3483
|
lo as HISTORY_REDO,
|
3477
3484
|
fo as HISTORY_RESET,
|
3478
3485
|
uo as HISTORY_UNDO,
|
@@ -3493,10 +3500,10 @@ export {
|
|
3493
3500
|
so as LAYER_SPLIT,
|
3494
3501
|
Hs as PLAYER_PAUSE,
|
3495
3502
|
Ns as PLAYER_PLAY,
|
3496
|
-
|
3497
|
-
|
3503
|
+
me as PLAYER_PREFIX,
|
3504
|
+
zs as PLAYER_SEEK,
|
3498
3505
|
Us as PLAYER_SEEK_BY,
|
3499
|
-
|
3506
|
+
js as PLAYER_SEEK_TO,
|
3500
3507
|
Gs as PLAYER_TOGGLE_PLAY,
|
3501
3508
|
Is as STATE_CHANGED,
|
3502
3509
|
cs as STATE_PREFIX,
|