@builder.io/sdk-react-nextjs 0.11.1 → 0.11.3
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/{USE_CLIENT_BUNDLE-5f863786.cjs → USE_CLIENT_BUNDLE-2986f66f.cjs} +4 -4
- package/lib/{node/USE_CLIENT_BUNDLE-e7bc5bc3.js → browser/USE_CLIENT_BUNDLE-812d744e.js} +32 -32
- package/lib/{edge/USE_SERVER_BUNDLE-42c61f06.cjs → browser/USE_SERVER_BUNDLE-3646ae12.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-5a6633cc.js → browser/USE_SERVER_BUNDLE-7d93f151.js} +1 -1
- package/lib/browser/{bundle-387d13d7.js → bundle-062859d6.js} +353 -378
- package/lib/browser/bundle-b781019e.cjs +168 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-09aea24d.cjs → edge/USE_CLIENT_BUNDLE-7f127af4.cjs} +4 -4
- package/lib/{browser/USE_CLIENT_BUNDLE-9460c0fe.js → edge/USE_CLIENT_BUNDLE-dc52931c.js} +32 -32
- package/lib/{node/USE_SERVER_BUNDLE-09b66e65.js → edge/USE_SERVER_BUNDLE-207cbf86.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-84387e43.cjs → edge/USE_SERVER_BUNDLE-29a862aa.cjs} +1 -1
- package/lib/edge/{bundle-59cf1181.cjs → bundle-24c6dba3.cjs} +32 -32
- package/lib/edge/{bundle-33765141.js → bundle-52f65e64.js} +1018 -1043
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-4ad3927b.cjs → node/USE_CLIENT_BUNDLE-c9e8796d.cjs} +4 -4
- package/lib/{edge/USE_CLIENT_BUNDLE-7d2509b4.js → node/USE_CLIENT_BUNDLE-d5a78124.js} +32 -32
- package/lib/{browser/USE_SERVER_BUNDLE-a256863c.js → node/USE_SERVER_BUNDLE-5a34a612.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-f508b13e.cjs → node/USE_SERVER_BUNDLE-f94a06b5.cjs} +1 -1
- package/lib/node/{bundle-d073dfea.js → bundle-829842dd.js} +232 -257
- package/lib/node/{bundle-c361a3b2.cjs → bundle-b0598b3a.cjs} +11 -11
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +97 -5
- package/types/cjs/blocks/button/button.d.ts +1 -9
- package/types/cjs/blocks/button/button.types.d.ts +6 -0
- package/types/cjs/blocks/columns/columns.d.ts +2 -14
- package/types/cjs/blocks/columns/columns.types.d.ts +15 -0
- package/types/cjs/blocks/fragment/fragment.d.ts +1 -5
- package/types/cjs/blocks/fragment/fragment.types.d.ts +5 -0
- package/types/cjs/blocks/image/image.d.ts +1 -19
- package/types/cjs/blocks/image/image.types.d.ts +19 -0
- package/types/cjs/blocks/section/section.d.ts +1 -9
- package/types/cjs/blocks/section/section.types.d.ts +6 -0
- package/types/cjs/blocks/symbol/symbol.d.ts +2 -23
- package/types/cjs/blocks/symbol/symbol.types.d.ts +18 -0
- package/types/cjs/blocks/text/text.d.ts +1 -3
- package/types/cjs/blocks/text/text.types.d.ts +3 -0
- package/types/cjs/blocks/video/video.d.ts +1 -21
- package/types/cjs/blocks/video/video.types.d.ts +21 -0
- package/types/cjs/components/blocks/blocks.d.ts +1 -6
- package/types/cjs/components/blocks/blocks.types.d.ts +6 -0
- package/types/cjs/components/content-variants/content-variants.types.d.ts +30 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-content/index.d.ts +1 -1
- package/types/cjs/functions/get-content/types.d.ts +2 -2
- package/types/cjs/server-index.d.ts +10 -1
- package/types/esm/blocks/button/button.d.ts +1 -9
- package/types/esm/blocks/button/button.types.d.ts +6 -0
- package/types/esm/blocks/columns/columns.d.ts +2 -14
- package/types/esm/blocks/columns/columns.types.d.ts +15 -0
- package/types/esm/blocks/fragment/fragment.d.ts +1 -5
- package/types/esm/blocks/fragment/fragment.types.d.ts +5 -0
- package/types/esm/blocks/image/image.d.ts +1 -19
- package/types/esm/blocks/image/image.types.d.ts +19 -0
- package/types/esm/blocks/section/section.d.ts +1 -9
- package/types/esm/blocks/section/section.types.d.ts +6 -0
- package/types/esm/blocks/symbol/symbol.d.ts +2 -23
- package/types/esm/blocks/symbol/symbol.types.d.ts +18 -0
- package/types/esm/blocks/text/text.d.ts +1 -3
- package/types/esm/blocks/text/text.types.d.ts +3 -0
- package/types/esm/blocks/video/video.d.ts +1 -21
- package/types/esm/blocks/video/video.types.d.ts +21 -0
- package/types/esm/components/blocks/blocks.d.ts +1 -6
- package/types/esm/components/blocks/blocks.types.d.ts +6 -0
- package/types/esm/components/content-variants/content-variants.types.d.ts +30 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-content/index.d.ts +1 -1
- package/types/esm/functions/get-content/types.d.ts +2 -2
- package/types/esm/server-index.d.ts +10 -1
- package/lib/browser/bundle-3e6c6669.cjs +0 -168
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LRUCache as
|
|
2
|
-
import { jsx as l, Fragment as y, jsxs as
|
|
3
|
-
import { createElement as
|
|
4
|
-
import { I as
|
|
1
|
+
import { LRUCache as Ae } from "lru-cache";
|
|
2
|
+
import { jsx as l, Fragment as y, jsxs as I } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as Ve } from "react";
|
|
4
|
+
import { I as Be, B as G, a as We, b as $e, C as Oe, E as Fe, F as Ne, c as _e, d as Le, S as Ue, V as Me, e as De } from "./USE_CLIENT_BUNDLE-812d744e.js";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
function
|
|
6
|
+
function je(e) {
|
|
7
7
|
var t;
|
|
8
8
|
return {
|
|
9
9
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -20,24 +20,24 @@ const A = "[Builder.io]: ", k = {
|
|
|
20
20
|
warn: (...e) => console.warn(A, ...e),
|
|
21
21
|
debug: (...e) => console.debug(A, ...e)
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function x() {
|
|
24
24
|
return typeof window < "u" && typeof document < "u";
|
|
25
25
|
}
|
|
26
26
|
const T = "rsc";
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function Ke() {
|
|
28
|
+
return x() && window.self !== window.top;
|
|
29
29
|
}
|
|
30
30
|
function D() {
|
|
31
|
-
return
|
|
31
|
+
return Ke() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const He = () => {
|
|
34
|
+
if (x()) {
|
|
35
35
|
const e = new URL(location.href);
|
|
36
36
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
37
37
|
} else
|
|
38
38
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
39
|
-
},
|
|
40
|
-
const e =
|
|
39
|
+
}, ze = () => typeof navigator == "object" && navigator.userAgent || "", le = () => {
|
|
40
|
+
const e = ze(), t = {
|
|
41
41
|
Android() {
|
|
42
42
|
return e.match(/Android/i);
|
|
43
43
|
},
|
|
@@ -56,13 +56,13 @@ const ze = () => {
|
|
|
56
56
|
any() {
|
|
57
57
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
|
|
58
58
|
}
|
|
59
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
59
|
+
}, n = e.match(/Tablet|iPad/i), o = He();
|
|
60
60
|
return {
|
|
61
61
|
urlPath: o == null ? void 0 : o.pathname,
|
|
62
62
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
63
63
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
64
64
|
};
|
|
65
|
-
},
|
|
65
|
+
}, qe = ({
|
|
66
66
|
builder: e,
|
|
67
67
|
context: t,
|
|
68
68
|
event: n,
|
|
@@ -74,14 +74,14 @@ const ze = () => {
|
|
|
74
74
|
builder: e,
|
|
75
75
|
context: t,
|
|
76
76
|
event: n
|
|
77
|
-
}),
|
|
77
|
+
}), Ge = () => ({
|
|
78
78
|
isEditing: D(),
|
|
79
|
-
isBrowser:
|
|
80
|
-
isServer: !
|
|
81
|
-
getUserAttributes: () =>
|
|
82
|
-
}),
|
|
79
|
+
isBrowser: x(),
|
|
80
|
+
isServer: !x(),
|
|
81
|
+
getUserAttributes: () => le()
|
|
82
|
+
}), Ye = (e, {
|
|
83
83
|
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,
|
|
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, Y = ({
|
|
85
85
|
code: e,
|
|
86
86
|
builder: t,
|
|
87
87
|
context: n,
|
|
@@ -90,15 +90,15 @@ const ze = () => {
|
|
|
90
90
|
rootSetState: r,
|
|
91
91
|
rootState: a
|
|
92
92
|
}) => {
|
|
93
|
-
const s =
|
|
93
|
+
const s = qe({
|
|
94
94
|
builder: t,
|
|
95
95
|
context: n,
|
|
96
96
|
event: o,
|
|
97
|
-
state:
|
|
97
|
+
state: Je(a, i, r)
|
|
98
98
|
});
|
|
99
99
|
return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
|
|
100
100
|
};
|
|
101
|
-
function
|
|
101
|
+
function Je(e, t, n) {
|
|
102
102
|
if (e === t)
|
|
103
103
|
throw new Error("rootState === localState");
|
|
104
104
|
return new Proxy(e, {
|
|
@@ -110,7 +110,7 @@ function Qe(e, t, n) {
|
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const Qe = (e) => (x(), Y(e));
|
|
114
114
|
function j({
|
|
115
115
|
code: e,
|
|
116
116
|
context: t,
|
|
@@ -125,10 +125,10 @@ function j({
|
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
const s = {
|
|
128
|
-
code:
|
|
128
|
+
code: Ye(e, {
|
|
129
129
|
isExpression: a
|
|
130
130
|
}),
|
|
131
|
-
builder:
|
|
131
|
+
builder: Ge(),
|
|
132
132
|
context: t,
|
|
133
133
|
event: r,
|
|
134
134
|
rootSetState: i,
|
|
@@ -136,7 +136,7 @@ function j({
|
|
|
136
136
|
localState: n
|
|
137
137
|
};
|
|
138
138
|
try {
|
|
139
|
-
return
|
|
139
|
+
return Qe(s);
|
|
140
140
|
} catch (c) {
|
|
141
141
|
k.error("Failed code evaluation: " + c.message, {
|
|
142
142
|
code: e
|
|
@@ -144,13 +144,13 @@ function j({
|
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
const $ = (e) => JSON.parse(JSON.stringify(e)),
|
|
147
|
+
const $ = (e) => JSON.parse(JSON.stringify(e)), Xe = (e, t, n) => {
|
|
148
148
|
if (Object(e) !== e)
|
|
149
149
|
return e;
|
|
150
150
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
151
151
|
return o.slice(0, -1).reduce((i, r, a) => Object(i[r]) === i[r] ? i[r] : i[r] = Math.abs(Number(o[a + 1])) >> 0 === +o[a + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
152
152
|
};
|
|
153
|
-
const
|
|
153
|
+
const Ze = ({
|
|
154
154
|
block: e,
|
|
155
155
|
context: t,
|
|
156
156
|
localState: n,
|
|
@@ -169,14 +169,14 @@ const et = ({
|
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
171
|
for (const s in e.bindings) {
|
|
172
|
-
const c = e.bindings[s],
|
|
172
|
+
const c = e.bindings[s], u = j({
|
|
173
173
|
code: c,
|
|
174
174
|
localState: n,
|
|
175
175
|
rootState: o,
|
|
176
176
|
rootSetState: i,
|
|
177
177
|
context: t
|
|
178
178
|
});
|
|
179
|
-
|
|
179
|
+
Xe(a, s, u);
|
|
180
180
|
}
|
|
181
181
|
return a;
|
|
182
182
|
};
|
|
@@ -189,7 +189,7 @@ function W({
|
|
|
189
189
|
rootSetState: r
|
|
190
190
|
}) {
|
|
191
191
|
const a = e;
|
|
192
|
-
return n ?
|
|
192
|
+
return n ? Ze({
|
|
193
193
|
block: a,
|
|
194
194
|
localState: o,
|
|
195
195
|
rootState: i,
|
|
@@ -197,7 +197,7 @@ function W({
|
|
|
197
197
|
context: t
|
|
198
198
|
}) : a;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], N = (e) => typeof e == "string" && et.includes(e.toLowerCase()), tt = ({
|
|
201
201
|
block: e,
|
|
202
202
|
context: t,
|
|
203
203
|
registeredComponents: n
|
|
@@ -219,7 +219,7 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
219
219
|
console.warn(`
|
|
220
220
|
Could not find a registered component named "${o}".
|
|
221
221
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
222
|
-
},
|
|
222
|
+
}, nt = ({
|
|
223
223
|
block: e,
|
|
224
224
|
context: t
|
|
225
225
|
}) => {
|
|
@@ -239,20 +239,20 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
239
239
|
if (!Array.isArray(i))
|
|
240
240
|
return;
|
|
241
241
|
const r = n.collection.split(".").pop(), a = n.itemName || (r ? r + "Item" : "item");
|
|
242
|
-
return i.map((c,
|
|
242
|
+
return i.map((c, u) => ({
|
|
243
243
|
context: {
|
|
244
244
|
...t,
|
|
245
245
|
localState: {
|
|
246
246
|
...t.localState,
|
|
247
|
-
$index:
|
|
247
|
+
$index: u,
|
|
248
248
|
$item: c,
|
|
249
249
|
[a]: c,
|
|
250
|
-
[`$${a}Index`]:
|
|
250
|
+
[`$${a}Index`]: u
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
block: o
|
|
254
254
|
}));
|
|
255
|
-
},
|
|
255
|
+
}, de = {
|
|
256
256
|
small: {
|
|
257
257
|
min: 320,
|
|
258
258
|
default: 321,
|
|
@@ -268,11 +268,11 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
268
268
|
default: 991,
|
|
269
269
|
max: 1200
|
|
270
270
|
}
|
|
271
|
-
},
|
|
271
|
+
}, J = (e, t = de) => `@media (max-width: ${t[e].max}px)`, ue = ({
|
|
272
272
|
small: e,
|
|
273
273
|
medium: t
|
|
274
274
|
}) => {
|
|
275
|
-
const n = $(
|
|
275
|
+
const n = $(de);
|
|
276
276
|
if (!e || !t)
|
|
277
277
|
return n;
|
|
278
278
|
const o = Math.floor(e / 2);
|
|
@@ -294,17 +294,17 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
294
294
|
min: r,
|
|
295
295
|
default: r + 1
|
|
296
296
|
}, n;
|
|
297
|
-
},
|
|
297
|
+
}, ot = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), w = (e) => e != null, me = (e) => Object.entries(e).map(([n, o]) => {
|
|
298
298
|
if (typeof o == "string")
|
|
299
|
-
return `${
|
|
300
|
-
}).filter(
|
|
299
|
+
return `${ot(n)}: ${o};`;
|
|
300
|
+
}).filter(w), it = (e) => me(e).join(`
|
|
301
301
|
`), _ = ({
|
|
302
302
|
mediaQuery: e,
|
|
303
303
|
className: t,
|
|
304
304
|
styles: n
|
|
305
305
|
}) => {
|
|
306
306
|
const o = `.${t} {
|
|
307
|
-
${
|
|
307
|
+
${it(n)}
|
|
308
308
|
}`;
|
|
309
309
|
return e ? `${e} {
|
|
310
310
|
${o}
|
|
@@ -313,7 +313,7 @@ const tt = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
|
|
|
313
313
|
function O(e) {
|
|
314
314
|
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function rt(e) {
|
|
317
317
|
const t = function() {
|
|
318
318
|
const i = W({
|
|
319
319
|
block: e.block,
|
|
@@ -323,7 +323,7 @@ function K(e) {
|
|
|
323
323
|
context: e.context.context,
|
|
324
324
|
shouldEvaluateBindings: !0
|
|
325
325
|
});
|
|
326
|
-
return
|
|
326
|
+
return w(i.hide) ? !i.hide : w(i.show) ? i.show : !0;
|
|
327
327
|
}, n = function() {
|
|
328
328
|
var d;
|
|
329
329
|
const i = W({
|
|
@@ -333,30 +333,30 @@ function K(e) {
|
|
|
333
333
|
rootSetState: e.context.rootSetState,
|
|
334
334
|
context: e.context.context,
|
|
335
335
|
shouldEvaluateBindings: !0
|
|
336
|
-
}), r = i.responsiveStyles, a = e.context.content, s =
|
|
336
|
+
}), r = i.responsiveStyles, a = e.context.content, s = ue(
|
|
337
337
|
((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
|
|
338
|
-
), c = r == null ? void 0 : r.large,
|
|
339
|
-
if (!
|
|
338
|
+
), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, h = r == null ? void 0 : r.small, g = i.id;
|
|
339
|
+
if (!g)
|
|
340
340
|
return "";
|
|
341
|
-
const
|
|
342
|
-
className:
|
|
341
|
+
const m = c ? _({
|
|
342
|
+
className: g,
|
|
343
343
|
styles: c
|
|
344
|
-
}) : "",
|
|
345
|
-
className:
|
|
346
|
-
styles:
|
|
347
|
-
mediaQuery:
|
|
344
|
+
}) : "", f = u ? _({
|
|
345
|
+
className: g,
|
|
346
|
+
styles: u,
|
|
347
|
+
mediaQuery: J(
|
|
348
348
|
"medium",
|
|
349
349
|
s
|
|
350
350
|
)
|
|
351
|
-
}) : "",
|
|
352
|
-
className:
|
|
351
|
+
}) : "", p = h ? _({
|
|
352
|
+
className: g,
|
|
353
353
|
styles: h,
|
|
354
|
-
mediaQuery:
|
|
354
|
+
mediaQuery: J(
|
|
355
355
|
"small",
|
|
356
356
|
s
|
|
357
357
|
)
|
|
358
358
|
}) : "";
|
|
359
|
-
return [
|
|
359
|
+
return [m, f, p].join(" ");
|
|
360
360
|
};
|
|
361
361
|
return /* @__PURE__ */ l(y, { children: n() && t() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
|
|
362
362
|
}
|
|
@@ -423,7 +423,7 @@ function mt(e) {
|
|
|
423
423
|
case "svelte":
|
|
424
424
|
case "vue":
|
|
425
425
|
case "solid":
|
|
426
|
-
return
|
|
426
|
+
return me(e).join(" ");
|
|
427
427
|
case "qwik":
|
|
428
428
|
case "reactNative":
|
|
429
429
|
case "react":
|
|
@@ -461,10 +461,10 @@ const ft = ({
|
|
|
461
461
|
includeBlockProps: i
|
|
462
462
|
} : s;
|
|
463
463
|
};
|
|
464
|
-
function
|
|
465
|
-
var n
|
|
466
|
-
const t = e.isInteractive ?
|
|
467
|
-
return /* @__PURE__ */ l(y, { children: e.componentRef ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */
|
|
464
|
+
function Q(e) {
|
|
465
|
+
var n;
|
|
466
|
+
const t = e.isInteractive ? Be : e.componentRef;
|
|
467
|
+
return /* @__PURE__ */ l(y, { children: e.componentRef ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
468
468
|
t,
|
|
469
469
|
{
|
|
470
470
|
...ft({
|
|
@@ -476,25 +476,15 @@ function X(e) {
|
|
|
476
476
|
isInteractive: e.isInteractive,
|
|
477
477
|
contextValue: e.context
|
|
478
478
|
}),
|
|
479
|
-
children:
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
)),
|
|
489
|
-
(o = e.blockChildren) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
490
|
-
K,
|
|
491
|
-
{
|
|
492
|
-
block: i,
|
|
493
|
-
context: e.context
|
|
494
|
-
},
|
|
495
|
-
"block-style-" + i.id
|
|
496
|
-
))
|
|
497
|
-
]
|
|
479
|
+
children: (n = e.blockChildren) == null ? void 0 : n.map((o) => /* @__PURE__ */ l(
|
|
480
|
+
F,
|
|
481
|
+
{
|
|
482
|
+
block: o,
|
|
483
|
+
context: e.context,
|
|
484
|
+
registeredComponents: e.registeredComponents
|
|
485
|
+
},
|
|
486
|
+
o.id
|
|
487
|
+
))
|
|
498
488
|
}
|
|
499
489
|
) }) : null });
|
|
500
490
|
}
|
|
@@ -510,15 +500,15 @@ function ht(e) {
|
|
|
510
500
|
);
|
|
511
501
|
}
|
|
512
502
|
function F(e) {
|
|
513
|
-
var
|
|
503
|
+
var u, h, g;
|
|
514
504
|
const t = function() {
|
|
515
|
-
return
|
|
505
|
+
return tt({
|
|
516
506
|
block: e.block,
|
|
517
507
|
context: e.context,
|
|
518
508
|
registeredComponents: e.registeredComponents
|
|
519
509
|
});
|
|
520
510
|
}, n = function() {
|
|
521
|
-
return
|
|
511
|
+
return nt({
|
|
522
512
|
block: e.block,
|
|
523
513
|
context: e.context
|
|
524
514
|
});
|
|
@@ -535,111 +525,106 @@ function F(e) {
|
|
|
535
525
|
}, i = function() {
|
|
536
526
|
return e.block.tagName || "div";
|
|
537
527
|
}, r = function() {
|
|
538
|
-
var
|
|
539
|
-
if ((
|
|
540
|
-
return !!((
|
|
528
|
+
var d, b;
|
|
529
|
+
if ((d = e.block.repeat) != null && d.collection)
|
|
530
|
+
return !!((b = n()) != null && b.length);
|
|
541
531
|
const f = "hide" in o() ? o().hide : !1;
|
|
542
532
|
return ("show" in o() ? o().show : !0) && !f;
|
|
543
533
|
}, a = function() {
|
|
544
|
-
var
|
|
545
|
-
return !((
|
|
534
|
+
var p;
|
|
535
|
+
return !((p = t()) != null && p.component) && !n() ? o().children ?? [] : [];
|
|
546
536
|
}, s = function() {
|
|
547
|
-
var f, d, b,
|
|
537
|
+
var f, p, d, b, S;
|
|
548
538
|
return {
|
|
549
539
|
blockChildren: o().children ?? [],
|
|
550
540
|
componentRef: (f = t()) == null ? void 0 : f.component,
|
|
551
541
|
componentOptions: {
|
|
552
|
-
...
|
|
542
|
+
...je(o()),
|
|
553
543
|
builderContext: e.context,
|
|
554
|
-
...((
|
|
544
|
+
...((p = t()) == null ? void 0 : p.name) === "Symbol" || ((d = t()) == null ? void 0 : d.name) === "Columns" ? {
|
|
555
545
|
builderComponents: e.registeredComponents
|
|
556
546
|
} : {}
|
|
557
547
|
},
|
|
558
548
|
context: c,
|
|
559
549
|
registeredComponents: e.registeredComponents,
|
|
560
550
|
builderBlock: o(),
|
|
561
|
-
includeBlockProps: ((
|
|
562
|
-
isInteractive: !((
|
|
551
|
+
includeBlockProps: ((b = t()) == null ? void 0 : b.noWrap) === !0,
|
|
552
|
+
isInteractive: !((S = t()) != null && S.isRSC)
|
|
563
553
|
};
|
|
564
554
|
}, c = e.context;
|
|
565
|
-
return /* @__PURE__ */ l(y, { children: r() ? /* @__PURE__ */
|
|
566
|
-
|
|
567
|
-
{
|
|
568
|
-
|
|
569
|
-
componentOptions: s().componentOptions,
|
|
570
|
-
blockChildren: s().blockChildren,
|
|
571
|
-
context: s().context,
|
|
572
|
-
registeredComponents: s().registeredComponents,
|
|
573
|
-
builderBlock: s().builderBlock,
|
|
574
|
-
includeBlockProps: s().includeBlockProps,
|
|
575
|
-
isInteractive: s().isInteractive
|
|
576
|
-
}
|
|
577
|
-
) }) : /* @__PURE__ */ w(y, { children: [
|
|
578
|
-
N(i()) ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
579
|
-
Y,
|
|
580
|
-
{
|
|
581
|
-
Wrapper: i(),
|
|
582
|
-
block: o(),
|
|
583
|
-
context: e.context,
|
|
584
|
-
hasChildren: !1
|
|
585
|
-
}
|
|
586
|
-
) }) : null,
|
|
587
|
-
!N(i()) && n() ? /* @__PURE__ */ l(y, { children: (h = n()) == null ? void 0 : h.map((u, f) => /* @__PURE__ */ l(
|
|
588
|
-
ht,
|
|
589
|
-
{
|
|
590
|
-
repeatContext: u.context,
|
|
591
|
-
block: u.block,
|
|
592
|
-
registeredComponents: e.registeredComponents
|
|
593
|
-
},
|
|
594
|
-
f
|
|
595
|
-
)) }) : null,
|
|
596
|
-
!N(i()) && !n() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ w(
|
|
597
|
-
Y,
|
|
555
|
+
return /* @__PURE__ */ l(y, { children: r() ? /* @__PURE__ */ I(y, { children: [
|
|
556
|
+
/* @__PURE__ */ l(rt, { block: e.block, context: e.context }),
|
|
557
|
+
(u = t()) != null && u.noWrap ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
558
|
+
Q,
|
|
598
559
|
{
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
componentRef: s().componentRef,
|
|
608
|
-
componentOptions: s().componentOptions,
|
|
609
|
-
blockChildren: s().blockChildren,
|
|
610
|
-
context: s().context,
|
|
611
|
-
registeredComponents: s().registeredComponents,
|
|
612
|
-
builderBlock: s().builderBlock,
|
|
613
|
-
includeBlockProps: s().includeBlockProps,
|
|
614
|
-
isInteractive: s().isInteractive
|
|
615
|
-
}
|
|
616
|
-
),
|
|
617
|
-
(p = a()) == null ? void 0 : p.map((u) => /* @__PURE__ */ l(
|
|
618
|
-
F,
|
|
619
|
-
{
|
|
620
|
-
block: u,
|
|
621
|
-
context: c,
|
|
622
|
-
registeredComponents: e.registeredComponents
|
|
623
|
-
},
|
|
624
|
-
"block-" + u.id
|
|
625
|
-
)),
|
|
626
|
-
(v = a()) == null ? void 0 : v.map((u) => /* @__PURE__ */ l(
|
|
627
|
-
K,
|
|
628
|
-
{
|
|
629
|
-
block: u,
|
|
630
|
-
context: c
|
|
631
|
-
},
|
|
632
|
-
"block-style-" + u.id
|
|
633
|
-
))
|
|
634
|
-
]
|
|
560
|
+
componentRef: s().componentRef,
|
|
561
|
+
componentOptions: s().componentOptions,
|
|
562
|
+
blockChildren: s().blockChildren,
|
|
563
|
+
context: s().context,
|
|
564
|
+
registeredComponents: s().registeredComponents,
|
|
565
|
+
builderBlock: s().builderBlock,
|
|
566
|
+
includeBlockProps: s().includeBlockProps,
|
|
567
|
+
isInteractive: s().isInteractive
|
|
635
568
|
}
|
|
636
|
-
) }) :
|
|
637
|
-
|
|
569
|
+
) }) : /* @__PURE__ */ I(y, { children: [
|
|
570
|
+
N(i()) ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
|
|
571
|
+
G,
|
|
572
|
+
{
|
|
573
|
+
Wrapper: i(),
|
|
574
|
+
block: o(),
|
|
575
|
+
context: e.context,
|
|
576
|
+
hasChildren: !1
|
|
577
|
+
}
|
|
578
|
+
) }) : null,
|
|
579
|
+
!N(i()) && n() ? /* @__PURE__ */ l(y, { children: (h = n()) == null ? void 0 : h.map((m, f) => /* @__PURE__ */ l(
|
|
580
|
+
ht,
|
|
581
|
+
{
|
|
582
|
+
repeatContext: m.context,
|
|
583
|
+
block: m.block,
|
|
584
|
+
registeredComponents: e.registeredComponents
|
|
585
|
+
},
|
|
586
|
+
f
|
|
587
|
+
)) }) : null,
|
|
588
|
+
!N(i()) && !n() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ I(
|
|
589
|
+
G,
|
|
590
|
+
{
|
|
591
|
+
Wrapper: i(),
|
|
592
|
+
block: o(),
|
|
593
|
+
context: e.context,
|
|
594
|
+
hasChildren: !0,
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ l(
|
|
597
|
+
Q,
|
|
598
|
+
{
|
|
599
|
+
componentRef: s().componentRef,
|
|
600
|
+
componentOptions: s().componentOptions,
|
|
601
|
+
blockChildren: s().blockChildren,
|
|
602
|
+
context: s().context,
|
|
603
|
+
registeredComponents: s().registeredComponents,
|
|
604
|
+
builderBlock: s().builderBlock,
|
|
605
|
+
includeBlockProps: s().includeBlockProps,
|
|
606
|
+
isInteractive: s().isInteractive
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
(g = a()) == null ? void 0 : g.map((m) => /* @__PURE__ */ l(
|
|
610
|
+
F,
|
|
611
|
+
{
|
|
612
|
+
block: m,
|
|
613
|
+
context: c,
|
|
614
|
+
registeredComponents: e.registeredComponents
|
|
615
|
+
},
|
|
616
|
+
m.id
|
|
617
|
+
))
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
) }) : null
|
|
621
|
+
] })
|
|
622
|
+
] }) : null });
|
|
638
623
|
}
|
|
639
|
-
function
|
|
640
|
-
var t, n, o
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
|
|
624
|
+
function K(e) {
|
|
625
|
+
var t, n, o;
|
|
626
|
+
return /* @__PURE__ */ l(
|
|
627
|
+
We,
|
|
643
628
|
{
|
|
644
629
|
blocks: e.blocks,
|
|
645
630
|
parent: e.parent,
|
|
@@ -647,30 +632,20 @@ function H(e) {
|
|
|
647
632
|
styleProp: e.styleProp,
|
|
648
633
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
649
634
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
650
|
-
children:
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
)) }) : null,
|
|
660
|
-
e.blocks ? /* @__PURE__ */ l(y, { children: (i = e.blocks) == null ? void 0 : i.map((r) => /* @__PURE__ */ l(
|
|
661
|
-
K,
|
|
662
|
-
{
|
|
663
|
-
block: r,
|
|
664
|
-
context: e.context
|
|
665
|
-
},
|
|
666
|
-
"block-style-" + r.id
|
|
667
|
-
)) }) : null
|
|
668
|
-
]
|
|
635
|
+
children: e.blocks ? /* @__PURE__ */ l(y, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
636
|
+
F,
|
|
637
|
+
{
|
|
638
|
+
block: i,
|
|
639
|
+
context: e.context,
|
|
640
|
+
registeredComponents: e.registeredComponents
|
|
641
|
+
},
|
|
642
|
+
i.id
|
|
643
|
+
)) }) : null
|
|
669
644
|
}
|
|
670
645
|
);
|
|
671
646
|
}
|
|
672
647
|
function pt(e) {
|
|
673
|
-
var
|
|
648
|
+
var f;
|
|
674
649
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
|
|
675
650
|
var b;
|
|
676
651
|
return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
|
|
@@ -687,7 +662,7 @@ function pt(e) {
|
|
|
687
662
|
desktopStyle: b
|
|
688
663
|
}) {
|
|
689
664
|
return o === "never" ? b : d;
|
|
690
|
-
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
665
|
+
}, c = e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column", u = function() {
|
|
691
666
|
return {
|
|
692
667
|
"--flex-dir": c,
|
|
693
668
|
"--flex-dir-tablet": a({
|
|
@@ -696,35 +671,35 @@ function pt(e) {
|
|
|
696
671
|
})
|
|
697
672
|
};
|
|
698
673
|
}, h = function(d) {
|
|
699
|
-
const b = d === 0 ? 0 : t,
|
|
674
|
+
const b = d === 0 ? 0 : t, S = r(d), v = `${b}px`, P = "100%", E = 0;
|
|
700
675
|
return {
|
|
701
|
-
width:
|
|
702
|
-
["marginLeft"]:
|
|
676
|
+
width: S,
|
|
677
|
+
["marginLeft"]: v,
|
|
703
678
|
"--column-width-mobile": s({
|
|
704
679
|
stackedStyle: P,
|
|
705
|
-
desktopStyle:
|
|
680
|
+
desktopStyle: S
|
|
706
681
|
}),
|
|
707
682
|
"--column-margin-left-mobile": s({
|
|
708
683
|
stackedStyle: E,
|
|
709
|
-
desktopStyle:
|
|
684
|
+
desktopStyle: v
|
|
710
685
|
}),
|
|
711
686
|
"--column-width-tablet": a({
|
|
712
687
|
stackedStyle: P,
|
|
713
|
-
desktopStyle:
|
|
688
|
+
desktopStyle: S
|
|
714
689
|
}),
|
|
715
690
|
"--column-margin-left-tablet": a({
|
|
716
691
|
stackedStyle: E,
|
|
717
|
-
desktopStyle:
|
|
692
|
+
desktopStyle: v
|
|
718
693
|
})
|
|
719
694
|
};
|
|
720
|
-
},
|
|
721
|
-
var
|
|
722
|
-
return
|
|
723
|
-
((
|
|
695
|
+
}, g = function(d) {
|
|
696
|
+
var S, v;
|
|
697
|
+
return ue(
|
|
698
|
+
((v = (S = e.builderContext.content) == null ? void 0 : S.meta) == null ? void 0 : v.breakpoints) || {}
|
|
724
699
|
)[d].max;
|
|
725
|
-
},
|
|
700
|
+
}, m = function() {
|
|
726
701
|
return `
|
|
727
|
-
@media (max-width: ${
|
|
702
|
+
@media (max-width: ${g("medium")}px) {
|
|
728
703
|
.${e.builderBlock.id}-breakpoints {
|
|
729
704
|
flex-direction: var(--flex-dir-tablet);
|
|
730
705
|
align-items: stretch;
|
|
@@ -736,7 +711,7 @@ function pt(e) {
|
|
|
736
711
|
}
|
|
737
712
|
}
|
|
738
713
|
|
|
739
|
-
@media (max-width: ${
|
|
714
|
+
@media (max-width: ${g("small")}px) {
|
|
740
715
|
.${e.builderBlock.id}-breakpoints {
|
|
741
716
|
flex-direction: var(--flex-dir);
|
|
742
717
|
align-items: stretch;
|
|
@@ -749,23 +724,23 @@ function pt(e) {
|
|
|
749
724
|
},
|
|
750
725
|
`;
|
|
751
726
|
};
|
|
752
|
-
return /* @__PURE__ */
|
|
753
|
-
/* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ I(y, { children: [
|
|
728
|
+
/* @__PURE__ */ I(
|
|
754
729
|
"div",
|
|
755
730
|
{
|
|
756
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
757
|
-
style:
|
|
731
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-39daef82`,
|
|
732
|
+
style: u(),
|
|
758
733
|
children: [
|
|
759
|
-
/* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles:
|
|
760
|
-
(
|
|
734
|
+
/* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: m() }) }),
|
|
735
|
+
(f = e.columns) == null ? void 0 : f.map((p, d) => /* @__PURE__ */ Ve(
|
|
761
736
|
"div",
|
|
762
737
|
{
|
|
763
|
-
className: "builder-column div-
|
|
738
|
+
className: "builder-column div-39daef82-2",
|
|
764
739
|
style: h(d),
|
|
765
740
|
key: d
|
|
766
741
|
},
|
|
767
742
|
/* @__PURE__ */ l(
|
|
768
|
-
|
|
743
|
+
K,
|
|
769
744
|
{
|
|
770
745
|
path: `component.options.columns.${d}.blocks`,
|
|
771
746
|
parent: e.builderBlock.id,
|
|
@@ -774,24 +749,24 @@ function pt(e) {
|
|
|
774
749
|
},
|
|
775
750
|
context: e.builderContext,
|
|
776
751
|
registeredComponents: e.builderComponents,
|
|
777
|
-
blocks:
|
|
752
|
+
blocks: p.blocks
|
|
778
753
|
}
|
|
779
754
|
)
|
|
780
755
|
))
|
|
781
756
|
]
|
|
782
757
|
}
|
|
783
758
|
),
|
|
784
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
759
|
+
/* @__PURE__ */ l("style", { children: `.div-39daef82 {
|
|
785
760
|
display: flex;
|
|
786
761
|
line-height: normal;
|
|
787
|
-
}.div-
|
|
762
|
+
}.div-39daef82-2 {
|
|
788
763
|
display: flex;
|
|
789
764
|
flex-direction: column;
|
|
790
765
|
align-items: stretch;
|
|
791
766
|
}` })
|
|
792
767
|
] });
|
|
793
768
|
}
|
|
794
|
-
function
|
|
769
|
+
function X(e) {
|
|
795
770
|
return e.replace(/http(s)?:/, "");
|
|
796
771
|
}
|
|
797
772
|
function gt(e = "", t, n) {
|
|
@@ -802,11 +777,11 @@ function bt(e, t) {
|
|
|
802
777
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
803
778
|
return e;
|
|
804
779
|
if (t === "master")
|
|
805
|
-
return
|
|
780
|
+
return X(e);
|
|
806
781
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
807
782
|
if (n) {
|
|
808
783
|
const o = e.split(n[0]), i = n[3], r = t.match("x") ? t : `${t}x`;
|
|
809
|
-
return
|
|
784
|
+
return X(`${o[0]}_${r}${i}`);
|
|
810
785
|
}
|
|
811
786
|
return null;
|
|
812
787
|
}
|
|
@@ -826,7 +801,7 @@ const yt = (e) => {
|
|
|
826
801
|
return e;
|
|
827
802
|
const t = e.split(".");
|
|
828
803
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
829
|
-
},
|
|
804
|
+
}, fe = ({
|
|
830
805
|
name: e,
|
|
831
806
|
canTrack: t
|
|
832
807
|
}) => {
|
|
@@ -837,14 +812,14 @@ const yt = (e) => {
|
|
|
837
812
|
k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
838
813
|
return;
|
|
839
814
|
}
|
|
840
|
-
},
|
|
815
|
+
}, he = async (e) => fe(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), xt = [["secure", ""], ["SameSite", "None"]], St = ({
|
|
841
816
|
name: e,
|
|
842
817
|
value: t,
|
|
843
818
|
expires: n
|
|
844
819
|
}) => {
|
|
845
|
-
const i = (
|
|
820
|
+
const i = (x() ? location.protocol === "https:" : !0) ? xt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
|
|
846
821
|
return vt(a);
|
|
847
|
-
},
|
|
822
|
+
}, pe = async ({
|
|
848
823
|
name: e,
|
|
849
824
|
value: t,
|
|
850
825
|
expires: n,
|
|
@@ -862,24 +837,24 @@ const yt = (e) => {
|
|
|
862
837
|
} catch (i) {
|
|
863
838
|
k.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
864
839
|
}
|
|
865
|
-
}, kt = "builder.tests",
|
|
840
|
+
}, kt = "builder.tests", H = (e) => `${kt}.${e}`, Ct = ({
|
|
866
841
|
contentId: e
|
|
867
|
-
}) =>
|
|
868
|
-
name:
|
|
842
|
+
}) => he({
|
|
843
|
+
name: H(e),
|
|
869
844
|
canTrack: !0
|
|
870
845
|
}), wt = ({
|
|
871
846
|
contentId: e
|
|
872
|
-
}) =>
|
|
873
|
-
name:
|
|
847
|
+
}) => fe({
|
|
848
|
+
name: H(e),
|
|
874
849
|
canTrack: !0
|
|
875
850
|
}), It = ({
|
|
876
851
|
contentId: e,
|
|
877
852
|
value: t
|
|
878
|
-
}) =>
|
|
879
|
-
name:
|
|
853
|
+
}) => pe({
|
|
854
|
+
name: H(e),
|
|
880
855
|
value: t,
|
|
881
856
|
canTrack: !0
|
|
882
|
-
}),
|
|
857
|
+
}), ge = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, Tt = ({
|
|
883
858
|
id: e,
|
|
884
859
|
variations: t
|
|
885
860
|
}) => {
|
|
@@ -892,7 +867,7 @@ const yt = (e) => {
|
|
|
892
867
|
return r;
|
|
893
868
|
}
|
|
894
869
|
return e;
|
|
895
|
-
},
|
|
870
|
+
}, be = (e) => {
|
|
896
871
|
const t = Tt(e);
|
|
897
872
|
return It({
|
|
898
873
|
contentId: e.id,
|
|
@@ -900,7 +875,7 @@ const yt = (e) => {
|
|
|
900
875
|
}).catch((n) => {
|
|
901
876
|
k.error("could not store A/B test variation: ", n);
|
|
902
877
|
}), t;
|
|
903
|
-
},
|
|
878
|
+
}, ye = ({
|
|
904
879
|
item: e,
|
|
905
880
|
testGroupId: t
|
|
906
881
|
}) => {
|
|
@@ -922,14 +897,14 @@ const yt = (e) => {
|
|
|
922
897
|
return e;
|
|
923
898
|
if (!e)
|
|
924
899
|
return;
|
|
925
|
-
if (!
|
|
900
|
+
if (!ge(e))
|
|
926
901
|
return e;
|
|
927
902
|
const n = wt({
|
|
928
903
|
contentId: e.id
|
|
929
|
-
}) ||
|
|
904
|
+
}) || be({
|
|
930
905
|
variations: e.variations,
|
|
931
906
|
id: e.id
|
|
932
|
-
}), o =
|
|
907
|
+
}), o = ye({
|
|
933
908
|
item: e,
|
|
934
909
|
testGroupId: n
|
|
935
910
|
});
|
|
@@ -941,14 +916,14 @@ const yt = (e) => {
|
|
|
941
916
|
item: e,
|
|
942
917
|
canTrack: t
|
|
943
918
|
}) => {
|
|
944
|
-
if (!t || !
|
|
919
|
+
if (!t || !ge(e))
|
|
945
920
|
return e;
|
|
946
921
|
const o = await Ct({
|
|
947
922
|
contentId: e.id
|
|
948
|
-
}) ||
|
|
923
|
+
}) || be({
|
|
949
924
|
variations: e.variations,
|
|
950
925
|
id: e.id
|
|
951
|
-
}), i =
|
|
926
|
+
}), i = ye({
|
|
952
927
|
item: e,
|
|
953
928
|
testGroupId: o
|
|
954
929
|
});
|
|
@@ -956,7 +931,7 @@ const yt = (e) => {
|
|
|
956
931
|
...e,
|
|
957
932
|
...i
|
|
958
933
|
};
|
|
959
|
-
}, L = (e) =>
|
|
934
|
+
}, L = (e) => w(e) ? e : !0, Pt = {
|
|
960
935
|
name: "Core:Button",
|
|
961
936
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
962
937
|
defaultStyles: {
|
|
@@ -1264,15 +1239,15 @@ const yt = (e) => {
|
|
|
1264
1239
|
onChange: (e) => {
|
|
1265
1240
|
e.delete("srcset"), e.delete("noWebp");
|
|
1266
1241
|
function n(a, s = 6e4) {
|
|
1267
|
-
return new Promise((c,
|
|
1242
|
+
return new Promise((c, u) => {
|
|
1268
1243
|
const h = document.createElement("img");
|
|
1269
|
-
let
|
|
1244
|
+
let g = !1;
|
|
1270
1245
|
h.onload = () => {
|
|
1271
|
-
|
|
1272
|
-
}, h.addEventListener("error", (
|
|
1273
|
-
console.warn("Image load failed",
|
|
1246
|
+
g = !0, c(h);
|
|
1247
|
+
}, h.addEventListener("error", (m) => {
|
|
1248
|
+
console.warn("Image load failed", m.error), u(m.error);
|
|
1274
1249
|
}), h.src = a, setTimeout(() => {
|
|
1275
|
-
|
|
1250
|
+
g || u(new Error("Image load timed out"));
|
|
1276
1251
|
}, s);
|
|
1277
1252
|
});
|
|
1278
1253
|
}
|
|
@@ -1542,29 +1517,29 @@ const Mt = {
|
|
|
1542
1517
|
defaultValue: !0,
|
|
1543
1518
|
advanced: !0
|
|
1544
1519
|
}]
|
|
1545
|
-
},
|
|
1546
|
-
component:
|
|
1520
|
+
}, Z = () => [{
|
|
1521
|
+
component: $e,
|
|
1547
1522
|
...Pt
|
|
1548
1523
|
}, {
|
|
1549
1524
|
component: pt,
|
|
1550
1525
|
...At
|
|
1551
1526
|
}, {
|
|
1552
|
-
component:
|
|
1527
|
+
component: Oe,
|
|
1553
1528
|
...Vt
|
|
1554
1529
|
}, {
|
|
1555
|
-
component:
|
|
1530
|
+
component: Fe,
|
|
1556
1531
|
...Bt
|
|
1557
1532
|
}, {
|
|
1558
|
-
component:
|
|
1533
|
+
component: Ne,
|
|
1559
1534
|
...$t
|
|
1560
1535
|
}, {
|
|
1561
|
-
component:
|
|
1536
|
+
component: _e,
|
|
1562
1537
|
...Ot
|
|
1563
1538
|
}, {
|
|
1564
|
-
component:
|
|
1539
|
+
component: Le,
|
|
1565
1540
|
...Ft
|
|
1566
1541
|
}, {
|
|
1567
|
-
component:
|
|
1542
|
+
component: Ue,
|
|
1568
1543
|
...Nt
|
|
1569
1544
|
}, {
|
|
1570
1545
|
component: $n,
|
|
@@ -1573,9 +1548,9 @@ const Mt = {
|
|
|
1573
1548
|
component: Ut,
|
|
1574
1549
|
...Lt
|
|
1575
1550
|
}, {
|
|
1576
|
-
component:
|
|
1551
|
+
component: Me,
|
|
1577
1552
|
...Mt
|
|
1578
|
-
}],
|
|
1553
|
+
}], ee = [], jn = (e) => ({
|
|
1579
1554
|
type: "builder.registerComponent",
|
|
1580
1555
|
data: U(e)
|
|
1581
1556
|
}), Dt = (e) => {
|
|
@@ -1680,24 +1655,24 @@ const Mt = {
|
|
|
1680
1655
|
thisScriptEl?.remove();
|
|
1681
1656
|
}
|
|
1682
1657
|
return;
|
|
1683
|
-
}`,
|
|
1658
|
+
}`, ve = "builderIoAbTest", xe = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1684
1659
|
...t,
|
|
1685
1660
|
testVariationId: t.id,
|
|
1686
1661
|
id: e == null ? void 0 : e.id
|
|
1687
1662
|
})), zt = ({
|
|
1688
1663
|
canTrack: e,
|
|
1689
1664
|
content: t
|
|
1690
|
-
}) => !(!(V(t).length > 0) || !e ||
|
|
1691
|
-
window.${
|
|
1692
|
-
window.${
|
|
1665
|
+
}) => !(!(V(t).length > 0) || !e || x()), qt = (e) => e === "react" || e === "reactNative", Se = qt(T), Gt = () => `
|
|
1666
|
+
window.${ve} = ${Kt}
|
|
1667
|
+
window.${xe} = ${Ht}
|
|
1693
1668
|
`, Yt = (e, t) => `
|
|
1694
|
-
window.${
|
|
1695
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
1669
|
+
window.${ve}(
|
|
1670
|
+
"${t}",${JSON.stringify(e)}, ${Se}
|
|
1696
1671
|
)`, Jt = ({
|
|
1697
1672
|
contentId: e,
|
|
1698
1673
|
variationId: t
|
|
1699
|
-
}) => `window.${
|
|
1700
|
-
"${t}", "${e}", ${
|
|
1674
|
+
}) => `window.${xe}(
|
|
1675
|
+
"${t}", "${e}", ${Se}
|
|
1701
1676
|
)`;
|
|
1702
1677
|
function M(e) {
|
|
1703
1678
|
return /* @__PURE__ */ l(
|
|
@@ -1713,7 +1688,7 @@ const Qt = (e) => {
|
|
|
1713
1688
|
return n || k.warn("No previewed ID found in search params."), n;
|
|
1714
1689
|
};
|
|
1715
1690
|
function Xt() {
|
|
1716
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1691
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ae({
|
|
1717
1692
|
max: 500,
|
|
1718
1693
|
// how long to live in ms
|
|
1719
1694
|
ttl: 1e3 * 60 * 5
|
|
@@ -1747,27 +1722,27 @@ function B(e, t = null, n = ".") {
|
|
|
1747
1722
|
};
|
|
1748
1723
|
}, {});
|
|
1749
1724
|
}
|
|
1750
|
-
const on = "v3",
|
|
1725
|
+
const on = "v3", te = "builder.", rn = "options.", an = (e) => {
|
|
1751
1726
|
const t = {};
|
|
1752
1727
|
return e.forEach((n, o) => {
|
|
1753
1728
|
t[o] = n;
|
|
1754
1729
|
}), t;
|
|
1755
|
-
},
|
|
1730
|
+
}, ke = (e) => {
|
|
1756
1731
|
if (!e)
|
|
1757
1732
|
return {};
|
|
1758
|
-
const t =
|
|
1733
|
+
const t = Ce(e), n = {};
|
|
1759
1734
|
return Object.keys(t).forEach((o) => {
|
|
1760
|
-
if (o.startsWith(
|
|
1761
|
-
const i = o.replace(
|
|
1735
|
+
if (o.startsWith(te)) {
|
|
1736
|
+
const i = o.replace(te, "").replace(rn, "");
|
|
1762
1737
|
n[i] = t[o];
|
|
1763
1738
|
}
|
|
1764
1739
|
}), n;
|
|
1765
1740
|
}, sn = () => {
|
|
1766
|
-
if (!
|
|
1741
|
+
if (!x())
|
|
1767
1742
|
return {};
|
|
1768
1743
|
const e = new URLSearchParams(window.location.search);
|
|
1769
|
-
return
|
|
1770
|
-
},
|
|
1744
|
+
return ke(e);
|
|
1745
|
+
}, Ce = (e) => e instanceof URLSearchParams ? an(e) : e, ne = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
|
|
1771
1746
|
let {
|
|
1772
1747
|
noTraverse: t = !1
|
|
1773
1748
|
} = e;
|
|
@@ -1779,55 +1754,55 @@ const on = "v3", ne = "builder.", rn = "options.", an = (e) => {
|
|
|
1779
1754
|
apiKey: a,
|
|
1780
1755
|
includeRefs: s = !0,
|
|
1781
1756
|
enrich: c,
|
|
1782
|
-
locale:
|
|
1757
|
+
locale: u,
|
|
1783
1758
|
apiVersion: h = on,
|
|
1784
|
-
fields:
|
|
1785
|
-
omit:
|
|
1786
|
-
offset:
|
|
1787
|
-
cacheSeconds:
|
|
1759
|
+
fields: g,
|
|
1760
|
+
omit: m,
|
|
1761
|
+
offset: f,
|
|
1762
|
+
cacheSeconds: p,
|
|
1788
1763
|
staleCacheSeconds: d,
|
|
1789
1764
|
sort: b,
|
|
1790
|
-
includeUnpublished:
|
|
1765
|
+
includeUnpublished: S
|
|
1791
1766
|
} = e;
|
|
1792
1767
|
if (!a)
|
|
1793
1768
|
throw new Error("Missing API key");
|
|
1794
1769
|
if (!["v2", "v3"].includes(h))
|
|
1795
1770
|
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${h}'`);
|
|
1796
1771
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1797
|
-
const
|
|
1798
|
-
if (
|
|
1772
|
+
const v = new URL(`https://cdn.builder.io/api/${h}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1773
|
+
if (v.searchParams.set("omit", m || "meta.componentsUsed"), g && v.searchParams.set("fields", g), Number.isFinite(f) && f > -1 && v.searchParams.set("offset", String(Math.floor(f))), typeof S == "boolean" && v.searchParams.set("includeUnpublished", String(S)), p && ne(p) && v.searchParams.set("cacheSeconds", String(p)), d && ne(d) && v.searchParams.set("staleCacheSeconds", String(d)), b) {
|
|
1799
1774
|
const C = B({
|
|
1800
1775
|
sort: b
|
|
1801
1776
|
});
|
|
1802
1777
|
for (const R in C)
|
|
1803
|
-
|
|
1778
|
+
v.searchParams.set(R, JSON.stringify(C[R]));
|
|
1804
1779
|
}
|
|
1805
1780
|
const P = {
|
|
1806
1781
|
...sn(),
|
|
1807
|
-
...
|
|
1782
|
+
...Ce(e.options || {})
|
|
1808
1783
|
}, E = B(P);
|
|
1809
1784
|
for (const C in E)
|
|
1810
|
-
|
|
1811
|
-
if (o &&
|
|
1785
|
+
v.searchParams.set(C, String(E[C]));
|
|
1786
|
+
if (o && v.searchParams.set("userAttributes", JSON.stringify(o)), i) {
|
|
1812
1787
|
const C = B({
|
|
1813
1788
|
query: i
|
|
1814
1789
|
});
|
|
1815
1790
|
for (const R in C)
|
|
1816
|
-
|
|
1791
|
+
v.searchParams.set(R, JSON.stringify(C[R]));
|
|
1817
1792
|
}
|
|
1818
|
-
return
|
|
1793
|
+
return v;
|
|
1819
1794
|
}, cn = (e) => "results" in e;
|
|
1820
|
-
async function
|
|
1821
|
-
const t = await
|
|
1795
|
+
async function q(e) {
|
|
1796
|
+
const t = await we({
|
|
1822
1797
|
...e,
|
|
1823
1798
|
limit: 1
|
|
1824
1799
|
});
|
|
1825
1800
|
return t && t[0] || null;
|
|
1826
1801
|
}
|
|
1827
|
-
const Kn =
|
|
1828
|
-
const t =
|
|
1802
|
+
const Kn = q, ln = async (e) => {
|
|
1803
|
+
const t = z(e);
|
|
1829
1804
|
return await (await nn(t.href)).json();
|
|
1830
|
-
}, dn = async (e, t, n =
|
|
1805
|
+
}, dn = async (e, t, n = z(e)) => {
|
|
1831
1806
|
const o = L(e.canTrack);
|
|
1832
1807
|
if (n.search.includes("preview=")) {
|
|
1833
1808
|
const r = [];
|
|
@@ -1837,7 +1812,7 @@ const Kn = G, ln = async (e) => {
|
|
|
1837
1812
|
}
|
|
1838
1813
|
t.results = r;
|
|
1839
1814
|
}
|
|
1840
|
-
if (!o || !(
|
|
1815
|
+
if (!o || !(x() || T === "reactNative"))
|
|
1841
1816
|
return t.results;
|
|
1842
1817
|
try {
|
|
1843
1818
|
const r = [];
|
|
@@ -1852,9 +1827,9 @@ const Kn = G, ln = async (e) => {
|
|
|
1852
1827
|
}
|
|
1853
1828
|
return t.results;
|
|
1854
1829
|
};
|
|
1855
|
-
async function
|
|
1830
|
+
async function we(e) {
|
|
1856
1831
|
try {
|
|
1857
|
-
const t =
|
|
1832
|
+
const t = z(e), n = await ln(e);
|
|
1858
1833
|
return cn(n) ? dn(e, n) : (k.error("Error fetching data. ", {
|
|
1859
1834
|
url: t,
|
|
1860
1835
|
content: n,
|
|
@@ -1864,9 +1839,9 @@ async function Ie(e) {
|
|
|
1864
1839
|
return k.error("Error fetching data. ", t), null;
|
|
1865
1840
|
}
|
|
1866
1841
|
}
|
|
1867
|
-
const Hn =
|
|
1842
|
+
const Hn = we;
|
|
1868
1843
|
function zn() {
|
|
1869
|
-
return !
|
|
1844
|
+
return !x() || D() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1870
1845
|
}
|
|
1871
1846
|
function un() {
|
|
1872
1847
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
@@ -1874,19 +1849,19 @@ function un() {
|
|
|
1874
1849
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
1875
1850
|
});
|
|
1876
1851
|
}
|
|
1877
|
-
function
|
|
1852
|
+
function Ie() {
|
|
1878
1853
|
return un().replace(/-/g, "");
|
|
1879
1854
|
}
|
|
1880
|
-
const
|
|
1855
|
+
const Te = "builderSessionId", mn = async ({
|
|
1881
1856
|
canTrack: e
|
|
1882
1857
|
}) => {
|
|
1883
1858
|
if (!e)
|
|
1884
1859
|
return;
|
|
1885
|
-
const t = await
|
|
1886
|
-
name:
|
|
1860
|
+
const t = await he({
|
|
1861
|
+
name: Te,
|
|
1887
1862
|
canTrack: e
|
|
1888
1863
|
});
|
|
1889
|
-
if (
|
|
1864
|
+
if (w(t))
|
|
1890
1865
|
return t;
|
|
1891
1866
|
{
|
|
1892
1867
|
const n = fn();
|
|
@@ -1895,20 +1870,20 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1895
1870
|
canTrack: e
|
|
1896
1871
|
}), n;
|
|
1897
1872
|
}
|
|
1898
|
-
}, fn = () =>
|
|
1873
|
+
}, fn = () => Ie(), hn = ({
|
|
1899
1874
|
id: e,
|
|
1900
1875
|
canTrack: t
|
|
1901
|
-
}) =>
|
|
1902
|
-
name:
|
|
1876
|
+
}) => pe({
|
|
1877
|
+
name: Te,
|
|
1903
1878
|
value: e,
|
|
1904
1879
|
canTrack: t
|
|
1905
|
-
}),
|
|
1880
|
+
}), Ee = () => x() && typeof localStorage < "u" ? localStorage : void 0, pn = ({
|
|
1906
1881
|
key: e,
|
|
1907
1882
|
canTrack: t
|
|
1908
1883
|
}) => {
|
|
1909
1884
|
var n;
|
|
1910
1885
|
try {
|
|
1911
|
-
return t ? (n =
|
|
1886
|
+
return t ? (n = Ee()) == null ? void 0 : n.getItem(e) : void 0;
|
|
1912
1887
|
} catch (o) {
|
|
1913
1888
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1914
1889
|
return;
|
|
@@ -1920,20 +1895,20 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1920
1895
|
}) => {
|
|
1921
1896
|
var o;
|
|
1922
1897
|
try {
|
|
1923
|
-
t && ((o =
|
|
1898
|
+
t && ((o = Ee()) == null || o.setItem(e, n));
|
|
1924
1899
|
} catch (i) {
|
|
1925
1900
|
console.debug("[LocalStorage] SET error: ", i);
|
|
1926
1901
|
}
|
|
1927
|
-
},
|
|
1902
|
+
}, Re = "builderVisitorId", bn = ({
|
|
1928
1903
|
canTrack: e
|
|
1929
1904
|
}) => {
|
|
1930
1905
|
if (!e)
|
|
1931
1906
|
return;
|
|
1932
1907
|
const t = pn({
|
|
1933
|
-
key:
|
|
1908
|
+
key: Re,
|
|
1934
1909
|
canTrack: e
|
|
1935
1910
|
});
|
|
1936
|
-
if (
|
|
1911
|
+
if (w(t))
|
|
1937
1912
|
return t;
|
|
1938
1913
|
{
|
|
1939
1914
|
const n = yn();
|
|
@@ -1942,11 +1917,11 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1942
1917
|
canTrack: e
|
|
1943
1918
|
}), n;
|
|
1944
1919
|
}
|
|
1945
|
-
}, yn = () =>
|
|
1920
|
+
}, yn = () => Ie(), vn = ({
|
|
1946
1921
|
id: e,
|
|
1947
1922
|
canTrack: t
|
|
1948
1923
|
}) => gn({
|
|
1949
|
-
key:
|
|
1924
|
+
key: Re,
|
|
1950
1925
|
value: e,
|
|
1951
1926
|
canTrack: t
|
|
1952
1927
|
}), xn = async ({
|
|
@@ -1983,7 +1958,7 @@ const Ee = "builderSessionId", mn = async ({
|
|
|
1983
1958
|
...await xn({
|
|
1984
1959
|
canTrack: t
|
|
1985
1960
|
}),
|
|
1986
|
-
userAttributes:
|
|
1961
|
+
userAttributes: le(),
|
|
1987
1962
|
ownerId: n
|
|
1988
1963
|
}
|
|
1989
1964
|
});
|
|
@@ -1992,7 +1967,7 @@ async function kn(e) {
|
|
|
1992
1967
|
k.error("Missing API key for track call. Please provide your API key.");
|
|
1993
1968
|
return;
|
|
1994
1969
|
}
|
|
1995
|
-
if (e.canTrack && !D() && (
|
|
1970
|
+
if (e.canTrack && !D() && (x() || T === "reactNative"))
|
|
1996
1971
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
1997
1972
|
method: "POST",
|
|
1998
1973
|
body: JSON.stringify({
|
|
@@ -2010,7 +1985,7 @@ const qn = (e) => kn({
|
|
|
2010
1985
|
...e,
|
|
2011
1986
|
canTrack: !0
|
|
2012
1987
|
});
|
|
2013
|
-
function
|
|
1988
|
+
function oe(e) {
|
|
2014
1989
|
return Math.round(e * 1e3) / 1e3;
|
|
2015
1990
|
}
|
|
2016
1991
|
const Cn = (e, t, n = !0) => {
|
|
@@ -2027,11 +2002,11 @@ const Cn = (e, t, n = !0) => {
|
|
|
2027
2002
|
}, wn = (e) => Cn(e, (t) => {
|
|
2028
2003
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2029
2004
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2030
|
-
}),
|
|
2005
|
+
}), ie = ({
|
|
2031
2006
|
event: e,
|
|
2032
2007
|
target: t
|
|
2033
2008
|
}) => {
|
|
2034
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r =
|
|
2009
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, i = e.clientY - n.top, r = oe(o / n.width), a = oe(i / n.height);
|
|
2035
2010
|
return {
|
|
2036
2011
|
x: r,
|
|
2037
2012
|
y: a
|
|
@@ -2041,21 +2016,21 @@ const Cn = (e, t, n = !0) => {
|
|
|
2041
2016
|
return {
|
|
2042
2017
|
targetBuilderElement: o || void 0,
|
|
2043
2018
|
metadata: {
|
|
2044
|
-
targetOffset: t ?
|
|
2019
|
+
targetOffset: t ? ie({
|
|
2045
2020
|
event: e,
|
|
2046
2021
|
target: t
|
|
2047
2022
|
}) : void 0,
|
|
2048
|
-
builderTargetOffset: n ?
|
|
2023
|
+
builderTargetOffset: n ? ie({
|
|
2049
2024
|
event: e,
|
|
2050
2025
|
target: n
|
|
2051
2026
|
}) : void 0,
|
|
2052
2027
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2053
2028
|
}
|
|
2054
2029
|
};
|
|
2055
|
-
}, In = "0.11.
|
|
2030
|
+
}, In = "0.11.3", re = {};
|
|
2056
2031
|
function Tn(e, t) {
|
|
2057
|
-
let n =
|
|
2058
|
-
if (n || (n =
|
|
2032
|
+
let n = re[e];
|
|
2033
|
+
if (n || (n = re[e] = []), n.push(t), x()) {
|
|
2059
2034
|
const o = {
|
|
2060
2035
|
type: "builder.register",
|
|
2061
2036
|
data: {
|
|
@@ -2093,10 +2068,10 @@ const Yn = () => {
|
|
|
2093
2068
|
}]
|
|
2094
2069
|
});
|
|
2095
2070
|
};
|
|
2096
|
-
let
|
|
2071
|
+
let ae = !1;
|
|
2097
2072
|
const Jn = (e = {}) => {
|
|
2098
2073
|
var t, n;
|
|
2099
|
-
|
|
2074
|
+
ae || (ae = !0, x() && ((t = window.parent) == null || t.postMessage({
|
|
2100
2075
|
type: "builder.sdkInfo",
|
|
2101
2076
|
data: {
|
|
2102
2077
|
target: T,
|
|
@@ -2119,26 +2094,26 @@ const Jn = (e = {}) => {
|
|
|
2119
2094
|
if (o != null && o.type)
|
|
2120
2095
|
switch (o.type) {
|
|
2121
2096
|
case "builder.evaluate": {
|
|
2122
|
-
const a = o.data.text, s = o.data.arguments || [], c = o.data.id,
|
|
2123
|
-
let h,
|
|
2097
|
+
const a = o.data.text, s = o.data.arguments || [], c = o.data.id, u = new Function(a);
|
|
2098
|
+
let h, g = null;
|
|
2124
2099
|
try {
|
|
2125
|
-
h =
|
|
2126
|
-
} catch (
|
|
2127
|
-
|
|
2100
|
+
h = u.apply(null, s);
|
|
2101
|
+
} catch (m) {
|
|
2102
|
+
g = m;
|
|
2128
2103
|
}
|
|
2129
|
-
|
|
2104
|
+
g ? (i = window.parent) == null || i.postMessage({
|
|
2130
2105
|
type: "builder.evaluateError",
|
|
2131
2106
|
data: {
|
|
2132
2107
|
id: c,
|
|
2133
|
-
error:
|
|
2108
|
+
error: g.message
|
|
2134
2109
|
}
|
|
2135
|
-
}, "*") : h && typeof h.then == "function" ? h.then((
|
|
2136
|
-
var
|
|
2137
|
-
(
|
|
2110
|
+
}, "*") : h && typeof h.then == "function" ? h.then((m) => {
|
|
2111
|
+
var f;
|
|
2112
|
+
(f = window.parent) == null || f.postMessage({
|
|
2138
2113
|
type: "builder.evaluateResult",
|
|
2139
2114
|
data: {
|
|
2140
2115
|
id: c,
|
|
2141
|
-
result:
|
|
2116
|
+
result: m
|
|
2142
2117
|
}
|
|
2143
2118
|
}, "*");
|
|
2144
2119
|
}).catch(console.error) : (r = window.parent) == null || r.postMessage({
|
|
@@ -2240,27 +2215,27 @@ const Vn = ({
|
|
|
2240
2215
|
},
|
|
2241
2216
|
meta: e == null ? void 0 : e.meta
|
|
2242
2217
|
} : void 0;
|
|
2243
|
-
function
|
|
2244
|
-
var i, r, a, s, c,
|
|
2218
|
+
function se(e) {
|
|
2219
|
+
var i, r, a, s, c, u, h, g, m;
|
|
2245
2220
|
const t = Jt({
|
|
2246
2221
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2247
2222
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2248
2223
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2249
2224
|
contentId: (r = e.content) == null ? void 0 : r.id
|
|
2250
2225
|
}), n = [
|
|
2251
|
-
...
|
|
2226
|
+
...Z(),
|
|
2252
2227
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2253
2228
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2254
2229
|
// existing usage.
|
|
2255
2230
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2256
2231
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2257
|
-
...
|
|
2232
|
+
...ee,
|
|
2258
2233
|
...e.customComponents || []
|
|
2259
2234
|
].reduce(
|
|
2260
|
-
(
|
|
2261
|
-
...
|
|
2235
|
+
(f, { component: p, ...d }) => ({
|
|
2236
|
+
...f,
|
|
2262
2237
|
[d.name]: {
|
|
2263
|
-
component:
|
|
2238
|
+
component: p,
|
|
2264
2239
|
...U(d)
|
|
2265
2240
|
}
|
|
2266
2241
|
}),
|
|
@@ -2281,17 +2256,17 @@ function ce(e) {
|
|
|
2281
2256
|
apiKey: e.apiKey,
|
|
2282
2257
|
apiVersion: e.apiVersion,
|
|
2283
2258
|
componentInfos: [
|
|
2284
|
-
...
|
|
2259
|
+
...Z(),
|
|
2285
2260
|
// While this `components` object is deprecated, we must maintain support for it.
|
|
2286
2261
|
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2287
2262
|
// existing usage.
|
|
2288
2263
|
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2289
2264
|
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2290
|
-
...
|
|
2265
|
+
...ee,
|
|
2291
2266
|
...e.customComponents || []
|
|
2292
2267
|
].reduce(
|
|
2293
|
-
(
|
|
2294
|
-
...
|
|
2268
|
+
(f, { component: p, ...d }) => ({
|
|
2269
|
+
...f,
|
|
2295
2270
|
[d.name]: U(d)
|
|
2296
2271
|
}),
|
|
2297
2272
|
{}
|
|
@@ -2300,8 +2275,8 @@ function ce(e) {
|
|
|
2300
2275
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
2301
2276
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2302
2277
|
};
|
|
2303
|
-
return /* @__PURE__ */
|
|
2304
|
-
|
|
2278
|
+
return /* @__PURE__ */ I(
|
|
2279
|
+
De,
|
|
2305
2280
|
{
|
|
2306
2281
|
content: e.content,
|
|
2307
2282
|
model: e.model,
|
|
@@ -2322,13 +2297,13 @@ function ce(e) {
|
|
|
2322
2297
|
{
|
|
2323
2298
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2324
2299
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2325
|
-
customFonts: (h = (
|
|
2300
|
+
customFonts: (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
|
|
2326
2301
|
}
|
|
2327
2302
|
) }),
|
|
2328
2303
|
/* @__PURE__ */ l(
|
|
2329
|
-
|
|
2304
|
+
K,
|
|
2330
2305
|
{
|
|
2331
|
-
blocks: (
|
|
2306
|
+
blocks: (m = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : m.blocks,
|
|
2332
2307
|
context: o,
|
|
2333
2308
|
registeredComponents: n
|
|
2334
2309
|
}
|
|
@@ -2337,7 +2312,7 @@ function ce(e) {
|
|
|
2337
2312
|
}
|
|
2338
2313
|
);
|
|
2339
2314
|
}
|
|
2340
|
-
function
|
|
2315
|
+
function Pe(e) {
|
|
2341
2316
|
var r, a;
|
|
2342
2317
|
const t = zt({
|
|
2343
2318
|
canTrack: L(e.canTrack),
|
|
@@ -2345,9 +2320,9 @@ function Ae(e) {
|
|
|
2345
2320
|
}), n = function() {
|
|
2346
2321
|
var c;
|
|
2347
2322
|
return Yt(
|
|
2348
|
-
V(e.content).map((
|
|
2349
|
-
id:
|
|
2350
|
-
testRatio:
|
|
2323
|
+
V(e.content).map((u) => ({
|
|
2324
|
+
id: u.testVariationId,
|
|
2325
|
+
testRatio: u.testRatio
|
|
2351
2326
|
})),
|
|
2352
2327
|
((c = e.content) == null ? void 0 : c.id) || ""
|
|
2353
2328
|
);
|
|
@@ -2363,9 +2338,9 @@ function Ae(e) {
|
|
|
2363
2338
|
canTrack: L(e.canTrack)
|
|
2364
2339
|
});
|
|
2365
2340
|
};
|
|
2366
|
-
return /* @__PURE__ */
|
|
2341
|
+
return /* @__PURE__ */ I(y, { children: [
|
|
2367
2342
|
!e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: Gt() }) }) : null,
|
|
2368
|
-
t ? /* @__PURE__ */
|
|
2343
|
+
t ? /* @__PURE__ */ I(y, { children: [
|
|
2369
2344
|
/* @__PURE__ */ l(
|
|
2370
2345
|
O,
|
|
2371
2346
|
{
|
|
@@ -2375,7 +2350,7 @@ function Ae(e) {
|
|
|
2375
2350
|
),
|
|
2376
2351
|
/* @__PURE__ */ l(M, { scriptStr: n() }),
|
|
2377
2352
|
(a = V(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
|
|
2378
|
-
|
|
2353
|
+
se,
|
|
2379
2354
|
{
|
|
2380
2355
|
content: s,
|
|
2381
2356
|
showContent: !1,
|
|
@@ -2399,7 +2374,7 @@ function Ae(e) {
|
|
|
2399
2374
|
))
|
|
2400
2375
|
] }) : null,
|
|
2401
2376
|
/* @__PURE__ */ l(
|
|
2402
|
-
|
|
2377
|
+
se,
|
|
2403
2378
|
{
|
|
2404
2379
|
content: i(),
|
|
2405
2380
|
showContent: !0,
|
|
@@ -2428,7 +2403,7 @@ const Wn = async ({
|
|
|
2428
2403
|
}) => {
|
|
2429
2404
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2430
2405
|
(e != null && e.apiKey))
|
|
2431
|
-
return
|
|
2406
|
+
return q({
|
|
2432
2407
|
model: t.model,
|
|
2433
2408
|
apiKey: e.apiKey,
|
|
2434
2409
|
apiVersion: e.apiVersion,
|
|
@@ -2444,19 +2419,19 @@ const Wn = async ({
|
|
|
2444
2419
|
async function $n(e) {
|
|
2445
2420
|
var o, i, r, a;
|
|
2446
2421
|
const t = function() {
|
|
2447
|
-
var c,
|
|
2422
|
+
var c, u;
|
|
2448
2423
|
return [
|
|
2449
2424
|
e.attributes.className,
|
|
2450
2425
|
"builder-symbol",
|
|
2451
2426
|
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
2452
|
-
(
|
|
2427
|
+
(u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2453
2428
|
].filter(Boolean).join(" ");
|
|
2454
2429
|
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await Wn({
|
|
2455
2430
|
symbol: e.symbol,
|
|
2456
2431
|
builderContextValue: e.builderContext
|
|
2457
2432
|
});
|
|
2458
2433
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2459
|
-
|
|
2434
|
+
Pe,
|
|
2460
2435
|
{
|
|
2461
2436
|
__isNestedRender: !0,
|
|
2462
2437
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2473,13 +2448,13 @@ async function $n(e) {
|
|
|
2473
2448
|
}
|
|
2474
2449
|
) });
|
|
2475
2450
|
}
|
|
2476
|
-
const Qn =
|
|
2451
|
+
const Qn = K, Xn = Pe, ce = {};
|
|
2477
2452
|
function Zn(e) {
|
|
2478
|
-
if (
|
|
2479
|
-
Object.assign(
|
|
2453
|
+
if (x()) {
|
|
2454
|
+
Object.assign(ce, e);
|
|
2480
2455
|
const t = {
|
|
2481
2456
|
type: "builder.settingsChange",
|
|
2482
|
-
data:
|
|
2457
|
+
data: ce
|
|
2483
2458
|
};
|
|
2484
2459
|
parent.postMessage(t, "*");
|
|
2485
2460
|
}
|
|
@@ -2496,18 +2471,18 @@ const eo = async (e) => {
|
|
|
2496
2471
|
urlPath: t
|
|
2497
2472
|
} : {}
|
|
2498
2473
|
},
|
|
2499
|
-
options:
|
|
2474
|
+
options: ke(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2500
2475
|
};
|
|
2501
2476
|
return {
|
|
2502
2477
|
apiKey: n.apiKey,
|
|
2503
2478
|
model: n.model,
|
|
2504
|
-
content: await
|
|
2479
|
+
content: await q(n)
|
|
2505
2480
|
};
|
|
2506
2481
|
};
|
|
2507
2482
|
export {
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2483
|
+
ke as A,
|
|
2484
|
+
K as B,
|
|
2485
|
+
Pe as C,
|
|
2511
2486
|
qn as D,
|
|
2512
2487
|
eo as E,
|
|
2513
2488
|
Qn as R,
|
|
@@ -2517,7 +2492,7 @@ export {
|
|
|
2517
2492
|
Un as a,
|
|
2518
2493
|
Mn as b,
|
|
2519
2494
|
Dn as c,
|
|
2520
|
-
|
|
2495
|
+
x as d,
|
|
2521
2496
|
L as e,
|
|
2522
2497
|
zn as f,
|
|
2523
2498
|
ut as g,
|
|
@@ -2527,7 +2502,7 @@ export {
|
|
|
2527
2502
|
$ as k,
|
|
2528
2503
|
k as l,
|
|
2529
2504
|
jn as m,
|
|
2530
|
-
|
|
2505
|
+
q as n,
|
|
2531
2506
|
nn as o,
|
|
2532
2507
|
Xt as p,
|
|
2533
2508
|
Xn as q,
|
|
@@ -2537,7 +2512,7 @@ export {
|
|
|
2537
2512
|
Tn as u,
|
|
2538
2513
|
Zn as v,
|
|
2539
2514
|
dn as w,
|
|
2540
|
-
|
|
2515
|
+
we as x,
|
|
2541
2516
|
Hn as y,
|
|
2542
2517
|
Kn as z
|
|
2543
2518
|
};
|