@caperjs/core 0.7.3 → 0.7.4

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 (64) hide show
  1. package/build/index.mjs +1 -1
  2. package/build/internal/buildFlags.mjs +63 -18
  3. package/build/internal/schema.mjs +53 -0
  4. package/build/plugins/pwa.mjs +13 -7
  5. package/cli/doctor.mjs +53 -2
  6. package/cli/doctor.test.mjs +80 -1
  7. package/cli/native.mjs +105 -11
  8. package/cli/native.test.mjs +184 -0
  9. package/extras/llms.txt +26 -3
  10. package/lib/{CaptionsPlugin-COrofpHN.js → CaptionsPlugin-CAgQBcA1.js} +7 -7
  11. package/lib/{CaptionsPlugin-COrofpHN.js.map → CaptionsPlugin-CAgQBcA1.js.map} +1 -1
  12. package/lib/{DataAdapter-T-22-_D1.js → DataAdapter-CbyqWMo-.js} +5 -5
  13. package/lib/{DataAdapter-T-22-_D1.js.map → DataAdapter-CbyqWMo-.js.map} +1 -1
  14. package/lib/{DebugRenderer-ZN692Pbg.js → DebugRenderer-Bdkpyyt6.js} +2 -2
  15. package/lib/{DebugRenderer-ZN692Pbg.js.map → DebugRenderer-Bdkpyyt6.js.map} +1 -1
  16. package/lib/{DevToolsPlugin-CQXFoj1T.js → DevToolsPlugin-Cq5HHN9K.js} +2 -2
  17. package/lib/{DevToolsPlugin-CQXFoj1T.js.map → DevToolsPlugin-Cq5HHN9K.js.map} +1 -1
  18. package/lib/{GSAPPlugin-CNkncyXS.js → GSAPPlugin-D-ujhVYo.js} +2 -2
  19. package/lib/{GSAPPlugin-CNkncyXS.js.map → GSAPPlugin-D-ujhVYo.js.map} +1 -1
  20. package/lib/{LayoutPlugin-BuJgr9bd.js → LayoutPlugin-DqbwBm-X.js} +4 -4
  21. package/lib/{LayoutPlugin-BuJgr9bd.js.map → LayoutPlugin-DqbwBm-X.js.map} +1 -1
  22. package/lib/{ScreenDebugPlugin-kz9Mr6j1.js → ScreenDebugPlugin-CyT8UxEa.js} +3 -3
  23. package/lib/{ScreenDebugPlugin-kz9Mr6j1.js.map → ScreenDebugPlugin-CyT8UxEa.js.map} +1 -1
  24. package/lib/{SpinePlugin-DDzD-Qxd.js → SpinePlugin-DyXJyA3x.js} +2 -2
  25. package/lib/{SpinePlugin-DDzD-Qxd.js.map → SpinePlugin-DyXJyA3x.js.map} +1 -1
  26. package/lib/{StatsPlugin-tyFGzVjy.js → StatsPlugin-CEhgzWby.js} +4 -4
  27. package/lib/{StatsPlugin-tyFGzVjy.js.map → StatsPlugin-CEhgzWby.js.map} +1 -1
  28. package/lib/{VoiceOverPlugin-rTNz_9eb.js → VoiceOverPlugin-CSpNZjpJ.js} +2 -2
  29. package/lib/{VoiceOverPlugin-rTNz_9eb.js.map → VoiceOverPlugin-CSpNZjpJ.js.map} +1 -1
  30. package/lib/caper.mjs +159 -162
  31. package/lib/caper.mjs.map +1 -1
  32. package/lib/{const-BClauBNo.js → const-Bca54QyV.js} +251 -251
  33. package/lib/{const-BClauBNo.js.map → const-Bca54QyV.js.map} +1 -1
  34. package/lib/core/Application.d.ts +4 -0
  35. package/lib/core/Application.d.ts.map +1 -1
  36. package/lib/core/interfaces/IApplicationOptions.d.ts +21 -0
  37. package/lib/core/interfaces/IApplicationOptions.d.ts.map +1 -1
  38. package/lib/plugins/OrientationPlugin.d.ts +57 -0
  39. package/lib/plugins/OrientationPlugin.d.ts.map +1 -0
  40. package/lib/plugins/OrientationPlugin.test.d.ts +2 -0
  41. package/lib/plugins/OrientationPlugin.test.d.ts.map +1 -0
  42. package/lib/plugins/defaults.d.ts.map +1 -1
  43. package/lib/plugins/index.d.ts +1 -0
  44. package/lib/plugins/index.d.ts.map +1 -1
  45. package/lib/{registries-DmNGVLAi.js → registries-C1nPl8B3.js} +593 -502
  46. package/lib/registries-C1nPl8B3.js.map +1 -0
  47. package/lib/utils/index.d.ts +1 -0
  48. package/lib/utils/index.d.ts.map +1 -1
  49. package/lib/utils/orientation.d.ts +44 -0
  50. package/lib/utils/orientation.test.d.ts +2 -0
  51. package/lib/utils/orientation.test.d.ts.map +1 -0
  52. package/package.json +1 -1
  53. package/src/core/Application.ts +10 -0
  54. package/src/core/interfaces/IApplicationOptions.ts +21 -0
  55. package/src/plugins/OrientationPlugin.test.ts +252 -0
  56. package/src/plugins/OrientationPlugin.ts +178 -0
  57. package/src/plugins/defaults.ts +6 -0
  58. package/src/plugins/index.ts +1 -0
  59. package/src/utils/index.ts +1 -0
  60. package/src/utils/orientation.d.ts +44 -0
  61. package/src/utils/orientation.js +37 -0
  62. package/src/utils/orientation.test.ts +30 -0
  63. package/src/version.ts +1 -1
  64. package/lib/registries-DmNGVLAi.js.map +0 -1
@@ -1,55 +1,55 @@
1
- import { Application as e, Assets as t, Container as n, DOMAdapter as r, EventEmitter as i, ExtensionType as a, Graphics as o, LoaderParserPriority as s, Point as c, TextStyle as l, Texture as u, Ticker as d, extensions as ee, isMobile as te, path as f } from "pixi.js";
2
- import { gsap as p } from "gsap";
1
+ import { Application as e, Assets as t, Container as n, DOMAdapter as r, EventEmitter as i, ExtensionType as a, Graphics as o, LoaderParserPriority as s, Point as c, TextStyle as l, Texture as u, Ticker as d, extensions as ee, isMobile as f, path as p } from "pixi.js";
2
+ import { gsap as m } from "gsap";
3
3
  //#region \0rolldown/runtime.js
