aoi-comp 1.0.0

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.
@@ -0,0 +1,3802 @@
1
+ import { i as e, t } from "./rolldown-runtime-CWhphoD1.js";
2
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/extensions/Extensions.mjs
3
+ var n = /* @__PURE__ */ ((e) => (e.Application = "application", e.WebGLPipes = "webgl-pipes", e.WebGLPipesAdaptor = "webgl-pipes-adaptor", e.WebGLSystem = "webgl-system", e.WebGPUPipes = "webgpu-pipes", e.WebGPUPipesAdaptor = "webgpu-pipes-adaptor", e.WebGPUSystem = "webgpu-system", e.CanvasSystem = "canvas-system", e.CanvasPipesAdaptor = "canvas-pipes-adaptor", e.CanvasPipes = "canvas-pipes", e.Asset = "asset", e.LoadParser = "load-parser", e.ResolveParser = "resolve-parser", e.CacheParser = "cache-parser", e.DetectionParser = "detection-parser", e.MaskEffect = "mask-effect", e.BlendMode = "blend-mode", e.TextureSource = "texture-source", e.TextureUploaderWebGL = "texture-uploader-webgl", e.TextureUploaderWebGPU = "texture-uploader-webgpu", e.Environment = "environment", e.ShapeBuilder = "shape-builder", e.Batcher = "batcher", e))(n || {}), r = (e) => {
4
+ if (typeof e == "function" || typeof e == "object" && e.extension) {
5
+ if (!e.extension) throw Error("Extension class must have an extension object");
6
+ e = {
7
+ ...typeof e.extension == "object" ? e.extension : { type: e.extension },
8
+ ref: e
9
+ };
10
+ }
11
+ if (typeof e == "object") e = { ...e };
12
+ else throw Error("Invalid extension type");
13
+ return typeof e.type == "string" && (e.type = [e.type]), e;
14
+ }, i = (e, t) => r(e).priority ?? t, a = {
15
+ _addHandlers: {},
16
+ _removeHandlers: {},
17
+ _queue: {},
18
+ remove(...e) {
19
+ return e.map(r).forEach((e) => {
20
+ e.type.forEach((t) => this._removeHandlers[t]?.(e));
21
+ }), this;
22
+ },
23
+ add(...e) {
24
+ return e.map(r).forEach((e) => {
25
+ e.type.forEach((t) => {
26
+ let n = this._addHandlers, r = this._queue;
27
+ n[t] ? n[t]?.(e) : (r[t] = r[t] || [], r[t]?.push(e));
28
+ });
29
+ }), this;
30
+ },
31
+ handle(e, t, n) {
32
+ let r = this._addHandlers, i = this._removeHandlers;
33
+ if (r[e] || i[e]) throw Error(`Extension type ${e} already has a handler`);
34
+ r[e] = t, i[e] = n;
35
+ let a = this._queue;
36
+ return a[e] && (a[e]?.forEach((e) => t(e)), delete a[e]), this;
37
+ },
38
+ handleByMap(e, t) {
39
+ return this.handle(e, (e) => {
40
+ e.name && (t[e.name] = e.ref);
41
+ }, (e) => {
42
+ e.name && delete t[e.name];
43
+ });
44
+ },
45
+ handleByNamedList(e, t, n = -1) {
46
+ return this.handle(e, (e) => {
47
+ t.findIndex((t) => t.name === e.name) >= 0 || (t.push({
48
+ name: e.name,
49
+ value: e.ref
50
+ }), t.sort((e, t) => i(t.value, n) - i(e.value, n)));
51
+ }, (e) => {
52
+ let n = t.findIndex((t) => t.name === e.name);
53
+ n !== -1 && t.splice(n, 1);
54
+ });
55
+ },
56
+ handleByList(e, t, n = -1) {
57
+ return this.handle(e, (e) => {
58
+ t.includes(e.ref) || (t.push(e.ref), t.sort((e, t) => i(t, n) - i(e, n)));
59
+ }, (e) => {
60
+ let n = t.indexOf(e.ref);
61
+ n !== -1 && t.splice(n, 1);
62
+ });
63
+ },
64
+ mixin(e, ...t) {
65
+ for (let n of t) Object.defineProperties(e.prototype, Object.getOwnPropertyDescriptors(n));
66
+ }
67
+ }, o = class e {
68
+ constructor(e, t, n) {
69
+ this._x = t || 0, this._y = n || 0, this._observer = e;
70
+ }
71
+ clone(t) {
72
+ return new e(t ?? this._observer, this._x, this._y);
73
+ }
74
+ set(e = 0, t = e) {
75
+ return (this._x !== e || this._y !== t) && (this._x = e, this._y = t, this._observer._onUpdate(this)), this;
76
+ }
77
+ copyFrom(e) {
78
+ return (this._x !== e.x || this._y !== e.y) && (this._x = e.x, this._y = e.y, this._observer._onUpdate(this)), this;
79
+ }
80
+ copyTo(e) {
81
+ return e.set(this._x, this._y), e;
82
+ }
83
+ equals(e) {
84
+ return e.x === this._x && e.y === this._y;
85
+ }
86
+ toString() {
87
+ return `[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`;
88
+ }
89
+ get x() {
90
+ return this._x;
91
+ }
92
+ set x(e) {
93
+ this._x !== e && (this._x = e, this._observer._onUpdate(this));
94
+ }
95
+ get y() {
96
+ return this._y;
97
+ }
98
+ set y(e) {
99
+ this._y !== e && (this._y = e, this._observer._onUpdate(this));
100
+ }
101
+ }, s = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
102
+ var n = Object.prototype.hasOwnProperty, r = "~";
103
+ function i() {}
104
+ Object.create && (i.prototype = Object.create(null), new i().__proto__ || (r = !1));
105
+ function a(e, t, n) {
106
+ this.fn = e, this.context = t, this.once = n || !1;
107
+ }
108
+ function o(e, t, n, i, o) {
109
+ if (typeof n != "function") throw TypeError("The listener must be a function");
110
+ var s = new a(n, i || e, o), c = r ? r + t : t;
111
+ return e._events[c] ? e._events[c].fn ? e._events[c] = [e._events[c], s] : e._events[c].push(s) : (e._events[c] = s, e._eventsCount++), e;
112
+ }
113
+ function s(e, t) {
114
+ --e._eventsCount === 0 ? e._events = new i() : delete e._events[t];
115
+ }
116
+ function c() {
117
+ this._events = new i(), this._eventsCount = 0;
118
+ }
119
+ c.prototype.eventNames = function() {
120
+ var e = [], t, i;
121
+ if (this._eventsCount === 0) return e;
122
+ for (i in t = this._events) n.call(t, i) && e.push(r ? i.slice(1) : i);
123
+ return Object.getOwnPropertySymbols ? e.concat(Object.getOwnPropertySymbols(t)) : e;
124
+ }, c.prototype.listeners = function(e) {
125
+ var t = r ? r + e : e, n = this._events[t];
126
+ if (!n) return [];
127
+ if (n.fn) return [n.fn];
128
+ for (var i = 0, a = n.length, o = Array(a); i < a; i++) o[i] = n[i].fn;
129
+ return o;
130
+ }, c.prototype.listenerCount = function(e) {
131
+ var t = r ? r + e : e, n = this._events[t];
132
+ return n ? n.fn ? 1 : n.length : 0;
133
+ }, c.prototype.emit = function(e, t, n, i, a, o) {
134
+ var s = r ? r + e : e;
135
+ if (!this._events[s]) return !1;
136
+ var c = this._events[s], l = arguments.length, u, d;
137
+ if (c.fn) {
138
+ switch (c.once && this.removeListener(e, c.fn, void 0, !0), l) {
139
+ case 1: return c.fn.call(c.context), !0;
140
+ case 2: return c.fn.call(c.context, t), !0;
141
+ case 3: return c.fn.call(c.context, t, n), !0;
142
+ case 4: return c.fn.call(c.context, t, n, i), !0;
143
+ case 5: return c.fn.call(c.context, t, n, i, a), !0;
144
+ case 6: return c.fn.call(c.context, t, n, i, a, o), !0;
145
+ }
146
+ for (d = 1, u = Array(l - 1); d < l; d++) u[d - 1] = arguments[d];
147
+ c.fn.apply(c.context, u);
148
+ } else {
149
+ var f = c.length, p;
150
+ for (d = 0; d < f; d++) switch (c[d].once && this.removeListener(e, c[d].fn, void 0, !0), l) {
151
+ case 1:
152
+ c[d].fn.call(c[d].context);
153
+ break;
154
+ case 2:
155
+ c[d].fn.call(c[d].context, t);
156
+ break;
157
+ case 3:
158
+ c[d].fn.call(c[d].context, t, n);
159
+ break;
160
+ case 4:
161
+ c[d].fn.call(c[d].context, t, n, i);
162
+ break;
163
+ default:
164
+ if (!u) for (p = 1, u = Array(l - 1); p < l; p++) u[p - 1] = arguments[p];
165
+ c[d].fn.apply(c[d].context, u);
166
+ }
167
+ }
168
+ return !0;
169
+ }, c.prototype.on = function(e, t, n) {
170
+ return o(this, e, t, n, !1);
171
+ }, c.prototype.once = function(e, t, n) {
172
+ return o(this, e, t, n, !0);
173
+ }, c.prototype.removeListener = function(e, t, n, i) {
174
+ var a = r ? r + e : e;
175
+ if (!this._events[a]) return this;
176
+ if (!t) return s(this, a), this;
177
+ var o = this._events[a];
178
+ if (o.fn) o.fn === t && (!i || o.once) && (!n || o.context === n) && s(this, a);
179
+ else {
180
+ for (var c = 0, l = [], u = o.length; c < u; c++) (o[c].fn !== t || i && !o[c].once || n && o[c].context !== n) && l.push(o[c]);
181
+ l.length ? this._events[a] = l.length === 1 ? l[0] : l : s(this, a);
182
+ }
183
+ return this;
184
+ }, c.prototype.removeAllListeners = function(e) {
185
+ var t;
186
+ return e ? (t = r ? r + e : e, this._events[t] && s(this, t)) : (this._events = new i(), this._eventsCount = 0), this;
187
+ }, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = r, c.EventEmitter = c, t !== void 0 && (t.exports = c);
188
+ })))(), 1)).default, c = Math.PI * 2, l = 180 / Math.PI, u = Math.PI / 180, d = class e {
189
+ constructor(e = 0, t = 0) {
190
+ this.x = 0, this.y = 0, this.x = e, this.y = t;
191
+ }
192
+ clone() {
193
+ return new e(this.x, this.y);
194
+ }
195
+ copyFrom(e) {
196
+ return this.set(e.x, e.y), this;
197
+ }
198
+ copyTo(e) {
199
+ return e.set(this.x, this.y), e;
200
+ }
201
+ equals(e) {
202
+ return e.x === this.x && e.y === this.y;
203
+ }
204
+ set(e = 0, t = e) {
205
+ return this.x = e, this.y = t, this;
206
+ }
207
+ toString() {
208
+ return `[pixi.js/math:Point x=${this.x} y=${this.y}]`;
209
+ }
210
+ static get shared() {
211
+ return f.x = 0, f.y = 0, f;
212
+ }
213
+ }, f = new d(), p = class e {
214
+ constructor(e = 1, t = 0, n = 0, r = 1, i = 0, a = 0) {
215
+ this.array = null, this.a = e, this.b = t, this.c = n, this.d = r, this.tx = i, this.ty = a;
216
+ }
217
+ fromArray(e) {
218
+ this.a = e[0], this.b = e[1], this.c = e[3], this.d = e[4], this.tx = e[2], this.ty = e[5];
219
+ }
220
+ set(e, t, n, r, i, a) {
221
+ return this.a = e, this.b = t, this.c = n, this.d = r, this.tx = i, this.ty = a, this;
222
+ }
223
+ toArray(e, t) {
224
+ this.array ||= /* @__PURE__ */ new Float32Array(9);
225
+ let n = t || this.array;
226
+ return e ? (n[0] = this.a, n[1] = this.b, n[2] = 0, n[3] = this.c, n[4] = this.d, n[5] = 0, n[6] = this.tx, n[7] = this.ty, n[8] = 1) : (n[0] = this.a, n[1] = this.c, n[2] = this.tx, n[3] = this.b, n[4] = this.d, n[5] = this.ty, n[6] = 0, n[7] = 0, n[8] = 1), n;
227
+ }
228
+ apply(e, t) {
229
+ t ||= new d();
230
+ let n = e.x, r = e.y;
231
+ return t.x = this.a * n + this.c * r + this.tx, t.y = this.b * n + this.d * r + this.ty, t;
232
+ }
233
+ applyInverse(e, t) {
234
+ t ||= new d();
235
+ let n = this.a, r = this.b, i = this.c, a = this.d, o = this.tx, s = this.ty, c = 1 / (n * a + i * -r), l = e.x, u = e.y;
236
+ return t.x = a * c * l + -i * c * u + (s * i - o * a) * c, t.y = n * c * u + -r * c * l + (-s * n + o * r) * c, t;
237
+ }
238
+ translate(e, t) {
239
+ return this.tx += e, this.ty += t, this;
240
+ }
241
+ scale(e, t) {
242
+ return this.a *= e, this.d *= t, this.c *= e, this.b *= t, this.tx *= e, this.ty *= t, this;
243
+ }
244
+ rotate(e) {
245
+ let t = Math.cos(e), n = Math.sin(e), r = this.a, i = this.c, a = this.tx;
246
+ return this.a = r * t - this.b * n, this.b = r * n + this.b * t, this.c = i * t - this.d * n, this.d = i * n + this.d * t, this.tx = a * t - this.ty * n, this.ty = a * n + this.ty * t, this;
247
+ }
248
+ append(e) {
249
+ let t = this.a, n = this.b, r = this.c, i = this.d;
250
+ return this.a = e.a * t + e.b * r, this.b = e.a * n + e.b * i, this.c = e.c * t + e.d * r, this.d = e.c * n + e.d * i, this.tx = e.tx * t + e.ty * r + this.tx, this.ty = e.tx * n + e.ty * i + this.ty, this;
251
+ }
252
+ appendFrom(e, t) {
253
+ let n = e.a, r = e.b, i = e.c, a = e.d, o = e.tx, s = e.ty, c = t.a, l = t.b, u = t.c, d = t.d;
254
+ return this.a = n * c + r * u, this.b = n * l + r * d, this.c = i * c + a * u, this.d = i * l + a * d, this.tx = o * c + s * u + t.tx, this.ty = o * l + s * d + t.ty, this;
255
+ }
256
+ setTransform(e, t, n, r, i, a, o, s, c) {
257
+ return this.a = Math.cos(o + c) * i, this.b = Math.sin(o + c) * i, this.c = -Math.sin(o - s) * a, this.d = Math.cos(o - s) * a, this.tx = e - (n * this.a + r * this.c), this.ty = t - (n * this.b + r * this.d), this;
258
+ }
259
+ prepend(e) {
260
+ let t = this.tx;
261
+ if (e.a !== 1 || e.b !== 0 || e.c !== 0 || e.d !== 1) {
262
+ let t = this.a, n = this.c;
263
+ this.a = t * e.a + this.b * e.c, this.b = t * e.b + this.b * e.d, this.c = n * e.a + this.d * e.c, this.d = n * e.b + this.d * e.d;
264
+ }
265
+ return this.tx = t * e.a + this.ty * e.c + e.tx, this.ty = t * e.b + this.ty * e.d + e.ty, this;
266
+ }
267
+ decompose(e) {
268
+ let t = this.a, n = this.b, r = this.c, i = this.d, a = e.pivot, o = -Math.atan2(-r, i), s = Math.atan2(n, t), l = Math.abs(o + s);
269
+ return l < 1e-5 || Math.abs(c - l) < 1e-5 ? (e.rotation = s, e.skew.x = e.skew.y = 0) : (e.rotation = 0, e.skew.x = o, e.skew.y = s), e.scale.x = Math.sqrt(t * t + n * n), e.scale.y = Math.sqrt(r * r + i * i), e.position.x = this.tx + (a.x * t + a.y * r), e.position.y = this.ty + (a.x * n + a.y * i), e;
270
+ }
271
+ invert() {
272
+ let e = this.a, t = this.b, n = this.c, r = this.d, i = this.tx, a = e * r - t * n;
273
+ return this.a = r / a, this.b = -t / a, this.c = -n / a, this.d = e / a, this.tx = (n * this.ty - r * i) / a, this.ty = -(e * this.ty - t * i) / a, this;
274
+ }
275
+ isIdentity() {
276
+ return this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1 && this.tx === 0 && this.ty === 0;
277
+ }
278
+ identity() {
279
+ return this.a = 1, this.b = 0, this.c = 0, this.d = 1, this.tx = 0, this.ty = 0, this;
280
+ }
281
+ clone() {
282
+ let t = new e();
283
+ return t.a = this.a, t.b = this.b, t.c = this.c, t.d = this.d, t.tx = this.tx, t.ty = this.ty, t;
284
+ }
285
+ copyTo(e) {
286
+ return e.a = this.a, e.b = this.b, e.c = this.c, e.d = this.d, e.tx = this.tx, e.ty = this.ty, e;
287
+ }
288
+ copyFrom(e) {
289
+ return this.a = e.a, this.b = e.b, this.c = e.c, this.d = e.d, this.tx = e.tx, this.ty = e.ty, this;
290
+ }
291
+ equals(e) {
292
+ return e.a === this.a && e.b === this.b && e.c === this.c && e.d === this.d && e.tx === this.tx && e.ty === this.ty;
293
+ }
294
+ toString() {
295
+ return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`;
296
+ }
297
+ static get IDENTITY() {
298
+ return h.identity();
299
+ }
300
+ static get shared() {
301
+ return m.identity();
302
+ }
303
+ }, m = new p(), h = new p(), g = [
304
+ 1,
305
+ 1,
306
+ 0,
307
+ -1,
308
+ -1,
309
+ -1,
310
+ 0,
311
+ 1,
312
+ 1,
313
+ 1,
314
+ 0,
315
+ -1,
316
+ -1,
317
+ -1,
318
+ 0,
319
+ 1
320
+ ], _ = [
321
+ 0,
322
+ 1,
323
+ 1,
324
+ 1,
325
+ 0,
326
+ -1,
327
+ -1,
328
+ -1,
329
+ 0,
330
+ 1,
331
+ 1,
332
+ 1,
333
+ 0,
334
+ -1,
335
+ -1,
336
+ -1
337
+ ], v = [
338
+ 0,
339
+ -1,
340
+ -1,
341
+ -1,
342
+ 0,
343
+ 1,
344
+ 1,
345
+ 1,
346
+ 0,
347
+ 1,
348
+ 1,
349
+ 1,
350
+ 0,
351
+ -1,
352
+ -1,
353
+ -1
354
+ ], y = [
355
+ 1,
356
+ 1,
357
+ 0,
358
+ -1,
359
+ -1,
360
+ -1,
361
+ 0,
362
+ 1,
363
+ -1,
364
+ -1,
365
+ 0,
366
+ 1,
367
+ 1,
368
+ 1,
369
+ 0,
370
+ -1
371
+ ], b = [], x = [], S = Math.sign;
372
+ function ee() {
373
+ for (let e = 0; e < 16; e++) {
374
+ let t = [];
375
+ b.push(t);
376
+ for (let n = 0; n < 16; n++) {
377
+ let r = S(g[e] * g[n] + v[e] * _[n]), i = S(_[e] * g[n] + y[e] * _[n]), a = S(g[e] * v[n] + v[e] * y[n]), o = S(_[e] * v[n] + y[e] * y[n]);
378
+ for (let e = 0; e < 16; e++) if (g[e] === r && _[e] === i && v[e] === a && y[e] === o) {
379
+ t.push(e);
380
+ break;
381
+ }
382
+ }
383
+ }
384
+ for (let e = 0; e < 16; e++) {
385
+ let t = new p();
386
+ t.set(g[e], _[e], v[e], y[e], 0, 0), x.push(t);
387
+ }
388
+ }
389
+ ee();
390
+ var C = {
391
+ E: 0,
392
+ SE: 1,
393
+ S: 2,
394
+ SW: 3,
395
+ W: 4,
396
+ NW: 5,
397
+ N: 6,
398
+ NE: 7,
399
+ MIRROR_VERTICAL: 8,
400
+ MAIN_DIAGONAL: 10,
401
+ MIRROR_HORIZONTAL: 12,
402
+ REVERSE_DIAGONAL: 14,
403
+ uX: (e) => g[e],
404
+ uY: (e) => _[e],
405
+ vX: (e) => v[e],
406
+ vY: (e) => y[e],
407
+ inv: (e) => e & 8 ? e & 15 : -e & 7,
408
+ add: (e, t) => b[e][t],
409
+ sub: (e, t) => b[e][C.inv(t)],
410
+ rotate180: (e) => e ^ 4,
411
+ isVertical: (e) => (e & 3) == 2,
412
+ byDirection: (e, t) => Math.abs(e) * 2 <= Math.abs(t) ? t >= 0 ? C.S : C.N : Math.abs(t) * 2 <= Math.abs(e) ? e > 0 ? C.E : C.W : t > 0 ? e > 0 ? C.SE : C.SW : e > 0 ? C.NE : C.NW,
413
+ matrixAppendRotationInv: (e, t, n = 0, r = 0, i = 0, a = 0) => {
414
+ let o = x[C.inv(t)], s = o.a, c = o.b, l = o.c, u = o.d, d = n - Math.min(0, s * i, l * a, s * i + l * a), f = r - Math.min(0, c * i, u * a, c * i + u * a), p = e.a, m = e.b, h = e.c, g = e.d;
415
+ e.a = s * p + c * h, e.b = s * m + c * g, e.c = l * p + u * h, e.d = l * m + u * g, e.tx = d * p + f * h + e.tx, e.ty = d * m + f * g + e.ty;
416
+ },
417
+ transformRectCoords: (e, t, n, r) => {
418
+ let { x: i, y: a, width: o, height: s } = e, { x: c, y: l, width: u, height: d } = t;
419
+ return n === C.E ? (r.set(i + c, a + l, o, s), r) : n === C.S ? r.set(u - a - s + c, i + l, s, o) : n === C.W ? r.set(u - i - o + c, d - a - s + l, o, s) : n === C.N ? r.set(a + c, d - i - o + l, s, o) : r.set(i + c, a + l, o, s);
420
+ }
421
+ }, te = [
422
+ new d(),
423
+ new d(),
424
+ new d(),
425
+ new d()
426
+ ], ne = class e {
427
+ constructor(e = 0, t = 0, n = 0, r = 0) {
428
+ this.type = "rectangle", this.x = Number(e), this.y = Number(t), this.width = Number(n), this.height = Number(r);
429
+ }
430
+ get left() {
431
+ return this.x;
432
+ }
433
+ get right() {
434
+ return this.x + this.width;
435
+ }
436
+ get top() {
437
+ return this.y;
438
+ }
439
+ get bottom() {
440
+ return this.y + this.height;
441
+ }
442
+ isEmpty() {
443
+ return this.left === this.right || this.top === this.bottom;
444
+ }
445
+ static get EMPTY() {
446
+ return new e(0, 0, 0, 0);
447
+ }
448
+ clone() {
449
+ return new e(this.x, this.y, this.width, this.height);
450
+ }
451
+ copyFromBounds(e) {
452
+ return this.x = e.minX, this.y = e.minY, this.width = e.maxX - e.minX, this.height = e.maxY - e.minY, this;
453
+ }
454
+ copyFrom(e) {
455
+ return this.x = e.x, this.y = e.y, this.width = e.width, this.height = e.height, this;
456
+ }
457
+ copyTo(e) {
458
+ return e.copyFrom(this), e;
459
+ }
460
+ contains(e, t) {
461
+ return this.width <= 0 || this.height <= 0 ? !1 : e >= this.x && e < this.x + this.width && t >= this.y && t < this.y + this.height;
462
+ }
463
+ strokeContains(e, t, n, r = .5) {
464
+ let { width: i, height: a } = this;
465
+ if (i <= 0 || a <= 0) return !1;
466
+ let o = this.x, s = this.y, c = n * (1 - r), l = n - c, u = o - c, d = o + i + c, f = s - c, p = s + a + c, m = o + l, h = o + i - l, g = s + l, _ = s + a - l;
467
+ return e >= u && e <= d && t >= f && t <= p && !(e > m && e < h && t > g && t < _);
468
+ }
469
+ intersects(e, t) {
470
+ if (!t) {
471
+ let t = this.x < e.x ? e.x : this.x;
472
+ if ((this.right > e.right ? e.right : this.right) <= t) return !1;
473
+ let n = this.y < e.y ? e.y : this.y;
474
+ return (this.bottom > e.bottom ? e.bottom : this.bottom) > n;
475
+ }
476
+ let n = this.left, r = this.right, i = this.top, a = this.bottom;
477
+ if (r <= n || a <= i) return !1;
478
+ let o = te[0].set(e.left, e.top), s = te[1].set(e.left, e.bottom), c = te[2].set(e.right, e.top), l = te[3].set(e.right, e.bottom);
479
+ if (c.x <= o.x || s.y <= o.y) return !1;
480
+ let u = Math.sign(t.a * t.d - t.b * t.c);
481
+ if (u === 0 || (t.apply(o, o), t.apply(s, s), t.apply(c, c), t.apply(l, l), Math.max(o.x, s.x, c.x, l.x) <= n || Math.min(o.x, s.x, c.x, l.x) >= r || Math.max(o.y, s.y, c.y, l.y) <= i || Math.min(o.y, s.y, c.y, l.y) >= a)) return !1;
482
+ let d = u * (s.y - o.y), f = u * (o.x - s.x), p = d * n + f * i, m = d * r + f * i, h = d * n + f * a, g = d * r + f * a;
483
+ if (Math.max(p, m, h, g) <= d * o.x + f * o.y || Math.min(p, m, h, g) >= d * l.x + f * l.y) return !1;
484
+ let _ = u * (o.y - c.y), v = u * (c.x - o.x), y = _ * n + v * i, b = _ * r + v * i, x = _ * n + v * a, S = _ * r + v * a;
485
+ return !(Math.max(y, b, x, S) <= _ * o.x + v * o.y || Math.min(y, b, x, S) >= _ * l.x + v * l.y);
486
+ }
487
+ pad(e = 0, t = e) {
488
+ return this.x -= e, this.y -= t, this.width += e * 2, this.height += t * 2, this;
489
+ }
490
+ fit(e) {
491
+ let t = Math.max(this.x, e.x), n = Math.min(this.x + this.width, e.x + e.width), r = Math.max(this.y, e.y), i = Math.min(this.y + this.height, e.y + e.height);
492
+ return this.x = t, this.width = Math.max(n - t, 0), this.y = r, this.height = Math.max(i - r, 0), this;
493
+ }
494
+ ceil(e = 1, t = .001) {
495
+ let n = Math.ceil((this.x + this.width - t) * e) / e, r = Math.ceil((this.y + this.height - t) * e) / e;
496
+ return this.x = Math.floor((this.x + t) * e) / e, this.y = Math.floor((this.y + t) * e) / e, this.width = n - this.x, this.height = r - this.y, this;
497
+ }
498
+ scale(e, t = e) {
499
+ return this.x *= e, this.y *= t, this.width *= e, this.height *= t, this;
500
+ }
501
+ enlarge(e) {
502
+ let t = Math.min(this.x, e.x), n = Math.max(this.x + this.width, e.x + e.width), r = Math.min(this.y, e.y), i = Math.max(this.y + this.height, e.y + e.height);
503
+ return this.x = t, this.width = n - t, this.y = r, this.height = i - r, this;
504
+ }
505
+ getBounds(t) {
506
+ return t ||= new e(), t.copyFrom(this), t;
507
+ }
508
+ containsRect(e) {
509
+ if (this.width <= 0 || this.height <= 0) return !1;
510
+ let t = e.x, n = e.y, r = e.x + e.width, i = e.y + e.height;
511
+ return t >= this.x && t < this.x + this.width && n >= this.y && n < this.y + this.height && r >= this.x && r <= this.x + this.width && i >= this.y && i <= this.y + this.height;
512
+ }
513
+ set(e, t, n, r) {
514
+ return this.x = e, this.y = t, this.width = n, this.height = r, this;
515
+ }
516
+ toString() {
517
+ return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`;
518
+ }
519
+ }, re = { default: -1 };
520
+ function w(e = "default") {
521
+ return re[e] === void 0 && (re[e] = -1), ++re[e];
522
+ }
523
+ //#endregion
524
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/logging/deprecation.mjs
525
+ var ie = /* @__PURE__ */ new Set(), T = "8.0.0", ae = "8.3.4", E = {
526
+ quiet: !1,
527
+ noColor: !1
528
+ }, D = ((e, t, n = 3) => {
529
+ if (E.quiet || ie.has(t)) return;
530
+ let r = (/* @__PURE__ */ Error()).stack, i = `${t}
531
+ Deprecated since v${e}`, a = typeof console.groupCollapsed == "function" && !E.noColor;
532
+ r === void 0 ? console.warn("PixiJS Deprecation Warning: ", i) : (r = r.split("\n").splice(n).join("\n"), a ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", i), console.warn(r), console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", i), console.warn(r))), ie.add(t);
533
+ });
534
+ Object.defineProperties(D, {
535
+ quiet: {
536
+ get: () => E.quiet,
537
+ set: (e) => {
538
+ E.quiet = e;
539
+ },
540
+ enumerable: !0,
541
+ configurable: !1
542
+ },
543
+ noColor: {
544
+ get: () => E.noColor,
545
+ set: (e) => {
546
+ E.noColor = e;
547
+ },
548
+ enumerable: !0,
549
+ configurable: !1
550
+ }
551
+ });
552
+ //#endregion
553
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/misc/NOOP.mjs
554
+ var oe = () => {};
555
+ //#endregion
556
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/maths/misc/pow2.mjs
557
+ function se(e) {
558
+ return e += +(e === 0), --e, e |= e >>> 1, e |= e >>> 2, e |= e >>> 4, e |= e >>> 8, e |= e >>> 16, e + 1;
559
+ }
560
+ function ce(e) {
561
+ return !(e & e - 1) && !!e;
562
+ }
563
+ //#endregion
564
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/definedProps.mjs
565
+ function le(e) {
566
+ let t = {};
567
+ for (let n in e) e[n] !== void 0 && (t[n] = e[n]);
568
+ return t;
569
+ }
570
+ //#endregion
571
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureStyle.mjs
572
+ var ue = /* @__PURE__ */ Object.create(null);
573
+ function de(e) {
574
+ let t = ue[e];
575
+ return t === void 0 && (ue[e] = w("resource")), t;
576
+ }
577
+ var fe = class e extends s {
578
+ constructor(t = {}) {
579
+ super(), this._resourceType = "textureSampler", this._touched = 0, this._maxAnisotropy = 1, this.destroyed = !1, t = {
580
+ ...e.defaultOptions,
581
+ ...t
582
+ }, this.addressMode = t.addressMode, this.addressModeU = t.addressModeU ?? this.addressModeU, this.addressModeV = t.addressModeV ?? this.addressModeV, this.addressModeW = t.addressModeW ?? this.addressModeW, this.scaleMode = t.scaleMode, this.magFilter = t.magFilter ?? this.magFilter, this.minFilter = t.minFilter ?? this.minFilter, this.mipmapFilter = t.mipmapFilter ?? this.mipmapFilter, this.lodMinClamp = t.lodMinClamp, this.lodMaxClamp = t.lodMaxClamp, this.compare = t.compare, this.maxAnisotropy = t.maxAnisotropy ?? 1;
583
+ }
584
+ set addressMode(e) {
585
+ this.addressModeU = e, this.addressModeV = e, this.addressModeW = e;
586
+ }
587
+ get addressMode() {
588
+ return this.addressModeU;
589
+ }
590
+ set wrapMode(e) {
591
+ D(T, "TextureStyle.wrapMode is now TextureStyle.addressMode"), this.addressMode = e;
592
+ }
593
+ get wrapMode() {
594
+ return this.addressMode;
595
+ }
596
+ set scaleMode(e) {
597
+ this.magFilter = e, this.minFilter = e, this.mipmapFilter = e;
598
+ }
599
+ get scaleMode() {
600
+ return this.magFilter;
601
+ }
602
+ set maxAnisotropy(e) {
603
+ this._maxAnisotropy = Math.min(e, 16), this._maxAnisotropy > 1 && (this.scaleMode = "linear");
604
+ }
605
+ get maxAnisotropy() {
606
+ return this._maxAnisotropy;
607
+ }
608
+ get _resourceId() {
609
+ return this._sharedResourceId || this._generateResourceId();
610
+ }
611
+ update() {
612
+ this._sharedResourceId = null, this.emit("change", this);
613
+ }
614
+ _generateResourceId() {
615
+ let e = `${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;
616
+ return this._sharedResourceId = de(e), this._resourceId;
617
+ }
618
+ destroy() {
619
+ this.destroyed = !0, this.emit("destroy", this), this.emit("change", this), this.removeAllListeners();
620
+ }
621
+ };
622
+ fe.defaultOptions = {
623
+ addressMode: "clamp-to-edge",
624
+ scaleMode: "linear"
625
+ };
626
+ var pe = fe, me = class e extends s {
627
+ constructor(t = {}) {
628
+ super(), this.options = t, this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.uid = w("textureSource"), this._resourceType = "textureSource", this._resourceId = w("resource"), this.uploadMethodId = "unknown", this._resolution = 1, this.pixelWidth = 1, this.pixelHeight = 1, this.width = 1, this.height = 1, this.sampleCount = 1, this.mipLevelCount = 1, this.autoGenerateMipmaps = !1, this.format = "rgba8unorm", this.dimension = "2d", this.viewDimension = "2d", this.arrayLayerCount = 1, this._ownsStyle = !1, this.antialias = !1, this.transient = !1, this._touched = 0, this._batchTick = -1, this._textureBindLocation = -1, t = {
629
+ ...e.defaultOptions,
630
+ ...t
631
+ }, this.label = t.label ?? "", this.resource = t.resource, this.autoGarbageCollect = t.autoGarbageCollect, this._resolution = t.resolution, t.width ? this.pixelWidth = t.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1, t.height ? this.pixelHeight = t.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1, this.width = this.pixelWidth / this._resolution, this.height = this.pixelHeight / this._resolution, this.format = t.format, this.dimension = t.dimensions, this.viewDimension = t.viewDimension ?? t.dimensions, this.arrayLayerCount = t.arrayLayerCount, this.mipLevelCount = t.mipLevelCount, this.autoGenerateMipmaps = t.autoGenerateMipmaps, this.sampleCount = t.sampleCount, this.antialias = t.antialias, this.transient = t.transient ?? !1, this.alphaMode = t.alphaMode, this.style = new pe(le(t)), this._ownsStyle = !0, this.destroyed = !1, this._refreshPOT();
632
+ }
633
+ get source() {
634
+ return this;
635
+ }
636
+ get style() {
637
+ return this._style;
638
+ }
639
+ set style(e) {
640
+ this.style !== e && (this._ownsStyle = !1, this._style?.off("change", this._onStyleChange, this), this._style = e, this._style?.on("change", this._onStyleChange, this), this._onStyleChange());
641
+ }
642
+ set maxAnisotropy(e) {
643
+ this._style.maxAnisotropy = e;
644
+ }
645
+ get maxAnisotropy() {
646
+ return this._style.maxAnisotropy;
647
+ }
648
+ get addressMode() {
649
+ return this._style.addressMode;
650
+ }
651
+ set addressMode(e) {
652
+ this._style.addressMode = e;
653
+ }
654
+ get repeatMode() {
655
+ return this._style.addressMode;
656
+ }
657
+ set repeatMode(e) {
658
+ this._style.addressMode = e;
659
+ }
660
+ get magFilter() {
661
+ return this._style.magFilter;
662
+ }
663
+ set magFilter(e) {
664
+ this._style.magFilter = e;
665
+ }
666
+ get minFilter() {
667
+ return this._style.minFilter;
668
+ }
669
+ set minFilter(e) {
670
+ this._style.minFilter = e;
671
+ }
672
+ get mipmapFilter() {
673
+ return this._style.mipmapFilter;
674
+ }
675
+ set mipmapFilter(e) {
676
+ this._style.mipmapFilter = e;
677
+ }
678
+ get lodMinClamp() {
679
+ return this._style.lodMinClamp;
680
+ }
681
+ set lodMinClamp(e) {
682
+ this._style.lodMinClamp = e;
683
+ }
684
+ get lodMaxClamp() {
685
+ return this._style.lodMaxClamp;
686
+ }
687
+ set lodMaxClamp(e) {
688
+ this._style.lodMaxClamp = e;
689
+ }
690
+ _onStyleChange() {
691
+ this.emit("styleChange", this);
692
+ }
693
+ update() {
694
+ if (this.resource) {
695
+ let e = this._resolution;
696
+ if (this.resize(this.resourceWidth / e, this.resourceHeight / e)) return;
697
+ }
698
+ this.emit("update", this);
699
+ }
700
+ destroy() {
701
+ this.destroyed = !0, this.unload(), this.emit("destroy", this), this._style &&= (this._ownsStyle && this._style.destroy(), null), this.uploadMethodId = null, this.resource = null, this.removeAllListeners();
702
+ }
703
+ unload() {
704
+ this._resourceId = w("resource"), this.emit("change", this), this.emit("unload", this);
705
+ for (let e in this._gpuData) this._gpuData[e]?.destroy?.();
706
+ this._gpuData = /* @__PURE__ */ Object.create(null);
707
+ }
708
+ get resourceWidth() {
709
+ let { resource: e } = this;
710
+ return e.naturalWidth || e.videoWidth || e.displayWidth || e.width;
711
+ }
712
+ get resourceHeight() {
713
+ let { resource: e } = this;
714
+ return e.naturalHeight || e.videoHeight || e.displayHeight || e.height;
715
+ }
716
+ get resolution() {
717
+ return this._resolution;
718
+ }
719
+ set resolution(e) {
720
+ this._resolution !== e && (this._resolution = e, this.width = this.pixelWidth / e, this.height = this.pixelHeight / e);
721
+ }
722
+ resize(e, t, n) {
723
+ n ||= this._resolution, e ||= this.width, t ||= this.height;
724
+ let r = Math.round(e * n), i = Math.round(t * n);
725
+ return this.width = r / n, this.height = i / n, this._resolution = n, this.pixelWidth === r && this.pixelHeight === i ? !1 : (this._refreshPOT(), this.pixelWidth = r, this.pixelHeight = i, this.emit("resize", this), this._resourceId = w("resource"), this.emit("change", this), !0);
726
+ }
727
+ updateMipmaps() {
728
+ this.autoGenerateMipmaps && this.mipLevelCount > 1 && this.emit("updateMipmaps", this);
729
+ }
730
+ set wrapMode(e) {
731
+ this._style.wrapMode = e;
732
+ }
733
+ get wrapMode() {
734
+ return this._style.wrapMode;
735
+ }
736
+ set scaleMode(e) {
737
+ this._style.scaleMode = e;
738
+ }
739
+ get scaleMode() {
740
+ return this._style.scaleMode;
741
+ }
742
+ _refreshPOT() {
743
+ this.isPowerOfTwo = ce(this.pixelWidth) && ce(this.pixelHeight);
744
+ }
745
+ static test(e) {
746
+ throw Error("Unimplemented");
747
+ }
748
+ };
749
+ me.defaultOptions = {
750
+ resolution: 1,
751
+ format: "bgra8unorm",
752
+ alphaMode: "premultiply-alpha-on-upload",
753
+ dimensions: "2d",
754
+ viewDimension: "2d",
755
+ arrayLayerCount: 1,
756
+ mipLevelCount: 1,
757
+ autoGenerateMipmaps: !1,
758
+ sampleCount: 1,
759
+ antialias: !1,
760
+ autoGarbageCollect: !1
761
+ };
762
+ var O = me, he = class extends O {
763
+ constructor(e) {
764
+ let t = e.resource || new Float32Array(e.width * e.height * 4), n = e.format;
765
+ n ||= t instanceof Float32Array ? "rgba32float" : t instanceof Int32Array || t instanceof Uint32Array ? "rgba32uint" : t instanceof Int16Array || t instanceof Uint16Array ? "rgba16uint" : (t instanceof Int8Array, "bgra8unorm"), super({
766
+ ...e,
767
+ resource: t,
768
+ format: n
769
+ }), this.uploadMethodId = "buffer";
770
+ }
771
+ static test(e) {
772
+ return e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array;
773
+ }
774
+ };
775
+ he.extension = n.TextureSource;
776
+ //#endregion
777
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/texture/TextureMatrix.mjs
778
+ var ge = new p(), _e = class {
779
+ constructor(e, t) {
780
+ this.mapCoord = new p(), this.uClampFrame = /* @__PURE__ */ new Float32Array(4), this.uClampOffset = /* @__PURE__ */ new Float32Array(2), this._updateID = 0, this.clampOffset = 0, t === void 0 ? this.clampMargin = e.width < 10 ? 0 : .5 : this.clampMargin = t, this.isSimple = !1, this.texture = e;
781
+ }
782
+ get texture() {
783
+ return this._texture;
784
+ }
785
+ set texture(e) {
786
+ this._texture !== e && (this._texture?.removeListener("update", this.update, this), this._texture = e, this._texture.addListener("update", this.update, this)), this.update();
787
+ }
788
+ destroy() {
789
+ this._texture?.removeListener("update", this.update, this), this._texture = null;
790
+ }
791
+ multiplyUvs(e, t) {
792
+ t === void 0 && (t = e);
793
+ let n = this.mapCoord;
794
+ for (let r = 0; r < e.length; r += 2) {
795
+ let i = e[r], a = e[r + 1];
796
+ t[r] = i * n.a + a * n.c + n.tx, t[r + 1] = i * n.b + a * n.d + n.ty;
797
+ }
798
+ return t;
799
+ }
800
+ update() {
801
+ let e = this._texture;
802
+ this._updateID++;
803
+ let t = e.uvs;
804
+ this.mapCoord.set(t.x1 - t.x0, t.y1 - t.y0, t.x3 - t.x0, t.y3 - t.y0, t.x0, t.y0);
805
+ let n = e.orig, r = e.trim;
806
+ r && (ge.set(n.width / r.width, 0, 0, n.height / r.height, -r.x / r.width, -r.y / r.height), this.mapCoord.append(ge));
807
+ let i = e.source, a = this.uClampFrame, o = this.clampMargin / i._resolution, s = this.clampOffset / i._resolution;
808
+ return a[0] = (e.frame.x + o + s) / i.width, a[1] = (e.frame.y + o + s) / i.height, a[2] = (e.frame.x + e.frame.width - o + s) / i.width, a[3] = (e.frame.y + e.frame.height - o + s) / i.height, this.uClampOffset[0] = this.clampOffset / i.pixelWidth, this.uClampOffset[1] = this.clampOffset / i.pixelHeight, this.isSimple = e.frame.width === i.width && e.frame.height === i.height && e.rotate === 0, !0;
809
+ }
810
+ }, k = class extends s {
811
+ constructor({ source: e, label: t, frame: n, orig: r, trim: i, defaultAnchor: a, defaultBorders: o, rotate: s, dynamic: c } = {}) {
812
+ if (super(), this.uid = w("texture"), this.uvs = {
813
+ x0: 0,
814
+ y0: 0,
815
+ x1: 0,
816
+ y1: 0,
817
+ x2: 0,
818
+ y2: 0,
819
+ x3: 0,
820
+ y3: 0
821
+ }, this.frame = new ne(), this.noFrame = !1, this.dynamic = !1, this.isTexture = !0, this.label = t, this.source = e?.source ?? new O(), this.noFrame = !n, n) this.frame.copyFrom(n);
822
+ else {
823
+ let { width: e, height: t } = this._source;
824
+ this.frame.width = e, this.frame.height = t;
825
+ }
826
+ this.orig = r || this.frame, this.trim = i, this.rotate = s ?? 0, this.defaultAnchor = a, this.defaultBorders = o, this.destroyed = !1, this.dynamic = c || !1, this.updateUvs();
827
+ }
828
+ set source(e) {
829
+ this._source && this._source.off("resize", this.update, this), this._source = e, e.on("resize", this.update, this), this.emit("update", this);
830
+ }
831
+ get source() {
832
+ return this._source;
833
+ }
834
+ get textureMatrix() {
835
+ return this._textureMatrix ||= new _e(this), this._textureMatrix;
836
+ }
837
+ get width() {
838
+ return this.orig.width;
839
+ }
840
+ get height() {
841
+ return this.orig.height;
842
+ }
843
+ updateUvs() {
844
+ let { uvs: e, frame: t } = this, { width: n, height: r } = this._source, i = t.x / n, a = t.y / r, o = t.width / n, s = t.height / r, c = this.rotate;
845
+ if (c) {
846
+ let t = o / 2, n = s / 2, r = i + t, l = a + n;
847
+ c = C.add(c, C.NW), e.x0 = r + t * C.uX(c), e.y0 = l + n * C.uY(c), c = C.add(c, 2), e.x1 = r + t * C.uX(c), e.y1 = l + n * C.uY(c), c = C.add(c, 2), e.x2 = r + t * C.uX(c), e.y2 = l + n * C.uY(c), c = C.add(c, 2), e.x3 = r + t * C.uX(c), e.y3 = l + n * C.uY(c);
848
+ } else e.x0 = i, e.y0 = a, e.x1 = i + o, e.y1 = a, e.x2 = i + o, e.y2 = a + s, e.x3 = i, e.y3 = a + s;
849
+ }
850
+ destroy(e = !1) {
851
+ this._source && (this._source.off("resize", this.update, this), e && (this._source.destroy(), this._source = null)), this._textureMatrix = null, this.destroyed = !0, this.emit("destroy", this), this.removeAllListeners();
852
+ }
853
+ update() {
854
+ this.noFrame && (this.frame.width = this._source.width, this.frame.height = this._source.height), this.updateUvs(), this.emit("update", this);
855
+ }
856
+ get baseTexture() {
857
+ return D(T, "Texture.baseTexture is now Texture.source"), this._source;
858
+ }
859
+ };
860
+ k.EMPTY = new k({
861
+ label: "EMPTY",
862
+ source: new O({ label: "EMPTY" })
863
+ }), k.EMPTY.destroy = oe, k.WHITE = new k({
864
+ source: new he({
865
+ resource: new Uint8Array([
866
+ 255,
867
+ 255,
868
+ 255,
869
+ 255
870
+ ]),
871
+ width: 1,
872
+ height: 1,
873
+ alphaMode: "premultiply-alpha-on-upload",
874
+ label: "WHITE"
875
+ }),
876
+ label: "WHITE"
877
+ }), k.WHITE.destroy = oe;
878
+ //#endregion
879
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/updateQuadBounds.mjs
880
+ function ve(e, t, n) {
881
+ let { width: r, height: i } = n.orig, a = n.trim;
882
+ if (a) {
883
+ let n = a.width, o = a.height;
884
+ e.minX = a.x - t._x * r, e.maxX = e.minX + n, e.minY = a.y - t._y * i, e.maxY = e.minY + o;
885
+ } else e.minX = -t._x * r, e.maxX = e.minX + r, e.minY = -t._y * i, e.maxY = e.minY + i;
886
+ }
887
+ //#endregion
888
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/Bounds.mjs
889
+ var ye = new p(), A = class e {
890
+ constructor(e = Infinity, t = Infinity, n = -Infinity, r = -Infinity) {
891
+ this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity, this.matrix = ye, this.minX = e, this.minY = t, this.maxX = n, this.maxY = r;
892
+ }
893
+ isEmpty() {
894
+ return this.minX > this.maxX || this.minY > this.maxY;
895
+ }
896
+ get rectangle() {
897
+ this._rectangle ||= new ne();
898
+ let e = this._rectangle;
899
+ return this.minX > this.maxX || this.minY > this.maxY ? (e.x = 0, e.y = 0, e.width = 0, e.height = 0) : e.copyFromBounds(this), e;
900
+ }
901
+ clear() {
902
+ return this.minX = Infinity, this.minY = Infinity, this.maxX = -Infinity, this.maxY = -Infinity, this.matrix = ye, this;
903
+ }
904
+ set(e, t, n, r) {
905
+ this.minX = e, this.minY = t, this.maxX = n, this.maxY = r;
906
+ }
907
+ addFrame(e, t, n, r, i) {
908
+ i ||= this.matrix;
909
+ let a = i.a, o = i.b, s = i.c, c = i.d, l = i.tx, u = i.ty, d = this.minX, f = this.minY, p = this.maxX, m = this.maxY, h = a * e + s * t + l, g = o * e + c * t + u;
910
+ h < d && (d = h), g < f && (f = g), h > p && (p = h), g > m && (m = g), h = a * n + s * t + l, g = o * n + c * t + u, h < d && (d = h), g < f && (f = g), h > p && (p = h), g > m && (m = g), h = a * e + s * r + l, g = o * e + c * r + u, h < d && (d = h), g < f && (f = g), h > p && (p = h), g > m && (m = g), h = a * n + s * r + l, g = o * n + c * r + u, h < d && (d = h), g < f && (f = g), h > p && (p = h), g > m && (m = g), this.minX = d, this.minY = f, this.maxX = p, this.maxY = m;
911
+ }
912
+ addRect(e, t) {
913
+ this.addFrame(e.x, e.y, e.x + e.width, e.y + e.height, t);
914
+ }
915
+ addBounds(e, t) {
916
+ this.addFrame(e.minX, e.minY, e.maxX, e.maxY, t);
917
+ }
918
+ addBoundsMask(e) {
919
+ this.minX = this.minX > e.minX ? this.minX : e.minX, this.minY = this.minY > e.minY ? this.minY : e.minY, this.maxX = this.maxX < e.maxX ? this.maxX : e.maxX, this.maxY = this.maxY < e.maxY ? this.maxY : e.maxY;
920
+ }
921
+ applyMatrix(e) {
922
+ let t = this.minX, n = this.minY, r = this.maxX, i = this.maxY, { a, b: o, c: s, d: c, tx: l, ty: u } = e, d = a * t + s * n + l, f = o * t + c * n + u;
923
+ this.minX = d, this.minY = f, this.maxX = d, this.maxY = f, d = a * r + s * n + l, f = o * r + c * n + u, this.minX = d < this.minX ? d : this.minX, this.minY = f < this.minY ? f : this.minY, this.maxX = d > this.maxX ? d : this.maxX, this.maxY = f > this.maxY ? f : this.maxY, d = a * t + s * i + l, f = o * t + c * i + u, this.minX = d < this.minX ? d : this.minX, this.minY = f < this.minY ? f : this.minY, this.maxX = d > this.maxX ? d : this.maxX, this.maxY = f > this.maxY ? f : this.maxY, d = a * r + s * i + l, f = o * r + c * i + u, this.minX = d < this.minX ? d : this.minX, this.minY = f < this.minY ? f : this.minY, this.maxX = d > this.maxX ? d : this.maxX, this.maxY = f > this.maxY ? f : this.maxY;
924
+ }
925
+ fit(e) {
926
+ return this.minX < e.left && (this.minX = e.left), this.maxX > e.right && (this.maxX = e.right), this.minY < e.top && (this.minY = e.top), this.maxY > e.bottom && (this.maxY = e.bottom), this;
927
+ }
928
+ fitBounds(e, t, n, r) {
929
+ return this.minX < e && (this.minX = e), this.maxX > t && (this.maxX = t), this.minY < n && (this.minY = n), this.maxY > r && (this.maxY = r), this;
930
+ }
931
+ pad(e, t = e) {
932
+ return this.minX -= e, this.maxX += e, this.minY -= t, this.maxY += t, this;
933
+ }
934
+ ceil() {
935
+ return this.minX = Math.floor(this.minX), this.minY = Math.floor(this.minY), this.maxX = Math.ceil(this.maxX), this.maxY = Math.ceil(this.maxY), this;
936
+ }
937
+ clone() {
938
+ return new e(this.minX, this.minY, this.maxX, this.maxY);
939
+ }
940
+ scale(e, t = e) {
941
+ return this.minX *= e, this.minY *= t, this.maxX *= e, this.maxY *= t, this;
942
+ }
943
+ get x() {
944
+ return this.minX;
945
+ }
946
+ set x(e) {
947
+ let t = this.maxX - this.minX;
948
+ this.minX = e, this.maxX = e + t;
949
+ }
950
+ get y() {
951
+ return this.minY;
952
+ }
953
+ set y(e) {
954
+ let t = this.maxY - this.minY;
955
+ this.minY = e, this.maxY = e + t;
956
+ }
957
+ get width() {
958
+ return this.maxX - this.minX;
959
+ }
960
+ set width(e) {
961
+ this.maxX = this.minX + e;
962
+ }
963
+ get height() {
964
+ return this.maxY - this.minY;
965
+ }
966
+ set height(e) {
967
+ this.maxY = this.minY + e;
968
+ }
969
+ get left() {
970
+ return this.minX;
971
+ }
972
+ get right() {
973
+ return this.maxX;
974
+ }
975
+ get top() {
976
+ return this.minY;
977
+ }
978
+ get bottom() {
979
+ return this.maxY;
980
+ }
981
+ get isPositive() {
982
+ return this.maxX - this.minX > 0 && this.maxY - this.minY > 0;
983
+ }
984
+ get isValid() {
985
+ return this.minX + this.minY !== Infinity;
986
+ }
987
+ addVertexData(e, t, n, r) {
988
+ let i = this.minX, a = this.minY, o = this.maxX, s = this.maxY;
989
+ r ||= this.matrix;
990
+ let c = r.a, l = r.b, u = r.c, d = r.d, f = r.tx, p = r.ty;
991
+ for (let r = t; r < n; r += 2) {
992
+ let t = e[r], n = e[r + 1], m = c * t + u * n + f, h = l * t + d * n + p;
993
+ i = m < i ? m : i, a = h < a ? h : a, o = m > o ? m : o, s = h > s ? h : s;
994
+ }
995
+ this.minX = i, this.minY = a, this.maxX = o, this.maxY = s;
996
+ }
997
+ containsPoint(e, t) {
998
+ return this.minX <= e && this.minY <= t && this.maxX >= e && this.maxY >= t;
999
+ }
1000
+ toString() {
1001
+ return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`;
1002
+ }
1003
+ copyFrom(e) {
1004
+ return this.minX = e.minX, this.minY = e.minY, this.maxX = e.maxX, this.maxY = e.maxY, this;
1005
+ }
1006
+ }, be = {
1007
+ grad: .9,
1008
+ turn: 360,
1009
+ rad: 360 / (2 * Math.PI)
1010
+ }, j = function(e) {
1011
+ return typeof e == "string" ? e.length > 0 : typeof e == "number";
1012
+ }, M = function(e, t, n) {
1013
+ return t === void 0 && (t = 0), n === void 0 && (n = 10 ** t), Math.round(n * e) / n + 0;
1014
+ }, N = function(e, t, n) {
1015
+ return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
1016
+ }, xe = function(e) {
1017
+ return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
1018
+ }, Se = function(e) {
1019
+ return {
1020
+ r: N(e.r, 0, 255),
1021
+ g: N(e.g, 0, 255),
1022
+ b: N(e.b, 0, 255),
1023
+ a: N(e.a)
1024
+ };
1025
+ }, Ce = function(e) {
1026
+ return {
1027
+ r: M(e.r),
1028
+ g: M(e.g),
1029
+ b: M(e.b),
1030
+ a: M(e.a, 3)
1031
+ };
1032
+ }, we = /^#([0-9a-f]{3,8})$/i, P = function(e) {
1033
+ var t = e.toString(16);
1034
+ return t.length < 2 ? "0" + t : t;
1035
+ }, Te = function(e) {
1036
+ var t = e.r, n = e.g, r = e.b, i = e.a, a = Math.max(t, n, r), o = a - Math.min(t, n, r), s = o ? a === t ? (n - r) / o : a === n ? 2 + (r - t) / o : 4 + (t - n) / o : 0;
1037
+ return {
1038
+ h: 60 * (s < 0 ? s + 6 : s),
1039
+ s: a ? o / a * 100 : 0,
1040
+ v: a / 255 * 100,
1041
+ a: i
1042
+ };
1043
+ }, Ee = function(e) {
1044
+ var t = e.h, n = e.s, r = e.v, i = e.a;
1045
+ t = t / 360 * 6, n /= 100, r /= 100;
1046
+ var a = Math.floor(t), o = r * (1 - n), s = r * (1 - (t - a) * n), c = r * (1 - (1 - t + a) * n), l = a % 6;
1047
+ return {
1048
+ r: 255 * [
1049
+ r,
1050
+ s,
1051
+ o,
1052
+ o,
1053
+ c,
1054
+ r
1055
+ ][l],
1056
+ g: 255 * [
1057
+ c,
1058
+ r,
1059
+ r,
1060
+ s,
1061
+ o,
1062
+ o
1063
+ ][l],
1064
+ b: 255 * [
1065
+ o,
1066
+ o,
1067
+ c,
1068
+ r,
1069
+ r,
1070
+ s
1071
+ ][l],
1072
+ a: i
1073
+ };
1074
+ }, De = function(e) {
1075
+ return {
1076
+ h: xe(e.h),
1077
+ s: N(e.s, 0, 100),
1078
+ l: N(e.l, 0, 100),
1079
+ a: N(e.a)
1080
+ };
1081
+ }, Oe = function(e) {
1082
+ return {
1083
+ h: M(e.h),
1084
+ s: M(e.s),
1085
+ l: M(e.l),
1086
+ a: M(e.a, 3)
1087
+ };
1088
+ }, ke = function(e) {
1089
+ return Ee((n = (t = e).s, {
1090
+ h: t.h,
1091
+ s: (n *= ((r = t.l) < 50 ? r : 100 - r) / 100) > 0 ? 2 * n / (r + n) * 100 : 0,
1092
+ v: r + n,
1093
+ a: t.a
1094
+ }));
1095
+ var t, n, r;
1096
+ }, F = function(e) {
1097
+ return {
1098
+ h: (t = Te(e)).h,
1099
+ s: (i = (200 - (n = t.s)) * (r = t.v) / 100) > 0 && i < 200 ? n * r / 100 / (i <= 100 ? i : 200 - i) * 100 : 0,
1100
+ l: i / 2,
1101
+ a: t.a
1102
+ };
1103
+ var t, n, r, i;
1104
+ }, Ae = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, je = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Me = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Ne = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Pe = {
1105
+ string: [
1106
+ [function(e) {
1107
+ var t = we.exec(e);
1108
+ return t ? (e = t[1]).length <= 4 ? {
1109
+ r: parseInt(e[0] + e[0], 16),
1110
+ g: parseInt(e[1] + e[1], 16),
1111
+ b: parseInt(e[2] + e[2], 16),
1112
+ a: e.length === 4 ? M(parseInt(e[3] + e[3], 16) / 255, 2) : 1
1113
+ } : e.length === 6 || e.length === 8 ? {
1114
+ r: parseInt(e.substr(0, 2), 16),
1115
+ g: parseInt(e.substr(2, 2), 16),
1116
+ b: parseInt(e.substr(4, 2), 16),
1117
+ a: e.length === 8 ? M(parseInt(e.substr(6, 2), 16) / 255, 2) : 1
1118
+ } : null : null;
1119
+ }, "hex"],
1120
+ [function(e) {
1121
+ var t = Me.exec(e) || Ne.exec(e);
1122
+ return t ? t[2] !== t[4] || t[4] !== t[6] ? null : Se({
1123
+ r: Number(t[1]) / (t[2] ? 100 / 255 : 1),
1124
+ g: Number(t[3]) / (t[4] ? 100 / 255 : 1),
1125
+ b: Number(t[5]) / (t[6] ? 100 / 255 : 1),
1126
+ a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1)
1127
+ }) : null;
1128
+ }, "rgb"],
1129
+ [function(e) {
1130
+ var t = Ae.exec(e) || je.exec(e);
1131
+ if (!t) return null;
1132
+ var n, r;
1133
+ return ke(De({
1134
+ h: (n = t[1], r = t[2], r === void 0 && (r = "deg"), Number(n) * (be[r] || 1)),
1135
+ s: Number(t[3]),
1136
+ l: Number(t[4]),
1137
+ a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1)
1138
+ }));
1139
+ }, "hsl"]
1140
+ ],
1141
+ object: [
1142
+ [function(e) {
1143
+ var t = e.r, n = e.g, r = e.b, i = e.a, a = i === void 0 ? 1 : i;
1144
+ return j(t) && j(n) && j(r) ? Se({
1145
+ r: Number(t),
1146
+ g: Number(n),
1147
+ b: Number(r),
1148
+ a: Number(a)
1149
+ }) : null;
1150
+ }, "rgb"],
1151
+ [function(e) {
1152
+ var t = e.h, n = e.s, r = e.l, i = e.a, a = i === void 0 ? 1 : i;
1153
+ return !j(t) || !j(n) || !j(r) ? null : ke(De({
1154
+ h: Number(t),
1155
+ s: Number(n),
1156
+ l: Number(r),
1157
+ a: Number(a)
1158
+ }));
1159
+ }, "hsl"],
1160
+ [function(e) {
1161
+ var t = e.h, n = e.s, r = e.v, i = e.a, a = i === void 0 ? 1 : i;
1162
+ return !j(t) || !j(n) || !j(r) ? null : Ee(function(e) {
1163
+ return {
1164
+ h: xe(e.h),
1165
+ s: N(e.s, 0, 100),
1166
+ v: N(e.v, 0, 100),
1167
+ a: N(e.a)
1168
+ };
1169
+ }({
1170
+ h: Number(t),
1171
+ s: Number(n),
1172
+ v: Number(r),
1173
+ a: Number(a)
1174
+ }));
1175
+ }, "hsv"]
1176
+ ]
1177
+ }, Fe = function(e, t) {
1178
+ for (var n = 0; n < t.length; n++) {
1179
+ var r = t[n][0](e);
1180
+ if (r) return [r, t[n][1]];
1181
+ }
1182
+ return [null, void 0];
1183
+ }, Ie = function(e) {
1184
+ return typeof e == "string" ? Fe(e.trim(), Pe.string) : typeof e == "object" && e ? Fe(e, Pe.object) : [null, void 0];
1185
+ }, Le = function(e, t) {
1186
+ var n = F(e);
1187
+ return {
1188
+ h: n.h,
1189
+ s: N(n.s + 100 * t, 0, 100),
1190
+ l: n.l,
1191
+ a: n.a
1192
+ };
1193
+ }, Re = function(e) {
1194
+ return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
1195
+ }, ze = function(e, t) {
1196
+ var n = F(e);
1197
+ return {
1198
+ h: n.h,
1199
+ s: n.s,
1200
+ l: N(n.l + 100 * t, 0, 100),
1201
+ a: n.a
1202
+ };
1203
+ }, Be = function() {
1204
+ function e(e) {
1205
+ this.parsed = Ie(e)[0], this.rgba = this.parsed || {
1206
+ r: 0,
1207
+ g: 0,
1208
+ b: 0,
1209
+ a: 1
1210
+ };
1211
+ }
1212
+ return e.prototype.isValid = function() {
1213
+ return this.parsed !== null;
1214
+ }, e.prototype.brightness = function() {
1215
+ return M(Re(this.rgba), 2);
1216
+ }, e.prototype.isDark = function() {
1217
+ return Re(this.rgba) < .5;
1218
+ }, e.prototype.isLight = function() {
1219
+ return Re(this.rgba) >= .5;
1220
+ }, e.prototype.toHex = function() {
1221
+ return e = Ce(this.rgba), t = e.r, n = e.g, r = e.b, a = (i = e.a) < 1 ? P(M(255 * i)) : "", "#" + P(t) + P(n) + P(r) + a;
1222
+ var e, t, n, r, i, a;
1223
+ }, e.prototype.toRgb = function() {
1224
+ return Ce(this.rgba);
1225
+ }, e.prototype.toRgbString = function() {
1226
+ return e = Ce(this.rgba), t = e.r, n = e.g, r = e.b, (i = e.a) < 1 ? "rgba(" + t + ", " + n + ", " + r + ", " + i + ")" : "rgb(" + t + ", " + n + ", " + r + ")";
1227
+ var e, t, n, r, i;
1228
+ }, e.prototype.toHsl = function() {
1229
+ return Oe(F(this.rgba));
1230
+ }, e.prototype.toHslString = function() {
1231
+ return e = Oe(F(this.rgba)), t = e.h, n = e.s, r = e.l, (i = e.a) < 1 ? "hsla(" + t + ", " + n + "%, " + r + "%, " + i + ")" : "hsl(" + t + ", " + n + "%, " + r + "%)";
1232
+ var e, t, n, r, i;
1233
+ }, e.prototype.toHsv = function() {
1234
+ return e = Te(this.rgba), {
1235
+ h: M(e.h),
1236
+ s: M(e.s),
1237
+ v: M(e.v),
1238
+ a: M(e.a, 3)
1239
+ };
1240
+ var e;
1241
+ }, e.prototype.invert = function() {
1242
+ return I({
1243
+ r: 255 - (e = this.rgba).r,
1244
+ g: 255 - e.g,
1245
+ b: 255 - e.b,
1246
+ a: e.a
1247
+ });
1248
+ var e;
1249
+ }, e.prototype.saturate = function(e) {
1250
+ return e === void 0 && (e = .1), I(Le(this.rgba, e));
1251
+ }, e.prototype.desaturate = function(e) {
1252
+ return e === void 0 && (e = .1), I(Le(this.rgba, -e));
1253
+ }, e.prototype.grayscale = function() {
1254
+ return I(Le(this.rgba, -1));
1255
+ }, e.prototype.lighten = function(e) {
1256
+ return e === void 0 && (e = .1), I(ze(this.rgba, e));
1257
+ }, e.prototype.darken = function(e) {
1258
+ return e === void 0 && (e = .1), I(ze(this.rgba, -e));
1259
+ }, e.prototype.rotate = function(e) {
1260
+ return e === void 0 && (e = 15), this.hue(this.hue() + e);
1261
+ }, e.prototype.alpha = function(e) {
1262
+ return typeof e == "number" ? I({
1263
+ r: (t = this.rgba).r,
1264
+ g: t.g,
1265
+ b: t.b,
1266
+ a: e
1267
+ }) : M(this.rgba.a, 3);
1268
+ var t;
1269
+ }, e.prototype.hue = function(e) {
1270
+ var t = F(this.rgba);
1271
+ return typeof e == "number" ? I({
1272
+ h: e,
1273
+ s: t.s,
1274
+ l: t.l,
1275
+ a: t.a
1276
+ }) : M(t.h);
1277
+ }, e.prototype.isEqual = function(e) {
1278
+ return this.toHex() === I(e).toHex();
1279
+ }, e;
1280
+ }(), I = function(e) {
1281
+ return e instanceof Be ? e : new Be(e);
1282
+ }, Ve = [], He = function(e) {
1283
+ e.forEach(function(e) {
1284
+ Ve.indexOf(e) < 0 && (e(Be, Pe), Ve.push(e));
1285
+ });
1286
+ };
1287
+ //#endregion
1288
+ //#region node_modules/.pnpm/@pixi+colord@2.9.6/node_modules/@pixi/colord/plugins/names.mjs
1289
+ function Ue(e, t) {
1290
+ var n = {
1291
+ white: "#ffffff",
1292
+ bisque: "#ffe4c4",
1293
+ blue: "#0000ff",
1294
+ cadetblue: "#5f9ea0",
1295
+ chartreuse: "#7fff00",
1296
+ chocolate: "#d2691e",
1297
+ coral: "#ff7f50",
1298
+ antiquewhite: "#faebd7",
1299
+ aqua: "#00ffff",
1300
+ azure: "#f0ffff",
1301
+ whitesmoke: "#f5f5f5",
1302
+ papayawhip: "#ffefd5",
1303
+ plum: "#dda0dd",
1304
+ blanchedalmond: "#ffebcd",
1305
+ black: "#000000",
1306
+ gold: "#ffd700",
1307
+ goldenrod: "#daa520",
1308
+ gainsboro: "#dcdcdc",
1309
+ cornsilk: "#fff8dc",
1310
+ cornflowerblue: "#6495ed",
1311
+ burlywood: "#deb887",
1312
+ aquamarine: "#7fffd4",
1313
+ beige: "#f5f5dc",
1314
+ crimson: "#dc143c",
1315
+ cyan: "#00ffff",
1316
+ darkblue: "#00008b",
1317
+ darkcyan: "#008b8b",
1318
+ darkgoldenrod: "#b8860b",
1319
+ darkkhaki: "#bdb76b",
1320
+ darkgray: "#a9a9a9",
1321
+ darkgreen: "#006400",
1322
+ darkgrey: "#a9a9a9",
1323
+ peachpuff: "#ffdab9",
1324
+ darkmagenta: "#8b008b",
1325
+ darkred: "#8b0000",
1326
+ darkorchid: "#9932cc",
1327
+ darkorange: "#ff8c00",
1328
+ darkslateblue: "#483d8b",
1329
+ gray: "#808080",
1330
+ darkslategray: "#2f4f4f",
1331
+ darkslategrey: "#2f4f4f",
1332
+ deeppink: "#ff1493",
1333
+ deepskyblue: "#00bfff",
1334
+ wheat: "#f5deb3",
1335
+ firebrick: "#b22222",
1336
+ floralwhite: "#fffaf0",
1337
+ ghostwhite: "#f8f8ff",
1338
+ darkviolet: "#9400d3",
1339
+ magenta: "#ff00ff",
1340
+ green: "#008000",
1341
+ dodgerblue: "#1e90ff",
1342
+ grey: "#808080",
1343
+ honeydew: "#f0fff0",
1344
+ hotpink: "#ff69b4",
1345
+ blueviolet: "#8a2be2",
1346
+ forestgreen: "#228b22",
1347
+ lawngreen: "#7cfc00",
1348
+ indianred: "#cd5c5c",
1349
+ indigo: "#4b0082",
1350
+ fuchsia: "#ff00ff",
1351
+ brown: "#a52a2a",
1352
+ maroon: "#800000",
1353
+ mediumblue: "#0000cd",
1354
+ lightcoral: "#f08080",
1355
+ darkturquoise: "#00ced1",
1356
+ lightcyan: "#e0ffff",
1357
+ ivory: "#fffff0",
1358
+ lightyellow: "#ffffe0",
1359
+ lightsalmon: "#ffa07a",
1360
+ lightseagreen: "#20b2aa",
1361
+ linen: "#faf0e6",
1362
+ mediumaquamarine: "#66cdaa",
1363
+ lemonchiffon: "#fffacd",
1364
+ lime: "#00ff00",
1365
+ khaki: "#f0e68c",
1366
+ mediumseagreen: "#3cb371",
1367
+ limegreen: "#32cd32",
1368
+ mediumspringgreen: "#00fa9a",
1369
+ lightskyblue: "#87cefa",
1370
+ lightblue: "#add8e6",
1371
+ midnightblue: "#191970",
1372
+ lightpink: "#ffb6c1",
1373
+ mistyrose: "#ffe4e1",
1374
+ moccasin: "#ffe4b5",
1375
+ mintcream: "#f5fffa",
1376
+ lightslategray: "#778899",
1377
+ lightslategrey: "#778899",
1378
+ navajowhite: "#ffdead",
1379
+ navy: "#000080",
1380
+ mediumvioletred: "#c71585",
1381
+ powderblue: "#b0e0e6",
1382
+ palegoldenrod: "#eee8aa",
1383
+ oldlace: "#fdf5e6",
1384
+ paleturquoise: "#afeeee",
1385
+ mediumturquoise: "#48d1cc",
1386
+ mediumorchid: "#ba55d3",
1387
+ rebeccapurple: "#663399",
1388
+ lightsteelblue: "#b0c4de",
1389
+ mediumslateblue: "#7b68ee",
1390
+ thistle: "#d8bfd8",
1391
+ tan: "#d2b48c",
1392
+ orchid: "#da70d6",
1393
+ mediumpurple: "#9370db",
1394
+ purple: "#800080",
1395
+ pink: "#ffc0cb",
1396
+ skyblue: "#87ceeb",
1397
+ springgreen: "#00ff7f",
1398
+ palegreen: "#98fb98",
1399
+ red: "#ff0000",
1400
+ yellow: "#ffff00",
1401
+ slateblue: "#6a5acd",
1402
+ lavenderblush: "#fff0f5",
1403
+ peru: "#cd853f",
1404
+ palevioletred: "#db7093",
1405
+ violet: "#ee82ee",
1406
+ teal: "#008080",
1407
+ slategray: "#708090",
1408
+ slategrey: "#708090",
1409
+ aliceblue: "#f0f8ff",
1410
+ darkseagreen: "#8fbc8f",
1411
+ darkolivegreen: "#556b2f",
1412
+ greenyellow: "#adff2f",
1413
+ seagreen: "#2e8b57",
1414
+ seashell: "#fff5ee",
1415
+ tomato: "#ff6347",
1416
+ silver: "#c0c0c0",
1417
+ sienna: "#a0522d",
1418
+ lavender: "#e6e6fa",
1419
+ lightgreen: "#90ee90",
1420
+ orange: "#ffa500",
1421
+ orangered: "#ff4500",
1422
+ steelblue: "#4682b4",
1423
+ royalblue: "#4169e1",
1424
+ turquoise: "#40e0d0",
1425
+ yellowgreen: "#9acd32",
1426
+ salmon: "#fa8072",
1427
+ saddlebrown: "#8b4513",
1428
+ sandybrown: "#f4a460",
1429
+ rosybrown: "#bc8f8f",
1430
+ darksalmon: "#e9967a",
1431
+ lightgoldenrodyellow: "#fafad2",
1432
+ snow: "#fffafa",
1433
+ lightgrey: "#d3d3d3",
1434
+ lightgray: "#d3d3d3",
1435
+ dimgray: "#696969",
1436
+ dimgrey: "#696969",
1437
+ olivedrab: "#6b8e23",
1438
+ olive: "#808000"
1439
+ }, r = {};
1440
+ for (var i in n) r[n[i]] = i;
1441
+ var a = {};
1442
+ e.prototype.toName = function(t) {
1443
+ if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b)) return "transparent";
1444
+ var i, o, s = r[this.toHex()];
1445
+ if (s) return s;
1446
+ if (t?.closest) {
1447
+ var c = this.toRgb(), l = Infinity, u = "black";
1448
+ if (!a.length) for (var d in n) a[d] = new e(n[d]).toRgb();
1449
+ for (var f in n) {
1450
+ var p = (i = c, o = a[f], (i.r - o.r) ** 2 + (i.g - o.g) ** 2 + (i.b - o.b) ** 2);
1451
+ p < l && (l = p, u = f);
1452
+ }
1453
+ return u;
1454
+ }
1455
+ }, t.string.push([function(t) {
1456
+ var r = t.toLowerCase(), i = r === "transparent" ? "#0000" : n[r];
1457
+ return i ? new e(i).toRgb() : null;
1458
+ }, "name"]);
1459
+ }
1460
+ //#endregion
1461
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/color/Color.mjs
1462
+ He([Ue]);
1463
+ var L = class e {
1464
+ constructor(e = 16777215) {
1465
+ this._value = null, this._components = /* @__PURE__ */ new Float32Array(4), this._components.fill(1), this._int = 16777215, this.value = e;
1466
+ }
1467
+ get red() {
1468
+ return this._components[0];
1469
+ }
1470
+ get green() {
1471
+ return this._components[1];
1472
+ }
1473
+ get blue() {
1474
+ return this._components[2];
1475
+ }
1476
+ get alpha() {
1477
+ return this._components[3];
1478
+ }
1479
+ setValue(e) {
1480
+ return this.value = e, this;
1481
+ }
1482
+ set value(t) {
1483
+ if (t instanceof e) this._value = this._cloneSource(t._value), this._int = t._int, this._components.set(t._components);
1484
+ else if (t === null) throw Error("Cannot set Color#value to null");
1485
+ else (this._value === null || !this._isSourceEqual(this._value, t)) && (this._value = this._cloneSource(t), this._normalize(this._value));
1486
+ }
1487
+ get value() {
1488
+ return this._value;
1489
+ }
1490
+ _cloneSource(e) {
1491
+ return typeof e == "string" || typeof e == "number" || e instanceof Number || e === null ? e : Array.isArray(e) || ArrayBuffer.isView(e) ? e.slice(0) : typeof e == "object" && e ? { ...e } : e;
1492
+ }
1493
+ _isSourceEqual(e, t) {
1494
+ let n = typeof e;
1495
+ if (n !== typeof t) return !1;
1496
+ if (n === "number" || n === "string" || e instanceof Number) return e === t;
1497
+ if (Array.isArray(e) && Array.isArray(t) || ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) return e.length === t.length && e.every((e, n) => e === t[n]);
1498
+ if (e !== null && t !== null) {
1499
+ let n = Object.keys(e), r = Object.keys(t);
1500
+ return n.length === r.length && n.every((n) => e[n] === t[n]);
1501
+ }
1502
+ return e === t;
1503
+ }
1504
+ toRgba() {
1505
+ let [e, t, n, r] = this._components;
1506
+ return {
1507
+ r: e,
1508
+ g: t,
1509
+ b: n,
1510
+ a: r
1511
+ };
1512
+ }
1513
+ toRgb() {
1514
+ let [e, t, n] = this._components;
1515
+ return {
1516
+ r: e,
1517
+ g: t,
1518
+ b: n
1519
+ };
1520
+ }
1521
+ toRgbaString() {
1522
+ let [e, t, n] = this.toUint8RgbArray();
1523
+ return `rgba(${e},${t},${n},${this.alpha})`;
1524
+ }
1525
+ toUint8RgbArray(e) {
1526
+ let [t, n, r] = this._components;
1527
+ return this._arrayRgb ||= [], e ||= this._arrayRgb, e[0] = Math.round(t * 255), e[1] = Math.round(n * 255), e[2] = Math.round(r * 255), e;
1528
+ }
1529
+ toArray(e) {
1530
+ this._arrayRgba ||= [], e ||= this._arrayRgba;
1531
+ let [t, n, r, i] = this._components;
1532
+ return e[0] = t, e[1] = n, e[2] = r, e[3] = i, e;
1533
+ }
1534
+ toRgbArray(e) {
1535
+ this._arrayRgb ||= [], e ||= this._arrayRgb;
1536
+ let [t, n, r] = this._components;
1537
+ return e[0] = t, e[1] = n, e[2] = r, e;
1538
+ }
1539
+ toNumber() {
1540
+ return this._int;
1541
+ }
1542
+ toBgrNumber() {
1543
+ let [e, t, n] = this.toUint8RgbArray();
1544
+ return (n << 16) + (t << 8) + e;
1545
+ }
1546
+ toLittleEndianNumber() {
1547
+ let e = this._int;
1548
+ return (e >> 16) + (e & 65280) + ((e & 255) << 16);
1549
+ }
1550
+ multiply(t) {
1551
+ let [n, r, i, a] = e._temp.setValue(t)._components;
1552
+ return this._components[0] *= n, this._components[1] *= r, this._components[2] *= i, this._components[3] *= a, this._refreshInt(), this._value = null, this;
1553
+ }
1554
+ premultiply(e, t = !0) {
1555
+ return t && (this._components[0] *= e, this._components[1] *= e, this._components[2] *= e), this._components[3] = e, this._refreshInt(), this._value = null, this;
1556
+ }
1557
+ toPremultiplied(e, t = !0) {
1558
+ if (e === 1) return (255 << 24) + this._int;
1559
+ if (e === 0) return t ? 0 : this._int;
1560
+ let n = this._int >> 16 & 255, r = this._int >> 8 & 255, i = this._int & 255;
1561
+ return t && (n = n * e + .5 | 0, r = r * e + .5 | 0, i = i * e + .5 | 0), (e * 255 << 24) + (n << 16) + (r << 8) + i;
1562
+ }
1563
+ toHex() {
1564
+ let e = this._int.toString(16);
1565
+ return `#${"000000".substring(0, 6 - e.length) + e}`;
1566
+ }
1567
+ toHexa() {
1568
+ let e = Math.round(this._components[3] * 255).toString(16);
1569
+ return this.toHex() + "00".substring(0, 2 - e.length) + e;
1570
+ }
1571
+ setAlpha(e) {
1572
+ return this._components[3] = this._clamp(e), this._value = null, this;
1573
+ }
1574
+ _normalize(t) {
1575
+ let n, r, i, a;
1576
+ if ((typeof t == "number" || t instanceof Number) && t >= 0 && t <= 16777215) {
1577
+ let e = t;
1578
+ n = (e >> 16 & 255) / 255, r = (e >> 8 & 255) / 255, i = (e & 255) / 255, a = 1;
1579
+ } else if ((Array.isArray(t) || t instanceof Float32Array) && t.length >= 3 && t.length <= 4) t = this._clamp(t), [n, r, i, a = 1] = t;
1580
+ else if ((t instanceof Uint8Array || t instanceof Uint8ClampedArray) && t.length >= 3 && t.length <= 4) t = this._clamp(t, 0, 255), [n, r, i, a = 255] = t, n /= 255, r /= 255, i /= 255, a /= 255;
1581
+ else if (typeof t == "string" || typeof t == "object") {
1582
+ if (typeof t == "string") {
1583
+ let n = e.HEX_PATTERN.exec(t);
1584
+ n && (t = `#${n[2]}`);
1585
+ }
1586
+ let o = I(t);
1587
+ o.isValid() && ({r: n, g: r, b: i, a} = o.rgba, n /= 255, r /= 255, i /= 255);
1588
+ }
1589
+ if (n !== void 0) this._components[0] = n, this._components[1] = r, this._components[2] = i, this._components[3] = a, this._refreshInt();
1590
+ else throw Error(`Unable to convert color ${t}`);
1591
+ }
1592
+ _refreshInt() {
1593
+ this._clamp(this._components);
1594
+ let [e, t, n] = this._components;
1595
+ this._int = (e * 255 << 16) + (t * 255 << 8) + (n * 255 | 0);
1596
+ }
1597
+ _clamp(e, t = 0, n = 1) {
1598
+ return typeof e == "number" ? Math.min(Math.max(e, t), n) : (e.forEach((r, i) => {
1599
+ e[i] = Math.min(Math.max(r, t), n);
1600
+ }), e);
1601
+ }
1602
+ static isColorLike(t) {
1603
+ return typeof t == "number" || typeof t == "string" || t instanceof Number || t instanceof e || Array.isArray(t) || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Float32Array || t.r !== void 0 && t.g !== void 0 && t.b !== void 0 || t.r !== void 0 && t.g !== void 0 && t.b !== void 0 && t.a !== void 0 || t.h !== void 0 && t.s !== void 0 && t.l !== void 0 || t.h !== void 0 && t.s !== void 0 && t.l !== void 0 && t.a !== void 0 || t.h !== void 0 && t.s !== void 0 && t.v !== void 0 || t.h !== void 0 && t.s !== void 0 && t.v !== void 0 && t.a !== void 0;
1604
+ }
1605
+ };
1606
+ L.shared = new L(), L._temp = new L(), L.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
1607
+ var We = L, Ge = {
1608
+ cullArea: null,
1609
+ cullable: !1,
1610
+ cullableChildren: !0
1611
+ }, Ke = 0, qe = 500;
1612
+ function R(...e) {
1613
+ Ke !== qe && (Ke++, Ke === qe ? console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.") : console.warn("PixiJS Warning: ", ...e));
1614
+ }
1615
+ //#endregion
1616
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/pool/GlobalResourceRegistry.mjs
1617
+ var Je = {
1618
+ _registeredResources: /* @__PURE__ */ new Set(),
1619
+ register(e) {
1620
+ this._registeredResources.add(e);
1621
+ },
1622
+ unregister(e) {
1623
+ this._registeredResources.delete(e);
1624
+ },
1625
+ release() {
1626
+ this._registeredResources.forEach((e) => e.clear());
1627
+ },
1628
+ get registeredCount() {
1629
+ return this._registeredResources.size;
1630
+ },
1631
+ isRegistered(e) {
1632
+ return this._registeredResources.has(e);
1633
+ },
1634
+ reset() {
1635
+ this._registeredResources.clear();
1636
+ }
1637
+ }, Ye = class {
1638
+ constructor(e, t) {
1639
+ this._pool = [], this._count = 0, this._index = 0, this._classType = e, t && this.prepopulate(t);
1640
+ }
1641
+ prepopulate(e) {
1642
+ for (let t = 0; t < e; t++) this._pool[this._index++] = new this._classType();
1643
+ this._count += e;
1644
+ }
1645
+ get(e) {
1646
+ let t;
1647
+ return this._index > 0 ? t = this._pool[--this._index] : (t = new this._classType(), this._count++), t.init?.(e), t;
1648
+ }
1649
+ return(e) {
1650
+ e.reset?.(), this._pool[this._index++] = e;
1651
+ }
1652
+ get totalSize() {
1653
+ return this._count;
1654
+ }
1655
+ get totalFree() {
1656
+ return this._index;
1657
+ }
1658
+ get totalUsed() {
1659
+ return this._count - this._index;
1660
+ }
1661
+ clear() {
1662
+ if (this._pool.length > 0 && this._pool[0].destroy) for (let e = 0; e < this._index; e++) this._pool[e].destroy();
1663
+ this._pool.length = 0, this._count = 0, this._index = 0;
1664
+ }
1665
+ }, z = new class {
1666
+ constructor() {
1667
+ this._poolsByClass = /* @__PURE__ */ new Map();
1668
+ }
1669
+ prepopulate(e, t) {
1670
+ this.getPool(e).prepopulate(t);
1671
+ }
1672
+ get(e, t) {
1673
+ return this.getPool(e).get(t);
1674
+ }
1675
+ return(e) {
1676
+ this.getPool(e.constructor).return(e);
1677
+ }
1678
+ getPool(e) {
1679
+ return this._poolsByClass.has(e) || this._poolsByClass.set(e, new Ye(e)), this._poolsByClass.get(e);
1680
+ }
1681
+ stats() {
1682
+ let e = {};
1683
+ return this._poolsByClass.forEach((t) => {
1684
+ let n = e[t._classType.name] ? t._classType.name + t._classType.ID : t._classType.name;
1685
+ e[n] = {
1686
+ free: t.totalFree,
1687
+ used: t.totalUsed,
1688
+ size: t.totalSize
1689
+ };
1690
+ }), e;
1691
+ }
1692
+ clear() {
1693
+ this._poolsByClass.forEach((e) => e.clear()), this._poolsByClass.clear();
1694
+ }
1695
+ }();
1696
+ Je.register(z);
1697
+ //#endregion
1698
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/cacheAsTextureMixin.mjs
1699
+ var Xe = {
1700
+ get isCachedAsTexture() {
1701
+ return !!this.renderGroup?.isCachedAsTexture;
1702
+ },
1703
+ cacheAsTexture(e) {
1704
+ typeof e == "boolean" && e === !1 ? this.disableRenderGroup() : (this.enableRenderGroup(), this.renderGroup.enableCacheAsTexture(e === !0 ? {} : e));
1705
+ },
1706
+ updateCacheTexture() {
1707
+ this.renderGroup?.updateCacheTexture();
1708
+ },
1709
+ get cacheAsBitmap() {
1710
+ return this.isCachedAsTexture;
1711
+ },
1712
+ set cacheAsBitmap(e) {
1713
+ D("v8.6.0", "cacheAsBitmap is deprecated, use cacheAsTexture instead."), this.cacheAsTexture(e);
1714
+ }
1715
+ };
1716
+ //#endregion
1717
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/utils/data/removeItems.mjs
1718
+ function Ze(e, t, n) {
1719
+ let r = e.length, i;
1720
+ if (t >= r || n === 0) return;
1721
+ n = t + n > r ? r - t : n;
1722
+ let a = r - n;
1723
+ for (i = t; i < a; ++i) e[i] = e[i + n];
1724
+ e.length = a;
1725
+ }
1726
+ //#endregion
1727
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/childrenHelperMixin.mjs
1728
+ var Qe = {
1729
+ allowChildren: !0,
1730
+ removeChildren(e = 0, t) {
1731
+ let n = t ?? this.children.length, r = n - e, i = [];
1732
+ if (r > 0 && r <= n) {
1733
+ for (let t = n - 1; t >= e; t--) {
1734
+ let e = this.children[t];
1735
+ e && (i.push(e), e.parent = null);
1736
+ }
1737
+ Ze(this.children, e, n);
1738
+ let t = this.renderGroup || this.parentRenderGroup;
1739
+ t && t.removeChildren(i);
1740
+ for (let e = 0; e < i.length; ++e) {
1741
+ let t = i[e];
1742
+ t.parentRenderLayer?.detach(t), this.emit("childRemoved", t, this, e), i[e].emit("removed", this);
1743
+ }
1744
+ return i.length > 0 && this._didViewChangeTick++, i;
1745
+ } else if (r === 0 && this.children.length === 0) return i;
1746
+ throw RangeError("removeChildren: numeric values are outside the acceptable range.");
1747
+ },
1748
+ removeChildAt(e) {
1749
+ let t = this.getChildAt(e);
1750
+ return this.removeChild(t);
1751
+ },
1752
+ getChildAt(e) {
1753
+ if (e < 0 || e >= this.children.length) throw Error(`getChildAt: Index (${e}) does not exist.`);
1754
+ return this.children[e];
1755
+ },
1756
+ setChildIndex(e, t) {
1757
+ if (t < 0 || t >= this.children.length) throw Error(`The index ${t} supplied is out of bounds ${this.children.length}`);
1758
+ this.getChildIndex(e), this.addChildAt(e, t);
1759
+ },
1760
+ getChildIndex(e) {
1761
+ let t = this.children.indexOf(e);
1762
+ if (t === -1) throw Error("The supplied Container must be a child of the caller");
1763
+ return t;
1764
+ },
1765
+ addChildAt(e, t) {
1766
+ this.allowChildren || D(T, "addChildAt: Only Containers will be allowed to add children in v8.0.0");
1767
+ let { children: n } = this;
1768
+ if (t < 0 || t > n.length) throw Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);
1769
+ let r = e.parent === this;
1770
+ if (e.parent) {
1771
+ let n = e.parent.children.indexOf(e);
1772
+ if (r) {
1773
+ if (n === t) return e;
1774
+ e.parent.children.splice(n, 1);
1775
+ } else e.removeFromParent();
1776
+ }
1777
+ t === n.length ? n.push(e) : n.splice(t, 0, e);
1778
+ let i = this.renderGroup || this.parentRenderGroup;
1779
+ return this.sortableChildren && (this.sortDirty = !0), r ? (i && (i.structureDidChange = !0), e) : (e.parent = this, e.didChange = !0, e._updateFlags = 15, i && i.addChild(e), this.emit("childAdded", e, this, t), e.emit("added", this), e);
1780
+ },
1781
+ swapChildren(e, t) {
1782
+ if (e === t) return;
1783
+ let n = this.getChildIndex(e), r = this.getChildIndex(t);
1784
+ this.children[n] = t, this.children[r] = e;
1785
+ let i = this.renderGroup || this.parentRenderGroup;
1786
+ i && (i.structureDidChange = !0), this._didContainerChangeTick++;
1787
+ },
1788
+ removeFromParent() {
1789
+ this.parent?.removeChild(this);
1790
+ },
1791
+ reparentChild(...e) {
1792
+ return e.length === 1 ? this.reparentChildAt(e[0], this.children.length) : (e.forEach((e) => this.reparentChildAt(e, this.children.length)), e[0]);
1793
+ },
1794
+ reparentChildAt(e, t) {
1795
+ if (e.parent === this) return this.setChildIndex(e, t), e;
1796
+ let n = e.worldTransform.clone();
1797
+ e.removeFromParent(), this.addChildAt(e, t);
1798
+ let r = this.worldTransform.clone();
1799
+ return r.invert(), n.prepend(r), e.setFromMatrix(n), e;
1800
+ },
1801
+ replaceChild(e, t) {
1802
+ e.updateLocalTransform(), this.addChildAt(t, this.getChildIndex(e)), t.setFromMatrix(e.localTransform), t.updateLocalTransform(), this.removeChild(e);
1803
+ }
1804
+ }, $e = {
1805
+ collectRenderables(e, t, n) {
1806
+ this.parentRenderLayer && this.parentRenderLayer !== n || this.globalDisplayStatus < 7 || !this.includeInBuild || (this.sortableChildren && this.sortChildren(), this.isSimple ? this.collectRenderablesSimple(e, t, n) : this.renderGroup ? t.renderPipes.renderGroup.addRenderGroup(this.renderGroup, e) : this.collectRenderablesWithEffects(e, t, n));
1807
+ },
1808
+ collectRenderablesSimple(e, t, n) {
1809
+ let r = this.children, i = r.length;
1810
+ for (let a = 0; a < i; a++) r[a].collectRenderables(e, t, n);
1811
+ },
1812
+ collectRenderablesWithEffects(e, t, n) {
1813
+ let { renderPipes: r } = t;
1814
+ for (let t = 0; t < this.effects.length; t++) {
1815
+ let n = this.effects[t];
1816
+ r[n.pipe].push(n, this, e);
1817
+ }
1818
+ this.collectRenderablesSimple(e, t, n);
1819
+ for (let t = this.effects.length - 1; t >= 0; t--) {
1820
+ let n = this.effects[t];
1821
+ r[n.pipe].pop(n, this, e);
1822
+ }
1823
+ }
1824
+ }, et = class {
1825
+ constructor() {
1826
+ this.pipe = "filter", this.priority = 1;
1827
+ }
1828
+ destroy() {
1829
+ for (let e = 0; e < this.filters.length; e++) this.filters[e].destroy();
1830
+ this.filters = null, this.filterArea = null;
1831
+ }
1832
+ }, tt = new class {
1833
+ constructor() {
1834
+ this._effectClasses = [], this._tests = [], this._initialized = !1;
1835
+ }
1836
+ init() {
1837
+ this._initialized || (this._initialized = !0, this._effectClasses.forEach((e) => {
1838
+ this.add({
1839
+ test: e.test,
1840
+ maskClass: e
1841
+ });
1842
+ }));
1843
+ }
1844
+ add(e) {
1845
+ this._tests.push(e);
1846
+ }
1847
+ getMaskEffect(e) {
1848
+ this._initialized || this.init();
1849
+ for (let t = 0; t < this._tests.length; t++) {
1850
+ let n = this._tests[t];
1851
+ if (n.test(e)) return z.get(n.maskClass, e);
1852
+ }
1853
+ return e;
1854
+ }
1855
+ returnMaskEffect(e) {
1856
+ z.return(e);
1857
+ }
1858
+ }();
1859
+ a.handleByList(n.MaskEffect, tt._effectClasses);
1860
+ //#endregion
1861
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/effectsMixin.mjs
1862
+ var nt = {
1863
+ _maskEffect: null,
1864
+ _maskOptions: {
1865
+ inverse: !1,
1866
+ channel: "red"
1867
+ },
1868
+ _filterEffect: null,
1869
+ effects: [],
1870
+ _markStructureAsChanged() {
1871
+ let e = this.renderGroup || this.parentRenderGroup;
1872
+ e && (e.structureDidChange = !0);
1873
+ },
1874
+ addEffect(e) {
1875
+ this.effects.indexOf(e) === -1 && (this.effects.push(e), this.effects.sort((e, t) => e.priority - t.priority), this._markStructureAsChanged(), this._updateIsSimple());
1876
+ },
1877
+ removeEffect(e) {
1878
+ let t = this.effects.indexOf(e);
1879
+ t !== -1 && (this.effects.splice(t, 1), this._markStructureAsChanged(), this._updateIsSimple());
1880
+ },
1881
+ set mask(e) {
1882
+ let t = this._maskEffect;
1883
+ t?.mask !== e && (t && (this.removeEffect(t), tt.returnMaskEffect(t), this._maskEffect = null), e != null && (this._maskEffect = tt.getMaskEffect(e), this.addEffect(this._maskEffect)));
1884
+ },
1885
+ get mask() {
1886
+ return this._maskEffect?.mask;
1887
+ },
1888
+ setMask(e) {
1889
+ this._maskOptions = {
1890
+ ...this._maskOptions,
1891
+ ...e
1892
+ }, e.mask && (this.mask = e.mask), this._markStructureAsChanged();
1893
+ },
1894
+ set filters(e) {
1895
+ !Array.isArray(e) && e && (e = [e]);
1896
+ let t = this._filterEffect ||= new et();
1897
+ e = e;
1898
+ let n = e?.length > 0, r = n !== t.filters?.length > 0;
1899
+ e = Array.isArray(e) ? e.slice(0) : e, t.filters = Object.freeze(e), r && (n ? this.addEffect(t) : (this.removeEffect(t), t.filters = e ?? null));
1900
+ },
1901
+ get filters() {
1902
+ return this._filterEffect?.filters;
1903
+ },
1904
+ set filterArea(e) {
1905
+ this._filterEffect ||= new et(), this._filterEffect.filterArea = e;
1906
+ },
1907
+ get filterArea() {
1908
+ return this._filterEffect?.filterArea;
1909
+ }
1910
+ }, rt = {
1911
+ label: null,
1912
+ get name() {
1913
+ return D(T, "Container.name property has been removed, use Container.label instead"), this.label;
1914
+ },
1915
+ set name(e) {
1916
+ D(T, "Container.name property has been removed, use Container.label instead"), this.label = e;
1917
+ },
1918
+ getChildByName(e, t = !1) {
1919
+ return this.getChildByLabel(e, t);
1920
+ },
1921
+ getChildByLabel(e, t = !1) {
1922
+ let n = this.children;
1923
+ for (let t = 0; t < n.length; t++) {
1924
+ let r = n[t];
1925
+ if (r.label === e || e instanceof RegExp && e.test(r.label)) return r;
1926
+ }
1927
+ if (t) for (let t = 0; t < n.length; t++) {
1928
+ let r = n[t].getChildByLabel(e, !0);
1929
+ if (r) return r;
1930
+ }
1931
+ return null;
1932
+ },
1933
+ getChildrenByLabel(e, t = !1, n = []) {
1934
+ let r = this.children;
1935
+ for (let t = 0; t < r.length; t++) {
1936
+ let i = r[t];
1937
+ (i.label === e || e instanceof RegExp && e.test(i.label)) && n.push(i);
1938
+ }
1939
+ if (t) for (let t = 0; t < r.length; t++) r[t].getChildrenByLabel(e, !0, n);
1940
+ return n;
1941
+ }
1942
+ }, B = z.getPool(p), V = z.getPool(A), it = new p(), at = {
1943
+ getFastGlobalBounds(e, t) {
1944
+ t ||= new A(), t.clear(), this._getGlobalBoundsRecursive(!!e, t, this.parentRenderLayer), t.isValid || t.set(0, 0, 0, 0);
1945
+ let n = this.renderGroup || this.parentRenderGroup;
1946
+ return t.applyMatrix(n.worldTransform), t;
1947
+ },
1948
+ _getGlobalBoundsRecursive(e, t, n) {
1949
+ let r = t;
1950
+ if (e && this.parentRenderLayer && this.parentRenderLayer !== n || this.localDisplayStatus !== 7 || !this.measurable) return;
1951
+ let i = !!this.effects.length;
1952
+ if ((this.renderGroup || i) && (r = V.get().clear()), this.boundsArea) t.addRect(this.boundsArea, this.worldTransform);
1953
+ else {
1954
+ if (this.renderPipeId) {
1955
+ let e = this.bounds;
1956
+ r.addFrame(e.minX, e.minY, e.maxX, e.maxY, this.groupTransform);
1957
+ }
1958
+ let t = this.children;
1959
+ for (let i = 0; i < t.length; i++) t[i]._getGlobalBoundsRecursive(e, r, n);
1960
+ }
1961
+ if (i) {
1962
+ let e = !1, n = this.renderGroup || this.parentRenderGroup;
1963
+ for (let t = 0; t < this.effects.length; t++) this.effects[t].addBounds && (e || (e = !0, r.applyMatrix(n.worldTransform)), this.effects[t].addBounds(r, !0));
1964
+ e && r.applyMatrix(n.worldTransform.copyTo(it).invert()), t.addBounds(r), V.return(r);
1965
+ } else this.renderGroup && (t.addBounds(r, this.relativeGroupTransform), V.return(r));
1966
+ }
1967
+ };
1968
+ //#endregion
1969
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/getGlobalBounds.mjs
1970
+ function ot(e, t, n) {
1971
+ n.clear();
1972
+ let r, i;
1973
+ return e.parent ? t ? r = e.parent.worldTransform : (i = B.get().identity(), r = ct(e, i)) : r = p.IDENTITY, st(e, n, r, t), i && B.return(i), n.isValid || n.set(0, 0, 0, 0), n;
1974
+ }
1975
+ function st(e, t, n, r) {
1976
+ if (!e.visible || !e.measurable) return;
1977
+ let i;
1978
+ r ? i = e.worldTransform : (e.updateLocalTransform(), i = B.get(), i.appendFrom(e.localTransform, n));
1979
+ let a = t, o = !!e.effects.length;
1980
+ if (o && (t = V.get().clear()), e.boundsArea) t.addRect(e.boundsArea, i);
1981
+ else {
1982
+ let n = e.bounds;
1983
+ n && !n.isEmpty() && (t.matrix = i, t.addBounds(n));
1984
+ for (let n = 0; n < e.children.length; n++) st(e.children[n], t, i, r);
1985
+ }
1986
+ if (o) {
1987
+ for (let n = 0; n < e.effects.length; n++) e.effects[n].addBounds?.(t);
1988
+ a.addBounds(t, p.IDENTITY), V.return(t);
1989
+ }
1990
+ r || B.return(i);
1991
+ }
1992
+ function ct(e, t) {
1993
+ let n = e.parent;
1994
+ return n && (ct(n, t), n.updateLocalTransform(), t.append(n.localTransform)), t;
1995
+ }
1996
+ //#endregion
1997
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/multiplyHexColors.mjs
1998
+ function lt(e, t) {
1999
+ if (e === 16777215 || !t) return t;
2000
+ if (t === 16777215 || !e) return e;
2001
+ let n = e >> 16 & 255, r = e >> 8 & 255, i = e & 255, a = t >> 16 & 255, o = t >> 8 & 255, s = t & 255, c = n * a / 255 | 0, l = r * o / 255 | 0, u = i * s / 255 | 0;
2002
+ return (c << 16) + (l << 8) + u;
2003
+ }
2004
+ //#endregion
2005
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/multiplyColors.mjs
2006
+ var ut = 16777215;
2007
+ function dt(e, t) {
2008
+ return e === ut ? t : t === ut ? e : lt(e, t);
2009
+ }
2010
+ //#endregion
2011
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/getGlobalMixin.mjs
2012
+ function H(e) {
2013
+ return ((e & 255) << 16) + (e & 65280) + (e >> 16 & 255);
2014
+ }
2015
+ var ft = {
2016
+ getGlobalAlpha(e) {
2017
+ if (e) return this.renderGroup ? this.renderGroup.worldAlpha : this.parentRenderGroup ? this.parentRenderGroup.worldAlpha * this.alpha : this.alpha;
2018
+ let t = this.alpha, n = this.parent;
2019
+ for (; n;) t *= n.alpha, n = n.parent;
2020
+ return t;
2021
+ },
2022
+ getGlobalTransform(e = new p(), t) {
2023
+ if (t) return e.copyFrom(this.worldTransform);
2024
+ this.updateLocalTransform();
2025
+ let n = ct(this, B.get().identity());
2026
+ return e.appendFrom(this.localTransform, n), B.return(n), e;
2027
+ },
2028
+ getGlobalTint(e) {
2029
+ if (e) return this.renderGroup ? H(this.renderGroup.worldColor) : this.parentRenderGroup ? H(dt(this.localColor, this.parentRenderGroup.worldColor)) : this.tint;
2030
+ let t = this.localColor, n = this.parent;
2031
+ for (; n;) t = dt(t, n.localColor), n = n.parent;
2032
+ return H(t);
2033
+ }
2034
+ };
2035
+ //#endregion
2036
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/bounds/getLocalBounds.mjs
2037
+ function pt(e, t, n) {
2038
+ return t.clear(), n ||= p.IDENTITY, mt(e, t, n, e, !0), t.isValid || t.set(0, 0, 0, 0), t;
2039
+ }
2040
+ function mt(e, t, n, r, i) {
2041
+ let a;
2042
+ if (i) a = B.get(), a = n.copyTo(a);
2043
+ else {
2044
+ if (!e.visible || !e.measurable) return;
2045
+ e.updateLocalTransform();
2046
+ let t = e.localTransform;
2047
+ a = B.get(), a.appendFrom(t, n);
2048
+ }
2049
+ let o = t, s = !!e.effects.length;
2050
+ if (s && (t = V.get().clear()), e.boundsArea) t.addRect(e.boundsArea, a);
2051
+ else {
2052
+ e.renderPipeId && (t.matrix = a, t.addBounds(e.bounds));
2053
+ let n = e.children;
2054
+ for (let e = 0; e < n.length; e++) mt(n[e], t, a, r, !1);
2055
+ }
2056
+ if (s) {
2057
+ for (let n = 0; n < e.effects.length; n++) e.effects[n].addLocalBounds?.(t, r);
2058
+ o.addBounds(t, p.IDENTITY), V.return(t);
2059
+ }
2060
+ B.return(a);
2061
+ }
2062
+ //#endregion
2063
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/checkChildrenDidChange.mjs
2064
+ function ht(e, t) {
2065
+ let n = e.children;
2066
+ for (let e = 0; e < n.length; e++) {
2067
+ let r = n[e], i = r.uid, a = (r._didViewChangeTick & 65535) << 16 | r._didContainerChangeTick & 65535, o = t.index;
2068
+ (t.data[o] !== i || t.data[o + 1] !== a) && (t.data[t.index] = i, t.data[t.index + 1] = a, t.didChange = !0), t.index = o + 2, r.children.length && ht(r, t);
2069
+ }
2070
+ return t.didChange;
2071
+ }
2072
+ //#endregion
2073
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/measureMixin.mjs
2074
+ var gt = new p(), _t = {
2075
+ _localBoundsCacheId: -1,
2076
+ _localBoundsCacheData: null,
2077
+ _setWidth(e, t) {
2078
+ let n = Math.sign(this.scale.x) || 1;
2079
+ t === 0 ? this.scale.x = n : this.scale.x = e / t * n;
2080
+ },
2081
+ _setHeight(e, t) {
2082
+ let n = Math.sign(this.scale.y) || 1;
2083
+ t === 0 ? this.scale.y = n : this.scale.y = e / t * n;
2084
+ },
2085
+ getLocalBounds() {
2086
+ this._localBoundsCacheData ||= {
2087
+ data: [],
2088
+ index: 1,
2089
+ didChange: !1,
2090
+ localBounds: new A()
2091
+ };
2092
+ let e = this._localBoundsCacheData;
2093
+ return e.index = 1, e.didChange = !1, e.data[0] !== this._didViewChangeTick && (e.didChange = !0, e.data[0] = this._didViewChangeTick), ht(this, e), e.didChange && pt(this, e.localBounds, gt), e.localBounds;
2094
+ },
2095
+ getBounds(e, t) {
2096
+ return ot(this, e, t || new A());
2097
+ }
2098
+ }, vt = {
2099
+ _onRender: null,
2100
+ set onRender(e) {
2101
+ let t = this.renderGroup || this.parentRenderGroup;
2102
+ if (!e) {
2103
+ this._onRender && t?.removeOnRender(this), this._onRender = null;
2104
+ return;
2105
+ }
2106
+ this._onRender || t?.addOnRender(this), this._onRender = e;
2107
+ },
2108
+ get onRender() {
2109
+ return this._onRender;
2110
+ }
2111
+ }, yt = {
2112
+ _zIndex: 0,
2113
+ sortDirty: !1,
2114
+ sortableChildren: !1,
2115
+ get zIndex() {
2116
+ return this._zIndex;
2117
+ },
2118
+ set zIndex(e) {
2119
+ this._zIndex !== e && (this._zIndex = e, this.depthOfChildModified());
2120
+ },
2121
+ depthOfChildModified() {
2122
+ this.parent && (this.parent.sortableChildren = !0, this.parent.sortDirty = !0), this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0);
2123
+ },
2124
+ sortChildren() {
2125
+ this.sortDirty && (this.sortDirty = !1, this.children.sort(bt));
2126
+ }
2127
+ };
2128
+ function bt(e, t) {
2129
+ return e._zIndex - t._zIndex;
2130
+ }
2131
+ //#endregion
2132
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/container-mixins/toLocalGlobalMixin.mjs
2133
+ var xt = {
2134
+ getGlobalPosition(e = new d(), t = !1) {
2135
+ return this.parent ? this.parent.toGlobal(this._position, e, t) : (e.x = this._position.x, e.y = this._position.y), e;
2136
+ },
2137
+ toGlobal(e, t, n = !1) {
2138
+ let r = this.getGlobalTransform(B.get(), n);
2139
+ return t = r.apply(e, t), B.return(r), t;
2140
+ },
2141
+ toLocal(e, t, n, r) {
2142
+ t && (e = t.toGlobal(e, n, r));
2143
+ let i = this.getGlobalTransform(B.get(), r);
2144
+ return n = i.applyInverse(e, n), B.return(i), n;
2145
+ }
2146
+ }, St = class {
2147
+ constructor() {
2148
+ this.uid = w("instructionSet"), this.instructions = [], this.instructionSize = 0, this.renderables = [], this.gcTick = 0;
2149
+ }
2150
+ reset() {
2151
+ this.instructionSize = 0;
2152
+ }
2153
+ destroy() {
2154
+ this.instructions.length = 0, this.renderables.length = 0, this.renderPipes = null, this.gcTick = 0;
2155
+ }
2156
+ add(e) {
2157
+ this.instructions[this.instructionSize++] = e;
2158
+ }
2159
+ log() {
2160
+ this.instructions.length = this.instructionSize, console.table(this.instructions, ["type", "action"]);
2161
+ }
2162
+ }, Ct = 0, wt = new class {
2163
+ constructor(e) {
2164
+ this._poolKeyHash = /* @__PURE__ */ Object.create(null), this._texturePool = {}, this.textureOptions = e || {}, this.enableFullScreen = !1, this.textureStyle = new pe(this.textureOptions);
2165
+ }
2166
+ createTexture(e, t, n, r) {
2167
+ return new k({
2168
+ source: new O({
2169
+ ...this.textureOptions,
2170
+ width: e,
2171
+ height: t,
2172
+ resolution: 1,
2173
+ antialias: n,
2174
+ autoGarbageCollect: !1,
2175
+ autoGenerateMipmaps: r
2176
+ }),
2177
+ label: `texturePool_${Ct++}`
2178
+ });
2179
+ }
2180
+ getOptimalTexture(e, t, n = 1, r, i = !1) {
2181
+ let a = Math.ceil(e * n - 1e-6), o = Math.ceil(t * n - 1e-6);
2182
+ a = se(a), o = se(o);
2183
+ let s = +!!r, c = +!!i, l = (a << 17) + (o << 2) + (c << 1) + s;
2184
+ this._texturePool[l] || (this._texturePool[l] = []);
2185
+ let u = this._texturePool[l].pop();
2186
+ return u ||= this.createTexture(a, o, r, i), u.source._resolution = n, u.source.width = a / n, u.source.height = o / n, u.source.pixelWidth = a, u.source.pixelHeight = o, u.frame.x = 0, u.frame.y = 0, u.frame.width = e, u.frame.height = t, u.updateUvs(), this._poolKeyHash[u.uid] = l, u;
2187
+ }
2188
+ getSameSizeTexture(e, t = !1) {
2189
+ let n = e.source;
2190
+ return this.getOptimalTexture(e.width, e.height, n._resolution, t);
2191
+ }
2192
+ returnTexture(e, t = !1) {
2193
+ let n = this._poolKeyHash[e.uid];
2194
+ t && (e.source.style = this.textureStyle), this._texturePool[n].push(e);
2195
+ }
2196
+ clear(e) {
2197
+ if (e = e !== !1, e) for (let e in this._texturePool) {
2198
+ let t = this._texturePool[e];
2199
+ if (t) for (let e = 0; e < t.length; e++) t[e].destroy(!0);
2200
+ }
2201
+ this._texturePool = {};
2202
+ }
2203
+ }();
2204
+ Je.register(wt);
2205
+ //#endregion
2206
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/RenderGroup.mjs
2207
+ var Tt = class {
2208
+ constructor() {
2209
+ this.renderPipeId = "renderGroup", this.root = null, this.canBundle = !1, this.renderGroupParent = null, this.renderGroupChildren = [], this.worldTransform = new p(), this.worldColorAlpha = 4294967295, this.worldColor = 16777215, this.worldAlpha = 1, this.childrenToUpdate = /* @__PURE__ */ Object.create(null), this.updateTick = 0, this.gcTick = 0, this.childrenRenderablesToUpdate = {
2210
+ list: [],
2211
+ index: 0
2212
+ }, this.structureDidChange = !0, this.instructionSet = new St(), this._onRenderContainers = [], this.textureNeedsUpdate = !0, this.isCachedAsTexture = !1, this._matrixDirty = 7;
2213
+ }
2214
+ init(e) {
2215
+ this.root = e, e._onRender && this.addOnRender(e), e.didChange = !0;
2216
+ let t = e.children;
2217
+ for (let e = 0; e < t.length; e++) {
2218
+ let n = t[e];
2219
+ n._updateFlags = 15, this.addChild(n);
2220
+ }
2221
+ }
2222
+ enableCacheAsTexture(e = {}) {
2223
+ this.textureOptions = e, this.isCachedAsTexture = !0, this.textureNeedsUpdate = !0;
2224
+ }
2225
+ disableCacheAsTexture() {
2226
+ this.isCachedAsTexture = !1, this.texture &&= (wt.returnTexture(this.texture, !0), null);
2227
+ }
2228
+ updateCacheTexture() {
2229
+ this.textureNeedsUpdate = !0;
2230
+ let e = this._parentCacheAsTextureRenderGroup;
2231
+ e && !e.textureNeedsUpdate && e.updateCacheTexture();
2232
+ }
2233
+ reset() {
2234
+ this.renderGroupChildren.length = 0;
2235
+ for (let e in this.childrenToUpdate) {
2236
+ let t = this.childrenToUpdate[e];
2237
+ t.list.fill(null), t.index = 0;
2238
+ }
2239
+ this.childrenRenderablesToUpdate.index = 0, this.childrenRenderablesToUpdate.list.fill(null), this.root = null, this.updateTick = 0, this.structureDidChange = !0, this._onRenderContainers.length = 0, this.renderGroupParent = null, this.disableCacheAsTexture();
2240
+ }
2241
+ get localTransform() {
2242
+ return this.root.localTransform;
2243
+ }
2244
+ addRenderGroupChild(e) {
2245
+ e.renderGroupParent && e.renderGroupParent._removeRenderGroupChild(e), e.renderGroupParent = this, this.renderGroupChildren.push(e);
2246
+ }
2247
+ _removeRenderGroupChild(e) {
2248
+ let t = this.renderGroupChildren.indexOf(e);
2249
+ t > -1 && this.renderGroupChildren.splice(t, 1), e.renderGroupParent = null;
2250
+ }
2251
+ addChild(e) {
2252
+ if (this.structureDidChange = !0, e.parentRenderGroup = this, e.updateTick = -1, e.parent === this.root ? e.relativeRenderGroupDepth = 1 : e.relativeRenderGroupDepth = e.parent.relativeRenderGroupDepth + 1, e.didChange = !0, this.onChildUpdate(e), e.renderGroup) {
2253
+ this.addRenderGroupChild(e.renderGroup);
2254
+ return;
2255
+ }
2256
+ e._onRender && this.addOnRender(e);
2257
+ let t = e.children;
2258
+ for (let e = 0; e < t.length; e++) this.addChild(t[e]);
2259
+ }
2260
+ removeChild(e) {
2261
+ if (this.structureDidChange = !0, e._onRender && (e.renderGroup || this.removeOnRender(e)), e.parentRenderGroup = null, e.renderGroup) {
2262
+ this._removeRenderGroupChild(e.renderGroup);
2263
+ return;
2264
+ }
2265
+ let t = e.children;
2266
+ for (let e = 0; e < t.length; e++) this.removeChild(t[e]);
2267
+ }
2268
+ removeChildren(e) {
2269
+ for (let t = 0; t < e.length; t++) this.removeChild(e[t]);
2270
+ }
2271
+ onChildUpdate(e) {
2272
+ let t = this.childrenToUpdate[e.relativeRenderGroupDepth];
2273
+ t ||= this.childrenToUpdate[e.relativeRenderGroupDepth] = {
2274
+ index: 0,
2275
+ list: []
2276
+ }, t.list[t.index++] = e;
2277
+ }
2278
+ updateRenderable(e) {
2279
+ e.globalDisplayStatus < 7 || (this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e), e.didViewUpdate = !1);
2280
+ }
2281
+ onChildViewUpdate(e) {
2282
+ this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++] = e;
2283
+ }
2284
+ get isRenderable() {
2285
+ return this.root.localDisplayStatus === 7 && this.worldAlpha > 0;
2286
+ }
2287
+ addOnRender(e) {
2288
+ this._onRenderContainers.indexOf(e) === -1 && this._onRenderContainers.push(e);
2289
+ }
2290
+ removeOnRender(e) {
2291
+ let t = this._onRenderContainers.indexOf(e);
2292
+ t !== -1 && this._onRenderContainers.splice(t, 1);
2293
+ }
2294
+ runOnRender(e) {
2295
+ for (let t = 0; t < this._onRenderContainers.length; t++) this._onRenderContainers[t]._onRender(e);
2296
+ }
2297
+ destroy() {
2298
+ this.disableCacheAsTexture(), this.renderGroupParent = null, this.root = null, this.childrenRenderablesToUpdate = null, this.childrenToUpdate = null, this.renderGroupChildren = null, this._onRenderContainers = null, this.instructionSet = null;
2299
+ }
2300
+ getChildren(e = []) {
2301
+ let t = this.root.children;
2302
+ for (let n = 0; n < t.length; n++) this._getChildren(t[n], e);
2303
+ return e;
2304
+ }
2305
+ _getChildren(e, t = []) {
2306
+ if (t.push(e), e.renderGroup) return t;
2307
+ let n = e.children;
2308
+ for (let e = 0; e < n.length; e++) this._getChildren(n[e], t);
2309
+ return t;
2310
+ }
2311
+ invalidateMatrices() {
2312
+ this._matrixDirty = 7;
2313
+ }
2314
+ get inverseWorldTransform() {
2315
+ return this._matrixDirty & 1 ? (this._matrixDirty &= -2, this._inverseWorldTransform ||= new p(), this._inverseWorldTransform.copyFrom(this.worldTransform).invert()) : this._inverseWorldTransform;
2316
+ }
2317
+ get textureOffsetInverseTransform() {
2318
+ return this._matrixDirty & 2 ? (this._matrixDirty &= -3, this._textureOffsetInverseTransform ||= new p(), this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x, -this._textureBounds.y)) : this._textureOffsetInverseTransform;
2319
+ }
2320
+ get inverseParentTextureTransform() {
2321
+ if (!(this._matrixDirty & 4)) return this._inverseParentTextureTransform;
2322
+ this._matrixDirty &= -5;
2323
+ let e = this._parentCacheAsTextureRenderGroup;
2324
+ return e ? (this._inverseParentTextureTransform ||= new p(), this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x, -e._textureBounds.y)) : this.worldTransform;
2325
+ }
2326
+ get cacheToLocalTransform() {
2327
+ return this.isCachedAsTexture ? this.textureOffsetInverseTransform : this._parentCacheAsTextureRenderGroup ? this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform : null;
2328
+ }
2329
+ };
2330
+ //#endregion
2331
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/utils/assignWithIgnore.mjs
2332
+ function Et(e, t, n = {}) {
2333
+ for (let r in t) !n[r] && t[r] !== void 0 && (e[r] = t[r]);
2334
+ }
2335
+ //#endregion
2336
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/container/Container.mjs
2337
+ var Dt = new o(null), U = new o(null), Ot = new o(null, 1, 1), W = new o(null), kt = class e extends s {
2338
+ constructor(e = {}) {
2339
+ super(), this.uid = w("renderable"), this._updateFlags = 15, this.renderGroup = null, this.parentRenderGroup = null, this.parentRenderGroupIndex = 0, this.didChange = !1, this.didViewUpdate = !1, this.relativeRenderGroupDepth = 0, this.children = [], this.parent = null, this.includeInBuild = !0, this.measurable = !0, this.isSimple = !0, this.parentRenderLayer = null, this.updateTick = -1, this.localTransform = new p(), this.relativeGroupTransform = new p(), this.groupTransform = this.relativeGroupTransform, this.destroyed = !1, this._position = new o(this, 0, 0), this._scale = Ot, this._pivot = U, this._origin = W, this._skew = Dt, this._cx = 1, this._sx = 0, this._cy = 0, this._sy = 1, this._rotation = 0, this.localColor = 16777215, this.localAlpha = 1, this.groupAlpha = 1, this.groupColor = 16777215, this.groupColorAlpha = 4294967295, this.localBlendMode = "inherit", this.groupBlendMode = "normal", this.localDisplayStatus = 7, this.globalDisplayStatus = 7, this._didContainerChangeTick = 0, this._didViewChangeTick = 0, this._didLocalTransformChangeId = -1, this.effects = [], Et(this, e, {
2340
+ children: !0,
2341
+ parent: !0,
2342
+ effects: !0
2343
+ }), e.children?.forEach((e) => this.addChild(e)), e.parent?.addChild(this);
2344
+ }
2345
+ static mixin(t) {
2346
+ D("8.8.0", "Container.mixin is deprecated, please use extensions.mixin instead."), a.mixin(e, t);
2347
+ }
2348
+ set _didChangeId(e) {
2349
+ this._didViewChangeTick = e >> 12 & 4095, this._didContainerChangeTick = e & 4095;
2350
+ }
2351
+ get _didChangeId() {
2352
+ return this._didContainerChangeTick & 4095 | (this._didViewChangeTick & 4095) << 12;
2353
+ }
2354
+ addChild(...e) {
2355
+ if (this.allowChildren || D(T, "addChild: Only Containers will be allowed to add children in v8.0.0"), e.length > 1) {
2356
+ for (let t = 0; t < e.length; t++) this.addChild(e[t]);
2357
+ return e[0];
2358
+ }
2359
+ let t = e[0], n = this.renderGroup || this.parentRenderGroup;
2360
+ return t.parent === this ? (this.children.splice(this.children.indexOf(t), 1), this.children.push(t), n && (n.structureDidChange = !0), t) : (t.parent && t.parent.removeChild(t), this.children.push(t), this.sortableChildren && (this.sortDirty = !0), t.parent = this, t.didChange = !0, t._updateFlags = 15, n && n.addChild(t), this.emit("childAdded", t, this, this.children.length - 1), t.emit("added", this), this._didViewChangeTick++, t._zIndex !== 0 && t.depthOfChildModified(), t);
2361
+ }
2362
+ removeChild(...e) {
2363
+ if (e.length > 1) {
2364
+ for (let t = 0; t < e.length; t++) this.removeChild(e[t]);
2365
+ return e[0];
2366
+ }
2367
+ let t = e[0], n = this.children.indexOf(t);
2368
+ return n > -1 && (this._didViewChangeTick++, this.children.splice(n, 1), this.renderGroup ? this.renderGroup.removeChild(t) : this.parentRenderGroup && this.parentRenderGroup.removeChild(t), t.parentRenderLayer && t.parentRenderLayer.detach(t), t.parent = null, this.emit("childRemoved", t, this, n), t.emit("removed", this)), t;
2369
+ }
2370
+ _onUpdate(e) {
2371
+ e && e === this._skew && this._updateSkew(), this._didContainerChangeTick++, !this.didChange && (this.didChange = !0, this.parentRenderGroup && this.parentRenderGroup.onChildUpdate(this));
2372
+ }
2373
+ set isRenderGroup(e) {
2374
+ !!this.renderGroup !== e && (e ? this.enableRenderGroup() : this.disableRenderGroup());
2375
+ }
2376
+ get isRenderGroup() {
2377
+ return !!this.renderGroup;
2378
+ }
2379
+ enableRenderGroup() {
2380
+ if (this.renderGroup) return;
2381
+ let e = this.parentRenderGroup;
2382
+ e?.removeChild(this), this.renderGroup = z.get(Tt, this), this.groupTransform = p.IDENTITY, e?.addChild(this), this._updateIsSimple();
2383
+ }
2384
+ disableRenderGroup() {
2385
+ if (!this.renderGroup) return;
2386
+ let e = this.parentRenderGroup;
2387
+ e?.removeChild(this), z.return(this.renderGroup), this.renderGroup = null, this.groupTransform = this.relativeGroupTransform, e?.addChild(this), this._updateIsSimple();
2388
+ }
2389
+ _updateIsSimple() {
2390
+ this.isSimple = !this.renderGroup && this.effects.length === 0;
2391
+ }
2392
+ get worldTransform() {
2393
+ return this._worldTransform ||= new p(), this.renderGroup ? this._worldTransform.copyFrom(this.renderGroup.worldTransform) : this.parentRenderGroup && this._worldTransform.appendFrom(this.relativeGroupTransform, this.parentRenderGroup.worldTransform), this._worldTransform;
2394
+ }
2395
+ get x() {
2396
+ return this._position.x;
2397
+ }
2398
+ set x(e) {
2399
+ this._position.x = e;
2400
+ }
2401
+ get y() {
2402
+ return this._position.y;
2403
+ }
2404
+ set y(e) {
2405
+ this._position.y = e;
2406
+ }
2407
+ get position() {
2408
+ return this._position;
2409
+ }
2410
+ set position(e) {
2411
+ this._position.copyFrom(e);
2412
+ }
2413
+ get rotation() {
2414
+ return this._rotation;
2415
+ }
2416
+ set rotation(e) {
2417
+ this._rotation !== e && (this._rotation = e, this._onUpdate(this._skew));
2418
+ }
2419
+ get angle() {
2420
+ return this.rotation * l;
2421
+ }
2422
+ set angle(e) {
2423
+ this.rotation = e * u;
2424
+ }
2425
+ get pivot() {
2426
+ return this._pivot === U && (this._pivot = new o(this, 0, 0)), this._pivot;
2427
+ }
2428
+ set pivot(e) {
2429
+ this._pivot === U && (this._pivot = new o(this, 0, 0), this._origin !== W && R("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")), typeof e == "number" ? this._pivot.set(e) : this._pivot.copyFrom(e);
2430
+ }
2431
+ get skew() {
2432
+ return this._skew === Dt && (this._skew = new o(this, 0, 0)), this._skew;
2433
+ }
2434
+ set skew(e) {
2435
+ this._skew === Dt && (this._skew = new o(this, 0, 0)), this._skew.copyFrom(e);
2436
+ }
2437
+ get scale() {
2438
+ return this._scale === Ot && (this._scale = new o(this, 1, 1)), this._scale;
2439
+ }
2440
+ set scale(e) {
2441
+ this._scale === Ot && (this._scale = new o(this, 0, 0)), typeof e == "string" && (e = parseFloat(e)), typeof e == "number" ? this._scale.set(e) : this._scale.copyFrom(e);
2442
+ }
2443
+ get origin() {
2444
+ return this._origin === W && (this._origin = new o(this, 0, 0)), this._origin;
2445
+ }
2446
+ set origin(e) {
2447
+ this._origin === W && (this._origin = new o(this, 0, 0), this._pivot !== U && R("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")), typeof e == "number" ? this._origin.set(e) : this._origin.copyFrom(e);
2448
+ }
2449
+ get width() {
2450
+ return Math.abs(this.scale.x * this.getLocalBounds().width);
2451
+ }
2452
+ set width(e) {
2453
+ let t = this.getLocalBounds().width;
2454
+ this._setWidth(e, t);
2455
+ }
2456
+ get height() {
2457
+ return Math.abs(this.scale.y * this.getLocalBounds().height);
2458
+ }
2459
+ set height(e) {
2460
+ let t = this.getLocalBounds().height;
2461
+ this._setHeight(e, t);
2462
+ }
2463
+ getSize(e) {
2464
+ e ||= {};
2465
+ let t = this.getLocalBounds();
2466
+ return e.width = Math.abs(this.scale.x * t.width), e.height = Math.abs(this.scale.y * t.height), e;
2467
+ }
2468
+ setSize(e, t) {
2469
+ let n = this.getLocalBounds();
2470
+ typeof e == "object" ? (t = e.height ?? e.width, e = e.width) : t ??= e, e !== void 0 && this._setWidth(e, n.width), t !== void 0 && this._setHeight(t, n.height);
2471
+ }
2472
+ _updateSkew() {
2473
+ let e = this._rotation, t = this._skew;
2474
+ this._cx = Math.cos(e + t._y), this._sx = Math.sin(e + t._y), this._cy = -Math.sin(e - t._x), this._sy = Math.cos(e - t._x);
2475
+ }
2476
+ updateTransform(e) {
2477
+ return this.position.set(typeof e.x == "number" ? e.x : this.position.x, typeof e.y == "number" ? e.y : this.position.y), this.scale.set(typeof e.scaleX == "number" ? e.scaleX : this.scale.x, typeof e.scaleY == "number" ? e.scaleY : this.scale.y), this.rotation = typeof e.rotation == "number" ? e.rotation : this.rotation, this.skew.set(typeof e.skewX == "number" ? e.skewX : this.skew.x, typeof e.skewY == "number" ? e.skewY : this.skew.y), this.pivot.set(typeof e.pivotX == "number" ? e.pivotX : this.pivot.x, typeof e.pivotY == "number" ? e.pivotY : this.pivot.y), this.origin.set(typeof e.originX == "number" ? e.originX : this.origin.x, typeof e.originY == "number" ? e.originY : this.origin.y), this;
2478
+ }
2479
+ setFromMatrix(e) {
2480
+ e.decompose(this);
2481
+ }
2482
+ updateLocalTransform() {
2483
+ let e = this._didContainerChangeTick;
2484
+ if (this._didLocalTransformChangeId === e) return;
2485
+ this._didLocalTransformChangeId = e;
2486
+ let t = this.localTransform, n = this._scale, r = this._pivot, i = this._origin, a = this._position, o = n._x, s = n._y, c = r._x, l = r._y, u = -i._x, d = -i._y;
2487
+ t.a = this._cx * o, t.b = this._sx * o, t.c = this._cy * s, t.d = this._sy * s, t.tx = a._x - (c * t.a + l * t.c) + (u * t.a + d * t.c) - u, t.ty = a._y - (c * t.b + l * t.d) + (u * t.b + d * t.d) - d;
2488
+ }
2489
+ set alpha(e) {
2490
+ e !== this.localAlpha && (this.localAlpha = e, this._updateFlags |= 1, this._onUpdate());
2491
+ }
2492
+ get alpha() {
2493
+ return this.localAlpha;
2494
+ }
2495
+ set tint(e) {
2496
+ let t = We.shared.setValue(e ?? 16777215).toBgrNumber();
2497
+ t !== this.localColor && (this.localColor = t, this._updateFlags |= 1, this._onUpdate());
2498
+ }
2499
+ get tint() {
2500
+ return H(this.localColor);
2501
+ }
2502
+ set blendMode(e) {
2503
+ this.localBlendMode !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= 2, this.localBlendMode = e, this._onUpdate());
2504
+ }
2505
+ get blendMode() {
2506
+ return this.localBlendMode;
2507
+ }
2508
+ get visible() {
2509
+ return !!(this.localDisplayStatus & 2);
2510
+ }
2511
+ set visible(e) {
2512
+ let t = e ? 2 : 0;
2513
+ (this.localDisplayStatus & 2) !== t && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= 4, this.localDisplayStatus ^= 2, this._onUpdate(), this.emit("visibleChanged", e));
2514
+ }
2515
+ get culled() {
2516
+ return !(this.localDisplayStatus & 4);
2517
+ }
2518
+ set culled(e) {
2519
+ let t = e ? 0 : 4;
2520
+ (this.localDisplayStatus & 4) !== t && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._updateFlags |= 4, this.localDisplayStatus ^= 4, this._onUpdate());
2521
+ }
2522
+ get renderable() {
2523
+ return !!(this.localDisplayStatus & 1);
2524
+ }
2525
+ set renderable(e) {
2526
+ let t = +!!e;
2527
+ (this.localDisplayStatus & 1) !== t && (this._updateFlags |= 4, this.localDisplayStatus ^= 1, this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0), this._onUpdate());
2528
+ }
2529
+ get isRenderable() {
2530
+ return this.localDisplayStatus === 7 && this.groupAlpha > 0;
2531
+ }
2532
+ destroy(e = !1) {
2533
+ if (this.destroyed) return;
2534
+ this.destroyed = !0;
2535
+ let t;
2536
+ if (this.children.length && (t = this.removeChildren(0, this.children.length)), this.removeFromParent(), this.parent = null, this._maskEffect = null, this._filterEffect = null, this.effects = null, this._position = null, this._scale = null, this._pivot = null, this._origin = null, this._skew = null, this.emit("destroyed", this), this.removeAllListeners(), (typeof e == "boolean" ? e : e?.children) && t) for (let n = 0; n < t.length; ++n) t[n].destroy(e);
2537
+ this.renderGroup?.destroy(), this.renderGroup = null;
2538
+ }
2539
+ };
2540
+ a.mixin(kt, Qe, at, xt, vt, _t, nt, rt, yt, Ge, Xe, ft, $e);
2541
+ //#endregion
2542
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/scene/view/ViewContainer.mjs
2543
+ var At = class extends kt {
2544
+ constructor(e) {
2545
+ super(e), this.canBundle = !0, this.allowChildren = !1, this._roundPixels = 0, this._lastUsed = -1, this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this._bounds = new A(0, 1, 0, 0), this._boundsDirty = !0, this.autoGarbageCollect = e.autoGarbageCollect ?? !0;
2546
+ }
2547
+ get bounds() {
2548
+ return this._boundsDirty ? (this.updateBounds(), this._boundsDirty = !1, this._bounds) : this._bounds;
2549
+ }
2550
+ get roundPixels() {
2551
+ return !!this._roundPixels;
2552
+ }
2553
+ set roundPixels(e) {
2554
+ this._roundPixels = +!!e;
2555
+ }
2556
+ containsPoint(e) {
2557
+ let t = this.bounds, { x: n, y: r } = e;
2558
+ return n >= t.minX && n <= t.maxX && r >= t.minY && r <= t.maxY;
2559
+ }
2560
+ onViewUpdate() {
2561
+ if (this._didViewChangeTick++, this._boundsDirty = !0, this.didViewUpdate) return;
2562
+ this.didViewUpdate = !0;
2563
+ let e = this.renderGroup || this.parentRenderGroup;
2564
+ e && e.onChildViewUpdate(this);
2565
+ }
2566
+ unload() {
2567
+ this.emit("unload", this);
2568
+ for (let e in this._gpuData) this._gpuData[e]?.destroy();
2569
+ this._gpuData = /* @__PURE__ */ Object.create(null), this.onViewUpdate();
2570
+ }
2571
+ destroy(e) {
2572
+ this.unload(), super.destroy(e), this._bounds = null;
2573
+ }
2574
+ collectRenderablesSimple(e, t, n) {
2575
+ let { renderPipes: r } = t;
2576
+ r.blendMode.pushBlendMode(this, this.groupBlendMode, e);
2577
+ let i = r[this.renderPipeId];
2578
+ i?.addRenderable && i.addRenderable(this, e), this.didViewUpdate = !1;
2579
+ let a = this.children, o = a.length;
2580
+ for (let r = 0; r < o; r++) a[r].collectRenderables(e, t, n);
2581
+ r.blendMode.popBlendMode(e);
2582
+ }
2583
+ }, jt = class e extends At {
2584
+ constructor(e = k.EMPTY) {
2585
+ e instanceof k && (e = { texture: e });
2586
+ let { texture: t = k.EMPTY, anchor: n, roundPixels: r, width: i, height: a, ...s } = e;
2587
+ super({
2588
+ label: "Sprite",
2589
+ ...s
2590
+ }), this.renderPipeId = "sprite", this.batched = !0, this._visualBounds = {
2591
+ minX: 0,
2592
+ maxX: 1,
2593
+ minY: 0,
2594
+ maxY: 0
2595
+ }, this._anchor = new o({ _onUpdate: () => {
2596
+ this.onViewUpdate();
2597
+ } }), n ? this.anchor = n : t.defaultAnchor && (this.anchor = t.defaultAnchor), this.texture = t, this.allowChildren = !1, this.roundPixels = r ?? !1, i !== void 0 && (this.width = i), a !== void 0 && (this.height = a);
2598
+ }
2599
+ static from(t, n = !1) {
2600
+ return t instanceof k ? new e(t) : new e(k.from(t, n));
2601
+ }
2602
+ set texture(e) {
2603
+ e ||= k.EMPTY;
2604
+ let t = this._texture;
2605
+ t !== e && (t && t.dynamic && t.off("update", this.onViewUpdate, this), e.dynamic && e.on("update", this.onViewUpdate, this), this._texture = e, this._width && this._setWidth(this._width, this._texture.orig.width), this._height && this._setHeight(this._height, this._texture.orig.height), this.onViewUpdate());
2606
+ }
2607
+ get texture() {
2608
+ return this._texture;
2609
+ }
2610
+ get visualBounds() {
2611
+ return ve(this._visualBounds, this._anchor, this._texture), this._visualBounds;
2612
+ }
2613
+ get sourceBounds() {
2614
+ return D("8.6.1", "Sprite.sourceBounds is deprecated, use visualBounds instead."), this.visualBounds;
2615
+ }
2616
+ updateBounds() {
2617
+ let e = this._anchor, t = this._texture, n = this._bounds, { width: r, height: i } = t.orig;
2618
+ n.minX = -e._x * r, n.maxX = n.minX + r, n.minY = -e._y * i, n.maxY = n.minY + i;
2619
+ }
2620
+ destroy(e = !1) {
2621
+ if (super.destroy(e), typeof e == "boolean" ? e : e?.texture) {
2622
+ let t = typeof e == "boolean" ? e : e?.textureSource;
2623
+ this._texture.destroy(t);
2624
+ }
2625
+ this._texture = null, this._visualBounds = null, this._bounds = null, this._anchor = null;
2626
+ }
2627
+ get anchor() {
2628
+ return this._anchor;
2629
+ }
2630
+ set anchor(e) {
2631
+ typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e);
2632
+ }
2633
+ get width() {
2634
+ return Math.abs(this.scale.x) * this._texture.orig.width;
2635
+ }
2636
+ set width(e) {
2637
+ this._setWidth(e, this._texture.orig.width), this._width = e;
2638
+ }
2639
+ get height() {
2640
+ return Math.abs(this.scale.y) * this._texture.orig.height;
2641
+ }
2642
+ set height(e) {
2643
+ this._setHeight(e, this._texture.orig.height), this._height = e;
2644
+ }
2645
+ getSize(e) {
2646
+ return e ||= {}, e.width = Math.abs(this.scale.x) * this._texture.orig.width, e.height = Math.abs(this.scale.y) * this._texture.orig.height, e;
2647
+ }
2648
+ setSize(e, t) {
2649
+ typeof e == "object" ? (t = e.height ?? e.width, e = e.width) : t ??= e, e !== void 0 && this._setWidth(e, this._texture.orig.width), t !== void 0 && this._setHeight(t, this._texture.orig.height);
2650
+ }
2651
+ }, Mt = {
2652
+ createCanvas: (e, t) => {
2653
+ let n = document.createElement("canvas");
2654
+ return n.width = e, n.height = t, n;
2655
+ },
2656
+ createImage: () => new Image(),
2657
+ getCanvasRenderingContext2D: () => CanvasRenderingContext2D,
2658
+ getWebGLRenderingContext: () => WebGLRenderingContext,
2659
+ getNavigator: () => navigator,
2660
+ getBaseUrl: () => document.baseURI ?? window.location.href,
2661
+ getFontFaceSet: () => document.fonts,
2662
+ fetch: (e, t) => fetch(e, t),
2663
+ parseXML: (e) => new DOMParser().parseFromString(e, "text/xml")
2664
+ }, Nt = {
2665
+ get() {
2666
+ return Mt;
2667
+ },
2668
+ set(e) {
2669
+ Mt = e;
2670
+ }
2671
+ }, Pt = class extends O {
2672
+ constructor(e) {
2673
+ e.resource ||= Nt.get().createCanvas(), e.width || (e.width = e.resource.width, e.autoDensity || (e.width /= e.resolution)), e.height || (e.height = e.resource.height, e.autoDensity || (e.height /= e.resolution)), super(e), this.uploadMethodId = "image", this.autoDensity = e.autoDensity, this.resizeCanvas(), this.transparent = !!e.transparent;
2674
+ }
2675
+ resizeCanvas() {
2676
+ this.autoDensity && "style" in this.resource && (this.resource.style.width = `${this.width}px`, this.resource.style.height = `${this.height}px`), (this.resource.width !== this.pixelWidth || this.resource.height !== this.pixelHeight) && (this.resource.width = this.pixelWidth, this.resource.height = this.pixelHeight);
2677
+ }
2678
+ resize(e = this.width, t = this.height, n = this._resolution) {
2679
+ let r = super.resize(e, t, n);
2680
+ return r && this.resizeCanvas(), r;
2681
+ }
2682
+ static test(e) {
2683
+ return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement || globalThis.OffscreenCanvas && e instanceof OffscreenCanvas;
2684
+ }
2685
+ get context2D() {
2686
+ return this._context2D ||= this.resource.getContext("2d");
2687
+ }
2688
+ };
2689
+ Pt.extension = n.TextureSource;
2690
+ //#endregion
2691
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/ticker/const.mjs
2692
+ var G = /* @__PURE__ */ ((e) => (e[e.INTERACTION = 50] = "INTERACTION", e[e.HIGH = 25] = "HIGH", e[e.NORMAL = 0] = "NORMAL", e[e.LOW = -25] = "LOW", e[e.UTILITY = -50] = "UTILITY", e))(G || {}), Ft = class {
2693
+ constructor(e, t = null, n = 0, r = !1) {
2694
+ this.next = null, this.previous = null, this._destroyed = !1, this._fn = e, this._context = t, this.priority = n, this._once = r;
2695
+ }
2696
+ match(e, t = null) {
2697
+ return this._fn === e && this._context === t;
2698
+ }
2699
+ emit(e) {
2700
+ this._fn && (this._context ? this._fn.call(this._context, e) : this._fn(e));
2701
+ let t = this.next;
2702
+ return this._once && this.destroy(!0), this._destroyed && (this.next = null), t;
2703
+ }
2704
+ connect(e) {
2705
+ this.previous = e, e.next && (e.next.previous = this), this.next = e.next, e.next = this;
2706
+ }
2707
+ destroy(e = !1) {
2708
+ this._destroyed = !0, this._fn = null, this._context = null, this.previous && (this.previous.next = this.next), this.next && (this.next.previous = this.previous);
2709
+ let t = this.next;
2710
+ return this.next = e ? null : t, this.previous = null, t;
2711
+ }
2712
+ }, It = class e {
2713
+ constructor() {
2714
+ this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new Ft(null, null, Infinity), this.deltaMS = 1 / e.targetFPMS, this.elapsedMS = 1 / e.targetFPMS, this._tick = (e) => {
2715
+ this._requestId = null, this.started && (this.update(e), this.started && this._requestId === null && this._head.next && (this._requestId = requestAnimationFrame(this._tick)));
2716
+ };
2717
+ }
2718
+ _requestIfNeeded() {
2719
+ this._requestId === null && this._head.next && (this.lastTime = performance.now(), this._lastFrame = this.lastTime, this._requestId = requestAnimationFrame(this._tick));
2720
+ }
2721
+ _cancelIfNeeded() {
2722
+ this._requestId !== null && (cancelAnimationFrame(this._requestId), this._requestId = null);
2723
+ }
2724
+ _startIfPossible() {
2725
+ this.started ? this._requestIfNeeded() : this.autoStart && this.start();
2726
+ }
2727
+ add(e, t, n = G.NORMAL) {
2728
+ return this._addListener(new Ft(e, t, n));
2729
+ }
2730
+ addOnce(e, t, n = G.NORMAL) {
2731
+ return this._addListener(new Ft(e, t, n, !0));
2732
+ }
2733
+ _addListener(e) {
2734
+ let t = this._head.next, n = this._head;
2735
+ if (!t) e.connect(n);
2736
+ else {
2737
+ for (; t;) {
2738
+ if (e.priority > t.priority) {
2739
+ e.connect(n);
2740
+ break;
2741
+ }
2742
+ n = t, t = t.next;
2743
+ }
2744
+ e.previous || e.connect(n);
2745
+ }
2746
+ return this._startIfPossible(), this;
2747
+ }
2748
+ remove(e, t) {
2749
+ let n = this._head.next;
2750
+ for (; n;) n = n.match(e, t) ? n.destroy() : n.next;
2751
+ return this._head.next || this._cancelIfNeeded(), this;
2752
+ }
2753
+ get count() {
2754
+ if (!this._head) return 0;
2755
+ let e = 0, t = this._head;
2756
+ for (; t = t.next;) e++;
2757
+ return e;
2758
+ }
2759
+ start() {
2760
+ this.started || (this.started = !0, this._requestIfNeeded());
2761
+ }
2762
+ stop() {
2763
+ this.started && (this.started = !1, this._cancelIfNeeded());
2764
+ }
2765
+ destroy() {
2766
+ if (!this._protected) {
2767
+ this.stop();
2768
+ let e = this._head.next;
2769
+ for (; e;) e = e.destroy(!0);
2770
+ this._head.destroy(), this._head = null;
2771
+ }
2772
+ }
2773
+ update(t = performance.now()) {
2774
+ let n;
2775
+ if (t > this.lastTime) {
2776
+ if (n = this.elapsedMS = t - this.lastTime, n > this._maxElapsedMS && (n = this._maxElapsedMS), n *= this.speed, this._minElapsedMS) {
2777
+ let e = t - this._lastFrame | 0;
2778
+ if (e < this._minElapsedMS) return;
2779
+ this._lastFrame = t - e % this._minElapsedMS;
2780
+ }
2781
+ this.deltaMS = n, this.deltaTime = this.deltaMS * e.targetFPMS;
2782
+ let r = this._head, i = r.next;
2783
+ for (; i;) i = i.emit(this);
2784
+ r.next || this._cancelIfNeeded();
2785
+ } else this.deltaTime = this.deltaMS = this.elapsedMS = 0;
2786
+ this.lastTime = t;
2787
+ }
2788
+ get FPS() {
2789
+ return 1e3 / this.elapsedMS;
2790
+ }
2791
+ get minFPS() {
2792
+ return 1e3 / this._maxElapsedMS;
2793
+ }
2794
+ set minFPS(t) {
2795
+ let n = Math.min(Math.max(0, t) / 1e3, e.targetFPMS);
2796
+ this._maxElapsedMS = 1 / n, this._minElapsedMS && t > this.maxFPS && (this.maxFPS = t);
2797
+ }
2798
+ get maxFPS() {
2799
+ return this._minElapsedMS ? Math.round(1e3 / this._minElapsedMS) : 0;
2800
+ }
2801
+ set maxFPS(e) {
2802
+ e === 0 ? this._minElapsedMS = 0 : (e < this.minFPS && (this.minFPS = e), this._minElapsedMS = 1 / (e / 1e3));
2803
+ }
2804
+ static get shared() {
2805
+ if (!e._shared) {
2806
+ let t = e._shared = new e();
2807
+ t.autoStart = !0, t._protected = !0;
2808
+ }
2809
+ return e._shared;
2810
+ }
2811
+ static get system() {
2812
+ if (!e._system) {
2813
+ let t = e._system = new e();
2814
+ t.autoStart = !0, t._protected = !0;
2815
+ }
2816
+ return e._system;
2817
+ }
2818
+ };
2819
+ It.targetFPMS = .06;
2820
+ var Lt = It, Rt = /* @__PURE__ */ Object.create(null), zt = /* @__PURE__ */ Object.create(null);
2821
+ function K(e, t) {
2822
+ let n = zt[e];
2823
+ return n === void 0 && (Rt[t] === void 0 && (Rt[t] = 1), zt[e] = n = Rt[t]++), n;
2824
+ }
2825
+ //#endregion
2826
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/getTestContext.mjs
2827
+ var Bt;
2828
+ function Vt() {
2829
+ return (!Bt || Bt?.isContextLost()) && (Bt = Nt.get().createCanvas().getContext("webgl", {})), Bt;
2830
+ }
2831
+ //#endregion
2832
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/getMaxFragmentPrecision.mjs
2833
+ var q;
2834
+ function Ht() {
2835
+ if (!q) {
2836
+ q = "mediump";
2837
+ let e = Vt();
2838
+ e && e.getShaderPrecisionFormat && (q = e.getShaderPrecisionFormat(e.FRAGMENT_SHADER, e.HIGH_FLOAT).precision ? "highp" : "mediump");
2839
+ }
2840
+ return q;
2841
+ }
2842
+ //#endregion
2843
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/addProgramDefines.mjs
2844
+ function Ut(e, t, n) {
2845
+ return t ? e : n ? (e = e.replace("out vec4 finalColor;", ""), `
2846
+
2847
+ #ifdef GL_ES // This checks if it is WebGL1
2848
+ #define in varying
2849
+ #define finalColor gl_FragColor
2850
+ #define texture texture2D
2851
+ #endif
2852
+ ${e}
2853
+ `) : `
2854
+
2855
+ #ifdef GL_ES // This checks if it is WebGL1
2856
+ #define in attribute
2857
+ #define out varying
2858
+ #endif
2859
+ ${e}
2860
+ `;
2861
+ }
2862
+ //#endregion
2863
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/ensurePrecision.mjs
2864
+ function Wt(e, t, n) {
2865
+ let r = n ? t.maxSupportedFragmentPrecision : t.maxSupportedVertexPrecision;
2866
+ if (e.substring(0, 9) !== "precision") {
2867
+ let i = n ? t.requestedFragmentPrecision : t.requestedVertexPrecision;
2868
+ return i === "highp" && r !== "highp" && (i = "mediump"), `precision ${i} float;
2869
+ ${e}`;
2870
+ } else if (r !== "highp" && e.substring(0, 15) === "precision highp") return e.replace("precision highp", "precision mediump");
2871
+ return e;
2872
+ }
2873
+ //#endregion
2874
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/insertVersion.mjs
2875
+ function Gt(e, t) {
2876
+ return t ? `#version 300 es
2877
+ ${e}` : e;
2878
+ }
2879
+ //#endregion
2880
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/setProgramName.mjs
2881
+ var Kt = {}, qt = {};
2882
+ function Jt(e, { name: t = "pixi-program" }, n = !0) {
2883
+ t = t.replace(/\s+/g, "-"), t += n ? "-fragment" : "-vertex";
2884
+ let r = n ? Kt : qt;
2885
+ return r[t] ? (r[t]++, t += `-${r[t]}`) : r[t] = 1, e.indexOf("#define SHADER_NAME") === -1 ? `${`#define SHADER_NAME ${t}`}
2886
+ ${e}` : e;
2887
+ }
2888
+ //#endregion
2889
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/program/preprocessors/stripVersion.mjs
2890
+ function Yt(e, t) {
2891
+ return t ? e.replace("#version 300 es", "") : e;
2892
+ }
2893
+ //#endregion
2894
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gl/shader/GlProgram.mjs
2895
+ var Xt = {
2896
+ stripVersion: Yt,
2897
+ ensurePrecision: Wt,
2898
+ addProgramDefines: Ut,
2899
+ setProgramName: Jt,
2900
+ insertVersion: Gt
2901
+ }, J = /* @__PURE__ */ Object.create(null), Zt = class e {
2902
+ constructor(t) {
2903
+ t = {
2904
+ ...e.defaultOptions,
2905
+ ...t
2906
+ };
2907
+ let n = t.fragment.indexOf("#version 300 es") !== -1, r = {
2908
+ stripVersion: n,
2909
+ ensurePrecision: {
2910
+ requestedFragmentPrecision: t.preferredFragmentPrecision,
2911
+ requestedVertexPrecision: t.preferredVertexPrecision,
2912
+ maxSupportedVertexPrecision: "highp",
2913
+ maxSupportedFragmentPrecision: Ht()
2914
+ },
2915
+ setProgramName: { name: t.name },
2916
+ addProgramDefines: n,
2917
+ insertVersion: n
2918
+ }, i = t.fragment, a = t.vertex;
2919
+ Object.keys(Xt).forEach((e) => {
2920
+ let t = r[e];
2921
+ i = Xt[e](i, t, !0), a = Xt[e](a, t, !1);
2922
+ }), this.fragment = i, this.vertex = a, this.transformFeedbackVaryings = t.transformFeedbackVaryings, this._key = K(`${this.vertex}:${this.fragment}`, "gl-program");
2923
+ }
2924
+ destroy() {
2925
+ this.fragment = null, this.vertex = null, this._attributeData = null, this._uniformData = null, this._uniformBlockData = null, this.transformFeedbackVaryings = null, J[this._cacheKey] = null;
2926
+ }
2927
+ static from(t) {
2928
+ let n = `${t.vertex}:${t.fragment}`;
2929
+ return J[n] || (J[n] = new e(t), J[n]._cacheKey = n), J[n];
2930
+ }
2931
+ };
2932
+ Zt.defaultOptions = {
2933
+ preferredVertexPrecision: "highp",
2934
+ preferredFragmentPrecision: "mediump"
2935
+ };
2936
+ var Qt = Zt, $t = {
2937
+ uint8x2: {
2938
+ size: 2,
2939
+ stride: 2,
2940
+ normalised: !1
2941
+ },
2942
+ uint8x4: {
2943
+ size: 4,
2944
+ stride: 4,
2945
+ normalised: !1
2946
+ },
2947
+ sint8x2: {
2948
+ size: 2,
2949
+ stride: 2,
2950
+ normalised: !1
2951
+ },
2952
+ sint8x4: {
2953
+ size: 4,
2954
+ stride: 4,
2955
+ normalised: !1
2956
+ },
2957
+ unorm8x2: {
2958
+ size: 2,
2959
+ stride: 2,
2960
+ normalised: !0
2961
+ },
2962
+ unorm8x4: {
2963
+ size: 4,
2964
+ stride: 4,
2965
+ normalised: !0
2966
+ },
2967
+ snorm8x2: {
2968
+ size: 2,
2969
+ stride: 2,
2970
+ normalised: !0
2971
+ },
2972
+ snorm8x4: {
2973
+ size: 4,
2974
+ stride: 4,
2975
+ normalised: !0
2976
+ },
2977
+ uint16x2: {
2978
+ size: 2,
2979
+ stride: 4,
2980
+ normalised: !1
2981
+ },
2982
+ uint16x4: {
2983
+ size: 4,
2984
+ stride: 8,
2985
+ normalised: !1
2986
+ },
2987
+ sint16x2: {
2988
+ size: 2,
2989
+ stride: 4,
2990
+ normalised: !1
2991
+ },
2992
+ sint16x4: {
2993
+ size: 4,
2994
+ stride: 8,
2995
+ normalised: !1
2996
+ },
2997
+ unorm16x2: {
2998
+ size: 2,
2999
+ stride: 4,
3000
+ normalised: !0
3001
+ },
3002
+ unorm16x4: {
3003
+ size: 4,
3004
+ stride: 8,
3005
+ normalised: !0
3006
+ },
3007
+ snorm16x2: {
3008
+ size: 2,
3009
+ stride: 4,
3010
+ normalised: !0
3011
+ },
3012
+ snorm16x4: {
3013
+ size: 4,
3014
+ stride: 8,
3015
+ normalised: !0
3016
+ },
3017
+ float16x2: {
3018
+ size: 2,
3019
+ stride: 4,
3020
+ normalised: !1
3021
+ },
3022
+ float16x4: {
3023
+ size: 4,
3024
+ stride: 8,
3025
+ normalised: !1
3026
+ },
3027
+ float32: {
3028
+ size: 1,
3029
+ stride: 4,
3030
+ normalised: !1
3031
+ },
3032
+ float32x2: {
3033
+ size: 2,
3034
+ stride: 8,
3035
+ normalised: !1
3036
+ },
3037
+ float32x3: {
3038
+ size: 3,
3039
+ stride: 12,
3040
+ normalised: !1
3041
+ },
3042
+ float32x4: {
3043
+ size: 4,
3044
+ stride: 16,
3045
+ normalised: !1
3046
+ },
3047
+ uint32: {
3048
+ size: 1,
3049
+ stride: 4,
3050
+ normalised: !1
3051
+ },
3052
+ uint32x2: {
3053
+ size: 2,
3054
+ stride: 8,
3055
+ normalised: !1
3056
+ },
3057
+ uint32x3: {
3058
+ size: 3,
3059
+ stride: 12,
3060
+ normalised: !1
3061
+ },
3062
+ uint32x4: {
3063
+ size: 4,
3064
+ stride: 16,
3065
+ normalised: !1
3066
+ },
3067
+ sint32: {
3068
+ size: 1,
3069
+ stride: 4,
3070
+ normalised: !1
3071
+ },
3072
+ sint32x2: {
3073
+ size: 2,
3074
+ stride: 8,
3075
+ normalised: !1
3076
+ },
3077
+ sint32x3: {
3078
+ size: 3,
3079
+ stride: 12,
3080
+ normalised: !1
3081
+ },
3082
+ sint32x4: {
3083
+ size: 4,
3084
+ stride: 16,
3085
+ normalised: !1
3086
+ }
3087
+ };
3088
+ function en(e) {
3089
+ return $t[e] ?? $t.float32;
3090
+ }
3091
+ //#endregion
3092
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/extractAttributesFromGpuProgram.mjs
3093
+ var tn = {
3094
+ f32: "float32",
3095
+ "vec2<f32>": "float32x2",
3096
+ "vec3<f32>": "float32x3",
3097
+ "vec4<f32>": "float32x4",
3098
+ vec2f: "float32x2",
3099
+ vec3f: "float32x3",
3100
+ vec4f: "float32x4",
3101
+ i32: "sint32",
3102
+ "vec2<i32>": "sint32x2",
3103
+ "vec3<i32>": "sint32x3",
3104
+ "vec4<i32>": "sint32x4",
3105
+ vec2i: "sint32x2",
3106
+ vec3i: "sint32x3",
3107
+ vec4i: "sint32x4",
3108
+ u32: "uint32",
3109
+ "vec2<u32>": "uint32x2",
3110
+ "vec3<u32>": "uint32x3",
3111
+ "vec4<u32>": "uint32x4",
3112
+ vec2u: "uint32x2",
3113
+ vec3u: "uint32x3",
3114
+ vec4u: "uint32x4",
3115
+ bool: "uint32",
3116
+ "vec2<bool>": "uint32x2",
3117
+ "vec3<bool>": "uint32x3",
3118
+ "vec4<bool>": "uint32x4"
3119
+ }, nn = /@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;
3120
+ function rn(e, t) {
3121
+ let n;
3122
+ for (; (n = nn.exec(e)) !== null;) {
3123
+ let e = tn[n[3]] ?? "float32";
3124
+ t[n[2]] = {
3125
+ location: parseInt(n[1], 10),
3126
+ format: e,
3127
+ stride: en(e).stride,
3128
+ offset: 0,
3129
+ instance: !1,
3130
+ start: 0
3131
+ };
3132
+ }
3133
+ nn.lastIndex = 0;
3134
+ }
3135
+ function an(e) {
3136
+ return e.replace(/\/\/.*$/gm, "").replace(/\/\*[\s\S]*?\*\//g, "");
3137
+ }
3138
+ function on({ source: e, entryPoint: t }) {
3139
+ let n = {}, r = an(e), i = r.indexOf(`fn ${t}(`);
3140
+ if (i === -1) return n;
3141
+ let a = r.indexOf("->", i);
3142
+ if (a === -1) return n;
3143
+ let o = r.substring(i, a);
3144
+ if (rn(o, n), Object.keys(n).length === 0) {
3145
+ let e = o.match(/\(\s*\w+\s*:\s*(\w+)/);
3146
+ if (e) {
3147
+ let t = e[1], i = RegExp(`struct\\s+${t}\\s*\\{([^}]+)\\}`, "s"), a = r.match(i);
3148
+ a && rn(a[1], n);
3149
+ }
3150
+ }
3151
+ return n;
3152
+ }
3153
+ //#endregion
3154
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/extractStructAndGroups.mjs
3155
+ function sn(e) {
3156
+ let t = /(^|[^/])@(group|binding)\(\d+\)[^;]+;/g, n = /@group\((\d+)\)/, r = /@binding\((\d+)\)/, i = /var(<[^>]+>)? (\w+)/, a = /:\s*([\w<>]+)/, o = /struct\s+(\w+)\s*{([^}]+)}/g, s = /(\w+)\s*:\s*([\w\<\>]+)/g, c = /struct\s+(\w+)/, l = e.match(t)?.map((e) => {
3157
+ let t = e.match(i), o = t?.[1] ?? "", s;
3158
+ return o === "<uniform>" ? s = "uniform" : o.startsWith("<storage") && (s = "storage"), {
3159
+ group: parseInt(e.match(n)[1], 10),
3160
+ binding: parseInt(e.match(r)[1], 10),
3161
+ name: t[2],
3162
+ accessMode: s,
3163
+ type: e.match(a)[1]
3164
+ };
3165
+ });
3166
+ return l ? {
3167
+ groups: l,
3168
+ structs: e.match(o)?.map((e) => {
3169
+ let t = e.match(c)[1], n = e.match(s).reduce((e, t) => {
3170
+ let [n, r] = t.split(":");
3171
+ return e[n.trim()] = r.trim(), e;
3172
+ }, {});
3173
+ return n ? {
3174
+ name: t,
3175
+ members: n
3176
+ } : null;
3177
+ }).filter(({ name: e }) => l.some((t) => t.type === e || t.type.includes(`<${e}>`))) ?? []
3178
+ } : {
3179
+ groups: [],
3180
+ structs: []
3181
+ };
3182
+ }
3183
+ //#endregion
3184
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/shader/const.mjs
3185
+ var Y = /* @__PURE__ */ ((e) => (e[e.VERTEX = 1] = "VERTEX", e[e.FRAGMENT = 2] = "FRAGMENT", e[e.COMPUTE = 4] = "COMPUTE", e))(Y || {});
3186
+ //#endregion
3187
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/generateGpuLayoutGroups.mjs
3188
+ function cn({ groups: e }) {
3189
+ let t = [];
3190
+ for (let n = 0; n < e.length; n++) {
3191
+ let r = e[n];
3192
+ t[r.group] || (t[r.group] = []), r.accessMode === "uniform" ? t[r.group].push({
3193
+ binding: r.binding,
3194
+ visibility: Y.VERTEX | Y.FRAGMENT,
3195
+ buffer: { type: "uniform" }
3196
+ }) : r.accessMode === "storage" ? t[r.group].push({
3197
+ binding: r.binding,
3198
+ visibility: Y.VERTEX | Y.FRAGMENT,
3199
+ buffer: { type: "read-only-storage" }
3200
+ }) : r.type === "sampler" ? t[r.group].push({
3201
+ binding: r.binding,
3202
+ visibility: Y.VERTEX | Y.FRAGMENT,
3203
+ sampler: { type: "filtering" }
3204
+ }) : r.type === "sampler_comparison" ? t[r.group].push({
3205
+ binding: r.binding,
3206
+ visibility: Y.VERTEX | Y.FRAGMENT,
3207
+ sampler: { type: "comparison" }
3208
+ }) : r.type === "texture_2d" || r.type.startsWith("texture_2d<") ? t[r.group].push({
3209
+ binding: r.binding,
3210
+ visibility: Y.VERTEX | Y.FRAGMENT,
3211
+ texture: {
3212
+ sampleType: "float",
3213
+ viewDimension: "2d",
3214
+ multisampled: !1
3215
+ }
3216
+ }) : r.type === "texture_depth_2d" ? t[r.group].push({
3217
+ binding: r.binding,
3218
+ visibility: Y.VERTEX | Y.FRAGMENT,
3219
+ texture: {
3220
+ sampleType: "depth",
3221
+ viewDimension: "2d",
3222
+ multisampled: !1
3223
+ }
3224
+ }) : r.type === "texture_depth_2d_array" ? t[r.group].push({
3225
+ binding: r.binding,
3226
+ visibility: Y.VERTEX | Y.FRAGMENT,
3227
+ texture: {
3228
+ sampleType: "depth",
3229
+ viewDimension: "2d-array",
3230
+ multisampled: !1
3231
+ }
3232
+ }) : r.type === "texture_2d_array" || r.type.startsWith("texture_2d_array<") ? t[r.group].push({
3233
+ binding: r.binding,
3234
+ visibility: Y.VERTEX | Y.FRAGMENT,
3235
+ texture: {
3236
+ sampleType: "float",
3237
+ viewDimension: "2d-array",
3238
+ multisampled: !1
3239
+ }
3240
+ }) : (r.type === "texture_cube" || r.type.startsWith("texture_cube<")) && t[r.group].push({
3241
+ binding: r.binding,
3242
+ visibility: Y.VERTEX | Y.FRAGMENT,
3243
+ texture: {
3244
+ sampleType: "float",
3245
+ viewDimension: "cube",
3246
+ multisampled: !1
3247
+ }
3248
+ });
3249
+ }
3250
+ for (let e = 0; e < t.length; e++) t[e] || (t[e] = []);
3251
+ return t;
3252
+ }
3253
+ //#endregion
3254
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/generateLayoutHash.mjs
3255
+ function ln({ groups: e }) {
3256
+ let t = [];
3257
+ for (let n = 0; n < e.length; n++) {
3258
+ let r = e[n];
3259
+ t[r.group] || (t[r.group] = {}), t[r.group][r.name] = r.binding;
3260
+ }
3261
+ return t;
3262
+ }
3263
+ //#endregion
3264
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/utils/removeStructAndGroupDuplicates.mjs
3265
+ function un(e, t) {
3266
+ let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
3267
+ return {
3268
+ structs: [...e.structs, ...t.structs].filter((e) => n.has(e.name) ? !1 : (n.add(e.name), !0)),
3269
+ groups: [...e.groups, ...t.groups].filter((e) => {
3270
+ let t = `${e.name}-${e.binding}`;
3271
+ return r.has(t) ? !1 : (r.add(t), !0);
3272
+ })
3273
+ };
3274
+ }
3275
+ //#endregion
3276
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/gpu/shader/GpuProgram.mjs
3277
+ var X = /* @__PURE__ */ Object.create(null), dn = class e {
3278
+ constructor(e) {
3279
+ this._layoutKey = 0, this._attributeLocationsKey = 0;
3280
+ let { fragment: t, vertex: n, layout: r, gpuLayout: i, name: a } = e;
3281
+ if (this.name = a, this.fragment = t, this.vertex = n, t.source === n.source) {
3282
+ let e = sn(t.source);
3283
+ this.structsAndGroups = e;
3284
+ } else {
3285
+ let e = sn(n.source), r = sn(t.source);
3286
+ this.structsAndGroups = un(e, r);
3287
+ }
3288
+ this.layout = r ?? ln(this.structsAndGroups), this.gpuLayout = i ?? cn(this.structsAndGroups), this.autoAssignGlobalUniforms = this.layout[0]?.globalUniforms !== void 0, this.autoAssignLocalUniforms = this.layout[1]?.localUniforms !== void 0, this._generateProgramKey();
3289
+ }
3290
+ _generateProgramKey() {
3291
+ let { vertex: e, fragment: t } = this, n = e.source + t.source + e.entryPoint + t.entryPoint;
3292
+ this._layoutKey = K(n, "program");
3293
+ }
3294
+ get attributeData() {
3295
+ return this._attributeData ??= on(this.vertex), this._attributeData;
3296
+ }
3297
+ destroy() {
3298
+ this.gpuLayout = null, this.layout = null, this.structsAndGroups = null, this.fragment = null, this.vertex = null, X[this._cacheKey] = null;
3299
+ }
3300
+ static from(t) {
3301
+ let n = `${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;
3302
+ return X[n] || (X[n] = new e(t), X[n]._cacheKey = n), X[n];
3303
+ }
3304
+ }, fn = [
3305
+ "f32",
3306
+ "i32",
3307
+ "u32",
3308
+ "vec2<f32>",
3309
+ "vec3<f32>",
3310
+ "vec4<f32>",
3311
+ "mat2x2<f32>",
3312
+ "mat3x3<f32>",
3313
+ "mat4x4<f32>",
3314
+ "mat3x2<f32>",
3315
+ "mat4x2<f32>",
3316
+ "mat2x3<f32>",
3317
+ "mat4x3<f32>",
3318
+ "mat2x4<f32>",
3319
+ "mat3x4<f32>",
3320
+ "vec2<i32>",
3321
+ "vec3<i32>",
3322
+ "vec4<i32>",
3323
+ "vec2<u32>",
3324
+ "vec3<u32>",
3325
+ "vec4<u32>"
3326
+ ], pn = fn.reduce((e, t) => (e[t] = !0, e), {});
3327
+ //#endregion
3328
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/shader/utils/getDefaultUniformValue.mjs
3329
+ function mn(e, t) {
3330
+ switch (e) {
3331
+ case "f32": return 0;
3332
+ case "vec2<f32>": return new Float32Array(2 * t);
3333
+ case "vec3<f32>": return new Float32Array(3 * t);
3334
+ case "vec4<f32>": return new Float32Array(4 * t);
3335
+ case "mat2x2<f32>": return new Float32Array([
3336
+ 1,
3337
+ 0,
3338
+ 0,
3339
+ 1
3340
+ ]);
3341
+ case "mat3x3<f32>": return new Float32Array([
3342
+ 1,
3343
+ 0,
3344
+ 0,
3345
+ 0,
3346
+ 1,
3347
+ 0,
3348
+ 0,
3349
+ 0,
3350
+ 1
3351
+ ]);
3352
+ case "mat4x4<f32>": return new Float32Array([
3353
+ 1,
3354
+ 0,
3355
+ 0,
3356
+ 0,
3357
+ 0,
3358
+ 1,
3359
+ 0,
3360
+ 0,
3361
+ 0,
3362
+ 0,
3363
+ 1,
3364
+ 0,
3365
+ 0,
3366
+ 0,
3367
+ 0,
3368
+ 1
3369
+ ]);
3370
+ }
3371
+ return null;
3372
+ }
3373
+ //#endregion
3374
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/shader/UniformGroup.mjs
3375
+ var hn = class e extends s {
3376
+ constructor(t, n) {
3377
+ super(), this._touched = 0, this.uid = w("uniform"), this._resourceType = "uniformGroup", this._resourceId = w("resource"), this.isUniformGroup = !0, this._dirtyId = 0, this.destroyed = !1, n = {
3378
+ ...e.defaultOptions,
3379
+ ...n
3380
+ }, this.uniformStructures = t;
3381
+ let r = {};
3382
+ for (let e in t) {
3383
+ let n = t[e];
3384
+ if (n.name = e, n.size = n.size ?? 1, !pn[n.type]) {
3385
+ let e = n.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);
3386
+ if (e) {
3387
+ let [, t, r] = e;
3388
+ throw Error(`Uniform type ${n.type} is not supported. Use type: '${t}', size: ${r} instead.`);
3389
+ }
3390
+ throw Error(`Uniform type ${n.type} is not supported. Supported uniform types are: ${fn.join(", ")}`);
3391
+ }
3392
+ n.value ??= mn(n.type, n.size), r[e] = n.value;
3393
+ }
3394
+ this.uniforms = r, this._dirtyId = 1, this.ubo = n.ubo, this.isStatic = n.isStatic, this._signature = K(Object.keys(r).map((e) => `${e}-${t[e].type}`).join("-"), "uniform-group");
3395
+ }
3396
+ get buffer() {
3397
+ return this._buffer;
3398
+ }
3399
+ set buffer(e) {
3400
+ this._buffer !== e && (this._buffer?.off("change", this.onBufferChange, this), this._buffer = e, e?.on("change", this.onBufferChange, this));
3401
+ }
3402
+ get _gcLastUsed() {
3403
+ return this._buffer?._gcLastUsed ?? -1;
3404
+ }
3405
+ set _gcLastUsed(e) {
3406
+ this._buffer && (this._buffer._gcLastUsed = e);
3407
+ }
3408
+ onBufferChange() {
3409
+ this._resourceId = w("resource"), this.emit("change", this);
3410
+ }
3411
+ update() {
3412
+ this._dirtyId++;
3413
+ }
3414
+ };
3415
+ hn.defaultOptions = {
3416
+ ubo: !1,
3417
+ isStatic: !1
3418
+ };
3419
+ var gn = hn, Z = class {
3420
+ constructor(e) {
3421
+ this.resources = /* @__PURE__ */ Object.create(null), this._dirty = !0;
3422
+ let t = 0;
3423
+ for (let n in e) {
3424
+ let r = e[n];
3425
+ this.setResource(r, t++);
3426
+ }
3427
+ }
3428
+ get _key() {
3429
+ if (this._dirty) {
3430
+ this._dirty = !1;
3431
+ let e = [], t = 0;
3432
+ for (let n in this.resources) e[t++] = this.resources[n] ? this.resources[n]._resourceId : -1;
3433
+ this._keyValue = e.join("|");
3434
+ }
3435
+ return this._keyValue;
3436
+ }
3437
+ setResource(e, t) {
3438
+ let n = this.resources[t];
3439
+ e !== n && (n && n.off?.("change", this.onResourceChange, this), e.on?.("change", this.onResourceChange, this), this.resources[t] = e, this._dirty = !0);
3440
+ }
3441
+ getResource(e) {
3442
+ return this.resources[e];
3443
+ }
3444
+ _touch(e, t) {
3445
+ let n = this.resources;
3446
+ for (let r in n) {
3447
+ let i = n[r];
3448
+ i && (i._gcLastUsed = e, i._touched = t);
3449
+ }
3450
+ }
3451
+ destroy() {
3452
+ let e = this.resources;
3453
+ for (let t in e) e[t]?.off?.("change", this.onResourceChange, this);
3454
+ this.resources = null;
3455
+ }
3456
+ onResourceChange(e) {
3457
+ if (this._dirty = !0, e.destroyed) {
3458
+ let t = this.resources;
3459
+ for (let n in t) t[n] === e && (t[n] = null);
3460
+ R(`[BindGroup] a '${e._resourceType}' was destroyed while still bound to a shader. Remove it from the shader before destroying it.`);
3461
+ }
3462
+ }
3463
+ }, Q = /* @__PURE__ */ ((e) => (e[e.WEBGL = 1] = "WEBGL", e[e.WEBGPU = 2] = "WEBGPU", e[e.CANVAS = 4] = "CANVAS", e[e.BOTH = 3] = "BOTH", e))(Q || {}), _n = class e {
3464
+ constructor(e) {
3465
+ this.data = { ...e };
3466
+ let t = Object.keys(e).sort().map((t) => `${t}:${e[t]}`).join("|");
3467
+ this.id = K(t, "shader-overrides");
3468
+ }
3469
+ static from(t) {
3470
+ return t instanceof e ? t : new e(t);
3471
+ }
3472
+ }, vn = class e extends s {
3473
+ constructor(e) {
3474
+ super(), this.uid = w("shader"), this._uniformBindMap = /* @__PURE__ */ Object.create(null), this._ownedBindGroups = [], this._destroyed = !1;
3475
+ let { gpuProgram: t, glProgram: n, groups: r, resources: i, compatibleRenderers: a, groupMap: o, overrides: s } = e;
3476
+ this._overrides = s ? _n.from(s) : null, this.gpuProgram = t, this.glProgram = n, a === void 0 && (a = 0, t && (a |= Q.WEBGPU), n && (a |= Q.WEBGL)), this.compatibleRenderers = a;
3477
+ let c = {};
3478
+ if (o) for (let e in o) for (let t in o[e]) {
3479
+ let n = o[e][t];
3480
+ c[n] = {
3481
+ group: e,
3482
+ binding: t,
3483
+ name: n
3484
+ };
3485
+ }
3486
+ if (!i && !r && (i = {}), i && r) throw Error("[Shader] Cannot have both resources and groups");
3487
+ if (!t && r && !o) throw Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");
3488
+ if (t && r && !o) {
3489
+ let e = t.structsAndGroups.groups;
3490
+ o = {}, e.forEach((e) => {
3491
+ o[e.group] = o[e.group] || {}, o[e.group][e.binding] = e.name, c[e.name] = e;
3492
+ });
3493
+ } else if (i) {
3494
+ r = {}, o ||= {}, t && t.structsAndGroups.groups.forEach((e) => {
3495
+ o[e.group] = o[e.group] || {}, o[e.group][e.binding] = e.name, c[e.name] = e;
3496
+ });
3497
+ let e = 0;
3498
+ for (let a in i) c[a] || (t && !n && R(`[Shader] the resource '${a}' matches no binding in the WGSL source \u2014 is the name correct?`), r[99] || (r[99] = new Z(), this._ownedBindGroups.push(r[99])), c[a] = {
3499
+ group: 99,
3500
+ binding: e,
3501
+ name: a
3502
+ }, o[99] = o[99] || {}, o[99][e] = a, e++);
3503
+ for (let e in i) {
3504
+ let t = e, n = i[e];
3505
+ !n.source && !n._resourceType && (n = new gn(n));
3506
+ let a = c[t];
3507
+ a && (r[a.group] || (r[a.group] = new Z(), this._ownedBindGroups.push(r[a.group])), r[a.group].setResource(n, a.binding));
3508
+ }
3509
+ }
3510
+ this.groups = r, this._uniformBindMap = o, this.resources = this._buildResourceAccessor(r, c);
3511
+ }
3512
+ addResource(e, t, n) {
3513
+ var r, i;
3514
+ (r = this._uniformBindMap)[t] || (r[t] = {}), (i = this._uniformBindMap[t])[n] || (i[n] = e), this.groups[t] || (this.groups[t] = new Z(), this._ownedBindGroups.push(this.groups[t]));
3515
+ }
3516
+ _buildResourceAccessor(e, t) {
3517
+ let n = {};
3518
+ for (let r in t) {
3519
+ let i = t[r];
3520
+ Object.defineProperty(n, i.name, {
3521
+ get() {
3522
+ return e[i.group].getResource(i.binding);
3523
+ },
3524
+ set(t) {
3525
+ e[i.group].setResource(t, i.binding);
3526
+ }
3527
+ });
3528
+ }
3529
+ return n;
3530
+ }
3531
+ destroy(e = !1) {
3532
+ this._destroyed || (this._destroyed = !0, this.emit("destroy", this), e && (this.gpuProgram?.destroy(), this.glProgram?.destroy()), this.gpuProgram = null, this.glProgram = null, this.removeAllListeners(), this._uniformBindMap = null, this._ownedBindGroups.forEach((e) => {
3533
+ e.destroy();
3534
+ }), this._ownedBindGroups = null, this.resources = null, this.groups = null, this._overrides = null);
3535
+ }
3536
+ static from(t) {
3537
+ let { gpu: n, gl: r, ...i } = t, a, o;
3538
+ return n && (a = dn.from(n)), r && (o = Qt.from(r)), new e({
3539
+ gpuProgram: a,
3540
+ glProgram: o,
3541
+ ...i
3542
+ });
3543
+ }
3544
+ }, yn = {
3545
+ normal: 0,
3546
+ add: 1,
3547
+ multiply: 2,
3548
+ screen: 3,
3549
+ overlay: 4,
3550
+ erase: 5,
3551
+ "normal-npm": 6,
3552
+ "add-npm": 7,
3553
+ "screen-npm": 8,
3554
+ min: 9,
3555
+ max: 10
3556
+ }, bn = {
3557
+ BLEND: 0,
3558
+ OFFSET: 1,
3559
+ CULLING: 2,
3560
+ DEPTH_TEST: 3,
3561
+ WINDING: 4,
3562
+ DEPTH_MASK: 5
3563
+ }, { BLEND: xn, OFFSET: Sn, CULLING: Cn, DEPTH_TEST: wn, WINDING: Tn, DEPTH_MASK: En } = bn, Dn = class e {
3564
+ constructor() {
3565
+ this.data = 0, this.blendMode = "normal", this.polygonOffset = 0, this.blend = !0, this.depthMask = !0;
3566
+ }
3567
+ get blend() {
3568
+ return !!(this.data & 1 << xn);
3569
+ }
3570
+ set blend(e) {
3571
+ !!(this.data & 1 << xn) !== e && (this.data ^= 1 << xn);
3572
+ }
3573
+ get offsets() {
3574
+ return !!(this.data & 1 << Sn);
3575
+ }
3576
+ set offsets(e) {
3577
+ !!(this.data & 1 << Sn) !== e && (this.data ^= 1 << Sn);
3578
+ }
3579
+ set cullMode(e) {
3580
+ if (e === "none") {
3581
+ this.culling = !1;
3582
+ return;
3583
+ }
3584
+ this.culling = !0, this.clockwiseFrontFace = e === "front";
3585
+ }
3586
+ get cullMode() {
3587
+ return this.culling ? this.clockwiseFrontFace ? "front" : "back" : "none";
3588
+ }
3589
+ get culling() {
3590
+ return !!(this.data & 1 << Cn);
3591
+ }
3592
+ set culling(e) {
3593
+ !!(this.data & 1 << Cn) !== e && (this.data ^= 1 << Cn);
3594
+ }
3595
+ get depthTest() {
3596
+ return !!(this.data & 1 << wn);
3597
+ }
3598
+ set depthTest(e) {
3599
+ !!(this.data & 1 << wn) !== e && (this.data ^= 1 << wn);
3600
+ }
3601
+ get depthMask() {
3602
+ return !!(this.data & 1 << En);
3603
+ }
3604
+ set depthMask(e) {
3605
+ !!(this.data & 1 << En) !== e && (this.data ^= 1 << En);
3606
+ }
3607
+ get clockwiseFrontFace() {
3608
+ return !!(this.data & 1 << Tn);
3609
+ }
3610
+ set clockwiseFrontFace(e) {
3611
+ !!(this.data & 1 << Tn) !== e && (this.data ^= 1 << Tn);
3612
+ }
3613
+ get blendMode() {
3614
+ return this._blendMode;
3615
+ }
3616
+ set blendMode(e) {
3617
+ this.blend = e !== "none", this._blendMode = e, this._blendModeId = yn[e] || 0;
3618
+ }
3619
+ get polygonOffset() {
3620
+ return this._polygonOffset;
3621
+ }
3622
+ set polygonOffset(e) {
3623
+ this.offsets = !!e, this._polygonOffset = e;
3624
+ }
3625
+ toString() {
3626
+ return `[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`;
3627
+ }
3628
+ static for2d() {
3629
+ let t = new e();
3630
+ return t.depthTest = !1, t.depthMask = !1, t.blend = !0, t;
3631
+ }
3632
+ };
3633
+ Dn.default2d = Dn.for2d();
3634
+ var On = Dn, kn = class e extends vn {
3635
+ constructor(t) {
3636
+ t = {
3637
+ ...e.defaultOptions,
3638
+ ...t
3639
+ }, super(t), this.enabled = !0, this._state = On.for2d(), this.blendMode = t.blendMode, this.padding = t.padding, typeof t.antialias == "boolean" ? this.antialias = t.antialias ? "on" : "off" : this.antialias = t.antialias, this.resolution = t.resolution, this.blendRequired = t.blendRequired, this.clipToViewport = t.clipToViewport, this.addResource("uTexture", 0, 1), t.blendRequired && this.addResource("uBackTexture", 0, 3);
3640
+ }
3641
+ apply(e, t, n, r) {
3642
+ e.applyFilter(this, t, n, r);
3643
+ }
3644
+ get blendMode() {
3645
+ return this._state.blendMode;
3646
+ }
3647
+ set blendMode(e) {
3648
+ this._state.blendMode = e;
3649
+ }
3650
+ static from(t) {
3651
+ let { gpu: n, gl: r, ...i } = t, a, o;
3652
+ return n && (a = dn.from(n)), r && (o = Qt.from(r)), new e({
3653
+ gpuProgram: a,
3654
+ glProgram: o,
3655
+ ...i
3656
+ });
3657
+ }
3658
+ };
3659
+ kn.defaultOptions = {
3660
+ blendMode: "normal",
3661
+ resolution: 1,
3662
+ padding: 0,
3663
+ antialias: "off",
3664
+ blendRequired: !1,
3665
+ clipToViewport: !0
3666
+ };
3667
+ var An = kn, $ = /* @__PURE__ */ ((e) => (e[e.MAP_READ = 1] = "MAP_READ", e[e.MAP_WRITE = 2] = "MAP_WRITE", e[e.COPY_SRC = 4] = "COPY_SRC", e[e.COPY_DST = 8] = "COPY_DST", e[e.INDEX = 16] = "INDEX", e[e.VERTEX = 32] = "VERTEX", e[e.UNIFORM = 64] = "UNIFORM", e[e.STORAGE = 128] = "STORAGE", e[e.INDIRECT = 256] = "INDIRECT", e[e.QUERY_RESOLVE = 512] = "QUERY_RESOLVE", e[e.STATIC = 1024] = "STATIC", e))($ || {}), jn = class extends s {
3668
+ constructor(e) {
3669
+ let { data: t, size: n } = e, { usage: r, label: i, shrinkToFit: a } = e;
3670
+ super(), this._gpuData = /* @__PURE__ */ Object.create(null), this._gcLastUsed = -1, this.autoGarbageCollect = !0, this.uid = w("buffer"), this._resourceType = "buffer", this._resourceId = w("resource"), this._touched = 0, this._updateID = 1, this._updateOffset = 0, this._dataInt32 = null, this.shrinkToFit = !0, this.destroyed = !1, t instanceof Array && (t = new Float32Array(t)), this._data = t, n ??= t?.byteLength;
3671
+ let o = !!t;
3672
+ this.descriptor = {
3673
+ size: n,
3674
+ usage: r,
3675
+ mappedAtCreation: o,
3676
+ label: i
3677
+ }, this.shrinkToFit = a ?? !0;
3678
+ }
3679
+ get data() {
3680
+ return this._data;
3681
+ }
3682
+ set data(e) {
3683
+ this.setDataWithSize(e, e.length, !0);
3684
+ }
3685
+ get dataInt32() {
3686
+ return this._dataInt32 ||= new Int32Array(this.data.buffer), this._dataInt32;
3687
+ }
3688
+ get static() {
3689
+ return !!(this.descriptor.usage & $.STATIC);
3690
+ }
3691
+ set static(e) {
3692
+ e ? this.descriptor.usage |= $.STATIC : this.descriptor.usage &= ~$.STATIC;
3693
+ }
3694
+ setDataWithSize(e, t, n) {
3695
+ if (this._updateID++, this._updateSize = t * e.BYTES_PER_ELEMENT, this._updateOffset = 0, this._data === e) {
3696
+ n && this.emit("update", this);
3697
+ return;
3698
+ }
3699
+ let r = this._data;
3700
+ if (this._data = e, this._dataInt32 = null, !r || r.length !== e.length) {
3701
+ !this.shrinkToFit && r && e.byteLength < r.byteLength ? n && this.emit("update", this) : (this.descriptor.size = e.byteLength, this._resourceId = w("resource"), this.emit("change", this));
3702
+ return;
3703
+ }
3704
+ n && this.emit("update", this);
3705
+ }
3706
+ update(e, t) {
3707
+ this._updateSize = e ?? this._updateSize, this._updateOffset = t || 0, this._updateID++, this.emit("update", this);
3708
+ }
3709
+ unload() {
3710
+ this.emit("unload", this);
3711
+ for (let e in this._gpuData) this._gpuData[e]?.destroy();
3712
+ this._gpuData = /* @__PURE__ */ Object.create(null), this.destroyed || (this._resourceId = w("resource"), this.emit("change", this));
3713
+ }
3714
+ destroy() {
3715
+ this.destroyed = !0, this.unload(), this.emit("destroy", this), this.emit("change", this), this._data = null, this.descriptor = null, this.removeAllListeners();
3716
+ }
3717
+ };
3718
+ //#endregion
3719
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/utils/ensureIsBuffer.mjs
3720
+ function Mn(e, t) {
3721
+ if (!(e instanceof jn)) {
3722
+ let n = t ? $.INDEX : $.VERTEX;
3723
+ e instanceof Array && (t ? (e = new Uint32Array(e), n = $.INDEX | $.COPY_DST) : (e = new Float32Array(e), n = $.VERTEX | $.COPY_DST)), e = new jn({
3724
+ data: e,
3725
+ label: t ? "index-mesh-buffer" : "vertex-mesh-buffer",
3726
+ usage: n
3727
+ });
3728
+ }
3729
+ return e;
3730
+ }
3731
+ //#endregion
3732
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/utils/getGeometryBounds.mjs
3733
+ function Nn(e, t, n) {
3734
+ let r = e.getAttribute(t);
3735
+ if (!r) return n.minX = 0, n.minY = 0, n.maxX = 0, n.maxY = 0, n;
3736
+ let i = r.buffer.data, a = Infinity, o = Infinity, s = -Infinity, c = -Infinity, l = i.BYTES_PER_ELEMENT, u = (r.offset || 0) / l, d = (r.stride || 8) / l;
3737
+ for (let e = u; e < i.length; e += d) {
3738
+ let t = i[e], n = i[e + 1];
3739
+ t > s && (s = t), n > c && (c = n), t < a && (a = t), n < o && (o = n);
3740
+ }
3741
+ return n.minX = a, n.minY = o, n.maxX = s, n.maxY = c, n;
3742
+ }
3743
+ //#endregion
3744
+ //#region node_modules/.pnpm/pixi.js@8.20.1/node_modules/pixi.js/lib/rendering/renderers/shared/geometry/Geometry.mjs
3745
+ function Pn(e) {
3746
+ return (e instanceof jn || Array.isArray(e) || e.BYTES_PER_ELEMENT) && (e = { buffer: e }), e.buffer = Mn(e.buffer, !1), e;
3747
+ }
3748
+ var Fn = class extends s {
3749
+ constructor(e = {}) {
3750
+ super(), this._gpuData = /* @__PURE__ */ Object.create(null), this.autoGarbageCollect = !0, this._gcLastUsed = -1, this.uid = w("geometry"), this._layoutKey = 0, this.instanceCount = 1, this._bounds = new A(), this._boundsDirty = !0, this._vertexCount = 0, this._vertexCountDirty = !0;
3751
+ let { attributes: t, indexBuffer: n, topology: r } = e;
3752
+ if (this.buffers = [], this.attributes = {}, t) for (let e in t) this.addAttribute(e, t[e]);
3753
+ this.instanceCount = e.instanceCount ?? 1, n && this.addIndex(n), this.topology = r || "triangle-list";
3754
+ }
3755
+ onBufferUpdate() {
3756
+ this._boundsDirty = !0, this._vertexCountDirty = !0, this.emit("update", this);
3757
+ }
3758
+ getAttribute(e) {
3759
+ return this.attributes[e];
3760
+ }
3761
+ getIndex() {
3762
+ return this.indexBuffer;
3763
+ }
3764
+ getBuffer(e) {
3765
+ return this.getAttribute(e).buffer;
3766
+ }
3767
+ get vertexCount() {
3768
+ if (!this._vertexCountDirty) return this._vertexCount;
3769
+ this._vertexCountDirty = !1;
3770
+ let e = this.attributes;
3771
+ for (let t in e) {
3772
+ let n = e[t];
3773
+ if (n.instance) continue;
3774
+ let r = n.buffer;
3775
+ return this._vertexCount = r.data.length / (n.stride / 4 || n.size), this._vertexCount;
3776
+ }
3777
+ return this._vertexCount = 0, 0;
3778
+ }
3779
+ getSize() {
3780
+ return D("8.20.0", "Geometry.getSize is deprecated, please use Geometry.vertexCount instead."), this.vertexCount;
3781
+ }
3782
+ addAttribute(e, t) {
3783
+ let n = Pn(t);
3784
+ this.buffers.indexOf(n.buffer) === -1 && (this.buffers.push(n.buffer), n.buffer.on("update", this.onBufferUpdate, this), n.buffer.on("change", this.onBufferUpdate, this)), this.attributes[e] = n, this._vertexCountDirty = !0;
3785
+ }
3786
+ addIndex(e) {
3787
+ this.indexBuffer = Mn(e, !0), this.buffers.push(this.indexBuffer);
3788
+ }
3789
+ get bounds() {
3790
+ return this._boundsDirty ? (this._boundsDirty = !1, Nn(this, "aPosition", this._bounds)) : this._bounds;
3791
+ }
3792
+ unload() {
3793
+ this.emit("unload", this);
3794
+ for (let e in this._gpuData) this._gpuData[e]?.destroy();
3795
+ this._gpuData = /* @__PURE__ */ Object.create(null);
3796
+ }
3797
+ destroy(e = !1) {
3798
+ this.emit("destroy", this), this.removeAllListeners(), e && this.buffers.forEach((e) => e.destroy()), this.unload(), this.attributes = null, this.buffers = null, this.indexBuffer = null, this._bounds = null;
3799
+ }
3800
+ };
3801
+ //#endregion
3802
+ export { C as $, lt as A, A as B, kt as C, pt as D, St as E, Ze as F, pe as G, _e as H, z as I, D as J, le as K, Je as L, V as M, B as N, H as O, et as P, ne as Q, R, At as S, wt as T, he as U, k as V, O as W, ae as X, T as Y, w as Z, Lt as _, bn as a, Nt as b, _n as c, gn as d, p as et, dn as f, K as g, Vt as h, An as i, a as it, ot as j, dt as k, Q as l, Qt as m, jn as n, s as nt, On as o, en as p, se as q, $ as r, n as rt, vn as s, Fn as t, d as tt, Z as u, G as v, Tt as w, jt as x, Pt as y, We as z };