@builder.io/sdk-react-nextjs 0.12.3 → 0.12.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/{node/USE_CLIENT_BUNDLE-98a4fbf4.js → browser/USE_CLIENT_BUNDLE-e6d429be.js} +188 -187
- package/lib/browser/{USE_CLIENT_BUNDLE-64b6ec10.cjs → USE_CLIENT_BUNDLE-e9e1ee85.cjs} +3 -3
- package/lib/{edge/USE_SERVER_BUNDLE-4e9af8f5.js → browser/USE_SERVER_BUNDLE-44c49b1e.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-e79e6b55.cjs → browser/USE_SERVER_BUNDLE-9bcc0ad4.cjs} +1 -1
- package/lib/browser/bundle-0e5cec1c.cjs +168 -0
- package/lib/browser/{bundle-f3e8cd29.js → bundle-bab67847.js} +573 -516
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +14 -14
- package/lib/{browser/USE_CLIENT_BUNDLE-e89d3175.js → edge/USE_CLIENT_BUNDLE-8d251b8b.js} +188 -187
- package/lib/{node/USE_CLIENT_BUNDLE-990b655a.cjs → edge/USE_CLIENT_BUNDLE-d87c391a.cjs} +3 -3
- package/lib/{node/USE_SERVER_BUNDLE-c86a1fb8.cjs → edge/USE_SERVER_BUNDLE-816ab6e4.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-b231d861.js → edge/USE_SERVER_BUNDLE-c0911af0.js} +1 -1
- package/lib/edge/{bundle-cb191300.js → bundle-28d9d04c.js} +1018 -961
- package/lib/edge/{bundle-d4f509a3.cjs → bundle-e64fe0fd.cjs} +33 -37
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +14 -14
- package/lib/{edge/USE_CLIENT_BUNDLE-a3258a60.js → node/USE_CLIENT_BUNDLE-75f921e2.js} +188 -187
- package/lib/{edge/USE_CLIENT_BUNDLE-2aed408a.cjs → node/USE_CLIENT_BUNDLE-ee5a9d6f.cjs} +3 -3
- package/lib/{browser/USE_SERVER_BUNDLE-f34c0814.cjs → node/USE_SERVER_BUNDLE-793c12c9.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-d6bec4ec.js → node/USE_SERVER_BUNDLE-86d90afe.js} +1 -1
- package/lib/node/{bundle-11daeaca.js → bundle-031e3608.js} +348 -291
- package/lib/node/{bundle-b2d68b60.cjs → bundle-72df28b3.cjs} +6 -10
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +14 -14
- package/package.json +1 -1
- package/types/cjs/blocks/button/button.types.d.ts +2 -1
- package/types/cjs/blocks/columns/columns.types.d.ts +3 -3
- package/types/cjs/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/cjs/components/block/block.d.ts +1 -0
- package/types/cjs/components/block/components/block-wrapper.d.ts +1 -0
- package/types/cjs/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/types/cjs/components/block/components/repeated-block.d.ts +3 -5
- package/types/cjs/components/blocks/blocks.types.d.ts +1 -0
- package/types/cjs/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-block-properties.d.ts +5 -1
- package/types/cjs/functions/get-class-prop-name.d.ts +1 -0
- package/types/cjs/functions/get-style.d.ts +12 -0
- package/types/cjs/functions/transform-block-properties.d.ts +7 -5
- package/types/cjs/functions/transform-style-property.d.ts +7 -0
- package/types/cjs/types/builder-block.d.ts +1 -0
- package/types/cjs/types/builder-props.d.ts +3 -0
- package/types/esm/blocks/button/button.types.d.ts +2 -1
- package/types/esm/blocks/columns/columns.types.d.ts +3 -3
- package/types/esm/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/esm/components/block/block.d.ts +1 -0
- package/types/esm/components/block/components/block-wrapper.d.ts +1 -0
- package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +8 -1
- package/types/esm/components/block/components/repeated-block.d.ts +3 -5
- package/types/esm/components/blocks/blocks.types.d.ts +1 -0
- package/types/esm/components/content-variants/content-variants.types.d.ts +6 -2
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-block-properties.d.ts +5 -1
- package/types/esm/functions/get-class-prop-name.d.ts +1 -0
- package/types/esm/functions/get-style.d.ts +12 -0
- package/types/esm/functions/transform-block-properties.d.ts +7 -5
- package/types/esm/functions/transform-style-property.d.ts +7 -0
- package/types/esm/types/builder-block.d.ts +1 -0
- package/types/esm/types/builder-props.d.ts +3 -0
- package/lib/browser/bundle-50ff23eb.cjs +0 -172
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { LRUCache as
|
|
2
|
-
import { jsx as l, Fragment as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { LRUCache as Ae } from "lru-cache";
|
|
2
|
+
import { jsx as l, Fragment as k, jsxs as R } from "react/jsx-runtime";
|
|
3
|
+
import { I as Ve, B as Be, a as We, D as $e, b as Oe, C as Fe, E as Le, F as Ne, c as _e, d as Ue, S as De, V as Me, e as je } from "./USE_CLIENT_BUNDLE-e6d429be.js";
|
|
4
|
+
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
|
|
6
|
+
const He = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), zn = (e) => typeof e == "string" && He.has(e.toLowerCase()), I = "rsc", M = () => {
|
|
7
|
+
switch (I) {
|
|
8
|
+
case "react":
|
|
9
|
+
case "reactNative":
|
|
10
|
+
case "rsc":
|
|
11
|
+
return "className";
|
|
12
|
+
case "svelte":
|
|
13
|
+
case "vue":
|
|
14
|
+
case "solid":
|
|
15
|
+
case "qwik":
|
|
16
|
+
return "class";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function Ke(e) {
|
|
7
20
|
var t;
|
|
8
21
|
return {
|
|
9
22
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -14,30 +27,29 @@ function De(e) {
|
|
|
14
27
|
builderBlock: e
|
|
15
28
|
};
|
|
16
29
|
}
|
|
17
|
-
const
|
|
18
|
-
log: (...e) => console.log(
|
|
19
|
-
error: (...e) => console.error(
|
|
20
|
-
warn: (...e) => console.warn(
|
|
21
|
-
debug: (...e) => console.debug(
|
|
30
|
+
const A = "[Builder.io]: ", x = {
|
|
31
|
+
log: (...e) => console.log(A, ...e),
|
|
32
|
+
error: (...e) => console.error(A, ...e),
|
|
33
|
+
warn: (...e) => console.warn(A, ...e),
|
|
34
|
+
debug: (...e) => console.debug(A, ...e)
|
|
22
35
|
};
|
|
23
|
-
function
|
|
36
|
+
function S() {
|
|
24
37
|
return typeof window < "u" && typeof document < "u";
|
|
25
38
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return v() && window.self !== window.top;
|
|
39
|
+
function ze() {
|
|
40
|
+
return S() && window.self !== window.top;
|
|
29
41
|
}
|
|
30
|
-
function
|
|
31
|
-
return
|
|
42
|
+
function j() {
|
|
43
|
+
return ze() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
32
44
|
}
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
45
|
+
const qe = () => {
|
|
46
|
+
if (S()) {
|
|
35
47
|
const e = new URL(location.href);
|
|
36
48
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
37
49
|
} else
|
|
38
50
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
39
|
-
},
|
|
40
|
-
const e =
|
|
51
|
+
}, Ge = () => typeof navigator == "object" && navigator.userAgent || "", ce = () => {
|
|
52
|
+
const e = Ge(), t = {
|
|
41
53
|
Android() {
|
|
42
54
|
return e.match(/Android/i);
|
|
43
55
|
},
|
|
@@ -56,13 +68,13 @@ const He = () => {
|
|
|
56
68
|
any() {
|
|
57
69
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || I === "reactNative";
|
|
58
70
|
}
|
|
59
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
71
|
+
}, n = e.match(/Tablet|iPad/i), o = qe();
|
|
60
72
|
return {
|
|
61
73
|
urlPath: o == null ? void 0 : o.pathname,
|
|
62
74
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
63
75
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
64
76
|
};
|
|
65
|
-
},
|
|
77
|
+
}, Ye = ({
|
|
66
78
|
builder: e,
|
|
67
79
|
context: t,
|
|
68
80
|
event: n,
|
|
@@ -74,14 +86,14 @@ const He = () => {
|
|
|
74
86
|
builder: e,
|
|
75
87
|
context: t,
|
|
76
88
|
event: n
|
|
77
|
-
}),
|
|
78
|
-
isEditing:
|
|
79
|
-
isBrowser:
|
|
80
|
-
isServer: !
|
|
81
|
-
getUserAttributes: () =>
|
|
82
|
-
}),
|
|
89
|
+
}), Je = () => ({
|
|
90
|
+
isEditing: j(),
|
|
91
|
+
isBrowser: S(),
|
|
92
|
+
isServer: !S(),
|
|
93
|
+
getUserAttributes: () => ce()
|
|
94
|
+
}), Qe = (e, {
|
|
83
95
|
isExpression: t = !0
|
|
84
|
-
}) => /* 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,
|
|
96
|
+
}) => /* 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, G = ({
|
|
85
97
|
code: e,
|
|
86
98
|
builder: t,
|
|
87
99
|
context: n,
|
|
@@ -90,15 +102,15 @@ const He = () => {
|
|
|
90
102
|
rootSetState: a,
|
|
91
103
|
rootState: r
|
|
92
104
|
}) => {
|
|
93
|
-
const s =
|
|
105
|
+
const s = Ye({
|
|
94
106
|
builder: t,
|
|
95
107
|
context: n,
|
|
96
108
|
event: o,
|
|
97
|
-
state:
|
|
109
|
+
state: Xe(r, i, a)
|
|
98
110
|
});
|
|
99
111
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
100
112
|
};
|
|
101
|
-
function
|
|
113
|
+
function Xe(e, t, n) {
|
|
102
114
|
if (e === t)
|
|
103
115
|
throw new Error("rootState === localState");
|
|
104
116
|
return new Proxy(e, {
|
|
@@ -110,8 +122,8 @@ function Ye(e, t, n) {
|
|
|
110
122
|
}
|
|
111
123
|
});
|
|
112
124
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
125
|
+
const Ze = (e) => (S(), G(e));
|
|
126
|
+
function H({
|
|
115
127
|
code: e,
|
|
116
128
|
context: t,
|
|
117
129
|
localState: n,
|
|
@@ -121,14 +133,14 @@ function j({
|
|
|
121
133
|
isExpression: r = !0
|
|
122
134
|
}) {
|
|
123
135
|
if (e === "") {
|
|
124
|
-
|
|
136
|
+
x.warn("Skipping evaluation of empty code block.");
|
|
125
137
|
return;
|
|
126
138
|
}
|
|
127
139
|
const s = {
|
|
128
|
-
code:
|
|
140
|
+
code: Qe(e, {
|
|
129
141
|
isExpression: r
|
|
130
142
|
}),
|
|
131
|
-
builder:
|
|
143
|
+
builder: Je(),
|
|
132
144
|
context: t,
|
|
133
145
|
event: a,
|
|
134
146
|
rootSetState: i,
|
|
@@ -136,21 +148,21 @@ function j({
|
|
|
136
148
|
localState: n
|
|
137
149
|
};
|
|
138
150
|
try {
|
|
139
|
-
return
|
|
151
|
+
return Ze(s);
|
|
140
152
|
} catch (c) {
|
|
141
|
-
|
|
153
|
+
x.error("Failed code evaluation: " + c.message, {
|
|
142
154
|
code: e
|
|
143
155
|
});
|
|
144
156
|
return;
|
|
145
157
|
}
|
|
146
158
|
}
|
|
147
|
-
const $ = (e) => JSON.parse(JSON.stringify(e)),
|
|
159
|
+
const $ = (e) => JSON.parse(JSON.stringify(e)), et = (e, t, n) => {
|
|
148
160
|
if (Object(e) !== e)
|
|
149
161
|
return e;
|
|
150
162
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
151
163
|
return o.slice(0, -1).reduce((i, a, r) => Object(i[a]) === i[a] ? i[a] : i[a] = Math.abs(Number(o[r + 1])) >> 0 === +o[r + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
152
164
|
};
|
|
153
|
-
const
|
|
165
|
+
const tt = ({
|
|
154
166
|
block: e,
|
|
155
167
|
context: t,
|
|
156
168
|
localState: n,
|
|
@@ -169,14 +181,14 @@ const Xe = ({
|
|
|
169
181
|
}
|
|
170
182
|
};
|
|
171
183
|
for (const s in e.bindings) {
|
|
172
|
-
const c = e.bindings[s],
|
|
184
|
+
const c = e.bindings[s], m = H({
|
|
173
185
|
code: c,
|
|
174
186
|
localState: n,
|
|
175
187
|
rootState: o,
|
|
176
188
|
rootSetState: i,
|
|
177
189
|
context: t
|
|
178
190
|
});
|
|
179
|
-
|
|
191
|
+
et(r, s, m);
|
|
180
192
|
}
|
|
181
193
|
return r;
|
|
182
194
|
};
|
|
@@ -189,7 +201,7 @@ function W({
|
|
|
189
201
|
rootSetState: a
|
|
190
202
|
}) {
|
|
191
203
|
const r = e;
|
|
192
|
-
return n ?
|
|
204
|
+
return n ? tt({
|
|
193
205
|
block: r,
|
|
194
206
|
localState: o,
|
|
195
207
|
rootState: i,
|
|
@@ -197,7 +209,7 @@ function W({
|
|
|
197
209
|
context: t
|
|
198
210
|
}) : r;
|
|
199
211
|
}
|
|
200
|
-
const
|
|
212
|
+
const nt = ({
|
|
201
213
|
block: e,
|
|
202
214
|
context: t,
|
|
203
215
|
registeredComponents: n
|
|
@@ -219,7 +231,7 @@ const Ze = ({
|
|
|
219
231
|
console.warn(`
|
|
220
232
|
Could not find a registered component named "${o}".
|
|
221
233
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
222
|
-
},
|
|
234
|
+
}, ot = ({
|
|
223
235
|
block: e,
|
|
224
236
|
context: t
|
|
225
237
|
}) => {
|
|
@@ -229,7 +241,7 @@ const Ze = ({
|
|
|
229
241
|
} = e;
|
|
230
242
|
if (!(n != null && n.collection))
|
|
231
243
|
return;
|
|
232
|
-
const i =
|
|
244
|
+
const i = H({
|
|
233
245
|
code: n.collection,
|
|
234
246
|
localState: t.localState,
|
|
235
247
|
rootState: t.rootState,
|
|
@@ -239,20 +251,20 @@ const Ze = ({
|
|
|
239
251
|
if (!Array.isArray(i))
|
|
240
252
|
return;
|
|
241
253
|
const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
|
|
242
|
-
return i.map((c,
|
|
254
|
+
return i.map((c, m) => ({
|
|
243
255
|
context: {
|
|
244
256
|
...t,
|
|
245
257
|
localState: {
|
|
246
258
|
...t.localState,
|
|
247
|
-
$index:
|
|
259
|
+
$index: m,
|
|
248
260
|
$item: c,
|
|
249
261
|
[r]: c,
|
|
250
|
-
[`$${r}Index`]:
|
|
262
|
+
[`$${r}Index`]: m
|
|
251
263
|
}
|
|
252
264
|
},
|
|
253
265
|
block: o
|
|
254
266
|
}));
|
|
255
|
-
},
|
|
267
|
+
}, le = {
|
|
256
268
|
small: {
|
|
257
269
|
min: 320,
|
|
258
270
|
default: 321,
|
|
@@ -268,11 +280,11 @@ const Ze = ({
|
|
|
268
280
|
default: 991,
|
|
269
281
|
max: 1200
|
|
270
282
|
}
|
|
271
|
-
},
|
|
283
|
+
}, Y = (e, t = le) => `@media (max-width: ${t[e].max}px)`, de = ({
|
|
272
284
|
small: e,
|
|
273
285
|
medium: t
|
|
274
286
|
}) => {
|
|
275
|
-
const n = $(
|
|
287
|
+
const n = $(le);
|
|
276
288
|
if (!e || !t)
|
|
277
289
|
return n;
|
|
278
290
|
const o = Math.floor(e / 2);
|
|
@@ -294,17 +306,17 @@ const Ze = ({
|
|
|
294
306
|
min: a,
|
|
295
307
|
default: a + 1
|
|
296
308
|
}, n;
|
|
297
|
-
},
|
|
309
|
+
}, it = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e != null, ue = (e) => Object.entries(e).map(([n, o]) => {
|
|
298
310
|
if (typeof o == "string")
|
|
299
|
-
return `${
|
|
300
|
-
}).filter(w),
|
|
301
|
-
`),
|
|
311
|
+
return `${it(n)}: ${o};`;
|
|
312
|
+
}).filter(w), at = (e) => ue(e).join(`
|
|
313
|
+
`), N = ({
|
|
302
314
|
mediaQuery: e,
|
|
303
315
|
className: t,
|
|
304
316
|
styles: n
|
|
305
317
|
}) => {
|
|
306
318
|
const o = `.${t} {
|
|
307
|
-
${
|
|
319
|
+
${at(n)}
|
|
308
320
|
}`;
|
|
309
321
|
return e ? `${e} {
|
|
310
322
|
${o}
|
|
@@ -313,7 +325,7 @@ const Ze = ({
|
|
|
313
325
|
function O(e) {
|
|
314
326
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
315
327
|
}
|
|
316
|
-
function
|
|
328
|
+
function rt(e) {
|
|
317
329
|
const t = function() {
|
|
318
330
|
const i = W({
|
|
319
331
|
block: e.block,
|
|
@@ -333,37 +345,37 @@ function ot(e) {
|
|
|
333
345
|
rootSetState: e.context.rootSetState,
|
|
334
346
|
context: e.context.context,
|
|
335
347
|
shouldEvaluateBindings: !0
|
|
336
|
-
}), a = i.responsiveStyles, r = e.context.content, s =
|
|
348
|
+
}), a = i.responsiveStyles, r = e.context.content, s = de(
|
|
337
349
|
((d = r == null ? void 0 : r.meta) == null ? void 0 : d.breakpoints) || {}
|
|
338
|
-
), c = a == null ? void 0 : a.large,
|
|
350
|
+
), c = a == null ? void 0 : a.large, m = a == null ? void 0 : a.medium, g = a == null ? void 0 : a.small, p = i.id;
|
|
339
351
|
if (!p)
|
|
340
352
|
return "";
|
|
341
|
-
const
|
|
353
|
+
const f = c ? N({
|
|
342
354
|
className: p,
|
|
343
355
|
styles: c
|
|
344
|
-
}) : "", h =
|
|
356
|
+
}) : "", h = m ? N({
|
|
345
357
|
className: p,
|
|
346
|
-
styles:
|
|
347
|
-
mediaQuery:
|
|
358
|
+
styles: m,
|
|
359
|
+
mediaQuery: Y(
|
|
348
360
|
"medium",
|
|
349
361
|
s
|
|
350
362
|
)
|
|
351
|
-
}) : "",
|
|
363
|
+
}) : "", u = g ? N({
|
|
352
364
|
className: p,
|
|
353
365
|
styles: g,
|
|
354
|
-
mediaQuery:
|
|
366
|
+
mediaQuery: Y(
|
|
355
367
|
"small",
|
|
356
368
|
s
|
|
357
369
|
)
|
|
358
370
|
}) : "";
|
|
359
|
-
return [
|
|
371
|
+
return [f, h, u].join(" ");
|
|
360
372
|
};
|
|
361
|
-
return /* @__PURE__ */ l(
|
|
373
|
+
return /* @__PURE__ */ l(k, { children: n() && t() ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
362
374
|
}
|
|
363
|
-
function
|
|
375
|
+
function st(e) {
|
|
364
376
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
365
377
|
}
|
|
366
|
-
const
|
|
378
|
+
const ct = (e) => `on${st(e)}`, lt = (e, t) => (n) => H({
|
|
367
379
|
code: e,
|
|
368
380
|
context: t.context,
|
|
369
381
|
localState: t.localState,
|
|
@@ -372,13 +384,13 @@ const at = (e) => `on${it(e)}`, rt = (e, t) => (n) => j({
|
|
|
372
384
|
event: n,
|
|
373
385
|
isExpression: !1
|
|
374
386
|
});
|
|
375
|
-
function
|
|
387
|
+
function qn(e) {
|
|
376
388
|
const t = {}, n = e.block.actions ?? {};
|
|
377
389
|
for (const o in n) {
|
|
378
390
|
if (!n.hasOwnProperty(o))
|
|
379
391
|
continue;
|
|
380
392
|
const i = n[o];
|
|
381
|
-
let a =
|
|
393
|
+
let a = ct(o);
|
|
382
394
|
if (e.stripPrefix)
|
|
383
395
|
switch (I) {
|
|
384
396
|
case "vue":
|
|
@@ -388,50 +400,66 @@ function jn(e) {
|
|
|
388
400
|
a = a.replace("on:", "");
|
|
389
401
|
break;
|
|
390
402
|
}
|
|
391
|
-
t[a] =
|
|
403
|
+
t[a] = lt(i, e);
|
|
392
404
|
}
|
|
393
405
|
return t;
|
|
394
406
|
}
|
|
395
|
-
function
|
|
407
|
+
function dt({
|
|
408
|
+
style: e
|
|
409
|
+
}) {
|
|
410
|
+
return e;
|
|
411
|
+
}
|
|
412
|
+
const ut = ({
|
|
413
|
+
block: e,
|
|
414
|
+
context: t
|
|
415
|
+
}) => me(dt({
|
|
416
|
+
style: e.style || {},
|
|
417
|
+
context: t,
|
|
418
|
+
block: e
|
|
419
|
+
}));
|
|
420
|
+
function me(e) {
|
|
421
|
+
switch (I) {
|
|
422
|
+
case "svelte":
|
|
423
|
+
case "vue":
|
|
424
|
+
case "solid":
|
|
425
|
+
return ue(e).join(" ");
|
|
426
|
+
case "qwik":
|
|
427
|
+
case "reactNative":
|
|
428
|
+
case "react":
|
|
429
|
+
case "rsc":
|
|
430
|
+
return e;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
function mt({
|
|
396
434
|
properties: e
|
|
397
435
|
}) {
|
|
398
|
-
return e
|
|
436
|
+
return e;
|
|
399
437
|
}
|
|
400
|
-
const
|
|
438
|
+
const ft = (e) => ({
|
|
401
439
|
href: e.href
|
|
402
440
|
});
|
|
403
|
-
function
|
|
441
|
+
function ht({
|
|
404
442
|
block: e,
|
|
405
443
|
context: t
|
|
406
444
|
}) {
|
|
407
445
|
var o;
|
|
408
446
|
const n = {
|
|
409
|
-
...
|
|
447
|
+
...ft(e),
|
|
410
448
|
...e.properties,
|
|
411
449
|
"builder-id": e.id,
|
|
412
|
-
style:
|
|
413
|
-
|
|
450
|
+
style: ut({
|
|
451
|
+
block: e,
|
|
452
|
+
context: t
|
|
453
|
+
}),
|
|
454
|
+
[M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
414
455
|
};
|
|
415
|
-
return
|
|
456
|
+
return mt({
|
|
416
457
|
properties: n,
|
|
417
458
|
context: t,
|
|
418
459
|
block: e
|
|
419
460
|
});
|
|
420
461
|
}
|
|
421
|
-
|
|
422
|
-
switch (I) {
|
|
423
|
-
case "svelte":
|
|
424
|
-
case "vue":
|
|
425
|
-
case "solid":
|
|
426
|
-
return de(e).join(" ");
|
|
427
|
-
case "qwik":
|
|
428
|
-
case "reactNative":
|
|
429
|
-
case "react":
|
|
430
|
-
case "rsc":
|
|
431
|
-
return e;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
const ut = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), Hn = (e) => typeof e == "string" && ut.has(e.toLowerCase()), mt = ({
|
|
462
|
+
const pt = ({
|
|
435
463
|
componentOptions: e,
|
|
436
464
|
builderBlock: t,
|
|
437
465
|
context: n,
|
|
@@ -447,7 +475,7 @@ const ut = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
447
475
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
448
476
|
*/
|
|
449
477
|
...i ? {
|
|
450
|
-
attributes:
|
|
478
|
+
attributes: ht({
|
|
451
479
|
block: t,
|
|
452
480
|
context: r
|
|
453
481
|
})
|
|
@@ -461,17 +489,18 @@ const ut = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
461
489
|
includeBlockProps: i
|
|
462
490
|
} : s;
|
|
463
491
|
};
|
|
464
|
-
function
|
|
492
|
+
function J(e) {
|
|
465
493
|
var n;
|
|
466
|
-
const t = e.isInteractive ?
|
|
467
|
-
return /* @__PURE__ */ l(
|
|
494
|
+
const t = e.isInteractive ? Ve : e.componentRef;
|
|
495
|
+
return /* @__PURE__ */ l(k, { children: e.componentRef ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
468
496
|
t,
|
|
469
497
|
{
|
|
470
|
-
...
|
|
498
|
+
...pt({
|
|
471
499
|
componentOptions: e.componentOptions,
|
|
472
500
|
builderBlock: e.builderBlock,
|
|
473
501
|
context: e.context,
|
|
474
502
|
componentRef: e.componentRef,
|
|
503
|
+
linkComponent: e.linkComponent,
|
|
475
504
|
includeBlockProps: e.includeBlockProps,
|
|
476
505
|
isInteractive: e.isInteractive,
|
|
477
506
|
contextValue: e.context
|
|
@@ -481,34 +510,36 @@ function Y(e) {
|
|
|
481
510
|
{
|
|
482
511
|
block: o,
|
|
483
512
|
context: e.context,
|
|
484
|
-
registeredComponents: e.registeredComponents
|
|
513
|
+
registeredComponents: e.registeredComponents,
|
|
514
|
+
linkComponent: e.linkComponent
|
|
485
515
|
},
|
|
486
516
|
o.id
|
|
487
517
|
))
|
|
488
518
|
}
|
|
489
519
|
) }) : null });
|
|
490
520
|
}
|
|
491
|
-
function
|
|
521
|
+
function gt(e) {
|
|
492
522
|
const t = e.repeatContext;
|
|
493
523
|
return /* @__PURE__ */ l(
|
|
494
524
|
F,
|
|
495
525
|
{
|
|
496
526
|
block: e.block,
|
|
497
527
|
context: t,
|
|
498
|
-
registeredComponents: e.registeredComponents
|
|
528
|
+
registeredComponents: e.registeredComponents,
|
|
529
|
+
linkComponent: e.linkComponent
|
|
499
530
|
}
|
|
500
531
|
);
|
|
501
532
|
}
|
|
502
533
|
function F(e) {
|
|
503
|
-
var
|
|
534
|
+
var m, g, p;
|
|
504
535
|
const t = function() {
|
|
505
|
-
return
|
|
536
|
+
return nt({
|
|
506
537
|
block: e.block,
|
|
507
538
|
context: e.context,
|
|
508
539
|
registeredComponents: e.registeredComponents
|
|
509
540
|
});
|
|
510
541
|
}, n = function() {
|
|
511
|
-
return
|
|
542
|
+
return ot({
|
|
512
543
|
block: e.block,
|
|
513
544
|
context: e.context
|
|
514
545
|
});
|
|
@@ -523,95 +554,105 @@ function F(e) {
|
|
|
523
554
|
shouldEvaluateBindings: !0
|
|
524
555
|
});
|
|
525
556
|
}, i = function() {
|
|
526
|
-
|
|
557
|
+
var u;
|
|
558
|
+
return e.block.tagName === "a" || ((u = o().properties) == null ? void 0 : u.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
|
|
527
559
|
}, a = function() {
|
|
528
|
-
var d,
|
|
560
|
+
var d, y;
|
|
529
561
|
if ((d = e.block.repeat) != null && d.collection)
|
|
530
|
-
return !!((
|
|
562
|
+
return !!((y = n()) != null && y.length);
|
|
531
563
|
const h = "hide" in o() ? o().hide : !1;
|
|
532
564
|
return ("show" in o() ? o().show : !0) && !h;
|
|
533
565
|
}, r = function() {
|
|
534
|
-
var
|
|
535
|
-
return !((
|
|
566
|
+
var u;
|
|
567
|
+
return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
|
|
536
568
|
}, s = function() {
|
|
537
|
-
var h,
|
|
569
|
+
var h, u, d, y, v, b, E, T;
|
|
538
570
|
return {
|
|
539
571
|
blockChildren: o().children ?? [],
|
|
540
572
|
componentRef: (h = t()) == null ? void 0 : h.component,
|
|
541
573
|
componentOptions: {
|
|
542
|
-
...
|
|
574
|
+
...Ke(o()),
|
|
543
575
|
builderContext: e.context,
|
|
544
|
-
...((
|
|
576
|
+
...((u = t()) == null ? void 0 : u.name) === "Core:Button" || ((d = t()) == null ? void 0 : d.name) === "Symbol" || ((y = t()) == null ? void 0 : y.name) === "Columns" ? {
|
|
577
|
+
builderLinkComponent: e.linkComponent
|
|
578
|
+
} : {},
|
|
579
|
+
...((v = t()) == null ? void 0 : v.name) === "Symbol" || ((b = t()) == null ? void 0 : b.name) === "Columns" ? {
|
|
545
580
|
builderComponents: e.registeredComponents
|
|
546
581
|
} : {}
|
|
547
582
|
},
|
|
548
583
|
context: c,
|
|
584
|
+
linkComponent: e.linkComponent,
|
|
549
585
|
registeredComponents: e.registeredComponents,
|
|
550
586
|
builderBlock: o(),
|
|
551
|
-
includeBlockProps: ((
|
|
552
|
-
isInteractive: !((
|
|
587
|
+
includeBlockProps: ((E = t()) == null ? void 0 : E.noWrap) === !0,
|
|
588
|
+
isInteractive: !((T = t()) != null && T.isRSC)
|
|
553
589
|
};
|
|
554
590
|
}, c = e.context;
|
|
555
|
-
return /* @__PURE__ */ l(
|
|
556
|
-
/* @__PURE__ */ l(
|
|
557
|
-
(
|
|
558
|
-
|
|
591
|
+
return /* @__PURE__ */ l(k, { children: a() ? /* @__PURE__ */ R(k, { children: [
|
|
592
|
+
/* @__PURE__ */ l(rt, { block: e.block, context: e.context }),
|
|
593
|
+
(m = t()) != null && m.noWrap ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
594
|
+
J,
|
|
559
595
|
{
|
|
560
596
|
componentRef: s().componentRef,
|
|
561
597
|
componentOptions: s().componentOptions,
|
|
562
598
|
blockChildren: s().blockChildren,
|
|
563
599
|
context: s().context,
|
|
564
600
|
registeredComponents: s().registeredComponents,
|
|
601
|
+
linkComponent: s().linkComponent,
|
|
565
602
|
builderBlock: s().builderBlock,
|
|
566
603
|
includeBlockProps: s().includeBlockProps,
|
|
567
604
|
isInteractive: s().isInteractive
|
|
568
605
|
}
|
|
569
|
-
) }) : /* @__PURE__ */ l(
|
|
570
|
-
|
|
606
|
+
) }) : /* @__PURE__ */ l(k, { children: n() ? /* @__PURE__ */ l(k, { children: (p = n()) == null ? void 0 : p.map((f, h) => /* @__PURE__ */ l(
|
|
607
|
+
gt,
|
|
571
608
|
{
|
|
572
|
-
repeatContext:
|
|
573
|
-
block:
|
|
574
|
-
registeredComponents: e.registeredComponents
|
|
609
|
+
repeatContext: f.context,
|
|
610
|
+
block: f.block,
|
|
611
|
+
registeredComponents: e.registeredComponents,
|
|
612
|
+
linkComponent: e.linkComponent
|
|
575
613
|
},
|
|
576
614
|
h
|
|
577
|
-
)) }) : /* @__PURE__ */ l(
|
|
578
|
-
|
|
615
|
+
)) }) : /* @__PURE__ */ l(k, { children: /* @__PURE__ */ R(
|
|
616
|
+
Be,
|
|
579
617
|
{
|
|
580
618
|
Wrapper: i(),
|
|
581
619
|
block: o(),
|
|
582
620
|
context: e.context,
|
|
621
|
+
linkComponent: e.linkComponent,
|
|
583
622
|
children: [
|
|
584
623
|
/* @__PURE__ */ l(
|
|
585
|
-
|
|
624
|
+
J,
|
|
586
625
|
{
|
|
587
626
|
componentRef: s().componentRef,
|
|
588
627
|
componentOptions: s().componentOptions,
|
|
589
628
|
blockChildren: s().blockChildren,
|
|
590
629
|
context: s().context,
|
|
591
630
|
registeredComponents: s().registeredComponents,
|
|
631
|
+
linkComponent: s().linkComponent,
|
|
592
632
|
builderBlock: s().builderBlock,
|
|
593
633
|
includeBlockProps: s().includeBlockProps,
|
|
594
634
|
isInteractive: s().isInteractive
|
|
595
635
|
}
|
|
596
636
|
),
|
|
597
|
-
(g = r()) == null ? void 0 : g.map((
|
|
637
|
+
(g = r()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
|
|
598
638
|
F,
|
|
599
639
|
{
|
|
600
|
-
block:
|
|
640
|
+
block: f,
|
|
601
641
|
context: c,
|
|
602
|
-
registeredComponents: e.registeredComponents
|
|
642
|
+
registeredComponents: e.registeredComponents,
|
|
643
|
+
linkComponent: e.linkComponent
|
|
603
644
|
},
|
|
604
|
-
|
|
645
|
+
f.id
|
|
605
646
|
))
|
|
606
647
|
]
|
|
607
648
|
}
|
|
608
649
|
) }) })
|
|
609
650
|
] }) : null });
|
|
610
651
|
}
|
|
611
|
-
function
|
|
652
|
+
function L(e) {
|
|
612
653
|
var t, n, o;
|
|
613
654
|
return /* @__PURE__ */ l(
|
|
614
|
-
|
|
655
|
+
We,
|
|
615
656
|
{
|
|
616
657
|
blocks: e.blocks,
|
|
617
658
|
parent: e.parent,
|
|
@@ -619,10 +660,11 @@ function N(e) {
|
|
|
619
660
|
styleProp: e.styleProp,
|
|
620
661
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
621
662
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
622
|
-
children: e.blocks ? /* @__PURE__ */ l(
|
|
663
|
+
children: e.blocks ? /* @__PURE__ */ l(k, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
623
664
|
F,
|
|
624
665
|
{
|
|
625
666
|
block: i,
|
|
667
|
+
linkComponent: e.linkComponent,
|
|
626
668
|
context: e.context,
|
|
627
669
|
registeredComponents: e.registeredComponents
|
|
628
670
|
},
|
|
@@ -631,25 +673,25 @@ function N(e) {
|
|
|
631
673
|
}
|
|
632
674
|
);
|
|
633
675
|
}
|
|
634
|
-
function
|
|
676
|
+
function bt(e) {
|
|
635
677
|
var h;
|
|
636
678
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
637
|
-
var
|
|
638
|
-
return ((
|
|
679
|
+
var y;
|
|
680
|
+
return ((y = n[d]) == null ? void 0 : y.width) || 100 / n.length;
|
|
639
681
|
}, a = function(d) {
|
|
640
|
-
const
|
|
641
|
-
return `calc(${i(d)}% - ${
|
|
682
|
+
const y = t * (n.length - 1) / n.length;
|
|
683
|
+
return `calc(${i(d)}% - ${y}px)`;
|
|
642
684
|
}, r = function({
|
|
643
685
|
stackedStyle: d,
|
|
644
|
-
desktopStyle:
|
|
686
|
+
desktopStyle: y
|
|
645
687
|
}) {
|
|
646
|
-
return o === "tablet" ? d :
|
|
688
|
+
return o === "tablet" ? d : y;
|
|
647
689
|
}, s = function({
|
|
648
690
|
stackedStyle: d,
|
|
649
|
-
desktopStyle:
|
|
691
|
+
desktopStyle: y
|
|
650
692
|
}) {
|
|
651
|
-
return o === "never" ?
|
|
652
|
-
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
693
|
+
return o === "never" ? y : d;
|
|
694
|
+
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", m = function() {
|
|
653
695
|
return {
|
|
654
696
|
"--flex-dir": c,
|
|
655
697
|
"--flex-dir-tablet": r({
|
|
@@ -658,33 +700,38 @@ function ht(e) {
|
|
|
658
700
|
})
|
|
659
701
|
};
|
|
660
702
|
}, g = function(d) {
|
|
661
|
-
const
|
|
703
|
+
const y = d === 0 ? 0 : t, v = a(d), b = `${y}px`, E = "100%", T = 0;
|
|
662
704
|
return {
|
|
663
|
-
|
|
664
|
-
|
|
705
|
+
...{
|
|
706
|
+
display: "flex",
|
|
707
|
+
flexDirection: "column",
|
|
708
|
+
alignItems: "stretch"
|
|
709
|
+
},
|
|
710
|
+
width: v,
|
|
711
|
+
["marginLeft"]: b,
|
|
665
712
|
"--column-width-mobile": s({
|
|
666
|
-
stackedStyle:
|
|
667
|
-
desktopStyle:
|
|
713
|
+
stackedStyle: E,
|
|
714
|
+
desktopStyle: v
|
|
668
715
|
}),
|
|
669
716
|
"--column-margin-left-mobile": s({
|
|
670
|
-
stackedStyle:
|
|
671
|
-
desktopStyle:
|
|
717
|
+
stackedStyle: T,
|
|
718
|
+
desktopStyle: b
|
|
672
719
|
}),
|
|
673
720
|
"--column-width-tablet": r({
|
|
674
|
-
stackedStyle:
|
|
675
|
-
desktopStyle:
|
|
721
|
+
stackedStyle: E,
|
|
722
|
+
desktopStyle: v
|
|
676
723
|
}),
|
|
677
724
|
"--column-margin-left-tablet": r({
|
|
678
|
-
stackedStyle:
|
|
679
|
-
desktopStyle:
|
|
725
|
+
stackedStyle: T,
|
|
726
|
+
desktopStyle: b
|
|
680
727
|
})
|
|
681
728
|
};
|
|
682
729
|
}, p = function(d) {
|
|
683
|
-
var
|
|
684
|
-
return
|
|
685
|
-
((
|
|
730
|
+
var v, b;
|
|
731
|
+
return de(
|
|
732
|
+
((b = (v = e.builderContext.content) == null ? void 0 : v.meta) == null ? void 0 : b.breakpoints) || {}
|
|
686
733
|
)[d].max;
|
|
687
|
-
},
|
|
734
|
+
}, f = function() {
|
|
688
735
|
return `
|
|
689
736
|
@media (max-width: ${p("medium")}px) {
|
|
690
737
|
.${e.builderBlock.id}-breakpoints {
|
|
@@ -711,84 +758,88 @@ function ht(e) {
|
|
|
711
758
|
},
|
|
712
759
|
`;
|
|
713
760
|
};
|
|
714
|
-
return /* @__PURE__ */
|
|
715
|
-
/* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ R(k, { children: [
|
|
762
|
+
/* @__PURE__ */ R(
|
|
716
763
|
"div",
|
|
717
764
|
{
|
|
718
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
719
|
-
style:
|
|
765
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-3d816b82`,
|
|
766
|
+
style: m(),
|
|
720
767
|
children: [
|
|
721
|
-
/* @__PURE__ */ l(
|
|
722
|
-
(h = e.columns) == null ? void 0 : h.map((
|
|
723
|
-
|
|
768
|
+
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
|
|
769
|
+
(h = e.columns) == null ? void 0 : h.map((u, d) => /* @__PURE__ */ l(
|
|
770
|
+
$e,
|
|
724
771
|
{
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
772
|
+
TagName: u.link ? e.builderLinkComponent || "a" : "div",
|
|
773
|
+
actionAttributes: {},
|
|
774
|
+
attributes: {
|
|
775
|
+
...u.link ? {
|
|
776
|
+
href: u.link
|
|
777
|
+
} : {},
|
|
778
|
+
[M()]: "builder-column",
|
|
779
|
+
style: me(g(d))
|
|
780
|
+
},
|
|
781
|
+
children: /* @__PURE__ */ l(
|
|
782
|
+
L,
|
|
783
|
+
{
|
|
784
|
+
path: `component.options.columns.${d}.blocks`,
|
|
785
|
+
parent: e.builderBlock.id,
|
|
786
|
+
styleProp: {
|
|
787
|
+
flexGrow: "1"
|
|
788
|
+
},
|
|
789
|
+
context: e.builderContext,
|
|
790
|
+
registeredComponents: e.builderComponents,
|
|
791
|
+
linkComponent: e.builderLinkComponent,
|
|
792
|
+
blocks: u.blocks
|
|
793
|
+
}
|
|
794
|
+
)
|
|
728
795
|
},
|
|
729
|
-
|
|
730
|
-
N,
|
|
731
|
-
{
|
|
732
|
-
path: `component.options.columns.${d}.blocks`,
|
|
733
|
-
parent: e.builderBlock.id,
|
|
734
|
-
styleProp: {
|
|
735
|
-
flexGrow: "1"
|
|
736
|
-
},
|
|
737
|
-
context: e.builderContext,
|
|
738
|
-
registeredComponents: e.builderComponents,
|
|
739
|
-
blocks: f.blocks
|
|
740
|
-
}
|
|
741
|
-
)
|
|
796
|
+
d
|
|
742
797
|
))
|
|
743
798
|
]
|
|
744
799
|
}
|
|
745
800
|
),
|
|
746
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
801
|
+
/* @__PURE__ */ l("style", { children: `.div-3d816b82 {
|
|
747
802
|
display: flex;
|
|
748
803
|
line-height: normal;
|
|
749
|
-
}.div-39daef82-2 {
|
|
750
|
-
display: flex;
|
|
751
|
-
flex-direction: column;
|
|
752
|
-
align-items: stretch;
|
|
753
804
|
}` })
|
|
754
805
|
] });
|
|
755
806
|
}
|
|
756
|
-
function
|
|
807
|
+
function Q(e) {
|
|
757
808
|
return e.replace(/http(s)?:/, "");
|
|
758
809
|
}
|
|
759
|
-
function
|
|
810
|
+
function yt(e = "", t, n) {
|
|
760
811
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
761
812
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
762
813
|
}
|
|
763
|
-
function
|
|
814
|
+
function kt(e, t) {
|
|
764
815
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
765
816
|
return e;
|
|
766
817
|
if (t === "master")
|
|
767
|
-
return
|
|
818
|
+
return Q(e);
|
|
768
819
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
769
820
|
if (n) {
|
|
770
821
|
const o = e.split(n[0]), i = n[3], a = t.match("x") ? t : `${t}x`;
|
|
771
|
-
return
|
|
822
|
+
return Q(`${o[0]}_${a}${i}`);
|
|
772
823
|
}
|
|
773
824
|
return null;
|
|
774
825
|
}
|
|
775
|
-
function
|
|
826
|
+
function Gn(e) {
|
|
776
827
|
if (!e)
|
|
777
828
|
return e;
|
|
778
829
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
779
830
|
if (e.match(/builder\.io/)) {
|
|
780
831
|
let n = e;
|
|
781
832
|
const o = Number(e.split("?width=")[1]);
|
|
782
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
833
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${yt(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
783
834
|
}
|
|
784
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
835
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [kt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
785
836
|
}
|
|
786
|
-
const
|
|
837
|
+
const St = (e) => {
|
|
787
838
|
if (e === "localhost" || e === "127.0.0.1")
|
|
788
839
|
return e;
|
|
789
840
|
const t = e.split(".");
|
|
790
841
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
791
|
-
},
|
|
842
|
+
}, fe = ({
|
|
792
843
|
name: e,
|
|
793
844
|
canTrack: t
|
|
794
845
|
}) => {
|
|
@@ -796,17 +847,17 @@ const bt = (e) => {
|
|
|
796
847
|
try {
|
|
797
848
|
return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
|
|
798
849
|
} catch (o) {
|
|
799
|
-
|
|
850
|
+
x.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
800
851
|
return;
|
|
801
852
|
}
|
|
802
|
-
},
|
|
853
|
+
}, he = async (e) => fe(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), xt = [["secure", ""], ["SameSite", "None"]], Ct = ({
|
|
803
854
|
name: e,
|
|
804
855
|
value: t,
|
|
805
856
|
expires: n
|
|
806
857
|
}) => {
|
|
807
|
-
const i = (
|
|
808
|
-
return
|
|
809
|
-
},
|
|
858
|
+
const i = (S() ? location.protocol === "https:" : !0) ? xt : [[]], a = n ? [["expires", n.toUTCString()]] : [[]], r = [[e, t], ...a, ["path", "/"], ["domain", St(window.location.hostname)], ...i];
|
|
859
|
+
return vt(r);
|
|
860
|
+
}, pe = async ({
|
|
810
861
|
name: e,
|
|
811
862
|
value: t,
|
|
812
863
|
expires: n,
|
|
@@ -815,33 +866,33 @@ const bt = (e) => {
|
|
|
815
866
|
try {
|
|
816
867
|
if (!o)
|
|
817
868
|
return;
|
|
818
|
-
const i =
|
|
869
|
+
const i = Ct({
|
|
819
870
|
name: e,
|
|
820
871
|
value: t,
|
|
821
872
|
expires: n
|
|
822
873
|
});
|
|
823
874
|
document.cookie = i;
|
|
824
875
|
} catch (i) {
|
|
825
|
-
|
|
876
|
+
x.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
826
877
|
}
|
|
827
|
-
},
|
|
878
|
+
}, wt = "builder.tests", K = (e) => `${wt}.${e}`, It = ({
|
|
828
879
|
contentId: e
|
|
829
|
-
}) =>
|
|
830
|
-
name:
|
|
880
|
+
}) => he({
|
|
881
|
+
name: K(e),
|
|
831
882
|
canTrack: !0
|
|
832
|
-
}),
|
|
883
|
+
}), Tt = ({
|
|
833
884
|
contentId: e
|
|
834
|
-
}) =>
|
|
835
|
-
name:
|
|
885
|
+
}) => fe({
|
|
886
|
+
name: K(e),
|
|
836
887
|
canTrack: !0
|
|
837
|
-
}),
|
|
888
|
+
}), Et = ({
|
|
838
889
|
contentId: e,
|
|
839
890
|
value: t
|
|
840
|
-
}) =>
|
|
841
|
-
name:
|
|
891
|
+
}) => pe({
|
|
892
|
+
name: K(e),
|
|
842
893
|
value: t,
|
|
843
894
|
canTrack: !0
|
|
844
|
-
}),
|
|
895
|
+
}), ge = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Rt = ({
|
|
845
896
|
id: e,
|
|
846
897
|
variations: t
|
|
847
898
|
}) => {
|
|
@@ -854,15 +905,15 @@ const bt = (e) => {
|
|
|
854
905
|
return a;
|
|
855
906
|
}
|
|
856
907
|
return e;
|
|
857
|
-
},
|
|
858
|
-
const t =
|
|
859
|
-
return
|
|
908
|
+
}, be = (e) => {
|
|
909
|
+
const t = Rt(e);
|
|
910
|
+
return Et({
|
|
860
911
|
contentId: e.id,
|
|
861
912
|
value: t
|
|
862
913
|
}).catch((n) => {
|
|
863
|
-
|
|
914
|
+
x.error("could not store A/B test variation: ", n);
|
|
864
915
|
}), t;
|
|
865
|
-
},
|
|
916
|
+
}, ye = ({
|
|
866
917
|
item: e,
|
|
867
918
|
testGroupId: t
|
|
868
919
|
}) => {
|
|
@@ -876,7 +927,7 @@ const bt = (e) => {
|
|
|
876
927
|
testVariationId: n.id,
|
|
877
928
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
878
929
|
};
|
|
879
|
-
},
|
|
930
|
+
}, Pt = ({
|
|
880
931
|
item: e,
|
|
881
932
|
canTrack: t
|
|
882
933
|
}) => {
|
|
@@ -884,14 +935,14 @@ const bt = (e) => {
|
|
|
884
935
|
return e;
|
|
885
936
|
if (!e)
|
|
886
937
|
return;
|
|
887
|
-
if (!
|
|
938
|
+
if (!ge(e))
|
|
888
939
|
return e;
|
|
889
|
-
const n =
|
|
940
|
+
const n = Tt({
|
|
890
941
|
contentId: e.id
|
|
891
|
-
}) ||
|
|
942
|
+
}) || be({
|
|
892
943
|
variations: e.variations,
|
|
893
944
|
id: e.id
|
|
894
|
-
}), o =
|
|
945
|
+
}), o = ye({
|
|
895
946
|
item: e,
|
|
896
947
|
testGroupId: n
|
|
897
948
|
});
|
|
@@ -899,18 +950,18 @@ const bt = (e) => {
|
|
|
899
950
|
...e,
|
|
900
951
|
...o
|
|
901
952
|
};
|
|
902
|
-
},
|
|
953
|
+
}, At = async ({
|
|
903
954
|
item: e,
|
|
904
955
|
canTrack: t
|
|
905
956
|
}) => {
|
|
906
|
-
if (!t || !
|
|
957
|
+
if (!t || !ge(e))
|
|
907
958
|
return e;
|
|
908
|
-
const o = await
|
|
959
|
+
const o = await It({
|
|
909
960
|
contentId: e.id
|
|
910
|
-
}) ||
|
|
961
|
+
}) || be({
|
|
911
962
|
variations: e.variations,
|
|
912
963
|
id: e.id
|
|
913
|
-
}), i =
|
|
964
|
+
}), i = ye({
|
|
914
965
|
item: e,
|
|
915
966
|
testGroupId: o
|
|
916
967
|
});
|
|
@@ -918,7 +969,7 @@ const bt = (e) => {
|
|
|
918
969
|
...e,
|
|
919
970
|
...i
|
|
920
971
|
};
|
|
921
|
-
},
|
|
972
|
+
}, _ = (e) => w(e) ? e : !0, Vt = {
|
|
922
973
|
name: "Core:Button",
|
|
923
974
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
924
975
|
defaultStyles: {
|
|
@@ -951,7 +1002,7 @@ const bt = (e) => {
|
|
|
951
1002
|
}],
|
|
952
1003
|
static: !0,
|
|
953
1004
|
noWrap: !0
|
|
954
|
-
},
|
|
1005
|
+
}, Bt = {
|
|
955
1006
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
956
1007
|
name: "Columns",
|
|
957
1008
|
isRSC: !0,
|
|
@@ -1152,7 +1203,7 @@ const bt = (e) => {
|
|
|
1152
1203
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1153
1204
|
advanced: !0
|
|
1154
1205
|
}]
|
|
1155
|
-
},
|
|
1206
|
+
}, Wt = {
|
|
1156
1207
|
name: "Custom Code",
|
|
1157
1208
|
static: !0,
|
|
1158
1209
|
requiredPermissions: ["editCode"],
|
|
@@ -1174,7 +1225,7 @@ const bt = (e) => {
|
|
|
1174
1225
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1175
1226
|
advanced: !0
|
|
1176
1227
|
}]
|
|
1177
|
-
},
|
|
1228
|
+
}, $t = {
|
|
1178
1229
|
name: "Embed",
|
|
1179
1230
|
static: !0,
|
|
1180
1231
|
inputs: [{
|
|
@@ -1199,13 +1250,13 @@ const bt = (e) => {
|
|
|
1199
1250
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1200
1251
|
hideFromUI: !0
|
|
1201
1252
|
}]
|
|
1202
|
-
},
|
|
1253
|
+
}, Ot = ["text/javascript", "application/javascript", "application/ecmascript"], Yn = (e) => Ot.includes(e.type), Ft = {
|
|
1203
1254
|
name: "Fragment",
|
|
1204
1255
|
static: !0,
|
|
1205
1256
|
hidden: !0,
|
|
1206
1257
|
canHaveChildren: !0,
|
|
1207
1258
|
noWrap: !0
|
|
1208
|
-
},
|
|
1259
|
+
}, Lt = {
|
|
1209
1260
|
name: "Image",
|
|
1210
1261
|
static: !0,
|
|
1211
1262
|
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",
|
|
@@ -1226,15 +1277,15 @@ const bt = (e) => {
|
|
|
1226
1277
|
onChange: (e) => {
|
|
1227
1278
|
e.delete("srcset"), e.delete("noWebp");
|
|
1228
1279
|
function n(r, s = 6e4) {
|
|
1229
|
-
return new Promise((c,
|
|
1280
|
+
return new Promise((c, m) => {
|
|
1230
1281
|
const g = document.createElement("img");
|
|
1231
1282
|
let p = !1;
|
|
1232
1283
|
g.onload = () => {
|
|
1233
1284
|
p = !0, c(g);
|
|
1234
|
-
}, g.addEventListener("error", (
|
|
1235
|
-
console.warn("Image load failed",
|
|
1285
|
+
}, g.addEventListener("error", (f) => {
|
|
1286
|
+
console.warn("Image load failed", f.error), m(f.error);
|
|
1236
1287
|
}), g.src = r, setTimeout(() => {
|
|
1237
|
-
p ||
|
|
1288
|
+
p || m(new Error("Image load timed out"));
|
|
1238
1289
|
}, s);
|
|
1239
1290
|
});
|
|
1240
1291
|
}
|
|
@@ -1305,7 +1356,7 @@ const bt = (e) => {
|
|
|
1305
1356
|
advanced: !0,
|
|
1306
1357
|
defaultValue: 0.7041
|
|
1307
1358
|
}]
|
|
1308
|
-
},
|
|
1359
|
+
}, Nt = {
|
|
1309
1360
|
// friendlyName?
|
|
1310
1361
|
name: "Raw:Img",
|
|
1311
1362
|
hideFromInsertMenu: !0,
|
|
@@ -1319,7 +1370,7 @@ const bt = (e) => {
|
|
|
1319
1370
|
}],
|
|
1320
1371
|
noWrap: !0,
|
|
1321
1372
|
static: !0
|
|
1322
|
-
},
|
|
1373
|
+
}, _t = {
|
|
1323
1374
|
name: "Core:Section",
|
|
1324
1375
|
static: !0,
|
|
1325
1376
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1358,7 +1409,7 @@ const bt = (e) => {
|
|
|
1358
1409
|
}
|
|
1359
1410
|
}
|
|
1360
1411
|
}]
|
|
1361
|
-
},
|
|
1412
|
+
}, Ut = {
|
|
1362
1413
|
name: "Slot",
|
|
1363
1414
|
isRSC: !0,
|
|
1364
1415
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1372,7 +1423,7 @@ const bt = (e) => {
|
|
|
1372
1423
|
defaultValue: "children"
|
|
1373
1424
|
}]
|
|
1374
1425
|
};
|
|
1375
|
-
function
|
|
1426
|
+
function Dt(e) {
|
|
1376
1427
|
var t, n, o;
|
|
1377
1428
|
return /* @__PURE__ */ l(
|
|
1378
1429
|
"div",
|
|
@@ -1384,7 +1435,7 @@ function _t(e) {
|
|
|
1384
1435
|
"builder-slot": e.name
|
|
1385
1436
|
},
|
|
1386
1437
|
children: /* @__PURE__ */ l(
|
|
1387
|
-
|
|
1438
|
+
L,
|
|
1388
1439
|
{
|
|
1389
1440
|
parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
|
|
1390
1441
|
path: `symbol.data.${e.name}`,
|
|
@@ -1395,7 +1446,7 @@ function _t(e) {
|
|
|
1395
1446
|
}
|
|
1396
1447
|
);
|
|
1397
1448
|
}
|
|
1398
|
-
const
|
|
1449
|
+
const Mt = {
|
|
1399
1450
|
name: "Symbol",
|
|
1400
1451
|
noWrap: !0,
|
|
1401
1452
|
static: !0,
|
|
@@ -1428,7 +1479,7 @@ const Lt = {
|
|
|
1428
1479
|
hideFromUI: !0,
|
|
1429
1480
|
type: "boolean"
|
|
1430
1481
|
}]
|
|
1431
|
-
},
|
|
1482
|
+
}, jt = {
|
|
1432
1483
|
name: "Text",
|
|
1433
1484
|
static: !0,
|
|
1434
1485
|
isRSC: !0,
|
|
@@ -1447,7 +1498,7 @@ const Lt = {
|
|
|
1447
1498
|
textAlign: "center"
|
|
1448
1499
|
}
|
|
1449
1500
|
};
|
|
1450
|
-
function
|
|
1501
|
+
function Ht(e) {
|
|
1451
1502
|
var t;
|
|
1452
1503
|
return /* @__PURE__ */ l(
|
|
1453
1504
|
"div",
|
|
@@ -1460,7 +1511,7 @@ function Mt(e) {
|
|
|
1460
1511
|
}
|
|
1461
1512
|
);
|
|
1462
1513
|
}
|
|
1463
|
-
const
|
|
1514
|
+
const Kt = {
|
|
1464
1515
|
name: "Video",
|
|
1465
1516
|
canHaveChildren: !0,
|
|
1466
1517
|
defaultStyles: {
|
|
@@ -1541,58 +1592,58 @@ const Dt = {
|
|
|
1541
1592
|
defaultValue: !0,
|
|
1542
1593
|
advanced: !0
|
|
1543
1594
|
}]
|
|
1544
|
-
},
|
|
1545
|
-
component: We,
|
|
1546
|
-
...Rt
|
|
1547
|
-
}, {
|
|
1548
|
-
component: ht,
|
|
1549
|
-
...At
|
|
1550
|
-
}, {
|
|
1551
|
-
component: $e,
|
|
1552
|
-
...Pt
|
|
1553
|
-
}, {
|
|
1595
|
+
}, X = () => [{
|
|
1554
1596
|
component: Oe,
|
|
1555
1597
|
...Vt
|
|
1598
|
+
}, {
|
|
1599
|
+
component: bt,
|
|
1600
|
+
...Bt
|
|
1556
1601
|
}, {
|
|
1557
1602
|
component: Fe,
|
|
1558
1603
|
...Wt
|
|
1559
1604
|
}, {
|
|
1560
|
-
component:
|
|
1605
|
+
component: Le,
|
|
1561
1606
|
...$t
|
|
1562
1607
|
}, {
|
|
1563
|
-
component:
|
|
1564
|
-
...Ot
|
|
1565
|
-
}, {
|
|
1566
|
-
component: Le,
|
|
1608
|
+
component: Ne,
|
|
1567
1609
|
...Ft
|
|
1568
1610
|
}, {
|
|
1569
|
-
component:
|
|
1611
|
+
component: _e,
|
|
1570
1612
|
...Lt
|
|
1571
|
-
}, {
|
|
1572
|
-
component: Mt,
|
|
1573
|
-
...Ut
|
|
1574
1613
|
}, {
|
|
1575
1614
|
component: Ue,
|
|
1576
|
-
...Dt
|
|
1577
|
-
}, {
|
|
1578
|
-
component: _t,
|
|
1579
1615
|
...Nt
|
|
1580
|
-
}
|
|
1616
|
+
}, {
|
|
1617
|
+
component: De,
|
|
1618
|
+
..._t
|
|
1619
|
+
}, {
|
|
1620
|
+
component: Un,
|
|
1621
|
+
...Mt
|
|
1622
|
+
}, {
|
|
1623
|
+
component: Ht,
|
|
1624
|
+
...jt
|
|
1625
|
+
}, {
|
|
1626
|
+
component: Me,
|
|
1627
|
+
...Kt
|
|
1628
|
+
}, {
|
|
1629
|
+
component: Dt,
|
|
1630
|
+
...Ut
|
|
1631
|
+
}], Z = [], Jn = (e) => ({
|
|
1581
1632
|
type: "builder.registerComponent",
|
|
1582
1633
|
data: U(e)
|
|
1583
|
-
}),
|
|
1634
|
+
}), zt = (e) => {
|
|
1584
1635
|
const t = e.toString().trim();
|
|
1585
1636
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1586
|
-
},
|
|
1637
|
+
}, qt = (e) => typeof e == "function" ? zt(e) : $(e), U = ({
|
|
1587
1638
|
inputs: e,
|
|
1588
1639
|
...t
|
|
1589
1640
|
}) => ({
|
|
1590
1641
|
...$(t),
|
|
1591
1642
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, a]) => ({
|
|
1592
1643
|
...o,
|
|
1593
|
-
[i]:
|
|
1644
|
+
[i]: qt(a)
|
|
1594
1645
|
}), {}))
|
|
1595
|
-
}),
|
|
1646
|
+
}), Gt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1596
1647
|
function getAndSetVariantId() {
|
|
1597
1648
|
function setCookie(name, value, days) {
|
|
1598
1649
|
let expires = '';
|
|
@@ -1648,7 +1699,7 @@ const Dt = {
|
|
|
1648
1699
|
}).join('');
|
|
1649
1700
|
styleEl.innerHTML = newStyleStr;
|
|
1650
1701
|
}
|
|
1651
|
-
}`,
|
|
1702
|
+
}`, Yt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1652
1703
|
if (!navigator.cookieEnabled) {
|
|
1653
1704
|
return;
|
|
1654
1705
|
}
|
|
@@ -1682,26 +1733,26 @@ const Dt = {
|
|
|
1682
1733
|
thisScriptEl?.remove();
|
|
1683
1734
|
}
|
|
1684
1735
|
return;
|
|
1685
|
-
}`,
|
|
1736
|
+
}`, ke = "builderIoAbTest", Se = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1686
1737
|
...t,
|
|
1687
1738
|
testVariationId: t.id,
|
|
1688
1739
|
id: e == null ? void 0 : e.id
|
|
1689
|
-
})),
|
|
1740
|
+
})), Jt = ({
|
|
1690
1741
|
canTrack: e,
|
|
1691
1742
|
content: t
|
|
1692
|
-
}) => !(!(V(t).length > 0) || !e ||
|
|
1693
|
-
window.${
|
|
1694
|
-
window.${
|
|
1695
|
-
`,
|
|
1696
|
-
window.${
|
|
1697
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1698
|
-
)`,
|
|
1743
|
+
}) => !(!(V(t).length > 0) || !e || S()), Qt = (e) => e === "react" || e === "reactNative", ve = Qt(I), Xt = () => `
|
|
1744
|
+
window.${ke} = ${Gt}
|
|
1745
|
+
window.${Se} = ${Yt}
|
|
1746
|
+
`, Zt = (e, t) => `
|
|
1747
|
+
window.${ke}(
|
|
1748
|
+
"${t}",${JSON.stringify(e)}, ${ve}
|
|
1749
|
+
)`, en = ({
|
|
1699
1750
|
contentId: e,
|
|
1700
1751
|
variationId: t
|
|
1701
|
-
}) => `window.${
|
|
1702
|
-
"${t}", "${e}", ${
|
|
1752
|
+
}) => `window.${Se}(
|
|
1753
|
+
"${t}", "${e}", ${ve}
|
|
1703
1754
|
)`;
|
|
1704
|
-
function
|
|
1755
|
+
function D(e) {
|
|
1705
1756
|
return /* @__PURE__ */ l(
|
|
1706
1757
|
"script",
|
|
1707
1758
|
{
|
|
@@ -1710,33 +1761,33 @@ function M(e) {
|
|
|
1710
1761
|
}
|
|
1711
1762
|
);
|
|
1712
1763
|
}
|
|
1713
|
-
const
|
|
1764
|
+
const tn = (e) => {
|
|
1714
1765
|
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
1715
|
-
return n ||
|
|
1766
|
+
return n || x.warn("No previewed ID found in search params."), n;
|
|
1716
1767
|
};
|
|
1717
|
-
function
|
|
1718
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1768
|
+
function nn() {
|
|
1769
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ae({
|
|
1719
1770
|
max: 500,
|
|
1720
1771
|
// how long to live in ms
|
|
1721
1772
|
ttl: 1e3 * 60 * 5
|
|
1722
1773
|
}));
|
|
1723
1774
|
}
|
|
1724
|
-
function
|
|
1725
|
-
|
|
1726
|
-
const t =
|
|
1775
|
+
function on(e) {
|
|
1776
|
+
nn();
|
|
1777
|
+
const t = tn(e);
|
|
1727
1778
|
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
1728
1779
|
}
|
|
1729
|
-
function
|
|
1780
|
+
function an() {
|
|
1730
1781
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1731
1782
|
}
|
|
1732
|
-
function
|
|
1733
|
-
const e =
|
|
1783
|
+
function rn() {
|
|
1784
|
+
const e = an().fetch;
|
|
1734
1785
|
if (typeof e > "u")
|
|
1735
1786
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1736
1787
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1737
1788
|
return e;
|
|
1738
1789
|
}
|
|
1739
|
-
const
|
|
1790
|
+
const sn = rn();
|
|
1740
1791
|
function B(e, t = null, n = ".") {
|
|
1741
1792
|
return Object.keys(e).reduce((o, i) => {
|
|
1742
1793
|
const a = e[i], r = [t, i].filter(Boolean).join(n);
|
|
@@ -1749,27 +1800,27 @@ function B(e, t = null, n = ".") {
|
|
|
1749
1800
|
};
|
|
1750
1801
|
}, {});
|
|
1751
1802
|
}
|
|
1752
|
-
const
|
|
1803
|
+
const cn = "v3", ee = "builder.", ln = "options.", dn = (e) => {
|
|
1753
1804
|
const t = {};
|
|
1754
1805
|
return e.forEach((n, o) => {
|
|
1755
1806
|
t[o] = n;
|
|
1756
1807
|
}), t;
|
|
1757
|
-
},
|
|
1808
|
+
}, xe = (e) => {
|
|
1758
1809
|
if (!e)
|
|
1759
1810
|
return {};
|
|
1760
|
-
const t =
|
|
1811
|
+
const t = Ce(e), n = {};
|
|
1761
1812
|
return Object.keys(t).forEach((o) => {
|
|
1762
|
-
if (o.startsWith(
|
|
1763
|
-
const i = o.replace(
|
|
1813
|
+
if (o.startsWith(ee)) {
|
|
1814
|
+
const i = o.replace(ee, "").replace(ln, "");
|
|
1764
1815
|
n[i] = t[o];
|
|
1765
1816
|
}
|
|
1766
1817
|
}), n;
|
|
1767
|
-
},
|
|
1768
|
-
if (!
|
|
1818
|
+
}, un = () => {
|
|
1819
|
+
if (!S())
|
|
1769
1820
|
return {};
|
|
1770
1821
|
const e = new URLSearchParams(window.location.search);
|
|
1771
|
-
return
|
|
1772
|
-
},
|
|
1822
|
+
return xe(e);
|
|
1823
|
+
}, Ce = (e) => e instanceof URLSearchParams ? dn(e) : e, te = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
|
|
1773
1824
|
let {
|
|
1774
1825
|
noTraverse: t = !1
|
|
1775
1826
|
} = e;
|
|
@@ -1781,181 +1832,181 @@ const an = "v3", Z = "builder.", rn = "options.", sn = (e) => {
|
|
|
1781
1832
|
apiKey: r,
|
|
1782
1833
|
includeRefs: s = !0,
|
|
1783
1834
|
enrich: c,
|
|
1784
|
-
locale:
|
|
1785
|
-
apiVersion: g =
|
|
1835
|
+
locale: m,
|
|
1836
|
+
apiVersion: g = cn,
|
|
1786
1837
|
fields: p,
|
|
1787
|
-
omit:
|
|
1838
|
+
omit: f,
|
|
1788
1839
|
offset: h,
|
|
1789
|
-
cacheSeconds:
|
|
1840
|
+
cacheSeconds: u,
|
|
1790
1841
|
staleCacheSeconds: d,
|
|
1791
|
-
sort:
|
|
1792
|
-
includeUnpublished:
|
|
1842
|
+
sort: y,
|
|
1843
|
+
includeUnpublished: v
|
|
1793
1844
|
} = e;
|
|
1794
1845
|
if (!r)
|
|
1795
1846
|
throw new Error("Missing API key");
|
|
1796
1847
|
if (!["v2", "v3"].includes(g))
|
|
1797
1848
|
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);
|
|
1798
1849
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1799
|
-
const
|
|
1800
|
-
if (
|
|
1850
|
+
const b = new URL(`https://cdn.builder.io/api/${g}/content/${a}?apiKey=${r}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1851
|
+
if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof v == "boolean" && b.searchParams.set("includeUnpublished", String(v)), u && te(u) && b.searchParams.set("cacheSeconds", String(u)), d && te(d) && b.searchParams.set("staleCacheSeconds", String(d)), y) {
|
|
1801
1852
|
const C = B({
|
|
1802
|
-
sort:
|
|
1853
|
+
sort: y
|
|
1803
1854
|
});
|
|
1804
|
-
for (const
|
|
1805
|
-
|
|
1855
|
+
for (const P in C)
|
|
1856
|
+
b.searchParams.set(P, JSON.stringify(C[P]));
|
|
1806
1857
|
}
|
|
1807
|
-
const
|
|
1808
|
-
...
|
|
1809
|
-
...
|
|
1810
|
-
},
|
|
1811
|
-
for (const C in
|
|
1812
|
-
|
|
1813
|
-
if (o &&
|
|
1858
|
+
const E = {
|
|
1859
|
+
...un(),
|
|
1860
|
+
...Ce(e.options || {})
|
|
1861
|
+
}, T = B(E);
|
|
1862
|
+
for (const C in T)
|
|
1863
|
+
b.searchParams.set(C, String(T[C]));
|
|
1864
|
+
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
1814
1865
|
const C = B({
|
|
1815
1866
|
query: i
|
|
1816
1867
|
});
|
|
1817
|
-
for (const
|
|
1818
|
-
|
|
1868
|
+
for (const P in C)
|
|
1869
|
+
b.searchParams.set(P, JSON.stringify(C[P]));
|
|
1819
1870
|
}
|
|
1820
|
-
return
|
|
1821
|
-
},
|
|
1822
|
-
async function
|
|
1823
|
-
const t = await
|
|
1871
|
+
return b;
|
|
1872
|
+
}, mn = (e) => "results" in e;
|
|
1873
|
+
async function q(e) {
|
|
1874
|
+
const t = await we({
|
|
1824
1875
|
...e,
|
|
1825
1876
|
limit: 1
|
|
1826
1877
|
});
|
|
1827
1878
|
return t && t[0] || null;
|
|
1828
1879
|
}
|
|
1829
|
-
const
|
|
1830
|
-
const t =
|
|
1831
|
-
return await (await
|
|
1832
|
-
},
|
|
1833
|
-
const o =
|
|
1880
|
+
const Qn = q, fn = async (e) => {
|
|
1881
|
+
const t = z(e);
|
|
1882
|
+
return await (await sn(t.href)).json();
|
|
1883
|
+
}, hn = async (e, t, n = z(e)) => {
|
|
1884
|
+
const o = _(e.canTrack);
|
|
1834
1885
|
if (n.search.includes("preview=")) {
|
|
1835
1886
|
const a = [];
|
|
1836
1887
|
for (const r of t.results) {
|
|
1837
|
-
const s =
|
|
1888
|
+
const s = on(n.searchParams);
|
|
1838
1889
|
a.push(s || r);
|
|
1839
1890
|
}
|
|
1840
1891
|
t.results = a;
|
|
1841
1892
|
}
|
|
1842
|
-
if (!o || !(
|
|
1893
|
+
if (!o || !(S() || I === "reactNative"))
|
|
1843
1894
|
return t.results;
|
|
1844
1895
|
try {
|
|
1845
1896
|
const a = [];
|
|
1846
1897
|
for (const r of t.results)
|
|
1847
|
-
a.push(await
|
|
1898
|
+
a.push(await At({
|
|
1848
1899
|
item: r,
|
|
1849
1900
|
canTrack: o
|
|
1850
1901
|
}));
|
|
1851
1902
|
t.results = a;
|
|
1852
1903
|
} catch (a) {
|
|
1853
|
-
|
|
1904
|
+
x.error("Could not process A/B tests. ", a);
|
|
1854
1905
|
}
|
|
1855
1906
|
return t.results;
|
|
1856
1907
|
};
|
|
1857
|
-
async function
|
|
1908
|
+
async function we(e) {
|
|
1858
1909
|
try {
|
|
1859
|
-
const t =
|
|
1860
|
-
return
|
|
1910
|
+
const t = z(e), n = await fn(e);
|
|
1911
|
+
return mn(n) ? hn(e, n) : (x.error("Error fetching data. ", {
|
|
1861
1912
|
url: t,
|
|
1862
1913
|
content: n,
|
|
1863
1914
|
options: e
|
|
1864
1915
|
}), null);
|
|
1865
1916
|
} catch (t) {
|
|
1866
|
-
return
|
|
1917
|
+
return x.error("Error fetching data. ", t), null;
|
|
1867
1918
|
}
|
|
1868
1919
|
}
|
|
1869
|
-
const
|
|
1870
|
-
function
|
|
1920
|
+
const Xn = we, pn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
1921
|
+
function gn(e, t) {
|
|
1871
1922
|
const n = new URL(t.origin), o = n.hostname;
|
|
1872
|
-
return (e ||
|
|
1923
|
+
return (e || pn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
1873
1924
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return !
|
|
1925
|
+
function Zn() {
|
|
1926
|
+
return !S() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1876
1927
|
}
|
|
1877
|
-
function
|
|
1928
|
+
function bn() {
|
|
1878
1929
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1879
1930
|
const t = Math.random() * 16 | 0;
|
|
1880
1931
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1881
1932
|
});
|
|
1882
1933
|
}
|
|
1883
|
-
function
|
|
1884
|
-
return
|
|
1934
|
+
function Ie() {
|
|
1935
|
+
return bn().replace(/-/g, "");
|
|
1885
1936
|
}
|
|
1886
|
-
const
|
|
1937
|
+
const Te = "builderSessionId", yn = async ({
|
|
1887
1938
|
canTrack: e
|
|
1888
1939
|
}) => {
|
|
1889
1940
|
if (!e)
|
|
1890
1941
|
return;
|
|
1891
|
-
const t = await
|
|
1892
|
-
name:
|
|
1942
|
+
const t = await he({
|
|
1943
|
+
name: Te,
|
|
1893
1944
|
canTrack: e
|
|
1894
1945
|
});
|
|
1895
1946
|
if (w(t))
|
|
1896
1947
|
return t;
|
|
1897
1948
|
{
|
|
1898
|
-
const n =
|
|
1899
|
-
return
|
|
1949
|
+
const n = kn();
|
|
1950
|
+
return Sn({
|
|
1900
1951
|
id: n,
|
|
1901
1952
|
canTrack: e
|
|
1902
1953
|
}), n;
|
|
1903
1954
|
}
|
|
1904
|
-
},
|
|
1955
|
+
}, kn = () => Ie(), Sn = ({
|
|
1905
1956
|
id: e,
|
|
1906
1957
|
canTrack: t
|
|
1907
|
-
}) =>
|
|
1908
|
-
name:
|
|
1958
|
+
}) => pe({
|
|
1959
|
+
name: Te,
|
|
1909
1960
|
value: e,
|
|
1910
1961
|
canTrack: t
|
|
1911
|
-
}),
|
|
1962
|
+
}), Ee = () => S() && typeof localStorage < "u" ? localStorage : void 0, vn = ({
|
|
1912
1963
|
key: e,
|
|
1913
1964
|
canTrack: t
|
|
1914
1965
|
}) => {
|
|
1915
1966
|
var n;
|
|
1916
1967
|
try {
|
|
1917
|
-
return t ? (n =
|
|
1968
|
+
return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1918
1969
|
} catch (o) {
|
|
1919
1970
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1920
1971
|
return;
|
|
1921
1972
|
}
|
|
1922
|
-
},
|
|
1973
|
+
}, xn = ({
|
|
1923
1974
|
key: e,
|
|
1924
1975
|
canTrack: t,
|
|
1925
1976
|
value: n
|
|
1926
1977
|
}) => {
|
|
1927
1978
|
var o;
|
|
1928
1979
|
try {
|
|
1929
|
-
t && ((o =
|
|
1980
|
+
t && ((o = Ee()) == null || o.setItem(e, n));
|
|
1930
1981
|
} catch (i) {
|
|
1931
1982
|
console.debug("[LocalStorage] SET error: ", i);
|
|
1932
1983
|
}
|
|
1933
|
-
},
|
|
1984
|
+
}, Re = "builderVisitorId", Cn = ({
|
|
1934
1985
|
canTrack: e
|
|
1935
1986
|
}) => {
|
|
1936
1987
|
if (!e)
|
|
1937
1988
|
return;
|
|
1938
|
-
const t =
|
|
1939
|
-
key:
|
|
1989
|
+
const t = vn({
|
|
1990
|
+
key: Re,
|
|
1940
1991
|
canTrack: e
|
|
1941
1992
|
});
|
|
1942
1993
|
if (w(t))
|
|
1943
1994
|
return t;
|
|
1944
1995
|
{
|
|
1945
|
-
const n =
|
|
1946
|
-
return
|
|
1996
|
+
const n = wn();
|
|
1997
|
+
return In({
|
|
1947
1998
|
id: n,
|
|
1948
1999
|
canTrack: e
|
|
1949
2000
|
}), n;
|
|
1950
2001
|
}
|
|
1951
|
-
},
|
|
2002
|
+
}, wn = () => Ie(), In = ({
|
|
1952
2003
|
id: e,
|
|
1953
2004
|
canTrack: t
|
|
1954
|
-
}) =>
|
|
1955
|
-
key:
|
|
2005
|
+
}) => xn({
|
|
2006
|
+
key: Re,
|
|
1956
2007
|
value: e,
|
|
1957
2008
|
canTrack: t
|
|
1958
|
-
}),
|
|
2009
|
+
}), Tn = async ({
|
|
1959
2010
|
canTrack: e
|
|
1960
2011
|
}) => {
|
|
1961
2012
|
if (!e)
|
|
@@ -1963,16 +2014,16 @@ const we = "builderSessionId", pn = async ({
|
|
|
1963
2014
|
visitorId: void 0,
|
|
1964
2015
|
sessionId: void 0
|
|
1965
2016
|
};
|
|
1966
|
-
const t = await
|
|
2017
|
+
const t = await yn({
|
|
1967
2018
|
canTrack: e
|
|
1968
|
-
}), n =
|
|
2019
|
+
}), n = Cn({
|
|
1969
2020
|
canTrack: e
|
|
1970
2021
|
});
|
|
1971
2022
|
return {
|
|
1972
2023
|
sessionId: t,
|
|
1973
2024
|
visitorId: n
|
|
1974
2025
|
};
|
|
1975
|
-
},
|
|
2026
|
+
}, En = async ({
|
|
1976
2027
|
type: e,
|
|
1977
2028
|
canTrack: t,
|
|
1978
2029
|
apiKey: n,
|
|
@@ -1986,23 +2037,23 @@ const we = "builderSessionId", pn = async ({
|
|
|
1986
2037
|
url: location.href,
|
|
1987
2038
|
...o
|
|
1988
2039
|
},
|
|
1989
|
-
...await
|
|
2040
|
+
...await Tn({
|
|
1990
2041
|
canTrack: t
|
|
1991
2042
|
}),
|
|
1992
|
-
userAttributes:
|
|
2043
|
+
userAttributes: ce(),
|
|
1993
2044
|
ownerId: n
|
|
1994
2045
|
}
|
|
1995
2046
|
});
|
|
1996
|
-
async function
|
|
2047
|
+
async function Rn(e) {
|
|
1997
2048
|
if (!e.apiKey) {
|
|
1998
|
-
|
|
2049
|
+
x.error("Missing API key for track call. Please provide your API key.");
|
|
1999
2050
|
return;
|
|
2000
2051
|
}
|
|
2001
|
-
if (e.canTrack && !
|
|
2052
|
+
if (e.canTrack && !j() && (S() || I === "reactNative"))
|
|
2002
2053
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2003
2054
|
method: "POST",
|
|
2004
2055
|
body: JSON.stringify({
|
|
2005
|
-
events: [await
|
|
2056
|
+
events: [await En(e)]
|
|
2006
2057
|
}),
|
|
2007
2058
|
headers: {
|
|
2008
2059
|
"content-type": "application/json"
|
|
@@ -2012,14 +2063,14 @@ async function In(e) {
|
|
|
2012
2063
|
console.error("Failed to track: ", t);
|
|
2013
2064
|
});
|
|
2014
2065
|
}
|
|
2015
|
-
const
|
|
2066
|
+
const eo = (e) => Rn({
|
|
2016
2067
|
...e,
|
|
2017
2068
|
canTrack: !0
|
|
2018
2069
|
});
|
|
2019
|
-
function
|
|
2070
|
+
function ne(e) {
|
|
2020
2071
|
return Math.round(e * 1e3) / 1e3;
|
|
2021
2072
|
}
|
|
2022
|
-
const
|
|
2073
|
+
const Pn = (e, t, n = !0) => {
|
|
2023
2074
|
if (!(e instanceof HTMLElement))
|
|
2024
2075
|
return null;
|
|
2025
2076
|
let o = n ? e : e.parentElement;
|
|
@@ -2030,38 +2081,38 @@ const Tn = (e, t, n = !0) => {
|
|
|
2030
2081
|
return o;
|
|
2031
2082
|
} while (o = o.parentElement);
|
|
2032
2083
|
return null;
|
|
2033
|
-
},
|
|
2084
|
+
}, An = (e) => Pn(e, (t) => {
|
|
2034
2085
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2035
2086
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2036
|
-
}),
|
|
2087
|
+
}), oe = ({
|
|
2037
2088
|
event: e,
|
|
2038
2089
|
target: t
|
|
2039
2090
|
}) => {
|
|
2040
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, a =
|
|
2091
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, a = ne(o / n.width), r = ne(i / n.height);
|
|
2041
2092
|
return {
|
|
2042
2093
|
x: a,
|
|
2043
2094
|
y: r
|
|
2044
2095
|
};
|
|
2045
|
-
},
|
|
2046
|
-
const t = e.target, n = t &&
|
|
2096
|
+
}, to = (e) => {
|
|
2097
|
+
const t = e.target, n = t && An(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2047
2098
|
return {
|
|
2048
2099
|
targetBuilderElement: o || void 0,
|
|
2049
2100
|
metadata: {
|
|
2050
|
-
targetOffset: t ?
|
|
2101
|
+
targetOffset: t ? oe({
|
|
2051
2102
|
event: e,
|
|
2052
2103
|
target: t
|
|
2053
2104
|
}) : void 0,
|
|
2054
|
-
builderTargetOffset: n ?
|
|
2105
|
+
builderTargetOffset: n ? oe({
|
|
2055
2106
|
event: e,
|
|
2056
2107
|
target: n
|
|
2057
2108
|
}) : void 0,
|
|
2058
2109
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2059
2110
|
}
|
|
2060
2111
|
};
|
|
2061
|
-
},
|
|
2062
|
-
function
|
|
2063
|
-
let n =
|
|
2064
|
-
if (n || (n =
|
|
2112
|
+
}, Vn = "0.12.4", ie = {};
|
|
2113
|
+
function Bn(e, t) {
|
|
2114
|
+
let n = ie[e];
|
|
2115
|
+
if (n || (n = ie[e] = []), n.push(t), S()) {
|
|
2065
2116
|
const o = {
|
|
2066
2117
|
type: "builder.register",
|
|
2067
2118
|
data: {
|
|
@@ -2076,8 +2127,8 @@ function An(e, t) {
|
|
|
2076
2127
|
}
|
|
2077
2128
|
}
|
|
2078
2129
|
}
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2130
|
+
const no = () => {
|
|
2131
|
+
Bn("insertMenu", {
|
|
2081
2132
|
name: "_default",
|
|
2082
2133
|
default: !0,
|
|
2083
2134
|
items: [{
|
|
@@ -2099,14 +2150,14 @@ const Zn = () => {
|
|
|
2099
2150
|
}]
|
|
2100
2151
|
});
|
|
2101
2152
|
};
|
|
2102
|
-
let
|
|
2103
|
-
const
|
|
2153
|
+
let ae = !1;
|
|
2154
|
+
const oo = (e = {}) => {
|
|
2104
2155
|
var t, n;
|
|
2105
|
-
|
|
2156
|
+
ae || (ae = !0, S() && ((t = window.parent) == null || t.postMessage({
|
|
2106
2157
|
type: "builder.sdkInfo",
|
|
2107
2158
|
data: {
|
|
2108
2159
|
target: I,
|
|
2109
|
-
version:
|
|
2160
|
+
version: Vn,
|
|
2110
2161
|
supportsPatchUpdates: !1,
|
|
2111
2162
|
// Supports builder-model="..." attribute which is needed to
|
|
2112
2163
|
// scope our '+ add block' button styling
|
|
@@ -2120,7 +2171,7 @@ const eo = (e = {}) => {
|
|
|
2120
2171
|
}
|
|
2121
2172
|
}, "*"), window.addEventListener("message", (o) => {
|
|
2122
2173
|
var a, r;
|
|
2123
|
-
if (!
|
|
2174
|
+
if (!gn(e.trustedHosts, o))
|
|
2124
2175
|
return;
|
|
2125
2176
|
const {
|
|
2126
2177
|
data: i
|
|
@@ -2128,25 +2179,25 @@ const eo = (e = {}) => {
|
|
|
2128
2179
|
if (i != null && i.type)
|
|
2129
2180
|
switch (i.type) {
|
|
2130
2181
|
case "builder.evaluate": {
|
|
2131
|
-
const s = i.data.text, c = i.data.arguments || [],
|
|
2132
|
-
let p,
|
|
2182
|
+
const s = i.data.text, c = i.data.arguments || [], m = i.data.id, g = new Function(s);
|
|
2183
|
+
let p, f = null;
|
|
2133
2184
|
try {
|
|
2134
2185
|
p = g.apply(null, c);
|
|
2135
2186
|
} catch (h) {
|
|
2136
|
-
|
|
2187
|
+
f = h;
|
|
2137
2188
|
}
|
|
2138
|
-
|
|
2189
|
+
f ? (a = window.parent) == null || a.postMessage({
|
|
2139
2190
|
type: "builder.evaluateError",
|
|
2140
2191
|
data: {
|
|
2141
|
-
id:
|
|
2142
|
-
error:
|
|
2192
|
+
id: m,
|
|
2193
|
+
error: f.message
|
|
2143
2194
|
}
|
|
2144
2195
|
}, "*") : p && typeof p.then == "function" ? p.then((h) => {
|
|
2145
|
-
var
|
|
2146
|
-
(
|
|
2196
|
+
var u;
|
|
2197
|
+
(u = window.parent) == null || u.postMessage({
|
|
2147
2198
|
type: "builder.evaluateResult",
|
|
2148
2199
|
data: {
|
|
2149
|
-
id:
|
|
2200
|
+
id: m,
|
|
2150
2201
|
result: h
|
|
2151
2202
|
}
|
|
2152
2203
|
}, "*");
|
|
@@ -2154,14 +2205,14 @@ const eo = (e = {}) => {
|
|
|
2154
2205
|
type: "builder.evaluateResult",
|
|
2155
2206
|
data: {
|
|
2156
2207
|
result: p,
|
|
2157
|
-
id:
|
|
2208
|
+
id: m
|
|
2158
2209
|
}
|
|
2159
2210
|
}, "*");
|
|
2160
2211
|
break;
|
|
2161
2212
|
}
|
|
2162
2213
|
}
|
|
2163
2214
|
})));
|
|
2164
|
-
},
|
|
2215
|
+
}, Wn = (e) => {
|
|
2165
2216
|
var a;
|
|
2166
2217
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
|
|
2167
2218
|
let i = "";
|
|
@@ -2187,22 +2238,22 @@ font-weight: ${r};
|
|
|
2187
2238
|
`.trim());
|
|
2188
2239
|
}
|
|
2189
2240
|
return i;
|
|
2190
|
-
},
|
|
2241
|
+
}, $n = ({
|
|
2191
2242
|
customFonts: e
|
|
2192
2243
|
}) => {
|
|
2193
2244
|
var t;
|
|
2194
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2195
|
-
},
|
|
2245
|
+
return ((t = e == null ? void 0 : e.map((n) => Wn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2246
|
+
}, On = ({
|
|
2196
2247
|
cssCode: e,
|
|
2197
2248
|
contentId: t
|
|
2198
2249
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
2199
|
-
function
|
|
2250
|
+
function Fn(e) {
|
|
2200
2251
|
const t = `
|
|
2201
|
-
${
|
|
2252
|
+
${On({
|
|
2202
2253
|
cssCode: e.cssCode,
|
|
2203
2254
|
contentId: e.contentId
|
|
2204
2255
|
})}
|
|
2205
|
-
${
|
|
2256
|
+
${$n({
|
|
2206
2257
|
customFonts: e.customFonts
|
|
2207
2258
|
})}
|
|
2208
2259
|
|
|
@@ -2225,7 +2276,7 @@ ${Vn({
|
|
|
2225
2276
|
`.trim();
|
|
2226
2277
|
return /* @__PURE__ */ l(O, { styles: t });
|
|
2227
2278
|
}
|
|
2228
|
-
const
|
|
2279
|
+
const Ln = ({
|
|
2229
2280
|
content: e,
|
|
2230
2281
|
data: t,
|
|
2231
2282
|
locale: n
|
|
@@ -2242,7 +2293,7 @@ const $n = ({
|
|
|
2242
2293
|
locale: n
|
|
2243
2294
|
} : {}
|
|
2244
2295
|
};
|
|
2245
|
-
},
|
|
2296
|
+
}, Nn = ({
|
|
2246
2297
|
content: e,
|
|
2247
2298
|
data: t
|
|
2248
2299
|
}) => e ? {
|
|
@@ -2253,38 +2304,38 @@ const $n = ({
|
|
|
2253
2304
|
},
|
|
2254
2305
|
meta: e == null ? void 0 : e.meta
|
|
2255
2306
|
} : void 0;
|
|
2256
|
-
function
|
|
2257
|
-
var i, a, r, s, c,
|
|
2258
|
-
const t =
|
|
2307
|
+
function re(e) {
|
|
2308
|
+
var i, a, r, s, c, m, g, p, f;
|
|
2309
|
+
const t = en({
|
|
2259
2310
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2260
2311
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2261
2312
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2262
2313
|
contentId: (a = e.content) == null ? void 0 : a.id
|
|
2263
2314
|
}), n = [
|
|
2264
|
-
...
|
|
2315
|
+
...X(),
|
|
2265
2316
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2266
2317
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2267
2318
|
// existing usage.
|
|
2268
2319
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2269
2320
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2270
|
-
...
|
|
2321
|
+
...Z,
|
|
2271
2322
|
...e.customComponents || []
|
|
2272
2323
|
].reduce(
|
|
2273
|
-
(h, { component:
|
|
2324
|
+
(h, { component: u, ...d }) => ({
|
|
2274
2325
|
...h,
|
|
2275
2326
|
[d.name]: {
|
|
2276
|
-
component:
|
|
2327
|
+
component: u,
|
|
2277
2328
|
...U(d)
|
|
2278
2329
|
}
|
|
2279
2330
|
}),
|
|
2280
2331
|
{}
|
|
2281
2332
|
), o = {
|
|
2282
|
-
content:
|
|
2333
|
+
content: Nn({
|
|
2283
2334
|
content: e.content,
|
|
2284
2335
|
data: e.data
|
|
2285
2336
|
}),
|
|
2286
2337
|
localState: void 0,
|
|
2287
|
-
rootState:
|
|
2338
|
+
rootState: Ln({
|
|
2288
2339
|
content: e.content,
|
|
2289
2340
|
data: e.data,
|
|
2290
2341
|
locale: e.locale
|
|
@@ -2294,16 +2345,16 @@ function ae(e) {
|
|
|
2294
2345
|
apiKey: e.apiKey,
|
|
2295
2346
|
apiVersion: e.apiVersion,
|
|
2296
2347
|
componentInfos: [
|
|
2297
|
-
...
|
|
2348
|
+
...X(),
|
|
2298
2349
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2299
2350
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2300
2351
|
// existing usage.
|
|
2301
2352
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2302
2353
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2303
|
-
...
|
|
2354
|
+
...Z,
|
|
2304
2355
|
...e.customComponents || []
|
|
2305
2356
|
].reduce(
|
|
2306
|
-
(h, { component:
|
|
2357
|
+
(h, { component: u, ...d }) => ({
|
|
2307
2358
|
...h,
|
|
2308
2359
|
[d.name]: U(d)
|
|
2309
2360
|
}),
|
|
@@ -2313,8 +2364,8 @@ function ae(e) {
|
|
|
2313
2364
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
2314
2365
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2315
2366
|
};
|
|
2316
|
-
return /* @__PURE__ */
|
|
2317
|
-
|
|
2367
|
+
return /* @__PURE__ */ R(
|
|
2368
|
+
je,
|
|
2318
2369
|
{
|
|
2319
2370
|
content: e.content,
|
|
2320
2371
|
data: e.data,
|
|
@@ -2329,40 +2380,42 @@ function ae(e) {
|
|
|
2329
2380
|
builderContextSignal: o,
|
|
2330
2381
|
contentWrapper: e.contentWrapper,
|
|
2331
2382
|
contentWrapperProps: e.contentWrapperProps,
|
|
2383
|
+
linkComponent: e.linkComponent,
|
|
2332
2384
|
trustedHosts: e.trustedHosts,
|
|
2333
2385
|
children: [
|
|
2334
|
-
e.isSsrAbTest ? /* @__PURE__ */ l(
|
|
2335
|
-
/* @__PURE__ */ l(
|
|
2336
|
-
|
|
2386
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
|
|
2387
|
+
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(
|
|
2388
|
+
Fn,
|
|
2337
2389
|
{
|
|
2338
2390
|
contentId: (r = o.content) == null ? void 0 : r.id,
|
|
2339
2391
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2340
|
-
customFonts: (g = (
|
|
2392
|
+
customFonts: (g = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : g.customFonts
|
|
2341
2393
|
}
|
|
2342
2394
|
) }),
|
|
2343
2395
|
/* @__PURE__ */ l(
|
|
2344
|
-
|
|
2396
|
+
L,
|
|
2345
2397
|
{
|
|
2346
|
-
blocks: (
|
|
2398
|
+
blocks: (f = (p = o.content) == null ? void 0 : p.data) == null ? void 0 : f.blocks,
|
|
2347
2399
|
context: o,
|
|
2348
|
-
registeredComponents: n
|
|
2400
|
+
registeredComponents: n,
|
|
2401
|
+
linkComponent: e.linkComponent
|
|
2349
2402
|
}
|
|
2350
2403
|
)
|
|
2351
2404
|
]
|
|
2352
2405
|
}
|
|
2353
2406
|
);
|
|
2354
2407
|
}
|
|
2355
|
-
function
|
|
2408
|
+
function Pe(e) {
|
|
2356
2409
|
var a, r;
|
|
2357
|
-
const t =
|
|
2358
|
-
canTrack:
|
|
2410
|
+
const t = Jt({
|
|
2411
|
+
canTrack: _(e.canTrack),
|
|
2359
2412
|
content: e.content
|
|
2360
2413
|
}), n = function() {
|
|
2361
2414
|
var c;
|
|
2362
|
-
return
|
|
2363
|
-
V(e.content).map((
|
|
2364
|
-
id:
|
|
2365
|
-
testRatio:
|
|
2415
|
+
return Zt(
|
|
2416
|
+
V(e.content).map((m) => ({
|
|
2417
|
+
id: m.testVariationId,
|
|
2418
|
+
testRatio: m.testRatio
|
|
2366
2419
|
})),
|
|
2367
2420
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2368
2421
|
);
|
|
@@ -2373,14 +2426,14 @@ function Ee(e) {
|
|
|
2373
2426
|
return t ? {
|
|
2374
2427
|
...e.content,
|
|
2375
2428
|
testVariationId: (c = e.content) == null ? void 0 : c.id
|
|
2376
|
-
} :
|
|
2429
|
+
} : Pt({
|
|
2377
2430
|
item: e.content,
|
|
2378
|
-
canTrack:
|
|
2431
|
+
canTrack: _(e.canTrack)
|
|
2379
2432
|
});
|
|
2380
2433
|
};
|
|
2381
|
-
return /* @__PURE__ */
|
|
2382
|
-
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(
|
|
2383
|
-
t ? /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ R(k, { children: [
|
|
2435
|
+
!e.__isNestedRender && I !== "reactNative" ? /* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(D, { scriptStr: Xt() }) }) : null,
|
|
2436
|
+
t ? /* @__PURE__ */ R(k, { children: [
|
|
2384
2437
|
/* @__PURE__ */ l(
|
|
2385
2438
|
O,
|
|
2386
2439
|
{
|
|
@@ -2388,9 +2441,9 @@ function Ee(e) {
|
|
|
2388
2441
|
styles: o()
|
|
2389
2442
|
}
|
|
2390
2443
|
),
|
|
2391
|
-
/* @__PURE__ */ l(
|
|
2444
|
+
/* @__PURE__ */ l(D, { scriptStr: n() }),
|
|
2392
2445
|
(r = V(e.content)) == null ? void 0 : r.map((s) => /* @__PURE__ */ l(
|
|
2393
|
-
|
|
2446
|
+
re,
|
|
2394
2447
|
{
|
|
2395
2448
|
content: s,
|
|
2396
2449
|
showContent: !1,
|
|
@@ -2400,6 +2453,7 @@ function Ee(e) {
|
|
|
2400
2453
|
apiKey: e.apiKey,
|
|
2401
2454
|
apiVersion: e.apiVersion,
|
|
2402
2455
|
customComponents: e.customComponents,
|
|
2456
|
+
linkComponent: e.linkComponent,
|
|
2403
2457
|
canTrack: e.canTrack,
|
|
2404
2458
|
locale: e.locale,
|
|
2405
2459
|
includeRefs: e.includeRefs,
|
|
@@ -2415,7 +2469,7 @@ function Ee(e) {
|
|
|
2415
2469
|
))
|
|
2416
2470
|
] }) : null,
|
|
2417
2471
|
/* @__PURE__ */ l(
|
|
2418
|
-
|
|
2472
|
+
re,
|
|
2419
2473
|
{
|
|
2420
2474
|
content: i(),
|
|
2421
2475
|
showContent: !0,
|
|
@@ -2425,6 +2479,7 @@ function Ee(e) {
|
|
|
2425
2479
|
apiKey: e.apiKey,
|
|
2426
2480
|
apiVersion: e.apiVersion,
|
|
2427
2481
|
customComponents: e.customComponents,
|
|
2482
|
+
linkComponent: e.linkComponent,
|
|
2428
2483
|
canTrack: e.canTrack,
|
|
2429
2484
|
locale: e.locale,
|
|
2430
2485
|
includeRefs: e.includeRefs,
|
|
@@ -2439,13 +2494,13 @@ function Ee(e) {
|
|
|
2439
2494
|
)
|
|
2440
2495
|
] });
|
|
2441
2496
|
}
|
|
2442
|
-
const
|
|
2497
|
+
const _n = async ({
|
|
2443
2498
|
builderContextValue: e,
|
|
2444
2499
|
symbol: t
|
|
2445
2500
|
}) => {
|
|
2446
2501
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2447
2502
|
(e != null && e.apiKey))
|
|
2448
|
-
return
|
|
2503
|
+
return q({
|
|
2449
2504
|
model: t.model,
|
|
2450
2505
|
apiKey: e.apiKey,
|
|
2451
2506
|
apiVersion: e.apiVersion,
|
|
@@ -2455,25 +2510,25 @@ const Fn = async ({
|
|
|
2455
2510
|
}
|
|
2456
2511
|
}
|
|
2457
2512
|
}).catch((n) => {
|
|
2458
|
-
|
|
2513
|
+
x.error("Could not fetch symbol content: ", n);
|
|
2459
2514
|
});
|
|
2460
2515
|
};
|
|
2461
|
-
async function
|
|
2516
|
+
async function Un(e) {
|
|
2462
2517
|
var o, i, a, r, s;
|
|
2463
2518
|
const t = function() {
|
|
2464
|
-
var
|
|
2519
|
+
var m, g;
|
|
2465
2520
|
return [
|
|
2466
|
-
e.attributes
|
|
2521
|
+
e.attributes[M()],
|
|
2467
2522
|
"builder-symbol",
|
|
2468
|
-
(
|
|
2523
|
+
(m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
|
|
2469
2524
|
(g = e.symbol) != null && g.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2470
2525
|
].filter(Boolean).join(" ");
|
|
2471
|
-
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await
|
|
2526
|
+
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await _n({
|
|
2472
2527
|
symbol: e.symbol,
|
|
2473
2528
|
builderContextValue: e.builderContext
|
|
2474
2529
|
});
|
|
2475
2530
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2476
|
-
|
|
2531
|
+
Pe,
|
|
2477
2532
|
{
|
|
2478
2533
|
__isNestedRender: !0,
|
|
2479
2534
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2489,22 +2544,23 @@ async function Nn(e) {
|
|
|
2489
2544
|
...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
|
|
2490
2545
|
},
|
|
2491
2546
|
model: (s = e.symbol) == null ? void 0 : s.model,
|
|
2492
|
-
content: n
|
|
2547
|
+
content: n,
|
|
2548
|
+
linkComponent: e.builderLinkComponent
|
|
2493
2549
|
}
|
|
2494
2550
|
) });
|
|
2495
2551
|
}
|
|
2496
|
-
const
|
|
2497
|
-
function
|
|
2498
|
-
if (
|
|
2499
|
-
Object.assign(
|
|
2552
|
+
const io = L, ao = Pe, se = {};
|
|
2553
|
+
function ro(e) {
|
|
2554
|
+
if (S()) {
|
|
2555
|
+
Object.assign(se, e);
|
|
2500
2556
|
const t = {
|
|
2501
2557
|
type: "builder.settingsChange",
|
|
2502
|
-
data:
|
|
2558
|
+
data: se
|
|
2503
2559
|
};
|
|
2504
2560
|
parent.postMessage(t, "*");
|
|
2505
2561
|
}
|
|
2506
2562
|
}
|
|
2507
|
-
const
|
|
2563
|
+
const so = async (e) => {
|
|
2508
2564
|
var o, i, a;
|
|
2509
2565
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2510
2566
|
...e,
|
|
@@ -2516,50 +2572,51 @@ const io = async (e) => {
|
|
|
2516
2572
|
urlPath: t
|
|
2517
2573
|
} : {}
|
|
2518
2574
|
},
|
|
2519
|
-
options:
|
|
2575
|
+
options: xe(e.searchParams || ((a = e.url) == null ? void 0 : a.searchParams) || e.options)
|
|
2520
2576
|
};
|
|
2521
2577
|
return {
|
|
2522
2578
|
apiKey: n.apiKey,
|
|
2523
2579
|
model: n.model,
|
|
2524
|
-
content: await
|
|
2580
|
+
content: await q(n)
|
|
2525
2581
|
};
|
|
2526
2582
|
};
|
|
2527
2583
|
export {
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2584
|
+
we as A,
|
|
2585
|
+
L as B,
|
|
2586
|
+
Pe as C,
|
|
2587
|
+
Xn as D,
|
|
2588
|
+
Qn as E,
|
|
2589
|
+
xe as F,
|
|
2590
|
+
eo as G,
|
|
2591
|
+
so as H,
|
|
2592
|
+
io as R,
|
|
2593
|
+
Un as S,
|
|
2594
|
+
Ht as T,
|
|
2595
|
+
Rn as _,
|
|
2596
|
+
ht as a,
|
|
2597
|
+
qn as b,
|
|
2598
|
+
j as c,
|
|
2599
|
+
Gn as d,
|
|
2600
|
+
Yn as e,
|
|
2601
|
+
S as f,
|
|
2602
|
+
M as g,
|
|
2603
|
+
_ as h,
|
|
2604
|
+
zn as i,
|
|
2605
|
+
Zn as j,
|
|
2606
|
+
gn as k,
|
|
2607
|
+
x as l,
|
|
2608
|
+
H as m,
|
|
2609
|
+
to as n,
|
|
2610
|
+
$ as o,
|
|
2611
|
+
Jn as p,
|
|
2612
|
+
q,
|
|
2613
|
+
no as r,
|
|
2614
|
+
oo as s,
|
|
2615
|
+
sn as t,
|
|
2616
|
+
nn as u,
|
|
2617
|
+
ao as v,
|
|
2618
|
+
bt as w,
|
|
2619
|
+
Bn as x,
|
|
2620
|
+
ro as y,
|
|
2621
|
+
hn as z
|
|
2565
2622
|
};
|