@designcombo/state 0.1.6 → 0.1.8

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