@caperjs/core 0.1.1 → 0.1.2

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.
Files changed (83) hide show
  1. package/lib/{CaptionsPlugin-Dc8fIrjy.js → CaptionsPlugin-DKhbmJvH.js} +15 -15
  2. package/lib/{CaptionsPlugin-Dc8fIrjy.js.map → CaptionsPlugin-DKhbmJvH.js.map} +1 -1
  3. package/lib/{DataAdapter-BY2114sp.js → DataAdapter-BZFTkFQ4.js} +4 -4
  4. package/lib/{DataAdapter-BY2114sp.js.map → DataAdapter-BZFTkFQ4.js.map} +1 -1
  5. package/lib/{DebugRenderer-BJMLILqI.js → DebugRenderer-C7X-nlXE.js} +2 -2
  6. package/lib/{DebugRenderer-BJMLILqI.js.map → DebugRenderer-C7X-nlXE.js.map} +1 -1
  7. package/lib/{DevToolsPlugin-wQ5rOkn0.js → DevToolsPlugin-P-atJ-5U.js} +2 -2
  8. package/lib/{DevToolsPlugin-wQ5rOkn0.js.map → DevToolsPlugin-P-atJ-5U.js.map} +1 -1
  9. package/lib/{GSAPPlugin-DHhSZKv8.js → GSAPPlugin-CeH9275z.js} +2 -2
  10. package/lib/{GSAPPlugin-DHhSZKv8.js.map → GSAPPlugin-CeH9275z.js.map} +1 -1
  11. package/lib/{LayoutPlugin-B-DF9SYM.js → LayoutPlugin-iZ3k6RsK.js} +4 -4
  12. package/lib/{LayoutPlugin-B-DF9SYM.js.map → LayoutPlugin-iZ3k6RsK.js.map} +1 -1
  13. package/lib/{SpinePlugin-Dz_3dljz.js → SpinePlugin-BWiavCpO.js} +2 -2
  14. package/lib/{SpinePlugin-Dz_3dljz.js.map → SpinePlugin-BWiavCpO.js.map} +1 -1
  15. package/lib/{StatsPlugin-Cg82JMBD.js → StatsPlugin-CBpzDJL0.js} +4 -4
  16. package/lib/{StatsPlugin-Cg82JMBD.js.map → StatsPlugin-CBpzDJL0.js.map} +1 -1
  17. package/lib/{VoiceOverPlugin-BR3ImT8C.js → VoiceOverPlugin-YaiKJtJ6.js} +26 -26
  18. package/lib/{VoiceOverPlugin-BR3ImT8C.js.map → VoiceOverPlugin-YaiKJtJ6.js.map} +1 -1
  19. package/lib/caper.mjs +95 -95
  20. package/lib/caper.mjs.map +1 -1
  21. package/lib/core/Application.d.ts +1 -1
  22. package/lib/core/Application.d.ts.map +1 -1
  23. package/lib/core/interfaces/IApplicationOptions.d.ts +2 -1
  24. package/lib/core/interfaces/IApplicationOptions.d.ts.map +1 -1
  25. package/lib/core/interfaces/ICoreSignals.d.ts +5 -1
  26. package/lib/core/interfaces/ICoreSignals.d.ts.map +1 -1
  27. package/lib/display/Container.d.ts +1 -1
  28. package/lib/display/Container.d.ts.map +1 -1
  29. package/lib/display/ParticleContainer.d.ts +1 -1
  30. package/lib/display/ParticleContainer.d.ts.map +1 -1
  31. package/lib/plugins/Plugin.d.ts +1 -1
  32. package/lib/plugins/Plugin.d.ts.map +1 -1
  33. package/lib/plugins/defaults.d.ts.map +1 -1
  34. package/lib/plugins/gesture/GesturePlugin.d.ts +58 -0
  35. package/lib/plugins/gesture/GesturePlugin.d.ts.map +1 -0
  36. package/lib/plugins/gesture/gestureMath.d.ts +32 -0
  37. package/lib/plugins/gesture/gestureMath.d.ts.map +1 -0
  38. package/lib/plugins/gesture/gestureMath.test.d.ts +2 -0
  39. package/lib/plugins/gesture/gestureMath.test.d.ts.map +1 -0
  40. package/lib/plugins/gesture/index.d.ts +3 -0
  41. package/lib/plugins/gesture/index.d.ts.map +1 -0
  42. package/lib/plugins/gesture/types.d.ts +45 -0
  43. package/lib/plugins/gesture/types.d.ts.map +1 -0
  44. package/lib/plugins/index.d.ts +1 -0
  45. package/lib/plugins/index.d.ts.map +1 -1
  46. package/lib/plugins/input/Controls.d.ts +5 -2
  47. package/lib/plugins/input/Controls.d.ts.map +1 -1
  48. package/lib/plugins/input/InputPlugin.d.ts +9 -2
  49. package/lib/plugins/input/InputPlugin.d.ts.map +1 -1
  50. package/lib/plugins/input/interfaces.d.ts +5 -3
  51. package/lib/plugins/input/interfaces.d.ts.map +1 -1
  52. package/lib/plugins/input/touch/{TouchControls.d.ts → VirtualControls.d.ts} +5 -4
  53. package/lib/plugins/input/touch/VirtualControls.d.ts.map +1 -0
  54. package/lib/plugins/input/touch/index.d.ts +1 -1
  55. package/lib/plugins/input/touch/index.d.ts.map +1 -1
  56. package/lib/{registries-CYCaYKZI.js → registries-qQmLeN0b.js} +505 -354
  57. package/lib/registries-qQmLeN0b.js.map +1 -0
  58. package/lib/utils/bind.test.d.ts +2 -0
  59. package/lib/utils/bind.test.d.ts.map +1 -0
  60. package/package.json +21 -20
  61. package/src/core/Application.ts +1 -1
  62. package/src/core/interfaces/IApplicationOptions.ts +2 -0
  63. package/src/core/interfaces/ICoreSignals.ts +9 -0
  64. package/src/display/Container.ts +1 -1
  65. package/src/display/ParticleContainer.ts +1 -1
  66. package/src/plugins/Plugin.ts +1 -1
  67. package/src/plugins/defaults.ts +6 -0
  68. package/src/plugins/gesture/GesturePlugin.ts +215 -0
  69. package/src/plugins/gesture/gestureMath.test.ts +75 -0
  70. package/src/plugins/gesture/gestureMath.ts +59 -0
  71. package/src/plugins/gesture/index.ts +2 -0
  72. package/src/plugins/gesture/types.ts +54 -0
  73. package/src/plugins/index.ts +1 -0
  74. package/src/plugins/input/Controls.ts +9 -3
  75. package/src/plugins/input/InputPlugin.ts +61 -14
  76. package/src/plugins/input/interfaces.ts +5 -3
  77. package/src/plugins/input/touch/{TouchControls.ts → VirtualControls.ts} +4 -1
  78. package/src/plugins/input/touch/index.ts +1 -1
  79. package/src/utils/bind.test.ts +99 -0
  80. package/src/version.ts +1 -1
  81. package/LICENSE +0 -22
  82. package/lib/plugins/input/touch/TouchControls.d.ts.map +0 -1
  83. package/lib/registries-CYCaYKZI.js.map +0 -1
@@ -181,15 +181,15 @@ var C = /* @__PURE__ */ function(e) {
181
181
  }({}), Ie = (e = 0) => new Promise((t) => setTimeout(t, e * 1e3)), Le = (e = 0) => Ie(e), Re = (e) => e && typeof e.then == "function";
182
182
  //#endregion
183
183
  //#region src/utils/vite.ts