4
- var ne = Object.create, m = Object.defineProperty, re = Object.getOwnPropertyDescriptor, ie = Object.getOwnPropertyNames, ae = Object.getPrototypeOf, oe = Object.prototype.hasOwnProperty, h = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), se = (e, t) => {
4
+ var te = Object.create, h = Object.defineProperty, ne = Object.getOwnPropertyDescriptor, re = Object.getOwnPropertyNames, ie = Object.getPrototypeOf, ae = Object.prototype.hasOwnProperty, g = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), oe = (e, t) => {
5
5
  let n = {};
6
- for (var r in e) m(n, r, {
6
+ for (var r in e) h(n, r, {
7
7
  get: e[r],
8
8
  enumerable: !0
9
9
  });
10
- return t || m(n, Symbol.toStringTag, { value: "Module" }), n;
11
- }, ce = (e, t, n, r) => {
12
- if (t && typeof t == "object" || typeof t == "function") for (var i = ie(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !oe.call(e, s) && s !== n && m(e, s, {
10
+ return t || h(n, Symbol.toStringTag, { value: "Module" }), n;
11
+ }, se = (e, t, n, r) => {
12
+ if (t && typeof t == "object" || typeof t == "function") for (var i = re(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ae.call(e, s) && s !== n && h(e, s, {
13
13
  get: ((e) => t[e]).bind(null, s),
14
- enumerable: !(r = re(t, s)) || r.enumerable
14
+ enumerable: !(r = ne(t, s)) || r.enumerable
15
15
  });
16
16
  return e;
17
- }, le = (e, t, n) => (n = e == null ? {} : ne(ae(e)), ce(t || !e || !e.__esModule ? m(n, "default", {
17
+ }, ce = (e, t, n) => (n = e == null ? {} : te(ie(e)), se(t || !e || !e.__esModule ? h(n, "default", {
18
18
  value: e,
19
19
  enumerable: !0
20
20
  }) : n, e));
21
21
  //#endregion
22
22
  //#region src/utils/random.ts
23
- function ue() {
23
+ function le() {
24
24
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
25
25
  let t = Math.random() * 16 | 0;
26
26
  return (e === "x" ? t : t & 3 | 8).toString(16);
27
27
  });
28
28
  }
29
- function de(e, t, n = !1) {
29
+ function _(e, t, n = !1) {
30
30
  return e + Math.random() * (t - e + +!!n);
31
31
  }
32
- function fe(e, t = !1) {
33
- return de(e.x, e.y, t);
32
+ function ue(e, t = !1) {
33
+ return _(e.x, e.y, t);
34
34
  }
35
- function pe(e, t, n = !1) {
36
- return Math.floor(de(e, t, n));
35
+ function de(e, t, n = !1) {
36
+ return Math.floor(_(e, t, n));
37
37
  }
38
- function me(e, t = !1) {
39
- return pe(e.x, e.y, t);
38
+ function fe(e, t = !1) {
39
+ return de(e.x, e.y, t);
40
40
  }
41
- function he() {
41
+ function pe() {
42
42
  return Math.random() < .5;
43
43
  }
44
44
  //#endregion
45
45
  //#region src/utils/bind.ts
46
- function ge(e, ...t) {
46
+ function me(e, ...t) {
47
47
  t.forEach((t) => {
48
48
  let n = e[t];
49
49
  typeof n == "function" && (e[t] = n.bind(e));
50
50
  });
51
51
  }
52
- function _e(e, t = [], n = []) {
52
+ function he(e, t = [], n = []) {
53
53
  let r = Object.getPrototypeOf(e), i = [];
54
54
  for (; r;) {
55
55
  let e = Object.getOwnPropertyNames(r).filter((e) => typeof Object.getOwnPropertyDescriptor(r, e)?.value == "function" && e !== "constructor" && !t.some((t) => e.startsWith(t)) && !n.includes(e));
@@ -58,37 +58,37 @@ function _e(e, t = [], n = []) {
58
58
  }
59
59
  return i;
60
60
  }
61
- function g(e, t = [], n = []) {
62
- _e(e, t, n).forEach((t) => {
61
+ function v(e, t = [], n = []) {
62
+ he(e, t, n).forEach((t) => {
63
63
  e[t] = e[t].bind(e);
64
64
  });
65
65
  }
66
- function ve(e, t, ...n) {
66
+ function ge(e, t, ...n) {
67
67
  typeof e[t] == "function" && e[t](...n);
68
68
  }
69
69
  //#endregion
70
70
  //#region src/utils/env.ts
71
- var _ = process.env.NODE_ENV, v = _ === "development", ye = _ === "production";
71
+ var _e = process.env.NODE_ENV, y = _e === "development", ve = _e === "production";
72
72
  //#endregion
73
73
  //#region src/utils/string.ts
74
- function y(e) {
74
+ function b(e) {
75
75
  return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
76
76
  }
77
- function be(e) {
78
- return e ? e.split(" ").map(y).join(" ") : "";
77
+ function ye(e) {
78
+ return e ? e.split(" ").map(b).join(" ") : "";
79
79
  }
80
80
  //#endregion
81
81
  //#region src/utils/console/Logger.ts
82
- var b = {
82
+ var x = {
83
83
  log: "background: #74b64c; color: black;",
84
84
  warn: "background: yellow; color: black;",
85
85
  error: "background: red; color: white;"
86
- }, x = "background: #1f2937; color: #74b64c;", S = class e {
86
+ }, S = "background: #1f2937; color: #74b64c;", C = class e {
87
87
  static {
88
88
  this._instance = null;
89
89
  }
90
90
  constructor(t) {
91
- e._instance = this, e.mode = t === void 0 ? v ? "development" : "default" : t, [
91
+ e._instance = this, e.mode = t === void 0 ? y ? "development" : "default" : t, [
92
92
  "development",
93
93
  "default",
94
94
  "disabled"
@@ -119,30 +119,30 @@ var b = {
119
119
  static lifecycle(t, n = "init", ...r) {
120
120
  if (e.mode === "disabled") return;
121
121
  let i = `${t} ${n}`;
122
- if (e.mode === "default") return console.log(`%c ${y(n)} `, x, i, ...r);
123
- console.groupCollapsed(`%c ${y(n)} `, x, i, ...r), console.trace("%c Stack ", x), console.groupEnd();
122
+ if (e.mode === "default") return console.log(`%c ${b(n)} `, S, i, ...r);
123
+ console.groupCollapsed(`%c ${b(n)} `, S, i, ...r), console.trace("%c Stack ", S), console.groupEnd();
124
124
  }
125
125
  static trace(t = "log", ...n) {
126
126
  if (e.mode !== "disabled") {
127
- if (t === "error") return console.error(`%c ${y(t)} `, b[t], ...n);
128
- if (e.mode === "default") return console.log(`%c ${y(t)} `, b[t], ...n);
129
- console.groupCollapsed(`%c ${y(t)} `, b[t], ...n), console.trace("%c Stack ", b[t]), console.groupEnd();
127
+ if (t === "error") return console.error(`%c ${b(t)} `, x[t], ...n);
128
+ if (e.mode === "default") return console.log(`%c ${b(t)} `, x[t], ...n);
129
+ console.groupCollapsed(`%c ${b(t)} `, x[t], ...n), console.trace("%c Stack ", x[t]), console.groupEnd();
130
130
  }
131
131
  }
132
- }, C = /* @__PURE__ */ function(e) {
132
+ }, w = /* @__PURE__ */ function(e) {
133
133
  return e.REQUIRED_ASSETS_START = "caper-required-assets-start", e.REQUIRED_ASSETS_PROGRESS = "caper-required-assets-progress", e.REQUIRED_ASSETS_COMPLETE = "caper-required-assets-complete", e.ASSETS_START = "caper-assets-start", e.ASSETS_PROGRESS = "caper-assets-progress", e.ASSETS_COMPLETE = "caper-assets-complete", e;
134
- }({}), xe = (e = 0) => new Promise((t) => setTimeout(t, e * 1e3)), Se = (e = 0) => xe(e), Ce = (e) => e && typeof e.then == "function";
134
+ }({}), be = (e = 0) => new Promise((t) => setTimeout(t, e * 1e3)), xe = (e = 0) => be(e), T = (e) => e && typeof e.then == "function";
135
135
  //#endregion
136
136
  //#region src/utils/vite.ts
137
- function w(e) {
138
- S.error(e);
137
+ function E(e) {
138
+ C.error(e);
139
139
  }
140
140
  //#endregion
141
141
  //#region src/utils/promise/Queue.ts
142
- function we(...e) {
143
- return new Te(e);
142
+ function Se(...e) {
143
+ return new Ce(e);
144
144
  }
145
- var Te = class {
145
+ var Ce = class {
146
146
  constructor(e = []) {
147
147
  this._currentIndex = 0, this._isPaused = !1, this._isCanceled = !1, this._promises = e;
148
148
  }
@@ -175,7 +175,7 @@ var Te = class {
175
175
  this._results.push(t), this._currentIndex++, this._next();
176
176
  } catch (e) {
177
177
  let t = e instanceof Error ? e : Error(String(e));
178
- console.error("Queue didn't complete due to an error:", e), w({
178
+ console.error("Queue didn't complete due to an error:", e), E({
179
179
  message: `Queue didn't complete due to an error: ${t.message}`,
180
180
  stack: t.stack,
181
181
  id: e?.id
@@ -185,23 +185,23 @@ var Te = class {
185
185
  };
186
186
  //#endregion
187
187
  //#region src/utils/framework.ts
188
- function Ee(e) {
188
+ function we(e) {
189
189
  return typeof e == "function" && /^class\s/.test(Function.prototype.toString.call(e));
190
190
  }
191
- async function T(e) {
191
+ async function D(e) {
192
192
  let t, n;
193
- return Ce(e.module) ? (t = await e.module, n = e?.namedExport ? t[e.namedExport] : t.default) : typeof e.module == "function" ? Ee(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;
193
+ return T(e.module) ? (t = await e.module, n = e?.namedExport ? t[e.namedExport] : t.default) : typeof e.module == "function" ? we(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;
194
194
  }
195
195
  //#endregion
196
196
  //#region src/utils/map.ts
197
- function De(e, t) {
197
+ function Te(e, t) {
198
198
  let n;
199
199
  for (let r of e) {
200
200
  if (r[0] === t) return n;
201
201
  n = r;
202
202
  }
203
203
  }
204
- function Oe(e, t) {
204
+ function Ee(e, t) {
205
205
  let n, r = Array.from(e.entries());
206
206
  for (let e = r.length - 1; e >= 0; e--) {
207
207
  let i = r[e];
@@ -209,23 +209,23 @@ function Oe(e, t) {
209
209
  n = i;
210
210
  }
211
211
  }
212
- function ke(e) {
212
+ function De(e) {
213
213
  return Array.from(e.entries()).pop();
214
214
  }
215
- function Ae(e) {
215
+ function Oe(e) {
216
216
  return Array.from(e.entries()).shift();
217
217
  }
218
218
  //#endregion
219
219
  //#region src/utils/math.ts
220
- function je(e, t, n) {
220
+ function ke(e, t, n) {
221
221
  return Math.max(t, Math.min(n, e));
222
222
  }
223
- function Me(e, t, n) {
223
+ function Ae(e, t, n) {
224
224
  return e + (t - e) * n;
225
225
  }
226
226
  //#endregion
227
227
  //#region src/utils/misc.ts
228
- function Ne(e) {
228
+ function je(e) {
229
229
  if (e === void 0) return {
230
230
  width: 0,
231
231
  height: 0
@@ -249,7 +249,7 @@ function Ne(e) {
249
249
  height: e ?? 0
250
250
  };
251
251
  }
252
- function Pe(e, t) {
252
+ function Me(e, t) {
253
253
  let n = null;
254
254
  return function(...r) {
255
255
  n && clearTimeout(n), n = setTimeout(() => {
@@ -259,53 +259,76 @@ function Pe(e, t) {
259
259
  }
260
260
  //#endregion
261
261
  //#region src/utils/object.ts
262
- function Fe(e, t) {
262
+ function Ne(e, t) {
263
263
  return t.reduce((t, n) => n in e ? {
264
264
  ...t,
265
265
  [n]: e[n]
266
266
  } : t, {});
267
267
  }
268
- function Ie(e, t) {
268
+ function Pe(e, t) {
269
269
  return Object.entries(t).filter(([t]) => !e.includes(t)).reduce((e, [t, n]) => ({
270
270
  ...e,
271
271
  [t]: n
272
272
  }), {});
273
273
  }
274
- function E(e, t) {
275
- 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]);
274
+ function Fe(e, t) {
275
+ 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] = Fe(e[n], t[n]) : t[n] !== void 0 && (e[n] = t[n]);
276
276
  return e;
277
277
  }
278
278
  //#endregion
279
+ //#region src/utils/orientation.js
280
+ var Ie = ["portrait", "landscape"];
281
+ function Le(e) {
282
+ if (e == null) return null;
283
+ if (typeof e == "string") {
284
+ if (!Ie.includes(e)) throw TypeError(`orientation must be 'portrait' or 'landscape' (got ${JSON.stringify(e)})`);
285
+ return {
286
+ lock: e,
287
+ overlay: {}
288
+ };
289
+ }
290
+ if (typeof e == "object" && !Array.isArray(e)) {
291
+ let { lock: t, overlay: n } = e;
292
+ if (!Ie.includes(t)) throw TypeError(`orientation.lock must be 'portrait' or 'landscape' (got ${JSON.stringify(t)})`);
293
+ if (n !== void 0 && n !== !1 && (typeof n != "object" || !n)) throw TypeError(`orientation.overlay must be false or an object (got ${JSON.stringify(n)})`);
294
+ return {
295
+ lock: t,
296
+ overlay: n ?? {}
297
+ };
298
+ }
299
+ throw TypeError(`orientation must be 'portrait', 'landscape', or { lock, overlay? } (got ${JSON.stringify(e)})`);
300
+ }
301
+ //#endregion
279
302
  //#region src/utils/point.ts
280
- function Le(e, t) {
303
+ function Re(e, t) {
281
304
  return new c(e.x + t.x, e.y + t.y);
282
305
  }
283
- function Re(e, t) {
306
+ function ze(e, t) {
284
307
  e.x += t.x, e.y += t.y;
285
308
  }
286
- function ze(e, t) {
309
+ function Be(e, t) {
287
310
  return new c(e.x - t.x, e.y - t.y);
288
311
  }
289
- function Be(e, t) {
312
+ function Ve(e, t) {
290
313
  e.x -= t.x, e.y -= t.y;
291
314
  }
292
- function Ve(e, t) {
315
+ function He(e, t) {
293
316
  let n = new c(e.x, e.y);
294
317
  return n.x *= t, n.y *= t, n;
295
318
  }
296
- function He(e, t) {
297
- return Me(e.x, e.y, t);
298
- }
299
319
  function Ue(e, t) {
300
- return Math.sqrt(We(e, t));
320
+ return Ae(e.x, e.y, t);
301
321
  }
302
322
  function We(e, t) {
323
+ return Math.sqrt(Ge(e, t));
324
+ }
325
+ function Ge(e, t) {
303
326
  return (t.x - e.x) * (t.x - e.x) + (t.y - e.y) * (t.y - e.y);
304
327
  }
305
- function Ge(e) {
328
+ function Ke(e) {
306
329
  return Math.sqrt(e.x * e.x + e.y * e.y);
307
330
  }
308
- function Ke(e, t = !1, n = 0, r = 0) {
331
+ function qe(e, t = !1, n = 0, r = 0) {
309
332
  if (e instanceof c) n = e.x, r = e.y;
310
333
  else if (Array.isArray(e)) n = e[0], r = e[1] === void 0 ? e[0] : e[1];
311
334
  else if (typeof e == "object") {
@@ -318,17 +341,20 @@ function Ke(e, t = !1, n = 0, r = 0) {
318
341
  };
319
342
  }
320
343
  //#endregion
344
+ //#region src/utils/platform.ts
345
+ var Je = typeof window < "u" ? window.devicePixelRatio > 1 || window.matchMedia && window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches : !1, Ye = typeof window < "u" ? "ontouchstart" in window || navigator.maxTouchPoints > 0 : !1, Xe = typeof window < "u" ? "__TAURI_INTERNALS__" in window : !1, Ze = f.any, Qe = f.android.device, $e = f.apple.device;
346
+ //#endregion
321
347
  //#region src/utils/web.ts
322
- function qe() {
348
+ function et() {
323
349
  return window.innerWidth > window.innerHeight ? "landscape" : "portrait";
324
350
  }
325
351
  //#endregion
326
352
  //#region src/core/config.ts
327
- async function Je(e) {
353
+ async function tt(e) {
328
354
  let t = globalThis.Caper?.get?.("pluginsList") ?? [];
329
355
  return e.map((e) => {
330
356
  let n = Array.isArray(e) ? e[0] : e, r = t.find((e) => e.id === n);
331
- if (!r) return S.warn(`Plugin ${e} not found`), null;
357
+ if (!r) return C.warn(`Plugin ${e} not found`), null;
332
358
  let i = e;
333
359
  return {
334
360
  id: r.id,
@@ -340,10 +366,10 @@ async function Je(e) {
340
366
  };
341
367
  }).filter(Boolean);
342
368
  }
343
- function Ye(e) {
369
+ function nt(e) {
344
370
  return e;
345
371
  }
346
- function Xe(e, t) {
372
+ function rt(e, t) {
347
373
  if (e.length < 2) return e.slice();
348
374
  let n = /* @__PURE__ */ new Map();
349
375
  for (let t of e) n.set(t.id, t);
@@ -378,12 +404,12 @@ function Xe(e, t) {
378
404
  }
379
405
  }
380
406
  if (l.length !== e.length) {
381
- let t = e.filter((e) => !l.includes(e)).map((e) => e.id), r = Ze(t, n);
407
+ let t = e.filter((e) => !l.includes(e)).map((e) => e.id), r = it(t, n);
382
408
  throw Error(`Caper bootstrap failed: plugin dependency cycle detected: ${r.join(" → ")}\nPlugins involved: ${t.join(", ")}`);
383
409
  }
384
410
  return l;
385
411
  }
386
- function Ze(e, t) {
412
+ function it(e, t) {
387
413
  let n = /* @__PURE__ */ new Set(), r = [], i = new Set(e);
388
414
  function a(e) {
389
415
  if (n.has(e)) {
@@ -406,13 +432,13 @@ function Ze(e, t) {
406
432
  }
407
433
  //#endregion
408
434
  //#region src/mixins/factory/defaults.ts
409
- var D = null;
410
- function Qe(e) {
411
- D = e;
435
+ var at = null;
436
+ function ot(e) {
437
+ at = e;
412
438
  }
413
- function $e() {
414
- if (!D) throw Error("[caper] The factory method table hasn't been initialized. Import '@caperjs/core' (or its factory module) before deep-importing display/ui classes so the table is registered first.");
415
- return D;
439
+ function st() {
440
+ if (!at) throw Error("[caper] The factory method table hasn't been initialized. Import '@caperjs/core' (or its factory module) before deep-importing display/ui classes so the table is registered first.");
441
+ return at;
416
442
  }
417
443
  //#endregion
418
444
  //#region src/core/interfaces/IStorageCapability.ts
@@ -421,7 +447,7 @@ function O(e) {
421
447
  }
422
448
  //#endregion
423
449
  //#region ../../node_modules/.pnpm/typed-signals@2.5.0/node_modules/typed-signals/dist/Collector.js
424
- var k = /* @__PURE__ */ h(((e) => {
450
+ var k = /* @__PURE__ */ g(((e) => {
425
451
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Collector = void 0, e.Collector = class {
426
452
  constructor(e) {
427
453
  this.emit = (...t) => {
@@ -429,7 +455,7 @@ var k = /* @__PURE__ */ h(((e) => {
429
455
  };
430
456
  }
431
457
  };
432
- })), et = /* @__PURE__ */ h(((e) => {
458
+ })), ct = /* @__PURE__ */ g(((e) => {
433
459
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorArray = void 0;
434
460
  var t = k();
435
461
  e.CollectorArray = class extends t.Collector {
@@ -446,7 +472,7 @@ var k = /* @__PURE__ */ h(((e) => {
446
472
  this.result.length = 0;
447
473
  }
448
474
  };
449
- })), tt = /* @__PURE__ */ h(((e) => {
475
+ })), lt = /* @__PURE__ */ g(((e) => {
450
476
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorLast = void 0;
451
477
  var t = k();
452
478
  e.CollectorLast = class extends t.Collector {
@@ -460,7 +486,7 @@ var k = /* @__PURE__ */ h(((e) => {
460
486
  delete this.result;
461
487
  }
462
488
  };
463
- })), nt = /* @__PURE__ */ h(((e) => {
489
+ })), ut = /* @__PURE__ */ g(((e) => {
464
490
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorUntil0 = void 0;
465
491
  var t = k();
466
492
  e.CollectorUntil0 = class extends t.Collector {
@@ -477,7 +503,7 @@ var k = /* @__PURE__ */ h(((e) => {
477
503
  this.result = !1;
478
504
  }
479
505
  };
480
- })), rt = /* @__PURE__ */ h(((e) => {
506
+ })), dt = /* @__PURE__ */ g(((e) => {
481
507
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CollectorWhile0 = void 0;
482
508
  var t = k();
483
509
  e.CollectorWhile0 = class extends t.Collector {
@@ -494,7 +520,7 @@ var k = /* @__PURE__ */ h(((e) => {
494
520
  this.result = !1;
495
521
  }
496
522
  };
497
- })), it = /* @__PURE__ */ h(((e) => {
523
+ })), ft = /* @__PURE__ */ g(((e) => {
498
524
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalConnectionImpl = void 0, e.SignalConnectionImpl = class {
499
525
  constructor(e, t) {
500
526
  this.link = e, this.parentCleanup = t;
@@ -509,7 +535,7 @@ var k = /* @__PURE__ */ h(((e) => {
509
535
  return this.link !== null && this.link.isEnabled();
510
536
  }
511
537
  };
512
- })), at = /* @__PURE__ */ h(((e) => {
538
+ })), pt = /* @__PURE__ */ g(((e) => {
513
539
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalLink = void 0, e.SignalLink = class e {
514
540
  constructor(e = null, t = null, n = 0) {
515
541
  this.enabled = !0, this.newLink = !1, this.callback = null, this.prev = e ?? this, this.next = t ?? this, this.order = n;
@@ -530,9 +556,9 @@ var k = /* @__PURE__ */ h(((e) => {
530
556
  return i.callback = t, r.next = i, i.next.prev = i, i;
531
557
  }
532
558
  };
533
- })), ot = /* @__PURE__ */ h(((e) => {
559
+ })), mt = /* @__PURE__ */ g(((e) => {
534
560
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Signal = void 0;
535
- var t = it(), n = at();
561
+ var t = ft(), n = pt();
536
562
  e.Signal = class {
537
563
  constructor() {
538
564
  this.head = new n.SignalLink(), this.hasNewLinks = !1, this.emitDepth = 0, this.connectionsCount = 0;
@@ -579,7 +605,7 @@ var k = /* @__PURE__ */ h(((e) => {
579
605
  }
580
606
  }
581
607
  };
582
- })), st = /* @__PURE__ */ h(((e) => {
608
+ })), ht = /* @__PURE__ */ g(((e) => {
583
609
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalConnections = void 0, e.SignalConnections = class {
584
610
  constructor() {
585
611
  this.list = [];
@@ -598,7 +624,7 @@ var k = /* @__PURE__ */ h(((e) => {
598
624
  return this.list.length === 0;
599
625
  }
600
626
  };
601
- })), A = (/* @__PURE__ */ h(((e) => {
627
+ })), A = (/* @__PURE__ */ g(((e) => {
602
628
  Object.defineProperty(e, "__esModule", { value: !0 }), e.SignalConnections = e.Signal = e.CollectorWhile0 = e.CollectorUntil0 = e.CollectorLast = e.CollectorArray = e.Collector = void 0;
603
629
  var t = k();
604
630
  Object.defineProperty(e, "Collector", {
@@ -607,49 +633,49 @@ var k = /* @__PURE__ */ h(((e) => {
607
633
  return t.Collector;
608
634
  }
609
635
  });
610
- var n = et();
636
+ var n = ct();
611
637
  Object.defineProperty(e, "CollectorArray", {
612
638
  enumerable: !0,
613
639
  get: function() {
614
640
  return n.CollectorArray;
615
641
  }
616
642
  });
617
- var r = tt();
643
+ var r = lt();
618
644
  Object.defineProperty(e, "CollectorLast", {
619
645
  enumerable: !0,
620
646
  get: function() {
621
647
  return r.CollectorLast;
622
648
  }
623
649
  });
624
- var i = nt();
650
+ var i = ut();
625
651
  Object.defineProperty(e, "CollectorUntil0", {
626
652
  enumerable: !0,
627
653
  get: function() {
628
654
  return i.CollectorUntil0;
629
655
  }
630
656
  });
631
- var a = rt();
657
+ var a = dt();
632
658
  Object.defineProperty(e, "CollectorWhile0", {
633
659
  enumerable: !0,
634
660
  get: function() {
635
661
  return a.CollectorWhile0;
636
662
  }
637
663
  });
638
- var o = ot();
664
+ var o = mt();
639
665
  Object.defineProperty(e, "Signal", {
640
666
  enumerable: !0,
641
667
  get: function() {
642
668
  return o.Signal;
643
669
  }
644
670
  });
645
- var s = st();
671
+ var s = ht();
646
672
  Object.defineProperty(e, "SignalConnections", {
647
673
  enumerable: !0,
648
674
  get: function() {
649
675
  return s.SignalConnections;
650
676
  }
651
677
  });
652
- })))(), ct = {
678
+ })))(), gt = {
653
679
  highest: -(2 ** 53 - 1),
654
680
  higher: -1e3,
655
681
  high: -100,
@@ -671,10 +697,10 @@ var k = /* @__PURE__ */ h(((e) => {
671
697
  return i;
672
698
  }
673
699
  connect(e, t = "normal") {
674
- let n = ct[t] ?? t;
700
+ let n = gt[t] ?? t;
675
701
  return super.connect(e, n);
676
702
  }
677
- }, lt = class {
703
+ }, _t = class {
678
704
  constructor() {
679
705
  this.onError = new j();
680
706
  }
@@ -685,7 +711,7 @@ var k = /* @__PURE__ */ h(((e) => {
685
711
  this.onError.disconnectAll();
686
712
  }
687
713
  _emitError(e) {
688
- S.error(`[Store.${e.operation}] adapter='${e.adapterId}' key='${e.key}': ${e.error.message}`), this.onError.emit(e);
714
+ C.error(`[Store.${e.operation}] adapter='${e.adapterId}' key='${e.key}': ${e.error.message}`), this.onError.emit(e);
689
715
  }
690
716
  getAdapter(e) {
691
717
  let t = this._app.getPlugin(e);
@@ -779,10 +805,10 @@ var N = class {
779
805
  return this._options;
780
806
  }
781
807
  constructor(e = "Plugin") {
782
- this.id = e, this._signalConnections = new A.SignalConnections(), this._disposers = [], g(this);
808
+ this.id = e, this._signalConnections = new A.SignalConnections(), this._disposers = [], v(this);
783
809
  }
784
810
  get app() {
785
- return Q.getInstance();
811
+ return $.getInstance();
786
812
  }
787
813
  destroy() {
788
814
  let e = this._disposers;
@@ -790,7 +816,7 @@ var N = class {
790
816
  for (let t = e.length - 1; t >= 0; t--) try {
791
817
  e[t]();
792
818
  } catch (e) {
793
- S.error(`Plugin "${this.id}" threw while running a disposer:`, e);
819
+ C.error(`Plugin "${this.id}" threw while running a disposer:`, e);
794
820
  }
795
821
  this._signalConnections.disconnectAll();
796
822
  }
@@ -827,13 +853,13 @@ var N = class {
827
853
  registerCoreFunctions() {
828
854
  this.getCoreFunctions().forEach((e) => {
829
855
  let t = e;
830
- $[t] = this[e];
856
+ dr[t] = this[e];
831
857
  });
832
858
  }
833
859
  registerCoreSignals() {
834
860
  this.getCoreSignals().forEach((e) => {
835
861
  let t = e;
836
- er[t] = this[e];
862
+ ur[t] = this[e];
837
863
  });
838
864
  }
839
865
  getCoreFunctions() {
@@ -842,11 +868,11 @@ var N = class {
842
868
  getCoreSignals() {
843
869
  return [];
844
870
  }
845
- }, ut = {
846
- preferWorkers: !v,
871
+ }, vt = {
872
+ preferWorkers: !y,
847
873
  crossOrigin: "anonymous"
848
874
  };
849
- function dt(e) {
875
+ function yt(e) {
850
876
  if (typeof e == "string") {
851
877
  if (!e?.includes(".svg")) return e;
852
878
  e = { src: e };
@@ -855,40 +881,40 @@ function dt(e) {
855
881
  }
856
882
  function P(e) {
857
883
  return Array.isArray(e) || (e = [e]), e.map((e) => {
858
- if (typeof e == "string") return dt(e);
884
+ if (typeof e == "string") return yt(e);
859
885
  if (typeof e == "object") {
860
886
  let t = e?.src || [];
861
- 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)) : dt(e), e;
887
+ 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)) : yt(e), e;
862
888
  }
863
889
  });
864
890
  }
865
- var ft = class extends N {
891
+ var bt = class extends N {
866
892
  constructor(...e) {
867
- super(...e), this.id = "assets", this.onLoadStart = new j(), this.onLoadProgress = new j(), this.onLoadComplete = new j(), this.onLoadRequiredStart = new j(), this.onLoadRequiredProgress = new j(), this.onLoadRequiredComplete = new j(), this.onBackgroundLoadStart = new j(), this.onBackgroundAssetLoaded = new j(), this.onBackgroundBundlesLoaded = new j(), 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, {
893
+ super(...e), this.id = "assets", this.onLoadStart = new j(), this.onLoadProgress = new j(), this.onLoadComplete = new j(), this.onLoadRequiredStart = new j(), this.onLoadRequiredProgress = new j(), this.onLoadRequiredComplete = new j(), this.onBackgroundLoadStart = new j(), this.onBackgroundAssetLoaded = new j(), this.onBackgroundBundlesLoaded = new j(), this._loadedBundles = /* @__PURE__ */ new Set(), this._loadedAssets = /* @__PURE__ */ new Set(), this._required = {}, this._background = {}, this._isLoadingRequired = !1, this.webRequiredStartEvent = new Event(w.REQUIRED_ASSETS_START, {
868
894
  bubbles: !0,
869
895
  cancelable: !1
870
- }), this.webRequiredProgressEvent = new CustomEvent(C.REQUIRED_ASSETS_PROGRESS, {
896
+ }), this.webRequiredProgressEvent = new CustomEvent(w.REQUIRED_ASSETS_PROGRESS, {
871
897
  bubbles: !0,
872
898
  cancelable: !1,
873
899
  detail: { progress: 0 }
874
- }), this.webRequiredCompleteEvent = new Event(C.REQUIRED_ASSETS_COMPLETE, {
900
+ }), this.webRequiredCompleteEvent = new Event(w.REQUIRED_ASSETS_COMPLETE, {
875
901
  bubbles: !0,
876
902
  cancelable: !1
877
- }), this.webStartEvent = new Event(C.ASSETS_START, {
903
+ }), this.webStartEvent = new Event(w.ASSETS_START, {
878
904
  bubbles: !0,
879
905
  cancelable: !1
880
- }), this.webProgressEvent = new CustomEvent(C.ASSETS_PROGRESS, {
906
+ }), this.webProgressEvent = new CustomEvent(w.ASSETS_PROGRESS, {
881
907
  bubbles: !0,
882
908
  cancelable: !1,
883
909
  detail: { progress: 0 }
884
- }), this.webCompleteEvent = new Event(C.ASSETS_COMPLETE, {
910
+ }), this.webCompleteEvent = new Event(w.ASSETS_COMPLETE, {
885
911
  bubbles: !0,
886
912
  cancelable: !1
887
913
  });
888
914
  }
889
915
  initialize(e) {
890
916
  e?.preload && (this._required = e.preload), e?.background && (this._background = e.background), t.setPreferences({
891
- ...ut,
917
+ ...vt,
892
918
  ...e?.assetPreferences
893
919
  });
894
920
  }
@@ -1031,7 +1057,7 @@ var ft = class extends N {
1031
1057
  throw Error("Error dispatching web event", { cause: e });
1032
1058
  }
1033
1059
  }
1034
- }, pt = class extends N {
1060
+ }, xt = class extends N {
1035
1061
  set isFullScreen(e) {
1036
1062
  this._isFullScreen = e, this.setFullScreen(e);
1037
1063
  }
@@ -1045,10 +1071,10 @@ var ft = class extends N {
1045
1071
  return this._fullScreenElement;
1046
1072
  }
1047
1073
  constructor() {
1048
- super(), this.id = "fullscreen", this.onFullScreenChange = new j(), this._isFullScreen = !1, this._fullScreenElement = null, this._driver = null, this._driverUnsubscribe = null, this._driverIsFullScreen = !1, g(this);
1074
+ super(), this.id = "fullscreen", this.onFullScreenChange = new j(), this._isFullScreen = !1, this._fullScreenElement = null, this._driver = null, this._driverUnsubscribe = null, this._driverIsFullScreen = !1, v(this);
1049
1075
  }
1050
1076
  get app() {
1051
- return Q.getInstance();
1077
+ return $.getInstance();
1052
1078
  }
1053
1079
  initialize() {
1054
1080
  this.listen(document, "fullscreenchange", this._onFullScreenChange), this.listen(document, "webkitfullscreenchange", this._onFullScreenChange), this.listen(document, "mozfullscreenchange", this._onFullScreenChange), this.listen(document, "msfullscreenchange", this._onFullScreenChange);
@@ -1066,7 +1092,7 @@ var ft = class extends N {
1066
1092
  e ? this._requestFullscreen() : this._exitFullscreen();
1067
1093
  }
1068
1094
  setFullScreenElement(e) {
1069
- e || S.warn("No element passed to setFullScreenElement for fullscreen mode"), this._fullScreenElement = e;
1095
+ e || C.warn("No element passed to setFullScreenElement for fullscreen mode"), this._fullScreenElement = e;
1070
1096
  }
1071
1097
  setFullscreenDriver(e) {
1072
1098
  this._unsubscribeDriver(), this._driver = e, this._driverIsFullScreen = !1, e?.subscribe && (this._driverUnsubscribe = e.subscribe(this._onDriverStateChange));
@@ -1076,7 +1102,7 @@ var ft = class extends N {
1076
1102
  }
1077
1103
  get canFullscreen() {
1078
1104
  if (this._driver) return this._driver.supported;
1079
- let e = this._fullScreenElement || Q.containerElement;
1105
+ let e = this._fullScreenElement || $.containerElement;
1080
1106
  if (!e) return !1;
1081
1107
  let t = e;
1082
1108
  return !!(t.requestFullscreen || t.webkitRequestFullscreen || t.msRequestFullscreen || t.mozRequestFullScreen);
@@ -1095,13 +1121,13 @@ var ft = class extends N {
1095
1121
  ];
1096
1122
  }
1097
1123
  _requestFullscreen() {
1098
- let e = this._fullScreenElement || Q.containerElement;
1124
+ let e = this._fullScreenElement || $.containerElement;
1099
1125
  if (!e) throw Error("No element available for fullscreen mode");
1100
1126
  let t = e;
1101
1127
  try {
1102
1128
  t.requestFullscreen ? t.requestFullscreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : t.mozRequestFullScreen && t.mozRequestFullScreen();
1103
1129
  } catch (e) {
1104
- S.error("Failed to request fullscreen:", e), this._isFullScreen = !1;
1130
+ C.error("Failed to request fullscreen:", e), this._isFullScreen = !1;
1105
1131
  }
1106
1132
  }
1107
1133
  _exitFullscreen() {
@@ -1117,10 +1143,10 @@ var ft = class extends N {
1117
1143
  try {
1118
1144
  let t = e();
1119
1145
  t && typeof t.catch == "function" && t.catch((e) => {
1120
- S.error("Fullscreen driver failed:", mt(e));
1146
+ C.error("Fullscreen driver failed:", St(e));
1121
1147
  });
1122
1148
  } catch (e) {
1123
- S.error("Fullscreen driver failed:", mt(e));
1149
+ C.error("Fullscreen driver failed:", St(e));
1124
1150
  }
1125
1151
  }
1126
1152
  _unsubscribeDriver() {
@@ -1128,11 +1154,11 @@ var ft = class extends N {
1128
1154
  if (this._driverUnsubscribe = null, e) try {
1129
1155
  e();
1130
1156
  } catch (e) {
1131
- S.error("Fullscreen driver unsubscribe failed:", e);
1157
+ C.error("Fullscreen driver unsubscribe failed:", e);
1132
1158
  }
1133
1159
  }
1134
1160
  };
1135
- function mt(e) {
1161
+ function St(e) {
1136
1162
  if (e instanceof Error) return e.message;
1137
1163
  if (typeof e == "string") return e;
1138
1164
  try {
@@ -1146,7 +1172,7 @@ function mt(e) {
1146
1172
  function F(e) {
1147
1173
  return e === void 0 ? e = "*undefined*" : e === " " ? e = "Space" : e.length === 1 && (e = e.toUpperCase()), e;
1148
1174
  }
1149
- var ht = class extends N {
1175
+ var Ct = class extends N {
1150
1176
  constructor(...e) {
1151
1177
  super(...e), this.id = "keyboard", this.onGlobalKeyDown = new j(), this.onGlobalKeyUp = new j(), this._keyDownSignals = /* @__PURE__ */ new Map(), this._keyUpSignals = /* @__PURE__ */ new Map(), this._keysDown = /* @__PURE__ */ new Set(), this._warnedNoConsumers = !1, this._enabled = !0;
1152
1178
  }
@@ -1191,7 +1217,7 @@ var ht = class extends N {
1191
1217
  }
1192
1218
  _handleKeyUp(e) {
1193
1219
  let t = F(e.key);
1194
- this._keysDown.delete(t), v && !this._warnedNoConsumers && this._keyUpSignals.size === 0 && this._keyDownSignals.size === 0 && (this._warnedNoConsumers = !0, S.warn("KeyboardPlugin received a key event but no consumers are connected, so keyboard actions will not fire. Ensure the InputPlugin controls are connected — e.g. an Application subclass overriding postInitialize() must not skip framework wiring, or call app.controls.connect().")), this.onGlobalKeyUp.emit({
1220
+ this._keysDown.delete(t), y && !this._warnedNoConsumers && this._keyUpSignals.size === 0 && this._keyDownSignals.size === 0 && (this._warnedNoConsumers = !0, C.warn("KeyboardPlugin received a key event but no consumers are connected, so keyboard actions will not fire. Ensure the InputPlugin controls are connected — e.g. an Application subclass overriding postInitialize() must not skip framework wiring, or call app.controls.connect().")), this.onGlobalKeyUp.emit({
1195
1221
  event: e,
1196
1222
  key: e.key
1197
1223
  });
@@ -1214,7 +1240,7 @@ var ht = class extends N {
1214
1240
  key: n
1215
1241
  });
1216
1242
  }
1217
- }, gt = class extends N {
1243
+ }, wt = class extends N {
1218
1244
  constructor(...e) {
1219
1245
  super(...e), this.id = "actions", this.onActionContextChanged = new j(), this.onActionDispatched = new j(), this._context = "default", this._signals = /* @__PURE__ */ new Map(), this._actions = {}, this._debug = !1;
1220
1246
  }
@@ -1241,7 +1267,7 @@ var ht = class extends N {
1241
1267
  }
1242
1268
  sendAction(e, t) {
1243
1269
  if (!this._actions[e]) {
1244
- this._debug && S.warn(`Action ${e} is not defined`);
1270
+ this._debug && C.warn(`Action ${e} is not defined`);
1245
1271
  return;
1246
1272
  }
1247
1273
  let n = this._actions[e].context;
@@ -1254,7 +1280,7 @@ var ht = class extends N {
1254
1280
  this.getAction(e).emit(n), this.onActionDispatched.emit(n);
1255
1281
  return;
1256
1282
  }
1257
- this._debug && S.warn(`Action ${e} is not allowed for context ${this.context}`);
1283
+ this._debug && C.warn(`Action ${e} is not allowed for context ${this.context}`);
1258
1284
  }
1259
1285
  setActionContext(e) {
1260
1286
  return this.context = e, this.context;
@@ -1270,19 +1296,19 @@ var ht = class extends N {
1270
1296
  getCoreSignals() {
1271
1297
  return ["onActionContextChanged", "onActionDispatched"];
1272
1298
  }
1273
- }, _t = {
1299
+ }, Tt = {
1274
1300
  default: "default",
1275
1301
  menu: "menu",
1276
1302
  pause: "pause",
1277
1303
  popup: "popup",
1278
1304
  game: "game"
1279
- }, vt = [
1305
+ }, Et = [
1280
1306
  "default",
1281
1307
  "menu",
1282
1308
  "pause",
1283
1309
  "popup",
1284
1310
  "game"
1285
- ], yt = [
1311
+ ], Dt = [
1286
1312
  "up",
1287
1313
  "down",
1288
1314
  "left",
@@ -1295,7 +1321,7 @@ var ht = class extends N {
1295
1321
  "menu",
1296
1322
  "back",
1297
1323
  "next"
1298
- ], bt = {
1324
+ ], Ot = {
1299
1325
  action: { context: "*" },
1300
1326
  back: { context: [
1301
1327
  "menu",
@@ -1332,10 +1358,10 @@ var ht = class extends N {
1332
1358
  pause: { context: "*" },
1333
1359
  unpause: { context: "*" },
1334
1360
  start: { context: "*" }
1335
- }, xt = { __default_do_not_use__: "__default_do_not_use__" };
1361
+ }, kt = { __default_do_not_use__: "__default_do_not_use__" };
1336
1362
  //#endregion
1337
1363
  //#region src/plugins/breakpoints/evaluate.ts
1338
- function St(e) {
1364
+ function At(e) {
1339
1365
  let t = Object.entries(e);
1340
1366
  if (t.length === 0) throw Error("[breakpoints] `tiers` is empty — declare at least one tier in caper.config.ts.");
1341
1367
  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.`);
@@ -1348,25 +1374,25 @@ function St(e) {
1348
1374
  byName: Object.fromEntries(n)
1349
1375
  };
1350
1376
  }
1351
- function Ct(e, t) {
1377
+ function jt(e, t) {
1352
1378
  let n = e.names[0];
1353
1379
  for (let r = 0; r < e.stops.length && !(t < e.stops[r]); r++) n = e.names[r];
1354
1380
  return n;
1355
1381
  }
1356
- var wt = /* @__PURE__ */ new Set();
1357
- function Tt(e, t) {
1358
- wt.has(e) || (wt.add(e), S.warn(t));
1382
+ var Mt = /* @__PURE__ */ new Set();
1383
+ function Nt(e, t) {
1384
+ Mt.has(e) || (Mt.add(e), C.warn(t));
1359
1385
  }
1360
1386
  function I(e, t) {
1361
1387
  if (typeof t == "number") return t;
1362
1388
  let n = e.byName[t];
1363
- return n === void 0 && Tt(`stop:${t}`, `[breakpoints] unknown tier '${t}' — known tiers: ${e.names.join(", ")}.`), n;
1389
+ return n === void 0 && Nt(`stop:${t}`, `[breakpoints] unknown tier '${t}' — known tiers: ${e.names.join(", ")}.`), n;
1364
1390
  }
1365
- function Et(e, t, n, r = "mode") {
1391
+ function Pt(e, t, n, r = "mode") {
1366
1392
  if (typeof t == "function") try {
1367
1393
  return t(e) === !0;
1368
1394
  } catch (e) {
1369
- return Tt(`predicate:${r}`, `[breakpoints] mode '${r}' threw; treating as false. ${String(e)}`), !1;
1395
+ return Nt(`predicate:${r}`, `[breakpoints] mode '${r}' threw; treating as false. ${String(e)}`), !1;
1370
1396
  }
1371
1397
  if (t.tier !== void 0 && !(Array.isArray(t.tier) ? t.tier : [t.tier]).includes(e.tier)) return !1;
1372
1398
  if (t.atLeast !== void 0) {
@@ -1385,21 +1411,21 @@ function L(e, t, n) {
1385
1411
  width: r,
1386
1412
  height: i,
1387
1413
  aspect: i === 0 ? 0 : r / i,
1388
- tier: Ct(t, r),
1414
+ tier: jt(t, r),
1389
1415
  orientation: r > i ? "landscape" : "portrait",
1390
1416
  pointer: n
1391
1417
  };
1392
1418
  }
1393
- function Dt(e, t, n) {
1419
+ function Ft(e, t, n) {
1394
1420
  let r = new Set([
1395
1421
  e.tier,
1396
1422
  e.orientation,
1397
1423
  e.pointer
1398
1424
  ]);
1399
- for (let [i, a] of t) Et(e, a, n, i) && r.add(i);
1425
+ for (let [i, a] of t) Pt(e, a, n, i) && r.add(i);
1400
1426
  return r;
1401
1427
  }
1402
- function Ot(e, t) {
1428
+ function It(e, t) {
1403
1429
  let n = [], r = [];
1404
1430
  for (let r of t) e.has(r) || n.push(r);
1405
1431
  for (let n of e) t.has(n) || r.push(n);
@@ -1408,7 +1434,7 @@ function Ot(e, t) {
1408
1434
  left: r
1409
1435
  };
1410
1436
  }
1411
- function kt(e, t, n) {
1437
+ function Lt(e, t, n) {
1412
1438
  let r = e.names.indexOf(t);
1413
1439
  for (let t = r; t >= 0; t--) {
1414
1440
  let r = n[e.names[t]];
@@ -1426,7 +1452,7 @@ var R = {
1426
1452
  tablet: 768,
1427
1453
  desktop: 1024,
1428
1454
  wide: 1440
1429
- }, At = new Set([
1455
+ }, Rt = new Set([
1430
1456
  "portrait",
1431
1457
  "landscape",
1432
1458
  "coarse",
@@ -1434,10 +1460,10 @@ var R = {
1434
1460
  ]), z = {
1435
1461
  width: 0,
1436
1462
  height: 0
1437
- }, jt = class extends N {
1463
+ }, zt = class extends N {
1438
1464
  constructor(...e) {
1439
1465
  super(...e), this.id = "breakpoints", this.onBreakpointChanged = new j(), 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) => {
1440
- let t = L(e ?? z, this._ladder, this._pointer), n = Dt(t, this._modes, this._ladder), { entered: r, left: i } = Ot(this._active, n), a = this._ctx.tier;
1466
+ let t = L(e ?? z, this._ladder, this._pointer), n = Ft(t, this._modes, this._ladder), { entered: r, left: i } = It(this._active, n), a = this._ctx.tier;
1441
1467
  if (this._ctx = t, this._active = n, !(r.length === 0 && i.length === 0)) {
1442
1468
  for (let e of i) this._leave.get(e)?.emit();
1443
1469
  for (let e of r) this._enter.get(e)?.emit();
@@ -1481,12 +1507,12 @@ var R = {
1481
1507
  return this._ctx.pointer;
1482
1508
  }
1483
1509
  async initialize(e = {}) {
1484
- this._ladder = St({ ...R }), this._ctx = L(z, this._ladder, this._pointer), this._options = {
1510
+ this._ladder = At({ ...R }), this._ctx = L(z, this._ladder, this._pointer), this._options = {
1485
1511
  tiers: e.tiers ?? { ...R },
1486
1512
  modes: e.modes ?? {}
1487
- }, this._ladder = St(this._options.tiers);
1513
+ }, this._ladder = At(this._options.tiers);
1488
1514
  for (let [e, t] of Object.entries(this._options.modes)) this._modes.set(e, t);
1489
- this._initPointer(), this._ctx = L(z, this._ladder, this._pointer), this._active = Dt(this._ctx, this._modes, this._ladder);
1515
+ this._initPointer(), this._ctx = L(z, this._ladder, this._pointer), this._active = Ft(this._ctx, this._modes, this._ladder);
1490
1516
  }
1491
1517
  async postInitialize(e) {
1492
1518
  this._evaluate(this.app.size ?? z), this.addSignalConnection(this.app.onResize.connect(this._evaluate, "highest"));
@@ -1498,7 +1524,7 @@ var R = {
1498
1524
  this._enter.clear(), this._leave.clear(), this.onBreakpointChanged.disconnectAll(), super.destroy();
1499
1525
  }
1500
1526
  is(e) {
1501
- return this._isKnown(e) ? this._active.has(e) : (S.warn(`[breakpoints] unknown name '${e}'. Known: ${this._knownNames().join(", ")}.`), !1);
1527
+ return this._isKnown(e) ? this._active.has(e) : (C.warn(`[breakpoints] unknown name '${e}'. Known: ${this._knownNames().join(", ")}.`), !1);
1502
1528
  }
1503
1529
  atLeast(e) {
1504
1530
  let t = I(this._ladder, e);
@@ -1512,10 +1538,10 @@ var R = {
1512
1538
  return this.atLeast(e) && this.below(t);
1513
1539
  }
1514
1540
  matches(e) {
1515
- return Et(this._ctx, e, this._ladder);
1541
+ return Pt(this._ctx, e, this._ladder);
1516
1542
  }
1517
1543
  value(e) {
1518
- return kt(this._ladder, this._ctx.tier, e);
1544
+ return Lt(this._ladder, this._ctx.tier, e);
1519
1545
  }
1520
1546
  define(e, t) {
1521
1547
  this._modes.set(e, t), this._evaluate(this.size);
@@ -1547,19 +1573,19 @@ var R = {
1547
1573
  return n || (n = new j(), e.set(t, n)), n;
1548
1574
  }
1549
1575
  _isKnown(e) {
1550
- return e in this._ladder.byName || this._modes.has(e) || At.has(e);
1576
+ return e in this._ladder.byName || this._modes.has(e) || Rt.has(e);
1551
1577
  }
1552
1578
  _warnIfUnknown(e) {
1553
- this._isKnown(e) || this._warnedListenerNames.has(e) || (this._warnedListenerNames.add(e), S.warn(`[breakpoints] unknown name '${e}'. Known: ${this._knownNames().join(", ")}.`));
1579
+ this._isKnown(e) || this._warnedListenerNames.has(e) || (this._warnedListenerNames.add(e), C.warn(`[breakpoints] unknown name '${e}'. Known: ${this._knownNames().join(", ")}.`));
1554
1580
  }
1555
1581
  _knownNames() {
1556
1582
  return [
1557
1583
  ...this._ladder.names,
1558
1584
  ...this._modes.keys(),
1559
- ...At
1585
+ ...Rt
1560
1586
  ];
1561
1587
  }
1562
- }, Mt = class {
1588
+ }, Bt = class {
1563
1589
  constructor(e, t) {
1564
1590
  this.name = e, this.manager = t, this._sounds = /* @__PURE__ */ new Map(), this._muted = !1, this._volume = 1, this.muted = this.manager.muted;
1565
1591
  }
@@ -1607,7 +1633,7 @@ var R = {
1607
1633
  try {
1608
1634
  e.pause();
1609
1635
  } catch (t) {
1610
- S.error("Error pausing sound", e.id, t);
1636
+ C.error("Error pausing sound", e.id, t);
1611
1637
  }
1612
1638
  });
1613
1639
  });
@@ -1618,7 +1644,7 @@ var R = {
1618
1644
  try {
1619
1645
  e.resume();
1620
1646
  } catch (t) {
1621
- S.error("Error resuming sound", e.id, t);
1647
+ C.error("Error resuming sound", e.id, t);
1622
1648
  }
1623
1649
  });
1624
1650
  });
@@ -1650,9 +1676,9 @@ var R = {
1650
1676
  [...e].forEach((e) => e.destroy());
1651
1677
  }), this._sounds.clear();
1652
1678
  }
1653
- }, Nt = class {
1679
+ }, B = class {
1654
1680
  constructor(e, t, n) {
1655
- this.id = e, this.channel = t, this.manager = n, this.onStart = new j(), this.onStop = new j(), this.onEnd = new j(), this.onPaused = new j(), this.onResumed = new j(), this.onProgress = new j(), this._volume = 1, this._muted = !1, this._isPlaying = !1, g(this), this.muted = this.channel.muted;
1681
+ this.id = e, this.channel = t, this.manager = n, this.onStart = new j(), this.onStop = new j(), this.onEnd = new j(), this.onPaused = new j(), this.onResumed = new j(), this.onProgress = new j(), this._volume = 1, this._muted = !1, this._isPlaying = !1, v(this), this.muted = this.channel.muted;
1656
1682
  }
1657
1683
  get media() {
1658
1684
  return this._media;
@@ -1707,7 +1733,7 @@ var R = {
1707
1733
  this.stop(), this.removeListeners();
1708
1734
  }
1709
1735
  fadeTo(e, t) {
1710
- return p.to(this.media, {
1736
+ return m.to(this.media, {
1711
1737
  volume: e,
1712
1738
  duration: t
1713
1739
  });
@@ -1733,16 +1759,16 @@ var R = {
1733
1759
  _handleMediaResumed() {
1734
1760
  this._isPlaying = !0, this.onResumed.emit(this);
1735
1761
  }
1736
- }, Pt;
1737
- function Ft(e) {
1738
- return Pt = e, e;
1762
+ }, Vt;
1763
+ function Ht(e) {
1764
+ return Vt = e, e;
1739
1765
  }
1740
- function B() {
1741
- return Pt;
1766
+ function V() {
1767
+ return Vt;
1742
1768
  }
1743
1769
  //#endregion
1744
1770
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/filters/Filter.mjs
1745
- var It = class {
1771
+ var Ut = class {
1746
1772
  constructor(e, t) {
1747
1773
  this.init(e, t);
1748
1774
  }
@@ -1758,71 +1784,71 @@ var It = class {
1758
1784
  destroy() {
1759
1785
  this.disconnect(), this.destination = null, this.source = null;
1760
1786
  }
1761
- }, V = class {
1787
+ }, H = class {
1762
1788
  static setParamValue(e, t) {
1763
1789
  if (e.setValueAtTime) {
1764
- let n = B().context;
1790
+ let n = V().context;
1765
1791
  e.setValueAtTime(t, n.audioContext.currentTime);
1766
1792
  } else e.value = t;
1767
1793
  return t;
1768
1794
  }
1769
- }, H = class extends It {
1795
+ }, U = class extends Ut {
1770
1796
  constructor(e = 0, t = 0, n = 0, r = 0, i = 0, a = 0, o = 0, s = 0, c = 0, l = 0) {
1771
1797
  let u = [], d = [
1772
1798
  {
1773
- f: H.F32,
1799
+ f: U.F32,
1774
1800
  type: "lowshelf",
1775
1801
  gain: e
1776
1802
  },
1777
1803
  {
1778
- f: H.F64,
1804
+ f: U.F64,
1779
1805
  type: "peaking",
1780
1806
  gain: t
1781
1807
  },
1782
1808
  {
1783
- f: H.F125,
1809
+ f: U.F125,
1784
1810
  type: "peaking",
1785
1811
  gain: n
1786
1812
  },
1787
1813
  {
1788
- f: H.F250,
1814
+ f: U.F250,
1789
1815
  type: "peaking",
1790
1816
  gain: r
1791
1817
  },
1792
1818
  {
1793
- f: H.F500,
1819
+ f: U.F500,
1794
1820
  type: "peaking",
1795
1821
  gain: i
1796
1822
  },
1797
1823
  {
1798
- f: H.F1K,
1824
+ f: U.F1K,
1799
1825
  type: "peaking",
1800
1826
  gain: a
1801
1827
  },
1802
1828
  {
1803
- f: H.F2K,
1829
+ f: U.F2K,
1804
1830
  type: "peaking",
1805
1831
  gain: o
1806
1832
  },
1807
1833
  {
1808
- f: H.F4K,
1834
+ f: U.F4K,
1809
1835
  type: "peaking",
1810
1836
  gain: s
1811
1837
  },
1812
1838
  {
1813
- f: H.F8K,
1839
+ f: U.F8K,
1814
1840
  type: "peaking",
1815
1841
  gain: c
1816
1842
  },
1817
1843
  {
1818
- f: H.F16K,
1844
+ f: U.F16K,
1819
1845
  type: "highshelf",
1820
1846
  gain: l
1821
1847
  }
1822
1848
  ];
1823
- B().useLegacy || (u = d.map((e) => {
1824
- let t = B().context.audioContext.createBiquadFilter();
1825
- return t.type = e.type, V.setParamValue(t.Q, 1), t.frequency.value = e.f, V.setParamValue(t.gain, e.gain), t;
1849
+ V().useLegacy || (u = d.map((e) => {
1850
+ let t = V().context.audioContext.createBiquadFilter();
1851
+ return t.type = e.type, H.setParamValue(t.Q, 1), t.frequency.value = e.f, H.setParamValue(t.gain, e.gain), t;
1826
1852
  })), super(u[0], u[u.length - 1]), this.bands = u, this.bandsMap = {};
1827
1853
  for (let e = 0; e < this.bands.length; e++) {
1828
1854
  let t = this.bands[e];
@@ -1831,75 +1857,75 @@ var It = class {
1831
1857
  }
1832
1858
  setGain(e, t = 0) {
1833
1859
  if (!this.bandsMap[e]) throw Error(`No band found for frequency ${e}`);
1834
- V.setParamValue(this.bandsMap[e].gain, t);
1860
+ H.setParamValue(this.bandsMap[e].gain, t);
1835
1861
  }
1836
1862
  getGain(e) {
1837
1863
  if (!this.bandsMap[e]) throw Error(`No band found for frequency ${e}`);
1838
1864
  return this.bandsMap[e].gain.value;
1839
1865
  }
1840
1866
  set f32(e) {
1841
- this.setGain(H.F32, e);
1867
+ this.setGain(U.F32, e);
1842
1868
  }
1843
1869
  get f32() {
1844
- return this.getGain(H.F32);
1870
+ return this.getGain(U.F32);
1845
1871
  }
1846
1872
  set f64(e) {
1847
- this.setGain(H.F64, e);
1873
+ this.setGain(U.F64, e);
1848
1874
  }
1849
1875
  get f64() {
1850
- return this.getGain(H.F64);
1876
+ return this.getGain(U.F64);
1851
1877
  }
1852
1878
  set f125(e) {
1853
- this.setGain(H.F125, e);
1879
+ this.setGain(U.F125, e);
1854
1880
  }
1855
1881
  get f125() {
1856
- return this.getGain(H.F125);
1882
+ return this.getGain(U.F125);
1857
1883
  }
1858
1884
  set f250(e) {
1859
- this.setGain(H.F250, e);
1885
+ this.setGain(U.F250, e);
1860
1886
  }
1861
1887
  get f250() {
1862
- return this.getGain(H.F250);
1888
+ return this.getGain(U.F250);
1863
1889
  }
1864
1890
  set f500(e) {
1865
- this.setGain(H.F500, e);
1891
+ this.setGain(U.F500, e);
1866
1892
  }
1867
1893
  get f500() {
1868
- return this.getGain(H.F500);
1894
+ return this.getGain(U.F500);
1869
1895
  }
1870
1896
  set f1k(e) {
1871
- this.setGain(H.F1K, e);
1897
+ this.setGain(U.F1K, e);
1872
1898
  }
1873
1899
  get f1k() {
1874
- return this.getGain(H.F1K);
1900
+ return this.getGain(U.F1K);
1875
1901
  }
1876
1902
  set f2k(e) {
1877
- this.setGain(H.F2K, e);
1903
+ this.setGain(U.F2K, e);
1878
1904
  }
1879
1905
  get f2k() {
1880
- return this.getGain(H.F2K);
1906
+ return this.getGain(U.F2K);
1881
1907
  }
1882
1908
  set f4k(e) {
1883
- this.setGain(H.F4K, e);
1909
+ this.setGain(U.F4K, e);
1884
1910
  }
1885
1911
  get f4k() {
1886
- return this.getGain(H.F4K);
1912
+ return this.getGain(U.F4K);
1887
1913
  }
1888
1914
  set f8k(e) {
1889
- this.setGain(H.F8K, e);
1915
+ this.setGain(U.F8K, e);
1890
1916
  }
1891
1917
  get f8k() {
1892
- return this.getGain(H.F8K);
1918
+ return this.getGain(U.F8K);
1893
1919
  }
1894
1920
  set f16k(e) {
1895
- this.setGain(H.F16K, e);
1921
+ this.setGain(U.F16K, e);
1896
1922
  }
1897
1923
  get f16k() {
1898
- return this.getGain(H.F16K);
1924
+ return this.getGain(U.F16K);
1899
1925
  }
1900
1926
  reset() {
1901
1927
  this.bands.forEach((e) => {
1902
- V.setParamValue(e.gain, 0);
1928
+ H.setParamValue(e.gain, 0);
1903
1929
  });
1904
1930
  }
1905
1931
  destroy() {
@@ -1907,11 +1933,11 @@ var It = class {
1907
1933
  e.disconnect();
1908
1934
  }), this.bands = null, this.bandsMap = null;
1909
1935
  }
1910
- }, U = H;
1911
- U.F32 = 32, U.F64 = 64, U.F125 = 125, U.F250 = 250, U.F500 = 500, U.F1K = 1e3, U.F2K = 2e3, U.F4K = 4e3, U.F8K = 8e3, U.F16K = 16e3;
1936
+ }, W = U;
1937
+ W.F32 = 32, W.F64 = 64, W.F125 = 125, W.F250 = 250, W.F500 = 500, W.F1K = 1e3, W.F2K = 2e3, W.F4K = 4e3, W.F8K = 8e3, W.F16K = 16e3;
1912
1938
  //#endregion
1913
1939
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/htmlaudio/HTMLAudioContext.mjs
1914
- var Lt = class extends i {
1940
+ var Wt = class extends i {
1915
1941
  constructor() {
1916
1942
  super(...arguments), this.speed = 1, this.muted = !1, this.volume = 1, this.paused = !1;
1917
1943
  }
@@ -1939,9 +1965,9 @@ var Lt = class extends i {
1939
1965
  destroy() {
1940
1966
  this.removeAllListeners();
1941
1967
  }
1942
- }, Rt = 0, zt = class extends i {
1968
+ }, Gt = 0, Kt = class extends i {
1943
1969
  constructor(e) {
1944
- super(), this.id = Rt++, this.init(e);
1970
+ super(), this.id = Gt++, this.init(e);
1945
1971
  }
1946
1972
  set(e, t) {
1947
1973
  if (this[e] === void 0) throw Error(`Property with name ${e} does not exist.`);
@@ -2039,7 +2065,7 @@ var Lt = class extends i {
2039
2065
  }
2040
2066
  play(e) {
2041
2067
  let { start: t, end: n, speed: r, loop: i, volume: a, muted: o } = e;
2042
- n && console.assert(n > t, "End time is before start time"), this._speed = r, this._volume = a, this._loop = !!i, this._muted = o, this.refresh(), this.loop && n !== null && (console.warn("Looping not support when specifying an \"end\" time"), this.loop = !1), this._start = t, this._end = n || this._duration, this._start = Math.max(0, this._start - zt.PADDING), this._end = Math.min(this._end + zt.PADDING, this._duration), this._source.onloadedmetadata = () => {
2068
+ n && console.assert(n > t, "End time is before start time"), this._speed = r, this._volume = a, this._loop = !!i, this._muted = o, this.refresh(), this.loop && n !== null && (console.warn("Looping not support when specifying an \"end\" time"), this.loop = !1), this._start = t, this._end = n || this._duration, this._start = Math.max(0, this._start - Kt.PADDING), this._end = Math.min(this._end + Kt.PADDING, this._duration), this._source.onloadedmetadata = () => {
2043
2069
  this._source && (this._source.currentTime = t, this._source.onloadedmetadata = null, this.emit("progress", t / this._duration, this._duration), d.shared.add(this._onUpdate, this));
2044
2070
  }, this._source.onended = this._onComplete.bind(this), this._source.play(), this.emit("start");
2045
2071
  }
@@ -2057,16 +2083,16 @@ var Lt = class extends i {
2057
2083
  toString() {
2058
2084
  return `[HTMLAudioInstance id=${this.id}]`;
2059
2085
  }
2060
- }, Bt = zt;
2061
- Bt.PADDING = .1;
2086
+ }, qt = Kt;
2087
+ qt.PADDING = .1;
2062
2088
  //#endregion
2063
2089
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/htmlaudio/HTMLAudioMedia.mjs
2064
- var Vt = class extends i {
2090
+ var Jt = class extends i {
2065
2091
  init(e) {
2066
2092
  this.parent = e, this._source = e.options.source || new Audio(), e.url && (this._source.src = e.url);
2067
2093
  }
2068
2094
  create() {
2069
- return new Bt(this);
2095
+ return new qt(this);
2070
2096
  }
2071
2097
  get isPlayable() {
2072
2098
  return !!this._source && this._source.readyState === 4;
@@ -2119,7 +2145,7 @@ var Vt = class extends i {
2119
2145
  };
2120
2146
  t.addEventListener("canplaythrough", r, !1), t.addEventListener("load", r, !1), t.addEventListener("abort", i, !1), t.addEventListener("error", a, !1), t.load();
2121
2147
  }
2122
- }, Ht = class {
2148
+ }, Yt = class {
2123
2149
  constructor(e, t) {
2124
2150
  this.parent = e, Object.assign(this, t), this.duration = this.end - this.start, console.assert(this.duration > 0, "End time must be after start time");
2125
2151
  }
@@ -2135,7 +2161,7 @@ var Vt = class extends i {
2135
2161
  destroy() {
2136
2162
  this.parent = null;
2137
2163
  }
2138
- }, W = [
2164
+ }, G = [
2139
2165
  "ogg",
2140
2166
  "oga",
2141
2167
  "opus",
@@ -2147,8 +2173,8 @@ var Vt = class extends i {
2147
2173
  "wma",
2148
2174
  "mid",
2149
2175
  "caf"
2150
- ], Ut = ["audio/mpeg", "audio/ogg"], G = {};
2151
- function Wt(e) {
2176
+ ], Xt = ["audio/mpeg", "audio/ogg"], K = {};
2177
+ function Zt(e) {
2152
2178
  let t = {
2153
2179
  m4a: "audio/mp4",
2154
2180
  oga: "audio/ogg",
@@ -2156,17 +2182,17 @@ function Wt(e) {
2156
2182
  caf: "audio/x-caf; codecs=\"opus\"",
2157
2183
  ...e || {}
2158
2184
  }, n = document.createElement("audio"), r = {}, i = /^no$/;
2159
- W.forEach((e) => {
2185
+ G.forEach((e) => {
2160
2186
  let a = n.canPlayType(`audio/${e}`).replace(i, ""), o = t[e] ? n.canPlayType(t[e]).replace(i, "") : "";
2161
2187
  r[e] = !!a || !!o;
2162
- }), Object.assign(G, r);
2188
+ }), Object.assign(K, r);
2163
2189
  }
2164
- Wt();
2190
+ Zt();
2165
2191
  //#endregion
2166
2192
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/webaudio/WebAudioInstance.mjs
2167
- var Gt = 0, Kt = class extends i {
2193
+ var Qt = 0, $t = class extends i {
2168
2194
  constructor(e) {
2169
- super(), this.id = Gt++, this._media = null, this._paused = !1, this._muted = !1, this._elapsed = 0, this.init(e);
2195
+ super(), this.id = Qt++, this._media = null, this._paused = !1, this._muted = !1, this._elapsed = 0, this.init(e);
2170
2196
  }
2171
2197
  set(e, t) {
2172
2198
  if (this[e] === void 0) throw Error(`Property with name ${e} does not exist.`);
@@ -2227,7 +2253,7 @@ var Gt = 0, Kt = class extends i {
2227
2253
  let e = this._media.context, t = this._media.parent;
2228
2254
  this._source.loop = this._loop || t.loop;
2229
2255
  let n = e.volume * +!e.muted, r = t.volume * +!t.muted, i = this._volume * +!this._muted;
2230
- V.setParamValue(this._gain.gain, i * r * n), V.setParamValue(this._source.playbackRate, this._speed * t.speed * e.speed), this.applyFilters();
2256
+ H.setParamValue(this._gain.gain, i * r * n), H.setParamValue(this._source.playbackRate, this._speed * t.speed * e.speed), this.applyFilters();
2231
2257
  }
2232
2258
  applyFilters() {
2233
2259
  if (this._filters?.length) {
@@ -2318,7 +2344,7 @@ var Gt = 0, Kt = class extends i {
2318
2344
  }
2319
2345
  this._source = null, this._progress = 1, this.emit("progress", 1, this._duration), this.emit("end", this);
2320
2346
  }
2321
- }, qt = class {
2347
+ }, en = class {
2322
2348
  constructor(e, t) {
2323
2349
  this._output = t, this._input = e;
2324
2350
  }
@@ -2342,20 +2368,20 @@ var Gt = 0, Kt = class extends i {
2342
2368
  destroy() {
2343
2369
  this.filters = null, this._input = null, this._output = null;
2344
2370
  }
2345
- }, Jt = class extends qt {
2371
+ }, tn = class extends en {
2346
2372
  constructor(e) {
2347
2373
  let t = e.audioContext, n = t.createBufferSource(), r = t.createGain(), i = t.createAnalyser();
2348
2374
  n.connect(i), i.connect(r), r.connect(e.destination), super(i, r), this.context = e, this.bufferSource = n, this.gain = r, this.analyser = i;
2349
2375
  }
2350
2376
  get script() {
2351
- return this._script || (this._script = this.context.audioContext.createScriptProcessor(Jt.BUFFER_SIZE), this._script.connect(this.context.destination)), this._script;
2377
+ return this._script || (this._script = this.context.audioContext.createScriptProcessor(tn.BUFFER_SIZE), this._script.connect(this.context.destination)), this._script;
2352
2378
  }
2353
2379
  destroy() {
2354
2380
  super.destroy(), this.bufferSource.disconnect(), this._script && this._script.disconnect(), this.gain.disconnect(), this.analyser.disconnect(), this.bufferSource = null, this._script = null, this.gain = null, this.analyser = null, this.context = null;
2355
2381
  }
2356
2382
  cloneBufferSource() {
2357
2383
  let e = this.bufferSource, t = this.context.audioContext.createBufferSource();
2358
- t.buffer = e.buffer, V.setParamValue(t.playbackRate, e.playbackRate.value), t.loop = e.loop;
2384
+ t.buffer = e.buffer, H.setParamValue(t.playbackRate, e.playbackRate.value), t.loop = e.loop;
2359
2385
  let n = this.context.audioContext.createGain();
2360
2386
  return t.connect(n), n.connect(this.destination), {
2361
2387
  source: t,
@@ -2365,13 +2391,13 @@ var Gt = 0, Kt = class extends i {
2365
2391
  get bufferSize() {
2366
2392
  return this.script.bufferSize;
2367
2393
  }
2368
- }, Yt = Jt;
2369
- Yt.BUFFER_SIZE = 0;
2394
+ }, nn = tn;
2395
+ nn.BUFFER_SIZE = 0;
2370
2396
  //#endregion
2371
2397
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/webaudio/WebAudioMedia.mjs
2372
- var Xt = class {
2398
+ var rn = class {
2373
2399
  init(e) {
2374
- this.parent = e, this._nodes = new Yt(this.context), this._source = this._nodes.bufferSource, this.source = e.options.source;
2400
+ this.parent = e, this._nodes = new nn(this.context), this._source = this._nodes.bufferSource, this.source = e.options.source;
2375
2401
  }
2376
2402
  destroy() {
2377
2403
  this.parent = null, this._nodes.destroy(), this._nodes = null;
@@ -2383,7 +2409,7 @@ var Xt = class {
2383
2409
  this._source = null, this.source = null;
2384
2410
  }
2385
2411
  create() {
2386
- return new Kt(this);
2412
+ return new $t(this);
2387
2413
  }
2388
2414
  get context() {
2389
2415
  return this.parent.context;
@@ -2427,7 +2453,7 @@ var Xt = class {
2427
2453
  };
2428
2454
  e instanceof AudioBuffer ? n(null, e) : this.parent.context.decode(e, n);
2429
2455
  }
2430
- }, K = class {
2456
+ }, q = class {
2431
2457
  static from(e) {
2432
2458
  let t = {};
2433
2459
  return typeof e == "string" ? t.url = e : e instanceof ArrayBuffer || e instanceof AudioBuffer || e instanceof HTMLAudioElement ? t.source = e : Array.isArray(e) ? t.url = e : t = e, t = {
@@ -2442,7 +2468,7 @@ var Xt = class {
2442
2468
  loaded: null,
2443
2469
  loop: !1,
2444
2470
  ...t
2445
- }, Object.freeze(t), new K(B().useLegacy ? new Vt() : new Xt(), t);
2471
+ }, Object.freeze(t), new q(V().useLegacy ? new Jt() : new rn(), t);
2446
2472
  }
2447
2473
  constructor(e, t) {
2448
2474
  this.media = e, this.options = t, this._instances = [], this._sprites = {}, this.media.init(this);
@@ -2452,13 +2478,13 @@ var Xt = class {
2452
2478
  preferUrl(e) {
2453
2479
  let [t] = e.map((e) => ({
2454
2480
  url: e,
2455
- ext: f.extname(e).slice(1)
2456
- })).filter(({ ext: e }) => G[e]).sort((e, t) => W.indexOf(e.ext) - W.indexOf(t.ext));
2481
+ ext: p.extname(e).slice(1)
2482
+ })).filter(({ ext: e }) => K[e]).sort((e, t) => G.indexOf(e.ext) - G.indexOf(t.ext));
2457
2483
  if (!t) throw Error("No supported file type found");
2458
2484
  return t.url;
2459
2485
  }
2460
2486
  get context() {
2461
- return B().context;
2487
+ return V().context;
2462
2488
  }
2463
2489
  pause() {
2464
2490
  return this.isPlaying = !1, this.paused = !0, this;
@@ -2491,7 +2517,7 @@ var Xt = class {
2491
2517
  return t;
2492
2518
  }
2493
2519
  console.assert(!this._sprites[e], `Alias ${e} is already taken`);
2494
- let n = new Ht(this, t);
2520
+ let n = new Yt(this, t);
2495
2521
  return this._sprites[e] = n, n;
2496
2522
  }
2497
2523
  destroy() {
@@ -2607,20 +2633,20 @@ var Xt = class {
2607
2633
  this._poolInstance(e);
2608
2634
  }
2609
2635
  _createInstance() {
2610
- if (K._pool.length > 0) {
2611
- let e = K._pool.pop();
2636
+ if (q._pool.length > 0) {
2637
+ let e = q._pool.pop();
2612
2638
  return e.init(this.media), e;
2613
2639
  }
2614
2640
  return this.media.create();
2615
2641
  }
2616
2642
  _poolInstance(e) {
2617
- e.destroy(), K._pool.indexOf(e) < 0 && K._pool.push(e);
2643
+ e.destroy(), q._pool.indexOf(e) < 0 && q._pool.push(e);
2618
2644
  }
2619
- }, q = K;
2620
- q._pool = [];
2645
+ }, J = q;
2646
+ J._pool = [];
2621
2647
  //#endregion
2622
2648
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/webaudio/WebAudioContext.mjs
2623
- var Zt = class e extends qt {
2649
+ var an = class e extends en {
2624
2650
  constructor() {
2625
2651
  let t = window, n = new e.AudioContext(), r = n.createDynamicsCompressor(), a = n.createAnalyser();
2626
2652
  a.connect(r), r.connect(n.destination), super(a, r), this.autoPause = !0, this._ctx = n, this._offlineCtx = new e.OfflineAudioContext(1, 2, t.OfflineAudioContext ? Math.max(8e3, Math.min(96e3, n.sampleRate)) : 44100), this.compressor = r, this.analyser = a, this.events = new i(), this.volume = 1, this.speed = 1, this.muted = !1, this.paused = !1, this._locked = n.state === "suspended" && ("ontouchstart" in globalThis || "onclick" in globalThis), this._locked && (this._unlock(), this._unlock = this._unlock.bind(this), document.addEventListener("mousedown", this._unlock, !0), document.addEventListener("touchstart", this._unlock, !0), document.addEventListener("touchend", this._unlock, !0)), this.onFocus = this.onFocus.bind(this), this.onBlur = this.onBlur.bind(this), globalThis.addEventListener("focus", this.onFocus), globalThis.addEventListener("blur", this.onBlur);
@@ -2685,12 +2711,12 @@ var Zt = class e extends qt {
2685
2711
  }, n);
2686
2712
  r && r.catch(n);
2687
2713
  }
2688
- }, Qt = class {
2714
+ }, on = class {
2689
2715
  constructor() {
2690
2716
  this.init();
2691
2717
  }
2692
2718
  init() {
2693
- return this.supported && (this._webAudioContext = new Zt()), this._htmlAudioContext = new Lt(), this._sounds = {}, this.useLegacy = !this.supported, this;
2719
+ return this.supported && (this._webAudioContext = new an()), this._htmlAudioContext = new Wt(), this._sounds = {}, this.useLegacy = !this.supported, this;
2694
2720
  }
2695
2721
  get context() {
2696
2722
  return this._context;
@@ -2702,7 +2728,7 @@ var Zt = class e extends qt {
2702
2728
  this.useLegacy || (this._context.filters = e);
2703
2729
  }
2704
2730
  get supported() {
2705
- return Zt.AudioContext !== null;
2731
+ return an.AudioContext !== null;
2706
2732
  }
2707
2733
  add(e, t) {
2708
2734
  if (typeof e == "object") {
@@ -2713,8 +2739,8 @@ var Zt = class e extends qt {
2713
2739
  }
2714
2740
  return n;
2715
2741
  }
2716
- if (console.assert(!this._sounds[e], `Sound with alias ${e} already exists.`), t instanceof q) return this._sounds[e] = t, t;
2717
- let n = this._getOptions(t), r = q.from(n);
2742
+ if (console.assert(!this._sounds[e], `Sound with alias ${e} already exists.`), t instanceof J) return this._sounds[e] = t, t;
2743
+ let n = this._getOptions(t), r = J.from(n);
2718
2744
  return this._sounds[e] = r, r;
2719
2745
  }
2720
2746
  _getOptions(e, t) {
@@ -2814,14 +2840,14 @@ var Zt = class e extends qt {
2814
2840
  close() {
2815
2841
  return this.removeAll(), this._sounds = null, this._webAudioContext &&= (this._webAudioContext.destroy(), null), this._htmlAudioContext &&= (this._htmlAudioContext.destroy(), null), this._context = null, this;
2816
2842
  }
2817
- }, $t = (e) => {
2843
+ }, sn = (e) => {
2818
2844
  let t = e.src, n = e?.alias?.[0];
2819
- return (!n || e.src === n) && (n = f.basename(t, f.extname(t))), n;
2820
- }, en = {
2845
+ return (!n || e.src === n) && (n = p.basename(t, p.extname(t))), n;
2846
+ }, cn = {
2821
2847
  extension: a.Asset,
2822
2848
  detection: {
2823
2849
  test: async () => !0,
2824
- add: async (e) => [...e, ...W.filter((e) => G[e])],
2850
+ add: async (e) => [...e, ...G.filter((e) => K[e])],
2825
2851
  remove: async (e) => e.filter((t) => e.includes(t))
2826
2852
  },
2827
2853
  loader: {
@@ -2831,10 +2857,10 @@ var Zt = class e extends qt {
2831
2857
  priority: s.High
2832
2858
  },
2833
2859
  test(e) {
2834
- return !!G[f.extname(e).slice(1)] || Ut.some((t) => e.startsWith(`data:${t}`));
2860
+ return !!K[p.extname(e).slice(1)] || Xt.some((t) => e.startsWith(`data:${t}`));
2835
2861
  },
2836
2862
  async load(e, t) {
2837
- let n = await new Promise((n, r) => q.from({
2863
+ let n = await new Promise((n, r) => J.from({
2838
2864
  ...t.data,
2839
2865
  url: e,
2840
2866
  preload: !0,
@@ -2842,20 +2868,20 @@ var Zt = class e extends qt {
2842
2868
  e ? r(e) : n(i), t.data?.loaded?.(e, i);
2843
2869
  }
2844
2870
  }));
2845
- return B().add($t(t), n), n;
2871
+ return V().add(sn(t), n), n;
2846
2872
  },
2847
2873
  async unload(e, t) {
2848
- B().remove($t(t));
2874
+ V().remove(sn(t));
2849
2875
  }
2850
2876
  }
2851
2877
  };
2852
- ee.add(en);
2878
+ ee.add(cn);
2853
2879
  //#endregion
2854
2880
  //#region ../../node_modules/.pnpm/@pixi+sound@6.0.1_pixi.js@8.22.0/node_modules/@pixi/sound/lib/index.mjs
2855
- var J = Ft(new Qt());
2881
+ var Y = Ht(new on());
2856
2882
  //#endregion
2857
2883
  //#region src/plugins/audio/AudioManagerPlugin.ts
2858
- J.add = function(e, t) {
2884
+ Y.add = function(e, t) {
2859
2885
  if (typeof e == "object") {
2860
2886
  let n = {};
2861
2887
  for (let r in e) {
@@ -2864,16 +2890,16 @@ J.add = function(e, t) {
2864
2890
  }
2865
2891
  return n;
2866
2892
  }
2867
- if (t instanceof q) return this._sounds[e] = t, t;
2868
- let n = this._getOptions(t), r = q.from(n);
2893
+ if (t instanceof J) return this._sounds[e] = t, t;
2894
+ let n = this._getOptions(t), r = J.from(n);
2869
2895
  return this._sounds[e] = r, r;
2870
2896
  };
2871
- var tn = class extends N {
2897
+ var ln = class extends N {
2872
2898
  constructor(e = "audio") {
2873
2899
  super(e), this.onSoundStarted = new j(), this.onSoundEnded = new j(), this.onMuted = new j(), this.onMasterVolumeChanged = new j(), this.onChannelVolumeChanged = new j(), this.onChannelMuted = new j(), 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");
2874
2900
  }
2875
2901
  get audioContext() {
2876
- return J.context?.audioContext;
2902
+ return Y.context?.audioContext;
2877
2903
  }
2878
2904
  get masterVolume() {
2879
2905
  return this._masterVolume;
@@ -2908,11 +2934,11 @@ var tn = class extends N {
2908
2934
  }), this._channels.clear(), this.onSoundStarted.disconnectAll(), this.onSoundEnded.disconnectAll(), this.onMuted.disconnectAll(), this.onMasterVolumeChanged.disconnectAll(), this.onChannelVolumeChanged.disconnectAll(), this.onChannelMuted.disconnectAll(), super.destroy();
2909
2935
  }
2910
2936
  initialize(e, t) {
2911
- return J.disableAutoPause = !0, typeof t?.manifest == "object" && this.addAllFromManifest(t.manifest), Promise.resolve();
2937
+ return Y.disableAutoPause = !0, typeof t?.manifest == "object" && this.addAllFromManifest(t.manifest), Promise.resolve();
2912
2938
  }
2913
2939
  createChannel(e) {
2914
2940
  if (this._channels.has(e)) throw Error(`Channel with name ${e} already exists.`);
2915
- let t = new Mt(e, this);
2941
+ let t = new Bt(e, this);
2916
2942
  this._channels.set(e, t);
2917
2943
  }
2918
2944
  setChannelVolume(e, t) {
@@ -2962,8 +2988,8 @@ var tn = class extends N {
2962
2988
  if (Array.isArray(e.alias) || (t = [e.alias]), !t) return;
2963
2989
  let n = {}, r = !1;
2964
2990
  t.forEach((t) => {
2965
- t === void 0 || J.exists(t) || (n[t] = e.src, r = !0);
2966
- }), r && J.add(n);
2991
+ t === void 0 || Y.exists(t) || (n[t] = e.src, r = !0);
2992
+ }), r && Y.add(n);
2967
2993
  }
2968
2994
  isPlaying(e, t) {
2969
2995
  let n = this._channels.get(t);
@@ -2977,15 +3003,15 @@ var tn = class extends N {
2977
3003
  let n = e?.destination;
2978
3004
  return !n?.context || n.context === t;
2979
3005
  });
2980
- return n.length !== e.length && S.error("AudioManager: ignoring filter(s) built on a different AudioContext — playing dry. Build filter nodes on `app.audio.audioContext` (an app bundling its own copy of @pixi/sound gets a separate context)."), n.length ? n : void 0;
3006
+ return n.length !== e.length && C.error("AudioManager: ignoring filter(s) built on a different AudioContext — playing dry. Build filter nodes on `app.audio.audioContext` (an app bundling its own copy of @pixi/sound gets a separate context)."), n.length ? n : void 0;
2981
3007
  }
2982
3008
  async play(e, t = "sfx", n) {
2983
3009
  this._idMap.has(e) && (e = this._idMap.get(e));
2984
3010
  let r = this._channels.get(t);
2985
3011
  if (r) {
2986
3012
  e = this._verifySoundId(e);
2987
- let i = r.add(e, new Nt(e, r, this)), a = (n?.volume ?? 1) * r.volume * this.masterVolume;
2988
- return i.media = await J.play(e, {
3013
+ let i = r.add(e, new B(e, r, this)), a = (n?.volume ?? 1) * r.volume * this.masterVolume;
3014
+ return i.media = await Y.play(e, {
2989
3015
  ...n,
2990
3016
  filters: this._usableFilters(n?.filters),
2991
3017
  volume: r.muted ? 0 : a,
@@ -3006,7 +3032,7 @@ var tn = class extends N {
3006
3032
  }
3007
3033
  async fadeIn(e, t = "music", n) {
3008
3034
  let r = this._channels.get(t);
3009
- r && (e = this._verifySoundId(e)), r?.get(e) || await this.play(e, t, { volume: 0 }), n?.volume === 0 && S.warn("fadeIn volume is 0", e, t, n);
3035
+ r && (e = this._verifySoundId(e)), r?.get(e) || await this.play(e, t, { volume: 0 }), n?.volume === 0 && C.warn("fadeIn volume is 0", e, t, n);
3010
3036
  let i = Object.assign({
3011
3037
  volume: n?.volume ?? 1,
3012
3038
  duration: 1,
@@ -3015,7 +3041,7 @@ var tn = class extends N {
3015
3041
  return this.fade(e, t, i);
3016
3042
  }
3017
3043
  async fadeOut(e, t = "music", n = { volume: 0 }) {
3018
- n ||= {}, n?.volume === void 0 && (n.volume = 0), n?.volume > 0 && S.warn("fadeOut volume should probably be 0", e, t, n);
3044
+ n ||= {}, n?.volume === void 0 && (n.volume = 0), n?.volume > 0 && C.warn("fadeOut volume should probably be 0", e, t, n);
3019
3045
  let r = Object.assign({
3020
3046
  volume: 0,
3021
3047
  duration: 1,
@@ -3035,7 +3061,7 @@ var tn = class extends N {
3035
3061
  i && (e = this._verifySoundId(e));
3036
3062
  let a = i?.get(e);
3037
3063
  if (a) {
3038
- let i = p.to(a, n);
3064
+ let i = m.to(a, n);
3039
3065
  return i.eventCallback("onComplete", () => {
3040
3066
  r && this.stop(e, t);
3041
3067
  }), i;
@@ -3043,7 +3069,7 @@ var tn = class extends N {
3043
3069
  return null;
3044
3070
  }
3045
3071
  async restore() {
3046
- let e = J?.context?.audioContext;
3072
+ let e = Y?.context?.audioContext;
3047
3073
  e && await e.resume(), this.resume(), this._storedVolume !== void 0 && (this.masterVolume = this._storedVolume), this._channels.forEach((e) => {
3048
3074
  e.restore();
3049
3075
  }), this.muted = this._muted;
@@ -3063,12 +3089,12 @@ var tn = class extends N {
3063
3089
  let e = this._channels.get(t);
3064
3090
  if (e) {
3065
3091
  r = this._verifySoundId(r);
3066
- let t = J.find(r);
3092
+ let t = Y.find(r);
3067
3093
  t.options = {
3068
3094
  ...n,
3069
3095
  autoPlay: !1
3070
3096
  };
3071
- let i = e.add(r, new Nt(r, e, this));
3097
+ let i = e.add(r, new B(r, e, this));
3072
3098
  i.media = t.instances[0], i.pause();
3073
3099
  } else throw Error(`Channel ${t} does not exist.`);
3074
3100
  }
@@ -3080,7 +3106,7 @@ var tn = class extends N {
3080
3106
  t.instances.forEach((t) => {
3081
3107
  t.isPlaying && (t.storedVolume = t.volume, e.push(t));
3082
3108
  });
3083
- }), e.length > 0 && p.to(e, {
3109
+ }), e.length > 0 && m.to(e, {
3084
3110
  volume: 0,
3085
3111
  duration: t,
3086
3112
  ...n,
@@ -3090,7 +3116,7 @@ var tn = class extends N {
3090
3116
  });
3091
3117
  }
3092
3118
  });
3093
- } else J.stopAll();
3119
+ } else Y.stopAll();
3094
3120
  }
3095
3121
  getCoreSignals() {
3096
3122
  return [
@@ -3105,9 +3131,9 @@ var tn = class extends N {
3105
3131
  _verifySoundId(e) {
3106
3132
  let n = e;
3107
3133
  if (this._idMap.has(e)) return this._idMap.get(e);
3108
- if (!J.exists(e)) if (J.exists(e + ".mp3")) e += ".mp3";
3109
- else if (J.exists(e + ".ogg")) e += ".ogg";
3110
- else if (J.exists(e + ".wav")) e += ".wav";
3134
+ if (!Y.exists(e)) if (Y.exists(e + ".mp3")) e += ".mp3";
3135
+ else if (Y.exists(e + ".ogg")) e += ".ogg";
3136
+ else if (Y.exists(e + ".wav")) e += ".wav";
3111
3137
  else {
3112
3138
  e = n;
3113
3139
  let r = t.get(e);
@@ -3141,10 +3167,10 @@ var tn = class extends N {
3141
3167
  }
3142
3168
  }
3143
3169
  _setMuted() {
3144
- this._muted ? J.muteAll() : J.unmuteAll(), this.onMuted.emit(this._muted);
3170
+ this._muted ? Y.muteAll() : Y.unmuteAll(), this.onMuted.emit(this._muted);
3145
3171
  }
3146
3172
  _setPaused() {
3147
- this._paused ? J.pauseAll() : J.resumeAll();
3173
+ this._paused ? Y.pauseAll() : Y.resumeAll();
3148
3174
  }
3149
3175
  _setChannelVolume(e, t) {
3150
3176
  let n = this._channels.get(e);
@@ -3165,9 +3191,9 @@ var tn = class extends N {
3165
3191
  channelName: n
3166
3192
  });
3167
3193
  }
3168
- }, nn = class extends n {
3194
+ }, un = class extends n {
3169
3195
  constructor(e) {
3170
- super(), g(this), this._config = {
3196
+ super(), v(this), this._config = {
3171
3197
  color: 65535,
3172
3198
  shape: "rounded rectangle",
3173
3199
  radius: 8,
@@ -3189,10 +3215,10 @@ var tn = class extends N {
3189
3215
  this.clear(), this._graphics.destroy(), super.destroy(e);
3190
3216
  }
3191
3217
  setFocusTarget(e) {
3192
- e && (this.focusTarget = e, this.focusBounds = this.focusTarget.getFocusArea().clone(), Q.getInstance().ticker.add(this.updatePosition));
3218
+ e && (this.focusTarget = e, this.focusBounds = this.focusTarget.getFocusArea().clone(), $.getInstance().ticker.add(this.updatePosition));
3193
3219
  }
3194
3220
  clearFocusTarget() {
3195
- this.focusTarget = null, Q.getInstance().ticker.remove(this.updatePosition);
3221
+ this.focusTarget = null, $.getInstance().ticker.remove(this.updatePosition);
3196
3222
  }
3197
3223
  updatePosition() {
3198
3224
  if (!this.focusTarget || !this.parent) return;
@@ -3203,12 +3229,12 @@ var tn = class extends N {
3203
3229
  } else e = this.parent.toLocal(this.focusTarget.getGlobalPosition());
3204
3230
  let t = this.focusTarget.getFocusPosition();
3205
3231
  if (t) {
3206
- let n = Ke(t);
3232
+ let n = qe(t);
3207
3233
  e.x += n.x, e.y += n.y;
3208
3234
  }
3209
3235
  this.position.set(e.x, e.y);
3210
3236
  }
3211
- }, rn = class {
3237
+ }, dn = class {
3212
3238
  constructor(e) {
3213
3239
  this.id = e, this.currentFocusable = null, this.lastFocusable = null, this.defaultFocusable = null, this._focusables = [], this._currentIndex = 0, this._current = !1;
3214
3240
  }
@@ -3252,7 +3278,7 @@ var tn = class extends N {
3252
3278
  prev() {
3253
3279
  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();
3254
3280
  }
3255
- }, an = class extends N {
3281
+ }, fn = class extends N {
3256
3282
  constructor(...e) {
3257
3283
  super(...e), this.id = "focus", this.view = new n({ label: "FocusManager" }), this.onFocusManagerActivated = new j(), this.onFocusManagerDeactivated = new j(), this.onFocusLayerChange = new j(), this.onFocusChange = new j(), this._focusTarget = null, this._keyboardActive = !1, this._layers = /* @__PURE__ */ new Map(), this._currentLayerId = null, this._active = !1, this._enabled = !0;
3258
3284
  }
@@ -3281,9 +3307,9 @@ var tn = class extends N {
3281
3307
  this._getCurrentLayer()?.sortFocusablesByPosition();
3282
3308
  }
3283
3309
  initialize(e, t) {
3284
- ge(this, "removeAllFocusLayers", "_handleGlobalMouseMove", "_handleGlobalPointerDown");
3310
+ me(this, "removeAllFocusLayers", "_handleGlobalMouseMove", "_handleGlobalPointerDown");
3285
3311
  let n = t.config?.focus || {};
3286
- n.usePixiAccessibility = n.usePixiAccessibility ?? !1, this._focusOutliner = typeof n?.outliner == "function" ? new n.outliner() : new nn(n.outliner), this._options = n, this.view.addChild(this._focusOutliner), this._updatePixiAccessibility(), this._setupKeyboardListeners(), this._setupAppListeners();
3312
+ n.usePixiAccessibility = n.usePixiAccessibility ?? !1, this._focusOutliner = typeof n?.outliner == "function" ? new n.outliner() : new un(n.outliner), this._options = n, this.view.addChild(this._focusOutliner), this._updatePixiAccessibility(), this._setupKeyboardListeners(), this._setupAppListeners();
3287
3313
  }
3288
3314
  destroy() {
3289
3315
  this._removeGlobalListeners(), this.deactivate(), this._focusOutliner.destroy(), this._layers.clear(), super.destroy();
@@ -3298,7 +3324,7 @@ var tn = class extends N {
3298
3324
  (t === void 0 || t == null) && (t = this._currentLayerId ?? null);
3299
3325
  let r = this._layers.get(t);
3300
3326
  if (!r) {
3301
- S.error(`Layer with ID ${t} does not exist.`);
3327
+ C.error(`Layer with ID ${t} does not exist.`);
3302
3328
  return;
3303
3329
  }
3304
3330
  Array.isArray(e) || (e = [e]), e.forEach((e, t) => {
@@ -3325,12 +3351,12 @@ var tn = class extends N {
3325
3351
  addFocusLayer(e, t = !0, n) {
3326
3352
  e === void 0 && (e = this._layers.size);
3327
3353
  let r;
3328
- return this._layers.has(e) ? (S.error(`Layer with ID ${e} already exists.`), r = this._layers.get(e)) : (r = new rn(e), this._layers.set(e, r)), (t || this._currentLayerId === null) && this.setFocusLayer(e), n && this.addFocusable(n, e), r;
3354
+ return this._layers.has(e) ? (C.error(`Layer with ID ${e} already exists.`), r = this._layers.get(e)) : (r = new dn(e), this._layers.set(e, r)), (t || this._currentLayerId === null) && this.setFocusLayer(e), n && this.addFocusable(n, e), r;
3329
3355
  }
3330
3356
  removeFocusLayer(e, t = !0) {
3331
3357
  if (e === void 0 && t) return this._removeTopLayer();
3332
- this._layers.has(e) || S.warn(`Layer with ID ${e} does not exist.`);
3333
- let n = De(this._layers, e)?.[0];
3358
+ this._layers.has(e) || C.warn(`Layer with ID ${e} does not exist.`);
3359
+ let n = Te(this._layers, e)?.[0];
3334
3360
  this._layers.delete(e), this._postDelete(n);
3335
3361
  }
3336
3362
  restart(e = !1) {
@@ -3406,7 +3432,7 @@ var tn = class extends N {
3406
3432
  _next() {
3407
3433
  let e = this._getCurrentLayer()?.next();
3408
3434
  if (!e) {
3409
- S.error("FocusManager:: _next():: No focusable found in the current layer.");
3435
+ C.error("FocusManager:: _next():: No focusable found in the current layer.");
3410
3436
  return;
3411
3437
  }
3412
3438
  this._setTarget(e);
@@ -3414,7 +3440,7 @@ var tn = class extends N {
3414
3440
  _prev() {
3415
3441
  let e = this._getCurrentLayer()?.prev();
3416
3442
  if (!e) {
3417
- S.error("FocusManager:: _prev():: No focusable found in the current layer.");
3443
+ C.error("FocusManager:: _prev():: No focusable found in the current layer.");
3418
3444
  return;
3419
3445
  }
3420
3446
  this._setTarget(e);
@@ -3432,7 +3458,7 @@ var tn = class extends N {
3432
3458
  return this._currentLayerId == null ? null : this._layers.get(this._currentLayerId) || null;
3433
3459
  }
3434
3460
  _removeTopLayer() {
3435
- let e = ke(this._layers)?.[0], t = De(this._layers, e)?.[0];
3461
+ let e = De(this._layers)?.[0], t = Te(this._layers, e)?.[0];
3436
3462
  e !== void 0 && (this._layers.delete(e), this._postDelete(t));
3437
3463
  }
3438
3464
  _postDelete(e) {
@@ -3442,7 +3468,7 @@ var tn = class extends N {
3442
3468
  let n = this._getCurrentLayer(), r = this._focusTarget;
3443
3469
  if (this._focusTarget = e, r && this._active && this._clearFocusTarget(r), this.app.renderer.accessibility.isActive || this._keyboardActive) this._focusTarget ? (this._active ||= !0, this._options.usePixiAccessibility && !this._focusTarget._accessibleDiv && this.app.renderer.accessibility.postrender(), this._options.usePixiAccessibility && this.app.ticker.addOnce(() => {
3444
3470
  this._focusTarget?._accessibleDiv?.focus();
3445
- }), n?.hasFocusable(e) ? this._focusTarget && (this._focusTarget.focusIn(), this._focusTarget.isFocused = !0, this._focusTarget.onFocusIn.emit(this._focusTarget), n.setCurrentFocusable(this._focusTarget), this._updateOutliner()) : S.warn("The focusable", e, `does not exist on the current focus layer: ${this._currentLayerId}`)) : this._focusOutliner.clear();
3471
+ }), n?.hasFocusable(e) ? this._focusTarget && (this._focusTarget.focusIn(), this._focusTarget.isFocused = !0, this._focusTarget.onFocusIn.emit(this._focusTarget), n.setCurrentFocusable(this._focusTarget), this._updateOutliner()) : C.warn("The focusable", e, `does not exist on the current focus layer: ${this._currentLayerId}`)) : this._focusOutliner.clear();
3446
3472
  else if (this._focusOutliner.clear(), this._active && t) {
3447
3473
  this._active = !1, this.onFocusManagerDeactivated.emit();
3448
3474
  return;
@@ -3476,8 +3502,8 @@ var tn = class extends N {
3476
3502
  _updateOutliner() {
3477
3503
  this._focusTarget ? this._focusOutliner.draw(this._focusTarget) : this._focusOutliner.clear();
3478
3504
  }
3479
- }, on = .01;
3480
- function Y(e) {
3505
+ }, pn = .01;
3506
+ function X(e) {
3481
3507
  let t = e.length;
3482
3508
  if (t === 0) return {
3483
3509
  centerX: 0,
@@ -3494,22 +3520,22 @@ function Y(e) {
3494
3520
  spread: o / t
3495
3521
  };
3496
3522
  }
3497
- function sn(e, t) {
3523
+ function mn(e, t) {
3498
3524
  return {
3499
3525
  dx: t.centerX - e.centerX,
3500
3526
  dy: t.centerY - e.centerY,
3501
- scale: e.spread < on ? 1 : t.spread / e.spread
3527
+ scale: e.spread < pn ? 1 : t.spread / e.spread
3502
3528
  };
3503
3529
  }
3504
3530
  //#endregion
3505
3531
  //#region src/plugins/gesture/types.ts
3506
- var cn = {
3532
+ var hn = {
3507
3533
  enabled: !0,
3508
3534
  pointerTypes: ["touch"],
3509
3535
  pinchThreshold: 8,
3510
3536
  panThreshold: 8,
3511
3537
  preventDefault: !0
3512
- }, ln = .01, un = class extends N {
3538
+ }, gn = .01, _n = class extends N {
3513
3539
  constructor(...e) {
3514
3540
  super(...e), this.id = "gesture", this.onGestureStart = new j(), this.onGestureChange = new j(), this.onGestureEnd = new j(), this._pointers = /* @__PURE__ */ new Map(), this._state = "idle", this._startFrame = null, this._lastFrame = null, this._canvas = null, this._previousTouchAction = "", this._onPointerDown = (e) => {
3515
3541
  if (!this._options.pointerTypes.includes(e.pointerType)) return;
@@ -3519,9 +3545,9 @@ var cn = {
3519
3545
  x: e.clientX,
3520
3546
  y: e.clientY
3521
3547
  }), this._state === "idle" && this._pointers.size === 2) {
3522
- let e = Y([...this._pointers.values()]);
3548
+ let e = X([...this._pointers.values()]);
3523
3549
  this._startFrame = e, this._lastFrame = e, this._state = "pending";
3524
- } else this._state !== "idle" && n && (this._lastFrame = Y([...this._pointers.values()]));
3550
+ } else this._state !== "idle" && n && (this._lastFrame = X([...this._pointers.values()]));
3525
3551
  this._maybePreventDefault(e, t, this._state);
3526
3552
  }, this._onPointerMove = (e) => {
3527
3553
  if (!this._pointers.has(e.pointerId)) return;
@@ -3532,16 +3558,16 @@ var cn = {
3532
3558
  });
3533
3559
  let t = this._state;
3534
3560
  if (this._pointers.size >= 2) {
3535
- let e = Y([...this._pointers.values()]);
3561
+ let e = X([...this._pointers.values()]);
3536
3562
  if (this._state === "pending") {
3537
- let t = sn(this._lastFrame, e), n = Math.abs(e.spread - this._lastFrame.spread), r = Math.hypot(t.dx, t.dy);
3563
+ let t = mn(this._lastFrame, e), n = Math.abs(e.spread - this._lastFrame.spread), r = Math.hypot(t.dx, t.dy);
3538
3564
  (n >= this._options.pinchThreshold || r >= this._options.panThreshold) && (this._lastFrame = e, this._state = "active", this.onGestureStart.emit({
3539
3565
  centerX: e.centerX,
3540
3566
  centerY: e.centerY,
3541
3567
  pointerCount: this._pointers.size
3542
3568
  }));
3543
3569
  } else if (this._state === "active") {
3544
- let t = sn(this._lastFrame, e), n = this._computeTotalScale(e);
3570
+ let t = mn(this._lastFrame, e), n = this._computeTotalScale(e);
3545
3571
  this._lastFrame = e, this.onGestureChange.emit({
3546
3572
  centerX: e.centerX,
3547
3573
  centerY: e.centerY,
@@ -3568,7 +3594,7 @@ var cn = {
3568
3594
  }
3569
3595
  async initialize(e = {}, t) {
3570
3596
  if (this._options = {
3571
- ...cn,
3597
+ ...hn,
3572
3598
  ...e
3573
3599
  }, !this._options.enabled) return;
3574
3600
  let n = t.canvas;
@@ -3591,21 +3617,21 @@ var cn = {
3591
3617
  centerX: this._lastFrame.centerX,
3592
3618
  centerY: this._lastFrame.centerY,
3593
3619
  totalScale: this._computeTotalScale(this._lastFrame)
3594
- }), this._state = "idle", this._startFrame = null, this._lastFrame = null) : this._state !== "idle" && (this._lastFrame = Y([...this._pointers.values()])), this._maybePreventDefault(e, t, this._state);
3620
+ }), this._state = "idle", this._startFrame = null, this._lastFrame = null) : this._state !== "idle" && (this._lastFrame = X([...this._pointers.values()])), this._maybePreventDefault(e, t, this._state);
3595
3621
  }
3596
3622
  _computeTotalScale(e) {
3597
- return !this._startFrame || this._startFrame.spread < ln ? 1 : e.spread / this._startFrame.spread;
3623
+ return !this._startFrame || this._startFrame.spread < gn ? 1 : e.spread / this._startFrame.spread;
3598
3624
  }
3599
3625
  _maybePreventDefault(e, t, n) {
3600
3626
  this._options.preventDefault && (t !== "idle" || n !== "idle") && e.preventDefault();
3601
3627
  }
3602
- }, dn = {
3628
+ }, vn = {
3603
3629
  defaultLocale: "en",
3604
3630
  locales: ["en"],
3605
3631
  loadAll: !1,
3606
3632
  files: []
3607
3633
  };
3608
- function fn(e, t) {
3634
+ function yn(e, t) {
3609
3635
  if (t in e) return e[t];
3610
3636
  if (!t.includes(".")) return;
3611
3637
  let n = e;
@@ -3613,7 +3639,7 @@ function fn(e, t) {
3613
3639
  else return;
3614
3640
  return n;
3615
3641
  }
3616
- var pn = class extends N {
3642
+ var bn = class extends N {
3617
3643
  constructor(...e) {
3618
3644
  super(...e), this.id = "i18n", this.onLocaleChanged = new j(), this._dicts = {};
3619
3645
  }
@@ -3625,7 +3651,7 @@ var pn = class extends N {
3625
3651
  }
3626
3652
  async initialize(e) {
3627
3653
  if (this._options = {
3628
- ...dn,
3654
+ ...vn,
3629
3655
  ...e
3630
3656
  }, this._locale = this._options.defaultLocale, this._options.loadAll && this._options.files.length > 0) {
3631
3657
  let e = this._options.files.filter((e) => this._options.locales.includes(e.id));
@@ -3637,9 +3663,9 @@ var pn = class extends N {
3637
3663
  }
3638
3664
  t(e, t, n = this._locale) {
3639
3665
  let r = this._dicts[n];
3640
- if (!r) return S.error(`i18n:: No dictionary loaded for current locale: ${n}`), e;
3641
- let i = fn(r, e), a = typeof i == "string" ? i : void 0;
3642
- if (!a) return S.error(`i18n:: No result found for the key ${e} in the locale: ${this._locale}`), e;
3666
+ if (!r) return C.error(`i18n:: No dictionary loaded for current locale: ${n}`), e;
3667
+ let i = yn(r, e), a = typeof i == "string" ? i : void 0;
3668
+ if (!a) return C.error(`i18n:: No result found for the key ${e} in the locale: ${this._locale}`), e;
3643
3669
  let o = t?.variant;
3644
3670
  if (a = a.replace(/\[(.*?)\]/g, (e, t) => {
3645
3671
  let n = t.split("|");
@@ -3655,14 +3681,14 @@ var pn = class extends N {
3655
3681
  }
3656
3682
  tCount(e, t, n, r = this._locale) {
3657
3683
  let i = new Intl.PluralRules(r).select(t), a = this._dicts[r], o = `${e}.${i}`;
3658
- return (!a || typeof fn(a, o) != "string") && (o = `${e}.other`), this.t(o, {
3684
+ return (!a || typeof yn(a, o) != "string") && (o = `${e}.other`), this.t(o, {
3659
3685
  count: t,
3660
3686
  ...n
3661
3687
  }, r);
3662
3688
  }
3663
3689
  parse(e, t = this._locale) {
3664
3690
  let n = this._dicts[t];
3665
- if (!n) return S.error(`i18n:: No dictionary loaded for current locale: ${this._locale}`), "";
3691
+ if (!n) return C.error(`i18n:: No dictionary loaded for current locale: ${this._locale}`), "";
3666
3692
  let r = e, i = r.match(/{(.*?)}/g);
3667
3693
  return i && i.forEach((e) => {
3668
3694
  let t = e.slice(1, -1);
@@ -3672,10 +3698,10 @@ var pn = class extends N {
3672
3698
  async loadLocale(e) {
3673
3699
  let n = this._options.files.find((t) => e === t.id);
3674
3700
  if (!n) {
3675
- S.error(`i18n:: Could not find locale file for ${e}`);
3701
+ C.error(`i18n:: Could not find locale file for ${e}`);
3676
3702
  return;
3677
3703
  }
3678
- this._dicts[e] = n.json ? await t.load(n.json) : await T(n);
3704
+ this._dicts[e] = n.json ? await t.load(n.json) : await D(n);
3679
3705
  }
3680
3706
  getCoreFunctions() {
3681
3707
  return [
@@ -3691,12 +3717,12 @@ var pn = class extends N {
3691
3717
  async _loadAndSetLocale(e) {
3692
3718
  this._dicts[e] || await this.loadLocale(e), this.onLocaleChanged.emit(e);
3693
3719
  }
3694
- }, X = /* @__PURE__ */ function(e) {
3720
+ }, Z = /* @__PURE__ */ function(e) {
3695
3721
  return e.Keyboard = "keyboard", e.GamePad = "gamepad", e.Mouse = "mouse", e.Touch = "touch", e;
3696
3722
  }({});
3697
3723
  //#endregion
3698
3724
  //#region src/mixins/signals.ts
3699
- function mn(e) {
3725
+ function xn(e) {
3700
3726
  return class extends e {
3701
3727
  constructor(...e) {
3702
3728
  super(...e), this.signalConnections = new A.SignalConnections();
@@ -3717,12 +3743,12 @@ function mn(e) {
3717
3743
  }
3718
3744
  //#endregion
3719
3745
  //#region src/plugins/input/controlsCore.ts
3720
- function hn(e, t) {
3746
+ function Sn(e, t) {
3721
3747
  return e === "*" ? !0 : Array.isArray(e) ? e.includes(t) : e === t;
3722
3748
  }
3723
- function gn(e, t, n, r) {
3749
+ function Cn(e, t, n, r) {
3724
3750
  let i = [], a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
3725
- return bn(e, t, n, r, (e, t) => {
3751
+ return Dn(e, t, n, r, (e, t) => {
3726
3752
  if (t.includes("+")) {
3727
3753
  let n = t.split("+");
3728
3754
  i.push(n), a.set(n, e);
@@ -3733,16 +3759,16 @@ function gn(e, t, n, r) {
3733
3759
  singles: o
3734
3760
  };
3735
3761
  }
3736
- function _n(e, t, n, r) {
3762
+ function wn(e, t, n, r) {
3737
3763
  let i = /* @__PURE__ */ new Map();
3738
- return bn(e, t, n, r, (e, t) => {
3764
+ return Dn(e, t, n, r, (e, t) => {
3739
3765
  i.set(t, e);
3740
3766
  }), i;
3741
3767
  }
3742
- function vn(e, t, n = t) {
3768
+ function Tn(e, t, n = t) {
3743
3769
  return e.includes("+") ? e.split("+").every((e) => n(e)) : t(e);
3744
3770
  }
3745
- function yn(e, t) {
3771
+ function En(e, t) {
3746
3772
  let n = [], r = /* @__PURE__ */ new Set();
3747
3773
  for (let i = 0; i < e.length; i++) {
3748
3774
  let a = e[i];
@@ -3753,31 +3779,31 @@ function yn(e, t) {
3753
3779
  eliminated: r
3754
3780
  };
3755
3781
  }
3756
- function bn(e, t, n, r, i) {
3782
+ function Dn(e, t, n, r, i) {
3757
3783
  e && Object.keys(e).forEach((a) => {
3758
3784
  let o = t[a];
3759
3785
  if (!o) {
3760
3786
  r(a);
3761
3787
  return;
3762
3788
  }
3763
- if (!hn(o.context, n)) return;
3789
+ if (!Sn(o.context, n)) return;
3764
3790
  let s = e[a];
3765
3791
  s && (Array.isArray(s) ? s : [s]).forEach((e) => i(a, e));
3766
3792
  });
3767
3793
  }
3768
3794
  //#endregion
3769
3795
  //#region src/plugins/input/AbstractControls.ts
3770
- var xn = class {
3796
+ var On = class {
3771
3797
  static {
3772
3798
  this.__caper_method_binding_root = !0;
3773
3799
  }
3774
3800
  destroy() {}
3775
- }, Sn = class extends mn(xn) {
3801
+ }, kn = class extends xn(On) {
3776
3802
  constructor(...e) {
3777
3803
  super(...e), this.combinations = [], this.combinationsMap = /* @__PURE__ */ new Map(), this.activeDownInputs = /* @__PURE__ */ new Map(), this.activeUpInputs = /* @__PURE__ */ new Map(), this._warnedMissingActions = /* @__PURE__ */ new Set();
3778
3804
  }
3779
3805
  get app() {
3780
- return Q.getInstance();
3806
+ return $.getInstance();
3781
3807
  }
3782
3808
  initialize(e) {
3783
3809
  this.scheme = e, this.addSignalConnection(this.app.signal.onActionContextChanged.connect(this._sortActions)), this._sortActions();
@@ -3802,18 +3828,18 @@ var xn = class {
3802
3828
  return this.isInputDown(e);
3803
3829
  }
3804
3830
  _isInputActive(e) {
3805
- return vn(e, this.isInputDown, this.isComboPartDown);
3831
+ return Tn(e, this.isInputDown, this.isComboPartDown);
3806
3832
  }
3807
3833
  _sortActions() {
3808
- let e = this.app.actionsPlugin.getActions(), t = this.app.actionContext, { combinations: n, combinationsMap: r, singles: i } = gn(this.downSection, e, t, this._warnMissingAction);
3809
- this.combinations = n, this.combinationsMap = r, this.activeDownInputs = i, this.activeUpInputs = _n(this.upSection, e, t, this._warnMissingAction);
3834
+ let e = this.app.actionsPlugin.getActions(), t = this.app.actionContext, { combinations: n, combinationsMap: r, singles: i } = Cn(this.downSection, e, t, this._warnMissingAction);
3835
+ this.combinations = n, this.combinationsMap = r, this.activeDownInputs = i, this.activeUpInputs = wn(this.upSection, e, t, this._warnMissingAction);
3810
3836
  }
3811
3837
  _warnMissingAction(e) {
3812
- this._warnedMissingActions.has(e) || (this._warnedMissingActions.add(e), S.warn(`${this.logLabel}: scheme references unknown action "${e}"`));
3838
+ this._warnedMissingActions.has(e) || (this._warnedMissingActions.add(e), C.warn(`${this.logLabel}: scheme references unknown action "${e}"`));
3813
3839
  }
3814
- }, Cn = class extends Sn {
3840
+ }, An = class extends kn {
3815
3841
  constructor() {
3816
- super(), this.logLabel = "KeyboardControls", this._singleDownKeys = /* @__PURE__ */ new Set(), g(this);
3842
+ super(), this.logLabel = "KeyboardControls", this._singleDownKeys = /* @__PURE__ */ new Set(), v(this);
3817
3843
  }
3818
3844
  initialize(e) {
3819
3845
  super.initialize(e);
@@ -3842,7 +3868,7 @@ var xn = class {
3842
3868
  if (!this.app.keyboard) return;
3843
3869
  let e = this.app.keyboard.keysDown;
3844
3870
  if (e.size === 0) return;
3845
- let { fired: t, eliminated: n } = yn(this.combinations, (t) => e.has(t));
3871
+ let { fired: t, eliminated: n } = En(this.combinations, (t) => e.has(t));
3846
3872
  t.forEach((e) => {
3847
3873
  let t = this.combinationsMap.get(e);
3848
3874
  t && this.app.action(t, {
@@ -3861,9 +3887,9 @@ var xn = class {
3861
3887
  }
3862
3888
  });
3863
3889
  }
3864
- }, wn = class extends Sn {
3890
+ }, jn = class extends kn {
3865
3891
  constructor() {
3866
- super(), this.logLabel = "VirtualControls", this._buttons = /* @__PURE__ */ new Set(), this._singleDownButtons = /* @__PURE__ */ new Set(), this._activeJoystickDirections = /* @__PURE__ */ new Map(), this._buttonConnections = /* @__PURE__ */ new Map(), g(this);
3892
+ super(), this.logLabel = "VirtualControls", this._buttons = /* @__PURE__ */ new Set(), this._singleDownButtons = /* @__PURE__ */ new Set(), this._activeJoystickDirections = /* @__PURE__ */ new Map(), this._buttonConnections = /* @__PURE__ */ new Map(), v(this);
3867
3893
  }
3868
3894
  get joystick() {
3869
3895
  return this._joystick;
@@ -3921,7 +3947,7 @@ var xn = class {
3921
3947
  });
3922
3948
  }
3923
3949
  _update() {
3924
- let e = this._joystick?.direction ?? null, t = this._singleDownButtons, { fired: n, eliminated: r } = yn(this.combinations, (n) => t.has(n) || e === n);
3950
+ let e = this._joystick?.direction ?? null, t = this._singleDownButtons, { fired: n, eliminated: r } = En(this.combinations, (n) => t.has(n) || e === n);
3925
3951
  if (n.forEach((e) => {
3926
3952
  let t = this.combinationsMap.get(e);
3927
3953
  t && this.app.action(t, {
@@ -3943,12 +3969,12 @@ var xn = class {
3943
3969
  t && this.app.action(t, { inputState: "joystick" });
3944
3970
  }
3945
3971
  }
3946
- }, Tn = class {
3972
+ }, Mn = class {
3947
3973
  constructor() {
3948
- g(this);
3974
+ v(this);
3949
3975
  }
3950
3976
  get app() {
3951
- return Q.getInstance();
3977
+ return $.getInstance();
3952
3978
  }
3953
3979
  get virtual() {
3954
3980
  return this.touch;
@@ -3960,14 +3986,14 @@ var xn = class {
3960
3986
  return this.keyboard?.isActionActive(e) || this.touch?.isActionActive(e) || !1;
3961
3987
  }
3962
3988
  initialize(e) {
3963
- e.keyboard && (this.keyboard = new Cn(), this.keyboard.initialize(e.keyboard)), e.touch && (this.touch = new wn(), this.touch.initialize(e.touch));
3989
+ e.keyboard && (this.keyboard = new An(), this.keyboard.initialize(e.keyboard)), e.touch && (this.touch = new jn(), this.touch.initialize(e.touch));
3964
3990
  }
3965
3991
  connect() {
3966
3992
  this.keyboard && this.keyboard.connect(), this.touch && this.touch.connect();
3967
3993
  }
3968
- }, En = { actions: yt }, Dn = class extends N {
3994
+ }, Nn = { actions: Dt }, Pn = class extends N {
3969
3995
  constructor(...e) {
3970
- super(...e), this.id = "input", this.controls = new Tn(), this.activeGamepads = /* @__PURE__ */ new Map(), this.activeControllers = /* @__PURE__ */ new Set([]), this._lastUsedController = null, this._canvas = null, this.onGamepadConnected = new j(), this.onGamepadDisconnected = new j(), this.onControllerActivated = new j(), this.onControllerDeactivated = new j(), this.onControllerChanged = new j();
3996
+ super(...e), this.id = "input", this.controls = new Mn(), this.activeGamepads = /* @__PURE__ */ new Map(), this.activeControllers = /* @__PURE__ */ new Set([]), this._lastUsedController = null, this._canvas = null, this.onGamepadConnected = new j(), this.onGamepadDisconnected = new j(), this.onControllerActivated = new j(), this.onControllerDeactivated = new j(), this.onControllerChanged = new j();
3971
3997
  }
3972
3998
  get lastUsedController() {
3973
3999
  return this._lastUsedController;
@@ -3975,9 +4001,9 @@ var xn = class {
3975
4001
  isActionActive(e) {
3976
4002
  return this.controls.isActionActive(e);
3977
4003
  }
3978
- async initialize(e = En, t) {
4004
+ async initialize(e = Nn, t) {
3979
4005
  this._options = {
3980
- ...En,
4006
+ ...Nn,
3981
4007
  ...e
3982
4008
  }, t.stage.eventMode = "static", this._canvas = t.canvas, this.listen(this._canvas, "pointerdown", this._onPointerDown), this.listen(this._canvas, "pointermove", this._onPointerMove), this.listen(window, "keydown", this._onKeyDown), this.listen(window, "gamepadconnected", this._onGamepadConnected), this.listen(window, "gamepaddisconnected", this._onGamepadDisconnected), this._options.controls && this.controls.initialize(this._options.controls);
3983
4009
  }
@@ -4003,7 +4029,7 @@ var xn = class {
4003
4029
  ];
4004
4030
  }
4005
4031
  _isInputControllerType(e) {
4006
- return Object.values(X).includes(e);
4032
+ return Object.values(Z).includes(e);
4007
4033
  }
4008
4034
  _activateController(e) {
4009
4035
  let t = !this.activeControllers.has(e);
@@ -4019,37 +4045,94 @@ var xn = class {
4019
4045
  this.activeGamepads.delete(e);
4020
4046
  }
4021
4047
  _onPointerDown(e) {
4022
- e.pointerType === "touch" && this._activateController(X.Touch);
4048
+ e.pointerType === "touch" && this._activateController(Z.Touch);
4023
4049
  }
4024
4050
  _onPointerMove(e) {
4025
- e.pointerType === "mouse" && this._activateController(X.Mouse);
4051
+ e.pointerType === "mouse" && this._activateController(Z.Mouse);
4026
4052
  }
4027
4053
  _onKeyDown() {
4028
- this._activateController(X.Keyboard);
4054
+ this._activateController(Z.Keyboard);
4029
4055
  }
4030
4056
  _onGamepadConnected(e) {
4031
- this._activateController(X.GamePad), this._activateController(e.gamepad.id), this._activateGamepad(e.gamepad), this.onGamepadConnected.emit(e.gamepad);
4057
+ this._activateController(Z.GamePad), this._activateController(e.gamepad.id), this._activateGamepad(e.gamepad), this.onGamepadConnected.emit(e.gamepad);
4032
4058
  }
4033
4059
  _onGamepadDisconnected(e) {
4034
- this._deactivateGamepad(e.gamepad.id), this.actionsPlugin.sendAction("pause"), this.onGamepadDisconnected.emit(e.gamepad), this.activeGamepads.size === 0 && this._deactivateController(X.GamePad);
4060
+ this._deactivateGamepad(e.gamepad.id), this.actionsPlugin.sendAction("pause"), this.onGamepadDisconnected.emit(e.gamepad), this.activeGamepads.size === 0 && this._deactivateController(Z.GamePad);
4035
4061
  }
4036
4062
  get actionsPlugin() {
4037
4063
  return this.app.getPlugin("actions");
4038
4064
  }
4039
- }, On = {
4065
+ }, Fn = Object.freeze({
4066
+ portrait: "Rotate your device",
4067
+ landscape: "Turn your device sideways"
4068
+ }), In = "data-caper-orientation-overlay", Ln = class extends N {
4069
+ constructor(...e) {
4070
+ super(...e), this.id = "orientation", this.onMismatchChanged = new j(), this._overlayOptions = {}, this._active = !1, this._mismatched = !1, this._didPause = !1, this._query = null, this._overlay = null;
4071
+ }
4072
+ get orientation() {
4073
+ return this._orientation;
4074
+ }
4075
+ get active() {
4076
+ return this._active;
4077
+ }
4078
+ get mismatched() {
4079
+ return this._mismatched;
4080
+ }
4081
+ initialize(e) {
4082
+ let t = Le(e);
4083
+ this._orientation = t?.lock, this._overlayOptions = t?.overlay ?? {};
4084
+ }
4085
+ postInitialize(e) {
4086
+ if (!this._orientation || !Ze || Xe || typeof window > "u" || typeof window.matchMedia != "function") return;
4087
+ this._active = !0, this._query = window.matchMedia("(orientation: portrait)"), this.listen(this._query, "change", this._check), this.addDisposer(this._teardown);
4088
+ let t = this.app.fullScreen?.onFullScreenChange;
4089
+ t && this.addSignalConnection(t.connect(this._onFullScreenChange)), this._check();
4090
+ }
4091
+ _check() {
4092
+ if (!this._query || !this._orientation) return;
4093
+ let e = this._query.matches !== (this._orientation === "portrait");
4094
+ e !== this._mismatched && (this._mismatched = e, this._overlayOptions !== !1 && (e ? (this._showOverlay(), this._pause()) : (this._hideOverlay(), this._resume())), this.onMismatchChanged.emit(e));
4095
+ }
4096
+ _onFullScreenChange(e) {
4097
+ if (!e || typeof screen > "u") return;
4098
+ let t = screen.orientation;
4099
+ try {
4100
+ t?.lock?.(this._orientation === "landscape" ? "landscape" : "portrait")?.catch?.(() => {});
4101
+ } catch {}
4102
+ }
4103
+ _showOverlay() {
4104
+ typeof document > "u" || (this._overlay ||= this._createOverlay(), this._overlay.isConnected || document.body.appendChild(this._overlay));
4105
+ }
4106
+ _hideOverlay() {
4107
+ this._overlay?.remove();
4108
+ }
4109
+ _createOverlay() {
4110
+ let e = this._overlayOptions || {}, t;
4111
+ return e.element ? t = e.element() : (t = document.createElement("div"), t.textContent = e.text ?? Fn[this._orientation], t.setAttribute("role", "alert"), t.style.cssText = "position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;text-align:center;font-size:24px;line-height:1.3;font-weight:600;touch-action:none;user-select:none;-webkit-user-select:none;pointer-events:auto;", t.style.background = e.background ?? "#000", t.style.color = e.color ?? "#fff", t.style.fontFamily = e.fontFamily ?? "system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif"), t.setAttribute(In, ""), e.className && t.classList.add(...e.className.split(/\s+/).filter(Boolean)), t;
4112
+ }
4113
+ _pause() {
4114
+ this.app.paused || (this.app.pause(), this._didPause = !0);
4115
+ }
4116
+ _resume() {
4117
+ this._didPause && (this._didPause = !1, this.app.resume());
4118
+ }
4119
+ _teardown() {
4120
+ this._hideOverlay(), this._overlay = null, this._resume(), this._query = null, this._active = !1;
4121
+ }
4122
+ }, Rn = {
4040
4123
  x: !0,
4041
4124
  y: !0,
4042
4125
  intensity: 3,
4043
4126
  duration: .05,
4044
4127
  times: 4
4045
4128
  };
4046
- function kn(e) {
4129
+ function zn(e) {
4047
4130
  return class extends e {
4048
4131
  constructor(...e) {
4049
4132
  super(...e), this.onAnimationStart = new j(), this.onAnimationUpdate = new j(), this.onAnimationComplete = new j(), this._activeTweens = [];
4050
4133
  }
4051
4134
  animate(e, t = this) {
4052
- let n = p.to(t, {
4135
+ let n = m.to(t, {
4053
4136
  ...e,
4054
4137
  onStart: () => {
4055
4138
  this._onAnimationStart(n);
@@ -4064,7 +4147,7 @@ function kn(e) {
4064
4147
  return this._activeTweens.push(n), n;
4065
4148
  }
4066
4149
  animateFrom(e, t = this) {
4067
- let n = p.from(t, {
4150
+ let n = m.from(t, {
4068
4151
  ...e,
4069
4152
  onStart: () => {
4070
4153
  this._onAnimationStart(n);
@@ -4079,7 +4162,7 @@ function kn(e) {
4079
4162
  return this._activeTweens.push(n), n;
4080
4163
  }
4081
4164
  animateSequence(e, t = this) {
4082
- return this._activeTimeline ||= p.timeline({
4165
+ return this._activeTimeline ||= m.timeline({
4083
4166
  onStart: () => this._onAnimationStart(this._activeTimeline),
4084
4167
  onUpdate: () => this._onAnimationUpdate(this._activeTimeline),
4085
4168
  onComplete: () => {
@@ -4099,7 +4182,7 @@ function kn(e) {
4099
4182
  this._activeTweens.forEach((e) => e.play()), this._activeTimeline?.play();
4100
4183
  }
4101
4184
  animateFromTo(e, t, n = this) {
4102
- let r = p.fromTo(n, { ...e }, { ...t });
4185
+ let r = m.fromTo(n, { ...e }, { ...t });
4103
4186
  return r.eventCallback("onStart", () => {
4104
4187
  this._onAnimationStart(r);
4105
4188
  }), r.eventCallback("onUpdate", () => {
@@ -4116,14 +4199,14 @@ function kn(e) {
4116
4199
  }
4117
4200
  shake(e, t = this) {
4118
4201
  let n = {
4119
- ...On,
4202
+ ...Rn,
4120
4203
  ...e
4121
4204
  }, r = {
4122
4205
  x: t.x,
4123
4206
  y: t.y
4124
- }, i = r.x, a = r.y, o = n.times % 2 == 0 ? n.times + 1 : n.times, s = p.to(t, {
4125
- x: n.x ? i + p.utils.random(-Math.max(n.intensity, 2), Math.max(n.intensity, 2)) : i,
4126
- y: n.y ? a + p.utils.random(-Math.max(n.intensity, 2), Math.max(n.intensity, 2)) : a,
4207
+ }, i = r.x, a = r.y, o = n.times % 2 == 0 ? n.times + 1 : n.times, s = m.to(t, {
4208
+ x: n.x ? i + m.utils.random(-Math.max(n.intensity, 2), Math.max(n.intensity, 2)) : i,
4209
+ y: n.y ? a + m.utils.random(-Math.max(n.intensity, 2), Math.max(n.intensity, 2)) : a,
4127
4210
  repeat: o,
4128
4211
  yoyo: !0,
4129
4212
  duration: n.duration
@@ -4131,7 +4214,7 @@ function kn(e) {
4131
4214
  return this._activeTweens.push(s), s;
4132
4215
  }
4133
4216
  pulse(e = {}, t = this) {
4134
- let { duration: n = .5, intensity: r = 1.2, times: i = 1 } = e, a = i * 2 - 1, o = p.to(t?.scale, {
4217
+ let { duration: n = .5, intensity: r = 1.2, times: i = 1 } = e, a = i * 2 - 1, o = m.to(t?.scale, {
4135
4218
  x: r,
4136
4219
  y: r,
4137
4220
  repeat: a,
@@ -4141,7 +4224,7 @@ function kn(e) {
4141
4224
  return this._activeTweens.push(o), o;
4142
4225
  }
4143
4226
  bob(e = {}, t = this) {
4144
- let { duration: n = .5, intensity: r = 10 } = e, i = p.to(t, {
4227
+ let { duration: n = .5, intensity: r = 10 } = e, i = m.to(t, {
4145
4228
  y: `-=${r}`,
4146
4229
  repeat: -1,
4147
4230
  yoyo: !0,
@@ -4162,35 +4245,35 @@ function kn(e) {
4162
4245
  }
4163
4246
  //#endregion
4164
4247
  //#region src/mixins/factory/Factory.ts
4165
- function An(e) {
4248
+ function Bn(e) {
4166
4249
  return class extends n {
4167
4250
  constructor() {
4168
- super(), e = Object.assign({}, $e(), e), this.make = M(e, this, !1), this.add = M(e, this, !0);
4251
+ super(), e = Object.assign({}, st(), e), this.make = M(e, this, !1), this.add = M(e, this, !0);
4169
4252
  }
4170
4253
  };
4171
4254
  }
4172
4255
  //#endregion
4173
4256
  //#region src/mixins/lifecycle.ts
4174
- var jn = {
4257
+ var Vn = {
4175
4258
  autoResize: !0,
4176
4259
  autoUpdate: !1,
4177
4260
  resizePriority: 0,
4178
4261
  updatePriority: -999999
4179
4262
  };
4180
- function Mn(e) {
4263
+ function Hn(e) {
4181
4264
  return class extends e {
4182
4265
  constructor(...e) {
4183
- super(...e), this.onDestroy = new j(), this.__lifecycleConfig = { ...jn };
4266
+ super(...e), this.onDestroy = new j(), this.__lifecycleConfig = { ...Vn };
4184
4267
  }
4185
4268
  static {
4186
4269
  this.__caper_method_binding_root = !0;
4187
4270
  }
4188
4271
  get app() {
4189
- return Q.getInstance();
4272
+ return $.getInstance();
4190
4273
  }
4191
4274
  _initLifecycle(e = {}) {
4192
4275
  this.__lifecycleConfig = {
4193
- ...jn,
4276
+ ...Vn,
4194
4277
  ...e
4195
4278
  }, this.on("added", this._added), this.on("removed", this._removed);
4196
4279
  }
@@ -4211,15 +4294,15 @@ function Mn(e) {
4211
4294
  }
4212
4295
  //#endregion
4213
4296
  //#region src/display/Container.ts
4214
- var Nn = [
4297
+ var Un = [
4215
4298
  "autoResize",
4216
4299
  "autoUpdate",
4217
4300
  "priority"
4218
- ], Pn = {
4301
+ ], Wn = {
4219
4302
  autoResize: !0,
4220
4303
  autoUpdate: !1,
4221
4304
  priority: 0
4222
- }, Z = class e extends Mn(kn(mn(An()))) {
4305
+ }, Q = class e extends Hn(zn(xn(Bn()))) {
4223
4306
  get animationContext() {
4224
4307
  return this._animationContext;
4225
4308
  }
@@ -4241,10 +4324,10 @@ var Nn = [
4241
4324
  constructor(e = {}) {
4242
4325
  super();
4243
4326
  let { autoResize: t, autoUpdate: n, priority: r } = {
4244
- ...Pn,
4327
+ ...Wn,
4245
4328
  ...e
4246
4329
  };
4247
- g(this), this._initLifecycle({
4330
+ v(this), this._initLifecycle({
4248
4331
  autoResize: t,
4249
4332
  autoUpdate: n,
4250
4333
  resizePriority: r
@@ -4289,9 +4372,9 @@ var Nn = [
4289
4372
  addAnimation(e, t) {
4290
4373
  return this.app.addAnimation(e, t ?? this.animationContext);
4291
4374
  }
4292
- }, Fn = class extends N {
4375
+ }, Gn = class extends N {
4293
4376
  constructor(...e) {
4294
- super(...e), this.id = "popups", this.view = new Z(), this.onShowPopup = new j(), this.onHidePopup = new j(), this.onPopupChanged = new j(), this._popups = /* @__PURE__ */ new Map(), this._activePopups = /* @__PURE__ */ new Map(), this._currentPopupId = void 0;
4377
+ super(...e), this.id = "popups", this.view = new Q(), this.onShowPopup = new j(), this.onHidePopup = new j(), this.onPopupChanged = new j(), this._popups = /* @__PURE__ */ new Map(), this._activePopups = /* @__PURE__ */ new Map(), this._currentPopupId = void 0;
4295
4378
  }
4296
4379
  get currentPopupId() {
4297
4380
  return this._currentPopupId;
@@ -4306,7 +4389,7 @@ var Nn = [
4306
4389
  return this._activePopups.size > 0;
4307
4390
  }
4308
4391
  initialize() {
4309
- g(this), this.view.label = "PopupManager", this._setupAppListeners(), this._registerDiscoveredPopups();
4392
+ v(this), this.view.label = "PopupManager", this._setupAppListeners(), this._registerDiscoveredPopups();
4310
4393
  }
4311
4394
  destroy() {
4312
4395
  this._activePopups.clear(), super.destroy();
@@ -4334,7 +4417,7 @@ var Nn = [
4334
4417
  }
4335
4418
  async hidePopup(e, t) {
4336
4419
  let n = this._activePopups.get(e);
4337
- 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) => {
4420
+ if (n) return n.beforeHide(), await n.hide(), this.view.removeChild(n), this._activePopups.delete(e), this._currentPopupId = De(this._activePopups)?.[0] || void 0, new Promise((r) => {
4338
4421
  this.app.ticker.addOnce(() => {
4339
4422
  this.onHidePopup.emit({
4340
4423
  id: e,
@@ -4385,7 +4468,7 @@ var Nn = [
4385
4468
  _handleEscape() {
4386
4469
  this.current && this.current.config.closeOnEscape && this.hidePopup(this.current.id);
4387
4470
  }
4388
- }, In = {
4471
+ }, Kn = {
4389
4472
  autoScroll: !1,
4390
4473
  minWidth: 0,
4391
4474
  minHeight: 0,
@@ -4393,7 +4476,7 @@ var Nn = [
4393
4476
  center: !1,
4394
4477
  debug: !1,
4395
4478
  useSafeArea: !0
4396
- }, Ln = class extends N {
4479
+ }, qn = class extends N {
4397
4480
  constructor(...e) {
4398
4481
  super(...e), this.id = "resizer", this._safeArea = {
4399
4482
  top: 0,
@@ -4415,7 +4498,7 @@ var Nn = [
4415
4498
  }
4416
4499
  async initialize(e) {
4417
4500
  this._options = {
4418
- ...In,
4501
+ ...Kn,
4419
4502
  ...e
4420
4503
  };
4421
4504
  }
@@ -4492,24 +4575,24 @@ var Nn = [
4492
4575
  }, this._options.debug && this._drawDebug();
4493
4576
  }
4494
4577
  _drawDebug() {
4495
- this._debugContainer || (this._debugContainer = this.app.stage.addChild(new Z()), this._gfx = this._debugContainer.add.graphics()), this._gfx.clear(), this._gfx.rect(0, 0, this._size.width, this._size.height), this._gfx.stroke({
4578
+ this._debugContainer || (this._debugContainer = this.app.stage.addChild(new Q()), this._gfx = this._debugContainer.add.graphics()), this._gfx.clear(), this._gfx.rect(0, 0, this._size.width, this._size.height), this._gfx.stroke({
4496
4579
  width: 4,
4497
4580
  color: 4095
4498
4581
  });
4499
4582
  }
4500
- }, Rn = "caper-screen-debug", zn = "caper:screen-debug";
4501
- function Bn() {
4583
+ }, Jn = "caper-screen-debug", Yn = "caper:screen-debug";
4584
+ function Xn() {
4502
4585
  if (typeof window > "u") return !1;
4503
- let e = new URLSearchParams(window.location.search).get(Rn), t = e === "1" || e === "true", n = e === "0" || e === "false";
4586
+ let e = new URLSearchParams(window.location.search).get(Jn), t = e === "1" || e === "true", n = e === "0" || e === "false";
4504
4587
  try {
4505
- return t ? (window.localStorage.setItem(zn, "1"), !0) : n ? (window.localStorage.removeItem(zn), !1) : window.localStorage.getItem(zn) === "1";
4588
+ return t ? (window.localStorage.setItem(Yn, "1"), !0) : n ? (window.localStorage.removeItem(Yn), !1) : window.localStorage.getItem(Yn) === "1";
4506
4589
  } catch {
4507
4590
  return t;
4508
4591
  }
4509
4592
  }
4510
4593
  //#endregion
4511
4594
  //#region src/plugins/SceneManagerPlugin.ts
4512
- var Vn = {
4595
+ var Zn = {
4513
4596
  view: null,
4514
4597
  hideWhen: "firstSceneEnter",
4515
4598
  zOrder: "top",
@@ -4517,9 +4600,9 @@ var Vn = {
4517
4600
  assets: [],
4518
4601
  bundles: []
4519
4602
  }
4520
- }, Hn = class extends N {
4603
+ }, Qn = class extends N {
4521
4604
  constructor() {
4522
- super(), this.id = "scenes", this.onSceneChangeStart = new j(), this.onSceneChangeComplete = new j(), this.view = new n(), 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);
4605
+ super(), this.id = "scenes", this.onSceneChangeStart = new j(), this.onSceneChangeComplete = new j(), this.view = new n(), 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, v(this);
4523
4606
  }
4524
4607
  get ids() {
4525
4608
  return this.list.map((e) => e.id);
@@ -4528,14 +4611,14 @@ var Vn = {
4528
4611
  this._defaultLoadMethod = e;
4529
4612
  }
4530
4613
  async initialize(e, t) {
4531
- if (this._debugVisible = this.app.config?.showSceneDebugMenu === !0 || v && this.app.config?.showSceneDebugMenu !== !1, this._useHash = t.config?.useHash === !0 || this._debugVisible, this.view.sortableChildren = !0, this.list = (Caper.get("sceneList") || []).filter((e) => e.active !== !1), this.groupOrder = t.config?.sceneGroupOrder || [], (this._debugVisible || this._useHash) && (this.defaultScene = this.getSceneFromHash() || ""), !this.splash) {
4614
+ if (this._debugVisible = this.app.config?.showSceneDebugMenu === !0 || y && this.app.config?.showSceneDebugMenu !== !1, this._useHash = t.config?.useHash === !0 || this._debugVisible, this.view.sortableChildren = !0, this.list = (Caper.get("sceneList") || []).filter((e) => e.active !== !1), this.groupOrder = t.config?.sceneGroupOrder || [], (this._debugVisible || this._useHash) && (this.defaultScene = this.getSceneFromHash() || ""), !this.splash) {
4532
4615
  this.splash = {
4533
4616
  view: null,
4534
4617
  hideWhen: "firstSceneEnter",
4535
4618
  zOrder: "top"
4536
4619
  };
4537
4620
  let e = {
4538
- ...Vn,
4621
+ ...Zn,
4539
4622
  ...t.config?.splash ?? {}
4540
4623
  };
4541
4624
  e.view && (this.splash.view = typeof e.view == "function" ? new e.view() : e.view), this.splash.preload = e.preload;
@@ -4556,12 +4639,12 @@ var Vn = {
4556
4639
  let n = typeof e == "string" ? e : e.id, r = typeof e == "string" ? this._defaultLoadMethod : e?.method || this._defaultLoadMethod;
4557
4640
  this.currentScene && (this._lastScene = this.currentScene);
4558
4641
  let i = this.list.find((e) => e.id === n);
4559
- if (!i) throw w({ message: `Scene item not found for id ${n}` }), Error(`Scene item not found for id ${n}`);
4642
+ if (!i) throw E({ message: `Scene item not found for id ${n}` }), Error(`Scene item not found for id ${n}`);
4560
4643
  if (i?.plugins?.length) for (let e of i.plugins) {
4561
4644
  let t = this.app.getUnloadedPlugin(e);
4562
4645
  t && await this.app.loadPlugin(t);
4563
4646
  }
4564
- switch (this._currentSceneId = n, this._queue = we(this._createCurrentScene), r) {
4647
+ switch (this._currentSceneId = n, this._queue = Se(this._createCurrentScene), r) {
4565
4648
  case "exitEnter":
4566
4649
  this._queue.add(this._exitLastScene, this._destroyLastScene, this._unloadLastScene, this._loadCurrentScene, this._initializeCurrentScene, this._addCurrentScene, this._enterCurrentScene, this._startCurrentScene);
4567
4650
  break;
@@ -4607,7 +4690,7 @@ var Vn = {
4607
4690
  let e = this.list.find((e) => e.id === this._currentSceneId), t;
4608
4691
  if (this._sceneModules.has(this._currentSceneId)) t = this._sceneModules.get(this._currentSceneId);
4609
4692
  else {
4610
- let n = await T(e);
4693
+ let n = await D(e);
4611
4694
  if (!n) throw Error(`Couldn't load ${this._currentSceneId}"`);
4612
4695
  t = n[this._currentSceneId] ? n[this._currentSceneId] : n, t && this._sceneModules.set(this._currentSceneId, t);
4613
4696
  }
@@ -4666,7 +4749,7 @@ var Vn = {
4666
4749
  _createDebugMenu() {
4667
4750
  this._debugMenu = document.createElement("div"), this._debugMenu.id = "scene-debug", this._debugMenu.style.cssText = "position: absolute; bottom: 0; left:0; width:48px; height:48px; z-index: 1000; background-color:rgba(0,0,0,0.8); color:white; border-top-right-radius:8px;";
4668
4751
  let e = document.createElement("i");
4669
- e.style.cssText = "cursor:pointer; position:absolute;width:100%; font-style:normal; font-size:20px; top:50%; left:50%; transform:translate(-50%, -50%); text-align:center; pointer-events:none", e.innerHTML = "🎬", this._debugMenu.appendChild(e), (Q.containerElement || document.body).appendChild(this._debugMenu), this.addDisposer(() => this._debugMenu?.parentElement?.removeChild(this._debugMenu)), this._sceneSelect = document.createElement("select"), this._sceneSelect.style.cssText = "padding:0; border-radius:5px; opacity:0; width:48px; height:48px; cursor:pointer", this._sceneSelect.value = this.defaultScene || "";
4752
+ e.style.cssText = "cursor:pointer; position:absolute;width:100%; font-style:normal; font-size:20px; top:50%; left:50%; transform:translate(-50%, -50%); text-align:center; pointer-events:none", e.innerHTML = "🎬", this._debugMenu.appendChild(e), ($.containerElement || document.body).appendChild(this._debugMenu), this.addDisposer(() => this._debugMenu?.parentElement?.removeChild(this._debugMenu)), this._sceneSelect = document.createElement("select"), this._sceneSelect.style.cssText = "padding:0; border-radius:5px; opacity:0; width:48px; height:48px; cursor:pointer", this._sceneSelect.value = this.defaultScene || "";
4670
4753
  let t = document.createElement("option");
4671
4754
  t.value = "", t.innerHTML = "Select a scene", t.setAttribute("disabled", "disabled"), this._sceneSelect.appendChild(t);
4672
4755
  let n = /* @__PURE__ */ new Map(), r = [];
@@ -4707,7 +4790,7 @@ var Vn = {
4707
4790
  };
4708
4791
  //#endregion
4709
4792
  //#region src/plugins/TimerPlugin.ts
4710
- function Un() {
4793
+ function $n() {
4711
4794
  try {
4712
4795
  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" });
4713
4796
  return new Worker(URL.createObjectURL(e));
@@ -4715,7 +4798,7 @@ function Un() {
4715
4798
  return null;
4716
4799
  }
4717
4800
  }
4718
- function Wn(e, t = "mm:ss", n = "string") {
4801
+ function er(e, t = "mm:ss", n = "string") {
4719
4802
  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);
4720
4803
  if (n === "string") switch (t) {
4721
4804
  case "hh:mm:ss": return `${i.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}`;
@@ -4730,9 +4813,9 @@ function Wn(e, t = "mm:ss", n = "string") {
4730
4813
  ms: s
4731
4814
  };
4732
4815
  }
4733
- var Gn = class {
4816
+ var tr = class {
4734
4817
  constructor(e = {}, t) {
4735
- this.options = e, this.plugin = t, this.startTime = performance.now(), this.pausedTime = 0, this.isPaused = !0, this.isDestroyed = !1, this.timerId = ue(), e.useWorker && !t.hasWorkerSupport && (S.warn("Web Worker support not available, falling back to main thread timer"), e.useWorker = !1), this.isWorkerTimer = !!e.useWorker, e.autoStart && this.start();
4818
+ this.options = e, this.plugin = t, this.startTime = performance.now(), this.pausedTime = 0, this.isPaused = !0, this.isDestroyed = !1, this.timerId = le(), e.useWorker && !t.hasWorkerSupport && (C.warn("Web Worker support not available, falling back to main thread timer"), e.useWorker = !1), this.isWorkerTimer = !!e.useWorker, e.autoStart && this.start();
4736
4819
  }
4737
4820
  start() {
4738
4821
  this.isPaused && (this.isPaused = !1, this.isWorkerTimer ? this.plugin.startWorkerTimer(this.timerId, this.options) : this.startTime = performance.now() - this.pausedTime);
@@ -4778,7 +4861,7 @@ var Gn = class {
4778
4861
  removeTime(e) {
4779
4862
  return this.addTime(-e);
4780
4863
  }
4781
- }, Kn = class extends N {
4864
+ }, nr = class extends N {
4782
4865
  get hasWorkerSupport() {
4783
4866
  return this._hasWorkerSupport;
4784
4867
  }
@@ -4820,7 +4903,7 @@ var Gn = class {
4820
4903
  this.addTickerCallback(this.update), this.initWorker();
4821
4904
  }
4822
4905
  initWorker() {
4823
- typeof Worker < "u" ? (this.worker = Un(), this.worker ? (this._hasWorkerSupport = !0, this.worker.onmessage = this.handleWorkerMessage) : (S.warn("Failed to create Web Worker for TimerPlugin, all timers will run on main thread"), this._hasWorkerSupport = !1)) : (S.warn("Web Workers not supported in this environment, all timers will run on main thread"), this._hasWorkerSupport = !1);
4906
+ typeof Worker < "u" ? (this.worker = $n(), this.worker ? (this._hasWorkerSupport = !0, this.worker.onmessage = this.handleWorkerMessage) : (C.warn("Failed to create Web Worker for TimerPlugin, all timers will run on main thread"), this._hasWorkerSupport = !1)) : (C.warn("Web Workers not supported in this environment, all timers will run on main thread"), this._hasWorkerSupport = !1);
4824
4907
  }
4825
4908
  startWorkerTimer(e, t) {
4826
4909
  this.worker && (this.timerCallbacks.set(e, t), this.worker.postMessage({
@@ -4852,7 +4935,7 @@ var Gn = class {
4852
4935
  for (let e of this.mainThreadTimers) e.update();
4853
4936
  }
4854
4937
  createTimer(e) {
4855
- let t = new Gn(e, this);
4938
+ let t = new tr(e, this);
4856
4939
  return t.isWorker() ? this.workerTimers.add(t) : this.mainThreadTimers.add(t), this.onTimerCreated.emit(t), t;
4857
4940
  }
4858
4941
  destroyTimer(e) {
@@ -4877,14 +4960,14 @@ var Gn = class {
4877
4960
  timeAdjustment: t
4878
4961
  });
4879
4962
  }
4880
- }, qn = class extends N {
4963
+ }, rr = class extends N {
4881
4964
  constructor() {
4882
- super(), this.id = "webEvents", this.onResize = new j(), this.onVisibilityChanged = new j(), this.onOrientationChanged = new j(), this._debouncedEmitVisibility = Pe((e) => {
4965
+ super(), this.id = "webEvents", this.onResize = new j(), this.onVisibilityChanged = new j(), this.onOrientationChanged = new j(), this._debouncedEmitVisibility = Me((e) => {
4883
4966
  this.onVisibilityChanged.emit(e);
4884
- }, 1), this._orientationTimeoutId = null, g(this);
4967
+ }, 1), this._orientationTimeoutId = null, v(this);
4885
4968
  }
4886
4969
  get app() {
4887
- return Q.getInstance();
4970
+ return $.getInstance();
4888
4971
  }
4889
4972
  initialize() {
4890
4973
  this.listen(document, "visibilitychange", this._onVisibilityChanged, !1), this.listen(window, "pagehide", this._onPageHide, !1), this.listen(window, "pageshow", this._onPageShow, !1), this.listen(window, "resize", this._onResize), this.listen(document, "fullscreenchange", this._onResize), this.listen(window, "orientationchange", this._onOrientationChanged), window.visualViewport && this.listen(window.visualViewport, "resize", this._onVisualViewportResize), this.addDisposer(() => {
@@ -4926,13 +5009,13 @@ var Gn = class {
4926
5009
  return;
4927
5010
  }
4928
5011
  this._orientationTimeoutId !== null && clearTimeout(this._orientationTimeoutId), this._orientationTimeoutId = setTimeout(() => {
4929
- this._orientationTimeoutId = null, t = qe(), this.onOrientationChanged.emit({
5012
+ this._orientationTimeoutId = null, t = et(), this.onOrientationChanged.emit({
4930
5013
  orientation: t,
4931
5014
  screenOrientation: n
4932
5015
  });
4933
5016
  }, 10);
4934
5017
  }
4935
- }, Jn = class extends N {
5018
+ }, ir = class extends N {
4936
5019
  constructor(...e) {
4937
5020
  super(...e), this.name = "lookup", this.pathToContainer = /* @__PURE__ */ new Map(), this.containerToPath = /* @__PURE__ */ new Map();
4938
5021
  }
@@ -4946,7 +5029,7 @@ var Gn = class {
4946
5029
  ];
4947
5030
  }
4948
5031
  async initialize() {
4949
- this.addSignalConnection(Z.onGlobalChildAdded.connect(this.onChildAdded), Z.onGlobalChildRemoved.connect(this.onChildRemoved));
5032
+ this.addSignalConnection(Q.onGlobalChildAdded.connect(this.onChildAdded), Q.onGlobalChildRemoved.connect(this.onChildRemoved));
4950
5033
  }
4951
5034
  destroy() {
4952
5035
  this.pathToContainer.clear(), this.containerToPath.clear(), super.destroy();
@@ -4989,94 +5072,99 @@ var Gn = class {
4989
5072
  for (; n && n.label && (t.unshift(n.label), n = n.parent, n?.label !== "Stage"););
4990
5073
  return t.length > 0 ? t.join("/") : "";
4991
5074
  }
4992
- }, Yn = [
5075
+ }, ar = [
4993
5076
  {
4994
5077
  id: "lookup",
4995
- module: Jn,
5078
+ module: ir,
4996
5079
  namedExport: "LookupPlugin"
4997
5080
  },
4998
5081
  {
4999
5082
  id: "webEvents",
5000
- module: qn,
5083
+ module: rr,
5001
5084
  namedExport: "WebEventsPlugin"
5002
5085
  },
5003
5086
  {
5004
5087
  id: "fullscreen",
5005
- module: pt,
5088
+ module: xt,
5006
5089
  namedExport: "FullScreenPlugin"
5007
5090
  },
5008
5091
  {
5009
5092
  id: "resizer",
5010
- module: Ln,
5093
+ module: qn,
5011
5094
  namedExport: "ResizerPlugin"
5012
5095
  },
5013
5096
  {
5014
5097
  id: "breakpoints",
5015
- module: jt,
5098
+ module: zt,
5016
5099
  namedExport: "BreakpointPlugin"
5017
5100
  },
5018
5101
  {
5019
5102
  id: "assets",
5020
- module: ft,
5103
+ module: bt,
5021
5104
  namedExport: "AssetsPlugin"
5022
5105
  },
5023
5106
  {
5024
5107
  id: "scenes",
5025
- module: Hn,
5108
+ module: Qn,
5026
5109
  namedExport: "SceneManagerPlugin"
5027
5110
  },
5028
5111
  {
5029
5112
  id: "actions",
5030
- module: gt,
5113
+ module: wt,
5031
5114
  namedExport: "ActionsPlugin"
5032
5115
  },
5033
5116
  {
5034
5117
  id: "input",
5035
- module: Dn,
5118
+ module: Pn,
5036
5119
  namedExport: "InputPlugin"
5037
5120
  },
5038
5121
  {
5039
5122
  id: "gesture",
5040
- module: un,
5123
+ module: _n,
5041
5124
  namedExport: "GesturePlugin"
5042
5125
  },
5043
5126
  {
5044
5127
  id: "keyboard",
5045
- module: ht,
5128
+ module: Ct,
5046
5129
  namedExport: "KeyboardPlugin"
5047
5130
  },
5048
5131
  {
5049
5132
  id: "focus",
5050
- module: an,
5133
+ module: fn,
5051
5134
  namedExport: "FocusManagerPlugin"
5052
5135
  },
5053
5136
  {
5054
5137
  id: "popups",
5055
- module: Fn,
5138
+ module: Gn,
5056
5139
  namedExport: "PopupManagerPlugin"
5057
5140
  },
5058
5141
  {
5059
5142
  id: "audio",
5060
- module: tn,
5143
+ module: ln,
5061
5144
  namedExport: "AudioManagerPlugin"
5062
5145
  },
5063
5146
  {
5064
5147
  id: "i18n",
5065
- module: pn,
5148
+ module: bn,
5066
5149
  namedExport: "i18nPlugin"
5067
5150
  },
5068
5151
  {
5069
5152
  id: "timers",
5070
- module: Kn,
5153
+ module: nr,
5071
5154
  namedExport: "TimerPlugin"
5155
+ },
5156
+ {
5157
+ id: "orientation",
5158
+ module: Ln,
5159
+ namedExport: "OrientationPlugin"
5072
5160
  }
5073
5161
  ];
5074
5162
  //#endregion
5075
5163
  //#region src/core/Application.ts
5076
- function Xn() {
5164
+ function or() {
5077
5165
  return typeof window < "u" ? window.devicePixelRatio > 1 ? 2 : 1 : 2;
5078
5166
  }
5079
- var Zn = {
5167
+ var sr = {
5080
5168
  antialias: !1,
5081
5169
  autoStart: !0,
5082
5170
  resizeToContainer: !0,
@@ -5114,10 +5202,10 @@ var Zn = {
5114
5202
  wordWrap: !1,
5115
5203
  wordWrapWidth: 100
5116
5204
  },
5117
- resolution: Xn(),
5118
- useHash: v,
5119
- showSceneDebugMenu: v,
5120
- showStats: v,
5205
+ resolution: or(),
5206
+ useHash: y,
5207
+ showSceneDebugMenu: y,
5208
+ showStats: y,
5121
5209
  useStore: !0,
5122
5210
  useSpine: !1,
5123
5211
  useLayout: !1,
@@ -5126,22 +5214,22 @@ var Zn = {
5126
5214
  scenes: [],
5127
5215
  defaultSceneLoadMethod: "immediate",
5128
5216
  assets: { manifest: "./assets.json" }
5129
- }, Qn = {
5217
+ }, cr = {
5130
5218
  pauseAudio: !0,
5131
5219
  pauseAnimations: !0,
5132
5220
  pauseTicker: !0,
5133
5221
  pauseTimers: !0
5134
- }, $n = {
5222
+ }, lr = {
5135
5223
  pauseAudio: !1,
5136
5224
  pauseAnimations: !1,
5137
5225
  pauseTicker: !1,
5138
5226
  pauseTimers: !1
5139
- }, Q = class r extends e {
5227
+ }, $ = class r extends e {
5140
5228
  static {
5141
5229
  this.__caper_method_binding_root = !0;
5142
5230
  }
5143
5231
  get make() {
5144
- return this._makeFactory ||= M($e(), this, !1), this._makeFactory;
5232
+ return this._makeFactory ||= M(st(), this, !1), this._makeFactory;
5145
5233
  }
5146
5234
  get env() {
5147
5235
  return this._env;
@@ -5157,14 +5245,14 @@ var Zn = {
5157
5245
  }
5158
5246
  pause(e) {
5159
5247
  this._paused = !0, this._pauseConfig = {
5160
- ...e ? $n : Qn,
5248
+ ...e ? lr : cr,
5161
5249
  ...e
5162
- }, this._pauseConfig.pauseAudio && this.audio.pause(), this._pauseConfig.pauseAnimations && p?.globalTimeline?.pause(), this._pauseConfig.pauseTicker && this.ticker.stop(), this._pauseConfig.pauseTimers && this.timers.pauseAllTimers(), this._pauseConfig.pauseOther && this._pauseConfig.pauseOther.forEach((e) => {
5250
+ }, this._pauseConfig.pauseAudio && this.audio.pause(), this._pauseConfig.pauseAnimations && m?.globalTimeline?.pause(), this._pauseConfig.pauseTicker && this.ticker.stop(), this._pauseConfig.pauseTimers && this.timers.pauseAllTimers(), this._pauseConfig.pauseOther && this._pauseConfig.pauseOther.forEach((e) => {
5163
5251
  typeof e?.pause == "function" && e.pause();
5164
5252
  }), this.onPause.emit(this._pauseConfig);
5165
5253
  }
5166
5254
  resume() {
5167
- this._paused = !1, this._pauseConfig.pauseAudio && this.audio.paused && this.audio.resume(), this._pauseConfig.pauseAnimations && p?.globalTimeline?.paused() && p?.globalTimeline?.resume(), this._pauseConfig.pauseTicker && (this.ticker.started || this.ticker.start()), this._pauseConfig.pauseTimers && this.timers.resumeAllTimers(), this._pauseConfig.pauseOther && this._pauseConfig.pauseOther.forEach((e) => {
5255
+ this._paused = !1, this._pauseConfig.pauseAudio && this.audio.paused && this.audio.resume(), this._pauseConfig.pauseAnimations && m?.globalTimeline?.paused() && m?.globalTimeline?.resume(), this._pauseConfig.pauseTicker && (this.ticker.started || this.ticker.start()), this._pauseConfig.pauseTimers && this.timers.resumeAllTimers(), this._pauseConfig.pauseOther && this._pauseConfig.pauseOther.forEach((e) => {
5168
5256
  typeof e?.resume == "function" && e.resume();
5169
5257
  }), this._pauseConfig.clearOnResume && (this._pauseConfig = {}), this.onResume.emit(this._pauseConfig);
5170
5258
  }
@@ -5178,7 +5266,7 @@ var Zn = {
5178
5266
  MODE: "production",
5179
5267
  PROD: !0,
5180
5268
  SSR: !1
5181
- }, this._isFullScreen = !1, this._fullScreenElement = null, this._paused = !1, this._pauseConfig = {}, this._center = new c(0, 0), g(this);
5269
+ }, this._isFullScreen = !1, this._fullScreenElement = null, this._paused = !1, this._pauseConfig = {}, this._center = new c(0, 0), v(this);
5182
5270
  }
5183
5271
  get appVersion() {
5184
5272
  try {
@@ -5281,6 +5369,9 @@ var Zn = {
5281
5369
  get timers() {
5282
5370
  return this._timerPlugin ||= this.getPlugin("timers"), this._timerPlugin;
5283
5371
  }
5372
+ get orientation() {
5373
+ return this._orientationPlugin ||= this.getPlugin("orientation"), this._orientationPlugin;
5374
+ }
5284
5375
  get audio() {
5285
5376
  return this._audioManager ||= this.getPlugin("audio"), this._audioManager;
5286
5377
  }
@@ -5318,19 +5409,19 @@ var Zn = {
5318
5409
  this.fullScreen.toggleFullScreen();
5319
5410
  }
5320
5411
  get isMobile() {
5321
- return te.any;
5412
+ return f.any;
5322
5413
  }
5323
5414
  get isTouch() {
5324
5415
  return "ontouchstart" in window || navigator.maxTouchPoints > 0;
5325
5416
  }
5326
5417
  get signal() {
5327
- return er;
5418
+ return ur;
5328
5419
  }
5329
5420
  get signals() {
5330
5421
  return this.signal;
5331
5422
  }
5332
5423
  get func() {
5333
- return $;
5424
+ return dr;
5334
5425
  }
5335
5426
  get exec() {
5336
5427
  return this.func;
@@ -5340,7 +5431,7 @@ var Zn = {
5340
5431
  return this.scenes.splash.view && e.push(this.scenes.splash.view), this.scenes.transition && e.push(this.scenes.transition), this.captions?.view && e.push(this.captions.view), e;
5341
5432
  }
5342
5433
  static getInstance() {
5343
- return r.instance || S.warn("Application not created yet"), r.instance;
5434
+ return r.instance || C.warn("Application not created yet"), r.instance;
5344
5435
  }
5345
5436
  destroy(e, t) {
5346
5437
  this._plugins.forEach((e) => {
@@ -5352,26 +5443,26 @@ var Zn = {
5352
5443
  }
5353
5444
  async initialize(e, t) {
5354
5445
  if (r.instance) throw Error("Application is already initialized");
5355
- if (r.instance = this, this.config = E(Zn, e), this.signals.onResize = this.onResize, e.container && (r.containerElement = e.container), S.initialize(this.config.logger), this.config.resolution !== 1 && this.config.resolution !== 2) {
5446
+ if (r.instance = this, this.config = Fe(sr, e), this.signals.onResize = this.onResize, e.container && (r.containerElement = e.container), C.initialize(this.config.logger), this.config.resolution !== 1 && this.config.resolution !== 2) {
5356
5447
  let e = this.config.resolution;
5357
- this.config.resolution = Xn(), S.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.`);
5448
+ this.config.resolution = or(), C.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.`);
5358
5449
  }
5359
5450
  if (await this.boot(this.config), await this.initAssets(), await this.init(this.config), this.stage.label = "Stage", this.config.defaultTextStyle && (l.defaultTextStyle = {
5360
- ...Zn.defaultTextStyle,
5451
+ ...sr.defaultTextStyle,
5361
5452
  ...this.config.defaultTextStyle
5362
5453
  }), this.config.defaultDropShadow && (l.defaultDropShadow = this.config.defaultDropShadow), t) t.appendChild(this.canvas), this.setContainer(t);
5363
5454
  else throw Error("No element found to append the view to.");
5364
- return await this.registerDefaultPlugins(), v && this.getPlugin("DevToolsPlugin").initializeDevTools(this), this.signals.onLoadRequiredComplete.connectOnce(this.requiredAssetsLoaded), await this._setup(), this.plugins = await Je(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"), r.instance;
5455
+ return await this.registerDefaultPlugins(), y && this.getPlugin("DevToolsPlugin").initializeDevTools(this), this.signals.onLoadRequiredComplete.connectOnce(this.requiredAssetsLoaded), await this._setup(), this.plugins = await tt(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"), r.instance;
5365
5456
  }
5366
5457
  getPlugin(e, t = !1) {
5367
5458
  let n = this._plugins.get(e);
5368
- return !n && t && S.warn(`Plugin with name "${e}" not found.`), n;
5459
+ return !n && t && C.warn(`Plugin with name "${e}" not found.`), n;
5369
5460
  }
5370
5461
  async _postInitialize() {
5371
5462
  for (let e of this._plugins.values()) try {
5372
5463
  await e.postInitialize(this);
5373
5464
  } catch (t) {
5374
- w({
5465
+ E({
5375
5466
  message: `Plugin "${e.id}" failed in postInitialize: ${t instanceof Error ? t.message : String(t)}`,
5376
5467
  stack: t instanceof Error ? t.stack : void 0
5377
5468
  }), this.onPluginError.emit({
@@ -5402,7 +5493,7 @@ var Zn = {
5402
5493
  }
5403
5494
  async loadPlugin(e, t = !1) {
5404
5495
  if (this._plugins.has(e.id)) return await this.registerPlugin(this._plugins.get(e.id), e.options);
5405
- let n = new (await (T(e)))(e.id);
5496
+ let n = new (await (D(e)))(e.id);
5406
5497
  n.id !== e.id && (n.id = e.id);
5407
5498
  let r = e.options;
5408
5499
  return t && !r && (r = this.config[n.id]), await this.registerPlugin(n, r);
@@ -5424,42 +5515,42 @@ var Zn = {
5424
5515
  }
5425
5516
  async boot(e) {
5426
5517
  this.config = {
5427
- ...Zn,
5518
+ ...sr,
5428
5519
  ...e
5429
5520
  }, await this.preInitialize(this.config);
5430
5521
  }
5431
5522
  async preInitialize(e) {
5432
5523
  let { id: t } = e;
5433
- this._appName = t, v && await this.loadPlugin({
5524
+ this._appName = t, y && await this.loadPlugin({
5434
5525
  id: "DevToolsPlugin",
5435
- module: () => import("./DevToolsPlugin-CQXFoj1T.js"),
5526
+ module: () => import("./DevToolsPlugin-Cq5HHN9K.js"),
5436
5527
  namedExport: "DevToolsPlugin"
5437
5528
  }), e.useLayout && await this.loadPlugin({
5438
5529
  id: "LayoutPlugin",
5439
- module: () => import("./LayoutPlugin-BuJgr9bd.js"),
5530
+ module: () => import("./LayoutPlugin-DqbwBm-X.js"),
5440
5531
  namedExport: "LayoutPlugin"
5441
5532
  }), await this.loadPlugin({
5442
5533
  id: "GSAPPlugin",
5443
- module: () => import("./GSAPPlugin-CNkncyXS.js"),
5534
+ module: () => import("./GSAPPlugin-D-ujhVYo.js"),
5444
5535
  namedExport: "GSAPPlugin"
5445
5536
  }), e.useSpine && await this.loadPlugin({
5446
5537
  id: "SpinePlugin",
5447
- module: () => import("./SpinePlugin-DDzD-Qxd.js"),
5538
+ module: () => import("./SpinePlugin-DyXJyA3x.js"),
5448
5539
  namedExport: "SpinePlugin"
5449
- }), this.config.useStore && (this._store = new lt(), this._store.initialize(this), await this.loadPlugin({
5540
+ }), this.config.useStore && (this._store = new _t(), this._store.initialize(this), await this.loadPlugin({
5450
5541
  id: "data",
5451
- module: () => import("./DataAdapter-T-22-_D1.js").then((e) => e.n),
5542
+ module: () => import("./DataAdapter-CbyqWMo-.js").then((e) => e.n),
5452
5543
  namedExport: "DataAdapter",
5453
5544
  options: this.config.data
5454
5545
  }));
5455
5546
  }
5456
5547
  async registerPlugin(e, t) {
5457
- if (this._plugins.has(e.id)) return S.warn(`Plugin with id "${e.id}" already registered. Not registering.`), e.initialize(t, this);
5548
+ if (this._plugins.has(e.id)) return C.warn(`Plugin with id "${e.id}" already registered. Not registering.`), e.initialize(t, this);
5458
5549
  e.registerCoreFunctions(), e.registerCoreSignals(), this._plugins.set(e.id, e);
5459
5550
  try {
5460
5551
  return await e.initialize(t, this);
5461
5552
  } catch (t) {
5462
- w({
5553
+ E({
5463
5554
  message: `Plugin "${e.id}" failed to initialize: ${t instanceof Error ? t.message : String(t)}`,
5464
5555
  stack: t instanceof Error ? t.stack : void 0
5465
5556
  }), this.onPluginError.emit({
@@ -5471,40 +5562,40 @@ var Zn = {
5471
5562
  }
5472
5563
  }
5473
5564
  async registerDefaultPlugins() {
5474
- for (let e = 0; e < Yn.length; e++) {
5475
- let t = Yn[e];
5565
+ for (let e = 0; e < ar.length; e++) {
5566
+ let t = ar[e];
5476
5567
  await this.loadPlugin(t, !0);
5477
5568
  }
5478
- (this.config.showStats === !0 || v && this.config.showStats !== !1) && await this.loadPlugin({
5569
+ (this.config.showStats === !0 || y && this.config.showStats !== !1) && await this.loadPlugin({
5479
5570
  id: "stats",
5480
- module: () => import("./StatsPlugin-tyFGzVjy.js"),
5571
+ module: () => import("./StatsPlugin-CEhgzWby.js"),
5481
5572
  namedExport: "StatsPlugin"
5482
- }), Bn() && await this.loadPlugin({
5573
+ }), Xn() && await this.loadPlugin({
5483
5574
  id: "screenDebug",
5484
- module: () => import("./ScreenDebugPlugin-kz9Mr6j1.js").then((e) => e.n),
5575
+ module: () => import("./ScreenDebugPlugin-CyT8UxEa.js").then((e) => e.n),
5485
5576
  namedExport: "ScreenDebugPlugin"
5486
5577
  }), this.config.useVoiceover && (await this.loadPlugin({
5487
5578
  id: "voiceover",
5488
- module: () => import("./VoiceOverPlugin-rTNz_9eb.js"),
5579
+ module: () => import("./VoiceOverPlugin-CSpNZjpJ.js"),
5489
5580
  namedExport: "VoiceOverPlugin",
5490
5581
  options: this.config.voiceover || void 0
5491
5582
  }), await this.loadPlugin({
5492
5583
  id: "captions",
5493
- module: () => import("./CaptionsPlugin-COrofpHN.js"),
5584
+ module: () => import("./CaptionsPlugin-CAgQBcA1.js"),
5494
5585
  namedExport: "CaptionsPlugin",
5495
5586
  options: this.config.captions || void 0
5496
5587
  }));
5497
5588
  }
5498
5589
  async registerPlugins() {
5499
5590
  if (!this.plugins?.length) return;
5500
- let e = Xe(this.plugins, new Set(this._plugins.keys()));
5591
+ let e = rt(this.plugins, new Set(this._plugins.keys()));
5501
5592
  for (let t of e) t.autoLoad && await this.loadPlugin(t);
5502
5593
  }
5503
5594
  async requiredAssetsLoaded() {}
5504
5595
  async setup() {}
5505
5596
  async initAssets() {
5506
5597
  let e = this.config.assets?.initOptions || {}, n = this.config.assets?.manifest || e.manifest;
5507
- Ce(n) && (n = await n), e.manifest = n, e.basePath = e.basePath || "./assets", await t.init(e), this.manifest = t.resolver._manifest;
5598
+ T(n) && (n = await n), e.manifest = n, e.basePath = e.basePath || "./assets", await t.init(e), this.manifest = t.resolver._manifest;
5508
5599
  }
5509
5600
  async loadDefaultScene() {
5510
5601
  return this.scenes.loadDefaultScene();
@@ -5526,8 +5617,8 @@ var Zn = {
5526
5617
  _addSplash() {
5527
5618
  this.scenes.splash.view && (this.scenes.splash.view.label = "Splash", this.stage.addChild(this.scenes.splash.view));
5528
5619
  }
5529
- }, er = {}, $ = {};
5620
+ }, ur = {}, dr = {};
5530
5621
  //#endregion
5531
- export { Xe as $, Nt as A, y as At, ht as B, fe as Bt, X as C, Te as Ct, an as D, Se as Dt, cn as E, Ce as Et, vt as F, g as Ft, M as G, se as Gt, pt as H, me as Ht, yt as I, ge as It, A as J, lt as K, le as Kt, xt as L, ve as Lt, jt as M, _ as Mt, R as N, v as Nt, nn as O, C as Ot, _t as P, ye as Pt, Je as Q, bt as R, he as Rt, mn as S, T as St, un as T, xe as Tt, ft as U, ue as Ut, F as V, pe as Vt, N as W, h as Wt, Qe as X, O as Y, Ye as Z, kn as _, Me as _t, qn as a, He as at, wn as b, Oe as bt, Wn as c, Ke as ct, Ln as d, E as dt, qe as et, Fn as f, Ie as ft, An as g, je as gt, Mn as h, Ne as ht, Jn as i, We as it, Mt as j, be as jt, tn as k, S as kt, Hn as l, ze as lt, Nn as m, Pe as mt, er as n, Re as nt, Gn as o, Ge as ot, Z as p, Fe as pt, j as q, Q as r, Ue as rt, Kn as s, Ve as st, $ as t, Le as tt, Bn as u, Be as ut, Dn as v, Ae as vt, pn as w, we as wt, Cn as x, De as xt, Tn as y, ke as yt, gt as z, de as zt };
5622
+ export { nt as $, g as $t, un as A, Te as At, Ot as B, ye as Bt, An as C, Me as Ct, _n as D, Oe as Dt, bn as E, Ae as Et, R as F, T as Ft, bt as G, me as Gt, Ct as H, y as Ht, Tt as I, xe as It, _t as J, _ as Jt, N as K, ge as Kt, Et as L, w as Lt, B as M, Ce as Mt, Bt as N, Se as Nt, hn as O, De as Ot, zt as P, be as Pt, ot as Q, le as Qt, Dt as R, C as Rt, jn as S, Ne as St, Z as T, ke as Tt, F as U, ve as Ut, wt as V, _e as Vt, xt as W, v as Wt, A as X, de as Xt, j as Y, ue as Yt, O as Z, fe as Zt, zn as _, Be as _t, rr as a, Ze as at, Pn as b, Fe as bt, er as c, Ye as ct, qn as d, We as dt, oe as en, tt as et, Gn as f, Ge as ft, Bn as g, qe as gt, Hn as h, He as ht, ir as i, $e as it, ln as j, D as jt, fn as k, Ee as kt, Qn as l, Re as lt, Un as m, Ke as mt, ur as n, et as nt, tr as o, Je as ot, Q as p, Ue as pt, M as q, pe as qt, $ as r, Qe as rt, nr as s, Xe as st, dr as t, ce as tn, rt as tt, Xn as u, ze as ut, Fn as v, Ve as vt, xn as w, je as wt, Mn as x, Pe as xt, Ln as y, Le as yt, kt as z, b as zt };
5532
5623
 
5533
- //# sourceMappingURL=registries-DmNGVLAi.js.map
5624
+ //# sourceMappingURL=registries-C1nPl8B3.js.map