canvasengine 2.0.0-rc.1 → 2.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3356,15 +3356,22 @@ function V(e, t) {
3356
3356
  },
3357
3357
  allElements: new ct(),
3358
3358
  isFrozen: !1
3359
- }), p = (t, r, i) => {
3360
- if (n.has(t)) return;
3361
- let a = Fa(e, t);
3362
- u(a), n.set(t, a), s(e, a, f(r, i)), c(a);
3359
+ }), p = (t, r, i, a = !1) => {
3360
+ let o = n.get(t);
3361
+ if (o) {
3362
+ if (a) {
3363
+ let e = f(r, i), t = o.parent?.componentInstance, n = o.componentInstance;
3364
+ e !== void 0 && t && typeof t.addChildAt == "function" && t.children?.includes(n) && t.addChildAt(n, e);
3365
+ }
3366
+ return;
3367
+ }
3368
+ let l = Fa(e, t);
3369
+ u(l), n.set(t, l), s(e, l, f(r, i)), c(l);
3363
3370
  }, m = (e) => {
3364
3371
  n.forEach((t, r) => {
3365
3372
  e.has(r) || (n.delete(r), t !== r && B(t));
3366
3373
  });
3367
- }, h = (e, t, r, i) => {
3374
+ }, h = (e, t, r, i, a = !1) => {
3368
3375
  if (e instanceof T) {
3369
3376
  if (t.add(e), !n.has(e)) {
3370
3377
  let t = d();
@@ -3373,22 +3380,22 @@ function V(e, t) {
3373
3380
  return;
3374
3381
  }
3375
3382
  if (Array.isArray(e)) {
3376
- e.forEach((e) => h(e, t, r, i));
3383
+ e.forEach((e) => h(e, t, r, i, a));
3377
3384
  return;
3378
3385
  }
3379
- L(e) && (t.add(e), p(e, r, i));
3386
+ L(e) && (t.add(e), p(e, r, i, a));
3380
3387
  }, g = t.subscribe((t) => {
3381
3388
  if (t && typeof t == "object" && "elements" in t) {
3382
- let { elements: n, prev: r } = t, i = n.filter((e) => e !== null), a = /* @__PURE__ */ new Set();
3389
+ let { elements: n, prev: r, reorder: i } = t, a = n.filter((e) => e !== null), o = /* @__PURE__ */ new Set();
3383
3390
  if (r) {
3384
- i.forEach((t) => {
3385
- h(t, a, e.props.children.indexOf(r.props.key) + 1, i);
3386
- }), m(a);
3391
+ a.forEach((t) => {
3392
+ h(t, o, e.props.children.indexOf(r.props.key) + 1, a);
3393
+ }), m(o);
3387
3394
  return;
3388
3395
  }
3389
- i.forEach((e, t) => {
3390
- h(e, a, t, i);
3391
- }), m(a);
3396
+ a.forEach((e, t) => {
3397
+ h(e, o, t, a, i);
3398
+ }), m(o);
3392
3399
  } else if (L(t)) {
3393
3400
  let n = Fa(e, t);
3394
3401
  u(n), o.mounted.set(t, n), s(e, n, f(0, [t])), c(n);
@@ -3412,9 +3419,9 @@ function V(e, t) {
3412
3419
  }
3413
3420
  return r;
3414
3421
  }
3415
- function Va(e, t) {
3422
+ function Va(e, t, n = {}) {
3416
3423
  return lr(e) && e.dependencies.size == 0 ? e = N(e()) : P(e) || (e = N(e)), cn(() => {
3417
- let n = [], r = /* @__PURE__ */ new Map(), i = !0, a = (e) => e ? L(e) ? e : {
3424
+ let r = [], i = /* @__PURE__ */ new Map(), a = !0, o = (e, t) => n.track ? n.track(e, t) : t, s = (e) => e ? L(e) ? e : {
3418
3425
  tag: "fragment",
3419
3426
  props: { children: Array.isArray(e) ? e : [e] },
3420
3427
  componentInstance: {},
@@ -3430,88 +3437,112 @@ function Va(e, t) {
3430
3437
  },
3431
3438
  allElements: new ct(),
3432
3439
  isFrozen: !1
3433
- } : null, o = (e) => Array.isArray(e());
3434
- return new T((s) => {
3435
- let c = o(e) ? e.observable.subscribe((o) => {
3440
+ } : null, c = (e) => Array.isArray(e()), l = (e) => {
3441
+ e && (e.propSubscriptions?.forEach((e) => e.unsubscribe()), e.effectSubscriptions?.forEach((e) => e.unsubscribe()), e.effectUnmounts?.forEach((e) => e?.()));
3442
+ }, u = (e, t) => {
3443
+ let n = { ...t.props }, r = t.propObservables;
3444
+ e.props.context && (n.context = e.props.context), e.props.children && !t.props.children && (n.children = e.props.children), e.props = n, e.propObservables = r, e.componentInstance.onUpdate?.(n), Object.entries(e.directives).forEach(([t, r]) => {
3445
+ t in n && r.onUpdate?.(n[t], e);
3446
+ }), l(t);
3447
+ }, d = (e) => {
3448
+ for (let [t, n] of i.entries()) if (n === e) {
3449
+ i.delete(t);
3450
+ return;
3451
+ }
3452
+ }, f = (e) => {
3453
+ if (!n.track) {
3454
+ r.forEach((e) => B(e)), r = [], i.clear(), e && e.forEach((e, n) => {
3455
+ let a = s(t(e, n));
3456
+ a && (r.push(a), i.set(n, a));
3457
+ });
3458
+ return;
3459
+ }
3460
+ let a = i, c = [], l = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set();
3461
+ e && e.forEach((e, n) => {
3462
+ let r = o(e, n), i = a.get(r), f = s(t(e, n));
3436
3463
  if (i) {
3437
- i = !1, n.forEach((e) => e.destroy()), n = [], r.clear();
3438
- let o = e();
3439
- o && o.forEach((e, i) => {
3440
- let o = a(t(e, i));
3441
- o && (n.push(o), r.set(i, o));
3442
- }), s.next({ elements: [...n] });
3464
+ f && u(i, f), c.push(i), l.set(r, i), d.add(i);
3443
3465
  return;
3444
3466
  }
3445
- let c = Array.isArray(o) || o && typeof o == "object" && !("type" in o);
3446
- if (o.type === "init" || o.type === "reset" || c) {
3447
- n.forEach((e) => B(e)), n = [], r.clear();
3448
- let i = e();
3449
- i && i.forEach((e, i) => {
3450
- let o = a(t(e, i));
3451
- o && (n.push(o), r.set(i, o));
3467
+ f && (c.push(f), l.set(r, f), d.add(f));
3468
+ }), r.forEach((e) => {
3469
+ d.has(e) || B(e);
3470
+ }), r = c, i = l;
3471
+ };
3472
+ return new T((l) => {
3473
+ let p = c(e) ? e.observable.subscribe((c) => {
3474
+ if (a) {
3475
+ a = !1, f(e()), l.next({
3476
+ elements: [...r],
3477
+ reorder: !!n.track
3452
3478
  });
3453
- } else if (o.type === "add" && o.index !== void 0) {
3454
- let e = o.items.map((e, n) => {
3455
- let i = a(t(e, o.index + n));
3456
- return i && r.set(o.index + n, i), i;
3479
+ return;
3480
+ }
3481
+ let p = Array.isArray(c) || c && typeof c == "object" && !("type" in c);
3482
+ if (c.type === "init" || c.type === "reset" || p) f(e());
3483
+ else if (c.type === "add" && c.index !== void 0) {
3484
+ let e = c.items.map((e, n) => {
3485
+ let r = c.index + n, a = s(t(e, r));
3486
+ return a && i.set(o(e, r), a), a;
3457
3487
  }).filter((e) => e !== null);
3458
- n.splice(o.index, 0, ...e);
3459
- } else if (o.type === "remove" && o.index !== void 0) n.splice(o.index, 1).forEach((e) => {
3460
- B(e), r.delete(o.index);
3488
+ r.splice(c.index, 0, ...e);
3489
+ } else if (c.type === "remove" && c.index !== void 0) r.splice(c.index, 1).forEach((e) => {
3490
+ B(e), d(e);
3461
3491
  });
3462
- else if (o.type === "update" && o.index !== void 0 && o.items.length === 1) {
3463
- let e = o.index, i = o.items[0];
3464
- if (e >= n.length || n[e] === void 0 || !r.has(e)) {
3465
- let o = a(t(i, e));
3466
- o ? (n.splice(e, 0, o), r.set(e, o)) : console.warn(`Element creation returned null for index ${e} during add-like update.`);
3492
+ else if (c.type === "update" && c.index !== void 0 && c.items.length === 1) {
3493
+ let e = c.index, a = c.items[0], l = o(a, e);
3494
+ if (e >= r.length || r[e] === void 0 || !i.has(l)) {
3495
+ let n = s(t(a, e));
3496
+ n ? (r.splice(e, 0, n), i.set(l, n)) : console.warn(`Element creation returned null for index ${e} during add-like update.`);
3467
3497
  } else {
3468
- let o = n[e];
3469
- B(o);
3470
- let s = a(t(i, e));
3471
- s ? (n[e] = s, r.set(e, s)) : (n.splice(e, 1), r.delete(e));
3498
+ let o = i.get(l) ?? r[e], c = s(t(a, e));
3499
+ n.track && o && c ? (u(o, c), r[e] = o, i.set(l, o)) : c ? (B(o), r[e] = c, i.set(l, c)) : (B(o), r.splice(e, 1), i.delete(l));
3472
3500
  }
3473
3501
  }
3474
- s.next({ elements: [...n] });
3475
- }) : e.observable.subscribe((o) => {
3476
- let c = o.key;
3477
- if (i) {
3478
- i = !1, n.forEach((e) => B(e)), n = [], r.clear();
3479
- let o = e();
3480
- o && Object.entries(o).forEach(([e, i]) => {
3481
- let o = a(t(i, e));
3482
- o && (n.push(o), r.set(e, o));
3483
- }), s.next({ elements: [...n] });
3502
+ l.next({
3503
+ elements: [...r],
3504
+ reorder: !!n.track
3505
+ });
3506
+ }) : e.observable.subscribe((n) => {
3507
+ let o = n.key;
3508
+ if (a) {
3509
+ a = !1, r.forEach((e) => B(e)), r = [], i.clear();
3510
+ let n = e();
3511
+ n && Object.entries(n).forEach(([e, n]) => {
3512
+ let a = s(t(n, e));
3513
+ a && (r.push(a), i.set(e, a));
3514
+ }), l.next({ elements: [...r] });
3484
3515
  return;
3485
3516
  }
3486
- if (o.type === "init" || o.type === "reset") {
3487
- n.forEach((e) => B(e)), n = [], r.clear();
3488
- let i = e();
3489
- i && Object.entries(i).forEach(([e, i]) => {
3490
- let o = a(t(i, e));
3491
- o && (n.push(o), r.set(e, o));
3517
+ if (n.type === "init" || n.type === "reset") {
3518
+ r.forEach((e) => B(e)), r = [], i.clear();
3519
+ let n = e();
3520
+ n && Object.entries(n).forEach(([e, n]) => {
3521
+ let a = s(t(n, e));
3522
+ a && (r.push(a), i.set(e, a));
3492
3523
  });
3493
- } else if (o.type === "add" && o.key && o.value !== void 0) {
3494
- let e = a(t(o.value, c));
3495
- e && (n.push(e), r.set(c, e));
3496
- } else if (o.type === "remove" && o.key) {
3497
- let e = n.findIndex((e) => r.get(c) === e);
3524
+ } else if (n.type === "add" && n.key && n.value !== void 0) {
3525
+ let e = s(t(n.value, o));
3526
+ e && (r.push(e), i.set(o, e));
3527
+ } else if (n.type === "remove" && n.key) {
3528
+ let e = r.findIndex((e) => i.get(o) === e);
3498
3529
  if (e !== -1) {
3499
- let [t] = n.splice(e, 1);
3500
- B(t), r.delete(c);
3530
+ let [t] = r.splice(e, 1);
3531
+ B(t), i.delete(o);
3501
3532
  }
3502
- } else if (o.type === "update" && o.key && o.value !== void 0) {
3503
- let e = n.findIndex((e) => r.get(c) === e);
3533
+ } else if (n.type === "update" && n.key && n.value !== void 0) {
3534
+ let e = r.findIndex((e) => i.get(o) === e);
3504
3535
  if (e !== -1) {
3505
- let i = n[e];
3506
- B(i);
3507
- let s = a(t(o.value, c));
3508
- s && (n[e] = s, r.set(c, s));
3536
+ let a = r[e];
3537
+ B(a);
3538
+ let c = s(t(n.value, o));
3539
+ c && (r[e] = c, i.set(o, c));
3509
3540
  }
3510
3541
  }
3511
- s.next({ elements: [...n] });
3542
+ l.next({ elements: [...r] });
3512
3543
  });
3513
3544
  return () => {
3514
- c.unsubscribe(), n.forEach((e) => B(e));
3545
+ p.unsubscribe(), r.forEach((e) => B(e));
3515
3546
  };
3516
3547
  });
3517
3548
  }).pipe(pn({
@@ -3698,32 +3729,36 @@ var H = (e, t = {}) => {
3698
3729
  }
3699
3730
  for (let e in t) e in n || (n[e] = ka(t[e]) ? N(t[e]) : t[e]);
3700
3731
  return n;
3701
- }, Ga = (e) => (t) => {
3732
+ }, Ga = (e) => P(e) ? e : N(e), Ka = (e) => {
3733
+ let t = {};
3734
+ for (let n in e) t[n] = Ga(e[n]);
3735
+ return t;
3736
+ }, qa = (e) => (t) => {
3702
3737
  let n = P(e) ? e() : e, r = {};
3703
3738
  for (let e in t) {
3704
3739
  let i = t[e], a = n[e], o;
3705
- if (typeof i == "function") Ka(e, a, [i]), o = a;
3706
- else if (Array.isArray(i)) Ka(e, a, i), o = a;
3740
+ if (typeof i == "function") Ja(e, a, [i]), o = a;
3741
+ else if (Array.isArray(i)) Ja(e, a, i), o = a;
3707
3742
  else if (i && typeof i == "object") {
3708
3743
  if (i.required && a === void 0) throw Error(`Missing required prop: ${e}`);
3709
- if (i.type && Ka(e, a, Array.isArray(i.type) ? i.type : [i.type]), i.validator && !i.validator(a, n)) throw Error(`Invalid prop: custom validation failed for prop "${e}"`);
3744
+ if (i.type && Ja(e, a, Array.isArray(i.type) ? i.type : [i.type]), i.validator && !i.validator(a, n)) throw Error(`Invalid prop: custom validation failed for prop "${e}"`);
3710
3745
  o = a === void 0 && "default" in i ? typeof i.default == "function" ? i.default(n) : i.default : a;
3711
3746
  }
3712
- r[e] = P(o) ? o : N(o);
3747
+ r[e] = Ga(o);
3713
3748
  }
3714
3749
  return {
3715
- ...H(n),
3750
+ ...Ka(n),
3716
3751
  ...r
3717
3752
  };
3718
3753
  };
3719
- function Ka(e, t, n) {
3754
+ function Ja(e, t, n) {
3720
3755
  if (t == null) return;
3721
3756
  let r = P(t) ? t() : t;
3722
3757
  if (!n.some((e) => e === Number ? typeof r == "number" : e === String ? typeof r == "string" : e === Boolean ? typeof r == "boolean" : e === Function ? typeof r == "function" : e === Object ? typeof r == "object" : e === Array ? Array.isArray(r) : e === null ? r === null : r instanceof e)) throw Error(`Invalid prop: type check failed for prop "${e}". Expected ${n.map((e) => e.name).join(" or ")}`);
3723
3758
  }
3724
3759
  //#endregion
3725
3760
  //#region src/directives/ViewportFollow.ts
3726
- var qa = class extends k {
3761
+ var Ya = class extends k {
3727
3762
  onInit(e) {}
3728
3763
  onMount(e) {
3729
3764
  this.onUpdate(e.props.viewportFollow, e);
@@ -3754,10 +3789,10 @@ var qa = class extends k {
3754
3789
  t && n && n.plugins.remove("follow");
3755
3790
  }
3756
3791
  };
3757
- A("viewportFollow", qa);
3792
+ A("viewportFollow", Ya);
3758
3793
  //#endregion
3759
3794
  //#region src/directives/Sound.ts
3760
- var Ja = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
3795
+ var Xa = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
3761
3796
  (function() {
3762
3797
  var t = function() {
3763
3798
  this.init();
@@ -4612,7 +4647,7 @@ var Ja = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
4612
4647
  t ||= "spatial", t === "spatial" ? (e._panner = Howler.ctx.createPanner(), e._panner.coneInnerAngle = e._pannerAttr.coneInnerAngle, e._panner.coneOuterAngle = e._pannerAttr.coneOuterAngle, e._panner.coneOuterGain = e._pannerAttr.coneOuterGain, e._panner.distanceModel = e._pannerAttr.distanceModel, e._panner.maxDistance = e._pannerAttr.maxDistance, e._panner.refDistance = e._pannerAttr.refDistance, e._panner.rolloffFactor = e._pannerAttr.rolloffFactor, e._panner.panningModel = e._pannerAttr.panningModel, e._panner.positionX === void 0 ? e._panner.setPosition(e._pos[0], e._pos[1], e._pos[2]) : (e._panner.positionX.setValueAtTime(e._pos[0], Howler.ctx.currentTime), e._panner.positionY.setValueAtTime(e._pos[1], Howler.ctx.currentTime), e._panner.positionZ.setValueAtTime(e._pos[2], Howler.ctx.currentTime)), e._panner.orientationX === void 0 ? e._panner.setOrientation(e._orientation[0], e._orientation[1], e._orientation[2]) : (e._panner.orientationX.setValueAtTime(e._orientation[0], Howler.ctx.currentTime), e._panner.orientationY.setValueAtTime(e._orientation[1], Howler.ctx.currentTime), e._panner.orientationZ.setValueAtTime(e._orientation[2], Howler.ctx.currentTime))) : (e._panner = Howler.ctx.createStereoPanner(), e._panner.pan.setValueAtTime(e._stereo, Howler.ctx.currentTime)), e._panner.connect(e._node), e._paused || e._parent.pause(e._id, !0).play(e._id, !0);
4613
4648
  };
4614
4649
  })();
4615
- })))(), 1), Ya = [
4650
+ })))(), 1), Za = [
4616
4651
  "load",
4617
4652
  "loaderror",
4618
4653
  "playerror",
@@ -4626,7 +4661,7 @@ var Ja = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
4626
4661
  "seek",
4627
4662
  "fade",
4628
4663
  "unlock"
4629
- ], Xa = class extends k {
4664
+ ], Qa = class extends k {
4630
4665
  constructor(...e) {
4631
4666
  super(...e), this.sounds = [], this.eventsFn = [], this.maxVolume = 1, this.maxDistance = 100;
4632
4667
  }
@@ -4637,13 +4672,13 @@ var Ja = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
4637
4672
  let { src: i, autoplay: a, loop: o, volume: s, spatial: c } = r, l = Array.isArray(i) ? i : [i];
4638
4673
  for (let e of l) {
4639
4674
  if (!e) continue;
4640
- let t = new Ja.Howl({
4675
+ let t = new Xa.Howl({
4641
4676
  src: e,
4642
4677
  autoplay: a,
4643
4678
  loop: o,
4644
4679
  volume: s
4645
4680
  });
4646
- for (let e of Ya) {
4681
+ for (let e of Za) {
4647
4682
  if (!r[e]) continue;
4648
4683
  let n = r[e];
4649
4684
  this.eventsFn.push(n), t.on(e, n);
@@ -4671,13 +4706,13 @@ var Ja = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
4671
4706
  onDestroy() {
4672
4707
  this.sounds.forEach((e) => {
4673
4708
  e.stop();
4674
- for (let t of Ya) {
4709
+ for (let t of Za) {
4675
4710
  let n = this.eventsFn.find((e) => e === this.eventsFn[t]);
4676
4711
  n && e.off(t, n);
4677
4712
  }
4678
4713
  }), this.sounds = [], this.eventsFn = [], this.tickSubscription?.unsubscribe();
4679
4714
  }
4680
- }, Za = class extends k {
4715
+ }, $a = class extends k {
4681
4716
  onMount(e) {
4682
4717
  e.props.context.soundListenerPosition = e.propObservables?.soundListenerPosition;
4683
4718
  }
@@ -4685,15 +4720,15 @@ var Ja = /* @__PURE__ */ pe((/* @__PURE__ */ ue(((e) => {
4685
4720
  onUpdate(e) {}
4686
4721
  onDestroy() {}
4687
4722
  };
4688
- A("sound", Xa), A("soundListenerPosition", Za);
4723
+ A("sound", Qa), A("soundListenerPosition", $a);
4689
4724
  //#endregion
4690
4725
  //#region src/hooks/addContext.ts
4691
- var Qa = (e, t, n) => {
4726
+ var eo = (e, t, n) => {
4692
4727
  e.props.context = {
4693
4728
  ...e.props.context ?? {},
4694
4729
  [t]: n
4695
4730
  };
4696
- }, $a = class extends k {
4731
+ }, to = class extends k {
4697
4732
  constructor(...e) {
4698
4733
  super(...e), this.elementRef = null;
4699
4734
  }
@@ -4701,13 +4736,13 @@ var Qa = (e, t, n) => {
4701
4736
  this.elementRef = e;
4702
4737
  }
4703
4738
  onMount(e) {
4704
- Qa(e, "drop", e);
4739
+ eo(e, "drop", e);
4705
4740
  }
4706
4741
  onUpdate() {}
4707
4742
  onDestroy() {
4708
4743
  this.elementRef = null;
4709
4744
  }
4710
- }, eo = class extends k {
4745
+ }, no = class extends k {
4711
4746
  constructor(...e) {
4712
4747
  super(...e), this.elementRef = null, this.stageRef = null, this.offsetInParent = new y(), this.isDragging = !1, this.viewport = null, this.animationFrameId = null, this.lastPointerPosition = new y(), this.pressedKeys = /* @__PURE__ */ new Set(), this.pointerIsDown = !1, this.onDragMoveHandler = () => {}, this.onDragEndHandler = () => {}, this.onDragStartHandler = () => {}, this.onKeyDownHandler = () => {}, this.onKeyUpHandler = () => {}, this.subscriptions = [];
4713
4748
  }
@@ -4802,10 +4837,10 @@ var Qa = (e, t, n) => {
4802
4837
  e && e.off("pointerdown", this.onDragStartHandler), this.stageRef && (this.stageRef.off("pointermove", this.onDragMoveHandler), this.stageRef.off("pointerup", this.onDragEndHandler), this.stageRef.off("pointerupoutside", this.onDragEndHandler)), window.removeEventListener("keydown", this.onKeyDownHandler), window.removeEventListener("keyup", this.onKeyUpHandler), this.stageRef = null, this.viewport = null, this.pressedKeys.clear(), this.pointerIsDown = !1;
4803
4838
  }
4804
4839
  };
4805
- A("drag", eo), A("drop", $a);
4840
+ A("drag", no), A("drop", to);
4806
4841
  //#endregion
4807
4842
  //#region src/directives/Transition.ts
4808
- var to = class extends k {
4843
+ var ro = class extends k {
4809
4844
  onInit(e) {}
4810
4845
  onMount(e) {
4811
4846
  let { image: t } = e.props.transition, n = new x(C.from(t));
@@ -4825,13 +4860,13 @@ var to = class extends k {
4825
4860
  onUpdate(e) {}
4826
4861
  onDestroy() {}
4827
4862
  };
4828
- A("transition", to);
4863
+ A("transition", ro);
4829
4864
  //#endregion
4830
4865
  //#region src/engine/trigger.ts
4831
- function no(e) {
4866
+ function io(e) {
4832
4867
  return e?.start && e?.listen;
4833
4868
  }
4834
- function ro(e) {
4869
+ function ao(e) {
4835
4870
  let t = N({
4836
4871
  config: e,
4837
4872
  value: 0,
@@ -4855,8 +4890,8 @@ function ro(e) {
4855
4890
  })
4856
4891
  };
4857
4892
  }
4858
- function io(e, t) {
4859
- if (!no(e)) throw Error("In 'on(arg)' must have a trigger signal type");
4893
+ function oo(e, t) {
4894
+ if (!io(e)) throw Error("In 'on(arg)' must have a trigger signal type");
4860
4895
  let n;
4861
4896
  return I(() => {
4862
4897
  let r = e.listen(), i = r?.seed;
@@ -4879,7 +4914,7 @@ function io(e, t) {
4879
4914
  }
4880
4915
  //#endregion
4881
4916
  //#region src/directives/Shake.ts
4882
- var ao = class extends k {
4917
+ var so = class extends k {
4883
4918
  constructor(...e) {
4884
4919
  super(...e), this.elementRef = null, this.originalPosition = new y(), this.progressSignal = null, this.shakeSubscription = null, this.positionEffect = null, this.currentShakeConfig = null;
4885
4920
  }
@@ -4890,7 +4925,7 @@ var ao = class extends k {
4890
4925
  let t = e.componentInstance;
4891
4926
  if (!t) return;
4892
4927
  let n = this.shakeProps;
4893
- !n.trigger || !no(n.trigger) || (this.originalPosition.set(t.position.x, t.position.y), this.shakeSubscription &&= (this.shakeSubscription.unsubscribe(), null), this.shakeSubscription = io(n.trigger, async (e) => {
4928
+ !n.trigger || !io(n.trigger) || (this.originalPosition.set(t.position.x, t.position.y), this.shakeSubscription &&= (this.shakeSubscription.unsubscribe(), null), this.shakeSubscription = oo(n.trigger, async (e) => {
4894
4929
  await this.performShake(e);
4895
4930
  }));
4896
4931
  }
@@ -4938,10 +4973,10 @@ var ao = class extends k {
4938
4973
  this.shakeSubscription &&= (this.shakeSubscription.unsubscribe(), null), this.elementRef = null;
4939
4974
  }
4940
4975
  };
4941
- A("shake", ao);
4976
+ A("shake", so);
4942
4977
  //#endregion
4943
4978
  //#region src/directives/Flash.ts
4944
- var oo = class extends k {
4979
+ var co = class extends k {
4945
4980
  constructor(...e) {
4946
4981
  super(...e), this.elementRef = null, this.progressSignal = null, this.flashSubscription = null, this.alphaEffect = null, this.tintEffect = null, this.originalAlpha = 1, this.originalTint = 16777215, this.currentFlashConfig = null;
4947
4982
  }
@@ -4952,10 +4987,10 @@ var oo = class extends k {
4952
4987
  let t = e.componentInstance;
4953
4988
  if (!t) return;
4954
4989
  let n = this.flashProps;
4955
- if (!n.trigger || !no(n.trigger)) return;
4990
+ if (!n.trigger || !io(n.trigger)) return;
4956
4991
  this.originalAlpha === 1 && !n.originalAlpha ? this.originalAlpha = t.alpha ?? 1 : n.originalAlpha !== void 0 && (this.originalAlpha = n.originalAlpha);
4957
4992
  let r = t.tint;
4958
- this.originalTint === 16777215 && !n.originalTint ? this.originalTint = (P(r) ? r() : r) ?? 16777215 : n.originalTint !== void 0 && (this.originalTint = n.originalTint), this.flashSubscription = io(n.trigger, async (e) => {
4993
+ this.originalTint === 16777215 && !n.originalTint ? this.originalTint = (P(r) ? r() : r) ?? 16777215 : n.originalTint !== void 0 && (this.originalTint = n.originalTint), this.flashSubscription = oo(n.trigger, async (e) => {
4959
4994
  await this.performFlash(e);
4960
4995
  });
4961
4996
  }
@@ -5026,10 +5061,10 @@ var oo = class extends k {
5026
5061
  this.flashSubscription &&= null, this.elementRef = null;
5027
5062
  }
5028
5063
  };
5029
- A("flash", oo);
5064
+ A("flash", co);
5030
5065
  //#endregion
5031
5066
  //#region src/directives/FogVisibility.ts
5032
- var so = (e, t, n) => Math.max(t, Math.min(n, e)), co = class extends k {
5067
+ var lo = (e, t, n) => Math.max(t, Math.min(n, e)), uo = class extends k {
5033
5068
  constructor(...e) {
5034
5069
  super(...e), this.elementRef = null, this.tickSubscription = null, this.sampleAccumulatorMs = 0, this.managesAlpha = !1;
5035
5070
  }
@@ -5058,7 +5093,7 @@ var so = (e, t, n) => Math.max(t, Math.min(n, e)), co = class extends k {
5058
5093
  return e == null ? t : P(e) ? e() ?? t : e;
5059
5094
  }
5060
5095
  readOptions() {
5061
- let e = this.elementRef?.props?.fogVisibility, t = e?.value ?? e ?? {}, n = this.resolveSignalValue(t.controller, null), r = this.resolveSignalValue(t.mode, "visible"), i = so(Number(this.resolveSignalValue(t.threshold, .65)), 0, 1), a = this.resolveSignalValue(t.hideAs, "visible"), o = so(Number(this.resolveSignalValue(t.hiddenAlpha, 0)), 0, 1), s = so(Number(this.resolveSignalValue(t.sampleHz, 30)), 1, 240), c = t.point ? this.resolveSignalValue(t.point, void 0) : void 0;
5096
+ let e = this.elementRef?.props?.fogVisibility, t = e?.value ?? e ?? {}, n = this.resolveSignalValue(t.controller, null), r = this.resolveSignalValue(t.mode, "visible"), i = lo(Number(this.resolveSignalValue(t.threshold, .65)), 0, 1), a = this.resolveSignalValue(t.hideAs, "visible"), o = lo(Number(this.resolveSignalValue(t.hiddenAlpha, 0)), 0, 1), s = lo(Number(this.resolveSignalValue(t.sampleHz, 30)), 1, 240), c = t.point ? this.resolveSignalValue(t.point, void 0) : void 0;
5062
5097
  return {
5063
5098
  controller: n && typeof n == "object" ? n : null,
5064
5099
  mode: r,
@@ -5075,7 +5110,7 @@ var so = (e, t, n) => Math.max(t, Math.min(n, e)), co = class extends k {
5075
5110
  }
5076
5111
  readBaseAlpha() {
5077
5112
  let e = this.elementRef?.propObservables?.alpha ?? this.elementRef?.props?.alpha, t = Number(this.resolveSignalValue(e, 1));
5078
- return Number.isFinite(t) ? so(t, 0, 1) : 1;
5113
+ return Number.isFinite(t) ? lo(t, 0, 1) : 1;
5079
5114
  }
5080
5115
  samplePoint(e) {
5081
5116
  if (e.point && typeof e.point == "object") {
@@ -5119,15 +5154,15 @@ var so = (e, t, n) => Math.max(t, Math.min(n, e)), co = class extends k {
5119
5154
  t.visible = r && s, this.managesAlpha &&= (t.alpha = i, !1);
5120
5155
  }
5121
5156
  };
5122
- A("fogVisibility", co);
5157
+ A("fogVisibility", uo);
5123
5158
  //#endregion
5124
5159
  //#region ../../node_modules/.pnpm/pixi-filters@6.1.5_pixi.js@8.9.2/node_modules/pixi-filters/lib/defaults/default2.mjs
5125
- var lo = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n \n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n", uo = "struct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n };\n\nfn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\nfn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \n}\n\nfn getSize() -> vec2<f32>\n{\n return gfu.uGlobalFrame.zw;\n}\n \n@vertex\nfn mainVertex(\n @location(0) aPosition : vec2<f32>, \n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition)\n );\n}", fo = "precision highp float;\nin vec2 vTextureCoord;\nout vec4 finalColor;\n\nuniform sampler2D uTexture;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\n\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = ${ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle);\n displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle);\n displacedColor = texture(uTexture, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture(uTexture, vTextureCoord);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n finalColor = contentColor + outlineColor;\n}\n", po = "struct OutlineUniforms {\n uThickness:vec2<f32>,\n uColor:vec3<f32>,\n uAlpha:f32,\n uAngleStep:f32,\n uKnockout:f32,\n};\n\nstruct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\n@group(0) @binding(1) var uTexture: texture_2d<f32>; \n@group(0) @binding(2) var uSampler: sampler;\n@group(1) @binding(0) var<uniform> outlineUniforms : OutlineUniforms;\n\n@fragment\nfn mainFragment(\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n) -> @location(0) vec4<f32> {\n let sourceColor: vec4<f32> = textureSample(uTexture, uSampler, uv);\n let contentColor: vec4<f32> = sourceColor * (1. - outlineUniforms.uKnockout);\n \n let outlineAlpha: f32 = outlineUniforms.uAlpha * outlineMaxAlphaAtPos(uv) * (1. - sourceColor.a);\n let outlineColor: vec4<f32> = vec4<f32>(vec3<f32>(outlineUniforms.uColor) * outlineAlpha, outlineAlpha);\n \n return contentColor + outlineColor;\n}\n\nfn outlineMaxAlphaAtPos(uv: vec2<f32>) -> f32 {\n let thickness = outlineUniforms.uThickness;\n\n if (thickness.x == 0. || thickness.y == 0.) {\n return 0.;\n }\n \n let angleStep = outlineUniforms.uAngleStep;\n\n var displacedColor: vec4<f32>;\n var displacedPos: vec2<f32>;\n\n var maxAlpha: f32 = 0.;\n var displaced: vec2<f32>;\n var curColor: vec4<f32>;\n\n for (var angle = 0.; angle <= DOUBLE_PI; angle += angleStep)\n {\n displaced.x = uv.x + thickness.x * cos(angle);\n displaced.y = uv.y + thickness.y * sin(angle);\n curColor = textureSample(uTexture, uSampler, clamp(displaced, gfu.uInputClamp.xy, gfu.uInputClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n\n return maxAlpha;\n}\n\nconst DOUBLE_PI: f32 = 3.14159265358979323846264 * 2.;", mo = Object.defineProperty, ho = (e, t, n) => t in e ? mo(e, t, {
5160
+ var fo = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize;\nuniform vec4 uOutputFrame;\nuniform vec4 uOutputTexture;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\n \n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n", po = "struct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\nstruct VSOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n };\n\nfn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>\n{\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\n\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\n position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\n\n return vec4(position, 0.0, 1.0);\n}\n\nfn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\n}\n\nfn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>\n{\n return (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw); \n}\n\nfn getSize() -> vec2<f32>\n{\n return gfu.uGlobalFrame.zw;\n}\n \n@vertex\nfn mainVertex(\n @location(0) aPosition : vec2<f32>, \n) -> VSOutput {\n return VSOutput(\n filterVertexPosition(aPosition),\n filterTextureCoord(aPosition)\n );\n}", mo = "precision highp float;\nin vec2 vTextureCoord;\nout vec4 finalColor;\n\nuniform sampler2D uTexture;\nuniform vec2 uThickness;\nuniform vec3 uColor;\nuniform float uAlpha;\nuniform float uKnockout;\n\nuniform vec4 uInputClamp;\n\nconst float DOUBLE_PI = 2. * 3.14159265358979323846264;\nconst float ANGLE_STEP = ${ANGLE_STEP};\n\nfloat outlineMaxAlphaAtPos(vec2 pos) {\n if (uThickness.x == 0. || uThickness.y == 0.) {\n return 0.;\n }\n\n vec4 displacedColor;\n vec2 displacedPos;\n float maxAlpha = 0.;\n\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {\n displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle);\n displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle);\n displacedColor = texture(uTexture, clamp(displacedPos, uInputClamp.xy, uInputClamp.zw));\n maxAlpha = max(maxAlpha, displacedColor.a);\n }\n\n return maxAlpha;\n}\n\nvoid main(void) {\n vec4 sourceColor = texture(uTexture, vTextureCoord);\n vec4 contentColor = sourceColor * float(uKnockout < 0.5);\n float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a);\n vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);\n finalColor = contentColor + outlineColor;\n}\n", ho = "struct OutlineUniforms {\n uThickness:vec2<f32>,\n uColor:vec3<f32>,\n uAlpha:f32,\n uAngleStep:f32,\n uKnockout:f32,\n};\n\nstruct GlobalFilterUniforms {\n uInputSize:vec4<f32>,\n uInputPixel:vec4<f32>,\n uInputClamp:vec4<f32>,\n uOutputFrame:vec4<f32>,\n uGlobalFrame:vec4<f32>,\n uOutputTexture:vec4<f32>,\n};\n\n@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;\n\n@group(0) @binding(1) var uTexture: texture_2d<f32>; \n@group(0) @binding(2) var uSampler: sampler;\n@group(1) @binding(0) var<uniform> outlineUniforms : OutlineUniforms;\n\n@fragment\nfn mainFragment(\n @builtin(position) position: vec4<f32>,\n @location(0) uv : vec2<f32>\n) -> @location(0) vec4<f32> {\n let sourceColor: vec4<f32> = textureSample(uTexture, uSampler, uv);\n let contentColor: vec4<f32> = sourceColor * (1. - outlineUniforms.uKnockout);\n \n let outlineAlpha: f32 = outlineUniforms.uAlpha * outlineMaxAlphaAtPos(uv) * (1. - sourceColor.a);\n let outlineColor: vec4<f32> = vec4<f32>(vec3<f32>(outlineUniforms.uColor) * outlineAlpha, outlineAlpha);\n \n return contentColor + outlineColor;\n}\n\nfn outlineMaxAlphaAtPos(uv: vec2<f32>) -> f32 {\n let thickness = outlineUniforms.uThickness;\n\n if (thickness.x == 0. || thickness.y == 0.) {\n return 0.;\n }\n \n let angleStep = outlineUniforms.uAngleStep;\n\n var displacedColor: vec4<f32>;\n var displacedPos: vec2<f32>;\n\n var maxAlpha: f32 = 0.;\n var displaced: vec2<f32>;\n var curColor: vec4<f32>;\n\n for (var angle = 0.; angle <= DOUBLE_PI; angle += angleStep)\n {\n displaced.x = uv.x + thickness.x * cos(angle);\n displaced.y = uv.y + thickness.y * sin(angle);\n curColor = textureSample(uTexture, uSampler, clamp(displaced, gfu.uInputClamp.xy, gfu.uInputClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n\n return maxAlpha;\n}\n\nconst DOUBLE_PI: f32 = 3.14159265358979323846264 * 2.;", go = Object.defineProperty, _o = (e, t, n) => t in e ? go(e, t, {
5126
5161
  enumerable: !0,
5127
5162
  configurable: !0,
5128
5163
  writable: !0,
5129
5164
  value: n
5130
- }) : e[t] = n, go = (e, t, n) => (ho(e, typeof t == "symbol" ? t : t + "", n), n), _o = class e extends l {
5165
+ }) : e[t] = n, vo = (e, t, n) => (_o(e, typeof t == "symbol" ? t : t + "", n), n), yo = class e extends l {
5131
5166
  constructor(...t) {
5132
5167
  let n = t[0] ?? {};
5133
5168
  typeof n == "number" && (re("6.0.0", "OutlineFilter constructor params are now options object. See params: { thickness, color, quality, alpha, knockout }"), n = { thickness: n }, t[1] !== void 0 && (n.color = t[1]), t[2] !== void 0 && (n.quality = t[2]), t[3] !== void 0 && (n.alpha = t[3]), t[4] !== void 0 && (n.knockout = t[4])), n = {
@@ -5136,16 +5171,16 @@ var lo = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize
5136
5171
  };
5137
5172
  let r = n.quality ?? .1, a = f.from({
5138
5173
  vertex: {
5139
- source: uo,
5174
+ source: po,
5140
5175
  entryPoint: "mainVertex"
5141
5176
  },
5142
5177
  fragment: {
5143
- source: po,
5178
+ source: ho,
5144
5179
  entryPoint: "mainFragment"
5145
5180
  }
5146
5181
  }), o = d.from({
5147
- vertex: lo,
5148
- fragment: fo.replace(/\$\{ANGLE_STEP\}/, e.getAngleStep(r).toFixed(7)),
5182
+ vertex: fo,
5183
+ fragment: mo.replace(/\$\{ANGLE_STEP\}/, e.getAngleStep(r).toFixed(7)),
5149
5184
  name: "outline-filter"
5150
5185
  });
5151
5186
  super({
@@ -5173,7 +5208,7 @@ var lo = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize
5173
5208
  type: "f32"
5174
5209
  }
5175
5210
  } }
5176
- }), go(this, "uniforms"), go(this, "_thickness"), go(this, "_quality"), go(this, "_color"), this.uniforms = this.resources.outlineUniforms.uniforms, this.uniforms.uAngleStep = e.getAngleStep(r), this._color = new i(), this.color = n.color ?? 0, Object.assign(this, n);
5211
+ }), vo(this, "uniforms"), vo(this, "_thickness"), vo(this, "_quality"), vo(this, "_color"), this.uniforms = this.resources.outlineUniforms.uniforms, this.uniforms.uAngleStep = e.getAngleStep(r), this._color = new i(), this.color = n.color ?? 0, Object.assign(this, n);
5177
5212
  }
5178
5213
  apply(e, t, n, r) {
5179
5214
  this.uniforms.uThickness[0] = this.thickness / t.source.width, this.uniforms.uThickness[1] = this.thickness / t.source.height, e.applyFilter(this, t, n, r);
@@ -5214,25 +5249,25 @@ var lo = "in vec2 aPosition;\nout vec2 vTextureCoord;\n\nuniform vec4 uInputSize
5214
5249
  this.uniforms.uKnockout = +!!e;
5215
5250
  }
5216
5251
  };
5217
- go(_o, "DEFAULT_OPTIONS", {
5252
+ vo(yo, "DEFAULT_OPTIONS", {
5218
5253
  thickness: 1,
5219
5254
  color: 0,
5220
5255
  alpha: 1,
5221
5256
  quality: .1,
5222
5257
  knockout: !1
5223
- }), go(_o, "MIN_SAMPLES", 1), go(_o, "MAX_SAMPLES", 100);
5224
- var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5258
+ }), vo(yo, "MIN_SAMPLES", 1), vo(yo, "MAX_SAMPLES", 100);
5259
+ var bo = yo, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, xo = (e) => {
5225
5260
  if (e !== void 0) return P(e) ? e() : e;
5226
- }, bo = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], xo = (e) => {
5261
+ }, So = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Co = (e) => {
5227
5262
  let t = e.filters;
5228
5263
  return t ? Array.isArray(t) ? [...t] : [t] : [];
5229
- }, So = (e, t) => {
5264
+ }, wo = (e, t) => {
5230
5265
  e.filters = t.length > 0 ? t : [];
5231
- }, Co = (e) => {
5232
- let t = yo(e);
5266
+ }, To = (e) => {
5267
+ let t = xo(e);
5233
5268
  return L(t) ? t.componentInstance ?? null : t instanceof a || t && typeof t == "object" && typeof t.getBounds == "function" ? t : null;
5234
- }, wo = (e) => new b(e?.x ?? 0, e?.y ?? 0, e?.width ?? 0, e?.height ?? 0), To = (e, t = "bounds") => {
5235
- let n = wo(typeof e.getBounds == "function" ? e.getBounds() : {
5269
+ }, Eo = (e) => new b(e?.x ?? 0, e?.y ?? 0, e?.width ?? 0, e?.height ?? 0), Do = (e, t = "bounds") => {
5270
+ let n = Eo(typeof e.getBounds == "function" ? e.getBounds() : {
5236
5271
  x: e.x ?? 0,
5237
5272
  y: e.y ?? 0,
5238
5273
  width: e.width ?? 0,
@@ -5241,21 +5276,21 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5241
5276
  if (t !== "hitbox" || !e.hitbox) return n;
5242
5277
  let r = e.hitbox;
5243
5278
  return new b(n.x + Math.max(0, (n.width - r.w) / 2), n.y + Math.max(0, n.height - r.h), r.w, r.h);
5244
- }, Eo = (e, t) => {
5279
+ }, Oo = (e, t) => {
5245
5280
  let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height), o = i - n, s = a - r;
5246
5281
  return o <= 0 || s <= 0 ? null : new b(n, r, o, s);
5247
- }, Do = (e, t) => {
5282
+ }, ko = (e, t) => {
5248
5283
  e.rect(t.x, t.y, t.width, t.height), e.fill(16777215);
5249
- }, Oo = (e, t) => {
5284
+ }, Ao = (e, t) => {
5250
5285
  t.parent !== e.parent && (t.parent && t.parent.removeChild(t), e.parent?.addChild(t));
5251
- }, ko = (e, t, n = !1) => {
5286
+ }, jo = (e, t, n = !1) => {
5252
5287
  e && (typeof e.setMask == "function" ? (t ?? (e.mask = null), e.setMask({
5253
5288
  mask: t ?? null,
5254
5289
  inverse: n
5255
5290
  })) : e.mask = t ?? null);
5256
- }, Ao = (e, t) => {
5257
- ko(e, t ?? null);
5258
- }, jo = (e, t) => {
5291
+ }, Mo = (e, t) => {
5292
+ jo(e, t ?? null);
5293
+ }, No = (e, t) => {
5259
5294
  let n = {
5260
5295
  x: t.x ?? t.position?.x ?? 0,
5261
5296
  y: t.y ?? t.position?.y ?? 0
@@ -5270,11 +5305,11 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5270
5305
  x: 0,
5271
5306
  y: 0
5272
5307
  }), e.rotation = t.rotation ?? 0;
5273
- }, Mo = (e, t, n) => {
5274
- jo(e, t);
5308
+ }, Po = (e, t, n) => {
5309
+ No(e, t);
5275
5310
  let r = t.texture?.orig?.width ?? t.texture?.width ?? t.width ?? n.width, i = t.texture?.orig?.height ?? t.texture?.height ?? t.height ?? n.height, a = t.width || r || 1, o = t.height || i || 1, s = t.anchor?.x ?? 0, c = t.anchor?.y ?? 0;
5276
- Do(e, new b(-s * r + n.x * r / a, -c * i + n.y * i / o, n.width * r / a, n.height * i / o));
5277
- }, No = class extends k {
5311
+ ko(e, new b(-s * r + n.x * r / a, -c * i + n.y * i / o, n.width * r / a, n.height * i / o));
5312
+ }, Fo = class extends k {
5278
5313
  constructor(...e) {
5279
5314
  super(...e), this.elementRef = null, this.filter = null, this.updateEffect = null;
5280
5315
  }
@@ -5293,7 +5328,7 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5293
5328
  this.removeFilter(), this.updateEffect?.subscription.unsubscribe(), this.updateEffect = null, this.elementRef = null;
5294
5329
  }
5295
5330
  get props() {
5296
- let e = yo(this.elementRef?.props.outline);
5331
+ let e = xo(this.elementRef?.props.outline);
5297
5332
  return e === !0 ? {} : e === !1 ? { enabled: !1 } : e ?? {};
5298
5333
  }
5299
5334
  apply() {
@@ -5304,18 +5339,18 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5304
5339
  this.removeFilter();
5305
5340
  return;
5306
5341
  }
5307
- this.filter || (this.filter = new vo({
5342
+ this.filter || (this.filter = new bo({
5308
5343
  thickness: U(t.thickness, 1),
5309
5344
  color: U(t.color, 16777215),
5310
5345
  quality: U(t.quality, .1),
5311
5346
  alpha: U(t.alpha, 1)
5312
- }), So(e, [...xo(e), this.filter])), this.filter.thickness = U(t.thickness, 1), this.filter.color = U(t.color, 16777215), this.filter.quality = U(t.quality, .1), this.filter.alpha = U(t.alpha, 1);
5347
+ }), wo(e, [...Co(e), this.filter])), this.filter.thickness = U(t.thickness, 1), this.filter.color = U(t.color, 16777215), this.filter.quality = U(t.quality, .1), this.filter.alpha = U(t.alpha, 1);
5313
5348
  }
5314
5349
  removeFilter() {
5315
5350
  let e = this.elementRef?.componentInstance;
5316
- !e || !this.filter || (So(e, xo(e).filter((e) => e !== this.filter)), this.filter = null);
5351
+ !e || !this.filter || (wo(e, Co(e).filter((e) => e !== this.filter)), this.filter = null);
5317
5352
  }
5318
- }, Po = class extends k {
5353
+ }, Io = class extends k {
5319
5354
  constructor(...e) {
5320
5355
  super(...e), this.elementRef = null, this.maskGraphics = null, this.previousMask = null, this.tickSubscription = null, this.updateEffect = null;
5321
5356
  }
@@ -5334,28 +5369,28 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5334
5369
  }
5335
5370
  onDestroy() {
5336
5371
  let e = this.elementRef?.componentInstance;
5337
- e && this.maskGraphics && Ao(e, this.previousMask), this.maskGraphics?.parent && this.maskGraphics.parent.removeChild(this.maskGraphics), this.maskGraphics?.destroy(), this.maskGraphics = null, this.previousMask = null, this.tickSubscription?.unsubscribe(), this.tickSubscription = null, this.updateEffect?.subscription.unsubscribe(), this.updateEffect = null, this.elementRef = null;
5372
+ e && this.maskGraphics && Mo(e, this.previousMask), this.maskGraphics?.parent && this.maskGraphics.parent.removeChild(this.maskGraphics), this.maskGraphics?.destroy(), this.maskGraphics = null, this.previousMask = null, this.tickSubscription?.unsubscribe(), this.tickSubscription = null, this.updateEffect?.subscription.unsubscribe(), this.updateEffect = null, this.elementRef = null;
5338
5373
  }
5339
5374
  get props() {
5340
- return yo(this.elementRef?.props.clip) ?? null;
5375
+ return xo(this.elementRef?.props.clip) ?? null;
5341
5376
  }
5342
5377
  apply() {
5343
5378
  let e = this.elementRef?.componentInstance, t = this.props;
5344
5379
  if (!e || !e.parent || !t?.shape) return;
5345
5380
  if (!U(t.enabled, !0)) {
5346
- this.maskGraphics && (Ao(e, this.previousMask), this.maskGraphics.clear());
5381
+ this.maskGraphics && (Mo(e, this.previousMask), this.maskGraphics.clear());
5347
5382
  return;
5348
5383
  }
5349
- this.maskGraphics || (this.maskGraphics = new p(), this.previousMask = e.mask ?? null), Oo(e, this.maskGraphics), this.maskGraphics.clear();
5384
+ this.maskGraphics || (this.maskGraphics = new p(), this.previousMask = e.mask ?? null), Ao(e, this.maskGraphics), this.maskGraphics.clear();
5350
5385
  let n = t.shape;
5351
5386
  if (n.type === "rect") {
5352
5387
  let t = new b(U(n.x, 0), U(n.y, 0), U(n.width, 0), U(n.height, 0));
5353
- Mo(this.maskGraphics, e, t);
5388
+ Po(this.maskGraphics, e, t);
5354
5389
  }
5355
5390
  let r = U(t.mode, "keep") === "hide";
5356
- ko(e, this.maskGraphics, r);
5391
+ jo(e, this.maskGraphics, r);
5357
5392
  }
5358
- }, Fo = class extends k {
5393
+ }, Lo = class extends k {
5359
5394
  constructor(...e) {
5360
5395
  super(...e), this.elementRef = null, this.maskGraphics = null, this.ghostSprite = null, this.tickSubscription = null, this.updateEffect = null;
5361
5396
  }
@@ -5373,10 +5408,10 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5373
5408
  this.apply();
5374
5409
  }
5375
5410
  onDestroy() {
5376
- Ao(this.ghostSprite, null), this.ghostSprite?.parent && this.ghostSprite.parent.removeChild(this.ghostSprite), this.ghostSprite?.destroy(), this.maskGraphics?.parent && this.maskGraphics.parent.removeChild(this.maskGraphics), this.maskGraphics?.destroy(), this.maskGraphics = null, this.ghostSprite = null, this.tickSubscription?.unsubscribe(), this.tickSubscription = null, this.updateEffect?.subscription.unsubscribe(), this.updateEffect = null, this.elementRef = null;
5411
+ Mo(this.ghostSprite, null), this.ghostSprite?.parent && this.ghostSprite.parent.removeChild(this.ghostSprite), this.ghostSprite?.destroy(), this.maskGraphics?.parent && this.maskGraphics.parent.removeChild(this.maskGraphics), this.maskGraphics?.destroy(), this.maskGraphics = null, this.ghostSprite = null, this.tickSubscription?.unsubscribe(), this.tickSubscription = null, this.updateEffect?.subscription.unsubscribe(), this.updateEffect = null, this.elementRef = null;
5377
5412
  }
5378
5413
  get props() {
5379
- return yo(this.elementRef?.props.occlusion) ?? null;
5414
+ return xo(this.elementRef?.props.occlusion) ?? null;
5380
5415
  }
5381
5416
  apply() {
5382
5417
  let e = this.elementRef?.componentInstance, t = this.props;
@@ -5389,13 +5424,13 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5389
5424
  if (!e.texture) return;
5390
5425
  this.maskGraphics = new p(), this.ghostSprite = new x(e.texture);
5391
5426
  }
5392
- Oo(e, this.maskGraphics), this.ghostSprite.parent !== e.parent && (this.ghostSprite.parent && this.ghostSprite.parent.removeChild(this.ghostSprite), e.parent?.addChild(this.ghostSprite)), this.maskGraphics.clear(), this.ghostSprite.texture = e.texture, this.ghostSprite.width = e.width, this.ghostSprite.height = e.height, this.ghostSprite.visible = !1, this.ghostSprite.alpha = U(t.alpha, .35), jo(this.ghostSprite, e), e.anchor && this.ghostSprite.anchor && this.ghostSprite.anchor.copyFrom(e.anchor);
5393
- let n = U(t.bounds, "bounds"), r = U(t.padding, 0), i = To(e, n), a = !1, o = e.zIndex ?? 0;
5394
- for (let s of bo(yo(t.obstacles))) {
5395
- let t = Co(s);
5427
+ Ao(e, this.maskGraphics), this.ghostSprite.parent !== e.parent && (this.ghostSprite.parent && this.ghostSprite.parent.removeChild(this.ghostSprite), e.parent?.addChild(this.ghostSprite)), this.maskGraphics.clear(), this.ghostSprite.texture = e.texture, this.ghostSprite.width = e.width, this.ghostSprite.height = e.height, this.ghostSprite.visible = !1, this.ghostSprite.alpha = U(t.alpha, .35), No(this.ghostSprite, e), e.anchor && this.ghostSprite.anchor && this.ghostSprite.anchor.copyFrom(e.anchor);
5428
+ let n = U(t.bounds, "bounds"), r = U(t.padding, 0), i = Do(e, n), a = !1, o = e.zIndex ?? 0;
5429
+ for (let s of So(xo(t.obstacles))) {
5430
+ let t = To(s);
5396
5431
  if (!t) continue;
5397
5432
  o = Math.max(o, t.zIndex ?? 0);
5398
- let c = Eo(i, To(t, n));
5433
+ let c = Oo(i, Do(t, n));
5399
5434
  if (!c) continue;
5400
5435
  a = !0;
5401
5436
  let l = e.parent?.toLocal?.({
@@ -5405,12 +5440,12 @@ var vo = _o, U = (e, t) => e === void 0 ? t : P(e) ? e() : e, yo = (e) => {
5405
5440
  x: c.x - r,
5406
5441
  y: c.y - r
5407
5442
  };
5408
- Do(this.maskGraphics, new b(l.x, l.y, c.width + r * 2, c.height + r * 2));
5443
+ ko(this.maskGraphics, new b(l.x, l.y, c.width + r * 2, c.height + r * 2));
5409
5444
  }
5410
- a ? (this.ghostSprite.visible = !0, this.ghostSprite.zIndex = U(t.zIndex, o + 1), ko(this.ghostSprite, this.maskGraphics, !1)) : (this.ghostSprite.visible = !1, Ao(this.ghostSprite, null));
5445
+ a ? (this.ghostSprite.visible = !0, this.ghostSprite.zIndex = U(t.zIndex, o + 1), jo(this.ghostSprite, this.maskGraphics, !1)) : (this.ghostSprite.visible = !1, Mo(this.ghostSprite, null));
5411
5446
  }
5412
5447
  };
5413
- A("outline", No), A("clip", Po), A("occlusion", Fo);
5448
+ A("outline", Fo), A("clip", Io), A("occlusion", Lo);
5414
5449
  //#endregion
5415
5450
  //#region src/utils/functions.ts
5416
5451
  function W(e) {
@@ -5418,7 +5453,7 @@ function W(e) {
5418
5453
  }
5419
5454
  //#endregion
5420
5455
  //#region src/components/DisplayObject.ts
5421
- var Io = /* @__PURE__ */ "added.childAdded.childRemoved.click.clickcapture.destroyed.globalmousemove.globalpointermove.globaltouchmove.mousedown.mousedowncapture.mouseenter.mouseentercapture.mouseleave.mouseleavecapture.mousemove.mousemovecapture.mouseout.mouseoutcapture.mouseover.mouseovercapture.mouseup.mouseupcapture.mouseupoutside.mouseupoutsidecapture.pointercancel.pointercancelcapture.pointerdown.pointerdowncapture.pointerenter.pointerentercapture.pointerleave.pointerleavecapture.pointermove.pointermovecapture.pointerout.pointeroutcapture.pointerover.pointerovercapture.pointertap.pointertapcapture.pointerup.pointerupcapture.pointerupoutside.pointerupoutsidecapture.removed.rightclick.rightclickcapture.rightdown.rightdowncapture.rightup.rightupcapture.rightupoutside.rightupoutsidecapture.tap.tapcapture.touchcancel.touchcancelcapture.touchend.touchendcapture.touchendoutside.touchendoutsidecapture.touchmove.touchmovecapture.touchstart.touchstartcapture.wheel.wheelcapture".split(".");
5456
+ var Ro = /* @__PURE__ */ "added.childAdded.childRemoved.click.clickcapture.destroyed.globalmousemove.globalpointermove.globaltouchmove.mousedown.mousedowncapture.mouseenter.mouseentercapture.mouseleave.mouseleavecapture.mousemove.mousemovecapture.mouseout.mouseoutcapture.mouseover.mouseovercapture.mouseup.mouseupcapture.mouseupoutside.mouseupoutsidecapture.pointercancel.pointercancelcapture.pointerdown.pointerdowncapture.pointerenter.pointerentercapture.pointerleave.pointerleavecapture.pointermove.pointermovecapture.pointerout.pointeroutcapture.pointerover.pointerovercapture.pointertap.pointertapcapture.pointerup.pointerupcapture.pointerupoutside.pointerupoutsidecapture.removed.rightclick.rightclickcapture.rightdown.rightdowncapture.rightup.rightupcapture.rightupoutside.rightupoutsidecapture.tap.tapcapture.touchcancel.touchcancelcapture.touchend.touchendcapture.touchendoutside.touchendoutsidecapture.touchmove.touchmovecapture.touchstart.touchstartcapture.wheel.wheelcapture".split(".");
5422
5457
  function G(e) {
5423
5458
  return class extends e {
5424
5459
  constructor(...e) {
@@ -5440,7 +5475,7 @@ function G(e) {
5440
5475
  }
5441
5476
  onInit(e) {
5442
5477
  Object.prototype.hasOwnProperty.call(this, "layout") && delete this.layout, this._id = e.id;
5443
- for (let t of Io) if (e[t] && !this.overrideProps.includes(t)) {
5478
+ for (let t of Ro) if (e[t] && !this.overrideProps.includes(t)) {
5444
5479
  this.eventMode = "static";
5445
5480
  let n = e[t], r = (...e) => {
5446
5481
  if (!(this.#r && z(this.#r))) return n(...e);
@@ -5663,7 +5698,7 @@ function G(e) {
5663
5698
  }
5664
5699
  //#endregion
5665
5700
  //#region src/utils/GlobalAssetLoader.ts
5666
- var Lo = class {
5701
+ var zo = class {
5667
5702
  constructor() {
5668
5703
  this.assets = /* @__PURE__ */ new Map(), this.onProgressCallbacks = /* @__PURE__ */ new Set(), this.onCompleteCallbacks = /* @__PURE__ */ new Set(), this.assetCounter = 0, this.isComplete = !1;
5669
5704
  }
@@ -5749,7 +5784,7 @@ var Lo = class {
5749
5784
  //#endregion
5750
5785
  //#region src/components/Canvas.ts
5751
5786
  R("Canvas", class extends G(a) {});
5752
- var Ro = async (e = {}) => {
5787
+ var Bo = async (e = {}) => {
5753
5788
  let { cursorStyles: t, width: n, height: r, class: i } = H(e);
5754
5789
  e.width || (n = N(800)), e.height || (r = N(600));
5755
5790
  let a = N({
@@ -5757,7 +5792,7 @@ var Ro = async (e = {}) => {
5757
5792
  height: 0
5758
5793
  });
5759
5794
  e.isRoot = !0;
5760
- let o = new Lo(), s = {
5795
+ let o = new zo(), s = {
5761
5796
  ...e,
5762
5797
  context: {
5763
5798
  canvasSize: a,
@@ -5817,7 +5852,7 @@ var Ro = async (e = {}) => {
5817
5852
  u?.subscription?.unsubscribe?.(), p?.subscription?.unsubscribe?.(), m?.subscription?.unsubscribe?.(), r.ticker.remove(f), r.renderer.off?.("resize", d), c.directives.tick?.stop();
5818
5853
  }), s.context.app.set(r);
5819
5854
  }, c;
5820
- }, zo = class extends G(a) {
5855
+ }, Vo = class extends G(a) {
5821
5856
  constructor(...e) {
5822
5857
  super(...e), this.isCustomAnchor = !0;
5823
5858
  }
@@ -5837,8 +5872,8 @@ var Ro = async (e = {}) => {
5837
5872
  });
5838
5873
  }
5839
5874
  };
5840
- R("Container", zo);
5841
- var Bo = (e) => (R("Container", zo), V("Container", e));
5875
+ R("Container", Vo);
5876
+ var Ho = (e) => (R("Container", Vo), V("Container", e));
5842
5877
  R("Graphics", class extends G(p) {
5843
5878
  constructor(...e) {
5844
5879
  super(...e), this.isCustomAnchor = !0;
@@ -5868,10 +5903,10 @@ R("Graphics", class extends G(p) {
5868
5903
  });
5869
5904
  }
5870
5905
  });
5871
- function Vo(e) {
5906
+ function Uo(e) {
5872
5907
  return V("Graphics", e);
5873
5908
  }
5874
- var Ho = (e, t, n) => {
5909
+ var Wo = (e, t, n) => {
5875
5910
  let r = new v({ _onUpdate: () => {} }, 0, 0);
5876
5911
  kn(r, e);
5877
5912
  let i = r.x, a = r.y;
@@ -5879,57 +5914,57 @@ var Ho = (e, t, n) => {
5879
5914
  x: -i * t,
5880
5915
  y: -a * n
5881
5916
  };
5882
- }, Uo = (e) => P(e) ? e() : e;
5883
- function Wo(e) {
5917
+ }, Go = (e) => P(e) ? e() : e;
5918
+ function Ko(e) {
5884
5919
  let { color: t, borderRadius: n, border: r } = H(e, {
5885
5920
  borderRadius: null,
5886
5921
  border: null
5887
5922
  });
5888
- return Vo({
5923
+ return Uo({
5889
5924
  draw: (e, i, a, o) => {
5890
- let { x: s, y: c } = Ho(o, i, a);
5925
+ let { x: s, y: c } = Wo(o, i, a);
5891
5926
  n() ? e.roundRect(s, c, i, a, n()) : e.rect(s, c, i, a);
5892
- let l = Uo(r);
5893
- l && e.stroke(l), e.fill(Uo(t));
5927
+ let l = Go(r);
5928
+ l && e.stroke(l), e.fill(Go(t));
5894
5929
  },
5895
5930
  ...e
5896
5931
  });
5897
5932
  }
5898
- function Go(e) {
5933
+ function qo(e) {
5899
5934
  let { color: t, border: n, radius: r } = H(e, {
5900
5935
  border: null,
5901
5936
  radius: null
5902
5937
  });
5903
- return Vo({
5938
+ return Uo({
5904
5939
  draw: (e, i, a, o) => {
5905
- let { x: s, y: c } = Ho(o, i, a);
5906
- i == a || a == 0 ? e.circle(s, c, Uo(r) || i) : e.ellipse(s, c, i, a);
5907
- let l = Uo(n);
5908
- l && e.stroke(l), e.fill(Uo(t));
5940
+ let { x: s, y: c } = Wo(o, i, a);
5941
+ i == a || a == 0 ? e.circle(s, c, Go(r) || i) : e.ellipse(s, c, i, a);
5942
+ let l = Go(n);
5943
+ l && e.stroke(l), e.fill(Go(t));
5909
5944
  },
5910
5945
  ...e
5911
5946
  });
5912
5947
  }
5913
- function Ko(e) {
5914
- return Go(e);
5948
+ function Jo(e) {
5949
+ return qo(e);
5915
5950
  }
5916
- function qo(e) {
5951
+ function Yo(e) {
5917
5952
  let { color: t, border: n } = H(e, {
5918
5953
  border: null,
5919
5954
  color: "#000"
5920
5955
  });
5921
- return Vo({
5956
+ return Uo({
5922
5957
  draw: (e, r, i, a) => {
5923
- let { x: o, y: s } = Ho(a, r, i);
5924
- e.moveTo(o, s + i), e.lineTo(o + r / 2, s), e.lineTo(o + r, s + i), e.lineTo(o, s + i), e.fill(Uo(t));
5925
- let c = Uo(n);
5958
+ let { x: o, y: s } = Wo(a, r, i);
5959
+ e.moveTo(o, s + i), e.lineTo(o + r / 2, s), e.lineTo(o + r, s + i), e.lineTo(o, s + i), e.fill(Go(t));
5960
+ let c = Go(n);
5926
5961
  c && e.stroke(c);
5927
5962
  },
5928
5963
  ...e
5929
5964
  });
5930
5965
  }
5931
- function Jo(e) {
5932
- return Vo({
5966
+ function Xo(e) {
5967
+ return Uo({
5933
5968
  draw: async (t) => {
5934
5969
  e.src ? t.context = new p(await n.load({
5935
5970
  src: e.src,
@@ -5965,15 +6000,15 @@ R("Mesh", class extends G(g) {
5965
6000
  });
5966
6001
  }
5967
6002
  });
5968
- var Yo = (e) => V("Mesh", e), Xo = null, Zo = null, Qo = () => {
6003
+ var Zo = (e) => V("Mesh", e), Qo = null, $o = null, es = () => {
5969
6004
  let e = globalThis;
5970
6005
  return e.__CANVAS_ENGINE_HOT_COMPONENTS__ ||= /* @__PURE__ */ new Map(), e.__CANVAS_ENGINE_HOT_COMPONENTS__;
5971
6006
  };
5972
- function $o(e) {
5973
- Zo?.(e);
6007
+ function ts(e) {
6008
+ $o?.(e);
5974
6009
  }
5975
- function es(e) {
5976
- $o((t) => {
6010
+ function ns(e) {
6011
+ ts((t) => {
5977
6012
  let { context: n } = t.props, r;
5978
6013
  return n.tick && (r = n.tick.observable.subscribe(({ value: n }) => {
5979
6014
  z(t) || e(n, t);
@@ -5982,26 +6017,26 @@ function es(e) {
5982
6017
  };
5983
6018
  });
5984
6019
  }
5985
- function ts(e, t = {}, n) {
6020
+ function rs(e, t = {}, n) {
5986
6021
  n[0] instanceof Array && (n = n[0]);
5987
6022
  let r;
5988
- return r = Array.isArray(e) ? e.length === 1 ? e[0] : ts(Bo, {}, e) : "tag" in e || e instanceof T ? e : ns(e, {
6023
+ return r = Array.isArray(e) ? e.length === 1 ? e[0] : rs(Ho, {}, e) : "tag" in e || e instanceof T ? e : is(e, {
5989
6024
  ...t,
5990
6025
  children: n
5991
6026
  }), r ||= {}, t?.dependencies && (r.props = r.props || {}, r.props.dependencies = t.dependencies), r;
5992
6027
  }
5993
- function ns(e, t) {
6028
+ function is(e, t) {
5994
6029
  let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
5995
- Xo = (e) => {
6030
+ Qo = (e) => {
5996
6031
  n.add(e);
5997
- }, Zo = (e) => {
6032
+ }, $o = (e) => {
5998
6033
  r.add(e);
5999
6034
  };
6000
6035
  let i;
6001
6036
  try {
6002
6037
  i = e(t);
6003
6038
  } finally {
6004
- Xo = null, Zo = null;
6039
+ Qo = null, $o = null;
6005
6040
  }
6006
6041
  let a = (e) => {
6007
6042
  e && (e.effectSubscriptions = [...Array.from(n), ...e.effectSubscriptions ?? []], e.effectMounts = [...Array.from(r), ...e.effectMounts ?? []]);
@@ -6010,14 +6045,14 @@ function ns(e, t) {
6010
6045
  a(e), e?.props?.isRoot && r.forEach((t) => t(e));
6011
6046
  }) : i instanceof T ? (i.effectSubscriptions = [...Array.from(n), ...i.effectSubscriptions ?? []], i.effectMounts = [...Array.from(r), ...i.effectMounts ?? []]) : a(i), i;
6012
6047
  }
6013
- function rs(e, t) {
6014
- let n = Qo(), r = n.get(e);
6048
+ function as(e, t) {
6049
+ let n = es(), r = n.get(e);
6015
6050
  return r ? (r.component = t, r.updates.next()) : (r = {
6016
6051
  component: t,
6017
6052
  updates: new ct()
6018
6053
  }, n.set(e, r)), r.wrapper ||= ((e) => new T((t) => {
6019
6054
  let n = !1, i = null, a = () => {
6020
- let a = ns(r.component, e), o = (e) => {
6055
+ let a = is(r.component, e), o = (e) => {
6021
6056
  n || (t.next({ elements: e ? [e] : [] }), i && i !== e && B(i), i = e ?? null);
6022
6057
  };
6023
6058
  a instanceof Promise ? a.then(o).catch((e) => t.error(e)) : o(a);
@@ -6030,21 +6065,21 @@ function rs(e, t) {
6030
6065
  })), r.wrapper;
6031
6066
  }
6032
6067
  function K(e, t = {}, ...n) {
6033
- return t?.dependencies ? !t.dependencies.some(vn) && t.dependencies.every((e) => P(e) ? e() !== void 0 : e !== void 0) ? ts(e, t, n) : new T((r) => {
6068
+ return t?.dependencies ? !t.dependencies.some(vn) && t.dependencies.every((e) => P(e) ? e() !== void 0 : e !== void 0) ? rs(e, t, n) : new T((r) => {
6034
6069
  za(t.dependencies).then(() => {
6035
- let i = ts(e, t, n);
6070
+ let i = rs(e, t, n);
6036
6071
  r.next(i);
6037
6072
  });
6038
- }) : ts(e, t, n);
6073
+ }) : rs(e, t, n);
6039
6074
  }
6040
6075
  //#endregion
6041
6076
  //#region src/components/Scene.ts
6042
- function is(e) {
6043
- return K(Bo);
6077
+ function os(e) {
6078
+ return K(Ho);
6044
6079
  }
6045
6080
  //#endregion
6046
6081
  //#region ../../node_modules/.pnpm/@barvynkoa+particle-emitter@0.0.1_pixi.js@8.9.2/node_modules/@barvynkoa/particle-emitter/lib/particle-emitter.es.js
6047
- var as = class {
6082
+ var ss = class {
6048
6083
  constructor(e) {
6049
6084
  this.segments = [], this.countingLengths = [], this.totalLength = 0, this.init(e);
6050
6085
  }
@@ -6099,8 +6134,8 @@ var as = class {
6099
6134
  e.x = i.x + r * (a.x - i.x), e.y = i.y + r * (a.y - i.y);
6100
6135
  }
6101
6136
  };
6102
- as.type = "polygonalChain", as.editorConfig = null;
6103
- var os = class {
6137
+ ss.type = "polygonalChain", ss.editorConfig = null;
6138
+ var cs = class {
6104
6139
  constructor(e) {
6105
6140
  this.x = e.x, this.y = e.y, this.w = e.w, this.h = e.h;
6106
6141
  }
@@ -6108,73 +6143,73 @@ var os = class {
6108
6143
  e.x = Math.random() * this.w + this.x, e.y = Math.random() * this.h + this.y;
6109
6144
  }
6110
6145
  };
6111
- os.type = "rect", os.editorConfig = null;
6112
- var ss = class e {
6146
+ cs.type = "rect", cs.editorConfig = null;
6147
+ var ls = class e {
6113
6148
  constructor(e, t, n) {
6114
- this.value = e, this.time = t, this.next = null, this.isStepped = !1, n ? this.ease = typeof n == "function" ? n : gs(n) : this.ease = null;
6149
+ this.value = e, this.time = t, this.next = null, this.isStepped = !1, n ? this.ease = typeof n == "function" ? n : vs(n) : this.ease = null;
6115
6150
  }
6116
6151
  static createList(t) {
6117
6152
  if ("list" in t) {
6118
- let n = t.list, r, { value: i, time: a } = n[0], o = r = new e(typeof i == "string" ? hs(i) : i, a, t.ease);
6153
+ let n = t.list, r, { value: i, time: a } = n[0], o = r = new e(typeof i == "string" ? _s(i) : i, a, t.ease);
6119
6154
  if (n.length > 2 || n.length === 2 && n[1].value !== i) for (let t = 1; t < n.length; ++t) {
6120
6155
  let { value: i, time: a } = n[t];
6121
- r.next = new e(typeof i == "string" ? hs(i) : i, a), r = r.next;
6156
+ r.next = new e(typeof i == "string" ? _s(i) : i, a), r = r.next;
6122
6157
  }
6123
6158
  return o.isStepped = !!t.isStepped, o;
6124
6159
  }
6125
- let n = new e(typeof t.start == "string" ? hs(t.start) : t.start, 0);
6126
- return t.end !== t.start && (n.next = new e(typeof t.end == "string" ? hs(t.end) : t.end, 1)), n;
6160
+ let n = new e(typeof t.start == "string" ? _s(t.start) : t.start, 0);
6161
+ return t.end !== t.start && (n.next = new e(typeof t.end == "string" ? _s(t.end) : t.end, 1)), n;
6127
6162
  }
6128
- }, cs = C.from, ls = Math.PI / 180;
6129
- function us(e, t) {
6163
+ }, us = C.from, ds = Math.PI / 180;
6164
+ function fs(e, t) {
6130
6165
  if (!e) return;
6131
6166
  let n = Math.sin(e), r = Math.cos(e), i = t.x * r - t.y * n, a = t.x * n + t.y * r;
6132
6167
  t.x = i, t.y = a;
6133
6168
  }
6134
- function ds(e, t, n) {
6169
+ function ps(e, t, n) {
6135
6170
  return e << 16 | t << 8 | n;
6136
6171
  }
6137
- function fs(e) {
6172
+ function ms(e) {
6138
6173
  return Math.sqrt(e.x * e.x + e.y * e.y);
6139
6174
  }
6140
- function ps(e) {
6141
- let t = 1 / fs(e);
6175
+ function hs(e) {
6176
+ let t = 1 / ms(e);
6142
6177
  e.x *= t, e.y *= t;
6143
6178
  }
6144
- function ms(e, t) {
6179
+ function gs(e, t) {
6145
6180
  e.x *= t, e.y *= t;
6146
6181
  }
6147
- function hs(e, t) {
6182
+ function _s(e, t) {
6148
6183
  t ||= {}, e.charAt(0) === "#" ? e = e.substr(1) : e.indexOf("0x") === 0 && (e = e.substr(2));
6149
6184
  let n;
6150
6185
  return e.length === 8 && (n = e.substr(0, 2), e = e.substr(2)), t.r = parseInt(e.substr(0, 2), 16), t.g = parseInt(e.substr(2, 2), 16), t.b = parseInt(e.substr(4, 2), 16), n && (t.a = parseInt(n, 16)), t;
6151
6186
  }
6152
- function gs(e) {
6187
+ function vs(e) {
6153
6188
  let t = e.length, n = 1 / t;
6154
6189
  return function(r) {
6155
6190
  let i = t * r | 0, a = (r - i * n) * t, o = e[i] || e[t - 1];
6156
6191
  return o.s + a * (2 * (1 - a) * (o.cp - o.s) + a * (o.e - o.s));
6157
6192
  };
6158
6193
  }
6159
- function _s(e) {
6194
+ function ys(e) {
6160
6195
  return e || "normal";
6161
6196
  }
6162
- var vs = class {
6197
+ var bs = class {
6163
6198
  constructor(e) {
6164
6199
  this.x = e.x || 0, this.y = e.y || 0, this.radius = e.radius, this.innerRadius = e.innerRadius || 0, this.rotation = !!e.affectRotation;
6165
6200
  }
6166
6201
  getRandPos(e) {
6167
6202
  this.innerRadius === this.radius ? e.x = this.radius : e.x = Math.random() * (this.radius - this.innerRadius) + this.innerRadius, e.y = 0;
6168
6203
  let t = Math.random() * Math.PI * 2;
6169
- this.rotation && (e.rotation += t), us(t, e.position), e.position.x += this.x, e.position.y += this.y;
6204
+ this.rotation && (e.rotation += t), fs(t, e.position), e.position.x += this.x, e.position.y += this.y;
6170
6205
  }
6171
6206
  };
6172
- vs.type = "torus", vs.editorConfig = null;
6207
+ bs.type = "torus", bs.editorConfig = null;
6173
6208
  var q;
6174
6209
  (function(e) {
6175
6210
  e[e.Spawn = 0] = "Spawn", e[e.Normal = 2] = "Normal", e[e.Late = 5] = "Late";
6176
6211
  })(q ||= {});
6177
- var ys = class {
6212
+ var xs = class {
6178
6213
  constructor(e) {
6179
6214
  this.order = q.Late, this.minStart = e.minStart, this.maxStart = e.maxStart, this.accel = e.accel, this.rotate = !!e.rotate, this.maxSpeed = e.maxSpeed ?? 0;
6180
6215
  }
@@ -6182,64 +6217,64 @@ var ys = class {
6182
6217
  let t = e;
6183
6218
  for (; t;) {
6184
6219
  let e = Math.random() * (this.maxStart - this.minStart) + this.minStart;
6185
- t.config.velocity ? t.config.velocity.set(e, 0) : t.config.velocity = new y(e, 0), us(t.rotation, t.config.velocity), t = t.next;
6220
+ t.config.velocity ? t.config.velocity.set(e, 0) : t.config.velocity = new y(e, 0), fs(t.rotation, t.config.velocity), t = t.next;
6186
6221
  }
6187
6222
  }
6188
6223
  updateParticle(e, t) {
6189
6224
  let n = e.config.velocity, r = n.x, i = n.y;
6190
6225
  if (n.x += this.accel.x * t, n.y += this.accel.y * t, this.maxSpeed) {
6191
- let e = fs(n);
6192
- e > this.maxSpeed && ms(n, this.maxSpeed / e);
6226
+ let e = ms(n);
6227
+ e > this.maxSpeed && gs(n, this.maxSpeed / e);
6193
6228
  }
6194
6229
  e.x += (r + n.x) / 2 * t, e.y += (i + n.y) / 2 * t, this.rotate && (e.rotation = Math.atan2(n.y, n.x));
6195
6230
  }
6196
6231
  };
6197
- ys.type = "moveAcceleration", ys.editorConfig = null;
6198
- function bs(e) {
6232
+ xs.type = "moveAcceleration", xs.editorConfig = null;
6233
+ function Ss(e) {
6199
6234
  return this.ease && (e = this.ease(e)), (this.first.next.value - this.first.value) * e + this.first.value;
6200
6235
  }
6201
- function xs(e) {
6236
+ function Cs(e) {
6202
6237
  this.ease && (e = this.ease(e));
6203
6238
  let t = this.first.value, n = this.first.next.value;
6204
- return ds((n.r - t.r) * e + t.r, (n.g - t.g) * e + t.g, (n.b - t.b) * e + t.b);
6239
+ return ps((n.r - t.r) * e + t.r, (n.g - t.g) * e + t.g, (n.b - t.b) * e + t.b);
6205
6240
  }
6206
- function Ss(e) {
6241
+ function ws(e) {
6207
6242
  this.ease && (e = this.ease(e));
6208
6243
  let t = this.first, n = t.next;
6209
6244
  for (; e > n.time;) t = n, n = n.next;
6210
6245
  return e = (e - t.time) / (n.time - t.time), (n.value - t.value) * e + t.value;
6211
6246
  }
6212
- function Cs(e) {
6247
+ function Ts(e) {
6213
6248
  this.ease && (e = this.ease(e));
6214
6249
  let t = this.first, n = t.next;
6215
6250
  for (; e > n.time;) t = n, n = n.next;
6216
6251
  e = (e - t.time) / (n.time - t.time);
6217
6252
  let r = t.value, i = n.value;
6218
- return ds((i.r - r.r) * e + r.r, (i.g - r.g) * e + r.g, (i.b - r.b) * e + r.b);
6253
+ return ps((i.r - r.r) * e + r.r, (i.g - r.g) * e + r.g, (i.b - r.b) * e + r.b);
6219
6254
  }
6220
- function ws(e) {
6255
+ function Es(e) {
6221
6256
  this.ease && (e = this.ease(e));
6222
6257
  let t = this.first;
6223
6258
  for (; t.next && e > t.next.time;) t = t.next;
6224
6259
  return t.value;
6225
6260
  }
6226
- function Ts(e) {
6261
+ function Ds(e) {
6227
6262
  this.ease && (e = this.ease(e));
6228
6263
  let t = this.first;
6229
6264
  for (; t.next && e > t.next.time;) t = t.next;
6230
6265
  let n = t.value;
6231
- return ds(n.r, n.g, n.b);
6266
+ return ps(n.r, n.g, n.b);
6232
6267
  }
6233
- var Es = class {
6268
+ var Os = class {
6234
6269
  constructor(e = !1) {
6235
6270
  this.first = null, this.isColor = !!e, this.interpolate = null, this.ease = null;
6236
6271
  }
6237
6272
  reset(e) {
6238
- this.first = e, e.next && e.next.time >= 1 ? this.interpolate = this.isColor ? xs : bs : e.isStepped ? this.interpolate = this.isColor ? Ts : ws : this.interpolate = this.isColor ? Cs : Ss, this.ease = this.first.ease;
6273
+ this.first = e, e.next && e.next.time >= 1 ? this.interpolate = this.isColor ? Cs : Ss : e.isStepped ? this.interpolate = this.isColor ? Ds : Es : this.interpolate = this.isColor ? Ts : ws, this.ease = this.first.ease;
6239
6274
  }
6240
- }, Ds = class {
6275
+ }, ks = class {
6241
6276
  constructor(e) {
6242
- this.order = q.Normal, this.list = new Es(!1), this.list.reset(ss.createList(e.alpha));
6277
+ this.order = q.Normal, this.list = new Os(!1), this.list.reset(ls.createList(e.alpha));
6243
6278
  }
6244
6279
  initParticles(e) {
6245
6280
  let t = e;
@@ -6249,8 +6284,8 @@ var Es = class {
6249
6284
  e.alpha = this.list.interpolate(e.agePercent);
6250
6285
  }
6251
6286
  };
6252
- Ds.type = "alpha", Ds.editorConfig = null;
6253
- var Os = class {
6287
+ ks.type = "alpha", ks.editorConfig = null;
6288
+ var As = class {
6254
6289
  constructor(e) {
6255
6290
  this.order = q.Normal, this.value = e.alpha;
6256
6291
  }
@@ -6259,25 +6294,25 @@ var Os = class {
6259
6294
  for (; t;) t.alpha = this.value, t = t.next;
6260
6295
  }
6261
6296
  };
6262
- Os.type = "alphaStatic", Os.editorConfig = null;
6263
- function ks(e) {
6297
+ As.type = "alphaStatic", As.editorConfig = null;
6298
+ function js(e) {
6264
6299
  let t = [];
6265
6300
  for (let n = 0; n < e.length; ++n) {
6266
6301
  let r = e[n];
6267
- if (typeof r == "string") t.push(cs(r));
6302
+ if (typeof r == "string") t.push(us(r));
6268
6303
  else if (r instanceof C) t.push(r);
6269
6304
  else {
6270
6305
  let e = r.count || 1;
6271
- for (r = typeof r.texture == "string" ? cs(r.texture) : r.texture; e > 0; --e) t.push(r);
6306
+ for (r = typeof r.texture == "string" ? us(r.texture) : r.texture; e > 0; --e) t.push(r);
6272
6307
  }
6273
6308
  }
6274
6309
  return t;
6275
6310
  }
6276
- var As = class {
6311
+ var Ms = class {
6277
6312
  constructor(e) {
6278
6313
  this.order = q.Normal, this.anims = [];
6279
6314
  for (let t = 0; t < e.anims.length; ++t) {
6280
- let n = e.anims[t], r = ks(n.textures), i = n.framerate < 0 ? -1 : n.framerate > 0 ? n.framerate : 60, a = {
6315
+ let n = e.anims[t], r = js(n.textures), i = n.framerate < 0 ? -1 : n.framerate > 0 ? n.framerate : 60, a = {
6281
6316
  textures: r,
6282
6317
  duration: i > 0 ? r.length / i : 0,
6283
6318
  framerate: i,
@@ -6300,11 +6335,11 @@ var As = class {
6300
6335
  e.texture = r.textures[i] || r.textures[r.textures.length - 1] || C.EMPTY;
6301
6336
  }
6302
6337
  };
6303
- As.type = "animatedRandom", As.editorConfig = null;
6304
- var js = class {
6338
+ Ms.type = "animatedRandom", Ms.editorConfig = null;
6339
+ var Ns = class {
6305
6340
  constructor(e) {
6306
6341
  this.order = q.Normal;
6307
- let t = e.anim, n = ks(t.textures), r = t.framerate < 0 ? -1 : t.framerate > 0 ? t.framerate : 60;
6342
+ let t = e.anim, n = js(t.textures), r = t.framerate < 0 ? -1 : t.framerate > 0 ? t.framerate : 60;
6308
6343
  this.anim = {
6309
6344
  textures: n,
6310
6345
  duration: r > 0 ? n.length / r : 0,
@@ -6323,44 +6358,44 @@ var js = class {
6323
6358
  e.texture = n.textures[i] || n.textures[n.textures.length - 1] || C.EMPTY;
6324
6359
  }
6325
6360
  };
6326
- js.type = "animatedSingle", js.editorConfig = null;
6327
- var Ms = class {
6361
+ Ns.type = "animatedSingle", Ns.editorConfig = null;
6362
+ var Ps = class {
6328
6363
  constructor(e) {
6329
6364
  this.order = q.Normal, this.value = e.blendMode;
6330
6365
  }
6331
6366
  initParticles(e) {
6332
6367
  let t = e;
6333
- for (; t;) t.blendMode = _s(this.value), t = t.next;
6368
+ for (; t;) t.blendMode = ys(this.value), t = t.next;
6334
6369
  }
6335
6370
  };
6336
- Ms.type = "blendMode", Ms.editorConfig = null;
6337
- var Ns = class {
6371
+ Ps.type = "blendMode", Ps.editorConfig = null;
6372
+ var Fs = class {
6338
6373
  constructor(e) {
6339
- this.order = q.Spawn, this.spacing = e.spacing * ls, this.start = e.start * ls, this.distance = e.distance;
6374
+ this.order = q.Spawn, this.spacing = e.spacing * ds, this.start = e.start * ds, this.distance = e.distance;
6340
6375
  }
6341
6376
  initParticles(e) {
6342
6377
  let t = 0, n = e;
6343
6378
  for (; n;) {
6344
6379
  let e;
6345
- e = this.spacing ? this.start + this.spacing * t : Math.random() * Math.PI * 2, n.rotation = e, this.distance && (n.position.x = this.distance, us(e, n.position)), n = n.next, ++t;
6380
+ e = this.spacing ? this.start + this.spacing * t : Math.random() * Math.PI * 2, n.rotation = e, this.distance && (n.position.x = this.distance, fs(e, n.position)), n = n.next, ++t;
6346
6381
  }
6347
6382
  }
6348
6383
  };
6349
- Ns.type = "spawnBurst", Ns.editorConfig = null;
6350
- var Ps = class {
6384
+ Fs.type = "spawnBurst", Fs.editorConfig = null;
6385
+ var Is = class {
6351
6386
  constructor(e) {
6352
- this.order = q.Normal, this.list = new Es(!0), this.list.reset(ss.createList(e.color));
6387
+ this.order = q.Normal, this.list = new Os(!0), this.list.reset(ls.createList(e.color));
6353
6388
  }
6354
6389
  initParticles(e) {
6355
- let t = e, n = this.list.first.value, r = ds(n.r, n.g, n.b);
6390
+ let t = e, n = this.list.first.value, r = ps(n.r, n.g, n.b);
6356
6391
  for (; t;) t.tint = r, t = t.next;
6357
6392
  }
6358
6393
  updateParticle(e) {
6359
6394
  e.tint = this.list.interpolate(e.agePercent);
6360
6395
  }
6361
6396
  };
6362
- Ps.type = "color", Ps.editorConfig = null;
6363
- var Fs = class {
6397
+ Is.type = "color", Is.editorConfig = null;
6398
+ var Ls = class {
6364
6399
  constructor(e) {
6365
6400
  this.order = q.Normal;
6366
6401
  let t = e.color;
@@ -6371,33 +6406,33 @@ var Fs = class {
6371
6406
  for (; t;) t.tint = this.value, t = t.next;
6372
6407
  }
6373
6408
  };
6374
- Fs.type = "colorStatic", Fs.editorConfig = null;
6375
- var Is = class {
6409
+ Ls.type = "colorStatic", Ls.editorConfig = null;
6410
+ var Rs = class {
6376
6411
  constructor(e) {
6377
- this.order = q.Normal, this.index = 0, this.textures = e.textures.map((e) => typeof e == "string" ? cs(e) : e);
6412
+ this.order = q.Normal, this.index = 0, this.textures = e.textures.map((e) => typeof e == "string" ? us(e) : e);
6378
6413
  }
6379
6414
  initParticles(e) {
6380
6415
  let t = e;
6381
6416
  for (; t;) t.texture = this.textures[this.index], ++this.index >= this.textures.length && (this.index = 0), t = t.next;
6382
6417
  }
6383
6418
  };
6384
- Is.type = "textureOrdered", Is.editorConfig = null;
6385
- var Ls = new y(), Rs = /* @__PURE__ */ "E.LN2.LN10.LOG2E.LOG10E.PI.SQRT1_2.SQRT2.abs.acos.acosh.asin.asinh.atan.atanh.atan2.cbrt.ceil.cos.cosh.exp.expm1.floor.fround.hypot.log.log1p.log10.log2.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh".split("."), zs = new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(Rs).join("|"), "g");
6386
- function Bs(e) {
6387
- let t = e.match(zs);
6388
- for (let e = t.length - 1; e >= 0; --e) Rs.indexOf(t[e]) >= 0 && (t[e] = `Math.${t[e]}`);
6419
+ Rs.type = "textureOrdered", Rs.editorConfig = null;
6420
+ var zs = new y(), Bs = /* @__PURE__ */ "E.LN2.LN10.LOG2E.LOG10E.PI.SQRT1_2.SQRT2.abs.acos.acosh.asin.asinh.atan.atanh.atan2.cbrt.ceil.cos.cosh.exp.expm1.floor.fround.hypot.log.log1p.log10.log2.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh".split("."), Vs = new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(Bs).join("|"), "g");
6421
+ function Hs(e) {
6422
+ let t = e.match(Vs);
6423
+ for (let e = t.length - 1; e >= 0; --e) Bs.indexOf(t[e]) >= 0 && (t[e] = `Math.${t[e]}`);
6389
6424
  return e = t.join(""), Function("x", `return ${e};`);
6390
6425
  }
6391
- var Vs = class {
6426
+ var Us = class {
6392
6427
  constructor(e) {
6393
6428
  if (this.order = q.Late, e.path) if (typeof e.path == "function") this.path = e.path;
6394
6429
  else try {
6395
- this.path = Bs(e.path);
6430
+ this.path = Hs(e.path);
6396
6431
  } catch {
6397
6432
  this.path = null;
6398
6433
  }
6399
6434
  else this.path = (e) => e;
6400
- this.list = new Es(!1), this.list.reset(ss.createList(e.speed)), this.minMult = e.minMult ?? 1;
6435
+ this.list = new Os(!1), this.list.reset(ls.createList(e.speed)), this.minMult = e.minMult ?? 1;
6401
6436
  }
6402
6437
  initParticles(e) {
6403
6438
  let t = e;
@@ -6409,20 +6444,20 @@ var Vs = class {
6409
6444
  }
6410
6445
  updateParticle(e, t) {
6411
6446
  let n = this.list.interpolate(e.agePercent) * e.config.speedMult;
6412
- e.config.movement += n * t, Ls.x = e.config.movement, Ls.y = this.path(Ls.x), us(e.config.initRotation, Ls), e.position.x = e.config.initPosition.x + Ls.x, e.position.y = e.config.initPosition.y + Ls.y;
6447
+ e.config.movement += n * t, zs.x = e.config.movement, zs.y = this.path(zs.x), fs(e.config.initRotation, zs), e.position.x = e.config.initPosition.x + zs.x, e.position.y = e.config.initPosition.y + zs.y;
6413
6448
  }
6414
6449
  };
6415
- Vs.type = "movePath", Vs.editorConfig = null;
6416
- var Hs = class {
6450
+ Us.type = "movePath", Us.editorConfig = null;
6451
+ var Ws = class {
6417
6452
  constructor() {
6418
6453
  this.order = q.Spawn;
6419
6454
  }
6420
6455
  initParticles(e) {}
6421
6456
  };
6422
- Hs.type = "spawnPoint", Hs.editorConfig = null;
6423
- var Us = class {
6457
+ Ws.type = "spawnPoint", Ws.editorConfig = null;
6458
+ var Gs = class {
6424
6459
  constructor(e) {
6425
- this.order = q.Normal, this.textures = e.textures.map((e) => typeof e == "string" ? cs(e) : e);
6460
+ this.order = q.Normal, this.textures = e.textures.map((e) => typeof e == "string" ? us(e) : e);
6426
6461
  }
6427
6462
  initParticles(e) {
6428
6463
  let t = e;
@@ -6432,10 +6467,10 @@ var Us = class {
6432
6467
  }
6433
6468
  }
6434
6469
  };
6435
- Us.type = "textureRandom", Us.editorConfig = null;
6436
- var Ws = class {
6470
+ Gs.type = "textureRandom", Gs.editorConfig = null;
6471
+ var Ks = class {
6437
6472
  constructor(e) {
6438
- this.order = q.Normal, this.minStart = e.minStart * ls, this.maxStart = e.maxStart * ls, this.minSpeed = e.minSpeed * ls, this.maxSpeed = e.maxSpeed * ls, this.accel = e.accel * ls;
6473
+ this.order = q.Normal, this.minStart = e.minStart * ds, this.maxStart = e.maxStart * ds, this.minSpeed = e.minSpeed * ds, this.maxSpeed = e.maxSpeed * ds, this.accel = e.accel * ds;
6439
6474
  }
6440
6475
  initParticles(e) {
6441
6476
  let t = e;
@@ -6448,30 +6483,30 @@ var Ws = class {
6448
6483
  } else e.rotation += e.config.rotSpeed * t;
6449
6484
  }
6450
6485
  };
6451
- Ws.type = "rotation", Ws.editorConfig = null;
6452
- var Gs = class {
6486
+ Ks.type = "rotation", Ks.editorConfig = null;
6487
+ var qs = class {
6453
6488
  constructor(e) {
6454
- this.order = q.Normal, this.min = e.min * ls, this.max = e.max * ls;
6489
+ this.order = q.Normal, this.min = e.min * ds, this.max = e.max * ds;
6455
6490
  }
6456
6491
  initParticles(e) {
6457
6492
  let t = e;
6458
6493
  for (; t;) this.min === this.max ? t.rotation += this.max : t.rotation += Math.random() * (this.max - this.min) + this.min, t = t.next;
6459
6494
  }
6460
6495
  };
6461
- Gs.type = "rotationStatic", Gs.editorConfig = null;
6462
- var Ks = class {
6496
+ qs.type = "rotationStatic", qs.editorConfig = null;
6497
+ var Js = class {
6463
6498
  constructor(e) {
6464
- this.order = q.Late + 1, this.rotation = (e.rotation || 0) * ls;
6499
+ this.order = q.Late + 1, this.rotation = (e.rotation || 0) * ds;
6465
6500
  }
6466
6501
  initParticles(e) {
6467
6502
  let t = e;
6468
6503
  for (; t;) t.rotation = this.rotation, t = t.next;
6469
6504
  }
6470
6505
  };
6471
- Ks.type = "noRotation", Ks.editorConfig = null;
6472
- var qs = class {
6506
+ Js.type = "noRotation", Js.editorConfig = null;
6507
+ var Ys = class {
6473
6508
  constructor(e) {
6474
- this.order = q.Normal, this.list = new Es(!1), this.list.reset(ss.createList(e.scale)), this.minMult = e.minMult ?? 1;
6509
+ this.order = q.Normal, this.list = new Os(!1), this.list.reset(ls.createList(e.scale)), this.minMult = e.minMult ?? 1;
6475
6510
  }
6476
6511
  initParticles(e) {
6477
6512
  let t = e;
@@ -6484,8 +6519,8 @@ var qs = class {
6484
6519
  e.scale.x = e.scale.y = this.list.interpolate(e.agePercent) * e.config.scaleMult;
6485
6520
  }
6486
6521
  };
6487
- qs.type = "scale", qs.editorConfig = null;
6488
- var Js = class {
6522
+ Ys.type = "scale", Ys.editorConfig = null;
6523
+ var Xs = class {
6489
6524
  constructor(e) {
6490
6525
  this.order = q.Normal, this.min = e.min, this.max = e.max;
6491
6526
  }
@@ -6497,8 +6532,8 @@ var Js = class {
6497
6532
  }
6498
6533
  }
6499
6534
  };
6500
- Js.type = "scaleStatic", Js.editorConfig = null;
6501
- var Ys = class e {
6535
+ Xs.type = "scaleStatic", Xs.editorConfig = null;
6536
+ var Zs = class e {
6502
6537
  static registerShape(t, n) {
6503
6538
  e.shapes[n || t.type] = t;
6504
6539
  }
@@ -6513,35 +6548,35 @@ var Ys = class e {
6513
6548
  for (; t;) this.shape.getRandPos(t), t = t.next;
6514
6549
  }
6515
6550
  };
6516
- Ys.type = "spawnShape", Ys.editorConfig = null, Ys.shapes = {}, Ys.registerShape(as), Ys.registerShape(os), Ys.registerShape(vs), Ys.registerShape(vs, "circle");
6517
- var Xs = class {
6551
+ Zs.type = "spawnShape", Zs.editorConfig = null, Zs.shapes = {}, Zs.registerShape(ss), Zs.registerShape(cs), Zs.registerShape(bs), Zs.registerShape(bs, "circle");
6552
+ var Qs = class {
6518
6553
  constructor(e) {
6519
- this.order = q.Normal, this.texture = typeof e.texture == "string" ? cs(e.texture) : e.texture;
6554
+ this.order = q.Normal, this.texture = typeof e.texture == "string" ? us(e.texture) : e.texture;
6520
6555
  }
6521
6556
  initParticles(e) {
6522
6557
  let t = e;
6523
6558
  for (; t;) t.texture = this.texture, t = t.next;
6524
6559
  }
6525
6560
  };
6526
- Xs.type = "textureSingle", Xs.editorConfig = null;
6527
- var Zs = class {
6561
+ Qs.type = "textureSingle", Qs.editorConfig = null;
6562
+ var $s = class {
6528
6563
  constructor(e) {
6529
- this.order = q.Late, this.list = new Es(!1), this.list.reset(ss.createList(e.speed)), this.minMult = e.minMult ?? 1;
6564
+ this.order = q.Late, this.list = new Os(!1), this.list.reset(ls.createList(e.speed)), this.minMult = e.minMult ?? 1;
6530
6565
  }
6531
6566
  initParticles(e) {
6532
6567
  let t = e;
6533
6568
  for (; t;) {
6534
6569
  let e = Math.random() * (1 - this.minMult) + this.minMult;
6535
- t.config.speedMult = e, t.config.velocity ? t.config.velocity.set(this.list.first.value * e, 0) : t.config.velocity = new y(this.list.first.value * e, 0), us(t.rotation, t.config.velocity), t = t.next;
6570
+ t.config.speedMult = e, t.config.velocity ? t.config.velocity.set(this.list.first.value * e, 0) : t.config.velocity = new y(this.list.first.value * e, 0), fs(t.rotation, t.config.velocity), t = t.next;
6536
6571
  }
6537
6572
  }
6538
6573
  updateParticle(e, t) {
6539
6574
  let n = this.list.interpolate(e.agePercent) * e.config.speedMult, r = e.config.velocity;
6540
- ps(r), ms(r, n), e.x += r.x * t, e.y += r.y * t;
6575
+ hs(r), gs(r, n), e.x += r.x * t, e.y += r.y * t;
6541
6576
  }
6542
6577
  };
6543
- Zs.type = "moveSpeed", Zs.editorConfig = null;
6544
- var Qs = class {
6578
+ $s.type = "moveSpeed", $s.editorConfig = null;
6579
+ var ec = class {
6545
6580
  constructor(e) {
6546
6581
  this.order = q.Late, this.min = e.min, this.max = e.max;
6547
6582
  }
@@ -6549,7 +6584,7 @@ var Qs = class {
6549
6584
  let t = e;
6550
6585
  for (; t;) {
6551
6586
  let e = Math.random() * (this.max - this.min) + this.min;
6552
- t.config.velocity ? t.config.velocity.set(e, 0) : t.config.velocity = new y(e, 0), us(t.rotation, t.config.velocity), t = t.next;
6587
+ t.config.velocity ? t.config.velocity.set(e, 0) : t.config.velocity = new y(e, 0), fs(t.rotation, t.config.velocity), t = t.next;
6553
6588
  }
6554
6589
  }
6555
6590
  updateParticle(e, t) {
@@ -6557,8 +6592,8 @@ var Qs = class {
6557
6592
  e.x += n.x * t, e.y += n.y * t;
6558
6593
  }
6559
6594
  };
6560
- Qs.type = "moveSpeedStatic", Qs.editorConfig = null;
6561
- var $s = class extends x {
6595
+ ec.type = "moveSpeedStatic", ec.editorConfig = null;
6596
+ var tc = class extends x {
6562
6597
  constructor(e) {
6563
6598
  super(), this.prevChild = this.nextChild = null, this.emitter = e, this.config = {}, this.anchor.x = this.anchor.y = .5, this.maxLife = 0, this.age = 0, this.agePercent = 0, this.oneOverLife = 0, this.next = null, this.prev = null, this.init = this.init, this.kill = this.kill;
6564
6599
  }
@@ -6571,7 +6606,7 @@ var $s = class extends x {
6571
6606
  destroy() {
6572
6607
  this.parent && this.parent.removeChild(this), this.emitter = this.next = this.prev = null, super.destroy();
6573
6608
  }
6574
- }, ec = ee.shared, tc = Symbol("Position particle per emitter position"), J = class e {
6609
+ }, nc = ee.shared, rc = Symbol("Position particle per emitter position"), J = class e {
6575
6610
  static registerBehavior(t) {
6576
6611
  e.knownBehaviors[t.type] = t;
6577
6612
  }
@@ -6592,19 +6627,19 @@ var $s = class extends x {
6592
6627
  }
6593
6628
  init(t) {
6594
6629
  if (!t) return;
6595
- this.cleanup(), this._origConfig = t, this.minLifetime = t.lifetime.min, this.maxLifetime = t.lifetime.max, t.ease ? this.customEase = typeof t.ease == "function" ? t.ease : gs(t.ease) : this.customEase = null, this.particlesPerWave = 1, t.particlesPerWave && t.particlesPerWave > 1 && (this.particlesPerWave = t.particlesPerWave), this.frequency = t.frequency, this.spawnChance = typeof t.spawnChance == "number" && t.spawnChance > 0 ? t.spawnChance : 1, this.emitterLifetime = t.emitterLifetime || -1, this.maxParticles = t.maxParticles > 0 ? t.maxParticles : 1e3, this.addAtBack = !!t.addAtBack, this.rotation = 0, this.ownerPos.set(0), t.pos ? this.spawnPos.copyFrom(t.pos) : this.spawnPos.set(0), this._prevEmitterPos.copyFrom(this.spawnPos), this._prevPosIsValid = !1, this._spawnTimer = 0, this.emit = t.emit === void 0 ? !0 : !!t.emit, this.autoUpdate = !!t.autoUpdate;
6630
+ this.cleanup(), this._origConfig = t, this.minLifetime = t.lifetime.min, this.maxLifetime = t.lifetime.max, t.ease ? this.customEase = typeof t.ease == "function" ? t.ease : vs(t.ease) : this.customEase = null, this.particlesPerWave = 1, t.particlesPerWave && t.particlesPerWave > 1 && (this.particlesPerWave = t.particlesPerWave), this.frequency = t.frequency, this.spawnChance = typeof t.spawnChance == "number" && t.spawnChance > 0 ? t.spawnChance : 1, this.emitterLifetime = t.emitterLifetime || -1, this.maxParticles = t.maxParticles > 0 ? t.maxParticles : 1e3, this.addAtBack = !!t.addAtBack, this.rotation = 0, this.ownerPos.set(0), t.pos ? this.spawnPos.copyFrom(t.pos) : this.spawnPos.set(0), this._prevEmitterPos.copyFrom(this.spawnPos), this._prevPosIsValid = !1, this._spawnTimer = 0, this.emit = t.emit === void 0 ? !0 : !!t.emit, this.autoUpdate = !!t.autoUpdate;
6596
6631
  let n = t.behaviors.map((t) => {
6597
6632
  let n = e.knownBehaviors[t.type];
6598
6633
  return n ? new n(t.config) : (console.error(`Unknown behavior: ${t.type}`), null);
6599
6634
  }).filter((e) => !!e);
6600
- n.push(tc), n.sort((e, t) => e === tc ? t.order === q.Spawn ? 1 : -1 : t === tc ? e.order === q.Spawn ? -1 : 1 : e.order - t.order), this.initBehaviors = n.slice(), this.updateBehaviors = n.filter((e) => e !== tc && e.updateParticle), this.recycleBehaviors = n.filter((e) => e !== tc && e.recycleParticle);
6635
+ n.push(rc), n.sort((e, t) => e === rc ? t.order === q.Spawn ? 1 : -1 : t === rc ? e.order === q.Spawn ? -1 : 1 : e.order - t.order), this.initBehaviors = n.slice(), this.updateBehaviors = n.filter((e) => e !== rc && e.updateParticle), this.recycleBehaviors = n.filter((e) => e !== rc && e.recycleParticle);
6601
6636
  }
6602
6637
  getBehavior(t) {
6603
6638
  return e.knownBehaviors[t] && this.initBehaviors.find((n) => n instanceof e.knownBehaviors[t]) || null;
6604
6639
  }
6605
6640
  fillPool(e) {
6606
6641
  for (; e > 0; --e) {
6607
- let e = new $s(this);
6642
+ let e = new tc(this);
6608
6643
  e.next = this._poolFirst, this._poolFirst = e;
6609
6644
  }
6610
6645
  }
@@ -6615,7 +6650,7 @@ var $s = class extends x {
6615
6650
  rotate(e) {
6616
6651
  if (this.rotation === e) return;
6617
6652
  let t = e - this.rotation;
6618
- this.rotation = e, us(t, this.spawnPos), this._posChanged = !0;
6653
+ this.rotation = e, fs(t, this.spawnPos), this._posChanged = !0;
6619
6654
  }
6620
6655
  updateSpawnPos(e, t) {
6621
6656
  this._posChanged = !0, this.spawnPos.x = e, this.spawnPos.y = t;
@@ -6636,7 +6671,7 @@ var $s = class extends x {
6636
6671
  return this._autoUpdate;
6637
6672
  }
6638
6673
  set autoUpdate(e) {
6639
- this._autoUpdate && !e ? ec.remove(this.update, this) : !this._autoUpdate && e && ec.add(this.update, this), this._autoUpdate = !!e;
6674
+ this._autoUpdate && !e ? nc.remove(this.update, this) : !this._autoUpdate && e && nc.add(this.update, this), this._autoUpdate = !!e;
6640
6675
  }
6641
6676
  playOnceAndDestroy(e) {
6642
6677
  this.autoUpdate = !0, this.emit = !0, this._destroyWhenComplete = !0, this._completeCallback = e;
@@ -6645,7 +6680,7 @@ var $s = class extends x {
6645
6680
  this.emit = !0, this._completeCallback = e;
6646
6681
  }
6647
6682
  update(e) {
6648
- if (typeof e != "number" && (e = e.deltaTime), this._autoUpdate && (e = ec.elapsedMS * .001), !this._parent) return;
6683
+ if (typeof e != "number" && (e = e.deltaTime), this._autoUpdate && (e = nc.elapsedMS * .001), !this._parent) return;
6649
6684
  for (let t = this._activeParticlesFirst, n; t; t = n) if (n = t.next, t.age += e, t.age > t.maxLife || t.age < 0) this.recycle(t);
6650
6685
  else {
6651
6686
  let n = t.age * t.oneOverLife;
@@ -6678,14 +6713,14 @@ var $s = class extends x {
6678
6713
  let e;
6679
6714
  if (e = this.minLifetime === this.maxLifetime ? this.minLifetime : Math.random() * (this.maxLifetime - this.minLifetime) + this.minLifetime, -this._spawnTimer >= e) continue;
6680
6715
  let t;
6681
- this._poolFirst ? (t = this._poolFirst, this._poolFirst = this._poolFirst.next, t.next = null) : t = new $s(this), t.init(e), this.addAtBack ? this._parent.addChildAt(t, 0) : this._parent.addChild(t), s ? (c.next = t, t.prev = c, c = t) : c = s = t, ++this.particleCount;
6716
+ this._poolFirst ? (t = this._poolFirst, this._poolFirst = this._poolFirst.next, t.next = null) : t = new tc(this), t.init(e), this.addAtBack ? this._parent.addChildAt(t, 0) : this._parent.addChild(t), s ? (c.next = t, t.prev = c, c = t) : c = s = t, ++this.particleCount;
6682
6717
  }
6683
6718
  if (s) {
6684
6719
  this._activeParticlesLast ? (this._activeParticlesLast.next = s, s.prev = this._activeParticlesLast, this._activeParticlesLast = c) : (this._activeParticlesFirst = s, this._activeParticlesLast = c);
6685
6720
  for (let e = 0; e < this.initBehaviors.length; ++e) {
6686
6721
  let t = this.initBehaviors[e];
6687
- if (t === tc) for (let e = s, t; e; e = t) {
6688
- t = e.next, this.rotation !== 0 && (us(this.rotation, e.position), e.rotation += this.rotation), e.position.x += a, e.position.y += o, e.age += -this._spawnTimer;
6722
+ if (t === rc) for (let e = s, t; e; e = t) {
6723
+ t = e.next, this.rotation !== 0 && (fs(this.rotation, e.position), e.rotation += this.rotation), e.position.x += a, e.position.y += o, e.age += -this._spawnTimer;
6689
6724
  let n = e.age * e.oneOverLife;
6690
6725
  this.customEase && (n = this.customEase.length === 4 ? this.customEase(n, 0, 1, 1) : this.customEase(n)), e.agePercent = n;
6691
6726
  }
@@ -6714,7 +6749,7 @@ var $s = class extends x {
6714
6749
  for (let e = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount), t = 0; t < e; ++t) {
6715
6750
  if (this.spawnChance < 1 && Math.random() >= this.spawnChance) continue;
6716
6751
  let e;
6717
- this._poolFirst ? (e = this._poolFirst, this._poolFirst = this._poolFirst.next, e.next = null) : e = new $s(this);
6752
+ this._poolFirst ? (e = this._poolFirst, this._poolFirst = this._poolFirst.next, e.next = null) : e = new tc(this);
6718
6753
  let t;
6719
6754
  t = this.minLifetime === this.maxLifetime ? this.minLifetime : Math.random() * (this.maxLifetime - this.minLifetime) + this.minLifetime, e.init(t), this.addAtBack ? this._parent.addChildAt(e, 0) : this._parent.addChild(e), n ? (r.next = e, e.prev = r, r = e) : r = n = e, ++this.particleCount;
6720
6755
  }
@@ -6722,7 +6757,7 @@ var $s = class extends x {
6722
6757
  this._activeParticlesLast ? (this._activeParticlesLast.next = n, n.prev = this._activeParticlesLast, this._activeParticlesLast = r) : (this._activeParticlesFirst = n, this._activeParticlesLast = r);
6723
6758
  for (let r = 0; r < this.initBehaviors.length; ++r) {
6724
6759
  let i = this.initBehaviors[r];
6725
- if (i === tc) for (let r = n, i; r; r = i) i = r.next, this.rotation !== 0 && (us(this.rotation, r.position), r.rotation += this.rotation), r.position.x += e, r.position.y += t;
6760
+ if (i === rc) for (let r = n, i; r; r = i) i = r.next, this.rotation !== 0 && (fs(this.rotation, r.position), r.rotation += this.rotation), r.position.x += e, r.position.y += t;
6726
6761
  else i.initParticles(n);
6727
6762
  }
6728
6763
  }
@@ -6742,7 +6777,7 @@ var $s = class extends x {
6742
6777
  this._poolFirst = this._parent = this.spawnPos = this.ownerPos = this.customEase = this._completeCallback = null, this.initBehaviors.length = this.updateBehaviors.length = this.recycleBehaviors.length = 0;
6743
6778
  }
6744
6779
  };
6745
- J.knownBehaviors = {}, J.registerBehavior(ys), J.registerBehavior(Ds), J.registerBehavior(Os), J.registerBehavior(As), J.registerBehavior(js), J.registerBehavior(Ms), J.registerBehavior(Ns), J.registerBehavior(Ps), J.registerBehavior(Fs), J.registerBehavior(Is), J.registerBehavior(Vs), J.registerBehavior(Hs), J.registerBehavior(Us), J.registerBehavior(Ws), J.registerBehavior(Gs), J.registerBehavior(Ks), J.registerBehavior(qs), J.registerBehavior(Js), J.registerBehavior(Ys), J.registerBehavior(Xs), J.registerBehavior(Zs), J.registerBehavior(Qs), R("ParticlesEmitter", class extends zo {
6780
+ J.knownBehaviors = {}, J.registerBehavior(xs), J.registerBehavior(ks), J.registerBehavior(As), J.registerBehavior(Ms), J.registerBehavior(Ns), J.registerBehavior(Ps), J.registerBehavior(Fs), J.registerBehavior(Is), J.registerBehavior(Ls), J.registerBehavior(Rs), J.registerBehavior(Us), J.registerBehavior(Ws), J.registerBehavior(Gs), J.registerBehavior(Ks), J.registerBehavior(qs), J.registerBehavior(Js), J.registerBehavior(Ys), J.registerBehavior(Xs), J.registerBehavior(Zs), J.registerBehavior(Qs), J.registerBehavior($s), J.registerBehavior(ec), R("ParticlesEmitter", class extends Vo {
6746
6781
  constructor(...e) {
6747
6782
  super(...e), this.elapsed = Date.now();
6748
6783
  }
@@ -6762,16 +6797,16 @@ J.knownBehaviors = {}, J.registerBehavior(ys), J.registerBehavior(Ds), J.registe
6762
6797
  });
6763
6798
  }
6764
6799
  });
6765
- function nc(e) {
6800
+ function ic(e) {
6766
6801
  return V("ParticlesEmitter", e);
6767
6802
  }
6768
6803
  //#endregion
6769
6804
  //#region src/components/Sprite.ts
6770
- var rc = console.log, ic = /* @__PURE__ */ function(e) {
6805
+ var ac = console.log, oc = /* @__PURE__ */ function(e) {
6771
6806
  return e.Stand = "stand", e.Walk = "walk", e;
6772
- }({}), ac = class extends G(x) {
6807
+ }({}), sc = class extends G(x) {
6773
6808
  constructor(...e) {
6774
- super(...e), this.hitbox = null, this.currentAnimation = null, this.time = 0, this.frameIndex = 0, this.animations = /* @__PURE__ */ new Map(), this.subscriptionSheet = [], this.sheetParams = {}, this.sheetCurrentAnimation = ic.Stand, this.app = null, this.globalLoader = null, this.trackedAssetIds = /* @__PURE__ */ new Set(), this.currentAnimationContainer = null;
6809
+ super(...e), this.hitbox = null, this.currentAnimation = null, this.time = 0, this.frameIndex = 0, this.animations = /* @__PURE__ */ new Map(), this.subscriptionSheet = [], this.sheetParams = {}, this.sheetCurrentAnimation = oc.Stand, this.app = null, this.globalLoader = null, this.trackedAssetIds = /* @__PURE__ */ new Set(), this.currentAnimationContainer = null;
6775
6810
  }
6776
6811
  get renderer() {
6777
6812
  return this.app?.renderer;
@@ -6802,8 +6837,8 @@ var rc = console.log, ic = /* @__PURE__ */ function(e) {
6802
6837
  f[e] = [];
6803
6838
  for (let n = 0; n < a; n++) {
6804
6839
  let i = n * u + p, a = e * d + m;
6805
- if (a > r) throw rc(`Warning, there is a problem with the height of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the height of the image.`);
6806
- if (i > t) throw rc(`Warning, there is a problem with the width of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the width of the image.`);
6840
+ if (a > r) throw ac(`Warning, there is a problem with the height of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the height of the image.`);
6841
+ if (i > t) throw ac(`Warning, there is a problem with the width of the "${this.id}" spritesheet. When cutting into frames, the frame exceeds the width of the image.`);
6807
6842
  f[e].push(new C({
6808
6843
  source: l.source,
6809
6844
  frame: new b(i, a, u, d)
@@ -6943,7 +6978,7 @@ var rc = console.log, ic = /* @__PURE__ */ function(e) {
6943
6978
  return e && this.has(e) ? e : this.getFirstAnimationName();
6944
6979
  }
6945
6980
  getMovementAnimationName(e) {
6946
- let t = e ? ic.Walk : ic.Stand;
6981
+ let t = e ? oc.Walk : oc.Stand;
6947
6982
  if (this.has(t)) return t;
6948
6983
  if (this.sheetCurrentAnimation && this.has(this.sheetCurrentAnimation)) return this.sheetCurrentAnimation;
6949
6984
  if (this.currentAnimation?.name && this.has(this.currentAnimation.name)) return this.currentAnimation.name;
@@ -6966,7 +7001,7 @@ var rc = console.log, ic = /* @__PURE__ */ function(e) {
6966
7001
  this.currentAnimationContainer.addChild(t);
6967
7002
  }
6968
7003
  let s = this.currentAnimation.data.sound;
6969
- s && new Ja.Howl({
7004
+ s && new Xa.Howl({
6970
7005
  src: s,
6971
7006
  autoplay: !0,
6972
7007
  loop: !1,
@@ -7036,11 +7071,11 @@ var rc = console.log, ic = /* @__PURE__ */ function(e) {
7036
7071
  return Math.min(1, Math.max(0, e));
7037
7072
  }
7038
7073
  };
7039
- R("Sprite", ac);
7040
- var oc = (e) => (R("Sprite", ac), V("Sprite", e));
7074
+ R("Sprite", sc);
7075
+ var cc = (e) => (R("Sprite", sc), V("Sprite", e));
7041
7076
  //#endregion
7042
7077
  //#region src/components/Video.ts
7043
- function sc(e) {
7078
+ function lc(e) {
7044
7079
  let t = {
7045
7080
  audioprocess: null,
7046
7081
  canplay: null,
@@ -7063,7 +7098,7 @@ function sc(e) {
7063
7098
  timeupdate: null,
7064
7099
  volumechange: null,
7065
7100
  waiting: null
7066
- }, n = N(null), { play: r, loop: i, muted: a } = Ga(e)({
7101
+ }, n = N(null), { play: r, loop: i, muted: a } = qa(e)({
7067
7102
  play: {
7068
7103
  type: Boolean,
7069
7104
  default: !0
@@ -7080,9 +7115,9 @@ function sc(e) {
7080
7115
  return I(() => {
7081
7116
  let e = n(), t = r();
7082
7117
  e && t !== void 0 && (t ? e.play() : e.pause()), e && i() && (e.loop = i()), e && a() && (e.muted = a());
7083
- }), $o(() => () => {
7118
+ }), ts(() => () => {
7084
7119
  for (let e in t) t[e] && n().removeEventListener(e, t[e]);
7085
- }), K(oc, {
7120
+ }), K(cc, {
7086
7121
  ...e,
7087
7122
  image: e.src,
7088
7123
  loader: { onComplete: (r) => {
@@ -7099,7 +7134,7 @@ function sc(e) {
7099
7134
  }
7100
7135
  //#endregion
7101
7136
  //#region ../../node_modules/.pnpm/@chenglou+pretext@0.0.6/node_modules/@chenglou/pretext/dist/generated/bidi-data.js
7102
- var cc = /* @__PURE__ */ "BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L".split("."), lc = [
7137
+ var uc = /* @__PURE__ */ "BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L".split("."), dc = [
7103
7138
  [
7104
7139
  697,
7105
7140
  698,
@@ -10673,11 +10708,11 @@ var cc = /* @__PURE__ */ "BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.B
10673
10708
  ];
10674
10709
  //#endregion
10675
10710
  //#region ../../node_modules/.pnpm/@chenglou+pretext@0.0.6/node_modules/@chenglou/pretext/dist/bidi.js
10676
- function uc(e) {
10677
- if (e <= 255) return cc[e];
10678
- let t = 0, n = lc.length - 1;
10711
+ function fc(e) {
10712
+ if (e <= 255) return uc[e];
10713
+ let t = 0, n = dc.length - 1;
10679
10714
  for (; t <= n;) {
10680
- let r = t + n >> 1, i = lc[r];
10715
+ let r = t + n >> 1, i = dc[r];
10681
10716
  if (e < i[0]) {
10682
10717
  n = r - 1;
10683
10718
  continue;
@@ -10690,7 +10725,7 @@ function uc(e) {
10690
10725
  }
10691
10726
  return "L";
10692
10727
  }
10693
- function dc(e) {
10728
+ function pc(e) {
10694
10729
  let t = e.length;
10695
10730
  if (t === 0) return null;
10696
10731
  let n = Array(t), r = !1;
@@ -10700,7 +10735,7 @@ function dc(e) {
10700
10735
  let t = e.charCodeAt(i + 1);
10701
10736
  t >= 56320 && t <= 57343 && (o = (a - 55296 << 10) + (t - 56320) + 65536, s = 2);
10702
10737
  }
10703
- let c = uc(o);
10738
+ let c = fc(o);
10704
10739
  (c === "R" || c === "AL" || c === "AN") && (r = !0);
10705
10740
  for (let e = 0; e < s; e++) n[i + e] = c;
10706
10741
  i += s;
@@ -10759,8 +10794,8 @@ function dc(e) {
10759
10794
  }
10760
10795
  return a;
10761
10796
  }
10762
- function fc(e, t) {
10763
- let n = dc(e);
10797
+ function mc(e, t) {
10798
+ let n = pc(e);
10764
10799
  if (n === null) return null;
10765
10800
  let r = new Int8Array(t.length);
10766
10801
  for (let e = 0; e < t.length; e++) r[e] = n[t[e]];
@@ -10768,8 +10803,8 @@ function fc(e, t) {
10768
10803
  }
10769
10804
  //#endregion
10770
10805
  //#region ../../node_modules/.pnpm/@chenglou+pretext@0.0.6/node_modules/@chenglou/pretext/dist/analysis.js
10771
- var pc = /[ \t\n\r\f]+/g, mc = /[\t\n\r\f]| {2,}|^ | $/;
10772
- function hc(e) {
10806
+ var hc = /[ \t\n\r\f]+/g, gc = /[\t\n\r\f]| {2,}|^ | $/;
10807
+ function _c(e) {
10773
10808
  let t = e ?? "normal";
10774
10809
  return t === "pre-wrap" ? {
10775
10810
  mode: t,
@@ -10781,63 +10816,63 @@ function hc(e) {
10781
10816
  preserveHardBreaks: !1
10782
10817
  };
10783
10818
  }
10784
- function gc(e) {
10785
- if (!mc.test(e)) return e;
10786
- let t = e.replace(pc, " ");
10819
+ function vc(e) {
10820
+ if (!gc.test(e)) return e;
10821
+ let t = e.replace(hc, " ");
10787
10822
  return t.charCodeAt(0) === 32 && (t = t.slice(1)), t.length > 0 && t.charCodeAt(t.length - 1) === 32 && (t = t.slice(0, -1)), t;
10788
10823
  }
10789
- function _c(e) {
10824
+ function yc(e) {
10790
10825
  return /[\r\f]/.test(e) ? e.replace(/\r\n/g, "\n").replace(/[\r\f]/g, "\n") : e;
10791
10826
  }
10792
- var vc = null, yc;
10793
- function bc() {
10794
- return vc === null && (vc = new Intl.Segmenter(yc, { granularity: "word" })), vc;
10827
+ var bc = null, xc;
10828
+ function Sc() {
10829
+ return bc === null && (bc = new Intl.Segmenter(xc, { granularity: "word" })), bc;
10795
10830
  }
10796
- var xc = /\p{Script=Arabic}/u, Sc = /\p{M}/u, Cc = /\p{Nd}/u;
10797
- function wc(e) {
10798
- return xc.test(e);
10831
+ var Cc = /\p{Script=Arabic}/u, wc = /\p{M}/u, Tc = /\p{Nd}/u;
10832
+ function Ec(e) {
10833
+ return Cc.test(e);
10799
10834
  }
10800
- function Tc(e) {
10835
+ function Dc(e) {
10801
10836
  return e >= 19968 && e <= 40959 || e >= 13312 && e <= 19903 || e >= 131072 && e <= 173791 || e >= 173824 && e <= 177983 || e >= 177984 && e <= 178207 || e >= 178208 && e <= 183983 || e >= 183984 && e <= 191471 || e >= 191472 && e <= 192093 || e >= 194560 && e <= 195103 || e >= 196608 && e <= 201551 || e >= 201552 && e <= 205743 || e >= 205744 && e <= 210041 || e >= 63744 && e <= 64255 || e >= 12288 && e <= 12351 || e >= 12352 && e <= 12447 || e >= 12448 && e <= 12543 || e >= 12592 && e <= 12687 || e >= 44032 && e <= 55215 || e >= 65280 && e <= 65519;
10802
10837
  }
10803
- function Ec(e) {
10838
+ function Oc(e) {
10804
10839
  for (let t = 0; t < e.length; t++) {
10805
10840
  let n = e.charCodeAt(t);
10806
10841
  if (!(n < 12288)) {
10807
10842
  if (n >= 55296 && n <= 56319 && t + 1 < e.length) {
10808
10843
  let r = e.charCodeAt(t + 1);
10809
10844
  if (r >= 56320 && r <= 57343) {
10810
- if (Tc((n - 55296 << 10) + (r - 56320) + 65536)) return !0;
10845
+ if (Dc((n - 55296 << 10) + (r - 56320) + 65536)) return !0;
10811
10846
  t++;
10812
10847
  continue;
10813
10848
  }
10814
10849
  }
10815
- if (Tc(n)) return !0;
10850
+ if (Dc(n)) return !0;
10816
10851
  }
10817
10852
  }
10818
10853
  return !1;
10819
10854
  }
10820
- function Dc(e) {
10821
- let t = Wc(e);
10822
- return t !== null && (Mc.has(t) || Fc.has(t));
10855
+ function kc(e) {
10856
+ let t = Kc(e);
10857
+ return t !== null && (Pc.has(t) || Lc.has(t));
10823
10858
  }
10824
- var Oc = new Set([
10859
+ var Ac = new Set([
10825
10860
  "\xA0",
10826
10861
  " ",
10827
10862
  "⁠",
10828
10863
  ""
10829
10864
  ]);
10830
- function kc(e) {
10831
- return Ec(e);
10865
+ function jc(e) {
10866
+ return Oc(e);
10832
10867
  }
10833
- function Ac(e) {
10834
- let t = Wc(e);
10835
- return t !== null && Oc.has(t);
10868
+ function Mc(e) {
10869
+ let t = Kc(e);
10870
+ return t !== null && Ac.has(t);
10836
10871
  }
10837
- function jc(e) {
10838
- return !Dc(e) && !Ac(e);
10872
+ function Nc(e) {
10873
+ return !kc(e) && !Mc(e);
10839
10874
  }
10840
- var Mc = new Set(/* @__PURE__ */ ",...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ".split(".")), Nc = new Set([
10875
+ var Pc = new Set(/* @__PURE__ */ ",...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ".split(".")), Fc = new Set([
10841
10876
  "\"",
10842
10877
  "(",
10843
10878
  "[",
@@ -10856,12 +10891,12 @@ var Mc = new Set(/* @__PURE__ */ ",...!.:.;.?.、.。.・.).〕.
10856
10891
  "〖",
10857
10892
  "〘",
10858
10893
  "〚"
10859
- ]), Pc = new Set(["'", "’"]), Fc = new Set(/* @__PURE__ */ ".(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%(\"(”(’(»(›(…".split("(")), Ic = new Set([
10894
+ ]), Ic = new Set(["'", "’"]), Lc = new Set(/* @__PURE__ */ ".(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%(\"(”(’(»(›(…".split("(")), Rc = new Set([
10860
10895
  ":",
10861
10896
  ".",
10862
10897
  "،",
10863
10898
  "؛"
10864
- ]), Lc = new Set(["၏"]), Rc = new Set([
10899
+ ]), zc = new Set(["၏"]), Bc = new Set([
10865
10900
  "”",
10866
10901
  "’",
10867
10902
  "»",
@@ -10874,31 +10909,31 @@ var Mc = new Set(/* @__PURE__ */ ",...!.:.;.?.、.。.・.).〕.
10874
10909
  "〕",
10875
10910
  ")"
10876
10911
  ]);
10877
- function zc(e) {
10878
- if (Hc(e)) return !0;
10912
+ function Vc(e) {
10913
+ if (Wc(e)) return !0;
10879
10914
  let t = !1;
10880
10915
  for (let n of e) {
10881
- if (Fc.has(n)) {
10916
+ if (Lc.has(n)) {
10882
10917
  t = !0;
10883
10918
  continue;
10884
10919
  }
10885
- if (!(t && Sc.test(n))) return !1;
10920
+ if (!(t && wc.test(n))) return !1;
10886
10921
  }
10887
10922
  return t;
10888
10923
  }
10889
- function Bc(e) {
10890
- for (let t of e) if (!Mc.has(t) && !Fc.has(t)) return !1;
10924
+ function Hc(e) {
10925
+ for (let t of e) if (!Pc.has(t) && !Lc.has(t)) return !1;
10891
10926
  return e.length > 0;
10892
10927
  }
10893
- function Vc(e) {
10894
- if (Hc(e)) return !0;
10895
- for (let t of e) if (!Nc.has(t) && !Pc.has(t) && !Sc.test(t)) return !1;
10928
+ function Uc(e) {
10929
+ if (Wc(e)) return !0;
10930
+ for (let t of e) if (!Fc.has(t) && !Ic.has(t) && !wc.test(t)) return !1;
10896
10931
  return e.length > 0;
10897
10932
  }
10898
- function Hc(e) {
10933
+ function Wc(e) {
10899
10934
  let t = !1;
10900
- for (let n of e) if (!(n === "\\" || Sc.test(n))) {
10901
- if (Nc.has(n) || Fc.has(n) || Pc.has(n)) {
10935
+ for (let n of e) if (!(n === "\\" || wc.test(n))) {
10936
+ if (Fc.has(n) || Lc.has(n) || Ic.has(n)) {
10902
10937
  t = !0;
10903
10938
  continue;
10904
10939
  }
@@ -10906,7 +10941,7 @@ function Hc(e) {
10906
10941
  }
10907
10942
  return t;
10908
10943
  }
10909
- function Uc(e, t) {
10944
+ function Gc(e, t) {
10910
10945
  let n = t - 1;
10911
10946
  if (n <= 0) return Math.max(n, 0);
10912
10947
  let r = e.charCodeAt(n);
@@ -10916,20 +10951,20 @@ function Uc(e, t) {
10916
10951
  let a = e.charCodeAt(i);
10917
10952
  return a >= 55296 && a <= 56319 ? i : n;
10918
10953
  }
10919
- function Wc(e) {
10954
+ function Kc(e) {
10920
10955
  if (e.length === 0) return null;
10921
- let t = Uc(e, e.length);
10956
+ let t = Gc(e, e.length);
10922
10957
  return e.slice(t);
10923
10958
  }
10924
- function Gc(e) {
10959
+ function qc(e) {
10925
10960
  let t = Array.from(e), n = t.length;
10926
10961
  for (; n > 0;) {
10927
10962
  let e = t[n - 1];
10928
- if (Sc.test(e)) {
10963
+ if (wc.test(e)) {
10929
10964
  n--;
10930
10965
  continue;
10931
10966
  }
10932
- if (Nc.has(e) || Pc.has(e)) {
10967
+ if (Fc.has(e) || Ic.has(e)) {
10933
10968
  n--;
10934
10969
  continue;
10935
10970
  }
@@ -10940,10 +10975,10 @@ function Gc(e) {
10940
10975
  tail: t.slice(n).join("")
10941
10976
  };
10942
10977
  }
10943
- function Kc(e, t, n) {
10978
+ function Jc(e, t, n) {
10944
10979
  return n === "text" && !t && e.length === 1 && e !== "-" && e !== "—" ? e : null;
10945
10980
  }
10946
- function qc(e, t, n, r) {
10981
+ function Yc(e, t, n, r) {
10947
10982
  let i = t[r], a = e[r];
10948
10983
  if (i == null) return a;
10949
10984
  let o = n[r];
@@ -10951,14 +10986,14 @@ function qc(e, t, n, r) {
10951
10986
  let s = i.repeat(o);
10952
10987
  return e[r] = s, s;
10953
10988
  }
10954
- function Jc(e, t) {
10955
- return e && t !== null && Ic.has(t);
10989
+ function Xc(e, t) {
10990
+ return e && t !== null && Rc.has(t);
10956
10991
  }
10957
- function Yc(e) {
10958
- let t = Wc(e);
10959
- return t !== null && Lc.has(t);
10992
+ function Zc(e) {
10993
+ let t = Kc(e);
10994
+ return t !== null && zc.has(t);
10960
10995
  }
10961
- function Xc(e) {
10996
+ function Qc(e) {
10962
10997
  if (e.length < 2 || e[0] !== " ") return null;
10963
10998
  let t = e.slice(1);
10964
10999
  return /^\p{M}+$/u.test(t) ? {
@@ -10966,17 +11001,17 @@ function Xc(e) {
10966
11001
  marks: t
10967
11002
  } : null;
10968
11003
  }
10969
- function Zc(e) {
11004
+ function $c(e) {
10970
11005
  let t = e.length;
10971
11006
  for (; t > 0;) {
10972
- let n = Uc(e, t), r = e.slice(n, t);
10973
- if (Rc.has(r)) return !0;
10974
- if (!Fc.has(r)) return !1;
11007
+ let n = Gc(e, t), r = e.slice(n, t);
11008
+ if (Bc.has(r)) return !0;
11009
+ if (!Lc.has(r)) return !1;
10975
11010
  t = n;
10976
11011
  }
10977
11012
  return !1;
10978
11013
  }
10979
- function Qc(e, t) {
11014
+ function el(e, t) {
10980
11015
  if (t.preserveOrdinarySpaces || t.preserveHardBreaks) {
10981
11016
  if (e === " ") return "preserved-space";
10982
11017
  if (e === " ") return "tab";
@@ -10984,17 +11019,17 @@ function Qc(e, t) {
10984
11019
  }
10985
11020
  return e === " " ? "space" : e === "\xA0" || e === " " || e === "⁠" || e === "" ? "glue" : e === "​" ? "zero-width-break" : e === "­" ? "soft-hyphen" : "text";
10986
11021
  }
10987
- var $c = /[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;
11022
+ var tl = /[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;
10988
11023
  function Y(e) {
10989
11024
  return e.length === 1 ? e[0] : e.join("");
10990
11025
  }
10991
- function el(e, t) {
11026
+ function nl(e, t) {
10992
11027
  let n = [];
10993
11028
  for (let t = e.length - 1; t >= 0; t--) n.push(e[t]);
10994
11029
  return n.push(t), Y(n);
10995
11030
  }
10996
- function tl(e, t, n, r) {
10997
- if (!$c.test(e)) return [{
11031
+ function rl(e, t, n, r) {
11032
+ if (!tl.test(e)) return [{
10998
11033
  text: e,
10999
11034
  isWordLike: t,
11000
11035
  kind: "text",
@@ -11002,7 +11037,7 @@ function tl(e, t, n, r) {
11002
11037
  }];
11003
11038
  let i = [], a = null, o = [], s = n, c = !1, l = 0;
11004
11039
  for (let u of e) {
11005
- let e = Qc(u, r), d = e === "text" && t;
11040
+ let e = el(u, r), d = e === "text" && t;
11006
11041
  if (a !== null && e === a && d === c) {
11007
11042
  o.push(u), l += u.length;
11008
11043
  continue;
@@ -11021,23 +11056,23 @@ function tl(e, t, n, r) {
11021
11056
  start: s
11022
11057
  }), i;
11023
11058
  }
11024
- function nl(e) {
11059
+ function il(e) {
11025
11060
  return e === "space" || e === "preserved-space" || e === "zero-width-break" || e === "hard-break";
11026
11061
  }
11027
- var rl = /^[A-Za-z][A-Za-z0-9+.-]*:$/;
11028
- function il(e, t) {
11062
+ var al = /^[A-Za-z][A-Za-z0-9+.-]*:$/;
11063
+ function ol(e, t) {
11029
11064
  let n = e.texts[t];
11030
- return n.startsWith("www.") ? !0 : rl.test(n) && t + 1 < e.len && e.kinds[t + 1] === "text" && e.texts[t + 1] === "//";
11065
+ return n.startsWith("www.") ? !0 : al.test(n) && t + 1 < e.len && e.kinds[t + 1] === "text" && e.texts[t + 1] === "//";
11031
11066
  }
11032
- function al(e) {
11067
+ function sl(e) {
11033
11068
  return e.includes("?") && (e.includes("://") || e.startsWith("www."));
11034
11069
  }
11035
- function ol(e) {
11070
+ function cl(e) {
11036
11071
  let t = e.texts.slice(), n = e.isWordLike.slice(), r = e.kinds.slice(), i = e.starts.slice();
11037
11072
  for (let i = 0; i < e.len; i++) {
11038
- if (r[i] !== "text" || !il(e, i)) continue;
11073
+ if (r[i] !== "text" || !ol(e, i)) continue;
11039
11074
  let a = [t[i]], o = i + 1;
11040
- for (; o < e.len && !nl(r[o]);) {
11075
+ for (; o < e.len && !il(r[o]);) {
11041
11076
  a.push(t[o]), n[i] = !0;
11042
11077
  let e = t[o].includes("?");
11043
11078
  if (r[o] = "text", t[o] = "", o++, e) break;
@@ -11057,15 +11092,15 @@ function ol(e) {
11057
11092
  starts: i
11058
11093
  };
11059
11094
  }
11060
- function sl(e) {
11095
+ function ll(e) {
11061
11096
  let t = [], n = [], r = [], i = [];
11062
11097
  for (let a = 0; a < e.len; a++) {
11063
11098
  let o = e.texts[a];
11064
- if (t.push(o), n.push(e.isWordLike[a]), r.push(e.kinds[a]), i.push(e.starts[a]), !al(o)) continue;
11099
+ if (t.push(o), n.push(e.isWordLike[a]), r.push(e.kinds[a]), i.push(e.starts[a]), !sl(o)) continue;
11065
11100
  let s = a + 1;
11066
- if (s >= e.len || nl(e.kinds[s])) continue;
11101
+ if (s >= e.len || il(e.kinds[s])) continue;
11067
11102
  let c = [], l = e.starts[s], u = s;
11068
- for (; u < e.len && !nl(e.kinds[u]);) c.push(e.texts[u]), u++;
11103
+ for (; u < e.len && !il(e.kinds[u]);) c.push(e.texts[u]), u++;
11069
11104
  c.length > 0 && (t.push(Y(c)), n.push(!0), r.push("text"), i.push(l), a = u - 1);
11070
11105
  }
11071
11106
  return {
@@ -11076,7 +11111,7 @@ function sl(e) {
11076
11111
  starts: i
11077
11112
  };
11078
11113
  }
11079
- var cl = new Set([
11114
+ var ul = new Set([
11080
11115
  ":",
11081
11116
  "-",
11082
11117
  "/",
@@ -11086,23 +11121,23 @@ var cl = new Set([
11086
11121
  "+",
11087
11122
  "–",
11088
11123
  "—"
11089
- ]), ll = /^[A-Za-z0-9_]+[,:;]*$/, ul = /[,:;]+$/;
11090
- function dl(e) {
11091
- for (let t of e) if (Cc.test(t)) return !0;
11124
+ ]), dl = /^[A-Za-z0-9_]+[,:;]*$/, fl = /[,:;]+$/;
11125
+ function pl(e) {
11126
+ for (let t of e) if (Tc.test(t)) return !0;
11092
11127
  return !1;
11093
11128
  }
11094
- function fl(e) {
11129
+ function ml(e) {
11095
11130
  if (e.length === 0) return !1;
11096
- for (let t of e) if (!(Cc.test(t) || cl.has(t))) return !1;
11131
+ for (let t of e) if (!(Tc.test(t) || ul.has(t))) return !1;
11097
11132
  return !0;
11098
11133
  }
11099
- function pl(e) {
11134
+ function hl(e) {
11100
11135
  let t = [], n = [], r = [], i = [];
11101
11136
  for (let a = 0; a < e.len; a++) {
11102
11137
  let o = e.texts[a], s = e.kinds[a];
11103
- if (s === "text" && fl(o) && dl(o)) {
11138
+ if (s === "text" && ml(o) && pl(o)) {
11104
11139
  let s = [o], c = a + 1;
11105
- for (; c < e.len && e.kinds[c] === "text" && fl(e.texts[c]);) s.push(e.texts[c]), c++;
11140
+ for (; c < e.len && e.kinds[c] === "text" && ml(e.texts[c]);) s.push(e.texts[c]), c++;
11106
11141
  t.push(Y(s)), n.push(!0), r.push("text"), i.push(e.starts[a]), a = c - 1;
11107
11142
  continue;
11108
11143
  }
@@ -11116,15 +11151,15 @@ function pl(e) {
11116
11151
  starts: i
11117
11152
  };
11118
11153
  }
11119
- function ml(e) {
11154
+ function gl(e) {
11120
11155
  let t = [], n = [], r = [], i = [];
11121
11156
  for (let a = 0; a < e.len; a++) {
11122
11157
  let o = e.texts[a], s = e.kinds[a], c = e.isWordLike[a];
11123
- if (s === "text" && c && ll.test(o)) {
11124
- let s = [o], c = ul.test(o), l = a + 1;
11125
- for (; c && l < e.len && e.kinds[l] === "text" && e.isWordLike[l] && ll.test(e.texts[l]);) {
11158
+ if (s === "text" && c && dl.test(o)) {
11159
+ let s = [o], c = fl.test(o), l = a + 1;
11160
+ for (; c && l < e.len && e.kinds[l] === "text" && e.isWordLike[l] && dl.test(e.texts[l]);) {
11126
11161
  let t = e.texts[l];
11127
- s.push(t), c = ul.test(t), l++;
11162
+ s.push(t), c = fl.test(t), l++;
11128
11163
  }
11129
11164
  t.push(Y(s)), n.push(!0), r.push("text"), i.push(e.starts[a]), a = l - 1;
11130
11165
  continue;
@@ -11139,7 +11174,7 @@ function ml(e) {
11139
11174
  starts: i
11140
11175
  };
11141
11176
  }
11142
- function hl(e) {
11177
+ function _l(e) {
11143
11178
  let t = [], n = [], r = [], i = [];
11144
11179
  for (let a = 0; a < e.len; a++) {
11145
11180
  let o = e.texts[a];
@@ -11148,7 +11183,7 @@ function hl(e) {
11148
11183
  for (let e = 0; e < s.length; e++) {
11149
11184
  let t = s[e];
11150
11185
  if (!c) break;
11151
- (t.length === 0 || !dl(t) || !fl(t)) && (c = !1);
11186
+ (t.length === 0 || !pl(t) || !ml(t)) && (c = !1);
11152
11187
  }
11153
11188
  if (c) {
11154
11189
  let o = 0;
@@ -11169,7 +11204,7 @@ function hl(e) {
11169
11204
  starts: i
11170
11205
  };
11171
11206
  }
11172
- function gl(e) {
11207
+ function vl(e) {
11173
11208
  let t = [], n = [], r = [], i = [], a = 0;
11174
11209
  for (; a < e.len;) {
11175
11210
  let o = [e.texts[a]], s = e.isWordLike[a], c = e.kinds[a], l = e.starts[a];
@@ -11203,11 +11238,11 @@ function gl(e) {
11203
11238
  starts: i
11204
11239
  };
11205
11240
  }
11206
- function _l(e) {
11241
+ function yl(e) {
11207
11242
  let t = e.texts.slice(), n = e.isWordLike.slice(), r = e.kinds.slice(), i = e.starts.slice();
11208
11243
  for (let e = 0; e < t.length - 1; e++) {
11209
- if (r[e] !== "text" || r[e + 1] !== "text" || !Ec(t[e]) || !Ec(t[e + 1])) continue;
11210
- let n = Gc(t[e]);
11244
+ if (r[e] !== "text" || r[e + 1] !== "text" || !Oc(t[e]) || !Oc(t[e + 1])) continue;
11245
+ let n = qc(t[e]);
11211
11246
  n !== null && (t[e] = n.head, t[e + 1] = n.tail + t[e + 1], i[e + 1] = i[e] + n.head.length);
11212
11247
  }
11213
11248
  return {
@@ -11218,28 +11253,28 @@ function _l(e) {
11218
11253
  starts: i
11219
11254
  };
11220
11255
  }
11221
- function vl(e, t, n) {
11222
- let r = bc(), i = 0, a = [], o = [], s = [], c = [], l = [], u = [], d = [], f = [], p = [], m = [], h = [], g = [];
11223
- for (let _ of r.segment(e)) for (let e of tl(_.segment, _.isWordLike ?? !1, _.index, n)) {
11224
- let n = e.kind === "text", r = Kc(e.text, e.isWordLike, e.kind), _ = Ec(e.text), v = wc(e.text), y = Wc(e.text), b = Zc(e.text), x = Yc(e.text), S = i - 1;
11256
+ function bl(e, t, n) {
11257
+ let r = Sc(), i = 0, a = [], o = [], s = [], c = [], l = [], u = [], d = [], f = [], p = [], m = [], h = [], g = [];
11258
+ for (let _ of r.segment(e)) for (let e of rl(_.segment, _.isWordLike ?? !1, _.index, n)) {
11259
+ let n = e.kind === "text", r = Jc(e.text, e.isWordLike, e.kind), _ = Oc(e.text), v = Ec(e.text), y = Kc(e.text), b = $c(e.text), x = Zc(e.text), S = i - 1;
11225
11260
  function C() {
11226
- u[S] !== null && (o[S] = [qc(a, u, d, S)], u[S] = null), o[S].push(e.text), s[S] = s[S] || e.isWordLike, f[S] = f[S] || _, p[S] = p[S] || v, m[S] = b, h[S] = x, g[S] = Jc(p[S], y);
11261
+ u[S] !== null && (o[S] = [Yc(a, u, d, S)], u[S] = null), o[S].push(e.text), s[S] = s[S] || e.isWordLike, f[S] = f[S] || _, p[S] = p[S] || v, m[S] = b, h[S] = x, g[S] = Xc(p[S], y);
11227
11262
  }
11228
- t.carryCJKAfterClosingQuote && n && i > 0 && c[S] === "text" && _ && f[S] && m[S] || n && i > 0 && c[S] === "text" && Bc(e.text) && f[S] || n && i > 0 && c[S] === "text" && h[S] ? C() : n && i > 0 && c[S] === "text" && e.isWordLike && v && g[S] ? (C(), s[S] = !0) : r !== null && i > 0 && c[S] === "text" && u[S] === r ? d[S] = (d[S] ?? 1) + 1 : n && !e.isWordLike && i > 0 && c[S] === "text" && !f[S] && (zc(e.text) || e.text === "-" && s[S]) ? C() : (a[i] = e.text, o[i] = [e.text], s[i] = e.isWordLike, c[i] = e.kind, l[i] = e.start, u[i] = r, d[i] = r === null ? 0 : 1, f[i] = _, p[i] = v, m[i] = b, h[i] = x, g[i] = Jc(v, y), i++);
11263
+ t.carryCJKAfterClosingQuote && n && i > 0 && c[S] === "text" && _ && f[S] && m[S] || n && i > 0 && c[S] === "text" && Hc(e.text) && f[S] || n && i > 0 && c[S] === "text" && h[S] ? C() : n && i > 0 && c[S] === "text" && e.isWordLike && v && g[S] ? (C(), s[S] = !0) : r !== null && i > 0 && c[S] === "text" && u[S] === r ? d[S] = (d[S] ?? 1) + 1 : n && !e.isWordLike && i > 0 && c[S] === "text" && !f[S] && (Vc(e.text) || e.text === "-" && s[S]) ? C() : (a[i] = e.text, o[i] = [e.text], s[i] = e.isWordLike, c[i] = e.kind, l[i] = e.start, u[i] = r, d[i] = r === null ? 0 : 1, f[i] = _, p[i] = v, m[i] = b, h[i] = x, g[i] = Xc(v, y), i++);
11229
11264
  }
11230
11265
  for (let e = 0; e < i; e++) {
11231
11266
  if (u[e] !== null) {
11232
- a[e] = qc(a, u, d, e);
11267
+ a[e] = Yc(a, u, d, e);
11233
11268
  continue;
11234
11269
  }
11235
11270
  a[e] = Y(o[e]);
11236
11271
  }
11237
- for (let e = 1; e < i; e++) c[e] === "text" && !s[e] && Hc(a[e]) && c[e - 1] === "text" && !f[e - 1] && (a[e - 1] += a[e], s[e - 1] = s[e - 1] || s[e], a[e] = "");
11272
+ for (let e = 1; e < i; e++) c[e] === "text" && !s[e] && Wc(a[e]) && c[e - 1] === "text" && !f[e - 1] && (a[e - 1] += a[e], s[e - 1] = s[e - 1] || s[e], a[e] = "");
11238
11273
  let _ = Array.from({ length: i }, () => null), v = -1;
11239
11274
  for (let e = i - 1; e >= 0; e--) {
11240
11275
  let t = a[e];
11241
11276
  if (t.length !== 0) {
11242
- if (c[e] === "text" && !s[e] && Vc(t) && v >= 0 && c[v] === "text") {
11277
+ if (c[e] === "text" && !s[e] && Uc(t) && v >= 0 && c[v] === "text") {
11243
11278
  let n = _[v] ?? [];
11244
11279
  n.push(t), _[v] = n, l[v] = l[e], a[e] = "";
11245
11280
  continue;
@@ -11249,7 +11284,7 @@ function vl(e, t, n) {
11249
11284
  }
11250
11285
  for (let e = 0; e < i; e++) {
11251
11286
  let t = _[e];
11252
- t != null && (a[e] = el(t, a[e]));
11287
+ t != null && (a[e] = nl(t, a[e]));
11253
11288
  }
11254
11289
  let y = 0;
11255
11290
  for (let e = 0; e < i; e++) {
@@ -11257,7 +11292,7 @@ function vl(e, t, n) {
11257
11292
  t.length !== 0 && (y !== e && (a[y] = t, s[y] = s[e], c[y] = c[e], l[y] = l[e]), y++);
11258
11293
  }
11259
11294
  a.length = y, s.length = y, c.length = y, l.length = y;
11260
- let b = _l(ml(hl(pl(sl(ol(gl({
11295
+ let b = yl(gl(_l(hl(ll(cl(vl({
11261
11296
  len: y,
11262
11297
  texts: a,
11263
11298
  isWordLike: s,
@@ -11265,12 +11300,12 @@ function vl(e, t, n) {
11265
11300
  starts: l
11266
11301
  })))))));
11267
11302
  for (let e = 0; e < b.len - 1; e++) {
11268
- let t = Xc(b.texts[e]);
11269
- t !== null && (b.kinds[e] !== "space" && b.kinds[e] !== "preserved-space" || b.kinds[e + 1] !== "text" || !wc(b.texts[e + 1]) || (b.texts[e] = t.space, b.isWordLike[e] = !1, b.kinds[e] = b.kinds[e] === "preserved-space" ? "preserved-space" : "space", b.texts[e + 1] = t.marks + b.texts[e + 1], b.starts[e + 1] = b.starts[e] + t.space.length));
11303
+ let t = Qc(b.texts[e]);
11304
+ t !== null && (b.kinds[e] !== "space" && b.kinds[e] !== "preserved-space" || b.kinds[e + 1] !== "text" || !Ec(b.texts[e + 1]) || (b.texts[e] = t.space, b.isWordLike[e] = !1, b.kinds[e] = b.kinds[e] === "preserved-space" ? "preserved-space" : "space", b.texts[e + 1] = t.marks + b.texts[e + 1], b.starts[e + 1] = b.starts[e] + t.space.length));
11270
11305
  }
11271
11306
  return b;
11272
11307
  }
11273
- function yl(e, t) {
11308
+ function xl(e, t) {
11274
11309
  if (e.len === 0) return [];
11275
11310
  if (!t.preserveHardBreaks) return [{
11276
11311
  startSegmentIndex: 0,
@@ -11289,7 +11324,7 @@ function yl(e, t) {
11289
11324
  consumedEndSegmentIndex: e.len
11290
11325
  }), n;
11291
11326
  }
11292
- function bl(e) {
11327
+ function Sl(e) {
11293
11328
  if (e.len <= 1) return e;
11294
11329
  let t = [], n = [], r = [], i = [], a = null, o = !1, s = 0, c = !1, l = !1;
11295
11330
  function u() {
@@ -11298,7 +11333,7 @@ function bl(e) {
11298
11333
  for (let d = 0; d < e.len; d++) {
11299
11334
  let f = e.texts[d], p = e.kinds[d], m = e.isWordLike[d], h = e.starts[d];
11300
11335
  if (p === "text") {
11301
- let e = kc(f), t = jc(f);
11336
+ let e = jc(f), t = Nc(f);
11302
11337
  if (a !== null && c && l) {
11303
11338
  a.push(f), o ||= m, c ||= e, l = t;
11304
11339
  continue;
@@ -11316,8 +11351,8 @@ function bl(e) {
11316
11351
  starts: i
11317
11352
  };
11318
11353
  }
11319
- function xl(e, t, n = "normal", r = "normal") {
11320
- let i = hc(n), a = i.mode === "pre-wrap" ? _c(e) : gc(e);
11354
+ function Cl(e, t, n = "normal", r = "normal") {
11355
+ let i = _c(n), a = i.mode === "pre-wrap" ? yc(e) : vc(e);
11321
11356
  if (a.length === 0) return {
11322
11357
  normalized: a,
11323
11358
  chunks: [],
@@ -11327,66 +11362,66 @@ function xl(e, t, n = "normal", r = "normal") {
11327
11362
  kinds: [],
11328
11363
  starts: []
11329
11364
  };
11330
- let o = r === "keep-all" ? bl(vl(a, t, i)) : vl(a, t, i);
11365
+ let o = r === "keep-all" ? Sl(bl(a, t, i)) : bl(a, t, i);
11331
11366
  return {
11332
11367
  normalized: a,
11333
- chunks: yl(o, i),
11368
+ chunks: xl(o, i),
11334
11369
  ...o
11335
11370
  };
11336
11371
  }
11337
11372
  //#endregion
11338
11373
  //#region ../../node_modules/.pnpm/@chenglou+pretext@0.0.6/node_modules/@chenglou/pretext/dist/measurement.js
11339
- var Sl = null, Cl = /* @__PURE__ */ new Map(), wl = null, Tl = 96, El = /\p{Emoji_Presentation}/u, Dl = /[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u, Ol = null, kl = /* @__PURE__ */ new Map();
11340
- function Al() {
11341
- if (Sl !== null) return Sl;
11342
- if (typeof OffscreenCanvas < "u") return Sl = new OffscreenCanvas(1, 1).getContext("2d"), Sl;
11343
- if (typeof document < "u") return Sl = document.createElement("canvas").getContext("2d"), Sl;
11374
+ var wl = null, Tl = /* @__PURE__ */ new Map(), El = null, Dl = 96, Ol = /\p{Emoji_Presentation}/u, kl = /[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u, Al = null, jl = /* @__PURE__ */ new Map();
11375
+ function Ml() {
11376
+ if (wl !== null) return wl;
11377
+ if (typeof OffscreenCanvas < "u") return wl = new OffscreenCanvas(1, 1).getContext("2d"), wl;
11378
+ if (typeof document < "u") return wl = document.createElement("canvas").getContext("2d"), wl;
11344
11379
  throw Error("Text measurement requires OffscreenCanvas or a DOM canvas context.");
11345
11380
  }
11346
- function jl(e) {
11347
- let t = Cl.get(e);
11348
- return t || (t = /* @__PURE__ */ new Map(), Cl.set(e, t)), t;
11381
+ function Nl(e) {
11382
+ let t = Tl.get(e);
11383
+ return t || (t = /* @__PURE__ */ new Map(), Tl.set(e, t)), t;
11349
11384
  }
11350
- function Ml(e, t) {
11385
+ function Pl(e, t) {
11351
11386
  let n = t.get(e);
11352
11387
  return n === void 0 && (n = {
11353
- width: Al().measureText(e).width,
11354
- containsCJK: Ec(e)
11388
+ width: Ml().measureText(e).width,
11389
+ containsCJK: Oc(e)
11355
11390
  }, t.set(e, n)), n;
11356
11391
  }
11357
- function Nl() {
11358
- if (wl !== null) return wl;
11359
- if (typeof navigator > "u") return wl = {
11392
+ function Fl() {
11393
+ if (El !== null) return El;
11394
+ if (typeof navigator > "u") return El = {
11360
11395
  lineFitEpsilon: .005,
11361
11396
  carryCJKAfterClosingQuote: !1,
11362
11397
  preferPrefixWidthsForBreakableRuns: !1,
11363
11398
  preferEarlySoftHyphenBreak: !1
11364
- }, wl;
11399
+ }, El;
11365
11400
  let e = navigator.userAgent, t = navigator.vendor === "Apple Computer, Inc." && e.includes("Safari/") && !e.includes("Chrome/") && !e.includes("Chromium/") && !e.includes("CriOS/") && !e.includes("FxiOS/") && !e.includes("EdgiOS/"), n = e.includes("Chrome/") || e.includes("Chromium/") || e.includes("CriOS/") || e.includes("Edg/");
11366
- return wl = {
11401
+ return El = {
11367
11402
  lineFitEpsilon: t ? 1 / 64 : .005,
11368
11403
  carryCJKAfterClosingQuote: n,
11369
11404
  preferPrefixWidthsForBreakableRuns: t,
11370
11405
  preferEarlySoftHyphenBreak: t
11371
- }, wl;
11406
+ }, El;
11372
11407
  }
11373
- function Pl(e) {
11408
+ function Il(e) {
11374
11409
  let t = e.match(/(\d+(?:\.\d+)?)\s*px/);
11375
11410
  return t ? parseFloat(t[1]) : 16;
11376
11411
  }
11377
- function Fl() {
11378
- return Ol === null && (Ol = new Intl.Segmenter(void 0, { granularity: "grapheme" })), Ol;
11412
+ function Ll() {
11413
+ return Al === null && (Al = new Intl.Segmenter(void 0, { granularity: "grapheme" })), Al;
11379
11414
  }
11380
- function Il(e) {
11381
- return El.test(e) || e.includes("️");
11415
+ function Rl(e) {
11416
+ return Ol.test(e) || e.includes("️");
11382
11417
  }
11383
- function Ll(e) {
11384
- return Dl.test(e);
11418
+ function zl(e) {
11419
+ return kl.test(e);
11385
11420
  }
11386
- function Rl(e, t) {
11387
- let n = kl.get(e);
11421
+ function Bl(e, t) {
11422
+ let n = jl.get(e);
11388
11423
  if (n !== void 0) return n;
11389
- let r = Al();
11424
+ let r = Ml();
11390
11425
  r.font = e;
11391
11426
  let i = r.measureText("😀").width;
11392
11427
  if (n = 0, i > t + .5 && typeof document < "u" && document.body !== null) {
@@ -11395,41 +11430,41 @@ function Rl(e, t) {
11395
11430
  let r = t.getBoundingClientRect().width;
11396
11431
  document.body.removeChild(t), i - r > .5 && (n = i - r);
11397
11432
  }
11398
- return kl.set(e, n), n;
11433
+ return jl.set(e, n), n;
11399
11434
  }
11400
- function zl(e) {
11401
- let t = 0, n = Fl();
11402
- for (let r of n.segment(e)) Il(r.segment) && t++;
11435
+ function Vl(e) {
11436
+ let t = 0, n = Ll();
11437
+ for (let r of n.segment(e)) Rl(r.segment) && t++;
11403
11438
  return t;
11404
11439
  }
11405
- function Bl(e, t) {
11406
- return t.emojiCount === void 0 && (t.emojiCount = zl(e)), t.emojiCount;
11440
+ function Hl(e, t) {
11441
+ return t.emojiCount === void 0 && (t.emojiCount = Vl(e)), t.emojiCount;
11407
11442
  }
11408
- function Vl(e, t, n) {
11409
- return n === 0 ? t.width : t.width - Bl(e, t) * n;
11443
+ function Ul(e, t, n) {
11444
+ return n === 0 ? t.width : t.width - Hl(e, t) * n;
11410
11445
  }
11411
- function Hl(e, t, n, r, i) {
11446
+ function Wl(e, t, n, r, i) {
11412
11447
  if (t.breakableFitAdvances !== void 0 && t.breakableFitMode === i) return t.breakableFitAdvances;
11413
11448
  t.breakableFitMode = i;
11414
- let a = Fl(), o = [];
11449
+ let a = Ll(), o = [];
11415
11450
  for (let t of a.segment(e)) o.push(t.segment);
11416
11451
  if (o.length <= 1) return t.breakableFitAdvances = null, t.breakableFitAdvances;
11417
11452
  if (i === "sum-graphemes") {
11418
11453
  let e = [];
11419
11454
  for (let t of o) {
11420
- let i = Ml(t, n);
11421
- e.push(Vl(t, i, r));
11455
+ let i = Pl(t, n);
11456
+ e.push(Ul(t, i, r));
11422
11457
  }
11423
11458
  return t.breakableFitAdvances = e, t.breakableFitAdvances;
11424
11459
  }
11425
- if (i === "pair-context" || o.length > Tl) {
11460
+ if (i === "pair-context" || o.length > Dl) {
11426
11461
  let e = [], i = null, a = 0;
11427
11462
  for (let t of o) {
11428
- let o = Vl(t, Ml(t, n), r);
11463
+ let o = Ul(t, Pl(t, n), r);
11429
11464
  if (i === null) e.push(o);
11430
11465
  else {
11431
- let o = i + t, s = Ml(o, n);
11432
- e.push(Vl(o, s, r) - a);
11466
+ let o = i + t, s = Pl(o, n);
11467
+ e.push(Ul(o, s, r) - a);
11433
11468
  }
11434
11469
  i = t, a = o;
11435
11470
  }
@@ -11438,67 +11473,67 @@ function Hl(e, t, n, r, i) {
11438
11473
  let s = [], c = "", l = 0;
11439
11474
  for (let e of o) {
11440
11475
  c += e;
11441
- let t = Ml(c, n), i = Vl(c, t, r);
11476
+ let t = Pl(c, n), i = Ul(c, t, r);
11442
11477
  s.push(i - l), l = i;
11443
11478
  }
11444
11479
  return t.breakableFitAdvances = s, t.breakableFitAdvances;
11445
11480
  }
11446
- function Ul(e, t) {
11447
- let n = Al();
11481
+ function Gl(e, t) {
11482
+ let n = Ml();
11448
11483
  n.font = e;
11449
- let r = jl(e), i = Pl(e);
11484
+ let r = Nl(e), i = Il(e);
11450
11485
  return {
11451
11486
  cache: r,
11452
11487
  fontSize: i,
11453
- emojiCorrection: t ? Rl(e, i) : 0
11488
+ emojiCorrection: t ? Bl(e, i) : 0
11454
11489
  };
11455
11490
  }
11456
11491
  //#endregion
11457
11492
  //#region ../../node_modules/.pnpm/@chenglou+pretext@0.0.6/node_modules/@chenglou/pretext/dist/line-break.js
11458
- function Wl(e) {
11493
+ function Kl(e) {
11459
11494
  return e === "space" || e === "zero-width-break" || e === "soft-hyphen";
11460
11495
  }
11461
- function Gl(e) {
11496
+ function ql(e) {
11462
11497
  return e === "space" || e === "preserved-space" || e === "tab" || e === "zero-width-break" || e === "soft-hyphen";
11463
11498
  }
11464
- function Kl(e, t, n = e.widths.length) {
11499
+ function Jl(e, t, n = e.widths.length) {
11465
11500
  for (; t < n;) {
11466
11501
  let n = e.kinds[t];
11467
- if (!Wl(n)) break;
11502
+ if (!Kl(n)) break;
11468
11503
  t++;
11469
11504
  }
11470
11505
  return t;
11471
11506
  }
11472
- function ql(e, t) {
11507
+ function Yl(e, t) {
11473
11508
  if (t <= 0) return 0;
11474
11509
  let n = e % t;
11475
11510
  return Math.abs(n) <= 1e-6 ? t : t - n;
11476
11511
  }
11477
- function Jl(e, t, n) {
11512
+ function Xl(e, t, n) {
11478
11513
  return e.letterSpacing !== 0 && t && e.spacingGraphemeCounts[n] > 0 ? e.letterSpacing : 0;
11479
11514
  }
11480
- function Yl(e, t) {
11515
+ function Zl(e, t) {
11481
11516
  return t === 0 ? 0 : e + t;
11482
11517
  }
11483
- function Xl(e, t) {
11518
+ function Ql(e, t) {
11484
11519
  return e.letterSpacing !== 0 && e.spacingGraphemeCounts[t] > 0 ? e.letterSpacing : 0;
11485
11520
  }
11486
- function Zl(e, t, n, r, i) {
11487
- return Yl(r, t === "tab" ? i + Xl(e, n) : e.lineEndFitAdvances[n]);
11521
+ function $l(e, t, n, r, i) {
11522
+ return Zl(r, t === "tab" ? i + Ql(e, n) : e.lineEndFitAdvances[n]);
11488
11523
  }
11489
- function Ql(e, t, n, r) {
11490
- return Yl(r, t === "tab" ? 0 : e.lineEndFitAdvances[n]);
11524
+ function eu(e, t, n, r) {
11525
+ return Zl(r, t === "tab" ? 0 : e.lineEndFitAdvances[n]);
11491
11526
  }
11492
- function $l(e, t, n, r, i) {
11493
- return Yl(r, t === "tab" ? i : e.lineEndPaintAdvances[n]);
11527
+ function tu(e, t, n, r, i) {
11528
+ return Zl(r, t === "tab" ? i : e.lineEndPaintAdvances[n]);
11494
11529
  }
11495
- function eu(e, t, n) {
11530
+ function nu(e, t, n) {
11496
11531
  return e.letterSpacing !== 0 && t ? n + e.letterSpacing : n;
11497
11532
  }
11498
- function tu(e, t) {
11533
+ function ru(e, t) {
11499
11534
  return e.letterSpacing === 0 ? t : t + e.letterSpacing;
11500
11535
  }
11501
- function nu(e, t, n, r, i, a) {
11536
+ function iu(e, t, n, r, i, a) {
11502
11537
  let o = 0, s = t;
11503
11538
  for (; o < e.length;) {
11504
11539
  let t = s + e[o] + a;
@@ -11510,13 +11545,13 @@ function nu(e, t, n, r, i, a) {
11510
11545
  fittedWidth: s
11511
11546
  };
11512
11547
  }
11513
- function ru(e, t) {
11514
- return au(e, t);
11548
+ function au(e, t) {
11549
+ return su(e, t);
11515
11550
  }
11516
- function iu(e, t, n) {
11551
+ function ou(e, t, n) {
11517
11552
  let { widths: r, kinds: i, breakableFitAdvances: a } = e;
11518
11553
  if (r.length === 0) return 0;
11519
- let o = t + Nl().lineFitEpsilon, s = 0, c = 0, l = !1, u = 0, d = 0, f = 0, p = 0, m = -1, h = 0;
11554
+ let o = t + Fl().lineFitEpsilon, s = 0, c = 0, l = !1, u = 0, d = 0, f = 0, p = 0, m = -1, h = 0;
11520
11555
  function g() {
11521
11556
  m = -1, h = 0;
11522
11557
  }
@@ -11545,8 +11580,8 @@ function iu(e, t, n) {
11545
11580
  l && f === e && p === n.length && (f = e + 1, p = 0);
11546
11581
  }
11547
11582
  let S = 0;
11548
- for (; S < r.length && !(!l && (S = Kl(e, S), S >= r.length));) {
11549
- let e = r[S], t = i[S], n = Gl(t);
11583
+ for (; S < r.length && !(!l && (S = Jl(e, S), S >= r.length));) {
11584
+ let e = r[S], t = i[S], n = ql(t);
11550
11585
  if (!l) {
11551
11586
  e > o && a[S] !== null ? x(S, 0) : v(S, e), n && (m = S + 1, h = c - e), S++;
11552
11587
  continue;
@@ -11575,11 +11610,11 @@ function iu(e, t, n) {
11575
11610
  }
11576
11611
  return l && _(), s;
11577
11612
  }
11578
- function au(e, t, n) {
11579
- if (e.simpleLineWalkFastPath) return iu(e, t, n);
11613
+ function su(e, t, n) {
11614
+ if (e.simpleLineWalkFastPath) return ou(e, t, n);
11580
11615
  let { widths: r, kinds: i, breakableFitAdvances: a, discretionaryHyphenWidth: o, chunks: s } = e;
11581
11616
  if (r.length === 0 || s.length === 0) return 0;
11582
- let c = Nl(), l = c.lineFitEpsilon, u = t + l, d = 0, f = 0, p = !1, m = 0, h = 0, g = 0, _ = 0, v = -1, y = 0, b = 0, x = null;
11617
+ let c = Fl(), l = c.lineFitEpsilon, u = t + l, d = 0, f = 0, p = !1, m = 0, h = 0, g = 0, _ = 0, v = -1, y = 0, b = 0, x = null;
11583
11618
  function S() {
11584
11619
  v = -1, y = 0, b = 0, x = null;
11585
11620
  }
@@ -11601,7 +11636,7 @@ function au(e, t, n) {
11601
11636
  }
11602
11637
  function re(t, n, r, i, a, o) {
11603
11638
  if (!n) return;
11604
- let s = Ql(e, t, r, a), c = $l(e, t, r, a, i);
11639
+ let s = eu(e, t, r, a), c = tu(e, t, r, a, i);
11605
11640
  v = r + 1, y = f - o + s, b = f - o + c, x = t;
11606
11641
  }
11607
11642
  function ie(t, n) {
@@ -11610,8 +11645,8 @@ function au(e, t, n) {
11610
11645
  let n = r[i];
11611
11646
  if (!p) te(t, i, n);
11612
11647
  else {
11613
- let r = eu(e, !0, n), a = f + r;
11614
- tu(e, a) > u ? (C(), te(t, i, n)) : (f = a, g = t, _ = i + 1);
11648
+ let r = nu(e, !0, n), a = f + r;
11649
+ ru(e, a) > u ? (C(), te(t, i, n)) : (f = a, g = t, _ = i + 1);
11615
11650
  }
11616
11651
  }
11617
11652
  p && g === t && _ === r.length && (g = t + 1, _ = 0);
@@ -11620,7 +11655,7 @@ function au(e, t, n) {
11620
11655
  if (x !== "soft-hyphen") return !1;
11621
11656
  let r = a[n];
11622
11657
  if (r == null) return !1;
11623
- let { fitCount: i, fittedWidth: s } = nu(r, f, t, l, o, e.letterSpacing);
11658
+ let { fitCount: i, fittedWidth: s } = iu(r, f, t, l, o, e.letterSpacing);
11624
11659
  return i === 0 ? !1 : (f = s, g = n, _ = i, S(), i === r.length ? (g = n + 1, _ = 0, !0) : (C(n, i, s + o), ie(n, i), !0));
11625
11660
  }
11626
11661
  function oe(e) {
@@ -11634,8 +11669,8 @@ function au(e, t, n) {
11634
11669
  }
11635
11670
  p = !1, f = 0, m = n.startSegmentIndex, h = 0, g = n.startSegmentIndex, _ = 0, S();
11636
11671
  let l = n.startSegmentIndex;
11637
- for (; l < n.endSegmentIndex && !(!p && (l = Kl(e, l, n.endSegmentIndex), l >= n.endSegmentIndex));) {
11638
- let t = i[l], n = Gl(t), s = Jl(e, p, l), d = t === "tab" ? ql(f + s, e.tabStopAdvance) : r[l], m = s + d, h = Zl(e, t, l, s, d);
11672
+ for (; l < n.endSegmentIndex && !(!p && (l = Jl(e, l, n.endSegmentIndex), l >= n.endSegmentIndex));) {
11673
+ let t = i[l], n = ql(t), s = Xl(e, p, l), d = t === "tab" ? Yl(f + s, e.tabStopAdvance) : r[l], m = s + d, h = $l(e, t, l, s, d);
11639
11674
  if (t === "soft-hyphen") {
11640
11675
  p && (g = l + 1, _ = 0, v = l + 1, y = f + o, b = f + o, x = t), l++;
11641
11676
  continue;
@@ -11645,7 +11680,7 @@ function au(e, t, n) {
11645
11680
  continue;
11646
11681
  }
11647
11682
  if (f + h > u) {
11648
- let r = f + Ql(e, t, l, s), i = f + $l(e, t, l, s, d);
11683
+ let r = f + eu(e, t, l, s), i = f + tu(e, t, l, s, d);
11649
11684
  if (x === "soft-hyphen" && c.preferEarlySoftHyphenBreak && y <= u) {
11650
11685
  C(v, 0, b);
11651
11686
  continue;
@@ -11685,11 +11720,11 @@ function au(e, t, n) {
11685
11720
  }
11686
11721
  //#endregion
11687
11722
  //#region ../../node_modules/.pnpm/@chenglou+pretext@0.0.6/node_modules/@chenglou/pretext/dist/layout.js
11688
- var ou = null;
11689
- function su() {
11690
- return ou === null && (ou = new Intl.Segmenter(void 0, { granularity: "grapheme" })), ou;
11723
+ var cu = null;
11724
+ function lu() {
11725
+ return cu === null && (cu = new Intl.Segmenter(void 0, { granularity: "grapheme" })), cu;
11691
11726
  }
11692
- function cu(e) {
11727
+ function uu(e) {
11693
11728
  return e ? {
11694
11729
  widths: [],
11695
11730
  lineEndFitAdvances: [],
@@ -11719,7 +11754,7 @@ function cu(e) {
11719
11754
  chunks: []
11720
11755
  };
11721
11756
  }
11722
- function lu(e, t) {
11757
+ function du(e, t) {
11723
11758
  let n = [], r = [], i = 0, a = !1, o = !1, s = !1;
11724
11759
  function c() {
11725
11760
  r.length !== 0 && (n.push({
@@ -11728,20 +11763,20 @@ function lu(e, t) {
11728
11763
  }), r = [], a = !1, o = !1, s = !1);
11729
11764
  }
11730
11765
  function l(e, t, n) {
11731
- r = [e], i = t, a = n, o = Zc(e), s = Nc.has(e);
11766
+ r = [e], i = t, a = n, o = $c(e), s = Fc.has(e);
11732
11767
  }
11733
11768
  function u(e, t) {
11734
11769
  r.push(e), a ||= t;
11735
- let n = Zc(e);
11736
- e.length === 1 && Fc.has(e) ? o ||= n : o = n, s = !1;
11770
+ let n = $c(e);
11771
+ e.length === 1 && Lc.has(e) ? o ||= n : o = n, s = !1;
11737
11772
  }
11738
- for (let n of su().segment(e)) {
11739
- let e = n.segment, i = Ec(e);
11773
+ for (let n of lu().segment(e)) {
11774
+ let e = n.segment, i = Oc(e);
11740
11775
  if (r.length === 0) {
11741
11776
  l(e, n.index, i);
11742
11777
  continue;
11743
11778
  }
11744
- if (s || Mc.has(e) || Fc.has(e) || t.carryCJKAfterClosingQuote && i && o) {
11779
+ if (s || Pc.has(e) || Lc.has(e) || t.carryCJKAfterClosingQuote && i && o) {
11745
11780
  u(e, i);
11746
11781
  continue;
11747
11782
  }
@@ -11753,9 +11788,9 @@ function lu(e, t) {
11753
11788
  }
11754
11789
  return c(), n;
11755
11790
  }
11756
- function uu(e) {
11791
+ function fu(e) {
11757
11792
  if (e.length <= 1) return e;
11758
- let t = [], n = [e[0].text], r = e[0].start, i = Ec(e[0].text), a = jc(e[0].text);
11793
+ let t = [], n = [e[0].text], r = e[0].start, i = Oc(e[0].text), a = Nc(e[0].text);
11759
11794
  function o() {
11760
11795
  t.push({
11761
11796
  text: n.length === 1 ? n[0] : n.join(""),
@@ -11763,7 +11798,7 @@ function uu(e) {
11763
11798
  });
11764
11799
  }
11765
11800
  for (let t = 1; t < e.length; t++) {
11766
- let s = e[t], c = Ec(s.text), l = jc(s.text);
11801
+ let s = e[t], c = Oc(s.text), l = Nc(s.text);
11767
11802
  if (i && a) {
11768
11803
  n.push(s.text), i ||= c, a = l;
11769
11804
  continue;
@@ -11772,28 +11807,28 @@ function uu(e) {
11772
11807
  }
11773
11808
  return o(), t;
11774
11809
  }
11775
- function du(e, t) {
11810
+ function pu(e, t) {
11776
11811
  if (t === "zero-width-break" || t === "soft-hyphen" || t === "hard-break") return 0;
11777
11812
  if (t === "tab") return 1;
11778
- let n = 0, r = su();
11813
+ let n = 0, r = lu();
11779
11814
  for (let t of r.segment(e)) n++;
11780
11815
  return n;
11781
11816
  }
11782
- function fu(e, t, n) {
11817
+ function mu(e, t, n) {
11783
11818
  return t > 1 ? e + (t - 1) * n : e;
11784
11819
  }
11785
- function pu(e, t, n, r, i) {
11786
- let a = Nl(), { cache: o, emojiCorrection: s } = Ul(t, Ll(e.normalized)), c = Vl("-", Ml("-", o), s) + (i === 0 ? 0 : i), l = Vl(" ", Ml(" ", o), s) * 8, u = i !== 0;
11787
- if (e.len === 0) return cu(n);
11820
+ function hu(e, t, n, r, i) {
11821
+ let a = Fl(), { cache: o, emojiCorrection: s } = Gl(t, zl(e.normalized)), c = Ul("-", Pl("-", o), s) + (i === 0 ? 0 : i), l = Ul(" ", Pl(" ", o), s) * 8, u = i !== 0;
11822
+ if (e.len === 0) return uu(n);
11788
11823
  let d = [], f = [], p = [], m = [], h = e.chunks.length <= 1 && !u, g = n ? [] : null, _ = [], v = [], y = n ? [] : null, b = Array.from({ length: e.len });
11789
11824
  function x(e, t, n, r, i, a, o, s) {
11790
11825
  i !== "text" && i !== "space" && i !== "zero-width-break" && (h = !1), d.push(t), f.push(n), p.push(r), m.push(i), g?.push(a), _.push(o), u && v.push(s), y !== null && y.push(e);
11791
11826
  }
11792
11827
  function S(e, t, n, r, c) {
11793
- let l = Ml(e, o), d = u ? du(e, t) : 0, f = fu(Vl(e, l, s), d, i), p = t === "space" || t === "preserved-space" || t === "zero-width-break" ? 0 : f, m = p === 0 ? 0 : p + (d > 0 ? i : 0), h = t === "space" || t === "zero-width-break" ? 0 : f;
11828
+ let l = Pl(e, o), d = u ? pu(e, t) : 0, f = mu(Ul(e, l, s), d, i), p = t === "space" || t === "preserved-space" || t === "zero-width-break" ? 0 : f, m = p === 0 ? 0 : p + (d > 0 ? i : 0), h = t === "space" || t === "zero-width-break" ? 0 : f;
11794
11829
  if (c && r && e.length > 1) {
11795
11830
  let r = "sum-graphemes";
11796
- i === 0 ? fl(e) ? r = "pair-context" : a.preferPrefixWidthsForBreakableRuns && (r = "segment-prefixes") : r = "segment-prefixes", x(e, f, m, h, t, n, Hl(e, l, o, s, r), d);
11831
+ i === 0 ? ml(e) ? r = "pair-context" : a.preferPrefixWidthsForBreakableRuns && (r = "segment-prefixes") : r = "segment-prefixes", x(e, f, m, h, t, n, Wl(e, l, o, s, r), d);
11797
11832
  return;
11798
11833
  }
11799
11834
  x(e, f, m, h, t, n, null, d);
@@ -11810,21 +11845,21 @@ function pu(e, t, n, r, i) {
11810
11845
  continue;
11811
11846
  }
11812
11847
  if (s === "tab") {
11813
- x(n, 0, 0, 0, s, l, null, u ? du(n, s) : 0);
11848
+ x(n, 0, 0, 0, s, l, null, u ? pu(n, s) : 0);
11814
11849
  continue;
11815
11850
  }
11816
- let f = Ml(n, o);
11851
+ let f = Pl(n, o);
11817
11852
  if (s === "text" && f.containsCJK) {
11818
- let e = lu(n, a), t = r === "keep-all" ? uu(e) : e;
11853
+ let e = du(n, a), t = r === "keep-all" ? fu(e) : e;
11819
11854
  for (let e = 0; e < t.length; e++) {
11820
11855
  let n = t[e];
11821
- S(n.text, "text", l + n.start, i, r === "keep-all" || !Ec(n.text));
11856
+ S(n.text, "text", l + n.start, i, r === "keep-all" || !Oc(n.text));
11822
11857
  }
11823
11858
  continue;
11824
11859
  }
11825
11860
  S(n, s, l, i, !0);
11826
11861
  }
11827
- let C = mu(e.chunks, b, d.length), ee = g === null ? null : fc(e.normalized, g);
11862
+ let C = gu(e.chunks, b, d.length), ee = g === null ? null : mc(e.normalized, g);
11828
11863
  return y === null ? {
11829
11864
  widths: d,
11830
11865
  lineEndFitAdvances: f,
@@ -11854,7 +11889,7 @@ function pu(e, t, n, r, i) {
11854
11889
  segments: y
11855
11890
  };
11856
11891
  }
11857
- function mu(e, t, n) {
11892
+ function gu(e, t, n) {
11858
11893
  let r = [];
11859
11894
  for (let i = 0; i < e.length; i++) {
11860
11895
  let a = e[i], o = a.startSegmentIndex < t.length ? t[a.startSegmentIndex] : n, s = a.endSegmentIndex < t.length ? t[a.endSegmentIndex] : n, c = a.consumedEndSegmentIndex < t.length ? t[a.consumedEndSegmentIndex] : n;
@@ -11866,18 +11901,18 @@ function mu(e, t, n) {
11866
11901
  }
11867
11902
  return r;
11868
11903
  }
11869
- function hu(e, t, n, r) {
11904
+ function _u(e, t, n, r) {
11870
11905
  let i = r?.wordBreak ?? "normal", a = r?.letterSpacing ?? 0;
11871
- return pu(xl(e, Nl(), r?.whiteSpace, i), t, n, i, a);
11906
+ return hu(Cl(e, Fl(), r?.whiteSpace, i), t, n, i, a);
11872
11907
  }
11873
- function gu(e, t, n) {
11874
- return hu(e, t, !1, n);
11908
+ function vu(e, t, n) {
11909
+ return _u(e, t, !1, n);
11875
11910
  }
11876
- function _u(e) {
11911
+ function yu(e) {
11877
11912
  return e;
11878
11913
  }
11879
- function vu(e, t, n) {
11880
- let r = ru(_u(e), t);
11914
+ function bu(e, t, n) {
11915
+ let r = au(yu(e), t);
11881
11916
  return {
11882
11917
  lineCount: r,
11883
11918
  height: r * n
@@ -11885,7 +11920,7 @@ function vu(e, t, n) {
11885
11920
  }
11886
11921
  //#endregion
11887
11922
  //#region src/components/Text.ts
11888
- var yu = (e) => {
11923
+ var xu = (e) => {
11889
11924
  if (typeof e == "number") return Number.isFinite(e) ? e : null;
11890
11925
  if (typeof e == "string") {
11891
11926
  let t = Number.parseFloat(e);
@@ -11901,7 +11936,7 @@ R("Text", class extends G(S) {
11901
11936
  let { props: n } = e;
11902
11937
  await super.onMount(e, t);
11903
11938
  let r = n.context.tick;
11904
- n.text && n.typewriter && (this.fullText = n.text, this.text = "", this.currentIndex = 0, n.typewriter && (this.typewriterOptions = n.typewriter, this.typewriterOptions.skip && no(this.typewriterOptions.skip) && io(this.typewriterOptions.skip, () => {
11939
+ n.text && n.typewriter && (this.fullText = n.text, this.text = "", this.currentIndex = 0, n.typewriter && (this.typewriterOptions = n.typewriter, this.typewriterOptions.skip && io(this.typewriterOptions.skip) && oo(this.typewriterOptions.skip, () => {
11905
11940
  this.skipTypewriter();
11906
11941
  }), this.typewriterOptions.sound && this.initializeTypewriterSound()), this.updateLayout()), this.subscriptionTick = r.observable.subscribe(() => {
11907
11942
  n.typewriter && this.typewriterEffect();
@@ -11914,7 +11949,7 @@ R("Text", class extends G(S) {
11914
11949
  return this.typewriterOptions.onComplete;
11915
11950
  }
11916
11951
  initializeTypewriterSound() {
11917
- this.typewriterOptions.sound?.src && (this.typewriterSound = new Ja.Howl({
11952
+ this.typewriterOptions.sound?.src && (this.typewriterSound = new Xa.Howl({
11918
11953
  src: [this.typewriterOptions.sound.src],
11919
11954
  volume: this.typewriterOptions.sound.volume ?? .5,
11920
11955
  rate: this.typewriterOptions.sound.rate ?? 1,
@@ -11950,7 +11985,7 @@ R("Text", class extends G(S) {
11950
11985
  this._wordWrapWidth = 0;
11951
11986
  return;
11952
11987
  }
11953
- let e = yu(this.style.wordWrapWidth);
11988
+ let e = xu(this.style.wordWrapWidth);
11954
11989
  this._wordWrapWidth = e !== null && e > 0 ? e : 0;
11955
11990
  }
11956
11991
  measurePretextLayout() {
@@ -11963,8 +11998,8 @@ R("Text", class extends G(S) {
11963
11998
  r.letterSpacing
11964
11999
  ]);
11965
12000
  try {
11966
- (this.pretextPrepareKey !== i || !this.pretextPrepared) && (this.pretextPrepared = gu(e, t, r), this.pretextPrepareKey = i);
11967
- let a = vu(this.pretextPrepared, this._wordWrapWidth, n);
12001
+ (this.pretextPrepareKey !== i || !this.pretextPrepared) && (this.pretextPrepared = vu(e, t, r), this.pretextPrepareKey = i);
12002
+ let a = bu(this.pretextPrepared, this._wordWrapWidth, n);
11968
12003
  return {
11969
12004
  width: this._wordWrapWidth,
11970
12005
  height: a.height
@@ -11986,11 +12021,11 @@ R("Text", class extends G(S) {
11986
12021
  };
11987
12022
  }
11988
12023
  resolveLineHeight() {
11989
- let e = yu(this.style.lineHeight);
12024
+ let e = xu(this.style.lineHeight);
11990
12025
  return e !== null && e > 0 ? e : this.resolveFontSize();
11991
12026
  }
11992
12027
  resolveFontSize() {
11993
- let e = yu(this.style.fontSize);
12028
+ let e = xu(this.style.fontSize);
11994
12029
  return e !== null && e > 0 ? e : 16;
11995
12030
  }
11996
12031
  setMeasuredLayout(e, t) {
@@ -12018,7 +12053,7 @@ R("Text", class extends G(S) {
12018
12053
  });
12019
12054
  }
12020
12055
  });
12021
- function bu(e) {
12056
+ function Su(e) {
12022
12057
  return V("Text", e);
12023
12058
  }
12024
12059
  R("TilingSprite", class extends G(te) {
@@ -12026,16 +12061,16 @@ R("TilingSprite", class extends G(te) {
12026
12061
  super.onUpdate(e), e.image && (this.texture = C.from(e.image)), e.tileScale && this.tileScale.set(e.tileScale.x, e.tileScale.y), e.tilePosition && this.tilePosition.set(e.tilePosition.x, e.tilePosition.y), e.width !== void 0 && (this.width = e.width), e.height !== void 0 && (this.height = e.height);
12027
12062
  }
12028
12063
  });
12029
- function xu(e) {
12064
+ function Cu(e) {
12030
12065
  return V("TilingSprite", e);
12031
12066
  }
12032
12067
  //#endregion
12033
12068
  //#region ../../node_modules/.pnpm/pixi-viewport@6.0.3_pixi.js@8.9.2/node_modules/pixi-viewport/dist/pixi_viewport.js
12034
- var Su = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
12035
- function Cu(e) {
12069
+ var wu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
12070
+ function Tu(e) {
12036
12071
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
12037
12072
  }
12038
- var wu = { exports: {} };
12073
+ var Eu = { exports: {} };
12039
12074
  (function(e, t) {
12040
12075
  (function() {
12041
12076
  var t = {
@@ -12141,16 +12176,16 @@ var wu = { exports: {} };
12141
12176
  (function(t) {
12142
12177
  return e.exports = t;
12143
12178
  })(t);
12144
- }).call(Su);
12145
- })(wu);
12146
- var Tu = wu.exports, Eu = /* @__PURE__ */ Cu(Tu);
12147
- function Du(e, t) {
12179
+ }).call(wu);
12180
+ })(Eu);
12181
+ var Du = Eu.exports, Ou = /* @__PURE__ */ Tu(Du);
12182
+ function ku(e, t) {
12148
12183
  if (e) {
12149
12184
  if (typeof e == "function") return e;
12150
- if (typeof e == "string") return Eu[e];
12151
- } else return Eu[t];
12185
+ if (typeof e == "string") return Ou[e];
12186
+ } else return Ou[t];
12152
12187
  }
12153
- var Ou = class {
12188
+ var Au = class {
12154
12189
  constructor(e) {
12155
12190
  this.viewport = e, this.touches = [], this.addListeners();
12156
12191
  }
@@ -12225,7 +12260,7 @@ var Ou = class {
12225
12260
  count() {
12226
12261
  return +!!this.isMouseDown + this.touches.length;
12227
12262
  }
12228
- }, ku = [
12263
+ }, ju = [
12229
12264
  "drag",
12230
12265
  "pinch",
12231
12266
  "wheel",
@@ -12238,15 +12273,15 @@ var Ou = class {
12238
12273
  "clamp-zoom",
12239
12274
  "snap",
12240
12275
  "clamp"
12241
- ], Au = class {
12276
+ ], Mu = class {
12242
12277
  constructor(e) {
12243
12278
  this.viewport = e, this.list = [], this.plugins = {};
12244
12279
  }
12245
- add(e, t, n = ku.length) {
12280
+ add(e, t, n = ju.length) {
12246
12281
  let r = this.plugins[e];
12247
12282
  r && r.destroy(), this.plugins[e] = t;
12248
- let i = ku.indexOf(e);
12249
- i !== -1 && ku.splice(i, 1), ku.splice(n, 0, e), this.sort();
12283
+ let i = ju.indexOf(e);
12284
+ i !== -1 && ju.splice(i, 1), ju.splice(n, 0, e), this.sort();
12250
12285
  }
12251
12286
  get(e, t) {
12252
12287
  var n;
@@ -12280,7 +12315,7 @@ var Ou = class {
12280
12315
  }
12281
12316
  sort() {
12282
12317
  this.list = [];
12283
- for (let e of ku) this.plugins[e] && this.list.push(this.plugins[e]);
12318
+ for (let e of ju) this.plugins[e] && this.list.push(this.plugins[e]);
12284
12319
  }
12285
12320
  down(e) {
12286
12321
  let t = !1;
@@ -12328,13 +12363,13 @@ var Ou = class {
12328
12363
  resume() {
12329
12364
  this.paused = !1;
12330
12365
  }
12331
- }, ju = {
12366
+ }, Nu = {
12332
12367
  removeOnInterrupt: !1,
12333
12368
  ease: "linear",
12334
12369
  time: 1e3
12335
- }, Mu = class extends X {
12370
+ }, Pu = class extends X {
12336
12371
  constructor(e, t = {}) {
12337
- super(e), this.startWidth = null, this.startHeight = null, this.deltaWidth = null, this.deltaHeight = null, this.width = null, this.height = null, this.time = 0, this.options = Object.assign({}, ju, t), this.options.ease = Du(this.options.ease), this.setupPosition(), this.setupZoom(), this.time = 0;
12372
+ super(e), this.startWidth = null, this.startHeight = null, this.deltaWidth = null, this.deltaHeight = null, this.width = null, this.height = null, this.time = 0, this.options = Object.assign({}, Nu, t), this.options.ease = ku(this.options.ease), this.setupPosition(), this.setupZoom(), this.time = 0;
12338
12373
  }
12339
12374
  setupPosition() {
12340
12375
  typeof this.options.position < "u" ? (this.startX = this.parent.center.x, this.startY = this.parent.center.y, this.deltaX = this.options.position.x - this.parent.center.x, this.deltaY = this.options.position.y - this.parent.center.y, this.keepCenter = !1) : this.keepCenter = !0;
@@ -12384,16 +12419,16 @@ var Ou = class {
12384
12419
  });
12385
12420
  }
12386
12421
  }
12387
- }, Nu = {
12422
+ }, Fu = {
12388
12423
  sides: "all",
12389
12424
  friction: .5,
12390
12425
  time: 150,
12391
12426
  ease: "easeInOutSine",
12392
12427
  underflow: "center",
12393
12428
  bounceBox: null
12394
- }, Pu = class extends X {
12429
+ }, Iu = class extends X {
12395
12430
  constructor(e, t = {}) {
12396
- super(e), this.options = Object.assign({}, Nu, t), this.ease = Du(this.options.ease, "easeInOutSine"), this.options.sides ? this.options.sides === "all" ? this.top = this.bottom = this.left = this.right = !0 : this.options.sides === "horizontal" ? (this.right = this.left = !0, this.top = this.bottom = !1) : this.options.sides === "vertical" ? (this.left = this.right = !1, this.top = this.bottom = !0) : (this.top = this.options.sides.indexOf("top") !== -1, this.bottom = this.options.sides.indexOf("bottom") !== -1, this.left = this.options.sides.indexOf("left") !== -1, this.right = this.options.sides.indexOf("right") !== -1) : this.left = this.top = this.right = this.bottom = !1;
12431
+ super(e), this.options = Object.assign({}, Fu, t), this.ease = ku(this.options.ease, "easeInOutSine"), this.options.sides ? this.options.sides === "all" ? this.top = this.bottom = this.left = this.right = !0 : this.options.sides === "horizontal" ? (this.right = this.left = !0, this.top = this.bottom = !1) : this.options.sides === "vertical" ? (this.left = this.right = !1, this.top = this.bottom = !0) : (this.top = this.options.sides.indexOf("top") !== -1, this.bottom = this.options.sides.indexOf("bottom") !== -1, this.left = this.options.sides.indexOf("left") !== -1, this.right = this.options.sides.indexOf("right") !== -1) : this.left = this.top = this.right = this.bottom = !1;
12397
12432
  let n = this.options.underflow.toLowerCase();
12398
12433
  n === "center" ? (this.underflowX = 0, this.underflowY = 0) : (this.underflowX = n.indexOf("left") === -1 ? n.indexOf("right") === -1 ? 0 : 1 : -1, this.underflowY = n.indexOf("top") === -1 ? n.indexOf("bottom") === -1 ? 0 : 1 : -1), this.reset();
12399
12434
  }
@@ -12503,16 +12538,16 @@ var Ou = class {
12503
12538
  reset() {
12504
12539
  this.toX = this.toY = null, this.bounce();
12505
12540
  }
12506
- }, Fu = {
12541
+ }, Lu = {
12507
12542
  left: !1,
12508
12543
  right: !1,
12509
12544
  top: !1,
12510
12545
  bottom: !1,
12511
12546
  direction: null,
12512
12547
  underflow: "center"
12513
- }, Iu = class extends X {
12548
+ }, Ru = class extends X {
12514
12549
  constructor(e, t = {}) {
12515
- super(e), this.options = Object.assign({}, Fu, t), this.options.direction && (this.options.left = this.options.direction === "x" || this.options.direction === "all" ? !0 : null, this.options.right = this.options.direction === "x" || this.options.direction === "all" ? !0 : null, this.options.top = this.options.direction === "y" || this.options.direction === "all" ? !0 : null, this.options.bottom = this.options.direction === "y" || this.options.direction === "all" ? !0 : null), this.parseUnderflow(), this.last = {
12550
+ super(e), this.options = Object.assign({}, Lu, t), this.options.direction && (this.options.left = this.options.direction === "x" || this.options.direction === "all" ? !0 : null, this.options.right = this.options.direction === "x" || this.options.direction === "all" ? !0 : null, this.options.top = this.options.direction === "y" || this.options.direction === "all" ? !0 : null, this.options.bottom = this.options.direction === "y" || this.options.direction === "all" ? !0 : null), this.parseUnderflow(), this.last = {
12516
12551
  x: null,
12517
12552
  y: null,
12518
12553
  scaleX: null,
@@ -12570,16 +12605,16 @@ var Ou = class {
12570
12605
  reset() {
12571
12606
  this.update();
12572
12607
  }
12573
- }, Lu = {
12608
+ }, zu = {
12574
12609
  minWidth: null,
12575
12610
  minHeight: null,
12576
12611
  maxWidth: null,
12577
12612
  maxHeight: null,
12578
12613
  minScale: null,
12579
12614
  maxScale: null
12580
- }, Ru = class extends X {
12615
+ }, Bu = class extends X {
12581
12616
  constructor(e, t = {}) {
12582
- super(e), this.options = Object.assign({}, Lu, t), this.clamp();
12617
+ super(e), this.options = Object.assign({}, zu, t), this.clamp();
12583
12618
  }
12584
12619
  resize() {
12585
12620
  this.clamp();
@@ -12645,13 +12680,13 @@ var Ou = class {
12645
12680
  reset() {
12646
12681
  this.clamp();
12647
12682
  }
12648
- }, zu = {
12683
+ }, Vu = {
12649
12684
  friction: .98,
12650
12685
  bounce: .8,
12651
12686
  minSpeed: .01
12652
- }, Bu = 16, Vu = class extends X {
12687
+ }, Hu = 16, Uu = class extends X {
12653
12688
  constructor(e, t = {}) {
12654
- super(e), this.options = Object.assign({}, zu, t), this.saved = [], this.timeSinceRelease = 0, this.reset(), this.parent.on("moved", (e) => this.handleMoved(e));
12689
+ super(e), this.options = Object.assign({}, Vu, t), this.saved = [], this.timeSinceRelease = 0, this.reset(), this.parent.on("moved", (e) => this.handleMoved(e));
12655
12690
  }
12656
12691
  down() {
12657
12692
  return this.saved = [], this.x = this.y = null, !1;
@@ -12693,11 +12728,11 @@ var Ou = class {
12693
12728
  let t = this.x || this.y, n = this.timeSinceRelease, r = this.timeSinceRelease + e;
12694
12729
  if (this.x) {
12695
12730
  let t = this.percentChangeX, i = Math.log(t);
12696
- this.parent.x += this.x * Bu / i * (t ** +(r / Bu) - t ** +(n / Bu)), this.x *= this.percentChangeX ** +(e / Bu);
12731
+ this.parent.x += this.x * Hu / i * (t ** +(r / Hu) - t ** +(n / Hu)), this.x *= this.percentChangeX ** +(e / Hu);
12697
12732
  }
12698
12733
  if (this.y) {
12699
12734
  let t = this.percentChangeY, i = Math.log(t);
12700
- this.parent.y += this.y * Bu / i * (t ** +(r / Bu) - t ** +(n / Bu)), this.y *= this.percentChangeY ** +(e / Bu);
12735
+ this.parent.y += this.y * Hu / i * (t ** +(r / Hu) - t ** +(n / Hu)), this.y *= this.percentChangeY ** +(e / Hu);
12701
12736
  }
12702
12737
  this.timeSinceRelease += e, this.x && this.y ? Math.abs(this.x) < this.options.minSpeed && Math.abs(this.y) < this.options.minSpeed && (this.x = 0, this.y = 0) : (Math.abs(this.x || 0) < this.options.minSpeed && (this.x = 0), Math.abs(this.y || 0) < this.options.minSpeed && (this.y = 0)), t && this.parent.emit("moved", {
12703
12738
  viewport: this.parent,
@@ -12707,7 +12742,7 @@ var Ou = class {
12707
12742
  reset() {
12708
12743
  this.x = this.y = null;
12709
12744
  }
12710
- }, Hu = {
12745
+ }, Wu = {
12711
12746
  direction: "all",
12712
12747
  pressDrag: !0,
12713
12748
  wheel: !0,
@@ -12721,9 +12756,9 @@ var Ou = class {
12721
12756
  ignoreKeyToPressOnTouch: !1,
12722
12757
  lineHeight: 20,
12723
12758
  wheelSwapAxes: !1
12724
- }, Uu = class extends X {
12759
+ }, Gu = class extends X {
12725
12760
  constructor(e, t = {}) {
12726
- super(e), this.windowEventHandlers = [], this.options = Object.assign({}, Hu, t), this.moved = !1, this.reverse = this.options.reverse ? 1 : -1, this.xDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "x", this.yDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "y", this.keyIsPressed = !1, this.parseUnderflow(), this.mouseButtons(this.options.mouseButtons), this.options.keyToPress && this.handleKeyPresses(this.options.keyToPress);
12761
+ super(e), this.windowEventHandlers = [], this.options = Object.assign({}, Wu, t), this.moved = !1, this.reverse = this.options.reverse ? 1 : -1, this.xDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "x", this.yDirection = !this.options.direction || this.options.direction === "all" || this.options.direction === "y", this.keyIsPressed = !1, this.parseUnderflow(), this.mouseButtons(this.options.mouseButtons), this.options.keyToPress && this.handleKeyPresses(this.options.keyToPress);
12727
12762
  }
12728
12763
  handleKeyPresses(e) {
12729
12764
  this.addWindowEventHandler("keyup", (t) => {
@@ -12858,13 +12893,13 @@ var Ou = class {
12858
12893
  }
12859
12894
  else this.parent.top < 0 && (this.parent.y = 0, e.y = 0), this.parent.bottom > this.parent.worldHeight && (this.parent.y = -this.parent.worldHeight * this.parent.scale.y + this.parent.screenHeight, e.y = 0);
12860
12895
  }
12861
- }, Wu = {
12896
+ }, Ku = {
12862
12897
  speed: 0,
12863
12898
  acceleration: null,
12864
12899
  radius: null
12865
- }, Gu = class extends X {
12900
+ }, qu = class extends X {
12866
12901
  constructor(e, t, n = {}) {
12867
- super(e), this.target = t, this.options = Object.assign({}, Wu, n), this.velocity = {
12902
+ super(e), this.target = t, this.options = Object.assign({}, Ku, n), this.velocity = {
12868
12903
  x: 0,
12869
12904
  y: 0
12870
12905
  };
@@ -12905,7 +12940,7 @@ var Ou = class {
12905
12940
  type: "follow"
12906
12941
  });
12907
12942
  }
12908
- }, Ku = {
12943
+ }, Ju = {
12909
12944
  radius: null,
12910
12945
  distance: null,
12911
12946
  top: null,
@@ -12917,9 +12952,9 @@ var Ou = class {
12917
12952
  noDecelerate: !1,
12918
12953
  linear: !1,
12919
12954
  allowButtons: !1
12920
- }, qu = class extends X {
12955
+ }, Yu = class extends X {
12921
12956
  constructor(e, t = {}) {
12922
- super(e), this.options = Object.assign({}, Ku, t), this.reverse = this.options.reverse ? 1 : -1, this.radiusSquared = typeof this.options.radius == "number" ? this.options.radius ** 2 : null, this.resize();
12957
+ super(e), this.options = Object.assign({}, Ju, t), this.reverse = this.options.reverse ? 1 : -1, this.radiusSquared = typeof this.options.radius == "number" ? this.options.radius ** 2 : null, this.resize();
12923
12958
  }
12924
12959
  resize() {
12925
12960
  let e = this.options.distance;
@@ -12960,15 +12995,15 @@ var Ou = class {
12960
12995
  });
12961
12996
  }
12962
12997
  }
12963
- }, Ju = {
12998
+ }, Xu = {
12964
12999
  noDrag: !1,
12965
13000
  percent: 1,
12966
13001
  center: null,
12967
13002
  factor: 1,
12968
13003
  axis: "all"
12969
- }, Yu = new y(), Xu = class extends X {
13004
+ }, Zu = new y(), Qu = class extends X {
12970
13005
  constructor(e, t = {}) {
12971
- super(e), this.active = !1, this.pinching = !1, this.moved = !1, this.options = Object.assign({}, Ju, t);
13006
+ super(e), this.active = !1, this.pinching = !1, this.moved = !1, this.options = Object.assign({}, Xu, t);
12972
13007
  }
12973
13008
  down() {
12974
13009
  return this.parent.input.count() >= 2 ? (this.active = !0, !0) : !1;
@@ -12981,7 +13016,7 @@ var Ou = class {
12981
13016
  }
12982
13017
  move(e) {
12983
13018
  if (this.paused || !this.active) return !1;
12984
- let { x: t, y: n } = (this.parent.parent || this.parent).toLocal(e.global, void 0, Yu), r = this.parent.input.touches;
13019
+ let { x: t, y: n } = (this.parent.parent || this.parent).toLocal(e.global, void 0, Zu), r = this.parent.input.touches;
12985
13020
  if (r.length >= 2) {
12986
13021
  let i = r[0], a = r[1], o = i.last && a.last ? Math.sqrt((a.last.x - i.last.x) ** 2 + (a.last.y - i.last.y) ** 2) : null;
12987
13022
  if (i.id === e.pointerId ? i.last = {
@@ -13024,7 +13059,7 @@ var Ou = class {
13024
13059
  up() {
13025
13060
  return this.pinching && this.parent.input.touches.length <= 1 ? (this.active = !1, this.lastCenter = null, this.pinching = !1, this.moved = !1, this.parent.emit("pinch-end", this.parent), !0) : !1;
13026
13061
  }
13027
- }, Zu = {
13062
+ }, $u = {
13028
13063
  topLeft: !1,
13029
13064
  friction: .8,
13030
13065
  time: 1e3,
@@ -13033,9 +13068,9 @@ var Ou = class {
13033
13068
  removeOnComplete: !1,
13034
13069
  removeOnInterrupt: !1,
13035
13070
  forceStart: !1
13036
- }, Qu = class extends X {
13071
+ }, ed = class extends X {
13037
13072
  constructor(e, t, n, r = {}) {
13038
- super(e), this.options = Object.assign({}, Zu, r), this.ease = Du(r.ease, "easeInOutSine"), this.x = t, this.y = n, this.options.forceStart && this.snapStart();
13073
+ super(e), this.options = Object.assign({}, $u, r), this.ease = ku(r.ease, "easeInOutSine"), this.x = t, this.y = n, this.options.forceStart && this.snapStart();
13039
13074
  }
13040
13075
  snapStart() {
13041
13076
  this.percent = 0, this.snapping = { time: 0 };
@@ -13074,7 +13109,7 @@ var Ou = class {
13074
13109
  (e.x !== this.x || e.y !== this.y) && this.snapStart();
13075
13110
  }
13076
13111
  }
13077
- }, $u = {
13112
+ }, td = {
13078
13113
  width: 0,
13079
13114
  height: 0,
13080
13115
  time: 1e3,
@@ -13085,9 +13120,9 @@ var Ou = class {
13085
13120
  removeOnInterrupt: !1,
13086
13121
  forceStart: !1,
13087
13122
  noMove: !1
13088
- }, ed = class extends X {
13123
+ }, nd = class extends X {
13089
13124
  constructor(e, t = {}) {
13090
- super(e), this.options = Object.assign({}, $u, t), this.ease = Du(this.options.ease), this.xIndependent = !1, this.yIndependent = !1, this.xScale = 0, this.yScale = 0, this.options.width > 0 && (this.xScale = e.screenWidth / this.options.width, this.xIndependent = !0), this.options.height > 0 && (this.yScale = e.screenHeight / this.options.height, this.yIndependent = !0), this.xScale = this.xIndependent ? this.xScale : this.yScale, this.yScale = this.yIndependent ? this.yScale : this.xScale, this.options.time === 0 ? (e.container.scale.x = this.xScale, e.container.scale.y = this.yScale, this.options.removeOnComplete && this.parent.plugins.remove("snap-zoom")) : t.forceStart && this.createSnapping();
13125
+ super(e), this.options = Object.assign({}, td, t), this.ease = ku(this.options.ease), this.xIndependent = !1, this.yIndependent = !1, this.xScale = 0, this.yScale = 0, this.options.width > 0 && (this.xScale = e.screenWidth / this.options.width, this.xIndependent = !0), this.options.height > 0 && (this.yScale = e.screenHeight / this.options.height, this.yIndependent = !0), this.xScale = this.xIndependent ? this.xScale : this.yScale, this.yScale = this.yIndependent ? this.yScale : this.xScale, this.options.time === 0 ? (e.container.scale.x = this.xScale, e.container.scale.y = this.yScale, this.options.removeOnComplete && this.parent.plugins.remove("snap-zoom")) : t.forceStart && this.createSnapping();
13091
13126
  }
13092
13127
  createSnapping() {
13093
13128
  let e = this.parent.worldScreenWidth, t = this.parent.worldScreenHeight, n = this.parent.screenWidth / this.xScale, r = this.parent.screenHeight / this.yScale;
@@ -13126,7 +13161,7 @@ var Ou = class {
13126
13161
  resume() {
13127
13162
  this.snapping = null, super.resume();
13128
13163
  }
13129
- }, td = {
13164
+ }, rd = {
13130
13165
  percent: .1,
13131
13166
  smooth: !1,
13132
13167
  interrupt: !0,
@@ -13137,9 +13172,9 @@ var Ou = class {
13137
13172
  keyToPress: null,
13138
13173
  trackpadPinch: !1,
13139
13174
  wheelZoom: !0
13140
- }, nd = class extends X {
13175
+ }, id = class extends X {
13141
13176
  constructor(e, t = {}) {
13142
- super(e), this.options = Object.assign({}, td, t), this.keyIsPressed = !1, this.options.keyToPress && this.handleKeyPresses(this.options.keyToPress);
13177
+ super(e), this.options = Object.assign({}, rd, t), this.keyIsPressed = !1, this.options.keyToPress && this.handleKeyPresses(this.options.keyToPress);
13143
13178
  }
13144
13179
  handleKeyPresses(e) {
13145
13180
  typeof window > "u" || (window.addEventListener("keydown", (t) => {
@@ -13243,7 +13278,7 @@ var Ou = class {
13243
13278
  }
13244
13279
  return !this.parent.options.passiveWheel;
13245
13280
  }
13246
- }, rd = {
13281
+ }, ad = {
13247
13282
  screenWidth: typeof window > "u" ? 0 : window.innerWidth,
13248
13283
  screenHeight: typeof window > "u" ? 0 : window.innerHeight,
13249
13284
  worldWidth: null,
@@ -13256,12 +13291,12 @@ var Ou = class {
13256
13291
  disableOnContextMenu: !1,
13257
13292
  ticker: ee.shared,
13258
13293
  allowPreserveDragOutside: !1
13259
- }, id = class extends a {
13294
+ }, od = class extends a {
13260
13295
  constructor(e) {
13261
13296
  super(), this._disableOnContextMenu = (e) => e.preventDefault(), this.options = {
13262
- ...rd,
13297
+ ...ad,
13263
13298
  ...e
13264
- }, this.screenWidth = this.options.screenWidth, this.screenHeight = this.options.screenHeight, this._worldWidth = this.options.worldWidth, this._worldHeight = this.options.worldHeight, this.forceHitArea = this.options.forceHitArea, this.threshold = this.options.threshold, this.options.disableOnContextMenu && this.options.events.domElement.addEventListener("contextmenu", this._disableOnContextMenu), this.options.noTicker || (this.tickerFunction = () => this.update(this.options.ticker.elapsedMS), this.options.ticker.add(this.tickerFunction)), this.input = new Ou(this), this.plugins = new Au(this);
13299
+ }, this.screenWidth = this.options.screenWidth, this.screenHeight = this.options.screenHeight, this._worldWidth = this.options.worldWidth, this._worldHeight = this.options.worldHeight, this.forceHitArea = this.options.forceHitArea, this.threshold = this.options.threshold, this.options.disableOnContextMenu && this.options.events.domElement.addEventListener("contextmenu", this._disableOnContextMenu), this.options.noTicker || (this.tickerFunction = () => this.update(this.options.ticker.elapsedMS), this.options.ticker.add(this.tickerFunction)), this.input = new Au(this), this.plugins = new Mu(this);
13265
13300
  }
13266
13301
  destroy(e) {
13267
13302
  var t;
@@ -13396,7 +13431,7 @@ var Ou = class {
13396
13431
  this.setZoom(e, !0);
13397
13432
  }
13398
13433
  snapZoom(e) {
13399
- return this.plugins.add("snap-zoom", new ed(this, e)), this;
13434
+ return this.plugins.add("snap-zoom", new nd(this, e)), this;
13400
13435
  }
13401
13436
  OOB() {
13402
13437
  return {
@@ -13444,37 +13479,37 @@ var Ou = class {
13444
13479
  e ? (this._forceHitArea = e, this.hitArea = e) : (this._forceHitArea = null, this.hitArea = new b(0, 0, this.worldWidth, this.worldHeight));
13445
13480
  }
13446
13481
  drag(e) {
13447
- return this.plugins.add("drag", new Uu(this, e)), this;
13482
+ return this.plugins.add("drag", new Gu(this, e)), this;
13448
13483
  }
13449
13484
  clamp(e) {
13450
- return this.plugins.add("clamp", new Iu(this, e)), this;
13485
+ return this.plugins.add("clamp", new Ru(this, e)), this;
13451
13486
  }
13452
13487
  decelerate(e) {
13453
- return this.plugins.add("decelerate", new Vu(this, e)), this;
13488
+ return this.plugins.add("decelerate", new Uu(this, e)), this;
13454
13489
  }
13455
13490
  bounce(e) {
13456
- return this.plugins.add("bounce", new Pu(this, e)), this;
13491
+ return this.plugins.add("bounce", new Iu(this, e)), this;
13457
13492
  }
13458
13493
  pinch(e) {
13459
- return this.plugins.add("pinch", new Xu(this, e)), this;
13494
+ return this.plugins.add("pinch", new Qu(this, e)), this;
13460
13495
  }
13461
13496
  snap(e, t, n) {
13462
- return this.plugins.add("snap", new Qu(this, e, t, n)), this;
13497
+ return this.plugins.add("snap", new ed(this, e, t, n)), this;
13463
13498
  }
13464
13499
  follow(e, t) {
13465
- return this.plugins.add("follow", new Gu(this, e, t)), this;
13500
+ return this.plugins.add("follow", new qu(this, e, t)), this;
13466
13501
  }
13467
13502
  wheel(e) {
13468
- return this.plugins.add("wheel", new nd(this, e)), this;
13503
+ return this.plugins.add("wheel", new id(this, e)), this;
13469
13504
  }
13470
13505
  animate(e) {
13471
- return this.plugins.add("animate", new Mu(this, e)), this;
13506
+ return this.plugins.add("animate", new Pu(this, e)), this;
13472
13507
  }
13473
13508
  clampZoom(e) {
13474
- return this.plugins.add("clamp-zoom", new Ru(this, e)), this;
13509
+ return this.plugins.add("clamp-zoom", new Bu(this, e)), this;
13475
13510
  }
13476
13511
  mouseEdges(e) {
13477
- return this.plugins.add("mouse-edges", new qu(this, e)), this;
13512
+ return this.plugins.add("mouse-edges", new Yu(this, e)), this;
13478
13513
  }
13479
13514
  get pause() {
13480
13515
  return !!this._pause;
@@ -13493,7 +13528,7 @@ var Ou = class {
13493
13528
  type: "ensureVisible"
13494
13529
  });
13495
13530
  }
13496
- }, ad = [
13531
+ }, sd = [
13497
13532
  "bounce-x-end",
13498
13533
  "bounce-x-start",
13499
13534
  "bounce-y-end",
@@ -13524,7 +13559,7 @@ R("Viewport", class extends G(a) {
13524
13559
  noTicker: !0,
13525
13560
  events: { domElement: { addEventListener: () => {} } }
13526
13561
  };
13527
- this.viewport = new id(e), super.addChild(this.viewport), this.#e = new p(), super.addChild(this.#e), this.mask = this.#e;
13562
+ this.viewport = new od(e), super.addChild(this.viewport), this.#e = new p(), super.addChild(this.#e), this.mask = this.#e;
13528
13563
  }
13529
13564
  addChild(...e) {
13530
13565
  return this.viewport.addChild(...e);
@@ -13534,7 +13569,7 @@ R("Viewport", class extends G(a) {
13534
13569
  }
13535
13570
  onInit(e) {
13536
13571
  super.onInit(e);
13537
- for (let t of ad) e[t] && this.viewport.on(t, e[t]);
13572
+ for (let t of sd) e[t] && this.viewport.on(t, e[t]);
13538
13573
  }
13539
13574
  async onMount(e, t) {
13540
13575
  e.props.context.viewport = this.viewport, await super.onMount(e, t);
@@ -13571,7 +13606,7 @@ R("Viewport", class extends G(a) {
13571
13606
  return this.viewport.plugins;
13572
13607
  }
13573
13608
  });
13574
- function od(e) {
13609
+ function cd(e) {
13575
13610
  return V("Viewport", e);
13576
13611
  }
13577
13612
  R("NineSliceSprite", class extends G(_) {
@@ -13585,12 +13620,12 @@ R("NineSliceSprite", class extends G(_) {
13585
13620
  for (let [t, r] of Object.entries(e)) r !== void 0 && (t === "image" ? this.texture = await n.load(r) : t in this && (this[t] = r));
13586
13621
  }
13587
13622
  });
13588
- function sd(e) {
13623
+ function ld(e) {
13589
13624
  return V("NineSliceSprite", e);
13590
13625
  }
13591
13626
  //#endregion
13592
13627
  //#region src/components/DOMElement.ts
13593
- var cd = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemove.mouseup.mousedown.touchstart.touchend.touchmove.touchcancel.wheel.scroll.resize.focus.blur.change.input.submit.reset.keydown.keyup.keypress.contextmenu.drag.dragend.dragenter.dragleave.dragover.drop.dragstart.select.selectstart.selectend.selectall.selectnone".split("."), ld = class {
13628
+ var ud = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemove.mouseup.mousedown.touchstart.touchend.touchmove.touchcancel.wheel.scroll.resize.focus.blur.change.input.submit.reset.keydown.keyup.keypress.contextmenu.drag.dragend.dragenter.dragleave.dragover.drop.dragstart.select.selectstart.selectend.selectall.selectnone".split("."), dd = class {
13594
13629
  constructor() {
13595
13630
  this.eventListeners = /* @__PURE__ */ new Map(), this.onBeforeDestroy = null, this.valueSignal = null, this.isFormElementType = !1, this.classSubscriptions = [], this.childTextSubscriptions = [];
13596
13631
  }
@@ -13692,7 +13727,7 @@ var cd = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemo
13692
13727
  this.isFormElementType = this.isFormElement(this.element.tagName);
13693
13728
  }
13694
13729
  (e.onBeforeDestroy || e["on-before-destroy"]) && (this.onBeforeDestroy = e.onBeforeDestroy || e["on-before-destroy"]);
13695
- for (let t of cd) if (e.attrs?.[t]) {
13730
+ for (let t of ud) if (e.attrs?.[t]) {
13696
13731
  let n = (n) => {
13697
13732
  if (t === "submit" && this.element.tagName.toLowerCase() === "form") {
13698
13733
  n.preventDefault();
@@ -13733,7 +13768,7 @@ var cd = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemo
13733
13768
  let e = this.element.value, t = n();
13734
13769
  e !== t && (this.element.value = t);
13735
13770
  } else this.element.value = n;
13736
- else cd.includes(t) || this.element.setAttribute(t, n);
13771
+ else ud.includes(t) || this.element.setAttribute(t, n);
13737
13772
  if ("textContent" in e) {
13738
13773
  let t = e.textContent;
13739
13774
  this.element.textContent = t == null ? "" : String(t);
@@ -13752,8 +13787,8 @@ var cd = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemo
13752
13787
  }
13753
13788
  }
13754
13789
  };
13755
- R("DOMElement", ld);
13756
- var ud = (e) => V("DOMElement", e);
13790
+ R("DOMElement", dd);
13791
+ var fd = (e) => V("DOMElement", e);
13757
13792
  R("DOMContainer", class e extends G(s) {
13758
13793
  constructor(...e) {
13759
13794
  super(...e), this.disableLayout = !0, this.canvasSizeEffect = null;
@@ -13890,7 +13925,7 @@ R("DOMContainer", class e extends G(s) {
13890
13925
  } : typeof r.style == "string" ? r.style = `${r.style}; z-index: ${e.zIndex}` : r.style = { zIndex: e.zIndex }), t ? (n.attrs = { ...r }, n.attrs.class = i(n.attrs.class)) : Object.keys(r).length > 0 && (n.attrs = r);
13891
13926
  let a = this.routeDomChildren(e.children);
13892
13927
  e.children = a;
13893
- let o = K(ud, n, a);
13928
+ let o = K(fd, n, a);
13894
13929
  this.element = o.componentInstance.element;
13895
13930
  }
13896
13931
  async onMount(e, t) {
@@ -13908,8 +13943,8 @@ R("DOMContainer", class e extends G(s) {
13908
13943
  });
13909
13944
  }
13910
13945
  });
13911
- var dd = (e) => V("DOMContainer", e), fd = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemove.mouseup.mousedown.touchstart.touchend.touchmove.touchcancel.wheel.scroll.resize.focus.blur.change.input.submit.reset.keydown.keyup.keypress.contextmenu.drag.dragend.dragenter.dragleave.dragover.drop.dragstart.select.selectstart.selectend.selectall.selectnone".split(".");
13912
- R("DOMSprite", class extends ld {
13946
+ var pd = (e) => V("DOMContainer", e), md = /* @__PURE__ */ "click.mouseover.mouseout.mouseenter.mouseleave.mousemove.mouseup.mousedown.touchstart.touchend.touchmove.touchcancel.wheel.scroll.resize.focus.blur.change.input.submit.reset.keydown.keyup.keypress.contextmenu.drag.dragend.dragenter.dragleave.dragover.drop.dragstart.select.selectstart.selectend.selectall.selectnone".split(".");
13947
+ R("DOMSprite", class extends dd {
13913
13948
  constructor(...e) {
13914
13949
  super(...e), this.frameIndex = 0, this.frames = [], this.fps = 120, this.loop = !0, this.playing = !0, this.hasExternalFrameIndex = !1, this.elapsed = 0, this.sheetSubscriptions = [], this.sheetAnimations = /* @__PURE__ */ new Map(), this.sheetParams = {}, this.sheetTime = 0, this.sheetFrameIndex = 0, this.sheetFinished = !1, this.sheetLoadToken = 0, this.renderElementType = "div", this.wrapperElementType = "div", this.isAnimating = !1, this.frameWidth = 0, this.frameHeight = 0, this.isContained = !1;
13915
13950
  }
@@ -14054,7 +14089,7 @@ R("DOMSprite", class extends ld {
14054
14089
  }
14055
14090
  mergeEventAttrs(e) {
14056
14091
  let t = e.attrs ? { ...e.attrs } : void 0;
14057
- for (let n of fd) {
14092
+ for (let n of md) {
14058
14093
  let r = e[n];
14059
14094
  r && !t?.[n] && (t ||= {}, t[n] = r);
14060
14095
  }
@@ -14075,7 +14110,9 @@ R("DOMSprite", class extends ld {
14075
14110
  let t = P(e.sheet) ? e.sheet() : e.sheet;
14076
14111
  if (t?.definition !== void 0) {
14077
14112
  let e = this.resolveSheetDefinition(t.definition);
14078
- (e instanceof Promise || e && e !== this.sheetDefinition) && this.setSheetDefinition(e);
14113
+ e instanceof Promise ? e.then((e) => {
14114
+ e && this.setSheetDefinition(e);
14115
+ }) : e && e !== this.sheetDefinition && this.setSheetDefinition(e);
14079
14116
  }
14080
14117
  t?.params !== void 0 && (this.sheetParams = {
14081
14118
  ...this.sheetParams,
@@ -14340,11 +14377,11 @@ R("DOMSprite", class extends ld {
14340
14377
  this.render();
14341
14378
  }
14342
14379
  });
14343
- var pd = (e) => V("DOMSprite", e), Z = /* @__PURE__ */ function(e) {
14380
+ var hd = (e) => V("DOMSprite", e), Z = /* @__PURE__ */ function(e) {
14344
14381
  return e.Normal = "normal", e.Hover = "hover", e.Pressed = "pressed", e.Disabled = "disabled", e;
14345
14382
  }({});
14346
- function md(e) {
14347
- let t = N(Z.Normal), n = N(!1), r = N(!1), { text: i, disabled: a, width: o, height: s, style: c, shape: l, controlName: u } = Ga(e)({
14383
+ function gd(e) {
14384
+ let t = N(Z.Normal), n = N(!1), r = N(!1), { text: i, disabled: a, width: o, height: s, style: c, shape: l, controlName: u } = qa(e)({
14348
14385
  text: {
14349
14386
  type: String,
14350
14387
  default: ""
@@ -14417,17 +14454,17 @@ function md(e) {
14417
14454
  };
14418
14455
  return e[t()] || e[Z.Normal];
14419
14456
  });
14420
- return n === "circle" ? K(Go, {
14457
+ return n === "circle" ? K(qo, {
14421
14458
  radius: F(() => Math.min(o(), s()) / 2),
14422
14459
  x: F(() => o() / 2),
14423
14460
  y: F(() => s() / 2),
14424
14461
  color: r
14425
- }) : K(n === "ellipse" ? Ko : Wo, {
14462
+ }) : K(n === "ellipse" ? Jo : Ko, {
14426
14463
  width: o,
14427
14464
  height: s,
14428
14465
  color: r
14429
14466
  });
14430
- }, m = () => e.children && e.children.length > 0 ? e.children : [K(bu, {
14467
+ }, m = () => e.children && e.children.length > 0 ? e.children : [K(Su, {
14431
14468
  text: i,
14432
14469
  x: F(() => o() / 2),
14433
14470
  y: F(() => s() / 2),
@@ -14444,7 +14481,7 @@ function md(e) {
14444
14481
  };
14445
14482
  })()
14446
14483
  })];
14447
- return K(Bo, {
14484
+ return K(Ho, {
14448
14485
  x: e.x,
14449
14486
  y: e.y,
14450
14487
  width: e.width,
@@ -14461,7 +14498,7 @@ function md(e) {
14461
14498
  var Q = /* @__PURE__ */ function(e) {
14462
14499
  return e.LEFT = "left", e.TOP = "top", e.BOTTOM = "bottom", e.RIGHT = "right", e.TOP_LEFT = "top_left", e.TOP_RIGHT = "top_right", e.BOTTOM_LEFT = "bottom_left", e.BOTTOM_RIGHT = "bottom_right", e;
14463
14500
  }({});
14464
- function hd(t = {}) {
14501
+ function _d(t = {}) {
14465
14502
  let n = Object.assign({
14466
14503
  outerScale: {
14467
14504
  x: 1,
@@ -14538,14 +14575,14 @@ function hd(t = {}) {
14538
14575
  C && (C.handleJoystickChange ? C.handleJoystickChange(S) : C.joystick && C.joystick.handleJoystickChange && C.joystick.handleJoystickChange(S));
14539
14576
  }
14540
14577
  let g, _;
14541
- _ = n.outer ? K(oc, {
14578
+ _ = n.outer ? K(cc, {
14542
14579
  image: n.outer,
14543
14580
  anchor: {
14544
14581
  x: .5,
14545
14582
  y: .5
14546
14583
  },
14547
14584
  scale: n.outerScale
14548
- }) : K(Vo, {
14585
+ }) : K(Uo, {
14549
14586
  draw: (e) => {
14550
14587
  e.circle(0, 0, 70).fill(n.outerColor);
14551
14588
  },
@@ -14557,12 +14594,12 @@ function hd(t = {}) {
14557
14594
  y: l,
14558
14595
  alpha: u
14559
14596
  };
14560
- return g = n.inner ? n.inner : K(Vo, {
14597
+ return g = n.inner ? n.inner : K(Uo, {
14561
14598
  draw: (e) => {
14562
14599
  e.circle(0, 0, 10 * 2.5).fill(n.innerColor);
14563
14600
  },
14564
14601
  ...v
14565
- }), K(Bo, {
14602
+ }), K(Ho, {
14566
14603
  ...t,
14567
14604
  pointerdown: p,
14568
14605
  pointerup: m,
@@ -14572,7 +14609,7 @@ function hd(t = {}) {
14572
14609
  }
14573
14610
  //#endregion
14574
14611
  //#region src/engine/FocusManager.ts
14575
- var gd = class e {
14612
+ var vd = class e {
14576
14613
  constructor() {
14577
14614
  this.containers = /* @__PURE__ */ new Map(), this.scrollAnimations = /* @__PURE__ */ new Map();
14578
14615
  }
@@ -14762,7 +14799,7 @@ var gd = class e {
14762
14799
  };
14763
14800
  requestAnimationFrame(l);
14764
14801
  }
14765
- }, $ = gd.getInstance();
14802
+ }, $ = vd.getInstance();
14766
14803
  A("focusNavigation", class extends k {
14767
14804
  constructor(...e) {
14768
14805
  super(...e), this.element = null, this.controlsDirective = null, this.controlsSubscription = null;
@@ -14899,7 +14936,7 @@ A("focusNavigation", class extends k {
14899
14936
  return this.focusedElementSignal;
14900
14937
  }
14901
14938
  });
14902
- var _d = (e) => V("Navigation", e), vd = _d, yd = async (e, n, r) => {
14939
+ var yd = (e) => V("Navigation", e), bd = yd, xd = async (e, n, r) => {
14903
14940
  let { components: i, autoRegister: a, enableLayout: o, ...s } = r ?? {};
14904
14941
  o !== !1 && await import("./dist-BOOc43Qm.js"), i ? (a !== !1 && La(), Object.entries(i).forEach(([e, t]) => {
14905
14942
  R(e, t);
@@ -14944,13 +14981,13 @@ var _d = (e) => V("Navigation", e), vd = _d, yd = async (e, n, r) => {
14944
14981
  };
14945
14982
  //#endregion
14946
14983
  //#region src/hooks/useFocus.ts
14947
- function bd(e) {
14984
+ function Sd(e) {
14948
14985
  return $.getCurrentIndexSignal(e);
14949
14986
  }
14950
- function xd(e) {
14987
+ function Cd(e) {
14951
14988
  return $.getFocusedElementSignal(e);
14952
14989
  }
14953
- function Sd(e, t) {
14990
+ function wd(e, t) {
14954
14991
  let n = $.getCurrentIndexSignal(e), r = $.getFocusedElementSignal(e);
14955
14992
  if (!n || !r) return console.warn(`FocusContainer with id "${e}" not found`), () => {};
14956
14993
  let i = I(() => {
@@ -14962,7 +14999,7 @@ function Sd(e, t) {
14962
14999
  }
14963
15000
  //#endregion
14964
15001
  //#region src/utils/Ease.ts
14965
- var Cd = {
15002
+ var Td = {
14966
15003
  linear: Mi,
14967
15004
  easeIn: Ni,
14968
15005
  easeInOut: Fi,
@@ -14977,7 +15014,7 @@ var Cd = {
14977
15014
  bounceIn: qi,
14978
15015
  bounceInOut: Ji,
14979
15016
  bounceOut: Ki
14980
- }, wd = class {
15017
+ }, Ed = class {
14981
15018
  constructor(e, t, n, r, i, a, s = 0) {
14982
15019
  this.x0 = e, this.y0 = t, this.x1 = n, this.y1 = r, this.x2 = i, this.y2 = a, this.focalPoint = s, this.gradient = null, this.texture = null, this.size = 600, this.size = e;
14983
15020
  let c = this.size * .5;
@@ -15005,7 +15042,7 @@ var Cd = {
15005
15042
  };
15006
15043
  //#endregion
15007
15044
  //#region src/utils/tabindex.ts
15008
- function Td(e) {
15045
+ function Dd(e) {
15009
15046
  if ("count" in e) {
15010
15047
  let t = e.count();
15011
15048
  if (!Number.isFinite(t) || t <= 0) return null;
@@ -15023,7 +15060,7 @@ function Td(e) {
15023
15060
  size: n - t + 1
15024
15061
  };
15025
15062
  }
15026
- function Ed(e, t, n, r) {
15063
+ function Od(e, t, n, r) {
15027
15064
  if (r === "clamp") return Math.min(n.max, Math.max(n.min, e));
15028
15065
  if (r === "none") return e < n.min || e > n.max ? t : e;
15029
15066
  let i = n.size;
@@ -15031,11 +15068,11 @@ function Ed(e, t, n, r) {
15031
15068
  let a = ((e - n.min) % i + i) % i;
15032
15069
  return n.min + a;
15033
15070
  }
15034
- function Dd(e, t, n = "wrap") {
15071
+ function kd(e, t, n = "wrap") {
15035
15072
  let r = (r) => {
15036
- let i = e(), a = Td(t);
15073
+ let i = e(), a = Dd(t);
15037
15074
  if (!a) return;
15038
- let o = Ed(r, i, a, n);
15075
+ let o = Od(r, i, a, n);
15039
15076
  o !== i && e.set(o);
15040
15077
  };
15041
15078
  return {
@@ -15044,7 +15081,7 @@ function Dd(e, t, n = "wrap") {
15044
15081
  };
15045
15082
  }
15046
15083
  //#endregion
15047
- var Od = Ja.Howler;
15048
- export { ir as ArraySubject, md as Button, Z as ButtonState, Ro as Canvas, Go as Circle, Po as Clip, Bo as Container, jn as ControlsBase, Ua as ControlsDirective, dd as DOMContainer, ud as DOMElement, pd as DOMSprite, G as DisplayObject, eo as Drag, $a as Drop, Io as EVENTS, Cd as Easing, Ko as Ellipse, oo as Flash, _d as FocusContainer, gd as FocusManager, co as FogVisibility, Qn as GamepadControls, Vo as Graphics, Ja as Howl, Od as Howler, Mn as Input, hd as Joystick, er as JoystickControls, Fn as KeyboardControls, Yo as Mesh, vd as Navigation, sd as NineSliceSprite, or as ObjectSubject, Fo as Occlusion, No as Outline, nc as ParticlesEmitter, wd as RadialGradient, Wo as Rect, is as Scene, Wa as Scheduler, ao as Shake, Xa as Sound, oc as Sprite, Jo as Svg, bu as Text, xu as TilingSprite, to as Transition, qo as Triangle, mn as Utils, sc as Video, od as Viewport, qa as ViewportFollow, Da as animatedSequence, Ea as animatedSignal, yd as bootstrapCanvas, Ra as checkDependencies, F as computed, Ha as cond, V as createComponent, rs as createHotComponent, Dd as createTabindexNavigator, Xo as currentSubscriptionsTracker, B as destroyElement, I as effect, $ as focusManager, K as h, Ta as isAnimatedSignal, ar as isArraySubject, lr as isComputed, L as isElement, z as isElementFrozen, sr as isObjectSubject, Kt as isObservable, ka as isPrimitive, P as isSignal, no as isTrigger, ur as linkedSignal, Va as loop, $o as mount, Zo as mountTracker, io as on, La as registerAllComponents, R as registerComponent, N as signal, es as tick, ro as trigger, dr as untracked, Ga as useDefineProps, Sd as useFocusChange, bd as useFocusIndex, xd as useFocusedElement, H as useProps, za as waitForDependencies };
15084
+ var Ad = Xa.Howler;
15085
+ export { ir as ArraySubject, gd as Button, Z as ButtonState, Bo as Canvas, qo as Circle, Io as Clip, Ho as Container, jn as ControlsBase, Ua as ControlsDirective, pd as DOMContainer, fd as DOMElement, hd as DOMSprite, G as DisplayObject, no as Drag, to as Drop, Ro as EVENTS, Td as Easing, Jo as Ellipse, co as Flash, yd as FocusContainer, vd as FocusManager, uo as FogVisibility, Qn as GamepadControls, Uo as Graphics, Xa as Howl, Ad as Howler, Mn as Input, _d as Joystick, er as JoystickControls, Fn as KeyboardControls, Zo as Mesh, bd as Navigation, ld as NineSliceSprite, or as ObjectSubject, Lo as Occlusion, Fo as Outline, ic as ParticlesEmitter, Ed as RadialGradient, Ko as Rect, os as Scene, Wa as Scheduler, so as Shake, Qa as Sound, cc as Sprite, Xo as Svg, Su as Text, Cu as TilingSprite, ro as Transition, Yo as Triangle, mn as Utils, lc as Video, cd as Viewport, Ya as ViewportFollow, Da as animatedSequence, Ea as animatedSignal, xd as bootstrapCanvas, Ra as checkDependencies, F as computed, Ha as cond, V as createComponent, as as createHotComponent, kd as createTabindexNavigator, Qo as currentSubscriptionsTracker, B as destroyElement, I as effect, $ as focusManager, K as h, Ta as isAnimatedSignal, ar as isArraySubject, lr as isComputed, L as isElement, z as isElementFrozen, sr as isObjectSubject, Kt as isObservable, ka as isPrimitive, P as isSignal, io as isTrigger, ur as linkedSignal, Va as loop, ts as mount, $o as mountTracker, oo as on, La as registerAllComponents, R as registerComponent, N as signal, ns as tick, ao as trigger, dr as untracked, qa as useDefineProps, wd as useFocusChange, Sd as useFocusIndex, Cd as useFocusedElement, H as useProps, za as waitForDependencies };
15049
15086
 
15050
15087
  //# sourceMappingURL=index.js.map