@bravostudioai/react 0.1.42 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.js +529 -516
- package/dist/components.js.map +1 -1
- package/dist/src/components.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/components.tsx +126 -96
- package/src/version.ts +1 -1
package/dist/components.js
CHANGED
|
@@ -1,89 +1,95 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import v, { useContext as N, useMemo as Ht, useState as Nt, useCallback as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsx as d, jsxs as pt, Fragment as Vt } from "react/jsx-runtime";
|
|
2
|
+
import v, { useContext as N, useMemo as Ht, useState as Nt, useCallback as Ot } from "react";
|
|
3
|
+
import q from "./contexts/EncoreBindingContext.js";
|
|
4
|
+
import k from "./stores/useEncoreState.js";
|
|
5
|
+
import st from "./contexts/EncoreComponentIdContext.js";
|
|
6
|
+
import Mt from "axios";
|
|
7
|
+
import ft from "./contexts/EncoreActionContext.js";
|
|
8
|
+
import Gt from "./contexts/EncoreRepeatingContainerContext.js";
|
|
9
|
+
const lt = v.createContext({}), H = v.createContext(
|
|
10
10
|
{}
|
|
11
|
-
),
|
|
11
|
+
), at = (t) => t.replace(/#(\w{2})(\w{6})/, "#$2$1"), jt = (t) => t.slice(1, 3) === "00", Ut = (t) => {
|
|
12
12
|
if (!Array.isArray(t)) return null;
|
|
13
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;
|
|
17
|
-
},
|
|
17
|
+
}, it = () => {
|
|
18
18
|
const [t, r] = Nt({ width: 0, height: 0 }), e = v.useRef(null);
|
|
19
19
|
return v.useEffect(() => {
|
|
20
20
|
if (!e.current) return;
|
|
21
21
|
const n = e.current, i = () => {
|
|
22
|
-
const { width: o, height:
|
|
23
|
-
r({ width: o, height:
|
|
22
|
+
const { width: o, height: f } = n.getBoundingClientRect();
|
|
23
|
+
r({ width: o, height: f });
|
|
24
24
|
};
|
|
25
25
|
i(), requestAnimationFrame(() => {
|
|
26
26
|
i();
|
|
27
27
|
});
|
|
28
28
|
const s = new ResizeObserver((o) => {
|
|
29
|
-
for (const
|
|
30
|
-
const a =
|
|
29
|
+
for (const f of o) {
|
|
30
|
+
const a = f.contentRect;
|
|
31
31
|
r({ width: a.width, height: a.height });
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
return s.observe(n), () => s.disconnect();
|
|
35
35
|
}, []), { dimensions: t, ref: e };
|
|
36
|
-
},
|
|
37
|
-
const e = N(
|
|
36
|
+
}, W = (t, r = {}) => {
|
|
37
|
+
const e = N(lt), n = N(H), i = {
|
|
38
38
|
width: window.innerWidth,
|
|
39
39
|
height: window.innerHeight
|
|
40
|
-
}, s =
|
|
40
|
+
}, s = Ot(
|
|
41
41
|
(l) => (n.dimensions?.width ?? 0) * 0.01 * l,
|
|
42
42
|
[n.dimensions?.width]
|
|
43
43
|
), o = {};
|
|
44
44
|
r = { debug: !1, ...r };
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const f = k((l) => l.fontsById || {});
|
|
46
|
+
if (k((l) => l.fontsByIdFull || {}), !t || !t) return;
|
|
47
47
|
const a = n.dimensions?.width ?? i.width, h = n.dimensions?.height ?? i.height;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
t.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
t.layout?.mode === "GRID" && console.log("[DEBUG] GRID MODE DETECTED", {
|
|
49
|
+
id: "unknown",
|
|
50
|
+
// style object doesn't have ID context here easily without prop drill
|
|
51
|
+
layout: t.layout
|
|
52
|
+
}), 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 && h > 0 && (o.height = t.height * h * 0.01));
|
|
53
|
+
const g = n?.isFlex ?? !1;
|
|
54
|
+
if (!g && t.positioning) {
|
|
55
|
+
const l = t.layout?.layoutSizingHorizontal === "FIXED" || t.layout?.layoutSizingVertical === "FIXED", S = l && t.positioning.top < 0 ? 0 : t.positioning.top, w = l && t.positioning.left < 0 ? 0 : t.positioning.left;
|
|
56
|
+
let L = !1;
|
|
57
|
+
t.horizontalPosition === "center" && (L = !0), o.top = `${S}%`;
|
|
58
|
+
const E = !!t.inset;
|
|
59
|
+
if (L) {
|
|
60
|
+
if (E) {
|
|
61
|
+
const c = String(t.inset).split(/\s+/);
|
|
62
|
+
c.length === 3 ? o.inset = `${c[0]} 50% ${c[2]} auto` : c.length === 4 && (o.inset = `${c[0]} 50% ${c[2]} auto`), delete o.left, delete o.right;
|
|
57
63
|
} else
|
|
58
64
|
o.left = "50%", o.right = "auto";
|
|
59
65
|
o.transform = "translateX(-50%)";
|
|
60
66
|
} else
|
|
61
|
-
|
|
67
|
+
E ? o.inset = t.inset : o.left = `${w}%`;
|
|
62
68
|
l ? (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
69
|
}
|
|
64
70
|
if (t.layout?.padding) {
|
|
65
|
-
const l = e.scaleFactor ?? 1,
|
|
66
|
-
|
|
71
|
+
const l = e.scaleFactor ?? 1, S = t.layout.padding;
|
|
72
|
+
S.top !== void 0 && (o.paddingTop = S.top * l), S.right !== void 0 && (o.paddingRight = S.right * l), S.bottom !== void 0 && (o.paddingBottom = S.bottom * l), S.left !== void 0 && (o.paddingLeft = S.left * l);
|
|
67
73
|
}
|
|
68
74
|
if (t.layout?.mode) {
|
|
69
75
|
o.display = "flex";
|
|
70
|
-
const l = (
|
|
76
|
+
const l = (c) => c ? {
|
|
71
77
|
MIN: "flex-start",
|
|
72
78
|
MAX: "flex-end",
|
|
73
79
|
CENTER: "center",
|
|
74
80
|
SPACE_BETWEEN: "space-between",
|
|
75
81
|
SPACE_AROUND: "space-around",
|
|
76
82
|
SPACE_EVENLY: "space-evenly"
|
|
77
|
-
}[
|
|
78
|
-
t.layout.mode == "HORIZONTAL" ? (o.flexDirection = "row", t.layout.flexWrap && (o.flexWrap = t.layout.flexWrap), o.justifyContent = l(
|
|
83
|
+
}[c] || c.toLowerCase().replace(/_/g, "-") : void 0;
|
|
84
|
+
t.layout.mode == "HORIZONTAL" || t.layout.mode == "GRID" ? (o.flexDirection = "row", t.layout.flexWrap && (o.flexWrap = t.layout.flexWrap), o.justifyContent = l(
|
|
79
85
|
t.layout.primaryAxisAlignItems
|
|
80
86
|
), o.alignItems = t.layout.counterAxisAlignItems) : (o.flexDirection = "column", o.justifyContent = l(
|
|
81
87
|
t.layout.primaryAxisAlignItems
|
|
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
|
-
const
|
|
84
|
-
o.gap =
|
|
85
|
-
itemSpacing:
|
|
86
|
-
spacing:
|
|
88
|
+
), o.alignItems = t.layout.counterAxisAlignItems), o.flexGrow = t.layout.grow, t.layout.wrap === "WRAP" || t.layout.flexWrap === "wrap" || t.layout.mode === "GRID" ? o.flexWrap = "wrap" : t.layout.flexWrap ? o.flexWrap = t.layout.flexWrap : o.flexWrap = "nowrap";
|
|
89
|
+
const S = t.layout.itemSpacing, w = e.scaleFactor ?? 1, E = t.layout.primaryAxisAlignItems === "SPACE_BETWEEN" ? 0 : (S !== void 0 ? S : 0) * w;
|
|
90
|
+
o.gap = E === 0 ? "0px" : `${E}px`, o.rowGap = E === 0 ? "0px" : `${E}px`, o.columnGap = E === 0 ? "0px" : `${E}px`, (o.flexWrap === "wrap" || o.flexWrap === "wrap-reverse") && (o.alignContent = "flex-start"), r.debug || t.layout?.mode === "HORIZONTAL" && S === 0 ? console.log("[useEncoreStyle] Setting gap properties:", {
|
|
91
|
+
itemSpacing: S,
|
|
92
|
+
spacing: E,
|
|
87
93
|
gap: o.gap,
|
|
88
94
|
rowGap: o.rowGap,
|
|
89
95
|
columnGap: o.columnGap,
|
|
@@ -93,10 +99,10 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
93
99
|
"[useEncoreStyle] No gap properties set",
|
|
94
100
|
r.debug,
|
|
95
101
|
t.layout?.mode,
|
|
96
|
-
|
|
102
|
+
S
|
|
97
103
|
);
|
|
98
104
|
}
|
|
99
|
-
if (t.layout?.layoutSizingHorizontal === "FILL" && (o.width = "100%"), t.layout?.layoutSizingHorizontal === "FIXED") {
|
|
105
|
+
if (t.layout?.layoutSizingHorizontal === "FILL" && (g || (o.width = "100%")), t.layout?.layoutSizingHorizontal === "FIXED") {
|
|
100
106
|
const l = e.scaleFactor ?? 1;
|
|
101
107
|
o.width = t.layout.size.x * l;
|
|
102
108
|
}
|
|
@@ -106,12 +112,12 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
106
112
|
}
|
|
107
113
|
if (t.layout?.layoutSizingVertical === "FILL")
|
|
108
114
|
if (!(n?.isFlex ?? !1) && t.positioning && t.positioning?.top !== void 0) {
|
|
109
|
-
const
|
|
110
|
-
o.height = `${
|
|
115
|
+
const L = 100 - t.positioning.top;
|
|
116
|
+
o.height = `${L}%`;
|
|
111
117
|
} else
|
|
112
118
|
o.height = "100%";
|
|
113
|
-
t.layout?.layoutSizingVertical, t.backgroundColor && !
|
|
114
|
-
const y = (t.fontId ?
|
|
119
|
+
t.layout?.layoutSizingVertical, t.backgroundColor && !jt(t.backgroundColor) && (o.backgroundColor = at(t.backgroundColor)), t.color && (o.color = at(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);
|
|
120
|
+
const y = (t.fontId ? f[t.fontId] : void 0) || t.fontFamily || void 0;
|
|
115
121
|
if (y ? ([
|
|
116
122
|
"sans-serif",
|
|
117
123
|
"serif",
|
|
@@ -132,9 +138,9 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
132
138
|
const l = t.cornerRadii.map(s);
|
|
133
139
|
o.borderTopLeftRadius = l[0], o.borderTopRightRadius = l[1], o.borderBottomRightRadius = l[2], o.borderBottomLeftRadius = l[3], delete o.borderRadius;
|
|
134
140
|
}
|
|
135
|
-
return t.borderWidth && (t.borderWidth > 5 ? o.borderWidth = t.borderWidth * 0.5 : o.borderWidth = t.borderWidth * 1.5), t.borderColor && (o.borderColor =
|
|
136
|
-
},
|
|
137
|
-
const e = N(
|
|
141
|
+
return t.borderWidth && (t.borderWidth > 5 ? o.borderWidth = t.borderWidth * 0.5 : o.borderWidth = t.borderWidth * 1.5), t.borderColor && (o.borderColor = at(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;
|
|
142
|
+
}, J = ({ id: t, nodeData: r }) => {
|
|
143
|
+
const e = N(q), n = e?.nodeData?.[t], { patch: i, list: s } = n ?? { list: null, patch: null }, f = 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;
|
|
138
144
|
let a = i ? {
|
|
139
145
|
...r,
|
|
140
146
|
...i || {},
|
|
@@ -147,7 +153,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
147
153
|
...a,
|
|
148
154
|
data: { ...a?.data || {}, text: String(h) }
|
|
149
155
|
});
|
|
150
|
-
const
|
|
156
|
+
const I = Array.isArray(r?.tags) && (r.tags.includes("encore:data") || r.tags.includes("bravo:data")), g = e?.rootData;
|
|
151
157
|
g && g[t] && typeof g[t] == "object" && (a = {
|
|
152
158
|
...a,
|
|
153
159
|
data: {
|
|
@@ -156,31 +162,31 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
156
162
|
}
|
|
157
163
|
});
|
|
158
164
|
const y = e?.nodeData && typeof e.nodeData == "object";
|
|
159
|
-
if (
|
|
165
|
+
if (I || y) {
|
|
160
166
|
const l = e?.nodeData;
|
|
161
167
|
if (l && typeof l == "object") {
|
|
162
168
|
if (l[t] !== void 0) {
|
|
163
|
-
const
|
|
164
|
-
|
|
169
|
+
const w = l[t];
|
|
170
|
+
w && typeof w == "object" && a.data && (a = {
|
|
165
171
|
...a,
|
|
166
172
|
data: {
|
|
167
173
|
...a.data,
|
|
168
|
-
...
|
|
174
|
+
...w
|
|
169
175
|
}
|
|
170
176
|
});
|
|
171
|
-
} else if (
|
|
177
|
+
} else if (I && l.description && a.data && (a = {
|
|
172
178
|
...a,
|
|
173
179
|
data: {
|
|
174
180
|
...a.data,
|
|
175
181
|
text: l.description
|
|
176
182
|
}
|
|
177
183
|
}), l.image && a.data) {
|
|
178
|
-
const
|
|
184
|
+
const w = l.image.startsWith("//") ? `https:${l.image}` : l.image;
|
|
179
185
|
a = {
|
|
180
186
|
...a,
|
|
181
187
|
data: {
|
|
182
188
|
...a.data,
|
|
183
|
-
imageUrl:
|
|
189
|
+
imageUrl: w
|
|
184
190
|
}
|
|
185
191
|
};
|
|
186
192
|
}
|
|
@@ -189,13 +195,13 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
189
195
|
}
|
|
190
196
|
return {
|
|
191
197
|
patch: i,
|
|
192
|
-
list: s ||
|
|
198
|
+
list: s || f,
|
|
193
199
|
// Use arrayData if list is not provided
|
|
194
200
|
patchedNodeData: a,
|
|
195
|
-
arrayData:
|
|
201
|
+
arrayData: f
|
|
196
202
|
// Also return separately for components that need it
|
|
197
203
|
};
|
|
198
|
-
},
|
|
204
|
+
}, Q = ({
|
|
199
205
|
id: t,
|
|
200
206
|
nodeData: r,
|
|
201
207
|
children: e,
|
|
@@ -203,37 +209,30 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
203
209
|
_parentInputGroupInfo: i,
|
|
204
210
|
_parentName: s
|
|
205
211
|
}) => {
|
|
206
|
-
const o =
|
|
207
|
-
|
|
208
|
-
const { onAction: a } = v.useContext(
|
|
209
|
-
|
|
210
|
-
),
|
|
211
|
-
(
|
|
212
|
-
), l =
|
|
213
|
-
(
|
|
214
|
-
),
|
|
215
|
-
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
{ debug: !1 }
|
|
221
|
-
);
|
|
222
|
-
w.zIndex = 99999, w.backgroundColor = "transparent", w.position = "absolute", w.top = "0", w.left = "0", w.right = "0", w.bottom = "0", w.width = "100%", w.height = "100%", w.pointerEvents = "auto", w.isolation = "isolate";
|
|
223
|
-
const k = async (f) => {
|
|
224
|
-
let S = !1;
|
|
225
|
-
const j = () => {
|
|
226
|
-
S = !1;
|
|
212
|
+
const o = k((c) => c.baseURL), f = k((c) => c.appId);
|
|
213
|
+
k((c) => c.pageId);
|
|
214
|
+
const { onAction: a } = v.useContext(ft), { statefulSetId: h } = v.useContext(
|
|
215
|
+
st
|
|
216
|
+
), I = n || h, { patchedNodeData: g } = J({ id: t, nodeData: r }), y = k(
|
|
217
|
+
(c) => c.setStatefulSetVariant
|
|
218
|
+
), l = k(
|
|
219
|
+
(c) => c.setInputGroupValue
|
|
220
|
+
), S = k((c) => c.setAccessToken), { app: w } = k((c) => c.app);
|
|
221
|
+
w.data?.app?.startPageId, w.data?.app?.PageId;
|
|
222
|
+
const L = async (c) => {
|
|
223
|
+
let $ = !1;
|
|
224
|
+
const A = () => {
|
|
225
|
+
$ = !1;
|
|
227
226
|
};
|
|
228
227
|
if (typeof a == "function")
|
|
229
228
|
try {
|
|
230
|
-
await a({ bravo: { cancel:
|
|
229
|
+
await a({ bravo: { cancel: A, action: c, componentId: t } }), $ = !0;
|
|
231
230
|
} catch {
|
|
232
231
|
}
|
|
233
232
|
else
|
|
234
|
-
|
|
235
|
-
if (
|
|
236
|
-
switch (
|
|
233
|
+
$ = !0;
|
|
234
|
+
if ($)
|
|
235
|
+
switch (c.action) {
|
|
237
236
|
case "login":
|
|
238
237
|
// TODO firebase
|
|
239
238
|
// TODO oauth
|
|
@@ -243,7 +242,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
243
242
|
case "submit":
|
|
244
243
|
break;
|
|
245
244
|
case "email":
|
|
246
|
-
window.location.href = `mailto:${
|
|
245
|
+
window.location.href = `mailto:${c.params.email}`;
|
|
247
246
|
break;
|
|
248
247
|
case "goback":
|
|
249
248
|
break;
|
|
@@ -252,22 +251,22 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
252
251
|
case "homepage":
|
|
253
252
|
break;
|
|
254
253
|
case "logout":
|
|
255
|
-
|
|
254
|
+
S(void 0);
|
|
256
255
|
break;
|
|
257
256
|
case "none":
|
|
258
257
|
break;
|
|
259
258
|
case "openurl":
|
|
260
|
-
window.open(
|
|
259
|
+
window.open(c.params.url, "_blank");
|
|
261
260
|
break;
|
|
262
261
|
case "phone":
|
|
263
|
-
window.location.href = `tel:${
|
|
262
|
+
window.location.href = `tel:${c.params.phone}`;
|
|
264
263
|
break;
|
|
265
264
|
case "remote":
|
|
266
|
-
const
|
|
267
|
-
|
|
265
|
+
const O = btoa(JSON.stringify(c.params?.data || {})), U = `${o}/devices/apps/${f}/node/${t}/trigger/${c.event}?params=${O}`, M = await Mt.post(U);
|
|
266
|
+
M.data?.action && await L(M.data);
|
|
268
267
|
break;
|
|
269
268
|
case "set-access-token":
|
|
270
|
-
|
|
269
|
+
S(c.params);
|
|
271
270
|
break;
|
|
272
271
|
case "set-state":
|
|
273
272
|
if (i && s)
|
|
@@ -293,65 +292,60 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
293
292
|
componentId: t
|
|
294
293
|
}
|
|
295
294
|
}), console.log("✅ Input group change event fired");
|
|
296
|
-
} catch (
|
|
297
|
-
console.error("❌ Error in onAction callback:",
|
|
295
|
+
} catch (G) {
|
|
296
|
+
console.error("❌ Error in onAction callback:", G);
|
|
298
297
|
}
|
|
299
298
|
else
|
|
300
299
|
console.warn("⚠️ No onAction callback provided");
|
|
301
300
|
else {
|
|
302
|
-
let
|
|
303
|
-
if (!
|
|
301
|
+
let G = I || c.params?.stateSetId || g.data?.stateSetId;
|
|
302
|
+
if (!G) {
|
|
304
303
|
console.error("❌ No stateSetId found in action or nodeData!", {
|
|
305
|
-
actionParams:
|
|
304
|
+
actionParams: c.params,
|
|
306
305
|
nodeDataStateSetId: g.data?.stateSetId,
|
|
307
|
-
parentStatefulSetId:
|
|
306
|
+
parentStatefulSetId: I
|
|
308
307
|
});
|
|
309
308
|
break;
|
|
310
309
|
}
|
|
311
|
-
y(
|
|
310
|
+
y(G, c.params.state);
|
|
312
311
|
}
|
|
313
312
|
break;
|
|
314
313
|
case "showalert":
|
|
315
|
-
alert(
|
|
314
|
+
alert(c.params.message);
|
|
316
315
|
break;
|
|
317
316
|
default:
|
|
318
|
-
console.log(
|
|
317
|
+
console.log(c), alert(c.action);
|
|
319
318
|
}
|
|
320
319
|
};
|
|
321
320
|
if (r.href)
|
|
322
|
-
return /* @__PURE__ */
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
{
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
e
|
|
343
|
-
] });
|
|
344
|
-
let P = g.actions && g.actions.length > 0 ? g.actions : r.actions || [];
|
|
345
|
-
if (F && P.length > 0 && (P = P.map((f) => f.action === "set-state" ? (f.params?.stateSetId, {
|
|
346
|
-
...f,
|
|
321
|
+
return /* @__PURE__ */ d(
|
|
322
|
+
"div",
|
|
323
|
+
{
|
|
324
|
+
onClick: () => L({
|
|
325
|
+
action: "goto",
|
|
326
|
+
params: { href: r.href },
|
|
327
|
+
event: "tap"
|
|
328
|
+
}),
|
|
329
|
+
style: {
|
|
330
|
+
display: "contents",
|
|
331
|
+
cursor: "pointer"
|
|
332
|
+
},
|
|
333
|
+
role: "button",
|
|
334
|
+
"aria-label": `Go to ${r.href}`,
|
|
335
|
+
children: e
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
let E = g.actions && g.actions.length > 0 ? g.actions : r.actions || [];
|
|
339
|
+
if (I && E.length > 0 && (E = E.map((c) => c.action === "set-state" ? (c.params?.stateSetId, {
|
|
340
|
+
...c,
|
|
347
341
|
params: {
|
|
348
|
-
...
|
|
349
|
-
stateSetId:
|
|
342
|
+
...c.params,
|
|
343
|
+
stateSetId: I
|
|
350
344
|
// Always use parent's id
|
|
351
345
|
}
|
|
352
|
-
}) :
|
|
346
|
+
}) : c)), E.length === 0 && (g.data?.stateSetId || I))
|
|
353
347
|
if (i && s)
|
|
354
|
-
|
|
348
|
+
E = [
|
|
355
349
|
{
|
|
356
350
|
action: "set-state",
|
|
357
351
|
params: {
|
|
@@ -362,13 +356,13 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
362
356
|
}
|
|
363
357
|
];
|
|
364
358
|
else {
|
|
365
|
-
const
|
|
366
|
-
|
|
359
|
+
const c = I || g.data.stateSetId;
|
|
360
|
+
c ? E = [
|
|
367
361
|
{
|
|
368
362
|
action: "set-state",
|
|
369
363
|
params: {
|
|
370
|
-
state:
|
|
371
|
-
stateSetId:
|
|
364
|
+
state: k.getState().statefulSetVariants[c] === "active" ? "default" : "active",
|
|
365
|
+
stateSetId: c
|
|
372
366
|
// Use parent's id or button's stateSetId
|
|
373
367
|
},
|
|
374
368
|
event: "tap"
|
|
@@ -378,26 +372,36 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
378
372
|
{ id: t, name: r.name }
|
|
379
373
|
);
|
|
380
374
|
}
|
|
381
|
-
if (
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
375
|
+
if (E && E.length > 0) {
|
|
376
|
+
const c = E[0];
|
|
377
|
+
if (c.event === "tap") {
|
|
378
|
+
const $ = (O) => {
|
|
379
|
+
O.stopPropagation(), L(c);
|
|
380
|
+
}, A = {
|
|
381
|
+
display: "contents",
|
|
382
|
+
cursor: "pointer"
|
|
383
|
+
// Ensure the wrapper doesn't block pointer events, but its children should capture them.
|
|
384
|
+
// pointerEvents: 'auto' is default.
|
|
385
|
+
};
|
|
386
|
+
return c.action === "openurl" && c.params?.url ? /* @__PURE__ */ d(
|
|
387
|
+
"a",
|
|
387
388
|
{
|
|
388
|
-
|
|
389
|
-
|
|
389
|
+
href: c.params.url,
|
|
390
|
+
target: "_blank",
|
|
391
|
+
rel: "noopener noreferrer",
|
|
392
|
+
onClick: (O) => {
|
|
393
|
+
O.stopPropagation();
|
|
390
394
|
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
395
|
+
style: A,
|
|
396
|
+
"aria-label": r.name || "Open Link",
|
|
397
|
+
children: e
|
|
394
398
|
}
|
|
395
|
-
)
|
|
396
|
-
|
|
399
|
+
) : /* @__PURE__ */ d("div", { onClick: $, style: A, children: e });
|
|
400
|
+
}
|
|
397
401
|
}
|
|
398
402
|
return e;
|
|
399
|
-
},
|
|
400
|
-
const { patchedNodeData: n } =
|
|
403
|
+
}, ct = ({ id: t, name: r, nodeData: e }) => {
|
|
404
|
+
const { patchedNodeData: n } = J({ id: t, nodeData: e }), i = W(n.style, {
|
|
401
405
|
debug: !1
|
|
402
406
|
});
|
|
403
407
|
return /* @__PURE__ */ d(
|
|
@@ -411,85 +415,85 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
411
415
|
}
|
|
412
416
|
);
|
|
413
417
|
}, Xt = ({ id: t, name: r, nodeData: e }) => {
|
|
414
|
-
const { patchedNodeData: n } =
|
|
418
|
+
const { patchedNodeData: n } = J({ id: t, nodeData: e });
|
|
415
419
|
e = n;
|
|
416
|
-
const i =
|
|
420
|
+
const i = W(e.style, {
|
|
417
421
|
debug: !1
|
|
418
|
-
}), s =
|
|
422
|
+
}), s = k((a) => a.assetsById), o = e.style?.scaleMode || "fill";
|
|
419
423
|
o === "fill" ? i.objectFit = "cover" : o === "fit" && (i.objectFit = "contain"), i.objectPosition = "center";
|
|
420
|
-
let
|
|
421
|
-
return !
|
|
424
|
+
let f = e.data?.videoUrl;
|
|
425
|
+
return !f && e.encoreData?.video && (f = e.encoreData.video), f || (f = s[e.assetId]?.url), !f && !i.backgroundColor && !i.borderColor ? null : /* @__PURE__ */ d(
|
|
422
426
|
"video",
|
|
423
427
|
{
|
|
424
428
|
"data-id": t,
|
|
425
429
|
"data-name": r,
|
|
426
430
|
"data-type": "VideoComponent",
|
|
427
431
|
style: { ...i },
|
|
428
|
-
src:
|
|
432
|
+
src: f,
|
|
429
433
|
controls: !0,
|
|
430
434
|
playsInline: !0
|
|
431
435
|
}
|
|
432
436
|
);
|
|
433
|
-
},
|
|
434
|
-
const n =
|
|
437
|
+
}, ht = ({ id: t, name: r, nodeData: e }) => {
|
|
438
|
+
const n = W(e.style, {
|
|
435
439
|
debug: !1
|
|
436
440
|
});
|
|
437
441
|
if (!n.backgroundColor && !n.borderColor)
|
|
438
442
|
return null;
|
|
439
443
|
if (n.borderColor && !n.backgroundColor && (n.backgroundColor = "transparent"), n.borderColor && n.borderWidth) {
|
|
440
|
-
const
|
|
441
|
-
(!n.width || typeof n.width == "number" && n.width === 0) && (n.width =
|
|
444
|
+
const I = Math.max(n.borderWidth || 0, 1);
|
|
445
|
+
(!n.width || typeof n.width == "number" && n.width === 0) && (n.width = I), (!n.height || typeof n.height == "number" && n.height === 0) && (n.height = I), n.boxSizing = "border-box";
|
|
442
446
|
}
|
|
443
|
-
const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), s = N(H)?.isFlex ?? !1, o = e.style?.positioning,
|
|
444
|
-
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), h && (n.backgroundColor = "transparent"), /* @__PURE__ */ d(
|
|
445
|
-
},
|
|
447
|
+
const i = Array.isArray(e.tags) && e.tags.includes("bravo:layer"), s = N(H)?.isFlex ?? !1, o = e.style?.positioning, f = 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 && (s || f), h = r && r.toLowerCase().startsWith("clip");
|
|
448
|
+
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), h && (n.backgroundColor = "transparent"), /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d("div", { "data-name": r, "data-type": "ColorComponent", style: n }) });
|
|
449
|
+
}, gt = ({
|
|
446
450
|
id: t,
|
|
447
451
|
name: r,
|
|
448
452
|
nodeData: e
|
|
449
453
|
}) => {
|
|
450
|
-
const n =
|
|
454
|
+
const n = W(e.style, {
|
|
451
455
|
debug: !1
|
|
452
456
|
}), i = e.style, s = Array.isArray(i?.gradientColorStops) ? i.gradientColorStops.map((o) => {
|
|
453
457
|
if (!o?.color) return null;
|
|
454
|
-
const
|
|
458
|
+
const f = at(o.color);
|
|
455
459
|
if (typeof o.position == "number") {
|
|
456
460
|
const a = o.position * 100;
|
|
457
|
-
return `${
|
|
461
|
+
return `${f} ${a}%`;
|
|
458
462
|
}
|
|
459
|
-
return
|
|
463
|
+
return f;
|
|
460
464
|
}).filter(Boolean).join(", ") : "";
|
|
461
465
|
if (s) {
|
|
462
466
|
const o = i?.gradientType || "linear";
|
|
463
467
|
n.backgroundImage = o === "radial" ? `radial-gradient(${s})` : `linear-gradient(${s})`, delete n.backgroundColor;
|
|
464
468
|
}
|
|
465
|
-
return /* @__PURE__ */ d(
|
|
466
|
-
},
|
|
467
|
-
const { patchedNodeData: n } =
|
|
469
|
+
return /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d("div", { "data-name": r, "data-type": "GradientComponent", style: n }) });
|
|
470
|
+
}, mt = ({ id: t, name: r, nodeData: e }) => {
|
|
471
|
+
const { patchedNodeData: n } = J({ id: t, nodeData: e });
|
|
468
472
|
e = n;
|
|
469
|
-
const i =
|
|
473
|
+
const i = W(e.style, {
|
|
470
474
|
debug: !1
|
|
471
|
-
}), s = N(H), o =
|
|
472
|
-
|
|
475
|
+
}), s = N(H), o = k((l) => l.assetsById), f = e.style?.scaleMode || "fill";
|
|
476
|
+
f === "fill" ? i.objectFit = "cover" : f === "fit" && (i.objectFit = "contain"), i.objectPosition = "center";
|
|
473
477
|
let a = e.data?.imageUrl;
|
|
474
478
|
!a && e.encoreData?.image && (a = e.encoreData.image.startsWith("//") ? `https:${e.encoreData.image}` : e.encoreData.image), a || (a = o[e.assetId]?.url);
|
|
475
|
-
const h = e.style?.positioning,
|
|
476
|
-
if (h &&
|
|
477
|
-
const l = typeof h.left == "number" && typeof h.right == "number",
|
|
479
|
+
const h = e.style?.positioning, I = e.style?.aspectRatio, g = s.dimensions?.width || 0, y = s.dimensions?.height || 0;
|
|
480
|
+
if (h && I && g > 0) {
|
|
481
|
+
const l = typeof h.left == "number" && typeof h.right == "number", S = typeof h.top == "number" && typeof h.bottom == "number";
|
|
478
482
|
if (l) {
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
481
|
-
const
|
|
482
|
-
i.width =
|
|
483
|
+
const w = 100 - h.left - h.right;
|
|
484
|
+
if (w > 0) {
|
|
485
|
+
const L = w * g / 100;
|
|
486
|
+
i.width = L, i.height = L / I, i.left = `${Math.max(0, h.left)}%`, i.top = `${Math.max(0, h.top)}%`, delete i.right, delete i.bottom;
|
|
483
487
|
}
|
|
484
|
-
} else if (
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
const
|
|
488
|
-
i.height =
|
|
488
|
+
} else if (S && y > 0) {
|
|
489
|
+
const w = 100 - h.top - h.bottom;
|
|
490
|
+
if (w > 0) {
|
|
491
|
+
const L = w * y / 100;
|
|
492
|
+
i.height = L, i.width = L * I, i.left = `${Math.max(0, h.left)}%`, i.top = `${Math.max(0, h.top)}%`, delete i.right, delete i.bottom;
|
|
489
493
|
}
|
|
490
494
|
}
|
|
491
495
|
}
|
|
492
|
-
return /* @__PURE__ */ d(
|
|
496
|
+
return /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
|
|
493
497
|
"img",
|
|
494
498
|
{
|
|
495
499
|
"data-id": t,
|
|
@@ -500,12 +504,12 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
500
504
|
alt: r
|
|
501
505
|
}
|
|
502
506
|
) });
|
|
503
|
-
},
|
|
507
|
+
}, yt = ({
|
|
504
508
|
id: t,
|
|
505
509
|
name: r,
|
|
506
510
|
nodeData: e
|
|
507
511
|
}) => {
|
|
508
|
-
const n =
|
|
512
|
+
const n = k((s) => s.setFormInputValue), i = W(e.style, { debug: !1 });
|
|
509
513
|
return /* @__PURE__ */ d(
|
|
510
514
|
"input",
|
|
511
515
|
{
|
|
@@ -518,12 +522,12 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
518
522
|
type: "email"
|
|
519
523
|
}
|
|
520
524
|
);
|
|
521
|
-
},
|
|
525
|
+
}, bt = ({
|
|
522
526
|
id: t,
|
|
523
527
|
name: r,
|
|
524
528
|
nodeData: e
|
|
525
529
|
}) => {
|
|
526
|
-
const n =
|
|
530
|
+
const n = W(e.style);
|
|
527
531
|
return n.visibility = "hidden", /* @__PURE__ */ d(
|
|
528
532
|
"input",
|
|
529
533
|
{
|
|
@@ -534,13 +538,13 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
534
538
|
type: "hidden"
|
|
535
539
|
}
|
|
536
540
|
);
|
|
537
|
-
},
|
|
541
|
+
}, Ct = ({
|
|
538
542
|
id: t,
|
|
539
543
|
name: r,
|
|
540
544
|
nodeData: e
|
|
541
545
|
}) => {
|
|
542
|
-
const n =
|
|
543
|
-
return /* @__PURE__ */
|
|
546
|
+
const n = k((o) => o.setFormInputValue), i = W(e.style, { debug: !1 }), s = k((o) => o.assetsById);
|
|
547
|
+
return /* @__PURE__ */ pt(Vt, { children: [
|
|
544
548
|
/* @__PURE__ */ d(
|
|
545
549
|
"div",
|
|
546
550
|
{
|
|
@@ -561,12 +565,12 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
561
565
|
}
|
|
562
566
|
)
|
|
563
567
|
] });
|
|
564
|
-
},
|
|
568
|
+
}, vt = ({
|
|
565
569
|
id: t,
|
|
566
570
|
name: r,
|
|
567
571
|
nodeData: e
|
|
568
572
|
}) => {
|
|
569
|
-
const n =
|
|
573
|
+
const n = k((s) => s.setFormInputValue), i = W(e.style, { debug: !1 });
|
|
570
574
|
return /* @__PURE__ */ d(
|
|
571
575
|
"input",
|
|
572
576
|
{
|
|
@@ -579,21 +583,21 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
579
583
|
type: "password"
|
|
580
584
|
}
|
|
581
585
|
);
|
|
582
|
-
},
|
|
586
|
+
}, xt = ({
|
|
583
587
|
id: t,
|
|
584
588
|
name: r,
|
|
585
589
|
nodeData: e
|
|
586
590
|
}) => {
|
|
587
|
-
const n =
|
|
591
|
+
const n = k((g) => g.setFormInputValue), { onAction: i } = v.useContext(ft), { patchedNodeData: s } = J({ id: t, nodeData: e }), o = W(s.style, { debug: !1 });
|
|
588
592
|
o.width = "100%", o.flex = "1", o.minWidth = "0", o.boxSizing = "border-box", o.borderColor = o.borderColor ?? "transparent";
|
|
589
|
-
const
|
|
590
|
-
return /* @__PURE__ */
|
|
593
|
+
const f = s.data?.value, a = s.data?.options, h = v.useMemo(() => !a || !Array.isArray(a) ? [] : a.map((g) => typeof g == "string" ? { value: g, label: g } : g), [a]);
|
|
594
|
+
return /* @__PURE__ */ pt(
|
|
591
595
|
"select",
|
|
592
596
|
{
|
|
593
597
|
"data-id": t,
|
|
594
598
|
"data-name": r,
|
|
595
599
|
"data-type": "SelectInputComponent",
|
|
596
|
-
value:
|
|
600
|
+
value: f ?? "",
|
|
597
601
|
style: o,
|
|
598
602
|
onChange: async (g) => {
|
|
599
603
|
const y = g.target.value;
|
|
@@ -620,12 +624,12 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
620
624
|
]
|
|
621
625
|
}
|
|
622
626
|
);
|
|
623
|
-
},
|
|
627
|
+
}, St = ({
|
|
624
628
|
id: t,
|
|
625
629
|
name: r,
|
|
626
630
|
nodeData: e
|
|
627
631
|
}) => {
|
|
628
|
-
const n =
|
|
632
|
+
const n = k((s) => s.setFormInputValue), i = W(e.style, {
|
|
629
633
|
debug: !1
|
|
630
634
|
});
|
|
631
635
|
return /* @__PURE__ */ d(
|
|
@@ -641,14 +645,14 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
641
645
|
type: "text"
|
|
642
646
|
}
|
|
643
647
|
);
|
|
644
|
-
},
|
|
648
|
+
}, It = ({
|
|
645
649
|
id: t,
|
|
646
650
|
name: r,
|
|
647
651
|
nodeData: e,
|
|
648
652
|
children: n
|
|
649
653
|
}) => {
|
|
650
|
-
const i =
|
|
651
|
-
return /* @__PURE__ */ d(
|
|
654
|
+
const i = W(e.style);
|
|
655
|
+
return /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
|
|
652
656
|
"div",
|
|
653
657
|
{
|
|
654
658
|
"data-id": t,
|
|
@@ -658,22 +662,22 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
658
662
|
children: n
|
|
659
663
|
}
|
|
660
664
|
) });
|
|
661
|
-
},
|
|
662
|
-
const n =
|
|
665
|
+
}, wt = ({ id: t, name: r, nodeData: e }) => {
|
|
666
|
+
const n = W(e.style, {
|
|
663
667
|
debug: !1
|
|
664
|
-
}), i =
|
|
668
|
+
}), i = k((o) => o.assetsById), s = e.style?.positioning;
|
|
665
669
|
if (s) {
|
|
666
|
-
const o = typeof s.left == "number" && typeof s.right == "number",
|
|
670
|
+
const o = typeof s.left == "number" && typeof s.right == "number", f = typeof s.top == "number" && typeof s.bottom == "number";
|
|
667
671
|
if (o) {
|
|
668
672
|
const a = 100 - s.left - s.right;
|
|
669
673
|
n.width = `${a}%`, n.left = `${s.left}%`, delete n.right;
|
|
670
674
|
}
|
|
671
|
-
if (
|
|
675
|
+
if (f) {
|
|
672
676
|
const a = 100 - s.top - s.bottom;
|
|
673
677
|
n.height = `${a}%`, n.top = `${s.top}%`, delete n.bottom;
|
|
674
678
|
}
|
|
675
679
|
}
|
|
676
|
-
return n.objectFit || (n.objectFit = "fill"), /* @__PURE__ */ d(
|
|
680
|
+
return n.objectFit || (n.objectFit = "fill"), /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
|
|
677
681
|
"img",
|
|
678
682
|
{
|
|
679
683
|
"data-id": t,
|
|
@@ -684,8 +688,8 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
684
688
|
alt: r
|
|
685
689
|
}
|
|
686
690
|
) });
|
|
687
|
-
},
|
|
688
|
-
const { patchedNodeData: n } =
|
|
691
|
+
}, At = ({ id: t, name: r, nodeData: e }) => {
|
|
692
|
+
const { patchedNodeData: n } = J({ id: t, nodeData: e });
|
|
689
693
|
e = n;
|
|
690
694
|
const i = e.data?.text;
|
|
691
695
|
r && r.includes("Purpose") && console.log("TextComponent Debug:", {
|
|
@@ -695,10 +699,10 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
695
699
|
style: e.style,
|
|
696
700
|
color: e.style?.color
|
|
697
701
|
});
|
|
698
|
-
const s = e.style, o = e.fontId ? { ...s, fontId: e.fontId } : s,
|
|
702
|
+
const s = e.style, o = e.fontId ? { ...s, fontId: e.fontId } : s, f = W(o, {
|
|
699
703
|
debug: !1
|
|
700
704
|
});
|
|
701
|
-
|
|
705
|
+
f.display = "flex", f.flexDirection = "column", s.verticalPosition && (f.justifyContent = {
|
|
702
706
|
"from-top": "flex-start",
|
|
703
707
|
center: "center",
|
|
704
708
|
"from-bottom": "flex-end"
|
|
@@ -706,30 +710,30 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
706
710
|
const a = i && (i.includes(`
|
|
707
711
|
`) || i.includes("\r"));
|
|
708
712
|
let h;
|
|
709
|
-
return a &&
|
|
713
|
+
return a && f.flexDirection === "column" ? h = i.split(/\r?\n/).map((g, y) => /* @__PURE__ */ d("div", { style: { lineHeight: "inherit" }, children: g || " " }, y)) : h = i, /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: /* @__PURE__ */ d(
|
|
710
714
|
"div",
|
|
711
715
|
{
|
|
712
716
|
"data-id": t,
|
|
713
717
|
"data-name": r,
|
|
714
718
|
"data-type": "TextComponent",
|
|
715
|
-
style:
|
|
719
|
+
style: f,
|
|
716
720
|
children: h
|
|
717
721
|
}
|
|
718
722
|
) });
|
|
719
|
-
},
|
|
723
|
+
}, dt = ({
|
|
720
724
|
id: t,
|
|
721
725
|
name: r,
|
|
722
726
|
nodeData: e,
|
|
723
727
|
children: n
|
|
724
728
|
}) => {
|
|
725
|
-
const i = N(
|
|
729
|
+
const i = N(q), { patchedNodeData: s } = J({ id: t, nodeData: e });
|
|
726
730
|
e = s;
|
|
727
|
-
const o = Ut(e.tags),
|
|
731
|
+
const o = Ut(e.tags), f = o ? k((w) => w.inputGroups[o.groupName]) : null, a = k((w) => w.statefulSetVariants[t]), h = W(e.style, {
|
|
728
732
|
debug: !1
|
|
729
733
|
});
|
|
730
|
-
let
|
|
731
|
-
o &&
|
|
732
|
-
const g = v.Children.toArray(n).find((
|
|
734
|
+
let I;
|
|
735
|
+
o && f !== null ? I = f === r ? "active" : "default" : I = a || e.data.initialState || "default";
|
|
736
|
+
const g = v.Children.toArray(n).find((w) => v.isValidElement(w) ? w.props?.nodeData?.data?.state === I : !1), y = v.isValidElement(g) ? v.cloneElement(g, {
|
|
733
737
|
_parentStatefulSetId: t,
|
|
734
738
|
_parentInputGroupInfo: o,
|
|
735
739
|
_parentName: r
|
|
@@ -746,21 +750,21 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
746
750
|
);
|
|
747
751
|
if (e.type === "component:input-stateful-set")
|
|
748
752
|
return l;
|
|
749
|
-
const
|
|
753
|
+
const S = v.useContext(st);
|
|
750
754
|
return /* @__PURE__ */ d(
|
|
751
|
-
|
|
755
|
+
q.Provider,
|
|
752
756
|
{
|
|
753
757
|
value: { nodeData: i?.nodeData?.[t] || {} },
|
|
754
758
|
children: /* @__PURE__ */ d(
|
|
755
|
-
|
|
759
|
+
st.Provider,
|
|
756
760
|
{
|
|
757
|
-
value: { ...
|
|
761
|
+
value: { ...S, statefulSetId: t },
|
|
758
762
|
children: l
|
|
759
763
|
}
|
|
760
764
|
)
|
|
761
765
|
}
|
|
762
766
|
);
|
|
763
|
-
},
|
|
767
|
+
}, Ft = ({
|
|
764
768
|
id: t,
|
|
765
769
|
name: r,
|
|
766
770
|
nodeData: e,
|
|
@@ -769,11 +773,11 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
769
773
|
_parentInputGroupInfo: s,
|
|
770
774
|
_parentName: o
|
|
771
775
|
}) => {
|
|
772
|
-
const
|
|
776
|
+
const f = W(e.style, {
|
|
773
777
|
debug: !1
|
|
774
778
|
}), a = {
|
|
775
|
-
...
|
|
776
|
-
position:
|
|
779
|
+
...f,
|
|
780
|
+
position: f.position || "relative"
|
|
777
781
|
};
|
|
778
782
|
return /* @__PURE__ */ d(
|
|
779
783
|
"div",
|
|
@@ -783,7 +787,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
783
787
|
"data-type": "StatefulCompoundComponent",
|
|
784
788
|
style: a,
|
|
785
789
|
children: /* @__PURE__ */ d(
|
|
786
|
-
|
|
790
|
+
Q,
|
|
787
791
|
{
|
|
788
792
|
id: t,
|
|
789
793
|
nodeData: e,
|
|
@@ -795,9 +799,9 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
795
799
|
)
|
|
796
800
|
}
|
|
797
801
|
);
|
|
798
|
-
},
|
|
802
|
+
}, Et = ({ id: t, name: r, children: e }) => {
|
|
799
803
|
N(H);
|
|
800
|
-
const { dimensions: n, ref: i } =
|
|
804
|
+
const { dimensions: n, ref: i } = it(), s = {
|
|
801
805
|
zIndex: 0,
|
|
802
806
|
flex: 1,
|
|
803
807
|
position: "absolute",
|
|
@@ -817,7 +821,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
817
821
|
children: e
|
|
818
822
|
}
|
|
819
823
|
) });
|
|
820
|
-
},
|
|
824
|
+
}, ut = ({
|
|
821
825
|
id: t,
|
|
822
826
|
name: r,
|
|
823
827
|
nodeData: e,
|
|
@@ -829,44 +833,52 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
829
833
|
`[DEBUG] ContainerComponent ${t} (Hero) FULL nodeData:`,
|
|
830
834
|
JSON.stringify(e, null, 2)
|
|
831
835
|
);
|
|
832
|
-
const o = N(
|
|
836
|
+
const o = N(q), { patchedNodeData: f, list: a, arrayData: h } = J({
|
|
833
837
|
id: t,
|
|
834
838
|
nodeData: e
|
|
835
839
|
});
|
|
836
|
-
e =
|
|
837
|
-
const { dimensions:
|
|
840
|
+
e = f;
|
|
841
|
+
const { dimensions: I, ref: g } = it(), y = W(e.style, {
|
|
838
842
|
debug: !1
|
|
839
|
-
})
|
|
840
|
-
|
|
841
|
-
|
|
843
|
+
});
|
|
844
|
+
t === "01KF5PAFET1VY5E81B68GQ9BFQ" && console.log("[DEBUG] Embed Container Render", {
|
|
845
|
+
id: t,
|
|
846
|
+
style: y,
|
|
847
|
+
computedStyle: y,
|
|
848
|
+
layout: e.style.layout,
|
|
849
|
+
hasPositioning: !!e.style.positioning
|
|
850
|
+
});
|
|
851
|
+
const l = !!e.style.layout?.mode, S = e.style.layout?.mode === "HORIZONTAL" || e.style.layout?.mode === "GRID" ? "row" : "column", w = y.width !== void 0, L = y.height !== void 0, E = N(H), c = E?.isFlex ?? !1, $ = E?.flexDirection, A = c && $ === "row", O = !c && e.style.positioning, U = e.style.layout?.layoutSizingHorizontal === "FIXED" || e.style.layout?.layoutSizingVertical === "FIXED", M = e.style.layout?.layoutSizingHorizontal === "HUG" || e.style.layout?.layoutSizingVertical === "HUG";
|
|
852
|
+
if (!w && !A && !(O && (U || M)) && (y.width = "100%"), !L) {
|
|
853
|
+
const R = !c && e.style.positioning, K = e.style.layout?.layoutSizingVertical === "FILL";
|
|
842
854
|
if (!(e.style.layout?.layoutSizingVertical === "HUG")) {
|
|
843
|
-
if (!l) if (
|
|
855
|
+
if (!l) if (R && K && e.style.positioning?.top !== void 0) {
|
|
844
856
|
const tt = 100 - e.style.positioning.top;
|
|
845
857
|
y.height = `${tt}%`;
|
|
846
858
|
} else
|
|
847
859
|
y.height = "100%";
|
|
848
860
|
}
|
|
849
861
|
}
|
|
850
|
-
const
|
|
851
|
-
width: y.width -
|
|
852
|
-
height: y.height - Y -
|
|
862
|
+
const G = e.style.layout?.layoutSizingHorizontal || e.style.layout?.layoutSizingVertical, V = e.style.positioning && !l && (G || !0) ? { ...y, position: "absolute" } : y.position === "absolute" ? y : { ...y, position: y.position || "relative" }, X = (R) => typeof R == "number" ? R : typeof R == "string" && R.endsWith("px") && parseFloat(R) || 0, j = X(y.paddingLeft), m = X(y.paddingRight), Y = X(y.paddingTop), Z = X(y.paddingBottom), B = U && typeof y.width == "number" && typeof y.height == "number" ? {
|
|
863
|
+
width: y.width - j - m,
|
|
864
|
+
height: y.height - Y - Z
|
|
853
865
|
} : {
|
|
854
|
-
width:
|
|
855
|
-
height:
|
|
866
|
+
width: I.width - j - m,
|
|
867
|
+
height: I.height - Y - Z
|
|
856
868
|
};
|
|
857
869
|
if (i != null && a) {
|
|
858
|
-
const
|
|
859
|
-
if (
|
|
860
|
-
const
|
|
861
|
-
nodeData:
|
|
870
|
+
const R = a[i];
|
|
871
|
+
if (R !== void 0) {
|
|
872
|
+
const K = typeof R == "object" && R !== null ? {
|
|
873
|
+
nodeData: R,
|
|
862
874
|
arrayDataById: o?.arrayDataById,
|
|
863
875
|
textOverridesById: o?.textOverridesById,
|
|
864
876
|
rootData: o?.rootData
|
|
865
|
-
} : { nodeData:
|
|
866
|
-
return /* @__PURE__ */ d(
|
|
877
|
+
} : { nodeData: R };
|
|
878
|
+
return /* @__PURE__ */ d(q.Provider, { value: K, children: /* @__PURE__ */ d(
|
|
867
879
|
H.Provider,
|
|
868
880
|
{
|
|
869
|
-
value: { dimensions:
|
|
881
|
+
value: { dimensions: B, isFlex: l, flexDirection: S },
|
|
870
882
|
children: /* @__PURE__ */ d(
|
|
871
883
|
"div",
|
|
872
884
|
{
|
|
@@ -882,22 +894,22 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
882
894
|
}
|
|
883
895
|
}
|
|
884
896
|
if (a) {
|
|
885
|
-
const
|
|
886
|
-
return Ht(() =>
|
|
887
|
-
const tt = typeof
|
|
888
|
-
nodeData:
|
|
897
|
+
const R = h || a;
|
|
898
|
+
return Ht(() => R.map((D, ot) => {
|
|
899
|
+
const tt = typeof D == "object" && D !== null ? {
|
|
900
|
+
nodeData: D,
|
|
889
901
|
arrayDataById: o?.arrayDataById,
|
|
890
902
|
textOverridesById: o?.textOverridesById,
|
|
891
903
|
rootData: o?.rootData
|
|
892
|
-
} : { nodeData:
|
|
904
|
+
} : { nodeData: D };
|
|
893
905
|
return /* @__PURE__ */ d(
|
|
894
|
-
|
|
906
|
+
q.Provider,
|
|
895
907
|
{
|
|
896
908
|
value: tt,
|
|
897
909
|
children: /* @__PURE__ */ d(
|
|
898
910
|
H.Provider,
|
|
899
911
|
{
|
|
900
|
-
value: { dimensions:
|
|
912
|
+
value: { dimensions: B, isFlex: l, flexDirection: S },
|
|
901
913
|
children: /* @__PURE__ */ d(
|
|
902
914
|
"div",
|
|
903
915
|
{
|
|
@@ -913,20 +925,20 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
913
925
|
},
|
|
914
926
|
`${t}:${ot}`
|
|
915
927
|
);
|
|
916
|
-
}), [
|
|
928
|
+
}), [R, t]);
|
|
917
929
|
}
|
|
918
930
|
let T = e.actions || [];
|
|
919
931
|
!Array.isArray(T) && typeof T == "object" && T !== null && (T = Object.entries(T).map(
|
|
920
|
-
([
|
|
921
|
-
event:
|
|
922
|
-
...typeof
|
|
932
|
+
([R, K]) => ({
|
|
933
|
+
event: R,
|
|
934
|
+
...typeof K == "object" && K !== null ? K : {}
|
|
923
935
|
})
|
|
924
936
|
));
|
|
925
937
|
const z = Array.isArray(T) && T.length > 0;
|
|
926
938
|
return /* @__PURE__ */ d(
|
|
927
939
|
H.Provider,
|
|
928
940
|
{
|
|
929
|
-
value: { dimensions:
|
|
941
|
+
value: { dimensions: B, isFlex: l, flexDirection: S },
|
|
930
942
|
children: /* @__PURE__ */ d(
|
|
931
943
|
"div",
|
|
932
944
|
{
|
|
@@ -935,19 +947,19 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
935
947
|
"data-type": "ContainerComponent",
|
|
936
948
|
ref: g,
|
|
937
949
|
style: V,
|
|
938
|
-
children: z ? /* @__PURE__ */ d(
|
|
950
|
+
children: z ? /* @__PURE__ */ d(Q, { id: t, nodeData: e, children: n }) : n
|
|
939
951
|
}
|
|
940
952
|
)
|
|
941
953
|
}
|
|
942
954
|
);
|
|
943
|
-
}, Tt =
|
|
944
|
-
const { dimensions: i, ref: s } =
|
|
955
|
+
}, Tt = ut, Pt = ({ id: t, name: r, nodeData: e, children: n }) => {
|
|
956
|
+
const { dimensions: i, ref: s } = it(), o = W(e.style, {
|
|
945
957
|
debug: !1
|
|
946
|
-
}),
|
|
958
|
+
}), f = !!e.style.layout?.mode, a = e.style.layout?.mode === "HORIZONTAL" ? "row" : "column", h = o.position ? o : { ...o, position: "relative" };
|
|
947
959
|
return /* @__PURE__ */ d(
|
|
948
960
|
H.Provider,
|
|
949
961
|
{
|
|
950
|
-
value: { dimensions: i, isFlex:
|
|
962
|
+
value: { dimensions: i, isFlex: f, flexDirection: a },
|
|
951
963
|
children: /* @__PURE__ */ d(
|
|
952
964
|
"div",
|
|
953
965
|
{
|
|
@@ -962,7 +974,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
962
974
|
}
|
|
963
975
|
);
|
|
964
976
|
}, Zt = ({ id: t, name: r, nodeData: e, children: n }) => {
|
|
965
|
-
const i =
|
|
977
|
+
const i = W(e.style, { debug: !1 });
|
|
966
978
|
return /* @__PURE__ */ d(
|
|
967
979
|
"div",
|
|
968
980
|
{
|
|
@@ -973,17 +985,17 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
973
985
|
children: n
|
|
974
986
|
}
|
|
975
987
|
);
|
|
976
|
-
},
|
|
988
|
+
}, Bt = ({ id: t, name: r, nodeData: e, children: n }) => /* @__PURE__ */ d(
|
|
977
989
|
"div",
|
|
978
990
|
{
|
|
979
991
|
"data-id": t,
|
|
980
992
|
"data-name": r,
|
|
981
993
|
"data-type": "TabsMenuComponent",
|
|
982
|
-
style:
|
|
994
|
+
style: W(e.style),
|
|
983
995
|
children: n
|
|
984
996
|
}
|
|
985
|
-
),
|
|
986
|
-
const i =
|
|
997
|
+
), Rt = ({ id: t, name: r, nodeData: e, children: n }) => {
|
|
998
|
+
const i = W(e.style, {
|
|
987
999
|
debug: !1
|
|
988
1000
|
});
|
|
989
1001
|
return /* @__PURE__ */ d(
|
|
@@ -996,181 +1008,181 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
996
1008
|
children: n
|
|
997
1009
|
}
|
|
998
1010
|
);
|
|
999
|
-
},
|
|
1011
|
+
}, rt = ({ id: t, name: r, nodeData: e, children: n }) => {
|
|
1000
1012
|
t === "01KB929X1DQJN954WNGF5AH38B" && console.log(
|
|
1001
1013
|
`[DEBUG] SliderComponent ${t} FULL nodeData:`,
|
|
1002
1014
|
JSON.stringify(e, null, 2)
|
|
1003
1015
|
);
|
|
1004
|
-
const { dimensions: i, ref: s } =
|
|
1016
|
+
const { dimensions: i, ref: s } = it(), o = v.useRef(null), f = v.useRef(null), a = v.useRef(!1), h = v.useRef(null), I = N(lt), g = N(Gt), { onAction: y } = N(ft), [l, S] = v.useState({
|
|
1005
1017
|
currentIndex: void 0,
|
|
1006
1018
|
onIndexChange: void 0
|
|
1007
|
-
}), [
|
|
1008
|
-
e =
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
if (!
|
|
1012
|
-
const
|
|
1013
|
-
typeof
|
|
1019
|
+
}), [w, L] = v.useState(0), E = v.useRef(null), { patchedNodeData: c } = J({ id: t, nodeData: e });
|
|
1020
|
+
e = c;
|
|
1021
|
+
const $ = e.data?.params || {}, A = $.infinite === !0, O = $.automatic === !0;
|
|
1022
|
+
let M = Array.isArray(e.tags) && e.tags.some((u) => u.includes("container:slider:vertical")) || e.name && e.name.includes("container:slider:vertical");
|
|
1023
|
+
if (!M && $.animation === "default") {
|
|
1024
|
+
const u = e.style?.width, p = e.style?.height;
|
|
1025
|
+
typeof u == "number" && typeof p == "number" && p > u && (M = !0);
|
|
1014
1026
|
}
|
|
1015
|
-
const
|
|
1027
|
+
const G = M ? "vertical" : $.animation === "default" ? "horizontal" : $.animation || "horizontal", F = W(e.style, {
|
|
1016
1028
|
debug: !1
|
|
1017
|
-
}), V =
|
|
1018
|
-
V || (
|
|
1019
|
-
const
|
|
1020
|
-
const
|
|
1021
|
-
return v.Children.forEach(n, (
|
|
1022
|
-
if (
|
|
1023
|
-
const x =
|
|
1024
|
-
if (Array.isArray(C?.tags) && (C.tags.includes("encore:data:array") || C.tags.includes("bravo:data:array")) && x.id &&
|
|
1025
|
-
const
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
v.cloneElement(
|
|
1029
|
+
}), V = F.width !== void 0, X = F.height !== void 0;
|
|
1030
|
+
V || (F.width = "100%"), X || (F.height = "100%"), F.position || (F.position = "relative");
|
|
1031
|
+
const j = N(q), m = v.useMemo(() => {
|
|
1032
|
+
const u = [];
|
|
1033
|
+
return v.Children.forEach(n, (p) => {
|
|
1034
|
+
if (p == null) return;
|
|
1035
|
+
const x = p?.props || {}, C = x.nodeData || {};
|
|
1036
|
+
if (Array.isArray(C?.tags) && (C.tags.includes("encore:data:array") || C.tags.includes("bravo:data:array")) && x.id && j) {
|
|
1037
|
+
const P = j?.arrayDataById && j.arrayDataById[x.id] && Array.isArray(j.arrayDataById[x.id]) ? j.arrayDataById[x.id] : null;
|
|
1038
|
+
P && P.length > 0 ? P.forEach((et, nt) => {
|
|
1039
|
+
u.push(
|
|
1040
|
+
v.cloneElement(p, {
|
|
1029
1041
|
key: `${x.id}:${nt}`,
|
|
1030
1042
|
// ContainerComponent will use this to know which item to render
|
|
1031
1043
|
_arrayItemIndex: nt,
|
|
1032
1044
|
_arrayItemData: et
|
|
1033
1045
|
})
|
|
1034
1046
|
);
|
|
1035
|
-
}) :
|
|
1047
|
+
}) : u.push(p);
|
|
1036
1048
|
} else
|
|
1037
|
-
|
|
1038
|
-
}),
|
|
1039
|
-
}, [n, t,
|
|
1040
|
-
if (!
|
|
1049
|
+
u.push(p);
|
|
1050
|
+
}), u;
|
|
1051
|
+
}, [n, t, j]), Y = v.useMemo(() => {
|
|
1052
|
+
if (!A || m.length === 0)
|
|
1041
1053
|
return m;
|
|
1042
|
-
const
|
|
1054
|
+
const u = m[0], p = m[m.length - 1];
|
|
1043
1055
|
return [
|
|
1044
|
-
v.cloneElement(
|
|
1045
|
-
key: `clone-last-${
|
|
1056
|
+
v.cloneElement(p, {
|
|
1057
|
+
key: `clone-last-${p.key || p.props.id}`
|
|
1046
1058
|
}),
|
|
1047
1059
|
...m,
|
|
1048
|
-
v.cloneElement(
|
|
1049
|
-
key: `clone-first-${
|
|
1060
|
+
v.cloneElement(u, {
|
|
1061
|
+
key: `clone-first-${u.key || u.props.id}`
|
|
1050
1062
|
})
|
|
1051
1063
|
];
|
|
1052
|
-
}, [m,
|
|
1064
|
+
}, [m, A]), Z = v.useMemo(() => {
|
|
1053
1065
|
if (m.length === 0) return { width: 0, height: 0 };
|
|
1054
|
-
const
|
|
1066
|
+
const p = m[0]?.props?.nodeData?.style, x = I.scaleFactor || 1;
|
|
1055
1067
|
let C = 0, b = 0;
|
|
1056
|
-
return
|
|
1057
|
-
}, [m, i.width, i.height,
|
|
1068
|
+
return p?.layout?.layoutSizingHorizontal === "FIXED" && p?.layout?.size?.x ? C = p.layout.size.x * x : C = i.width || 0, p?.layout?.layoutSizingVertical === "FIXED" && p?.layout?.size?.y ? b = p.layout.size.y * x : b = i.height || 0, { width: C, height: b };
|
|
1069
|
+
}, [m, i.width, i.height, I.scaleFactor]), B = Z.width, T = Z.height, z = G === "vertical", _ = v.useCallback(() => {
|
|
1058
1070
|
if (!o.current || m.length === 0)
|
|
1059
1071
|
return 0;
|
|
1060
|
-
const
|
|
1072
|
+
const u = o.current;
|
|
1061
1073
|
if (z) {
|
|
1062
1074
|
if (T === 0) return 0;
|
|
1063
|
-
const
|
|
1064
|
-
if (
|
|
1065
|
-
const C =
|
|
1075
|
+
const p = u.scrollTop;
|
|
1076
|
+
if (A) {
|
|
1077
|
+
const C = p - T;
|
|
1066
1078
|
let b = Math.round(C / T);
|
|
1067
1079
|
return b < 0 && (b = 0), b >= m.length && (b = m.length - 1), b;
|
|
1068
1080
|
} else {
|
|
1069
|
-
const x = Math.round(
|
|
1081
|
+
const x = Math.round(p / T);
|
|
1070
1082
|
return x < 0 ? 0 : x >= m.length ? m.length - 1 : x;
|
|
1071
1083
|
}
|
|
1072
1084
|
} else {
|
|
1073
|
-
if (
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
const C =
|
|
1077
|
-
let b = Math.round(C /
|
|
1085
|
+
if (B === 0) return 0;
|
|
1086
|
+
const p = u.scrollLeft;
|
|
1087
|
+
if (A) {
|
|
1088
|
+
const C = p - B;
|
|
1089
|
+
let b = Math.round(C / B);
|
|
1078
1090
|
return b < 0 && (b = 0), b >= m.length && (b = m.length - 1), b;
|
|
1079
1091
|
} else {
|
|
1080
|
-
const x = Math.round(
|
|
1092
|
+
const x = Math.round(p / B);
|
|
1081
1093
|
return x < 0 ? 0 : x >= m.length ? m.length - 1 : x;
|
|
1082
1094
|
}
|
|
1083
1095
|
}
|
|
1084
|
-
}, [
|
|
1085
|
-
(
|
|
1096
|
+
}, [A, m.length, B, T, z]), R = v.useCallback(
|
|
1097
|
+
(u, p = !0) => {
|
|
1086
1098
|
if (!o.current || m.length === 0) return;
|
|
1087
1099
|
const x = o.current;
|
|
1088
1100
|
if (z) {
|
|
1089
1101
|
let C;
|
|
1090
|
-
|
|
1102
|
+
A ? C = T + u * T : C = u * T, x.scrollTo({
|
|
1091
1103
|
top: C,
|
|
1092
|
-
behavior:
|
|
1104
|
+
behavior: p ? "smooth" : "auto"
|
|
1093
1105
|
});
|
|
1094
1106
|
} else {
|
|
1095
1107
|
let C;
|
|
1096
|
-
|
|
1108
|
+
A ? C = B + u * B : C = u * B, x.scrollTo({
|
|
1097
1109
|
left: C,
|
|
1098
|
-
behavior:
|
|
1110
|
+
behavior: p ? "smooth" : "auto"
|
|
1099
1111
|
});
|
|
1100
1112
|
}
|
|
1101
1113
|
},
|
|
1102
|
-
[
|
|
1103
|
-
),
|
|
1104
|
-
if (!
|
|
1105
|
-
const
|
|
1114
|
+
[B, T, A, m.length, z]
|
|
1115
|
+
), K = v.useCallback(() => {
|
|
1116
|
+
if (!A || !o.current || m.length === 0) return;
|
|
1117
|
+
const u = o.current, p = 1;
|
|
1106
1118
|
if (z) {
|
|
1107
1119
|
if (T === 0) return;
|
|
1108
|
-
const x =
|
|
1109
|
-
x >=
|
|
1120
|
+
const x = u.scrollTop, C = T, b = C, P = b + m.length * C;
|
|
1121
|
+
x >= P - p ? u.scrollTop = b : x <= p && (u.scrollTop = P - C);
|
|
1110
1122
|
} else {
|
|
1111
|
-
if (
|
|
1112
|
-
const x =
|
|
1113
|
-
x >=
|
|
1123
|
+
if (B === 0) return;
|
|
1124
|
+
const x = u.scrollLeft, C = B, b = C, P = b + m.length * C;
|
|
1125
|
+
x >= P - p ? u.scrollLeft = b : x <= p && (u.scrollLeft = P - C);
|
|
1114
1126
|
}
|
|
1115
|
-
}, [
|
|
1127
|
+
}, [A, m.length, B, T, z]);
|
|
1116
1128
|
v.useEffect(() => {
|
|
1117
|
-
if (!
|
|
1118
|
-
const
|
|
1129
|
+
if (!O || m.length <= 1 || B === 0) return;
|
|
1130
|
+
const u = () => {
|
|
1119
1131
|
if (a.current || !o.current) return;
|
|
1120
|
-
const
|
|
1132
|
+
const p = o.current;
|
|
1121
1133
|
if (z) {
|
|
1122
1134
|
if (T === 0) return;
|
|
1123
|
-
const x =
|
|
1135
|
+
const x = p.scrollTop, C = T;
|
|
1124
1136
|
let b;
|
|
1125
|
-
if (
|
|
1137
|
+
if (A) {
|
|
1126
1138
|
const nt = x - C;
|
|
1127
1139
|
b = Math.round(nt / C), b < 0 && (b = 0), b >= m.length && (b = m.length - 1);
|
|
1128
1140
|
} else
|
|
1129
1141
|
b = Math.round(x / C);
|
|
1130
|
-
let
|
|
1131
|
-
if (
|
|
1132
|
-
|
|
1142
|
+
let P = b + 1;
|
|
1143
|
+
if (A) {
|
|
1144
|
+
P >= m.length && (P = 0);
|
|
1133
1145
|
const et = C;
|
|
1134
|
-
|
|
1135
|
-
top: et +
|
|
1146
|
+
p.scrollTo({
|
|
1147
|
+
top: et + P * C,
|
|
1136
1148
|
behavior: "smooth"
|
|
1137
1149
|
});
|
|
1138
1150
|
} else
|
|
1139
|
-
|
|
1151
|
+
P >= m.length && (P = 0), R(P);
|
|
1140
1152
|
} else {
|
|
1141
|
-
if (
|
|
1142
|
-
const x =
|
|
1153
|
+
if (B === 0) return;
|
|
1154
|
+
const x = p.scrollLeft, C = B;
|
|
1143
1155
|
let b;
|
|
1144
|
-
if (
|
|
1156
|
+
if (A) {
|
|
1145
1157
|
const nt = x - C;
|
|
1146
1158
|
b = Math.round(nt / C), b < 0 && (b = 0), b >= m.length && (b = m.length - 1);
|
|
1147
1159
|
} else
|
|
1148
1160
|
b = Math.round(x / C);
|
|
1149
|
-
let
|
|
1150
|
-
if (
|
|
1151
|
-
|
|
1161
|
+
let P = b + 1;
|
|
1162
|
+
if (A) {
|
|
1163
|
+
P >= m.length && (P = 0);
|
|
1152
1164
|
const et = C;
|
|
1153
|
-
|
|
1154
|
-
left: et +
|
|
1165
|
+
p.scrollTo({
|
|
1166
|
+
left: et + P * C,
|
|
1155
1167
|
behavior: "smooth"
|
|
1156
1168
|
});
|
|
1157
1169
|
} else
|
|
1158
|
-
|
|
1170
|
+
P >= m.length && (P = 0), R(P);
|
|
1159
1171
|
}
|
|
1160
1172
|
};
|
|
1161
|
-
return
|
|
1162
|
-
|
|
1173
|
+
return f.current = setInterval(u, 4e3), () => {
|
|
1174
|
+
f.current && (clearInterval(f.current), f.current = null);
|
|
1163
1175
|
};
|
|
1164
1176
|
}, [
|
|
1165
|
-
|
|
1177
|
+
O,
|
|
1166
1178
|
m.length,
|
|
1167
|
-
|
|
1168
|
-
|
|
1179
|
+
A,
|
|
1180
|
+
B,
|
|
1169
1181
|
T,
|
|
1170
1182
|
z,
|
|
1171
|
-
|
|
1183
|
+
R
|
|
1172
1184
|
]);
|
|
1173
|
-
const
|
|
1185
|
+
const D = v.useCallback(() => {
|
|
1174
1186
|
a.current = !0, h.current && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
1175
1187
|
a.current = !1;
|
|
1176
1188
|
}, 3e3);
|
|
@@ -1179,11 +1191,11 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1179
1191
|
ot.current = l;
|
|
1180
1192
|
}, [l]);
|
|
1181
1193
|
const tt = v.useCallback(
|
|
1182
|
-
(
|
|
1183
|
-
if (
|
|
1184
|
-
|
|
1185
|
-
const
|
|
1186
|
-
if (
|
|
1194
|
+
(u) => {
|
|
1195
|
+
if (E.current === u) return;
|
|
1196
|
+
E.current = u;
|
|
1197
|
+
const p = ot.current;
|
|
1198
|
+
if (p.currentIndex === void 0 && L(u), p.onIndexChange && p.onIndexChange(u), typeof y == "function")
|
|
1187
1199
|
try {
|
|
1188
1200
|
y({
|
|
1189
1201
|
bravo: {
|
|
@@ -1191,7 +1203,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1191
1203
|
},
|
|
1192
1204
|
action: {
|
|
1193
1205
|
action: "index-change",
|
|
1194
|
-
params: { index:
|
|
1206
|
+
params: { index: u }
|
|
1195
1207
|
},
|
|
1196
1208
|
componentId: t
|
|
1197
1209
|
}
|
|
@@ -1203,62 +1215,62 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1203
1215
|
// Depend on onAction to ensure we call the latest version
|
|
1204
1216
|
);
|
|
1205
1217
|
v.useEffect(() => {
|
|
1206
|
-
const
|
|
1207
|
-
if (!
|
|
1208
|
-
let
|
|
1218
|
+
const u = o.current;
|
|
1219
|
+
if (!u) return;
|
|
1220
|
+
let p = null;
|
|
1209
1221
|
const x = () => {
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
const
|
|
1213
|
-
tt(
|
|
1214
|
-
})) : (
|
|
1215
|
-
const
|
|
1216
|
-
tt(
|
|
1222
|
+
D(), A ? (p !== null && cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1223
|
+
K();
|
|
1224
|
+
const P = _();
|
|
1225
|
+
tt(P);
|
|
1226
|
+
})) : (p !== null && cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1227
|
+
const P = _();
|
|
1228
|
+
tt(P);
|
|
1217
1229
|
}));
|
|
1218
|
-
}, C = () =>
|
|
1219
|
-
return
|
|
1230
|
+
}, C = () => D(), b = () => D();
|
|
1231
|
+
return u.addEventListener("scroll", x, { passive: !0 }), u.addEventListener("touchstart", C, {
|
|
1220
1232
|
passive: !0
|
|
1221
|
-
}),
|
|
1222
|
-
|
|
1233
|
+
}), u.addEventListener("mousedown", b), () => {
|
|
1234
|
+
u.removeEventListener("scroll", x), u.removeEventListener("touchstart", C), u.removeEventListener("mousedown", b), h.current && clearTimeout(h.current), p !== null && cancelAnimationFrame(p);
|
|
1223
1235
|
};
|
|
1224
1236
|
}, [
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1237
|
+
A,
|
|
1238
|
+
D,
|
|
1239
|
+
K,
|
|
1240
|
+
_,
|
|
1229
1241
|
tt
|
|
1230
1242
|
]), v.useEffect(() => {
|
|
1231
1243
|
if (g) {
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1244
|
+
const u = g.getControlProps(t);
|
|
1245
|
+
u && u !== l && S(u);
|
|
1234
1246
|
}
|
|
1235
1247
|
}, [t, g, l]), v.useEffect(() => {
|
|
1236
|
-
if (l.currentIndex !== void 0 && o.current && m.length > 0 &&
|
|
1237
|
-
const
|
|
1248
|
+
if (l.currentIndex !== void 0 && o.current && m.length > 0 && B > 0) {
|
|
1249
|
+
const u = Math.max(
|
|
1238
1250
|
0,
|
|
1239
1251
|
Math.min(l.currentIndex, m.length - 1)
|
|
1240
|
-
),
|
|
1241
|
-
|
|
1252
|
+
), p = _();
|
|
1253
|
+
u !== p && R(u, !0);
|
|
1242
1254
|
}
|
|
1243
1255
|
}, [
|
|
1244
1256
|
l.currentIndex,
|
|
1245
1257
|
m.length,
|
|
1246
1258
|
m.length,
|
|
1247
|
-
|
|
1259
|
+
B,
|
|
1248
1260
|
T,
|
|
1249
1261
|
z,
|
|
1250
|
-
|
|
1251
|
-
|
|
1262
|
+
R,
|
|
1263
|
+
_
|
|
1252
1264
|
]), v.useEffect(() => {
|
|
1253
|
-
if (
|
|
1254
|
-
const
|
|
1265
|
+
if (A && o.current && m.length > 0 && m.length > 0 && (z ? T > 0 : B > 0)) {
|
|
1266
|
+
const u = z ? T : B;
|
|
1255
1267
|
setTimeout(() => {
|
|
1256
|
-
o.current && (z ? o.current.scrollTop =
|
|
1268
|
+
o.current && (z ? o.current.scrollTop = u : o.current.scrollLeft = u);
|
|
1257
1269
|
}, 0);
|
|
1258
1270
|
}
|
|
1259
|
-
}, [
|
|
1271
|
+
}, [A, m.length, B, T, z]), v.useEffect(() => {
|
|
1260
1272
|
if (!g) return;
|
|
1261
|
-
const { registerContainer:
|
|
1273
|
+
const { registerContainer: u, unregisterContainer: p } = g;
|
|
1262
1274
|
return () => {
|
|
1263
1275
|
};
|
|
1264
1276
|
}, [
|
|
@@ -1266,10 +1278,10 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1266
1278
|
g?.registerContainer,
|
|
1267
1279
|
g?.unregisterContainer,
|
|
1268
1280
|
// controlProps, // REMOVED to break infinite loop
|
|
1269
|
-
|
|
1270
|
-
|
|
1281
|
+
R,
|
|
1282
|
+
_
|
|
1271
1283
|
]);
|
|
1272
|
-
const
|
|
1284
|
+
const $t = {
|
|
1273
1285
|
display: "flex",
|
|
1274
1286
|
flexDirection: z ? "column" : "row",
|
|
1275
1287
|
overflowX: z ? "hidden" : "auto",
|
|
@@ -1280,11 +1292,11 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1280
1292
|
height: "100%",
|
|
1281
1293
|
WebkitOverflowScrolling: "touch"
|
|
1282
1294
|
// Smooth scrolling on iOS
|
|
1283
|
-
},
|
|
1295
|
+
}, zt = {
|
|
1284
1296
|
flexShrink: 0,
|
|
1285
1297
|
scrollSnapAlign: "start",
|
|
1286
|
-
width:
|
|
1287
|
-
height:
|
|
1298
|
+
width: Z.width > 0 ? Z.width : void 0,
|
|
1299
|
+
height: Z.height > 0 ? Z.height : void 0,
|
|
1288
1300
|
position: "relative"
|
|
1289
1301
|
};
|
|
1290
1302
|
return /* @__PURE__ */ d(
|
|
@@ -1294,51 +1306,51 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1294
1306
|
"data-name": r,
|
|
1295
1307
|
"data-type": "SliderComponent",
|
|
1296
1308
|
ref: s,
|
|
1297
|
-
style:
|
|
1298
|
-
children: /* @__PURE__ */ d("div", { ref: o, style:
|
|
1309
|
+
style: F,
|
|
1310
|
+
children: /* @__PURE__ */ d("div", { ref: o, style: $t, children: Y.map((u, p) => /* @__PURE__ */ d(
|
|
1299
1311
|
H.Provider,
|
|
1300
1312
|
{
|
|
1301
1313
|
value: {
|
|
1302
1314
|
dimensions: {
|
|
1303
|
-
width:
|
|
1304
|
-
height:
|
|
1315
|
+
width: Z.width,
|
|
1316
|
+
height: Z.height
|
|
1305
1317
|
},
|
|
1306
1318
|
isFlex: !1
|
|
1307
1319
|
},
|
|
1308
|
-
children: /* @__PURE__ */ d("div", { style:
|
|
1320
|
+
children: /* @__PURE__ */ d("div", { style: zt, children: u })
|
|
1309
1321
|
},
|
|
1310
|
-
|
|
1322
|
+
u.key || `slide-${p}`
|
|
1311
1323
|
)) })
|
|
1312
1324
|
}
|
|
1313
1325
|
);
|
|
1314
|
-
},
|
|
1326
|
+
}, kt = (t, r) => {
|
|
1315
1327
|
const e = Array.isArray(t) ? t : [t];
|
|
1316
1328
|
for (const n of e)
|
|
1317
1329
|
if (!(!n || !n.props)) {
|
|
1318
1330
|
if (n.props.id === r)
|
|
1319
1331
|
return n;
|
|
1320
1332
|
if (n.props.children) {
|
|
1321
|
-
const i =
|
|
1333
|
+
const i = kt(n.props.children, r);
|
|
1322
1334
|
if (i) return i;
|
|
1323
1335
|
}
|
|
1324
1336
|
}
|
|
1325
1337
|
return null;
|
|
1326
|
-
},
|
|
1327
|
-
const { dimensions: i, ref: s } =
|
|
1338
|
+
}, Lt = ({ id: t, name: r, nodeData: e, children: n }) => {
|
|
1339
|
+
const { dimensions: i, ref: s } = it(), { componentId: o } = N(st), f = N(H), a = e.style.originalSize?.[0] || 375;
|
|
1328
1340
|
e.style.originalSize?.[1];
|
|
1329
|
-
const h =
|
|
1341
|
+
const h = f?.dimensions?.width, I = f?.dimensions?.height, g = window.innerWidth, y = h && h > 0 && h < g * 0.8;
|
|
1330
1342
|
let l;
|
|
1331
|
-
i.width > 0 && i.height > 0 ? (l = i.width, i.height) : y && h &&
|
|
1332
|
-
const
|
|
1333
|
-
let
|
|
1334
|
-
if (
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1343
|
+
i.width > 0 && i.height > 0 ? (l = i.width, i.height) : y && h && I || h && I && h > 0 && I > 0 ? l = h : l = g;
|
|
1344
|
+
const S = a < 768;
|
|
1345
|
+
let w = l, L = "100%";
|
|
1346
|
+
if (S && l > a * 1.5) {
|
|
1347
|
+
const F = Math.round(a * 1.5);
|
|
1348
|
+
w = F, L = F;
|
|
1337
1349
|
}
|
|
1338
|
-
const
|
|
1350
|
+
const c = { scaleFactor: w / a || 1 };
|
|
1339
1351
|
if (o) {
|
|
1340
|
-
const
|
|
1341
|
-
return
|
|
1352
|
+
const F = kt(n, o);
|
|
1353
|
+
return F ? /* @__PURE__ */ d(lt.Provider, { value: c, children: /* @__PURE__ */ d(
|
|
1342
1354
|
H.Provider,
|
|
1343
1355
|
{
|
|
1344
1356
|
value: {
|
|
@@ -1347,48 +1359,48 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1347
1359
|
height: "100%"
|
|
1348
1360
|
}
|
|
1349
1361
|
},
|
|
1350
|
-
children:
|
|
1362
|
+
children: F
|
|
1351
1363
|
}
|
|
1352
1364
|
) }) : (console.warn(`Child with id "${o}" not found`), null);
|
|
1353
1365
|
}
|
|
1354
|
-
const
|
|
1355
|
-
(
|
|
1356
|
-
const
|
|
1357
|
-
return
|
|
1366
|
+
const $ = Array.isArray(n) ? n : [n], { scrollableChildren: A, nonScrollableChildren: O } = $.reduce(
|
|
1367
|
+
(F, V) => {
|
|
1368
|
+
const j = V.props.nodeData.type === "container:top-bar" ? "nonScrollableChildren" : "scrollableChildren";
|
|
1369
|
+
return F[j].push(V), F;
|
|
1358
1370
|
},
|
|
1359
1371
|
{
|
|
1360
1372
|
scrollableChildren: [],
|
|
1361
1373
|
nonScrollableChildren: []
|
|
1362
1374
|
}
|
|
1363
1375
|
);
|
|
1364
|
-
let
|
|
1365
|
-
if (!
|
|
1366
|
-
const
|
|
1367
|
-
let V = 0,
|
|
1368
|
-
|
|
1376
|
+
let U = e.style?.layout?.mode;
|
|
1377
|
+
if (!U && t === "01KASW494V02Y8P5JVWV5XK62X" && (console.log("🔧 PATCHING missing layout for page", t), U = "HORIZONTAL"), !U && n) {
|
|
1378
|
+
const F = Array.isArray(n) ? n : [n];
|
|
1379
|
+
let V = 0, X = 0;
|
|
1380
|
+
F.forEach((m) => {
|
|
1369
1381
|
const Y = m?.props?.nodeData?.style?.width;
|
|
1370
|
-
Y && (V += Y, Y < 99 &&
|
|
1371
|
-
}),
|
|
1372
|
-
`[PATCH] Detected HORIZONTAL WRAP layout for page ${t} (Partial width children: ${
|
|
1373
|
-
),
|
|
1382
|
+
Y && (V += Y, Y < 99 && X++);
|
|
1383
|
+
}), X > 0 && V >= 99 && (console.log(
|
|
1384
|
+
`[PATCH] Detected HORIZONTAL WRAP layout for page ${t} (Partial width children: ${X}, Total width: ${V})`
|
|
1385
|
+
), U = "HORIZONTAL", e.style || (e.style = {}), e.style.layout || (e.style.layout = {}), e.style.layout.mode = "HORIZONTAL", e.style.layout.flexWrap = "wrap", e.style.layout.primaryAxisAlignItems = "flex-start", e.style.layout.counterAxisAlignItems = "flex-start");
|
|
1374
1386
|
}
|
|
1375
|
-
const
|
|
1376
|
-
(
|
|
1387
|
+
const M = U === "HORIZONTAL" ? "row" : "column", G = O.some(
|
|
1388
|
+
(F) => F?.props?.nodeData?.type !== "container:background"
|
|
1377
1389
|
);
|
|
1378
|
-
return /* @__PURE__ */ d(
|
|
1390
|
+
return /* @__PURE__ */ d(lt.Provider, { value: c, children: /* @__PURE__ */ pt(
|
|
1379
1391
|
"div",
|
|
1380
1392
|
{
|
|
1381
1393
|
style: {
|
|
1382
1394
|
width: "100%",
|
|
1383
1395
|
height: "100%",
|
|
1384
|
-
maxWidth: typeof
|
|
1385
|
-
margin:
|
|
1396
|
+
maxWidth: typeof L == "number" ? `${L}px` : L,
|
|
1397
|
+
margin: S ? "0 auto" : 0,
|
|
1386
1398
|
position: "relative",
|
|
1387
1399
|
overflow: "hidden",
|
|
1388
1400
|
// Only use flex if we have non-background nonScrollableChildren (like top-bar)
|
|
1389
|
-
...
|
|
1401
|
+
...G ? {
|
|
1390
1402
|
display: "flex",
|
|
1391
|
-
flexDirection:
|
|
1403
|
+
flexDirection: M,
|
|
1392
1404
|
gap: 0,
|
|
1393
1405
|
rowGap: 0,
|
|
1394
1406
|
columnGap: 0
|
|
@@ -1396,9 +1408,9 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1396
1408
|
},
|
|
1397
1409
|
ref: s,
|
|
1398
1410
|
children: [
|
|
1399
|
-
|
|
1400
|
-
(
|
|
1401
|
-
).map((
|
|
1411
|
+
O.filter(
|
|
1412
|
+
(F) => F?.props?.nodeData?.type === "container:background"
|
|
1413
|
+
).map((F, V) => /* @__PURE__ */ d(
|
|
1402
1414
|
H.Provider,
|
|
1403
1415
|
{
|
|
1404
1416
|
value: {
|
|
@@ -1407,13 +1419,13 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1407
1419
|
height: i.height
|
|
1408
1420
|
}
|
|
1409
1421
|
},
|
|
1410
|
-
children:
|
|
1422
|
+
children: F
|
|
1411
1423
|
},
|
|
1412
1424
|
`bg-${V}`
|
|
1413
1425
|
)),
|
|
1414
|
-
|
|
1415
|
-
(
|
|
1416
|
-
).map((
|
|
1426
|
+
G && O.filter(
|
|
1427
|
+
(F) => F?.props?.nodeData?.type !== "container:background"
|
|
1428
|
+
).map((F, V) => /* @__PURE__ */ d(
|
|
1417
1429
|
H.Provider,
|
|
1418
1430
|
{
|
|
1419
1431
|
value: {
|
|
@@ -1422,7 +1434,7 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1422
1434
|
height: i.height
|
|
1423
1435
|
}
|
|
1424
1436
|
},
|
|
1425
|
-
children:
|
|
1437
|
+
children: F
|
|
1426
1438
|
},
|
|
1427
1439
|
`non-scroll-${V}`
|
|
1428
1440
|
)),
|
|
@@ -1434,32 +1446,32 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1434
1446
|
"data-type": "PageComponent",
|
|
1435
1447
|
style: {
|
|
1436
1448
|
position: "relative",
|
|
1437
|
-
...
|
|
1449
|
+
...G ? {
|
|
1438
1450
|
flex: 1,
|
|
1439
|
-
...
|
|
1451
|
+
...M === "row" ? { alignSelf: "stretch" } : {}
|
|
1440
1452
|
// Removed height: "100%" to allow HUG containers to size based on content
|
|
1441
1453
|
} : {
|
|
1442
1454
|
width: "100%"
|
|
1443
1455
|
// Removed height: "100%" to allow HUG containers to size based on content
|
|
1444
1456
|
},
|
|
1445
1457
|
// Remove overflow: auto in horizontal mode as it causes height collapse
|
|
1446
|
-
...
|
|
1447
|
-
...
|
|
1458
|
+
...M === "column" && { overflow: "auto" },
|
|
1459
|
+
...W(e.style, {
|
|
1448
1460
|
debug: !1
|
|
1449
1461
|
})
|
|
1450
1462
|
},
|
|
1451
|
-
children:
|
|
1463
|
+
children: A
|
|
1452
1464
|
}
|
|
1453
1465
|
) })
|
|
1454
1466
|
]
|
|
1455
1467
|
}
|
|
1456
1468
|
) });
|
|
1457
|
-
},
|
|
1469
|
+
}, Wt = ({
|
|
1458
1470
|
id: t,
|
|
1459
1471
|
nodeData: r,
|
|
1460
1472
|
children: e
|
|
1461
1473
|
}) => {
|
|
1462
|
-
const i = N(
|
|
1474
|
+
const i = N(q)?.embedsById?.[t], s = W(r.style, { debug: !1 });
|
|
1463
1475
|
return i ? /* @__PURE__ */ d(
|
|
1464
1476
|
"div",
|
|
1465
1477
|
{
|
|
@@ -1468,7 +1480,8 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1468
1480
|
display: "flex",
|
|
1469
1481
|
flexDirection: "column",
|
|
1470
1482
|
// Reset positioning if provided by wrapper
|
|
1471
|
-
position: "absolute"
|
|
1483
|
+
position: "absolute",
|
|
1484
|
+
zIndex: 10
|
|
1472
1485
|
},
|
|
1473
1486
|
"data-type": "EmbedComponent",
|
|
1474
1487
|
"data-id": t,
|
|
@@ -1476,61 +1489,61 @@ const ct = v.createContext({}), H = v.createContext(
|
|
|
1476
1489
|
}
|
|
1477
1490
|
) : /* @__PURE__ */ d("div", { style: s, "data-type": "EmbedComponent-Empty", "data-id": t, children: e });
|
|
1478
1491
|
}, ee = {
|
|
1479
|
-
EmbedComponent:
|
|
1480
|
-
WebViewComponent:
|
|
1481
|
-
ColorComponent:
|
|
1482
|
-
GradientComponent:
|
|
1483
|
-
ImageComponent:
|
|
1484
|
-
EmailInputComponent:
|
|
1485
|
-
HiddenInputComponent:
|
|
1486
|
-
ImageInputComponent:
|
|
1487
|
-
PasswordInputComponent:
|
|
1488
|
-
SelectInputComponent:
|
|
1489
|
-
TextInputComponent:
|
|
1490
|
-
LottieComponent:
|
|
1491
|
-
SvgComponent:
|
|
1492
|
-
TextComponent:
|
|
1493
|
-
StatefulSetComponent:
|
|
1494
|
-
StatefulCompoundComponent:
|
|
1495
|
-
BackgroundContainerComponent:
|
|
1496
|
-
ContainerComponent:
|
|
1492
|
+
EmbedComponent: Wt,
|
|
1493
|
+
WebViewComponent: ct,
|
|
1494
|
+
ColorComponent: ht,
|
|
1495
|
+
GradientComponent: gt,
|
|
1496
|
+
ImageComponent: mt,
|
|
1497
|
+
EmailInputComponent: yt,
|
|
1498
|
+
HiddenInputComponent: bt,
|
|
1499
|
+
ImageInputComponent: Ct,
|
|
1500
|
+
PasswordInputComponent: vt,
|
|
1501
|
+
SelectInputComponent: xt,
|
|
1502
|
+
TextInputComponent: St,
|
|
1503
|
+
LottieComponent: It,
|
|
1504
|
+
SvgComponent: wt,
|
|
1505
|
+
TextComponent: At,
|
|
1506
|
+
StatefulSetComponent: dt,
|
|
1507
|
+
StatefulCompoundComponent: Ft,
|
|
1508
|
+
BackgroundContainerComponent: Et,
|
|
1509
|
+
ContainerComponent: ut,
|
|
1497
1510
|
CompoundComponent: Tt,
|
|
1498
|
-
TopBarContainerComponent:
|
|
1511
|
+
TopBarContainerComponent: Pt,
|
|
1499
1512
|
DefaultLayerComponent: Zt,
|
|
1500
|
-
TabsMenuComponent:
|
|
1501
|
-
MenuSideComponent:
|
|
1502
|
-
SliderComponent:
|
|
1503
|
-
PageComponent:
|
|
1513
|
+
TabsMenuComponent: Bt,
|
|
1514
|
+
MenuSideComponent: Rt,
|
|
1515
|
+
SliderComponent: rt,
|
|
1516
|
+
PageComponent: Lt,
|
|
1504
1517
|
// Type string mappings for dynamically loaded components
|
|
1505
|
-
"menu:side":
|
|
1506
|
-
"page:default":
|
|
1507
|
-
"container:background":
|
|
1508
|
-
"container:default":
|
|
1509
|
-
"container:top-bar":
|
|
1510
|
-
"container:slider":
|
|
1511
|
-
"component:text":
|
|
1512
|
-
"component:color":
|
|
1513
|
-
"component:gradient":
|
|
1514
|
-
"component:image":
|
|
1515
|
-
"component:svg":
|
|
1518
|
+
"menu:side": Rt,
|
|
1519
|
+
"page:default": Lt,
|
|
1520
|
+
"container:background": Et,
|
|
1521
|
+
"container:default": ut,
|
|
1522
|
+
"container:top-bar": Pt,
|
|
1523
|
+
"container:slider": rt,
|
|
1524
|
+
"component:text": At,
|
|
1525
|
+
"component:color": ht,
|
|
1526
|
+
"component:gradient": gt,
|
|
1527
|
+
"component:image": mt,
|
|
1528
|
+
"component:svg": wt,
|
|
1516
1529
|
"component:compound": Tt,
|
|
1517
|
-
"component:input-stateful-set":
|
|
1518
|
-
"component:stateful-set":
|
|
1519
|
-
"component:stateful-compound":
|
|
1520
|
-
"component:slider":
|
|
1521
|
-
"component:webview":
|
|
1522
|
-
"component:web-view":
|
|
1530
|
+
"component:input-stateful-set": dt,
|
|
1531
|
+
"component:stateful-set": dt,
|
|
1532
|
+
"component:stateful-compound": Ft,
|
|
1533
|
+
"component:slider": rt,
|
|
1534
|
+
"component:webview": ct,
|
|
1535
|
+
"component:web-view": ct,
|
|
1523
1536
|
"component:video": Xt,
|
|
1524
|
-
"component:lottie":
|
|
1525
|
-
"component:email-input":
|
|
1526
|
-
"component:text-input":
|
|
1527
|
-
"component:password-input":
|
|
1528
|
-
"component:select-input":
|
|
1529
|
-
"component:image-input":
|
|
1530
|
-
"component:hidden-input":
|
|
1531
|
-
"component:tabs-menu":
|
|
1532
|
-
"component:embed":
|
|
1533
|
-
ContainerSliderComponent:
|
|
1537
|
+
"component:lottie": It,
|
|
1538
|
+
"component:email-input": yt,
|
|
1539
|
+
"component:text-input": St,
|
|
1540
|
+
"component:password-input": vt,
|
|
1541
|
+
"component:select-input": xt,
|
|
1542
|
+
"component:image-input": Ct,
|
|
1543
|
+
"component:hidden-input": bt,
|
|
1544
|
+
"component:tabs-menu": Bt,
|
|
1545
|
+
"component:embed": Wt,
|
|
1546
|
+
ContainerSliderComponent: rt
|
|
1534
1547
|
};
|
|
1535
1548
|
export {
|
|
1536
1549
|
ee as default
|