canvasengine 2.0.0-beta.53 → 2.0.0-beta.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as Fn from "pixi.js";
2
- import { Point as k, Rectangle as _t, Sprite as pe, Texture as ct, WRAP_MODES as Hn, DisplacementFilter as Rn, ObservablePoint as bs, BlurFilter as qi, Container as Ft, Graphics as ai, Assets as St, Mesh as Wn, Geometry as jn, Ticker as ws, Text as Bn, TilingSprite as Nn, NineSliceSprite as Vn, DOMContainer as zn, Application as Un, DOMAdapter as Gn, ImageSource as Xn, Matrix as Yn } from "pixi.js";
2
+ import { Point as k, Rectangle as _t, Sprite as pe, Texture as ct, WRAP_MODES as Hn, DisplacementFilter as Rn, ObservablePoint as bs, BlurFilter as qi, Container as Lt, Graphics as ai, Assets as St, Mesh as jn, Geometry as Wn, Ticker as ws, Text as Bn, TilingSprite as Nn, NineSliceSprite as Vn, DOMContainer as zn, Application as Un, DOMAdapter as Gn, ImageSource as Xn, Matrix as Yn } from "pixi.js";
3
3
  function $n(s, t) {
4
4
  for (var e = 0; e < t.length; e++) {
5
5
  const i = t[e];
@@ -119,7 +119,7 @@ function xs(s, t) {
119
119
  return { value: f[0] ? f[1] : void 0, done: !0 };
120
120
  }
121
121
  }
122
- function Ht(s) {
122
+ function Ft(s) {
123
123
  var t = typeof Symbol == "function" && Symbol.iterator, e = t && s[t], i = 0;
124
124
  if (e) return e.call(s);
125
125
  if (s && typeof s.length == "number") return {
@@ -129,7 +129,7 @@ function Ht(s) {
129
129
  };
130
130
  throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
131
131
  }
132
- function $t(s, t) {
132
+ function Yt(s, t) {
133
133
  var e = typeof Symbol == "function" && s[Symbol.iterator];
134
134
  if (!e) return s;
135
135
  var i = e.call(s), n, r = [], a;
@@ -146,13 +146,13 @@ function $t(s, t) {
146
146
  }
147
147
  return r;
148
148
  }
149
- function qt(s, t, e) {
149
+ function $t(s, t, e) {
150
150
  if (e || arguments.length === 2) for (var i = 0, n = t.length, r; i < n; i++)
151
151
  (r || !(i in t)) && (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
152
152
  return s.concat(r || Array.prototype.slice.call(t));
153
153
  }
154
- function It(s) {
155
- return this instanceof It ? (this.v = s, this) : new It(s);
154
+ function Ot(s) {
155
+ return this instanceof Ot ? (this.v = s, this) : new Ot(s);
156
156
  }
157
157
  function Kn(s, t, e) {
158
158
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
@@ -180,7 +180,7 @@ function Kn(s, t, e) {
180
180
  }
181
181
  }
182
182
  function f(u) {
183
- u.value instanceof It ? Promise.resolve(u.value.v).then(p, o) : h(r[0][2], u);
183
+ u.value instanceof Ot ? Promise.resolve(u.value.v).then(p, o) : h(r[0][2], u);
184
184
  }
185
185
  function p(u) {
186
186
  c("next", u);
@@ -195,7 +195,7 @@ function Kn(s, t, e) {
195
195
  function Jn(s) {
196
196
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
197
197
  var t = s[Symbol.asyncIterator], e;
198
- return t ? t.call(s) : (s = typeof Ht == "function" ? Ht(s) : s[Symbol.iterator](), e = {}, i("next"), i("throw"), i("return"), e[Symbol.asyncIterator] = function() {
198
+ return t ? t.call(s) : (s = typeof Ft == "function" ? Ft(s) : s[Symbol.iterator](), e = {}, i("next"), i("throw"), i("return"), e[Symbol.asyncIterator] = function() {
199
199
  return this;
200
200
  }, e);
201
201
  function i(r) {
@@ -247,7 +247,7 @@ var be = (function() {
247
247
  if (a)
248
248
  if (this._parentage = null, Array.isArray(a))
249
249
  try {
250
- for (var l = Ht(a), c = l.next(); !c.done; c = l.next()) {
250
+ for (var l = Ft(a), c = l.next(); !c.done; c = l.next()) {
251
251
  var f = c.value;
252
252
  f.remove(this);
253
253
  }
@@ -273,12 +273,12 @@ var be = (function() {
273
273
  if (o) {
274
274
  this._finalizers = null;
275
275
  try {
276
- for (var h = Ht(o), u = h.next(); !u.done; u = h.next()) {
276
+ for (var h = Ft(o), u = h.next(); !u.done; u = h.next()) {
277
277
  var d = u.value;
278
278
  try {
279
279
  Ki(d);
280
280
  } catch (m) {
281
- r = r ?? [], m instanceof De ? r = qt(qt([], $t(r)), $t(m.errors)) : r.push(m);
281
+ r = r ?? [], m instanceof De ? r = $t($t([], Yt(r)), Yt(m.errors)) : r.push(m);
282
282
  }
283
283
  }
284
284
  } catch (m) {
@@ -336,7 +336,7 @@ var Zn = {
336
336
  setTimeout: function(s, t) {
337
337
  for (var e = [], i = 2; i < arguments.length; i++)
338
338
  e[i - 2] = arguments[i];
339
- return setTimeout.apply(void 0, qt([s, t], $t(e)));
339
+ return setTimeout.apply(void 0, $t([s, t], Yt(e)));
340
340
  },
341
341
  clearTimeout: function(s) {
342
342
  return clearTimeout(s);
@@ -360,7 +360,7 @@ var li = (function(s) {
360
360
  return i.isStopped = !1, e ? (i.destination = e, As(e) && e.add(i)) : i.destination = ir, i;
361
361
  }
362
362
  return t.create = function(e, i, n) {
363
- return new Kt(e, i, n);
363
+ return new qt(e, i, n);
364
364
  }, t.prototype.next = function(e) {
365
365
  this.isStopped || this._next(e);
366
366
  }, t.prototype.error = function(e) {
@@ -394,7 +394,7 @@ var li = (function(s) {
394
394
  try {
395
395
  e.next(t);
396
396
  } catch (i) {
397
- re(i);
397
+ ne(i);
398
398
  }
399
399
  }, s.prototype.error = function(t) {
400
400
  var e = this.partialObserver;
@@ -402,20 +402,20 @@ var li = (function(s) {
402
402
  try {
403
403
  e.error(t);
404
404
  } catch (i) {
405
- re(i);
405
+ ne(i);
406
406
  }
407
407
  else
408
- re(t);
408
+ ne(t);
409
409
  }, s.prototype.complete = function() {
410
410
  var t = this.partialObserver;
411
411
  if (t.complete)
412
412
  try {
413
413
  t.complete();
414
414
  } catch (e) {
415
- re(e);
415
+ ne(e);
416
416
  }
417
417
  }, s;
418
- })(), Kt = (function(s) {
418
+ })(), qt = (function(s) {
419
419
  kt(t, s);
420
420
  function t(e, i, n) {
421
421
  var r = s.call(this) || this, a;
@@ -427,7 +427,7 @@ var li = (function(s) {
427
427
  }
428
428
  return t;
429
429
  })(li);
430
- function re(s) {
430
+ function ne(s) {
431
431
  Cs(s);
432
432
  }
433
433
  function er(s) {
@@ -451,7 +451,7 @@ function sr(s) {
451
451
  }, e);
452
452
  };
453
453
  }
454
- var I = (function() {
454
+ var D = (function() {
455
455
  function s(t) {
456
456
  t && (this._subscribe = t);
457
457
  }
@@ -459,7 +459,7 @@ var I = (function() {
459
459
  var e = new s();
460
460
  return e.source = this, e.operator = t, e;
461
461
  }, s.prototype.subscribe = function(t, e, i) {
462
- var n = this, r = rr(t) ? t : new Kt(t, e, i);
462
+ var n = this, r = rr(t) ? t : new qt(t, e, i);
463
463
  return ue(function() {
464
464
  var a = n, l = a.operator, c = a.source;
465
465
  r.add(l ? l.call(r, c) : c ? n._subscribe(r) : n._trySubscribe(r));
@@ -473,7 +473,7 @@ var I = (function() {
473
473
  }, s.prototype.forEach = function(t, e) {
474
474
  var i = this;
475
475
  return e = Zi(e), new e(function(n, r) {
476
- var a = new Kt({
476
+ var a = new qt({
477
477
  next: function(l) {
478
478
  try {
479
479
  t(l);
@@ -524,7 +524,7 @@ function rr(s) {
524
524
  function or(s) {
525
525
  return F(s?.lift);
526
526
  }
527
- function Wt(s) {
527
+ function Rt(s) {
528
528
  return function(t) {
529
529
  if (or(t))
530
530
  return t.lift(function(e) {
@@ -598,7 +598,7 @@ var ar = (function(s) {
598
598
  if (i._throwIfClosed(), !i.isStopped) {
599
599
  i.currentObservers || (i.currentObservers = Array.from(i.observers));
600
600
  try {
601
- for (var a = Ht(i.currentObservers), l = a.next(); !l.done; l = a.next()) {
601
+ for (var a = Ft(i.currentObservers), l = a.next(); !l.done; l = a.next()) {
602
602
  var c = l.value;
603
603
  c.next(e);
604
604
  }
@@ -653,12 +653,12 @@ var ar = (function(s) {
653
653
  var i = this, n = i.hasError, r = i.thrownError, a = i.isStopped;
654
654
  n ? e.error(r) : a && e.complete();
655
655
  }, t.prototype.asObservable = function() {
656
- var e = new I();
656
+ var e = new D();
657
657
  return e.source = this, e;
658
658
  }, t.create = function(e, i) {
659
659
  return new Qi(e, i);
660
660
  }, t;
661
- })(I), Qi = (function(s) {
661
+ })(D), Qi = (function(s) {
662
662
  kt(t, s);
663
663
  function t(e, i) {
664
664
  var n = s.call(this) || this;
@@ -773,13 +773,13 @@ function Fs(s) {
773
773
  case 1:
774
774
  a.trys.push([1, , 9, 10]), a.label = 2;
775
775
  case 2:
776
- return [4, It(e.read())];
776
+ return [4, Ot(e.read())];
777
777
  case 3:
778
- return i = a.sent(), n = i.value, r = i.done, r ? [4, It(void 0)] : [3, 5];
778
+ return i = a.sent(), n = i.value, r = i.done, r ? [4, Ot(void 0)] : [3, 5];
779
779
  case 4:
780
780
  return [2, a.sent()];
781
781
  case 5:
782
- return [4, It(n)];
782
+ return [4, Ot(n)];
783
783
  case 6:
784
784
  return [4, a.sent()];
785
785
  case 7:
@@ -798,7 +798,7 @@ function Hs(s) {
798
798
  return F(s?.getReader);
799
799
  }
800
800
  function jt(s) {
801
- if (s instanceof I)
801
+ if (s instanceof D)
802
802
  return s;
803
803
  if (s != null) {
804
804
  if (Es(s))
@@ -817,7 +817,7 @@ function jt(s) {
817
817
  throw Is(s);
818
818
  }
819
819
  function pr(s) {
820
- return new I(function(t) {
820
+ return new D(function(t) {
821
821
  var e = s[hi]();
822
822
  if (F(e.subscribe))
823
823
  return e.subscribe(t);
@@ -825,14 +825,14 @@ function pr(s) {
825
825
  });
826
826
  }
827
827
  function mr(s) {
828
- return new I(function(t) {
828
+ return new D(function(t) {
829
829
  for (var e = 0; e < s.length && !t.closed; e++)
830
830
  t.next(s[e]);
831
831
  t.complete();
832
832
  });
833
833
  }
834
834
  function yr(s) {
835
- return new I(function(t) {
835
+ return new D(function(t) {
836
836
  s.then(function(e) {
837
837
  t.closed || (t.next(e), t.complete());
838
838
  }, function(e) {
@@ -841,10 +841,10 @@ function yr(s) {
841
841
  });
842
842
  }
843
843
  function gr(s) {
844
- return new I(function(t) {
844
+ return new D(function(t) {
845
845
  var e, i;
846
846
  try {
847
- for (var n = Ht(s), r = n.next(); !r.done; r = n.next()) {
847
+ for (var n = Ft(s), r = n.next(); !r.done; r = n.next()) {
848
848
  var a = r.value;
849
849
  if (t.next(a), t.closed)
850
850
  return;
@@ -862,7 +862,7 @@ function gr(s) {
862
862
  });
863
863
  }
864
864
  function Rs(s) {
865
- return new I(function(t) {
865
+ return new D(function(t) {
866
866
  br(s, t).catch(function(e) {
867
867
  return t.error(e);
868
868
  });
@@ -917,8 +917,8 @@ function mt(s, t, e, i, n) {
917
917
  if (s.add(r), !n)
918
918
  return r;
919
919
  }
920
- function Ws(s, t) {
921
- return t === void 0 && (t = 0), Wt(function(e, i) {
920
+ function js(s, t) {
921
+ return t === void 0 && (t = 0), Rt(function(e, i) {
922
922
  e.subscribe(we(i, function(n) {
923
923
  return mt(i, s, function() {
924
924
  return i.next(n);
@@ -934,21 +934,21 @@ function Ws(s, t) {
934
934
  }));
935
935
  });
936
936
  }
937
- function js(s, t) {
938
- return t === void 0 && (t = 0), Wt(function(e, i) {
937
+ function Ws(s, t) {
938
+ return t === void 0 && (t = 0), Rt(function(e, i) {
939
939
  i.add(s.schedule(function() {
940
940
  return e.subscribe(i);
941
941
  }, t));
942
942
  });
943
943
  }
944
944
  function wr(s, t) {
945
- return jt(s).pipe(js(t), Ws(t));
945
+ return jt(s).pipe(Ws(t), js(t));
946
946
  }
947
947
  function xr(s, t) {
948
- return jt(s).pipe(js(t), Ws(t));
948
+ return jt(s).pipe(Ws(t), js(t));
949
949
  }
950
950
  function _r(s, t) {
951
- return new I(function(e) {
951
+ return new D(function(e) {
952
952
  var i = 0;
953
953
  return t.schedule(function() {
954
954
  i === s.length ? e.complete() : (e.next(s[i++]), e.closed || this.schedule());
@@ -956,7 +956,7 @@ function _r(s, t) {
956
956
  });
957
957
  }
958
958
  function Sr(s, t) {
959
- return new I(function(e) {
959
+ return new D(function(e) {
960
960
  var i;
961
961
  return mt(e, t, function() {
962
962
  i = s[Ds](), mt(e, t, function() {
@@ -977,7 +977,7 @@ function Sr(s, t) {
977
977
  function Bs(s, t) {
978
978
  if (!s)
979
979
  throw new Error("Iterable cannot be null");
980
- return new I(function(e) {
980
+ return new D(function(e) {
981
981
  mt(e, t, function() {
982
982
  var i = s[Symbol.asyncIterator]();
983
983
  mt(e, t, function() {
@@ -1012,10 +1012,10 @@ function me(s, t) {
1012
1012
  return t ? Cr(s, t) : jt(s);
1013
1013
  }
1014
1014
  function Gl(s) {
1015
- return !!s && (s instanceof I || F(s.lift) && F(s.subscribe));
1015
+ return !!s && (s instanceof D || F(s.lift) && F(s.subscribe));
1016
1016
  }
1017
1017
  function ui(s, t) {
1018
- return Wt(function(e, i) {
1018
+ return Rt(function(e, i) {
1019
1019
  var n = 0;
1020
1020
  e.subscribe(we(i, function(r) {
1021
1021
  i.next(s.call(t, r, n++));
@@ -1024,7 +1024,7 @@ function ui(s, t) {
1024
1024
  }
1025
1025
  var kr = Array.isArray;
1026
1026
  function Pr(s, t) {
1027
- return kr(t) ? s.apply(void 0, qt([], $t(t))) : s(t);
1027
+ return kr(t) ? s.apply(void 0, $t([], Yt(t))) : s(t);
1028
1028
  }
1029
1029
  function Tr(s) {
1030
1030
  return ui(function(t) {
@@ -1063,7 +1063,7 @@ function xe() {
1063
1063
  var e = fr(s), i = ur(s), n = Dr(s), r = n.args, a = n.keys;
1064
1064
  if (r.length === 0)
1065
1065
  return me([], e);
1066
- var l = new I(Hr(r, e, a ? function(c) {
1066
+ var l = new D(Hr(r, e, a ? function(c) {
1067
1067
  return Fr(a, c);
1068
1068
  } : ci));
1069
1069
  return i ? l.pipe(Tr(i)) : l;
@@ -1089,20 +1089,20 @@ function ts(s, t, e) {
1089
1089
  s ? mt(e, s, t) : t();
1090
1090
  }
1091
1091
  function Rr(s) {
1092
- return new I(function(t) {
1092
+ return new D(function(t) {
1093
1093
  jt(s()).subscribe(t);
1094
1094
  });
1095
1095
  }
1096
- function Ut(s, t) {
1097
- return Wt(function(e, i) {
1096
+ function zt(s, t) {
1097
+ return Rt(function(e, i) {
1098
1098
  var n = 0;
1099
1099
  e.subscribe(we(i, function(r) {
1100
1100
  return s.call(t, r, n++) && i.next(r);
1101
1101
  }));
1102
1102
  });
1103
1103
  }
1104
- function Wr(s) {
1105
- return Wt(function(t, e) {
1104
+ function jr(s) {
1105
+ return Rt(function(t, e) {
1106
1106
  try {
1107
1107
  t.subscribe(e);
1108
1108
  } finally {
@@ -1124,12 +1124,12 @@ function Ns(s) {
1124
1124
  var b = p;
1125
1125
  y(), b?.unsubscribe();
1126
1126
  };
1127
- return Wt(function(b, w) {
1127
+ return Rt(function(b, w) {
1128
1128
  u++, !m && !d && g();
1129
1129
  var x = h = h ?? e();
1130
1130
  w.add(function() {
1131
1131
  u--, u === 0 && !m && !d && (o = Le(v, c));
1132
- }), x.subscribe(w), !p && u > 0 && (p = new Kt({
1132
+ }), x.subscribe(w), !p && u > 0 && (p = new qt({
1133
1133
  next: function(S) {
1134
1134
  return x.next(S);
1135
1135
  },
@@ -1151,15 +1151,15 @@ function Le(s, t) {
1151
1151
  return;
1152
1152
  }
1153
1153
  if (t !== !1) {
1154
- var n = new Kt({
1154
+ var n = new qt({
1155
1155
  next: function() {
1156
1156
  n.unsubscribe(), s();
1157
1157
  }
1158
1158
  });
1159
- return jt(t.apply(void 0, qt([], $t(e)))).subscribe(n);
1159
+ return jt(t.apply(void 0, $t([], Yt(e)))).subscribe(n);
1160
1160
  }
1161
1161
  }
1162
- function jr(s, t, e) {
1162
+ function Wr(s, t, e) {
1163
1163
  var i, n, r, a, l = !1;
1164
1164
  return s && typeof s == "object" ? (i = s.bufferSize, a = i === void 0 ? 1 / 0 : i, n = s.windowTime, t = n === void 0 ? 1 / 0 : n, r = s.refCount, l = r === void 0 ? !1 : r, e = s.scheduler) : a = s ?? 1 / 0, Ns({
1165
1165
  connector: function() {
@@ -1170,26 +1170,26 @@ function jr(s, t, e) {
1170
1170
  resetOnRefCountZero: l
1171
1171
  });
1172
1172
  }
1173
- function Ot() {
1173
+ function Et() {
1174
1174
  return typeof window < "u";
1175
1175
  }
1176
1176
  function lt() {
1177
1177
  return typeof performance < "u" ? performance.now() : Date.now();
1178
1178
  }
1179
- function st(s) {
1179
+ function it(s) {
1180
1180
  return 1e3 / s;
1181
1181
  }
1182
1182
  function yt(s) {
1183
1183
  return s && s instanceof Promise;
1184
1184
  }
1185
- function te(s, t) {
1185
+ function Qt(s, t) {
1186
1186
  if (s.length !== t.length) return !1;
1187
1187
  for (let e = 0; e < s.length; e++) {
1188
1188
  const i = s[e], n = t[e];
1189
1189
  if (typeof i == "object" && i !== null) {
1190
1190
  if (typeof n != "object" || n === null) return !1;
1191
1191
  if (Array.isArray(i)) {
1192
- if (!Array.isArray(n) || !te(i, n)) return !1;
1192
+ if (!Array.isArray(n) || !Qt(i, n)) return !1;
1193
1193
  } else if (!Vs(i, n))
1194
1194
  return !1;
1195
1195
  } else if (i !== n)
@@ -1205,7 +1205,7 @@ function Vs(s, t) {
1205
1205
  return !0;
1206
1206
  }
1207
1207
  function Br(s, t) {
1208
- return s === t ? !0 : typeof s != typeof t ? !1 : typeof s == "object" && s !== null ? Array.isArray(s) ? Array.isArray(t) && te(s, t) : Vs(s, t) : !1;
1208
+ return s === t ? !0 : typeof s != typeof t ? !1 : typeof s == "object" && s !== null ? Array.isArray(s) ? Array.isArray(t) && Qt(s, t) : Vs(s, t) : !1;
1209
1209
  }
1210
1210
  function fi(s) {
1211
1211
  return {}.toString.call(s) === "[object Function]";
@@ -1214,7 +1214,7 @@ function _e(s) {
1214
1214
  return typeof s == "object" && s != null && !Array.isArray(s) && s.constructor === Object;
1215
1215
  }
1216
1216
  function zs(s) {
1217
- return s instanceof I;
1217
+ return s instanceof D;
1218
1218
  }
1219
1219
  function qe(s, t, e, i = !1) {
1220
1220
  if (Object(s) !== s) return s;
@@ -1253,12 +1253,12 @@ function Us(s, t, e, i) {
1253
1253
  }
1254
1254
  const Xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1255
1255
  __proto__: null,
1256
- arrayEquals: te,
1256
+ arrayEquals: Qt,
1257
1257
  calculateDistance: Us,
1258
1258
  error: di,
1259
- fps2ms: st,
1259
+ fps2ms: it,
1260
1260
  get: Nr,
1261
- isBrowser: Ot,
1261
+ isBrowser: Et,
1262
1262
  isFunction: fi,
1263
1263
  isObject: _e,
1264
1264
  isObservable: zs,
@@ -1279,7 +1279,7 @@ class pi {
1279
1279
  start() {
1280
1280
  this.setupListeners(), this.interval = setInterval(() => {
1281
1281
  this.preStep();
1282
- }, st(this.serverFps ?? 60));
1282
+ }, it(this.serverFps ?? 60));
1283
1283
  }
1284
1284
  /**
1285
1285
  * Stop the control processing and cleanup resources
@@ -1754,7 +1754,7 @@ class Gr extends pi {
1754
1754
  super.listenInputs(), this.keyState = {};
1755
1755
  }
1756
1756
  }
1757
- var Q = { events: {}, publish: function(t, e) {
1757
+ var Z = { events: {}, publish: function(t, e) {
1758
1758
  this.events.hasOwnProperty(t) && this.events[t].forEach(function(i) {
1759
1759
  return i(e);
1760
1760
  });
@@ -1763,7 +1763,7 @@ var Q = { events: {}, publish: function(t, e) {
1763
1763
  var i = this.events[t].indexOf(e);
1764
1764
  i !== -1 && this.events[t].splice(i, 1);
1765
1765
  }).bind(this) };
1766
- } }, O = { CONNECT: { NATIVE: "gamepadconnected", ALIAS: "connect" }, DISCONNECT: { NATIVE: "gamepaddisconnected", ALIAS: "disconnect" }, BUTTON_PRESS: { ALIAS: "button_press" }, BUTTON_RELEASE: { ALIAS: "button_release" }, AXIS_MOVEMENT: { ALIAS: "axis_move" } }, Tt = { LEFT: { NAME: "left_stick", AXES: { X: 0, Y: 1 } }, RIGHT: { NAME: "right_stick", AXES: { X: 2, Y: 3 } } }, oe = { LEFT: "left", RIGHT: "right", TOP: "top", BOTTOM: "bottom" }, Xr = { button_0: 0, button_1: 1, button_2: 2, button_3: 3, button_4: 4, button_5: 5, button_6: 6, button_7: 7, button_8: 8, button_9: 9, button_10: 10, button_11: 11, button_12: 12, button_13: 13, button_14: 14, button_15: 15, button_16: 16, button_17: 17 }, Yr = 0.8, Xs = function(s) {
1766
+ } }, O = { CONNECT: { NATIVE: "gamepadconnected", ALIAS: "connect" }, DISCONNECT: { NATIVE: "gamepaddisconnected", ALIAS: "disconnect" }, BUTTON_PRESS: { ALIAS: "button_press" }, BUTTON_RELEASE: { ALIAS: "button_release" }, AXIS_MOVEMENT: { ALIAS: "axis_move" } }, Tt = { LEFT: { NAME: "left_stick", AXES: { X: 0, Y: 1 } }, RIGHT: { NAME: "right_stick", AXES: { X: 2, Y: 3 } } }, re = { LEFT: "left", RIGHT: "right", TOP: "top", BOTTOM: "bottom" }, Xr = { button_0: 0, button_1: 1, button_2: 2, button_3: 3, button_4: 4, button_5: 5, button_6: 6, button_7: 7, button_8: 8, button_9: 9, button_10: 10, button_11: 11, button_12: 12, button_13: 13, button_14: 14, button_15: 15, button_16: 16, button_17: 17 }, Yr = 0.8, Xs = function(s) {
1767
1767
  console.warn && typeof console.warn == "function" ? console.warn(s) : console.log(s);
1768
1768
  }, $r = function(s, t) {
1769
1769
  var e = [];
@@ -1774,20 +1774,20 @@ var Q = { events: {}, publish: function(t, e) {
1774
1774
  return !!s && !!s.type && !!s.playEffect && typeof s.playEffect == "function" || !1;
1775
1775
  }, Kr = function() {
1776
1776
  return !!window.navigator.getGamepads && typeof window.navigator.getGamepads == "function" || !1;
1777
- }, X = { loopStarted: !1, instances: {}, buttonEvents: { joypad: [] }, settings: { axisMovementThreshold: Yr }, remove: function(t) {
1777
+ }, G = { loopStarted: !1, instances: {}, buttonEvents: { joypad: [] }, settings: { axisMovementThreshold: Yr }, remove: function(t) {
1778
1778
  return delete this.instances[t];
1779
1779
  }, on: function(t, e) {
1780
1780
  switch (t) {
1781
1781
  case O.CONNECT.ALIAS:
1782
- return Q.subscribe(O.CONNECT.ALIAS, e);
1782
+ return Z.subscribe(O.CONNECT.ALIAS, e);
1783
1783
  case O.DISCONNECT.ALIAS:
1784
- return Q.subscribe(O.DISCONNECT.ALIAS, e);
1784
+ return Z.subscribe(O.DISCONNECT.ALIAS, e);
1785
1785
  case O.BUTTON_PRESS.ALIAS:
1786
- return Q.subscribe(O.BUTTON_PRESS.ALIAS, e);
1786
+ return Z.subscribe(O.BUTTON_PRESS.ALIAS, e);
1787
1787
  case O.BUTTON_RELEASE.ALIAS:
1788
- return Q.subscribe(O.BUTTON_RELEASE.ALIAS, e);
1788
+ return Z.subscribe(O.BUTTON_RELEASE.ALIAS, e);
1789
1789
  case O.AXIS_MOVEMENT.ALIAS:
1790
- return Q.subscribe(O.AXIS_MOVEMENT.ALIAS, e);
1790
+ return Z.subscribe(O.AXIS_MOVEMENT.ALIAS, e);
1791
1791
  }
1792
1792
  }, vibrate: function(t, e) {
1793
1793
  var i = t.vibrationActuator, n = e || this.settings.vibration;
@@ -1800,10 +1800,10 @@ var Q = { events: {}, publish: function(t, e) {
1800
1800
  var e = t.axisMovementThreshold, i = t.vibration, n = t.customButtonMapping, r = parseFloat(e);
1801
1801
  isNaN(r) || (this.settings.axisMovementThreshold = r), this.settings.vibration = i, this.settings.customButtonMapping = n;
1802
1802
  }, trigger: function(t, e) {
1803
- return Q.publish(t, e);
1803
+ return Z.publish(t, e);
1804
1804
  } }, Jr = function(s) {
1805
1805
  s.buttons.forEach(function(t, e) {
1806
- var i = X.settings.customButtonMapping, n = i || Xr, r = $r(e, n), a = X.buttonEvents;
1806
+ var i = G.settings.customButtonMapping, n = i || Xr, r = $r(e, n), a = G.buttonEvents;
1807
1807
  r && r.length && r.forEach(function(l) {
1808
1808
  t.pressed ? (a.joypad[s.index][l] || (a.joypad[s.index][l] = { pressed: !0, hold: !1, released: !1 }), a.joypad[s.index][l].button = t, a.joypad[s.index][l].index = e, a.joypad[s.index][l].gamepad = s) : !t.pressed && a.joypad[s.index][l] && (a.joypad[s.index][l].released = !0, a.joypad[s.index][l].hold = !1);
1809
1809
  });
@@ -1811,11 +1811,11 @@ var Q = { events: {}, publish: function(t, e) {
1811
1811
  }, Zr = function(s) {
1812
1812
  var t = function(a) {
1813
1813
  return new CustomEvent(O.AXIS_MOVEMENT.ALIAS, { detail: a });
1814
- }, e = X.settings.axisMovementThreshold, i = s.axes, n = i.length, r = n / 2;
1814
+ }, e = G.settings.axisMovementThreshold, i = s.axes, n = i.length, r = n / 2;
1815
1815
  i.forEach(function(a, l) {
1816
1816
  if (Math.abs(a) > e) {
1817
1817
  var c = null, f = null, p = a;
1818
- c = l < r ? Tt.LEFT.NAME : Tt.RIGHT.NAME, (l === Tt.LEFT.AXES.X || l === Tt.RIGHT.AXES.X) && (f = a < 0 ? oe.LEFT : oe.RIGHT), (l === Tt.LEFT.AXES.Y || l === Tt.RIGHT.AXES.Y) && (f = a < 0 ? oe.TOP : oe.BOTTOM);
1818
+ c = l < r ? Tt.LEFT.NAME : Tt.RIGHT.NAME, (l === Tt.LEFT.AXES.X || l === Tt.RIGHT.AXES.X) && (f = a < 0 ? re.LEFT : re.RIGHT), (l === Tt.LEFT.AXES.Y || l === Tt.RIGHT.AXES.Y) && (f = a < 0 ? re.TOP : re.BOTTOM);
1819
1819
  var o = { gamepad: s, totalSticks: r, stickMoved: c, directionOfMovement: f, axisMovementValue: p, axis: l };
1820
1820
  return window.dispatchEvent(t(o));
1821
1821
  }
@@ -1823,9 +1823,9 @@ var Q = { events: {}, publish: function(t, e) {
1823
1823
  }, Qr = function(s, t) {
1824
1824
  t[s].pressed ? (is(O.BUTTON_PRESS.ALIAS, t, s), t[s].pressed = !1, t[s].hold = !0, t[s].last_event = O.BUTTON_PRESS.ALIAS) : t[s].hold || t[s].released && t[s].last_event === O.BUTTON_PRESS.ALIAS && (is(O.BUTTON_RELEASE.ALIAS, t, s), delete t[s]);
1825
1825
  }, Fe = { id: null, start: function() {
1826
- var t = window.requestAnimationFrame || window.webkitRequestAnimationFrame, e = X.buttonEvents, i = window.navigator.getGamepads();
1826
+ var t = window.requestAnimationFrame || window.webkitRequestAnimationFrame, e = G.buttonEvents, i = window.navigator.getGamepads();
1827
1827
  i = Array.prototype.slice.call(i), i.forEach(function(n, r) {
1828
- n && (e.joypad[r] || (e.joypad[r] = {}), X.instances[r] = n, Jr(n), Zr(n));
1828
+ n && (e.joypad[r] || (e.joypad[r] = {}), G.instances[r] = n, Jr(n), Zr(n));
1829
1829
  }), e.joypad.forEach(function(n) {
1830
1830
  n && Object.keys(n).forEach(function(r) {
1831
1831
  Qr(r, n);
@@ -1836,17 +1836,17 @@ var Q = { events: {}, publish: function(t, e) {
1836
1836
  return e(t);
1837
1837
  } }, to = function() {
1838
1838
  window.addEventListener(O.CONNECT.NATIVE, function(s) {
1839
- if (Q.publish(O.CONNECT.ALIAS, s), !X.loopStarted)
1840
- return X.loopStarted = !0, Fe.start();
1839
+ if (Z.publish(O.CONNECT.ALIAS, s), !G.loopStarted)
1840
+ return G.loopStarted = !0, Fe.start();
1841
1841
  }), window.addEventListener(O.DISCONNECT.NATIVE, function(s) {
1842
- if (Q.publish(O.DISCONNECT.ALIAS, s), X.remove(s.gamepad.index), X.buttonEvents.joypad[s.gamepad.index] = null, !Object.keys(X.instances).length)
1843
- return X.loopStarted = !1, Fe.stop(Fe.id);
1842
+ if (Z.publish(O.DISCONNECT.ALIAS, s), G.remove(s.gamepad.index), G.buttonEvents.joypad[s.gamepad.index] = null, !Object.keys(G.instances).length)
1843
+ return G.loopStarted = !1, Fe.stop(Fe.id);
1844
1844
  }), window.addEventListener(O.BUTTON_PRESS.ALIAS, function(s) {
1845
- return Q.publish(O.BUTTON_PRESS.ALIAS, s);
1845
+ return Z.publish(O.BUTTON_PRESS.ALIAS, s);
1846
1846
  }), window.addEventListener(O.BUTTON_RELEASE.ALIAS, function(s) {
1847
- return Q.publish(O.BUTTON_RELEASE.ALIAS, s);
1847
+ return Z.publish(O.BUTTON_RELEASE.ALIAS, s);
1848
1848
  }), window.addEventListener(O.AXIS_MOVEMENT.ALIAS, function(s) {
1849
- return Q.publish(O.AXIS_MOVEMENT.ALIAS, s);
1849
+ return Z.publish(O.AXIS_MOVEMENT.ALIAS, s);
1850
1850
  });
1851
1851
  }, is = function(s, t, e) {
1852
1852
  var i = function(c) {
@@ -1855,7 +1855,7 @@ var Q = { events: {}, publish: function(t, e) {
1855
1855
  window.dispatchEvent(i(l));
1856
1856
  };
1857
1857
  to();
1858
- Kr() ? window.joypad = X : (window.joypad = {}, Xs("Your browser does not support the Gamepad API - https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API"));
1858
+ Kr() ? window.joypad = G : (window.joypad = {}, Xs("Your browser does not support the Gamepad API - https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API"));
1859
1859
  const He = {
1860
1860
  button_0: "action",
1861
1861
  button_1: "back",
@@ -2135,7 +2135,7 @@ class eo extends pi {
2135
2135
  this.joypad || this.initGamepad();
2136
2136
  }
2137
2137
  }
2138
- const We = {
2138
+ const je = {
2139
2139
  top: "up",
2140
2140
  bottom: "down",
2141
2141
  left: "left",
@@ -2149,7 +2149,7 @@ class io extends pi {
2149
2149
  constructor() {
2150
2150
  super(...arguments), this.joystickEnabled = !0, this.joystickConfig = {
2151
2151
  enabled: !0,
2152
- directionMapping: We,
2152
+ directionMapping: je,
2153
2153
  moveInterval: 50,
2154
2154
  threshold: 0.1
2155
2155
  }, this.joystickMoving = !1, this.joystickDirections = {}, this.joystickLastUpdate = 0, this.joystickMoveInterval = null, this.currentPower = 0;
@@ -2185,7 +2185,7 @@ class io extends pi {
2185
2185
  this.stopAllMovements();
2186
2186
  return;
2187
2187
  }
2188
- const e = this.joystickConfig.directionMapping || We, i = t.direction, n = e[i];
2188
+ const e = this.joystickConfig.directionMapping || je, i = t.direction, n = e[i];
2189
2189
  if (!n) {
2190
2190
  this.stopAllMovements();
2191
2191
  return;
@@ -2256,7 +2256,7 @@ class io extends pi {
2256
2256
  updateJoystickConfig(t) {
2257
2257
  this.joystickConfig = {
2258
2258
  enabled: t.enabled !== void 0 ? t.enabled : !0,
2259
- directionMapping: t.directionMapping || We,
2259
+ directionMapping: t.directionMapping || je,
2260
2260
  moveInterval: t.moveInterval || 50,
2261
2261
  threshold: t.threshold || 0.1
2262
2262
  };
@@ -2334,9 +2334,9 @@ class io extends pi {
2334
2334
  }
2335
2335
  }
2336
2336
  const Ke = {};
2337
- class $ {
2337
+ class Y {
2338
2338
  }
2339
- function q(s, t) {
2339
+ function $(s, t) {
2340
2340
  Ke[s] = t;
2341
2341
  }
2342
2342
  function mi(s, t) {
@@ -2345,7 +2345,7 @@ function mi(s, t) {
2345
2345
  const e = new Ke[t]();
2346
2346
  return e.onInit?.(s), e;
2347
2347
  }
2348
- var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configurable: !0 }), Dt, ae = (Dt = class extends Ct {
2348
+ var so = Object.defineProperty, I = (s, t) => so(s, "name", { value: t, configurable: !0 }), It, oe = (It = class extends Ct {
2349
2349
  _items = [];
2350
2350
  constructor(t = []) {
2351
2351
  super({
@@ -2355,7 +2355,7 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2355
2355
  }
2356
2356
  createProxy(t) {
2357
2357
  this._items = new Proxy(t, {
2358
- get: /* @__PURE__ */ D((e, i, n) => {
2358
+ get: /* @__PURE__ */ I((e, i, n) => {
2359
2359
  const r = e[i];
2360
2360
  return typeof r == "function" ? (...a) => {
2361
2361
  let l = "update", c, f = !1, p = [], o = !0;
@@ -2390,7 +2390,7 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2390
2390
  })), h;
2391
2391
  } : Reflect.get(e, i, n);
2392
2392
  }, "get"),
2393
- set: /* @__PURE__ */ D((e, i, n) => {
2393
+ set: /* @__PURE__ */ I((e, i, n) => {
2394
2394
  const r = isNaN(Number(i)) ? void 0 : Number(i);
2395
2395
  return e[i] = n, this.next({
2396
2396
  type: "update",
@@ -2411,7 +2411,7 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2411
2411
  items: t
2412
2412
  });
2413
2413
  }
2414
- }, D(Dt, "ArraySubject"), Dt), Yl = /* @__PURE__ */ D((s) => "_items" in s, "isArraySubject"), Lt, le = (Lt = class extends Ct {
2414
+ }, I(It, "ArraySubject"), It), Yl = /* @__PURE__ */ I((s) => "_items" in s, "isArraySubject"), Dt, ae = (Dt = class extends Ct {
2415
2415
  _obj;
2416
2416
  constructor(t = {}) {
2417
2417
  super({
@@ -2421,8 +2421,8 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2421
2421
  }
2422
2422
  createProxy(t) {
2423
2423
  this._obj = new Proxy(t, {
2424
- get: /* @__PURE__ */ D((e, i, n) => Reflect.get(e, i, n), "get"),
2425
- set: /* @__PURE__ */ D((e, i, n, r) => {
2424
+ get: /* @__PURE__ */ I((e, i, n) => Reflect.get(e, i, n), "get"),
2425
+ set: /* @__PURE__ */ I((e, i, n, r) => {
2426
2426
  const a = i, l = a in e ? "update" : "add";
2427
2427
  return e[a] = n, this.next({
2428
2428
  type: l,
@@ -2430,7 +2430,7 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2430
2430
  value: n
2431
2431
  }), !0;
2432
2432
  }, "set"),
2433
- deleteProperty: /* @__PURE__ */ D((e, i) => {
2433
+ deleteProperty: /* @__PURE__ */ I((e, i) => {
2434
2434
  const n = i;
2435
2435
  if (n in e) {
2436
2436
  const r = e[n];
@@ -2453,7 +2453,7 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2453
2453
  value: t
2454
2454
  });
2455
2455
  }
2456
- }, D(Lt, "ObjectSubject"), Lt), $l = /* @__PURE__ */ D((s) => "_obj" in s, "isObjectSubject"), no = /* @__PURE__ */ D(() => {
2456
+ }, I(Dt, "ObjectSubject"), Dt), $l = /* @__PURE__ */ I((s) => "_obj" in s, "isObjectSubject"), no = /* @__PURE__ */ I(() => {
2457
2457
  const s = "__REACTIVE_STORE__";
2458
2458
  if (typeof globalThis < "u")
2459
2459
  return globalThis[s] || (globalThis[s] = {
@@ -2476,26 +2476,26 @@ var so = Object.defineProperty, D = (s, t) => so(s, "name", { value: t, configur
2476
2476
  currentDependencyTracker: null,
2477
2477
  currentSubscriptionsTracker: null
2478
2478
  }), t[s];
2479
- }, "getGlobalReactiveStore"), B = no(), yi = /* @__PURE__ */ D((s) => {
2480
- B.currentDependencyTracker && B.currentDependencyTracker(s);
2479
+ }, "getGlobalReactiveStore"), N = no(), yi = /* @__PURE__ */ I((s) => {
2480
+ N.currentDependencyTracker && N.currentDependencyTracker(s);
2481
2481
  }, "trackDependency");
2482
2482
  function P(s, t) {
2483
2483
  let e;
2484
- Array.isArray(s) ? e = new ae(s) : typeof s == "object" && s !== null ? e = new le(s) : e = new Ct(s);
2485
- const i = /* @__PURE__ */ D(() => e instanceof ae ? e.items : e instanceof le ? e.obj : e.value, "getValue"), n = /* @__PURE__ */ D(function() {
2484
+ Array.isArray(s) ? e = new oe(s) : typeof s == "object" && s !== null ? e = new ae(s) : e = new Ct(s);
2485
+ const i = /* @__PURE__ */ I(() => e instanceof oe ? e.items : e instanceof ae ? e.obj : e.value, "getValue"), n = /* @__PURE__ */ I(function() {
2486
2486
  return yi(n), i();
2487
2487
  }, "fn");
2488
2488
  return n.set = (r) => {
2489
2489
  const a = i();
2490
2490
  let l = !0;
2491
- t?.equal ? l = !t.equal(a, r) : l = a !== r, l && (e instanceof ae ? e.items = r : e instanceof le ? e.obj = r : e.next(r));
2491
+ t?.equal ? l = !t.equal(a, r) : l = a !== r, l && (e instanceof oe ? e.items = r : e instanceof ae ? e.obj = r : e.next(r));
2492
2492
  }, n._isFrozen = !1, n.freeze = () => {
2493
2493
  n._isFrozen = !0;
2494
2494
  }, n.unfreeze = () => {
2495
- n._isFrozen = !1, e instanceof ae ? e.next({
2495
+ n._isFrozen = !1, e instanceof oe ? e.next({
2496
2496
  type: "init",
2497
2497
  items: e.items
2498
- }) : e instanceof le ? e.next({
2498
+ }) : e instanceof ae ? e.next({
2499
2499
  type: "init",
2500
2500
  value: e.obj
2501
2501
  }) : e.next(e.value);
@@ -2505,41 +2505,41 @@ function P(s, t) {
2505
2505
  }, n.update = (r) => {
2506
2506
  const a = r(i());
2507
2507
  n.set(a);
2508
- }, n.observable = e.asObservable().pipe(Ut(() => !n._isFrozen)), n._subject = e, n;
2508
+ }, n.observable = e.asObservable().pipe(zt(() => !n._isFrozen)), n._subject = e, n;
2509
2509
  }
2510
- D(P, "signal");
2510
+ I(P, "signal");
2511
2511
  function _(s) {
2512
2512
  return !!(s && s.observable);
2513
2513
  }
2514
- D(_, "isSignal");
2515
- function ee(s) {
2514
+ I(_, "isSignal");
2515
+ function te(s) {
2516
2516
  return _(s) && !!s.dependencies;
2517
2517
  }
2518
- D(ee, "isComputed");
2519
- function J(s, t) {
2518
+ I(te, "isComputed");
2519
+ function K(s, t) {
2520
2520
  const e = /* @__PURE__ */ new Set();
2521
2521
  let i = !0, n;
2522
- const r = B.currentDependencyTracker;
2523
- B.currentDependencyTracker = (f) => {
2522
+ const r = N.currentDependencyTracker;
2523
+ N.currentDependencyTracker = (f) => {
2524
2524
  e.add(f);
2525
- }, n = s(), s.isEffect && (t = n), B.currentDependencyTracker = r;
2525
+ }, n = s(), s.isEffect && (t = n), N.currentDependencyTracker = r;
2526
2526
  const a = [
2527
2527
  ...e
2528
2528
  ].map((f) => {
2529
- if (ee(f) && "dependencies" in f) {
2529
+ if (te(f) && "dependencies" in f) {
2530
2530
  const p = f;
2531
2531
  if (p.dependencies.size === 0)
2532
2532
  return new Ct(p()).asObservable();
2533
2533
  }
2534
2534
  return f.observable;
2535
- }), l = xe(a).pipe(Ut(() => !i), ui(() => s()), Wr(() => t?.())), c = /* @__PURE__ */ D(function() {
2535
+ }), l = xe(a).pipe(zt(() => !i), ui(() => s()), jr(() => t?.())), c = /* @__PURE__ */ I(function() {
2536
2536
  return yi(c), n;
2537
2537
  }, "fn");
2538
2538
  return c.observable = l, c.subscription = l.subscribe((f) => {
2539
2539
  n = f;
2540
- }), c.dependencies = e, B.currentSubscriptionsTracker?.(c.subscription), i = !1, c;
2540
+ }), c.dependencies = e, N.currentSubscriptionsTracker?.(c.subscription), i = !1, c;
2541
2541
  }
2542
- D(J, "computed");
2542
+ I(K, "computed");
2543
2543
  function ro(s, t) {
2544
2544
  const e = /* @__PURE__ */ new Set();
2545
2545
  let i = !0, n, r, a, l, c, f, p = !1, o, h = 0, u = null;
@@ -2549,7 +2549,7 @@ function ro(s, t) {
2549
2549
  const b = s;
2550
2550
  if (a = b.source, l = b.computation, c = b.equal, typeof a == "function" && !_(a)) {
2551
2551
  const w = a;
2552
- r = /* @__PURE__ */ D(() => {
2552
+ r = /* @__PURE__ */ I(() => {
2553
2553
  const x = w();
2554
2554
  if (l.length > 1) {
2555
2555
  const S = l(x, f);
@@ -2567,7 +2567,7 @@ function ro(s, t) {
2567
2567
  }, "computeFunction");
2568
2568
  } else {
2569
2569
  const w = a;
2570
- r = /* @__PURE__ */ D(() => {
2570
+ r = /* @__PURE__ */ I(() => {
2571
2571
  const x = w();
2572
2572
  if (l.length > 1) {
2573
2573
  const S = l(x, f);
@@ -2585,14 +2585,14 @@ function ro(s, t) {
2585
2585
  }, "computeFunction");
2586
2586
  }
2587
2587
  }
2588
- const d = B.currentDependencyTracker;
2589
- B.currentDependencyTracker = (b) => {
2588
+ const d = N.currentDependencyTracker;
2589
+ N.currentDependencyTracker = (b) => {
2590
2590
  e.add(b);
2591
- }, a && typeof a == "function" && !_(a) || a && _(a) && e.add(a), n = r(), B.currentDependencyTracker = d;
2591
+ }, a && typeof a == "function" && !_(a) || a && _(a) && e.add(a), n = r(), N.currentDependencyTracker = d;
2592
2592
  const m = new Ct(n), g = [
2593
2593
  ...e
2594
2594
  ].map((b) => {
2595
- if (ee(b) && "dependencies" in b) {
2595
+ if (te(b) && "dependencies" in b) {
2596
2596
  const w = b;
2597
2597
  if (w.dependencies.size === 0)
2598
2598
  return new Ct(w()).asObservable();
@@ -2600,11 +2600,11 @@ function ro(s, t) {
2600
2600
  return b.observable;
2601
2601
  });
2602
2602
  let y;
2603
- g.length > 0 ? y = xe(g).pipe(Ut(() => !i), ui(() => {
2603
+ g.length > 0 ? y = xe(g).pipe(zt(() => !i), ui(() => {
2604
2604
  const b = r();
2605
2605
  return c ? c(n, b) || (n = b, p = !1) : n !== b && (n = b, p = !1), n;
2606
- })) : y = m.asObservable().pipe(Ut(() => !i));
2607
- const v = /* @__PURE__ */ D(function() {
2606
+ })) : y = m.asObservable().pipe(zt(() => !i));
2607
+ const v = /* @__PURE__ */ I(function() {
2608
2608
  if (yi(v), p && e.size > 0) {
2609
2609
  if (u !== h) {
2610
2610
  const b = r();
@@ -2614,12 +2614,12 @@ function ro(s, t) {
2614
2614
  }
2615
2615
  return p ? o : (e.size === 0 && (n = r()), n);
2616
2616
  }, "fn");
2617
- return v.observable = new I((b) => {
2617
+ return v.observable = new D((b) => {
2618
2618
  const w = y.subscribe((S) => {
2619
2619
  e.size > 0 && (h++, p = !1, u = null), n = S, b.next(S);
2620
2620
  });
2621
2621
  let x;
2622
- return e.size === 0 && (x = m.pipe(Ut(() => !i)).subscribe((S) => {
2622
+ return e.size === 0 && (x = m.pipe(zt(() => !i)).subscribe((S) => {
2623
2623
  b.next(S);
2624
2624
  })), b.next(n), () => {
2625
2625
  w.unsubscribe(), x && x.unsubscribe();
@@ -2636,23 +2636,23 @@ function ro(s, t) {
2636
2636
  }),
2637
2637
  value: b
2638
2638
  })), p = !0, o = b, n = b, m.next(b);
2639
- }, B.currentSubscriptionsTracker?.(v.subscription), i = !1, v;
2639
+ }, N.currentSubscriptionsTracker?.(v.subscription), i = !1, v;
2640
2640
  }
2641
- D(ro, "linkedSignal");
2641
+ I(ro, "linkedSignal");
2642
2642
  function Ys(s) {
2643
- const t = B.currentDependencyTracker, e = B.currentSubscriptionsTracker;
2644
- B.currentDependencyTracker = null, B.currentSubscriptionsTracker = null;
2643
+ const t = N.currentDependencyTracker, e = N.currentSubscriptionsTracker;
2644
+ N.currentDependencyTracker = null, N.currentSubscriptionsTracker = null;
2645
2645
  try {
2646
2646
  return s();
2647
2647
  } finally {
2648
- B.currentDependencyTracker = t, B.currentSubscriptionsTracker = e;
2648
+ N.currentDependencyTracker = t, N.currentSubscriptionsTracker = e;
2649
2649
  }
2650
2650
  }
2651
- D(Ys, "untracked");
2651
+ I(Ys, "untracked");
2652
2652
  function H(s) {
2653
- return s.isEffect = !0, J(s);
2653
+ return s.isEffect = !0, K(s);
2654
2654
  }
2655
- D(H, "effect");
2655
+ I(H, "effect");
2656
2656
  function $s(s, t) {
2657
2657
  var e = {};
2658
2658
  for (var i in s) Object.prototype.hasOwnProperty.call(s, i) && t.indexOf(i) < 0 && (e[i] = s[i]);
@@ -2663,18 +2663,18 @@ function $s(s, t) {
2663
2663
  }
2664
2664
  var ss = function() {
2665
2665
  };
2666
- const Je = (s, t, e) => Math.min(Math.max(e, s), t), je = 1e-3, oo = 0.01, ao = 10, lo = 0.05, ho = 1;
2666
+ const Je = (s, t, e) => Math.min(Math.max(e, s), t), We = 1e-3, oo = 0.01, ao = 10, lo = 0.05, ho = 1;
2667
2667
  function co({ duration: s = 800, bounce: t = 0.25, velocity: e = 0, mass: i = 1 }) {
2668
2668
  let n, r, a = 1 - t;
2669
2669
  a = Je(lo, ho, a), s = Je(oo, ao, s / 1e3), a < 1 ? (n = (f) => {
2670
2670
  const p = f * a, o = p * s, h = p - e, u = Ze(f, a), d = Math.exp(-o);
2671
- return je - h / u * d;
2671
+ return We - h / u * d;
2672
2672
  }, r = (f) => {
2673
2673
  const o = f * a * s, h = o * e + e, u = Math.pow(a, 2) * Math.pow(f, 2) * s, d = Math.exp(-o), m = Ze(Math.pow(f, 2), a);
2674
- return (-n(f) + je > 0 ? -1 : 1) * ((h - u) * d) / m;
2674
+ return (-n(f) + We > 0 ? -1 : 1) * ((h - u) * d) / m;
2675
2675
  }) : (n = (f) => {
2676
2676
  const p = Math.exp(-f * s), o = (f - e) * s + 1;
2677
- return -je + p * o;
2677
+ return -We + p * o;
2678
2678
  }, r = (f) => {
2679
2679
  const p = Math.exp(-f * s), o = (e - f) * (s * s);
2680
2680
  return p * o;
@@ -2762,8 +2762,8 @@ gi.needsInterpolation = (s, t) => typeof s == "string" || typeof t == "string";
2762
2762
  const rs = (s) => 0, qs = (s, t, e) => {
2763
2763
  const i = t - s;
2764
2764
  return i === 0 ? 1 : (e - s) / i;
2765
- }, vi = (s, t, e) => -e * s + e * t + s, Ks = (s, t) => (e) => Math.max(Math.min(e, t), s), Gt = (s) => s % 1 ? Number(s.toFixed(5)) : s, ye = /(-)?([\d]*\.?[\d])+/g, Qe = /(#[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, go = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
2766
- function ie(s) {
2765
+ }, vi = (s, t, e) => -e * s + e * t + s, Ks = (s, t) => (e) => Math.max(Math.min(e, t), s), Ut = (s) => s % 1 ? Number(s.toFixed(5)) : s, ye = /(-)?([\d]*\.?[\d])+/g, Qe = /(#[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, go = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
2766
+ function ee(s) {
2767
2767
  return typeof s == "string";
2768
2768
  }
2769
2769
  const Se = {
@@ -2773,13 +2773,13 @@ const Se = {
2773
2773
  }, Js = Object.assign(Object.assign({}, Se), { transform: Ks(0, 1) });
2774
2774
  Object.assign(Object.assign({}, Se), { default: 1 });
2775
2775
  const vo = (s) => ({
2776
- test: (t) => ie(t) && t.endsWith(s) && t.split(" ").length === 1,
2776
+ test: (t) => ee(t) && t.endsWith(s) && t.split(" ").length === 1,
2777
2777
  parse: parseFloat,
2778
2778
  transform: (t) => `${t}${s}`
2779
- }), Xt = vo("%");
2780
- Object.assign(Object.assign({}, Xt), { parse: (s) => Xt.parse(s) / 100, transform: (s) => Xt.transform(s * 100) });
2781
- const bi = (s, t) => (e) => !!(ie(e) && go.test(e) && e.startsWith(s) || t && Object.prototype.hasOwnProperty.call(e, t)), Zs = (s, t, e) => (i) => {
2782
- if (!ie(i))
2779
+ }), Gt = vo("%");
2780
+ Object.assign(Object.assign({}, Gt), { parse: (s) => Gt.parse(s) / 100, transform: (s) => Gt.transform(s * 100) });
2781
+ const bi = (s, t) => (e) => !!(ee(e) && go.test(e) && e.startsWith(s) || t && Object.prototype.hasOwnProperty.call(e, t)), Zs = (s, t, e) => (i) => {
2782
+ if (!ee(i))
2783
2783
  return i;
2784
2784
  const [n, r, a, l] = i.match(ye);
2785
2785
  return {
@@ -2791,11 +2791,11 @@ const bi = (s, t) => (e) => !!(ie(e) && go.test(e) && e.startsWith(s) || t && Ob
2791
2791
  }, xt = {
2792
2792
  test: bi("hsl", "hue"),
2793
2793
  parse: Zs("hue", "saturation", "lightness"),
2794
- transform: ({ hue: s, saturation: t, lightness: e, alpha: i = 1 }) => "hsla(" + Math.round(s) + ", " + Xt.transform(Gt(t)) + ", " + Xt.transform(Gt(e)) + ", " + Gt(Js.transform(i)) + ")"
2794
+ transform: ({ hue: s, saturation: t, lightness: e, alpha: i = 1 }) => "hsla(" + Math.round(s) + ", " + Gt.transform(Ut(t)) + ", " + Gt.transform(Ut(e)) + ", " + Ut(Js.transform(i)) + ")"
2795
2795
  }, bo = Ks(0, 255), Be = Object.assign(Object.assign({}, Se), { transform: (s) => Math.round(bo(s)) }), pt = {
2796
2796
  test: bi("rgb", "red"),
2797
2797
  parse: Zs("red", "green", "blue"),
2798
- transform: ({ red: s, green: t, blue: e, alpha: i = 1 }) => "rgba(" + Be.transform(s) + ", " + Be.transform(t) + ", " + Be.transform(e) + ", " + Gt(Js.transform(i)) + ")"
2798
+ transform: ({ red: s, green: t, blue: e, alpha: i = 1 }) => "rgba(" + Be.transform(s) + ", " + Be.transform(t) + ", " + Be.transform(e) + ", " + Ut(Js.transform(i)) + ")"
2799
2799
  };
2800
2800
  function wo(s) {
2801
2801
  let t = "", e = "", i = "", n = "";
@@ -2813,11 +2813,11 @@ const ti = {
2813
2813
  }, Ae = {
2814
2814
  test: (s) => pt.test(s) || ti.test(s) || xt.test(s),
2815
2815
  parse: (s) => pt.test(s) ? pt.parse(s) : xt.test(s) ? xt.parse(s) : ti.parse(s),
2816
- transform: (s) => ie(s) ? s : s.hasOwnProperty("red") ? pt.transform(s) : xt.transform(s)
2816
+ transform: (s) => ee(s) ? s : s.hasOwnProperty("red") ? pt.transform(s) : xt.transform(s)
2817
2817
  }, Qs = "${c}", tn = "${n}";
2818
2818
  function xo(s) {
2819
2819
  var t, e, i, n;
2820
- return isNaN(s) && ie(s) && ((e = (t = s.match(ye)) === null || t === void 0 ? void 0 : t.length) !== null && e !== void 0 ? e : 0) + ((n = (i = s.match(Qe)) === null || i === void 0 ? void 0 : i.length) !== null && n !== void 0 ? n : 0) > 0;
2820
+ return isNaN(s) && ee(s) && ((e = (t = s.match(ye)) === null || t === void 0 ? void 0 : t.length) !== null && e !== void 0 ? e : 0) + ((n = (i = s.match(Qe)) === null || i === void 0 ? void 0 : i.length) !== null && n !== void 0 ? n : 0) > 0;
2821
2821
  }
2822
2822
  function en(s) {
2823
2823
  typeof s == "number" && (s = `${s}`);
@@ -2836,7 +2836,7 @@ function nn(s) {
2836
2836
  return (r) => {
2837
2837
  let a = i;
2838
2838
  for (let l = 0; l < n; l++)
2839
- a = a.replace(l < e ? Qs : tn, l < e ? Ae.transform(r[l]) : Gt(r[l]));
2839
+ a = a.replace(l < e ? Qs : tn, l < e ? Ae.transform(r[l]) : Ut(r[l]));
2840
2840
  return a;
2841
2841
  };
2842
2842
  }
@@ -2957,11 +2957,11 @@ function un(s, t, { clamp: e = !0, ease: i, mixer: n } = {}) {
2957
2957
  const Ce = (s) => (t) => 1 - s(1 - t), wi = (s) => (t) => t <= 0.5 ? s(2 * t) / 2 : (2 - s(2 * (1 - t))) / 2, Lo = (s) => (t) => Math.pow(t, s), fn = (s) => (t) => t * t * ((s + 1) * t - s), Fo = (s) => {
2958
2958
  const t = fn(s);
2959
2959
  return (e) => (e *= 2) < 1 ? 0.5 * t(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1)));
2960
- }, dn = 1.525, Ho = 4 / 11, Ro = 8 / 11, Wo = 9 / 10, jo = (s) => s, xi = Lo(2), Bo = Ce(xi), pn = wi(xi), mn = (s) => 1 - Math.sin(Math.acos(s)), yn = Ce(mn), No = wi(yn), _i = fn(dn), Vo = Ce(_i), zo = wi(_i), Uo = Fo(dn), Go = 4356 / 361, Xo = 35442 / 1805, Yo = 16061 / 1805, ge = (s) => {
2960
+ }, dn = 1.525, Ho = 4 / 11, Ro = 8 / 11, jo = 9 / 10, Wo = (s) => s, xi = Lo(2), Bo = Ce(xi), pn = wi(xi), mn = (s) => 1 - Math.sin(Math.acos(s)), yn = Ce(mn), No = wi(yn), _i = fn(dn), Vo = Ce(_i), zo = wi(_i), Uo = Fo(dn), Go = 4356 / 361, Xo = 35442 / 1805, Yo = 16061 / 1805, ge = (s) => {
2961
2961
  if (s === 1 || s === 0)
2962
2962
  return s;
2963
2963
  const t = s * s;
2964
- return s < Ho ? 7.5625 * t : s < Ro ? 9.075 * t - 9.9 * s + 3.4 : s < Wo ? Go * t - Xo * s + Yo : 10.8 * s * s - 20.52 * s + 10.72;
2964
+ return s < Ho ? 7.5625 * t : s < Ro ? 9.075 * t - 9.9 * s + 3.4 : s < jo ? Go * t - Xo * s + Yo : 10.8 * s * s - 20.52 * s + 10.72;
2965
2965
  }, $o = Ce(ge), qo = (s) => s < 0.5 ? 0.5 * (1 - ge(1 - s * 2)) : 0.5 * ge(s * 2 - 1) + 0.5;
2966
2966
  function Ko(s, t) {
2967
2967
  return s.map(() => t || pn).splice(0, s.length - 1);
@@ -3038,25 +3038,25 @@ function ia(s) {
3038
3038
  return l;
3039
3039
  }
3040
3040
  const sa = 40;
3041
- let ei = !0, Jt = !1, ii = !1;
3042
- const Yt = {
3041
+ let ei = !0, Kt = !1, ii = !1;
3042
+ const Xt = {
3043
3043
  delta: 0,
3044
3044
  timestamp: 0
3045
- }, se = [
3045
+ }, ie = [
3046
3046
  "read",
3047
3047
  "update",
3048
3048
  "preRender",
3049
3049
  "render",
3050
3050
  "postRender"
3051
- ], ke = se.reduce((s, t) => (s[t] = ia(() => Jt = !0), s), {}), na = se.reduce((s, t) => {
3051
+ ], ke = ie.reduce((s, t) => (s[t] = ia(() => Kt = !0), s), {}), na = ie.reduce((s, t) => {
3052
3052
  const e = ke[t];
3053
- return s[t] = (i, n = !1, r = !1) => (Jt || aa(), e.schedule(i, n, r)), s;
3054
- }, {}), ra = se.reduce((s, t) => (s[t] = ke[t].cancel, s), {});
3055
- se.reduce((s, t) => (s[t] = () => ke[t].process(Yt), s), {});
3056
- const oa = (s) => ke[s].process(Yt), bn = (s) => {
3057
- Jt = !1, Yt.delta = ei ? gn : Math.max(Math.min(s - Yt.timestamp, sa), 1), Yt.timestamp = s, ii = !0, se.forEach(oa), ii = !1, Jt && (ei = !1, vn(bn));
3053
+ return s[t] = (i, n = !1, r = !1) => (Kt || aa(), e.schedule(i, n, r)), s;
3054
+ }, {}), ra = ie.reduce((s, t) => (s[t] = ke[t].cancel, s), {});
3055
+ ie.reduce((s, t) => (s[t] = () => ke[t].process(Xt), s), {});
3056
+ const oa = (s) => ke[s].process(Xt), bn = (s) => {
3057
+ Kt = !1, Xt.delta = ei ? gn : Math.max(Math.min(s - Xt.timestamp, sa), 1), Xt.timestamp = s, ii = !0, ie.forEach(oa), ii = !1, Kt && (ei = !1, vn(bn));
3058
3058
  }, aa = () => {
3059
- Jt = !0, ei = !0, ii || vn(bn);
3059
+ Kt = !0, ei = !0, ii || vn(bn);
3060
3060
  };
3061
3061
  function wn(s, t, e = 0) {
3062
3062
  return s - t - e;
@@ -3085,18 +3085,18 @@ function xn(s) {
3085
3085
  function L() {
3086
3086
  v++, c === "reverse" ? (S = v % 2 === 0, a = la(a, b, f, S)) : (a = wn(a, b, f), c === "mirror" && A.flipTarget()), x = !1, u && u();
3087
3087
  }
3088
- function W() {
3088
+ function j() {
3089
3089
  y.stop(), h && h();
3090
3090
  }
3091
- function Nt(j) {
3092
- if (S || (j = -j), a += j, !x) {
3093
- const it = A.next(Math.max(0, a));
3094
- w = it.value, C && (w = C(w)), x = S ? it.done : a <= 0;
3091
+ function Bt(W) {
3092
+ if (S || (W = -W), a += W, !x) {
3093
+ const et = A.next(Math.max(0, a));
3094
+ w = et.value, C && (w = C(w)), x = S ? et.done : a <= 0;
3095
3095
  }
3096
- d?.(w), x && (v === 0 && (b ?? (b = a)), v < l ? ha(a, b, f, S) && L() : W());
3096
+ d?.(w), x && (v === 0 && (b ?? (b = a)), v < l ? ha(a, b, f, S) && L() : j());
3097
3097
  }
3098
3098
  function ut() {
3099
- p?.(), y = r(Nt), y.start();
3099
+ p?.(), y = r(Bt), y.start();
3100
3100
  }
3101
3101
  return n && ut(), {
3102
3102
  stop: () => {
@@ -3128,7 +3128,7 @@ const ua = (s) => {
3128
3128
  function fa() {
3129
3129
  return globalThis.__CANVAS_ENGINE_TICK__;
3130
3130
  }
3131
- function Zt(s) {
3131
+ function Jt(s) {
3132
3132
  return s.animatedState !== void 0;
3133
3133
  }
3134
3134
  function _n(s, t = {}) {
@@ -3198,7 +3198,7 @@ async function ql(s) {
3198
3198
  for (const t of s)
3199
3199
  Array.isArray(t) ? await Promise.all(t.map((e) => e())) : await t();
3200
3200
  }
3201
- const si = {}, G = (s) => s && typeof s == "object" && "tag" in s && "props" in s && "componentInstance" in s, cs = (s) => typeof s == "string" || typeof s == "number" || typeof s == "boolean" || s === null || s === void 0, da = {
3201
+ const si = {}, st = (s) => s && typeof s == "object" && "tag" in s && "props" in s && "componentInstance" in s, cs = (s) => typeof s == "string" || typeof s == "number" || typeof s == "boolean" || s === null || s === void 0, da = {
3202
3202
  Sprite: "DOMSprite"
3203
3203
  }, pa = /* @__PURE__ */ new Set(["DOMContainer", "DOMElement", "DOMSprite"]), ma = /* @__PURE__ */ new Set([
3204
3204
  "Canvas",
@@ -3231,14 +3231,14 @@ const si = {}, G = (s) => s && typeof s == "object" && "tag" in s && "props" in
3231
3231
  return !1;
3232
3232
  }, ga = (s) => {
3233
3233
  s.propSubscriptions?.forEach((t) => t.unsubscribe()), s.effectSubscriptions?.forEach((t) => t.unsubscribe()), s.effectUnmounts?.forEach((t) => t?.());
3234
- }, Mt = (s, t) => {
3234
+ }, le = (s, t) => {
3235
3235
  if (!ya(s) || pa.has(t.tag))
3236
3236
  return t;
3237
3237
  const e = da[t.tag];
3238
3238
  if (e) {
3239
3239
  ga(t);
3240
3240
  const i = t.propObservables ?? t.props;
3241
- return N(e, i);
3241
+ return V(e, i);
3242
3242
  }
3243
3243
  if (ma.has(t.tag))
3244
3244
  throw new Error(
@@ -3287,22 +3287,22 @@ function ot(s) {
3287
3287
  function Ve(s, t) {
3288
3288
  if (!s.propObservables) return;
3289
3289
  const e = (i) => {
3290
- if (_(i) && Zt(i)) {
3290
+ if (_(i) && Jt(i)) {
3291
3291
  const n = i;
3292
3292
  t ? n.pause() : n.resume();
3293
- } else _e(i) && !G(i) && Object.values(i).forEach(e);
3293
+ } else _e(i) && !st(i) && Object.values(i).forEach(e);
3294
3294
  };
3295
3295
  Object.values(s.propObservables).forEach(e);
3296
3296
  }
3297
- function V(s) {
3297
+ function B(s) {
3298
3298
  if (Array.isArray(s)) {
3299
- s.forEach((t) => V(t));
3299
+ s.forEach((t) => B(t));
3300
3300
  return;
3301
3301
  }
3302
3302
  if (s) {
3303
3303
  if (s.props?.children)
3304
3304
  for (let t of s.props.children)
3305
- V(t);
3305
+ B(t);
3306
3306
  for (let t in s.directives)
3307
3307
  s.directives[t].onDestroy?.(s);
3308
3308
  s.componentInstance && s.componentInstance.onDestroy ? s.componentInstance.onDestroy(s.parent, () => {
@@ -3314,7 +3314,7 @@ function V(s) {
3314
3314
  }) : (s.propSubscriptions?.forEach((t) => t.unsubscribe()), s.effectSubscriptions?.forEach((t) => t.unsubscribe()), s.effectUnmounts?.forEach((t) => t?.()));
3315
3315
  }
3316
3316
  }
3317
- function N(s, t) {
3317
+ function V(s, t) {
3318
3318
  if (!si[s])
3319
3319
  throw new Error(`Component ${s} is not registered`);
3320
3320
  const e = new si[s](), i = {
@@ -3329,7 +3329,7 @@ function N(s, t) {
3329
3329
  effectSubscriptions: [],
3330
3330
  effectMounts: [],
3331
3331
  destroy() {
3332
- V(this);
3332
+ B(this);
3333
3333
  },
3334
3334
  allElements: new At(),
3335
3335
  isFrozen: !1
@@ -3362,10 +3362,10 @@ function N(s, t) {
3362
3362
  i.propSubscriptions.push(
3363
3363
  g.observable.subscribe((y) => {
3364
3364
  if (ot(i)) {
3365
- Zt(g) && g.pause();
3365
+ Jt(g) && g.pause();
3366
3366
  return;
3367
3367
  }
3368
- if (Zt(g) && g.resume(), u(h, d, y), i.directives[d] && i.directives[d].onUpdate?.(y, i), d == "tick")
3368
+ if (Jt(g) && g.resume(), u(h, d, y), i.directives[d] && i.directives[d].onUpdate?.(y, i), d == "tick")
3369
3369
  return ot(i), void 0;
3370
3370
  e.onUpdate?.(
3371
3371
  h == "" ? {
@@ -3375,7 +3375,7 @@ function N(s, t) {
3375
3375
  })
3376
3376
  );
3377
3377
  } else
3378
- d === "freeze" && (i.isFrozen = m === !0, Ve(i, i.isFrozen)), _e(m) && d != "context" && !G(m) ? p(m, (h ? h + "." : "") + d) : u(h, d, m);
3378
+ d === "freeze" && (i.isFrozen = m === !0, Ve(i, i.isFrozen)), _e(m) && d != "context" && !st(m) ? p(m, (h ? h + "." : "") + d) : u(h, d, m);
3379
3379
  });
3380
3380
  };
3381
3381
  p(t);
@@ -3430,76 +3430,78 @@ function N(s, t) {
3430
3430
  const m = d?.value ?? d;
3431
3431
  if (!m)
3432
3432
  throw new Error(`attach in ${p.tag} is undefined or null, add a component`);
3433
- u && V(u), u = m, await f(p, m), h(void 0);
3433
+ u && B(u), u = m, await f(p, m), h(void 0);
3434
3434
  }));
3435
3435
  }) : p.props.children.push(p.props.attach)), !!p.props.children)
3436
3436
  for (let o of p.props.children)
3437
3437
  o && await f(p, o);
3438
3438
  }
3439
3439
  async function f(p, o) {
3440
- if (yt(o) && (o = await o), o instanceof I) {
3441
- const h = o.subscribe(
3442
- (u) => {
3443
- if (u && typeof u == "object" && "elements" in u) {
3440
+ if (yt(o) && (o = await o), o instanceof D) {
3441
+ const h = /* @__PURE__ */ new Map(), u = (y, v) => {
3442
+ if (h.has(y))
3443
+ return;
3444
+ const b = le(p, y);
3445
+ h.set(y, b), l(p, b, v), c(b);
3446
+ }, d = (y) => {
3447
+ h.forEach((v, b) => {
3448
+ y.has(b) || (h.delete(b), v !== b && B(v));
3449
+ });
3450
+ }, m = (y, v, b) => {
3451
+ if (y instanceof D) {
3452
+ f(p, y);
3453
+ return;
3454
+ }
3455
+ if (Array.isArray(y)) {
3456
+ y.forEach(
3457
+ (w) => m(w, v, b)
3458
+ );
3459
+ return;
3460
+ }
3461
+ st(y) && (v.add(y), u(y, b));
3462
+ }, g = o.subscribe(
3463
+ (y) => {
3464
+ if (y && typeof y == "object" && "elements" in y) {
3444
3465
  const {
3445
- elements: d,
3446
- prev: m
3447
- } = u, g = d.filter((y) => y !== null);
3448
- if (m) {
3449
- g.forEach(async (y) => {
3450
- const v = p.props.children.indexOf(m.props.key);
3451
- if (y instanceof I)
3452
- await f(p, y);
3453
- else if (G(y)) {
3454
- const b = Mt(p, y);
3455
- l(p, b, v + 1), c(b);
3456
- }
3457
- });
3466
+ elements: v,
3467
+ prev: b
3468
+ } = y, w = v.filter((S) => S !== null), x = /* @__PURE__ */ new Set();
3469
+ if (b) {
3470
+ w.forEach((S) => {
3471
+ const C = p.props.children.indexOf(b.props.key);
3472
+ m(S, x, C + 1);
3473
+ }), d(x);
3458
3474
  return;
3459
3475
  }
3460
- g.forEach(async (y) => {
3461
- if (Array.isArray(y))
3462
- y.forEach(async (v) => {
3463
- if (v instanceof I)
3464
- await f(p, v);
3465
- else if (G(v)) {
3466
- const b = Mt(p, v);
3467
- l(p, b), c(b);
3468
- }
3469
- });
3470
- else if (y instanceof I)
3471
- await f(p, y);
3472
- else if (G(y)) {
3473
- const v = Mt(p, y);
3474
- l(p, v), c(v);
3475
- }
3476
- });
3477
- } else if (G(u)) {
3478
- const d = Mt(p, u);
3479
- l(p, d), c(d);
3480
- } else Array.isArray(u) && u.forEach(async (d) => {
3481
- if (d instanceof I)
3482
- await f(p, d);
3483
- else if (G(d)) {
3484
- const m = Mt(p, d);
3485
- l(p, m), c(m);
3476
+ w.forEach((S, C) => {
3477
+ m(S, x, C);
3478
+ }), d(x);
3479
+ } else if (st(y)) {
3480
+ const v = le(p, y);
3481
+ l(p, v), c(v);
3482
+ } else Array.isArray(y) && y.forEach(async (v) => {
3483
+ if (v instanceof D)
3484
+ await f(p, v);
3485
+ else if (st(v)) {
3486
+ const b = le(p, v);
3487
+ l(p, b), c(b);
3486
3488
  }
3487
3489
  });
3488
3490
  n.next(void 0);
3489
3491
  }
3490
3492
  );
3491
- p.effectSubscriptions.push(h);
3492
- } else if (G(o)) {
3493
- const h = Mt(p, o);
3493
+ p.effectSubscriptions.push(g);
3494
+ } else if (st(o)) {
3495
+ const h = le(p, o);
3494
3496
  l(p, h), await c(h);
3495
3497
  }
3496
3498
  }
3497
3499
  return i;
3498
3500
  }
3499
3501
  function Kl(s, t) {
3500
- return ee(s) && s.dependencies.size == 0 ? s = P(s()) : _(s) || (s = P(s)), Rr(() => {
3502
+ return te(s) && s.dependencies.size == 0 ? s = P(s()) : _(s) || (s = P(s)), Rr(() => {
3501
3503
  let e = [], i = /* @__PURE__ */ new Map(), n = !0;
3502
- const r = (l) => l ? G(l) ? l : {
3504
+ const r = (l) => l ? st(l) ? l : {
3503
3505
  tag: "fragment",
3504
3506
  props: { children: Array.isArray(l) ? l : [l] },
3505
3507
  componentInstance: {},
@@ -3511,12 +3513,12 @@ function Kl(s, t) {
3511
3513
  parent: null,
3512
3514
  directives: {},
3513
3515
  destroy() {
3514
- V(this);
3516
+ B(this);
3515
3517
  },
3516
3518
  allElements: new At(),
3517
3519
  isFrozen: !1
3518
3520
  } : null, a = (l) => Array.isArray(l());
3519
- return new I((l) => {
3521
+ return new D((l) => {
3520
3522
  const c = a(s) ? s.observable.subscribe((f) => {
3521
3523
  if (n) {
3522
3524
  n = !1, e.forEach((h) => h.destroy()), e = [], i.clear();
@@ -3531,7 +3533,7 @@ function Kl(s, t) {
3531
3533
  }
3532
3534
  const p = Array.isArray(f) || f && typeof f == "object" && !("type" in f);
3533
3535
  if (f.type === "init" || f.type === "reset" || p) {
3534
- e.forEach((h) => V(h)), e = [], i.clear();
3536
+ e.forEach((h) => B(h)), e = [], i.clear();
3535
3537
  const o = s();
3536
3538
  o && o.forEach((h, u) => {
3537
3539
  const d = r(t(h, u));
@@ -3545,7 +3547,7 @@ function Kl(s, t) {
3545
3547
  e.splice(f.index, 0, ...o);
3546
3548
  } else if (f.type === "remove" && f.index !== void 0)
3547
3549
  e.splice(f.index, 1).forEach((h) => {
3548
- V(h), i.delete(f.index);
3550
+ B(h), i.delete(f.index);
3549
3551
  });
3550
3552
  else if (f.type === "update" && f.index !== void 0 && f.items.length === 1) {
3551
3553
  const o = f.index, h = f.items[0];
@@ -3554,7 +3556,7 @@ function Kl(s, t) {
3554
3556
  u ? (e.splice(o, 0, u), i.set(o, u)) : console.warn(`Element creation returned null for index ${o} during add-like update.`);
3555
3557
  } else {
3556
3558
  const u = e[o];
3557
- V(u);
3559
+ B(u);
3558
3560
  const d = r(t(h, o));
3559
3561
  d ? (e[o] = d, i.set(o, d)) : (e.splice(o, 1), i.delete(o));
3560
3562
  }
@@ -3566,7 +3568,7 @@ function Kl(s, t) {
3566
3568
  }) : s.observable.subscribe((f) => {
3567
3569
  const p = f.key;
3568
3570
  if (n) {
3569
- n = !1, e.forEach((h) => V(h)), e = [], i.clear();
3571
+ n = !1, e.forEach((h) => B(h)), e = [], i.clear();
3570
3572
  const o = s();
3571
3573
  o && Object.entries(o).forEach(([h, u]) => {
3572
3574
  const d = r(t(u, h));
@@ -3577,7 +3579,7 @@ function Kl(s, t) {
3577
3579
  return;
3578
3580
  }
3579
3581
  if (f.type === "init" || f.type === "reset") {
3580
- e.forEach((h) => V(h)), e = [], i.clear();
3582
+ e.forEach((h) => B(h)), e = [], i.clear();
3581
3583
  const o = s();
3582
3584
  o && Object.entries(o).forEach(([h, u]) => {
3583
3585
  const d = r(t(u, h));
@@ -3590,13 +3592,13 @@ function Kl(s, t) {
3590
3592
  const o = e.findIndex((h) => i.get(p) === h);
3591
3593
  if (o !== -1) {
3592
3594
  const [h] = e.splice(o, 1);
3593
- V(h), i.delete(p);
3595
+ B(h), i.delete(p);
3594
3596
  }
3595
3597
  } else if (f.type === "update" && f.key && f.value !== void 0) {
3596
3598
  const o = e.findIndex((h) => i.get(p) === h);
3597
3599
  if (o !== -1) {
3598
3600
  const h = e[o];
3599
- V(h);
3601
+ B(h);
3600
3602
  const u = r(t(f.value, p));
3601
3603
  u && (e[o] = u, i.set(p, u));
3602
3604
  }
@@ -3607,16 +3609,16 @@ function Kl(s, t) {
3607
3609
  });
3608
3610
  });
3609
3611
  return () => {
3610
- c.unsubscribe(), e.forEach((f) => V(f));
3612
+ c.unsubscribe(), e.forEach((f) => B(f));
3611
3613
  };
3612
3614
  });
3613
- }).pipe(jr({ bufferSize: 1, refCount: !0 }));
3615
+ }).pipe(Wr({ bufferSize: 1, refCount: !0 }));
3614
3616
  }
3615
3617
  function Jl(s, t, ...e) {
3616
3618
  let i = null, n = -1;
3617
3619
  const r = [];
3618
3620
  let a = null;
3619
- const l = (f) => _(f) ? f : typeof f == "function" ? J(f) : P(f);
3621
+ const l = (f) => _(f) ? f : typeof f == "function" ? K(f) : P(f);
3620
3622
  for (const f of e)
3621
3623
  if (Array.isArray(f))
3622
3624
  r.push({
@@ -3631,7 +3633,7 @@ function Jl(s, t, ...e) {
3631
3633
  { condition: l(s), elementFn: t },
3632
3634
  ...r
3633
3635
  ];
3634
- return new I((f) => {
3636
+ return new D((f) => {
3635
3637
  const p = [], o = () => {
3636
3638
  let h = -1;
3637
3639
  for (let m = 0; m < c.length; m++) {
@@ -3643,7 +3645,7 @@ function Jl(s, t, ...e) {
3643
3645
  }
3644
3646
  const u = h === -1 && a, d = u ? -2 : h;
3645
3647
  if (d !== n)
3646
- if (i && (V(i), i = null), n = d, u) {
3648
+ if (i && (B(i), i = null), n = d, u) {
3647
3649
  let m = a();
3648
3650
  yt(m) ? me(m).subscribe((g) => {
3649
3651
  i = g, f.next({
@@ -3678,11 +3680,11 @@ function Jl(s, t, ...e) {
3678
3680
  })
3679
3681
  );
3680
3682
  }), o(), () => {
3681
- p.forEach((h) => h.unsubscribe()), i && V(i);
3683
+ p.forEach((h) => h.unsubscribe()), i && B(i);
3682
3684
  };
3683
3685
  }).pipe(Ns());
3684
3686
  }
3685
- class ba extends $ {
3687
+ class ba extends Y {
3686
3688
  constructor() {
3687
3689
  super(...arguments), this.keyboardControls = null, this.gamepadControls = null, this.joystickControls = null, this.freezeSubscription = null, this.element = null;
3688
3690
  }
@@ -3802,8 +3804,8 @@ class ba extends $ {
3802
3804
  return this.joystickControls;
3803
3805
  }
3804
3806
  }
3805
- q("controls", ba);
3806
- class wa extends $ {
3807
+ $("controls", ba);
3808
+ class wa extends Y {
3807
3809
  constructor() {
3808
3810
  super(...arguments), this.fps = 60, this.deltaTime = 0, this.frame = 0, this.timestamp = 0, this.requestedDelay = 0, this.lastTimestamp = 0, this._stop = !1;
3809
3811
  }
@@ -3822,7 +3824,7 @@ class wa extends $ {
3822
3824
  timestamp: this.timestamp,
3823
3825
  deltaTime: this.deltaTime,
3824
3826
  frame: this.frame,
3825
- deltaRatio: ~~this.deltaTime / ~~st(this.fps)
3827
+ deltaRatio: ~~this.deltaTime / ~~it(this.fps)
3826
3828
  }), this.lastTimestamp = this.timestamp, this.frame++;
3827
3829
  }
3828
3830
  /**
@@ -3832,12 +3834,12 @@ class wa extends $ {
3832
3834
  start(t = {}) {
3833
3835
  t.maxFps && (this.maxFps = t.maxFps), t.fps && (this.fps = t.fps), t.delay && (this.requestedDelay = t.delay);
3834
3836
  const e = (i) => {
3835
- Ot() ? window.requestAnimationFrame(i.bind(this)) : setTimeout(() => {
3837
+ Et() ? window.requestAnimationFrame(i.bind(this)) : setTimeout(() => {
3836
3838
  this.requestedDelay = 0, i(lt());
3837
- }, st(this.fps) + this.requestedDelay);
3839
+ }, it(this.fps) + this.requestedDelay);
3838
3840
  };
3839
3841
  if (this.maxFps) {
3840
- const i = st(this.maxFps);
3842
+ const i = it(this.maxFps);
3841
3843
  let n = lt(), r = lt();
3842
3844
  const a = (l) => {
3843
3845
  if (this._stop) return;
@@ -3858,8 +3860,8 @@ class wa extends $ {
3858
3860
  this._stop = !0;
3859
3861
  }
3860
3862
  }
3861
- q("tick", wa);
3862
- const tt = (s, t = {}) => {
3863
+ $("tick", wa);
3864
+ const Q = (s, t = {}) => {
3863
3865
  if (_(s))
3864
3866
  return s();
3865
3867
  const e = {};
@@ -3893,7 +3895,7 @@ const tt = (s, t = {}) => {
3893
3895
  i[n] = _(l) ? l : P(l);
3894
3896
  }
3895
3897
  return {
3896
- ...tt(e),
3898
+ ...Q(e),
3897
3899
  ...i
3898
3900
  };
3899
3901
  };
@@ -3905,7 +3907,7 @@ function ze(s, t, e) {
3905
3907
  `Invalid prop: type check failed for prop "${s}". Expected ${e.map((r) => r.name).join(" or ")}`
3906
3908
  );
3907
3909
  }
3908
- class xa extends $ {
3910
+ class xa extends Y {
3909
3911
  onInit(t) {
3910
3912
  }
3911
3913
  onMount(t) {
@@ -3922,7 +3924,7 @@ class xa extends $ {
3922
3924
  if (t === !0)
3923
3925
  i.follow(e.componentInstance);
3924
3926
  else {
3925
- const n = tt(t, {
3927
+ const n = Q(t, {
3926
3928
  speed: void 0,
3927
3929
  acceleration: void 0,
3928
3930
  radius: void 0
@@ -3940,8 +3942,8 @@ class xa extends $ {
3940
3942
  e && i && i.plugins.remove("follow");
3941
3943
  }
3942
3944
  }
3943
- q("viewportFollow", xa);
3944
- var Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3945
+ $("viewportFollow", xa);
3946
+ var Nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3945
3947
  function _a(s) {
3946
3948
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3947
3949
  }
@@ -4283,18 +4285,18 @@ function Sa() {
4283
4285
  if (u._webAudio) {
4284
4286
  var L = function() {
4285
4287
  u._playLock = !1, M(), u._refreshBuffer(y);
4286
- var j = y._muted || u._muted ? 0 : y._volume;
4287
- A.gain.setValueAtTime(j, e.ctx.currentTime), y._playStart = e.ctx.currentTime, typeof A.bufferSource.start > "u" ? y._loop ? A.bufferSource.noteGrainOn(0, b, 86400) : A.bufferSource.noteGrainOn(0, b, w) : y._loop ? A.bufferSource.start(0, b, 86400) : A.bufferSource.start(0, b, w), x !== 1 / 0 && (u._endTimers[y._id] = setTimeout(u._ended.bind(u, y), x)), h || setTimeout(function() {
4288
+ var W = y._muted || u._muted ? 0 : y._volume;
4289
+ A.gain.setValueAtTime(W, e.ctx.currentTime), y._playStart = e.ctx.currentTime, typeof A.bufferSource.start > "u" ? y._loop ? A.bufferSource.noteGrainOn(0, b, 86400) : A.bufferSource.noteGrainOn(0, b, w) : y._loop ? A.bufferSource.start(0, b, 86400) : A.bufferSource.start(0, b, w), x !== 1 / 0 && (u._endTimers[y._id] = setTimeout(u._ended.bind(u, y), x)), h || setTimeout(function() {
4288
4290
  u._emit("play", y._id), u._loadQueue();
4289
4291
  }, 0);
4290
4292
  };
4291
4293
  e.state === "running" && e.ctx.state !== "interrupted" ? L() : (u._playLock = !0, u.once("resume", L), u._clearTimer(y._id));
4292
4294
  } else {
4293
- var W = function() {
4295
+ var j = function() {
4294
4296
  A.currentTime = b, A.muted = y._muted || u._muted || e._muted || A.muted, A.volume = y._volume * e.volume(), A.playbackRate = y._rate;
4295
4297
  try {
4296
- var j = A.play();
4297
- if (j && typeof Promise < "u" && (j instanceof Promise || typeof j.then == "function") ? (u._playLock = !0, M(), j.then(function() {
4298
+ var W = A.play();
4299
+ if (W && typeof Promise < "u" && (W instanceof Promise || typeof W.then == "function") ? (u._playLock = !0, M(), W.then(function() {
4298
4300
  u._playLock = !1, A._unlocked = !0, h ? u._loadQueue() : u._emit("play", y._id);
4299
4301
  }).catch(function() {
4300
4302
  u._playLock = !1, u._emit("playerror", y._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), y._ended = !0, y._paused = !0;
@@ -4305,18 +4307,18 @@ function Sa() {
4305
4307
  o !== "__default" || y._loop ? u._endTimers[y._id] = setTimeout(u._ended.bind(u, y), x) : (u._endTimers[y._id] = function() {
4306
4308
  u._ended(y), A.removeEventListener("ended", u._endTimers[y._id], !1);
4307
4309
  }, A.addEventListener("ended", u._endTimers[y._id], !1));
4308
- } catch (it) {
4309
- u._emit("playerror", y._id, it);
4310
+ } catch (et) {
4311
+ u._emit("playerror", y._id, et);
4310
4312
  }
4311
4313
  };
4312
4314
  A.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (A.src = u._src, A.load());
4313
- var Nt = window && window.ejecta || !A.readyState && e._navigator.isCocoonJS;
4314
- if (A.readyState >= 3 || Nt)
4315
- W();
4315
+ var Bt = window && window.ejecta || !A.readyState && e._navigator.isCocoonJS;
4316
+ if (A.readyState >= 3 || Bt)
4317
+ j();
4316
4318
  else {
4317
4319
  u._playLock = !0, u._state = "loading";
4318
4320
  var ut = function() {
4319
- u._state = "loaded", W(), A.removeEventListener(e._canPlayEvent, ut, !1);
4321
+ u._state = "loaded", j(), A.removeEventListener(e._canPlayEvent, ut, !1);
4320
4322
  };
4321
4323
  A.addEventListener(e._canPlayEvent, ut, !1), u._clearTimer(y._id);
4322
4324
  }
@@ -4944,7 +4946,7 @@ function Sa() {
4944
4946
  e.usingWebAudio && (e.masterGain = typeof e.ctx.createGain > "u" ? e.ctx.createGainNode() : e.ctx.createGain(), e.masterGain.gain.setValueAtTime(e._muted ? 0 : e._volume, e.ctx.currentTime), e.masterGain.connect(e.ctx.destination)), e._setup();
4945
4947
  }
4946
4948
  };
4947
- s.Howler = e, s.Howl = i, typeof Vt < "u" ? (Vt.HowlerGlobal = t, Vt.Howler = e, Vt.Howl = i, Vt.Sound = n) : typeof window < "u" && (window.HowlerGlobal = t, window.Howler = e, window.Howl = i, window.Sound = n);
4949
+ s.Howler = e, s.Howl = i, typeof Nt < "u" ? (Nt.HowlerGlobal = t, Nt.Howler = e, Nt.Howl = i, Nt.Sound = n) : typeof window < "u" && (window.HowlerGlobal = t, window.Howler = e, window.Howl = i, window.Sound = n);
4948
4950
  })();
4949
4951
  (function() {
4950
4952
  HowlerGlobal.prototype._pos = [0, 0, 0], HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0], HowlerGlobal.prototype.stereo = function(e) {
@@ -5127,12 +5129,12 @@ function Sa() {
5127
5129
  })();
5128
5130
  })(Ue)), Ue;
5129
5131
  }
5130
- var Bt = Sa();
5131
- const Aa = /* @__PURE__ */ _a(Bt), Zl = /* @__PURE__ */ $n({
5132
+ var Wt = Sa();
5133
+ const Aa = /* @__PURE__ */ _a(Wt), Zl = /* @__PURE__ */ $n({
5132
5134
  __proto__: null,
5133
5135
  default: Aa
5134
- }, [Bt]), ps = ["load", "loaderror", "playerror", "play", "end", "pause", "stop", "mute", "volume", "rate", "seek", "fade", "unlock"];
5135
- let Ca = class extends $ {
5136
+ }, [Wt]), ps = ["load", "loaderror", "playerror", "play", "end", "pause", "stop", "mute", "volume", "rate", "seek", "fade", "unlock"];
5137
+ let Ca = class extends Y {
5136
5138
  constructor() {
5137
5139
  super(...arguments), this.sounds = [], this.eventsFn = [], this.maxVolume = 1, this.maxDistance = 100;
5138
5140
  }
@@ -5145,7 +5147,7 @@ let Ca = class extends $ {
5145
5147
  const { src: r, autoplay: a, loop: l, volume: c, spatial: f } = n, p = Array.isArray(r) ? r : [r];
5146
5148
  for (const o of p) {
5147
5149
  if (!o) continue;
5148
- const h = new Bt.Howl({
5150
+ const h = new Wt.Howl({
5149
5151
  src: o,
5150
5152
  autoplay: a,
5151
5153
  loop: l,
@@ -5187,7 +5189,7 @@ let Ca = class extends $ {
5187
5189
  }), this.sounds = [], this.eventsFn = [], this.tickSubscription?.unsubscribe();
5188
5190
  }
5189
5191
  };
5190
- class ka extends $ {
5192
+ class ka extends Y {
5191
5193
  onMount(t) {
5192
5194
  t.props.context.soundListenerPosition = t.propObservables?.soundListenerPosition;
5193
5195
  }
@@ -5198,15 +5200,15 @@ class ka extends $ {
5198
5200
  onDestroy() {
5199
5201
  }
5200
5202
  }
5201
- q("sound", Ca);
5202
- q("soundListenerPosition", ka);
5203
+ $("sound", Ca);
5204
+ $("soundListenerPosition", ka);
5203
5205
  const Pa = (s, t, e) => {
5204
5206
  s.props.context = {
5205
5207
  ...s.props.context ?? {},
5206
5208
  [t]: e
5207
5209
  };
5208
5210
  };
5209
- class Ta extends $ {
5211
+ class Ta extends Y {
5210
5212
  constructor() {
5211
5213
  super(...arguments), this.elementRef = null;
5212
5214
  }
@@ -5222,7 +5224,7 @@ class Ta extends $ {
5222
5224
  this.elementRef = null;
5223
5225
  }
5224
5226
  }
5225
- class Ma extends $ {
5227
+ class Ma extends Y {
5226
5228
  constructor() {
5227
5229
  super(...arguments), this.elementRef = null, this.stageRef = null, this.offsetInParent = new k(), this.isDragging = !1, this.viewport = null, this.animationFrameId = null, this.lastPointerPosition = new k(), this.pressedKeys = /* @__PURE__ */ new Set(), this.pointerIsDown = !1, this.onDragMoveHandler = () => {
5228
5230
  }, this.onDragEndHandler = () => {
@@ -5253,13 +5255,13 @@ class Ma extends $ {
5253
5255
  ];
5254
5256
  }
5255
5257
  get dragProps() {
5256
- const t = this.elementRef?.props.drag, e = tt(t?.value ?? t, {
5258
+ const t = this.elementRef?.props.drag, e = Q(t?.value ?? t, {
5257
5259
  snap: 0,
5258
5260
  viewport: {},
5259
5261
  direction: "all",
5260
5262
  keyToPress: []
5261
5263
  });
5262
- return e.viewport = tt(e.viewport, {
5264
+ return e.viewport = Q(e.viewport, {
5263
5265
  edgeThreshold: 300,
5264
5266
  maxSpeed: 40
5265
5267
  }), e;
@@ -5282,7 +5284,7 @@ class Ma extends $ {
5282
5284
  const l = i.toLocal(t.global), c = l.x - this.offsetInParent.x, f = l.y - this.offsetInParent.y;
5283
5285
  n?.snap() ? (e.position.x = a(c), e.position.y = a(f)) : (this.axis.x && (e.position.x = c), this.axis.y && (e.position.y = f)), this.lastPointerPosition.copyFrom(t.global);
5284
5286
  const { x: p, y: o } = r, h = (u, d) => {
5285
- ee(u) ? u.dependencies.forEach((m) => {
5287
+ te(u) ? u.dependencies.forEach((m) => {
5286
5288
  m.set(d);
5287
5289
  }) : _(u) && u.set(d);
5288
5290
  };
@@ -5341,9 +5343,9 @@ class Ma extends $ {
5341
5343
  t && t.off("pointerdown", this.onDragStartHandler), this.stageRef && (this.stageRef.off("pointermove", this.onDragMoveHandler), this.stageRef.off("pointerup", this.onDragEndHandler), this.stageRef.off("pointerupoutside", this.onDragEndHandler)), window.removeEventListener("keydown", this.onKeyDownHandler), window.removeEventListener("keyup", this.onKeyUpHandler), this.stageRef = null, this.viewport = null, this.pressedKeys.clear(), this.pointerIsDown = !1;
5342
5344
  }
5343
5345
  }
5344
- q("drag", Ma);
5345
- q("drop", Ta);
5346
- class Ea extends $ {
5346
+ $("drag", Ma);
5347
+ $("drop", Ta);
5348
+ class Ea extends Y {
5347
5349
  onInit(t) {
5348
5350
  }
5349
5351
  onMount(t) {
@@ -5366,7 +5368,7 @@ class Ea extends $ {
5366
5368
  onDestroy() {
5367
5369
  }
5368
5370
  }
5369
- q("transition", Ea);
5371
+ $("transition", Ea);
5370
5372
  function Pe(s) {
5371
5373
  return s?.start && s?.listen;
5372
5374
  }
@@ -5418,7 +5420,7 @@ function Si(s, t) {
5418
5420
  }
5419
5421
  }).subscription;
5420
5422
  }
5421
- class Oa extends $ {
5423
+ class Oa extends Y {
5422
5424
  constructor() {
5423
5425
  super(...arguments), this.elementRef = null, this.originalPosition = new k(), this.progressSignal = null, this.shakeSubscription = null, this.positionEffect = null, this.currentShakeConfig = null;
5424
5426
  }
@@ -5447,7 +5449,7 @@ class Oa extends $ {
5447
5449
  */
5448
5450
  get shakeProps() {
5449
5451
  const t = this.elementRef?.props.shake;
5450
- return tt(t?.value ?? t, {
5452
+ return Q(t?.value ?? t, {
5451
5453
  intensity: 10,
5452
5454
  duration: 500,
5453
5455
  frequency: 10,
@@ -5504,8 +5506,8 @@ class Oa extends $ {
5504
5506
  this.shakeSubscription && (this.shakeSubscription.unsubscribe(), this.shakeSubscription = null), this.elementRef = null;
5505
5507
  }
5506
5508
  }
5507
- q("shake", Oa);
5508
- class Ia extends $ {
5509
+ $("shake", Oa);
5510
+ class Ia extends Y {
5509
5511
  constructor() {
5510
5512
  super(...arguments), this.elementRef = null, this.progressSignal = null, this.flashSubscription = null, this.alphaEffect = null, this.tintEffect = null, this.originalAlpha = 1, this.originalTint = 16777215, this.currentFlashConfig = null;
5511
5513
  }
@@ -5538,7 +5540,7 @@ class Ia extends $ {
5538
5540
  */
5539
5541
  get flashProps() {
5540
5542
  const t = this.elementRef?.props.flash;
5541
- return tt(t?.value ?? t, {
5543
+ return Q(t?.value ?? t, {
5542
5544
  type: "alpha",
5543
5545
  duration: 300,
5544
5546
  cycles: 1,
@@ -5579,8 +5581,8 @@ class Ia extends $ {
5579
5581
  if (!e || !this.progressSignal || !this.currentFlashConfig) return;
5580
5582
  const h = e.tint;
5581
5583
  if (h === void 0) return;
5582
- const u = _(h), d = this.progressSignal(), m = this.currentFlashConfig, g = d * m.cycles % 1, y = g < 0.5 ? g * 2 : 1 - (g - 0.5) * 2, v = this.originalTint >> 16 & 255, b = this.originalTint >> 8 & 255, w = this.originalTint & 255, x = m.flashTint >> 16 & 255, S = m.flashTint >> 8 & 255, C = m.flashTint & 255, M = Math.round(v + (x - v) * y), A = Math.round(b + (S - b) * y), L = Math.round(w + (C - w) * y), W = M << 16 | A << 8 | L;
5583
- u ? h.set(W) : e.tint = W;
5584
+ const u = _(h), d = this.progressSignal(), m = this.currentFlashConfig, g = d * m.cycles % 1, y = g < 0.5 ? g * 2 : 1 - (g - 0.5) * 2, v = this.originalTint >> 16 & 255, b = this.originalTint >> 8 & 255, w = this.originalTint & 255, x = m.flashTint >> 16 & 255, S = m.flashTint >> 8 & 255, C = m.flashTint & 255, M = Math.round(v + (x - v) * y), A = Math.round(b + (S - b) * y), L = Math.round(w + (C - w) * y), j = M << 16 | A << 8 | L;
5585
+ u ? h.set(j) : e.tint = j;
5584
5586
  }).subscription), await this.progressSignal.set(1, {
5585
5587
  duration: r
5586
5588
  }), this.currentFlashConfig === p && e) {
@@ -5617,9 +5619,9 @@ class Ia extends $ {
5617
5619
  this.flashSubscription && (this.flashSubscription = null), this.elementRef = null;
5618
5620
  }
5619
5621
  }
5620
- q("flash", Ia);
5622
+ $("flash", Ia);
5621
5623
  const he = (s, t, e) => Math.max(t, Math.min(e, s));
5622
- class Da extends $ {
5624
+ class Da extends Y {
5623
5625
  constructor() {
5624
5626
  super(...arguments), this.elementRef = null, this.tickSubscription = null, this.sampleAccumulatorMs = 0, this.managesAlpha = !1;
5625
5627
  }
@@ -5736,8 +5738,8 @@ class Da extends $ {
5736
5738
  i.visible = r && f, this.managesAlpha && (i.alpha = a, this.managesAlpha = !1);
5737
5739
  }
5738
5740
  }
5739
- q("fogVisibility", Da);
5740
- function Y(s) {
5741
+ $("fogVisibility", Da);
5742
+ function X(s) {
5741
5743
  return s && typeof s == "string" ? s.endsWith("%") : !1;
5742
5744
  }
5743
5745
  const La = [
@@ -5846,7 +5848,7 @@ function at(s) {
5846
5848
  };
5847
5849
  i === "click" ? (this.on("pointertap", r), this.#e.set("pointertap", r)) : (this.on(i, r), this.#e.set(i, r));
5848
5850
  }
5849
- (e.onBeforeDestroy || e["on-before-destroy"]) && (this.onBeforeDestroy = e.onBeforeDestroy || e["on-before-destroy"]), (e.onAfterMount || e["on-after-mount"]) && (this.onAfterMount = e.onAfterMount || e["on-after-mount"]), (e.justifyContent || e.alignItems || e.flexDirection || e.flexWrap || e.alignContent || e.display == "flex" || Y(e.width) || Y(e.height) || e.isRoot) && (this.layout = {}, this.isFlex = !0), this.subjectInit.next(this);
5851
+ (e.onBeforeDestroy || e["on-before-destroy"]) && (this.onBeforeDestroy = e.onBeforeDestroy || e["on-before-destroy"]), (e.onAfterMount || e["on-after-mount"]) && (this.onAfterMount = e.onAfterMount || e["on-after-mount"]), (e.justifyContent || e.alignItems || e.flexDirection || e.flexWrap || e.alignContent || e.display == "flex" || X(e.width) || X(e.height) || e.isRoot) && (this.layout = {}, this.isFlex = !0), this.subjectInit.next(this);
5850
5852
  }
5851
5853
  async onMount(e, i) {
5852
5854
  if (!this.destroyed && (this.#s = e, this.#t = e.props.context, e.parent)) {
@@ -5886,7 +5888,23 @@ function at(s) {
5886
5888
  ...this.fullProps,
5887
5889
  ...e
5888
5890
  }, this.destroyed || !this.#t || !this.parent) return;
5889
- e.x !== void 0 && this.setX(e.x), e.y !== void 0 && this.setY(e.y), e.scale !== void 0 && wt(this.scale, e.scale), e.anchor !== void 0 && !this.isCustomAnchor && wt(this.anchor, e.anchor), e.width !== void 0 && this.setWidth(e.width), e.height !== void 0 && this.setHeight(e.height), e.minWidth !== void 0 && this.setMinWidth(e.minWidth), e.minHeight !== void 0 && this.setMinHeight(e.minHeight), e.maxWidth !== void 0 && this.setMaxWidth(e.maxWidth), e.maxHeight !== void 0 && this.setMaxHeight(e.maxHeight), e.aspectRatio !== void 0 && this.setAspectRatio(e.aspectRatio), e.flexGrow !== void 0 && this.setFlexGrow(e.flexGrow), e.flexShrink !== void 0 && this.setFlexShrink(e.flexShrink), e.flexBasis !== void 0 && this.setFlexBasis(e.flexBasis), e.rowGap !== void 0 && this.setRowGap(e.rowGap), e.columnGap !== void 0 && this.setColumnGap(e.columnGap), e.top !== void 0 && this.setTop(e.top), e.left !== void 0 && this.setLeft(e.left), e.right !== void 0 && this.setRight(e.right), e.bottom !== void 0 && this.setBottom(e.bottom), e.objectFit !== void 0 && this.setObjectFit(e.objectFit), e.objectPosition !== void 0 && this.setObjectPosition(e.objectPosition), e.transformOrigin !== void 0 && this.setTransformOrigin(e.transformOrigin), e.skew !== void 0 && wt(this.skew, e.skew), e.tint && (this.tint = e.tint), e.rotation !== void 0 && (this.rotation = e.rotation), e.angle !== void 0 && (this.angle = e.angle), e.zIndex !== void 0 && (this.zIndex = e.zIndex), e.roundPixels !== void 0 && (this.roundPixels = e.roundPixels), e.cursor && (this.cursor = e.cursor), e.visible !== void 0 && (this.visible = e.visible), e.alpha !== void 0 && (this.alpha = e.alpha), e.pivot && wt(this.pivot, e.pivot), e.flexDirection && this.setFlexDirection(e.flexDirection), e.flexWrap && this.setFlexWrap(e.flexWrap), e.justifyContent && this.setJustifyContent(e.justifyContent), e.alignItems && this.setAlignItems(e.alignItems), e.alignContent && this.setAlignContent(e.alignContent), e.alignSelf && this.setAlignSelf(e.alignSelf), e.margin && this.setMargin(e.margin), e.padding && this.setPadding(e.padding), e.gap && this.setGap(e.gap), e.border && this.setBorder(e.border), e.positionType && this.setPositionType(e.positionType), e.filters && (this.filters = e.filters), e.maskOf && G(e.maskOf) && (e.maskOf.componentInstance.mask = this), e.blendMode && (this.blendMode = e.blendMode), e.filterArea && (this.filterArea = e.filterArea);
5891
+ if (e.x !== void 0 && this.setX(e.x), e.y !== void 0 && this.setY(e.y), e.scale !== void 0 && wt(this.scale, e.scale), e.anchor !== void 0 && !this.isCustomAnchor && wt(this.anchor, e.anchor), e.width !== void 0 && this.setWidth(e.width), e.height !== void 0 && this.setHeight(e.height), e.minWidth !== void 0 && this.setMinWidth(e.minWidth), e.minHeight !== void 0 && this.setMinHeight(e.minHeight), e.maxWidth !== void 0 && this.setMaxWidth(e.maxWidth), e.maxHeight !== void 0 && this.setMaxHeight(e.maxHeight), e.aspectRatio !== void 0 && this.setAspectRatio(e.aspectRatio), e.flexGrow !== void 0 && this.setFlexGrow(e.flexGrow), e.flexShrink !== void 0 && this.setFlexShrink(e.flexShrink), e.flexBasis !== void 0 && this.setFlexBasis(e.flexBasis), e.rowGap !== void 0 && this.setRowGap(e.rowGap), e.columnGap !== void 0 && this.setColumnGap(e.columnGap), e.top !== void 0 && this.setTop(e.top), e.left !== void 0 && this.setLeft(e.left), e.right !== void 0 && this.setRight(e.right), e.bottom !== void 0 && this.setBottom(e.bottom), e.objectFit !== void 0 && this.setObjectFit(e.objectFit), e.objectPosition !== void 0 && this.setObjectPosition(e.objectPosition), e.transformOrigin !== void 0 && this.setTransformOrigin(e.transformOrigin), e.skew !== void 0 && wt(this.skew, e.skew), e.tint && (this.tint = e.tint), e.rotation !== void 0 && (this.rotation = e.rotation), e.angle !== void 0 && (this.angle = e.angle), e.zIndex !== void 0 && (this.zIndex = e.zIndex), e.roundPixels !== void 0 && (this.roundPixels = e.roundPixels), e.cursor && (this.cursor = e.cursor), e.visible !== void 0 && (this.visible = e.visible), e.alpha !== void 0 && (this.alpha = e.alpha), e.pivot && wt(this.pivot, e.pivot), e.flexDirection && this.setFlexDirection(e.flexDirection), e.flexWrap && this.setFlexWrap(e.flexWrap), e.justifyContent && this.setJustifyContent(e.justifyContent), e.alignItems && this.setAlignItems(e.alignItems), e.alignContent && this.setAlignContent(e.alignContent), e.alignSelf && this.setAlignSelf(e.alignSelf), e.margin && this.setMargin(e.margin), e.padding && this.setPadding(e.padding), e.gap && this.setGap(e.gap), e.border && this.setBorder(e.border), e.positionType && this.setPositionType(e.positionType), e.filters && (this.filters = e.filters), e.maskOf && st(e.maskOf) && (e.maskOf.componentInstance.mask = this), e.shadowCaster !== void 0) {
5892
+ const n = e.shadowCaster?.value ?? e.shadowCaster;
5893
+ if (n && typeof n == "object" && !Array.isArray(n)) {
5894
+ const r = this.shadowCaster ?? {};
5895
+ this.shadowCaster = { ...r, ...n };
5896
+ } else
5897
+ this.shadowCaster = n;
5898
+ }
5899
+ if (e.footprintCaster !== void 0) {
5900
+ const n = e.footprintCaster?.value ?? e.footprintCaster;
5901
+ if (n && typeof n == "object" && !Array.isArray(n)) {
5902
+ const r = this.footprintCaster ?? {};
5903
+ this.footprintCaster = { ...r, ...n };
5904
+ } else
5905
+ this.footprintCaster = n;
5906
+ }
5907
+ e.blendMode && (this.blendMode = e.blendMode), e.filterArea && (this.filterArea = e.filterArea);
5890
5908
  const i = this.filters || [];
5891
5909
  if (e.blur) {
5892
5910
  let n = i.find(
@@ -5988,10 +6006,10 @@ function at(s) {
5988
6006
  this.displayHeight.set(e), this.parentIsFlex ? this.layout = { height: e } : this.height = e;
5989
6007
  }
5990
6008
  getWidth() {
5991
- return Y(this.fullProps.width) ? this.#i?.width !== void 0 ? this.#i.width : typeof this.width == "number" ? this.width : 0 : typeof this.width == "number" && this.width > 0 ? this.width : typeof this.displayWidth() == "number" ? this.displayWidth() : 0;
6009
+ return X(this.fullProps.width) ? this.#i?.width !== void 0 ? this.#i.width : typeof this.width == "number" ? this.width : 0 : typeof this.width == "number" && this.width > 0 ? this.width : typeof this.displayWidth() == "number" ? this.displayWidth() : 0;
5992
6010
  }
5993
6011
  getHeight() {
5994
- return Y(this.fullProps.height) ? this.#i?.height !== void 0 ? this.#i.height : typeof this.height == "number" ? this.height : 0 : typeof this.height == "number" && this.height > 0 ? this.height : typeof this.displayHeight() == "number" ? this.displayHeight() : 0;
6012
+ return X(this.fullProps.height) ? this.#i?.height !== void 0 ? this.#i.height : typeof this.height == "number" ? this.height : 0 : typeof this.height == "number" && this.height > 0 ? this.height : typeof this.displayHeight() == "number" ? this.displayHeight() : 0;
5995
6013
  }
5996
6014
  // Min/Max constraints
5997
6015
  setMinWidth(e) {
@@ -6238,10 +6256,10 @@ class Fa {
6238
6256
  this.assets.clear(), this.onProgressCallbacks.clear(), this.onCompleteCallbacks.clear(), this.assetCounter = 0, this.isComplete = !1;
6239
6257
  }
6240
6258
  }
6241
- R("Canvas", class extends at(Ft) {
6259
+ R("Canvas", class extends at(Lt) {
6242
6260
  });
6243
6261
  const sh = async (s = {}) => {
6244
- let { cursorStyles: t, width: e, height: i, class: n } = tt(s);
6262
+ let { cursorStyles: t, width: e, height: i, class: n } = Q(s);
6245
6263
  s.width || (e = P(800)), s.height || (i = P(600));
6246
6264
  const r = P({
6247
6265
  width: 0,
@@ -6264,7 +6282,7 @@ const sh = async (s = {}) => {
6264
6282
  frame: 0,
6265
6283
  deltaRatio: 1
6266
6284
  }), globalThis.__CANVAS_ENGINE_TICK__ = l.context.tick;
6267
- const c = N("Canvas", l);
6285
+ const c = V("Canvas", l);
6268
6286
  return c.render = (f, p) => {
6269
6287
  if (!p)
6270
6288
  return;
@@ -6292,7 +6310,7 @@ const sh = async (s = {}) => {
6292
6310
  u ? f.replaceChild(h, u) : f.appendChild(h), l.context.app.set(p);
6293
6311
  }, c;
6294
6312
  };
6295
- class Ai extends at(Ft) {
6313
+ class Ai extends at(Lt) {
6296
6314
  constructor() {
6297
6315
  super(...arguments), this.isCustomAnchor = !0;
6298
6316
  }
@@ -6308,7 +6326,7 @@ class Ai extends at(Ft) {
6308
6326
  n && n.forEach((l) => {
6309
6327
  e.addChild(l);
6310
6328
  });
6311
- const r = Y(i.width), a = Y(i.height);
6329
+ const r = X(i.width), a = X(i.height);
6312
6330
  (r || a) && this.on("layout", (l) => {
6313
6331
  const c = l.computedLayout;
6314
6332
  r && c.width !== void 0 && this.displayWidth.set(c.width), a && c.height !== void 0 && this.displayHeight.set(c.height);
@@ -6316,7 +6334,7 @@ class Ai extends at(Ft) {
6316
6334
  }
6317
6335
  }
6318
6336
  R("Container", Ai);
6319
- const Te = (s) => (R("Container", Ai), N("Container", s));
6337
+ const Te = (s) => (R("Container", Ai), V("Container", s));
6320
6338
  class Ha extends at(ai) {
6321
6339
  constructor() {
6322
6340
  super(...arguments), this.isCustomAnchor = !0;
@@ -6363,7 +6381,7 @@ class Ha extends at(ai) {
6363
6381
  await super.onMount(t, e);
6364
6382
  const { props: i, propObservables: n } = t, r = _(n?.width) ? n.width : P(i.width || 0), a = _(n?.height) ? n.height : P(i.height || 0), l = _(n?.anchor) ? n.anchor : P(i.anchor || [0, 0]);
6365
6383
  this._width = r, this._height = a;
6366
- const c = Y(r()), f = Y(a());
6384
+ const c = X(r()), f = X(a());
6367
6385
  i.draw && (this.clearEffect = H(() => {
6368
6386
  const p = r(), o = a(), h = l();
6369
6387
  typeof p == "string" || typeof o == "string" || (this.clear(), i.draw?.(this, p, o, h), this.subjectInit.next(this));
@@ -6398,8 +6416,8 @@ class Ha extends at(ai) {
6398
6416
  }
6399
6417
  }
6400
6418
  R("Graphics", Ha);
6401
- function Rt(s) {
6402
- return N("Graphics", s);
6419
+ function Ht(s) {
6420
+ return V("Graphics", s);
6403
6421
  }
6404
6422
  const Ci = (s, t, e) => {
6405
6423
  const i = new bs({ _onUpdate: () => {
@@ -6409,11 +6427,11 @@ const Ci = (s, t, e) => {
6409
6427
  return { x: -n * t, y: -r * e };
6410
6428
  };
6411
6429
  function Ra(s) {
6412
- const { color: t, borderRadius: e, border: i } = tt(s, {
6430
+ const { color: t, borderRadius: e, border: i } = Q(s, {
6413
6431
  borderRadius: null,
6414
6432
  border: null
6415
6433
  });
6416
- return Rt({
6434
+ return Ht({
6417
6435
  draw: (n, r, a, l) => {
6418
6436
  const { x: c, y: f } = Ci(l, r, a);
6419
6437
  e() ? n.roundRect(c, f, r, a, e()) : n.rect(c, f, r, a), i && n.stroke(i), n.fill(t());
@@ -6422,11 +6440,11 @@ function Ra(s) {
6422
6440
  });
6423
6441
  }
6424
6442
  function An(s) {
6425
- const { color: t, border: e, radius: i } = tt(s, {
6443
+ const { color: t, border: e, radius: i } = Q(s, {
6426
6444
  border: null,
6427
6445
  radius: null
6428
6446
  });
6429
- return Rt({
6447
+ return Ht({
6430
6448
  draw: (n, r, a, l) => {
6431
6449
  const { x: c, y: f } = Ci(l, r, a);
6432
6450
  r == a || a == 0 ? n.circle(c, f, i() || r) : n.ellipse(c, f, r, a), e() && n.stroke(e()), n.fill(t());
@@ -6434,15 +6452,15 @@ function An(s) {
6434
6452
  ...s
6435
6453
  });
6436
6454
  }
6437
- function Wa(s) {
6455
+ function ja(s) {
6438
6456
  return An(s);
6439
6457
  }
6440
6458
  function nh(s) {
6441
- const { color: t, border: e } = tt(s, {
6459
+ const { color: t, border: e } = Q(s, {
6442
6460
  border: null,
6443
6461
  color: "#000"
6444
6462
  });
6445
- return Rt({
6463
+ return Ht({
6446
6464
  draw: (i, n, r, a) => {
6447
6465
  const { x: l, y: c } = Ci(a, n, r);
6448
6466
  i.moveTo(l, c + r), i.lineTo(l + n / 2, c), i.lineTo(l + n, c + r), i.lineTo(l, c + r), i.fill(t()), e && i.stroke(e);
@@ -6451,7 +6469,7 @@ function nh(s) {
6451
6469
  });
6452
6470
  }
6453
6471
  function rh(s) {
6454
- return Rt({
6472
+ return Ht({
6455
6473
  draw: async (t) => {
6456
6474
  if (s.src) {
6457
6475
  const e = await St.load({
@@ -6466,7 +6484,7 @@ function rh(s) {
6466
6484
  ...s
6467
6485
  });
6468
6486
  }
6469
- class ja extends at(Wn) {
6487
+ class Wa extends at(jn) {
6470
6488
  /**
6471
6489
  * Constructor for the CanvasMesh component.
6472
6490
  * Initializes the PixiMesh with default geometry and shader to prevent errors.
@@ -6479,7 +6497,7 @@ class ja extends at(Wn) {
6479
6497
  */
6480
6498
  constructor() {
6481
6499
  super({
6482
- geometry: new jn()
6500
+ geometry: new Wn()
6483
6501
  });
6484
6502
  }
6485
6503
  /**
@@ -6547,8 +6565,8 @@ class ja extends at(Wn) {
6547
6565
  await super.onDestroy(t, i);
6548
6566
  }
6549
6567
  }
6550
- R("Mesh", ja);
6551
- const oh = (s) => N("Mesh", s);
6568
+ R("Mesh", Wa);
6569
+ const oh = (s) => V("Mesh", s);
6552
6570
  let ms = null, ni = null;
6553
6571
  function Cn(s) {
6554
6572
  ni?.(s);
@@ -6572,7 +6590,7 @@ function de(s, t = {}, e) {
6572
6590
  n.add(a);
6573
6591
  }, e[0] instanceof Array && (e = e[0]);
6574
6592
  let r;
6575
- return Array.isArray(s) ? s.length === 1 ? r = s[0] : r = de(Te, {}, s) : "tag" in s || s instanceof I ? r = s : r = s({ ...t, children: e }), r || (r = {}), r.effectSubscriptions = Array.from(i), r.effectMounts = [
6593
+ return Array.isArray(s) ? s.length === 1 ? r = s[0] : r = de(Te, {}, s) : "tag" in s || s instanceof D ? r = s : r = s({ ...t, children: e }), r || (r = {}), r.effectSubscriptions = Array.from(i), r.effectMounts = [
6576
6594
  ...Array.from(n),
6577
6595
  ...r.effectMounts ?? []
6578
6596
  ], t?.dependencies && (r.props = r.props || {}, r.props.dependencies = t.dependencies), r instanceof Promise && r.then((a) => {
@@ -6580,7 +6598,7 @@ function de(s, t = {}, e) {
6580
6598
  }), ms = null, ni = null, r;
6581
6599
  }
6582
6600
  function U(s, t = {}, ...e) {
6583
- return t?.dependencies ? !t.dependencies.some(yt) && t.dependencies.every((r) => _(r) ? r() !== void 0 : r !== void 0) ? de(s, t, e) : new I((n) => {
6601
+ return t?.dependencies ? !t.dependencies.some(yt) && t.dependencies.every((r) => _(r) ? r() !== void 0 : r !== void 0) ? de(s, t, e) : new D((n) => {
6584
6602
  va(t.dependencies).then(() => {
6585
6603
  const r = de(s, t, e);
6586
6604
  n.next(r);
@@ -6692,7 +6710,7 @@ class rt {
6692
6710
  return t.end !== t.start && (e.next = new rt(typeof t.end == "string" ? ce(t.end) : t.end, 1)), e;
6693
6711
  }
6694
6712
  }
6695
- let Qt = ct.from;
6713
+ let Zt = ct.from;
6696
6714
  const nt = Math.PI / 180;
6697
6715
  function ht(s, t) {
6698
6716
  if (!s)
@@ -6808,7 +6826,7 @@ function Ya(s) {
6808
6826
  const e = t.value;
6809
6827
  return Me(e.r, e.g, e.b);
6810
6828
  }
6811
- class ne {
6829
+ class se {
6812
6830
  /**
6813
6831
  * @param isColor If this list handles color values
6814
6832
  */
@@ -6826,7 +6844,7 @@ class ne {
6826
6844
  }
6827
6845
  class Mi {
6828
6846
  constructor(t) {
6829
- this.order = E.Normal, this.list = new ne(!1), this.list.reset(rt.createList(t.alpha));
6847
+ this.order = E.Normal, this.list = new se(!1), this.list.reset(rt.createList(t.alpha));
6830
6848
  }
6831
6849
  initParticles(t) {
6832
6850
  let e = t;
@@ -6856,12 +6874,12 @@ function Mn(s) {
6856
6874
  for (let e = 0; e < s.length; ++e) {
6857
6875
  let i = s[e];
6858
6876
  if (typeof i == "string")
6859
- t.push(Qt(i));
6877
+ t.push(Zt(i));
6860
6878
  else if (i instanceof ct)
6861
6879
  t.push(i);
6862
6880
  else {
6863
6881
  let n = i.count || 1;
6864
- for (typeof i.texture == "string" ? i = Qt(i.texture) : i = i.texture; n > 0; --n)
6882
+ for (typeof i.texture == "string" ? i = Zt(i.texture) : i = i.texture; n > 0; --n)
6865
6883
  t.push(i);
6866
6884
  }
6867
6885
  }
@@ -6950,7 +6968,7 @@ Li.type = "spawnBurst";
6950
6968
  Li.editorConfig = null;
6951
6969
  class Fi {
6952
6970
  constructor(t) {
6953
- this.order = E.Normal, this.list = new ne(!0), this.list.reset(rt.createList(t.color));
6971
+ this.order = E.Normal, this.list = new se(!0), this.list.reset(rt.createList(t.color));
6954
6972
  }
6955
6973
  initParticles(t) {
6956
6974
  let e = t;
@@ -6980,7 +6998,7 @@ Hi.type = "colorStatic";
6980
6998
  Hi.editorConfig = null;
6981
6999
  class Ri {
6982
7000
  constructor(t) {
6983
- this.order = E.Normal, this.index = 0, this.textures = t.textures.map((e) => typeof e == "string" ? Qt(e) : e);
7001
+ this.order = E.Normal, this.index = 0, this.textures = t.textures.map((e) => typeof e == "string" ? Zt(e) : e);
6984
7002
  }
6985
7003
  initParticles(t) {
6986
7004
  let e = t;
@@ -6990,7 +7008,7 @@ class Ri {
6990
7008
  }
6991
7009
  Ri.type = "textureOrdered";
6992
7010
  Ri.editorConfig = null;
6993
- const Et = new k(), En = [
7011
+ const Mt = new k(), En = [
6994
7012
  "E",
6995
7013
  "LN2",
6996
7014
  "LN10",
@@ -7042,7 +7060,7 @@ function qa(s) {
7042
7060
  En.indexOf(t[e]) >= 0 && (t[e] = `Math.${t[e]}`);
7043
7061
  return s = t.join(""), new Function("x", `return ${s};`);
7044
7062
  }
7045
- class Wi {
7063
+ class ji {
7046
7064
  constructor(t) {
7047
7065
  if (this.order = E.Late, t.path)
7048
7066
  if (typeof t.path == "function")
@@ -7055,7 +7073,7 @@ class Wi {
7055
7073
  }
7056
7074
  else
7057
7075
  this.path = (e) => e;
7058
- this.list = new ne(!1), this.list.reset(rt.createList(t.speed)), this.minMult = t.minMult ?? 1;
7076
+ this.list = new se(!1), this.list.reset(rt.createList(t.speed)), this.minMult = t.minMult ?? 1;
7059
7077
  }
7060
7078
  initParticles(t) {
7061
7079
  let e = t;
@@ -7067,12 +7085,12 @@ class Wi {
7067
7085
  }
7068
7086
  updateParticle(t, e) {
7069
7087
  const i = this.list.interpolate(t.agePercent) * t.config.speedMult;
7070
- t.config.movement += i * e, Et.x = t.config.movement, Et.y = this.path(Et.x), ht(t.config.initRotation, Et), t.position.x = t.config.initPosition.x + Et.x, t.position.y = t.config.initPosition.y + Et.y;
7088
+ t.config.movement += i * e, Mt.x = t.config.movement, Mt.y = this.path(Mt.x), ht(t.config.initRotation, Mt), t.position.x = t.config.initPosition.x + Mt.x, t.position.y = t.config.initPosition.y + Mt.y;
7071
7089
  }
7072
7090
  }
7073
- Wi.type = "movePath";
7074
- Wi.editorConfig = null;
7075
- class ji {
7091
+ ji.type = "movePath";
7092
+ ji.editorConfig = null;
7093
+ class Wi {
7076
7094
  constructor() {
7077
7095
  this.order = E.Spawn;
7078
7096
  }
@@ -7080,11 +7098,11 @@ class ji {
7080
7098
  initParticles(t) {
7081
7099
  }
7082
7100
  }
7083
- ji.type = "spawnPoint";
7084
- ji.editorConfig = null;
7101
+ Wi.type = "spawnPoint";
7102
+ Wi.editorConfig = null;
7085
7103
  class Bi {
7086
7104
  constructor(t) {
7087
- this.order = E.Normal, this.textures = t.textures.map((e) => typeof e == "string" ? Qt(e) : e);
7105
+ this.order = E.Normal, this.textures = t.textures.map((e) => typeof e == "string" ? Zt(e) : e);
7088
7106
  }
7089
7107
  initParticles(t) {
7090
7108
  let e = t;
@@ -7141,7 +7159,7 @@ zi.type = "noRotation";
7141
7159
  zi.editorConfig = null;
7142
7160
  class Ui {
7143
7161
  constructor(t) {
7144
- this.order = E.Normal, this.list = new ne(!1), this.list.reset(rt.createList(t.scale)), this.minMult = t.minMult ?? 1;
7162
+ this.order = E.Normal, this.list = new se(!1), this.list.reset(rt.createList(t.scale)), this.minMult = t.minMult ?? 1;
7145
7163
  }
7146
7164
  initParticles(t) {
7147
7165
  let e = t;
@@ -7170,18 +7188,18 @@ class Gi {
7170
7188
  }
7171
7189
  Gi.type = "scaleStatic";
7172
7190
  Gi.editorConfig = null;
7173
- class et {
7191
+ class tt {
7174
7192
  /**
7175
7193
  * Registers a shape to be used by the ShapeSpawn behavior.
7176
7194
  * @param constructor The shape class constructor to use, with a static `type` property to reference it by.
7177
7195
  * @param typeOverride An optional type override, primarily for registering a shape under multiple names.
7178
7196
  */
7179
7197
  static registerShape(t, e) {
7180
- et.shapes[e || t.type] = t;
7198
+ tt.shapes[e || t.type] = t;
7181
7199
  }
7182
7200
  constructor(t) {
7183
7201
  this.order = E.Spawn;
7184
- const e = et.shapes[t.type];
7202
+ const e = tt.shapes[t.type];
7185
7203
  if (!e)
7186
7204
  throw new Error(`No shape found with type '${t.type}'`);
7187
7205
  this.shape = new e(t.data);
@@ -7192,16 +7210,16 @@ class et {
7192
7210
  this.shape.getRandPos(e), e = e.next;
7193
7211
  }
7194
7212
  }
7195
- et.type = "spawnShape";
7196
- et.editorConfig = null;
7197
- et.shapes = {};
7198
- et.registerShape(ki);
7199
- et.registerShape(Pi);
7200
- et.registerShape(Ee);
7201
- et.registerShape(Ee, "circle");
7213
+ tt.type = "spawnShape";
7214
+ tt.editorConfig = null;
7215
+ tt.shapes = {};
7216
+ tt.registerShape(ki);
7217
+ tt.registerShape(Pi);
7218
+ tt.registerShape(Ee);
7219
+ tt.registerShape(Ee, "circle");
7202
7220
  class Xi {
7203
7221
  constructor(t) {
7204
- this.order = E.Normal, this.texture = typeof t.texture == "string" ? Qt(t.texture) : t.texture;
7222
+ this.order = E.Normal, this.texture = typeof t.texture == "string" ? Zt(t.texture) : t.texture;
7205
7223
  }
7206
7224
  initParticles(t) {
7207
7225
  let e = t;
@@ -7213,7 +7231,7 @@ Xi.type = "textureSingle";
7213
7231
  Xi.editorConfig = null;
7214
7232
  class Yi {
7215
7233
  constructor(t) {
7216
- this.order = E.Late, this.list = new ne(!1), this.list.reset(rt.createList(t.speed)), this.minMult = t.minMult ?? 1;
7234
+ this.order = E.Late, this.list = new se(!1), this.list.reset(rt.createList(t.speed)), this.minMult = t.minMult ?? 1;
7217
7235
  }
7218
7236
  initParticles(t) {
7219
7237
  let e = t;
@@ -7579,15 +7597,15 @@ T.registerBehavior(Li);
7579
7597
  T.registerBehavior(Fi);
7580
7598
  T.registerBehavior(Hi);
7581
7599
  T.registerBehavior(Ri);
7582
- T.registerBehavior(Wi);
7583
7600
  T.registerBehavior(ji);
7601
+ T.registerBehavior(Wi);
7584
7602
  T.registerBehavior(Bi);
7585
7603
  T.registerBehavior(Ni);
7586
7604
  T.registerBehavior(Vi);
7587
7605
  T.registerBehavior(zi);
7588
7606
  T.registerBehavior(Ui);
7589
7607
  T.registerBehavior(Gi);
7590
- T.registerBehavior(et);
7608
+ T.registerBehavior(tt);
7591
7609
  T.registerBehavior(Xi);
7592
7610
  T.registerBehavior(Yi);
7593
7611
  T.registerBehavior($i);
@@ -7615,12 +7633,12 @@ class Ka extends Ai {
7615
7633
  }
7616
7634
  R("ParticlesEmitter", Ka);
7617
7635
  function hh(s) {
7618
- return N("ParticlesEmitter", s);
7636
+ return V("ParticlesEmitter", s);
7619
7637
  }
7620
7638
  const ys = console.log;
7621
7639
  class On extends at(pe) {
7622
7640
  constructor() {
7623
- super(...arguments), this.currentAnimation = null, this.time = 0, this.frameIndex = 0, this.animations = /* @__PURE__ */ new Map(), this.subscriptionSheet = [], this.sheetParams = {}, this.sheetCurrentAnimation = "stand", this.app = null, this.globalLoader = null, this.trackedAssetIds = /* @__PURE__ */ new Set(), this.currentAnimationContainer = null;
7641
+ super(...arguments), this.hitbox = null, this.currentAnimation = null, this.time = 0, this.frameIndex = 0, this.animations = /* @__PURE__ */ new Map(), this.subscriptionSheet = [], this.sheetParams = {}, this.sheetCurrentAnimation = "stand", this.app = null, this.globalLoader = null, this.trackedAssetIds = /* @__PURE__ */ new Set(), this.currentAnimationContainer = null;
7624
7642
  }
7625
7643
  get renderer() {
7626
7644
  return this.app?.renderer;
@@ -7783,10 +7801,10 @@ class On extends at(pe) {
7783
7801
  this.play(this.sheetCurrentAnimation, [{ ...this.sheetParams, [c]: f }]);
7784
7802
  }
7785
7803
  }
7786
- const l = J(() => {
7804
+ const l = K(() => {
7787
7805
  const { x: c, y: f } = i ?? {};
7788
7806
  if (!c || !f) return !1;
7789
- const p = c, o = f, h = Zt(p) && p.animatedState().current !== p.animatedState().end, u = Zt(o) && o.animatedState().current !== o.animatedState().end;
7807
+ const p = c, o = f, h = Jt(p) && p.animatedState().current !== p.animatedState().end, u = Jt(o) && o.animatedState().current !== o.animatedState().end;
7790
7808
  return h || u;
7791
7809
  });
7792
7810
  H(() => {
@@ -7817,11 +7835,11 @@ class On extends at(pe) {
7817
7835
  const r = n.value instanceof Promise ? await n.value : n.value;
7818
7836
  this.spritesheet = r ?? n, await this.resetAnimations();
7819
7837
  }
7820
- if (i?.params && (this.sheetParams = i?.params), i?.playing && this.isMounted && this.spritesheet && this.animations.size > 0 && (this.sheetCurrentAnimation = i?.playing, this.play(this.sheetCurrentAnimation, [this.sheetParams])), t.hitbox && (this.hitbox = t.hitbox.value ?? t.hitbox), t.scaleMode) this.baseTexture.scaleMode = t.scaleMode;
7838
+ if (i?.params && (this.sheetParams = i?.params), i?.playing && this.isMounted && this.spritesheet && this.animations.size > 0 && (this.sheetCurrentAnimation = i?.playing, this.play(this.sheetCurrentAnimation, [this.sheetParams])), t.hitbox !== void 0 && (this.hitbox = this.normalizeHitbox(t.hitbox)), t.scaleMode) this.baseTexture.scaleMode = t.scaleMode;
7821
7839
  else if (t.image && this.fullProps.rectangle === void 0) {
7822
7840
  const r = await e(this.fullProps.image);
7823
7841
  r && (this.texture = r);
7824
- } else t.texture && (G(t.texture) ? (t.texture.componentInstance.subjectInit.subscribe(), this.texture = this.renderer?.generateTexture(t.texture.componentInstance)) : this.texture = t.texture);
7842
+ } else t.texture && (st(t.texture) ? (t.texture.componentInstance.subjectInit.subscribe(), this.texture = this.renderer?.generateTexture(t.texture.componentInstance)) : this.texture = t.texture);
7825
7843
  if (t.rectangle !== void 0) {
7826
7844
  const { x: r, y: a, width: l, height: c } = t.rectangle?.value ?? t.rectangle, f = await e(this.fullProps.image);
7827
7845
  f && (this.texture = new ct({
@@ -7829,12 +7847,13 @@ class On extends at(pe) {
7829
7847
  frame: new _t(r, a, l, c)
7830
7848
  }));
7831
7849
  }
7850
+ this.hitbox && !this.spritesheet && this.applyHitboxAnchor(this.texture.width, this.texture.height);
7832
7851
  }
7833
7852
  async onDestroy(t, e) {
7834
7853
  const i = async () => {
7835
7854
  this.globalLoader && (this.trackedAssetIds.forEach((n) => {
7836
7855
  this.globalLoader.removeAsset(n);
7837
- }), this.trackedAssetIds.clear()), this.subscriptionSheet.forEach((n) => n.unsubscribe()), this.subscriptionTick.unsubscribe(), this.currentAnimationContainer && this.parent instanceof Ft && this.parent.removeChild(this.currentAnimationContainer), e && e();
7856
+ }), this.trackedAssetIds.clear()), this.subscriptionSheet.forEach((n) => n.unsubscribe()), this.subscriptionTick.unsubscribe(), this.currentAnimationContainer && this.parent instanceof Lt && this.parent.removeChild(this.currentAnimationContainer), e && e();
7838
7857
  };
7839
7858
  await super.onDestroy(t, i);
7840
7859
  }
@@ -7852,7 +7871,7 @@ class On extends at(pe) {
7852
7871
  }
7853
7872
  play(t, e = []) {
7854
7873
  const i = this.currentAnimation?.params;
7855
- if (this.isPlaying(t) && te(e, i || [])) return;
7874
+ if (this.isPlaying(t) && Qt(e, i || [])) return;
7856
7875
  const n = this.get(t);
7857
7876
  if (!n)
7858
7877
  throw new Error(
@@ -7861,7 +7880,7 @@ class On extends at(pe) {
7861
7880
  const r = structuredClone(e);
7862
7881
  this.removeChildren(), n.sprites = [], this.currentAnimation = n, this.currentAnimation.params = r, this.time = 0, this.frameIndex = 0;
7863
7882
  let a = n.animations;
7864
- a = fi(a) ? a(...r) : a, this.currentAnimationContainer = new Ft();
7883
+ a = fi(a) ? a(...r) : a, this.currentAnimationContainer = new Lt();
7865
7884
  for (let c of a) {
7866
7885
  const f = new pe();
7867
7886
  for (let p of c)
@@ -7869,7 +7888,7 @@ class On extends at(pe) {
7869
7888
  this.currentAnimationContainer.addChild(f);
7870
7889
  }
7871
7890
  const l = this.currentAnimation.data.sound;
7872
- l && new Bt.Howl({
7891
+ l && new Wt.Howl({
7873
7892
  src: l,
7874
7893
  autoplay: !0,
7875
7894
  loop: !1,
@@ -7904,30 +7923,23 @@ class On extends at(pe) {
7904
7923
  let l = r[this.frameIndex];
7905
7924
  const c = r[this.frameIndex + 1];
7906
7925
  for (let f of this.currentAnimationContainer.children) {
7907
- let p = function(g, y) {
7908
- const b = o(y || g);
7909
- b !== void 0 && (i[g] = b);
7926
+ let p = function(d, m) {
7927
+ const y = o(m || d);
7928
+ y !== void 0 && (i[d] = y);
7910
7929
  };
7911
7930
  if (!l || l.frameY == null || l.frameX == null)
7912
7931
  continue;
7913
7932
  this.texture = n[l.frameY][l.frameX];
7914
- const o = (g) => l[g] ?? a[g] ?? this.spritesheet[g], h = (g) => {
7915
- const y = o(g);
7916
- y && this[g].set(...y);
7933
+ const o = (d) => l[d] ?? a[d] ?? this.spritesheet[d], h = (d) => {
7934
+ const m = o(d);
7935
+ m && this[d].set(...m);
7917
7936
  };
7918
7937
  this.applyTransform && (l = {
7919
7938
  ...l,
7920
7939
  ...this.applyTransform(l, a, this.spritesheet)
7921
7940
  });
7922
- const u = o("spriteRealSize"), d = typeof u == "number" ? u : u?.height;
7923
- typeof u == "number" || u?.width;
7924
- const m = () => {
7925
- if (d && this.hitbox) {
7926
- const { spriteWidth: g, spriteHeight: y } = a, v = (g - this.hitbox.w) / 2 / g, b = (y - d) / 2, w = (y - this.hitbox.h - b) / y;
7927
- this.anchor.set(v, w);
7928
- }
7929
- };
7930
- l.sound, m(), h("anchor"), h("scale"), h("skew"), h("pivot"), p("alpha", "opacity"), p("x"), p("y"), p("angle"), p("rotation"), p("visible");
7941
+ const u = o("spriteRealSize");
7942
+ l.sound, this.applyHitboxAnchor(a.spriteWidth, a.spriteHeight, u), h("anchor"), h("scale"), h("skew"), h("pivot"), p("alpha", "opacity"), p("x"), p("y"), p("angle"), p("rotation"), p("visible");
7931
7943
  }
7932
7944
  if (!c) {
7933
7945
  this.time = 0, this.frameIndex = 0, this.onFinish && r.length > 1 && this.onFinish();
@@ -7935,9 +7947,46 @@ class On extends at(pe) {
7935
7947
  }
7936
7948
  this.time += t ?? 1, this.time >= c.time && this.frameIndex++;
7937
7949
  }
7950
+ applyHitboxAnchor(t, e, i) {
7951
+ if (!this.hitbox || !t || !e)
7952
+ return;
7953
+ const r = (typeof i == "number" ? i : i?.height) ?? e, a = Math.max(0, (e - r) / 2), l = this.clamp(
7954
+ (t - this.hitbox.w) / 2 / t
7955
+ ), c = this.clamp(
7956
+ (e - this.hitbox.h - a) / e
7957
+ ), f = this.clamp(
7958
+ l + this.hitbox.w / 2 / t
7959
+ ), p = this.clamp(
7960
+ c + this.hitbox.h / 2 / e
7961
+ ), o = this.clamp((e - a) / e);
7962
+ let h = l, u = c;
7963
+ switch (this.hitbox.anchorMode ?? "top-left") {
7964
+ case "center":
7965
+ h = f, u = p;
7966
+ break;
7967
+ case "foot":
7968
+ h = f, u = o;
7969
+ break;
7970
+ }
7971
+ this.anchor.set(h, u);
7972
+ }
7973
+ normalizeHitbox(t) {
7974
+ const e = t?.value ?? t;
7975
+ if (!e || typeof e != "object")
7976
+ return null;
7977
+ const { w: i, h: n, anchorMode: r } = e;
7978
+ return typeof i != "number" || typeof n != "number" ? null : {
7979
+ w: i,
7980
+ h: n,
7981
+ anchorMode: r
7982
+ };
7983
+ }
7984
+ clamp(t) {
7985
+ return Math.min(1, Math.max(0, t));
7986
+ }
7938
7987
  }
7939
7988
  R("Sprite", On);
7940
- const In = (s) => (R("Sprite", On), N("Sprite", s));
7989
+ const In = (s) => (R("Sprite", On), V("Sprite", s));
7941
7990
  function ch(s) {
7942
7991
  const t = {
7943
7992
  audioprocess: null,
@@ -8037,7 +8086,7 @@ class Ja extends at(Bn) {
8037
8086
  * Calculates the sound duration to prevent overlapping sounds.
8038
8087
  */
8039
8088
  initializeTypewriterSound() {
8040
- this.typewriterOptions.sound?.src && (this.typewriterSound = new Bt.Howl({
8089
+ this.typewriterOptions.sound?.src && (this.typewriterSound = new Wt.Howl({
8041
8090
  src: [this.typewriterOptions.sound.src],
8042
8091
  volume: this.typewriterOptions.sound.volume ?? 0.5,
8043
8092
  rate: this.typewriterOptions.sound.rate ?? 1,
@@ -8092,7 +8141,7 @@ class Ja extends at(Bn) {
8092
8141
  }
8093
8142
  R("Text", Ja);
8094
8143
  function Za(s) {
8095
- return N("Text", s);
8144
+ return V("Text", s);
8096
8145
  }
8097
8146
  class Qa extends at(Nn) {
8098
8147
  onUpdate(t) {
@@ -8101,7 +8150,7 @@ class Qa extends at(Nn) {
8101
8150
  }
8102
8151
  R("TilingSprite", Qa);
8103
8152
  function uh(s) {
8104
- return N("TilingSprite", s);
8153
+ return V("TilingSprite", s);
8105
8154
  }
8106
8155
  var tl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
8107
8156
  function el(s) {
@@ -8334,7 +8383,7 @@ class sl {
8334
8383
  return (this.isMouseDown ? 1 : 0) + this.touches.length;
8335
8384
  }
8336
8385
  }
8337
- const zt = [
8386
+ const Vt = [
8338
8387
  "drag",
8339
8388
  "pinch",
8340
8389
  "wheel",
@@ -8362,11 +8411,11 @@ class nl {
8362
8411
  * @param {Plugin} plugin - instantiated Plugin class
8363
8412
  * @param {number} index to insert userPlugin (otherwise inserts it at the end)
8364
8413
  */
8365
- add(t, e, i = zt.length) {
8414
+ add(t, e, i = Vt.length) {
8366
8415
  const n = this.plugins[t];
8367
8416
  n && n.destroy(), this.plugins[t] = e;
8368
- const r = zt.indexOf(t);
8369
- r !== -1 && zt.splice(r, 1), zt.splice(i, 0, t), this.sort();
8417
+ const r = Vt.indexOf(t);
8418
+ r !== -1 && Vt.splice(r, 1), Vt.splice(i, 0, t), this.sort();
8370
8419
  }
8371
8420
  /**
8372
8421
  * Get plugin
@@ -8445,7 +8494,7 @@ class nl {
8445
8494
  */
8446
8495
  sort() {
8447
8496
  this.list = [];
8448
- for (const t of zt)
8497
+ for (const t of Vt)
8449
8498
  this.plugins[t] && this.list.push(this.plugins[t]);
8450
8499
  }
8451
8500
  /**
@@ -8497,7 +8546,7 @@ class nl {
8497
8546
  return e;
8498
8547
  }
8499
8548
  }
8500
- class K {
8549
+ class q {
8501
8550
  /** @param {Viewport} parent */
8502
8551
  constructor(t) {
8503
8552
  this.parent = t, this.paused = !1;
@@ -8547,7 +8596,7 @@ const rl = {
8547
8596
  ease: "linear",
8548
8597
  time: 1e3
8549
8598
  };
8550
- class ol extends K {
8599
+ class ol extends q {
8551
8600
  /**
8552
8601
  * This is called by {@link Viewport.animate}.
8553
8602
  *
@@ -8621,7 +8670,7 @@ const al = {
8621
8670
  underflow: "center",
8622
8671
  bounceBox: null
8623
8672
  };
8624
- class ll extends K {
8673
+ class ll extends q {
8625
8674
  /**
8626
8675
  * This is called by {@link Viewport.bounce}.
8627
8676
  */
@@ -8744,7 +8793,7 @@ const hl = {
8744
8793
  direction: null,
8745
8794
  underflow: "center"
8746
8795
  };
8747
- class cl extends K {
8796
+ class cl extends q {
8748
8797
  /**
8749
8798
  * This is called by {@link Viewport.clamp}.
8750
8799
  */
@@ -8818,7 +8867,7 @@ const ul = {
8818
8867
  minScale: null,
8819
8868
  maxScale: null
8820
8869
  };
8821
- class fl extends K {
8870
+ class fl extends q {
8822
8871
  /**
8823
8872
  * This is called by {@link Viewport.clampZoom}.
8824
8873
  */
@@ -8877,7 +8926,7 @@ const dl = {
8877
8926
  bounce: 0.8,
8878
8927
  minSpeed: 0.01
8879
8928
  }, ft = 16;
8880
- class pl extends K {
8929
+ class pl extends q {
8881
8930
  /**
8882
8931
  * This is called by {@link Viewport.decelerate}.
8883
8932
  */
@@ -8958,7 +9007,7 @@ const ml = {
8958
9007
  lineHeight: 20,
8959
9008
  wheelSwapAxes: !1
8960
9009
  };
8961
- class yl extends K {
9010
+ class yl extends q {
8962
9011
  /**
8963
9012
  * This is called by {@link Viewport.drag}.
8964
9013
  */
@@ -9121,7 +9170,7 @@ const gl = {
9121
9170
  acceleration: null,
9122
9171
  radius: null
9123
9172
  };
9124
- class vl extends K {
9173
+ class vl extends q {
9125
9174
  /**
9126
9175
  * This is called by {@link Viewport.follow}.
9127
9176
  *
@@ -9181,7 +9230,7 @@ const bl = {
9181
9230
  linear: !1,
9182
9231
  allowButtons: !1
9183
9232
  };
9184
- class wl extends K {
9233
+ class wl extends q {
9185
9234
  /**
9186
9235
  * This is called by {@link Viewport.mouseEdges}.
9187
9236
  */
@@ -9235,7 +9284,7 @@ const xl = {
9235
9284
  factor: 1,
9236
9285
  axis: "all"
9237
9286
  }, _l = new k();
9238
- class Sl extends K {
9287
+ class Sl extends q {
9239
9288
  /**
9240
9289
  * This is called by {@link Viewport.pinch}.
9241
9290
  */
@@ -9320,7 +9369,7 @@ const Al = {
9320
9369
  removeOnInterrupt: !1,
9321
9370
  forceStart: !1
9322
9371
  };
9323
- class Cl extends K {
9372
+ class Cl extends q {
9324
9373
  /**
9325
9374
  * This is called by {@link Viewport.snap}.
9326
9375
  */
@@ -9377,7 +9426,7 @@ const kl = {
9377
9426
  forceStart: !1,
9378
9427
  noMove: !1
9379
9428
  };
9380
- class Pl extends K {
9429
+ class Pl extends q {
9381
9430
  /**
9382
9431
  * This is called by {@link Viewport.snapZoom}.
9383
9432
  */
@@ -9437,7 +9486,7 @@ const Tl = {
9437
9486
  trackpadPinch: !1,
9438
9487
  wheelZoom: !0
9439
9488
  };
9440
- class Ml extends K {
9489
+ class Ml extends q {
9441
9490
  /**
9442
9491
  * This is called by {@link Viewport.wheel}.
9443
9492
  */
@@ -9550,7 +9599,7 @@ const El = {
9550
9599
  ticker: ws.shared,
9551
9600
  allowPreserveDragOutside: !1
9552
9601
  };
9553
- class Ol extends Ft {
9602
+ class Ol extends Lt {
9554
9603
  /**
9555
9604
  * @param {IViewportOptions} ViewportOptions
9556
9605
  * @param {number} [options.screenWidth=window.innerWidth]
@@ -10216,7 +10265,7 @@ const Il = [
10216
10265
  "zoomed",
10217
10266
  "zoomed-end"
10218
10267
  ];
10219
- class Dl extends at(Ft) {
10268
+ class Dl extends at(Lt) {
10220
10269
  constructor() {
10221
10270
  super(), this.overrideProps = ["wheel"];
10222
10271
  const t = {
@@ -10296,7 +10345,7 @@ class Dl extends at(Ft) {
10296
10345
  }
10297
10346
  R("Viewport", Dl);
10298
10347
  function fh(s) {
10299
- return N("Viewport", s);
10348
+ return V("Viewport", s);
10300
10349
  }
10301
10350
  class Ll extends at(Vn) {
10302
10351
  constructor() {
@@ -10312,7 +10361,7 @@ class Ll extends at(Vn) {
10312
10361
  }
10313
10362
  R("NineSliceSprite", Ll);
10314
10363
  function dh(s) {
10315
- return N("NineSliceSprite", s);
10364
+ return V("NineSliceSprite", s);
10316
10365
  }
10317
10366
  const vs = [
10318
10367
  "click",
@@ -10537,7 +10586,7 @@ class Ln {
10537
10586
  }
10538
10587
  }
10539
10588
  R("DOMElement", Ln);
10540
- const Fl = (s) => N("DOMElement", s), dt = class dt extends at(zn) {
10589
+ const Fl = (s) => V("DOMElement", s), dt = class dt extends at(zn) {
10541
10590
  constructor() {
10542
10591
  super(...arguments), this.disableLayout = !0, this.canvasSizeEffect = null;
10543
10592
  }
@@ -10559,7 +10608,7 @@ const Fl = (s) => N("DOMElement", s), dt = class dt extends at(zn) {
10559
10608
  }
10560
10609
  shouldUseCanvasPercent() {
10561
10610
  const t = this.fullProps?.width, e = this.fullProps?.height;
10562
- return !Y(t) && !Y(e) ? !1 : !this.hasDomContainerAncestor();
10611
+ return !X(t) && !X(e) ? !1 : !this.hasDomContainerAncestor();
10563
10612
  }
10564
10613
  syncCanvasSizeEffect() {
10565
10614
  const t = this.shouldUseCanvasPercent();
@@ -10574,7 +10623,7 @@ const Fl = (s) => N("DOMElement", s), dt = class dt extends at(zn) {
10574
10623
  if (!this.element) return;
10575
10624
  const t = this.fullProps?.width, e = this.fullProps?.height, i = this.shouldUseCanvasPercent(), n = i ? this.getCanvasSize() : null;
10576
10625
  if (t !== void 0)
10577
- if (Y(t))
10626
+ if (X(t))
10578
10627
  if (i) {
10579
10628
  const r = this.getPercentRatio(t);
10580
10629
  if (r !== null) {
@@ -10585,7 +10634,7 @@ const Fl = (s) => N("DOMElement", s), dt = class dt extends at(zn) {
10585
10634
  this.element.style.width = t;
10586
10635
  else typeof t == "number" ? this.element.style.width = `${t}px` : typeof t == "string" && (this.element.style.width = t);
10587
10636
  if (e !== void 0)
10588
- if (Y(e))
10637
+ if (X(e))
10589
10638
  if (i) {
10590
10639
  const r = this.getPercentRatio(e);
10591
10640
  if (r !== null) {
@@ -10600,14 +10649,14 @@ const Fl = (s) => N("DOMElement", s), dt = class dt extends at(zn) {
10600
10649
  if (!t) return t;
10601
10650
  if (Array.isArray(t))
10602
10651
  return t.map((e) => this.routeDomChildren(e));
10603
- if (G(t)) {
10652
+ if (st(t)) {
10604
10653
  if (dt.DOM_ALLOWED_TAGS.has(t.tag))
10605
10654
  return t;
10606
10655
  const e = dt.DOM_ROUTING_MAP[t.tag];
10607
10656
  if (e) {
10608
10657
  t.propSubscriptions?.forEach((n) => n.unsubscribe()), t.effectSubscriptions?.forEach((n) => n.unsubscribe()), t.effectUnmounts?.forEach((n) => n?.());
10609
10658
  const i = t.propObservables ?? t.props;
10610
- return N(e, i);
10659
+ return V(e, i);
10611
10660
  }
10612
10661
  if (dt.DOM_UNSUPPORTED_TAGS.has(t.tag))
10613
10662
  throw new Error(
@@ -10692,7 +10741,7 @@ dt.DOM_ROUTING_MAP = {
10692
10741
  ]);
10693
10742
  let ri = dt;
10694
10743
  R("DOMContainer", ri);
10695
- const ph = (s) => N("DOMContainer", s), Hl = [
10744
+ const ph = (s) => V("DOMContainer", s), Hl = [
10696
10745
  "click",
10697
10746
  "mouseover",
10698
10747
  "mouseout",
@@ -10768,7 +10817,7 @@ class Rl extends Ln {
10768
10817
  return e.value ?? e;
10769
10818
  }
10770
10819
  async detectImageDimensions(t) {
10771
- return !Ot() || !t ? { width: 0, height: 0 } : new Promise((e, i) => {
10820
+ return !Et() || !t ? { width: 0, height: 0 } : new Promise((e, i) => {
10772
10821
  const n = new Image();
10773
10822
  n.onload = () => e({ width: n.naturalWidth, height: n.naturalHeight }), n.onerror = () => i(new Error(`Failed to load image: ${t}`)), n.src = t;
10774
10823
  });
@@ -10836,7 +10885,7 @@ class Rl extends Ln {
10836
10885
  }
10837
10886
  playSheet(t, e = []) {
10838
10887
  const i = this.sheetCurrentAnimation?.params;
10839
- if (this.sheetCurrentAnimation && this.sheetCurrentAnimation.name === t && te(e, i || []))
10888
+ if (this.sheetCurrentAnimation && this.sheetCurrentAnimation.name === t && Qt(e, i || []))
10840
10889
  return;
10841
10890
  const n = this.sheetAnimations.get(t);
10842
10891
  if (!n)
@@ -10869,7 +10918,7 @@ class Rl extends Ln {
10869
10918
  if (e.length <= 1) return;
10870
10919
  const i = this.fps > 0 ? this.fps : 60;
10871
10920
  let n = 0;
10872
- t.deltaTime ? n = t.deltaTime / st(i) : typeof t.deltaRatio == "number" && (n = t.deltaRatio * (i / 60));
10921
+ t.deltaTime ? n = t.deltaTime / it(i) : typeof t.deltaRatio == "number" && (n = t.deltaRatio * (i / 60));
10873
10922
  const r = e[this.sheetFrameIndex + 1];
10874
10923
  if (!r) {
10875
10924
  if (this.loop) {
@@ -11128,23 +11177,23 @@ class Rl extends Ln {
11128
11177
  timestamp: e,
11129
11178
  deltaTime: i,
11130
11179
  frame: 0,
11131
- deltaRatio: i / st(this.fps)
11132
- }) : this.advance(i), Ot() ? this.rafId = window.requestAnimationFrame(t) : this.rafId = setTimeout(() => {
11180
+ deltaRatio: i / it(this.fps)
11181
+ }) : this.advance(i), Et() ? this.rafId = window.requestAnimationFrame(t) : this.rafId = setTimeout(() => {
11133
11182
  t(lt());
11134
- }, st(this.fps));
11183
+ }, it(this.fps));
11135
11184
  };
11136
- Ot() ? this.rafId = window.requestAnimationFrame(t) : this.rafId = setTimeout(() => {
11185
+ Et() ? this.rafId = window.requestAnimationFrame(t) : this.rafId = setTimeout(() => {
11137
11186
  t(lt());
11138
- }, st(this.fps));
11187
+ }, it(this.fps));
11139
11188
  }
11140
11189
  stopAnimationLoop() {
11141
- this.isAnimating = !1, this.tickSubscription && (this.tickSubscription.unsubscribe(), this.tickSubscription = void 0), this.rafId !== void 0 && (Ot() ? window.cancelAnimationFrame(this.rafId) : clearTimeout(this.rafId), this.rafId = void 0, this.lastRafTimestamp = void 0), this.lastTickTimestamp = void 0;
11190
+ this.isAnimating = !1, this.tickSubscription && (this.tickSubscription.unsubscribe(), this.tickSubscription = void 0), this.rafId !== void 0 && (Et() ? window.cancelAnimationFrame(this.rafId) : clearTimeout(this.rafId), this.rafId = void 0, this.lastRafTimestamp = void 0), this.lastTickTimestamp = void 0;
11142
11191
  }
11143
11192
  advance(t) {
11144
11193
  const e = this.getFrames();
11145
11194
  if (!this.playing || e.length <= 1 || this.fps <= 0) return;
11146
11195
  this.elapsed += t;
11147
- const i = st(this.fps);
11196
+ const i = it(this.fps);
11148
11197
  for (; this.elapsed >= i; )
11149
11198
  if (this.elapsed -= i, this.frameIndex += 1, !this.loop && this.frameIndex >= e.length) {
11150
11199
  this.frameIndex = e.length - 1;
@@ -11154,8 +11203,8 @@ class Rl extends Ln {
11154
11203
  }
11155
11204
  }
11156
11205
  R("DOMSprite", Rl);
11157
- const mh = (s) => N("DOMSprite", s);
11158
- var Wl = /* @__PURE__ */ ((s) => (s.Normal = "normal", s.Hover = "hover", s.Pressed = "pressed", s.Disabled = "disabled", s))(Wl || {});
11206
+ const mh = (s) => V("DOMSprite", s);
11207
+ var jl = /* @__PURE__ */ ((s) => (s.Normal = "normal", s.Hover = "hover", s.Pressed = "pressed", s.Disabled = "disabled", s))(jl || {});
11159
11208
  function yh(s) {
11160
11209
  const t = P(
11161
11210
  "normal"
@@ -11237,7 +11286,7 @@ function yh(s) {
11237
11286
  }, d = () => {
11238
11287
  if (s.background)
11239
11288
  return s.background;
11240
- const g = p(), y = J(() => {
11289
+ const g = p(), y = K(() => {
11241
11290
  const b = f().backgroundColor || {
11242
11291
  normal: "#007bff",
11243
11292
  hover: "#0056b3",
@@ -11247,14 +11296,14 @@ function yh(s) {
11247
11296
  return b[w] || b.normal;
11248
11297
  });
11249
11298
  if (g === "circle") {
11250
- const v = J(() => Math.min(l(), c()) / 2);
11299
+ const v = K(() => Math.min(l(), c()) / 2);
11251
11300
  return U(An, {
11252
11301
  radius: v,
11253
- x: J(() => l() / 2),
11254
- y: J(() => c() / 2),
11302
+ x: K(() => l() / 2),
11303
+ y: K(() => c() / 2),
11255
11304
  color: y
11256
11305
  });
11257
- } else return g === "ellipse" ? U(Wa, {
11306
+ } else return g === "ellipse" ? U(ja, {
11258
11307
  width: l,
11259
11308
  height: c,
11260
11309
  color: y
@@ -11266,10 +11315,10 @@ function yh(s) {
11266
11315
  }, m = () => s.children && s.children.length > 0 ? s.children : [
11267
11316
  U(Za, {
11268
11317
  text: r,
11269
- x: J(() => l() / 2),
11270
- y: J(() => c() / 2),
11318
+ x: K(() => l() / 2),
11319
+ y: K(() => c() / 2),
11271
11320
  anchor: { x: 0.5, y: 0.5 },
11272
- style: J(() => {
11321
+ style: K(() => {
11273
11322
  const y = f().text || {};
11274
11323
  return {
11275
11324
  fontSize: y.fontSize || 16,
@@ -11335,13 +11384,13 @@ function gh(s = {}) {
11335
11384
  let S = w.getLocalPosition(x), C = S.x - (l?.x ?? 0), M = S.y - (l?.y ?? 0), A = new Fn.Point(0, 0), L = 0;
11336
11385
  if (C == 0 && M == 0)
11337
11386
  return;
11338
- let W = "left";
11387
+ let j = "left";
11339
11388
  if (C == 0) {
11340
- M > 0 ? (A.set(0, M > i ? i : M), L = 270, W = "bottom") : (A.set(
11389
+ M > 0 ? (A.set(0, M > i ? i : M), L = 270, j = "bottom") : (A.set(
11341
11390
  0,
11342
11391
  -(Math.abs(M) > i ? i : Math.abs(M))
11343
- ), L = 90, W = "top"), f.set(A.x), p.set(A.y), c = h(A);
11344
- const gt = { angle: L, direction: W, power: c };
11392
+ ), L = 90, j = "top"), f.set(A.x), p.set(A.y), c = h(A);
11393
+ const gt = { angle: L, direction: j, power: c };
11345
11394
  t.onChange?.(gt);
11346
11395
  const z = e();
11347
11396
  z && (z.handleJoystickChange ? z.handleJoystickChange(gt) : z.joystick && z.joystick.handleJoystickChange && z.joystick.handleJoystickChange(gt));
@@ -11351,21 +11400,21 @@ function gh(s = {}) {
11351
11400
  C > 0 ? (A.set(
11352
11401
  Math.abs(C) > i ? i : Math.abs(C),
11353
11402
  0
11354
- ), L = 0, W = "right") : (A.set(
11403
+ ), L = 0, j = "right") : (A.set(
11355
11404
  -(Math.abs(C) > i ? i : Math.abs(C)),
11356
11405
  0
11357
- ), L = 180, W = "left"), f.set(A.x), p.set(A.y), c = h(A);
11358
- const gt = { angle: L, direction: W, power: c };
11406
+ ), L = 180, j = "left"), f.set(A.x), p.set(A.y), c = h(A);
11407
+ const gt = { angle: L, direction: j, power: c };
11359
11408
  t.onChange?.(gt);
11360
11409
  const z = e();
11361
11410
  z && (z.handleJoystickChange ? z.handleJoystickChange(gt) : z.joystick && z.joystick.handleJoystickChange && z.joystick.handleJoystickChange(gt));
11362
11411
  return;
11363
11412
  }
11364
- let Nt = Math.abs(M / C), ut = Math.atan(Nt);
11413
+ let Bt = Math.abs(M / C), ut = Math.atan(Bt);
11365
11414
  L = ut * 180 / Math.PI;
11366
- let j = 0, it = 0;
11367
- C * C + M * M >= i * i ? (j = i * Math.cos(ut), it = i * Math.sin(ut)) : (j = Math.abs(C) > i ? i : Math.abs(C), it = Math.abs(M) > i ? i : Math.abs(M)), M < 0 && (it = -Math.abs(it)), C < 0 && (j = -Math.abs(j)), C > 0 && M < 0 || (C < 0 && M < 0 ? L = 180 - L : C < 0 && M > 0 ? L = L + 180 : C > 0 && M > 0 && (L = 360 - L)), A.set(j, it), c = h(A), W = u(A), f.set(A.x), p.set(A.y);
11368
- const Ie = { angle: L, direction: W, power: c };
11415
+ let W = 0, et = 0;
11416
+ C * C + M * M >= i * i ? (W = i * Math.cos(ut), et = i * Math.sin(ut)) : (W = Math.abs(C) > i ? i : Math.abs(C), et = Math.abs(M) > i ? i : Math.abs(M)), M < 0 && (et = -Math.abs(et)), C < 0 && (W = -Math.abs(W)), C > 0 && M < 0 || (C < 0 && M < 0 ? L = 180 - L : C < 0 && M > 0 ? L = L + 180 : C > 0 && M > 0 && (L = 360 - L)), A.set(W, et), c = h(A), j = u(A), f.set(A.x), p.set(A.y);
11417
+ const Ie = { angle: L, direction: j, power: c };
11369
11418
  t.onChange?.(Ie);
11370
11419
  const Pt = e();
11371
11420
  Pt && (Pt.handleJoystickChange ? Pt.handleJoystickChange(Ie) : Pt.joystick && Pt.joystick.handleJoystickChange && Pt.joystick.handleJoystickChange(Ie));
@@ -11375,7 +11424,7 @@ function gh(s = {}) {
11375
11424
  image: t.outer,
11376
11425
  anchor: { x: 0.5, y: 0.5 },
11377
11426
  scale: t.outerScale
11378
- }) : v = U(Rt, {
11427
+ }) : v = U(Ht, {
11379
11428
  draw: (w) => {
11380
11429
  w.circle(0, 0, i).fill(t.outerColor);
11381
11430
  },
@@ -11387,7 +11436,7 @@ function gh(s = {}) {
11387
11436
  y: p,
11388
11437
  alpha: o
11389
11438
  };
11390
- return t.inner ? y = t.inner : y = U(Rt, {
11439
+ return t.inner ? y = t.inner : y = U(Ht, {
11391
11440
  draw: (w) => {
11392
11441
  w.circle(0, 0, n * 2.5).fill(t.innerColor);
11393
11442
  },
@@ -11675,8 +11724,8 @@ const bt = class bt {
11675
11724
  };
11676
11725
  bt.instance = null;
11677
11726
  let oi = bt;
11678
- const Z = oi.getInstance();
11679
- class jl extends $ {
11727
+ const J = oi.getInstance();
11728
+ class Wl extends Y {
11680
11729
  constructor() {
11681
11730
  super(...arguments), this.element = null, this.controlsDirective = null, this.controlsSubscription = null;
11682
11731
  }
@@ -11728,7 +11777,7 @@ class jl extends $ {
11728
11777
  this.controlsSubscription && (this.controlsSubscription.unsubscribe(), this.controlsSubscription = null), this.element = null, this.controlsDirective = null;
11729
11778
  }
11730
11779
  }
11731
- q("focusNavigation", jl);
11780
+ $("focusNavigation", Wl);
11732
11781
  class Bl {
11733
11782
  constructor() {
11734
11783
  this.containerId = "", this.currentIndexSignal = null, this.focusedElementSignal = null, this.registeredFocusables = /* @__PURE__ */ new Set();
@@ -11743,7 +11792,7 @@ class Bl {
11743
11792
  const e = P(null), i = P(null);
11744
11793
  this.currentIndexSignal = e, this.focusedElementSignal = i;
11745
11794
  const n = t.viewport || t.context?.viewport;
11746
- Z.registerContainer(this.containerId, {
11795
+ J.registerContainer(this.containerId, {
11747
11796
  focusables: /* @__PURE__ */ new Map(),
11748
11797
  currentIndex: e,
11749
11798
  focusedElement: i,
@@ -11758,7 +11807,7 @@ class Bl {
11758
11807
  * @param element - The element being mounted
11759
11808
  */
11760
11809
  async onMount(t) {
11761
- if (Z.updateContainer(this.containerId, { element: t }), t.props.controls) {
11810
+ if (J.updateContainer(this.containerId, { element: t }), t.props.controls) {
11762
11811
  const e = mi(t, "focusNavigation");
11763
11812
  e && !t.directives && (t.directives = {}), e && (t.directives.focusNavigation = e, e.onInit(t), e.onMount(t));
11764
11813
  }
@@ -11768,7 +11817,7 @@ class Bl {
11768
11817
  });
11769
11818
  t.effectSubscriptions || (t.effectSubscriptions = []), t.effectSubscriptions.push(e);
11770
11819
  }
11771
- Z.setTabindex(this.containerId, t.propObservables?.tabindex), setTimeout(() => {
11820
+ J.setTabindex(this.containerId, t.propObservables?.tabindex), setTimeout(() => {
11772
11821
  this.registerChildren(t);
11773
11822
  }, 0);
11774
11823
  }
@@ -11779,7 +11828,7 @@ class Bl {
11779
11828
  */
11780
11829
  onUpdate(t) {
11781
11830
  const e = t.viewport || t.context?.viewport;
11782
- Z.updateContainer(this.containerId, {
11831
+ J.updateContainer(this.containerId, {
11783
11832
  viewport: e,
11784
11833
  autoScroll: t.autoScroll,
11785
11834
  onFocusChange: t.onFocusChange
@@ -11793,8 +11842,8 @@ class Bl {
11793
11842
  */
11794
11843
  async onDestroy(t, e) {
11795
11844
  for (const i of this.registeredFocusables)
11796
- Z.unregisterFocusable(this.containerId, i);
11797
- this.registeredFocusables.clear(), Z.unregisterContainer(this.containerId), e && e();
11845
+ J.unregisterFocusable(this.containerId, i);
11846
+ this.registeredFocusables.clear(), J.unregisterContainer(this.containerId), e && e();
11798
11847
  }
11799
11848
  /**
11800
11849
  * Register focusable children from element
@@ -11832,7 +11881,7 @@ class Bl {
11832
11881
  const a = n.props.tabindex;
11833
11882
  r = _(a) ? a() : a;
11834
11883
  }
11835
- if (r !== void 0 && r >= 0 && (this.registeredFocusables.has(r) || (Z.registerFocusable(this.containerId, n, r), this.registeredFocusables.add(r))), n.props && n.props.children)
11884
+ if (r !== void 0 && r >= 0 && (this.registeredFocusables.has(r) || (J.registerFocusable(this.containerId, n, r), this.registeredFocusables.add(r))), n.props && n.props.children)
11836
11885
  if (Array.isArray(n.props.children))
11837
11886
  e(n.props.children);
11838
11887
  else if (_(n.props.children) || n.props.children && typeof n.props.children.subscribe == "function") {
@@ -11886,7 +11935,7 @@ class Bl {
11886
11935
  }
11887
11936
  }
11888
11937
  R("Navigation", Bl);
11889
- const Nl = (s) => N("Navigation", s), vh = Nl, bh = async (s, t, e) => {
11938
+ const Nl = (s) => V("Navigation", s), vh = Nl, bh = async (s, t, e) => {
11890
11939
  const { components: i, autoRegister: n, enableLayout: r, ...a } = e ?? {};
11891
11940
  r !== !1 && await import("./index-DaGekQUW.js"), i ? (n !== !1 && fs(), Object.entries(i).forEach(([p, o]) => {
11892
11941
  R(p, o);
@@ -11902,7 +11951,7 @@ const Nl = (s) => N("Navigation", s), vh = Nl, bh = async (s, t, e) => {
11902
11951
  if (c.tag != "Canvas")
11903
11952
  throw new Error("Canvas is required");
11904
11953
  c.render(s, l);
11905
- const { backgroundColor: f } = tt(c.props, {
11954
+ const { backgroundColor: f } = Q(c.props, {
11906
11955
  backgroundColor: "black"
11907
11956
  });
11908
11957
  return l.renderer.background.color = f(), {
@@ -11911,13 +11960,13 @@ const Nl = (s) => N("Navigation", s), vh = Nl, bh = async (s, t, e) => {
11911
11960
  };
11912
11961
  };
11913
11962
  function wh(s) {
11914
- return Z.getCurrentIndexSignal(s);
11963
+ return J.getCurrentIndexSignal(s);
11915
11964
  }
11916
11965
  function xh(s) {
11917
- return Z.getFocusedElementSignal(s);
11966
+ return J.getFocusedElementSignal(s);
11918
11967
  }
11919
11968
  function _h(s, t) {
11920
- const e = Z.getCurrentIndexSignal(s), i = Z.getFocusedElementSignal(s);
11969
+ const e = J.getCurrentIndexSignal(s), i = J.getFocusedElementSignal(s);
11921
11970
  if (!e || !i)
11922
11971
  return console.warn(`FocusContainer with id "${s}" not found`), () => {
11923
11972
  };
@@ -11930,7 +11979,7 @@ function _h(s, t) {
11930
11979
  };
11931
11980
  }
11932
11981
  const Sh = {
11933
- linear: jo,
11982
+ linear: Wo,
11934
11983
  easeIn: xi,
11935
11984
  easeInOut: pn,
11936
11985
  easeOut: Bo,
@@ -12033,11 +12082,11 @@ function Ch(s, t, e = "wrap") {
12033
12082
  set: (n) => i(n)
12034
12083
  };
12035
12084
  }
12036
- const kh = Bt.Howler;
12085
+ const kh = Wt.Howler;
12037
12086
  export {
12038
- ae as ArraySubject,
12087
+ oe as ArraySubject,
12039
12088
  yh as Button,
12040
- Wl as ButtonState,
12089
+ jl as ButtonState,
12041
12090
  sh as Canvas,
12042
12091
  An as Circle,
12043
12092
  Te as Container,
@@ -12051,13 +12100,13 @@ export {
12051
12100
  Ta as Drop,
12052
12101
  La as EVENTS,
12053
12102
  Sh as Easing,
12054
- Wa as Ellipse,
12103
+ ja as Ellipse,
12055
12104
  Ia as Flash,
12056
12105
  Nl as FocusContainer,
12057
12106
  oi as FocusManager,
12058
12107
  Da as FogVisibility,
12059
12108
  eo as GamepadControls,
12060
- Rt as Graphics,
12109
+ Ht as Graphics,
12061
12110
  Zl as Howl,
12062
12111
  kh as Howler,
12063
12112
  zr as Input,
@@ -12067,7 +12116,7 @@ export {
12067
12116
  oh as Mesh,
12068
12117
  vh as Navigation,
12069
12118
  dh as NineSliceSprite,
12070
- le as ObjectSubject,
12119
+ ae as ObjectSubject,
12071
12120
  hh as ParticlesEmitter,
12072
12121
  Ah as RadialGradient,
12073
12122
  Ra as Rect,
@@ -12089,18 +12138,18 @@ export {
12089
12138
  _n as animatedSignal,
12090
12139
  bh as bootstrapCanvas,
12091
12140
  ve as checkDependencies,
12092
- J as computed,
12141
+ K as computed,
12093
12142
  Jl as cond,
12094
- N as createComponent,
12143
+ V as createComponent,
12095
12144
  Ch as createTabindexNavigator,
12096
12145
  ms as currentSubscriptionsTracker,
12097
12146
  H as effect,
12098
- Z as focusManager,
12147
+ J as focusManager,
12099
12148
  U as h,
12100
- Zt as isAnimatedSignal,
12149
+ Jt as isAnimatedSignal,
12101
12150
  Yl as isArraySubject,
12102
- ee as isComputed,
12103
- G as isElement,
12151
+ te as isComputed,
12152
+ st as isElement,
12104
12153
  ot as isElementFrozen,
12105
12154
  $l as isObjectSubject,
12106
12155
  Gl as isObservable,
@@ -12122,7 +12171,7 @@ export {
12122
12171
  _h as useFocusChange,
12123
12172
  wh as useFocusIndex,
12124
12173
  xh as useFocusedElement,
12125
- tt as useProps,
12174
+ Q as useProps,
12126
12175
  va as waitForDependencies
12127
12176
  };
12128
12177
  //# sourceMappingURL=index.js.map