exodeui 6.3.8 → 6.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +12 -12
  2. package/dist/index.mjs +249 -245
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1318,9 +1318,9 @@ function KE(B, A, I) {
1318
1318
  p(n, 0);
1319
1319
  }
1320
1320
  function p(n, j) {
1321
- const iA = Q[n], DA = E[n] ?? null;
1321
+ const iA = Q[n], oA = E[n] ?? null;
1322
1322
  for (let Z = j; Z < iA.length; Z++) {
1323
- const f = FQ(iA, DA, Z, i.preferPrefixWidthsForBreakableRuns);
1323
+ const f = FQ(iA, oA, Z, i.preferPrefixWidthsForBreakableRuns);
1324
1324
  if (!w) {
1325
1325
  c(n, Z, f);
1326
1326
  continue;
@@ -1389,24 +1389,24 @@ function yE(B, A, I) {
1389
1389
  }
1390
1390
  S += q, k = H + 1, e = 0;
1391
1391
  }
1392
- function DA(H, q) {
1392
+ function oA(H, q) {
1393
1393
  if (!sg(E[H]))
1394
1394
  return;
1395
- const X = E[H] === "tab" ? 0 : g[H], P = E[H] === "tab" ? q : Q[H];
1396
- c = H + 1, M = S - q + X, R = S - q + P, J = E[H];
1395
+ const X = E[H] === "tab" ? 0 : g[H], v = E[H] === "tab" ? q : Q[H];
1396
+ c = H + 1, M = S - q + X, R = S - q + v, J = E[H];
1397
1397
  }
1398
1398
  function Z(H) {
1399
1399
  f(H, 0);
1400
1400
  }
1401
1401
  function f(H, q) {
1402
- const X = i[H], P = o[H] ?? null;
1402
+ const X = i[H], v = o[H] ?? null;
1403
1403
  for (let d = q; d < X.length; d++) {
1404
- const v = FQ(X, P, d, a.preferPrefixWidthsForBreakableRuns);
1404
+ const P = FQ(X, v, d, a.preferPrefixWidthsForBreakableRuns);
1405
1405
  if (!K) {
1406
- j(H, d, v);
1406
+ j(H, d, P);
1407
1407
  continue;
1408
1408
  }
1409
- S + v > A + t ? (l(), j(H, d, v)) : (S += v, k = H, e = d + 1);
1409
+ S + P > A + t ? (l(), j(H, d, P)) : (S += P, k = H, e = d + 1);
1410
1410
  }
1411
1411
  K && k === H && e === X.length && (k = H + 1, e = 0);
1412
1412
  }
@@ -1416,8 +1416,8 @@ function yE(B, A, I) {
1416
1416
  const q = i[H];
1417
1417
  if (q === null)
1418
1418
  return !1;
1419
- const X = a.preferPrefixWidthsForBreakableRuns ? o[H] ?? q : q, P = X !== q, { fitCount: d, fittedWidth: v } = SE(X, S, A, t, D, P);
1420
- return d === 0 ? !1 : (S = v, k = H, e = d, p(), d === q.length ? (k = H + 1, e = 0, !0) : (l(H, d, v + D), f(H, d), !0));
1419
+ const X = a.preferPrefixWidthsForBreakableRuns ? o[H] ?? q : q, v = X !== q, { fitCount: d, fittedWidth: P } = SE(X, S, A, t, D, v);
1420
+ return d === 0 ? !1 : (S = P, k = H, e = d, p(), d === q.length ? (k = H + 1, e = 0, !0) : (l(H, d, P + D), f(H, d), !0));
1421
1421
  }
1422
1422
  function b(H) {
1423
1423
  G++, I == null || I({
@@ -1437,17 +1437,17 @@ function yE(B, A, I) {
1437
1437
  K = !1, S = 0, y = q.startSegmentIndex, N = 0, k = q.startSegmentIndex, e = 0, p();
1438
1438
  let X = q.startSegmentIndex;
1439
1439
  for (; X < q.endSegmentIndex; ) {
1440
- const P = E[X], d = P === "tab" ? GE(S, s) : C[X];
1441
- if (P === "soft-hyphen") {
1442
- K && (k = X + 1, e = 0, c = X + 1, M = S + D, R = S + D, J = P), X++;
1440
+ const v = E[X], d = v === "tab" ? GE(S, s) : C[X];
1441
+ if (v === "soft-hyphen") {
1442
+ K && (k = X + 1, e = 0, c = X + 1, M = S + D, R = S + D, J = v), X++;
1443
1443
  continue;
1444
1444
  }
1445
1445
  if (!K) {
1446
- d > A && i[X] !== null ? Z(X) : n(X, d), DA(X, d), X++;
1446
+ d > A && i[X] !== null ? Z(X) : n(X, d), oA(X, d), X++;
1447
1447
  continue;
1448
1448
  }
1449
1449
  if (S + d > A + t) {
1450
- const sA = S + (P === "tab" ? 0 : g[X]), yA = S + (P === "tab" ? d : Q[X]);
1450
+ const sA = S + (v === "tab" ? 0 : g[X]), yA = S + (v === "tab" ? d : Q[X]);
1451
1451
  if (J === "soft-hyphen" && a.preferEarlySoftHyphenBreak && M <= A + t) {
1452
1452
  l(c, 0, R);
1453
1453
  continue;
@@ -1456,7 +1456,7 @@ function yE(B, A, I) {
1456
1456
  X++;
1457
1457
  continue;
1458
1458
  }
1459
- if (sg(P) && sA <= A + t) {
1459
+ if (sg(v) && sA <= A + t) {
1460
1460
  iA(X, d), l(X + 1, 0, yA), X++;
1461
1461
  continue;
1462
1462
  }
@@ -1471,11 +1471,11 @@ function yE(B, A, I) {
1471
1471
  l();
1472
1472
  continue;
1473
1473
  }
1474
- iA(X, d), DA(X, d), X++;
1474
+ iA(X, d), oA(X, d), X++;
1475
1475
  }
1476
1476
  if (K) {
1477
- const P = c === q.consumedEndSegmentIndex ? R : S;
1478
- l(q.consumedEndSegmentIndex, 0, P);
1477
+ const v = c === q.consumedEndSegmentIndex ? R : S;
1478
+ l(q.consumedEndSegmentIndex, 0, v);
1479
1479
  }
1480
1480
  }
1481
1481
  return G;
@@ -1507,8 +1507,8 @@ function kE(B, A, I) {
1507
1507
  const s = [], w = [], a = [], t = [];
1508
1508
  let G = B.chunks.length <= 1;
1509
1509
  const S = [], K = [], y = [], N = I ? [] : null, k = Array.from({ length: B.len }), e = Array.from({ length: B.len });
1510
- function c(J, p, l, n, j, iA, DA, Z) {
1511
- j !== "text" && j !== "space" && j !== "zero-width-break" && (G = !1), s.push(p), w.push(l), a.push(n), t.push(j), S == null || S.push(iA), K.push(DA), y.push(Z), N !== null && N.push(J);
1510
+ function c(J, p, l, n, j, iA, oA, Z) {
1511
+ j !== "text" && j !== "space" && j !== "zero-width-break" && (G = !1), s.push(p), w.push(l), a.push(n), t.push(j), S == null || S.push(iA), K.push(oA), y.push(Z), N !== null && N.push(J);
1512
1512
  }
1513
1513
  for (let J = 0; J < B.len; J++) {
1514
1514
  k[J] = s.length;
@@ -1538,8 +1538,8 @@ function kE(B, A, I) {
1538
1538
  T += q;
1539
1539
  continue;
1540
1540
  }
1541
- const X = pI(T, Q), P = HI(T, X, E);
1542
- c(T, P, P, P, "text", j + b, null, null), T = q, b = H.index;
1541
+ const X = pI(T, Q), v = HI(T, X, E);
1542
+ c(T, v, v, v, "text", j + b, null, null), T = q, b = H.index;
1543
1543
  }
1544
1544
  if (T.length > 0) {
1545
1545
  const H = pI(T, Q), q = HI(T, H, E);
@@ -1548,12 +1548,12 @@ function kE(B, A, I) {
1548
1548
  e[J] = s.length;
1549
1549
  continue;
1550
1550
  }
1551
- const DA = HI(p, iA, E), Z = n === "space" || n === "preserved-space" || n === "zero-width-break" ? 0 : DA, f = n === "space" || n === "zero-width-break" ? 0 : DA;
1551
+ const oA = HI(p, iA, E), Z = n === "space" || n === "preserved-space" || n === "zero-width-break" ? 0 : oA, f = n === "space" || n === "zero-width-break" ? 0 : oA;
1552
1552
  if (l && p.length > 1) {
1553
1553
  const T = aE(p, iA, Q, E), b = g.preferPrefixWidthsForBreakableRuns ? hE(p, iA, Q, E) : null;
1554
- c(p, DA, Z, f, n, j, T, b);
1554
+ c(p, oA, Z, f, n, j, T, b);
1555
1555
  } else
1556
- c(p, DA, Z, f, n, j, null, null);
1556
+ c(p, oA, Z, f, n, j, null, null);
1557
1557
  e[J] = s.length;
1558
1558
  }
1559
1559
  const M = NE(B.chunks, k, e), R = S === null ? null : kB(B.normalized, S);
@@ -1697,9 +1697,9 @@ function JQ(B) {
1697
1697
  if (!j) continue;
1698
1698
  const iA = n.textCase || w || "none";
1699
1699
  iA === "uppercase" ? j = j.toUpperCase() : iA === "lowercase" ? j = j.toLowerCase() : iA === "capitalize" && (j = j.replace(/\b\w/g, (T) => T.toUpperCase()));
1700
- const DA = n.fontSize || C;
1701
- DA > l && (l = DA);
1702
- const Z = `${n.fontStyle || Q} ${n.fontWeight || g} ${DA}px "${n.fontFamily || I}", sans-serif`, f = dg(j, Z);
1700
+ const oA = n.fontSize || C;
1701
+ oA > l && (l = oA);
1702
+ const Z = `${n.fontStyle || Q} ${n.fontWeight || g} ${oA}px "${n.fontFamily || I}", sans-serif`, f = dg(j, Z);
1703
1703
  if (f && f.widths)
1704
1704
  for (let T = 0; T < f.widths.length; T++) {
1705
1705
  const b = p + T;
@@ -1805,7 +1805,7 @@ function uC(B, A, I) {
1805
1805
  }
1806
1806
  }
1807
1807
  function nE(B, A, I) {
1808
- var iA, DA;
1808
+ var iA, oA;
1809
1809
  const C = B.autoLayout, { direction: g, spacing: Q, padding: E, align: i, wrap: o } = C, D = g === "vertical", s = A.map((Z) => {
1810
1810
  const f = I(Z.id), T = Z.geometry;
1811
1811
  let b = (f == null ? void 0 : f.width) ?? T.width ?? 100, H = (f == null ? void 0 : f.height) ?? T.height ?? 100;
@@ -1831,7 +1831,7 @@ function nE(B, A, I) {
1831
1831
  return b *= Z.transform.scale_x || 1, H *= Z.transform.scale_y || 1, { id: Z.id, w: b, h: H, original: Z };
1832
1832
  });
1833
1833
  let w = B.width, a = B.height;
1834
- const t = ((iA = B.layoutProps) == null ? void 0 : iA.width) === "hug", G = ((DA = B.layoutProps) == null ? void 0 : DA.height) === "hug", S = [];
1834
+ const t = ((iA = B.layoutProps) == null ? void 0 : iA.width) === "hug", G = ((oA = B.layoutProps) == null ? void 0 : oA.height) === "hug", S = [];
1835
1835
  let K = [], y = 0, N = 0;
1836
1836
  const k = w - E.left - E.right, e = a - E.top - E.bottom;
1837
1837
  s.forEach((Z) => {
@@ -1843,16 +1843,16 @@ function nE(B, A, I) {
1843
1843
  return S.forEach((Z) => {
1844
1844
  let f = M, T = R;
1845
1845
  D ? n ? T = E.top + (a - E.top - E.bottom - Z.height) / 2 : j && (T = a - E.bottom - Z.height) : p ? f = E.left + (w - E.left - E.right - Z.width) / 2 : l && (f = w - E.right - Z.width), Z.children.forEach((b) => {
1846
- var d, v;
1846
+ var d, P;
1847
1847
  let H = f, q = T;
1848
1848
  D ? p ? H += (Z.width - b.w) / 2 : l && (H += Z.width - b.w) : n ? q += (Z.height - b.h) / 2 : j && (q += Z.height - b.h);
1849
- const X = ((d = b.original.layoutProps) == null ? void 0 : d.width) === "fill", P = ((v = b.original.layoutProps) == null ? void 0 : v.height) === "fill";
1849
+ const X = ((d = b.original.layoutProps) == null ? void 0 : d.width) === "fill", v = ((P = b.original.layoutProps) == null ? void 0 : P.height) === "fill";
1850
1850
  c.push({
1851
1851
  id: b.id,
1852
1852
  x: H + b.w / 2 - w / 2,
1853
1853
  y: q + b.h / 2 - a / 2,
1854
1854
  width: X && D ? Z.width : void 0,
1855
- height: P ? D ? void 0 : Z.height : void 0
1855
+ height: v ? D ? void 0 : Z.height : void 0
1856
1856
  }), D ? T += b.h + Q : f += b.w + Q;
1857
1857
  }), D ? M += Z.width + Q : R += Z.height + Q;
1858
1858
  }), { frameWidth: t ? w : void 0, frameHeight: G ? a : void 0, childUpdates: c };
@@ -1867,10 +1867,10 @@ function lE(B, A, I) {
1867
1867
  k ? R = (a - K) / 2 : e && (R = a - K), c ? J = (t - y) / 2 : M && (J = t - y);
1868
1868
  const p = [];
1869
1869
  return A.forEach((l, n) => {
1870
- var v, sA;
1870
+ var P, sA;
1871
1871
  const j = n % G.length || 0, iA = Math.floor(n / G.length) || 0;
1872
1872
  iA >= S.length && S.push(100);
1873
- const DA = G[j], Z = S[iA];
1873
+ const oA = G[j], Z = S[iA];
1874
1874
  let f = o.left + R + G.slice(0, j).reduce((yA, m) => yA + m + E, 0), T = o.top + J + S.slice(0, iA).reduce((yA, m) => yA + m + i, 0);
1875
1875
  const b = I(l.id), H = l.geometry;
1876
1876
  let q = (b == null ? void 0 : b.width) ?? H.width ?? 100, X = (b == null ? void 0 : b.height) ?? H.height ?? 100;
@@ -1879,12 +1879,12 @@ function lE(B, A, I) {
1879
1879
  q = yA * 2, X = yA * 2;
1880
1880
  }
1881
1881
  q *= l.transform.scale_x || 1, X *= l.transform.scale_y || 1;
1882
- let P = f, d = T;
1883
- k ? P += (DA - q) / 2 : e && (P += DA - q), c ? d += (Z - X) / 2 : M && (d += Z - X), p.push({
1882
+ let v = f, d = T;
1883
+ k ? v += (oA - q) / 2 : e && (v += oA - q), c ? d += (Z - X) / 2 : M && (d += Z - X), p.push({
1884
1884
  id: l.id,
1885
- x: P + q / 2 - s / 2,
1885
+ x: v + q / 2 - s / 2,
1886
1886
  y: d + X / 2 - w / 2,
1887
- width: ((v = l.layoutProps) == null ? void 0 : v.width) === "fill" ? DA : void 0,
1887
+ width: ((P = l.layoutProps) == null ? void 0 : P.width) === "fill" ? oA : void 0,
1888
1888
  height: ((sA = l.layoutProps) == null ? void 0 : sA.height) === "fill" ? Z : void 0
1889
1889
  });
1890
1890
  }), { childUpdates: p };
@@ -6907,7 +6907,7 @@ class Ji {
6907
6907
  wA(this, "debugMode", !1);
6908
6908
  // Trigger Management
6909
6909
  wA(this, "activeTriggers", /* @__PURE__ */ new Map());
6910
- console.info("%c[ExodeUI Engine] Pixel-Perfect Parity Active (v6.2.8) - SVG Fill & Gradient Parity Active", "color: #3b82f6; font-weight: bold; padding: 2px 4px; border-radius: 4px; background: rgba(59, 130, 246, 0.1)");
6910
+ console.info("%c[ExodeUI Engine] Pixel-Perfect Parity Active (v6.3.10) - SVG Fill & Gradient Parity Active", "color: #3b82f6; font-weight: bold; padding: 2px 4px; border-radius: 4px; background: rgba(59, 130, 246, 0.1)");
6911
6911
  }
6912
6912
  // interactionId -> lastProgress
6913
6913
  setTriggerCallback(A) {
@@ -7888,19 +7888,19 @@ class Ji {
7888
7888
  let c = k.geometry;
7889
7889
  if (k.type === "Frame" || k.type === "Group" || !c || c.type !== "Path" && c.type !== "Ellipse" && c.type !== "Rectangle") {
7890
7890
  const d = (N = this.artboard) == null ? void 0 : N.objects.find(
7891
- (v) => v.parentId === k.id && v.type === "Shape" && v.geometry && (v.geometry.type === "Path" || v.geometry.type === "Ellipse" || v.geometry.type === "Rectangle")
7891
+ (P) => P.parentId === k.id && P.type === "Shape" && P.geometry && (P.geometry.type === "Path" || P.geometry.type === "Ellipse" || P.geometry.type === "Rectangle")
7892
7892
  );
7893
7893
  d && (c = d.geometry);
7894
7894
  }
7895
7895
  if (!c) return;
7896
- const M = (o.distance || 0) / 100, R = e.width || c.width || 0, J = e.height || c.height || 0, p = this.getPointOnPath(c, R, J, M), l = e.rotation * Math.PI / 180, n = Math.cos(l), j = Math.sin(l), iA = p.x * e.scale_x * n - p.y * e.scale_y * j, DA = p.x * e.scale_x * j + p.y * e.scale_y * n;
7896
+ const M = (o.distance || 0) / 100, R = e.width || c.width || 0, J = e.height || c.height || 0, p = this.getPointOnPath(c, R, J, M), l = e.rotation * Math.PI / 180, n = Math.cos(l), j = Math.sin(l), iA = p.x * e.scale_x * n - p.y * e.scale_y * j, oA = p.x * e.scale_x * j + p.y * e.scale_y * n;
7897
7897
  let Z = e.rotation + (o.offsetRotation || 0);
7898
7898
  if (o.orient) {
7899
- const d = Math.cos(p.angle), v = Math.sin(p.angle), sA = d * e.scale_x * n - v * e.scale_y * j, yA = d * e.scale_x * j + v * e.scale_y * n;
7899
+ const d = Math.cos(p.angle), P = Math.sin(p.angle), sA = d * e.scale_x * n - P * e.scale_y * j, yA = d * e.scale_x * j + P * e.scale_y * n;
7900
7900
  Z = Math.atan2(yA, sA) * 180 / Math.PI + (o.offsetRotation || 0);
7901
7901
  }
7902
- const f = Z * Math.PI / 180, T = Math.cos(f), b = Math.sin(f), H = (o.offsetX || 0) * T - (o.offsetY || 0) * b, q = (o.offsetX || 0) * b + (o.offsetY || 0) * T, X = e.x + iA + H, P = e.y + DA + q;
7903
- if (g.x = g.x + (X - g.x) * D, g.y = g.y + (P - g.y) * D, o.orient) {
7902
+ const f = Z * Math.PI / 180, T = Math.cos(f), b = Math.sin(f), H = (o.offsetX || 0) * T - (o.offsetY || 0) * b, q = (o.offsetX || 0) * b + (o.offsetY || 0) * T, X = e.x + iA + H, v = e.y + oA + q;
7903
+ if (g.x = g.x + (X - g.x) * D, g.y = g.y + (v - g.y) * D, o.orient) {
7904
7904
  let d = (Z - g.rotation) % 360;
7905
7905
  d > 180 && (d -= 360), d < -180 && (d += 360), g.rotation = g.rotation + d * D;
7906
7906
  }
@@ -8047,7 +8047,7 @@ class Ji {
8047
8047
  if (t && (t.type === "Dropdown" || t.variant === "dropdown")) {
8048
8048
  const G = this.objectStates.get(t.id), S = (G == null ? void 0 : G.options) || t.options || {}, K = t.geometry || {}, y = K.width ?? t.width ?? 200, N = K.height ?? t.height ?? 40, k = S.optionsList || [], e = S.itemHeight || 32, c = S.listPadding ?? 4, M = k.length * e + c * 2, R = this.getWorldTransform(t.id), J = y * Math.abs(R.scaleX), p = N * Math.abs(R.scaleY), l = R.y + p / 2 + 4, n = Math.abs(I - R.x) <= J / 2, j = C >= l && C <= l + M * Math.abs(R.scaleY);
8049
8049
  if (n && j) {
8050
- const iA = Math.abs(R.scaleY), DA = C - (l + c * iA), Z = Math.floor(DA / (e * iA));
8050
+ const iA = Math.abs(R.scaleY), oA = C - (l + c * iA), Z = Math.floor(oA / (e * iA));
8051
8051
  if (Z >= 0 && Z < k.length) {
8052
8052
  const f = k[Z];
8053
8053
  S.selectedOption = f, S.isOpen = !1, this.activeDropdownId = null, t.inputId && this.setInternalInput(t.inputId, f), this.onComponentChange && this.onComponentChange({
@@ -8135,15 +8135,15 @@ class Ji {
8135
8135
  const K = t.geometry, y = (K == null ? void 0 : K.datasets) || [], N = this.objectStates.get(t.id), k = (N == null ? void 0 : N.width) || (K == null ? void 0 : K.width) || 200, e = (N == null ? void 0 : N.height) || (K == null ? void 0 : K.height) || 150, c = this.getWorldTransform(t.id), M = 30, R = 20, J = k - M, p = e - R;
8136
8136
  let l = 1;
8137
8137
  y.forEach((iA) => {
8138
- const DA = Math.max(...iA.data || [0]);
8139
- DA > l && (l = DA);
8138
+ const oA = Math.max(...iA.data || [0]);
8139
+ oA > l && (l = oA);
8140
8140
  });
8141
8141
  let n = 1 / 0, j = null;
8142
- y.forEach((iA, DA) => {
8142
+ y.forEach((iA, oA) => {
8143
8143
  const Z = iA.data || [], f = J / Math.max(Z.length - 1, 1);
8144
8144
  Z.forEach((T, b) => {
8145
8145
  const H = c.x - k / 2 + M + b * f, q = c.y + e / 2 - R - T / l * p, X = Math.sqrt((I - H) ** 2 + (C - q) ** 2);
8146
- X < n && (n = X, j = { dIdx: DA, pIdx: b, val: T, label: iA.label || `Dataset ${DA + 1}` });
8146
+ X < n && (n = X, j = { dIdx: oA, pIdx: b, val: T, label: iA.label || `Dataset ${oA + 1}` });
8147
8147
  });
8148
8148
  }), j && n < 20 && this.onGraphPointClick && this.onGraphPointClick({ objectId: t.id, componentName: t.name, datasetIndex: j.dIdx, pointIndex: j.pIdx, value: j.val, label: j.label }), this.onComponentChange && this.onComponentChange({ objectId: t.id, componentName: t.name, variant: "linegraph", property: "click", value: (j == null ? void 0 : j.val) ?? null });
8149
8149
  }
@@ -8579,7 +8579,7 @@ class Ji {
8579
8579
  }
8580
8580
  */
8581
8581
  renderObject(A, I, C) {
8582
- var S, K, y, N, k, e, c, M, R, J, p, l, n, j, iA, DA, Z;
8582
+ var S, K, y, N, k, e, c, M, R, J, p, l, n, j, iA, oA, Z;
8583
8583
  const g = this.objectStates.get(I.id);
8584
8584
  if (!g) {
8585
8585
  console.warn("No state for object:", I.id);
@@ -8608,23 +8608,23 @@ class Ji {
8608
8608
  const EA = a.offsetX || 0, hA = a.offsetY || 0, x = a.rotation || 0, L = a.scale !== void 0 ? a.scale : 1;
8609
8609
  T += f * EA, b += f * hA, H += f * x, q *= Math.pow(L, f), X *= Math.pow(L, f);
8610
8610
  } else if (a.type === "Grid") {
8611
- const EA = a.cols || Math.ceil(Math.sqrt(a.count)), hA = a.gapX || 0, x = a.gapY || 0, L = Math.floor(f / EA), V = f % EA, CA = i + hA, FA = o + x;
8612
- T += V * CA, b += L * FA;
8611
+ const EA = a.cols || Math.ceil(Math.sqrt(a.count)), hA = a.gapX || 0, x = a.gapY || 0, L = Math.floor(f / EA), V = f % EA, QA = i + hA, FA = o + x;
8612
+ T += V * QA, b += L * FA;
8613
8613
  } else if (a.type === "Radial") {
8614
- const EA = a.radius || 100, hA = a.startAngle || 0, L = (a.endAngle || 360) - hA, V = a.count > 1 ? L / (L === 360 ? a.count : a.count - 1) : 0, CA = hA + f * V, FA = CA * Math.PI / 180;
8615
- T = g.x + EA * Math.cos(FA), b = g.y + EA * Math.sin(FA), H += CA;
8614
+ const EA = a.radius || 100, hA = a.startAngle || 0, L = (a.endAngle || 360) - hA, V = a.count > 1 ? L / (L === 360 ? a.count : a.count - 1) : 0, QA = hA + f * V, FA = QA * Math.PI / 180;
8615
+ T = g.x + EA * Math.cos(FA), b = g.y + EA * Math.sin(FA), H += QA;
8616
8616
  }
8617
8617
  }
8618
- const P = I.type === "Group" || I.type === "Frame" || I.type === "Component", d = i > 0 && o > 0;
8619
- if (!P && d) {
8618
+ const v = I.type === "Group" || I.type === "Frame" || I.type === "Component", d = i > 0 && o > 0;
8619
+ if (!v && d) {
8620
8620
  const EA = (((y = E.shadow) == null ? void 0 : y.isEnabled) !== !1 ? (((N = E.shadow) == null ? void 0 : N.blur) || 0) + 10 : 0) + (((k = E.blur) == null ? void 0 : k.isEnabled) !== !1 && ((e = E.blur) == null ? void 0 : e.radius) || 0) + 20;
8621
8621
  if (!this.isObjectInView(A, T, b, i, o, EA))
8622
8622
  continue;
8623
8623
  }
8624
8624
  this.debug_objectsRendered++, A.save();
8625
- const v = [], sA = E.blur || ((c = I.style) == null ? void 0 : c.blur);
8626
- sA && sA.amount > 0 && v.push(`blur(${sA.amount}px)`);
8627
- const yA = ((M = Q == null ? void 0 : Q.type) == null ? void 0 : M.toLowerCase().includes("image")) || ((R = I.type) == null ? void 0 : R.toLowerCase().includes("image")), m = E.adjustments && Object.keys(E.adjustments).length > 0 ? E.adjustments : null, QA = Q != null && Q.adjustments && Object.keys(Q.adjustments).length > 0 ? Q.adjustments : null, oA = yA ? QA || m : m || QA, _ = yA && !oA ? {
8625
+ const P = [], sA = E.blur || ((c = I.style) == null ? void 0 : c.blur);
8626
+ sA && sA.amount > 0 && P.push(`blur(${sA.amount}px)`);
8627
+ const yA = ((M = Q == null ? void 0 : Q.type) == null ? void 0 : M.toLowerCase().includes("image")) || ((R = I.type) == null ? void 0 : R.toLowerCase().includes("image")), m = E.adjustments && Object.keys(E.adjustments).length > 0 ? E.adjustments : null, CA = Q != null && Q.adjustments && Object.keys(Q.adjustments).length > 0 ? Q.adjustments : null, DA = yA ? CA || m : m || CA, _ = yA && !DA ? {
8628
8628
  exposure: 0,
8629
8629
  contrast: 0,
8630
8630
  saturation: 100,
@@ -8635,9 +8635,9 @@ class Ji {
8635
8635
  blur: 0,
8636
8636
  negative: 0,
8637
8637
  hue: 0
8638
- } : oA;
8638
+ } : DA;
8639
8639
  if (g && _ && (g.geometry = g.geometry || {}, g.geometry.adjustments = { ..._ }), _) {
8640
- const EA = (_.exposure || 0) / 100, hA = _.contrast || 0, x = 1 + (_.saturation || 0) / 100, L = (_.temperature || 0) / 200, V = (_.tint || 0) / 200, CA = (_.highlights || 0) / 500, FA = (_.shadows || 0) / 500;
8640
+ const EA = (_.exposure || 0) / 100, hA = _.contrast || 0, x = 1 + (_.saturation || 0) / 100, L = (_.temperature || 0) / 200, V = (_.tint || 0) / 200, QA = (_.highlights || 0) / 500, FA = (_.shadows || 0) / 500;
8641
8641
  let nA = "", tA = "SourceGraphic";
8642
8642
  if (EA !== 0 && (nA += `
8643
8643
  <feComponentTransfer in="${tA}" result="exposure">
@@ -8662,8 +8662,8 @@ class Ji {
8662
8662
  0 0 ${cA} 0 ${1 - cA}
8663
8663
  0 0 0 1 0"/>`, tA = "invert";
8664
8664
  }
8665
- if (L !== 0 || V !== 0 || CA !== 0 || FA !== 0) {
8666
- const cA = 1 + CA + FA, Y = cA * (1 + L - V / 2), pA = cA * (1 + V), iI = cA * (1 - L - V / 2), XA = _.shadows * 0.1 / 255, GA = [
8665
+ if (L !== 0 || V !== 0 || QA !== 0 || FA !== 0) {
8666
+ const cA = 1 + QA + FA, Y = cA * (1 + L - V / 2), pA = cA * (1 + V), iI = cA * (1 - L - V / 2), XA = _.shadows * 0.1 / 255, GA = [
8667
8667
  Y,
8668
8668
  0,
8669
8669
  0,
@@ -8689,10 +8689,10 @@ class Ji {
8689
8689
  }
8690
8690
  if (_.blur && (nA += `<feGaussianBlur in="${tA}" stdDeviation="${_.blur}" result="blur"/>`, tA = "blur"), nA) {
8691
8691
  const cA = `<svg xmlns="http://www.w3.org/2000/svg"><filter id="f" color-interpolation-filters="sRGB">${nA}</filter></svg>`, Y = btoa(cA);
8692
- v.push(`url('data:image/svg+xml;base64,${Y}#f')`);
8692
+ P.push(`url('data:image/svg+xml;base64,${Y}#f')`);
8693
8693
  }
8694
8694
  }
8695
- v.length > 0 ? A.filter = v.join(" ") : A.filter = "none", A.imageSmoothingEnabled = !0, A.imageSmoothingQuality = "high";
8695
+ P.length > 0 ? A.filter = P.join(" ") : A.filter = "none", A.imageSmoothingEnabled = !0, A.imageSmoothingQuality = "high";
8696
8696
  const aA = A.globalAlpha, kA = this.normalizeOpacity(g.opacity !== void 0 ? g.opacity : 100);
8697
8697
  A.globalAlpha = aA * kA;
8698
8698
  const lA = g.compositeOperation || g.blendMode;
@@ -8754,19 +8754,19 @@ class Ji {
8754
8754
  let EA = $A.color || "#000000";
8755
8755
  (p = (J = this.artboard) == null ? void 0 : J.tokens) != null && p.colors && this.artboard.tokens.colors[EA] && (EA = this.artboard.tokens.colors[EA]);
8756
8756
  const hA = this.normalizeOpacity($A.opacity ?? 100), x = $A.spread || 0, V = ($A.blur || 0) + x * 1.5;
8757
- let CA = EA;
8757
+ let QA = EA;
8758
8758
  if (EA.startsWith("#")) {
8759
8759
  const tA = EA.replace("#", ""), HA = parseInt(tA.substring(0, 2), 16), cA = parseInt(tA.substring(2, 4), 16), Y = parseInt(tA.substring(4, 6), 16);
8760
- CA = `rgba(${HA}, ${cA}, ${Y}, ${hA})`;
8760
+ QA = `rgba(${HA}, ${cA}, ${Y}, ${hA})`;
8761
8761
  } else if (EA.startsWith("rgba")) {
8762
8762
  const tA = EA.match(/[\d.]+/g);
8763
8763
  if (tA && tA.length >= 4) {
8764
8764
  const HA = tA[0], cA = tA[1], Y = tA[2], pA = tA[3];
8765
- CA = `rgba(${HA}, ${cA}, ${Y}, ${parseFloat(pA) * hA})`;
8765
+ QA = `rgba(${HA}, ${cA}, ${Y}, ${parseFloat(pA) * hA})`;
8766
8766
  }
8767
8767
  }
8768
8768
  const FA = A.getTransform(), nA = Math.sqrt(FA.a * FA.a + FA.b * FA.b) || 1;
8769
- A.shadowColor = CA, A.shadowBlur = V * nA, A.shadowOffsetX = ($A.offsetX || 0) * nA, A.shadowOffsetY = ($A.offsetY || 0) * nA;
8769
+ A.shadowColor = QA, A.shadowBlur = V * nA, A.shadowOffsetX = ($A.offsetX || 0) * nA, A.shadowOffsetY = ($A.offsetY || 0) * nA;
8770
8770
  }
8771
8771
  const II = I.liquidFill || ((l = I.style) == null ? void 0 : l.liquidFill), aI = I.artEffect || ((n = I.style) == null ? void 0 : n.artEffect);
8772
8772
  if (II && II.enabled) {
@@ -8798,15 +8798,15 @@ class Ji {
8798
8798
  const x = E.stroke && E.stroke.width > 0 && E.stroke.isEnabled !== !1, L = (((j = E.stroke) == null ? void 0 : j.alignment) || "center").toLowerCase();
8799
8799
  if (x && (L === "outside" || L === "center") && this.applyStrokeAlignment(A, E, w, i, o, s), E.fill && E.fill.type !== "None") {
8800
8800
  A.save();
8801
- const V = A.globalAlpha, CA = this.createCanvasFill(A, E.fill, i, o);
8802
- A.fillStyle = CA || E.fill.color || "transparent", A.globalAlpha = V * this.normalizeOpacity(E.fill.opacity ?? 100), s !== 0 ? (this.drawRoundRect(A, -i / 2, -o / 2, i, o, s), A.fill()) : A.fillRect(-i / 2, -o / 2, i, o), A.globalAlpha = V, A.restore();
8801
+ const V = A.globalAlpha, QA = this.createCanvasFill(A, E.fill, i, o);
8802
+ A.fillStyle = QA || E.fill.color || "transparent", A.globalAlpha = V * this.normalizeOpacity(E.fill.opacity ?? 100), s !== 0 ? (this.drawRoundRect(A, -i / 2, -o / 2, i, o, s), A.fill()) : A.fillRect(-i / 2, -o / 2, i, o), A.globalAlpha = V, A.restore();
8803
8803
  }
8804
8804
  hA.complete && hA.naturalWidth > 0 ? (s !== 0 ? (A.save(), this.drawRoundRect(A, -i / 2, -o / 2, i, o, s), A.clip(), A.drawImage(hA, -i / 2, -o / 2, i, o), A.restore()) : A.drawImage(hA, -i / 2, -o / 2, i, o), x && L === "inside" && this.applyStrokeAlignment(A, E, w, i, o, s)) : x && L === "inside" && this.applyStrokeAlignment(A, E, w, i, o, s);
8805
8805
  }
8806
8806
  } else if (Q.type === "SVG") {
8807
8807
  const EA = Q.svgContent;
8808
8808
  if (EA) {
8809
- const hA = E.palette || [], x = E.fill, L = E.stroke, V = x ? this.normalizeOpacity(x.opacity ?? 100) : 1, CA = (x == null ? void 0 : x.type) === "Solid" && (!L || L.isEnabled === !1 || L.type === "Solid" && L.color === x.color), FA = x && x.type !== "None" ? CA ? "monochrome" : x.type === "Solid" ? (x.color || "") + "|opacity:" + V : JSON.stringify(x.stops || []) + "|opacity:" + V : "", nA = L && L.isEnabled !== !1 && (L.width || 0) > 0 ? CA ? [
8809
+ const hA = E.palette || [], x = E.fill, L = E.stroke, V = x ? this.normalizeOpacity(x.opacity ?? 100) : 1, QA = (x == null ? void 0 : x.type) === "Solid" && (!L || L.isEnabled === !1 || L.type === "Solid" && L.color === x.color), FA = x && x.type !== "None" ? QA ? "monochrome" : x.type === "Solid" ? (x.color || "") + "|opacity:" + V : JSON.stringify(x.stops || []) + "|opacity:" + V : "", nA = L && L.isEnabled !== !1 && (L.width || 0) > 0 ? QA ? [
8810
8810
  "monochrome",
8811
8811
  L.width || 0,
8812
8812
  L.trimStart ?? 0,
@@ -8844,7 +8844,7 @@ class Ji {
8844
8844
  }
8845
8845
  }), x && x.type && x.type !== "None") {
8846
8846
  if (x.type === "Solid" && x.color) {
8847
- const u = CA ? "#FFFFFF" : x.color, $ = CA ? 1 : this.normalizeOpacity(x.opacity ?? 100);
8847
+ const u = QA ? "#FFFFFF" : x.color, $ = QA ? 1 : this.normalizeOpacity(x.opacity ?? 100);
8848
8848
  Y = Y.replace(/\bfill\s*=\s*["'][^"']*["']/gi, (KA) => /fill\s*=\s*["']\s*(none|transparent)\s*["']/i.test(KA) ? KA : `fill="${u}"`), Y = Y.replace(/fill\s*:\s*[^;"')]+/gi, (KA) => /fill\s*:\s*(none|transparent)/i.test(KA) ? KA : `fill:${u}`), $ < 1 && (Y = Y.replace(/\bfill-opacity\s*=\s*["'][^"']*["']/gi, `fill-opacity="${$}"`), Y = Y.replace(/fill-opacity\s*:\s*[^;"')]+/gi, `fill-opacity:${$}`), Y.match(/\bfill-opacity\s*=/i) || (Y = Y.replace(/(<svg[^>]*>)/i, `$1<g fill-opacity="${$}">`), Y = Y.replace(/<\/svg>/i, "</g></svg>")));
8849
8849
  } else if (x.type === "LinearGradient" || x.type === "RadialGradient" || x.type === "Linear" || x.type === "Radial") {
8850
8850
  const u = "exode-fill", $ = this.normalizeOpacity(x.opacity ?? 100), KA = (x.stops || []).map((W) => {
@@ -8875,7 +8875,7 @@ class Ji {
8875
8875
  return `<radialGradient id="${$}" cx="${BA}%" cy="${rA}%" r="${dA}%" gradientUnits="objectBoundingBox">${O}</radialGradient>`;
8876
8876
  }, iI = (u, $) => /<defs>/i.test(u) ? u.replace(/<defs>/i, `<defs>${$}`) : u.replace(/(<svg[^>]*>)/i, `$1<defs>${$}</defs>`);
8877
8877
  if (L && L.isEnabled !== !1 && (L.width || 0) > 0) {
8878
- const u = L.width || 1, $ = CA ? 1 : this.normalizeOpacity(L.opacity ?? 100), KA = CA ? "#FFFFFF" : L.color || (x == null ? void 0 : x.color) || "#000000";
8878
+ const u = L.width || 1, $ = QA ? 1 : this.normalizeOpacity(L.opacity ?? 100), KA = QA ? "#FFFFFF" : L.color || (x == null ? void 0 : x.color) || "#000000";
8879
8879
  let O = "";
8880
8880
  const W = L.fill;
8881
8881
  if (W && W.type) {
@@ -8947,7 +8947,7 @@ class Ji {
8947
8947
  let cA = null;
8948
8948
  if (HA.complete && HA.naturalWidth > 0 ? (cA = HA, this.lastValidSvgImgMap.set(I.id, HA)) : cA = this.lastValidSvgImgMap.get(I.id) || null, cA && cA.complete && cA.naturalWidth > 0) {
8949
8949
  const Y = Math.max(1, i), pA = Math.max(1, o);
8950
- if (CA && (x == null ? void 0 : x.type) === "Solid") {
8950
+ if (QA && (x == null ? void 0 : x.type) === "Solid") {
8951
8951
  this.maskBuffer || (this.maskBuffer = document.createElement("canvas"), this.maskCtx = this.maskBuffer.getContext("2d")), this.maskBuffer.width = Y, this.maskBuffer.height = pA, this.maskCtx.setTransform(1, 0, 0, 1, 0, 0), this.maskCtx.globalCompositeOperation = "source-over", this.maskCtx.globalAlpha = 1, this.maskCtx.filter = "none", this.maskCtx.clearRect(0, 0, Y, pA), this.maskCtx.drawImage(cA, 0, 0, Y, pA), this.maskCtx.globalCompositeOperation = "source-in";
8952
8952
  const iI = x.color || "#000000", XA = this.normalizeOpacity(x.opacity ?? 100);
8953
8953
  this.maskCtx.fillStyle = iI, this.maskCtx.globalAlpha = XA, this.maskCtx.fillRect(0, 0, Y, pA), A.drawImage(this.maskBuffer, -Y / 2, -pA / 2, Y, pA);
@@ -8959,7 +8959,7 @@ class Ji {
8959
8959
  else if (I.type === "Shape") {
8960
8960
  if (this.applyPath(A, w, i, o, s), A.save(), E.blur && E.blur.amount > 0 && (A.filter = `blur(${E.blur.amount}px)`), E.fill) {
8961
8961
  const EA = A.globalAlpha;
8962
- if (((DA = E.fill) == null ? void 0 : DA.type) === "Image" && (E.fill.originalSrc || E.fill.src)) {
8962
+ if (((oA = E.fill) == null ? void 0 : oA.type) === "Image" && (E.fill.originalSrc || E.fill.src)) {
8963
8963
  const hA = E.fill.originalSrc || E.fill.src;
8964
8964
  let x = this.imageCache.get(hA);
8965
8965
  x || (x = new Image(), x.src = hA, this.imageCache.set(hA, x)), x.complete && x.naturalWidth > 0 && (A.save(), this.applyPath(A, w, i, o, s), A.clip(), this.renderFittedImage(A, x, -i / 2, -o / 2, i, o, E.fill.fillMode), A.restore());
@@ -8985,21 +8985,21 @@ class Ji {
8985
8985
  const hA = I.type === "Frame", x = I.clipsContent !== void 0 ? I.clipsContent : I.clipContent !== void 0 ? I.clipContent : hA;
8986
8986
  if (A.save(), x) {
8987
8987
  A.beginPath();
8988
- const V = g.width ?? (Q == null ? void 0 : Q.width) ?? I.width ?? 0, CA = g.height ?? (Q == null ? void 0 : Q.height) ?? I.height ?? 0, FA = g.cornerRadius ?? (Q == null ? void 0 : Q.corner_radius) ?? I.cornerRadius ?? 0;
8989
- this.drawRoundRect(A, -V / 2, -CA / 2, V, CA, FA), A.clip();
8988
+ const V = g.width ?? (Q == null ? void 0 : Q.width) ?? I.width ?? 0, QA = g.height ?? (Q == null ? void 0 : Q.height) ?? I.height ?? 0, FA = g.cornerRadius ?? (Q == null ? void 0 : Q.corner_radius) ?? I.cornerRadius ?? 0;
8989
+ this.drawRoundRect(A, -V / 2, -QA / 2, V, QA, FA), A.clip();
8990
8990
  }
8991
8991
  let L = 0;
8992
8992
  for (I.children.forEach((V) => {
8993
- const CA = C.get(V);
8994
- if (!CA) return;
8995
- const FA = this.objectStates.get(V), nA = (FA == null ? void 0 : FA.geometry) || CA.geometry;
8993
+ const QA = C.get(V);
8994
+ if (!QA) return;
8995
+ const FA = this.objectStates.get(V), nA = (FA == null ? void 0 : FA.geometry) || QA.geometry;
8996
8996
  if (nA && nA.isMask && (FA == null ? void 0 : FA.visible) !== !1) {
8997
8997
  const tA = nA.width || 0, HA = nA.height || 0;
8998
8998
  this.applyObjectTransform(A, V);
8999
8999
  const cA = (FA == null ? void 0 : FA.corner_radius) ?? (nA == null ? void 0 : nA.corner_radius) ?? 0;
9000
9000
  this.applyPath(A, nA, tA, HA, cA), A.clip(), L++;
9001
9001
  } else
9002
- this.renderObject(A, CA, C);
9002
+ this.renderObject(A, QA, C);
9003
9003
  }); L > 0; )
9004
9004
  A.restore(), L--;
9005
9005
  A.restore();
@@ -9014,13 +9014,13 @@ class Ji {
9014
9014
  isVisible: !0
9015
9015
  }] : [])).filter((L) => L.isVisible !== !1 && C.has(L.maskId)).forEach((L) => {
9016
9016
  var cA, Y, pA, iI, XA, GA;
9017
- const V = C.get(L.maskId), CA = this.objectStates.get(V.id), FA = L.feather || 0, nA = L.inverted === !0, tA = L.opacity !== void 0 ? typeof L.opacity == "number" ? L.opacity : L.opacity / 100 : 1;
9017
+ const V = C.get(L.maskId), QA = this.objectStates.get(V.id), FA = L.feather || 0, nA = L.inverted === !0, tA = L.opacity !== void 0 ? typeof L.opacity == "number" ? L.opacity : L.opacity / 100 : 1;
9018
9018
  if ((L.type || "alpha") === "luma") {
9019
9019
  (!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.setTransform(1, 0, 0, 1, 0, 0), this.lumaCtx.globalCompositeOperation = "source-over", this.lumaCtx.globalAlpha = 1, this.lumaCtx.filter = "none", 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, V.id, C), FA > 0 && (this.lumaCtx.filter = `blur(${FA}px)`), this.lumaCtx.globalAlpha = tA;
9020
- const u = (CA == null ? void 0 : CA.width) || V.geometry.width || 0, $ = (CA == null ? void 0 : CA.height) || V.geometry.height || 0, KA = (CA == null ? void 0 : CA.corner_radius) ?? V.corner_radius ?? 0;
9020
+ const u = (QA == null ? void 0 : QA.width) || V.geometry.width || 0, $ = (QA == null ? void 0 : QA.height) || V.geometry.height || 0, KA = (QA == null ? void 0 : QA.corner_radius) ?? V.corner_radius ?? 0;
9021
9021
  if (((cA = V.geometry) == null ? void 0 : cA.type) === "Text") {
9022
- const rA = CA != null && CA.geometry ? this.deepMerge(V.geometry, CA.geometry) : V.geometry, dA = CA != null && CA.style ? this.deepMerge(V.style, CA.style) : V.style;
9023
- this._renderText(this.lumaCtx, V, { ...rA, width: u, height: $, corner_radius: KA }, dA, CA, u, $, !0);
9022
+ const rA = QA != null && QA.geometry ? this.deepMerge(V.geometry, QA.geometry) : V.geometry, dA = QA != null && QA.style ? this.deepMerge(V.style, QA.style) : V.style;
9023
+ this._renderText(this.lumaCtx, V, { ...rA, width: u, height: $, corner_radius: KA }, dA, QA, u, $, !0);
9024
9024
  } else if (((Y = V.geometry) == null ? void 0 : Y.type) === "Image") {
9025
9025
  const rA = V.geometry.src;
9026
9026
  if (rA) {
@@ -9053,10 +9053,10 @@ class Ji {
9053
9053
  this.maskCtx.putImageData(O, 0, 0);
9054
9054
  } else {
9055
9055
  this.maskCtx.save(), this.rootTransform && this.maskCtx.setTransform(this.rootTransform), this.maskCtx.globalCompositeOperation = nA ? "destination-out" : "destination-in", FA > 0 && (this.maskCtx.filter = `blur(${FA}px)`), this.maskCtx.globalAlpha = tA, this.applyAbsoluteTransform(this.maskCtx, V.id, C);
9056
- const u = (CA == null ? void 0 : CA.width) || V.geometry.width || 0, $ = (CA == null ? void 0 : CA.height) || V.geometry.height || 0, KA = (CA == null ? void 0 : CA.corner_radius) ?? V.corner_radius ?? 0;
9056
+ const u = (QA == null ? void 0 : QA.width) || V.geometry.width || 0, $ = (QA == null ? void 0 : QA.height) || V.geometry.height || 0, KA = (QA == null ? void 0 : QA.corner_radius) ?? V.corner_radius ?? 0;
9057
9057
  if (((iI = V.geometry) == null ? void 0 : iI.type) === "Text") {
9058
- const O = CA != null && CA.geometry ? this.deepMerge(V.geometry, CA.geometry) : V.geometry, W = CA != null && CA.style ? this.deepMerge(V.style, CA.style) : V.style;
9059
- this._renderText(this.maskCtx, V, { ...O, width: u, height: $, corner_radius: KA }, W, CA, u, $, !0);
9058
+ const O = QA != null && QA.geometry ? this.deepMerge(V.geometry, QA.geometry) : V.geometry, W = QA != null && QA.style ? this.deepMerge(V.style, QA.style) : V.style;
9059
+ this._renderText(this.maskCtx, V, { ...O, width: u, height: $, corner_radius: KA }, W, QA, u, $, !0);
9060
9060
  } else if (((XA = V.geometry) == null ? void 0 : XA.type) === "Image") {
9061
9061
  const O = V.geometry.src;
9062
9062
  if (O) {
@@ -9089,7 +9089,7 @@ class Ji {
9089
9089
  }
9090
9090
  }
9091
9091
  _renderText(A, I, C, g, Q, E, i, o = !1, D = !1) {
9092
- var P, d, v, sA, yA;
9092
+ var v, d, P, sA, yA;
9093
9093
  let s = C.text || "";
9094
9094
  if (C.textInputId && !o) {
9095
9095
  const m = this.inputs.get(C.textInputId);
@@ -9098,8 +9098,8 @@ class Ji {
9098
9098
  if (C.svgPath) {
9099
9099
  const m = C.svgPath;
9100
9100
  A.save();
9101
- const QA = ((P = g == null ? void 0 : g.fill) == null ? void 0 : P.color) || "#000000", oA = ((d = g == null ? void 0 : g.fill) == null ? void 0 : d.opacity) !== void 0 ? (v = g == null ? void 0 : g.fill) == null ? void 0 : v.opacity : 1;
9102
- A.fillStyle = QA, A.globalAlpha *= oA;
9101
+ const CA = ((v = g == null ? void 0 : g.fill) == null ? void 0 : v.color) || "#000000", DA = ((d = g == null ? void 0 : g.fill) == null ? void 0 : d.opacity) !== void 0 ? (P = g == null ? void 0 : g.fill) == null ? void 0 : P.opacity : 1;
9102
+ A.fillStyle = CA, A.globalAlpha *= DA;
9103
9103
  const _ = new Path2D(m);
9104
9104
  A.fill(_), A.restore();
9105
9105
  return;
@@ -9114,8 +9114,8 @@ class Ji {
9114
9114
  let y = C.fontFamily || "Inter";
9115
9115
  const N = ["Bold", "SemiBold", "Medium", "Regular", "Light", "Thin", "ExtraBold", "Black", "Italic"];
9116
9116
  N.forEach((m) => {
9117
- const QA = new RegExp(`[\\s-]${m}$`, "i");
9118
- QA.test(y) && (y = y.replace(QA, "").trim());
9117
+ const CA = new RegExp(`[\\s-]${m}$`, "i");
9118
+ CA.test(y) && (y = y.replace(CA, "").trim());
9119
9119
  });
9120
9120
  const k = `${G} ${S} ${K}px "${y}", sans-serif`;
9121
9121
  A.font = k;
@@ -9147,23 +9147,23 @@ class Ji {
9147
9147
  segments: C.segments,
9148
9148
  enableSegments: C.enableSegments,
9149
9149
  textCase: a
9150
- }), j = n.lines || [], iA = n.maxFontSize || K, DA = this.fontLeadingFactors[y] ?? 0.5, Z = (p - K) * DA;
9150
+ }), j = n.lines || [], iA = n.maxFontSize || K, oA = this.fontLeadingFactors[y] ?? 0.5, Z = (p - K) * oA;
9151
9151
  let f = n.height, T = -f / 2;
9152
9152
  i > 0 && i > f && (e === "top" ? T = -i / 2 : e === "middle" || e === "center" ? T = -f / 2 : e === "bottom" && (T = i / 2 - f)), T += Z;
9153
9153
  let b = null, H = 0;
9154
9154
  if (C.pathId && this.artboard) {
9155
- const m = this.artboard.objects.find((QA) => QA.id === C.pathId);
9155
+ const m = this.artboard.objects.find((CA) => CA.id === C.pathId);
9156
9156
  if (m && m.type === "Shape" && ((yA = m.geometry) == null ? void 0 : yA.type) === "Path") {
9157
- const QA = this.objectStates.get(m.id), oA = QA != null && QA.geometry ? this.deepMerge(m.geometry, QA.geometry) : m.geometry, _ = (QA == null ? void 0 : QA.scale_x) !== void 0 ? (m.width || 0) * QA.scale_x : m.width || 0, aA = (QA == null ? void 0 : QA.scale_y) !== void 0 ? (m.height || 0) * QA.scale_y : m.height || 0;
9158
- b = { geo: oA, obj: m, w: _, h: aA }, H = this.getPerimeter(oA, _, aA);
9157
+ const CA = this.objectStates.get(m.id), DA = CA != null && CA.geometry ? this.deepMerge(m.geometry, CA.geometry) : m.geometry, _ = (CA == null ? void 0 : CA.scale_x) !== void 0 ? (m.width || 0) * CA.scale_x : m.width || 0, aA = (CA == null ? void 0 : CA.scale_y) !== void 0 ? (m.height || 0) * CA.scale_y : m.height || 0;
9158
+ b = { geo: DA, obj: m, w: _, h: aA }, H = this.getPerimeter(DA, _, aA);
9159
9159
  }
9160
9160
  }
9161
- const q = (m, QA) => {
9161
+ const q = (m, CA) => {
9162
9162
  var _, aA;
9163
9163
  if (M === 0 && (!C.enableSegments || !((_ = C.segments) != null && _.length))) return A.measureText(m).width;
9164
- let oA = 0;
9164
+ let DA = 0;
9165
9165
  for (let kA = 0; kA < m.length; kA++) {
9166
- const lA = QA + kA;
9166
+ const lA = CA + kA;
9167
9167
  let UA = 0;
9168
9168
  if (C.enableSegments === !0 && ((aA = C.segments) == null ? void 0 : aA.length) > 0) {
9169
9169
  let TA = 0, OA = null;
@@ -9183,20 +9183,20 @@ class Ji {
9183
9183
  UA = A.measureText(m[kA]).width;
9184
9184
  } else
9185
9185
  UA = A.measureText(m[kA]).width;
9186
- oA += UA + M;
9186
+ DA += UA + M;
9187
9187
  }
9188
- return oA - (m.length > 0 ? M : 0);
9189
- }, X = (m, QA, oA, _, aA) => {
9188
+ return DA - (m.length > 0 ? M : 0);
9189
+ }, X = (m, CA, DA, _, aA) => {
9190
9190
  var OA, zA;
9191
9191
  const lA = (aA === 0 || w[aA - 1] === `
9192
9192
  ` || w[aA - 1] === "\r") && C.paragraphIndent ? C.paragraphIndent : 0, UA = (!o || D) && (I.behaviors || []).some(
9193
9193
  (_A) => _A.enabled && (_A.type.toString().includes("Text") || ["Typewriter", "Scramble", "Wave", "Bounce", "GlitchText", "Reveal3D", "RevealSlide", "RevealBlur"].includes(_A.type))
9194
9194
  );
9195
9195
  if (!C.pathId && !UA && (C.enableSegments !== !0 || !C.segments || C.segments.length === 0))
9196
- A.font = k, _ ? A.strokeText(m, QA + lA, oA) : A.fillText(m, QA + lA, oA);
9196
+ A.font = k, _ ? A.strokeText(m, CA + lA, DA) : A.fillText(m, CA + lA, DA);
9197
9197
  else {
9198
9198
  const _A = q(m, aA);
9199
- let EI = QA + lA;
9199
+ let EI = CA + lA;
9200
9200
  c === "center" ? EI -= _A / 2 : c === "right" && (EI -= _A);
9201
9201
  let $A = C.pathOffset || 0;
9202
9202
  C.pathId && H > 0 && b && (c === "center" ? $A += H / 2 - _A / 2 : c === "right" && ($A += H - _A));
@@ -9237,7 +9237,7 @@ class Ji {
9237
9237
  for (let EA = 0; EA < m.length; EA++) {
9238
9238
  let hA = m[EA];
9239
9239
  const x = aA + EA;
9240
- let L = 0, V = 0, CA = 1, FA = 1, nA = 0, tA = 1, HA = hA;
9240
+ let L = 0, V = 0, QA = 1, FA = 1, nA = 0, tA = 1, HA = hA;
9241
9241
  aI.forEach((GA) => {
9242
9242
  const u = GA.settings || {}, $ = u.strength || 1, KA = Date.now();
9243
9243
  if (GA.type === z.Typewriter)
@@ -9251,10 +9251,10 @@ class Ji {
9251
9251
  O < 1 && (V -= Math.abs(Math.sin(O * Math.PI)) * (u.height || 50) * $);
9252
9252
  } else if (GA.type === z.TextTrail) {
9253
9253
  const O = this.pointerHistory[Math.max(0, this.pointerHistory.length - 1 - x * (u.delay || 5))];
9254
- O && (L += (O.x - (Q.x + II)) * $ * 0.2, V += (O.y - (Q.y + oA + V)) * $ * 0.2);
9254
+ O && (L += (O.x - (Q.x + II)) * $ * 0.2, V += (O.y - (Q.y + DA + V)) * $ * 0.2);
9255
9255
  } else if (GA.type === z.Reveal3D) {
9256
9256
  const O = Math.max(0, Math.min(1, this.currentTime * (u.speed || 1) - x * (u.stagger || 0.1)));
9257
- CA *= O, FA *= O, tA = O;
9257
+ QA *= O, FA *= O, tA = O;
9258
9258
  } else if (GA.type === z.RevealSlide) {
9259
9259
  const O = Math.max(0, Math.min(1, this.currentTime * 1.5 - x * 0.05)), W = (1 - O) * (u.distance || 40) * $, BA = u.direction || "up";
9260
9260
  BA === "up" ? V -= W : BA === "down" ? V += W : BA === "left" ? L -= W : BA === "right" && (L += W), tA = O;
@@ -9296,30 +9296,30 @@ class Ji {
9296
9296
  L += Math.sin(KA * 2e-3 * O + x) * W * $, V += Math.cos(KA * 15e-4 * O + x * 0.7) * W * $;
9297
9297
  } else if (GA.type === z.TextBreathe) {
9298
9298
  const W = 1 + (Math.sin(KA * 3e-3 + x * 0.2) + 1) / 2 * 0.2 * $;
9299
- CA *= W, FA *= W;
9299
+ QA *= W, FA *= W;
9300
9300
  } else if (GA.type === z.TextSpin) {
9301
9301
  const O = u.speed || 1;
9302
9302
  nA += KA * 0.01 * O + x;
9303
9303
  } else if (GA.type === z.TextMagnet) {
9304
9304
  const O = this.pointerHistory[this.pointerHistory.length - 1];
9305
9305
  if (O) {
9306
- const W = O.x - (Q.x + II), BA = O.y - (Q.y + oA);
9306
+ const W = O.x - (Q.x + II), BA = O.y - (Q.y + DA);
9307
9307
  nA = Math.atan2(BA, W);
9308
9308
  }
9309
9309
  } else if (GA.type === z.TextPerspective) {
9310
9310
  const O = m.length / 2, W = (x - O) / O, BA = 1 - Math.abs(W) * 0.3 * $;
9311
- CA *= BA, FA *= BA, L += W * 20 * $;
9311
+ QA *= BA, FA *= BA, L += W * 20 * $;
9312
9312
  } else if (GA.type === z.TextMirror)
9313
9313
  tA *= 0.8;
9314
9314
  else if (GA.type === z.TextFloral) {
9315
9315
  const O = u.speed || 1, W = u.stagger || 0.1, BA = (KA * 1e-3 * O + x * W) % 2;
9316
- BA < 1 && (CA *= BA, FA *= BA, nA += BA * Math.PI);
9316
+ BA < 1 && (QA *= BA, FA *= BA, nA += BA * Math.PI);
9317
9317
  } else if (GA.type === z.TextSmoke) {
9318
9318
  const O = u.speed || 1, W = u.height || 50, BA = (KA * 5e-4 * O + x * 0.2) % 1;
9319
9319
  V -= BA * W * $, L += Math.sin(KA * 2e-3 + x) * 5 * $, tA = 1 - BA;
9320
9320
  } else if (GA.type === z.TextVariable) {
9321
9321
  const O = u.speed || 1, W = u.intensity || 1.5, BA = (Math.sin(KA * 4e-3 * O + x * 0.3) + 1) / 2;
9322
- CA *= 1 + BA * (W - 1) * $;
9322
+ QA *= 1 + BA * (W - 1) * $;
9323
9323
  } else if (GA.type === z.TextZing) {
9324
9324
  const O = u.speed || 2, W = u.distance || 100, BA = (KA * 2e-3 * O + x * 0.05) % 1;
9325
9325
  L += (1 - BA) * W * $, tA = BA;
@@ -9359,11 +9359,11 @@ class Ji {
9359
9359
  A.globalAlpha *= tA, A.save();
9360
9360
  const XA = A.measureText(HA).width;
9361
9361
  if (b && H > 0) {
9362
- const GA = II - EI + XA / 2, $ = ($A + GA) / H, KA = this.getPointOnPath(b.geo, b.w, b.h, Math.abs($ % 1)), O = KA.angle, W = oA + V + (C.pathOffsetY || 0), BA = C.pathSide === "right" ? -1 : 1, rA = Math.cos(O + Math.PI / 2) * W * BA, dA = Math.sin(O + Math.PI / 2) * W * BA;
9362
+ const GA = II - EI + XA / 2, $ = ($A + GA) / H, KA = this.getPointOnPath(b.geo, b.w, b.h, Math.abs($ % 1)), O = KA.angle, W = DA + V + (C.pathOffsetY || 0), BA = C.pathSide === "right" ? -1 : 1, rA = Math.cos(O + Math.PI / 2) * W * BA, dA = Math.sin(O + Math.PI / 2) * W * BA;
9363
9363
  A.translate(KA.x + rA + L, KA.y + dA), A.rotate(O + nA + (BA === -1 ? Math.PI : 0));
9364
9364
  } else
9365
- A.translate(II + L + XA / 2, oA + V), nA !== 0 && A.rotate(nA);
9366
- if (A.scale(CA, FA), cA && !o && !D) {
9365
+ A.translate(II + L + XA / 2, DA + V), nA !== 0 && A.rotate(nA);
9366
+ if (A.scale(QA, FA), cA && !o && !D) {
9367
9367
  const GA = this.createCanvasFill(A, cA, E, i);
9368
9368
  A.fillStyle = GA || cA.color || "#000000";
9369
9369
  } else if (!o && !D) {
@@ -9380,27 +9380,27 @@ class Ji {
9380
9380
  }
9381
9381
  };
9382
9382
  if (o) {
9383
- let m = 0, QA = T;
9384
- (j || []).forEach((oA) => {
9385
- const _ = oA.text || "", aA = w.indexOf(_, m);
9383
+ let m = 0, CA = T;
9384
+ (j || []).forEach((DA) => {
9385
+ const _ = DA.text || "", aA = w.indexOf(_, m);
9386
9386
  aA !== -1 && (m = aA);
9387
9387
  let kA = -E / 2;
9388
- c === "center" ? kA = 0 : c === "right" && (kA = E / 2), X(_, kA, QA, !1, m), m += _.length, QA += p;
9388
+ c === "center" ? kA = 0 : c === "right" && (kA = E / 2), X(_, kA, CA, !1, m), m += _.length, CA += p;
9389
9389
  });
9390
9390
  } else if (D) {
9391
- let m = 0, QA = T;
9392
- (j || []).forEach((oA) => {
9393
- const _ = oA.text || "";
9391
+ let m = 0, CA = T;
9392
+ (j || []).forEach((DA) => {
9393
+ const _ = DA.text || "";
9394
9394
  let aA = -E / 2;
9395
- c === "center" ? aA = 0 : c === "right" && (aA = E / 2), X(_, aA, QA, !1, m), m += _.length, m < w.length && (w[m] === `
9395
+ c === "center" ? aA = 0 : c === "right" && (aA = E / 2), X(_, aA, CA, !1, m), m += _.length, m < w.length && (w[m] === `
9396
9396
  ` || w[m] === "\r") && (m++, w[m - 1] === "\r" && w[m] === `
9397
- ` && m++), QA += p;
9397
+ ` && m++), CA += p;
9398
9398
  });
9399
9399
  } else {
9400
9400
  if (g.fill) {
9401
- const m = A.globalAlpha, QA = this.createCanvasFill(A, g.fill, E, i);
9402
- A.fillStyle = QA || g.fill.color || "#000000", A.globalAlpha = m * this.normalizeOpacity(g.fill.opacity ?? 100);
9403
- const oA = n.fullText || (C.enableSegments ? (C.segments || []).map((kA) => {
9401
+ const m = A.globalAlpha, CA = this.createCanvasFill(A, g.fill, E, i);
9402
+ A.fillStyle = CA || g.fill.color || "#000000", A.globalAlpha = m * this.normalizeOpacity(g.fill.opacity ?? 100);
9403
+ const DA = n.fullText || (C.enableSegments ? (C.segments || []).map((kA) => {
9404
9404
  let lA = kA.text || "";
9405
9405
  const UA = kA.textCase || C.textCase || "none";
9406
9406
  return UA === "uppercase" ? lA.toUpperCase() : UA === "lowercase" ? lA.toLowerCase() : UA === "capitalize" ? lA.replace(/\b\w/g, (TA) => TA.toUpperCase()) : lA;
@@ -9409,20 +9409,20 @@ class Ji {
9409
9409
  (j || []).forEach((kA) => {
9410
9410
  const lA = kA.text || "";
9411
9411
  let UA = -E / 2;
9412
- c === "center" ? UA = 0 : c === "right" && (UA = E / 2), X(lA, UA, aA, !1, _), _ += lA.length, aA += p, _ < oA.length && (oA[_] === `
9413
- ` || oA[_] === "\r") && (R > 0 && (aA += R), _++, oA[_ - 1] === "\r" && oA[_] === `
9412
+ c === "center" ? UA = 0 : c === "right" && (UA = E / 2), X(lA, UA, aA, !1, _), _ += lA.length, aA += p, _ < DA.length && (DA[_] === `
9413
+ ` || DA[_] === "\r") && (R > 0 && (aA += R), _++, DA[_ - 1] === "\r" && DA[_] === `
9414
9414
  ` && _++);
9415
9415
  }), A.globalAlpha = m;
9416
9416
  }
9417
9417
  if (g.stroke && g.stroke.width > 0) {
9418
9418
  const m = A.globalAlpha;
9419
9419
  g.fill && g.fill.type !== "None" && g.fill.isEnabled !== !1 && g.fill.opacity !== 0 && g.fill.color !== "transparent" && g.fill.color !== "rgba(0,0,0,0)" && (A.shadowColor = "transparent", A.shadowBlur = 0, A.shadowOffsetX = 0, A.shadowOffsetY = 0), A.strokeStyle = g.stroke.color, A.lineWidth = g.stroke.width, A.globalAlpha = m * this.normalizeOpacity(g.stroke.opacity ?? 100);
9420
- let oA = 0, _ = T;
9420
+ let DA = 0, _ = T;
9421
9421
  (j || []).forEach((aA) => {
9422
9422
  let kA = -E / 2;
9423
- c === "center" ? kA = 0 : c === "right" && (kA = E / 2), X(aA.text, kA, _, !0, oA), oA += (aA.text || "").length, _ += p, oA < w.length && (w[oA] === `
9424
- ` || w[oA] === "\r") && (R > 0 && (_ += R), oA++, w[oA - 1] === "\r" && w[oA] === `
9425
- ` && oA++);
9423
+ c === "center" ? kA = 0 : c === "right" && (kA = E / 2), X(aA.text, kA, _, !0, DA), DA += (aA.text || "").length, _ += p, DA < w.length && (w[DA] === `
9424
+ ` || w[DA] === "\r") && (R > 0 && (_ += R), DA++, w[DA - 1] === "\r" && w[DA] === `
9425
+ ` && DA++);
9426
9426
  }), A.globalAlpha = m;
9427
9427
  }
9428
9428
  }
@@ -9745,12 +9745,12 @@ class Ji {
9745
9745
  const p = `${s}Style`, l = g[p];
9746
9746
  if (l ? (l.backgroundColor !== void 0 && (k = l.backgroundColor), l.borderColor !== void 0 && (e = l.borderColor), l.borderWidth !== void 0 && (c = l.borderWidth), l.color !== void 0 && (M = l.color), l.placeholderColor !== void 0 && (R = l.placeholderColor), l.fontSize !== void 0 && (J = l.fontSize)) : s === "focused" ? (e = g.focusBorderColor || "rgba(59, 130, 246, 1)", c = Math.max(c, 2)) : s === "hovered" || s === "hover" ? (e = g.hoverBorderColor || e, k = g.hoverBackgroundColor || k) : s === "disabled" ? (k = 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)", c = Math.max(c, 2)), A.beginPath(), this.drawRoundRect(A, -Q / 2, -E / 2, Q, E, N), A.fillStyle = k, A.fill(), c > 0 && (A.strokeStyle = e, A.lineWidth = c, A.stroke(), s === "focused" || s === "focus")) {
9747
9747
  A.save(), A.beginPath();
9748
- const QA = N.map((oA) => oA + 2);
9749
- this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4, QA), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore();
9748
+ const CA = N.map((DA) => DA + 2);
9749
+ this.drawRoundRect(A, -Q / 2 - 2, -E / 2 - 2, Q + 4, E + 4, CA), A.strokeStyle = "rgba(59, 130, 246, 0.3)", A.lineWidth = 2, A.stroke(), A.restore();
9750
9750
  }
9751
- const n = (QA, oA) => {
9752
- if (!QA.visible || !QA.svgPath) return;
9753
- const _ = QA.size || 14, aA = QA.offset ?? 16, kA = QA.color || "#ffffff", lA = oA ? -(Q / 2) + aA : Q / 2 - aA, UA = QA.svgPath;
9751
+ const n = (CA, DA) => {
9752
+ if (!CA.visible || !CA.svgPath) return;
9753
+ const _ = CA.size || 14, aA = CA.offset ?? 16, kA = CA.color || "#ffffff", lA = DA ? -(Q / 2) + aA : Q / 2 - aA, UA = CA.svgPath;
9754
9754
  if (A.save(), A.translate(lA, 0), !UA.startsWith("<svg")) {
9755
9755
  const TA = new Path2D(UA), OA = _ / 24;
9756
9756
  A.scale(OA, OA), A.translate(-12, -12), A.fillStyle = kA, A.fill(TA);
@@ -9758,51 +9758,51 @@ class Ji {
9758
9758
  A.restore();
9759
9759
  };
9760
9760
  n(t, !0), n(G, !1);
9761
- const j = g.text || "", iA = g.placeholder || "Enter text...", DA = !j, Z = j || iA, f = DA ? R : M, T = J, b = g.fontFamily || "Inter", H = g.fontWeight || 400;
9761
+ const j = g.text || "", iA = g.placeholder || "Enter text...", oA = !j, Z = j || iA, f = oA ? R : M, T = J, b = g.fontFamily || "Inter", H = g.fontWeight || 400;
9762
9762
  A.font = `${H} ${T}px "${b}", sans-serif`, A.fillStyle = f, A.textAlign = "left", A.textBaseline = S ? "top" : "middle";
9763
- const q = g.inputPadding ?? 16, X = t.visible ? (t.offset ?? 16) + (t.size || 14) / 2 + 8 : q, P = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : q, d = -(Q / 2) + X, v = Q - X - P, sA = g.inputType === "password" ? "•".repeat(Z.length) : Z;
9764
- if (A.save(), A.beginPath(), A.rect(d - 2, -E / 2 + 4, v + 4, E - 8), A.clip(), S) {
9765
- const QA = sA.split(`
9763
+ const q = g.inputPadding ?? 16, X = t.visible ? (t.offset ?? 16) + (t.size || 14) / 2 + 8 : q, v = G.visible ? (G.offset ?? 16) + (G.size || 14) / 2 + 8 : q, d = -(Q / 2) + X, P = Q - X - v, sA = g.inputType === "password" ? "•".repeat(Z.length) : Z;
9764
+ if (A.save(), A.beginPath(), A.rect(d - 2, -E / 2 + 4, P + 4, E - 8), A.clip(), S) {
9765
+ const CA = sA.split(`
9766
9766
  `);
9767
- let oA = -E / 2 + q;
9767
+ let DA = -E / 2 + q;
9768
9768
  const _ = T * 1.2;
9769
9769
  let aA = 0;
9770
- QA.forEach((kA, lA) => {
9770
+ CA.forEach((kA, lA) => {
9771
9771
  const UA = kA.split(" ");
9772
9772
  let TA = "";
9773
9773
  for (let OA = 0; OA < UA.length; OA++) {
9774
9774
  const zA = TA + UA[OA] + " ";
9775
- A.measureText(zA).width > v && OA > 0 ? (A.fillText(TA, d, oA), TA = UA[OA] + " ", oA += _) : TA = zA;
9775
+ A.measureText(zA).width > P && OA > 0 ? (A.fillText(TA, d, DA), TA = UA[OA] + " ", DA += _) : TA = zA;
9776
9776
  }
9777
- A.fillText(TA, d, oA), aA = A.measureText(TA).width, lA < QA.length - 1 && (oA += _, aA = 0);
9778
- }), i && !DA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(d + aA, oA, 1.5, T);
9777
+ A.fillText(TA, d, DA), aA = A.measureText(TA).width, lA < CA.length - 1 && (DA += _, aA = 0);
9778
+ }), i && !oA && Math.floor(performance.now() / 500) % 2 === 0 && A.fillRect(d + aA, DA, 1.5, T);
9779
9779
  } else {
9780
- const oA = A.measureText(sA).width;
9780
+ const DA = A.measureText(sA).width;
9781
9781
  let _ = 0;
9782
- if (oA > v && (_ = oA - v), A.fillText(sA, d - _, 0), i && !DA && Math.floor(performance.now() / 500) % 2 === 0) {
9783
- const kA = d + oA - _;
9782
+ if (DA > P && (_ = DA - P), A.fillText(sA, d - _, 0), i && !oA && Math.floor(performance.now() / 500) % 2 === 0) {
9783
+ const kA = d + DA - _;
9784
9784
  A.fillRect(kA, -(T / 2), 1.5, T);
9785
9785
  }
9786
9786
  }
9787
9787
  if (A.restore(), w.visible !== !1) {
9788
- const QA = w.text || "Label", oA = w.fontSize || 12, _ = w.color || "rgba(156, 163, 175, 1)", aA = w.offset ?? 8;
9789
- A.font = `600 ${oA}px "${b}", sans-serif`, A.fillStyle = _, A.textAlign = "left", A.textBaseline = "bottom";
9788
+ const CA = w.text || "Label", DA = w.fontSize || 12, _ = w.color || "rgba(156, 163, 175, 1)", aA = w.offset ?? 8;
9789
+ A.font = `600 ${DA}px "${b}", sans-serif`, A.fillStyle = _, A.textAlign = "left", A.textBaseline = "bottom";
9790
9790
  const kA = -(Q / 2), lA = -(E / 2) - aA;
9791
- A.fillText(QA, kA, lA);
9791
+ A.fillText(CA, kA, lA);
9792
9792
  }
9793
9793
  if (a.visible === !0) {
9794
- const QA = a.text || "Helper text", oA = a.fontSize || 11, _ = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", aA = a.offset ?? 6;
9795
- A.font = `400 ${oA}px "${b}", sans-serif`, A.fillStyle = _, A.textAlign = "left", A.textBaseline = "top";
9794
+ const CA = a.text || "Helper text", DA = a.fontSize || 11, _ = s === "error" ? "rgba(239, 68, 68, 1)" : a.color || "rgba(156, 163, 175, 1)", aA = a.offset ?? 6;
9795
+ A.font = `400 ${DA}px "${b}", sans-serif`, A.fillStyle = _, A.textAlign = "left", A.textBaseline = "top";
9796
9796
  const kA = -(Q / 2), lA = E / 2 + aA;
9797
- A.fillText(QA, kA, lA);
9797
+ A.fillText(CA, kA, lA);
9798
9798
  }
9799
9799
  }
9800
9800
  renderSlider(A, I) {
9801
- 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, o = Q.min ?? 0, s = (Q.max ?? 100) - o, w = s === 0 ? 0 : (i - o) / s, a = Q.trackHeight || 4, t = Q.trackRoundedness ?? 2, G = Q.trackShape ?? "Rectangle", S = Q.trackPath || "", K = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", N = Q.thumbShape || "Ellipse", k = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, c = Q.thumbRoundedness ?? 0, M = Q.thumbColor || "#ffffff", R = Q.thumbPath || "", J = Q.thumbIcon || "", p = Q.showValueTooltip ?? !1, l = Q.tooltipBgColor || "#333333", n = Q.tooltipColor || "#ffffff", j = Q.tooltipOffsetX ?? 0, iA = Q.tooltipOffsetY ?? -25, DA = (d, v, sA, yA, m, QA, oA) => {
9802
- if ((d === "Custom" || d === "Icon") && oA)
9801
+ 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, o = Q.min ?? 0, s = (Q.max ?? 100) - o, w = s === 0 ? 0 : (i - o) / s, a = Q.trackHeight || 4, t = Q.trackRoundedness ?? 2, G = Q.trackShape ?? "Rectangle", S = Q.trackPath || "", K = Q.activeColor || "#3b82f6", y = Q.inactiveColor || "#374151", N = Q.thumbShape || "Ellipse", k = Q.thumbWidth ?? 16, e = Q.thumbHeight ?? 16, c = Q.thumbRoundedness ?? 0, M = Q.thumbColor || "#ffffff", R = Q.thumbPath || "", J = Q.thumbIcon || "", p = Q.showValueTooltip ?? !1, l = Q.tooltipBgColor || "#333333", n = Q.tooltipColor || "#ffffff", j = Q.tooltipOffsetX ?? 0, iA = Q.tooltipOffsetY ?? -25, oA = (d, P, sA, yA, m, CA, DA) => {
9802
+ if ((d === "Custom" || d === "Icon") && DA)
9803
9803
  try {
9804
- const _ = new Path2D(oA);
9805
- if (A.save(), A.translate(v, sA), d === "Icon") {
9804
+ const _ = new Path2D(DA);
9805
+ if (A.save(), A.translate(P, sA), d === "Icon") {
9806
9806
  const aA = Math.min(yA, m) / 24;
9807
9807
  A.scale(aA, aA), A.translate(-12, -12);
9808
9808
  }
@@ -9812,17 +9812,17 @@ class Ji {
9812
9812
  console.error("Error drawing slider shape in engine:", _);
9813
9813
  }
9814
9814
  if (A.beginPath(), d === "Ellipse")
9815
- A.ellipse(v, sA, yA / 2, m / 2, 0, 0, Math.PI * 2);
9815
+ A.ellipse(P, sA, yA / 2, m / 2, 0, 0, Math.PI * 2);
9816
9816
  else if (d === "Rectangle")
9817
- this.drawRoundRect(A, v - yA / 2, sA - m / 2, yA, m, QA);
9817
+ this.drawRoundRect(A, P - yA / 2, sA - m / 2, yA, m, CA);
9818
9818
  else if (d === "Triangle")
9819
- A.moveTo(v, sA - m / 2), A.lineTo(v + yA / 2, sA + m / 2), A.lineTo(v - yA / 2, sA + m / 2), A.closePath();
9819
+ A.moveTo(P, sA - m / 2), A.lineTo(P + yA / 2, sA + m / 2), A.lineTo(P - yA / 2, sA + m / 2), A.closePath();
9820
9820
  else if (d === "Diamond")
9821
- A.moveTo(v, sA - m / 2), A.lineTo(v + yA / 2, sA), A.lineTo(v, sA + m / 2), A.lineTo(v - yA / 2, sA), A.closePath();
9821
+ A.moveTo(P, sA - m / 2), A.lineTo(P + yA / 2, sA), A.lineTo(P, sA + m / 2), A.lineTo(P - yA / 2, sA), A.closePath();
9822
9822
  else if (d === "Polygon") {
9823
9823
  const _ = I.geometry.sides || 3, aA = I.geometry.radius || Math.min(yA, m) / 2;
9824
9824
  for (let kA = 0; kA < _; kA++) {
9825
- const lA = kA * 2 * Math.PI / _ - Math.PI / 2, UA = v + aA * Math.cos(lA), TA = sA + aA * Math.sin(lA);
9825
+ const lA = kA * 2 * Math.PI / _ - Math.PI / 2, UA = P + aA * Math.cos(lA), TA = sA + aA * Math.sin(lA);
9826
9826
  kA === 0 ? A.moveTo(UA, TA) : A.lineTo(UA, TA);
9827
9827
  }
9828
9828
  A.closePath();
@@ -9830,35 +9830,35 @@ class Ji {
9830
9830
  const aA = Math.min(yA, m) / 2, kA = aA / 2;
9831
9831
  for (let lA = 0; lA < 5 * 2; lA++) {
9832
9832
  const UA = lA % 2 === 0 ? aA : kA, TA = lA * Math.PI / 5 - Math.PI / 2;
9833
- A.lineTo(v + UA * Math.cos(TA), sA + UA * Math.sin(TA));
9833
+ A.lineTo(P + UA * Math.cos(TA), sA + UA * Math.sin(TA));
9834
9834
  }
9835
9835
  A.closePath();
9836
- } else d === "Line" && (A.moveTo(v - yA / 2, sA), A.lineTo(v + yA / 2, sA));
9836
+ } else d === "Line" && (A.moveTo(P - yA / 2, sA), A.lineTo(P + yA / 2, sA));
9837
9837
  A.fill();
9838
9838
  };
9839
- A.fillStyle = y, G === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) : DA(G, 0, 0, E, a, t, S);
9839
+ A.fillStyle = y, G === "Line" ? (A.strokeStyle = y, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(E / 2, 0), A.stroke()) : oA(G, 0, 0, E, a, t, S);
9840
9840
  const Z = E - k, f = -E / 2 + k / 2 + w * Z, T = f - -E / 2;
9841
9841
  T > 0 && (A.fillStyle = K, G === "Line" ? (A.strokeStyle = K, A.lineWidth = a, A.beginPath(), A.moveTo(-E / 2, 0), A.lineTo(f, 0), A.stroke()) : G === "Rectangle" && (A.beginPath(), this.drawRoundRect(A, -E / 2, -a / 2, T, a, t), A.fill())), A.save(), A.translate(f, 0);
9842
9842
  const b = A.getTransform(), H = Math.sqrt(b.a * b.a + b.b * b.b) || 1;
9843
- if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * H, A.shadowOffsetY = 1 * H, A.fillStyle = M, DA(N, 0, 0, k, e, c, N === "Icon" ? J : R), A.restore(), p) {
9843
+ if (A.shadowColor = "rgba(0,0,0,0.2)", A.shadowBlur = 4 * H, A.shadowOffsetY = 1 * H, A.fillStyle = M, oA(N, 0, 0, k, e, c, N === "Icon" ? J : R), A.restore(), p) {
9844
9844
  A.save(), A.translate(f + j, iA);
9845
9845
  const d = Math.round(i).toString();
9846
9846
  A.font = "10px Inter, sans-serif";
9847
- const v = A.measureText(d), sA = 6, yA = 4, m = v.width + sA * 2, QA = 14 + yA;
9848
- A.beginPath(), this.drawRoundRect(A, -m / 2, -QA / 2, m, QA, 4), A.fillStyle = l, A.fill(), A.fillStyle = n, A.textAlign = "center", A.textBaseline = "middle", A.fillText(d, 0, 0), A.restore();
9847
+ const P = A.measureText(d), sA = 6, yA = 4, m = P.width + sA * 2, CA = 14 + yA;
9848
+ A.beginPath(), this.drawRoundRect(A, -m / 2, -CA / 2, m, CA, 4), A.fillStyle = l, A.fill(), A.fillStyle = n, A.textAlign = "center", A.textBaseline = "middle", A.fillText(d, 0, 0), A.restore();
9849
9849
  }
9850
- const q = Q.label || {}, X = Q.helperText || {}, P = Q.fontFamily || "Inter";
9850
+ const q = Q.label || {}, X = Q.helperText || {}, v = Q.fontFamily || "Inter";
9851
9851
  if (q.visible !== !1) {
9852
- const d = q.text || "Label", v = q.fontSize || 12, sA = q.color || "rgba(156, 163, 175, 1)", yA = q.offset ?? 8;
9853
- A.font = `600 ${v}px "${P}", sans-serif`, A.fillStyle = sA, A.textAlign = "left", A.textBaseline = "bottom";
9854
- const m = -(E / 2), QA = -(a / 2) - yA;
9855
- A.fillText(d, m, QA);
9852
+ const d = q.text || "Label", P = q.fontSize || 12, sA = q.color || "rgba(156, 163, 175, 1)", yA = q.offset ?? 8;
9853
+ A.font = `600 ${P}px "${v}", sans-serif`, A.fillStyle = sA, A.textAlign = "left", A.textBaseline = "bottom";
9854
+ const m = -(E / 2), CA = -(a / 2) - yA;
9855
+ A.fillText(d, m, CA);
9856
9856
  }
9857
9857
  if (X.visible === !0) {
9858
- const d = X.text || "Helper text", v = X.fontSize || 11, sA = X.color || "rgba(156, 163, 175, 1)", yA = X.offset ?? 6;
9859
- A.font = `400 ${v}px "${P}", sans-serif`, A.fillStyle = sA, A.textAlign = "left", A.textBaseline = "top";
9860
- const m = -(E / 2), QA = a / 2 + yA;
9861
- A.fillText(d, m, QA);
9858
+ const d = X.text || "Helper text", P = X.fontSize || 11, sA = X.color || "rgba(156, 163, 175, 1)", yA = X.offset ?? 6;
9859
+ A.font = `400 ${P}px "${v}", sans-serif`, A.fillStyle = sA, A.textAlign = "left", A.textBaseline = "top";
9860
+ const m = -(E / 2), CA = a / 2 + yA;
9861
+ A.fillText(d, m, CA);
9862
9862
  }
9863
9863
  }
9864
9864
  renderDropdown(A, I) {
@@ -9874,8 +9874,8 @@ class Ji {
9874
9874
  y > 0 && (A.strokeStyle = this.createCanvasFill(A, typeof G == "string" ? { type: "Solid", color: G } : G, Q, E) || "#e5e7eb", A.lineWidth = y, A.stroke());
9875
9875
  const N = 12, k = g.chevronType || "chevron", e = g.chevronSize || 16, c = (a ? g.openIconColor : g.closedIconColor) || g.chevronColor || "#6b7280";
9876
9876
  if (k !== "none") {
9877
- const DA = i + Q - N - e / 2;
9878
- A.save(), A.translate(DA, 0);
9877
+ const oA = i + Q - N - e / 2;
9878
+ A.save(), A.translate(oA, 0);
9879
9879
  const Z = a ? g.openIconAngle ?? 180 : g.closedIconAngle ?? 0;
9880
9880
  if (A.rotate(Z * Math.PI / 180), A.strokeStyle = c, A.fillStyle = c, A.lineWidth = 1.5, A.lineCap = "round", A.lineJoin = "round", k === "chevron")
9881
9881
  A.beginPath(), A.moveTo(-e / 2, -e * 0.2), A.lineTo(0, e * 0.2), A.lineTo(e / 2, -e * 0.2), A.stroke();
@@ -9896,22 +9896,22 @@ class Ji {
9896
9896
  A.fillStyle = this.createCanvasFill(A, typeof l == "string" ? { type: "Solid", color: l } : l, Q, E) || "#333333", A.textAlign = "left", A.textBaseline = "middle";
9897
9897
  const n = k === "none" ? 0 : e + 8, j = Q - N * 2 - n;
9898
9898
  if (A.save(), A.beginPath(), A.rect(i + N, o, j, E), A.clip(), A.fillText(M, i + N, 0), A.restore(), a && !s) {
9899
- const DA = o + E + 4, Z = g.optionsList || [], f = g.itemHeight || 32, T = g.listPadding ?? 4, b = Z.length * f + T * 2, H = g.listCornerRadius ?? D;
9899
+ const oA = o + E + 4, Z = g.optionsList || [], f = g.itemHeight || 32, T = g.listPadding ?? 4, b = Z.length * f + T * 2, H = g.listCornerRadius ?? D;
9900
9900
  A.save();
9901
- const q = g.listShadow || {}, X = A.getTransform(), P = Math.sqrt(X.a * X.a + X.b * X.b) || 1;
9902
- A.shadowColor = typeof q.color == "string" ? q.color : ((iA = q.color) == null ? void 0 : iA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (q.blur ?? 12) * P, A.shadowOffsetY = (q.offsetY ?? 6) * P, A.shadowOffsetX = (q.offsetX ?? 0) * P, A.beginPath(), this.drawRoundRect(A, i, DA, Q, b, H), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, b) || "#ffffff", A.fill();
9901
+ const q = g.listShadow || {}, X = A.getTransform(), v = Math.sqrt(X.a * X.a + X.b * X.b) || 1;
9902
+ A.shadowColor = typeof q.color == "string" ? q.color : ((iA = q.color) == null ? void 0 : iA.color) || "rgba(0,0,0,0.15)", A.shadowBlur = (q.blur ?? 12) * v, A.shadowOffsetY = (q.offsetY ?? 6) * v, A.shadowOffsetX = (q.offsetX ?? 0) * v, A.beginPath(), this.drawRoundRect(A, i, oA, Q, b, H), A.fillStyle = this.createCanvasFill(A, typeof g.listBackgroundColor == "string" ? { type: "Solid", color: g.listBackgroundColor } : g.listBackgroundColor || { type: "Solid", color: "#ffffff" }, Q, b) || "#ffffff", A.fill();
9903
9903
  const d = g.listBorderWidth ?? 1;
9904
9904
  d > 0 && (A.shadowColor = "transparent", A.strokeStyle = this.createCanvasFill(A, typeof g.listBorderColor == "string" ? { type: "Solid", color: g.listBorderColor } : g.listBorderColor || { type: "Solid", color: G }, Q, b) || "#e5e7eb", A.lineWidth = d, A.stroke()), A.restore();
9905
- const v = g.itemFontSize || R, sA = g.itemFontFamily || p;
9906
- A.font = `${J} ${v}px ${sA}`, Z.forEach((yA, m) => {
9907
- const QA = DA + T + m * f;
9905
+ const P = g.itemFontSize || R, sA = g.itemFontFamily || p;
9906
+ A.font = `${J} ${P}px ${sA}`, Z.forEach((yA, m) => {
9907
+ const CA = oA + T + m * f;
9908
9908
  if (yA === g.selectedOption)
9909
- A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, f) || "#f3f4f6", A.fillRect(i + d, QA, Q - d * 2, f), A.fillStyle = g.itemSelectedColor || g.activeColor || S || "#374151";
9909
+ A.fillStyle = this.createCanvasFill(A, typeof g.itemSelectedBackgroundColor == "string" ? { type: "Solid", color: g.itemSelectedBackgroundColor } : g.itemSelectedBackgroundColor || { type: "Solid", color: "#f3f4f6" }, Q, f) || "#f3f4f6", A.fillRect(i + d, CA, Q - d * 2, f), A.fillStyle = g.itemSelectedColor || g.activeColor || S || "#374151";
9910
9910
  else if (A.fillStyle = g.listTextColor || S || "#333333", this.activeDropdownId === I.id && this._lastPointerPos) {
9911
- const _ = this._lastPointerPos.y - (DA + T), aA = Math.floor(_ / f);
9912
- m === aA && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, f) || "#f9fafb", A.fillRect(i + d, QA, Q - d * 2, f), A.fillStyle = g.itemHoverColor || S);
9911
+ const _ = this._lastPointerPos.y - (oA + T), aA = Math.floor(_ / f);
9912
+ m === aA && (A.fillStyle = this.createCanvasFill(A, typeof g.itemHoverBackgroundColor == "string" ? { type: "Solid", color: g.itemHoverBackgroundColor } : g.itemHoverBackgroundColor || { type: "Solid", color: "#f9fafb" }, Q, f) || "#f9fafb", A.fillRect(i + d, CA, Q - d * 2, f), A.fillStyle = g.itemHoverColor || S);
9913
9913
  }
9914
- A.fillText(yA, i + N, QA + f / 2);
9914
+ A.fillText(yA, i + N, CA + f / 2);
9915
9915
  });
9916
9916
  }
9917
9917
  A.globalAlpha = K;
@@ -10155,8 +10155,8 @@ class Ji {
10155
10155
  A.moveTo(I + o, C), A.lineTo(I + g - D, C), A.arcTo(I + g, C, I + g, C + D, D), A.lineTo(I + g, C + Q - s), A.arcTo(I + g, C + Q, I + g - s, C + Q, s), A.lineTo(I + w, C + Q), A.arcTo(I, C + Q, I, C + Q - w, w), A.lineTo(I, C + o), A.arcTo(I, C, I + o, C, o), A.closePath();
10156
10156
  }
10157
10157
  renderListView(A, I) {
10158
- var DA, Z, f, T;
10159
- const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((DA = I.geometry) == null ? void 0 : DA.width) || 200, E = C.height !== void 0 ? C.height : ((Z = I.geometry) == null ? void 0 : Z.height) || 300, i = -Q / 2, o = -E / 2, D = C.corner_radius !== void 0 ? C.corner_radius : g.corner_radius ?? 0, s = g.orientation || "vertical", w = g.items || [], a = g.itemGap ?? 10, t = g.itemHeight ?? 50, G = g.itemWidth ?? 200, S = g.scrollOffset ?? 0, K = g.padding ?? 0, y = g.glassEffect !== !1, N = g.accentColor || "#3b82f6", k = g.itemTextColor || "#333333", e = g.itemBackgroundColor || "#ffffff", c = g.hoveredIndex ?? null, M = g.activeItemIndex ?? null, R = g.glowIntensity ?? 0, J = g.glowColor || "#3b82f6", p = typeof J == "string" ? J : J.color || ((T = (f = J.stops) == null ? void 0 : f[0]) == null ? void 0 : T.color) || "#3b82f6", l = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
10158
+ var oA, Z, f, T;
10159
+ const C = this.objectStates.get(I.id) || {}, g = C.options || I.options || {}, Q = C.width !== void 0 ? C.width : ((oA = I.geometry) == null ? void 0 : oA.width) || 200, E = C.height !== void 0 ? C.height : ((Z = I.geometry) == null ? void 0 : Z.height) || 300, i = -Q / 2, o = -E / 2, D = C.corner_radius !== void 0 ? C.corner_radius : g.corner_radius ?? 0, s = g.orientation || "vertical", w = g.items || [], a = g.itemGap ?? 10, t = g.itemHeight ?? 50, G = g.itemWidth ?? 200, S = g.scrollOffset ?? 0, K = g.padding ?? 0, y = g.glassEffect !== !1, N = g.accentColor || "#3b82f6", k = g.itemTextColor || "#333333", e = g.itemBackgroundColor || "#ffffff", c = g.hoveredIndex ?? null, M = g.activeItemIndex ?? null, R = g.glowIntensity ?? 0, J = g.glowColor || "#3b82f6", p = typeof J == "string" ? J : J.color || ((T = (f = J.stops) == null ? void 0 : f[0]) == null ? void 0 : T.color) || "#3b82f6", l = g.opacity !== void 0 ? g.opacity : I.opacity !== void 0 ? I.opacity : 1;
10160
10160
  if (A.save(), A.globalAlpha *= l, R > 0) {
10161
10161
  const b = A.getTransform(), H = Math.sqrt(b.a * b.a + b.b * b.b) || 1;
10162
10162
  A.shadowColor = p, A.shadowBlur = R * 2 * H, A.shadowOffsetX = 0, A.shadowOffsetY = 0;
@@ -10176,31 +10176,31 @@ class Ji {
10176
10176
  const n = typeof K == "number" ? K : s === "vertical" ? K[0] : K[3];
10177
10177
  let j = (s === "vertical" ? o : i) + S + n;
10178
10178
  if (A.textBaseline = "middle", w.forEach((b, H) => {
10179
- const q = s === "vertical" ? Q : G, X = s === "vertical" ? t : E, P = s === "vertical" ? i : j, d = s === "vertical" ? j : o, v = c === H, sA = M === H;
10179
+ const q = s === "vertical" ? Q : G, X = s === "vertical" ? t : E, v = s === "vertical" ? i : j, d = s === "vertical" ? j : o, P = c === H, sA = M === H;
10180
10180
  if (sA) {
10181
10181
  const _ = this.createCanvasFill(A, N, q, X);
10182
10182
  A.fillStyle = _ || N;
10183
10183
  const aA = A.globalAlpha;
10184
- A.globalAlpha = aA * 0.8, A.fillRect(P, d, q, X), A.globalAlpha = aA;
10185
- } else if (v)
10186
- A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(P, d, q, X);
10184
+ A.globalAlpha = aA * 0.8, A.fillRect(v, d, q, X), A.globalAlpha = aA;
10185
+ } else if (P)
10186
+ A.fillStyle = y ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)", A.fillRect(v, d, q, X);
10187
10187
  else if (e !== "transparent") {
10188
10188
  const _ = this.createCanvasFill(A, e, q, X);
10189
- A.fillStyle = _ || e, A.fillRect(P, d, q, X);
10189
+ A.fillStyle = _ || e, A.fillRect(v, d, q, X);
10190
10190
  }
10191
- if (sA || v) {
10191
+ if (sA || P) {
10192
10192
  const _ = this.createCanvasFill(A, N, s === "vertical" ? 3 : q, s === "vertical" ? X : 3);
10193
- A.fillStyle = _ || N, s === "vertical" ? A.fillRect(P, d, 3, X) : A.fillRect(P, d + X - 3, q, 3);
10193
+ A.fillStyle = _ || N, s === "vertical" ? A.fillRect(v, d, 3, X) : A.fillRect(v, d + X - 3, q, 3);
10194
10194
  }
10195
10195
  const yA = sA ? "#ffffff" : y ? "rgba(255, 255, 255, 0.9)" : k;
10196
- A.fillStyle = yA, A.font = sA || v ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
10197
- const m = typeof b == "string" ? b : (b == null ? void 0 : b.label) || `Item ${H + 1}`, QA = P + (s === "vertical" ? 16 : q / 2), oA = d + X / 2;
10198
- s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(m, QA, oA), j += (s === "vertical" ? t : G) + a;
10196
+ A.fillStyle = yA, A.font = sA || P ? "600 14px Inter, sans-serif" : "400 14px Inter, sans-serif";
10197
+ const m = typeof b == "string" ? b : (b == null ? void 0 : b.label) || `Item ${H + 1}`, CA = v + (s === "vertical" ? 16 : q / 2), DA = d + X / 2;
10198
+ s === "horizontal" ? A.textAlign = "center" : A.textAlign = "left", A.fillText(m, CA, DA), j += (s === "vertical" ? t : G) + a;
10199
10199
  }), A.restore(), g.showScrollbar !== !1) {
10200
10200
  const b = (w.length || 0) * (s === "vertical" ? t : G) + ((w.length || 0) - 1) * a, H = s === "vertical" ? E : Q;
10201
10201
  if (b > H) {
10202
- const q = H / b, X = H * q, P = -S / b * H, d = g.scrollbarColor || "rgba(255,255,255,0.3)", v = g.scrollbarWidth || 4;
10203
- A.fillStyle = d, s === "vertical" ? A.fillRect(i + Q - v - 2, o + P, v, X) : A.fillRect(i + P, o + E - v - 2, X, v);
10202
+ const q = H / b, X = H * q, v = -S / b * H, d = g.scrollbarColor || "rgba(255,255,255,0.3)", P = g.scrollbarWidth || 4;
10203
+ A.fillStyle = d, s === "vertical" ? A.fillRect(i + Q - P - 2, o + v, P, X) : A.fillRect(i + v, o + E - P - 2, X, P);
10204
10204
  }
10205
10205
  }
10206
10206
  A.restore();
@@ -10224,8 +10224,8 @@ class Ji {
10224
10224
  const i = Q.width !== void 0 ? Q.width : ((n = A.geometry) == null ? void 0 : n.width) || 200, o = Q.height !== void 0 ? Q.height : ((j = A.geometry) == null ? void 0 : j.height) || 300, D = g.orientation || "vertical", s = g.itemGap ?? 10, w = g.itemHeight ?? 50, a = g.itemWidth ?? 200, t = g.scrollOffset ?? 0, G = g.padding ?? 0, S = this.getWorldTransform(A.id), K = I - S.x, y = C - S.y, N = -S.rotation * (Math.PI / 180), k = Math.cos(N), e = Math.sin(N), c = K * k - y * e, M = K * e + y * k, R = -i / 2, J = -o / 2, p = typeof G == "number" ? G : D === "vertical" ? G[0] : G[3];
10225
10225
  let l = (D === "vertical" ? J : R) + t + p;
10226
10226
  for (let iA = 0; iA < E.length; iA++) {
10227
- const DA = D === "vertical" ? i : a, Z = D === "vertical" ? w : o, f = D === "vertical" ? R : l, T = D === "vertical" ? l : J;
10228
- if (c >= f && c <= f + DA && M >= T && M <= T + Z)
10227
+ const oA = D === "vertical" ? i : a, Z = D === "vertical" ? w : o, f = D === "vertical" ? R : l, T = D === "vertical" ? l : J;
10228
+ if (c >= f && c <= f + oA && M >= T && M <= T + Z)
10229
10229
  return iA;
10230
10230
  l += (D === "vertical" ? w : a) + s;
10231
10231
  }
@@ -10245,7 +10245,7 @@ class Ji {
10245
10245
  if (!g.behaviors || g.behaviors.length === 0) return;
10246
10246
  const Q = this.objectStates.get(g.id);
10247
10247
  Q && g.behaviors.forEach((E) => {
10248
- var a, t, G, S, K, y, N, k, e, c, M, R, J, p, l, n, j, iA, DA, Z, f, T, b, H, q, X, P, d, v, sA, yA, m, QA, oA, _, aA, kA, lA, UA, TA, OA, zA, _A, EI, $A, II, aI, EA, hA, x, L, V, CA, FA, nA, tA, HA, cA, Y, pA, iI, XA, GA, u, $, KA, O, W, BA, rA, dA, MA, mA, JA, oI, rI, nI;
10248
+ var a, t, G, S, K, y, N, k, e, c, M, R, J, p, l, n, j, iA, oA, Z, f, T, b, H, q, X, v, d, P, sA, yA, m, CA, DA, _, aA, kA, lA, UA, TA, OA, zA, _A, EI, $A, II, aI, EA, hA, x, L, V, QA, FA, nA, tA, HA, cA, Y, pA, iI, XA, GA, u, $, KA, O, W, BA, rA, dA, MA, mA, JA, oI, rI, nI;
10249
10249
  if (!E.enabled) return;
10250
10250
  const i = E.startTime || 0, o = E.endTime || 1 / 0;
10251
10251
  if (this.currentTime < i || this.currentTime > o) return;
@@ -10302,7 +10302,7 @@ class Ji {
10302
10302
  Q.x -= D * gA * AA * A * 10, Q.y -= s * gA * AA * A * 10, Q.scale_x *= 1 - gA * 0.1 * AA * A, Q.scale_y *= 1 - gA * 0.1 * AA * A;
10303
10303
  }
10304
10304
  } else if (E.type === z.Dilation) {
10305
- const IA = ((DA = E.settings) == null ? void 0 : DA.size) || 120, AA = ((Z = E.settings) == null ? void 0 : Z.strength) || 1;
10305
+ const IA = ((oA = E.settings) == null ? void 0 : oA.size) || 120, AA = ((Z = E.settings) == null ? void 0 : Z.strength) || 1;
10306
10306
  if (w < IA) {
10307
10307
  const gA = 1 - w / IA;
10308
10308
  Q.scale_x *= 1 + gA * 0.5 * AA * A, Q.scale_y *= 1 + gA * 0.5 * AA * A;
@@ -10314,7 +10314,7 @@ class Ji {
10314
10314
  const IA = ((T = E.settings) == null ? void 0 : T.strength) || 0.8;
10315
10315
  w < (g.width || 100) && this.isMouseDown ? (Q.scale_y = this.lerp(Q.scale_y ?? 1, (((b = g.transform) == null ? void 0 : b.scale_y) ?? 1) * IA, 0.3), Q.scale_x = this.lerp(Q.scale_x ?? 1, (((H = g.transform) == null ? void 0 : H.scale_x) ?? 1) * (1 + (1 - IA) * 0.4), 0.3)) : (Q.scale_y = this.lerp(Q.scale_y ?? 1, ((q = g.transform) == null ? void 0 : q.scale_y) ?? 1, 0.2), Q.scale_x = this.lerp(Q.scale_x ?? 1, ((X = g.transform) == null ? void 0 : X.scale_x) ?? 1, 0.2));
10316
10316
  } else if (E.type === z.TextCounter) {
10317
- const IA = ((P = E.settings) == null ? void 0 : P.duration) || 2, AA = ((d = E.settings) == null ? void 0 : d.from) || 0, gA = ((v = E.settings) == null ? void 0 : v.to) || 100;
10317
+ const IA = ((v = E.settings) == null ? void 0 : v.duration) || 2, AA = ((d = E.settings) == null ? void 0 : d.from) || 0, gA = ((P = E.settings) == null ? void 0 : P.to) || 100;
10318
10318
  E._runtimeStart === void 0 && (E._runtimeStart = this.currentTime);
10319
10319
  const RA = this.currentTime - E._runtimeStart, ZA = Math.min(1, RA / IA), hI = Math.floor(AA + (gA - AA) * ZA);
10320
10320
  if (((sA = g.geometry) == null ? void 0 : sA.type) === "Text") {
@@ -10322,7 +10322,7 @@ class Ji {
10322
10322
  Q.geometry || (Q.geometry = { ...g.geometry }), Q.geometry.text = `${GI}${hI}${MI}`;
10323
10323
  }
10324
10324
  } else if (E.type === z.Spotlight) {
10325
- const IA = ((QA = E.settings) == null ? void 0 : QA.radius) || 250, AA = ((oA = E.settings) == null ? void 0 : oA.strength) || 1.5;
10325
+ const IA = ((CA = E.settings) == null ? void 0 : CA.radius) || 250, AA = ((DA = E.settings) == null ? void 0 : DA.strength) || 1.5;
10326
10326
  if (w < IA) {
10327
10327
  const gA = Math.pow(1 - w / IA, 2);
10328
10328
  Q.style || (Q.style = { ...g.style }), Q.style.adjustments || (Q.style.adjustments = { ...(_ = g.style) == null ? void 0 : _.adjustments }), Q.style.adjustments.exposure = (((kA = (aA = g.style) == null ? void 0 : aA.adjustments) == null ? void 0 : kA.exposure) || 0) + gA * AA * 50;
@@ -10341,7 +10341,7 @@ class Ji {
10341
10341
  this.applyBehaviorSensor(Q, gI.PositionX, RA * gA, A, E.settings), this.applyBehaviorSensor(Q, gI.PositionY, RA * gA, A, E.settings);
10342
10342
  }
10343
10343
  } else if (E.type === z.Scroll) {
10344
- const IA = ((L = E.settings) == null ? void 0 : L.axis) || "vertical", AA = ((V = E.settings) == null ? void 0 : V.factor) || 0.5, gA = ((CA = E.settings) == null ? void 0 : CA.strength) || 1, RA = ((FA = E.settings) == null ? void 0 : FA.scaleFactor) || 0;
10344
+ const IA = ((L = E.settings) == null ? void 0 : L.axis) || "vertical", AA = ((V = E.settings) == null ? void 0 : V.factor) || 0.5, gA = ((QA = E.settings) == null ? void 0 : QA.strength) || 1, RA = ((FA = E.settings) == null ? void 0 : FA.scaleFactor) || 0;
10345
10345
  (IA === "vertical" || IA === "both") && (Q.y += this.scrollOffset.y * AA * gA * A), (IA === "horizontal" || IA === "both") && (Q.x += this.scrollOffset.x * AA * gA * A), RA !== 0 && (Q.scale_x *= 1 + this.scrollOffset.y * RA * A, Q.scale_y *= 1 + this.scrollOffset.y * RA * A);
10346
10346
  } else if (E.type === z.LookAt) {
10347
10347
  const IA = ((nA = E.settings) == null ? void 0 : nA.factor) || 1, AA = ((tA = E.settings) == null ? void 0 : tA.strength) || 1, gA = Math.atan2(-s, -D) * (180 / Math.PI), RA = Q.rotation, ZA = (gA - RA + 180) % 360 - 180;
@@ -10483,66 +10483,70 @@ const Yi = hB(({
10483
10483
  interactive: l = !0,
10484
10484
  onNavigation: n
10485
10485
  }, j) => {
10486
- const iA = lI(null), DA = lI(new Ji()), Z = lI(void 0), f = lI(0), T = lI(null), b = lI(k), [, H] = yQ(B || null), q = lI(!0);
10486
+ const iA = lI(null), oA = lI(new Ji()), Z = lI(void 0), f = lI(0), T = lI(null), b = lI(k), [, H] = yQ(B || null), q = lI(!0);
10487
10487
  tB(j, () => iA.current), LI(() => (q.current = !0, () => {
10488
10488
  q.current = !1, Z.current && cancelAnimationFrame(Z.current);
10489
10489
  }), []), LI(() => {
10490
- DA.current.setLayout(g, Q);
10490
+ oA.current.setLayout(g, Q);
10491
10491
  }, [g, Q]), LI(() => {
10492
- const P = DA.current;
10493
- i && P.setTriggerCallback(i), o && P.setInputUpdateCallback((d, v) => o({ [d]: v })), D && P.setComponentChangeCallback((d) => D(d)), s && P.setToggleCallback(s), w && P.setInputChangeCallback(w), a && P.setInputFocusCallback(a), t && P.setInputBlurCallback(t), G && P.setOnLogCallback((d) => G(d, "info")), S && P.setLogicUpdateCallback(S), K && P.setButtonClickCallback(K), y && P.setGraphPointClickCallback((d) => y(d.objectId, d)), n && P.setNavigationCallback(n);
10492
+ const v = oA.current;
10493
+ i && v.setTriggerCallback(i), o && v.setInputUpdateCallback((d, P) => o({ [d]: P })), D && v.setComponentChangeCallback((d) => D(d)), s && v.setToggleCallback(s), w && v.setInputChangeCallback(w), a && v.setInputFocusCallback(a), t && v.setInputBlurCallback(t), G && v.setOnLogCallback((d) => G(d, "info")), S && v.setLogicUpdateCallback(S), K && v.setButtonClickCallback(K), y && v.setGraphPointClickCallback((d) => y(d.objectId, d)), n && v.setNavigationCallback(n);
10494
10494
  }, [i, o, D, s, w, a, t, G, S, K, y, n]), LI(() => {
10495
10495
  (async () => {
10496
10496
  let d = B;
10497
10497
  if (A && !B)
10498
10498
  try {
10499
10499
  A.startsWith("{") ? d = JSON.parse(A) : d = await (await fetch(A)).json();
10500
- } catch (v) {
10501
- console.error("[ExodeUI] Failed to load src:", v);
10500
+ } catch (P) {
10501
+ console.error("[ExodeUI] Failed to load src:", P);
10502
10502
  }
10503
10503
  if (d) {
10504
- const v = DA.current, sA = d.id || d.name || "default";
10505
- (T.current !== sA || b.current !== k) && (v.load(d), T.current = sA, b.current = k, H(d), f.current = 0, v.advance(0)), E && E(v);
10504
+ const P = oA.current, sA = d.id || d.name || "default";
10505
+ (T.current !== sA || b.current !== k) && (P.load(d), T.current = sA, b.current = k, H(d), f.current = 0, P.advance(0)), E && E(P);
10506
10506
  }
10507
10507
  })();
10508
10508
  }, [B == null ? void 0 : B.id, A, k]), LI(() => {
10509
- const P = (d) => {
10510
- if (!DA.current || !q.current) return;
10511
- const v = DA.current, sA = iA.current;
10509
+ const v = (d) => {
10510
+ if (!oA.current || !q.current) return;
10511
+ const P = oA.current, sA = iA.current;
10512
10512
  if (!sA) return;
10513
10513
  const yA = sA.getContext("2d", { willReadFrequently: !0 });
10514
10514
  if (!yA) return;
10515
10515
  const m = d / 1e3;
10516
10516
  f.current === 0 && (f.current = m);
10517
- const QA = m - f.current;
10517
+ const CA = m - f.current;
10518
10518
  f.current = m;
10519
- const oA = sA.getBoundingClientRect(), _ = window.devicePixelRatio || 1, aA = Math.round(oA.width * _), kA = Math.round(oA.height * _);
10520
- (sA.width !== aA || sA.height !== kA) && (sA.width = aA, sA.height = kA), C ? v.advance(QA) : N !== void 0 && v.seek(N), v.render(yA, sA.width, sA.height), Z.current = requestAnimationFrame(P);
10519
+ const DA = sA.getBoundingClientRect(), _ = window.devicePixelRatio || 1, aA = Math.round(DA.width * _), kA = Math.round(DA.height * _);
10520
+ (sA.width !== aA || sA.height !== kA) && (sA.width = aA, sA.height = kA), C ? P.advance(CA) : N !== void 0 && P.seek(N), P.render(yA, sA.width, sA.height), Z.current = requestAnimationFrame(v);
10521
10521
  };
10522
- return Z.current = requestAnimationFrame(P), () => {
10522
+ return Z.current = requestAnimationFrame(v), () => {
10523
10523
  Z.current && cancelAnimationFrame(Z.current);
10524
10524
  };
10525
10525
  }, [C, N]), LI(() => {
10526
- const P = DA.current;
10527
- e !== void 0 && P.updateInput("scrollY", e), c !== void 0 && P.updateInput("scrollX", c), M !== void 0 && P.updateInput("mouseX", M), R !== void 0 && P.updateInput("mouseY", R), J !== void 0 && P.updateInput("isMouseDown", J), p && Object.entries(p).forEach(([d, v]) => P.updateInput(d, v));
10526
+ const v = oA.current;
10527
+ e !== void 0 && v.updateInput("scrollY", e), c !== void 0 && v.updateInput("scrollX", c), M !== void 0 && v.updateInput("mouseX", M), R !== void 0 && v.updateInput("mouseY", R), J !== void 0 && v.updateInput("isMouseDown", J), p && Object.entries(p).forEach(([d, P]) => v.updateInput(d, P));
10528
10528
  }, [e, c, M, R, J, p]);
10529
- const X = (P, d) => {
10529
+ const X = (v, d) => {
10530
10530
  if (!l || !iA.current) return;
10531
- const v = iA.current, sA = v.getBoundingClientRect(), yA = P.clientX - sA.left, m = P.clientY - sA.top;
10532
- DA.current.handlePointerInput(d, yA, m, v.width, v.height);
10531
+ const P = iA.current, sA = P.getBoundingClientRect(), yA = v.clientX - sA.left, m = v.clientY - sA.top, CA = window.devicePixelRatio || 1;
10532
+ oA.current.handlePointerInput(d, yA * CA, m * CA, P.width, P.height);
10533
10533
  };
10534
10534
  return /* @__PURE__ */ YI(
10535
10535
  "canvas",
10536
10536
  {
10537
10537
  ref: iA,
10538
- onPointerDown: (P) => {
10538
+ onPointerDown: (v) => {
10539
10539
  var d;
10540
- X(P, "down"), (d = iA.current) == null || d.focus();
10540
+ X(v, "down"), (d = iA.current) == null || d.focus();
10541
10541
  },
10542
- onPointerMove: (P) => X(P, "move"),
10543
- onPointerUp: (P) => X(P, "up"),
10544
- onPointerCancel: (P) => X(P, "up"),
10545
- onContextMenu: (P) => P.preventDefault(),
10542
+ onPointerMove: (v) => X(v, "move"),
10543
+ onPointerUp: (v) => X(v, "up"),
10544
+ onPointerCancel: (v) => X(v, "up"),
10545
+ onClick: (v) => X(v, "click"),
10546
+ onWheel: (v) => {
10547
+ oA.current.handleWheel(v.deltaX, v.deltaY);
10548
+ },
10549
+ onContextMenu: (v) => v.preventDefault(),
10546
10550
  tabIndex: 0,
10547
10551
  style: {
10548
10552
  ...I,
@@ -10660,7 +10664,7 @@ const qi = ({ artboard: B, config: A }) => {
10660
10664
  ]
10661
10665
  }
10662
10666
  );
10663
- }, Ri = "6.3.8", Ui = {
10667
+ }, Ri = "6.3.10", Ui = {
10664
10668
  version: Ri
10665
10669
  }, pi = Ui.version;
10666
10670
  export {