@builder.io/sdk-react 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.cjs +117 -25
- package/lib/browser/index.mjs +835 -767
- package/lib/edge/index.cjs +121 -29
- package/lib/edge/index.mjs +1112 -1044
- package/lib/node/index.cjs +106 -14
- package/lib/node/index.mjs +492 -424
- package/package.json +9 -2
- package/types/blocks/video/video.d.ts +4 -0
- 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 S, 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
|
-
var
|
|
319
|
-
const i =
|
|
318
|
+
var v;
|
|
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
|
-
((
|
|
328
|
-
),
|
|
326
|
+
}), a = i.responsiveStyles, o = e.context.content, l = Te(
|
|
327
|
+
((v = o == null ? void 0 : o.meta) == null ? void 0 : v.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
|
-
}) : "", y = c ?
|
|
333
|
+
styles: s
|
|
334
|
+
}) : "", y = 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, y, 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] = S(
|
|
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] = S(() => 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, y, 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,7 @@ function z(e) {
|
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
577
|
function i() {
|
|
578
|
-
return n() ? e.block :
|
|
578
|
+
return n() ? e.block : D({
|
|
579
579
|
block: e.block,
|
|
580
580
|
localState: e.context.localState,
|
|
581
581
|
rootState: e.context.rootState,
|
|
@@ -584,118 +584,118 @@ function z(e) {
|
|
|
584
584
|
shouldEvaluateBindings: !0
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function a() {
|
|
588
588
|
return e.block.tagName || "div";
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function o() {
|
|
591
591
|
return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
|
|
592
592
|
}
|
|
593
|
-
function r() {
|
|
594
|
-
var S;
|
|
595
|
-
return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
|
|
596
|
-
}
|
|
597
593
|
function l() {
|
|
598
|
-
var
|
|
594
|
+
var p;
|
|
595
|
+
return !((p = t == null ? void 0 : t()) != null && p.component) && !n() ? i().children ?? [] : [];
|
|
596
|
+
}
|
|
597
|
+
function s() {
|
|
598
|
+
var v, p, E, R, C;
|
|
599
599
|
return {
|
|
600
600
|
blockChildren: i().children ?? [],
|
|
601
|
-
componentRef: (
|
|
601
|
+
componentRef: (v = t == null ? void 0 : t()) == null ? void 0 : v.component,
|
|
602
602
|
componentOptions: {
|
|
603
603
|
...Me(i()),
|
|
604
604
|
builderContext: e.context,
|
|
605
|
-
...((
|
|
605
|
+
...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
|
|
606
606
|
builderComponents: e.registeredComponents
|
|
607
607
|
} : {}
|
|
608
608
|
},
|
|
609
609
|
context: c,
|
|
610
610
|
registeredComponents: e.registeredComponents,
|
|
611
611
|
builderBlock: i(),
|
|
612
|
-
includeBlockProps: ((
|
|
613
|
-
isInteractive: !((
|
|
612
|
+
includeBlockProps: ((R = t == null ? void 0 : t()) == null ? void 0 : R.noWrap) === !0,
|
|
613
|
+
isInteractive: !((C = t == null ? void 0 : t()) != null && C.isRSC)
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
const [c, d] =
|
|
617
|
-
return /* @__PURE__ */
|
|
618
|
-
|
|
616
|
+
const [c, d] = S(() => e.context);
|
|
617
|
+
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(
|
|
618
|
+
he,
|
|
619
619
|
{
|
|
620
|
-
componentRef:
|
|
621
|
-
componentOptions:
|
|
622
|
-
blockChildren:
|
|
623
|
-
context:
|
|
624
|
-
registeredComponents:
|
|
625
|
-
builderBlock:
|
|
626
|
-
includeBlockProps:
|
|
627
|
-
isInteractive:
|
|
620
|
+
componentRef: s().componentRef,
|
|
621
|
+
componentOptions: s().componentOptions,
|
|
622
|
+
blockChildren: s().blockChildren,
|
|
623
|
+
context: s().context,
|
|
624
|
+
registeredComponents: s().registeredComponents,
|
|
625
|
+
builderBlock: s().builderBlock,
|
|
626
|
+
includeBlockProps: s().includeBlockProps,
|
|
627
|
+
isInteractive: s().isInteractive
|
|
628
628
|
}
|
|
629
|
-
) }) : /* @__PURE__ */
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
) }) : /* @__PURE__ */ T(f, { children: [
|
|
630
|
+
q(a()) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
631
|
+
fe,
|
|
632
632
|
{
|
|
633
|
-
Wrapper:
|
|
633
|
+
Wrapper: a(),
|
|
634
634
|
block: i(),
|
|
635
635
|
context: e.context,
|
|
636
636
|
hasChildren: !1
|
|
637
637
|
}
|
|
638
638
|
) }) : null,
|
|
639
|
-
!
|
|
640
|
-
|
|
639
|
+
!q(a()) && n() ? /* @__PURE__ */ r(f, { children: (g = n()) == null ? void 0 : g.map((v, p) => /* @__PURE__ */ r(
|
|
640
|
+
lt,
|
|
641
641
|
{
|
|
642
|
-
repeatContext:
|
|
643
|
-
block:
|
|
642
|
+
repeatContext: v.context,
|
|
643
|
+
block: v.block,
|
|
644
644
|
registeredComponents: e.registeredComponents
|
|
645
645
|
},
|
|
646
|
-
|
|
646
|
+
p
|
|
647
647
|
)) }) : null,
|
|
648
|
-
!
|
|
649
|
-
|
|
648
|
+
!q(a()) && !n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
|
|
649
|
+
fe,
|
|
650
650
|
{
|
|
651
|
-
Wrapper:
|
|
651
|
+
Wrapper: a(),
|
|
652
652
|
block: i(),
|
|
653
653
|
context: e.context,
|
|
654
654
|
hasChildren: !0,
|
|
655
655
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
|
|
656
|
+
/* @__PURE__ */ r(
|
|
657
|
+
he,
|
|
658
658
|
{
|
|
659
|
-
componentRef:
|
|
660
|
-
componentOptions:
|
|
661
|
-
blockChildren:
|
|
662
|
-
context:
|
|
663
|
-
registeredComponents:
|
|
664
|
-
builderBlock:
|
|
665
|
-
includeBlockProps:
|
|
666
|
-
isInteractive:
|
|
659
|
+
componentRef: s().componentRef,
|
|
660
|
+
componentOptions: s().componentOptions,
|
|
661
|
+
blockChildren: s().blockChildren,
|
|
662
|
+
context: s().context,
|
|
663
|
+
registeredComponents: s().registeredComponents,
|
|
664
|
+
builderBlock: s().builderBlock,
|
|
665
|
+
includeBlockProps: s().includeBlockProps,
|
|
666
|
+
isInteractive: s().isInteractive
|
|
667
667
|
}
|
|
668
668
|
),
|
|
669
|
-
(y =
|
|
670
|
-
|
|
669
|
+
(y = l()) == null ? void 0 : y.map((v) => /* @__PURE__ */ r(
|
|
670
|
+
H,
|
|
671
671
|
{
|
|
672
|
-
block:
|
|
672
|
+
block: v,
|
|
673
673
|
context: c,
|
|
674
674
|
registeredComponents: e.registeredComponents
|
|
675
675
|
},
|
|
676
|
-
"block-" +
|
|
676
|
+
"block-" + v.id
|
|
677
677
|
)),
|
|
678
|
-
(
|
|
678
|
+
(V = l()) == null ? void 0 : V.map((v) => /* @__PURE__ */ r(
|
|
679
679
|
ne,
|
|
680
680
|
{
|
|
681
|
-
block:
|
|
681
|
+
block: v,
|
|
682
682
|
context: c
|
|
683
683
|
},
|
|
684
|
-
"block-style-" +
|
|
684
|
+
"block-style-" + v.id
|
|
685
685
|
))
|
|
686
686
|
]
|
|
687
687
|
}
|
|
688
688
|
) }) : null
|
|
689
689
|
] }) }) : null });
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function ct(e) {
|
|
692
692
|
function t() {
|
|
693
|
-
var
|
|
694
|
-
return "builder-blocks" + ((
|
|
693
|
+
var a;
|
|
694
|
+
return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
|
|
695
695
|
}
|
|
696
696
|
function n() {
|
|
697
|
-
var
|
|
698
|
-
|
|
697
|
+
var a, o;
|
|
698
|
+
$() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
|
|
699
699
|
{
|
|
700
700
|
type: "builder.clickEmptyBlocks",
|
|
701
701
|
data: {
|
|
@@ -707,8 +707,8 @@ function rt(e) {
|
|
|
707
707
|
));
|
|
708
708
|
}
|
|
709
709
|
function i() {
|
|
710
|
-
var
|
|
711
|
-
|
|
710
|
+
var a, o;
|
|
711
|
+
$() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
|
|
712
712
|
{
|
|
713
713
|
type: "builder.hoverEmptyBlocks",
|
|
714
714
|
data: {
|
|
@@ -719,21 +719,21 @@ function rt(e) {
|
|
|
719
719
|
"*"
|
|
720
720
|
));
|
|
721
721
|
}
|
|
722
|
-
return /* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
723
|
+
/* @__PURE__ */ r(
|
|
724
724
|
"div",
|
|
725
725
|
{
|
|
726
726
|
className: t() + " div-02c7a115",
|
|
727
727
|
"builder-path": e.path,
|
|
728
728
|
"builder-parent-id": e.parent,
|
|
729
729
|
style: e.styleProp,
|
|
730
|
-
onClick: (
|
|
731
|
-
onMouseEnter: (
|
|
732
|
-
onKeyPress: (
|
|
730
|
+
onClick: (a) => n(),
|
|
731
|
+
onMouseEnter: (a) => i(),
|
|
732
|
+
onKeyPress: (a) => n(),
|
|
733
733
|
children: e.children
|
|
734
734
|
}
|
|
735
735
|
),
|
|
736
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ r("style", { children: `.div-02c7a115 {
|
|
737
737
|
display: flex;
|
|
738
738
|
flex-direction: column;
|
|
739
739
|
align-items: stretch;
|
|
@@ -741,108 +741,108 @@ function rt(e) {
|
|
|
741
741
|
] });
|
|
742
742
|
}
|
|
743
743
|
function ie(e) {
|
|
744
|
-
var i,
|
|
745
|
-
const t =
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
-
|
|
744
|
+
var i, a;
|
|
745
|
+
const t = le(te), n = le(we);
|
|
746
|
+
return /* @__PURE__ */ T(
|
|
747
|
+
ct,
|
|
748
748
|
{
|
|
749
749
|
blocks: e.blocks,
|
|
750
750
|
parent: e.parent,
|
|
751
751
|
path: e.path,
|
|
752
752
|
styleProp: e.styleProp,
|
|
753
753
|
children: [
|
|
754
|
-
e.blocks ? /* @__PURE__ */
|
|
755
|
-
|
|
754
|
+
e.blocks ? /* @__PURE__ */ r(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
|
|
755
|
+
H,
|
|
756
756
|
{
|
|
757
|
-
block:
|
|
757
|
+
block: o,
|
|
758
758
|
context: e.context || t,
|
|
759
759
|
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
760
760
|
},
|
|
761
|
-
"render-block-" +
|
|
761
|
+
"render-block-" + o.id
|
|
762
762
|
)) }) : null,
|
|
763
|
-
e.blocks ? /* @__PURE__ */
|
|
763
|
+
e.blocks ? /* @__PURE__ */ r(f, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
|
|
764
764
|
ne,
|
|
765
765
|
{
|
|
766
|
-
block:
|
|
766
|
+
block: o,
|
|
767
767
|
context: e.context || t
|
|
768
768
|
},
|
|
769
|
-
"block-style-" +
|
|
769
|
+
"block-style-" + o.id
|
|
770
770
|
)) }) : null
|
|
771
771
|
]
|
|
772
772
|
}
|
|
773
773
|
);
|
|
774
774
|
}
|
|
775
|
-
function
|
|
776
|
-
var
|
|
777
|
-
const [t, n] =
|
|
775
|
+
function st(e) {
|
|
776
|
+
var R;
|
|
777
|
+
const [t, n] = S(
|
|
778
778
|
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
779
|
-
), [i,
|
|
779
|
+
), [i, a] = S(() => e.columns || []), [o, l] = S(
|
|
780
780
|
() => e.stackColumnsAt || "tablet"
|
|
781
781
|
);
|
|
782
|
-
function
|
|
783
|
-
var
|
|
784
|
-
return ((
|
|
782
|
+
function s(C) {
|
|
783
|
+
var w;
|
|
784
|
+
return ((w = i[C]) == null ? void 0 : w.width) || 100 / i.length;
|
|
785
785
|
}
|
|
786
|
-
function c(
|
|
787
|
-
const
|
|
788
|
-
return `calc(${
|
|
786
|
+
function c(C) {
|
|
787
|
+
const w = t * (i.length - 1) / i.length;
|
|
788
|
+
return `calc(${s(C)}% - ${w}px)`;
|
|
789
789
|
}
|
|
790
790
|
function d({
|
|
791
|
-
stackedStyle:
|
|
792
|
-
desktopStyle:
|
|
791
|
+
stackedStyle: C,
|
|
792
|
+
desktopStyle: w
|
|
793
793
|
}) {
|
|
794
|
-
return
|
|
794
|
+
return o === "tablet" ? C : w;
|
|
795
795
|
}
|
|
796
796
|
function u({
|
|
797
|
-
stackedStyle:
|
|
798
|
-
desktopStyle:
|
|
797
|
+
stackedStyle: C,
|
|
798
|
+
desktopStyle: w
|
|
799
799
|
}) {
|
|
800
|
-
return
|
|
800
|
+
return o === "never" ? w : C;
|
|
801
801
|
}
|
|
802
|
-
const [
|
|
802
|
+
const [g, y] = S(
|
|
803
803
|
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
804
804
|
);
|
|
805
|
-
function
|
|
805
|
+
function V() {
|
|
806
806
|
return {
|
|
807
|
-
"--flex-dir":
|
|
807
|
+
"--flex-dir": g,
|
|
808
808
|
"--flex-dir-tablet": d({
|
|
809
|
-
stackedStyle:
|
|
809
|
+
stackedStyle: g,
|
|
810
810
|
desktopStyle: "row"
|
|
811
811
|
})
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
const
|
|
814
|
+
function v(C) {
|
|
815
|
+
const w = C === 0 ? 0 : t, A = c(C), B = `${w}px`, F = "100%", W = 0;
|
|
816
816
|
return {
|
|
817
|
-
width:
|
|
818
|
-
["marginLeft"]:
|
|
817
|
+
width: A,
|
|
818
|
+
["marginLeft"]: B,
|
|
819
819
|
"--column-width-mobile": u({
|
|
820
|
-
stackedStyle:
|
|
821
|
-
desktopStyle:
|
|
820
|
+
stackedStyle: F,
|
|
821
|
+
desktopStyle: A
|
|
822
822
|
}),
|
|
823
823
|
"--column-margin-left-mobile": u({
|
|
824
824
|
stackedStyle: W,
|
|
825
|
-
desktopStyle:
|
|
825
|
+
desktopStyle: B
|
|
826
826
|
}),
|
|
827
827
|
"--column-width-tablet": d({
|
|
828
|
-
stackedStyle:
|
|
829
|
-
desktopStyle:
|
|
828
|
+
stackedStyle: F,
|
|
829
|
+
desktopStyle: A
|
|
830
830
|
}),
|
|
831
831
|
"--column-margin-left-tablet": d({
|
|
832
832
|
stackedStyle: W,
|
|
833
|
-
desktopStyle:
|
|
833
|
+
desktopStyle: B
|
|
834
834
|
})
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
var
|
|
839
|
-
return
|
|
840
|
-
((
|
|
841
|
-
)[
|
|
837
|
+
function p(C) {
|
|
838
|
+
var A, B;
|
|
839
|
+
return Te(
|
|
840
|
+
((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
|
|
841
|
+
)[C].max;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function E() {
|
|
844
844
|
return `
|
|
845
|
-
@media (max-width: ${
|
|
845
|
+
@media (max-width: ${p("medium")}px) {
|
|
846
846
|
.${e.builderBlock.id}-breakpoints {
|
|
847
847
|
flex-direction: var(--flex-dir-tablet);
|
|
848
848
|
align-items: stretch;
|
|
@@ -854,7 +854,7 @@ function lt(e) {
|
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
|
|
857
|
-
@media (max-width: ${
|
|
857
|
+
@media (max-width: ${p("small")}px) {
|
|
858
858
|
.${e.builderBlock.id}-breakpoints {
|
|
859
859
|
flex-direction: var(--flex-dir);
|
|
860
860
|
align-items: stretch;
|
|
@@ -867,39 +867,39 @@ function lt(e) {
|
|
|
867
867
|
},
|
|
868
868
|
`;
|
|
869
869
|
}
|
|
870
|
-
return /* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */
|
|
870
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
871
|
+
/* @__PURE__ */ T(
|
|
872
872
|
"div",
|
|
873
873
|
{
|
|
874
874
|
className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
|
|
875
|
-
style:
|
|
875
|
+
style: V(),
|
|
876
876
|
children: [
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
(
|
|
877
|
+
/* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: E() }) }),
|
|
878
|
+
(R = e.columns) == null ? void 0 : R.map((C, w) => /* @__PURE__ */ ke(
|
|
879
879
|
"div",
|
|
880
880
|
{
|
|
881
881
|
className: "builder-column div-53636e90-2",
|
|
882
|
-
style:
|
|
883
|
-
key:
|
|
882
|
+
style: v(w),
|
|
883
|
+
key: w
|
|
884
884
|
},
|
|
885
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ r(
|
|
886
886
|
ie,
|
|
887
887
|
{
|
|
888
|
-
path: `component.options.columns.${
|
|
888
|
+
path: `component.options.columns.${w}.blocks`,
|
|
889
889
|
parent: e.builderBlock.id,
|
|
890
890
|
styleProp: {
|
|
891
891
|
flexGrow: "1"
|
|
892
892
|
},
|
|
893
893
|
context: e.builderContext,
|
|
894
894
|
registeredComponents: e.builderComponents,
|
|
895
|
-
blocks:
|
|
895
|
+
blocks: C.blocks
|
|
896
896
|
}
|
|
897
897
|
)
|
|
898
898
|
))
|
|
899
899
|
]
|
|
900
900
|
}
|
|
901
901
|
),
|
|
902
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ r("style", { children: `.div-53636e90 {
|
|
903
903
|
display: flex;
|
|
904
904
|
line-height: normal;
|
|
905
905
|
}.div-53636e90-2 {
|
|
@@ -909,41 +909,41 @@ function lt(e) {
|
|
|
909
909
|
}` })
|
|
910
910
|
] });
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return /* @__PURE__ */
|
|
912
|
+
function dt(e) {
|
|
913
|
+
return /* @__PURE__ */ r("span", { children: e.children });
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function ge(e) {
|
|
916
916
|
return e.replace(/http(s)?:/, "");
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"),
|
|
920
|
-
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e +
|
|
918
|
+
function ut(e = "", t, n) {
|
|
919
|
+
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
|
|
920
|
+
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function mt(e, t) {
|
|
923
923
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
924
924
|
return e;
|
|
925
925
|
if (t === "master")
|
|
926
|
-
return
|
|
926
|
+
return ge(e);
|
|
927
927
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
928
928
|
if (n) {
|
|
929
|
-
const i = e.split(n[0]),
|
|
930
|
-
return
|
|
929
|
+
const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
|
|
930
|
+
return ge(`${i[0]}_${o}${a}`);
|
|
931
931
|
}
|
|
932
932
|
return null;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Q(e) {
|
|
935
935
|
if (!e)
|
|
936
936
|
return e;
|
|
937
937
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
938
938
|
if (e.match(/builder\.io/)) {
|
|
939
939
|
let n = e;
|
|
940
940
|
const i = Number(e.split("?width=")[1]);
|
|
941
|
-
return isNaN(i) || (n = `${n} ${i}w`), t.filter((
|
|
941
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${ut(e, "width", a)} ${a}w`).concat([n]).join(", ");
|
|
942
942
|
}
|
|
943
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
943
|
+
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
944
|
}
|
|
945
|
-
function
|
|
946
|
-
var
|
|
945
|
+
function ft(e) {
|
|
946
|
+
var a, o, l, s;
|
|
947
947
|
function t() {
|
|
948
948
|
var u;
|
|
949
949
|
const d = e.image || e.src;
|
|
@@ -953,10 +953,10 @@ function ut(e) {
|
|
|
953
953
|
return e.srcset;
|
|
954
954
|
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
955
955
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
956
|
-
return console.debug("Removed given srcset"),
|
|
956
|
+
return console.debug("Removed given srcset"), Q(d);
|
|
957
957
|
} else if (e.image && !e.srcset)
|
|
958
|
-
return
|
|
959
|
-
return
|
|
958
|
+
return Q(d);
|
|
959
|
+
return Q(d);
|
|
960
960
|
}
|
|
961
961
|
function n() {
|
|
962
962
|
var c;
|
|
@@ -972,11 +972,11 @@ function ut(e) {
|
|
|
972
972
|
};
|
|
973
973
|
return e.aspectRatio ? c : void 0;
|
|
974
974
|
}
|
|
975
|
-
return /* @__PURE__ */
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
n() ? /* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
975
|
+
return /* @__PURE__ */ T(f, { children: [
|
|
976
|
+
/* @__PURE__ */ T(f, { children: [
|
|
977
|
+
/* @__PURE__ */ T("picture", { children: [
|
|
978
|
+
n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
979
|
+
/* @__PURE__ */ r(
|
|
980
980
|
"img",
|
|
981
981
|
{
|
|
982
982
|
loading: "lazy",
|
|
@@ -994,7 +994,7 @@ function ut(e) {
|
|
|
994
994
|
}
|
|
995
995
|
)
|
|
996
996
|
] }),
|
|
997
|
-
e.aspectRatio && !((
|
|
997
|
+
e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
998
998
|
"div",
|
|
999
999
|
{
|
|
1000
1000
|
className: "builder-image-sizer div-dbab4030",
|
|
@@ -1003,10 +1003,10 @@ function ut(e) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
) }) : null,
|
|
1006
|
-
(
|
|
1007
|
-
!e.fitContent && e.children ? /* @__PURE__ */
|
|
1006
|
+
(s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: e.children }) : null,
|
|
1007
|
+
!e.fitContent && e.children ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("div", { className: "div-dbab4030-2", children: e.children }) }) : null
|
|
1008
1008
|
] }),
|
|
1009
|
-
/* @__PURE__ */
|
|
1009
|
+
/* @__PURE__ */ r("style", { children: `.img-dbab4030 {
|
|
1010
1010
|
opacity: 1;
|
|
1011
1011
|
transition: opacity 0.2s ease-in-out;
|
|
1012
1012
|
}.div-dbab4030 {
|
|
@@ -1025,8 +1025,8 @@ function ut(e) {
|
|
|
1025
1025
|
}` })
|
|
1026
1026
|
] });
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return /* @__PURE__ */
|
|
1028
|
+
function ht(e) {
|
|
1029
|
+
return /* @__PURE__ */ r(
|
|
1030
1030
|
"section",
|
|
1031
1031
|
{
|
|
1032
1032
|
...e.attributes,
|
|
@@ -1046,7 +1046,7 @@ function mt(e) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
);
|
|
1048
1048
|
}
|
|
1049
|
-
const
|
|
1049
|
+
const gt = {
|
|
1050
1050
|
name: "Core:Button",
|
|
1051
1051
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1052
1052
|
defaultStyles: {
|
|
@@ -1079,7 +1079,7 @@ const ft = {
|
|
|
1079
1079
|
}],
|
|
1080
1080
|
static: !0,
|
|
1081
1081
|
noWrap: !0
|
|
1082
|
-
},
|
|
1082
|
+
}, bt = {
|
|
1083
1083
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1084
1084
|
name: "Columns",
|
|
1085
1085
|
isRSC: !0,
|
|
@@ -1258,7 +1258,7 @@ const ft = {
|
|
|
1258
1258
|
});
|
|
1259
1259
|
}
|
|
1260
1260
|
const n = e.get("columns");
|
|
1261
|
-
Array.isArray(n) && n.find((
|
|
1261
|
+
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
1262
|
}
|
|
1263
1263
|
}, {
|
|
1264
1264
|
name: "space",
|
|
@@ -1280,7 +1280,7 @@ const ft = {
|
|
|
1280
1280
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1281
1281
|
advanced: !0
|
|
1282
1282
|
}]
|
|
1283
|
-
},
|
|
1283
|
+
}, xt = {
|
|
1284
1284
|
name: "Custom Code",
|
|
1285
1285
|
static: !0,
|
|
1286
1286
|
requiredPermissions: ["editCode"],
|
|
@@ -1303,15 +1303,15 @@ const ft = {
|
|
|
1303
1303
|
advanced: !0
|
|
1304
1304
|
}]
|
|
1305
1305
|
};
|
|
1306
|
-
function
|
|
1307
|
-
const t = Z(null), [n, i] =
|
|
1308
|
-
return
|
|
1309
|
-
var
|
|
1310
|
-
if (!((
|
|
1306
|
+
function yt(e) {
|
|
1307
|
+
const t = Z(null), [n, i] = S(() => []), [a, o] = S(() => []);
|
|
1308
|
+
return P(() => {
|
|
1309
|
+
var s;
|
|
1310
|
+
if (!((s = t.current) != null && s.getElementsByTagName) || typeof window > "u")
|
|
1311
1311
|
return;
|
|
1312
|
-
const
|
|
1313
|
-
for (let c = 0; c <
|
|
1314
|
-
const d =
|
|
1312
|
+
const l = t.current.getElementsByTagName("script");
|
|
1313
|
+
for (let c = 0; c < l.length; c++) {
|
|
1314
|
+
const d = l[c];
|
|
1315
1315
|
if (d.src) {
|
|
1316
1316
|
if (n.includes(d.src))
|
|
1317
1317
|
continue;
|
|
@@ -1323,16 +1323,16 @@ function bt(e) {
|
|
|
1323
1323
|
"application/javascript",
|
|
1324
1324
|
"application/ecmascript"
|
|
1325
1325
|
].includes(d.type)) {
|
|
1326
|
-
if (
|
|
1326
|
+
if (a.includes(d.innerText))
|
|
1327
1327
|
continue;
|
|
1328
1328
|
try {
|
|
1329
|
-
|
|
1329
|
+
a.push(d.innerText), new Function(d.innerText)();
|
|
1330
1330
|
} catch (u) {
|
|
1331
1331
|
console.warn("`CustomCode`: Error running script:", u);
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
|
-
}, []), /* @__PURE__ */
|
|
1335
|
+
}, []), /* @__PURE__ */ r(
|
|
1336
1336
|
"div",
|
|
1337
1337
|
{
|
|
1338
1338
|
ref: t,
|
|
@@ -1341,7 +1341,7 @@ function bt(e) {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
);
|
|
1343
1343
|
}
|
|
1344
|
-
const
|
|
1344
|
+
const St = {
|
|
1345
1345
|
name: "Embed",
|
|
1346
1346
|
static: !0,
|
|
1347
1347
|
inputs: [{
|
|
@@ -1366,30 +1366,30 @@ const xt = {
|
|
|
1366
1366
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1367
1367
|
hideFromUI: !0
|
|
1368
1368
|
}]
|
|
1369
|
-
},
|
|
1370
|
-
function
|
|
1371
|
-
const t = Z(null), [n, i] =
|
|
1369
|
+
}, vt = ["text/javascript", "application/javascript", "application/ecmascript"], pt = (e) => vt.includes(e.type);
|
|
1370
|
+
function kt(e) {
|
|
1371
|
+
const t = Z(null), [n, i] = S(() => []), [a, o] = S(() => []), [l, s] = S(() => !1);
|
|
1372
1372
|
function c() {
|
|
1373
1373
|
if (!t.current || !t.current.getElementsByTagName)
|
|
1374
1374
|
return;
|
|
1375
1375
|
const d = t.current.getElementsByTagName("script");
|
|
1376
1376
|
for (let u = 0; u < d.length; u++) {
|
|
1377
|
-
const
|
|
1378
|
-
if (
|
|
1379
|
-
n.push(
|
|
1377
|
+
const g = d[u];
|
|
1378
|
+
if (g.src && !n.includes(g.src)) {
|
|
1379
|
+
n.push(g.src);
|
|
1380
1380
|
const y = document.createElement("script");
|
|
1381
|
-
y.async = !0, y.src =
|
|
1382
|
-
} else if (
|
|
1381
|
+
y.async = !0, y.src = g.src, document.head.appendChild(y);
|
|
1382
|
+
} else if (pt(g) && !a.includes(g.innerText))
|
|
1383
1383
|
try {
|
|
1384
|
-
|
|
1384
|
+
a.push(g.innerText), new Function(g.innerText)();
|
|
1385
1385
|
} catch (y) {
|
|
1386
1386
|
console.warn("`Embed`: Error running script:", y);
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
return
|
|
1391
|
-
t.current && !
|
|
1392
|
-
}, [t.current,
|
|
1390
|
+
return P(() => {
|
|
1391
|
+
t.current && !l && (s(!0), c());
|
|
1392
|
+
}, [t.current, l]), /* @__PURE__ */ r(
|
|
1393
1393
|
"div",
|
|
1394
1394
|
{
|
|
1395
1395
|
className: "builder-embed",
|
|
@@ -1398,13 +1398,13 @@ function vt(e) {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
);
|
|
1400
1400
|
}
|
|
1401
|
-
const
|
|
1401
|
+
const Ct = {
|
|
1402
1402
|
name: "Fragment",
|
|
1403
1403
|
static: !0,
|
|
1404
1404
|
hidden: !0,
|
|
1405
1405
|
canHaveChildren: !0,
|
|
1406
1406
|
noWrap: !0
|
|
1407
|
-
},
|
|
1407
|
+
}, wt = {
|
|
1408
1408
|
name: "Image",
|
|
1409
1409
|
static: !0,
|
|
1410
1410
|
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 +1424,29 @@ const pt = {
|
|
|
1424
1424
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1425
1425
|
onChange: (e) => {
|
|
1426
1426
|
e.delete("srcset"), e.delete("noWebp");
|
|
1427
|
-
function n(
|
|
1427
|
+
function n(l, s = 6e4) {
|
|
1428
1428
|
return new Promise((c, d) => {
|
|
1429
1429
|
const u = document.createElement("img");
|
|
1430
|
-
let
|
|
1430
|
+
let g = !1;
|
|
1431
1431
|
u.onload = () => {
|
|
1432
|
-
|
|
1432
|
+
g = !0, c(u);
|
|
1433
1433
|
}, u.addEventListener("error", (y) => {
|
|
1434
1434
|
console.warn("Image load failed", y.error), d(y.error);
|
|
1435
|
-
}), u.src =
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1435
|
+
}), u.src = l, setTimeout(() => {
|
|
1436
|
+
g || d(new Error("Image load timed out"));
|
|
1437
|
+
}, s);
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
1440
|
-
function i(
|
|
1441
|
-
return Math.round(
|
|
1440
|
+
function i(l) {
|
|
1441
|
+
return Math.round(l * 1e3) / 1e3;
|
|
1442
1442
|
}
|
|
1443
|
-
const
|
|
1444
|
-
if (fetch(
|
|
1445
|
-
|
|
1446
|
-
}),
|
|
1447
|
-
return n(
|
|
1448
|
-
const
|
|
1449
|
-
e.get("image") ===
|
|
1443
|
+
const a = e.get("image"), o = e.get("aspectRatio");
|
|
1444
|
+
if (fetch(a).then((l) => l.blob()).then((l) => {
|
|
1445
|
+
l.type.includes("svg") && e.set("noWebp", !0);
|
|
1446
|
+
}), a && (!o || o === 0.7041))
|
|
1447
|
+
return n(a).then((l) => {
|
|
1448
|
+
const s = e.get("aspectRatio");
|
|
1449
|
+
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
1450
|
});
|
|
1451
1451
|
}
|
|
1452
1452
|
}, {
|
|
@@ -1504,7 +1504,7 @@ const pt = {
|
|
|
1504
1504
|
advanced: !0,
|
|
1505
1505
|
defaultValue: 0.7041
|
|
1506
1506
|
}]
|
|
1507
|
-
},
|
|
1507
|
+
}, It = {
|
|
1508
1508
|
// friendlyName?
|
|
1509
1509
|
name: "Raw:Img",
|
|
1510
1510
|
hideFromInsertMenu: !0,
|
|
@@ -1519,8 +1519,8 @@ const pt = {
|
|
|
1519
1519
|
noWrap: !0,
|
|
1520
1520
|
static: !0
|
|
1521
1521
|
};
|
|
1522
|
-
function
|
|
1523
|
-
return /* @__PURE__ */
|
|
1522
|
+
function Tt(e) {
|
|
1523
|
+
return /* @__PURE__ */ r(
|
|
1524
1524
|
"img",
|
|
1525
1525
|
{
|
|
1526
1526
|
style: {
|
|
@@ -1531,10 +1531,10 @@ function wt(e) {
|
|
|
1531
1531
|
src: e.imgSrc || e.image,
|
|
1532
1532
|
...e.attributes
|
|
1533
1533
|
},
|
|
1534
|
-
|
|
1534
|
+
$() && e.imgSrc || "default-key"
|
|
1535
1535
|
);
|
|
1536
1536
|
}
|
|
1537
|
-
const
|
|
1537
|
+
const Rt = {
|
|
1538
1538
|
name: "Core:Section",
|
|
1539
1539
|
static: !0,
|
|
1540
1540
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1573,7 +1573,7 @@ const It = {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
}]
|
|
1576
|
-
},
|
|
1576
|
+
}, Et = {
|
|
1577
1577
|
name: "Symbol",
|
|
1578
1578
|
noWrap: !0,
|
|
1579
1579
|
static: !0,
|
|
@@ -1606,7 +1606,7 @@ const It = {
|
|
|
1606
1606
|
hideFromUI: !0,
|
|
1607
1607
|
type: "boolean"
|
|
1608
1608
|
}]
|
|
1609
|
-
},
|
|
1609
|
+
}, Pt = {
|
|
1610
1610
|
name: "Text",
|
|
1611
1611
|
static: !0,
|
|
1612
1612
|
isRSC: !0,
|
|
@@ -1625,9 +1625,9 @@ const It = {
|
|
|
1625
1625
|
textAlign: "center"
|
|
1626
1626
|
}
|
|
1627
1627
|
};
|
|
1628
|
-
function
|
|
1628
|
+
function Vt(e) {
|
|
1629
1629
|
var t;
|
|
1630
|
-
return /* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ r(
|
|
1631
1631
|
"div",
|
|
1632
1632
|
{
|
|
1633
1633
|
className: "builder-text",
|
|
@@ -1638,7 +1638,7 @@ function Et(e) {
|
|
|
1638
1638
|
}
|
|
1639
1639
|
);
|
|
1640
1640
|
}
|
|
1641
|
-
const
|
|
1641
|
+
const At = {
|
|
1642
1642
|
name: "Video",
|
|
1643
1643
|
canHaveChildren: !0,
|
|
1644
1644
|
defaultStyles: {
|
|
@@ -1721,7 +1721,7 @@ const Pt = {
|
|
|
1721
1721
|
}]
|
|
1722
1722
|
};
|
|
1723
1723
|
function Bt(e) {
|
|
1724
|
-
var i;
|
|
1724
|
+
var i, a, o, l, s, c, d;
|
|
1725
1725
|
function t() {
|
|
1726
1726
|
return {
|
|
1727
1727
|
...e.autoPlay === !0 ? {
|
|
@@ -1743,165 +1743,236 @@ function Bt(e) {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
function n() {
|
|
1745
1745
|
return {
|
|
1746
|
-
...e.attributes,
|
|
1747
1746
|
...t()
|
|
1748
1747
|
};
|
|
1749
1748
|
}
|
|
1750
|
-
return /* @__PURE__ */
|
|
1751
|
-
"
|
|
1749
|
+
return /* @__PURE__ */ T(
|
|
1750
|
+
"div",
|
|
1752
1751
|
{
|
|
1753
|
-
...n(),
|
|
1754
|
-
preload: e.preload || "metadata",
|
|
1755
1752
|
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
|
|
1753
|
+
position: "relative"
|
|
1764
1754
|
},
|
|
1765
|
-
|
|
1766
|
-
|
|
1755
|
+
children: [
|
|
1756
|
+
/* @__PURE__ */ r(
|
|
1757
|
+
"video",
|
|
1758
|
+
{
|
|
1759
|
+
className: "builder-video",
|
|
1760
|
+
...n(),
|
|
1761
|
+
preload: e.preload || "metadata",
|
|
1762
|
+
style: {
|
|
1763
|
+
width: "100%",
|
|
1764
|
+
height: "100%",
|
|
1765
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1766
|
+
objectFit: e.fit,
|
|
1767
|
+
objectPosition: e.position,
|
|
1768
|
+
// Hack to get object fit to work as expected and
|
|
1769
|
+
// not have the video overflow
|
|
1770
|
+
zIndex: 2,
|
|
1771
|
+
borderRadius: "1px",
|
|
1772
|
+
...e.aspectRatio ? {
|
|
1773
|
+
position: "absolute"
|
|
1774
|
+
} : null
|
|
1775
|
+
},
|
|
1776
|
+
src: e.video || "no-src",
|
|
1777
|
+
poster: e.posterImage,
|
|
1778
|
+
children: e.lazyLoad ? null : /* @__PURE__ */ r("source", { type: "video/mp4", src: e.video })
|
|
1779
|
+
}
|
|
1780
|
+
),
|
|
1781
|
+
e.aspectRatio && !(e.fitContent && ((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length)) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
1782
|
+
"div",
|
|
1783
|
+
{
|
|
1784
|
+
style: {
|
|
1785
|
+
width: "100%",
|
|
1786
|
+
paddingTop: e.aspectRatio * 100 + "%",
|
|
1787
|
+
pointerEvents: "none",
|
|
1788
|
+
fontSize: "0px"
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
) }) : null,
|
|
1792
|
+
(s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
1793
|
+
"div",
|
|
1794
|
+
{
|
|
1795
|
+
style: {
|
|
1796
|
+
display: "flex",
|
|
1797
|
+
flexDirection: "column",
|
|
1798
|
+
alignItems: "stretch"
|
|
1799
|
+
},
|
|
1800
|
+
children: e.children
|
|
1801
|
+
}
|
|
1802
|
+
) }) : null,
|
|
1803
|
+
(d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
1804
|
+
"div",
|
|
1805
|
+
{
|
|
1806
|
+
style: {
|
|
1807
|
+
pointerEvents: "none",
|
|
1808
|
+
display: "flex",
|
|
1809
|
+
flexDirection: "column",
|
|
1810
|
+
alignItems: "stretch",
|
|
1811
|
+
position: "absolute",
|
|
1812
|
+
top: "0",
|
|
1813
|
+
left: "0",
|
|
1814
|
+
width: "100%",
|
|
1815
|
+
height: "100%"
|
|
1816
|
+
},
|
|
1817
|
+
children: e.children
|
|
1818
|
+
}
|
|
1819
|
+
) }) : null
|
|
1820
|
+
]
|
|
1767
1821
|
}
|
|
1768
1822
|
);
|
|
1769
1823
|
}
|
|
1770
|
-
const
|
|
1824
|
+
const be = () => [{
|
|
1771
1825
|
component: je,
|
|
1772
|
-
...ft
|
|
1773
|
-
}, {
|
|
1774
|
-
component: lt,
|
|
1775
|
-
...ht
|
|
1776
|
-
}, {
|
|
1777
|
-
component: bt,
|
|
1778
1826
|
...gt
|
|
1779
1827
|
}, {
|
|
1780
|
-
component:
|
|
1781
|
-
...
|
|
1828
|
+
component: st,
|
|
1829
|
+
...bt
|
|
1782
1830
|
}, {
|
|
1783
|
-
component:
|
|
1784
|
-
...
|
|
1831
|
+
component: yt,
|
|
1832
|
+
...xt
|
|
1785
1833
|
}, {
|
|
1786
|
-
component:
|
|
1787
|
-
...
|
|
1834
|
+
component: kt,
|
|
1835
|
+
...St
|
|
1788
1836
|
}, {
|
|
1789
|
-
component:
|
|
1837
|
+
component: dt,
|
|
1790
1838
|
...Ct
|
|
1791
1839
|
}, {
|
|
1792
|
-
component:
|
|
1793
|
-
...
|
|
1840
|
+
component: ft,
|
|
1841
|
+
...wt
|
|
1794
1842
|
}, {
|
|
1795
|
-
component:
|
|
1796
|
-
...
|
|
1843
|
+
component: Tt,
|
|
1844
|
+
...It
|
|
1797
1845
|
}, {
|
|
1798
|
-
component:
|
|
1846
|
+
component: ht,
|
|
1799
1847
|
...Rt
|
|
1800
1848
|
}, {
|
|
1801
|
-
component:
|
|
1849
|
+
component: en,
|
|
1850
|
+
...Et
|
|
1851
|
+
}, {
|
|
1852
|
+
component: Vt,
|
|
1802
1853
|
...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();
|
|
1854
|
+
}, {
|
|
1855
|
+
component: Bt,
|
|
1856
|
+
...At
|
|
1857
|
+
}], $t = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1858
|
+
function getAndSetVariantId() {
|
|
1859
|
+
function setCookie(name, value, days) {
|
|
1860
|
+
let expires = '';
|
|
1861
|
+
if (days) {
|
|
1862
|
+
const date = new Date();
|
|
1863
|
+
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
1864
|
+
expires = '; expires=' + date.toUTCString();
|
|
1819
1865
|
}
|
|
1820
|
-
document.cookie =
|
|
1866
|
+
document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
|
|
1821
1867
|
}
|
|
1822
|
-
function
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
if (
|
|
1829
|
-
return x.substring(S.length, x.length);
|
|
1868
|
+
function getCookie(name) {
|
|
1869
|
+
const nameEQ = name + '=';
|
|
1870
|
+
const ca = document.cookie.split(';');
|
|
1871
|
+
for (let i = 0; i < ca.length; i++) {
|
|
1872
|
+
let c = ca[i];
|
|
1873
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
1874
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
1830
1875
|
}
|
|
1831
1876
|
return null;
|
|
1832
1877
|
}
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1878
|
+
const cookieName = \`builder.tests.\${contentId}\`;
|
|
1879
|
+
const variantInCookie = getCookie(cookieName);
|
|
1880
|
+
const availableIDs = variants.map(vr => vr.id).concat(contentId);
|
|
1881
|
+
if (variantInCookie && availableIDs.includes(variantInCookie)) {
|
|
1882
|
+
return variantInCookie;
|
|
1883
|
+
}
|
|
1884
|
+
let n = 0;
|
|
1885
|
+
const random = Math.random();
|
|
1886
|
+
for (let i = 0; i < variants.length; i++) {
|
|
1887
|
+
const variant = variants[i];
|
|
1888
|
+
const testRatio = variant.testRatio;
|
|
1889
|
+
n += testRatio;
|
|
1890
|
+
if (random < n) {
|
|
1891
|
+
setCookie(cookieName, variant.id);
|
|
1892
|
+
return variant.id;
|
|
1893
|
+
}
|
|
1842
1894
|
}
|
|
1843
|
-
|
|
1895
|
+
setCookie(cookieName, contentId);
|
|
1896
|
+
return contentId;
|
|
1844
1897
|
}
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1898
|
+
const winningVariantId = getAndSetVariantId();
|
|
1899
|
+
const styleEl = document.currentScript?.previousElementSibling;
|
|
1900
|
+
if (isHydrationTarget) {
|
|
1901
|
+
styleEl.remove();
|
|
1902
|
+
const thisScriptEl = document.currentScript;
|
|
1903
|
+
thisScriptEl?.remove();
|
|
1850
1904
|
} else {
|
|
1851
|
-
const
|
|
1852
|
-
id:
|
|
1853
|
-
}).filter(
|
|
1854
|
-
|
|
1855
|
-
|
|
1905
|
+
const newStyleStr = variants.concat({
|
|
1906
|
+
id: contentId
|
|
1907
|
+
}).filter(variant => variant.id !== winningVariantId).map(value => {
|
|
1908
|
+
return \`.variant-\${value.id} { display: none; }
|
|
1909
|
+
\`;
|
|
1910
|
+
}).join('');
|
|
1911
|
+
styleEl.innerHTML = newStyleStr;
|
|
1856
1912
|
}
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
var c;
|
|
1860
|
-
if (!navigator.cookieEnabled)
|
|
1913
|
+
}`, Nt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1914
|
+
if (!navigator.cookieEnabled) {
|
|
1861
1915
|
return;
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1916
|
+
}
|
|
1917
|
+
function getCookie(name) {
|
|
1918
|
+
const nameEQ = name + '=';
|
|
1919
|
+
const ca = document.cookie.split(';');
|
|
1920
|
+
for (let i = 0; i < ca.length; i++) {
|
|
1921
|
+
let c = ca[i];
|
|
1922
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
1923
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
1870
1924
|
}
|
|
1871
1925
|
return null;
|
|
1872
1926
|
}
|
|
1873
|
-
const
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1927
|
+
const cookieName = \`builder.tests.\${defaultContentId}\`;
|
|
1928
|
+
const winningVariant = getCookie(cookieName);
|
|
1929
|
+
const parentDiv = document.currentScript?.parentElement;
|
|
1930
|
+
const isDefaultContent = variantContentId === defaultContentId;
|
|
1931
|
+
const isWinningVariant = winningVariant === variantContentId;
|
|
1932
|
+
if (isWinningVariant && !isDefaultContent) {
|
|
1933
|
+
parentDiv?.removeAttribute('hidden');
|
|
1934
|
+
parentDiv?.removeAttribute('aria-hidden');
|
|
1935
|
+
} else if (!isWinningVariant && isDefaultContent) {
|
|
1936
|
+
parentDiv?.setAttribute('hidden', 'true');
|
|
1937
|
+
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
1881
1938
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1939
|
+
if (isHydrationTarget) {
|
|
1940
|
+
if (!isWinningVariant) {
|
|
1941
|
+
parentDiv?.remove();
|
|
1942
|
+
}
|
|
1943
|
+
const thisScriptEl = document.currentScript;
|
|
1944
|
+
thisScriptEl?.remove();
|
|
1945
|
+
}
|
|
1946
|
+
return;
|
|
1947
|
+
}`, Ee = "builderIoAbTest", Pe = "builderIoRenderContent", j = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1948
|
+
...t,
|
|
1949
|
+
testVariationId: t.id,
|
|
1950
|
+
id: e == null ? void 0 : e.id
|
|
1951
|
+
})), Ft = ({
|
|
1952
|
+
canTrack: e,
|
|
1953
|
+
content: t
|
|
1954
|
+
}) => !(!(j(t).length > 0) || !e || N()), Wt = (e) => e === "react" || e === "reactNative", Ve = Wt(L), _t = () => `
|
|
1955
|
+
window.${Ee} = ${$t}
|
|
1956
|
+
window.${Pe} = ${Nt}
|
|
1957
|
+
`, Lt = (e, t) => `
|
|
1958
|
+
window.${Ee}(
|
|
1959
|
+
"${t}",${JSON.stringify(e)}, ${Ve}
|
|
1960
|
+
)`, jt = ({
|
|
1891
1961
|
contentId: e,
|
|
1892
1962
|
variationId: t
|
|
1893
|
-
}) => `
|
|
1894
|
-
|
|
1963
|
+
}) => `window.${Pe}(
|
|
1964
|
+
"${t}", "${e}", ${Ve}
|
|
1965
|
+
)`;
|
|
1895
1966
|
function X(e) {
|
|
1896
|
-
return /* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ r(
|
|
1897
1968
|
"script",
|
|
1898
1969
|
{
|
|
1899
1970
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
1900
|
-
id: e.id
|
|
1971
|
+
id: e.id || ""
|
|
1901
1972
|
}
|
|
1902
1973
|
);
|
|
1903
1974
|
}
|
|
1904
|
-
function
|
|
1975
|
+
function xe(e) {
|
|
1905
1976
|
return Math.round(e * 1e3) / 1e3;
|
|
1906
1977
|
}
|
|
1907
1978
|
const Mt = (e, t, n = !0) => {
|
|
@@ -1915,36 +1986,36 @@ const Mt = (e, t, n = !0) => {
|
|
|
1915
1986
|
return i;
|
|
1916
1987
|
} while (i = i.parentElement);
|
|
1917
1988
|
return null;
|
|
1918
|
-
},
|
|
1989
|
+
}, Ut = (e) => Mt(e, (t) => {
|
|
1919
1990
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1920
1991
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1921
|
-
}),
|
|
1992
|
+
}), ye = ({
|
|
1922
1993
|
event: e,
|
|
1923
1994
|
target: t
|
|
1924
1995
|
}) => {
|
|
1925
|
-
const n = t.getBoundingClientRect(), i = e.clientX - n.left,
|
|
1996
|
+
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
1997
|
return {
|
|
1927
|
-
x:
|
|
1928
|
-
y:
|
|
1998
|
+
x: o,
|
|
1999
|
+
y: l
|
|
1929
2000
|
};
|
|
1930
|
-
},
|
|
1931
|
-
const t = e.target, n = t &&
|
|
2001
|
+
}, Dt = (e) => {
|
|
2002
|
+
const t = e.target, n = t && Ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1932
2003
|
return {
|
|
1933
2004
|
targetBuilderElement: i || void 0,
|
|
1934
2005
|
metadata: {
|
|
1935
|
-
targetOffset: t ?
|
|
2006
|
+
targetOffset: t ? ye({
|
|
1936
2007
|
event: e,
|
|
1937
2008
|
target: t
|
|
1938
2009
|
}) : void 0,
|
|
1939
|
-
builderTargetOffset: n ?
|
|
2010
|
+
builderTargetOffset: n ? ye({
|
|
1940
2011
|
event: e,
|
|
1941
2012
|
target: n
|
|
1942
2013
|
}) : void 0,
|
|
1943
2014
|
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
1944
2015
|
}
|
|
1945
2016
|
};
|
|
1946
|
-
},
|
|
1947
|
-
|
|
2017
|
+
}, Ot = "0.7.4", Kt = () => {
|
|
2018
|
+
Ne("insertMenu", {
|
|
1948
2019
|
name: "_default",
|
|
1949
2020
|
default: !0,
|
|
1950
2021
|
items: [{
|
|
@@ -1966,14 +2037,14 @@ const Mt = (e, t, n = !0) => {
|
|
|
1966
2037
|
}]
|
|
1967
2038
|
});
|
|
1968
2039
|
};
|
|
1969
|
-
let
|
|
1970
|
-
const
|
|
2040
|
+
let Se = !1;
|
|
2041
|
+
const Ht = (e = {}) => {
|
|
1971
2042
|
var t, n;
|
|
1972
|
-
|
|
2043
|
+
Se || (Se = !0, N() && ((t = window.parent) == null || t.postMessage({
|
|
1973
2044
|
type: "builder.sdkInfo",
|
|
1974
2045
|
data: {
|
|
1975
|
-
target:
|
|
1976
|
-
version:
|
|
2046
|
+
target: L,
|
|
2047
|
+
version: Ot,
|
|
1977
2048
|
supportsPatchUpdates: !1,
|
|
1978
2049
|
// Supports builder-model="..." attribute which is needed to
|
|
1979
2050
|
// scope our '+ add block' button styling
|
|
@@ -1988,33 +2059,33 @@ const Kt = (e = {}) => {
|
|
|
1988
2059
|
}, "*"), window.addEventListener("message", ({
|
|
1989
2060
|
data: i
|
|
1990
2061
|
}) => {
|
|
1991
|
-
var
|
|
2062
|
+
var a, o;
|
|
1992
2063
|
if (i != null && i.type)
|
|
1993
2064
|
switch (i.type) {
|
|
1994
2065
|
case "builder.evaluate": {
|
|
1995
|
-
const
|
|
1996
|
-
let u,
|
|
2066
|
+
const l = i.data.text, s = i.data.arguments || [], c = i.data.id, d = new Function(l);
|
|
2067
|
+
let u, g = null;
|
|
1997
2068
|
try {
|
|
1998
|
-
u = d.apply(null,
|
|
2069
|
+
u = d.apply(null, s);
|
|
1999
2070
|
} catch (y) {
|
|
2000
|
-
|
|
2071
|
+
g = y;
|
|
2001
2072
|
}
|
|
2002
|
-
|
|
2073
|
+
g ? (a = window.parent) == null || a.postMessage({
|
|
2003
2074
|
type: "builder.evaluateError",
|
|
2004
2075
|
data: {
|
|
2005
2076
|
id: c,
|
|
2006
|
-
error:
|
|
2077
|
+
error: g.message
|
|
2007
2078
|
}
|
|
2008
2079
|
}, "*") : u && typeof u.then == "function" ? u.then((y) => {
|
|
2009
|
-
var
|
|
2010
|
-
(
|
|
2080
|
+
var V;
|
|
2081
|
+
(V = window.parent) == null || V.postMessage({
|
|
2011
2082
|
type: "builder.evaluateResult",
|
|
2012
2083
|
data: {
|
|
2013
2084
|
id: c,
|
|
2014
2085
|
result: y
|
|
2015
2086
|
}
|
|
2016
2087
|
}, "*");
|
|
2017
|
-
}).catch(console.error) : (
|
|
2088
|
+
}).catch(console.error) : (o = window.parent) == null || o.postMessage({
|
|
2018
2089
|
type: "builder.evaluateResult",
|
|
2019
2090
|
data: {
|
|
2020
2091
|
result: u,
|
|
@@ -2026,60 +2097,60 @@ const Kt = (e = {}) => {
|
|
|
2026
2097
|
}
|
|
2027
2098
|
})));
|
|
2028
2099
|
};
|
|
2029
|
-
function
|
|
2030
|
-
var
|
|
2031
|
-
const t = Z(null), [n, i] =
|
|
2032
|
-
function
|
|
2033
|
-
var
|
|
2034
|
-
const
|
|
2100
|
+
function zt(e) {
|
|
2101
|
+
var A, B, F, W, z, ae, oe;
|
|
2102
|
+
const t = Z(null), [n, i] = S(() => 0);
|
|
2103
|
+
function a(m) {
|
|
2104
|
+
var b, x, k, I, re;
|
|
2105
|
+
const h = {
|
|
2035
2106
|
...e.builderContextSignal.content,
|
|
2036
2107
|
...m,
|
|
2037
2108
|
data: {
|
|
2038
|
-
...(
|
|
2109
|
+
...(b = e.builderContextSignal.content) == null ? void 0 : b.data,
|
|
2039
2110
|
...m == null ? void 0 : m.data
|
|
2040
2111
|
},
|
|
2041
2112
|
meta: {
|
|
2042
|
-
...(
|
|
2113
|
+
...(x = e.builderContextSignal.content) == null ? void 0 : x.meta,
|
|
2043
2114
|
...m == null ? void 0 : m.meta,
|
|
2044
|
-
breakpoints: ((
|
|
2115
|
+
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
2116
|
}
|
|
2046
2117
|
};
|
|
2047
2118
|
e.setBuilderContextSignal((Be) => ({
|
|
2048
2119
|
...Be,
|
|
2049
|
-
content:
|
|
2120
|
+
content: h
|
|
2050
2121
|
}));
|
|
2051
2122
|
}
|
|
2052
|
-
|
|
2053
|
-
const [
|
|
2123
|
+
S(() => 0);
|
|
2124
|
+
const [o, l] = S(
|
|
2054
2125
|
() => !1
|
|
2055
2126
|
);
|
|
2056
|
-
function
|
|
2057
|
-
var
|
|
2058
|
-
const { data:
|
|
2059
|
-
if (
|
|
2060
|
-
switch (
|
|
2127
|
+
function s(m) {
|
|
2128
|
+
var b;
|
|
2129
|
+
const { data: h } = m;
|
|
2130
|
+
if (h)
|
|
2131
|
+
switch (h.type) {
|
|
2061
2132
|
case "builder.configureSdk": {
|
|
2062
|
-
const
|
|
2063
|
-
if (!
|
|
2133
|
+
const x = h.data, { breakpoints: k, contentId: I } = x;
|
|
2134
|
+
if (!I || I !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
|
|
2064
2135
|
return;
|
|
2065
|
-
|
|
2136
|
+
k && a({
|
|
2066
2137
|
meta: {
|
|
2067
|
-
breakpoints:
|
|
2138
|
+
breakpoints: k
|
|
2068
2139
|
}
|
|
2069
2140
|
}), i(n + 1);
|
|
2070
2141
|
break;
|
|
2071
2142
|
}
|
|
2072
2143
|
case "builder.contentUpdate": {
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2144
|
+
const x = h.data, k = x.key || x.alias || x.entry || x.modelName, I = x.data;
|
|
2145
|
+
k === e.model && (a(I), i(n + 1));
|
|
2075
2146
|
break;
|
|
2076
2147
|
}
|
|
2077
2148
|
}
|
|
2078
2149
|
}
|
|
2079
2150
|
function c() {
|
|
2080
|
-
var
|
|
2081
|
-
const m = (
|
|
2082
|
-
m &&
|
|
2151
|
+
var h, b;
|
|
2152
|
+
const m = (b = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : b.jsCode;
|
|
2153
|
+
m && _({
|
|
2083
2154
|
code: m,
|
|
2084
2155
|
context: e.context || {},
|
|
2085
2156
|
localState: void 0,
|
|
@@ -2087,28 +2158,28 @@ function Ht(e) {
|
|
|
2087
2158
|
rootSetState: e.builderContextSignal.rootSetState
|
|
2088
2159
|
});
|
|
2089
2160
|
}
|
|
2090
|
-
const [d, u] =
|
|
2091
|
-
function
|
|
2092
|
-
var
|
|
2161
|
+
const [d, u] = S(() => ({})), [g, y] = S(() => !1);
|
|
2162
|
+
function V(m) {
|
|
2163
|
+
var h, b;
|
|
2093
2164
|
if (e.builderContextSignal.content) {
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2165
|
+
const x = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, k = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
|
|
2166
|
+
ce({
|
|
2096
2167
|
type: "click",
|
|
2097
2168
|
canTrack: U(e.canTrack),
|
|
2098
|
-
contentId:
|
|
2169
|
+
contentId: k,
|
|
2099
2170
|
apiKey: e.apiKey,
|
|
2100
|
-
variationId:
|
|
2101
|
-
...
|
|
2102
|
-
unique: !
|
|
2171
|
+
variationId: x !== k ? x : void 0,
|
|
2172
|
+
...Dt(m),
|
|
2173
|
+
unique: !g
|
|
2103
2174
|
});
|
|
2104
2175
|
}
|
|
2105
|
-
|
|
2176
|
+
g || y(!0);
|
|
2106
2177
|
}
|
|
2107
|
-
function
|
|
2178
|
+
function v(m) {
|
|
2108
2179
|
return m.replace(
|
|
2109
2180
|
/{{([^}]+)}}/g,
|
|
2110
|
-
(
|
|
2111
|
-
code:
|
|
2181
|
+
(h, b) => _({
|
|
2182
|
+
code: b,
|
|
2112
2183
|
context: e.context || {},
|
|
2113
2184
|
localState: void 0,
|
|
2114
2185
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -2116,33 +2187,33 @@ function Ht(e) {
|
|
|
2116
2187
|
})
|
|
2117
2188
|
);
|
|
2118
2189
|
}
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2121
|
-
var
|
|
2122
|
-
const
|
|
2190
|
+
function p({ url: m, key: h }) {
|
|
2191
|
+
_e(m).then((b) => b.json()).then((b) => {
|
|
2192
|
+
var k, I;
|
|
2193
|
+
const x = {
|
|
2123
2194
|
...e.builderContextSignal.rootState,
|
|
2124
|
-
[
|
|
2195
|
+
[h]: b
|
|
2125
2196
|
};
|
|
2126
|
-
(
|
|
2127
|
-
}).catch((
|
|
2128
|
-
console.error("error fetching dynamic data", m,
|
|
2197
|
+
(I = (k = e.builderContextSignal).rootSetState) == null || I.call(k, x), d[h] = !0;
|
|
2198
|
+
}).catch((b) => {
|
|
2199
|
+
console.error("error fetching dynamic data", m, b);
|
|
2129
2200
|
});
|
|
2130
2201
|
}
|
|
2131
|
-
function
|
|
2132
|
-
var
|
|
2133
|
-
const m = ((
|
|
2134
|
-
Object.entries(m).forEach(([
|
|
2135
|
-
if (
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2138
|
-
url:
|
|
2139
|
-
key:
|
|
2202
|
+
function E() {
|
|
2203
|
+
var h, b;
|
|
2204
|
+
const m = ((b = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : b.httpRequests) ?? {};
|
|
2205
|
+
Object.entries(m).forEach(([x, k]) => {
|
|
2206
|
+
if (k && (!d[x] || $())) {
|
|
2207
|
+
const I = v(k);
|
|
2208
|
+
p({
|
|
2209
|
+
url: I,
|
|
2210
|
+
key: x
|
|
2140
2211
|
});
|
|
2141
2212
|
}
|
|
2142
2213
|
});
|
|
2143
2214
|
}
|
|
2144
|
-
function
|
|
2145
|
-
|
|
2215
|
+
function R() {
|
|
2216
|
+
$() && window.dispatchEvent(
|
|
2146
2217
|
new CustomEvent(
|
|
2147
2218
|
"builder:component:stateChange",
|
|
2148
2219
|
{
|
|
@@ -2156,8 +2227,8 @@ function Ht(e) {
|
|
|
2156
2227
|
)
|
|
2157
2228
|
);
|
|
2158
2229
|
}
|
|
2159
|
-
function
|
|
2160
|
-
i(n + 1), window.addEventListener("message",
|
|
2230
|
+
function C(m) {
|
|
2231
|
+
i(n + 1), window.addEventListener("message", s), Kt(), Ht({
|
|
2161
2232
|
...e.locale ? {
|
|
2162
2233
|
locale: e.locale
|
|
2163
2234
|
} : {},
|
|
@@ -2169,109 +2240,109 @@ function Ht(e) {
|
|
|
2169
2240
|
} : {}
|
|
2170
2241
|
}), Object.values(
|
|
2171
2242
|
e.builderContextSignal.componentInfos
|
|
2172
|
-
).forEach((
|
|
2173
|
-
var
|
|
2174
|
-
const
|
|
2175
|
-
(
|
|
2243
|
+
).forEach((h) => {
|
|
2244
|
+
var x;
|
|
2245
|
+
const b = We(h);
|
|
2246
|
+
(x = window.parent) == null || x.postMessage(b, "*");
|
|
2176
2247
|
}), window.addEventListener(
|
|
2177
2248
|
"builder:component:stateChangeListenerActivated",
|
|
2178
|
-
|
|
2249
|
+
R
|
|
2179
2250
|
);
|
|
2180
2251
|
}
|
|
2181
|
-
function
|
|
2182
|
-
const
|
|
2183
|
-
`builder.preview.${
|
|
2184
|
-
),
|
|
2185
|
-
|
|
2252
|
+
function w(m) {
|
|
2253
|
+
const h = new URL(location.href).searchParams, b = h.get("builder.preview"), x = h.get(
|
|
2254
|
+
`builder.preview.${b}`
|
|
2255
|
+
), k = h.get("apiKey") || h.get("builder.space");
|
|
2256
|
+
b === e.model && k === e.apiKey && (!e.content || x === e.content.id) && Ce({
|
|
2186
2257
|
model: e.model,
|
|
2187
2258
|
apiKey: e.apiKey,
|
|
2188
2259
|
apiVersion: e.builderContextSignal.apiVersion
|
|
2189
|
-
}).then((
|
|
2190
|
-
|
|
2260
|
+
}).then((I) => {
|
|
2261
|
+
I && a(I);
|
|
2191
2262
|
});
|
|
2192
2263
|
}
|
|
2193
|
-
return
|
|
2264
|
+
return P(() => {
|
|
2194
2265
|
var m;
|
|
2195
2266
|
return (m = t.current) == null || m.addEventListener(
|
|
2196
2267
|
"initeditingbldr",
|
|
2197
|
-
|
|
2268
|
+
C
|
|
2198
2269
|
), () => {
|
|
2199
|
-
var
|
|
2200
|
-
return (
|
|
2270
|
+
var h;
|
|
2271
|
+
return (h = t.current) == null ? void 0 : h.removeEventListener(
|
|
2201
2272
|
"initeditingbldr",
|
|
2202
|
-
|
|
2273
|
+
C
|
|
2203
2274
|
);
|
|
2204
2275
|
};
|
|
2205
|
-
}, []),
|
|
2276
|
+
}, []), P(() => {
|
|
2206
2277
|
var m;
|
|
2207
2278
|
return (m = t.current) == null || m.addEventListener(
|
|
2208
2279
|
"initpreviewingbldr",
|
|
2209
|
-
|
|
2280
|
+
w
|
|
2210
2281
|
), () => {
|
|
2211
|
-
var
|
|
2212
|
-
return (
|
|
2282
|
+
var h;
|
|
2283
|
+
return (h = t.current) == null ? void 0 : h.removeEventListener(
|
|
2213
2284
|
"initpreviewingbldr",
|
|
2214
|
-
|
|
2285
|
+
w
|
|
2215
2286
|
);
|
|
2216
2287
|
};
|
|
2217
|
-
}, []),
|
|
2218
|
-
var m,
|
|
2219
|
-
if (
|
|
2220
|
-
if (
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2288
|
+
}, []), P(() => {
|
|
2289
|
+
var m, h;
|
|
2290
|
+
if (N()) {
|
|
2291
|
+
if ($() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
|
|
2292
|
+
const x = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, k = (h = e.builderContextSignal.content) == null ? void 0 : h.id, I = e.apiKey;
|
|
2293
|
+
ce({
|
|
2223
2294
|
type: "impression",
|
|
2224
2295
|
canTrack: !0,
|
|
2225
|
-
contentId:
|
|
2226
|
-
apiKey:
|
|
2227
|
-
variationId:
|
|
2296
|
+
contentId: k,
|
|
2297
|
+
apiKey: I,
|
|
2298
|
+
variationId: x !== k ? x : void 0
|
|
2228
2299
|
});
|
|
2229
2300
|
}
|
|
2230
|
-
|
|
2301
|
+
Fe() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
|
|
2231
2302
|
}
|
|
2232
|
-
}, []),
|
|
2233
|
-
e.apiKey ||
|
|
2303
|
+
}, []), P(() => {
|
|
2304
|
+
e.apiKey || M.error(
|
|
2234
2305
|
"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
|
-
}, [
|
|
2306
|
+
), c(), E(), R();
|
|
2307
|
+
}, []), P(() => {
|
|
2308
|
+
e.content && a(e.content);
|
|
2309
|
+
}, [e.content]), P(() => {
|
|
2310
|
+
}, [o]), P(() => {
|
|
2240
2311
|
c();
|
|
2241
2312
|
}, [
|
|
2242
|
-
(
|
|
2313
|
+
(B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
|
|
2243
2314
|
e.builderContextSignal.rootState
|
|
2244
|
-
]),
|
|
2245
|
-
|
|
2246
|
-
}, [(W = (
|
|
2247
|
-
|
|
2248
|
-
}, [e.builderContextSignal.rootState]),
|
|
2249
|
-
|
|
2315
|
+
]), P(() => {
|
|
2316
|
+
E();
|
|
2317
|
+
}, [(W = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : W.httpRequests]), P(() => {
|
|
2318
|
+
R();
|
|
2319
|
+
}, [e.builderContextSignal.rootState]), P(() => () => {
|
|
2320
|
+
N() && (window.removeEventListener("message", s), window.removeEventListener(
|
|
2250
2321
|
"builder:component:stateChangeListenerActivated",
|
|
2251
|
-
|
|
2322
|
+
R
|
|
2252
2323
|
));
|
|
2253
|
-
}, []), /* @__PURE__ */
|
|
2324
|
+
}, []), /* @__PURE__ */ r(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ ke(
|
|
2254
2325
|
"div",
|
|
2255
2326
|
{
|
|
2256
2327
|
key: n,
|
|
2257
2328
|
ref: t,
|
|
2258
|
-
onClick: (m) =>
|
|
2259
|
-
"builder-content-id": (
|
|
2329
|
+
onClick: (m) => V(m),
|
|
2330
|
+
"builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
|
|
2260
2331
|
"builder-model": e.model,
|
|
2261
2332
|
...e.showContent ? {} : {
|
|
2262
2333
|
hidden: !0,
|
|
2263
2334
|
"aria-hidden": !0
|
|
2264
2335
|
},
|
|
2265
|
-
className: e.
|
|
2336
|
+
className: `variant-${((ae = e.content) == null ? void 0 : ae.testVariationId) || ((oe = e.content) == null ? void 0 : oe.id)}`
|
|
2266
2337
|
},
|
|
2267
2338
|
e.children
|
|
2268
2339
|
) }) : null });
|
|
2269
2340
|
}
|
|
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 && (
|
|
2341
|
+
const qt = (e) => {
|
|
2342
|
+
var o;
|
|
2343
|
+
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);
|
|
2344
|
+
let a = "";
|
|
2345
|
+
if (i && t && n && (a += `
|
|
2275
2346
|
@font-face {
|
|
2276
2347
|
font-family: "${t}";
|
|
2277
2348
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -2279,37 +2350,37 @@ font-display: fallback;
|
|
|
2279
2350
|
font-weight: 400;
|
|
2280
2351
|
}
|
|
2281
2352
|
`.trim()), e.files)
|
|
2282
|
-
for (const
|
|
2283
|
-
if (!(String(Number(
|
|
2353
|
+
for (const l in e.files) {
|
|
2354
|
+
if (!(String(Number(l)) === l))
|
|
2284
2355
|
continue;
|
|
2285
|
-
const c = e.files[
|
|
2286
|
-
c && c !== i && (
|
|
2356
|
+
const c = e.files[l];
|
|
2357
|
+
c && c !== i && (a += `
|
|
2287
2358
|
@font-face {
|
|
2288
2359
|
font-family: "${t}";
|
|
2289
2360
|
src: url('${c}') format('woff2');
|
|
2290
2361
|
font-display: fallback;
|
|
2291
|
-
font-weight: ${
|
|
2362
|
+
font-weight: ${l};
|
|
2292
2363
|
}
|
|
2293
2364
|
`.trim());
|
|
2294
2365
|
}
|
|
2295
|
-
return
|
|
2296
|
-
},
|
|
2366
|
+
return a;
|
|
2367
|
+
}, Yt = ({
|
|
2297
2368
|
customFonts: e
|
|
2298
2369
|
}) => {
|
|
2299
2370
|
var t;
|
|
2300
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2301
|
-
},
|
|
2371
|
+
return ((t = e == null ? void 0 : e.map((n) => qt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2372
|
+
}, Qt = ({
|
|
2302
2373
|
cssCode: e,
|
|
2303
2374
|
contentId: t
|
|
2304
2375
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2305
2376
|
function Gt(e) {
|
|
2306
|
-
const [t, n] =
|
|
2377
|
+
const [t, n] = S(
|
|
2307
2378
|
() => `
|
|
2308
|
-
${
|
|
2379
|
+
${Qt({
|
|
2309
2380
|
cssCode: e.cssCode,
|
|
2310
2381
|
contentId: e.contentId
|
|
2311
2382
|
})}
|
|
2312
|
-
${
|
|
2383
|
+
${Yt({
|
|
2313
2384
|
customFonts: e.customFonts
|
|
2314
2385
|
})}
|
|
2315
2386
|
|
|
@@ -2327,21 +2398,21 @@ ${qt({
|
|
|
2327
2398
|
}
|
|
2328
2399
|
`.trim()
|
|
2329
2400
|
);
|
|
2330
|
-
return /* @__PURE__ */
|
|
2401
|
+
return /* @__PURE__ */ r(K, { styles: t });
|
|
2331
2402
|
}
|
|
2332
2403
|
const Jt = ({
|
|
2333
2404
|
content: e,
|
|
2334
2405
|
data: t,
|
|
2335
2406
|
locale: n
|
|
2336
2407
|
}) => {
|
|
2337
|
-
var
|
|
2408
|
+
var o, l, s;
|
|
2338
2409
|
const i = {};
|
|
2339
|
-
(
|
|
2410
|
+
(l = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || l.forEach((c) => {
|
|
2340
2411
|
var d;
|
|
2341
2412
|
c.name && c.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[c.name] === void 0 && (i[c.name] = c.defaultValue);
|
|
2342
2413
|
});
|
|
2343
|
-
const
|
|
2344
|
-
...(
|
|
2414
|
+
const a = {
|
|
2415
|
+
...(s = e == null ? void 0 : e.data) == null ? void 0 : s.state,
|
|
2345
2416
|
...t,
|
|
2346
2417
|
...n ? {
|
|
2347
2418
|
locale: n
|
|
@@ -2349,9 +2420,9 @@ const Jt = ({
|
|
|
2349
2420
|
};
|
|
2350
2421
|
return {
|
|
2351
2422
|
...i,
|
|
2352
|
-
...
|
|
2423
|
+
...a
|
|
2353
2424
|
};
|
|
2354
|
-
},
|
|
2425
|
+
}, Xt = ({
|
|
2355
2426
|
content: e,
|
|
2356
2427
|
data: t
|
|
2357
2428
|
}) => e ? {
|
|
@@ -2362,47 +2433,47 @@ const Jt = ({
|
|
|
2362
2433
|
},
|
|
2363
2434
|
meta: e == null ? void 0 : e.meta
|
|
2364
2435
|
} : void 0;
|
|
2365
|
-
function
|
|
2366
|
-
var c, d, u,
|
|
2367
|
-
const [t, n] =
|
|
2436
|
+
function ve(e) {
|
|
2437
|
+
var c, d, u, g, y, V, v;
|
|
2438
|
+
const [t, n] = S(
|
|
2368
2439
|
() => {
|
|
2369
|
-
var
|
|
2440
|
+
var p, E;
|
|
2370
2441
|
return jt({
|
|
2371
2442
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2372
|
-
variationId: (
|
|
2443
|
+
variationId: (p = e.content) == null ? void 0 : p.testVariationId,
|
|
2373
2444
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2374
|
-
contentId: (
|
|
2445
|
+
contentId: (E = e.content) == null ? void 0 : E.id
|
|
2375
2446
|
});
|
|
2376
2447
|
}
|
|
2377
2448
|
);
|
|
2378
|
-
function i(
|
|
2379
|
-
|
|
2380
|
-
...
|
|
2381
|
-
rootState:
|
|
2449
|
+
function i(p) {
|
|
2450
|
+
s((E) => ({
|
|
2451
|
+
...E,
|
|
2452
|
+
rootState: p
|
|
2382
2453
|
}));
|
|
2383
2454
|
}
|
|
2384
|
-
const [
|
|
2455
|
+
const [a, o] = S(
|
|
2385
2456
|
() => [
|
|
2386
|
-
...
|
|
2457
|
+
...be(),
|
|
2387
2458
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2388
2459
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2389
2460
|
// existing usage.
|
|
2390
2461
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2391
2462
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2392
|
-
...
|
|
2463
|
+
...se,
|
|
2393
2464
|
...e.customComponents || []
|
|
2394
2465
|
].reduce(
|
|
2395
|
-
(
|
|
2396
|
-
...
|
|
2397
|
-
[
|
|
2398
|
-
component:
|
|
2399
|
-
...
|
|
2466
|
+
(p, { component: E, ...R }) => ({
|
|
2467
|
+
...p,
|
|
2468
|
+
[R.name]: {
|
|
2469
|
+
component: E,
|
|
2470
|
+
...de(R)
|
|
2400
2471
|
}
|
|
2401
2472
|
}),
|
|
2402
2473
|
{}
|
|
2403
2474
|
)
|
|
2404
|
-
), [
|
|
2405
|
-
content:
|
|
2475
|
+
), [l, s] = S(() => ({
|
|
2476
|
+
content: Xt({
|
|
2406
2477
|
content: e.content,
|
|
2407
2478
|
data: e.data
|
|
2408
2479
|
}),
|
|
@@ -2417,31 +2488,31 @@ function ye(e) {
|
|
|
2417
2488
|
apiKey: e.apiKey,
|
|
2418
2489
|
apiVersion: e.apiVersion,
|
|
2419
2490
|
componentInfos: [
|
|
2420
|
-
...
|
|
2491
|
+
...be(),
|
|
2421
2492
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2422
2493
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2423
2494
|
// existing usage.
|
|
2424
2495
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2425
2496
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2426
|
-
...
|
|
2497
|
+
...se,
|
|
2427
2498
|
...e.customComponents || []
|
|
2428
2499
|
].reduce(
|
|
2429
|
-
(
|
|
2430
|
-
...
|
|
2431
|
-
[
|
|
2500
|
+
(p, { component: E, ...R }) => ({
|
|
2501
|
+
...p,
|
|
2502
|
+
[R.name]: de(R)
|
|
2432
2503
|
}),
|
|
2433
2504
|
{}
|
|
2434
2505
|
),
|
|
2435
2506
|
inheritedStyles: {}
|
|
2436
2507
|
}));
|
|
2437
|
-
return /* @__PURE__ */
|
|
2438
|
-
|
|
2508
|
+
return /* @__PURE__ */ r(
|
|
2509
|
+
we.Provider,
|
|
2439
2510
|
{
|
|
2440
2511
|
value: {
|
|
2441
|
-
registeredComponents:
|
|
2512
|
+
registeredComponents: a
|
|
2442
2513
|
},
|
|
2443
|
-
children: /* @__PURE__ */
|
|
2444
|
-
|
|
2514
|
+
children: /* @__PURE__ */ T(
|
|
2515
|
+
zt,
|
|
2445
2516
|
{
|
|
2446
2517
|
content: e.content,
|
|
2447
2518
|
model: e.model,
|
|
@@ -2451,26 +2522,25 @@ function ye(e) {
|
|
|
2451
2522
|
locale: e.locale,
|
|
2452
2523
|
includeRefs: e.includeRefs,
|
|
2453
2524
|
enrich: e.enrich,
|
|
2454
|
-
classNameProp: e.classNameProp,
|
|
2455
2525
|
showContent: e.showContent,
|
|
2456
|
-
builderContextSignal:
|
|
2457
|
-
setBuilderContextSignal:
|
|
2526
|
+
builderContextSignal: l,
|
|
2527
|
+
setBuilderContextSignal: s,
|
|
2458
2528
|
children: [
|
|
2459
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
2460
|
-
/* @__PURE__ */
|
|
2529
|
+
e.isSsrAbTest ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: t }) }) : null,
|
|
2530
|
+
/* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
|
|
2461
2531
|
Gt,
|
|
2462
2532
|
{
|
|
2463
|
-
contentId: (c =
|
|
2464
|
-
cssCode: (u = (d =
|
|
2465
|
-
customFonts: (y = (
|
|
2533
|
+
contentId: (c = l.content) == null ? void 0 : c.id,
|
|
2534
|
+
cssCode: (u = (d = l.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
|
|
2535
|
+
customFonts: (y = (g = l.content) == null ? void 0 : g.data) == null ? void 0 : y.customFonts
|
|
2466
2536
|
}
|
|
2467
2537
|
) }),
|
|
2468
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ r(
|
|
2469
2539
|
ie,
|
|
2470
2540
|
{
|
|
2471
|
-
blocks: (
|
|
2472
|
-
context:
|
|
2473
|
-
registeredComponents:
|
|
2541
|
+
blocks: (v = (V = l.content) == null ? void 0 : V.data) == null ? void 0 : v.blocks,
|
|
2542
|
+
context: l,
|
|
2543
|
+
registeredComponents: a
|
|
2474
2544
|
}
|
|
2475
2545
|
)
|
|
2476
2546
|
]
|
|
@@ -2479,55 +2549,54 @@ function ye(e) {
|
|
|
2479
2549
|
}
|
|
2480
2550
|
);
|
|
2481
2551
|
}
|
|
2482
|
-
function
|
|
2483
|
-
var
|
|
2484
|
-
const [t, n] =
|
|
2485
|
-
() =>
|
|
2552
|
+
function Ae(e) {
|
|
2553
|
+
var l, s;
|
|
2554
|
+
const [t, n] = S(
|
|
2555
|
+
() => Ft({
|
|
2486
2556
|
canTrack: U(e.canTrack),
|
|
2487
2557
|
content: e.content
|
|
2488
2558
|
})
|
|
2489
2559
|
);
|
|
2490
2560
|
function i() {
|
|
2491
|
-
var
|
|
2492
|
-
return
|
|
2493
|
-
|
|
2494
|
-
id:
|
|
2495
|
-
testRatio:
|
|
2561
|
+
var c;
|
|
2562
|
+
return Lt(
|
|
2563
|
+
j(e.content).map((d) => ({
|
|
2564
|
+
id: d.testVariationId,
|
|
2565
|
+
testRatio: d.testRatio
|
|
2496
2566
|
})),
|
|
2497
|
-
((
|
|
2567
|
+
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2498
2568
|
);
|
|
2499
2569
|
}
|
|
2500
|
-
function o() {
|
|
2501
|
-
return L(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
|
|
2502
|
-
}
|
|
2503
2570
|
function a() {
|
|
2504
|
-
|
|
2571
|
+
return j(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
|
|
2572
|
+
}
|
|
2573
|
+
function o() {
|
|
2574
|
+
var c;
|
|
2505
2575
|
return t ? {
|
|
2506
2576
|
...e.content,
|
|
2507
|
-
testVariationId: (
|
|
2508
|
-
} :
|
|
2577
|
+
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2578
|
+
} : Le({
|
|
2509
2579
|
item: e.content,
|
|
2510
2580
|
canTrack: U(e.canTrack)
|
|
2511
2581
|
});
|
|
2512
2582
|
}
|
|
2513
|
-
return
|
|
2514
|
-
}, []), /* @__PURE__ */
|
|
2515
|
-
!e.__isNestedRender &&
|
|
2516
|
-
t ? /* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2518
|
-
|
|
2583
|
+
return P(() => {
|
|
2584
|
+
}, []), /* @__PURE__ */ T(f, { children: [
|
|
2585
|
+
!e.__isNestedRender && L !== "reactNative" ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: _t() }) }) : null,
|
|
2586
|
+
t ? /* @__PURE__ */ T(f, { children: [
|
|
2587
|
+
/* @__PURE__ */ r(
|
|
2588
|
+
K,
|
|
2519
2589
|
{
|
|
2520
|
-
id: `variants-styles-${(
|
|
2521
|
-
styles:
|
|
2590
|
+
id: `variants-styles-${(l = e.content) == null ? void 0 : l.id}`,
|
|
2591
|
+
styles: a()
|
|
2522
2592
|
}
|
|
2523
2593
|
),
|
|
2524
|
-
/* @__PURE__ */
|
|
2525
|
-
(
|
|
2526
|
-
|
|
2594
|
+
/* @__PURE__ */ r(X, { scriptStr: i() }),
|
|
2595
|
+
(s = j(e.content)) == null ? void 0 : s.map((c) => /* @__PURE__ */ r(
|
|
2596
|
+
ve,
|
|
2527
2597
|
{
|
|
2528
|
-
content:
|
|
2598
|
+
content: c,
|
|
2529
2599
|
showContent: !1,
|
|
2530
|
-
classNameProp: void 0,
|
|
2531
2600
|
model: e.model,
|
|
2532
2601
|
data: e.data,
|
|
2533
2602
|
context: e.context,
|
|
@@ -2540,14 +2609,13 @@ function Pe(e) {
|
|
|
2540
2609
|
enrich: e.enrich,
|
|
2541
2610
|
isSsrAbTest: t
|
|
2542
2611
|
},
|
|
2543
|
-
|
|
2612
|
+
c.testVariationId
|
|
2544
2613
|
))
|
|
2545
2614
|
] }) : null,
|
|
2546
|
-
/* @__PURE__ */
|
|
2547
|
-
|
|
2615
|
+
/* @__PURE__ */ r(
|
|
2616
|
+
ve,
|
|
2548
2617
|
{
|
|
2549
|
-
content:
|
|
2550
|
-
classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
|
|
2618
|
+
content: o(),
|
|
2551
2619
|
showContent: !0,
|
|
2552
2620
|
model: e.model,
|
|
2553
2621
|
data: e.data,
|
|
@@ -2564,13 +2632,13 @@ function Pe(e) {
|
|
|
2564
2632
|
)
|
|
2565
2633
|
] });
|
|
2566
2634
|
}
|
|
2567
|
-
const
|
|
2635
|
+
const Zt = async ({
|
|
2568
2636
|
builderContextValue: e,
|
|
2569
2637
|
symbol: t
|
|
2570
2638
|
}) => {
|
|
2571
2639
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2572
2640
|
(e != null && e.apiKey))
|
|
2573
|
-
return
|
|
2641
|
+
return Ce({
|
|
2574
2642
|
model: t.model,
|
|
2575
2643
|
apiKey: e.apiKey,
|
|
2576
2644
|
apiVersion: e.apiVersion,
|
|
@@ -2580,11 +2648,11 @@ const Qt = async ({
|
|
|
2580
2648
|
}
|
|
2581
2649
|
}
|
|
2582
2650
|
}).catch((n) => {
|
|
2583
|
-
|
|
2651
|
+
M.error("Could not fetch symbol content: ", n);
|
|
2584
2652
|
});
|
|
2585
2653
|
};
|
|
2586
|
-
function
|
|
2587
|
-
var
|
|
2654
|
+
function en(e) {
|
|
2655
|
+
var o, l, s;
|
|
2588
2656
|
function t() {
|
|
2589
2657
|
var c, d;
|
|
2590
2658
|
return [
|
|
@@ -2594,23 +2662,23 @@ function Xt(e) {
|
|
|
2594
2662
|
(d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2595
2663
|
].filter(Boolean).join(" ");
|
|
2596
2664
|
}
|
|
2597
|
-
const [n, i] =
|
|
2665
|
+
const [n, i] = S(() => {
|
|
2598
2666
|
var c;
|
|
2599
2667
|
return (c = e.symbol) == null ? void 0 : c.content;
|
|
2600
2668
|
});
|
|
2601
|
-
function
|
|
2602
|
-
n ||
|
|
2669
|
+
function a() {
|
|
2670
|
+
n || Zt({
|
|
2603
2671
|
symbol: e.symbol,
|
|
2604
2672
|
builderContextValue: e.builderContext
|
|
2605
2673
|
}).then((c) => {
|
|
2606
2674
|
c && i(c);
|
|
2607
2675
|
});
|
|
2608
2676
|
}
|
|
2609
|
-
return
|
|
2610
|
-
}, []),
|
|
2611
|
-
|
|
2612
|
-
}, [e.symbol]), /* @__PURE__ */
|
|
2613
|
-
|
|
2677
|
+
return P(() => {
|
|
2678
|
+
}, []), P(() => {
|
|
2679
|
+
a();
|
|
2680
|
+
}, [e.symbol]), /* @__PURE__ */ r("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ r(
|
|
2681
|
+
Ae,
|
|
2614
2682
|
{
|
|
2615
2683
|
__isNestedRender: !0,
|
|
2616
2684
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2618,40 +2686,40 @@ function Xt(e) {
|
|
|
2618
2686
|
context: e.builderContext.context,
|
|
2619
2687
|
customComponents: Object.values(e.builderComponents),
|
|
2620
2688
|
data: {
|
|
2621
|
-
...(
|
|
2689
|
+
...(o = e.symbol) == null ? void 0 : o.data,
|
|
2622
2690
|
...e.builderContext.localState,
|
|
2623
|
-
...(
|
|
2691
|
+
...(l = n == null ? void 0 : n.data) == null ? void 0 : l.state
|
|
2624
2692
|
},
|
|
2625
|
-
model: (
|
|
2693
|
+
model: (s = e.symbol) == null ? void 0 : s.model,
|
|
2626
2694
|
content: n
|
|
2627
2695
|
}
|
|
2628
2696
|
) });
|
|
2629
2697
|
}
|
|
2630
|
-
const
|
|
2698
|
+
const on = ie, rn = Ae;
|
|
2631
2699
|
export {
|
|
2632
2700
|
ie as Blocks,
|
|
2633
2701
|
je as Button,
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2702
|
+
st as Columns,
|
|
2703
|
+
Ae as Content,
|
|
2704
|
+
dt as Fragment,
|
|
2705
|
+
ft as Image,
|
|
2706
|
+
on as RenderBlocks,
|
|
2707
|
+
rn as RenderContent,
|
|
2708
|
+
ht as Section,
|
|
2709
|
+
en as Symbol,
|
|
2710
|
+
Vt as Text,
|
|
2643
2711
|
Bt as Video,
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2712
|
+
sn as _processContentResult,
|
|
2713
|
+
We as createRegisterComponentMessage,
|
|
2714
|
+
dn as fetchBuilderProps,
|
|
2715
|
+
un as fetchEntries,
|
|
2716
|
+
Ce as fetchOneEntry,
|
|
2717
|
+
mn as getAllContent,
|
|
2718
|
+
fn as getBuilderSearchParams,
|
|
2719
|
+
hn as getContent,
|
|
2720
|
+
$ as isEditing,
|
|
2721
|
+
Fe as isPreviewing,
|
|
2722
|
+
Ne as register,
|
|
2723
|
+
gn as setEditorSettings,
|
|
2724
|
+
bn as track
|
|
2657
2725
|
};
|