@designcombo/state 0.1.19 → 0.1.20
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/constants/design.d.ts +3 -0
- package/dist/index.es.js +781 -775
- package/dist/index.umd.js +2 -2
- package/dist/state.d.ts +3 -0
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var fi = Object.defineProperty;
|
|
2
2
|
var pi = (t, r, n) => r in t ? fi(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
|
3
|
-
var
|
|
4
|
-
import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i,
|
|
3
|
+
var Ot = (t, r, n) => pi(t, typeof r != "symbol" ? r + "" : r, n);
|
|
4
|
+
import { subject as $t, filter as Kt, DESIGN_PREFIX as di, ADD_PREFIX as hi, LAYER_PREFIX as yi, HISTORY_PREFIX as mi, ACTIVE_PREFIX as bi, EDIT_PREFIX as gi, DESIGN_LOAD as _i, DESIGN_RESIZE as vi, HISTORY_UNDO as Ii, HISTORY_REDO as Si, LAYER_DELETE as wi, ADD_CAPTION as Ti, ADD_TEXT as ki, ADD_IMAGE as Ei, ADD_AUDIO as Ai, ADD_VIDEO as Oi, ACTIVE_SPLIT as xi, ACTIVE_CLONE as Mi, ACTIVE_PASTE as Pi, EDIT_OBJECT as Di } from "@designcombo/events";
|
|
5
5
|
var nn = function(t, r) {
|
|
6
6
|
return nn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
7
7
|
n.__proto__ = i;
|
|
@@ -50,7 +50,7 @@ function on(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 mt(t) {
|
|
54
54
|
return typeof t == "function";
|
|
55
55
|
}
|
|
56
56
|
function Yn(t) {
|
|
@@ -86,15 +86,15 @@ var tr = function() {
|
|
|
86
86
|
if (f)
|
|
87
87
|
if (this._parentage = null, Array.isArray(f))
|
|
88
88
|
try {
|
|
89
|
-
for (var d = an(f),
|
|
90
|
-
var
|
|
91
|
-
|
|
89
|
+
for (var d = an(f), x = d.next(); !x.done; x = d.next()) {
|
|
90
|
+
var F = x.value;
|
|
91
|
+
F.remove(this);
|
|
92
92
|
}
|
|
93
93
|
} catch (l) {
|
|
94
94
|
r = { error: l };
|
|
95
95
|
} finally {
|
|
96
96
|
try {
|
|
97
|
-
|
|
97
|
+
x && !x.done && (n = d.return) && n.call(d);
|
|
98
98
|
} finally {
|
|
99
99
|
if (r) throw r.error;
|
|
100
100
|
}
|
|
@@ -102,7 +102,7 @@ var tr = function() {
|
|
|
102
102
|
else
|
|
103
103
|
f.remove(this);
|
|
104
104
|
var k = this.initialTeardown;
|
|
105
|
-
if (
|
|
105
|
+
if (mt(k))
|
|
106
106
|
try {
|
|
107
107
|
k();
|
|
108
108
|
} catch (l) {
|
|
@@ -112,7 +112,7 @@ var tr = function() {
|
|
|
112
112
|
if (H) {
|
|
113
113
|
this._finalizers = null;
|
|
114
114
|
try {
|
|
115
|
-
for (var
|
|
115
|
+
for (var b = an(H), p = b.next(); !p.done; p = b.next()) {
|
|
116
116
|
var h = p.value;
|
|
117
117
|
try {
|
|
118
118
|
kn(h);
|
|
@@ -124,7 +124,7 @@ var tr = function() {
|
|
|
124
124
|
i = { error: l };
|
|
125
125
|
} finally {
|
|
126
126
|
try {
|
|
127
|
-
p && !p.done && (s =
|
|
127
|
+
p && !p.done && (s = b.return) && s.call(b);
|
|
128
128
|
} finally {
|
|
129
129
|
if (i) throw i.error;
|
|
130
130
|
}
|
|
@@ -164,10 +164,10 @@ var tr = function() {
|
|
|
164
164
|
}(), t;
|
|
165
165
|
}(), Vn = tr.EMPTY;
|
|
166
166
|
function Xn(t) {
|
|
167
|
-
return t instanceof tr || t && "closed" in t &&
|
|
167
|
+
return t instanceof tr || t && "closed" in t && mt(t.remove) && mt(t.add) && mt(t.unsubscribe);
|
|
168
168
|
}
|
|
169
169
|
function kn(t) {
|
|
170
|
-
|
|
170
|
+
mt(t) ? t() : t.unsubscribe();
|
|
171
171
|
}
|
|
172
172
|
var qn = {
|
|
173
173
|
onUnhandledError: null,
|
|
@@ -187,12 +187,12 @@ var qn = {
|
|
|
187
187
|
},
|
|
188
188
|
delegate: void 0
|
|
189
189
|
};
|
|
190
|
-
function
|
|
190
|
+
function Ci(t) {
|
|
191
191
|
Jn.setTimeout(function() {
|
|
192
192
|
throw t;
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function En() {
|
|
196
196
|
}
|
|
197
197
|
function Xe(t) {
|
|
198
198
|
t();
|
|
@@ -201,7 +201,7 @@ var Zn = function(t) {
|
|
|
201
201
|
be(r, t);
|
|
202
202
|
function r(n) {
|
|
203
203
|
var i = t.call(this) || this;
|
|
204
|
-
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination =
|
|
204
|
+
return i.isStopped = !1, n ? (i.destination = n, Xn(n) && n.add(i)) : i.destination = zi, i;
|
|
205
205
|
}
|
|
206
206
|
return r.create = function(n, i, s) {
|
|
207
207
|
return new un(n, i, s);
|
|
@@ -228,11 +228,11 @@ var Zn = function(t) {
|
|
|
228
228
|
this.unsubscribe();
|
|
229
229
|
}
|
|
230
230
|
}, r;
|
|
231
|
-
}(tr),
|
|
231
|
+
}(tr), ji = Function.prototype.bind;
|
|
232
232
|
function Qr(t, r) {
|
|
233
|
-
return
|
|
233
|
+
return ji.call(t, r);
|
|
234
234
|
}
|
|
235
|
-
var
|
|
235
|
+
var Ri = function() {
|
|
236
236
|
function t(r) {
|
|
237
237
|
this.partialObserver = r;
|
|
238
238
|
}
|
|
@@ -267,7 +267,7 @@ var ji = function() {
|
|
|
267
267
|
be(r, t);
|
|
268
268
|
function r(n, i, s) {
|
|
269
269
|
var c = t.call(this) || this, f;
|
|
270
|
-
if (
|
|
270
|
+
if (mt(n) || !n)
|
|
271
271
|
f = {
|
|
272
272
|
next: n ?? void 0,
|
|
273
273
|
error: i ?? void 0,
|
|
@@ -283,35 +283,35 @@ var ji = function() {
|
|
|
283
283
|
complete: n.complete && Qr(n.complete, d)
|
|
284
284
|
}) : f = n;
|
|
285
285
|
}
|
|
286
|
-
return c.destination = new
|
|
286
|
+
return c.destination = new Ri(f), c;
|
|
287
287
|
}
|
|
288
288
|
return r;
|
|
289
289
|
}(Zn);
|
|
290
290
|
function Ye(t) {
|
|
291
|
-
|
|
291
|
+
Ci(t);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Fi(t) {
|
|
294
294
|
throw t;
|
|
295
295
|
}
|
|
296
|
-
var
|
|
296
|
+
var zi = {
|
|
297
297
|
closed: !0,
|
|
298
|
-
next:
|
|
299
|
-
error:
|
|
300
|
-
complete:
|
|
301
|
-
},
|
|
298
|
+
next: En,
|
|
299
|
+
error: Fi,
|
|
300
|
+
complete: En
|
|
301
|
+
}, Ni = function() {
|
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
303
303
|
}();
|
|
304
|
-
function
|
|
304
|
+
function Hi(t) {
|
|
305
305
|
return t;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
308
|
-
return t.length === 0 ?
|
|
307
|
+
function Ui(t) {
|
|
308
|
+
return t.length === 0 ? Hi : t.length === 1 ? t[0] : function(n) {
|
|
309
309
|
return t.reduce(function(i, s) {
|
|
310
310
|
return s(i);
|
|
311
311
|
}, n);
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
var
|
|
314
|
+
var An = function() {
|
|
315
315
|
function t(r) {
|
|
316
316
|
r && (this._subscribe = r);
|
|
317
317
|
}
|
|
@@ -319,10 +319,10 @@ var En = function() {
|
|
|
319
319
|
var n = new t();
|
|
320
320
|
return n.source = this, n.operator = r, n;
|
|
321
321
|
}, t.prototype.subscribe = function(r, n, i) {
|
|
322
|
-
var s = this, c =
|
|
322
|
+
var s = this, c = Gi(r) ? r : new un(r, n, i);
|
|
323
323
|
return Xe(function() {
|
|
324
|
-
var f = s, d = f.operator,
|
|
325
|
-
c.add(d ? d.call(c,
|
|
324
|
+
var f = s, d = f.operator, x = f.source;
|
|
325
|
+
c.add(d ? d.call(c, x) : x ? s._subscribe(c) : s._trySubscribe(c));
|
|
326
326
|
}), c;
|
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
|
328
328
|
try {
|
|
@@ -337,8 +337,8 @@ var En = function() {
|
|
|
337
337
|
next: function(d) {
|
|
338
338
|
try {
|
|
339
339
|
r(d);
|
|
340
|
-
} catch (
|
|
341
|
-
c(
|
|
340
|
+
} catch (x) {
|
|
341
|
+
c(x), f.unsubscribe();
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
error: c,
|
|
@@ -349,12 +349,12 @@ var En = function() {
|
|
|
349
349
|
}, t.prototype._subscribe = function(r) {
|
|
350
350
|
var n;
|
|
351
351
|
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r);
|
|
352
|
-
}, t.prototype[
|
|
352
|
+
}, t.prototype[Ni] = function() {
|
|
353
353
|
return this;
|
|
354
354
|
}, t.prototype.pipe = function() {
|
|
355
355
|
for (var r = [], n = 0; n < arguments.length; n++)
|
|
356
356
|
r[n] = arguments[n];
|
|
357
|
-
return
|
|
357
|
+
return Ui(r)(this);
|
|
358
358
|
}, t.prototype.toPromise = function(r) {
|
|
359
359
|
var n = this;
|
|
360
360
|
return r = On(r), new r(function(i, s) {
|
|
@@ -375,13 +375,13 @@ function On(t) {
|
|
|
375
375
|
var r;
|
|
376
376
|
return (r = t ?? qn.Promise) !== null && r !== void 0 ? r : Promise;
|
|
377
377
|
}
|
|
378
|
-
function Ui(t) {
|
|
379
|
-
return t && yt(t.next) && yt(t.error) && yt(t.complete);
|
|
380
|
-
}
|
|
381
378
|
function Li(t) {
|
|
382
|
-
return t && t
|
|
379
|
+
return t && mt(t.next) && mt(t.error) && mt(t.complete);
|
|
380
|
+
}
|
|
381
|
+
function Gi(t) {
|
|
382
|
+
return t && t instanceof Zn || Li(t) && Xn(t);
|
|
383
383
|
}
|
|
384
|
-
var
|
|
384
|
+
var Wi = Yn(function(t) {
|
|
385
385
|
return function() {
|
|
386
386
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
387
387
|
};
|
|
@@ -396,7 +396,7 @@ var Gi = Yn(function(t) {
|
|
|
396
396
|
return i.operator = n, i;
|
|
397
397
|
}, r.prototype._throwIfClosed = function() {
|
|
398
398
|
if (this.closed)
|
|
399
|
-
throw new
|
|
399
|
+
throw new Wi();
|
|
400
400
|
}, r.prototype.next = function(n) {
|
|
401
401
|
var i = this;
|
|
402
402
|
Xe(function() {
|
|
@@ -405,11 +405,11 @@ var Gi = Yn(function(t) {
|
|
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
|
406
406
|
try {
|
|
407
407
|
for (var f = an(i.currentObservers), d = f.next(); !d.done; d = f.next()) {
|
|
408
|
-
var
|
|
409
|
-
|
|
408
|
+
var x = d.value;
|
|
409
|
+
x.next(n);
|
|
410
410
|
}
|
|
411
|
-
} catch (
|
|
412
|
-
s = { error:
|
|
411
|
+
} catch (F) {
|
|
412
|
+
s = { error: F };
|
|
413
413
|
} finally {
|
|
414
414
|
try {
|
|
415
415
|
d && !d.done && (c = f.return) && c.call(f);
|
|
@@ -459,12 +459,12 @@ var Gi = Yn(function(t) {
|
|
|
459
459
|
var i = this, s = i.hasError, c = i.thrownError, f = i.isStopped;
|
|
460
460
|
s ? n.error(c) : f && n.complete();
|
|
461
461
|
}, r.prototype.asObservable = function() {
|
|
462
|
-
var n = new
|
|
462
|
+
var n = new An();
|
|
463
463
|
return n.source = this, n;
|
|
464
464
|
}, r.create = function(n, i) {
|
|
465
465
|
return new xn(n, i);
|
|
466
466
|
}, r;
|
|
467
|
-
}(
|
|
467
|
+
}(An), xn = function(t) {
|
|
468
468
|
be(r, t);
|
|
469
469
|
function r(n, i) {
|
|
470
470
|
var s = t.call(this) || this;
|
|
@@ -506,27 +506,27 @@ var Gi = Yn(function(t) {
|
|
|
506
506
|
}, r.prototype.next = function(n) {
|
|
507
507
|
t.prototype.next.call(this, this._value = n);
|
|
508
508
|
}, r;
|
|
509
|
-
}(Qn),
|
|
509
|
+
}(Qn), nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
510
510
|
function bn(t) {
|
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
512
512
|
}
|
|
513
513
|
var qe = { exports: {} };
|
|
514
514
|
qe.exports;
|
|
515
515
|
(function(t, r) {
|
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]",
|
|
517
|
-
N[
|
|
518
|
-
var we = typeof
|
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, d = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", k = "[object Boolean]", H = "[object Date]", b = "[object Error]", p = "[object Function]", h = "[object GeneratorFunction]", l = "[object Map]", g = "[object Number]", v = "[object Null]", _ = "[object Object]", y = "[object Promise]", m = "[object Proxy]", j = "[object RegExp]", E = "[object Set]", I = "[object String]", P = "[object Symbol]", S = "[object Undefined]", T = "[object WeakMap]", A = "[object ArrayBuffer]", M = "[object DataView]", $ = "[object Float32Array]", bt = "[object Float64Array]", Ie = "[object Int8Array]", ir = "[object Int16Array]", ar = "[object Int32Array]", sr = "[object Uint8Array]", or = "[object Uint8ClampedArray]", z = "[object Uint16Array]", cr = "[object Uint32Array]", ur = /[\\^$.*+?()[\]{}|]/g, it = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, N = {};
|
|
517
|
+
N[$] = N[bt] = N[Ie] = N[ir] = N[ar] = N[sr] = N[or] = N[z] = N[cr] = !0, N[d] = N[x] = N[A] = N[k] = N[M] = N[H] = N[b] = N[p] = N[l] = N[g] = N[_] = N[j] = N[E] = N[I] = N[T] = !1;
|
|
518
|
+
var we = typeof nt == "object" && nt && nt.Object === Object && nt, lr = typeof self == "object" && self && self.Object === Object && self, at = we || lr || Function("return this")(), Te = r && !r.nodeType && r, ke = Te && !0 && t && !t.nodeType && t, Yt = ke && ke.exports === Te, Vt = Yt && we.process, Ee = function() {
|
|
519
519
|
try {
|
|
520
520
|
return Vt && Vt.binding && Vt.binding("util");
|
|
521
521
|
} catch {
|
|
522
522
|
}
|
|
523
|
-
}(), Xt =
|
|
524
|
-
function
|
|
525
|
-
for (var o = -1, u = e == null ? 0 : e.length, O = 0,
|
|
523
|
+
}(), Xt = Ee && Ee.isTypedArray;
|
|
524
|
+
function Ae(e, a) {
|
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, O = 0, w = []; ++o < u; ) {
|
|
526
526
|
var C = e[o];
|
|
527
|
-
a(C, o, e) && (
|
|
527
|
+
a(C, o, e) && (w[O++] = C);
|
|
528
528
|
}
|
|
529
|
-
return
|
|
529
|
+
return w;
|
|
530
530
|
}
|
|
531
531
|
function qt(e, a) {
|
|
532
532
|
for (var o = -1, u = a.length, O = e.length; ++o < u; )
|
|
@@ -566,18 +566,18 @@ qe.exports;
|
|
|
566
566
|
return e(a(o));
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function ct(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 Rt = Array.prototype, dr = Function.prototype,
|
|
575
|
+
var Rt = Array.prototype, dr = Function.prototype, It = Object.prototype, Ft = at["__core-js_shared__"], Zt = dr.toString, et = It.hasOwnProperty, Pe = function() {
|
|
576
576
|
var e = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
|
|
577
577
|
return e ? "Symbol(src)_1." + e : "";
|
|
578
|
-
}(), De =
|
|
579
|
-
"^" + Zt.call(
|
|
580
|
-
), Qt = Yt ?
|
|
578
|
+
}(), De = It.toString, hr = RegExp(
|
|
579
|
+
"^" + Zt.call(et).replace(ur, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
580
|
+
), Qt = Yt ? at.Buffer : void 0, zt = at.Symbol, Ce = at.Uint8Array, Nt = It.propertyIsEnumerable, St = Rt.splice, st = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, te = Qt ? Qt.isBuffer : void 0, wt = Me(Object.keys, Object), ee = dt(at, "DataView"), Tt = dt(at, "Map"), re = dt(at, "Promise"), ne = dt(at, "Set"), ie = dt(at, "WeakMap"), gt = dt(Object, "create"), je = X(ee), pt = X(Tt), yr = X(re), mr = X(ne), br = X(ie), Re = zt ? zt.prototype : void 0, ae = Re ? Re.valueOf : void 0;
|
|
581
581
|
function W(e) {
|
|
582
582
|
var a = -1, o = e == null ? 0 : e.length;
|
|
583
583
|
for (this.clear(); ++a < o; ) {
|
|
@@ -586,7 +586,7 @@ qe.exports;
|
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
function gr() {
|
|
589
|
-
this.__data__ =
|
|
589
|
+
this.__data__ = gt ? gt(null) : {}, this.size = 0;
|
|
590
590
|
}
|
|
591
591
|
function _r(e) {
|
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
|
@@ -594,22 +594,22 @@ qe.exports;
|
|
|
594
594
|
}
|
|
595
595
|
function vr(e) {
|
|
596
596
|
var a = this.__data__;
|
|
597
|
-
if (
|
|
597
|
+
if (gt) {
|
|
598
598
|
var o = a[e];
|
|
599
599
|
return o === i ? void 0 : o;
|
|
600
600
|
}
|
|
601
|
-
return
|
|
601
|
+
return et.call(a, e) ? a[e] : void 0;
|
|
602
602
|
}
|
|
603
603
|
function Ir(e) {
|
|
604
604
|
var a = this.__data__;
|
|
605
|
-
return
|
|
605
|
+
return gt ? a[e] !== void 0 : et.call(a, e);
|
|
606
606
|
}
|
|
607
607
|
function Sr(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] = gt && a === void 0 ? i : a, this;
|
|
610
610
|
}
|
|
611
611
|
W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
|
|
612
|
-
function
|
|
612
|
+
function K(e) {
|
|
613
613
|
var a = -1, o = e == null ? 0 : e.length;
|
|
614
614
|
for (this.clear(); ++a < o; ) {
|
|
615
615
|
var u = e[a];
|
|
@@ -624,21 +624,21 @@ qe.exports;
|
|
|
624
624
|
if (o < 0)
|
|
625
625
|
return !1;
|
|
626
626
|
var u = a.length - 1;
|
|
627
|
-
return o == u ? a.pop() :
|
|
627
|
+
return o == u ? a.pop() : St.call(a, o, 1), --this.size, !0;
|
|
628
628
|
}
|
|
629
629
|
function kr(e) {
|
|
630
630
|
var a = this.__data__, o = Gt(a, e);
|
|
631
631
|
return o < 0 ? void 0 : a[o][1];
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Er(e) {
|
|
634
634
|
return Gt(this.__data__, e) > -1;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Ar(e, a) {
|
|
637
637
|
var o = this.__data__, u = Gt(o, e);
|
|
638
638
|
return u < 0 ? (++this.size, o.push([e, a])) : o[u][1] = a, this;
|
|
639
639
|
}
|
|
640
|
-
|
|
641
|
-
function
|
|
640
|
+
K.prototype.clear = wr, K.prototype.delete = Tr, K.prototype.get = kr, K.prototype.has = Er, K.prototype.set = Ar;
|
|
641
|
+
function q(e) {
|
|
642
642
|
var a = -1, o = e == null ? 0 : e.length;
|
|
643
643
|
for (this.clear(); ++a < o; ) {
|
|
644
644
|
var u = e[a];
|
|
@@ -648,28 +648,28 @@ qe.exports;
|
|
|
648
648
|
function Or() {
|
|
649
649
|
this.size = 0, this.__data__ = {
|
|
650
650
|
hash: new W(),
|
|
651
|
-
map: new (
|
|
651
|
+
map: new (Tt || K)(),
|
|
652
652
|
string: new W()
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
function xr(e) {
|
|
656
|
-
var a =
|
|
656
|
+
var a = ot(this, e).delete(e);
|
|
657
657
|
return this.size -= a ? 1 : 0, a;
|
|
658
658
|
}
|
|
659
659
|
function Mr(e) {
|
|
660
|
-
return
|
|
660
|
+
return ot(this, e).get(e);
|
|
661
661
|
}
|
|
662
662
|
function Pr(e) {
|
|
663
|
-
return
|
|
663
|
+
return ot(this, e).has(e);
|
|
664
664
|
}
|
|
665
665
|
function Dr(e, a) {
|
|
666
|
-
var o =
|
|
666
|
+
var o = ot(this, e), u = o.size;
|
|
667
667
|
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
|
668
668
|
}
|
|
669
|
-
|
|
669
|
+
q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
|
|
670
670
|
function Ut(e) {
|
|
671
671
|
var a = -1, o = e == null ? 0 : e.length;
|
|
672
|
-
for (this.__data__ = new
|
|
672
|
+
for (this.__data__ = new q(); ++a < o; )
|
|
673
673
|
this.add(e[a]);
|
|
674
674
|
}
|
|
675
675
|
function Fe(e) {
|
|
@@ -679,12 +679,12 @@ qe.exports;
|
|
|
679
679
|
return this.__data__.has(e);
|
|
680
680
|
}
|
|
681
681
|
Ut.prototype.add = Ut.prototype.push = Fe, Ut.prototype.has = Lt;
|
|
682
|
-
function
|
|
683
|
-
var a = this.__data__ = new
|
|
682
|
+
function ut(e) {
|
|
683
|
+
var a = this.__data__ = new K(e);
|
|
684
684
|
this.size = a.size;
|
|
685
685
|
}
|
|
686
686
|
function se() {
|
|
687
|
-
this.__data__ = new
|
|
687
|
+
this.__data__ = new K(), this.size = 0;
|
|
688
688
|
}
|
|
689
689
|
function Cr(e) {
|
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
|
@@ -698,23 +698,23 @@ qe.exports;
|
|
|
698
698
|
}
|
|
699
699
|
function Fr(e, a) {
|
|
700
700
|
var o = this.__data__;
|
|
701
|
-
if (o instanceof
|
|
701
|
+
if (o instanceof K) {
|
|
702
702
|
var u = o.__data__;
|
|
703
|
-
if (!
|
|
703
|
+
if (!Tt || u.length < n - 1)
|
|
704
704
|
return u.push([e, a]), this.size = ++o.size, this;
|
|
705
|
-
o = this.__data__ = new
|
|
705
|
+
o = this.__data__ = new q(u);
|
|
706
706
|
}
|
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
|
708
708
|
}
|
|
709
|
-
|
|
709
|
+
ut.prototype.clear = se, ut.prototype.delete = Cr, ut.prototype.get = jr, ut.prototype.has = Rr, ut.prototype.set = Fr;
|
|
710
710
|
function zr(e, a) {
|
|
711
|
-
var o = Wt(e), u = !o && Le(e), O = !o && !u && Bt(e),
|
|
712
|
-
for (var
|
|
713
|
-
|
|
714
|
-
(
|
|
715
|
-
O && (
|
|
716
|
-
|
|
717
|
-
$r(
|
|
711
|
+
var o = Wt(e), u = !o && Le(e), O = !o && !u && Bt(e), w = !o && !u && !O && Be(e), C = o || u || O || w, D = C ? fr(e.length, String) : [], U = D.length;
|
|
712
|
+
for (var R in e)
|
|
713
|
+
et.call(e, R) && !(C && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
714
|
+
(R == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
715
|
+
O && (R == "offset" || R == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
716
|
+
w && (R == "buffer" || R == "byteLength" || R == "byteOffset") || // Skip index properties.
|
|
717
|
+
$r(R, U))) && D.push(R);
|
|
718
718
|
return D;
|
|
719
719
|
}
|
|
720
720
|
function Gt(e, a) {
|
|
@@ -727,191 +727,191 @@ qe.exports;
|
|
|
727
727
|
var u = a(e);
|
|
728
728
|
return Wt(e) ? u : qt(u, o(e));
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return e == null ? e === void 0 ? S : v :
|
|
730
|
+
function kt(e) {
|
|
731
|
+
return e == null ? e === void 0 ? S : v : st && st in Object(e) ? ht(e) : He(e);
|
|
732
732
|
}
|
|
733
733
|
function ze(e) {
|
|
734
|
-
return
|
|
734
|
+
return ft(e) && kt(e) == d;
|
|
735
735
|
}
|
|
736
736
|
function Ne(e, a, o, u, O) {
|
|
737
|
-
return e === a ? !0 : e == null || a == null || !
|
|
737
|
+
return e === a ? !0 : e == null || a == null || !ft(e) && !ft(a) ? e !== e && a !== a : Nr(e, a, o, u, Ne, O);
|
|
738
738
|
}
|
|
739
|
-
function Nr(e, a, o, u, O,
|
|
740
|
-
var C = Wt(e), D = Wt(a), U = C ?
|
|
741
|
-
U = U == d ?
|
|
742
|
-
var
|
|
739
|
+
function Nr(e, a, o, u, O, w) {
|
|
740
|
+
var C = Wt(e), D = Wt(a), U = C ? x : lt(e), R = D ? x : lt(a);
|
|
741
|
+
U = U == d ? _ : U, R = R == d ? _ : R;
|
|
742
|
+
var Y = U == _, J = R == _, L = U == R;
|
|
743
743
|
if (L && Bt(e)) {
|
|
744
744
|
if (!Bt(a))
|
|
745
745
|
return !1;
|
|
746
|
-
C = !0,
|
|
746
|
+
C = !0, Y = !1;
|
|
747
747
|
}
|
|
748
|
-
if (L && !
|
|
749
|
-
return
|
|
748
|
+
if (L && !Y)
|
|
749
|
+
return w || (w = new ut()), C || Be(e) ? ce(e, a, o, u, O, w) : Gr(e, a, U, o, u, O, w);
|
|
750
750
|
if (!(o & s)) {
|
|
751
|
-
var
|
|
752
|
-
if (
|
|
753
|
-
var
|
|
754
|
-
return
|
|
751
|
+
var V = Y && et.call(e, "__wrapped__"), B = J && et.call(a, "__wrapped__");
|
|
752
|
+
if (V || B) {
|
|
753
|
+
var _t = V ? e.value() : e, yt = B ? a.value() : a;
|
|
754
|
+
return w || (w = new ut()), O(_t, yt, o, u, w);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return L ? (
|
|
757
|
+
return L ? (w || (w = new ut()), Wr(e, a, o, u, O, w)) : !1;
|
|
758
758
|
}
|
|
759
759
|
function Hr(e) {
|
|
760
760
|
if (!We(e) || Yr(e))
|
|
761
761
|
return !1;
|
|
762
|
-
var a = Ge(e) ? hr :
|
|
763
|
-
return a.test(
|
|
762
|
+
var a = Ge(e) ? hr : it;
|
|
763
|
+
return a.test(X(e));
|
|
764
764
|
}
|
|
765
765
|
function Ur(e) {
|
|
766
|
-
return
|
|
766
|
+
return ft(e) && le(e.length) && !!N[kt(e)];
|
|
767
767
|
}
|
|
768
768
|
function Lr(e) {
|
|
769
769
|
if (!Vr(e))
|
|
770
|
-
return
|
|
770
|
+
return wt(e);
|
|
771
771
|
var a = [];
|
|
772
772
|
for (var o in Object(e))
|
|
773
|
-
|
|
773
|
+
et.call(e, o) && o != "constructor" && a.push(o);
|
|
774
774
|
return a;
|
|
775
775
|
}
|
|
776
|
-
function ce(e, a, o, u, O,
|
|
776
|
+
function ce(e, a, o, u, O, w) {
|
|
777
777
|
var C = o & s, D = e.length, U = a.length;
|
|
778
778
|
if (D != U && !(C && U > D))
|
|
779
779
|
return !1;
|
|
780
|
-
var
|
|
781
|
-
if (
|
|
782
|
-
return
|
|
783
|
-
var
|
|
784
|
-
for (
|
|
785
|
-
var
|
|
780
|
+
var R = w.get(e);
|
|
781
|
+
if (R && w.get(a))
|
|
782
|
+
return R == a;
|
|
783
|
+
var Y = -1, J = !0, L = o & c ? new Ut() : void 0;
|
|
784
|
+
for (w.set(e, a), w.set(a, e); ++Y < D; ) {
|
|
785
|
+
var V = e[Y], B = a[Y];
|
|
786
786
|
if (u)
|
|
787
|
-
var
|
|
788
|
-
if (
|
|
789
|
-
if (
|
|
787
|
+
var _t = C ? u(B, V, Y, a, e, w) : u(V, B, Y, e, a, w);
|
|
788
|
+
if (_t !== void 0) {
|
|
789
|
+
if (_t)
|
|
790
790
|
continue;
|
|
791
|
-
|
|
791
|
+
J = !1;
|
|
792
792
|
break;
|
|
793
793
|
}
|
|
794
794
|
if (L) {
|
|
795
|
-
if (!Oe(a, function(
|
|
796
|
-
if (!jt(L,
|
|
797
|
-
return L.push(
|
|
795
|
+
if (!Oe(a, function(yt, At) {
|
|
796
|
+
if (!jt(L, At) && (V === yt || O(V, yt, o, u, w)))
|
|
797
|
+
return L.push(At);
|
|
798
798
|
})) {
|
|
799
|
-
|
|
799
|
+
J = !1;
|
|
800
800
|
break;
|
|
801
801
|
}
|
|
802
|
-
} else if (!(
|
|
803
|
-
|
|
802
|
+
} else if (!(V === B || O(V, B, o, u, w))) {
|
|
803
|
+
J = !1;
|
|
804
804
|
break;
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
return
|
|
807
|
+
return w.delete(e), w.delete(a), J;
|
|
808
808
|
}
|
|
809
|
-
function Gr(e, a, o, u, O,
|
|
809
|
+
function Gr(e, a, o, u, O, w, C) {
|
|
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 || !
|
|
815
|
+
case A:
|
|
816
|
+
return !(e.byteLength != a.byteLength || !w(new Ce(e), new Ce(a)));
|
|
817
817
|
case k:
|
|
818
818
|
case H:
|
|
819
|
-
case
|
|
819
|
+
case g:
|
|
820
820
|
return Ue(+e, +a);
|
|
821
|
-
case
|
|
821
|
+
case b:
|
|
822
822
|
return e.name == a.name && e.message == a.message;
|
|
823
|
-
case
|
|
824
|
-
case
|
|
823
|
+
case j:
|
|
824
|
+
case I:
|
|
825
825
|
return e == a + "";
|
|
826
826
|
case l:
|
|
827
827
|
var D = xe;
|
|
828
828
|
case E:
|
|
829
829
|
var U = u & s;
|
|
830
|
-
if (D || (D =
|
|
830
|
+
if (D || (D = ct), e.size != a.size && !U)
|
|
831
831
|
return !1;
|
|
832
|
-
var
|
|
833
|
-
if (
|
|
834
|
-
return
|
|
832
|
+
var R = C.get(e);
|
|
833
|
+
if (R)
|
|
834
|
+
return R == a;
|
|
835
835
|
u |= c, C.set(e, a);
|
|
836
|
-
var
|
|
837
|
-
return C.delete(e),
|
|
838
|
-
case
|
|
836
|
+
var Y = ce(D(e), D(a), u, O, w, C);
|
|
837
|
+
return C.delete(e), Y;
|
|
838
|
+
case P:
|
|
839
839
|
if (ae)
|
|
840
840
|
return ae.call(e) == ae.call(a);
|
|
841
841
|
}
|
|
842
842
|
return !1;
|
|
843
843
|
}
|
|
844
|
-
function Wr(e, a, o, u, O,
|
|
845
|
-
var C = o & s, D =
|
|
846
|
-
if (U !=
|
|
844
|
+
function Wr(e, a, o, u, O, w) {
|
|
845
|
+
var C = o & s, D = Et(e), U = D.length, R = Et(a), Y = R.length;
|
|
846
|
+
if (U != Y && !C)
|
|
847
847
|
return !1;
|
|
848
|
-
for (var
|
|
849
|
-
var L = D[
|
|
850
|
-
if (!(C ? L in a :
|
|
848
|
+
for (var J = U; J--; ) {
|
|
849
|
+
var L = D[J];
|
|
850
|
+
if (!(C ? L in a : et.call(a, L)))
|
|
851
851
|
return !1;
|
|
852
852
|
}
|
|
853
|
-
var
|
|
854
|
-
if (
|
|
855
|
-
return
|
|
853
|
+
var V = w.get(e);
|
|
854
|
+
if (V && w.get(a))
|
|
855
|
+
return V == a;
|
|
856
856
|
var B = !0;
|
|
857
|
-
|
|
858
|
-
for (var
|
|
859
|
-
L = D[
|
|
860
|
-
var
|
|
857
|
+
w.set(e, a), w.set(a, e);
|
|
858
|
+
for (var _t = C; ++J < U; ) {
|
|
859
|
+
L = D[J];
|
|
860
|
+
var yt = e[L], At = a[L];
|
|
861
861
|
if (u)
|
|
862
|
-
var Tn = C ? u(
|
|
863
|
-
if (!(Tn === void 0 ?
|
|
862
|
+
var Tn = C ? u(At, yt, L, a, e, w) : u(yt, At, L, e, a, w);
|
|
863
|
+
if (!(Tn === void 0 ? yt === At || O(yt, At, o, u, w) : Tn)) {
|
|
864
864
|
B = !1;
|
|
865
865
|
break;
|
|
866
866
|
}
|
|
867
|
-
|
|
867
|
+
_t || (_t = L == "constructor");
|
|
868
868
|
}
|
|
869
|
-
if (B && !
|
|
869
|
+
if (B && !_t) {
|
|
870
870
|
var $e = e.constructor, Ke = a.constructor;
|
|
871
871
|
$e != Ke && "constructor" in e && "constructor" in a && !(typeof $e == "function" && $e instanceof $e && typeof Ke == "function" && Ke instanceof Ke) && (B = !1);
|
|
872
872
|
}
|
|
873
|
-
return
|
|
873
|
+
return w.delete(e), w.delete(a), B;
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function Et(e) {
|
|
876
876
|
return oe(e, fe, Br);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function ot(e, a) {
|
|
879
879
|
var o = e.__data__;
|
|
880
880
|
return Kr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function dt(e, a) {
|
|
883
883
|
var o = Jt(e, a);
|
|
884
884
|
return Hr(o) ? o : void 0;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
887
|
-
var a =
|
|
886
|
+
function ht(e) {
|
|
887
|
+
var a = et.call(e, st), o = e[st];
|
|
888
888
|
try {
|
|
889
|
-
e[
|
|
889
|
+
e[st] = void 0;
|
|
890
890
|
var u = !0;
|
|
891
891
|
} catch {
|
|
892
892
|
}
|
|
893
893
|
var O = De.call(e);
|
|
894
|
-
return u && (a ? e[
|
|
894
|
+
return u && (a ? e[st] = o : delete e[st]), O;
|
|
895
895
|
}
|
|
896
896
|
var Br = Ht ? function(e) {
|
|
897
|
-
return e == null ? [] : (e = Object(e),
|
|
897
|
+
return e == null ? [] : (e = Object(e), Ae(Ht(e), function(a) {
|
|
898
898
|
return Nt.call(e, a);
|
|
899
899
|
}));
|
|
900
|
-
} : qr,
|
|
901
|
-
(ee &&
|
|
902
|
-
var a =
|
|
900
|
+
} : qr, lt = kt;
|
|
901
|
+
(ee && lt(new ee(new ArrayBuffer(1))) != M || Tt && lt(new Tt()) != l || re && lt(re.resolve()) != y || ne && lt(new ne()) != E || ie && lt(new ie()) != T) && (lt = function(e) {
|
|
902
|
+
var a = kt(e), o = a == _ ? e.constructor : void 0, u = o ? X(o) : "";
|
|
903
903
|
if (u)
|
|
904
904
|
switch (u) {
|
|
905
905
|
case je:
|
|
906
|
-
return
|
|
907
|
-
case
|
|
906
|
+
return M;
|
|
907
|
+
case pt:
|
|
908
908
|
return l;
|
|
909
909
|
case yr:
|
|
910
|
-
return
|
|
910
|
+
return y;
|
|
911
911
|
case mr:
|
|
912
912
|
return E;
|
|
913
913
|
case br:
|
|
914
|
-
return
|
|
914
|
+
return T;
|
|
915
915
|
}
|
|
916
916
|
return a;
|
|
917
917
|
});
|
|
@@ -926,13 +926,13 @@ qe.exports;
|
|
|
926
926
|
return !!Pe && Pe in e;
|
|
927
927
|
}
|
|
928
928
|
function Vr(e) {
|
|
929
|
-
var a = e && e.constructor, o = typeof a == "function" && a.prototype ||
|
|
929
|
+
var a = e && e.constructor, o = typeof a == "function" && a.prototype || It;
|
|
930
930
|
return e === o;
|
|
931
931
|
}
|
|
932
932
|
function He(e) {
|
|
933
933
|
return De.call(e);
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function X(e) {
|
|
936
936
|
if (e != null) {
|
|
937
937
|
try {
|
|
938
938
|
return Zt.call(e);
|
|
@@ -951,7 +951,7 @@ qe.exports;
|
|
|
951
951
|
var Le = ze(/* @__PURE__ */ function() {
|
|
952
952
|
return arguments;
|
|
953
953
|
}()) ? ze : function(e) {
|
|
954
|
-
return
|
|
954
|
+
return ft(e) && et.call(e, "callee") && !Nt.call(e, "callee");
|
|
955
955
|
}, Wt = Array.isArray;
|
|
956
956
|
function ue(e) {
|
|
957
957
|
return e != null && le(e.length) && !Ge(e);
|
|
@@ -963,8 +963,8 @@ qe.exports;
|
|
|
963
963
|
function Ge(e) {
|
|
964
964
|
if (!We(e))
|
|
965
965
|
return !1;
|
|
966
|
-
var a =
|
|
967
|
-
return a == p || a == h || a ==
|
|
966
|
+
var a = kt(e);
|
|
967
|
+
return a == p || a == h || a == F || a == m;
|
|
968
968
|
}
|
|
969
969
|
function le(e) {
|
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
|
@@ -973,7 +973,7 @@ qe.exports;
|
|
|
973
973
|
var a = typeof e;
|
|
974
974
|
return e != null && (a == "object" || a == "function");
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function ft(e) {
|
|
977
977
|
return e != null && typeof e == "object";
|
|
978
978
|
}
|
|
979
979
|
var Be = Xt ? pr(Xt) : Ur;
|
|
@@ -988,18 +988,18 @@ qe.exports;
|
|
|
988
988
|
}
|
|
989
989
|
t.exports = Xr;
|
|
990
990
|
})(qe, qe.exports);
|
|
991
|
-
var
|
|
992
|
-
const
|
|
991
|
+
var Bi = qe.exports;
|
|
992
|
+
const rt = /* @__PURE__ */ bn(Bi);
|
|
993
993
|
var Je = { exports: {} };
|
|
994
994
|
Je.exports;
|
|
995
995
|
(function(t, r) {
|
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]",
|
|
997
|
-
z[c] = z[f] = z[
|
|
998
|
-
var cr = typeof
|
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", d = "[object Boolean]", x = "[object Date]", F = "[object Error]", k = "[object Function]", H = "[object GeneratorFunction]", b = "[object Map]", p = "[object Number]", h = "[object Object]", l = "[object Promise]", g = "[object RegExp]", v = "[object Set]", _ = "[object String]", y = "[object Symbol]", m = "[object WeakMap]", j = "[object ArrayBuffer]", E = "[object DataView]", I = "[object Float32Array]", P = "[object Float64Array]", S = "[object Int8Array]", T = "[object Int16Array]", A = "[object Int32Array]", M = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", Ie = "[object Uint32Array]", ir = /[\\^$.*+?()[\]{}|]/g, ar = /\w*$/, sr = /^\[object .+?Constructor\]$/, or = /^(?:0|[1-9]\d*)$/, z = {};
|
|
997
|
+
z[c] = z[f] = z[j] = z[E] = z[d] = z[x] = z[I] = z[P] = z[S] = z[T] = z[A] = z[b] = z[p] = z[h] = z[g] = z[v] = z[_] = z[y] = z[M] = z[$] = z[bt] = z[Ie] = !0, z[F] = z[k] = z[m] = !1;
|
|
998
|
+
var cr = typeof nt == "object" && nt && nt.Object === Object && nt, ur = typeof self == "object" && self && self.Object === Object && self, it = cr || ur || Function("return this")(), Se = r && !r.nodeType && r, N = Se && !0 && t && !t.nodeType && t, we = N && N.exports === Se;
|
|
999
999
|
function lr(e, a) {
|
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function at(e, a) {
|
|
1003
1003
|
return e.add(a), e;
|
|
1004
1004
|
}
|
|
1005
1005
|
function Te(e, a) {
|
|
@@ -1013,7 +1013,7 @@ Je.exports;
|
|
|
1013
1013
|
return e;
|
|
1014
1014
|
}
|
|
1015
1015
|
function Yt(e, a, o, u) {
|
|
1016
|
-
for (var O = -1,
|
|
1016
|
+
for (var O = -1, w = e ? e.length : 0; ++O < w; )
|
|
1017
1017
|
o = a(o, e[O], O, e);
|
|
1018
1018
|
return o;
|
|
1019
1019
|
}
|
|
@@ -1022,7 +1022,7 @@ Je.exports;
|
|
|
1022
1022
|
u[o] = a(o);
|
|
1023
1023
|
return u;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Ee(e, a) {
|
|
1026
1026
|
return e == null ? void 0 : e[a];
|
|
1027
1027
|
}
|
|
1028
1028
|
function Xt(e) {
|
|
@@ -1034,7 +1034,7 @@ Je.exports;
|
|
|
1034
1034
|
}
|
|
1035
1035
|
return a;
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function Ae(e) {
|
|
1038
1038
|
var a = -1, o = Array(e.size);
|
|
1039
1039
|
return e.forEach(function(u, O) {
|
|
1040
1040
|
o[++a] = [O, u];
|
|
@@ -1051,13 +1051,13 @@ Je.exports;
|
|
|
1051
1051
|
o[++a] = u;
|
|
1052
1052
|
}), o;
|
|
1053
1053
|
}
|
|
1054
|
-
var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt =
|
|
1054
|
+
var fr = Array.prototype, pr = Function.prototype, jt = Object.prototype, Jt = it["__core-js_shared__"], xe = function() {
|
|
1055
1055
|
var e = /[^.]+$/.exec(Jt && Jt.keys && Jt.keys.IE_PROTO || "");
|
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
|
1057
|
-
}(), Me = pr.toString,
|
|
1058
|
-
"^" + Me.call(
|
|
1059
|
-
),
|
|
1060
|
-
function
|
|
1057
|
+
}(), Me = pr.toString, ct = jt.hasOwnProperty, Rt = jt.toString, dr = RegExp(
|
|
1058
|
+
"^" + Me.call(ct).replace(ir, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1059
|
+
), It = we ? it.Buffer : void 0, Ft = it.Symbol, Zt = it.Uint8Array, et = qt(Object.getPrototypeOf, Object), Pe = Object.create, De = jt.propertyIsEnumerable, hr = fr.splice, Qt = Object.getOwnPropertySymbols, zt = It ? It.isBuffer : void 0, Ce = qt(Object.keys, Object), Nt = ot(it, "DataView"), St = ot(it, "Map"), st = ot(it, "Promise"), Ht = ot(it, "Set"), te = ot(it, "WeakMap"), wt = ot(Object, "create"), ee = X(Nt), Tt = X(St), re = X(st), ne = X(Ht), ie = X(te), gt = Ft ? Ft.prototype : void 0, je = gt ? gt.valueOf : void 0;
|
|
1060
|
+
function pt(e) {
|
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
|
1063
1063
|
var u = e[a];
|
|
@@ -1065,28 +1065,28 @@ Je.exports;
|
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
function yr() {
|
|
1068
|
-
this.__data__ =
|
|
1068
|
+
this.__data__ = wt ? wt(null) : {};
|
|
1069
1069
|
}
|
|
1070
1070
|
function mr(e) {
|
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
|
1072
1072
|
}
|
|
1073
1073
|
function br(e) {
|
|
1074
1074
|
var a = this.__data__;
|
|
1075
|
-
if (
|
|
1075
|
+
if (wt) {
|
|
1076
1076
|
var o = a[e];
|
|
1077
1077
|
return o === i ? void 0 : o;
|
|
1078
1078
|
}
|
|
1079
|
-
return
|
|
1079
|
+
return ct.call(a, e) ? a[e] : void 0;
|
|
1080
1080
|
}
|
|
1081
1081
|
function Re(e) {
|
|
1082
1082
|
var a = this.__data__;
|
|
1083
|
-
return
|
|
1083
|
+
return wt ? a[e] !== void 0 : ct.call(a, e);
|
|
1084
1084
|
}
|
|
1085
1085
|
function ae(e, a) {
|
|
1086
1086
|
var o = this.__data__;
|
|
1087
|
-
return o[e] =
|
|
1087
|
+
return o[e] = wt && a === void 0 ? i : a, this;
|
|
1088
1088
|
}
|
|
1089
|
-
|
|
1089
|
+
pt.prototype.clear = yr, pt.prototype.delete = mr, pt.prototype.get = br, pt.prototype.has = Re, pt.prototype.set = ae;
|
|
1090
1090
|
function W(e) {
|
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
|
@@ -1116,7 +1116,7 @@ Je.exports;
|
|
|
1116
1116
|
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
|
1117
1117
|
}
|
|
1118
1118
|
W.prototype.clear = gr, W.prototype.delete = _r, W.prototype.get = vr, W.prototype.has = Ir, W.prototype.set = Sr;
|
|
1119
|
-
function
|
|
1119
|
+
function K(e) {
|
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
|
1122
1122
|
var u = e[a];
|
|
@@ -1125,25 +1125,25 @@ Je.exports;
|
|
|
1125
1125
|
}
|
|
1126
1126
|
function wr() {
|
|
1127
1127
|
this.__data__ = {
|
|
1128
|
-
hash: new
|
|
1129
|
-
map: new (
|
|
1130
|
-
string: new
|
|
1128
|
+
hash: new pt(),
|
|
1129
|
+
map: new (St || W)(),
|
|
1130
|
+
string: new pt()
|
|
1131
1131
|
};
|
|
1132
1132
|
}
|
|
1133
1133
|
function Tr(e) {
|
|
1134
|
-
return
|
|
1134
|
+
return Et(this, e).delete(e);
|
|
1135
1135
|
}
|
|
1136
1136
|
function kr(e) {
|
|
1137
|
-
return
|
|
1137
|
+
return Et(this, e).get(e);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1140
|
-
return
|
|
1139
|
+
function Er(e) {
|
|
1140
|
+
return Et(this, e).has(e);
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return
|
|
1142
|
+
function Ar(e, a) {
|
|
1143
|
+
return Et(this, e).set(e, a), this;
|
|
1144
1144
|
}
|
|
1145
|
-
|
|
1146
|
-
function
|
|
1145
|
+
K.prototype.clear = wr, K.prototype.delete = Tr, K.prototype.get = kr, K.prototype.has = Er, K.prototype.set = Ar;
|
|
1146
|
+
function q(e) {
|
|
1147
1147
|
this.__data__ = new W(e);
|
|
1148
1148
|
}
|
|
1149
1149
|
function Or() {
|
|
@@ -1162,22 +1162,22 @@ Je.exports;
|
|
|
1162
1162
|
var o = this.__data__;
|
|
1163
1163
|
if (o instanceof W) {
|
|
1164
1164
|
var u = o.__data__;
|
|
1165
|
-
if (!
|
|
1165
|
+
if (!St || u.length < n - 1)
|
|
1166
1166
|
return u.push([e, a]), this;
|
|
1167
|
-
o = this.__data__ = new
|
|
1167
|
+
o = this.__data__ = new K(u);
|
|
1168
1168
|
}
|
|
1169
1169
|
return o.set(e, a), this;
|
|
1170
1170
|
}
|
|
1171
|
-
|
|
1171
|
+
q.prototype.clear = Or, q.prototype.delete = xr, q.prototype.get = Mr, q.prototype.has = Pr, q.prototype.set = Dr;
|
|
1172
1172
|
function Ut(e, a) {
|
|
1173
1173
|
var o = ue(e) || Wt(e) ? Vt(e.length, String) : [], u = o.length, O = !!u;
|
|
1174
|
-
for (var
|
|
1175
|
-
|
|
1174
|
+
for (var w in e)
|
|
1175
|
+
ct.call(e, w) && !(O && (w == "length" || Kr(w, u))) && o.push(w);
|
|
1176
1176
|
return o;
|
|
1177
1177
|
}
|
|
1178
1178
|
function Fe(e, a, o) {
|
|
1179
1179
|
var u = e[a];
|
|
1180
|
-
(!(
|
|
1180
|
+
(!(ct.call(e, a) && Le(u, o)) || o === void 0 && !(a in e)) && (e[a] = o);
|
|
1181
1181
|
}
|
|
1182
1182
|
function Lt(e, a) {
|
|
1183
1183
|
for (var o = e.length; o--; )
|
|
@@ -1185,46 +1185,46 @@ Je.exports;
|
|
|
1185
1185
|
return o;
|
|
1186
1186
|
return -1;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function ut(e, a) {
|
|
1189
1189
|
return e && ce(a, fe(a), e);
|
|
1190
1190
|
}
|
|
1191
|
-
function se(e, a, o, u, O,
|
|
1191
|
+
function se(e, a, o, u, O, w, C) {
|
|
1192
1192
|
var D;
|
|
1193
|
-
if (u && (D =
|
|
1193
|
+
if (u && (D = w ? u(e, O, w, C) : u(e)), D !== void 0)
|
|
1194
1194
|
return D;
|
|
1195
|
-
if (!
|
|
1195
|
+
if (!ft(e))
|
|
1196
1196
|
return e;
|
|
1197
1197
|
var U = ue(e);
|
|
1198
1198
|
if (U) {
|
|
1199
1199
|
if (D = Br(e), !a)
|
|
1200
1200
|
return Lr(e, D);
|
|
1201
1201
|
} else {
|
|
1202
|
-
var
|
|
1202
|
+
var R = ht(e), Y = R == k || R == H;
|
|
1203
1203
|
if (Ge(e))
|
|
1204
1204
|
return Gt(e, a);
|
|
1205
|
-
if (
|
|
1205
|
+
if (R == h || R == c || Y && !w) {
|
|
1206
1206
|
if (Xt(e))
|
|
1207
|
-
return
|
|
1208
|
-
if (D =
|
|
1209
|
-
return Gr(e,
|
|
1207
|
+
return w ? e : {};
|
|
1208
|
+
if (D = lt(Y ? {} : e), !a)
|
|
1209
|
+
return Gr(e, ut(D, e));
|
|
1210
1210
|
} else {
|
|
1211
|
-
if (!z[
|
|
1212
|
-
return
|
|
1213
|
-
D = $r(e,
|
|
1211
|
+
if (!z[R])
|
|
1212
|
+
return w ? e : {};
|
|
1213
|
+
D = $r(e, R, se, a);
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
|
-
C || (C = new
|
|
1217
|
-
var
|
|
1218
|
-
if (
|
|
1219
|
-
return
|
|
1216
|
+
C || (C = new q());
|
|
1217
|
+
var J = C.get(e);
|
|
1218
|
+
if (J)
|
|
1219
|
+
return J;
|
|
1220
1220
|
if (C.set(e, D), !U)
|
|
1221
1221
|
var L = o ? Wr(e) : fe(e);
|
|
1222
|
-
return Te(L || e, function(
|
|
1223
|
-
L && (B =
|
|
1222
|
+
return Te(L || e, function(V, B) {
|
|
1223
|
+
L && (B = V, V = e[B]), Fe(D, B, se(V, a, o, u, B, e, C));
|
|
1224
1224
|
}), D;
|
|
1225
1225
|
}
|
|
1226
1226
|
function Cr(e) {
|
|
1227
|
-
return
|
|
1227
|
+
return ft(e) ? Pe(e) : {};
|
|
1228
1228
|
}
|
|
1229
1229
|
function jr(e, a, o) {
|
|
1230
1230
|
var u = a(e);
|
|
@@ -1234,17 +1234,17 @@ Je.exports;
|
|
|
1234
1234
|
return Rt.call(e);
|
|
1235
1235
|
}
|
|
1236
1236
|
function Fr(e) {
|
|
1237
|
-
if (!
|
|
1237
|
+
if (!ft(e) || Vr(e))
|
|
1238
1238
|
return !1;
|
|
1239
1239
|
var a = le(e) || Xt(e) ? dr : sr;
|
|
1240
|
-
return a.test(
|
|
1240
|
+
return a.test(X(e));
|
|
1241
1241
|
}
|
|
1242
1242
|
function zr(e) {
|
|
1243
1243
|
if (!He(e))
|
|
1244
1244
|
return Ce(e);
|
|
1245
1245
|
var a = [];
|
|
1246
1246
|
for (var o in Object(e))
|
|
1247
|
-
|
|
1247
|
+
ct.call(e, o) && o != "constructor" && a.push(o);
|
|
1248
1248
|
return a;
|
|
1249
1249
|
}
|
|
1250
1250
|
function Gt(e, a) {
|
|
@@ -1257,12 +1257,12 @@ Je.exports;
|
|
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
|
1258
1258
|
return new Zt(a).set(new Zt(e)), a;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function kt(e, a) {
|
|
1261
1261
|
var o = a ? oe(e.buffer) : e.buffer;
|
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
|
1263
1263
|
}
|
|
1264
1264
|
function ze(e, a, o) {
|
|
1265
|
-
var u = a ? o(
|
|
1265
|
+
var u = a ? o(Ae(e), !0) : Ae(e);
|
|
1266
1266
|
return Yt(u, lr, new e.constructor());
|
|
1267
1267
|
}
|
|
1268
1268
|
function Ne(e) {
|
|
@@ -1271,7 +1271,7 @@ Je.exports;
|
|
|
1271
1271
|
}
|
|
1272
1272
|
function Nr(e, a, o) {
|
|
1273
1273
|
var u = a ? o(Oe(e), !0) : Oe(e);
|
|
1274
|
-
return Yt(u,
|
|
1274
|
+
return Yt(u, at, new e.constructor());
|
|
1275
1275
|
}
|
|
1276
1276
|
function Hr(e) {
|
|
1277
1277
|
return je ? Object(je.call(e)) : {};
|
|
@@ -1288,81 +1288,81 @@ Je.exports;
|
|
|
1288
1288
|
}
|
|
1289
1289
|
function ce(e, a, o, u) {
|
|
1290
1290
|
o || (o = {});
|
|
1291
|
-
for (var O = -1,
|
|
1291
|
+
for (var O = -1, w = a.length; ++O < w; ) {
|
|
1292
1292
|
var C = a[O], D = void 0;
|
|
1293
1293
|
Fe(o, C, D === void 0 ? e[C] : D);
|
|
1294
1294
|
}
|
|
1295
1295
|
return o;
|
|
1296
1296
|
}
|
|
1297
1297
|
function Gr(e, a) {
|
|
1298
|
-
return ce(e,
|
|
1298
|
+
return ce(e, dt(e), a);
|
|
1299
1299
|
}
|
|
1300
1300
|
function Wr(e) {
|
|
1301
|
-
return jr(e, fe,
|
|
1301
|
+
return jr(e, fe, dt);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function Et(e, a) {
|
|
1304
1304
|
var o = e.__data__;
|
|
1305
1305
|
return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
var o =
|
|
1307
|
+
function ot(e, a) {
|
|
1308
|
+
var o = Ee(e, a);
|
|
1309
1309
|
return Fr(o) ? o : void 0;
|
|
1310
1310
|
}
|
|
1311
|
-
var
|
|
1312
|
-
(Nt &&
|
|
1313
|
-
var a = Rt.call(e), o = a == h ? e.constructor : void 0, u = o ?
|
|
1311
|
+
var dt = Qt ? qt(Qt, Object) : qr, ht = Rr;
|
|
1312
|
+
(Nt && ht(new Nt(new ArrayBuffer(1))) != E || St && ht(new St()) != b || st && ht(st.resolve()) != l || Ht && ht(new Ht()) != v || te && ht(new te()) != m) && (ht = function(e) {
|
|
1313
|
+
var a = Rt.call(e), o = a == h ? e.constructor : void 0, u = o ? X(o) : void 0;
|
|
1314
1314
|
if (u)
|
|
1315
1315
|
switch (u) {
|
|
1316
1316
|
case ee:
|
|
1317
1317
|
return E;
|
|
1318
|
-
case
|
|
1319
|
-
return
|
|
1318
|
+
case Tt:
|
|
1319
|
+
return b;
|
|
1320
1320
|
case re:
|
|
1321
1321
|
return l;
|
|
1322
1322
|
case ne:
|
|
1323
1323
|
return v;
|
|
1324
1324
|
case ie:
|
|
1325
|
-
return
|
|
1325
|
+
return m;
|
|
1326
1326
|
}
|
|
1327
1327
|
return a;
|
|
1328
1328
|
});
|
|
1329
1329
|
function Br(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" && ct.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return typeof e.constructor == "function" && !He(e) ? Cr(
|
|
1333
|
+
function lt(e) {
|
|
1334
|
+
return typeof e.constructor == "function" && !He(e) ? Cr(et(e)) : {};
|
|
1335
1335
|
}
|
|
1336
1336
|
function $r(e, a, o, u) {
|
|
1337
1337
|
var O = e.constructor;
|
|
1338
1338
|
switch (a) {
|
|
1339
|
-
case
|
|
1339
|
+
case j:
|
|
1340
1340
|
return oe(e);
|
|
1341
1341
|
case d:
|
|
1342
|
-
case
|
|
1342
|
+
case x:
|
|
1343
1343
|
return new O(+e);
|
|
1344
1344
|
case E:
|
|
1345
|
-
return
|
|
1346
|
-
case
|
|
1347
|
-
case x:
|
|
1348
|
-
case S:
|
|
1349
|
-
case w:
|
|
1345
|
+
return kt(e, u);
|
|
1346
|
+
case I:
|
|
1350
1347
|
case P:
|
|
1351
|
-
case
|
|
1352
|
-
case
|
|
1353
|
-
case
|
|
1348
|
+
case S:
|
|
1349
|
+
case T:
|
|
1350
|
+
case A:
|
|
1351
|
+
case M:
|
|
1352
|
+
case $:
|
|
1353
|
+
case bt:
|
|
1354
1354
|
case Ie:
|
|
1355
1355
|
return Ur(e, u);
|
|
1356
|
-
case
|
|
1356
|
+
case b:
|
|
1357
1357
|
return ze(e, u, o);
|
|
1358
1358
|
case p:
|
|
1359
|
-
case
|
|
1359
|
+
case _:
|
|
1360
1360
|
return new O(e);
|
|
1361
|
-
case
|
|
1361
|
+
case g:
|
|
1362
1362
|
return Ne(e);
|
|
1363
1363
|
case v:
|
|
1364
1364
|
return Nr(e, u, o);
|
|
1365
|
-
case
|
|
1365
|
+
case y:
|
|
1366
1366
|
return Hr(e);
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
@@ -1380,7 +1380,7 @@ Je.exports;
|
|
|
1380
1380
|
var a = e && e.constructor, o = typeof a == "function" && a.prototype || jt;
|
|
1381
1381
|
return e === o;
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function X(e) {
|
|
1384
1384
|
if (e != null) {
|
|
1385
1385
|
try {
|
|
1386
1386
|
return Me.call(e);
|
|
@@ -1400,7 +1400,7 @@ Je.exports;
|
|
|
1400
1400
|
return e === a || e !== e && a !== a;
|
|
1401
1401
|
}
|
|
1402
1402
|
function Wt(e) {
|
|
1403
|
-
return Xr(e) &&
|
|
1403
|
+
return Xr(e) && ct.call(e, "callee") && (!De.call(e, "callee") || Rt.call(e) == c);
|
|
1404
1404
|
}
|
|
1405
1405
|
var ue = Array.isArray;
|
|
1406
1406
|
function Bt(e) {
|
|
@@ -1411,13 +1411,13 @@ Je.exports;
|
|
|
1411
1411
|
}
|
|
1412
1412
|
var Ge = zt || Jr;
|
|
1413
1413
|
function le(e) {
|
|
1414
|
-
var a =
|
|
1414
|
+
var a = ft(e) ? Rt.call(e) : "";
|
|
1415
1415
|
return a == k || a == H;
|
|
1416
1416
|
}
|
|
1417
1417
|
function We(e) {
|
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function ft(e) {
|
|
1421
1421
|
var a = typeof e;
|
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
|
1423
1423
|
}
|
|
@@ -1435,8 +1435,8 @@ Je.exports;
|
|
|
1435
1435
|
}
|
|
1436
1436
|
t.exports = Ue;
|
|
1437
1437
|
})(Je, Je.exports);
|
|
1438
|
-
var
|
|
1439
|
-
const
|
|
1438
|
+
var $i = Je.exports;
|
|
1439
|
+
const Z = /* @__PURE__ */ bn($i), Ki = (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;
|
|
@@ -1444,7 +1444,7 @@ const J = /* @__PURE__ */ bn(Bi), $i = (t) => new Promise((r, n) => {
|
|
|
1444
1444
|
}, i.onerror = (s) => {
|
|
1445
1445
|
n(s);
|
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
|
1447
|
-
}),
|
|
1447
|
+
}), Yi = (t) => new Promise((r, n) => {
|
|
1448
1448
|
const i = new Audio();
|
|
1449
1449
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
|
1450
1450
|
const s = i.duration * 1e3;
|
|
@@ -1452,7 +1452,7 @@ const J = /* @__PURE__ */ bn(Bi), $i = (t) => new Promise((r, n) => {
|
|
|
1452
1452
|
}), i.addEventListener("error", (s) => {
|
|
1453
1453
|
n(s);
|
|
1454
1454
|
}), i.src = t, i.crossOrigin = "anonymous", i.load();
|
|
1455
|
-
}),
|
|
1455
|
+
}), Vi = (t) => new Promise((r, n) => {
|
|
1456
1456
|
const i = document.createElement("video");
|
|
1457
1457
|
i.preload = "auto", i.addEventListener("loadedmetadata", () => {
|
|
1458
1458
|
const s = i.duration * 1e3, c = i.videoWidth, f = i.videoHeight;
|
|
@@ -1531,7 +1531,7 @@ function rr(t, r) {
|
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
1533
|
const Pn = async (t, r) => {
|
|
1534
|
-
const n = t.details.src, i = await
|
|
1534
|
+
const n = t.details.src, i = await Vi(n), s = rr(r, {
|
|
1535
1535
|
...i
|
|
1536
1536
|
}), c = ei(t.trim, { duration: i.duration }), f = {
|
|
1537
1537
|
width: i.width,
|
|
@@ -1570,7 +1570,7 @@ const Pn = async (t, r) => {
|
|
|
1570
1570
|
display: ge(t.display, { duration: i.duration, trim: c })
|
|
1571
1571
|
};
|
|
1572
1572
|
}, Dn = async (t) => {
|
|
1573
|
-
const r = t.id, n = t.details, s = (await
|
|
1573
|
+
const r = t.id, n = t.details, s = (await Yi(n.src)).duration, c = ei(t.trim, { duration: s });
|
|
1574
1574
|
return {
|
|
1575
1575
|
id: r,
|
|
1576
1576
|
name: "",
|
|
@@ -1587,7 +1587,7 @@ const Pn = async (t, r) => {
|
|
|
1587
1587
|
metadata: { ...t.metadata }
|
|
1588
1588
|
};
|
|
1589
1589
|
}, Cn = async (t, r) => {
|
|
1590
|
-
const n = t.details, i = await
|
|
1590
|
+
const n = t.details, i = await Ki(n.src), s = rr(r, i);
|
|
1591
1591
|
return {
|
|
1592
1592
|
id: t.id,
|
|
1593
1593
|
type: "image",
|
|
@@ -1731,15 +1731,16 @@ const Pn = async (t, r) => {
|
|
|
1731
1731
|
WebkitTextStrokeWidth: t.WebkitTextStrokeWidth || "0px",
|
|
1732
1732
|
top: t.top || "0px",
|
|
1733
1733
|
left: t.left || "0px",
|
|
1734
|
-
textTransform: t.textTransform || "none"
|
|
1735
|
-
|
|
1734
|
+
textTransform: t.textTransform || "none",
|
|
1735
|
+
transform: t.transform || "none"
|
|
1736
|
+
}), Xi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
1736
1737
|
let ln = (t = 21) => {
|
|
1737
1738
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
|
1738
1739
|
for (; t--; )
|
|
1739
|
-
r +=
|
|
1740
|
+
r += Xi[n[t] & 63];
|
|
1740
1741
|
return r;
|
|
1741
1742
|
};
|
|
1742
|
-
function
|
|
1743
|
+
function qi(t, r) {
|
|
1743
1744
|
return t.filter((i) => ({
|
|
1744
1745
|
...i,
|
|
1745
1746
|
items: i.items.filter((s) => !r.includes(s))
|
|
@@ -1754,7 +1755,7 @@ const Ve = (t) => Object.keys(t).reduce((r, n) => {
|
|
|
1754
1755
|
const { display: i, playbackRate: s } = t[n];
|
|
1755
1756
|
return Math.max(r, i.to / (s || 1));
|
|
1756
1757
|
}, 0);
|
|
1757
|
-
function
|
|
1758
|
+
function Ji(t) {
|
|
1758
1759
|
const r = $t.pipe(
|
|
1759
1760
|
Kt(({ key: p }) => p.startsWith(di))
|
|
1760
1761
|
), n = $t.pipe(
|
|
@@ -1768,192 +1769,187 @@ function qi(t) {
|
|
|
1768
1769
|
), f = $t.pipe(
|
|
1769
1770
|
Kt(({ key: p }) => p.startsWith(gi))
|
|
1770
1771
|
), d = r.subscribe(async (p) => {
|
|
1771
|
-
var h;
|
|
1772
|
+
var h, l;
|
|
1772
1773
|
if (p.key === _i) {
|
|
1773
|
-
const
|
|
1774
|
+
const g = Z(t.getState()), v = (h = p.value) == null ? void 0 : h.payload, _ = v.trackItemIds, y = v.trackItemsMap, m = v.trackItemDetailsMap;
|
|
1774
1775
|
console.warn("IMPROVE FONTS LOADING");
|
|
1775
|
-
const
|
|
1776
|
-
var
|
|
1776
|
+
const j = _.map(async (I) => {
|
|
1777
|
+
var P;
|
|
1777
1778
|
try {
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1780
|
-
const
|
|
1781
|
-
{ id:
|
|
1779
|
+
const S = m[I], T = y[I];
|
|
1780
|
+
if (S.type === "image") {
|
|
1781
|
+
const A = await Cn(
|
|
1782
|
+
{ id: I, details: S.details, ...T },
|
|
1782
1783
|
{
|
|
1783
|
-
size:
|
|
1784
|
-
width: 1080,
|
|
1785
|
-
height: 1920
|
|
1786
|
-
}
|
|
1784
|
+
size: g.size
|
|
1787
1785
|
}
|
|
1788
|
-
), { details:
|
|
1789
|
-
m[
|
|
1790
|
-
} else if (
|
|
1791
|
-
const
|
|
1792
|
-
(
|
|
1793
|
-
),
|
|
1794
|
-
{ ...
|
|
1786
|
+
), { details: M, ...$ } = A;
|
|
1787
|
+
m[I] = { type: "image", details: M }, y[I] = $;
|
|
1788
|
+
} else if (S.type === "video") {
|
|
1789
|
+
const A = Z(
|
|
1790
|
+
(P = p.value) == null ? void 0 : P.payload.trackItemsMap[I]
|
|
1791
|
+
), M = await Pn(
|
|
1792
|
+
{ ...S, ...A, ...T },
|
|
1795
1793
|
{
|
|
1796
1794
|
size: {
|
|
1797
1795
|
width: 1080,
|
|
1798
1796
|
height: 1920
|
|
1799
1797
|
}
|
|
1800
1798
|
}
|
|
1801
|
-
), { details:
|
|
1802
|
-
m[
|
|
1803
|
-
} else if (
|
|
1804
|
-
const
|
|
1805
|
-
id:
|
|
1806
|
-
details:
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1799
|
+
), { details: $, ...bt } = M;
|
|
1800
|
+
m[I] = { type: "video", details: $ }, y[I] = bt;
|
|
1801
|
+
} else if (S.type === "audio") {
|
|
1802
|
+
const A = await Dn({
|
|
1803
|
+
id: I,
|
|
1804
|
+
details: S.details,
|
|
1805
|
+
...T
|
|
1806
|
+
}), { details: M, ...$ } = A;
|
|
1807
|
+
m[I] = { type: "audio", details: M }, y[I] = $;
|
|
1808
|
+
} else if (S.type === "caption") {
|
|
1809
|
+
const A = await jn(
|
|
1810
|
+
{ id: I, details: S.details, ...T },
|
|
1812
1811
|
{
|
|
1813
1812
|
size: {
|
|
1814
1813
|
width: 1080,
|
|
1815
1814
|
height: 1920
|
|
1816
1815
|
}
|
|
1817
1816
|
}
|
|
1818
|
-
), { details:
|
|
1819
|
-
m[
|
|
1820
|
-
} else if (
|
|
1821
|
-
const
|
|
1822
|
-
{ id:
|
|
1817
|
+
), { details: M, ...$ } = A;
|
|
1818
|
+
m[I] = { type: "caption", details: M }, y[I] = $;
|
|
1819
|
+
} else if (S.type === "text") {
|
|
1820
|
+
const A = await Rn(
|
|
1821
|
+
{ id: I, details: S.details, ...T },
|
|
1823
1822
|
{
|
|
1824
1823
|
size: {
|
|
1825
1824
|
width: 1080,
|
|
1826
1825
|
height: 1920
|
|
1827
1826
|
}
|
|
1828
1827
|
}
|
|
1829
|
-
), { details:
|
|
1830
|
-
m[
|
|
1828
|
+
), { details: M, ...$ } = A;
|
|
1829
|
+
m[I] = { type: "text", details: M }, y[I] = $;
|
|
1831
1830
|
}
|
|
1832
1831
|
return !0;
|
|
1833
1832
|
} catch {
|
|
1834
1833
|
return !1;
|
|
1835
1834
|
}
|
|
1836
1835
|
});
|
|
1837
|
-
await Promise.all(
|
|
1838
|
-
const
|
|
1836
|
+
await Promise.all(j);
|
|
1837
|
+
const E = Ve(y);
|
|
1838
|
+
t.updateState({
|
|
1839
|
+
...v,
|
|
1840
|
+
trackItemsMap: y,
|
|
1841
|
+
duration: E
|
|
1842
|
+
});
|
|
1843
|
+
}
|
|
1844
|
+
if (p.key === vi) {
|
|
1845
|
+
const g = (l = p.value) == null ? void 0 : l.payload;
|
|
1839
1846
|
t.updateState({
|
|
1840
|
-
|
|
1841
|
-
trackItemsMap: v,
|
|
1842
|
-
duration: _
|
|
1847
|
+
size: g
|
|
1843
1848
|
});
|
|
1844
1849
|
}
|
|
1845
|
-
}),
|
|
1846
|
-
if (p.key ===
|
|
1847
|
-
if (p.key ===
|
|
1848
|
-
}),
|
|
1849
|
-
var l,
|
|
1850
|
+
}), x = s.subscribe((p) => {
|
|
1851
|
+
if (p.key === Ii) return t.undo();
|
|
1852
|
+
if (p.key === Si) return t.redo();
|
|
1853
|
+
}), F = i.subscribe((p) => {
|
|
1854
|
+
var l, g, v;
|
|
1850
1855
|
const h = [];
|
|
1851
|
-
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((
|
|
1852
|
-
const
|
|
1853
|
-
(
|
|
1854
|
-
),
|
|
1856
|
+
if ((l = p.value) != null && l.payload.trackItemIds && (h.push((g = p.value) == null ? void 0 : g.payload.trackItemIds), t.updateState({ activeIds: h })), p.key === wi) {
|
|
1857
|
+
const _ = (v = p.value) == null ? void 0 : v.payload.trackItemIds, y = Z(t.getState()), m = _ && _.length ? _ : y.activeIds, j = y.trackItemIds, E = y.trackItemDetailsMap, I = j.filter(
|
|
1858
|
+
(M) => !m.includes(M)
|
|
1859
|
+
), P = Object.fromEntries(
|
|
1855
1860
|
Object.entries(E).filter(
|
|
1856
|
-
([
|
|
1861
|
+
([M]) => !m.includes(M)
|
|
1857
1862
|
)
|
|
1858
|
-
), S =
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
),
|
|
1862
|
-
Object.entries(
|
|
1863
|
-
([
|
|
1863
|
+
), S = qi(
|
|
1864
|
+
y.tracks,
|
|
1865
|
+
m
|
|
1866
|
+
), T = Object.fromEntries(
|
|
1867
|
+
Object.entries(y.trackItemsMap).filter(
|
|
1868
|
+
([M]) => !m.includes(M)
|
|
1864
1869
|
)
|
|
1865
|
-
),
|
|
1870
|
+
), A = Ve(y.trackItemsMap);
|
|
1866
1871
|
t.updateState(
|
|
1867
1872
|
{
|
|
1868
|
-
trackItemIds:
|
|
1869
|
-
trackItemDetailsMap:
|
|
1873
|
+
trackItemIds: I,
|
|
1874
|
+
trackItemDetailsMap: P,
|
|
1870
1875
|
activeIds: [],
|
|
1871
|
-
trackItemsMap:
|
|
1876
|
+
trackItemsMap: T,
|
|
1872
1877
|
tracks: S,
|
|
1873
|
-
duration:
|
|
1878
|
+
duration: A
|
|
1874
1879
|
},
|
|
1875
1880
|
{ updateHistory: !0, kind: "remove" }
|
|
1876
1881
|
);
|
|
1877
1882
|
}
|
|
1878
1883
|
}), k = n.subscribe(async (p) => {
|
|
1879
|
-
var
|
|
1880
|
-
const h =
|
|
1881
|
-
let l = [],
|
|
1882
|
-
if (p.key ===
|
|
1883
|
-
|
|
1884
|
-
const
|
|
1885
|
-
for (const
|
|
1886
|
-
const
|
|
1887
|
-
size:
|
|
1888
|
-
width: 1080,
|
|
1889
|
-
height: 1920
|
|
1890
|
-
}
|
|
1884
|
+
var _, y, m, j, E;
|
|
1885
|
+
const h = Z(t.getState());
|
|
1886
|
+
let l = [], g = "text";
|
|
1887
|
+
if (p.key === Ti) {
|
|
1888
|
+
g = "caption";
|
|
1889
|
+
const I = (_ = p.value) == null ? void 0 : _.payload, P = [];
|
|
1890
|
+
for (const A of I) {
|
|
1891
|
+
const M = jn(A, {
|
|
1892
|
+
size: h.size
|
|
1891
1893
|
});
|
|
1892
|
-
|
|
1894
|
+
P.push(M);
|
|
1893
1895
|
}
|
|
1894
|
-
const S = await Promise.all(
|
|
1895
|
-
for (const
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1898
|
-
const { details:
|
|
1899
|
-
h.trackItemDetailsMap[
|
|
1900
|
-
type:
|
|
1901
|
-
details:
|
|
1902
|
-
}, h.trackItemsMap[
|
|
1896
|
+
const S = await Promise.all(P), T = [];
|
|
1897
|
+
for (const A of S) {
|
|
1898
|
+
const M = A.id;
|
|
1899
|
+
T.push(M);
|
|
1900
|
+
const { details: $, ...bt } = A;
|
|
1901
|
+
h.trackItemDetailsMap[M] = {
|
|
1902
|
+
type: g,
|
|
1903
|
+
details: $
|
|
1904
|
+
}, h.trackItemsMap[M] = bt, h.trackItemIds.push(M);
|
|
1903
1905
|
}
|
|
1904
|
-
l =
|
|
1906
|
+
l = T;
|
|
1905
1907
|
}
|
|
1906
|
-
if (p.key ===
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
size:
|
|
1910
|
-
|
|
1911
|
-
height: 1920
|
|
1912
|
-
}
|
|
1913
|
-
}), { details: x, ...S } = T;
|
|
1908
|
+
if (p.key === ki) {
|
|
1909
|
+
g = "text";
|
|
1910
|
+
const I = await Rn((y = p.value) == null ? void 0 : y.payload, {
|
|
1911
|
+
size: h.size
|
|
1912
|
+
}), { details: P, ...S } = I;
|
|
1914
1913
|
h.trackItemDetailsMap[S.id] = {
|
|
1915
|
-
type:
|
|
1916
|
-
details:
|
|
1914
|
+
type: g,
|
|
1915
|
+
details: P
|
|
1917
1916
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
|
1918
1917
|
}
|
|
1919
|
-
if (p.key ===
|
|
1920
|
-
|
|
1921
|
-
const
|
|
1918
|
+
if (p.key === Ei) {
|
|
1919
|
+
g = "image";
|
|
1920
|
+
const I = await Cn((m = p.value) == null ? void 0 : m.payload, {
|
|
1922
1921
|
size: {
|
|
1923
1922
|
width: 1080,
|
|
1924
1923
|
height: 1920
|
|
1925
1924
|
}
|
|
1926
|
-
}), { details:
|
|
1925
|
+
}), { details: P, ...S } = I;
|
|
1927
1926
|
h.trackItemDetailsMap[S.id] = {
|
|
1928
|
-
type:
|
|
1929
|
-
details:
|
|
1927
|
+
type: g,
|
|
1928
|
+
details: P
|
|
1930
1929
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
|
1931
1930
|
}
|
|
1932
1931
|
if (p.key === Ai) {
|
|
1933
|
-
|
|
1934
|
-
const
|
|
1932
|
+
g = "audio";
|
|
1933
|
+
const I = await Dn((j = p.value) == null ? void 0 : j.payload), { details: P, ...S } = I;
|
|
1935
1934
|
h.trackItemDetailsMap[S.id] = {
|
|
1936
|
-
type:
|
|
1937
|
-
details:
|
|
1935
|
+
type: g,
|
|
1936
|
+
details: P
|
|
1938
1937
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
|
1939
1938
|
}
|
|
1940
|
-
if (p.key ===
|
|
1941
|
-
|
|
1942
|
-
const
|
|
1943
|
-
size:
|
|
1944
|
-
|
|
1945
|
-
height: 1920
|
|
1946
|
-
}
|
|
1947
|
-
}), { details: x, ...S } = T;
|
|
1939
|
+
if (p.key === Oi) {
|
|
1940
|
+
g = "video";
|
|
1941
|
+
const I = await Pn((E = p.value) == null ? void 0 : E.payload, {
|
|
1942
|
+
size: h.size
|
|
1943
|
+
}), { details: P, ...S } = I;
|
|
1948
1944
|
h.trackItemDetailsMap[S.id] = {
|
|
1949
|
-
type:
|
|
1950
|
-
details:
|
|
1945
|
+
type: g,
|
|
1946
|
+
details: P
|
|
1951
1947
|
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
|
1952
1948
|
}
|
|
1953
1949
|
h.tracks.unshift({
|
|
1954
1950
|
id: ln(),
|
|
1955
1951
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
|
1956
|
-
type:
|
|
1952
|
+
type: g,
|
|
1957
1953
|
items: l,
|
|
1958
1954
|
magnetic: !1,
|
|
1959
1955
|
static: !1
|
|
@@ -1974,26 +1970,26 @@ function qi(t) {
|
|
|
1974
1970
|
);
|
|
1975
1971
|
}), H = c.subscribe(async (p) => {
|
|
1976
1972
|
var h;
|
|
1977
|
-
if (p.key ===
|
|
1978
|
-
const l =
|
|
1973
|
+
if (p.key === xi) {
|
|
1974
|
+
const l = Z(t.getState()), g = (h = p.value) == null ? void 0 : h.options.time;
|
|
1979
1975
|
if (l.activeIds.length === 1) {
|
|
1980
|
-
const v = l.activeIds[0],
|
|
1981
|
-
if (
|
|
1976
|
+
const v = l.activeIds[0], _ = l.trackItemsMap[v];
|
|
1977
|
+
if (g >= _.display.to || g <= _.display.from)
|
|
1982
1978
|
return;
|
|
1983
|
-
const
|
|
1984
|
-
...
|
|
1985
|
-
id:
|
|
1979
|
+
const y = l.trackItemDetailsMap[v], m = Fn(), j = {
|
|
1980
|
+
..._,
|
|
1981
|
+
id: m,
|
|
1986
1982
|
display: {
|
|
1987
|
-
from:
|
|
1988
|
-
to:
|
|
1983
|
+
from: g,
|
|
1984
|
+
to: _.display.to
|
|
1989
1985
|
},
|
|
1990
1986
|
trim: {
|
|
1991
|
-
from:
|
|
1992
|
-
to:
|
|
1987
|
+
from: g,
|
|
1988
|
+
to: _.display.to
|
|
1993
1989
|
}
|
|
1994
1990
|
};
|
|
1995
|
-
l.trackItemsMap[v].display.to =
|
|
1996
|
-
E.items.includes(v) && E.items.push(
|
|
1991
|
+
l.trackItemsMap[v].display.to = g, l.trackItemsMap[m] = j, l.trackItemIds.push(m), l.trackItemDetailsMap[m] = y, l.tracks.forEach((E) => {
|
|
1992
|
+
E.items.includes(v) && E.items.push(m);
|
|
1997
1993
|
}), t.updateState(
|
|
1998
1994
|
{
|
|
1999
1995
|
trackItemDetailsMap: l.trackItemDetailsMap,
|
|
@@ -2009,54 +2005,54 @@ function qi(t) {
|
|
|
2009
2005
|
}
|
|
2010
2006
|
return;
|
|
2011
2007
|
}
|
|
2012
|
-
if (p.key ===
|
|
2013
|
-
const l =
|
|
2008
|
+
if (p.key === Mi) {
|
|
2009
|
+
const l = Z(t.getState());
|
|
2014
2010
|
if (l.activeIds.length) {
|
|
2015
|
-
const
|
|
2016
|
-
activeIds:
|
|
2011
|
+
const g = l.activeIds, v = [], _ = {
|
|
2012
|
+
activeIds: g,
|
|
2017
2013
|
trackItemDetailsMap: {},
|
|
2018
2014
|
trackItemsMap: {},
|
|
2019
2015
|
tracks: []
|
|
2020
2016
|
};
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
l.tracks.find((
|
|
2017
|
+
g.forEach((m) => {
|
|
2018
|
+
_.trackItemDetailsMap[m] = l.trackItemDetailsMap[m], _.trackItemsMap[m] = l.trackItemsMap[m], v.push(
|
|
2019
|
+
l.tracks.find((j) => j.items.includes(m))
|
|
2024
2020
|
);
|
|
2025
2021
|
});
|
|
2026
|
-
const
|
|
2027
|
-
v.filter((
|
|
2022
|
+
const y = /* @__PURE__ */ new Set();
|
|
2023
|
+
v.filter((m) => y.has(m.id) ? !1 : (y.add(m), !0)), _.tracks = Array.from(y.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(_));
|
|
2028
2024
|
}
|
|
2029
2025
|
}
|
|
2030
|
-
if (p.key ===
|
|
2026
|
+
if (p.key === Pi) {
|
|
2031
2027
|
const l = localStorage.getItem("DesignComboTemp");
|
|
2032
2028
|
if (!l) return;
|
|
2033
|
-
const
|
|
2034
|
-
const S =
|
|
2029
|
+
const g = Z(t.getState()), v = JSON.parse(l), _ = {}, y = v.trackItemsMap, m = v.trackItemDetailsMap, j = v.tracks, E = [], I = v.activeIds.map(async (P) => {
|
|
2030
|
+
const S = m[P];
|
|
2035
2031
|
(S.type === "caption" || S.type === "text") && S.details.fontUrl && await gn([
|
|
2036
2032
|
{
|
|
2037
2033
|
fontFamily: S.details.fontFamily,
|
|
2038
2034
|
url: S.details.fontUrl
|
|
2039
2035
|
}
|
|
2040
2036
|
]);
|
|
2041
|
-
const
|
|
2042
|
-
return
|
|
2043
|
-
...
|
|
2044
|
-
id:
|
|
2045
|
-
},
|
|
2037
|
+
const T = Fn();
|
|
2038
|
+
return _[P] = T, g.trackItemsMap[T] = {
|
|
2039
|
+
...y[P],
|
|
2040
|
+
id: T
|
|
2041
|
+
}, g.trackItemDetailsMap[T] = S, g.trackItemIds.push(T), !0;
|
|
2046
2042
|
});
|
|
2047
|
-
await Promise.all(
|
|
2048
|
-
const S =
|
|
2049
|
-
...
|
|
2043
|
+
await Promise.all(I), j.forEach((P) => {
|
|
2044
|
+
const S = P.items.map((A) => _[A]), T = {
|
|
2045
|
+
...P,
|
|
2050
2046
|
items: S,
|
|
2051
2047
|
id: ln()
|
|
2052
2048
|
};
|
|
2053
|
-
E.push(
|
|
2054
|
-
}),
|
|
2049
|
+
E.push(T);
|
|
2050
|
+
}), g.tracks = [...g.tracks, ...E], t.updateState(
|
|
2055
2051
|
{
|
|
2056
|
-
trackItemDetailsMap:
|
|
2057
|
-
tracks:
|
|
2058
|
-
trackItemIds:
|
|
2059
|
-
trackItemsMap:
|
|
2052
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
|
2053
|
+
tracks: g.tracks,
|
|
2054
|
+
trackItemIds: g.trackItemIds,
|
|
2055
|
+
trackItemsMap: g.trackItemsMap
|
|
2060
2056
|
},
|
|
2061
2057
|
{
|
|
2062
2058
|
updateHistory: !0,
|
|
@@ -2064,24 +2060,24 @@ function qi(t) {
|
|
|
2064
2060
|
}
|
|
2065
2061
|
);
|
|
2066
2062
|
}
|
|
2067
|
-
}),
|
|
2063
|
+
}), b = f.subscribe((p) => {
|
|
2068
2064
|
var h, l;
|
|
2069
|
-
if (p.key ===
|
|
2070
|
-
const
|
|
2071
|
-
if (!
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
|
|
2065
|
+
if (p.key === Di) {
|
|
2066
|
+
const g = Z(t.getState()), v = g.trackItemDetailsMap, _ = g.trackItemsMap, y = Object.keys((h = p.value) == null ? void 0 : h.payload);
|
|
2067
|
+
if (!y.length) return;
|
|
2068
|
+
const m = (l = p.value) == null ? void 0 : l.payload;
|
|
2069
|
+
y.forEach((E) => {
|
|
2070
|
+
m[E].details ? v[E].details = {
|
|
2075
2071
|
...v[E].details,
|
|
2076
|
-
...
|
|
2077
|
-
} :
|
|
2072
|
+
...m[E].details
|
|
2073
|
+
} : m[E].playbackRate && (_[E].playbackRate = m[E].playbackRate);
|
|
2078
2074
|
});
|
|
2079
|
-
const
|
|
2075
|
+
const j = Ve(_);
|
|
2080
2076
|
t.updateState(
|
|
2081
2077
|
{
|
|
2082
2078
|
trackItemDetailsMap: { ...v },
|
|
2083
|
-
trackItemsMap: { ...
|
|
2084
|
-
duration:
|
|
2079
|
+
trackItemsMap: { ..._ },
|
|
2080
|
+
duration: j
|
|
2085
2081
|
},
|
|
2086
2082
|
{
|
|
2087
2083
|
updateHistory: !0,
|
|
@@ -2092,47 +2088,47 @@ function qi(t) {
|
|
|
2092
2088
|
});
|
|
2093
2089
|
return {
|
|
2094
2090
|
unsubscribe: () => {
|
|
2095
|
-
k.unsubscribe(), H.unsubscribe(),
|
|
2091
|
+
k.unsubscribe(), H.unsubscribe(), b.unsubscribe(), x.unsubscribe(), F.unsubscribe(), d.unsubscribe();
|
|
2096
2092
|
}
|
|
2097
2093
|
};
|
|
2098
2094
|
}
|
|
2099
|
-
const
|
|
2095
|
+
const Zi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
|
2100
2096
|
function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2101
|
-
var d,
|
|
2097
|
+
var d, x;
|
|
2102
2098
|
let s = [];
|
|
2103
2099
|
const c = Array.isArray(t);
|
|
2104
|
-
for (const
|
|
2105
|
-
const k = t[
|
|
2106
|
-
if (!(
|
|
2100
|
+
for (const F in t) {
|
|
2101
|
+
const k = t[F], H = c ? +F : F;
|
|
2102
|
+
if (!(F in r)) {
|
|
2107
2103
|
s.push({
|
|
2108
2104
|
type: "REMOVE",
|
|
2109
2105
|
path: [H],
|
|
2110
|
-
oldValue: t[
|
|
2106
|
+
oldValue: t[F]
|
|
2111
2107
|
});
|
|
2112
2108
|
continue;
|
|
2113
2109
|
}
|
|
2114
|
-
const
|
|
2115
|
-
if (k &&
|
|
2116
|
-
const h = ni(k,
|
|
2110
|
+
const b = r[F], p = typeof k == "object" && typeof b == "object" && Array.isArray(k) === Array.isArray(b);
|
|
2111
|
+
if (k && b && p && !Zi[(x = (d = Object.getPrototypeOf(k)) == null ? void 0 : d.constructor) == null ? void 0 : x.name] && (!n.cyclesFix || !i.includes(k))) {
|
|
2112
|
+
const h = ni(k, b, n, n.cyclesFix ? i.concat([k]) : []);
|
|
2117
2113
|
s.push.apply(s, h.map((l) => (l.path.unshift(H), l)));
|
|
2118
|
-
} else k !==
|
|
2119
|
-
!(Number.isNaN(k) && Number.isNaN(
|
|
2114
|
+
} else k !== b && // treat NaN values as equivalent
|
|
2115
|
+
!(Number.isNaN(k) && Number.isNaN(b)) && !(p && (isNaN(k) ? k + "" == b + "" : +k == +b)) && s.push({
|
|
2120
2116
|
path: [H],
|
|
2121
2117
|
type: "CHANGE",
|
|
2122
|
-
value:
|
|
2118
|
+
value: b,
|
|
2123
2119
|
oldValue: k
|
|
2124
2120
|
});
|
|
2125
2121
|
}
|
|
2126
2122
|
const f = Array.isArray(r);
|
|
2127
|
-
for (const
|
|
2128
|
-
|
|
2123
|
+
for (const F in r)
|
|
2124
|
+
F in t || s.push({
|
|
2129
2125
|
type: "CREATE",
|
|
2130
|
-
path: [f ? +
|
|
2131
|
-
value: r[
|
|
2126
|
+
path: [f ? +F : F],
|
|
2127
|
+
value: r[F]
|
|
2132
2128
|
});
|
|
2133
2129
|
return s;
|
|
2134
2130
|
}
|
|
2135
|
-
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"),
|
|
2131
|
+
var _n = Symbol.for("immer-nothing"), pe = Symbol.for("immer-draftable"), Q = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
|
|
2136
2132
|
// All error codes, starting by 0:
|
|
2137
2133
|
function(t) {
|
|
2138
2134
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
|
@@ -2172,44 +2168,44 @@ function G(t, ...r) {
|
|
|
2172
2168
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
|
2173
2169
|
);
|
|
2174
2170
|
}
|
|
2175
|
-
var
|
|
2176
|
-
function
|
|
2177
|
-
return !!t && !!t[
|
|
2171
|
+
var Mt = Object.getPrototypeOf;
|
|
2172
|
+
function Pt(t) {
|
|
2173
|
+
return !!t && !!t[Q];
|
|
2178
2174
|
}
|
|
2179
|
-
function
|
|
2175
|
+
function vt(t) {
|
|
2180
2176
|
var r;
|
|
2181
2177
|
return t ? ai(t) || Array.isArray(t) || !!t[pe] || !!((r = t.constructor) != null && r[pe]) || _e(t) || ve(t) : !1;
|
|
2182
2178
|
}
|
|
2183
|
-
var
|
|
2179
|
+
var Qi = Object.prototype.constructor.toString();
|
|
2184
2180
|
function ai(t) {
|
|
2185
2181
|
if (!t || typeof t != "object")
|
|
2186
2182
|
return !1;
|
|
2187
|
-
const r =
|
|
2183
|
+
const r = Mt(t);
|
|
2188
2184
|
if (r === null)
|
|
2189
2185
|
return !0;
|
|
2190
2186
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
|
2191
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
|
2187
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === Qi;
|
|
2192
2188
|
}
|
|
2193
2189
|
function de(t, r) {
|
|
2194
|
-
|
|
2190
|
+
Dt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
|
2195
2191
|
r(n, t[n], t);
|
|
2196
2192
|
}) : t.forEach((n, i) => r(i, n, t));
|
|
2197
2193
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const r = t[
|
|
2194
|
+
function Dt(t) {
|
|
2195
|
+
const r = t[Q];
|
|
2200
2196
|
return r ? r.type_ : Array.isArray(t) ? 1 : _e(t) ? 2 : ve(t) ? 3 : 0;
|
|
2201
2197
|
}
|
|
2202
2198
|
function he(t, r) {
|
|
2203
|
-
return
|
|
2199
|
+
return Dt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
|
2204
2200
|
}
|
|
2205
2201
|
function tn(t, r) {
|
|
2206
|
-
return
|
|
2202
|
+
return Dt(t) === 2 ? t.get(r) : t[r];
|
|
2207
2203
|
}
|
|
2208
2204
|
function si(t, r, n) {
|
|
2209
|
-
const i =
|
|
2205
|
+
const i = Dt(t);
|
|
2210
2206
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
|
2211
2207
|
}
|
|
2212
|
-
function
|
|
2208
|
+
function ta(t, r) {
|
|
2213
2209
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
|
2214
2210
|
}
|
|
2215
2211
|
function _e(t) {
|
|
@@ -2218,7 +2214,7 @@ function _e(t) {
|
|
|
2218
2214
|
function ve(t) {
|
|
2219
2215
|
return t instanceof Set;
|
|
2220
2216
|
}
|
|
2221
|
-
function
|
|
2217
|
+
function xt(t) {
|
|
2222
2218
|
return t.copy_ || t.base_;
|
|
2223
2219
|
}
|
|
2224
2220
|
function fn(t, r) {
|
|
@@ -2231,7 +2227,7 @@ function fn(t, r) {
|
|
|
2231
2227
|
const n = ai(t);
|
|
2232
2228
|
if (r === !0 || r === "class_only" && !n) {
|
|
2233
2229
|
const i = Object.getOwnPropertyDescriptors(t);
|
|
2234
|
-
delete i[
|
|
2230
|
+
delete i[Q];
|
|
2235
2231
|
let s = Reflect.ownKeys(i);
|
|
2236
2232
|
for (let c = 0; c < s.length; c++) {
|
|
2237
2233
|
const f = s[c], d = i[f];
|
|
@@ -2243,9 +2239,9 @@ function fn(t, r) {
|
|
|
2243
2239
|
value: t[f]
|
|
2244
2240
|
});
|
|
2245
2241
|
}
|
|
2246
|
-
return Object.create(
|
|
2242
|
+
return Object.create(Mt(t), i);
|
|
2247
2243
|
} else {
|
|
2248
|
-
const i =
|
|
2244
|
+
const i = Mt(t);
|
|
2249
2245
|
if (i !== null && n)
|
|
2250
2246
|
return { ...t };
|
|
2251
2247
|
const s = Object.create(i);
|
|
@@ -2253,27 +2249,27 @@ function fn(t, r) {
|
|
|
2253
2249
|
}
|
|
2254
2250
|
}
|
|
2255
2251
|
function vn(t, r = !1) {
|
|
2256
|
-
return nr(t) ||
|
|
2252
|
+
return nr(t) || Pt(t) || !vt(t) || (Dt(t) > 1 && (t.set = t.add = t.clear = t.delete = ea), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => vn(i, !0))), t;
|
|
2257
2253
|
}
|
|
2258
|
-
function
|
|
2254
|
+
function ea() {
|
|
2259
2255
|
G(2);
|
|
2260
2256
|
}
|
|
2261
2257
|
function nr(t) {
|
|
2262
2258
|
return Object.isFrozen(t);
|
|
2263
2259
|
}
|
|
2264
2260
|
var pn = {};
|
|
2265
|
-
function
|
|
2261
|
+
function Ct(t) {
|
|
2266
2262
|
const r = pn[t];
|
|
2267
2263
|
return r || G(0, t), r;
|
|
2268
2264
|
}
|
|
2269
|
-
function
|
|
2265
|
+
function ra(t, r) {
|
|
2270
2266
|
pn[t] || (pn[t] = r);
|
|
2271
2267
|
}
|
|
2272
2268
|
var ye;
|
|
2273
2269
|
function oi() {
|
|
2274
2270
|
return ye;
|
|
2275
2271
|
}
|
|
2276
|
-
function
|
|
2272
|
+
function na(t, r) {
|
|
2277
2273
|
return {
|
|
2278
2274
|
drafts_: [],
|
|
2279
2275
|
parent_: t,
|
|
@@ -2285,26 +2281,26 @@ function ra(t, r) {
|
|
|
2285
2281
|
};
|
|
2286
2282
|
}
|
|
2287
2283
|
function zn(t, r) {
|
|
2288
|
-
r && (
|
|
2284
|
+
r && (Ct("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
|
2289
2285
|
}
|
|
2290
2286
|
function dn(t) {
|
|
2291
|
-
hn(t), t.drafts_.forEach(
|
|
2287
|
+
hn(t), t.drafts_.forEach(ia), t.drafts_ = null;
|
|
2292
2288
|
}
|
|
2293
2289
|
function hn(t) {
|
|
2294
2290
|
t === ye && (ye = t.parent_);
|
|
2295
2291
|
}
|
|
2296
2292
|
function Nn(t) {
|
|
2297
|
-
return ye =
|
|
2293
|
+
return ye = na(ye, t);
|
|
2298
2294
|
}
|
|
2299
|
-
function
|
|
2300
|
-
const r = t[
|
|
2295
|
+
function ia(t) {
|
|
2296
|
+
const r = t[Q];
|
|
2301
2297
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
|
2302
2298
|
}
|
|
2303
2299
|
function Hn(t, r) {
|
|
2304
2300
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
|
2305
2301
|
const n = r.drafts_[0];
|
|
2306
|
-
return t !== void 0 && t !== n ? (n[
|
|
2307
|
-
n[
|
|
2302
|
+
return t !== void 0 && t !== n ? (n[Q].modified_ && (dn(r), G(4)), vt(t) && (t = Ze(r, t), r.parent_ || Qe(r, t)), r.patches_ && Ct("Patches").generateReplacementPatches_(
|
|
2303
|
+
n[Q].base_,
|
|
2308
2304
|
t,
|
|
2309
2305
|
r.patches_,
|
|
2310
2306
|
r.inversePatches_
|
|
@@ -2313,7 +2309,7 @@ function Hn(t, r) {
|
|
|
2313
2309
|
function Ze(t, r, n) {
|
|
2314
2310
|
if (nr(r))
|
|
2315
2311
|
return r;
|
|
2316
|
-
const i = r[
|
|
2312
|
+
const i = r[Q];
|
|
2317
2313
|
if (!i)
|
|
2318
2314
|
return de(
|
|
2319
2315
|
r,
|
|
@@ -2329,8 +2325,8 @@ function Ze(t, r, n) {
|
|
|
2329
2325
|
let c = s, f = !1;
|
|
2330
2326
|
i.type_ === 3 && (c = new Set(s), s.clear(), f = !0), de(
|
|
2331
2327
|
c,
|
|
2332
|
-
(d,
|
|
2333
|
-
), Qe(t, s, !1), n && t.patches_ &&
|
|
2328
|
+
(d, x) => Un(t, i, s, d, x, n, f)
|
|
2329
|
+
), Qe(t, s, !1), n && t.patches_ && Ct("Patches").generatePatches_(
|
|
2334
2330
|
i,
|
|
2335
2331
|
n,
|
|
2336
2332
|
t.patches_,
|
|
@@ -2340,15 +2336,15 @@ function Ze(t, r, n) {
|
|
|
2340
2336
|
return i.copy_;
|
|
2341
2337
|
}
|
|
2342
2338
|
function Un(t, r, n, i, s, c, f) {
|
|
2343
|
-
if (process.env.NODE_ENV !== "production" && s === n && G(5),
|
|
2339
|
+
if (process.env.NODE_ENV !== "production" && s === n && G(5), Pt(s)) {
|
|
2344
2340
|
const d = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
2345
|
-
!he(r.assigned_, i) ? c.concat(i) : void 0,
|
|
2346
|
-
if (si(n, i,
|
|
2341
|
+
!he(r.assigned_, i) ? c.concat(i) : void 0, x = Ze(t, s, d);
|
|
2342
|
+
if (si(n, i, x), Pt(x))
|
|
2347
2343
|
t.canAutoFreeze_ = !1;
|
|
2348
2344
|
else
|
|
2349
2345
|
return;
|
|
2350
2346
|
} else f && n.add(s);
|
|
2351
|
-
if (
|
|
2347
|
+
if (vt(s) && !nr(s)) {
|
|
2352
2348
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
|
2353
2349
|
return;
|
|
2354
2350
|
Ze(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && Qe(t, s);
|
|
@@ -2357,7 +2353,7 @@ function Un(t, r, n, i, s, c, f) {
|
|
|
2357
2353
|
function Qe(t, r, n = !1) {
|
|
2358
2354
|
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && vn(r, n);
|
|
2359
2355
|
}
|
|
2360
|
-
function
|
|
2356
|
+
function aa(t, r) {
|
|
2361
2357
|
const n = Array.isArray(t), i = {
|
|
2362
2358
|
type_: n ? 1 : 0,
|
|
2363
2359
|
// Track which produce call this is associated with.
|
|
@@ -2388,29 +2384,29 @@ function ia(t, r) {
|
|
|
2388
2384
|
}
|
|
2389
2385
|
var In = {
|
|
2390
2386
|
get(t, r) {
|
|
2391
|
-
if (r ===
|
|
2387
|
+
if (r === Q)
|
|
2392
2388
|
return t;
|
|
2393
|
-
const n =
|
|
2389
|
+
const n = xt(t);
|
|
2394
2390
|
if (!he(n, r))
|
|
2395
|
-
return
|
|
2391
|
+
return sa(t, n, r);
|
|
2396
2392
|
const i = n[r];
|
|
2397
|
-
return t.finalized_ || !
|
|
2393
|
+
return t.finalized_ || !vt(i) ? i : i === en(t.base_, r) ? (rn(t), t.copy_[r] = mn(i, t)) : i;
|
|
2398
2394
|
},
|
|
2399
2395
|
has(t, r) {
|
|
2400
|
-
return r in
|
|
2396
|
+
return r in xt(t);
|
|
2401
2397
|
},
|
|
2402
2398
|
ownKeys(t) {
|
|
2403
|
-
return Reflect.ownKeys(
|
|
2399
|
+
return Reflect.ownKeys(xt(t));
|
|
2404
2400
|
},
|
|
2405
2401
|
set(t, r, n) {
|
|
2406
|
-
const i = ci(
|
|
2402
|
+
const i = ci(xt(t), r);
|
|
2407
2403
|
if (i != null && i.set)
|
|
2408
2404
|
return i.set.call(t.draft_, n), !0;
|
|
2409
2405
|
if (!t.modified_) {
|
|
2410
|
-
const s = en(
|
|
2406
|
+
const s = en(xt(t), r), c = s == null ? void 0 : s[Q];
|
|
2411
2407
|
if (c && c.base_ === n)
|
|
2412
2408
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
|
2413
|
-
if (
|
|
2409
|
+
if (ta(n, s) && (n !== void 0 || he(t.base_, r)))
|
|
2414
2410
|
return !0;
|
|
2415
2411
|
rn(t), yn(t);
|
|
2416
2412
|
}
|
|
@@ -2424,7 +2420,7 @@ var In = {
|
|
|
2424
2420
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
2425
2421
|
// the same guarantee in ES5 mode.
|
|
2426
2422
|
getOwnPropertyDescriptor(t, r) {
|
|
2427
|
-
const n =
|
|
2423
|
+
const n = xt(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
|
2428
2424
|
return i && {
|
|
2429
2425
|
writable: !0,
|
|
2430
2426
|
configurable: t.type_ !== 1 || r !== "length",
|
|
@@ -2436,7 +2432,7 @@ var In = {
|
|
|
2436
2432
|
G(11);
|
|
2437
2433
|
},
|
|
2438
2434
|
getPrototypeOf(t) {
|
|
2439
|
-
return
|
|
2435
|
+
return Mt(t.base_);
|
|
2440
2436
|
},
|
|
2441
2437
|
setPrototypeOf() {
|
|
2442
2438
|
G(12);
|
|
@@ -2454,10 +2450,10 @@ me.set = function(t, r, n) {
|
|
|
2454
2450
|
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && G(14), In.set.call(this, t[0], r, n, t[0]);
|
|
2455
2451
|
};
|
|
2456
2452
|
function en(t, r) {
|
|
2457
|
-
const n = t[
|
|
2458
|
-
return (n ?
|
|
2453
|
+
const n = t[Q];
|
|
2454
|
+
return (n ? xt(n) : t)[r];
|
|
2459
2455
|
}
|
|
2460
|
-
function
|
|
2456
|
+
function sa(t, r, n) {
|
|
2461
2457
|
var s;
|
|
2462
2458
|
const i = ci(r, n);
|
|
2463
2459
|
return i ? "value" in i ? i.value : (
|
|
@@ -2469,12 +2465,12 @@ function aa(t, r, n) {
|
|
|
2469
2465
|
function ci(t, r) {
|
|
2470
2466
|
if (!(r in t))
|
|
2471
2467
|
return;
|
|
2472
|
-
let n =
|
|
2468
|
+
let n = Mt(t);
|
|
2473
2469
|
for (; n; ) {
|
|
2474
2470
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
|
2475
2471
|
if (i)
|
|
2476
2472
|
return i;
|
|
2477
|
-
n =
|
|
2473
|
+
n = Mt(n);
|
|
2478
2474
|
}
|
|
2479
2475
|
}
|
|
2480
2476
|
function yn(t) {
|
|
@@ -2486,20 +2482,20 @@ function rn(t) {
|
|
|
2486
2482
|
t.scope_.immer_.useStrictShallowCopy_
|
|
2487
2483
|
));
|
|
2488
2484
|
}
|
|
2489
|
-
var
|
|
2485
|
+
var oa = class {
|
|
2490
2486
|
constructor(t) {
|
|
2491
2487
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
|
2492
2488
|
if (typeof r == "function" && typeof n != "function") {
|
|
2493
2489
|
const c = n;
|
|
2494
2490
|
n = r;
|
|
2495
2491
|
const f = this;
|
|
2496
|
-
return function(
|
|
2497
|
-
return f.produce(
|
|
2492
|
+
return function(x = c, ...F) {
|
|
2493
|
+
return f.produce(x, (k) => n.call(this, k, ...F));
|
|
2498
2494
|
};
|
|
2499
2495
|
}
|
|
2500
2496
|
typeof n != "function" && G(6), i !== void 0 && typeof i != "function" && G(7);
|
|
2501
2497
|
let s;
|
|
2502
|
-
if (
|
|
2498
|
+
if (vt(r)) {
|
|
2503
2499
|
const c = Nn(this), f = mn(r, void 0);
|
|
2504
2500
|
let d = !0;
|
|
2505
2501
|
try {
|
|
@@ -2511,14 +2507,14 @@ var sa = class {
|
|
|
2511
2507
|
} else if (!r || typeof r != "object") {
|
|
2512
2508
|
if (s = n(r), s === void 0 && (s = r), s === _n && (s = void 0), this.autoFreeze_ && vn(s, !0), i) {
|
|
2513
2509
|
const c = [], f = [];
|
|
2514
|
-
|
|
2510
|
+
Ct("Patches").generateReplacementPatches_(r, s, c, f), i(c, f);
|
|
2515
2511
|
}
|
|
2516
2512
|
return s;
|
|
2517
2513
|
} else
|
|
2518
2514
|
G(1, r);
|
|
2519
2515
|
}, this.produceWithPatches = (r, n) => {
|
|
2520
2516
|
if (typeof r == "function")
|
|
2521
|
-
return (f, ...d) => this.produceWithPatches(f, (
|
|
2517
|
+
return (f, ...d) => this.produceWithPatches(f, (x) => r(x, ...d));
|
|
2522
2518
|
let i, s;
|
|
2523
2519
|
return [this.produce(r, n, (f, d) => {
|
|
2524
2520
|
i = f, s = d;
|
|
@@ -2526,12 +2522,12 @@ var sa = class {
|
|
|
2526
2522
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
|
2527
2523
|
}
|
|
2528
2524
|
createDraft(t) {
|
|
2529
|
-
|
|
2525
|
+
vt(t) || G(8), Pt(t) && (t = ca(t));
|
|
2530
2526
|
const r = Nn(this), n = mn(t, void 0);
|
|
2531
|
-
return n[
|
|
2527
|
+
return n[Q].isManual_ = !0, hn(r), n;
|
|
2532
2528
|
}
|
|
2533
2529
|
finishDraft(t, r) {
|
|
2534
|
-
const n = t && t[
|
|
2530
|
+
const n = t && t[Q];
|
|
2535
2531
|
(!n || !n.isManual_) && G(9);
|
|
2536
2532
|
const { scope_: i } = n;
|
|
2537
2533
|
return zn(i, r), Hn(void 0, i);
|
|
@@ -2562,24 +2558,24 @@ var sa = class {
|
|
|
2562
2558
|
}
|
|
2563
2559
|
}
|
|
2564
2560
|
n > -1 && (r = r.slice(n + 1));
|
|
2565
|
-
const i =
|
|
2566
|
-
return
|
|
2561
|
+
const i = Ct("Patches").applyPatches_;
|
|
2562
|
+
return Pt(t) ? i(t, r) : this.produce(
|
|
2567
2563
|
t,
|
|
2568
2564
|
(s) => i(s, r)
|
|
2569
2565
|
);
|
|
2570
2566
|
}
|
|
2571
2567
|
};
|
|
2572
2568
|
function mn(t, r) {
|
|
2573
|
-
const n = _e(t) ?
|
|
2569
|
+
const n = _e(t) ? Ct("MapSet").proxyMap_(t, r) : ve(t) ? Ct("MapSet").proxySet_(t, r) : aa(t, r);
|
|
2574
2570
|
return (r ? r.scope_ : oi()).drafts_.push(n), n;
|
|
2575
2571
|
}
|
|
2576
|
-
function
|
|
2577
|
-
return
|
|
2572
|
+
function ca(t) {
|
|
2573
|
+
return Pt(t) || G(10, t), ui(t);
|
|
2578
2574
|
}
|
|
2579
2575
|
function ui(t) {
|
|
2580
|
-
if (!
|
|
2576
|
+
if (!vt(t) || nr(t))
|
|
2581
2577
|
return t;
|
|
2582
|
-
const r = t[
|
|
2578
|
+
const r = t[Q];
|
|
2583
2579
|
let n;
|
|
2584
2580
|
if (r) {
|
|
2585
2581
|
if (!r.modified_)
|
|
@@ -2594,117 +2590,117 @@ function ui(t) {
|
|
|
2594
2590
|
function Ln() {
|
|
2595
2591
|
process.env.NODE_ENV !== "production" && ii.push(
|
|
2596
2592
|
'Sets cannot have "replace" patches.',
|
|
2597
|
-
function(
|
|
2598
|
-
return "Unsupported patch operation: " +
|
|
2593
|
+
function(b) {
|
|
2594
|
+
return "Unsupported patch operation: " + b;
|
|
2599
2595
|
},
|
|
2600
|
-
function(
|
|
2601
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
|
2596
|
+
function(b) {
|
|
2597
|
+
return "Cannot apply patch, path doesn't resolve: " + b;
|
|
2602
2598
|
},
|
|
2603
2599
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
2604
2600
|
);
|
|
2605
2601
|
const r = "replace", n = "add", i = "remove";
|
|
2606
|
-
function s(
|
|
2607
|
-
switch (
|
|
2602
|
+
function s(b, p, h, l) {
|
|
2603
|
+
switch (b.type_) {
|
|
2608
2604
|
case 0:
|
|
2609
2605
|
case 2:
|
|
2610
2606
|
return f(
|
|
2611
|
-
|
|
2607
|
+
b,
|
|
2612
2608
|
p,
|
|
2613
2609
|
h,
|
|
2614
2610
|
l
|
|
2615
2611
|
);
|
|
2616
2612
|
case 1:
|
|
2617
|
-
return c(
|
|
2613
|
+
return c(b, p, h, l);
|
|
2618
2614
|
case 3:
|
|
2619
2615
|
return d(
|
|
2620
|
-
|
|
2616
|
+
b,
|
|
2621
2617
|
p,
|
|
2622
2618
|
h,
|
|
2623
2619
|
l
|
|
2624
2620
|
);
|
|
2625
2621
|
}
|
|
2626
2622
|
}
|
|
2627
|
-
function c(
|
|
2628
|
-
let { base_:
|
|
2629
|
-
|
|
2630
|
-
for (let
|
|
2631
|
-
if (v[
|
|
2632
|
-
const
|
|
2623
|
+
function c(b, p, h, l) {
|
|
2624
|
+
let { base_: g, assigned_: v } = b, _ = b.copy_;
|
|
2625
|
+
_.length < g.length && ([g, _] = [_, g], [h, l] = [l, h]);
|
|
2626
|
+
for (let y = 0; y < g.length; y++)
|
|
2627
|
+
if (v[y] && _[y] !== g[y]) {
|
|
2628
|
+
const m = p.concat([y]);
|
|
2633
2629
|
h.push({
|
|
2634
2630
|
op: r,
|
|
2635
|
-
path:
|
|
2631
|
+
path: m,
|
|
2636
2632
|
// Need to maybe clone it, as it can in fact be the original value
|
|
2637
2633
|
// due to the base/copy inversion at the start of this function
|
|
2638
|
-
value: H(
|
|
2634
|
+
value: H(_[y])
|
|
2639
2635
|
}), l.push({
|
|
2640
2636
|
op: r,
|
|
2641
|
-
path:
|
|
2642
|
-
value: H(
|
|
2637
|
+
path: m,
|
|
2638
|
+
value: H(g[y])
|
|
2643
2639
|
});
|
|
2644
2640
|
}
|
|
2645
|
-
for (let
|
|
2646
|
-
const
|
|
2641
|
+
for (let y = g.length; y < _.length; y++) {
|
|
2642
|
+
const m = p.concat([y]);
|
|
2647
2643
|
h.push({
|
|
2648
2644
|
op: n,
|
|
2649
|
-
path:
|
|
2645
|
+
path: m,
|
|
2650
2646
|
// Need to maybe clone it, as it can in fact be the original value
|
|
2651
2647
|
// due to the base/copy inversion at the start of this function
|
|
2652
|
-
value: H(
|
|
2648
|
+
value: H(_[y])
|
|
2653
2649
|
});
|
|
2654
2650
|
}
|
|
2655
|
-
for (let
|
|
2656
|
-
const
|
|
2651
|
+
for (let y = _.length - 1; g.length <= y; --y) {
|
|
2652
|
+
const m = p.concat([y]);
|
|
2657
2653
|
l.push({
|
|
2658
2654
|
op: i,
|
|
2659
|
-
path:
|
|
2655
|
+
path: m
|
|
2660
2656
|
});
|
|
2661
2657
|
}
|
|
2662
2658
|
}
|
|
2663
|
-
function f(
|
|
2664
|
-
const { base_:
|
|
2665
|
-
de(
|
|
2666
|
-
const
|
|
2667
|
-
if (
|
|
2659
|
+
function f(b, p, h, l) {
|
|
2660
|
+
const { base_: g, copy_: v } = b;
|
|
2661
|
+
de(b.assigned_, (_, y) => {
|
|
2662
|
+
const m = tn(g, _), j = tn(v, _), E = y ? he(g, _) ? r : n : i;
|
|
2663
|
+
if (m === j && E === r)
|
|
2668
2664
|
return;
|
|
2669
|
-
const
|
|
2670
|
-
h.push(E === i ? { op: E, path:
|
|
2671
|
-
E === n ? { op: i, path:
|
|
2665
|
+
const I = p.concat(_);
|
|
2666
|
+
h.push(E === i ? { op: E, path: I } : { op: E, path: I, value: j }), l.push(
|
|
2667
|
+
E === n ? { op: i, path: I } : E === i ? { op: n, path: I, value: H(m) } : { op: r, path: I, value: H(m) }
|
|
2672
2668
|
);
|
|
2673
2669
|
});
|
|
2674
2670
|
}
|
|
2675
|
-
function d(
|
|
2676
|
-
let { base_:
|
|
2677
|
-
|
|
2678
|
-
if (!v.has(
|
|
2679
|
-
const
|
|
2671
|
+
function d(b, p, h, l) {
|
|
2672
|
+
let { base_: g, copy_: v } = b, _ = 0;
|
|
2673
|
+
g.forEach((y) => {
|
|
2674
|
+
if (!v.has(y)) {
|
|
2675
|
+
const m = p.concat([_]);
|
|
2680
2676
|
h.push({
|
|
2681
2677
|
op: i,
|
|
2682
|
-
path:
|
|
2683
|
-
value:
|
|
2678
|
+
path: m,
|
|
2679
|
+
value: y
|
|
2684
2680
|
}), l.unshift({
|
|
2685
2681
|
op: n,
|
|
2686
|
-
path:
|
|
2687
|
-
value:
|
|
2682
|
+
path: m,
|
|
2683
|
+
value: y
|
|
2688
2684
|
});
|
|
2689
2685
|
}
|
|
2690
|
-
|
|
2691
|
-
}),
|
|
2692
|
-
if (!
|
|
2693
|
-
const
|
|
2686
|
+
_++;
|
|
2687
|
+
}), _ = 0, v.forEach((y) => {
|
|
2688
|
+
if (!g.has(y)) {
|
|
2689
|
+
const m = p.concat([_]);
|
|
2694
2690
|
h.push({
|
|
2695
2691
|
op: n,
|
|
2696
|
-
path:
|
|
2697
|
-
value:
|
|
2692
|
+
path: m,
|
|
2693
|
+
value: y
|
|
2698
2694
|
}), l.unshift({
|
|
2699
2695
|
op: i,
|
|
2700
|
-
path:
|
|
2701
|
-
value:
|
|
2696
|
+
path: m,
|
|
2697
|
+
value: y
|
|
2702
2698
|
});
|
|
2703
2699
|
}
|
|
2704
|
-
|
|
2700
|
+
_++;
|
|
2705
2701
|
});
|
|
2706
2702
|
}
|
|
2707
|
-
function
|
|
2703
|
+
function x(b, p, h, l) {
|
|
2708
2704
|
h.push({
|
|
2709
2705
|
op: r,
|
|
2710
2706
|
path: [],
|
|
@@ -2712,92 +2708,92 @@ function Ln() {
|
|
|
2712
2708
|
}), l.push({
|
|
2713
2709
|
op: r,
|
|
2714
2710
|
path: [],
|
|
2715
|
-
value:
|
|
2711
|
+
value: b
|
|
2716
2712
|
});
|
|
2717
2713
|
}
|
|
2718
|
-
function
|
|
2714
|
+
function F(b, p) {
|
|
2719
2715
|
return p.forEach((h) => {
|
|
2720
|
-
const { path: l, op:
|
|
2721
|
-
let v =
|
|
2722
|
-
for (let
|
|
2723
|
-
const E =
|
|
2724
|
-
let
|
|
2725
|
-
typeof
|
|
2716
|
+
const { path: l, op: g } = h;
|
|
2717
|
+
let v = b;
|
|
2718
|
+
for (let j = 0; j < l.length - 1; j++) {
|
|
2719
|
+
const E = Dt(v);
|
|
2720
|
+
let I = l[j];
|
|
2721
|
+
typeof I != "string" && typeof I != "number" && (I = "" + I), (E === 0 || E === 1) && (I === "__proto__" || I === "constructor") && G(19), typeof v == "function" && I === "prototype" && G(19), v = tn(v, I), typeof v != "object" && G(18, l.join("/"));
|
|
2726
2722
|
}
|
|
2727
|
-
const
|
|
2728
|
-
switch (
|
|
2723
|
+
const _ = Dt(v), y = k(h.value), m = l[l.length - 1];
|
|
2724
|
+
switch (g) {
|
|
2729
2725
|
case r:
|
|
2730
|
-
switch (
|
|
2726
|
+
switch (_) {
|
|
2731
2727
|
case 2:
|
|
2732
|
-
return v.set(
|
|
2728
|
+
return v.set(m, y);
|
|
2733
2729
|
case 3:
|
|
2734
2730
|
G(16);
|
|
2735
2731
|
default:
|
|
2736
|
-
return v[
|
|
2732
|
+
return v[m] = y;
|
|
2737
2733
|
}
|
|
2738
2734
|
case n:
|
|
2739
|
-
switch (
|
|
2735
|
+
switch (_) {
|
|
2740
2736
|
case 1:
|
|
2741
|
-
return
|
|
2737
|
+
return m === "-" ? v.push(y) : v.splice(m, 0, y);
|
|
2742
2738
|
case 2:
|
|
2743
|
-
return v.set(
|
|
2739
|
+
return v.set(m, y);
|
|
2744
2740
|
case 3:
|
|
2745
|
-
return v.add(
|
|
2741
|
+
return v.add(y);
|
|
2746
2742
|
default:
|
|
2747
|
-
return v[
|
|
2743
|
+
return v[m] = y;
|
|
2748
2744
|
}
|
|
2749
2745
|
case i:
|
|
2750
|
-
switch (
|
|
2746
|
+
switch (_) {
|
|
2751
2747
|
case 1:
|
|
2752
|
-
return v.splice(
|
|
2748
|
+
return v.splice(m, 1);
|
|
2753
2749
|
case 2:
|
|
2754
|
-
return v.delete(
|
|
2750
|
+
return v.delete(m);
|
|
2755
2751
|
case 3:
|
|
2756
2752
|
return v.delete(h.value);
|
|
2757
2753
|
default:
|
|
2758
|
-
return delete v[
|
|
2754
|
+
return delete v[m];
|
|
2759
2755
|
}
|
|
2760
2756
|
default:
|
|
2761
|
-
G(17,
|
|
2757
|
+
G(17, g);
|
|
2762
2758
|
}
|
|
2763
|
-
}),
|
|
2764
|
-
}
|
|
2765
|
-
function k(
|
|
2766
|
-
if (!
|
|
2767
|
-
return
|
|
2768
|
-
if (Array.isArray(
|
|
2769
|
-
return
|
|
2770
|
-
if (_e(
|
|
2759
|
+
}), b;
|
|
2760
|
+
}
|
|
2761
|
+
function k(b) {
|
|
2762
|
+
if (!vt(b))
|
|
2763
|
+
return b;
|
|
2764
|
+
if (Array.isArray(b))
|
|
2765
|
+
return b.map(k);
|
|
2766
|
+
if (_e(b))
|
|
2771
2767
|
return new Map(
|
|
2772
|
-
Array.from(
|
|
2768
|
+
Array.from(b.entries()).map(([h, l]) => [h, k(l)])
|
|
2773
2769
|
);
|
|
2774
|
-
if (ve(
|
|
2775
|
-
return new Set(Array.from(
|
|
2776
|
-
const p = Object.create(
|
|
2777
|
-
for (const h in
|
|
2778
|
-
p[h] = k(
|
|
2779
|
-
return he(
|
|
2780
|
-
}
|
|
2781
|
-
function H(
|
|
2782
|
-
return
|
|
2783
|
-
}
|
|
2784
|
-
|
|
2785
|
-
applyPatches_:
|
|
2770
|
+
if (ve(b))
|
|
2771
|
+
return new Set(Array.from(b).map(k));
|
|
2772
|
+
const p = Object.create(Mt(b));
|
|
2773
|
+
for (const h in b)
|
|
2774
|
+
p[h] = k(b[h]);
|
|
2775
|
+
return he(b, pe) && (p[pe] = b[pe]), p;
|
|
2776
|
+
}
|
|
2777
|
+
function H(b) {
|
|
2778
|
+
return Pt(b) ? k(b) : b;
|
|
2779
|
+
}
|
|
2780
|
+
ra("Patches", {
|
|
2781
|
+
applyPatches_: F,
|
|
2786
2782
|
generatePatches_: s,
|
|
2787
|
-
generateReplacementPatches_:
|
|
2783
|
+
generateReplacementPatches_: x
|
|
2788
2784
|
});
|
|
2789
2785
|
}
|
|
2790
|
-
var
|
|
2791
|
-
|
|
2792
|
-
|
|
2786
|
+
var tt = new oa(), ua = tt.produce;
|
|
2787
|
+
tt.produceWithPatches.bind(
|
|
2788
|
+
tt
|
|
2793
2789
|
);
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
var
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
var
|
|
2800
|
-
function
|
|
2790
|
+
tt.setAutoFreeze.bind(tt);
|
|
2791
|
+
tt.setUseStrictShallowCopy.bind(tt);
|
|
2792
|
+
var la = tt.applyPatches.bind(tt);
|
|
2793
|
+
tt.createDraft.bind(tt);
|
|
2794
|
+
tt.finishDraft.bind(tt);
|
|
2795
|
+
var fa = 1 / 0, pa = 9007199254740991, da = "[object Arguments]", ha = "[object Function]", ya = "[object GeneratorFunction]", ma = "[object Symbol]", ba = typeof nt == "object" && nt && nt.Object === Object && nt, ga = typeof self == "object" && self && self.Object === Object && self, _a = ba || ga || Function("return this")();
|
|
2796
|
+
function va(t, r, n) {
|
|
2801
2797
|
switch (n.length) {
|
|
2802
2798
|
case 0:
|
|
2803
2799
|
return t.call(r);
|
|
@@ -2810,26 +2806,26 @@ function _a(t, r, n) {
|
|
|
2810
2806
|
}
|
|
2811
2807
|
return t.apply(r, n);
|
|
2812
2808
|
}
|
|
2813
|
-
function
|
|
2809
|
+
function Ia(t, r) {
|
|
2814
2810
|
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
|
2815
2811
|
s[n] = r(t[n], n, t);
|
|
2816
2812
|
return s;
|
|
2817
2813
|
}
|
|
2818
|
-
function
|
|
2814
|
+
function Sa(t, r) {
|
|
2819
2815
|
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
|
2820
2816
|
t[s + n] = r[n];
|
|
2821
2817
|
return t;
|
|
2822
2818
|
}
|
|
2823
|
-
var Sn = Object.prototype,
|
|
2824
|
-
function
|
|
2819
|
+
var Sn = Object.prototype, wa = Sn.hasOwnProperty, wn = Sn.toString, Gn = _a.Symbol, Ta = Sn.propertyIsEnumerable, Wn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
|
2820
|
+
function ka(t, r, n, i, s) {
|
|
2825
2821
|
var c = -1, f = t.length;
|
|
2826
|
-
for (n || (n =
|
|
2822
|
+
for (n || (n = xa), s || (s = []); ++c < f; ) {
|
|
2827
2823
|
var d = t[c];
|
|
2828
|
-
n(d) ?
|
|
2824
|
+
n(d) ? Sa(s, d) : s[s.length] = d;
|
|
2829
2825
|
}
|
|
2830
2826
|
return s;
|
|
2831
2827
|
}
|
|
2832
|
-
function
|
|
2828
|
+
function Ea(t, r) {
|
|
2833
2829
|
return t = Object(t), Aa(t, r, function(n, i) {
|
|
2834
2830
|
return i in t;
|
|
2835
2831
|
});
|
|
@@ -2841,56 +2837,60 @@ function Aa(t, r, n) {
|
|
|
2841
2837
|
}
|
|
2842
2838
|
return c;
|
|
2843
2839
|
}
|
|
2844
|
-
function
|
|
2840
|
+
function Oa(t, r) {
|
|
2845
2841
|
return r = Bn(r === void 0 ? t.length - 1 : r, 0), function() {
|
|
2846
2842
|
for (var n = arguments, i = -1, s = Bn(n.length - r, 0), c = Array(s); ++i < s; )
|
|
2847
2843
|
c[i] = n[r + i];
|
|
2848
2844
|
i = -1;
|
|
2849
2845
|
for (var f = Array(r + 1); ++i < r; )
|
|
2850
2846
|
f[i] = n[i];
|
|
2851
|
-
return f[r] = c,
|
|
2847
|
+
return f[r] = c, va(t, this, f);
|
|
2852
2848
|
};
|
|
2853
2849
|
}
|
|
2854
|
-
function Oa(t) {
|
|
2855
|
-
return Pa(t) || Ma(t) || !!(Wn && t && t[Wn]);
|
|
2856
|
-
}
|
|
2857
2850
|
function xa(t) {
|
|
2858
|
-
|
|
2859
|
-
return t;
|
|
2860
|
-
var r = t + "";
|
|
2861
|
-
return r == "0" && 1 / t == -la ? "-0" : r;
|
|
2851
|
+
return Da(t) || Pa(t) || !!(Wn && t && t[Wn]);
|
|
2862
2852
|
}
|
|
2863
2853
|
function Ma(t) {
|
|
2864
|
-
|
|
2854
|
+
if (typeof t == "string" || Na(t))
|
|
2855
|
+
return t;
|
|
2856
|
+
var r = t + "";
|
|
2857
|
+
return r == "0" && 1 / t == -fa ? "-0" : r;
|
|
2865
2858
|
}
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
return t != null && Ra(t.length) && !ja(t);
|
|
2859
|
+
function Pa(t) {
|
|
2860
|
+
return ja(t) && wa.call(t, "callee") && (!Ta.call(t, "callee") || wn.call(t) == da);
|
|
2869
2861
|
}
|
|
2862
|
+
var Da = Array.isArray;
|
|
2870
2863
|
function Ca(t) {
|
|
2871
|
-
return
|
|
2864
|
+
return t != null && Fa(t.length) && !Ra(t);
|
|
2872
2865
|
}
|
|
2873
2866
|
function ja(t) {
|
|
2874
|
-
|
|
2875
|
-
return r == da || r == ha;
|
|
2867
|
+
return li(t) && Ca(t);
|
|
2876
2868
|
}
|
|
2877
2869
|
function Ra(t) {
|
|
2878
|
-
|
|
2870
|
+
var r = za(t) ? wn.call(t) : "";
|
|
2871
|
+
return r == ha || r == ya;
|
|
2879
2872
|
}
|
|
2880
2873
|
function Fa(t) {
|
|
2874
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= pa;
|
|
2875
|
+
}
|
|
2876
|
+
function za(t) {
|
|
2881
2877
|
var r = typeof t;
|
|
2882
2878
|
return !!t && (r == "object" || r == "function");
|
|
2883
2879
|
}
|
|
2884
2880
|
function li(t) {
|
|
2885
2881
|
return !!t && typeof t == "object";
|
|
2886
2882
|
}
|
|
2887
|
-
function
|
|
2888
|
-
return typeof t == "symbol" || li(t) && wn.call(t) ==
|
|
2889
|
-
}
|
|
2890
|
-
var
|
|
2891
|
-
return t == null ? {} :
|
|
2892
|
-
}),
|
|
2893
|
-
const $n = /* @__PURE__ */ bn(
|
|
2883
|
+
function Na(t) {
|
|
2884
|
+
return typeof t == "symbol" || li(t) && wn.call(t) == ma;
|
|
2885
|
+
}
|
|
2886
|
+
var Ha = Oa(function(t, r) {
|
|
2887
|
+
return t == null ? {} : Ea(t, Ia(ka(r), Ma));
|
|
2888
|
+
}), Ua = Ha;
|
|
2889
|
+
const $n = /* @__PURE__ */ bn(Ua), La = {
|
|
2890
|
+
width: 1080,
|
|
2891
|
+
height: 1920
|
|
2892
|
+
}, Ga = {
|
|
2893
|
+
size: La,
|
|
2894
2894
|
tracks: [],
|
|
2895
2895
|
trackItemIds: [],
|
|
2896
2896
|
trackItemsMap: {},
|
|
@@ -2912,22 +2912,22 @@ const $n = /* @__PURE__ */ bn(Ha), Ua = {
|
|
|
2912
2912
|
"transitionsMap",
|
|
2913
2913
|
"trackItemIds"
|
|
2914
2914
|
];
|
|
2915
|
-
class
|
|
2915
|
+
class $a {
|
|
2916
2916
|
constructor(r) {
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
const n = r ||
|
|
2917
|
+
Ot(this, "stateSubject");
|
|
2918
|
+
Ot(this, "stateHistorySubject");
|
|
2919
|
+
Ot(this, "prevState");
|
|
2920
|
+
Ot(this, "undos", []);
|
|
2921
|
+
Ot(this, "redos", []);
|
|
2922
|
+
Ot(this, "listener");
|
|
2923
|
+
const n = r || Ga;
|
|
2924
2924
|
this.stateSubject = new Mn(n), this.stateHistorySubject = new Mn({
|
|
2925
2925
|
handleRedo: !1,
|
|
2926
2926
|
handleUndo: !1
|
|
2927
2927
|
}), this.prevState = n, this.initListeners();
|
|
2928
2928
|
}
|
|
2929
2929
|
initListeners() {
|
|
2930
|
-
|
|
2930
|
+
Ji(this);
|
|
2931
2931
|
}
|
|
2932
2932
|
destroyListeners() {
|
|
2933
2933
|
this.listener && this.listener.unsubscribe();
|
|
@@ -2959,22 +2959,28 @@ class Wa {
|
|
|
2959
2959
|
...i,
|
|
2960
2960
|
...r
|
|
2961
2961
|
};
|
|
2962
|
-
|
|
2962
|
+
rt(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
|
2963
|
+
}
|
|
2964
|
+
// emit changes for design size
|
|
2965
|
+
subscribeToSize(r) {
|
|
2966
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
2967
|
+
rt(n.size, this.prevState.size) || r({ size: n.size });
|
|
2968
|
+
});
|
|
2963
2969
|
}
|
|
2964
2970
|
// Selectively subscribe to scale changes
|
|
2965
2971
|
subscribeToScale(r) {
|
|
2966
2972
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
2967
|
-
|
|
2973
|
+
rt(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
|
2968
2974
|
});
|
|
2969
2975
|
}
|
|
2970
2976
|
subscribeToUpdateTrackItem(r) {
|
|
2971
2977
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
2972
|
-
|
|
2978
|
+
rt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
|
2973
2979
|
});
|
|
2974
2980
|
}
|
|
2975
2981
|
subscribeToUpdateItemDetails(r) {
|
|
2976
2982
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
2977
|
-
|
|
2983
|
+
rt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
|
2978
2984
|
});
|
|
2979
2985
|
}
|
|
2980
2986
|
// Selectively subscribe to duration changes
|
|
@@ -2997,19 +3003,19 @@ class Wa {
|
|
|
2997
3003
|
}
|
|
2998
3004
|
subscribeToAddOrRemoveItems(r) {
|
|
2999
3005
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3000
|
-
|
|
3006
|
+
rt(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
|
3001
3007
|
});
|
|
3002
3008
|
}
|
|
3003
3009
|
// Selectively subscribe to activeIds changes
|
|
3004
3010
|
subscribeToActiveIds(r) {
|
|
3005
3011
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3006
|
-
|
|
3012
|
+
rt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
|
3007
3013
|
});
|
|
3008
3014
|
}
|
|
3009
3015
|
// Selectively subscribe to multiple track-related properties
|
|
3010
3016
|
subscribeToTracks(r) {
|
|
3011
3017
|
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3012
|
-
(!
|
|
3018
|
+
(!rt(n.tracks, this.prevState.tracks) || !rt(n.trackItemIds, this.prevState.trackItemIds) || !rt(n.trackItemsMap, this.prevState.trackItemsMap) || !rt(n.transitionIds, this.prevState.transitionIds) || !rt(n.transitionsMap, this.prevState.transitionsMap)) && r({
|
|
3013
3019
|
tracks: n.tracks,
|
|
3014
3020
|
trackItemIds: n.trackItemIds,
|
|
3015
3021
|
trackItemsMap: n.trackItemsMap,
|
|
@@ -3028,64 +3034,64 @@ class Wa {
|
|
|
3028
3034
|
trackItemIds: c,
|
|
3029
3035
|
tracks: f,
|
|
3030
3036
|
transitionIds: d,
|
|
3031
|
-
transitionsMap:
|
|
3032
|
-
trackItemsMap:
|
|
3033
|
-
} = this.getState(), k =
|
|
3037
|
+
transitionsMap: x,
|
|
3038
|
+
trackItemsMap: F
|
|
3039
|
+
} = this.getState(), k = Z({
|
|
3034
3040
|
trackItemDetailsMap: s,
|
|
3035
3041
|
trackItemIds: c,
|
|
3036
3042
|
tracks: f,
|
|
3037
3043
|
transitionIds: d,
|
|
3038
|
-
transitionsMap:
|
|
3039
|
-
trackItemsMap:
|
|
3040
|
-
}), H = [],
|
|
3041
|
-
n.forEach((
|
|
3042
|
-
let
|
|
3043
|
-
const
|
|
3044
|
-
|
|
3045
|
-
path:
|
|
3044
|
+
transitionsMap: x,
|
|
3045
|
+
trackItemsMap: F
|
|
3046
|
+
}), H = [], b = [], p = [], h = [], l = [], g = [];
|
|
3047
|
+
n.forEach((T) => {
|
|
3048
|
+
let A;
|
|
3049
|
+
const M = T.path.slice(1);
|
|
3050
|
+
T.type === "CREATE" ? A = {
|
|
3051
|
+
path: M,
|
|
3046
3052
|
op: "remove",
|
|
3047
|
-
value:
|
|
3048
|
-
} :
|
|
3049
|
-
path:
|
|
3053
|
+
value: T.value
|
|
3054
|
+
} : T.type === "CHANGE" ? A = {
|
|
3055
|
+
path: M,
|
|
3050
3056
|
op: "replace",
|
|
3051
|
-
value:
|
|
3052
|
-
} :
|
|
3053
|
-
path:
|
|
3057
|
+
value: T.oldValue
|
|
3058
|
+
} : A = {
|
|
3059
|
+
path: M,
|
|
3054
3060
|
op: "add",
|
|
3055
|
-
value:
|
|
3056
|
-
},
|
|
3061
|
+
value: T.oldValue
|
|
3062
|
+
}, T.path.includes("trackItemIds") ? p.push(A) : T.path.includes("transitionIds") ? b.push(A) : T.path.includes("trackItemsMap") ? l.push(A) : T.path.includes("transitionsMap") ? h.push(A) : T.path.includes("tracks") ? H.push(A) : T.path.includes("trackItemDetailsMap") && g.push(A);
|
|
3057
3063
|
});
|
|
3058
3064
|
const v = this.applyPatch(
|
|
3059
3065
|
k.tracks,
|
|
3060
3066
|
H
|
|
3061
|
-
),
|
|
3067
|
+
), _ = this.applyPatch(
|
|
3062
3068
|
k.transitionIds,
|
|
3063
|
-
|
|
3064
|
-
),
|
|
3069
|
+
b
|
|
3070
|
+
), y = this.applyPatch(
|
|
3065
3071
|
k.trackItemIds,
|
|
3066
3072
|
p
|
|
3067
|
-
),
|
|
3073
|
+
), m = this.applyPatch(
|
|
3068
3074
|
k.transitionsMap,
|
|
3069
3075
|
h
|
|
3070
|
-
),
|
|
3076
|
+
), j = this.applyPatch(
|
|
3071
3077
|
k.trackItemsMap,
|
|
3072
3078
|
l
|
|
3073
3079
|
), E = this.applyPatch(
|
|
3074
3080
|
k.trackItemDetailsMap,
|
|
3075
|
-
|
|
3076
|
-
),
|
|
3081
|
+
g
|
|
3082
|
+
), I = Z({
|
|
3077
3083
|
tracks: v,
|
|
3078
|
-
transitionIds:
|
|
3079
|
-
trackItemIds:
|
|
3080
|
-
transitionsMap:
|
|
3081
|
-
trackItemsMap:
|
|
3084
|
+
transitionIds: _,
|
|
3085
|
+
trackItemIds: y,
|
|
3086
|
+
transitionsMap: m,
|
|
3087
|
+
trackItemsMap: j,
|
|
3082
3088
|
trackItemDetailsMap: E
|
|
3083
|
-
}),
|
|
3084
|
-
this.prevState =
|
|
3089
|
+
}), P = Z(this.getState()), S = { ...P, ...I };
|
|
3090
|
+
this.prevState = P, this.redos.push({ redos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
|
3085
3091
|
}
|
|
3086
3092
|
applyPatch(r, n) {
|
|
3087
|
-
return n.reverse().reduce((i, s) =>
|
|
3088
|
-
|
|
3093
|
+
return n.reverse().reduce((i, s) => ua(i, (c) => {
|
|
3094
|
+
la(c, [s]);
|
|
3089
3095
|
}), r);
|
|
3090
3096
|
}
|
|
3091
3097
|
redo() {
|
|
@@ -3097,62 +3103,62 @@ class Wa {
|
|
|
3097
3103
|
trackItemIds: c,
|
|
3098
3104
|
tracks: f,
|
|
3099
3105
|
transitionIds: d,
|
|
3100
|
-
transitionsMap:
|
|
3101
|
-
trackItemsMap:
|
|
3102
|
-
} = this.getState(), k =
|
|
3106
|
+
transitionsMap: x,
|
|
3107
|
+
trackItemsMap: F
|
|
3108
|
+
} = this.getState(), k = Z({
|
|
3103
3109
|
trackItemDetailsMap: s,
|
|
3104
3110
|
trackItemIds: c,
|
|
3105
3111
|
tracks: f,
|
|
3106
3112
|
transitionIds: d,
|
|
3107
|
-
transitionsMap:
|
|
3108
|
-
trackItemsMap:
|
|
3109
|
-
}), H = [],
|
|
3110
|
-
n.forEach((
|
|
3111
|
-
let
|
|
3112
|
-
const
|
|
3113
|
-
|
|
3114
|
-
path:
|
|
3113
|
+
transitionsMap: x,
|
|
3114
|
+
trackItemsMap: F
|
|
3115
|
+
}), H = [], b = [], p = [], h = [], l = [], g = [];
|
|
3116
|
+
n.forEach((T) => {
|
|
3117
|
+
let A;
|
|
3118
|
+
const M = T.path.slice(1);
|
|
3119
|
+
T.type === "CREATE" ? A = {
|
|
3120
|
+
path: M,
|
|
3115
3121
|
op: "add",
|
|
3116
|
-
value:
|
|
3117
|
-
} :
|
|
3118
|
-
path:
|
|
3122
|
+
value: T.value
|
|
3123
|
+
} : T.type === "CHANGE" ? A = {
|
|
3124
|
+
path: M,
|
|
3119
3125
|
op: "replace",
|
|
3120
|
-
value:
|
|
3121
|
-
} :
|
|
3122
|
-
path:
|
|
3126
|
+
value: T.value
|
|
3127
|
+
} : A = {
|
|
3128
|
+
path: M,
|
|
3123
3129
|
op: "remove",
|
|
3124
|
-
value:
|
|
3125
|
-
},
|
|
3130
|
+
value: T.oldValue
|
|
3131
|
+
}, T.path.includes("trackItemIds") ? p.push(A) : T.path.includes("transitionIds") ? b.push(A) : T.path.includes("trackItemsMap") ? l.push(A) : T.path.includes("transitionsMap") ? h.push(A) : T.path.includes("trackItemDetailsMap") ? g.push(A) : H.push(A);
|
|
3126
3132
|
});
|
|
3127
3133
|
const v = this.applyPatch(
|
|
3128
3134
|
k.tracks,
|
|
3129
3135
|
H
|
|
3130
|
-
),
|
|
3136
|
+
), _ = this.applyPatch(
|
|
3131
3137
|
k.transitionIds,
|
|
3132
|
-
|
|
3133
|
-
),
|
|
3138
|
+
b
|
|
3139
|
+
), y = this.applyPatch(
|
|
3134
3140
|
k.trackItemIds,
|
|
3135
3141
|
p
|
|
3136
|
-
),
|
|
3142
|
+
), m = this.applyPatch(
|
|
3137
3143
|
k.transitionsMap,
|
|
3138
3144
|
h
|
|
3139
|
-
),
|
|
3145
|
+
), j = this.applyPatch(
|
|
3140
3146
|
k.trackItemsMap,
|
|
3141
3147
|
l
|
|
3142
3148
|
), E = this.applyPatch(
|
|
3143
3149
|
k.trackItemDetailsMap,
|
|
3144
|
-
|
|
3145
|
-
),
|
|
3150
|
+
g
|
|
3151
|
+
), I = Z({
|
|
3146
3152
|
tracks: v,
|
|
3147
|
-
transitionIds:
|
|
3148
|
-
trackItemIds:
|
|
3149
|
-
transitionsMap:
|
|
3150
|
-
trackItemsMap:
|
|
3153
|
+
transitionIds: _,
|
|
3154
|
+
trackItemIds: y,
|
|
3155
|
+
transitionsMap: m,
|
|
3156
|
+
trackItemsMap: j,
|
|
3151
3157
|
trackItemDetailsMap: E
|
|
3152
|
-
}),
|
|
3153
|
-
this.prevState =
|
|
3158
|
+
}), P = Z(this.getState()), S = { ...P, ...I };
|
|
3159
|
+
this.prevState = P, this.undos.push({ undos: n, type: i }), this.stateSubject.next(S), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
|
3154
3160
|
}
|
|
3155
3161
|
}
|
|
3156
3162
|
export {
|
|
3157
|
-
|
|
3163
|
+
$a as default
|
|
3158
3164
|
};
|