@cliquify.me/state 4.0.11 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1312 -1321
- package/dist/index.umd.js +2 -2
- package/dist/utils/load-item.d.ts +8 -13
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
var Ps = Object.defineProperty;
|
|
2
2
|
var Rs = (t, r, e) => r in t ? Ps(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
|
-
var
|
|
4
|
-
import { subject as
|
|
5
|
-
var
|
|
6
|
-
return
|
|
3
|
+
var At = (t, r, e) => Rs(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { subject as Nt, filter as Ht, dispatch as zs } from "@designcombo/events";
|
|
5
|
+
var In = function(t, r) {
|
|
6
|
+
return In = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, s) {
|
|
7
7
|
e.__proto__ = s;
|
|
8
8
|
} || function(e, s) {
|
|
9
9
|
for (var a in s) Object.prototype.hasOwnProperty.call(s, a) && (e[a] = s[a]);
|
|
10
|
-
},
|
|
10
|
+
}, In(t, r);
|
|
11
11
|
};
|
|
12
|
-
function
|
|
12
|
+
function Je(t, r) {
|
|
13
13
|
if (typeof r != "function" && r !== null)
|
|
14
14
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
15
|
-
|
|
15
|
+
In(t, r);
|
|
16
16
|
function e() {
|
|
17
17
|
this.constructor = t;
|
|
18
18
|
}
|
|
19
19
|
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function gn(t) {
|
|
22
22
|
var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], s = 0;
|
|
23
23
|
if (e) return e.call(t);
|
|
24
24
|
if (t && typeof t.length == "number") return {
|
|
@@ -28,12 +28,12 @@ function kn(t) {
|
|
|
28
28
|
};
|
|
29
29
|
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function bn(t, r) {
|
|
32
32
|
var e = typeof Symbol == "function" && t[Symbol.iterator];
|
|
33
33
|
if (!e) return t;
|
|
34
|
-
var s = e.call(t), a,
|
|
34
|
+
var s = e.call(t), a, o = [], u;
|
|
35
35
|
try {
|
|
36
|
-
for (; (r === void 0 || r-- > 0) && !(a = s.next()).done; )
|
|
36
|
+
for (; (r === void 0 || r-- > 0) && !(a = s.next()).done; ) o.push(a.value);
|
|
37
37
|
} catch (c) {
|
|
38
38
|
u = { error: c };
|
|
39
39
|
} finally {
|
|
@@ -43,23 +43,23 @@ function _n(t, r) {
|
|
|
43
43
|
if (u) throw u.error;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return
|
|
46
|
+
return o;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
if (e || arguments.length === 2) for (var s = 0, a = r.length,
|
|
50
|
-
(
|
|
51
|
-
return t.concat(
|
|
48
|
+
function kn(t, r, e) {
|
|
49
|
+
if (e || arguments.length === 2) for (var s = 0, a = r.length, o; s < a; s++)
|
|
50
|
+
(o || !(s in r)) && (o || (o = Array.prototype.slice.call(r, 0, s)), o[s] = r[s]);
|
|
51
|
+
return t.concat(o || Array.prototype.slice.call(r));
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Dt(t) {
|
|
54
54
|
return typeof t == "function";
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ns(t) {
|
|
57
57
|
var r = function(s) {
|
|
58
58
|
Error.call(s), s.stack = new Error().stack;
|
|
59
59
|
}, e = t(r);
|
|
60
60
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
61
61
|
}
|
|
62
|
-
var
|
|
62
|
+
var fn = ns(function(t) {
|
|
63
63
|
return function(e) {
|
|
64
64
|
t(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
65
65
|
` + e.map(function(s, a) {
|
|
@@ -68,25 +68,25 @@ var hn = as(function(t) {
|
|
|
68
68
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
|
-
function
|
|
71
|
+
function _n(t, r) {
|
|
72
72
|
if (t) {
|
|
73
73
|
var e = t.indexOf(r);
|
|
74
74
|
0 <= e && t.splice(e, 1);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
var
|
|
77
|
+
var Sr = function() {
|
|
78
78
|
function t(r) {
|
|
79
79
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
80
80
|
}
|
|
81
81
|
return t.prototype.unsubscribe = function() {
|
|
82
|
-
var r, e, s, a,
|
|
82
|
+
var r, e, s, a, o;
|
|
83
83
|
if (!this.closed) {
|
|
84
84
|
this.closed = !0;
|
|
85
85
|
var u = this._parentage;
|
|
86
86
|
if (u)
|
|
87
87
|
if (this._parentage = null, Array.isArray(u))
|
|
88
88
|
try {
|
|
89
|
-
for (var c =
|
|
89
|
+
for (var c = gn(u), f = c.next(); !f.done; f = c.next()) {
|
|
90
90
|
var h = f.value;
|
|
91
91
|
h.remove(this);
|
|
92
92
|
}
|
|
@@ -101,23 +101,23 @@ var vr = function() {
|
|
|
101
101
|
}
|
|
102
102
|
else
|
|
103
103
|
u.remove(this);
|
|
104
|
-
var
|
|
105
|
-
if (
|
|
104
|
+
var k = this.initialTeardown;
|
|
105
|
+
if (Dt(k))
|
|
106
106
|
try {
|
|
107
|
-
|
|
107
|
+
k();
|
|
108
108
|
} catch (_) {
|
|
109
|
-
|
|
109
|
+
o = _ instanceof fn ? _.errors : [_];
|
|
110
110
|
}
|
|
111
111
|
var y = this._finalizers;
|
|
112
112
|
if (y) {
|
|
113
113
|
this._finalizers = null;
|
|
114
114
|
try {
|
|
115
|
-
for (var p =
|
|
116
|
-
var
|
|
115
|
+
for (var p = gn(y), m = p.next(); !m.done; m = p.next()) {
|
|
116
|
+
var g = m.value;
|
|
117
117
|
try {
|
|
118
|
-
|
|
118
|
+
Ln(g);
|
|
119
119
|
} catch (_) {
|
|
120
|
-
|
|
120
|
+
o = o ?? [], _ instanceof fn ? o = kn(kn([], bn(o)), bn(_.errors)) : o.push(_);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
} catch (_) {
|
|
@@ -130,14 +130,14 @@ var vr = function() {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
if (
|
|
134
|
-
throw new
|
|
133
|
+
if (o)
|
|
134
|
+
throw new fn(o);
|
|
135
135
|
}
|
|
136
136
|
}, t.prototype.add = function(r) {
|
|
137
137
|
var e;
|
|
138
138
|
if (r && r !== this)
|
|
139
139
|
if (this.closed)
|
|
140
|
-
|
|
140
|
+
Ln(r);
|
|
141
141
|
else {
|
|
142
142
|
if (r instanceof t) {
|
|
143
143
|
if (r.closed || r._hasParent(this))
|
|
@@ -154,20 +154,20 @@ var vr = function() {
|
|
|
154
154
|
this._parentage = Array.isArray(e) ? (e.push(r), e) : e ? [e, r] : r;
|
|
155
155
|
}, t.prototype._removeParent = function(r) {
|
|
156
156
|
var e = this._parentage;
|
|
157
|
-
e === r ? this._parentage = null : Array.isArray(e) &&
|
|
157
|
+
e === r ? this._parentage = null : Array.isArray(e) && _n(e, r);
|
|
158
158
|
}, t.prototype.remove = function(r) {
|
|
159
159
|
var e = this._finalizers;
|
|
160
|
-
e &&
|
|
160
|
+
e && _n(e, 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
|
-
}(),
|
|
166
|
-
function
|
|
167
|
-
return t instanceof
|
|
165
|
+
}(), ss = Sr.EMPTY;
|
|
166
|
+
function as(t) {
|
|
167
|
+
return t instanceof Sr || t && "closed" in t && Dt(t.remove) && Dt(t.add) && Dt(t.unsubscribe);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
169
|
+
function Ln(t) {
|
|
170
|
+
Dt(t) ? t() : t.unsubscribe();
|
|
171
171
|
}
|
|
172
172
|
var Fs = {
|
|
173
173
|
Promise: void 0
|
|
@@ -175,7 +175,7 @@ var Fs = {
|
|
|
175
175
|
setTimeout: function(t, r) {
|
|
176
176
|
for (var e = [], s = 2; s < arguments.length; s++)
|
|
177
177
|
e[s - 2] = arguments[s];
|
|
178
|
-
return setTimeout.apply(void 0,
|
|
178
|
+
return setTimeout.apply(void 0, kn([t, r], bn(e)));
|
|
179
179
|
},
|
|
180
180
|
clearTimeout: function(t) {
|
|
181
181
|
return clearTimeout(t);
|
|
@@ -187,19 +187,19 @@ function Ls(t) {
|
|
|
187
187
|
throw t;
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Nn() {
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function gr(t) {
|
|
193
193
|
t();
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
|
|
195
|
+
var is = function(t) {
|
|
196
|
+
Je(r, t);
|
|
197
197
|
function r(e) {
|
|
198
198
|
var s = t.call(this) || this;
|
|
199
|
-
return s.isStopped = !1, e ? (s.destination = e,
|
|
199
|
+
return s.isStopped = !1, e ? (s.destination = e, as(e) && e.add(s)) : s.destination = js, s;
|
|
200
200
|
}
|
|
201
201
|
return r.create = function(e, s, a) {
|
|
202
|
-
return new
|
|
202
|
+
return new vn(e, s, a);
|
|
203
203
|
}, r.prototype.next = function(e) {
|
|
204
204
|
this.isStopped || this._next(e);
|
|
205
205
|
}, r.prototype.error = function(e) {
|
|
@@ -223,7 +223,7 @@ var cs = function(t) {
|
|
|
223
223
|
this.unsubscribe();
|
|
224
224
|
}
|
|
225
225
|
}, r;
|
|
226
|
-
}(
|
|
226
|
+
}(Sr), Ns = function() {
|
|
227
227
|
function t(r) {
|
|
228
228
|
this.partialObserver = r;
|
|
229
229
|
}
|
|
@@ -233,7 +233,7 @@ var cs = function(t) {
|
|
|
233
233
|
try {
|
|
234
234
|
e.next(r);
|
|
235
235
|
} catch (s) {
|
|
236
|
-
|
|
236
|
+
yr(s);
|
|
237
237
|
}
|
|
238
238
|
}, t.prototype.error = function(r) {
|
|
239
239
|
var e = this.partialObserver;
|
|
@@ -241,32 +241,32 @@ var cs = function(t) {
|
|
|
241
241
|
try {
|
|
242
242
|
e.error(r);
|
|
243
243
|
} catch (s) {
|
|
244
|
-
|
|
244
|
+
yr(s);
|
|
245
245
|
}
|
|
246
246
|
else
|
|
247
|
-
|
|
247
|
+
yr(r);
|
|
248
248
|
}, t.prototype.complete = function() {
|
|
249
249
|
var r = this.partialObserver;
|
|
250
250
|
if (r.complete)
|
|
251
251
|
try {
|
|
252
252
|
r.complete();
|
|
253
253
|
} catch (e) {
|
|
254
|
-
|
|
254
|
+
yr(e);
|
|
255
255
|
}
|
|
256
256
|
}, t;
|
|
257
|
-
}(),
|
|
258
|
-
|
|
257
|
+
}(), vn = function(t) {
|
|
258
|
+
Je(r, t);
|
|
259
259
|
function r(e, s, a) {
|
|
260
|
-
var
|
|
261
|
-
return
|
|
260
|
+
var o = t.call(this) || this, u;
|
|
261
|
+
return Dt(e) || !e ? u = {
|
|
262
262
|
next: e ?? void 0,
|
|
263
263
|
error: s ?? void 0,
|
|
264
264
|
complete: a ?? void 0
|
|
265
|
-
} : u = e,
|
|
265
|
+
} : u = e, o.destination = new Ns(u), o;
|
|
266
266
|
}
|
|
267
267
|
return r;
|
|
268
|
-
}(
|
|
269
|
-
function
|
|
268
|
+
}(is);
|
|
269
|
+
function yr(t) {
|
|
270
270
|
Ls(t);
|
|
271
271
|
}
|
|
272
272
|
function Hs(t) {
|
|
@@ -274,9 +274,9 @@ function Hs(t) {
|
|
|
274
274
|
}
|
|
275
275
|
var js = {
|
|
276
276
|
closed: !0,
|
|
277
|
-
next:
|
|
277
|
+
next: Nn,
|
|
278
278
|
error: Hs,
|
|
279
|
-
complete:
|
|
279
|
+
complete: Nn
|
|
280
280
|
}, Us = function() {
|
|
281
281
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
282
282
|
}();
|
|
@@ -290,7 +290,7 @@ function Bs(t) {
|
|
|
290
290
|
}, e);
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
var
|
|
293
|
+
var Hn = function() {
|
|
294
294
|
function t(r) {
|
|
295
295
|
r && (this._subscribe = r);
|
|
296
296
|
}
|
|
@@ -298,11 +298,11 @@ var Un = function() {
|
|
|
298
298
|
var e = new t();
|
|
299
299
|
return e.source = this, e.operator = r, e;
|
|
300
300
|
}, t.prototype.subscribe = function(r, e, s) {
|
|
301
|
-
var a = this,
|
|
302
|
-
return
|
|
301
|
+
var a = this, o = Ys(r) ? r : new vn(r, e, s);
|
|
302
|
+
return gr(function() {
|
|
303
303
|
var u = a, c = u.operator, f = u.source;
|
|
304
|
-
|
|
305
|
-
}),
|
|
304
|
+
o.add(c ? c.call(o, f) : f ? a._subscribe(o) : a._trySubscribe(o));
|
|
305
|
+
}), o;
|
|
306
306
|
}, t.prototype._trySubscribe = function(r) {
|
|
307
307
|
try {
|
|
308
308
|
return this._subscribe(r);
|
|
@@ -311,16 +311,16 @@ var Un = function() {
|
|
|
311
311
|
}
|
|
312
312
|
}, t.prototype.forEach = function(r, e) {
|
|
313
313
|
var s = this;
|
|
314
|
-
return e =
|
|
315
|
-
var u = new
|
|
314
|
+
return e = jn(e), new e(function(a, o) {
|
|
315
|
+
var u = new vn({
|
|
316
316
|
next: function(c) {
|
|
317
317
|
try {
|
|
318
318
|
r(c);
|
|
319
319
|
} catch (f) {
|
|
320
|
-
|
|
320
|
+
o(f), u.unsubscribe();
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
|
-
error:
|
|
323
|
+
error: o,
|
|
324
324
|
complete: a
|
|
325
325
|
});
|
|
326
326
|
s.subscribe(u);
|
|
@@ -336,54 +336,54 @@ var Un = function() {
|
|
|
336
336
|
return Bs(r)(this);
|
|
337
337
|
}, t.prototype.toPromise = function(r) {
|
|
338
338
|
var e = this;
|
|
339
|
-
return r =
|
|
340
|
-
var
|
|
339
|
+
return r = jn(r), new r(function(s, a) {
|
|
340
|
+
var o;
|
|
341
341
|
e.subscribe(function(u) {
|
|
342
|
-
return
|
|
342
|
+
return o = u;
|
|
343
343
|
}, function(u) {
|
|
344
344
|
return a(u);
|
|
345
345
|
}, function() {
|
|
346
|
-
return s(
|
|
346
|
+
return s(o);
|
|
347
347
|
});
|
|
348
348
|
});
|
|
349
349
|
}, t.create = function(r) {
|
|
350
350
|
return new t(r);
|
|
351
351
|
}, t;
|
|
352
352
|
}();
|
|
353
|
-
function
|
|
353
|
+
function jn(t) {
|
|
354
354
|
var r;
|
|
355
355
|
return (r = t ?? Fs.Promise) !== null && r !== void 0 ? r : Promise;
|
|
356
356
|
}
|
|
357
357
|
function Gs(t) {
|
|
358
|
-
return t &&
|
|
358
|
+
return t && Dt(t.next) && Dt(t.error) && Dt(t.complete);
|
|
359
359
|
}
|
|
360
360
|
function Ys(t) {
|
|
361
|
-
return t && t instanceof
|
|
361
|
+
return t && t instanceof is || Gs(t) && as(t);
|
|
362
362
|
}
|
|
363
|
-
var Xs =
|
|
363
|
+
var Xs = ns(function(t) {
|
|
364
364
|
return function() {
|
|
365
365
|
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
366
366
|
};
|
|
367
|
-
}),
|
|
368
|
-
|
|
367
|
+
}), os = function(t) {
|
|
368
|
+
Je(r, t);
|
|
369
369
|
function r() {
|
|
370
370
|
var e = t.call(this) || this;
|
|
371
371
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
372
372
|
}
|
|
373
373
|
return r.prototype.lift = function(e) {
|
|
374
|
-
var s = new
|
|
374
|
+
var s = new Un(this, this);
|
|
375
375
|
return s.operator = e, s;
|
|
376
376
|
}, r.prototype._throwIfClosed = function() {
|
|
377
377
|
if (this.closed)
|
|
378
378
|
throw new Xs();
|
|
379
379
|
}, r.prototype.next = function(e) {
|
|
380
380
|
var s = this;
|
|
381
|
-
|
|
382
|
-
var a,
|
|
381
|
+
gr(function() {
|
|
382
|
+
var a, o;
|
|
383
383
|
if (s._throwIfClosed(), !s.isStopped) {
|
|
384
384
|
s.currentObservers || (s.currentObservers = Array.from(s.observers));
|
|
385
385
|
try {
|
|
386
|
-
for (var u =
|
|
386
|
+
for (var u = gn(s.currentObservers), c = u.next(); !c.done; c = u.next()) {
|
|
387
387
|
var f = c.value;
|
|
388
388
|
f.next(e);
|
|
389
389
|
}
|
|
@@ -391,7 +391,7 @@ var Xs = as(function(t) {
|
|
|
391
391
|
a = { error: h };
|
|
392
392
|
} finally {
|
|
393
393
|
try {
|
|
394
|
-
c && !c.done && (
|
|
394
|
+
c && !c.done && (o = u.return) && o.call(u);
|
|
395
395
|
} finally {
|
|
396
396
|
if (a) throw a.error;
|
|
397
397
|
}
|
|
@@ -400,7 +400,7 @@ var Xs = as(function(t) {
|
|
|
400
400
|
});
|
|
401
401
|
}, r.prototype.error = function(e) {
|
|
402
402
|
var s = this;
|
|
403
|
-
|
|
403
|
+
gr(function() {
|
|
404
404
|
if (s._throwIfClosed(), !s.isStopped) {
|
|
405
405
|
s.hasError = s.isStopped = !0, s.thrownError = e;
|
|
406
406
|
for (var a = s.observers; a.length; )
|
|
@@ -409,7 +409,7 @@ var Xs = as(function(t) {
|
|
|
409
409
|
});
|
|
410
410
|
}, r.prototype.complete = function() {
|
|
411
411
|
var e = this;
|
|
412
|
-
|
|
412
|
+
gr(function() {
|
|
413
413
|
if (e._throwIfClosed(), !e.isStopped) {
|
|
414
414
|
e.isStopped = !0;
|
|
415
415
|
for (var s = e.observers; s.length; )
|
|
@@ -430,21 +430,21 @@ var Xs = as(function(t) {
|
|
|
430
430
|
}, r.prototype._subscribe = function(e) {
|
|
431
431
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
432
432
|
}, r.prototype._innerSubscribe = function(e) {
|
|
433
|
-
var s = this, a = this,
|
|
434
|
-
return
|
|
435
|
-
s.currentObservers = null,
|
|
433
|
+
var s = this, a = this, o = a.hasError, u = a.isStopped, c = a.observers;
|
|
434
|
+
return o || u ? ss : (this.currentObservers = null, c.push(e), new Sr(function() {
|
|
435
|
+
s.currentObservers = null, _n(c, e);
|
|
436
436
|
}));
|
|
437
437
|
}, r.prototype._checkFinalizedStatuses = function(e) {
|
|
438
|
-
var s = this, a = s.hasError,
|
|
439
|
-
a ? e.error(
|
|
438
|
+
var s = this, a = s.hasError, o = s.thrownError, u = s.isStopped;
|
|
439
|
+
a ? e.error(o) : u && e.complete();
|
|
440
440
|
}, r.prototype.asObservable = function() {
|
|
441
|
-
var e = new
|
|
441
|
+
var e = new Hn();
|
|
442
442
|
return e.source = this, e;
|
|
443
443
|
}, r.create = function(e, s) {
|
|
444
|
-
return new
|
|
444
|
+
return new Un(e, s);
|
|
445
445
|
}, r;
|
|
446
|
-
}(
|
|
447
|
-
|
|
446
|
+
}(Hn), Un = function(t) {
|
|
447
|
+
Je(r, t);
|
|
448
448
|
function r(e, s) {
|
|
449
449
|
var a = t.call(this) || this;
|
|
450
450
|
return a.destination = e, a.source = s, a;
|
|
@@ -460,10 +460,10 @@ var Xs = as(function(t) {
|
|
|
460
460
|
(s = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || s === void 0 || s.call(e);
|
|
461
461
|
}, r.prototype._subscribe = function(e) {
|
|
462
462
|
var s, a;
|
|
463
|
-
return (a = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(e)) !== null && a !== void 0 ? a :
|
|
463
|
+
return (a = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(e)) !== null && a !== void 0 ? a : ss;
|
|
464
464
|
}, r;
|
|
465
|
-
}(
|
|
466
|
-
|
|
465
|
+
}(os), Wn = function(t) {
|
|
466
|
+
Je(r, t);
|
|
467
467
|
function r(e) {
|
|
468
468
|
var s = t.call(this) || this;
|
|
469
469
|
return s._value = e, s;
|
|
@@ -478,443 +478,443 @@ var Xs = as(function(t) {
|
|
|
478
478
|
var s = t.prototype._subscribe.call(this, e);
|
|
479
479
|
return !s.closed && e.next(this._value), s;
|
|
480
480
|
}, r.prototype.getValue = function() {
|
|
481
|
-
var e = this, s = e.hasError, a = e.thrownError,
|
|
481
|
+
var e = this, s = e.hasError, a = e.thrownError, o = e._value;
|
|
482
482
|
if (s)
|
|
483
483
|
throw a;
|
|
484
|
-
return this._throwIfClosed(),
|
|
484
|
+
return this._throwIfClosed(), o;
|
|
485
485
|
}, r.prototype.next = function(e) {
|
|
486
486
|
t.prototype.next.call(this, this._value = e);
|
|
487
487
|
}, r;
|
|
488
|
-
}(
|
|
489
|
-
function
|
|
488
|
+
}(os), pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
489
|
+
function Dn(t) {
|
|
490
490
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
491
491
|
}
|
|
492
|
-
var
|
|
493
|
-
|
|
492
|
+
var br = { exports: {} };
|
|
493
|
+
br.exports;
|
|
494
494
|
(function(t, r) {
|
|
495
|
-
var e = 200, s = "__lodash_hash_undefined__", a = 1,
|
|
496
|
-
F[
|
|
497
|
-
var
|
|
495
|
+
var e = 200, s = "__lodash_hash_undefined__", a = 1, o = 2, u = 9007199254740991, c = "[object Arguments]", f = "[object Array]", h = "[object AsyncFunction]", k = "[object Boolean]", y = "[object Date]", p = "[object Error]", m = "[object Function]", g = "[object GeneratorFunction]", _ = "[object Map]", M = "[object Number]", d = "[object Null]", v = "[object Object]", S = "[object Promise]", b = "[object Proxy]", w = "[object RegExp]", E = "[object Set]", A = "[object String]", H = "[object Symbol]", C = "[object Undefined]", J = "[object WeakMap]", L = "[object ArrayBuffer]", Y = "[object DataView]", mt = "[object Float32Array]", O = "[object Float64Array]", N = "[object Int8Array]", nt = "[object Int16Array]", le = "[object Int32Array]", de = "[object Uint8Array]", fe = "[object Uint8ClampedArray]", z = "[object Uint16Array]", pe = "[object Uint32Array]", he = /[\\^$.*+?()[\]{}|]/g, st = /^\[object .+?Constructor\]$/, Wt = /^(?:0|[1-9]\d*)$/, F = {};
|
|
496
|
+
F[mt] = F[O] = F[N] = F[nt] = F[le] = F[de] = F[fe] = F[z] = F[pe] = !0, F[c] = F[f] = F[L] = F[k] = F[Y] = F[y] = F[p] = F[m] = F[_] = F[M] = F[v] = F[w] = F[E] = F[A] = F[J] = !1;
|
|
497
|
+
var Bt = typeof pt == "object" && pt && pt.Object === Object && pt, me = typeof self == "object" && self && self.Object === Object && self, at = Bt || me || Function("return this")(), Gt = r && !r.nodeType && r, Yt = Gt && !0 && t && !t.nodeType && t, Ct = Yt && Yt.exports === Gt, Pt = Ct && Bt.process, Xt = function() {
|
|
498
498
|
try {
|
|
499
|
-
return
|
|
499
|
+
return Pt && Pt.binding && Pt.binding("util");
|
|
500
500
|
} catch {
|
|
501
501
|
}
|
|
502
|
-
}(),
|
|
503
|
-
function
|
|
504
|
-
for (var l = -1,
|
|
502
|
+
}(), Rt = Xt && Xt.isTypedArray;
|
|
503
|
+
function Kt(n, i) {
|
|
504
|
+
for (var l = -1, I = n == null ? 0 : n.length, D = 0, T = []; ++l < I; ) {
|
|
505
505
|
var R = n[l];
|
|
506
|
-
|
|
506
|
+
i(R, l, n) && (T[D++] = R);
|
|
507
507
|
}
|
|
508
508
|
return T;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
for (var l = -1,
|
|
512
|
-
n[D + l] =
|
|
510
|
+
function zt(n, i) {
|
|
511
|
+
for (var l = -1, I = i.length, D = n.length; ++l < I; )
|
|
512
|
+
n[D + l] = i[l];
|
|
513
513
|
return n;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
for (var l = -1,
|
|
517
|
-
if (
|
|
515
|
+
function Vt(n, i) {
|
|
516
|
+
for (var l = -1, I = n == null ? 0 : n.length; ++l < I; )
|
|
517
|
+
if (i(n[l], l, n))
|
|
518
518
|
return !0;
|
|
519
519
|
return !1;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
for (var l = -1,
|
|
523
|
-
|
|
524
|
-
return
|
|
521
|
+
function ye(n, i) {
|
|
522
|
+
for (var l = -1, I = Array(n); ++l < n; )
|
|
523
|
+
I[l] = i(l);
|
|
524
|
+
return I;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
527
|
-
return function(
|
|
528
|
-
return n(
|
|
526
|
+
function Ie(n) {
|
|
527
|
+
return function(i) {
|
|
528
|
+
return n(i);
|
|
529
529
|
};
|
|
530
530
|
}
|
|
531
|
-
function vt(n,
|
|
532
|
-
return n.has(
|
|
531
|
+
function vt(n, i) {
|
|
532
|
+
return n.has(i);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
return n == null ? void 0 : n[
|
|
534
|
+
function Ft(n, i) {
|
|
535
|
+
return n == null ? void 0 : n[i];
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
var
|
|
539
|
-
return n.forEach(function(
|
|
540
|
-
l[++
|
|
537
|
+
function Jt(n) {
|
|
538
|
+
var i = -1, l = Array(n.size);
|
|
539
|
+
return n.forEach(function(I, D) {
|
|
540
|
+
l[++i] = [D, I];
|
|
541
541
|
}), l;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function qt(n, i) {
|
|
544
544
|
return function(l) {
|
|
545
|
-
return n(
|
|
545
|
+
return n(i(l));
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
var
|
|
550
|
-
return n.forEach(function(
|
|
551
|
-
l[++
|
|
548
|
+
function ut(n) {
|
|
549
|
+
var i = -1, l = Array(n.size);
|
|
550
|
+
return n.forEach(function(I) {
|
|
551
|
+
l[++i] = I;
|
|
552
552
|
}), l;
|
|
553
553
|
}
|
|
554
|
-
var
|
|
555
|
-
var n = /[^.]+$/.exec(
|
|
554
|
+
var St = Array.prototype, ge = Function.prototype, gt = Object.prototype, be = at["__core-js_shared__"], xe = ge.toString, ft = gt.hasOwnProperty, tr = function() {
|
|
555
|
+
var n = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
|
|
556
556
|
return n ? "Symbol(src)_1." + n : "";
|
|
557
|
-
}(),
|
|
558
|
-
"^" +
|
|
559
|
-
),
|
|
557
|
+
}(), er = gt.toString, Er = RegExp(
|
|
558
|
+
"^" + xe.call(ft).replace(he, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
559
|
+
), Oe = Ct ? at.Buffer : void 0, ke = at.Symbol, rr = at.Uint8Array, _e = gt.propertyIsEnumerable, Zt = St.splice, yt = ke ? ke.toStringTag : void 0, ve = Object.getOwnPropertySymbols, Ce = Oe ? Oe.isBuffer : void 0, Qt = qt(Object.keys, Object), Pe = Mt(at, "DataView"), te = Mt(at, "Map"), Re = Mt(at, "Promise"), ze = Mt(at, "Set"), Fe = Mt(at, "WeakMap"), $t = Mt(Object, "create"), nr = rt(Pe), wt = rt(te), Ar = rt(Re), Dr = rt(ze), xr = rt(Fe), sr = ke ? ke.prototype : void 0, $e = sr ? sr.valueOf : void 0;
|
|
560
560
|
function X(n) {
|
|
561
|
-
var
|
|
562
|
-
for (this.clear(); ++
|
|
563
|
-
var
|
|
564
|
-
this.set(
|
|
561
|
+
var i = -1, l = n == null ? 0 : n.length;
|
|
562
|
+
for (this.clear(); ++i < l; ) {
|
|
563
|
+
var I = n[i];
|
|
564
|
+
this.set(I[0], I[1]);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
this.__data__ =
|
|
567
|
+
function Or() {
|
|
568
|
+
this.__data__ = $t ? $t(null) : {}, this.size = 0;
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
var
|
|
572
|
-
return this.size -=
|
|
570
|
+
function Cr(n) {
|
|
571
|
+
var i = this.has(n) && delete this.__data__[n];
|
|
572
|
+
return this.size -= i ? 1 : 0, i;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
575
|
-
var
|
|
576
|
-
if (
|
|
577
|
-
var l =
|
|
574
|
+
function Pr(n) {
|
|
575
|
+
var i = this.__data__;
|
|
576
|
+
if ($t) {
|
|
577
|
+
var l = i[n];
|
|
578
578
|
return l === s ? void 0 : l;
|
|
579
579
|
}
|
|
580
|
-
return
|
|
580
|
+
return ft.call(i, n) ? i[n] : void 0;
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
var
|
|
584
|
-
return
|
|
582
|
+
function Rr(n) {
|
|
583
|
+
var i = this.__data__;
|
|
584
|
+
return $t ? i[n] !== void 0 : ft.call(i, n);
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function zr(n, i) {
|
|
587
587
|
var l = this.__data__;
|
|
588
|
-
return this.size += this.has(n) ? 0 : 1, l[n] =
|
|
588
|
+
return this.size += this.has(n) ? 0 : 1, l[n] = $t && i === void 0 ? s : i, this;
|
|
589
589
|
}
|
|
590
|
-
X.prototype.clear =
|
|
590
|
+
X.prototype.clear = Or, X.prototype.delete = Cr, X.prototype.get = Pr, X.prototype.has = Rr, X.prototype.set = zr;
|
|
591
591
|
function q(n) {
|
|
592
|
-
var
|
|
593
|
-
for (this.clear(); ++
|
|
594
|
-
var
|
|
595
|
-
this.set(
|
|
592
|
+
var i = -1, l = n == null ? 0 : n.length;
|
|
593
|
+
for (this.clear(); ++i < l; ) {
|
|
594
|
+
var I = n[i];
|
|
595
|
+
this.set(I[0], I[1]);
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Fr() {
|
|
599
599
|
this.__data__ = [], this.size = 0;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
var
|
|
601
|
+
function $r(n) {
|
|
602
|
+
var i = this.__data__, l = Me(i, n);
|
|
603
603
|
if (l < 0)
|
|
604
604
|
return !1;
|
|
605
|
-
var
|
|
606
|
-
return l ==
|
|
605
|
+
var I = i.length - 1;
|
|
606
|
+
return l == I ? i.pop() : Zt.call(i, l, 1), --this.size, !0;
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
var
|
|
610
|
-
return l < 0 ? void 0 :
|
|
608
|
+
function Lr(n) {
|
|
609
|
+
var i = this.__data__, l = Me(i, n);
|
|
610
|
+
return l < 0 ? void 0 : i[l][1];
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
return
|
|
612
|
+
function Nr(n) {
|
|
613
|
+
return Me(this.__data__, n) > -1;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
var l = this.__data__,
|
|
617
|
-
return
|
|
615
|
+
function Hr(n, i) {
|
|
616
|
+
var l = this.__data__, I = Me(l, n);
|
|
617
|
+
return I < 0 ? (++this.size, l.push([n, i])) : l[I][1] = i, this;
|
|
618
618
|
}
|
|
619
|
-
q.prototype.clear =
|
|
619
|
+
q.prototype.clear = Fr, q.prototype.delete = $r, q.prototype.get = Lr, q.prototype.has = Nr, q.prototype.set = Hr;
|
|
620
620
|
function it(n) {
|
|
621
|
-
var
|
|
622
|
-
for (this.clear(); ++
|
|
623
|
-
var
|
|
624
|
-
this.set(
|
|
621
|
+
var i = -1, l = n == null ? 0 : n.length;
|
|
622
|
+
for (this.clear(); ++i < l; ) {
|
|
623
|
+
var I = n[i];
|
|
624
|
+
this.set(I[0], I[1]);
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function jr() {
|
|
628
628
|
this.size = 0, this.__data__ = {
|
|
629
629
|
hash: new X(),
|
|
630
|
-
map: new (
|
|
630
|
+
map: new (te || q)(),
|
|
631
631
|
string: new X()
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
var
|
|
636
|
-
return this.size -=
|
|
634
|
+
function Ur(n) {
|
|
635
|
+
var i = It(this, n).delete(n);
|
|
636
|
+
return this.size -= i ? 1 : 0, i;
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
return
|
|
638
|
+
function Wr(n) {
|
|
639
|
+
return It(this, n).get(n);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return
|
|
641
|
+
function Br(n) {
|
|
642
|
+
return It(this, n).has(n);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
var l =
|
|
646
|
-
return l.set(n,
|
|
644
|
+
function Gr(n, i) {
|
|
645
|
+
var l = It(this, n), I = l.size;
|
|
646
|
+
return l.set(n, i), this.size += l.size == I ? 0 : 1, this;
|
|
647
647
|
}
|
|
648
|
-
it.prototype.clear =
|
|
649
|
-
function
|
|
650
|
-
var
|
|
651
|
-
for (this.__data__ = new it(); ++
|
|
652
|
-
this.add(n[
|
|
648
|
+
it.prototype.clear = jr, it.prototype.delete = Ur, it.prototype.get = Wr, it.prototype.has = Br, it.prototype.set = Gr;
|
|
649
|
+
function Se(n) {
|
|
650
|
+
var i = -1, l = n == null ? 0 : n.length;
|
|
651
|
+
for (this.__data__ = new it(); ++i < l; )
|
|
652
|
+
this.add(n[i]);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function ar(n) {
|
|
655
655
|
return this.__data__.set(n, s), this;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function we(n) {
|
|
658
658
|
return this.__data__.has(n);
|
|
659
659
|
}
|
|
660
|
-
|
|
660
|
+
Se.prototype.add = Se.prototype.push = ar, Se.prototype.has = we;
|
|
661
661
|
function bt(n) {
|
|
662
|
-
var
|
|
663
|
-
this.size =
|
|
662
|
+
var i = this.__data__ = new q(n);
|
|
663
|
+
this.size = i.size;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Le() {
|
|
666
666
|
this.__data__ = new q(), this.size = 0;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
var
|
|
670
|
-
return this.size =
|
|
668
|
+
function Yr(n) {
|
|
669
|
+
var i = this.__data__, l = i.delete(n);
|
|
670
|
+
return this.size = i.size, l;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Xr(n) {
|
|
673
673
|
return this.__data__.get(n);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Kr(n) {
|
|
676
676
|
return this.__data__.has(n);
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Vr(n, i) {
|
|
679
679
|
var l = this.__data__;
|
|
680
680
|
if (l instanceof q) {
|
|
681
|
-
var
|
|
682
|
-
if (!
|
|
683
|
-
return
|
|
684
|
-
l = this.__data__ = new it(
|
|
681
|
+
var I = l.__data__;
|
|
682
|
+
if (!te || I.length < e - 1)
|
|
683
|
+
return I.push([n, i]), this.size = ++l.size, this;
|
|
684
|
+
l = this.__data__ = new it(I);
|
|
685
685
|
}
|
|
686
|
-
return l.set(n,
|
|
686
|
+
return l.set(n, i), this.size = l.size, this;
|
|
687
687
|
}
|
|
688
|
-
bt.prototype.clear =
|
|
689
|
-
function
|
|
690
|
-
var l =
|
|
688
|
+
bt.prototype.clear = Le, bt.prototype.delete = Yr, bt.prototype.get = Xr, bt.prototype.has = Kr, bt.prototype.set = Vr;
|
|
689
|
+
function Jr(n, i) {
|
|
690
|
+
var l = Te(n), I = !l && lr(n), D = !l && !I && Ee(n), T = !l && !I && !D && pr(n), R = l || I || D || T, P = R ? ye(n.length, String) : [], j = P.length;
|
|
691
691
|
for (var $ in n)
|
|
692
|
-
|
|
692
|
+
ft.call(n, $) && !(R && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
693
693
|
($ == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
694
694
|
D && ($ == "offset" || $ == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
695
695
|
T && ($ == "buffer" || $ == "byteLength" || $ == "byteOffset") || // Skip index properties.
|
|
696
|
-
|
|
696
|
+
sn($, j))) && P.push($);
|
|
697
697
|
return P;
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Me(n, i) {
|
|
700
700
|
for (var l = n.length; l--; )
|
|
701
|
-
if (
|
|
701
|
+
if (ur(n[l][0], i))
|
|
702
702
|
return l;
|
|
703
703
|
return -1;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
var
|
|
707
|
-
return
|
|
705
|
+
function Ne(n, i, l) {
|
|
706
|
+
var I = i(n);
|
|
707
|
+
return Te(n) ? I : zt(I, l(n));
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return n == null ? n === void 0 ? C : d :
|
|
709
|
+
function ee(n) {
|
|
710
|
+
return n == null ? n === void 0 ? C : d : yt && yt in Object(n) ? Tt(n) : cr(n);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
return _t(n) &&
|
|
712
|
+
function ir(n) {
|
|
713
|
+
return _t(n) && ee(n) == c;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
716
|
-
return n ===
|
|
715
|
+
function or(n, i, l, I, D) {
|
|
716
|
+
return n === i ? !0 : n == null || i == null || !_t(n) && !_t(i) ? n !== n && i !== i : qr(n, i, l, I, or, D);
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
var R =
|
|
718
|
+
function qr(n, i, l, I, D, T) {
|
|
719
|
+
var R = Te(n), P = Te(i), j = R ? f : kt(n), $ = P ? f : kt(i);
|
|
720
720
|
j = j == c ? v : j, $ = $ == c ? v : $;
|
|
721
721
|
var Z = j == v, ot = $ == v, W = j == $;
|
|
722
|
-
if (W &&
|
|
723
|
-
if (!
|
|
722
|
+
if (W && Ee(n)) {
|
|
723
|
+
if (!Ee(i))
|
|
724
724
|
return !1;
|
|
725
725
|
R = !0, Z = !1;
|
|
726
726
|
}
|
|
727
727
|
if (W && !Z)
|
|
728
|
-
return T || (T = new bt()), R ||
|
|
728
|
+
return T || (T = new bt()), R || pr(n) ? He(n, i, l, I, D, T) : en(n, i, j, l, I, D, T);
|
|
729
729
|
if (!(l & a)) {
|
|
730
|
-
var Q = Z &&
|
|
730
|
+
var Q = Z && ft.call(n, "__wrapped__"), K = ot && ft.call(i, "__wrapped__");
|
|
731
731
|
if (Q || K) {
|
|
732
|
-
var
|
|
733
|
-
return T || (T = new bt()), D(
|
|
732
|
+
var Lt = Q ? n.value() : n, Et = K ? i.value() : i;
|
|
733
|
+
return T || (T = new bt()), D(Lt, Et, l, I, T);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
return W ? (T || (T = new bt()),
|
|
736
|
+
return W ? (T || (T = new bt()), rn(n, i, l, I, D, T)) : !1;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
if (!
|
|
738
|
+
function Zr(n) {
|
|
739
|
+
if (!fr(n) || on(n))
|
|
740
740
|
return !1;
|
|
741
|
-
var
|
|
742
|
-
return
|
|
741
|
+
var i = dr(n) ? Er : st;
|
|
742
|
+
return i.test(rt(n));
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
return _t(n) &&
|
|
744
|
+
function Qr(n) {
|
|
745
|
+
return _t(n) && Ue(n.length) && !!F[ee(n)];
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
if (!
|
|
749
|
-
return
|
|
750
|
-
var
|
|
747
|
+
function tn(n) {
|
|
748
|
+
if (!cn(n))
|
|
749
|
+
return Qt(n);
|
|
750
|
+
var i = [];
|
|
751
751
|
for (var l in Object(n))
|
|
752
|
-
|
|
753
|
-
return
|
|
752
|
+
ft.call(n, l) && l != "constructor" && i.push(l);
|
|
753
|
+
return i;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
var R = l & a, P = n.length, j =
|
|
755
|
+
function He(n, i, l, I, D, T) {
|
|
756
|
+
var R = l & a, P = n.length, j = i.length;
|
|
757
757
|
if (P != j && !(R && j > P))
|
|
758
758
|
return !1;
|
|
759
759
|
var $ = T.get(n);
|
|
760
|
-
if ($ && T.get(
|
|
761
|
-
return $ ==
|
|
762
|
-
var Z = -1, ot = !0, W = l &
|
|
763
|
-
for (T.set(n,
|
|
764
|
-
var Q = n[Z], K =
|
|
765
|
-
if (
|
|
766
|
-
var
|
|
767
|
-
if (
|
|
768
|
-
if (
|
|
760
|
+
if ($ && T.get(i))
|
|
761
|
+
return $ == i;
|
|
762
|
+
var Z = -1, ot = !0, W = l & o ? new Se() : void 0;
|
|
763
|
+
for (T.set(n, i), T.set(i, n); ++Z < P; ) {
|
|
764
|
+
var Q = n[Z], K = i[Z];
|
|
765
|
+
if (I)
|
|
766
|
+
var Lt = R ? I(K, Q, Z, i, n, T) : I(Q, K, Z, n, i, T);
|
|
767
|
+
if (Lt !== void 0) {
|
|
768
|
+
if (Lt)
|
|
769
769
|
continue;
|
|
770
770
|
ot = !1;
|
|
771
771
|
break;
|
|
772
772
|
}
|
|
773
773
|
if (W) {
|
|
774
|
-
if (!
|
|
775
|
-
if (!vt(W,
|
|
776
|
-
return W.push(
|
|
774
|
+
if (!Vt(i, function(Et, ne) {
|
|
775
|
+
if (!vt(W, ne) && (Q === Et || D(Q, Et, l, I, T)))
|
|
776
|
+
return W.push(ne);
|
|
777
777
|
})) {
|
|
778
778
|
ot = !1;
|
|
779
779
|
break;
|
|
780
780
|
}
|
|
781
|
-
} else if (!(Q === K || D(Q, K, l,
|
|
781
|
+
} else if (!(Q === K || D(Q, K, l, I, T))) {
|
|
782
782
|
ot = !1;
|
|
783
783
|
break;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
return T.delete(n), T.delete(
|
|
786
|
+
return T.delete(n), T.delete(i), ot;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function en(n, i, l, I, D, T, R) {
|
|
789
789
|
switch (l) {
|
|
790
790
|
case Y:
|
|
791
|
-
if (n.byteLength !=
|
|
791
|
+
if (n.byteLength != i.byteLength || n.byteOffset != i.byteOffset)
|
|
792
792
|
return !1;
|
|
793
|
-
n = n.buffer,
|
|
793
|
+
n = n.buffer, i = i.buffer;
|
|
794
794
|
case L:
|
|
795
|
-
return !(n.byteLength !=
|
|
796
|
-
case
|
|
795
|
+
return !(n.byteLength != i.byteLength || !T(new rr(n), new rr(i)));
|
|
796
|
+
case k:
|
|
797
797
|
case y:
|
|
798
798
|
case M:
|
|
799
|
-
return
|
|
799
|
+
return ur(+n, +i);
|
|
800
800
|
case p:
|
|
801
|
-
return n.name ==
|
|
801
|
+
return n.name == i.name && n.message == i.message;
|
|
802
802
|
case w:
|
|
803
803
|
case A:
|
|
804
|
-
return n ==
|
|
804
|
+
return n == i + "";
|
|
805
805
|
case _:
|
|
806
|
-
var P =
|
|
806
|
+
var P = Jt;
|
|
807
807
|
case E:
|
|
808
|
-
var j =
|
|
809
|
-
if (P || (P =
|
|
808
|
+
var j = I & a;
|
|
809
|
+
if (P || (P = ut), n.size != i.size && !j)
|
|
810
810
|
return !1;
|
|
811
811
|
var $ = R.get(n);
|
|
812
812
|
if ($)
|
|
813
|
-
return $ ==
|
|
814
|
-
|
|
815
|
-
var Z =
|
|
813
|
+
return $ == i;
|
|
814
|
+
I |= o, R.set(n, i);
|
|
815
|
+
var Z = He(P(n), P(i), I, D, T, R);
|
|
816
816
|
return R.delete(n), Z;
|
|
817
817
|
case H:
|
|
818
|
-
if (
|
|
819
|
-
return
|
|
818
|
+
if ($e)
|
|
819
|
+
return $e.call(n) == $e.call(i);
|
|
820
820
|
}
|
|
821
821
|
return !1;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
var R = l & a, P =
|
|
823
|
+
function rn(n, i, l, I, D, T) {
|
|
824
|
+
var R = l & a, P = re(n), j = P.length, $ = re(i), Z = $.length;
|
|
825
825
|
if (j != Z && !R)
|
|
826
826
|
return !1;
|
|
827
827
|
for (var ot = j; ot--; ) {
|
|
828
828
|
var W = P[ot];
|
|
829
|
-
if (!(R ? W in
|
|
829
|
+
if (!(R ? W in i : ft.call(i, W)))
|
|
830
830
|
return !1;
|
|
831
831
|
}
|
|
832
832
|
var Q = T.get(n);
|
|
833
|
-
if (Q && T.get(
|
|
834
|
-
return Q ==
|
|
833
|
+
if (Q && T.get(i))
|
|
834
|
+
return Q == i;
|
|
835
835
|
var K = !0;
|
|
836
|
-
T.set(n,
|
|
837
|
-
for (var
|
|
836
|
+
T.set(n, i), T.set(i, n);
|
|
837
|
+
for (var Lt = R; ++ot < j; ) {
|
|
838
838
|
W = P[ot];
|
|
839
|
-
var
|
|
840
|
-
if (
|
|
841
|
-
var
|
|
842
|
-
if (!(
|
|
839
|
+
var Et = n[W], ne = i[W];
|
|
840
|
+
if (I)
|
|
841
|
+
var $n = R ? I(ne, Et, W, i, n, T) : I(Et, ne, W, n, i, T);
|
|
842
|
+
if (!($n === void 0 ? Et === ne || D(Et, ne, l, I, T) : $n)) {
|
|
843
843
|
K = !1;
|
|
844
844
|
break;
|
|
845
845
|
}
|
|
846
|
-
|
|
846
|
+
Lt || (Lt = W == "constructor");
|
|
847
847
|
}
|
|
848
|
-
if (K && !
|
|
849
|
-
var
|
|
850
|
-
|
|
848
|
+
if (K && !Lt) {
|
|
849
|
+
var hr = n.constructor, mr = i.constructor;
|
|
850
|
+
hr != mr && "constructor" in n && "constructor" in i && !(typeof hr == "function" && hr instanceof hr && typeof mr == "function" && mr instanceof mr) && (K = !1);
|
|
851
851
|
}
|
|
852
|
-
return T.delete(n), T.delete(
|
|
852
|
+
return T.delete(n), T.delete(i), K;
|
|
853
853
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
854
|
+
function re(n) {
|
|
855
|
+
return Ne(n, We, nn);
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function It(n, i) {
|
|
858
858
|
var l = n.__data__;
|
|
859
|
-
return
|
|
859
|
+
return an(i) ? l[typeof i == "string" ? "string" : "hash"] : l.map;
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
var l =
|
|
863
|
-
return
|
|
861
|
+
function Mt(n, i) {
|
|
862
|
+
var l = Ft(n, i);
|
|
863
|
+
return Zr(l) ? l : void 0;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
var
|
|
865
|
+
function Tt(n) {
|
|
866
|
+
var i = ft.call(n, yt), l = n[yt];
|
|
867
867
|
try {
|
|
868
|
-
n[
|
|
869
|
-
var
|
|
868
|
+
n[yt] = void 0;
|
|
869
|
+
var I = !0;
|
|
870
870
|
} catch {
|
|
871
871
|
}
|
|
872
|
-
var D =
|
|
873
|
-
return
|
|
872
|
+
var D = er.call(n);
|
|
873
|
+
return I && (i ? n[yt] = l : delete n[yt]), D;
|
|
874
874
|
}
|
|
875
|
-
var
|
|
876
|
-
return n == null ? [] : (n = Object(n),
|
|
877
|
-
return
|
|
875
|
+
var nn = ve ? function(n) {
|
|
876
|
+
return n == null ? [] : (n = Object(n), Kt(ve(n), function(i) {
|
|
877
|
+
return _e.call(n, i);
|
|
878
878
|
}));
|
|
879
|
-
} :
|
|
880
|
-
(
|
|
881
|
-
var
|
|
882
|
-
if (
|
|
883
|
-
switch (
|
|
884
|
-
case
|
|
879
|
+
} : ln, kt = ee;
|
|
880
|
+
(Pe && kt(new Pe(new ArrayBuffer(1))) != Y || te && kt(new te()) != _ || Re && kt(Re.resolve()) != S || ze && kt(new ze()) != E || Fe && kt(new Fe()) != J) && (kt = function(n) {
|
|
881
|
+
var i = ee(n), l = i == v ? n.constructor : void 0, I = l ? rt(l) : "";
|
|
882
|
+
if (I)
|
|
883
|
+
switch (I) {
|
|
884
|
+
case nr:
|
|
885
885
|
return Y;
|
|
886
|
-
case
|
|
886
|
+
case wt:
|
|
887
887
|
return _;
|
|
888
|
-
case
|
|
888
|
+
case Ar:
|
|
889
889
|
return S;
|
|
890
|
-
case
|
|
890
|
+
case Dr:
|
|
891
891
|
return E;
|
|
892
|
-
case
|
|
892
|
+
case xr:
|
|
893
893
|
return J;
|
|
894
894
|
}
|
|
895
|
-
return
|
|
895
|
+
return i;
|
|
896
896
|
});
|
|
897
|
-
function
|
|
898
|
-
return
|
|
897
|
+
function sn(n, i) {
|
|
898
|
+
return i = i ?? u, !!i && (typeof n == "number" || Wt.test(n)) && n > -1 && n % 1 == 0 && n < i;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
var
|
|
902
|
-
return
|
|
900
|
+
function an(n) {
|
|
901
|
+
var i = typeof n;
|
|
902
|
+
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? n !== "__proto__" : n === null;
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
return !!
|
|
904
|
+
function on(n) {
|
|
905
|
+
return !!tr && tr in n;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
var
|
|
907
|
+
function cn(n) {
|
|
908
|
+
var i = n && n.constructor, l = typeof i == "function" && i.prototype || gt;
|
|
909
909
|
return n === l;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
return
|
|
911
|
+
function cr(n) {
|
|
912
|
+
return er.call(n);
|
|
913
913
|
}
|
|
914
914
|
function rt(n) {
|
|
915
915
|
if (n != null) {
|
|
916
916
|
try {
|
|
917
|
-
return
|
|
917
|
+
return xe.call(n);
|
|
918
918
|
} catch {
|
|
919
919
|
}
|
|
920
920
|
try {
|
|
@@ -924,272 +924,272 @@ gr.exports;
|
|
|
924
924
|
}
|
|
925
925
|
return "";
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
return n ===
|
|
927
|
+
function ur(n, i) {
|
|
928
|
+
return n === i || n !== n && i !== i;
|
|
929
929
|
}
|
|
930
|
-
var
|
|
930
|
+
var lr = ir(/* @__PURE__ */ function() {
|
|
931
931
|
return arguments;
|
|
932
|
-
}()) ?
|
|
933
|
-
return _t(n) &&
|
|
934
|
-
},
|
|
935
|
-
function
|
|
936
|
-
return n != null &&
|
|
937
|
-
}
|
|
938
|
-
var
|
|
939
|
-
function
|
|
940
|
-
return
|
|
941
|
-
}
|
|
942
|
-
function
|
|
943
|
-
if (!
|
|
932
|
+
}()) ? ir : function(n) {
|
|
933
|
+
return _t(n) && ft.call(n, "callee") && !_e.call(n, "callee");
|
|
934
|
+
}, Te = Array.isArray;
|
|
935
|
+
function je(n) {
|
|
936
|
+
return n != null && Ue(n.length) && !dr(n);
|
|
937
|
+
}
|
|
938
|
+
var Ee = Ce || dn;
|
|
939
|
+
function un(n, i) {
|
|
940
|
+
return or(n, i);
|
|
941
|
+
}
|
|
942
|
+
function dr(n) {
|
|
943
|
+
if (!fr(n))
|
|
944
944
|
return !1;
|
|
945
|
-
var
|
|
946
|
-
return
|
|
945
|
+
var i = ee(n);
|
|
946
|
+
return i == m || i == g || i == h || i == b;
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Ue(n) {
|
|
949
949
|
return typeof n == "number" && n > -1 && n % 1 == 0 && n <= u;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
952
|
-
var
|
|
953
|
-
return n != null && (
|
|
951
|
+
function fr(n) {
|
|
952
|
+
var i = typeof n;
|
|
953
|
+
return n != null && (i == "object" || i == "function");
|
|
954
954
|
}
|
|
955
955
|
function _t(n) {
|
|
956
956
|
return n != null && typeof n == "object";
|
|
957
957
|
}
|
|
958
|
-
var
|
|
959
|
-
function
|
|
960
|
-
return
|
|
958
|
+
var pr = Rt ? Ie(Rt) : Qr;
|
|
959
|
+
function We(n) {
|
|
960
|
+
return je(n) ? Jr(n) : tn(n);
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function ln() {
|
|
963
963
|
return [];
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function dn() {
|
|
966
966
|
return !1;
|
|
967
967
|
}
|
|
968
|
-
t.exports =
|
|
969
|
-
})(
|
|
970
|
-
var Ks =
|
|
971
|
-
const U = /* @__PURE__ */
|
|
972
|
-
var
|
|
973
|
-
|
|
968
|
+
t.exports = un;
|
|
969
|
+
})(br, br.exports);
|
|
970
|
+
var Ks = br.exports;
|
|
971
|
+
const U = /* @__PURE__ */ Dn(Ks), ao = "add", Vs = "track", Js = "trackItems", io = `${Vs}:changed`, oo = `${Js}:changed`, qs = "state", co = `${qs}:changed`, Zs = "bulk", Bn = `${Zs}:edit`, xn = "design", Qs = `${xn}:load`, ta = `${xn}:resize`, G = "add", ea = `${G}:text`, ra = `${G}:video`, na = `${G}:audio`, uo = `${G}:placeholder`, sa = `${G}:image`, aa = `${G}:illustration`, ia = `${G}:shape`, lo = `${G}:mask`, fo = `${G}:transition`, oa = `${G}:animation`, ca = `${G}:caption`, ua = `${G}:template`, la = `${G}:items`, da = `${G}:composition`, fa = `${G}:progressBar`, pa = `${G}:progressFrame`, ha = `${G}:radialAudioBars`, ma = `${G}:linealAudioBars`, Ut = "edit", ya = `${Ut}:object`, Ia = `${Ut}:replaceMedia`, po = `${Ut}:text`, ho = `${Ut}:shape`, mo = `${Ut}:templateItem`, yo = `${Ut}:deleteTemplateItem`, ga = `${Ut}:backgroundEditor`, Io = "enterEditMode", Ae = "active", go = `${Ae}:set`, bo = `${Ae}:delete`, ba = `${Ae}:paste`, ko = `${Ae}:clone`, ka = `${Ae}:split`, et = "layer", _o = `${et}:locked`, vo = `${et}:hidden`, So = `${et}:move`, _a = `${et}:select`, wo = `${et}:selection`, Mo = `${et}:sendTo`, To = `${et}:rename`, Eo = `${et}:editingName`, va = `${et}:copy`, Ao = `${et}:paste`, Sa = `${et}:clone`, Do = `${et}:split`, xo = `${et}:cut`, wa = `${et}:delete`, Ma = `${et}:replace`, wr = "history", Ta = `${wr}:undo`, Ea = `${wr}:redo`, Oo = `${wr}:reset`, cs = "scale", Aa = `${cs}:changed`;
|
|
972
|
+
var kr = { exports: {} };
|
|
973
|
+
kr.exports;
|
|
974
974
|
(function(t, r) {
|
|
975
|
-
var e = 200, s = "__lodash_hash_undefined__", a = 9007199254740991,
|
|
976
|
-
z[
|
|
977
|
-
var
|
|
978
|
-
function
|
|
979
|
-
return n.set(
|
|
975
|
+
var e = 200, s = "__lodash_hash_undefined__", a = 9007199254740991, o = "[object Arguments]", u = "[object Array]", c = "[object Boolean]", f = "[object Date]", h = "[object Error]", k = "[object Function]", y = "[object GeneratorFunction]", p = "[object Map]", m = "[object Number]", g = "[object Object]", _ = "[object Promise]", M = "[object RegExp]", d = "[object Set]", v = "[object String]", S = "[object Symbol]", b = "[object WeakMap]", w = "[object ArrayBuffer]", E = "[object DataView]", A = "[object Float32Array]", H = "[object Float64Array]", C = "[object Int8Array]", J = "[object Int16Array]", L = "[object Int32Array]", Y = "[object Uint8Array]", mt = "[object Uint8ClampedArray]", O = "[object Uint16Array]", N = "[object Uint32Array]", nt = /[\\^$.*+?()[\]{}|]/g, le = /\w*$/, de = /^\[object .+?Constructor\]$/, fe = /^(?:0|[1-9]\d*)$/, z = {};
|
|
976
|
+
z[o] = z[u] = z[w] = z[E] = z[c] = z[f] = z[A] = z[H] = z[C] = z[J] = z[L] = z[p] = z[m] = z[g] = z[M] = z[d] = z[v] = z[S] = z[Y] = z[mt] = z[O] = z[N] = !0, z[h] = z[k] = z[b] = !1;
|
|
977
|
+
var pe = typeof pt == "object" && pt && pt.Object === Object && pt, he = typeof self == "object" && self && self.Object === Object && self, st = pe || he || Function("return this")(), Wt = r && !r.nodeType && r, F = Wt && !0 && t && !t.nodeType && t, Bt = F && F.exports === Wt;
|
|
978
|
+
function me(n, i) {
|
|
979
|
+
return n.set(i[0], i[1]), n;
|
|
980
980
|
}
|
|
981
|
-
function at(n,
|
|
982
|
-
return n.add(
|
|
981
|
+
function at(n, i) {
|
|
982
|
+
return n.add(i), n;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
985
|
-
for (var l = -1,
|
|
984
|
+
function Gt(n, i) {
|
|
985
|
+
for (var l = -1, I = n ? n.length : 0; ++l < I && i(n[l], l, n) !== !1; )
|
|
986
986
|
;
|
|
987
987
|
return n;
|
|
988
988
|
}
|
|
989
|
-
function
|
|
990
|
-
for (var l = -1,
|
|
991
|
-
n[D + l] =
|
|
989
|
+
function Yt(n, i) {
|
|
990
|
+
for (var l = -1, I = i.length, D = n.length; ++l < I; )
|
|
991
|
+
n[D + l] = i[l];
|
|
992
992
|
return n;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Ct(n, i, l, I) {
|
|
995
995
|
for (var D = -1, T = n ? n.length : 0; ++D < T; )
|
|
996
|
-
l =
|
|
996
|
+
l = i(l, n[D], D, n);
|
|
997
997
|
return l;
|
|
998
998
|
}
|
|
999
|
-
function
|
|
1000
|
-
for (var l = -1,
|
|
1001
|
-
|
|
1002
|
-
return
|
|
999
|
+
function Pt(n, i) {
|
|
1000
|
+
for (var l = -1, I = Array(n); ++l < n; )
|
|
1001
|
+
I[l] = i(l);
|
|
1002
|
+
return I;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return n == null ? void 0 : n[
|
|
1004
|
+
function Xt(n, i) {
|
|
1005
|
+
return n == null ? void 0 : n[i];
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1008
|
-
var
|
|
1007
|
+
function Rt(n) {
|
|
1008
|
+
var i = !1;
|
|
1009
1009
|
if (n != null && typeof n.toString != "function")
|
|
1010
1010
|
try {
|
|
1011
|
-
|
|
1011
|
+
i = !!(n + "");
|
|
1012
1012
|
} catch {
|
|
1013
1013
|
}
|
|
1014
|
-
return
|
|
1014
|
+
return i;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
var
|
|
1018
|
-
return n.forEach(function(
|
|
1019
|
-
l[++
|
|
1016
|
+
function Kt(n) {
|
|
1017
|
+
var i = -1, l = Array(n.size);
|
|
1018
|
+
return n.forEach(function(I, D) {
|
|
1019
|
+
l[++i] = [D, I];
|
|
1020
1020
|
}), l;
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function zt(n, i) {
|
|
1023
1023
|
return function(l) {
|
|
1024
|
-
return n(
|
|
1024
|
+
return n(i(l));
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1028
|
-
var
|
|
1029
|
-
return n.forEach(function(
|
|
1030
|
-
l[++
|
|
1027
|
+
function Vt(n) {
|
|
1028
|
+
var i = -1, l = Array(n.size);
|
|
1029
|
+
return n.forEach(function(I) {
|
|
1030
|
+
l[++i] = I;
|
|
1031
1031
|
}), l;
|
|
1032
1032
|
}
|
|
1033
|
-
var
|
|
1034
|
-
var n = /[^.]+$/.exec(
|
|
1033
|
+
var ye = Array.prototype, Ie = Function.prototype, vt = Object.prototype, Ft = st["__core-js_shared__"], Jt = function() {
|
|
1034
|
+
var n = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
|
|
1035
1035
|
return n ? "Symbol(src)_1." + n : "";
|
|
1036
|
-
}(),
|
|
1037
|
-
"^" +
|
|
1038
|
-
),
|
|
1039
|
-
function
|
|
1040
|
-
var
|
|
1041
|
-
for (this.clear(); ++
|
|
1042
|
-
var
|
|
1043
|
-
this.set(
|
|
1036
|
+
}(), qt = Ie.toString, ut = vt.hasOwnProperty, St = vt.toString, ge = RegExp(
|
|
1037
|
+
"^" + qt.call(ut).replace(nt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1038
|
+
), gt = Bt ? st.Buffer : void 0, be = st.Symbol, xe = st.Uint8Array, ft = zt(Object.getPrototypeOf, Object), tr = Object.create, er = vt.propertyIsEnumerable, Er = ye.splice, Oe = Object.getOwnPropertySymbols, ke = gt ? gt.isBuffer : void 0, rr = zt(Object.keys, Object), _e = It(st, "DataView"), Zt = It(st, "Map"), yt = It(st, "Promise"), ve = It(st, "Set"), Ce = It(st, "WeakMap"), Qt = It(Object, "create"), Pe = rt(_e), te = rt(Zt), Re = rt(yt), ze = rt(ve), Fe = rt(Ce), $t = be ? be.prototype : void 0, nr = $t ? $t.valueOf : void 0;
|
|
1039
|
+
function wt(n) {
|
|
1040
|
+
var i = -1, l = n ? n.length : 0;
|
|
1041
|
+
for (this.clear(); ++i < l; ) {
|
|
1042
|
+
var I = n[i];
|
|
1043
|
+
this.set(I[0], I[1]);
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
this.__data__ =
|
|
1046
|
+
function Ar() {
|
|
1047
|
+
this.__data__ = Qt ? Qt(null) : {};
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function Dr(n) {
|
|
1050
1050
|
return this.has(n) && delete this.__data__[n];
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
var
|
|
1054
|
-
if (
|
|
1055
|
-
var l =
|
|
1052
|
+
function xr(n) {
|
|
1053
|
+
var i = this.__data__;
|
|
1054
|
+
if (Qt) {
|
|
1055
|
+
var l = i[n];
|
|
1056
1056
|
return l === s ? void 0 : l;
|
|
1057
1057
|
}
|
|
1058
|
-
return
|
|
1058
|
+
return ut.call(i, n) ? i[n] : void 0;
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
var
|
|
1062
|
-
return
|
|
1060
|
+
function sr(n) {
|
|
1061
|
+
var i = this.__data__;
|
|
1062
|
+
return Qt ? i[n] !== void 0 : ut.call(i, n);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function $e(n, i) {
|
|
1065
1065
|
var l = this.__data__;
|
|
1066
|
-
return l[n] =
|
|
1066
|
+
return l[n] = Qt && i === void 0 ? s : i, this;
|
|
1067
1067
|
}
|
|
1068
|
-
|
|
1068
|
+
wt.prototype.clear = Ar, wt.prototype.delete = Dr, wt.prototype.get = xr, wt.prototype.has = sr, wt.prototype.set = $e;
|
|
1069
1069
|
function X(n) {
|
|
1070
|
-
var
|
|
1071
|
-
for (this.clear(); ++
|
|
1072
|
-
var
|
|
1073
|
-
this.set(
|
|
1070
|
+
var i = -1, l = n ? n.length : 0;
|
|
1071
|
+
for (this.clear(); ++i < l; ) {
|
|
1072
|
+
var I = n[i];
|
|
1073
|
+
this.set(I[0], I[1]);
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function Or() {
|
|
1077
1077
|
this.__data__ = [];
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
var
|
|
1079
|
+
function Cr(n) {
|
|
1080
|
+
var i = this.__data__, l = we(i, n);
|
|
1081
1081
|
if (l < 0)
|
|
1082
1082
|
return !1;
|
|
1083
|
-
var
|
|
1084
|
-
return l ==
|
|
1083
|
+
var I = i.length - 1;
|
|
1084
|
+
return l == I ? i.pop() : Er.call(i, l, 1), !0;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1087
|
-
var
|
|
1088
|
-
return l < 0 ? void 0 :
|
|
1086
|
+
function Pr(n) {
|
|
1087
|
+
var i = this.__data__, l = we(i, n);
|
|
1088
|
+
return l < 0 ? void 0 : i[l][1];
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
return
|
|
1090
|
+
function Rr(n) {
|
|
1091
|
+
return we(this.__data__, n) > -1;
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1094
|
-
var l = this.__data__,
|
|
1095
|
-
return
|
|
1093
|
+
function zr(n, i) {
|
|
1094
|
+
var l = this.__data__, I = we(l, n);
|
|
1095
|
+
return I < 0 ? l.push([n, i]) : l[I][1] = i, this;
|
|
1096
1096
|
}
|
|
1097
|
-
X.prototype.clear =
|
|
1097
|
+
X.prototype.clear = Or, X.prototype.delete = Cr, X.prototype.get = Pr, X.prototype.has = Rr, X.prototype.set = zr;
|
|
1098
1098
|
function q(n) {
|
|
1099
|
-
var
|
|
1100
|
-
for (this.clear(); ++
|
|
1101
|
-
var
|
|
1102
|
-
this.set(
|
|
1099
|
+
var i = -1, l = n ? n.length : 0;
|
|
1100
|
+
for (this.clear(); ++i < l; ) {
|
|
1101
|
+
var I = n[i];
|
|
1102
|
+
this.set(I[0], I[1]);
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Fr() {
|
|
1106
1106
|
this.__data__ = {
|
|
1107
|
-
hash: new
|
|
1108
|
-
map: new (
|
|
1109
|
-
string: new
|
|
1107
|
+
hash: new wt(),
|
|
1108
|
+
map: new (Zt || X)(),
|
|
1109
|
+
string: new wt()
|
|
1110
1110
|
};
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return
|
|
1112
|
+
function $r(n) {
|
|
1113
|
+
return re(this, n).delete(n);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return
|
|
1115
|
+
function Lr(n) {
|
|
1116
|
+
return re(this, n).get(n);
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1119
|
-
return
|
|
1118
|
+
function Nr(n) {
|
|
1119
|
+
return re(this, n).has(n);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
return
|
|
1121
|
+
function Hr(n, i) {
|
|
1122
|
+
return re(this, n).set(n, i), this;
|
|
1123
1123
|
}
|
|
1124
|
-
q.prototype.clear =
|
|
1124
|
+
q.prototype.clear = Fr, q.prototype.delete = $r, q.prototype.get = Lr, q.prototype.has = Nr, q.prototype.set = Hr;
|
|
1125
1125
|
function it(n) {
|
|
1126
1126
|
this.__data__ = new X(n);
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function jr() {
|
|
1129
1129
|
this.__data__ = new X();
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function Ur(n) {
|
|
1132
1132
|
return this.__data__.delete(n);
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function Wr(n) {
|
|
1135
1135
|
return this.__data__.get(n);
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function Br(n) {
|
|
1138
1138
|
return this.__data__.has(n);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1140
|
+
function Gr(n, i) {
|
|
1141
1141
|
var l = this.__data__;
|
|
1142
1142
|
if (l instanceof X) {
|
|
1143
|
-
var
|
|
1144
|
-
if (!
|
|
1145
|
-
return
|
|
1146
|
-
l = this.__data__ = new q(
|
|
1143
|
+
var I = l.__data__;
|
|
1144
|
+
if (!Zt || I.length < e - 1)
|
|
1145
|
+
return I.push([n, i]), this;
|
|
1146
|
+
l = this.__data__ = new q(I);
|
|
1147
1147
|
}
|
|
1148
|
-
return l.set(n,
|
|
1148
|
+
return l.set(n, i), this;
|
|
1149
1149
|
}
|
|
1150
|
-
it.prototype.clear =
|
|
1151
|
-
function
|
|
1152
|
-
var l =
|
|
1150
|
+
it.prototype.clear = jr, it.prototype.delete = Ur, it.prototype.get = Wr, it.prototype.has = Br, it.prototype.set = Gr;
|
|
1151
|
+
function Se(n, i) {
|
|
1152
|
+
var l = je(n) || Te(n) ? Pt(n.length, String) : [], I = l.length, D = !!I;
|
|
1153
1153
|
for (var T in n)
|
|
1154
|
-
|
|
1154
|
+
ut.call(n, T) && !(D && (T == "length" || an(T, I))) && l.push(T);
|
|
1155
1155
|
return l;
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
var
|
|
1159
|
-
(!(
|
|
1157
|
+
function ar(n, i, l) {
|
|
1158
|
+
var I = n[i];
|
|
1159
|
+
(!(ut.call(n, i) && lr(I, l)) || l === void 0 && !(i in n)) && (n[i] = l);
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function we(n, i) {
|
|
1162
1162
|
for (var l = n.length; l--; )
|
|
1163
|
-
if (
|
|
1163
|
+
if (lr(n[l][0], i))
|
|
1164
1164
|
return l;
|
|
1165
1165
|
return -1;
|
|
1166
1166
|
}
|
|
1167
|
-
function bt(n,
|
|
1168
|
-
return n &&
|
|
1167
|
+
function bt(n, i) {
|
|
1168
|
+
return n && He(i, We(i), n);
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function Le(n, i, l, I, D, T, R) {
|
|
1171
1171
|
var P;
|
|
1172
|
-
if (
|
|
1172
|
+
if (I && (P = T ? I(n, D, T, R) : I(n)), P !== void 0)
|
|
1173
1173
|
return P;
|
|
1174
1174
|
if (!_t(n))
|
|
1175
1175
|
return n;
|
|
1176
|
-
var j =
|
|
1176
|
+
var j = je(n);
|
|
1177
1177
|
if (j) {
|
|
1178
|
-
if (P =
|
|
1179
|
-
return
|
|
1178
|
+
if (P = nn(n), !i)
|
|
1179
|
+
return tn(n, P);
|
|
1180
1180
|
} else {
|
|
1181
|
-
var $ =
|
|
1182
|
-
if (
|
|
1183
|
-
return
|
|
1184
|
-
if ($ ==
|
|
1185
|
-
if (
|
|
1181
|
+
var $ = Tt(n), Z = $ == k || $ == y;
|
|
1182
|
+
if (dr(n))
|
|
1183
|
+
return Me(n, i);
|
|
1184
|
+
if ($ == g || $ == o || Z && !T) {
|
|
1185
|
+
if (Rt(n))
|
|
1186
1186
|
return T ? n : {};
|
|
1187
|
-
if (P = kt(Z ? {} : n), !
|
|
1188
|
-
return
|
|
1187
|
+
if (P = kt(Z ? {} : n), !i)
|
|
1188
|
+
return en(n, bt(P, n));
|
|
1189
1189
|
} else {
|
|
1190
1190
|
if (!z[$])
|
|
1191
1191
|
return T ? n : {};
|
|
1192
|
-
P =
|
|
1192
|
+
P = sn(n, $, Le, i);
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
1195
|
R || (R = new it());
|
|
@@ -1197,172 +1197,172 @@ br.exports;
|
|
|
1197
1197
|
if (ot)
|
|
1198
1198
|
return ot;
|
|
1199
1199
|
if (R.set(n, P), !j)
|
|
1200
|
-
var W = l ?
|
|
1201
|
-
return
|
|
1202
|
-
W && (K = Q, Q = n[K]),
|
|
1200
|
+
var W = l ? rn(n) : We(n);
|
|
1201
|
+
return Gt(W || n, function(Q, K) {
|
|
1202
|
+
W && (K = Q, Q = n[K]), ar(P, K, Le(Q, i, l, I, K, n, R));
|
|
1203
1203
|
}), P;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return _t(n) ?
|
|
1205
|
+
function Yr(n) {
|
|
1206
|
+
return _t(n) ? tr(n) : {};
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
var
|
|
1210
|
-
return
|
|
1208
|
+
function Xr(n, i, l) {
|
|
1209
|
+
var I = i(n);
|
|
1210
|
+
return je(n) ? I : Yt(I, l(n));
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return
|
|
1212
|
+
function Kr(n) {
|
|
1213
|
+
return St.call(n);
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
if (!_t(n) ||
|
|
1215
|
+
function Vr(n) {
|
|
1216
|
+
if (!_t(n) || cn(n))
|
|
1217
1217
|
return !1;
|
|
1218
|
-
var
|
|
1219
|
-
return
|
|
1218
|
+
var i = Ue(n) || Rt(n) ? ge : de;
|
|
1219
|
+
return i.test(rt(n));
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
if (!
|
|
1223
|
-
return
|
|
1224
|
-
var
|
|
1221
|
+
function Jr(n) {
|
|
1222
|
+
if (!cr(n))
|
|
1223
|
+
return rr(n);
|
|
1224
|
+
var i = [];
|
|
1225
1225
|
for (var l in Object(n))
|
|
1226
|
-
|
|
1227
|
-
return
|
|
1226
|
+
ut.call(n, l) && l != "constructor" && i.push(l);
|
|
1227
|
+
return i;
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
if (
|
|
1229
|
+
function Me(n, i) {
|
|
1230
|
+
if (i)
|
|
1231
1231
|
return n.slice();
|
|
1232
1232
|
var l = new n.constructor(n.length);
|
|
1233
1233
|
return n.copy(l), l;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
var
|
|
1237
|
-
return new
|
|
1235
|
+
function Ne(n) {
|
|
1236
|
+
var i = new n.constructor(n.byteLength);
|
|
1237
|
+
return new xe(i).set(new xe(n)), i;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
var l =
|
|
1239
|
+
function ee(n, i) {
|
|
1240
|
+
var l = i ? Ne(n.buffer) : n.buffer;
|
|
1241
1241
|
return new n.constructor(l, n.byteOffset, n.byteLength);
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
var
|
|
1245
|
-
return
|
|
1243
|
+
function ir(n, i, l) {
|
|
1244
|
+
var I = i ? l(Kt(n), !0) : Kt(n);
|
|
1245
|
+
return Ct(I, me, new n.constructor());
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1248
|
-
var
|
|
1249
|
-
return
|
|
1247
|
+
function or(n) {
|
|
1248
|
+
var i = new n.constructor(n.source, le.exec(n));
|
|
1249
|
+
return i.lastIndex = n.lastIndex, i;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1252
|
-
var
|
|
1253
|
-
return
|
|
1251
|
+
function qr(n, i, l) {
|
|
1252
|
+
var I = i ? l(Vt(n), !0) : Vt(n);
|
|
1253
|
+
return Ct(I, at, new n.constructor());
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1256
|
-
return
|
|
1255
|
+
function Zr(n) {
|
|
1256
|
+
return nr ? Object(nr.call(n)) : {};
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1259
|
-
var l =
|
|
1258
|
+
function Qr(n, i) {
|
|
1259
|
+
var l = i ? Ne(n.buffer) : n.buffer;
|
|
1260
1260
|
return new n.constructor(l, n.byteOffset, n.length);
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1263
|
-
var l = -1,
|
|
1264
|
-
for (
|
|
1265
|
-
|
|
1266
|
-
return
|
|
1262
|
+
function tn(n, i) {
|
|
1263
|
+
var l = -1, I = n.length;
|
|
1264
|
+
for (i || (i = Array(I)); ++l < I; )
|
|
1265
|
+
i[l] = n[l];
|
|
1266
|
+
return i;
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function He(n, i, l, I) {
|
|
1269
1269
|
l || (l = {});
|
|
1270
|
-
for (var D = -1, T =
|
|
1271
|
-
var R =
|
|
1272
|
-
|
|
1270
|
+
for (var D = -1, T = i.length; ++D < T; ) {
|
|
1271
|
+
var R = i[D], P = void 0;
|
|
1272
|
+
ar(l, R, P === void 0 ? n[R] : P);
|
|
1273
1273
|
}
|
|
1274
1274
|
return l;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
return
|
|
1276
|
+
function en(n, i) {
|
|
1277
|
+
return He(n, Mt(n), i);
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return
|
|
1279
|
+
function rn(n) {
|
|
1280
|
+
return Xr(n, We, Mt);
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function re(n, i) {
|
|
1283
1283
|
var l = n.__data__;
|
|
1284
|
-
return
|
|
1285
|
-
}
|
|
1286
|
-
function
|
|
1287
|
-
var l =
|
|
1288
|
-
return
|
|
1289
|
-
}
|
|
1290
|
-
var
|
|
1291
|
-
(
|
|
1292
|
-
var
|
|
1293
|
-
if (
|
|
1294
|
-
switch (
|
|
1295
|
-
case
|
|
1284
|
+
return on(i) ? l[typeof i == "string" ? "string" : "hash"] : l.map;
|
|
1285
|
+
}
|
|
1286
|
+
function It(n, i) {
|
|
1287
|
+
var l = Xt(n, i);
|
|
1288
|
+
return Vr(l) ? l : void 0;
|
|
1289
|
+
}
|
|
1290
|
+
var Mt = Oe ? zt(Oe, Object) : ln, Tt = Kr;
|
|
1291
|
+
(_e && Tt(new _e(new ArrayBuffer(1))) != E || Zt && Tt(new Zt()) != p || yt && Tt(yt.resolve()) != _ || ve && Tt(new ve()) != d || Ce && Tt(new Ce()) != b) && (Tt = function(n) {
|
|
1292
|
+
var i = St.call(n), l = i == g ? n.constructor : void 0, I = l ? rt(l) : void 0;
|
|
1293
|
+
if (I)
|
|
1294
|
+
switch (I) {
|
|
1295
|
+
case Pe:
|
|
1296
1296
|
return E;
|
|
1297
|
-
case
|
|
1297
|
+
case te:
|
|
1298
1298
|
return p;
|
|
1299
|
-
case Pe:
|
|
1300
|
-
return _;
|
|
1301
1299
|
case Re:
|
|
1302
|
-
return
|
|
1300
|
+
return _;
|
|
1303
1301
|
case ze:
|
|
1304
|
-
return
|
|
1302
|
+
return d;
|
|
1303
|
+
case Fe:
|
|
1304
|
+
return b;
|
|
1305
1305
|
}
|
|
1306
|
-
return
|
|
1306
|
+
return i;
|
|
1307
1307
|
});
|
|
1308
|
-
function
|
|
1309
|
-
var
|
|
1310
|
-
return
|
|
1308
|
+
function nn(n) {
|
|
1309
|
+
var i = n.length, l = n.constructor(i);
|
|
1310
|
+
return i && typeof n[0] == "string" && ut.call(n, "index") && (l.index = n.index, l.input = n.input), l;
|
|
1311
1311
|
}
|
|
1312
1312
|
function kt(n) {
|
|
1313
|
-
return typeof n.constructor == "function" && !
|
|
1313
|
+
return typeof n.constructor == "function" && !cr(n) ? Yr(ft(n)) : {};
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function sn(n, i, l, I) {
|
|
1316
1316
|
var D = n.constructor;
|
|
1317
|
-
switch (
|
|
1317
|
+
switch (i) {
|
|
1318
1318
|
case w:
|
|
1319
|
-
return
|
|
1319
|
+
return Ne(n);
|
|
1320
1320
|
case c:
|
|
1321
1321
|
case f:
|
|
1322
1322
|
return new D(+n);
|
|
1323
1323
|
case E:
|
|
1324
|
-
return
|
|
1324
|
+
return ee(n, I);
|
|
1325
1325
|
case A:
|
|
1326
1326
|
case H:
|
|
1327
1327
|
case C:
|
|
1328
1328
|
case J:
|
|
1329
1329
|
case L:
|
|
1330
1330
|
case Y:
|
|
1331
|
-
case
|
|
1331
|
+
case mt:
|
|
1332
1332
|
case O:
|
|
1333
1333
|
case N:
|
|
1334
|
-
return
|
|
1334
|
+
return Qr(n, I);
|
|
1335
1335
|
case p:
|
|
1336
|
-
return
|
|
1336
|
+
return ir(n, I, l);
|
|
1337
1337
|
case m:
|
|
1338
1338
|
case v:
|
|
1339
1339
|
return new D(n);
|
|
1340
1340
|
case M:
|
|
1341
|
-
return
|
|
1341
|
+
return or(n);
|
|
1342
1342
|
case d:
|
|
1343
|
-
return
|
|
1343
|
+
return qr(n, I, l);
|
|
1344
1344
|
case S:
|
|
1345
|
-
return
|
|
1345
|
+
return Zr(n);
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return
|
|
1348
|
+
function an(n, i) {
|
|
1349
|
+
return i = i ?? a, !!i && (typeof n == "number" || fe.test(n)) && n > -1 && n % 1 == 0 && n < i;
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1352
|
-
var
|
|
1353
|
-
return
|
|
1351
|
+
function on(n) {
|
|
1352
|
+
var i = typeof n;
|
|
1353
|
+
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? n !== "__proto__" : n === null;
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return !!
|
|
1355
|
+
function cn(n) {
|
|
1356
|
+
return !!Jt && Jt in n;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
var
|
|
1358
|
+
function cr(n) {
|
|
1359
|
+
var i = n && n.constructor, l = typeof i == "function" && i.prototype || vt;
|
|
1360
1360
|
return n === l;
|
|
1361
1361
|
}
|
|
1362
1362
|
function rt(n) {
|
|
1363
1363
|
if (n != null) {
|
|
1364
1364
|
try {
|
|
1365
|
-
return
|
|
1365
|
+
return qt.call(n);
|
|
1366
1366
|
} catch {
|
|
1367
1367
|
}
|
|
1368
1368
|
try {
|
|
@@ -1372,54 +1372,54 @@ br.exports;
|
|
|
1372
1372
|
}
|
|
1373
1373
|
return "";
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1376
|
-
return
|
|
1377
|
-
}
|
|
1378
|
-
function ur(n, o) {
|
|
1379
|
-
return n === o || n !== n && o !== o;
|
|
1375
|
+
function ur(n) {
|
|
1376
|
+
return Le(n, !0, !0);
|
|
1380
1377
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1378
|
+
function lr(n, i) {
|
|
1379
|
+
return n === i || n !== n && i !== i;
|
|
1383
1380
|
}
|
|
1384
|
-
var He = Array.isArray;
|
|
1385
1381
|
function Te(n) {
|
|
1386
|
-
return n
|
|
1382
|
+
return un(n) && ut.call(n, "callee") && (!er.call(n, "callee") || St.call(n) == o);
|
|
1387
1383
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1384
|
+
var je = Array.isArray;
|
|
1385
|
+
function Ee(n) {
|
|
1386
|
+
return n != null && fr(n.length) && !Ue(n);
|
|
1390
1387
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
var o = _t(n) ? Ie.call(n) : "";
|
|
1394
|
-
return o == b || o == y;
|
|
1388
|
+
function un(n) {
|
|
1389
|
+
return pr(n) && Ee(n);
|
|
1395
1390
|
}
|
|
1396
|
-
|
|
1391
|
+
var dr = ke || dn;
|
|
1392
|
+
function Ue(n) {
|
|
1393
|
+
var i = _t(n) ? St.call(n) : "";
|
|
1394
|
+
return i == k || i == y;
|
|
1395
|
+
}
|
|
1396
|
+
function fr(n) {
|
|
1397
1397
|
return typeof n == "number" && n > -1 && n % 1 == 0 && n <= a;
|
|
1398
1398
|
}
|
|
1399
1399
|
function _t(n) {
|
|
1400
|
-
var
|
|
1401
|
-
return !!n && (
|
|
1400
|
+
var i = typeof n;
|
|
1401
|
+
return !!n && (i == "object" || i == "function");
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function pr(n) {
|
|
1404
1404
|
return !!n && typeof n == "object";
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1406
|
+
function We(n) {
|
|
1407
|
+
return Ee(n) ? Se(n) : Jr(n);
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function ln() {
|
|
1410
1410
|
return [];
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function dn() {
|
|
1413
1413
|
return !1;
|
|
1414
1414
|
}
|
|
1415
|
-
t.exports =
|
|
1416
|
-
})(
|
|
1417
|
-
var Da =
|
|
1418
|
-
const x = /* @__PURE__ */
|
|
1415
|
+
t.exports = ur;
|
|
1416
|
+
})(kr, kr.exports);
|
|
1417
|
+
var Da = kr.exports;
|
|
1418
|
+
const x = /* @__PURE__ */ Dn(Da);
|
|
1419
1419
|
function xa(t, r) {
|
|
1420
1420
|
return t.filter((s) => {
|
|
1421
1421
|
if (r.forEach((a) => {
|
|
1422
|
-
s.items.includes(a) && (s.items = s.items.filter((
|
|
1422
|
+
s.items.includes(a) && (s.items = s.items.filter((o) => o !== a));
|
|
1423
1423
|
}), s.items.length !== 0 || s.static)
|
|
1424
1424
|
return s;
|
|
1425
1425
|
});
|
|
@@ -1435,28 +1435,28 @@ function ct(t, r, e) {
|
|
|
1435
1435
|
), u = a.filter(
|
|
1436
1436
|
(m) => !e.includes(m.id)
|
|
1437
1437
|
).sort(
|
|
1438
|
-
(m,
|
|
1438
|
+
(m, g) => m.display.from - g.display.from
|
|
1439
1439
|
), c = a.sort(
|
|
1440
|
-
(m,
|
|
1440
|
+
(m, g) => m.display.from - g.display.from
|
|
1441
1441
|
), f = u[u.length - 1];
|
|
1442
1442
|
let h = (f == null ? void 0 : f.display.to) || 0;
|
|
1443
1443
|
c.forEach((m) => {
|
|
1444
1444
|
if (e.includes(m.id)) {
|
|
1445
|
-
const
|
|
1445
|
+
const g = m.display.to - m.display.from;
|
|
1446
1446
|
m.display = {
|
|
1447
1447
|
from: h,
|
|
1448
|
-
to: h +
|
|
1449
|
-
}, h = h +
|
|
1448
|
+
to: h + g
|
|
1449
|
+
}, h = h + g;
|
|
1450
1450
|
}
|
|
1451
1451
|
});
|
|
1452
1452
|
const y = a.sort(
|
|
1453
|
-
(m,
|
|
1453
|
+
(m, g) => m.display.from - g.display.from
|
|
1454
1454
|
).map((m) => m.id);
|
|
1455
1455
|
let p = 0;
|
|
1456
1456
|
y.forEach((m) => {
|
|
1457
|
-
const
|
|
1457
|
+
const g = [];
|
|
1458
1458
|
let _ = 0;
|
|
1459
|
-
if (
|
|
1459
|
+
if (g.forEach((M) => {
|
|
1460
1460
|
M.forEach((d) => {
|
|
1461
1461
|
d.type === "transition" && (_ += d.duration);
|
|
1462
1462
|
});
|
|
@@ -1471,24 +1471,24 @@ function ct(t, r, e) {
|
|
|
1471
1471
|
});
|
|
1472
1472
|
}
|
|
1473
1473
|
function Oa(t, r, e) {
|
|
1474
|
-
const s = t.toId, a = e[s],
|
|
1475
|
-
|
|
1474
|
+
const s = t.toId, a = e[s], o = r.find((u) => u.items.includes(s));
|
|
1475
|
+
o && (o.magnetic || o.items.forEach((u) => {
|
|
1476
1476
|
const c = e[u];
|
|
1477
1477
|
c.display.from > a.display.from && (c.display.from = c.display.from + t.duration, c.display.to = c.display.to + t.duration);
|
|
1478
1478
|
}));
|
|
1479
1479
|
}
|
|
1480
1480
|
function Ca(t, r) {
|
|
1481
|
-
const e = x(t), s = r && r.length ? r : e.activeIds, a = s.map((
|
|
1482
|
-
(
|
|
1483
|
-
const w = e.transitionsMap[
|
|
1481
|
+
const e = x(t), s = r && r.length ? r : e.activeIds, a = s.map((b) => e.trackItemsMap[b]).filter((b) => !!b).map((b) => b.id), o = e.transitionIds.filter(
|
|
1482
|
+
(b) => {
|
|
1483
|
+
const w = e.transitionsMap[b];
|
|
1484
1484
|
return a.includes(w.fromId) || a.includes(w.toId);
|
|
1485
1485
|
}
|
|
1486
1486
|
);
|
|
1487
|
-
a.push(...
|
|
1488
|
-
const u = {}, c = e.trackItemIds, f = e.transitionIds, h = e.trackItemDetailsMap,
|
|
1489
|
-
a.forEach((
|
|
1487
|
+
a.push(...o);
|
|
1488
|
+
const u = {}, c = e.trackItemIds, f = e.transitionIds, h = e.trackItemDetailsMap, k = x(e.tracks), y = x(e.structure);
|
|
1489
|
+
a.forEach((b) => {
|
|
1490
1490
|
var E;
|
|
1491
|
-
const w = e.trackItemsMap[
|
|
1491
|
+
const w = e.trackItemsMap[b] || e.transitionsMap[b];
|
|
1492
1492
|
if (w.type === "template" || w.type === "composition") {
|
|
1493
1493
|
const A = (E = e.structure.find(
|
|
1494
1494
|
(C) => C.id === w.id
|
|
@@ -1499,50 +1499,50 @@ function Ca(t, r) {
|
|
|
1499
1499
|
);
|
|
1500
1500
|
y.splice(H, 1);
|
|
1501
1501
|
}
|
|
1502
|
-
}), a.forEach((
|
|
1502
|
+
}), a.forEach((b) => {
|
|
1503
1503
|
y.forEach((w) => {
|
|
1504
|
-
w.items.includes(
|
|
1504
|
+
w.items.includes(b) && (w.items = w.items.filter((E) => E !== b));
|
|
1505
1505
|
});
|
|
1506
1506
|
});
|
|
1507
1507
|
const p = c.filter(
|
|
1508
|
-
(
|
|
1508
|
+
(b) => !a.includes(b)
|
|
1509
1509
|
);
|
|
1510
|
-
f.forEach((
|
|
1511
|
-
s.includes(
|
|
1510
|
+
f.forEach((b) => {
|
|
1511
|
+
s.includes(b) && s.length === 1 && (u[b] = x(e.transitionsMap[b]));
|
|
1512
1512
|
});
|
|
1513
1513
|
const m = f.filter(
|
|
1514
|
-
(
|
|
1515
|
-
),
|
|
1514
|
+
(b) => !a.includes(b) && !s.includes(b)
|
|
1515
|
+
), g = Object.fromEntries(
|
|
1516
1516
|
Object.entries(h).filter(
|
|
1517
|
-
([
|
|
1517
|
+
([b]) => !a.includes(b)
|
|
1518
1518
|
)
|
|
1519
1519
|
), _ = Object.fromEntries(
|
|
1520
1520
|
Object.entries(e.transitionsMap).filter(
|
|
1521
|
-
([
|
|
1521
|
+
([b]) => !a.includes(b)
|
|
1522
1522
|
)
|
|
1523
1523
|
);
|
|
1524
|
-
Object.keys(_).forEach((
|
|
1525
|
-
s.includes(
|
|
1524
|
+
Object.keys(_).forEach((b) => {
|
|
1525
|
+
s.includes(b) && (_[b].kind = "none");
|
|
1526
1526
|
});
|
|
1527
1527
|
const M = xa(
|
|
1528
1528
|
e.tracks,
|
|
1529
1529
|
a
|
|
1530
1530
|
), d = Object.fromEntries(
|
|
1531
1531
|
Object.entries(e.trackItemsMap).filter(
|
|
1532
|
-
([
|
|
1532
|
+
([b]) => !a.includes(b)
|
|
1533
1533
|
)
|
|
1534
|
-
), v =
|
|
1534
|
+
), v = k.filter((b) => b.magnetic);
|
|
1535
1535
|
ct(v, d, []);
|
|
1536
1536
|
const S = tt(d);
|
|
1537
|
-
return Object.keys(u).forEach((
|
|
1537
|
+
return Object.keys(u).forEach((b) => {
|
|
1538
1538
|
Oa(
|
|
1539
|
-
u[
|
|
1539
|
+
u[b],
|
|
1540
1540
|
M,
|
|
1541
1541
|
d
|
|
1542
1542
|
);
|
|
1543
1543
|
}), {
|
|
1544
1544
|
trackItemIds: p,
|
|
1545
|
-
trackItemDetailsMap:
|
|
1545
|
+
trackItemDetailsMap: g,
|
|
1546
1546
|
activeIds: [],
|
|
1547
1547
|
trackItemsMap: d,
|
|
1548
1548
|
tracks: M,
|
|
@@ -1553,23 +1553,23 @@ function Ca(t, r) {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
1555
|
const Pa = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
1556
|
-
let
|
|
1556
|
+
let us = (t = 21) => {
|
|
1557
1557
|
let r = "", e = crypto.getRandomValues(new Uint8Array(t |= 0));
|
|
1558
1558
|
for (; t--; )
|
|
1559
1559
|
r += Pa[e[t] & 63];
|
|
1560
1560
|
return r;
|
|
1561
1561
|
};
|
|
1562
|
-
function
|
|
1562
|
+
function ae(t = 16) {
|
|
1563
1563
|
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", e = r.charAt(Math.floor(Math.random() * r.length));
|
|
1564
|
-
let s =
|
|
1564
|
+
let s = us(t - 1);
|
|
1565
1565
|
return s = s.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), e + s;
|
|
1566
1566
|
}
|
|
1567
|
-
const
|
|
1567
|
+
const qe = (t) => {
|
|
1568
1568
|
const r = t.map((e) => new FontFace(e.fontFamily, `url(${e.url})`).load().catch((s) => s));
|
|
1569
1569
|
return r.length === 0 ? Promise.resolve(!0) : new Promise((e, s) => {
|
|
1570
1570
|
Promise.all(r).then((a) => {
|
|
1571
|
-
a.forEach((
|
|
1572
|
-
|
|
1571
|
+
a.forEach((o) => {
|
|
1572
|
+
o && o.family && (document.fonts.add(o), e(!0));
|
|
1573
1573
|
});
|
|
1574
1574
|
}).catch((a) => s(a));
|
|
1575
1575
|
});
|
|
@@ -1577,27 +1577,27 @@ const Je = (t) => {
|
|
|
1577
1577
|
async function Ra(t) {
|
|
1578
1578
|
const r = localStorage.getItem("DesignComboTemp");
|
|
1579
1579
|
if (!r) return {};
|
|
1580
|
-
const e = { ...t }, s = JSON.parse(r), a = {},
|
|
1581
|
-
const y = u[
|
|
1582
|
-
(y.type === "caption" || y.type === "text") && y.details.fontUrl && await
|
|
1580
|
+
const e = { ...t }, s = JSON.parse(r), a = {}, o = s.trackItemsMap, u = s.trackItemDetailsMap, c = s.tracks, f = [], h = s.activeIds.map(async (k) => {
|
|
1581
|
+
const y = u[k];
|
|
1582
|
+
(y.type === "caption" || y.type === "text") && y.details.fontUrl && await qe([
|
|
1583
1583
|
{
|
|
1584
1584
|
fontFamily: y.details.fontFamily,
|
|
1585
1585
|
url: y.details.fontUrl
|
|
1586
1586
|
}
|
|
1587
1587
|
]);
|
|
1588
|
-
const p =
|
|
1589
|
-
return a[
|
|
1590
|
-
...
|
|
1588
|
+
const p = ae();
|
|
1589
|
+
return a[k] = p, e.trackItemsMap[p] = {
|
|
1590
|
+
...o[k],
|
|
1591
1591
|
id: p
|
|
1592
1592
|
}, e.trackItemDetailsMap[p] = y, e.trackItemIds.push(p), !0;
|
|
1593
1593
|
});
|
|
1594
|
-
return await Promise.all(h), c.forEach((
|
|
1595
|
-
const y =
|
|
1596
|
-
...
|
|
1594
|
+
return await Promise.all(h), c.forEach((k) => {
|
|
1595
|
+
const y = k.items.map((m) => a[m]), p = {
|
|
1596
|
+
...k,
|
|
1597
1597
|
magnetic: !1,
|
|
1598
1598
|
static: !1,
|
|
1599
1599
|
items: y,
|
|
1600
|
-
id:
|
|
1600
|
+
id: ae()
|
|
1601
1601
|
};
|
|
1602
1602
|
f.push(p);
|
|
1603
1603
|
}), e.tracks = [...f, ...e.tracks], {
|
|
@@ -1607,15 +1607,15 @@ async function Ra(t) {
|
|
|
1607
1607
|
trackItemsMap: e.trackItemsMap
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1610
|
+
const De = (t) => new Promise((r, e) => {
|
|
1611
1611
|
const s = new Image();
|
|
1612
1612
|
console.warn("update cdn config for cors?"), s.onload = () => {
|
|
1613
|
-
const a = s.width,
|
|
1614
|
-
r({ width: a, height:
|
|
1613
|
+
const a = s.width, o = s.height;
|
|
1614
|
+
r({ width: a, height: o });
|
|
1615
1615
|
}, s.onerror = (a) => {
|
|
1616
1616
|
e(a);
|
|
1617
1617
|
}, s.crossOrigin = "anonymous", s.src = t;
|
|
1618
|
-
}),
|
|
1618
|
+
}), ls = (t) => new Promise((r, e) => {
|
|
1619
1619
|
const s = new Audio();
|
|
1620
1620
|
s.preload = "auto", s.addEventListener("loadedmetadata", () => {
|
|
1621
1621
|
const a = s.duration * 1e3;
|
|
@@ -1623,33 +1623,33 @@ const Ae = (t) => new Promise((r, e) => {
|
|
|
1623
1623
|
}), s.addEventListener("error", (a) => {
|
|
1624
1624
|
e(a);
|
|
1625
1625
|
}), s.src = t, s.crossOrigin = "anonymous", s.load();
|
|
1626
|
-
}),
|
|
1626
|
+
}), On = (t) => new Promise((r, e) => {
|
|
1627
1627
|
const s = document.createElement("video");
|
|
1628
1628
|
s.preload = "auto", s.addEventListener("loadedmetadata", () => {
|
|
1629
|
-
const a = s.duration * 1e3,
|
|
1630
|
-
r({ duration: a, width:
|
|
1629
|
+
const a = s.duration * 1e3, o = s.videoWidth, u = s.videoHeight;
|
|
1630
|
+
r({ duration: a, width: o, height: u });
|
|
1631
1631
|
}), s.addEventListener("error", (a) => {
|
|
1632
1632
|
e(a);
|
|
1633
1633
|
}), s.src = t, s.load();
|
|
1634
1634
|
}), za = async (t) => {
|
|
1635
|
-
var a,
|
|
1636
|
-
const r = t.duration, e = (a = t.details) == null ? void 0 : a.width, s = (
|
|
1637
|
-
return r && e && s ? { duration: r, width: e, height: s } :
|
|
1638
|
-
},
|
|
1635
|
+
var a, o;
|
|
1636
|
+
const r = t.duration, e = (a = t.details) == null ? void 0 : a.width, s = (o = t.details) == null ? void 0 : o.height;
|
|
1637
|
+
return r && e && s ? { duration: r, width: e, height: s } : On(t.details.src);
|
|
1638
|
+
}, ds = (t, r) => {
|
|
1639
1639
|
const e = document.createElement("div");
|
|
1640
1640
|
Object.keys(r).forEach((a) => {
|
|
1641
1641
|
a !== "height" && (e.style[a] = r[a]);
|
|
1642
1642
|
}), document.body.appendChild(e), e.textContent = t, e.style.whiteSpace = "normal", e.style.position = "absolute", e.style.visibility = "hidden", e.style.display = "inline-block", e.style.width = r.width + "px", e.style.fontSize = r.fontSize + "px";
|
|
1643
1643
|
const s = getComputedStyle(e).height;
|
|
1644
1644
|
return document.body.removeChild(e), parseFloat(s);
|
|
1645
|
-
},
|
|
1645
|
+
}, Gn = (t, r) => {
|
|
1646
1646
|
var c, f;
|
|
1647
1647
|
const e = ((c = t.details.crop) == null ? void 0 : c.width) || t.details.width || 0, s = ((f = t.details.crop) == null ? void 0 : f.height) || t.details.height || 0;
|
|
1648
|
-
let a = r.width,
|
|
1648
|
+
let a = r.width, o = r.height;
|
|
1649
1649
|
const u = r.width / r.height;
|
|
1650
|
-
return e / s > u ? (a = e,
|
|
1650
|
+
return e / s > u ? (a = e, o = e / u) : (o = s, a = s * u), {
|
|
1651
1651
|
newWidth: a,
|
|
1652
|
-
newHeight:
|
|
1652
|
+
newHeight: o,
|
|
1653
1653
|
crop: {
|
|
1654
1654
|
x: 0,
|
|
1655
1655
|
y: 0,
|
|
@@ -1657,7 +1657,7 @@ const Ae = (t) => new Promise((r, e) => {
|
|
|
1657
1657
|
width: e
|
|
1658
1658
|
}
|
|
1659
1659
|
};
|
|
1660
|
-
},
|
|
1660
|
+
}, Yn = (t, r) => {
|
|
1661
1661
|
const e = x(t.trim), s = x(t.display);
|
|
1662
1662
|
return r.duration < t.display.to && (s.to = r.duration, e && (e.to = r.duration)), {
|
|
1663
1663
|
duration: r.duration,
|
|
@@ -1666,19 +1666,19 @@ const Ae = (t) => new Promise((r, e) => {
|
|
|
1666
1666
|
};
|
|
1667
1667
|
};
|
|
1668
1668
|
async function Fa(t, r) {
|
|
1669
|
-
const e = { ...t }, s = Object.keys(r)[0], a = Object.values(r)[0],
|
|
1669
|
+
const e = { ...t }, s = Object.keys(r)[0], a = Object.values(r)[0], o = e.trackItemDetailsMap[s], u = { ...e.trackItemsMap[s] }, c = o.details;
|
|
1670
1670
|
if (!a.details.src) return {};
|
|
1671
|
-
if (
|
|
1672
|
-
const f = await
|
|
1673
|
-
a.details.crop = h, a.details.height =
|
|
1674
|
-
} else if (
|
|
1675
|
-
const f = await
|
|
1676
|
-
a.details.crop = m, a.details.height =
|
|
1677
|
-
} else if (
|
|
1678
|
-
const f = await
|
|
1679
|
-
u.display =
|
|
1680
|
-
}
|
|
1681
|
-
return
|
|
1671
|
+
if (o.type === "image") {
|
|
1672
|
+
const f = await De(a.details.src), { crop: h, newHeight: k, newWidth: y } = Gn(o, f);
|
|
1673
|
+
a.details.crop = h, a.details.height = k, a.details.width = y;
|
|
1674
|
+
} else if (o.type === "video") {
|
|
1675
|
+
const f = await On(a.details.src), h = e.trackItemsMap[s], { display: k, duration: y, trim: p } = Yn(h, f), { crop: m, newHeight: g, newWidth: _ } = Gn(o, f);
|
|
1676
|
+
a.details.crop = m, a.details.height = g, a.details.width = _, u.display = k, u.duration = y, u.trim = p;
|
|
1677
|
+
} else if (o.type === "audio") {
|
|
1678
|
+
const f = await ls(a.details.src), h = e.trackItemsMap[s], { display: k, duration: y, trim: p } = Yn(h, f);
|
|
1679
|
+
u.display = k, u.duration = y, u.trim = p;
|
|
1680
|
+
}
|
|
1681
|
+
return o.details = { ...c, ...a.details }, e.trackItemDetailsMap[s] = { ...o }, e.trackItemsMap[s] = { ...u }, {
|
|
1682
1682
|
trackItemDetailsMap: e.trackItemDetailsMap,
|
|
1683
1683
|
trackItemsMap: e.trackItemsMap
|
|
1684
1684
|
};
|
|
@@ -1687,26 +1687,26 @@ function $a(t, r) {
|
|
|
1687
1687
|
const e = x(t), s = {}, a = r && r.length ? r : e.activeIds;
|
|
1688
1688
|
if (a.length === 0) return {};
|
|
1689
1689
|
a.forEach((u) => {
|
|
1690
|
-
const c = e.trackItemsMap[u], f = e.trackItemDetailsMap[u], h =
|
|
1690
|
+
const c = e.trackItemsMap[u], f = e.trackItemDetailsMap[u], h = ae();
|
|
1691
1691
|
e.trackItemsMap[h] = {
|
|
1692
1692
|
...x(c),
|
|
1693
1693
|
id: h
|
|
1694
1694
|
}, e.trackItemDetailsMap[h] = {
|
|
1695
1695
|
...x(f)
|
|
1696
1696
|
}, e.trackItemIds.push(h);
|
|
1697
|
-
const
|
|
1697
|
+
const k = e.tracks.find(
|
|
1698
1698
|
(y) => y.items.includes(u)
|
|
1699
1699
|
);
|
|
1700
|
-
s[
|
|
1701
|
-
...
|
|
1702
|
-
id:
|
|
1700
|
+
s[k.id] ? s[k.id].items.push(h) : s[k.id] = {
|
|
1701
|
+
...k,
|
|
1702
|
+
id: ae(),
|
|
1703
1703
|
items: [h],
|
|
1704
1704
|
static: !1,
|
|
1705
1705
|
magnetic: !1
|
|
1706
1706
|
};
|
|
1707
1707
|
});
|
|
1708
|
-
const
|
|
1709
|
-
return e.tracks = [...
|
|
1708
|
+
const o = Object.values(s);
|
|
1709
|
+
return e.tracks = [...o, ...e.tracks], {
|
|
1710
1710
|
trackItemDetailsMap: e.trackItemDetailsMap,
|
|
1711
1711
|
tracks: e.tracks,
|
|
1712
1712
|
trackItemIds: e.trackItemIds,
|
|
@@ -1718,21 +1718,21 @@ function La(t) {
|
|
|
1718
1718
|
function a(u) {
|
|
1719
1719
|
return u.length === 3 ? `#${u[0]}${u[0]}${u[1]}${u[1]}${u[2]}${u[2]}`.toUpperCase() : `#${u.toUpperCase()}`;
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function o(u, c, f) {
|
|
1722
1722
|
return `#${(1 << 24 | u << 16 | c << 8 | f).toString(16).slice(1).toUpperCase()}`;
|
|
1723
1723
|
}
|
|
1724
1724
|
return t = t.replace(r, (u, c) => a(c)), t = t.replace(
|
|
1725
1725
|
e,
|
|
1726
|
-
(u, c, f, h) =>
|
|
1726
|
+
(u, c, f, h) => o(+c, +f, +h)
|
|
1727
1727
|
), t = t.replace(
|
|
1728
1728
|
s,
|
|
1729
|
-
(u, c, f, h) =>
|
|
1729
|
+
(u, c, f, h) => o(+c, +f, +h)
|
|
1730
1730
|
), t;
|
|
1731
1731
|
}
|
|
1732
1732
|
function V(t) {
|
|
1733
1733
|
return /^#[0-9a-fA-F]{3}$/.test(t) ? "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3] : t;
|
|
1734
1734
|
}
|
|
1735
|
-
function
|
|
1735
|
+
function fs(t, r) {
|
|
1736
1736
|
let e = t;
|
|
1737
1737
|
for (const s in r)
|
|
1738
1738
|
if (Object.prototype.hasOwnProperty.call(r, s)) {
|
|
@@ -1741,7 +1741,7 @@ function ps(t, r) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
return e;
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function ps(t) {
|
|
1745
1745
|
const r = t.getAttribute("fill");
|
|
1746
1746
|
if (r && r.trim() !== "" && r.trim() !== "none")
|
|
1747
1747
|
return r.trim();
|
|
@@ -1749,27 +1749,27 @@ function hs(t) {
|
|
|
1749
1749
|
if (e) {
|
|
1750
1750
|
const a = /fill\s*:\s*([^;]+);?/.exec(e);
|
|
1751
1751
|
if (a) {
|
|
1752
|
-
const
|
|
1753
|
-
if (
|
|
1754
|
-
return
|
|
1752
|
+
const o = a[1].trim();
|
|
1753
|
+
if (o !== "" && o !== "none")
|
|
1754
|
+
return o;
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
1757
|
const s = t.parentElement;
|
|
1758
|
-
return s ?
|
|
1758
|
+
return s ? ps(s) : null;
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function Be(t) {
|
|
1761
1761
|
return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(t);
|
|
1762
1762
|
}
|
|
1763
1763
|
const Na = (t) => {
|
|
1764
|
-
const r = `.${t.split(".").filter((
|
|
1764
|
+
const r = `.${t.split(".").filter((o) => o.includes("fill:")).join(".")}`, e = {}, s = /\.([\w-]+)\s*\{\s*([^}]+)\s*\}/g;
|
|
1765
1765
|
let a;
|
|
1766
1766
|
for (; (a = s.exec(r)) !== null; ) {
|
|
1767
|
-
const
|
|
1768
|
-
f && (c.fill = V(f[1].trim())), h && (c.stroke = V(h[1].trim())), e[
|
|
1767
|
+
const o = a[1], u = a[2], c = {}, f = /fill\s*:\s*([^;]+);?/.exec(u), h = /stroke\s*:\s*([^;]+);?/.exec(u);
|
|
1768
|
+
f && (c.fill = V(f[1].trim())), h && (c.stroke = V(h[1].trim())), e[o] = c;
|
|
1769
1769
|
}
|
|
1770
1770
|
return e;
|
|
1771
1771
|
};
|
|
1772
|
-
function
|
|
1772
|
+
function pn(t) {
|
|
1773
1773
|
let r = t.parentElement;
|
|
1774
1774
|
for (; r; ) {
|
|
1775
1775
|
if (r.tagName.toLowerCase() === "mask")
|
|
@@ -1787,47 +1787,47 @@ function Ha(t, r, e = 300, s = 300) {
|
|
|
1787
1787
|
Object.assign(h, d);
|
|
1788
1788
|
const v = M.replace(/\.(st[\w-]+)/g, `.${r}-$1`).replace(/url\(#(.*?)\)/g, `url(#${r}-$1)`);
|
|
1789
1789
|
_.textContent = v;
|
|
1790
|
-
const S = Array.from(u.querySelectorAll("*")),
|
|
1790
|
+
const S = Array.from(u.querySelectorAll("*")), b = /* @__PURE__ */ new Set();
|
|
1791
1791
|
S.forEach((w) => {
|
|
1792
|
-
if (
|
|
1792
|
+
if (pn(w)) return;
|
|
1793
1793
|
["fill", "stroke", "stop-color"].forEach((H) => {
|
|
1794
1794
|
const C = w.getAttribute(H);
|
|
1795
|
-
C && !["none", "transparent"].includes(C) &&
|
|
1795
|
+
C && !["none", "transparent"].includes(C) && b.add(V(C));
|
|
1796
1796
|
});
|
|
1797
1797
|
const E = w.getAttribute("style");
|
|
1798
1798
|
if (E) {
|
|
1799
1799
|
const H = /fill\s*:\s*([^;]+);?/.exec(E), C = /stroke\s*:\s*([^;]+);?/.exec(E), J = /stop-color\s*:\s*([^;]+);?/.exec(E);
|
|
1800
1800
|
if (H) {
|
|
1801
1801
|
const L = H[1].trim();
|
|
1802
|
-
L && !["none", "transparent"].includes(L) &&
|
|
1802
|
+
L && !["none", "transparent"].includes(L) && Be(V(L)) && b.add(V(L));
|
|
1803
1803
|
}
|
|
1804
1804
|
if (C) {
|
|
1805
1805
|
const L = C[1].trim();
|
|
1806
|
-
L && !["none", "transparent"].includes(L) &&
|
|
1806
|
+
L && !["none", "transparent"].includes(L) && Be(V(L)) && b.add(V(L));
|
|
1807
1807
|
}
|
|
1808
1808
|
if (J) {
|
|
1809
1809
|
const L = J[1].trim();
|
|
1810
|
-
L && !["none", "transparent"].includes(L) &&
|
|
1810
|
+
L && !["none", "transparent"].includes(L) && Be(V(L)) && b.add(V(L));
|
|
1811
1811
|
}
|
|
1812
1812
|
}
|
|
1813
1813
|
const A = w.getAttribute("class");
|
|
1814
1814
|
A && A.split(" ").forEach((H) => {
|
|
1815
1815
|
const C = h[H];
|
|
1816
|
-
C != null && C.fill && !["none", "transparent"].includes(C.fill) &&
|
|
1816
|
+
C != null && C.fill && !["none", "transparent"].includes(C.fill) && b.add(V(C.fill)), C != null && C.stroke && !["none", "transparent"].includes(C.stroke) && b.add(V(C.stroke));
|
|
1817
1817
|
});
|
|
1818
|
-
}), Array.from(
|
|
1819
|
-
|
|
1818
|
+
}), Array.from(b).forEach((w) => {
|
|
1819
|
+
Be(w) && a.push(w);
|
|
1820
1820
|
});
|
|
1821
1821
|
});
|
|
1822
|
-
const
|
|
1823
|
-
return
|
|
1824
|
-
if (
|
|
1822
|
+
const k = Array.from(u.querySelectorAll("*")), y = /* @__PURE__ */ new Set();
|
|
1823
|
+
return k.forEach((_) => {
|
|
1824
|
+
if (pn(_)) return;
|
|
1825
1825
|
const M = _.getAttribute("class");
|
|
1826
1826
|
if (M) {
|
|
1827
1827
|
const v = M.split(" ").map((S) => `${r}-${S}`).join(" ");
|
|
1828
1828
|
_.setAttribute("class", v), v.split(" ").forEach((S) => {
|
|
1829
|
-
const
|
|
1830
|
-
|
|
1829
|
+
const b = h[S];
|
|
1830
|
+
b != null && b.fill && !["none", "transparent"].includes(b.fill) && y.add(V(b.fill)), b != null && b.stroke && !["none", "transparent"].includes(b.stroke) && y.add(V(b.stroke));
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
1833
|
["fill", "stroke", "stop-color"].forEach((v) => {
|
|
@@ -1836,7 +1836,7 @@ function Ha(t, r, e = 300, s = 300) {
|
|
|
1836
1836
|
});
|
|
1837
1837
|
const d = _.getAttribute("style");
|
|
1838
1838
|
if (d) {
|
|
1839
|
-
const v = /fill\s*:\s*([^;]+);?/.exec(d), S = /stroke\s*:\s*([^;]+);?/.exec(d),
|
|
1839
|
+
const v = /fill\s*:\s*([^;]+);?/.exec(d), S = /stroke\s*:\s*([^;]+);?/.exec(d), b = /stop-color\s*:\s*([^;]+);?/.exec(d);
|
|
1840
1840
|
if (v) {
|
|
1841
1841
|
const w = v[1].trim();
|
|
1842
1842
|
w && !["none", "transparent"].includes(w) && y.add(V(w));
|
|
@@ -1845,13 +1845,13 @@ function Ha(t, r, e = 300, s = 300) {
|
|
|
1845
1845
|
const w = S[1].trim();
|
|
1846
1846
|
w && !["none", "transparent"].includes(w) && y.add(V(w));
|
|
1847
1847
|
}
|
|
1848
|
-
if (
|
|
1849
|
-
const w =
|
|
1848
|
+
if (b) {
|
|
1849
|
+
const w = b[1].trim();
|
|
1850
1850
|
w && !["none", "transparent"].includes(w) && y.add(V(w));
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
1853
1853
|
}), y.forEach(
|
|
1854
|
-
(_) => !a.includes(_) &&
|
|
1854
|
+
(_) => !a.includes(_) && Be(_) && a.push(_)
|
|
1855
1855
|
), Array.from(u.querySelectorAll("*")).forEach((_) => {
|
|
1856
1856
|
if (_.hasAttribute("id")) {
|
|
1857
1857
|
const M = _.getAttribute("id");
|
|
@@ -1873,8 +1873,8 @@ function Ha(t, r, e = 300, s = 300) {
|
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
1875
|
}), Array.from(u.querySelectorAll("path")).forEach((_) => {
|
|
1876
|
-
if (
|
|
1877
|
-
!
|
|
1876
|
+
if (pn(_)) return;
|
|
1877
|
+
!ps(_) && !_.getAttribute("class") && (_.setAttribute("fill", "#000000"), a.includes("#000000") || a.push("#000000"));
|
|
1878
1878
|
}), { serializer: new XMLSerializer().serializeToString(u), colors: a };
|
|
1879
1879
|
}
|
|
1880
1880
|
const Mr = {
|
|
@@ -1882,7 +1882,7 @@ const Mr = {
|
|
|
1882
1882
|
x: 0,
|
|
1883
1883
|
y: 0,
|
|
1884
1884
|
blur: 0
|
|
1885
|
-
},
|
|
1885
|
+
}, xt = (t, r) => {
|
|
1886
1886
|
let e = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
|
1887
1887
|
const s = {
|
|
1888
1888
|
from: 0,
|
|
@@ -1910,32 +1910,32 @@ const Mr = {
|
|
|
1910
1910
|
), s;
|
|
1911
1911
|
}
|
|
1912
1912
|
return t;
|
|
1913
|
-
},
|
|
1913
|
+
}, hs = (t, r) => t ? t.from && !t.to ? {
|
|
1914
1914
|
from: t.from,
|
|
1915
1915
|
to: r.duration
|
|
1916
1916
|
} : t : {
|
|
1917
1917
|
from: 0,
|
|
1918
1918
|
to: r.duration
|
|
1919
1919
|
};
|
|
1920
|
-
function
|
|
1920
|
+
function ht(t, r) {
|
|
1921
1921
|
const e = t.scaleMode, s = {
|
|
1922
1922
|
x: t.size.width / 2,
|
|
1923
1923
|
y: t.size.height / 2
|
|
1924
1924
|
}, a = { x: r.width / 2, y: r.height / 2 };
|
|
1925
|
-
let
|
|
1925
|
+
let o;
|
|
1926
1926
|
if (e === "fill")
|
|
1927
|
-
|
|
1927
|
+
o = Math.max(
|
|
1928
1928
|
t.size.width / r.width,
|
|
1929
1929
|
t.size.height / r.height
|
|
1930
1930
|
);
|
|
1931
1931
|
else if (e === "fit") {
|
|
1932
1932
|
const f = t.scaleAspectRatio || 1;
|
|
1933
|
-
|
|
1933
|
+
o = Math.min(
|
|
1934
1934
|
t.size.width / r.width,
|
|
1935
1935
|
t.size.height / r.height
|
|
1936
1936
|
) * f;
|
|
1937
1937
|
} else
|
|
1938
|
-
|
|
1938
|
+
o = Math.min(
|
|
1939
1939
|
t.size.width / r.width,
|
|
1940
1940
|
t.size.height / r.height
|
|
1941
1941
|
);
|
|
@@ -1943,13 +1943,13 @@ function pt(t, r) {
|
|
|
1943
1943
|
return {
|
|
1944
1944
|
top: `${s.y - a.y}px`,
|
|
1945
1945
|
left: `${u}px`,
|
|
1946
|
-
transform: `scale(${
|
|
1946
|
+
transform: `scale(${o})`
|
|
1947
1947
|
};
|
|
1948
1948
|
}
|
|
1949
1949
|
const ms = async (t, r) => {
|
|
1950
|
-
const e = t.details.src, s = await za(t), a =
|
|
1950
|
+
const e = t.details.src, s = await za(t), a = ht(r, {
|
|
1951
1951
|
...s
|
|
1952
|
-
}),
|
|
1952
|
+
}), o = hs(t.trim, { duration: s.duration }), u = {
|
|
1953
1953
|
width: s.width,
|
|
1954
1954
|
height: s.height,
|
|
1955
1955
|
opacity: 100,
|
|
@@ -1978,22 +1978,22 @@ const ms = async (t, r) => {
|
|
|
1978
1978
|
};
|
|
1979
1979
|
return {
|
|
1980
1980
|
...t,
|
|
1981
|
-
trim:
|
|
1981
|
+
trim: o,
|
|
1982
1982
|
type: "video",
|
|
1983
1983
|
name: "video",
|
|
1984
1984
|
details: u,
|
|
1985
1985
|
playbackRate: t.playbackRate || 1,
|
|
1986
|
-
display:
|
|
1986
|
+
display: xt(t.display, { duration: s.duration, trim: o }),
|
|
1987
1987
|
duration: s.duration
|
|
1988
1988
|
};
|
|
1989
1989
|
}, ys = async (t) => {
|
|
1990
|
-
const r = t.id, e = t.details, a = (await
|
|
1990
|
+
const r = t.id, e = t.details, a = (await ls(e.src)).duration, o = hs(t.trim, { duration: a });
|
|
1991
1991
|
return {
|
|
1992
1992
|
id: r,
|
|
1993
1993
|
name: t.name || "audio",
|
|
1994
1994
|
type: "audio",
|
|
1995
|
-
display:
|
|
1996
|
-
trim:
|
|
1995
|
+
display: xt(t.display, { duration: a, trim: o }),
|
|
1996
|
+
trim: o,
|
|
1997
1997
|
playbackRate: t.playbackRate || 1,
|
|
1998
1998
|
details: {
|
|
1999
1999
|
src: e.src,
|
|
@@ -2008,7 +2008,7 @@ const ms = async (t, r) => {
|
|
|
2008
2008
|
const e = t.id, s = {
|
|
2009
2009
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
|
2010
2010
|
height: ((f = t.details) == null ? void 0 : f.height) || r.size.height
|
|
2011
|
-
}, a = t.details,
|
|
2011
|
+
}, a = t.details, o = ht(r, s), u = xt(t.display);
|
|
2012
2012
|
return {
|
|
2013
2013
|
id: e,
|
|
2014
2014
|
name: t.type,
|
|
@@ -2019,8 +2019,8 @@ const ms = async (t, r) => {
|
|
|
2019
2019
|
// Default width
|
|
2020
2020
|
height: (a == null ? void 0 : a.height) || s.height,
|
|
2021
2021
|
// Default height
|
|
2022
|
-
top: (a == null ? void 0 : a.top) ||
|
|
2023
|
-
left: (a == null ? void 0 : a.left) ||
|
|
2022
|
+
top: (a == null ? void 0 : a.top) || o.top,
|
|
2023
|
+
left: (a == null ? void 0 : a.left) || o.left,
|
|
2024
2024
|
border: a.border || "none",
|
|
2025
2025
|
// Default border
|
|
2026
2026
|
borderRadius: a.borderRadius || 0,
|
|
@@ -2046,7 +2046,7 @@ const ms = async (t, r) => {
|
|
|
2046
2046
|
const e = t.id, s = {
|
|
2047
2047
|
width: ((c = t.details) == null ? void 0 : c.width) || r.size.width,
|
|
2048
2048
|
height: ((f = t.details) == null ? void 0 : f.height) || r.size.height
|
|
2049
|
-
}, a = t.details,
|
|
2049
|
+
}, a = t.details, o = ht(r, s), u = xt(t.display);
|
|
2050
2050
|
return {
|
|
2051
2051
|
id: e,
|
|
2052
2052
|
name: t.type,
|
|
@@ -2057,8 +2057,8 @@ const ms = async (t, r) => {
|
|
|
2057
2057
|
// Default width
|
|
2058
2058
|
height: (a == null ? void 0 : a.height) || s.height,
|
|
2059
2059
|
// Default height
|
|
2060
|
-
top: (a == null ? void 0 : a.top) ||
|
|
2061
|
-
left: (a == null ? void 0 : a.left) ||
|
|
2060
|
+
top: (a == null ? void 0 : a.top) || o.top,
|
|
2061
|
+
left: (a == null ? void 0 : a.left) || o.left,
|
|
2062
2062
|
border: a.border || "none",
|
|
2063
2063
|
// Default border
|
|
2064
2064
|
borderRadius: a.borderRadius || 0,
|
|
@@ -2080,86 +2080,77 @@ const ms = async (t, r) => {
|
|
|
2080
2080
|
metadata: {}
|
|
2081
2081
|
};
|
|
2082
2082
|
}, Wa = async (t, r) => {
|
|
2083
|
-
var
|
|
2083
|
+
var u, c;
|
|
2084
2084
|
const e = t.id, s = {
|
|
2085
|
-
width: ((
|
|
2086
|
-
height: ((
|
|
2087
|
-
}, a =
|
|
2088
|
-
(a == null ? void 0 : a.map((I) => wr(I))) || []
|
|
2089
|
-
), f = c.reduce((I, _) => I + _.duration, 0) || 0, h = Tr(t.trim, { duration: f }), b = It(t.display, { duration: f, trim: h });
|
|
2085
|
+
width: ((u = t.details) == null ? void 0 : u.width) || r.size.width,
|
|
2086
|
+
height: ((c = t.details) == null ? void 0 : c.height) || r.size.height
|
|
2087
|
+
}, a = t.details, o = ht(r, s);
|
|
2090
2088
|
return {
|
|
2091
2089
|
id: e,
|
|
2092
2090
|
name: t.type,
|
|
2093
2091
|
type: t.type,
|
|
2094
|
-
display:
|
|
2095
|
-
|
|
2096
|
-
|
|
2092
|
+
display: {
|
|
2093
|
+
from: 0,
|
|
2094
|
+
to: t.duration || 1e4
|
|
2095
|
+
},
|
|
2097
2096
|
details: {
|
|
2098
|
-
width: (
|
|
2097
|
+
width: (a == null ? void 0 : a.width) || s.width,
|
|
2099
2098
|
// Default width
|
|
2100
|
-
height: (
|
|
2099
|
+
height: (a == null ? void 0 : a.height) || s.height,
|
|
2101
2100
|
// Default height
|
|
2102
|
-
top: (
|
|
2103
|
-
left: (
|
|
2104
|
-
radialBarColor:
|
|
2105
|
-
border:
|
|
2101
|
+
top: (a == null ? void 0 : a.top) || o.top,
|
|
2102
|
+
left: (a == null ? void 0 : a.left) || o.left,
|
|
2103
|
+
radialBarColor: a.radialBarColor || "rgba(128, 128, 128,1)",
|
|
2104
|
+
border: a.border || "none",
|
|
2106
2105
|
// Default border
|
|
2107
|
-
borderRadius:
|
|
2106
|
+
borderRadius: a.borderRadius || 0,
|
|
2108
2107
|
// Default border radius
|
|
2109
|
-
borderWidth:
|
|
2108
|
+
borderWidth: a.borderWidth || 0,
|
|
2110
2109
|
// Default border width
|
|
2111
|
-
borderColor:
|
|
2110
|
+
borderColor: a.borderColor || "#000000",
|
|
2112
2111
|
// Default border color
|
|
2113
|
-
opacity:
|
|
2112
|
+
opacity: a.opacity || 100,
|
|
2114
2113
|
// Default opacity
|
|
2115
|
-
flipX:
|
|
2116
|
-
flipY:
|
|
2117
|
-
inverted: i.inverted || !1,
|
|
2118
|
-
srcs: a || [],
|
|
2119
|
-
reproduceAudio: i.reproduceAudio || !1,
|
|
2120
|
-
audioDatas: c
|
|
2114
|
+
flipX: a.flipX || !1,
|
|
2115
|
+
flipY: a.flipY || !1
|
|
2121
2116
|
},
|
|
2122
2117
|
metadata: {}
|
|
2123
2118
|
};
|
|
2124
2119
|
}, Ba = async (t, r) => {
|
|
2125
|
-
var
|
|
2120
|
+
var u, c;
|
|
2126
2121
|
const e = t.id, s = {
|
|
2127
|
-
width: ((
|
|
2128
|
-
height: ((
|
|
2129
|
-
}, a =
|
|
2130
|
-
(a == null ? void 0 : a.map((I) => wr(I))) || []
|
|
2131
|
-
), f = c.reduce((I, _) => I + _.duration, 0) || 0, h = Tr(t.trim, { duration: f }), b = It(t.display, { duration: f, trim: h });
|
|
2122
|
+
width: ((u = t.details) == null ? void 0 : u.width) || r.size.width,
|
|
2123
|
+
height: ((c = t.details) == null ? void 0 : c.height) || r.size.height
|
|
2124
|
+
}, a = t.details, o = ht(r, s);
|
|
2132
2125
|
return {
|
|
2133
2126
|
id: e,
|
|
2134
2127
|
name: t.type,
|
|
2135
2128
|
type: t.type,
|
|
2136
|
-
display:
|
|
2137
|
-
|
|
2138
|
-
|
|
2129
|
+
display: {
|
|
2130
|
+
from: 0,
|
|
2131
|
+
to: t.duration || 1e4
|
|
2132
|
+
},
|
|
2139
2133
|
details: {
|
|
2140
|
-
width: (
|
|
2134
|
+
width: (a == null ? void 0 : a.width) || s.width,
|
|
2141
2135
|
// Default width
|
|
2142
|
-
height: (
|
|
2136
|
+
height: (a == null ? void 0 : a.height) || s.height,
|
|
2143
2137
|
// Default height
|
|
2144
|
-
top: (
|
|
2145
|
-
left: (
|
|
2146
|
-
border:
|
|
2138
|
+
top: (a == null ? void 0 : a.top) || o.top,
|
|
2139
|
+
left: (a == null ? void 0 : a.left) || o.left,
|
|
2140
|
+
border: a.border || "none",
|
|
2147
2141
|
// Default border
|
|
2148
|
-
borderRadius:
|
|
2142
|
+
borderRadius: a.borderRadius || 0,
|
|
2149
2143
|
// Default border radius
|
|
2150
|
-
borderWidth:
|
|
2144
|
+
borderWidth: a.borderWidth || 0,
|
|
2151
2145
|
// Default border width
|
|
2152
|
-
borderColor:
|
|
2146
|
+
borderColor: a.borderColor || "#000000",
|
|
2153
2147
|
// Default border color
|
|
2154
|
-
opacity:
|
|
2148
|
+
opacity: a.opacity || 100,
|
|
2155
2149
|
// Default opacity
|
|
2156
|
-
flipX:
|
|
2157
|
-
flipY:
|
|
2158
|
-
inverted:
|
|
2159
|
-
|
|
2160
|
-
reproduceAudio: i.reproduceAudio || !1,
|
|
2161
|
-
audioDatas: c,
|
|
2162
|
-
linealBarColor: i.linealBarColor || "rgba(128, 128, 128,1)"
|
|
2150
|
+
flipX: a.flipX || !1,
|
|
2151
|
+
flipY: a.flipY || !1,
|
|
2152
|
+
inverted: a.inverted || !1,
|
|
2153
|
+
linealBarColor: a.linealBarColor || "rgba(128, 128, 128,1)"
|
|
2163
2154
|
},
|
|
2164
2155
|
metadata: {}
|
|
2165
2156
|
};
|
|
@@ -2171,13 +2162,13 @@ const ms = async (t, r) => {
|
|
|
2171
2162
|
}, a = Math.min(
|
|
2172
2163
|
r.size.width / s.width,
|
|
2173
2164
|
r.size.height / s.height
|
|
2174
|
-
),
|
|
2165
|
+
), o = ((y = t.details) == null ? void 0 : y.rotate) || 0, u = ht(r, s), c = t.display;
|
|
2175
2166
|
let f = 1 / 0, h = 0;
|
|
2176
2167
|
e.forEach((p) => {
|
|
2177
2168
|
const m = t.trackItemsMap[p];
|
|
2178
2169
|
m.display.from < f && (f = m.display.from), m.display.to > h && (h = m.display.to);
|
|
2179
2170
|
});
|
|
2180
|
-
const
|
|
2171
|
+
const k = t.trim || t.display || { from: f, to: h };
|
|
2181
2172
|
return {
|
|
2182
2173
|
id: t.id,
|
|
2183
2174
|
type: "template",
|
|
@@ -2188,22 +2179,22 @@ const ms = async (t, r) => {
|
|
|
2188
2179
|
top: t.details.top || u.top,
|
|
2189
2180
|
left: t.details.left || u.left,
|
|
2190
2181
|
scale: a,
|
|
2191
|
-
rotate:
|
|
2182
|
+
rotate: o,
|
|
2192
2183
|
background: t.details.background || "transparent"
|
|
2193
2184
|
},
|
|
2194
|
-
trim:
|
|
2185
|
+
trim: k,
|
|
2195
2186
|
display: c || { from: f, to: h },
|
|
2196
2187
|
activeEdit: !1
|
|
2197
2188
|
};
|
|
2198
2189
|
}, Ga = async (t, r) => {
|
|
2199
|
-
var
|
|
2190
|
+
var k;
|
|
2200
2191
|
const e = t.trackItemIds, s = t.size || {
|
|
2201
2192
|
width: t.details.width,
|
|
2202
2193
|
height: t.details.height
|
|
2203
2194
|
}, a = Math.min(
|
|
2204
2195
|
r.size.width / s.width,
|
|
2205
2196
|
r.size.height / s.height
|
|
2206
|
-
),
|
|
2197
|
+
), o = ((k = t.details) == null ? void 0 : k.rotate) || 0, u = ht(r, s), c = t.display;
|
|
2207
2198
|
let f = 1 / 0, h = 0;
|
|
2208
2199
|
return e.forEach((y) => {
|
|
2209
2200
|
const p = t.trackItemsMap[y];
|
|
@@ -2218,32 +2209,32 @@ const ms = async (t, r) => {
|
|
|
2218
2209
|
top: t.details.top || u.top,
|
|
2219
2210
|
left: t.details.left || u.left,
|
|
2220
2211
|
scale: a,
|
|
2221
|
-
rotate:
|
|
2212
|
+
rotate: o
|
|
2222
2213
|
},
|
|
2223
2214
|
display: c || { from: f, to: h }
|
|
2224
2215
|
};
|
|
2225
2216
|
}, gs = async (t, r) => {
|
|
2226
|
-
const e = t.details, s =
|
|
2217
|
+
const e = t.details, s = De(e.src), a = fetch(e.src), [o, u] = await Promise.all([
|
|
2227
2218
|
s,
|
|
2228
2219
|
a
|
|
2229
|
-
]), c = await u.text(), f =
|
|
2220
|
+
]), c = await u.text(), f = ht(r, o), { serializer: h, colors: k } = Ha(
|
|
2230
2221
|
La(c),
|
|
2231
2222
|
t.id,
|
|
2232
|
-
parseFloat(e.width ||
|
|
2233
|
-
parseFloat(e.height ||
|
|
2234
|
-
), y = t.details.colorMap || Object.fromEntries(
|
|
2223
|
+
parseFloat(e.width || o.width),
|
|
2224
|
+
parseFloat(e.height || o.height)
|
|
2225
|
+
), y = t.details.colorMap || Object.fromEntries(k.map((p) => [p, p]));
|
|
2235
2226
|
return {
|
|
2236
2227
|
id: t.id,
|
|
2237
2228
|
name: "illustration",
|
|
2238
2229
|
type: t.type,
|
|
2239
|
-
display:
|
|
2230
|
+
display: xt(t.display),
|
|
2240
2231
|
playbackRate: t.playbackRate || 1,
|
|
2241
2232
|
details: {
|
|
2242
2233
|
src: e.src || "",
|
|
2243
2234
|
// Default source URL
|
|
2244
|
-
width: e.width ||
|
|
2235
|
+
width: e.width || o.width || 100,
|
|
2245
2236
|
// Default width
|
|
2246
|
-
height: e.height ||
|
|
2237
|
+
height: e.height || o.height || 100,
|
|
2247
2238
|
// Default height
|
|
2248
2239
|
opacity: e.opacity ?? 100,
|
|
2249
2240
|
// Default opacity
|
|
@@ -2272,12 +2263,12 @@ const ms = async (t, r) => {
|
|
|
2272
2263
|
metadata: t.metadata || {}
|
|
2273
2264
|
};
|
|
2274
2265
|
}, Ya = async (t, r) => {
|
|
2275
|
-
const e = t.details, s =
|
|
2266
|
+
const e = t.details, s = De(e.src), [a] = await Promise.all([s]), o = ht(r, a);
|
|
2276
2267
|
return {
|
|
2277
2268
|
id: t.id,
|
|
2278
2269
|
name: "shape",
|
|
2279
2270
|
type: t.type,
|
|
2280
|
-
display:
|
|
2271
|
+
display: xt(t.display),
|
|
2281
2272
|
playbackRate: t.playbackRate || 1,
|
|
2282
2273
|
details: {
|
|
2283
2274
|
src: e.src || "",
|
|
@@ -2288,15 +2279,15 @@ const ms = async (t, r) => {
|
|
|
2288
2279
|
// Default height
|
|
2289
2280
|
opacity: e.opacity ?? 100,
|
|
2290
2281
|
// Default opacity
|
|
2291
|
-
transform: e.transform ||
|
|
2282
|
+
transform: e.transform || o.transform,
|
|
2292
2283
|
// Default transform
|
|
2293
2284
|
border: e.border || "none",
|
|
2294
2285
|
// Default border
|
|
2295
2286
|
borderRadius: e.borderRadius || 0,
|
|
2296
2287
|
// Default border radius
|
|
2297
|
-
top: e.top ||
|
|
2288
|
+
top: e.top || o.top || "0px",
|
|
2298
2289
|
// Default top
|
|
2299
|
-
left: e.left ||
|
|
2290
|
+
left: e.left || o.left || "0px",
|
|
2300
2291
|
// Default left
|
|
2301
2292
|
borderWidth: e.borderWidth ?? 0,
|
|
2302
2293
|
// Default border width
|
|
@@ -2311,12 +2302,12 @@ const ms = async (t, r) => {
|
|
|
2311
2302
|
metadata: t.metadata || {}
|
|
2312
2303
|
};
|
|
2313
2304
|
}, bs = async (t, r) => {
|
|
2314
|
-
const e = t.details, s = await
|
|
2305
|
+
const e = t.details, s = await De(e.src), a = ht(r, s);
|
|
2315
2306
|
return {
|
|
2316
2307
|
id: t.id,
|
|
2317
2308
|
type: "image",
|
|
2318
2309
|
name: "image",
|
|
2319
|
-
display:
|
|
2310
|
+
display: xt(t.display),
|
|
2320
2311
|
playbackRate: t.playbackRate || 1,
|
|
2321
2312
|
details: {
|
|
2322
2313
|
src: e.src || "",
|
|
@@ -2354,30 +2345,30 @@ const ms = async (t, r) => {
|
|
|
2354
2345
|
};
|
|
2355
2346
|
}, ks = async (t, r) => {
|
|
2356
2347
|
const e = t;
|
|
2357
|
-
e.details.fontUrl && await
|
|
2348
|
+
e.details.fontUrl && await qe([
|
|
2358
2349
|
{
|
|
2359
2350
|
fontFamily: e.details.fontFamily,
|
|
2360
2351
|
url: e.details.fontUrl
|
|
2361
2352
|
}
|
|
2362
2353
|
]);
|
|
2363
|
-
const s = e.id, a = e.details,
|
|
2364
|
-
width:
|
|
2354
|
+
const s = e.id, a = e.details, o = vs(a), u = ds(e.details.text, o), c = ht(r, {
|
|
2355
|
+
width: o.width,
|
|
2365
2356
|
height: u
|
|
2366
2357
|
});
|
|
2367
2358
|
return {
|
|
2368
2359
|
id: s,
|
|
2369
2360
|
name: "caption",
|
|
2370
2361
|
type: "caption",
|
|
2371
|
-
display:
|
|
2362
|
+
display: xt(e.display),
|
|
2372
2363
|
details: {
|
|
2373
|
-
...
|
|
2364
|
+
...o,
|
|
2374
2365
|
text: a.text || "",
|
|
2375
2366
|
// Default text content
|
|
2376
2367
|
height: u,
|
|
2377
2368
|
// Default height
|
|
2378
2369
|
fontUrl: a.fontUrl,
|
|
2379
|
-
top:
|
|
2380
|
-
left:
|
|
2370
|
+
top: o.top || c.top,
|
|
2371
|
+
left: o.left || c.left,
|
|
2381
2372
|
borderWidth: a.borderWidth || 0,
|
|
2382
2373
|
borderColor: a.borderColor || "#000000",
|
|
2383
2374
|
boxShadow: a.boxShadow || Mr,
|
|
@@ -2389,26 +2380,26 @@ const ms = async (t, r) => {
|
|
|
2389
2380
|
metadata: t.metadata || {}
|
|
2390
2381
|
};
|
|
2391
2382
|
}, _s = async (t, r) => {
|
|
2392
|
-
t.details.fontUrl && await
|
|
2383
|
+
t.details.fontUrl && await qe([
|
|
2393
2384
|
{
|
|
2394
2385
|
fontFamily: t.details.fontFamily,
|
|
2395
2386
|
url: t.details.fontUrl
|
|
2396
2387
|
}
|
|
2397
2388
|
]);
|
|
2398
|
-
const e = t.id, s = t.details, a = vs(s),
|
|
2389
|
+
const e = t.id, s = t.details, a = vs(s), o = ds(t.details.text, a), u = ht(r, {
|
|
2399
2390
|
width: a.width,
|
|
2400
|
-
height:
|
|
2391
|
+
height: o
|
|
2401
2392
|
});
|
|
2402
2393
|
return {
|
|
2403
2394
|
id: e,
|
|
2404
2395
|
name: "text",
|
|
2405
2396
|
type: "text",
|
|
2406
|
-
display:
|
|
2397
|
+
display: xt(t.display),
|
|
2407
2398
|
details: {
|
|
2408
2399
|
...a,
|
|
2409
2400
|
text: s.text || "",
|
|
2410
2401
|
// Default text content
|
|
2411
|
-
height:
|
|
2402
|
+
height: o,
|
|
2412
2403
|
// Default height
|
|
2413
2404
|
fontUrl: s.fontUrl,
|
|
2414
2405
|
top: a.top || u.top,
|
|
@@ -2489,7 +2480,7 @@ function Ss(t, r) {
|
|
|
2489
2480
|
);
|
|
2490
2481
|
}
|
|
2491
2482
|
const ws = (t = [], r = []) => t.length === 0 ? r.map((s) => ({
|
|
2492
|
-
id:
|
|
2483
|
+
id: ae(),
|
|
2493
2484
|
items: [s.id],
|
|
2494
2485
|
type: s.type,
|
|
2495
2486
|
accepts: ["text", "image", "video", "audio", "caption", "template"]
|
|
@@ -2500,15 +2491,15 @@ const ws = (t = [], r = []) => t.length === 0 ? r.map((s) => ({
|
|
|
2500
2491
|
type: e.type || "text",
|
|
2501
2492
|
magnetic: e.magnetic || !1,
|
|
2502
2493
|
static: e.static || !1,
|
|
2503
|
-
id: e.id ||
|
|
2494
|
+
id: e.id || ae()
|
|
2504
2495
|
}));
|
|
2505
2496
|
async function Ka(t, r) {
|
|
2506
2497
|
var c, f, h;
|
|
2507
|
-
const e = r.trackItemsMap, s = r.trackItemDetailsMap, a = /* @__PURE__ */ new Set(),
|
|
2508
|
-
for (const
|
|
2509
|
-
const y = s[
|
|
2498
|
+
const e = r.trackItemsMap, s = r.trackItemDetailsMap, a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
2499
|
+
for (const k in s) {
|
|
2500
|
+
const y = s[k];
|
|
2510
2501
|
if (y.type === "text" || y.type === "caption") {
|
|
2511
|
-
const p = e[
|
|
2502
|
+
const p = e[k];
|
|
2512
2503
|
if (y.details.fontUrl) {
|
|
2513
2504
|
const m = {
|
|
2514
2505
|
fontFamily: y.details.fontFamily,
|
|
@@ -2517,43 +2508,43 @@ async function Ka(t, r) {
|
|
|
2517
2508
|
a.add(JSON.stringify(m));
|
|
2518
2509
|
}
|
|
2519
2510
|
(c = p.animations) != null && c.in && p.animations.in.composition.forEach((m) => {
|
|
2520
|
-
var
|
|
2521
|
-
(
|
|
2511
|
+
var g;
|
|
2512
|
+
(g = m.details) != null && g.fonts && m.details.fonts.forEach((_) => {
|
|
2522
2513
|
a.add(JSON.stringify(_));
|
|
2523
2514
|
});
|
|
2524
2515
|
}), (f = p.animations) != null && f.loop && p.animations.loop.composition.forEach((m) => {
|
|
2525
|
-
var
|
|
2526
|
-
(
|
|
2516
|
+
var g;
|
|
2517
|
+
(g = m.details) != null && g.fonts && m.details.fonts.forEach((_) => {
|
|
2527
2518
|
a.add(JSON.stringify(_));
|
|
2528
2519
|
});
|
|
2529
2520
|
}), (h = p.animations) != null && h.out && p.animations.out.composition.forEach((m) => {
|
|
2530
|
-
var
|
|
2531
|
-
(
|
|
2521
|
+
var g;
|
|
2522
|
+
(g = m.details) != null && g.fonts && m.details.fonts.forEach((_) => {
|
|
2532
2523
|
a.add(JSON.stringify(_));
|
|
2533
2524
|
});
|
|
2534
2525
|
});
|
|
2535
2526
|
} else if (y.type === "illustration") {
|
|
2536
|
-
const p = e[
|
|
2537
|
-
|
|
2527
|
+
const p = e[k];
|
|
2528
|
+
o.set(k, {
|
|
2538
2529
|
trackItem: p,
|
|
2539
2530
|
details: y.details
|
|
2540
2531
|
});
|
|
2541
2532
|
}
|
|
2542
2533
|
}
|
|
2543
|
-
a.size > 0 && await
|
|
2544
|
-
Array.from(a).map((
|
|
2534
|
+
a.size > 0 && await qe(
|
|
2535
|
+
Array.from(a).map((k) => JSON.parse(k))
|
|
2545
2536
|
);
|
|
2546
|
-
for (const [
|
|
2537
|
+
for (const [k, y] of o) {
|
|
2547
2538
|
const p = await gs(
|
|
2548
2539
|
{ ...y.trackItem, details: y.details },
|
|
2549
2540
|
{
|
|
2550
2541
|
size: { width: y.details.width, height: y.details.height }
|
|
2551
2542
|
}
|
|
2552
|
-
), m =
|
|
2543
|
+
), m = fs(
|
|
2553
2544
|
p.details.svgString,
|
|
2554
2545
|
y.details.colorMap
|
|
2555
2546
|
);
|
|
2556
|
-
p.details.svgString = m, s[
|
|
2547
|
+
p.details.svgString = m, s[k].details = p.details, e[k] = p;
|
|
2557
2548
|
}
|
|
2558
2549
|
const u = tt(e);
|
|
2559
2550
|
return {
|
|
@@ -2573,8 +2564,8 @@ function Va(t) {
|
|
|
2573
2564
|
e.forEach((u) => {
|
|
2574
2565
|
a.trackItemDetailsMap[u] = r.trackItemDetailsMap[u], a.trackItemsMap[u] = r.trackItemsMap[u], s.push(r.tracks.find((c) => c.items.includes(u)));
|
|
2575
2566
|
});
|
|
2576
|
-
const
|
|
2577
|
-
s.filter((u) =>
|
|
2567
|
+
const o = /* @__PURE__ */ new Set();
|
|
2568
|
+
s.filter((u) => o.has(u.id) ? !1 : (o.add(u.id), !0)), a.tracks = Array.from(o), localStorage.setItem("DesignComboTemp", JSON.stringify(a));
|
|
2578
2569
|
}
|
|
2579
2570
|
function Ja(t, r) {
|
|
2580
2571
|
const e = x(t);
|
|
@@ -2582,7 +2573,7 @@ function Ja(t, r) {
|
|
|
2582
2573
|
const s = e.activeIds[0], a = x(e.trackItemsMap[s]);
|
|
2583
2574
|
if (r >= a.display.to || r <= a.display.from)
|
|
2584
2575
|
return {};
|
|
2585
|
-
const
|
|
2576
|
+
const o = x(e.trackItemDetailsMap[s]), u = ae(), c = {
|
|
2586
2577
|
...a,
|
|
2587
2578
|
display: {
|
|
2588
2579
|
from: a.display.from,
|
|
@@ -2597,7 +2588,7 @@ function Ja(t, r) {
|
|
|
2597
2588
|
}
|
|
2598
2589
|
}, h = Object.values(e.transitionsMap).find(
|
|
2599
2590
|
(y) => y.fromId === a.id && y.kind !== "none"
|
|
2600
|
-
),
|
|
2591
|
+
), k = Object.values(e.transitionsMap).find(
|
|
2601
2592
|
(y) => y.toId === a.id && y.kind !== "none"
|
|
2602
2593
|
);
|
|
2603
2594
|
if (a.type === "video" || a.type === "audio") {
|
|
@@ -2610,11 +2601,11 @@ function Ja(t, r) {
|
|
|
2610
2601
|
to: a.trim.to
|
|
2611
2602
|
};
|
|
2612
2603
|
}
|
|
2613
|
-
if (
|
|
2604
|
+
if (k) {
|
|
2614
2605
|
const y = c.display.to - c.display.from;
|
|
2615
|
-
if (
|
|
2606
|
+
if (k.duration / 2 > y) {
|
|
2616
2607
|
e.transitionIds = e.transitionIds.filter(
|
|
2617
|
-
(m) => m !==
|
|
2608
|
+
(m) => m !== k.id
|
|
2618
2609
|
);
|
|
2619
2610
|
const p = {};
|
|
2620
2611
|
e.transitionIds.forEach(
|
|
@@ -2640,7 +2631,7 @@ function Ja(t, r) {
|
|
|
2640
2631
|
p[m] = e.transitionsMap[m];
|
|
2641
2632
|
}), e.transitionsMap = p);
|
|
2642
2633
|
}
|
|
2643
|
-
return e.trackItemsMap[s] = c, e.trackItemsMap[u] = f, e.trackItemIds.push(u), e.trackItemDetailsMap[u] =
|
|
2634
|
+
return e.trackItemsMap[s] = c, e.trackItemsMap[u] = f, e.trackItemIds.push(u), e.trackItemDetailsMap[u] = o, e.tracks.forEach((y) => {
|
|
2644
2635
|
y.items.includes(s) && y.items.push(u);
|
|
2645
2636
|
}), {
|
|
2646
2637
|
trackItemDetailsMap: e.trackItemDetailsMap,
|
|
@@ -2652,27 +2643,27 @@ function Ja(t, r) {
|
|
|
2652
2643
|
};
|
|
2653
2644
|
}
|
|
2654
2645
|
async function qa(t, r) {
|
|
2655
|
-
const e = x(t), s = e.trackItemDetailsMap, a = e.trackItemsMap,
|
|
2656
|
-
if (!
|
|
2657
|
-
for (const c of
|
|
2646
|
+
const e = x(t), s = e.trackItemDetailsMap, a = e.trackItemsMap, o = Object.keys(r);
|
|
2647
|
+
if (!o.length) return {};
|
|
2648
|
+
for (const c of o) {
|
|
2658
2649
|
const f = r[c];
|
|
2659
2650
|
if (f.details && (s[c].details = {
|
|
2660
2651
|
...s[c].details,
|
|
2661
2652
|
...f.details
|
|
2662
2653
|
}, f.details.colorMap)) {
|
|
2663
|
-
const h = s[c].details.initialSvgString,
|
|
2654
|
+
const h = s[c].details.initialSvgString, k = fs(
|
|
2664
2655
|
h,
|
|
2665
2656
|
f.details.colorMap
|
|
2666
2657
|
);
|
|
2667
|
-
s[c].details.svgString =
|
|
2658
|
+
s[c].details.svgString = k;
|
|
2668
2659
|
}
|
|
2669
2660
|
if (f.metadata && (a[c].metadata ? a[c].metadata = {
|
|
2670
2661
|
...a[c].metadata,
|
|
2671
2662
|
...f.metadata
|
|
2672
2663
|
} : a[c].metadata = f.metadata), f.display || f.playbackRate) {
|
|
2673
|
-
const h = f.playbackRate,
|
|
2664
|
+
const h = f.playbackRate, k = a[c].playbackRate || 1, y = a[c].display, g = (y.to - y.from) * k / h, _ = {
|
|
2674
2665
|
from: y.from,
|
|
2675
|
-
to: y.from +
|
|
2666
|
+
to: y.from + g
|
|
2676
2667
|
};
|
|
2677
2668
|
a[c].display = _, a[c].playbackRate = h;
|
|
2678
2669
|
}
|
|
@@ -2681,10 +2672,10 @@ async function qa(t, r) {
|
|
|
2681
2672
|
...f.animations
|
|
2682
2673
|
});
|
|
2683
2674
|
}
|
|
2684
|
-
for (const c of
|
|
2675
|
+
for (const c of o) {
|
|
2685
2676
|
const f = r[c];
|
|
2686
2677
|
if (a[c].type === "shape" && f.details.src) {
|
|
2687
|
-
const h = await
|
|
2678
|
+
const h = await De(f.details.src);
|
|
2688
2679
|
s[c].details.width = h.width, s[c].details.height = h.height;
|
|
2689
2680
|
}
|
|
2690
2681
|
}
|
|
@@ -2696,31 +2687,31 @@ async function qa(t, r) {
|
|
|
2696
2687
|
};
|
|
2697
2688
|
}
|
|
2698
2689
|
async function Za(t, r) {
|
|
2699
|
-
const e = x(t), s = Object.keys(r)[0], a = Object.values(r)[0],
|
|
2690
|
+
const e = x(t), s = Object.keys(r)[0], a = Object.values(r)[0], o = e.trackItemDetailsMap[s], u = o.details;
|
|
2700
2691
|
if (!a.details.src) return {};
|
|
2701
|
-
if (
|
|
2702
|
-
const f = await
|
|
2692
|
+
if (o.type === "image") {
|
|
2693
|
+
const f = await De(a.details.src), h = o.details.width || 0, k = o.details.height || 0;
|
|
2703
2694
|
let y = f.width, p = f.height;
|
|
2704
2695
|
const m = f.width / f.height;
|
|
2705
|
-
h /
|
|
2696
|
+
h / k > m ? (y = h, p = h / m) : (p = k, y = k * m), u.crop = {
|
|
2706
2697
|
x: 0,
|
|
2707
2698
|
y: 0,
|
|
2708
2699
|
height: u.height,
|
|
2709
2700
|
width: u.width
|
|
2710
2701
|
}, a.details.width = y, a.details.height = p;
|
|
2711
|
-
} else if (
|
|
2712
|
-
const f = await
|
|
2702
|
+
} else if (o.type === "video") {
|
|
2703
|
+
const f = await On(a.details.src), h = o.details.width || 0, k = o.details.height || 0;
|
|
2713
2704
|
let y = f.width, p = f.height;
|
|
2714
2705
|
const m = f.width / f.height;
|
|
2715
|
-
h /
|
|
2706
|
+
h / k > m ? (y = h, p = h / m) : (p = k, y = k * m), u.crop = {
|
|
2716
2707
|
x: 0,
|
|
2717
2708
|
y: 0,
|
|
2718
2709
|
height: u.height,
|
|
2719
2710
|
width: u.width
|
|
2720
2711
|
}, a.details.width = y, a.details.height = p;
|
|
2721
2712
|
}
|
|
2722
|
-
a.details && (
|
|
2723
|
-
const c = { ...
|
|
2713
|
+
a.details && (o.details = { ...u, ...a.details }, a.details = o.details);
|
|
2714
|
+
const c = { ...o, ...a };
|
|
2724
2715
|
return e.trackItemDetailsMap[s] = c, e.trackItemsMap[s] = {
|
|
2725
2716
|
...e.trackItemsMap[s],
|
|
2726
2717
|
type: a.type
|
|
@@ -2741,60 +2732,60 @@ function Qa(t, r) {
|
|
|
2741
2732
|
}
|
|
2742
2733
|
async function ti(t, r, e = {}) {
|
|
2743
2734
|
const s = x(t), a = r.trackItems.map(
|
|
2744
|
-
(
|
|
2735
|
+
(g) => Xa(g, {
|
|
2745
2736
|
size: s.size
|
|
2746
2737
|
})
|
|
2747
|
-
),
|
|
2748
|
-
r.trackItems.forEach((
|
|
2749
|
-
if (
|
|
2738
|
+
), o = await Promise.all(a), u = ws(r.tracks, r.trackItems), c = [], f = o.map((g) => g.id);
|
|
2739
|
+
r.trackItems.forEach((g) => {
|
|
2740
|
+
if (g.type !== "template") return;
|
|
2750
2741
|
s.trackItemsMap = {
|
|
2751
2742
|
...s.trackItemsMap,
|
|
2752
|
-
...
|
|
2743
|
+
...g.trackItemsMap
|
|
2753
2744
|
}, s.trackItemDetailsMap = {
|
|
2754
2745
|
...s.trackItemDetailsMap,
|
|
2755
|
-
...
|
|
2746
|
+
...g.trackItemDetailsMap
|
|
2756
2747
|
}, s.transitionsMap = {
|
|
2757
2748
|
...s.transitionsMap,
|
|
2758
|
-
...
|
|
2749
|
+
...g.transitionsMap
|
|
2759
2750
|
};
|
|
2760
2751
|
const _ = {
|
|
2761
|
-
id:
|
|
2762
|
-
items:
|
|
2763
|
-
transitions:
|
|
2764
|
-
tracks:
|
|
2752
|
+
id: g.id,
|
|
2753
|
+
items: g.trackItemIds,
|
|
2754
|
+
transitions: g.transitionsIds || [],
|
|
2755
|
+
tracks: g.tracks
|
|
2765
2756
|
};
|
|
2766
2757
|
c.push(_);
|
|
2767
2758
|
});
|
|
2768
|
-
const h = [],
|
|
2769
|
-
if (
|
|
2770
|
-
const { details: _, ...M } =
|
|
2771
|
-
h.push(
|
|
2772
|
-
type:
|
|
2759
|
+
const h = [], k = {}, y = {};
|
|
2760
|
+
if (o.forEach((g) => {
|
|
2761
|
+
const { details: _, ...M } = g;
|
|
2762
|
+
h.push(g.id), k[g.id] = {
|
|
2763
|
+
type: g.type,
|
|
2773
2764
|
details: _
|
|
2774
|
-
}, y[
|
|
2765
|
+
}, y[g.id] = M;
|
|
2775
2766
|
}), Ss(
|
|
2776
2767
|
s.tracks,
|
|
2777
2768
|
u
|
|
2778
2769
|
))
|
|
2779
|
-
s.tracks.forEach((
|
|
2770
|
+
s.tracks.forEach((g) => {
|
|
2780
2771
|
u.forEach((_) => {
|
|
2781
|
-
|
|
2782
|
-
[
|
|
2772
|
+
g.id === _.id && (g.magnetic && ct(
|
|
2773
|
+
[g],
|
|
2783
2774
|
s.trackItemsMap,
|
|
2784
2775
|
f
|
|
2785
|
-
),
|
|
2776
|
+
), g.items.push(...h));
|
|
2786
2777
|
});
|
|
2787
2778
|
});
|
|
2788
2779
|
else {
|
|
2789
|
-
const
|
|
2790
|
-
Math.max(
|
|
2780
|
+
const g = e.trackIndex || 0, _ = Math.min(
|
|
2781
|
+
Math.max(g, 0),
|
|
2791
2782
|
s.tracks.length
|
|
2792
2783
|
);
|
|
2793
2784
|
s.tracks.splice(_, 0, ...u);
|
|
2794
2785
|
}
|
|
2795
2786
|
s.trackItemDetailsMap = {
|
|
2796
2787
|
...s.trackItemDetailsMap,
|
|
2797
|
-
...
|
|
2788
|
+
...k
|
|
2798
2789
|
}, s.trackItemsMap = {
|
|
2799
2790
|
...s.trackItemsMap,
|
|
2800
2791
|
...y
|
|
@@ -2802,7 +2793,7 @@ async function ti(t, r, e = {}) {
|
|
|
2802
2793
|
...s.trackItemIds,
|
|
2803
2794
|
...h
|
|
2804
2795
|
], s.structure = [...s.structure, ...c];
|
|
2805
|
-
const m = s.tracks.filter((
|
|
2796
|
+
const m = s.tracks.filter((g) => g.magnetic);
|
|
2806
2797
|
return ct(m, s.trackItemsMap, f), s.duration = tt(s.trackItemsMap), {
|
|
2807
2798
|
trackItemIds: s.trackItemIds,
|
|
2808
2799
|
trackItemDetailsMap: s.trackItemDetailsMap,
|
|
@@ -2814,23 +2805,23 @@ async function ti(t, r, e = {}) {
|
|
|
2814
2805
|
transitionsMap: s.transitionsMap
|
|
2815
2806
|
};
|
|
2816
2807
|
}
|
|
2817
|
-
function
|
|
2818
|
-
const s = r.map((c) => c.id), a = [],
|
|
2808
|
+
function Ot(t, r, e = {}) {
|
|
2809
|
+
const s = r.map((c) => c.id), a = [], o = {}, u = {};
|
|
2819
2810
|
if (r.forEach((c) => {
|
|
2820
2811
|
const { details: f, ...h } = c;
|
|
2821
|
-
a.push(c.id),
|
|
2812
|
+
a.push(c.id), o[c.id] = {
|
|
2822
2813
|
type: c.type,
|
|
2823
2814
|
details: f
|
|
2824
2815
|
}, u[c.id] = h;
|
|
2825
2816
|
}), e.targetTrackIndex !== void 0 || e.targetTrackId) {
|
|
2826
2817
|
const c = e.targetTrackIndex || 0, f = e.targetTrackId;
|
|
2827
2818
|
let h = t.tracks[c];
|
|
2828
|
-
if (f && (h = t.tracks.find((
|
|
2819
|
+
if (f && (h = t.tracks.find((k) => k.id === f)), !h)
|
|
2829
2820
|
throw new Error("Target track not found");
|
|
2830
2821
|
h.items.push(...a);
|
|
2831
2822
|
} else {
|
|
2832
2823
|
const c = {
|
|
2833
|
-
id:
|
|
2824
|
+
id: us(),
|
|
2834
2825
|
accepts: Object.keys(t.acceptsMap),
|
|
2835
2826
|
type: r[0].type,
|
|
2836
2827
|
items: s,
|
|
@@ -2841,7 +2832,7 @@ function Dt(t, r, e = {}) {
|
|
|
2841
2832
|
}
|
|
2842
2833
|
return t.trackItemDetailsMap = {
|
|
2843
2834
|
...t.trackItemDetailsMap,
|
|
2844
|
-
...
|
|
2835
|
+
...o
|
|
2845
2836
|
}, t.trackItemsMap = {
|
|
2846
2837
|
...t.trackItemsMap,
|
|
2847
2838
|
...u
|
|
@@ -2857,7 +2848,7 @@ async function ei(t, r, e = {}) {
|
|
|
2857
2848
|
scaleMode: e.scaleMode,
|
|
2858
2849
|
scaleAspectRatio: e.scaleAspectRatio
|
|
2859
2850
|
})
|
|
2860
|
-
],
|
|
2851
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = Ot(s, o, e), f = c.tracks.filter((h) => h.magnetic);
|
|
2861
2852
|
return ct(f, c.trackItemsMap, u), c.duration = tt(c.trackItemsMap), {
|
|
2862
2853
|
trackItemIds: c.trackItemIds,
|
|
2863
2854
|
trackItemDetailsMap: c.trackItemDetailsMap,
|
|
@@ -2867,7 +2858,7 @@ async function ei(t, r, e = {}) {
|
|
|
2867
2858
|
};
|
|
2868
2859
|
}
|
|
2869
2860
|
async function ri(t, r, e = {}) {
|
|
2870
|
-
const s = x(t), a = [ys(r)],
|
|
2861
|
+
const s = x(t), a = [ys(r)], o = await Promise.all(a), u = o.map((h) => h.id), c = Ot(s, o, e);
|
|
2871
2862
|
c.duration = tt(c.trackItemsMap);
|
|
2872
2863
|
const f = c.tracks.filter((h) => h.magnetic);
|
|
2873
2864
|
return ct(f, c.trackItemsMap, u), {
|
|
@@ -2885,7 +2876,7 @@ async function ni(t, r, e = {}) {
|
|
|
2885
2876
|
scaleMode: e.scaleMode,
|
|
2886
2877
|
scaleAspectRatio: e.scaleAspectRatio
|
|
2887
2878
|
})
|
|
2888
|
-
],
|
|
2879
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = Ot(s, o, e);
|
|
2889
2880
|
c.duration = tt(c.trackItemsMap);
|
|
2890
2881
|
const f = c.tracks.filter((h) => h.magnetic);
|
|
2891
2882
|
return ct(f, c.trackItemsMap, u), {
|
|
@@ -2901,7 +2892,7 @@ async function si(t, r, e = {}) {
|
|
|
2901
2892
|
_s(r, {
|
|
2902
2893
|
size: e.size
|
|
2903
2894
|
})
|
|
2904
|
-
],
|
|
2895
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = Ot(s, o, e);
|
|
2905
2896
|
c.duration = tt(c.trackItemsMap);
|
|
2906
2897
|
const f = c.tracks.filter((h) => h.magnetic);
|
|
2907
2898
|
return ct(f, c.trackItemsMap, u), {
|
|
@@ -2919,7 +2910,7 @@ async function ai(t, r, e = {}) {
|
|
|
2919
2910
|
scaleMode: e.scaleMode,
|
|
2920
2911
|
scaleAspectRatio: e.scaleAspectRatio
|
|
2921
2912
|
})
|
|
2922
|
-
],
|
|
2913
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = Ot(s, o, e);
|
|
2923
2914
|
c.duration = tt(c.trackItemsMap);
|
|
2924
2915
|
const f = c.tracks.filter((h) => h.magnetic);
|
|
2925
2916
|
return ct(f, c.trackItemsMap, u), {
|
|
@@ -2937,7 +2928,7 @@ async function ii(t, r, e = {}) {
|
|
|
2937
2928
|
scaleMode: e.scaleMode,
|
|
2938
2929
|
scaleAspectRatio: e.scaleAspectRatio
|
|
2939
2930
|
})
|
|
2940
|
-
],
|
|
2931
|
+
], o = await Promise.all(a), u = o.map((h) => h.id), c = Ot(s, o, e);
|
|
2941
2932
|
c.duration = tt(c.trackItemsMap);
|
|
2942
2933
|
const f = c.tracks.filter((h) => h.magnetic);
|
|
2943
2934
|
return ct(f, c.trackItemsMap, u), {
|
|
@@ -2949,77 +2940,77 @@ async function ii(t, r, e = {}) {
|
|
|
2949
2940
|
};
|
|
2950
2941
|
}
|
|
2951
2942
|
async function oi(t, r, e = {}) {
|
|
2952
|
-
const s = x(t), a = "composition",
|
|
2943
|
+
const s = x(t), a = "composition", o = r.trackItemsMap, u = r.trackItemDetailsMap, c = r.trackItemIds, f = r.tracks || [], { details: h, ...k } = await Ga(r, {
|
|
2953
2944
|
size: s.size,
|
|
2954
2945
|
scaleMode: e.scaleMode,
|
|
2955
2946
|
scaleAspectRatio: e.scaleAspectRatio
|
|
2956
2947
|
}), y = {
|
|
2957
|
-
id:
|
|
2948
|
+
id: k.id,
|
|
2958
2949
|
items: c,
|
|
2959
2950
|
transitions: [],
|
|
2960
2951
|
tracks: f
|
|
2961
2952
|
}, m = [{
|
|
2962
|
-
...
|
|
2953
|
+
...k,
|
|
2963
2954
|
type: a,
|
|
2964
2955
|
details: h
|
|
2965
|
-
}],
|
|
2966
|
-
|
|
2956
|
+
}], g = Ot(s, m, e);
|
|
2957
|
+
g.trackItemDetailsMap[k.id] = {
|
|
2967
2958
|
type: a,
|
|
2968
2959
|
details: h
|
|
2969
|
-
},
|
|
2970
|
-
...
|
|
2971
|
-
...
|
|
2972
|
-
[
|
|
2973
|
-
...
|
|
2960
|
+
}, g.trackItemsMap = {
|
|
2961
|
+
...g.trackItemsMap,
|
|
2962
|
+
...o,
|
|
2963
|
+
[k.id]: {
|
|
2964
|
+
...k
|
|
2974
2965
|
}
|
|
2975
|
-
},
|
|
2976
|
-
...
|
|
2966
|
+
}, g.trackItemDetailsMap = {
|
|
2967
|
+
...g.trackItemDetailsMap,
|
|
2977
2968
|
...u,
|
|
2978
|
-
[
|
|
2969
|
+
[k.id]: {
|
|
2979
2970
|
type: a,
|
|
2980
2971
|
details: h
|
|
2981
2972
|
}
|
|
2982
|
-
},
|
|
2983
|
-
const _ =
|
|
2984
|
-
return ct(_,
|
|
2985
|
-
trackItemIds:
|
|
2986
|
-
trackItemDetailsMap:
|
|
2987
|
-
trackItemsMap:
|
|
2988
|
-
tracks:
|
|
2989
|
-
duration:
|
|
2990
|
-
structure:
|
|
2973
|
+
}, g.structure = [...g.structure, y], g.duration = tt(g.trackItemsMap);
|
|
2974
|
+
const _ = g.tracks.filter((M) => M.magnetic);
|
|
2975
|
+
return ct(_, g.trackItemsMap, [k.id]), {
|
|
2976
|
+
trackItemIds: g.trackItemIds,
|
|
2977
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
|
2978
|
+
trackItemsMap: g.trackItemsMap,
|
|
2979
|
+
tracks: g.tracks,
|
|
2980
|
+
duration: g.duration,
|
|
2981
|
+
structure: g.structure
|
|
2991
2982
|
};
|
|
2992
2983
|
}
|
|
2993
|
-
async function
|
|
2994
|
-
const a = x(t),
|
|
2995
|
-
s === "progress-bar" &&
|
|
2984
|
+
async function Ir(t, r, e = {}, s) {
|
|
2985
|
+
const a = x(t), o = [];
|
|
2986
|
+
s === "progress-bar" && o.push(
|
|
2996
2987
|
ja(r, {
|
|
2997
2988
|
size: a.size,
|
|
2998
2989
|
scaleMode: e.scaleMode,
|
|
2999
2990
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3000
2991
|
})
|
|
3001
|
-
), s === "progress-frame" &&
|
|
2992
|
+
), s === "progress-frame" && o.push(
|
|
3002
2993
|
Ua(r, {
|
|
3003
2994
|
size: a.size,
|
|
3004
2995
|
scaleMode: e.scaleMode,
|
|
3005
2996
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3006
2997
|
})
|
|
3007
|
-
), s === "radial-audio-bars" &&
|
|
2998
|
+
), s === "radial-audio-bars" && o.push(
|
|
3008
2999
|
Wa(r, {
|
|
3009
3000
|
size: a.size,
|
|
3010
3001
|
scaleMode: e.scaleMode,
|
|
3011
3002
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3012
3003
|
})
|
|
3013
|
-
), s === "lineal-audio-bars" &&
|
|
3004
|
+
), s === "lineal-audio-bars" && o.push(
|
|
3014
3005
|
Ba(r, {
|
|
3015
3006
|
size: a.size,
|
|
3016
3007
|
scaleMode: e.scaleMode,
|
|
3017
3008
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3018
3009
|
})
|
|
3019
3010
|
);
|
|
3020
|
-
const u = await Promise.all(
|
|
3011
|
+
const u = await Promise.all(o), c = u.map((k) => k.id), f = Ot(a, u, e);
|
|
3021
3012
|
f.duration = tt(f.trackItemsMap);
|
|
3022
|
-
const h = f.tracks.filter((
|
|
3013
|
+
const h = f.tracks.filter((k) => k.magnetic);
|
|
3023
3014
|
return ct(h, f.trackItemsMap, c), {
|
|
3024
3015
|
trackItemIds: f.trackItemIds,
|
|
3025
3016
|
trackItemDetailsMap: f.trackItemDetailsMap,
|
|
@@ -3029,20 +3020,20 @@ async function yr(t, r, e = {}, s) {
|
|
|
3029
3020
|
};
|
|
3030
3021
|
}
|
|
3031
3022
|
async function ci(t, r, e = {}) {
|
|
3032
|
-
const s = x(t), a = "template",
|
|
3023
|
+
const s = x(t), a = "template", o = r.trackItemsMap, u = r.trackItemDetailsMap, c = r.trackItemIds, f = r.transitionsMap, h = r.transitionIds || [], k = r.tracks || [], y = r.structure || [], { details: p, ...m } = await Is(r, {
|
|
3033
3024
|
size: s.size,
|
|
3034
3025
|
scaleMode: e.scaleMode,
|
|
3035
3026
|
scaleAspectRatio: e.scaleAspectRatio
|
|
3036
|
-
}),
|
|
3027
|
+
}), g = {
|
|
3037
3028
|
id: m.id,
|
|
3038
3029
|
items: c,
|
|
3039
3030
|
transitions: h,
|
|
3040
|
-
tracks:
|
|
3031
|
+
tracks: k
|
|
3041
3032
|
}, M = [{
|
|
3042
3033
|
...m,
|
|
3043
3034
|
type: a,
|
|
3044
3035
|
details: p
|
|
3045
|
-
}], d =
|
|
3036
|
+
}], d = Ot(s, M, e);
|
|
3046
3037
|
d.trackItemDetailsMap[m.id] = {
|
|
3047
3038
|
type: a,
|
|
3048
3039
|
details: p
|
|
@@ -3054,7 +3045,7 @@ async function ci(t, r, e = {}) {
|
|
|
3054
3045
|
...f
|
|
3055
3046
|
}, d.trackItemsMap = {
|
|
3056
3047
|
...d.trackItemsMap,
|
|
3057
|
-
...
|
|
3048
|
+
...o,
|
|
3058
3049
|
[m.id]: {
|
|
3059
3050
|
...m
|
|
3060
3051
|
}
|
|
@@ -3067,7 +3058,7 @@ async function ci(t, r, e = {}) {
|
|
|
3067
3058
|
}
|
|
3068
3059
|
}, d.structure = [
|
|
3069
3060
|
...d.structure,
|
|
3070
|
-
|
|
3061
|
+
g,
|
|
3071
3062
|
...y
|
|
3072
3063
|
], d.duration = tt(d.trackItemsMap);
|
|
3073
3064
|
const v = d.tracks.filter((S) => S.magnetic);
|
|
@@ -3084,22 +3075,22 @@ async function ci(t, r, e = {}) {
|
|
|
3084
3075
|
async function ui(t, r, e = {}) {
|
|
3085
3076
|
const s = x(t), a = r.map((p) => ks(p, {
|
|
3086
3077
|
size: e.size
|
|
3087
|
-
})),
|
|
3078
|
+
})), o = await Promise.all(a), u = ws(
|
|
3088
3079
|
[
|
|
3089
3080
|
{
|
|
3090
3081
|
accepts: ["caption"],
|
|
3091
3082
|
type: "caption",
|
|
3092
|
-
items:
|
|
3083
|
+
items: o.map((p) => p.id)
|
|
3093
3084
|
}
|
|
3094
3085
|
],
|
|
3095
|
-
|
|
3086
|
+
o
|
|
3096
3087
|
), c = [], f = {}, h = {};
|
|
3097
|
-
if (
|
|
3098
|
-
const { details: m, ...
|
|
3088
|
+
if (o.forEach((p) => {
|
|
3089
|
+
const { details: m, ...g } = p;
|
|
3099
3090
|
c.push(p.id), f[p.id] = {
|
|
3100
3091
|
type: p.type,
|
|
3101
3092
|
details: m
|
|
3102
|
-
}, h[p.id] =
|
|
3093
|
+
}, h[p.id] = g;
|
|
3103
3094
|
}), Ss(
|
|
3104
3095
|
s.tracks,
|
|
3105
3096
|
u
|
|
@@ -3146,7 +3137,7 @@ async function ui(t, r, e = {}) {
|
|
|
3146
3137
|
async function li(t, r) {
|
|
3147
3138
|
const e = x(t), s = e.trackItemsMap[r.id], a = [];
|
|
3148
3139
|
if (!s) return {};
|
|
3149
|
-
let
|
|
3140
|
+
let o = s.animations || {};
|
|
3150
3141
|
return r.animations.loop ? r.animations.loop.composition.forEach(
|
|
3151
3142
|
(u) => {
|
|
3152
3143
|
var c;
|
|
@@ -3162,49 +3153,49 @@ async function li(t, r) {
|
|
|
3162
3153
|
var c;
|
|
3163
3154
|
(c = u.details) != null && c.fonts && a.push(...u.details.fonts);
|
|
3164
3155
|
}
|
|
3165
|
-
), a.length > 0 && await
|
|
3156
|
+
), a.length > 0 && await qe(a), o.in && r.animations.in ? o.in = r.animations.in : o.out && r.animations.out ? o.out = r.animations.out : o.loop && r.animations.loop ? o.loop = r.animations.loop : !o.out && r.animations.out ? o.out = r.animations.out : !o.in && r.animations.in ? o.in = r.animations.in : !o.loop && r.animations.loop ? o.loop = r.animations.loop : o = r.animations, s.animations = o, {
|
|
3166
3157
|
trackItemsMap: e.trackItemsMap
|
|
3167
3158
|
};
|
|
3168
3159
|
}
|
|
3169
3160
|
function di(t) {
|
|
3170
|
-
const r =
|
|
3171
|
-
|
|
3172
|
-
), e =
|
|
3173
|
-
|
|
3174
|
-
), s =
|
|
3175
|
-
|
|
3176
|
-
), a =
|
|
3177
|
-
|
|
3178
|
-
),
|
|
3179
|
-
|
|
3180
|
-
), u =
|
|
3181
|
-
|
|
3182
|
-
), c =
|
|
3183
|
-
|
|
3184
|
-
), f =
|
|
3185
|
-
|
|
3161
|
+
const r = Nt.pipe(
|
|
3162
|
+
Ht(({ key: d }) => d.startsWith(Bn))
|
|
3163
|
+
), e = Nt.pipe(
|
|
3164
|
+
Ht(({ key: d }) => d.startsWith(xn))
|
|
3165
|
+
), s = Nt.pipe(
|
|
3166
|
+
Ht(({ key: d }) => d.startsWith(G))
|
|
3167
|
+
), a = Nt.pipe(
|
|
3168
|
+
Ht(({ key: d }) => d.startsWith(et))
|
|
3169
|
+
), o = Nt.pipe(
|
|
3170
|
+
Ht(({ key: d }) => d.startsWith(wr))
|
|
3171
|
+
), u = Nt.pipe(
|
|
3172
|
+
Ht(({ key: d }) => d.startsWith(Ae))
|
|
3173
|
+
), c = Nt.pipe(
|
|
3174
|
+
Ht(({ key: d }) => d.startsWith(Ut))
|
|
3175
|
+
), f = Nt.pipe(
|
|
3176
|
+
Ht(({ key: d }) => d.startsWith(cs))
|
|
3186
3177
|
), h = r.subscribe(async (d) => {
|
|
3187
3178
|
var v;
|
|
3188
|
-
if (d.key ===
|
|
3179
|
+
if (d.key === Bn) {
|
|
3189
3180
|
const { actions: S } = (v = d.value) == null ? void 0 : v.payload;
|
|
3190
|
-
S.forEach((
|
|
3191
|
-
zs(
|
|
3181
|
+
S.forEach((b) => {
|
|
3182
|
+
zs(b.type, b.payload && { payload: b.payload });
|
|
3192
3183
|
});
|
|
3193
3184
|
}
|
|
3194
|
-
}),
|
|
3185
|
+
}), k = e.subscribe(async (d) => {
|
|
3195
3186
|
var v, S;
|
|
3196
3187
|
if (d.key === Qs) {
|
|
3197
|
-
const
|
|
3188
|
+
const b = (v = d.value) == null ? void 0 : v.payload, w = await Ka(t.getState(), b);
|
|
3198
3189
|
t.updateState(w, {
|
|
3199
3190
|
kind: "design:load",
|
|
3200
3191
|
updateHistory: !1
|
|
3201
3192
|
});
|
|
3202
3193
|
}
|
|
3203
3194
|
if (d.key === ta) {
|
|
3204
|
-
const
|
|
3195
|
+
const b = (S = d.value) == null ? void 0 : S.payload;
|
|
3205
3196
|
t.updateState(
|
|
3206
3197
|
{
|
|
3207
|
-
size:
|
|
3198
|
+
size: b
|
|
3208
3199
|
},
|
|
3209
3200
|
{
|
|
3210
3201
|
kind: "design:resize",
|
|
@@ -3212,7 +3203,7 @@ function di(t) {
|
|
|
3212
3203
|
}
|
|
3213
3204
|
);
|
|
3214
3205
|
}
|
|
3215
|
-
}), y =
|
|
3206
|
+
}), y = o.subscribe((d) => {
|
|
3216
3207
|
if (d.key === Ta) return t.undo();
|
|
3217
3208
|
if (d.key === Ea) return t.redo();
|
|
3218
3209
|
}), p = f.subscribe((d) => {
|
|
@@ -3230,7 +3221,7 @@ function di(t) {
|
|
|
3230
3221
|
);
|
|
3231
3222
|
}
|
|
3232
3223
|
}), m = a.subscribe(async (d) => {
|
|
3233
|
-
var v, S,
|
|
3224
|
+
var v, S, b, w;
|
|
3234
3225
|
if (d.key === _a) {
|
|
3235
3226
|
const E = ((v = d.value) == null ? void 0 : v.payload.trackItemIds) || [];
|
|
3236
3227
|
t.updateState(
|
|
@@ -3248,7 +3239,7 @@ function di(t) {
|
|
|
3248
3239
|
if (d.key === Sa) {
|
|
3249
3240
|
const E = $a(
|
|
3250
3241
|
t.getState(),
|
|
3251
|
-
(
|
|
3242
|
+
(b = d.value) == null ? void 0 : b.payload.trackItemIds
|
|
3252
3243
|
);
|
|
3253
3244
|
t.updateState(E, {
|
|
3254
3245
|
updateHistory: !0,
|
|
@@ -3262,81 +3253,81 @@ function di(t) {
|
|
|
3262
3253
|
kind: "update:details"
|
|
3263
3254
|
});
|
|
3264
3255
|
}
|
|
3265
|
-
}),
|
|
3266
|
-
var H, C, J, L, Y,
|
|
3267
|
-
const v = x(t.getState()), S = ((C = (H = d.value) == null ? void 0 : H.options) == null ? void 0 : C.isSelected) || !1,
|
|
3256
|
+
}), g = s.subscribe(async (d) => {
|
|
3257
|
+
var H, C, J, L, Y, mt, O, N, nt, le, de, fe, z, pe, he, st, Wt, F, Bt, me, at, Gt, Yt, Ct, Pt, Xt, Rt, Kt, zt, Vt, ye, Ie, vt, Ft, Jt, qt, ut, St, ge, gt;
|
|
3258
|
+
const v = x(t.getState()), S = ((C = (H = d.value) == null ? void 0 : H.options) == null ? void 0 : C.isSelected) || !1, b = (L = (J = d.value) == null ? void 0 : J.options) == null ? void 0 : L.scaleMode, w = (mt = (Y = d.value) == null ? void 0 : Y.options) == null ? void 0 : mt.scaleAspectRatio, E = (N = (O = d.value) == null ? void 0 : O.options) == null ? void 0 : N.trackIndex;
|
|
3268
3259
|
let A = {};
|
|
3269
|
-
d.key === oa ? A = await li(v, (nt = d.value) == null ? void 0 : nt.payload) : d.key === la ? A = await ti(v, (
|
|
3260
|
+
d.key === oa ? A = await li(v, (nt = d.value) == null ? void 0 : nt.payload) : d.key === la ? A = await ti(v, (le = d.value) == null ? void 0 : le.payload, {
|
|
3270
3261
|
trackIndex: E
|
|
3271
|
-
}) : d.key === ca ? A = await ui(v, (
|
|
3262
|
+
}) : d.key === ca ? A = await ui(v, (de = d.value) == null ? void 0 : de.payload, {
|
|
3272
3263
|
size: v.size
|
|
3273
|
-
}) : d.key === ea ? A = await si(v, (
|
|
3264
|
+
}) : d.key === ea ? A = await si(v, (fe = d.value) == null ? void 0 : fe.payload, {
|
|
3274
3265
|
targetTrackIndex: E,
|
|
3275
3266
|
targetTrackId: (z = d.value) == null ? void 0 : z.options.targetTrackId,
|
|
3276
3267
|
size: v.size
|
|
3277
|
-
}) : d.key === ua ? A = await ci(v, (
|
|
3278
|
-
scaleMode:
|
|
3268
|
+
}) : d.key === ua ? A = await ci(v, (pe = d.value) == null ? void 0 : pe.payload, {
|
|
3269
|
+
scaleMode: b,
|
|
3279
3270
|
scaleAspectRatio: w,
|
|
3280
3271
|
targetTrackIndex: E,
|
|
3281
|
-
targetTrackId: (st = (
|
|
3282
|
-
}) : d.key === aa ? A = await ii(v, (
|
|
3283
|
-
scaleMode:
|
|
3272
|
+
targetTrackId: (st = (he = d.value) == null ? void 0 : he.options) == null ? void 0 : st.targetTrackId
|
|
3273
|
+
}) : d.key === aa ? A = await ii(v, (Wt = d.value) == null ? void 0 : Wt.payload, {
|
|
3274
|
+
scaleMode: b,
|
|
3284
3275
|
scaleAspectRatio: w,
|
|
3285
3276
|
targetTrackIndex: E,
|
|
3286
3277
|
targetTrackId: (F = d.value) == null ? void 0 : F.options.targetTrackId
|
|
3287
|
-
}) : d.key === ia ? A = await ai(v, (
|
|
3288
|
-
scaleMode:
|
|
3278
|
+
}) : d.key === ia ? A = await ai(v, (Bt = d.value) == null ? void 0 : Bt.payload, {
|
|
3279
|
+
scaleMode: b,
|
|
3289
3280
|
scaleAspectRatio: w,
|
|
3290
3281
|
targetTrackIndex: E,
|
|
3291
|
-
targetTrackId: (
|
|
3282
|
+
targetTrackId: (me = d.value) == null ? void 0 : me.options.targetTrackId
|
|
3292
3283
|
}) : d.key === sa ? A = await ei(v, (at = d.value) == null ? void 0 : at.payload, {
|
|
3293
|
-
scaleMode:
|
|
3284
|
+
scaleMode: b,
|
|
3294
3285
|
scaleAspectRatio: w,
|
|
3295
3286
|
targetTrackIndex: E,
|
|
3296
|
-
targetTrackId: (
|
|
3297
|
-
}) : d.key === na ? A = await ri(v, (
|
|
3287
|
+
targetTrackId: (Gt = d.value) == null ? void 0 : Gt.options.targetTrackId
|
|
3288
|
+
}) : d.key === na ? A = await ri(v, (Yt = d.value) == null ? void 0 : Yt.payload, {
|
|
3298
3289
|
targetTrackIndex: E,
|
|
3299
|
-
targetTrackId: (
|
|
3300
|
-
}) : d.key === ra ? A = await ni(v, (
|
|
3301
|
-
scaleMode:
|
|
3290
|
+
targetTrackId: (Ct = d.value) == null ? void 0 : Ct.options.targetTrackId
|
|
3291
|
+
}) : d.key === ra ? A = await ni(v, (Pt = d.value) == null ? void 0 : Pt.payload, {
|
|
3292
|
+
scaleMode: b,
|
|
3302
3293
|
scaleAspectRatio: w,
|
|
3303
3294
|
targetTrackIndex: E,
|
|
3304
|
-
targetTrackId: (
|
|
3305
|
-
}) : d.key === da ? A = await oi(v, (
|
|
3306
|
-
scaleMode:
|
|
3295
|
+
targetTrackId: (Xt = d.value) == null ? void 0 : Xt.options.targetTrackId
|
|
3296
|
+
}) : d.key === da ? A = await oi(v, (Rt = d.value) == null ? void 0 : Rt.payload, {
|
|
3297
|
+
scaleMode: b,
|
|
3307
3298
|
scaleAspectRatio: w,
|
|
3308
3299
|
targetTrackIndex: E,
|
|
3309
|
-
targetTrackId: (
|
|
3310
|
-
}) : d.key === fa ? A = await
|
|
3300
|
+
targetTrackId: (Kt = d.value) == null ? void 0 : Kt.options.targetTrackId
|
|
3301
|
+
}) : d.key === fa ? A = await Ir(
|
|
3311
3302
|
v,
|
|
3312
|
-
(
|
|
3303
|
+
(zt = d.value) == null ? void 0 : zt.payload,
|
|
3313
3304
|
{
|
|
3314
3305
|
targetTrackIndex: E,
|
|
3315
|
-
targetTrackId: (
|
|
3306
|
+
targetTrackId: (ye = (Vt = d.value) == null ? void 0 : Vt.options) == null ? void 0 : ye.targetTrackId
|
|
3316
3307
|
},
|
|
3317
3308
|
"progress-bar"
|
|
3318
|
-
) : d.key === pa ? A = await
|
|
3309
|
+
) : d.key === pa ? A = await Ir(
|
|
3319
3310
|
v,
|
|
3320
|
-
(
|
|
3311
|
+
(Ie = d.value) == null ? void 0 : Ie.payload,
|
|
3321
3312
|
{
|
|
3322
3313
|
targetTrackIndex: E,
|
|
3323
|
-
targetTrackId: (
|
|
3314
|
+
targetTrackId: (Ft = (vt = d.value) == null ? void 0 : vt.options) == null ? void 0 : Ft.targetTrackId
|
|
3324
3315
|
},
|
|
3325
3316
|
"progress-frame"
|
|
3326
|
-
) : d.key === ha ? A = await
|
|
3317
|
+
) : d.key === ha ? A = await Ir(
|
|
3327
3318
|
v,
|
|
3328
|
-
(
|
|
3319
|
+
(Jt = d.value) == null ? void 0 : Jt.payload,
|
|
3329
3320
|
{
|
|
3330
3321
|
targetTrackIndex: E,
|
|
3331
|
-
targetTrackId: (
|
|
3322
|
+
targetTrackId: (ut = (qt = d.value) == null ? void 0 : qt.options) == null ? void 0 : ut.targetTrackId
|
|
3332
3323
|
},
|
|
3333
3324
|
"radial-audio-bars"
|
|
3334
|
-
) : d.key === ma && (A = await
|
|
3325
|
+
) : d.key === ma && (A = await Ir(
|
|
3335
3326
|
v,
|
|
3336
|
-
(
|
|
3327
|
+
(St = d.value) == null ? void 0 : St.payload,
|
|
3337
3328
|
{
|
|
3338
3329
|
targetTrackIndex: E,
|
|
3339
|
-
targetTrackId: (
|
|
3330
|
+
targetTrackId: (gt = (ge = d.value) == null ? void 0 : ge.options) == null ? void 0 : gt.targetTrackId
|
|
3340
3331
|
},
|
|
3341
3332
|
"lineal-audio-bars"
|
|
3342
3333
|
)), S && A.trackItemIds && (A.activeIds = A.trackItemIds), t.updateState(A, {
|
|
@@ -3346,8 +3337,8 @@ function di(t) {
|
|
|
3346
3337
|
}), _ = u.subscribe(async (d) => {
|
|
3347
3338
|
var v;
|
|
3348
3339
|
if (d.key === ka) {
|
|
3349
|
-
const S = (v = d.value) == null ? void 0 : v.options.time,
|
|
3350
|
-
Object.keys(
|
|
3340
|
+
const S = (v = d.value) == null ? void 0 : v.options.time, b = Ja(t.getState(), S);
|
|
3341
|
+
Object.keys(b).length > 0 && t.updateState(b, {
|
|
3351
3342
|
updateHistory: !0,
|
|
3352
3343
|
kind: "update"
|
|
3353
3344
|
});
|
|
@@ -3360,7 +3351,7 @@ function di(t) {
|
|
|
3360
3351
|
});
|
|
3361
3352
|
}
|
|
3362
3353
|
}), M = c.subscribe(async (d) => {
|
|
3363
|
-
var v, S,
|
|
3354
|
+
var v, S, b;
|
|
3364
3355
|
if (d.key === ya) {
|
|
3365
3356
|
const w = await qa(
|
|
3366
3357
|
t.getState(),
|
|
@@ -3382,7 +3373,7 @@ function di(t) {
|
|
|
3382
3373
|
});
|
|
3383
3374
|
}
|
|
3384
3375
|
if (d.key === ga) {
|
|
3385
|
-
const w = Qa(t.getState(), (
|
|
3376
|
+
const w = Qa(t.getState(), (b = d.value) == null ? void 0 : b.payload);
|
|
3386
3377
|
t.updateState(w, {
|
|
3387
3378
|
updateHistory: !0,
|
|
3388
3379
|
kind: "update:details"
|
|
@@ -3391,7 +3382,7 @@ function di(t) {
|
|
|
3391
3382
|
});
|
|
3392
3383
|
return {
|
|
3393
3384
|
unsubscribe: () => {
|
|
3394
|
-
|
|
3385
|
+
g.unsubscribe(), _.unsubscribe(), M.unsubscribe(), y.unsubscribe(), m.unsubscribe(), k.unsubscribe(), p.unsubscribe(), h.unsubscribe();
|
|
3395
3386
|
}
|
|
3396
3387
|
};
|
|
3397
3388
|
}
|
|
@@ -3399,9 +3390,9 @@ const fi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
|
|
3399
3390
|
function Ms(t, r, e = { cyclesFix: !0 }, s = []) {
|
|
3400
3391
|
var c, f;
|
|
3401
3392
|
let a = [];
|
|
3402
|
-
const
|
|
3393
|
+
const o = Array.isArray(t);
|
|
3403
3394
|
for (const h in t) {
|
|
3404
|
-
const
|
|
3395
|
+
const k = t[h], y = o ? +h : h;
|
|
3405
3396
|
if (!(h in r)) {
|
|
3406
3397
|
a.push({
|
|
3407
3398
|
type: "REMOVE",
|
|
@@ -3410,13 +3401,13 @@ function Ms(t, r, e = { cyclesFix: !0 }, s = []) {
|
|
|
3410
3401
|
});
|
|
3411
3402
|
continue;
|
|
3412
3403
|
}
|
|
3413
|
-
const p = r[h], m = typeof
|
|
3414
|
-
|
|
3415
|
-
!(Number.isNaN(
|
|
3404
|
+
const p = r[h], m = typeof k == "object" && typeof p == "object" && Array.isArray(k) === Array.isArray(p);
|
|
3405
|
+
k && p && m && !fi[(f = (c = Object.getPrototypeOf(k)) == null ? void 0 : c.constructor) == null ? void 0 : f.name] && (!e.cyclesFix || !s.includes(k)) ? a.push.apply(a, Ms(k, p, e, e.cyclesFix ? s.concat([k]) : []).map((g) => (g.path.unshift(y), g))) : k !== p && // treat NaN values as equivalent
|
|
3406
|
+
!(Number.isNaN(k) && Number.isNaN(p)) && !(m && (isNaN(k) ? k + "" == p + "" : +k == +p)) && a.push({
|
|
3416
3407
|
path: [y],
|
|
3417
3408
|
type: "CHANGE",
|
|
3418
3409
|
value: p,
|
|
3419
|
-
oldValue:
|
|
3410
|
+
oldValue: k
|
|
3420
3411
|
});
|
|
3421
3412
|
}
|
|
3422
3413
|
const u = Array.isArray(r);
|
|
@@ -3428,7 +3419,7 @@ function Ms(t, r, e = { cyclesFix: !0 }, s = []) {
|
|
|
3428
3419
|
});
|
|
3429
3420
|
return a;
|
|
3430
3421
|
}
|
|
3431
|
-
var
|
|
3422
|
+
var Cn = Symbol.for("immer-nothing"), Ge = Symbol.for("immer-draftable"), lt = Symbol.for("immer-state"), Ts = process.env.NODE_ENV !== "production" ? [
|
|
3432
3423
|
// All error codes, starting by 0:
|
|
3433
3424
|
function(t) {
|
|
3434
3425
|
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
|
@@ -3468,69 +3459,69 @@ function B(t, ...r) {
|
|
|
3468
3459
|
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
|
3469
3460
|
);
|
|
3470
3461
|
}
|
|
3471
|
-
var
|
|
3472
|
-
function
|
|
3473
|
-
return !!t && !!t[
|
|
3462
|
+
var ie = Object.getPrototypeOf;
|
|
3463
|
+
function oe(t) {
|
|
3464
|
+
return !!t && !!t[lt];
|
|
3474
3465
|
}
|
|
3475
|
-
function
|
|
3466
|
+
function jt(t) {
|
|
3476
3467
|
var r;
|
|
3477
|
-
return t ? Es(t) || Array.isArray(t) || !!t[
|
|
3468
|
+
return t ? Es(t) || Array.isArray(t) || !!t[Ge] || !!((r = t.constructor) != null && r[Ge]) || Ze(t) || Qe(t) : !1;
|
|
3478
3469
|
}
|
|
3479
3470
|
var pi = Object.prototype.constructor.toString();
|
|
3480
3471
|
function Es(t) {
|
|
3481
3472
|
if (!t || typeof t != "object")
|
|
3482
3473
|
return !1;
|
|
3483
|
-
const r =
|
|
3474
|
+
const r = ie(t);
|
|
3484
3475
|
if (r === null)
|
|
3485
3476
|
return !0;
|
|
3486
3477
|
const e = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
|
3487
3478
|
return e === Object ? !0 : typeof e == "function" && Function.toString.call(e) === pi;
|
|
3488
3479
|
}
|
|
3489
|
-
function
|
|
3490
|
-
|
|
3480
|
+
function Ye(t, r) {
|
|
3481
|
+
ce(t) === 0 ? Reflect.ownKeys(t).forEach((e) => {
|
|
3491
3482
|
r(e, t[e], t);
|
|
3492
3483
|
}) : t.forEach((e, s) => r(s, e, t));
|
|
3493
3484
|
}
|
|
3494
|
-
function
|
|
3495
|
-
const r = t[
|
|
3496
|
-
return r ? r.type_ : Array.isArray(t) ? 1 :
|
|
3485
|
+
function ce(t) {
|
|
3486
|
+
const r = t[lt];
|
|
3487
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : Ze(t) ? 2 : Qe(t) ? 3 : 0;
|
|
3497
3488
|
}
|
|
3498
|
-
function
|
|
3499
|
-
return
|
|
3489
|
+
function Xe(t, r) {
|
|
3490
|
+
return ce(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
|
3500
3491
|
}
|
|
3501
|
-
function
|
|
3502
|
-
return
|
|
3492
|
+
function hn(t, r) {
|
|
3493
|
+
return ce(t) === 2 ? t.get(r) : t[r];
|
|
3503
3494
|
}
|
|
3504
3495
|
function As(t, r, e) {
|
|
3505
|
-
const s =
|
|
3496
|
+
const s = ce(t);
|
|
3506
3497
|
s === 2 ? t.set(r, e) : s === 3 ? t.add(e) : t[r] = e;
|
|
3507
3498
|
}
|
|
3508
3499
|
function hi(t, r) {
|
|
3509
3500
|
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
|
3510
3501
|
}
|
|
3511
|
-
function
|
|
3502
|
+
function Ze(t) {
|
|
3512
3503
|
return t instanceof Map;
|
|
3513
3504
|
}
|
|
3514
|
-
function
|
|
3505
|
+
function Qe(t) {
|
|
3515
3506
|
return t instanceof Set;
|
|
3516
3507
|
}
|
|
3517
|
-
function
|
|
3508
|
+
function se(t) {
|
|
3518
3509
|
return t.copy_ || t.base_;
|
|
3519
3510
|
}
|
|
3520
|
-
function
|
|
3521
|
-
if (qe(t))
|
|
3522
|
-
return new Map(t);
|
|
3511
|
+
function Sn(t, r) {
|
|
3523
3512
|
if (Ze(t))
|
|
3513
|
+
return new Map(t);
|
|
3514
|
+
if (Qe(t))
|
|
3524
3515
|
return new Set(t);
|
|
3525
3516
|
if (Array.isArray(t))
|
|
3526
3517
|
return Array.prototype.slice.call(t);
|
|
3527
3518
|
const e = Es(t);
|
|
3528
3519
|
if (r === !0 || r === "class_only" && !e) {
|
|
3529
3520
|
const s = Object.getOwnPropertyDescriptors(t);
|
|
3530
|
-
delete s[
|
|
3521
|
+
delete s[lt];
|
|
3531
3522
|
let a = Reflect.ownKeys(s);
|
|
3532
|
-
for (let
|
|
3533
|
-
const u = a[
|
|
3523
|
+
for (let o = 0; o < a.length; o++) {
|
|
3524
|
+
const u = a[o], c = s[u];
|
|
3534
3525
|
c.writable === !1 && (c.writable = !0, c.configurable = !0), (c.get || c.set) && (s[u] = {
|
|
3535
3526
|
configurable: !0,
|
|
3536
3527
|
writable: !0,
|
|
@@ -3539,35 +3530,35 @@ function Mn(t, r) {
|
|
|
3539
3530
|
value: t[u]
|
|
3540
3531
|
});
|
|
3541
3532
|
}
|
|
3542
|
-
return Object.create(
|
|
3533
|
+
return Object.create(ie(t), s);
|
|
3543
3534
|
} else {
|
|
3544
|
-
const s =
|
|
3535
|
+
const s = ie(t);
|
|
3545
3536
|
if (s !== null && e)
|
|
3546
3537
|
return { ...t };
|
|
3547
3538
|
const a = Object.create(s);
|
|
3548
3539
|
return Object.assign(a, t);
|
|
3549
3540
|
}
|
|
3550
3541
|
}
|
|
3551
|
-
function
|
|
3552
|
-
return
|
|
3542
|
+
function Pn(t, r = !1) {
|
|
3543
|
+
return Tr(t) || oe(t) || !jt(t) || (ce(t) > 1 && (t.set = t.add = t.clear = t.delete = mi), Object.freeze(t), r && Object.entries(t).forEach(([e, s]) => Pn(s, !0))), t;
|
|
3553
3544
|
}
|
|
3554
3545
|
function mi() {
|
|
3555
3546
|
B(2);
|
|
3556
3547
|
}
|
|
3557
|
-
function
|
|
3548
|
+
function Tr(t) {
|
|
3558
3549
|
return Object.isFrozen(t);
|
|
3559
3550
|
}
|
|
3560
|
-
var
|
|
3561
|
-
function
|
|
3562
|
-
const r =
|
|
3551
|
+
var wn = {};
|
|
3552
|
+
function ue(t) {
|
|
3553
|
+
const r = wn[t];
|
|
3563
3554
|
return r || B(0, t), r;
|
|
3564
3555
|
}
|
|
3565
3556
|
function yi(t, r) {
|
|
3566
|
-
|
|
3557
|
+
wn[t] || (wn[t] = r);
|
|
3567
3558
|
}
|
|
3568
|
-
var
|
|
3559
|
+
var Ke;
|
|
3569
3560
|
function Ds() {
|
|
3570
|
-
return
|
|
3561
|
+
return Ke;
|
|
3571
3562
|
}
|
|
3572
3563
|
function Ii(t, r) {
|
|
3573
3564
|
return {
|
|
@@ -3580,53 +3571,53 @@ function Ii(t, r) {
|
|
|
3580
3571
|
unfinalizedDrafts_: 0
|
|
3581
3572
|
};
|
|
3582
3573
|
}
|
|
3583
|
-
function
|
|
3584
|
-
r && (
|
|
3574
|
+
function Xn(t, r) {
|
|
3575
|
+
r && (ue("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
|
3585
3576
|
}
|
|
3586
|
-
function
|
|
3587
|
-
|
|
3577
|
+
function Mn(t) {
|
|
3578
|
+
Tn(t), t.drafts_.forEach(gi), t.drafts_ = null;
|
|
3588
3579
|
}
|
|
3589
|
-
function
|
|
3590
|
-
t ===
|
|
3580
|
+
function Tn(t) {
|
|
3581
|
+
t === Ke && (Ke = t.parent_);
|
|
3591
3582
|
}
|
|
3592
|
-
function
|
|
3593
|
-
return
|
|
3583
|
+
function Kn(t) {
|
|
3584
|
+
return Ke = Ii(Ke, t);
|
|
3594
3585
|
}
|
|
3595
3586
|
function gi(t) {
|
|
3596
|
-
const r = t[
|
|
3587
|
+
const r = t[lt];
|
|
3597
3588
|
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
|
3598
3589
|
}
|
|
3599
|
-
function
|
|
3590
|
+
function Vn(t, r) {
|
|
3600
3591
|
r.unfinalizedDrafts_ = r.drafts_.length;
|
|
3601
3592
|
const e = r.drafts_[0];
|
|
3602
|
-
return t !== void 0 && t !== e ? (e[
|
|
3603
|
-
e[
|
|
3593
|
+
return t !== void 0 && t !== e ? (e[lt].modified_ && (Mn(r), B(4)), jt(t) && (t = _r(r, t), r.parent_ || vr(r, t)), r.patches_ && ue("Patches").generateReplacementPatches_(
|
|
3594
|
+
e[lt].base_,
|
|
3604
3595
|
t,
|
|
3605
3596
|
r.patches_,
|
|
3606
3597
|
r.inversePatches_
|
|
3607
|
-
)) : t =
|
|
3598
|
+
)) : t = _r(r, e, []), Mn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Cn ? t : void 0;
|
|
3608
3599
|
}
|
|
3609
|
-
function
|
|
3610
|
-
if (
|
|
3600
|
+
function _r(t, r, e) {
|
|
3601
|
+
if (Tr(r))
|
|
3611
3602
|
return r;
|
|
3612
|
-
const s = r[
|
|
3603
|
+
const s = r[lt];
|
|
3613
3604
|
if (!s)
|
|
3614
|
-
return
|
|
3605
|
+
return Ye(
|
|
3615
3606
|
r,
|
|
3616
|
-
(a,
|
|
3607
|
+
(a, o) => Jn(t, s, r, a, o, e)
|
|
3617
3608
|
), r;
|
|
3618
3609
|
if (s.scope_ !== t)
|
|
3619
3610
|
return r;
|
|
3620
3611
|
if (!s.modified_)
|
|
3621
|
-
return
|
|
3612
|
+
return vr(t, s.base_, !0), s.base_;
|
|
3622
3613
|
if (!s.finalized_) {
|
|
3623
3614
|
s.finalized_ = !0, s.scope_.unfinalizedDrafts_--;
|
|
3624
3615
|
const a = s.copy_;
|
|
3625
|
-
let
|
|
3626
|
-
s.type_ === 3 && (
|
|
3627
|
-
|
|
3628
|
-
(c, f) =>
|
|
3629
|
-
),
|
|
3616
|
+
let o = a, u = !1;
|
|
3617
|
+
s.type_ === 3 && (o = new Set(a), a.clear(), u = !0), Ye(
|
|
3618
|
+
o,
|
|
3619
|
+
(c, f) => Jn(t, s, a, c, f, e, u)
|
|
3620
|
+
), vr(t, a, !1), e && t.patches_ && ue("Patches").generatePatches_(
|
|
3630
3621
|
s,
|
|
3631
3622
|
e,
|
|
3632
3623
|
t.patches_,
|
|
@@ -3635,23 +3626,23 @@ function kr(t, r, e) {
|
|
|
3635
3626
|
}
|
|
3636
3627
|
return s.copy_;
|
|
3637
3628
|
}
|
|
3638
|
-
function
|
|
3639
|
-
if (process.env.NODE_ENV !== "production" && a === e && B(5),
|
|
3640
|
-
const c =
|
|
3641
|
-
!
|
|
3642
|
-
if (As(e, s, f),
|
|
3629
|
+
function Jn(t, r, e, s, a, o, u) {
|
|
3630
|
+
if (process.env.NODE_ENV !== "production" && a === e && B(5), oe(a)) {
|
|
3631
|
+
const c = o && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
3632
|
+
!Xe(r.assigned_, s) ? o.concat(s) : void 0, f = _r(t, a, c);
|
|
3633
|
+
if (As(e, s, f), oe(f))
|
|
3643
3634
|
t.canAutoFreeze_ = !1;
|
|
3644
3635
|
else
|
|
3645
3636
|
return;
|
|
3646
3637
|
} else u && e.add(a);
|
|
3647
|
-
if (
|
|
3638
|
+
if (jt(a) && !Tr(a)) {
|
|
3648
3639
|
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
|
3649
3640
|
return;
|
|
3650
|
-
|
|
3641
|
+
_r(t, a), (!r || !r.scope_.parent_) && typeof s != "symbol" && Object.prototype.propertyIsEnumerable.call(e, s) && vr(t, a);
|
|
3651
3642
|
}
|
|
3652
3643
|
}
|
|
3653
|
-
function
|
|
3654
|
-
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ &&
|
|
3644
|
+
function vr(t, r, e = !1) {
|
|
3645
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && Pn(r, e);
|
|
3655
3646
|
}
|
|
3656
3647
|
function bi(t, r) {
|
|
3657
3648
|
const e = Array.isArray(t), s = {
|
|
@@ -3677,50 +3668,50 @@ function bi(t, r) {
|
|
|
3677
3668
|
revoke_: null,
|
|
3678
3669
|
isManual_: !1
|
|
3679
3670
|
};
|
|
3680
|
-
let a = s,
|
|
3681
|
-
e && (a = [s],
|
|
3682
|
-
const { revoke: u, proxy: c } = Proxy.revocable(a,
|
|
3671
|
+
let a = s, o = Rn;
|
|
3672
|
+
e && (a = [s], o = Ve);
|
|
3673
|
+
const { revoke: u, proxy: c } = Proxy.revocable(a, o);
|
|
3683
3674
|
return s.draft_ = c, s.revoke_ = u, c;
|
|
3684
3675
|
}
|
|
3685
|
-
var
|
|
3676
|
+
var Rn = {
|
|
3686
3677
|
get(t, r) {
|
|
3687
|
-
if (r ===
|
|
3678
|
+
if (r === lt)
|
|
3688
3679
|
return t;
|
|
3689
|
-
const e =
|
|
3690
|
-
if (!
|
|
3680
|
+
const e = se(t);
|
|
3681
|
+
if (!Xe(e, r))
|
|
3691
3682
|
return ki(t, e, r);
|
|
3692
3683
|
const s = e[r];
|
|
3693
|
-
return t.finalized_ || !
|
|
3684
|
+
return t.finalized_ || !jt(s) ? s : s === mn(t.base_, r) ? (yn(t), t.copy_[r] = An(s, t)) : s;
|
|
3694
3685
|
},
|
|
3695
3686
|
has(t, r) {
|
|
3696
|
-
return r in
|
|
3687
|
+
return r in se(t);
|
|
3697
3688
|
},
|
|
3698
3689
|
ownKeys(t) {
|
|
3699
|
-
return Reflect.ownKeys(
|
|
3690
|
+
return Reflect.ownKeys(se(t));
|
|
3700
3691
|
},
|
|
3701
3692
|
set(t, r, e) {
|
|
3702
|
-
const s = xs(
|
|
3693
|
+
const s = xs(se(t), r);
|
|
3703
3694
|
if (s != null && s.set)
|
|
3704
3695
|
return s.set.call(t.draft_, e), !0;
|
|
3705
3696
|
if (!t.modified_) {
|
|
3706
|
-
const a =
|
|
3707
|
-
if (
|
|
3697
|
+
const a = mn(se(t), r), o = a == null ? void 0 : a[lt];
|
|
3698
|
+
if (o && o.base_ === e)
|
|
3708
3699
|
return t.copy_[r] = e, t.assigned_[r] = !1, !0;
|
|
3709
|
-
if (hi(e, a) && (e !== void 0 ||
|
|
3700
|
+
if (hi(e, a) && (e !== void 0 || Xe(t.base_, r)))
|
|
3710
3701
|
return !0;
|
|
3711
|
-
|
|
3702
|
+
yn(t), En(t);
|
|
3712
3703
|
}
|
|
3713
3704
|
return t.copy_[r] === e && // special case: handle new props with value 'undefined'
|
|
3714
3705
|
(e !== void 0 || r in t.copy_) || // special case: NaN
|
|
3715
3706
|
Number.isNaN(e) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = e, t.assigned_[r] = !0), !0;
|
|
3716
3707
|
},
|
|
3717
3708
|
deleteProperty(t, r) {
|
|
3718
|
-
return
|
|
3709
|
+
return mn(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, yn(t), En(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
|
3719
3710
|
},
|
|
3720
3711
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
3721
3712
|
// the same guarantee in ES5 mode.
|
|
3722
3713
|
getOwnPropertyDescriptor(t, r) {
|
|
3723
|
-
const e =
|
|
3714
|
+
const e = se(t), s = Reflect.getOwnPropertyDescriptor(e, r);
|
|
3724
3715
|
return s && {
|
|
3725
3716
|
writable: !0,
|
|
3726
3717
|
configurable: t.type_ !== 1 || r !== "length",
|
|
@@ -3732,26 +3723,26 @@ var Fn = {
|
|
|
3732
3723
|
B(11);
|
|
3733
3724
|
},
|
|
3734
3725
|
getPrototypeOf(t) {
|
|
3735
|
-
return
|
|
3726
|
+
return ie(t.base_);
|
|
3736
3727
|
},
|
|
3737
3728
|
setPrototypeOf() {
|
|
3738
3729
|
B(12);
|
|
3739
3730
|
}
|
|
3740
|
-
},
|
|
3741
|
-
|
|
3742
|
-
|
|
3731
|
+
}, Ve = {};
|
|
3732
|
+
Ye(Rn, (t, r) => {
|
|
3733
|
+
Ve[t] = function() {
|
|
3743
3734
|
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
|
3744
3735
|
};
|
|
3745
3736
|
});
|
|
3746
|
-
|
|
3747
|
-
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && B(13),
|
|
3737
|
+
Ve.deleteProperty = function(t, r) {
|
|
3738
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && B(13), Ve.set.call(this, t, r, void 0);
|
|
3748
3739
|
};
|
|
3749
|
-
|
|
3750
|
-
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && B(14),
|
|
3740
|
+
Ve.set = function(t, r, e) {
|
|
3741
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && B(14), Rn.set.call(this, t[0], r, e, t[0]);
|
|
3751
3742
|
};
|
|
3752
|
-
function
|
|
3753
|
-
const e = t[
|
|
3754
|
-
return (e ?
|
|
3743
|
+
function mn(t, r) {
|
|
3744
|
+
const e = t[lt];
|
|
3745
|
+
return (e ? se(e) : t)[r];
|
|
3755
3746
|
}
|
|
3756
3747
|
function ki(t, r, e) {
|
|
3757
3748
|
var a;
|
|
@@ -3765,19 +3756,19 @@ function ki(t, r, e) {
|
|
|
3765
3756
|
function xs(t, r) {
|
|
3766
3757
|
if (!(r in t))
|
|
3767
3758
|
return;
|
|
3768
|
-
let e =
|
|
3759
|
+
let e = ie(t);
|
|
3769
3760
|
for (; e; ) {
|
|
3770
3761
|
const s = Object.getOwnPropertyDescriptor(e, r);
|
|
3771
3762
|
if (s)
|
|
3772
3763
|
return s;
|
|
3773
|
-
e =
|
|
3764
|
+
e = ie(e);
|
|
3774
3765
|
}
|
|
3775
3766
|
}
|
|
3776
|
-
function
|
|
3777
|
-
t.modified_ || (t.modified_ = !0, t.parent_ &&
|
|
3767
|
+
function En(t) {
|
|
3768
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && En(t.parent_));
|
|
3778
3769
|
}
|
|
3779
|
-
function
|
|
3780
|
-
t.copy_ || (t.copy_ =
|
|
3770
|
+
function yn(t) {
|
|
3771
|
+
t.copy_ || (t.copy_ = Sn(
|
|
3781
3772
|
t.base_,
|
|
3782
3773
|
t.scope_.immer_.useStrictShallowCopy_
|
|
3783
3774
|
));
|
|
@@ -3786,28 +3777,28 @@ var _i = class {
|
|
|
3786
3777
|
constructor(t) {
|
|
3787
3778
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, e, s) => {
|
|
3788
3779
|
if (typeof r == "function" && typeof e != "function") {
|
|
3789
|
-
const
|
|
3780
|
+
const o = e;
|
|
3790
3781
|
e = r;
|
|
3791
3782
|
const u = this;
|
|
3792
|
-
return function(f =
|
|
3793
|
-
return u.produce(f, (
|
|
3783
|
+
return function(f = o, ...h) {
|
|
3784
|
+
return u.produce(f, (k) => e.call(this, k, ...h));
|
|
3794
3785
|
};
|
|
3795
3786
|
}
|
|
3796
3787
|
typeof e != "function" && B(6), s !== void 0 && typeof s != "function" && B(7);
|
|
3797
3788
|
let a;
|
|
3798
|
-
if (
|
|
3799
|
-
const
|
|
3789
|
+
if (jt(r)) {
|
|
3790
|
+
const o = Kn(this), u = An(r, void 0);
|
|
3800
3791
|
let c = !0;
|
|
3801
3792
|
try {
|
|
3802
3793
|
a = e(u), c = !1;
|
|
3803
3794
|
} finally {
|
|
3804
|
-
c ?
|
|
3795
|
+
c ? Mn(o) : Tn(o);
|
|
3805
3796
|
}
|
|
3806
|
-
return
|
|
3797
|
+
return Xn(o, s), Vn(a, o);
|
|
3807
3798
|
} else if (!r || typeof r != "object") {
|
|
3808
|
-
if (a = e(r), a === void 0 && (a = r), a ===
|
|
3809
|
-
const
|
|
3810
|
-
|
|
3799
|
+
if (a = e(r), a === void 0 && (a = r), a === Cn && (a = void 0), this.autoFreeze_ && Pn(a, !0), s) {
|
|
3800
|
+
const o = [], u = [];
|
|
3801
|
+
ue("Patches").generateReplacementPatches_(r, a, o, u), s(o, u);
|
|
3811
3802
|
}
|
|
3812
3803
|
return a;
|
|
3813
3804
|
} else
|
|
@@ -3822,15 +3813,15 @@ var _i = class {
|
|
|
3822
3813
|
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
|
3823
3814
|
}
|
|
3824
3815
|
createDraft(t) {
|
|
3825
|
-
|
|
3826
|
-
const r =
|
|
3827
|
-
return e[
|
|
3816
|
+
jt(t) || B(8), oe(t) && (t = vi(t));
|
|
3817
|
+
const r = Kn(this), e = An(t, void 0);
|
|
3818
|
+
return e[lt].isManual_ = !0, Tn(r), e;
|
|
3828
3819
|
}
|
|
3829
3820
|
finishDraft(t, r) {
|
|
3830
|
-
const e = t && t[
|
|
3821
|
+
const e = t && t[lt];
|
|
3831
3822
|
(!e || !e.isManual_) && B(9);
|
|
3832
3823
|
const { scope_: s } = e;
|
|
3833
|
-
return
|
|
3824
|
+
return Xn(s, r), Vn(void 0, s);
|
|
3834
3825
|
}
|
|
3835
3826
|
/**
|
|
3836
3827
|
* Pass true to automatically freeze all copies created by Immer.
|
|
@@ -3858,36 +3849,36 @@ var _i = class {
|
|
|
3858
3849
|
}
|
|
3859
3850
|
}
|
|
3860
3851
|
e > -1 && (r = r.slice(e + 1));
|
|
3861
|
-
const s =
|
|
3862
|
-
return
|
|
3852
|
+
const s = ue("Patches").applyPatches_;
|
|
3853
|
+
return oe(t) ? s(t, r) : this.produce(
|
|
3863
3854
|
t,
|
|
3864
3855
|
(a) => s(a, r)
|
|
3865
3856
|
);
|
|
3866
3857
|
}
|
|
3867
3858
|
};
|
|
3868
|
-
function
|
|
3869
|
-
const e =
|
|
3859
|
+
function An(t, r) {
|
|
3860
|
+
const e = Ze(t) ? ue("MapSet").proxyMap_(t, r) : Qe(t) ? ue("MapSet").proxySet_(t, r) : bi(t, r);
|
|
3870
3861
|
return (r ? r.scope_ : Ds()).drafts_.push(e), e;
|
|
3871
3862
|
}
|
|
3872
3863
|
function vi(t) {
|
|
3873
|
-
return
|
|
3864
|
+
return oe(t) || B(10, t), Os(t);
|
|
3874
3865
|
}
|
|
3875
3866
|
function Os(t) {
|
|
3876
|
-
if (!
|
|
3867
|
+
if (!jt(t) || Tr(t))
|
|
3877
3868
|
return t;
|
|
3878
|
-
const r = t[
|
|
3869
|
+
const r = t[lt];
|
|
3879
3870
|
let e;
|
|
3880
3871
|
if (r) {
|
|
3881
3872
|
if (!r.modified_)
|
|
3882
3873
|
return r.base_;
|
|
3883
|
-
r.finalized_ = !0, e =
|
|
3874
|
+
r.finalized_ = !0, e = Sn(t, r.scope_.immer_.useStrictShallowCopy_);
|
|
3884
3875
|
} else
|
|
3885
|
-
e =
|
|
3886
|
-
return
|
|
3876
|
+
e = Sn(t, !0);
|
|
3877
|
+
return Ye(e, (s, a) => {
|
|
3887
3878
|
As(e, s, Os(a));
|
|
3888
3879
|
}), r && (r.finalized_ = !1), e;
|
|
3889
3880
|
}
|
|
3890
|
-
function
|
|
3881
|
+
function qn() {
|
|
3891
3882
|
process.env.NODE_ENV !== "production" && Ts.push(
|
|
3892
3883
|
'Sets cannot have "replace" patches.',
|
|
3893
3884
|
function(p) {
|
|
@@ -3899,112 +3890,112 @@ function Qn() {
|
|
|
3899
3890
|
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
3900
3891
|
);
|
|
3901
3892
|
const r = "replace", e = "add", s = "remove";
|
|
3902
|
-
function a(p, m,
|
|
3893
|
+
function a(p, m, g, _) {
|
|
3903
3894
|
switch (p.type_) {
|
|
3904
3895
|
case 0:
|
|
3905
3896
|
case 2:
|
|
3906
3897
|
return u(
|
|
3907
3898
|
p,
|
|
3908
3899
|
m,
|
|
3909
|
-
|
|
3900
|
+
g,
|
|
3910
3901
|
_
|
|
3911
3902
|
);
|
|
3912
3903
|
case 1:
|
|
3913
|
-
return
|
|
3904
|
+
return o(p, m, g, _);
|
|
3914
3905
|
case 3:
|
|
3915
3906
|
return c(
|
|
3916
3907
|
p,
|
|
3917
3908
|
m,
|
|
3918
|
-
|
|
3909
|
+
g,
|
|
3919
3910
|
_
|
|
3920
3911
|
);
|
|
3921
3912
|
}
|
|
3922
3913
|
}
|
|
3923
|
-
function
|
|
3914
|
+
function o(p, m, g, _) {
|
|
3924
3915
|
let { base_: M, assigned_: d } = p, v = p.copy_;
|
|
3925
|
-
v.length < M.length && ([M, v] = [v, M], [
|
|
3916
|
+
v.length < M.length && ([M, v] = [v, M], [g, _] = [_, g]);
|
|
3926
3917
|
for (let S = 0; S < M.length; S++)
|
|
3927
3918
|
if (d[S] && v[S] !== M[S]) {
|
|
3928
|
-
const
|
|
3929
|
-
|
|
3919
|
+
const b = m.concat([S]);
|
|
3920
|
+
g.push({
|
|
3930
3921
|
op: r,
|
|
3931
|
-
path:
|
|
3922
|
+
path: b,
|
|
3932
3923
|
// Need to maybe clone it, as it can in fact be the original value
|
|
3933
3924
|
// due to the base/copy inversion at the start of this function
|
|
3934
3925
|
value: y(v[S])
|
|
3935
3926
|
}), _.push({
|
|
3936
3927
|
op: r,
|
|
3937
|
-
path:
|
|
3928
|
+
path: b,
|
|
3938
3929
|
value: y(M[S])
|
|
3939
3930
|
});
|
|
3940
3931
|
}
|
|
3941
3932
|
for (let S = M.length; S < v.length; S++) {
|
|
3942
|
-
const
|
|
3943
|
-
|
|
3933
|
+
const b = m.concat([S]);
|
|
3934
|
+
g.push({
|
|
3944
3935
|
op: e,
|
|
3945
|
-
path:
|
|
3936
|
+
path: b,
|
|
3946
3937
|
// Need to maybe clone it, as it can in fact be the original value
|
|
3947
3938
|
// due to the base/copy inversion at the start of this function
|
|
3948
3939
|
value: y(v[S])
|
|
3949
3940
|
});
|
|
3950
3941
|
}
|
|
3951
3942
|
for (let S = v.length - 1; M.length <= S; --S) {
|
|
3952
|
-
const
|
|
3943
|
+
const b = m.concat([S]);
|
|
3953
3944
|
_.push({
|
|
3954
3945
|
op: s,
|
|
3955
|
-
path:
|
|
3946
|
+
path: b
|
|
3956
3947
|
});
|
|
3957
3948
|
}
|
|
3958
3949
|
}
|
|
3959
|
-
function u(p, m,
|
|
3950
|
+
function u(p, m, g, _) {
|
|
3960
3951
|
const { base_: M, copy_: d } = p;
|
|
3961
|
-
|
|
3962
|
-
const
|
|
3963
|
-
if (
|
|
3952
|
+
Ye(p.assigned_, (v, S) => {
|
|
3953
|
+
const b = hn(M, v), w = hn(d, v), E = S ? Xe(M, v) ? r : e : s;
|
|
3954
|
+
if (b === w && E === r)
|
|
3964
3955
|
return;
|
|
3965
3956
|
const A = m.concat(v);
|
|
3966
|
-
|
|
3967
|
-
E === e ? { op: s, path: A } : E === s ? { op: e, path: A, value: y(
|
|
3957
|
+
g.push(E === s ? { op: E, path: A } : { op: E, path: A, value: w }), _.push(
|
|
3958
|
+
E === e ? { op: s, path: A } : E === s ? { op: e, path: A, value: y(b) } : { op: r, path: A, value: y(b) }
|
|
3968
3959
|
);
|
|
3969
3960
|
});
|
|
3970
3961
|
}
|
|
3971
|
-
function c(p, m,
|
|
3962
|
+
function c(p, m, g, _) {
|
|
3972
3963
|
let { base_: M, copy_: d } = p, v = 0;
|
|
3973
3964
|
M.forEach((S) => {
|
|
3974
3965
|
if (!d.has(S)) {
|
|
3975
|
-
const
|
|
3976
|
-
|
|
3966
|
+
const b = m.concat([v]);
|
|
3967
|
+
g.push({
|
|
3977
3968
|
op: s,
|
|
3978
|
-
path:
|
|
3969
|
+
path: b,
|
|
3979
3970
|
value: S
|
|
3980
3971
|
}), _.unshift({
|
|
3981
3972
|
op: e,
|
|
3982
|
-
path:
|
|
3973
|
+
path: b,
|
|
3983
3974
|
value: S
|
|
3984
3975
|
});
|
|
3985
3976
|
}
|
|
3986
3977
|
v++;
|
|
3987
3978
|
}), v = 0, d.forEach((S) => {
|
|
3988
3979
|
if (!M.has(S)) {
|
|
3989
|
-
const
|
|
3990
|
-
|
|
3980
|
+
const b = m.concat([v]);
|
|
3981
|
+
g.push({
|
|
3991
3982
|
op: e,
|
|
3992
|
-
path:
|
|
3983
|
+
path: b,
|
|
3993
3984
|
value: S
|
|
3994
3985
|
}), _.unshift({
|
|
3995
3986
|
op: s,
|
|
3996
|
-
path:
|
|
3987
|
+
path: b,
|
|
3997
3988
|
value: S
|
|
3998
3989
|
});
|
|
3999
3990
|
}
|
|
4000
3991
|
v++;
|
|
4001
3992
|
});
|
|
4002
3993
|
}
|
|
4003
|
-
function f(p, m,
|
|
4004
|
-
|
|
3994
|
+
function f(p, m, g, _) {
|
|
3995
|
+
g.push({
|
|
4005
3996
|
op: r,
|
|
4006
3997
|
path: [],
|
|
4007
|
-
value: m ===
|
|
3998
|
+
value: m === Cn ? void 0 : m
|
|
4008
3999
|
}), _.push({
|
|
4009
4000
|
op: r,
|
|
4010
4001
|
path: [],
|
|
@@ -4012,70 +4003,70 @@ function Qn() {
|
|
|
4012
4003
|
});
|
|
4013
4004
|
}
|
|
4014
4005
|
function h(p, m) {
|
|
4015
|
-
return m.forEach((
|
|
4016
|
-
const { path: _, op: M } =
|
|
4006
|
+
return m.forEach((g) => {
|
|
4007
|
+
const { path: _, op: M } = g;
|
|
4017
4008
|
let d = p;
|
|
4018
4009
|
for (let w = 0; w < _.length - 1; w++) {
|
|
4019
|
-
const E =
|
|
4010
|
+
const E = ce(d);
|
|
4020
4011
|
let A = _[w];
|
|
4021
|
-
typeof A != "string" && typeof A != "number" && (A = "" + A), (E === 0 || E === 1) && (A === "__proto__" || A === "constructor") && B(19), typeof d == "function" && A === "prototype" && B(19), d =
|
|
4012
|
+
typeof A != "string" && typeof A != "number" && (A = "" + A), (E === 0 || E === 1) && (A === "__proto__" || A === "constructor") && B(19), typeof d == "function" && A === "prototype" && B(19), d = hn(d, A), typeof d != "object" && B(18, _.join("/"));
|
|
4022
4013
|
}
|
|
4023
|
-
const v =
|
|
4014
|
+
const v = ce(d), S = k(g.value), b = _[_.length - 1];
|
|
4024
4015
|
switch (M) {
|
|
4025
4016
|
case r:
|
|
4026
4017
|
switch (v) {
|
|
4027
4018
|
case 2:
|
|
4028
|
-
return d.set(
|
|
4019
|
+
return d.set(b, S);
|
|
4029
4020
|
case 3:
|
|
4030
4021
|
B(16);
|
|
4031
4022
|
default:
|
|
4032
|
-
return d[
|
|
4023
|
+
return d[b] = S;
|
|
4033
4024
|
}
|
|
4034
4025
|
case e:
|
|
4035
4026
|
switch (v) {
|
|
4036
4027
|
case 1:
|
|
4037
|
-
return
|
|
4028
|
+
return b === "-" ? d.push(S) : d.splice(b, 0, S);
|
|
4038
4029
|
case 2:
|
|
4039
|
-
return d.set(
|
|
4030
|
+
return d.set(b, S);
|
|
4040
4031
|
case 3:
|
|
4041
4032
|
return d.add(S);
|
|
4042
4033
|
default:
|
|
4043
|
-
return d[
|
|
4034
|
+
return d[b] = S;
|
|
4044
4035
|
}
|
|
4045
4036
|
case s:
|
|
4046
4037
|
switch (v) {
|
|
4047
4038
|
case 1:
|
|
4048
|
-
return d.splice(
|
|
4039
|
+
return d.splice(b, 1);
|
|
4049
4040
|
case 2:
|
|
4050
|
-
return d.delete(
|
|
4041
|
+
return d.delete(b);
|
|
4051
4042
|
case 3:
|
|
4052
|
-
return d.delete(
|
|
4043
|
+
return d.delete(g.value);
|
|
4053
4044
|
default:
|
|
4054
|
-
return delete d[
|
|
4045
|
+
return delete d[b];
|
|
4055
4046
|
}
|
|
4056
4047
|
default:
|
|
4057
4048
|
B(17, M);
|
|
4058
4049
|
}
|
|
4059
4050
|
}), p;
|
|
4060
4051
|
}
|
|
4061
|
-
function
|
|
4062
|
-
if (!
|
|
4052
|
+
function k(p) {
|
|
4053
|
+
if (!jt(p))
|
|
4063
4054
|
return p;
|
|
4064
4055
|
if (Array.isArray(p))
|
|
4065
|
-
return p.map(
|
|
4066
|
-
if (
|
|
4056
|
+
return p.map(k);
|
|
4057
|
+
if (Ze(p))
|
|
4067
4058
|
return new Map(
|
|
4068
|
-
Array.from(p.entries()).map(([
|
|
4059
|
+
Array.from(p.entries()).map(([g, _]) => [g, k(_)])
|
|
4069
4060
|
);
|
|
4070
|
-
if (
|
|
4071
|
-
return new Set(Array.from(p).map(
|
|
4072
|
-
const m = Object.create(
|
|
4073
|
-
for (const
|
|
4074
|
-
m[
|
|
4075
|
-
return
|
|
4061
|
+
if (Qe(p))
|
|
4062
|
+
return new Set(Array.from(p).map(k));
|
|
4063
|
+
const m = Object.create(ie(p));
|
|
4064
|
+
for (const g in p)
|
|
4065
|
+
m[g] = k(p[g]);
|
|
4066
|
+
return Xe(p, Ge) && (m[Ge] = p[Ge]), m;
|
|
4076
4067
|
}
|
|
4077
4068
|
function y(p) {
|
|
4078
|
-
return
|
|
4069
|
+
return oe(p) ? k(p) : p;
|
|
4079
4070
|
}
|
|
4080
4071
|
yi("Patches", {
|
|
4081
4072
|
applyPatches_: h,
|
|
@@ -4083,16 +4074,16 @@ function Qn() {
|
|
|
4083
4074
|
generateReplacementPatches_: f
|
|
4084
4075
|
});
|
|
4085
4076
|
}
|
|
4086
|
-
var
|
|
4087
|
-
|
|
4088
|
-
|
|
4077
|
+
var dt = new _i(), Si = dt.produce;
|
|
4078
|
+
dt.produceWithPatches.bind(
|
|
4079
|
+
dt
|
|
4089
4080
|
);
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
var wi =
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
var Mi = 9007199254740991, Ti = "[object Arguments]", Ei = "[object Function]", Ai = "[object GeneratorFunction]", Di = "[object Symbol]", xi = typeof
|
|
4081
|
+
dt.setAutoFreeze.bind(dt);
|
|
4082
|
+
dt.setUseStrictShallowCopy.bind(dt);
|
|
4083
|
+
var wi = dt.applyPatches.bind(dt);
|
|
4084
|
+
dt.createDraft.bind(dt);
|
|
4085
|
+
dt.finishDraft.bind(dt);
|
|
4086
|
+
var Mi = 9007199254740991, Ti = "[object Arguments]", Ei = "[object Function]", Ai = "[object GeneratorFunction]", Di = "[object Symbol]", xi = typeof pt == "object" && pt && pt.Object === Object && pt, Oi = typeof self == "object" && self && self.Object === Object && self, Ci = xi || Oi || Function("return this")();
|
|
4096
4087
|
function Pi(t, r, e) {
|
|
4097
4088
|
switch (e.length) {
|
|
4098
4089
|
case 0:
|
|
@@ -4116,11 +4107,11 @@ function zi(t, r) {
|
|
|
4116
4107
|
t[a + e] = r[e];
|
|
4117
4108
|
return t;
|
|
4118
4109
|
}
|
|
4119
|
-
var
|
|
4110
|
+
var zn = Object.prototype, Fi = zn.hasOwnProperty, Fn = zn.toString, Zn = Ci.Symbol, $i = zn.propertyIsEnumerable, Qn = Zn ? Zn.isConcatSpreadable : void 0, ts = Math.max;
|
|
4120
4111
|
function Li(t, r, e, s, a) {
|
|
4121
|
-
var
|
|
4122
|
-
for (e || (e = Ui), a || (a = []); ++
|
|
4123
|
-
var c = t[
|
|
4112
|
+
var o = -1, u = t.length;
|
|
4113
|
+
for (e || (e = Ui), a || (a = []); ++o < u; ) {
|
|
4114
|
+
var c = t[o];
|
|
4124
4115
|
e(c) ? zi(a, c) : a[a.length] = c;
|
|
4125
4116
|
}
|
|
4126
4117
|
return a;
|
|
@@ -4131,24 +4122,24 @@ function Ni(t, r) {
|
|
|
4131
4122
|
});
|
|
4132
4123
|
}
|
|
4133
4124
|
function Hi(t, r, e) {
|
|
4134
|
-
for (var s = -1, a = r.length,
|
|
4125
|
+
for (var s = -1, a = r.length, o = {}; ++s < a; ) {
|
|
4135
4126
|
var u = r[s], c = t[u];
|
|
4136
|
-
e(c, u) && (
|
|
4127
|
+
e(c, u) && (o[u] = c);
|
|
4137
4128
|
}
|
|
4138
|
-
return
|
|
4129
|
+
return o;
|
|
4139
4130
|
}
|
|
4140
4131
|
function ji(t, r) {
|
|
4141
|
-
return r =
|
|
4142
|
-
for (var e = arguments, s = -1, a =
|
|
4143
|
-
|
|
4132
|
+
return r = ts(r === void 0 ? t.length - 1 : r, 0), function() {
|
|
4133
|
+
for (var e = arguments, s = -1, a = ts(e.length - r, 0), o = Array(a); ++s < a; )
|
|
4134
|
+
o[s] = e[r + s];
|
|
4144
4135
|
s = -1;
|
|
4145
4136
|
for (var u = Array(r + 1); ++s < r; )
|
|
4146
4137
|
u[s] = e[s];
|
|
4147
|
-
return u[r] =
|
|
4138
|
+
return u[r] = o, Pi(t, this, u);
|
|
4148
4139
|
};
|
|
4149
4140
|
}
|
|
4150
4141
|
function Ui(t) {
|
|
4151
|
-
return Gi(t) || Bi(t) || !!(
|
|
4142
|
+
return Gi(t) || Bi(t) || !!(Qn && t && t[Qn]);
|
|
4152
4143
|
}
|
|
4153
4144
|
function Wi(t) {
|
|
4154
4145
|
if (typeof t == "string" || qi(t))
|
|
@@ -4157,7 +4148,7 @@ function Wi(t) {
|
|
|
4157
4148
|
return r == "0" && 1 / t == -1 / 0 ? "-0" : r;
|
|
4158
4149
|
}
|
|
4159
4150
|
function Bi(t) {
|
|
4160
|
-
return Xi(t) && Fi.call(t, "callee") && (!$i.call(t, "callee") ||
|
|
4151
|
+
return Xi(t) && Fi.call(t, "callee") && (!$i.call(t, "callee") || Fn.call(t) == Ti);
|
|
4161
4152
|
}
|
|
4162
4153
|
var Gi = Array.isArray;
|
|
4163
4154
|
function Yi(t) {
|
|
@@ -4167,7 +4158,7 @@ function Xi(t) {
|
|
|
4167
4158
|
return Cs(t) && Yi(t);
|
|
4168
4159
|
}
|
|
4169
4160
|
function Ki(t) {
|
|
4170
|
-
var r = Ji(t) ?
|
|
4161
|
+
var r = Ji(t) ? Fn.call(t) : "";
|
|
4171
4162
|
return r == Ei || r == Ai;
|
|
4172
4163
|
}
|
|
4173
4164
|
function Vi(t) {
|
|
@@ -4181,12 +4172,12 @@ function Cs(t) {
|
|
|
4181
4172
|
return !!t && typeof t == "object";
|
|
4182
4173
|
}
|
|
4183
4174
|
function qi(t) {
|
|
4184
|
-
return typeof t == "symbol" || Cs(t) &&
|
|
4175
|
+
return typeof t == "symbol" || Cs(t) && Fn.call(t) == Di;
|
|
4185
4176
|
}
|
|
4186
4177
|
var Zi = ji(function(t, r) {
|
|
4187
4178
|
return t == null ? {} : Ni(t, Ri(Li(r), Wi));
|
|
4188
4179
|
}), Qi = Zi;
|
|
4189
|
-
const
|
|
4180
|
+
const es = /* @__PURE__ */ Dn(Qi), to = {
|
|
4190
4181
|
width: 1080,
|
|
4191
4182
|
height: 1920
|
|
4192
4183
|
}, eo = 30, ro = {
|
|
@@ -4212,7 +4203,7 @@ const ns = /* @__PURE__ */ On(Qi), to = {
|
|
|
4212
4203
|
value: "transparent"
|
|
4213
4204
|
},
|
|
4214
4205
|
acceptsMap: {}
|
|
4215
|
-
},
|
|
4206
|
+
}, rs = [
|
|
4216
4207
|
"tracks",
|
|
4217
4208
|
"trackItemsMap",
|
|
4218
4209
|
"trackItemDetailsMap",
|
|
@@ -4223,16 +4214,16 @@ const ns = /* @__PURE__ */ On(Qi), to = {
|
|
|
4223
4214
|
];
|
|
4224
4215
|
class Co {
|
|
4225
4216
|
constructor(r) {
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4217
|
+
At(this, "stateSubject");
|
|
4218
|
+
At(this, "stateHistorySubject");
|
|
4219
|
+
At(this, "prevState");
|
|
4220
|
+
At(this, "background");
|
|
4221
|
+
At(this, "undos", []);
|
|
4222
|
+
At(this, "redos", []);
|
|
4223
|
+
At(this, "acceptsMap");
|
|
4224
|
+
At(this, "listener");
|
|
4234
4225
|
const e = Object.assign({}, ro, r);
|
|
4235
|
-
this.stateSubject = new
|
|
4226
|
+
this.stateSubject = new Wn(e), this.stateHistorySubject = new Wn({
|
|
4236
4227
|
handleRedo: !1,
|
|
4237
4228
|
handleUndo: !1
|
|
4238
4229
|
}), this.background = e.background, this.prevState = e, this.acceptsMap = e.acceptsMap, this.initListeners();
|
|
@@ -4247,8 +4238,8 @@ class Co {
|
|
|
4247
4238
|
this.destroyListeners();
|
|
4248
4239
|
}
|
|
4249
4240
|
updateHistory(r, e) {
|
|
4250
|
-
const s =
|
|
4251
|
-
|
|
4241
|
+
const s = es(r, rs), a = es(this.getState(), rs), o = Ms(a, s);
|
|
4242
|
+
o.length && (this.undos.push({ undos: o, type: e }), this.redos = []);
|
|
4252
4243
|
}
|
|
4253
4244
|
getStateHistory() {
|
|
4254
4245
|
return this.stateHistorySubject.getValue();
|
|
@@ -4302,8 +4293,8 @@ class Co {
|
|
|
4302
4293
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4303
4294
|
const s = Object.keys(e.trackItemsMap).filter(
|
|
4304
4295
|
(a) => {
|
|
4305
|
-
const
|
|
4306
|
-
return
|
|
4296
|
+
const o = this.prevState.trackItemsMap[a], u = e.trackItemsMap[a];
|
|
4297
|
+
return o && u && !U(o.animations, u.animations);
|
|
4307
4298
|
}
|
|
4308
4299
|
);
|
|
4309
4300
|
r({ trackItemsMap: e.trackItemsMap, changedAnimationIds: s });
|
|
@@ -4312,12 +4303,12 @@ class Co {
|
|
|
4312
4303
|
subscribeToUpdateTrackItemTiming(r) {
|
|
4313
4304
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4314
4305
|
if (!U(e.trackItemsMap, this.prevState.trackItemsMap)) {
|
|
4315
|
-
const s = Object.keys(e.trackItemsMap).filter((
|
|
4316
|
-
const u = this.prevState.trackItemsMap[
|
|
4306
|
+
const s = Object.keys(e.trackItemsMap).filter((o) => {
|
|
4307
|
+
const u = this.prevState.trackItemsMap[o], c = e.trackItemsMap[o];
|
|
4317
4308
|
return u && c && !U(u.trim, c.trim);
|
|
4318
4309
|
}), a = Object.keys(e.trackItemsMap).filter(
|
|
4319
|
-
(
|
|
4320
|
-
const u = this.prevState.trackItemsMap[
|
|
4310
|
+
(o) => {
|
|
4311
|
+
const u = this.prevState.trackItemsMap[o], c = e.trackItemsMap[o];
|
|
4321
4312
|
return u && c && !U(u.display, c.display);
|
|
4322
4313
|
}
|
|
4323
4314
|
);
|
|
@@ -4354,8 +4345,8 @@ class Co {
|
|
|
4354
4345
|
}
|
|
4355
4346
|
subscribeToAddOrRemoveItems(r) {
|
|
4356
4347
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4357
|
-
const s = [...e.trackItemIds].sort(), a = [...this.prevState.trackItemIds].sort(),
|
|
4358
|
-
(!U(s, a) || !U(
|
|
4348
|
+
const s = [...e.trackItemIds].sort(), a = [...this.prevState.trackItemIds].sort(), o = [...e.transitionIds].sort(), u = [...this.prevState.transitionIds].sort();
|
|
4349
|
+
(!U(s, a) || !U(o, u)) && r({ trackItemIds: e.trackItemIds });
|
|
4359
4350
|
});
|
|
4360
4351
|
}
|
|
4361
4352
|
// Selectively subscribe to activeIds changes
|
|
@@ -4366,8 +4357,8 @@ class Co {
|
|
|
4366
4357
|
}
|
|
4367
4358
|
subscribeToTracks(r) {
|
|
4368
4359
|
return this.stateSubject.asObservable().subscribe((e) => {
|
|
4369
|
-
const s = e.tracks,
|
|
4370
|
-
(c) => !
|
|
4360
|
+
const s = e.tracks, o = this.prevState.tracks.map((c) => c.id), u = s.filter(
|
|
4361
|
+
(c) => !o.includes(c.id)
|
|
4371
4362
|
);
|
|
4372
4363
|
u.length && r({
|
|
4373
4364
|
tracks: e.tracks,
|
|
@@ -4395,24 +4386,24 @@ class Co {
|
|
|
4395
4386
|
undo() {
|
|
4396
4387
|
const r = this.undos.pop(), e = r == null ? void 0 : r.undos, s = r == null ? void 0 : r.type;
|
|
4397
4388
|
if (!e || !s) return;
|
|
4398
|
-
|
|
4389
|
+
qn();
|
|
4399
4390
|
const {
|
|
4400
4391
|
trackItemDetailsMap: a,
|
|
4401
|
-
trackItemIds:
|
|
4392
|
+
trackItemIds: o,
|
|
4402
4393
|
tracks: u,
|
|
4403
4394
|
transitionIds: c,
|
|
4404
4395
|
transitionsMap: f,
|
|
4405
4396
|
trackItemsMap: h,
|
|
4406
|
-
structure:
|
|
4397
|
+
structure: k
|
|
4407
4398
|
} = this.getState(), y = x({
|
|
4408
4399
|
trackItemDetailsMap: a,
|
|
4409
|
-
trackItemIds:
|
|
4400
|
+
trackItemIds: o,
|
|
4410
4401
|
tracks: u,
|
|
4411
4402
|
transitionIds: c,
|
|
4412
4403
|
transitionsMap: f,
|
|
4413
4404
|
trackItemsMap: h,
|
|
4414
|
-
structure:
|
|
4415
|
-
}), p = [], m = [],
|
|
4405
|
+
structure: k
|
|
4406
|
+
}), p = [], m = [], g = [], _ = [], M = [], d = [], v = [];
|
|
4416
4407
|
e.forEach((O) => {
|
|
4417
4408
|
let N;
|
|
4418
4409
|
const nt = O.path.slice(1);
|
|
@@ -4428,17 +4419,17 @@ class Co {
|
|
|
4428
4419
|
path: nt,
|
|
4429
4420
|
op: "add",
|
|
4430
4421
|
value: O.oldValue
|
|
4431
|
-
}, O.path.includes("trackItemIds") ?
|
|
4422
|
+
}, O.path.includes("trackItemIds") ? g.push(N) : O.path.includes("transitionIds") ? m.push(N) : O.path.includes("trackItemsMap") ? M.push(N) : O.path.includes("transitionsMap") ? _.push(N) : O.path.includes("tracks") ? p.push(N) : O.path.includes("trackItemDetailsMap") ? d.push(N) : O.path.includes("structure") && v.push(N);
|
|
4432
4423
|
});
|
|
4433
4424
|
const S = this.applyPatch(
|
|
4434
4425
|
y.tracks,
|
|
4435
4426
|
p
|
|
4436
|
-
),
|
|
4427
|
+
), b = this.applyPatch(
|
|
4437
4428
|
y.transitionIds,
|
|
4438
4429
|
m
|
|
4439
4430
|
), w = this.applyPatch(
|
|
4440
4431
|
y.trackItemIds,
|
|
4441
|
-
|
|
4432
|
+
g
|
|
4442
4433
|
), E = this.applyPatch(
|
|
4443
4434
|
y.transitionsMap,
|
|
4444
4435
|
_
|
|
@@ -4453,7 +4444,7 @@ class Co {
|
|
|
4453
4444
|
v
|
|
4454
4445
|
), J = x({
|
|
4455
4446
|
tracks: S,
|
|
4456
|
-
transitionIds:
|
|
4447
|
+
transitionIds: b,
|
|
4457
4448
|
trackItemIds: w,
|
|
4458
4449
|
transitionsMap: E,
|
|
4459
4450
|
trackItemsMap: A,
|
|
@@ -4461,35 +4452,35 @@ class Co {
|
|
|
4461
4452
|
structure: C
|
|
4462
4453
|
}), L = x(this.getState()), Y = { ...L, ...J };
|
|
4463
4454
|
this.prevState = L, this.redos.push({ redos: e, type: s });
|
|
4464
|
-
const
|
|
4465
|
-
this.stateSubject.next({ ...Y, duration:
|
|
4455
|
+
const mt = tt(Y.trackItemsMap);
|
|
4456
|
+
this.stateSubject.next({ ...Y, duration: mt }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(Y, { updateHistory: !1 });
|
|
4466
4457
|
}
|
|
4467
4458
|
applyPatch(r, e) {
|
|
4468
|
-
return e.reverse().reduce((s, a) => Si(s, (
|
|
4469
|
-
wi(
|
|
4459
|
+
return e.reverse().reduce((s, a) => Si(s, (o) => {
|
|
4460
|
+
wi(o, [a]);
|
|
4470
4461
|
}), r);
|
|
4471
4462
|
}
|
|
4472
4463
|
redo() {
|
|
4473
4464
|
const r = this.redos.pop(), e = r == null ? void 0 : r.redos, s = r == null ? void 0 : r.type;
|
|
4474
4465
|
if (!e || !s) return;
|
|
4475
|
-
|
|
4466
|
+
qn();
|
|
4476
4467
|
const {
|
|
4477
4468
|
trackItemDetailsMap: a,
|
|
4478
|
-
trackItemIds:
|
|
4469
|
+
trackItemIds: o,
|
|
4479
4470
|
tracks: u,
|
|
4480
4471
|
transitionIds: c,
|
|
4481
4472
|
transitionsMap: f,
|
|
4482
4473
|
trackItemsMap: h,
|
|
4483
|
-
structure:
|
|
4474
|
+
structure: k
|
|
4484
4475
|
} = this.getState(), y = x({
|
|
4485
4476
|
trackItemDetailsMap: a,
|
|
4486
|
-
trackItemIds:
|
|
4477
|
+
trackItemIds: o,
|
|
4487
4478
|
tracks: u,
|
|
4488
4479
|
transitionIds: c,
|
|
4489
4480
|
transitionsMap: f,
|
|
4490
4481
|
trackItemsMap: h,
|
|
4491
|
-
structure:
|
|
4492
|
-
}), p = [], m = [],
|
|
4482
|
+
structure: k
|
|
4483
|
+
}), p = [], m = [], g = [], _ = [], M = [], d = [], v = [];
|
|
4493
4484
|
e.forEach((O) => {
|
|
4494
4485
|
let N;
|
|
4495
4486
|
const nt = O.path.slice(1);
|
|
@@ -4505,17 +4496,17 @@ class Co {
|
|
|
4505
4496
|
path: nt,
|
|
4506
4497
|
op: "remove",
|
|
4507
4498
|
value: O.oldValue
|
|
4508
|
-
}, O.path.includes("trackItemIds") ?
|
|
4499
|
+
}, O.path.includes("trackItemIds") ? g.push(N) : O.path.includes("transitionIds") ? m.push(N) : O.path.includes("trackItemsMap") ? M.push(N) : O.path.includes("transitionsMap") ? _.push(N) : O.path.includes("trackItemDetailsMap") ? d.push(N) : O.path.includes("structure") ? v.push(N) : p.push(N);
|
|
4509
4500
|
});
|
|
4510
4501
|
const S = this.applyPatch(
|
|
4511
4502
|
y.tracks,
|
|
4512
4503
|
p
|
|
4513
|
-
),
|
|
4504
|
+
), b = this.applyPatch(
|
|
4514
4505
|
y.transitionIds,
|
|
4515
4506
|
m
|
|
4516
4507
|
), w = this.applyPatch(
|
|
4517
4508
|
y.trackItemIds,
|
|
4518
|
-
|
|
4509
|
+
g
|
|
4519
4510
|
), E = this.applyPatch(
|
|
4520
4511
|
y.transitionsMap,
|
|
4521
4512
|
_
|
|
@@ -4530,7 +4521,7 @@ class Co {
|
|
|
4530
4521
|
v
|
|
4531
4522
|
), J = x({
|
|
4532
4523
|
tracks: S,
|
|
4533
|
-
transitionIds:
|
|
4524
|
+
transitionIds: b,
|
|
4534
4525
|
trackItemIds: w,
|
|
4535
4526
|
transitionsMap: E,
|
|
4536
4527
|
trackItemsMap: A,
|
|
@@ -4538,8 +4529,8 @@ class Co {
|
|
|
4538
4529
|
structure: C
|
|
4539
4530
|
}), L = x(this.getState()), Y = { ...L, ...J };
|
|
4540
4531
|
this.prevState = L, this.undos.push({ undos: e, type: s });
|
|
4541
|
-
const
|
|
4542
|
-
this.stateSubject.next({ ...Y, duration:
|
|
4532
|
+
const mt = tt(Y.trackItemsMap);
|
|
4533
|
+
this.stateSubject.next({ ...Y, duration: mt }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(Y, { updateHistory: !1 });
|
|
4543
4534
|
}
|
|
4544
4535
|
toJSON() {
|
|
4545
4536
|
const {
|
|
@@ -4547,7 +4538,7 @@ class Co {
|
|
|
4547
4538
|
tracks: e,
|
|
4548
4539
|
size: s,
|
|
4549
4540
|
trackItemDetailsMap: a,
|
|
4550
|
-
trackItemIds:
|
|
4541
|
+
trackItemIds: o,
|
|
4551
4542
|
transitionsMap: u,
|
|
4552
4543
|
trackItemsMap: c,
|
|
4553
4544
|
transitionIds: f
|
|
@@ -4557,7 +4548,7 @@ class Co {
|
|
|
4557
4548
|
tracks: e,
|
|
4558
4549
|
size: s,
|
|
4559
4550
|
trackItemDetailsMap: a,
|
|
4560
|
-
trackItemIds:
|
|
4551
|
+
trackItemIds: o,
|
|
4561
4552
|
transitionsMap: u,
|
|
4562
4553
|
trackItemsMap: c,
|
|
4563
4554
|
transitionIds: f
|
|
@@ -4568,7 +4559,7 @@ export {
|
|
|
4568
4559
|
ko as ACTIVE_CLONE,
|
|
4569
4560
|
bo as ACTIVE_DELETE,
|
|
4570
4561
|
ba as ACTIVE_PASTE,
|
|
4571
|
-
|
|
4562
|
+
Ae as ACTIVE_PREFIX,
|
|
4572
4563
|
go as ACTIVE_SET,
|
|
4573
4564
|
ka as ACTIVE_SPLIT,
|
|
4574
4565
|
oa as ADD_ANIMATION,
|
|
@@ -4594,17 +4585,17 @@ export {
|
|
|
4594
4585
|
Zs as BULK_PREFIX,
|
|
4595
4586
|
yo as DELETE_TEMPLATE_ITEM,
|
|
4596
4587
|
Qs as DESIGN_LOAD,
|
|
4597
|
-
|
|
4588
|
+
xn as DESIGN_PREFIX,
|
|
4598
4589
|
ta as DESIGN_RESIZE,
|
|
4599
4590
|
ga as EDIT_BACKGROUND_EDITOR,
|
|
4600
|
-
|
|
4591
|
+
Bn as EDIT_BULK,
|
|
4601
4592
|
ya as EDIT_OBJECT,
|
|
4602
|
-
|
|
4593
|
+
Ut as EDIT_PREFIX,
|
|
4603
4594
|
ho as EDIT_SHAPE,
|
|
4604
4595
|
mo as EDIT_TEMPLATE_ITEM,
|
|
4605
4596
|
po as EDIT_TEXT,
|
|
4606
4597
|
Io as ENTER_EDIT_MODE,
|
|
4607
|
-
|
|
4598
|
+
wr as HISTORY_PREFIX,
|
|
4608
4599
|
Ea as HISTORY_REDO,
|
|
4609
4600
|
Oo as HISTORY_RESET,
|
|
4610
4601
|
Ta as HISTORY_UNDO,
|
|
@@ -4628,7 +4619,7 @@ export {
|
|
|
4628
4619
|
co as STATE_CHANGED,
|
|
4629
4620
|
qs as STATE_PREFIX,
|
|
4630
4621
|
Aa as TIMELINE_SCALE_CHANGED,
|
|
4631
|
-
|
|
4622
|
+
cs as TIMELINE_SCALE_PREFIX,
|
|
4632
4623
|
io as TRACKS_CHANGED,
|
|
4633
4624
|
oo as TRACK_ITEMS_CHANGED,
|
|
4634
4625
|
Js as TRACK_ITEMS_PREFIX,
|