@designcombo/state 0.1.34 → 0.1.35

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