@designcombo/state 0.1.27 → 0.1.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +1025 -978
- package/dist/index.umd.js +2 -2
- package/dist/utils/load-item.d.ts +1 -0
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
@@ -1,24 +1,24 @@
|
|
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, DESIGN_RESIZE as vi, HISTORY_UNDO as Ii, HISTORY_REDO as Si, LAYER_DELETE as wi, ADD_CAPTION as Ti, ADD_TEXT as
|
5
|
-
var
|
6
|
-
return
|
3
|
+
var Mt = (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, LAYER_CLONE as ki, ADD_CAPTION as Ti, ADD_TEXT as Ei, ADD_IMAGE as Ai, ADD_AUDIO as Mi, ADD_VIDEO as Oi, ACTIVE_SPLIT as xi, ACTIVE_CLONE as Di, ACTIVE_PASTE as Pi, EDIT_OBJECT as Ci } from "@designcombo/events";
|
5
|
+
var sn = function(t, r) {
|
6
|
+
return sn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
7
7
|
n.__proto__ = i;
|
8
8
|
} || function(n, i) {
|
9
9
|
for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
|
10
|
-
},
|
10
|
+
}, sn(t, r);
|
11
11
|
};
|
12
12
|
function ge(t, r) {
|
13
13
|
if (typeof r != "function" && r !== null)
|
14
14
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
15
|
-
|
15
|
+
sn(t, r);
|
16
16
|
function n() {
|
17
17
|
this.constructor = t;
|
18
18
|
}
|
19
19
|
t.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function on(t) {
|
22
22
|
var r = typeof Symbol == "function" && Symbol.iterator, n = r && t[r], i = 0;
|
23
23
|
if (n) return n.call(t);
|
24
24
|
if (t && typeof t.length == "number") return {
|
@@ -28,14 +28,14 @@ function an(t) {
|
|
28
28
|
};
|
29
29
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function cn(t, r) {
|
32
32
|
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
33
33
|
if (!n) return t;
|
34
34
|
var i = n.call(t), s, c = [], f;
|
35
35
|
try {
|
36
36
|
for (; (r === void 0 || r-- > 0) && !(s = i.next()).done; ) c.push(s.value);
|
37
|
-
} catch (
|
38
|
-
f = { error:
|
37
|
+
} catch (h) {
|
38
|
+
f = { error: h };
|
39
39
|
} finally {
|
40
40
|
try {
|
41
41
|
s && !s.done && (n = i.return) && n.call(i);
|
@@ -45,12 +45,12 @@ function sn(t, r) {
|
|
45
45
|
}
|
46
46
|
return c;
|
47
47
|
}
|
48
|
-
function
|
48
|
+
function un(t, r, n) {
|
49
49
|
if (n || arguments.length === 2) for (var i = 0, s = r.length, c; i < s; i++)
|
50
50
|
(c || !(i in r)) && (c || (c = Array.prototype.slice.call(r, 0, i)), c[i] = r[i]);
|
51
51
|
return t.concat(c || Array.prototype.slice.call(r));
|
52
52
|
}
|
53
|
-
function
|
53
|
+
function bt(t) {
|
54
54
|
return typeof t == "function";
|
55
55
|
}
|
56
56
|
function Yn(t) {
|
@@ -59,7 +59,7 @@ function Yn(t) {
|
|
59
59
|
}, n = t(r);
|
60
60
|
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
61
61
|
}
|
62
|
-
var
|
62
|
+
var Qr = Yn(function(t) {
|
63
63
|
return function(n) {
|
64
64
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
65
65
|
` + n.map(function(i, s) {
|
@@ -68,13 +68,13 @@ var Zr = Yn(function(t) {
|
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
69
69
|
};
|
70
70
|
});
|
71
|
-
function
|
71
|
+
function ln(t, r) {
|
72
72
|
if (t) {
|
73
73
|
var n = t.indexOf(r);
|
74
74
|
0 <= n && t.splice(n, 1);
|
75
75
|
}
|
76
76
|
}
|
77
|
-
var
|
77
|
+
var er = function() {
|
78
78
|
function t(r) {
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
80
80
|
}
|
@@ -86,7 +86,7 @@ var tr = function() {
|
|
86
86
|
if (f)
|
87
87
|
if (this._parentage = null, Array.isArray(f))
|
88
88
|
try {
|
89
|
-
for (var
|
89
|
+
for (var h = on(f), x = h.next(); !x.done; x = h.next()) {
|
90
90
|
var F = x.value;
|
91
91
|
F.remove(this);
|
92
92
|
}
|
@@ -94,50 +94,50 @@ var tr = function() {
|
|
94
94
|
r = { error: l };
|
95
95
|
} finally {
|
96
96
|
try {
|
97
|
-
x && !x.done && (n =
|
97
|
+
x && !x.done && (n = h.return) && n.call(h);
|
98
98
|
} finally {
|
99
99
|
if (r) throw r.error;
|
100
100
|
}
|
101
101
|
}
|
102
102
|
else
|
103
103
|
f.remove(this);
|
104
|
-
var
|
105
|
-
if (
|
104
|
+
var T = this.initialTeardown;
|
105
|
+
if (bt(T))
|
106
106
|
try {
|
107
|
-
|
107
|
+
T();
|
108
108
|
} catch (l) {
|
109
|
-
c = l instanceof
|
109
|
+
c = l instanceof Qr ? l.errors : [l];
|
110
110
|
}
|
111
111
|
var H = this._finalizers;
|
112
112
|
if (H) {
|
113
113
|
this._finalizers = null;
|
114
114
|
try {
|
115
|
-
for (var
|
116
|
-
var
|
115
|
+
for (var g = on(H), p = g.next(); !p.done; p = g.next()) {
|
116
|
+
var y = p.value;
|
117
117
|
try {
|
118
|
-
|
118
|
+
En(y);
|
119
119
|
} catch (l) {
|
120
|
-
c = c ?? [], l instanceof
|
120
|
+
c = c ?? [], l instanceof Qr ? c = un(un([], cn(c)), cn(l.errors)) : c.push(l);
|
121
121
|
}
|
122
122
|
}
|
123
123
|
} catch (l) {
|
124
124
|
i = { error: l };
|
125
125
|
} finally {
|
126
126
|
try {
|
127
|
-
p && !p.done && (s =
|
127
|
+
p && !p.done && (s = g.return) && s.call(g);
|
128
128
|
} finally {
|
129
129
|
if (i) throw i.error;
|
130
130
|
}
|
131
131
|
}
|
132
132
|
}
|
133
133
|
if (c)
|
134
|
-
throw new
|
134
|
+
throw new Qr(c);
|
135
135
|
}
|
136
136
|
}, t.prototype.add = function(r) {
|
137
137
|
var n;
|
138
138
|
if (r && r !== this)
|
139
139
|
if (this.closed)
|
140
|
-
|
140
|
+
En(r);
|
141
141
|
else {
|
142
142
|
if (r instanceof t) {
|
143
143
|
if (r.closed || r._hasParent(this))
|
@@ -154,20 +154,20 @@ var tr = function() {
|
|
154
154
|
this._parentage = Array.isArray(n) ? (n.push(r), n) : n ? [n, r] : r;
|
155
155
|
}, t.prototype._removeParent = function(r) {
|
156
156
|
var n = this._parentage;
|
157
|
-
n === r ? this._parentage = null : Array.isArray(n) &&
|
157
|
+
n === r ? this._parentage = null : Array.isArray(n) && ln(n, r);
|
158
158
|
}, t.prototype.remove = function(r) {
|
159
159
|
var n = this._finalizers;
|
160
|
-
n &&
|
160
|
+
n && ln(n, r), r instanceof t && r._removeParent(this);
|
161
161
|
}, t.EMPTY = function() {
|
162
162
|
var r = new t();
|
163
163
|
return r.closed = !0, r;
|
164
164
|
}(), t;
|
165
|
-
}(), Vn =
|
165
|
+
}(), Vn = er.EMPTY;
|
166
166
|
function Xn(t) {
|
167
|
-
return t instanceof
|
167
|
+
return t instanceof er || t && "closed" in t && bt(t.remove) && bt(t.add) && bt(t.unsubscribe);
|
168
168
|
}
|
169
|
-
function
|
170
|
-
|
169
|
+
function En(t) {
|
170
|
+
bt(t) ? t() : t.unsubscribe();
|
171
171
|
}
|
172
172
|
var qn = {
|
173
173
|
onUnhandledError: null,
|
@@ -179,7 +179,7 @@ var qn = {
|
|
179
179
|
setTimeout: function(t, r) {
|
180
180
|
for (var n = [], i = 2; i < arguments.length; i++)
|
181
181
|
n[i - 2] = arguments[i];
|
182
|
-
return setTimeout.apply(void 0,
|
182
|
+
return setTimeout.apply(void 0, un([t, r], cn(n)));
|
183
183
|
},
|
184
184
|
clearTimeout: function(t) {
|
185
185
|
var r = Jn.delegate;
|
@@ -187,12 +187,12 @@ var qn = {
|
|
187
187
|
},
|
188
188
|
delegate: void 0
|
189
189
|
};
|
190
|
-
function
|
190
|
+
function ji(t) {
|
191
191
|
Jn.setTimeout(function() {
|
192
192
|
throw t;
|
193
193
|
});
|
194
194
|
}
|
195
|
-
function
|
195
|
+
function An() {
|
196
196
|
}
|
197
197
|
function Xe(t) {
|
198
198
|
t();
|
@@ -201,10 +201,10 @@ var Zn = function(t) {
|
|
201
201
|
ge(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 = Ni, i;
|
205
205
|
}
|
206
206
|
return r.create = function(n, i, s) {
|
207
|
-
return new
|
207
|
+
return new fn(n, i, s);
|
208
208
|
}, r.prototype.next = function(n) {
|
209
209
|
this.isStopped || this._next(n);
|
210
210
|
}, r.prototype.error = function(n) {
|
@@ -228,11 +228,11 @@ var Zn = function(t) {
|
|
228
228
|
this.unsubscribe();
|
229
229
|
}
|
230
230
|
}, r;
|
231
|
-
}(
|
232
|
-
function
|
233
|
-
return
|
231
|
+
}(er), Ri = Function.prototype.bind;
|
232
|
+
function tn(t, r) {
|
233
|
+
return Ri.call(t, r);
|
234
234
|
}
|
235
|
-
var
|
235
|
+
var Fi = function() {
|
236
236
|
function t(r) {
|
237
237
|
this.partialObserver = r;
|
238
238
|
}
|
@@ -263,55 +263,55 @@ var Ri = function() {
|
|
263
263
|
Ve(n);
|
264
264
|
}
|
265
265
|
}, t;
|
266
|
-
}(),
|
266
|
+
}(), fn = function(t) {
|
267
267
|
ge(r, t);
|
268
268
|
function r(n, i, s) {
|
269
269
|
var c = t.call(this) || this, f;
|
270
|
-
if (
|
270
|
+
if (bt(n) || !n)
|
271
271
|
f = {
|
272
272
|
next: n ?? void 0,
|
273
273
|
error: i ?? void 0,
|
274
274
|
complete: s ?? void 0
|
275
275
|
};
|
276
276
|
else {
|
277
|
-
var
|
278
|
-
c && qn.useDeprecatedNextContext ? (
|
277
|
+
var h;
|
278
|
+
c && qn.useDeprecatedNextContext ? (h = Object.create(n), h.unsubscribe = function() {
|
279
279
|
return c.unsubscribe();
|
280
280
|
}, f = {
|
281
|
-
next: n.next &&
|
282
|
-
error: n.error &&
|
283
|
-
complete: n.complete &&
|
281
|
+
next: n.next && tn(n.next, h),
|
282
|
+
error: n.error && tn(n.error, h),
|
283
|
+
complete: n.complete && tn(n.complete, h)
|
284
284
|
}) : f = n;
|
285
285
|
}
|
286
|
-
return c.destination = new
|
286
|
+
return c.destination = new Fi(f), c;
|
287
287
|
}
|
288
288
|
return r;
|
289
289
|
}(Zn);
|
290
290
|
function Ve(t) {
|
291
|
-
|
291
|
+
ji(t);
|
292
292
|
}
|
293
|
-
function
|
293
|
+
function zi(t) {
|
294
294
|
throw t;
|
295
295
|
}
|
296
|
-
var
|
296
|
+
var Ni = {
|
297
297
|
closed: !0,
|
298
|
-
next:
|
299
|
-
error:
|
300
|
-
complete:
|
301
|
-
},
|
298
|
+
next: An,
|
299
|
+
error: zi,
|
300
|
+
complete: An
|
301
|
+
}, Hi = function() {
|
302
302
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
303
303
|
}();
|
304
|
-
function
|
304
|
+
function Ui(t) {
|
305
305
|
return t;
|
306
306
|
}
|
307
|
-
function
|
308
|
-
return t.length === 0 ?
|
307
|
+
function Li(t) {
|
308
|
+
return t.length === 0 ? Ui : 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 Mn = function() {
|
315
315
|
function t(r) {
|
316
316
|
r && (this._subscribe = r);
|
317
317
|
}
|
@@ -319,10 +319,10 @@ var An = 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 = Wi(r) ? r : new fn(r, n, i);
|
323
323
|
return Xe(function() {
|
324
|
-
var f = s,
|
325
|
-
c.add(
|
324
|
+
var f = s, h = f.operator, x = f.source;
|
325
|
+
c.add(h ? h.call(c, x) : x ? s._subscribe(c) : s._trySubscribe(c));
|
326
326
|
}), c;
|
327
327
|
}, t.prototype._trySubscribe = function(r) {
|
328
328
|
try {
|
@@ -333,10 +333,10 @@ var An = function() {
|
|
333
333
|
}, t.prototype.forEach = function(r, n) {
|
334
334
|
var i = this;
|
335
335
|
return n = On(n), new n(function(s, c) {
|
336
|
-
var f = new
|
337
|
-
next: function(
|
336
|
+
var f = new fn({
|
337
|
+
next: function(h) {
|
338
338
|
try {
|
339
|
-
r(
|
339
|
+
r(h);
|
340
340
|
} catch (x) {
|
341
341
|
c(x), f.unsubscribe();
|
342
342
|
}
|
@@ -349,12 +349,12 @@ var An = 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[Hi] = 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 Li(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 Li(t) {
|
379
|
-
return t && mt(t.next) && mt(t.error) && mt(t.complete);
|
380
|
-
}
|
381
378
|
function Gi(t) {
|
382
|
-
return t && t
|
379
|
+
return t && bt(t.next) && bt(t.error) && bt(t.complete);
|
383
380
|
}
|
384
|
-
|
381
|
+
function Wi(t) {
|
382
|
+
return t && t instanceof Zn || Gi(t) && Xn(t);
|
383
|
+
}
|
384
|
+
var Bi = 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 Wi = 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 Bi();
|
400
400
|
}, r.prototype.next = function(n) {
|
401
401
|
var i = this;
|
402
402
|
Xe(function() {
|
@@ -404,15 +404,15 @@ var Wi = Yn(function(t) {
|
|
404
404
|
if (i._throwIfClosed(), !i.isStopped) {
|
405
405
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
406
406
|
try {
|
407
|
-
for (var f =
|
408
|
-
var x =
|
407
|
+
for (var f = on(i.currentObservers), h = f.next(); !h.done; h = f.next()) {
|
408
|
+
var x = h.value;
|
409
409
|
x.next(n);
|
410
410
|
}
|
411
411
|
} catch (F) {
|
412
412
|
s = { error: F };
|
413
413
|
} finally {
|
414
414
|
try {
|
415
|
-
|
415
|
+
h && !h.done && (c = f.return) && c.call(f);
|
416
416
|
} finally {
|
417
417
|
if (s) throw s.error;
|
418
418
|
}
|
@@ -451,20 +451,20 @@ var Wi = Yn(function(t) {
|
|
451
451
|
}, r.prototype._subscribe = function(n) {
|
452
452
|
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
453
453
|
}, r.prototype._innerSubscribe = function(n) {
|
454
|
-
var i = this, s = this, c = s.hasError, f = s.isStopped,
|
455
|
-
return c || f ? Vn : (this.currentObservers = null,
|
456
|
-
i.currentObservers = null,
|
454
|
+
var i = this, s = this, c = s.hasError, f = s.isStopped, h = s.observers;
|
455
|
+
return c || f ? Vn : (this.currentObservers = null, h.push(n), new er(function() {
|
456
|
+
i.currentObservers = null, ln(h, n);
|
457
457
|
}));
|
458
458
|
}, r.prototype._checkFinalizedStatuses = function(n) {
|
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 Mn();
|
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
|
+
}(Mn), xn = function(t) {
|
468
468
|
ge(r, t);
|
469
469
|
function r(n, i) {
|
470
470
|
var s = t.call(this) || this;
|
@@ -483,7 +483,7 @@ var Wi = Yn(function(t) {
|
|
483
483
|
var i, s;
|
484
484
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(n)) !== null && s !== void 0 ? s : Vn;
|
485
485
|
}, r;
|
486
|
-
}(Qn),
|
486
|
+
}(Qn), Dn = function(t) {
|
487
487
|
ge(r, t);
|
488
488
|
function r(n) {
|
489
489
|
var i = t.call(this) || this;
|
@@ -506,45 +506,45 @@ var Wi = 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),
|
510
|
-
function
|
509
|
+
}(Qn), it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
510
|
+
function gn(t) {
|
511
511
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
512
512
|
}
|
513
|
-
var
|
514
|
-
|
513
|
+
var Je = { exports: {} };
|
514
|
+
Je.exports;
|
515
515
|
(function(t, r) {
|
516
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991,
|
517
|
-
N[U] = N[
|
518
|
-
var
|
516
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 1, c = 2, f = 9007199254740991, h = "[object Arguments]", x = "[object Array]", F = "[object AsyncFunction]", T = "[object Boolean]", H = "[object Date]", g = "[object Error]", p = "[object Function]", y = "[object GeneratorFunction]", l = "[object Map]", m = "[object Number]", S = "[object Null]", v = "[object Object]", b = "[object Promise]", d = "[object Proxy]", O = "[object RegExp]", E = "[object Set]", _ = "[object String]", D = "[object Symbol]", I = "[object Undefined]", P = "[object WeakMap]", k = "[object ArrayBuffer]", A = "[object DataView]", U = "[object Float32Array]", J = "[object Float64Array]", Se = "[object Int8Array]", ar = "[object Int16Array]", sr = "[object Int32Array]", or = "[object Uint8Array]", cr = "[object Uint8ClampedArray]", z = "[object Uint16Array]", ur = "[object Uint32Array]", lr = /[\\^$.*+?()[\]{}|]/g, at = /^\[object .+?Constructor\]$/, we = /^(?:0|[1-9]\d*)$/, N = {};
|
517
|
+
N[U] = N[J] = N[Se] = N[ar] = N[sr] = N[or] = N[cr] = N[z] = N[ur] = !0, N[h] = N[x] = N[k] = N[T] = N[A] = N[H] = N[g] = N[p] = N[l] = N[m] = N[v] = N[O] = N[E] = N[_] = N[P] = !1;
|
518
|
+
var ke = typeof it == "object" && it && it.Object === Object && it, fr = typeof self == "object" && self && self.Object === Object && self, st = ke || fr || Function("return this")(), Te = r && !r.nodeType && r, Ee = Te && !0 && t && !t.nodeType && t, Vt = Ee && Ee.exports === Te, Xt = Vt && ke.process, Ae = function() {
|
519
519
|
try {
|
520
520
|
return Xt && Xt.binding && Xt.binding("util");
|
521
521
|
} catch {
|
522
522
|
}
|
523
523
|
}(), qt = Ae && Ae.isTypedArray;
|
524
|
-
function
|
525
|
-
for (var o = -1, u = e == null ? 0 : e.length,
|
526
|
-
var
|
527
|
-
a(
|
524
|
+
function Me(e, a) {
|
525
|
+
for (var o = -1, u = e == null ? 0 : e.length, M = 0, w = []; ++o < u; ) {
|
526
|
+
var j = e[o];
|
527
|
+
a(j, o, e) && (w[M++] = j);
|
528
528
|
}
|
529
529
|
return w;
|
530
530
|
}
|
531
531
|
function Jt(e, a) {
|
532
|
-
for (var o = -1, u = a.length,
|
533
|
-
e[
|
532
|
+
for (var o = -1, u = a.length, M = e.length; ++o < u; )
|
533
|
+
e[M + o] = a[o];
|
534
534
|
return e;
|
535
535
|
}
|
536
|
-
function
|
536
|
+
function Oe(e, a) {
|
537
537
|
for (var o = -1, u = e == null ? 0 : e.length; ++o < u; )
|
538
538
|
if (a(e[o], o, e))
|
539
539
|
return !0;
|
540
540
|
return !1;
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function pr(e, a) {
|
543
543
|
for (var o = -1, u = Array(e); ++o < e; )
|
544
544
|
u[o] = a(o);
|
545
545
|
return u;
|
546
546
|
}
|
547
|
-
function
|
547
|
+
function dr(e) {
|
548
548
|
return function(a) {
|
549
549
|
return e(a);
|
550
550
|
};
|
@@ -555,29 +555,29 @@ qe.exports;
|
|
555
555
|
function Zt(e, a) {
|
556
556
|
return e == null ? void 0 : e[a];
|
557
557
|
}
|
558
|
-
function
|
558
|
+
function xe(e) {
|
559
559
|
var a = -1, o = Array(e.size);
|
560
|
-
return e.forEach(function(u,
|
561
|
-
o[++a] = [
|
560
|
+
return e.forEach(function(u, M) {
|
561
|
+
o[++a] = [M, u];
|
562
562
|
}), o;
|
563
563
|
}
|
564
|
-
function
|
564
|
+
function De(e, a) {
|
565
565
|
return function(o) {
|
566
566
|
return e(a(o));
|
567
567
|
};
|
568
568
|
}
|
569
|
-
function
|
569
|
+
function ut(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,
|
575
|
+
var Rt = Array.prototype, hr = Function.prototype, It = Object.prototype, Ft = st["__core-js_shared__"], Qt = hr.toString, rt = 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
|
-
}(), Ce = It.toString,
|
579
|
-
"^" + Qt.call(
|
580
|
-
), te = Vt ?
|
578
|
+
}(), Ce = It.toString, yr = RegExp(
|
579
|
+
"^" + Qt.call(rt).replace(lr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
580
|
+
), te = Vt ? st.Buffer : void 0, zt = st.Symbol, je = st.Uint8Array, Nt = It.propertyIsEnumerable, St = Rt.splice, ot = zt ? zt.toStringTag : void 0, Ht = Object.getOwnPropertySymbols, ee = te ? te.isBuffer : void 0, wt = De(Object.keys, Object), re = ht(st, "DataView"), kt = ht(st, "Map"), ne = ht(st, "Promise"), ie = ht(st, "Set"), ae = ht(st, "WeakMap"), gt = ht(Object, "create"), Re = q(re), dt = q(kt), mr = q(ne), br = q(ie), gr = q(ae), Fe = zt ? zt.prototype : void 0, se = Fe ? Fe.valueOf : void 0;
|
581
581
|
function B(e) {
|
582
582
|
var a = -1, o = e == null ? 0 : e.length;
|
583
583
|
for (this.clear(); ++a < o; ) {
|
@@ -585,30 +585,30 @@ qe.exports;
|
|
585
585
|
this.set(u[0], u[1]);
|
586
586
|
}
|
587
587
|
}
|
588
|
-
function
|
588
|
+
function _r() {
|
589
589
|
this.__data__ = gt ? gt(null) : {}, this.size = 0;
|
590
590
|
}
|
591
|
-
function
|
591
|
+
function vr(e) {
|
592
592
|
var a = this.has(e) && delete this.__data__[e];
|
593
593
|
return this.size -= a ? 1 : 0, a;
|
594
594
|
}
|
595
|
-
function
|
595
|
+
function Ir(e) {
|
596
596
|
var a = this.__data__;
|
597
597
|
if (gt) {
|
598
598
|
var o = a[e];
|
599
599
|
return o === i ? void 0 : o;
|
600
600
|
}
|
601
|
-
return
|
601
|
+
return rt.call(a, e) ? a[e] : void 0;
|
602
602
|
}
|
603
|
-
function
|
603
|
+
function Sr(e) {
|
604
604
|
var a = this.__data__;
|
605
|
-
return gt ? a[e] !== void 0 :
|
605
|
+
return gt ? a[e] !== void 0 : rt.call(a, e);
|
606
606
|
}
|
607
|
-
function
|
607
|
+
function wr(e, a) {
|
608
608
|
var o = this.__data__;
|
609
609
|
return this.size += this.has(e) ? 0 : 1, o[e] = gt && a === void 0 ? i : a, this;
|
610
610
|
}
|
611
|
-
B.prototype.clear =
|
611
|
+
B.prototype.clear = _r, B.prototype.delete = vr, B.prototype.get = Ir, B.prototype.has = Sr, B.prototype.set = wr;
|
612
612
|
function K(e) {
|
613
613
|
var a = -1, o = e == null ? 0 : e.length;
|
614
614
|
for (this.clear(); ++a < o; ) {
|
@@ -616,7 +616,7 @@ qe.exports;
|
|
616
616
|
this.set(u[0], u[1]);
|
617
617
|
}
|
618
618
|
}
|
619
|
-
function
|
619
|
+
function kr() {
|
620
620
|
this.__data__ = [], this.size = 0;
|
621
621
|
}
|
622
622
|
function Tr(e) {
|
@@ -626,19 +626,19 @@ qe.exports;
|
|
626
626
|
var u = a.length - 1;
|
627
627
|
return o == u ? a.pop() : St.call(a, o, 1), --this.size, !0;
|
628
628
|
}
|
629
|
-
function
|
629
|
+
function Er(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 Ar(e) {
|
634
634
|
return Gt(this.__data__, e) > -1;
|
635
635
|
}
|
636
|
-
function
|
636
|
+
function Mr(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
|
-
K.prototype.clear =
|
641
|
-
function
|
640
|
+
K.prototype.clear = kr, K.prototype.delete = Tr, K.prototype.get = Er, K.prototype.has = Ar, K.prototype.set = Mr;
|
641
|
+
function Z(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 B(),
|
651
|
-
map: new (
|
651
|
+
map: new (kt || K)(),
|
652
652
|
string: new B()
|
653
653
|
};
|
654
654
|
}
|
655
655
|
function xr(e) {
|
656
|
-
var a =
|
656
|
+
var a = ct(this, e).delete(e);
|
657
657
|
return this.size -= a ? 1 : 0, a;
|
658
658
|
}
|
659
|
-
function
|
660
|
-
return
|
659
|
+
function Dr(e) {
|
660
|
+
return ct(this, e).get(e);
|
661
661
|
}
|
662
662
|
function Pr(e) {
|
663
|
-
return
|
663
|
+
return ct(this, e).has(e);
|
664
664
|
}
|
665
|
-
function
|
666
|
-
var o =
|
665
|
+
function Cr(e, a) {
|
666
|
+
var o = ct(this, e), u = o.size;
|
667
667
|
return o.set(e, a), this.size += o.size == u ? 0 : 1, this;
|
668
668
|
}
|
669
|
-
|
669
|
+
Z.prototype.clear = Or, Z.prototype.delete = xr, Z.prototype.get = Dr, Z.prototype.has = Pr, Z.prototype.set = Cr;
|
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 Z(); ++a < o; )
|
673
673
|
this.add(e[a]);
|
674
674
|
}
|
675
675
|
function ze(e) {
|
@@ -679,43 +679,43 @@ qe.exports;
|
|
679
679
|
return this.__data__.has(e);
|
680
680
|
}
|
681
681
|
Ut.prototype.add = Ut.prototype.push = ze, Ut.prototype.has = Lt;
|
682
|
-
function
|
682
|
+
function lt(e) {
|
683
683
|
var a = this.__data__ = new K(e);
|
684
684
|
this.size = a.size;
|
685
685
|
}
|
686
686
|
function oe() {
|
687
687
|
this.__data__ = new K(), this.size = 0;
|
688
688
|
}
|
689
|
-
function
|
689
|
+
function jr(e) {
|
690
690
|
var a = this.__data__, o = a.delete(e);
|
691
691
|
return this.size = a.size, o;
|
692
692
|
}
|
693
|
-
function
|
693
|
+
function Rr(e) {
|
694
694
|
return this.__data__.get(e);
|
695
695
|
}
|
696
|
-
function
|
696
|
+
function Fr(e) {
|
697
697
|
return this.__data__.has(e);
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function zr(e, a) {
|
700
700
|
var o = this.__data__;
|
701
701
|
if (o instanceof K) {
|
702
702
|
var u = o.__data__;
|
703
|
-
if (!
|
703
|
+
if (!kt || 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 Z(u);
|
706
706
|
}
|
707
707
|
return o.set(e, a), this.size = o.size, this;
|
708
708
|
}
|
709
|
-
|
710
|
-
function
|
711
|
-
var o = Wt(e), u = !o && Ge(e),
|
709
|
+
lt.prototype.clear = oe, lt.prototype.delete = jr, lt.prototype.get = Rr, lt.prototype.has = Fr, lt.prototype.set = zr;
|
710
|
+
function Nr(e, a) {
|
711
|
+
var o = Wt(e), u = !o && Ge(e), M = !o && !u && Bt(e), w = !o && !u && !M && $e(e), j = o || u || M || w, C = j ? pr(e.length, String) : [], L = C.length;
|
712
712
|
for (var R in e)
|
713
|
-
|
713
|
+
rt.call(e, R) && !(j && // Safari 9 has enumerable `arguments.length` in strict mode.
|
714
714
|
(R == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
715
|
-
|
715
|
+
M && (R == "offset" || R == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
716
716
|
w && (R == "buffer" || R == "byteLength" || R == "byteOffset") || // Skip index properties.
|
717
|
-
|
718
|
-
return
|
717
|
+
Kr(R, L))) && C.push(R);
|
718
|
+
return C;
|
719
719
|
}
|
720
720
|
function Gt(e, a) {
|
721
721
|
for (var o = e.length; o--; )
|
@@ -727,127 +727,127 @@ qe.exports;
|
|
727
727
|
var u = a(e);
|
728
728
|
return Wt(e) ? u : Jt(u, o(e));
|
729
729
|
}
|
730
|
-
function
|
731
|
-
return e == null ? e === void 0 ?
|
730
|
+
function Tt(e) {
|
731
|
+
return e == null ? e === void 0 ? I : S : ot && ot in Object(e) ? yt(e) : Ue(e);
|
732
732
|
}
|
733
733
|
function Ne(e) {
|
734
|
-
return
|
734
|
+
return pt(e) && Tt(e) == h;
|
735
735
|
}
|
736
|
-
function He(e, a, o, u,
|
737
|
-
return e === a ? !0 : e == null || a == null || !
|
736
|
+
function He(e, a, o, u, M) {
|
737
|
+
return e === a ? !0 : e == null || a == null || !pt(e) && !pt(a) ? e !== e && a !== a : Hr(e, a, o, u, He, M);
|
738
738
|
}
|
739
|
-
function
|
740
|
-
var
|
741
|
-
L = L ==
|
742
|
-
var Y = L ==
|
739
|
+
function Hr(e, a, o, u, M, w) {
|
740
|
+
var j = Wt(e), C = Wt(a), L = j ? x : ft(e), R = C ? x : ft(a);
|
741
|
+
L = L == h ? v : L, R = R == h ? v : R;
|
742
|
+
var Y = L == v, Q = R == v, G = L == R;
|
743
743
|
if (G && Bt(e)) {
|
744
744
|
if (!Bt(a))
|
745
745
|
return !1;
|
746
|
-
|
746
|
+
j = !0, Y = !1;
|
747
747
|
}
|
748
748
|
if (G && !Y)
|
749
|
-
return w || (w = new
|
749
|
+
return w || (w = new lt()), j || $e(e) ? ue(e, a, o, u, M, w) : Wr(e, a, L, o, u, M, w);
|
750
750
|
if (!(o & s)) {
|
751
|
-
var V = Y &&
|
751
|
+
var V = Y && rt.call(e, "__wrapped__"), $ = Q && rt.call(a, "__wrapped__");
|
752
752
|
if (V || $) {
|
753
|
-
var _t = V ? e.value() : e,
|
754
|
-
return w || (w = new
|
753
|
+
var _t = V ? e.value() : e, mt = $ ? a.value() : a;
|
754
|
+
return w || (w = new lt()), M(_t, mt, o, u, w);
|
755
755
|
}
|
756
756
|
}
|
757
|
-
return G ? (w || (w = new
|
758
|
-
}
|
759
|
-
function Hr(e) {
|
760
|
-
if (!Be(e) || Yr(e))
|
761
|
-
return !1;
|
762
|
-
var a = We(e) ? hr : it;
|
763
|
-
return a.test(X(e));
|
757
|
+
return G ? (w || (w = new lt()), Br(e, a, o, u, M, w)) : !1;
|
764
758
|
}
|
765
759
|
function Ur(e) {
|
766
|
-
|
760
|
+
if (!Be(e) || Vr(e))
|
761
|
+
return !1;
|
762
|
+
var a = We(e) ? yr : at;
|
763
|
+
return a.test(q(e));
|
767
764
|
}
|
768
765
|
function Lr(e) {
|
769
|
-
|
766
|
+
return pt(e) && fe(e.length) && !!N[Tt(e)];
|
767
|
+
}
|
768
|
+
function Gr(e) {
|
769
|
+
if (!Xr(e))
|
770
770
|
return wt(e);
|
771
771
|
var a = [];
|
772
772
|
for (var o in Object(e))
|
773
|
-
|
773
|
+
rt.call(e, o) && o != "constructor" && a.push(o);
|
774
774
|
return a;
|
775
775
|
}
|
776
|
-
function ue(e, a, o, u,
|
777
|
-
var
|
778
|
-
if (
|
776
|
+
function ue(e, a, o, u, M, w) {
|
777
|
+
var j = o & s, C = e.length, L = a.length;
|
778
|
+
if (C != L && !(j && L > C))
|
779
779
|
return !1;
|
780
780
|
var R = w.get(e);
|
781
781
|
if (R && w.get(a))
|
782
782
|
return R == a;
|
783
|
-
var Y = -1,
|
784
|
-
for (w.set(e, a), w.set(a, e); ++Y <
|
783
|
+
var Y = -1, Q = !0, G = o & c ? new Ut() : void 0;
|
784
|
+
for (w.set(e, a), w.set(a, e); ++Y < C; ) {
|
785
785
|
var V = e[Y], $ = a[Y];
|
786
786
|
if (u)
|
787
|
-
var _t =
|
787
|
+
var _t = j ? u($, V, Y, a, e, w) : u(V, $, Y, e, a, w);
|
788
788
|
if (_t !== void 0) {
|
789
789
|
if (_t)
|
790
790
|
continue;
|
791
|
-
|
791
|
+
Q = !1;
|
792
792
|
break;
|
793
793
|
}
|
794
794
|
if (G) {
|
795
|
-
if (!
|
796
|
-
if (!jt(G, At) && (V ===
|
795
|
+
if (!Oe(a, function(mt, At) {
|
796
|
+
if (!jt(G, At) && (V === mt || M(V, mt, o, u, w)))
|
797
797
|
return G.push(At);
|
798
798
|
})) {
|
799
|
-
|
799
|
+
Q = !1;
|
800
800
|
break;
|
801
801
|
}
|
802
|
-
} else if (!(V === $ ||
|
803
|
-
|
802
|
+
} else if (!(V === $ || M(V, $, o, u, w))) {
|
803
|
+
Q = !1;
|
804
804
|
break;
|
805
805
|
}
|
806
806
|
}
|
807
|
-
return w.delete(e), w.delete(a),
|
807
|
+
return w.delete(e), w.delete(a), Q;
|
808
808
|
}
|
809
|
-
function
|
809
|
+
function Wr(e, a, o, u, M, w, j) {
|
810
810
|
switch (o) {
|
811
|
-
case
|
811
|
+
case A:
|
812
812
|
if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
|
813
813
|
return !1;
|
814
814
|
e = e.buffer, a = a.buffer;
|
815
815
|
case k:
|
816
816
|
return !(e.byteLength != a.byteLength || !w(new je(e), new je(a)));
|
817
|
-
case
|
817
|
+
case T:
|
818
818
|
case H:
|
819
|
-
case
|
819
|
+
case m:
|
820
820
|
return Le(+e, +a);
|
821
|
-
case
|
821
|
+
case g:
|
822
822
|
return e.name == a.name && e.message == a.message;
|
823
|
-
case
|
824
|
-
case
|
823
|
+
case O:
|
824
|
+
case _:
|
825
825
|
return e == a + "";
|
826
826
|
case l:
|
827
|
-
var
|
828
|
-
case
|
827
|
+
var C = xe;
|
828
|
+
case E:
|
829
829
|
var L = u & s;
|
830
|
-
if (
|
830
|
+
if (C || (C = ut), e.size != a.size && !L)
|
831
831
|
return !1;
|
832
|
-
var R =
|
832
|
+
var R = j.get(e);
|
833
833
|
if (R)
|
834
834
|
return R == a;
|
835
|
-
u |= c,
|
836
|
-
var Y = ue(
|
837
|
-
return
|
838
|
-
case
|
835
|
+
u |= c, j.set(e, a);
|
836
|
+
var Y = ue(C(e), C(a), u, M, w, j);
|
837
|
+
return j.delete(e), Y;
|
838
|
+
case D:
|
839
839
|
if (se)
|
840
840
|
return se.call(e) == se.call(a);
|
841
841
|
}
|
842
842
|
return !1;
|
843
843
|
}
|
844
|
-
function
|
845
|
-
var
|
846
|
-
if (L != Y && !
|
844
|
+
function Br(e, a, o, u, M, w) {
|
845
|
+
var j = o & s, C = Et(e), L = C.length, R = Et(a), Y = R.length;
|
846
|
+
if (L != Y && !j)
|
847
847
|
return !1;
|
848
|
-
for (var
|
849
|
-
var G =
|
850
|
-
if (!(
|
848
|
+
for (var Q = L; Q--; ) {
|
849
|
+
var G = C[Q];
|
850
|
+
if (!(j ? G in a : rt.call(a, G)))
|
851
851
|
return !1;
|
852
852
|
}
|
853
853
|
var V = w.get(e);
|
@@ -855,12 +855,12 @@ qe.exports;
|
|
855
855
|
return V == a;
|
856
856
|
var $ = !0;
|
857
857
|
w.set(e, a), w.set(a, e);
|
858
|
-
for (var _t =
|
859
|
-
G =
|
860
|
-
var
|
858
|
+
for (var _t = j; ++Q < L; ) {
|
859
|
+
G = C[Q];
|
860
|
+
var mt = e[G], At = a[G];
|
861
861
|
if (u)
|
862
|
-
var Tn =
|
863
|
-
if (!(Tn === void 0 ?
|
862
|
+
var Tn = j ? u(At, mt, G, a, e, w) : u(mt, At, G, e, a, w);
|
863
|
+
if (!(Tn === void 0 ? mt === At || M(mt, At, o, u, w) : Tn)) {
|
864
864
|
$ = !1;
|
865
865
|
break;
|
866
866
|
}
|
@@ -873,66 +873,66 @@ qe.exports;
|
|
873
873
|
return w.delete(e), w.delete(a), $;
|
874
874
|
}
|
875
875
|
function Et(e) {
|
876
|
-
return ce(e, pe,
|
876
|
+
return ce(e, pe, $r);
|
877
877
|
}
|
878
|
-
function
|
878
|
+
function ct(e, a) {
|
879
879
|
var o = e.__data__;
|
880
|
-
return
|
880
|
+
return Yr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
881
881
|
}
|
882
|
-
function
|
882
|
+
function ht(e, a) {
|
883
883
|
var o = Zt(e, a);
|
884
|
-
return
|
884
|
+
return Ur(o) ? o : void 0;
|
885
885
|
}
|
886
|
-
function
|
887
|
-
var a =
|
886
|
+
function yt(e) {
|
887
|
+
var a = rt.call(e, ot), o = e[ot];
|
888
888
|
try {
|
889
|
-
e[
|
889
|
+
e[ot] = void 0;
|
890
890
|
var u = !0;
|
891
891
|
} catch {
|
892
892
|
}
|
893
|
-
var
|
894
|
-
return u && (a ? e[
|
893
|
+
var M = Ce.call(e);
|
894
|
+
return u && (a ? e[ot] = o : delete e[ot]), M;
|
895
895
|
}
|
896
|
-
var
|
897
|
-
return e == null ? [] : (e = Object(e),
|
896
|
+
var $r = Ht ? function(e) {
|
897
|
+
return e == null ? [] : (e = Object(e), Me(Ht(e), function(a) {
|
898
898
|
return Nt.call(e, a);
|
899
899
|
}));
|
900
|
-
} :
|
901
|
-
(re &&
|
902
|
-
var a =
|
900
|
+
} : Jr, ft = Tt;
|
901
|
+
(re && ft(new re(new ArrayBuffer(1))) != A || kt && ft(new kt()) != l || ne && ft(ne.resolve()) != b || ie && ft(new ie()) != E || ae && ft(new ae()) != P) && (ft = function(e) {
|
902
|
+
var a = Tt(e), o = a == v ? e.constructor : void 0, u = o ? q(o) : "";
|
903
903
|
if (u)
|
904
904
|
switch (u) {
|
905
905
|
case Re:
|
906
|
-
return
|
907
|
-
case
|
906
|
+
return A;
|
907
|
+
case dt:
|
908
908
|
return l;
|
909
|
-
case yr:
|
910
|
-
return m;
|
911
909
|
case mr:
|
912
|
-
return
|
910
|
+
return b;
|
913
911
|
case br:
|
914
|
-
return
|
912
|
+
return E;
|
913
|
+
case gr:
|
914
|
+
return P;
|
915
915
|
}
|
916
916
|
return a;
|
917
917
|
});
|
918
|
-
function
|
918
|
+
function Kr(e, a) {
|
919
919
|
return a = a ?? f, !!a && (typeof e == "number" || we.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
920
920
|
}
|
921
|
-
function
|
921
|
+
function Yr(e) {
|
922
922
|
var a = typeof e;
|
923
923
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
924
924
|
}
|
925
|
-
function Yr(e) {
|
926
|
-
return !!De && De in e;
|
927
|
-
}
|
928
925
|
function Vr(e) {
|
926
|
+
return !!Pe && Pe in e;
|
927
|
+
}
|
928
|
+
function Xr(e) {
|
929
929
|
var a = e && e.constructor, o = typeof a == "function" && a.prototype || It;
|
930
930
|
return e === o;
|
931
931
|
}
|
932
932
|
function Ue(e) {
|
933
933
|
return Ce.call(e);
|
934
934
|
}
|
935
|
-
function
|
935
|
+
function q(e) {
|
936
936
|
if (e != null) {
|
937
937
|
try {
|
938
938
|
return Qt.call(e);
|
@@ -951,20 +951,20 @@ qe.exports;
|
|
951
951
|
var Ge = Ne(/* @__PURE__ */ function() {
|
952
952
|
return arguments;
|
953
953
|
}()) ? Ne : function(e) {
|
954
|
-
return
|
954
|
+
return pt(e) && rt.call(e, "callee") && !Nt.call(e, "callee");
|
955
955
|
}, Wt = Array.isArray;
|
956
956
|
function le(e) {
|
957
957
|
return e != null && fe(e.length) && !We(e);
|
958
958
|
}
|
959
|
-
var Bt = ee ||
|
960
|
-
function
|
959
|
+
var Bt = ee || Zr;
|
960
|
+
function qr(e, a) {
|
961
961
|
return He(e, a);
|
962
962
|
}
|
963
963
|
function We(e) {
|
964
964
|
if (!Be(e))
|
965
965
|
return !1;
|
966
|
-
var a =
|
967
|
-
return a == p || a ==
|
966
|
+
var a = Tt(e);
|
967
|
+
return a == p || a == y || a == F || a == d;
|
968
968
|
}
|
969
969
|
function fe(e) {
|
970
970
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
@@ -973,48 +973,48 @@ qe.exports;
|
|
973
973
|
var a = typeof e;
|
974
974
|
return e != null && (a == "object" || a == "function");
|
975
975
|
}
|
976
|
-
function
|
976
|
+
function pt(e) {
|
977
977
|
return e != null && typeof e == "object";
|
978
978
|
}
|
979
|
-
var $e = qt ?
|
979
|
+
var $e = qt ? dr(qt) : Lr;
|
980
980
|
function pe(e) {
|
981
|
-
return le(e) ?
|
981
|
+
return le(e) ? Nr(e) : Gr(e);
|
982
982
|
}
|
983
|
-
function
|
983
|
+
function Jr() {
|
984
984
|
return [];
|
985
985
|
}
|
986
|
-
function
|
986
|
+
function Zr() {
|
987
987
|
return !1;
|
988
988
|
}
|
989
|
-
t.exports =
|
990
|
-
})(
|
991
|
-
var
|
992
|
-
const
|
993
|
-
var
|
994
|
-
|
989
|
+
t.exports = qr;
|
990
|
+
})(Je, Je.exports);
|
991
|
+
var $i = Je.exports;
|
992
|
+
const nt = /* @__PURE__ */ gn($i);
|
993
|
+
var Ze = { exports: {} };
|
994
|
+
Ze.exports;
|
995
995
|
(function(t, r) {
|
996
|
-
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]",
|
997
|
-
z[c] = z[f] = z[
|
998
|
-
var
|
999
|
-
function
|
996
|
+
var n = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, c = "[object Arguments]", f = "[object Array]", h = "[object Boolean]", x = "[object Date]", F = "[object Error]", T = "[object Function]", H = "[object GeneratorFunction]", g = "[object Map]", p = "[object Number]", y = "[object Object]", l = "[object Promise]", m = "[object RegExp]", S = "[object Set]", v = "[object String]", b = "[object Symbol]", d = "[object WeakMap]", O = "[object ArrayBuffer]", E = "[object DataView]", _ = "[object Float32Array]", D = "[object Float64Array]", I = "[object Int8Array]", P = "[object Int16Array]", k = "[object Int32Array]", A = "[object Uint8Array]", U = "[object Uint8ClampedArray]", J = "[object Uint16Array]", Se = "[object Uint32Array]", ar = /[\\^$.*+?()[\]{}|]/g, sr = /\w*$/, or = /^\[object .+?Constructor\]$/, cr = /^(?:0|[1-9]\d*)$/, z = {};
|
997
|
+
z[c] = z[f] = z[O] = z[E] = z[h] = z[x] = z[_] = z[D] = z[I] = z[P] = z[k] = z[g] = z[p] = z[y] = z[m] = z[S] = z[v] = z[b] = z[A] = z[U] = z[J] = z[Se] = !0, z[F] = z[T] = z[d] = !1;
|
998
|
+
var ur = typeof it == "object" && it && it.Object === Object && it, lr = typeof self == "object" && self && self.Object === Object && self, at = ur || lr || Function("return this")(), we = r && !r.nodeType && r, N = we && !0 && t && !t.nodeType && t, ke = N && N.exports === we;
|
999
|
+
function fr(e, a) {
|
1000
1000
|
return e.set(a[0], a[1]), e;
|
1001
1001
|
}
|
1002
|
-
function
|
1002
|
+
function st(e, a) {
|
1003
1003
|
return e.add(a), e;
|
1004
1004
|
}
|
1005
|
-
function
|
1005
|
+
function Te(e, a) {
|
1006
1006
|
for (var o = -1, u = e ? e.length : 0; ++o < u && a(e[o], o, e) !== !1; )
|
1007
1007
|
;
|
1008
1008
|
return e;
|
1009
1009
|
}
|
1010
1010
|
function Ee(e, a) {
|
1011
|
-
for (var o = -1, u = a.length,
|
1012
|
-
e[
|
1011
|
+
for (var o = -1, u = a.length, M = e.length; ++o < u; )
|
1012
|
+
e[M + o] = a[o];
|
1013
1013
|
return e;
|
1014
1014
|
}
|
1015
1015
|
function Vt(e, a, o, u) {
|
1016
|
-
for (var
|
1017
|
-
o = a(o, e[
|
1016
|
+
for (var M = -1, w = e ? e.length : 0; ++M < w; )
|
1017
|
+
o = a(o, e[M], M, e);
|
1018
1018
|
return o;
|
1019
1019
|
}
|
1020
1020
|
function Xt(e, a) {
|
@@ -1034,10 +1034,10 @@ Je.exports;
|
|
1034
1034
|
}
|
1035
1035
|
return a;
|
1036
1036
|
}
|
1037
|
-
function
|
1037
|
+
function Me(e) {
|
1038
1038
|
var a = -1, o = Array(e.size);
|
1039
|
-
return e.forEach(function(u,
|
1040
|
-
o[++a] = [
|
1039
|
+
return e.forEach(function(u, M) {
|
1040
|
+
o[++a] = [M, u];
|
1041
1041
|
}), o;
|
1042
1042
|
}
|
1043
1043
|
function Jt(e, a) {
|
@@ -1045,48 +1045,48 @@ Je.exports;
|
|
1045
1045
|
return e(a(o));
|
1046
1046
|
};
|
1047
1047
|
}
|
1048
|
-
function
|
1048
|
+
function Oe(e) {
|
1049
1049
|
var a = -1, o = Array(e.size);
|
1050
1050
|
return e.forEach(function(u) {
|
1051
1051
|
o[++a] = u;
|
1052
1052
|
}), o;
|
1053
1053
|
}
|
1054
|
-
var
|
1054
|
+
var pr = Array.prototype, dr = Function.prototype, jt = Object.prototype, Zt = at["__core-js_shared__"], xe = function() {
|
1055
1055
|
var e = /[^.]+$/.exec(Zt && Zt.keys && Zt.keys.IE_PROTO || "");
|
1056
1056
|
return e ? "Symbol(src)_1." + e : "";
|
1057
|
-
}(),
|
1058
|
-
"^" +
|
1059
|
-
), It =
|
1060
|
-
function
|
1057
|
+
}(), De = dr.toString, ut = jt.hasOwnProperty, Rt = jt.toString, hr = RegExp(
|
1058
|
+
"^" + De.call(ut).replace(ar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
1059
|
+
), It = ke ? at.Buffer : void 0, Ft = at.Symbol, Qt = at.Uint8Array, rt = Jt(Object.getPrototypeOf, Object), Pe = Object.create, Ce = jt.propertyIsEnumerable, yr = pr.splice, te = Object.getOwnPropertySymbols, zt = It ? It.isBuffer : void 0, je = Jt(Object.keys, Object), Nt = ct(at, "DataView"), St = ct(at, "Map"), ot = ct(at, "Promise"), Ht = ct(at, "Set"), ee = ct(at, "WeakMap"), wt = ct(Object, "create"), re = q(Nt), kt = q(St), ne = q(ot), ie = q(Ht), ae = q(ee), gt = Ft ? Ft.prototype : void 0, Re = gt ? gt.valueOf : void 0;
|
1060
|
+
function dt(e) {
|
1061
1061
|
var a = -1, o = e ? e.length : 0;
|
1062
1062
|
for (this.clear(); ++a < o; ) {
|
1063
1063
|
var u = e[a];
|
1064
1064
|
this.set(u[0], u[1]);
|
1065
1065
|
}
|
1066
1066
|
}
|
1067
|
-
function
|
1067
|
+
function mr() {
|
1068
1068
|
this.__data__ = wt ? wt(null) : {};
|
1069
1069
|
}
|
1070
|
-
function
|
1070
|
+
function br(e) {
|
1071
1071
|
return this.has(e) && delete this.__data__[e];
|
1072
1072
|
}
|
1073
|
-
function
|
1073
|
+
function gr(e) {
|
1074
1074
|
var a = this.__data__;
|
1075
1075
|
if (wt) {
|
1076
1076
|
var o = a[e];
|
1077
1077
|
return o === i ? void 0 : o;
|
1078
1078
|
}
|
1079
|
-
return
|
1079
|
+
return ut.call(a, e) ? a[e] : void 0;
|
1080
1080
|
}
|
1081
1081
|
function Fe(e) {
|
1082
1082
|
var a = this.__data__;
|
1083
|
-
return wt ? a[e] !== void 0 :
|
1083
|
+
return wt ? a[e] !== void 0 : ut.call(a, e);
|
1084
1084
|
}
|
1085
1085
|
function se(e, a) {
|
1086
1086
|
var o = this.__data__;
|
1087
1087
|
return o[e] = wt && a === void 0 ? i : a, this;
|
1088
1088
|
}
|
1089
|
-
|
1089
|
+
dt.prototype.clear = mr, dt.prototype.delete = br, dt.prototype.get = gr, dt.prototype.has = Fe, dt.prototype.set = se;
|
1090
1090
|
function B(e) {
|
1091
1091
|
var a = -1, o = e ? e.length : 0;
|
1092
1092
|
for (this.clear(); ++a < o; ) {
|
@@ -1094,28 +1094,28 @@ Je.exports;
|
|
1094
1094
|
this.set(u[0], u[1]);
|
1095
1095
|
}
|
1096
1096
|
}
|
1097
|
-
function
|
1097
|
+
function _r() {
|
1098
1098
|
this.__data__ = [];
|
1099
1099
|
}
|
1100
|
-
function
|
1100
|
+
function vr(e) {
|
1101
1101
|
var a = this.__data__, o = Lt(a, e);
|
1102
1102
|
if (o < 0)
|
1103
1103
|
return !1;
|
1104
1104
|
var u = a.length - 1;
|
1105
|
-
return o == u ? a.pop() :
|
1105
|
+
return o == u ? a.pop() : yr.call(a, o, 1), !0;
|
1106
1106
|
}
|
1107
|
-
function
|
1107
|
+
function Ir(e) {
|
1108
1108
|
var a = this.__data__, o = Lt(a, e);
|
1109
1109
|
return o < 0 ? void 0 : a[o][1];
|
1110
1110
|
}
|
1111
|
-
function
|
1111
|
+
function Sr(e) {
|
1112
1112
|
return Lt(this.__data__, e) > -1;
|
1113
1113
|
}
|
1114
|
-
function
|
1114
|
+
function wr(e, a) {
|
1115
1115
|
var o = this.__data__, u = Lt(o, e);
|
1116
1116
|
return u < 0 ? o.push([e, a]) : o[u][1] = a, this;
|
1117
1117
|
}
|
1118
|
-
B.prototype.clear =
|
1118
|
+
B.prototype.clear = _r, B.prototype.delete = vr, B.prototype.get = Ir, B.prototype.has = Sr, B.prototype.set = wr;
|
1119
1119
|
function K(e) {
|
1120
1120
|
var a = -1, o = e ? e.length : 0;
|
1121
1121
|
for (this.clear(); ++a < o; ) {
|
@@ -1123,27 +1123,27 @@ Je.exports;
|
|
1123
1123
|
this.set(u[0], u[1]);
|
1124
1124
|
}
|
1125
1125
|
}
|
1126
|
-
function
|
1126
|
+
function kr() {
|
1127
1127
|
this.__data__ = {
|
1128
|
-
hash: new
|
1128
|
+
hash: new dt(),
|
1129
1129
|
map: new (St || B)(),
|
1130
|
-
string: new
|
1130
|
+
string: new dt()
|
1131
1131
|
};
|
1132
1132
|
}
|
1133
1133
|
function Tr(e) {
|
1134
1134
|
return Et(this, e).delete(e);
|
1135
1135
|
}
|
1136
|
-
function
|
1136
|
+
function Er(e) {
|
1137
1137
|
return Et(this, e).get(e);
|
1138
1138
|
}
|
1139
|
-
function
|
1139
|
+
function Ar(e) {
|
1140
1140
|
return Et(this, e).has(e);
|
1141
1141
|
}
|
1142
|
-
function
|
1142
|
+
function Mr(e, a) {
|
1143
1143
|
return Et(this, e).set(e, a), this;
|
1144
1144
|
}
|
1145
|
-
K.prototype.clear =
|
1146
|
-
function
|
1145
|
+
K.prototype.clear = kr, K.prototype.delete = Tr, K.prototype.get = Er, K.prototype.has = Ar, K.prototype.set = Mr;
|
1146
|
+
function Z(e) {
|
1147
1147
|
this.__data__ = new B(e);
|
1148
1148
|
}
|
1149
1149
|
function Or() {
|
@@ -1152,13 +1152,13 @@ Je.exports;
|
|
1152
1152
|
function xr(e) {
|
1153
1153
|
return this.__data__.delete(e);
|
1154
1154
|
}
|
1155
|
-
function
|
1155
|
+
function Dr(e) {
|
1156
1156
|
return this.__data__.get(e);
|
1157
1157
|
}
|
1158
1158
|
function Pr(e) {
|
1159
1159
|
return this.__data__.has(e);
|
1160
1160
|
}
|
1161
|
-
function
|
1161
|
+
function Cr(e, a) {
|
1162
1162
|
var o = this.__data__;
|
1163
1163
|
if (o instanceof B) {
|
1164
1164
|
var u = o.__data__;
|
@@ -1168,16 +1168,16 @@ Je.exports;
|
|
1168
1168
|
}
|
1169
1169
|
return o.set(e, a), this;
|
1170
1170
|
}
|
1171
|
-
|
1171
|
+
Z.prototype.clear = Or, Z.prototype.delete = xr, Z.prototype.get = Dr, Z.prototype.has = Pr, Z.prototype.set = Cr;
|
1172
1172
|
function Ut(e, a) {
|
1173
|
-
var o = le(e) || Wt(e) ? Xt(e.length, String) : [], u = o.length,
|
1173
|
+
var o = le(e) || Wt(e) ? Xt(e.length, String) : [], u = o.length, M = !!u;
|
1174
1174
|
for (var w in e)
|
1175
|
-
|
1175
|
+
ut.call(e, w) && !(M && (w == "length" || Yr(w, u))) && o.push(w);
|
1176
1176
|
return o;
|
1177
1177
|
}
|
1178
1178
|
function ze(e, a, o) {
|
1179
1179
|
var u = e[a];
|
1180
|
-
(!(
|
1180
|
+
(!(ut.call(e, a) && Ge(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,66 +1185,66 @@ Je.exports;
|
|
1185
1185
|
return o;
|
1186
1186
|
return -1;
|
1187
1187
|
}
|
1188
|
-
function
|
1188
|
+
function lt(e, a) {
|
1189
1189
|
return e && ue(a, pe(a), e);
|
1190
1190
|
}
|
1191
|
-
function oe(e, a, o, u,
|
1192
|
-
var
|
1193
|
-
if (u && (
|
1194
|
-
return
|
1195
|
-
if (!
|
1191
|
+
function oe(e, a, o, u, M, w, j) {
|
1192
|
+
var C;
|
1193
|
+
if (u && (C = w ? u(e, M, w, j) : u(e)), C !== void 0)
|
1194
|
+
return C;
|
1195
|
+
if (!pt(e))
|
1196
1196
|
return e;
|
1197
1197
|
var L = le(e);
|
1198
1198
|
if (L) {
|
1199
|
-
if (
|
1200
|
-
return
|
1199
|
+
if (C = $r(e), !a)
|
1200
|
+
return Gr(e, C);
|
1201
1201
|
} else {
|
1202
|
-
var R =
|
1202
|
+
var R = yt(e), Y = R == T || R == H;
|
1203
1203
|
if (We(e))
|
1204
1204
|
return Gt(e, a);
|
1205
|
-
if (R ==
|
1205
|
+
if (R == y || R == c || Y && !w) {
|
1206
1206
|
if (qt(e))
|
1207
1207
|
return w ? e : {};
|
1208
|
-
if (
|
1209
|
-
return
|
1208
|
+
if (C = ft(Y ? {} : e), !a)
|
1209
|
+
return Wr(e, lt(C, e));
|
1210
1210
|
} else {
|
1211
1211
|
if (!z[R])
|
1212
1212
|
return w ? e : {};
|
1213
|
-
|
1213
|
+
C = Kr(e, R, oe, a);
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
|
-
|
1217
|
-
var
|
1218
|
-
if (
|
1219
|
-
return
|
1220
|
-
if (
|
1221
|
-
var G = o ?
|
1222
|
-
return
|
1223
|
-
G && ($ = V, V = e[$]), ze(
|
1224
|
-
}),
|
1225
|
-
}
|
1226
|
-
function
|
1227
|
-
return
|
1228
|
-
}
|
1229
|
-
function
|
1216
|
+
j || (j = new Z());
|
1217
|
+
var Q = j.get(e);
|
1218
|
+
if (Q)
|
1219
|
+
return Q;
|
1220
|
+
if (j.set(e, C), !L)
|
1221
|
+
var G = o ? Br(e) : pe(e);
|
1222
|
+
return Te(G || e, function(V, $) {
|
1223
|
+
G && ($ = V, V = e[$]), ze(C, $, oe(V, a, o, u, $, e, j));
|
1224
|
+
}), C;
|
1225
|
+
}
|
1226
|
+
function jr(e) {
|
1227
|
+
return pt(e) ? Pe(e) : {};
|
1228
|
+
}
|
1229
|
+
function Rr(e, a, o) {
|
1230
1230
|
var u = a(e);
|
1231
1231
|
return le(e) ? u : Ee(u, o(e));
|
1232
1232
|
}
|
1233
|
-
function
|
1233
|
+
function Fr(e) {
|
1234
1234
|
return Rt.call(e);
|
1235
1235
|
}
|
1236
|
-
function
|
1237
|
-
if (!
|
1236
|
+
function zr(e) {
|
1237
|
+
if (!pt(e) || Xr(e))
|
1238
1238
|
return !1;
|
1239
|
-
var a = fe(e) || qt(e) ?
|
1240
|
-
return a.test(
|
1239
|
+
var a = fe(e) || qt(e) ? hr : or;
|
1240
|
+
return a.test(q(e));
|
1241
1241
|
}
|
1242
|
-
function
|
1242
|
+
function Nr(e) {
|
1243
1243
|
if (!Ue(e))
|
1244
1244
|
return je(e);
|
1245
1245
|
var a = [];
|
1246
1246
|
for (var o in Object(e))
|
1247
|
-
|
1247
|
+
ut.call(e, o) && o != "constructor" && a.push(o);
|
1248
1248
|
return a;
|
1249
1249
|
}
|
1250
1250
|
function Gt(e, a) {
|
@@ -1257,30 +1257,30 @@ Je.exports;
|
|
1257
1257
|
var a = new e.constructor(e.byteLength);
|
1258
1258
|
return new Qt(a).set(new Qt(e)), a;
|
1259
1259
|
}
|
1260
|
-
function
|
1260
|
+
function Tt(e, a) {
|
1261
1261
|
var o = a ? ce(e.buffer) : e.buffer;
|
1262
1262
|
return new e.constructor(o, e.byteOffset, e.byteLength);
|
1263
1263
|
}
|
1264
1264
|
function Ne(e, a, o) {
|
1265
|
-
var u = a ? o(
|
1266
|
-
return Vt(u,
|
1265
|
+
var u = a ? o(Me(e), !0) : Me(e);
|
1266
|
+
return Vt(u, fr, new e.constructor());
|
1267
1267
|
}
|
1268
1268
|
function He(e) {
|
1269
|
-
var a = new e.constructor(e.source,
|
1269
|
+
var a = new e.constructor(e.source, sr.exec(e));
|
1270
1270
|
return a.lastIndex = e.lastIndex, a;
|
1271
1271
|
}
|
1272
|
-
function
|
1273
|
-
var u = a ? o(
|
1274
|
-
return Vt(u,
|
1272
|
+
function Hr(e, a, o) {
|
1273
|
+
var u = a ? o(Oe(e), !0) : Oe(e);
|
1274
|
+
return Vt(u, st, new e.constructor());
|
1275
1275
|
}
|
1276
|
-
function
|
1276
|
+
function Ur(e) {
|
1277
1277
|
return Re ? Object(Re.call(e)) : {};
|
1278
1278
|
}
|
1279
|
-
function
|
1279
|
+
function Lr(e, a) {
|
1280
1280
|
var o = a ? ce(e.buffer) : e.buffer;
|
1281
1281
|
return new e.constructor(o, e.byteOffset, e.length);
|
1282
1282
|
}
|
1283
|
-
function
|
1283
|
+
function Gr(e, a) {
|
1284
1284
|
var o = -1, u = e.length;
|
1285
1285
|
for (a || (a = Array(u)); ++o < u; )
|
1286
1286
|
a[o] = e[o];
|
@@ -1288,102 +1288,102 @@ Je.exports;
|
|
1288
1288
|
}
|
1289
1289
|
function ue(e, a, o, u) {
|
1290
1290
|
o || (o = {});
|
1291
|
-
for (var
|
1292
|
-
var
|
1293
|
-
ze(o,
|
1291
|
+
for (var M = -1, w = a.length; ++M < w; ) {
|
1292
|
+
var j = a[M], C = void 0;
|
1293
|
+
ze(o, j, C === void 0 ? e[j] : C);
|
1294
1294
|
}
|
1295
1295
|
return o;
|
1296
1296
|
}
|
1297
|
-
function
|
1298
|
-
return ue(e,
|
1297
|
+
function Wr(e, a) {
|
1298
|
+
return ue(e, ht(e), a);
|
1299
1299
|
}
|
1300
|
-
function
|
1301
|
-
return
|
1300
|
+
function Br(e) {
|
1301
|
+
return Rr(e, pe, ht);
|
1302
1302
|
}
|
1303
1303
|
function Et(e, a) {
|
1304
1304
|
var o = e.__data__;
|
1305
|
-
return
|
1305
|
+
return Vr(a) ? o[typeof a == "string" ? "string" : "hash"] : o.map;
|
1306
1306
|
}
|
1307
|
-
function
|
1307
|
+
function ct(e, a) {
|
1308
1308
|
var o = Ae(e, a);
|
1309
|
-
return
|
1309
|
+
return zr(o) ? o : void 0;
|
1310
1310
|
}
|
1311
|
-
var
|
1312
|
-
(Nt &&
|
1313
|
-
var a = Rt.call(e), o = a ==
|
1311
|
+
var ht = te ? Jt(te, Object) : Jr, yt = Fr;
|
1312
|
+
(Nt && yt(new Nt(new ArrayBuffer(1))) != E || St && yt(new St()) != g || ot && yt(ot.resolve()) != l || Ht && yt(new Ht()) != S || ee && yt(new ee()) != d) && (yt = function(e) {
|
1313
|
+
var a = Rt.call(e), o = a == y ? e.constructor : void 0, u = o ? q(o) : void 0;
|
1314
1314
|
if (u)
|
1315
1315
|
switch (u) {
|
1316
1316
|
case re:
|
1317
|
-
return
|
1318
|
-
case
|
1319
|
-
return
|
1317
|
+
return E;
|
1318
|
+
case kt:
|
1319
|
+
return g;
|
1320
1320
|
case ne:
|
1321
1321
|
return l;
|
1322
1322
|
case ie:
|
1323
|
-
return
|
1323
|
+
return S;
|
1324
1324
|
case ae:
|
1325
|
-
return
|
1325
|
+
return d;
|
1326
1326
|
}
|
1327
1327
|
return a;
|
1328
1328
|
});
|
1329
|
-
function
|
1329
|
+
function $r(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" && ut.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
1332
1332
|
}
|
1333
|
-
function
|
1334
|
-
return typeof e.constructor == "function" && !Ue(e) ?
|
1333
|
+
function ft(e) {
|
1334
|
+
return typeof e.constructor == "function" && !Ue(e) ? jr(rt(e)) : {};
|
1335
1335
|
}
|
1336
|
-
function
|
1337
|
-
var
|
1336
|
+
function Kr(e, a, o, u) {
|
1337
|
+
var M = e.constructor;
|
1338
1338
|
switch (a) {
|
1339
|
-
case
|
1339
|
+
case O:
|
1340
1340
|
return ce(e);
|
1341
|
-
case
|
1341
|
+
case h:
|
1342
1342
|
case x:
|
1343
|
-
return new
|
1344
|
-
case
|
1345
|
-
return
|
1343
|
+
return new M(+e);
|
1344
|
+
case E:
|
1345
|
+
return Tt(e, u);
|
1346
|
+
case _:
|
1347
|
+
case D:
|
1346
1348
|
case I:
|
1347
|
-
case
|
1348
|
-
case S:
|
1349
|
-
case j:
|
1349
|
+
case P:
|
1350
1350
|
case k:
|
1351
|
-
case
|
1351
|
+
case A:
|
1352
1352
|
case U:
|
1353
|
-
case
|
1353
|
+
case J:
|
1354
1354
|
case Se:
|
1355
|
-
return
|
1356
|
-
case
|
1355
|
+
return Lr(e, u);
|
1356
|
+
case g:
|
1357
1357
|
return Ne(e, u, o);
|
1358
1358
|
case p:
|
1359
|
-
case _:
|
1360
|
-
return new A(e);
|
1361
|
-
case y:
|
1362
|
-
return He(e);
|
1363
1359
|
case v:
|
1364
|
-
return
|
1360
|
+
return new M(e);
|
1365
1361
|
case m:
|
1366
|
-
return
|
1362
|
+
return He(e);
|
1363
|
+
case S:
|
1364
|
+
return Hr(e, u, o);
|
1365
|
+
case b:
|
1366
|
+
return Ur(e);
|
1367
1367
|
}
|
1368
1368
|
}
|
1369
|
-
function
|
1370
|
-
return a = a ?? s, !!a && (typeof e == "number" ||
|
1369
|
+
function Yr(e, a) {
|
1370
|
+
return a = a ?? s, !!a && (typeof e == "number" || cr.test(e)) && e > -1 && e % 1 == 0 && e < a;
|
1371
1371
|
}
|
1372
|
-
function
|
1372
|
+
function Vr(e) {
|
1373
1373
|
var a = typeof e;
|
1374
1374
|
return a == "string" || a == "number" || a == "symbol" || a == "boolean" ? e !== "__proto__" : e === null;
|
1375
1375
|
}
|
1376
|
-
function
|
1377
|
-
return !!
|
1376
|
+
function Xr(e) {
|
1377
|
+
return !!xe && xe in e;
|
1378
1378
|
}
|
1379
1379
|
function Ue(e) {
|
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 q(e) {
|
1384
1384
|
if (e != null) {
|
1385
1385
|
try {
|
1386
|
-
return
|
1386
|
+
return De.call(e);
|
1387
1387
|
} catch {
|
1388
1388
|
}
|
1389
1389
|
try {
|
@@ -1400,24 +1400,24 @@ Je.exports;
|
|
1400
1400
|
return e === a || e !== e && a !== a;
|
1401
1401
|
}
|
1402
1402
|
function Wt(e) {
|
1403
|
-
return
|
1403
|
+
return qr(e) && ut.call(e, "callee") && (!Ce.call(e, "callee") || Rt.call(e) == c);
|
1404
1404
|
}
|
1405
1405
|
var le = Array.isArray;
|
1406
1406
|
function Bt(e) {
|
1407
1407
|
return e != null && Be(e.length) && !fe(e);
|
1408
1408
|
}
|
1409
|
-
function
|
1409
|
+
function qr(e) {
|
1410
1410
|
return $e(e) && Bt(e);
|
1411
1411
|
}
|
1412
|
-
var We = zt ||
|
1412
|
+
var We = zt || Zr;
|
1413
1413
|
function fe(e) {
|
1414
|
-
var a =
|
1415
|
-
return a ==
|
1414
|
+
var a = pt(e) ? Rt.call(e) : "";
|
1415
|
+
return a == T || a == H;
|
1416
1416
|
}
|
1417
1417
|
function Be(e) {
|
1418
1418
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= s;
|
1419
1419
|
}
|
1420
|
-
function
|
1420
|
+
function pt(e) {
|
1421
1421
|
var a = typeof e;
|
1422
1422
|
return !!e && (a == "object" || a == "function");
|
1423
1423
|
}
|
@@ -1425,18 +1425,18 @@ Je.exports;
|
|
1425
1425
|
return !!e && typeof e == "object";
|
1426
1426
|
}
|
1427
1427
|
function pe(e) {
|
1428
|
-
return Bt(e) ? Ut(e) :
|
1428
|
+
return Bt(e) ? Ut(e) : Nr(e);
|
1429
1429
|
}
|
1430
|
-
function
|
1430
|
+
function Jr() {
|
1431
1431
|
return [];
|
1432
1432
|
}
|
1433
|
-
function
|
1433
|
+
function Zr() {
|
1434
1434
|
return !1;
|
1435
1435
|
}
|
1436
1436
|
t.exports = Le;
|
1437
|
-
})(
|
1438
|
-
var
|
1439
|
-
const
|
1437
|
+
})(Ze, Ze.exports);
|
1438
|
+
var Ki = Ze.exports;
|
1439
|
+
const X = /* @__PURE__ */ gn(Ki), Yi = (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 Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
|
|
1444
1444
|
}, i.onerror = (s) => {
|
1445
1445
|
n(s);
|
1446
1446
|
}, i.crossOrigin = "anonymous", i.src = t;
|
1447
|
-
}),
|
1447
|
+
}), Vi = (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 Z = /* @__PURE__ */ bn($i), Ki = (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
|
+
}), Xi = (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;
|
@@ -1467,7 +1467,7 @@ const Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
|
|
1467
1467
|
}), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
|
1468
1468
|
const i = getComputedStyle(n).height;
|
1469
1469
|
return document.body.removeChild(n), parseFloat(i);
|
1470
|
-
},
|
1470
|
+
}, _n = (t) => {
|
1471
1471
|
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((i) => i));
|
1472
1472
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, i) => {
|
1473
1473
|
Promise.all(r).then((s) => {
|
@@ -1476,7 +1476,7 @@ const Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
|
|
1476
1476
|
});
|
1477
1477
|
}).catch((s) => i(s));
|
1478
1478
|
});
|
1479
|
-
},
|
1479
|
+
}, rr = {
|
1480
1480
|
color: "#000000",
|
1481
1481
|
x: 0,
|
1482
1482
|
y: 0,
|
@@ -1516,7 +1516,7 @@ const Z = /* @__PURE__ */ bn($i), Ki = (t) => new Promise((r, n) => {
|
|
1516
1516
|
from: 0,
|
1517
1517
|
to: r.duration
|
1518
1518
|
};
|
1519
|
-
function
|
1519
|
+
function nr(t, r) {
|
1520
1520
|
const n = {
|
1521
1521
|
x: t.size.width / 2,
|
1522
1522
|
y: t.size.height / 2
|
@@ -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 Xi(n), s = nr(r, {
|
1535
1535
|
...i
|
1536
1536
|
}), c = ei(t.trim, { duration: i.duration }), f = {
|
1537
1537
|
width: i.width,
|
@@ -1546,7 +1546,7 @@ const Pn = async (t, r) => {
|
|
1546
1546
|
// Default border width
|
1547
1547
|
borderColor: t.details.borderColor || "#000000",
|
1548
1548
|
// Default border color
|
1549
|
-
boxShadow: t.details.boxShadow ||
|
1549
|
+
boxShadow: t.details.boxShadow || rr,
|
1550
1550
|
top: t.details.top || s.top || "0px",
|
1551
1551
|
// Default top
|
1552
1552
|
left: t.details.left || s.left || "0px",
|
@@ -1569,8 +1569,11 @@ const Pn = async (t, r) => {
|
|
1569
1569
|
display: _e(t.display, { duration: i.duration, trim: c }),
|
1570
1570
|
duration: i.duration
|
1571
1571
|
};
|
1572
|
-
},
|
1573
|
-
|
1572
|
+
}, Cn = async (t) => {
|
1573
|
+
console.log({ payload: t });
|
1574
|
+
const r = t.id, n = t.details, i = await Vi(n.src);
|
1575
|
+
console.log({ audioData: i });
|
1576
|
+
const s = i.duration, c = ei(t.trim, { duration: s });
|
1574
1577
|
return {
|
1575
1578
|
id: r,
|
1576
1579
|
name: "",
|
@@ -1586,8 +1589,9 @@ const Pn = async (t, r) => {
|
|
1586
1589
|
metadata: { ...t.metadata },
|
1587
1590
|
duration: s
|
1588
1591
|
};
|
1589
|
-
},
|
1590
|
-
|
1592
|
+
}, jn = async (t, r) => {
|
1593
|
+
console.log({ payload: t });
|
1594
|
+
const n = t.details, i = await Yi(n.src), s = nr(r, i);
|
1591
1595
|
return {
|
1592
1596
|
id: t.id,
|
1593
1597
|
type: "image",
|
@@ -1609,7 +1613,7 @@ const Pn = async (t, r) => {
|
|
1609
1613
|
// Default border
|
1610
1614
|
borderRadius: n.borderRadius || 0,
|
1611
1615
|
// Default border radius
|
1612
|
-
boxShadow: n.boxShadow ||
|
1616
|
+
boxShadow: n.boxShadow || rr,
|
1613
1617
|
// Default box shadow
|
1614
1618
|
top: n.top || s.top || "0px",
|
1615
1619
|
// Default top
|
@@ -1627,15 +1631,15 @@ const Pn = async (t, r) => {
|
|
1627
1631
|
},
|
1628
1632
|
metadata: t.metadata || {}
|
1629
1633
|
};
|
1630
|
-
},
|
1634
|
+
}, Rn = async (t, r) => {
|
1631
1635
|
const n = t;
|
1632
|
-
n.details.fontUrl && await
|
1636
|
+
n.details.fontUrl && await _n([
|
1633
1637
|
{
|
1634
1638
|
fontFamily: n.details.fontFamily,
|
1635
1639
|
url: n.details.fontUrl
|
1636
1640
|
}
|
1637
1641
|
]);
|
1638
|
-
const i = n.id, s = n.details, c = ri(s), f = ti(n.details.text, c),
|
1642
|
+
const i = n.id, s = n.details, c = ri(s), f = ti(n.details.text, c), h = nr(r, {
|
1639
1643
|
width: c.width,
|
1640
1644
|
height: f
|
1641
1645
|
});
|
@@ -1651,23 +1655,23 @@ const Pn = async (t, r) => {
|
|
1651
1655
|
height: f,
|
1652
1656
|
// Default height
|
1653
1657
|
fontUrl: s.fontUrl,
|
1654
|
-
top: c.top ||
|
1655
|
-
left: c.left ||
|
1658
|
+
top: c.top || h.top,
|
1659
|
+
left: c.left || h.left,
|
1656
1660
|
borderWidth: s.borderWidth || 0,
|
1657
1661
|
borderColor: s.borderColor || "#000000",
|
1658
|
-
boxShadow: s.boxShadow ||
|
1662
|
+
boxShadow: s.boxShadow || rr,
|
1659
1663
|
words: s.words || []
|
1660
1664
|
},
|
1661
1665
|
metadata: {}
|
1662
1666
|
};
|
1663
|
-
},
|
1664
|
-
t.details.fontUrl && await
|
1667
|
+
}, Fn = async (t, r) => {
|
1668
|
+
t.details.fontUrl && await _n([
|
1665
1669
|
{
|
1666
1670
|
fontFamily: t.details.fontFamily,
|
1667
1671
|
url: t.details.fontUrl
|
1668
1672
|
}
|
1669
1673
|
]);
|
1670
|
-
const n = t.id, i = t.details, s = ri(i), c = ti(t.details.text, s), f =
|
1674
|
+
const n = t.id, i = t.details, s = ri(i), c = ti(t.details.text, s), f = nr(r, {
|
1671
1675
|
width: s.width,
|
1672
1676
|
height: c
|
1673
1677
|
});
|
@@ -1687,7 +1691,7 @@ const Pn = async (t, r) => {
|
|
1687
1691
|
left: s.left || f.left,
|
1688
1692
|
borderWidth: i.borderWidth || 0,
|
1689
1693
|
borderColor: i.borderColor || "#000000",
|
1690
|
-
boxShadow: i.boxShadow ||
|
1694
|
+
boxShadow: i.boxShadow || rr
|
1691
1695
|
},
|
1692
1696
|
metadata: {}
|
1693
1697
|
};
|
@@ -1729,18 +1733,18 @@ const Pn = async (t, r) => {
|
|
1729
1733
|
//'break-all',
|
1730
1734
|
WebkitTextStrokeColor: t.WebkitTextStrokeColor || "#ffffff",
|
1731
1735
|
WebkitTextStrokeWidth: t.WebkitTextStrokeWidth || "0px",
|
1732
|
-
top: t.top
|
1733
|
-
left: t.left
|
1736
|
+
top: t.top,
|
1737
|
+
left: t.left,
|
1734
1738
|
textTransform: t.textTransform || "none",
|
1735
1739
|
transform: t.transform || "none"
|
1736
|
-
}),
|
1737
|
-
let
|
1740
|
+
}), qi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
1741
|
+
let qe = (t = 21) => {
|
1738
1742
|
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
1739
1743
|
for (; t--; )
|
1740
|
-
r +=
|
1744
|
+
r += qi[n[t] & 63];
|
1741
1745
|
return r;
|
1742
1746
|
};
|
1743
|
-
function
|
1747
|
+
function Ji(t, r) {
|
1744
1748
|
return t.filter((i) => {
|
1745
1749
|
if (r.forEach((s) => {
|
1746
1750
|
i.items.includes(s) && (i.items = i.items.filter((c) => c !== s));
|
@@ -1748,16 +1752,16 @@ function qi(t, r) {
|
|
1748
1752
|
return i;
|
1749
1753
|
});
|
1750
1754
|
}
|
1751
|
-
function
|
1755
|
+
function en(t = 16) {
|
1752
1756
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
1753
|
-
let i =
|
1757
|
+
let i = qe(t - 1);
|
1754
1758
|
return i = i.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + i;
|
1755
1759
|
}
|
1756
1760
|
const Yt = (t) => Object.keys(t).reduce((r, n) => {
|
1757
1761
|
const { display: i, playbackRate: s } = t[n];
|
1758
1762
|
return Math.max(r, i.to / (s || 1));
|
1759
1763
|
}, 0);
|
1760
|
-
function
|
1764
|
+
function Zi(t) {
|
1761
1765
|
const r = $t.pipe(
|
1762
1766
|
Kt(({ key: p }) => p.startsWith(di))
|
1763
1767
|
), n = $t.pipe(
|
@@ -1770,188 +1774,231 @@ function Ji(t) {
|
|
1770
1774
|
Kt(({ key: p }) => p.startsWith(bi))
|
1771
1775
|
), f = $t.pipe(
|
1772
1776
|
Kt(({ key: p }) => p.startsWith(gi))
|
1773
|
-
),
|
1774
|
-
var
|
1777
|
+
), h = r.subscribe(async (p) => {
|
1778
|
+
var y, l;
|
1775
1779
|
if (p.key === _i) {
|
1776
|
-
const
|
1780
|
+
const m = (y = p.value) == null ? void 0 : y.payload, S = m.size, v = m.trackItemIds, b = m.trackItemsMap, d = m.trackItemDetailsMap;
|
1777
1781
|
console.warn("IMPROVE FONTS LOADING");
|
1778
|
-
const
|
1779
|
-
var
|
1782
|
+
const O = v.map(async (_) => {
|
1783
|
+
var D;
|
1780
1784
|
try {
|
1781
|
-
const
|
1782
|
-
if (
|
1783
|
-
const k = await
|
1784
|
-
{ id:
|
1785
|
+
const I = d[_], P = b[_];
|
1786
|
+
if (I.type === "image") {
|
1787
|
+
const k = await jn(
|
1788
|
+
{ id: _, details: I.details, ...P },
|
1785
1789
|
{
|
1786
|
-
size:
|
1790
|
+
size: S
|
1787
1791
|
}
|
1788
|
-
), { details:
|
1789
|
-
|
1790
|
-
} else if (
|
1791
|
-
const k =
|
1792
|
-
(
|
1793
|
-
),
|
1794
|
-
{ ...
|
1792
|
+
), { details: A, ...U } = k;
|
1793
|
+
d[_] = { type: "image", details: A }, b[_] = U;
|
1794
|
+
} else if (I.type === "video") {
|
1795
|
+
const k = X(
|
1796
|
+
(D = p.value) == null ? void 0 : D.payload.trackItemsMap[_]
|
1797
|
+
), A = await Pn(
|
1798
|
+
{ ...I, ...k, ...P },
|
1795
1799
|
{
|
1796
|
-
size:
|
1800
|
+
size: S
|
1797
1801
|
}
|
1798
|
-
), { details: U, ...
|
1799
|
-
|
1800
|
-
} else if (
|
1801
|
-
const k = await
|
1802
|
-
id:
|
1803
|
-
details:
|
1804
|
-
...
|
1805
|
-
}), { details:
|
1806
|
-
|
1807
|
-
} else if (
|
1808
|
-
const k = await
|
1809
|
-
{ id:
|
1802
|
+
), { details: U, ...J } = A;
|
1803
|
+
d[_] = { type: "video", details: U }, b[_] = J;
|
1804
|
+
} else if (I.type === "audio") {
|
1805
|
+
const k = await Cn({
|
1806
|
+
id: _,
|
1807
|
+
details: I.details,
|
1808
|
+
...P
|
1809
|
+
}), { details: A, ...U } = k;
|
1810
|
+
d[_] = { type: "audio", details: A }, b[_] = U;
|
1811
|
+
} else if (I.type === "caption") {
|
1812
|
+
const k = await Rn(
|
1813
|
+
{ id: _, details: I.details, ...P },
|
1810
1814
|
{
|
1811
|
-
size:
|
1815
|
+
size: S
|
1812
1816
|
}
|
1813
|
-
), { details:
|
1814
|
-
|
1815
|
-
} else if (
|
1816
|
-
const k = await
|
1817
|
-
{ id:
|
1817
|
+
), { details: A, ...U } = k;
|
1818
|
+
d[_] = { type: "caption", details: A }, b[_] = U;
|
1819
|
+
} else if (I.type === "text") {
|
1820
|
+
const k = await Fn(
|
1821
|
+
{ id: _, details: I.details, ...P },
|
1818
1822
|
{
|
1819
|
-
size:
|
1823
|
+
size: S
|
1820
1824
|
}
|
1821
|
-
), { details:
|
1822
|
-
|
1825
|
+
), { details: A, ...U } = k;
|
1826
|
+
d[_] = { type: "text", details: A }, b[_] = U;
|
1823
1827
|
}
|
1824
1828
|
return !0;
|
1825
1829
|
} catch {
|
1826
1830
|
return !1;
|
1827
1831
|
}
|
1828
1832
|
});
|
1829
|
-
await Promise.all(
|
1830
|
-
const
|
1833
|
+
await Promise.all(O);
|
1834
|
+
const E = Yt(b);
|
1831
1835
|
t.updateState({
|
1832
|
-
...
|
1833
|
-
trackItemsMap:
|
1834
|
-
duration:
|
1836
|
+
...m,
|
1837
|
+
trackItemsMap: b,
|
1838
|
+
duration: E
|
1835
1839
|
});
|
1836
1840
|
}
|
1837
1841
|
if (p.key === vi) {
|
1838
|
-
const
|
1842
|
+
const m = (l = p.value) == null ? void 0 : l.payload;
|
1839
1843
|
t.updateState({
|
1840
|
-
size:
|
1844
|
+
size: m
|
1841
1845
|
});
|
1842
1846
|
}
|
1843
1847
|
}), x = s.subscribe((p) => {
|
1844
1848
|
if (p.key === Ii) return t.undo();
|
1845
1849
|
if (p.key === Si) return t.redo();
|
1846
1850
|
}), F = i.subscribe((p) => {
|
1847
|
-
var
|
1848
|
-
const
|
1849
|
-
if ((
|
1850
|
-
const
|
1851
|
-
(
|
1852
|
-
),
|
1853
|
-
Object.entries(
|
1854
|
-
([
|
1851
|
+
var m, S, v, b;
|
1852
|
+
const y = [], l = [];
|
1853
|
+
if ((m = p.value) != null && m.payload.trackItemIds && (y.push((S = p.value) == null ? void 0 : S.payload.trackItemIds), t.updateState({ activeIds: y })), p.key === wi) {
|
1854
|
+
const d = (v = p.value) == null ? void 0 : v.payload.trackItemIds, O = X(t.getState()), E = d && d.length ? d : O.activeIds, _ = O.trackItemIds, D = O.trackItemDetailsMap, I = _.filter(
|
1855
|
+
(J) => !E.includes(J)
|
1856
|
+
), P = Object.fromEntries(
|
1857
|
+
Object.entries(D).filter(
|
1858
|
+
([J]) => !E.includes(J)
|
1855
1859
|
)
|
1856
|
-
),
|
1857
|
-
|
1858
|
-
|
1859
|
-
),
|
1860
|
-
Object.entries(
|
1861
|
-
([
|
1860
|
+
), k = Ji(
|
1861
|
+
O.tracks,
|
1862
|
+
E
|
1863
|
+
), A = Object.fromEntries(
|
1864
|
+
Object.entries(O.trackItemsMap).filter(
|
1865
|
+
([J]) => !E.includes(J)
|
1862
1866
|
)
|
1863
|
-
),
|
1867
|
+
), U = Yt(A);
|
1864
1868
|
t.updateState(
|
1865
1869
|
{
|
1866
1870
|
trackItemIds: I,
|
1867
|
-
trackItemDetailsMap:
|
1871
|
+
trackItemDetailsMap: P,
|
1868
1872
|
activeIds: [],
|
1869
|
-
trackItemsMap:
|
1870
|
-
tracks:
|
1871
|
-
duration:
|
1873
|
+
trackItemsMap: A,
|
1874
|
+
tracks: k,
|
1875
|
+
duration: U
|
1872
1876
|
},
|
1873
1877
|
{ updateHistory: !0, kind: "remove" }
|
1874
1878
|
);
|
1875
1879
|
}
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
+
if (p.key === ki) {
|
1881
|
+
const d = X(t.getState()), O = ((b = p.value) == null ? void 0 : b.payload.trackItemIds) || d.activeIds;
|
1882
|
+
if (O.length === 0) return;
|
1883
|
+
O.forEach((_) => {
|
1884
|
+
const D = d.trackItemsMap[_], I = d.trackItemDetailsMap[_], P = en();
|
1885
|
+
l.push(P), d.trackItemsMap = {
|
1886
|
+
...d.trackItemsMap,
|
1887
|
+
[P]: { ...X(D), id: P }
|
1888
|
+
}, d.trackItemDetailsMap = {
|
1889
|
+
...d.trackItemDetailsMap,
|
1890
|
+
[P]: {
|
1891
|
+
...X(I)
|
1892
|
+
}
|
1893
|
+
}, d.trackItemIds.push(P);
|
1894
|
+
});
|
1895
|
+
const E = [];
|
1896
|
+
d.tracks.forEach((_) => {
|
1897
|
+
const D = {
|
1898
|
+
..._,
|
1899
|
+
items: [],
|
1900
|
+
id: qe()
|
1901
|
+
};
|
1902
|
+
_.items.forEach((I) => {
|
1903
|
+
if (O.includes(I)) {
|
1904
|
+
const P = O.indexOf(I);
|
1905
|
+
D.items.push(l[P]);
|
1906
|
+
}
|
1907
|
+
}), E.push(D);
|
1908
|
+
}), E.forEach((_) => {
|
1909
|
+
_.items.length !== 0 && d.tracks.unshift(_);
|
1910
|
+
}), t.updateState(
|
1911
|
+
{
|
1912
|
+
trackItemDetailsMap: d.trackItemDetailsMap,
|
1913
|
+
tracks: d.tracks,
|
1914
|
+
trackItemIds: d.trackItemIds,
|
1915
|
+
trackItemsMap: d.trackItemsMap
|
1916
|
+
},
|
1917
|
+
{
|
1918
|
+
updateHistory: !0,
|
1919
|
+
kind: "update"
|
1920
|
+
}
|
1921
|
+
);
|
1922
|
+
}
|
1923
|
+
}), T = n.subscribe(async (p) => {
|
1924
|
+
var v, b, d, O, E;
|
1925
|
+
const y = X(t.getState());
|
1926
|
+
let l = [], m = "text";
|
1880
1927
|
if (p.key === Ti) {
|
1881
|
-
|
1882
|
-
const
|
1883
|
-
for (const k of
|
1884
|
-
const
|
1885
|
-
size:
|
1928
|
+
m = "caption";
|
1929
|
+
const _ = (v = p.value) == null ? void 0 : v.payload, D = [];
|
1930
|
+
for (const k of _) {
|
1931
|
+
const A = Rn(k, {
|
1932
|
+
size: y.size
|
1886
1933
|
});
|
1887
|
-
|
1934
|
+
D.push(A);
|
1888
1935
|
}
|
1889
|
-
const
|
1890
|
-
for (const k of
|
1891
|
-
const
|
1892
|
-
|
1893
|
-
const { details: U, ...
|
1894
|
-
|
1895
|
-
type:
|
1936
|
+
const I = await Promise.all(D), P = [];
|
1937
|
+
for (const k of I) {
|
1938
|
+
const A = k.id;
|
1939
|
+
P.push(A);
|
1940
|
+
const { details: U, ...J } = k;
|
1941
|
+
y.trackItemDetailsMap[A] = {
|
1942
|
+
type: m,
|
1896
1943
|
details: U
|
1897
|
-
},
|
1944
|
+
}, y.trackItemsMap[A] = J, y.trackItemIds.push(A);
|
1898
1945
|
}
|
1899
|
-
l =
|
1900
|
-
}
|
1901
|
-
if (p.key === ki) {
|
1902
|
-
y = "text";
|
1903
|
-
const I = await Rn((m = p.value) == null ? void 0 : m.payload, {
|
1904
|
-
size: h.size
|
1905
|
-
}), { details: M, ...S } = I;
|
1906
|
-
h.trackItemDetailsMap[S.id] = {
|
1907
|
-
type: y,
|
1908
|
-
details: M
|
1909
|
-
}, h.trackItemsMap[S.id] = S, h.trackItemIds.push(S.id), l = [S.id];
|
1946
|
+
l = P;
|
1910
1947
|
}
|
1911
1948
|
if (p.key === Ei) {
|
1912
|
-
|
1913
|
-
const
|
1914
|
-
size:
|
1915
|
-
}), { details:
|
1916
|
-
|
1917
|
-
type:
|
1918
|
-
details:
|
1919
|
-
},
|
1949
|
+
m = "text";
|
1950
|
+
const _ = await Fn((b = p.value) == null ? void 0 : b.payload, {
|
1951
|
+
size: y.size
|
1952
|
+
}), { details: D, ...I } = _;
|
1953
|
+
y.trackItemDetailsMap[I.id] = {
|
1954
|
+
type: m,
|
1955
|
+
details: D
|
1956
|
+
}, y.trackItemsMap[I.id] = I, y.trackItemIds.push(I.id), l = [I.id];
|
1920
1957
|
}
|
1921
1958
|
if (p.key === Ai) {
|
1922
|
-
|
1923
|
-
const
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1959
|
+
m = "image";
|
1960
|
+
const _ = await jn((d = p.value) == null ? void 0 : d.payload, {
|
1961
|
+
size: y.size
|
1962
|
+
}), { details: D, ...I } = _;
|
1963
|
+
y.trackItemDetailsMap[I.id] = {
|
1964
|
+
type: m,
|
1965
|
+
details: D
|
1966
|
+
}, y.trackItemsMap[I.id] = I, y.trackItemIds.push(I.id), l = [I.id];
|
1967
|
+
}
|
1968
|
+
if (p.key === Mi) {
|
1969
|
+
m = "audio";
|
1970
|
+
const _ = await Cn((O = p.value) == null ? void 0 : O.payload), { details: D, ...I } = _;
|
1971
|
+
y.trackItemDetailsMap[I.id] = {
|
1972
|
+
type: m,
|
1973
|
+
details: D
|
1974
|
+
}, y.trackItemsMap[I.id] = I, y.trackItemIds.push(I.id), l = [I.id];
|
1928
1975
|
}
|
1929
1976
|
if (p.key === Oi) {
|
1930
|
-
|
1931
|
-
const
|
1932
|
-
size:
|
1933
|
-
}), { details:
|
1934
|
-
|
1935
|
-
type:
|
1936
|
-
details:
|
1937
|
-
},
|
1977
|
+
m = "video";
|
1978
|
+
const _ = await Pn((E = p.value) == null ? void 0 : E.payload, {
|
1979
|
+
size: y.size
|
1980
|
+
}), { details: D, ...I } = _;
|
1981
|
+
y.trackItemDetailsMap[I.id] = {
|
1982
|
+
type: m,
|
1983
|
+
details: D
|
1984
|
+
}, y.trackItemsMap[I.id] = I, y.trackItemIds.push(I.id), l = [I.id];
|
1938
1985
|
}
|
1939
|
-
|
1940
|
-
id:
|
1986
|
+
y.tracks.unshift({
|
1987
|
+
id: qe(),
|
1941
1988
|
accepts: ["text", "audio", "helper", "video", "image", "caption"],
|
1942
|
-
type:
|
1989
|
+
type: m,
|
1943
1990
|
items: l,
|
1944
1991
|
magnetic: !1,
|
1945
1992
|
static: !1
|
1946
1993
|
});
|
1947
|
-
const
|
1994
|
+
const S = Yt(y.trackItemsMap);
|
1948
1995
|
t.updateState(
|
1949
1996
|
{
|
1950
|
-
trackItemIds:
|
1951
|
-
trackItemDetailsMap:
|
1952
|
-
trackItemsMap:
|
1953
|
-
tracks:
|
1954
|
-
duration:
|
1997
|
+
trackItemIds: y.trackItemIds,
|
1998
|
+
trackItemDetailsMap: y.trackItemDetailsMap,
|
1999
|
+
trackItemsMap: y.trackItemsMap,
|
2000
|
+
tracks: y.tracks,
|
2001
|
+
duration: S
|
1955
2002
|
},
|
1956
2003
|
{
|
1957
2004
|
updateHistory: !0,
|
@@ -1959,27 +2006,27 @@ function Ji(t) {
|
|
1959
2006
|
}
|
1960
2007
|
);
|
1961
2008
|
}), H = c.subscribe(async (p) => {
|
1962
|
-
var
|
2009
|
+
var y;
|
1963
2010
|
if (p.key === xi) {
|
1964
|
-
const l =
|
2011
|
+
const l = X(t.getState()), m = (y = p.value) == null ? void 0 : y.options.time;
|
1965
2012
|
if (l.activeIds.length === 1) {
|
1966
|
-
const
|
1967
|
-
if (
|
2013
|
+
const S = l.activeIds[0], v = l.trackItemsMap[S];
|
2014
|
+
if (m >= v.display.to || m <= v.display.from)
|
1968
2015
|
return;
|
1969
|
-
const
|
1970
|
-
...
|
1971
|
-
id:
|
2016
|
+
const b = l.trackItemDetailsMap[S], d = en(), O = {
|
2017
|
+
...v,
|
2018
|
+
id: d,
|
1972
2019
|
display: {
|
1973
|
-
from:
|
1974
|
-
to:
|
2020
|
+
from: m,
|
2021
|
+
to: v.display.to
|
1975
2022
|
},
|
1976
2023
|
trim: {
|
1977
|
-
from:
|
1978
|
-
to:
|
2024
|
+
from: m,
|
2025
|
+
to: v.display.to
|
1979
2026
|
}
|
1980
2027
|
};
|
1981
|
-
l.trackItemsMap[
|
1982
|
-
|
2028
|
+
l.trackItemsMap[S].display.to = m, l.trackItemsMap[d] = O, l.trackItemIds.push(d), l.trackItemDetailsMap[d] = b, l.tracks.forEach((E) => {
|
2029
|
+
E.items.includes(S) && E.items.push(d);
|
1983
2030
|
}), t.updateState(
|
1984
2031
|
{
|
1985
2032
|
trackItemDetailsMap: l.trackItemDetailsMap,
|
@@ -1995,54 +2042,54 @@ function Ji(t) {
|
|
1995
2042
|
}
|
1996
2043
|
return;
|
1997
2044
|
}
|
1998
|
-
if (p.key ===
|
1999
|
-
const l =
|
2045
|
+
if (p.key === Di) {
|
2046
|
+
const l = X(t.getState());
|
2000
2047
|
if (l.activeIds.length) {
|
2001
|
-
const
|
2002
|
-
activeIds:
|
2048
|
+
const m = l.activeIds, S = [], v = {
|
2049
|
+
activeIds: m,
|
2003
2050
|
trackItemDetailsMap: {},
|
2004
2051
|
trackItemsMap: {},
|
2005
2052
|
tracks: []
|
2006
2053
|
};
|
2007
|
-
|
2008
|
-
|
2009
|
-
l.tracks.find((
|
2054
|
+
m.forEach((d) => {
|
2055
|
+
v.trackItemDetailsMap[d] = l.trackItemDetailsMap[d], v.trackItemsMap[d] = l.trackItemsMap[d], S.push(
|
2056
|
+
l.tracks.find((O) => O.items.includes(d))
|
2010
2057
|
);
|
2011
2058
|
});
|
2012
|
-
const
|
2013
|
-
|
2059
|
+
const b = /* @__PURE__ */ new Set();
|
2060
|
+
S.filter((d) => b.has(d.id) ? !1 : (b.add(d), !0)), v.tracks = Array.from(b.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(v));
|
2014
2061
|
}
|
2015
2062
|
}
|
2016
2063
|
if (p.key === Pi) {
|
2017
2064
|
const l = localStorage.getItem("DesignComboTemp");
|
2018
2065
|
if (!l) return;
|
2019
|
-
const
|
2020
|
-
const
|
2021
|
-
(
|
2066
|
+
const m = X(t.getState()), S = JSON.parse(l), v = {}, b = S.trackItemsMap, d = S.trackItemDetailsMap, O = S.tracks, E = [], _ = S.activeIds.map(async (D) => {
|
2067
|
+
const I = d[D];
|
2068
|
+
(I.type === "caption" || I.type === "text") && I.details.fontUrl && await _n([
|
2022
2069
|
{
|
2023
|
-
fontFamily:
|
2024
|
-
url:
|
2070
|
+
fontFamily: I.details.fontFamily,
|
2071
|
+
url: I.details.fontUrl
|
2025
2072
|
}
|
2026
2073
|
]);
|
2027
|
-
const
|
2028
|
-
return
|
2029
|
-
...
|
2030
|
-
id:
|
2031
|
-
},
|
2074
|
+
const P = en();
|
2075
|
+
return v[D] = P, m.trackItemsMap[P] = {
|
2076
|
+
...b[D],
|
2077
|
+
id: P
|
2078
|
+
}, m.trackItemDetailsMap[P] = I, m.trackItemIds.push(P), !0;
|
2032
2079
|
});
|
2033
|
-
await Promise.all(
|
2034
|
-
const
|
2035
|
-
...
|
2036
|
-
items:
|
2037
|
-
id:
|
2080
|
+
await Promise.all(_), O.forEach((D) => {
|
2081
|
+
const I = D.items.map((k) => v[k]), P = {
|
2082
|
+
...D,
|
2083
|
+
items: I,
|
2084
|
+
id: qe()
|
2038
2085
|
};
|
2039
|
-
|
2040
|
-
}),
|
2086
|
+
E.push(P);
|
2087
|
+
}), m.tracks = [...m.tracks, ...E], t.updateState(
|
2041
2088
|
{
|
2042
|
-
trackItemDetailsMap:
|
2043
|
-
tracks:
|
2044
|
-
trackItemIds:
|
2045
|
-
trackItemsMap:
|
2089
|
+
trackItemDetailsMap: m.trackItemDetailsMap,
|
2090
|
+
tracks: m.tracks,
|
2091
|
+
trackItemIds: m.trackItemIds,
|
2092
|
+
trackItemsMap: m.trackItemsMap
|
2046
2093
|
},
|
2047
2094
|
{
|
2048
2095
|
updateHistory: !0,
|
@@ -2050,25 +2097,25 @@ function Ji(t) {
|
|
2050
2097
|
}
|
2051
2098
|
);
|
2052
2099
|
}
|
2053
|
-
}),
|
2054
|
-
var
|
2055
|
-
if (p.key ===
|
2056
|
-
const
|
2057
|
-
if (!
|
2058
|
-
const
|
2059
|
-
|
2060
|
-
const
|
2061
|
-
|
2062
|
-
...
|
2063
|
-
...
|
2064
|
-
} :
|
2100
|
+
}), g = f.subscribe((p) => {
|
2101
|
+
var y, l;
|
2102
|
+
if (p.key === Ci) {
|
2103
|
+
const m = X(t.getState()), S = m.trackItemDetailsMap, v = m.trackItemsMap, b = Object.keys((y = p.value) == null ? void 0 : y.payload);
|
2104
|
+
if (!b.length) return;
|
2105
|
+
const d = (l = p.value) == null ? void 0 : l.payload;
|
2106
|
+
b.forEach((E) => {
|
2107
|
+
const _ = d[E];
|
2108
|
+
_.details ? S[E].details = {
|
2109
|
+
...S[E].details,
|
2110
|
+
..._.details
|
2111
|
+
} : _.playbackRate && (v[E].playbackRate = _.playbackRate);
|
2065
2112
|
});
|
2066
|
-
const
|
2113
|
+
const O = Yt(v);
|
2067
2114
|
t.updateState(
|
2068
2115
|
{
|
2069
|
-
trackItemDetailsMap: { ...
|
2070
|
-
trackItemsMap: { ...
|
2071
|
-
duration:
|
2116
|
+
trackItemDetailsMap: { ...S },
|
2117
|
+
trackItemsMap: { ...v },
|
2118
|
+
duration: O
|
2072
2119
|
},
|
2073
2120
|
{
|
2074
2121
|
updateHistory: !0,
|
@@ -2079,17 +2126,17 @@ function Ji(t) {
|
|
2079
2126
|
});
|
2080
2127
|
return {
|
2081
2128
|
unsubscribe: () => {
|
2082
|
-
|
2129
|
+
T.unsubscribe(), H.unsubscribe(), g.unsubscribe(), x.unsubscribe(), F.unsubscribe(), h.unsubscribe();
|
2083
2130
|
}
|
2084
2131
|
};
|
2085
2132
|
}
|
2086
|
-
const
|
2133
|
+
const Qi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
2087
2134
|
function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
2088
|
-
var
|
2135
|
+
var h, x;
|
2089
2136
|
let s = [];
|
2090
2137
|
const c = Array.isArray(t);
|
2091
2138
|
for (const F in t) {
|
2092
|
-
const
|
2139
|
+
const T = t[F], H = c ? +F : F;
|
2093
2140
|
if (!(F in r)) {
|
2094
2141
|
s.push({
|
2095
2142
|
type: "REMOVE",
|
@@ -2098,16 +2145,16 @@ function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2098
2145
|
});
|
2099
2146
|
continue;
|
2100
2147
|
}
|
2101
|
-
const
|
2102
|
-
if (
|
2103
|
-
const
|
2104
|
-
s.push.apply(s,
|
2105
|
-
} else
|
2106
|
-
!(Number.isNaN(
|
2148
|
+
const g = r[F], p = typeof T == "object" && typeof g == "object" && Array.isArray(T) === Array.isArray(g);
|
2149
|
+
if (T && g && p && !Qi[(x = (h = Object.getPrototypeOf(T)) == null ? void 0 : h.constructor) == null ? void 0 : x.name] && (!n.cyclesFix || !i.includes(T))) {
|
2150
|
+
const y = ni(T, g, n, n.cyclesFix ? i.concat([T]) : []);
|
2151
|
+
s.push.apply(s, y.map((l) => (l.path.unshift(H), l)));
|
2152
|
+
} else T !== g && // treat NaN values as equivalent
|
2153
|
+
!(Number.isNaN(T) && Number.isNaN(g)) && !(p && (isNaN(T) ? T + "" == g + "" : +T == +g)) && s.push({
|
2107
2154
|
path: [H],
|
2108
2155
|
type: "CHANGE",
|
2109
|
-
value:
|
2110
|
-
oldValue:
|
2156
|
+
value: g,
|
2157
|
+
oldValue: T
|
2111
2158
|
});
|
2112
2159
|
}
|
2113
2160
|
const f = Array.isArray(r);
|
@@ -2119,7 +2166,7 @@ function ni(t, r, n = { cyclesFix: !0 }, i = []) {
|
|
2119
2166
|
});
|
2120
2167
|
return s;
|
2121
2168
|
}
|
2122
|
-
var
|
2169
|
+
var vn = Symbol.for("immer-nothing"), de = Symbol.for("immer-draftable"), tt = Symbol.for("immer-state"), ii = process.env.NODE_ENV !== "production" ? [
|
2123
2170
|
// All error codes, starting by 0:
|
2124
2171
|
function(t) {
|
2125
2172
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
@@ -2159,44 +2206,44 @@ function W(t, ...r) {
|
|
2159
2206
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
2160
2207
|
);
|
2161
2208
|
}
|
2162
|
-
var
|
2163
|
-
function
|
2164
|
-
return !!t && !!t[
|
2209
|
+
var xt = Object.getPrototypeOf;
|
2210
|
+
function Dt(t) {
|
2211
|
+
return !!t && !!t[tt];
|
2165
2212
|
}
|
2166
2213
|
function vt(t) {
|
2167
2214
|
var r;
|
2168
2215
|
return t ? ai(t) || Array.isArray(t) || !!t[de] || !!((r = t.constructor) != null && r[de]) || ve(t) || Ie(t) : !1;
|
2169
2216
|
}
|
2170
|
-
var
|
2217
|
+
var ta = Object.prototype.constructor.toString();
|
2171
2218
|
function ai(t) {
|
2172
2219
|
if (!t || typeof t != "object")
|
2173
2220
|
return !1;
|
2174
|
-
const r =
|
2221
|
+
const r = xt(t);
|
2175
2222
|
if (r === null)
|
2176
2223
|
return !0;
|
2177
2224
|
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
2178
|
-
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) ===
|
2225
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ta;
|
2179
2226
|
}
|
2180
2227
|
function he(t, r) {
|
2181
|
-
|
2228
|
+
Pt(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
2182
2229
|
r(n, t[n], t);
|
2183
2230
|
}) : t.forEach((n, i) => r(i, n, t));
|
2184
2231
|
}
|
2185
|
-
function
|
2186
|
-
const r = t[
|
2232
|
+
function Pt(t) {
|
2233
|
+
const r = t[tt];
|
2187
2234
|
return r ? r.type_ : Array.isArray(t) ? 1 : ve(t) ? 2 : Ie(t) ? 3 : 0;
|
2188
2235
|
}
|
2189
2236
|
function ye(t, r) {
|
2190
|
-
return
|
2237
|
+
return Pt(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
2191
2238
|
}
|
2192
|
-
function
|
2193
|
-
return
|
2239
|
+
function rn(t, r) {
|
2240
|
+
return Pt(t) === 2 ? t.get(r) : t[r];
|
2194
2241
|
}
|
2195
2242
|
function si(t, r, n) {
|
2196
|
-
const i =
|
2243
|
+
const i = Pt(t);
|
2197
2244
|
i === 2 ? t.set(r, n) : i === 3 ? t.add(n) : t[r] = n;
|
2198
2245
|
}
|
2199
|
-
function
|
2246
|
+
function ea(t, r) {
|
2200
2247
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
2201
2248
|
}
|
2202
2249
|
function ve(t) {
|
@@ -2205,10 +2252,10 @@ function ve(t) {
|
|
2205
2252
|
function Ie(t) {
|
2206
2253
|
return t instanceof Set;
|
2207
2254
|
}
|
2208
|
-
function
|
2255
|
+
function Ot(t) {
|
2209
2256
|
return t.copy_ || t.base_;
|
2210
2257
|
}
|
2211
|
-
function
|
2258
|
+
function pn(t, r) {
|
2212
2259
|
if (ve(t))
|
2213
2260
|
return new Map(t);
|
2214
2261
|
if (Ie(t))
|
@@ -2218,49 +2265,49 @@ function fn(t, r) {
|
|
2218
2265
|
const n = ai(t);
|
2219
2266
|
if (r === !0 || r === "class_only" && !n) {
|
2220
2267
|
const i = Object.getOwnPropertyDescriptors(t);
|
2221
|
-
delete i[
|
2268
|
+
delete i[tt];
|
2222
2269
|
let s = Reflect.ownKeys(i);
|
2223
2270
|
for (let c = 0; c < s.length; c++) {
|
2224
|
-
const f = s[c],
|
2225
|
-
|
2271
|
+
const f = s[c], h = i[f];
|
2272
|
+
h.writable === !1 && (h.writable = !0, h.configurable = !0), (h.get || h.set) && (i[f] = {
|
2226
2273
|
configurable: !0,
|
2227
2274
|
writable: !0,
|
2228
2275
|
// could live with !!desc.set as well here...
|
2229
|
-
enumerable:
|
2276
|
+
enumerable: h.enumerable,
|
2230
2277
|
value: t[f]
|
2231
2278
|
});
|
2232
2279
|
}
|
2233
|
-
return Object.create(
|
2280
|
+
return Object.create(xt(t), i);
|
2234
2281
|
} else {
|
2235
|
-
const i =
|
2282
|
+
const i = xt(t);
|
2236
2283
|
if (i !== null && n)
|
2237
2284
|
return { ...t };
|
2238
2285
|
const s = Object.create(i);
|
2239
2286
|
return Object.assign(s, t);
|
2240
2287
|
}
|
2241
2288
|
}
|
2242
|
-
function
|
2243
|
-
return
|
2289
|
+
function In(t, r = !1) {
|
2290
|
+
return ir(t) || Dt(t) || !vt(t) || (Pt(t) > 1 && (t.set = t.add = t.clear = t.delete = ra), Object.freeze(t), r && Object.entries(t).forEach(([n, i]) => In(i, !0))), t;
|
2244
2291
|
}
|
2245
|
-
function
|
2292
|
+
function ra() {
|
2246
2293
|
W(2);
|
2247
2294
|
}
|
2248
|
-
function
|
2295
|
+
function ir(t) {
|
2249
2296
|
return Object.isFrozen(t);
|
2250
2297
|
}
|
2251
|
-
var
|
2298
|
+
var dn = {};
|
2252
2299
|
function Ct(t) {
|
2253
|
-
const r =
|
2300
|
+
const r = dn[t];
|
2254
2301
|
return r || W(0, t), r;
|
2255
2302
|
}
|
2256
|
-
function
|
2257
|
-
|
2303
|
+
function na(t, r) {
|
2304
|
+
dn[t] || (dn[t] = r);
|
2258
2305
|
}
|
2259
2306
|
var me;
|
2260
2307
|
function oi() {
|
2261
2308
|
return me;
|
2262
2309
|
}
|
2263
|
-
function
|
2310
|
+
function ia(t, r) {
|
2264
2311
|
return {
|
2265
2312
|
drafts_: [],
|
2266
2313
|
parent_: t,
|
@@ -2274,33 +2321,33 @@ function na(t, r) {
|
|
2274
2321
|
function zn(t, r) {
|
2275
2322
|
r && (Ct("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
2276
2323
|
}
|
2277
|
-
function dn(t) {
|
2278
|
-
hn(t), t.drafts_.forEach(ia), t.drafts_ = null;
|
2279
|
-
}
|
2280
2324
|
function hn(t) {
|
2325
|
+
yn(t), t.drafts_.forEach(aa), t.drafts_ = null;
|
2326
|
+
}
|
2327
|
+
function yn(t) {
|
2281
2328
|
t === me && (me = t.parent_);
|
2282
2329
|
}
|
2283
2330
|
function Nn(t) {
|
2284
|
-
return me =
|
2331
|
+
return me = ia(me, t);
|
2285
2332
|
}
|
2286
|
-
function
|
2287
|
-
const r = t[
|
2333
|
+
function aa(t) {
|
2334
|
+
const r = t[tt];
|
2288
2335
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
2289
2336
|
}
|
2290
2337
|
function Hn(t, r) {
|
2291
2338
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
2292
2339
|
const n = r.drafts_[0];
|
2293
|
-
return t !== void 0 && t !== n ? (n[
|
2294
|
-
n[
|
2340
|
+
return t !== void 0 && t !== n ? (n[tt].modified_ && (hn(r), W(4)), vt(t) && (t = Qe(r, t), r.parent_ || tr(r, t)), r.patches_ && Ct("Patches").generateReplacementPatches_(
|
2341
|
+
n[tt].base_,
|
2295
2342
|
t,
|
2296
2343
|
r.patches_,
|
2297
2344
|
r.inversePatches_
|
2298
|
-
)) : t =
|
2345
|
+
)) : t = Qe(r, n, []), hn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== vn ? t : void 0;
|
2299
2346
|
}
|
2300
|
-
function
|
2301
|
-
if (
|
2347
|
+
function Qe(t, r, n) {
|
2348
|
+
if (ir(r))
|
2302
2349
|
return r;
|
2303
|
-
const i = r[
|
2350
|
+
const i = r[tt];
|
2304
2351
|
if (!i)
|
2305
2352
|
return he(
|
2306
2353
|
r,
|
@@ -2309,15 +2356,15 @@ function Ze(t, r, n) {
|
|
2309
2356
|
if (i.scope_ !== t)
|
2310
2357
|
return r;
|
2311
2358
|
if (!i.modified_)
|
2312
|
-
return
|
2359
|
+
return tr(t, i.base_, !0), i.base_;
|
2313
2360
|
if (!i.finalized_) {
|
2314
2361
|
i.finalized_ = !0, i.scope_.unfinalizedDrafts_--;
|
2315
2362
|
const s = i.copy_;
|
2316
2363
|
let c = s, f = !1;
|
2317
2364
|
i.type_ === 3 && (c = new Set(s), s.clear(), f = !0), he(
|
2318
2365
|
c,
|
2319
|
-
(
|
2320
|
-
),
|
2366
|
+
(h, x) => Un(t, i, s, h, x, n, f)
|
2367
|
+
), tr(t, s, !1), n && t.patches_ && Ct("Patches").generatePatches_(
|
2321
2368
|
i,
|
2322
2369
|
n,
|
2323
2370
|
t.patches_,
|
@@ -2327,24 +2374,24 @@ function Ze(t, r, n) {
|
|
2327
2374
|
return i.copy_;
|
2328
2375
|
}
|
2329
2376
|
function Un(t, r, n, i, s, c, f) {
|
2330
|
-
if (process.env.NODE_ENV !== "production" && s === n && W(5),
|
2331
|
-
const
|
2332
|
-
!ye(r.assigned_, i) ? c.concat(i) : void 0, x =
|
2333
|
-
if (si(n, i, x),
|
2377
|
+
if (process.env.NODE_ENV !== "production" && s === n && W(5), Dt(s)) {
|
2378
|
+
const h = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
2379
|
+
!ye(r.assigned_, i) ? c.concat(i) : void 0, x = Qe(t, s, h);
|
2380
|
+
if (si(n, i, x), Dt(x))
|
2334
2381
|
t.canAutoFreeze_ = !1;
|
2335
2382
|
else
|
2336
2383
|
return;
|
2337
2384
|
} else f && n.add(s);
|
2338
|
-
if (vt(s) && !
|
2385
|
+
if (vt(s) && !ir(s)) {
|
2339
2386
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
2340
2387
|
return;
|
2341
|
-
|
2388
|
+
Qe(t, s), (!r || !r.scope_.parent_) && typeof i != "symbol" && Object.prototype.propertyIsEnumerable.call(n, i) && tr(t, s);
|
2342
2389
|
}
|
2343
2390
|
}
|
2344
|
-
function
|
2345
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
2391
|
+
function tr(t, r, n = !1) {
|
2392
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && In(r, n);
|
2346
2393
|
}
|
2347
|
-
function
|
2394
|
+
function sa(t, r) {
|
2348
2395
|
const n = Array.isArray(t), i = {
|
2349
2396
|
type_: n ? 1 : 0,
|
2350
2397
|
// Track which produce call this is associated with.
|
@@ -2368,50 +2415,50 @@ function aa(t, r) {
|
|
2368
2415
|
revoke_: null,
|
2369
2416
|
isManual_: !1
|
2370
2417
|
};
|
2371
|
-
let s = i, c =
|
2418
|
+
let s = i, c = Sn;
|
2372
2419
|
n && (s = [i], c = be);
|
2373
|
-
const { revoke: f, proxy:
|
2374
|
-
return i.draft_ =
|
2420
|
+
const { revoke: f, proxy: h } = Proxy.revocable(s, c);
|
2421
|
+
return i.draft_ = h, i.revoke_ = f, h;
|
2375
2422
|
}
|
2376
|
-
var
|
2423
|
+
var Sn = {
|
2377
2424
|
get(t, r) {
|
2378
|
-
if (r ===
|
2425
|
+
if (r === tt)
|
2379
2426
|
return t;
|
2380
|
-
const n =
|
2427
|
+
const n = Ot(t);
|
2381
2428
|
if (!ye(n, r))
|
2382
|
-
return
|
2429
|
+
return oa(t, n, r);
|
2383
2430
|
const i = n[r];
|
2384
|
-
return t.finalized_ || !vt(i) ? i : i ===
|
2431
|
+
return t.finalized_ || !vt(i) ? i : i === nn(t.base_, r) ? (an(t), t.copy_[r] = bn(i, t)) : i;
|
2385
2432
|
},
|
2386
2433
|
has(t, r) {
|
2387
|
-
return r in
|
2434
|
+
return r in Ot(t);
|
2388
2435
|
},
|
2389
2436
|
ownKeys(t) {
|
2390
|
-
return Reflect.ownKeys(
|
2437
|
+
return Reflect.ownKeys(Ot(t));
|
2391
2438
|
},
|
2392
2439
|
set(t, r, n) {
|
2393
|
-
const i = ci(
|
2440
|
+
const i = ci(Ot(t), r);
|
2394
2441
|
if (i != null && i.set)
|
2395
2442
|
return i.set.call(t.draft_, n), !0;
|
2396
2443
|
if (!t.modified_) {
|
2397
|
-
const s =
|
2444
|
+
const s = nn(Ot(t), r), c = s == null ? void 0 : s[tt];
|
2398
2445
|
if (c && c.base_ === n)
|
2399
2446
|
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
2400
|
-
if (
|
2447
|
+
if (ea(n, s) && (n !== void 0 || ye(t.base_, r)))
|
2401
2448
|
return !0;
|
2402
|
-
|
2449
|
+
an(t), mn(t);
|
2403
2450
|
}
|
2404
2451
|
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
2405
2452
|
(n !== void 0 || r in t.copy_) || // special case: NaN
|
2406
2453
|
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
2407
2454
|
},
|
2408
2455
|
deleteProperty(t, r) {
|
2409
|
-
return
|
2456
|
+
return nn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, an(t), mn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
2410
2457
|
},
|
2411
2458
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
2412
2459
|
// the same guarantee in ES5 mode.
|
2413
2460
|
getOwnPropertyDescriptor(t, r) {
|
2414
|
-
const n =
|
2461
|
+
const n = Ot(t), i = Reflect.getOwnPropertyDescriptor(n, r);
|
2415
2462
|
return i && {
|
2416
2463
|
writable: !0,
|
2417
2464
|
configurable: t.type_ !== 1 || r !== "length",
|
@@ -2423,13 +2470,13 @@ var In = {
|
|
2423
2470
|
W(11);
|
2424
2471
|
},
|
2425
2472
|
getPrototypeOf(t) {
|
2426
|
-
return
|
2473
|
+
return xt(t.base_);
|
2427
2474
|
},
|
2428
2475
|
setPrototypeOf() {
|
2429
2476
|
W(12);
|
2430
2477
|
}
|
2431
2478
|
}, be = {};
|
2432
|
-
he(
|
2479
|
+
he(Sn, (t, r) => {
|
2433
2480
|
be[t] = function() {
|
2434
2481
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
2435
2482
|
};
|
@@ -2438,13 +2485,13 @@ be.deleteProperty = function(t, r) {
|
|
2438
2485
|
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && W(13), be.set.call(this, t, r, void 0);
|
2439
2486
|
};
|
2440
2487
|
be.set = function(t, r, n) {
|
2441
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && W(14),
|
2488
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && W(14), Sn.set.call(this, t[0], r, n, t[0]);
|
2442
2489
|
};
|
2443
|
-
function
|
2444
|
-
const n = t[
|
2445
|
-
return (n ?
|
2490
|
+
function nn(t, r) {
|
2491
|
+
const n = t[tt];
|
2492
|
+
return (n ? Ot(n) : t)[r];
|
2446
2493
|
}
|
2447
|
-
function
|
2494
|
+
function oa(t, r, n) {
|
2448
2495
|
var s;
|
2449
2496
|
const i = ci(r, n);
|
2450
2497
|
return i ? "value" in i ? i.value : (
|
@@ -2456,24 +2503,24 @@ function sa(t, r, n) {
|
|
2456
2503
|
function ci(t, r) {
|
2457
2504
|
if (!(r in t))
|
2458
2505
|
return;
|
2459
|
-
let n =
|
2506
|
+
let n = xt(t);
|
2460
2507
|
for (; n; ) {
|
2461
2508
|
const i = Object.getOwnPropertyDescriptor(n, r);
|
2462
2509
|
if (i)
|
2463
2510
|
return i;
|
2464
|
-
n =
|
2511
|
+
n = xt(n);
|
2465
2512
|
}
|
2466
2513
|
}
|
2467
|
-
function
|
2468
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
2514
|
+
function mn(t) {
|
2515
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && mn(t.parent_));
|
2469
2516
|
}
|
2470
|
-
function
|
2471
|
-
t.copy_ || (t.copy_ =
|
2517
|
+
function an(t) {
|
2518
|
+
t.copy_ || (t.copy_ = pn(
|
2472
2519
|
t.base_,
|
2473
2520
|
t.scope_.immer_.useStrictShallowCopy_
|
2474
2521
|
));
|
2475
2522
|
}
|
2476
|
-
var
|
2523
|
+
var ca = class {
|
2477
2524
|
constructor(t) {
|
2478
2525
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, i) => {
|
2479
2526
|
if (typeof r == "function" && typeof n != "function") {
|
@@ -2481,22 +2528,22 @@ var oa = class {
|
|
2481
2528
|
n = r;
|
2482
2529
|
const f = this;
|
2483
2530
|
return function(x = c, ...F) {
|
2484
|
-
return f.produce(x, (
|
2531
|
+
return f.produce(x, (T) => n.call(this, T, ...F));
|
2485
2532
|
};
|
2486
2533
|
}
|
2487
2534
|
typeof n != "function" && W(6), i !== void 0 && typeof i != "function" && W(7);
|
2488
2535
|
let s;
|
2489
2536
|
if (vt(r)) {
|
2490
|
-
const c = Nn(this), f =
|
2491
|
-
let
|
2537
|
+
const c = Nn(this), f = bn(r, void 0);
|
2538
|
+
let h = !0;
|
2492
2539
|
try {
|
2493
|
-
s = n(f),
|
2540
|
+
s = n(f), h = !1;
|
2494
2541
|
} finally {
|
2495
|
-
|
2542
|
+
h ? hn(c) : yn(c);
|
2496
2543
|
}
|
2497
2544
|
return zn(c, i), Hn(s, c);
|
2498
2545
|
} else if (!r || typeof r != "object") {
|
2499
|
-
if (s = n(r), s === void 0 && (s = r), s ===
|
2546
|
+
if (s = n(r), s === void 0 && (s = r), s === vn && (s = void 0), this.autoFreeze_ && In(s, !0), i) {
|
2500
2547
|
const c = [], f = [];
|
2501
2548
|
Ct("Patches").generateReplacementPatches_(r, s, c, f), i(c, f);
|
2502
2549
|
}
|
@@ -2505,20 +2552,20 @@ var oa = class {
|
|
2505
2552
|
W(1, r);
|
2506
2553
|
}, this.produceWithPatches = (r, n) => {
|
2507
2554
|
if (typeof r == "function")
|
2508
|
-
return (f, ...
|
2555
|
+
return (f, ...h) => this.produceWithPatches(f, (x) => r(x, ...h));
|
2509
2556
|
let i, s;
|
2510
|
-
return [this.produce(r, n, (f,
|
2511
|
-
i = f, s =
|
2557
|
+
return [this.produce(r, n, (f, h) => {
|
2558
|
+
i = f, s = h;
|
2512
2559
|
}), i, s];
|
2513
2560
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
2514
2561
|
}
|
2515
2562
|
createDraft(t) {
|
2516
|
-
vt(t) || W(8),
|
2517
|
-
const r = Nn(this), n =
|
2518
|
-
return n[
|
2563
|
+
vt(t) || W(8), Dt(t) && (t = ua(t));
|
2564
|
+
const r = Nn(this), n = bn(t, void 0);
|
2565
|
+
return n[tt].isManual_ = !0, yn(r), n;
|
2519
2566
|
}
|
2520
2567
|
finishDraft(t, r) {
|
2521
|
-
const n = t && t[
|
2568
|
+
const n = t && t[tt];
|
2522
2569
|
(!n || !n.isManual_) && W(9);
|
2523
2570
|
const { scope_: i } = n;
|
2524
2571
|
return zn(i, r), Hn(void 0, i);
|
@@ -2550,30 +2597,30 @@ var oa = class {
|
|
2550
2597
|
}
|
2551
2598
|
n > -1 && (r = r.slice(n + 1));
|
2552
2599
|
const i = Ct("Patches").applyPatches_;
|
2553
|
-
return
|
2600
|
+
return Dt(t) ? i(t, r) : this.produce(
|
2554
2601
|
t,
|
2555
2602
|
(s) => i(s, r)
|
2556
2603
|
);
|
2557
2604
|
}
|
2558
2605
|
};
|
2559
|
-
function
|
2560
|
-
const n = ve(t) ? Ct("MapSet").proxyMap_(t, r) : Ie(t) ? Ct("MapSet").proxySet_(t, r) :
|
2606
|
+
function bn(t, r) {
|
2607
|
+
const n = ve(t) ? Ct("MapSet").proxyMap_(t, r) : Ie(t) ? Ct("MapSet").proxySet_(t, r) : sa(t, r);
|
2561
2608
|
return (r ? r.scope_ : oi()).drafts_.push(n), n;
|
2562
2609
|
}
|
2563
|
-
function
|
2564
|
-
return
|
2610
|
+
function ua(t) {
|
2611
|
+
return Dt(t) || W(10, t), ui(t);
|
2565
2612
|
}
|
2566
2613
|
function ui(t) {
|
2567
|
-
if (!vt(t) ||
|
2614
|
+
if (!vt(t) || ir(t))
|
2568
2615
|
return t;
|
2569
|
-
const r = t[
|
2616
|
+
const r = t[tt];
|
2570
2617
|
let n;
|
2571
2618
|
if (r) {
|
2572
2619
|
if (!r.modified_)
|
2573
2620
|
return r.base_;
|
2574
|
-
r.finalized_ = !0, n =
|
2621
|
+
r.finalized_ = !0, n = pn(t, r.scope_.immer_.useStrictShallowCopy_);
|
2575
2622
|
} else
|
2576
|
-
n =
|
2623
|
+
n = pn(t, !0);
|
2577
2624
|
return he(n, (i, s) => {
|
2578
2625
|
si(n, i, ui(s));
|
2579
2626
|
}), r && (r.finalized_ = !1), n;
|
@@ -2581,210 +2628,210 @@ function ui(t) {
|
|
2581
2628
|
function Ln() {
|
2582
2629
|
process.env.NODE_ENV !== "production" && ii.push(
|
2583
2630
|
'Sets cannot have "replace" patches.',
|
2584
|
-
function(
|
2585
|
-
return "Unsupported patch operation: " +
|
2631
|
+
function(g) {
|
2632
|
+
return "Unsupported patch operation: " + g;
|
2586
2633
|
},
|
2587
|
-
function(
|
2588
|
-
return "Cannot apply patch, path doesn't resolve: " +
|
2634
|
+
function(g) {
|
2635
|
+
return "Cannot apply patch, path doesn't resolve: " + g;
|
2589
2636
|
},
|
2590
2637
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
2591
2638
|
);
|
2592
2639
|
const r = "replace", n = "add", i = "remove";
|
2593
|
-
function s(
|
2594
|
-
switch (
|
2640
|
+
function s(g, p, y, l) {
|
2641
|
+
switch (g.type_) {
|
2595
2642
|
case 0:
|
2596
2643
|
case 2:
|
2597
2644
|
return f(
|
2598
|
-
|
2645
|
+
g,
|
2599
2646
|
p,
|
2600
|
-
|
2647
|
+
y,
|
2601
2648
|
l
|
2602
2649
|
);
|
2603
2650
|
case 1:
|
2604
|
-
return c(
|
2651
|
+
return c(g, p, y, l);
|
2605
2652
|
case 3:
|
2606
|
-
return
|
2607
|
-
|
2653
|
+
return h(
|
2654
|
+
g,
|
2608
2655
|
p,
|
2609
|
-
|
2656
|
+
y,
|
2610
2657
|
l
|
2611
2658
|
);
|
2612
2659
|
}
|
2613
2660
|
}
|
2614
|
-
function c(
|
2615
|
-
let { base_:
|
2616
|
-
|
2617
|
-
for (let
|
2618
|
-
if (
|
2619
|
-
const
|
2620
|
-
|
2661
|
+
function c(g, p, y, l) {
|
2662
|
+
let { base_: m, assigned_: S } = g, v = g.copy_;
|
2663
|
+
v.length < m.length && ([m, v] = [v, m], [y, l] = [l, y]);
|
2664
|
+
for (let b = 0; b < m.length; b++)
|
2665
|
+
if (S[b] && v[b] !== m[b]) {
|
2666
|
+
const d = p.concat([b]);
|
2667
|
+
y.push({
|
2621
2668
|
op: r,
|
2622
|
-
path:
|
2669
|
+
path: d,
|
2623
2670
|
// Need to maybe clone it, as it can in fact be the original value
|
2624
2671
|
// due to the base/copy inversion at the start of this function
|
2625
|
-
value: H(
|
2672
|
+
value: H(v[b])
|
2626
2673
|
}), l.push({
|
2627
2674
|
op: r,
|
2628
|
-
path:
|
2629
|
-
value: H(
|
2675
|
+
path: d,
|
2676
|
+
value: H(m[b])
|
2630
2677
|
});
|
2631
2678
|
}
|
2632
|
-
for (let
|
2633
|
-
const
|
2634
|
-
|
2679
|
+
for (let b = m.length; b < v.length; b++) {
|
2680
|
+
const d = p.concat([b]);
|
2681
|
+
y.push({
|
2635
2682
|
op: n,
|
2636
|
-
path:
|
2683
|
+
path: d,
|
2637
2684
|
// Need to maybe clone it, as it can in fact be the original value
|
2638
2685
|
// due to the base/copy inversion at the start of this function
|
2639
|
-
value: H(
|
2686
|
+
value: H(v[b])
|
2640
2687
|
});
|
2641
2688
|
}
|
2642
|
-
for (let
|
2643
|
-
const
|
2689
|
+
for (let b = v.length - 1; m.length <= b; --b) {
|
2690
|
+
const d = p.concat([b]);
|
2644
2691
|
l.push({
|
2645
2692
|
op: i,
|
2646
|
-
path:
|
2693
|
+
path: d
|
2647
2694
|
});
|
2648
2695
|
}
|
2649
2696
|
}
|
2650
|
-
function f(
|
2651
|
-
const { base_:
|
2652
|
-
he(
|
2653
|
-
const
|
2654
|
-
if (
|
2697
|
+
function f(g, p, y, l) {
|
2698
|
+
const { base_: m, copy_: S } = g;
|
2699
|
+
he(g.assigned_, (v, b) => {
|
2700
|
+
const d = rn(m, v), O = rn(S, v), E = b ? ye(m, v) ? r : n : i;
|
2701
|
+
if (d === O && E === r)
|
2655
2702
|
return;
|
2656
|
-
const
|
2657
|
-
|
2658
|
-
|
2703
|
+
const _ = p.concat(v);
|
2704
|
+
y.push(E === i ? { op: E, path: _ } : { op: E, path: _, value: O }), l.push(
|
2705
|
+
E === n ? { op: i, path: _ } : E === i ? { op: n, path: _, value: H(d) } : { op: r, path: _, value: H(d) }
|
2659
2706
|
);
|
2660
2707
|
});
|
2661
2708
|
}
|
2662
|
-
function
|
2663
|
-
let { base_:
|
2664
|
-
|
2665
|
-
if (!
|
2666
|
-
const
|
2667
|
-
|
2709
|
+
function h(g, p, y, l) {
|
2710
|
+
let { base_: m, copy_: S } = g, v = 0;
|
2711
|
+
m.forEach((b) => {
|
2712
|
+
if (!S.has(b)) {
|
2713
|
+
const d = p.concat([v]);
|
2714
|
+
y.push({
|
2668
2715
|
op: i,
|
2669
|
-
path:
|
2670
|
-
value:
|
2716
|
+
path: d,
|
2717
|
+
value: b
|
2671
2718
|
}), l.unshift({
|
2672
2719
|
op: n,
|
2673
|
-
path:
|
2674
|
-
value:
|
2720
|
+
path: d,
|
2721
|
+
value: b
|
2675
2722
|
});
|
2676
2723
|
}
|
2677
|
-
|
2678
|
-
}),
|
2679
|
-
if (!
|
2680
|
-
const
|
2681
|
-
|
2724
|
+
v++;
|
2725
|
+
}), v = 0, S.forEach((b) => {
|
2726
|
+
if (!m.has(b)) {
|
2727
|
+
const d = p.concat([v]);
|
2728
|
+
y.push({
|
2682
2729
|
op: n,
|
2683
|
-
path:
|
2684
|
-
value:
|
2730
|
+
path: d,
|
2731
|
+
value: b
|
2685
2732
|
}), l.unshift({
|
2686
2733
|
op: i,
|
2687
|
-
path:
|
2688
|
-
value:
|
2734
|
+
path: d,
|
2735
|
+
value: b
|
2689
2736
|
});
|
2690
2737
|
}
|
2691
|
-
|
2738
|
+
v++;
|
2692
2739
|
});
|
2693
2740
|
}
|
2694
|
-
function x(
|
2695
|
-
|
2741
|
+
function x(g, p, y, l) {
|
2742
|
+
y.push({
|
2696
2743
|
op: r,
|
2697
2744
|
path: [],
|
2698
|
-
value: p ===
|
2745
|
+
value: p === vn ? void 0 : p
|
2699
2746
|
}), l.push({
|
2700
2747
|
op: r,
|
2701
2748
|
path: [],
|
2702
|
-
value:
|
2749
|
+
value: g
|
2703
2750
|
});
|
2704
2751
|
}
|
2705
|
-
function F(
|
2706
|
-
return p.forEach((
|
2707
|
-
const { path: l, op:
|
2708
|
-
let
|
2709
|
-
for (let
|
2710
|
-
const
|
2711
|
-
let
|
2712
|
-
typeof
|
2752
|
+
function F(g, p) {
|
2753
|
+
return p.forEach((y) => {
|
2754
|
+
const { path: l, op: m } = y;
|
2755
|
+
let S = g;
|
2756
|
+
for (let O = 0; O < l.length - 1; O++) {
|
2757
|
+
const E = Pt(S);
|
2758
|
+
let _ = l[O];
|
2759
|
+
typeof _ != "string" && typeof _ != "number" && (_ = "" + _), (E === 0 || E === 1) && (_ === "__proto__" || _ === "constructor") && W(19), typeof S == "function" && _ === "prototype" && W(19), S = rn(S, _), typeof S != "object" && W(18, l.join("/"));
|
2713
2760
|
}
|
2714
|
-
const
|
2715
|
-
switch (
|
2761
|
+
const v = Pt(S), b = T(y.value), d = l[l.length - 1];
|
2762
|
+
switch (m) {
|
2716
2763
|
case r:
|
2717
|
-
switch (
|
2764
|
+
switch (v) {
|
2718
2765
|
case 2:
|
2719
|
-
return
|
2766
|
+
return S.set(d, b);
|
2720
2767
|
case 3:
|
2721
2768
|
W(16);
|
2722
2769
|
default:
|
2723
|
-
return
|
2770
|
+
return S[d] = b;
|
2724
2771
|
}
|
2725
2772
|
case n:
|
2726
|
-
switch (
|
2773
|
+
switch (v) {
|
2727
2774
|
case 1:
|
2728
|
-
return
|
2775
|
+
return d === "-" ? S.push(b) : S.splice(d, 0, b);
|
2729
2776
|
case 2:
|
2730
|
-
return
|
2777
|
+
return S.set(d, b);
|
2731
2778
|
case 3:
|
2732
|
-
return
|
2779
|
+
return S.add(b);
|
2733
2780
|
default:
|
2734
|
-
return
|
2781
|
+
return S[d] = b;
|
2735
2782
|
}
|
2736
2783
|
case i:
|
2737
|
-
switch (
|
2784
|
+
switch (v) {
|
2738
2785
|
case 1:
|
2739
|
-
return
|
2786
|
+
return S.splice(d, 1);
|
2740
2787
|
case 2:
|
2741
|
-
return
|
2788
|
+
return S.delete(d);
|
2742
2789
|
case 3:
|
2743
|
-
return
|
2790
|
+
return S.delete(y.value);
|
2744
2791
|
default:
|
2745
|
-
return delete
|
2792
|
+
return delete S[d];
|
2746
2793
|
}
|
2747
2794
|
default:
|
2748
|
-
W(17,
|
2795
|
+
W(17, m);
|
2749
2796
|
}
|
2750
|
-
}),
|
2751
|
-
}
|
2752
|
-
function
|
2753
|
-
if (!vt(
|
2754
|
-
return
|
2755
|
-
if (Array.isArray(
|
2756
|
-
return
|
2757
|
-
if (ve(
|
2797
|
+
}), g;
|
2798
|
+
}
|
2799
|
+
function T(g) {
|
2800
|
+
if (!vt(g))
|
2801
|
+
return g;
|
2802
|
+
if (Array.isArray(g))
|
2803
|
+
return g.map(T);
|
2804
|
+
if (ve(g))
|
2758
2805
|
return new Map(
|
2759
|
-
Array.from(
|
2806
|
+
Array.from(g.entries()).map(([y, l]) => [y, T(l)])
|
2760
2807
|
);
|
2761
|
-
if (Ie(
|
2762
|
-
return new Set(Array.from(
|
2763
|
-
const p = Object.create(
|
2764
|
-
for (const
|
2765
|
-
p[
|
2766
|
-
return ye(
|
2808
|
+
if (Ie(g))
|
2809
|
+
return new Set(Array.from(g).map(T));
|
2810
|
+
const p = Object.create(xt(g));
|
2811
|
+
for (const y in g)
|
2812
|
+
p[y] = T(g[y]);
|
2813
|
+
return ye(g, de) && (p[de] = g[de]), p;
|
2767
2814
|
}
|
2768
|
-
function H(
|
2769
|
-
return
|
2815
|
+
function H(g) {
|
2816
|
+
return Dt(g) ? T(g) : g;
|
2770
2817
|
}
|
2771
|
-
|
2818
|
+
na("Patches", {
|
2772
2819
|
applyPatches_: F,
|
2773
2820
|
generatePatches_: s,
|
2774
2821
|
generateReplacementPatches_: x
|
2775
2822
|
});
|
2776
2823
|
}
|
2777
|
-
var
|
2778
|
-
|
2779
|
-
|
2824
|
+
var et = new ca(), la = et.produce;
|
2825
|
+
et.produceWithPatches.bind(
|
2826
|
+
et
|
2780
2827
|
);
|
2781
|
-
|
2782
|
-
|
2783
|
-
var
|
2784
|
-
|
2785
|
-
|
2786
|
-
var
|
2787
|
-
function
|
2828
|
+
et.setAutoFreeze.bind(et);
|
2829
|
+
et.setUseStrictShallowCopy.bind(et);
|
2830
|
+
var fa = et.applyPatches.bind(et);
|
2831
|
+
et.createDraft.bind(et);
|
2832
|
+
et.finishDraft.bind(et);
|
2833
|
+
var pa = 1 / 0, da = 9007199254740991, ha = "[object Arguments]", ya = "[object Function]", ma = "[object GeneratorFunction]", ba = "[object Symbol]", ga = typeof it == "object" && it && it.Object === Object && it, _a = typeof self == "object" && self && self.Object === Object && self, va = ga || _a || Function("return this")();
|
2834
|
+
function Ia(t, r, n) {
|
2788
2835
|
switch (n.length) {
|
2789
2836
|
case 0:
|
2790
2837
|
return t.call(r);
|
@@ -2797,34 +2844,34 @@ function va(t, r, n) {
|
|
2797
2844
|
}
|
2798
2845
|
return t.apply(r, n);
|
2799
2846
|
}
|
2800
|
-
function
|
2847
|
+
function Sa(t, r) {
|
2801
2848
|
for (var n = -1, i = t ? t.length : 0, s = Array(i); ++n < i; )
|
2802
2849
|
s[n] = r(t[n], n, t);
|
2803
2850
|
return s;
|
2804
2851
|
}
|
2805
|
-
function
|
2852
|
+
function wa(t, r) {
|
2806
2853
|
for (var n = -1, i = r.length, s = t.length; ++n < i; )
|
2807
2854
|
t[s + n] = r[n];
|
2808
2855
|
return t;
|
2809
2856
|
}
|
2810
|
-
var
|
2811
|
-
function
|
2857
|
+
var wn = Object.prototype, ka = wn.hasOwnProperty, kn = wn.toString, Gn = va.Symbol, Ta = wn.propertyIsEnumerable, Wn = Gn ? Gn.isConcatSpreadable : void 0, Bn = Math.max;
|
2858
|
+
function Ea(t, r, n, i, s) {
|
2812
2859
|
var c = -1, f = t.length;
|
2813
2860
|
for (n || (n = xa), s || (s = []); ++c < f; ) {
|
2814
|
-
var
|
2815
|
-
n(
|
2861
|
+
var h = t[c];
|
2862
|
+
n(h) ? wa(s, h) : s[s.length] = h;
|
2816
2863
|
}
|
2817
2864
|
return s;
|
2818
2865
|
}
|
2819
|
-
function
|
2820
|
-
return t = Object(t),
|
2866
|
+
function Aa(t, r) {
|
2867
|
+
return t = Object(t), Ma(t, r, function(n, i) {
|
2821
2868
|
return i in t;
|
2822
2869
|
});
|
2823
2870
|
}
|
2824
|
-
function
|
2871
|
+
function Ma(t, r, n) {
|
2825
2872
|
for (var i = -1, s = r.length, c = {}; ++i < s; ) {
|
2826
|
-
var f = r[i],
|
2827
|
-
n(
|
2873
|
+
var f = r[i], h = t[f];
|
2874
|
+
n(h, f) && (c[f] = h);
|
2828
2875
|
}
|
2829
2876
|
return c;
|
2830
2877
|
}
|
@@ -2835,53 +2882,53 @@ function Oa(t, r) {
|
|
2835
2882
|
i = -1;
|
2836
2883
|
for (var f = Array(r + 1); ++i < r; )
|
2837
2884
|
f[i] = n[i];
|
2838
|
-
return f[r] = c,
|
2885
|
+
return f[r] = c, Ia(t, this, f);
|
2839
2886
|
};
|
2840
2887
|
}
|
2841
2888
|
function xa(t) {
|
2842
|
-
return
|
2889
|
+
return Ca(t) || Pa(t) || !!(Wn && t && t[Wn]);
|
2843
2890
|
}
|
2844
|
-
function
|
2845
|
-
if (typeof t == "string" ||
|
2891
|
+
function Da(t) {
|
2892
|
+
if (typeof t == "string" || Ha(t))
|
2846
2893
|
return t;
|
2847
2894
|
var r = t + "";
|
2848
|
-
return r == "0" && 1 / t == -
|
2895
|
+
return r == "0" && 1 / t == -pa ? "-0" : r;
|
2849
2896
|
}
|
2850
2897
|
function Pa(t) {
|
2851
|
-
return
|
2852
|
-
}
|
2853
|
-
var Da = Array.isArray;
|
2854
|
-
function Ca(t) {
|
2855
|
-
return t != null && Fa(t.length) && !Ra(t);
|
2898
|
+
return Ra(t) && ka.call(t, "callee") && (!Ta.call(t, "callee") || kn.call(t) == ha);
|
2856
2899
|
}
|
2900
|
+
var Ca = Array.isArray;
|
2857
2901
|
function ja(t) {
|
2858
|
-
return
|
2902
|
+
return t != null && za(t.length) && !Fa(t);
|
2859
2903
|
}
|
2860
2904
|
function Ra(t) {
|
2861
|
-
|
2862
|
-
return r == ha || r == ya;
|
2905
|
+
return li(t) && ja(t);
|
2863
2906
|
}
|
2864
2907
|
function Fa(t) {
|
2865
|
-
|
2908
|
+
var r = Na(t) ? kn.call(t) : "";
|
2909
|
+
return r == ya || r == ma;
|
2866
2910
|
}
|
2867
2911
|
function za(t) {
|
2912
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= da;
|
2913
|
+
}
|
2914
|
+
function Na(t) {
|
2868
2915
|
var r = typeof t;
|
2869
2916
|
return !!t && (r == "object" || r == "function");
|
2870
2917
|
}
|
2871
2918
|
function li(t) {
|
2872
2919
|
return !!t && typeof t == "object";
|
2873
2920
|
}
|
2874
|
-
function
|
2875
|
-
return typeof t == "symbol" || li(t) &&
|
2921
|
+
function Ha(t) {
|
2922
|
+
return typeof t == "symbol" || li(t) && kn.call(t) == ba;
|
2876
2923
|
}
|
2877
|
-
var
|
2878
|
-
return t == null ? {} :
|
2879
|
-
}),
|
2880
|
-
const $n = /* @__PURE__ */
|
2924
|
+
var Ua = Oa(function(t, r) {
|
2925
|
+
return t == null ? {} : Aa(t, Sa(Ea(r), Da));
|
2926
|
+
}), La = Ua;
|
2927
|
+
const $n = /* @__PURE__ */ gn(La), Ga = {
|
2881
2928
|
width: 1080,
|
2882
2929
|
height: 1920
|
2883
|
-
},
|
2884
|
-
size:
|
2930
|
+
}, Wa = {
|
2931
|
+
size: Ga,
|
2885
2932
|
tracks: [],
|
2886
2933
|
trackItemIds: [],
|
2887
2934
|
trackItemsMap: {},
|
@@ -2904,22 +2951,22 @@ const $n = /* @__PURE__ */ bn(Ua), La = {
|
|
2904
2951
|
"transitionsMap",
|
2905
2952
|
"trackItemIds"
|
2906
2953
|
];
|
2907
|
-
class
|
2954
|
+
class Ka {
|
2908
2955
|
constructor(r) {
|
2909
|
-
|
2910
|
-
|
2911
|
-
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
const n = r ||
|
2916
|
-
this.stateSubject = new
|
2956
|
+
Mt(this, "stateSubject");
|
2957
|
+
Mt(this, "stateHistorySubject");
|
2958
|
+
Mt(this, "prevState");
|
2959
|
+
Mt(this, "undos", []);
|
2960
|
+
Mt(this, "redos", []);
|
2961
|
+
Mt(this, "listener");
|
2962
|
+
const n = r || Wa;
|
2963
|
+
this.stateSubject = new Dn(n), this.stateHistorySubject = new Dn({
|
2917
2964
|
handleRedo: !1,
|
2918
2965
|
handleUndo: !1
|
2919
2966
|
}), this.prevState = n, this.initListeners();
|
2920
2967
|
}
|
2921
2968
|
initListeners() {
|
2922
|
-
|
2969
|
+
Zi(this);
|
2923
2970
|
}
|
2924
2971
|
destroyListeners() {
|
2925
2972
|
this.listener && this.listener.unsubscribe();
|
@@ -2951,28 +2998,28 @@ class $a {
|
|
2951
2998
|
...i,
|
2952
2999
|
...r
|
2953
3000
|
};
|
2954
|
-
|
3001
|
+
nt(i, s) || (n.updateHistory && this.updateHistory(s, n.kind), this.prevState = i, this.stateSubject.next(s));
|
2955
3002
|
}
|
2956
3003
|
// emit changes for design size
|
2957
3004
|
subscribeToSize(r) {
|
2958
3005
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2959
|
-
|
3006
|
+
nt(n.size, this.prevState.size) || r({ size: n.size });
|
2960
3007
|
});
|
2961
3008
|
}
|
2962
3009
|
// Selectively subscribe to scale changes
|
2963
3010
|
subscribeToScale(r) {
|
2964
3011
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2965
|
-
|
3012
|
+
nt(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
2966
3013
|
});
|
2967
3014
|
}
|
2968
3015
|
subscribeToUpdateTrackItem(r) {
|
2969
3016
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2970
|
-
|
3017
|
+
nt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
2971
3018
|
});
|
2972
3019
|
}
|
2973
3020
|
subscribeToUpdateItemDetails(r) {
|
2974
3021
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2975
|
-
|
3022
|
+
nt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
2976
3023
|
});
|
2977
3024
|
}
|
2978
3025
|
// Selectively subscribe to duration changes
|
@@ -2995,19 +3042,19 @@ class $a {
|
|
2995
3042
|
}
|
2996
3043
|
subscribeToAddOrRemoveItems(r) {
|
2997
3044
|
return this.stateSubject.asObservable().subscribe((n) => {
|
2998
|
-
|
3045
|
+
nt(n.trackItemIds, this.prevState.trackItemIds) || r({ trackItemIds: n.trackItemIds });
|
2999
3046
|
});
|
3000
3047
|
}
|
3001
3048
|
// Selectively subscribe to activeIds changes
|
3002
3049
|
subscribeToActiveIds(r) {
|
3003
3050
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3004
|
-
|
3051
|
+
nt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
3005
3052
|
});
|
3006
3053
|
}
|
3007
3054
|
// Selectively subscribe to multiple track-related properties
|
3008
3055
|
subscribeToTracks(r) {
|
3009
3056
|
return this.stateSubject.asObservable().subscribe((n) => {
|
3010
|
-
(!
|
3057
|
+
(!nt(n.tracks, this.prevState.tracks) || !nt(n.trackItemIds, this.prevState.trackItemIds) || !nt(n.trackItemsMap, this.prevState.trackItemsMap) || !nt(n.transitionIds, this.prevState.transitionIds) || !nt(n.transitionsMap, this.prevState.transitionsMap)) && r({
|
3011
3058
|
tracks: n.tracks,
|
3012
3059
|
trackItemIds: n.trackItemIds,
|
3013
3060
|
trackItemsMap: n.trackItemsMap,
|
@@ -3025,67 +3072,67 @@ class $a {
|
|
3025
3072
|
trackItemDetailsMap: s,
|
3026
3073
|
trackItemIds: c,
|
3027
3074
|
tracks: f,
|
3028
|
-
transitionIds:
|
3075
|
+
transitionIds: h,
|
3029
3076
|
transitionsMap: x,
|
3030
3077
|
trackItemsMap: F
|
3031
|
-
} = this.getState(),
|
3078
|
+
} = this.getState(), T = X({
|
3032
3079
|
trackItemDetailsMap: s,
|
3033
3080
|
trackItemIds: c,
|
3034
3081
|
tracks: f,
|
3035
|
-
transitionIds:
|
3082
|
+
transitionIds: h,
|
3036
3083
|
transitionsMap: x,
|
3037
3084
|
trackItemsMap: F
|
3038
|
-
}), H = [],
|
3085
|
+
}), H = [], g = [], p = [], y = [], l = [], m = [];
|
3039
3086
|
n.forEach((k) => {
|
3040
|
-
let
|
3087
|
+
let A;
|
3041
3088
|
const U = k.path.slice(1);
|
3042
|
-
k.type === "CREATE" ?
|
3089
|
+
k.type === "CREATE" ? A = {
|
3043
3090
|
path: U,
|
3044
3091
|
op: "remove",
|
3045
3092
|
value: k.value
|
3046
|
-
} : k.type === "CHANGE" ?
|
3093
|
+
} : k.type === "CHANGE" ? A = {
|
3047
3094
|
path: U,
|
3048
3095
|
op: "replace",
|
3049
3096
|
value: k.oldValue
|
3050
|
-
} :
|
3097
|
+
} : A = {
|
3051
3098
|
path: U,
|
3052
3099
|
op: "add",
|
3053
3100
|
value: k.oldValue
|
3054
|
-
}, k.path.includes("trackItemIds") ? p.push(
|
3101
|
+
}, k.path.includes("trackItemIds") ? p.push(A) : k.path.includes("transitionIds") ? g.push(A) : k.path.includes("trackItemsMap") ? l.push(A) : k.path.includes("transitionsMap") ? y.push(A) : k.path.includes("tracks") ? H.push(A) : k.path.includes("trackItemDetailsMap") && m.push(A);
|
3055
3102
|
});
|
3056
|
-
const
|
3057
|
-
|
3103
|
+
const S = this.applyPatch(
|
3104
|
+
T.tracks,
|
3058
3105
|
H
|
3059
|
-
),
|
3060
|
-
|
3061
|
-
|
3062
|
-
),
|
3063
|
-
|
3106
|
+
), v = this.applyPatch(
|
3107
|
+
T.transitionIds,
|
3108
|
+
g
|
3109
|
+
), b = this.applyPatch(
|
3110
|
+
T.trackItemIds,
|
3064
3111
|
p
|
3065
|
-
),
|
3066
|
-
|
3067
|
-
h
|
3068
|
-
), C = this.applyPatch(
|
3069
|
-
E.trackItemsMap,
|
3070
|
-
l
|
3071
|
-
), O = this.applyPatch(
|
3072
|
-
E.trackItemDetailsMap,
|
3112
|
+
), d = this.applyPatch(
|
3113
|
+
T.transitionsMap,
|
3073
3114
|
y
|
3074
|
-
),
|
3075
|
-
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3083
|
-
|
3084
|
-
|
3115
|
+
), O = this.applyPatch(
|
3116
|
+
T.trackItemsMap,
|
3117
|
+
l
|
3118
|
+
), E = this.applyPatch(
|
3119
|
+
T.trackItemDetailsMap,
|
3120
|
+
m
|
3121
|
+
), _ = X({
|
3122
|
+
tracks: S,
|
3123
|
+
transitionIds: v,
|
3124
|
+
trackItemIds: b,
|
3125
|
+
transitionsMap: d,
|
3126
|
+
trackItemsMap: O,
|
3127
|
+
trackItemDetailsMap: E
|
3128
|
+
}), D = X(this.getState()), I = { ...D, ..._ };
|
3129
|
+
this.prevState = D, this.redos.push({ redos: n, type: i });
|
3130
|
+
const P = Yt(I.trackItemsMap);
|
3131
|
+
this.stateSubject.next({ ...I, duration: P }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 });
|
3085
3132
|
}
|
3086
3133
|
applyPatch(r, n) {
|
3087
|
-
return n.reverse().reduce((i, s) =>
|
3088
|
-
|
3134
|
+
return n.reverse().reduce((i, s) => la(i, (c) => {
|
3135
|
+
fa(c, [s]);
|
3089
3136
|
}), r);
|
3090
3137
|
}
|
3091
3138
|
redo() {
|
@@ -3096,65 +3143,65 @@ class $a {
|
|
3096
3143
|
trackItemDetailsMap: s,
|
3097
3144
|
trackItemIds: c,
|
3098
3145
|
tracks: f,
|
3099
|
-
transitionIds:
|
3146
|
+
transitionIds: h,
|
3100
3147
|
transitionsMap: x,
|
3101
3148
|
trackItemsMap: F
|
3102
|
-
} = this.getState(),
|
3149
|
+
} = this.getState(), T = X({
|
3103
3150
|
trackItemDetailsMap: s,
|
3104
3151
|
trackItemIds: c,
|
3105
3152
|
tracks: f,
|
3106
|
-
transitionIds:
|
3153
|
+
transitionIds: h,
|
3107
3154
|
transitionsMap: x,
|
3108
3155
|
trackItemsMap: F
|
3109
|
-
}), H = [],
|
3156
|
+
}), H = [], g = [], p = [], y = [], l = [], m = [];
|
3110
3157
|
n.forEach((k) => {
|
3111
|
-
let
|
3158
|
+
let A;
|
3112
3159
|
const U = k.path.slice(1);
|
3113
|
-
k.type === "CREATE" ?
|
3160
|
+
k.type === "CREATE" ? A = {
|
3114
3161
|
path: U,
|
3115
3162
|
op: "add",
|
3116
3163
|
value: k.value
|
3117
|
-
} : k.type === "CHANGE" ?
|
3164
|
+
} : k.type === "CHANGE" ? A = {
|
3118
3165
|
path: U,
|
3119
3166
|
op: "replace",
|
3120
3167
|
value: k.value
|
3121
|
-
} :
|
3168
|
+
} : A = {
|
3122
3169
|
path: U,
|
3123
3170
|
op: "remove",
|
3124
3171
|
value: k.oldValue
|
3125
|
-
}, k.path.includes("trackItemIds") ? p.push(
|
3172
|
+
}, k.path.includes("trackItemIds") ? p.push(A) : k.path.includes("transitionIds") ? g.push(A) : k.path.includes("trackItemsMap") ? l.push(A) : k.path.includes("transitionsMap") ? y.push(A) : k.path.includes("trackItemDetailsMap") ? m.push(A) : H.push(A);
|
3126
3173
|
});
|
3127
|
-
const
|
3128
|
-
|
3174
|
+
const S = this.applyPatch(
|
3175
|
+
T.tracks,
|
3129
3176
|
H
|
3130
|
-
),
|
3131
|
-
|
3132
|
-
|
3133
|
-
),
|
3134
|
-
|
3177
|
+
), v = this.applyPatch(
|
3178
|
+
T.transitionIds,
|
3179
|
+
g
|
3180
|
+
), b = this.applyPatch(
|
3181
|
+
T.trackItemIds,
|
3135
3182
|
p
|
3136
|
-
),
|
3137
|
-
|
3138
|
-
h
|
3139
|
-
), C = this.applyPatch(
|
3140
|
-
E.trackItemsMap,
|
3141
|
-
l
|
3142
|
-
), O = this.applyPatch(
|
3143
|
-
E.trackItemDetailsMap,
|
3183
|
+
), d = this.applyPatch(
|
3184
|
+
T.transitionsMap,
|
3144
3185
|
y
|
3145
|
-
),
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3186
|
+
), O = this.applyPatch(
|
3187
|
+
T.trackItemsMap,
|
3188
|
+
l
|
3189
|
+
), E = this.applyPatch(
|
3190
|
+
T.trackItemDetailsMap,
|
3191
|
+
m
|
3192
|
+
), _ = X({
|
3193
|
+
tracks: S,
|
3194
|
+
transitionIds: v,
|
3195
|
+
trackItemIds: b,
|
3196
|
+
transitionsMap: d,
|
3197
|
+
trackItemsMap: O,
|
3198
|
+
trackItemDetailsMap: E
|
3199
|
+
}), D = X(this.getState()), I = { ...D, ..._ };
|
3200
|
+
this.prevState = D, this.undos.push({ undos: n, type: i });
|
3201
|
+
const P = Yt(I.trackItemsMap);
|
3202
|
+
this.stateSubject.next({ ...I, duration: P }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 });
|
3156
3203
|
}
|
3157
3204
|
}
|
3158
3205
|
export {
|
3159
|
-
|
3206
|
+
Ka as default
|
3160
3207
|
};
|