exodeui 6.0.22 → 6.0.24

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.mjs CHANGED
@@ -1,29 +1,29 @@
1
1
  var WQ = Object.defineProperty;
2
2
  var ZQ = (B, A, I) => A in B ? WQ(B, A, { enumerable: !0, configurable: !0, writable: !0, value: I }) : B[A] = I;
3
- var GA = (B, A, I) => ZQ(B, typeof A != "symbol" ? A + "" : A, I);
3
+ var tA = (B, A, I) => ZQ(B, typeof A != "symbol" ? A + "" : A, I);
4
4
  import { jsx as jQ } from "react/jsx-runtime";
5
5
  import { forwardRef as XQ, useRef as rI, useImperativeHandle as vQ, useEffect as PA, useState as PQ, useCallback as $A } from "react";
6
- var O = /* @__PURE__ */ ((B) => (B.Proximity = "Proximity", B.Magnetic = "Magnetic", B.Parallax = "Parallax", B.Velocity = "Velocity", B.Shear = "Shear", B.Repel = "Repel", B.Orbit = "Orbit", B.Elastic = "Elastic", B.Dilation = "Dilation", B.Vortex = "Vortex", B.Fluid = "Fluid", B.Holographic = "Holographic", B.Sticky = "Sticky", B.Spotlight = "Spotlight", B.Noise = "Noise", B.Draggable = "Draggable", B.Scroll = "Scroll", B.Follower = "Follower", B.Lens = "Lens", B.LookAt = "LookAt", B.Pulse = "Pulse", B.Wrap = "Wrap", B.Glint = "Glint", B.Gravity = "Gravity", B.Ratchet = "Ratchet", B.Jitter = "Jitter", B.Scan = "Scan", B.Float = "Float", B.Typewriter = "Typewriter", B.Scramble = "Scramble", B.Wave = "Wave", B.Bounce = "Bounce", B.GlitchText = "GlitchText", B.TextTrail = "TextTrail", B.Reveal3D = "Reveal3D", B.RevealSlide = "RevealSlide", B.RevealBlur = "RevealBlur", B.TextLiquid = "TextLiquid", B.TextVortex = "TextVortex", B.TextExplosion = "TextExplosion", B.TextRain = "TextRain", B.TextGravity = "TextGravity", B.TextElastic = "TextElastic", B.TextMatrix = "TextMatrix", B.TextNeon = "TextNeon", B.TextGlitch3D = "TextGlitch3D", B.TextDissolve = "TextDissolve", B.TextOrganic = "TextOrganic", B.TextBreathe = "TextBreathe", B.TextFloral = "TextFloral", B.TextSmoke = "TextSmoke", B.TextVariable = "TextVariable", B.TextMagnet = "TextMagnet", B.TextSpin = "TextSpin", B.TextZing = "TextZing", B.TextPerspective = "TextPerspective", B.TextMirror = "TextMirror", B))(O || {}), TA = /* @__PURE__ */ ((B) => (B.Scale = "Scale", B.Opacity = "Opacity", B.RotateZ = "RotateZ", B.RotateX = "RotateX", B.RotateY = "RotateY", B.PositionX = "PositionX", B.PositionY = "PositionY", B.SkewX = "SkewX", B.Blur = "Blur", B.Exposure = "Exposure", B.HueShift = "HueShift", B.Negative = "Negative", B.CornerRadius = "CornerRadius", B.StrokeWidth = "StrokeWidth", B.BoxShadow = "BoxShadow", B.FontSize = "FontSize", B.LetterSpacing = "LetterSpacing", B))(TA || {}), VQ = /* @__PURE__ */ ((B) => (B.Equal = "Equal", B.NotEqual = "NotEqual", B.GreaterThan = "GreaterThan", B.LessThan = "LessThan", B.GreaterEqual = "GreaterEqual", B.LessEqual = "LessEqual", B.IsTrue = "IsTrue", B.IsFalse = "IsFalse", B))(VQ || {}), nI = /* @__PURE__ */ ((B) => (B.AND = "AND", B.OR = "OR", B.NOT = "NOT", B.XOR = "XOR", B))(nI || {});
7
- function KC(B, A, I, C) {
8
- let g = String(B || "").trim();
9
- if (g && !isNaN(Number(g)) && !g.includes(" ") && !g.endsWith("fr") && !g.endsWith("px") && !g.endsWith("%")) {
10
- const o = Math.max(1, parseInt(g));
11
- g = new Array(o).fill("1fr").join(" ");
12
- }
13
- const Q = g.split(/\s+/).filter(Boolean), E = new Array(Q.length).fill(0);
14
- let i = A - (Q.length - 1) * I, w = 0;
15
- if (Q.forEach((o, s) => {
16
- if (o.endsWith("px")) {
17
- const h = parseFloat(o);
18
- E[s] = h, i -= h;
19
- } else o.endsWith("fr") ? w += parseFloat(o) : o === "auto" && (E[s] = 100, i -= 100);
20
- }), w > 0 && i > 0) {
21
- const o = i / w;
22
- Q.forEach((s, h) => {
23
- s.endsWith("fr") && (E[h] = o * parseFloat(s));
6
+ var Z = /* @__PURE__ */ ((B) => (B.Proximity = "Proximity", B.Magnetic = "Magnetic", B.Parallax = "Parallax", B.Velocity = "Velocity", B.Shear = "Shear", B.Repel = "Repel", B.Orbit = "Orbit", B.Elastic = "Elastic", B.Dilation = "Dilation", B.Vortex = "Vortex", B.Fluid = "Fluid", B.Holographic = "Holographic", B.Sticky = "Sticky", B.Spotlight = "Spotlight", B.Noise = "Noise", B.Draggable = "Draggable", B.Scroll = "Scroll", B.Follower = "Follower", B.Lens = "Lens", B.LookAt = "LookAt", B.Pulse = "Pulse", B.Wrap = "Wrap", B.Glint = "Glint", B.Gravity = "Gravity", B.Ratchet = "Ratchet", B.Jitter = "Jitter", B.Scan = "Scan", B.Float = "Float", B.Typewriter = "Typewriter", B.Scramble = "Scramble", B.Wave = "Wave", B.Bounce = "Bounce", B.GlitchText = "GlitchText", B.TextTrail = "TextTrail", B.Reveal3D = "Reveal3D", B.RevealSlide = "RevealSlide", B.RevealBlur = "RevealBlur", B.TextLiquid = "TextLiquid", B.TextVortex = "TextVortex", B.TextExplosion = "TextExplosion", B.TextRain = "TextRain", B.TextGravity = "TextGravity", B.TextElastic = "TextElastic", B.TextMatrix = "TextMatrix", B.TextNeon = "TextNeon", B.TextGlitch3D = "TextGlitch3D", B.TextDissolve = "TextDissolve", B.TextOrganic = "TextOrganic", B.TextBreathe = "TextBreathe", B.TextFloral = "TextFloral", B.TextSmoke = "TextSmoke", B.TextVariable = "TextVariable", B.TextMagnet = "TextMagnet", B.TextSpin = "TextSpin", B.TextZing = "TextZing", B.TextPerspective = "TextPerspective", B.TextMirror = "TextMirror", B))(Z || {}), TA = /* @__PURE__ */ ((B) => (B.Scale = "Scale", B.Opacity = "Opacity", B.RotateZ = "RotateZ", B.RotateX = "RotateX", B.RotateY = "RotateY", B.PositionX = "PositionX", B.PositionY = "PositionY", B.SkewX = "SkewX", B.Blur = "Blur", B.Exposure = "Exposure", B.HueShift = "HueShift", B.Negative = "Negative", B.CornerRadius = "CornerRadius", B.StrokeWidth = "StrokeWidth", B.BoxShadow = "BoxShadow", B.FontSize = "FontSize", B.LetterSpacing = "LetterSpacing", B))(TA || {}), VQ = /* @__PURE__ */ ((B) => (B.Equal = "Equal", B.NotEqual = "NotEqual", B.GreaterThan = "GreaterThan", B.LessThan = "LessThan", B.GreaterEqual = "GreaterEqual", B.LessEqual = "LessEqual", B.IsTrue = "IsTrue", B.IsFalse = "IsFalse", B))(VQ || {}), nI = /* @__PURE__ */ ((B) => (B.AND = "AND", B.OR = "OR", B.NOT = "NOT", B.XOR = "XOR", B))(nI || {});
7
+ function KC(B, A, I) {
8
+ let C = String(B || "").trim();
9
+ if (C && !isNaN(Number(C)) && !C.includes(" ") && !C.endsWith("fr") && !C.endsWith("px") && !C.endsWith("%")) {
10
+ const w = Math.max(1, parseInt(C));
11
+ C = new Array(w).fill("1fr").join(" ");
12
+ }
13
+ const g = C.split(/\s+/).filter(Boolean), Q = new Array(g.length).fill(0);
14
+ let E = A - (g.length - 1) * I, i = 0;
15
+ if (g.forEach((w, o) => {
16
+ if (w.endsWith("px")) {
17
+ const s = parseFloat(w);
18
+ Q[o] = s, E -= s;
19
+ } else w.endsWith("fr") ? i += parseFloat(w) : w === "auto" && (Q[o] = 100, E -= 100);
20
+ }), i > 0 && E > 0) {
21
+ const w = E / i;
22
+ g.forEach((o, s) => {
23
+ o.endsWith("fr") && (Q[s] = w * parseFloat(o));
24
24
  });
25
25
  }
26
- return E;
26
+ return Q;
27
27
  }
28
28
  function SC(B, A, I) {
29
29
  try {
@@ -34,36 +34,36 @@ function SC(B, A, I) {
34
34
  }
35
35
  }
36
36
  function zQ(B, A, I) {
37
- var wA, EA;
38
- const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: w } = C, o = g === "vertical", s = A.map((u) => {
39
- const z = I(u.id), IA = u.geometry;
40
- let Z = (z == null ? void 0 : z.width) ?? IA.width ?? 100, p = (z == null ? void 0 : z.height) ?? IA.height ?? 100;
37
+ var sA, EA;
38
+ const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: w } = C, o = g === "vertical", s = A.map((T) => {
39
+ const V = I(T.id), IA = T.geometry;
40
+ let x = (V == null ? void 0 : V.width) ?? IA.width ?? 100, d = (V == null ? void 0 : V.height) ?? IA.height ?? 100;
41
41
  if (IA.type === "Ellipse" || IA.type === "Polygon" || IA.type === "Star") {
42
- const d = (z == null ? void 0 : z.radius) ?? IA.radius ?? (z == null ? void 0 : z.outer_radius) ?? IA.outer_radius ?? 50;
43
- Z = d * 2, p = d * 2;
42
+ const p = (V == null ? void 0 : V.radius) ?? IA.radius ?? (V == null ? void 0 : V.outer_radius) ?? IA.outer_radius ?? 50;
43
+ x = p * 2, d = p * 2;
44
44
  }
45
- return Z *= u.transform.scale_x || 1, p *= u.transform.scale_y || 1, { id: u.id, w: Z, h: p, original: u };
45
+ return x *= T.transform.scale_x || 1, d *= T.transform.scale_y || 1, { id: T.id, w: x, h: d, original: T };
46
46
  });
47
47
  let h = B.width, a = B.height;
48
- const G = ((wA = B.layoutProps) == null ? void 0 : wA.width) === "hug", t = ((EA = B.layoutProps) == null ? void 0 : EA.height) === "hug", K = [];
48
+ const G = ((sA = B.layoutProps) == null ? void 0 : sA.width) === "hug", t = ((EA = B.layoutProps) == null ? void 0 : EA.height) === "hug", K = [];
49
49
  let S = [], y = 0, N = 0;
50
50
  const M = h - E.left - E.right, e = a - E.top - E.bottom;
51
- s.forEach((u) => {
52
- w && S.length > 0 && (o ? N + Q + u.h > e : y + Q + u.w > M) ? (K.push({ children: S, width: y, height: N }), S = [u], y = u.w, N = u.h) : (S.push(u), o ? (y = Math.max(y, u.w), N += (S.length > 1 ? Q : 0) + u.h) : (y += (S.length > 1 ? Q : 0) + u.w, N = Math.max(N, u.h)));
53
- }), S.length > 0 && K.push({ children: S, width: y, height: N }), G && !o && (h = Math.max(...K.map((u) => u.width), 0) + E.left + E.right), t && o && (a = Math.max(...K.map((u) => u.height), 0) + E.top + E.bottom);
51
+ s.forEach((T) => {
52
+ w && S.length > 0 && (o ? N + Q + T.h > e : y + Q + T.w > M) ? (K.push({ children: S, width: y, height: N }), S = [T], y = T.w, N = T.h) : (S.push(T), o ? (y = Math.max(y, T.w), N += (S.length > 1 ? Q : 0) + T.h) : (y += (S.length > 1 ? Q : 0) + T.w, N = Math.max(N, T.h)));
53
+ }), S.length > 0 && K.push({ children: S, width: y, height: N }), G && !o && (h = Math.max(...K.map((T) => T.width), 0) + E.left + E.right), t && o && (a = Math.max(...K.map((T) => T.height), 0) + E.top + E.bottom);
54
54
  const Y = [];
55
55
  let j = E.left, l = E.top;
56
- const r = i.toLowerCase(), v = r === "center" || r.endsWith("-center"), n = r.endsWith("-right"), L = r === "center" || r.startsWith("center-"), P = r.startsWith("bottom-");
57
- return K.forEach((u) => {
58
- let z = j, IA = l;
59
- o ? L ? IA = E.top + (a - E.top - E.bottom - u.height) / 2 : P && (IA = a - E.bottom - u.height) : v ? z = E.left + (h - E.left - E.right - u.width) / 2 : n && (z = h - E.right - u.width), u.children.forEach((Z) => {
60
- let p = z, d = IA;
61
- o ? v ? p += (u.width - Z.w) / 2 : n && (p += u.width - Z.w) : L ? d += (u.height - Z.h) / 2 : P && (d += u.height - Z.h), Y.push({
62
- id: Z.id,
63
- x: p + Z.w / 2 - h / 2,
64
- y: d + Z.h / 2 - a / 2
65
- }), o ? IA += Z.h + Q : z += Z.w + Q;
66
- }), o ? j += u.width + Q : l += u.height + Q;
56
+ const r = i.toLowerCase(), v = r === "center" || r.endsWith("-center"), n = r.endsWith("-right"), q = r === "center" || r.startsWith("center-"), P = r.startsWith("bottom-");
57
+ return K.forEach((T) => {
58
+ let V = j, IA = l;
59
+ o ? q ? IA = E.top + (a - E.top - E.bottom - T.height) / 2 : P && (IA = a - E.bottom - T.height) : v ? V = E.left + (h - E.left - E.right - T.width) / 2 : n && (V = h - E.right - T.width), T.children.forEach((x) => {
60
+ let d = V, p = IA;
61
+ o ? v ? d += (T.width - x.w) / 2 : n && (d += T.width - x.w) : q ? p += (T.height - x.h) / 2 : P && (p += T.height - x.h), Y.push({
62
+ id: x.id,
63
+ x: d + x.w / 2 - h / 2,
64
+ y: p + x.h / 2 - a / 2
65
+ }), o ? IA += x.h + Q : V += x.w + Q;
66
+ }), o ? j += T.width + Q : l += T.height + Q;
67
67
  }), { frameWidth: G ? h : void 0, frameHeight: t ? a : void 0, childUpdates: Y };
68
68
  }
69
69
  function _Q(B, A, I) {
@@ -71,50 +71,50 @@ function _Q(B, A, I) {
71
71
  if (!C) return { childUpdates: [] };
72
72
  const { gridColumns: g, gridRows: Q, columnGap: E = 0, rowGap: i = 0, padding: w, align: o } = C;
73
73
  let s = B.width, h = B.height;
74
- const a = s - w.left - w.right, G = h - w.top - w.bottom, t = KC(g || "1fr", a, E), K = KC(Q || "auto", G, i), S = t.length > 0 ? t.reduce((n, L) => n + L, 0) + (t.length - 1) * E : 0, y = K.length > 0 ? K.reduce((n, L) => n + L, 0) + (K.length - 1) * i : 0, N = o.toLowerCase(), M = N === "center" || N.endsWith("-center"), e = N.endsWith("-right"), Y = N === "center" || N.startsWith("center-"), j = N.startsWith("bottom-");
74
+ const a = s - w.left - w.right, G = h - w.top - w.bottom, t = KC(g || "1fr", a, E), K = KC(Q || "auto", G, i), S = t.length > 0 ? t.reduce((n, q) => n + q, 0) + (t.length - 1) * E : 0, y = K.length > 0 ? K.reduce((n, q) => n + q, 0) + (K.length - 1) * i : 0, N = o.toLowerCase(), M = N === "center" || N.endsWith("-center"), e = N.endsWith("-right"), Y = N === "center" || N.startsWith("center-"), j = N.startsWith("bottom-");
75
75
  let l = 0, r = 0;
76
76
  M ? l = (a - S) / 2 : e && (l = a - S), Y ? r = (G - y) / 2 : j && (r = G - y);
77
77
  const v = [];
78
- return A.forEach((n, L) => {
79
- var AA, sA;
80
- const P = L % t.length || 0, wA = Math.floor(L / t.length) || 0;
81
- wA >= K.length && K.push(100);
82
- const EA = t[P], u = K[wA];
83
- let z = w.left + l + t.slice(0, P).reduce((kA, qA) => kA + qA + E, 0), IA = w.top + r + K.slice(0, wA).reduce((kA, qA) => kA + qA + i, 0);
84
- const Z = I(n.id), p = n.geometry;
85
- let d = (Z == null ? void 0 : Z.width) ?? p.width ?? 100, R = (Z == null ? void 0 : Z.height) ?? p.height ?? 100;
86
- if (p.type === "Ellipse" || p.type === "Polygon" || p.type === "Star") {
87
- const kA = (Z == null ? void 0 : Z.radius) ?? p.radius ?? (Z == null ? void 0 : Z.outer_radius) ?? p.outer_radius ?? 50;
88
- d = kA * 2, R = kA * 2;
89
- }
90
- d *= n.transform.scale_x || 1, R *= n.transform.scale_y || 1;
91
- let m = z, b = IA;
92
- M ? m += (EA - d) / 2 : e && (m += EA - d), Y ? b += (u - R) / 2 : j && (b += u - R), v.push({
78
+ return A.forEach((n, q) => {
79
+ var $, hA;
80
+ const P = q % t.length || 0, sA = Math.floor(q / t.length) || 0;
81
+ sA >= K.length && K.push(100);
82
+ const EA = t[P], T = K[sA];
83
+ let V = w.left + l + t.slice(0, P).reduce((KA, FA) => KA + FA + E, 0), IA = w.top + r + K.slice(0, sA).reduce((KA, FA) => KA + FA + i, 0);
84
+ const x = I(n.id), d = n.geometry;
85
+ let p = (x == null ? void 0 : x.width) ?? d.width ?? 100, U = (x == null ? void 0 : x.height) ?? d.height ?? 100;
86
+ if (d.type === "Ellipse" || d.type === "Polygon" || d.type === "Star") {
87
+ const KA = (x == null ? void 0 : x.radius) ?? d.radius ?? (x == null ? void 0 : x.outer_radius) ?? d.outer_radius ?? 50;
88
+ p = KA * 2, U = KA * 2;
89
+ }
90
+ p *= n.transform.scale_x || 1, U *= n.transform.scale_y || 1;
91
+ let _ = V, f = IA;
92
+ M ? _ += (EA - p) / 2 : e && (_ += EA - p), Y ? f += (T - U) / 2 : j && (f += T - U), v.push({
93
93
  id: n.id,
94
- x: m + d / 2 - s / 2,
95
- y: b + R / 2 - h / 2,
96
- width: ((AA = n.layoutProps) == null ? void 0 : AA.width) === "fill" ? EA : void 0,
97
- height: ((sA = n.layoutProps) == null ? void 0 : sA.height) === "fill" ? u : void 0
94
+ x: _ + p / 2 - s / 2,
95
+ y: f + U / 2 - h / 2,
96
+ width: (($ = n.layoutProps) == null ? void 0 : $.width) === "fill" ? EA : void 0,
97
+ height: ((hA = n.layoutProps) == null ? void 0 : hA.height) === "fill" ? T : void 0
98
98
  });
99
99
  }), { childUpdates: v };
100
100
  }
101
101
  let D;
102
- const MA = new Array(128).fill(void 0);
103
- function FA(B) {
104
- return MA[B];
105
- }
106
- MA.push(void 0, null, !0, !1);
107
- let HI = MA.length;
108
- function UA(B) {
109
- HI === MA.length && MA.push(MA.length + 1);
102
+ const eA = new Array(128).fill(void 0);
103
+ function MA(B) {
104
+ return eA[B];
105
+ }
106
+ eA.push(void 0, null, !0, !1);
107
+ let HI = eA.length;
108
+ function rA(B) {
109
+ HI === eA.length && eA.push(eA.length + 1);
110
110
  const A = HI;
111
- return HI = MA[A], MA[A] = B, A;
111
+ return HI = eA[A], eA[A] = B, A;
112
112
  }
113
113
  function jI(B, A) {
114
114
  try {
115
115
  return B.apply(this, A);
116
116
  } catch (I) {
117
- D.__wbindgen_export_0(UA(I));
117
+ D.__wbindgen_export_0(rA(I));
118
118
  }
119
119
  }
120
120
  const IQ = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => {
@@ -125,7 +125,7 @@ let YI = null;
125
125
  function Lg(B, A) {
126
126
  return B >>>= 0, IQ.decode((YI !== null && YI.byteLength !== 0 || (YI = new Uint8Array(D.memory.buffer)), YI).subarray(B, B + A));
127
127
  }
128
- function DA(B) {
128
+ function wA(B) {
129
129
  return B == null;
130
130
  }
131
131
  let sI = null;
@@ -133,18 +133,18 @@ function fA() {
133
133
  return (sI === null || sI.buffer.detached === !0 || sI.buffer.detached === void 0 && sI.buffer !== D.memory.buffer) && (sI = new DataView(D.memory.buffer)), sI;
134
134
  }
135
135
  function PI(B) {
136
- const A = FA(B);
136
+ const A = MA(B);
137
137
  return function(I) {
138
- I < 132 || (MA[I] = HI, HI = I);
138
+ I < 132 || (eA[I] = HI, HI = I);
139
139
  }(B), A;
140
140
  }
141
141
  function k(B, A) {
142
142
  if (!(B instanceof A)) throw new Error(`expected instance of ${A.name}`);
143
143
  }
144
- let nA = 128;
145
- function lA(B) {
146
- if (nA == 1) throw new Error("out of js stack");
147
- return MA[--nA] = B, nA;
144
+ let YA = 128;
145
+ function LA(B) {
146
+ if (YA == 1) throw new Error("out of js stack");
147
+ return eA[--YA] = B, YA;
148
148
  }
149
149
  let lI = null;
150
150
  function $Q(B, A) {
@@ -193,85 +193,85 @@ class oI {
193
193
  }
194
194
  castRay(A, I, C, g, Q, E, i, w, o, s, h, a) {
195
195
  try {
196
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, J);
197
- const G = D.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w, DA(o) ? 4294967297 : o >>> 0, !DA(s), DA(s) ? 0 : s, !DA(h), DA(h) ? 0 : h, lA(a));
196
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J);
197
+ const G = D.rawbroadphase_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w, wA(o) ? 4294967297 : o >>> 0, !wA(s), wA(s) ? 0 : s, !wA(h), wA(h) ? 0 : h, LA(a));
198
198
  return G === 0 ? void 0 : Vg.__wrap(G);
199
199
  } finally {
200
- MA[nA++] = void 0;
200
+ eA[YA++] = void 0;
201
201
  }
202
202
  }
203
203
  castRayAndGetNormal(A, I, C, g, Q, E, i, w, o, s, h, a) {
204
204
  try {
205
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, J);
206
- const G = D.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w, DA(o) ? 4294967297 : o >>> 0, !DA(s), DA(s) ? 0 : s, !DA(h), DA(h) ? 0 : h, lA(a));
205
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J);
206
+ const G = D.rawbroadphase_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, w, wA(o) ? 4294967297 : o >>> 0, !wA(s), wA(s) ? 0 : s, !wA(h), wA(h) ? 0 : h, LA(a));
207
207
  return G === 0 ? void 0 : ig.__wrap(G);
208
208
  } finally {
209
- MA[nA++] = void 0;
209
+ eA[YA++] = void 0;
210
210
  }
211
211
  }
212
212
  intersectionsWithRay(A, I, C, g, Q, E, i, w, o, s, h, a, G) {
213
213
  try {
214
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, J), D.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, lA(w), o, DA(s) ? 4294967297 : s >>> 0, !DA(h), DA(h) ? 0 : h, !DA(a), DA(a) ? 0 : a, lA(G));
214
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J), D.rawbroadphase_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i, LA(w), o, wA(s) ? 4294967297 : s >>> 0, !wA(h), wA(h) ? 0 : h, !wA(a), wA(a) ? 0 : a, LA(G));
215
215
  } finally {
216
- MA[nA++] = void 0, MA[nA++] = void 0;
216
+ eA[YA++] = void 0, eA[YA++] = void 0;
217
217
  }
218
218
  }
219
219
  intersectionWithShape(A, I, C, g, Q, E, i, w, o, s, h) {
220
220
  try {
221
221
  const t = D.__wbindgen_add_to_stack_pointer(-16);
222
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, eA), k(E, SA), D.rawbroadphase_intersectionWithShape(t, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, DA(w) ? 4294967297 : w >>> 0, !DA(o), DA(o) ? 0 : o, !DA(s), DA(s) ? 0 : s, lA(h));
222
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, cA), k(E, yA), D.rawbroadphase_intersectionWithShape(t, this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, wA(w) ? 4294967297 : w >>> 0, !wA(o), wA(o) ? 0 : o, !wA(s), wA(s) ? 0 : s, LA(h));
223
223
  var a = fA().getInt32(t + 0, !0), G = fA().getFloat64(t + 8, !0);
224
224
  return a === 0 ? void 0 : G;
225
225
  } finally {
226
- D.__wbindgen_add_to_stack_pointer(16), MA[nA++] = void 0;
226
+ D.__wbindgen_add_to_stack_pointer(16), eA[YA++] = void 0;
227
227
  }
228
228
  }
229
229
  projectPoint(A, I, C, g, Q, E, i, w, o, s) {
230
230
  try {
231
- k(A, pA), k(I, YA), k(C, LA), k(g, J);
232
- const h = D.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, DA(i) ? 4294967297 : i >>> 0, !DA(w), DA(w) ? 0 : w, !DA(o), DA(o) ? 0 : o, lA(s));
231
+ k(A, pA), k(I, lA), k(C, qA), k(g, J);
232
+ const h = D.rawbroadphase_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, wA(i) ? 4294967297 : i >>> 0, !wA(w), wA(w) ? 0 : w, !wA(o), wA(o) ? 0 : o, LA(s));
233
233
  return h === 0 ? void 0 : VI.__wrap(h);
234
234
  } finally {
235
- MA[nA++] = void 0;
235
+ eA[YA++] = void 0;
236
236
  }
237
237
  }
238
238
  projectPointAndGetFeature(A, I, C, g, Q, E, i, w, o) {
239
239
  try {
240
- k(A, pA), k(I, YA), k(C, LA), k(g, J);
241
- const s = D.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, DA(E) ? 4294967297 : E >>> 0, !DA(i), DA(i) ? 0 : i, !DA(w), DA(w) ? 0 : w, lA(o));
240
+ k(A, pA), k(I, lA), k(C, qA), k(g, J);
241
+ const s = D.rawbroadphase_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, wA(E) ? 4294967297 : E >>> 0, !wA(i), wA(i) ? 0 : i, !wA(w), wA(w) ? 0 : w, LA(o));
242
242
  return s === 0 ? void 0 : VI.__wrap(s);
243
243
  } finally {
244
- MA[nA++] = void 0;
244
+ eA[YA++] = void 0;
245
245
  }
246
246
  }
247
247
  intersectionsWithPoint(A, I, C, g, Q, E, i, w, o, s) {
248
248
  try {
249
- k(A, pA), k(I, YA), k(C, LA), k(g, J), D.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, lA(Q), E, DA(i) ? 4294967297 : i >>> 0, !DA(w), DA(w) ? 0 : w, !DA(o), DA(o) ? 0 : o, lA(s));
249
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), D.rawbroadphase_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, LA(Q), E, wA(i) ? 4294967297 : i >>> 0, !wA(w), wA(w) ? 0 : w, !wA(o), wA(o) ? 0 : o, LA(s));
250
250
  } finally {
251
- MA[nA++] = void 0, MA[nA++] = void 0;
251
+ eA[YA++] = void 0, eA[YA++] = void 0;
252
252
  }
253
253
  }
254
254
  castShape(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K) {
255
255
  try {
256
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, eA), k(E, J), k(i, SA);
257
- const S = D.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w, o, s, h, DA(a) ? 4294967297 : a >>> 0, !DA(G), DA(G) ? 0 : G, !DA(t), DA(t) ? 0 : t, lA(K));
256
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, cA), k(E, J), k(i, yA);
257
+ const S = D.rawbroadphase_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w, o, s, h, wA(a) ? 4294967297 : a >>> 0, !wA(G), wA(G) ? 0 : G, !wA(t), wA(t) ? 0 : t, LA(K));
258
258
  return S === 0 ? void 0 : Bg.__wrap(S);
259
259
  } finally {
260
- MA[nA++] = void 0;
260
+ eA[YA++] = void 0;
261
261
  }
262
262
  }
263
263
  intersectionsWithShape(A, I, C, g, Q, E, i, w, o, s, h, a) {
264
264
  try {
265
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, eA), k(E, SA), D.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, lA(i), w, DA(o) ? 4294967297 : o >>> 0, !DA(s), DA(s) ? 0 : s, !DA(h), DA(h) ? 0 : h, lA(a));
265
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, cA), k(E, yA), D.rawbroadphase_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, LA(i), w, wA(o) ? 4294967297 : o >>> 0, !wA(s), wA(s) ? 0 : s, !wA(h), wA(h) ? 0 : h, LA(a));
266
266
  } finally {
267
- MA[nA++] = void 0, MA[nA++] = void 0;
267
+ eA[YA++] = void 0, eA[YA++] = void 0;
268
268
  }
269
269
  }
270
270
  collidersWithAabbIntersectingAabb(A, I, C, g, Q, E) {
271
271
  try {
272
- k(A, pA), k(I, YA), k(C, LA), k(g, J), k(Q, J), D.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, lA(E));
272
+ k(A, pA), k(I, lA), k(C, qA), k(g, J), k(Q, J), D.rawbroadphase_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, LA(E));
273
273
  } finally {
274
- MA[nA++] = void 0;
274
+ eA[YA++] = void 0;
275
275
  }
276
276
  }
277
277
  }
@@ -342,10 +342,10 @@ class QQ {
342
342
  const kg = typeof FinalizationRegistry > "u" ? { register: () => {
343
343
  }, unregister: () => {
344
344
  } } : new FinalizationRegistry((B) => D.__wbg_rawcolliderset_free(B >>> 0, 1));
345
- class LA {
345
+ class qA {
346
346
  static __wrap(A) {
347
347
  A >>>= 0;
348
- const I = Object.create(LA.prototype);
348
+ const I = Object.create(qA.prototype);
349
349
  return I.__wbg_ptr = A, kg.register(I, I.__wbg_ptr, I), I;
350
350
  }
351
351
  __destroy_into_raw() {
@@ -362,7 +362,7 @@ class LA {
362
362
  }
363
363
  coRotation(A) {
364
364
  const I = D.rawcolliderset_coRotation(this.__wbg_ptr, A);
365
- return eA.__wrap(I);
365
+ return cA.__wrap(I);
366
366
  }
367
367
  coTranslationWrtParent(A) {
368
368
  const I = D.rawcolliderset_coTranslationWrtParent(this.__wbg_ptr, A);
@@ -370,7 +370,7 @@ class LA {
370
370
  }
371
371
  coRotationWrtParent(A) {
372
372
  const I = D.rawcolliderset_coRotationWrtParent(this.__wbg_ptr, A);
373
- return I === 0 ? void 0 : eA.__wrap(I);
373
+ return I === 0 ? void 0 : cA.__wrap(I);
374
374
  }
375
375
  coSetTranslation(A, I, C) {
376
376
  D.rawcolliderset_coSetTranslation(this.__wbg_ptr, A, I, C);
@@ -548,7 +548,7 @@ class LA {
548
548
  return k(I, J), D.rawcolliderset_coContainsPoint(this.__wbg_ptr, A, I.__wbg_ptr) !== 0;
549
549
  }
550
550
  coCastShape(A, I, C, g, Q, E, i, w, o) {
551
- k(I, J), k(C, SA), k(g, J), k(Q, eA), k(E, J);
551
+ k(I, J), k(C, yA), k(g, J), k(Q, cA), k(E, J);
552
552
  const s = D.rawcolliderset_coCastShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i, w, o);
553
553
  return s === 0 ? void 0 : Dg.__wrap(s);
554
554
  }
@@ -558,10 +558,10 @@ class LA {
558
558
  return w === 0 ? void 0 : Bg.__wrap(w);
559
559
  }
560
560
  coIntersectsShape(A, I, C, g) {
561
- return k(I, SA), k(C, J), k(g, eA), D.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr) !== 0;
561
+ return k(I, yA), k(C, J), k(g, cA), D.rawcolliderset_coIntersectsShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr) !== 0;
562
562
  }
563
563
  coContactShape(A, I, C, g, Q) {
564
- k(I, SA), k(C, J), k(g, eA);
564
+ k(I, yA), k(C, J), k(g, cA);
565
565
  const E = D.rawcolliderset_coContactShape(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q);
566
566
  return E === 0 ? void 0 : dI.__wrap(E);
567
567
  }
@@ -622,7 +622,7 @@ class LA {
622
622
  D.rawcolliderset_coSetActiveCollisionTypes(this.__wbg_ptr, A, I);
623
623
  }
624
624
  coSetShape(A, I) {
625
- k(I, SA), D.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
625
+ k(I, yA), D.rawcolliderset_coSetShape(this.__wbg_ptr, A, I.__wbg_ptr);
626
626
  }
627
627
  coSetContactForceEventThreshold(A, I) {
628
628
  D.rawcolliderset_coSetContactForceEventThreshold(this.__wbg_ptr, A, I);
@@ -648,25 +648,25 @@ class LA {
648
648
  }
649
649
  createCollider(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j, l, r) {
650
650
  try {
651
- const L = D.__wbindgen_add_to_stack_pointer(-16);
652
- k(I, SA), k(C, J), k(g, eA), k(i, J), k(r, YA), D.rawcolliderset_createCollider(L, this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, i.__wbg_ptr, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j, l, r.__wbg_ptr);
653
- var v = fA().getInt32(L + 0, !0), n = fA().getFloat64(L + 8, !0);
651
+ const q = D.__wbindgen_add_to_stack_pointer(-16);
652
+ k(I, yA), k(C, J), k(g, cA), k(i, J), k(r, lA), D.rawcolliderset_createCollider(q, this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E, i.__wbg_ptr, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j, l, r.__wbg_ptr);
653
+ var v = fA().getInt32(q + 0, !0), n = fA().getFloat64(q + 8, !0);
654
654
  return v === 0 ? void 0 : n;
655
655
  } finally {
656
656
  D.__wbindgen_add_to_stack_pointer(16);
657
657
  }
658
658
  }
659
659
  remove(A, I, C, g) {
660
- k(I, II), k(C, YA), D.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
660
+ k(I, II), k(C, lA), D.rawcolliderset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g);
661
661
  }
662
662
  isHandleValid(A) {
663
663
  return D.rawcolliderset_contains(this.__wbg_ptr, A) !== 0;
664
664
  }
665
665
  forEachColliderHandle(A) {
666
666
  try {
667
- D.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, lA(A));
667
+ D.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, LA(A));
668
668
  } finally {
669
- MA[nA++] = void 0;
669
+ eA[YA++] = void 0;
670
670
  }
671
671
  }
672
672
  }
@@ -885,9 +885,9 @@ class AB {
885
885
  }
886
886
  render(A, I, C, g, Q, E, i) {
887
887
  try {
888
- k(A, YA), k(I, LA), k(C, AI), k(g, gI), k(Q, pA), D.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, lA(i));
888
+ k(A, lA), k(I, qA), k(C, AI), k(g, gI), k(Q, pA), D.rawdebugrenderpipeline_render(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, LA(i));
889
889
  } finally {
890
- MA[nA++] = void 0;
890
+ eA[YA++] = void 0;
891
891
  }
892
892
  }
893
893
  }
@@ -930,11 +930,11 @@ class Pg {
930
930
  }
931
931
  takeBodies() {
932
932
  const A = D.rawdeserializedworld_takeBodies(this.__wbg_ptr);
933
- return A === 0 ? void 0 : YA.__wrap(A);
933
+ return A === 0 ? void 0 : lA.__wrap(A);
934
934
  }
935
935
  takeColliders() {
936
936
  const A = D.rawdeserializedworld_takeColliders(this.__wbg_ptr);
937
- return A === 0 ? void 0 : LA.__wrap(A);
937
+ return A === 0 ? void 0 : qA.__wrap(A);
938
938
  }
