@builder.io/sdk-react 2.0.12 → 2.0.14
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/lib/browser/blocks-exports.cjs +20 -20
- package/lib/browser/blocks-exports.mjs +445 -434
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/{node/server-entry-dc66de59.js → browser/server-entry-13acc156.js} +1 -1
- package/lib/browser/{server-entry-acf08871.cjs → server-entry-d6f4f920.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-37ff8319.js → accordion-1d87140d.js} +1 -1
- package/lib/edge/{accordion-b3b8c262.cjs → accordion-87e3ac98.cjs} +1 -1
- package/lib/edge/{blocks-e0e60319.js → blocks-40966fa4.js} +220 -211
- package/lib/edge/blocks-91726dda.cjs +12 -0
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-15992755.js → button-45918a0a.js} +2 -2
- package/lib/edge/{button-875ac10b.cjs → button-79b579a5.cjs} +1 -1
- package/lib/edge/{columns-cfe663b2.js → columns-b55666de.js} +4 -4
- package/lib/edge/{columns-11ead988.cjs → columns-bee45776.cjs} +1 -1
- package/lib/edge/{content-variants-e780597b.js → content-variants-56933eef.js} +13 -12
- package/lib/edge/{content-variants-f8ef104d.cjs → content-variants-c19f46ab.cjs} +1 -1
- package/lib/edge/{evaluate-6408d64d.js → evaluate-2b7026be.js} +1 -1
- package/lib/edge/{evaluate-938a955e.cjs → evaluate-41623a71.cjs} +1 -1
- package/lib/edge/{form-75a774bc.cjs → form-2724acae.cjs} +1 -1
- package/lib/edge/{form-7735178f.js → form-7e2f833c.js} +4 -4
- package/lib/edge/{get-class-prop-name-d005a2bb.js → get-class-prop-name-8c963ff3.js} +1 -1
- package/lib/edge/{get-class-prop-name-e596650d.cjs → get-class-prop-name-b1c9455b.cjs} +1 -1
- package/lib/edge/{img-045bb860.js → img-d0f2941c.js} +1 -1
- package/lib/edge/{img-dd79e34b.cjs → img-f5173c7a.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-adf80016.js → input-71715eac.js} +1 -1
- package/lib/edge/{input-3bd0ac03.cjs → input-d76e00ea.cjs} +1 -1
- package/lib/edge/{select-90b076db.js → select-09cb37c7.js} +1 -1
- package/lib/edge/{select-882193d4.cjs → select-8c281d1f.cjs} +1 -1
- package/lib/edge/{server-entry-d5ae6221.cjs → server-entry-65199b3b.cjs} +1 -1
- package/lib/edge/{server-entry-84c3cdd6.js → server-entry-7556ee3d.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-293114eb.js → slot-4350be16.js} +12 -11
- package/lib/edge/slot-cae739f4.cjs +1 -0
- package/lib/edge/{symbol-aed9cd2b.js → symbol-061ca26c.js} +2 -2
- package/lib/edge/{symbol-3e0799b8.cjs → symbol-96f073c1.cjs} +1 -1
- package/lib/edge/{tabs-0cf37bf4.js → tabs-081f284d.js} +4 -4
- package/lib/edge/{tabs-f5c4f350.cjs → tabs-4806b2ae.cjs} +1 -1
- package/lib/edge/{text-abb84188.cjs → text-3b4c1f89.cjs} +1 -1
- package/lib/edge/{text-9e2166c7.js → text-b277727f.js} +2 -2
- package/lib/node/blocks-exports.cjs +20 -20
- package/lib/node/blocks-exports.mjs +442 -431
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-49e4c6cb.js → node-runtime-1e74e14c.js} +1 -1
- package/lib/node/{node-runtime-11912803.cjs → node-runtime-9c4150c6.cjs} +1 -1
- package/lib/{browser/server-entry-dc66de59.js → node/server-entry-13acc156.js} +1 -1
- package/lib/node/{server-entry-acf08871.cjs → server-entry-d6f4f920.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +3 -2
- package/types/blocks/slot/slot.d.ts +2 -2
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/blocks-793430a0.cjs +0 -12
- package/lib/edge/slot-42b9b358.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var ne = (e, t, n) => (
|
|
5
|
-
import { jsx as l, Fragment as
|
|
6
|
-
import { TARGET as U, checkIsDefined as G, logger as Z, isBrowser as Q, isPreviewing as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { getFunctionArguments as
|
|
9
|
-
const
|
|
2
|
+
var qe = Object.defineProperty;
|
|
3
|
+
var _e = (e, t, n) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
|
+
var ne = (e, t, n) => (_e(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
|
+
import { jsx as l, Fragment as E, jsxs as V } from "react/jsx-runtime";
|
|
6
|
+
import { TARGET as U, checkIsDefined as G, logger as Z, isBrowser as Q, isPreviewing as we, isEditing as $, registerInsertMenu as ze, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as X, _track as he, fetchOneEntry as Re, createEditorListener as Ge, fetch as Qe, serializeIncludingFunctions as ge, handleABTestingSync as Xe } from "./server-entry-13acc156.js";
|
|
7
|
+
import { createContext as Ee, useState as T, useEffect as B, useRef as _, useContext as be, createElement as Pe } from "react";
|
|
8
|
+
import { getFunctionArguments as Ze, runInNode as et, parseCode as tt, getBuilderGlobals as nt, set as Be, fastClone as de } from "./node-runtime-1e74e14c.js";
|
|
9
|
+
const it = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ot = (e) => typeof e == "string" && it.has(e.toLowerCase());
|
|
10
10
|
function ue(e) {
|
|
11
|
-
return /* @__PURE__ */ l(
|
|
11
|
+
return /* @__PURE__ */ l(E, { children: ot(e.TagName) ? /* @__PURE__ */ l(E, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(E, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
12
12
|
}
|
|
13
13
|
const q = () => {
|
|
14
14
|
switch (U) {
|
|
@@ -24,7 +24,7 @@ const q = () => {
|
|
|
24
24
|
return "class";
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function at(e) {
|
|
28
28
|
function t() {
|
|
29
29
|
return {
|
|
30
30
|
...e.attributes,
|
|
@@ -48,7 +48,7 @@ function ot(e) {
|
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
const me =
|
|
51
|
+
const me = Ee({
|
|
52
52
|
content: null,
|
|
53
53
|
context: {},
|
|
54
54
|
localState: void 0,
|
|
@@ -62,21 +62,21 @@ const me = Re({
|
|
|
62
62
|
BlocksWrapper: "div",
|
|
63
63
|
BlocksWrapperProps: {},
|
|
64
64
|
nonce: ""
|
|
65
|
-
}),
|
|
66
|
-
function
|
|
65
|
+
}), Ve = Ee({ registeredComponents: {} });
|
|
66
|
+
function rt(e) {
|
|
67
67
|
var t;
|
|
68
68
|
return {
|
|
69
69
|
...(t = e.component) == null ? void 0 : t.options,
|
|
70
70
|
...e.options
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function lt(e, ...t) {
|
|
74
74
|
const n = Object.assign({}, e);
|
|
75
75
|
for (const i of t)
|
|
76
76
|
delete n[i];
|
|
77
77
|
return n;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const st = ({
|
|
80
80
|
code: e,
|
|
81
81
|
builder: t,
|
|
82
82
|
context: n,
|
|
@@ -85,11 +85,11 @@ const lt = ({
|
|
|
85
85
|
rootSetState: a,
|
|
86
86
|
rootState: r
|
|
87
87
|
}) => {
|
|
88
|
-
const s =
|
|
88
|
+
const s = Ze({
|
|
89
89
|
builder: t,
|
|
90
90
|
context: n,
|
|
91
91
|
event: i,
|
|
92
|
-
state:
|
|
92
|
+
state: Ae({
|
|
93
93
|
rootState: r,
|
|
94
94
|
localState: o,
|
|
95
95
|
rootSetState: a
|
|
@@ -97,7 +97,7 @@ const lt = ({
|
|
|
97
97
|
});
|
|
98
98
|
return new Function(...s.map(([d]) => d), e)(...s.map(([, d]) => d));
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function Ae({
|
|
101
101
|
rootState: e,
|
|
102
102
|
localState: t,
|
|
103
103
|
rootSetState: n
|
|
@@ -107,7 +107,7 @@ function Ve({
|
|
|
107
107
|
if (t && o in t)
|
|
108
108
|
return t[o];
|
|
109
109
|
const a = i[o];
|
|
110
|
-
return typeof a == "object" && a !== null ?
|
|
110
|
+
return typeof a == "object" && a !== null ? Ae({
|
|
111
111
|
rootState: a,
|
|
112
112
|
localState: void 0,
|
|
113
113
|
rootSetState: n ? (r) => {
|
|
@@ -122,17 +122,17 @@ function Ve({
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ct() {
|
|
126
126
|
var e;
|
|
127
127
|
return typeof process != "undefined" && G((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
128
128
|
}
|
|
129
|
-
const
|
|
129
|
+
const dt = () => {
|
|
130
130
|
var i;
|
|
131
|
-
if (!
|
|
131
|
+
if (!ct())
|
|
132
132
|
return !1;
|
|
133
133
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
|
|
134
134
|
return e && t && !n ? (Z.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;
|
|
135
|
-
},
|
|
135
|
+
}, ut = (e) => Q() || dt() ? st(e) : et(e), mt = !0, L = class L {
|
|
136
136
|
static getCacheKey(t) {
|
|
137
137
|
return JSON.stringify({
|
|
138
138
|
...t,
|
|
@@ -165,26 +165,26 @@ function H({
|
|
|
165
165
|
if (e === "")
|
|
166
166
|
return;
|
|
167
167
|
const d = {
|
|
168
|
-
code:
|
|
168
|
+
code: tt(e, {
|
|
169
169
|
isExpression: r
|
|
170
170
|
}),
|
|
171
|
-
builder:
|
|
171
|
+
builder: nt(),
|
|
172
172
|
context: t,
|
|
173
173
|
event: a,
|
|
174
174
|
rootSetState: o,
|
|
175
175
|
rootState: i,
|
|
176
176
|
localState: n
|
|
177
177
|
};
|
|
178
|
-
if (s && !
|
|
179
|
-
const c = M.getCacheKey(d),
|
|
180
|
-
if (
|
|
181
|
-
return
|
|
178
|
+
if (s && !mt) {
|
|
179
|
+
const c = M.getCacheKey(d), u = M.getCachedValue(c);
|
|
180
|
+
if (u)
|
|
181
|
+
return u.value;
|
|
182
182
|
}
|
|
183
183
|
try {
|
|
184
|
-
const c =
|
|
184
|
+
const c = ut(d);
|
|
185
185
|
if (s) {
|
|
186
|
-
const
|
|
187
|
-
M.setCachedValue(
|
|
186
|
+
const u = M.getCacheKey(d);
|
|
187
|
+
M.setCachedValue(u, c);
|
|
188
188
|
}
|
|
189
189
|
return c;
|
|
190
190
|
} catch (c) {
|
|
@@ -206,8 +206,8 @@ function se(e) {
|
|
|
206
206
|
n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = se(e[n]));
|
|
207
207
|
return t;
|
|
208
208
|
}
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
209
|
+
const ft = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ht = (e) => {
|
|
210
|
+
if (ft) {
|
|
211
211
|
const t = de(e);
|
|
212
212
|
return {
|
|
213
213
|
...t,
|
|
@@ -219,7 +219,7 @@ const mt = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ft = (e) =
|
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
} else {
|
|
222
|
-
const t = se(
|
|
222
|
+
const t = se(lt(e, "children", "meta"));
|
|
223
223
|
return {
|
|
224
224
|
...t,
|
|
225
225
|
properties: {
|
|
@@ -232,7 +232,7 @@ const mt = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ft = (e) =
|
|
|
232
232
|
meta: e.meta
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, gt = ({
|
|
236
236
|
block: e,
|
|
237
237
|
context: t,
|
|
238
238
|
localState: n,
|
|
@@ -241,7 +241,7 @@ const mt = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ft = (e) =
|
|
|
241
241
|
}) => {
|
|
242
242
|
if (!e.bindings)
|
|
243
243
|
return e;
|
|
244
|
-
const a =
|
|
244
|
+
const a = ht(e);
|
|
245
245
|
for (const r in e.bindings) {
|
|
246
246
|
const s = e.bindings[r], d = H({
|
|
247
247
|
code: s,
|
|
@@ -251,11 +251,11 @@ const mt = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ft = (e) =
|
|
|
251
251
|
context: t,
|
|
252
252
|
enableCache: !0
|
|
253
253
|
});
|
|
254
|
-
|
|
254
|
+
Be(a, r, d);
|
|
255
255
|
}
|
|
256
256
|
return a;
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function bt({
|
|
259
259
|
block: e,
|
|
260
260
|
context: t,
|
|
261
261
|
shouldEvaluateBindings: n,
|
|
@@ -264,7 +264,7 @@ function gt({
|
|
|
264
264
|
rootSetState: a
|
|
265
265
|
}) {
|
|
266
266
|
const r = e;
|
|
267
|
-
return n ?
|
|
267
|
+
return n ? gt({
|
|
268
268
|
block: r,
|
|
269
269
|
localState: i,
|
|
270
270
|
rootState: o,
|
|
@@ -273,7 +273,7 @@ function gt({
|
|
|
273
273
|
}) : r;
|
|
274
274
|
}
|
|
275
275
|
const ee = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
276
|
-
function
|
|
276
|
+
function pt(e, t, n = {}) {
|
|
277
277
|
let i, o, a, r = null, s = 0;
|
|
278
278
|
const d = function() {
|
|
279
279
|
s = n.leading === !1 ? 0 : Date.now(), r = null, a = e.apply(i, o), r || (i = o = null);
|
|
@@ -281,8 +281,8 @@ function bt(e, t, n = {}) {
|
|
|
281
281
|
return function() {
|
|
282
282
|
const c = Date.now();
|
|
283
283
|
!s && n.leading === !1 && (s = c);
|
|
284
|
-
const
|
|
285
|
-
return i = this, o = arguments,
|
|
284
|
+
const u = t - (c - s);
|
|
285
|
+
return i = this, o = arguments, u <= 0 || u > t ? (r && (clearTimeout(r), r = null), s = c, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(d, u)), a;
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
288
|
function K(e, ...t) {
|
|
@@ -295,55 +295,55 @@ function K(e, ...t) {
|
|
|
295
295
|
}
|
|
296
296
|
return n;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function yt(e) {
|
|
299
299
|
for (const t of e)
|
|
300
300
|
switch (t.trigger) {
|
|
301
301
|
case "pageLoad":
|
|
302
|
-
|
|
302
|
+
Fe(t);
|
|
303
303
|
break;
|
|
304
304
|
case "scrollInView":
|
|
305
|
-
|
|
305
|
+
vt(t);
|
|
306
306
|
break;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Ne(e) {
|
|
310
310
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
const n =
|
|
312
|
+
function We(e, t) {
|
|
313
|
+
const n = xt(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
|
|
314
314
|
for (const s of r)
|
|
315
315
|
for (const d of n)
|
|
316
316
|
d in s || (s[d] = i[d]);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function xt(e) {
|
|
319
319
|
const t = [];
|
|
320
320
|
for (const n of e.steps)
|
|
321
321
|
for (const i in n.styles)
|
|
322
322
|
t.indexOf(i) === -1 && t.push(i);
|
|
323
323
|
return t;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Fe(e) {
|
|
326
326
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
327
327
|
if (!t.length) {
|
|
328
|
-
|
|
328
|
+
Ne(e.elementId || e.id || "");
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
Array.from(t).forEach((n) => {
|
|
332
|
-
|
|
332
|
+
We(e, n), n.style.transition = "none", n.style.transitionDelay = "0", K(n.style, e.steps[0].styles), setTimeout(() => {
|
|
333
333
|
n.style.transition = `all ${e.duration}s ${ee(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), K(n.style, e.steps[1].styles), setTimeout(() => {
|
|
334
334
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
335
335
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
336
336
|
});
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function vt(e) {
|
|
340
340
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
341
341
|
if (!t.length) {
|
|
342
|
-
|
|
342
|
+
Ne(e.elementId || e.id || "");
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
345
|
Array.from(t).forEach((n) => {
|
|
346
|
-
|
|
346
|
+
We(e, n);
|
|
347
347
|
let i = !1, o = !1;
|
|
348
348
|
function a() {
|
|
349
349
|
!i && s(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
@@ -352,12 +352,12 @@ function xt(e) {
|
|
|
352
352
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
353
353
|
})) : e.repeat && i && !o && !s(n) && (i = !1, K(n.style, e.steps[0].styles));
|
|
354
354
|
}
|
|
355
|
-
const r =
|
|
355
|
+
const r = pt(a, 200, {
|
|
356
356
|
leading: !1
|
|
357
357
|
});
|
|
358
|
-
function s(
|
|
359
|
-
const
|
|
360
|
-
return
|
|
358
|
+
function s(u) {
|
|
359
|
+
const g = u.getBoundingClientRect(), m = window.innerHeight, h = (e.thresholdPercent || 0) / 100 * m;
|
|
360
|
+
return g.bottom > h && g.top < m - h;
|
|
361
361
|
}
|
|
362
362
|
const d = e.steps[0].styles;
|
|
363
363
|
function c() {
|
|
@@ -371,42 +371,42 @@ function xt(e) {
|
|
|
371
371
|
}), a();
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
const
|
|
374
|
+
const $e = (e) => Object.entries(e).map(([n, i]) => {
|
|
375
375
|
if (typeof i == "string")
|
|
376
376
|
return `${ee(n)}: ${i};`;
|
|
377
|
-
}).filter(G),
|
|
377
|
+
}).filter(G), St = (e) => $e(e).join(`
|
|
378
378
|
`), J = ({
|
|
379
379
|
mediaQuery: e,
|
|
380
380
|
className: t,
|
|
381
381
|
styles: n
|
|
382
382
|
}) => {
|
|
383
383
|
const i = `.${t} {
|
|
384
|
-
${
|
|
384
|
+
${St(n)}
|
|
385
385
|
}`;
|
|
386
386
|
return e ? `${e} {
|
|
387
387
|
${i}
|
|
388
388
|
}` : i;
|
|
389
389
|
};
|
|
390
|
-
function
|
|
390
|
+
function kt({
|
|
391
391
|
style: e
|
|
392
392
|
}) {
|
|
393
393
|
return e;
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const Ct = ({
|
|
396
396
|
block: e,
|
|
397
397
|
context: t
|
|
398
|
-
}) =>
|
|
398
|
+
}) => De(kt({
|
|
399
399
|
style: e.style || {},
|
|
400
400
|
context: t,
|
|
401
401
|
block: e
|
|
402
402
|
}));
|
|
403
|
-
function
|
|
403
|
+
function De(e) {
|
|
404
404
|
switch (U) {
|
|
405
405
|
case "svelte":
|
|
406
406
|
case "vue":
|
|
407
407
|
case "solid":
|
|
408
408
|
case "angular":
|
|
409
|
-
return
|
|
409
|
+
return $e(e).join(" ");
|
|
410
410
|
case "qwik":
|
|
411
411
|
case "reactNative":
|
|
412
412
|
case "react":
|
|
@@ -414,7 +414,7 @@ function $e(e) {
|
|
|
414
414
|
return e;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const Tt = ({
|
|
418
418
|
block: e,
|
|
419
419
|
registeredComponents: t
|
|
420
420
|
}) => {
|
|
@@ -428,7 +428,7 @@ const Ct = ({
|
|
|
428
428
|
console.warn(`
|
|
429
429
|
Could not find a registered component named "${n}".
|
|
430
430
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
431
|
-
},
|
|
431
|
+
}, It = ({
|
|
432
432
|
block: e,
|
|
433
433
|
context: t
|
|
434
434
|
}) => {
|
|
@@ -462,27 +462,27 @@ const Ct = ({
|
|
|
462
462
|
},
|
|
463
463
|
block: i
|
|
464
464
|
}));
|
|
465
|
-
},
|
|
465
|
+
}, wt = (e, t) => {
|
|
466
466
|
var n;
|
|
467
467
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
|
|
468
468
|
builderLinkComponent: t
|
|
469
469
|
} : {};
|
|
470
|
-
},
|
|
470
|
+
}, Rt = (e, t) => {
|
|
471
471
|
var n;
|
|
472
472
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
|
|
473
473
|
builderComponents: t
|
|
474
474
|
} : {};
|
|
475
|
-
},
|
|
475
|
+
}, Et = (e, t) => {
|
|
476
476
|
var n;
|
|
477
477
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
|
|
478
478
|
builderBlock: t
|
|
479
479
|
} : {};
|
|
480
|
-
},
|
|
480
|
+
}, Pt = (e, t) => {
|
|
481
481
|
var n;
|
|
482
482
|
return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
|
|
483
483
|
builderContext: t
|
|
484
484
|
} : {};
|
|
485
|
-
},
|
|
485
|
+
}, Le = {
|
|
486
486
|
small: {
|
|
487
487
|
min: 320,
|
|
488
488
|
default: 321,
|
|
@@ -498,11 +498,11 @@ const Ct = ({
|
|
|
498
498
|
default: 991,
|
|
499
499
|
max: 1200
|
|
500
500
|
}
|
|
501
|
-
}, pe = (e, t =
|
|
501
|
+
}, pe = (e, t = Le) => `@media (max-width: ${t[e].max}px)`, Oe = ({
|
|
502
502
|
small: e,
|
|
503
503
|
medium: t
|
|
504
504
|
}) => {
|
|
505
|
-
const n = de(
|
|
505
|
+
const n = de(Le);
|
|
506
506
|
if (!e || !t)
|
|
507
507
|
return n;
|
|
508
508
|
const i = Math.floor(e / 2);
|
|
@@ -535,58 +535,58 @@ function te(e) {
|
|
|
535
535
|
}
|
|
536
536
|
);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Bt(e) {
|
|
539
539
|
function t() {
|
|
540
540
|
const i = e.block;
|
|
541
541
|
return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
|
|
542
542
|
}
|
|
543
543
|
function n() {
|
|
544
|
-
var
|
|
545
|
-
const i = e.block, o = i.responsiveStyles, a = e.context.content, r =
|
|
546
|
-
((
|
|
547
|
-
), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small,
|
|
548
|
-
if (!
|
|
544
|
+
var f, w, P;
|
|
545
|
+
const i = e.block, o = i.responsiveStyles, a = e.context.content, r = Oe(
|
|
546
|
+
((f = a == null ? void 0 : a.meta) == null ? void 0 : f.breakpoints) || {}
|
|
547
|
+
), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, u = i.id;
|
|
548
|
+
if (!u)
|
|
549
549
|
return "";
|
|
550
|
-
const
|
|
551
|
-
className:
|
|
550
|
+
const g = s ? J({
|
|
551
|
+
className: u,
|
|
552
552
|
styles: s
|
|
553
|
-
}) : "",
|
|
554
|
-
className:
|
|
553
|
+
}) : "", m = d ? J({
|
|
554
|
+
className: u,
|
|
555
555
|
styles: d,
|
|
556
556
|
mediaQuery: pe(
|
|
557
557
|
"medium",
|
|
558
558
|
r
|
|
559
559
|
)
|
|
560
|
-
}) : "",
|
|
561
|
-
className:
|
|
560
|
+
}) : "", x = c ? J({
|
|
561
|
+
className: u,
|
|
562
562
|
styles: c,
|
|
563
563
|
mediaQuery: pe(
|
|
564
564
|
"small",
|
|
565
565
|
r
|
|
566
566
|
)
|
|
567
|
-
}) : "",
|
|
568
|
-
let
|
|
569
|
-
if (
|
|
570
|
-
const A = ((
|
|
571
|
-
|
|
572
|
-
className: `${
|
|
567
|
+
}) : "", h = i.animations && i.animations.find((A) => A.trigger === "hover");
|
|
568
|
+
let p = "";
|
|
569
|
+
if (h) {
|
|
570
|
+
const A = ((P = (w = h.steps) == null ? void 0 : w[1]) == null ? void 0 : P.styles) || {};
|
|
571
|
+
p = J({
|
|
572
|
+
className: `${u}:hover`,
|
|
573
573
|
styles: {
|
|
574
574
|
...A,
|
|
575
|
-
transition: `all ${
|
|
576
|
-
|
|
575
|
+
transition: `all ${h.duration}s ${ee(
|
|
576
|
+
h.easing
|
|
577
577
|
)}`,
|
|
578
|
-
transitionDelay:
|
|
578
|
+
transitionDelay: h.delay ? `${h.delay}s` : "0s"
|
|
579
579
|
}
|
|
580
580
|
}) || "";
|
|
581
581
|
}
|
|
582
582
|
return [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
583
|
+
g,
|
|
584
|
+
m,
|
|
585
|
+
x,
|
|
586
|
+
p
|
|
587
587
|
].join(" ");
|
|
588
588
|
}
|
|
589
|
-
return /* @__PURE__ */ l(
|
|
589
|
+
return /* @__PURE__ */ l(E, { children: n() && t() ? /* @__PURE__ */ l(E, { children: /* @__PURE__ */ l(
|
|
590
590
|
te,
|
|
591
591
|
{
|
|
592
592
|
id: "builderio-block",
|
|
@@ -595,10 +595,10 @@ function Pt(e) {
|
|
|
595
595
|
}
|
|
596
596
|
) }) : null });
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Vt(e) {
|
|
599
599
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
600
600
|
}
|
|
601
|
-
const
|
|
601
|
+
const At = (e) => `on${Vt(e)}`, Nt = (e, t) => (n) => H({
|
|
602
602
|
code: e,
|
|
603
603
|
context: t.context,
|
|
604
604
|
localState: t.localState,
|
|
@@ -608,14 +608,14 @@ const Vt = (e) => `on${Bt(e)}`, At = (e, t) => (n) => H({
|
|
|
608
608
|
isExpression: !1,
|
|
609
609
|
enableCache: !0
|
|
610
610
|
});
|
|
611
|
-
function
|
|
611
|
+
function Ue(e) {
|
|
612
612
|
var i;
|
|
613
613
|
const t = {}, n = (i = e.block.actions) != null ? i : {};
|
|
614
614
|
for (const o in n) {
|
|
615
615
|
if (!n.hasOwnProperty(o))
|
|
616
616
|
continue;
|
|
617
617
|
const a = n[o];
|
|
618
|
-
let r =
|
|
618
|
+
let r = At(o);
|
|
619
619
|
if (e.stripPrefix)
|
|
620
620
|
switch (U) {
|
|
621
621
|
case "vue":
|
|
@@ -625,16 +625,16 @@ function Oe(e) {
|
|
|
625
625
|
r = r.replace("on:", "");
|
|
626
626
|
break;
|
|
627
627
|
}
|
|
628
|
-
t[r] =
|
|
628
|
+
t[r] = Nt(a, e);
|
|
629
629
|
}
|
|
630
630
|
return t;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Wt({
|
|
633
633
|
properties: e
|
|
634
634
|
}) {
|
|
635
635
|
return e;
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const Ft = (e) => ({
|
|
638
638
|
href: e.href
|
|
639
639
|
});
|
|
640
640
|
function fe({
|
|
@@ -643,22 +643,22 @@ function fe({
|
|
|
643
643
|
}) {
|
|
644
644
|
var i;
|
|
645
645
|
const n = {
|
|
646
|
-
...
|
|
646
|
+
...Ft(e),
|
|
647
647
|
...e.properties,
|
|
648
648
|
"builder-id": e.id,
|
|
649
|
-
style:
|
|
649
|
+
style: Ct({
|
|
650
650
|
block: e,
|
|
651
651
|
context: t
|
|
652
652
|
}),
|
|
653
653
|
[q()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
654
654
|
};
|
|
655
|
-
return
|
|
655
|
+
return Wt({
|
|
656
656
|
properties: n,
|
|
657
657
|
context: t,
|
|
658
658
|
block: e
|
|
659
659
|
});
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function $t(e) {
|
|
662
662
|
return /* @__PURE__ */ l(
|
|
663
663
|
ue,
|
|
664
664
|
{
|
|
@@ -667,7 +667,7 @@ function Ft(e) {
|
|
|
667
667
|
block: e.block,
|
|
668
668
|
context: e.context
|
|
669
669
|
}),
|
|
670
|
-
actionAttributes:
|
|
670
|
+
actionAttributes: Ue({
|
|
671
671
|
block: e.block,
|
|
672
672
|
rootState: e.context.rootState,
|
|
673
673
|
rootSetState: e.context.rootSetState,
|
|
@@ -679,14 +679,14 @@ function Ft(e) {
|
|
|
679
679
|
}
|
|
680
680
|
);
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Dt(e) {
|
|
683
683
|
function t() {
|
|
684
684
|
return e.includeBlockProps ? {
|
|
685
685
|
...fe({
|
|
686
686
|
block: e.block,
|
|
687
687
|
context: e.context
|
|
688
688
|
}),
|
|
689
|
-
...
|
|
689
|
+
...Ue({
|
|
690
690
|
block: e.block,
|
|
691
691
|
rootState: e.context.rootState,
|
|
692
692
|
rootSetState: e.context.rootSetState,
|
|
@@ -697,7 +697,7 @@ function $t(e) {
|
|
|
697
697
|
}
|
|
698
698
|
return /* @__PURE__ */ l(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children });
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const Lt = ({
|
|
701
701
|
componentOptions: e,
|
|
702
702
|
builderBlock: t,
|
|
703
703
|
context: n,
|
|
@@ -730,12 +730,12 @@ const Dt = ({
|
|
|
730
730
|
function ye(e) {
|
|
731
731
|
var i;
|
|
732
732
|
const [t, n] = T(
|
|
733
|
-
() => e.isInteractive ?
|
|
733
|
+
() => e.isInteractive ? Dt : e.componentRef
|
|
734
734
|
);
|
|
735
|
-
return /* @__PURE__ */ l(
|
|
735
|
+
return /* @__PURE__ */ l(E, { children: e.componentRef ? /* @__PURE__ */ l(E, { children: /* @__PURE__ */ l(
|
|
736
736
|
t,
|
|
737
737
|
{
|
|
738
|
-
...
|
|
738
|
+
...Lt({
|
|
739
739
|
componentOptions: e.componentOptions,
|
|
740
740
|
builderBlock: e.builderBlock,
|
|
741
741
|
context: e.context,
|
|
@@ -758,7 +758,7 @@ function ye(e) {
|
|
|
758
758
|
}
|
|
759
759
|
) }) : null });
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function xe(e) {
|
|
762
762
|
const [t, n] = T(() => e.repeatContext);
|
|
763
763
|
return /* @__PURE__ */ l(me.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
764
764
|
z,
|
|
@@ -771,9 +771,9 @@ function Lt(e) {
|
|
|
771
771
|
) });
|
|
772
772
|
}
|
|
773
773
|
function z(e) {
|
|
774
|
-
var
|
|
774
|
+
var u, g, m, x;
|
|
775
775
|
function t() {
|
|
776
|
-
return
|
|
776
|
+
return It({
|
|
777
777
|
block: e.block,
|
|
778
778
|
context: e.context
|
|
779
779
|
});
|
|
@@ -783,10 +783,10 @@ function z(e) {
|
|
|
783
783
|
update: !1
|
|
784
784
|
}));
|
|
785
785
|
function o() {
|
|
786
|
-
var
|
|
787
|
-
if (n.value && !n.update && !
|
|
786
|
+
var p;
|
|
787
|
+
if (n.value && !n.update && !we())
|
|
788
788
|
return n.value;
|
|
789
|
-
const
|
|
789
|
+
const h = (p = e.block.repeat) != null && p.collection ? e.block : bt({
|
|
790
790
|
block: e.block,
|
|
791
791
|
localState: e.context.localState,
|
|
792
792
|
rootState: e.context.rootState,
|
|
@@ -794,40 +794,40 @@ function z(e) {
|
|
|
794
794
|
context: e.context.context,
|
|
795
795
|
shouldEvaluateBindings: !0
|
|
796
796
|
});
|
|
797
|
-
return n.value =
|
|
797
|
+
return n.value = h, n.update = !1, h;
|
|
798
798
|
}
|
|
799
799
|
function a() {
|
|
800
|
-
return
|
|
800
|
+
return Tt({
|
|
801
801
|
block: o(),
|
|
802
802
|
registeredComponents: e.registeredComponents
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
805
|
function r() {
|
|
806
|
-
var
|
|
807
|
-
return e.block.tagName === "a" || ((
|
|
806
|
+
var p;
|
|
807
|
+
return e.block.tagName === "a" || ((p = o().properties) == null ? void 0 : p.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
808
808
|
}
|
|
809
809
|
function s() {
|
|
810
|
-
var
|
|
811
|
-
if ((
|
|
812
|
-
return !!((
|
|
813
|
-
const
|
|
814
|
-
return ("show" in o() ? o().show : !0) && !
|
|
810
|
+
var f, w;
|
|
811
|
+
if ((f = e.block.repeat) != null && f.collection)
|
|
812
|
+
return !!((w = t == null ? void 0 : t()) != null && w.length);
|
|
813
|
+
const h = "hide" in o() ? o().hide : !1;
|
|
814
|
+
return ("show" in o() ? o().show : !0) && !h;
|
|
815
815
|
}
|
|
816
816
|
function d() {
|
|
817
|
-
var
|
|
818
|
-
return !((
|
|
817
|
+
var p, f;
|
|
818
|
+
return !((p = a == null ? void 0 : a()) != null && p.component) && !t() ? (f = o().children) != null ? f : [] : [];
|
|
819
819
|
}
|
|
820
820
|
function c() {
|
|
821
|
-
var
|
|
821
|
+
var h, p, f, w;
|
|
822
822
|
return {
|
|
823
|
-
blockChildren: (
|
|
824
|
-
componentRef: (
|
|
823
|
+
blockChildren: (h = o().children) != null ? h : [],
|
|
824
|
+
componentRef: (p = a == null ? void 0 : a()) == null ? void 0 : p.component,
|
|
825
825
|
componentOptions: {
|
|
826
|
-
...
|
|
827
|
-
...
|
|
828
|
-
...
|
|
829
|
-
...
|
|
830
|
-
...
|
|
826
|
+
...rt(o()),
|
|
827
|
+
...Et(a(), o()),
|
|
828
|
+
...Pt(a(), e.context),
|
|
829
|
+
...wt(a(), e.linkComponent),
|
|
830
|
+
...Rt(
|
|
831
831
|
a(),
|
|
832
832
|
e.registeredComponents
|
|
833
833
|
)
|
|
@@ -836,23 +836,32 @@ function z(e) {
|
|
|
836
836
|
linkComponent: e.linkComponent,
|
|
837
837
|
registeredComponents: e.registeredComponents,
|
|
838
838
|
builderBlock: o(),
|
|
839
|
-
includeBlockProps: ((
|
|
840
|
-
isInteractive: !((
|
|
839
|
+
includeBlockProps: ((f = a == null ? void 0 : a()) == null ? void 0 : f.noWrap) === !0,
|
|
840
|
+
isInteractive: !((w = a == null ? void 0 : a()) != null && w.isRSC && U === "rsc")
|
|
841
841
|
};
|
|
842
842
|
}
|
|
843
843
|
return B(() => {
|
|
844
|
-
const
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
...
|
|
848
|
-
elementId:
|
|
844
|
+
const h = o().id, p = o().animations;
|
|
845
|
+
p && h && yt(
|
|
846
|
+
p.map((f) => ({
|
|
847
|
+
...f,
|
|
848
|
+
elementId: h
|
|
849
849
|
}))
|
|
850
850
|
);
|
|
851
851
|
}, []), B(() => {
|
|
852
852
|
n.update = !0;
|
|
853
|
-
}), /* @__PURE__ */ l(
|
|
854
|
-
/* @__PURE__ */ l(
|
|
855
|
-
(
|
|
853
|
+
}), /* @__PURE__ */ l(E, { children: s() ? /* @__PURE__ */ V(E, { children: [
|
|
854
|
+
/* @__PURE__ */ l(Bt, { block: o(), context: e.context }),
|
|
855
|
+
(u = a == null ? void 0 : a()) != null && u.noWrap ? t() ? /* @__PURE__ */ l(E, { children: (x = t()) == null ? void 0 : x.map((h, p) => /* @__PURE__ */ l(
|
|
856
|
+
xe,
|
|
857
|
+
{
|
|
858
|
+
repeatContext: h.context,
|
|
859
|
+
block: h.block,
|
|
860
|
+
registeredComponents: e.registeredComponents,
|
|
861
|
+
linkComponent: e.linkComponent
|
|
862
|
+
},
|
|
863
|
+
p
|
|
864
|
+
)) }) : /* @__PURE__ */ l(
|
|
856
865
|
ye,
|
|
857
866
|
{
|
|
858
867
|
componentRef: c().componentRef,
|
|
@@ -865,17 +874,17 @@ function z(e) {
|
|
|
865
874
|
includeBlockProps: c().includeBlockProps,
|
|
866
875
|
isInteractive: c().isInteractive
|
|
867
876
|
}
|
|
868
|
-
)
|
|
869
|
-
|
|
877
|
+
) : /* @__PURE__ */ l(E, { children: t() ? /* @__PURE__ */ l(E, { children: (m = t()) == null ? void 0 : m.map((h, p) => /* @__PURE__ */ l(
|
|
878
|
+
xe,
|
|
870
879
|
{
|
|
871
|
-
repeatContext:
|
|
872
|
-
block:
|
|
880
|
+
repeatContext: h.context,
|
|
881
|
+
block: h.block,
|
|
873
882
|
registeredComponents: e.registeredComponents,
|
|
874
883
|
linkComponent: e.linkComponent
|
|
875
884
|
},
|
|
876
|
-
|
|
885
|
+
p
|
|
877
886
|
)) }) : /* @__PURE__ */ V(
|
|
878
|
-
|
|
887
|
+
$t,
|
|
879
888
|
{
|
|
880
889
|
Wrapper: r(),
|
|
881
890
|
block: o(),
|
|
@@ -895,15 +904,15 @@ function z(e) {
|
|
|
895
904
|
isInteractive: c().isInteractive
|
|
896
905
|
}
|
|
897
906
|
),
|
|
898
|
-
(
|
|
907
|
+
(g = d()) == null ? void 0 : g.map((h) => /* @__PURE__ */ l(
|
|
899
908
|
z,
|
|
900
909
|
{
|
|
901
|
-
block:
|
|
910
|
+
block: h,
|
|
902
911
|
registeredComponents: e.registeredComponents,
|
|
903
912
|
linkComponent: e.linkComponent,
|
|
904
913
|
context: e.context
|
|
905
914
|
},
|
|
906
|
-
|
|
915
|
+
h.id
|
|
907
916
|
))
|
|
908
917
|
]
|
|
909
918
|
}
|
|
@@ -943,7 +952,7 @@ function Ot(e) {
|
|
|
943
952
|
));
|
|
944
953
|
}
|
|
945
954
|
return B(() => {
|
|
946
|
-
}, []), /* @__PURE__ */ V(
|
|
955
|
+
}, []), /* @__PURE__ */ V(E, { children: [
|
|
947
956
|
/* @__PURE__ */ l(
|
|
948
957
|
e.BlocksWrapper,
|
|
949
958
|
{
|
|
@@ -968,7 +977,7 @@ function Ot(e) {
|
|
|
968
977
|
}
|
|
969
978
|
function D(e) {
|
|
970
979
|
var i, o, a;
|
|
971
|
-
const t = be(me), n = be(
|
|
980
|
+
const t = be(me), n = be(Ve);
|
|
972
981
|
return /* @__PURE__ */ l(
|
|
973
982
|
Ot,
|
|
974
983
|
{
|
|
@@ -978,7 +987,7 @@ function D(e) {
|
|
|
978
987
|
styleProp: e.styleProp,
|
|
979
988
|
BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || t.BlocksWrapper,
|
|
980
989
|
BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
|
|
981
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
990
|
+
children: e.blocks ? /* @__PURE__ */ l(E, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
|
|
982
991
|
z,
|
|
983
992
|
{
|
|
984
993
|
block: r,
|
|
@@ -1003,39 +1012,39 @@ function jt(e) {
|
|
|
1003
1012
|
return v.link ? e.builderLinkComponent || "a" : "div";
|
|
1004
1013
|
}
|
|
1005
1014
|
function d(v) {
|
|
1006
|
-
var
|
|
1007
|
-
return ((
|
|
1015
|
+
var R;
|
|
1016
|
+
return ((R = i[v]) == null ? void 0 : R.width) || 100 / i.length;
|
|
1008
1017
|
}
|
|
1009
1018
|
function c(v) {
|
|
1010
|
-
const
|
|
1011
|
-
return `calc(${
|
|
1019
|
+
const R = d(v), N = t * (i.length - 1) * (R / 100);
|
|
1020
|
+
return `calc(${R}% - ${N}px)`;
|
|
1012
1021
|
}
|
|
1013
|
-
function
|
|
1022
|
+
function u({
|
|
1014
1023
|
stackedStyle: v,
|
|
1015
|
-
desktopStyle:
|
|
1024
|
+
desktopStyle: R
|
|
1016
1025
|
}) {
|
|
1017
|
-
return a === "tablet" ? v :
|
|
1026
|
+
return a === "tablet" ? v : R;
|
|
1018
1027
|
}
|
|
1019
|
-
function
|
|
1028
|
+
function g({
|
|
1020
1029
|
stackedStyle: v,
|
|
1021
|
-
desktopStyle:
|
|
1030
|
+
desktopStyle: R
|
|
1022
1031
|
}) {
|
|
1023
|
-
return a === "never" ?
|
|
1032
|
+
return a === "never" ? R : v;
|
|
1024
1033
|
}
|
|
1025
|
-
const [
|
|
1034
|
+
const [m, x] = T(
|
|
1026
1035
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
1027
1036
|
);
|
|
1028
|
-
function
|
|
1037
|
+
function h() {
|
|
1029
1038
|
return {
|
|
1030
|
-
"--flex-dir":
|
|
1031
|
-
"--flex-dir-tablet":
|
|
1032
|
-
stackedStyle:
|
|
1039
|
+
"--flex-dir": m,
|
|
1040
|
+
"--flex-dir-tablet": u({
|
|
1041
|
+
stackedStyle: m,
|
|
1033
1042
|
desktopStyle: "row"
|
|
1034
1043
|
})
|
|
1035
1044
|
};
|
|
1036
1045
|
}
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1046
|
+
function p(v) {
|
|
1047
|
+
const R = v === 0 ? 0 : t, N = c(v), y = `${R}px`, b = "100%", S = 0;
|
|
1039
1048
|
return {
|
|
1040
1049
|
...{
|
|
1041
1050
|
display: "flex",
|
|
@@ -1044,34 +1053,34 @@ function jt(e) {
|
|
|
1044
1053
|
},
|
|
1045
1054
|
width: N,
|
|
1046
1055
|
["marginLeft"]: y,
|
|
1047
|
-
"--column-width-mobile":
|
|
1048
|
-
stackedStyle:
|
|
1056
|
+
"--column-width-mobile": g({
|
|
1057
|
+
stackedStyle: b,
|
|
1049
1058
|
desktopStyle: N
|
|
1050
1059
|
}),
|
|
1051
|
-
"--column-margin-left-mobile":
|
|
1060
|
+
"--column-margin-left-mobile": g({
|
|
1052
1061
|
stackedStyle: S,
|
|
1053
1062
|
desktopStyle: y
|
|
1054
1063
|
}),
|
|
1055
|
-
"--column-width-tablet":
|
|
1056
|
-
stackedStyle:
|
|
1064
|
+
"--column-width-tablet": u({
|
|
1065
|
+
stackedStyle: b,
|
|
1057
1066
|
desktopStyle: N
|
|
1058
1067
|
}),
|
|
1059
|
-
"--column-margin-left-tablet":
|
|
1068
|
+
"--column-margin-left-tablet": u({
|
|
1060
1069
|
stackedStyle: S,
|
|
1061
1070
|
desktopStyle: y
|
|
1062
1071
|
})
|
|
1063
1072
|
};
|
|
1064
1073
|
}
|
|
1065
|
-
function
|
|
1074
|
+
function f(v) {
|
|
1066
1075
|
var N, y;
|
|
1067
|
-
return
|
|
1076
|
+
return Oe(
|
|
1068
1077
|
((y = (N = e.builderContext.content) == null ? void 0 : N.meta) == null ? void 0 : y.breakpoints) || {}
|
|
1069
1078
|
)[v].max;
|
|
1070
1079
|
}
|
|
1071
|
-
function
|
|
1080
|
+
function w() {
|
|
1072
1081
|
const v = `.${e.builderBlock.id}-breakpoints > .builder-column`;
|
|
1073
1082
|
return `
|
|
1074
|
-
@media (max-width: ${
|
|
1083
|
+
@media (max-width: ${f("medium")}px) {
|
|
1075
1084
|
.${e.builderBlock.id}-breakpoints {
|
|
1076
1085
|
flex-direction: var(--flex-dir-tablet);
|
|
1077
1086
|
align-items: stretch;
|
|
@@ -1083,7 +1092,7 @@ function jt(e) {
|
|
|
1083
1092
|
}
|
|
1084
1093
|
}
|
|
1085
1094
|
|
|
1086
|
-
@media (max-width: ${
|
|
1095
|
+
@media (max-width: ${f("small")}px) {
|
|
1087
1096
|
.${e.builderBlock.id}-breakpoints {
|
|
1088
1097
|
flex-direction: var(--flex-dir);
|
|
1089
1098
|
align-items: stretch;
|
|
@@ -1096,40 +1105,40 @@ function jt(e) {
|
|
|
1096
1105
|
},
|
|
1097
1106
|
`;
|
|
1098
1107
|
}
|
|
1099
|
-
function
|
|
1108
|
+
function P(v, R) {
|
|
1100
1109
|
return {
|
|
1101
1110
|
...v.link ? {
|
|
1102
1111
|
href: v.link
|
|
1103
1112
|
} : {},
|
|
1104
1113
|
[q()]: "builder-column",
|
|
1105
|
-
style:
|
|
1114
|
+
style: De(p(R))
|
|
1106
1115
|
};
|
|
1107
1116
|
}
|
|
1108
|
-
return /* @__PURE__ */ V(
|
|
1117
|
+
return /* @__PURE__ */ V(E, { children: [
|
|
1109
1118
|
/* @__PURE__ */ V(
|
|
1110
1119
|
"div",
|
|
1111
1120
|
{
|
|
1112
1121
|
className: Ut((A = e.builderBlock) == null ? void 0 : A.id) + " div-34f576bb",
|
|
1113
|
-
style:
|
|
1122
|
+
style: h(),
|
|
1114
1123
|
children: [
|
|
1115
1124
|
/* @__PURE__ */ l(
|
|
1116
1125
|
te,
|
|
1117
1126
|
{
|
|
1118
1127
|
id: "builderio-columns",
|
|
1119
|
-
styles:
|
|
1128
|
+
styles: w(),
|
|
1120
1129
|
nonce: e.builderContext.nonce
|
|
1121
1130
|
}
|
|
1122
1131
|
),
|
|
1123
|
-
(O = e.columns) == null ? void 0 : O.map((v,
|
|
1132
|
+
(O = e.columns) == null ? void 0 : O.map((v, R) => /* @__PURE__ */ l(
|
|
1124
1133
|
ue,
|
|
1125
1134
|
{
|
|
1126
1135
|
TagName: s(v),
|
|
1127
1136
|
actionAttributes: {},
|
|
1128
|
-
attributes:
|
|
1137
|
+
attributes: P(v, R),
|
|
1129
1138
|
children: /* @__PURE__ */ l(
|
|
1130
1139
|
D,
|
|
1131
1140
|
{
|
|
1132
|
-
path: `component.options.columns.${
|
|
1141
|
+
path: `component.options.columns.${R}.blocks`,
|
|
1133
1142
|
parent: e.builderBlock.id,
|
|
1134
1143
|
styleProp: {
|
|
1135
1144
|
flexGrow: "1"
|
|
@@ -1141,7 +1150,7 @@ function jt(e) {
|
|
|
1141
1150
|
}
|
|
1142
1151
|
)
|
|
1143
1152
|
},
|
|
1144
|
-
|
|
1153
|
+
R
|
|
1145
1154
|
))
|
|
1146
1155
|
]
|
|
1147
1156
|
}
|
|
@@ -1155,7 +1164,7 @@ function jt(e) {
|
|
|
1155
1164
|
function Mt(e) {
|
|
1156
1165
|
return /* @__PURE__ */ l("span", { children: e.children });
|
|
1157
1166
|
}
|
|
1158
|
-
function
|
|
1167
|
+
function ve(e) {
|
|
1159
1168
|
return e.replace(/http(s)?:/, "");
|
|
1160
1169
|
}
|
|
1161
1170
|
function Ht(e = "", t, n) {
|
|
@@ -1166,11 +1175,11 @@ function Kt(e, t) {
|
|
|
1166
1175
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1167
1176
|
return e;
|
|
1168
1177
|
if (t === "master")
|
|
1169
|
-
return
|
|
1178
|
+
return ve(e);
|
|
1170
1179
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1171
1180
|
if (n) {
|
|
1172
1181
|
const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
|
|
1173
|
-
return
|
|
1182
|
+
return ve(`${i[0]}_${a}${o}`);
|
|
1174
1183
|
}
|
|
1175
1184
|
return null;
|
|
1176
1185
|
}
|
|
@@ -1188,38 +1197,38 @@ function ie(e) {
|
|
|
1188
1197
|
function qt(e) {
|
|
1189
1198
|
var o, a, r, s, d, c;
|
|
1190
1199
|
function t() {
|
|
1191
|
-
var
|
|
1192
|
-
const
|
|
1193
|
-
if (!
|
|
1200
|
+
var m;
|
|
1201
|
+
const g = e.image || e.src;
|
|
1202
|
+
if (!g || // We can auto add srcset for cdn.builder.io and shopify
|
|
1194
1203
|
// images, otherwise you can supply this prop manually
|
|
1195
|
-
!(
|
|
1204
|
+
!(g.match(/builder\.io/) || g.match(/cdn\.shopify\.com/)))
|
|
1196
1205
|
return e.srcset;
|
|
1197
1206
|
if (!e.noWebp) {
|
|
1198
|
-
if (e.srcset && ((
|
|
1207
|
+
if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
|
|
1199
1208
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
1200
|
-
return console.debug("Removed given srcset"), ie(
|
|
1209
|
+
return console.debug("Removed given srcset"), ie(g);
|
|
1201
1210
|
} else if (e.image && !e.srcset)
|
|
1202
|
-
return ie(
|
|
1203
|
-
return ie(
|
|
1211
|
+
return ie(g);
|
|
1212
|
+
return ie(g);
|
|
1204
1213
|
}
|
|
1205
1214
|
}
|
|
1206
1215
|
function n() {
|
|
1207
|
-
var
|
|
1208
|
-
return (
|
|
1216
|
+
var u;
|
|
1217
|
+
return (u = t == null ? void 0 : t()) != null && u.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
|
|
1209
1218
|
}
|
|
1210
1219
|
function i() {
|
|
1211
|
-
const
|
|
1220
|
+
const u = {
|
|
1212
1221
|
position: "absolute",
|
|
1213
1222
|
height: "100%",
|
|
1214
1223
|
width: "100%",
|
|
1215
1224
|
left: "0px",
|
|
1216
1225
|
top: "0px"
|
|
1217
1226
|
};
|
|
1218
|
-
return e.aspectRatio ?
|
|
1227
|
+
return e.aspectRatio ? u : void 0;
|
|
1219
1228
|
}
|
|
1220
1229
|
return B(() => {
|
|
1221
|
-
}, []), /* @__PURE__ */ V(
|
|
1222
|
-
/* @__PURE__ */ V(
|
|
1230
|
+
}, []), /* @__PURE__ */ V(E, { children: [
|
|
1231
|
+
/* @__PURE__ */ V(E, { children: [
|
|
1223
1232
|
/* @__PURE__ */ V("picture", { children: [
|
|
1224
1233
|
n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
|
|
1225
1234
|
/* @__PURE__ */ l(
|
|
@@ -1250,7 +1259,7 @@ function qt(e) {
|
|
|
1250
1259
|
}
|
|
1251
1260
|
}
|
|
1252
1261
|
) : null,
|
|
1253
|
-
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(
|
|
1262
|
+
(s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(E, { children: e.children }) : null,
|
|
1254
1263
|
!e.fitContent && ((c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length) ? /* @__PURE__ */ l("div", { className: "div-2d6925f2-2", children: e.children }) : null
|
|
1255
1264
|
] }),
|
|
1256
1265
|
/* @__PURE__ */ l("style", { children: `.img-2d6925f2 {
|
|
@@ -1417,9 +1426,9 @@ const oe = {
|
|
|
1417
1426
|
builderComponents: !0,
|
|
1418
1427
|
builderLinkComponent: !0
|
|
1419
1428
|
}
|
|
1420
|
-
},
|
|
1429
|
+
}, Se = (e) => e.toString();
|
|
1421
1430
|
function Jt(e) {
|
|
1422
|
-
var
|
|
1431
|
+
var g;
|
|
1423
1432
|
const [t, n] = T(() => []);
|
|
1424
1433
|
function i() {
|
|
1425
1434
|
return !!(e.grid || e.oneAtATime);
|
|
@@ -1437,7 +1446,7 @@ function Jt(e) {
|
|
|
1437
1446
|
};
|
|
1438
1447
|
}
|
|
1439
1448
|
function a() {
|
|
1440
|
-
const
|
|
1449
|
+
const x = {
|
|
1441
1450
|
...{
|
|
1442
1451
|
display: "flex",
|
|
1443
1452
|
flexDirection: "column"
|
|
@@ -1446,73 +1455,73 @@ function Jt(e) {
|
|
|
1446
1455
|
cursor: "pointer"
|
|
1447
1456
|
};
|
|
1448
1457
|
return Object.fromEntries(
|
|
1449
|
-
Object.entries(
|
|
1458
|
+
Object.entries(x).filter(([h, p]) => p !== void 0)
|
|
1450
1459
|
);
|
|
1451
1460
|
}
|
|
1452
|
-
function r(
|
|
1453
|
-
return `builder-accordion-title builder-accordion-title-${t.includes(
|
|
1461
|
+
function r(m) {
|
|
1462
|
+
return `builder-accordion-title builder-accordion-title-${t.includes(m) ? "open" : "closed"}`;
|
|
1454
1463
|
}
|
|
1455
|
-
function s(
|
|
1456
|
-
return `builder-accordion-detail builder-accordion-detail-${t.includes(
|
|
1464
|
+
function s(m) {
|
|
1465
|
+
return `builder-accordion-detail builder-accordion-detail-${t.includes(m) ? "open" : "closed"}`;
|
|
1457
1466
|
}
|
|
1458
1467
|
function d() {
|
|
1459
|
-
let
|
|
1468
|
+
let m = null;
|
|
1460
1469
|
if (e.grid && t.length && document) {
|
|
1461
|
-
const
|
|
1462
|
-
let
|
|
1463
|
-
`.builder-accordion-title[data-index="${
|
|
1470
|
+
const h = t[0];
|
|
1471
|
+
let f = document.querySelector(
|
|
1472
|
+
`.builder-accordion-title[data-index="${h}"]`
|
|
1464
1473
|
);
|
|
1465
|
-
if (
|
|
1466
|
-
let
|
|
1467
|
-
for (;
|
|
1468
|
-
if (
|
|
1469
|
-
if (
|
|
1474
|
+
if (m = h, f) {
|
|
1475
|
+
let w = f.getBoundingClientRect();
|
|
1476
|
+
for (; f = f && f.nextElementSibling; )
|
|
1477
|
+
if (f) {
|
|
1478
|
+
if (f.classList.contains("builder-accordion-detail"))
|
|
1470
1479
|
continue;
|
|
1471
|
-
const
|
|
1472
|
-
if (
|
|
1480
|
+
const P = f.getBoundingClientRect();
|
|
1481
|
+
if (P.left > w.left) {
|
|
1473
1482
|
const A = parseInt(
|
|
1474
|
-
|
|
1483
|
+
f.getAttribute("data-index") || "",
|
|
1475
1484
|
10
|
|
1476
1485
|
);
|
|
1477
|
-
isNaN(A) || (
|
|
1486
|
+
isNaN(A) || (w = P, m = A);
|
|
1478
1487
|
} else
|
|
1479
1488
|
break;
|
|
1480
1489
|
}
|
|
1481
1490
|
}
|
|
1482
1491
|
}
|
|
1483
|
-
return typeof
|
|
1492
|
+
return typeof m == "number" && (m = m + 1), m;
|
|
1484
1493
|
}
|
|
1485
1494
|
function c() {
|
|
1486
|
-
const
|
|
1495
|
+
const m = {
|
|
1487
1496
|
order: typeof d() == "number" ? d() : void 0,
|
|
1488
1497
|
...e.grid && {
|
|
1489
1498
|
width: "100%"
|
|
1490
1499
|
}
|
|
1491
1500
|
};
|
|
1492
1501
|
return Object.fromEntries(
|
|
1493
|
-
Object.entries(
|
|
1502
|
+
Object.entries(m).filter(([x, h]) => h !== void 0)
|
|
1494
1503
|
);
|
|
1495
1504
|
}
|
|
1496
|
-
function m
|
|
1497
|
-
t.includes(
|
|
1505
|
+
function u(m) {
|
|
1506
|
+
t.includes(m) ? n(i() ? [] : t.filter((x) => x !== m)) : n(i() ? [m] : t.concat(m));
|
|
1498
1507
|
}
|
|
1499
|
-
return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (
|
|
1508
|
+
return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (g = e.items) == null ? void 0 : g.map((m, x) => /* @__PURE__ */ V(E, { children: [
|
|
1500
1509
|
/* @__PURE__ */ l(
|
|
1501
1510
|
"div",
|
|
1502
1511
|
{
|
|
1503
|
-
className: r(
|
|
1512
|
+
className: r(x),
|
|
1504
1513
|
style: {
|
|
1505
1514
|
...a(),
|
|
1506
1515
|
width: e.grid ? e.gridRowWidth : void 0,
|
|
1507
|
-
order: d() !== null ?
|
|
1516
|
+
order: d() !== null ? Se(x) : Se(x + 1)
|
|
1508
1517
|
},
|
|
1509
|
-
"data-index":
|
|
1510
|
-
onClick: (
|
|
1518
|
+
"data-index": x,
|
|
1519
|
+
onClick: (h) => u(x),
|
|
1511
1520
|
children: /* @__PURE__ */ l(
|
|
1512
1521
|
D,
|
|
1513
1522
|
{
|
|
1514
|
-
blocks:
|
|
1515
|
-
path: `items.${
|
|
1523
|
+
blocks: m.title,
|
|
1524
|
+
path: `items.${x}.title`,
|
|
1516
1525
|
parent: e.builderBlock.id,
|
|
1517
1526
|
context: e.builderContext,
|
|
1518
1527
|
registeredComponents: e.builderComponents,
|
|
@@ -1521,16 +1530,16 @@ function Jt(e) {
|
|
|
1521
1530
|
)
|
|
1522
1531
|
}
|
|
1523
1532
|
),
|
|
1524
|
-
t.includes(
|
|
1533
|
+
t.includes(x) ? /* @__PURE__ */ l(
|
|
1525
1534
|
"div",
|
|
1526
1535
|
{
|
|
1527
|
-
className: s(
|
|
1536
|
+
className: s(x),
|
|
1528
1537
|
style: c(),
|
|
1529
1538
|
children: /* @__PURE__ */ l(
|
|
1530
1539
|
D,
|
|
1531
1540
|
{
|
|
1532
|
-
blocks:
|
|
1533
|
-
path: `items.${
|
|
1541
|
+
blocks: m.detail,
|
|
1542
|
+
path: `items.${x}.detail`,
|
|
1534
1543
|
parent: e.builderBlock.id,
|
|
1535
1544
|
context: e.builderContext,
|
|
1536
1545
|
registeredComponents: e.builderComponents,
|
|
@@ -1812,14 +1821,14 @@ const Yt = {
|
|
|
1812
1821
|
e.delete("srcset"), e.delete("noWebp");
|
|
1813
1822
|
function n(r, s = 6e4) {
|
|
1814
1823
|
return new Promise((d, c) => {
|
|
1815
|
-
const
|
|
1816
|
-
let
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
},
|
|
1820
|
-
console.warn("Image load failed",
|
|
1821
|
-
}),
|
|
1822
|
-
|
|
1824
|
+
const u = document.createElement("img");
|
|
1825
|
+
let g = !1;
|
|
1826
|
+
u.onload = () => {
|
|
1827
|
+
g = !0, d(u);
|
|
1828
|
+
}, u.addEventListener("error", (m) => {
|
|
1829
|
+
console.warn("Image load failed", m.error), c(m.error);
|
|
1830
|
+
}), u.src = r, setTimeout(() => {
|
|
1831
|
+
g || c(new Error("Image load timed out"));
|
|
1823
1832
|
}, s);
|
|
1824
1833
|
});
|
|
1825
1834
|
}
|
|
@@ -1951,7 +1960,8 @@ const Yt = {
|
|
|
1951
1960
|
defaultValue: "children"
|
|
1952
1961
|
}],
|
|
1953
1962
|
shouldReceiveBuilderProps: {
|
|
1954
|
-
builderContext: !0
|
|
1963
|
+
builderContext: !0,
|
|
1964
|
+
builderComponents: !0
|
|
1955
1965
|
}
|
|
1956
1966
|
};
|
|
1957
1967
|
function tn(e) {
|
|
@@ -1971,6 +1981,7 @@ function tn(e) {
|
|
|
1971
1981
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1972
1982
|
path: `symbol.data.${e.name}`,
|
|
1973
1983
|
context: e.builderContext,
|
|
1984
|
+
registeredComponents: e.builderComponents,
|
|
1974
1985
|
blocks: (i = e.builderContext.rootState) == null ? void 0 : i[e.name]
|
|
1975
1986
|
}
|
|
1976
1987
|
)
|
|
@@ -2308,8 +2319,8 @@ function cn(e) {
|
|
|
2308
2319
|
if (n.includes(c.src))
|
|
2309
2320
|
continue;
|
|
2310
2321
|
n.push(c.src);
|
|
2311
|
-
const
|
|
2312
|
-
|
|
2322
|
+
const u = document.createElement("script");
|
|
2323
|
+
u.async = !0, u.src = c.src, document.head.appendChild(u);
|
|
2313
2324
|
} else if (!c.type || [
|
|
2314
2325
|
"text/javascript",
|
|
2315
2326
|
"application/javascript",
|
|
@@ -2319,8 +2330,8 @@ function cn(e) {
|
|
|
2319
2330
|
continue;
|
|
2320
2331
|
try {
|
|
2321
2332
|
o.push(c.innerText), new Function(c.innerText)();
|
|
2322
|
-
} catch (
|
|
2323
|
-
console.warn("`CustomCode`: Error running script:",
|
|
2333
|
+
} catch (u) {
|
|
2334
|
+
console.warn("`CustomCode`: Error running script:", u);
|
|
2324
2335
|
}
|
|
2325
2336
|
}
|
|
2326
2337
|
}
|
|
@@ -2355,17 +2366,17 @@ function fn(e) {
|
|
|
2355
2366
|
if (!t.current || !t.current.getElementsByTagName)
|
|
2356
2367
|
return;
|
|
2357
2368
|
const c = t.current.getElementsByTagName("script");
|
|
2358
|
-
for (let
|
|
2359
|
-
const
|
|
2360
|
-
if (
|
|
2361
|
-
n.push(
|
|
2362
|
-
const
|
|
2363
|
-
|
|
2364
|
-
} else if (mn(
|
|
2369
|
+
for (let u = 0; u < c.length; u++) {
|
|
2370
|
+
const g = c[u];
|
|
2371
|
+
if (g.src && !n.includes(g.src)) {
|
|
2372
|
+
n.push(g.src);
|
|
2373
|
+
const m = document.createElement("script");
|
|
2374
|
+
m.async = !0, m.src = g.src, document.head.appendChild(m);
|
|
2375
|
+
} else if (mn(g) && !o.includes(g.innerText))
|
|
2365
2376
|
try {
|
|
2366
|
-
o.push(
|
|
2367
|
-
} catch (
|
|
2368
|
-
console.warn("`Embed`: Error running script:",
|
|
2377
|
+
o.push(g.innerText), new Function(g.innerText)();
|
|
2378
|
+
} catch (m) {
|
|
2379
|
+
console.warn("`Embed`: Error running script:", m);
|
|
2369
2380
|
}
|
|
2370
2381
|
}
|
|
2371
2382
|
}
|
|
@@ -2625,70 +2636,70 @@ const hn = {
|
|
|
2625
2636
|
return i === void 0 || i === e ? n : i;
|
|
2626
2637
|
};
|
|
2627
2638
|
function yn(e) {
|
|
2628
|
-
var
|
|
2639
|
+
var g, m;
|
|
2629
2640
|
const t = _(null), [n, i] = T(() => "unsubmitted"), [o, a] = T(() => null), [r, s] = T(() => "");
|
|
2630
|
-
function d(
|
|
2631
|
-
var
|
|
2632
|
-
const
|
|
2641
|
+
function d(x) {
|
|
2642
|
+
var p, f;
|
|
2643
|
+
const h = {
|
|
2633
2644
|
...e.builderContext.rootState,
|
|
2634
|
-
...
|
|
2645
|
+
...x
|
|
2635
2646
|
};
|
|
2636
|
-
e.builderContext.rootSetState ? (
|
|
2647
|
+
e.builderContext.rootSetState ? (f = (p = e.builderContext).rootSetState) == null || f.call(p, h) : e.builderContext.rootState = h;
|
|
2637
2648
|
}
|
|
2638
2649
|
function c() {
|
|
2639
2650
|
return $() && e.previewState || n;
|
|
2640
2651
|
}
|
|
2641
|
-
function
|
|
2642
|
-
var
|
|
2643
|
-
const
|
|
2652
|
+
function u(x) {
|
|
2653
|
+
var p;
|
|
2654
|
+
const h = e.sendWithJs || e.sendSubmissionsTo === "email";
|
|
2644
2655
|
if (e.sendSubmissionsTo === "zapier")
|
|
2645
|
-
|
|
2646
|
-
else if (
|
|
2656
|
+
x.preventDefault();
|
|
2657
|
+
else if (h) {
|
|
2647
2658
|
if (!(e.action || e.sendSubmissionsTo === "email")) {
|
|
2648
|
-
|
|
2659
|
+
x.preventDefault();
|
|
2649
2660
|
return;
|
|
2650
2661
|
}
|
|
2651
|
-
|
|
2652
|
-
const
|
|
2653
|
-
let
|
|
2654
|
-
const A = new FormData(
|
|
2655
|
-
let
|
|
2662
|
+
x.preventDefault();
|
|
2663
|
+
const f = x.currentTarget || x.target, w = e.customHeaders || {};
|
|
2664
|
+
let P;
|
|
2665
|
+
const A = new FormData(f), O = Array.from(f.querySelectorAll("input,select,textarea")).filter((y) => !!y.name).map((y) => {
|
|
2666
|
+
let b;
|
|
2656
2667
|
const S = y.name;
|
|
2657
2668
|
if (y instanceof HTMLInputElement)
|
|
2658
2669
|
if (y.type === "radio") {
|
|
2659
2670
|
if (y.checked)
|
|
2660
|
-
return
|
|
2671
|
+
return b = y.name, {
|
|
2661
2672
|
key: S,
|
|
2662
|
-
value:
|
|
2673
|
+
value: b
|
|
2663
2674
|
};
|
|
2664
2675
|
} else if (y.type === "checkbox")
|
|
2665
|
-
|
|
2676
|
+
b = y.checked;
|
|
2666
2677
|
else if (y.type === "number" || y.type === "range") {
|
|
2667
2678
|
const k = y.valueAsNumber;
|
|
2668
|
-
isNaN(k) || (
|
|
2679
|
+
isNaN(k) || (b = k);
|
|
2669
2680
|
} else
|
|
2670
|
-
y.type === "file" ?
|
|
2681
|
+
y.type === "file" ? b = y.files : b = y.value;
|
|
2671
2682
|
else
|
|
2672
|
-
|
|
2683
|
+
b = y.value;
|
|
2673
2684
|
return {
|
|
2674
2685
|
key: S,
|
|
2675
|
-
value:
|
|
2686
|
+
value: b
|
|
2676
2687
|
};
|
|
2677
2688
|
});
|
|
2678
2689
|
let v = e.contentType;
|
|
2679
2690
|
if (e.sendSubmissionsTo === "email" && (v = "multipart/form-data"), Array.from(O).forEach(({ value: y }) => {
|
|
2680
2691
|
(y instanceof File || Array.isArray(y) && y[0] instanceof File || y instanceof FileList) && (v = "multipart/form-data");
|
|
2681
2692
|
}), v !== "application/json")
|
|
2682
|
-
|
|
2693
|
+
P = A;
|
|
2683
2694
|
else {
|
|
2684
2695
|
const y = {};
|
|
2685
|
-
Array.from(O).forEach(({ value:
|
|
2686
|
-
|
|
2687
|
-
}),
|
|
2696
|
+
Array.from(O).forEach(({ value: b, key: S }) => {
|
|
2697
|
+
Be(y, S, b);
|
|
2698
|
+
}), P = JSON.stringify(y);
|
|
2688
2699
|
}
|
|
2689
|
-
v && v !== "multipart/form-data" && (
|
|
2690
|
-
const
|
|
2691
|
-
if (t.current && (t.current.dispatchEvent(
|
|
2700
|
+
v && v !== "multipart/form-data" && (h && ((p = e.action) != null && p.includes("zapier.com")) || (w["content-type"] = v));
|
|
2701
|
+
const R = new CustomEvent("presubmit", { detail: { body: P } });
|
|
2702
|
+
if (t.current && (t.current.dispatchEvent(R), R.defaultPrevented))
|
|
2692
2703
|
return;
|
|
2693
2704
|
i("sending");
|
|
2694
2705
|
const N = `${bn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
|
|
@@ -2696,18 +2707,18 @@ function yn(e) {
|
|
|
2696
2707
|
)}&name=${encodeURIComponent(e.name || "")}`;
|
|
2697
2708
|
fetch(
|
|
2698
2709
|
e.sendSubmissionsTo === "email" ? N : e.action,
|
|
2699
|
-
{ body:
|
|
2710
|
+
{ body: P, headers: w, method: e.method || "post" }
|
|
2700
2711
|
).then(
|
|
2701
2712
|
async (y) => {
|
|
2702
|
-
let
|
|
2713
|
+
let b;
|
|
2703
2714
|
const S = y.headers.get("content-type");
|
|
2704
|
-
if (S && S.indexOf("application/json") !== -1 ?
|
|
2705
|
-
let k = pn(
|
|
2715
|
+
if (S && S.indexOf("application/json") !== -1 ? b = await y.json() : b = await y.text(), !y.ok && e.errorMessagePath) {
|
|
2716
|
+
let k = pn(b, e.errorMessagePath);
|
|
2706
2717
|
k && (typeof k != "string" && (k = JSON.stringify(k)), s(k), d({ formErrorMessage: k }));
|
|
2707
2718
|
}
|
|
2708
|
-
if (a(
|
|
2719
|
+
if (a(b), i(y.ok ? "success" : "error"), y.ok) {
|
|
2709
2720
|
const k = new CustomEvent("submit:success", {
|
|
2710
|
-
detail: { res: y, body:
|
|
2721
|
+
detail: { res: y, body: b }
|
|
2711
2722
|
});
|
|
2712
2723
|
if (t.current) {
|
|
2713
2724
|
if (t.current.dispatchEvent(k), k.defaultPrevented)
|
|
@@ -2725,15 +2736,15 @@ function yn(e) {
|
|
|
2725
2736
|
}
|
|
2726
2737
|
},
|
|
2727
2738
|
(y) => {
|
|
2728
|
-
const
|
|
2739
|
+
const b = new CustomEvent("submit:error", {
|
|
2729
2740
|
detail: { error: y }
|
|
2730
2741
|
});
|
|
2731
|
-
t.current && (t.current.dispatchEvent(
|
|
2742
|
+
t.current && (t.current.dispatchEvent(b), b.defaultPrevented) || (a(y), i("error"));
|
|
2732
2743
|
}
|
|
2733
2744
|
);
|
|
2734
2745
|
}
|
|
2735
2746
|
}
|
|
2736
|
-
return /* @__PURE__ */ V(
|
|
2747
|
+
return /* @__PURE__ */ V(E, { children: [
|
|
2737
2748
|
" ",
|
|
2738
2749
|
/* @__PURE__ */ V(
|
|
2739
2750
|
"form",
|
|
@@ -2743,18 +2754,18 @@ function yn(e) {
|
|
|
2743
2754
|
action: !e.sendWithJs && e.action,
|
|
2744
2755
|
method: e.method,
|
|
2745
2756
|
name: e.name,
|
|
2746
|
-
onSubmit: (
|
|
2757
|
+
onSubmit: (x) => u(x),
|
|
2747
2758
|
...e.attributes,
|
|
2748
2759
|
children: [
|
|
2749
|
-
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(
|
|
2760
|
+
e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(E, { children: (m = (g = e.builderBlock) == null ? void 0 : g.children) == null ? void 0 : m.map((x, h) => /* @__PURE__ */ l(
|
|
2750
2761
|
z,
|
|
2751
2762
|
{
|
|
2752
|
-
block:
|
|
2763
|
+
block: x,
|
|
2753
2764
|
context: e.builderContext,
|
|
2754
2765
|
registeredComponents: e.builderComponents,
|
|
2755
2766
|
linkComponent: e.builderLinkComponent
|
|
2756
2767
|
},
|
|
2757
|
-
`form-block-${
|
|
2768
|
+
`form-block-${h}`
|
|
2758
2769
|
)) }) : null,
|
|
2759
2770
|
c() === "error" ? /* @__PURE__ */ l(
|
|
2760
2771
|
D,
|
|
@@ -2842,7 +2853,7 @@ const xn = {
|
|
|
2842
2853
|
}
|
|
2843
2854
|
};
|
|
2844
2855
|
function vn(e) {
|
|
2845
|
-
return /* @__PURE__ */
|
|
2856
|
+
return /* @__PURE__ */ Pe(
|
|
2846
2857
|
"input",
|
|
2847
2858
|
{
|
|
2848
2859
|
...e.attributes,
|
|
@@ -2901,7 +2912,7 @@ const Sn = {
|
|
|
2901
2912
|
};
|
|
2902
2913
|
function kn(e) {
|
|
2903
2914
|
var t;
|
|
2904
|
-
return /* @__PURE__ */
|
|
2915
|
+
return /* @__PURE__ */ Pe(
|
|
2905
2916
|
"select",
|
|
2906
2917
|
{
|
|
2907
2918
|
...e.attributes,
|
|
@@ -3236,8 +3247,8 @@ const Vn = () => [{
|
|
|
3236
3247
|
}, {
|
|
3237
3248
|
component: Bn,
|
|
3238
3249
|
...Pn
|
|
3239
|
-
}],
|
|
3240
|
-
component:
|
|
3250
|
+
}], ke = () => [{
|
|
3251
|
+
component: at,
|
|
3241
3252
|
...Yt
|
|
3242
3253
|
}, {
|
|
3243
3254
|
component: jt,
|
|
@@ -3356,24 +3367,24 @@ const Vn = () => [{
|
|
|
3356
3367
|
thisScriptEl?.remove();
|
|
3357
3368
|
}
|
|
3358
3369
|
return;
|
|
3359
|
-
}`,
|
|
3370
|
+
}`, je = "builderIoAbTest", Me = "builderIoRenderContent", Y = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
3360
3371
|
...t,
|
|
3361
3372
|
testVariationId: t.id,
|
|
3362
3373
|
id: e == null ? void 0 : e.id
|
|
3363
3374
|
})), Wn = ({
|
|
3364
3375
|
canTrack: e,
|
|
3365
3376
|
content: t
|
|
3366
|
-
}) => !(!(Y(t).length > 0) || !e || Q()), Fn = (e) => e === "react" || e === "reactNative",
|
|
3367
|
-
window.${
|
|
3368
|
-
window.${
|
|
3377
|
+
}) => !(!(Y(t).length > 0) || !e || Q()), Fn = (e) => e === "react" || e === "reactNative", He = Fn(U), $n = () => `
|
|
3378
|
+
window.${je} = ${An}
|
|
3379
|
+
window.${Me} = ${Nn}
|
|
3369
3380
|
`, Dn = (e, t) => `
|
|
3370
|
-
window.${
|
|
3371
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
3381
|
+
window.${je}(
|
|
3382
|
+
"${t}",${JSON.stringify(e)}, ${He}
|
|
3372
3383
|
)`, Ln = ({
|
|
3373
3384
|
contentId: e,
|
|
3374
3385
|
variationId: t
|
|
3375
|
-
}) => `window.${
|
|
3376
|
-
"${t}", "${e}", ${
|
|
3386
|
+
}) => `window.${Me}(
|
|
3387
|
+
"${t}", "${e}", ${He}
|
|
3377
3388
|
)`;
|
|
3378
3389
|
function ce(e) {
|
|
3379
3390
|
return /* @__PURE__ */ l(
|
|
@@ -3385,7 +3396,7 @@ function ce(e) {
|
|
|
3385
3396
|
}
|
|
3386
3397
|
);
|
|
3387
3398
|
}
|
|
3388
|
-
function
|
|
3399
|
+
function Ce(e) {
|
|
3389
3400
|
return Math.round(e * 1e3) / 1e3;
|
|
3390
3401
|
}
|
|
3391
3402
|
const On = (e, t, n = !0) => {
|
|
@@ -3402,11 +3413,11 @@ const On = (e, t, n = !0) => {
|
|
|
3402
3413
|
}, Un = (e) => On(e, (t) => {
|
|
3403
3414
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3404
3415
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3405
|
-
}),
|
|
3416
|
+
}), Te = ({
|
|
3406
3417
|
event: e,
|
|
3407
3418
|
target: t
|
|
3408
3419
|
}) => {
|
|
3409
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a =
|
|
3420
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = Ce(i / n.width), r = Ce(o / n.height);
|
|
3410
3421
|
return {
|
|
3411
3422
|
x: a,
|
|
3412
3423
|
y: r
|
|
@@ -3416,11 +3427,11 @@ const On = (e, t, n = !0) => {
|
|
|
3416
3427
|
return {
|
|
3417
3428
|
targetBuilderElement: i || void 0,
|
|
3418
3429
|
metadata: {
|
|
3419
|
-
targetOffset: t ?
|
|
3430
|
+
targetOffset: t ? Te({
|
|
3420
3431
|
event: e,
|
|
3421
3432
|
target: t
|
|
3422
3433
|
}) : void 0,
|
|
3423
|
-
builderTargetOffset: n ?
|
|
3434
|
+
builderTargetOffset: n ? Te({
|
|
3424
3435
|
event: e,
|
|
3425
3436
|
target: n
|
|
3426
3437
|
}) : void 0,
|
|
@@ -3480,32 +3491,32 @@ font-weight: ${s};
|
|
|
3480
3491
|
}
|
|
3481
3492
|
`, _n = (e) => e ? "" : qn, zn = (e) => `variant-${e}`;
|
|
3482
3493
|
function Jn(e) {
|
|
3483
|
-
var
|
|
3494
|
+
var P, A, O, v, R, N, y;
|
|
3484
3495
|
const t = _(null);
|
|
3485
|
-
function n(
|
|
3496
|
+
function n(b) {
|
|
3486
3497
|
var k, C;
|
|
3487
3498
|
const S = {
|
|
3488
3499
|
...e.builderContextSignal.rootState,
|
|
3489
|
-
...
|
|
3500
|
+
...b
|
|
3490
3501
|
};
|
|
3491
3502
|
e.builderContextSignal.rootSetState ? (C = (k = e.builderContextSignal).rootSetState) == null || C.call(k, S) : e.setBuilderContextSignal((I) => ({
|
|
3492
3503
|
...I,
|
|
3493
3504
|
rootState: S
|
|
3494
3505
|
}));
|
|
3495
3506
|
}
|
|
3496
|
-
function i(
|
|
3507
|
+
function i(b) {
|
|
3497
3508
|
var k, C, I, W, j;
|
|
3498
3509
|
const S = {
|
|
3499
3510
|
...e.builderContextSignal.content,
|
|
3500
|
-
...
|
|
3511
|
+
...b,
|
|
3501
3512
|
data: {
|
|
3502
3513
|
...(k = e.builderContextSignal.content) == null ? void 0 : k.data,
|
|
3503
|
-
...
|
|
3514
|
+
...b == null ? void 0 : b.data
|
|
3504
3515
|
},
|
|
3505
3516
|
meta: {
|
|
3506
3517
|
...(C = e.builderContextSignal.content) == null ? void 0 : C.meta,
|
|
3507
|
-
...
|
|
3508
|
-
breakpoints: ((I =
|
|
3518
|
+
...b == null ? void 0 : b.meta,
|
|
3519
|
+
breakpoints: ((I = b == null ? void 0 : b.meta) == null ? void 0 : I.breakpoints) || ((j = (W = e.builderContextSignal.content) == null ? void 0 : W.meta) == null ? void 0 : j.breakpoints)
|
|
3509
3520
|
}
|
|
3510
3521
|
};
|
|
3511
3522
|
e.setBuilderContextSignal((F) => ({
|
|
@@ -3522,8 +3533,8 @@ function Jn(e) {
|
|
|
3522
3533
|
const [a, r] = T(
|
|
3523
3534
|
() => e.contentWrapper || "div"
|
|
3524
3535
|
);
|
|
3525
|
-
function s(
|
|
3526
|
-
return
|
|
3536
|
+
function s(b) {
|
|
3537
|
+
return Ge({
|
|
3527
3538
|
model: e.model,
|
|
3528
3539
|
trustedHosts: e.trustedHosts,
|
|
3529
3540
|
callbacks: {
|
|
@@ -3537,19 +3548,19 @@ function Jn(e) {
|
|
|
3537
3548
|
});
|
|
3538
3549
|
},
|
|
3539
3550
|
animation: (S) => {
|
|
3540
|
-
|
|
3551
|
+
Fe(S);
|
|
3541
3552
|
},
|
|
3542
3553
|
contentUpdate: (S) => {
|
|
3543
3554
|
i(S);
|
|
3544
3555
|
}
|
|
3545
3556
|
}
|
|
3546
|
-
})(
|
|
3557
|
+
})(b);
|
|
3547
3558
|
}
|
|
3548
3559
|
function d() {
|
|
3549
3560
|
var S, k;
|
|
3550
|
-
const
|
|
3551
|
-
|
|
3552
|
-
code:
|
|
3561
|
+
const b = (k = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : k.jsCode;
|
|
3562
|
+
b && H({
|
|
3563
|
+
code: b,
|
|
3553
3564
|
context: e.context || {},
|
|
3554
3565
|
localState: void 0,
|
|
3555
3566
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -3560,8 +3571,8 @@ function Jn(e) {
|
|
|
3560
3571
|
enableCache: !1
|
|
3561
3572
|
});
|
|
3562
3573
|
}
|
|
3563
|
-
const [c,
|
|
3564
|
-
function
|
|
3574
|
+
const [c, u] = T(() => ({})), [g, m] = T(() => ({})), [x, h] = T(() => !1);
|
|
3575
|
+
function p(b) {
|
|
3565
3576
|
var S, k;
|
|
3566
3577
|
if (e.builderContextSignal.content) {
|
|
3567
3578
|
const C = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId, I = (k = e.builderContextSignal.content) == null ? void 0 : k.id;
|
|
@@ -3571,24 +3582,24 @@ function Jn(e) {
|
|
|
3571
3582
|
contentId: I,
|
|
3572
3583
|
apiKey: e.apiKey,
|
|
3573
3584
|
variationId: C !== I ? C : void 0,
|
|
3574
|
-
...jn(
|
|
3575
|
-
unique: !
|
|
3585
|
+
...jn(b),
|
|
3586
|
+
unique: !x
|
|
3576
3587
|
});
|
|
3577
3588
|
}
|
|
3578
|
-
|
|
3589
|
+
x || h(!0);
|
|
3579
3590
|
}
|
|
3580
|
-
function
|
|
3591
|
+
function f() {
|
|
3581
3592
|
var S, k, C;
|
|
3582
|
-
const
|
|
3583
|
-
Object.entries(
|
|
3584
|
-
if (!W ||
|
|
3593
|
+
const b = (C = (k = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : k.httpRequests) != null ? C : {};
|
|
3594
|
+
Object.entries(b).forEach(([I, W]) => {
|
|
3595
|
+
if (!W || g[I] || c[I] && !$())
|
|
3585
3596
|
return;
|
|
3586
|
-
|
|
3597
|
+
g[I] = !0;
|
|
3587
3598
|
const j = W.replace(
|
|
3588
3599
|
/{{([^}]+)}}/g,
|
|
3589
|
-
(F,
|
|
3600
|
+
(F, Ke) => String(
|
|
3590
3601
|
H({
|
|
3591
|
-
code:
|
|
3602
|
+
code: Ke,
|
|
3592
3603
|
context: e.context || {},
|
|
3593
3604
|
localState: void 0,
|
|
3594
3605
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -3597,18 +3608,18 @@ function Jn(e) {
|
|
|
3597
3608
|
})
|
|
3598
3609
|
)
|
|
3599
3610
|
);
|
|
3600
|
-
|
|
3611
|
+
Qe(j).then((F) => F.json()).then((F) => {
|
|
3601
3612
|
n({
|
|
3602
3613
|
[I]: F
|
|
3603
3614
|
}), c[I] = !0;
|
|
3604
3615
|
}).catch((F) => {
|
|
3605
3616
|
console.error("error fetching dynamic data", W, F);
|
|
3606
3617
|
}).finally(() => {
|
|
3607
|
-
|
|
3618
|
+
g[I] = !1;
|
|
3608
3619
|
});
|
|
3609
3620
|
});
|
|
3610
3621
|
}
|
|
3611
|
-
function
|
|
3622
|
+
function w() {
|
|
3612
3623
|
$() && window.dispatchEvent(
|
|
3613
3624
|
new CustomEvent(
|
|
3614
3625
|
"builder:component:stateChange",
|
|
@@ -3624,9 +3635,9 @@ function Jn(e) {
|
|
|
3624
3635
|
);
|
|
3625
3636
|
}
|
|
3626
3637
|
return B(() => {
|
|
3627
|
-
var
|
|
3638
|
+
var b, S;
|
|
3628
3639
|
if (Q()) {
|
|
3629
|
-
if ($() && (window.addEventListener("message", s),
|
|
3640
|
+
if ($() && (window.addEventListener("message", s), ze(), Je({
|
|
3630
3641
|
...e.locale ? {
|
|
3631
3642
|
locale: e.locale
|
|
3632
3643
|
} : {},
|
|
@@ -3640,13 +3651,13 @@ function Jn(e) {
|
|
|
3640
3651
|
e.builderContextSignal.componentInfos
|
|
3641
3652
|
).forEach((C) => {
|
|
3642
3653
|
var W;
|
|
3643
|
-
const I =
|
|
3654
|
+
const I = Ye(C);
|
|
3644
3655
|
(W = window.parent) == null || W.postMessage(I, "*");
|
|
3645
3656
|
}), window.addEventListener(
|
|
3646
3657
|
"builder:component:stateChangeListenerActivated",
|
|
3647
|
-
|
|
3658
|
+
w
|
|
3648
3659
|
)), e.builderContextSignal.content && X(e.canTrack)) {
|
|
3649
|
-
const C = (
|
|
3660
|
+
const C = (b = e.builderContextSignal.content) == null ? void 0 : b.testVariationId, I = (S = e.builderContextSignal.content) == null ? void 0 : S.id, W = e.apiKey;
|
|
3650
3661
|
he({
|
|
3651
3662
|
type: "impression",
|
|
3652
3663
|
canTrack: !0,
|
|
@@ -3655,11 +3666,11 @@ function Jn(e) {
|
|
|
3655
3666
|
variationId: C !== I ? C : void 0
|
|
3656
3667
|
});
|
|
3657
3668
|
}
|
|
3658
|
-
if (
|
|
3669
|
+
if (we() && !$()) {
|
|
3659
3670
|
const C = new URL(location.href).searchParams, I = C.get("builder.preview"), W = C.get(
|
|
3660
3671
|
`builder.overrides.${I}`
|
|
3661
3672
|
), j = C.get("apiKey") || C.get("builder.space");
|
|
3662
|
-
I === e.model && j === e.apiKey && (!e.content || W === e.content.id) &&
|
|
3673
|
+
I === e.model && j === e.apiKey && (!e.content || W === e.content.id) && Re({
|
|
3663
3674
|
model: e.model,
|
|
3664
3675
|
apiKey: e.apiKey,
|
|
3665
3676
|
apiVersion: e.builderContextSignal.apiVersion
|
|
@@ -3671,15 +3682,15 @@ function Jn(e) {
|
|
|
3671
3682
|
}, []), B(() => {
|
|
3672
3683
|
e.apiKey || Z.error(
|
|
3673
3684
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
3674
|
-
), d(),
|
|
3685
|
+
), d(), f(), w();
|
|
3675
3686
|
}, []), B(() => {
|
|
3676
3687
|
e.content && i(e.content);
|
|
3677
3688
|
}, [e.content]), B(() => {
|
|
3678
3689
|
d();
|
|
3679
|
-
}, [(A = (
|
|
3680
|
-
|
|
3690
|
+
}, [(A = (P = e.builderContextSignal.content) == null ? void 0 : P.data) == null ? void 0 : A.jsCode]), B(() => {
|
|
3691
|
+
f();
|
|
3681
3692
|
}, [(v = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : v.httpRequests]), B(() => {
|
|
3682
|
-
|
|
3693
|
+
w();
|
|
3683
3694
|
}, [e.builderContextSignal.rootState]), B(() => {
|
|
3684
3695
|
e.data && n(e.data);
|
|
3685
3696
|
}, [e.data]), B(() => {
|
|
@@ -3689,14 +3700,14 @@ function Jn(e) {
|
|
|
3689
3700
|
}, [e.locale]), B(() => () => {
|
|
3690
3701
|
Q() && (window.removeEventListener("message", s), window.removeEventListener(
|
|
3691
3702
|
"builder:component:stateChangeListenerActivated",
|
|
3692
|
-
|
|
3703
|
+
w
|
|
3693
3704
|
));
|
|
3694
3705
|
}, []), /* @__PURE__ */ l(me.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
|
|
3695
3706
|
a,
|
|
3696
3707
|
{
|
|
3697
3708
|
ref: t,
|
|
3698
|
-
onClick: (
|
|
3699
|
-
"builder-content-id": (
|
|
3709
|
+
onClick: (b) => p(b),
|
|
3710
|
+
"builder-content-id": (R = e.builderContextSignal.content) == null ? void 0 : R.id,
|
|
3700
3711
|
"builder-model": e.model,
|
|
3701
3712
|
...o(),
|
|
3702
3713
|
...e.contentWrapperProps,
|
|
@@ -3757,44 +3768,44 @@ const Gn = ({
|
|
|
3757
3768
|
},
|
|
3758
3769
|
meta: e == null ? void 0 : e.meta
|
|
3759
3770
|
} : void 0;
|
|
3760
|
-
function
|
|
3761
|
-
var d, c,
|
|
3771
|
+
function Ie(e) {
|
|
3772
|
+
var d, c, u, g, m, x, h;
|
|
3762
3773
|
const [t, n] = T(
|
|
3763
3774
|
() => {
|
|
3764
|
-
var
|
|
3775
|
+
var p, f;
|
|
3765
3776
|
return Ln({
|
|
3766
3777
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3767
|
-
variationId: (
|
|
3778
|
+
variationId: (p = e.content) == null ? void 0 : p.testVariationId,
|
|
3768
3779
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3769
|
-
contentId: (
|
|
3780
|
+
contentId: (f = e.content) == null ? void 0 : f.id
|
|
3770
3781
|
});
|
|
3771
3782
|
}
|
|
3772
3783
|
);
|
|
3773
|
-
function i(
|
|
3774
|
-
s((
|
|
3775
|
-
...
|
|
3776
|
-
rootState:
|
|
3784
|
+
function i(p) {
|
|
3785
|
+
s((f) => ({
|
|
3786
|
+
...f,
|
|
3787
|
+
rootState: p
|
|
3777
3788
|
}));
|
|
3778
3789
|
}
|
|
3779
3790
|
const [o, a] = T(
|
|
3780
3791
|
() => {
|
|
3781
|
-
var
|
|
3792
|
+
var p;
|
|
3782
3793
|
return [
|
|
3783
|
-
...
|
|
3784
|
-
...((
|
|
3794
|
+
...ke(),
|
|
3795
|
+
...((p = e.customComponents) == null ? void 0 : p.filter(({ models: f }) => !(f != null && f.length) || !e.model ? !0 : f.includes(e.model))) || []
|
|
3785
3796
|
].reduce(
|
|
3786
|
-
(
|
|
3787
|
-
...
|
|
3788
|
-
[
|
|
3789
|
-
component:
|
|
3790
|
-
...ge(
|
|
3797
|
+
(f, { component: w, ...P }) => ({
|
|
3798
|
+
...f,
|
|
3799
|
+
[P.name]: {
|
|
3800
|
+
component: w,
|
|
3801
|
+
...ge(P)
|
|
3791
3802
|
}
|
|
3792
3803
|
}),
|
|
3793
3804
|
{}
|
|
3794
3805
|
);
|
|
3795
3806
|
}
|
|
3796
3807
|
), [r, s] = T(() => {
|
|
3797
|
-
var
|
|
3808
|
+
var p;
|
|
3798
3809
|
return {
|
|
3799
3810
|
content: Qn({
|
|
3800
3811
|
content: e.content,
|
|
@@ -3812,12 +3823,12 @@ function Te(e) {
|
|
|
3812
3823
|
apiKey: e.apiKey,
|
|
3813
3824
|
apiVersion: e.apiVersion,
|
|
3814
3825
|
componentInfos: [
|
|
3815
|
-
...
|
|
3816
|
-
...((
|
|
3826
|
+
...ke(),
|
|
3827
|
+
...((p = e.customComponents) == null ? void 0 : p.filter(({ models: f }) => !(f != null && f.length) || !e.model ? !0 : f.includes(e.model))) || []
|
|
3817
3828
|
].reduce(
|
|
3818
|
-
(
|
|
3819
|
-
...
|
|
3820
|
-
[
|
|
3829
|
+
(f, { component: w, ...P }) => ({
|
|
3830
|
+
...f,
|
|
3831
|
+
[P.name]: ge(P)
|
|
3821
3832
|
}),
|
|
3822
3833
|
{}
|
|
3823
3834
|
),
|
|
@@ -3828,7 +3839,7 @@ function Te(e) {
|
|
|
3828
3839
|
};
|
|
3829
3840
|
});
|
|
3830
3841
|
return /* @__PURE__ */ l(
|
|
3831
|
-
|
|
3842
|
+
Ve.Provider,
|
|
3832
3843
|
{
|
|
3833
3844
|
value: {
|
|
3834
3845
|
registeredComponents: o
|
|
@@ -3866,14 +3877,14 @@ function Te(e) {
|
|
|
3866
3877
|
nonce: e.nonce || "",
|
|
3867
3878
|
isNestedRender: e.isNestedRender,
|
|
3868
3879
|
contentId: (d = r.content) == null ? void 0 : d.id,
|
|
3869
|
-
cssCode: (
|
|
3870
|
-
customFonts: (
|
|
3880
|
+
cssCode: (u = (c = r.content) == null ? void 0 : c.data) == null ? void 0 : u.cssCode,
|
|
3881
|
+
customFonts: (m = (g = r.content) == null ? void 0 : g.data) == null ? void 0 : m.customFonts
|
|
3871
3882
|
}
|
|
3872
3883
|
),
|
|
3873
3884
|
/* @__PURE__ */ l(
|
|
3874
3885
|
D,
|
|
3875
3886
|
{
|
|
3876
|
-
blocks: (
|
|
3887
|
+
blocks: (h = (x = r.content) == null ? void 0 : x.data) == null ? void 0 : h.blocks,
|
|
3877
3888
|
context: r,
|
|
3878
3889
|
registeredComponents: o,
|
|
3879
3890
|
linkComponent: e.linkComponent
|
|
@@ -3911,13 +3922,13 @@ function Xn(e) {
|
|
|
3911
3922
|
return t ? {
|
|
3912
3923
|
...e.content,
|
|
3913
3924
|
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
3914
|
-
} :
|
|
3925
|
+
} : Xe({
|
|
3915
3926
|
item: e.content,
|
|
3916
3927
|
canTrack: X(e.canTrack)
|
|
3917
3928
|
});
|
|
3918
3929
|
}
|
|
3919
3930
|
return B(() => {
|
|
3920
|
-
}, []), /* @__PURE__ */ V(
|
|
3931
|
+
}, []), /* @__PURE__ */ V(E, { children: [
|
|
3921
3932
|
!e.isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(
|
|
3922
3933
|
ce,
|
|
3923
3934
|
{
|
|
@@ -3926,7 +3937,7 @@ function Xn(e) {
|
|
|
3926
3937
|
nonce: e.nonce || ""
|
|
3927
3938
|
}
|
|
3928
3939
|
) : null,
|
|
3929
|
-
t ? /* @__PURE__ */ V(
|
|
3940
|
+
t ? /* @__PURE__ */ V(E, { children: [
|
|
3930
3941
|
/* @__PURE__ */ l(
|
|
3931
3942
|
te,
|
|
3932
3943
|
{
|
|
@@ -3944,7 +3955,7 @@ function Xn(e) {
|
|
|
3944
3955
|
}
|
|
3945
3956
|
),
|
|
3946
3957
|
(r = Y(e.content)) == null ? void 0 : r.map((s) => /* @__PURE__ */ l(
|
|
3947
|
-
|
|
3958
|
+
Ie,
|
|
3948
3959
|
{
|
|
3949
3960
|
isNestedRender: e.isNestedRender,
|
|
3950
3961
|
nonce: e.nonce,
|
|
@@ -3971,7 +3982,7 @@ function Xn(e) {
|
|
|
3971
3982
|
))
|
|
3972
3983
|
] }) : null,
|
|
3973
3984
|
/* @__PURE__ */ l(
|
|
3974
|
-
|
|
3985
|
+
Ie,
|
|
3975
3986
|
{
|
|
3976
3987
|
nonce: e.nonce,
|
|
3977
3988
|
isNestedRender: e.isNestedRender,
|
|
@@ -4003,7 +4014,7 @@ const Zn = async ({
|
|
|
4003
4014
|
}) => {
|
|
4004
4015
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4005
4016
|
(e != null && e.apiKey))
|
|
4006
|
-
return
|
|
4017
|
+
return Re({
|
|
4007
4018
|
model: t.model,
|
|
4008
4019
|
apiKey: e.apiKey,
|
|
4009
4020
|
apiVersion: e.apiVersion,
|
|
@@ -4017,7 +4028,7 @@ const Zn = async ({
|
|
|
4017
4028
|
});
|
|
4018
4029
|
};
|
|
4019
4030
|
function ei(e) {
|
|
4020
|
-
var s, d, c,
|
|
4031
|
+
var s, d, c, u;
|
|
4021
4032
|
function t() {
|
|
4022
4033
|
return "div";
|
|
4023
4034
|
}
|
|
@@ -4025,24 +4036,24 @@ function ei(e) {
|
|
|
4025
4036
|
return "div";
|
|
4026
4037
|
}
|
|
4027
4038
|
function i() {
|
|
4028
|
-
var
|
|
4039
|
+
var g, m;
|
|
4029
4040
|
return [
|
|
4030
4041
|
e.attributes[q()],
|
|
4031
4042
|
"builder-symbol",
|
|
4032
|
-
(
|
|
4033
|
-
(
|
|
4043
|
+
(g = e.symbol) != null && g.inline ? "builder-inline-symbol" : void 0,
|
|
4044
|
+
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
4034
4045
|
].filter(Boolean).join(" ");
|
|
4035
4046
|
}
|
|
4036
4047
|
const [o, a] = T(() => {
|
|
4037
|
-
var
|
|
4038
|
-
return (
|
|
4048
|
+
var g;
|
|
4049
|
+
return (g = e.symbol) == null ? void 0 : g.content;
|
|
4039
4050
|
});
|
|
4040
4051
|
function r() {
|
|
4041
4052
|
o || Zn({
|
|
4042
4053
|
symbol: e.symbol,
|
|
4043
4054
|
builderContextValue: e.builderContext
|
|
4044
|
-
}).then((
|
|
4045
|
-
|
|
4055
|
+
}).then((g) => {
|
|
4056
|
+
g && a(g);
|
|
4046
4057
|
});
|
|
4047
4058
|
}
|
|
4048
4059
|
return B(() => {
|
|
@@ -4066,7 +4077,7 @@ function ei(e) {
|
|
|
4066
4077
|
...(c = o == null ? void 0 : o.data) == null ? void 0 : c.state
|
|
4067
4078
|
},
|
|
4068
4079
|
canTrack: e.builderContext.canTrack,
|
|
4069
|
-
model: (
|
|
4080
|
+
model: (u = e.symbol) == null ? void 0 : u.model,
|
|
4070
4081
|
content: o,
|
|
4071
4082
|
linkComponent: e.builderLinkComponent,
|
|
4072
4083
|
blocksWrapper: t(),
|
|
@@ -4077,7 +4088,7 @@ function ei(e) {
|
|
|
4077
4088
|
export {
|
|
4078
4089
|
D as Blocks,
|
|
4079
4090
|
me as BuilderContext,
|
|
4080
|
-
|
|
4091
|
+
at as Button,
|
|
4081
4092
|
jt as Columns,
|
|
4082
4093
|
Xn as Content,
|
|
4083
4094
|
Mt as Fragment,
|