@builder.io/sdk-react 0.7.3 → 0.7.5
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/index.cjs +115 -23
- package/lib/browser/index.mjs +828 -763
- package/lib/edge/index.cjs +121 -29
- package/lib/edge/index.mjs +1098 -1033
- package/lib/node/index.cjs +104 -12
- package/lib/node/index.mjs +499 -434
- package/package.json +8 -1
- package/types/blocks/video/video.d.ts +4 -0
- package/types/components/content/content.helpers.d.ts +1 -1
- package/types/components/content/content.types.d.ts +0 -4
- package/types/components/content-variants/helpers.d.ts +3 -3
- package/types/components/content-variants/inlined-fns.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
package/lib/browser/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { i as
|
|
5
|
-
import { _ as
|
|
2
|
+
import { jsxs as T, Fragment as f, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as pe, useState as p, useContext as le, createElement as ke, useRef as Z, useEffect as P } from "react";
|
|
4
|
+
import { i as $, j as N, k as $e, l as M, m as ee, n as G, T as L, r as Ne, o as U, p as ce, a as Fe, c as We, b as Ce, q as _e, u as se, v as de, w as Le } from "./server-entry-0aebe4be.mjs";
|
|
5
|
+
import { _ as sn, h as dn, f as un, g as mn, e as fn, d as hn, s as gn, t as bn } from "./server-entry-0aebe4be.mjs";
|
|
6
6
|
function je(e) {
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
e.link ? /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
8
|
+
e.link ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
9
9
|
"a",
|
|
10
10
|
{
|
|
11
11
|
...e.attributes,
|
|
@@ -14,7 +14,7 @@ function je(e) {
|
|
|
14
14
|
role: "button",
|
|
15
15
|
children: e.text
|
|
16
16
|
}
|
|
17
|
-
) }) : /* @__PURE__ */
|
|
17
|
+
) }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
18
18
|
"button",
|
|
19
19
|
{
|
|
20
20
|
...e.attributes,
|
|
@@ -23,12 +23,12 @@ function je(e) {
|
|
|
23
23
|
children: e.text
|
|
24
24
|
}
|
|
25
25
|
) }),
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ r("style", { children: `.button-5294b10c {
|
|
27
27
|
all: unset;
|
|
28
28
|
}` })
|
|
29
29
|
] });
|
|
30
30
|
}
|
|
31
|
-
const te =
|
|
31
|
+
const te = pe({
|
|
32
32
|
content: null,
|
|
33
33
|
context: {},
|
|
34
34
|
localState: void 0,
|
|
@@ -39,7 +39,7 @@ const te = Se({
|
|
|
39
39
|
apiVersion: void 0,
|
|
40
40
|
componentInfos: {},
|
|
41
41
|
inheritedStyles: {}
|
|
42
|
-
}),
|
|
42
|
+
}), we = pe({ registeredComponents: {} });
|
|
43
43
|
function Me(e) {
|
|
44
44
|
var t;
|
|
45
45
|
return {
|
|
@@ -51,7 +51,7 @@ function Me(e) {
|
|
|
51
51
|
builderBlock: e
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const Ue = ({
|
|
55
55
|
builder: e,
|
|
56
56
|
context: t,
|
|
57
57
|
event: n,
|
|
@@ -63,148 +63,148 @@ const Le = ({
|
|
|
63
63
|
builder: e,
|
|
64
64
|
context: t,
|
|
65
65
|
event: n
|
|
66
|
-
}),
|
|
67
|
-
isEditing:
|
|
68
|
-
isBrowser:
|
|
69
|
-
isServer: !
|
|
66
|
+
}), De = () => ({
|
|
67
|
+
isEditing: $(),
|
|
68
|
+
isBrowser: N(),
|
|
69
|
+
isServer: !N(),
|
|
70
70
|
getUserAttributes: () => $e()
|
|
71
|
-
}),
|
|
71
|
+
}), Oe = (e, {
|
|
72
72
|
isExpression: t = !0
|
|
73
|
-
}) => /* 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,
|
|
73
|
+
}) => /* 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, ue = ({
|
|
74
74
|
code: e,
|
|
75
75
|
builder: t,
|
|
76
76
|
context: n,
|
|
77
77
|
event: i,
|
|
78
|
-
localState:
|
|
79
|
-
rootSetState:
|
|
80
|
-
rootState:
|
|
78
|
+
localState: a,
|
|
79
|
+
rootSetState: o,
|
|
80
|
+
rootState: l
|
|
81
81
|
}) => {
|
|
82
|
-
const
|
|
82
|
+
const s = Ue({
|
|
83
83
|
builder: t,
|
|
84
84
|
context: n,
|
|
85
85
|
event: i,
|
|
86
|
-
state:
|
|
86
|
+
state: Ke(l, a, o)
|
|
87
87
|
});
|
|
88
|
-
return new Function(...
|
|
88
|
+
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
89
89
|
};
|
|
90
|
-
function
|
|
90
|
+
function Ke(e, t, n) {
|
|
91
91
|
if (e === t)
|
|
92
92
|
throw new Error("rootState === localState");
|
|
93
93
|
return new Proxy(e, {
|
|
94
|
-
get: (i,
|
|
95
|
-
set: (i,
|
|
96
|
-
if (t &&
|
|
94
|
+
get: (i, a) => t && a in t ? t[a] : e[a],
|
|
95
|
+
set: (i, a, o) => {
|
|
96
|
+
if (t && a in t)
|
|
97
97
|
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
98
|
-
return e[
|
|
98
|
+
return e[a] = o, n == null || n(e), !0;
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
function
|
|
102
|
+
const He = (e) => (N(), ue(e));
|
|
103
|
+
function _({
|
|
104
104
|
code: e,
|
|
105
105
|
context: t,
|
|
106
106
|
localState: n,
|
|
107
107
|
rootState: i,
|
|
108
|
-
rootSetState:
|
|
109
|
-
event:
|
|
110
|
-
isExpression:
|
|
108
|
+
rootSetState: a,
|
|
109
|
+
event: o,
|
|
110
|
+
isExpression: l = !0
|
|
111
111
|
}) {
|
|
112
112
|
if (e === "") {
|
|
113
|
-
|
|
113
|
+
M.warn("Skipping evaluation of empty code block.");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
117
|
-
code:
|
|
118
|
-
isExpression:
|
|
116
|
+
const s = {
|
|
117
|
+
code: Oe(e, {
|
|
118
|
+
isExpression: l
|
|
119
119
|
}),
|
|
120
|
-
builder:
|
|
120
|
+
builder: De(),
|
|
121
121
|
context: t,
|
|
122
|
-
event:
|
|
123
|
-
rootSetState:
|
|
122
|
+
event: o,
|
|
123
|
+
rootSetState: a,
|
|
124
124
|
rootState: i,
|
|
125
125
|
localState: n
|
|
126
126
|
};
|
|
127
127
|
try {
|
|
128
|
-
return
|
|
128
|
+
return He(s);
|
|
129
129
|
} catch (c) {
|
|
130
|
-
|
|
130
|
+
M.error("Failed code evaluation: " + c.message, {
|
|
131
131
|
code: e
|
|
132
132
|
});
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const ze = (e, t, n) => {
|
|
137
137
|
if (Object(e) !== e)
|
|
138
138
|
return e;
|
|
139
139
|
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
140
|
-
return i.slice(0, -1).reduce((
|
|
140
|
+
return i.slice(0, -1).reduce((a, o, l) => Object(a[o]) === a[o] ? a[o] : a[o] = Math.abs(Number(i[l + 1])) >> 0 === +i[l + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
141
141
|
};
|
|
142
|
-
const
|
|
142
|
+
const qe = ({
|
|
143
143
|
block: e,
|
|
144
144
|
context: t,
|
|
145
145
|
localState: n,
|
|
146
146
|
rootState: i,
|
|
147
|
-
rootSetState:
|
|
147
|
+
rootSetState: a
|
|
148
148
|
}) => {
|
|
149
149
|
if (!e.bindings)
|
|
150
150
|
return e;
|
|
151
|
-
const
|
|
152
|
-
...
|
|
151
|
+
const o = ee(e), l = {
|
|
152
|
+
...o,
|
|
153
153
|
properties: {
|
|
154
|
-
...
|
|
154
|
+
...o.properties
|
|
155
155
|
},
|
|
156
156
|
actions: {
|
|
157
|
-
...
|
|
157
|
+
...o.actions
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
for (const
|
|
161
|
-
const c = e.bindings[
|
|
160
|
+
for (const s in e.bindings) {
|
|
161
|
+
const c = e.bindings[s], d = _({
|
|
162
162
|
code: c,
|
|
163
163
|
localState: n,
|
|
164
164
|
rootState: i,
|
|
165
|
-
rootSetState:
|
|
165
|
+
rootSetState: a,
|
|
166
166
|
context: t
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
ze(l, s, d);
|
|
169
169
|
}
|
|
170
|
-
return
|
|
170
|
+
return l;
|
|
171
171
|
};
|
|
172
|
-
function
|
|
172
|
+
function D({
|
|
173
173
|
block: e,
|
|
174
174
|
context: t,
|
|
175
175
|
shouldEvaluateBindings: n,
|
|
176
176
|
localState: i,
|
|
177
|
-
rootState:
|
|
178
|
-
rootSetState:
|
|
177
|
+
rootState: a,
|
|
178
|
+
rootSetState: o
|
|
179
179
|
}) {
|
|
180
|
-
const
|
|
181
|
-
return n ?
|
|
182
|
-
block:
|
|
180
|
+
const l = e;
|
|
181
|
+
return n ? qe({
|
|
182
|
+
block: l,
|
|
183
183
|
localState: i,
|
|
184
|
-
rootState:
|
|
185
|
-
rootSetState:
|
|
184
|
+
rootState: a,
|
|
185
|
+
rootSetState: o,
|
|
186
186
|
context: t
|
|
187
|
-
}) :
|
|
187
|
+
}) : l;
|
|
188
188
|
}
|
|
189
|
-
const
|
|
189
|
+
const Ye = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], q = (e) => typeof e == "string" && Ye.includes(e.toLowerCase()), Qe = ({
|
|
190
190
|
block: e,
|
|
191
191
|
context: t,
|
|
192
192
|
registeredComponents: n
|
|
193
193
|
}) => {
|
|
194
|
-
var
|
|
195
|
-
const i = (
|
|
194
|
+
var o;
|
|
195
|
+
const i = (o = D({
|
|
196
196
|
block: e,
|
|
197
197
|
localState: t.localState,
|
|
198
198
|
rootState: t.rootState,
|
|
199
199
|
rootSetState: t.rootSetState,
|
|
200
200
|
context: t.context,
|
|
201
201
|
shouldEvaluateBindings: !1
|
|
202
|
-
}).component) == null ? void 0 :
|
|
202
|
+
}).component) == null ? void 0 : o.name;
|
|
203
203
|
if (!i)
|
|
204
204
|
return null;
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
return
|
|
205
|
+
const a = n[i];
|
|
206
|
+
if (a)
|
|
207
|
+
return a;
|
|
208
208
|
console.warn(`
|
|
209
209
|
Could not find a registered component named "${i}".
|
|
210
210
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
@@ -218,30 +218,30 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
218
218
|
} = e;
|
|
219
219
|
if (!(n != null && n.collection))
|
|
220
220
|
return;
|
|
221
|
-
const
|
|
221
|
+
const a = _({
|
|
222
222
|
code: n.collection,
|
|
223
223
|
localState: t.localState,
|
|
224
224
|
rootState: t.rootState,
|
|
225
225
|
rootSetState: t.rootSetState,
|
|
226
226
|
context: t.context
|
|
227
227
|
});
|
|
228
|
-
if (!Array.isArray(
|
|
228
|
+
if (!Array.isArray(a))
|
|
229
229
|
return;
|
|
230
|
-
const
|
|
231
|
-
return
|
|
230
|
+
const o = n.collection.split(".").pop(), l = n.itemName || (o ? o + "Item" : "item");
|
|
231
|
+
return a.map((c, d) => ({
|
|
232
232
|
context: {
|
|
233
233
|
...t,
|
|
234
234
|
localState: {
|
|
235
235
|
...t.localState,
|
|
236
236
|
$index: d,
|
|
237
237
|
$item: c,
|
|
238
|
-
[
|
|
239
|
-
[`$${
|
|
238
|
+
[l]: c,
|
|
239
|
+
[`$${l}Index`]: d
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
block: i
|
|
243
243
|
}));
|
|
244
|
-
},
|
|
244
|
+
}, Ie = {
|
|
245
245
|
small: {
|
|
246
246
|
min: 320,
|
|
247
247
|
default: 321,
|
|
@@ -257,11 +257,11 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
257
257
|
default: 991,
|
|
258
258
|
max: 1200
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, me = (e, t = Ie) => `@media (max-width: ${t[e].max}px)`, Te = ({
|
|
261
261
|
small: e,
|
|
262
262
|
medium: t
|
|
263
263
|
}) => {
|
|
264
|
-
const n = ee(
|
|
264
|
+
const n = ee(Ie);
|
|
265
265
|
if (!e || !t)
|
|
266
266
|
return n;
|
|
267
267
|
const i = Math.floor(e / 2);
|
|
@@ -270,41 +270,41 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
270
270
|
min: i,
|
|
271
271
|
default: i + 1
|
|
272
272
|
};
|
|
273
|
-
const
|
|
273
|
+
const a = n.small.max + 1;
|
|
274
274
|
n.medium = {
|
|
275
275
|
max: t,
|
|
276
|
-
min:
|
|
277
|
-
default:
|
|
276
|
+
min: a,
|
|
277
|
+
default: a + 1
|
|
278
278
|
};
|
|
279
|
-
const
|
|
279
|
+
const o = n.medium.max + 1;
|
|
280
280
|
return n.large = {
|
|
281
281
|
max: 2e3,
|
|
282
282
|
// TODO: decide upper limit
|
|
283
|
-
min:
|
|
284
|
-
default:
|
|
283
|
+
min: o,
|
|
284
|
+
default: o + 1
|
|
285
285
|
}, n;
|
|
286
|
-
}, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(),
|
|
286
|
+
}, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
|
|
287
287
|
if (typeof i == "string")
|
|
288
288
|
return `${Je(n)}: ${i};`;
|
|
289
|
-
}).filter(
|
|
290
|
-
`),
|
|
289
|
+
}).filter(G), Xe = (e) => Re(e).join(`
|
|
290
|
+
`), Y = ({
|
|
291
291
|
mediaQuery: e,
|
|
292
292
|
className: t,
|
|
293
293
|
styles: n
|
|
294
294
|
}) => {
|
|
295
295
|
const i = `.${t} {
|
|
296
|
-
${
|
|
296
|
+
${Xe(n)}
|
|
297
297
|
}`;
|
|
298
298
|
return e ? `${e} {
|
|
299
299
|
${i}
|
|
300
300
|
}` : i;
|
|
301
301
|
};
|
|
302
|
-
function
|
|
303
|
-
return /* @__PURE__ */
|
|
302
|
+
function K(e) {
|
|
303
|
+
return /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
304
304
|
}
|
|
305
305
|
function ne(e) {
|
|
306
306
|
function t() {
|
|
307
|
-
const i =
|
|
307
|
+
const i = D({
|
|
308
308
|
block: e.block,
|
|
309
309
|
localState: e.context.localState,
|
|
310
310
|
rootState: e.context.rootState,
|
|
@@ -312,48 +312,48 @@ function ne(e) {
|
|
|
312
312
|
context: e.context.context,
|
|
313
313
|
shouldEvaluateBindings: !0
|
|
314
314
|
});
|
|
315
|
-
return
|
|
315
|
+
return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
|
|
316
316
|
}
|
|
317
317
|
function n() {
|
|
318
318
|
var b;
|
|
319
|
-
const i =
|
|
319
|
+
const i = D({
|
|
320
320
|
block: e.block,
|
|
321
321
|
localState: e.context.localState,
|
|
322
322
|
rootState: e.context.rootState,
|
|
323
323
|
rootSetState: e.context.rootSetState,
|
|
324
324
|
context: e.context.context,
|
|
325
325
|
shouldEvaluateBindings: !0
|
|
326
|
-
}),
|
|
327
|
-
((b =
|
|
328
|
-
),
|
|
326
|
+
}), a = i.responsiveStyles, o = e.context.content, l = Te(
|
|
327
|
+
((b = o == null ? void 0 : o.meta) == null ? void 0 : b.breakpoints) || {}
|
|
328
|
+
), s = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, d = a == null ? void 0 : a.small, u = i.id;
|
|
329
329
|
if (!u)
|
|
330
330
|
return "";
|
|
331
|
-
const
|
|
331
|
+
const g = s ? Y({
|
|
332
332
|
className: u,
|
|
333
|
-
styles:
|
|
334
|
-
}) : "",
|
|
333
|
+
styles: s
|
|
334
|
+
}) : "", v = c ? Y({
|
|
335
335
|
className: u,
|
|
336
336
|
styles: c,
|
|
337
|
-
mediaQuery:
|
|
337
|
+
mediaQuery: me(
|
|
338
338
|
"medium",
|
|
339
|
-
|
|
339
|
+
l
|
|
340
340
|
)
|
|
341
|
-
}) : "",
|
|
341
|
+
}) : "", V = d ? Y({
|
|
342
342
|
className: u,
|
|
343
343
|
styles: d,
|
|
344
|
-
mediaQuery:
|
|
344
|
+
mediaQuery: me(
|
|
345
345
|
"small",
|
|
346
|
-
|
|
346
|
+
l
|
|
347
347
|
)
|
|
348
348
|
}) : "";
|
|
349
|
-
return [
|
|
349
|
+
return [g, v, V].join(" ");
|
|
350
350
|
}
|
|
351
|
-
return /* @__PURE__ */
|
|
351
|
+
return /* @__PURE__ */ r(f, { children: n() && t() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: n() }) }) : null });
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Ze(e) {
|
|
354
354
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const et = (e) => `on${Ze(e)}`, tt = (e, t) => (n) => _({
|
|
357
357
|
code: e,
|
|
358
358
|
context: t.context,
|
|
359
359
|
localState: t.localState,
|
|
@@ -362,54 +362,54 @@ const Xe = (e) => `on${Qe(e)}`, Ze = (e, t) => (n) => j({
|
|
|
362
362
|
event: n,
|
|
363
363
|
isExpression: !1
|
|
364
364
|
});
|
|
365
|
-
function
|
|
365
|
+
function J(e) {
|
|
366
366
|
const t = {}, n = e.block.actions ?? {};
|
|
367
367
|
for (const i in n) {
|
|
368
368
|
if (!n.hasOwnProperty(i))
|
|
369
369
|
continue;
|
|
370
|
-
const
|
|
371
|
-
let
|
|
370
|
+
const a = n[i];
|
|
371
|
+
let o = et(i);
|
|
372
372
|
if (e.stripPrefix)
|
|
373
|
-
switch (
|
|
373
|
+
switch (L) {
|
|
374
374
|
case "vue2":
|
|
375
375
|
case "vue3":
|
|
376
|
-
|
|
376
|
+
o = o.replace("v-on:", "");
|
|
377
377
|
break;
|
|
378
378
|
case "svelte":
|
|
379
|
-
|
|
379
|
+
o = o.replace("on:", "");
|
|
380
380
|
break;
|
|
381
381
|
}
|
|
382
|
-
t[
|
|
382
|
+
t[o] = tt(a, e);
|
|
383
383
|
}
|
|
384
384
|
return t;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function nt(e) {
|
|
387
387
|
return e.className = e.class, delete e.class, e;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
389
|
+
const it = (e) => ({
|
|
390
390
|
href: e.href
|
|
391
391
|
});
|
|
392
|
-
function
|
|
392
|
+
function O({
|
|
393
393
|
block: e,
|
|
394
394
|
context: t
|
|
395
395
|
}) {
|
|
396
396
|
var i;
|
|
397
397
|
const n = {
|
|
398
|
-
...
|
|
398
|
+
...it(e),
|
|
399
399
|
...e.properties,
|
|
400
400
|
"builder-id": e.id,
|
|
401
|
-
style: e.style ?
|
|
401
|
+
style: e.style ? at(e.style) : void 0,
|
|
402
402
|
class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
403
403
|
};
|
|
404
|
-
return
|
|
404
|
+
return nt(n);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
switch (
|
|
406
|
+
function at(e) {
|
|
407
|
+
switch (L) {
|
|
408
408
|
case "svelte":
|
|
409
409
|
case "vue2":
|
|
410
410
|
case "vue3":
|
|
411
411
|
case "solid":
|
|
412
|
-
return
|
|
412
|
+
return Re(e).join(" ");
|
|
413
413
|
case "qwik":
|
|
414
414
|
case "reactNative":
|
|
415
415
|
case "react":
|
|
@@ -417,17 +417,17 @@ function nt(e) {
|
|
|
417
417
|
return e;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
return /* @__PURE__ */
|
|
420
|
+
function fe(e) {
|
|
421
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
422
422
|
" ",
|
|
423
|
-
e.hasChildren ? /* @__PURE__ */
|
|
423
|
+
e.hasChildren ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
|
|
424
424
|
e.Wrapper,
|
|
425
425
|
{
|
|
426
|
-
...
|
|
426
|
+
...O({
|
|
427
427
|
block: e.block,
|
|
428
428
|
context: e.context
|
|
429
429
|
}),
|
|
430
|
-
...
|
|
430
|
+
...J({
|
|
431
431
|
block: e.block,
|
|
432
432
|
rootState: e.context.rootState,
|
|
433
433
|
rootSetState: e.context.rootSetState,
|
|
@@ -441,14 +441,14 @@ function ue(e) {
|
|
|
441
441
|
" "
|
|
442
442
|
]
|
|
443
443
|
}
|
|
444
|
-
) }) : /* @__PURE__ */
|
|
444
|
+
) }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
445
445
|
e.Wrapper,
|
|
446
446
|
{
|
|
447
|
-
...
|
|
447
|
+
...O({
|
|
448
448
|
block: e.block,
|
|
449
449
|
context: e.context
|
|
450
450
|
}),
|
|
451
|
-
...
|
|
451
|
+
...J({
|
|
452
452
|
block: e.block,
|
|
453
453
|
rootState: e.context.rootState,
|
|
454
454
|
rootSetState: e.context.rootSetState,
|
|
@@ -461,17 +461,17 @@ function ue(e) {
|
|
|
461
461
|
" "
|
|
462
462
|
] });
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
return /* @__PURE__ */
|
|
464
|
+
function ot(e) {
|
|
465
|
+
return /* @__PURE__ */ r(
|
|
466
466
|
e.Wrapper,
|
|
467
467
|
{
|
|
468
468
|
...e.wrapperProps,
|
|
469
469
|
attributes: {
|
|
470
|
-
...
|
|
470
|
+
...O({
|
|
471
471
|
block: e.block,
|
|
472
472
|
context: e.context
|
|
473
473
|
}),
|
|
474
|
-
...
|
|
474
|
+
...J({
|
|
475
475
|
block: e.block,
|
|
476
476
|
rootState: e.context.rootState,
|
|
477
477
|
rootSetState: e.context.rootSetState,
|
|
@@ -483,15 +483,15 @@ function it(e) {
|
|
|
483
483
|
}
|
|
484
484
|
);
|
|
485
485
|
}
|
|
486
|
-
const
|
|
486
|
+
const rt = ({
|
|
487
487
|
componentOptions: e,
|
|
488
488
|
builderBlock: t,
|
|
489
489
|
context: n,
|
|
490
490
|
componentRef: i,
|
|
491
|
-
includeBlockProps:
|
|
492
|
-
isInteractive:
|
|
493
|
-
contextValue:
|
|
494
|
-
}) =>
|
|
491
|
+
includeBlockProps: a,
|
|
492
|
+
isInteractive: o,
|
|
493
|
+
contextValue: l
|
|
494
|
+
}) => o ? {
|
|
495
495
|
Wrapper: i,
|
|
496
496
|
block: t,
|
|
497
497
|
context: n,
|
|
@@ -502,22 +502,22 @@ const ot = ({
|
|
|
502
502
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
503
503
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
504
504
|
*/
|
|
505
|
-
...
|
|
506
|
-
attributes:
|
|
505
|
+
...a ? {
|
|
506
|
+
attributes: O({
|
|
507
507
|
block: t,
|
|
508
|
-
context:
|
|
508
|
+
context: l
|
|
509
509
|
})
|
|
510
510
|
} : {}
|
|
511
511
|
};
|
|
512
|
-
function
|
|
513
|
-
var i,
|
|
514
|
-
const [t, n] =
|
|
515
|
-
() => e.isInteractive ?
|
|
512
|
+
function he(e) {
|
|
513
|
+
var i, a;
|
|
514
|
+
const [t, n] = p(
|
|
515
|
+
() => e.isInteractive ? ot : e.componentRef
|
|
516
516
|
);
|
|
517
|
-
return /* @__PURE__ */
|
|
517
|
+
return /* @__PURE__ */ r(f, { children: e.componentRef ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
|
|
518
518
|
t,
|
|
519
519
|
{
|
|
520
|
-
...
|
|
520
|
+
...rt({
|
|
521
521
|
componentOptions: e.componentOptions,
|
|
522
522
|
builderBlock: e.builderBlock,
|
|
523
523
|
context: e.context,
|
|
@@ -527,31 +527,31 @@ function me(e) {
|
|
|
527
527
|
contextValue: e.context
|
|
528
528
|
}),
|
|
529
529
|
children: [
|
|
530
|
-
(i = e.blockChildren) == null ? void 0 : i.map((
|
|
531
|
-
|
|
530
|
+
(i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
|
|
531
|
+
H,
|
|
532
532
|
{
|
|
533
|
-
block:
|
|
533
|
+
block: o,
|
|
534
534
|
context: e.context,
|
|
535
535
|
registeredComponents: e.registeredComponents
|
|
536
536
|
},
|
|
537
|
-
"block-" +
|
|
537
|
+
"block-" + o.id
|
|
538
538
|
)),
|
|
539
|
-
(
|
|
539
|
+
(a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
|
|
540
540
|
ne,
|
|
541
541
|
{
|
|
542
|
-
block:
|
|
542
|
+
block: o,
|
|
543
543
|
context: e.context
|
|
544
544
|
},
|
|
545
|
-
"block-style-" +
|
|
545
|
+
"block-style-" + o.id
|
|
546
546
|
))
|
|
547
547
|
]
|
|
548
548
|
}
|
|
549
549
|
) }) : null });
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
const [t, n] =
|
|
553
|
-
return /* @__PURE__ */
|
|
554
|
-
|
|
551
|
+
function lt(e) {
|
|
552
|
+
const [t, n] = p(() => e.repeatContext);
|
|
553
|
+
return /* @__PURE__ */ r(te.Provider, { value: t, children: /* @__PURE__ */ r(
|
|
554
|
+
H,
|
|
555
555
|
{
|
|
556
556
|
block: e.block,
|
|
557
557
|
context: t,
|
|
@@ -559,10 +559,10 @@ function at(e) {
|
|
|
559
559
|
}
|
|
560
560
|
) });
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
var u,
|
|
562
|
+
function H(e) {
|
|
563
|
+
var u, g, v, V;
|
|
564
564
|
function t() {
|
|
565
|
-
return
|
|
565
|
+
return Qe({
|
|
566
566
|
block: e.block,
|
|
567
567
|
context: e.context,
|
|
568
568
|
registeredComponents: e.registeredComponents
|
|
@@ -575,7 +575,8 @@ function z(e) {
|
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
577
|
function i() {
|
|
578
|
-
|
|
578
|
+
var b;
|
|
579
|
+
return (b = e.block.repeat) != null && b.collection ? e.block : D({
|
|
579
580
|
block: e.block,
|
|
580
581
|
localState: e.context.localState,
|
|
581
582
|
rootState: e.context.rootState,
|
|
@@ -584,60 +585,61 @@ function z(e) {
|
|
|
584
585
|
shouldEvaluateBindings: !0
|
|
585
586
|
});
|
|
586
587
|
}
|
|
587
|
-
function
|
|
588
|
+
function a() {
|
|
588
589
|
return e.block.tagName || "div";
|
|
589
590
|
}
|
|
590
|
-
function
|
|
591
|
-
|
|
591
|
+
function o() {
|
|
592
|
+
var b, S;
|
|
593
|
+
return "hide" in i() ? !i().hide : "show" in i() ? i().show : !((b = e.block.repeat) != null && b.collection && !((S = n == null ? void 0 : n()) != null && S.length));
|
|
592
594
|
}
|
|
593
|
-
function
|
|
595
|
+
function l() {
|
|
594
596
|
var S;
|
|
595
597
|
return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
|
|
596
598
|
}
|
|
597
|
-
function
|
|
598
|
-
var b, S,
|
|
599
|
+
function s() {
|
|
600
|
+
var b, S, E, R, C;
|
|
599
601
|
return {
|
|
600
602
|
blockChildren: i().children ?? [],
|
|
601
603
|
componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
|
|
602
604
|
componentOptions: {
|
|
603
605
|
...Me(i()),
|
|
604
606
|
builderContext: e.context,
|
|
605
|
-
...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((
|
|
607
|
+
...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
|
|
606
608
|
builderComponents: e.registeredComponents
|
|
607
609
|
} : {}
|
|
608
610
|
},
|
|
609
611
|
context: c,
|
|
610
612
|
registeredComponents: e.registeredComponents,
|
|
611
613
|
builderBlock: i(),
|
|
612
|
-
includeBlockProps: ((
|
|
613
|
-
isInteractive: !((
|
|
614
|
+
includeBlockProps: ((R = t == null ? void 0 : t()) == null ? void 0 : R.noWrap) === !0,
|
|
615
|
+
isInteractive: !((C = t == null ? void 0 : t()) != null && C.isRSC)
|
|
614
616
|
};
|
|
615
617
|
}
|
|
616
|
-
const [c, d] =
|
|
617
|
-
return /* @__PURE__ */
|
|
618
|
-
|
|
618
|
+
const [c, d] = p(() => e.context);
|
|
619
|
+
return /* @__PURE__ */ r(f, { children: o() ? /* @__PURE__ */ r(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
620
|
+
he,
|
|
619
621
|
{
|
|
620
|
-
componentRef:
|
|
621
|
-
componentOptions:
|
|
622
|
-
blockChildren:
|
|
623
|
-
context:
|
|
624
|
-
registeredComponents:
|
|
625
|
-
builderBlock:
|
|
626
|
-
includeBlockProps:
|
|
627
|
-
isInteractive:
|
|
622
|
+
componentRef: s().componentRef,
|
|
623
|
+
componentOptions: s().componentOptions,
|
|
624
|
+
blockChildren: s().blockChildren,
|
|
625
|
+
context: s().context,
|
|
626
|
+
registeredComponents: s().registeredComponents,
|
|
627
|
+
builderBlock: s().builderBlock,
|
|
628
|
+
includeBlockProps: s().includeBlockProps,
|
|
629
|
+
isInteractive: s().isInteractive
|
|
628
630
|
}
|
|
629
|
-
) }) : /* @__PURE__ */
|
|
630
|
-
|
|
631
|
-
|
|
631
|
+
) }) : /* @__PURE__ */ T(f, { children: [
|
|
632
|
+
q(a()) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
633
|
+
fe,
|
|
632
634
|
{
|
|
633
|
-
Wrapper:
|
|
635
|
+
Wrapper: a(),
|
|
634
636
|
block: i(),
|
|
635
637
|
context: e.context,
|
|
636
638
|
hasChildren: !1
|
|
637
639
|
}
|
|
638
640
|
) }) : null,
|
|
639
|
-
!
|
|
640
|
-
|
|
641
|
+
!q(a()) && n() ? /* @__PURE__ */ r(f, { children: (g = n()) == null ? void 0 : g.map((b, S) => /* @__PURE__ */ r(
|
|
642
|
+
lt,
|
|
641
643
|
{
|
|
642
644
|
repeatContext: b.context,
|
|
643
645
|
block: b.block,
|
|
@@ -645,29 +647,29 @@ function z(e) {
|
|
|
645
647
|
},
|
|
646
648
|
S
|
|
647
649
|
)) }) : null,
|
|
648
|
-
!
|
|
649
|
-
|
|
650
|
+
!q(a()) && !n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
|
|
651
|
+
fe,
|
|
650
652
|
{
|
|
651
|
-
Wrapper:
|
|
653
|
+
Wrapper: a(),
|
|
652
654
|
block: i(),
|
|
653
655
|
context: e.context,
|
|
654
656
|
hasChildren: !0,
|
|
655
657
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
|
|
658
|
+
/* @__PURE__ */ r(
|
|
659
|
+
he,
|
|
658
660
|
{
|
|
659
|
-
componentRef:
|
|
660
|
-
componentOptions:
|
|
661
|
-
blockChildren:
|
|
662
|
-
context:
|
|
663
|
-
registeredComponents:
|
|
664
|
-
builderBlock:
|
|
665
|
-
includeBlockProps:
|
|
666
|
-
isInteractive:
|
|
661
|
+
componentRef: s().componentRef,
|
|
662
|
+
componentOptions: s().componentOptions,
|
|
663
|
+
blockChildren: s().blockChildren,
|
|
664
|
+
context: s().context,
|
|
665
|
+
registeredComponents: s().registeredComponents,
|
|
666
|
+
builderBlock: s().builderBlock,
|
|
667
|
+
includeBlockProps: s().includeBlockProps,
|
|
668
|
+
isInteractive: s().isInteractive
|
|
667
669
|
}
|
|
668
670
|
),
|
|
669
|
-
(
|
|
670
|
-
|
|
671
|
+
(v = l()) == null ? void 0 : v.map((b) => /* @__PURE__ */ r(
|
|
672
|
+
H,
|
|
671
673
|
{
|
|
672
674
|
block: b,
|
|
673
675
|
context: c,
|
|
@@ -675,7 +677,7 @@ function z(e) {
|
|
|
675
677
|
},
|
|
676
678
|
"block-" + b.id
|
|
677
679
|
)),
|
|
678
|
-
(
|
|
680
|
+
(V = l()) == null ? void 0 : V.map((b) => /* @__PURE__ */ r(
|
|
679
681
|
ne,
|
|
680
682
|
{
|
|
681
683
|
block: b,
|
|
@@ -688,14 +690,14 @@ function z(e) {
|
|
|
688
690
|
) }) : null
|
|
689
691
|
] }) }) : null });
|
|
690
692
|
}
|
|
691
|
-
function
|
|
693
|
+
function ct(e) {
|
|
692
694
|
function t() {
|
|
693
|
-
var
|
|
694
|
-
return "builder-blocks" + ((
|
|
695
|
+
var a;
|
|
696
|
+
return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
|
|
695
697
|
}
|
|
696
698
|
function n() {
|
|
697
|
-
var
|
|
698
|
-
|
|
699
|
+
var a, o;
|
|
700
|
+
$() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
|
|
699
701
|
{
|
|
700
702
|
type: "builder.clickEmptyBlocks",
|
|
701
703
|
data: {
|
|
@@ -707,8 +709,8 @@ function rt(e) {
|
|
|
707
709
|
));
|
|
708
710
|
}
|
|
709
711
|
function i() {
|
|
710
|
-
var
|
|
711
|
-
|
|
712
|
+
var a, o;
|
|
713
|
+
$() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
|
|
712
714
|
{
|
|
713
715
|
type: "builder.hoverEmptyBlocks",
|
|
714
716
|
data: {
|
|
@@ -719,21 +721,21 @@ function rt(e) {
|
|
|
719
721
|
"*"
|
|
720
722
|
));
|
|
721
723
|
}
|
|
722
|
-
return /* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
725
|
+
/* @__PURE__ */ r(
|
|
724
726
|
"div",
|
|
725
727
|
{
|
|
726
728
|
className: t() + " div-02c7a115",
|
|
727
729
|
"builder-path": e.path,
|
|
728
730
|
"builder-parent-id": e.parent,
|
|
729
731
|
style: e.styleProp,
|
|
730
|
-
onClick: (
|
|
731
|
-
onMouseEnter: (
|
|
732
|
-
onKeyPress: (
|
|
732
|
+
onClick: (a) => n(),
|
|
733
|
+
onMouseEnter: (a) => i(),
|
|
734
|
+
onKeyPress: (a) => n(),
|
|
733
735
|
children: e.children
|
|
734
736
|
}
|
|
735
737
|
),
|
|
736
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ r("style", { children: `.div-02c7a115 {
|
|
737
739
|
display: flex;
|
|
738
740
|
flex-direction: column;
|
|
739
741
|
align-items: stretch;
|
|
@@ -741,106 +743,106 @@ function rt(e) {
|
|
|
741
743
|
] });
|
|
742
744
|
}
|
|
743
745
|
function ie(e) {
|
|
744
|
-
var i,
|
|
745
|
-
const t =
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
-
|
|
746
|
+
var i, a;
|
|
747
|
+
const t = le(te), n = le(we);
|
|
748
|
+
return /* @__PURE__ */ T(
|
|
749
|
+
ct,
|
|
748
750
|
{
|
|
749
751
|
blocks: e.blocks,
|
|
750
752
|
parent: e.parent,
|
|
751
753
|
path: e.path,
|
|
752
754
|
styleProp: e.styleProp,
|
|
753
755
|
children: [
|
|
754
|
-
e.blocks ? /* @__PURE__ */
|
|
755
|
-
|
|
756
|
+
e.blocks ? /* @__PURE__ */ r(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
|
|
757
|
+
H,
|
|
756
758
|
{
|
|
757
|
-
block:
|
|
759
|
+
block: o,
|
|
758
760
|
context: e.context || t,
|
|
759
761
|
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
760
762
|
},
|
|
761
|
-
"render-block-" +
|
|
763
|
+
"render-block-" + o.id
|
|
762
764
|
)) }) : null,
|
|
763
|
-
e.blocks ? /* @__PURE__ */
|
|
765
|
+
e.blocks ? /* @__PURE__ */ r(f, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
|
|
764
766
|
ne,
|
|
765
767
|
{
|
|
766
|
-
block:
|
|
768
|
+
block: o,
|
|
767
769
|
context: e.context || t
|
|
768
770
|
},
|
|
769
|
-
"block-style-" +
|
|
771
|
+
"block-style-" + o.id
|
|
770
772
|
)) }) : null
|
|
771
773
|
]
|
|
772
774
|
}
|
|
773
775
|
);
|
|
774
776
|
}
|
|
775
|
-
function
|
|
776
|
-
var
|
|
777
|
-
const [t, n] =
|
|
777
|
+
function st(e) {
|
|
778
|
+
var R;
|
|
779
|
+
const [t, n] = p(
|
|
778
780
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
779
|
-
), [i,
|
|
781
|
+
), [i, a] = p(() => e.columns || []), [o, l] = p(
|
|
780
782
|
() => e.stackColumnsAt || "tablet"
|
|
781
783
|
);
|
|
782
|
-
function
|
|
783
|
-
var
|
|
784
|
-
return ((
|
|
784
|
+
function s(C) {
|
|
785
|
+
var w;
|
|
786
|
+
return ((w = i[C]) == null ? void 0 : w.width) || 100 / i.length;
|
|
785
787
|
}
|
|
786
|
-
function c(
|
|
787
|
-
const
|
|
788
|
-
return `calc(${
|
|
788
|
+
function c(C) {
|
|
789
|
+
const w = t * (i.length - 1) / i.length;
|
|
790
|
+
return `calc(${s(C)}% - ${w}px)`;
|
|
789
791
|
}
|
|
790
792
|
function d({
|
|
791
|
-
stackedStyle:
|
|
792
|
-
desktopStyle:
|
|
793
|
+
stackedStyle: C,
|
|
794
|
+
desktopStyle: w
|
|
793
795
|
}) {
|
|
794
|
-
return
|
|
796
|
+
return o === "tablet" ? C : w;
|
|
795
797
|
}
|
|
796
798
|
function u({
|
|
797
|
-
stackedStyle:
|
|
798
|
-
desktopStyle:
|
|
799
|
+
stackedStyle: C,
|
|
800
|
+
desktopStyle: w
|
|
799
801
|
}) {
|
|
800
|
-
return
|
|
802
|
+
return o === "never" ? w : C;
|
|
801
803
|
}
|
|
802
|
-
const [
|
|
804
|
+
const [g, v] = p(
|
|
803
805
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
804
806
|
);
|
|
805
|
-
function
|
|
807
|
+
function V() {
|
|
806
808
|
return {
|
|
807
|
-
"--flex-dir":
|
|
809
|
+
"--flex-dir": g,
|
|
808
810
|
"--flex-dir-tablet": d({
|
|
809
|
-
stackedStyle:
|
|
811
|
+
stackedStyle: g,
|
|
810
812
|
desktopStyle: "row"
|
|
811
813
|
})
|
|
812
814
|
};
|
|
813
815
|
}
|
|
814
|
-
function b(
|
|
815
|
-
const
|
|
816
|
+
function b(C) {
|
|
817
|
+
const w = C === 0 ? 0 : t, A = c(C), B = `${w}px`, F = "100%", W = 0;
|
|
816
818
|
return {
|
|
817
|
-
width:
|
|
818
|
-
["marginLeft"]:
|
|
819
|
+
width: A,
|
|
820
|
+
["marginLeft"]: B,
|
|
819
821
|
"--column-width-mobile": u({
|
|
820
|
-
stackedStyle:
|
|
821
|
-
desktopStyle:
|
|
822
|
+
stackedStyle: F,
|
|
823
|
+
desktopStyle: A
|
|
822
824
|
}),
|
|
823
825
|
"--column-margin-left-mobile": u({
|
|
824
826
|
stackedStyle: W,
|
|
825
|
-
desktopStyle:
|
|
827
|
+
desktopStyle: B
|
|
826
828
|
}),
|
|
827
829
|
"--column-width-tablet": d({
|
|
828
|
-
stackedStyle:
|
|
829
|
-
desktopStyle:
|
|
830
|
+
stackedStyle: F,
|
|
831
|
+
desktopStyle: A
|
|
830
832
|
}),
|
|
831
833
|
"--column-margin-left-tablet": d({
|
|
832
834
|
stackedStyle: W,
|
|
833
|
-
desktopStyle:
|
|
835
|
+
desktopStyle: B
|
|
834
836
|
})
|
|
835
837
|
};
|
|
836
838
|
}
|
|
837
|
-
function S(
|
|
838
|
-
var
|
|
839
|
-
return
|
|
840
|
-
((
|
|
841
|
-
)[
|
|
839
|
+
function S(C) {
|
|
840
|
+
var A, B;
|
|
841
|
+
return Te(
|
|
842
|
+
((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
|
|
843
|
+
)[C].max;
|
|
842
844
|
}
|
|
843
|
-
function
|
|
845
|
+
function E() {
|
|
844
846
|
return `
|
|
845
847
|
@media (max-width: ${S("medium")}px) {
|
|
846
848
|
.${e.builderBlock.id}-breakpoints {
|
|
@@ -867,39 +869,39 @@ function lt(e) {
|
|
|
867
869
|
},
|
|
868
870
|
`;
|
|
869
871
|
}
|
|
870
|
-
return /* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
873
|
+
/* @__PURE__ */ T(
|
|
872
874
|
"div",
|
|
873
875
|
{
|
|
874
876
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
|
|
875
|
-
style:
|
|
877
|
+
style: V(),
|
|
876
878
|
children: [
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
(
|
|
879
|
+
/* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: E() }) }),
|
|
880
|
+
(R = e.columns) == null ? void 0 : R.map((C, w) => /* @__PURE__ */ ke(
|
|
879
881
|
"div",
|
|
880
882
|
{
|
|
881
883
|
className: "builder-column div-53636e90-2",
|
|
882
|
-
style: b(
|
|
883
|
-
key:
|
|
884
|
+
style: b(w),
|
|
885
|
+
key: w
|
|
884
886
|
},
|
|
885
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ r(
|
|
886
888
|
ie,
|
|
887
889
|
{
|
|
888
|
-
path: `component.options.columns.${
|
|
890
|
+
path: `component.options.columns.${w}.blocks`,
|
|
889
891
|
parent: e.builderBlock.id,
|
|
890
892
|
styleProp: {
|
|
891
893
|
flexGrow: "1"
|
|
892
894
|
},
|
|
893
895
|
context: e.builderContext,
|
|
894
896
|
registeredComponents: e.builderComponents,
|
|
895
|
-
blocks:
|
|
897
|
+
blocks: C.blocks
|
|
896
898
|
}
|
|
897
899
|
)
|
|
898
900
|
))
|
|
899
901
|
]
|
|
900
902
|
}
|
|
901
903
|
),
|
|
902
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ r("style", { children: `.div-53636e90 {
|
|
903
905
|
display: flex;
|
|
904
906
|
line-height: normal;
|
|
905
907
|
}.div-53636e90-2 {
|
|
@@ -909,41 +911,41 @@ function lt(e) {
|
|
|
909
911
|
}` })
|
|
910
912
|
] });
|
|
911
913
|
}
|
|
912
|
-
function
|
|
913
|
-
return /* @__PURE__ */
|
|
914
|
+
function dt(e) {
|
|
915
|
+
return /* @__PURE__ */ r("span", { children: e.children });
|
|
914
916
|
}
|
|
915
|
-
function
|
|
917
|
+
function ge(e) {
|
|
916
918
|
return e.replace(/http(s)?:/, "");
|
|
917
919
|
}
|
|
918
|
-
function
|
|
919
|
-
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"),
|
|
920
|
-
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e +
|
|
920
|
+
function ut(e = "", t, n) {
|
|
921
|
+
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
|
|
922
|
+
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
|
|
921
923
|
}
|
|
922
|
-
function
|
|
924
|
+
function mt(e, t) {
|
|
923
925
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
924
926
|
return e;
|
|
925
927
|
if (t === "master")
|
|
926
|
-
return
|
|
928
|
+
return ge(e);
|
|
927
929
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
928
930
|
if (n) {
|
|
929
|
-
const i = e.split(n[0]),
|
|
930
|
-
return
|
|
931
|
+
const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
|
|
932
|
+
return ge(`${i[0]}_${o}${a}`);
|
|
931
933
|
}
|
|
932
934
|
return null;
|
|
933
935
|
}
|
|
934
|
-
function
|
|
936
|
+
function Q(e) {
|
|
935
937
|
if (!e)
|
|
936
938
|
return e;
|
|
937
939
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
938
940
|
if (e.match(/builder\.io/)) {
|
|
939
941
|
let n = e;
|
|
940
942
|
const i = Number(e.split("?width=")[1]);
|
|
941
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((
|
|
943
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${ut(e, "width", a)} ${a}w`).concat([n]).join(", ");
|
|
942
944
|
}
|
|
943
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
945
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [mt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
944
946
|
}
|
|
945
|
-
function
|
|
946
|
-
var
|
|
947
|
+
function ft(e) {
|
|
948
|
+
var a, o, l, s;
|
|
947
949
|
function t() {
|
|
948
950
|
var u;
|
|
949
951
|
const d = e.image || e.src;
|
|
@@ -953,10 +955,10 @@ function ut(e) {
|
|
|
953
955
|
return e.srcset;
|
|
954
956
|
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
955
957
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
956
|
-
return console.debug("Removed given srcset"),
|
|
958
|
+
return console.debug("Removed given srcset"), Q(d);
|
|
957
959
|
} else if (e.image && !e.srcset)
|
|
958
|
-
return
|
|
959
|
-
return
|
|
960
|
+
return Q(d);
|
|
961
|
+
return Q(d);
|
|
960
962
|
}
|
|
961
963
|
function n() {
|
|
962
964
|
var c;
|
|
@@ -972,11 +974,11 @@ function ut(e) {
|
|
|
972
974
|
};
|
|
973
975
|
return e.aspectRatio ? c : void 0;
|
|
974
976
|
}
|
|
975
|
-
return /* @__PURE__ */
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
n() ? /* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
978
|
+
/* @__PURE__ */ T(f, { children: [
|
|
979
|
+
/* @__PURE__ */ T("picture", { children: [
|
|
980
|
+
n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
981
|
+
/* @__PURE__ */ r(
|
|
980
982
|
"img",
|
|
981
983
|
{
|
|
982
984
|
loading: "lazy",
|
|
@@ -994,7 +996,7 @@ function ut(e) {
|
|
|
994
996
|
}
|
|
995
997
|
)
|
|
996
998
|
] }),
|
|
997
|
-
e.aspectRatio && !((
|
|
999
|
+
e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
998
1000
|
"div",
|
|
999
1001
|
{
|
|
1000
1002
|
className: "builder-image-sizer div-dbab4030",
|
|
@@ -1003,10 +1005,10 @@ function ut(e) {
|
|
|
1003
1005
|
}
|
|
1004
1006
|
}
|
|
1005
1007
|
) }) : null,
|
|
1006
|
-
(
|
|
1007
|
-
!e.fitContent && e.children ? /* @__PURE__ */
|
|
1008
|
+
(s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: e.children }) : null,
|
|
1009
|
+
!e.fitContent && e.children ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("div", { className: "div-dbab4030-2", children: e.children }) }) : null
|
|
1008
1010
|
] }),
|
|
1009
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ r("style", { children: `.img-dbab4030 {
|
|
1010
1012
|
opacity: 1;
|
|
1011
1013
|
transition: opacity 0.2s ease-in-out;
|
|
1012
1014
|
}.div-dbab4030 {
|
|
@@ -1025,8 +1027,8 @@ function ut(e) {
|
|
|
1025
1027
|
}` })
|
|
1026
1028
|
] });
|
|
1027
1029
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return /* @__PURE__ */
|
|
1030
|
+
function ht(e) {
|
|
1031
|
+
return /* @__PURE__ */ r(
|
|
1030
1032
|
"section",
|
|
1031
1033
|
{
|
|
1032
1034
|
...e.attributes,
|
|
@@ -1046,7 +1048,7 @@ function mt(e) {
|
|
|
1046
1048
|
}
|
|
1047
1049
|
);
|
|
1048
1050
|
}
|
|
1049
|
-
const
|
|
1051
|
+
const gt = {
|
|
1050
1052
|
name: "Core:Button",
|
|
1051
1053
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1052
1054
|
defaultStyles: {
|
|
@@ -1079,7 +1081,7 @@ const ft = {
|
|
|
1079
1081
|
}],
|
|
1080
1082
|
static: !0,
|
|
1081
1083
|
noWrap: !0
|
|
1082
|
-
},
|
|
1084
|
+
}, bt = {
|
|
1083
1085
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1084
1086
|
name: "Columns",
|
|
1085
1087
|
isRSC: !0,
|
|
@@ -1258,7 +1260,7 @@ const ft = {
|
|
|
1258
1260
|
});
|
|
1259
1261
|
}
|
|
1260
1262
|
const n = e.get("columns");
|
|
1261
|
-
Array.isArray(n) && n.find((
|
|
1263
|
+
Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
|
|
1262
1264
|
}
|
|
1263
1265
|
}, {
|
|
1264
1266
|
name: "space",
|
|
@@ -1280,7 +1282,7 @@ const ft = {
|
|
|
1280
1282
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1281
1283
|
advanced: !0
|
|
1282
1284
|
}]
|
|
1283
|
-
},
|
|
1285
|
+
}, xt = {
|
|
1284
1286
|
name: "Custom Code",
|
|
1285
1287
|
static: !0,
|
|
1286
1288
|
requiredPermissions: ["editCode"],
|
|
@@ -1303,15 +1305,15 @@ const ft = {
|
|
|
1303
1305
|
advanced: !0
|
|
1304
1306
|
}]
|
|
1305
1307
|
};
|
|
1306
|
-
function
|
|
1307
|
-
const t = Z(null), [n, i] =
|
|
1308
|
-
return
|
|
1309
|
-
var
|
|
1310
|
-
if (!((
|
|
1308
|
+
function yt(e) {
|
|
1309
|
+
const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []);
|
|
1310
|
+
return P(() => {
|
|
1311
|
+
var s;
|
|
1312
|
+
if (!((s = t.current) != null && s.getElementsByTagName) || typeof window > "u")
|
|
1311
1313
|
return;
|
|
1312
|
-
const
|
|
1313
|
-
for (let c = 0; c <
|
|
1314
|
-
const d =
|
|
1314
|
+
const l = t.current.getElementsByTagName("script");
|
|
1315
|
+
for (let c = 0; c < l.length; c++) {
|
|
1316
|
+
const d = l[c];
|
|
1315
1317
|
if (d.src) {
|
|
1316
1318
|
if (n.includes(d.src))
|
|
1317
1319
|
continue;
|
|
@@ -1323,16 +1325,16 @@ function bt(e) {
|
|
|
1323
1325
|
"application/javascript",
|
|
1324
1326
|
"application/ecmascript"
|
|
1325
1327
|
].includes(d.type)) {
|
|
1326
|
-
if (
|
|
1328
|
+
if (a.includes(d.innerText))
|
|
1327
1329
|
continue;
|
|
1328
1330
|
try {
|
|
1329
|
-
|
|
1331
|
+
a.push(d.innerText), new Function(d.innerText)();
|
|
1330
1332
|
} catch (u) {
|
|
1331
1333
|
console.warn("`CustomCode`: Error running script:", u);
|
|
1332
1334
|
}
|
|
1333
1335
|
}
|
|
1334
1336
|
}
|
|
1335
|
-
}, []), /* @__PURE__ */
|
|
1337
|
+
}, []), /* @__PURE__ */ r(
|
|
1336
1338
|
"div",
|
|
1337
1339
|
{
|
|
1338
1340
|
ref: t,
|
|
@@ -1341,7 +1343,7 @@ function bt(e) {
|
|
|
1341
1343
|
}
|
|
1342
1344
|
);
|
|
1343
1345
|
}
|
|
1344
|
-
const
|
|
1346
|
+
const St = {
|
|
1345
1347
|
name: "Embed",
|
|
1346
1348
|
static: !0,
|
|
1347
1349
|
inputs: [{
|
|
@@ -1366,30 +1368,30 @@ const xt = {
|
|
|
1366
1368
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1367
1369
|
hideFromUI: !0
|
|
1368
1370
|
}]
|
|
1369
|
-
},
|
|
1370
|
-
function
|
|
1371
|
-
const t = Z(null), [n, i] =
|
|
1371
|
+
}, vt = ["text/javascript", "application/javascript", "application/ecmascript"], pt = (e) => vt.includes(e.type);
|
|
1372
|
+
function kt(e) {
|
|
1373
|
+
const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []), [l, s] = p(() => !1);
|
|
1372
1374
|
function c() {
|
|
1373
1375
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1374
1376
|
return;
|
|
1375
1377
|
const d = t.current.getElementsByTagName("script");
|
|
1376
1378
|
for (let u = 0; u < d.length; u++) {
|
|
1377
|
-
const
|
|
1378
|
-
if (
|
|
1379
|
-
n.push(
|
|
1380
|
-
const
|
|
1381
|
-
|
|
1382
|
-
} else if (
|
|
1379
|
+
const g = d[u];
|
|
1380
|
+
if (g.src && !n.includes(g.src)) {
|
|
1381
|
+
n.push(g.src);
|
|
1382
|
+
const v = document.createElement("script");
|
|
1383
|
+
v.async = !0, v.src = g.src, document.head.appendChild(v);
|
|
1384
|
+
} else if (pt(g) && !a.includes(g.innerText))
|
|
1383
1385
|
try {
|
|
1384
|
-
|
|
1385
|
-
} catch (
|
|
1386
|
-
console.warn("`Embed`: Error running script:",
|
|
1386
|
+
a.push(g.innerText), new Function(g.innerText)();
|
|
1387
|
+
} catch (v) {
|
|
1388
|
+
console.warn("`Embed`: Error running script:", v);
|
|
1387
1389
|
}
|
|
1388
1390
|
}
|
|
1389
1391
|
}
|
|
1390
|
-
return
|
|
1391
|
-
t.current && !
|
|
1392
|
-
}, [t.current,
|
|
1392
|
+
return P(() => {
|
|
1393
|
+
t.current && !l && (s(!0), c());
|
|
1394
|
+
}, [t.current, l]), /* @__PURE__ */ r(
|
|
1393
1395
|
"div",
|
|
1394
1396
|
{
|
|
1395
1397
|
className: "builder-embed",
|
|
@@ -1398,13 +1400,13 @@ function vt(e) {
|
|
|
1398
1400
|
}
|
|
1399
1401
|
);
|
|
1400
1402
|
}
|
|
1401
|
-
const
|
|
1403
|
+
const Ct = {
|
|
1402
1404
|
name: "Fragment",
|
|
1403
1405
|
static: !0,
|
|
1404
1406
|
hidden: !0,
|
|
1405
1407
|
canHaveChildren: !0,
|
|
1406
1408
|
noWrap: !0
|
|
1407
|
-
},
|
|
1409
|
+
}, wt = {
|
|
1408
1410
|
name: "Image",
|
|
1409
1411
|
static: !0,
|
|
1410
1412
|
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",
|
|
@@ -1424,29 +1426,29 @@ const pt = {
|
|
|
1424
1426
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1425
1427
|
onChange: (e) => {
|
|
1426
1428
|
e.delete("srcset"), e.delete("noWebp");
|
|
1427
|
-
function n(
|
|
1429
|
+
function n(l, s = 6e4) {
|
|
1428
1430
|
return new Promise((c, d) => {
|
|
1429
1431
|
const u = document.createElement("img");
|
|
1430
|
-
let
|
|
1432
|
+
let g = !1;
|
|
1431
1433
|
u.onload = () => {
|
|
1432
|
-
|
|
1433
|
-
}, u.addEventListener("error", (
|
|
1434
|
-
console.warn("Image load failed",
|
|
1435
|
-
}), u.src =
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1434
|
+
g = !0, c(u);
|
|
1435
|
+
}, u.addEventListener("error", (v) => {
|
|
1436
|
+
console.warn("Image load failed", v.error), d(v.error);
|
|
1437
|
+
}), u.src = l, setTimeout(() => {
|
|
1438
|
+
g || d(new Error("Image load timed out"));
|
|
1439
|
+
}, s);
|
|
1438
1440
|
});
|
|
1439
1441
|
}
|
|
1440
|
-
function i(
|
|
1441
|
-
return Math.round(
|
|
1442
|
+
function i(l) {
|
|
1443
|
+
return Math.round(l * 1e3) / 1e3;
|
|
1442
1444
|
}
|
|
1443
|
-
const
|
|
1444
|
-
if (fetch(
|
|
1445
|
-
|
|
1446
|
-
}),
|
|
1447
|
-
return n(
|
|
1448
|
-
const
|
|
1449
|
-
e.get("image") ===
|
|
1445
|
+
const a = e.get("image"), o = e.get("aspectRatio");
|
|
1446
|
+
if (fetch(a).then((l) => l.blob()).then((l) => {
|
|
1447
|
+
l.type.includes("svg") && e.set("noWebp", !0);
|
|
1448
|
+
}), a && (!o || o === 0.7041))
|
|
1449
|
+
return n(a).then((l) => {
|
|
1450
|
+
const s = e.get("aspectRatio");
|
|
1451
|
+
e.get("image") === a && (!s || s === 0.7041) && l.width && l.height && (e.set("aspectRatio", i(l.height / l.width)), e.set("height", l.height), e.set("width", l.width));
|
|
1450
1452
|
});
|
|
1451
1453
|
}
|
|
1452
1454
|
}, {
|
|
@@ -1504,7 +1506,7 @@ const pt = {
|
|
|
1504
1506
|
advanced: !0,
|
|
1505
1507
|
defaultValue: 0.7041
|
|
1506
1508
|
}]
|
|
1507
|
-
},
|
|
1509
|
+
}, It = {
|
|
1508
1510
|
// friendlyName?
|
|
1509
1511
|
name: "Raw:Img",
|
|
1510
1512
|
hideFromInsertMenu: !0,
|
|
@@ -1519,8 +1521,8 @@ const pt = {
|
|
|
1519
1521
|
noWrap: !0,
|
|
1520
1522
|
static: !0
|
|
1521
1523
|
};
|
|
1522
|
-
function
|
|
1523
|
-
return /* @__PURE__ */
|
|
1524
|
+
function Tt(e) {
|
|
1525
|
+
return /* @__PURE__ */ r(
|
|
1524
1526
|
"img",
|
|
1525
1527
|
{
|
|
1526
1528
|
style: {
|
|
@@ -1531,10 +1533,10 @@ function wt(e) {
|
|
|
1531
1533
|
src: e.imgSrc || e.image,
|
|
1532
1534
|
...e.attributes
|
|
1533
1535
|
},
|
|
1534
|
-
|
|
1536
|
+
$() && e.imgSrc || "default-key"
|
|
1535
1537
|
);
|
|
1536
1538
|
}
|
|
1537
|
-
const
|
|
1539
|
+
const Rt = {
|
|
1538
1540
|
name: "Core:Section",
|
|
1539
1541
|
static: !0,
|
|
1540
1542
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1573,7 +1575,7 @@ const It = {
|
|
|
1573
1575
|
}
|
|
1574
1576
|
}
|
|
1575
1577
|
}]
|
|
1576
|
-
},
|
|
1578
|
+
}, Et = {
|
|
1577
1579
|
name: "Symbol",
|
|
1578
1580
|
noWrap: !0,
|
|
1579
1581
|
static: !0,
|
|
@@ -1606,7 +1608,7 @@ const It = {
|
|
|
1606
1608
|
hideFromUI: !0,
|
|
1607
1609
|
type: "boolean"
|
|
1608
1610
|
}]
|
|
1609
|
-
},
|
|
1611
|
+
}, Pt = {
|
|
1610
1612
|
name: "Text",
|
|
1611
1613
|
static: !0,
|
|
1612
1614
|
isRSC: !0,
|
|
@@ -1625,9 +1627,9 @@ const It = {
|
|
|
1625
1627
|
textAlign: "center"
|
|
1626
1628
|
}
|
|
1627
1629
|
};
|
|
1628
|
-
function
|
|
1630
|
+
function Vt(e) {
|
|
1629
1631
|
var t;
|
|
1630
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ r(
|
|
1631
1633
|
"div",
|
|
1632
1634
|
{
|
|
1633
1635
|
className: "builder-text",
|
|
@@ -1638,7 +1640,7 @@ function Et(e) {
|
|
|
1638
1640
|
}
|
|
1639
1641
|
);
|
|
1640
1642
|
}
|
|
1641
|
-
const
|
|
1643
|
+
const At = {
|
|
1642
1644
|
name: "Video",
|
|
1643
1645
|
canHaveChildren: !0,
|
|
1644
1646
|
defaultStyles: {
|
|
@@ -1721,7 +1723,7 @@ const Pt = {
|
|
|
1721
1723
|
}]
|
|
1722
1724
|
};
|
|
1723
1725
|
function Bt(e) {
|
|
1724
|
-
var i;
|
|
1726
|
+
var i, a, o, l, s, c, d;
|
|
1725
1727
|
function t() {
|
|
1726
1728
|
return {
|
|
1727
1729
|
...e.autoPlay === !0 ? {
|
|
@@ -1743,165 +1745,236 @@ function Bt(e) {
|
|
|
1743
1745
|
}
|
|
1744
1746
|
function n() {
|
|
1745
1747
|
return {
|
|
1746
|
-
...e.attributes,
|
|
1747
1748
|
...t()
|
|
1748
1749
|
};
|
|
1749
1750
|
}
|
|
1750
|
-
return /* @__PURE__ */
|
|
1751
|
-
"
|
|
1751
|
+
return /* @__PURE__ */ T(
|
|
1752
|
+
"div",
|
|
1752
1753
|
{
|
|
1753
|
-
...n(),
|
|
1754
|
-
preload: e.preload || "metadata",
|
|
1755
1754
|
style: {
|
|
1756
|
-
|
|
1757
|
-
height: "100%",
|
|
1758
|
-
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1759
|
-
objectFit: e.fit,
|
|
1760
|
-
objectPosition: e.position,
|
|
1761
|
-
// Hack to get object fit to work as expected and
|
|
1762
|
-
// not have the video overflow
|
|
1763
|
-
borderRadius: 1
|
|
1755
|
+
position: "relative"
|
|
1764
1756
|
},
|
|
1765
|
-
|
|
1766
|
-
|
|
1757
|
+
children: [
|
|
1758
|
+
/* @__PURE__ */ r(
|
|
1759
|
+
"video",
|
|
1760
|
+
{
|
|
1761
|
+
className: "builder-video",
|
|
1762
|
+
...n(),
|
|
1763
|
+
preload: e.preload || "metadata",
|
|
1764
|
+
style: {
|
|
1765
|
+
width: "100%",
|
|
1766
|
+
height: "100%",
|
|
1767
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1768
|
+
objectFit: e.fit,
|
|
1769
|
+
objectPosition: e.position,
|
|
1770
|
+
// Hack to get object fit to work as expected and
|
|
1771
|
+
// not have the video overflow
|
|
1772
|
+
zIndex: 2,
|
|
1773
|
+
borderRadius: "1px",
|
|
1774
|
+
...e.aspectRatio ? {
|
|
1775
|
+
position: "absolute"
|
|
1776
|
+
} : null
|
|
1777
|
+
},
|
|
1778
|
+
src: e.video || "no-src",
|
|
1779
|
+
poster: e.posterImage,
|
|
1780
|
+
children: e.lazyLoad ? null : /* @__PURE__ */ r("source", { type: "video/mp4", src: e.video })
|
|
1781
|
+
}
|
|
1782
|
+
),
|
|
1783
|
+
e.aspectRatio && !(e.fitContent && ((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length)) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
1784
|
+
"div",
|
|
1785
|
+
{
|
|
1786
|
+
style: {
|
|
1787
|
+
width: "100%",
|
|
1788
|
+
paddingTop: e.aspectRatio * 100 + "%",
|
|
1789
|
+
pointerEvents: "none",
|
|
1790
|
+
fontSize: "0px"
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
) }) : null,
|
|
1794
|
+
(s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
1795
|
+
"div",
|
|
1796
|
+
{
|
|
1797
|
+
style: {
|
|
1798
|
+
display: "flex",
|
|
1799
|
+
flexDirection: "column",
|
|
1800
|
+
alignItems: "stretch"
|
|
1801
|
+
},
|
|
1802
|
+
children: e.children
|
|
1803
|
+
}
|
|
1804
|
+
) }) : null,
|
|
1805
|
+
(d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
1806
|
+
"div",
|
|
1807
|
+
{
|
|
1808
|
+
style: {
|
|
1809
|
+
pointerEvents: "none",
|
|
1810
|
+
display: "flex",
|
|
1811
|
+
flexDirection: "column",
|
|
1812
|
+
alignItems: "stretch",
|
|
1813
|
+
position: "absolute",
|
|
1814
|
+
top: "0",
|
|
1815
|
+
left: "0",
|
|
1816
|
+
width: "100%",
|
|
1817
|
+
height: "100%"
|
|
1818
|
+
},
|
|
1819
|
+
children: e.children
|
|
1820
|
+
}
|
|
1821
|
+
) }) : null
|
|
1822
|
+
]
|
|
1767
1823
|
}
|
|
1768
1824
|
);
|
|
1769
1825
|
}
|
|
1770
|
-
const
|
|
1826
|
+
const be = () => [{
|
|
1771
1827
|
component: je,
|
|
1772
|
-
...ft
|
|
1773
|
-
}, {
|
|
1774
|
-
component: lt,
|
|
1775
|
-
...ht
|
|
1776
|
-
}, {
|
|
1777
|
-
component: bt,
|
|
1778
1828
|
...gt
|
|
1779
1829
|
}, {
|
|
1780
|
-
component:
|
|
1781
|
-
...
|
|
1830
|
+
component: st,
|
|
1831
|
+
...bt
|
|
1782
1832
|
}, {
|
|
1783
|
-
component:
|
|
1784
|
-
...
|
|
1833
|
+
component: yt,
|
|
1834
|
+
...xt
|
|
1785
1835
|
}, {
|
|
1786
|
-
component:
|
|
1787
|
-
...
|
|
1836
|
+
component: kt,
|
|
1837
|
+
...St
|
|
1788
1838
|
}, {
|
|
1789
|
-
component:
|
|
1839
|
+
component: dt,
|
|
1790
1840
|
...Ct
|
|
1791
1841
|
}, {
|
|
1792
|
-
component:
|
|
1793
|
-
...
|
|
1842
|
+
component: ft,
|
|
1843
|
+
...wt
|
|
1794
1844
|
}, {
|
|
1795
|
-
component:
|
|
1796
|
-
...
|
|
1845
|
+
component: Tt,
|
|
1846
|
+
...It
|
|
1797
1847
|
}, {
|
|
1798
|
-
component:
|
|
1848
|
+
component: ht,
|
|
1799
1849
|
...Rt
|
|
1800
1850
|
}, {
|
|
1801
|
-
component:
|
|
1851
|
+
component: en,
|
|
1852
|
+
...Et
|
|
1853
|
+
}, {
|
|
1854
|
+
component: Vt,
|
|
1802
1855
|
...Pt
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
function l(b, S, C) {
|
|
1815
|
-
let w = "";
|
|
1816
|
-
if (C) {
|
|
1817
|
-
const x = /* @__PURE__ */ new Date();
|
|
1818
|
-
x.setTime(x.getTime() + C * 24 * 60 * 60 * 1e3), w = "; expires=" + x.toUTCString();
|
|
1856
|
+
}, {
|
|
1857
|
+
component: Bt,
|
|
1858
|
+
...At
|
|
1859
|
+
}], $t = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1860
|
+
function getAndSetVariantId() {
|
|
1861
|
+
function setCookie(name, value, days) {
|
|
1862
|
+
let expires = '';
|
|
1863
|
+
if (days) {
|
|
1864
|
+
const date = new Date();
|
|
1865
|
+
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
1866
|
+
expires = '; expires=' + date.toUTCString();
|
|
1819
1867
|
}
|
|
1820
|
-
document.cookie =
|
|
1868
|
+
document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
|
|
1821
1869
|
}
|
|
1822
|
-
function
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
if (
|
|
1829
|
-
return x.substring(S.length, x.length);
|
|
1870
|
+
function getCookie(name) {
|
|
1871
|
+
const nameEQ = name + '=';
|
|
1872
|
+
const ca = document.cookie.split(';');
|
|
1873
|
+
for (let i = 0; i < ca.length; i++) {
|
|
1874
|
+
let c = ca[i];
|
|
1875
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
1876
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
1830
1877
|
}
|
|
1831
1878
|
return null;
|
|
1832
1879
|
}
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1880
|
+
const cookieName = \`builder.tests.\${contentId}\`;
|
|
1881
|
+
const variantInCookie = getCookie(cookieName);
|
|
1882
|
+
const availableIDs = variants.map(vr => vr.id).concat(contentId);
|
|
1883
|
+
if (variantInCookie && availableIDs.includes(variantInCookie)) {
|
|
1884
|
+
return variantInCookie;
|
|
1885
|
+
}
|
|
1886
|
+
let n = 0;
|
|
1887
|
+
const random = Math.random();
|
|
1888
|
+
for (let i = 0; i < variants.length; i++) {
|
|
1889
|
+
const variant = variants[i];
|
|
1890
|
+
const testRatio = variant.testRatio;
|
|
1891
|
+
n += testRatio;
|
|
1892
|
+
if (random < n) {
|
|
1893
|
+
setCookie(cookieName, variant.id);
|
|
1894
|
+
return variant.id;
|
|
1895
|
+
}
|
|
1842
1896
|
}
|
|
1843
|
-
|
|
1897
|
+
setCookie(cookieName, contentId);
|
|
1898
|
+
return contentId;
|
|
1844
1899
|
}
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1900
|
+
const winningVariantId = getAndSetVariantId();
|
|
1901
|
+
const styleEl = document.currentScript?.previousElementSibling;
|
|
1902
|
+
if (isHydrationTarget) {
|
|
1903
|
+
styleEl.remove();
|
|
1904
|
+
const thisScriptEl = document.currentScript;
|
|
1905
|
+
thisScriptEl?.remove();
|
|
1850
1906
|
} else {
|
|
1851
|
-
const
|
|
1852
|
-
id:
|
|
1853
|
-
}).filter(
|
|
1854
|
-
|
|
1855
|
-
|
|
1907
|
+
const newStyleStr = variants.concat({
|
|
1908
|
+
id: contentId
|
|
1909
|
+
}).filter(variant => variant.id !== winningVariantId).map(value => {
|
|
1910
|
+
return \`.variant-\${value.id} { display: none; }
|
|
1911
|
+
\`;
|
|
1912
|
+
}).join('');
|
|
1913
|
+
styleEl.innerHTML = newStyleStr;
|
|
1856
1914
|
}
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
var c;
|
|
1860
|
-
if (!navigator.cookieEnabled)
|
|
1915
|
+
}`, Nt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1916
|
+
if (!navigator.cookieEnabled) {
|
|
1861
1917
|
return;
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1918
|
+
}
|
|
1919
|
+
function getCookie(name) {
|
|
1920
|
+
const nameEQ = name + '=';
|
|
1921
|
+
const ca = document.cookie.split(';');
|
|
1922
|
+
for (let i = 0; i < ca.length; i++) {
|
|
1923
|
+
let c = ca[i];
|
|
1924
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
1925
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
1870
1926
|
}
|
|
1871
1927
|
return null;
|
|
1872
1928
|
}
|
|
1873
|
-
const
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1929
|
+
const cookieName = \`builder.tests.\${defaultContentId}\`;
|
|
1930
|
+
const winningVariant = getCookie(cookieName);
|
|
1931
|
+
const parentDiv = document.currentScript?.parentElement;
|
|
1932
|
+
const isDefaultContent = variantContentId === defaultContentId;
|
|
1933
|
+
const isWinningVariant = winningVariant === variantContentId;
|
|
1934
|
+
if (isWinningVariant && !isDefaultContent) {
|
|
1935
|
+
parentDiv?.removeAttribute('hidden');
|
|
1936
|
+
parentDiv?.removeAttribute('aria-hidden');
|
|
1937
|
+
} else if (!isWinningVariant && isDefaultContent) {
|
|
1938
|
+
parentDiv?.setAttribute('hidden', 'true');
|
|
1939
|
+
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
1881
1940
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1941
|
+
if (isHydrationTarget) {
|
|
1942
|
+
if (!isWinningVariant) {
|
|
1943
|
+
parentDiv?.remove();
|
|
1944
|
+
}
|
|
1945
|
+
const thisScriptEl = document.currentScript;
|
|
1946
|
+
thisScriptEl?.remove();
|
|
1947
|
+
}
|
|
1948
|
+
return;
|
|
1949
|
+
}`, Ee = "builderIoAbTest", Pe = "builderIoRenderContent", j = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1950
|
+
...t,
|
|
1951
|
+
testVariationId: t.id,
|
|
1952
|
+
id: e == null ? void 0 : e.id
|
|
1953
|
+
})), Ft = ({
|
|
1954
|
+
canTrack: e,
|
|
1955
|
+
content: t
|
|
1956
|
+
}) => !(!(j(t).length > 0) || !e || N()), Wt = (e) => e === "react" || e === "reactNative", Ve = Wt(L), _t = () => `
|
|
1957
|
+
window.${Ee} = ${$t}
|
|
1958
|
+
window.${Pe} = ${Nt}
|
|
1959
|
+
`, Lt = (e, t) => `
|
|
1960
|
+
window.${Ee}(
|
|
1961
|
+
"${t}",${JSON.stringify(e)}, ${Ve}
|
|
1962
|
+
)`, jt = ({
|
|
1891
1963
|
contentId: e,
|
|
1892
1964
|
variationId: t
|
|
1893
|
-
}) => `
|
|
1894
|
-
|
|
1965
|
+
}) => `window.${Pe}(
|
|
1966
|
+
"${t}", "${e}", ${Ve}
|
|
1967
|
+
)`;
|
|
1895
1968
|
function X(e) {
|
|
1896
|
-
return /* @__PURE__ */
|
|
1969
|
+
return /* @__PURE__ */ r(
|
|
1897
1970
|
"script",
|
|
1898
1971
|
{
|
|
1899
1972
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
1900
|
-
id: e.id
|
|
1973
|
+
id: e.id || ""
|
|
1901
1974
|
}
|
|
1902
1975
|
);
|
|
1903
1976
|
}
|
|
1904
|
-
function
|
|
1977
|
+
function xe(e) {
|
|
1905
1978
|
return Math.round(e * 1e3) / 1e3;
|
|
1906
1979
|
}
|
|
1907
1980
|
const Mt = (e, t, n = !0) => {
|
|
@@ -1915,36 +1988,36 @@ const Mt = (e, t, n = !0) => {
|
|
|
1915
1988
|
return i;
|
|
1916
1989
|
} while (i = i.parentElement);
|
|
1917
1990
|
return null;
|
|
1918
|
-
},
|
|
1991
|
+
}, Ut = (e) => Mt(e, (t) => {
|
|
1919
1992
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1920
1993
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1921
|
-
}),
|
|
1994
|
+
}), ye = ({
|
|
1922
1995
|
event: e,
|
|
1923
1996
|
target: t
|
|
1924
1997
|
}) => {
|
|
1925
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left,
|
|
1998
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = xe(i / n.width), l = xe(a / n.height);
|
|
1926
1999
|
return {
|
|
1927
|
-
x:
|
|
1928
|
-
y:
|
|
2000
|
+
x: o,
|
|
2001
|
+
y: l
|
|
1929
2002
|
};
|
|
1930
|
-
},
|
|
1931
|
-
const t = e.target, n = t &&
|
|
2003
|
+
}, Dt = (e) => {
|
|
2004
|
+
const t = e.target, n = t && Ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1932
2005
|
return {
|
|
1933
2006
|
targetBuilderElement: i || void 0,
|
|
1934
2007
|
metadata: {
|
|
1935
|
-
targetOffset: t ?
|
|
2008
|
+
targetOffset: t ? ye({
|
|
1936
2009
|
event: e,
|
|
1937
2010
|
target: t
|
|
1938
2011
|
}) : void 0,
|
|
1939
|
-
builderTargetOffset: n ?
|
|
2012
|
+
builderTargetOffset: n ? ye({
|
|
1940
2013
|
event: e,
|
|
1941
2014
|
target: n
|
|
1942
2015
|
}) : void 0,
|
|
1943
2016
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1944
2017
|
}
|
|
1945
2018
|
};
|
|
1946
|
-
},
|
|
1947
|
-
|
|
2019
|
+
}, Ot = "0.7.5", Kt = () => {
|
|
2020
|
+
Ne("insertMenu", {
|
|
1948
2021
|
name: "_default",
|
|
1949
2022
|
default: !0,
|
|
1950
2023
|
items: [{
|
|
@@ -1966,14 +2039,14 @@ const Mt = (e, t, n = !0) => {
|
|
|
1966
2039
|
}]
|
|
1967
2040
|
});
|
|
1968
2041
|
};
|
|
1969
|
-
let
|
|
1970
|
-
const
|
|
2042
|
+
let Se = !1;
|
|
2043
|
+
const Ht = (e = {}) => {
|
|
1971
2044
|
var t, n;
|
|
1972
|
-
|
|
2045
|
+
Se || (Se = !0, N() && ((t = window.parent) == null || t.postMessage({
|
|
1973
2046
|
type: "builder.sdkInfo",
|
|
1974
2047
|
data: {
|
|
1975
|
-
target:
|
|
1976
|
-
version:
|
|
2048
|
+
target: L,
|
|
2049
|
+
version: Ot,
|
|
1977
2050
|
supportsPatchUpdates: !1,
|
|
1978
2051
|
// Supports builder-model="..." attribute which is needed to
|
|
1979
2052
|
// scope our '+ add block' button styling
|
|
@@ -1988,33 +2061,33 @@ const Kt = (e = {}) => {
|
|
|
1988
2061
|
}, "*"), window.addEventListener("message", ({
|
|
1989
2062
|
data: i
|
|
1990
2063
|
}) => {
|
|
1991
|
-
var
|
|
2064
|
+
var a, o;
|
|
1992
2065
|
if (i != null && i.type)
|
|
1993
2066
|
switch (i.type) {
|
|
1994
2067
|
case "builder.evaluate": {
|
|
1995
|
-
const
|
|
1996
|
-
let u,
|
|
2068
|
+
const l = i.data.text, s = i.data.arguments || [], c = i.data.id, d = new Function(l);
|
|
2069
|
+
let u, g = null;
|
|
1997
2070
|
try {
|
|
1998
|
-
u = d.apply(null,
|
|
1999
|
-
} catch (
|
|
2000
|
-
|
|
2071
|
+
u = d.apply(null, s);
|
|
2072
|
+
} catch (v) {
|
|
2073
|
+
g = v;
|
|
2001
2074
|
}
|
|
2002
|
-
|
|
2075
|
+
g ? (a = window.parent) == null || a.postMessage({
|
|
2003
2076
|
type: "builder.evaluateError",
|
|
2004
2077
|
data: {
|
|
2005
2078
|
id: c,
|
|
2006
|
-
error:
|
|
2079
|
+
error: g.message
|
|
2007
2080
|
}
|
|
2008
|
-
}, "*") : u && typeof u.then == "function" ? u.then((
|
|
2009
|
-
var
|
|
2010
|
-
(
|
|
2081
|
+
}, "*") : u && typeof u.then == "function" ? u.then((v) => {
|
|
2082
|
+
var V;
|
|
2083
|
+
(V = window.parent) == null || V.postMessage({
|
|
2011
2084
|
type: "builder.evaluateResult",
|
|
2012
2085
|
data: {
|
|
2013
2086
|
id: c,
|
|
2014
|
-
result:
|
|
2087
|
+
result: v
|
|
2015
2088
|
}
|
|
2016
2089
|
}, "*");
|
|
2017
|
-
}).catch(console.error) : (
|
|
2090
|
+
}).catch(console.error) : (o = window.parent) == null || o.postMessage({
|
|
2018
2091
|
type: "builder.evaluateResult",
|
|
2019
2092
|
data: {
|
|
2020
2093
|
result: u,
|
|
@@ -2026,60 +2099,60 @@ const Kt = (e = {}) => {
|
|
|
2026
2099
|
}
|
|
2027
2100
|
})));
|
|
2028
2101
|
};
|
|
2029
|
-
function
|
|
2030
|
-
var
|
|
2031
|
-
const t = Z(null), [n, i] =
|
|
2032
|
-
function
|
|
2033
|
-
var
|
|
2034
|
-
const
|
|
2102
|
+
function zt(e) {
|
|
2103
|
+
var A, B, F, W, z, ae, oe;
|
|
2104
|
+
const t = Z(null), [n, i] = p(() => 0);
|
|
2105
|
+
function a(m) {
|
|
2106
|
+
var x, y, k, I, re;
|
|
2107
|
+
const h = {
|
|
2035
2108
|
...e.builderContextSignal.content,
|
|
2036
2109
|
...m,
|
|
2037
2110
|
data: {
|
|
2038
|
-
...(
|
|
2111
|
+
...(x = e.builderContextSignal.content) == null ? void 0 : x.data,
|
|
2039
2112
|
...m == null ? void 0 : m.data
|
|
2040
2113
|
},
|
|
2041
2114
|
meta: {
|
|
2042
|
-
...(
|
|
2115
|
+
...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
|
|
2043
2116
|
...m == null ? void 0 : m.meta,
|
|
2044
|
-
breakpoints: ((
|
|
2117
|
+
breakpoints: ((k = m == null ? void 0 : m.meta) == null ? void 0 : k.breakpoints) || ((re = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : re.breakpoints)
|
|
2045
2118
|
}
|
|
2046
2119
|
};
|
|
2047
2120
|
e.setBuilderContextSignal((Be) => ({
|
|
2048
2121
|
...Be,
|
|
2049
|
-
content:
|
|
2122
|
+
content: h
|
|
2050
2123
|
}));
|
|
2051
2124
|
}
|
|
2052
|
-
|
|
2053
|
-
const [
|
|
2125
|
+
p(() => 0);
|
|
2126
|
+
const [o, l] = p(
|
|
2054
2127
|
() => !1
|
|
2055
2128
|
);
|
|
2056
|
-
function
|
|
2057
|
-
var
|
|
2058
|
-
const { data:
|
|
2059
|
-
if (
|
|
2060
|
-
switch (
|
|
2129
|
+
function s(m) {
|
|
2130
|
+
var x;
|
|
2131
|
+
const { data: h } = m;
|
|
2132
|
+
if (h)
|
|
2133
|
+
switch (h.type) {
|
|
2061
2134
|
case "builder.configureSdk": {
|
|
2062
|
-
const
|
|
2063
|
-
if (!
|
|
2135
|
+
const y = h.data, { breakpoints: k, contentId: I } = y;
|
|
2136
|
+
if (!I || I !== ((x = e.builderContextSignal.content) == null ? void 0 : x.id))
|
|
2064
2137
|
return;
|
|
2065
|
-
|
|
2138
|
+
k && a({
|
|
2066
2139
|
meta: {
|
|
2067
|
-
breakpoints:
|
|
2140
|
+
breakpoints: k
|
|
2068
2141
|
}
|
|
2069
2142
|
}), i(n + 1);
|
|
2070
2143
|
break;
|
|
2071
2144
|
}
|
|
2072
2145
|
case "builder.contentUpdate": {
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2146
|
+
const y = h.data, k = y.key || y.alias || y.entry || y.modelName, I = y.data;
|
|
2147
|
+
k === e.model && (a(I), i(n + 1));
|
|
2075
2148
|
break;
|
|
2076
2149
|
}
|
|
2077
2150
|
}
|
|
2078
2151
|
}
|
|
2079
2152
|
function c() {
|
|
2080
|
-
var
|
|
2081
|
-
const m = (
|
|
2082
|
-
m &&
|
|
2153
|
+
var h, x;
|
|
2154
|
+
const m = (x = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : x.jsCode;
|
|
2155
|
+
m && _({
|
|
2083
2156
|
code: m,
|
|
2084
2157
|
context: e.context || {},
|
|
2085
2158
|
localState: void 0,
|
|
@@ -2087,28 +2160,28 @@ function Ht(e) {
|
|
|
2087
2160
|
rootSetState: e.builderContextSignal.rootSetState
|
|
2088
2161
|
});
|
|
2089
2162
|
}
|
|
2090
|
-
const [d, u] =
|
|
2091
|
-
function
|
|
2092
|
-
var
|
|
2163
|
+
const [d, u] = p(() => ({})), [g, v] = p(() => !1);
|
|
2164
|
+
function V(m) {
|
|
2165
|
+
var h, x;
|
|
2093
2166
|
if (e.builderContextSignal.content) {
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2167
|
+
const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, k = (x = e.builderContextSignal.content) == null ? void 0 : x.id;
|
|
2168
|
+
ce({
|
|
2096
2169
|
type: "click",
|
|
2097
2170
|
canTrack: U(e.canTrack),
|
|
2098
|
-
contentId:
|
|
2171
|
+
contentId: k,
|
|
2099
2172
|
apiKey: e.apiKey,
|
|
2100
|
-
variationId:
|
|
2101
|
-
...
|
|
2102
|
-
unique: !
|
|
2173
|
+
variationId: y !== k ? y : void 0,
|
|
2174
|
+
...Dt(m),
|
|
2175
|
+
unique: !g
|
|
2103
2176
|
});
|
|
2104
2177
|
}
|
|
2105
|
-
|
|
2178
|
+
g || v(!0);
|
|
2106
2179
|
}
|
|
2107
2180
|
function b(m) {
|
|
2108
2181
|
return m.replace(
|
|
2109
2182
|
/{{([^}]+)}}/g,
|
|
2110
|
-
(
|
|
2111
|
-
code:
|
|
2183
|
+
(h, x) => _({
|
|
2184
|
+
code: x,
|
|
2112
2185
|
context: e.context || {},
|
|
2113
2186
|
localState: void 0,
|
|
2114
2187
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -2116,33 +2189,33 @@ function Ht(e) {
|
|
|
2116
2189
|
})
|
|
2117
2190
|
);
|
|
2118
2191
|
}
|
|
2119
|
-
function S({ url: m, key:
|
|
2120
|
-
|
|
2121
|
-
var
|
|
2122
|
-
const
|
|
2192
|
+
function S({ url: m, key: h }) {
|
|
2193
|
+
_e(m).then((x) => x.json()).then((x) => {
|
|
2194
|
+
var k, I;
|
|
2195
|
+
const y = {
|
|
2123
2196
|
...e.builderContextSignal.rootState,
|
|
2124
|
-
[
|
|
2197
|
+
[h]: x
|
|
2125
2198
|
};
|
|
2126
|
-
(
|
|
2127
|
-
}).catch((
|
|
2128
|
-
console.error("error fetching dynamic data", m,
|
|
2199
|
+
(I = (k = e.builderContextSignal).rootSetState) == null || I.call(k, y), d[h] = !0;
|
|
2200
|
+
}).catch((x) => {
|
|
2201
|
+
console.error("error fetching dynamic data", m, x);
|
|
2129
2202
|
});
|
|
2130
2203
|
}
|
|
2131
|
-
function
|
|
2132
|
-
var
|
|
2133
|
-
const m = ((
|
|
2134
|
-
Object.entries(m).forEach(([
|
|
2135
|
-
if (
|
|
2136
|
-
const
|
|
2204
|
+
function E() {
|
|
2205
|
+
var h, x;
|
|
2206
|
+
const m = ((x = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : x.httpRequests) ?? {};
|
|
2207
|
+
Object.entries(m).forEach(([y, k]) => {
|
|
2208
|
+
if (k && (!d[y] || $())) {
|
|
2209
|
+
const I = b(k);
|
|
2137
2210
|
S({
|
|
2138
|
-
url:
|
|
2139
|
-
key:
|
|
2211
|
+
url: I,
|
|
2212
|
+
key: y
|
|
2140
2213
|
});
|
|
2141
2214
|
}
|
|
2142
2215
|
});
|
|
2143
2216
|
}
|
|
2144
|
-
function
|
|
2145
|
-
|
|
2217
|
+
function R() {
|
|
2218
|
+
$() && window.dispatchEvent(
|
|
2146
2219
|
new CustomEvent(
|
|
2147
2220
|
"builder:component:stateChange",
|
|
2148
2221
|
{
|
|
@@ -2156,8 +2229,8 @@ function Ht(e) {
|
|
|
2156
2229
|
)
|
|
2157
2230
|
);
|
|
2158
2231
|
}
|
|
2159
|
-
function
|
|
2160
|
-
i(n + 1), window.addEventListener("message",
|
|
2232
|
+
function C(m) {
|
|
2233
|
+
i(n + 1), window.addEventListener("message", s), Kt(), Ht({
|
|
2161
2234
|
...e.locale ? {
|
|
2162
2235
|
locale: e.locale
|
|
2163
2236
|
} : {},
|
|
@@ -2169,109 +2242,109 @@ function Ht(e) {
|
|
|
2169
2242
|
} : {}
|
|
2170
2243
|
}), Object.values(
|
|
2171
2244
|
e.builderContextSignal.componentInfos
|
|
2172
|
-
).forEach((
|
|
2173
|
-
var
|
|
2174
|
-
const
|
|
2175
|
-
(
|
|
2245
|
+
).forEach((h) => {
|
|
2246
|
+
var y;
|
|
2247
|
+
const x = We(h);
|
|
2248
|
+
(y = window.parent) == null || y.postMessage(x, "*");
|
|
2176
2249
|
}), window.addEventListener(
|
|
2177
2250
|
"builder:component:stateChangeListenerActivated",
|
|
2178
|
-
|
|
2251
|
+
R
|
|
2179
2252
|
);
|
|
2180
2253
|
}
|
|
2181
|
-
function
|
|
2182
|
-
const
|
|
2183
|
-
`builder.preview.${
|
|
2184
|
-
),
|
|
2185
|
-
|
|
2254
|
+
function w(m) {
|
|
2255
|
+
const h = new URL(location.href).searchParams, x = h.get("builder.preview"), y = h.get(
|
|
2256
|
+
`builder.preview.${x}`
|
|
2257
|
+
), k = h.get("apiKey") || h.get("builder.space");
|
|
2258
|
+
x === e.model && k === e.apiKey && (!e.content || y === e.content.id) && Ce({
|
|
2186
2259
|
model: e.model,
|
|
2187
2260
|
apiKey: e.apiKey,
|
|
2188
2261
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2189
|
-
}).then((
|
|
2190
|
-
|
|
2262
|
+
}).then((I) => {
|
|
2263
|
+
I && a(I);
|
|
2191
2264
|
});
|
|
2192
2265
|
}
|
|
2193
|
-
return
|
|
2266
|
+
return P(() => {
|
|
2194
2267
|
var m;
|
|
2195
2268
|
return (m = t.current) == null || m.addEventListener(
|
|
2196
2269
|
"initeditingbldr",
|
|
2197
|
-
|
|
2270
|
+
C
|
|
2198
2271
|
), () => {
|
|
2199
|
-
var
|
|
2200
|
-
return (
|
|
2272
|
+
var h;
|
|
2273
|
+
return (h = t.current) == null ? void 0 : h.removeEventListener(
|
|
2201
2274
|
"initeditingbldr",
|
|
2202
|
-
|
|
2275
|
+
C
|
|
2203
2276
|
);
|
|
2204
2277
|
};
|
|
2205
|
-
}, []),
|
|
2278
|
+
}, []), P(() => {
|
|
2206
2279
|
var m;
|
|
2207
2280
|
return (m = t.current) == null || m.addEventListener(
|
|
2208
2281
|
"initpreviewingbldr",
|
|
2209
|
-
|
|
2282
|
+
w
|
|
2210
2283
|
), () => {
|
|
2211
|
-
var
|
|
2212
|
-
return (
|
|
2284
|
+
var h;
|
|
2285
|
+
return (h = t.current) == null ? void 0 : h.removeEventListener(
|
|
2213
2286
|
"initpreviewingbldr",
|
|
2214
|
-
|
|
2287
|
+
w
|
|
2215
2288
|
);
|
|
2216
2289
|
};
|
|
2217
|
-
}, []),
|
|
2218
|
-
var m,
|
|
2219
|
-
if (
|
|
2220
|
-
if (
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2290
|
+
}, []), P(() => {
|
|
2291
|
+
var m, h;
|
|
2292
|
+
if (N()) {
|
|
2293
|
+
if ($() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
|
|
2294
|
+
const y = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, k = (h = e.builderContextSignal.content) == null ? void 0 : h.id, I = e.apiKey;
|
|
2295
|
+
ce({
|
|
2223
2296
|
type: "impression",
|
|
2224
2297
|
canTrack: !0,
|
|
2225
|
-
contentId:
|
|
2226
|
-
apiKey:
|
|
2227
|
-
variationId:
|
|
2298
|
+
contentId: k,
|
|
2299
|
+
apiKey: I,
|
|
2300
|
+
variationId: y !== k ? y : void 0
|
|
2228
2301
|
});
|
|
2229
2302
|
}
|
|
2230
|
-
|
|
2303
|
+
Fe() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
|
|
2231
2304
|
}
|
|
2232
|
-
}, []),
|
|
2233
|
-
e.apiKey ||
|
|
2305
|
+
}, []), P(() => {
|
|
2306
|
+
e.apiKey || M.error(
|
|
2234
2307
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2235
|
-
), c(),
|
|
2236
|
-
}, []),
|
|
2237
|
-
e.content &&
|
|
2238
|
-
}, [e.content]),
|
|
2239
|
-
}, [
|
|
2308
|
+
), c(), E(), R();
|
|
2309
|
+
}, []), P(() => {
|
|
2310
|
+
e.content && a(e.content);
|
|
2311
|
+
}, [e.content]), P(() => {
|
|
2312
|
+
}, [o]), P(() => {
|
|
2240
2313
|
c();
|
|
2241
2314
|
}, [
|
|
2242
|
-
(
|
|
2315
|
+
(B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
|
|
2243
2316
|
e.builderContextSignal.rootState
|
|
2244
|
-
]),
|
|
2245
|
-
|
|
2246
|
-
}, [(W = (
|
|
2247
|
-
|
|
2248
|
-
}, [e.builderContextSignal.rootState]),
|
|
2249
|
-
|
|
2317
|
+
]), P(() => {
|
|
2318
|
+
E();
|
|
2319
|
+
}, [(W = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : W.httpRequests]), P(() => {
|
|
2320
|
+
R();
|
|
2321
|
+
}, [e.builderContextSignal.rootState]), P(() => () => {
|
|
2322
|
+
N() && (window.removeEventListener("message", s), window.removeEventListener(
|
|
2250
2323
|
"builder:component:stateChangeListenerActivated",
|
|
2251
|
-
|
|
2324
|
+
R
|
|
2252
2325
|
));
|
|
2253
|
-
}, []), /* @__PURE__ */
|
|
2326
|
+
}, []), /* @__PURE__ */ r(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ ke(
|
|
2254
2327
|
"div",
|
|
2255
2328
|
{
|
|
2256
2329
|
key: n,
|
|
2257
2330
|
ref: t,
|
|
2258
|
-
onClick: (m) =>
|
|
2259
|
-
"builder-content-id": (
|
|
2331
|
+
onClick: (m) => V(m),
|
|
2332
|
+
"builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
|
|
2260
2333
|
"builder-model": e.model,
|
|
2261
2334
|
...e.showContent ? {} : {
|
|
2262
2335
|
hidden: !0,
|
|
2263
2336
|
"aria-hidden": !0
|
|
2264
2337
|
},
|
|
2265
|
-
className: e.
|
|
2338
|
+
className: `variant-${((ae = e.content) == null ? void 0 : ae.testVariationId) || ((oe = e.content) == null ? void 0 : oe.id)}`
|
|
2266
2339
|
},
|
|
2267
2340
|
e.children
|
|
2268
2341
|
) }) : null });
|
|
2269
2342
|
}
|
|
2270
|
-
const
|
|
2271
|
-
var
|
|
2272
|
-
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((
|
|
2273
|
-
let
|
|
2274
|
-
if (i && t && n && (
|
|
2343
|
+
const qt = (e) => {
|
|
2344
|
+
var o;
|
|
2345
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((o = e == null ? void 0 : e.files) == null ? void 0 : o.regular);
|
|
2346
|
+
let a = "";
|
|
2347
|
+
if (i && t && n && (a += `
|
|
2275
2348
|
@font-face {
|
|
2276
2349
|
font-family: "${t}";
|
|
2277
2350
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -2279,37 +2352,37 @@ font-display: fallback;
|
|
|
2279
2352
|
font-weight: 400;
|
|
2280
2353
|
}
|
|
2281
2354
|
`.trim()), e.files)
|
|
2282
|
-
for (const
|
|
2283
|
-
if (!(String(Number(
|
|
2355
|
+
for (const l in e.files) {
|
|
2356
|
+
if (!(String(Number(l)) === l))
|
|
2284
2357
|
continue;
|
|
2285
|
-
const c = e.files[
|
|
2286
|
-
c && c !== i && (
|
|
2358
|
+
const c = e.files[l];
|
|
2359
|
+
c && c !== i && (a += `
|
|
2287
2360
|
@font-face {
|
|
2288
2361
|
font-family: "${t}";
|
|
2289
2362
|
src: url('${c}') format('woff2');
|
|
2290
2363
|
font-display: fallback;
|
|
2291
|
-
font-weight: ${
|
|
2364
|
+
font-weight: ${l};
|
|
2292
2365
|
}
|
|
2293
2366
|
`.trim());
|
|
2294
2367
|
}
|
|
2295
|
-
return
|
|
2296
|
-
},
|
|
2368
|
+
return a;
|
|
2369
|
+
}, Yt = ({
|
|
2297
2370
|
customFonts: e
|
|
2298
2371
|
}) => {
|
|
2299
2372
|
var t;
|
|
2300
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2301
|
-
},
|
|
2373
|
+
return ((t = e == null ? void 0 : e.map((n) => qt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2374
|
+
}, Qt = ({
|
|
2302
2375
|
cssCode: e,
|
|
2303
2376
|
contentId: t
|
|
2304
2377
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2305
2378
|
function Gt(e) {
|
|
2306
|
-
const [t, n] =
|
|
2379
|
+
const [t, n] = p(
|
|
2307
2380
|
() => `
|
|
2308
|
-
${
|
|
2381
|
+
${Qt({
|
|
2309
2382
|
cssCode: e.cssCode,
|
|
2310
2383
|
contentId: e.contentId
|
|
2311
2384
|
})}
|
|
2312
|
-
${
|
|
2385
|
+
${Yt({
|
|
2313
2386
|
customFonts: e.customFonts
|
|
2314
2387
|
})}
|
|
2315
2388
|
|
|
@@ -2327,31 +2400,26 @@ ${qt({
|
|
|
2327
2400
|
}
|
|
2328
2401
|
`.trim()
|
|
2329
2402
|
);
|
|
2330
|
-
return /* @__PURE__ */
|
|
2403
|
+
return /* @__PURE__ */ r(K, { styles: t });
|
|
2331
2404
|
}
|
|
2332
2405
|
const Jt = ({
|
|
2333
2406
|
content: e,
|
|
2334
2407
|
data: t,
|
|
2335
2408
|
locale: n
|
|
2336
2409
|
}) => {
|
|
2337
|
-
var
|
|
2338
|
-
const i = {};
|
|
2339
|
-
(
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
|
|
2410
|
+
var o, l, s;
|
|
2411
|
+
const i = {}, a = ((o = e == null ? void 0 : e.data) == null ? void 0 : o.state) || {};
|
|
2412
|
+
return (s = (l = e == null ? void 0 : e.data) == null ? void 0 : l.inputs) == null || s.forEach((c) => {
|
|
2413
|
+
c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
|
|
2414
|
+
}), {
|
|
2415
|
+
...i,
|
|
2416
|
+
...a,
|
|
2345
2417
|
...t,
|
|
2346
2418
|
...n ? {
|
|
2347
2419
|
locale: n
|
|
2348
2420
|
} : {}
|
|
2349
2421
|
};
|
|
2350
|
-
|
|
2351
|
-
...i,
|
|
2352
|
-
...o
|
|
2353
|
-
};
|
|
2354
|
-
}, Yt = ({
|
|
2422
|
+
}, Xt = ({
|
|
2355
2423
|
content: e,
|
|
2356
2424
|
data: t
|
|
2357
2425
|
}) => e ? {
|
|
@@ -2362,47 +2430,47 @@ const Jt = ({
|
|
|
2362
2430
|
},
|
|
2363
2431
|
meta: e == null ? void 0 : e.meta
|
|
2364
2432
|
} : void 0;
|
|
2365
|
-
function
|
|
2366
|
-
var c, d, u,
|
|
2367
|
-
const [t, n] =
|
|
2433
|
+
function ve(e) {
|
|
2434
|
+
var c, d, u, g, v, V, b;
|
|
2435
|
+
const [t, n] = p(
|
|
2368
2436
|
() => {
|
|
2369
|
-
var S,
|
|
2437
|
+
var S, E;
|
|
2370
2438
|
return jt({
|
|
2371
2439
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2372
2440
|
variationId: (S = e.content) == null ? void 0 : S.testVariationId,
|
|
2373
2441
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2374
|
-
contentId: (
|
|
2442
|
+
contentId: (E = e.content) == null ? void 0 : E.id
|
|
2375
2443
|
});
|
|
2376
2444
|
}
|
|
2377
2445
|
);
|
|
2378
2446
|
function i(S) {
|
|
2379
|
-
|
|
2380
|
-
...
|
|
2447
|
+
s((E) => ({
|
|
2448
|
+
...E,
|
|
2381
2449
|
rootState: S
|
|
2382
2450
|
}));
|
|
2383
2451
|
}
|
|
2384
|
-
const [
|
|
2452
|
+
const [a, o] = p(
|
|
2385
2453
|
() => [
|
|
2386
|
-
...
|
|
2454
|
+
...be(),
|
|
2387
2455
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2388
2456
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2389
2457
|
// existing usage.
|
|
2390
2458
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2391
2459
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2392
|
-
...
|
|
2460
|
+
...se,
|
|
2393
2461
|
...e.customComponents || []
|
|
2394
2462
|
].reduce(
|
|
2395
|
-
(S, { component:
|
|
2463
|
+
(S, { component: E, ...R }) => ({
|
|
2396
2464
|
...S,
|
|
2397
|
-
[
|
|
2398
|
-
component:
|
|
2399
|
-
...
|
|
2465
|
+
[R.name]: {
|
|
2466
|
+
component: E,
|
|
2467
|
+
...de(R)
|
|
2400
2468
|
}
|
|
2401
2469
|
}),
|
|
2402
2470
|
{}
|
|
2403
2471
|
)
|
|
2404
|
-
), [
|
|
2405
|
-
content:
|
|
2472
|
+
), [l, s] = p(() => ({
|
|
2473
|
+
content: Xt({
|
|
2406
2474
|
content: e.content,
|
|
2407
2475
|
data: e.data
|
|
2408
2476
|
}),
|
|
@@ -2417,31 +2485,31 @@ function ye(e) {
|
|
|
2417
2485
|
apiKey: e.apiKey,
|
|
2418
2486
|
apiVersion: e.apiVersion,
|
|
2419
2487
|
componentInfos: [
|
|
2420
|
-
...
|
|
2488
|
+
...be(),
|
|
2421
2489
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2422
2490
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2423
2491
|
// existing usage.
|
|
2424
2492
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2425
2493
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2426
|
-
...
|
|
2494
|
+
...se,
|
|
2427
2495
|
...e.customComponents || []
|
|
2428
2496
|
].reduce(
|
|
2429
|
-
(S, { component:
|
|
2497
|
+
(S, { component: E, ...R }) => ({
|
|
2430
2498
|
...S,
|
|
2431
|
-
[
|
|
2499
|
+
[R.name]: de(R)
|
|
2432
2500
|
}),
|
|
2433
2501
|
{}
|
|
2434
2502
|
),
|
|
2435
2503
|
inheritedStyles: {}
|
|
2436
2504
|
}));
|
|
2437
|
-
return /* @__PURE__ */
|
|
2438
|
-
|
|
2505
|
+
return /* @__PURE__ */ r(
|
|
2506
|
+
we.Provider,
|
|
2439
2507
|
{
|
|
2440
2508
|
value: {
|
|
2441
|
-
registeredComponents:
|
|
2509
|
+
registeredComponents: a
|
|
2442
2510
|
},
|
|
2443
|
-
children: /* @__PURE__ */
|
|
2444
|
-
|
|
2511
|
+
children: /* @__PURE__ */ T(
|
|
2512
|
+
zt,
|
|
2445
2513
|
{
|
|
2446
2514
|
content: e.content,
|
|
2447
2515
|
model: e.model,
|
|
@@ -2451,26 +2519,25 @@ function ye(e) {
|
|
|
2451
2519
|
locale: e.locale,
|
|
2452
2520
|
includeRefs: e.includeRefs,
|
|
2453
2521
|
enrich: e.enrich,
|
|
2454
|
-
classNameProp: e.classNameProp,
|
|
2455
2522
|
showContent: e.showContent,
|
|
2456
|
-
builderContextSignal:
|
|
2457
|
-
setBuilderContextSignal:
|
|
2523
|
+
builderContextSignal: l,
|
|
2524
|
+
setBuilderContextSignal: s,
|
|
2458
2525
|
children: [
|
|
2459
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
2460
|
-
/* @__PURE__ */
|
|
2526
|
+
e.isSsrAbTest ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: t }) }) : null,
|
|
2527
|
+
/* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
2461
2528
|
Gt,
|
|
2462
2529
|
{
|
|
2463
|
-
contentId: (c =
|
|
2464
|
-
cssCode: (u = (d =
|
|
2465
|
-
customFonts: (
|
|
2530
|
+
contentId: (c = l.content) == null ? void 0 : c.id,
|
|
2531
|
+
cssCode: (u = (d = l.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
|
|
2532
|
+
customFonts: (v = (g = l.content) == null ? void 0 : g.data) == null ? void 0 : v.customFonts
|
|
2466
2533
|
}
|
|
2467
2534
|
) }),
|
|
2468
|
-
/* @__PURE__ */
|
|
2535
|
+
/* @__PURE__ */ r(
|
|
2469
2536
|
ie,
|
|
2470
2537
|
{
|
|
2471
|
-
blocks: (b = (
|
|
2472
|
-
context:
|
|
2473
|
-
registeredComponents:
|
|
2538
|
+
blocks: (b = (V = l.content) == null ? void 0 : V.data) == null ? void 0 : b.blocks,
|
|
2539
|
+
context: l,
|
|
2540
|
+
registeredComponents: a
|
|
2474
2541
|
}
|
|
2475
2542
|
)
|
|
2476
2543
|
]
|
|
@@ -2479,55 +2546,54 @@ function ye(e) {
|
|
|
2479
2546
|
}
|
|
2480
2547
|
);
|
|
2481
2548
|
}
|
|
2482
|
-
function
|
|
2483
|
-
var
|
|
2484
|
-
const [t, n] =
|
|
2485
|
-
() =>
|
|
2549
|
+
function Ae(e) {
|
|
2550
|
+
var l, s;
|
|
2551
|
+
const [t, n] = p(
|
|
2552
|
+
() => Ft({
|
|
2486
2553
|
canTrack: U(e.canTrack),
|
|
2487
2554
|
content: e.content
|
|
2488
2555
|
})
|
|
2489
2556
|
);
|
|
2490
2557
|
function i() {
|
|
2491
|
-
var
|
|
2492
|
-
return
|
|
2493
|
-
|
|
2494
|
-
id:
|
|
2495
|
-
testRatio:
|
|
2558
|
+
var c;
|
|
2559
|
+
return Lt(
|
|
2560
|
+
j(e.content).map((d) => ({
|
|
2561
|
+
id: d.testVariationId,
|
|
2562
|
+
testRatio: d.testRatio
|
|
2496
2563
|
})),
|
|
2497
|
-
((
|
|
2564
|
+
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2498
2565
|
);
|
|
2499
2566
|
}
|
|
2500
|
-
function o() {
|
|
2501
|
-
return L(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
|
|
2502
|
-
}
|
|
2503
2567
|
function a() {
|
|
2504
|
-
|
|
2568
|
+
return j(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2569
|
+
}
|
|
2570
|
+
function o() {
|
|
2571
|
+
var c;
|
|
2505
2572
|
return t ? {
|
|
2506
2573
|
...e.content,
|
|
2507
|
-
testVariationId: (
|
|
2508
|
-
} :
|
|
2574
|
+
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2575
|
+
} : Le({
|
|
2509
2576
|
item: e.content,
|
|
2510
2577
|
canTrack: U(e.canTrack)
|
|
2511
2578
|
});
|
|
2512
2579
|
}
|
|
2513
|
-
return
|
|
2514
|
-
}, []), /* @__PURE__ */
|
|
2515
|
-
!e.__isNestedRender &&
|
|
2516
|
-
t ? /* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2518
|
-
|
|
2580
|
+
return P(() => {
|
|
2581
|
+
}, []), /* @__PURE__ */ T(f, { children: [
|
|
2582
|
+
!e.__isNestedRender && L !== "reactNative" ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: _t() }) }) : null,
|
|
2583
|
+
t ? /* @__PURE__ */ T(f, { children: [
|
|
2584
|
+
/* @__PURE__ */ r(
|
|
2585
|
+
K,
|
|
2519
2586
|
{
|
|
2520
|
-
id: `variants-styles-${(
|
|
2521
|
-
styles:
|
|
2587
|
+
id: `variants-styles-${(l = e.content) == null ? void 0 : l.id}`,
|
|
2588
|
+
styles: a()
|
|
2522
2589
|
}
|
|
2523
2590
|
),
|
|
2524
|
-
/* @__PURE__ */
|
|
2525
|
-
(
|
|
2526
|
-
|
|
2591
|
+
/* @__PURE__ */ r(X, { scriptStr: i() }),
|
|
2592
|
+
(s = j(e.content)) == null ? void 0 : s.map((c) => /* @__PURE__ */ r(
|
|
2593
|
+
ve,
|
|
2527
2594
|
{
|
|
2528
|
-
content:
|
|
2595
|
+
content: c,
|
|
2529
2596
|
showContent: !1,
|
|
2530
|
-
classNameProp: void 0,
|
|
2531
2597
|
model: e.model,
|
|
2532
2598
|
data: e.data,
|
|
2533
2599
|
context: e.context,
|
|
@@ -2540,14 +2606,13 @@ function Pe(e) {
|
|
|
2540
2606
|
enrich: e.enrich,
|
|
2541
2607
|
isSsrAbTest: t
|
|
2542
2608
|
},
|
|
2543
|
-
|
|
2609
|
+
c.testVariationId
|
|
2544
2610
|
))
|
|
2545
2611
|
] }) : null,
|
|
2546
|
-
/* @__PURE__ */
|
|
2547
|
-
|
|
2612
|
+
/* @__PURE__ */ r(
|
|
2613
|
+
ve,
|
|
2548
2614
|
{
|
|
2549
|
-
content:
|
|
2550
|
-
classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
|
|
2615
|
+
content: o(),
|
|
2551
2616
|
showContent: !0,
|
|
2552
2617
|
model: e.model,
|
|
2553
2618
|
data: e.data,
|
|
@@ -2564,13 +2629,13 @@ function Pe(e) {
|
|
|
2564
2629
|
)
|
|
2565
2630
|
] });
|
|
2566
2631
|
}
|
|
2567
|
-
const
|
|
2632
|
+
const Zt = async ({
|
|
2568
2633
|
builderContextValue: e,
|
|
2569
2634
|
symbol: t
|
|
2570
2635
|
}) => {
|
|
2571
2636
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2572
2637
|
(e != null && e.apiKey))
|
|
2573
|
-
return
|
|
2638
|
+
return Ce({
|
|
2574
2639
|
model: t.model,
|
|
2575
2640
|
apiKey: e.apiKey,
|
|
2576
2641
|
apiVersion: e.apiVersion,
|
|
@@ -2580,11 +2645,11 @@ const Qt = async ({
|
|
|
2580
2645
|
}
|
|
2581
2646
|
}
|
|
2582
2647
|
}).catch((n) => {
|
|
2583
|
-
|
|
2648
|
+
M.error("Could not fetch symbol content: ", n);
|
|
2584
2649
|
});
|
|
2585
2650
|
};
|
|
2586
|
-
function
|
|
2587
|
-
var
|
|
2651
|
+
function en(e) {
|
|
2652
|
+
var o, l, s;
|
|
2588
2653
|
function t() {
|
|
2589
2654
|
var c, d;
|
|
2590
2655
|
return [
|
|
@@ -2594,23 +2659,23 @@ function Xt(e) {
|
|
|
2594
2659
|
(d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2595
2660
|
].filter(Boolean).join(" ");
|
|
2596
2661
|
}
|
|
2597
|
-
const [n, i] =
|
|
2662
|
+
const [n, i] = p(() => {
|
|
2598
2663
|
var c;
|
|
2599
2664
|
return (c = e.symbol) == null ? void 0 : c.content;
|
|
2600
2665
|
});
|
|
2601
|
-
function
|
|
2602
|
-
n ||
|
|
2666
|
+
function a() {
|
|
2667
|
+
n || Zt({
|
|
2603
2668
|
symbol: e.symbol,
|
|
2604
2669
|
builderContextValue: e.builderContext
|
|
2605
2670
|
}).then((c) => {
|
|
2606
2671
|
c && i(c);
|
|
2607
2672
|
});
|
|
2608
2673
|
}
|
|
2609
|
-
return
|
|
2610
|
-
}, []),
|
|
2611
|
-
|
|
2612
|
-
}, [e.symbol]), /* @__PURE__ */
|
|
2613
|
-
|
|
2674
|
+
return P(() => {
|
|
2675
|
+
}, []), P(() => {
|
|
2676
|
+
a();
|
|
2677
|
+
}, [e.symbol]), /* @__PURE__ */ r("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ r(
|
|
2678
|
+
Ae,
|
|
2614
2679
|
{
|
|
2615
2680
|
__isNestedRender: !0,
|
|
2616
2681
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2618,40 +2683,40 @@ function Xt(e) {
|
|
|
2618
2683
|
context: e.builderContext.context,
|
|
2619
2684
|
customComponents: Object.values(e.builderComponents),
|
|
2620
2685
|
data: {
|
|
2621
|
-
...(
|
|
2686
|
+
...(o = e.symbol) == null ? void 0 : o.data,
|
|
2622
2687
|
...e.builderContext.localState,
|
|
2623
|
-
...(
|
|
2688
|
+
...(l = n == null ? void 0 : n.data) == null ? void 0 : l.state
|
|
2624
2689
|
},
|
|
2625
|
-
model: (
|
|
2690
|
+
model: (s = e.symbol) == null ? void 0 : s.model,
|
|
2626
2691
|
content: n
|
|
2627
2692
|
}
|
|
2628
2693
|
) });
|
|
2629
2694
|
}
|
|
2630
|
-
const
|
|
2695
|
+
const on = ie, rn = Ae;
|
|
2631
2696
|
export {
|
|
2632
2697
|
ie as Blocks,
|
|
2633
2698
|
je as Button,
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2699
|
+
st as Columns,
|
|
2700
|
+
Ae as Content,
|
|
2701
|
+
dt as Fragment,
|
|
2702
|
+
ft as Image,
|
|
2703
|
+
on as RenderBlocks,
|
|
2704
|
+
rn as RenderContent,
|
|
2705
|
+
ht as Section,
|
|
2706
|
+
en as Symbol,
|
|
2707
|
+
Vt as Text,
|
|
2643
2708
|
Bt as Video,
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2709
|
+
sn as _processContentResult,
|
|
2710
|
+
We as createRegisterComponentMessage,
|
|
2711
|
+
dn as fetchBuilderProps,
|
|
2712
|
+
un as fetchEntries,
|
|
2713
|
+
Ce as fetchOneEntry,
|
|
2714
|
+
mn as getAllContent,
|
|
2715
|
+
fn as getBuilderSearchParams,
|
|
2716
|
+
hn as getContent,
|
|
2717
|
+
$ as isEditing,
|
|
2718
|
+
Fe as isPreviewing,
|
|
2719
|
+
Ne as register,
|
|
2720
|
+
gn as setEditorSettings,
|
|
2721
|
+
bn as track
|
|
2657
2722
|
};
|