939
939
  takeImpulseJoints() {
940
940
  const A = D.rawdeserializedworld_takeImpulseJoints(this.__wbg_ptr);
@@ -963,16 +963,16 @@ class BQ {
963
963
  }
964
964
  drainCollisionEvents(A) {
965
965
  try {
966
- D.raweventqueue_drainCollisionEvents(this.__wbg_ptr, lA(A));
966
+ D.raweventqueue_drainCollisionEvents(this.__wbg_ptr, LA(A));
967
967
  } finally {
968
- MA[nA++] = void 0;
968
+ eA[YA++] = void 0;
969
969
  }
970
970
  }
971
971
  drainContactForceEvents(A) {
972
972
  try {
973
- D.raweventqueue_drainContactForceEvents(this.__wbg_ptr, lA(A));
973
+ D.raweventqueue_drainContactForceEvents(this.__wbg_ptr, LA(A));
974
974
  } finally {
975
- MA[nA++] = void 0;
975
+ eA[YA++] = void 0;
976
976
  }
977
977
  }
978
978
  clear() {
@@ -1012,7 +1012,7 @@ class xA {
1012
1012
  return i === 0 ? void 0 : xA.__wrap(i);
1013
1013
  }
1014
1014
  static fixed(A, I, C, g) {
1015
- k(A, J), k(I, eA), k(C, J), k(g, eA);
1015
+ k(A, J), k(I, cA), k(C, J), k(g, cA);
1016
1016
  const Q = D.rawgenericjoint_fixed(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr);
1017
1017
  return xA.__wrap(Q);
1018
1018
  }
@@ -1050,11 +1050,11 @@ class AI {
1050
1050
  }
1051
1051
  jointFrameX1(A) {
1052
1052
  const I = D.rawimpulsejointset_jointFrameX1(this.__wbg_ptr, A);
1053
- return eA.__wrap(I);
1053
+ return cA.__wrap(I);
1054
1054
  }
1055
1055
  jointFrameX2(A) {
1056
1056
  const I = D.rawimpulsejointset_jointFrameX2(this.__wbg_ptr, A);
1057
- return eA.__wrap(I);
1057
+ return cA.__wrap(I);
1058
1058
  }
1059
1059
  jointAnchor1(A) {
1060
1060
  const I = D.rawimpulsejointset_jointAnchor1(this.__wbg_ptr, A);
@@ -1118,16 +1118,16 @@ class AI {
1118
1118
  }
1119
1119
  forEachJointHandle(A) {
1120
1120
  try {
1121
- D.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, lA(A));
1121
+ D.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, LA(A));
1122
1122
  } finally {
1123
- MA[nA++] = void 0;
1123
+ eA[YA++] = void 0;
1124
1124
  }
1125
1125
  }
1126
1126
  forEachJointAttachedToRigidBody(A, I) {
1127
1127
  try {
1128
- D.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, lA(I));
1128
+ D.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, LA(I));
1129
1129
  } finally {
1130
- MA[nA++] = void 0;
1130
+ eA[YA++] = void 0;
1131
1131
  }
1132
1132
  }
1133
1133
  }
@@ -1230,9 +1230,9 @@ class II {
1230
1230
  }
1231
1231
  forEachActiveRigidBodyHandle(A) {
1232
1232
  try {
1233
- D.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, lA(A));
1233
+ D.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, LA(A));
1234
1234
  } finally {
1235
- MA[nA++] = void 0;
1235
+ eA[YA++] = void 0;
1236
1236
  }
1237
1237
  }
1238
1238
  }
@@ -1325,9 +1325,9 @@ class IB {
1325
1325
  }
1326
1326
  computeColliderMovement(A, I, C, g, Q, E, i, w, o, s, h, a) {
1327
1327
  try {
1328
- k(I, oI), k(C, pA), k(g, YA), k(Q, LA), k(i, J), D.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i.__wbg_ptr, w, DA(o) ? 4294967297 : Math.fround(o), s, DA(h) ? 4294967297 : h >>> 0, lA(a));
1328
+ k(I, oI), k(C, pA), k(g, lA), k(Q, qA), k(i, J), D.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E, i.__wbg_ptr, w, wA(o) ? 4294967297 : Math.fround(o), s, wA(h) ? 4294967297 : h >>> 0, LA(a));
1329
1329
  } finally {
1330
- MA[nA++] = void 0;
1330
+ eA[YA++] = void 0;
1331
1331
  }
1332
1332
  }
1333
1333
  computedMovement() {
@@ -1366,11 +1366,11 @@ class gI {
1366
1366
  }
1367
1367
  jointFrameX1(A) {
1368
1368
  const I = D.rawmultibodyjointset_jointFrameX1(this.__wbg_ptr, A);
1369
- return eA.__wrap(I);
1369
+ return cA.__wrap(I);
1370
1370
  }
1371
1371
  jointFrameX2(A) {
1372
1372
  const I = D.rawmultibodyjointset_jointFrameX2(this.__wbg_ptr, A);
1373
- return eA.__wrap(I);
1373
+ return cA.__wrap(I);
1374
1374
  }
1375
1375
  jointAnchor1(A) {
1376
1376
  const I = D.rawmultibodyjointset_jointAnchor1(this.__wbg_ptr, A);
@@ -1410,16 +1410,16 @@ class gI {
1410
1410
  }
1411
1411
  forEachJointHandle(A) {
1412
1412
  try {
1413
- D.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, lA(A));
1413
+ D.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, LA(A));
1414
1414
  } finally {
1415
- MA[nA++] = void 0;
1415
+ eA[YA++] = void 0;
1416
1416
  }
1417
1417
  }
1418
1418
  forEachJointAttachedToRigidBody(A, I) {
1419
1419
  try {
1420
- D.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, lA(I));
1420
+ D.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, LA(I));
1421
1421
  } finally {
1422
- MA[nA++] = void 0;
1422
+ eA[YA++] = void 0;
1423
1423
  }
1424
1424
  }
1425
1425
  }
@@ -1445,14 +1445,14 @@ class pA {
1445
1445
  return this.__wbg_ptr = A >>> 0, cg.register(this, this.__wbg_ptr, this), this;
1446
1446
  }
1447
1447
  contact_pairs_with(A, I) {
1448
- D.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, UA(I));
1448
+ D.rawnarrowphase_contact_pairs_with(this.__wbg_ptr, A, rA(I));
1449
1449
  }
1450
1450
  contact_pair(A, I) {
1451
1451
  const C = D.rawnarrowphase_contact_pair(this.__wbg_ptr, A, I);
1452
1452
  return C === 0 ? void 0 : vg.__wrap(C);
1453
1453
  }
1454
1454
  intersection_pairs_with(A, I) {
1455
- D.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, UA(I));
1455
+ D.rawnarrowphase_intersection_pairs_with(this.__wbg_ptr, A, rA(I));
1456
1456
  }
1457
1457
  intersection_pair(A, I) {
1458
1458
  return D.rawnarrowphase_intersection_pair(this.__wbg_ptr, A, I) !== 0;
@@ -1529,10 +1529,10 @@ class gB {
1529
1529
  return D.rawphysicspipeline_timing_user_changes(this.__wbg_ptr);
1530
1530
  }
1531
1531
  step(A, I, C, g, Q, E, i, w, o, s) {
1532
- k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, YA), k(i, LA), k(w, AI), k(o, gI), k(s, qg), D.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr);
1532
+ k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, lA), k(i, qA), k(w, AI), k(o, gI), k(s, qg), D.rawphysicspipeline_step(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr);
1533
1533
  }
1534
1534
  stepWithEvents(A, I, C, g, Q, E, i, w, o, s, h, a, G, t) {
1535
- k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, YA), k(i, LA), k(w, AI), k(o, gI), k(s, qg), k(h, BQ), D.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr, h.__wbg_ptr, UA(a), UA(G), UA(t));
1535
+ k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, lA), k(i, qA), k(w, AI), k(o, gI), k(s, qg), k(h, BQ), D.rawphysicspipeline_stepWithEvents(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr, s.__wbg_ptr, h.__wbg_ptr, rA(a), rA(G), rA(t));
1536
1536
  }
1537
1537
  }
1538
1538
  const lC = typeof FinalizationRegistry > "u" ? { register: () => {
@@ -1567,18 +1567,18 @@ class CB {
1567
1567
  D.rawpidcontroller_reset_integrals(this.__wbg_ptr);
1568
1568
  }
1569
1569
  apply_linear_correction(A, I, C, g, Q) {
1570
- k(I, YA), k(g, J), k(Q, J), D.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
1570
+ k(I, lA), k(g, J), k(Q, J), D.rawpidcontroller_apply_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
1571
1571
  }
1572
1572
  apply_angular_correction(A, I, C, g, Q) {
1573
- k(I, YA), D.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
1573
+ k(I, lA), D.rawpidcontroller_apply_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
1574
1574
  }
1575
1575
  linear_correction(A, I, C, g, Q) {
1576
- k(I, YA), k(g, J), k(Q, J);
1576
+ k(I, lA), k(g, J), k(Q, J);
1577
1577
  const E = D.rawpidcontroller_linear_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g.__wbg_ptr, Q.__wbg_ptr);
1578
1578
  return J.__wrap(E);
1579
1579
  }
1580
1580
  angular_correction(A, I, C, g, Q) {
1581
- return k(I, YA), D.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
1581
+ return k(I, lA), D.rawpidcontroller_angular_correction(this.__wbg_ptr, A, I.__wbg_ptr, C, g, Q);
1582
1582
  }
1583
1583
  }
1584
1584
  const LC = typeof FinalizationRegistry > "u" ? { register: () => {
@@ -1735,10 +1735,10 @@ class og {
1735
1735
  const Jg = typeof FinalizationRegistry > "u" ? { register: () => {
1736
1736
  }, unregister: () => {
1737
1737
  } } : new FinalizationRegistry((B) => D.__wbg_rawrigidbodyset_free(B >>> 0, 1));
1738
- class YA {
1738
+ class lA {
1739
1739
  static __wrap(A) {
1740
1740
  A >>>= 0;
1741
- const I = Object.create(YA.prototype);
1741
+ const I = Object.create(lA.prototype);
1742
1742
  return I.__wbg_ptr = A, Jg.register(I, I.__wbg_ptr, I), I;
1743
1743
  }
1744
1744
  __destroy_into_raw() {
@@ -1755,7 +1755,7 @@ class YA {
1755
1755
  }
1756
1756
  rbRotation(A) {
1757
1757
  const I = D.rawrigidbodyset_rbRotation(this.__wbg_ptr, A);
1758
- return eA.__wrap(I);
1758
+ return cA.__wrap(I);
1759
1759
  }
1760
1760
  rbSleep(A) {
1761
1761
  D.rawrigidbodyset_rbSleep(this.__wbg_ptr, A);
@@ -1772,7 +1772,7 @@ class YA {
1772
1772
  }
1773
1773
  rbNextRotation(A) {
1774
1774
  const I = D.rawrigidbodyset_rbNextRotation(this.__wbg_ptr, A);
1775
- return eA.__wrap(I);
1775
+ return cA.__wrap(I);
1776
1776
  }
1777
1777
  rbSetTranslation(A, I, C, g) {
1778
1778
  D.rawrigidbodyset_rbSetTranslation(this.__wbg_ptr, A, I, C, g);
@@ -1793,7 +1793,7 @@ class YA {
1793
1793
  D.rawrigidbodyset_rbSetNextKinematicRotation(this.__wbg_ptr, A, I);
1794
1794
  }
1795
1795
  rbRecomputeMassPropertiesFromColliders(A, I) {
1796
- k(I, LA), D.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, A, I.__wbg_ptr);
1796
+ k(I, qA), D.rawrigidbodyset_rbRecomputeMassPropertiesFromColliders(this.__wbg_ptr, A, I.__wbg_ptr);
1797
1797
  }
1798
1798
  rbSetAdditionalMass(A, I, C) {
1799
1799
  D.rawrigidbodyset_rbSetAdditionalMass(this.__wbg_ptr, A, I, C);
@@ -1966,10 +1966,10 @@ class YA {
1966
1966
  return this.__wbg_ptr = A >>> 0, Jg.register(this, this.__wbg_ptr, this), this;
1967
1967
  }
1968
1968
  createRigidBody(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K, S, y, N, M, e, Y, j) {
1969
- return k(I, J), k(C, eA), k(i, J), k(w, J), D.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q, E, i.__wbg_ptr, w.__wbg_ptr, o, s, h, a, G, t, K, S, y, N, M, e, Y, j);
1969
+ return k(I, J), k(C, cA), k(i, J), k(w, J), D.rawrigidbodyset_createRigidBody(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g, Q, E, i.__wbg_ptr, w.__wbg_ptr, o, s, h, a, G, t, K, S, y, N, M, e, Y, j);
1970
1970
  }
1971
1971
  remove(A, I, C, g, Q) {
1972
- k(I, II), k(C, LA), k(g, AI), k(Q, gI), D.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr);
1972
+ k(I, II), k(C, qA), k(g, AI), k(Q, gI), D.rawrigidbodyset_remove(this.__wbg_ptr, A, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr);
1973
1973
  }
1974
1974
  len() {
1975
1975
  return D.rawrigidbodyset_len(this.__wbg_ptr) >>> 0;
@@ -1979,22 +1979,22 @@ class YA {
1979
1979
  }
1980
1980
  forEachRigidBodyHandle(A) {
1981
1981
  try {
1982
- D.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, lA(A));
1982
+ D.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, LA(A));
1983
1983
  } finally {
1984
- MA[nA++] = void 0;
1984
+ eA[YA++] = void 0;
1985
1985
  }
1986
1986
  }
1987
1987
  propagateModifiedBodyPositionsToColliders(A) {
1988
- k(A, LA), D.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
1988
+ k(A, qA), D.rawrigidbodyset_propagateModifiedBodyPositionsToColliders(this.__wbg_ptr, A.__wbg_ptr);
1989
1989
  }
1990
1990
  }
1991
1991
  const fC = typeof FinalizationRegistry > "u" ? { register: () => {
1992
1992
  }, unregister: () => {
1993
1993
  } } : new FinalizationRegistry((B) => D.__wbg_rawrotation_free(B >>> 0, 1));
1994
- class eA {
1994
+ class cA {
1995
1995
  static __wrap(A) {
1996
1996
  A >>>= 0;
1997
- const I = Object.create(eA.prototype);
1997
+ const I = Object.create(cA.prototype);
1998
1998
  return I.__wbg_ptr = A, fC.register(I, I.__wbg_ptr, I), I;
1999
1999
  }
2000
2000
  __destroy_into_raw() {
@@ -2007,11 +2007,11 @@ class eA {
2007
2007
  }
2008
2008
  static identity() {
2009
2009
  const A = D.rawrotation_identity();
2010
- return eA.__wrap(A);
2010
+ return cA.__wrap(A);
2011
2011
  }
2012
2012
  static fromAngle(A) {
2013
2013
  const I = D.rawrotation_fromAngle(A);
2014
- return eA.__wrap(I);
2014
+ return cA.__wrap(I);
2015
2015
  }
2016
2016
  get im() {
2017
2017
  return D.rawkinematiccharactercontroller_offset(this.__wbg_ptr);
@@ -2040,20 +2040,20 @@ class QB {
2040
2040
  return this.__wbg_ptr = A >>> 0, bC.register(this, this.__wbg_ptr, this), this;
2041
2041
  }
2042
2042
  serializeAll(A, I, C, g, Q, E, i, w, o) {
2043
- return k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, YA), k(i, LA), k(w, AI), k(o, gI), PI(D.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr));
2043
+ return k(A, J), k(I, SI), k(C, II), k(g, oI), k(Q, pA), k(E, lA), k(i, qA), k(w, AI), k(o, gI), PI(D.rawserializationpipeline_serializeAll(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w.__wbg_ptr, o.__wbg_ptr));
2044
2044
  }
2045
2045
  deserializeAll(A) {
2046
- const I = D.rawserializationpipeline_deserializeAll(this.__wbg_ptr, UA(A));
2046
+ const I = D.rawserializationpipeline_deserializeAll(this.__wbg_ptr, rA(A));
2047
2047
  return I === 0 ? void 0 : Pg.__wrap(I);
2048
2048
  }
2049
2049
  }
2050
2050
  const TC = typeof FinalizationRegistry > "u" ? { register: () => {
2051
2051
  }, unregister: () => {
2052
2052
  } } : new FinalizationRegistry((B) => D.__wbg_rawshape_free(B >>> 0, 1));
2053
- class SA {
2053
+ class yA {
2054
2054
  static __wrap(A) {
2055
2055
  A >>>= 0;
2056
- const I = Object.create(SA.prototype);
2056
+ const I = Object.create(yA.prototype);
2057
2057
  return I.__wbg_ptr = A, TC.register(I, I.__wbg_ptr, I), I;
2058
2058
  }
2059
2059
  __destroy_into_raw() {
@@ -2066,109 +2066,109 @@ class SA {
2066
2066
  }
2067
2067
  static cuboid(A, I) {
2068
2068
  const C = D.rawshape_cuboid(A, I);
2069
- return SA.__wrap(C);
2069
+ return yA.__wrap(C);
2070
2070
  }
2071
2071
  static roundCuboid(A, I, C) {
2072
2072
  const g = D.rawshape_roundCuboid(A, I, C);
2073
- return SA.__wrap(g);
2073
+ return yA.__wrap(g);
2074
2074
  }
2075
2075
  static ball(A) {
2076
2076
  const I = D.rawshape_ball(A);
2077
- return SA.__wrap(I);
2077
+ return yA.__wrap(I);
2078
2078
  }
2079
2079
  static halfspace(A) {
2080
2080
  k(A, J);
2081
2081
  const I = D.rawshape_halfspace(A.__wbg_ptr);
2082
- return SA.__wrap(I);
2082
+ return yA.__wrap(I);
2083
2083
  }
2084
2084
  static capsule(A, I) {
2085
2085
  const C = D.rawshape_capsule(A, I);
2086
- return SA.__wrap(C);
2086
+ return yA.__wrap(C);
2087
2087
  }
2088
2088
  static voxels(A, I) {
2089
2089
  k(A, J);
2090
2090
  const C = Sg(I, D.__wbindgen_export_2), g = WA, Q = D.rawshape_voxels(A.__wbg_ptr, C, g);
2091
- return SA.__wrap(Q);
2091
+ return yA.__wrap(Q);
2092
2092
  }
2093
2093
  static voxelsFromPoints(A, I) {
2094
2094
  k(A, J);
2095
2095
  const C = EI(I, D.__wbindgen_export_2), g = WA, Q = D.rawshape_voxelsFromPoints(A.__wbg_ptr, C, g);
2096
- return SA.__wrap(Q);
2096
+ return yA.__wrap(Q);
2097
2097
  }
2098
2098
  static polyline(A, I) {
2099
2099
  const C = EI(A, D.__wbindgen_export_2), g = WA, Q = Sg(I, D.__wbindgen_export_2), E = WA, i = D.rawshape_polyline(C, g, Q, E);
2100
- return SA.__wrap(i);
2100
+ return yA.__wrap(i);
2101
2101
  }
2102
2102
  static trimesh(A, I, C) {
2103
2103
  const g = EI(A, D.__wbindgen_export_2), Q = WA, E = Sg(I, D.__wbindgen_export_2), i = WA, w = D.rawshape_trimesh(g, Q, E, i, C);
2104
- return w === 0 ? void 0 : SA.__wrap(w);
2104
+ return w === 0 ? void 0 : yA.__wrap(w);
2105
2105
  }
2106
2106
  static heightfield(A, I) {
2107
2107
  const C = EI(A, D.__wbindgen_export_2), g = WA;
2108
2108
  k(I, J);
2109
2109
  const Q = D.rawshape_heightfield(C, g, I.__wbg_ptr);
2110
- return SA.__wrap(Q);
2110
+ return yA.__wrap(Q);
2111
2111
  }
2112
2112
  static segment(A, I) {
2113
2113
  k(A, J), k(I, J);
2114
2114
  const C = D.rawshape_segment(A.__wbg_ptr, I.__wbg_ptr);
2115
- return SA.__wrap(C);
2115
+ return yA.__wrap(C);
2116
2116
  }
2117
2117
  static triangle(A, I, C) {
2118
2118
  k(A, J), k(I, J), k(C, J);
2119
2119
  const g = D.rawshape_triangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr);
2120
- return SA.__wrap(g);
2120
+ return yA.__wrap(g);
2121
2121
  }
2122
2122
  static roundTriangle(A, I, C, g) {
2123
2123
  k(A, J), k(I, J), k(C, J);
2124
2124
  const Q = D.rawshape_roundTriangle(A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
2125
- return SA.__wrap(Q);
2125
+ return yA.__wrap(Q);
2126
2126
  }
2127
2127
  static convexHull(A) {
2128
2128
  const I = EI(A, D.__wbindgen_export_2), C = WA, g = D.rawshape_convexHull(I, C);
2129
- return g === 0 ? void 0 : SA.__wrap(g);
2129
+ return g === 0 ? void 0 : yA.__wrap(g);
2130
2130
  }
2131
2131
  static roundConvexHull(A, I) {
2132
2132
  const C = EI(A, D.__wbindgen_export_2), g = WA, Q = D.rawshape_roundConvexHull(C, g, I);
2133
- return Q === 0 ? void 0 : SA.__wrap(Q);
2133
+ return Q === 0 ? void 0 : yA.__wrap(Q);
2134
2134
  }
2135
2135
  static convexPolyline(A) {
2136
2136
  const I = EI(A, D.__wbindgen_export_2), C = WA, g = D.rawshape_convexPolyline(I, C);
2137
- return g === 0 ? void 0 : SA.__wrap(g);
2137
+ return g === 0 ? void 0 : yA.__wrap(g);
2138
2138
  }
2139
2139
  static roundConvexPolyline(A, I) {
2140
2140
  const C = EI(A, D.__wbindgen_export_2), g = WA, Q = D.rawshape_roundConvexPolyline(C, g, I);
2141
- return Q === 0 ? void 0 : SA.__wrap(Q);
2141
+ return Q === 0 ? void 0 : yA.__wrap(Q);
2142
2142
  }
2143
2143
  castShape(A, I, C, g, Q, E, i, w, o, s) {
2144
- k(A, J), k(I, eA), k(C, J), k(g, SA), k(Q, J), k(E, eA), k(i, J);
2144
+ k(A, J), k(I, cA), k(C, J), k(g, yA), k(Q, J), k(E, cA), k(i, J);
2145
2145
  const h = D.rawshape_castShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E.__wbg_ptr, i.__wbg_ptr, w, o, s);
2146
2146
  return h === 0 ? void 0 : Dg.__wrap(h);
2147
2147
  }
2148
2148
  intersectsShape(A, I, C, g, Q) {
2149
- return k(A, J), k(I, eA), k(C, SA), k(g, J), k(Q, eA), D.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr) !== 0;
2149
+ return k(A, J), k(I, cA), k(C, yA), k(g, J), k(Q, cA), D.rawshape_intersectsShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr) !== 0;
2150
2150
  }
2151
2151
  contactShape(A, I, C, g, Q, E) {
2152
- k(A, J), k(I, eA), k(C, SA), k(g, J), k(Q, eA);
2152
+ k(A, J), k(I, cA), k(C, yA), k(g, J), k(Q, cA);
2153
2153
  const i = D.rawshape_contactShape(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q.__wbg_ptr, E);
2154
2154
  return i === 0 ? void 0 : dI.__wrap(i);
2155
2155
  }
2156
2156
  containsPoint(A, I, C) {
2157
- return k(A, J), k(I, eA), k(C, J), D.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr) !== 0;
2157
+ return k(A, J), k(I, cA), k(C, J), D.rawshape_containsPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr) !== 0;
2158
2158
  }
2159
2159
  projectPoint(A, I, C, g) {
2160
- k(A, J), k(I, eA), k(C, J);
2160
+ k(A, J), k(I, cA), k(C, J);
2161
2161
  const Q = D.rawshape_projectPoint(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g);
2162
2162
  return Eg.__wrap(Q);
2163
2163
  }
2164
2164
  intersectsRay(A, I, C, g, Q) {
2165
- return k(A, J), k(I, eA), k(C, J), k(g, J), D.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q) !== 0;
2165
+ return k(A, J), k(I, cA), k(C, J), k(g, J), D.rawshape_intersectsRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q) !== 0;
2166
2166
  }
2167
2167
  castRay(A, I, C, g, Q, E) {
2168
- return k(A, J), k(I, eA), k(C, J), k(g, J), D.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E);
2168
+ return k(A, J), k(I, cA), k(C, J), k(g, J), D.rawshape_castRay(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E);
2169
2169
  }
2170
2170
  castRayAndGetNormal(A, I, C, g, Q, E) {
2171
- k(A, J), k(I, eA), k(C, J), k(g, J);
2171
+ k(A, J), k(I, cA), k(C, J), k(g, J);
2172
2172
  const i = D.rawshape_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, I.__wbg_ptr, C.__wbg_ptr, g.__wbg_ptr, Q, E);
2173
2173
  return i === 0 ? void 0 : og.__wrap(i);
2174
2174
  }
@@ -2299,79 +2299,79 @@ async function EQ(B) {
2299
2299
  const A = function() {
2300
2300
  const g = { wbg: {} };
2301
2301
  return g.wbg.__wbg_bind_c8359b1cba058168 = function(Q, E, i, w) {
2302
- return UA(FA(Q).bind(FA(E), FA(i), FA(w)));
2302
+ return rA(MA(Q).bind(MA(E), MA(i), MA(w)));
2303
2303
  }, g.wbg.__wbg_buffer_609cc3eee51ed158 = function(Q) {
2304
- return UA(FA(Q).buffer);
2304
+ return rA(MA(Q).buffer);
2305
2305
  }, g.wbg.__wbg_call_672a4d21634d4a24 = function() {
2306
2306
  return jI(function(Q, E) {
2307
- return UA(FA(Q).call(FA(E)));
2307
+ return rA(MA(Q).call(MA(E)));
2308
2308
  }, arguments);
2309
2309
  }, g.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
2310
2310
  return jI(function(Q, E, i) {
2311
- return UA(FA(Q).call(FA(E), FA(i)));
2311
+ return rA(MA(Q).call(MA(E), MA(i)));
2312
2312
  }, arguments);
2313
2313
  }, g.wbg.__wbg_call_833bed5770ea2041 = function() {
2314
2314
  return jI(function(Q, E, i, w) {
2315
- return UA(FA(Q).call(FA(E), FA(i), FA(w)));
2315
+ return rA(MA(Q).call(MA(E), MA(i), MA(w)));
2316
2316
  }, arguments);
2317
2317
  }, g.wbg.__wbg_call_b8adc8b1d0a0d8eb = function() {
2318
2318
  return jI(function(Q, E, i, w, o) {
2319
- return UA(FA(Q).call(FA(E), FA(i), FA(w), FA(o)));
2319
+ return rA(MA(Q).call(MA(E), MA(i), MA(w), MA(o)));
2320
2320
  }, arguments);
2321
2321
  }, g.wbg.__wbg_length_3b4f022188ae8db6 = function(Q) {
2322
- return FA(Q).length;
2322
+ return MA(Q).length;
2323
2323
  }, g.wbg.__wbg_length_a446193dc22c12f8 = function(Q) {
2324
- return FA(Q).length;
2324
+ return MA(Q).length;
2325
2325
  }, g.wbg.__wbg_new_a12002a7f91c75be = function(Q) {
2326
- return UA(new Uint8Array(FA(Q)));
2326
+ return rA(new Uint8Array(MA(Q)));
2327
2327
  }, g.wbg.__wbg_newnoargs_105ed471475aaf50 = function(Q, E) {
2328
- return UA(new Function(Lg(Q, E)));
2328
+ return rA(new Function(Lg(Q, E)));
2329
2329
  }, g.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(Q, E, i) {
2330
- return UA(new Uint8Array(FA(Q), E >>> 0, i >>> 0));
2330
+ return rA(new Uint8Array(MA(Q), E >>> 0, i >>> 0));
2331
2331
  }, g.wbg.__wbg_newwithbyteoffsetandlength_e6b7e69acd4c7354 = function(Q, E, i) {
2332
- return UA(new Float32Array(FA(Q), E >>> 0, i >>> 0));
2332
+ return rA(new Float32Array(MA(Q), E >>> 0, i >>> 0));
2333
2333
  }, g.wbg.__wbg_newwithlength_5a5efe313cfd59f1 = function(Q) {
2334
- return UA(new Float32Array(Q >>> 0));
2334
+ return rA(new Float32Array(Q >>> 0));
2335
2335
  }, g.wbg.__wbg_now_2c95c9de01293173 = function(Q) {
2336
- return FA(Q).now();
2336
+ return MA(Q).now();
2337
2337
  }, g.wbg.__wbg_performance_7a3ffd0b17f663ad = function(Q) {
2338
- return UA(FA(Q).performance);
2338
+ return rA(MA(Q).performance);
2339
2339
  }, g.wbg.__wbg_rawcontactforceevent_new = function(Q) {
2340
- return UA(jg.__wrap(Q));
2340
+ return rA(jg.__wrap(Q));
2341
2341
  }, g.wbg.__wbg_rawraycolliderintersection_new = function(Q) {
2342
- return UA(ig.__wrap(Q));
2342
+ return rA(ig.__wrap(Q));
2343
2343
  }, g.wbg.__wbg_set_10bad9bee0e9c58b = function(Q, E, i) {
2344
- FA(Q).set(FA(E), i >>> 0);
2344
+ MA(Q).set(MA(E), i >>> 0);
2345
2345
  }, g.wbg.__wbg_set_65595bdd868b3009 = function(Q, E, i) {
2346
- FA(Q).set(FA(E), i >>> 0);
2346
+ MA(Q).set(MA(E), i >>> 0);
2347
2347
  }, g.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
2348
2348
  const Q = typeof global > "u" ? null : global;
2349
- return DA(Q) ? 0 : UA(Q);
2349
+ return wA(Q) ? 0 : rA(Q);
2350
2350
  }, g.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
2351
2351
  const Q = typeof globalThis > "u" ? null : globalThis;
2352
- return DA(Q) ? 0 : UA(Q);
2352
+ return wA(Q) ? 0 : rA(Q);
2353
2353
  }, g.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
2354
2354
  const Q = typeof self > "u" ? null : self;
2355
- return DA(Q) ? 0 : UA(Q);
2355
+ return wA(Q) ? 0 : rA(Q);
2356
2356
  }, g.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
2357
2357
  const Q = typeof window > "u" ? null : window;
2358
- return DA(Q) ? 0 : UA(Q);
2358
+ return wA(Q) ? 0 : rA(Q);
2359
2359
  }, g.wbg.__wbindgen_boolean_get = function(Q) {
2360
- const E = FA(Q);
2360
+ const E = MA(Q);
2361
2361
  return typeof E == "boolean" ? E ? 1 : 0 : 2;
2362
2362
  }, g.wbg.__wbindgen_is_function = function(Q) {
2363
- return typeof FA(Q) == "function";
2363
+ return typeof MA(Q) == "function";
2364
2364
  }, g.wbg.__wbindgen_is_undefined = function(Q) {
2365
- return FA(Q) === void 0;
2365
+ return MA(Q) === void 0;
2366
2366
  }, g.wbg.__wbindgen_memory = function() {
2367
- return UA(D.memory);
2367
+ return rA(D.memory);
2368
2368
  }, g.wbg.__wbindgen_number_get = function(Q, E) {
2369
- const i = FA(E), w = typeof i == "number" ? i : void 0;
2370
- fA().setFloat64(Q + 8, DA(w) ? 0 : w, !0), fA().setInt32(Q + 0, !DA(w), !0);
2369
+ const i = MA(E), w = typeof i == "number" ? i : void 0;
2370
+ fA().setFloat64(Q + 8, wA(w) ? 0 : w, !0), fA().setInt32(Q + 0, !wA(w), !0);
2371
2371
  }, g.wbg.__wbindgen_number_new = function(Q) {
2372
- return UA(Q);
2372
+ return rA(Q);
2373
2373
  }, g.wbg.__wbindgen_object_clone_ref = function(Q) {
2374
- return UA(FA(Q));
2374
+ return rA(MA(Q));
2375
2375
  }, g.wbg.__wbindgen_object_drop_ref = function(Q) {
2376
2376
  PI(Q);
2377
2377
  }, g.wbg.__wbindgen_throw = function(Q, E) {
@@ -2423,7 +2423,7 @@ class c {
2423
2423
  A.x = I.x, A.y = I.y;
2424
2424
  }
2425
2425
  }
