@bravostudioai/react 0.1.31 → 0.1.32

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 (70) hide show
  1. package/dist/cli/commands/generate.js +69 -65
  2. package/dist/cli/commands/generate.js.map +1 -1
  3. package/dist/codegen/generator.js.map +1 -1
  4. package/dist/codegen/parser.js +256 -593
  5. package/dist/codegen/parser.js.map +1 -1
  6. package/dist/codegen/propQualification.js +117 -0
  7. package/dist/codegen/propQualification.js.map +1 -0
  8. package/dist/components/DynamicComponent.js.map +1 -1
  9. package/dist/components/EncoreApp.js +142 -275
  10. package/dist/components/EncoreApp.js.map +1 -1
  11. package/dist/components/EncoreContextProviders.js +24 -0
  12. package/dist/components/EncoreContextProviders.js.map +1 -0
  13. package/dist/components.js +179 -174
  14. package/dist/components.js.map +1 -1
  15. package/dist/hooks/useFontLoader.js +41 -0
  16. package/dist/hooks/useFontLoader.js.map +1 -0
  17. package/dist/hooks/usePusherUpdates.js +41 -45
  18. package/dist/hooks/usePusherUpdates.js.map +1 -1
  19. package/dist/hooks/useRepeatingContainers.js +79 -0
  20. package/dist/hooks/useRepeatingContainers.js.map +1 -0
  21. package/dist/index.js +13 -14
  22. package/dist/index.js.map +1 -1
  23. package/dist/lib/dataPatching.js +24 -0
  24. package/dist/lib/dataPatching.js.map +1 -0
  25. package/dist/lib/dynamicModules.js +44 -45
  26. package/dist/lib/dynamicModules.js.map +1 -1
  27. package/dist/lib/fetcher.js +6 -13
  28. package/dist/lib/fetcher.js.map +1 -1
  29. package/dist/lib/logger.js +35 -0
  30. package/dist/lib/logger.js.map +1 -0
  31. package/dist/lib/moduleRegistry.js +9 -8
  32. package/dist/lib/moduleRegistry.js.map +1 -1
  33. package/dist/src/cli/commands/generate.d.ts.map +1 -1
  34. package/dist/src/codegen/generator.d.ts +74 -0
  35. package/dist/src/codegen/generator.d.ts.map +1 -1
  36. package/dist/src/codegen/parser.d.ts +39 -0
  37. package/dist/src/codegen/parser.d.ts.map +1 -1
  38. package/dist/src/codegen/propQualification.d.ts +42 -0
  39. package/dist/src/codegen/propQualification.d.ts.map +1 -0
  40. package/dist/src/components/DynamicComponent.d.ts +1 -1
  41. package/dist/src/components/DynamicComponent.d.ts.map +1 -1
  42. package/dist/src/components/EncoreApp.d.ts +55 -2
  43. package/dist/src/components/EncoreApp.d.ts.map +1 -1
  44. package/dist/src/components/EncoreContextProviders.d.ts +34 -0
  45. package/dist/src/components/EncoreContextProviders.d.ts.map +1 -0
  46. package/dist/src/components.d.ts.map +1 -1
  47. package/dist/src/hooks/useFontLoader.d.ts +17 -0
  48. package/dist/src/hooks/useFontLoader.d.ts.map +1 -0
  49. package/dist/src/hooks/usePusherUpdates.d.ts.map +1 -1
  50. package/dist/src/hooks/useRepeatingContainers.d.ts +31 -0
  51. package/dist/src/hooks/useRepeatingContainers.d.ts.map +1 -0
  52. package/dist/src/index.d.ts +2 -0
  53. package/dist/src/index.d.ts.map +1 -1
  54. package/dist/src/lib/dataPatching.d.ts +18 -0
  55. package/dist/src/lib/dataPatching.d.ts.map +1 -0
  56. package/dist/src/lib/dynamicModules.d.ts.map +1 -1
  57. package/dist/src/lib/fetcher.d.ts.map +1 -1
  58. package/dist/src/lib/logger.d.ts +33 -0
  59. package/dist/src/lib/logger.d.ts.map +1 -0
  60. package/dist/src/lib/moduleRegistry.d.ts.map +1 -1
  61. package/dist/src/stores/useEncoreState.d.ts +43 -1
  62. package/dist/src/stores/useEncoreState.d.ts.map +1 -1
  63. package/dist/src/version.d.ts +1 -1
  64. package/dist/stores/useEncoreState.js.map +1 -1
  65. package/dist/version.js +1 -1
  66. package/dist/version.js.map +1 -1
  67. package/package.json +1 -1
  68. package/src/components/DynamicComponent.tsx +1 -1
  69. package/src/hooks/useRepeatingContainers.ts +1 -1
  70. package/src/version.ts +1 -1
