canvasengine 2.0.0-beta.31 → 2.0.0-beta.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var fn = (e) => {
5
5
  var Ar = (e, A, t) => A in e ? $o(e, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[A] = t;
6
6
  var Ye = (e, A, t) => Ar(e, typeof A != "symbol" ? A + "" : A, t), dn = (e, A, t) => A.has(e) || fn("Cannot " + t);
7
7
  var PA = (e, A, t) => (dn(e, A, "read from private field"), t ? t.call(e) : A.get(e)), We = (e, A, t) => A.has(e) ? fn("Cannot add the same private member more than once") : A instanceof WeakSet ? A.add(e) : A.set(e, t), Ae = (e, A, t, i) => (dn(e, A, "write to private field"), i ? i.call(e, t) : A.set(e, t), t);
8
- import { Point as J, Rectangle as qA, Sprite as ge, Texture as SA, WRAP_MODES as tr, DisplacementFilter as er, ObservablePoint as ir, BlurFilter as pn, Container as uA, Assets as Bt, Graphics as ss, Mesh as nr, Geometry as sr, Ticker as os, Text as or, TilingSprite as rs, NineSliceSprite as as, DOMContainer as rr, Bounds as ar, ExtensionType as yn, ViewContainer as gs, extensions as ue, AbstractText as Qi, Application as gr, DOMAdapter as hr, ImageSource as Ir, Matrix as lr } from "pixi.js";
8
+ import { Point as J, Rectangle as qA, Sprite as ge, Texture as SA, WRAP_MODES as tr, DisplacementFilter as er, ObservablePoint as ir, BlurFilter as pn, Container as QA, Assets as Bt, Graphics as ss, Mesh as nr, Geometry as sr, Ticker as os, Text as or, TilingSprite as rs, NineSliceSprite as as, DOMContainer as rr, Bounds as ar, ExtensionType as yn, ViewContainer as gs, extensions as Qe, AbstractText as ui, Application as gr, DOMAdapter as hr, ImageSource as Ir, Matrix as lr } from "pixi.js";
9
9
  function cr(e, A) {
10
10
  for (var t = 0; t < A.length; t++) {
11
11
  const i = A[t];
@@ -42,7 +42,7 @@ var oi = function(e, A) {
42
42
  for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]);
43
43
  }, oi(e, A);
44
44
  };
45
- function Qt(e, A) {
45
+ function ut(e, A) {
46
46
  if (typeof A != "function" && A !== null)
47
47
  throw new TypeError("Class extends value " + String(A) + " is not a constructor or null");
48
48
  oi(e, A);
@@ -148,7 +148,7 @@ function Et(e) {
148
148
  };
149
149
  throw new TypeError(A ? "Object is not iterable." : "Symbol.iterator is not defined.");
150
150
  }
151
- function bt(e, A) {
151
+ function Ft(e, A) {
152
152
  var t = typeof Symbol == "function" && e[Symbol.iterator];
153
153
  if (!t) return e;
154
154
  var i = t.call(e), n, r = [], s;
@@ -165,7 +165,7 @@ function bt(e, A) {
165
165
  }
166
166
  return r;
167
167
  }
168
- function Ft(e, A, t) {
168
+ function _t(e, A, t) {
169
169
  if (t || arguments.length === 2) for (var i = 0, n = A.length, r; i < n; i++)
170
170
  (r || !(i in A)) && (r || (r = Array.prototype.slice.call(A, 0, i)), r[i] = A[i]);
171
171
  return e.concat(r || Array.prototype.slice.call(A));
@@ -173,29 +173,29 @@ function Ft(e, A, t) {
173
173
  function ot(e) {
174
174
  return this instanceof ot ? (this.v = e, this) : new ot(e);
175
175
  }
176
- function Qr(e, A, t) {
176
+ function ur(e, A, t) {
177
177
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
178
178
  var i = t.apply(e, A || []), n, r = [];
179
179
  return n = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), g("next"), g("throw"), g("return", s), n[Symbol.asyncIterator] = function() {
180
180
  return this;
181
181
  }, n;
182
182
  function s(l) {
183
- return function(Q) {
184
- return Promise.resolve(Q).then(l, o);
183
+ return function(u) {
184
+ return Promise.resolve(u).then(l, o);
185
185
  };
186
186
  }
187
- function g(l, Q) {
188
- i[l] && (n[l] = function(u) {
187
+ function g(l, u) {
188
+ i[l] && (n[l] = function(Q) {
189
189
  return new Promise(function(d, f) {
190
- r.push([l, u, d, f]) > 1 || h(l, u);
190
+ r.push([l, Q, d, f]) > 1 || h(l, Q);
191
191
  });
192
- }, Q && (n[l] = Q(n[l])));
192
+ }, u && (n[l] = u(n[l])));
193
193
  }
194
- function h(l, Q) {
194
+ function h(l, u) {
195
195
  try {
196
- I(i[l](Q));
197
- } catch (u) {
198
- a(r[0][3], u);
196
+ I(i[l](u));
197
+ } catch (Q) {
198
+ a(r[0][3], Q);
199
199
  }
200
200
  }
201
201
  function I(l) {
@@ -207,11 +207,11 @@ function Qr(e, A, t) {
207
207
  function o(l) {
208
208
  h("throw", l);
209
209
  }
210
- function a(l, Q) {
211
- l(Q), r.shift(), r.length && h(r[0][0], r[0][1]);
210
+ function a(l, u) {
211
+ l(u), r.shift(), r.length && h(r[0][0], r[0][1]);
212
212
  }
213
213
  }
214
- function ur(e) {
214
+ function Qr(e) {
215
215
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
216
216
  var A = e[Symbol.asyncIterator], t;
217
217
  return A ? A.call(e) : (e = typeof Et == "function" ? Et(e) : e[Symbol.iterator](), t = {}, i("next"), i("throw"), i("return"), t[Symbol.asyncIterator] = function() {
@@ -270,8 +270,8 @@ var Ce = function() {
270
270
  var I = h.value;
271
271
  I.remove(this);
272
272
  }
273
- } catch (u) {
274
- A = { error: u };
273
+ } catch (Q) {
274
+ A = { error: Q };
275
275
  } finally {
276
276
  try {
277
277
  h && !h.done && (t = g.return) && t.call(g);
@@ -285,23 +285,23 @@ var Ce = function() {
285
285
  if (W(E))
286
286
  try {
287
287
  E();
288
- } catch (u) {
289
- r = u instanceof Xe ? u.errors : [u];
288
+ } catch (Q) {
289
+ r = Q instanceof Xe ? Q.errors : [Q];
290
290
  }
291
291
  var o = this._finalizers;
292
292
  if (o) {
293
293
  this._finalizers = null;
294
294
  try {
295
295
  for (var a = Et(o), l = a.next(); !l.done; l = a.next()) {
296
- var Q = l.value;
296
+ var u = l.value;
297
297
  try {
298
- wn(Q);
299
- } catch (u) {
300
- r = r ?? [], u instanceof Xe ? r = Ft(Ft([], bt(r)), bt(u.errors)) : r.push(u);
298
+ wn(u);
299
+ } catch (Q) {
300
+ r = r ?? [], Q instanceof Xe ? r = _t(_t([], Ft(r)), Ft(Q.errors)) : r.push(Q);
301
301
  }
302
302
  }
303
- } catch (u) {
304
- i = { error: u };
303
+ } catch (Q) {
304
+ i = { error: Q };
305
305
  } finally {
306
306
  try {
307
307
  l && !l.done && (n = a.return) && n.call(a);
@@ -359,7 +359,7 @@ var Cr = {
359
359
  setTimeout: function(e, A) {
360
360
  for (var t = [], i = 2; i < arguments.length; i++)
361
361
  t[i - 2] = arguments[i];
362
- return setTimeout.apply(void 0, Ft([e, A], bt(t)));
362
+ return setTimeout.apply(void 0, _t([e, A], Ft(t)));
363
363
  },
364
364
  clearTimeout: function(e) {
365
365
  var A = Bs.delegate;
@@ -377,14 +377,14 @@ function mn() {
377
377
  function re(e) {
378
378
  e();
379
379
  }
380
- var ui = function(e) {
381
- Qt(A, e);
380
+ var Qi = function(e) {
381
+ ut(A, e);
382
382
  function A(t) {
383
383
  var i = e.call(this) || this;
384
384
  return i.isStopped = !1, t ? (i.destination = t, cs(t) && t.add(i)) : i.destination = pr, i;
385
385
  }
386
386
  return A.create = function(t, i, n) {
387
- return new _t(t, i, n);
387
+ return new Gt(t, i, n);
388
388
  }, A.prototype.next = function(t) {
389
389
  this.isStopped || this._next(t);
390
390
  }, A.prototype.error = function(t) {
@@ -439,8 +439,8 @@ var ui = function(e) {
439
439
  te(t);
440
440
  }
441
441
  }, e;
442
- }(), _t = function(e) {
443
- Qt(A, e);
442
+ }(), Gt = function(e) {
443
+ ut(A, e);
444
444
  function A(t, i, n) {
445
445
  var r = e.call(this) || this, s;
446
446
  return W(t) || !t ? s = {
@@ -450,7 +450,7 @@ var ui = function(e) {
450
450
  } : s = t, r.destination = new fr(s), r;
451
451
  }
452
452
  return A;
453
- }(ui);
453
+ }(Qi);
454
454
  function te(e) {
455
455
  Es(e);
456
456
  }
@@ -483,7 +483,7 @@ var P = function() {
483
483
  var t = new e();
484
484
  return t.source = this, t.operator = A, t;
485
485
  }, e.prototype.subscribe = function(A, t, i) {
486
- var n = this, r = mr(A) ? A : new _t(A, t, i);
486
+ var n = this, r = mr(A) ? A : new Gt(A, t, i);
487
487
  return re(function() {
488
488
  var s = n, g = s.operator, h = s.source;
489
489
  r.add(g ? g.call(r, h) : h ? n._subscribe(r) : n._trySubscribe(r));
@@ -497,7 +497,7 @@ var P = function() {
497
497
  }, e.prototype.forEach = function(A, t) {
498
498
  var i = this;
499
499
  return t = Dn(t), new t(function(n, r) {
500
- var s = new _t({
500
+ var s = new Gt({
501
501
  next: function(g) {
502
502
  try {
503
503
  A(g);
@@ -543,12 +543,12 @@ function wr(e) {
543
543
  return e && W(e.next) && W(e.error) && W(e.complete);
544
544
  }
545
545
  function mr(e) {
546
- return e && e instanceof ui || wr(e) && cs(e);
546
+ return e && e instanceof Qi || wr(e) && cs(e);
547
547
  }
548
548
  function Dr(e) {
549
549
  return W(e == null ? void 0 : e.lift);
550
550
  }
551
- function ut(e) {
551
+ function Qt(e) {
552
552
  return function(A) {
553
553
  if (Dr(A))
554
554
  return A.lift(function(t) {
@@ -565,7 +565,7 @@ function fe(e, A, t, i, n) {
565
565
  return new vr(e, A, t, i, n);
566
566
  }
567
567
  var vr = function(e) {
568
- Qt(A, e);
568
+ ut(A, e);
569
569
  function A(t, i, n, r, s, g) {
570
570
  var h = e.call(this, t) || this;
571
571
  return h.onFinalize = s, h.shouldUnsubscribe = g, h._next = i ? function(I) {
@@ -599,12 +599,12 @@ var vr = function(e) {
599
599
  e.prototype.unsubscribe.call(this), !i && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
600
600
  }
601
601
  }, A;
602
- }(ui), xr = Is(function(e) {
602
+ }(Qi), xr = Is(function(e) {
603
603
  return function() {
604
604
  e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
605
605
  };
606
- }), Gt = function(e) {
607
- Qt(A, e);
606
+ }), Ht = function(e) {
607
+ ut(A, e);
608
608
  function A() {
609
609
  var t = e.call(this) || this;
610
610
  return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
@@ -683,7 +683,7 @@ var vr = function(e) {
683
683
  return new vn(t, i);
684
684
  }, A;
685
685
  }(P), vn = function(e) {
686
- Qt(A, e);
686
+ ut(A, e);
687
687
  function A(t, i) {
688
688
  var n = e.call(this) || this;
689
689
  return n.destination = t, n.source = i, n;
@@ -701,8 +701,8 @@ var vr = function(e) {
701
701
  var i, n;
702
702
  return (n = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(t)) !== null && n !== void 0 ? n : ls;
703
703
  }, A;
704
- }(Gt), de = function(e) {
705
- Qt(A, e);
704
+ }(Ht), de = function(e) {
705
+ ut(A, e);
706
706
  function A(t) {
707
707
  var i = e.call(this) || this;
708
708
  return i._value = t, i;
@@ -724,20 +724,20 @@ var vr = function(e) {
724
724
  }, A.prototype.next = function(t) {
725
725
  e.prototype.next.call(this, this._value = t);
726
726
  }, A;
727
- }(Gt);
727
+ }(Ht);
728
728
  function Sr(e) {
729
729
  return e && W(e.schedule);
730
730
  }
731
- function Qs(e) {
731
+ function us(e) {
732
732
  return e[e.length - 1];
733
733
  }
734
734
  function Rr(e) {
735
- return W(Qs(e)) ? e.pop() : void 0;
735
+ return W(us(e)) ? e.pop() : void 0;
736
736
  }
737
737
  function kr(e) {
738
- return Sr(Qs(e)) ? e.pop() : void 0;
738
+ return Sr(us(e)) ? e.pop() : void 0;
739
739
  }
740
- var us = function(e) {
740
+ var Qs = function(e) {
741
741
  return e && typeof e.length == "number" && typeof e != "function";
742
742
  };
743
743
  function Cs(e) {
@@ -760,7 +760,7 @@ function ws(e) {
760
760
  return W(e == null ? void 0 : e[ys]);
761
761
  }
762
762
  function ms(e) {
763
- return Qr(this, arguments, function() {
763
+ return ur(this, arguments, function() {
764
764
  var t, i, n, r;
765
765
  return hs(this, function(s) {
766
766
  switch (s.label) {
@@ -799,7 +799,7 @@ function Ct(e) {
799
799
  if (e != null) {
800
800
  if (fs(e))
801
801
  return br(e);
802
- if (us(e))
802
+ if (Qs(e))
803
803
  return Fr(e);
804
804
  if (Cs(e))
805
805
  return _r(e);
@@ -874,7 +874,7 @@ function Nr(e, A) {
874
874
  return hs(this, function(h) {
875
875
  switch (h.label) {
876
876
  case 0:
877
- h.trys.push([0, 5, 6, 11]), t = ur(e), h.label = 1;
877
+ h.trys.push([0, 5, 6, 11]), t = Qr(e), h.label = 1;
878
878
  case 1:
879
879
  return [4, t.next()];
880
880
  case 2:
@@ -914,7 +914,7 @@ function NA(e, A, t, i, n) {
914
914
  return r;
915
915
  }
916
916
  function xs(e, A) {
917
- return A === void 0 && (A = 0), ut(function(t, i) {
917
+ return A === void 0 && (A = 0), Qt(function(t, i) {
918
918
  t.subscribe(fe(i, function(n) {
919
919
  return NA(i, e, function() {
920
920
  return i.next(n);
@@ -931,7 +931,7 @@ function xs(e, A) {
931
931
  });
932
932
  }
933
933
  function Ss(e, A) {
934
- return A === void 0 && (A = 0), ut(function(t, i) {
934
+ return A === void 0 && (A = 0), Qt(function(t, i) {
935
935
  i.add(e.schedule(function() {
936
936
  return t.subscribe(i);
937
937
  }, A));
@@ -991,7 +991,7 @@ function Pr(e, A) {
991
991
  if (e != null) {
992
992
  if (fs(e))
993
993
  return Lr(e, A);
994
- if (us(e))
994
+ if (Qs(e))
995
995
  return Jr(e, A);
996
996
  if (Cs(e))
997
997
  return Ur(e, A);
@@ -1011,7 +1011,7 @@ function BI(e) {
1011
1011
  return !!e && (e instanceof P || W(e.lift) && W(e.subscribe));
1012
1012
  }
1013
1013
  function ks(e, A) {
1014
- return ut(function(t, i) {
1014
+ return Qt(function(t, i) {
1015
1015
  var n = 0;
1016
1016
  t.subscribe(fe(i, function(r) {
1017
1017
  i.next(e.call(A, r, n++));
@@ -1020,7 +1020,7 @@ function ks(e, A) {
1020
1020
  }
1021
1021
  var Tr = Array.isArray;
1022
1022
  function Yr(e, A) {
1023
- return Tr(A) ? e.apply(void 0, Ft([], bt(A))) : e(A);
1023
+ return Tr(A) ? e.apply(void 0, _t([], Ft(A))) : e(A);
1024
1024
  }
1025
1025
  function Wr(e) {
1026
1026
  return ks(function(A) {
@@ -1090,7 +1090,7 @@ function ea(e) {
1090
1090
  });
1091
1091
  }
1092
1092
  function Ms(e, A) {
1093
- return ut(function(t, i) {
1093
+ return Qt(function(t, i) {
1094
1094
  var n = 0;
1095
1095
  t.subscribe(fe(i, function(r) {
1096
1096
  return e.call(A, r, n++) && i.next(r);
@@ -1098,7 +1098,7 @@ function Ms(e, A) {
1098
1098
  });
1099
1099
  }
1100
1100
  function ia(e) {
1101
- return ut(function(A, t) {
1101
+ return Qt(function(A, t) {
1102
1102
  try {
1103
1103
  A.subscribe(t);
1104
1104
  } finally {
@@ -1109,31 +1109,31 @@ function ia(e) {
1109
1109
  function na(e) {
1110
1110
  e === void 0 && (e = {});
1111
1111
  var A = e.connector, t = A === void 0 ? function() {
1112
- return new Gt();
1112
+ return new Ht();
1113
1113
  } : A, i = e.resetOnError, n = i === void 0 ? !0 : i, r = e.resetOnComplete, s = r === void 0 ? !0 : r, g = e.resetOnRefCountZero, h = g === void 0 ? !0 : g;
1114
1114
  return function(I) {
1115
- var E, o, a, l = 0, Q = !1, u = !1, d = function() {
1115
+ var E, o, a, l = 0, u = !1, Q = !1, d = function() {
1116
1116
  o == null || o.unsubscribe(), o = void 0;
1117
1117
  }, f = function() {
1118
- d(), E = a = void 0, Q = u = !1;
1118
+ d(), E = a = void 0, u = Q = !1;
1119
1119
  }, w = function() {
1120
1120
  var x = E;
1121
1121
  f(), x == null || x.unsubscribe();
1122
1122
  };
1123
- return ut(function(x, M) {
1124
- l++, !u && !Q && d();
1123
+ return Qt(function(x, M) {
1124
+ l++, !Q && !u && d();
1125
1125
  var _ = a = a ?? t();
1126
1126
  M.add(function() {
1127
- l--, l === 0 && !u && !Q && (o = qe(w, h));
1128
- }), _.subscribe(M), !E && l > 0 && (E = new _t({
1127
+ l--, l === 0 && !Q && !u && (o = qe(w, h));
1128
+ }), _.subscribe(M), !E && l > 0 && (E = new Gt({
1129
1129
  next: function(L) {
1130
1130
  return _.next(L);
1131
1131
  },
1132
1132
  error: function(L) {
1133
- u = !0, d(), o = qe(f, n, L), _.error(L);
1133
+ Q = !0, d(), o = qe(f, n, L), _.error(L);
1134
1134
  },
1135
1135
  complete: function() {
1136
- Q = !0, d(), o = qe(f, s), _.complete();
1136
+ u = !0, d(), o = qe(f, s), _.complete();
1137
1137
  }
1138
1138
  }), Ct(x).subscribe(E));
1139
1139
  })(I);
@@ -1147,12 +1147,12 @@ function qe(e, A) {
1147
1147
  return;
1148
1148
  }
1149
1149
  if (A !== !1) {
1150
- var n = new _t({
1150
+ var n = new Gt({
1151
1151
  next: function() {
1152
1152
  n.unsubscribe(), e();
1153
1153
  }
1154
1154
  });
1155
- return Ct(A.apply(void 0, Ft([], bt(t)))).subscribe(n);
1155
+ return Ct(A.apply(void 0, _t([], Ft(t)))).subscribe(n);
1156
1156
  }
1157
1157
  }
1158
1158
  function bs() {
@@ -1161,7 +1161,7 @@ function bs() {
1161
1161
  function it() {
1162
1162
  return typeof performance < "u" ? performance.now() : Date.now();
1163
1163
  }
1164
- function xt(e) {
1164
+ function St(e) {
1165
1165
  return 1e3 / e;
1166
1166
  }
1167
1167
  function Ie(e) {
@@ -1241,7 +1241,7 @@ const EI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1241
1241
  arrayEquals: pe,
1242
1242
  calculateDistance: Ns,
1243
1243
  error: di,
1244
- fps2ms: xt,
1244
+ fps2ms: St,
1245
1245
  get: oa,
1246
1246
  isBrowser: bs,
1247
1247
  isFunction: _s,
@@ -1437,7 +1437,7 @@ class ga extends UA {
1437
1437
  const t = A.props.controls.value ?? A.props.controls;
1438
1438
  t && (this.setupListeners(), this.setInputs(t), this.interval = setInterval(() => {
1439
1439
  this.preStep();
1440
- }, xt(this.serverFps ?? 60)));
1440
+ }, St(this.serverFps ?? 60)));
1441
1441
  }
1442
1442
  onMount(A) {
1443
1443
  }
@@ -1934,7 +1934,7 @@ class ha extends UA {
1934
1934
  timestamp: this.timestamp,
1935
1935
  deltaTime: this.deltaTime,
1936
1936
  frame: this.frame,
1937
- deltaRatio: ~~this.deltaTime / ~~xt(this.fps)
1937
+ deltaRatio: ~~this.deltaTime / ~~St(this.fps)
1938
1938
  }), this.lastTimestamp = this.timestamp, this.frame++;
1939
1939
  }
1940
1940
  /**
@@ -1946,10 +1946,10 @@ class ha extends UA {
1946
1946
  const t = (i) => {
1947
1947
  bs() ? window.requestAnimationFrame(i.bind(this)) : setTimeout(() => {
1948
1948
  this.requestedDelay = 0, i(it());
1949
- }, xt(this.fps) + this.requestedDelay);
1949
+ }, St(this.fps) + this.requestedDelay);
1950
1950
  };
1951
1951
  if (this.maxFps) {
1952
- const i = xt(this.maxFps);
1952
+ const i = St(this.maxFps);
1953
1953
  let n = it(), r = it();
1954
1954
  const s = (g) => {
1955
1955
  if (this._stop) return;
@@ -2001,8 +2001,8 @@ var Ia = Object.defineProperty, q = (e, A) => Ia(e, "name", { value: A, configur
2001
2001
  break;
2002
2002
  case "splice":
2003
2003
  I = g[0];
2004
- const Q = g[1], u = g.slice(2);
2005
- o = u, Q > 0 && u.length === 0 ? h = "remove" : Q === 0 && u.length > 0 ? h = "add" : Q === 0 && u.length === 0 ? a = !1 : h = "update", E = !0;
2004
+ const u = g[1], Q = g.slice(2);
2005
+ o = Q, u > 0 && Q.length === 0 ? h = "remove" : u === 0 && Q.length > 0 ? h = "add" : u === 0 && Q.length === 0 ? a = !1 : h = "update", E = !0;
2006
2006
  break;
2007
2007
  }
2008
2008
  const l = s.apply(i, g);
@@ -2038,7 +2038,7 @@ var Ia = Object.defineProperty, q = (e, A) => Ia(e, "name", { value: A, configur
2038
2038
  items: t
2039
2039
  });
2040
2040
  }
2041
- }, q(lt, "ArraySubject"), lt), QI = /* @__PURE__ */ q((e) => "_items" in e, "isArraySubject"), ct, ie = (ct = class extends de {
2041
+ }, q(lt, "ArraySubject"), lt), uI = /* @__PURE__ */ q((e) => "_items" in e, "isArraySubject"), ct, ie = (ct = class extends de {
2042
2042
  constructor(t = {}) {
2043
2043
  super({
2044
2044
  type: "init",
@@ -2081,7 +2081,7 @@ var Ia = Object.defineProperty, q = (e, A) => Ia(e, "name", { value: A, configur
2081
2081
  value: t
2082
2082
  });
2083
2083
  }
2084
- }, q(ct, "ObjectSubject"), ct), uI = /* @__PURE__ */ q((e) => "_obj" in e, "isObjectSubject"), la = /* @__PURE__ */ q(() => {
2084
+ }, q(ct, "ObjectSubject"), ct), QI = /* @__PURE__ */ q((e) => "_obj" in e, "isObjectSubject"), la = /* @__PURE__ */ q(() => {
2085
2085
  const e = "__REACTIVE_STORE__";
2086
2086
  if (typeof globalThis < "u")
2087
2087
  return globalThis[e] || (globalThis[e] = {
@@ -2204,51 +2204,51 @@ function nA(e, A) {
2204
2204
  destroy() {
2205
2205
  tA(this);
2206
2206
  },
2207
- allElements: new Gt()
2207
+ allElements: new Ht()
2208
2208
  };
2209
2209
  if (A) {
2210
2210
  const o = (a, l = "") => {
2211
- const Q = (u, d, f) => {
2212
- if (u == "") {
2211
+ const u = (Q, d, f) => {
2212
+ if (Q == "") {
2213
2213
  i.props[d] = f;
2214
2214
  return;
2215
2215
  }
2216
- ai(i.props, u + "." + d, f);
2216
+ ai(i.props, Q + "." + d, f);
2217
2217
  };
2218
- Object.entries(a).forEach(([u, d]) => {
2218
+ Object.entries(a).forEach(([Q, d]) => {
2219
2219
  if (V(d)) {
2220
2220
  const f = d;
2221
2221
  if ("dependencies" in f && f.dependencies.size == 0) {
2222
- Q(l, u, f());
2222
+ u(l, Q, f());
2223
2223
  return;
2224
2224
  }
2225
2225
  i.propSubscriptions.push(
2226
2226
  f.observable.subscribe((w) => {
2227
2227
  var x, M, _;
2228
- Q(l, u, w), i.directives[u] && ((M = (x = i.directives[u]).onUpdate) == null || M.call(x, w, i)), u != "tick" && ((_ = t.onUpdate) == null || _.call(
2228
+ u(l, Q, w), i.directives[Q] && ((M = (x = i.directives[Q]).onUpdate) == null || M.call(x, w, i)), Q != "tick" && ((_ = t.onUpdate) == null || _.call(
2229
2229
  t,
2230
2230
  l == "" ? {
2231
- [u]: w
2232
- } : ai({}, l + "." + u, w)
2231
+ [Q]: w
2232
+ } : ai({}, l + "." + Q, w)
2233
2233
  ));
2234
2234
  })
2235
2235
  );
2236
2236
  } else
2237
- Gs(d) && u != "context" && !vA(d) ? o(d, (l ? l + "." : "") + u) : Q(l, u, d);
2237
+ Gs(d) && Q != "context" && !vA(d) ? o(d, (l ? l + "." : "") + Q) : u(l, Q, d);
2238
2238
  });
2239
2239
  };
2240
2240
  o(A);
2241
2241
  }
2242
2242
  (h = t.onInit) == null || h.call(t, i.props);
2243
- const n = new Gt();
2243
+ const n = new Ht();
2244
2244
  if (A != null && A.isRoot && (i.allElements = n, i.props.context.rootElement = i, (E = (I = i.componentInstance).onMount) == null || E.call(I, i), s(i)), A)
2245
2245
  for (let o in A) {
2246
2246
  const a = Br(i, o);
2247
2247
  a && (i.directives[o] = a);
2248
2248
  }
2249
2249
  function r(o, a, l) {
2250
- var Q, u, d, f;
2251
- a.props.context = o.props.context, a.parent = o, (u = (Q = a.componentInstance).onMount) == null || u.call(Q, a, l);
2250
+ var u, Q, d, f;
2251
+ a.props.context = o.props.context, a.parent = o, (Q = (u = a.componentInstance).onMount) == null || Q.call(u, a, l);
2252
2252
  for (let w in a.directives)
2253
2253
  (f = (d = a.directives[w]).onMount) == null || f.call(d, a);
2254
2254
  a.effectMounts.forEach((w) => {
@@ -2257,13 +2257,13 @@ function nA(e, A) {
2257
2257
  }
2258
2258
  async function s(o) {
2259
2259
  var a;
2260
- if (o.props.attach && (V((a = o.propObservables) == null ? void 0 : a.attach) ? await new Promise((Q) => {
2261
- let u = null;
2260
+ if (o.props.attach && (V((a = o.propObservables) == null ? void 0 : a.attach) ? await new Promise((u) => {
2261
+ let Q = null;
2262
2262
  o.propSubscriptions.push(o.propObservables.attach.observable.subscribe(async (d) => {
2263
2263
  const f = (d == null ? void 0 : d.value) ?? d;
2264
2264
  if (!f)
2265
2265
  throw new Error(`attach in ${o.tag} is undefined or null, add a component`);
2266
- u && tA(u), u = f, await g(o, f), Q(void 0);
2266
+ Q && tA(Q), Q = f, await g(o, f), u(void 0);
2267
2267
  }));
2268
2268
  }) : o.props.children.push(o.props.attach)), !!o.props.children)
2269
2269
  for (let l of o.props.children)
@@ -2272,12 +2272,12 @@ function nA(e, A) {
2272
2272
  async function g(o, a) {
2273
2273
  if (Ie(a) && (a = await a), a instanceof P) {
2274
2274
  const l = a.subscribe(
2275
- (Q) => {
2276
- if (Q && typeof Q == "object" && "elements" in Q) {
2275
+ (u) => {
2276
+ if (u && typeof u == "object" && "elements" in u) {
2277
2277
  const {
2278
- elements: u,
2278
+ elements: Q,
2279
2279
  prev: d
2280
- } = Q, f = u.filter((w) => w !== null);
2280
+ } = u, f = Q.filter((w) => w !== null);
2281
2281
  if (d) {
2282
2282
  f.forEach(async (w) => {
2283
2283
  const x = o.props.children.indexOf(d.props.key);
@@ -2290,8 +2290,8 @@ function nA(e, A) {
2290
2290
  x instanceof P ? await g(o, x) : vA(x) && (r(o, x), s(x));
2291
2291
  }) : w instanceof P ? await g(o, w) : vA(w) && (r(o, w), s(w));
2292
2292
  });
2293
- } else vA(Q) ? (r(o, Q), s(Q)) : Array.isArray(Q) && Q.forEach(async (u) => {
2294
- u instanceof P ? await g(o, u) : vA(u) && (r(o, u), s(u));
2293
+ } else vA(u) ? (r(o, u), s(u)) : Array.isArray(u) && u.forEach(async (Q) => {
2294
+ Q instanceof P ? await g(o, Q) : vA(Q) && (r(o, Q), s(Q));
2295
2295
  });
2296
2296
  n.next(void 0);
2297
2297
  }
@@ -2417,34 +2417,34 @@ function fI(e, A, ...t) {
2417
2417
  return new P((I) => {
2418
2418
  const E = [], o = () => {
2419
2419
  let a = -1;
2420
- for (let u = 0; u < h.length; u++) {
2421
- const d = h[u].condition;
2420
+ for (let Q = 0; Q < h.length; Q++) {
2421
+ const d = h[Q].condition;
2422
2422
  if (d()) {
2423
- a = u;
2423
+ a = Q;
2424
2424
  break;
2425
2425
  }
2426
2426
  }
2427
- const l = a === -1 && s, Q = l ? -2 : a;
2428
- if (Q !== n)
2429
- if (i && (tA(i), i = null), n = Q, l) {
2430
- let u = s();
2431
- Ie(u) ? he(u).subscribe((d) => {
2427
+ const l = a === -1 && s, u = l ? -2 : a;
2428
+ if (u !== n)
2429
+ if (i && (tA(i), i = null), n = u, l) {
2430
+ let Q = s();
2431
+ Ie(Q) ? he(Q).subscribe((d) => {
2432
2432
  i = d, I.next({
2433
2433
  type: "init",
2434
2434
  elements: [d]
2435
2435
  });
2436
- }) : (i = u, I.next({
2436
+ }) : (i = Q, I.next({
2437
2437
  type: "init",
2438
2438
  elements: [i]
2439
2439
  }));
2440
2440
  } else if (a >= 0) {
2441
- let u = h[a].elementFn();
2442
- Ie(u) ? he(u).subscribe((d) => {
2441
+ let Q = h[a].elementFn();
2442
+ Ie(Q) ? he(Q).subscribe((d) => {
2443
2443
  i = d, I.next({
2444
2444
  type: "init",
2445
2445
  elements: [d]
2446
2446
  });
2447
- }) : (i = u, I.next({
2447
+ }) : (i = Q, I.next({
2448
2448
  type: "init",
2449
2449
  elements: [i]
2450
2450
  }));
@@ -2544,11 +2544,11 @@ class ca extends UA {
2544
2544
  }
2545
2545
  }
2546
2546
  JA("viewportFollow", ca);
2547
- var mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2547
+ var Dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2548
2548
  function Ba(e) {
2549
2549
  return e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2550
2550
  }
2551
- var Lt = {};
2551
+ var ft = {};
2552
2552
  /*!
2553
2553
  * howler.js v2.2.4
2554
2554
  * howlerjs.com
@@ -2585,8 +2585,8 @@ var Lt = {};
2585
2585
  a.usingWebAudio && a.masterGain.gain.setValueAtTime(o, t.ctx.currentTime);
2586
2586
  for (var l = 0; l < a._howls.length; l++)
2587
2587
  if (!a._howls[l]._webAudio)
2588
- for (var Q = a._howls[l]._getSoundIds(), u = 0; u < Q.length; u++) {
2589
- var d = a._howls[l]._soundById(Q[u]);
2588
+ for (var u = a._howls[l]._getSoundIds(), Q = 0; Q < u.length; Q++) {
2589
+ var d = a._howls[l]._soundById(u[Q]);
2590
2590
  d && d._node && (d._node.volume = d._volume * o);
2591
2591
  }
2592
2592
  return a;
@@ -2602,8 +2602,8 @@ var Lt = {};
2602
2602
  a.ctx || E(), a._muted = o, a.usingWebAudio && a.masterGain.gain.setValueAtTime(o ? 0 : a._volume, t.ctx.currentTime);
2603
2603
  for (var l = 0; l < a._howls.length; l++)
2604
2604
  if (!a._howls[l]._webAudio)
2605
- for (var Q = a._howls[l]._getSoundIds(), u = 0; u < Q.length; u++) {
2606
- var d = a._howls[l]._soundById(Q[u]);
2605
+ for (var u = a._howls[l]._getSoundIds(), Q = 0; Q < u.length; Q++) {
2606
+ var d = a._howls[l]._soundById(u[Q]);
2607
2607
  d && d._node && (d._node.muted = o ? !0 : d._muted);
2608
2608
  }
2609
2609
  return a;
@@ -2669,7 +2669,7 @@ var Lt = {};
2669
2669
  }
2670
2670
  if (!a || typeof a.canPlayType != "function")
2671
2671
  return o;
2672
- var l = a.canPlayType("audio/mpeg;").replace(/^no$/, ""), Q = o._navigator ? o._navigator.userAgent : "", u = Q.match(/OPR\/(\d+)/g), d = u && parseInt(u[0].split("/")[1], 10) < 33, f = Q.indexOf("Safari") !== -1 && Q.indexOf("Chrome") === -1, w = Q.match(/Version\/(.*?) /), x = f && w && parseInt(w[1], 10) < 15;
2672
+ var l = a.canPlayType("audio/mpeg;").replace(/^no$/, ""), u = o._navigator ? o._navigator.userAgent : "", Q = u.match(/OPR\/(\d+)/g), d = Q && parseInt(Q[0].split("/")[1], 10) < 33, f = u.indexOf("Safari") !== -1 && u.indexOf("Chrome") === -1, w = u.match(/Version\/(.*?) /), x = f && w && parseInt(w[1], 10) < 15;
2673
2673
  return o._codecs = {
2674
2674
  mp3: !!(!d && (l || a.canPlayType("audio/mp3;").replace(/^no$/, ""))),
2675
2675
  mpeg: !!l,
@@ -2701,16 +2701,16 @@ var Lt = {};
2701
2701
  var a = function(l) {
2702
2702
  for (; o._html5AudioPool.length < o.html5PoolSize; )
2703
2703
  try {
2704
- var Q = new Audio();
2705
- Q._unlocked = !0, o._releaseHtml5Audio(Q);
2704
+ var u = new Audio();
2705
+ u._unlocked = !0, o._releaseHtml5Audio(u);
2706
2706
  } catch {
2707
2707
  o.noAudio = !0;
2708
2708
  break;
2709
2709
  }
2710
- for (var u = 0; u < o._howls.length; u++)
2711
- if (!o._howls[u]._webAudio)
2712
- for (var d = o._howls[u]._getSoundIds(), f = 0; f < d.length; f++) {
2713
- var w = o._howls[u]._soundById(d[f]);
2710
+ for (var Q = 0; Q < o._howls.length; Q++)
2711
+ if (!o._howls[Q]._webAudio)
2712
+ for (var d = o._howls[Q]._getSoundIds(), f = 0; f < d.length; f++) {
2713
+ var w = o._howls[Q]._soundById(d[f]);
2714
2714
  w && w._node && !w._node._unlocked && (w._node._unlocked = !0, w._node.load());
2715
2715
  }
2716
2716
  o._autoResume();
@@ -2763,10 +2763,10 @@ var Lt = {};
2763
2763
  return o._suspendTimer && clearTimeout(o._suspendTimer), o._suspendTimer = setTimeout(function() {
2764
2764
  if (o.autoSuspend) {
2765
2765
  o._suspendTimer = null, o.state = "suspending";
2766
- var Q = function() {
2766
+ var u = function() {
2767
2767
  o.state = "suspended", o._resumeAfterSuspend && (delete o._resumeAfterSuspend, o._autoResume());
2768
2768
  };
2769
- o.ctx.suspend().then(Q, Q);
2769
+ o.ctx.suspend().then(u, u);
2770
2770
  }
2771
2771
  }, 3e4), o;
2772
2772
  }
@@ -2824,17 +2824,17 @@ var Lt = {};
2824
2824
  }
2825
2825
  typeof o._src == "string" && (o._src = [o._src]);
2826
2826
  for (var l = 0; l < o._src.length; l++) {
2827
- var Q, u;
2827
+ var u, Q;
2828
2828
  if (o._format && o._format[l])
2829
- Q = o._format[l];
2829
+ u = o._format[l];
2830
2830
  else {
2831
- if (u = o._src[l], typeof u != "string") {
2831
+ if (Q = o._src[l], typeof Q != "string") {
2832
2832
  o._emit("loaderror", null, "Non-string found in selected audio sources - ignoring.");
2833
2833
  continue;
2834
2834
  }
2835
- Q = /^data:audio\/([^;,]+);/i.exec(u), Q || (Q = /\.([^.]+)$/.exec(u.split("?", 1)[0])), Q && (Q = Q[1].toLowerCase());
2835
+ u = /^data:audio\/([^;,]+);/i.exec(Q), u || (u = /\.([^.]+)$/.exec(Q.split("?", 1)[0])), u && (u = u[1].toLowerCase());
2836
2836
  }
2837
- if (Q || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), Q && t.codecs(Q)) {
2837
+ if (u || console.warn('No file extension was found. Consider using the "format" property or specify an extension.'), u && t.codecs(u)) {
2838
2838
  a = o._src[l];
2839
2839
  break;
2840
2840
  }
@@ -2852,22 +2852,22 @@ var Lt = {};
2852
2852
  * @return {Number} Sound ID.
2853
2853
  */
2854
2854
  play: function(o, a) {
2855
- var l = this, Q = null;
2855
+ var l = this, u = null;
2856
2856
  if (typeof o == "number")
2857
- Q = o, o = null;
2857
+ u = o, o = null;
2858
2858
  else {
2859
2859
  if (typeof o == "string" && l._state === "loaded" && !l._sprite[o])
2860
2860
  return null;
2861
2861
  if (typeof o > "u" && (o = "__default", !l._playLock)) {
2862
- for (var u = 0, d = 0; d < l._sounds.length; d++)
2863
- l._sounds[d]._paused && !l._sounds[d]._ended && (u++, Q = l._sounds[d]._id);
2864
- u === 1 ? o = null : Q = null;
2862
+ for (var Q = 0, d = 0; d < l._sounds.length; d++)
2863
+ l._sounds[d]._paused && !l._sounds[d]._ended && (Q++, u = l._sounds[d]._id);
2864
+ Q === 1 ? o = null : u = null;
2865
2865
  }
2866
2866
  }
2867
- var f = Q ? l._soundById(Q) : l._inactiveSound();
2867
+ var f = u ? l._soundById(u) : l._inactiveSound();
2868
2868
  if (!f)
2869
2869
  return null;
2870
- if (Q && !o && (o = f._sprite || "__default"), l._state !== "loaded") {
2870
+ if (u && !o && (o = f._sprite || "__default"), l._state !== "loaded") {
2871
2871
  f._sprite = o, f._ended = !1;
2872
2872
  var w = f._id;
2873
2873
  return l._queue.push({
@@ -2877,7 +2877,7 @@ var Lt = {};
2877
2877
  }
2878
2878
  }), w;
2879
2879
  }
2880
- if (Q && !f._paused)
2880
+ if (u && !f._paused)
2881
2881
  return a || l._loadQueue("play"), f._id;
2882
2882
  l._webAudio && t._autoResume();
2883
2883
  var x = Math.max(0, f._seek > 0 ? f._seek : l._sprite[o][0] / 1e3), M = Math.max(0, (l._sprite[o][0] + l._sprite[o][1]) / 1e3 - x), _ = M * 1e3 / Math.abs(f._rate), L = l._sprite[o][0] / 1e3, z = (l._sprite[o][0] + l._sprite[o][1]) / 1e3;
@@ -2947,16 +2947,16 @@ var Lt = {};
2947
2947
  a.pause(o);
2948
2948
  }
2949
2949
  }), a;
2950
- for (var l = a._getSoundIds(o), Q = 0; Q < l.length; Q++) {
2951
- a._clearTimer(l[Q]);
2952
- var u = a._soundById(l[Q]);
2953
- if (u && !u._paused && (u._seek = a.seek(l[Q]), u._rateSeek = 0, u._paused = !0, a._stopFade(l[Q]), u._node))
2950
+ for (var l = a._getSoundIds(o), u = 0; u < l.length; u++) {
2951
+ a._clearTimer(l[u]);
2952
+ var Q = a._soundById(l[u]);
2953
+ if (Q && !Q._paused && (Q._seek = a.seek(l[u]), Q._rateSeek = 0, Q._paused = !0, a._stopFade(l[u]), Q._node))
2954
2954
  if (a._webAudio) {
2955
- if (!u._node.bufferSource)
2955
+ if (!Q._node.bufferSource)
2956
2956
  continue;
2957
- typeof u._node.bufferSource.stop > "u" ? u._node.bufferSource.noteOff(0) : u._node.bufferSource.stop(0), a._cleanBuffer(u._node);
2958
- } else (!isNaN(u._node.duration) || u._node.duration === 1 / 0) && u._node.pause();
2959
- arguments[1] || a._emit("pause", u ? u._id : null);
2957
+ typeof Q._node.bufferSource.stop > "u" ? Q._node.bufferSource.noteOff(0) : Q._node.bufferSource.stop(0), a._cleanBuffer(Q._node);
2958
+ } else (!isNaN(Q._node.duration) || Q._node.duration === 1 / 0) && Q._node.pause();
2959
+ arguments[1] || a._emit("pause", Q ? Q._id : null);
2960
2960
  }
2961
2961
  return a;
2962
2962
  },
@@ -2975,10 +2975,10 @@ var Lt = {};
2975
2975
  l.stop(o);
2976
2976
  }
2977
2977
  }), l;
2978
- for (var Q = l._getSoundIds(o), u = 0; u < Q.length; u++) {
2979
- l._clearTimer(Q[u]);
2980
- var d = l._soundById(Q[u]);
2981
- d && (d._seek = d._start || 0, d._rateSeek = 0, d._paused = !0, d._ended = !0, l._stopFade(Q[u]), d._node && (l._webAudio ? d._node.bufferSource && (typeof d._node.bufferSource.stop > "u" ? d._node.bufferSource.noteOff(0) : d._node.bufferSource.stop(0), l._cleanBuffer(d._node)) : (!isNaN(d._node.duration) || d._node.duration === 1 / 0) && (d._node.currentTime = d._start || 0, d._node.pause(), d._node.duration === 1 / 0 && l._clearSound(d._node))), a || l._emit("stop", d._id));
2978
+ for (var u = l._getSoundIds(o), Q = 0; Q < u.length; Q++) {
2979
+ l._clearTimer(u[Q]);
2980
+ var d = l._soundById(u[Q]);
2981
+ d && (d._seek = d._start || 0, d._rateSeek = 0, d._paused = !0, d._ended = !0, l._stopFade(u[Q]), d._node && (l._webAudio ? d._node.bufferSource && (typeof d._node.bufferSource.stop > "u" ? d._node.bufferSource.noteOff(0) : d._node.bufferSource.stop(0), l._cleanBuffer(d._node)) : (!isNaN(d._node.duration) || d._node.duration === 1 / 0) && (d._node.currentTime = d._start || 0, d._node.pause(), d._node.duration === 1 / 0 && l._clearSound(d._node))), a || l._emit("stop", d._id));
2982
2982
  }
2983
2983
  return l;
2984
2984
  },
@@ -3002,8 +3002,8 @@ var Lt = {};
3002
3002
  l._muted = o;
3003
3003
  else
3004
3004
  return l._muted;
3005
- for (var Q = l._getSoundIds(a), u = 0; u < Q.length; u++) {
3006
- var d = l._soundById(Q[u]);
3005
+ for (var u = l._getSoundIds(a), Q = 0; Q < u.length; Q++) {
3006
+ var d = l._soundById(u[Q]);
3007
3007
  d && (d._muted = o, d._interval && l._stopFade(d._id), l._webAudio && d._node ? d._node.gain.setValueAtTime(o ? 0 : d._volume, t.ctx.currentTime) : d._node && (d._node.muted = t._muted ? !0 : o), l._emit("mute", d._id));
3008
3008
  }
3009
3009
  return l;
@@ -3017,13 +3017,13 @@ var Lt = {};
3017
3017
  * @return {Howl/Number} Returns self or current volume.
3018
3018
  */
3019
3019
  volume: function() {
3020
- var o = this, a = arguments, l, Q;
3020
+ var o = this, a = arguments, l, u;
3021
3021
  if (a.length === 0)
3022
3022
  return o._volume;
3023
3023
  if (a.length === 1 || a.length === 2 && typeof a[1] > "u") {
3024
- var u = o._getSoundIds(), d = u.indexOf(a[0]);
3025
- d >= 0 ? Q = parseInt(a[0], 10) : l = parseFloat(a[0]);
3026
- } else a.length >= 2 && (l = parseFloat(a[0]), Q = parseInt(a[1], 10));
3024
+ var Q = o._getSoundIds(), d = Q.indexOf(a[0]);
3025
+ d >= 0 ? u = parseInt(a[0], 10) : l = parseFloat(a[0]);
3026
+ } else a.length >= 2 && (l = parseFloat(a[0]), u = parseInt(a[1], 10));
3027
3027
  var f;
3028
3028
  if (typeof l < "u" && l >= 0 && l <= 1) {
3029
3029
  if (o._state !== "loaded" || o._playLock)
@@ -3033,11 +3033,11 @@ var Lt = {};
3033
3033
  o.volume.apply(o, a);
3034
3034
  }
3035
3035
  }), o;
3036
- typeof Q > "u" && (o._volume = l), Q = o._getSoundIds(Q);
3037
- for (var w = 0; w < Q.length; w++)
3038
- f = o._soundById(Q[w]), f && (f._volume = l, a[2] || o._stopFade(Q[w]), o._webAudio && f._node && !f._muted ? f._node.gain.setValueAtTime(l, t.ctx.currentTime) : f._node && !f._muted && (f._node.volume = l * t.volume()), o._emit("volume", f._id));
3036
+ typeof u > "u" && (o._volume = l), u = o._getSoundIds(u);
3037
+ for (var w = 0; w < u.length; w++)
3038
+ f = o._soundById(u[w]), f && (f._volume = l, a[2] || o._stopFade(u[w]), o._webAudio && f._node && !f._muted ? f._node.gain.setValueAtTime(l, t.ctx.currentTime) : f._node && !f._muted && (f._node.volume = l * t.volume()), o._emit("volume", f._id));
3039
3039
  } else
3040
- return f = Q ? o._soundById(Q) : o._sounds[0], f ? f._volume : 0;
3040
+ return f = u ? o._soundById(u) : o._sounds[0], f ? f._volume : 0;
3041
3041
  return o;
3042
3042
  },
3043
3043
  /**
@@ -3048,27 +3048,27 @@ var Lt = {};
3048
3048
  * @param {Number} id The sound id (omit to fade all sounds).
3049
3049
  * @return {Howl}
3050
3050
  */
3051
- fade: function(o, a, l, Q) {
3052
- var u = this;
3053
- if (u._state !== "loaded" || u._playLock)
3054
- return u._queue.push({
3051
+ fade: function(o, a, l, u) {
3052
+ var Q = this;
3053
+ if (Q._state !== "loaded" || Q._playLock)
3054
+ return Q._queue.push({
3055
3055
  event: "fade",
3056
3056
  action: function() {
3057
- u.fade(o, a, l, Q);
3057
+ Q.fade(o, a, l, u);
3058
3058
  }
3059
- }), u;
3060
- o = Math.min(Math.max(0, parseFloat(o)), 1), a = Math.min(Math.max(0, parseFloat(a)), 1), l = parseFloat(l), u.volume(o, Q);
3061
- for (var d = u._getSoundIds(Q), f = 0; f < d.length; f++) {
3062
- var w = u._soundById(d[f]);
3059
+ }), Q;
3060
+ o = Math.min(Math.max(0, parseFloat(o)), 1), a = Math.min(Math.max(0, parseFloat(a)), 1), l = parseFloat(l), Q.volume(o, u);
3061
+ for (var d = Q._getSoundIds(u), f = 0; f < d.length; f++) {
3062
+ var w = Q._soundById(d[f]);
3063
3063
  if (w) {
3064
- if (Q || u._stopFade(d[f]), u._webAudio && !w._muted) {
3064
+ if (u || Q._stopFade(d[f]), Q._webAudio && !w._muted) {
3065
3065
  var x = t.ctx.currentTime, M = x + l / 1e3;
3066
3066
  w._volume = o, w._node.gain.setValueAtTime(o, x), w._node.gain.linearRampToValueAtTime(a, M);
3067
3067
  }
3068
- u._startFadeInterval(w, o, a, l, d[f], typeof Q > "u");
3068
+ Q._startFadeInterval(w, o, a, l, d[f], typeof u > "u");
3069
3069
  }
3070
3070
  }
3071
- return u;
3071
+ return Q;
3072
3072
  },
3073
3073
  /**
3074
3074
  * Starts the internal interval to fade a sound.
@@ -3079,10 +3079,10 @@ var Lt = {};
3079
3079
  * @param {Number} id The sound id to fade.
3080
3080
  * @param {Boolean} isGroup If true, set the volume on the group.
3081
3081
  */
3082
- _startFadeInterval: function(o, a, l, Q, u, d) {
3083
- var f = this, w = a, x = l - a, M = Math.abs(x / 0.01), _ = Math.max(4, M > 0 ? Q / M : Q), L = Date.now();
3082
+ _startFadeInterval: function(o, a, l, u, Q, d) {
3083
+ var f = this, w = a, x = l - a, M = Math.abs(x / 0.01), _ = Math.max(4, M > 0 ? u / M : u), L = Date.now();
3084
3084
  o._fadeTo = l, o._interval = setInterval(function() {
3085
- var z = (Date.now() - L) / Q;
3085
+ var z = (Date.now() - L) / u;
3086
3086
  L = Date.now(), w += x * z, w = Math.round(w * 100) / 100, x < 0 ? w = Math.max(l, w) : w = Math.min(l, w), f._webAudio ? o._volume = w : f.volume(w, o._id, !0), d && (f._volume = w), (l < a && w <= l || l > a && w >= l) && (clearInterval(o._interval), o._interval = null, o._fadeTo = null, f.volume(l, o._id), f._emit("fade", o._id));
3087
3087
  }, _);
3088
3088
  },
@@ -3105,17 +3105,17 @@ var Lt = {};
3105
3105
  * @return {Howl/Boolean} Returns self or current loop value.
3106
3106
  */
3107
3107
  loop: function() {
3108
- var o = this, a = arguments, l, Q, u;
3108
+ var o = this, a = arguments, l, u, Q;
3109
3109
  if (a.length === 0)
3110
3110
  return o._loop;
3111
3111
  if (a.length === 1)
3112
3112
  if (typeof a[0] == "boolean")
3113
3113
  l = a[0], o._loop = l;
3114
3114
  else
3115
- return u = o._soundById(parseInt(a[0], 10)), u ? u._loop : !1;
3116
- else a.length === 2 && (l = a[0], Q = parseInt(a[1], 10));
3117
- for (var d = o._getSoundIds(Q), f = 0; f < d.length; f++)
3118
- u = o._soundById(d[f]), u && (u._loop = l, o._webAudio && u._node && u._node.bufferSource && (u._node.bufferSource.loop = l, l && (u._node.bufferSource.loopStart = u._start || 0, u._node.bufferSource.loopEnd = u._stop, o.playing(d[f]) && (o.pause(d[f], !0), o.play(d[f], !0)))));
3115
+ return Q = o._soundById(parseInt(a[0], 10)), Q ? Q._loop : !1;
3116
+ else a.length === 2 && (l = a[0], u = parseInt(a[1], 10));
3117
+ for (var d = o._getSoundIds(u), f = 0; f < d.length; f++)
3118
+ Q = o._soundById(d[f]), Q && (Q._loop = l, o._webAudio && Q._node && Q._node.bufferSource && (Q._node.bufferSource.loop = l, l && (Q._node.bufferSource.loopStart = Q._start || 0, Q._node.bufferSource.loopEnd = Q._stop, o.playing(d[f]) && (o.pause(d[f], !0), o.play(d[f], !0)))));
3119
3119
  return o;
3120
3120
  },
3121
3121
  /**
@@ -3127,13 +3127,13 @@ var Lt = {};
3127
3127
  * @return {Howl/Number} Returns self or the current playback rate.
3128
3128
  */
3129
3129
  rate: function() {
3130
- var o = this, a = arguments, l, Q;
3130
+ var o = this, a = arguments, l, u;
3131
3131
  if (a.length === 0)
3132
- Q = o._sounds[0]._id;
3132
+ u = o._sounds[0]._id;
3133
3133
  else if (a.length === 1) {
3134
- var u = o._getSoundIds(), d = u.indexOf(a[0]);
3135
- d >= 0 ? Q = parseInt(a[0], 10) : l = parseFloat(a[0]);
3136
- } else a.length === 2 && (l = parseFloat(a[0]), Q = parseInt(a[1], 10));
3134
+ var Q = o._getSoundIds(), d = Q.indexOf(a[0]);
3135
+ d >= 0 ? u = parseInt(a[0], 10) : l = parseFloat(a[0]);
3136
+ } else a.length === 2 && (l = parseFloat(a[0]), u = parseInt(a[1], 10));
3137
3137
  var f;
3138
3138
  if (typeof l == "number") {
3139
3139
  if (o._state !== "loaded" || o._playLock)
@@ -3143,15 +3143,15 @@ var Lt = {};
3143
3143
  o.rate.apply(o, a);
3144
3144
  }
3145
3145
  }), o;
3146
- typeof Q > "u" && (o._rate = l), Q = o._getSoundIds(Q);
3147
- for (var w = 0; w < Q.length; w++)
3148
- if (f = o._soundById(Q[w]), f) {
3149
- o.playing(Q[w]) && (f._rateSeek = o.seek(Q[w]), f._playStart = o._webAudio ? t.ctx.currentTime : f._playStart), f._rate = l, o._webAudio && f._node && f._node.bufferSource ? f._node.bufferSource.playbackRate.setValueAtTime(l, t.ctx.currentTime) : f._node && (f._node.playbackRate = l);
3150
- var x = o.seek(Q[w]), M = (o._sprite[f._sprite][0] + o._sprite[f._sprite][1]) / 1e3 - x, _ = M * 1e3 / Math.abs(f._rate);
3151
- (o._endTimers[Q[w]] || !f._paused) && (o._clearTimer(Q[w]), o._endTimers[Q[w]] = setTimeout(o._ended.bind(o, f), _)), o._emit("rate", f._id);
3146
+ typeof u > "u" && (o._rate = l), u = o._getSoundIds(u);
3147
+ for (var w = 0; w < u.length; w++)
3148
+ if (f = o._soundById(u[w]), f) {
3149
+ o.playing(u[w]) && (f._rateSeek = o.seek(u[w]), f._playStart = o._webAudio ? t.ctx.currentTime : f._playStart), f._rate = l, o._webAudio && f._node && f._node.bufferSource ? f._node.bufferSource.playbackRate.setValueAtTime(l, t.ctx.currentTime) : f._node && (f._node.playbackRate = l);
3150
+ var x = o.seek(u[w]), M = (o._sprite[f._sprite][0] + o._sprite[f._sprite][1]) / 1e3 - x, _ = M * 1e3 / Math.abs(f._rate);
3151
+ (o._endTimers[u[w]] || !f._paused) && (o._clearTimer(u[w]), o._endTimers[u[w]] = setTimeout(o._ended.bind(o, f), _)), o._emit("rate", f._id);
3152
3152
  }
3153
3153
  } else
3154
- return f = o._soundById(Q), f ? f._rate : o._rate;
3154
+ return f = o._soundById(u), f ? f._rate : o._rate;
3155
3155
  return o;
3156
3156
  },
3157
3157
  /**
@@ -3163,14 +3163,14 @@ var Lt = {};
3163
3163
  * @return {Howl/Number} Returns self or the current seek position.
3164
3164
  */
3165
3165
  seek: function() {
3166
- var o = this, a = arguments, l, Q;
3166
+ var o = this, a = arguments, l, u;
3167
3167
  if (a.length === 0)
3168
- o._sounds.length && (Q = o._sounds[0]._id);
3168
+ o._sounds.length && (u = o._sounds[0]._id);
3169
3169
  else if (a.length === 1) {
3170
- var u = o._getSoundIds(), d = u.indexOf(a[0]);
3171
- d >= 0 ? Q = parseInt(a[0], 10) : o._sounds.length && (Q = o._sounds[0]._id, l = parseFloat(a[0]));
3172
- } else a.length === 2 && (l = parseFloat(a[0]), Q = parseInt(a[1], 10));
3173
- if (typeof Q > "u")
3170
+ var Q = o._getSoundIds(), d = Q.indexOf(a[0]);
3171
+ d >= 0 ? u = parseInt(a[0], 10) : o._sounds.length && (u = o._sounds[0]._id, l = parseFloat(a[0]));
3172
+ } else a.length === 2 && (l = parseFloat(a[0]), u = parseInt(a[1], 10));
3173
+ if (typeof u > "u")
3174
3174
  return 0;
3175
3175
  if (typeof l == "number" && (o._state !== "loaded" || o._playLock))
3176
3176
  return o._queue.push({
@@ -3179,13 +3179,13 @@ var Lt = {};
3179
3179
  o.seek.apply(o, a);
3180
3180
  }
3181
3181
  }), o;
3182
- var f = o._soundById(Q);
3182
+ var f = o._soundById(u);
3183
3183
  if (f)
3184
3184
  if (typeof l == "number" && l >= 0) {
3185
- var w = o.playing(Q);
3186
- w && o.pause(Q, !0), f._seek = l, f._ended = !1, o._clearTimer(Q), !o._webAudio && f._node && !isNaN(f._node.duration) && (f._node.currentTime = l);
3185
+ var w = o.playing(u);
3186
+ w && o.pause(u, !0), f._seek = l, f._ended = !1, o._clearTimer(u), !o._webAudio && f._node && !isNaN(f._node.duration) && (f._node.currentTime = l);
3187
3187
  var x = function() {
3188
- w && o.play(Q, !0), o._emit("seek", Q);
3188
+ w && o.play(u, !0), o._emit("seek", u);
3189
3189
  };
3190
3190
  if (w && !o._webAudio) {
3191
3191
  var M = function() {
@@ -3195,7 +3195,7 @@ var Lt = {};
3195
3195
  } else
3196
3196
  x();
3197
3197
  } else if (o._webAudio) {
3198
- var _ = o.playing(Q) ? t.ctx.currentTime - f._playStart : 0, L = f._rateSeek ? f._rateSeek - f._seek : 0;
3198
+ var _ = o.playing(u) ? t.ctx.currentTime - f._playStart : 0, L = f._rateSeek ? f._rateSeek - f._seek : 0;
3199
3199
  return f._seek + (L + _ * Math.abs(f._rate));
3200
3200
  } else
3201
3201
  return f._node.currentTime;
@@ -3212,8 +3212,8 @@ var Lt = {};
3212
3212
  var l = a._soundById(o);
3213
3213
  return l ? !l._paused : !1;
3214
3214
  }
3215
- for (var Q = 0; Q < a._sounds.length; Q++)
3216
- if (!a._sounds[Q]._paused)
3215
+ for (var u = 0; u < a._sounds.length; u++)
3216
+ if (!a._sounds[u]._paused)
3217
3217
  return !0;
3218
3218
  return !1;
3219
3219
  },
@@ -3223,8 +3223,8 @@ var Lt = {};
3223
3223
  * @return {Number} Audio duration in seconds.
3224
3224
  */
3225
3225
  duration: function(o) {
3226
- var a = this, l = a._duration, Q = a._soundById(o);
3227
- return Q && (l = a._sprite[Q._sprite][1] / 1e3), l;
3226
+ var a = this, l = a._duration, u = a._soundById(o);
3227
+ return u && (l = a._sprite[u._sprite][1] / 1e3), l;
3228
3228
  },
3229
3229
  /**
3230
3230
  * Returns the current loaded state of this Howl.
@@ -3240,15 +3240,15 @@ var Lt = {};
3240
3240
  unload: function() {
3241
3241
  for (var o = this, a = o._sounds, l = 0; l < a.length; l++)
3242
3242
  a[l]._paused || o.stop(a[l]._id), o._webAudio || (o._clearSound(a[l]._node), a[l]._node.removeEventListener("error", a[l]._errorFn, !1), a[l]._node.removeEventListener(t._canPlayEvent, a[l]._loadFn, !1), a[l]._node.removeEventListener("ended", a[l]._endFn, !1), t._releaseHtml5Audio(a[l]._node)), delete a[l]._node, o._clearTimer(a[l]._id);
3243
- var Q = t._howls.indexOf(o);
3244
- Q >= 0 && t._howls.splice(Q, 1);
3245
- var u = !0;
3243
+ var u = t._howls.indexOf(o);
3244
+ u >= 0 && t._howls.splice(u, 1);
3245
+ var Q = !0;
3246
3246
  for (l = 0; l < t._howls.length; l++)
3247
3247
  if (t._howls[l]._src === o._src || o._src.indexOf(t._howls[l]._src) >= 0) {
3248
- u = !1;
3248
+ Q = !1;
3249
3249
  break;
3250
3250
  }
3251
- return u && delete r[o._src], t.noAudio = !1, o._state = "unloaded", o._sounds = [], o = null, null;
3251
+ return Q && delete r[o._src], t.noAudio = !1, o._state = "unloaded", o._sounds = [], o = null, null;
3252
3252
  },
3253
3253
  /**
3254
3254
  * Listen to a custom event.
@@ -3258,9 +3258,9 @@ var Lt = {};
3258
3258
  * @param {Number} once (INTERNAL) Marks event to fire only once.
3259
3259
  * @return {Howl}
3260
3260
  */
3261
- on: function(o, a, l, Q) {
3262
- var u = this, d = u["_on" + o];
3263
- return typeof a == "function" && d.push(Q ? { id: l, fn: a, once: Q } : { id: l, fn: a }), u;
3261
+ on: function(o, a, l, u) {
3262
+ var Q = this, d = Q["_on" + o];
3263
+ return typeof a == "function" && d.push(u ? { id: l, fn: a, once: u } : { id: l, fn: a }), Q;
3264
3264
  },
3265
3265
  /**
3266
3266
  * Remove a custom event. Call without parameters to remove all events.
@@ -3270,23 +3270,23 @@ var Lt = {};
3270
3270
  * @return {Howl}
3271
3271
  */
3272
3272
  off: function(o, a, l) {
3273
- var Q = this, u = Q["_on" + o], d = 0;
3273
+ var u = this, Q = u["_on" + o], d = 0;
3274
3274
  if (typeof a == "number" && (l = a, a = null), a || l)
3275
- for (d = 0; d < u.length; d++) {
3276
- var f = l === u[d].id;
3277
- if (a === u[d].fn && f || !a && f) {
3278
- u.splice(d, 1);
3275
+ for (d = 0; d < Q.length; d++) {
3276
+ var f = l === Q[d].id;
3277
+ if (a === Q[d].fn && f || !a && f) {
3278
+ Q.splice(d, 1);
3279
3279
  break;
3280
3280
  }
3281
3281
  }
3282
3282
  else if (o)
3283
- Q["_on" + o] = [];
3283
+ u["_on" + o] = [];
3284
3284
  else {
3285
- var w = Object.keys(Q);
3285
+ var w = Object.keys(u);
3286
3286
  for (d = 0; d < w.length; d++)
3287
- w[d].indexOf("_on") === 0 && Array.isArray(Q[w[d]]) && (Q[w[d]] = []);
3287
+ w[d].indexOf("_on") === 0 && Array.isArray(u[w[d]]) && (u[w[d]] = []);
3288
3288
  }
3289
- return Q;
3289
+ return u;
3290
3290
  },
3291
3291
  /**
3292
3292
  * Listen to a custom event and remove it once fired.
@@ -3296,8 +3296,8 @@ var Lt = {};
3296
3296
  * @return {Howl}
3297
3297
  */
3298
3298
  once: function(o, a, l) {
3299
- var Q = this;
3300
- return Q.on(o, a, l, 1), Q;
3299
+ var u = this;
3300
+ return u.on(o, a, l, 1), u;
3301
3301
  },
3302
3302
  /**
3303
3303
  * Emit all events of a specific type and pass the sound id.
@@ -3307,11 +3307,11 @@ var Lt = {};
3307
3307
  * @return {Howl}
3308
3308
  */
3309
3309
  _emit: function(o, a, l) {
3310
- for (var Q = this, u = Q["_on" + o], d = u.length - 1; d >= 0; d--)
3311
- (!u[d].id || u[d].id === a || o === "load") && (setTimeout((function(f) {
3310
+ for (var u = this, Q = u["_on" + o], d = Q.length - 1; d >= 0; d--)
3311
+ (!Q[d].id || Q[d].id === a || o === "load") && (setTimeout((function(f) {
3312
3312
  f.call(this, a, l);
3313
- }).bind(Q, u[d].fn), 0), u[d].once && Q.off(o, u[d].fn, u[d].id));
3314
- return Q._loadQueue(o), Q;
3313
+ }).bind(u, Q[d].fn), 0), Q[d].once && u.off(o, Q[d].fn, Q[d].id));
3314
+ return u._loadQueue(o), u;
3315
3315
  },
3316
3316
  /**
3317
3317
  * Queue of actions initiated before the sound has loaded.
@@ -3336,13 +3336,13 @@ var Lt = {};
3336
3336
  var a = this, l = o._sprite;
3337
3337
  if (!a._webAudio && o._node && !o._node.paused && !o._node.ended && o._node.currentTime < o._stop)
3338
3338
  return setTimeout(a._ended.bind(a, o), 100), a;
3339
- var Q = !!(o._loop || a._sprite[l][2]);
3340
- if (a._emit("end", o._id), !a._webAudio && Q && a.stop(o._id, !0).play(o._id), a._webAudio && Q) {
3339
+ var u = !!(o._loop || a._sprite[l][2]);
3340
+ if (a._emit("end", o._id), !a._webAudio && u && a.stop(o._id, !0).play(o._id), a._webAudio && u) {
3341
3341
  a._emit("play", o._id), o._seek = o._start || 0, o._rateSeek = 0, o._playStart = t.ctx.currentTime;
3342
- var u = (o._stop - o._start) * 1e3 / Math.abs(o._rate);
3343
- a._endTimers[o._id] = setTimeout(a._ended.bind(a, o), u);
3342
+ var Q = (o._stop - o._start) * 1e3 / Math.abs(o._rate);
3343
+ a._endTimers[o._id] = setTimeout(a._ended.bind(a, o), Q);
3344
3344
  }
3345
- return a._webAudio && !Q && (o._paused = !0, o._ended = !0, o._seek = o._start || 0, o._rateSeek = 0, a._clearTimer(o._id), a._cleanBuffer(o._node), t._autoSuspend()), !a._webAudio && !Q && a.stop(o._id, !0), a;
3345
+ return a._webAudio && !u && (o._paused = !0, o._ended = !0, o._seek = o._start || 0, o._rateSeek = 0, a._clearTimer(o._id), a._cleanBuffer(o._node), t._autoSuspend()), !a._webAudio && !u && a.stop(o._id, !0), a;
3346
3346
  },
3347
3347
  /**
3348
3348
  * Clear the end timer for a sound playback.
@@ -3389,14 +3389,14 @@ var Lt = {};
3389
3389
  * Drain excess inactive sounds from the pool.
3390
3390
  */
3391
3391
  _drain: function() {
3392
- var o = this, a = o._pool, l = 0, Q = 0;
3392
+ var o = this, a = o._pool, l = 0, u = 0;
3393
3393
  if (!(o._sounds.length < a)) {
3394
- for (Q = 0; Q < o._sounds.length; Q++)
3395
- o._sounds[Q]._ended && l++;
3396
- for (Q = o._sounds.length - 1; Q >= 0; Q--) {
3394
+ for (u = 0; u < o._sounds.length; u++)
3395
+ o._sounds[u]._ended && l++;
3396
+ for (u = o._sounds.length - 1; u >= 0; u--) {
3397
3397
  if (l <= a)
3398
3398
  return;
3399
- o._sounds[Q]._ended && (o._webAudio && o._sounds[Q]._node && o._sounds[Q]._node.disconnect(0), o._sounds.splice(Q, 1), l--);
3399
+ o._sounds[u]._ended && (o._webAudio && o._sounds[u]._node && o._sounds[u]._node.disconnect(0), o._sounds.splice(u, 1), l--);
3400
3400
  }
3401
3401
  }
3402
3402
  },
@@ -3408,8 +3408,8 @@ var Lt = {};
3408
3408
  _getSoundIds: function(o) {
3409
3409
  var a = this;
3410
3410
  if (typeof o > "u") {
3411
- for (var l = [], Q = 0; Q < a._sounds.length; Q++)
3412
- l.push(a._sounds[Q]._id);
3411
+ for (var l = [], u = 0; u < a._sounds.length; u++)
3412
+ l.push(a._sounds[u]._id);
3413
3413
  return l;
3414
3414
  } else
3415
3415
  return [o];
@@ -3505,9 +3505,9 @@ var Lt = {};
3505
3505
  return;
3506
3506
  }
3507
3507
  if (/^data:[^;]+;base64,/.test(a)) {
3508
- for (var l = atob(a.split(",")[1]), Q = new Uint8Array(l.length), u = 0; u < l.length; ++u)
3509
- Q[u] = l.charCodeAt(u);
3510
- h(Q.buffer, o);
3508
+ for (var l = atob(a.split(",")[1]), u = new Uint8Array(l.length), Q = 0; Q < l.length; ++Q)
3509
+ u[Q] = l.charCodeAt(Q);
3510
+ h(u.buffer, o);
3511
3511
  } else {
3512
3512
  var d = new XMLHttpRequest();
3513
3513
  d.open(o._xhr.method, a, !0), d.withCredentials = o._xhr.withCredentials, d.responseType = "arraybuffer", o._xhr.headers && Object.keys(o._xhr.headers).forEach(function(f) {
@@ -3532,10 +3532,10 @@ var Lt = {};
3532
3532
  }, h = function(o, a) {
3533
3533
  var l = function() {
3534
3534
  a._emit("loaderror", null, "Decoding audio data failed.");
3535
- }, Q = function(u) {
3536
- u && a._sounds.length > 0 ? (r[a._src] = u, I(a, u)) : l();
3535
+ }, u = function(Q) {
3536
+ Q && a._sounds.length > 0 ? (r[a._src] = Q, I(a, Q)) : l();
3537
3537
  };
3538
- typeof Promise < "u" && t.ctx.decodeAudioData.length === 1 ? t.ctx.decodeAudioData(o).then(Q).catch(l) : t.ctx.decodeAudioData(o, Q, l);
3538
+ typeof Promise < "u" && t.ctx.decodeAudioData.length === 1 ? t.ctx.decodeAudioData(o).then(u).catch(l) : t.ctx.decodeAudioData(o, u, l);
3539
3539
  }, I = function(o, a) {
3540
3540
  a && !o._duration && (o._duration = a.duration), Object.keys(o._sprite).length === 0 && (o._sprite = { __default: [0, o._duration * 1e3] }), o._state !== "loaded" && (o._state = "loaded", o._emit("load"), o._loadQueue());
3541
3541
  }, E = function() {
@@ -3548,13 +3548,13 @@ var Lt = {};
3548
3548
  t.ctx || (t.usingWebAudio = !1);
3549
3549
  var o = /iP(hone|od|ad)/.test(t._navigator && t._navigator.platform), a = t._navigator && t._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/), l = a ? parseInt(a[1], 10) : null;
3550
3550
  if (o && l && l < 9) {
3551
- var Q = /safari/.test(t._navigator && t._navigator.userAgent.toLowerCase());
3552
- t._navigator && !Q && (t.usingWebAudio = !1);
3551
+ var u = /safari/.test(t._navigator && t._navigator.userAgent.toLowerCase());
3552
+ t._navigator && !u && (t.usingWebAudio = !1);
3553
3553
  }
3554
3554
  t.usingWebAudio && (t.masterGain = typeof t.ctx.createGain > "u" ? t.ctx.createGainNode() : t.ctx.createGain(), t.masterGain.gain.setValueAtTime(t._muted ? 0 : t._volume, t.ctx.currentTime), t.masterGain.connect(t.ctx.destination)), t._setup();
3555
3555
  }
3556
3556
  };
3557
- e.Howler = t, e.Howl = i, typeof mt < "u" ? (mt.HowlerGlobal = A, mt.Howler = t, mt.Howl = i, mt.Sound = n) : typeof window < "u" && (window.HowlerGlobal = A, window.Howler = t, window.Howl = i, window.Sound = n);
3557
+ e.Howler = t, e.Howl = i, typeof Dt < "u" ? (Dt.HowlerGlobal = A, Dt.Howler = t, Dt.Howl = i, Dt.Sound = n) : typeof window < "u" && (window.HowlerGlobal = A, window.Howler = t, window.Howl = i, window.Sound = n);
3558
3558
  })();
3559
3559
  /*!
3560
3560
  * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
@@ -3746,12 +3746,12 @@ var Lt = {};
3746
3746
  i = i || "spatial", i === "spatial" ? (t._panner = Howler.ctx.createPanner(), t._panner.coneInnerAngle = t._pannerAttr.coneInnerAngle, t._panner.coneOuterAngle = t._pannerAttr.coneOuterAngle, t._panner.coneOuterGain = t._pannerAttr.coneOuterGain, t._panner.distanceModel = t._pannerAttr.distanceModel, t._panner.maxDistance = t._pannerAttr.maxDistance, t._panner.refDistance = t._pannerAttr.refDistance, t._panner.rolloffFactor = t._pannerAttr.rolloffFactor, t._panner.panningModel = t._pannerAttr.panningModel, typeof t._panner.positionX < "u" ? (t._panner.positionX.setValueAtTime(t._pos[0], Howler.ctx.currentTime), t._panner.positionY.setValueAtTime(t._pos[1], Howler.ctx.currentTime), t._panner.positionZ.setValueAtTime(t._pos[2], Howler.ctx.currentTime)) : t._panner.setPosition(t._pos[0], t._pos[1], t._pos[2]), typeof t._panner.orientationX < "u" ? (t._panner.orientationX.setValueAtTime(t._orientation[0], Howler.ctx.currentTime), t._panner.orientationY.setValueAtTime(t._orientation[1], Howler.ctx.currentTime), t._panner.orientationZ.setValueAtTime(t._orientation[2], Howler.ctx.currentTime)) : t._panner.setOrientation(t._orientation[0], t._orientation[1], t._orientation[2])) : (t._panner = Howler.ctx.createStereoPanner(), t._panner.pan.setValueAtTime(t._stereo, Howler.ctx.currentTime)), t._panner.connect(t._node), t._paused || t._parent.pause(t._id, !0).play(t._id, !0);
3747
3747
  };
3748
3748
  })();
3749
- })(Lt);
3750
- const Ea = /* @__PURE__ */ Ba(Lt), dI = /* @__PURE__ */ cr({
3749
+ })(ft);
3750
+ const Ea = /* @__PURE__ */ Ba(ft), dI = /* @__PURE__ */ cr({
3751
3751
  __proto__: null,
3752
3752
  default: Ea
3753
- }, [Lt]), kn = ["load", "loaderror", "playerror", "play", "end", "pause", "stop", "mute", "volume", "rate", "seek", "fade", "unlock"];
3754
- let Qa = class extends UA {
3753
+ }, [ft]), kn = ["load", "loaderror", "playerror", "play", "end", "pause", "stop", "mute", "volume", "rate", "seek", "fade", "unlock"];
3754
+ let ua = class extends UA {
3755
3755
  constructor() {
3756
3756
  super(...arguments), this.sounds = [], this.eventsFn = [], this.maxVolume = 1, this.maxDistance = 100;
3757
3757
  }
@@ -3764,7 +3764,7 @@ let Qa = class extends UA {
3764
3764
  const { src: r, autoplay: s, loop: g, volume: h, spatial: I } = n, E = Array.isArray(r) ? r : [r];
3765
3765
  for (const o of E) {
3766
3766
  if (!o) continue;
3767
- const a = new Lt.Howl({
3767
+ const a = new ft.Howl({
3768
3768
  src: o,
3769
3769
  autoplay: s,
3770
3770
  loop: g,
@@ -3772,8 +3772,8 @@ let Qa = class extends UA {
3772
3772
  });
3773
3773
  for (let l of kn) {
3774
3774
  if (!n[l]) continue;
3775
- const Q = n[l];
3776
- this.eventsFn.push(Q), a.on(l, Q);
3775
+ const u = n[l];
3776
+ this.eventsFn.push(u), a.on(l, u);
3777
3777
  }
3778
3778
  this.sounds.push(a);
3779
3779
  }
@@ -3784,7 +3784,7 @@ let Qa = class extends UA {
3784
3784
  const { x: a, y: l } = o;
3785
3785
  this.tickSubscription = $(() => {
3786
3786
  i();
3787
- const { x: Q, y: u } = A.componentInstance, d = Ns(Q, u, a(), l()), f = Math.max(this.maxVolume - d / this.maxDistance, 0);
3787
+ const { x: u, y: Q } = A.componentInstance, d = Ns(u, Q, a(), l()), f = Math.max(this.maxVolume - d / this.maxDistance, 0);
3788
3788
  this.sounds.forEach((w) => w.volume(f));
3789
3789
  }).subscription;
3790
3790
  }
@@ -3807,7 +3807,7 @@ let Qa = class extends UA {
3807
3807
  }), this.sounds = [], this.eventsFn = [], (A = this.tickSubscription) == null || A.unsubscribe();
3808
3808
  }
3809
3809
  };
3810
- class ua extends UA {
3810
+ class Qa extends UA {
3811
3811
  onMount(A) {
3812
3812
  var t;
3813
3813
  A.props.context.soundListenerPosition = (t = A.propObservables) == null ? void 0 : t.soundListenerPosition;
@@ -3819,8 +3819,8 @@ class ua extends UA {
3819
3819
  onDestroy() {
3820
3820
  }
3821
3821
  }
3822
- JA("sound", Qa);
3823
- JA("soundListenerPosition", ua);
3822
+ JA("sound", ua);
3823
+ JA("soundListenerPosition", Qa);
3824
3824
  function Os(e, A) {
3825
3825
  var t = {};
3826
3826
  for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && A.indexOf(i) < 0 && (t[i] = e[i]);
@@ -3835,11 +3835,11 @@ const hi = (e, A, t) => Math.min(Math.max(t, e), A), Ze = 1e-3, Ca = 0.01, fa =
3835
3835
  function ya({ duration: e = 800, bounce: A = 0.25, velocity: t = 0, mass: i = 1 }) {
3836
3836
  let n, r, s = 1 - A;
3837
3837
  s = hi(da, pa, s), e = hi(Ca, fa, e / 1e3), s < 1 ? (n = (I) => {
3838
- const E = I * s, o = E * e, a = E - t, l = Ii(I, s), Q = Math.exp(-o);
3839
- return Ze - a / l * Q;
3838
+ const E = I * s, o = E * e, a = E - t, l = Ii(I, s), u = Math.exp(-o);
3839
+ return Ze - a / l * u;
3840
3840
  }, r = (I) => {
3841
- const o = I * s * e, a = o * t + t, l = Math.pow(s, 2) * Math.pow(I, 2) * e, Q = Math.exp(-o), u = Ii(Math.pow(I, 2), s);
3842
- return (-n(I) + Ze > 0 ? -1 : 1) * ((a - l) * Q) / u;
3841
+ const o = I * s * e, a = o * t + t, l = Math.pow(s, 2) * Math.pow(I, 2) * e, u = Math.exp(-o), Q = Ii(Math.pow(I, 2), s);
3842
+ return (-n(I) + Ze > 0 ? -1 : 1) * ((a - l) * u) / Q;
3843
3843
  }) : (n = (I) => {
3844
3844
  const E = Math.exp(-I * e), o = (I - t) * e + 1;
3845
3845
  return -Ze + E * o;
@@ -3888,15 +3888,15 @@ function xa(e) {
3888
3888
  function yi(e) {
3889
3889
  var { from: A = 0, to: t = 1, restSpeed: i = 2, restDelta: n } = e, r = Os(e, ["from", "to", "restSpeed", "restDelta"]);
3890
3890
  const s = { done: !1, value: A };
3891
- let { stiffness: g, damping: h, mass: I, velocity: E, duration: o, isResolvedFromDuration: a } = xa(r), l = Fn, Q = Fn;
3892
- function u() {
3891
+ let { stiffness: g, damping: h, mass: I, velocity: E, duration: o, isResolvedFromDuration: a } = xa(r), l = Fn, u = Fn;
3892
+ function Q() {
3893
3893
  const d = E ? -(E / 1e3) : 0, f = t - A, w = h / (2 * Math.sqrt(g * I)), x = Math.sqrt(g / I) / 1e3;
3894
3894
  if (n === void 0 && (n = Math.min(Math.abs(t - A) / 100, 0.4)), w < 1) {
3895
3895
  const M = Ii(x, w);
3896
3896
  l = (_) => {
3897
3897
  const L = Math.exp(-w * x * _);
3898
3898
  return t - L * ((d + w * x * f) / M * Math.sin(M * _) + f * Math.cos(M * _));
3899
- }, Q = (_) => {
3899
+ }, u = (_) => {
3900
3900
  const L = Math.exp(-w * x * _);
3901
3901
  return w * x * L * (Math.sin(M * _) * (d + w * x * f) / M + f * Math.cos(M * _)) - L * (Math.cos(M * _) * (d + w * x * f) - M * f * Math.sin(M * _));
3902
3902
  };
@@ -3910,19 +3910,19 @@ function yi(e) {
3910
3910
  };
3911
3911
  }
3912
3912
  }
3913
- return u(), {
3913
+ return Q(), {
3914
3914
  next: (d) => {
3915
3915
  const f = l(d);
3916
3916
  if (a)
3917
3917
  s.done = d >= o;
3918
3918
  else {
3919
- const w = Q(d) * 1e3, x = Math.abs(w) <= i, M = Math.abs(t - f) <= n;
3919
+ const w = u(d) * 1e3, x = Math.abs(w) <= i, M = Math.abs(t - f) <= n;
3920
3920
  s.done = x && M;
3921
3921
  }
3922
3922
  return s.value = s.done ? t : f, s;
3923
3923
  },
3924
3924
  flipTarget: () => {
3925
- E = -E, [A, t] = [t, A], u();
3925
+ E = -E, [A, t] = [t, A], Q();
3926
3926
  }
3927
3927
  };
3928
3928
  }
@@ -3930,7 +3930,7 @@ yi.needsInterpolation = (e, A) => typeof e == "string" || typeof A == "string";
3930
3930
  const Fn = (e) => 0, Ks = (e, A, t) => {
3931
3931
  const i = A - e;
3932
3932
  return i === 0 ? 1 : (t - e) / i;
3933
- }, wi = (e, A, t) => -t * e + t * A + e, Ps = (e, A) => (t) => Math.max(Math.min(t, A), e), St = (e) => e % 1 ? Number(e.toFixed(5)) : e, le = /(-)?([\d]*\.?[\d])+/g, li = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Sa = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
3933
+ }, wi = (e, A, t) => -t * e + t * A + e, Ps = (e, A) => (t) => Math.max(Math.min(t, A), e), Rt = (e) => e % 1 ? Number(e.toFixed(5)) : e, le = /(-)?([\d]*\.?[\d])+/g, li = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Sa = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
3934
3934
  function Ut(e) {
3935
3935
  return typeof e == "string";
3936
3936
  }
@@ -3944,8 +3944,8 @@ const Ra = (e) => ({
3944
3944
  test: (A) => Ut(A) && A.endsWith(e) && A.split(" ").length === 1,
3945
3945
  parse: parseFloat,
3946
3946
  transform: (A) => `${A}${e}`
3947
- }), Rt = Ra("%");
3948
- Object.assign(Object.assign({}, Rt), { parse: (e) => Rt.parse(e) / 100, transform: (e) => Rt.transform(e * 100) });
3947
+ }), kt = Ra("%");
3948
+ Object.assign(Object.assign({}, kt), { parse: (e) => kt.parse(e) / 100, transform: (e) => kt.transform(e * 100) });
3949
3949
  const mi = (e, A) => (t) => !!(Ut(t) && Sa.test(t) && t.startsWith(e) || A && Object.prototype.hasOwnProperty.call(t, A)), Ys = (e, A, t) => (i) => {
3950
3950
  if (!Ut(i))
3951
3951
  return i;
@@ -3959,11 +3959,11 @@ const mi = (e, A) => (t) => !!(Ut(t) && Sa.test(t) && t.startsWith(e) || A && Ob
3959
3959
  }, WA = {
3960
3960
  test: mi("hsl", "hue"),
3961
3961
  parse: Ys("hue", "saturation", "lightness"),
3962
- transform: ({ hue: e, saturation: A, lightness: t, alpha: i = 1 }) => "hsla(" + Math.round(e) + ", " + Rt.transform(St(A)) + ", " + Rt.transform(St(t)) + ", " + St(Ts.transform(i)) + ")"
3962
+ transform: ({ hue: e, saturation: A, lightness: t, alpha: i = 1 }) => "hsla(" + Math.round(e) + ", " + kt.transform(Rt(A)) + ", " + kt.transform(Rt(t)) + ", " + Rt(Ts.transform(i)) + ")"
3963
3963
  }, ka = Ps(0, 255), je = Object.assign(Object.assign({}, ye), { transform: (e) => Math.round(ka(e)) }), GA = {
3964
3964
  test: mi("rgb", "red"),
3965
3965
  parse: Ys("red", "green", "blue"),
3966
- transform: ({ red: e, green: A, blue: t, alpha: i = 1 }) => "rgba(" + je.transform(e) + ", " + je.transform(A) + ", " + je.transform(t) + ", " + St(Ts.transform(i)) + ")"
3966
+ transform: ({ red: e, green: A, blue: t, alpha: i = 1 }) => "rgba(" + je.transform(e) + ", " + je.transform(A) + ", " + je.transform(t) + ", " + Rt(Ts.transform(i)) + ")"
3967
3967
  };
3968
3968
  function Ma(e) {
3969
3969
  let A = "", t = "", i = "", n = "";
@@ -4004,7 +4004,7 @@ function Zs(e) {
4004
4004
  return (r) => {
4005
4005
  let s = i;
4006
4006
  for (let g = 0; g < n; g++)
4007
- s = s.replace(g < t ? Ws : Xs, g < t ? we.transform(r[g]) : St(r[g]));
4007
+ s = s.replace(g < t ? Ws : Xs, g < t ? we.transform(r[g]) : Rt(r[g]));
4008
4008
  return s;
4009
4009
  };
4010
4010
  }
@@ -4206,8 +4206,8 @@ function cg(e) {
4206
4206
  return g;
4207
4207
  }
4208
4208
  const Bg = 40;
4209
- let Bi = !0, Ht = !1, Ei = !1;
4210
- const kt = {
4209
+ let Bi = !0, Nt = !1, Ei = !1;
4210
+ const Mt = {
4211
4211
  delta: 0,
4212
4212
  timestamp: 0
4213
4213
  }, Jt = [
@@ -4216,15 +4216,15 @@ const kt = {
4216
4216
  "preRender",
4217
4217
  "render",
4218
4218
  "postRender"
4219
- ], De = Jt.reduce((e, A) => (e[A] = cg(() => Ht = !0), e), {}), Eg = Jt.reduce((e, A) => {
4219
+ ], De = Jt.reduce((e, A) => (e[A] = cg(() => Nt = !0), e), {}), Eg = Jt.reduce((e, A) => {
4220
4220
  const t = De[A];
4221
- return e[A] = (i, n = !1, r = !1) => (Ht || Cg(), t.schedule(i, n, r)), e;
4222
- }, {}), Qg = Jt.reduce((e, A) => (e[A] = De[A].cancel, e), {});
4223
- Jt.reduce((e, A) => (e[A] = () => De[A].process(kt), e), {});
4224
- const ug = (e) => De[e].process(kt), Io = (e) => {
4225
- Ht = !1, kt.delta = Bi ? go : Math.max(Math.min(e - kt.timestamp, Bg), 1), kt.timestamp = e, Ei = !0, Jt.forEach(ug), Ei = !1, Ht && (Bi = !1, ho(Io));
4221
+ return e[A] = (i, n = !1, r = !1) => (Nt || Cg(), t.schedule(i, n, r)), e;
4222
+ }, {}), ug = Jt.reduce((e, A) => (e[A] = De[A].cancel, e), {});
4223
+ Jt.reduce((e, A) => (e[A] = () => De[A].process(Mt), e), {});
4224
+ const Qg = (e) => De[e].process(Mt), Io = (e) => {
4225
+ Nt = !1, Mt.delta = Bi ? go : Math.max(Math.min(e - Mt.timestamp, Bg), 1), Mt.timestamp = e, Ei = !0, Jt.forEach(Qg), Ei = !1, Nt && (Bi = !1, ho(Io));
4226
4226
  }, Cg = () => {
4227
- Ht = !0, Bi = !0, Ei || ho(Io);
4227
+ Nt = !0, Bi = !0, Ei || ho(Io);
4228
4228
  };
4229
4229
  function lo(e, A, t = 0) {
4230
4230
  return e - A - t;
@@ -4239,17 +4239,17 @@ const pg = (e) => {
4239
4239
  const A = ({ delta: t }) => e(t);
4240
4240
  return {
4241
4241
  start: () => Eg.update(A, !0),
4242
- stop: () => Qg.update(A)
4242
+ stop: () => ug.update(A)
4243
4243
  };
4244
4244
  };
4245
4245
  function co(e) {
4246
- var A, t, { from: i, autoplay: n = !0, driver: r = pg, elapsed: s = 0, repeat: g = 0, repeatType: h = "loop", repeatDelay: I = 0, onPlay: E, onStop: o, onComplete: a, onRepeat: l, onUpdate: Q } = e, u = Os(e, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
4247
- let { to: d } = u, f, w = 0, x = u.duration, M, _ = !1, L = !0, z;
4248
- const dA = Ig(u);
4246
+ var A, t, { from: i, autoplay: n = !0, driver: r = pg, elapsed: s = 0, repeat: g = 0, repeatType: h = "loop", repeatDelay: I = 0, onPlay: E, onStop: o, onComplete: a, onRepeat: l, onUpdate: u } = e, Q = Os(e, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
4247
+ let { to: d } = Q, f, w = 0, x = Q.duration, M, _ = !1, L = !0, z;
4248
+ const dA = Ig(Q);
4249
4249
  !((t = (A = dA).needsInterpolation) === null || t === void 0) && t.call(A, i, d) && (z = io([0, 100], [i, d], {
4250
4250
  clamp: !1
4251
4251
  }), i = 0, d = 100);
4252
- const N = dA(Object.assign(Object.assign({}, u), { from: i, to: d }));
4252
+ const N = dA(Object.assign(Object.assign({}, Q), { from: i, to: d }));
4253
4253
  function OA() {
4254
4254
  w++, h === "reverse" ? (L = w % 2 === 0, s = fg(s, x, I, L)) : (s = lo(s, x, I), h === "mirror" && N.flipTarget()), _ = !1, l && l();
4255
4255
  }
@@ -4261,7 +4261,7 @@ function co(e) {
4261
4261
  const RA = N.next(Math.max(0, s));
4262
4262
  M = RA.value, z && (M = z(M)), _ = L ? RA.done : s <= 0;
4263
4263
  }
4264
- Q == null || Q(M), _ && (w === 0 && (x ?? (x = s)), w < g ? dg(s, x, I, L) && OA() : ZA());
4264
+ u == null || u(M), _ && (w === 0 && (x ?? (x = s)), w < g ? dg(s, x, I, L) && OA() : ZA());
4265
4265
  }
4266
4266
  function lA() {
4267
4267
  E == null || E(), f = r(oA), f.start();
@@ -4369,16 +4369,16 @@ class Dg extends UA {
4369
4369
  * @param event The pointer event that triggered the drag move
4370
4370
  */
4371
4371
  onDragMove(A) {
4372
- var l, Q;
4372
+ var l, u;
4373
4373
  if (!this.isDragging || !((l = this.elementRef) != null && l.componentInstance) || !this.elementRef.componentInstance.parent) return;
4374
4374
  const t = this.elementRef.componentInstance, i = t.parent, n = this.dragProps, r = this.elementRef.propObservables, s = yg((n == null ? void 0 : n.snap()) ?? 0);
4375
- (Q = n == null ? void 0 : n.move) == null || Q.call(n, A);
4375
+ (u = n == null ? void 0 : n.move) == null || u.call(n, A);
4376
4376
  const g = i.toLocal(A.global), h = g.x - this.offsetInParent.x, I = g.y - this.offsetInParent.y;
4377
4377
  n != null && n.snap() ? (t.position.x = s(h), t.position.y = s(I)) : (this.axis.x && (t.position.x = h), this.axis.y && (t.position.y = I)), this.lastPointerPosition.copyFrom(A.global);
4378
- const { x: E, y: o } = r, a = (u, d) => {
4379
- pi(u) ? u.dependencies.forEach((f) => {
4378
+ const { x: E, y: o } = r, a = (Q, d) => {
4379
+ pi(Q) ? Q.dependencies.forEach((f) => {
4380
4380
  f.set(d);
4381
- }) : V(u) && u.set(d);
4381
+ }) : V(Q) && Q.set(d);
4382
4382
  };
4383
4383
  E !== void 0 && a(E, t.position.x), o !== void 0 && a(o, t.position.y);
4384
4384
  }
@@ -4390,13 +4390,13 @@ class Dg extends UA {
4390
4390
  var d, f;
4391
4391
  if (!this.viewport || !this.elementRef) return;
4392
4392
  const t = this.dragProps, i = (d = t == null ? void 0 : t.viewport) == null ? void 0 : d.edgeThreshold(), n = (f = t == null ? void 0 : t.viewport) == null ? void 0 : f.maxSpeed(), r = 0, s = this.viewport.screenWidth, g = 0, h = this.viewport.screenHeight, I = this.elementRef.componentInstance, E = A.x - r, o = s - A.x, a = A.y - g, l = h - A.y;
4393
- let Q = 0, u = 0;
4394
- if (E < i ? Q = -(n * (1 - E / i)) : o < i && (Q = n * (1 - o / i)), a < i ? u = -(n * (1 - a / i)) : l < i && (u = n * (1 - l / i)), Q !== 0 || u !== 0) {
4393
+ let u = 0, Q = 0;
4394
+ if (E < i ? u = -(n * (1 - E / i)) : o < i && (u = n * (1 - o / i)), a < i ? Q = -(n * (1 - a / i)) : l < i && (Q = n * (1 - l / i)), u !== 0 || Q !== 0) {
4395
4395
  const w = this.viewport.center;
4396
4396
  this.viewport.moveCenter(
4397
- this.viewport.center.x + Q,
4398
- this.viewport.center.y + u
4399
- ), this.axis.x && w.x !== this.viewport.center.x && (I.position.x += Q), this.axis.y && w.y !== this.viewport.center.y && (I.position.y += u);
4397
+ this.viewport.center.x + u,
4398
+ this.viewport.center.y + Q
4399
+ ), this.axis.x && w.x !== this.viewport.center.x && (I.position.x += u), this.axis.y && w.y !== this.viewport.center.y && (I.position.y += Q);
4400
4400
  }
4401
4401
  }
4402
4402
  /**
@@ -4752,7 +4752,7 @@ function fA(e) {
4752
4752
  }
4753
4753
  }, A = new WeakMap(), t = new WeakMap(), i;
4754
4754
  }
4755
- iA("Canvas", class extends fA(uA) {
4755
+ iA("Canvas", class extends fA(QA) {
4756
4756
  });
4757
4757
  const mI = async (e = {}) => {
4758
4758
  let { cursorStyles: A, width: t, height: i, class: n } = CA(e);
@@ -4789,10 +4789,10 @@ const mI = async (e = {}) => {
4789
4789
  height: I.screen.height,
4790
4790
  justifyContent: e.justifyContent,
4791
4791
  alignItems: e.alignItems
4792
- }, r.set({ width: I.screen.width, height: I.screen.height }), I.renderer.on("resize", (l, Q) => {
4793
- r.set({ width: l, height: Q }), I.stage.layout && (I.stage.layout = {
4792
+ }, r.set({ width: I.screen.width, height: I.screen.height }), I.renderer.on("resize", (l, u) => {
4793
+ r.set({ width: l, height: u }), I.stage.layout && (I.stage.layout = {
4794
4794
  width: l,
4795
- height: Q
4795
+ height: u
4796
4796
  });
4797
4797
  }), e.tickStart !== !1 && g.directives.tick.start(), I.ticker.add(() => {
4798
4798
  g.propObservables.tick();
@@ -4805,7 +4805,7 @@ const mI = async (e = {}) => {
4805
4805
  a ? h.replaceChild(o, a) : h.appendChild(o), s.context.app.set(I);
4806
4806
  }, g;
4807
4807
  };
4808
- class Bo extends fA(uA) {
4808
+ class Bo extends fA(QA) {
4809
4809
  constructor() {
4810
4810
  super(...arguments), this.isCustomAnchor = !0;
4811
4811
  }
@@ -5055,9 +5055,9 @@ class Mg extends fA(nr) {
5055
5055
  }
5056
5056
  iA("Mesh", Mg);
5057
5057
  const RI = (e) => nA("Mesh", e);
5058
- let Ln = null, Mt = null;
5058
+ let Ln = null, bt = null;
5059
5059
  function Eo(e) {
5060
- Mt == null || Mt(e);
5060
+ bt == null || bt(e);
5061
5061
  }
5062
5062
  function kI(e) {
5063
5063
  Eo((A) => {
@@ -5074,7 +5074,7 @@ function LA(e, A = {}, ...t) {
5074
5074
  const i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
5075
5075
  Ln = (s) => {
5076
5076
  i.add(s);
5077
- }, Mt = (s) => {
5077
+ }, bt = (s) => {
5078
5078
  n.add(s);
5079
5079
  }, t[0] instanceof Array && (t = t[0]);
5080
5080
  let r;
@@ -5083,7 +5083,7 @@ function LA(e, A = {}, ...t) {
5083
5083
  ...r.effectMounts ?? []
5084
5084
  ], r instanceof Promise && r.then((s) => {
5085
5085
  s.props.isRoot && n.forEach((g) => g(s));
5086
- }), Ln = null, Mt = null, r;
5086
+ }), Ln = null, bt = null, r;
5087
5087
  }
5088
5088
  function MI(e) {
5089
5089
  return LA(Si);
@@ -5161,7 +5161,7 @@ class ki {
5161
5161
  }
5162
5162
  ki.type = "rect";
5163
5163
  ki.editorConfig = null;
5164
- class QA {
5164
+ class uA {
5165
5165
  /**
5166
5166
  * @param value The value for this node
5167
5167
  * @param time The time for this node, between 0-1
@@ -5185,19 +5185,19 @@ class QA {
5185
5185
  if ("list" in A) {
5186
5186
  const i = A.list;
5187
5187
  let n;
5188
- const { value: r, time: s } = i[0], g = n = new QA(typeof r == "string" ? ne(r) : r, s, A.ease);
5188
+ const { value: r, time: s } = i[0], g = n = new uA(typeof r == "string" ? ne(r) : r, s, A.ease);
5189
5189
  if (i.length > 2 || i.length === 2 && i[1].value !== r)
5190
5190
  for (let h = 1; h < i.length; ++h) {
5191
5191
  const { value: I, time: E } = i[h];
5192
- n.next = new QA(typeof I == "string" ? ne(I) : I, E), n = n.next;
5192
+ n.next = new uA(typeof I == "string" ? ne(I) : I, E), n = n.next;
5193
5193
  }
5194
5194
  return g.isStepped = !!A.isStepped, g;
5195
5195
  }
5196
- const t = new QA(typeof A.start == "string" ? ne(A.start) : A.start, 0);
5197
- return A.end !== A.start && (t.next = new QA(typeof A.end == "string" ? ne(A.end) : A.end, 1)), t;
5196
+ const t = new uA(typeof A.start == "string" ? ne(A.start) : A.start, 0);
5197
+ return A.end !== A.start && (t.next = new uA(typeof A.end == "string" ? ne(A.end) : A.end, 1)), t;
5198
5198
  }
5199
5199
  }
5200
- let Nt = SA.from;
5200
+ let Lt = SA.from;
5201
5201
  const EA = Math.PI / 180;
5202
5202
  function xA(e, A) {
5203
5203
  if (!e)
@@ -5211,14 +5211,14 @@ function ve(e, A, t) {
5211
5211
  e << 16 | A << 8 | t
5212
5212
  );
5213
5213
  }
5214
- function Qo(e) {
5214
+ function uo(e) {
5215
5215
  return Math.sqrt(e.x * e.x + e.y * e.y);
5216
5216
  }
5217
5217
  function bg(e) {
5218
- const A = 1 / Qo(e);
5218
+ const A = 1 / uo(e);
5219
5219
  e.x *= A, e.y *= A;
5220
5220
  }
5221
- function uo(e, A) {
5221
+ function Qo(e, A) {
5222
5222
  e.x *= A, e.y *= A;
5223
5223
  }
5224
5224
  function ne(e, A) {
@@ -5266,8 +5266,8 @@ class Mi {
5266
5266
  updateParticle(A, t) {
5267
5267
  const i = A.config.velocity, n = i.x, r = i.y;
5268
5268
  if (i.x += this.accel.x * t, i.y += this.accel.y * t, this.maxSpeed) {
5269
- const s = Qo(i);
5270
- s > this.maxSpeed && uo(i, this.maxSpeed / s);
5269
+ const s = uo(i);
5270
+ s > this.maxSpeed && Qo(i, this.maxSpeed / s);
5271
5271
  }
5272
5272
  A.x += (n + i.x) / 2 * t, A.y += (r + i.y) / 2 * t, this.rotate && (A.rotation = Math.atan2(i.y, i.x));
5273
5273
  }
@@ -5331,7 +5331,7 @@ class Kt {
5331
5331
  }
5332
5332
  class bi {
5333
5333
  constructor(A) {
5334
- this.order = K.Normal, this.list = new Kt(!1), this.list.reset(QA.createList(A.alpha));
5334
+ this.order = K.Normal, this.list = new Kt(!1), this.list.reset(uA.createList(A.alpha));
5335
5335
  }
5336
5336
  initParticles(A) {
5337
5337
  let t = A;
@@ -5361,12 +5361,12 @@ function fo(e) {
5361
5361
  for (let t = 0; t < e.length; ++t) {
5362
5362
  let i = e[t];
5363
5363
  if (typeof i == "string")
5364
- A.push(Nt(i));
5364
+ A.push(Lt(i));
5365
5365
  else if (i instanceof SA)
5366
5366
  A.push(i);
5367
5367
  else {
5368
5368
  let n = i.count || 1;
5369
- for (typeof i.texture == "string" ? i = Nt(i.texture) : i = i.texture; n > 0; --n)
5369
+ for (typeof i.texture == "string" ? i = Lt(i.texture) : i = i.texture; n > 0; --n)
5370
5370
  A.push(i);
5371
5371
  }
5372
5372
  }
@@ -5455,7 +5455,7 @@ Ni.type = "spawnBurst";
5455
5455
  Ni.editorConfig = null;
5456
5456
  class Li {
5457
5457
  constructor(A) {
5458
- this.order = K.Normal, this.list = new Kt(!0), this.list.reset(QA.createList(A.color));
5458
+ this.order = K.Normal, this.list = new Kt(!0), this.list.reset(uA.createList(A.color));
5459
5459
  }
5460
5460
  initParticles(A) {
5461
5461
  let t = A;
@@ -5485,7 +5485,7 @@ Ui.type = "colorStatic";
5485
5485
  Ui.editorConfig = null;
5486
5486
  class Ji {
5487
5487
  constructor(A) {
5488
- this.order = K.Normal, this.index = 0, this.textures = A.textures.map((t) => typeof t == "string" ? Nt(t) : t);
5488
+ this.order = K.Normal, this.index = 0, this.textures = A.textures.map((t) => typeof t == "string" ? Lt(t) : t);
5489
5489
  }
5490
5490
  initParticles(A) {
5491
5491
  let t = A;
@@ -5560,7 +5560,7 @@ class Oi {
5560
5560
  }
5561
5561
  else
5562
5562
  this.path = (t) => t;
5563
- this.list = new Kt(!1), this.list.reset(QA.createList(A.speed)), this.minMult = A.minMult ?? 1;
5563
+ this.list = new Kt(!1), this.list.reset(uA.createList(A.speed)), this.minMult = A.minMult ?? 1;
5564
5564
  }
5565
5565
  initParticles(A) {
5566
5566
  let t = A;
@@ -5589,7 +5589,7 @@ Ki.type = "spawnPoint";
5589
5589
  Ki.editorConfig = null;
5590
5590
  class Pi {
5591
5591
  constructor(A) {
5592
- this.order = K.Normal, this.textures = A.textures.map((t) => typeof t == "string" ? Nt(t) : t);
5592
+ this.order = K.Normal, this.textures = A.textures.map((t) => typeof t == "string" ? Lt(t) : t);
5593
5593
  }
5594
5594
  initParticles(A) {
5595
5595
  let t = A;
@@ -5646,7 +5646,7 @@ Wi.type = "noRotation";
5646
5646
  Wi.editorConfig = null;
5647
5647
  class Xi {
5648
5648
  constructor(A) {
5649
- this.order = K.Normal, this.list = new Kt(!1), this.list.reset(QA.createList(A.scale)), this.minMult = A.minMult ?? 1;
5649
+ this.order = K.Normal, this.list = new Kt(!1), this.list.reset(uA.createList(A.scale)), this.minMult = A.minMult ?? 1;
5650
5650
  }
5651
5651
  initParticles(A) {
5652
5652
  let t = A;
@@ -5706,7 +5706,7 @@ IA.registerShape(xe);
5706
5706
  IA.registerShape(xe, "circle");
5707
5707
  class Vi {
5708
5708
  constructor(A) {
5709
- this.order = K.Normal, this.texture = typeof A.texture == "string" ? Nt(A.texture) : A.texture;
5709
+ this.order = K.Normal, this.texture = typeof A.texture == "string" ? Lt(A.texture) : A.texture;
5710
5710
  }
5711
5711
  initParticles(A) {
5712
5712
  let t = A;
@@ -5718,7 +5718,7 @@ Vi.type = "textureSingle";
5718
5718
  Vi.editorConfig = null;
5719
5719
  class Zi {
5720
5720
  constructor(A) {
5721
- this.order = K.Late, this.list = new Kt(!1), this.list.reset(QA.createList(A.speed)), this.minMult = A.minMult ?? 1;
5721
+ this.order = K.Late, this.list = new Kt(!1), this.list.reset(uA.createList(A.speed)), this.minMult = A.minMult ?? 1;
5722
5722
  }
5723
5723
  initParticles(A) {
5724
5724
  let t = A;
@@ -5729,7 +5729,7 @@ class Zi {
5729
5729
  }
5730
5730
  updateParticle(A, t) {
5731
5731
  const i = this.list.interpolate(A.agePercent) * A.config.speedMult, n = A.config.velocity;
5732
- bg(n), uo(n, i), A.x += n.x * t, A.y += n.y * t;
5732
+ bg(n), Qo(n, i), A.x += n.x * t, A.y += n.y * t;
5733
5733
  }
5734
5734
  }
5735
5735
  Zi.type = "moveSpeed";
@@ -5993,8 +5993,8 @@ class O {
5993
5993
  if (o === TA)
5994
5994
  for (let a = h, l; a; a = l) {
5995
5995
  l = a.next, this.rotation !== 0 && (xA(this.rotation, a.position), a.rotation += this.rotation), a.position.x += s, a.position.y += g, a.age += -this._spawnTimer;
5996
- let Q = a.age * a.oneOverLife;
5997
- this.customEase && (this.customEase.length === 4 ? Q = this.customEase(Q, 0, 1, 1) : Q = this.customEase(Q)), a.agePercent = Q;
5996
+ let u = a.age * a.oneOverLife;
5997
+ this.customEase && (this.customEase.length === 4 ? u = this.customEase(u, 0, 1, 1) : u = this.customEase(u)), a.agePercent = u;
5998
5998
  }
5999
5999
  else
6000
6000
  o.initParticles(h);
@@ -6190,10 +6190,10 @@ class Pg extends fA(ge) {
6190
6190
  if (!s || typeof s != "string" || s.trim() === "")
6191
6191
  return console.warn("Invalid image path provided to createTextures:", s), [];
6192
6192
  const h = await Bt.load(s), I = A.spriteWidth, E = A.spriteHeight, o = [], a = g && g.x || 0, l = g && g.y || 0;
6193
- for (let Q = 0; Q < n; Q++) {
6194
- o[Q] = [];
6195
- for (let u = 0; u < r; u++) {
6196
- const d = u * I + a, f = Q * E + l;
6193
+ for (let u = 0; u < n; u++) {
6194
+ o[u] = [];
6195
+ for (let Q = 0; Q < r; Q++) {
6196
+ const d = Q * I + a, f = u * E + l;
6197
6197
  if (f > i)
6198
6198
  throw Jn(
6199
6199
  `Warning, there is a problem with the height of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the height of the image.`
@@ -6202,7 +6202,7 @@ class Pg extends fA(ge) {
6202
6202
  throw Jn(
6203
6203
  `Warning, there is a problem with the width of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the width of the image.`
6204
6204
  );
6205
- o[Q].push(
6205
+ o[u].push(
6206
6206
  new SA({
6207
6207
  source: h.source,
6208
6208
  frame: new qA(d, f, I, E)
@@ -6313,7 +6313,7 @@ class Pg extends fA(ge) {
6313
6313
  }
6314
6314
  async onDestroy(A, t) {
6315
6315
  const i = async () => {
6316
- this.subscriptionSheet.forEach((n) => n.unsubscribe()), this.subscriptionTick.unsubscribe(), this.currentAnimationContainer && this.parent instanceof uA && this.parent.removeChild(this.currentAnimationContainer), t && t();
6316
+ this.subscriptionSheet.forEach((n) => n.unsubscribe()), this.subscriptionTick.unsubscribe(), this.currentAnimationContainer && this.parent instanceof QA && this.parent.removeChild(this.currentAnimationContainer), t && t();
6317
6317
  };
6318
6318
  await super.onDestroy(A, i);
6319
6319
  }
@@ -6341,7 +6341,7 @@ class Pg extends fA(ge) {
6341
6341
  const r = t;
6342
6342
  this.removeChildren(), n.sprites = [], this.currentAnimation = n, this.currentAnimation.params = r, this.time = 0, this.frameIndex = 0;
6343
6343
  let s = n.animations;
6344
- s = _s(s) ? s(...r) : s, this.currentAnimationContainer = new uA();
6344
+ s = _s(s) ? s(...r) : s, this.currentAnimationContainer = new QA();
6345
6345
  for (let I of s) {
6346
6346
  const E = new ge();
6347
6347
  for (let o of I)
@@ -6349,7 +6349,7 @@ class Pg extends fA(ge) {
6349
6349
  this.currentAnimationContainer.addChild(E);
6350
6350
  }
6351
6351
  const g = this.currentAnimation.data.sound;
6352
- g && new Lt.Howl({
6352
+ g && new ft.Howl({
6353
6353
  src: g,
6354
6354
  autoplay: !0,
6355
6355
  loop: !1,
@@ -6365,16 +6365,16 @@ class Pg extends fA(ge) {
6365
6365
  let s = n[this.frameIndex];
6366
6366
  const g = n[this.frameIndex + 1];
6367
6367
  for (let h of this.currentAnimationContainer.children) {
6368
- let I = function(u, d) {
6369
- const w = E(d || u);
6370
- w !== void 0 && (t[u] = w);
6368
+ let I = function(Q, d) {
6369
+ const w = E(d || Q);
6370
+ w !== void 0 && (t[Q] = w);
6371
6371
  };
6372
6372
  if (!s || s.frameY == null || s.frameX == null)
6373
6373
  continue;
6374
6374
  this.texture = i[s.frameY][s.frameX];
6375
- const E = (u) => s[u] ?? r[u] ?? this.spritesheet[u], o = (u) => {
6376
- const d = E(u);
6377
- d && this[u].set(...d);
6375
+ const E = (Q) => s[Q] ?? r[Q] ?? this.spritesheet[Q], o = (Q) => {
6376
+ const d = E(Q);
6377
+ d && this[Q].set(...d);
6378
6378
  };
6379
6379
  this.applyTransform && (s = {
6380
6380
  ...s,
@@ -6382,13 +6382,13 @@ class Pg extends fA(ge) {
6382
6382
  });
6383
6383
  const a = E("spriteRealSize"), l = typeof a == "number" ? a : a == null ? void 0 : a.height;
6384
6384
  typeof a == "number" || a == null || a.width;
6385
- const Q = () => {
6385
+ const u = () => {
6386
6386
  if (l && this.hitbox) {
6387
- const { spriteWidth: u, spriteHeight: d } = r, f = (u - this.hitbox.w) / 2 / u, w = (d - l) / 2, x = (d - this.hitbox.h - w) / d;
6387
+ const { spriteWidth: Q, spriteHeight: d } = r, f = (Q - this.hitbox.w) / 2 / Q, w = (d - l) / 2, x = (d - this.hitbox.h - w) / d;
6388
6388
  this.anchor.set(f, x);
6389
6389
  }
6390
6390
  };
6391
- s.sound, Q(), o("anchor"), o("scale"), o("skew"), o("pivot"), I("alpha", "opacity"), I("x"), I("y"), I("angle"), I("rotation"), I("visible");
6391
+ s.sound, u(), o("anchor"), o("scale"), o("skew"), o("pivot"), I("alpha", "opacity"), I("x"), I("y"), I("angle"), I("rotation"), I("visible");
6392
6392
  }
6393
6393
  if (!g) {
6394
6394
  this.time = 0, this.frameIndex = 0, this.onFinish && n.length > 1 && this.onFinish();
@@ -6501,8 +6501,9 @@ function Yg(e, A) {
6501
6501
  }
6502
6502
  class Wg extends fA(or) {
6503
6503
  constructor() {
6504
- super(...arguments), this.fullText = "", this.currentIndex = 0, this.typewriterSpeed = 1, this._wordWrapWidth = 0, this.typewriterOptions = {};
6504
+ super(...arguments), this.fullText = "", this.currentIndex = 0, this.typewriterSpeed = 1, this._wordWrapWidth = 0, this.typewriterOptions = {}, this.lastSoundTime = 0, this.soundDuration = 0;
6505
6505
  }
6506
+ // Duration of the sound in milliseconds
6506
6507
  /**
6507
6508
  * Called when the component is mounted to the scene graph.
6508
6509
  * Initializes the typewriter effect if configured.
@@ -6515,43 +6516,78 @@ class Wg extends fA(or) {
6515
6516
  const n = i.context.tick;
6516
6517
  i.text && i.typewriter && (this.fullText = i.text, this.text = "", this.currentIndex = 0, i.typewriter && (this.typewriterOptions = i.typewriter, this.typewriterOptions.skip && yo(this.typewriterOptions.skip) && Yg(this.typewriterOptions.skip, () => {
6517
6518
  this.skipTypewriter();
6518
- }))), this.subscriptionTick = n.observable.subscribe(() => {
6519
+ }), this.typewriterOptions.sound && this.initializeTypewriterSound()), this.updateLayout()), this.subscriptionTick = n.observable.subscribe(() => {
6519
6520
  i.typewriter && this.typewriterEffect();
6520
6521
  });
6521
6522
  }
6522
6523
  onUpdate(A) {
6523
- if (super.onUpdate(A), A.typewriter && A.typewriter && (this.typewriterOptions = A.typewriter), A.text !== void 0 && (this.text = "" + A.text), A.text !== void 0 && A.text !== this.fullText && this.fullProps.typewriter && (this.text = "", this.currentIndex = 0, this.fullText = A.text), A.style) {
6524
+ if (super.onUpdate(A), A.typewriter && A.typewriter && (this.typewriterOptions = A.typewriter, A.typewriter.sound && this.initializeTypewriterSound()), A.text !== void 0 && (this.text = "" + A.text), A.text !== void 0 && A.text !== this.fullText && this.fullProps.typewriter && (this.text = "", this.currentIndex = 0, this.fullText = A.text, this.updateLayout()), A.style) {
6524
6525
  for (const t in A.style)
6525
6526
  this.style[t] = A.style[t];
6526
6527
  A.style.wordWrapWidth && (this._wordWrapWidth = A.style.wordWrapWidth);
6527
6528
  }
6528
- A.color && (this.style.fill = A.color), A.size && (this.style.fontSize = A.size), A.fontFamily && (this.style.fontFamily = A.fontFamily), this._wordWrapWidth ? this.setWidth(this._wordWrapWidth) : this.setWidth(this.width), this.setHeight(this.height);
6529
+ A.color && (this.style.fill = A.color), A.size && (this.style.fontSize = A.size), A.fontFamily && (this.style.fontFamily = A.fontFamily), this.updateLayout();
6529
6530
  }
6530
6531
  get onCompleteCallback() {
6531
6532
  return this.typewriterOptions.onComplete;
6532
6533
  }
6534
+ /**
6535
+ * Initializes the typewriter sound effect using Howler.
6536
+ * Creates a Howl instance with the configured sound settings.
6537
+ * Calculates the sound duration to prevent overlapping sounds.
6538
+ */
6539
+ initializeTypewriterSound() {
6540
+ var A;
6541
+ (A = this.typewriterOptions.sound) != null && A.src && (this.typewriterSound = new ft.Howl({
6542
+ src: [this.typewriterOptions.sound.src],
6543
+ volume: this.typewriterOptions.sound.volume ?? 0.5,
6544
+ rate: this.typewriterOptions.sound.rate ?? 1,
6545
+ preload: !0,
6546
+ onload: () => {
6547
+ var t;
6548
+ if (this.typewriterSound) {
6549
+ const i = this.typewriterSound.duration(), n = ((t = this.typewriterOptions.sound) == null ? void 0 : t.rate) ?? 1;
6550
+ this.soundDuration = i / n * 1e3;
6551
+ }
6552
+ }
6553
+ }));
6554
+ }
6555
+ /**
6556
+ * Plays the typewriter sound with duration-based cooldown to prevent overlapping sounds.
6557
+ * @param {number} currentTime - The current timestamp to check against sound duration.
6558
+ */
6559
+ playTypewriterSound(A) {
6560
+ !this.typewriterSound || !this.typewriterOptions.sound || this.soundDuration > 0 && A - this.lastSoundTime < this.soundDuration || (this.typewriterSound.play(), this.lastSoundTime = A);
6561
+ }
6562
+ /**
6563
+ * Updates the layout properties of the text component.
6564
+ * This method ensures consistent width, height and word wrap behavior.
6565
+ */
6566
+ updateLayout() {
6567
+ this._wordWrapWidth ? this.setWidth(this._wordWrapWidth) : this.setWidth(this.width), this.setHeight(this.height);
6568
+ }
6533
6569
  typewriterEffect() {
6534
6570
  if (this.currentIndex < this.fullText.length) {
6535
6571
  const A = Math.min(
6536
6572
  this.currentIndex + (this.typewriterOptions.speed ?? 1),
6537
6573
  this.fullText.length
6538
6574
  );
6539
- this.text = this.fullText.slice(0, A), this.currentIndex = A, this.currentIndex === this.fullText.length && this.onCompleteCallback && this.onCompleteCallback();
6575
+ this.text = this.fullText.slice(0, A), this.currentIndex = A, this.typewriterOptions.sound && this.playTypewriterSound(Date.now()), this.updateLayout(), this.currentIndex === this.fullText.length && this.onCompleteCallback && this.onCompleteCallback();
6540
6576
  }
6541
6577
  }
6542
6578
  // Add a method to skip the typewriter effect
6543
6579
  skipTypewriter() {
6544
- this.skipSignal && this.skipSignal(), this.text = this.fullText, this.currentIndex = this.fullText.length;
6580
+ this.skipSignal && this.skipSignal(), this.text = this.fullText, this.currentIndex = this.fullText.length, this.updateLayout();
6545
6581
  }
6546
6582
  /**
6547
6583
  * Called when the component is about to be destroyed.
6548
- * Unsubscribes from the tick observable.
6584
+ * Unsubscribes from the tick observable and cleans up sound resources.
6549
6585
  * @param {Element<any>} parent - The parent element.
6550
6586
  * @param {() => void} [afterDestroy] - An optional callback function to be executed after the component's own destruction logic.
6551
6587
  */
6552
6588
  async onDestroy(A, t) {
6553
6589
  const i = async () => {
6554
- this.subscriptionTick && this.subscriptionTick.unsubscribe(), t && t();
6590
+ this.subscriptionTick && this.subscriptionTick.unsubscribe(), this.typewriterSound && (this.typewriterSound.stop(), this.typewriterSound.unload(), this.typewriterSound = void 0), t && t();
6555
6591
  };
6556
6592
  await super.onDestroy(A, i);
6557
6593
  }
@@ -6800,7 +6836,7 @@ class zg {
6800
6836
  return (this.isMouseDown ? 1 : 0) + this.touches.length;
6801
6837
  }
6802
6838
  }
6803
- const Dt = [
6839
+ const vt = [
6804
6840
  "drag",
6805
6841
  "pinch",
6806
6842
  "wheel",
@@ -6828,11 +6864,11 @@ class $g {
6828
6864
  * @param {Plugin} plugin - instantiated Plugin class
6829
6865
  * @param {number} index to insert userPlugin (otherwise inserts it at the end)
6830
6866
  */
6831
- add(A, t, i = Dt.length) {
6867
+ add(A, t, i = vt.length) {
6832
6868
  const n = this.plugins[A];
6833
6869
  n && n.destroy(), this.plugins[A] = t;
6834
- const r = Dt.indexOf(A);
6835
- r !== -1 && Dt.splice(r, 1), Dt.splice(i, 0, A), this.sort();
6870
+ const r = vt.indexOf(A);
6871
+ r !== -1 && vt.splice(r, 1), vt.splice(i, 0, A), this.sort();
6836
6872
  }
6837
6873
  /**
6838
6874
  * Get plugin
@@ -6911,7 +6947,7 @@ class $g {
6911
6947
  */
6912
6948
  sort() {
6913
6949
  this.list = [];
6914
- for (const A of Dt)
6950
+ for (const A of vt)
6915
6951
  this.plugins[A] && this.list.push(this.plugins[A]);
6916
6952
  }
6917
6953
  /**
@@ -7694,19 +7730,19 @@ class Eh extends sA {
7694
7730
  }
7695
7731
  }
7696
7732
  }
7697
- const Qh = {
7733
+ const uh = {
7698
7734
  noDrag: !1,
7699
7735
  percent: 1,
7700
7736
  center: null,
7701
7737
  factor: 1,
7702
7738
  axis: "all"
7703
- }, uh = new J();
7739
+ }, Qh = new J();
7704
7740
  class Ch extends sA {
7705
7741
  /**
7706
7742
  * This is called by {@link Viewport.pinch}.
7707
7743
  */
7708
7744
  constructor(A, t = {}) {
7709
- super(A), this.active = !1, this.pinching = !1, this.moved = !1, this.options = Object.assign({}, Qh, t);
7745
+ super(A), this.active = !1, this.pinching = !1, this.moved = !1, this.options = Object.assign({}, uh, t);
7710
7746
  }
7711
7747
  down() {
7712
7748
  return this.parent.input.count() >= 2 ? (this.active = !0, !0) : !1;
@@ -7723,7 +7759,7 @@ class Ch extends sA {
7723
7759
  const { x: t, y: i } = (this.parent.parent || this.parent).toLocal(
7724
7760
  A.global,
7725
7761
  void 0,
7726
- uh
7762
+ Qh
7727
7763
  ), n = this.parent.input.touches;
7728
7764
  if (n.length >= 2) {
7729
7765
  const r = n[0], s = n[1], g = r.last && s.last ? Math.sqrt(
@@ -8016,7 +8052,7 @@ const Dh = {
8016
8052
  ticker: os.shared,
8017
8053
  allowPreserveDragOutside: !1
8018
8054
  };
8019
- class vh extends uA {
8055
+ class vh extends QA {
8020
8056
  /**
8021
8057
  * @param {IViewportOptions} ViewportOptions
8022
8058
  * @param {number} [options.screenWidth=window.innerWidth]
@@ -9040,10 +9076,10 @@ var _h = (() => {
9040
9076
  }
9041
9077
  return p;
9042
9078
  }
9043
- var l, Q, u, d, f, w, x, M, _;
9079
+ var l, u, Q, d, f, w, x, M, _;
9044
9080
  function L() {
9045
9081
  var c = E.buffer;
9046
- l = c, t.HEAP8 = Q = new Int8Array(c), t.HEAP16 = d = new Int16Array(c), t.HEAP32 = w = new Int32Array(c), t.HEAPU8 = u = new Uint8Array(c), t.HEAPU16 = f = new Uint16Array(c), t.HEAPU32 = x = new Uint32Array(c), t.HEAPF32 = M = new Float32Array(c), t.HEAPF64 = _ = new Float64Array(c);
9082
+ l = c, t.HEAP8 = u = new Int8Array(c), t.HEAP16 = d = new Int16Array(c), t.HEAP32 = w = new Int32Array(c), t.HEAPU8 = Q = new Uint8Array(c), t.HEAPU16 = f = new Uint16Array(c), t.HEAPU32 = x = new Uint32Array(c), t.HEAPF32 = M = new Float32Array(c), t.HEAPF64 = _ = new Float64Array(c);
9047
9083
  }
9048
9084
  var z, dA = [], N = [], OA = [];
9049
9085
  function ZA() {
@@ -9119,7 +9155,7 @@ var _h = (() => {
9119
9155
  function G(c) {
9120
9156
  throw new jA(c);
9121
9157
  }
9122
- var ft = (c) => (c || G("Cannot use deleted val. handle = " + c), rA[c].value), Tt = (c) => {
9158
+ var dt = (c) => (c || G("Cannot use deleted val. handle = " + c), rA[c].value), Tt = (c) => {
9123
9159
  switch (c) {
9124
9160
  case void 0:
9125
9161
  return 1;
@@ -9135,17 +9171,17 @@ var _h = (() => {
9135
9171
  }
9136
9172
  }, en = void 0, nn = void 0;
9137
9173
  function j(c) {
9138
- for (var B = ""; u[c]; ) B += nn[u[c++]];
9174
+ for (var B = ""; Q[c]; ) B += nn[Q[c++]];
9139
9175
  return B;
9140
9176
  }
9141
- var dt = [];
9177
+ var pt = [];
9142
9178
  function be() {
9143
- for (; dt.length; ) {
9144
- var c = dt.pop();
9179
+ for (; pt.length; ) {
9180
+ var c = pt.pop();
9145
9181
  c.M.$ = !1, c.delete();
9146
9182
  }
9147
9183
  }
9148
- var pt = void 0, pA = {};
9184
+ var yt = void 0, pA = {};
9149
9185
  function Fe(c, B) {
9150
9186
  for (B === void 0 && G("ptr should not be undefined"); c.R; ) B = c.ba(B), c = c.R;
9151
9187
  return B;
@@ -9197,7 +9233,7 @@ var _h = (() => {
9197
9233
  c.pop()(B);
9198
9234
  }
9199
9235
  }
9200
- function yt(c) {
9236
+ function wt(c) {
9201
9237
  return this.fromWireType(w[c >> 2]);
9202
9238
  }
9203
9239
  var $A = {}, Vt = {};
@@ -9379,9 +9415,9 @@ var _h = (() => {
9379
9415
  switch (B) {
9380
9416
  case 0:
9381
9417
  return C ? function(p) {
9382
- return Q[p];
9383
- } : function(p) {
9384
9418
  return u[p];
9419
+ } : function(p) {
9420
+ return Q[p];
9385
9421
  };
9386
9422
  case 1:
9387
9423
  return C ? function(p) {
@@ -9477,7 +9513,7 @@ var _h = (() => {
9477
9513
  for (B in pA) pA.hasOwnProperty(B) && c.push(pA[B]);
9478
9514
  return c;
9479
9515
  }, t.flushPendingDeletes = be, t.setDelayFunction = function(c) {
9480
- pt = c, dt.length && pt && pt(be);
9516
+ yt = c, pt.length && yt && yt(be);
9481
9517
  }, hn = t.InternalError = Pt("InternalError"), MA.prototype.isAliasOf = function(c) {
9482
9518
  if (!(this instanceof MA && c instanceof MA)) return !1;
9483
9519
  var B = this.M.P.N, C = this.M.O, p = c.M.P.N;
@@ -9493,12 +9529,12 @@ var _h = (() => {
9493
9529
  }, MA.prototype.isDeleted = function() {
9494
9530
  return !this.M.O;
9495
9531
  }, MA.prototype.deleteLater = function() {
9496
- return this.M.O || Ne(this), this.M.$ && !this.M.aa && G("Object already scheduled for deletion"), dt.push(this), dt.length === 1 && pt && pt(be), this.M.$ = !0, this;
9532
+ return this.M.O || Ne(this), this.M.$ && !this.M.aa && G("Object already scheduled for deletion"), pt.push(this), pt.length === 1 && yt && yt(be), this.M.$ = !0, this;
9497
9533
  }, wA.prototype.qa = function(c) {
9498
9534
  return this.ka && (c = this.ka(c)), c;
9499
9535
  }, wA.prototype.ha = function(c) {
9500
9536
  this.W && this.W(c);
9501
- }, wA.prototype.argPackAdvance = 8, wA.prototype.readValueFromPointer = yt, wA.prototype.deleteObject = function(c) {
9537
+ }, wA.prototype.argPackAdvance = 8, wA.prototype.readValueFromPointer = wt, wA.prototype.deleteObject = function(c) {
9502
9538
  c !== null && c.delete();
9503
9539
  }, wA.prototype.fromWireType = function(c) {
9504
9540
  function B() {
@@ -9526,10 +9562,10 @@ var _h = (() => {
9526
9562
  return B;
9527
9563
  }, zo = {
9528
9564
  l: function(c, B, C, p) {
9529
- Z("Assertion failed: " + (c ? a(u, c) : "") + ", at: " + [B ? B ? a(u, B) : "" : "unknown filename", C, p ? p ? a(u, p) : "" : "unknown function"]);
9565
+ Z("Assertion failed: " + (c ? a(Q, c) : "") + ", at: " + [B ? B ? a(Q, B) : "" : "unknown filename", C, p ? p ? a(Q, p) : "" : "unknown function"]);
9530
9566
  },
9531
9567
  q: function(c, B, C) {
9532
- c = j(c), B = on(B, "wrapper"), C = ft(C);
9568
+ c = j(c), B = on(B, "wrapper"), C = dt(C);
9533
9569
  var p = [].slice, y = B.N, m = y.X, D = y.R.X, v = y.R.constructor;
9534
9570
  c = ke(c, function() {
9535
9571
  y.R.ja.forEach((function(S) {
@@ -9557,12 +9593,12 @@ var _h = (() => {
9557
9593
  var v = {};
9558
9594
  return y.forEach((R, S) => {
9559
9595
  var k = D[S], b = R.ra, H = R.sa, X = D[S + y.length], U = R.ya, AA = R.Aa;
9560
- v[R.oa] = { read: (gA) => k.fromWireType(b(H, gA)), write: (gA, wt) => {
9596
+ v[R.oa] = { read: (gA) => k.fromWireType(b(H, gA)), write: (gA, mt) => {
9561
9597
  var DA = [];
9562
9598
  U(
9563
9599
  AA,
9564
9600
  gA,
9565
- X.toWireType(DA, wt)
9601
+ X.toWireType(DA, mt)
9566
9602
  ), Ge(DA);
9567
9603
  } };
9568
9604
  }), [{ name: B.name, fromWireType: function(R) {
@@ -9574,7 +9610,7 @@ var _h = (() => {
9574
9610
  var b = C();
9575
9611
  for (k in v) v[k].write(b, S[k]);
9576
9612
  return R !== null && R.push(p, b), b;
9577
- }, argPackAdvance: 8, readValueFromPointer: yt, V: p }];
9613
+ }, argPackAdvance: 8, readValueFromPointer: wt, V: p }];
9578
9614
  });
9579
9615
  },
9580
9616
  v: function() {
@@ -9591,7 +9627,7 @@ var _h = (() => {
9591
9627
  },
9592
9628
  argPackAdvance: 8,
9593
9629
  readValueFromPointer: function(D) {
9594
- if (C === 1) var v = Q;
9630
+ if (C === 1) var v = u;
9595
9631
  else if (C === 2) v = d;
9596
9632
  else if (C === 4) v = w;
9597
9633
  else throw new TypeError("Unknown boolean type size: " + B);
@@ -9610,21 +9646,21 @@ var _h = (() => {
9610
9646
  var AA = U.N, gA = AA.X;
9611
9647
  else gA = MA.prototype;
9612
9648
  U = ke(X, function() {
9613
- if (Object.getPrototypeOf(this) !== wt) throw new jA("Use 'new' to construct " + k);
9649
+ if (Object.getPrototypeOf(this) !== mt) throw new jA("Use 'new' to construct " + k);
9614
9650
  if (DA.Y === void 0) throw new jA(k + " has no accessible constructor");
9615
9651
  var Cn = DA.Y[arguments.length];
9616
9652
  if (Cn === void 0) throw new jA("Tried to invoke ctor of " + k + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(DA.Y).toString() + ") parameters instead!");
9617
9653
  return Cn.apply(this, arguments);
9618
9654
  });
9619
- var wt = Object.create(gA, { constructor: { value: U } });
9620
- U.prototype = wt;
9621
- var DA = new Fo(k, U, wt, H, AA, m, v, S);
9655
+ var mt = Object.create(gA, { constructor: { value: U } });
9656
+ U.prototype = mt;
9657
+ var DA = new Fo(k, U, mt, H, AA, m, v, S);
9622
9658
  AA = new wA(k, DA, !0, !1), gA = new wA(k + "*", DA, !1, !1);
9623
- var un = new wA(k + " const*", DA, !1, !0);
9659
+ var Qn = new wA(k + " const*", DA, !1, !0);
9624
9660
  return gn[c] = {
9625
9661
  pointerType: gA,
9626
- la: un
9627
- }, No(X, U), [AA, gA, un];
9662
+ la: Qn
9663
+ }, No(X, U), [AA, gA, Qn];
9628
9664
  });
9629
9665
  },
9630
9666
  d: function(c, B, C, p, y, m, D) {
@@ -9678,11 +9714,11 @@ var _h = (() => {
9678
9714
  B = j(B), yA(
9679
9715
  c,
9680
9716
  { name: B, fromWireType: function(C) {
9681
- var p = ft(C);
9717
+ var p = dt(C);
9682
9718
  return Ke(C), p;
9683
9719
  }, toWireType: function(C, p) {
9684
9720
  return Tt(p);
9685
- }, argPackAdvance: 8, readValueFromPointer: yt, V: null }
9721
+ }, argPackAdvance: 8, readValueFromPointer: wt, V: null }
9686
9722
  );
9687
9723
  },
9688
9724
  n: function(c, B, C) {
@@ -9721,14 +9757,14 @@ var _h = (() => {
9721
9757
  var y = x[p >> 2], m = p + 4;
9722
9758
  if (C) for (var D = m, v = 0; v <= y; ++v) {
9723
9759
  var R = m + v;
9724
- if (v == y || u[R] == 0) {
9725
- if (D = D ? a(u, D, R - D) : "", S === void 0) var S = D;
9760
+ if (v == y || Q[R] == 0) {
9761
+ if (D = D ? a(Q, D, R - D) : "", S === void 0) var S = D;
9726
9762
  else S += "\0", S += D;
9727
9763
  D = R + 1;
9728
9764
  }
9729
9765
  }
9730
9766
  else {
9731
- for (S = Array(y), v = 0; v < y; ++v) S[v] = String.fromCharCode(u[m + v]);
9767
+ for (S = Array(y), v = 0; v < y; ++v) S[v] = String.fromCharCode(Q[m + v]);
9732
9768
  S = S.join("");
9733
9769
  }
9734
9770
  return mA(p), S;
@@ -9744,7 +9780,7 @@ var _h = (() => {
9744
9780
  m = v;
9745
9781
  } else m = y.length;
9746
9782
  if (v = Te(4 + m + 1), R = v + 4, x[v >> 2] = m, C && D) {
9747
- if (D = R, R = m + 1, m = u, 0 < R) {
9783
+ if (D = R, R = m + 1, m = Q, 0 < R) {
9748
9784
  R = D + R - 1;
9749
9785
  for (var S = 0; S < y.length; ++S) {
9750
9786
  var k = y.charCodeAt(S);
@@ -9774,10 +9810,10 @@ var _h = (() => {
9774
9810
  }
9775
9811
  m[D] = 0;
9776
9812
  }
9777
- } else if (D) for (D = 0; D < m; ++D) S = y.charCodeAt(D), 255 < S && (mA(R), G("String has UTF-16 code units that do not fit in 8 bits")), u[R + D] = S;
9778
- else for (D = 0; D < m; ++D) u[R + D] = y[D];
9813
+ } else if (D) for (D = 0; D < m; ++D) S = y.charCodeAt(D), 255 < S && (mA(R), G("String has UTF-16 code units that do not fit in 8 bits")), Q[R + D] = S;
9814
+ else for (D = 0; D < m; ++D) Q[R + D] = y[D];
9779
9815
  return p !== null && p.push(mA, v), v;
9780
- }, argPackAdvance: 8, readValueFromPointer: yt, V: function(p) {
9816
+ }, argPackAdvance: 8, readValueFromPointer: wt, V: function(p) {
9781
9817
  mA(p);
9782
9818
  } });
9783
9819
  },
@@ -9795,7 +9831,7 @@ var _h = (() => {
9795
9831
  typeof S != "string" && G("Cannot pass non-string to C++ string type " + C);
9796
9832
  var k = m(S), b = Te(4 + k + B);
9797
9833
  return x[b >> 2] = k >> v, y(S, b + 4, k + B), R !== null && R.push(mA, b), b;
9798
- }, argPackAdvance: 8, readValueFromPointer: yt, V: function(R) {
9834
+ }, argPackAdvance: 8, readValueFromPointer: wt, V: function(R) {
9799
9835
  mA(R);
9800
9836
  } });
9801
9837
  },
@@ -9817,12 +9853,12 @@ var _h = (() => {
9817
9853
  });
9818
9854
  },
9819
9855
  s: function(c, B, C, p, y) {
9820
- c = jt[c], B = ft(B), C = ln(C);
9856
+ c = jt[c], B = dt(B), C = ln(C);
9821
9857
  var m = [];
9822
9858
  return x[p >> 2] = Tt(m), c(B, C, m, y);
9823
9859
  },
9824
9860
  t: function(c, B, C, p) {
9825
- c = jt[c], B = ft(B), C = ln(C), c(B, C, null, p);
9861
+ c = jt[c], B = dt(B), C = ln(C), c(B, C, null, p);
9826
9862
  },
9827
9863
  g: Ke,
9828
9864
  m: function(c, B) {
@@ -9846,17 +9882,17 @@ var _h = (() => {
9846
9882
  4 < c && (rA[c].ga += 1);
9847
9883
  },
9848
9884
  r: function(c) {
9849
- var B = ft(c);
9885
+ var B = dt(c);
9850
9886
  Ge(B), Ke(c);
9851
9887
  },
9852
9888
  c: function() {
9853
9889
  Z("");
9854
9890
  },
9855
9891
  x: function(c, B, C) {
9856
- u.copyWithin(c, B, B + C);
9892
+ Q.copyWithin(c, B, B + C);
9857
9893
  },
9858
9894
  w: function(c) {
9859
- var B = u.length;
9895
+ var B = Q.length;
9860
9896
  if (c >>>= 0, 2147483648 < c) return !1;
9861
9897
  for (var C = 1; 4 >= C; C *= 2) {
9862
9898
  var p = B * (1 + 0.2 / C);
@@ -9887,7 +9923,7 @@ var _h = (() => {
9887
9923
  var D = x[B >> 2], v = x[B + 4 >> 2];
9888
9924
  B += 8;
9889
9925
  for (var R = 0; R < v; R++) {
9890
- var S = u[D + R], k = Zo[c];
9926
+ var S = Q[D + R], k = Zo[c];
9891
9927
  S === 0 || S === 10 ? ((c === 1 ? g : h)(a(k, 0)), k.length = 0) : k.push(S);
9892
9928
  }
9893
9929
  y += v;
@@ -9946,9 +9982,9 @@ var _h = (() => {
9946
9982
  };
9947
9983
  var $t;
9948
9984
  lA = function c() {
9949
- $t || Qn(), $t || (lA = c);
9985
+ $t || un(), $t || (lA = c);
9950
9986
  };
9951
- function Qn() {
9987
+ function un() {
9952
9988
  function c() {
9953
9989
  if (!$t && ($t = !0, t.calledRun = !0, !o)) {
9954
9990
  if (Re(N), i(t), t.onRuntimeInitialized && t.onRuntimeInitialized(), t.postRun) for (typeof t.postRun == "function" && (t.postRun = [t.postRun]); t.postRun.length; ) {
@@ -9968,7 +10004,7 @@ var _h = (() => {
9968
10004
  }
9969
10005
  }
9970
10006
  if (t.preInit) for (typeof t.preInit == "function" && (t.preInit = [t.preInit]); 0 < t.preInit.length; ) t.preInit.pop()();
9971
- return Qn(), A.ready;
10007
+ return un(), A.ready;
9972
10008
  };
9973
10009
  })();
9974
10010
  let Y = /* @__PURE__ */ function(e) {
@@ -10163,7 +10199,7 @@ function Uh() {
10163
10199
  function Jh(e) {
10164
10200
  mo = e;
10165
10201
  }
10166
- function Qe(e, A) {
10202
+ function ue(e, A) {
10167
10203
  return e ? typeof e == "number" ? e : typeof e == "string" && e.endsWith("%") ? (A ?? (A = 1), A * (parseFloat(e) / 100)) : Number.isNaN(parseFloat(e)) ? 0 : parseFloat(e) : 0;
10168
10204
  }
10169
10205
  function XA(e) {
@@ -10174,7 +10210,7 @@ function se(e, A, t) {
10174
10210
  }
10175
10211
  function Yn(e, A, t, i, n) {
10176
10212
  const r = A === "percentage" ? i[t] - n[t] : 1;
10177
- return Qe(e) * r;
10213
+ return ue(e) * r;
10178
10214
  }
10179
10215
  function Do(e, A, t) {
10180
10216
  const [i, n] = e, r = XA(i), s = XA(n), g = { x: void 0, y: void 0 };
@@ -10232,8 +10268,8 @@ function Oh(e, A, t) {
10232
10268
  throw new Error("Invalid objectPosition value: second and fourth values must be numbers or percentages");
10233
10269
  if (g !== "keyword" || I !== "keyword")
10234
10270
  throw new Error("Invalid objectPosition value: first and third values must be keywords");
10235
- const o = Do([i, r], A, t), a = { ...o }, l = Qe(n), Q = Qe(s);
10236
- return i === "left" || i === "right" ? a.x = o.x + oe(i, l, h, t.width) : (i === "top" || i === "bottom") && (a.y = o.y + oe(i, l, h, t.height)), r === "left" || r === "right" ? a.x = o.x + oe(r, Q, E, t.width) : (r === "top" || r === "bottom") && (a.y = o.y + oe(r, Q, E, t.height)), a;
10271
+ const o = Do([i, r], A, t), a = { ...o }, l = ue(n), u = ue(s);
10272
+ return i === "left" || i === "right" ? a.x = o.x + oe(i, l, h, t.width) : (i === "top" || i === "bottom") && (a.y = o.y + oe(i, l, h, t.height)), r === "left" || r === "right" ? a.x = o.x + oe(r, u, E, t.width) : (r === "top" || r === "bottom") && (a.y = o.y + oe(r, u, E, t.height)), a;
10237
10273
  }
10238
10274
  function Kh(e, A, t) {
10239
10275
  const i = e[0], n = { x: void 0, y: void 0 };
@@ -10255,7 +10291,7 @@ function Kh(e, A, t) {
10255
10291
  break;
10256
10292
  default: {
10257
10293
  const s = XA(i) === "percentage" ? A.width - t.width : 1;
10258
- n.x = Qe(i) * s, n.y = (A.height - t.height) / 2;
10294
+ n.x = ue(i) * s, n.y = (A.height - t.height) / 2;
10259
10295
  }
10260
10296
  }
10261
10297
  return n;
@@ -10282,22 +10318,22 @@ function vo(e) {
10282
10318
  function Wn(e, A, t = 0.49) {
10283
10319
  return Math.abs(e - A) < t;
10284
10320
  }
10285
- const vt = /* @__PURE__ */ new Map();
10321
+ const xt = /* @__PURE__ */ new Map();
10286
10322
  function Th(e, A = 100, t) {
10287
- if (!vt.has(e)) {
10323
+ if (!xt.has(e)) {
10288
10324
  let i = null;
10289
10325
  const n = (...r) => {
10290
- if (vt.get(e).args = r, i) return;
10326
+ if (xt.get(e).args = r, i) return;
10291
10327
  const s = () => {
10292
10328
  i = null;
10293
- const g = vt.get(e).args;
10329
+ const g = xt.get(e).args;
10294
10330
  e(...g);
10295
10331
  };
10296
10332
  A === 0 ? s() : i = setTimeout(s, A);
10297
10333
  };
10298
- vt.set(e, { throttledFunction: n, args: null });
10334
+ xt.set(e, { throttledFunction: n, args: null });
10299
10335
  }
10300
- return vt.get(e).throttledFunction;
10336
+ return xt.get(e).throttledFunction;
10301
10337
  }
10302
10338
  var Yh = Object.defineProperty, Wh = (e, A, t) => A in e ? Yh(e, A, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[A] = t, YA = (e, A, t) => Wh(e, typeof A != "symbol" ? A + "" : A, t);
10303
10339
  class xo {
@@ -10319,7 +10355,7 @@ class xo {
10319
10355
  */
10320
10356
  async enableDebug(A = !this._debugEnabled) {
10321
10357
  if (this._debugEnabled = A, !this._debugRenderer) {
10322
- const t = await import("./DebugRenderer-DrlzuIVv.js");
10358
+ const t = await import("./DebugRenderer-BwMYQRL8.js");
10323
10359
  this._debugRenderer = new t.DebugRenderer();
10324
10360
  }
10325
10361
  this._debugEnabled || this._debugRenderer.reset();
@@ -10821,7 +10857,7 @@ function Ro(e, A, t, i) {
10821
10857
  scaleY: g
10822
10858
  };
10823
10859
  }
10824
- const ii = Object.getOwnPropertyDescriptor(uA.prototype, "visible"), gI = {
10860
+ const ii = Object.getOwnPropertyDescriptor(QA.prototype, "visible"), gI = {
10825
10861
  // Internal reference to the layout object
10826
10862
  _layout: null,
10827
10863
  /**
@@ -10837,10 +10873,10 @@ const ii = Object.getOwnPropertyDescriptor(uA.prototype, "visible"), gI = {
10837
10873
  */
10838
10874
  set layout(e) {
10839
10875
  if (e = e === !0 ? {} : e, !e) {
10840
- this._layout && (this._layout.destroy(), this._layout = null, this.updateLocalTransform = uA.prototype.updateLocalTransform, Object.defineProperty(uA.prototype, "visible", ii));
10876
+ this._layout && (this._layout.destroy(), this._layout = null, this.updateLocalTransform = QA.prototype.updateLocalTransform, Object.defineProperty(QA.prototype, "visible", ii));
10841
10877
  return;
10842
10878
  }
10843
- this._layout || (this._layout = new st({ target: this }), Object.defineProperty(uA.prototype, "visible", {
10879
+ this._layout || (this._layout = new st({ target: this }), Object.defineProperty(QA.prototype, "visible", {
10844
10880
  ...ii,
10845
10881
  set(A) {
10846
10882
  ii.set.call(this, A), this.layout && (A && this.parent ? this.layout._onChildAdded(this.parent) : this.layout._onChildRemoved());
@@ -10856,7 +10892,7 @@ const ii = Object.getOwnPropertyDescriptor(uA.prototype, "visible"), gI = {
10856
10892
  const e = this._didContainerChangeTick;
10857
10893
  if (this._didLocalTransformChangeId === e) return;
10858
10894
  this._didLocalTransformChangeId = e;
10859
- const A = this._layout, { x: t, y: i, offsetX: n, offsetY: r, scaleX: s, scaleY: g, originX: h, originY: I } = A._computedPixiLayout, E = this.localTransform, { rotation: o, skew: a, scale: l, position: Q } = this, u = o + a._y, d = o - a._x, f = Math.cos(u) * l._x, w = Math.sin(u) * l._x, x = -Math.sin(d) * l._y, M = Math.cos(d) * l._y, _ = Q._x + t - h * f - I * x, L = Q._y + i - h * w - I * M;
10895
+ const A = this._layout, { x: t, y: i, offsetX: n, offsetY: r, scaleX: s, scaleY: g, originX: h, originY: I } = A._computedPixiLayout, E = this.localTransform, { rotation: o, skew: a, scale: l, position: u } = this, Q = o + a._y, d = o - a._x, f = Math.cos(Q) * l._x, w = Math.sin(Q) * l._x, x = -Math.sin(d) * l._y, M = Math.cos(d) * l._y, _ = u._x + t - h * f - I * x, L = u._y + i - h * w - I * M;
10860
10896
  E.a = f * s, E.b = w * s, E.c = x * g, E.d = M * g, E.tx = _ + (n * f + r * x) + h, E.ty = L + (n * w + r * M) + I;
10861
10897
  },
10862
10898
  /**
@@ -10878,7 +10914,7 @@ const ii = Object.getOwnPropertyDescriptor(uA.prototype, "visible"), gI = {
10878
10914
  };
10879
10915
  }
10880
10916
  };
10881
- ue.mixin(uA, gI);
10917
+ Qe.mixin(QA, gI);
10882
10918
  const ns = new J(0, 0), hI = {
10883
10919
  /**
10884
10920
  * Computes the layout data for the text element
@@ -10910,9 +10946,9 @@ const ns = new J(0, 0), hI = {
10910
10946
  };
10911
10947
  }
10912
10948
  };
10913
- ue.mixin(Qi, hI);
10914
- const ni = Object.getOwnPropertyDescriptor(Qi.prototype, "text");
10915
- Object.defineProperty(Qi.prototype, "text", {
10949
+ Qe.mixin(ui, hI);
10950
+ const ni = Object.getOwnPropertyDescriptor(ui.prototype, "text");
10951
+ Object.defineProperty(ui.prototype, "text", {
10916
10952
  ...ni,
10917
10953
  set(e) {
10918
10954
  var A;
@@ -10930,8 +10966,8 @@ const II = {
10930
10966
  return Ro(this, e, "fill", this._anchor);
10931
10967
  }
10932
10968
  };
10933
- ue.mixin(gs, II);
10934
- ue.add(xo);
10969
+ Qe.mixin(gs, II);
10970
+ Qe.add(xo);
10935
10971
  const KI = async (e, A, t) => {
10936
10972
  const i = new gr();
10937
10973
  await i.init({
@@ -11014,8 +11050,8 @@ class TI {
11014
11050
  addressModeV: "clamp-to-edge"
11015
11051
  })
11016
11052
  });
11017
- const E = new lr(), o = Math.sqrt((n - t) * (n - t) + (r - i) * (r - i)), a = Math.sqrt((s - t) * (s - t) + (g - i) * (g - i)), l = Math.atan2(r - i, n - t), Q = o / I, u = a / I;
11018
- E.rotate(-l), E.scale(Q, u), A && E.translate(A.x, A.y), this.transform = E;
11053
+ const E = new lr(), o = Math.sqrt((n - t) * (n - t) + (r - i) * (r - i)), a = Math.sqrt((s - t) * (s - t) + (g - i) * (g - i)), l = Math.atan2(r - i, n - t), u = o / I, Q = a / I;
11054
+ E.rotate(-l), E.scale(u, Q), A && E.translate(A.x, A.y), this.transform = E;
11019
11055
  }
11020
11056
  return {
11021
11057
  texture: this.texture,
@@ -11036,7 +11072,7 @@ export {
11036
11072
  CI as I,
11037
11073
  fI as J,
11038
11074
  Ln as K,
11039
- Mt as L,
11075
+ bt as L,
11040
11076
  RI as M,
11041
11077
  UI as N,
11042
11078
  ie as O,
@@ -11063,11 +11099,11 @@ export {
11063
11099
  dI as c,
11064
11100
  _A as d,
11065
11101
  $ as e,
11066
- QI as f,
11102
+ uI as f,
11067
11103
  pi as g,
11068
- Lt as h,
11104
+ ft as h,
11069
11105
  BI as i,
11070
- uI as j,
11106
+ QI as j,
11071
11107
  V as k,
11072
11108
  Si as l,
11073
11109
  DI as m,
@@ -11085,4 +11121,4 @@ export {
11085
11121
  Rn as y,
11086
11122
  iA as z
11087
11123
  };
11088
- //# sourceMappingURL=index-DNDNQN-q.js.map
11124
+ //# sourceMappingURL=index-19a35G23.js.map