@builder.io/sdk-react 1.0.2 → 1.0.4
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/README.md +4 -3
- package/lib/browser/blocks-exports.cjs +187 -0
- package/lib/browser/blocks-exports.mjs +3441 -0
- package/lib/browser/index.cjs +1 -187
- package/lib/browser/index.mjs +26 -3449
- package/lib/browser/{server-entry-a595b1cf.cjs → server-entry-093e302c.cjs} +1 -1
- package/lib/browser/{server-entry-f6f9bdcb.js → server-entry-7839c812.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-0fc8e8d2.js +3385 -0
- package/lib/edge/blocks-exports.cjs +1 -0
- package/lib/edge/blocks-exports.mjs +16 -0
- package/lib/edge/blocks-f8688fcb.cjs +32 -0
- package/lib/edge/button-61181684.cjs +1 -0
- package/lib/edge/button-d9bbef90.js +29 -0
- package/lib/edge/columns-d152e266.cjs +28 -0
- package/lib/edge/columns-f7a9bca7.js +156 -0
- package/lib/edge/content-variants-cdcbcdd8.js +1711 -0
- package/lib/edge/content-variants-d2500971.cjs +133 -0
- package/lib/edge/custom-code-33b73ed1.js +44 -0
- package/lib/edge/custom-code-7390ba8b.cjs +1 -0
- package/lib/edge/dynamic-blocks-exports.cjs +39 -0
- package/lib/edge/dynamic-blocks-exports.mjs +37 -0
- package/lib/edge/dynamic-renderer-b5124984.js +9 -0
- package/lib/edge/dynamic-renderer-c00b8bcb.cjs +1 -0
- package/lib/edge/embed-11e03fa7.js +38 -0
- package/lib/edge/embed-9edce7df.cjs +1 -0
- package/lib/edge/form-ac531791.cjs +1 -0
- package/lib/edge/form-fb5fd55e.js +194 -0
- package/lib/edge/fragment-015b0912.js +8 -0
- package/lib/edge/fragment-61ef192d.cjs +1 -0
- package/lib/edge/get-class-prop-name-caee6506.cjs +1 -0
- package/lib/edge/get-class-prop-name-f22d7d53.js +18 -0
- package/lib/edge/image-6a3654d5.js +118 -0
- package/lib/edge/image-e4128296.cjs +17 -0
- package/lib/edge/img-317659e2.js +21 -0
- package/lib/edge/img-f2eeaa75.cjs +1 -0
- package/lib/edge/index.cjs +1 -207
- package/lib/edge/index.mjs +25 -5922
- package/lib/edge/input-526ea905.js +21 -0
- package/lib/edge/input-562438c4.cjs +1 -0
- package/lib/edge/section-68fbc212.js +26 -0
- package/lib/edge/section-70c8b709.cjs +1 -0
- package/lib/edge/select-17802399.js +21 -0
- package/lib/edge/select-d87a6280.cjs +1 -0
- package/lib/edge/server-entry-88f58ed4.cjs +2 -0
- package/lib/edge/{server-entry-f6f9bdcb.js → server-entry-e0830caf.js} +373 -372
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/slot-39b50f6b.cjs +1 -0
- package/lib/edge/slot-eb244885.js +33 -0
- package/lib/edge/submit-button-13d8d5a7.cjs +1 -0
- package/lib/edge/submit-button-71dd4015.js +8 -0
- package/lib/edge/symbol-bf773f2a.js +78 -0
- package/lib/edge/symbol-ee31bb7f.cjs +1 -0
- package/lib/edge/text-15f0a6f4.js +18 -0
- package/lib/edge/text-7fdbde16.cjs +1 -0
- package/lib/edge/video-66b20833.js +106 -0
- package/lib/edge/video-702696a8.cjs +1 -0
- package/lib/node/blocks-exports.cjs +227 -0
- package/lib/node/blocks-exports.mjs +3548 -0
- package/lib/node/index.cjs +1 -227
- package/lib/node/index.mjs +27 -3556
- package/lib/node/{server-entry-31b5d683.cjs → server-entry-0e638a4f.cjs} +1 -1
- package/lib/node/{server-entry-c2b6d198.js → server-entry-e1cc0803.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +19 -13
- package/types/blocks/button/index.d.ts +1 -0
- package/types/blocks/columns/index.d.ts +1 -0
- package/types/blocks/custom-code/index.d.ts +1 -0
- package/types/blocks/embed/index.d.ts +1 -0
- package/types/blocks/form/form/index.d.ts +1 -0
- package/types/blocks/form/input/index.d.ts +1 -0
- package/types/blocks/form/select/index.d.ts +1 -0
- package/types/blocks/form/submit-button/index.d.ts +1 -0
- package/types/blocks/fragment/index.d.ts +1 -0
- package/types/blocks/image/index.d.ts +1 -0
- package/types/blocks/img/index.d.ts +1 -0
- package/types/blocks/raw-text/index.d.ts +1 -0
- package/types/blocks/section/index.d.ts +1 -0
- package/types/blocks/slot/index.d.ts +1 -0
- package/types/blocks/symbol/index.d.ts +1 -0
- package/types/blocks/text/index.d.ts +1 -0
- package/types/blocks/textarea/index.d.ts +1 -0
- package/types/blocks/video/index.d.ts +1 -0
- package/types/components/blocks/index.d.ts +1 -0
- package/types/components/content-variants/index.d.ts +1 -0
- package/types/components/error-boundary.d.ts +11 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/get-content/types.d.ts +1 -1
- package/types/index-helpers/blocks-exports.d.ts +10 -11
- package/lib/edge/server-entry-a595b1cf.cjs +0 -2
package/lib/browser/index.mjs
CHANGED
|
@@ -1,3452 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const Je = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Ye = (e) => typeof e == "string" && Je.has(e.toLowerCase());
|
|
7
|
-
function le(e) {
|
|
8
|
-
return /* @__PURE__ */ l(m, { children: Ye(e.TagName) ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(m, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
9
|
-
}
|
|
10
|
-
const K = () => {
|
|
11
|
-
switch (z) {
|
|
12
|
-
case "react":
|
|
13
|
-
case "reactNative":
|
|
14
|
-
case "rsc":
|
|
15
|
-
return "className";
|
|
16
|
-
case "svelte":
|
|
17
|
-
case "vue":
|
|
18
|
-
case "solid":
|
|
19
|
-
case "qwik":
|
|
20
|
-
return "class";
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
function Ge(e) {
|
|
24
|
-
return /* @__PURE__ */ l(
|
|
25
|
-
le,
|
|
26
|
-
{
|
|
27
|
-
attributes: {
|
|
28
|
-
...e.attributes,
|
|
29
|
-
[K()]: `${e.link ? "" : "builder-button"} ${e.attributes[K()] || ""}`,
|
|
30
|
-
...e.link ? {
|
|
31
|
-
href: e.link,
|
|
32
|
-
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
33
|
-
role: "link"
|
|
34
|
-
} : {
|
|
35
|
-
role: "button"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
39
|
-
actionAttributes: {},
|
|
40
|
-
children: e.text
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
const se = Te({
|
|
45
|
-
content: null,
|
|
46
|
-
context: {},
|
|
47
|
-
localState: void 0,
|
|
48
|
-
rootSetState() {
|
|
49
|
-
},
|
|
50
|
-
rootState: {},
|
|
51
|
-
apiKey: null,
|
|
52
|
-
apiVersion: void 0,
|
|
53
|
-
componentInfos: {},
|
|
54
|
-
inheritedStyles: {},
|
|
55
|
-
BlocksWrapper: "div",
|
|
56
|
-
BlocksWrapperProps: {}
|
|
57
|
-
}), Ee = Te({ registeredComponents: {} });
|
|
58
|
-
function Qe(e) {
|
|
59
|
-
var t;
|
|
60
|
-
return {
|
|
61
|
-
...(t = e.component) == null ? void 0 : t.options,
|
|
62
|
-
...e.options,
|
|
63
|
-
/**
|
|
64
|
-
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
65
|
-
*/
|
|
66
|
-
builderBlock: e
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const Xe = ({
|
|
70
|
-
builder: e,
|
|
71
|
-
context: t,
|
|
72
|
-
event: n,
|
|
73
|
-
state: i
|
|
74
|
-
}) => Object.entries({
|
|
75
|
-
state: i,
|
|
76
|
-
Builder: e,
|
|
77
|
-
// legacy
|
|
78
|
-
builder: e,
|
|
79
|
-
context: t,
|
|
80
|
-
event: n
|
|
81
|
-
}), Ze = () => ({
|
|
82
|
-
isEditing: M(),
|
|
83
|
-
isBrowser: U(),
|
|
84
|
-
isServer: !U(),
|
|
85
|
-
getUserAttributes: () => Oe()
|
|
86
|
-
}), et = (e, {
|
|
87
|
-
isExpression: t = !0
|
|
88
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, ye = ({
|
|
89
|
-
code: e,
|
|
90
|
-
builder: t,
|
|
91
|
-
context: n,
|
|
92
|
-
event: i,
|
|
93
|
-
localState: o,
|
|
94
|
-
rootSetState: a,
|
|
95
|
-
rootState: r
|
|
96
|
-
}) => {
|
|
97
|
-
const s = Xe({
|
|
98
|
-
builder: t,
|
|
99
|
-
context: n,
|
|
100
|
-
event: i,
|
|
101
|
-
state: Re({
|
|
102
|
-
rootState: r,
|
|
103
|
-
localState: o,
|
|
104
|
-
rootSetState: a
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
108
|
-
};
|
|
109
|
-
function Re({
|
|
110
|
-
rootState: e,
|
|
111
|
-
localState: t,
|
|
112
|
-
rootSetState: n
|
|
113
|
-
}) {
|
|
114
|
-
return new Proxy(e, {
|
|
115
|
-
get: (i, o) => {
|
|
116
|
-
if (t && o in t)
|
|
117
|
-
return t[o];
|
|
118
|
-
const a = i[o];
|
|
119
|
-
return typeof a == "object" ? Re({
|
|
120
|
-
rootState: a,
|
|
121
|
-
localState: void 0,
|
|
122
|
-
rootSetState: n ? (r) => {
|
|
123
|
-
i[o] = r, n(i);
|
|
124
|
-
} : void 0
|
|
125
|
-
}) : a;
|
|
126
|
-
},
|
|
127
|
-
set: (i, o, a) => {
|
|
128
|
-
if (t && o in t)
|
|
129
|
-
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
130
|
-
return i[o] = a, n == null || n(i), !0;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function tt() {
|
|
135
|
-
var e;
|
|
136
|
-
return typeof process != "undefined" && Q((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
137
|
-
}
|
|
138
|
-
const nt = () => {
|
|
139
|
-
var i;
|
|
140
|
-
if (!tt())
|
|
141
|
-
return !1;
|
|
142
|
-
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
143
|
-
return e && t && !n ? (_.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
144
|
-
}, it = (e) => (U() || nt(), ye(e));
|
|
145
|
-
function q({
|
|
146
|
-
code: e,
|
|
147
|
-
context: t,
|
|
148
|
-
localState: n,
|
|
149
|
-
rootState: i,
|
|
150
|
-
rootSetState: o,
|
|
151
|
-
event: a,
|
|
152
|
-
isExpression: r = !0
|
|
153
|
-
}) {
|
|
154
|
-
if (e === "") {
|
|
155
|
-
_.warn("Skipping evaluation of empty code block.");
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
const s = {
|
|
159
|
-
code: et(e, {
|
|
160
|
-
isExpression: r
|
|
161
|
-
}),
|
|
162
|
-
builder: Ze(),
|
|
163
|
-
context: t,
|
|
164
|
-
event: a,
|
|
165
|
-
rootSetState: o,
|
|
166
|
-
rootState: i,
|
|
167
|
-
localState: n
|
|
168
|
-
};
|
|
169
|
-
try {
|
|
170
|
-
return it(s);
|
|
171
|
-
} catch (c) {
|
|
172
|
-
_.error("Failed code evaluation: " + c.message, {
|
|
173
|
-
code: e
|
|
174
|
-
});
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
const Pe = (e, t, n) => {
|
|
179
|
-
if (Object(e) !== e)
|
|
180
|
-
return e;
|
|
181
|
-
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
182
|
-
return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
183
|
-
};
|
|
184
|
-
const ot = ({
|
|
185
|
-
block: e,
|
|
186
|
-
context: t,
|
|
187
|
-
localState: n,
|
|
188
|
-
rootState: i,
|
|
189
|
-
rootSetState: o
|
|
190
|
-
}) => {
|
|
191
|
-
if (!e.bindings)
|
|
192
|
-
return e;
|
|
193
|
-
const a = ae(e), r = {
|
|
194
|
-
...a,
|
|
195
|
-
properties: {
|
|
196
|
-
...a.properties
|
|
197
|
-
},
|
|
198
|
-
actions: {
|
|
199
|
-
...a.actions
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
for (const s in e.bindings) {
|
|
203
|
-
const c = e.bindings[s], d = q({
|
|
204
|
-
code: c,
|
|
205
|
-
localState: n,
|
|
206
|
-
rootState: i,
|
|
207
|
-
rootSetState: o,
|
|
208
|
-
context: t
|
|
209
|
-
});
|
|
210
|
-
Pe(r, s, d);
|
|
211
|
-
}
|
|
212
|
-
return r;
|
|
213
|
-
};
|
|
214
|
-
function Z({
|
|
215
|
-
block: e,
|
|
216
|
-
context: t,
|
|
217
|
-
shouldEvaluateBindings: n,
|
|
218
|
-
localState: i,
|
|
219
|
-
rootState: o,
|
|
220
|
-
rootSetState: a
|
|
221
|
-
}) {
|
|
222
|
-
const r = e;
|
|
223
|
-
return n ? ot({
|
|
224
|
-
block: r,
|
|
225
|
-
localState: i,
|
|
226
|
-
rootState: o,
|
|
227
|
-
rootSetState: a,
|
|
228
|
-
context: t
|
|
229
|
-
}) : r;
|
|
230
|
-
}
|
|
231
|
-
function at(e, t, n = {}) {
|
|
232
|
-
let i, o, a, r = null, s = 0;
|
|
233
|
-
const c = function() {
|
|
234
|
-
s = n.leading === !1 ? 0 : Date.now(), r = null, a = e.apply(i, o), r || (i = o = null);
|
|
235
|
-
};
|
|
236
|
-
return function() {
|
|
237
|
-
const d = Date.now();
|
|
238
|
-
!s && n.leading === !1 && (s = d);
|
|
239
|
-
const u = t - (d - s);
|
|
240
|
-
return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null), s = d, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(c, u)), a;
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
function O(e, ...t) {
|
|
244
|
-
const n = Object(e);
|
|
245
|
-
for (let i = 1; i < arguments.length; i++) {
|
|
246
|
-
const o = arguments[i];
|
|
247
|
-
if (o != null)
|
|
248
|
-
for (const a in o)
|
|
249
|
-
Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]);
|
|
250
|
-
}
|
|
251
|
-
return n;
|
|
252
|
-
}
|
|
253
|
-
const ce = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
254
|
-
function rt(e) {
|
|
255
|
-
for (const t of e)
|
|
256
|
-
switch (t.trigger) {
|
|
257
|
-
case "pageLoad":
|
|
258
|
-
Ve(t);
|
|
259
|
-
break;
|
|
260
|
-
case "hover":
|
|
261
|
-
st(t);
|
|
262
|
-
break;
|
|
263
|
-
case "scrollInView":
|
|
264
|
-
ct(t);
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
function de(e) {
|
|
269
|
-
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
270
|
-
}
|
|
271
|
-
function ue(e, t) {
|
|
272
|
-
const n = lt(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
|
|
273
|
-
for (const s of r)
|
|
274
|
-
for (const c of n)
|
|
275
|
-
c in s || (s[c] = i[c]);
|
|
276
|
-
}
|
|
277
|
-
function lt(e) {
|
|
278
|
-
const t = [];
|
|
279
|
-
for (const n of e.steps)
|
|
280
|
-
for (const i in n.styles)
|
|
281
|
-
t.indexOf(i) === -1 && t.push(i);
|
|
282
|
-
return t;
|
|
283
|
-
}
|
|
284
|
-
function Ve(e) {
|
|
285
|
-
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
286
|
-
if (!t.length) {
|
|
287
|
-
de(e.elementId || e.id || "");
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
Array.from(t).forEach((n) => {
|
|
291
|
-
ue(e, n), n.style.transition = "none", n.style.transitionDelay = "0", O(n.style, e.steps[0].styles), setTimeout(() => {
|
|
292
|
-
n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), O(n.style, e.steps[1].styles), setTimeout(() => {
|
|
293
|
-
n.style.transition = "", n.style.transitionDelay = "";
|
|
294
|
-
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
295
|
-
});
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
function st(e) {
|
|
299
|
-
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
300
|
-
if (!t.length) {
|
|
301
|
-
de(e.elementId || e.id || "");
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
Array.from(t).forEach((n) => {
|
|
305
|
-
ue(e, n);
|
|
306
|
-
const i = e.steps[0].styles, o = e.steps[1].styles;
|
|
307
|
-
function a() {
|
|
308
|
-
O(n.style, i);
|
|
309
|
-
}
|
|
310
|
-
function r() {
|
|
311
|
-
O(n.style, o);
|
|
312
|
-
}
|
|
313
|
-
a(), n.addEventListener("mouseenter", r), n.addEventListener("mouseleave", a), setTimeout(() => {
|
|
314
|
-
n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
function ct(e) {
|
|
319
|
-
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
320
|
-
if (!t.length) {
|
|
321
|
-
de(e.elementId || e.id || "");
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
Array.from(t).forEach((n) => {
|
|
325
|
-
ue(e, n);
|
|
326
|
-
let i = !1, o = !1;
|
|
327
|
-
function a() {
|
|
328
|
-
!i && s(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
329
|
-
O(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", r), setTimeout(() => {
|
|
330
|
-
o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
331
|
-
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
332
|
-
})) : e.repeat && i && !o && !s(n) && (i = !1, O(n.style, e.steps[0].styles));
|
|
333
|
-
}
|
|
334
|
-
const r = at(a, 200, {
|
|
335
|
-
leading: !1
|
|
336
|
-
});
|
|
337
|
-
function s(u) {
|
|
338
|
-
const x = u.getBoundingClientRect(), C = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * C;
|
|
339
|
-
return x.bottom > y && x.top < C - y;
|
|
340
|
-
}
|
|
341
|
-
const c = e.steps[0].styles;
|
|
342
|
-
function d() {
|
|
343
|
-
O(n.style, c);
|
|
344
|
-
}
|
|
345
|
-
d(), setTimeout(() => {
|
|
346
|
-
n.style.transition = `all ${e.duration}s ${ce(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
347
|
-
}), document.addEventListener("scroll", r, {
|
|
348
|
-
capture: !0,
|
|
349
|
-
passive: !0
|
|
350
|
-
}), a();
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
const dt = ({
|
|
354
|
-
block: e,
|
|
355
|
-
context: t,
|
|
356
|
-
registeredComponents: n
|
|
357
|
-
}) => {
|
|
358
|
-
var a;
|
|
359
|
-
const i = (a = Z({
|
|
360
|
-
block: e,
|
|
361
|
-
localState: t.localState,
|
|
362
|
-
rootState: t.rootState,
|
|
363
|
-
rootSetState: t.rootSetState,
|
|
364
|
-
context: t.context,
|
|
365
|
-
shouldEvaluateBindings: !1
|
|
366
|
-
}).component) == null ? void 0 : a.name;
|
|
367
|
-
if (!i)
|
|
368
|
-
return null;
|
|
369
|
-
const o = n[i];
|
|
370
|
-
if (o)
|
|
371
|
-
return o;
|
|
372
|
-
console.warn(`
|
|
373
|
-
Could not find a registered component named "${i}".
|
|
374
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
375
|
-
}, ut = ({
|
|
376
|
-
block: e,
|
|
377
|
-
context: t
|
|
378
|
-
}) => {
|
|
379
|
-
const {
|
|
380
|
-
repeat: n,
|
|
381
|
-
...i
|
|
382
|
-
} = e;
|
|
383
|
-
if (!(n != null && n.collection))
|
|
384
|
-
return;
|
|
385
|
-
const o = q({
|
|
386
|
-
code: n.collection,
|
|
387
|
-
localState: t.localState,
|
|
388
|
-
rootState: t.rootState,
|
|
389
|
-
rootSetState: t.rootSetState,
|
|
390
|
-
context: t.context
|
|
391
|
-
});
|
|
392
|
-
if (!Array.isArray(o))
|
|
393
|
-
return;
|
|
394
|
-
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
395
|
-
return o.map((c, d) => ({
|
|
396
|
-
context: {
|
|
397
|
-
...t,
|
|
398
|
-
localState: {
|
|
399
|
-
...t.localState,
|
|
400
|
-
$index: d,
|
|
401
|
-
$item: c,
|
|
402
|
-
[r]: c,
|
|
403
|
-
[`$${r}Index`]: d
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
block: i
|
|
407
|
-
}));
|
|
408
|
-
}, Be = {
|
|
409
|
-
small: {
|
|
410
|
-
min: 320,
|
|
411
|
-
default: 321,
|
|
412
|
-
max: 640
|
|
413
|
-
},
|
|
414
|
-
medium: {
|
|
415
|
-
min: 641,
|
|
416
|
-
default: 642,
|
|
417
|
-
max: 991
|
|
418
|
-
},
|
|
419
|
-
large: {
|
|
420
|
-
min: 990,
|
|
421
|
-
default: 991,
|
|
422
|
-
max: 1200
|
|
423
|
-
}
|
|
424
|
-
}, pe = (e, t = Be) => `@media (max-width: ${t[e].max}px)`, Ae = ({
|
|
425
|
-
small: e,
|
|
426
|
-
medium: t
|
|
427
|
-
}) => {
|
|
428
|
-
const n = ae(Be);
|
|
429
|
-
if (!e || !t)
|
|
430
|
-
return n;
|
|
431
|
-
const i = Math.floor(e / 2);
|
|
432
|
-
n.small = {
|
|
433
|
-
max: e,
|
|
434
|
-
min: i,
|
|
435
|
-
default: i + 1
|
|
436
|
-
};
|
|
437
|
-
const o = n.small.max + 1;
|
|
438
|
-
n.medium = {
|
|
439
|
-
max: t,
|
|
440
|
-
min: o,
|
|
441
|
-
default: o + 1
|
|
442
|
-
};
|
|
443
|
-
const a = n.medium.max + 1;
|
|
444
|
-
return n.large = {
|
|
445
|
-
max: 2e3,
|
|
446
|
-
// TODO: decide upper limit
|
|
447
|
-
min: a,
|
|
448
|
-
default: a + 1
|
|
449
|
-
}, n;
|
|
450
|
-
}, mt = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), We = (e) => Object.entries(e).map(([n, i]) => {
|
|
451
|
-
if (typeof i == "string")
|
|
452
|
-
return `${mt(n)}: ${i};`;
|
|
453
|
-
}).filter(Q), ft = (e) => We(e).join(`
|
|
454
|
-
`), ne = ({
|
|
455
|
-
mediaQuery: e,
|
|
456
|
-
className: t,
|
|
457
|
-
styles: n
|
|
458
|
-
}) => {
|
|
459
|
-
const i = `.${t} {
|
|
460
|
-
${ft(n)}
|
|
461
|
-
}`;
|
|
462
|
-
return e ? `${e} {
|
|
463
|
-
${i}
|
|
464
|
-
}` : i;
|
|
465
|
-
};
|
|
466
|
-
function te(e) {
|
|
467
|
-
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
468
|
-
}
|
|
469
|
-
function ht(e) {
|
|
470
|
-
function t() {
|
|
471
|
-
const i = Z({
|
|
472
|
-
block: e.block,
|
|
473
|
-
localState: e.context.localState,
|
|
474
|
-
rootState: e.context.rootState,
|
|
475
|
-
rootSetState: e.context.rootSetState,
|
|
476
|
-
context: e.context.context,
|
|
477
|
-
shouldEvaluateBindings: !0
|
|
478
|
-
});
|
|
479
|
-
return Q(i.hide) ? !i.hide : Q(i.show) ? i.show : !0;
|
|
480
|
-
}
|
|
481
|
-
function n() {
|
|
482
|
-
var y;
|
|
483
|
-
const i = Z({
|
|
484
|
-
block: e.block,
|
|
485
|
-
localState: e.context.localState,
|
|
486
|
-
rootState: e.context.rootState,
|
|
487
|
-
rootSetState: e.context.rootSetState,
|
|
488
|
-
context: e.context.context,
|
|
489
|
-
shouldEvaluateBindings: !0
|
|
490
|
-
}), o = i.responsiveStyles, a = e.context.content, r = Ae(
|
|
491
|
-
((y = a == null ? void 0 : a.meta) == null ? void 0 : y.breakpoints) || {}
|
|
492
|
-
), s = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, u = i.id;
|
|
493
|
-
if (!u)
|
|
494
|
-
return "";
|
|
495
|
-
const x = s ? ne({
|
|
496
|
-
className: u,
|
|
497
|
-
styles: s
|
|
498
|
-
}) : "", C = c ? ne({
|
|
499
|
-
className: u,
|
|
500
|
-
styles: c,
|
|
501
|
-
mediaQuery: pe(
|
|
502
|
-
"medium",
|
|
503
|
-
r
|
|
504
|
-
)
|
|
505
|
-
}) : "", f = d ? ne({
|
|
506
|
-
className: u,
|
|
507
|
-
styles: d,
|
|
508
|
-
mediaQuery: pe(
|
|
509
|
-
"small",
|
|
510
|
-
r
|
|
511
|
-
)
|
|
512
|
-
}) : "";
|
|
513
|
-
return [x, C, f].join(" ");
|
|
514
|
-
}
|
|
515
|
-
return /* @__PURE__ */ l(m, { children: n() && t() ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(te, { styles: n() }) }) : null });
|
|
516
|
-
}
|
|
517
|
-
function gt(e) {
|
|
518
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
519
|
-
}
|
|
520
|
-
const bt = (e) => `on${gt(e)}`, yt = (e, t) => (n) => q({
|
|
521
|
-
code: e,
|
|
522
|
-
context: t.context,
|
|
523
|
-
localState: t.localState,
|
|
524
|
-
rootState: t.rootState,
|
|
525
|
-
rootSetState: t.rootSetState,
|
|
526
|
-
event: n,
|
|
527
|
-
isExpression: !1
|
|
528
|
-
});
|
|
529
|
-
function Fe(e) {
|
|
530
|
-
var i;
|
|
531
|
-
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
532
|
-
for (const o in n) {
|
|
533
|
-
if (!n.hasOwnProperty(o))
|
|
534
|
-
continue;
|
|
535
|
-
const a = n[o];
|
|
536
|
-
let r = bt(o);
|
|
537
|
-
if (e.stripPrefix)
|
|
538
|
-
switch (z) {
|
|
539
|
-
case "vue":
|
|
540
|
-
r = r.replace("v-on:", "");
|
|
541
|
-
break;
|
|
542
|
-
case "svelte":
|
|
543
|
-
r = r.replace("on:", "");
|
|
544
|
-
break;
|
|
545
|
-
}
|
|
546
|
-
t[r] = yt(a, e);
|
|
547
|
-
}
|
|
548
|
-
return t;
|
|
549
|
-
}
|
|
550
|
-
function pt({
|
|
551
|
-
style: e
|
|
552
|
-
}) {
|
|
553
|
-
return e;
|
|
554
|
-
}
|
|
555
|
-
const xt = ({
|
|
556
|
-
block: e,
|
|
557
|
-
context: t
|
|
558
|
-
}) => Ne(pt({
|
|
559
|
-
style: e.style || {},
|
|
560
|
-
context: t,
|
|
561
|
-
block: e
|
|
562
|
-
}));
|
|
563
|
-
function Ne(e) {
|
|
564
|
-
switch (z) {
|
|
565
|
-
case "svelte":
|
|
566
|
-
case "vue":
|
|
567
|
-
case "solid":
|
|
568
|
-
return We(e).join(" ");
|
|
569
|
-
case "qwik":
|
|
570
|
-
case "reactNative":
|
|
571
|
-
case "react":
|
|
572
|
-
case "rsc":
|
|
573
|
-
return e;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
function St({
|
|
577
|
-
properties: e
|
|
578
|
-
}) {
|
|
579
|
-
return e;
|
|
580
|
-
}
|
|
581
|
-
const vt = (e) => ({
|
|
582
|
-
href: e.href
|
|
583
|
-
});
|
|
584
|
-
function me({
|
|
585
|
-
block: e,
|
|
586
|
-
context: t
|
|
587
|
-
}) {
|
|
588
|
-
var i;
|
|
589
|
-
const n = {
|
|
590
|
-
...vt(e),
|
|
591
|
-
...e.properties,
|
|
592
|
-
"builder-id": e.id,
|
|
593
|
-
style: xt({
|
|
594
|
-
block: e,
|
|
595
|
-
context: t
|
|
596
|
-
}),
|
|
597
|
-
[K()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
598
|
-
};
|
|
599
|
-
return St({
|
|
600
|
-
properties: n,
|
|
601
|
-
context: t,
|
|
602
|
-
block: e
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
function kt(e) {
|
|
606
|
-
return /* @__PURE__ */ l(
|
|
607
|
-
le,
|
|
608
|
-
{
|
|
609
|
-
TagName: e.Wrapper,
|
|
610
|
-
attributes: me({
|
|
611
|
-
block: e.block,
|
|
612
|
-
context: e.context
|
|
613
|
-
}),
|
|
614
|
-
actionAttributes: Fe({
|
|
615
|
-
block: e.block,
|
|
616
|
-
rootState: e.context.rootState,
|
|
617
|
-
rootSetState: e.context.rootSetState,
|
|
618
|
-
localState: e.context.localState,
|
|
619
|
-
context: e.context.context,
|
|
620
|
-
stripPrefix: !0
|
|
621
|
-
}),
|
|
622
|
-
children: e.children
|
|
623
|
-
}
|
|
624
|
-
);
|
|
625
|
-
}
|
|
626
|
-
function Ct(e) {
|
|
627
|
-
return /* @__PURE__ */ l(
|
|
628
|
-
e.Wrapper,
|
|
629
|
-
{
|
|
630
|
-
...e.wrapperProps,
|
|
631
|
-
attributes: e.includeBlockProps ? {
|
|
632
|
-
...me({
|
|
633
|
-
block: e.block,
|
|
634
|
-
context: e.context
|
|
635
|
-
}),
|
|
636
|
-
...Fe({
|
|
637
|
-
block: e.block,
|
|
638
|
-
rootState: e.context.rootState,
|
|
639
|
-
rootSetState: e.context.rootSetState,
|
|
640
|
-
localState: e.context.localState,
|
|
641
|
-
context: e.context.context
|
|
642
|
-
})
|
|
643
|
-
} : {},
|
|
644
|
-
children: e.children
|
|
645
|
-
}
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
const wt = ({
|
|
649
|
-
componentOptions: e,
|
|
650
|
-
builderBlock: t,
|
|
651
|
-
context: n,
|
|
652
|
-
componentRef: i,
|
|
653
|
-
includeBlockProps: o,
|
|
654
|
-
isInteractive: a,
|
|
655
|
-
contextValue: r
|
|
656
|
-
}) => {
|
|
657
|
-
const s = {
|
|
658
|
-
...e,
|
|
659
|
-
/**
|
|
660
|
-
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
661
|
-
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
662
|
-
*/
|
|
663
|
-
...o ? {
|
|
664
|
-
attributes: me({
|
|
665
|
-
block: t,
|
|
666
|
-
context: r
|
|
667
|
-
})
|
|
668
|
-
} : {}
|
|
669
|
-
};
|
|
670
|
-
return a ? {
|
|
671
|
-
Wrapper: i,
|
|
672
|
-
block: t,
|
|
673
|
-
context: n,
|
|
674
|
-
wrapperProps: e,
|
|
675
|
-
includeBlockProps: o
|
|
676
|
-
} : s;
|
|
677
|
-
};
|
|
678
|
-
function xe(e) {
|
|
679
|
-
var i;
|
|
680
|
-
const [t, n] = v(
|
|
681
|
-
() => e.isInteractive ? Ct : e.componentRef
|
|
682
|
-
);
|
|
683
|
-
return /* @__PURE__ */ l(m, { children: e.componentRef ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
684
|
-
t,
|
|
685
|
-
{
|
|
686
|
-
...wt({
|
|
687
|
-
componentOptions: e.componentOptions,
|
|
688
|
-
builderBlock: e.builderBlock,
|
|
689
|
-
context: e.context,
|
|
690
|
-
componentRef: e.componentRef,
|
|
691
|
-
linkComponent: e.linkComponent,
|
|
692
|
-
includeBlockProps: e.includeBlockProps,
|
|
693
|
-
isInteractive: e.isInteractive,
|
|
694
|
-
contextValue: e.context
|
|
695
|
-
}),
|
|
696
|
-
children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
697
|
-
J,
|
|
698
|
-
{
|
|
699
|
-
block: o,
|
|
700
|
-
context: e.context,
|
|
701
|
-
registeredComponents: e.registeredComponents,
|
|
702
|
-
linkComponent: e.linkComponent
|
|
703
|
-
},
|
|
704
|
-
o.id
|
|
705
|
-
))
|
|
706
|
-
}
|
|
707
|
-
) }) : null });
|
|
708
|
-
}
|
|
709
|
-
function It(e) {
|
|
710
|
-
const [t, n] = v(() => e.repeatContext);
|
|
711
|
-
return /* @__PURE__ */ l(se.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
712
|
-
J,
|
|
713
|
-
{
|
|
714
|
-
block: e.block,
|
|
715
|
-
context: t,
|
|
716
|
-
registeredComponents: e.registeredComponents,
|
|
717
|
-
linkComponent: e.linkComponent
|
|
718
|
-
}
|
|
719
|
-
) });
|
|
720
|
-
}
|
|
721
|
-
function J(e) {
|
|
722
|
-
var u, x, C;
|
|
723
|
-
function t() {
|
|
724
|
-
return dt({
|
|
725
|
-
block: e.block,
|
|
726
|
-
context: e.context,
|
|
727
|
-
registeredComponents: e.registeredComponents
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
function n() {
|
|
731
|
-
return ut({
|
|
732
|
-
block: e.block,
|
|
733
|
-
context: e.context
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
function i() {
|
|
737
|
-
var f;
|
|
738
|
-
return (f = e.block.repeat) != null && f.collection ? e.block : Z({
|
|
739
|
-
block: e.block,
|
|
740
|
-
localState: e.context.localState,
|
|
741
|
-
rootState: e.context.rootState,
|
|
742
|
-
rootSetState: e.context.rootSetState,
|
|
743
|
-
context: e.context.context,
|
|
744
|
-
shouldEvaluateBindings: !0
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
function o() {
|
|
748
|
-
var y;
|
|
749
|
-
return e.block.tagName === "a" || ((y = i().properties) == null ? void 0 : y.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
750
|
-
}
|
|
751
|
-
function a() {
|
|
752
|
-
var p, E;
|
|
753
|
-
if ((p = e.block.repeat) != null && p.collection)
|
|
754
|
-
return !!((E = n == null ? void 0 : n()) != null && E.length);
|
|
755
|
-
const f = "hide" in i() ? i().hide : !1;
|
|
756
|
-
return ("show" in i() ? i().show : !0) && !f;
|
|
757
|
-
}
|
|
758
|
-
function r() {
|
|
759
|
-
var y, p;
|
|
760
|
-
return !((y = t == null ? void 0 : t()) != null && y.component) && !n() ? (p = i().children) != null ? p : [] : [];
|
|
761
|
-
}
|
|
762
|
-
function s() {
|
|
763
|
-
var f, y, p, E, A, k, I, B, P, $, L;
|
|
764
|
-
return {
|
|
765
|
-
blockChildren: (f = i().children) != null ? f : [],
|
|
766
|
-
componentRef: (y = t == null ? void 0 : t()) == null ? void 0 : y.component,
|
|
767
|
-
componentOptions: {
|
|
768
|
-
...Qe(i()),
|
|
769
|
-
builderContext: e.context,
|
|
770
|
-
...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Core:Button" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Symbol" || ((A = t == null ? void 0 : t()) == null ? void 0 : A.name) === "Columns" || ((k = t == null ? void 0 : t()) == null ? void 0 : k.name) === "Form:Form" ? {
|
|
771
|
-
builderLinkComponent: e.linkComponent
|
|
772
|
-
} : {},
|
|
773
|
-
...((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Symbol" || ((B = t == null ? void 0 : t()) == null ? void 0 : B.name) === "Columns" || ((P = t == null ? void 0 : t()) == null ? void 0 : P.name) === "Form:Form" ? {
|
|
774
|
-
builderComponents: e.registeredComponents
|
|
775
|
-
} : {}
|
|
776
|
-
},
|
|
777
|
-
context: c,
|
|
778
|
-
linkComponent: e.linkComponent,
|
|
779
|
-
registeredComponents: e.registeredComponents,
|
|
780
|
-
builderBlock: i(),
|
|
781
|
-
includeBlockProps: (($ = t == null ? void 0 : t()) == null ? void 0 : $.noWrap) === !0,
|
|
782
|
-
isInteractive: !((L = t == null ? void 0 : t()) != null && L.isRSC)
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
const [c, d] = v(() => e.context);
|
|
786
|
-
return V(() => {
|
|
787
|
-
const f = i().id, y = i().animations;
|
|
788
|
-
y && f && rt(
|
|
789
|
-
y.filter((p) => p.trigger !== "hover").map((p) => ({
|
|
790
|
-
...p,
|
|
791
|
-
elementId: f
|
|
792
|
-
}))
|
|
793
|
-
);
|
|
794
|
-
}, []), /* @__PURE__ */ l(m, { children: a() ? /* @__PURE__ */ F(m, { children: [
|
|
795
|
-
/* @__PURE__ */ l(ht, { block: e.block, context: e.context }),
|
|
796
|
-
(u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
797
|
-
xe,
|
|
798
|
-
{
|
|
799
|
-
componentRef: s().componentRef,
|
|
800
|
-
componentOptions: s().componentOptions,
|
|
801
|
-
blockChildren: s().blockChildren,
|
|
802
|
-
context: s().context,
|
|
803
|
-
registeredComponents: s().registeredComponents,
|
|
804
|
-
linkComponent: s().linkComponent,
|
|
805
|
-
builderBlock: s().builderBlock,
|
|
806
|
-
includeBlockProps: s().includeBlockProps,
|
|
807
|
-
isInteractive: s().isInteractive
|
|
808
|
-
}
|
|
809
|
-
) }) : /* @__PURE__ */ l(m, { children: n() ? /* @__PURE__ */ l(m, { children: (C = n()) == null ? void 0 : C.map((f, y) => /* @__PURE__ */ l(
|
|
810
|
-
It,
|
|
811
|
-
{
|
|
812
|
-
repeatContext: f.context,
|
|
813
|
-
block: f.block,
|
|
814
|
-
registeredComponents: e.registeredComponents,
|
|
815
|
-
linkComponent: e.linkComponent
|
|
816
|
-
},
|
|
817
|
-
y
|
|
818
|
-
)) }) : /* @__PURE__ */ l(m, { children: /* @__PURE__ */ F(
|
|
819
|
-
kt,
|
|
820
|
-
{
|
|
821
|
-
Wrapper: o(),
|
|
822
|
-
block: i(),
|
|
823
|
-
context: e.context,
|
|
824
|
-
linkComponent: e.linkComponent,
|
|
825
|
-
children: [
|
|
826
|
-
/* @__PURE__ */ l(
|
|
827
|
-
xe,
|
|
828
|
-
{
|
|
829
|
-
componentRef: s().componentRef,
|
|
830
|
-
componentOptions: s().componentOptions,
|
|
831
|
-
blockChildren: s().blockChildren,
|
|
832
|
-
context: s().context,
|
|
833
|
-
registeredComponents: s().registeredComponents,
|
|
834
|
-
linkComponent: s().linkComponent,
|
|
835
|
-
builderBlock: s().builderBlock,
|
|
836
|
-
includeBlockProps: s().includeBlockProps,
|
|
837
|
-
isInteractive: s().isInteractive
|
|
838
|
-
}
|
|
839
|
-
),
|
|
840
|
-
(x = r()) == null ? void 0 : x.map((f) => /* @__PURE__ */ l(
|
|
841
|
-
J,
|
|
842
|
-
{
|
|
843
|
-
block: f,
|
|
844
|
-
context: c,
|
|
845
|
-
registeredComponents: e.registeredComponents,
|
|
846
|
-
linkComponent: e.linkComponent
|
|
847
|
-
},
|
|
848
|
-
f.id
|
|
849
|
-
))
|
|
850
|
-
]
|
|
851
|
-
}
|
|
852
|
-
) }) })
|
|
853
|
-
] }) : null });
|
|
854
|
-
}
|
|
855
|
-
function Tt(e) {
|
|
856
|
-
function t() {
|
|
857
|
-
var o;
|
|
858
|
-
return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
|
|
859
|
-
}
|
|
860
|
-
function n() {
|
|
861
|
-
var o, a;
|
|
862
|
-
M() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
863
|
-
{
|
|
864
|
-
type: "builder.clickEmptyBlocks",
|
|
865
|
-
data: {
|
|
866
|
-
parentElementId: e.parent,
|
|
867
|
-
dataPath: e.path
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
"*"
|
|
871
|
-
));
|
|
872
|
-
}
|
|
873
|
-
function i() {
|
|
874
|
-
var o, a;
|
|
875
|
-
M() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
|
|
876
|
-
{
|
|
877
|
-
type: "builder.hoverEmptyBlocks",
|
|
878
|
-
data: {
|
|
879
|
-
parentElementId: e.parent,
|
|
880
|
-
dataPath: e.path
|
|
881
|
-
}
|
|
882
|
-
},
|
|
883
|
-
"*"
|
|
884
|
-
));
|
|
885
|
-
}
|
|
886
|
-
return /* @__PURE__ */ F(m, { children: [
|
|
887
|
-
/* @__PURE__ */ l(
|
|
888
|
-
e.BlocksWrapper,
|
|
889
|
-
{
|
|
890
|
-
className: t() + " props-blocks-wrapper-7354e098",
|
|
891
|
-
"builder-path": e.path,
|
|
892
|
-
"builder-parent-id": e.parent,
|
|
893
|
-
style: e.styleProp,
|
|
894
|
-
onClick: (o) => n(),
|
|
895
|
-
onMouseEnter: (o) => i(),
|
|
896
|
-
onKeyPress: (o) => n(),
|
|
897
|
-
...e.BlocksWrapperProps,
|
|
898
|
-
children: e.children
|
|
899
|
-
}
|
|
900
|
-
),
|
|
901
|
-
/* @__PURE__ */ l("style", { children: `.props-blocks-wrapper-7354e098 {
|
|
902
|
-
display: flex;
|
|
903
|
-
flex-direction: column;
|
|
904
|
-
align-items: stretch;
|
|
905
|
-
}` })
|
|
906
|
-
] });
|
|
907
|
-
}
|
|
908
|
-
function j(e) {
|
|
909
|
-
var i, o, a;
|
|
910
|
-
const t = be(se), n = be(Ee);
|
|
911
|
-
return /* @__PURE__ */ l(
|
|
912
|
-
Tt,
|
|
913
|
-
{
|
|
914
|
-
blocks: e.blocks,
|
|
915
|
-
parent: e.parent,
|
|
916
|
-
path: e.path,
|
|
917
|
-
styleProp: e.styleProp,
|
|
918
|
-
BlocksWrapper: (i = e.context) == null ? void 0 : i.BlocksWrapper,
|
|
919
|
-
BlocksWrapperProps: (o = e.context) == null ? void 0 : o.BlocksWrapperProps,
|
|
920
|
-
children: e.blocks ? /* @__PURE__ */ l(m, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
|
|
921
|
-
J,
|
|
922
|
-
{
|
|
923
|
-
block: r,
|
|
924
|
-
linkComponent: e.linkComponent,
|
|
925
|
-
context: e.context || t,
|
|
926
|
-
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
927
|
-
},
|
|
928
|
-
r.id
|
|
929
|
-
)) }) : null
|
|
930
|
-
}
|
|
931
|
-
);
|
|
932
|
-
}
|
|
933
|
-
function Et(e) {
|
|
934
|
-
var A;
|
|
935
|
-
const [t, n] = v(
|
|
936
|
-
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
937
|
-
), [i, o] = v(() => e.columns || []), [a, r] = v(
|
|
938
|
-
() => e.stackColumnsAt || "tablet"
|
|
939
|
-
);
|
|
940
|
-
function s(k) {
|
|
941
|
-
var I;
|
|
942
|
-
return ((I = i[k]) == null ? void 0 : I.width) || 100 / i.length;
|
|
943
|
-
}
|
|
944
|
-
function c(k) {
|
|
945
|
-
const I = t * (i.length - 1) / i.length;
|
|
946
|
-
return `calc(${s(k)}% - ${I}px)`;
|
|
947
|
-
}
|
|
948
|
-
function d({
|
|
949
|
-
stackedStyle: k,
|
|
950
|
-
desktopStyle: I
|
|
951
|
-
}) {
|
|
952
|
-
return a === "tablet" ? k : I;
|
|
953
|
-
}
|
|
954
|
-
function u({
|
|
955
|
-
stackedStyle: k,
|
|
956
|
-
desktopStyle: I
|
|
957
|
-
}) {
|
|
958
|
-
return a === "never" ? I : k;
|
|
959
|
-
}
|
|
960
|
-
const [x, C] = v(
|
|
961
|
-
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
962
|
-
);
|
|
963
|
-
function f() {
|
|
964
|
-
return {
|
|
965
|
-
"--flex-dir": x,
|
|
966
|
-
"--flex-dir-tablet": d({
|
|
967
|
-
stackedStyle: x,
|
|
968
|
-
desktopStyle: "row"
|
|
969
|
-
})
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
function y(k) {
|
|
973
|
-
const I = k === 0 ? 0 : t, B = c(k), P = `${I}px`, $ = "100%", L = 0;
|
|
974
|
-
return {
|
|
975
|
-
...{
|
|
976
|
-
display: "flex",
|
|
977
|
-
flexDirection: "column",
|
|
978
|
-
alignItems: "stretch"
|
|
979
|
-
},
|
|
980
|
-
width: B,
|
|
981
|
-
["marginLeft"]: P,
|
|
982
|
-
"--column-width-mobile": u({
|
|
983
|
-
stackedStyle: $,
|
|
984
|
-
desktopStyle: B
|
|
985
|
-
}),
|
|
986
|
-
"--column-margin-left-mobile": u({
|
|
987
|
-
stackedStyle: L,
|
|
988
|
-
desktopStyle: P
|
|
989
|
-
}),
|
|
990
|
-
"--column-width-tablet": d({
|
|
991
|
-
stackedStyle: $,
|
|
992
|
-
desktopStyle: B
|
|
993
|
-
}),
|
|
994
|
-
"--column-margin-left-tablet": d({
|
|
995
|
-
stackedStyle: L,
|
|
996
|
-
desktopStyle: P
|
|
997
|
-
})
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
function p(k) {
|
|
1001
|
-
var B, P;
|
|
1002
|
-
return Ae(
|
|
1003
|
-
((P = (B = e.builderContext.content) == null ? void 0 : B.meta) == null ? void 0 : P.breakpoints) || {}
|
|
1004
|
-
)[k].max;
|
|
1005
|
-
}
|
|
1006
|
-
function E() {
|
|
1007
|
-
return `
|
|
1008
|
-
@media (max-width: ${p("medium")}px) {
|
|
1009
|
-
.${e.builderBlock.id}-breakpoints {
|
|
1010
|
-
flex-direction: var(--flex-dir-tablet);
|
|
1011
|
-
align-items: stretch;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
1015
|
-
width: var(--column-width-tablet) !important;
|
|
1016
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
@media (max-width: ${p("small")}px) {
|
|
1021
|
-
.${e.builderBlock.id}-breakpoints {
|
|
1022
|
-
flex-direction: var(--flex-dir);
|
|
1023
|
-
align-items: stretch;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
1027
|
-
width: var(--column-width-mobile) !important;
|
|
1028
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
1029
|
-
}
|
|
1030
|
-
},
|
|
1031
|
-
`;
|
|
1032
|
-
}
|
|
1033
|
-
return /* @__PURE__ */ F(m, { children: [
|
|
1034
|
-
/* @__PURE__ */ F(
|
|
1035
|
-
"div",
|
|
1036
|
-
{
|
|
1037
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-f5024694`,
|
|
1038
|
-
style: f(),
|
|
1039
|
-
children: [
|
|
1040
|
-
/* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(te, { styles: E() }) }),
|
|
1041
|
-
(A = e.columns) == null ? void 0 : A.map((k, I) => /* @__PURE__ */ l(
|
|
1042
|
-
le,
|
|
1043
|
-
{
|
|
1044
|
-
TagName: k.link ? e.builderLinkComponent || "a" : "div",
|
|
1045
|
-
actionAttributes: {},
|
|
1046
|
-
attributes: {
|
|
1047
|
-
...k.link ? {
|
|
1048
|
-
href: k.link
|
|
1049
|
-
} : {},
|
|
1050
|
-
[K()]: "builder-column",
|
|
1051
|
-
style: Ne(y(I))
|
|
1052
|
-
},
|
|
1053
|
-
children: /* @__PURE__ */ l(
|
|
1054
|
-
j,
|
|
1055
|
-
{
|
|
1056
|
-
path: `component.options.columns.${I}.blocks`,
|
|
1057
|
-
parent: e.builderBlock.id,
|
|
1058
|
-
styleProp: {
|
|
1059
|
-
flexGrow: "1"
|
|
1060
|
-
},
|
|
1061
|
-
context: e.builderContext,
|
|
1062
|
-
registeredComponents: e.builderComponents,
|
|
1063
|
-
linkComponent: e.builderLinkComponent,
|
|
1064
|
-
blocks: k.blocks
|
|
1065
|
-
}
|
|
1066
|
-
)
|
|
1067
|
-
},
|
|
1068
|
-
I
|
|
1069
|
-
))
|
|
1070
|
-
]
|
|
1071
|
-
}
|
|
1072
|
-
),
|
|
1073
|
-
/* @__PURE__ */ l("style", { children: `.div-f5024694 {
|
|
1074
|
-
display: flex;
|
|
1075
|
-
line-height: normal;
|
|
1076
|
-
}` })
|
|
1077
|
-
] });
|
|
1078
|
-
}
|
|
1079
|
-
function Rt(e) {
|
|
1080
|
-
return /* @__PURE__ */ l("span", { children: e.children });
|
|
1081
|
-
}
|
|
1082
|
-
function Se(e) {
|
|
1083
|
-
return e.replace(/http(s)?:/, "");
|
|
1084
|
-
}
|
|
1085
|
-
function Pt(e = "", t, n) {
|
|
1086
|
-
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1087
|
-
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
1088
|
-
}
|
|
1089
|
-
function Vt(e, t) {
|
|
1090
|
-
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1091
|
-
return e;
|
|
1092
|
-
if (t === "master")
|
|
1093
|
-
return Se(e);
|
|
1094
|
-
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1095
|
-
if (n) {
|
|
1096
|
-
const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
|
|
1097
|
-
return Se(`${i[0]}_${a}${o}`);
|
|
1098
|
-
}
|
|
1099
|
-
return null;
|
|
1100
|
-
}
|
|
1101
|
-
function ie(e) {
|
|
1102
|
-
if (!e)
|
|
1103
|
-
return e;
|
|
1104
|
-
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1105
|
-
if (e.match(/builder\.io/)) {
|
|
1106
|
-
let n = e;
|
|
1107
|
-
const i = Number(e.split("?width=")[1]);
|
|
1108
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Pt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
1109
|
-
}
|
|
1110
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Vt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
1111
|
-
}
|
|
1112
|
-
function Bt(e) {
|
|
1113
|
-
var o, a, r, s;
|
|
1114
|
-
function t() {
|
|
1115
|
-
var u;
|
|
1116
|
-
const d = e.image || e.src;
|
|
1117
|
-
if (!d || // We can auto add srcset for cdn.builder.io and shopify
|
|
1118
|
-
// images, otherwise you can supply this prop manually
|
|
1119
|
-
!(d.match(/builder\.io/) || d.match(/cdn\.shopify\.com/)))
|
|
1120
|
-
return e.srcset;
|
|
1121
|
-
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
1122
|
-
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1123
|
-
return console.debug("Removed given srcset"), ie(d);
|
|
1124
|
-
} else if (e.image && !e.srcset)
|
|
1125
|
-
return ie(d);
|
|
1126
|
-
return ie(d);
|
|
1127
|
-
}
|
|
1128
|
-
function n() {
|
|
1129
|
-
var c;
|
|
1130
|
-
return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
|
|
1131
|
-
}
|
|
1132
|
-
function i() {
|
|
1133
|
-
const c = {
|
|
1134
|
-
position: "absolute",
|
|
1135
|
-
height: "100%",
|
|
1136
|
-
width: "100%",
|
|
1137
|
-
left: "0px",
|
|
1138
|
-
top: "0px"
|
|
1139
|
-
};
|
|
1140
|
-
return e.aspectRatio ? c : void 0;
|
|
1141
|
-
}
|
|
1142
|
-
return /* @__PURE__ */ F(m, { children: [
|
|
1143
|
-
/* @__PURE__ */ F(m, { children: [
|
|
1144
|
-
/* @__PURE__ */ F("picture", { children: [
|
|
1145
|
-
n() ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
1146
|
-
/* @__PURE__ */ l(
|
|
1147
|
-
"img",
|
|
1148
|
-
{
|
|
1149
|
-
loading: "lazy",
|
|
1150
|
-
alt: e.altText,
|
|
1151
|
-
role: e.altText ? "presentation" : void 0,
|
|
1152
|
-
style: {
|
|
1153
|
-
objectPosition: e.backgroundPosition || "center",
|
|
1154
|
-
objectFit: e.backgroundSize || "cover",
|
|
1155
|
-
...i()
|
|
1156
|
-
},
|
|
1157
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-40c70c9b",
|
|
1158
|
-
src: e.image,
|
|
1159
|
-
srcSet: t(),
|
|
1160
|
-
sizes: e.sizes
|
|
1161
|
-
}
|
|
1162
|
-
)
|
|
1163
|
-
] }),
|
|
1164
|
-
e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
1165
|
-
"div",
|
|
1166
|
-
{
|
|
1167
|
-
className: "builder-image-sizer div-40c70c9b",
|
|
1168
|
-
style: {
|
|
1169
|
-
paddingTop: e.aspectRatio * 100 + "%"
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
) }) : null,
|
|
1173
|
-
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(m, { children: e.children }) : null,
|
|
1174
|
-
!e.fitContent && e.children ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l("div", { className: "div-40c70c9b-2", children: e.children }) }) : null
|
|
1175
|
-
] }),
|
|
1176
|
-
/* @__PURE__ */ l("style", { children: `.img-40c70c9b {
|
|
1177
|
-
opacity: 1;
|
|
1178
|
-
transition: opacity 0.2s ease-in-out;
|
|
1179
|
-
}.div-40c70c9b {
|
|
1180
|
-
width: 100%;
|
|
1181
|
-
pointer-events: none;
|
|
1182
|
-
font-size: 0;
|
|
1183
|
-
}.div-40c70c9b-2 {
|
|
1184
|
-
display: flex;
|
|
1185
|
-
flex-direction: column;
|
|
1186
|
-
align-items: stretch;
|
|
1187
|
-
position: absolute;
|
|
1188
|
-
top: 0;
|
|
1189
|
-
left: 0;
|
|
1190
|
-
width: 100%;
|
|
1191
|
-
height: 100%;
|
|
1192
|
-
}` })
|
|
1193
|
-
] });
|
|
1194
|
-
}
|
|
1195
|
-
function At(e) {
|
|
1196
|
-
return /* @__PURE__ */ l(
|
|
1197
|
-
"section",
|
|
1198
|
-
{
|
|
1199
|
-
...e.attributes,
|
|
1200
|
-
style: {
|
|
1201
|
-
width: "100%",
|
|
1202
|
-
alignSelf: "stretch",
|
|
1203
|
-
flexGrow: 1,
|
|
1204
|
-
boxSizing: "border-box",
|
|
1205
|
-
maxWidth: e.maxWidth || 1200,
|
|
1206
|
-
display: "flex",
|
|
1207
|
-
flexDirection: "column",
|
|
1208
|
-
alignItems: "stretch",
|
|
1209
|
-
marginLeft: "auto",
|
|
1210
|
-
marginRight: "auto"
|
|
1211
|
-
},
|
|
1212
|
-
children: e.children
|
|
1213
|
-
}
|
|
1214
|
-
);
|
|
1215
|
-
}
|
|
1216
|
-
const Wt = {
|
|
1217
|
-
name: "Core:Button",
|
|
1218
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1219
|
-
defaultStyles: {
|
|
1220
|
-
// TODO: make min width more intuitive and set one
|
|
1221
|
-
appearance: "none",
|
|
1222
|
-
paddingTop: "15px",
|
|
1223
|
-
paddingBottom: "15px",
|
|
1224
|
-
paddingLeft: "25px",
|
|
1225
|
-
paddingRight: "25px",
|
|
1226
|
-
backgroundColor: "#000000",
|
|
1227
|
-
color: "white",
|
|
1228
|
-
borderRadius: "4px",
|
|
1229
|
-
textAlign: "center",
|
|
1230
|
-
cursor: "pointer"
|
|
1231
|
-
},
|
|
1232
|
-
inputs: [{
|
|
1233
|
-
name: "text",
|
|
1234
|
-
type: "text",
|
|
1235
|
-
defaultValue: "Click me!",
|
|
1236
|
-
bubble: !0
|
|
1237
|
-
}, {
|
|
1238
|
-
name: "link",
|
|
1239
|
-
type: "url",
|
|
1240
|
-
bubble: !0
|
|
1241
|
-
}, {
|
|
1242
|
-
name: "openLinkInNewTab",
|
|
1243
|
-
type: "boolean",
|
|
1244
|
-
defaultValue: !1,
|
|
1245
|
-
friendlyName: "Open link in new tab"
|
|
1246
|
-
}],
|
|
1247
|
-
static: !0,
|
|
1248
|
-
noWrap: !0
|
|
1249
|
-
}, Ft = {
|
|
1250
|
-
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1251
|
-
name: "Columns",
|
|
1252
|
-
isRSC: !0,
|
|
1253
|
-
inputs: [{
|
|
1254
|
-
name: "columns",
|
|
1255
|
-
type: "array",
|
|
1256
|
-
broadcast: !0,
|
|
1257
|
-
subFields: [{
|
|
1258
|
-
name: "blocks",
|
|
1259
|
-
type: "array",
|
|
1260
|
-
hideFromUI: !0,
|
|
1261
|
-
defaultValue: [{
|
|
1262
|
-
"@type": "@builder.io/sdk:Element",
|
|
1263
|
-
responsiveStyles: {
|
|
1264
|
-
large: {
|
|
1265
|
-
display: "flex",
|
|
1266
|
-
flexDirection: "column",
|
|
1267
|
-
alignItems: "stretch",
|
|
1268
|
-
flexShrink: "0",
|
|
1269
|
-
position: "relative",
|
|
1270
|
-
marginTop: "30px",
|
|
1271
|
-
textAlign: "center",
|
|
1272
|
-
lineHeight: "normal",
|
|
1273
|
-
height: "auto",
|
|
1274
|
-
minHeight: "20px",
|
|
1275
|
-
minWidth: "20px",
|
|
1276
|
-
overflow: "hidden"
|
|
1277
|
-
}
|
|
1278
|
-
},
|
|
1279
|
-
component: {
|
|
1280
|
-
name: "Image",
|
|
1281
|
-
options: {
|
|
1282
|
-
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
1283
|
-
backgroundPosition: "center",
|
|
1284
|
-
backgroundSize: "cover",
|
|
1285
|
-
aspectRatio: 0.7004048582995948
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}, {
|
|
1289
|
-
"@type": "@builder.io/sdk:Element",
|
|
1290
|
-
responsiveStyles: {
|
|
1291
|
-
large: {
|
|
1292
|
-
display: "flex",
|
|
1293
|
-
flexDirection: "column",
|
|
1294
|
-
alignItems: "stretch",
|
|
1295
|
-
flexShrink: "0",
|
|
1296
|
-
position: "relative",
|
|
1297
|
-
marginTop: "30px",
|
|
1298
|
-
textAlign: "center",
|
|
1299
|
-
lineHeight: "normal",
|
|
1300
|
-
height: "auto"
|
|
1301
|
-
}
|
|
1302
|
-
},
|
|
1303
|
-
component: {
|
|
1304
|
-
name: "Text",
|
|
1305
|
-
options: {
|
|
1306
|
-
text: "<p>Enter some text...</p>"
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
}]
|
|
1310
|
-
}, {
|
|
1311
|
-
name: "width",
|
|
1312
|
-
type: "number",
|
|
1313
|
-
hideFromUI: !0,
|
|
1314
|
-
helperText: "Width %, e.g. set to 50 to fill half of the space"
|
|
1315
|
-
}, {
|
|
1316
|
-
name: "link",
|
|
1317
|
-
type: "url",
|
|
1318
|
-
helperText: "Optionally set a url that clicking this column will link to"
|
|
1319
|
-
}],
|
|
1320
|
-
defaultValue: [{
|
|
1321
|
-
blocks: [{
|
|
1322
|
-
"@type": "@builder.io/sdk:Element",
|
|
1323
|
-
responsiveStyles: {
|
|
1324
|
-
large: {
|
|
1325
|
-
display: "flex",
|
|
1326
|
-
flexDirection: "column",
|
|
1327
|
-
alignItems: "stretch",
|
|
1328
|
-
flexShrink: "0",
|
|
1329
|
-
position: "relative",
|
|
1330
|
-
marginTop: "30px",
|
|
1331
|
-
textAlign: "center",
|
|
1332
|
-
lineHeight: "normal",
|
|
1333
|
-
height: "auto",
|
|
1334
|
-
minHeight: "20px",
|
|
1335
|
-
minWidth: "20px",
|
|
1336
|
-
overflow: "hidden"
|
|
1337
|
-
}
|
|
1338
|
-
},
|
|
1339
|
-
component: {
|
|
1340
|
-
name: "Image",
|
|
1341
|
-
options: {
|
|
1342
|
-
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
1343
|
-
backgroundPosition: "center",
|
|
1344
|
-
backgroundSize: "cover",
|
|
1345
|
-
aspectRatio: 0.7004048582995948
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
}, {
|
|
1349
|
-
"@type": "@builder.io/sdk:Element",
|
|
1350
|
-
responsiveStyles: {
|
|
1351
|
-
large: {
|
|
1352
|
-
display: "flex",
|
|
1353
|
-
flexDirection: "column",
|
|
1354
|
-
alignItems: "stretch",
|
|
1355
|
-
flexShrink: "0",
|
|
1356
|
-
position: "relative",
|
|
1357
|
-
marginTop: "30px",
|
|
1358
|
-
textAlign: "center",
|
|
1359
|
-
lineHeight: "normal",
|
|
1360
|
-
height: "auto"
|
|
1361
|
-
}
|
|
1362
|
-
},
|
|
1363
|
-
component: {
|
|
1364
|
-
name: "Text",
|
|
1365
|
-
options: {
|
|
1366
|
-
text: "<p>Enter some text...</p>"
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
}]
|
|
1370
|
-
}, {
|
|
1371
|
-
blocks: [{
|
|
1372
|
-
"@type": "@builder.io/sdk:Element",
|
|
1373
|
-
responsiveStyles: {
|
|
1374
|
-
large: {
|
|
1375
|
-
display: "flex",
|
|
1376
|
-
flexDirection: "column",
|
|
1377
|
-
alignItems: "stretch",
|
|
1378
|
-
flexShrink: "0",
|
|
1379
|
-
position: "relative",
|
|
1380
|
-
marginTop: "30px",
|
|
1381
|
-
textAlign: "center",
|
|
1382
|
-
lineHeight: "normal",
|
|
1383
|
-
height: "auto",
|
|
1384
|
-
minHeight: "20px",
|
|
1385
|
-
minWidth: "20px",
|
|
1386
|
-
overflow: "hidden"
|
|
1387
|
-
}
|
|
1388
|
-
},
|
|
1389
|
-
component: {
|
|
1390
|
-
name: "Image",
|
|
1391
|
-
options: {
|
|
1392
|
-
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
1393
|
-
backgroundPosition: "center",
|
|
1394
|
-
backgroundSize: "cover",
|
|
1395
|
-
aspectRatio: 0.7004048582995948
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
}, {
|
|
1399
|
-
"@type": "@builder.io/sdk:Element",
|
|
1400
|
-
responsiveStyles: {
|
|
1401
|
-
large: {
|
|
1402
|
-
display: "flex",
|
|
1403
|
-
flexDirection: "column",
|
|
1404
|
-
alignItems: "stretch",
|
|
1405
|
-
flexShrink: "0",
|
|
1406
|
-
position: "relative",
|
|
1407
|
-
marginTop: "30px",
|
|
1408
|
-
textAlign: "center",
|
|
1409
|
-
lineHeight: "normal",
|
|
1410
|
-
height: "auto"
|
|
1411
|
-
}
|
|
1412
|
-
},
|
|
1413
|
-
component: {
|
|
1414
|
-
name: "Text",
|
|
1415
|
-
options: {
|
|
1416
|
-
text: "<p>Enter some text...</p>"
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
}]
|
|
1420
|
-
}],
|
|
1421
|
-
onChange: (e) => {
|
|
1422
|
-
function t() {
|
|
1423
|
-
n.forEach((i) => {
|
|
1424
|
-
i.delete("width");
|
|
1425
|
-
});
|
|
1426
|
-
}
|
|
1427
|
-
const n = e.get("columns");
|
|
1428
|
-
Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
|
|
1429
|
-
}
|
|
1430
|
-
}, {
|
|
1431
|
-
name: "space",
|
|
1432
|
-
type: "number",
|
|
1433
|
-
defaultValue: 20,
|
|
1434
|
-
helperText: "Size of gap between columns",
|
|
1435
|
-
advanced: !0
|
|
1436
|
-
}, {
|
|
1437
|
-
name: "stackColumnsAt",
|
|
1438
|
-
type: "string",
|
|
1439
|
-
defaultValue: "tablet",
|
|
1440
|
-
helperText: "Convert horizontal columns to vertical at what device size",
|
|
1441
|
-
enum: ["tablet", "mobile", "never"],
|
|
1442
|
-
advanced: !0
|
|
1443
|
-
}, {
|
|
1444
|
-
name: "reverseColumnsWhenStacked",
|
|
1445
|
-
type: "boolean",
|
|
1446
|
-
defaultValue: !1,
|
|
1447
|
-
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1448
|
-
advanced: !0
|
|
1449
|
-
}]
|
|
1450
|
-
}, Nt = {
|
|
1451
|
-
name: "Fragment",
|
|
1452
|
-
static: !0,
|
|
1453
|
-
hidden: !0,
|
|
1454
|
-
canHaveChildren: !0,
|
|
1455
|
-
noWrap: !0
|
|
1456
|
-
}, $t = {
|
|
1457
|
-
name: "Image",
|
|
1458
|
-
static: !0,
|
|
1459
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1460
|
-
defaultStyles: {
|
|
1461
|
-
position: "relative",
|
|
1462
|
-
minHeight: "20px",
|
|
1463
|
-
minWidth: "20px",
|
|
1464
|
-
overflow: "hidden"
|
|
1465
|
-
},
|
|
1466
|
-
canHaveChildren: !0,
|
|
1467
|
-
inputs: [{
|
|
1468
|
-
name: "image",
|
|
1469
|
-
type: "file",
|
|
1470
|
-
bubble: !0,
|
|
1471
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
1472
|
-
required: !0,
|
|
1473
|
-
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1474
|
-
onChange: (e) => {
|
|
1475
|
-
e.delete("srcset"), e.delete("noWebp");
|
|
1476
|
-
function n(r, s = 6e4) {
|
|
1477
|
-
return new Promise((c, d) => {
|
|
1478
|
-
const u = document.createElement("img");
|
|
1479
|
-
let x = !1;
|
|
1480
|
-
u.onload = () => {
|
|
1481
|
-
x = !0, c(u);
|
|
1482
|
-
}, u.addEventListener("error", (C) => {
|
|
1483
|
-
console.warn("Image load failed", C.error), d(C.error);
|
|
1484
|
-
}), u.src = r, setTimeout(() => {
|
|
1485
|
-
x || d(new Error("Image load timed out"));
|
|
1486
|
-
}, s);
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
function i(r) {
|
|
1490
|
-
return Math.round(r * 1e3) / 1e3;
|
|
1491
|
-
}
|
|
1492
|
-
const o = e.get("image"), a = e.get("aspectRatio");
|
|
1493
|
-
if (fetch(o).then((r) => r.blob()).then((r) => {
|
|
1494
|
-
r.type.includes("svg") && e.set("noWebp", !0);
|
|
1495
|
-
}), o && (!a || a === 0.7041))
|
|
1496
|
-
return n(o).then((r) => {
|
|
1497
|
-
const s = e.get("aspectRatio");
|
|
1498
|
-
e.get("image") === o && (!s || s === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
|
|
1499
|
-
});
|
|
1500
|
-
}
|
|
1501
|
-
}, {
|
|
1502
|
-
name: "backgroundSize",
|
|
1503
|
-
type: "text",
|
|
1504
|
-
defaultValue: "cover",
|
|
1505
|
-
enum: [{
|
|
1506
|
-
label: "contain",
|
|
1507
|
-
value: "contain",
|
|
1508
|
-
helperText: "The image should never get cropped"
|
|
1509
|
-
}, {
|
|
1510
|
-
label: "cover",
|
|
1511
|
-
value: "cover",
|
|
1512
|
-
helperText: "The image should fill it's box, cropping when needed"
|
|
1513
|
-
}]
|
|
1514
|
-
}, {
|
|
1515
|
-
name: "backgroundPosition",
|
|
1516
|
-
type: "text",
|
|
1517
|
-
defaultValue: "center",
|
|
1518
|
-
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
1519
|
-
}, {
|
|
1520
|
-
name: "altText",
|
|
1521
|
-
type: "string",
|
|
1522
|
-
helperText: "Text to display when the user has images off"
|
|
1523
|
-
}, {
|
|
1524
|
-
name: "height",
|
|
1525
|
-
type: "number",
|
|
1526
|
-
hideFromUI: !0
|
|
1527
|
-
}, {
|
|
1528
|
-
name: "width",
|
|
1529
|
-
type: "number",
|
|
1530
|
-
hideFromUI: !0
|
|
1531
|
-
}, {
|
|
1532
|
-
name: "sizes",
|
|
1533
|
-
type: "string",
|
|
1534
|
-
hideFromUI: !0
|
|
1535
|
-
}, {
|
|
1536
|
-
name: "srcset",
|
|
1537
|
-
type: "string",
|
|
1538
|
-
hideFromUI: !0
|
|
1539
|
-
}, {
|
|
1540
|
-
name: "lazy",
|
|
1541
|
-
type: "boolean",
|
|
1542
|
-
defaultValue: !0,
|
|
1543
|
-
hideFromUI: !0
|
|
1544
|
-
}, {
|
|
1545
|
-
name: "fitContent",
|
|
1546
|
-
type: "boolean",
|
|
1547
|
-
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
1548
|
-
defaultValue: !0
|
|
1549
|
-
}, {
|
|
1550
|
-
name: "aspectRatio",
|
|
1551
|
-
type: "number",
|
|
1552
|
-
helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
|
|
1553
|
-
advanced: !0,
|
|
1554
|
-
defaultValue: 0.7041
|
|
1555
|
-
}]
|
|
1556
|
-
}, Lt = {
|
|
1557
|
-
name: "Core:Section",
|
|
1558
|
-
static: !0,
|
|
1559
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
1560
|
-
inputs: [{
|
|
1561
|
-
name: "maxWidth",
|
|
1562
|
-
type: "number",
|
|
1563
|
-
defaultValue: 1200
|
|
1564
|
-
}, {
|
|
1565
|
-
name: "lazyLoad",
|
|
1566
|
-
type: "boolean",
|
|
1567
|
-
defaultValue: !1,
|
|
1568
|
-
advanced: !0,
|
|
1569
|
-
description: "Only render this section when in view"
|
|
1570
|
-
}],
|
|
1571
|
-
defaultStyles: {
|
|
1572
|
-
paddingLeft: "20px",
|
|
1573
|
-
paddingRight: "20px",
|
|
1574
|
-
paddingTop: "50px",
|
|
1575
|
-
paddingBottom: "50px",
|
|
1576
|
-
marginTop: "0px",
|
|
1577
|
-
width: "100vw",
|
|
1578
|
-
marginLeft: "calc(50% - 50vw)"
|
|
1579
|
-
},
|
|
1580
|
-
canHaveChildren: !0,
|
|
1581
|
-
defaultChildren: [{
|
|
1582
|
-
"@type": "@builder.io/sdk:Element",
|
|
1583
|
-
responsiveStyles: {
|
|
1584
|
-
large: {
|
|
1585
|
-
textAlign: "center"
|
|
1586
|
-
}
|
|
1587
|
-
},
|
|
1588
|
-
component: {
|
|
1589
|
-
name: "Text",
|
|
1590
|
-
options: {
|
|
1591
|
-
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
}]
|
|
1595
|
-
}, Dt = {
|
|
1596
|
-
name: "Slot",
|
|
1597
|
-
isRSC: !0,
|
|
1598
|
-
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
1599
|
-
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
1600
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
1601
|
-
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
1602
|
-
inputs: [{
|
|
1603
|
-
name: "name",
|
|
1604
|
-
type: "string",
|
|
1605
|
-
required: !0,
|
|
1606
|
-
defaultValue: "children"
|
|
1607
|
-
}]
|
|
1608
|
-
};
|
|
1609
|
-
function Mt(e) {
|
|
1610
|
-
var t, n, i;
|
|
1611
|
-
return /* @__PURE__ */ l(
|
|
1612
|
-
"div",
|
|
1613
|
-
{
|
|
1614
|
-
style: {
|
|
1615
|
-
pointerEvents: "auto"
|
|
1616
|
-
},
|
|
1617
|
-
...!((t = e.builderContext.context) != null && t.symbolId) && {
|
|
1618
|
-
"builder-slot": e.name
|
|
1619
|
-
},
|
|
1620
|
-
children: /* @__PURE__ */ l(
|
|
1621
|
-
j,
|
|
1622
|
-
{
|
|
1623
|
-
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1624
|
-
path: `symbol.data.${e.name}`,
|
|
1625
|
-
context: e.builderContext,
|
|
1626
|
-
blocks: (i = e.builderContext.rootState) == null ? void 0 : i[e.name]
|
|
1627
|
-
}
|
|
1628
|
-
)
|
|
1629
|
-
}
|
|
1630
|
-
);
|
|
1631
|
-
}
|
|
1632
|
-
const Ot = {
|
|
1633
|
-
name: "Symbol",
|
|
1634
|
-
noWrap: !0,
|
|
1635
|
-
static: !0,
|
|
1636
|
-
isRSC: !0,
|
|
1637
|
-
inputs: [{
|
|
1638
|
-
name: "symbol",
|
|
1639
|
-
type: "uiSymbol"
|
|
1640
|
-
}, {
|
|
1641
|
-
name: "dataOnly",
|
|
1642
|
-
helperText: "Make this a data symbol that doesn't display any UI",
|
|
1643
|
-
type: "boolean",
|
|
1644
|
-
defaultValue: !1,
|
|
1645
|
-
advanced: !0,
|
|
1646
|
-
hideFromUI: !0
|
|
1647
|
-
}, {
|
|
1648
|
-
name: "inheritState",
|
|
1649
|
-
helperText: "Inherit the parent component state and data",
|
|
1650
|
-
type: "boolean",
|
|
1651
|
-
defaultValue: !1,
|
|
1652
|
-
advanced: !0
|
|
1653
|
-
}, {
|
|
1654
|
-
name: "renderToLiquid",
|
|
1655
|
-
helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
|
|
1656
|
-
type: "boolean",
|
|
1657
|
-
defaultValue: !1,
|
|
1658
|
-
advanced: !0,
|
|
1659
|
-
hideFromUI: !0
|
|
1660
|
-
}, {
|
|
1661
|
-
name: "useChildren",
|
|
1662
|
-
hideFromUI: !0,
|
|
1663
|
-
type: "boolean"
|
|
1664
|
-
}]
|
|
1665
|
-
}, jt = {
|
|
1666
|
-
name: "Text",
|
|
1667
|
-
static: !0,
|
|
1668
|
-
isRSC: !0,
|
|
1669
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
1670
|
-
inputs: [{
|
|
1671
|
-
name: "text",
|
|
1672
|
-
type: "html",
|
|
1673
|
-
required: !0,
|
|
1674
|
-
autoFocus: !0,
|
|
1675
|
-
bubble: !0,
|
|
1676
|
-
defaultValue: "Enter some text..."
|
|
1677
|
-
}],
|
|
1678
|
-
defaultStyles: {
|
|
1679
|
-
lineHeight: "normal",
|
|
1680
|
-
height: "auto",
|
|
1681
|
-
textAlign: "center"
|
|
1682
|
-
}
|
|
1683
|
-
};
|
|
1684
|
-
function Ut(e) {
|
|
1685
|
-
var t;
|
|
1686
|
-
return /* @__PURE__ */ l(
|
|
1687
|
-
"div",
|
|
1688
|
-
{
|
|
1689
|
-
className: "builder-text",
|
|
1690
|
-
dangerouslySetInnerHTML: { __html: ((t = e.text) == null ? void 0 : t.toString()) || "" },
|
|
1691
|
-
style: {
|
|
1692
|
-
outline: "none"
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
);
|
|
1696
|
-
}
|
|
1697
|
-
const Ht = {
|
|
1698
|
-
name: "Custom Code",
|
|
1699
|
-
static: !0,
|
|
1700
|
-
requiredPermissions: ["editCode"],
|
|
1701
|
-
inputs: [{
|
|
1702
|
-
name: "code",
|
|
1703
|
-
type: "html",
|
|
1704
|
-
required: !0,
|
|
1705
|
-
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1706
|
-
code: !0
|
|
1707
|
-
}, {
|
|
1708
|
-
name: "replaceNodes",
|
|
1709
|
-
type: "boolean",
|
|
1710
|
-
helperText: "Preserve server rendered dom nodes",
|
|
1711
|
-
advanced: !0
|
|
1712
|
-
}, {
|
|
1713
|
-
name: "scriptsClientOnly",
|
|
1714
|
-
type: "boolean",
|
|
1715
|
-
defaultValue: !1,
|
|
1716
|
-
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1717
|
-
advanced: !0
|
|
1718
|
-
}]
|
|
1719
|
-
};
|
|
1720
|
-
function _t(e) {
|
|
1721
|
-
const t = ee(null), [n, i] = v(() => []), [o, a] = v(() => []);
|
|
1722
|
-
return V(() => {
|
|
1723
|
-
var s;
|
|
1724
|
-
if (!((s = t.current) != null && s.getElementsByTagName) || typeof window == "undefined")
|
|
1725
|
-
return;
|
|
1726
|
-
const r = t.current.getElementsByTagName("script");
|
|
1727
|
-
for (let c = 0; c < r.length; c++) {
|
|
1728
|
-
const d = r[c];
|
|
1729
|
-
if (d.src) {
|
|
1730
|
-
if (n.includes(d.src))
|
|
1731
|
-
continue;
|
|
1732
|
-
n.push(d.src);
|
|
1733
|
-
const u = document.createElement("script");
|
|
1734
|
-
u.async = !0, u.src = d.src, document.head.appendChild(u);
|
|
1735
|
-
} else if (!d.type || [
|
|
1736
|
-
"text/javascript",
|
|
1737
|
-
"application/javascript",
|
|
1738
|
-
"application/ecmascript"
|
|
1739
|
-
].includes(d.type)) {
|
|
1740
|
-
if (o.includes(d.innerText))
|
|
1741
|
-
continue;
|
|
1742
|
-
try {
|
|
1743
|
-
o.push(d.innerText), new Function(d.innerText)();
|
|
1744
|
-
} catch (u) {
|
|
1745
|
-
console.warn("`CustomCode`: Error running script:", u);
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
}, []), /* @__PURE__ */ l(
|
|
1750
|
-
"div",
|
|
1751
|
-
{
|
|
1752
|
-
ref: t,
|
|
1753
|
-
className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
|
|
1754
|
-
dangerouslySetInnerHTML: { __html: e.code }
|
|
1755
|
-
}
|
|
1756
|
-
);
|
|
1757
|
-
}
|
|
1758
|
-
const Kt = {
|
|
1759
|
-
name: "Embed",
|
|
1760
|
-
static: !0,
|
|
1761
|
-
inputs: [{
|
|
1762
|
-
name: "url",
|
|
1763
|
-
type: "url",
|
|
1764
|
-
required: !0,
|
|
1765
|
-
defaultValue: "",
|
|
1766
|
-
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1767
|
-
onChange: (e) => {
|
|
1768
|
-
const t = e.get("url");
|
|
1769
|
-
if (t)
|
|
1770
|
-
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((i) => i.json()).then((i) => {
|
|
1771
|
-
e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
|
|
1772
|
-
}).catch((i) => {
|
|
1773
|
-
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1774
|
-
});
|
|
1775
|
-
e.delete("content");
|
|
1776
|
-
}
|
|
1777
|
-
}, {
|
|
1778
|
-
name: "content",
|
|
1779
|
-
type: "html",
|
|
1780
|
-
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1781
|
-
hideFromUI: !0
|
|
1782
|
-
}]
|
|
1783
|
-
}, qt = ["text/javascript", "application/javascript", "application/ecmascript"], zt = (e) => qt.includes(e.type);
|
|
1784
|
-
function Jt(e) {
|
|
1785
|
-
const t = ee(null), [n, i] = v(() => []), [o, a] = v(() => []), [r, s] = v(() => !1);
|
|
1786
|
-
function c() {
|
|
1787
|
-
if (!t.current || !t.current.getElementsByTagName)
|
|
1788
|
-
return;
|
|
1789
|
-
const d = t.current.getElementsByTagName("script");
|
|
1790
|
-
for (let u = 0; u < d.length; u++) {
|
|
1791
|
-
const x = d[u];
|
|
1792
|
-
if (x.src && !n.includes(x.src)) {
|
|
1793
|
-
n.push(x.src);
|
|
1794
|
-
const C = document.createElement("script");
|
|
1795
|
-
C.async = !0, C.src = x.src, document.head.appendChild(C);
|
|
1796
|
-
} else if (zt(x) && !o.includes(x.innerText))
|
|
1797
|
-
try {
|
|
1798
|
-
o.push(x.innerText), new Function(x.innerText)();
|
|
1799
|
-
} catch (C) {
|
|
1800
|
-
console.warn("`Embed`: Error running script:", C);
|
|
1801
|
-
}
|
|
1802
|
-
}
|
|
1803
|
-
}
|
|
1804
|
-
return V(() => {
|
|
1805
|
-
t.current && !r && (s(!0), c());
|
|
1806
|
-
}, [t.current, r]), /* @__PURE__ */ l(
|
|
1807
|
-
"div",
|
|
1808
|
-
{
|
|
1809
|
-
className: "builder-embed",
|
|
1810
|
-
ref: t,
|
|
1811
|
-
dangerouslySetInnerHTML: { __html: e.content }
|
|
1812
|
-
}
|
|
1813
|
-
);
|
|
1814
|
-
}
|
|
1815
|
-
const Yt = {
|
|
1816
|
-
name: "Form:Form",
|
|
1817
|
-
// editableTags: ['builder-form-error']
|
|
1818
|
-
defaults: {
|
|
1819
|
-
responsiveStyles: {
|
|
1820
|
-
large: {
|
|
1821
|
-
marginTop: "15px",
|
|
1822
|
-
paddingBottom: "15px"
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
},
|
|
1826
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",
|
|
1827
|
-
inputs: [{
|
|
1828
|
-
name: "sendSubmissionsTo",
|
|
1829
|
-
type: "string",
|
|
1830
|
-
// TODO: save to builder data and user can download as csv
|
|
1831
|
-
// TODO: easy for mode too or computed add/remove fields form mode
|
|
1832
|
-
// so you can edit details and high level mode at same time...
|
|
1833
|
-
// Later - more integrations like mailchimp
|
|
1834
|
-
// /api/v1/form-submit?to=mailchimp
|
|
1835
|
-
enum: [{
|
|
1836
|
-
label: "Send to email",
|
|
1837
|
-
value: "email",
|
|
1838
|
-
helperText: "Send form submissions to the email address of your choosing"
|
|
1839
|
-
}, {
|
|
1840
|
-
label: "Custom",
|
|
1841
|
-
value: "custom",
|
|
1842
|
-
helperText: "Handle where the form requests go manually with a little code, e.g. to your own custom backend"
|
|
1843
|
-
}],
|
|
1844
|
-
defaultValue: "email"
|
|
1845
|
-
}, {
|
|
1846
|
-
name: "sendSubmissionsToEmail",
|
|
1847
|
-
type: "string",
|
|
1848
|
-
required: !0,
|
|
1849
|
-
// TODO: required: () => options.get("sendSubmissionsTo") === "email"
|
|
1850
|
-
defaultValue: "your@email.com",
|
|
1851
|
-
showIf: 'options.get("sendSubmissionsTo") === "email"'
|
|
1852
|
-
}, {
|
|
1853
|
-
name: "sendWithJs",
|
|
1854
|
-
type: "boolean",
|
|
1855
|
-
helperText: "Set to false to use basic html form action",
|
|
1856
|
-
defaultValue: !0,
|
|
1857
|
-
showIf: 'options.get("sendSubmissionsTo") === "custom"'
|
|
1858
|
-
}, {
|
|
1859
|
-
name: "name",
|
|
1860
|
-
type: "string",
|
|
1861
|
-
defaultValue: "My form"
|
|
1862
|
-
// advanced: true
|
|
1863
|
-
}, {
|
|
1864
|
-
name: "action",
|
|
1865
|
-
type: "string",
|
|
1866
|
-
helperText: "URL to send the form data to",
|
|
1867
|
-
showIf: 'options.get("sendSubmissionsTo") === "custom"'
|
|
1868
|
-
}, {
|
|
1869
|
-
name: "contentType",
|
|
1870
|
-
type: "string",
|
|
1871
|
-
defaultValue: "application/json",
|
|
1872
|
-
advanced: !0,
|
|
1873
|
-
// TODO: do automatically if file input
|
|
1874
|
-
enum: ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"],
|
|
1875
|
-
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
1876
|
-
}, {
|
|
1877
|
-
name: "method",
|
|
1878
|
-
type: "string",
|
|
1879
|
-
showIf: 'options.get("sendSubmissionsTo") === "custom"',
|
|
1880
|
-
defaultValue: "POST",
|
|
1881
|
-
advanced: !0
|
|
1882
|
-
}, {
|
|
1883
|
-
name: "previewState",
|
|
1884
|
-
type: "string",
|
|
1885
|
-
// TODO: persist: false flag
|
|
1886
|
-
enum: ["unsubmitted", "sending", "success", "error"],
|
|
1887
|
-
defaultValue: "unsubmitted",
|
|
1888
|
-
helperText: 'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',
|
|
1889
|
-
showIf: 'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'
|
|
1890
|
-
}, {
|
|
1891
|
-
name: "successUrl",
|
|
1892
|
-
type: "url",
|
|
1893
|
-
helperText: "Optional URL to redirect the user to on form submission success",
|
|
1894
|
-
showIf: 'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'
|
|
1895
|
-
}, {
|
|
1896
|
-
name: "resetFormOnSubmit",
|
|
1897
|
-
type: "boolean",
|
|
1898
|
-
showIf: "options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",
|
|
1899
|
-
advanced: !0
|
|
1900
|
-
}, {
|
|
1901
|
-
name: "successMessage",
|
|
1902
|
-
type: "uiBlocks",
|
|
1903
|
-
hideFromUI: !0,
|
|
1904
|
-
defaultValue: [{
|
|
1905
|
-
"@type": "@builder.io/sdk:Element",
|
|
1906
|
-
responsiveStyles: {
|
|
1907
|
-
large: {
|
|
1908
|
-
marginTop: "10px"
|
|
1909
|
-
}
|
|
1910
|
-
},
|
|
1911
|
-
component: {
|
|
1912
|
-
name: "Text",
|
|
1913
|
-
options: {
|
|
1914
|
-
text: "<span>Thanks!</span>"
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
}]
|
|
1918
|
-
}, {
|
|
1919
|
-
name: "validate",
|
|
1920
|
-
type: "boolean",
|
|
1921
|
-
defaultValue: !0,
|
|
1922
|
-
advanced: !0
|
|
1923
|
-
}, {
|
|
1924
|
-
name: "errorMessagePath",
|
|
1925
|
-
type: "text",
|
|
1926
|
-
advanced: !0,
|
|
1927
|
-
helperText: 'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'
|
|
1928
|
-
}, {
|
|
1929
|
-
name: "errorMessage",
|
|
1930
|
-
type: "uiBlocks",
|
|
1931
|
-
hideFromUI: !0,
|
|
1932
|
-
defaultValue: [{
|
|
1933
|
-
"@type": "@builder.io/sdk:Element",
|
|
1934
|
-
responsiveStyles: {
|
|
1935
|
-
large: {
|
|
1936
|
-
marginTop: "10px"
|
|
1937
|
-
}
|
|
1938
|
-
},
|
|
1939
|
-
bindings: {
|
|
1940
|
-
"component.options.text": "state.formErrorMessage || block.component.options.text"
|
|
1941
|
-
},
|
|
1942
|
-
component: {
|
|
1943
|
-
name: "Text",
|
|
1944
|
-
options: {
|
|
1945
|
-
text: "<span>Form submission error :( Please check your answers and try again</span>"
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
}]
|
|
1949
|
-
}, {
|
|
1950
|
-
name: "sendingMessage",
|
|
1951
|
-
type: "uiBlocks",
|
|
1952
|
-
hideFromUI: !0,
|
|
1953
|
-
defaultValue: [{
|
|
1954
|
-
"@type": "@builder.io/sdk:Element",
|
|
1955
|
-
responsiveStyles: {
|
|
1956
|
-
large: {
|
|
1957
|
-
marginTop: "10px"
|
|
1958
|
-
}
|
|
1959
|
-
},
|
|
1960
|
-
component: {
|
|
1961
|
-
name: "Text",
|
|
1962
|
-
options: {
|
|
1963
|
-
text: "<span>Sending...</span>"
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
}]
|
|
1967
|
-
}, {
|
|
1968
|
-
name: "customHeaders",
|
|
1969
|
-
type: "map",
|
|
1970
|
-
valueType: {
|
|
1971
|
-
type: "string"
|
|
1972
|
-
},
|
|
1973
|
-
advanced: !0,
|
|
1974
|
-
showIf: 'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'
|
|
1975
|
-
}],
|
|
1976
|
-
noWrap: !0,
|
|
1977
|
-
canHaveChildren: !0,
|
|
1978
|
-
defaultChildren: [{
|
|
1979
|
-
"@type": "@builder.io/sdk:Element",
|
|
1980
|
-
responsiveStyles: {
|
|
1981
|
-
large: {
|
|
1982
|
-
marginTop: "10px"
|
|
1983
|
-
}
|
|
1984
|
-
},
|
|
1985
|
-
component: {
|
|
1986
|
-
name: "Text",
|
|
1987
|
-
options: {
|
|
1988
|
-
text: "<span>Enter your name</span>"
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
}, {
|
|
1992
|
-
"@type": "@builder.io/sdk:Element",
|
|
1993
|
-
responsiveStyles: {
|
|
1994
|
-
large: {
|
|
1995
|
-
marginTop: "10px"
|
|
1996
|
-
}
|
|
1997
|
-
},
|
|
1998
|
-
component: {
|
|
1999
|
-
name: "Form:Input",
|
|
2000
|
-
options: {
|
|
2001
|
-
name: "name",
|
|
2002
|
-
placeholder: "Jane Doe"
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
}, {
|
|
2006
|
-
"@type": "@builder.io/sdk:Element",
|
|
2007
|
-
responsiveStyles: {
|
|
2008
|
-
large: {
|
|
2009
|
-
marginTop: "10px"
|
|
2010
|
-
}
|
|
2011
|
-
},
|
|
2012
|
-
component: {
|
|
2013
|
-
name: "Text",
|
|
2014
|
-
options: {
|
|
2015
|
-
text: "<span>Enter your email</span>"
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
}, {
|
|
2019
|
-
"@type": "@builder.io/sdk:Element",
|
|
2020
|
-
responsiveStyles: {
|
|
2021
|
-
large: {
|
|
2022
|
-
marginTop: "10px"
|
|
2023
|
-
}
|
|
2024
|
-
},
|
|
2025
|
-
component: {
|
|
2026
|
-
name: "Form:Input",
|
|
2027
|
-
options: {
|
|
2028
|
-
name: "email",
|
|
2029
|
-
placeholder: "jane@doe.com"
|
|
2030
|
-
}
|
|
2031
|
-
}
|
|
2032
|
-
}, {
|
|
2033
|
-
"@type": "@builder.io/sdk:Element",
|
|
2034
|
-
responsiveStyles: {
|
|
2035
|
-
large: {
|
|
2036
|
-
marginTop: "10px"
|
|
2037
|
-
}
|
|
2038
|
-
},
|
|
2039
|
-
component: {
|
|
2040
|
-
name: "Form:SubmitButton",
|
|
2041
|
-
options: {
|
|
2042
|
-
text: "Submit"
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
}]
|
|
2046
|
-
}, Gt = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], Qt = () => {
|
|
2047
|
-
const e = process.env.NODE_ENV || "production";
|
|
2048
|
-
return Gt.includes(e) ? e : "production";
|
|
2049
|
-
}, Xt = (e, t, n) => {
|
|
2050
|
-
const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, a) => o != null ? o[a] : o, e);
|
|
2051
|
-
return i === void 0 || i === e ? n : i;
|
|
2052
|
-
};
|
|
2053
|
-
function Zt(e) {
|
|
2054
|
-
var x, C;
|
|
2055
|
-
const t = ee(null), [n, i] = v(() => "unsubmitted"), [o, a] = v(() => null), [r, s] = v(() => "");
|
|
2056
|
-
function c(f) {
|
|
2057
|
-
var p, E;
|
|
2058
|
-
const y = {
|
|
2059
|
-
...e.builderContext.rootState,
|
|
2060
|
-
...f
|
|
2061
|
-
};
|
|
2062
|
-
e.builderContext.rootSetState ? (E = (p = e.builderContext).rootSetState) == null || E.call(p, y) : e.builderContext.rootState = y;
|
|
2063
|
-
}
|
|
2064
|
-
function d() {
|
|
2065
|
-
return M() && e.previewState || n;
|
|
2066
|
-
}
|
|
2067
|
-
function u(f) {
|
|
2068
|
-
var p;
|
|
2069
|
-
const y = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2070
|
-
if (e.sendSubmissionsTo === "zapier")
|
|
2071
|
-
f.preventDefault();
|
|
2072
|
-
else if (y) {
|
|
2073
|
-
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2074
|
-
f.preventDefault();
|
|
2075
|
-
return;
|
|
2076
|
-
}
|
|
2077
|
-
f.preventDefault();
|
|
2078
|
-
const E = f.currentTarget, A = e.customHeaders || {};
|
|
2079
|
-
let k;
|
|
2080
|
-
const I = new FormData(E), B = Array.from(
|
|
2081
|
-
f.currentTarget.querySelectorAll("input,select,textarea")
|
|
2082
|
-
).filter((h) => !!h.name).map((h) => {
|
|
2083
|
-
let T;
|
|
2084
|
-
const D = h.name;
|
|
2085
|
-
if (h instanceof HTMLInputElement)
|
|
2086
|
-
if (h.type === "radio") {
|
|
2087
|
-
if (h.checked)
|
|
2088
|
-
return T = h.name, {
|
|
2089
|
-
key: D,
|
|
2090
|
-
value: T
|
|
2091
|
-
};
|
|
2092
|
-
} else if (h.type === "checkbox")
|
|
2093
|
-
T = h.checked;
|
|
2094
|
-
else if (h.type === "number" || h.type === "range") {
|
|
2095
|
-
const W = h.valueAsNumber;
|
|
2096
|
-
isNaN(W) || (T = W);
|
|
2097
|
-
} else
|
|
2098
|
-
h.type === "file" ? T = h.files : T = h.value;
|
|
2099
|
-
else
|
|
2100
|
-
T = h.value;
|
|
2101
|
-
return {
|
|
2102
|
-
key: D,
|
|
2103
|
-
value: T
|
|
2104
|
-
};
|
|
2105
|
-
});
|
|
2106
|
-
let P = e.contentType;
|
|
2107
|
-
if (e.sendSubmissionsTo === "email" && (P = "multipart/form-data"), Array.from(B).forEach(({ value: h }) => {
|
|
2108
|
-
(h instanceof File || Array.isArray(h) && h[0] instanceof File || h instanceof FileList) && (P = "multipart/form-data");
|
|
2109
|
-
}), P !== "application/json")
|
|
2110
|
-
k = I;
|
|
2111
|
-
else {
|
|
2112
|
-
const h = {};
|
|
2113
|
-
Array.from(B).forEach(({ value: T, key: D }) => {
|
|
2114
|
-
Pe(h, D, T);
|
|
2115
|
-
}), k = JSON.stringify(h);
|
|
2116
|
-
}
|
|
2117
|
-
P && P !== "multipart/form-data" && (y && ((p = e.action) != null && p.includes("zapier.com")) || (A["content-type"] = P));
|
|
2118
|
-
const $ = new CustomEvent("presubmit", { detail: { body: k } });
|
|
2119
|
-
if (t.current && (t.current.dispatchEvent($), $.defaultPrevented))
|
|
2120
|
-
return;
|
|
2121
|
-
i("sending");
|
|
2122
|
-
const L = `${Qt() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
2123
|
-
e.sendSubmissionsToEmail || ""
|
|
2124
|
-
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2125
|
-
fetch(
|
|
2126
|
-
e.sendSubmissionsTo === "email" ? L : e.action,
|
|
2127
|
-
{ body: k, headers: A, method: e.method || "post" }
|
|
2128
|
-
).then(
|
|
2129
|
-
async (h) => {
|
|
2130
|
-
let T;
|
|
2131
|
-
const D = h.headers.get("content-type");
|
|
2132
|
-
if (D && D.indexOf("application/json") !== -1 ? T = await h.json() : T = await h.text(), !h.ok && e.errorMessagePath) {
|
|
2133
|
-
let W = Xt(T, e.errorMessagePath);
|
|
2134
|
-
W && (typeof W != "string" && (W = JSON.stringify(W)), s(W), c({ formErrorMessage: W }));
|
|
2135
|
-
}
|
|
2136
|
-
if (a(T), i(h.ok ? "success" : "error"), h.ok) {
|
|
2137
|
-
const W = new CustomEvent("submit:success", {
|
|
2138
|
-
detail: { res: h, body: T }
|
|
2139
|
-
});
|
|
2140
|
-
if (t.current) {
|
|
2141
|
-
if (t.current.dispatchEvent(W), W.defaultPrevented)
|
|
2142
|
-
return;
|
|
2143
|
-
e.resetFormOnSubmit !== !1 && t.current.reset();
|
|
2144
|
-
}
|
|
2145
|
-
if (e.successUrl)
|
|
2146
|
-
if (t.current) {
|
|
2147
|
-
const H = new CustomEvent("route", {
|
|
2148
|
-
detail: { url: e.successUrl }
|
|
2149
|
-
});
|
|
2150
|
-
t.current.dispatchEvent(H), H.defaultPrevented || (location.href = e.successUrl);
|
|
2151
|
-
} else
|
|
2152
|
-
location.href = e.successUrl;
|
|
2153
|
-
}
|
|
2154
|
-
},
|
|
2155
|
-
(h) => {
|
|
2156
|
-
const T = new CustomEvent("submit:error", {
|
|
2157
|
-
detail: { error: h }
|
|
2158
|
-
});
|
|
2159
|
-
t.current && (t.current.dispatchEvent(T), T.defaultPrevented) || (a(h), i("error"));
|
|
2160
|
-
}
|
|
2161
|
-
);
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
return /* @__PURE__ */ F(m, { children: [
|
|
2165
|
-
" ",
|
|
2166
|
-
/* @__PURE__ */ F(
|
|
2167
|
-
"form",
|
|
2168
|
-
{
|
|
2169
|
-
validate: e.validate,
|
|
2170
|
-
ref: t,
|
|
2171
|
-
action: !e.sendWithJs && e.action,
|
|
2172
|
-
method: e.method,
|
|
2173
|
-
name: e.name,
|
|
2174
|
-
onSubmit: (f) => u(f),
|
|
2175
|
-
...e.attributes,
|
|
2176
|
-
children: [
|
|
2177
|
-
" ",
|
|
2178
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(m, { children: (C = (x = e.builderBlock) == null ? void 0 : x.children) == null ? void 0 : C.map((f, y) => /* @__PURE__ */ l(
|
|
2179
|
-
J,
|
|
2180
|
-
{
|
|
2181
|
-
block: f,
|
|
2182
|
-
context: e.builderContext,
|
|
2183
|
-
registeredComponents: e.builderComponents,
|
|
2184
|
-
linkComponent: e.builderLinkComponent
|
|
2185
|
-
},
|
|
2186
|
-
`form-block-${y}`
|
|
2187
|
-
)) }) : null,
|
|
2188
|
-
" ",
|
|
2189
|
-
d() === "error" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2190
|
-
j,
|
|
2191
|
-
{
|
|
2192
|
-
path: "errorMessage",
|
|
2193
|
-
blocks: e.errorMessage,
|
|
2194
|
-
context: e.builderContext
|
|
2195
|
-
}
|
|
2196
|
-
) }) : null,
|
|
2197
|
-
" ",
|
|
2198
|
-
d() === "sending" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2199
|
-
j,
|
|
2200
|
-
{
|
|
2201
|
-
path: "sendingMessage",
|
|
2202
|
-
blocks: e.sendingMessage,
|
|
2203
|
-
context: e.builderContext
|
|
2204
|
-
}
|
|
2205
|
-
) }) : null,
|
|
2206
|
-
" ",
|
|
2207
|
-
d() === "error" && o ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ F("pre", { className: "builder-form-error-text pre-25b9edf0", children: [
|
|
2208
|
-
" ",
|
|
2209
|
-
JSON.stringify(o, null, 2),
|
|
2210
|
-
" "
|
|
2211
|
-
] }) }) : null,
|
|
2212
|
-
" ",
|
|
2213
|
-
d() === "success" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2214
|
-
j,
|
|
2215
|
-
{
|
|
2216
|
-
path: "successMessage",
|
|
2217
|
-
blocks: e.successMessage,
|
|
2218
|
-
context: e.builderContext
|
|
2219
|
-
}
|
|
2220
|
-
) }) : null,
|
|
2221
|
-
" "
|
|
2222
|
-
]
|
|
2223
|
-
}
|
|
2224
|
-
),
|
|
2225
|
-
" ",
|
|
2226
|
-
/* @__PURE__ */ l("style", { children: ".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }" }),
|
|
2227
|
-
" "
|
|
2228
|
-
] });
|
|
2229
|
-
}
|
|
2230
|
-
const en = {
|
|
2231
|
-
name: "Form:Input",
|
|
2232
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2233
|
-
inputs: [
|
|
2234
|
-
{
|
|
2235
|
-
name: "type",
|
|
2236
|
-
type: "text",
|
|
2237
|
-
enum: ["text", "number", "email", "url", "checkbox", "radio", "range", "date", "datetime-local", "search", "tel", "time", "file", "month", "week", "password", "color", "hidden"],
|
|
2238
|
-
defaultValue: "text"
|
|
2239
|
-
},
|
|
2240
|
-
{
|
|
2241
|
-
name: "name",
|
|
2242
|
-
type: "string",
|
|
2243
|
-
required: !0,
|
|
2244
|
-
helperText: 'Every input in a form needs a unique name describing what it takes, e.g. "email"'
|
|
2245
|
-
},
|
|
2246
|
-
{
|
|
2247
|
-
name: "placeholder",
|
|
2248
|
-
type: "string",
|
|
2249
|
-
defaultValue: "Hello there",
|
|
2250
|
-
helperText: "Text to display when there is no value"
|
|
2251
|
-
},
|
|
2252
|
-
// TODO: handle value vs default value automatically like ng-model
|
|
2253
|
-
{
|
|
2254
|
-
name: "defaultValue",
|
|
2255
|
-
type: "string"
|
|
2256
|
-
},
|
|
2257
|
-
{
|
|
2258
|
-
name: "value",
|
|
2259
|
-
type: "string",
|
|
2260
|
-
advanced: !0
|
|
2261
|
-
},
|
|
2262
|
-
{
|
|
2263
|
-
name: "required",
|
|
2264
|
-
type: "boolean",
|
|
2265
|
-
helperText: "Is this input required to be filled out to submit a form",
|
|
2266
|
-
defaultValue: !1
|
|
2267
|
-
}
|
|
2268
|
-
],
|
|
2269
|
-
noWrap: !0,
|
|
2270
|
-
static: !0,
|
|
2271
|
-
defaultStyles: {
|
|
2272
|
-
paddingTop: "10px",
|
|
2273
|
-
paddingBottom: "10px",
|
|
2274
|
-
paddingLeft: "10px",
|
|
2275
|
-
paddingRight: "10px",
|
|
2276
|
-
borderRadius: "3px",
|
|
2277
|
-
borderWidth: "1px",
|
|
2278
|
-
borderStyle: "solid",
|
|
2279
|
-
borderColor: "#ccc"
|
|
2280
|
-
}
|
|
2281
|
-
};
|
|
2282
|
-
function tn(e) {
|
|
2283
|
-
return /* @__PURE__ */ re(
|
|
2284
|
-
"input",
|
|
2285
|
-
{
|
|
2286
|
-
...e.attributes,
|
|
2287
|
-
key: M() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2288
|
-
placeholder: e.placeholder,
|
|
2289
|
-
type: e.type,
|
|
2290
|
-
name: e.name,
|
|
2291
|
-
value: e.value,
|
|
2292
|
-
defaultValue: e.defaultValue,
|
|
2293
|
-
required: e.required
|
|
2294
|
-
}
|
|
2295
|
-
);
|
|
2296
|
-
}
|
|
2297
|
-
const nn = {
|
|
2298
|
-
name: "Form:Select",
|
|
2299
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2300
|
-
defaultStyles: {
|
|
2301
|
-
alignSelf: "flex-start"
|
|
2302
|
-
},
|
|
2303
|
-
inputs: [{
|
|
2304
|
-
name: "options",
|
|
2305
|
-
type: "list",
|
|
2306
|
-
required: !0,
|
|
2307
|
-
subFields: [{
|
|
2308
|
-
name: "value",
|
|
2309
|
-
type: "text",
|
|
2310
|
-
required: !0
|
|
2311
|
-
}, {
|
|
2312
|
-
name: "name",
|
|
2313
|
-
type: "text"
|
|
2314
|
-
}],
|
|
2315
|
-
defaultValue: [{
|
|
2316
|
-
value: "option 1"
|
|
2317
|
-
}, {
|
|
2318
|
-
value: "option 2"
|
|
2319
|
-
}]
|
|
2320
|
-
}, {
|
|
2321
|
-
name: "name",
|
|
2322
|
-
type: "string",
|
|
2323
|
-
required: !0,
|
|
2324
|
-
helperText: 'Every select in a form needs a unique name describing what it gets, e.g. "email"'
|
|
2325
|
-
}, {
|
|
2326
|
-
name: "defaultValue",
|
|
2327
|
-
type: "string"
|
|
2328
|
-
}, {
|
|
2329
|
-
name: "value",
|
|
2330
|
-
type: "string",
|
|
2331
|
-
advanced: !0
|
|
2332
|
-
}, {
|
|
2333
|
-
name: "required",
|
|
2334
|
-
type: "boolean",
|
|
2335
|
-
defaultValue: !1
|
|
2336
|
-
}],
|
|
2337
|
-
static: !0,
|
|
2338
|
-
noWrap: !0
|
|
2339
|
-
};
|
|
2340
|
-
function on(e) {
|
|
2341
|
-
var t;
|
|
2342
|
-
return /* @__PURE__ */ re(
|
|
2343
|
-
"select",
|
|
2344
|
-
{
|
|
2345
|
-
...e.attributes,
|
|
2346
|
-
value: e.value,
|
|
2347
|
-
key: M() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2348
|
-
defaultValue: e.defaultValue,
|
|
2349
|
-
name: e.name
|
|
2350
|
-
},
|
|
2351
|
-
(t = e.options) == null ? void 0 : t.map((n) => /* @__PURE__ */ l("option", { value: n.value, children: n.name || n.value }))
|
|
2352
|
-
);
|
|
2353
|
-
}
|
|
2354
|
-
const an = {
|
|
2355
|
-
name: "Form:SubmitButton",
|
|
2356
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2357
|
-
defaultStyles: {
|
|
2358
|
-
appearance: "none",
|
|
2359
|
-
paddingTop: "15px",
|
|
2360
|
-
paddingBottom: "15px",
|
|
2361
|
-
paddingLeft: "25px",
|
|
2362
|
-
paddingRight: "25px",
|
|
2363
|
-
backgroundColor: "#3898EC",
|
|
2364
|
-
color: "white",
|
|
2365
|
-
borderRadius: "4px",
|
|
2366
|
-
cursor: "pointer"
|
|
2367
|
-
},
|
|
2368
|
-
inputs: [{
|
|
2369
|
-
name: "text",
|
|
2370
|
-
type: "text",
|
|
2371
|
-
defaultValue: "Click me"
|
|
2372
|
-
}],
|
|
2373
|
-
static: !0,
|
|
2374
|
-
noWrap: !0
|
|
2375
|
-
// TODO: optional children? maybe as optional form input
|
|
2376
|
-
// that only shows if advanced setting is flipped
|
|
2377
|
-
// TODO: defaultChildren
|
|
2378
|
-
// canHaveChildren: true,
|
|
2379
|
-
};
|
|
2380
|
-
function rn(e) {
|
|
2381
|
-
return /* @__PURE__ */ l("button", { type: "submit", ...e.attributes, children: e.text });
|
|
2382
|
-
}
|
|
2383
|
-
const ln = {
|
|
2384
|
-
// friendlyName?
|
|
2385
|
-
name: "Raw:Img",
|
|
2386
|
-
hideFromInsertMenu: !0,
|
|
2387
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
2388
|
-
inputs: [{
|
|
2389
|
-
name: "image",
|
|
2390
|
-
bubble: !0,
|
|
2391
|
-
type: "file",
|
|
2392
|
-
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
2393
|
-
required: !0
|
|
2394
|
-
}],
|
|
2395
|
-
noWrap: !0,
|
|
2396
|
-
static: !0
|
|
2397
|
-
};
|
|
2398
|
-
function sn(e) {
|
|
2399
|
-
return /* @__PURE__ */ l(
|
|
2400
|
-
"img",
|
|
2401
|
-
{
|
|
2402
|
-
style: {
|
|
2403
|
-
objectFit: e.backgroundSize || "cover",
|
|
2404
|
-
objectPosition: e.backgroundPosition || "center"
|
|
2405
|
-
},
|
|
2406
|
-
alt: e.altText,
|
|
2407
|
-
src: e.imgSrc || e.image,
|
|
2408
|
-
...e.attributes
|
|
2409
|
-
},
|
|
2410
|
-
M() && e.imgSrc || "default-key"
|
|
2411
|
-
);
|
|
2412
|
-
}
|
|
2413
|
-
const cn = {
|
|
2414
|
-
name: "Video",
|
|
2415
|
-
canHaveChildren: !0,
|
|
2416
|
-
defaultStyles: {
|
|
2417
|
-
minHeight: "20px",
|
|
2418
|
-
minWidth: "20px"
|
|
2419
|
-
},
|
|
2420
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
|
|
2421
|
-
inputs: [{
|
|
2422
|
-
name: "video",
|
|
2423
|
-
type: "file",
|
|
2424
|
-
allowedFileTypes: ["mp4"],
|
|
2425
|
-
bubble: !0,
|
|
2426
|
-
defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
|
|
2427
|
-
required: !0
|
|
2428
|
-
}, {
|
|
2429
|
-
name: "posterImage",
|
|
2430
|
-
type: "file",
|
|
2431
|
-
allowedFileTypes: ["jpeg", "png"],
|
|
2432
|
-
helperText: "Image to show before the video plays"
|
|
2433
|
-
}, {
|
|
2434
|
-
name: "autoPlay",
|
|
2435
|
-
type: "boolean",
|
|
2436
|
-
defaultValue: !0
|
|
2437
|
-
}, {
|
|
2438
|
-
name: "controls",
|
|
2439
|
-
type: "boolean",
|
|
2440
|
-
defaultValue: !1
|
|
2441
|
-
}, {
|
|
2442
|
-
name: "muted",
|
|
2443
|
-
type: "boolean",
|
|
2444
|
-
defaultValue: !0
|
|
2445
|
-
}, {
|
|
2446
|
-
name: "loop",
|
|
2447
|
-
type: "boolean",
|
|
2448
|
-
defaultValue: !0
|
|
2449
|
-
}, {
|
|
2450
|
-
name: "playsInline",
|
|
2451
|
-
type: "boolean",
|
|
2452
|
-
defaultValue: !0
|
|
2453
|
-
}, {
|
|
2454
|
-
name: "fit",
|
|
2455
|
-
type: "text",
|
|
2456
|
-
defaultValue: "cover",
|
|
2457
|
-
enum: ["contain", "cover", "fill", "auto"]
|
|
2458
|
-
}, {
|
|
2459
|
-
name: "preload",
|
|
2460
|
-
type: "text",
|
|
2461
|
-
defaultValue: "metadata",
|
|
2462
|
-
enum: ["auto", "metadata", "none"]
|
|
2463
|
-
}, {
|
|
2464
|
-
name: "fitContent",
|
|
2465
|
-
type: "boolean",
|
|
2466
|
-
helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
|
|
2467
|
-
defaultValue: !0,
|
|
2468
|
-
advanced: !0
|
|
2469
|
-
}, {
|
|
2470
|
-
name: "position",
|
|
2471
|
-
type: "text",
|
|
2472
|
-
defaultValue: "center",
|
|
2473
|
-
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
2474
|
-
}, {
|
|
2475
|
-
name: "height",
|
|
2476
|
-
type: "number",
|
|
2477
|
-
advanced: !0
|
|
2478
|
-
}, {
|
|
2479
|
-
name: "width",
|
|
2480
|
-
type: "number",
|
|
2481
|
-
advanced: !0
|
|
2482
|
-
}, {
|
|
2483
|
-
name: "aspectRatio",
|
|
2484
|
-
type: "number",
|
|
2485
|
-
advanced: !0,
|
|
2486
|
-
defaultValue: 0.7004048582995948
|
|
2487
|
-
}, {
|
|
2488
|
-
name: "lazyLoad",
|
|
2489
|
-
type: "boolean",
|
|
2490
|
-
helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
|
|
2491
|
-
defaultValue: !0,
|
|
2492
|
-
advanced: !0
|
|
2493
|
-
}]
|
|
2494
|
-
};
|
|
2495
|
-
function dn(e) {
|
|
2496
|
-
var i, o, a, r, s, c, d;
|
|
2497
|
-
function t() {
|
|
2498
|
-
return {
|
|
2499
|
-
...e.autoPlay === !0 ? {
|
|
2500
|
-
autoPlay: !0
|
|
2501
|
-
} : {},
|
|
2502
|
-
...e.muted === !0 ? {
|
|
2503
|
-
muted: !0
|
|
2504
|
-
} : {},
|
|
2505
|
-
...e.controls === !0 ? {
|
|
2506
|
-
controls: !0
|
|
2507
|
-
} : {},
|
|
2508
|
-
...e.loop === !0 ? {
|
|
2509
|
-
loop: !0
|
|
2510
|
-
} : {},
|
|
2511
|
-
...e.playsInline === !0 ? {
|
|
2512
|
-
playsInline: !0
|
|
2513
|
-
} : {}
|
|
2514
|
-
};
|
|
2515
|
-
}
|
|
2516
|
-
function n() {
|
|
2517
|
-
return {
|
|
2518
|
-
...t()
|
|
2519
|
-
};
|
|
2520
|
-
}
|
|
2521
|
-
return /* @__PURE__ */ F(
|
|
2522
|
-
"div",
|
|
2523
|
-
{
|
|
2524
|
-
style: {
|
|
2525
|
-
position: "relative"
|
|
2526
|
-
},
|
|
2527
|
-
children: [
|
|
2528
|
-
/* @__PURE__ */ l(
|
|
2529
|
-
"video",
|
|
2530
|
-
{
|
|
2531
|
-
className: "builder-video",
|
|
2532
|
-
...n(),
|
|
2533
|
-
preload: e.preload || "metadata",
|
|
2534
|
-
style: {
|
|
2535
|
-
width: "100%",
|
|
2536
|
-
height: "100%",
|
|
2537
|
-
...(i = e.attributes) == null ? void 0 : i.style,
|
|
2538
|
-
objectFit: e.fit,
|
|
2539
|
-
objectPosition: e.position,
|
|
2540
|
-
// Hack to get object fit to work as expected and
|
|
2541
|
-
// not have the video overflow
|
|
2542
|
-
zIndex: 2,
|
|
2543
|
-
borderRadius: "1px",
|
|
2544
|
-
...e.aspectRatio ? {
|
|
2545
|
-
position: "absolute"
|
|
2546
|
-
} : null
|
|
2547
|
-
},
|
|
2548
|
-
src: e.video || "no-src",
|
|
2549
|
-
poster: e.posterImage,
|
|
2550
|
-
children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
|
|
2551
|
-
}
|
|
2552
|
-
),
|
|
2553
|
-
e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2554
|
-
"div",
|
|
2555
|
-
{
|
|
2556
|
-
style: {
|
|
2557
|
-
width: "100%",
|
|
2558
|
-
paddingTop: e.aspectRatio * 100 + "%",
|
|
2559
|
-
pointerEvents: "none",
|
|
2560
|
-
fontSize: "0px"
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
) }) : null,
|
|
2564
|
-
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2565
|
-
"div",
|
|
2566
|
-
{
|
|
2567
|
-
style: {
|
|
2568
|
-
display: "flex",
|
|
2569
|
-
flexDirection: "column",
|
|
2570
|
-
alignItems: "stretch"
|
|
2571
|
-
},
|
|
2572
|
-
children: e.children
|
|
2573
|
-
}
|
|
2574
|
-
) }) : null,
|
|
2575
|
-
(d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
2576
|
-
"div",
|
|
2577
|
-
{
|
|
2578
|
-
style: {
|
|
2579
|
-
pointerEvents: "none",
|
|
2580
|
-
display: "flex",
|
|
2581
|
-
flexDirection: "column",
|
|
2582
|
-
alignItems: "stretch",
|
|
2583
|
-
position: "absolute",
|
|
2584
|
-
top: "0",
|
|
2585
|
-
left: "0",
|
|
2586
|
-
width: "100%",
|
|
2587
|
-
height: "100%"
|
|
2588
|
-
},
|
|
2589
|
-
children: e.children
|
|
2590
|
-
}
|
|
2591
|
-
) }) : null
|
|
2592
|
-
]
|
|
2593
|
-
}
|
|
2594
|
-
);
|
|
2595
|
-
}
|
|
2596
|
-
const un = () => [{
|
|
2597
|
-
component: _t,
|
|
2598
|
-
...Ht
|
|
2599
|
-
}, {
|
|
2600
|
-
component: Jt,
|
|
2601
|
-
...Kt
|
|
2602
|
-
}, {
|
|
2603
|
-
component: Zt,
|
|
2604
|
-
...Yt
|
|
2605
|
-
}, {
|
|
2606
|
-
component: tn,
|
|
2607
|
-
...en
|
|
2608
|
-
}, {
|
|
2609
|
-
component: rn,
|
|
2610
|
-
...an
|
|
2611
|
-
}, {
|
|
2612
|
-
component: on,
|
|
2613
|
-
...nn
|
|
2614
|
-
}, {
|
|
2615
|
-
component: sn,
|
|
2616
|
-
...ln
|
|
2617
|
-
}, {
|
|
2618
|
-
component: dn,
|
|
2619
|
-
...cn
|
|
2620
|
-
}], ve = () => [{
|
|
2621
|
-
component: Ge,
|
|
2622
|
-
...Wt
|
|
2623
|
-
}, {
|
|
2624
|
-
component: Et,
|
|
2625
|
-
...Ft
|
|
2626
|
-
}, {
|
|
2627
|
-
component: Rt,
|
|
2628
|
-
...Nt
|
|
2629
|
-
}, {
|
|
2630
|
-
component: Bt,
|
|
2631
|
-
...$t
|
|
2632
|
-
}, {
|
|
2633
|
-
component: At,
|
|
2634
|
-
...Lt
|
|
2635
|
-
}, {
|
|
2636
|
-
component: Mt,
|
|
2637
|
-
...Dt
|
|
2638
|
-
}, {
|
|
2639
|
-
component: Bn,
|
|
2640
|
-
...Ot
|
|
2641
|
-
}, {
|
|
2642
|
-
component: Ut,
|
|
2643
|
-
...jt
|
|
2644
|
-
}, ...un()], mn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2645
|
-
function getAndSetVariantId() {
|
|
2646
|
-
function setCookie(name, value, days) {
|
|
2647
|
-
let expires = '';
|
|
2648
|
-
if (days) {
|
|
2649
|
-
const date = new Date();
|
|
2650
|
-
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
2651
|
-
expires = '; expires=' + date.toUTCString();
|
|
2652
|
-
}
|
|
2653
|
-
document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
|
|
2654
|
-
}
|
|
2655
|
-
function getCookie(name) {
|
|
2656
|
-
const nameEQ = name + '=';
|
|
2657
|
-
const ca = document.cookie.split(';');
|
|
2658
|
-
for (let i = 0; i < ca.length; i++) {
|
|
2659
|
-
let c = ca[i];
|
|
2660
|
-
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
2661
|
-
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
2662
|
-
}
|
|
2663
|
-
return null;
|
|
2664
|
-
}
|
|
2665
|
-
const cookieName = \`builder.tests.\${contentId}\`;
|
|
2666
|
-
const variantInCookie = getCookie(cookieName);
|
|
2667
|
-
const availableIDs = variants.map(vr => vr.id).concat(contentId);
|
|
2668
|
-
if (variantInCookie && availableIDs.includes(variantInCookie)) {
|
|
2669
|
-
return variantInCookie;
|
|
2670
|
-
}
|
|
2671
|
-
let n = 0;
|
|
2672
|
-
const random = Math.random();
|
|
2673
|
-
for (let i = 0; i < variants.length; i++) {
|
|
2674
|
-
const variant = variants[i];
|
|
2675
|
-
const testRatio = variant.testRatio;
|
|
2676
|
-
n += testRatio;
|
|
2677
|
-
if (random < n) {
|
|
2678
|
-
setCookie(cookieName, variant.id);
|
|
2679
|
-
return variant.id;
|
|
2680
|
-
}
|
|
2681
|
-
}
|
|
2682
|
-
setCookie(cookieName, contentId);
|
|
2683
|
-
return contentId;
|
|
2684
|
-
}
|
|
2685
|
-
const winningVariantId = getAndSetVariantId();
|
|
2686
|
-
const styleEl = document.currentScript?.previousElementSibling;
|
|
2687
|
-
if (isHydrationTarget) {
|
|
2688
|
-
styleEl.remove();
|
|
2689
|
-
const thisScriptEl = document.currentScript;
|
|
2690
|
-
thisScriptEl?.remove();
|
|
2691
|
-
} else {
|
|
2692
|
-
const newStyleStr = variants.concat({
|
|
2693
|
-
id: contentId
|
|
2694
|
-
}).filter(variant => variant.id !== winningVariantId).map(value => {
|
|
2695
|
-
return \`.variant-\${value.id} { display: none; }
|
|
2696
|
-
\`;
|
|
2697
|
-
}).join('');
|
|
2698
|
-
styleEl.innerHTML = newStyleStr;
|
|
2699
|
-
}
|
|
2700
|
-
}`, fn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2701
|
-
if (!navigator.cookieEnabled) {
|
|
2702
|
-
return;
|
|
2703
|
-
}
|
|
2704
|
-
function getCookie(name) {
|
|
2705
|
-
const nameEQ = name + '=';
|
|
2706
|
-
const ca = document.cookie.split(';');
|
|
2707
|
-
for (let i = 0; i < ca.length; i++) {
|
|
2708
|
-
let c = ca[i];
|
|
2709
|
-
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
2710
|
-
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
2711
|
-
}
|
|
2712
|
-
return null;
|
|
2713
|
-
}
|
|
2714
|
-
const cookieName = \`builder.tests.\${defaultContentId}\`;
|
|
2715
|
-
const winningVariant = getCookie(cookieName);
|
|
2716
|
-
const parentDiv = document.currentScript?.parentElement;
|
|
2717
|
-
const isDefaultContent = variantContentId === defaultContentId;
|
|
2718
|
-
const isWinningVariant = winningVariant === variantContentId;
|
|
2719
|
-
if (isWinningVariant && !isDefaultContent) {
|
|
2720
|
-
parentDiv?.removeAttribute('hidden');
|
|
2721
|
-
parentDiv?.removeAttribute('aria-hidden');
|
|
2722
|
-
} else if (!isWinningVariant && isDefaultContent) {
|
|
2723
|
-
parentDiv?.setAttribute('hidden', 'true');
|
|
2724
|
-
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
2725
|
-
}
|
|
2726
|
-
if (isHydrationTarget) {
|
|
2727
|
-
if (!isWinningVariant) {
|
|
2728
|
-
parentDiv?.remove();
|
|
2729
|
-
}
|
|
2730
|
-
const thisScriptEl = document.currentScript;
|
|
2731
|
-
thisScriptEl?.remove();
|
|
2732
|
-
}
|
|
2733
|
-
return;
|
|
2734
|
-
}`, $e = "builderIoAbTest", Le = "builderIoRenderContent", G = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2735
|
-
...t,
|
|
2736
|
-
testVariationId: t.id,
|
|
2737
|
-
id: e == null ? void 0 : e.id
|
|
2738
|
-
})), hn = ({
|
|
2739
|
-
canTrack: e,
|
|
2740
|
-
content: t
|
|
2741
|
-
}) => !(!(G(t).length > 0) || !e || U()), gn = (e) => e === "react" || e === "reactNative", De = gn(z), bn = () => `
|
|
2742
|
-
window.${$e} = ${mn}
|
|
2743
|
-
window.${Le} = ${fn}
|
|
2744
|
-
`, yn = (e, t) => `
|
|
2745
|
-
window.${$e}(
|
|
2746
|
-
"${t}",${JSON.stringify(e)}, ${De}
|
|
2747
|
-
)`, pn = ({
|
|
2748
|
-
contentId: e,
|
|
2749
|
-
variationId: t
|
|
2750
|
-
}) => `window.${Le}(
|
|
2751
|
-
"${t}", "${e}", ${De}
|
|
2752
|
-
)`;
|
|
2753
|
-
function oe(e) {
|
|
2754
|
-
return /* @__PURE__ */ l(
|
|
2755
|
-
"script",
|
|
2756
|
-
{
|
|
2757
|
-
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
2758
|
-
id: e.id || ""
|
|
2759
|
-
}
|
|
2760
|
-
);
|
|
2761
|
-
}
|
|
2762
|
-
function ke(e) {
|
|
2763
|
-
return Math.round(e * 1e3) / 1e3;
|
|
2764
|
-
}
|
|
2765
|
-
const xn = (e, t, n = !0) => {
|
|
2766
|
-
if (!(e instanceof HTMLElement))
|
|
2767
|
-
return null;
|
|
2768
|
-
let i = n ? e : e.parentElement;
|
|
2769
|
-
do {
|
|
2770
|
-
if (!i)
|
|
2771
|
-
return null;
|
|
2772
|
-
if (t(i))
|
|
2773
|
-
return i;
|
|
2774
|
-
} while (i = i.parentElement);
|
|
2775
|
-
return null;
|
|
2776
|
-
}, Sn = (e) => xn(e, (t) => {
|
|
2777
|
-
const n = t.getAttribute("builder-id") || t.id;
|
|
2778
|
-
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2779
|
-
}), Ce = ({
|
|
2780
|
-
event: e,
|
|
2781
|
-
target: t
|
|
2782
|
-
}) => {
|
|
2783
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ke(i / n.width), r = ke(o / n.height);
|
|
2784
|
-
return {
|
|
2785
|
-
x: a,
|
|
2786
|
-
y: r
|
|
2787
|
-
};
|
|
2788
|
-
}, vn = (e) => {
|
|
2789
|
-
const t = e.target, n = t && Sn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2790
|
-
return {
|
|
2791
|
-
targetBuilderElement: i || void 0,
|
|
2792
|
-
metadata: {
|
|
2793
|
-
targetOffset: t ? Ce({
|
|
2794
|
-
event: e,
|
|
2795
|
-
target: t
|
|
2796
|
-
}) : void 0,
|
|
2797
|
-
builderTargetOffset: n ? Ce({
|
|
2798
|
-
event: e,
|
|
2799
|
-
target: n
|
|
2800
|
-
}) : void 0,
|
|
2801
|
-
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
2802
|
-
}
|
|
2803
|
-
};
|
|
2804
|
-
};
|
|
2805
|
-
function kn(e) {
|
|
2806
|
-
var L, h, T, D, W, H, fe;
|
|
2807
|
-
const t = ee(null), [n, i] = v(() => 0);
|
|
2808
|
-
v(() => !0);
|
|
2809
|
-
function o(g) {
|
|
2810
|
-
var S, w;
|
|
2811
|
-
const b = {
|
|
2812
|
-
...e.builderContextSignal.rootState,
|
|
2813
|
-
...g
|
|
2814
|
-
};
|
|
2815
|
-
e.builderContextSignal.rootSetState ? (w = (S = e.builderContextSignal).rootSetState) == null || w.call(S, b) : e.setBuilderContextSignal((R) => ({
|
|
2816
|
-
...R,
|
|
2817
|
-
rootState: b
|
|
2818
|
-
}));
|
|
2819
|
-
}
|
|
2820
|
-
function a(g) {
|
|
2821
|
-
var S, w, R, N, Y;
|
|
2822
|
-
const b = {
|
|
2823
|
-
...e.builderContextSignal.content,
|
|
2824
|
-
...g,
|
|
2825
|
-
data: {
|
|
2826
|
-
...(S = e.builderContextSignal.content) == null ? void 0 : S.data,
|
|
2827
|
-
...g == null ? void 0 : g.data
|
|
2828
|
-
},
|
|
2829
|
-
meta: {
|
|
2830
|
-
...(w = e.builderContextSignal.content) == null ? void 0 : w.meta,
|
|
2831
|
-
...g == null ? void 0 : g.meta,
|
|
2832
|
-
breakpoints: ((R = g == null ? void 0 : g.meta) == null ? void 0 : R.breakpoints) || ((Y = (N = e.builderContextSignal.content) == null ? void 0 : N.meta) == null ? void 0 : Y.breakpoints)
|
|
2833
|
-
}
|
|
2834
|
-
};
|
|
2835
|
-
e.setBuilderContextSignal((Me) => ({
|
|
2836
|
-
...Me,
|
|
2837
|
-
content: b
|
|
2838
|
-
}));
|
|
2839
|
-
}
|
|
2840
|
-
v(() => 0);
|
|
2841
|
-
const [r, s] = v(
|
|
2842
|
-
() => !1
|
|
2843
|
-
), [c, d] = v(
|
|
2844
|
-
() => e.contentWrapper || "div"
|
|
2845
|
-
);
|
|
2846
|
-
function u(g) {
|
|
2847
|
-
return Ue({
|
|
2848
|
-
model: e.model,
|
|
2849
|
-
trustedHosts: e.trustedHosts,
|
|
2850
|
-
callbacks: {
|
|
2851
|
-
configureSdk: (b) => {
|
|
2852
|
-
var R;
|
|
2853
|
-
const { breakpoints: S, contentId: w } = b;
|
|
2854
|
-
!w || w !== ((R = e.builderContextSignal.content) == null ? void 0 : R.id) || S && (a({
|
|
2855
|
-
meta: {
|
|
2856
|
-
breakpoints: S
|
|
2857
|
-
}
|
|
2858
|
-
}), i(n + 1));
|
|
2859
|
-
},
|
|
2860
|
-
animation: (b) => {
|
|
2861
|
-
Ve(b);
|
|
2862
|
-
},
|
|
2863
|
-
contentUpdate: (b) => {
|
|
2864
|
-
a(b), i(n + 1);
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
})(g);
|
|
2868
|
-
}
|
|
2869
|
-
function x() {
|
|
2870
|
-
var b, S;
|
|
2871
|
-
const g = (S = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : S.jsCode;
|
|
2872
|
-
g && q({
|
|
2873
|
-
code: g,
|
|
2874
|
-
context: e.context || {},
|
|
2875
|
-
localState: void 0,
|
|
2876
|
-
rootState: e.builderContextSignal.rootState,
|
|
2877
|
-
rootSetState: e.builderContextSignal.rootSetState
|
|
2878
|
-
});
|
|
2879
|
-
}
|
|
2880
|
-
const [C, f] = v(() => ({})), [y, p] = v(() => !1);
|
|
2881
|
-
function E(g) {
|
|
2882
|
-
var b, S;
|
|
2883
|
-
if (e.builderContextSignal.content) {
|
|
2884
|
-
const w = (b = e.builderContextSignal.content) == null ? void 0 : b.testVariationId, R = (S = e.builderContextSignal.content) == null ? void 0 : S.id;
|
|
2885
|
-
he({
|
|
2886
|
-
type: "click",
|
|
2887
|
-
canTrack: X(e.canTrack),
|
|
2888
|
-
contentId: R,
|
|
2889
|
-
apiKey: e.apiKey,
|
|
2890
|
-
variationId: w !== R ? w : void 0,
|
|
2891
|
-
...vn(g),
|
|
2892
|
-
unique: !y
|
|
2893
|
-
});
|
|
2894
|
-
}
|
|
2895
|
-
y || p(!0);
|
|
2896
|
-
}
|
|
2897
|
-
function A(g) {
|
|
2898
|
-
return g.replace(
|
|
2899
|
-
/{{([^}]+)}}/g,
|
|
2900
|
-
(b, S) => q({
|
|
2901
|
-
code: S,
|
|
2902
|
-
context: e.context || {},
|
|
2903
|
-
localState: void 0,
|
|
2904
|
-
rootState: e.builderContextSignal.rootState,
|
|
2905
|
-
rootSetState: e.builderContextSignal.rootSetState
|
|
2906
|
-
})
|
|
2907
|
-
);
|
|
2908
|
-
}
|
|
2909
|
-
function k({ url: g, key: b }) {
|
|
2910
|
-
qe(g).then((S) => S.json()).then((S) => {
|
|
2911
|
-
var R, N;
|
|
2912
|
-
const w = {
|
|
2913
|
-
...e.builderContextSignal.rootState,
|
|
2914
|
-
[b]: S
|
|
2915
|
-
};
|
|
2916
|
-
(N = (R = e.builderContextSignal).rootSetState) == null || N.call(R, w), C[b] = !0;
|
|
2917
|
-
}).catch((S) => {
|
|
2918
|
-
console.error("error fetching dynamic data", g, S);
|
|
2919
|
-
});
|
|
2920
|
-
}
|
|
2921
|
-
function I() {
|
|
2922
|
-
var b, S, w;
|
|
2923
|
-
const g = (w = (S = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : S.httpRequests) != null ? w : {};
|
|
2924
|
-
Object.entries(g).forEach(([R, N]) => {
|
|
2925
|
-
if (N && (!C[R] || M())) {
|
|
2926
|
-
const Y = A(N);
|
|
2927
|
-
k({
|
|
2928
|
-
url: Y,
|
|
2929
|
-
key: R
|
|
2930
|
-
});
|
|
2931
|
-
}
|
|
2932
|
-
});
|
|
2933
|
-
}
|
|
2934
|
-
function B() {
|
|
2935
|
-
M() && window.dispatchEvent(
|
|
2936
|
-
new CustomEvent(
|
|
2937
|
-
"builder:component:stateChange",
|
|
2938
|
-
{
|
|
2939
|
-
detail: {
|
|
2940
|
-
state: ae(e.builderContextSignal.rootState),
|
|
2941
|
-
ref: {
|
|
2942
|
-
name: e.model
|
|
2943
|
-
}
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
)
|
|
2947
|
-
);
|
|
2948
|
-
}
|
|
2949
|
-
function P(g) {
|
|
2950
|
-
i(n + 1), window.addEventListener("message", u), He(), _e({
|
|
2951
|
-
...e.locale ? {
|
|
2952
|
-
locale: e.locale
|
|
2953
|
-
} : {},
|
|
2954
|
-
...e.enrich ? {
|
|
2955
|
-
enrich: e.enrich
|
|
2956
|
-
} : {},
|
|
2957
|
-
...e.trustedHosts ? {
|
|
2958
|
-
trustedHosts: e.trustedHosts
|
|
2959
|
-
} : {}
|
|
2960
|
-
}), Object.values(
|
|
2961
|
-
e.builderContextSignal.componentInfos
|
|
2962
|
-
).forEach((b) => {
|
|
2963
|
-
var w;
|
|
2964
|
-
const S = Ke(b);
|
|
2965
|
-
(w = window.parent) == null || w.postMessage(S, "*");
|
|
2966
|
-
}), window.addEventListener(
|
|
2967
|
-
"builder:component:stateChangeListenerActivated",
|
|
2968
|
-
B
|
|
2969
|
-
);
|
|
2970
|
-
}
|
|
2971
|
-
function $(g) {
|
|
2972
|
-
const b = new URL(location.href).searchParams, S = b.get("builder.preview"), w = b.get(
|
|
2973
|
-
`builder.preview.${S}`
|
|
2974
|
-
), R = b.get("apiKey") || b.get("builder.space");
|
|
2975
|
-
S === e.model && R === e.apiKey && (!e.content || w === e.content.id) && Ie({
|
|
2976
|
-
model: e.model,
|
|
2977
|
-
apiKey: e.apiKey,
|
|
2978
|
-
apiVersion: e.builderContextSignal.apiVersion
|
|
2979
|
-
}).then((N) => {
|
|
2980
|
-
N && a(N);
|
|
2981
|
-
});
|
|
2982
|
-
}
|
|
2983
|
-
return V(() => {
|
|
2984
|
-
var g;
|
|
2985
|
-
return (g = t.current) == null || g.addEventListener(
|
|
2986
|
-
"initeditingbldr",
|
|
2987
|
-
P
|
|
2988
|
-
), () => {
|
|
2989
|
-
var b;
|
|
2990
|
-
return (b = t.current) == null ? void 0 : b.removeEventListener(
|
|
2991
|
-
"initeditingbldr",
|
|
2992
|
-
P
|
|
2993
|
-
);
|
|
2994
|
-
};
|
|
2995
|
-
}, []), V(() => {
|
|
2996
|
-
var g;
|
|
2997
|
-
return (g = t.current) == null || g.addEventListener(
|
|
2998
|
-
"initpreviewingbldr",
|
|
2999
|
-
$
|
|
3000
|
-
), () => {
|
|
3001
|
-
var b;
|
|
3002
|
-
return (b = t.current) == null ? void 0 : b.removeEventListener(
|
|
3003
|
-
"initpreviewingbldr",
|
|
3004
|
-
$
|
|
3005
|
-
);
|
|
3006
|
-
};
|
|
3007
|
-
}, []), V(() => {
|
|
3008
|
-
var g, b;
|
|
3009
|
-
if (U()) {
|
|
3010
|
-
if (M() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && X(e.canTrack)) {
|
|
3011
|
-
const w = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId, R = (b = e.builderContextSignal.content) == null ? void 0 : b.id, N = e.apiKey;
|
|
3012
|
-
he({
|
|
3013
|
-
type: "impression",
|
|
3014
|
-
canTrack: !0,
|
|
3015
|
-
contentId: R,
|
|
3016
|
-
apiKey: N,
|
|
3017
|
-
variationId: w !== R ? w : void 0
|
|
3018
|
-
});
|
|
3019
|
-
}
|
|
3020
|
-
je() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
|
|
3021
|
-
}
|
|
3022
|
-
}, []), V(() => {
|
|
3023
|
-
e.apiKey || _.error(
|
|
3024
|
-
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3025
|
-
), x(), I(), B();
|
|
3026
|
-
}, []), V(() => {
|
|
3027
|
-
e.content && a(e.content);
|
|
3028
|
-
}, [e.content]), V(() => {
|
|
3029
|
-
}, [r]), V(() => {
|
|
3030
|
-
x();
|
|
3031
|
-
}, [(h = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : h.jsCode]), V(() => {
|
|
3032
|
-
I();
|
|
3033
|
-
}, [(D = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : D.httpRequests]), V(() => {
|
|
3034
|
-
B();
|
|
3035
|
-
}, [e.builderContextSignal.rootState]), V(() => {
|
|
3036
|
-
e.data && o(e.data);
|
|
3037
|
-
}, [e.data]), V(() => {
|
|
3038
|
-
e.locale && o({
|
|
3039
|
-
locale: e.locale
|
|
3040
|
-
});
|
|
3041
|
-
}, [e.locale]), V(() => () => {
|
|
3042
|
-
U() && (window.removeEventListener("message", u), window.removeEventListener(
|
|
3043
|
-
"builder:component:stateChangeListenerActivated",
|
|
3044
|
-
B
|
|
3045
|
-
));
|
|
3046
|
-
}, []), /* @__PURE__ */ l(se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ re(
|
|
3047
|
-
c,
|
|
3048
|
-
{
|
|
3049
|
-
key: n,
|
|
3050
|
-
ref: t,
|
|
3051
|
-
onClick: (g) => E(g),
|
|
3052
|
-
"builder-content-id": (W = e.builderContextSignal.content) == null ? void 0 : W.id,
|
|
3053
|
-
"builder-model": e.model,
|
|
3054
|
-
...e.showContent ? {} : {
|
|
3055
|
-
hidden: !0,
|
|
3056
|
-
"aria-hidden": !0
|
|
3057
|
-
},
|
|
3058
|
-
...e.contentWrapperProps,
|
|
3059
|
-
className: `variant-${((H = e.content) == null ? void 0 : H.testVariationId) || ((fe = e.content) == null ? void 0 : fe.id)}`
|
|
3060
|
-
},
|
|
3061
|
-
e.children
|
|
3062
|
-
) }) : null });
|
|
3063
|
-
}
|
|
3064
|
-
const Cn = (e) => {
|
|
3065
|
-
var a, r;
|
|
3066
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
|
|
3067
|
-
let o = "";
|
|
3068
|
-
if (i && t && n && (o += `
|
|
3069
|
-
@font-face {
|
|
3070
|
-
font-family: "${t}";
|
|
3071
|
-
src: local("${n}"), url('${i}') format('woff2');
|
|
3072
|
-
font-display: fallback;
|
|
3073
|
-
font-weight: 400;
|
|
3074
|
-
}
|
|
3075
|
-
`.trim()), e.files)
|
|
3076
|
-
for (const s in e.files) {
|
|
3077
|
-
if (!(String(Number(s)) === s))
|
|
3078
|
-
continue;
|
|
3079
|
-
const d = e.files[s];
|
|
3080
|
-
d && d !== i && (o += `
|
|
3081
|
-
@font-face {
|
|
3082
|
-
font-family: "${t}";
|
|
3083
|
-
src: url('${d}') format('woff2');
|
|
3084
|
-
font-display: fallback;
|
|
3085
|
-
font-weight: ${s};
|
|
3086
|
-
}
|
|
3087
|
-
`.trim());
|
|
3088
|
-
}
|
|
3089
|
-
return o;
|
|
3090
|
-
}, wn = ({
|
|
3091
|
-
customFonts: e
|
|
3092
|
-
}) => {
|
|
3093
|
-
var t;
|
|
3094
|
-
return ((t = e == null ? void 0 : e.map((n) => Cn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3095
|
-
}, In = ({
|
|
3096
|
-
cssCode: e,
|
|
3097
|
-
contentId: t
|
|
3098
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
3099
|
-
function Tn(e) {
|
|
3100
|
-
const [t, n] = v(
|
|
3101
|
-
() => `
|
|
3102
|
-
${In({
|
|
3103
|
-
cssCode: e.cssCode,
|
|
3104
|
-
contentId: e.contentId
|
|
3105
|
-
})}
|
|
3106
|
-
${wn({
|
|
3107
|
-
customFonts: e.customFonts
|
|
3108
|
-
})}
|
|
3109
|
-
|
|
3110
|
-
.builder-button {
|
|
3111
|
-
all: unset;
|
|
3112
|
-
}
|
|
3113
|
-
|
|
3114
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
3115
|
-
margin: 0;
|
|
3116
|
-
}
|
|
3117
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
3118
|
-
color: inherit;
|
|
3119
|
-
line-height: inherit;
|
|
3120
|
-
letter-spacing: inherit;
|
|
3121
|
-
font-weight: inherit;
|
|
3122
|
-
font-size: inherit;
|
|
3123
|
-
text-align: inherit;
|
|
3124
|
-
font-family: inherit;
|
|
3125
|
-
}
|
|
3126
|
-
`.trim()
|
|
3127
|
-
);
|
|
3128
|
-
return /* @__PURE__ */ l(te, { styles: t });
|
|
3129
|
-
}
|
|
3130
|
-
const En = ({
|
|
3131
|
-
content: e,
|
|
3132
|
-
data: t,
|
|
3133
|
-
locale: n
|
|
3134
|
-
}) => {
|
|
3135
|
-
var a, r, s;
|
|
3136
|
-
const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
|
|
3137
|
-
return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((c) => {
|
|
3138
|
-
c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
|
|
3139
|
-
}), {
|
|
3140
|
-
...i,
|
|
3141
|
-
...o,
|
|
3142
|
-
...t,
|
|
3143
|
-
...n ? {
|
|
3144
|
-
locale: n
|
|
3145
|
-
} : {}
|
|
3146
|
-
};
|
|
3147
|
-
}, Rn = ({
|
|
3148
|
-
content: e,
|
|
3149
|
-
data: t
|
|
3150
|
-
}) => e ? {
|
|
3151
|
-
...e,
|
|
3152
|
-
data: {
|
|
3153
|
-
...e == null ? void 0 : e.data,
|
|
3154
|
-
...t
|
|
3155
|
-
},
|
|
3156
|
-
meta: e == null ? void 0 : e.meta
|
|
3157
|
-
} : void 0;
|
|
3158
|
-
function we(e) {
|
|
3159
|
-
var c, d, u, x, C, f, y;
|
|
3160
|
-
const [t, n] = v(
|
|
3161
|
-
() => {
|
|
3162
|
-
var p, E;
|
|
3163
|
-
return pn({
|
|
3164
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3165
|
-
variationId: (p = e.content) == null ? void 0 : p.testVariationId,
|
|
3166
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3167
|
-
contentId: (E = e.content) == null ? void 0 : E.id
|
|
3168
|
-
});
|
|
3169
|
-
}
|
|
3170
|
-
);
|
|
3171
|
-
function i(p) {
|
|
3172
|
-
s((E) => ({
|
|
3173
|
-
...E,
|
|
3174
|
-
rootState: p
|
|
3175
|
-
}));
|
|
3176
|
-
}
|
|
3177
|
-
const [o, a] = v(
|
|
3178
|
-
() => [
|
|
3179
|
-
...ve(),
|
|
3180
|
-
...e.customComponents || []
|
|
3181
|
-
].reduce(
|
|
3182
|
-
(p, { component: E, ...A }) => ({
|
|
3183
|
-
...p,
|
|
3184
|
-
[A.name]: {
|
|
3185
|
-
component: E,
|
|
3186
|
-
...ge(A)
|
|
3187
|
-
}
|
|
3188
|
-
}),
|
|
3189
|
-
{}
|
|
3190
|
-
)
|
|
3191
|
-
), [r, s] = v(() => ({
|
|
3192
|
-
content: Rn({
|
|
3193
|
-
content: e.content,
|
|
3194
|
-
data: e.data
|
|
3195
|
-
}),
|
|
3196
|
-
localState: void 0,
|
|
3197
|
-
rootState: En({
|
|
3198
|
-
content: e.content,
|
|
3199
|
-
data: e.data,
|
|
3200
|
-
locale: e.locale
|
|
3201
|
-
}),
|
|
3202
|
-
rootSetState: i,
|
|
3203
|
-
context: e.context || {},
|
|
3204
|
-
apiKey: e.apiKey,
|
|
3205
|
-
apiVersion: e.apiVersion,
|
|
3206
|
-
componentInfos: [
|
|
3207
|
-
...ve(),
|
|
3208
|
-
...e.customComponents || []
|
|
3209
|
-
].reduce(
|
|
3210
|
-
(p, { component: E, ...A }) => ({
|
|
3211
|
-
...p,
|
|
3212
|
-
[A.name]: ge(A)
|
|
3213
|
-
}),
|
|
3214
|
-
{}
|
|
3215
|
-
),
|
|
3216
|
-
inheritedStyles: {},
|
|
3217
|
-
BlocksWrapper: e.blocksWrapper || "div",
|
|
3218
|
-
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
3219
|
-
}));
|
|
3220
|
-
return /* @__PURE__ */ l(
|
|
3221
|
-
Ee.Provider,
|
|
3222
|
-
{
|
|
3223
|
-
value: {
|
|
3224
|
-
registeredComponents: o
|
|
3225
|
-
},
|
|
3226
|
-
children: /* @__PURE__ */ F(
|
|
3227
|
-
kn,
|
|
3228
|
-
{
|
|
3229
|
-
content: e.content,
|
|
3230
|
-
data: e.data,
|
|
3231
|
-
model: e.model,
|
|
3232
|
-
context: e.context,
|
|
3233
|
-
apiKey: e.apiKey,
|
|
3234
|
-
canTrack: e.canTrack,
|
|
3235
|
-
locale: e.locale,
|
|
3236
|
-
enrich: e.enrich,
|
|
3237
|
-
showContent: e.showContent,
|
|
3238
|
-
builderContextSignal: r,
|
|
3239
|
-
contentWrapper: e.contentWrapper,
|
|
3240
|
-
contentWrapperProps: e.contentWrapperProps,
|
|
3241
|
-
linkComponent: e.linkComponent,
|
|
3242
|
-
trustedHosts: e.trustedHosts,
|
|
3243
|
-
setBuilderContextSignal: s,
|
|
3244
|
-
children: [
|
|
3245
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(oe, { scriptStr: t }) }) : null,
|
|
3246
|
-
/* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(
|
|
3247
|
-
Tn,
|
|
3248
|
-
{
|
|
3249
|
-
contentId: (c = r.content) == null ? void 0 : c.id,
|
|
3250
|
-
cssCode: (u = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
|
|
3251
|
-
customFonts: (C = (x = r.content) == null ? void 0 : x.data) == null ? void 0 : C.customFonts
|
|
3252
|
-
}
|
|
3253
|
-
) }),
|
|
3254
|
-
/* @__PURE__ */ l(
|
|
3255
|
-
j,
|
|
3256
|
-
{
|
|
3257
|
-
blocks: (y = (f = r.content) == null ? void 0 : f.data) == null ? void 0 : y.blocks,
|
|
3258
|
-
context: r,
|
|
3259
|
-
registeredComponents: o,
|
|
3260
|
-
linkComponent: e.linkComponent
|
|
3261
|
-
}
|
|
3262
|
-
)
|
|
3263
|
-
]
|
|
3264
|
-
}
|
|
3265
|
-
)
|
|
3266
|
-
}
|
|
3267
|
-
);
|
|
3268
|
-
}
|
|
3269
|
-
function Pn(e) {
|
|
3270
|
-
var r, s;
|
|
3271
|
-
const [t, n] = v(
|
|
3272
|
-
() => hn({
|
|
3273
|
-
canTrack: X(e.canTrack),
|
|
3274
|
-
content: e.content
|
|
3275
|
-
})
|
|
3276
|
-
);
|
|
3277
|
-
function i() {
|
|
3278
|
-
var c;
|
|
3279
|
-
return yn(
|
|
3280
|
-
G(e.content).map((d) => ({
|
|
3281
|
-
id: d.testVariationId,
|
|
3282
|
-
testRatio: d.testRatio
|
|
3283
|
-
})),
|
|
3284
|
-
((c = e.content) == null ? void 0 : c.id) || ""
|
|
3285
|
-
);
|
|
3286
|
-
}
|
|
3287
|
-
function o() {
|
|
3288
|
-
return G(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
3289
|
-
}
|
|
3290
|
-
function a() {
|
|
3291
|
-
var c;
|
|
3292
|
-
return t ? {
|
|
3293
|
-
...e.content,
|
|
3294
|
-
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
3295
|
-
} : ze({
|
|
3296
|
-
item: e.content,
|
|
3297
|
-
canTrack: X(e.canTrack)
|
|
3298
|
-
});
|
|
3299
|
-
}
|
|
3300
|
-
return V(() => {
|
|
3301
|
-
}, []), /* @__PURE__ */ F(m, { children: [
|
|
3302
|
-
!e.__isNestedRender && z !== "reactNative" ? /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(oe, { scriptStr: bn() }) }) : null,
|
|
3303
|
-
t ? /* @__PURE__ */ F(m, { children: [
|
|
3304
|
-
/* @__PURE__ */ l(
|
|
3305
|
-
te,
|
|
3306
|
-
{
|
|
3307
|
-
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
3308
|
-
styles: o()
|
|
3309
|
-
}
|
|
3310
|
-
),
|
|
3311
|
-
/* @__PURE__ */ l(oe, { scriptStr: i() }),
|
|
3312
|
-
(s = G(e.content)) == null ? void 0 : s.map((c) => /* @__PURE__ */ l(
|
|
3313
|
-
we,
|
|
3314
|
-
{
|
|
3315
|
-
content: c,
|
|
3316
|
-
showContent: !1,
|
|
3317
|
-
model: e.model,
|
|
3318
|
-
data: e.data,
|
|
3319
|
-
context: e.context,
|
|
3320
|
-
apiKey: e.apiKey,
|
|
3321
|
-
apiVersion: e.apiVersion,
|
|
3322
|
-
customComponents: e.customComponents,
|
|
3323
|
-
linkComponent: e.linkComponent,
|
|
3324
|
-
canTrack: e.canTrack,
|
|
3325
|
-
locale: e.locale,
|
|
3326
|
-
enrich: e.enrich,
|
|
3327
|
-
isSsrAbTest: t,
|
|
3328
|
-
blocksWrapper: e.blocksWrapper,
|
|
3329
|
-
blocksWrapperProps: e.blocksWrapperProps,
|
|
3330
|
-
contentWrapper: e.contentWrapper,
|
|
3331
|
-
contentWrapperProps: e.contentWrapperProps,
|
|
3332
|
-
trustedHosts: e.trustedHosts
|
|
3333
|
-
},
|
|
3334
|
-
c.testVariationId
|
|
3335
|
-
))
|
|
3336
|
-
] }) : null,
|
|
3337
|
-
/* @__PURE__ */ l(
|
|
3338
|
-
we,
|
|
3339
|
-
{
|
|
3340
|
-
content: a(),
|
|
3341
|
-
showContent: !0,
|
|
3342
|
-
model: e.model,
|
|
3343
|
-
data: e.data,
|
|
3344
|
-
context: e.context,
|
|
3345
|
-
apiKey: e.apiKey,
|
|
3346
|
-
apiVersion: e.apiVersion,
|
|
3347
|
-
customComponents: e.customComponents,
|
|
3348
|
-
linkComponent: e.linkComponent,
|
|
3349
|
-
canTrack: e.canTrack,
|
|
3350
|
-
locale: e.locale,
|
|
3351
|
-
enrich: e.enrich,
|
|
3352
|
-
isSsrAbTest: t,
|
|
3353
|
-
blocksWrapper: e.blocksWrapper,
|
|
3354
|
-
blocksWrapperProps: e.blocksWrapperProps,
|
|
3355
|
-
contentWrapper: e.contentWrapper,
|
|
3356
|
-
contentWrapperProps: e.contentWrapperProps,
|
|
3357
|
-
trustedHosts: e.trustedHosts
|
|
3358
|
-
}
|
|
3359
|
-
)
|
|
3360
|
-
] });
|
|
3361
|
-
}
|
|
3362
|
-
const Vn = async ({
|
|
3363
|
-
builderContextValue: e,
|
|
3364
|
-
symbol: t
|
|
3365
|
-
}) => {
|
|
3366
|
-
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
3367
|
-
(e != null && e.apiKey))
|
|
3368
|
-
return Ie({
|
|
3369
|
-
model: t.model,
|
|
3370
|
-
apiKey: e.apiKey,
|
|
3371
|
-
apiVersion: e.apiVersion,
|
|
3372
|
-
...(t == null ? void 0 : t.entry) && {
|
|
3373
|
-
query: {
|
|
3374
|
-
id: t.entry
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
}).catch((n) => {
|
|
3378
|
-
_.error("Could not fetch symbol content: ", n);
|
|
3379
|
-
});
|
|
3380
|
-
};
|
|
3381
|
-
function Bn(e) {
|
|
3382
|
-
var a, r, s, c;
|
|
3383
|
-
function t() {
|
|
3384
|
-
var d, u;
|
|
3385
|
-
return [
|
|
3386
|
-
e.attributes[K()],
|
|
3387
|
-
"builder-symbol",
|
|
3388
|
-
(d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
|
|
3389
|
-
(u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
3390
|
-
].filter(Boolean).join(" ");
|
|
3391
|
-
}
|
|
3392
|
-
const [n, i] = v(() => {
|
|
3393
|
-
var d;
|
|
3394
|
-
return (d = e.symbol) == null ? void 0 : d.content;
|
|
3395
|
-
});
|
|
3396
|
-
function o() {
|
|
3397
|
-
n || Vn({
|
|
3398
|
-
symbol: e.symbol,
|
|
3399
|
-
builderContextValue: e.builderContext
|
|
3400
|
-
}).then((d) => {
|
|
3401
|
-
d && i(d);
|
|
3402
|
-
});
|
|
3403
|
-
}
|
|
3404
|
-
return V(() => {
|
|
3405
|
-
}, []), V(() => {
|
|
3406
|
-
o();
|
|
3407
|
-
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
3408
|
-
Pn,
|
|
3409
|
-
{
|
|
3410
|
-
__isNestedRender: !0,
|
|
3411
|
-
apiVersion: e.builderContext.apiVersion,
|
|
3412
|
-
apiKey: e.builderContext.apiKey,
|
|
3413
|
-
context: {
|
|
3414
|
-
...e.builderContext.context,
|
|
3415
|
-
symbolId: (a = e.builderBlock) == null ? void 0 : a.id
|
|
3416
|
-
},
|
|
3417
|
-
customComponents: Object.values(e.builderComponents),
|
|
3418
|
-
data: {
|
|
3419
|
-
...(r = e.symbol) == null ? void 0 : r.data,
|
|
3420
|
-
...e.builderContext.localState,
|
|
3421
|
-
...(s = n == null ? void 0 : n.data) == null ? void 0 : s.state
|
|
3422
|
-
},
|
|
3423
|
-
model: (c = e.symbol) == null ? void 0 : c.model,
|
|
3424
|
-
content: n,
|
|
3425
|
-
linkComponent: e.builderLinkComponent
|
|
3426
|
-
}
|
|
3427
|
-
) });
|
|
3428
|
-
}
|
|
2
|
+
import { Blocks as a, Button as i, Columns as o, Content as n, Fragment as c, Image as g, Section as m, Symbol as d, Text as l, Video as p } from "./blocks-exports.mjs";
|
|
3
|
+
import { _ as f, c as E, f as b, d as h, e as B, g as C, i as S, a as x, r as P, s as k, b as y, t as R } from "./server-entry-7839c812.js";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
3429
6
|
export {
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
7
|
+
a as Blocks,
|
|
8
|
+
i as Button,
|
|
9
|
+
o as Columns,
|
|
10
|
+
n as Content,
|
|
11
|
+
c as Fragment,
|
|
12
|
+
g as Image,
|
|
13
|
+
m as Section,
|
|
14
|
+
d as Symbol,
|
|
15
|
+
l as Text,
|
|
16
|
+
p as Video,
|
|
17
|
+
f as _processContentResult,
|
|
18
|
+
E as createRegisterComponentMessage,
|
|
19
|
+
b as fetchBuilderProps,
|
|
20
|
+
h as fetchEntries,
|
|
21
|
+
B as fetchOneEntry,
|
|
22
|
+
C as getBuilderSearchParams,
|
|
23
|
+
S as isEditing,
|
|
24
|
+
x as isPreviewing,
|
|
25
|
+
P as register,
|
|
26
|
+
k as setEditorSettings,
|
|
27
|
+
y as subscribeToEditor,
|
|
28
|
+
R as track
|
|
3452
29
|
};
|