@@ -10,7 +10,7 @@ const ct = x.createContext({}), V = x.createContext(
10
10
  {}
11
11
  ), st = (t) => t.replace(/#(\w{2})(\w{6})/, "#$2$1"), Gt = (t) => t.slice(1, 3) === "00", jt = (t) => {
12
12
  if (!Array.isArray(t)) return null;
13
- const r = t.find((o) => o.startsWith("input-group:"));
13
+ const r = t.find((n) => n.startsWith("input-group:"));
14
14
  if (!r) return null;
15
15
  const e = r.split(":");
16
16
  return e.length >= 3 ? { type: e[1], groupName: e[2] } : null;
@@ -18,55 +18,55 @@ const ct = x.createContext({}), V = x.createContext(
18
18
  const [t, r] = Vt({ width: 0, height: 0 }), e = x.useRef(null);
19
19
  return x.useEffect(() => {
20
20
  if (!e.current) return;
21
- const o = e.current, i = () => {
22
- const { width: n, height: m } = o.getBoundingClientRect();
23
- r({ width: n, height: m });
21
+ const n = e.current, i = () => {
22
+ const { width: o, height: m } = n.getBoundingClientRect();
23
+ r({ width: o, height: m });
24
24
  };
25
25
  i(), requestAnimationFrame(() => {
26
26
  i();
27
27
  });
28
- const l = new ResizeObserver((n) => {
29
- for (const m of n) {
28
+ const l = new ResizeObserver((o) => {
29
+ for (const m of o) {
30
30
  const a = m.contentRect;
31
31
  r({ width: a.width, height: a.height });
32
32
  }
33
33
  });
34
- return l.observe(o), () => l.disconnect();
34
+ return l.observe(n), () => l.disconnect();
35
35
  }, []), { dimensions: t, ref: e };
36
36
  }, L = (t, r = {}) => {
37
- const e = N(ct), o = N(V), i = {
37
+ const e = N(ct), n = N(V), i = {
38
38
  width: window.innerWidth,
39
39
  height: window.innerHeight
40
40
  }, l = Nt(
41
- (s) => (o.dimensions?.width ?? 0) * 0.01 * s,
42
- [o.dimensions?.width]
43
- ), n = {};
41
+ (s) => (n.dimensions?.width ?? 0) * 0.01 * s,
42
+ [n.dimensions?.width]
43
+ ), o = {};
44
44
  r = { debug: !1, ...r };
45
45
  const m = k((s) => s.fontsById || {});
46
46
  if (k((s) => s.fontsByIdFull || {}), !t || !t) return;
47
- const a = o.dimensions?.width ?? i.width, y = o.dimensions?.height ?? i.height;
48
- if (t.layout?.layoutSizingHorizontal || t.layout?.layoutSizingVertical || (t.width && a > 0 && (n.width = t.width * a * 0.01), t.aspectRatio && t.width ? a > 0 && (n.height = t.width * a * 0.01 / t.aspectRatio) : t.height && y > 0 && (n.height = t.height * y * 0.01)), !(o?.isFlex ?? !1) && t.positioning) {
47
+ const a = n.dimensions?.width ?? i.width, y = n.dimensions?.height ?? i.height;
48
+ if (t.layout?.layoutSizingHorizontal || t.layout?.layoutSizingVertical || (t.width && a > 0 && (o.width = t.width * a * 0.01), t.aspectRatio && t.width ? a > 0 && (o.height = t.width * a * 0.01 / t.aspectRatio) : t.height && y > 0 && (o.height = t.height * y * 0.01)), !(n?.isFlex ?? !1) && t.positioning) {
49
49
  const s = t.layout?.layoutSizingHorizontal === "FIXED" || t.layout?.layoutSizingVertical === "FIXED", u = s && t.positioning.top < 0 ? 0 : t.positioning.top, R = s && t.positioning.left < 0 ? 0 : t.positioning.left;
50
50
  let w = !1;
51
- t.horizontalPosition === "center" && (w = !0), n.top = `${u}%`;
51
+ t.horizontalPosition === "center" && (w = !0), o.top = `${u}%`;
52
52
  const S = !!t.inset;
53
53
  if (w) {
54
54
  if (S) {
55
55
  const W = String(t.inset).split(/\s+/);
56
- W.length === 3 ? n.inset = `${W[0]} 50% ${W[2]} auto` : W.length === 4 && (n.inset = `${W[0]} 50% ${W[2]} auto`), delete n.left, delete n.right;
56
+ W.length === 3 ? o.inset = `${W[0]} 50% ${W[2]} auto` : W.length === 4 && (o.inset = `${W[0]} 50% ${W[2]} auto`), delete o.left, delete o.right;
57
57
  } else
58
- n.left = "50%", n.right = "auto";
59
- n.transform = "translateX(-50%)";
58
+ o.left = "50%", o.right = "auto";
59
+ o.transform = "translateX(-50%)";
60
60
  } else
61
- S ? n.inset = t.inset : n.left = `${R}%`;
62
- s ? (n.right = "auto", n.bottom = "auto") : (t.positioning.bottom !== void 0 && (n.bottom = `${t.positioning.bottom}%`), t.positioning.right !== void 0 && (n.right = `${t.positioning.right}%`)), n.position = "absolute";
61
+ S ? o.inset = t.inset : o.left = `${R}%`;
62
+ s ? (o.right = "auto", o.bottom = "auto") : (t.positioning.bottom !== void 0 && (o.bottom = `${t.positioning.bottom}%`), t.positioning.right !== void 0 && (o.right = `${t.positioning.right}%`)), o.position = "absolute";
63
63
  }
64
64
  if (t.layout?.padding) {
65
65
  const s = e.scaleFactor ?? 1, u = t.layout.padding;
66
- u.top !== void 0 && (n.paddingTop = u.top * s), u.right !== void 0 && (n.paddingRight = u.right * s), u.bottom !== void 0 && (n.paddingBottom = u.bottom * s), u.left !== void 0 && (n.paddingLeft = u.left * s);
66
+ u.top !== void 0 && (o.paddingTop = u.top * s), u.right !== void 0 && (o.paddingRight = u.right * s), u.bottom !== void 0 && (o.paddingBottom = u.bottom * s), u.left !== void 0 && (o.paddingLeft = u.left * s);
67
67
  }
68
68
  if (t.layout?.mode) {
69
- n.display = "flex";
69
+ o.display = "flex";
70
70
  const s = (W) => W ? {
71
71
  MIN: "flex-start",
72
72
  MAX: "flex-end",
@@ -75,18 +75,18 @@ const ct = x.createContext({}), V = x.createContext(
75
75
  SPACE_AROUND: "space-around",
76
76
  SPACE_EVENLY: "space-evenly"
77
77
  }[W] || W.toLowerCase().replace(/_/g, "-") : void 0;
78
- t.layout.mode == "HORIZONTAL" ? (n.flexDirection = "row", t.layout.flexWrap && (n.flexWrap = t.layout.flexWrap), n.justifyContent = s(
78
+ t.layout.mode == "HORIZONTAL" ? (o.flexDirection = "row", t.layout.flexWrap && (o.flexWrap = t.layout.flexWrap), o.justifyContent = s(
79
79
  t.layout.primaryAxisAlignItems
80
- ), n.alignItems = t.layout.counterAxisAlignItems) : (n.flexDirection = "column", n.justifyContent = s(
80
+ ), o.alignItems = t.layout.counterAxisAlignItems) : (o.flexDirection = "column", o.justifyContent = s(
81
81
  t.layout.primaryAxisAlignItems
82
- ), n.alignItems = t.layout.counterAxisAlignItems), n.flexGrow = t.layout.grow, t.layout.wrap === "WRAP" || t.layout.flexWrap === "wrap" ? n.flexWrap = "wrap" : t.layout.flexWrap ? n.flexWrap = t.layout.flexWrap : n.flexWrap = "nowrap";
82
+ ), o.alignItems = t.layout.counterAxisAlignItems), o.flexGrow = t.layout.grow, t.layout.wrap === "WRAP" || t.layout.flexWrap === "wrap" ? o.flexWrap = "wrap" : t.layout.flexWrap ? o.flexWrap = t.layout.flexWrap : o.flexWrap = "nowrap";
83
83
  const u = t.layout.itemSpacing, R = e.scaleFactor ?? 1, S = t.layout.primaryAxisAlignItems === "SPACE_BETWEEN" ? 0 : (u !== void 0 ? u : 0) * R;
84
- n.gap = S === 0 ? "0px" : `${S}px`, n.rowGap = S === 0 ? "0px" : `${S}px`, n.columnGap = S === 0 ? "0px" : `${S}px`, (n.flexWrap === "wrap" || n.flexWrap === "wrap-reverse") && (n.alignContent = "flex-start"), r.debug || t.layout?.mode === "HORIZONTAL" && u === 0 ? console.log("[useEncoreStyle] Setting gap properties:", {
84
+ o.gap = S === 0 ? "0px" : `${S}px`, o.rowGap = S === 0 ? "0px" : `${S}px`, o.columnGap = S === 0 ? "0px" : `${S}px`, (o.flexWrap === "wrap" || o.flexWrap === "wrap-reverse") && (o.alignContent = "flex-start"), r.debug || t.layout?.mode === "HORIZONTAL" && u === 0 ? console.log("[useEncoreStyle] Setting gap properties:", {
85
85
  itemSpacing: u,
86
86
  spacing: S,
87
- gap: n.gap,
88
- rowGap: n.rowGap,
89
- columnGap: n.columnGap,
87
+ gap: o.gap,
88
+ rowGap: o.rowGap,
89
+ columnGap: o.columnGap,
90
90
  hasLayout: !!t.layout,
91
91
  layoutMode: t.layout?.mode
92
92
  }) : console.log(
@@ -96,36 +96,36 @@ const ct = x.createContext({}), V = x.createContext(
96
96
  u
97
97
  );
98
98
  }
99
- if (t.layout?.layoutSizingHorizontal === "FILL" && (n.width = "100%"), t.layout?.layoutSizingHorizontal === "FIXED") {
99
+ if (t.layout?.layoutSizingHorizontal === "FILL" && (o.width = "100%"), t.layout?.layoutSizingHorizontal === "FIXED") {
100
100
  const s = e.scaleFactor ?? 1;
101
- n.width = t.layout.size.x * s;
101
+ o.width = t.layout.size.x * s;
102
102
  }
103
103
  if (t.layout?.layoutSizingHorizontal, t.layout?.layoutSizingVertical === "FIXED") {
104
104
  const s = e.scaleFactor ?? 1;
105
- n.height = t.layout.size.y * s;
105
+ o.height = t.layout.size.y * s;
106
106
  }
107
107
  if (t.layout?.layoutSizingVertical === "FILL")
108
- if (!(o?.isFlex ?? !1) && t.positioning && t.positioning?.top !== void 0) {
108
+ if (!(n?.isFlex ?? !1) && t.positioning && t.positioning?.top !== void 0) {
109
109
  const w = 100 - t.positioning.top;
110
- n.height = `${w}%`;
110
+ o.height = `${w}%`;
111
111
  } else
112
- n.height = "100%";
113
- if (t.layout?.layoutSizingVertical, t.backgroundColor && !Gt(t.backgroundColor) && (n.backgroundColor = st(t.backgroundColor)), t.color && (n.color = st(t.color)), t.lineHeightPx && (n.lineHeight = (t.lineHeightPx * (e.scaleFactor ?? 1)).toString() + "px"), t.fontSize && (n.fontSize = t.fontSize * (e.scaleFactor ?? 1)), t.fontWeight && (n.fontWeight = `${t.fontWeight}`), t.opacity && (n.opacity = t.opacity * 0.01), t.fontId) {
112
+ o.height = "100%";
113
+ if (t.layout?.layoutSizingVertical, t.backgroundColor && !Gt(t.backgroundColor) && (o.backgroundColor = st(t.backgroundColor)), t.color && (o.color = st(t.color)), t.lineHeightPx && (o.lineHeight = (t.lineHeightPx * (e.scaleFactor ?? 1)).toString() + "px"), t.fontSize && (o.fontSize = t.fontSize * (e.scaleFactor ?? 1)), t.fontWeight && (o.fontWeight = `${t.fontWeight}`), t.opacity && (o.opacity = t.opacity * 0.01), t.fontId) {
114
114
  const s = m[t.fontId] || "sans-serif";
115
- n.fontFamily = `"${s}"`, console.log("[AG_DEBUG] [useEncoreStyle] Font Resolution:", {
115
+ o.fontFamily = `"${s}"`, console.log("[AG_DEBUG] [useEncoreStyle] Font Resolution:", {
116
116
  fontId: t.fontId,
117
117
  resolvedFamily: s,
118
118
  fontWeight: t.fontWeight,
119
- finalStyle: n.fontFamily
119
+ finalStyle: o.fontFamily
120
120
  });
121
121
  }
122
- if (t.borderRadius && (n.borderRadius = l(t.borderRadius)), t.cornerRadii) {
122
+ if (t.borderRadius && (o.borderRadius = l(t.borderRadius)), t.cornerRadii) {
123
123
  const s = t.cornerRadii.map(l);
124
- n.borderTopLeftRadius = s[0], n.borderTopRightRadius = s[1], n.borderBottomRightRadius = s[2], n.borderBottomLeftRadius = s[3], delete n.borderRadius;
124
+ o.borderTopLeftRadius = s[0], o.borderTopRightRadius = s[1], o.borderBottomRightRadius = s[2], o.borderBottomLeftRadius = s[3], delete o.borderRadius;
125
125
  }
126
- return t.borderWidth && (t.borderWidth > 5 ? n.borderWidth = t.borderWidth * 0.5 : n.borderWidth = t.borderWidth * 1.5), t.borderColor && (n.borderColor = st(t.borderColor)), (t.borderWidth || t.borderColor) && (n.borderStyle = "solid"), t.rotation && (n.transform = `rotate(${t.rotation}deg)`), t.textCase === "upper" && (n.textTransform = "uppercase"), t.textCase === "lower" && (n.textTransform = "lowercase"), t.letterSpacing && (n.letterSpacing = t.letterSpacing), t.textAlign && (n.textAlign = t.textAlign), r.debug && (n.borderWidth = 1, n.borderColor = "#FF0000FF", n.borderStyle = "solid"), n;
126
+ return t.borderWidth && (t.borderWidth > 5 ? o.borderWidth = t.borderWidth * 0.5 : o.borderWidth = t.borderWidth * 1.5), t.borderColor && (o.borderColor = st(t.borderColor)), (t.borderWidth || t.borderColor) && (o.borderStyle = "solid"), t.rotation && (o.transform = `rotate(${t.rotation}deg)`), t.textCase === "upper" && (o.textTransform = "uppercase"), t.textCase === "lower" && (o.textTransform = "lowercase"), t.letterSpacing && (o.letterSpacing = t.letterSpacing), t.textAlign && (o.textAlign = t.textAlign), r.debug && (o.borderWidth = 1, o.borderColor = "#FF0000FF", o.borderStyle = "solid"), o;
127
127
  }, et = ({ id: t, nodeData: r }) => {
128
- const e = N(tt), o = e?.nodeData?.[t], { patch: i, list: l } = o ?? { list: null, patch: null }, m = Array.isArray(r?.tags) && (r.tags.includes("encore:data:array") || r.tags.includes("bravo:data:array")) && e?.arrayDataById && e.arrayDataById[t] && Array.isArray(e.arrayDataById[t]) ? e.arrayDataById[t] : null;
128
+ const e = N(tt), n = e?.nodeData?.[t], { patch: i, list: l } = n ?? { list: null, patch: null }, m = Array.isArray(r?.tags) && (r.tags.includes("encore:data:array") || r.tags.includes("bravo:data:array")) && e?.arrayDataById && e.arrayDataById[t] && Array.isArray(e.arrayDataById[t]) ? e.arrayDataById[t] : null;
129
129
  let a = i ? {
130
130
  ...r,
131
131
  ...i || {},
@@ -190,15 +190,15 @@ const ct = x.createContext({}), V = x.createContext(
190
190
  id: t,
191
191
  nodeData: r,
192
192
  children: e,
193
- _parentStatefulSetId: o,
193
+ _parentStatefulSetId: n,
194
194
  _parentInputGroupInfo: i,
195
195
  _parentName: l
196
196
  }) => {
197
- const n = k((h) => h.baseURL), m = k((h) => h.appId);
197
+ const o = k((h) => h.baseURL), m = k((h) => h.appId);
198
198
  k((h) => h.pageId);
199
199
  const { onAction: a } = x.useContext(ft), { statefulSetId: y } = x.useContext(
200
200
  lt
201
- ), v = o || y, { patchedNodeData: f } = et({ id: t, nodeData: r }), s = k(
201
+ ), v = n || y, { patchedNodeData: f } = et({ id: t, nodeData: r }), s = k(
202
202
  (h) => h.setStatefulSetVariant
203
203
  ), u = k(
204
204
  (h) => h.setInputGroupValue
@@ -254,7 +254,7 @@ const ct = x.createContext({}), V = x.createContext(
254
254
  window.location.href = `tel:${h.params.phone}`;
255
255
  break;
256
256
  case "remote":
257
- const O = btoa(JSON.stringify(h.params?.data || {})), j = `${n}/devices/apps/${m}/node/${t}/trigger/${h.event}?params=${O}`, K = await Ot.post(j);
257
+ const O = btoa(JSON.stringify(h.params?.data || {})), j = `${o}/devices/apps/${m}/node/${t}/trigger/${h.event}?params=${O}`, K = await Ot.post(j);
258
258
  K.data?.action && await W(K.data);
259
259
  break;
260
260
  case "set-access-token":
@@ -388,7 +388,7 @@ const ct = x.createContext({}), V = x.createContext(
388
388
  }
389
389
  return e;
390
390
  }, ht = ({ id: t, name: r, nodeData: e }) => {
391
- const o = L(e.style, {
391
+ const n = L(e.style, {
392
392
  debug: !1
393
393
  });
394
394
  return /* @__PURE__ */ p(
@@ -397,52 +397,52 @@ const ct = x.createContext({}), V = x.createContext(
397
397
  "data-id": t,
398
398
  "data-name": r,
399
399
  "data-type": "WebViewComponent",
400
- style: { border: "none", ...o },
400
+ style: { border: "none", ...n },
401
401
  src: e.data?.params?.url
402
402
  }
403
403
  );
404
404
  }, gt = ({ id: t, name: r, nodeData: e }) => {
405
- const o = L(e.style, {
405
+ const n = L(e.style, {
406
406
  debug: !1
407
407
  });
408
- if (!o.backgroundColor && !o.borderColor)
408
+ if (!n.backgroundColor && !n.borderColor)
409
409
  return null;
410
- if (o.borderColor && !o.backgroundColor && (o.backgroundColor = "transparent"), o.borderColor && o.borderWidth) {
411
- const v = Math.max(o.borderWidth || 0, 1);
412
- (!o.width || typeof o.width == "number" && o.width === 0) && (o.width = v), (!o.height || typeof o.height == "number" && o.height === 0) && (o.height = v), o.boxSizing = "border-box";
410
+ if (n.borderColor && !n.backgroundColor && (n.backgroundColor = "transparent"), n.borderColor && n.borderWidth) {
411
+ const v = Math.max(n.borderWidth || 0, 1);
412
+ (!n.width || typeof n.width == "number" && n.width === 0) && (n.width = v), (!n.height || typeof n.height == "number" && n.height === 0) && (n.height = v), n.boxSizing = "border-box";
413
413
  }
414
- const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), l = N(V)?.isFlex ?? !1, n = e.style?.positioning, m = n && typeof n.top == "number" && typeof n.left == "number" && typeof n.right == "number" && typeof n.bottom == "number" && n.top === 0 && n.left === 0 && n.right === 0 && n.bottom === 0, a = i && (l || m), y = r && r.toLowerCase().startsWith("clip");
415
- return a && (o.position = "absolute", o.top = 0, o.left = 0, o.right = 0, o.bottom = 0, o.zIndex = -1, o.width && typeof o.width == "string" && o.width.includes("%") && delete o.width, o.height && typeof o.height == "string" && o.height.includes("%") && delete o.height), y && (o.backgroundColor = "transparent"), /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p("div", { "data-name": r, "data-type": "ColorComponent", style: o }) });
414
+ const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), l = N(V)?.isFlex ?? !1, o = e.style?.positioning, m = o && typeof o.top == "number" && typeof o.left == "number" && typeof o.right == "number" && typeof o.bottom == "number" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0, a = i && (l || m), y = r && r.toLowerCase().startsWith("clip");
415
+ return a && (n.position = "absolute", n.top = 0, n.left = 0, n.right = 0, n.bottom = 0, n.zIndex = -1, n.width && typeof n.width == "string" && n.width.includes("%") && delete n.width, n.height && typeof n.height == "string" && n.height.includes("%") && delete n.height), y && (n.backgroundColor = "transparent"), /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p("div", { "data-name": r, "data-type": "ColorComponent", style: n }) });
416
416
  }, mt = ({
417
417
  id: t,
418
418
  name: r,
419
419
  nodeData: e
420
420
  }) => {
421
- const o = L(e.style, {
421
+ const n = L(e.style, {
422
422
  debug: !1
423
- }), i = e.style, l = Array.isArray(i?.gradientColorStops) ? i.gradientColorStops.map((n) => {
424
- if (!n?.color) return null;
425
- const m = st(n.color);
426
- if (typeof n.position == "number") {
427
- const a = n.position * 100;
423
+ }), i = e.style, l = Array.isArray(i?.gradientColorStops) ? i.gradientColorStops.map((o) => {
424
+ if (!o?.color) return null;
425
+ const m = st(o.color);
426
+ if (typeof o.position == "number") {
427
+ const a = o.position * 100;
428
428
  return `${m} ${a}%`;
429
429
  }
430
430
  return m;
431
431
  }).filter(Boolean).join(", ") : "";
432
432
  if (l) {
433
- const n = i?.gradientType || "linear";
434
- o.backgroundImage = n === "radial" ? `radial-gradient(${l})` : `linear-gradient(${l})`, delete o.backgroundColor;
433
+ const o = i?.gradientType || "linear";
434
+ n.backgroundImage = o === "radial" ? `radial-gradient(${l})` : `linear-gradient(${l})`, delete n.backgroundColor;
435
435
  }
436
- return /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p("div", { "data-name": r, "data-type": "GradientComponent", style: o }) });
436
+ return /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p("div", { "data-name": r, "data-type": "GradientComponent", style: n }) });
437
437
  }, yt = ({ id: t, name: r, nodeData: e }) => {
438
- const { patchedNodeData: o } = et({ id: t, nodeData: e });
439
- e = o;
438
+ const { patchedNodeData: n } = et({ id: t, nodeData: e });
439
+ e = n;
440
440
  const i = L(e.style, {
441
441
  debug: !1
442
- }), l = N(V), n = k((u) => u.assetsById), m = e.style?.scaleMode || "fill";
442
+ }), l = N(V), o = k((u) => u.assetsById), m = e.style?.scaleMode || "fill";
443
443
  m === "fill" ? i.objectFit = "cover" : m === "fit" && (i.objectFit = "contain"), i.objectPosition = "center";
444
444
  let a = e.data?.imageUrl;
445
- !a && e.encoreData?.image && (a = e.encoreData.image.startsWith("//") ? `https:${e.encoreData.image}` : e.encoreData.image), a || (a = n[e.assetId]?.url);
445
+ !a && e.encoreData?.image && (a = e.encoreData.image.startsWith("//") ? `https:${e.encoreData.image}` : e.encoreData.image), a || (a = o[e.assetId]?.url);
446
446
  const y = e.style?.positioning, v = e.style?.aspectRatio, f = l.dimensions?.width || 0, s = l.dimensions?.height || 0;
447
447
  if (y && v && f > 0) {
448
448
  const u = typeof y.left == "number" && typeof y.right == "number", R = typeof y.top == "number" && typeof y.bottom == "number";
@@ -467,7 +467,7 @@ const ct = x.createContext({}), V = x.createContext(
467
467
  "data-name": r,
468
468
  "data-type": "ImageComponent",
469
469
  style: i,
470
- src: a || n[e.assetId]?.url,
470
+ src: a || o[e.assetId]?.url,
471
471
  alt: r
472
472
  }
473
473
  ) });
@@ -476,11 +476,11 @@ const ct = x.createContext({}), V = x.createContext(
476
476
  name: r,
477
477
  nodeData: e
478
478
  }) => {
479
- const o = k((l) => l.setFormInputValue), i = L(e.style, { debug: !1 });
479
+ const n = k((l) => l.setFormInputValue), i = L(e.style, { debug: !1 });
480
480
  return /* @__PURE__ */ p(
481
481
  "input",
482
482
  {
483
- onChange: (l) => o(t, l.target.value),
483
+ onChange: (l) => n(t, l.target.value),
484
484
  "data-id": t,
485
485
  "data-name": r,
486
486
  "data-type": "EmailInputComponent",
@@ -494,14 +494,14 @@ const ct = x.createContext({}), V = x.createContext(
494
494
  name: r,
495
495
  nodeData: e
496
496
  }) => {
497
- const o = L(e.style);
498
- return o.visibility = "hidden", /* @__PURE__ */ p(
497
+ const n = L(e.style);
498
+ return n.visibility = "hidden", /* @__PURE__ */ p(
499
499
  "input",
500
500
  {
501
501
  "data-id": t,
502
502
  "data-name": r,
503
503
  "data-type": "HiddenInputComponent",
504
- style: o,
504
+ style: n,
505
505
  type: "hidden"
506
506
  }
507
507
  );
@@ -510,7 +510,7 @@ const ct = x.createContext({}), V = x.createContext(
510
510
  name: r,
511
511
  nodeData: e
512
512
  }) => {
513
- const o = k((n) => n.setFormInputValue), i = L(e.style, { debug: !1 }), l = k((n) => n.assetsById);
513
+ const n = k((o) => o.setFormInputValue), i = L(e.style, { debug: !1 }), l = k((o) => o.assetsById);
514
514
  return /* @__PURE__ */ it(ut, { children: [
515
515
  /* @__PURE__ */ p(
516
516
  "div",
@@ -522,7 +522,7 @@ const ct = x.createContext({}), V = x.createContext(
522
522
  /* @__PURE__ */ p(
523
523
  "img",
524
524
  {
525
- onChange: (n) => o(t, n.target.value),
525
+ onChange: (o) => n(t, o.target.value),
526
526
  style: i,
527
527
  "data-id": t,
528
528
  "data-name": r,
@@ -537,11 +537,11 @@ const ct = x.createContext({}), V = x.createContext(
537
537
  name: r,
538
538
  nodeData: e
539
539
  }) => {
540
- const o = k((l) => l.setFormInputValue), i = L(e.style, { debug: !1 });
540
+ const n = k((l) => l.setFormInputValue), i = L(e.style, { debug: !1 });
541
541
  return /* @__PURE__ */ p(
542
542
  "input",
543
543
  {
544
- onChange: (l) => o(t, l.target.value),
544
+ onChange: (l) => n(t, l.target.value),
545
545
  "data-id": t,
546
546
  "data-name": r,
547
547
  "data-type": "PasswordInputComponent",
@@ -555,8 +555,8 @@ const ct = x.createContext({}), V = x.createContext(
555
555
  name: r,
556
556
  nodeData: e
557
557
  }) => {
558
- const o = k((f) => f.setFormInputValue), { onAction: i } = x.useContext(ft), { patchedNodeData: l } = et({ id: t, nodeData: e }), n = L(l.style, { debug: !1 });
559
- n.width = "100%", n.flex = "1", n.minWidth = "0", n.boxSizing = "border-box", n.borderColor = n.borderColor ?? "transparent";
558
+ const n = k((f) => f.setFormInputValue), { onAction: i } = x.useContext(ft), { patchedNodeData: l } = et({ id: t, nodeData: e }), o = L(l.style, { debug: !1 });
559
+ o.width = "100%", o.flex = "1", o.minWidth = "0", o.boxSizing = "border-box", o.borderColor = o.borderColor ?? "transparent";
560
560
  const m = l.data?.value, a = l.data?.options, y = x.useMemo(() => !a || !Array.isArray(a) ? [] : a.map((f) => typeof f == "string" ? { value: f, label: f } : f), [a]);
561
561
  return /* @__PURE__ */ it(
562
562
  "select",
@@ -565,10 +565,10 @@ const ct = x.createContext({}), V = x.createContext(
565
565
  "data-name": r,
566
566
  "data-type": "SelectInputComponent",
567
567
  value: m ?? "",
568
- style: n,
568
+ style: o,
569
569
  onChange: async (f) => {
570
570
  const s = f.target.value;
571
- if (o(t, s), console.log(`Select changed: ${s}`), typeof i == "function")
571
+ if (n(t, s), console.log(`Select changed: ${s}`), typeof i == "function")
572
572
  try {
573
573
  await i({
574
574
  bravo: {
@@ -596,13 +596,13 @@ const ct = x.createContext({}), V = x.createContext(
596
596
  name: r,
597
597
  nodeData: e
598
598
  }) => {
599
- const o = k((l) => l.setFormInputValue), i = L(e.style, {
599
+ const n = k((l) => l.setFormInputValue), i = L(e.style, {
600
600
  debug: !1
601
601
  });
602
602
  return /* @__PURE__ */ p(
603
603
  "input",
604
604
  {
605
- onChange: (l) => o(t, l.target.value),
605
+ onChange: (l) => n(t, l.target.value),
606
606
  name: t,
607
607
  "data-id": t,
608
608
  "data-name": r,
@@ -612,47 +612,52 @@ const ct = x.createContext({}), V = x.createContext(
612
612
  type: "text"
613
613
  }
614
614
  );
615
- }, wt = ({ id: t, name: r, nodeData: e }) => {
616
- const o = L(e.style);
615
+ }, wt = ({
616
+ id: t,
617
+ name: r,
618
+ nodeData: e,
619
+ children: n
620
+ }) => {
621
+ const i = L(e.style);
617
622
  return /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p(
618
623
  "div",
619
624
  {
620
625
  "data-id": t,
621
626
  "data-name": r,
622
627
  "data-type": "LottieComponent",
623
- style: o,
624
- children
628
+ style: i,
629
+ children: n
625
630
  }
626
631
  ) });
627
632
  }, At = ({ id: t, name: r, nodeData: e }) => {
628
- const o = L(e.style, {
633
+ const n = L(e.style, {
629
634
  debug: !1
630
- }), i = k((n) => n.assetsById), l = e.style?.positioning;
635
+ }), i = k((o) => o.assetsById), l = e.style?.positioning;
631
636
  if (l) {
632
- const n = typeof l.left == "number" && typeof l.right == "number", m = typeof l.top == "number" && typeof l.bottom == "number";
633
- if (n) {
637
+ const o = typeof l.left == "number" && typeof l.right == "number", m = typeof l.top == "number" && typeof l.bottom == "number";
638
+ if (o) {
634
639
  const a = 100 - l.left - l.right;
635
- o.width = `${a}%`, o.left = `${l.left}%`, delete o.right;
640
+ n.width = `${a}%`, n.left = `${l.left}%`, delete n.right;
636
641
  }
637
642
  if (m) {
638
643
  const a = 100 - l.top - l.bottom;
639
- o.height = `${a}%`, o.top = `${l.top}%`, delete o.bottom;
644
+ n.height = `${a}%`, n.top = `${l.top}%`, delete n.bottom;
640
645
  }
641
646
  }
642
- return o.objectFit || (o.objectFit = "fill"), /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p(
647
+ return n.objectFit || (n.objectFit = "fill"), /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: /* @__PURE__ */ p(
643
648
  "img",
644
649
  {
645
650
  "data-id": t,
646
651
  "data-name": r,
647
652
  "data-type": "SvgComponent",
648
- style: o,
653
+ style: n,
649
654
  src: i[e.assetId]?.url,
650
655
  alt: r
651
656
  }
652
657
  ) });
653
658
  }, Et = ({ id: t, name: r, nodeData: e }) => {
654
- const { patchedNodeData: o } = et({ id: t, nodeData: e });
655
- e = o;
659
+ const { patchedNodeData: n } = et({ id: t, nodeData: e });
660
+ e = n;
656
661
  const i = e.data?.text;
657
662
  r && r.includes("Purpose") && console.log("TextComponent Debug:", {
658
663
  id: t,
@@ -661,7 +666,7 @@ const ct = x.createContext({}), V = x.createContext(
661
666
  style: e.style,
662
667
  color: e.style?.color
663
668
  });
664
- const l = e.style, n = e.fontId ? { ...l, fontId: e.fontId } : l, m = L(n, {
669
+ const l = e.style, o = e.fontId ? { ...l, fontId: e.fontId } : l, m = L(o, {
665
670
  debug: !1
666
671
  });
667
672
  m.display = "flex", m.flexDirection = "column", l.verticalPosition && (m.justifyContent = {
@@ -686,18 +691,18 @@ const ct = x.createContext({}), V = x.createContext(
686
691
  id: t,
687
692
  name: r,
688
693
  nodeData: e,
689
- children: o
694
+ children: n
690
695
  }) => {
691
696
  const i = N(tt), { patchedNodeData: l } = et({ id: t, nodeData: e });
692
697
  e = l;
693
- const n = jt(e.tags), m = n ? k((w) => w.inputGroups[n.groupName]) : null, a = k((w) => w.statefulSetVariants[t]), y = L(e.style, {
698
+ const o = jt(e.tags), m = o ? k((w) => w.inputGroups[o.groupName]) : null, a = k((w) => w.statefulSetVariants[t]), y = L(e.style, {
694
699
  debug: !1
695
700
  });
696
701
  let v;
697
- n && m !== null ? v = m === r ? "active" : "default" : v = a || e.data.initialState || "default";
698
- const f = x.Children.toArray(o).find((w) => x.isValidElement(w) ? w.props?.nodeData?.data?.state === v : !1), s = x.isValidElement(f) ? x.cloneElement(f, {
702
+ o && m !== null ? v = m === r ? "active" : "default" : v = a || e.data.initialState || "default";
703
+ const f = x.Children.toArray(n).find((w) => x.isValidElement(w) ? w.props?.nodeData?.data?.state === v : !1), s = x.isValidElement(f) ? x.cloneElement(f, {
699
704
  _parentStatefulSetId: t,
700
- _parentInputGroupInfo: n,
705
+ _parentInputGroupInfo: o,
701
706
  _parentName: r
702
707
  // Pass the name so we can identify which element is active
703
708
  }) : f, u = /* @__PURE__ */ p(
@@ -730,10 +735,10 @@ const ct = x.createContext({}), V = x.createContext(
730
735
  id: t,
731
736
  name: r,
732
737
  nodeData: e,
733
- children: o,
738
+ children: n,
734
739
  _parentStatefulSetId: i,
735
740
  _parentInputGroupInfo: l,
736
- _parentName: n
741
+ _parentName: o
737
742
  }) => {
738
743
  const m = L(e.style, {
739
744
  debug: !1
@@ -755,15 +760,15 @@ const ct = x.createContext({}), V = x.createContext(
755
760
  nodeData: e,
756
761
  _parentStatefulSetId: i,
757
762
  _parentInputGroupInfo: l,
758
- _parentName: n,
759
- children: o
763
+ _parentName: o,
764
+ children: n
760
765
  }
761
766
  )
762
767
  }
763
768
  );
764
769
  }, Tt = ({ id: t, name: r, children: e }) => {
765
770
  N(V);
766
- const { dimensions: o, ref: i } = rt(), l = {
771
+ const { dimensions: n, ref: i } = rt(), l = {
767
772
  zIndex: 0,
768
773
  flex: 1,
769
774
  position: "absolute",
@@ -772,7 +777,7 @@ const ct = x.createContext({}), V = x.createContext(
772
777
  width: "100%",
773
778
  height: "100%"
774
779
  };
775
- return /* @__PURE__ */ p(V.Provider, { value: { dimensions: o, isFlex: !1 }, children: /* @__PURE__ */ p(
780
+ return /* @__PURE__ */ p(V.Provider, { value: { dimensions: n, isFlex: !1 }, children: /* @__PURE__ */ p(
776
781
  "div",
777
782
  {
778
783
  "data-id": t,
@@ -787,7 +792,7 @@ const ct = x.createContext({}), V = x.createContext(
787
792
  id: t,
788
793
  name: r,
789
794
  nodeData: e,
790
- children: o,
795
+ children: n,
791
796
  _arrayItemIndex: i,
792
797
  _arrayItemData: l
793
798
  }) => {
@@ -795,7 +800,7 @@ const ct = x.createContext({}), V = x.createContext(
795
800
  `[DEBUG] ContainerComponent ${t} (Hero) FULL nodeData:`,
796
801
  JSON.stringify(e, null, 2)
797
802
  );
798
- const n = N(tt), { patchedNodeData: m, list: a, arrayData: y } = et({
803
+ const o = N(tt), { patchedNodeData: m, list: a, arrayData: y } = et({
799
804
  id: t,
800
805
  nodeData: e
801
806
  });
@@ -825,9 +830,9 @@ const ct = x.createContext({}), V = x.createContext(
825
830
  if (B !== void 0) {
826
831
  const Z = typeof B == "object" && B !== null ? {
827
832
  nodeData: B,
828
- arrayDataById: n?.arrayDataById,
829
- textOverridesById: n?.textOverridesById,
830
- rootData: n?.rootData
833
+ arrayDataById: o?.arrayDataById,
834
+ textOverridesById: o?.textOverridesById,
835
+ rootData: o?.rootData
831
836
  } : { nodeData: B };
832
837
  return /* @__PURE__ */ p(tt.Provider, { value: Z, children: /* @__PURE__ */ p(
833
838
  V.Provider,
@@ -840,7 +845,7 @@ const ct = x.createContext({}), V = x.createContext(
840
845
  "data-name": r,
841
846
  "data-type": "ContainerComponent",
842
847
  style: H,
843
- children: o
848
+ children: n
844
849
  }
845
850
  )
846
851
  }
@@ -849,12 +854,12 @@ const ct = x.createContext({}), V = x.createContext(
849
854
  }
850
855
  if (a) {
851
856
  const B = y || a;
852
- return Ht(() => B.map((J, nt) => {
857
+ return Ht(() => B.map((J, ot) => {
853
858
  const Q = typeof J == "object" && J !== null ? {
854
859
  nodeData: J,
855
- arrayDataById: n?.arrayDataById,
856
- textOverridesById: n?.textOverridesById,
857
- rootData: n?.rootData
860
+ arrayDataById: o?.arrayDataById,
861
+ textOverridesById: o?.textOverridesById,
862
+ rootData: o?.rootData
858
863
  } : { nodeData: J };
859
864
  return /* @__PURE__ */ p(
860
865
  tt.Provider,
@@ -867,17 +872,17 @@ const ct = x.createContext({}), V = x.createContext(
867
872
  children: /* @__PURE__ */ p(
868
873
  "div",
869
874
  {
870
- "data-id": `${t}:${nt}`,
875
+ "data-id": `${t}:${ot}`,
871
876
  "data-name": r,
872
877
  "data-type": "ContainerComponent",
873
878
  style: H,
874
- children: o
879
+ children: n
875
880
  }
876
881
  )
877
882
  }
878
883
  )
879
884
  },
880
- `${t}:${nt}`
885
+ `${t}:${ot}`
881
886
  );
882
887
  }), [B, t]);
883
888
  }
@@ -901,15 +906,15 @@ const ct = x.createContext({}), V = x.createContext(
901
906
  "data-type": "ContainerComponent",
902
907
  ref: f,
903
908
  style: H,
904
- children: z ? /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: o }) : o
909
+ children: z ? /* @__PURE__ */ p(Y, { id: t, nodeData: e, children: n }) : n
905
910
  }
906
911
  )
907
912
  }
908
913
  );
909
- }, Pt = pt, Bt = ({ id: t, name: r, nodeData: e, children: o }) => {
910
- const { dimensions: i, ref: l } = rt(), n = L(e.style, {
914
+ }, Pt = pt, Bt = ({ id: t, name: r, nodeData: e, children: n }) => {
915
+ const { dimensions: i, ref: l } = rt(), o = L(e.style, {
911
916
  debug: !1
912
- }), m = !!e.style.layout?.mode, a = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", y = n.position ? n : { ...n, position: "relative" };
917
+ }), m = !!e.style.layout?.mode, a = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", y = o.position ? o : { ...o, position: "relative" };
913
918
  return /* @__PURE__ */ p(
914
919
  V.Provider,
915
920
  {
@@ -922,12 +927,12 @@ const ct = x.createContext({}), V = x.createContext(
922
927
  "data-type": "TopBarContainerComponent",
923
928
  ref: l,
924
929
  style: y,
925
- children: o
930
+ children: n
926
931
  }
927
932
  )
928
933
  }
929
934
  );
930
- }, Ut = ({ id: t, name: r, nodeData: e, children: o }) => {
935
+ }, Ut = ({ id: t, name: r, nodeData: e, children: n }) => {
931
936
  const i = L(e.style, { debug: !1 });
932
937
  return /* @__PURE__ */ p(
933
938
  "div",
@@ -936,19 +941,19 @@ const ct = x.createContext({}), V = x.createContext(
936
941
  "data-name": r,
937
942
  "data-type": "DefaultLayerComponent",
938
943
  style: i,
939
- children: o
944
+ children: n
940
945
  }
941
946
  );
942
- }, Lt = ({ id: t, name: r, nodeData: e, children: o }) => /* @__PURE__ */ p(
947
+ }, Lt = ({ id: t, name: r, nodeData: e, children: n }) => /* @__PURE__ */ p(
943
948
  "div",
944
949
  {
945
950
  "data-id": t,
946
951
  "data-name": r,
947
952
  "data-type": "TabsMenuComponent",
948
953
  style: L(e.style),
949
- children: o
954
+ children: n
950
955
  }
951
- ), Wt = ({ id: t, name: r, nodeData: e, children: o }) => {
956
+ ), Wt = ({ id: t, name: r, nodeData: e, children: n }) => {
952
957
  const i = L(e.style, {
953
958
  debug: !1
954
959
  });
@@ -959,15 +964,15 @@ const ct = x.createContext({}), V = x.createContext(
959
964
  "data-name": r,
960
965
  "data-type": "MenuSideComponent",
961
966
  style: i,
962
- children: o
967
+ children: n
963
968
  }
964
969
  );
965
- }, at = ({ id: t, name: r, nodeData: e, children: o }) => {
970
+ }, at = ({ id: t, name: r, nodeData: e, children: n }) => {
966
971
  t === "01KB929X1DQJN954WNGF5AH38B" && console.log(
967
972
  `[DEBUG] SliderComponent ${t} FULL nodeData:`,
968
973
  JSON.stringify(e, null, 2)
969
974
  );
970
- const { dimensions: i, ref: l } = rt(), n = x.useRef(null), m = x.useRef(null), a = x.useRef(!1), y = x.useRef(null), v = N(ct), f = N(Mt), { onAction: s } = N(ft), [u, R] = x.useState({
975
+ const { dimensions: i, ref: l } = rt(), o = x.useRef(null), m = x.useRef(null), a = x.useRef(!1), y = x.useRef(null), v = N(ct), f = N(Mt), { onAction: s } = N(ft), [u, R] = x.useState({
971
976
  currentIndex: void 0,
972
977
  onIndexChange: void 0
973
978
  }), [w, S] = x.useState(0), W = x.useRef(null), { patchedNodeData: $ } = et({ id: t, nodeData: e });
@@ -984,17 +989,17 @@ const ct = x.createContext({}), V = x.createContext(
984
989
  H || (E.width = "100%"), U || (E.height = "100%"), E.position || (E.position = "relative");
985
990
  const M = N(tt), g = x.useMemo(() => {
986
991
  const c = [];
987
- return x.Children.forEach(o, (d) => {
992
+ return x.Children.forEach(n, (d) => {
988
993
  if (d == null) return;
989
994
  const I = d?.props || {}, C = I.nodeData || {};
990
995
  if (Array.isArray(C?.tags) && (C.tags.includes("encore:data:array") || C.tags.includes("bravo:data:array")) && I.id && M) {
991
996
  const T = M?.arrayDataById && M.arrayDataById[I.id] && Array.isArray(M.arrayDataById[I.id]) ? M.arrayDataById[I.id] : null;
992
- T && T.length > 0 ? T.forEach((D, ot) => {
997
+ T && T.length > 0 ? T.forEach((D, nt) => {
993
998
  c.push(
994
999
  x.cloneElement(d, {
995
- key: `${I.id}:${ot}`,
1000
+ key: `${I.id}:${nt}`,
996
1001
  // ContainerComponent will use this to know which item to render
997
- _arrayItemIndex: ot,
1002
+ _arrayItemIndex: nt,
998
1003
  _arrayItemData: D
999
1004
  })
1000
1005
  );
@@ -1002,7 +1007,7 @@ const ct = x.createContext({}), V = x.createContext(
1002
1007
  } else
1003
1008
  c.push(d);
1004
1009
  }), c;
1005
- }, [o, t, M]), q = x.useMemo(() => {
1010
+ }, [n, t, M]), q = x.useMemo(() => {
1006
1011
  if (!A || g.length === 0)
1007
1012
  return g;
1008
1013
  const c = g[0], d = g[g.length - 1];
@@ -1021,9 +1026,9 @@ const ct = x.createContext({}), V = x.createContext(
1021
1026
  let C = 0, b = 0;
1022
1027
  return d?.layout?.layoutSizingHorizontal === "FIXED" && d?.layout?.size?.x ? C = d.layout.size.x * I : C = i.width || 0, d?.layout?.layoutSizingVertical === "FIXED" && d?.layout?.size?.y ? b = d.layout.size.y * I : b = i.height || 0, { width: C, height: b };
1023
1028
  }, [g, i.width, i.height, v.scaleFactor]), P = X.width, F = X.height, z = K === "vertical", _ = x.useCallback(() => {
1024
- if (!n.current || g.length === 0)
1029
+ if (!o.current || g.length === 0)
1025
1030
  return 0;
1026
- const c = n.current;
1031
+ const c = o.current;
1027
1032
  if (z) {
1028
1033
  if (F === 0) return 0;
1029
1034
  const d = c.scrollTop;
@@ -1049,8 +1054,8 @@ const ct = x.createContext({}), V = x.createContext(
1049
1054
  }
1050
1055
  }, [A, g.length, P, F, z]), B = x.useCallback(
1051
1056
  (c, d = !0) => {
1052
- if (!n.current || g.length === 0) return;
1053
- const I = n.current;
1057
+ if (!o.current || g.length === 0) return;
1058
+ const I = o.current;
1054
1059
  if (z) {
1055
1060
  let C;
1056
1061
  A ? C = F + c * F : C = c * F, I.scrollTo({
@@ -1067,8 +1072,8 @@ const ct = x.createContext({}), V = x.createContext(
1067
1072
  },
1068
1073
  [P, F, A, g.length, z]
1069
1074
  ), Z = x.useCallback(() => {
1070
- if (!A || !n.current || g.length === 0) return;
1071
- const c = n.current, d = 1;
1075
+ if (!A || !o.current || g.length === 0) return;
1076
+ const c = o.current, d = 1;
1072
1077
  if (z) {
1073
1078
  if (F === 0) return;
1074
1079
  const I = c.scrollTop, C = F, b = C, T = b + g.length * C;
@@ -1082,15 +1087,15 @@ const ct = x.createContext({}), V = x.createContext(
1082
1087
  x.useEffect(() => {
1083
1088
  if (!G || g.length <= 1 || P === 0) return;
1084
1089
  const c = () => {
1085
- if (a.current || !n.current) return;
1086
- const d = n.current;
1090
+ if (a.current || !o.current) return;
1091
+ const d = o.current;
1087
1092
  if (z) {
1088
1093
  if (F === 0) return;
1089
1094
  const I = d.scrollTop, C = F;
1090
1095
  let b;
1091
1096
  if (A) {
1092
- const ot = I - C;
1093
- b = Math.round(ot / C), b < 0 && (b = 0), b >= g.length && (b = g.length - 1);
1097
+ const nt = I - C;
1098
+ b = Math.round(nt / C), b < 0 && (b = 0), b >= g.length && (b = g.length - 1);
1094
1099
  } else
1095
1100
  b = Math.round(I / C);
1096
1101
  let T = b + 1;
@@ -1108,8 +1113,8 @@ const ct = x.createContext({}), V = x.createContext(
1108
1113
  const I = d.scrollLeft, C = P;
1109
1114
  let b;
1110
1115
  if (A) {
1111
- const ot = I - C;
1112
- b = Math.round(ot / C), b < 0 && (b = 0), b >= g.length && (b = g.length - 1);
1116
+ const nt = I - C;
1117
+ b = Math.round(nt / C), b < 0 && (b = 0), b >= g.length && (b = g.length - 1);
1113
1118
  } else
1114
1119
  b = Math.round(I / C);
1115
1120
  let T = b + 1;
@@ -1140,15 +1145,15 @@ const ct = x.createContext({}), V = x.createContext(
1140
1145
  a.current = !0, y.current && clearTimeout(y.current), y.current = setTimeout(() => {
1141
1146
  a.current = !1;
1142
1147
  }, 3e3);
1143
- }, []), nt = x.useRef(u);
1148
+ }, []), ot = x.useRef(u);
1144
1149
  x.useEffect(() => {
1145
- nt.current = u;
1150
+ ot.current = u;
1146
1151
  }, [u]);
1147
1152
  const Q = x.useCallback(
1148
1153
  (c) => {
1149
1154
  if (W.current === c) return;
1150
1155
  W.current = c;
1151
- const d = nt.current;
1156
+ const d = ot.current;
1152
1157
  if (d.currentIndex === void 0 && S(c), d.onIndexChange && d.onIndexChange(c), typeof s == "function")
1153
1158
  try {
1154
1159
  s({
@@ -1169,7 +1174,7 @@ const ct = x.createContext({}), V = x.createContext(
1169
1174
  // Depend on onAction to ensure we call the latest version
1170
1175
  );
1171
1176
  x.useEffect(() => {
1172
- const c = n.current;
1177
+ const c = o.current;
1173
1178
  if (!c) return;
1174
1179
  let d = null;
1175
1180
  const I = () => {
@@ -1199,7 +1204,7 @@ const ct = x.createContext({}), V = x.createContext(
1199
1204
  c && c !== u && R(c);
1200
1205
  }
1201
1206
  }, [t, f, u]), x.useEffect(() => {
1202
- if (u.currentIndex !== void 0 && n.current && g.length > 0 && P > 0) {
1207
+ if (u.currentIndex !== void 0 && o.current && g.length > 0 && P > 0) {
1203
1208
  const c = Math.max(
1204
1209
  0,
1205
1210
  Math.min(u.currentIndex, g.length - 1)
@@ -1216,10 +1221,10 @@ const ct = x.createContext({}), V = x.createContext(
1216
1221
  B,
1217
1222
  _
1218
1223
  ]), x.useEffect(() => {
1219
- if (A && n.current && g.length > 0 && g.length > 0 && (z ? F > 0 : P > 0)) {
1224
+ if (A && o.current && g.length > 0 && g.length > 0 && (z ? F > 0 : P > 0)) {
1220
1225
  const c = z ? F : P;
1221
1226
  setTimeout(() => {
1222
- n.current && (z ? n.current.scrollTop = c : n.current.scrollLeft = c);
1227
+ o.current && (z ? o.current.scrollTop = c : o.current.scrollLeft = c);
1223
1228
  }, 0);
1224
1229
  }
1225
1230
  }, [A, g.length, P, F, z]), x.useEffect(() => {
@@ -1261,7 +1266,7 @@ const ct = x.createContext({}), V = x.createContext(
1261
1266
  "data-type": "SliderComponent",
1262
1267
  ref: l,
1263
1268
  style: E,
1264
- children: /* @__PURE__ */ p("div", { ref: n, style: $t, children: q.map((c, d) => /* @__PURE__ */ p(
1269
+ children: /* @__PURE__ */ p("div", { ref: o, style: $t, children: q.map((c, d) => /* @__PURE__ */ p(
1265
1270
  V.Provider,
1266
1271
  {
1267
1272
  value: {
@@ -1279,23 +1284,23 @@ const ct = x.createContext({}), V = x.createContext(
1279
1284
  );
1280
1285
  }, kt = (t, r) => {
1281
1286
  const e = Array.isArray(t) ? t : [t];
1282
- for (const o of e)
1283
- if (!(!o || !o.props)) {
1284
- if (o.props.id === r)
1285
- return o;
1286
- if (o.props.children) {
1287
- const i = kt(o.props.children, r);
1287
+ for (const n of e)
1288
+ if (!(!n || !n.props)) {
1289
+ if (n.props.id === r)
1290
+ return n;
1291
+ if (n.props.children) {
1292
+ const i = kt(n.props.children, r);
1288
1293
  if (i) return i;
1289
1294
  }
1290
1295
  }
1291
1296
  return null;
1292
- }, Rt = ({ id: t, name: r, nodeData: e, children: o }) => {
1293
- const { dimensions: i, ref: l } = rt(), { componentId: n } = N(lt), m = N(V), a = e.style.originalSize?.[0] || 1, y = e.style.originalSize?.[1] || 1, v = m?.dimensions?.width, f = m?.dimensions?.height, s = window.innerWidth, u = window.innerHeight, R = v && v > 0 && v < s * 0.8;
1297
+ }, Rt = ({ id: t, name: r, nodeData: e, children: n }) => {
1298
+ const { dimensions: i, ref: l } = rt(), { componentId: o } = N(lt), m = N(V), a = e.style.originalSize?.[0] || 1, y = e.style.originalSize?.[1] || 1, v = m?.dimensions?.width, f = m?.dimensions?.height, s = window.innerWidth, u = window.innerHeight, R = v && v > 0 && v < s * 0.8;
1294
1299
  let w, S;
1295
1300
  i.width > 0 && i.height > 0 ? (w = i.width, S = i.height) : R && v && f || v && f && v > 0 && f > 0 ? (w = v, S = f) : (w = s, S = u);
1296
1301
  const $ = { scaleFactor: Math.min(w / a, S / y) || 1 };
1297
- if (n) {
1298
- const E = kt(o, n);
1302
+ if (o) {
1303
+ const E = kt(n, o);
1299
1304
  return E ? /* @__PURE__ */ p(ct.Provider, { value: $, children: /* @__PURE__ */ p(
1300
1305
  V.Provider,
1301
1306
  {
@@ -1307,9 +1312,9 @@ const ct = x.createContext({}), V = x.createContext(
1307
1312
  },
1308
1313
  children: E
1309
1314
  }
1310
- ) }) : (console.warn(`Child with id "${n}" not found`), null);
1315
+ ) }) : (console.warn(`Child with id "${o}" not found`), null);
1311
1316
  }
1312
- const h = Array.isArray(o) ? o : [o], { scrollableChildren: A, nonScrollableChildren: G } = h.reduce(
1317
+ const h = Array.isArray(n) ? n : [n], { scrollableChildren: A, nonScrollableChildren: G } = h.reduce(
1313
1318
  (E, H) => {
1314
1319
  const M = H.props.nodeData.type === "container:top-bar" ? "nonScrollableChildren" : "scrollableChildren";
1315
1320
  return E[M].push(H), E;
@@ -1320,8 +1325,8 @@ const ct = x.createContext({}), V = x.createContext(
1320
1325
  }
1321
1326
  );
1322
1327
  let O = e.style?.layout?.mode;
1323
- if (!O && t === "01KASW494V02Y8P5JVWV5XK62X" && (console.log("🔧 PATCHING missing layout for page", t), O = "HORIZONTAL"), !O && o) {
1324
- const E = Array.isArray(o) ? o : [o];
1328
+ if (!O && t === "01KASW494V02Y8P5JVWV5XK62X" && (console.log("🔧 PATCHING missing layout for page", t), O = "HORIZONTAL"), !O && n) {
1329
+ const E = Array.isArray(n) ? n : [n];
1325
1330
  let H = 0, U = 0;
1326
1331
  E.forEach((g) => {
1327
1332
  const q = g?.props?.nodeData?.style?.width;