184
- function w(e) {
184
+ function ze(e) {
185
185
  y.error(e);
186
186
  }
187
187
  //#endregion
188
188
  //#region src/utils/promise/Queue.ts
189
- function ze(...e) {
190
- return new Be(e);
189
+ function Be(...e) {
190
+ return new Ve(e);
191
191
  }
192
- var Be = class {
192
+ var Ve = class {
193
193
  constructor(e = []) {
194
194
  this._currentIndex = 0, this._isPaused = !1, this._isCanceled = !1, this._promises = e;
195
195
  }
@@ -222,7 +222,7 @@ var Be = class {
222
222
  this._results.push(t), this._currentIndex++, this._next();
223
223
  } catch (e) {
224
224
  let t = e instanceof Error ? e : Error(String(e));
225
- console.error("Queue didn't complete due to an error:", e), w({
225
+ console.error("Queue didn't complete due to an error:", e), ze({
226
226
  message: `Queue didn't complete due to an error: ${t.message}`,
227
227
  stack: t.stack,
228
228
  id: e?.id
@@ -232,23 +232,23 @@ var Be = class {
232
232
  };
233
233
  //#endregion
234
234
  //#region src/utils/framework.ts
235
- function Ve(e) {
235
+ function He(e) {
236
236
  return typeof e == "function" && /^class\s/.test(Function.prototype.toString.call(e));
237
237
  }
238
- async function He(e) {
238
+ async function Ue(e) {
239
239
  let t, n;
240
- return Re(e.module) ? (t = await e.module, n = e?.namedExport ? t[e.namedExport] : t.default) : typeof e.module == "function" ? Ve(e.module) ? (t = e.module, n = t) : (t = await e.module(), n = e?.namedExport ? t[e.namedExport] : t.default) : (t = e.module, n = t), n;
240
+ return Re(e.module) ? (t = await e.module, n = e?.namedExport ? t[e.namedExport] : t.default) : typeof e.module == "function" ? He(e.module) ? (t = e.module, n = t) : (t = await e.module(), n = e?.namedExport ? t[e.namedExport] : t.default) : (t = e.module, n = t), n;
241
241
  }
242
242
  //#endregion
243
243
  //#region src/utils/map.ts
244
- function Ue(e, t) {
244
+ function We(e, t) {
245
245
  let n;
246
246
  for (let r of e) {
247
247
  if (r[0] === t) return n;
248
248
  n = r;
249
249
  }
250
250
  }
251
- function We(e, t) {
251
+ function Ge(e, t) {
252
252
  let n, r = Array.from(e.entries());
253
253
  for (let e = r.length - 1; e >= 0; e--) {
254
254
  let i = r[e];
@@ -256,23 +256,23 @@ function We(e, t) {
256
256
  n = i;
257
257
  }
258
258
  }
259
- function Ge(e) {
259
+ function Ke(e) {
260
260
  return Array.from(e.entries()).pop();
261
261
  }
262
- function Ke(e) {
262
+ function qe(e) {
263
263
  return Array.from(e.entries()).shift();
264
264
  }
265
265
  //#endregion
266
266
  //#region src/utils/math.ts
267
- function qe(e, t, n) {
267
+ function Je(e, t, n) {
268
268
  return Math.max(t, Math.min(n, e));
269
269
  }
270
- function Je(e, t, n) {
270
+ function Ye(e, t, n) {
271
271
  return e + (t - e) * n;
272
272
  }
273
273
  //#endregion
274
274
  //#region src/utils/misc.ts
275
- function Ye(e) {
275
+ function Xe(e) {
276
276
  if (e === void 0) return {
277
277
  width: 0,
278
278
  height: 0
@@ -296,7 +296,7 @@ function Ye(e) {
296
296
  height: e ?? 0
297
297
  };
298
298
  }
299
- function Xe(e, t) {
299
+ function Ze(e, t) {
300
300
  let n = null;
301
301
  return function(...r) {
302
302
  n && clearTimeout(n), n = setTimeout(() => {
@@ -306,33 +306,33 @@ function Xe(e, t) {
306
306
  }
307
307
  //#endregion
308
308
  //#region src/utils/number.ts
309
- function Ze(e, t = 0) {
309
+ function Qe(e, t = 0) {
310
310
  return e.toString().padStart(t, "0");
311
311
  }
312
312
  //#endregion
313
313
  //#region src/utils/object.ts
314
- function T(e, t) {
314
+ function w(e, t) {
315
315
  return t.reduce((t, n) => n in e ? {
316
316
  ...t,
317
317
  [n]: e[n]
318
318
  } : t, {});
319
319
  }
320
- function Qe(e, t) {
320
+ function $e(e, t) {
321
321
  return Object.entries(t).filter(([t]) => !e.includes(t)).reduce((e, [t, n]) => ({
322
322
  ...e,
323
323
  [t]: n
324
324
  }), {});
325
325
  }
326
- function $e(e, t) {
327
- for (let n in t) t[n] !== void 0 && Object.prototype.toString.call(t[n]) === "[object Object]" && n in e && typeof e[n] == "object" ? e[n] = $e(e[n], t[n]) : t[n] !== void 0 && (e[n] = t[n]);
326
+ function et(e, t) {
327
+ for (let n in t) t[n] !== void 0 && Object.prototype.toString.call(t[n]) === "[object Object]" && n in e && typeof e[n] == "object" ? e[n] = et(e[n], t[n]) : t[n] !== void 0 && (e[n] = t[n]);
328
328
  return e;
329
329
  }
330
330
  //#endregion
331
331
  //#region src/utils/padding.ts
332
- function et(e, t) {
332
+ function tt(e, t) {
333
333
  return e >= 0 && e <= 1 ? e * t : e;
334
334
  }
335
- function tt(e) {
335
+ function nt(e) {
336
336
  if (Array.isArray(e)) return {
337
337
  top: e[0],
338
338
  right: e?.[1] ?? e[0],
@@ -367,35 +367,35 @@ function tt(e) {
367
367
  }
368
368
  //#endregion
369
369
  //#region src/utils/point.ts
370
- function nt(e, t) {
370
+ function rt(e, t) {
371
371
  return new f(e.x + t.x, e.y + t.y);
372
372
  }
373
- function rt(e, t) {
373
+ function it(e, t) {
374
374
  e.x += t.x, e.y += t.y;
375
375
  }
376
- function it(e, t) {
376
+ function at(e, t) {
377
377
  return new f(e.x - t.x, e.y - t.y);
378
378
  }
379
- function at(e, t) {
379
+ function ot(e, t) {
380
380
  e.x -= t.x, e.y -= t.y;
381
381
  }
382
- function ot(e, t) {
382
+ function st(e, t) {
383
383
  let n = new f(e.x, e.y);
384
384
  return n.x *= t, n.y *= t, n;
385
385
  }
386
- function st(e, t) {
387
- return Je(e.x, e.y, t);
388
- }
389
386
  function ct(e, t) {
390
- return Math.sqrt(lt(e, t));
387
+ return Ye(e.x, e.y, t);
391
388
  }
392
389
  function lt(e, t) {
390
+ return Math.sqrt(ut(e, t));
391
+ }
392
+ function ut(e, t) {
393
393
  return (t.x - e.x) * (t.x - e.x) + (t.y - e.y) * (t.y - e.y);
394
394
  }
395
- function ut(e) {
395
+ function dt(e) {
396
396
  return Math.sqrt(e.x * e.x + e.y * e.y);
397
397
  }
398
- function E(e, t = !1, n = 0, r = 0) {
398
+ function T(e, t = !1, n = 0, r = 0) {
399
399
  if (e instanceof f) n = e.x, r = e.y;
400
400
  else if (Array.isArray(e)) n = e[0], r = e[1] === void 0 ? e[0] : e[1];
401
401
  else if (typeof e == "object") {
@@ -409,12 +409,12 @@ function E(e, t = !1, n = 0, r = 0) {
409
409
  }
410
410
  //#endregion
411
411
  //#region src/utils/web.ts
412
- function dt() {
412
+ function ft() {
413
413
  return window.innerWidth > window.innerHeight ? "landscape" : "portrait";
414
414
  }
415
415
  //#endregion
416
416
  //#region src/core/config.ts
417
- async function ft(e) {
417
+ async function pt(e) {
418
418
  let t = Caper.get("pluginsList") || [];
419
419
  return e.map((e) => {
420
420
  let n = t.find((t) => t.id === e || t.id === e[0]);
@@ -430,10 +430,10 @@ async function ft(e) {
430
430
  };
431
431
  }).filter(Boolean);
432
432
  }
433
- function pt(e) {
433
+ function mt(e) {
434
434
  return e;
435
435
  }
436
- function mt(e) {
436
+ function ht(e) {
437
437
  if (e.length < 2) return e.slice();
438
438
  let t = /* @__PURE__ */ new Map();
439
439
  for (let n of e) t.set(n.id, n);
@@ -467,12 +467,12 @@ function mt(e) {
467
467
  }
468
468
  }
469
469
  if (s.length !== e.length) {
470
- let n = e.filter((e) => !s.includes(e)).map((e) => e.id), r = ht(n, t);
470
+ let n = e.filter((e) => !s.includes(e)).map((e) => e.id), r = gt(n, t);
471
471
  throw Error(`Caper bootstrap failed: plugin dependency cycle detected: ${r.join(" → ")}\nPlugins involved: ${n.join(", ")}`);
472
472
  }
473
473
  return s;
474
474
  }
475
- function ht(e, t) {
475
+ function gt(e, t) {
476
476
  let n = /* @__PURE__ */ new Set(), r = [], i = new Set(e);
477
477
  function a(e) {
478
478
  if (n.has(e)) {
@@ -495,12 +495,12 @@ function ht(e, t) {
495
495
  }
496
496
  //#endregion
497
497
  //#region src/core/interfaces/IStorageCapability.ts
498
- function gt(e) {
498
+ function _t(e) {
499
499
  return !!e && typeof e.save == "function" && typeof e.load == "function";
500
500
  }
501
501
  //#endregion
502
502
  //#region ../../node_modules/.pnpm/typed-signals@2.5.0/node_modules/typed-signals/dist/Collector.js
503
- var D = /* @__PURE__ */ h(((e) => {
503
+ var E = /* @__PURE__ */ h(((e) => {
504
504
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Collector = void 0, e.Collector = class {
505
505
  constructor(e) {
506
506
  this.emit = (...t) => {
@@ -508,9 +508,9 @@ var D = /* @__PURE__ */ h(((e) => {
508
508
  };
509
509
  }
510
510
  };
511
- })), _t = /* @__PURE__ */ h(((e) => {
511
+ })), vt = /* @__PURE__ */ h(((e) => {
512
512
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorArray = void 0;
513
- var t = D();
513
+ var t = E();
514
514
  e.CollectorArray = class extends t.Collector {
515
515
  constructor() {
516
516
  super(...arguments), this.result = [];
@@ -525,9 +525,9 @@ var D = /* @__PURE__ */ h(((e) => {
525
525
  this.result.length = 0;
526
526
  }
527
527
  };
528
- })), vt = /* @__PURE__ */ h(((e) => {
528
+ })), yt = /* @__PURE__ */ h(((e) => {
529
529
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorLast = void 0;
530
- var t = D();
530
+ var t = E();
531
531
  e.CollectorLast = class extends t.Collector {
532
532
  handleResult(e) {
533
533
  return this.result = e, !0;
@@ -539,9 +539,9 @@ var D = /* @__PURE__ */ h(((e) => {
539
539
  delete this.result;
540
540
  }
541
541
  };
542
- })), yt = /* @__PURE__ */ h(((e) => {
542
+ })), bt = /* @__PURE__ */ h(((e) => {
543
543
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorUntil0 = void 0;
544
- var t = D();
544
+ var t = E();
545
545
  e.CollectorUntil0 = class extends t.Collector {
546
546
  constructor() {
547
547
  super(...arguments), this.result = !1;
@@ -556,9 +556,9 @@ var D = /* @__PURE__ */ h(((e) => {
556
556
  this.result = !1;
557
557
  }
558
558
  };
559
- })), bt = /* @__PURE__ */ h(((e) => {
559
+ })), xt = /* @__PURE__ */ h(((e) => {
560
560
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorWhile0 = void 0;
561
- var t = D();
561
+ var t = E();
562
562
  e.CollectorWhile0 = class extends t.Collector {
563
563
  constructor() {
564
564
  super(...arguments), this.result = !1;
@@ -573,7 +573,7 @@ var D = /* @__PURE__ */ h(((e) => {
573
573
  this.result = !1;
574
574
  }
575
575
  };
576
- })), xt = /* @__PURE__ */ h(((e) => {
576
+ })), St = /* @__PURE__ */ h(((e) => {
577
577
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalConnectionImpl = void 0, e.SignalConnectionImpl = class {
578
578
  constructor(e, t) {
579
579
  this.link = e, this.parentCleanup = t;
@@ -588,7 +588,7 @@ var D = /* @__PURE__ */ h(((e) => {
588
588
  return this.link !== null && this.link.isEnabled();
589
589
  }
590
590
  };
591
- })), St = /* @__PURE__ */ h(((e) => {
591
+ })), Ct = /* @__PURE__ */ h(((e) => {
592
592
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalLink = void 0, e.SignalLink = class e {
593
593
  constructor(e = null, t = null, n = 0) {
594
594
  this.enabled = !0, this.newLink = !1, this.callback = null, this.prev = e ?? this, this.next = t ?? this, this.order = n;
@@ -609,9 +609,9 @@ var D = /* @__PURE__ */ h(((e) => {
609
609
  return i.callback = t, r.next = i, i.next.prev = i, i;
610
610
  }
611
611
  };
612
- })), Ct = /* @__PURE__ */ h(((e) => {
612
+ })), wt = /* @__PURE__ */ h(((e) => {
613
613
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Signal = void 0;
614
- var t = xt(), n = St();
614
+ var t = St(), n = Ct();
615
615
  e.Signal = class {
616
616
  constructor() {
617
617
  this.head = new n.SignalLink(), this.hasNewLinks = !1, this.emitDepth = 0, this.connectionsCount = 0;
@@ -658,7 +658,7 @@ var D = /* @__PURE__ */ h(((e) => {
658
658
  }
659
659
  }
660
660
  };
661
- })), wt = /* @__PURE__ */ h(((e) => {
661
+ })), Tt = /* @__PURE__ */ h(((e) => {
662
662
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalConnections = void 0, e.SignalConnections = class {
663
663
  constructor() {
664
664
  this.list = [];
@@ -677,58 +677,58 @@ var D = /* @__PURE__ */ h(((e) => {
677
677
  return this.list.length === 0;
678
678
  }
679
679
  };
680
- })), Tt = (/* @__PURE__ */ h(((e) => {
680
+ })), Et = (/* @__PURE__ */ h(((e) => {
681
681
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalConnections = e.Signal = e.CollectorWhile0 = e.CollectorUntil0 = e.CollectorLast = e.CollectorArray = e.Collector = void 0;
682
- var t = D();
682
+ var t = E();
683
683
  Object.defineProperty(e, "Collector", {
684
684
  enumerable: !0,
685
685
  get: function() {
686
686
  return t.Collector;
687
687
  }
688
688
  });
689
- var n = _t();
689
+ var n = vt();
690
690
  Object.defineProperty(e, "CollectorArray", {
691
691
  enumerable: !0,
692
692
  get: function() {
693
693
  return n.CollectorArray;
694
694
  }
695
695
  });
696
- var r = vt();
696
+ var r = yt();
697
697
  Object.defineProperty(e, "CollectorLast", {
698
698
  enumerable: !0,
699
699
  get: function() {
700
700
  return r.CollectorLast;
701
701
  }
702
702
  });
703
- var i = yt();
703
+ var i = bt();
704
704
  Object.defineProperty(e, "CollectorUntil0", {
705
705
  enumerable: !0,
706
706
  get: function() {
707
707
  return i.CollectorUntil0;
708
708
  }
709
709
  });
710
- var a = bt();
710
+ var a = xt();
711
711
  Object.defineProperty(e, "CollectorWhile0", {
712
712
  enumerable: !0,
713
713
  get: function() {
714
714
  return a.CollectorWhile0;
715
715
  }
716
716
  });
717
- var o = Ct();
717
+ var o = wt();
718
718
  Object.defineProperty(e, "Signal", {
719
719
  enumerable: !0,
720
720
  get: function() {
721
721
  return o.Signal;
722
722
  }
723
723
  });
724
- var s = wt();
724
+ var s = Tt();
725
725
  Object.defineProperty(e, "SignalConnections", {
726
726
  enumerable: !0,
727
727
  get: function() {
728
728
  return s.SignalConnections;
729
729
  }
730
730
  });
731
- })))(), Et = {
731
+ })))(), Dt = {
732
732
  highest: -(2 ** 53 - 1),
733
733
  higher: -1e3,
734
734
  high: -100,
@@ -736,7 +736,7 @@ var D = /* @__PURE__ */ h(((e) => {
736
736
  low: 100,
737
737
  lower: 1e3,
738
738
  lowest: 2 ** 53 - 1
739
- }, O = class extends Tt.Signal {
739
+ }, D = class extends Et.Signal {
740
740
  connectOnce(e, t) {
741
741
  let n = this.connect(((...t) => {
742
742
  e(...t), n.disconnect();
@@ -750,12 +750,12 @@ var D = /* @__PURE__ */ h(((e) => {
750
750
  return i;
751
751
  }
752
752
  connect(e, t = "normal") {
753
- let n = Et[t] ?? t;
753
+ let n = Dt[t] ?? t;
754
754
  return super.connect(e, n);
755
755
  }
756
- }, Dt = class {
756
+ }, Ot = class {
757
757
  constructor() {
758
- this.onError = new O();
758
+ this.onError = new D();
759
759
  }
760
760
  initialize(e) {
761
761
  return this._app = e, this;
@@ -769,16 +769,16 @@ var D = /* @__PURE__ */ h(((e) => {
769
769
  getAdapter(e) {
770
770
  let t = this._app.getPlugin(e);
771
771
  if (!t) throw Error(`Adapter ${String(e)} not found`);
772
- if (!gt(t)) throw Error(`Plugin '${String(e)}' is not storage-capable (missing save/load)`);
772
+ if (!_t(t)) throw Error(`Plugin '${String(e)}' is not storage-capable (missing save/load)`);
773
773
  return t;
774
774
  }
775
775
  hasAdapter(e) {
776
776
  let t = this._app.getPlugin(e);
777
- return !!t && gt(t);
777
+ return !!t && _t(t);
778
778
  }
779
779
  allAdapterIds() {
780
780
  let e = this._app._plugins, t = [];
781
- if (e) for (let [n, r] of e) gt(r) && t.push(n);
781
+ if (e) for (let [n, r] of e) _t(r) && t.push(n);
782
782
  return t;
783
783
  }
784
784
  async save(e, t, n, r = !0) {
@@ -840,10 +840,10 @@ var D = /* @__PURE__ */ h(((e) => {
840
840
  };
841
841
  //#endregion
842
842
  //#region src/mixins/signals.ts
843
- function k(e) {
843
+ function O(e) {
844
844
  return class extends e {
845
845
  constructor(...e) {
846
- super(...e), this.signalConnections = new Tt.SignalConnections();
846
+ super(...e), this.signalConnections = new Et.SignalConnections();
847
847
  }
848
848
  addSignalConnection(...e) {
849
849
  for (let t of e) this.signalConnections.add(t);
@@ -861,17 +861,17 @@ function k(e) {
861
861
  }
862
862
  //#endregion
863
863
  //#region src/mixins/animated.ts
864
- var Ot = {
864
+ var kt = {
865
865
  x: !0,
866
866
  y: !0,
867
867
  intensity: 3,
868
868
  duration: .05,
869
869
  times: 4
870
870
  };
871
- function kt(e) {
871
+ function At(e) {
872
872
  return class extends e {
873
873
  constructor(...e) {
874
- super(...e), this.onAnimationStart = new O(), this.onAnimationUpdate = new O(), this.onAnimationComplete = new O(), this._activeTweens = [];
874
+ super(...e), this.onAnimationStart = new D(), this.onAnimationUpdate = new D(), this.onAnimationComplete = new D(), this._activeTweens = [];
875
875
  }
876
876
  animate(e, t = this) {
877
877
  let n = m.to(t, {
@@ -941,7 +941,7 @@ function kt(e) {
941
941
  }
942
942
  shake(e, t = this) {
943
943
  let n = {
944
- ...Ot,
944
+ ...kt,
945
945
  ...e
946
946
  }, r = {
947
947
  x: t.x,
@@ -987,10 +987,10 @@ function kt(e) {
987
987
  }
988
988
  //#endregion
989
989
  //#region src/mixins/focus.ts
990
- function At(e) {
990
+ function jt(e) {
991
991
  return class extends e {
992
992
  constructor(...e) {
993
- super(...e), this.isFocused = !1, this.isKeyDown = !1, this.focusEnabled = !0, this.tabIndex = 0, this.accessible = !1, this.accessibleType = "button", this.accessibleTitle = "Focusable", this.accessibleHint = "Press enter to focus", this.accessiblePointerEvents = "auto", this.accessibleChildren = !0, this.onFocus = new O(), this.onFocusIn = new O(), this.onFocusOut = new O(), this.onBlur = new O(), this._eventsDisabled = !1, this.eventMode = "static", this.on("mouseover", this._onMouseOver), this.on("mousedown", this._onMouseDown), this.on("click", this._handleClick), this.on("tap", this._handleClick);
993
+ super(...e), this.isFocused = !1, this.isKeyDown = !1, this.focusEnabled = !0, this.tabIndex = 0, this.accessible = !1, this.accessibleType = "button", this.accessibleTitle = "Focusable", this.accessibleHint = "Press enter to focus", this.accessiblePointerEvents = "auto", this.accessibleChildren = !0, this.onFocus = new D(), this.onFocusIn = new D(), this.onFocusOut = new D(), this.onBlur = new D(), this._eventsDisabled = !1, this.eventMode = "static", this.on("mouseover", this._onMouseOver), this.on("mousedown", this._onMouseDown), this.on("click", this._handleClick), this.on("tap", this._handleClick);
994
994
  }
995
995
  get app() {
996
996
  return $.getInstance();
@@ -1032,17 +1032,17 @@ function At(e) {
1032
1032
  }
1033
1033
  };
1034
1034
  }
1035
- At.INITTED = !1;
1035
+ jt.INITTED = !1;
1036
1036
  //#endregion
1037
1037
  //#region src/mixins/interaction.ts
1038
- function jt(e) {
1038
+ function Mt(e) {
1039
1039
  return class extends e {
1040
1040
  constructor(...e) {
1041
1041
  super(...e), this._signals = /* @__PURE__ */ new Map(), this._emitSignal = this._emitSignal.bind(this), this.eventMode = "static";
1042
1042
  }
1043
1043
  onInteraction(e) {
1044
1044
  if (!this._signals.has(e)) {
1045
- let t = new O();
1045
+ let t = new D();
1046
1046
  this._signals.set(e, t), this.on(e, this._emitSignal);
1047
1047
  }
1048
1048
  return this._signals.get(e);
@@ -1059,7 +1059,7 @@ function jt(e) {
1059
1059
  }
1060
1060
  //#endregion
1061
1061
  //#region src/mixins/factory/methods.ts
1062
- function Mt(e, t, n) {
1062
+ function Nt(e, t, n) {
1063
1063
  let r = {};
1064
1064
  for (let i in e) r[i] = (...r) => {
1065
1065
  let a = e[i](...r);
@@ -1069,15 +1069,18 @@ function Mt(e, t, n) {
1069
1069
  }
1070
1070
  //#endregion
1071
1071
  //#region src/display/Container.ts
1072
- var Nt = [
1072
+ var Pt = [
1073
1073
  "autoResize",
1074
1074
  "autoUpdate",
1075
1075
  "priority"
1076
- ], Pt = {
1076
+ ], Ft = {
1077
1077
  autoResize: !0,
1078
1078
  autoUpdate: !1,
1079
1079
  priority: 0
1080
- }, A = class e extends kt(k(Q())) {
1080
+ }, k = class e extends At(O(Q())) {
1081
+ static {
1082
+ this.__caper_method_binding_root = !0;
1083
+ }
1081
1084
  get animationContext() {
1082
1085
  return this._animationContext;
1083
1086
  }
@@ -1085,10 +1088,10 @@ var Nt = [
1085
1088
  this._animationContext = e;
1086
1089
  }
1087
1090
  static {
1088
- this.onGlobalChildAdded = new O();
1091
+ this.onGlobalChildAdded = new D();
1089
1092
  }
1090
1093
  static {
1091
- this.onGlobalChildRemoved = new O();
1094
+ this.onGlobalChildRemoved = new D();
1092
1095
  }
1093
1096
  static childAdded(t) {
1094
1097
  e.onGlobalChildAdded.emit(t);
@@ -1100,8 +1103,8 @@ var Nt = [
1100
1103
  return $.getInstance();
1101
1104
  }
1102
1105
  constructor(e = {}) {
1103
- super(), this.__caper_method_binding_root = !0, this.onDestroy = new O(), this.__config = {
1104
- ...Pt,
1106
+ super(), this.onDestroy = new D(), this.__config = {
1107
+ ...Ft,
1105
1108
  ...e
1106
1109
  }, g(this), this.on("added", this._added), this.on("removed", this._removed), this.on("childAdded", this._childAdded), this.on("childRemoved", this._childRemoved);
1107
1110
  }
@@ -1154,13 +1157,16 @@ var Nt = [
1154
1157
  addAnimation(e, t) {
1155
1158
  return this.app.addAnimation(e, t ?? this.animationContext);
1156
1159
  }
1157
- }, Ft = ["autoUpdate", "priority"], It = {
1160
+ }, It = ["autoUpdate", "priority"], Lt = {
1158
1161
  autoUpdate: !0,
1159
1162
  priority: 0
1160
- }, Lt = class extends d {
1163
+ }, Rt = class extends d {
1164
+ static {
1165
+ this.__caper_method_binding_root = !0;
1166
+ }
1161
1167
  constructor(e = {}) {
1162
- super(e), this.onDestroy = new O(), this.__caper_method_binding_root = !0, this.__config = {
1163
- ...It,
1168
+ super(e), this.onDestroy = new D(), this.__config = {
1169
+ ...Lt,
1164
1170
  ...e
1165
1171
  }, g(this), this.on("added", this._added), this.on("removed", this._removed);
1166
1172
  }
@@ -1180,16 +1186,16 @@ var Nt = [
1180
1186
  _removed() {
1181
1187
  this.__config.autoUpdate && this.app.ticker.remove(this.update, this), this.removed();
1182
1188
  }
1183
- }, Rt = class extends c {
1189
+ }, zt = class extends c {
1184
1190
  constructor(e) {
1185
1191
  super(typeof e == "string" ? n.get(e) : e);
1186
1192
  let t = this.getLocalBounds();
1187
1193
  this.pivot.set((t.x + t.width) / 2, (t.y + t.height) / 2);
1188
1194
  }
1189
- }, zt = class t extends e {
1195
+ }, Bt = class t extends e {
1190
1196
  constructor(e) {
1191
1197
  let n = e?.animations ?? {}, r = e?.animation ?? Object.keys(n)[0], i = n[r], a = e?.sheet, o = e?.texturePrefix || "", s = e?.zeroPad, c = e?.startIndex ?? 0;
1192
- super(t.generateTexturesFromProps(r, i, o, a, s, c), e?.autoUpdate !== !1), this.config = e, this.onAnimationChange = new O(), this.onAnimationStart = new O(), this.onAnimationStop = new O(), this.onAnimationLoop = new O(), this.onAnimationComplete = new O(), this.onAnimationFrameChange = new O(), this.defaultTexturePrefix = "", this._paused = !1, this._isReversed = !1, g(this), this.defaultSheet = a, this.defaultTexturePrefix = o, this.defaultZeroPad = s, this._generateAnimations(), this.currentAnimation = this.defaultAnimation = r, this.autoPlay = e?.autoPlay ?? !0, this.loop = e?.loop ?? !0, this.updateAnchor = e?.updateAnchor ?? !1, this.animationSpeed = this.defaultAnimationSpeed = e?.animationSpeed ?? 1, this.on("added", this._added);
1198
+ super(t.generateTexturesFromProps(r, i, o, a, s, c), e?.autoUpdate !== !1), this.config = e, this.onAnimationChange = new D(), this.onAnimationStart = new D(), this.onAnimationStop = new D(), this.onAnimationLoop = new D(), this.onAnimationComplete = new D(), this.onAnimationFrameChange = new D(), this.defaultTexturePrefix = "", this._paused = !1, this._isReversed = !1, g(this), this.defaultSheet = a, this.defaultTexturePrefix = o, this.defaultZeroPad = s, this._generateAnimations(), this.currentAnimation = this.defaultAnimation = r, this.autoPlay = e?.autoPlay ?? !0, this.loop = e?.loop ?? !0, this.updateAnchor = e?.updateAnchor ?? !1, this.animationSpeed = this.defaultAnimationSpeed = e?.animationSpeed ?? 1, this.on("added", this._added);
1193
1199
  }
1194
1200
  get paused() {
1195
1201
  return this._paused;
@@ -1210,7 +1216,7 @@ var Nt = [
1210
1216
  let o = [], s = "", c = t?.sheet ?? r;
1211
1217
  if (t?.numFrames > 1) {
1212
1218
  let r = t?.startIndex ?? a ?? 0;
1213
- for (let a = r; a < r + t?.numFrames; a++) s = `${n}${t?.texturePrefix ?? e}${Ze(a, t?.zeroPad ?? i)}`, o.push(q({
1219
+ for (let a = r; a < r + t?.numFrames; a++) s = `${n}${t?.texturePrefix ?? e}${Qe(a, t?.zeroPad ?? i)}`, o.push(q({
1214
1220
  asset: s,
1215
1221
  sheet: c
1216
1222
  }));
@@ -1236,11 +1242,11 @@ var Nt = [
1236
1242
  super.stop(), this.onAnimationStop?.emit();
1237
1243
  }
1238
1244
  nextAnimation() {
1239
- let e = We(this._animations, this.currentAnimation) ?? Ke(this._animations);
1245
+ let e = Ge(this._animations, this.currentAnimation) ?? qe(this._animations);
1240
1246
  e && this.setAnimation(e[0]);
1241
1247
  }
1242
1248
  previousAnimation() {
1243
- let e = Ue(this._animations, this.currentAnimation) ?? Ge(this._animations);
1249
+ let e = We(this._animations, this.currentAnimation) ?? Ke(this._animations);
1244
1250
  e && this.setAnimation(e[0]);
1245
1251
  }
1246
1252
  update(e) {
@@ -1266,7 +1272,7 @@ var Nt = [
1266
1272
  this.onAnimationFrameChange.emit();
1267
1273
  }, this.autoPlay && this.play();
1268
1274
  }
1269
- }, Bt = k(Q()), Vt = class extends Bt {
1275
+ }, Vt = O(Q()), Ht = class extends Vt {
1270
1276
  get app() {
1271
1277
  return $.getInstance();
1272
1278
  }
@@ -1280,7 +1286,7 @@ var Nt = [
1280
1286
  return this.currentEntry ? this.currentEntry.trackTime : -1;
1281
1287
  }
1282
1288
  constructor(e) {
1283
- super(), this.onAnimationComplete = new O(), this.onAnimationStart = new O(), this.onAnimationInterrupt = new O(), this.onAnimationDispose = new O(), this.onAnimationEnd = new O(), this.onAnimationEvent = new O(), this.onPaused = new O(), this.onResumed = new O(), g(this);
1289
+ super(), this.onAnimationComplete = new D(), this.onAnimationStart = new D(), this.onAnimationInterrupt = new D(), this.onAnimationDispose = new D(), this.onAnimationEnd = new D(), this.onAnimationEvent = new D(), this.onPaused = new D(), this.onResumed = new D(), g(this);
1284
1290
  let t = e?.data, n = "";
1285
1291
  if (typeof t == "string") {
1286
1292
  let e = t.slice(-5);
@@ -1334,7 +1340,7 @@ var Nt = [
1334
1340
  _handleAnimationEvent(e, t) {
1335
1341
  this.onAnimationEvent.emit(e, t);
1336
1342
  }
1337
- }, Ht = [
1343
+ }, Ut = [
1338
1344
  "textures",
1339
1345
  "sounds",
1340
1346
  "actions",
@@ -1344,12 +1350,12 @@ var Nt = [
1344
1350
  "enabled",
1345
1351
  "layout",
1346
1352
  "textLabel"
1347
- ], Ut = At(jt(k(Q()))), Wt = class extends Ut {
1353
+ ], Wt = jt(Mt(O(Q()))), Gt = class extends Wt {
1348
1354
  get textLabel() {
1349
1355
  return this._textLabel;
1350
1356
  }
1351
1357
  constructor(e) {
1352
- super(), this.onDown = new O(), this.onUp = new O(), this.onUpOutside = new O(), this.onOut = new O(), this.onOver = new O(), this.onClick = new O(), this.onEnabled = new O(), this.onDisabled = new O(), this.onKeyboardEvent = new O(), this.onDestroy = new O(), this._isDownCallbacks = /* @__PURE__ */ new Map(), this._isDownListenerAdded = !1, g(this), this.config = Object.assign({
1358
+ super(), this.onDown = new D(), this.onUp = new D(), this.onUpOutside = new D(), this.onOut = new D(), this.onOver = new D(), this.onClick = new D(), this.onEnabled = new D(), this.onDisabled = new D(), this.onKeyboardEvent = new D(), this.onDestroy = new D(), this._isDownCallbacks = /* @__PURE__ */ new Map(), this._isDownListenerAdded = !1, g(this), this.config = Object.assign({
1353
1359
  id: "button",
1354
1360
  textures: { default: "" },
1355
1361
  sheet: void 0,
@@ -1471,18 +1477,18 @@ var Nt = [
1471
1477
  e();
1472
1478
  });
1473
1479
  }
1474
- }, Gt = k(Q());
1475
- function Kt(e) {
1480
+ }, Kt = O(Q());
1481
+ function qt(e) {
1476
1482
  return e instanceof te || e instanceof r;
1477
1483
  }
1478
- var qt = [
1484
+ var Jt = [
1479
1485
  "bindTo",
1480
1486
  "bindToAppSize",
1481
1487
  "autoLayoutChildren",
1482
1488
  "debug"
1483
- ], Jt = class extends Gt {
1489
+ ], Yt = class extends Kt {
1484
1490
  constructor(e = {}) {
1485
- if (super(), this.onLayoutComplete = new O(), this._debugGraphics = null, this._debugLabel = null, !this.app.config.useLayout) throw Error("You must set useLayout to true in your app config to use FlexContainer");
1491
+ if (super(), this.onLayoutComplete = new D(), this._debugGraphics = null, this._debugLabel = null, !this.app.config.useLayout) throw Error("You must set useLayout to true in your app config to use FlexContainer");
1486
1492
  g(this), this.config = {
1487
1493
  autoLayoutChildren: !0,
1488
1494
  ...e
@@ -1500,10 +1506,10 @@ var qt = [
1500
1506
  this.app.ticker.addOnce(this.updateLayout);
1501
1507
  }
1502
1508
  handleChildAdded(e) {
1503
- this.config.autoLayoutChildren && (e.layout ? Kt(e) && !e.layout?.style?.isLeaf && (e.layout = { isLeaf: !0 }) : e.layout = { isLeaf: !0 }), A.childAdded(e), e.on("layout", this._updateLayout), this._updateLayout();
1509
+ this.config.autoLayoutChildren && (e.layout ? qt(e) && !e.layout?.style?.isLeaf && (e.layout = { isLeaf: !0 }) : e.layout = { isLeaf: !0 }), k.childAdded(e), e.on("layout", this._updateLayout), this._updateLayout();
1504
1510
  }
1505
1511
  handleChildRemoved(e) {
1506
- e.off("layout", this._updateLayout), A.childRemoved(e), this._updateLayout();
1512
+ e.off("layout", this._updateLayout), k.childRemoved(e), this._updateLayout();
1507
1513
  }
1508
1514
  handleResize() {
1509
1515
  this.config.bindToAppSize && (this.layout = {
@@ -1725,12 +1731,15 @@ var qt = [
1725
1731
  destroy() {
1726
1732
  this.config.debug && S(`FlexContainer:${this.uid}`), this._debugGraphics &&= (this._debugGraphics.destroy(), null), this._debugLabel &&= (this._debugLabel.destroy(), null), this.off("added", this.handleAdded), this.off("childAdded", this.handleChildAdded), this.off("childRemoved", this.handleChildRemoved), this.config.bindToAppSize && this.app.onResize.disconnect(this.handleResize), this.config.bindTo && "off" in this.config.bindTo && this.config.bindTo.off("layout", this.handleBindToResize), super.destroy();
1727
1733
  }
1728
- }, j = class {
1734
+ }, A = class {
1735
+ static {
1736
+ this.__caper_method_binding_root = !0;
1737
+ }
1729
1738
  get options() {
1730
1739
  return this._options;
1731
1740
  }
1732
1741
  constructor(e = "Plugin") {
1733
- this.id = e, this.__caper_method_binding_root = !0, this._signalConnections = new Tt.SignalConnections(), g(this);
1742
+ this.id = e, this._signalConnections = new Et.SignalConnections(), g(this);
1734
1743
  }
1735
1744
  get app() {
1736
1745
  return $.getInstance();
@@ -1753,13 +1762,13 @@ var qt = [
1753
1762
  registerCoreFunctions() {
1754
1763
  this.getCoreFunctions().forEach((e) => {
1755
1764
  let t = e;
1756
- Br[t] = this[e];
1765
+ Kr[t] = this[e];
1757
1766
  });
1758
1767
  }
1759
1768
  registerCoreSignals() {
1760
1769
  this.getCoreSignals().forEach((e) => {
1761
1770
  let t = e;
1762
- zr[t] = this[e];
1771
+ Gr[t] = this[e];
1763
1772
  });
1764
1773
  }
1765
1774
  getCoreFunctions() {
@@ -1768,9 +1777,9 @@ var qt = [
1768
1777
  getCoreSignals() {
1769
1778
  return [];
1770
1779
  }
1771
- }, Yt = class extends j {
1780
+ }, Xt = class extends A {
1772
1781
  constructor(...e) {
1773
- super(...e), this.id = "actions", this.onActionContextChanged = new O(), this.onActionDispatched = new O(), this._context = "default", this._signals = /* @__PURE__ */ new Map(), this._actions = {}, this._debug = !1;
1782
+ super(...e), this.id = "actions", this.onActionContextChanged = new D(), this.onActionDispatched = new D(), this._context = "default", this._signals = /* @__PURE__ */ new Map(), this._actions = {}, this._debug = !1;
1774
1783
  }
1775
1784
  set debug(e) {
1776
1785
  this._debug = e;
@@ -1788,7 +1797,7 @@ var qt = [
1788
1797
  this._actions = t?.config?.actions && t.config.actions || {};
1789
1798
  }
1790
1799
  getAction(e) {
1791
- return this._signals.has(e) || this._signals.set(e, new O()), this._signals.get(e);
1800
+ return this._signals.has(e) || this._signals.set(e, new D()), this._signals.get(e);
1792
1801
  }
1793
1802
  getActions() {
1794
1803
  return this._actions;
@@ -1823,19 +1832,19 @@ var qt = [
1823
1832
  getCoreSignals() {
1824
1833
  return ["onActionContextChanged", "onActionDispatched"];
1825
1834
  }
1826
- }, Xt = {
1835
+ }, Zt = {
1827
1836
  default: "default",
1828
1837
  menu: "menu",
1829
1838
  pause: "pause",
1830
1839
  popup: "popup",
1831
1840
  game: "game"
1832
- }, Zt = [
1841
+ }, Qt = [
1833
1842
  "default",
1834
1843
  "menu",
1835
1844
  "pause",
1836
1845
  "popup",
1837
1846
  "game"
1838
- ], Qt = [
1847
+ ], $t = [
1839
1848
  "up",
1840
1849
  "down",
1841
1850
  "left",
@@ -1848,7 +1857,7 @@ var qt = [
1848
1857
  "menu",
1849
1858
  "back",
1850
1859
  "next"
1851
- ], $t = {
1860
+ ], en = {
1852
1861
  action: { context: "*" },
1853
1862
  back: { context: [
1854
1863
  "menu",
@@ -1885,29 +1894,29 @@ var qt = [
1885
1894
  pause: { context: "*" },
1886
1895
  unpause: { context: "*" },
1887
1896
  start: { context: "*" }
1888
- }, en = { __default_do_not_use__: "__default_do_not_use__" }, tn = {
1897
+ }, tn = { __default_do_not_use__: "__default_do_not_use__" }, nn = {
1889
1898
  preferWorkers: !_,
1890
1899
  crossOrigin: "anonymous"
1891
1900
  };
1892
- function nn(e) {
1901
+ function rn(e) {
1893
1902
  if (typeof e == "string") {
1894
1903
  if (!e?.includes(".svg")) return e;
1895
1904
  e = { src: e };
1896
1905
  } else if (Array.isArray(e.src) || !e.src?.includes(".svg")) return e;
1897
1906
  return e.data ||= {}, e.data.parseAsGraphicsContext = !0, e;
1898
1907
  }
1899
- function M(e) {
1908
+ function j(e) {
1900
1909
  return Array.isArray(e) || (e = [e]), e.map((e) => {
1901
- if (typeof e == "string") return nn(e);
1910
+ if (typeof e == "string") return rn(e);
1902
1911
  if (typeof e == "object") {
1903
1912
  let t = e?.src || [];
1904
- return Array.isArray(t) || (t = [t]), e.ext ? (e.src && !Array.isArray(e.src) && (t.push(e.src), e.src = [e.src]), e.src = e.src.map((t) => `${t}.${e.ext}`), e.alias = [...t, ...e.src].filter(Boolean)) : nn(e), e;
1913
+ return Array.isArray(t) || (t = [t]), e.ext ? (e.src && !Array.isArray(e.src) && (t.push(e.src), e.src = [e.src]), e.src = e.src.map((t) => `${t}.${e.ext}`), e.alias = [...t, ...e.src].filter(Boolean)) : rn(e), e;
1905
1914
  }
1906
1915
  });
1907
1916
  }
1908
- var rn = class extends j {
1917
+ var an = class extends A {
1909
1918
  constructor(...e) {
1910
- super(...e), this.id = "assets", this.onLoadStart = new O(), this.onLoadProgress = new O(), this.onLoadComplete = new O(), this.onLoadRequiredStart = new O(), this.onLoadRequiredProgress = new O(), this.onLoadRequiredComplete = new O(), this.onBackgroundLoadStart = new O(), this.onBackgroundAssetLoaded = new O(), this.onBackgroundBundlesLoaded = new O(), this._loadedBundles = /* @__PURE__ */ new Set(), this._loadedAssets = /* @__PURE__ */ new Set(), this._required = {}, this._background = {}, this._isLoadingRequired = !1, this.webRequiredStartEvent = new Event(C.REQUIRED_ASSETS_START, {
1919
+ super(...e), this.id = "assets", this.onLoadStart = new D(), this.onLoadProgress = new D(), this.onLoadComplete = new D(), this.onLoadRequiredStart = new D(), this.onLoadRequiredProgress = new D(), this.onLoadRequiredComplete = new D(), this.onBackgroundLoadStart = new D(), this.onBackgroundAssetLoaded = new D(), this.onBackgroundBundlesLoaded = new D(), this._loadedBundles = /* @__PURE__ */ new Set(), this._loadedAssets = /* @__PURE__ */ new Set(), this._required = {}, this._background = {}, this._isLoadingRequired = !1, this.webRequiredStartEvent = new Event(C.REQUIRED_ASSETS_START, {
1911
1920
  bubbles: !0,
1912
1921
  cancelable: !1
1913
1922
  }), this.webRequiredProgressEvent = new CustomEvent(C.REQUIRED_ASSETS_PROGRESS, {
@@ -1931,19 +1940,19 @@ var rn = class extends j {
1931
1940
  }
1932
1941
  initialize(e) {
1933
1942
  e?.preload && (this._required = e.preload), e?.background && (this._background = e.background), n.setPreferences({
1934
- ...tn,
1943
+ ...nn,
1935
1944
  ...e?.assetPreferences
1936
1945
  });
1937
1946
  }
1938
1947
  async loadRequired() {
1939
- if (this._isLoadingRequired = !0, this._handleLoadStart(), this._handleLoadProgress(0), this._required && (this._required.assets && await n.load(M(this._required.assets), this._handleLoadProgress), this._required.bundles)) {
1948
+ if (this._isLoadingRequired = !0, this._handleLoadStart(), this._handleLoadProgress(0), this._required && (this._required.assets && await n.load(j(this._required.assets), this._handleLoadProgress), this._required.bundles)) {
1940
1949
  let e = this._required.bundles;
1941
1950
  Array.isArray(e) || (e = [e]), e = e.filter((e) => !this._isBundleLoaded(e)), await n.loadBundle(this._required.bundles, this._handleLoadProgress);
1942
1951
  }
1943
1952
  return this._handleLoadComplete(), this._isLoadingRequired = !1, Promise.resolve();
1944
1953
  }
1945
1954
  loadBackground() {
1946
- this.onBackgroundLoadStart.emit(), this._background && (this._background.assets && M(this._background.assets).forEach((e) => {
1955
+ this.onBackgroundLoadStart.emit(), this._background && (this._background.assets && j(this._background.assets).forEach((e) => {
1947
1956
  if (e?.src) {
1948
1957
  let t = e.src;
1949
1958
  if (t) return n.backgroundLoad(t);
@@ -1956,14 +1965,14 @@ var rn = class extends j {
1956
1965
  }));
1957
1966
  }
1958
1967
  async loadAssets(e, t = !0) {
1959
- return e = M(e), await n.load(e, t ? this._handleLoadProgress : void 0), this._markAssetsLoaded(e), Promise.resolve();
1968
+ return e = j(e), await n.load(e, t ? this._handleLoadProgress : void 0), this._markAssetsLoaded(e), Promise.resolve();
1960
1969
  }
1961
1970
  async loadBundles(e, t = !0) {
1962
1971
  return await n.loadBundle(e, t ? this._handleLoadProgress : void 0), this._markBundlesLoaded(e), Promise.resolve();
1963
1972
  }
1964
1973
  async unloadSceneAssets(e) {
1965
1974
  if (e.assets?.preload?.assets) {
1966
- let t = M(e.assets.preload.assets);
1975
+ let t = j(e.assets.preload.assets);
1967
1976
  n.unload(t).then(() => {
1968
1977
  this._markAssetsUnloaded(t);
1969
1978
  });
@@ -1980,7 +1989,7 @@ var rn = class extends j {
1980
1989
  if (t) {
1981
1990
  if (e.assets?.background) {
1982
1991
  if (e.assets.background.assets) {
1983
- let t = M(e.assets.background.assets).filter((e) => !this._isAssetLoaded(e));
1992
+ let t = j(e.assets.background.assets).filter((e) => !this._isAssetLoaded(e));
1984
1993
  t.length && t.forEach((e) => {
1985
1994
  if (e?.src) {
1986
1995
  let t = e.src;
@@ -1996,7 +2005,7 @@ var rn = class extends j {
1996
2005
  }
1997
2006
  } else {
1998
2007
  if (this._handleLoadStart(), this._handleLoadProgress(0), e.assets?.preload?.assets) {
1999
- let t = M(e.assets.preload.assets), r = t.filter((e) => !this._isAssetLoaded(e));
2008
+ let t = j(e.assets.preload.assets), r = t.filter((e) => !this._isAssetLoaded(e));
2000
2009
  r.length && (await n.load(r, this._handleLoadProgress), this._markAssetsLoaded(t));
2001
2010
  }
2002
2011
  if (e.assets?.preload?.bundles) {
@@ -2077,7 +2086,7 @@ var rn = class extends j {
2077
2086
  };
2078
2087
  //#endregion
2079
2088
  //#region src/plugins/breakpoints/evaluate.ts
2080
- function an(e) {
2089
+ function on(e) {
2081
2090
  let t = Object.entries(e);
2082
2091
  if (t.length === 0) throw Error("[breakpoints] `tiers` is empty — declare at least one tier in caper.config.ts.");
2083
2092
  for (let [e, n] of t) if (!Number.isFinite(n) || n < 0) throw Error(`[breakpoints] tier '${e}' has an invalid stop (${n}) — stops must be finite numbers >= 0.`);
@@ -2090,58 +2099,58 @@ function an(e) {
2090
2099
  byName: Object.fromEntries(n)
2091
2100
  };
2092
2101
  }
2093
- function on(e, t) {
2102
+ function sn(e, t) {
2094
2103
  let n = e.names[0];
2095
2104
  for (let r = 0; r < e.stops.length && !(t < e.stops[r]); r++) n = e.names[r];
2096
2105
  return n;
2097
2106
  }
2098
- var sn = /* @__PURE__ */ new Set();
2099
- function cn(e, t) {
2100
- sn.has(e) || (sn.add(e), y.warn(t));
2101
- }
2107
+ var cn = /* @__PURE__ */ new Set();
2102
2108
  function ln(e, t) {
2109
+ cn.has(e) || (cn.add(e), y.warn(t));
2110
+ }
2111
+ function un(e, t) {
2103
2112
  if (typeof t == "number") return t;
2104
2113
  let n = e.byName[t];
2105
- return n === void 0 && cn(`stop:${t}`, `[breakpoints] unknown tier '${t}' — known tiers: ${e.names.join(", ")}.`), n;
2114
+ return n === void 0 && ln(`stop:${t}`, `[breakpoints] unknown tier '${t}' — known tiers: ${e.names.join(", ")}.`), n;
2106
2115
  }
2107
- function un(e, t, n, r = "mode") {
2116
+ function dn(e, t, n, r = "mode") {
2108
2117
  if (typeof t == "function") try {
2109
2118
  return t(e) === !0;
2110
2119
  } catch (e) {
2111
- return cn(`predicate:${r}`, `[breakpoints] mode '${r}' threw; treating as false. ${String(e)}`), !1;
2120
+ return ln(`predicate:${r}`, `[breakpoints] mode '${r}' threw; treating as false. ${String(e)}`), !1;
2112
2121
  }
2113
2122
  if (t.tier !== void 0 && !(Array.isArray(t.tier) ? t.tier : [t.tier]).includes(e.tier)) return !1;
2114
2123
  if (t.atLeast !== void 0) {
2115
- let r = ln(n, t.atLeast);
2124
+ let r = un(n, t.atLeast);
2116
2125
  if (r === void 0 || e.width < r) return !1;
2117
2126
  }
2118
2127
  if (t.below !== void 0) {
2119
- let r = ln(n, t.below);
2128
+ let r = un(n, t.below);
2120
2129
  if (r === void 0 || e.width >= r) return !1;
2121
2130
  }
2122
2131
  return !(t.orientation !== void 0 && e.orientation !== t.orientation || t.pointer !== void 0 && e.pointer !== t.pointer || t.minHeight !== void 0 && e.height < t.minHeight || t.maxHeight !== void 0 && e.height > t.maxHeight);
2123
2132
  }
2124
- function dn(e, t, n) {
2133
+ function fn(e, t, n) {
2125
2134
  let { width: r, height: i } = e;
2126
2135
  return {
2127
2136
  width: r,
2128
2137
  height: i,
2129
2138
  aspect: i === 0 ? 0 : r / i,
2130
- tier: on(t, r),
2139
+ tier: sn(t, r),
2131
2140
  orientation: r > i ? "landscape" : "portrait",
2132
2141
  pointer: n
2133
2142
  };
2134
2143
  }
2135
- function fn(e, t, n) {
2144
+ function pn(e, t, n) {
2136
2145
  let r = new Set([
2137
2146
  e.tier,
2138
2147
  e.orientation,
2139
2148
  e.pointer
2140
2149
  ]);
2141
- for (let [i, a] of t) un(e, a, n, i) && r.add(i);
2150
+ for (let [i, a] of t) dn(e, a, n, i) && r.add(i);
2142
2151
  return r;
2143
2152
  }
2144
- function pn(e, t) {
2153
+ function mn(e, t) {
2145
2154
  let n = [], r = [];
2146
2155
  for (let r of t) e.has(r) || n.push(r);
2147
2156
  for (let n of e) t.has(n) || r.push(n);
@@ -2150,7 +2159,7 @@ function pn(e, t) {
2150
2159
  left: r
2151
2160
  };
2152
2161
  }
2153
- function mn(e, t, n) {
2162
+ function hn(e, t, n) {
2154
2163
  let r = e.names.indexOf(t);
2155
2164
  for (let t = r; t >= 0; t--) {
2156
2165
  let r = n[e.names[t]];
@@ -2163,23 +2172,23 @@ function mn(e, t, n) {
2163
2172
  }
2164
2173
  //#endregion
2165
2174
  //#region src/plugins/breakpoints/types.ts
2166
- var hn = {
2175
+ var gn = {
2167
2176
  mobile: 0,
2168
2177
  tablet: 768,
2169
2178
  desktop: 1024,
2170
2179
  wide: 1440
2171
- }, gn = new Set([
2180
+ }, _n = new Set([
2172
2181
  "portrait",
2173
2182
  "landscape",
2174
2183
  "coarse",
2175
2184
  "fine"
2176
- ]), _n = {
2185
+ ]), M = {
2177
2186
  width: 0,
2178
2187
  height: 0
2179
- }, vn = class extends j {
2188
+ }, vn = class extends A {
2180
2189
  constructor(...e) {
2181
- super(...e), this.id = "breakpoints", this.onBreakpointChanged = new O(), this._modes = /* @__PURE__ */ new Map(), this._active = /* @__PURE__ */ new Set(), this._enter = /* @__PURE__ */ new Map(), this._leave = /* @__PURE__ */ new Map(), this._pointer = "fine", this._pointerQuery = null, this._warnedListenerNames = /* @__PURE__ */ new Set(), this._evaluate = (e) => {
2182
- let t = dn(e ?? _n, this._ladder, this._pointer), n = fn(t, this._modes, this._ladder), { entered: r, left: i } = pn(this._active, n), a = this._ctx.tier;
2190
+ super(...e), this.id = "breakpoints", this.onBreakpointChanged = new D(), this._modes = /* @__PURE__ */ new Map(), this._active = /* @__PURE__ */ new Set(), this._enter = /* @__PURE__ */ new Map(), this._leave = /* @__PURE__ */ new Map(), this._pointer = "fine", this._pointerQuery = null, this._warnedListenerNames = /* @__PURE__ */ new Set(), this._evaluate = (e) => {
2191
+ let t = fn(e ?? M, this._ladder, this._pointer), n = pn(t, this._modes, this._ladder), { entered: r, left: i } = mn(this._active, n), a = this._ctx.tier;
2183
2192
  if (this._ctx = t, this._active = n, !(r.length === 0 && i.length === 0)) {
2184
2193
  for (let e of i) this._leave.get(e)?.emit();
2185
2194
  for (let e of r) this._enter.get(e)?.emit();
@@ -2223,15 +2232,15 @@ var hn = {
2223
2232
  return this._ctx.pointer;
2224
2233
  }
2225
2234
  async initialize(e = {}) {
2226
- this._ladder = an({ ...hn }), this._ctx = dn(_n, this._ladder, this._pointer), this._options = {
2227
- tiers: e.tiers ?? { ...hn },
2235
+ this._ladder = on({ ...gn }), this._ctx = fn(M, this._ladder, this._pointer), this._options = {
2236
+ tiers: e.tiers ?? { ...gn },
2228
2237
  modes: e.modes ?? {}
2229
- }, this._ladder = an(this._options.tiers);
2238
+ }, this._ladder = on(this._options.tiers);
2230
2239
  for (let [e, t] of Object.entries(this._options.modes)) this._modes.set(e, t);
2231
- this._initPointer(), this._ctx = dn(_n, this._ladder, this._pointer), this._active = fn(this._ctx, this._modes, this._ladder);
2240
+ this._initPointer(), this._ctx = fn(M, this._ladder, this._pointer), this._active = pn(this._ctx, this._modes, this._ladder);
2232
2241
  }
2233
2242
  async postInitialize(e) {
2234
- this._evaluate(this.app.size ?? _n), this.addSignalConnection(this.app.onResize.connect(this._evaluate, "highest"));
2243
+ this._evaluate(this.app.size ?? M), this.addSignalConnection(this.app.onResize.connect(this._evaluate, "highest"));
2235
2244
  }
2236
2245
  destroy() {
2237
2246
  this._pointerQuery?.removeEventListener("change", this._onPointerChange), this._pointerQuery = null;
@@ -2243,21 +2252,21 @@ var hn = {
2243
2252
  return this._isKnown(e) ? this._active.has(e) : (y.warn(`[breakpoints] unknown name '${e}'. Known: ${this._knownNames().join(", ")}.`), !1);
2244
2253
  }
2245
2254
  atLeast(e) {
2246
- let t = ln(this._ladder, e);
2255
+ let t = un(this._ladder, e);
2247
2256
  return t !== void 0 && this._ctx.width >= t;
2248
2257
  }
2249
2258
  below(e) {
2250
- let t = ln(this._ladder, e);
2259
+ let t = un(this._ladder, e);
2251
2260
  return t !== void 0 && this._ctx.width < t;
2252
2261
  }
2253
2262
  between(e, t) {
2254
2263
  return this.atLeast(e) && this.below(t);
2255
2264
  }
2256
2265
  matches(e) {
2257
- return un(this._ctx, e, this._ladder);
2266
+ return dn(this._ctx, e, this._ladder);
2258
2267
  }
2259
2268
  value(e) {
2260
- return mn(this._ladder, this._ctx.tier, e);
2269
+ return hn(this._ladder, this._ctx.tier, e);
2261
2270
  }
2262
2271
  define(e, t) {
2263
2272
  this._modes.set(e, t), this._evaluate(this.size);
@@ -2286,10 +2295,10 @@ var hn = {
2286
2295
  }
2287
2296
  _signal(e, t) {
2288
2297
  let n = e.get(t);
2289
- return n || (n = new O(), e.set(t, n)), n;
2298
+ return n || (n = new D(), e.set(t, n)), n;
2290
2299
  }
2291
2300
  _isKnown(e) {
2292
- return e in this._ladder.byName || this._modes.has(e) || gn.has(e);
2301
+ return e in this._ladder.byName || this._modes.has(e) || _n.has(e);
2293
2302
  }
2294
2303
  _warnIfUnknown(e) {
2295
2304
  this._isKnown(e) || this._warnedListenerNames.has(e) || (this._warnedListenerNames.add(e), y.warn(`[breakpoints] unknown name '${e}'. Known: ${this._knownNames().join(", ")}.`));
@@ -2298,7 +2307,7 @@ var hn = {
2298
2307
  return [
2299
2308
  ...this._ladder.names,
2300
2309
  ...this._modes.keys(),
2301
- ...gn
2310
+ ..._n
2302
2311
  ];
2303
2312
  }
2304
2313
  }, yn = class {
@@ -2390,7 +2399,7 @@ var hn = {
2390
2399
  destroy() {}
2391
2400
  }, bn = class {
2392
2401
  constructor(e, t, n) {
2393
- this.id = e, this.channel = t, this.manager = n, this.onStart = new O(), this.onStop = new O(), this.onEnd = new O(), this.onPaused = new O(), this.onResumed = new O(), this.onProgress = new O(), this._volume = 1, this._muted = !1, this._isPlaying = !1, g(this), this.muted = this.channel.muted;
2402
+ this.id = e, this.channel = t, this.manager = n, this.onStart = new D(), this.onStop = new D(), this.onEnd = new D(), this.onPaused = new D(), this.onResumed = new D(), this.onProgress = new D(), this._volume = 1, this._muted = !1, this._isPlaying = !1, g(this), this.muted = this.channel.muted;
2394
2403
  }
2395
2404
  get media() {
2396
2405
  return this._media;
@@ -3606,9 +3615,9 @@ z.add = function(e, t) {
3606
3615
  let n = this._getOptions(t), r = R.from(n);
3607
3616
  return this._sounds[e] = r, r;
3608
3617
  };
3609
- var Wn = class extends j {
3618
+ var Wn = class extends A {
3610
3619
  constructor(e = "audio") {
3611
- super(e), this.onSoundStarted = new O(), this.onSoundEnded = new O(), this.onMuted = new O(), this.onMasterVolumeChanged = new O(), this.onChannelVolumeChanged = new O(), this.onChannelMuted = new O(), this._storedVolume = void 0, this._paused = !1, this._idMap = /* @__PURE__ */ new Map(), this._masterVolume = 1, this._muted = !1, this._channels = /* @__PURE__ */ new Map(), this.createChannel("music"), this.createChannel("sfx"), this.createChannel("voiceover");
3620
+ super(e), this.onSoundStarted = new D(), this.onSoundEnded = new D(), this.onMuted = new D(), this.onMasterVolumeChanged = new D(), this.onChannelVolumeChanged = new D(), this.onChannelMuted = new D(), this._storedVolume = void 0, this._paused = !1, this._idMap = /* @__PURE__ */ new Map(), this._masterVolume = 1, this._muted = !1, this._channels = /* @__PURE__ */ new Map(), this.createChannel("music"), this.createChannel("sfx"), this.createChannel("voiceover");
3612
3621
  }
3613
3622
  get audioContext() {
3614
3623
  return z.context?.audioContext;
@@ -3941,7 +3950,7 @@ var Wn = class extends j {
3941
3950
  } else e = this.parent.toLocal(this.focusTarget.getGlobalPosition());
3942
3951
  let t = this.focusTarget.getFocusPosition();
3943
3952
  if (t) {
3944
- let n = E(t);
3953
+ let n = T(t);
3945
3954
  e.x += n.x, e.y += n.y;
3946
3955
  }
3947
3956
  this.position.set(e.x, e.y);
@@ -3990,9 +3999,9 @@ var Wn = class extends j {
3990
3999
  prev() {
3991
4000
  return --this._currentIndex, this._currentIndex < 0 && (this._currentIndex = this._focusables.length - 1), this.currentFocusable = this._focusables[this._currentIndex], this.availableFocusables.length === 0 ? null : this.currentFocusable.focusEnabled ? this.currentFocusable : this.prev();
3992
4001
  }
3993
- }, qn = class extends j {
4002
+ }, qn = class extends A {
3994
4003
  constructor(...e) {
3995
- super(...e), this.id = "focus", this.view = new i({ label: "FocusManager" }), this.onFocusManagerActivated = new O(), this.onFocusManagerDeactivated = new O(), this.onFocusLayerChange = new O(), this.onFocusChange = new O(), this._focusTarget = null, this._keyboardActive = !1, this._layers = /* @__PURE__ */ new Map(), this._currentLayerId = null, this._active = !1, this._enabled = !0;
4004
+ super(...e), this.id = "focus", this.view = new i({ label: "FocusManager" }), this.onFocusManagerActivated = new D(), this.onFocusManagerDeactivated = new D(), this.onFocusLayerChange = new D(), this.onFocusChange = new D(), this._focusTarget = null, this._keyboardActive = !1, this._layers = /* @__PURE__ */ new Map(), this._currentLayerId = null, this._active = !1, this._enabled = !0;
3996
4005
  }
3997
4006
  get layers() {
3998
4007
  return this._layers;
@@ -4068,7 +4077,7 @@ var Wn = class extends j {
4068
4077
  removeFocusLayer(e, t = !0) {
4069
4078
  if (e === void 0 && t) return this._removeTopLayer();
4070
4079
  this._layers.has(e) || y.warn(`Layer with ID ${e} does not exist.`);
4071
- let n = Ue(this._layers, e)?.[0];
4080
+ let n = We(this._layers, e)?.[0];
4072
4081
  this._layers.delete(e), this._postDelete(n);
4073
4082
  }
4074
4083
  restart(e = !1) {
@@ -4170,7 +4179,7 @@ var Wn = class extends j {
4170
4179
  return this._currentLayerId == null ? null : this._layers.get(this._currentLayerId) || null;
4171
4180
  }
4172
4181
  _removeTopLayer() {
4173
- let e = Ge(this._layers)?.[0], t = Ue(this._layers, e)?.[0];
4182
+ let e = Ke(this._layers)?.[0], t = We(this._layers, e)?.[0];
4174
4183
  e !== void 0 && (this._layers.delete(e), this._postDelete(t));
4175
4184
  }
4176
4185
  _postDelete(e) {
@@ -4214,7 +4223,7 @@ var Wn = class extends j {
4214
4223
  _updateOutliner() {
4215
4224
  this._focusTarget ? this._focusOutliner.draw(this._focusTarget) : this._focusOutliner.clear();
4216
4225
  }
4217
- }, Jn = class extends j {
4226
+ }, Jn = class extends A {
4218
4227
  set isFullScreen(e) {
4219
4228
  this._isFullScreen = e, this.setFullScreen(e);
4220
4229
  }
@@ -4228,7 +4237,7 @@ var Wn = class extends j {
4228
4237
  return this._fullScreenElement;
4229
4238
  }
4230
4239
  constructor() {
4231
- super(), this.id = "fullscreen", this.onFullScreenChange = new O(), this._isFullScreen = !1, this._fullScreenElement = null, g(this);
4240
+ super(), this.id = "fullscreen", this.onFullScreenChange = new D(), this._isFullScreen = !1, this._fullScreenElement = null, g(this);
4232
4241
  }
4233
4242
  get app() {
4234
4243
  return $.getInstance();
@@ -4283,13 +4292,136 @@ var Wn = class extends j {
4283
4292
  _onFullScreenChange() {
4284
4293
  this.onFullScreenChange.emit(document.fullscreenElement !== null);
4285
4294
  }
4286
- }, Yn = {
4295
+ }, Yn = .01;
4296
+ function Xn(e) {
4297
+ let t = e.length;
4298
+ if (t === 0) return {
4299
+ centerX: 0,
4300
+ centerY: 0,
4301
+ spread: 0
4302
+ };
4303
+ let n = 0, r = 0;
4304
+ for (let t of e) n += t.x, r += t.y;
4305
+ let i = n / t, a = r / t, o = 0;
4306
+ for (let t of e) o += Math.hypot(t.x - i, t.y - a);
4307
+ return {
4308
+ centerX: i,
4309
+ centerY: a,
4310
+ spread: o / t
4311
+ };
4312
+ }
4313
+ function Zn(e, t) {
4314
+ return {
4315
+ dx: t.centerX - e.centerX,
4316
+ dy: t.centerY - e.centerY,
4317
+ scale: e.spread < Yn ? 1 : t.spread / e.spread
4318
+ };
4319
+ }
4320
+ //#endregion
4321
+ //#region src/plugins/gesture/types.ts
4322
+ var Qn = {
4323
+ enabled: !0,
4324
+ pointerTypes: ["touch"],
4325
+ pinchThreshold: 8,
4326
+ panThreshold: 8,
4327
+ preventDefault: !0
4328
+ }, $n = .01, er = class extends A {
4329
+ constructor(...e) {
4330
+ super(...e), this.id = "gesture", this.onGestureStart = new D(), this.onGestureChange = new D(), this.onGestureEnd = new D(), this._pointers = /* @__PURE__ */ new Map(), this._state = "idle", this._startFrame = null, this._lastFrame = null, this._canvas = null, this._previousTouchAction = "", this._onPointerDown = (e) => {
4331
+ if (!this._options.pointerTypes.includes(e.pointerType)) return;
4332
+ let t = this._state, n = this._pointers.size >= 2;
4333
+ if (this._pointers.set(e.pointerId, {
4334
+ id: e.pointerId,
4335
+ x: e.clientX,
4336
+ y: e.clientY
4337
+ }), this._state === "idle" && this._pointers.size === 2) {
4338
+ let e = Xn([...this._pointers.values()]);
4339
+ this._startFrame = e, this._lastFrame = e, this._state = "pending";
4340
+ } else this._state !== "idle" && n && (this._lastFrame = Xn([...this._pointers.values()]));
4341
+ this._maybePreventDefault(e, t, this._state);
4342
+ }, this._onPointerMove = (e) => {
4343
+ if (!this._pointers.has(e.pointerId)) return;
4344
+ this._pointers.set(e.pointerId, {
4345
+ id: e.pointerId,
4346
+ x: e.clientX,
4347
+ y: e.clientY
4348
+ });
4349
+ let t = this._state;
4350
+ if (this._pointers.size >= 2) {
4351
+ let e = Xn([...this._pointers.values()]);
4352
+ if (this._state === "pending") {
4353
+ let t = Zn(this._lastFrame, e), n = Math.abs(e.spread - this._lastFrame.spread), r = Math.hypot(t.dx, t.dy);
4354
+ (n >= this._options.pinchThreshold || r >= this._options.panThreshold) && (this._lastFrame = e, this._state = "active", this.onGestureStart.emit({
4355
+ centerX: e.centerX,
4356
+ centerY: e.centerY,
4357
+ pointerCount: this._pointers.size
4358
+ }));
4359
+ } else if (this._state === "active") {
4360
+ let t = Zn(this._lastFrame, e), n = this._computeTotalScale(e);
4361
+ this._lastFrame = e, this.onGestureChange.emit({
4362
+ centerX: e.centerX,
4363
+ centerY: e.centerY,
4364
+ dx: t.dx,
4365
+ dy: t.dy,
4366
+ scale: t.scale,
4367
+ totalScale: n,
4368
+ pointerCount: this._pointers.size
4369
+ });
4370
+ }
4371
+ }
4372
+ this._maybePreventDefault(e, t, this._state);
4373
+ }, this._onPointerUp = (e) => {
4374
+ this._endPointer(e);
4375
+ }, this._onPointerCancel = (e) => {
4376
+ this._endPointer(e);
4377
+ };
4378
+ }
4379
+ get isActive() {
4380
+ return this._state === "active";
4381
+ }
4382
+ get pointerCount() {
4383
+ return this._pointers.size;
4384
+ }
4385
+ async initialize(e = {}, t) {
4386
+ if (this._options = {
4387
+ ...Qn,
4388
+ ...e
4389
+ }, !this._options.enabled) return;
4390
+ let n = t.canvas;
4391
+ this._canvas = n, this._options.preventDefault && (this._previousTouchAction = n.style.touchAction, n.style.touchAction = "none"), n.addEventListener("pointerdown", this._onPointerDown), window.addEventListener("pointermove", this._onPointerMove), window.addEventListener("pointerup", this._onPointerUp), window.addEventListener("pointercancel", this._onPointerCancel);
4392
+ }
4393
+ destroy() {
4394
+ this._canvas &&= (this._canvas.removeEventListener("pointerdown", this._onPointerDown), this._options.preventDefault && (this._canvas.style.touchAction = this._previousTouchAction), null), window.removeEventListener("pointermove", this._onPointerMove), window.removeEventListener("pointerup", this._onPointerUp), window.removeEventListener("pointercancel", this._onPointerCancel), this._pointers.clear(), this._state = "idle", this._startFrame = null, this._lastFrame = null, this.onGestureStart.disconnectAll(), this.onGestureChange.disconnectAll(), this.onGestureEnd.disconnectAll(), super.destroy();
4395
+ }
4396
+ getCoreSignals() {
4397
+ return [
4398
+ "onGestureStart",
4399
+ "onGestureChange",
4400
+ "onGestureEnd"
4401
+ ];
4402
+ }
4403
+ _endPointer(e) {
4404
+ if (!this._pointers.has(e.pointerId)) return;
4405
+ let t = this._state;
4406
+ this._pointers.delete(e.pointerId), this._pointers.size < 2 ? (this._state === "active" && this._lastFrame && this.onGestureEnd.emit({
4407
+ centerX: this._lastFrame.centerX,
4408
+ centerY: this._lastFrame.centerY,
4409
+ totalScale: this._computeTotalScale(this._lastFrame)
4410
+ }), this._state = "idle", this._startFrame = null, this._lastFrame = null) : this._state !== "idle" && (this._lastFrame = Xn([...this._pointers.values()])), this._maybePreventDefault(e, t, this._state);
4411
+ }
4412
+ _computeTotalScale(e) {
4413
+ return !this._startFrame || this._startFrame.spread < $n ? 1 : e.spread / this._startFrame.spread;
4414
+ }
4415
+ _maybePreventDefault(e, t, n) {
4416
+ this._options.preventDefault && (t !== "idle" || n !== "idle") && e.preventDefault();
4417
+ }
4418
+ }, tr = {
4287
4419
  defaultLocale: "en",
4288
4420
  locales: ["en"],
4289
4421
  loadAll: !1,
4290
4422
  files: []
4291
4423
  };
4292
- function Xn(e, t) {
4424
+ function nr(e, t) {
4293
4425
  if (t in e) return e[t];
4294
4426
  if (!t.includes(".")) return;
4295
4427
  let n = e;
@@ -4297,9 +4429,9 @@ function Xn(e, t) {
4297
4429
  else return;
4298
4430
  return n;
4299
4431
  }
4300
- var Zn = class extends j {
4432
+ var rr = class extends A {
4301
4433
  constructor(...e) {
4302
- super(...e), this.id = "i18n", this.onLocaleChanged = new O(), this._dicts = {};
4434
+ super(...e), this.id = "i18n", this.onLocaleChanged = new D(), this._dicts = {};
4303
4435
  }
4304
4436
  get locale() {
4305
4437
  return this._locale;
@@ -4309,7 +4441,7 @@ var Zn = class extends j {
4309
4441
  }
4310
4442
  async initialize(e) {
4311
4443
  if (this._options = {
4312
- ...Yn,
4444
+ ...tr,
4313
4445
  ...e
4314
4446
  }, this._locale = this._options.defaultLocale, this._options.loadAll && this._options.files.length > 0) {
4315
4447
  let e = this._options.files.filter((e) => this._options.locales.includes(e.id));
@@ -4322,7 +4454,7 @@ var Zn = class extends j {
4322
4454
  t(e, t, n = this._locale) {
4323
4455
  let r = this._dicts[n];
4324
4456
  if (!r) return y.error(`i18n:: No dictionary loaded for current locale: ${n}`), "";
4325
- let i = Xn(r, e), a = typeof i == "string" ? i : void 0;
4457
+ let i = nr(r, e), a = typeof i == "string" ? i : void 0;
4326
4458
  if (!a) return y.error(`i18n:: No result found for the key ${e} in the locale: ${this._locale}`), "";
4327
4459
  if (t) {
4328
4460
  if (typeof t.variant == "number" || t.variant === "random") {
@@ -4357,7 +4489,7 @@ var Zn = class extends j {
4357
4489
  y.error(`i18n:: Could not find locale file for ${e}`);
4358
4490
  return;
4359
4491
  }
4360
- this._dicts[e] = t.json ? await n.load(t.json) : await He(t);
4492
+ this._dicts[e] = t.json ? await n.load(t.json) : await Ue(t);
4361
4493
  }
4362
4494
  getCoreFunctions() {
4363
4495
  return [
@@ -4380,9 +4512,9 @@ var Zn = class extends j {
4380
4512
  function V(e) {
4381
4513
  return e === void 0 ? e = "*undefined*" : e === " " ? e = "Space" : e.length === 1 && (e = e.toUpperCase()), e;
4382
4514
  }
4383
- var Qn = class extends j {
4515
+ var ir = class extends A {
4384
4516
  constructor(...e) {
4385
- super(...e), this.id = "keyboard", this.onGlobalKeyDown = new O(), this.onGlobalKeyUp = new O(), this._keyDownSignals = /* @__PURE__ */ new Map(), this._keyUpSignals = /* @__PURE__ */ new Map(), this._keysDown = /* @__PURE__ */ new Set(), this._warnedNoConsumers = !1, this._enabled = !0;
4517
+ super(...e), this.id = "keyboard", this.onGlobalKeyDown = new D(), this.onGlobalKeyUp = new D(), this._keyDownSignals = /* @__PURE__ */ new Map(), this._keyUpSignals = /* @__PURE__ */ new Map(), this._keysDown = /* @__PURE__ */ new Set(), this._warnedNoConsumers = !1, this._enabled = !0;
4386
4518
  }
4387
4519
  get keysDown() {
4388
4520
  return this._keysDown;
@@ -4435,7 +4567,7 @@ var Qn = class extends j {
4435
4567
  }
4436
4568
  _checkAndAddSignal(e, t) {
4437
4569
  let n = t === "keydown" ? this._keyDownSignals : this._keyUpSignals;
4438
- return n.size || this._listen(t), e = V(e), n.has(e) || n.set(e, new O()), n.get(e);
4570
+ return n.size || this._listen(t), e = V(e), n.has(e) || n.set(e, new D()), n.get(e);
4439
4571
  }
4440
4572
  _listen(e) {
4441
4573
  document.addEventListener(e, this._handleEvent);
@@ -4451,14 +4583,14 @@ var Qn = class extends j {
4451
4583
  key: n
4452
4584
  });
4453
4585
  }
4454
- }, $n = class {
4586
+ }, ar = class {
4455
4587
  get app() {
4456
4588
  return $.getInstance();
4457
4589
  }
4458
4590
  initialize(e) {
4459
4591
  this.scheme = e;
4460
4592
  }
4461
- }, er = class extends k($n) {
4593
+ }, or = class extends O(ar) {
4462
4594
  constructor() {
4463
4595
  super(), this._keyCombinations = [], this._singleDownKeys = /* @__PURE__ */ new Set(), this._keyCombinationsMap = /* @__PURE__ */ new Map(), this._activeDownKeys = /* @__PURE__ */ new Map(), this._activeUpKeys = /* @__PURE__ */ new Map(), g(this);
4464
4596
  }
@@ -4544,7 +4676,7 @@ var Qn = class extends j {
4544
4676
  }
4545
4677
  });
4546
4678
  }
4547
- }, tr = class extends k($n) {
4679
+ }, sr = class extends O(ar) {
4548
4680
  constructor() {
4549
4681
  super(), this._buttons = /* @__PURE__ */ new Set(), this._combinations = [], this._singleDownButtons = /* @__PURE__ */ new Set(), this._activeJoystickDirections = /* @__PURE__ */ new Map(), this._activeButtonDownIds = /* @__PURE__ */ new Map(), this._activeButtonUpIds = /* @__PURE__ */ new Map(), this._combinationsMap = /* @__PURE__ */ new Map(), g(this);
4550
4682
  }
@@ -4642,13 +4774,16 @@ var Qn = class extends j {
4642
4774
  t && this.app.action(t, { inputState: "joystick" });
4643
4775
  }
4644
4776
  }
4645
- }, nr = class {
4777
+ }, cr = class {
4646
4778
  constructor() {
4647
4779
  g(this);
4648
4780
  }
4649
4781
  get app() {
4650
4782
  return $.getInstance();
4651
4783
  }
4784
+ get virtual() {
4785
+ return this.touch;
4786
+ }
4652
4787
  destroy() {
4653
4788
  this.keyboard && this.keyboard.destroy(), this.touch && this.touch.destroy();
4654
4789
  }
@@ -4656,29 +4791,32 @@ var Qn = class extends j {
4656
4791
  return this.keyboard?.isActionActive(e) || this.touch?.isActionActive(e) || !1;
4657
4792
  }
4658
4793
  initialize(e) {
4659
- e.keyboard && (this.keyboard = new er(), this.keyboard.initialize(e.keyboard)), e.touch && (this.touch = new tr(), this.touch.initialize(e.touch));
4794
+ e.keyboard && (this.keyboard = new or(), this.keyboard.initialize(e.keyboard)), e.touch && (this.touch = new sr(), this.touch.initialize(e.touch));
4660
4795
  }
4661
4796
  connect() {
4662
4797
  this.keyboard && this.keyboard.connect(), this.touch && this.touch.connect();
4663
4798
  }
4664
- }, rr = { actions: Qt }, ir = class extends j {
4799
+ }, lr = { actions: $t }, ur = class extends A {
4665
4800
  constructor(...e) {
4666
- super(...e), this.id = "input", this.controls = new nr(), this.activeGamepads = /* @__PURE__ */ new Map(), this.activeControllers = /* @__PURE__ */ new Set([]), this.onGamepadConnected = new O(), this.onGamepadDisconnected = new O(), this.onControllerActivated = new O(), this.onControllerDeactivated = new O();
4801
+ super(...e), this.id = "input", this.controls = new cr(), this.activeGamepads = /* @__PURE__ */ new Map(), this.activeControllers = /* @__PURE__ */ new Set([]), this._lastUsedController = null, this._canvas = null, this.onGamepadConnected = new D(), this.onGamepadDisconnected = new D(), this.onControllerActivated = new D(), this.onControllerDeactivated = new D(), this.onControllerChanged = new D();
4802
+ }
4803
+ get lastUsedController() {
4804
+ return this._lastUsedController;
4667
4805
  }
4668
4806
  isActionActive(e) {
4669
4807
  return this.controls.isActionActive(e);
4670
4808
  }
4671
- async initialize(e = rr, t) {
4809
+ async initialize(e = lr, t) {
4672
4810
  this._options = {
4673
- ...rr,
4811
+ ...lr,
4674
4812
  ...e
4675
- }, t.stage.eventMode = "static", t.stage.on("touchstart", this._onTouchStart), t.stage.on("globalmousemove", this._onMouseMove), window.addEventListener("keydown", this._onKeyDown), window.addEventListener("gamepadconnected", this._onGamepadConnected), window.addEventListener("gamepaddisconnected", this._onGamepadDisconnected), this._options.controls && this.controls.initialize(this._options.controls);
4813
+ }, t.stage.eventMode = "static", this._canvas = t.canvas, this._canvas.addEventListener("pointerdown", this._onPointerDown), this._canvas.addEventListener("pointermove", this._onPointerMove), window.addEventListener("keydown", this._onKeyDown), window.addEventListener("gamepadconnected", this._onGamepadConnected), window.addEventListener("gamepaddisconnected", this._onGamepadDisconnected), this._options.controls && this.controls.initialize(this._options.controls);
4676
4814
  }
4677
4815
  postInitialize() {
4678
4816
  this.controls && this.controls.connect();
4679
4817
  }
4680
4818
  destroy() {
4681
- this.app.stage.off("touchstart", this._onTouchStart), this.app.stage.off("globalmousemove", this._onMouseMove), window.removeEventListener("keydown", this._onKeyDown), window.removeEventListener("gamepadconnected", this._onGamepadConnected), window.removeEventListener("gamepaddisconnected", this._onGamepadDisconnected), super.destroy();
4819
+ this._canvas &&= (this._canvas.removeEventListener("pointerdown", this._onPointerDown), this._canvas.removeEventListener("pointermove", this._onPointerMove), null), window.removeEventListener("keydown", this._onKeyDown), window.removeEventListener("gamepadconnected", this._onGamepadConnected), window.removeEventListener("gamepaddisconnected", this._onGamepadDisconnected), this.controls.destroy(), this.onGamepadConnected.disconnectAll(), this.onGamepadDisconnected.disconnectAll(), this.onControllerActivated.disconnectAll(), this.onControllerDeactivated.disconnectAll(), this.onControllerChanged.disconnectAll(), super.destroy();
4682
4820
  }
4683
4821
  isControllerActive(e) {
4684
4822
  return this.activeControllers.has(e);
@@ -4691,11 +4829,16 @@ var Qn = class extends j {
4691
4829
  "onGamepadConnected",
4692
4830
  "onGamepadDisconnected",
4693
4831
  "onControllerActivated",
4694
- "onControllerDeactivated"
4832
+ "onControllerDeactivated",
4833
+ "onControllerChanged"
4695
4834
  ];
4696
4835
  }
4836
+ _isInputControllerType(e) {
4837
+ return Object.values(B).includes(e);
4838
+ }
4697
4839
  _activateController(e) {
4698
- this.activeControllers.has(e) || (this.activeControllers.add(e), this.onControllerActivated.emit(e));
4840
+ let t = !this.activeControllers.has(e);
4841
+ t && this.activeControllers.add(e), this._isInputControllerType(e) && e !== this._lastUsedController && (this._lastUsedController = e, this.onControllerChanged.emit(e)), t && this.onControllerActivated.emit(e);
4699
4842
  }
4700
4843
  _deactivateController(e) {
4701
4844
  this.activeControllers.has(e) && (this.activeControllers.delete(e), this.onControllerDeactivated.emit(e));
@@ -4706,11 +4849,11 @@ var Qn = class extends j {
4706
4849
  _deactivateGamepad(e) {
4707
4850
  this.activeGamepads.delete(e);
4708
4851
  }
4709
- _onTouchStart() {
4710
- this._activateController(B.Touch);
4852
+ _onPointerDown(e) {
4853
+ e.pointerType === "touch" && this._activateController(B.Touch);
4711
4854
  }
4712
- _onMouseMove() {
4713
- this._activateController(B.Mouse);
4855
+ _onPointerMove(e) {
4856
+ e.pointerType === "mouse" && this._activateController(B.Mouse);
4714
4857
  }
4715
4858
  _onKeyDown() {
4716
4859
  this._activateController(B.Keyboard);
@@ -4724,7 +4867,7 @@ var Qn = class extends j {
4724
4867
  get actionsPlugin() {
4725
4868
  return this.app.getPlugin("actions");
4726
4869
  }
4727
- }, ar = class extends j {
4870
+ }, dr = class extends A {
4728
4871
  constructor(...e) {
4729
4872
  super(...e), this.name = "lookup", this.pathToContainer = /* @__PURE__ */ new Map(), this.containerToPath = /* @__PURE__ */ new Map();
4730
4873
  }
@@ -4738,7 +4881,7 @@ var Qn = class extends j {
4738
4881
  ];
4739
4882
  }
4740
4883
  async initialize() {
4741
- A.onGlobalChildAdded.connect(this.onChildAdded), A.onGlobalChildRemoved.connect(this.onChildRemoved);
4884
+ k.onGlobalChildAdded.connect(this.onChildAdded), k.onGlobalChildRemoved.connect(this.onChildRemoved);
4742
4885
  }
4743
4886
  getChildAtPath(e) {
4744
4887
  return this.pathToContainer.get(e);
@@ -4778,9 +4921,9 @@ var Qn = class extends j {
4778
4921
  for (; n && n.label && (t.unshift(n.label), n = n.parent, n?.label !== "Stage"););
4779
4922
  return t.length > 0 ? t.join("/") : "";
4780
4923
  }
4781
- }, or = class extends j {
4924
+ }, fr = class extends A {
4782
4925
  constructor(...e) {
4783
- super(...e), this.id = "popups", this.view = new A(), this.onShowPopup = new O(), this.onHidePopup = new O(), this.onPopupChanged = new O(), this._popups = /* @__PURE__ */ new Map(), this._activePopups = /* @__PURE__ */ new Map(), this._currentPopupId = void 0;
4926
+ super(...e), this.id = "popups", this.view = new k(), this.onShowPopup = new D(), this.onHidePopup = new D(), this.onPopupChanged = new D(), this._popups = /* @__PURE__ */ new Map(), this._activePopups = /* @__PURE__ */ new Map(), this._currentPopupId = void 0;
4784
4927
  }
4785
4928
  get currentPopupId() {
4786
4929
  return this._currentPopupId;
@@ -4823,7 +4966,7 @@ var Qn = class extends j {
4823
4966
  }
4824
4967
  async hidePopup(e, t) {
4825
4968
  let n = this._activePopups.get(e);
4826
- if (n) return n.beforeHide(), await n.hide(), this.view.removeChild(n), this._activePopups.delete(e), this._currentPopupId = Ge(this._activePopups)?.[0] || void 0, new Promise((r) => {
4969
+ if (n) return n.beforeHide(), await n.hide(), this.view.removeChild(n), this._activePopups.delete(e), this._currentPopupId = Ke(this._activePopups)?.[0] || void 0, new Promise((r) => {
4827
4970
  this.app.ticker.addOnce(() => {
4828
4971
  this.onHidePopup.emit({
4829
4972
  id: e,
@@ -4875,14 +5018,14 @@ var Qn = class extends j {
4875
5018
  _handleEscape() {
4876
5019
  this.current && this.current.config.closeOnEscape && this.hidePopup(this.current.id);
4877
5020
  }
4878
- }, sr = {
5021
+ }, pr = {
4879
5022
  autoScroll: !1,
4880
5023
  minWidth: 0,
4881
5024
  minHeight: 0,
4882
5025
  letterbox: !1,
4883
5026
  center: !1,
4884
5027
  debug: !1
4885
- }, cr = class extends j {
5028
+ }, mr = class extends A {
4886
5029
  constructor(...e) {
4887
5030
  super(...e), this.id = "resizer", this._cancelResize = () => {
4888
5031
  this._resizeId &&= (cancelAnimationFrame(this._resizeId), null);
@@ -4896,7 +5039,7 @@ var Qn = class extends j {
4896
5039
  }
4897
5040
  async initialize(e) {
4898
5041
  this._options = {
4899
- ...sr,
5042
+ ...pr,
4900
5043
  ...e
4901
5044
  };
4902
5045
  }
@@ -4943,12 +5086,12 @@ var Qn = class extends j {
4943
5086
  }, this._options.debug && this._drawDebug();
4944
5087
  }
4945
5088
  _drawDebug() {
4946
- this._debugContainer || (this._debugContainer = this.app.stage.addChild(new A()), this._gfx = this._debugContainer.add.graphics()), this._gfx.clear(), this._gfx.rect(0, 0, this._size.width, this._size.height), this._gfx.stroke({
5089
+ this._debugContainer || (this._debugContainer = this.app.stage.addChild(new k()), this._gfx = this._debugContainer.add.graphics()), this._gfx.clear(), this._gfx.rect(0, 0, this._size.width, this._size.height), this._gfx.stroke({
4947
5090
  width: 4,
4948
5091
  color: 4095
4949
5092
  });
4950
5093
  }
4951
- }, lr = {
5094
+ }, hr = {
4952
5095
  view: null,
4953
5096
  hideWhen: "firstSceneEnter",
4954
5097
  zOrder: "top",
@@ -4956,9 +5099,9 @@ var Qn = class extends j {
4956
5099
  assets: [],
4957
5100
  bundles: []
4958
5101
  }
4959
- }, ur = class extends j {
5102
+ }, gr = class extends A {
4960
5103
  constructor() {
4961
- super(), this.id = "scenes", this.onSceneChangeStart = new O(), this.onSceneChangeComplete = new O(), this.view = new i(), this.isFirstScene = !0, this.list = [], this.groupOrder = [], this.debugGroupsList = [], this._sceneModules = /* @__PURE__ */ new Map(), this._pendingLoadProps = void 0, this._lastScene = null, this._defaultLoadMethod = "immediate", this._debugVisible = !1, this._useHash = !1, g(this);
5104
+ super(), this.id = "scenes", this.onSceneChangeStart = new D(), this.onSceneChangeComplete = new D(), this.view = new i(), this.isFirstScene = !0, this.list = [], this.groupOrder = [], this.debugGroupsList = [], this._sceneModules = /* @__PURE__ */ new Map(), this._pendingLoadProps = void 0, this._lastScene = null, this._defaultLoadMethod = "immediate", this._debugVisible = !1, this._useHash = !1, g(this);
4962
5105
  }
4963
5106
  get ids() {
4964
5107
  return this.list.map((e) => e.id);
@@ -4975,7 +5118,7 @@ var Qn = class extends j {
4975
5118
  zOrder: "top"
4976
5119
  };
4977
5120
  let e = {
4978
- ...lr,
5121
+ ...hr,
4979
5122
  ...t.config?.splash ?? {}
4980
5123
  };
4981
5124
  e.view && (this.splash.view = typeof e.view == "function" ? new e.view() : e.view), this.splash.preload = e.preload;
@@ -4996,12 +5139,12 @@ var Qn = class extends j {
4996
5139
  let n = typeof e == "string" ? e : e.id, r = typeof e == "string" ? this._defaultLoadMethod : e?.method || this._defaultLoadMethod;
4997
5140
  this.currentScene && (this._lastScene = this.currentScene);
4998
5141
  let i = this.list.find((e) => e.id === n);
4999
- if (!i) throw w({ message: `Scene item not found for id ${n}` }), Error(`Scene item not found for id ${n}`);
5142
+ if (!i) throw ze({ message: `Scene item not found for id ${n}` }), Error(`Scene item not found for id ${n}`);
5000
5143
  if (i?.plugins?.length) for (let e of i.plugins) {
5001
5144
  let t = this.app.getUnloadedPlugin(e);
5002
5145
  t && await this.app.loadPlugin(t);
5003
5146
  }
5004
- switch (this._currentSceneId = n, this._queue = ze(this._createCurrentScene), r) {
5147
+ switch (this._currentSceneId = n, this._queue = Be(this._createCurrentScene), r) {
5005
5148
  case "exitEnter":
5006
5149
  this._queue.add(this._exitLastScene, this._destroyLastScene, this._unloadLastScene, this._loadCurrentScene, this._initializeCurrentScene, this._addCurrentScene, this._enterCurrentScene, this._startCurrentScene);
5007
5150
  break;
@@ -5046,7 +5189,7 @@ var Qn = class extends j {
5046
5189
  let e = this.list.find((e) => e.id === this._currentSceneId), t;
5047
5190
  if (this._sceneModules.has(this._currentSceneId)) t = this._sceneModules.get(this._currentSceneId);
5048
5191
  else {
5049
- let n = await He(e);
5192
+ let n = await Ue(e);
5050
5193
  if (!n) throw Error(`Couldn't load ${this._currentSceneId}"`);
5051
5194
  t = n[this._currentSceneId] ? n[this._currentSceneId] : n, t && this._sceneModules.set(this._currentSceneId, t);
5052
5195
  }
@@ -5146,7 +5289,7 @@ var Qn = class extends j {
5146
5289
  };
5147
5290
  //#endregion
5148
5291
  //#region src/plugins/TimerPlugin.ts
5149
- function dr() {
5292
+ function _r() {
5150
5293
  try {
5151
5294
  let e = new Blob(["\n const timers = new Map();\n\n self.onmessage = (e) => {\n const { type, timerId, options, timeAdjustment } = e.data;\n \n switch (type) {\n case 'start': {\n let timer = timers.get(timerId);\n \n if (timer) {\n // Resume existing timer\n timer.startTime = performance.now() - (timer.pausedTime || 0);\n timer.interval = createInterval(timer, options, timerId);\n } else {\n // Create new timer\n timer = {\n startTime: performance.now(),\n duration: options.duration,\n loopCount: 0,\n pausedTime: 0,\n options // Store options with the timer\n };\n timer.interval = createInterval(timer, options, timerId);\n timers.set(timerId, timer);\n }\n break;\n }\n \n case 'stop': {\n const timer = timers.get(timerId);\n if (timer) {\n clearInterval(timer.interval);\n timer.interval = null;\n timer.pausedTime = performance.now() - timer.startTime;\n }\n break;\n }\n\n case 'reset': {\n const timer = timers.get(timerId);\n if (timer) {\n timer.startTime = performance.now();\n timer.loopCount = 0;\n timer.pausedTime = 0;\n }\n break;\n }\n\n case 'adjustTime': {\n const timer = timers.get(timerId);\n if (timer) {\n if (timer.duration !== undefined) {\n // For countdown timers, adjust the duration\n timer.duration = Math.max(0, timer.duration + timeAdjustment);\n } else {\n // For count-up timers, adjust the start time\n timer.startTime -= timeAdjustment;\n }\n }\n break;\n }\n }\n };\n\n function createInterval(timer, options, timerId) {\n return setInterval(() => {\n const currentTime = performance.now();\n const totalElapsed = currentTime - timer.startTime;\n \n if (timer.duration !== undefined) {\n // Calculate elapsed time within the current loop\n const loopElapsed = totalElapsed - (timer.loopCount * timer.duration);\n const remaining = Math.max(0, timer.duration - loopElapsed);\n \n self.postMessage({ type: 'tick', timerId, time: remaining });\n \n if (remaining <= 0) {\n self.postMessage({ type: 'complete', timerId, time: 0 });\n \n if (options.loop) {\n timer.loopCount++;\n } else {\n clearInterval(timer.interval);\n timers.delete(timerId);\n }\n }\n } else {\n self.postMessage({ type: 'tick', timerId, time: totalElapsed });\n }\n }, options.workerInterval || 16);\n }\n "], { type: "application/javascript" });
5152
5295
  return new Worker(URL.createObjectURL(e));
@@ -5154,7 +5297,7 @@ function dr() {
5154
5297
  return null;
5155
5298
  }
5156
5299
  }
5157
- function fr(e, t = "mm:ss", n = "string") {
5300
+ function vr(e, t = "mm:ss", n = "string") {
5158
5301
  let r = Math.floor(e / 1e3), i = Math.floor(r / 3600), a = Math.floor(r % 3600 / 60), o = r % 60, s = Math.floor(e % 1e3 / 10);
5159
5302
  if (n === "string") switch (t) {
5160
5303
  case "hh:mm:ss": return `${i.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
@@ -5169,7 +5312,7 @@ function fr(e, t = "mm:ss", n = "string") {
5169
5312
  ms: s
5170
5313
  };
5171
5314
  }
5172
- var pr = class {
5315
+ var yr = class {
5173
5316
  constructor(e = {}, t) {
5174
5317
  this.options = e, this.plugin = t, this.startTime = performance.now(), this.pausedTime = 0, this.isPaused = !0, this.isDestroyed = !1, this.timerId = _e(), e.useWorker && !t.hasWorkerSupport && (y.warn("Web Worker support not available, falling back to main thread timer"), e.useWorker = !1), this.isWorkerTimer = !!e.useWorker, e.autoStart && this.start();
5175
5318
  }
@@ -5217,12 +5360,12 @@ var pr = class {
5217
5360
  removeTime(e) {
5218
5361
  return this.addTime(-e);
5219
5362
  }
5220
- }, mr = class extends j {
5363
+ }, br = class extends A {
5221
5364
  get hasWorkerSupport() {
5222
5365
  return this._hasWorkerSupport;
5223
5366
  }
5224
5367
  constructor() {
5225
- super("timers"), this.mainThreadTimers = /* @__PURE__ */ new Set(), this.workerTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.worker = null, this.timerCallbacks = /* @__PURE__ */ new Map(), this._hasWorkerSupport = !1, this.onTimerCreated = new O(), this.onTimerDestroyed = new O(), this.onAllTimersPaused = new O(), this.onAllTimersResumed = new O(), this.handleWorkerMessage = (e) => {
5368
+ super("timers"), this.mainThreadTimers = /* @__PURE__ */ new Set(), this.workerTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.worker = null, this.timerCallbacks = /* @__PURE__ */ new Map(), this._hasWorkerSupport = !1, this.onTimerCreated = new D(), this.onTimerDestroyed = new D(), this.onAllTimersPaused = new D(), this.onAllTimersResumed = new D(), this.handleWorkerMessage = (e) => {
5226
5369
  let { type: t, timerId: n, time: r, timeAdjustment: i } = e.data, a = this.timerCallbacks.get(n);
5227
5370
  if (a) switch (t) {
5228
5371
  case "tick":
@@ -5259,7 +5402,7 @@ var pr = class {
5259
5402
  this.app.ticker.add(this.update), this.initWorker();
5260
5403
  }
5261
5404
  initWorker() {
5262
- typeof Worker < "u" ? (this.worker = dr(), this.worker ? (this._hasWorkerSupport = !0, this.worker.onmessage = this.handleWorkerMessage) : (y.warn("Failed to create Web Worker for TimerPlugin, all timers will run on main thread"), this._hasWorkerSupport = !1)) : (y.warn("Web Workers not supported in this environment, all timers will run on main thread"), this._hasWorkerSupport = !1);
5405
+ typeof Worker < "u" ? (this.worker = _r(), this.worker ? (this._hasWorkerSupport = !0, this.worker.onmessage = this.handleWorkerMessage) : (y.warn("Failed to create Web Worker for TimerPlugin, all timers will run on main thread"), this._hasWorkerSupport = !1)) : (y.warn("Web Workers not supported in this environment, all timers will run on main thread"), this._hasWorkerSupport = !1);
5263
5406
  }
5264
5407
  startWorkerTimer(e, t) {
5265
5408
  this.worker && (this.timerCallbacks.set(e, t), this.worker.postMessage({
@@ -5291,7 +5434,7 @@ var pr = class {
5291
5434
  for (let e of this.mainThreadTimers) e.update();
5292
5435
  }
5293
5436
  createTimer(e) {
5294
- let t = new pr(e, this);
5437
+ let t = new yr(e, this);
5295
5438
  return t.isWorker() ? this.workerTimers.add(t) : this.mainThreadTimers.add(t), this.onTimerCreated.emit(t), t;
5296
5439
  }
5297
5440
  destroyTimer(e) {
@@ -5316,9 +5459,9 @@ var pr = class {
5316
5459
  timeAdjustment: t
5317
5460
  });
5318
5461
  }
5319
- }, hr = class extends j {
5462
+ }, xr = class extends A {
5320
5463
  constructor() {
5321
- super(), this.id = "webEvents", this.onResize = new O(), this.onVisibilityChanged = new O(), this.onOrientationChanged = new O(), this._debouncedEmitVisibility = Xe((e) => {
5464
+ super(), this.id = "webEvents", this.onResize = new D(), this.onVisibilityChanged = new D(), this.onOrientationChanged = new D(), this._debouncedEmitVisibility = Ze((e) => {
5322
5465
  this.onVisibilityChanged.emit(e);
5323
5466
  }, 1), g(this);
5324
5467
  }
@@ -5363,7 +5506,7 @@ var pr = class {
5363
5506
  return;
5364
5507
  }
5365
5508
  setTimeout(() => {
5366
- t = dt(), this.onOrientationChanged.emit({
5509
+ t = ft(), this.onOrientationChanged.emit({
5367
5510
  orientation: t,
5368
5511
  screenOrientation: n
5369
5512
  });
@@ -5407,7 +5550,7 @@ var pr = class {
5407
5550
  warning: 15844367,
5408
5551
  error: 15158332
5409
5552
  }
5410
- }, gr = class extends k(A) {
5553
+ }, Sr = class extends O(k) {
5411
5554
  set toaster(e) {
5412
5555
  this._toaster = e;
5413
5556
  }
@@ -5418,7 +5561,7 @@ var pr = class {
5418
5561
  this.textDisplay.text = e, this.alignText();
5419
5562
  }
5420
5563
  constructor(e = {}) {
5421
- super(), this.onToastClosed = new O(), this.isHiding = !1, this.config = {
5564
+ super(), this.onToastClosed = new D(), this.isHiding = !1, this.config = {
5422
5565
  ...H,
5423
5566
  ...e
5424
5567
  }, this.initialize();
@@ -5448,7 +5591,7 @@ var pr = class {
5448
5591
  }), this.alignText(), this.view.pivot.set(this.config.width * .5, this.config.height * .5), this.view.position.set(this.config.width * .5, this.config.height * .5), this.alpha = 0, this.addChild(this.view);
5449
5592
  }
5450
5593
  addCloseButton() {
5451
- let e = this.config.closeButton?.class || Wt, t = this.config.closeButton?.size ?? 12, n = this.config.closeButton?.offset ?? 4, r = this.config.closeButton?.position ?? "top right";
5594
+ let e = this.config.closeButton?.class || Gt, t = this.config.closeButton?.size ?? 12, n = this.config.closeButton?.offset ?? 4, r = this.config.closeButton?.position ?? "top right";
5452
5595
  this.closeButton = this.view.add.existing(new e({ cursor: "pointer" }));
5453
5596
  let i = r === "top right" ? this.config.width - t * .5 - n : t * .5 + n, a = t * .5 + n;
5454
5597
  this.closeButton.position.set(i, a), this.closeButton.onClick.connect(() => {
@@ -5513,7 +5656,7 @@ var pr = class {
5513
5656
  destroy() {
5514
5657
  this.isHiding = !0, this.closeTimeout &&= (clearTimeout(this.closeTimeout), void 0), m.killTweensOf(this), this.timeline &&= (this.timeline.kill(), void 0), !this.destroyed && !this.isHiding && this.onToastClosed.emit(), super.destroy({ children: !0 });
5515
5658
  }
5516
- }, _r = {
5659
+ }, Cr = {
5517
5660
  position: "bottom right",
5518
5661
  maxToasts: 5,
5519
5662
  spacing: 10,
@@ -5523,7 +5666,7 @@ var pr = class {
5523
5666
  },
5524
5667
  stackDirection: "up",
5525
5668
  animationSpeed: 1
5526
- }, vr = class extends k(A) {
5669
+ }, wr = class extends O(k) {
5527
5670
  get size() {
5528
5671
  return this.toasts.length;
5529
5672
  }
@@ -5549,8 +5692,8 @@ var pr = class {
5549
5692
  return this.defaultToastConfig ?? {};
5550
5693
  }
5551
5694
  constructor(e = {}, t = {}) {
5552
- super({ autoResize: !0 }), this.onToastAdded = new O(), this.onToastRemoved = new O(), this.onAllToastsRemoved = new O(), this.toasts = [], this.config = {
5553
- ..._r,
5695
+ super({ autoResize: !0 }), this.onToastAdded = new D(), this.onToastRemoved = new D(), this.onAllToastsRemoved = new D(), this.toasts = [], this.config = {
5696
+ ...Cr,
5554
5697
  ...e
5555
5698
  }, this.defaultToastConfig = { ...t }, this.initialize(), this.resize();
5556
5699
  }
@@ -5582,7 +5725,7 @@ var pr = class {
5582
5725
  ...e.closeButton ?? {}
5583
5726
  } : H.closeButton
5584
5727
  });
5585
- let n = new (e.class ?? gr)(e);
5728
+ let n = new (e.class ?? Sr)(e);
5586
5729
  return n.toaster = this, this.container.addChild(n), this.toasts.push(n), this.positionToast(n, this.toasts.length - 1, !1), n.onToastClosed.connectOnce(() => this.removeToast(n)), this.positionToasts(), this.onToastAdded.emit(n), n.show();
5587
5730
  }
5588
5731
  async hideAll() {
@@ -5650,17 +5793,17 @@ var pr = class {
5650
5793
  m.killTweensOf(e);
5651
5794
  }), this.hideAll(), this.toasts = [], super.destroy({ children: !0 });
5652
5795
  }
5653
- }, yr = [
5796
+ }, Tr = [
5654
5797
  "debug",
5655
5798
  "padding",
5656
5799
  "size",
5657
5800
  "useAppSize",
5658
5801
  "layout"
5659
- ], br = {
5802
+ ], Er = {
5660
5803
  flexGrow: 0,
5661
5804
  flexShrink: 0,
5662
5805
  autoLayoutChildren: !0
5663
- }, xr = k(Q()), Sr = class e extends xr {
5806
+ }, Dr = O(Q()), Or = class e extends Dr {
5664
5807
  constructor(e) {
5665
5808
  if (super(), this.settingsMap = /* @__PURE__ */ new Map(), this._childMap = /* @__PURE__ */ new Map(), this._debugGraphics = null, this._debugLabel = null, this._regionLabels = [], this._disableAddChildError = !1, this._bindings = [], this._canvasChildren = [], this.removeChildren = (e, t) => super.removeChildren(e, t), this.removeChildAt = (e) => super.removeChildAt(e), this.addChildAt = (e, t) => {
5666
5809
  throw Error("UICanvas: Do not call addChildAt() directly. Use addElement(child, { align }) instead.\nExample: uiCanvas.addElement(myChild, { align: 'top right' })");
@@ -5669,17 +5812,17 @@ var pr = class {
5669
5812
  }, this.getChildIndex = (e) => super.getChildIndex(e), this.getChildAt = (e) => super.getChildAt(e), !this.app.config.useLayout) throw Error("You must set useLayout to true in your app config to use UICanvas");
5670
5813
  g(this), this._positionContainers = /* @__PURE__ */ new Map(), this.config = {
5671
5814
  debug: e.debug === !0,
5672
- padding: tt(e?.padding ?? 0),
5815
+ padding: nt(e?.padding ?? 0),
5673
5816
  size: e.size === void 0 ? {
5674
5817
  width: 0,
5675
5818
  height: 0
5676
- } : Ye(e.size),
5819
+ } : Xe(e.size),
5677
5820
  useAppSize: e.useAppSize === !0,
5678
5821
  autoLayoutChildren: e.autoLayoutChildren ?? !0
5679
5822
  }, e.layout ? typeof e.layout == "boolean" ? this.config.layout = e.layout : this.config.layout = {
5680
- ...br,
5823
+ ...Er,
5681
5824
  ...e.layout
5682
- } : this.config.layout = { ...br }, this.config.useAppSize && (this.config.size = this.app.size), this.layout = {
5825
+ } : this.config.layout = { ...Er }, this.config.useAppSize && (this.config.size = this.app.size), this.layout = {
5683
5826
  width: this.config.size.width,
5684
5827
  height: this.config.size.height,
5685
5828
  flexDirection: "column",
@@ -5801,13 +5944,13 @@ var pr = class {
5801
5944
  this.config.size = e === void 0 ? {
5802
5945
  width: 0,
5803
5946
  height: 0
5804
- } : Ye(e), this.layout = {
5947
+ } : Xe(e), this.layout = {
5805
5948
  width: this.config.size.width,
5806
5949
  height: this.config.size.height
5807
5950
  }, this.updateLayout();
5808
5951
  }
5809
5952
  set padding(e) {
5810
- this.config.padding = tt(e), this.layout = {
5953
+ this.config.padding = nt(e), this.layout = {
5811
5954
  paddingLeft: this.config.padding.left,
5812
5955
  paddingTop: this.config.padding.top,
5813
5956
  paddingRight: this.config.padding.right,
@@ -5815,7 +5958,7 @@ var pr = class {
5815
5958
  }, this._updateLayout();
5816
5959
  }
5817
5960
  static isFlexContainer(e) {
5818
- return e instanceof Jt;
5961
+ return e instanceof Yt;
5819
5962
  }
5820
5963
  addChild(...e) {
5821
5964
  if (this._disableAddChildError) return super.addChild(...e);
@@ -5872,7 +6015,7 @@ var pr = class {
5872
6015
  let r = n?.align ?? "top left", i = this._positionContainers.get(r);
5873
6016
  return i ? (e.isFlexContainer(t) && this.addSignalConnection(t.onLayoutComplete.connect(this._updateLayout)), this.settingsMap.set(t, {
5874
6017
  align: r,
5875
- padding: n?.padding ? tt(n.padding) : {
6018
+ padding: n?.padding ? nt(n.padding) : {
5876
6019
  top: 0,
5877
6020
  left: 0,
5878
6021
  bottom: 0,
@@ -5886,10 +6029,10 @@ var pr = class {
5886
6029
  return t.removeChild(e), e.off("layout", this._updateLayout), this.settingsMap.delete(e), this._childMap.delete(e), this._canvasChildren = Array.from(this._childMap.keys()), this._updateLayout(), e;
5887
6030
  }
5888
6031
  _childAdded(e) {
5889
- this.config.autoLayoutChildren && (e.layout ||= !0, e.layout?.style?.width || (e.layout = { width: "auto" }), e.layout?.style?.height || (e.layout = { height: "auto" })), e.on("layout", this._updateLayout), A.childAdded(e), this._updateLayout();
6032
+ this.config.autoLayoutChildren && (e.layout ||= !0, e.layout?.style?.width || (e.layout = { width: "auto" }), e.layout?.style?.height || (e.layout = { height: "auto" })), e.on("layout", this._updateLayout), k.childAdded(e), this._updateLayout();
5890
6033
  }
5891
6034
  _childRemoved(e) {
5892
- this.settingsMap.delete(e), this._childMap.delete(e), this._canvasChildren = Array.from(this._childMap.keys()), A.childRemoved(e);
6035
+ this.settingsMap.delete(e), this._childMap.delete(e), this._canvasChildren = Array.from(this._childMap.keys()), k.childRemoved(e);
5893
6036
  }
5894
6037
  _added() {
5895
6038
  this._updateLayout();
@@ -5974,38 +6117,38 @@ var pr = class {
5974
6117
  });
5975
6118
  }
5976
6119
  }, U = null;
5977
- function Cr() {
6120
+ function kr() {
5978
6121
  if (U) return U;
5979
6122
  U = /* @__PURE__ */ new Map();
5980
6123
  let e = globalThis.Caper?.get?.("entityList") ?? [];
5981
6124
  for (let t of e) t.active !== !1 && typeof t.module == "function" && t.module.prototype && U.set(t.id, t.module);
5982
6125
  return U;
5983
6126
  }
5984
- function wr(e) {
5985
- return Cr().get(e);
6127
+ function Ar(e) {
6128
+ return kr().get(e);
5986
6129
  }
5987
- function Tr() {
5988
- return [...Cr().keys()];
6130
+ function jr() {
6131
+ return [...kr().keys()];
5989
6132
  }
5990
6133
  //#endregion
5991
6134
  //#region src/mixins/factory/ui-registry.ts
5992
6135
  var W = null;
5993
- function Er() {
6136
+ function Mr() {
5994
6137
  if (W) return W;
5995
6138
  W = /* @__PURE__ */ new Map();
5996
6139
  let e = globalThis.Caper?.get?.("uiList") ?? [];
5997
6140
  for (let t of e) t.active !== !1 && typeof t.module == "function" && t.module.prototype && W.set(t.id, t.module);
5998
6141
  return W;
5999
6142
  }
6000
- function Dr(e) {
6001
- return Er().get(e);
6143
+ function Nr(e) {
6144
+ return Mr().get(e);
6002
6145
  }
6003
- function Or() {
6004
- return [...Er().keys()];
6146
+ function Pr() {
6147
+ return [...Mr().keys()];
6005
6148
  }
6006
6149
  //#endregion
6007
6150
  //#region src/mixins/factory/utils.ts
6008
- var kr;
6151
+ var Fr;
6009
6152
  function G(e, t) {
6010
6153
  for (let n in e) try {
6011
6154
  t[n] = e[n];
@@ -6014,7 +6157,7 @@ function G(e, t) {
6014
6157
  }
6015
6158
  }
6016
6159
  function K() {
6017
- if (!kr) {
6160
+ if (!Fr) {
6018
6161
  let e = new c();
6019
6162
  e.rect(0, 0, 100, 100), e.fill({ color: 16711680 }), e.stroke({
6020
6163
  color: 16777215,
@@ -6024,9 +6167,9 @@ function K() {
6024
6167
  color: 16777215,
6025
6168
  width: 2,
6026
6169
  alignment: .5
6027
- }), kr = $.getInstance().renderer.generateTexture(e), e.destroy();
6170
+ }), Fr = $.getInstance().renderer.generateTexture(e), e.destroy();
6028
6171
  }
6029
- return kr;
6172
+ return Fr;
6030
6173
  }
6031
6174
  function q(e) {
6032
6175
  let t, r = e?.asset, i = r, a = e?.sheet;
@@ -6047,7 +6190,7 @@ function q(e) {
6047
6190
  return t || new ee().texture;
6048
6191
  }
6049
6192
  function J(e, t) {
6050
- let n = E(e.position, !1, e.x, e.y);
6193
+ let n = T(e.position, !1, e.x, e.y);
6051
6194
  t.x = n.x, t.y = n.y;
6052
6195
  }
6053
6196
  function Y(e, t) {
@@ -6056,28 +6199,28 @@ function Y(e, t) {
6056
6199
  if (e.scaleX === void 0 && e.scaleY === void 0) return;
6057
6200
  e.scaleX === void 0 && (e.scaleX = 1), e.scaleY === void 0 && (e.scaleY = 1);
6058
6201
  }
6059
- let n = E(e.scale, !1, e.scaleX, e.scaleY);
6202
+ let n = T(e.scale, !1, e.scaleX, e.scaleY);
6060
6203
  t.scale.set(n.x, n.y);
6061
6204
  }
6062
- function Ar(e, t) {
6205
+ function Ir(e, t) {
6063
6206
  if (e !== void 0) {
6064
- let n = E(e);
6207
+ let n = T(e);
6065
6208
  t.anchor.set(n.x, n.y);
6066
6209
  }
6067
6210
  }
6068
6211
  function X(e, t) {
6069
6212
  if (e !== void 0) {
6070
- let n = E(e);
6213
+ let n = T(e);
6071
6214
  t.pivot.set(n.x, n.y);
6072
6215
  }
6073
6216
  }
6074
6217
  //#endregion
6075
6218
  //#region src/mixins/factory/schema.ts
6076
- var jr = [
6219
+ var Lr = [
6077
6220
  "position",
6078
6221
  "scale",
6079
6222
  "pivot"
6080
- ], Mr = [
6223
+ ], Rr = [
6081
6224
  "position",
6082
6225
  "x",
6083
6226
  "y",
@@ -6088,7 +6231,7 @@ var jr = [
6088
6231
  "anchor"
6089
6232
  ];
6090
6233
  function Z(e) {
6091
- let t = e.applies ?? jr, n = t.includes("position"), r = t.includes("scale"), i = t.includes("pivot"), a = t.includes("anchor"), o = [...Mr, ...e.exclude ?? []];
6234
+ let t = e.applies ?? Lr, n = t.includes("position"), r = t.includes("scale"), i = t.includes("pivot"), a = t.includes("anchor"), o = [...Rr, ...e.exclude ?? []];
6092
6235
  return (t) => {
6093
6236
  let s = e.build(t);
6094
6237
  if (t == null) return s;
@@ -6101,19 +6244,19 @@ function Z(e) {
6101
6244
  scale: c.scale,
6102
6245
  scaleX: c.scaleX,
6103
6246
  scaleY: c.scaleY
6104
- }, s), i && X(c.pivot, s), a && Ar(c.anchor, s), G(Qe(o, c), s), s;
6247
+ }, s), i && X(c.pivot, s), a && Ir(c.anchor, s), G($e(o, c), s), s;
6105
6248
  };
6106
6249
  }
6107
6250
  //#endregion
6108
6251
  //#region src/mixins/factory/const.ts
6109
- var Nr = [
6252
+ var zr = [
6110
6253
  "text",
6111
6254
  "roundPixels",
6112
6255
  "resolution",
6113
6256
  "style",
6114
6257
  "anchor",
6115
6258
  "pivot"
6116
- ], Pr = {
6259
+ ], Br = {
6117
6260
  existing: (e, t) => {
6118
6261
  if (!t) return e;
6119
6262
  let { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ...l } = t;
@@ -6128,22 +6271,22 @@ var Nr = [
6128
6271
  }, e), X(a, e), G(l, e), e;
6129
6272
  },
6130
6273
  container: Z({
6131
- build: (e) => new A(e ? T(e, Nt) : void 0),
6274
+ build: (e) => new k(e ? w(e, Pt) : void 0),
6132
6275
  applies: [
6133
6276
  "position",
6134
6277
  "scale",
6135
6278
  "pivot"
6136
6279
  ],
6137
- exclude: Nt
6280
+ exclude: Pt
6138
6281
  }),
6139
6282
  particleContainer: Z({
6140
- build: (e) => new Lt(e ? T(e, Ft) : void 0),
6283
+ build: (e) => new Rt(e ? w(e, It) : void 0),
6141
6284
  applies: [
6142
6285
  "position",
6143
6286
  "scale",
6144
6287
  "pivot"
6145
6288
  ],
6146
- exclude: Ft
6289
+ exclude: It
6147
6290
  }),
6148
6291
  texture: q,
6149
6292
  sprite: Z({
@@ -6167,7 +6310,7 @@ var Nr = [
6167
6310
  exclude: ["asset", "sheet"]
6168
6311
  }),
6169
6312
  animatedSprite: Z({
6170
- build: (e) => new zt(e),
6313
+ build: (e) => new Bt(e),
6171
6314
  applies: [
6172
6315
  "position",
6173
6316
  "scale",
@@ -6196,7 +6339,7 @@ var Nr = [
6196
6339
  ]
6197
6340
  }),
6198
6341
  svg(e) {
6199
- let t = new Rt(e.ctx), { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ctx: l, ...u } = e;
6342
+ let t = new zt(e.ctx), { position: n, x: r, y: i, pivot: a, scale: o, scaleX: s, scaleY: c, ctx: l, ...u } = e;
6200
6343
  return J({
6201
6344
  position: n,
6202
6345
  x: r,
@@ -6213,15 +6356,15 @@ var Nr = [
6213
6356
  roundPixels: e.roundPixels,
6214
6357
  resolution: e.resolution,
6215
6358
  style: e.style,
6216
- anchor: e.anchor ? E(e.anchor, !0) : void 0,
6217
- pivot: e.pivot ? E(e.pivot, !0) : void 0
6359
+ anchor: e.anchor ? T(e.anchor, !0) : void 0,
6360
+ pivot: e.pivot ? T(e.pivot, !0) : void 0
6218
6361
  } : {}),
6219
6362
  applies: [
6220
6363
  "position",
6221
6364
  "scale",
6222
6365
  "pivot"
6223
6366
  ],
6224
- exclude: [...Nr]
6367
+ exclude: [...zr]
6225
6368
  }),
6226
6369
  htmlText: Z({
6227
6370
  build: (e) => new l(e ? {
@@ -6229,57 +6372,57 @@ var Nr = [
6229
6372
  roundPixels: e.roundPixels,
6230
6373
  resolution: e.resolution,
6231
6374
  style: e.style,
6232
- anchor: e.anchor ? E(e.anchor, !0) : void 0,
6233
- pivot: e.pivot ? E(e.pivot, !0) : void 0
6375
+ anchor: e.anchor ? T(e.anchor, !0) : void 0,
6376
+ pivot: e.pivot ? T(e.pivot, !0) : void 0
6234
6377
  } : {}),
6235
6378
  applies: [
6236
6379
  "position",
6237
6380
  "scale",
6238
6381
  "pivot"
6239
6382
  ],
6240
- exclude: [...Nr]
6383
+ exclude: [...zr]
6241
6384
  }),
6242
6385
  bitmapText: Z({
6243
6386
  build: (e) => new r(e ? {
6244
6387
  text: e.text,
6245
6388
  roundPixels: e.roundPixels,
6246
6389
  style: e.style,
6247
- anchor: e.anchor ? E(e.anchor, !0) : void 0,
6248
- pivot: e.pivot ? E(e.pivot, !0) : void 0
6390
+ anchor: e.anchor ? T(e.anchor, !0) : void 0,
6391
+ pivot: e.pivot ? T(e.pivot, !0) : void 0
6249
6392
  } : {}),
6250
6393
  applies: [
6251
6394
  "position",
6252
6395
  "scale",
6253
6396
  "pivot"
6254
6397
  ],
6255
- exclude: [...Nr]
6398
+ exclude: [...zr]
6256
6399
  }),
6257
6400
  button: Z({
6258
- build: (e) => new Wt(e ? T(e, Ht) : void 0),
6401
+ build: (e) => new Gt(e ? w(e, Ut) : void 0),
6259
6402
  applies: [
6260
6403
  "position",
6261
6404
  "scale",
6262
6405
  "pivot"
6263
6406
  ],
6264
- exclude: Ht
6407
+ exclude: Ut
6265
6408
  }),
6266
6409
  flexContainer: Z({
6267
- build: (e) => new Jt(e),
6410
+ build: (e) => new Yt(e),
6268
6411
  applies: [
6269
6412
  "position",
6270
6413
  "scale",
6271
6414
  "pivot"
6272
6415
  ],
6273
- exclude: qt
6416
+ exclude: Jt
6274
6417
  }),
6275
6418
  uiCanvas: Z({
6276
- build: (e) => new Sr(e ? T(e, yr) : {}),
6419
+ build: (e) => new Or(e ? w(e, Tr) : {}),
6277
6420
  applies: [
6278
6421
  "position",
6279
6422
  "scale",
6280
6423
  "pivot"
6281
6424
  ],
6282
- exclude: yr
6425
+ exclude: Tr
6283
6426
  }),
6284
6427
  spine: Z({
6285
6428
  build: (e) => {
@@ -6309,7 +6452,7 @@ var Nr = [
6309
6452
  ]
6310
6453
  }),
6311
6454
  spineAnimation: (e) => {
6312
- let t = new Vt(e);
6455
+ let t = new Ht(e);
6313
6456
  if (!e) return t;
6314
6457
  let { position: n, x: r, y: i, anchor: a, pivot: o, scale: s, scaleX: c, scaleY: l, ...u } = e;
6315
6458
  return J({
@@ -6320,13 +6463,13 @@ var Nr = [
6320
6463
  scale: s,
6321
6464
  scaleX: c,
6322
6465
  scaleY: l
6323
- }, t), Ar(a, t), X(o, t), G(u, t), t;
6466
+ }, t), Ir(a, t), X(o, t), G(u, t), t;
6324
6467
  },
6325
- toaster: (e, t = {}) => new vr(e, t),
6468
+ toaster: (e, t = {}) => new wr(e, t),
6326
6469
  entity: (e, t) => {
6327
- let n = wr(e);
6470
+ let n = Ar(e);
6328
6471
  if (!n) {
6329
- let t = Tr();
6472
+ let t = jr();
6330
6473
  throw Error(`[caper] Unknown entity id '${String(e)}'. Known: ${t.length > 0 ? t.map((e) => `'${e}'`).join(", ") : "(none — discovery may have failed)"}`);
6331
6474
  }
6332
6475
  let r = new n(t);
@@ -6345,9 +6488,9 @@ var Nr = [
6345
6488
  return r;
6346
6489
  },
6347
6490
  ui: (e, t) => {
6348
- let n = Dr(e);
6491
+ let n = Nr(e);
6349
6492
  if (!n) {
6350
- let t = Or();
6493
+ let t = Pr();
6351
6494
  throw Error(`[caper] Unknown ui id '${String(e)}'. Known: ${t.length > 0 ? t.map((e) => `'${e}'`).join(", ") : "(none — discovery may have failed)"}`);
6352
6495
  }
6353
6496
  let r = new n(t);
@@ -6371,21 +6514,21 @@ var Nr = [
6371
6514
  function Q(e) {
6372
6515
  return class extends i {
6373
6516
  constructor() {
6374
- super(), e = Object.assign(Pr, e), this.make = Mt(e, this, !1), this.add = Mt(e, this, !0);
6517
+ super(), e = Object.assign(Br, e), this.make = Nt(e, this, !1), this.add = Nt(e, this, !0);
6375
6518
  }
6376
6519
  };
6377
6520
  }
6378
6521
  //#endregion
6379
6522
  //#region src/plugins/defaults.ts
6380
- var Fr = [
6523
+ var Vr = [
6381
6524
  {
6382
6525
  id: "lookup",
6383
- module: ar,
6526
+ module: dr,
6384
6527
  namedExport: "LookupPlugin"
6385
6528
  },
6386
6529
  {
6387
6530
  id: "webEvents",
6388
- module: hr,
6531
+ module: xr,
6389
6532
  namedExport: "WebEventsPlugin"
6390
6533
  },
6391
6534
  {
@@ -6395,7 +6538,7 @@ var Fr = [
6395
6538
  },
6396
6539
  {
6397
6540
  id: "resizer",
6398
- module: cr,
6541
+ module: mr,
6399
6542
  namedExport: "ResizerPlugin"
6400
6543
  },
6401
6544
  {
@@ -6405,27 +6548,32 @@ var Fr = [
6405
6548
  },
6406
6549
  {
6407
6550
  id: "assets",
6408
- module: rn,
6551
+ module: an,
6409
6552
  namedExport: "AssetsPlugin"
6410
6553
  },
6411
6554
  {
6412
6555
  id: "scenes",
6413
- module: ur,
6556
+ module: gr,
6414
6557
  namedExport: "SceneManagerPlugin"
6415
6558
  },
6416
6559
  {
6417
6560
  id: "actions",
6418
- module: Yt,
6561
+ module: Xt,
6419
6562
  namedExport: "ActionsPlugin"
6420
6563
  },
6421
6564
  {
6422
6565
  id: "input",
6423
- module: ir,
6566
+ module: ur,
6424
6567
  namedExport: "InputPlugin"
6425
6568
  },
6569
+ {
6570
+ id: "gesture",
6571
+ module: er,
6572
+ namedExport: "GesturePlugin"
6573
+ },
6426
6574
  {
6427
6575
  id: "keyboard",
6428
- module: Qn,
6576
+ module: ir,
6429
6577
  namedExport: "KeyboardPlugin"
6430
6578
  },
6431
6579
  {
@@ -6435,7 +6583,7 @@ var Fr = [
6435
6583
  },
6436
6584
  {
6437
6585
  id: "popups",
6438
- module: or,
6586
+ module: fr,
6439
6587
  namedExport: "PopupManagerPlugin"
6440
6588
  },
6441
6589
  {
@@ -6445,21 +6593,21 @@ var Fr = [
6445
6593
  },
6446
6594
  {
6447
6595
  id: "i18n",
6448
- module: Zn,
6596
+ module: rr,
6449
6597
  namedExport: "i18nPlugin"
6450
6598
  },
6451
6599
  {
6452
6600
  id: "timers",
6453
- module: mr,
6601
+ module: br,
6454
6602
  namedExport: "TimerPlugin"
6455
6603
  }
6456
6604
  ];
6457
6605
  //#endregion
6458
6606
  //#region src/core/Application.ts
6459
- function Ir() {
6607
+ function Hr() {
6460
6608
  return typeof window < "u" ? window.devicePixelRatio > 1 ? 2 : 1 : 2;
6461
6609
  }
6462
- var Lr = {
6610
+ var Ur = {
6463
6611
  antialias: !1,
6464
6612
  autoStart: !0,
6465
6613
  resizeToContainer: !0,
@@ -6497,7 +6645,7 @@ var Lr = {
6497
6645
  wordWrap: !1,
6498
6646
  wordWrapWidth: 100
6499
6647
  },
6500
- resolution: Ir(),
6648
+ resolution: Hr(),
6501
6649
  useHash: _,
6502
6650
  showSceneDebugMenu: _,
6503
6651
  showStats: _,
@@ -6509,14 +6657,17 @@ var Lr = {
6509
6657
  scenes: [],
6510
6658
  defaultSceneLoadMethod: "immediate",
6511
6659
  assets: { manifest: "./assets.json" }
6512
- }, Rr = {
6660
+ }, Wr = {
6513
6661
  pauseAudio: !1,
6514
6662
  pauseAnimations: !1,
6515
6663
  pauseTicker: !1,
6516
6664
  pauseTimers: !1
6517
6665
  }, $ = class e extends t {
6666
+ static {
6667
+ this.__caper_method_binding_root = !0;
6668
+ }
6518
6669
  get make() {
6519
- return this._makeFactory ||= Mt(Pr, this, !1), this._makeFactory;
6670
+ return this._makeFactory ||= Nt(Br, this, !1), this._makeFactory;
6520
6671
  }
6521
6672
  get env() {
6522
6673
  return this._env;
@@ -6529,7 +6680,7 @@ var Lr = {
6529
6680
  }
6530
6681
  pause(e) {
6531
6682
  this._paused = !0, this._pauseConfig = {
6532
- ...Rr,
6683
+ ...Wr,
6533
6684
  ...e
6534
6685
  }, e?.pauseAudio && this.audio.pause(), e?.pauseAnimations && m?.globalTimeline?.pause(), e?.pauseTicker && this.ticker.stop(), e?.pauseTimers && this.timers.pauseAllTimers(), e?.pauseOther && e.pauseOther.forEach((e) => {
6535
6686
  typeof e?.pause == "function" && e.pause();
@@ -6544,7 +6695,7 @@ var Lr = {
6544
6695
  this._paused = !this._paused, this._paused ? this.pause(e) : this.resume();
6545
6696
  }
6546
6697
  constructor() {
6547
- super(), this.__caper_method_binding_root = !0, this.onPause = new O(), this.onResume = new O(), this.onResize = new O(), this.onPluginError = new O(), this._plugins = /* @__PURE__ */ new Map(), this._isBooting = !0, this._env = {
6698
+ super(), this.onPause = new D(), this.onResume = new D(), this.onResize = new D(), this.onPluginError = new D(), this._plugins = /* @__PURE__ */ new Map(), this._isBooting = !0, this._env = {
6548
6699
  BASE_URL: "/",
6549
6700
  DEV: !1,
6550
6701
  MODE: "production",
@@ -6693,13 +6844,13 @@ var Lr = {
6693
6844
  return "ontouchstart" in window || navigator.maxTouchPoints > 0;
6694
6845
  }
6695
6846
  get signal() {
6696
- return zr;
6847
+ return Gr;
6697
6848
  }
6698
6849
  get signals() {
6699
6850
  return this.signal;
6700
6851
  }
6701
6852
  get func() {
6702
- return Br;
6853
+ return Kr;
6703
6854
  }
6704
6855
  get exec() {
6705
6856
  return this.func;
@@ -6720,16 +6871,16 @@ var Lr = {
6720
6871
  }
6721
6872
  async initialize(t, n) {
6722
6873
  if (e.instance) throw Error("Application is already initialized");
6723
- if (e.instance = this, this.config = $e(Lr, t), this.signals.onResize = this.onResize, t.container && (e.containerElement = t.container), y.initialize(this.config.logger), this.config.resolution !== 1 && this.config.resolution !== 2) {
6874
+ if (e.instance = this, this.config = et(Ur, t), this.signals.onResize = this.onResize, t.container && (e.containerElement = t.container), y.initialize(this.config.logger), this.config.resolution !== 1 && this.config.resolution !== 2) {
6724
6875
  let e = this.config.resolution;
6725
- this.config.resolution = Ir(), y.warn(`App resolution must be 1 or 2, setting to ${this.config.resolution} instead of ${e}. Modify your app config to set the resolution to 1 or 2.`);
6876
+ this.config.resolution = Hr(), y.warn(`App resolution must be 1 or 2, setting to ${this.config.resolution} instead of ${e}. Modify your app config to set the resolution to 1 or 2.`);
6726
6877
  }
6727
6878
  if (await this.boot(this.config), await this.initAssets(), await this.init(this.config), this.stage.label = "Stage", this.config.defaultTextStyle && (ne.defaultTextStyle = {
6728
- ...Lr.defaultTextStyle,
6879
+ ...Ur.defaultTextStyle,
6729
6880
  ...this.config.defaultTextStyle
6730
6881
  }), this.config.defaultDropShadow && (ne.defaultDropShadow = this.config.defaultDropShadow), n) n.appendChild(this.canvas), this.setContainer(n);
6731
6882
  else throw Error("No element found to append the view to.");
6732
- return await this.registerDefaultPlugins(), _ && this.getPlugin("DevToolsPlugin").initializeDevTools(this), this.signals.onLoadRequiredComplete.connectOnce(this.requiredAssetsLoaded), await this._setup(), this.plugins = await ft(this.config.plugins || []), await this.registerPlugins(), await this.setup(), await this.loadDefaultScene(), this.renderer.canvas.focus(), this.config.container && this.config.container.classList.add("loaded"), this._isBooting = !1, e.instance;
6883
+ return await this.registerDefaultPlugins(), _ && this.getPlugin("DevToolsPlugin").initializeDevTools(this), this.signals.onLoadRequiredComplete.connectOnce(this.requiredAssetsLoaded), await this._setup(), this.plugins = await pt(this.config.plugins || []), await this.registerPlugins(), await this.setup(), await this.loadDefaultScene(), this.renderer.canvas.focus(), this.config.container && this.config.container.classList.add("loaded"), this._isBooting = !1, e.instance;
6733
6884
  }
6734
6885
  getPlugin(e, t = !1) {
6735
6886
  let n = this._plugins.get(e);
@@ -6739,7 +6890,7 @@ var Lr = {
6739
6890
  for (let e of this._plugins.values()) try {
6740
6891
  await e.postInitialize(this);
6741
6892
  } catch (t) {
6742
- w({
6893
+ ze({
6743
6894
  message: `Plugin "${e.id}" failed in postInitialize: ${t instanceof Error ? t.message : String(t)}`,
6744
6895
  stack: t instanceof Error ? t.stack : void 0
6745
6896
  }), this.onPluginError.emit({
@@ -6758,7 +6909,7 @@ var Lr = {
6758
6909
  }
6759
6910
  async loadPlugin(e, t = !1) {
6760
6911
  if (this._plugins.has(e.id)) return await this.registerPlugin(this._plugins.get(e.id), e.options);
6761
- let n = new (await (He(e)))(e.id);
6912
+ let n = new (await (Ue(e)))(e.id);
6762
6913
  n.id !== e.id && (n.id = e.id);
6763
6914
  let r = e.options;
6764
6915
  return t && !r && (r = this.config[n.id]), await this.registerPlugin(n, r);
@@ -6780,7 +6931,7 @@ var Lr = {
6780
6931
  }
6781
6932
  async boot(e) {
6782
6933
  this.config = {
6783
- ...Lr,
6934
+ ...Ur,
6784
6935
  ...e
6785
6936
  }, await this.preInitialize(this.config);
6786
6937
  }
@@ -6788,23 +6939,23 @@ var Lr = {
6788
6939
  let { id: t } = e;
6789
6940
  this._appName = t, _ && await this.loadPlugin({
6790
6941
  id: "DevToolsPlugin",
6791
- module: () => import("./DevToolsPlugin-wQ5rOkn0.js"),
6942
+ module: () => import("./DevToolsPlugin-P-atJ-5U.js"),
6792
6943
  namedExport: "DevToolsPlugin"
6793
6944
  }), e.useLayout && await this.loadPlugin({
6794
6945
  id: "LayoutPlugin",
6795
- module: () => import("./LayoutPlugin-B-DF9SYM.js"),
6946
+ module: () => import("./LayoutPlugin-iZ3k6RsK.js"),
6796
6947
  namedExport: "LayoutPlugin"
6797
6948
  }), await this.loadPlugin({
6798
6949
  id: "GSAPPlugin",
6799
- module: () => import("./GSAPPlugin-DHhSZKv8.js"),
6950
+ module: () => import("./GSAPPlugin-CeH9275z.js"),
6800
6951
  namedExport: "GSAPPlugin"
6801
6952
  }), e.useSpine && await this.loadPlugin({
6802
6953
  id: "SpinePlugin",
6803
- module: () => import("./SpinePlugin-Dz_3dljz.js"),
6954
+ module: () => import("./SpinePlugin-BWiavCpO.js"),
6804
6955
  namedExport: "SpinePlugin"
6805
- }), this.config.useStore && (this._store = new Dt(), this._store.initialize(this), await this.loadPlugin({
6956
+ }), this.config.useStore && (this._store = new Ot(), this._store.initialize(this), await this.loadPlugin({
6806
6957
  id: "data",
6807
- module: () => import("./DataAdapter-BY2114sp.js").then((e) => e.n),
6958
+ module: () => import("./DataAdapter-BZFTkFQ4.js").then((e) => e.n),
6808
6959
  namedExport: "DataAdapter",
6809
6960
  options: this.config.data
6810
6961
  }));
@@ -6815,7 +6966,7 @@ var Lr = {
6815
6966
  try {
6816
6967
  return await e.initialize(t, this);
6817
6968
  } catch (t) {
6818
- w({
6969
+ ze({
6819
6970
  message: `Plugin "${e.id}" failed to initialize: ${t instanceof Error ? t.message : String(t)}`,
6820
6971
  stack: t instanceof Error ? t.stack : void 0
6821
6972
  }), this.onPluginError.emit({
@@ -6827,29 +6978,29 @@ var Lr = {
6827
6978
  }
6828
6979
  }
6829
6980
  async registerDefaultPlugins() {
6830
- for (let e = 0; e < Fr.length; e++) {
6831
- let t = Fr[e];
6981
+ for (let e = 0; e < Vr.length; e++) {
6982
+ let t = Vr[e];
6832
6983
  await this.loadPlugin(t, !0);
6833
6984
  }
6834
6985
  (this.config.showStats === !0 || _ && this.config.showStats !== !1) && await this.loadPlugin({
6835
6986
  id: "stats",
6836
- module: () => import("./StatsPlugin-Cg82JMBD.js"),
6987
+ module: () => import("./StatsPlugin-CBpzDJL0.js"),
6837
6988
  namedExport: "StatsPlugin"
6838
6989
  }), this.config.useVoiceover && (await this.loadPlugin({
6839
6990
  id: "voiceover",
6840
- module: () => import("./VoiceOverPlugin-BR3ImT8C.js"),
6991
+ module: () => import("./VoiceOverPlugin-YaiKJtJ6.js"),
6841
6992
  namedExport: "VoiceOverPlugin",
6842
6993
  options: this.config.voiceover || void 0
6843
6994
  }), await this.loadPlugin({
6844
6995
  id: "captions",
6845
- module: () => import("./CaptionsPlugin-Dc8fIrjy.js"),
6996
+ module: () => import("./CaptionsPlugin-DKhbmJvH.js"),
6846
6997
  namedExport: "CaptionsPlugin",
6847
6998
  options: this.config.captions || void 0
6848
6999
  }));
6849
7000
  }
6850
7001
  async registerPlugins() {
6851
7002
  if (!this.plugins?.length) return;
6852
- let e = mt(this.plugins);
7003
+ let e = ht(this.plugins);
6853
7004
  for (let t of e) t.autoLoad && await this.loadPlugin(t);
6854
7005
  }
6855
7006
  async requiredAssetsLoaded() {}
@@ -6878,8 +7029,8 @@ var Lr = {
6878
7029
  _addSplash() {
6879
7030
  this.scenes.splash.view && (this.scenes.splash.view.label = "Splash", this.stage.addChild(this.scenes.splash.view));
6880
7031
  }
6881
- }, zr = {}, Br = {};
7032
+ }, Gr = {}, Kr = {};
6882
7033
  //#endregion
6883
- export { qt as $, C as $t, tr as A, E as At, bn as B, Ye as Bt, fr as C, me as Cn, nt as Ct, ar as D, st as Dt, or as E, lt as Et, Zn as F, $e as Ft, Xt as G, We as Gt, vn as H, Je as Ht, Jn as I, Qe as It, en as J, Be as Jt, Zt as K, Ue as Kt, qn as L, T as Lt, Qn as M, at as Mt, V as N, tt as Nt, ir as O, ut as Ot, B as P, et as Pt, Jt as Q, Le as Qt, Gn as R, Ze as Rt, mr as S, h as Sn, dt as St, cr as T, ct as Tt, hn as U, Ke as Ut, yn as V, qe as Vt, rn as W, Ge as Wt, Yt as X, Ie as Xt, $t as Y, ze as Yt, j as Z, Re as Zt, vr as _, ve as _n, Tt as _t, Pr as a, Pe as an, Rt as at, hr as b, xe as bn, ft as bt, X as c, v as cn, A as ct, q as d, _ as dn, jt as dt, x as en, Kt as et, G as f, De as fn, At as ft, yr as g, Se as gn, O as gt, Sr as h, Te as hn, Dt as ht, Q as i, Fe as in, zt as it, er as j, it as jt, nr as k, ot as kt, J as l, Oe as ln, Nt as lt, Tr as m, Ce as mn, k as mt, zr as n, je as nn, Ht as nt, K as o, S as on, Lt as ot, Or as p, g as pn, kt as pt, Qt as q, He as qt, $ as r, Me as rn, Vt as rt, Ar as s, y as sn, Ft as st, Br as t, b as tn, Wt as tt, Y as u, Ee as un, Mt as ut, gr as v, ye as vn, gt as vt, ur as w, ge as wn, rt as wt, pr as x, _e as xn, mt as xt, H as y, be as yn, pt as yt, Wn as z, Xe as zt };
7034
+ export { A as $, Re as $t, sr as A, dt as At, Gn as B, Qe as Bt, vr as C, _e as Cn, ht as Ct, dr as D, lt as Dt, fr as E, ge as En, it as Et, rr as F, nt as Ft, gn as G, qe as Gt, bn as H, Xe as Ht, er as I, tt as It, Qt as J, We as Jt, an as K, Ke as Kt, Qn as L, et as Lt, ir as M, T as Mt, V as N, at as Nt, ur as O, ut as Ot, B as P, ot as Pt, Xt as Q, Ie as Qt, Jn as R, $e as Rt, br as S, xe as Sn, pt as St, mr as T, me as Tn, rt as Tt, yn as U, Je as Ut, Wn as V, Ze as Vt, vn as W, Ye as Wt, tn as X, Ve as Xt, $t as Y, Ue as Yt, en as Z, Be as Zt, wr as _, Te as _n, Ot as _t, Br as a, Me as an, Ht as at, xr as b, ye as bn, _t as bt, X as c, S as cn, Rt as ct, q as d, Oe as dn, Pt as dt, Le as en, Yt as et, G as f, Ee as fn, Nt as ft, Tr as g, Ce as gn, O as gt, Or as h, g as hn, At as ht, Q as i, je as in, Ut as it, or as j, st as jt, cr as k, ct as kt, J as l, y as ln, It as lt, jr as m, De as mn, jt as mt, Gr as n, x as nn, qt as nt, K as o, Fe as on, Bt as ot, Pr as p, _ as pn, Mt as pt, Zt as q, Ge as qt, $ as r, b as rn, Gt as rt, Ir as s, Pe as sn, zt as st, Kr as t, C as tn, Jt as tt, Y as u, v as un, k as ut, Sr as v, Se as vn, D as vt, gr as w, h as wn, ft as wt, yr as x, be as xn, mt as xt, H as y, ve as yn, Et as yt, qn as z, w as zt };
6884
7035
 
6885
- //# sourceMappingURL=registries-CYCaYKZI.js.map
7036
+ //# sourceMappingURL=registries-qQmLeN0b.js.map