2426
- class rA {
2426
+ class nA {
2427
2427
  static identity() {
2428
2428
  return 0;
2429
2429
  }
@@ -2433,7 +2433,7 @@ class rA {
2433
2433
  return A.free(), I;
2434
2434
  }
2435
2435
  static intoRaw(A) {
2436
- return eA.fromAngle(A);
2436
+ return cA.fromAngle(A);
2437
2437
  }
2438
2438
  }
2439
2439
  var XA, ZA, pg, Hg, fI, eI, bA, dg, fg, zI, _I, bg, Tg, $I, tI;
@@ -2489,7 +2489,7 @@ class ug {
2489
2489
  }
2490
2490
  rotation() {
2491
2491
  let A = this.rawSet.rbRotation(this.handle);
2492
- return rA.fromRaw(A);
2492
+ return nA.fromRaw(A);
2493
2493
  }
2494
2494
  nextTranslation() {
2495
2495
  let A = this.rawSet.rbNextTranslation(this.handle);
@@ -2497,7 +2497,7 @@ class ug {
2497
2497
  }
2498
2498
  nextRotation() {
2499
2499
  let A = this.rawSet.rbNextRotation(this.handle);
2500
- return rA.fromRaw(A);
2500
+ return nA.fromRaw(A);
2501
2501
  }
2502
2502
  setTranslation(A, I) {
2503
2503
  this.rawSet.rbSetTranslation(this.handle, A.x, A.y, I);
@@ -2663,7 +2663,7 @@ class ug {
2663
2663
  }
2664
2664
  class VA {
2665
2665
  constructor(A) {
2666
- this.enabled = !0, this.status = A, this.translation = c.zeros(), this.rotation = rA.identity(), this.gravityScale = 1, this.linvel = c.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = c.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
2666
+ this.enabled = !0, this.status = A, this.translation = c.zeros(), this.rotation = nA.identity(), this.gravityScale = 1, this.linvel = c.zeros(), this.mass = 0, this.massOnly = !1, this.centerOfMass = c.zeros(), this.translationsEnabledX = !0, this.translationsEnabledY = !0, this.angvel = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0, this.linearDamping = 0, this.angularDamping = 0, this.canSleep = !0, this.sleeping = !1, this.ccdEnabled = !1, this.softCcdPrediction = 0, this.dominanceGroup = 0, this.additionalSolverIterations = 0;
2667
2667
  }
2668
2668
  static dynamic() {
2669
2669
  return new VA(XA.Dynamic);
@@ -2790,7 +2790,7 @@ class wg {
2790
2790
  }
2791
2791
  class oQ {
2792
2792
  constructor(A) {
2793
- this.raw = A || new YA(), this.map = new wg(), A && A.forEachRigidBodyHandle((I) => {
2793
+ this.raw = A || new lA(), this.map = new wg(), A && A.forEachRigidBodyHandle((I) => {
2794
2794
  this.map.set(I, new ug(A, null, I));
2795
2795
  });
2796
2796
  }
@@ -2801,7 +2801,7 @@ class oQ {
2801
2801
  this.map.forEach((I) => I.finalizeDeserialization(A));
2802
2802
  }
2803
2803
  createRigidBody(A, I) {
2804
- let C = c.intoRaw(I.translation), g = rA.intoRaw(I.rotation), Q = c.intoRaw(I.linvel), E = c.intoRaw(I.centerOfMass), i = this.raw.createRigidBody(I.enabled, C, g, I.gravityScale, I.mass, I.massOnly, E, Q, I.angvel, I.principalAngularInertia, I.translationsEnabledX, I.translationsEnabledY, I.rotationsEnabled, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
2804
+ let C = c.intoRaw(I.translation), g = nA.intoRaw(I.rotation), Q = c.intoRaw(I.linvel), E = c.intoRaw(I.centerOfMass), i = this.raw.createRigidBody(I.enabled, C, g, I.gravityScale, I.mass, I.massOnly, E, Q, I.angvel, I.principalAngularInertia, I.translationsEnabledX, I.translationsEnabledY, I.rotationsEnabled, I.linearDamping, I.angularDamping, I.status, I.canSleep, I.sleeping, I.softCcdPrediction, I.ccdEnabled, I.dominanceGroup, I.additionalSolverIterations);
2805
2805
  C.free(), g.free(), Q.free(), E.free();
2806
2806
  const w = new ug(this.raw, A, i);
2807
2807
  return w.userData = I.userData, this.map.set(i, w), w;
@@ -3025,7 +3025,7 @@ class hI {
3025
3025
  let A, I, C = c.intoRaw(this.anchor1), g = c.intoRaw(this.anchor2), Q = !1, E = 0, i = 0;
3026
3026
  switch (this.jointType) {
3027
3027
  case ZA.Fixed:
3028
- let w = rA.intoRaw(this.frame1), o = rA.intoRaw(this.frame2);
3028
+ let w = nA.intoRaw(this.frame1), o = nA.intoRaw(this.frame2);
3029
3029
  I = xA.fixed(C, w, g, o), w.free(), o.free();
3030
3030
  break;
3031
3031
  case ZA.Spring:
@@ -3289,7 +3289,7 @@ class MQ {
3289
3289
  this.raw.intersectionsWithRay(A.raw, I.raw, C.raw, G, t, Q, E, (K) => i(bI.fromRaw(C, K)), w, o, s, h, a), G.free(), t.free();
3290
3290
  }
3291
3291
  intersectionWithShape(A, I, C, g, Q, E, i, w, o, s, h) {
3292
- let a = c.intoRaw(g), G = rA.intoRaw(Q), t = E.intoRaw(), K = this.raw.intersectionWithShape(A.raw, I.raw, C.raw, a, G, t, i, w, o, s, h);
3292
+ let a = c.intoRaw(g), G = nA.intoRaw(Q), t = E.intoRaw(), K = this.raw.intersectionWithShape(A.raw, I.raw, C.raw, a, G, t, i, w, o, s, h);
3293
3293
  return a.free(), G.free(), t.free(), K;
3294
3294
  }
3295
3295
  projectPoint(A, I, C, g, Q, E, i, w, o, s) {
@@ -3305,11 +3305,11 @@ class MQ {
3305
3305
  this.raw.intersectionsWithPoint(A.raw, I.raw, C.raw, h, Q, E, i, w, o, s), h.free();
3306
3306
  }
3307
3307
  castShape(A, I, C, g, Q, E, i, w, o, s, h, a, G, t, K) {
3308
- let S = c.intoRaw(g), y = rA.intoRaw(Q), N = c.intoRaw(E), M = i.intoRaw(), e = xI.fromRaw(C, this.raw.castShape(A.raw, I.raw, C.raw, S, y, N, M, w, o, s, h, a, G, t, K));
3308
+ let S = c.intoRaw(g), y = nA.intoRaw(Q), N = c.intoRaw(E), M = i.intoRaw(), e = xI.fromRaw(C, this.raw.castShape(A.raw, I.raw, C.raw, S, y, N, M, w, o, s, h, a, G, t, K));
3309
3309
  return S.free(), y.free(), N.free(), M.free(), e;
3310
3310
  }
3311
3311
  intersectionsWithShape(A, I, C, g, Q, E, i, w, o, s, h, a) {
3312
- let G = c.intoRaw(g), t = rA.intoRaw(Q), K = E.intoRaw();
3312
+ let G = c.intoRaw(g), t = nA.intoRaw(Q), K = E.intoRaw();
3313
3313
  this.raw.intersectionsWithShape(A.raw, I.raw, C.raw, G, t, K, i, w, o, s, h, a), G.free(), t.free(), K.free();
3314
3314
  }
3315
3315
  collidersWithAabbIntersectingAabb(A, I, C, g, Q, E) {
@@ -3460,35 +3460,35 @@ class uA {
3460
3460
  }
3461
3461
  }
3462
3462
  castShape(A, I, C, g, Q, E, i, w, o, s) {
3463
- let h = c.intoRaw(A), a = rA.intoRaw(I), G = c.intoRaw(C), t = c.intoRaw(Q), K = rA.intoRaw(E), S = c.intoRaw(i), y = this.intoRaw(), N = g.intoRaw(), M = JI.fromRaw(null, y.castShape(h, a, G, N, t, K, S, w, o, s));
3463
+ let h = c.intoRaw(A), a = nA.intoRaw(I), G = c.intoRaw(C), t = c.intoRaw(Q), K = nA.intoRaw(E), S = c.intoRaw(i), y = this.intoRaw(), N = g.intoRaw(), M = JI.fromRaw(null, y.castShape(h, a, G, N, t, K, S, w, o, s));
3464
3464
  return h.free(), a.free(), G.free(), t.free(), K.free(), S.free(), y.free(), N.free(), M;
3465
3465
  }
3466
3466
  intersectsShape(A, I, C, g, Q) {
3467
- let E = c.intoRaw(A), i = rA.intoRaw(I), w = c.intoRaw(g), o = rA.intoRaw(Q), s = this.intoRaw(), h = C.intoRaw(), a = s.intersectsShape(E, i, h, w, o);
3467
+ let E = c.intoRaw(A), i = nA.intoRaw(I), w = c.intoRaw(g), o = nA.intoRaw(Q), s = this.intoRaw(), h = C.intoRaw(), a = s.intersectsShape(E, i, h, w, o);
3468
3468
  return E.free(), i.free(), w.free(), o.free(), s.free(), h.free(), a;
3469
3469
  }
3470
3470
  contactShape(A, I, C, g, Q, E) {
3471
- let i = c.intoRaw(A), w = rA.intoRaw(I), o = c.intoRaw(g), s = rA.intoRaw(Q), h = this.intoRaw(), a = C.intoRaw(), G = cI.fromRaw(h.contactShape(i, w, a, o, s, E));
3471
+ let i = c.intoRaw(A), w = nA.intoRaw(I), o = c.intoRaw(g), s = nA.intoRaw(Q), h = this.intoRaw(), a = C.intoRaw(), G = cI.fromRaw(h.contactShape(i, w, a, o, s, E));
3472
3472
  return i.free(), w.free(), o.free(), s.free(), h.free(), a.free(), G;
3473
3473
  }
3474
3474
  containsPoint(A, I, C) {
3475
- let g = c.intoRaw(A), Q = rA.intoRaw(I), E = c.intoRaw(C), i = this.intoRaw(), w = i.containsPoint(g, Q, E);
3475
+ let g = c.intoRaw(A), Q = nA.intoRaw(I), E = c.intoRaw(C), i = this.intoRaw(), w = i.containsPoint(g, Q, E);
3476
3476
  return g.free(), Q.free(), E.free(), i.free(), w;
3477
3477
  }
3478
3478
  projectPoint(A, I, C, g) {
3479
- let Q = c.intoRaw(A), E = rA.intoRaw(I), i = c.intoRaw(C), w = this.intoRaw(), o = mI.fromRaw(w.projectPoint(Q, E, i, g));
3479
+ let Q = c.intoRaw(A), E = nA.intoRaw(I), i = c.intoRaw(C), w = this.intoRaw(), o = mI.fromRaw(w.projectPoint(Q, E, i, g));
3480
3480
  return Q.free(), E.free(), i.free(), w.free(), o;
3481
3481
  }
3482
3482
  intersectsRay(A, I, C, g) {
3483
- let Q = c.intoRaw(I), E = rA.intoRaw(C), i = c.intoRaw(A.origin), w = c.intoRaw(A.dir), o = this.intoRaw(), s = o.intersectsRay(Q, E, i, w, g);
3483
+ let Q = c.intoRaw(I), E = nA.intoRaw(C), i = c.intoRaw(A.origin), w = c.intoRaw(A.dir), o = this.intoRaw(), s = o.intersectsRay(Q, E, i, w, g);
3484
3484
  return Q.free(), E.free(), i.free(), w.free(), o.free(), s;
3485
3485
  }
3486
3486
  castRay(A, I, C, g, Q) {
3487
- let E = c.intoRaw(I), i = rA.intoRaw(C), w = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = s.castRay(E, i, w, o, g, Q);
3487
+ let E = c.intoRaw(I), i = nA.intoRaw(C), w = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = s.castRay(E, i, w, o, g, Q);
3488
3488
  return E.free(), i.free(), w.free(), o.free(), s.free(), h;
3489
3489
  }
3490
3490
  castRayAndGetNormal(A, I, C, g, Q) {
3491
- let E = c.intoRaw(I), i = rA.intoRaw(C), w = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = uI.fromRaw(s.castRayAndGetNormal(E, i, w, o, g, Q));
3491
+ let E = c.intoRaw(I), i = nA.intoRaw(C), w = c.intoRaw(A.origin), o = c.intoRaw(A.dir), s = this.intoRaw(), h = uI.fromRaw(s.castRayAndGetNormal(E, i, w, o, g, Q));
3492
3492
  return E.free(), i.free(), w.free(), o.free(), s.free(), h;
3493
3493
  }
3494
3494
  }
@@ -3502,7 +3502,7 @@ class $g extends uA {
3502
3502
  super(), this.type = bA.Ball, this.radius = A;
3503
3503
  }
3504
3504
  intoRaw() {
3505
- return SA.ball(this.radius);
3505
+ return yA.ball(this.radius);
3506
3506
  }
3507
3507
  }
3508
3508
  class AC extends uA {
@@ -3510,7 +3510,7 @@ class AC extends uA {
3510
3510
  super(), this.type = bA.HalfSpace, this.normal = A;
3511
3511
  }
3512
3512
  intoRaw() {
3513
- let A = c.intoRaw(this.normal), I = SA.halfspace(A);
3513
+ let A = c.intoRaw(this.normal), I = yA.halfspace(A);
3514
3514
  return A.free(), I;
3515
3515
  }
3516
3516
  }
@@ -3519,7 +3519,7 @@ class IC extends uA {
3519
3519
  super(), this.type = bA.Cuboid, this.halfExtents = c.new(A, I);
3520
3520
  }
3521
3521
  intoRaw() {
3522
- return SA.cuboid(this.halfExtents.x, this.halfExtents.y);
3522
+ return yA.cuboid(this.halfExtents.x, this.halfExtents.y);
3523
3523
  }
3524
3524
  }
3525
3525
  class gC extends uA {
@@ -3527,7 +3527,7 @@ class gC extends uA {
3527
3527
  super(), this.type = bA.RoundCuboid, this.halfExtents = c.new(A, I), this.borderRadius = C;
3528
3528
  }
3529
3529
  intoRaw() {
3530
- return SA.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
3530
+ return yA.roundCuboid(this.halfExtents.x, this.halfExtents.y, this.borderRadius);
3531
3531
  }
3532
3532
  }
3533
3533
  class CC extends uA {
@@ -3535,7 +3535,7 @@ class CC extends uA {
3535
3535
  super(), this.type = bA.Capsule, this.halfHeight = A, this.radius = I;
3536
3536
  }
3537
3537
  intoRaw() {
3538
- return SA.capsule(this.halfHeight, this.radius);
3538
+ return yA.capsule(this.halfHeight, this.radius);
3539
3539
  }
3540
3540
  }
3541
3541
  class QC extends uA {
@@ -3543,7 +3543,7 @@ class QC extends uA {
3543
3543
  super(), this.type = bA.Segment, this.a = A, this.b = I;
3544
3544
  }
3545
3545
  intoRaw() {
3546
- let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = SA.segment(A, I);
3546
+ let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = yA.segment(A, I);
3547
3547
  return A.free(), I.free(), C;
3548
3548
  }
3549
3549
  }
@@ -3552,7 +3552,7 @@ class BC extends uA {
3552
3552
  super(), this.type = bA.Triangle, this.a = A, this.b = I, this.c = C;
3553
3553
  }
3554
3554
  intoRaw() {
3555
- let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g = SA.triangle(A, I, C);
3555
+ let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g = yA.triangle(A, I, C);
3556
3556
  return A.free(), I.free(), C.free(), g;
3557
3557
  }
3558
3558
  }
@@ -3561,7 +3561,7 @@ class EC extends uA {
3561
3561
  super(), this.type = bA.RoundTriangle, this.a = A, this.b = I, this.c = C, this.borderRadius = g;
3562
3562
  }
3563
3563
  intoRaw() {
3564
- let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g = SA.roundTriangle(A, I, C, this.borderRadius);
3564
+ let A = c.intoRaw(this.a), I = c.intoRaw(this.b), C = c.intoRaw(this.c), g = yA.roundTriangle(A, I, C, this.borderRadius);
3565
3565
  return A.free(), I.free(), C.free(), g;
3566
3566
  }
3567
3567
  }
@@ -3570,7 +3570,7 @@ class iC extends uA {
3570
3570
  super(), this.type = bA.Polyline, this.vertices = A, this.indices = I ?? new Uint32Array(0);
3571
3571
  }
3572
3572
  intoRaw() {
3573
- return SA.polyline(this.vertices, this.indices);
3573
+ return yA.polyline(this.vertices, this.indices);
3574
3574
  }
3575
3575
  }
3576
3576
  class oC extends uA {
@@ -3579,7 +3579,7 @@ class oC extends uA {
3579
3579
  }
3580
3580
  intoRaw() {
3581
3581
  let A, I = c.intoRaw(this.voxelSize);
3582
- return A = this.data instanceof Int32Array ? SA.voxels(I, this.data) : SA.voxelsFromPoints(I, this.data), I.free(), A;
3582
+ return A = this.data instanceof Int32Array ? yA.voxels(I, this.data) : yA.voxelsFromPoints(I, this.data), I.free(), A;
3583
3583
  }
3584
3584
  }
3585
3585
  class DC extends uA {
@@ -3587,7 +3587,7 @@ class DC extends uA {
3587
3587
  super(), this.type = bA.TriMesh, this.vertices = A, this.indices = I, this.flags = C;
3588
3588
  }
3589
3589
  intoRaw() {
3590
- return SA.trimesh(this.vertices, this.indices, this.flags);
3590
+ return yA.trimesh(this.vertices, this.indices, this.flags);
3591
3591
  }
3592
3592
  }
3593
3593
  class Ag extends uA {
@@ -3595,7 +3595,7 @@ class Ag extends uA {
3595
3595
  super(), this.type = bA.ConvexPolygon, this.vertices = A, this.skipConvexHullComputation = !!I;
3596
3596
  }
3597
3597
  intoRaw() {
3598
- return this.skipConvexHullComputation ? SA.convexPolyline(this.vertices) : SA.convexHull(this.vertices);
3598
+ return this.skipConvexHullComputation ? yA.convexPolyline(this.vertices) : yA.convexHull(this.vertices);
3599
3599
  }
3600
3600
  }
3601
3601
  class Ig extends uA {
@@ -3603,7 +3603,7 @@ class Ig extends uA {
3603
3603
  super(), this.type = bA.RoundConvexPolygon, this.vertices = A, this.borderRadius = I, this.skipConvexHullComputation = !!C;
3604
3604
  }
3605
3605
  intoRaw() {
3606
- return this.skipConvexHullComputation ? SA.roundConvexPolyline(this.vertices, this.borderRadius) : SA.roundConvexHull(this.vertices, this.borderRadius);
3606
+ return this.skipConvexHullComputation ? yA.roundConvexPolyline(this.vertices, this.borderRadius) : yA.roundConvexHull(this.vertices, this.borderRadius);
3607
3607
  }
3608
3608
  }
3609
3609
  class wC extends uA {
@@ -3611,7 +3611,7 @@ class wC extends uA {
3611
3611
  super(), this.type = bA.HeightField, this.heights = A, this.scale = I;
3612
3612
  }
3613
3613
  intoRaw() {
3614
- let A = c.intoRaw(this.scale), I = SA.heightfield(this.heights, A);
3614
+ let A = c.intoRaw(this.scale), I = yA.heightfield(this.heights, A);
3615
3615
  return A.free(), I;
3616
3616
  }
3617
3617
  }
@@ -4102,10 +4102,10 @@ class xg {
4102
4102
  return c.fromRaw(this.colliderSet.raw.coTranslationWrtParent(this.handle));
4103
4103
  }
4104
4104
  rotation() {
4105
- return rA.fromRaw(this.colliderSet.raw.coRotation(this.handle));
4105
+ return nA.fromRaw(this.colliderSet.raw.coRotation(this.handle));
4106
4106
  }
4107
4107
  rotationWrtParent() {
4108
- return rA.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
4108
+ return nA.fromRaw(this.colliderSet.raw.coRotationWrtParent(this.handle));
4109
4109
  }
4110
4110
  isSensor() {
4111
4111
  return this.colliderSet.raw.coIsSensor(this.handle);
@@ -4286,7 +4286,7 @@ class xg {
4286
4286
  return C.free(), g.free(), Q;
4287
4287
  }
4288
4288
  castShape(A, I, C, g, Q, E, i, w) {
4289
- let o = c.intoRaw(A), s = c.intoRaw(C), h = rA.intoRaw(g), a = c.intoRaw(Q), G = I.intoRaw(), t = JI.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, o, G, s, h, a, E, i, w));
4289
+ let o = c.intoRaw(A), s = c.intoRaw(C), h = nA.intoRaw(g), a = c.intoRaw(Q), G = I.intoRaw(), t = JI.fromRaw(this.colliderSet, this.colliderSet.raw.coCastShape(this.handle, o, G, s, h, a, E, i, w));
4290
4290
  return o.free(), s.free(), h.free(), a.free(), G.free(), t;
4291
4291
  }
4292
4292
  castCollider(A, I, C, g, Q, E) {
@@ -4294,11 +4294,11 @@ class xg {
4294
4294
  return i.free(), w.free(), o;
4295
4295
  }
4296
4296
  intersectsShape(A, I, C) {
4297
- let g = c.intoRaw(I), Q = rA.intoRaw(C), E = A.intoRaw(), i = this.colliderSet.raw.coIntersectsShape(this.handle, E, g, Q);
4297
+ let g = c.intoRaw(I), Q = nA.intoRaw(C), E = A.intoRaw(), i = this.colliderSet.raw.coIntersectsShape(this.handle, E, g, Q);
4298
4298
  return g.free(), Q.free(), E.free(), i;
4299
4299
  }
4300
4300
  contactShape(A, I, C, g) {
4301
- let Q = c.intoRaw(I), E = rA.intoRaw(C), i = A.intoRaw(), w = cI.fromRaw(this.colliderSet.raw.coContactShape(this.handle, i, Q, E, g));
4301
+ let Q = c.intoRaw(I), E = nA.intoRaw(C), i = A.intoRaw(), w = cI.fromRaw(this.colliderSet.raw.coContactShape(this.handle, i, Q, E, g));
4302
4302
  return Q.free(), E.free(), i.free(), w;
4303
4303
  }
4304
4304
  contactCollider(A, I) {
@@ -4318,7 +4318,7 @@ class xg {
4318
4318
  })(tI || (tI = {}));
4319
4319
  class dA {
4320
4320
  constructor(A) {
4321
- this.enabled = !0, this.shape = A, this.massPropsMode = tI.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = rA.identity(), this.translation = c.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = fI.Average, this.restitutionCombineRule = fI.Average, this.activeCollisionTypes = $I.DEFAULT, this.activeEvents = zI.NONE, this.activeHooks = _I.NONE, this.mass = 0, this.centerOfMass = c.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0;
4321
+ this.enabled = !0, this.shape = A, this.massPropsMode = tI.Density, this.density = 1, this.friction = 0.5, this.restitution = 0, this.rotation = nA.identity(), this.translation = c.zeros(), this.isSensor = !1, this.collisionGroups = 4294967295, this.solverGroups = 4294967295, this.frictionCombineRule = fI.Average, this.restitutionCombineRule = fI.Average, this.activeCollisionTypes = $I.DEFAULT, this.activeEvents = zI.NONE, this.activeHooks = _I.NONE, this.mass = 0, this.centerOfMass = c.zeros(), this.contactForceEventThreshold = 0, this.contactSkin = 0, this.principalAngularInertia = 0, this.rotationsEnabled = !0;
4322
4322
  }
4323
4323
  static ball(A) {
4324
4324
  const I = new $g(A);
@@ -4442,7 +4442,7 @@ class dA {
4442
4442
  }
4443
4443
  class LQ {
4444
4444
  constructor(A) {
4445
- this.raw = A || new LA(), this.map = new wg(), A && A.forEachColliderHandle((I) => {
4445
+ this.raw = A || new qA(), this.map = new wg(), A && A.forEachColliderHandle((I) => {
4446
4446
  this.map.set(I, new xg(this, I, null));
4447
4447
  });
4448
4448
  }
@@ -4458,7 +4458,7 @@ class LQ {
4458
4458
  createCollider(A, I, C) {
4459
4459
  let g = C != null && C != null;
4460
4460
  if (g && isNaN(C)) throw Error("Cannot create a collider with a parent rigid-body handle that is not a number.");
4461
- let Q = I.shape.intoRaw(), E = c.intoRaw(I.translation), i = rA.intoRaw(I.rotation), w = c.intoRaw(I.centerOfMass), o = this.raw.createCollider(I.enabled, Q, E, i, I.massPropsMode, I.mass, w, I.principalAngularInertia, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, g, g ? C : 0, A.raw);
4461
+ let Q = I.shape.intoRaw(), E = c.intoRaw(I.translation), i = nA.intoRaw(I.rotation), w = c.intoRaw(I.centerOfMass), o = this.raw.createCollider(I.enabled, Q, E, i, I.massPropsMode, I.mass, w, I.principalAngularInertia, I.density, I.friction, I.restitution, I.frictionCombineRule, I.restitutionCombineRule, I.isSensor, I.collisionGroups, I.solverGroups, I.activeCollisionTypes, I.activeHooks, I.activeEvents, I.contactForceEventThreshold, I.contactSkin, g, g ? C : 0, A.raw);
4462
4462
  Q.free(), E.free(), i.free(), w.free();
4463
4463
  let s = g ? A.get(C) : null, h = new xg(this, o, s, I.shape);
4464
4464
  return this.map.set(o, h), h;
@@ -4556,7 +4556,7 @@ function GB(B) {
4556
4556
  A = B, D.reserve_memory(A);
4557
4557
  }
4558
4558
  jA[45] = 62, jA[95] = 63;
4559
- var OA = Object.freeze({ __proto__: null, version: aB, reserveMemory: GB, Vector2: iQ, VectorOps: c, RotationOps: rA, get RigidBodyType() {
4559
+ var OA = Object.freeze({ __proto__: null, version: aB, reserveMemory: GB, Vector2: iQ, VectorOps: c, RotationOps: nA, get RigidBodyType() {
4560
4560
  return XA;
4561
4561
  }, RigidBody: ug, RigidBodyDesc: VA, RigidBodySet: oQ, IntegrationParameters: DQ, get JointType() {
4562
4562
  return ZA;
@@ -4589,10 +4589,10 @@ var OA = Object.freeze({ __proto__: null, version: aB, reserveMemory: GB, Vector
4589
4589
  }, PidController: YQ });
4590
4590
  class tB {
4591
4591
  constructor() {
4592
- GA(this, "world", null);
4593
- GA(this, "bodies", /* @__PURE__ */ new Map());
4594
- GA(this, "colliders", /* @__PURE__ */ new Map());
4595
- GA(this, "initialized", !1);
4592
+ tA(this, "world", null);
4593
+ tA(this, "bodies", /* @__PURE__ */ new Map());
4594
+ tA(this, "colliders", /* @__PURE__ */ new Map());
4595
+ tA(this, "initialized", !1);
4596
4596
  }
4597
4597
  async init(A) {
4598
4598
  this.initialized || (await OA.init(), this.world = new OA.World(new OA.Vector2(A.x, A.y)), this.initialized = !0);
@@ -5975,70 +5975,70 @@ function SE(B, A, I) {
5975
5975
  function N() {
5976
5976
  S = -1, y = 0;
5977
5977
  }
5978
- function M(L = t, P = K, wA = s) {
5978
+ function M(q = t, P = K, sA = s) {
5979
5979
  o++, I == null || I({
5980
5980
  startSegmentIndex: a,
5981
5981
  startGraphemeIndex: G,
5982
- endSegmentIndex: L,
5982
+ endSegmentIndex: q,
5983
5983
  endGraphemeIndex: P,
5984
- width: wA
5984
+ width: sA
5985
5985
  }), s = 0, h = !1, N();
5986
5986
  }
5987
- function e(L, P) {
5988
- h = !0, a = L, G = 0, t = L + 1, K = 0, s = P;
5987
+ function e(q, P) {
5988
+ h = !0, a = q, G = 0, t = q + 1, K = 0, s = P;
5989
5989
  }
5990
- function Y(L, P, wA) {
5991
- h = !0, a = L, G = P, t = L, K = P + 1, s = wA;
5990
+ function Y(q, P, sA) {
5991
+ h = !0, a = q, G = P, t = q, K = P + 1, s = sA;
5992
5992
  }
5993
- function j(L, P) {
5993
+ function j(q, P) {
5994
5994
  if (!h) {
5995
- e(L, P);
5995
+ e(q, P);
5996
5996
  return;
5997
5997
  }
5998
- s += P, t = L + 1, K = 0;
5998
+ s += P, t = q + 1, K = 0;
5999
5999
  }
6000
- function l(L, P) {
6001
- gg(g[L]) && (S = L + 1, y = s - P);
6000
+ function l(q, P) {
6001
+ gg(g[q]) && (S = q + 1, y = s - P);
6002
6002
  }
6003
- function r(L) {
6004
- v(L, 0);
6003
+ function r(q) {
6004
+ v(q, 0);
6005
6005
  }
6006
- function v(L, P) {
6007
- const wA = Q[L], EA = E[L] ?? null;
6008
- for (let u = P; u < wA.length; u++) {
6009
- const z = fQ(wA, EA, u, i.preferPrefixWidthsForBreakableRuns);
6006
+ function v(q, P) {
6007
+ const sA = Q[q], EA = E[q] ?? null;
6008
+ for (let T = P; T < sA.length; T++) {
6009
+ const V = fQ(sA, EA, T, i.preferPrefixWidthsForBreakableRuns);
6010
6010
  if (!h) {
6011
- Y(L, u, z);
6011
+ Y(q, T, V);
6012
6012
  continue;
6013
6013
  }
6014
- s + z > A + w ? (M(), Y(L, u, z)) : (s += z, t = L, K = u + 1);
6014
+ s + V > A + w ? (M(), Y(q, T, V)) : (s += V, t = q, K = T + 1);
6015
6015
  }
6016
- h && t === L && K === wA.length && (t = L + 1, K = 0);
6016
+ h && t === q && K === sA.length && (t = q + 1, K = 0);
6017
6017
  }
6018
6018
  let n = 0;
6019
6019
  for (; n < C.length; ) {
6020
- const L = C[n], P = g[n];
6020
+ const q = C[n], P = g[n];
6021
6021
  if (!h) {
6022
- L > A && Q[n] !== null ? r(n) : e(n, L), l(n, L), n++;
6022
+ q > A && Q[n] !== null ? r(n) : e(n, q), l(n, q), n++;
6023
6023
  continue;
6024
6024
  }
6025
- if (s + L > A + w) {
6025
+ if (s + q > A + w) {
6026
6026
  if (gg(P)) {
6027
- j(n, L), M(n + 1, 0, s - L), n++;
6027
+ j(n, q), M(n + 1, 0, s - q), n++;
6028
6028
  continue;
6029
6029
  }
6030
6030
  if (S >= 0) {
6031
6031
  M(S, 0, y);
6032
6032
  continue;
6033
6033
  }
6034
- if (L > A && Q[n] !== null) {
6034
+ if (q > A && Q[n] !== null) {
6035
6035
  M(), r(n), n++;
6036
6036
  continue;
6037
6037
  }
6038
6038
  M();
6039
6039
  continue;
6040
6040
  }
6041
- j(n, L), l(n, L), n++;
6041
+ j(n, q), l(n, q), n++;
6042
6042
  }
6043
6043
  return h && M(), o;
6044
6044
  }
@@ -6053,115 +6053,115 @@ function yE(B, A, I) {
6053
6053
  function v() {
6054
6054
  Y = -1, j = 0, l = 0, r = null;
6055
6055
  }
6056
- function n(p = M, d = e, R = K) {
6056
+ function n(d = M, p = e, U = K) {
6057
6057
  t++, I == null || I({
6058
6058
  startSegmentIndex: y,
6059
6059
  startGraphemeIndex: N,
6060
- endSegmentIndex: p,
6061
- endGraphemeIndex: d,
6062
- width: R
6060
+ endSegmentIndex: d,
6061
+ endGraphemeIndex: p,
6062
+ width: U
6063
6063
  }), K = 0, S = !1, v();
6064
6064
  }
6065
- function L(p, d) {
6066
- S = !0, y = p, N = 0, M = p + 1, e = 0, K = d;
6065
+ function q(d, p) {
6066
+ S = !0, y = d, N = 0, M = d + 1, e = 0, K = p;
6067
6067
  }
6068
- function P(p, d, R) {
6069
- S = !0, y = p, N = d, M = p, e = d + 1, K = R;
6068
+ function P(d, p, U) {
6069
+ S = !0, y = d, N = p, M = d, e = p + 1, K = U;
6070
6070
  }
6071
- function wA(p, d) {
6071
+ function sA(d, p) {
6072
6072
  if (!S) {
6073
- L(p, d);
6073
+ q(d, p);
6074
6074
  return;
6075
6075
  }
6076
- K += d, M = p + 1, e = 0;
6076
+ K += p, M = d + 1, e = 0;
6077
6077
  }
6078
- function EA(p, d) {
6079
- if (!gg(E[p]))
6078
+ function EA(d, p) {
6079
+ if (!gg(E[d]))
6080
6080
  return;
6081
- const R = E[p] === "tab" ? 0 : g[p], m = E[p] === "tab" ? d : Q[p];
6082
- Y = p + 1, j = K - d + R, l = K - d + m, r = E[p];
6081
+ const U = E[d] === "tab" ? 0 : g[d], _ = E[d] === "tab" ? p : Q[d];
6082
+ Y = d + 1, j = K - p + U, l = K - p + _, r = E[d];
6083
6083
  }
6084
- function u(p) {
6085
- z(p, 0);
6084
+ function T(d) {
6085
+ V(d, 0);
6086
6086
  }
6087
- function z(p, d) {
6088
- const R = i[p], m = w[p] ?? null;
6089
- for (let b = d; b < R.length; b++) {
6090
- const AA = fQ(R, m, b, a.preferPrefixWidthsForBreakableRuns);
6087
+ function V(d, p) {
6088
+ const U = i[d], _ = w[d] ?? null;
6089
+ for (let f = p; f < U.length; f++) {
6090
+ const $ = fQ(U, _, f, a.preferPrefixWidthsForBreakableRuns);
6091
6091
  if (!S) {
6092
- P(p, b, AA);
6092
+ P(d, f, $);
6093
6093
  continue;
6094
6094
  }
6095
- K + AA > A + G ? (n(), P(p, b, AA)) : (K += AA, M = p, e = b + 1);
6095
+ K + $ > A + G ? (n(), P(d, f, $)) : (K += $, M = d, e = f + 1);
6096
6096
  }
6097
- S && M === p && e === R.length && (M = p + 1, e = 0);
6097
+ S && M === d && e === U.length && (M = d + 1, e = 0);
6098
6098
  }
6099
- function IA(p) {
6099
+ function IA(d) {
6100
6100
  if (r !== "soft-hyphen")
6101
6101
  return !1;
6102
- const d = i[p];
6103
- if (d === null)
6102
+ const p = i[d];
6103
+ if (p === null)
6104
6104
  return !1;
6105
- const R = a.preferPrefixWidthsForBreakableRuns ? w[p] ?? d : d, m = R !== d, { fitCount: b, fittedWidth: AA } = KE(R, K, A, G, o, m);
6106
- return b === 0 ? !1 : (K = AA, M = p, e = b, v(), b === d.length ? (M = p + 1, e = 0, !0) : (n(p, b, AA + o), z(p, b), !0));
6105
+ const U = a.preferPrefixWidthsForBreakableRuns ? w[d] ?? p : p, _ = U !== p, { fitCount: f, fittedWidth: $ } = KE(U, K, A, G, o, _);
6106
+ return f === 0 ? !1 : (K = $, M = d, e = f, v(), f === p.length ? (M = d + 1, e = 0, !0) : (n(d, f, $ + o), V(d, f), !0));
6107
6107
  }
6108
- function Z(p) {
6108
+ function x(d) {
6109
6109
  t++, I == null || I({
6110
- startSegmentIndex: p.startSegmentIndex,
6110
+ startSegmentIndex: d.startSegmentIndex,
6111
6111
  startGraphemeIndex: 0,
6112
- endSegmentIndex: p.consumedEndSegmentIndex,
6112
+ endSegmentIndex: d.consumedEndSegmentIndex,
6113
6113
  endGraphemeIndex: 0,
6114
6114
  width: 0
6115
6115
  }), v();
6116
6116
  }
6117
- for (let p = 0; p < h.length; p++) {
6118
- const d = h[p];
6119
- if (d.startSegmentIndex === d.endSegmentIndex) {
6120
- Z(d);
6117
+ for (let d = 0; d < h.length; d++) {
6118
+ const p = h[d];
6119
+ if (p.startSegmentIndex === p.endSegmentIndex) {
6120
+ x(p);
6121
6121
  continue;
6122
6122
  }
6123
- S = !1, K = 0, y = d.startSegmentIndex, N = 0, M = d.startSegmentIndex, e = 0, v();
6124
- let R = d.startSegmentIndex;
6125
- for (; R < d.endSegmentIndex; ) {
6126
- const m = E[R], b = m === "tab" ? tE(K, s) : C[R];
6127
- if (m === "soft-hyphen") {
6128
- S && (M = R + 1, e = 0, Y = R + 1, j = K + o, l = K + o, r = m), R++;
6123
+ S = !1, K = 0, y = p.startSegmentIndex, N = 0, M = p.startSegmentIndex, e = 0, v();
6124
+ let U = p.startSegmentIndex;
6125
+ for (; U < p.endSegmentIndex; ) {
6126
+ const _ = E[U], f = _ === "tab" ? tE(K, s) : C[U];
6127
+ if (_ === "soft-hyphen") {
6128
+ S && (M = U + 1, e = 0, Y = U + 1, j = K + o, l = K + o, r = _), U++;
6129
6129
  continue;
6130
6130
  }
6131
6131
  if (!S) {
6132
- b > A && i[R] !== null ? u(R) : L(R, b), EA(R, b), R++;
6132
+ f > A && i[U] !== null ? T(U) : q(U, f), EA(U, f), U++;
6133
6133
  continue;
6134
6134
  }
6135
- if (K + b > A + G) {
6136
- const sA = K + (m === "tab" ? 0 : g[R]), kA = K + (m === "tab" ? b : Q[R]);
6135
+ if (K + f > A + G) {
6136
+ const hA = K + (_ === "tab" ? 0 : g[U]), KA = K + (_ === "tab" ? f : Q[U]);
6137
6137
  if (r === "soft-hyphen" && a.preferEarlySoftHyphenBreak && j <= A + G) {
6138
6138
  n(Y, 0, l);
6139
6139
  continue;
6140
6140
  }
6141
- if (r === "soft-hyphen" && IA(R)) {
6142
- R++;
6141
+ if (r === "soft-hyphen" && IA(U)) {
6142
+ U++;
6143
6143
  continue;
6144
6144
  }
6145
- if (gg(m) && sA <= A + G) {
6146
- wA(R, b), n(R + 1, 0, kA), R++;
6145
+ if (gg(_) && hA <= A + G) {
6146
+ sA(U, f), n(U + 1, 0, KA), U++;
6147
6147
  continue;
6148
6148
  }
6149
6149
  if (Y >= 0 && j <= A + G) {
6150
6150
  n(Y, 0, l);
6151
6151
  continue;
6152
6152
  }
6153
- if (b > A && i[R] !== null) {
6154
- n(), u(R), R++;
6153
+ if (f > A && i[U] !== null) {
6154
+ n(), T(U), U++;
6155
6155
  continue;
6156
6156
  }
6157
6157
  n();
6158
6158
  continue;
6159
6159
  }
6160
- wA(R, b), EA(R, b), R++;
6160
+ sA(U, f), EA(U, f), U++;
6161
6161
  }
6162
6162
  if (S) {
6163
- const m = Y === d.consumedEndSegmentIndex ? l : K;
6164
- n(d.consumedEndSegmentIndex, 0, m);
6163
+ const _ = Y === p.consumedEndSegmentIndex ? l : K;
6164
+ n(p.consumedEndSegmentIndex, 0, _);
6165
6165
  }
6166
6166
  }
6167
6167
  return t;
@@ -6193,53 +6193,53 @@ function NE(B, A, I) {
6193
6193
  const s = [], h = [], a = [], G = [];
6194
6194
  let t = B.chunks.length <= 1;
6195
6195
  const K = [], S = [], y = [], N = I ? [] : null, M = Array.from({ length: B.len }), e = Array.from({ length: B.len });
6196
- function Y(r, v, n, L, P, wA, EA, u) {
6197
- P !== "text" && P !== "space" && P !== "zero-width-break" && (t = !1), s.push(v), h.push(n), a.push(L), G.push(P), K == null || K.push(wA), S.push(EA), y.push(u), N !== null && N.push(r);
6196
+ function Y(r, v, n, q, P, sA, EA, T) {
6197
+ P !== "text" && P !== "space" && P !== "zero-width-break" && (t = !1), s.push(v), h.push(n), a.push(q), G.push(P), K == null || K.push(sA), S.push(EA), y.push(T), N !== null && N.push(r);
6198
6198
  }
6199
6199
  for (let r = 0; r < B.len; r++) {
6200
6200
  M[r] = s.length;
6201
- const v = B.texts[r], n = B.isWordLike[r], L = B.kinds[r], P = B.starts[r];
6202
- if (L === "soft-hyphen") {
6203
- Y(v, 0, i, i, L, P, null, null), e[r] = s.length;
6201
+ const v = B.texts[r], n = B.isWordLike[r], q = B.kinds[r], P = B.starts[r];
6202
+ if (q === "soft-hyphen") {
6203
+ Y(v, 0, i, i, q, P, null, null), e[r] = s.length;
6204
6204
  continue;
6205
6205
  }
6206
- if (L === "hard-break") {
6207
- Y(v, 0, 0, 0, L, P, null, null), e[r] = s.length;
6206
+ if (q === "hard-break") {
6207
+ Y(v, 0, 0, 0, q, P, null, null), e[r] = s.length;
6208
6208
  continue;
6209
6209
  }
6210
- if (L === "tab") {
6211
- Y(v, 0, 0, 0, L, P, null, null), e[r] = s.length;
6210
+ if (q === "tab") {
6211
+ Y(v, 0, 0, 0, q, P, null, null), e[r] = s.length;
6212
6212
  continue;
6213
6213
  }
6214
- const wA = aI(v, Q);
6215
- if (L === "text" && wA.containsCJK) {
6216
- let IA = "", Z = 0;
6217
- for (const p of C.segment(v)) {
6218
- const d = p.segment;
6214
+ const sA = aI(v, Q);
6215
+ if (q === "text" && sA.containsCJK) {
6216
+ let IA = "", x = 0;
6217
+ for (const d of C.segment(v)) {
6218
+ const p = d.segment;
6219
6219
  if (IA.length === 0) {
6220
- IA = d, Z = p.index;
6220
+ IA = p, x = d.index;
6221
6221
  continue;
6222
6222
  }
6223
- if (Gg.has(IA) || pQ.has(d) || OI.has(d) || g.carryCJKAfterClosingQuote && KI(d) && HQ(IA)) {
6224
- IA += d;
6223
+ if (Gg.has(IA) || pQ.has(p) || OI.has(p) || g.carryCJKAfterClosingQuote && KI(p) && HQ(IA)) {
6224
+ IA += p;
6225
6225
  continue;
6226
6226
  }
6227
- const R = aI(IA, Q), m = GI(IA, R, E);
6228
- Y(IA, m, m, m, "text", P + Z, null, null), IA = d, Z = p.index;
6227
+ const U = aI(IA, Q), _ = GI(IA, U, E);
6228
+ Y(IA, _, _, _, "text", P + x, null, null), IA = p, x = d.index;
6229
6229
  }
6230
6230
  if (IA.length > 0) {
6231
- const p = aI(IA, Q), d = GI(IA, p, E);
6232
- Y(IA, d, d, d, "text", P + Z, null, null);
6231
+ const d = aI(IA, Q), p = GI(IA, d, E);
6232
+ Y(IA, p, p, p, "text", P + x, null, null);
6233
6233
  }
6234
6234
  e[r] = s.length;
6235
6235
  continue;
6236
6236
  }
6237
- const EA = GI(v, wA, E), u = L === "space" || L === "preserved-space" || L === "zero-width-break" ? 0 : EA, z = L === "space" || L === "zero-width-break" ? 0 : EA;
6237
+ const EA = GI(v, sA, E), T = q === "space" || q === "preserved-space" || q === "zero-width-break" ? 0 : EA, V = q === "space" || q === "zero-width-break" ? 0 : EA;
6238
6238
  if (n && v.length > 1) {
6239
- const IA = hE(v, wA, Q, E), Z = g.preferPrefixWidthsForBreakableRuns ? aE(v, wA, Q, E) : null;
6240
- Y(v, EA, u, z, L, P, IA, Z);
6239
+ const IA = hE(v, sA, Q, E), x = g.preferPrefixWidthsForBreakableRuns ? aE(v, sA, Q, E) : null;
6240
+ Y(v, EA, T, V, q, P, IA, x);
6241
6241
  } else
6242
- Y(v, EA, u, z, L, P, null, null);
6242
+ Y(v, EA, T, V, q, P, null, null);
6243
6243
  e[r] = s.length;
6244
6244
  }
6245
6245
  const j = FE(B.chunks, M, e), l = K === null ? null : NB(B.normalized, K);
@@ -6485,57 +6485,57 @@ const TQ = (B) => B, YE = (B) => B > 0 ? 1 : 0, lE = (B) => B < 1 ? 0 : 1, vC =
6485
6485
  };
6486
6486
  class Ei {
6487
6487
  constructor() {
6488
- GA(this, "artboard", null);
6489
- GA(this, "objectStates", /* @__PURE__ */ new Map());
6488
+ tA(this, "artboard", null);
6489
+ tA(this, "objectStates", /* @__PURE__ */ new Map());
6490
6490
  // Physics State
6491
- GA(this, "physicsEngine", null);
6491
+ tA(this, "physicsEngine", null);
6492
6492
  // State Machine State
6493
- GA(this, "activeStateMachine", null);
6494
- GA(this, "inputs", /* @__PURE__ */ new Map());
6493
+ tA(this, "activeStateMachine", null);
6494
+ tA(this, "inputs", /* @__PURE__ */ new Map());
6495
6495
  // id -> value
6496
- GA(this, "inputNameMap", /* @__PURE__ */ new Map());
6496
+ tA(this, "inputNameMap", /* @__PURE__ */ new Map());
6497
6497
  // name -> id[] mapping
6498
- GA(this, "layerStates", /* @__PURE__ */ new Map());
6499
- GA(this, "pretextCache", /* @__PURE__ */ new Map());
6500
- GA(this, "pointerHistory", []);
6501
- GA(this, "MAX_HISTORY", 200);
6502
- GA(this, "imageCache", /* @__PURE__ */ new Map());
6503
- GA(this, "lastValidSvgImgMap", /* @__PURE__ */ new Map());
6504
- GA(this, "maskBuffer", null);
6505
- GA(this, "maskCtx", null);
6506
- GA(this, "lumaBuffer", null);
6507
- GA(this, "lumaCtx", null);
6508
- GA(this, "layout", { fit: "Contain", alignment: "Center" });
6509
- GA(this, "onTrigger");
6510
- GA(this, "onInputUpdate");
6511
- GA(this, "onComponentChange");
6498
+ tA(this, "layerStates", /* @__PURE__ */ new Map());
6499
+ tA(this, "pretextCache", /* @__PURE__ */ new Map());
6500
+ tA(this, "pointerHistory", []);
6501
+ tA(this, "MAX_HISTORY", 200);
6502
+ tA(this, "imageCache", /* @__PURE__ */ new Map());
6503
+ tA(this, "lastValidSvgImgMap", /* @__PURE__ */ new Map());
6504
+ tA(this, "maskBuffer", null);
6505
+ tA(this, "maskCtx", null);
6506
+ tA(this, "lumaBuffer", null);
6507
+ tA(this, "lumaCtx", null);
6508
+ tA(this, "layout", { fit: "Contain", alignment: "Center" });
6509
+ tA(this, "onTrigger");
6510
+ tA(this, "onInputUpdate");
6511
+ tA(this, "onComponentChange");
6512
6512
  // Specific Component Listeners
6513
- GA(this, "onToggle");
6514
- GA(this, "onInputChange");
6515
- GA(this, "onInputFocus");
6516
- GA(this, "onInputBlur");
6517
- GA(this, "onLog");
6513
+ tA(this, "onToggle");
6514
+ tA(this, "onInputChange");
6515
+ tA(this, "onInputFocus");
6516
+ tA(this, "onInputBlur");
6517
+ tA(this, "onLog");
6518
6518
  // Track triggers that were just fired in the current frame
6519
- GA(this, "justFiredTriggers", /* @__PURE__ */ new Set());
6520
- GA(this, "rootTransform", null);
6521
- GA(this, "canvasWidth", 0);
6522
- GA(this, "canvasHeight", 0);
6519
+ tA(this, "justFiredTriggers", /* @__PURE__ */ new Set());
6520
+ tA(this, "rootTransform", null);
6521
+ tA(this, "canvasWidth", 0);
6522
+ tA(this, "canvasHeight", 0);
6523
6523
  // Track currently hovered object for Enter/Leave events
6524
- GA(this, "lastHoveredObjectId", null);
6525
- GA(this, "_lastPointerPos", null);
6526
- GA(this, "_prevPointerPos", null);
6524
+ tA(this, "lastHoveredObjectId", null);
6525
+ tA(this, "_lastPointerPos", null);
6526
+ tA(this, "_prevPointerPos", null);
6527
6527
  // Interaction State
6528
- GA(this, "focusedId", null);
6529
- GA(this, "draggingSliderId", null);
6530
- GA(this, "activeDropdownId", null);
6531
- GA(this, "draggingListViewId", null);
6532
- GA(this, "scrollOffset", { x: 0, y: 0 });
6533
- GA(this, "draggingBehaviors", /* @__PURE__ */ new Set());
6528
+ tA(this, "focusedId", null);
6529
+ tA(this, "draggingSliderId", null);
6530
+ tA(this, "activeDropdownId", null);
6531
+ tA(this, "draggingListViewId", null);
6532
+ tA(this, "scrollOffset", { x: 0, y: 0 });
6533
+ tA(this, "draggingBehaviors", /* @__PURE__ */ new Set());
6534
6534
  // Physics/Animation State
6535
- GA(this, "objectVelocities", /* @__PURE__ */ new Map());
6536
- GA(this, "currentTime", 0);
6537
- GA(this, "frameCount", 0);
6538
- GA(this, "fontLeadingFactors", {
6535
+ tA(this, "objectVelocities", /* @__PURE__ */ new Map());
6536
+ tA(this, "currentTime", 0);
6537
+ tA(this, "frameCount", 0);
6538
+ tA(this, "fontLeadingFactors", {
6539
6539
  Inter: 0.35,
6540
6540
  Roboto: 0.45,
6541
6541
  Montserrat: 0.4,
@@ -6546,8 +6546,8 @@ class Ei {
6546
6546
  Lora: 0.4
6547
6547
  });
6548
6548
  // Trigger Management
6549
- GA(this, "activeTriggers", /* @__PURE__ */ new Map());
6550
- console.info("%c[ExodeUI Engine] Pixel-Perfect Parity Active (v6.0.22) - SVG Fill & Gradient Parity Active", "color: #3b82f6; font-weight: bold; padding: 2px 4px; border-radius: 4px; background: rgba(59, 130, 246, 0.1)");
6549
+ tA(this, "activeTriggers", /* @__PURE__ */ new Map());
6550
+ console.info("%c[ExodeUI Engine] Pixel-Perfect Parity Active (v6.0.24) - SVG Fill & Gradient Parity Active", "color: #3b82f6; font-weight: bold; padding: 2px 4px; border-radius: 4px; background: rgba(59, 130, 246, 0.1)");
6551
6551
  }
6552
6552
  setTriggerCallback(A) {
6553
6553
  this.onTrigger = A;
@@ -7203,20 +7203,20 @@ class Ei {
7203
7203
  g && g.type === "Component" && g.variant === "listview" && this.updateListViewHoverFromPointer(g, I, C), i !== this.lastHoveredObjectId && (console.log(`[Engine] HOVER CHANGE: ${this.lastHoveredObjectId} -> ${i}`), this.lastHoveredObjectId && this.fireEventForObject(this.lastHoveredObjectId, "onPointerLeave"), i && this.fireEventForObject(i, "onPointerEnter"), this.lastHoveredObjectId = i);
7204
7204
  return;
7205
7205
  }
7206
- if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null, this.draggingBehaviors.clear()), A === "down" && g && ((w = g.behaviors) != null && w.some((G) => G.type === O.Draggable)) && this.draggingBehaviors.add(i), this.activeDropdownId && A === "down") {
7206
+ if ((A === "up" || A === "blur") && (this.draggingSliderId = null, this.draggingListViewId = null, this.draggingBehaviors.clear()), A === "down" && g && ((w = g.behaviors) != null && w.some((G) => G.type === Z.Draggable)) && this.draggingBehaviors.add(i), this.activeDropdownId && A === "down") {
7207
7207
  const G = this.artboard.objects.find((t) => t.id === this.activeDropdownId);
7208
7208
  if (G && (G.type === "Dropdown" || G.variant === "dropdown")) {
7209
- const t = this.objectStates.get(G.id), K = (t == null ? void 0 : t.options) || G.options || {}, S = G.geometry || {}, y = S.width ?? G.width ?? 200, N = S.height ?? G.height ?? 40, M = K.optionsList || [], e = K.itemHeight || 32, Y = K.listPadding ?? 4, j = M.length * e + Y * 2, l = this.getWorldTransform(G.id), r = y * Math.abs(l.scaleX), v = N * Math.abs(l.scaleY), n = l.y + v / 2 + 4, L = Math.abs(I - l.x) <= r / 2, P = C >= n && C <= n + j * Math.abs(l.scaleY);
7210
- if (L && P) {
7211
- const wA = Math.abs(l.scaleY), EA = C - (n + Y * wA), u = Math.floor(EA / (e * wA));
7212
- if (u >= 0 && u < M.length) {
7213
- const z = M[u];
7214
- K.selectedOption = z, K.isOpen = !1, this.activeDropdownId = null, G.inputId && this.setInternalInput(G.inputId, z), this.onComponentChange && this.onComponentChange({
7209
+ const t = this.objectStates.get(G.id), K = (t == null ? void 0 : t.options) || G.options || {}, S = G.geometry || {}, y = S.width ?? G.width ?? 200, N = S.height ?? G.height ?? 40, M = K.optionsList || [], e = K.itemHeight || 32, Y = K.listPadding ?? 4, j = M.length * e + Y * 2, l = this.getWorldTransform(G.id), r = y * Math.abs(l.scaleX), v = N * Math.abs(l.scaleY), n = l.y + v / 2 + 4, q = Math.abs(I - l.x) <= r / 2, P = C >= n && C <= n + j * Math.abs(l.scaleY);
7210
+ if (q && P) {
7211
+ const sA = Math.abs(l.scaleY), EA = C - (n + Y * sA), T = Math.floor(EA / (e * sA));
7212
+ if (T >= 0 && T < M.length) {
7213
+ const V = M[T];
7214
+ K.selectedOption = V, K.isOpen = !1, this.activeDropdownId = null, G.inputId && this.setInternalInput(G.inputId, V), this.onComponentChange && this.onComponentChange({
7215
7215
  objectId: G.id,
7216
7216
  componentName: G.name,
7217
7217
  variant: "dropdown",
7218
7218
  property: "selectedOption",
7219
- value: z
7219
+ value: V
7220
7220
  });
7221
7221
  }
7222
7222
  return;
@@ -7612,32 +7612,32 @@ class Ei {
7612
7612
  return 0.5;
7613
7613
  }
7614
7614
  renderObject(A, I, C) {
7615
- var Z, p, d, R, m, b, AA, sA, kA, qA, NA;
7615
+ var x, d, p, U, _, f, $, hA, KA, FA, NA;
7616
7616
  const g = this.objectStates.get(I.id);
7617
7617
  if (!g) {
7618
7618
  console.warn("No state for object:", I.id);
7619
7619
  return;
7620
7620
  }
7621
- A.roundRect || (A.roundRect = (f, W, H, U, x) => (this.drawRoundRect(A, f, W, H, U, x), A));
7621
+ A.roundRect || (A.roundRect = (u, O, L, R, m) => (this.drawRoundRect(A, u, O, L, R, m), A));
7622
7622
  const Q = g.geometry ? this.deepMerge(I.geometry, g.geometry) : I.geometry, E = g.style ? this.deepMerge(I.style, g.style) : I.style;
7623
- let i = (Q == null ? void 0 : Q.width) || ((Z = I.geometry) == null ? void 0 : Z.width) || I.width || 0, w = (Q == null ? void 0 : Q.height) || ((p = I.geometry) == null ? void 0 : p.height) || I.height || 0;
7623
+ let i = (Q == null ? void 0 : Q.width) || ((x = I.geometry) == null ? void 0 : x.width) || I.width || 0, w = (Q == null ? void 0 : Q.height) || ((d = I.geometry) == null ? void 0 : d.height) || I.height || 0;
7624
7624
  if ((i === 0 || w === 0) && (Q != null && Q.points) && Array.isArray(Q.points) && Q.points.length > 0) {
7625
- let f = 1 / 0, W = -1 / 0, H = 1 / 0, U = -1 / 0;
7626
- Q.points.forEach((x) => {
7627
- f = Math.min(f, x.x), W = Math.max(W, x.x), H = Math.min(H, x.y), U = Math.max(U, x.y);
7628
- }), i === 0 && (i = W - f), w === 0 && (w = U - H);
7629
- }
7630
- const o = (f) => {
7631
- if (f)
7632
- return f.corner_radius ?? f.cornerRadius;
7625
+ let u = 1 / 0, O = -1 / 0, L = 1 / 0, R = -1 / 0;
7626
+ Q.points.forEach((m) => {
7627
+ u = Math.min(u, m.x), O = Math.max(O, m.x), L = Math.min(L, m.y), R = Math.max(R, m.y);
7628
+ }), i === 0 && (i = O - u), w === 0 && (w = R - L);
7629
+ }
7630
+ const o = (u) => {
7631
+ if (u)
7632
+ return u.corner_radius ?? u.cornerRadius;
7633
7633
  }, s = o(g) ?? o(E) ?? o(Q) ?? o(I.style) ?? o(I.geometry) ?? 0, h = { ...Q, width: i, height: w };
7634
7634
  if (delete h.cornerRadius, h.corner_radius = s, g.visible === !1)
7635
7635
  return;
7636
7636
  const a = g.x, G = g.y;
7637
7637
  A.save();
7638
- const t = [], K = E.blur || ((d = I.style) == null ? void 0 : d.blur);
7638
+ const t = [], K = E.blur || ((p = I.style) == null ? void 0 : p.blur);
7639
7639
  K && K.amount > 0 && t.push(`blur(${K.amount}px)`);
7640
- const S = ((R = Q == null ? void 0 : Q.type) == null ? void 0 : R.toLowerCase().includes("image")) || ((m = I.type) == null ? void 0 : m.toLowerCase().includes("image")), y = E.adjustments && Object.keys(E.adjustments).length > 0 ? E.adjustments : null, N = Q != null && Q.adjustments && Object.keys(Q.adjustments).length > 0 ? Q.adjustments : null, M = S ? N || y : y || N, e = S && !M ? {
7640
+ const S = ((U = Q == null ? void 0 : Q.type) == null ? void 0 : U.toLowerCase().includes("image")) || ((_ = I.type) == null ? void 0 : _.toLowerCase().includes("image")), y = E.adjustments && Object.keys(E.adjustments).length > 0 ? E.adjustments : null, N = Q != null && Q.adjustments && Object.keys(Q.adjustments).length > 0 ? Q.adjustments : null, M = S ? N || y : y || N, e = S && !M ? {
7641
7641
  exposure: 0,
7642
7642
  contrast: 0,
7643
7643
  saturation: 100,
@@ -7650,46 +7650,46 @@ class Ei {
7650
7650
  hue: 0
7651
7651
  } : M;
7652
7652
  if (g && e && (g.geometry = g.geometry || {}, g.geometry.adjustments = { ...e }), e) {
7653
- const f = (e.exposure || 0) / 100, W = e.contrast || 0, H = 1 + (e.saturation || 0) / 100, U = (e.temperature || 0) / 200, x = (e.tint || 0) / 200, V = (e.highlights || 0) / 500, aA = (e.shadows || 0) / 500;
7654
- let gA = "", tA = "SourceGraphic";
7655
- if (f !== 0 && (gA += `
7656
- <feComponentTransfer in="${tA}" result="exposure">
7657
- <feFuncR type="linear" slope="1" intercept="${f}"/>
7658
- <feFuncG type="linear" slope="1" intercept="${f}"/>
7659
- <feFuncB type="linear" slope="1" intercept="${f}"/>
7660
- </feComponentTransfer>`, tA = "exposure"), W !== 0) {
7661
- const CA = (W + 100) / 100, F = 0.5 * (1 - CA);
7653
+ const u = (e.exposure || 0) / 100, O = e.contrast || 0, L = 1 + (e.saturation || 0) / 100, R = (e.temperature || 0) / 200, m = (e.tint || 0) / 200, W = (e.highlights || 0) / 500, GA = (e.shadows || 0) / 500;
7654
+ let gA = "", DA = "SourceGraphic";
7655
+ if (u !== 0 && (gA += `
7656
+ <feComponentTransfer in="${DA}" result="exposure">
7657
+ <feFuncR type="linear" slope="1" intercept="${u}"/>
7658
+ <feFuncG type="linear" slope="1" intercept="${u}"/>
7659
+ <feFuncB type="linear" slope="1" intercept="${u}"/>
7660
+ </feComponentTransfer>`, DA = "exposure"), O !== 0) {
7661
+ const CA = (O + 100) / 100, F = 0.5 * (1 - CA);
7662
7662
  gA += `
7663
- <feComponentTransfer in="${tA}" result="contrast">
7663
+ <feComponentTransfer in="${DA}" result="contrast">
7664
7664
  <feFuncR type="linear" slope="${CA}" intercept="${F}"/>
7665
7665
  <feFuncG type="linear" slope="${CA}" intercept="${F}"/>
7666
7666
  <feFuncB type="linear" slope="${CA}" intercept="${F}"/>
7667
- </feComponentTransfer>`, tA = "contrast";
7667
+ </feComponentTransfer>`, DA = "contrast";
7668
7668
  }
7669
- if (H !== 1 && (gA += `<feColorMatrix in="${tA}" type="saturate" values="${H}" result="saturate"/>`, tA = "saturate"), e.hue && (gA += `<feColorMatrix in="${tA}" type="hueRotate" values="${e.hue}" result="hue"/>`, tA = "hue"), e.negative) {
7669
+ if (L !== 1 && (gA += `<feColorMatrix in="${DA}" type="saturate" values="${L}" result="saturate"/>`, DA = "saturate"), e.hue && (gA += `<feColorMatrix in="${DA}" type="hueRotate" values="${e.hue}" result="hue"/>`, DA = "hue"), e.negative) {
7670
7670
  const CA = 1 - e.negative / 50;
7671
7671
  gA += `
7672
- <feColorMatrix in="${tA}" type="matrix" result="invert"
7672
+ <feColorMatrix in="${DA}" type="matrix" result="invert"
7673
7673
  values="${CA} 0 0 0 ${1 - CA}
7674
7674
  0 ${CA} 0 0 ${1 - CA}
7675
7675
  0 0 ${CA} 0 ${1 - CA}
7676
- 0 0 0 1 0"/>`, tA = "invert";
7676
+ 0 0 0 1 0"/>`, DA = "invert";
7677
7677
  }
7678
- if (U !== 0 || x !== 0 || V !== 0 || aA !== 0) {
7679
- const CA = 1 + V + aA, F = CA * (1 + U - x / 2), T = CA * (1 + x), q = CA * (1 - U - x / 2), iA = e.shadows * 0.1 / 255, JA = [
7678
+ if (R !== 0 || m !== 0 || W !== 0 || GA !== 0) {
7679
+ const CA = 1 + W + GA, F = CA * (1 + R - m / 2), b = CA * (1 + m), H = CA * (1 - R - m / 2), iA = e.shadows * 0.1 / 255, RA = [
7680
7680
  F,
7681
7681
  0,
7682
7682
  0,
7683
7683
  0,
7684
7684
  iA,
7685
7685
  0,
7686
- T,
7686
+ b,
7687
7687
  0,
7688
7688
  0,
7689
7689
  iA,
7690
7690
  0,
7691
7691
  0,
7692
- q,
7692
+ H,
7693
7693
  0,
7694
7694
  iA,
7695
7695
  0,
@@ -7698,9 +7698,9 @@ class Ei {
7698
7698
  1,
7699
7699
  0
7700
7700
  ].join(" ");
7701
- gA += `<feColorMatrix in="${tA}" type="matrix" values="${JA}" result="advanced"/>`, tA = "advanced";
7701
+ gA += `<feColorMatrix in="${DA}" type="matrix" values="${RA}" result="advanced"/>`, DA = "advanced";
7702
7702
  }
7703
- if (e.blur && (gA += `<feGaussianBlur in="${tA}" stdDeviation="${e.blur}" result="blur"/>`, tA = "blur"), gA) {
7703
+ if (e.blur && (gA += `<feGaussianBlur in="${DA}" stdDeviation="${e.blur}" result="blur"/>`, DA = "blur"), gA) {
7704
7704
  const CA = `<svg xmlns="http://www.w3.org/2000/svg"><filter id="f" color-interpolation-filters="sRGB">${gA}</filter></svg>`, F = btoa(CA);
7705
7705
  t.push(`url('data:image/svg+xml;base64,${F}#f')`);
7706
7706
  }
@@ -7710,7 +7710,7 @@ class Ei {
7710
7710
  A.globalAlpha = Y * j;
7711
7711
  const l = g.compositeOperation || g.blendMode;
7712
7712
  if (l && l !== "Normal") {
7713
- const f = l.toLowerCase();
7713
+ const u = l.toLowerCase();
7714
7714
  [
7715
7715
  "multiply",
7716
7716
  "screen",
@@ -7740,7 +7740,7 @@ class Ei {
7740
7740
  "xor",
7741
7741
  "multiply",
7742
7742
  "screen"
7743
- ].includes(f) && (A.globalCompositeOperation = f);
7743
+ ].includes(u) && (A.globalCompositeOperation = u);
7744
7744
  }
7745
7745
  const r = A, v = g.masks || (I.maskedBy ? [{
7746
7746
  maskId: I.maskedBy,
@@ -7751,258 +7751,259 @@ class Ei {
7751
7751
  isVisible: !0
7752
7752
  }] : []);
7753
7753
  let n = !1;
7754
- const L = v.filter((f) => f.isVisible !== !1 && C.has(f.maskId));
7755
- if (L.length > 0) {
7756
- const f = L[0], W = C.get(f.maskId), H = this.objectStates.get(W.id);
7757
- H && H.visible !== !1 && (n = !0, (!this.maskBuffer || this.maskBuffer.width !== this.canvasWidth || this.maskBuffer.height !== this.canvasHeight) && (this.maskBuffer = document.createElement("canvas"), this.maskBuffer.width = this.canvasWidth, this.maskBuffer.height = this.canvasHeight, this.maskCtx = this.maskBuffer.getContext("2d", { willReadFrequently: !0 }), this.maskCtx && (this.maskCtx.imageSmoothingEnabled = !0, this.maskCtx.imageSmoothingQuality = "high")), this.maskCtx.clearRect(0, 0, this.maskBuffer.width, this.maskBuffer.height), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), I.parentId && this.applyAbsoluteTransform(this.maskCtx, I.parentId, C), this.maskCtx.save(), this.maskCtx.globalAlpha = 1, A = this.maskCtx, A.filter = r.filter);
7754
+ const q = v.filter((u) => u.isVisible !== !1 && C.has(u.maskId));
7755
+ if (q.length > 0) {
7756
+ const u = q[0], O = C.get(u.maskId), L = this.objectStates.get(O.id);
7757
+ L && L.visible !== !1 && (n = !0, (!this.maskBuffer || this.maskBuffer.width !== this.canvasWidth || this.maskBuffer.height !== this.canvasHeight) && (this.maskBuffer = document.createElement("canvas"), this.maskBuffer.width = this.canvasWidth, this.maskBuffer.height = this.canvasHeight, this.maskCtx = this.maskBuffer.getContext("2d", { willReadFrequently: !0 }), this.maskCtx && (this.maskCtx.imageSmoothingEnabled = !0, this.maskCtx.imageSmoothingQuality = "high")), this.maskCtx.clearRect(0, 0, this.maskBuffer.width, this.maskBuffer.height), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), I.parentId && this.applyAbsoluteTransform(this.maskCtx, I.parentId, C), this.maskCtx.save(), this.maskCtx.globalAlpha = 1, A = this.maskCtx, A.filter = r.filter);
7758
7758
  }
7759
7759
  A.translate(Math.round(a), Math.round(G)), A.rotate(g.rotation * Math.PI / 180);
7760
- const P = g.skew_x || 0, wA = g.skew_y || 0;
7761
- (P !== 0 || wA !== 0) && A.transform(1, Math.tan(wA * Math.PI / 180), Math.tan(P * Math.PI / 180), 1, 0, 0), A.scale(
7760
+ const P = g.skew_x || 0, sA = g.skew_y || 0;
7761
+ (P !== 0 || sA !== 0) && A.transform(1, Math.tan(sA * Math.PI / 180), Math.tan(P * Math.PI / 180), 1, 0, 0), A.scale(
7762
7762
  (g.scale_x ?? 1) * (g.flip_x === !0 ? -1 : 1),
7763
7763
  (g.scale_y ?? 1) * (g.flip_y === !0 ? -1 : 1)
7764
7764
  );
7765
7765
  const EA = E.shadow;
7766
7766
  if (EA && EA.isEnabled !== !1) {
7767
- let f = EA.color || "#000000";
7768
- (AA = (b = this.artboard) == null ? void 0 : b.tokens) != null && AA.colors && this.artboard.tokens.colors[f] && (f = this.artboard.tokens.colors[f]);
7769
- const W = this.normalizeOpacity(EA.opacity ?? 100), H = EA.spread || 0, x = (EA.blur || 0) + H * 1.5;
7770
- let V = f;
7771
- if (f.startsWith("#")) {
7772
- const aA = f.replace("#", ""), gA = parseInt(aA.substring(0, 2), 16), tA = parseInt(aA.substring(2, 4), 16), yA = parseInt(aA.substring(4, 6), 16);
7773
- V = `rgba(${gA}, ${tA}, ${yA}, ${W})`;
7774
- } else if (f.startsWith("rgba")) {
7775
- const aA = f.match(/[\d.]+/g);
7776
- if (aA && aA.length >= 4) {
7777
- const gA = aA[0], tA = aA[1], yA = aA[2], CA = aA[3];
7778
- V = `rgba(${gA}, ${tA}, ${yA}, ${parseFloat(CA) * W})`;
7767
+ let u = EA.color || "#000000";
7768
+ ($ = (f = this.artboard) == null ? void 0 : f.tokens) != null && $.colors && this.artboard.tokens.colors[u] && (u = this.artboard.tokens.colors[u]);
7769
+ const O = this.normalizeOpacity(EA.opacity ?? 100), L = EA.spread || 0, m = (EA.blur || 0) + L * 1.5;
7770
+ let W = u;
7771
+ if (u.startsWith("#")) {
7772
+ const DA = u.replace("#", ""), kA = parseInt(DA.substring(0, 2), 16), CA = parseInt(DA.substring(2, 4), 16), F = parseInt(DA.substring(4, 6), 16);
7773
+ W = `rgba(${kA}, ${CA}, ${F}, ${O})`;
7774
+ } else if (u.startsWith("rgba")) {
7775
+ const DA = u.match(/[\d.]+/g);
7776
+ if (DA && DA.length >= 4) {
7777
+ const kA = DA[0], CA = DA[1], F = DA[2], b = DA[3];
7778
+ W = `rgba(${kA}, ${CA}, ${F}, ${parseFloat(b) * O})`;
7779
7779
  }
7780
7780
  }
7781
- A.shadowColor = V, A.shadowBlur = x, A.shadowOffsetX = EA.offsetX || 0, A.shadowOffsetY = EA.offsetY || 0;
7781
+ const GA = A.getTransform(), gA = Math.sqrt(GA.a * GA.a + GA.b * GA.b) || 1;
7782
+ A.shadowColor = W, A.shadowBlur = m * gA, A.shadowOffsetX = (EA.offsetX || 0) * gA, A.shadowOffsetY = (EA.offsetY || 0) * gA;
7782
7783
  }
7783
- const u = I.liquidFill || ((sA = I.style) == null ? void 0 : sA.liquidFill), z = I.artEffect || ((kA = I.style) == null ? void 0 : kA.artEffect);
7784
- if (u && u.enabled) {
7784
+ const T = I.liquidFill || ((hA = I.style) == null ? void 0 : hA.liquidFill), V = I.artEffect || ((KA = I.style) == null ? void 0 : KA.artEffect);
7785
+ if (T && T.enabled) {
7785
7786
  A.save();
7786
- const f = u.fillLevel ?? 0.5;
7787
+ const u = T.fillLevel ?? 0.5;
7787
7788
  A.beginPath();
7788
- const W = w / 2 - w * f;
7789
- A.rect(-i / 2, W, i, w * f), A.clip(), A.fillStyle = u.color || "#3b82f6", A.globalAlpha = A.globalAlpha * (u.opacity ?? 1);
7789
+ const O = w / 2 - w * u;
7790
+ A.rect(-i / 2, O, i, w * u), A.clip(), A.fillStyle = T.color || "#3b82f6", A.globalAlpha = A.globalAlpha * (T.opacity ?? 1);
7790
7791
  }
7791
- const IA = z && z.enabled && z.type === "glitch";
7792
+ const IA = V && V.enabled && V.type === "glitch";
7792
7793
  if (IA) {
7793
7794
  A.save();
7794
- const W = (z.intensity ?? 0.5) * 10;
7795
- A.shadowColor = "rgba(255, 0, 0, 0.5)", A.shadowBlur = W, A.translate(W / 2, 0);
7795
+ const O = (V.intensity ?? 0.5) * 10, L = A.getTransform(), R = Math.sqrt(L.a * L.a + L.b * L.b) || 1;
7796
+ A.shadowColor = "rgba(255, 0, 0, 0.5)", A.shadowBlur = O * R, A.translate(O / 2, 0);
7796
7797
  }
7797
7798
  if (Q.type === "Text")
7798
7799
  this._renderText(A, I, h, E, g, i, w);
7799
7800
  else if (Q.type === "Image") {
7800
- const f = Q.src;
7801
- if (f) {
7802
- let W = this.imageCache.get(f);
7803
- W || (W = new Image(), W.onload = () => {
7804
- }, W.onerror = () => {
7805
- console.error(`[ExodeUI] Image load failed: ${f.substring(0, 100)}${f.length > 100 ? "..." : ""}`);
7806
- }, W.src = f, this.imageCache.set(f, W));
7807
- const H = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1, U = (((qA = E.stroke) == null ? void 0 : qA.alignment) || "center").toLowerCase();
7808
- if (H && (U === "outside" || U === "center") && this.applyStrokeAlignment(A, E, h, i, w, s), E.fill && E.fill.type !== "None") {
7801
+ const u = Q.src;
7802
+ if (u) {
7803
+ let O = this.imageCache.get(u);
7804
+ O || (O = new Image(), O.onload = () => {
7805
+ }, O.onerror = () => {
7806
+ console.error(`[ExodeUI] Image load failed: ${u.substring(0, 100)}${u.length > 100 ? "..." : ""}`);
7807
+ }, O.src = u, this.imageCache.set(u, O));
7808
+ const L = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1, R = (((FA = E.stroke) == null ? void 0 : FA.alignment) || "center").toLowerCase();
7809
+ if (L && (R === "outside" || R === "center") && this.applyStrokeAlignment(A, E, h, i, w, s), E.fill && E.fill.type !== "None") {
7809
7810
  A.save();
7810
- const x = A.globalAlpha, V = this.createCanvasFill(A, E.fill, i, w);
7811
- A.fillStyle = V || E.fill.color || "transparent", A.globalAlpha = x * this.normalizeOpacity(E.fill.opacity ?? 100), s !== 0 ? (this.drawRoundRect(A, -i / 2, -w / 2, i, w, s), A.fill()) : A.fillRect(-i / 2, -w / 2, i, w), A.globalAlpha = x, A.restore();
7811
+ const m = A.globalAlpha, W = this.createCanvasFill(A, E.fill, i, w);
7812
+ A.fillStyle = W || E.fill.color || "transparent", A.globalAlpha = m * this.normalizeOpacity(E.fill.opacity ?? 100), s !== 0 ? (this.drawRoundRect(A, -i / 2, -w / 2, i, w, s), A.fill()) : A.fillRect(-i / 2, -w / 2, i, w), A.globalAlpha = m, A.restore();
7812
7813
  }
7813
- W.complete && W.naturalWidth > 0 ? (s !== 0 ? (A.save(), this.drawRoundRect(A, -i / 2, -w / 2, i, w, s), A.clip(), A.drawImage(W, -i / 2, -w / 2, i, w), A.restore()) : A.drawImage(W, -i / 2, -w / 2, i, w), H && U === "inside" && this.applyStrokeAlignment(A, E, h, i, w, s)) : H && U === "inside" && this.applyStrokeAlignment(A, E, h, i, w, s);
7814
+ O.complete && O.naturalWidth > 0 ? (s !== 0 ? (A.save(), this.drawRoundRect(A, -i / 2, -w / 2, i, w, s), A.clip(), A.drawImage(O, -i / 2, -w / 2, i, w), A.restore()) : A.drawImage(O, -i / 2, -w / 2, i, w), L && R === "inside" && this.applyStrokeAlignment(A, E, h, i, w, s)) : L && R === "inside" && this.applyStrokeAlignment(A, E, h, i, w, s);
7814
7815
  }
7815
7816
  } else if (Q.type === "SVG") {
7816
- const f = Q.svgContent;
7817
- if (f) {
7818
- const W = E.palette || [], H = E.fill, U = E.stroke, x = H ? this.normalizeOpacity(H.opacity ?? 100) : 1, V = (H == null ? void 0 : H.type) === "Solid" && (!U || U.isEnabled === !1 || U.type === "Solid" && U.color === H.color), aA = H && H.type !== "None" ? V ? "monochrome" : H.type === "Solid" ? (H.color || "") + "|opacity:" + x : JSON.stringify(H.stops || []) + "|opacity:" + x : "", gA = U && U.isEnabled !== !1 && (U.width || 0) > 0 ? V ? [
7817
+ const u = Q.svgContent;
7818
+ if (u) {
7819
+ const O = E.palette || [], L = E.fill, R = E.stroke, m = L ? this.normalizeOpacity(L.opacity ?? 100) : 1, W = (L == null ? void 0 : L.type) === "Solid" && (!R || R.isEnabled === !1 || R.type === "Solid" && R.color === L.color), GA = L && L.type !== "None" ? W ? "monochrome" : L.type === "Solid" ? (L.color || "") + "|opacity:" + m : JSON.stringify(L.stops || []) + "|opacity:" + m : "", gA = R && R.isEnabled !== !1 && (R.width || 0) > 0 ? W ? [
7819
7820
  "monochrome",
7820
- U.width || 0,
7821
- U.trimStart ?? 0,
7822
- U.trimEnd ?? 1,
7823
- U.trimOffset ?? 0,
7824
- U.dashOffset ?? 0
7821
+ R.width || 0,
7822
+ R.trimStart ?? 0,
7823
+ R.trimEnd ?? 1,
7824
+ R.trimOffset ?? 0,
7825
+ R.dashOffset ?? 0
7825
7826
  ].join("|") : [
7826
- U.width || 0,
7827
- U.fill ? U.fill.type === "Solid" ? U.fill.color || "" : JSON.stringify(U.fill.stops || []) : U.color || "",
7828
- U.opacity ?? 1,
7829
- U.lineCap || "",
7830
- U.lineJoin || "",
7831
- (U.dashArray || []).join(","),
7827
+ R.width || 0,
7828
+ R.fill ? R.fill.type === "Solid" ? R.fill.color || "" : JSON.stringify(R.fill.stops || []) : R.color || "",
7829
+ R.opacity ?? 1,
7830
+ R.lineCap || "",
7831
+ R.lineJoin || "",
7832
+ (R.dashArray || []).join(","),
7832
7833
  // [FIX] Include trim-path values so stroke-draw animations bust the cache
7833
- U.trimStart ?? 0,
7834
- U.trimEnd ?? 1,
7835
- U.trimOffset ?? 0,
7836
- U.dashOffset ?? 0
7837
- ].join("|") : "nostroke", tA = [
7834
+ R.trimStart ?? 0,
7835
+ R.trimEnd ?? 1,
7836
+ R.trimOffset ?? 0,
7837
+ R.dashOffset ?? 0
7838
+ ].join("|") : "nostroke", DA = [
7838
7839
  I.id,
7839
- W.join("_"),
7840
- aA,
7840
+ O.join("_"),
7841
+ GA,
7841
7842
  gA,
7842
7843
  g.opacity ?? 100,
7843
7844
  g.visible !== !1 ? "v" : "h"
7844
7845
  ].join("_");
7845
- let yA = this.imageCache.get(tA);
7846
- if (!yA) {
7847
- yA = new Image(), yA.crossOrigin = "anonymous";
7848
- let F = f;
7849
- if (Q.colors && Q.colors.length > 0 && W.length > 0 && Q.colors.forEach((BA, _) => {
7850
- if (W[_]) {
7851
- const $ = BA.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), oA = new RegExp($, "gi");
7852
- F = F.replace(oA, W[_]);
7846
+ let kA = this.imageCache.get(DA);
7847
+ if (!kA) {
7848
+ kA = new Image(), kA.crossOrigin = "anonymous";
7849
+ let F = u;
7850
+ if (Q.colors && Q.colors.length > 0 && O.length > 0 && Q.colors.forEach((BA, z) => {
7851
+ if (O[z]) {
7852
+ const AA = BA.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), oA = new RegExp(AA, "gi");
7853
+ F = F.replace(oA, O[z]);
7853
7854
  }
7854
- }), H && H.type && H.type !== "None") {
7855
- if (H.type === "Solid" && H.color) {
7856
- const BA = V ? "#FFFFFF" : H.color, _ = V ? 1 : this.normalizeOpacity(H.opacity ?? 100);
7857
- F = F.replace(/\bfill\s*=\s*["'][^"']*["']/gi, ($) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test($) ? $ : `fill="${BA}"`), F = F.replace(/fill\s*:\s*[^;"')]+/gi, ($) => /fill\s*:\s*(none|transparent)/i.test($) ? $ : `fill:${BA}`), _ < 1 && (F = F.replace(/\bfill-opacity\s*=\s*["'][^"']*["']/gi, `fill-opacity="${_}"`), F = F.replace(/fill-opacity\s*:\s*[^;"')]+/gi, `fill-opacity:${_}`), F.match(/\bfill-opacity\s*=/i) || (F = F.replace(/(<svg[^>]*>)/i, `$1<g fill-opacity="${_}">`), F = F.replace(/<\/svg>/i, "</g></svg>")));
7858
- } else if (H.type === "LinearGradient" || H.type === "RadialGradient" || H.type === "Linear" || H.type === "Radial") {
7859
- const BA = "exode-fill", _ = this.normalizeOpacity(H.opacity ?? 100), $ = (H.stops || []).map((QA) => {
7860
- const X = QA.offset !== void 0 ? QA.offset : QA.pos ?? 0, hA = this.normalizeOpacity(QA.opacity ?? 100) * _;
7861
- return `<stop offset="${X * 100}%" stop-color="${QA.color || "#000"}" stop-opacity="${hA}"/>`;
7855
+ }), L && L.type && L.type !== "None") {
7856
+ if (L.type === "Solid" && L.color) {
7857
+ const BA = W ? "#FFFFFF" : L.color, z = W ? 1 : this.normalizeOpacity(L.opacity ?? 100);
7858
+ F = F.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (AA) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(AA) ? AA : `fill="${BA}"`), F = F.replace(/fill\s*:\s*[^;"')]+/gi, (AA) => /fill\s*:\s*(none|transparent)/i.test(AA) ? AA : `fill:${BA}`), z < 1 && (F = F.replace(/\bfill-opacity\s*=\s*["'][^"']*["']/gi, `fill-opacity="${z}"`), F = F.replace(/fill-opacity\s*:\s*[^;"')]+/gi, `fill-opacity:${z}`), F.match(/\bfill-opacity\s*=/i) || (F = F.replace(/(<svg[^>]*>)/i, `$1<g fill-opacity="${z}">`), F = F.replace(/<\/svg>/i, "</g></svg>")));
7859
+ } else if (L.type === "LinearGradient" || L.type === "RadialGradient" || L.type === "Linear" || L.type === "Radial") {
7860
+ const BA = "exode-fill", z = this.normalizeOpacity(L.opacity ?? 100), AA = (L.stops || []).map((QA) => {
7861
+ const X = QA.offset !== void 0 ? QA.offset : QA.pos ?? 0, aA = this.normalizeOpacity(QA.opacity ?? 100) * z;
7862
+ return `<stop offset="${X * 100}%" stop-color="${QA.color || "#000"}" stop-opacity="${aA}"/>`;
7862
7863
  }).join("");
7863
7864
  let oA = "";
7864
- if (H.type === "LinearGradient" || H.type === "Linear") {
7865
- const QA = (HA, cA) => Array.isArray(HA) ? HA[cA] ?? (cA === 0 ? 0 : 1) : HA && typeof HA == "object" ? HA[cA === 0 ? "x" : "y"] ?? (cA === 0 ? 0 : 1) : cA === 0 ? 0 : 1, X = QA(H.start, 0) * 100, hA = QA(H.start, 1) * 100, KA = QA(H.end, 0) * 100, RA = QA(H.end, 1) * 100;
7866
- oA = `<linearGradient id="${BA}" x1="${X}%" y1="${hA}%" x2="${KA}%" y2="${RA}%" gradientUnits="objectBoundingBox">${$}</linearGradient>`;
7865
+ if (L.type === "LinearGradient" || L.type === "Linear") {
7866
+ const QA = (HA, JA) => Array.isArray(HA) ? HA[JA] ?? (JA === 0 ? 0 : 1) : HA && typeof HA == "object" ? HA[JA === 0 ? "x" : "y"] ?? (JA === 0 ? 0 : 1) : JA === 0 ? 0 : 1, X = QA(L.start, 0) * 100, aA = QA(L.start, 1) * 100, SA = QA(L.end, 0) * 100, UA = QA(L.end, 1) * 100;
7867
+ oA = `<linearGradient id="${BA}" x1="${X}%" y1="${aA}%" x2="${SA}%" y2="${UA}%" gradientUnits="objectBoundingBox">${AA}</linearGradient>`;
7867
7868
  } else {
7868
- const QA = (RA, HA) => Array.isArray(RA) ? RA[HA] ?? 0.5 : RA && typeof RA == "object" ? RA[HA === 0 ? "x" : "y"] ?? 0.5 : 0.5, X = QA(H.center, 0) * 100, hA = QA(H.center, 1) * 100, KA = (H.radius ?? 0.5) * 100;
7869
- oA = `<radialGradient id="${BA}" cx="${X}%" cy="${hA}%" r="${KA}%" gradientUnits="objectBoundingBox">${$}</radialGradient>`;
7869
+ const QA = (UA, HA) => Array.isArray(UA) ? UA[HA] ?? 0.5 : UA && typeof UA == "object" ? UA[HA === 0 ? "x" : "y"] ?? 0.5 : 0.5, X = QA(L.center, 0) * 100, aA = QA(L.center, 1) * 100, SA = (L.radius ?? 0.5) * 100;
7870
+ oA = `<radialGradient id="${BA}" cx="${X}%" cy="${aA}%" r="${SA}%" gradientUnits="objectBoundingBox">${AA}</radialGradient>`;
7870
7871
  }
7871
7872
  /<defs>/i.test(F) ? F = F.replace(/<defs>/i, `<defs>${oA}`) : F = F.replace(/<svg([^>]*)>/i, `<svg$1><defs>${oA}</defs>`), F = F.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (QA) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(QA) ? QA : `fill="url(#${BA})"`), F = F.replace(/fill\s*:\s*[^;"')]+/gi, (QA) => /fill\s*:\s*(none|transparent)/i.test(QA) ? QA : `fill:url(#${BA})`);
7872
7873
  }
7873
7874
  }
7874
- const T = (BA, _, $ = 1) => {
7875
- const oA = (BA.stops || []).map((RA) => {
7876
- const HA = RA.offset !== void 0 ? RA.offset : RA.pos ?? 0, cA = this.normalizeOpacity(RA.opacity ?? 100) * $;
7877
- return `<stop offset="${HA * 100}%" stop-color="${RA.color || "#000"}" stop-opacity="${cA}"/>`;
7878
- }).join(""), QA = (RA, HA, cA = 0.5) => Array.isArray(RA) ? RA[HA] ?? cA : RA && typeof RA == "object" ? RA[HA === 0 ? "x" : "y"] ?? cA : cA;
7875
+ const b = (BA, z, AA = 1) => {
7876
+ const oA = (BA.stops || []).map((UA) => {
7877
+ const HA = UA.offset !== void 0 ? UA.offset : UA.pos ?? 0, JA = this.normalizeOpacity(UA.opacity ?? 100) * AA;
7878
+ return `<stop offset="${HA * 100}%" stop-color="${UA.color || "#000"}" stop-opacity="${JA}"/>`;
7879
+ }).join(""), QA = (UA, HA, JA = 0.5) => Array.isArray(UA) ? UA[HA] ?? JA : UA && typeof UA == "object" ? UA[HA === 0 ? "x" : "y"] ?? JA : JA;
7879
7880
  if (BA.type === "LinearGradient" || BA.type === "Linear") {
7880
- const RA = QA(BA.start, 0, 0) * 100, HA = QA(BA.start, 1, 0) * 100, cA = QA(BA.end, 0, 1) * 100, vA = QA(BA.end, 1, 1) * 100;
7881
- return `<linearGradient id="${_}" x1="${RA}%" y1="${HA}%" x2="${cA}%" y2="${vA}%" gradientUnits="objectBoundingBox">${oA}</linearGradient>`;
7881
+ const UA = QA(BA.start, 0, 0) * 100, HA = QA(BA.start, 1, 0) * 100, JA = QA(BA.end, 0, 1) * 100, vA = QA(BA.end, 1, 1) * 100;
7882
+ return `<linearGradient id="${z}" x1="${UA}%" y1="${HA}%" x2="${JA}%" y2="${vA}%" gradientUnits="objectBoundingBox">${oA}</linearGradient>`;
7882
7883
  }
7883
- const X = QA(BA.center, 0, 0.5) * 100, hA = QA(BA.center, 1, 0.5) * 100, KA = (BA.radius ?? 0.5) * 100;
7884
- return `<radialGradient id="${_}" cx="${X}%" cy="${hA}%" r="${KA}%" gradientUnits="objectBoundingBox">${oA}</radialGradient>`;
7885
- }, q = (BA, _) => /<defs>/i.test(BA) ? BA.replace(/<defs>/i, `<defs>${_}`) : BA.replace(/(<svg[^>]*>)/i, `$1<defs>${_}</defs>`);
7886
- if (U && U.isEnabled !== !1 && (U.width || 0) > 0) {
7887
- const BA = U.width || 1, _ = V ? 1 : this.normalizeOpacity(U.opacity ?? 100), $ = V ? "#FFFFFF" : U.color || (H == null ? void 0 : H.color) || "#000000";
7884
+ const X = QA(BA.center, 0, 0.5) * 100, aA = QA(BA.center, 1, 0.5) * 100, SA = (BA.radius ?? 0.5) * 100;
7885
+ return `<radialGradient id="${z}" cx="${X}%" cy="${aA}%" r="${SA}%" gradientUnits="objectBoundingBox">${oA}</radialGradient>`;
7886
+ }, H = (BA, z) => /<defs>/i.test(BA) ? BA.replace(/<defs>/i, `<defs>${z}`) : BA.replace(/(<svg[^>]*>)/i, `$1<defs>${z}</defs>`);
7887
+ if (R && R.isEnabled !== !1 && (R.width || 0) > 0) {
7888
+ const BA = R.width || 1, z = W ? 1 : this.normalizeOpacity(R.opacity ?? 100), AA = W ? "#FFFFFF" : R.color || (L == null ? void 0 : L.color) || "#000000";
7888
7889
  let oA = "";
7889
- const QA = U.fill;
7890
+ const QA = R.fill;
7890
7891
  if (QA && QA.type) {
7891
7892
  if (QA.type === "Solid")
7892
- oA = QA.color || U.color || "#000000";
7893
+ oA = QA.color || R.color || "#000000";
7893
7894
  else if (QA.type === "LinearGradient" || QA.type === "RadialGradient" || QA.type === "Linear" || QA.type === "Radial") {
7894
- const cA = "exode-stroke";
7895
- F = q(F, T(QA, cA, _)), oA = `url(#${cA})`;
7895
+ const JA = "exode-stroke";
7896
+ F = H(F, b(QA, JA, z)), oA = `url(#${JA})`;
7896
7897
  }
7897
7898
  }
7898
- oA || (oA = $), F.match(/\bstroke\s*=/i) ? F = F.replace(
7899
+ oA || (oA = AA), F.match(/\bstroke\s*=/i) ? F = F.replace(
7899
7900
  /\bstroke\s*=\s*["'][^"']*["']/gi,
7900
- (cA) => /stroke\s*=\s*["']\s*(none|transparent)\s*["']/i.test(cA) ? cA : `stroke="${oA}"`
7901
+ (JA) => /stroke\s*=\s*["']\s*(none|transparent)\s*["']/i.test(JA) ? JA : `stroke="${oA}"`
7901
7902
  ) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke="${oA}"`), F = F.replace(
7902
7903
  new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"),
7903
7904
  `stroke:${oA}`
7904
- ), F.match(/\bstroke-width\s*=/i) ? F = F.replace(/\bstroke-width\s*=\s*["'][^"']*["']/gi, `stroke-width="${BA}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-width="${BA}"`), F = F.replace(/stroke-width\s*:\s*[^;"')]+/gi, `stroke-width:${BA}`), F.match(/\bstroke-opacity\s*=/i) ? F = F.replace(/\bstroke-opacity\s*=\s*["'][^"']*["']/gi, `stroke-opacity="${_}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-opacity="${_}"`), F = F.replace(/stroke-opacity\s*:\s*[^;"')]+/gi, `stroke-opacity:${_}`), U.lineCap && (F = F.replace(/\bstroke-linecap\s*=\s*["'][^"']*["']/gi, `stroke-linecap="${U.lineCap}"`), F = F.replace(/stroke-linecap\s*:\s*[^;"')]+/gi, `stroke-linecap:${U.lineCap}`)), U.lineJoin && (F = F.replace(/\bstroke-linejoin\s*=\s*["'][^"']*["']/gi, `stroke-linejoin="${U.lineJoin}"`), F = F.replace(/stroke-linejoin\s*:\s*[^;"')]+/gi, `stroke-linejoin:${U.lineJoin}`));
7905
- const X = U.trimStart ?? 0, hA = U.trimEnd ?? 1, KA = U.trimOffset ?? 0, RA = U.dashOffset ?? 0, HA = X !== 0 || hA !== 1 || KA !== 0 || RA !== 0;
7905
+ ), F.match(/\bstroke-width\s*=/i) ? F = F.replace(/\bstroke-width\s*=\s*["'][^"']*["']/gi, `stroke-width="${BA}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-width="${BA}"`), F = F.replace(/stroke-width\s*:\s*[^;"')]+/gi, `stroke-width:${BA}`), F.match(/\bstroke-opacity\s*=/i) ? F = F.replace(/\bstroke-opacity\s*=\s*["'][^"']*["']/gi, `stroke-opacity="${z}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-opacity="${z}"`), F = F.replace(/stroke-opacity\s*:\s*[^;"')]+/gi, `stroke-opacity:${z}`), R.lineCap && (F = F.replace(/\bstroke-linecap\s*=\s*["'][^"']*["']/gi, `stroke-linecap="${R.lineCap}"`), F = F.replace(/stroke-linecap\s*:\s*[^;"')]+/gi, `stroke-linecap:${R.lineCap}`)), R.lineJoin && (F = F.replace(/\bstroke-linejoin\s*=\s*["'][^"']*["']/gi, `stroke-linejoin="${R.lineJoin}"`), F = F.replace(/stroke-linejoin\s*:\s*[^;"')]+/gi, `stroke-linejoin:${R.lineJoin}`));
7906
+ const X = R.trimStart ?? 0, aA = R.trimEnd ?? 1, SA = R.trimOffset ?? 0, UA = R.dashOffset ?? 0, HA = X !== 0 || aA !== 1 || SA !== 0 || UA !== 0;
7906
7907
  if (HA) {
7907
- const cA = Math.max(0, Math.min(1, X)), vA = Math.max(0, Math.min(1, hA));
7908
- this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${cA}, End: ${vA}`);
7908
+ const JA = Math.max(0, Math.min(1, X)), vA = Math.max(0, Math.min(1, aA));
7909
+ this.frameCount % 600 === 0 && this.debugLog(`SVG Trim - Object: ${I.name || I.id}, Start: ${JA}, End: ${vA}`);
7909
7910
  let WI = Q.width || i || 100, ZI = Q.height || w || 100;
7910
- const RI = f.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
7911
+ const RI = u.match(/viewBox=["']\s*0\s+0\s+([\d.]+)\s+([\d.]+)\s*["']/i);
7911
7912
  if (RI) {
7912
7913
  const wI = parseFloat(RI[1]), kI = parseFloat(RI[2]);
7913
7914
  !isNaN(wI) && !isNaN(kI) && (WI = wI, ZI = kI);
7914
7915
  }
7915
- const DI = (WI + ZI) * 2, UI = (KA % 1 + 1) % 1, QI = (RA % 1 + 1) % 1;
7916
+ const DI = (WI + ZI) * 2, UI = (SA % 1 + 1) % 1, QI = (UA % 1 + 1) % 1;
7916
7917
  let _A = "", BI = 0;
7917
- if (cA >= vA)
7918
+ if (JA >= vA)
7918
7919
  _A = `0 ${DI}`, BI = 0;
7919
7920
  else {
7920
- const wI = DI * (vA - cA), kI = DI - wI;
7921
- BI = -(DI * (cA + UI + QI)), _A = `${wI} ${kI}`;
7921
+ const wI = DI * (vA - JA), kI = DI - wI;
7922
+ BI = -(DI * (JA + UI + QI)), _A = `${wI} ${kI}`;
7922
7923
  }
7923
7924
  F.match(/\bstroke-dasharray\s*=/i) ? F = F.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${_A}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-dasharray="${_A}"`), F = F.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${_A}`), F.match(/\bstroke-dashoffset\s*=/i) ? F = F.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${BI}"`) : F = F.replace(/<(path|circle|rect|ellipse|polygon|polyline)/gi, `<$1 stroke-dashoffset="${BI}"`), F = F.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${BI}`);
7924
- } else if (U.dashArray && U.dashArray.length > 0) {
7925
- const cA = U.dashArray.join(" ");
7926
- F = F.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${cA}"`), F = F.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${cA}`), U.dashOffset && (F = F.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${U.dashOffset}"`), F = F.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${U.dashOffset}`));
7925
+ } else if (R.dashArray && R.dashArray.length > 0) {
7926
+ const JA = R.dashArray.join(" ");
7927
+ F = F.replace(/\bstroke-dasharray\s*=\s*["'][^"']*["']/gi, `stroke-dasharray="${JA}"`), F = F.replace(/stroke-dasharray\s*:\s*[^;"')]+/gi, `stroke-dasharray:${JA}`), R.dashOffset && (F = F.replace(/\bstroke-dashoffset\s*=\s*["'][^"']*["']/gi, `stroke-dashoffset="${R.dashOffset}"`), F = F.replace(/stroke-dashoffset\s*:\s*[^;"')]+/gi, `stroke-dashoffset:${R.dashOffset}`));
7927
7928
  }
7928
- if (!/\bstroke\s*=\s*["']/i.test(f) && !new RegExp("(?<![a-z-])stroke\\s*:", "i").test(f)) {
7929
- let cA = "", vA = "";
7929
+ if (!/\bstroke\s*=\s*["']/i.test(u) && !new RegExp("(?<![a-z-])stroke\\s*:", "i").test(u)) {
7930
+ let JA = "", vA = "";
7930
7931
  if (HA) {
7931
- const DI = Q.width || i || 100, UI = Q.height || w || 100, QI = (DI + UI) * 2, _A = Math.max(0, Math.min(1, X)), BI = Math.max(0, Math.min(1, hA)), wI = (KA % 1 + 1) % 1, kI = (RA % 1 + 1) % 1;
7932
+ const DI = Q.width || i || 100, UI = Q.height || w || 100, QI = (DI + UI) * 2, _A = Math.max(0, Math.min(1, X)), BI = Math.max(0, Math.min(1, aA)), wI = (SA % 1 + 1) % 1, kI = (UA % 1 + 1) % 1;
7932
7933
  if (_A >= BI)
7933
- cA = ` stroke-dasharray="0 ${QI}"`, vA = ' stroke-dashoffset="0"';
7934
+ JA = ` stroke-dasharray="0 ${QI}"`, vA = ' stroke-dashoffset="0"';
7934
7935
  else {
7935
7936
  const tC = QI * (BI - _A), xQ = QI - tC, OQ = -(QI * (_A + wI + kI));
7936
- cA = ` stroke-dasharray="${tC} ${xQ}"`, vA = ` stroke-dashoffset="${OQ}"`;
7937
+ JA = ` stroke-dasharray="${tC} ${xQ}"`, vA = ` stroke-dashoffset="${OQ}"`;
7937
7938
  }
7938
- } else (NA = U.dashArray) != null && NA.length && (cA = ` stroke-dasharray="${U.dashArray.join(" ")}"`, U.dashOffset && (vA = ` stroke-dashoffset="${U.dashOffset}"`));
7939
- const WI = U.lineCap ? ` stroke-linecap="${U.lineCap}"` : "", ZI = U.lineJoin ? ` stroke-linejoin="${U.lineJoin}"` : "", RI = `stroke="${oA}" stroke-width="${BA}" stroke-opacity="${_}"${WI}${ZI}${cA}${vA}`;
7939
+ } else (NA = R.dashArray) != null && NA.length && (JA = ` stroke-dasharray="${R.dashArray.join(" ")}"`, R.dashOffset && (vA = ` stroke-dashoffset="${R.dashOffset}"`));
7940
+ const WI = R.lineCap ? ` stroke-linecap="${R.lineCap}"` : "", ZI = R.lineJoin ? ` stroke-linejoin="${R.lineJoin}"` : "", RI = `stroke="${oA}" stroke-width="${BA}" stroke-opacity="${z}"${WI}${ZI}${JA}${vA}`;
7940
7941
  F = F.replace(
7941
7942
  /(<svg[^>]*>)(\s*(?:<defs>[\s\S]*?<\/defs>)?)/i,
7942
7943
  (DI, UI, QI) => `${UI}${QI}<g ${RI}>`
7943
7944
  ), F = F.replace(/<\/svg>/i, "</g></svg>");
7944
7945
  }
7945
- } else U && U.isEnabled === !1 && (F = F.replace(/\bstroke\s*=\s*["'][^"']*["']/gi, 'stroke="none"'), F = F.replace(new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"), "stroke:none"));
7946
- const iA = new Blob([F], { type: "image/svg+xml" }), JA = URL.createObjectURL(iA);
7947
- yA.onload = () => {
7948
- if (URL.revokeObjectURL(JA), this.frameCount % 900 === 0) {
7949
- const BA = this.imageCache.get(tA);
7946
+ } else R && R.isEnabled === !1 && (F = F.replace(/\bstroke\s*=\s*["'][^"']*["']/gi, 'stroke="none"'), F = F.replace(new RegExp(`(?<![a-z-])stroke\\s*:\\s*(?!none|transparent)[^;"')]+`, "gi"), "stroke:none"));
7947
+ const iA = new Blob([F], { type: "image/svg+xml" }), RA = URL.createObjectURL(iA);
7948
+ kA.onload = () => {
7949
+ if (URL.revokeObjectURL(RA), this.frameCount % 900 === 0) {
7950
+ const BA = this.imageCache.get(DA);
7950
7951
  BA && this.debugLog(`SVG Payload Ready: ${I.name || I.id} (${BA.naturalWidth}x${BA.naturalHeight})`);
7951
7952
  }
7952
- }, yA.onerror = () => {
7953
- URL.revokeObjectURL(JA), this.debugLog(`SVG Error: Failed to load payload for ${I.name || I.id}`);
7954
- }, yA.src = JA, this.imageCache.set(tA, yA);
7953
+ }, kA.onerror = () => {
7954
+ URL.revokeObjectURL(RA), this.debugLog(`SVG Error: Failed to load payload for ${I.name || I.id}`);
7955
+ }, kA.src = RA, this.imageCache.set(DA, kA);
7955
7956
  }
7956
7957
  let CA = null;
7957
- if (yA.complete && yA.naturalWidth > 0 ? (CA = yA, this.lastValidSvgImgMap.set(I.id, yA)) : CA = this.lastValidSvgImgMap.get(I.id) || null, CA && CA.complete && CA.naturalWidth > 0) {
7958
- const F = Math.max(1, i), T = Math.max(1, w);
7959
- if (V && (H == null ? void 0 : H.type) === "Solid") {
7960
- this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = F, this.maskBuffer.height = T, this.maskCtx.clearRect(0, 0, F, T), this.maskCtx.drawImage(CA, 0, 0, F, T), this.maskCtx.globalCompositeOperation = "source-in";
7961
- const q = H.color || "#000000", iA = this.normalizeOpacity(H.opacity ?? 100);
7962
- this.maskCtx.fillStyle = q, this.maskCtx.globalAlpha = iA, this.maskCtx.fillRect(0, 0, F, T), A.drawImage(this.maskBuffer, -F / 2, -T / 2, F, T);
7963
- } else s !== 0 ? (A.save(), this.drawRoundRect(A, -F / 2, -T / 2, F, T, s), A.clip(), A.drawImage(CA, -F / 2, -T / 2, F, T), A.restore()) : A.drawImage(CA, -F / 2, -T / 2, F, T);
7958
+ if (kA.complete && kA.naturalWidth > 0 ? (CA = kA, this.lastValidSvgImgMap.set(I.id, kA)) : CA = this.lastValidSvgImgMap.get(I.id) || null, CA && CA.complete && CA.naturalWidth > 0) {
7959
+ const F = Math.max(1, i), b = Math.max(1, w);
7960
+ if (W && (L == null ? void 0 : L.type) === "Solid") {
7961
+ this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = F, this.maskBuffer.height = b, this.maskCtx.clearRect(0, 0, F, b), this.maskCtx.drawImage(CA, 0, 0, F, b), this.maskCtx.globalCompositeOperation = "source-in";
7962
+ const H = L.color || "#000000", iA = this.normalizeOpacity(L.opacity ?? 100);
7963
+ this.maskCtx.fillStyle = H, this.maskCtx.globalAlpha = iA, this.maskCtx.fillRect(0, 0, F, b), A.drawImage(this.maskBuffer, -F / 2, -b / 2, F, b);
7964
+ } else s !== 0 ? (A.save(), this.drawRoundRect(A, -F / 2, -b / 2, F, b, s), A.clip(), A.drawImage(CA, -F / 2, -b / 2, F, b), A.restore()) : A.drawImage(CA, -F / 2, -b / 2, F, b);
7964
7965
  }
7965
7966
  }
7966
7967
  } else if (h.type === "LineGraph")
7967
7968
  this.renderLineGraph(A, h, i, w);
7968
7969
  else if (I.type === "Shape") {
7969
7970
  if (this.applyPath(A, h, i, w, s), A.save(), E.blur && E.blur.amount > 0 && (A.filter = `blur(${E.blur.amount}px)`), E.fill) {
7970
- const f = A.globalAlpha, W = this.createCanvasFill(A, E.fill, i, w);
7971
- W ? A.fillStyle = W : A.fillStyle = typeof E.fill == "string" ? E.fill : E.fill.color || "transparent", A.globalAlpha = f * this.normalizeOpacity(E.fill.opacity ?? 100), this.applyPath(A, h, i, w, s), A.fill(), A.globalAlpha = f;
7971
+ const u = A.globalAlpha, O = this.createCanvasFill(A, E.fill, i, w);
7972
+ O ? A.fillStyle = O : A.fillStyle = typeof E.fill == "string" ? E.fill : E.fill.color || "transparent", A.globalAlpha = u * this.normalizeOpacity(E.fill.opacity ?? 100), this.applyPath(A, h, i, w, s), A.fill(), A.globalAlpha = u;
7972
7973
  }
7973
7974
  A.restore(), E.stroke && E.stroke.width > 0 && this.applyStrokeAlignment(A, E, h, i, w, s);
7974
7975
  } else if (I.type === "Frame" || I.type === "Group" && !I.isStructuralGroup) {
7975
- const f = g.width ?? Q.width ?? I.width ?? i, W = g.height ?? Q.height ?? I.height ?? w, H = s;
7976
- if (A.save(), A.beginPath(), this.drawRoundRect(A, -f / 2, -W / 2, f, W, H), E.fill && E.fill.type !== "None") {
7977
- const U = A.globalAlpha, x = this.createCanvasFill(A, E.fill, f, W);
7978
- A.fillStyle = x || E.fill.color || "transparent", A.globalAlpha = U * this.normalizeOpacity(E.fill.opacity ?? 100), A.fill(), A.globalAlpha = U;
7976
+ const u = g.width ?? Q.width ?? I.width ?? i, O = g.height ?? Q.height ?? I.height ?? w, L = s;
7977
+ if (A.save(), A.beginPath(), this.drawRoundRect(A, -u / 2, -O / 2, u, O, L), E.fill && E.fill.type !== "None") {
7978
+ const R = A.globalAlpha, m = this.createCanvasFill(A, E.fill, u, O);
7979
+ A.fillStyle = m || E.fill.color || "transparent", A.globalAlpha = R * this.normalizeOpacity(E.fill.opacity ?? 100), A.fill(), A.globalAlpha = R;
7979
7980
  }
7980
7981
  if (A.restore(), E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1) {
7981
- const U = { type: "Rectangle" };
7982
- this.applyStrokeAlignment(A, E, U, f, W, H);
7982
+ const R = { type: "Rectangle" };
7983
+ this.applyStrokeAlignment(A, E, R, u, O, L);
7983
7984
  }
7984
7985
  } else I.type === "Group" && I.isStructuralGroup || (I.type === "Component" && I.variant === "inputbox" ? this.renderInputBox(A, I) : I.type === "Component" && I.variant === "button" ? this.renderButton(A, I) : I.type === "Component" && I.variant === "toggle_button" ? this.renderToggleButton(A, I) : I.type === "Toggle" || I.type === "Component" && I.variant === "toggle" ? this.renderToggle(A, I) : I.type === "Slider" || I.type === "Component" && I.variant === "slider" ? this.renderSlider(A, I) : I.type === "Dropdown" || I.type === "Component" && I.variant === "dropdown" ? this.renderDropdown(A, I) : (I.type === "ListView" || I.type === "Component" && I.variant === "listview") && this.renderListView(A, I));
7985
- if (IA && A.restore(), u && u.enabled && A.restore(), I.children && I.children.length > 0) {
7986
- const W = I.type === "Frame", H = I.clipsContent !== void 0 ? I.clipsContent : I.clipContent !== void 0 ? I.clipContent : W;
7987
- if (A.save(), H) {
7986
+ if (IA && A.restore(), T && T.enabled && A.restore(), I.children && I.children.length > 0) {
7987
+ const O = I.type === "Frame", L = I.clipsContent !== void 0 ? I.clipsContent : I.clipContent !== void 0 ? I.clipContent : O;
7988
+ if (A.save(), L) {
7988
7989
  A.beginPath();
7989
- const x = g.width ?? (Q == null ? void 0 : Q.width) ?? I.width ?? 0, V = g.height ?? (Q == null ? void 0 : Q.height) ?? I.height ?? 0, aA = g.cornerRadius ?? (Q == null ? void 0 : Q.corner_radius) ?? I.cornerRadius ?? 0;
7990
- this.drawRoundRect(A, -x / 2, -V / 2, x, V, aA), A.clip();
7990
+ const m = g.width ?? (Q == null ? void 0 : Q.width) ?? I.width ?? 0, W = g.height ?? (Q == null ? void 0 : Q.height) ?? I.height ?? 0, GA = g.cornerRadius ?? (Q == null ? void 0 : Q.corner_radius) ?? I.cornerRadius ?? 0;
7991
+ this.drawRoundRect(A, -m / 2, -W / 2, m, W, GA), A.clip();
7991
7992
  }
7992
- let U = 0;
7993
- for (I.children.forEach((x) => {
7994
- const V = C.get(x);
7995
- if (!V) return;
7996
- const aA = this.objectStates.get(x), gA = (aA == null ? void 0 : aA.geometry) || V.geometry;
7997
- if (gA && gA.isMask && (aA == null ? void 0 : aA.visible) !== !1) {
7998
- const tA = gA.width || 0, yA = gA.height || 0;
7999
- this.applyObjectTransform(A, x);
8000
- const CA = (aA == null ? void 0 : aA.corner_radius) ?? (gA == null ? void 0 : gA.corner_radius) ?? 0;
8001
- this.applyPath(A, gA, tA, yA, CA), A.clip(), U++;
7993
+ let R = 0;
7994
+ for (I.children.forEach((m) => {
7995
+ const W = C.get(m);
7996
+ if (!W) return;
7997
+ const GA = this.objectStates.get(m), gA = (GA == null ? void 0 : GA.geometry) || W.geometry;
7998
+ if (gA && gA.isMask && (GA == null ? void 0 : GA.visible) !== !1) {
7999
+ const DA = gA.width || 0, kA = gA.height || 0;
8000
+ this.applyObjectTransform(A, m);
8001
+ const CA = (GA == null ? void 0 : GA.corner_radius) ?? (gA == null ? void 0 : gA.corner_radius) ?? 0;
8002
+ this.applyPath(A, gA, DA, kA, CA), A.clip(), R++;
8002
8003
  } else
8003
- this.renderObject(A, V, C);
8004
- }); U > 0; )
8005
- A.restore(), U--;
8004
+ this.renderObject(A, W, C);
8005
+ }); R > 0; )
8006
+ A.restore(), R--;
8006
8007
  A.restore();
8007
8008
  }
8008
8009
  if (n) {
@@ -8013,328 +8014,328 @@ class Ei {
8013
8014
  opacity: I.maskOpacity !== void 0 ? I.maskOpacity / 100 : 1,
8014
8015
  feather: I.maskFeather || 0,
8015
8016
  isVisible: !0
8016
- }] : [])).filter((U) => U.isVisible !== !1 && C.has(U.maskId)).forEach((U) => {
8017
- const x = C.get(U.maskId), V = this.objectStates.get(x.id), aA = U.feather || 0, gA = U.inverted === !0, tA = U.opacity !== void 0 ? typeof U.opacity == "number" ? U.opacity : U.opacity / 100 : 1;
8018
- if ((U.type || "alpha") === "luma") {
8019
- (!this.lumaBuffer || this.lumaBuffer.width !== this.maskBuffer.width || this.lumaBuffer.height !== this.maskBuffer.height) && (this.lumaBuffer = document.createElement("canvas"), this.lumaBuffer.width = this.maskBuffer.width, this.lumaBuffer.height = this.maskBuffer.height, this.lumaCtx = this.lumaBuffer.getContext("2d", { willReadFrequently: !0 }), this.lumaCtx && (this.lumaCtx.imageSmoothingEnabled = !0, this.lumaCtx.imageSmoothingQuality = "high")), this.lumaCtx.clearRect(0, 0, this.lumaBuffer.width, this.lumaBuffer.height), this.lumaCtx.save(), this.rootTransform && this.lumaCtx.setTransform(this.rootTransform), this.applyAbsoluteTransform(this.lumaCtx, x.id, C), aA > 0 && (this.lumaCtx.filter = `blur(${aA}px)`), this.lumaCtx.globalAlpha = tA;
8020
- const CA = (V == null ? void 0 : V.width) || x.geometry.width || 0, F = (V == null ? void 0 : V.height) || x.geometry.height || 0, T = (V == null ? void 0 : V.corner_radius) ?? x.corner_radius ?? 0;
8021
- if (x.geometry.type === "Text") {
8022
- const BA = V != null && V.geometry ? this.deepMerge(x.geometry, V.geometry) : x.geometry, _ = V != null && V.style ? this.deepMerge(x.style, V.style) : x.style;
8023
- this._renderText(this.lumaCtx, x, { ...BA, width: CA, height: F, corner_radius: T }, _, V, CA, F, !0);
8024
- } else if (x.geometry.type === "Image") {
8025
- const BA = x.geometry.src;
8017
+ }] : [])).filter((R) => R.isVisible !== !1 && C.has(R.maskId)).forEach((R) => {
8018
+ const m = C.get(R.maskId), W = this.objectStates.get(m.id), GA = R.feather || 0, gA = R.inverted === !0, DA = R.opacity !== void 0 ? typeof R.opacity == "number" ? R.opacity : R.opacity / 100 : 1;
8019
+ if ((R.type || "alpha") === "luma") {
8020
+ (!this.lumaBuffer || this.lumaBuffer.width !== this.maskBuffer.width || this.lumaBuffer.height !== this.maskBuffer.height) && (this.lumaBuffer = document.createElement("canvas"), this.lumaBuffer.width = this.maskBuffer.width, this.lumaBuffer.height = this.maskBuffer.height, this.lumaCtx = this.lumaBuffer.getContext("2d", { willReadFrequently: !0 }), this.lumaCtx && (this.lumaCtx.imageSmoothingEnabled = !0, this.lumaCtx.imageSmoothingQuality = "high")), this.lumaCtx.clearRect(0, 0, this.lumaBuffer.width, this.lumaBuffer.height), this.lumaCtx.save(), this.rootTransform && this.lumaCtx.setTransform(this.rootTransform), this.applyAbsoluteTransform(this.lumaCtx, m.id, C), GA > 0 && (this.lumaCtx.filter = `blur(${GA}px)`), this.lumaCtx.globalAlpha = DA;
8021
+ const CA = (W == null ? void 0 : W.width) || m.geometry.width || 0, F = (W == null ? void 0 : W.height) || m.geometry.height || 0, b = (W == null ? void 0 : W.corner_radius) ?? m.corner_radius ?? 0;
8022
+ if (m.geometry.type === "Text") {
8023
+ const BA = W != null && W.geometry ? this.deepMerge(m.geometry, W.geometry) : m.geometry, z = W != null && W.style ? this.deepMerge(m.style, W.style) : m.style;
8024
+ this._renderText(this.lumaCtx, m, { ...BA, width: CA, height: F, corner_radius: b }, z, W, CA, F, !0);
8025
+ } else if (m.geometry.type === "Image") {
8026
+ const BA = m.geometry.src;
8026
8027
  if (BA) {
8027
- let _ = this.imageCache.get(BA);
8028
- _ || (_ = new Image(), _.src = BA, this.imageCache.set(BA, _)), _.complete && _.naturalWidth > 0 ? this.lumaCtx.drawImage(_, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.lumaCtx, x.geometry, CA, F, T), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
8028
+ let z = this.imageCache.get(BA);
8029
+ z || (z = new Image(), z.src = BA, this.imageCache.set(BA, z)), z.complete && z.naturalWidth > 0 ? this.lumaCtx.drawImage(z, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.lumaCtx, m.geometry, CA, F, b), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
8029
8030
  }
8030
- } else if (x.geometry.type === "SVG") {
8031
- const BA = x.geometry.svgContent;
8031
+ } else if (m.geometry.type === "SVG") {
8032
+ const BA = m.geometry.svgContent;
8032
8033
  if (BA) {
8033
- const _ = `__lumamask_${x.id}`;
8034
- let $ = this.imageCache.get(_);
8035
- if (!$) {
8036
- $ = new Image();
8034
+ const z = `__lumamask_${m.id}`;
8035
+ let AA = this.imageCache.get(z);
8036
+ if (!AA) {
8037
+ AA = new Image();
8037
8038
  const oA = new Blob([BA], { type: "image/svg+xml" });
8038
- $.src = URL.createObjectURL(oA), $.onload = () => {
8039
+ AA.src = URL.createObjectURL(oA), AA.onload = () => {
8039
8040
  this.artboard && this.reset();
8040
- }, this.imageCache.set(_, $);
8041
+ }, this.imageCache.set(z, AA);
8041
8042
  }
8042
- $.complete && $.naturalWidth > 0 ? this.lumaCtx.drawImage($, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.lumaCtx, x.geometry, CA, F, T), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
8043
+ AA.complete && AA.naturalWidth > 0 ? this.lumaCtx.drawImage(AA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.lumaCtx, m.geometry, CA, F, b), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill());
8043
8044
  }
8044
8045
  } else
8045
- this.applyPath(this.lumaCtx, x.geometry, CA, F, T), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill();
8046
+ this.applyPath(this.lumaCtx, m.geometry, CA, F, b), this.lumaCtx.fillStyle = "#ffffff", this.lumaCtx.fill();
8046
8047
  this.lumaCtx.restore();
8047
- const q = this.maskCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight), iA = this.lumaCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight).data, JA = q.data;
8048
- for (let BA = 0; BA < JA.length; BA += 4) {
8049
- const _ = iA[BA], $ = iA[BA + 1], oA = iA[BA + 2];
8050
- let QA = (0.299 * _ + 0.587 * $ + 0.114 * oA) / 255;
8051
- gA && (QA = 1 - QA), JA[BA + 3] *= QA;
8048
+ const H = this.maskCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight), iA = this.lumaCtx.getImageData(0, 0, this.canvasWidth, this.canvasHeight).data, RA = H.data;
8049
+ for (let BA = 0; BA < RA.length; BA += 4) {
8050
+ const z = iA[BA], AA = iA[BA + 1], oA = iA[BA + 2];
8051
+ let QA = (0.299 * z + 0.587 * AA + 0.114 * oA) / 255;
8052
+ gA && (QA = 1 - QA), RA[BA + 3] *= QA;
8052
8053
  }
8053
- this.maskCtx.putImageData(q, 0, 0);
8054
+ this.maskCtx.putImageData(H, 0, 0);
8054
8055
  } else {
8055
- this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation = gA ? "destination-out" : "destination-in", aA > 0 && (this.maskCtx.filter = `blur(${aA}px)`), this.maskCtx.globalAlpha = tA, this.applyAbsoluteTransform(this.maskCtx, x.id, C);
8056
- const CA = (V == null ? void 0 : V.width) || x.geometry.width || 0, F = (V == null ? void 0 : V.height) || x.geometry.height || 0, T = (V == null ? void 0 : V.corner_radius) ?? x.corner_radius ?? 0;
8057
- if (x.geometry.type === "Text") {
8058
- const q = V != null && V.geometry ? this.deepMerge(x.geometry, V.geometry) : x.geometry, iA = V != null && V.style ? this.deepMerge(x.style, V.style) : x.style;
8059
- this._renderText(this.maskCtx, x, { ...q, width: CA, height: F, corner_radius: T }, iA, V, CA, F, !0);
8060
- } else if (x.geometry.type === "Image") {
8061
- const q = x.geometry.src;
8062
- if (q) {
8063
- let iA = this.imageCache.get(q);
8064
- iA || (iA = new Image(), iA.src = q, this.imageCache.set(q, iA)), iA.complete && iA.naturalWidth > 0 ? this.maskCtx.drawImage(iA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.maskCtx, x.geometry, CA, F, T), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
8056
+ this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation = gA ? "destination-out" : "destination-in", GA > 0 && (this.maskCtx.filter = `blur(${GA}px)`), this.maskCtx.globalAlpha = DA, this.applyAbsoluteTransform(this.maskCtx, m.id, C);
8057
+ const CA = (W == null ? void 0 : W.width) || m.geometry.width || 0, F = (W == null ? void 0 : W.height) || m.geometry.height || 0, b = (W == null ? void 0 : W.corner_radius) ?? m.corner_radius ?? 0;
8058
+ if (m.geometry.type === "Text") {
8059
+ const H = W != null && W.geometry ? this.deepMerge(m.geometry, W.geometry) : m.geometry, iA = W != null && W.style ? this.deepMerge(m.style, W.style) : m.style;
8060
+ this._renderText(this.maskCtx, m, { ...H, width: CA, height: F, corner_radius: b }, iA, W, CA, F, !0);
8061
+ } else if (m.geometry.type === "Image") {
8062
+ const H = m.geometry.src;
8063
+ if (H) {
8064
+ let iA = this.imageCache.get(H);
8065
+ iA || (iA = new Image(), iA.src = H, this.imageCache.set(H, iA)), iA.complete && iA.naturalWidth > 0 ? this.maskCtx.drawImage(iA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.maskCtx, m.geometry, CA, F, b), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
8065
8066
  }
8066
- } else if (x.geometry.type === "SVG") {
8067
- const q = x.geometry.svgContent;
8068
- if (q) {
8069
- const iA = `__alphamask_${x.id}`;
8070
- let JA = this.imageCache.get(iA);
8071
- if (!JA) {
8072
- JA = new Image();
8073
- const BA = new Blob([q], { type: "image/svg+xml" });
8074
- JA.src = URL.createObjectURL(BA), JA.onload = () => {
8067
+ } else if (m.geometry.type === "SVG") {
8068
+ const H = m.geometry.svgContent;
8069
+ if (H) {
8070
+ const iA = `__alphamask_${m.id}`;
8071
+ let RA = this.imageCache.get(iA);
8072
+ if (!RA) {
8073
+ RA = new Image();
8074
+ const BA = new Blob([H], { type: "image/svg+xml" });
8075
+ RA.src = URL.createObjectURL(BA), RA.onload = () => {
8075
8076
  this.artboard && this.reset();
8076
- }, this.imageCache.set(iA, JA);
8077
+ }, this.imageCache.set(iA, RA);
8077
8078
  }
8078
- JA.complete && JA.naturalWidth > 0 ? this.maskCtx.drawImage(JA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.maskCtx, x.geometry, CA, F, T), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
8079
+ RA.complete && RA.naturalWidth > 0 ? this.maskCtx.drawImage(RA, -CA / 2, -F / 2, CA, F) : (this.applyPath(this.maskCtx, m.geometry, CA, F, b), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill());
8079
8080
  }
8080
8081
  } else
8081
- this.applyPath(this.maskCtx, x.geometry, CA, F, T), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill();
8082
+ this.applyPath(this.maskCtx, m.geometry, CA, F, b), this.maskCtx.fillStyle = "#ffffff", this.maskCtx.fill();
8082
8083
  this.maskCtx.restore();
8083
8084
  }
8084
8085
  }), r.save(), r.setTransform(1, 0, 0, 1, 0, 0);
8085
- const H = I.maskBlendMode || I.blendMode;
8086
- H && H !== "Normal" && (r.globalCompositeOperation = H.toLowerCase()), r.drawImage(this.maskBuffer, 0, 0), r.restore(), r.restore();
8086
+ const L = I.maskBlendMode || I.blendMode;
8087
+ L && L !== "Normal" && (r.globalCompositeOperation = L.toLowerCase()), r.drawImage(this.maskBuffer, 0, 0), r.restore(), r.restore();
8087
8088
  } else
8088
8089
  A.restore();
8089
8090
  }
8090
8091
  _renderText(A, I, C, g, Q, E, i, w = !1, o = !1) {
8091
- var d;
8092
+ var p;
8092
8093
  let s = C.text || "";
8093
8094
  if (C.textInputId && !w) {
8094
- const R = this.inputs.get(C.textInputId);
8095
- R !== void 0 && (s = String(R), Q.geometry && Q.geometry.type === "Text" && (Q.geometry.text = s));
8095
+ const U = this.inputs.get(C.textInputId);
8096
+ U !== void 0 && (s = String(U), Q.geometry && Q.geometry.type === "Text" && (Q.geometry.text = s));
8096
8097
  }
8097
8098
  let h = s || "";
8098
8099
  if (C.segments && Array.isArray(C.segments)) {
8099
- const R = C.segments.map((m) => m && m.text ? m.text : "").join("");
8100
- R !== h && R.toUpperCase() === (s || "").toUpperCase() ? h = s || "" : h = R;
8100
+ const U = C.segments.map((_) => _ && _.text ? _.text : "").join("");
8101
+ U !== h && U.toUpperCase() === (s || "").toUpperCase() ? h = s || "" : h = U;
8101
8102
  }
8102
- let a = ((d = C.fontWeight) == null ? void 0 : d.toString()) || "400", G = "normal";
8103
+ let a = ((p = C.fontWeight) == null ? void 0 : p.toString()) || "400", G = "normal";
8103
8104
  a.toLowerCase().includes("italic") && (G = "italic", a = a.replace(/italic/gi, "").trim() || "400");
8104
8105
  const t = this.mapFontWeight(a), K = Math.max(1, C.fontSize || 16);
8105
8106
  let S = C.fontFamily || "Inter";
8106
8107
  const y = ["Bold", "SemiBold", "Medium", "Regular", "Light", "Thin", "ExtraBold", "Black", "Italic"];
8107
- y.forEach((R) => {
8108
- const m = new RegExp(`[\\s-]${R}$`, "i");
8109
- m.test(S) && (S = S.replace(m, "").trim());
8108
+ y.forEach((U) => {
8109
+ const _ = new RegExp(`[\\s-]${U}$`, "i");
8110
+ _.test(S) && (S = S.replace(_, "").trim());
8110
8111
  }), A.font = `${G} ${t} ${K}px "${S}", sans-serif`;
8111
8112
  const N = C.textVerticalAlign || "top";
8112
8113
  A.textBaseline = "top";
8113
8114
  const M = C.textAlign || "left";
8114
8115
  A.textAlign = M;
8115
- const e = C.letterSpacing || 0, Y = C.paragraphSpacing || 0, j = (C.lineHeight || 1.2) * K, l = Math.ceil(C.width || E || 200) + 0.5, r = `${G} ${t} ${K}px "${S}", sans-serif`, v = (R) => {
8116
- if (e === 0) return A.measureText(R).width;
8117
- let m = 0;
8118
- for (let b = 0; b < R.length; b++)
8119
- m += A.measureText(R[b]).width + e;
8120
- return m - e;
8116
+ const e = C.letterSpacing || 0, Y = C.paragraphSpacing || 0, j = (C.lineHeight || 1.2) * K, l = Math.ceil(C.width || E || 200) + 0.5, r = `${G} ${t} ${K}px "${S}", sans-serif`, v = (U) => {
8117
+ if (e === 0) return A.measureText(U).width;
8118
+ let _ = 0;
8119
+ for (let f = 0; f < U.length; f++)
8120
+ _ += A.measureText(U[f]).width + e;
8121
+ return _ - e;
8121
8122
  }, n = `${h}|${r}|${e}|${Y}`;
8122
- let L = this.pretextCache.get(n);
8123
- if (!L && (L = eE(h, r), this.pretextCache.set(n, L), this.pretextCache.size > 1e3)) {
8124
- const R = this.pretextCache.keys().next().value;
8125
- R && this.pretextCache.delete(R);
8126
- }
8127
- const P = L ? nE(L, l, j) : { height: 0, lines: [] }, wA = (P == null ? void 0 : P.height) ?? 0, EA = (P == null ? void 0 : P.lines) ?? [];
8128
- let u = wA;
8129
- const z = this.getFontLeadingFactor(C.fontFamily || "Inter"), IA = (j - K) * z;
8130
- let Z = Math.round(-u / 2);
8131
- i > 0 && (N === "top" ? Z = Math.round(-i / 2) : N === "middle" || N === "center" ? Z = Math.round(-u / 2) : N === "bottom" && (Z = Math.round(i / 2 - u))), Z += IA;
8132
- const p = (R, m, b, AA, sA) => {
8133
- var qA, NA, f;
8134
- const kA = (!w || o) && (I.behaviors || []).some(
8135
- (W) => W.enabled && (W.type.toString().includes("Text") || ["Typewriter", "Scramble", "Wave", "Bounce", "GlitchText", "Reveal3D", "RevealSlide", "RevealBlur"].includes(W.type))
8123
+ let q = this.pretextCache.get(n);
8124
+ if (!q && (q = eE(h, r), this.pretextCache.set(n, q), this.pretextCache.size > 1e3)) {
8125
+ const U = this.pretextCache.keys().next().value;
8126
+ U && this.pretextCache.delete(U);
8127
+ }
8128
+ const P = q ? nE(q, l, j) : { height: 0, lines: [] }, sA = (P == null ? void 0 : P.height) ?? 0, EA = (P == null ? void 0 : P.lines) ?? [];
8129
+ let T = sA;
8130
+ const V = this.getFontLeadingFactor(C.fontFamily || "Inter"), IA = (j - K) * V;
8131
+ let x = Math.round(-T / 2);
8132
+ i > 0 && (N === "top" ? x = Math.round(-i / 2) : N === "middle" || N === "center" ? x = Math.round(-T / 2) : N === "bottom" && (x = Math.round(i / 2 - T))), x += IA;
8133
+ const d = (U, _, f, $, hA) => {
8134
+ var FA, NA, u;
8135
+ const KA = (!w || o) && (I.behaviors || []).some(
8136
+ (O) => O.enabled && (O.type.toString().includes("Text") || ["Typewriter", "Scramble", "Wave", "Bounce", "GlitchText", "Reveal3D", "RevealSlide", "RevealBlur"].includes(O.type))
8136
8137
  );
8137
- if (e === 0 && !kA && (C.enableSegments !== !0 || !C.segments || C.segments.length === 0))
8138
- AA ? A.strokeText(R, m, b) : A.fillText(R, m, b);
8138
+ if (e === 0 && !KA && (C.enableSegments !== !0 || !C.segments || C.segments.length === 0))
8139
+ $ ? A.strokeText(U, _, f) : A.fillText(U, _, f);
8139
8140
  else {
8140
- const W = v(R);
8141
- let H = m;
8142
- M === "center" ? H -= W / 2 : M === "right" && (H -= W);
8143
- let U = H;
8144
- const x = w && !o ? [] : ((qA = I.behaviors) == null ? void 0 : qA.filter(
8145
- (V) => [
8146
- O.Typewriter,
8147
- O.Scramble,
8148
- O.Wave,
8149
- O.Bounce,
8150
- O.GlitchText,
8151
- O.TextTrail,
8152
- O.Reveal3D,
8153
- O.RevealSlide,
8154
- O.RevealBlur,
8155
- O.TextLiquid,
8156
- O.TextVortex,
8157
- O.TextExplosion,
8158
- O.TextRain,
8159
- O.TextGravity,
8160
- O.TextElastic,
8161
- O.TextMatrix,
8162
- O.TextNeon,
8163
- O.TextGlitch3D,
8164
- O.TextDissolve,
8165
- O.TextOrganic,
8166
- O.TextBreathe,
8167
- O.TextFloral,
8168
- O.TextSmoke,
8169
- O.TextVariable,
8170
- O.TextMagnet,
8171
- O.TextSpin,
8172
- O.TextZing,
8173
- O.TextPerspective,
8174
- O.TextMirror
8175
- ].includes(V.type) && V.enabled
8141
+ const O = v(U);
8142
+ let L = _;
8143
+ M === "center" ? L -= O / 2 : M === "right" && (L -= O);
8144
+ let R = L;
8145
+ const m = w && !o ? [] : ((FA = I.behaviors) == null ? void 0 : FA.filter(
8146
+ (W) => [
8147
+ Z.Typewriter,
8148
+ Z.Scramble,
8149
+ Z.Wave,
8150
+ Z.Bounce,
8151
+ Z.GlitchText,
8152
+ Z.TextTrail,
8153
+ Z.Reveal3D,
8154
+ Z.RevealSlide,
8155
+ Z.RevealBlur,
8156
+ Z.TextLiquid,
8157
+ Z.TextVortex,
8158
+ Z.TextExplosion,
8159
+ Z.TextRain,
8160
+ Z.TextGravity,
8161
+ Z.TextElastic,
8162
+ Z.TextMatrix,
8163
+ Z.TextNeon,
8164
+ Z.TextGlitch3D,
8165
+ Z.TextDissolve,
8166
+ Z.TextOrganic,
8167
+ Z.TextBreathe,
8168
+ Z.TextFloral,
8169
+ Z.TextSmoke,
8170
+ Z.TextVariable,
8171
+ Z.TextMagnet,
8172
+ Z.TextSpin,
8173
+ Z.TextZing,
8174
+ Z.TextPerspective,
8175
+ Z.TextMirror
8176
+ ].includes(W.type) && W.enabled
8176
8177
  )) || [];
8177
- for (let V = 0; V < R.length; V++) {
8178
- let aA = R[V];
8179
- const gA = sA + V;
8180
- let tA = 0, yA = 0, CA = 1, F = 1, T = 0, q = 1, iA = aA;
8181
- if (x.forEach((_) => {
8182
- const $ = _.settings || {}, oA = $.strength || 1, QA = Date.now();
8183
- if (_.type === O.Typewriter)
8184
- this.currentTime * ($.speed || 1) - gA * ($.stagger || 0.05) < 0 && (q = 0);
8185
- else if (_.type === O.Scramble)
8186
- Math.max(0, Math.min(1, this.currentTime / ($.duration || 1.5)) - gA * 0.02) < 1 && Math.random() < 0.3 && (iA = "$%#@!*&"[Math.floor(Math.random() * 7)]);
8187
- else if (_.type === O.Wave)
8188
- yA += Math.sin(this.currentTime * 5 * ($.speed || 1) + gA * ($.frequency || 1)) * ($.amplitude || 20) * oA;
8189
- else if (_.type === O.Bounce) {
8190
- const X = Math.max(0, this.currentTime % 2 - gA * ($.stagger || 0.1));
8191
- X < 1 && (yA -= Math.abs(Math.sin(X * Math.PI)) * ($.height || 50) * oA);
8192
- } else if (_.type === O.TextTrail) {
8193
- const X = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - gA * ($.delay || 5))];
8194
- X && (tA += (X.x - (Q.x + U)) * oA * 0.2, yA += (X.y - (Q.y + b + yA)) * oA * 0.2);
8195
- } else if (_.type === O.Reveal3D) {
8196
- const X = Math.max(0, Math.min(1, this.currentTime * ($.speed || 1) - gA * ($.stagger || 0.1)));
8197
- CA *= X, F *= X, q = X;
8198
- } else if (_.type === O.RevealSlide) {
8199
- const X = Math.max(0, Math.min(1, this.currentTime * 1.5 - gA * 0.05)), hA = (1 - X) * ($.distance || 40) * oA, KA = $.direction || "up";
8200
- KA === "up" ? yA -= hA : KA === "down" ? yA += hA : KA === "left" ? tA -= hA : KA === "right" && (tA += hA), q = X;
8201
- } else if (_.type === O.RevealBlur) {
8178
+ for (let W = 0; W < U.length; W++) {
8179
+ let GA = U[W];
8180
+ const gA = hA + W;
8181
+ let DA = 0, kA = 0, CA = 1, F = 1, b = 0, H = 1, iA = GA;
8182
+ if (m.forEach((z) => {
8183
+ const AA = z.settings || {}, oA = AA.strength || 1, QA = Date.now();
8184
+ if (z.type === Z.Typewriter)
8185
+ this.currentTime * (AA.speed || 1) - gA * (AA.stagger || 0.05) < 0 && (H = 0);
8186
+ else if (z.type === Z.Scramble)
8187
+ Math.max(0, Math.min(1, this.currentTime / (AA.duration || 1.5)) - gA * 0.02) < 1 && Math.random() < 0.3 && (iA = "$%#@!*&"[Math.floor(Math.random() * 7)]);
8188
+ else if (z.type === Z.Wave)
8189
+ kA += Math.sin(this.currentTime * 5 * (AA.speed || 1) + gA * (AA.frequency || 1)) * (AA.amplitude || 20) * oA;
8190
+ else if (z.type === Z.Bounce) {
8191
+ const X = Math.max(0, this.currentTime % 2 - gA * (AA.stagger || 0.1));
8192
+ X < 1 && (kA -= Math.abs(Math.sin(X * Math.PI)) * (AA.height || 50) * oA);
8193
+ } else if (z.type === Z.TextTrail) {
8194
+ const X = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - gA * (AA.delay || 5))];
8195
+ X && (DA += (X.x - (Q.x + R)) * oA * 0.2, kA += (X.y - (Q.y + f + kA)) * oA * 0.2);
8196
+ } else if (z.type === Z.Reveal3D) {
8197
+ const X = Math.max(0, Math.min(1, this.currentTime * (AA.speed || 1) - gA * (AA.stagger || 0.1)));
8198
+ CA *= X, F *= X, H = X;
8199
+ } else if (z.type === Z.RevealSlide) {
8200
+ const X = Math.max(0, Math.min(1, this.currentTime * 1.5 - gA * 0.05)), aA = (1 - X) * (AA.distance || 40) * oA, SA = AA.direction || "up";
8201
+ SA === "up" ? kA -= aA : SA === "down" ? kA += aA : SA === "left" ? DA -= aA : SA === "right" && (DA += aA), H = X;
8202
+ } else if (z.type === Z.RevealBlur) {
8202
8203
  const X = Math.max(0, Math.min(1, this.currentTime * 1.2 - gA * 0.1));
8203
- q = X, tA += (1 - X) * 5;
8204
- } else if (_.type === O.TextLiquid) {
8205
- const X = Math.max(0, Math.sin(QA * 1e-3 * ($.speed || 1) + gA * 0.5));
8206
- yA += X * ($.amplitude || 10) * oA, F *= 1 + X * 0.2;
8207
- } else if (_.type === O.TextVortex) {
8208
- const X = QA * 2e-3 * ($.speed || 1) + gA * 0.2, hA = (1 - (Math.sin(QA * 1e-3) * 0.5 + 0.5)) * ($.radius || 50);
8209
- tA += Math.cos(X) * hA * oA, yA += Math.sin(X) * hA * oA;
8210
- } else if (_.type === O.TextExplosion) {
8211
- const X = $.force || 1, hA = this.currentTime % 2;
8212
- if (hA < 1) {
8213
- const KA = (gA / R.length - 0.5) * Math.PI * 2, RA = hA * 100 * X;
8214
- tA += Math.cos(KA) * RA * oA, yA += Math.sin(KA) * RA * oA, q = 1 - hA;
8204
+ H = X, DA += (1 - X) * 5;
8205
+ } else if (z.type === Z.TextLiquid) {
8206
+ const X = Math.max(0, Math.sin(QA * 1e-3 * (AA.speed || 1) + gA * 0.5));
8207
+ kA += X * (AA.amplitude || 10) * oA, F *= 1 + X * 0.2;
8208
+ } else if (z.type === Z.TextVortex) {
8209
+ const X = QA * 2e-3 * (AA.speed || 1) + gA * 0.2, aA = (1 - (Math.sin(QA * 1e-3) * 0.5 + 0.5)) * (AA.radius || 50);
8210
+ DA += Math.cos(X) * aA * oA, kA += Math.sin(X) * aA * oA;
8211
+ } else if (z.type === Z.TextExplosion) {
8212
+ const X = AA.force || 1, aA = this.currentTime % 2;
8213
+ if (aA < 1) {
8214
+ const SA = (gA / U.length - 0.5) * Math.PI * 2, UA = aA * 100 * X;
8215
+ DA += Math.cos(SA) * UA * oA, kA += Math.sin(SA) * UA * oA, H = 1 - aA;
8215
8216
  }
8216
- } else if (_.type === O.TextRain) {
8217
- const X = $.speed || 1, hA = $.height || 100, KA = (QA * 1e-3 * X + gA * 0.1) % 1;
8218
- yA -= (1 - KA) * hA * oA, q = KA > 0.1 ? 1 : KA * 10;
8219
- } else if (_.type === O.TextGravity) {
8220
- const X = $.gravity || 9.8, hA = this.currentTime % 3 / 3, KA = 0.5 * X * Math.pow(hA * 10, 2);
8221
- KA < 100 ? yA += KA * oA : yA += 100 * oA;
8222
- } else if (_.type === O.TextMatrix) {
8223
- const X = $.speed || 1;
8217
+ } else if (z.type === Z.TextRain) {
8218
+ const X = AA.speed || 1, aA = AA.height || 100, SA = (QA * 1e-3 * X + gA * 0.1) % 1;
8219
+ kA -= (1 - SA) * aA * oA, H = SA > 0.1 ? 1 : SA * 10;
8220
+ } else if (z.type === Z.TextGravity) {
8221
+ const X = AA.gravity || 9.8, aA = this.currentTime % 3 / 3, SA = 0.5 * X * Math.pow(aA * 10, 2);
8222
+ SA < 100 ? kA += SA * oA : kA += 100 * oA;
8223
+ } else if (z.type === Z.TextMatrix) {
8224
+ const X = AA.speed || 1;
8224
8225
  if (Math.random() < 0.1 * X) {
8225
- const KA = "0123456789ABCDEF!@#$%^&*";
8226
- iA = KA[Math.floor(Math.random() * KA.length)];
8226
+ const SA = "0123456789ABCDEF!@#$%^&*";
8227
+ iA = SA[Math.floor(Math.random() * SA.length)];
8227
8228
  }
8228
- q = 0.3 + (Math.sin(QA * 0.01 * X + gA) + 1) / 2 * 0.7;
8229
- } else if (_.type === O.TextNeon) {
8229
+ H = 0.3 + (Math.sin(QA * 0.01 * X + gA) + 1) / 2 * 0.7;
8230
+ } else if (z.type === Z.TextNeon) {
8230
8231
  const X = Math.random() > 0.95 ? 0.5 : 1;
8231
- q = (0.7 + (Math.sin(QA * 5e-3) + 1) / 2 * 0.3) * X;
8232
- } else if (_.type === O.TextDissolve)
8233
- Math.sin(gA * 1.5 + QA * 2e-3 * ($.speed || 1)) > 0.5 && (q = 0);
8234
- else if (_.type === O.TextOrganic) {
8235
- const X = $.speed || 1, hA = $.amplitude || 10;
8236
- tA += Math.sin(QA * 2e-3 * X + gA) * hA * oA, yA += Math.cos(QA * 15e-4 * X + gA * 0.7) * hA * oA;
8237
- } else if (_.type === O.TextBreathe) {
8238
- const hA = 1 + (Math.sin(QA * 3e-3 + gA * 0.2) + 1) / 2 * 0.2 * oA;
8239
- CA *= hA, F *= hA;
8240
- } else if (_.type === O.TextSpin) {
8241
- const X = $.speed || 1;
8242
- T += QA * 0.01 * X + gA;
8243
- } else if (_.type === O.TextMagnet) {
8232
+ H = (0.7 + (Math.sin(QA * 5e-3) + 1) / 2 * 0.3) * X;
8233
+ } else if (z.type === Z.TextDissolve)
8234
+ Math.sin(gA * 1.5 + QA * 2e-3 * (AA.speed || 1)) > 0.5 && (H = 0);
8235
+ else if (z.type === Z.TextOrganic) {
8236
+ const X = AA.speed || 1, aA = AA.amplitude || 10;
8237
+ DA += Math.sin(QA * 2e-3 * X + gA) * aA * oA, kA += Math.cos(QA * 15e-4 * X + gA * 0.7) * aA * oA;
8238
+ } else if (z.type === Z.TextBreathe) {
8239
+ const aA = 1 + (Math.sin(QA * 3e-3 + gA * 0.2) + 1) / 2 * 0.2 * oA;
8240
+ CA *= aA, F *= aA;
8241
+ } else if (z.type === Z.TextSpin) {
8242
+ const X = AA.speed || 1;
8243
+ b += QA * 0.01 * X + gA;
8244
+ } else if (z.type === Z.TextMagnet) {
8244
8245
  const X = this.pointerHistory[this.pointerHistory.length - 1];
8245
8246
  if (X) {
8246
- const hA = X.x - (Q.x + U), KA = X.y - (Q.y + b);
8247
- T = Math.atan2(KA, hA);
8247
+ const aA = X.x - (Q.x + R), SA = X.y - (Q.y + f);
8248
+ b = Math.atan2(SA, aA);
8248
8249
  }
8249
- } else if (_.type === O.TextPerspective) {
8250
- const X = R.length / 2, hA = (gA - X) / X, KA = 1 - Math.abs(hA) * 0.3 * oA;
8251
- CA *= KA, F *= KA, tA += hA * 20 * oA;
8252
- } else if (_.type === O.TextMirror)
8253
- q *= 0.8;
8254
- else if (_.type === O.TextFloral) {
8255
- const X = $.speed || 1, hA = $.stagger || 0.1, KA = (QA * 1e-3 * X + gA * hA) % 2;
8256
- KA < 1 && (CA *= KA, F *= KA, T += KA * Math.PI);
8257
- } else if (_.type === O.TextSmoke) {
8258
- const X = $.speed || 1, hA = $.height || 50, KA = (QA * 5e-4 * X + gA * 0.2) % 1;
8259
- yA -= KA * hA * oA, tA += Math.sin(QA * 2e-3 + gA) * 5 * oA, q = 1 - KA;
8260
- } else if (_.type === O.TextVariable) {
8261
- const X = $.speed || 1, hA = $.intensity || 1.5, KA = (Math.sin(QA * 4e-3 * X + gA * 0.3) + 1) / 2;
8262
- CA *= 1 + KA * (hA - 1) * oA;
8263
- } else if (_.type === O.TextZing) {
8264
- const X = $.speed || 2, hA = $.distance || 100, KA = (QA * 2e-3 * X + gA * 0.05) % 1;
8265
- tA += (1 - KA) * hA * oA, q = KA;
8266
- } else if (_.type === O.TextElastic) {
8267
- const X = $.stiffness || 0.2, hA = $.damping || 0.1, KA = Math.sin(QA * 0.01) * Math.exp(-QA * 1e-3 * hA);
8268
- F *= 1 + KA * X * oA;
8269
- } else if (_.type === O.TextGlitch3D) {
8270
- const X = $.intensity || 5;
8271
- Math.random() < 0.2 && (tA += (Math.random() - 0.5) * X, yA += (Math.random() - 0.5) * X, q = 0.8);
8272
- } else if (_.type === O.GlitchText) {
8273
- const X = $.intensity || 5;
8274
- Math.random() < 0.1 && (tA += (Math.random() - 0.5) * X, yA += (Math.random() - 0.5) * X, Math.random() < 0.05 && (q = 0.5));
8250
+ } else if (z.type === Z.TextPerspective) {
8251
+ const X = U.length / 2, aA = (gA - X) / X, SA = 1 - Math.abs(aA) * 0.3 * oA;
8252
+ CA *= SA, F *= SA, DA += aA * 20 * oA;
8253
+ } else if (z.type === Z.TextMirror)
8254
+ H *= 0.8;
8255
+ else if (z.type === Z.TextFloral) {
8256
+ const X = AA.speed || 1, aA = AA.stagger || 0.1, SA = (QA * 1e-3 * X + gA * aA) % 2;
8257
+ SA < 1 && (CA *= SA, F *= SA, b += SA * Math.PI);
8258
+ } else if (z.type === Z.TextSmoke) {
8259
+ const X = AA.speed || 1, aA = AA.height || 50, SA = (QA * 5e-4 * X + gA * 0.2) % 1;
8260
+ kA -= SA * aA * oA, DA += Math.sin(QA * 2e-3 + gA) * 5 * oA, H = 1 - SA;
8261
+ } else if (z.type === Z.TextVariable) {
8262
+ const X = AA.speed || 1, aA = AA.intensity || 1.5, SA = (Math.sin(QA * 4e-3 * X + gA * 0.3) + 1) / 2;
8263
+ CA *= 1 + SA * (aA - 1) * oA;
8264
+ } else if (z.type === Z.TextZing) {
8265
+ const X = AA.speed || 2, aA = AA.distance || 100, SA = (QA * 2e-3 * X + gA * 0.05) % 1;
8266
+ DA += (1 - SA) * aA * oA, H = SA;
8267
+ } else if (z.type === Z.TextElastic) {
8268
+ const X = AA.stiffness || 0.2, aA = AA.damping || 0.1, SA = Math.sin(QA * 0.01) * Math.exp(-QA * 1e-3 * aA);
8269
+ F *= 1 + SA * X * oA;
8270
+ } else if (z.type === Z.TextGlitch3D) {
8271
+ const X = AA.intensity || 5;
8272
+ Math.random() < 0.2 && (DA += (Math.random() - 0.5) * X, kA += (Math.random() - 0.5) * X, H = 0.8);
8273
+ } else if (z.type === Z.GlitchText) {
8274
+ const X = AA.intensity || 5;
8275
+ Math.random() < 0.1 && (DA += (Math.random() - 0.5) * X, kA += (Math.random() - 0.5) * X, Math.random() < 0.05 && (H = 0.5));
8275
8276
  }
8276
- }), q <= 0) {
8277
- U += A.measureText(aA).width + e;
8277
+ }), H <= 0) {
8278
+ R += A.measureText(GA).width + e;
8278
8279
  continue;
8279
8280
  }
8280
8281
  if (C.enableSegments === !0 && ((NA = C.segments) == null ? void 0 : NA.length) > 0) {
8281
- let _ = 0, $ = null;
8282
+ let z = 0, AA = null;
8282
8283
  for (const oA of C.segments) {
8283
- if (gA < _ + (oA.text || "").length) {
8284
- $ = oA;
8284
+ if (gA < z + (oA.text || "").length) {
8285
+ AA = oA;
8285
8286
  break;
8286
8287
  }
8287
- _ += (oA.text || "").length;
8288
+ z += (oA.text || "").length;
8288
8289
  }
8289
- if ($) {
8290
- let oA = $.fontFamily || C.fontFamily || "Inter";
8290
+ if (AA) {
8291
+ let oA = AA.fontFamily || C.fontFamily || "Inter";
8291
8292
  y.forEach((QA) => {
8292
8293
  const X = new RegExp(`[\\s-]${QA}$`, "i");
8293
8294
  X.test(oA) && (oA = oA.replace(X, "").trim());
8294
- }), A.font = `${G} ${this.mapFontWeight(($.fontWeight || C.fontWeight || "400").toString())} ${$.fontSize || K}px "${oA}", sans-serif`;
8295
+ }), A.font = `${G} ${this.mapFontWeight((AA.fontWeight || C.fontWeight || "400").toString())} ${AA.fontSize || K}px "${oA}", sans-serif`;
8295
8296
  }
8296
8297
  }
8297
- const JA = A.globalAlpha;
8298
- A.globalAlpha *= q, A.save();
8298
+ const RA = A.globalAlpha;
8299
+ A.globalAlpha *= H, A.save();
8299
8300
  const BA = A.measureText(iA).width;
8300
- if (A.translate(U + tA + BA / 2, b + yA), T !== 0 && A.rotate(T), A.scale(CA, F), w || o) {
8301
- const _ = o ? "#000000" : this.createCanvasFill(A, g.fill, E, i);
8302
- A.fillStyle = _ || g.fill.color || "#ffffff", A.fillText(iA, -BA / 2, 0);
8303
- } else AA ? A.strokeText(iA, -BA / 2, 0) : A.fillText(iA, -BA / 2, 0);
8304
- A.restore(), A.globalAlpha = JA, C.enableSegments === !0 && ((f = C.segments) == null ? void 0 : f.length) > 0 && (A.font = `${G} ${this.mapFontWeight((C.fontWeight || "400").toString())} ${K}px "${C.fontFamily || "Inter"}", sans-serif`), U += A.measureText(aA).width + e;
8301
+ if (A.translate(R + DA + BA / 2, f + kA), b !== 0 && A.rotate(b), A.scale(CA, F), w || o) {
8302
+ const z = o ? "#000000" : this.createCanvasFill(A, g.fill, E, i);
8303
+ A.fillStyle = z || g.fill.color || "#ffffff", A.fillText(iA, -BA / 2, 0);
8304
+ } else $ ? A.strokeText(iA, -BA / 2, 0) : A.fillText(iA, -BA / 2, 0);
8305
+ A.restore(), A.globalAlpha = RA, C.enableSegments === !0 && ((u = C.segments) == null ? void 0 : u.length) > 0 && (A.font = `${G} ${this.mapFontWeight((C.fontWeight || "400").toString())} ${K}px "${C.fontFamily || "Inter"}", sans-serif`), R += A.measureText(GA).width + e;
8305
8306
  }
8306
8307
  }
8307
8308
  };
8308
8309
  if (w) {
8309
- let R = 0, m = Z;
8310
- (EA || []).forEach((b) => {
8311
- let AA = -E / 2;
8312
- M === "center" ? AA = 0 : M === "right" && (AA = E / 2), p(b.text, AA, m, !1, R), R += (b.text || "").length + 1, m += j;
8310
+ let U = 0, _ = x;
8311
+ (EA || []).forEach((f) => {
8312
+ let $ = -E / 2;
8313
+ M === "center" ? $ = 0 : M === "right" && ($ = E / 2), d(f.text, $, _, !1, U), U += (f.text || "").length + 1, _ += j;
8313
8314
  });
8314
8315
  } else if (o) {
8315
- let R = 0, m = Z;
8316
- (EA || []).forEach((b) => {
8317
- let AA = -E / 2;
8318
- M === "center" ? AA = 0 : M === "right" && (AA = E / 2), p(b.text, AA, m, !1, R), R += (b.text || "").length + 1, m += j;
8316
+ let U = 0, _ = x;
8317
+ (EA || []).forEach((f) => {
8318
+ let $ = -E / 2;
8319
+ M === "center" ? $ = 0 : M === "right" && ($ = E / 2), d(f.text, $, _, !1, U), U += (f.text || "").length + 1, _ += j;
8319
8320
  });
8320
8321
  } else {
8321
8322
  if (g.fill) {
8322
- const R = A.globalAlpha, m = this.createCanvasFill(A, g.fill, E, i);
8323
- A.fillStyle = m || g.fill.color || "#000000", A.globalAlpha = R * this.normalizeOpacity(g.fill.opacity ?? 100);
8324
- let b = 0, AA = Z;
8325
- (EA || []).forEach((sA) => {
8326
- let kA = Math.round(-E / 2);
8327
- M === "center" ? kA = 0 : M === "right" && (kA = Math.round(E / 2)), p(sA.text, kA, AA, !1, b), b += (sA.text || "").length + 1, AA += j;
8328
- }), A.globalAlpha = R;
8323
+ const U = A.globalAlpha, _ = this.createCanvasFill(A, g.fill, E, i);
8324
+ A.fillStyle = _ || g.fill.color || "#000000", A.globalAlpha = U * this.normalizeOpacity(g.fill.opacity ?? 100);
8325
+ let f = 0, $ = x;
8326
+ (EA || []).forEach((hA) => {
8327
+ let KA = Math.round(-E / 2);
8328
+ M === "center" ? KA = 0 : M === "right" && (KA = Math.round(E / 2)), d(hA.text, KA, $, !1, f), f += (hA.text || "").length + 1, $ += j;
8329
+ }), A.globalAlpha = U;
8329
8330
  }
8330
8331
  if (g.stroke && g.stroke.width > 0) {
8331
- const R = A.globalAlpha;
8332
- A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = R * this.normalizeOpacity(g.stroke.opacity ?? 100);
8333
- let m = 0, b = Z;
8334
- (EA || []).forEach((AA) => {
8335
- let sA = Math.round(-E / 2);
8336
- M === "center" ? sA = 0 : M === "right" && (sA = Math.round(E / 2)), p(AA.text, sA, b, !0, m), m += (AA.text || "").length + 1, b += j;
8337
- }), A.globalAlpha = R;
8332
+ const U = A.globalAlpha;
8333
+ A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = U * this.normalizeOpacity(g.stroke.opacity ?? 100);
8334
+ let _ = 0, f = x;
8335
+ (EA || []).forEach(($) => {
8336
+ let hA = Math.round(-E / 2);
8337
+ M === "center" ? hA = 0 : M === "right" && (hA = Math.round(E / 2)), d($.text, hA, f, !0, _), _ += ($.text || "").length + 1, f += j;
8338
+ }), A.globalAlpha = U;
8338
8339
  }
8339
8340
  }
8340
8341
  }
@@ -8562,128 +8563,130 @@ class Ei {
8562
8563
  }
8563
8564
  }
8564
8565
  renderInputBox(A, I) {
8565
- var kA, qA;
8566
- const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((kA = I.geometry) == null ? void 0 : kA.width) || 250, E = ((qA = I.geometry) == null ? void 0 : qA.height) || 45, i = this.focusedId === I.id, w = this.lastHoveredObjectId === I.id, o = g.previewState || "default", s = o !== "default" ? o : i ? "focused" : w ? "hovered" : "default", h = g.label || { visible: !0, text: "Label" }, a = g.helperText || { visible: !1, text: "Helper text" }, G = g.leftIcon || { visible: !1 }, t = g.rightIcon || { visible: !1 }, K = g.multiline === !0, S = g.corner_radius ?? 8, y = g.corners || { tl: S, tr: S, bl: S, br: S }, N = [y.tl, y.tr, y.br, y.bl];
8566
+ var KA, FA;
8567
+ const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.options) || I.options || {}, Q = ((KA = I.geometry) == null ? void 0 : KA.width) || 250, E = ((FA = I.geometry) == null ? void 0 : FA.height) || 45, i = this.focusedId === I.id, w = this.lastHoveredObjectId === I.id, o = g.previewState || "default", s = o !== "default" ? o : i ? "focused" : w ? "hovered" : "default", h = g.label || { visible: !0, text: "Label" }, a = g.helperText || { visible: !1, text: "Helper text" }, G = g.leftIcon || { visible: !1 }, t = g.rightIcon || { visible: !1 }, K = g.multiline === !0, S = g.corner_radius ?? 8, y = g.corners || { tl: S, tr: S, bl: S, br: S }, N = [y.tl, y.tr, y.br, y.bl];
8567
8568
  let M = g.backgroundColor || "rgba(31, 41, 55, 1)", e = g.borderColor || "rgba(55, 65, 81, 1)", Y = g.borderWidth ?? 1.5, j = g.color || "#ffffff", l = g.placeholderColor || "rgba(156, 163, 175, 1)", r = g.fontSize || 14;
8568
8569
  const v = `${s}Style`, n = g[v];
8569
8570
  if (n ? (n.backgroundColor !== void 0 && (M = n.backgroundColor), n.borderColor !== void 0 && (e = n.borderColor), n.borderWidth !== void 0 && (Y = n.borderWidth), n.color !== void 0 && (j = n.color), n.placeholderColor !== void 0 && (l = n.placeholderColor), n.fontSize !== void 0 && (r = n.fontSize)) : s === "focused" ? (e = g.focusBorderColor || "rgba(59, 130, 246, 1)", Y = Math.max(Y, 2)) : s === "hovered" || s === "hover" ? (e = g.hoverBorderColor || e, M = g.hoverBackgroundColor || M) : s === "disabled" ? (M = g.disabledBackgroundColor || "rgba(31, 41, 55, 0.6)", e = g.disabledBorderColor || "rgba(55, 65, 81, 0.4)") : s === "error" && (e = "rgba(239, 68, 68, 1)", Y = Math.max(Y, 2)), A.beginPath(), this.drawRoundRect(A, -Q / 2, -E / 2, Q, E, N), A.fillStyle = M, A.fill(), Y > 0 && (A.strokeStyle = e, A.lineWidth = Y, A.stroke(), s === "focused" || s === "focus")) {
8570
8571
  A.save(), A.beginPath();
8571
- const NA = N.map((f) => f + 2);
8572
+ const NA = N.map((u) => u + 2);
8572
8573
  this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4, NA), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore();
8573
8574
  }
8574
- const L = (NA, f) => {
8575
+ const q = (NA, u) => {
8575
8576
  if (!NA.visible || !NA.svgPath) return;
8576
- const W = NA.size || 14, H = NA.offset ?? 16, U = NA.color || "#ffffff", x = f ? -(Q / 2) + H : Q / 2 - H, V = NA.svgPath;
8577
- if (A.save(), A.translate(x, 0), !V.startsWith("<svg")) {
8578
- const aA = new Path2D(V), gA = W / 24;
8579
- A.scale(gA, gA), A.translate(-12, -12), A.fillStyle = U, A.fill(aA);
8577
+ const O = NA.size || 14, L = NA.offset ?? 16, R = NA.color || "#ffffff", m = u ? -(Q / 2) + L : Q / 2 - L, W = NA.svgPath;
8578
+ if (A.save(), A.translate(m, 0), !W.startsWith("<svg")) {
8579
+ const GA = new Path2D(W), gA = O / 24;
8580
+ A.scale(gA, gA), A.translate(-12, -12), A.fillStyle = R, A.fill(GA);
8580
8581
  }
8581
8582
  A.restore();
8582
8583
  };
8583
- L(G, !0), L(t, !1);
8584
- const P = g.text || "", wA = g.placeholder || "Enter text...", EA = !P, u = P || wA, z = EA ? l : j, IA = r, Z = g.fontFamily || "Inter", p = g.fontWeight || 400;
8585
- A.font = `${p} ${IA}px "${Z}", sans-serif`, A.fillStyle = z, A.textAlign = "left", A.textBaseline = K ? "top" : "middle";
8586
- const d = g.inputPadding ?? 16, R = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : d, m = t.visible ? (t.offset ?? 16) + (t.size || 14) / 2 + 8 : d, b = -(Q / 2) + R, AA = Q - R - m, sA = g.inputType === "password" ? "•".repeat(u.length) : u;
8587
- if (A.save(), A.beginPath(), A.rect(b - 2, -E / 2 + 4, AA + 4, E - 8), A.clip(), K) {
8588
- const NA = sA.split(`
8584
+ q(G, !0), q(t, !1);
8585
+ const P = g.text || "", sA = g.placeholder || "Enter text...", EA = !P, T = P || sA, V = EA ? l : j, IA = r, x = g.fontFamily || "Inter", d = g.fontWeight || 400;
8586
+ A.font = `${d} ${IA}px "${x}", sans-serif`, A.fillStyle = V, A.textAlign = "left", A.textBaseline = K ? "top" : "middle";
8587
+ const p = g.inputPadding ?? 16, U = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : p, _ = t.visible ? (t.offset ?? 16) + (t.size || 14) / 2 + 8 : p, f = -(Q / 2) + U, $ = Q - U - _, hA = g.inputType === "password" ? "•".repeat(T.length) : T;
8588
+ if (A.save(), A.beginPath(), A.rect(f - 2, -E / 2 + 4, $ + 4, E - 8), A.clip(), K) {
8589
+ const NA = hA.split(`
8589
8590
  `);
8590
- let f = -E / 2 + d;
8591
- const W = IA * 1.2;
8592
- let H = 0;
8593
- NA.forEach((U, x) => {
8594
- const V = U.split(" ");
8595
- let aA = "";
8596
- for (let gA = 0; gA < V.length; gA++) {
8597
- const tA = aA + V[gA] + " ";
8598
- A.measureText(tA).width > AA && gA > 0 ? (A.fillText(aA, b, f), aA = V[gA] + " ", f += W) : aA = tA;
8591
+ let u = -E / 2 + p;
8592
+ const O = IA * 1.2;
8593
+ let L = 0;
8594
+ NA.forEach((R, m) => {
8595
+ const W = R.split(" ");
8596
+ let GA = "";
8597
+ for (let gA = 0; gA < W.length; gA++) {
8598
+ const DA = GA + W[gA] + " ";
8599
+ A.measureText(DA).width > $ && gA > 0 ? (A.fillText(GA, f, u), GA = W[gA] + " ", u += O) : GA = DA;
8599
8600
  }
8600
- A.fillText(aA, b, f), H = A.measureText(aA).width, x < NA.length - 1 && (f += W, H = 0);
8601
- }), i && !EA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(b + H, f, 1.5, IA);
8601
+ A.fillText(GA, f, u), L = A.measureText(GA).width, m < NA.length - 1 && (u += O, L = 0);
8602
+ }), i && !EA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(f + L, u, 1.5, IA);
8602
8603
  } else {
8603
- const f = A.measureText(sA).width;
8604
- let W = 0;
8605
- if (f > AA && (W = f - AA), A.fillText(sA, b - W, 0), i && !EA && Math.floor(performance.now() / 500) % 2 === 0) {
8606
- const U = b + f - W;
8607
- A.fillRect(U, -(IA / 2), 1.5, IA);
8604
+ const u = A.measureText(hA).width;
8605
+ let O = 0;
8606
+ if (u > $ && (O = u - $), A.fillText(hA, f - O, 0), i && !EA && Math.floor(performance.now() / 500) % 2 === 0) {
8607
+ const R = f + u - O;
8608
+ A.fillRect(R, -(IA / 2), 1.5, IA);
8608
8609
  }
8609
8610
  }
8610
8611
  if (A.restore(), h.visible !== !1) {
8611
- const NA = h.text || "Label", f = h.fontSize || 12, W = h.color || "rgba(156, 163, 175, 1)", H = h.offset ?? 8;
8612
- A.font = `600 ${f}px "${Z}", sans-serif`, A.fillStyle = W, A.textAlign = "left", A.textBaseline = "bottom";
8613
- const U = -(Q / 2), x = -(E / 2) - H;
8614
- A.fillText(NA, U, x);
8612
+ const NA = h.text || "Label", u = h.fontSize || 12, O = h.color || "rgba(156, 163, 175, 1)", L = h.offset ?? 8;
8613
+ A.font = `600 ${u}px "${x}", sans-serif`, A.fillStyle = O, A.textAlign = "left", A.textBaseline = "bottom";
8614
+ const R = -(Q / 2), m = -(E / 2) - L;
8615
+ A.fillText(NA, R, m);
8615
8616
  }
8616
8617
  if (a.visible === !0) {
8617
- const NA = a.text || "Helper text", f = a.fontSize || 11, W = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", H = a.offset ?? 6;
8618
- A.font = `400 ${f}px "${Z}", sans-serif`, A.fillStyle = W, A.textAlign = "left", A.textBaseline = "top";
8619
- const U = -(Q / 2), x = E / 2 + H;
8620
- A.fillText(NA, U, x);
8618
+ const NA = a.text || "Helper text", u = a.fontSize || 11, O = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", L = a.offset ?? 6;
8619
+ A.font = `400 ${u}px "${x}", sans-serif`, A.fillStyle = O, A.textAlign = "left", A.textBaseline = "top";
8620
+ const R = -(Q / 2), m = E / 2 + L;
8621
+ A.fillText(NA, R, m);
8621
8622
  }
8622
8623
  }
8623
8624
  renderSlider(A, I) {
8624
- const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.geometry) || I.geometry, Q = (C == null ? void 0 : C.options) || I.options || {}, E = g.width || 200, i = Q.value ?? 50, w = Q.min ?? 0, s = (Q.max ?? 100) - w, h = s === 0 ? 0 : (i - w) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, t = Q.trackShape ?? "Rectangle", K = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", N = Q.thumbShape || "Ellipse", M = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, Y = Q.thumbRoundedness ?? 0, j = Q.thumbColor || "#ffffff", l = Q.thumbPath || "", r = Q.thumbIcon || "", v = Q.showValueTooltip ?? !1, n = Q.tooltipBgColor || "#333333", L = Q.tooltipColor || "#ffffff", P = Q.tooltipOffsetX ?? 0, wA = Q.tooltipOffsetY ?? -25, EA = (R, m, b, AA, sA, kA, qA) => {
8625
- if ((R === "Custom" || R === "Icon") && qA)
8625
+ const C = this.objectStates.get(I.id), g = (C == null ? void 0 : C.geometry) || I.geometry, Q = (C == null ? void 0 : C.options) || I.options || {}, E = g.width || 200, i = Q.value ?? 50, w = Q.min ?? 0, s = (Q.max ?? 100) - w, h = s === 0 ? 0 : (i - w) / s, a = Q.trackHeight || 4, G = Q.trackRoundedness ?? 2, t = Q.trackShape ?? "Rectangle", K = Q.trackPath || "", S = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", N = Q.thumbShape || "Ellipse", M = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, Y = Q.thumbRoundedness ?? 0, j = Q.thumbColor || "#ffffff", l = Q.thumbPath || "", r = Q.thumbIcon || "", v = Q.showValueTooltip ?? !1, n = Q.tooltipBgColor || "#333333", q = Q.tooltipColor || "#ffffff", P = Q.tooltipOffsetX ?? 0, sA = Q.tooltipOffsetY ?? -25, EA = (f, $, hA, KA, FA, NA, u) => {
8626
+ if ((f === "Custom" || f === "Icon") && u)
8626
8627
  try {
8627
- const NA = new Path2D(qA);
8628
- if (A.save(), A.translate(m, b), R === "Icon") {
8629
- const f = Math.min(AA, sA) / 24;
8630
- A.scale(f, f), A.translate(-12, -12);
8628
+ const O = new Path2D(u);
8629
+ if (A.save(), A.translate($, hA), f === "Icon") {
8630
+ const L = Math.min(KA, FA) / 24;
8631
+ A.scale(L, L), A.translate(-12, -12);
8631
8632
  }
8632
- A.fill(NA), A.restore();
8633
+ A.fill(O), A.restore();
8633
8634
  return;
8634
- } catch (NA) {
8635
- console.error("Error drawing slider shape in engine:", NA);
8635
+ } catch (O) {
8636
+ console.error("Error drawing slider shape in engine:", O);
8636
8637
  }
8637
- if (A.beginPath(), R === "Ellipse")
8638
- A.ellipse(m, b, AA / 2, sA / 2, 0, 0, Math.PI * 2);
8639
- else if (R === "Rectangle")
8640
- this.drawRoundRect(A, m - AA / 2, b - sA / 2, AA, sA, kA);
8641
- else if (R === "Triangle")
8642
- A.moveTo(m, b - sA / 2), A.lineTo(m + AA / 2, b + sA / 2), A.lineTo(m - AA / 2, b + sA / 2), A.closePath();
8643
- else if (R === "Diamond")
8644
- A.moveTo(m, b - sA / 2), A.lineTo(m + AA / 2, b), A.lineTo(m, b + sA / 2), A.lineTo(m - AA / 2, b), A.closePath();
8645
- else if (R === "Polygon") {
8646
- const NA = I.geometry.sides || 3, f = I.geometry.radius || Math.min(AA, sA) / 2;
8647
- for (let W = 0; W < NA; W++) {
8648
- const H = W * 2 * Math.PI / NA - Math.PI / 2, U = m + f * Math.cos(H), x = b + f * Math.sin(H);
8649
- W === 0 ? A.moveTo(U, x) : A.lineTo(U, x);
8638
+ if (A.beginPath(), f === "Ellipse")
8639
+ A.ellipse($, hA, KA / 2, FA / 2, 0, 0, Math.PI * 2);
8640
+ else if (f === "Rectangle")
8641
+ this.drawRoundRect(A, $ - KA / 2, hA - FA / 2, KA, FA, NA);
8642
+ else if (f === "Triangle")
8643
+ A.moveTo($, hA - FA / 2), A.lineTo($ + KA / 2, hA + FA / 2), A.lineTo($ - KA / 2, hA + FA / 2), A.closePath();
8644
+ else if (f === "Diamond")
8645
+ A.moveTo($, hA - FA / 2), A.lineTo($ + KA / 2, hA), A.lineTo($, hA + FA / 2), A.lineTo($ - KA / 2, hA), A.closePath();
8646
+ else if (f === "Polygon") {
8647
+ const O = I.geometry.sides || 3, L = I.geometry.radius || Math.min(KA, FA) / 2;
8648
+ for (let R = 0; R < O; R++) {
8649
+ const m = R * 2 * Math.PI / O - Math.PI / 2, W = $ + L * Math.cos(m), GA = hA + L * Math.sin(m);
8650
+ R === 0 ? A.moveTo(W, GA) : A.lineTo(W, GA);
8650
8651
  }
8651
8652
  A.closePath();
8652
- } else if (R === "Star") {
8653
- const f = Math.min(AA, sA) / 2, W = f / 2;
8654
- for (let H = 0; H < 5 * 2; H++) {
8655
- const U = H % 2 === 0 ? f : W, x = H * Math.PI / 5 - Math.PI / 2;
8656
- A.lineTo(m + U * Math.cos(x), b + U * Math.sin(x));
8653
+ } else if (f === "Star") {
8654
+ const L = Math.min(KA, FA) / 2, R = L / 2;
8655
+ for (let m = 0; m < 5 * 2; m++) {
8656
+ const W = m % 2 === 0 ? L : R, GA = m * Math.PI / 5 - Math.PI / 2;
8657
+ A.lineTo($ + W * Math.cos(GA), hA + W * Math.sin(GA));
8657
8658
  }
8658
8659
  A.closePath();
8659
- } else R === "Line" && (A.moveTo(m - AA / 2, b), A.lineTo(m + AA / 2, b));
8660
+ } else f === "Line" && (A.moveTo($ - KA / 2, hA), A.lineTo($ + KA / 2, hA));
8660
8661
  A.fill();
8661
8662
  };
8662
8663
  A.fillStyle = y, t === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) : EA(t, 0, 0, E, a, G, K);
8663
- const u = E - M, z = -E / 2 + M / 2 + h * u, IA = z - -E / 2;
8664
- if (IA > 0 && (A.fillStyle = S, t === "Line" ? (A.strokeStyle = S, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(z, 0), A.stroke()) : t === "Rectangle" && (A.beginPath(), this.drawRoundRect(A, -E / 2, -a / 2, IA, a, G), A.fill())), A.save(), A.translate(z, 0), A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4, A.shadowOffsetY = 1, A.fillStyle = j, EA(N, 0, 0, M, e, Y, N === "Icon" ? r : l), A.restore(), v) {
8665
- A.save(), A.translate(z + P, wA);
8666
- const R = Math.round(i).toString();
8664
+ const T = E - M, V = -E / 2 + M / 2 + h * T, IA = V - -E / 2;
8665
+ IA > 0 && (A.fillStyle = S, t === "Line" ? (A.strokeStyle = S, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(V, 0), A.stroke()) : t === "Rectangle" && (A.beginPath(), this.drawRoundRect(A, -E / 2, -a / 2, IA, a, G), A.fill())), A.save(), A.translate(V, 0);
8666
+ const x = A.getTransform(), d = Math.sqrt(x.a * x.a + x.b * x.b) || 1;
8667
+ if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * d, A.shadowOffsetY = 1 * d, A.fillStyle = j, EA(N, 0, 0, M, e, Y, N === "Icon" ? r : l), A.restore(), v) {
8668
+ A.save(), A.translate(V + P, sA);
8669
+ const f = Math.round(i).toString();
8667
8670
  A.font = "10px Inter, sans-serif";
8668
- const m = A.measureText(R), b = 6, AA = 4, sA = m.width + b * 2, kA = 14 + AA;
8669
- A.beginPath(), this.drawRoundRect(A, -sA / 2, -kA / 2, sA, kA, 4), A.fillStyle = n, A.fill(), A.fillStyle = L, A.textAlign = "center", A.textBaseline = "middle", A.fillText(R, 0, 0), A.restore();
8671
+ const $ = A.measureText(f), hA = 6, KA = 4, FA = $.width + hA * 2, NA = 14 + KA;
8672
+ A.beginPath(), this.drawRoundRect(A, -FA / 2, -NA / 2, FA, NA, 4), A.fillStyle = n, A.fill(), A.fillStyle = q, A.textAlign = "center", A.textBaseline = "middle", A.fillText(f, 0, 0), A.restore();
8670
8673
  }
8671
- const Z = Q.label || {}, p = Q.helperText || {}, d = Q.fontFamily || "Inter";
8672
- if (Z.visible !== !1) {
8673
- const R = Z.text || "Label", m = Z.fontSize || 12, b = Z.color || "rgba(156, 163, 175, 1)", AA = Z.offset ?? 8;
8674
- A.font = `600 ${m}px "${d}", sans-serif`, A.fillStyle = b, A.textAlign = "left", A.textBaseline = "bottom";
8675
- const sA = -(E / 2), kA = -(a / 2) - AA;
8676
- A.fillText(R, sA, kA);
8674
+ const p = Q.label || {}, U = Q.helperText || {}, _ = Q.fontFamily || "Inter";
8675
+ if (p.visible !== !1) {
8676
+ const f = p.text || "Label", $ = p.fontSize || 12, hA = p.color || "rgba(156, 163, 175, 1)", KA = p.offset ?? 8;
8677
+ A.font = `600 ${$}px "${_}", sans-serif`, A.fillStyle = hA, A.textAlign = "left", A.textBaseline = "bottom";
8678
+ const FA = -(E / 2), NA = -(a / 2) - KA;
8679
+ A.fillText(f, FA, NA);
8677
8680
  }
8678
- if (p.visible === !0) {
8679
- const R = p.text || "Helper text", m = p.fontSize || 11, b = p.color || "rgba(156, 163, 175, 1)", AA = p.offset ?? 6;
8680
- A.font = `400 ${m}px "${d}", sans-serif`, A.fillStyle = b, A.textAlign = "left", A.textBaseline = "top";
8681
- const sA = -(E / 2), kA = a / 2 + AA;
8682
- A.fillText(R, sA, kA);
8681
+ if (U.visible === !0) {
8682
+ const f = U.text || "Helper text", $ = U.fontSize || 11, hA = U.color || "rgba(156, 163, 175, 1)", KA = U.offset ?? 6;
8683
+ A.font = `400 ${$}px "${_}", sans-serif`, A.fillStyle = hA, A.textAlign = "left", A.textBaseline = "top";
8684
+ const FA = -(E / 2), NA = a / 2 + KA;
8685
+ A.fillText(f, FA, NA);
8683
8686
  }
8684
8687
  }
8685
8688
  renderDropdown(A, I) {
8686
- var wA;
8689
+ var sA;
8687
8690
  const C = this.objectStates.get(I.id);
8688
8691
  if (!C) return;
8689
8692
  const g = C.options || I.options || {}, Q = I.geometry.width || 160, E = I.geometry.height || 40, i = -Q / 2, w = -E / 2, o = g.corner_radius ?? 6, s = g.disabled || g.previewState === "disabled", h = this.lastHoveredObjectId === I.id || g.previewState === "hover", a = (g.isOpen || g.previewState === "active") && !s;
@@ -8697,16 +8700,16 @@ class Ei {
8697
8700
  if (M !== "none") {
8698
8701
  const EA = i + Q - N - e / 2;
8699
8702
  A.save(), A.translate(EA, 0);
8700
- const u = a ? g.openIconAngle ?? 180 : g.closedIconAngle ?? 0;
8701
- if (A.rotate(u * Math.PI / 180), A.strokeStyle = Y, A.fillStyle = Y, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", M === "chevron")
8703
+ const T = a ? g.openIconAngle ?? 180 : g.closedIconAngle ?? 0;
8704
+ if (A.rotate(T * Math.PI / 180), A.strokeStyle = Y, A.fillStyle = Y, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", M === "chevron")
8702
8705
  A.beginPath(), A.moveTo(-e / 2, -e * 0.2), A.lineTo(0, e * 0.2), A.lineTo(e / 2, -e * 0.2), A.stroke();
8703
8706
  else if (M === "custom" || M === "path") {
8704
- const z = a && g.openIconPath || g.closedIconPath;
8705
- if (z) {
8706
- const IA = new Path2D(z);
8707
+ const V = a && g.openIconPath || g.closedIconPath;
8708
+ if (V) {
8709
+ const IA = new Path2D(V);
8707
8710
  A.save();
8708
- const Z = e / 24;
8709
- A.scale(Z, Z), A.translate(-12, -12), A.fill(IA), A.restore();
8711
+ const x = e / 24;
8712
+ A.scale(x, x), A.translate(-12, -12), A.fill(IA), A.restore();
8710
8713
  }
8711
8714
  }
8712
8715
  A.restore();
@@ -8715,24 +8718,24 @@ class Ei {
8715
8718
  A.font = `${r} ${l}px ${v}`;
8716
8719
  const n = s ? g.disabledColor || "#9ca3af" : !g.selectedOption && g.placeholder ? "#9ca3af" : K;
8717
8720
  A.fillStyle = this.createCanvasFill(A, typeof n == "string" ? { type: "Solid", color: n } : n, Q, E) || "#333333", A.textAlign = "left", A.textBaseline = "middle";
8718
- const L = M === "none" ? 0 : e + 8, P = Q - N * 2 - L;
8721
+ const q = M === "none" ? 0 : e + 8, P = Q - N * 2 - q;
8719
8722
  if (A.save(), A.beginPath(), A.rect(i + N, w, P, E), A.clip(), A.fillText(j, i + N, 0), A.restore(), a && !s) {
8720
- const EA = w + E + 4, u = g.optionsList || [], z = g.itemHeight || 32, IA = g.listPadding ?? 4, Z = u.length * z + IA * 2, p = g.listCornerRadius ?? o;
8723
+ const EA = w + E + 4, T = g.optionsList || [], V = g.itemHeight || 32, IA = g.listPadding ?? 4, x = T.length * V + IA * 2, d = g.listCornerRadius ?? o;
8721
8724
  A.save();
8722
- const d = g.listShadow || {};
8723
- A.shadowColor = typeof d.color == "string" ? d.color : ((wA = d.color) == null ? void 0 : wA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = d.blur ?? 12, A.shadowOffsetY = d.offsetY ?? 6, A.beginPath(), this.drawRoundRect(A, i, EA, Q, Z, p), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, Z) || "#ffffff", A.fill();
8724
- const R = g.listBorderWidth ?? 1;
8725
- R > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: t }, Q, Z) || "#e5e7eb", A.lineWidth = R, A.stroke()), A.restore();
8726
- const m = g.itemFontSize || l, b = g.itemFontFamily || v;
8727
- A.font = `${r} ${m}px ${b}`, u.forEach((AA, sA) => {
8728
- const kA = EA + IA + sA * z;
8729
- if (AA === g.selectedOption)
8730
- A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, z) || "#f3f4f6", A.fillRect(i + R, kA, Q - R * 2, z), A.fillStyle = g.itemSelectedColor || g.activeColor || K || "#374151";
8725
+ const p = g.listShadow || {}, U = A.getTransform(), _ = Math.sqrt(U.a * U.a + U.b * U.b) || 1;
8726
+ A.shadowColor = typeof p.color == "string" ? p.color : ((sA = p.color) == null ? void 0 : sA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (p.blur ?? 12) * _, A.shadowOffsetY = (p.offsetY ?? 6) * _, A.shadowOffsetX = (p.offsetX ?? 0) * _, A.beginPath(), this.drawRoundRect(A, i, EA, Q, x, d), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, x) || "#ffffff", A.fill();
8727
+ const f = g.listBorderWidth ?? 1;
8728
+ f > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: t }, Q, x) || "#e5e7eb", A.lineWidth = f, A.stroke()), A.restore();
8729
+ const $ = g.itemFontSize || l, hA = g.itemFontFamily || v;
8730
+ A.font = `${r} ${$}px ${hA}`, T.forEach((KA, FA) => {
8731
+ const NA = EA + IA + FA * V;
8732
+ if (KA === g.selectedOption)
8733
+ A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, V) || "#f3f4f6", A.fillRect(i + f, NA, Q - f * 2, V), A.fillStyle = g.itemSelectedColor || g.activeColor || K || "#374151";
8731
8734
  else if (A.fillStyle = g.listTextColor || K || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
8732
- const NA = this._lastPointerPos.y - (EA + IA), f = Math.floor(NA / z);
8733
- sA === f && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, z) || "#f9fafb", A.fillRect(i + R, kA, Q - R * 2, z), A.fillStyle = g.itemHoverColor || K);
8735
+ const O = this._lastPointerPos.y - (EA + IA), L = Math.floor(O / V);
8736
+ FA === L && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, V) || "#f9fafb", A.fillRect(i + f, NA, Q - f * 2, V), A.fillStyle = g.itemHoverColor || K);
8734
8737
  }
8735
- A.fillText(AA, i + N, kA + z / 2);
8738
+ A.fillText(KA, i + N, NA + V / 2);
8736
8739
  });
8737
8740
  }
8738
8741
  A.globalAlpha = S;
@@ -8747,8 +8750,8 @@ class Ei {
8747
8750
  if (K.enabled && K.svgPath) {
8748
8751
  const l = K.size || 16, r = K.gap || 8, v = K.position === "left" ? -(A.measureText(G.text || "").width / 2 + l / 2 + r / 2) : A.measureText(G.text || "").width / 2 + l / 2 + r / 2;
8749
8752
  A.save(), A.translate(v, 0);
8750
- const n = new Path2D(K.svgPath), L = l / 24;
8751
- A.scale(L, L), A.translate(-12, -12), A.fillStyle = K.color || t, A.fill(n), A.restore(), N = K.position === "left" ? l / 2 + r / 2 : -(l / 2 + r / 2);
8753
+ const n = new Path2D(K.svgPath), q = l / 24;
8754
+ A.scale(q, q), A.translate(-12, -12), A.fillStyle = K.color || t, A.fill(n), A.restore(), N = K.position === "left" ? l / 2 + r / 2 : -(l / 2 + r / 2);
8752
8755
  }
8753
8756
  A.fillText(G.text || "Button", N, 0), A.restore();
8754
8757
  }
@@ -8976,48 +8979,52 @@ class Ei {
8976
8979
  A.moveTo(I + w, C), A.lineTo(I + g - o, C), A.arcTo(I + g, C, I + g, C + o, o), A.lineTo(I + g, C + Q - s), A.arcTo(I + g, C + Q, I + g - s, C + Q, s), A.lineTo(I + h, C + Q), A.arcTo(I, C + Q, I, C + Q - h, h), A.lineTo(I, C + w), A.arcTo(I, C, I + w, C, w), A.closePath();
8977
8980
  }
8978
8981
  renderListView(A, I) {
8979
- var EA, u, z, IA;
8980
- const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((EA = I.geometry) == null ? void 0 : EA.width) || 200, E = C.height !== void 0 ? C.height : ((u = I.geometry) == null ? void 0 : u.height) || 300, i = -Q / 2, w = -E / 2, o = C.corner_radius !== void 0 ? C.corner_radius : g.corner_radius ?? 0, s = g.orientation || "vertical", h = g.items || [], a = g.itemGap ?? 10, G = g.itemHeight ?? 50, t = g.itemWidth ?? 200, K = g.scrollOffset ?? 0, S = g.padding ?? 0, y = g.glassEffect !== !1, N = g.accentColor || "#3b82f6", M = g.itemTextColor || "#333333", e = g.itemBackgroundColor || "#ffffff", Y = g.hoveredIndex ?? null, j = g.activeItemIndex ?? null, l = g.glowIntensity ?? 0, r = g.glowColor || "#3b82f6", v = typeof r == "string" ? r : r.color || ((IA = (z = r.stops) == null ? void 0 : z[0]) == null ? void 0 : IA.color) || "#3b82f6", n = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
8981
- if (A.save(), A.globalAlpha *= n, l > 0 && (A.shadowColor = v, A.shadowBlur = l * 2, A.shadowOffsetX = 0, A.shadowOffsetY = 0), y) {
8982
- const Z = g.listBackgroundColor || "rgba(31, 41, 55, 0.4)", p = this.createCanvasFill(A, Z, Q, E);
8983
- A.fillStyle = p || "rgba(31, 41, 55, 0.4)", this.drawListViewRect(A, i, w, Q, E, o), A.fill();
8984
- const d = A.createLinearGradient(i, w, i + Q, w + E);
8985
- d.addColorStop(0, "rgba(255, 255, 255, 0.15)"), d.addColorStop(0.5, "rgba(255, 255, 255, 0.08)"), d.addColorStop(1, "rgba(255, 255, 255, 0.03)"), A.fillStyle = d, this.drawListViewRect(A, i, w, Q, E, o), A.fill(), A.strokeStyle = "rgba(255, 255, 255, 0.25)", A.lineWidth = 1, this.drawListViewRect(A, i, w, Q, E, o), A.stroke();
8982
+ var EA, T, V, IA;
8983
+ const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((EA = I.geometry) == null ? void 0 : EA.width) || 200, E = C.height !== void 0 ? C.height : ((T = I.geometry) == null ? void 0 : T.height) || 300, i = -Q / 2, w = -E / 2, o = C.corner_radius !== void 0 ? C.corner_radius : g.corner_radius ?? 0, s = g.orientation || "vertical", h = g.items || [], a = g.itemGap ?? 10, G = g.itemHeight ?? 50, t = g.itemWidth ?? 200, K = g.scrollOffset ?? 0, S = g.padding ?? 0, y = g.glassEffect !== !1, N = g.accentColor || "#3b82f6", M = g.itemTextColor || "#333333", e = g.itemBackgroundColor || "#ffffff", Y = g.hoveredIndex ?? null, j = g.activeItemIndex ?? null, l = g.glowIntensity ?? 0, r = g.glowColor || "#3b82f6", v = typeof r == "string" ? r : r.color || ((IA = (V = r.stops) == null ? void 0 : V[0]) == null ? void 0 : IA.color) || "#3b82f6", n = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
8984
+ if (A.save(), A.globalAlpha *= n, l > 0) {
8985
+ const x = A.getTransform(), d = Math.sqrt(x.a * x.a + x.b * x.b) || 1;
8986
+ A.shadowColor = v, A.shadowBlur = l * 2 * d, A.shadowOffsetX = 0, A.shadowOffsetY = 0;
8987
+ }
8988
+ if (y) {
8989
+ const x = g.listBackgroundColor || "rgba(31, 41, 55, 0.4)", d = this.createCanvasFill(A, x, Q, E);
8990
+ A.fillStyle = d || "rgba(31, 41, 55, 0.4)", this.drawListViewRect(A, i, w, Q, E, o), A.fill();
8991
+ const p = A.createLinearGradient(i, w, i + Q, w + E);
8992
+ p.addColorStop(0, "rgba(255, 255, 255, 0.15)"), p.addColorStop(0.5, "rgba(255, 255, 255, 0.08)"), p.addColorStop(1, "rgba(255, 255, 255, 0.03)"), A.fillStyle = p, this.drawListViewRect(A, i, w, Q, E, o), A.fill(), A.strokeStyle = "rgba(255, 255, 255, 0.25)", A.lineWidth = 1, this.drawListViewRect(A, i, w, Q, E, o), A.stroke();
8986
8993
  } else {
8987
- const Z = g.listBackgroundColor || "transparent", p = this.createCanvasFill(A, Z, Q, E);
8988
- p && (A.fillStyle = p, this.drawListViewRect(A, i, w, Q, E, o), A.fill());
8989
- const d = g.borderWidth ?? 0;
8990
- d > 0 && (A.strokeStyle = g.borderColor || "#cccccc", A.lineWidth = d, this.drawListViewRect(A, i, w, Q, E, o), A.stroke());
8994
+ const x = g.listBackgroundColor || "transparent", d = this.createCanvasFill(A, x, Q, E);
8995
+ d && (A.fillStyle = d, this.drawListViewRect(A, i, w, Q, E, o), A.fill());
8996
+ const p = g.borderWidth ?? 0;
8997
+ p > 0 && (A.strokeStyle = g.borderColor || "#cccccc", A.lineWidth = p, this.drawListViewRect(A, i, w, Q, E, o), A.stroke());
8991
8998
  }
8992
8999
  A.shadowBlur = 0, A.save(), this.drawListViewRect(A, i, w, Q, E, o), A.clip();
8993
- const L = typeof S == "number" ? S : s === "vertical" ? S[0] : S[3];
8994
- let P = (s === "vertical" ? w : i) + K + L;
8995
- if (A.textBaseline = "middle", h.forEach((Z, p) => {
8996
- const d = s === "vertical" ? Q : t, R = s === "vertical" ? G : E, m = s === "vertical" ? i : P, b = s === "vertical" ? P : w, AA = Y === p, sA = j === p;
8997
- if (sA) {
8998
- const W = this.createCanvasFill(A, N, d, R);
8999
- A.fillStyle = W || N;
9000
- const H = A.globalAlpha;
9001
- A.globalAlpha = H * 0.8, A.fillRect(m, b, d, R), A.globalAlpha = H;
9002
- } else if (AA)
9003
- A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(m, b, d, R);
9000
+ const q = typeof S == "number" ? S : s === "vertical" ? S[0] : S[3];
9001
+ let P = (s === "vertical" ? w : i) + K + q;
9002
+ if (A.textBaseline = "middle", h.forEach((x, d) => {
9003
+ const p = s === "vertical" ? Q : t, U = s === "vertical" ? G : E, _ = s === "vertical" ? i : P, f = s === "vertical" ? P : w, $ = Y === d, hA = j === d;
9004
+ if (hA) {
9005
+ const O = this.createCanvasFill(A, N, p, U);
9006
+ A.fillStyle = O || N;
9007
+ const L = A.globalAlpha;
9008
+ A.globalAlpha = L * 0.8, A.fillRect(_, f, p, U), A.globalAlpha = L;
9009
+ } else if ($)
9010
+ A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(_, f, p, U);
9004
9011
  else if (e !== "transparent") {
9005
- const W = this.createCanvasFill(A, e, d, R);
9006
- A.fillStyle = W || e, A.fillRect(m, b, d, R);
9012
+ const O = this.createCanvasFill(A, e, p, U);
9013
+ A.fillStyle = O || e, A.fillRect(_, f, p, U);
9007
9014
  }
9008
- if (sA || AA) {
9009
- const W = this.createCanvasFill(A, N, s === "vertical" ? 3 : d, s === "vertical" ? R : 3);
9010
- A.fillStyle = W || N, s === "vertical" ? A.fillRect(m, b, 3, R) : A.fillRect(m, b + R - 3, d, 3);
9015
+ if (hA || $) {
9016
+ const O = this.createCanvasFill(A, N, s === "vertical" ? 3 : p, s === "vertical" ? U : 3);
9017
+ A.fillStyle = O || N, s === "vertical" ? A.fillRect(_, f, 3, U) : A.fillRect(_, f + U - 3, p, 3);
9011
9018
  }
9012
- const kA = sA ? "#ffffff" : y ? "rgba(255, 255, 255, 0.9)" : M;
9013
- A.fillStyle = kA, A.font = sA || AA ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
9014
- const qA = typeof Z == "string" ? Z : (Z == null ? void 0 : Z.label) || `Item ${p + 1}`, NA = m + (s === "vertical" ? 16 : d / 2), f = b + R / 2;
9015
- s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(qA, NA, f), P += (s === "vertical" ? G : t) + a;
9019
+ const KA = hA ? "#ffffff" : y ? "rgba(255, 255, 255, 0.9)" : M;
9020
+ A.fillStyle = KA, A.font = hA || $ ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
9021
+ const FA = typeof x == "string" ? x : (x == null ? void 0 : x.label) || `Item ${d + 1}`, NA = _ + (s === "vertical" ? 16 : p / 2), u = f + U / 2;
9022
+ s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(FA, NA, u), P += (s === "vertical" ? G : t) + a;
9016
9023
  }), A.restore(), g.showScrollbar !== !1) {
9017
- const Z = (h.length || 0) * (s === "vertical" ? G : t) + ((h.length || 0) - 1) * a, p = s === "vertical" ? E : Q;
9018
- if (Z > p) {
9019
- const d = p / Z, R = p * d, m = -K / Z * p, b = g.scrollbarColor || "rgba(255,255,255,0.3)", AA = g.scrollbarWidth || 4;
9020
- A.fillStyle = b, s === "vertical" ? A.fillRect(i + Q - AA - 2, w + m, AA, R) : A.fillRect(i + m, w + E - AA - 2, R, AA);
9024
+ const x = (h.length || 0) * (s === "vertical" ? G : t) + ((h.length || 0) - 1) * a, d = s === "vertical" ? E : Q;
9025
+ if (x > d) {
9026
+ const p = d / x, U = d * p, _ = -K / x * d, f = g.scrollbarColor || "rgba(255,255,255,0.3)", $ = g.scrollbarWidth || 4;
9027
+ A.fillStyle = f, s === "vertical" ? A.fillRect(i + Q - $ - 2, w + _, $, U) : A.fillRect(i + _, w + E - $ - 2, U, $);
9021
9028
  }
9022
9029
  }
9023
9030
  A.restore();
@@ -9035,15 +9042,15 @@ class Ei {
9035
9042
  Q.hoveredIndex !== g && (Q.hoveredIndex = g);
9036
9043
  }
9037
9044
  getListViewItemIndexAtPointer(A, I, C) {
9038
- var L, P;
9045
+ var q, P;
9039
9046
  const g = A.options || {}, Q = this.objectStates.get(A.id) || {}, E = g.items || [];
9040
9047
  if (E.length === 0) return null;
9041
- const i = Q.width !== void 0 ? Q.width : ((L = A.geometry) == null ? void 0 : L.width) || 200, w = Q.height !== void 0 ? Q.height : ((P = A.geometry) == null ? void 0 : P.height) || 300, o = g.orientation || "vertical", s = g.itemGap ?? 10, h = g.itemHeight ?? 50, a = g.itemWidth ?? 200, G = g.scrollOffset ?? 0, t = g.padding ?? 0, K = this.getWorldTransform(A.id), S = I - K.x, y = C - K.y, N = -K.rotation * (Math.PI / 180), M = Math.cos(N), e = Math.sin(N), Y = S * M - y * e, j = S * e + y * M, l = -i / 2, r = -w / 2, v = typeof t == "number" ? t : o === "vertical" ? t[0] : t[3];
9048
+ const i = Q.width !== void 0 ? Q.width : ((q = A.geometry) == null ? void 0 : q.width) || 200, w = Q.height !== void 0 ? Q.height : ((P = A.geometry) == null ? void 0 : P.height) || 300, o = g.orientation || "vertical", s = g.itemGap ?? 10, h = g.itemHeight ?? 50, a = g.itemWidth ?? 200, G = g.scrollOffset ?? 0, t = g.padding ?? 0, K = this.getWorldTransform(A.id), S = I - K.x, y = C - K.y, N = -K.rotation * (Math.PI / 180), M = Math.cos(N), e = Math.sin(N), Y = S * M - y * e, j = S * e + y * M, l = -i / 2, r = -w / 2, v = typeof t == "number" ? t : o === "vertical" ? t[0] : t[3];
9042
9049
  let n = (o === "vertical" ? r : l) + G + v;
9043
- for (let wA = 0; wA < E.length; wA++) {
9044
- const EA = o === "vertical" ? i : a, u = o === "vertical" ? h : w, z = o === "vertical" ? l : n, IA = o === "vertical" ? n : r;
9045
- if (Y >= z && Y <= z + EA && j >= IA && j <= IA + u)
9046
- return wA;
9050
+ for (let sA = 0; sA < E.length; sA++) {
9051
+ const EA = o === "vertical" ? i : a, T = o === "vertical" ? h : w, V = o === "vertical" ? l : n, IA = o === "vertical" ? n : r;
9052
+ if (Y >= V && Y <= V + EA && j >= IA && j <= IA + T)
9053
+ return sA;
9047
9054
  n += (o === "vertical" ? h : a) + s;
9048
9055
  }
9049
9056
  return null;
@@ -9062,108 +9069,108 @@ class Ei {
9062
9069
  if (!g.behaviors || g.behaviors.length === 0) return;
9063
9070
  const Q = this.objectStates.get(g.id);
9064
9071
  Q && g.behaviors.forEach((E) => {
9065
- var a, G, t, K, S, y, N, M, e, Y, j, l, r, v, n, L, P, wA, EA, u, z, IA, Z, p, d, R, m, b, AA, sA, kA, qA, NA, f, W, H, U, x, V, aA, gA, tA, yA, CA;
9072
+ var a, G, t, K, S, y, N, M, e, Y, j, l, r, v, n, q, P, sA, EA, T, V, IA, x, d, p, U, _, f, $, hA, KA, FA, NA, u, O, L, R, m, W, GA, gA, DA, kA, CA;
9066
9073
  if (!E.enabled) return;
9067
9074
  const i = E.startTime || 0, w = E.endTime || 1 / 0;
9068
9075
  if (this.currentTime < i || this.currentTime > w) return;
9069
9076
  const o = Q.x - I, s = Q.y - C, h = Math.sqrt(o * o + s * s);
9070
- if (this.frameCount % 240 === 0 && Math.random() < 0.1 && console.log(`[ExodeUI] Executing ${E.type} on ${g.name}`), E.type === O.Proximity) {
9071
- const F = ((a = E.settings) == null ? void 0 : a.radius) || 300, T = ((G = E.settings) == null ? void 0 : G.falloff) || "smooth";
9072
- let q = 0;
9073
- h < F && (T === "linear" ? q = 1 - h / F : q = Math.pow(1 - h / F, 2)), q > 0 && E.sensors.forEach((iA) => {
9074
- this.applyBehaviorSensor(Q, iA, q, A, E.settings);
9077
+ if (this.frameCount % 240 === 0 && Math.random() < 0.1 && console.log(`[ExodeUI] Executing ${E.type} on ${g.name}`), E.type === Z.Proximity) {
9078
+ const F = ((a = E.settings) == null ? void 0 : a.radius) || 300, b = ((G = E.settings) == null ? void 0 : G.falloff) || "smooth";
9079
+ let H = 0;
9080
+ h < F && (b === "linear" ? H = 1 - h / F : H = Math.pow(1 - h / F, 2)), H > 0 && E.sensors.forEach((iA) => {
9081
+ this.applyBehaviorSensor(Q, iA, H, A, E.settings);
9075
9082
  });
9076
- } else if (E.type === O.Magnetic) {
9077
- const F = ((t = E.settings) == null ? void 0 : t.radius) || 400, T = ((K = E.settings) == null ? void 0 : K.strength) || 0.5;
9083
+ } else if (E.type === Z.Magnetic) {
9084
+ const F = ((t = E.settings) == null ? void 0 : t.radius) || 400, b = ((K = E.settings) == null ? void 0 : K.strength) || 0.5;
9078
9085
  if (h < F && h > 5) {
9079
- const q = 1 - h / F, iA = o * q * T, JA = s * q * T;
9080
- Q.x -= iA * A * 10, Q.y -= JA * A * 10;
9086
+ const H = 1 - h / F, iA = o * H * b, RA = s * H * b;
9087
+ Q.x -= iA * A * 10, Q.y -= RA * A * 10;
9081
9088
  }
9082
- } else if (E.type === O.Repel) {
9083
- const F = ((S = E.settings) == null ? void 0 : S.radius) || 300, T = ((y = E.settings) == null ? void 0 : y.strength) || 1;
9089
+ } else if (E.type === Z.Repel) {
9090
+ const F = ((S = E.settings) == null ? void 0 : S.radius) || 300, b = ((y = E.settings) == null ? void 0 : y.strength) || 1;
9084
9091
  if (h < F) {
9085
- const q = Math.pow(1 - h / F, 2);
9086
- Q.x += o / (h || 1) * q * 60 * T * A * 5, Q.y += s / (h || 1) * q * 60 * T * A * 5;
9092
+ const H = Math.pow(1 - h / F, 2);
9093
+ Q.x += o / (h || 1) * H * 60 * b * A * 5, Q.y += s / (h || 1) * H * 60 * b * A * 5;
9087
9094
  }
9088
- } else if (E.type === O.Orbit) {
9089
- const F = ((N = E.settings) == null ? void 0 : N.speed) || 1, T = ((M = E.settings) == null ? void 0 : M.radius) || 30, q = this.currentTime * F * Math.PI * 2;
9090
- Q.x += Math.cos(q) * T * A * 5, Q.y += Math.sin(q) * T * A * 5, Q.rotation += 2 * A * 5;
9091
- } else if (E.type === O.Vortex) {
9092
- const F = ((e = E.settings) == null ? void 0 : e.radius) || 400, T = ((Y = E.settings) == null ? void 0 : Y.speed) || 2, q = ((j = E.settings) == null ? void 0 : j.strength) || 1;
9095
+ } else if (E.type === Z.Orbit) {
9096
+ const F = ((N = E.settings) == null ? void 0 : N.speed) || 1, b = ((M = E.settings) == null ? void 0 : M.radius) || 30, H = this.currentTime * F * Math.PI * 2;
9097
+ Q.x += Math.cos(H) * b * A * 5, Q.y += Math.sin(H) * b * A * 5, Q.rotation += 2 * A * 5;
9098
+ } else if (E.type === Z.Vortex) {
9099
+ const F = ((e = E.settings) == null ? void 0 : e.radius) || 400, b = ((Y = E.settings) == null ? void 0 : Y.speed) || 2, H = ((j = E.settings) == null ? void 0 : j.strength) || 1;
9093
9100
  if (h < F) {
9094
- const iA = Math.pow(1 - h / F, 1.5), JA = this.currentTime * T * Math.PI * 2, BA = Math.cos(JA) * 30 - o * 0.4, _ = Math.sin(JA) * 30 - s * 0.4;
9095
- Q.x += BA * iA * q * A * 5, Q.y += _ * iA * q * A * 5, Q.rotation += 5 * iA * q * A * 5, Q.scale_x *= 1 - iA * 0.1 * q * A, Q.scale_y *= 1 - iA * 0.1 * q * A;
9101
+ const iA = Math.pow(1 - h / F, 1.5), RA = this.currentTime * b * Math.PI * 2, BA = Math.cos(RA) * 30 - o * 0.4, z = Math.sin(RA) * 30 - s * 0.4;
9102
+ Q.x += BA * iA * H * A * 5, Q.y += z * iA * H * A * 5, Q.rotation += 5 * iA * H * A * 5, Q.scale_x *= 1 - iA * 0.1 * H * A, Q.scale_y *= 1 - iA * 0.1 * H * A;
9096
9103
  }
9097
- } else if (E.type === O.Fluid) {
9098
- const F = ((l = E.settings) == null ? void 0 : l.radius) || 300, T = ((r = E.settings) == null ? void 0 : r.strength) || 1;
9104
+ } else if (E.type === Z.Fluid) {
9105
+ const F = ((l = E.settings) == null ? void 0 : l.radius) || 300, b = ((r = E.settings) == null ? void 0 : r.strength) || 1;
9099
9106
  if (h < F) {
9100
- const q = Math.pow(1 - h / F, 1.2), iA = o / (h || 1) * q * 1.2 * T, JA = s / (h || 1) * q * 1.2 * T;
9101
- Q.x += iA * 10 * A * 5, Q.y += JA * 10 * A * 5, Q.scale_x *= 1 + q * 0.3 * T * A, Q.scale_y *= 1 + q * 0.3 * T * A;
9107
+ const H = Math.pow(1 - h / F, 1.2), iA = o / (h || 1) * H * 1.2 * b, RA = s / (h || 1) * H * 1.2 * b;
9108
+ Q.x += iA * 10 * A * 5, Q.y += RA * 10 * A * 5, Q.scale_x *= 1 + H * 0.3 * b * A, Q.scale_y *= 1 + H * 0.3 * b * A;
9102
9109
  }
9103
- } else if (E.type === O.Elastic) {
9104
- const F = ((v = E.settings) == null ? void 0 : v.radius) || 300, T = ((n = E.settings) == null ? void 0 : n.strength) || 1;
9110
+ } else if (E.type === Z.Elastic) {
9111
+ const F = ((v = E.settings) == null ? void 0 : v.radius) || 300, b = ((n = E.settings) == null ? void 0 : n.strength) || 1;
9105
9112
  if (h < F) {
9106
- const q = 1 - h / F;
9107
- Q.scale_x *= 1 + q * 0.4 * T * A, Q.scale_y *= 1 + q * 0.4 * T * A;
9113
+ const H = 1 - h / F;
9114
+ Q.scale_x *= 1 + H * 0.4 * b * A, Q.scale_y *= 1 + H * 0.4 * b * A;
9108
9115
  }
9109
- } else if (E.type === O.Holographic) {
9110
- const F = Q.x - this.canvasWidth / 2, T = Q.y - this.canvasHeight / 2, q = ((L = E.settings) == null ? void 0 : L.factor) || 25;
9111
- if (Q.x -= F / 1e3 * q * A * 5, Q.y -= T / 1e3 * q * A * 5, Q.style) {
9116
+ } else if (E.type === Z.Holographic) {
9117
+ const F = Q.x - this.canvasWidth / 2, b = Q.y - this.canvasHeight / 2, H = ((q = E.settings) == null ? void 0 : q.factor) || 25;
9118
+ if (Q.x -= F / 1e3 * H * A * 5, Q.y -= b / 1e3 * H * A * 5, Q.style) {
9112
9119
  const iA = 1 - Math.min(1, h / 400);
9113
9120
  Q.style.exposure = (Q.style.exposure || 1) + iA * 0.5 * A;
9114
9121
  }
9115
- } else if (E.type === O.Sticky) {
9116
- const F = ((P = E.settings) == null ? void 0 : P.radius) || 80, T = ((wA = E.settings) == null ? void 0 : wA.strength) || 1;
9122
+ } else if (E.type === Z.Sticky) {
9123
+ const F = ((P = E.settings) == null ? void 0 : P.radius) || 80, b = ((sA = E.settings) == null ? void 0 : sA.strength) || 1;
9117
9124
  if (h < F) {
9118
- const q = Math.pow(1 - h / F, 2);
9119
- Q.x -= o * q * T * A * 10, Q.y -= s * q * T * A * 10, Q.scale_x *= 1 - q * 0.1 * T * A, Q.scale_y *= 1 - q * 0.1 * T * A;
9125
+ const H = Math.pow(1 - h / F, 2);
9126
+ Q.x -= o * H * b * A * 10, Q.y -= s * H * b * A * 10, Q.scale_x *= 1 - H * 0.1 * b * A, Q.scale_y *= 1 - H * 0.1 * b * A;
9120
9127
  }
9121
- } else if (E.type === O.Dilation) {
9122
- const F = ((EA = E.settings) == null ? void 0 : EA.size) || 120, T = ((u = E.settings) == null ? void 0 : u.strength) || 1;
9128
+ } else if (E.type === Z.Dilation) {
9129
+ const F = ((EA = E.settings) == null ? void 0 : EA.size) || 120, b = ((T = E.settings) == null ? void 0 : T.strength) || 1;
9123
9130
  if (h < F) {
9124
- const q = 1 - h / F;
9125
- Q.scale_x *= 1 + q * 0.5 * T * A, Q.scale_y *= 1 + q * 0.5 * T * A;
9131
+ const H = 1 - h / F;
9132
+ Q.scale_x *= 1 + H * 0.5 * b * A, Q.scale_y *= 1 + H * 0.5 * b * A;
9126
9133
  }
9127
- } else if (E.type === O.Parallax) {
9128
- const F = ((z = E.settings) == null ? void 0 : z.factor) || 0.05, T = this.canvasHeight / 2, q = (this._lastPointerPos.y - T) * F;
9129
- Q.y += q * A * 10;
9130
- } else if (E.type === O.Noise || E.type === O.Float) {
9131
- const F = (((IA = E.settings) == null ? void 0 : IA.frequency) || ((Z = E.settings) == null ? void 0 : Z.speed) || 1) * 2e-3, T = (((p = E.settings) == null ? void 0 : p.amplitude) || ((d = E.settings) == null ? void 0 : d.range) || 50) * (((R = E.settings) == null ? void 0 : R.strength) || 1), q = Date.now();
9132
- Q.x += Math.sin(q * F) * T * A, Q.y += Math.cos(q * F * 0.8) * T * A, Q.rotation += Math.sin(q * F * 0.5) * 5 * A;
9133
- } else if (E.type === O.Pulse) {
9134
- const F = (((m = E.settings) == null ? void 0 : m.speed) || 1) * 5e-3, T = (((b = E.settings) == null ? void 0 : b.scale) || 1.2) - 1, q = Math.sin(Date.now() * F), iA = ((AA = E.settings) == null ? void 0 : AA.strength) || 1;
9135
- Q.scale_x *= 1 + q * T * iA * A, Q.scale_y *= 1 + q * T * iA * A, Q.style && (Q.style.exposure = (Q.style.exposure || 1) + Math.max(0, q) * 0.1 * iA * A);
9136
- } else if (E.type === O.Draggable) {
9137
- const F = ((sA = E.settings) == null ? void 0 : sA.radius) || 150, T = this.draggingBehaviors.has(g.id);
9138
- if (h < F || T) {
9139
- const q = ((kA = E.settings) == null ? void 0 : kA.strength) || 1, iA = T ? 1 : Math.max(0, 1 - h / F);
9140
- this.applyBehaviorSensor(Q, TA.PositionX, iA * q, A, E.settings), this.applyBehaviorSensor(Q, TA.PositionY, iA * q, A, E.settings);
9134
+ } else if (E.type === Z.Parallax) {
9135
+ const F = ((V = E.settings) == null ? void 0 : V.factor) || 0.05, b = this.canvasHeight / 2, H = (this._lastPointerPos.y - b) * F;
9136
+ Q.y += H * A * 10;
9137
+ } else if (E.type === Z.Noise || E.type === Z.Float) {
9138
+ const F = (((IA = E.settings) == null ? void 0 : IA.frequency) || ((x = E.settings) == null ? void 0 : x.speed) || 1) * 2e-3, b = (((d = E.settings) == null ? void 0 : d.amplitude) || ((p = E.settings) == null ? void 0 : p.range) || 50) * (((U = E.settings) == null ? void 0 : U.strength) || 1), H = Date.now();
9139
+ Q.x += Math.sin(H * F) * b * A, Q.y += Math.cos(H * F * 0.8) * b * A, Q.rotation += Math.sin(H * F * 0.5) * 5 * A;
9140
+ } else if (E.type === Z.Pulse) {
9141
+ const F = (((_ = E.settings) == null ? void 0 : _.speed) || 1) * 5e-3, b = (((f = E.settings) == null ? void 0 : f.scale) || 1.2) - 1, H = Math.sin(Date.now() * F), iA = (($ = E.settings) == null ? void 0 : $.strength) || 1;
9142
+ Q.scale_x *= 1 + H * b * iA * A, Q.scale_y *= 1 + H * b * iA * A, Q.style && (Q.style.exposure = (Q.style.exposure || 1) + Math.max(0, H) * 0.1 * iA * A);
9143
+ } else if (E.type === Z.Draggable) {
9144
+ const F = ((hA = E.settings) == null ? void 0 : hA.radius) || 150, b = this.draggingBehaviors.has(g.id);
9145
+ if (h < F || b) {
9146
+ const H = ((KA = E.settings) == null ? void 0 : KA.strength) || 1, iA = b ? 1 : Math.max(0, 1 - h / F);
9147
+ this.applyBehaviorSensor(Q, TA.PositionX, iA * H, A, E.settings), this.applyBehaviorSensor(Q, TA.PositionY, iA * H, A, E.settings);
9141
9148
  }
9142
- } else if (E.type === O.Scroll) {
9143
- const F = ((qA = E.settings) == null ? void 0 : qA.axis) || "vertical", T = ((NA = E.settings) == null ? void 0 : NA.factor) || 0.5, q = ((f = E.settings) == null ? void 0 : f.strength) || 1;
9144
- (F === "vertical" || F === "both") && (Q.y += this.scrollOffset.y * T * q * A), (F === "horizontal" || F === "both") && (Q.x += this.scrollOffset.x * T * q * A);
9145
- } else if (E.type === O.LookAt) {
9146
- const F = ((W = E.settings) == null ? void 0 : W.factor) || 1, T = ((H = E.settings) == null ? void 0 : H.strength) || 1, q = Math.atan2(-s, -o) * (180 / Math.PI), iA = Q.rotation, JA = (q - iA + 180) % 360 - 180;
9147
- Q.rotation += JA * F * T * A * 10;
9148
- } else if (E.type === O.Glint || E.type === O.Scan) {
9149
- const F = (((U = E.settings) == null ? void 0 : U.speed) || 1) * 4e-3, T = ((x = E.settings) == null ? void 0 : x.strength) || 1, q = (Math.sin(Date.now() * F) + 1) / 2;
9150
- Q.style && (Q.style.exposure = (Q.style.exposure || 1) + q * T * A * 5), Q.x += (q - 0.5) * 20 * T * A;
9151
- } else if (E.type === O.Ratchet) {
9152
- const F = ((V = E.settings) == null ? void 0 : V.steps) || 12, T = (((aA = E.settings) == null ? void 0 : aA.speed) || 1) * 30, q = Math.floor(Q.rotation / (360 / F)) * (360 / F);
9153
- Q.rotation = this.lerp(Q.rotation, q + T * A, 0.1);
9154
- } else if (E.type === O.Jitter && h < 300) {
9155
- const F = ((gA = E.settings) == null ? void 0 : gA.strength) || 1, T = (((tA = E.settings) == null ? void 0 : tA.intensity) || 5) * F;
9156
- Q.x += (Math.random() - 0.5) * T * A * 60, Q.y += (Math.random() - 0.5) * T * A * 60, Q.rotation += (Math.random() - 0.5) * T * A * 120;
9157
- } else if (E.type === O.Follower) {
9158
- const F = (yA = E.settings) == null ? void 0 : yA.targetId;
9149
+ } else if (E.type === Z.Scroll) {
9150
+ const F = ((FA = E.settings) == null ? void 0 : FA.axis) || "vertical", b = ((NA = E.settings) == null ? void 0 : NA.factor) || 0.5, H = ((u = E.settings) == null ? void 0 : u.strength) || 1;
9151
+ (F === "vertical" || F === "both") && (Q.y += this.scrollOffset.y * b * H * A), (F === "horizontal" || F === "both") && (Q.x += this.scrollOffset.x * b * H * A);
9152
+ } else if (E.type === Z.LookAt) {
9153
+ const F = ((O = E.settings) == null ? void 0 : O.factor) || 1, b = ((L = E.settings) == null ? void 0 : L.strength) || 1, H = Math.atan2(-s, -o) * (180 / Math.PI), iA = Q.rotation, RA = (H - iA + 180) % 360 - 180;
9154
+ Q.rotation += RA * F * b * A * 10;
9155
+ } else if (E.type === Z.Glint || E.type === Z.Scan) {
9156
+ const F = (((R = E.settings) == null ? void 0 : R.speed) || 1) * 4e-3, b = ((m = E.settings) == null ? void 0 : m.strength) || 1, H = (Math.sin(Date.now() * F) + 1) / 2;
9157
+ Q.style && (Q.style.exposure = (Q.style.exposure || 1) + H * b * A * 5), Q.x += (H - 0.5) * 20 * b * A;
9158
+ } else if (E.type === Z.Ratchet) {
9159
+ const F = ((W = E.settings) == null ? void 0 : W.steps) || 12, b = (((GA = E.settings) == null ? void 0 : GA.speed) || 1) * 30, H = Math.floor(Q.rotation / (360 / F)) * (360 / F);
9160
+ Q.rotation = this.lerp(Q.rotation, H + b * A, 0.1);
9161
+ } else if (E.type === Z.Jitter && h < 300) {
9162
+ const F = ((gA = E.settings) == null ? void 0 : gA.strength) || 1, b = (((DA = E.settings) == null ? void 0 : DA.intensity) || 5) * F;
9163
+ Q.x += (Math.random() - 0.5) * b * A * 60, Q.y += (Math.random() - 0.5) * b * A * 60, Q.rotation += (Math.random() - 0.5) * b * A * 120;
9164
+ } else if (E.type === Z.Follower) {
9165
+ const F = (kA = E.settings) == null ? void 0 : kA.targetId;
9159
9166
  if (F) {
9160
- const T = this.objectStates.get(F);
9161
- if (T) {
9162
- const q = ((CA = E.settings) == null ? void 0 : CA.stiffness) || 0.1, iA = T.x - Q.x, JA = T.y - Q.y;
9163
- Q.x += iA * q * A * 60, Q.y += JA * q * A * 60;
9167
+ const b = this.objectStates.get(F);
9168
+ if (b) {
9169
+ const H = ((CA = E.settings) == null ? void 0 : CA.stiffness) || 0.1, iA = b.x - Q.x, RA = b.y - Q.y;
9170
+ Q.x += iA * H * A * 60, Q.y += RA * H * A * 60;
9164
9171
  }
9165
9172
  }
9166
- } else E.type === O.Wrap && (Q.x < 0 ? Q.x = this.canvasWidth : Q.x > this.canvasWidth && (Q.x = 0), Q.y < 0 ? Q.y = this.canvasHeight : Q.y > this.canvasHeight && (Q.y = 0));
9173
+ } else E.type === Z.Wrap && (Q.x < 0 ? Q.x = this.canvasWidth : Q.x > this.canvasWidth && (Q.x = 0), Q.y < 0 ? Q.y = this.canvasHeight : Q.y > this.canvasHeight && (Q.y = 0));
9167
9174
  });
9168
9175
  });
9169
9176
  }
@@ -9284,22 +9291,22 @@ const wi = XQ(
9284
9291
  v.imageSmoothingEnabled = !0, v.imageSmoothingQuality = "high", K && l.setOnLogCallback(K);
9285
9292
  const n = (P) => {
9286
9293
  e.current || (e.current = P);
9287
- const wA = (P - e.current) / 1e3;
9288
- e.current = P, g && l.advance(wA);
9289
- const EA = window.devicePixelRatio || 1, u = r.getBoundingClientRect(), z = Math.floor(u.width * EA), IA = Math.floor(u.height * EA);
9290
- (r.width !== z || r.height !== IA) && (r.width = z, r.height = IA), l.render(v, z, IA), M.current = requestAnimationFrame(n);
9294
+ const sA = (P - e.current) / 1e3;
9295
+ e.current = P, g && l.advance(sA);
9296
+ const EA = window.devicePixelRatio || 1, T = r.getBoundingClientRect(), V = Math.floor(T.width * EA), IA = Math.floor(T.height * EA);
9297
+ (r.width !== V || r.height !== IA) && (r.width = V, r.height = IA), l.render(v, V, IA), M.current = requestAnimationFrame(n);
9291
9298
  };
9292
9299
  M.current = requestAnimationFrame(n);
9293
- const L = () => {
9300
+ const q = () => {
9294
9301
  l.handleScroll(window.scrollX, window.scrollY);
9295
9302
  };
9296
- return window.addEventListener("scroll", L, { passive: !0 }), () => {
9297
- M.current && cancelAnimationFrame(M.current), window.removeEventListener("scroll", L);
9303
+ return window.addEventListener("scroll", q, { passive: !0 }), () => {
9304
+ M.current && cancelAnimationFrame(M.current), window.removeEventListener("scroll", q);
9298
9305
  };
9299
9306
  }, [g]);
9300
9307
  const j = (l, r) => {
9301
- const v = l.currentTarget.getBoundingClientRect(), n = l.clientX - v.left, L = l.clientY - v.top, P = v.width, wA = v.height;
9302
- N.current.handlePointerInput(r, n, L, P, wA);
9308
+ const v = l.currentTarget.getBoundingClientRect(), n = l.clientX - v.left, q = l.clientY - v.top, P = v.width, sA = v.height;
9309
+ N.current.handlePointerInput(r, n, q, P, sA);
9303
9310
  };
9304
9311
  return /* @__PURE__ */ jQ(
9305
9312
  "canvas",
@@ -9358,10 +9365,10 @@ function si() {
9358
9365
  updateObjectOptions: w
9359
9366
  };
9360
9367
  }
9361
- const hi = "6.0.22";
9368
+ const hi = "6.0.24";
9362
9369
  export {
9363
9370
  TA as BehaviorSensor,
9364
- O as BehaviorType,
9371
+ Z as BehaviorType,
9365
9372
  VQ as ConditionOp,
9366
9373
  wi as ExodeUICanvas,
9367
9374
  Ei as ExodeUIEngine,