@builder.io/sdk-react-nextjs 0.14.19 → 0.14.21
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-a0af5379.cjs → USE_CLIENT_BUNDLE-421209ac.cjs} +1 -1
- package/lib/{node/USE_CLIENT_BUNDLE-e4c15aa7.js → browser/USE_CLIENT_BUNDLE-85cd491c.js} +2 -2
- package/lib/{edge/USE_SERVER_BUNDLE-7acc7eaf.cjs → browser/USE_SERVER_BUNDLE-7f959896.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-90c6ce15.js → browser/USE_SERVER_BUNDLE-c44b1000.js} +1 -1
- package/lib/browser/{bundle-9732e1d3.cjs → bundle-1e8b30d0.cjs} +20 -20
- package/lib/browser/{bundle-edd2e835.js → bundle-8e752d91.js} +302 -295
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-8a32af0d.cjs → edge/USE_CLIENT_BUNDLE-1d5cd7a9.cjs} +1 -1
- package/lib/{browser/USE_CLIENT_BUNDLE-b63f19ab.js → edge/USE_CLIENT_BUNDLE-e965200b.js} +2 -2
- package/lib/{node/USE_SERVER_BUNDLE-d6552b77.cjs → edge/USE_SERVER_BUNDLE-53f11a34.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-4fd50e3b.js → edge/USE_SERVER_BUNDLE-81678d13.js} +1 -1
- package/lib/edge/{bundle-af88805d.cjs → bundle-4d349481.cjs} +28 -28
- package/lib/edge/{bundle-e86f8464.js → bundle-ad170624.js} +500 -493
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-8bf08d5b.js → node/USE_CLIENT_BUNDLE-14685e18.js} +2 -2
- package/lib/{edge/USE_CLIENT_BUNDLE-0a51f6af.cjs → node/USE_CLIENT_BUNDLE-80d049f9.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-c0e4ee23.cjs → node/USE_SERVER_BUNDLE-c11df0b0.cjs} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-60e66f1c.js → node/USE_SERVER_BUNDLE-c93447b3.js} +1 -1
- package/lib/node/{bundle-1280dc1a.js → bundle-5c7927a4.js} +46 -39
- package/lib/node/{bundle-23855e1a.cjs → bundle-8a453488.cjs} +6 -6
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/helpers/flatten.d.ts +10 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/helpers/flatten.d.ts +10 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l, Fragment as C, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { LRUCache as
|
|
4
|
-
import { I as
|
|
3
|
+
import { LRUCache as Fe } from "lru-cache";
|
|
4
|
+
import { I as Le, B as Ue, a as De, D as _e, C as Me, E as je, b as He, V as Ke, c as ze, F as qe, d as Ye, S as Ge, e as Je } from "./USE_CLIENT_BUNDLE-85cd491c.js";
|
|
5
5
|
import "next/navigation";
|
|
6
|
-
const
|
|
6
|
+
const Qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), po = (e) => typeof e == "string" && Qe.has(e.toLowerCase()), T = "rsc", M = () => {
|
|
7
7
|
switch (T) {
|
|
8
8
|
case "react":
|
|
9
9
|
case "reactNative":
|
|
@@ -17,7 +17,7 @@ const Je = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr",
|
|
|
17
17
|
return "class";
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function Xe(e) {
|
|
21
21
|
var t;
|
|
22
22
|
return {
|
|
23
23
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -37,27 +37,27 @@ const A = "[Builder.io]: ", w = {
|
|
|
37
37
|
function k() {
|
|
38
38
|
return typeof window < "u" && typeof document < "u";
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const Ze = (e) => {
|
|
41
41
|
const t = {};
|
|
42
42
|
return e.forEach((n, o) => {
|
|
43
43
|
t[o] = n;
|
|
44
44
|
}), t;
|
|
45
|
-
}, de = (e) => e instanceof URLSearchParams ?
|
|
46
|
-
function
|
|
45
|
+
}, de = (e) => e instanceof URLSearchParams ? Ze(e) : e, ue = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
|
|
46
|
+
function et() {
|
|
47
47
|
return k() && window.self !== window.top;
|
|
48
48
|
}
|
|
49
49
|
function me(e) {
|
|
50
|
-
return
|
|
50
|
+
return et() && // accessing window.location.search is safe here because `isIframe()` is only `true` if we're in a browser.
|
|
51
51
|
ue(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
53
|
+
const tt = () => {
|
|
54
54
|
if (k()) {
|
|
55
55
|
const e = new URL(location.href);
|
|
56
56
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
57
57
|
} else
|
|
58
58
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
59
|
-
},
|
|
60
|
-
const e =
|
|
59
|
+
}, nt = () => typeof navigator == "object" && navigator.userAgent || "", fe = () => {
|
|
60
|
+
const e = nt(), t = {
|
|
61
61
|
Android() {
|
|
62
62
|
return e.match(/Android/i);
|
|
63
63
|
},
|
|
@@ -76,13 +76,13 @@ const et = () => {
|
|
|
76
76
|
any() {
|
|
77
77
|
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || T === "reactNative";
|
|
78
78
|
}
|
|
79
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
79
|
+
}, n = e.match(/Tablet|iPad/i), o = tt();
|
|
80
80
|
return {
|
|
81
81
|
urlPath: o == null ? void 0 : o.pathname,
|
|
82
82
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
83
83
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
84
84
|
};
|
|
85
|
-
},
|
|
85
|
+
}, ot = ({
|
|
86
86
|
builder: e,
|
|
87
87
|
context: t,
|
|
88
88
|
event: n,
|
|
@@ -94,12 +94,12 @@ const et = () => {
|
|
|
94
94
|
builder: e,
|
|
95
95
|
context: t,
|
|
96
96
|
event: n
|
|
97
|
-
}),
|
|
97
|
+
}), it = () => ({
|
|
98
98
|
isEditing: me(),
|
|
99
99
|
isBrowser: k(),
|
|
100
100
|
isServer: !k(),
|
|
101
101
|
getUserAttributes: () => fe()
|
|
102
|
-
}),
|
|
102
|
+
}), rt = (e, {
|
|
103
103
|
isExpression: t = !0
|
|
104
104
|
}) => /* 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, J = ({
|
|
105
105
|
code: e,
|
|
@@ -110,7 +110,7 @@ const et = () => {
|
|
|
110
110
|
rootSetState: r,
|
|
111
111
|
rootState: a
|
|
112
112
|
}) => {
|
|
113
|
-
const s =
|
|
113
|
+
const s = ot({
|
|
114
114
|
builder: t,
|
|
115
115
|
context: n,
|
|
116
116
|
event: o,
|
|
@@ -148,17 +148,17 @@ function he({
|
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
const I = (e) => e != null;
|
|
151
|
-
function
|
|
151
|
+
function at() {
|
|
152
152
|
var e;
|
|
153
153
|
return typeof process < "u" && I((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const st = () => {
|
|
156
156
|
var o;
|
|
157
|
-
if (!
|
|
157
|
+
if (!at())
|
|
158
158
|
return !1;
|
|
159
159
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
160
160
|
return e && t && !n ? (w.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
161
|
-
},
|
|
161
|
+
}, ct = (e) => (k() || st(), J(e)), j = class P {
|
|
162
162
|
static getCacheKey(t) {
|
|
163
163
|
return JSON.stringify({
|
|
164
164
|
...t,
|
|
@@ -192,10 +192,10 @@ function H({
|
|
|
192
192
|
if (e === "")
|
|
193
193
|
return;
|
|
194
194
|
const c = {
|
|
195
|
-
code:
|
|
195
|
+
code: rt(e, {
|
|
196
196
|
isExpression: a
|
|
197
197
|
}),
|
|
198
|
-
builder:
|
|
198
|
+
builder: it(),
|
|
199
199
|
context: t,
|
|
200
200
|
event: r,
|
|
201
201
|
rootSetState: i,
|
|
@@ -208,7 +208,7 @@ function H({
|
|
|
208
208
|
return h.value;
|
|
209
209
|
}
|
|
210
210
|
try {
|
|
211
|
-
const u =
|
|
211
|
+
const u = ct(c);
|
|
212
212
|
if (s) {
|
|
213
213
|
const h = V.getCacheKey(c);
|
|
214
214
|
V.setCachedValue(h, u);
|
|
@@ -221,13 +221,13 @@ function H({
|
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
const O = (e) => JSON.parse(JSON.stringify(e)),
|
|
224
|
+
const O = (e) => JSON.parse(JSON.stringify(e)), lt = (e, t, n) => {
|
|
225
225
|
if (Object(e) !== e)
|
|
226
226
|
return e;
|
|
227
227
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
228
228
|
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;
|
|
229
229
|
};
|
|
230
|
-
const
|
|
230
|
+
const dt = ({
|
|
231
231
|
block: e,
|
|
232
232
|
context: t,
|
|
233
233
|
localState: n,
|
|
@@ -254,11 +254,11 @@ const lt = ({
|
|
|
254
254
|
context: t,
|
|
255
255
|
enableCache: !0
|
|
256
256
|
});
|
|
257
|
-
|
|
257
|
+
lt(a, s, u);
|
|
258
258
|
}
|
|
259
259
|
return a;
|
|
260
260
|
};
|
|
261
|
-
function
|
|
261
|
+
function $({
|
|
262
262
|
block: e,
|
|
263
263
|
context: t,
|
|
264
264
|
shouldEvaluateBindings: n,
|
|
@@ -267,7 +267,7 @@ function N({
|
|
|
267
267
|
rootSetState: r
|
|
268
268
|
}) {
|
|
269
269
|
const a = e;
|
|
270
|
-
return n ?
|
|
270
|
+
return n ? dt({
|
|
271
271
|
block: a,
|
|
272
272
|
localState: o,
|
|
273
273
|
rootState: i,
|
|
@@ -275,31 +275,31 @@ function N({
|
|
|
275
275
|
context: t
|
|
276
276
|
}) : a;
|
|
277
277
|
}
|
|
278
|
-
const
|
|
278
|
+
const ut = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), pe = (e) => Object.entries(e).map(([n, o]) => {
|
|
279
279
|
if (typeof o == "string")
|
|
280
|
-
return `${
|
|
281
|
-
}).filter(I),
|
|
280
|
+
return `${ut(n)}: ${o};`;
|
|
281
|
+
}).filter(I), mt = (e) => pe(e).join(`
|
|
282
282
|
`), B = ({
|
|
283
283
|
mediaQuery: e,
|
|
284
284
|
className: t,
|
|
285
285
|
styles: n
|
|
286
286
|
}) => {
|
|
287
287
|
const o = `.${t} {
|
|
288
|
-
${
|
|
288
|
+
${mt(n)}
|
|
289
289
|
}`;
|
|
290
290
|
return e ? `${e} {
|
|
291
291
|
${o}
|
|
292
292
|
}` : o;
|
|
293
293
|
};
|
|
294
|
-
function
|
|
294
|
+
function ft({
|
|
295
295
|
style: e
|
|
296
296
|
}) {
|
|
297
297
|
return e;
|
|
298
298
|
}
|
|
299
|
-
const
|
|
299
|
+
const ht = ({
|
|
300
300
|
block: e,
|
|
301
301
|
context: t
|
|
302
|
-
}) => ge(
|
|
302
|
+
}) => ge(ft({
|
|
303
303
|
style: e.style || {},
|
|
304
304
|
context: t,
|
|
305
305
|
block: e
|
|
@@ -318,13 +318,13 @@ function ge(e) {
|
|
|
318
318
|
return e;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
const
|
|
321
|
+
const pt = ({
|
|
322
322
|
block: e,
|
|
323
323
|
context: t,
|
|
324
324
|
registeredComponents: n
|
|
325
325
|
}) => {
|
|
326
326
|
var r;
|
|
327
|
-
const o = (r =
|
|
327
|
+
const o = (r = $({
|
|
328
328
|
block: e,
|
|
329
329
|
localState: t.localState,
|
|
330
330
|
rootState: t.rootState,
|
|
@@ -340,7 +340,7 @@ const ht = ({
|
|
|
340
340
|
console.warn(`
|
|
341
341
|
Could not find a registered component named "${o}".
|
|
342
342
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
343
|
-
},
|
|
343
|
+
}, gt = ({
|
|
344
344
|
block: e,
|
|
345
345
|
context: t
|
|
346
346
|
}) => {
|
|
@@ -374,7 +374,7 @@ const ht = ({
|
|
|
374
374
|
},
|
|
375
375
|
block: o
|
|
376
376
|
}));
|
|
377
|
-
},
|
|
377
|
+
}, bt = (e) => e && (e.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e.name)), yt = (e) => e && (e.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(e.name)), be = {
|
|
378
378
|
small: {
|
|
379
379
|
min: 320,
|
|
380
380
|
default: 321,
|
|
@@ -417,7 +417,7 @@ const ht = ({
|
|
|
417
417
|
default: r + 1
|
|
418
418
|
}, n;
|
|
419
419
|
};
|
|
420
|
-
function
|
|
420
|
+
function N(e) {
|
|
421
421
|
return /* @__PURE__ */ l(
|
|
422
422
|
"style",
|
|
423
423
|
{
|
|
@@ -437,39 +437,39 @@ function X(e, ...t) {
|
|
|
437
437
|
return n;
|
|
438
438
|
}
|
|
439
439
|
const Se = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
440
|
-
function
|
|
440
|
+
function St(e) {
|
|
441
441
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
const n =
|
|
443
|
+
function vt(e, t) {
|
|
444
|
+
const n = kt(e), o = getComputedStyle(t), i = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, a = [i, r];
|
|
445
445
|
for (const s of a)
|
|
446
446
|
for (const c of n)
|
|
447
447
|
c in s || (s[c] = o[c]);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function kt(e) {
|
|
450
450
|
const t = [];
|
|
451
451
|
for (const n of e.steps)
|
|
452
452
|
for (const o in n.styles)
|
|
453
453
|
t.indexOf(o) === -1 && t.push(o);
|
|
454
454
|
return t;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function go(e) {
|
|
457
457
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
458
458
|
if (!t.length) {
|
|
459
|
-
|
|
459
|
+
St(e.elementId || e.id || "");
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
Array.from(t).forEach((n) => {
|
|
463
|
-
|
|
463
|
+
vt(e, n), n.style.transition = "none", n.style.transitionDelay = "0", X(n.style, e.steps[0].styles), setTimeout(() => {
|
|
464
464
|
n.style.transition = `all ${e.duration}s ${Se(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), X(n.style, e.steps[1].styles), setTimeout(() => {
|
|
465
465
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
466
466
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
467
467
|
});
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Ct(e) {
|
|
471
471
|
const t = function() {
|
|
472
|
-
const i =
|
|
472
|
+
const i = $({
|
|
473
473
|
block: e.block,
|
|
474
474
|
localState: e.context.localState,
|
|
475
475
|
rootState: e.context.rootState,
|
|
@@ -480,7 +480,7 @@ function kt(e) {
|
|
|
480
480
|
return I(i.hide) ? !i.hide : I(i.show) ? i.show : !0;
|
|
481
481
|
}, n = function() {
|
|
482
482
|
var m, p, y;
|
|
483
|
-
const i =
|
|
483
|
+
const i = $({
|
|
484
484
|
block: e.block,
|
|
485
485
|
localState: e.context.localState,
|
|
486
486
|
rootState: e.context.rootState,
|
|
@@ -531,12 +531,12 @@ function kt(e) {
|
|
|
531
531
|
E
|
|
532
532
|
].join(" ");
|
|
533
533
|
};
|
|
534
|
-
return /* @__PURE__ */ l(C, { children: n() && t() ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
534
|
+
return /* @__PURE__ */ l(C, { children: n() && t() ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(N, { id: "builderio-block", styles: n() }) }) : null });
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function xt(e) {
|
|
537
537
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
538
538
|
}
|
|
539
|
-
const
|
|
539
|
+
const wt = (e) => `on${xt(e)}`, It = (e, t) => (n) => H({
|
|
540
540
|
code: e,
|
|
541
541
|
context: t.context,
|
|
542
542
|
localState: t.localState,
|
|
@@ -546,13 +546,13 @@ const xt = (e) => `on${Ct(e)}`, wt = (e, t) => (n) => H({
|
|
|
546
546
|
isExpression: !1,
|
|
547
547
|
enableCache: !0
|
|
548
548
|
});
|
|
549
|
-
function
|
|
549
|
+
function bo(e) {
|
|
550
550
|
const t = {}, n = e.block.actions ?? {};
|
|
551
551
|
for (const o in n) {
|
|
552
552
|
if (!n.hasOwnProperty(o))
|
|
553
553
|
continue;
|
|
554
554
|
const i = n[o];
|
|
555
|
-
let r =
|
|
555
|
+
let r = wt(o);
|
|
556
556
|
if (e.stripPrefix)
|
|
557
557
|
switch (T) {
|
|
558
558
|
case "vue":
|
|
@@ -562,40 +562,40 @@ function go(e) {
|
|
|
562
562
|
r = r.replace("on:", "");
|
|
563
563
|
break;
|
|
564
564
|
}
|
|
565
|
-
t[r] =
|
|
565
|
+
t[r] = It(i, e);
|
|
566
566
|
}
|
|
567
567
|
return t;
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Tt({
|
|
570
570
|
properties: e
|
|
571
571
|
}) {
|
|
572
572
|
return e;
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const Et = (e) => ({
|
|
575
575
|
href: e.href
|
|
576
576
|
});
|
|
577
|
-
function
|
|
577
|
+
function Rt({
|
|
578
578
|
block: e,
|
|
579
579
|
context: t
|
|
580
580
|
}) {
|
|
581
581
|
var o;
|
|
582
582
|
const n = {
|
|
583
|
-
...
|
|
583
|
+
...Et(e),
|
|
584
584
|
...e.properties,
|
|
585
585
|
"builder-id": e.id,
|
|
586
|
-
style:
|
|
586
|
+
style: ht({
|
|
587
587
|
block: e,
|
|
588
588
|
context: t
|
|
589
589
|
}),
|
|
590
590
|
[M()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
591
591
|
};
|
|
592
|
-
return
|
|
592
|
+
return Tt({
|
|
593
593
|
properties: n,
|
|
594
594
|
context: t,
|
|
595
595
|
block: e
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
const
|
|
598
|
+
const Pt = ({
|
|
599
599
|
componentOptions: e,
|
|
600
600
|
builderBlock: t,
|
|
601
601
|
context: n,
|
|
@@ -611,7 +611,7 @@ const Rt = ({
|
|
|
611
611
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
612
612
|
*/
|
|
613
613
|
...i ? {
|
|
614
|
-
attributes:
|
|
614
|
+
attributes: Rt({
|
|
615
615
|
block: t,
|
|
616
616
|
context: a
|
|
617
617
|
})
|
|
@@ -627,11 +627,11 @@ const Rt = ({
|
|
|
627
627
|
};
|
|
628
628
|
function Z(e) {
|
|
629
629
|
var n;
|
|
630
|
-
const t = e.isInteractive ?
|
|
630
|
+
const t = e.isInteractive ? Le : e.componentRef;
|
|
631
631
|
return /* @__PURE__ */ l(C, { children: e.componentRef ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
632
632
|
t,
|
|
633
633
|
{
|
|
634
|
-
...
|
|
634
|
+
...Pt({
|
|
635
635
|
componentOptions: e.componentOptions,
|
|
636
636
|
builderBlock: e.builderBlock,
|
|
637
637
|
context: e.context,
|
|
@@ -642,7 +642,7 @@ function Z(e) {
|
|
|
642
642
|
contextValue: e.context
|
|
643
643
|
}),
|
|
644
644
|
children: (n = e.blockChildren) == null ? void 0 : n.map((o) => /* @__PURE__ */ l(
|
|
645
|
-
|
|
645
|
+
F,
|
|
646
646
|
{
|
|
647
647
|
block: o,
|
|
648
648
|
context: e.context,
|
|
@@ -654,10 +654,10 @@ function Z(e) {
|
|
|
654
654
|
}
|
|
655
655
|
) }) : null });
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function At(e) {
|
|
658
658
|
const t = e.repeatContext;
|
|
659
659
|
return /* @__PURE__ */ l(
|
|
660
|
-
|
|
660
|
+
F,
|
|
661
661
|
{
|
|
662
662
|
block: e.block,
|
|
663
663
|
context: t,
|
|
@@ -666,22 +666,22 @@ function Pt(e) {
|
|
|
666
666
|
}
|
|
667
667
|
);
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function F(e) {
|
|
670
670
|
var c, u, h;
|
|
671
671
|
const t = function() {
|
|
672
|
-
return
|
|
672
|
+
return pt({
|
|
673
673
|
block: e.block,
|
|
674
674
|
context: e.context,
|
|
675
675
|
registeredComponents: e.registeredComponents
|
|
676
676
|
});
|
|
677
677
|
}, n = function() {
|
|
678
|
-
return
|
|
678
|
+
return gt({
|
|
679
679
|
block: e.block,
|
|
680
680
|
context: e.context
|
|
681
681
|
});
|
|
682
682
|
}, o = function() {
|
|
683
683
|
var f;
|
|
684
|
-
return (f = e.block.repeat) != null && f.collection ? e.block :
|
|
684
|
+
return (f = e.block.repeat) != null && f.collection ? e.block : $({
|
|
685
685
|
block: e.block,
|
|
686
686
|
localState: e.context.localState,
|
|
687
687
|
rootState: e.context.rootState,
|
|
@@ -707,12 +707,12 @@ function L(e) {
|
|
|
707
707
|
blockChildren: o().children ?? [],
|
|
708
708
|
componentRef: (f = t()) == null ? void 0 : f.component,
|
|
709
709
|
componentOptions: {
|
|
710
|
-
...
|
|
710
|
+
...Xe(o()),
|
|
711
711
|
builderContext: e.context,
|
|
712
|
-
...
|
|
712
|
+
...bt(t()) ? {
|
|
713
713
|
builderLinkComponent: e.linkComponent
|
|
714
714
|
} : {},
|
|
715
|
-
...
|
|
715
|
+
...yt(t()) ? {
|
|
716
716
|
builderComponents: e.registeredComponents
|
|
717
717
|
} : {}
|
|
718
718
|
},
|
|
@@ -725,7 +725,7 @@ function L(e) {
|
|
|
725
725
|
};
|
|
726
726
|
};
|
|
727
727
|
return /* @__PURE__ */ l(C, { children: r() ? /* @__PURE__ */ R(C, { children: [
|
|
728
|
-
/* @__PURE__ */ l(
|
|
728
|
+
/* @__PURE__ */ l(Ct, { block: e.block, context: e.context }),
|
|
729
729
|
(c = t()) != null && c.noWrap ? /* @__PURE__ */ l(C, { children: /* @__PURE__ */ l(
|
|
730
730
|
Z,
|
|
731
731
|
{
|
|
@@ -740,7 +740,7 @@ function L(e) {
|
|
|
740
740
|
isInteractive: s().isInteractive
|
|
741
741
|
}
|
|
742
742
|
) }) : /* @__PURE__ */ l(C, { children: n() ? /* @__PURE__ */ l(C, { children: (h = n()) == null ? void 0 : h.map((d, f) => /* @__PURE__ */ l(
|
|
743
|
-
|
|
743
|
+
At,
|
|
744
744
|
{
|
|
745
745
|
repeatContext: d.context,
|
|
746
746
|
block: d.block,
|
|
@@ -749,7 +749,7 @@ function L(e) {
|
|
|
749
749
|
},
|
|
750
750
|
f
|
|
751
751
|
)) }) : /* @__PURE__ */ R(
|
|
752
|
-
|
|
752
|
+
Ue,
|
|
753
753
|
{
|
|
754
754
|
Wrapper: i(),
|
|
755
755
|
block: o(),
|
|
@@ -771,7 +771,7 @@ function L(e) {
|
|
|
771
771
|
}
|
|
772
772
|
),
|
|
773
773
|
(u = a()) == null ? void 0 : u.map((d) => /* @__PURE__ */ l(
|
|
774
|
-
|
|
774
|
+
F,
|
|
775
775
|
{
|
|
776
776
|
block: d,
|
|
777
777
|
registeredComponents: e.registeredComponents,
|
|
@@ -788,7 +788,7 @@ function L(e) {
|
|
|
788
788
|
function K(e) {
|
|
789
789
|
var t, n, o;
|
|
790
790
|
return /* @__PURE__ */ l(
|
|
791
|
-
|
|
791
|
+
De,
|
|
792
792
|
{
|
|
793
793
|
blocks: e.blocks,
|
|
794
794
|
parent: e.parent,
|
|
@@ -797,7 +797,7 @@ function K(e) {
|
|
|
797
797
|
BlocksWrapper: (t = e.context) == null ? void 0 : t.BlocksWrapper,
|
|
798
798
|
BlocksWrapperProps: (n = e.context) == null ? void 0 : n.BlocksWrapperProps,
|
|
799
799
|
children: e.blocks ? /* @__PURE__ */ l(C, { children: (o = e.blocks) == null ? void 0 : o.map((i) => /* @__PURE__ */ l(
|
|
800
|
-
|
|
800
|
+
F,
|
|
801
801
|
{
|
|
802
802
|
block: i,
|
|
803
803
|
linkComponent: e.linkComponent,
|
|
@@ -809,8 +809,8 @@ function K(e) {
|
|
|
809
809
|
}
|
|
810
810
|
);
|
|
811
811
|
}
|
|
812
|
-
const
|
|
813
|
-
function
|
|
812
|
+
const Vt = (e) => `builder-columns ${e}-breakpoints`;
|
|
813
|
+
function Bt(e) {
|
|
814
814
|
var b, E;
|
|
815
815
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(p) {
|
|
816
816
|
return p.link ? e.builderLinkComponent || "a" : "div";
|
|
@@ -909,12 +909,12 @@ function Vt(e) {
|
|
|
909
909
|
/* @__PURE__ */ R(
|
|
910
910
|
"div",
|
|
911
911
|
{
|
|
912
|
-
className:
|
|
912
|
+
className: Vt((b = e.builderBlock) == null ? void 0 : b.id) + " div-2651dce4",
|
|
913
913
|
style: h(),
|
|
914
914
|
children: [
|
|
915
|
-
/* @__PURE__ */ l(
|
|
915
|
+
/* @__PURE__ */ l(N, { id: "builderio-columns", styles: g() }),
|
|
916
916
|
(E = e.columns) == null ? void 0 : E.map((m, p) => /* @__PURE__ */ l(
|
|
917
|
-
|
|
917
|
+
_e,
|
|
918
918
|
{
|
|
919
919
|
TagName: i(m),
|
|
920
920
|
actionAttributes: {},
|
|
@@ -948,11 +948,11 @@ function Vt(e) {
|
|
|
948
948
|
function ee(e) {
|
|
949
949
|
return e.replace(/http(s)?:/, "");
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Wt(e = "", t, n) {
|
|
952
952
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
953
953
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + i + t + "=" + encodeURIComponent(n);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function $t(e, t) {
|
|
956
956
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
957
957
|
return e;
|
|
958
958
|
if (t === "master")
|
|
@@ -964,18 +964,18 @@ function Wt(e, t) {
|
|
|
964
964
|
}
|
|
965
965
|
return null;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function yo(e) {
|
|
968
968
|
if (!e)
|
|
969
969
|
return e;
|
|
970
970
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
971
971
|
if (e.match(/builder\.io/)) {
|
|
972
972
|
let n = e;
|
|
973
973
|
const o = Number(e.split("?width=")[1]);
|
|
974
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${
|
|
974
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((i) => i !== o).map((i) => `${Wt(e, "width", i)} ${i}w`).concat([n]).join(", ");
|
|
975
975
|
}
|
|
976
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
976
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [$t(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
977
977
|
}
|
|
978
|
-
const
|
|
978
|
+
const Ot = (e) => {
|
|
979
979
|
if (e === "localhost" || e === "127.0.0.1")
|
|
980
980
|
return e;
|
|
981
981
|
const t = e.split(".");
|
|
@@ -991,12 +991,12 @@ const $t = (e) => {
|
|
|
991
991
|
w.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
992
992
|
return;
|
|
993
993
|
}
|
|
994
|
-
}, ke = async (e) => ve(e), Nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "),
|
|
994
|
+
}, ke = async (e) => ve(e), Nt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), Ft = [["secure", ""], ["SameSite", "None"]], Lt = ({
|
|
995
995
|
name: e,
|
|
996
996
|
value: t,
|
|
997
997
|
expires: n
|
|
998
998
|
}) => {
|
|
999
|
-
const i = (k() ? location.protocol === "https:" : !0) ?
|
|
999
|
+
const i = (k() ? location.protocol === "https:" : !0) ? Ft : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", Ot(window.location.hostname)], ...i];
|
|
1000
1000
|
return Nt(a);
|
|
1001
1001
|
}, Ce = async ({
|
|
1002
1002
|
name: e,
|
|
@@ -1007,7 +1007,7 @@ const $t = (e) => {
|
|
|
1007
1007
|
try {
|
|
1008
1008
|
if (!o)
|
|
1009
1009
|
return;
|
|
1010
|
-
const i =
|
|
1010
|
+
const i = Lt({
|
|
1011
1011
|
name: e,
|
|
1012
1012
|
value: t,
|
|
1013
1013
|
expires: n
|
|
@@ -1016,24 +1016,24 @@ const $t = (e) => {
|
|
|
1016
1016
|
} catch (i) {
|
|
1017
1017
|
w.warn("[COOKIE] SET error: ", (i == null ? void 0 : i.message) || i);
|
|
1018
1018
|
}
|
|
1019
|
-
},
|
|
1019
|
+
}, Ut = "builder.tests", z = (e) => `${Ut}.${e}`, Dt = ({
|
|
1020
1020
|
contentId: e
|
|
1021
1021
|
}) => ke({
|
|
1022
1022
|
name: z(e),
|
|
1023
1023
|
canTrack: !0
|
|
1024
|
-
}),
|
|
1024
|
+
}), _t = ({
|
|
1025
1025
|
contentId: e
|
|
1026
1026
|
}) => ve({
|
|
1027
1027
|
name: z(e),
|
|
1028
1028
|
canTrack: !0
|
|
1029
|
-
}),
|
|
1029
|
+
}), Mt = ({
|
|
1030
1030
|
contentId: e,
|
|
1031
1031
|
value: t
|
|
1032
1032
|
}) => Ce({
|
|
1033
1033
|
name: z(e),
|
|
1034
1034
|
value: t,
|
|
1035
1035
|
canTrack: !0
|
|
1036
|
-
}), xe = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0,
|
|
1036
|
+
}), xe = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, jt = ({
|
|
1037
1037
|
id: e,
|
|
1038
1038
|
variations: t
|
|
1039
1039
|
}) => {
|
|
@@ -1047,8 +1047,8 @@ const $t = (e) => {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return e;
|
|
1049
1049
|
}, we = (e) => {
|
|
1050
|
-
const t =
|
|
1051
|
-
return
|
|
1050
|
+
const t = jt(e);
|
|
1051
|
+
return Mt({
|
|
1052
1052
|
contentId: e.id,
|
|
1053
1053
|
value: t
|
|
1054
1054
|
}).catch((n) => {
|
|
@@ -1068,7 +1068,7 @@ const $t = (e) => {
|
|
|
1068
1068
|
testVariationId: n.id,
|
|
1069
1069
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1070
1070
|
};
|
|
1071
|
-
},
|
|
1071
|
+
}, Ht = ({
|
|
1072
1072
|
item: e,
|
|
1073
1073
|
canTrack: t
|
|
1074
1074
|
}) => {
|
|
@@ -1078,7 +1078,7 @@ const $t = (e) => {
|
|
|
1078
1078
|
return;
|
|
1079
1079
|
if (!xe(e))
|
|
1080
1080
|
return e;
|
|
1081
|
-
const n =
|
|
1081
|
+
const n = _t({
|
|
1082
1082
|
contentId: e.id
|
|
1083
1083
|
}) || we({
|
|
1084
1084
|
variations: e.variations,
|
|
@@ -1091,13 +1091,13 @@ const $t = (e) => {
|
|
|
1091
1091
|
...e,
|
|
1092
1092
|
...o
|
|
1093
1093
|
};
|
|
1094
|
-
},
|
|
1094
|
+
}, Kt = async ({
|
|
1095
1095
|
item: e,
|
|
1096
1096
|
canTrack: t
|
|
1097
1097
|
}) => {
|
|
1098
1098
|
if (!t || !xe(e))
|
|
1099
1099
|
return e;
|
|
1100
|
-
const o = await
|
|
1100
|
+
const o = await Dt({
|
|
1101
1101
|
contentId: e.id
|
|
1102
1102
|
}) || we({
|
|
1103
1103
|
variations: e.variations,
|
|
@@ -1110,7 +1110,7 @@ const $t = (e) => {
|
|
|
1110
1110
|
...e,
|
|
1111
1111
|
...i
|
|
1112
1112
|
};
|
|
1113
|
-
},
|
|
1113
|
+
}, L = (e) => I(e) ? e : !0, zt = {
|
|
1114
1114
|
name: "Core:Button",
|
|
1115
1115
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1116
1116
|
defaultStyles: {
|
|
@@ -1143,7 +1143,7 @@ const $t = (e) => {
|
|
|
1143
1143
|
}],
|
|
1144
1144
|
static: !0,
|
|
1145
1145
|
noWrap: !0
|
|
1146
|
-
},
|
|
1146
|
+
}, qt = {
|
|
1147
1147
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1148
1148
|
name: "Columns",
|
|
1149
1149
|
isRSC: !0,
|
|
@@ -1344,13 +1344,13 @@ const $t = (e) => {
|
|
|
1344
1344
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1345
1345
|
advanced: !0
|
|
1346
1346
|
}]
|
|
1347
|
-
},
|
|
1347
|
+
}, Yt = {
|
|
1348
1348
|
name: "Fragment",
|
|
1349
1349
|
static: !0,
|
|
1350
1350
|
hidden: !0,
|
|
1351
1351
|
canHaveChildren: !0,
|
|
1352
1352
|
noWrap: !0
|
|
1353
|
-
},
|
|
1353
|
+
}, Gt = {
|
|
1354
1354
|
name: "Image",
|
|
1355
1355
|
static: !0,
|
|
1356
1356
|
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",
|
|
@@ -1450,7 +1450,7 @@ const $t = (e) => {
|
|
|
1450
1450
|
advanced: !0,
|
|
1451
1451
|
defaultValue: 0.7041
|
|
1452
1452
|
}]
|
|
1453
|
-
},
|
|
1453
|
+
}, Jt = {
|
|
1454
1454
|
name: "Core:Section",
|
|
1455
1455
|
static: !0,
|
|
1456
1456
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1489,7 +1489,7 @@ const $t = (e) => {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
}]
|
|
1492
|
-
},
|
|
1492
|
+
}, Qt = {
|
|
1493
1493
|
name: "Slot",
|
|
1494
1494
|
isRSC: !0,
|
|
1495
1495
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1503,7 +1503,7 @@ const $t = (e) => {
|
|
|
1503
1503
|
defaultValue: "children"
|
|
1504
1504
|
}]
|
|
1505
1505
|
};
|
|
1506
|
-
function
|
|
1506
|
+
function Xt(e) {
|
|
1507
1507
|
var t, n, o;
|
|
1508
1508
|
return /* @__PURE__ */ l(
|
|
1509
1509
|
"div",
|
|
@@ -1526,7 +1526,7 @@ function Qt(e) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
);
|
|
1528
1528
|
}
|
|
1529
|
-
const
|
|
1529
|
+
const Zt = {
|
|
1530
1530
|
name: "Symbol",
|
|
1531
1531
|
noWrap: !0,
|
|
1532
1532
|
static: !0,
|
|
@@ -1559,7 +1559,7 @@ const Xt = {
|
|
|
1559
1559
|
hideFromUI: !0,
|
|
1560
1560
|
type: "boolean"
|
|
1561
1561
|
}]
|
|
1562
|
-
},
|
|
1562
|
+
}, en = {
|
|
1563
1563
|
name: "Text",
|
|
1564
1564
|
static: !0,
|
|
1565
1565
|
isRSC: !0,
|
|
@@ -1578,7 +1578,7 @@ const Xt = {
|
|
|
1578
1578
|
textAlign: "center"
|
|
1579
1579
|
}
|
|
1580
1580
|
};
|
|
1581
|
-
function
|
|
1581
|
+
function tn(e) {
|
|
1582
1582
|
var t;
|
|
1583
1583
|
return /* @__PURE__ */ l(
|
|
1584
1584
|
"div",
|
|
@@ -1591,7 +1591,7 @@ function en(e) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
);
|
|
1593
1593
|
}
|
|
1594
|
-
const
|
|
1594
|
+
const nn = {
|
|
1595
1595
|
name: "Custom Code",
|
|
1596
1596
|
static: !0,
|
|
1597
1597
|
requiredPermissions: ["editCode"],
|
|
@@ -1613,7 +1613,7 @@ const tn = {
|
|
|
1613
1613
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1614
1614
|
advanced: !0
|
|
1615
1615
|
}]
|
|
1616
|
-
},
|
|
1616
|
+
}, on = {
|
|
1617
1617
|
name: "Embed",
|
|
1618
1618
|
static: !0,
|
|
1619
1619
|
inputs: [{
|
|
@@ -1638,7 +1638,7 @@ const tn = {
|
|
|
1638
1638
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1639
1639
|
hideFromUI: !0
|
|
1640
1640
|
}]
|
|
1641
|
-
},
|
|
1641
|
+
}, rn = ["text/javascript", "application/javascript", "application/ecmascript"], So = (e) => rn.includes(e.type), an = {
|
|
1642
1642
|
// friendlyName?
|
|
1643
1643
|
name: "Raw:Img",
|
|
1644
1644
|
hideFromInsertMenu: !0,
|
|
@@ -1652,7 +1652,7 @@ const tn = {
|
|
|
1652
1652
|
}],
|
|
1653
1653
|
noWrap: !0,
|
|
1654
1654
|
static: !0
|
|
1655
|
-
},
|
|
1655
|
+
}, sn = {
|
|
1656
1656
|
name: "Video",
|
|
1657
1657
|
canHaveChildren: !0,
|
|
1658
1658
|
defaultStyles: {
|
|
@@ -1733,26 +1733,23 @@ const tn = {
|
|
|
1733
1733
|
defaultValue: !0,
|
|
1734
1734
|
advanced: !0
|
|
1735
1735
|
}]
|
|
1736
|
-
},
|
|
1737
|
-
component: _e,
|
|
1738
|
-
...tn
|
|
1739
|
-
}, {
|
|
1736
|
+
}, cn = () => [{
|
|
1740
1737
|
component: Me,
|
|
1741
1738
|
...nn
|
|
1742
1739
|
}, {
|
|
1743
1740
|
component: je,
|
|
1744
|
-
...
|
|
1741
|
+
...on
|
|
1745
1742
|
}, {
|
|
1746
1743
|
component: He,
|
|
1747
1744
|
...an
|
|
1748
|
-
}], te = () => [{
|
|
1749
|
-
component: Ke,
|
|
1750
|
-
...Kt
|
|
1751
1745
|
}, {
|
|
1752
|
-
component:
|
|
1746
|
+
component: Ke,
|
|
1747
|
+
...sn
|
|
1748
|
+
}], te = () => [{
|
|
1749
|
+
component: ze,
|
|
1753
1750
|
...zt
|
|
1754
1751
|
}, {
|
|
1755
|
-
component:
|
|
1752
|
+
component: Bt,
|
|
1756
1753
|
...qt
|
|
1757
1754
|
}, {
|
|
1758
1755
|
component: qe,
|
|
@@ -1761,30 +1758,33 @@ const tn = {
|
|
|
1761
1758
|
component: Ye,
|
|
1762
1759
|
...Gt
|
|
1763
1760
|
}, {
|
|
1764
|
-
component:
|
|
1761
|
+
component: Ge,
|
|
1765
1762
|
...Jt
|
|
1766
1763
|
}, {
|
|
1767
|
-
component:
|
|
1768
|
-
...
|
|
1764
|
+
component: Xt,
|
|
1765
|
+
...Qt
|
|
1769
1766
|
}, {
|
|
1770
|
-
component:
|
|
1767
|
+
component: ao,
|
|
1771
1768
|
...Zt
|
|
1772
|
-
},
|
|
1769
|
+
}, {
|
|
1770
|
+
component: tn,
|
|
1771
|
+
...en
|
|
1772
|
+
}, ...cn()], vo = (e) => ({
|
|
1773
1773
|
type: "builder.registerComponent",
|
|
1774
|
-
data:
|
|
1775
|
-
}),
|
|
1774
|
+
data: U(e)
|
|
1775
|
+
}), ln = (e) => {
|
|
1776
1776
|
const t = e.toString().trim();
|
|
1777
1777
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
1778
|
-
},
|
|
1778
|
+
}, dn = (e) => typeof e == "function" ? ln(e) : O(e), U = ({
|
|
1779
1779
|
inputs: e,
|
|
1780
1780
|
...t
|
|
1781
1781
|
}) => ({
|
|
1782
1782
|
...O(t),
|
|
1783
1783
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
|
|
1784
1784
|
...o,
|
|
1785
|
-
[i]:
|
|
1785
|
+
[i]: dn(r)
|
|
1786
1786
|
}), {}))
|
|
1787
|
-
}),
|
|
1787
|
+
}), un = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1788
1788
|
function getAndSetVariantId() {
|
|
1789
1789
|
function setCookie(name, value, days) {
|
|
1790
1790
|
let expires = '';
|
|
@@ -1840,7 +1840,7 @@ const tn = {
|
|
|
1840
1840
|
}).join('');
|
|
1841
1841
|
styleEl.innerHTML = newStyleStr;
|
|
1842
1842
|
}
|
|
1843
|
-
}`,
|
|
1843
|
+
}`, mn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1844
1844
|
if (!navigator.cookieEnabled) {
|
|
1845
1845
|
return;
|
|
1846
1846
|
}
|
|
@@ -1878,22 +1878,22 @@ const tn = {
|
|
|
1878
1878
|
...t,
|
|
1879
1879
|
testVariationId: t.id,
|
|
1880
1880
|
id: e == null ? void 0 : e.id
|
|
1881
|
-
})),
|
|
1881
|
+
})), fn = ({
|
|
1882
1882
|
canTrack: e,
|
|
1883
1883
|
content: t
|
|
1884
|
-
}) => !(!(W(t).length > 0) || !e || k()),
|
|
1885
|
-
window.${Te} = ${
|
|
1886
|
-
window.${Ee} = ${
|
|
1887
|
-
`,
|
|
1884
|
+
}) => !(!(W(t).length > 0) || !e || k()), hn = (e) => e === "react" || e === "reactNative", Re = hn(T), pn = () => `
|
|
1885
|
+
window.${Te} = ${un}
|
|
1886
|
+
window.${Ee} = ${mn}
|
|
1887
|
+
`, gn = (e, t) => `
|
|
1888
1888
|
window.${Te}(
|
|
1889
1889
|
"${t}",${JSON.stringify(e)}, ${Re}
|
|
1890
|
-
)`,
|
|
1890
|
+
)`, bn = ({
|
|
1891
1891
|
contentId: e,
|
|
1892
1892
|
variationId: t
|
|
1893
1893
|
}) => `window.${Ee}(
|
|
1894
1894
|
"${t}", "${e}", ${Re}
|
|
1895
1895
|
)`;
|
|
1896
|
-
function
|
|
1896
|
+
function D(e) {
|
|
1897
1897
|
return /* @__PURE__ */ l(
|
|
1898
1898
|
"script",
|
|
1899
1899
|
{
|
|
@@ -1902,60 +1902,67 @@ function _(e) {
|
|
|
1902
1902
|
}
|
|
1903
1903
|
);
|
|
1904
1904
|
}
|
|
1905
|
-
const
|
|
1905
|
+
const yn = (e) => {
|
|
1906
1906
|
const t = e.get("preview"), n = e.get("overrides." + t);
|
|
1907
1907
|
return n || w.warn("No previewed ID found in search params."), n;
|
|
1908
1908
|
};
|
|
1909
|
-
function
|
|
1910
|
-
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new
|
|
1909
|
+
function Sn() {
|
|
1910
|
+
globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Fe({
|
|
1911
1911
|
max: 500,
|
|
1912
1912
|
// how long to live in ms
|
|
1913
1913
|
ttl: 1e3 * 60 * 5
|
|
1914
1914
|
}));
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1917
|
-
|
|
1918
|
-
const t =
|
|
1916
|
+
function vn(e) {
|
|
1917
|
+
Sn();
|
|
1918
|
+
const t = yn(e);
|
|
1919
1919
|
return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function kn() {
|
|
1922
1922
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1925
|
-
const e =
|
|
1924
|
+
function Cn() {
|
|
1925
|
+
const e = kn().fetch;
|
|
1926
1926
|
if (typeof e > "u")
|
|
1927
1927
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1928
1928
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
1929
1929
|
return e;
|
|
1930
1930
|
}
|
|
1931
|
-
const
|
|
1932
|
-
function
|
|
1931
|
+
const xn = Cn();
|
|
1932
|
+
function _(e, t = null, n = ".") {
|
|
1933
1933
|
return Object.keys(e).reduce((o, i) => {
|
|
1934
1934
|
const r = e[i], a = [t, i].filter(Boolean).join(n);
|
|
1935
1935
|
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
1936
1936
|
...o,
|
|
1937
|
-
|
|
1937
|
+
..._(r, a, n)
|
|
1938
1938
|
} : {
|
|
1939
1939
|
...o,
|
|
1940
1940
|
[a]: r
|
|
1941
1941
|
};
|
|
1942
1942
|
}, {});
|
|
1943
1943
|
}
|
|
1944
|
-
|
|
1944
|
+
function Pe(e, t, n = {}) {
|
|
1945
|
+
for (const o in e) {
|
|
1946
|
+
const i = e[o], r = t ? t + "." + o : o;
|
|
1947
|
+
i && typeof i == "object" && !Array.isArray(i) && !Object.keys(i).find((a) => a.startsWith("$")) ? Pe(i, r, n) : n[r] = i;
|
|
1948
|
+
}
|
|
1949
|
+
return n;
|
|
1950
|
+
}
|
|
1951
|
+
const wn = "v3", ne = "builder.", In = "options.", Ae = (e) => {
|
|
1945
1952
|
if (!e)
|
|
1946
1953
|
return {};
|
|
1947
1954
|
const t = de(e), n = {};
|
|
1948
1955
|
return Object.keys(t).forEach((o) => {
|
|
1949
1956
|
if (o.startsWith(ne)) {
|
|
1950
|
-
const i = o.replace(ne, "").replace(
|
|
1957
|
+
const i = o.replace(ne, "").replace(In, "");
|
|
1951
1958
|
n[i] = t[o];
|
|
1952
1959
|
}
|
|
1953
1960
|
}), n;
|
|
1954
|
-
},
|
|
1961
|
+
}, Tn = () => {
|
|
1955
1962
|
if (!k())
|
|
1956
1963
|
return {};
|
|
1957
1964
|
const e = new URLSearchParams(window.location.search);
|
|
1958
|
-
return
|
|
1965
|
+
return Ae(e);
|
|
1959
1966
|
}, oe = (e) => typeof e == "number" && !isNaN(e) && e >= 0, q = (e) => {
|
|
1960
1967
|
const {
|
|
1961
1968
|
limit: t = 30,
|
|
@@ -1965,7 +1972,7 @@ const xn = "v3", ne = "builder.", wn = "options.", Pe = (e) => {
|
|
|
1965
1972
|
apiKey: r,
|
|
1966
1973
|
enrich: a,
|
|
1967
1974
|
locale: s,
|
|
1968
|
-
apiVersion: c =
|
|
1975
|
+
apiVersion: c = wn,
|
|
1969
1976
|
fields: u,
|
|
1970
1977
|
omit: h,
|
|
1971
1978
|
offset: d,
|
|
@@ -1980,43 +1987,43 @@ const xn = "v3", ne = "builder.", wn = "options.", Pe = (e) => {
|
|
|
1980
1987
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${c}'`);
|
|
1981
1988
|
const E = t !== 1, m = new URL(`https://cdn.builder.io/api/${c}/content/${i}`);
|
|
1982
1989
|
if (m.searchParams.set("apiKey", r), m.searchParams.set("limit", String(t)), m.searchParams.set("noTraverse", String(E)), m.searchParams.set("includeRefs", String(!0)), s && m.searchParams.set("locale", s), a && m.searchParams.set("enrich", String(a)), m.searchParams.set("omit", h || "meta.componentsUsed"), u && m.searchParams.set("fields", u), Number.isFinite(d) && d > -1 && m.searchParams.set("offset", String(Math.floor(d))), typeof b == "boolean" && m.searchParams.set("includeUnpublished", String(b)), f && oe(f) && m.searchParams.set("cacheSeconds", String(f)), g && oe(g) && m.searchParams.set("staleCacheSeconds", String(g)), v) {
|
|
1983
|
-
const S =
|
|
1990
|
+
const S = _({
|
|
1984
1991
|
sort: v
|
|
1985
1992
|
});
|
|
1986
1993
|
for (const x in S)
|
|
1987
1994
|
m.searchParams.set(x, JSON.stringify(S[x]));
|
|
1988
1995
|
}
|
|
1989
1996
|
const p = {
|
|
1990
|
-
...
|
|
1997
|
+
...Tn(),
|
|
1991
1998
|
...de(e.options || {})
|
|
1992
|
-
}, y =
|
|
1999
|
+
}, y = _(p);
|
|
1993
2000
|
for (const S in y)
|
|
1994
2001
|
m.searchParams.set(S, String(y[S]));
|
|
1995
2002
|
if (n && m.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
1996
|
-
const S =
|
|
2003
|
+
const S = Pe({
|
|
1997
2004
|
query: o
|
|
1998
2005
|
});
|
|
1999
2006
|
for (const x in S)
|
|
2000
2007
|
m.searchParams.set(x, JSON.stringify(S[x]));
|
|
2001
2008
|
}
|
|
2002
2009
|
return m;
|
|
2003
|
-
},
|
|
2004
|
-
async function
|
|
2005
|
-
const t = await
|
|
2010
|
+
}, En = (e) => "results" in e;
|
|
2011
|
+
async function Ve(e) {
|
|
2012
|
+
const t = await An({
|
|
2006
2013
|
...e,
|
|
2007
2014
|
limit: 1
|
|
2008
2015
|
});
|
|
2009
2016
|
return t && t[0] || null;
|
|
2010
2017
|
}
|
|
2011
|
-
const
|
|
2018
|
+
const Rn = async (e) => {
|
|
2012
2019
|
const t = q(e);
|
|
2013
|
-
return await (await (e.fetch ??
|
|
2014
|
-
},
|
|
2015
|
-
const o =
|
|
2020
|
+
return await (await (e.fetch ?? xn)(t.href, e.fetchOptions)).json();
|
|
2021
|
+
}, Pn = async (e, t, n = q(e)) => {
|
|
2022
|
+
const o = L(e.canTrack);
|
|
2016
2023
|
if (n.search.includes("preview=")) {
|
|
2017
2024
|
const r = [];
|
|
2018
2025
|
for (const a of t.results) {
|
|
2019
|
-
const s =
|
|
2026
|
+
const s = vn(n.searchParams);
|
|
2020
2027
|
r.push(s || a);
|
|
2021
2028
|
}
|
|
2022
2029
|
t.results = r;
|
|
@@ -2026,7 +2033,7 @@ const En = async (e) => {
|
|
|
2026
2033
|
try {
|
|
2027
2034
|
const r = [];
|
|
2028
2035
|
for (const a of t.results)
|
|
2029
|
-
r.push(await
|
|
2036
|
+
r.push(await Kt({
|
|
2030
2037
|
item: a,
|
|
2031
2038
|
canTrack: o
|
|
2032
2039
|
}));
|
|
@@ -2036,10 +2043,10 @@ const En = async (e) => {
|
|
|
2036
2043
|
}
|
|
2037
2044
|
return t.results;
|
|
2038
2045
|
};
|
|
2039
|
-
async function
|
|
2046
|
+
async function An(e) {
|
|
2040
2047
|
try {
|
|
2041
|
-
const t = q(e), n = await
|
|
2042
|
-
return
|
|
2048
|
+
const t = q(e), n = await Rn(e);
|
|
2049
|
+
return En(n) ? Pn(e, n) : (w.error("Error fetching data. ", {
|
|
2043
2050
|
url: t,
|
|
2044
2051
|
content: n,
|
|
2045
2052
|
options: e
|
|
@@ -2048,51 +2055,51 @@ async function Pn(e) {
|
|
|
2048
2055
|
return w.error("Error fetching data. ", t), null;
|
|
2049
2056
|
}
|
|
2050
2057
|
}
|
|
2051
|
-
function
|
|
2058
|
+
function ko(e) {
|
|
2052
2059
|
const t = e || (k() ? window.location.search : void 0);
|
|
2053
2060
|
return t ? ue(t).indexOf("builder.preview=") !== -1 : !1;
|
|
2054
2061
|
}
|
|
2055
|
-
function
|
|
2062
|
+
function Vn() {
|
|
2056
2063
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
2057
2064
|
const t = Math.random() * 16 | 0;
|
|
2058
2065
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
2059
2066
|
});
|
|
2060
2067
|
}
|
|
2061
|
-
function
|
|
2062
|
-
return
|
|
2068
|
+
function Be() {
|
|
2069
|
+
return Vn().replace(/-/g, "");
|
|
2063
2070
|
}
|
|
2064
|
-
const
|
|
2071
|
+
const We = "builderSessionId", Bn = async ({
|
|
2065
2072
|
canTrack: e
|
|
2066
2073
|
}) => {
|
|
2067
2074
|
if (!e)
|
|
2068
2075
|
return;
|
|
2069
2076
|
const t = await ke({
|
|
2070
|
-
name:
|
|
2077
|
+
name: We,
|
|
2071
2078
|
canTrack: e
|
|
2072
2079
|
});
|
|
2073
2080
|
if (I(t))
|
|
2074
2081
|
return t;
|
|
2075
2082
|
{
|
|
2076
|
-
const n =
|
|
2077
|
-
return
|
|
2083
|
+
const n = Wn();
|
|
2084
|
+
return $n({
|
|
2078
2085
|
id: n,
|
|
2079
2086
|
canTrack: e
|
|
2080
2087
|
}), n;
|
|
2081
2088
|
}
|
|
2082
|
-
},
|
|
2089
|
+
}, Wn = () => Be(), $n = ({
|
|
2083
2090
|
id: e,
|
|
2084
2091
|
canTrack: t
|
|
2085
2092
|
}) => Ce({
|
|
2086
|
-
name:
|
|
2093
|
+
name: We,
|
|
2087
2094
|
value: e,
|
|
2088
2095
|
canTrack: t
|
|
2089
|
-
}),
|
|
2096
|
+
}), $e = () => k() && typeof localStorage < "u" ? localStorage : void 0, On = ({
|
|
2090
2097
|
key: e,
|
|
2091
2098
|
canTrack: t
|
|
2092
2099
|
}) => {
|
|
2093
2100
|
var n;
|
|
2094
2101
|
try {
|
|
2095
|
-
return t ? (n =
|
|
2102
|
+
return t ? (n = $e()) == null ? void 0 : n.getItem(e) : void 0;
|
|
2096
2103
|
} catch (o) {
|
|
2097
2104
|
console.debug("[LocalStorage] GET error: ", o);
|
|
2098
2105
|
return;
|
|
@@ -2104,36 +2111,36 @@ const Be = "builderSessionId", Vn = async ({
|
|
|
2104
2111
|
}) => {
|
|
2105
2112
|
var o;
|
|
2106
2113
|
try {
|
|
2107
|
-
t && ((o =
|
|
2114
|
+
t && ((o = $e()) == null || o.setItem(e, n));
|
|
2108
2115
|
} catch (i) {
|
|
2109
2116
|
console.debug("[LocalStorage] SET error: ", i);
|
|
2110
2117
|
}
|
|
2111
|
-
},
|
|
2118
|
+
}, Oe = "builderVisitorId", Fn = ({
|
|
2112
2119
|
canTrack: e
|
|
2113
2120
|
}) => {
|
|
2114
2121
|
if (!e)
|
|
2115
2122
|
return;
|
|
2116
|
-
const t =
|
|
2117
|
-
key:
|
|
2123
|
+
const t = On({
|
|
2124
|
+
key: Oe,
|
|
2118
2125
|
canTrack: e
|
|
2119
2126
|
});
|
|
2120
2127
|
if (I(t))
|
|
2121
2128
|
return t;
|
|
2122
2129
|
{
|
|
2123
|
-
const n =
|
|
2124
|
-
return
|
|
2130
|
+
const n = Ln();
|
|
2131
|
+
return Un({
|
|
2125
2132
|
id: n,
|
|
2126
2133
|
canTrack: e
|
|
2127
2134
|
}), n;
|
|
2128
2135
|
}
|
|
2129
|
-
},
|
|
2136
|
+
}, Ln = () => Be(), Un = ({
|
|
2130
2137
|
id: e,
|
|
2131
2138
|
canTrack: t
|
|
2132
2139
|
}) => Nn({
|
|
2133
|
-
key:
|
|
2140
|
+
key: Oe,
|
|
2134
2141
|
value: e,
|
|
2135
2142
|
canTrack: t
|
|
2136
|
-
}),
|
|
2143
|
+
}), Dn = async ({
|
|
2137
2144
|
canTrack: e
|
|
2138
2145
|
}) => {
|
|
2139
2146
|
if (!e)
|
|
@@ -2141,16 +2148,16 @@ const Be = "builderSessionId", Vn = async ({
|
|
|
2141
2148
|
visitorId: void 0,
|
|
2142
2149
|
sessionId: void 0
|
|
2143
2150
|
};
|
|
2144
|
-
const t = await
|
|
2151
|
+
const t = await Bn({
|
|
2145
2152
|
canTrack: e
|
|
2146
|
-
}), n =
|
|
2153
|
+
}), n = Fn({
|
|
2147
2154
|
canTrack: e
|
|
2148
2155
|
});
|
|
2149
2156
|
return {
|
|
2150
2157
|
sessionId: t,
|
|
2151
2158
|
visitorId: n
|
|
2152
2159
|
};
|
|
2153
|
-
},
|
|
2160
|
+
}, _n = async ({
|
|
2154
2161
|
type: e,
|
|
2155
2162
|
canTrack: t,
|
|
2156
2163
|
apiKey: n,
|
|
@@ -2164,14 +2171,14 @@ const Be = "builderSessionId", Vn = async ({
|
|
|
2164
2171
|
url: location.href,
|
|
2165
2172
|
...o
|
|
2166
2173
|
},
|
|
2167
|
-
...await
|
|
2174
|
+
...await Dn({
|
|
2168
2175
|
canTrack: t
|
|
2169
2176
|
}),
|
|
2170
2177
|
userAttributes: fe(),
|
|
2171
2178
|
ownerId: n
|
|
2172
2179
|
}
|
|
2173
2180
|
});
|
|
2174
|
-
async function
|
|
2181
|
+
async function Mn(e) {
|
|
2175
2182
|
if (!e.apiKey) {
|
|
2176
2183
|
w.error("Missing API key for track call. Please provide your API key.");
|
|
2177
2184
|
return;
|
|
@@ -2180,7 +2187,7 @@ async function _n(e) {
|
|
|
2180
2187
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2181
2188
|
method: "POST",
|
|
2182
2189
|
body: JSON.stringify({
|
|
2183
|
-
events: [await
|
|
2190
|
+
events: [await _n(e)]
|
|
2184
2191
|
}),
|
|
2185
2192
|
headers: {
|
|
2186
2193
|
"content-type": "application/json"
|
|
@@ -2190,14 +2197,14 @@ async function _n(e) {
|
|
|
2190
2197
|
console.error("Failed to track: ", t);
|
|
2191
2198
|
});
|
|
2192
2199
|
}
|
|
2193
|
-
const
|
|
2200
|
+
const Co = (e) => Mn({
|
|
2194
2201
|
...e,
|
|
2195
2202
|
canTrack: !0
|
|
2196
2203
|
});
|
|
2197
2204
|
function ie(e) {
|
|
2198
2205
|
return Math.round(e * 1e3) / 1e3;
|
|
2199
2206
|
}
|
|
2200
|
-
const
|
|
2207
|
+
const jn = (e, t, n = !0) => {
|
|
2201
2208
|
if (!(e instanceof HTMLElement))
|
|
2202
2209
|
return null;
|
|
2203
2210
|
let o = n ? e : e.parentElement;
|
|
@@ -2208,7 +2215,7 @@ const Mn = (e, t, n = !0) => {
|
|
|
2208
2215
|
return o;
|
|
2209
2216
|
} while (o = o.parentElement);
|
|
2210
2217
|
return null;
|
|
2211
|
-
},
|
|
2218
|
+
}, Hn = (e) => jn(e, (t) => {
|
|
2212
2219
|
const n = t.getAttribute("builder-id") || t.id;
|
|
2213
2220
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2214
2221
|
}), re = ({
|
|
@@ -2220,8 +2227,8 @@ const Mn = (e, t, n = !0) => {
|
|
|
2220
2227
|
x: r,
|
|
2221
2228
|
y: a
|
|
2222
2229
|
};
|
|
2223
|
-
},
|
|
2224
|
-
const t = e.target, n = t &&
|
|
2230
|
+
}, xo = (e) => {
|
|
2231
|
+
const t = e.target, n = t && Hn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2225
2232
|
return {
|
|
2226
2233
|
targetBuilderElement: o || void 0,
|
|
2227
2234
|
metadata: {
|
|
@@ -2236,13 +2243,13 @@ const Mn = (e, t, n = !0) => {
|
|
|
2236
2243
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2237
2244
|
}
|
|
2238
2245
|
};
|
|
2239
|
-
},
|
|
2246
|
+
}, Kn = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
2240
2247
|
function Ne(e, t) {
|
|
2241
2248
|
const n = new URL(t.origin), o = n.hostname;
|
|
2242
|
-
return (e ||
|
|
2249
|
+
return (e || Kn).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
2243
2250
|
}
|
|
2244
|
-
const
|
|
2245
|
-
function
|
|
2251
|
+
const zn = "0.14.21", ae = {};
|
|
2252
|
+
function qn(e, t) {
|
|
2246
2253
|
let n = ae[e];
|
|
2247
2254
|
if (n || (n = ae[e] = []), n.push(t), k()) {
|
|
2248
2255
|
const o = {
|
|
@@ -2259,8 +2266,8 @@ function zn(e, t) {
|
|
|
2259
2266
|
}
|
|
2260
2267
|
}
|
|
2261
2268
|
}
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2269
|
+
const wo = () => {
|
|
2270
|
+
qn("insertMenu", {
|
|
2264
2271
|
name: "_default",
|
|
2265
2272
|
default: !0,
|
|
2266
2273
|
items: [{
|
|
@@ -2283,13 +2290,13 @@ const xo = () => {
|
|
|
2283
2290
|
});
|
|
2284
2291
|
};
|
|
2285
2292
|
let se = !1;
|
|
2286
|
-
const
|
|
2293
|
+
const Yn = (e = {}) => {
|
|
2287
2294
|
var t, n;
|
|
2288
2295
|
se || (se = !0, k() && ((t = window.parent) == null || t.postMessage({
|
|
2289
2296
|
type: "builder.sdkInfo",
|
|
2290
2297
|
data: {
|
|
2291
2298
|
target: T,
|
|
2292
|
-
version:
|
|
2299
|
+
version: zn,
|
|
2293
2300
|
supportsPatchUpdates: !1,
|
|
2294
2301
|
// Supports builder-model="..." attribute which is needed to
|
|
2295
2302
|
// scope our '+ add block' button styling
|
|
@@ -2344,7 +2351,7 @@ const qn = (e = {}) => {
|
|
|
2344
2351
|
}
|
|
2345
2352
|
}
|
|
2346
2353
|
})));
|
|
2347
|
-
},
|
|
2354
|
+
}, Gn = ({
|
|
2348
2355
|
model: e,
|
|
2349
2356
|
trustedHosts: t,
|
|
2350
2357
|
callbacks: n
|
|
@@ -2370,12 +2377,12 @@ const qn = (e = {}) => {
|
|
|
2370
2377
|
break;
|
|
2371
2378
|
}
|
|
2372
2379
|
}
|
|
2373
|
-
},
|
|
2380
|
+
}, Io = (e, t, n) => {
|
|
2374
2381
|
if (!k)
|
|
2375
2382
|
return w.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
2376
2383
|
};
|
|
2377
|
-
|
|
2378
|
-
const o =
|
|
2384
|
+
Yn();
|
|
2385
|
+
const o = Gn({
|
|
2379
2386
|
callbacks: {
|
|
2380
2387
|
contentUpdate: t,
|
|
2381
2388
|
animation: () => {
|
|
@@ -2389,7 +2396,7 @@ const qn = (e = {}) => {
|
|
|
2389
2396
|
return window.addEventListener("message", o), () => {
|
|
2390
2397
|
window.removeEventListener("message", o);
|
|
2391
2398
|
};
|
|
2392
|
-
},
|
|
2399
|
+
}, Jn = (e) => {
|
|
2393
2400
|
var r;
|
|
2394
2401
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
|
|
2395
2402
|
let i = "";
|
|
@@ -2415,15 +2422,15 @@ font-weight: ${a};
|
|
|
2415
2422
|
`.trim());
|
|
2416
2423
|
}
|
|
2417
2424
|
return i;
|
|
2418
|
-
},
|
|
2425
|
+
}, Qn = ({
|
|
2419
2426
|
customFonts: e
|
|
2420
2427
|
}) => {
|
|
2421
2428
|
var t;
|
|
2422
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
2423
|
-
},
|
|
2429
|
+
return ((t = e == null ? void 0 : e.map((n) => Jn(n))) == null ? void 0 : t.join(" ")) || "";
|
|
2430
|
+
}, Xn = ({
|
|
2424
2431
|
cssCode: e,
|
|
2425
2432
|
contentId: t
|
|
2426
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
2433
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Zn = `
|
|
2427
2434
|
.builder-button {
|
|
2428
2435
|
all: unset;
|
|
2429
2436
|
}
|
|
@@ -2440,21 +2447,21 @@ font-weight: ${a};
|
|
|
2440
2447
|
text-align: inherit;
|
|
2441
2448
|
font-family: inherit;
|
|
2442
2449
|
}
|
|
2443
|
-
`,
|
|
2444
|
-
function
|
|
2450
|
+
`, eo = (e) => e ? "" : Zn, To = (e) => `variant-${e}`;
|
|
2451
|
+
function to(e) {
|
|
2445
2452
|
const t = `
|
|
2446
|
-
${
|
|
2453
|
+
${Xn({
|
|
2447
2454
|
cssCode: e.cssCode,
|
|
2448
2455
|
contentId: e.contentId
|
|
2449
2456
|
})}
|
|
2450
|
-
${
|
|
2457
|
+
${Qn({
|
|
2451
2458
|
customFonts: e.customFonts
|
|
2452
2459
|
})}
|
|
2453
|
-
${
|
|
2460
|
+
${eo(e.isNestedRender)}
|
|
2454
2461
|
`.trim();
|
|
2455
|
-
return /* @__PURE__ */ l(
|
|
2462
|
+
return /* @__PURE__ */ l(N, { id: "builderio-content", styles: t });
|
|
2456
2463
|
}
|
|
2457
|
-
const
|
|
2464
|
+
const no = ({
|
|
2458
2465
|
content: e,
|
|
2459
2466
|
data: t,
|
|
2460
2467
|
locale: n
|
|
@@ -2471,7 +2478,7 @@ const to = ({
|
|
|
2471
2478
|
locale: n
|
|
2472
2479
|
} : {}
|
|
2473
2480
|
};
|
|
2474
|
-
},
|
|
2481
|
+
}, oo = ({
|
|
2475
2482
|
content: e,
|
|
2476
2483
|
data: t
|
|
2477
2484
|
}) => e ? {
|
|
@@ -2484,7 +2491,7 @@ const to = ({
|
|
|
2484
2491
|
} : void 0;
|
|
2485
2492
|
function ce(e) {
|
|
2486
2493
|
var i, r, a, s, c, u, h, d, f;
|
|
2487
|
-
const t =
|
|
2494
|
+
const t = bn({
|
|
2488
2495
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2489
2496
|
variationId: (i = e.content) == null ? void 0 : i.testVariationId,
|
|
2490
2497
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
@@ -2497,17 +2504,17 @@ function ce(e) {
|
|
|
2497
2504
|
...g,
|
|
2498
2505
|
[b.name]: {
|
|
2499
2506
|
component: v,
|
|
2500
|
-
...
|
|
2507
|
+
...U(b)
|
|
2501
2508
|
}
|
|
2502
2509
|
}),
|
|
2503
2510
|
{}
|
|
2504
2511
|
), o = {
|
|
2505
|
-
content:
|
|
2512
|
+
content: oo({
|
|
2506
2513
|
content: e.content,
|
|
2507
2514
|
data: e.data
|
|
2508
2515
|
}),
|
|
2509
2516
|
localState: void 0,
|
|
2510
|
-
rootState:
|
|
2517
|
+
rootState: no({
|
|
2511
2518
|
content: e.content,
|
|
2512
2519
|
data: e.data,
|
|
2513
2520
|
locale: e.locale
|
|
@@ -2522,7 +2529,7 @@ function ce(e) {
|
|
|
2522
2529
|
].reduce(
|
|
2523
2530
|
(g, { component: v, ...b }) => ({
|
|
2524
2531
|
...g,
|
|
2525
|
-
[b.name]:
|
|
2532
|
+
[b.name]: U(b)
|
|
2526
2533
|
}),
|
|
2527
2534
|
{}
|
|
2528
2535
|
),
|
|
@@ -2531,7 +2538,7 @@ function ce(e) {
|
|
|
2531
2538
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
2532
2539
|
};
|
|
2533
2540
|
return /* @__PURE__ */ R(
|
|
2534
|
-
|
|
2541
|
+
Je,
|
|
2535
2542
|
{
|
|
2536
2543
|
content: e.content,
|
|
2537
2544
|
data: e.data,
|
|
@@ -2549,14 +2556,14 @@ function ce(e) {
|
|
|
2549
2556
|
trustedHosts: e.trustedHosts,
|
|
2550
2557
|
children: [
|
|
2551
2558
|
e.isSsrAbTest ? /* @__PURE__ */ l(
|
|
2552
|
-
|
|
2559
|
+
D,
|
|
2553
2560
|
{
|
|
2554
2561
|
id: "builderio-variant-visibility",
|
|
2555
2562
|
scriptStr: t
|
|
2556
2563
|
}
|
|
2557
2564
|
) : null,
|
|
2558
2565
|
/* @__PURE__ */ l(
|
|
2559
|
-
|
|
2566
|
+
to,
|
|
2560
2567
|
{
|
|
2561
2568
|
isNestedRender: e.isNestedRender,
|
|
2562
2569
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
@@ -2577,14 +2584,14 @@ function ce(e) {
|
|
|
2577
2584
|
}
|
|
2578
2585
|
);
|
|
2579
2586
|
}
|
|
2580
|
-
function
|
|
2587
|
+
function io(e) {
|
|
2581
2588
|
var r;
|
|
2582
|
-
const t =
|
|
2583
|
-
canTrack:
|
|
2589
|
+
const t = fn({
|
|
2590
|
+
canTrack: L(e.canTrack),
|
|
2584
2591
|
content: e.content
|
|
2585
2592
|
}), n = function() {
|
|
2586
2593
|
var s;
|
|
2587
|
-
return
|
|
2594
|
+
return gn(
|
|
2588
2595
|
W(e.content).map((c) => ({
|
|
2589
2596
|
id: c.testVariationId,
|
|
2590
2597
|
testRatio: c.testRatio
|
|
@@ -2598,29 +2605,29 @@ function oo(e) {
|
|
|
2598
2605
|
return t ? {
|
|
2599
2606
|
...e.content,
|
|
2600
2607
|
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
2601
|
-
} :
|
|
2608
|
+
} : Ht({
|
|
2602
2609
|
item: e.content,
|
|
2603
|
-
canTrack:
|
|
2610
|
+
canTrack: L(e.canTrack)
|
|
2604
2611
|
});
|
|
2605
2612
|
};
|
|
2606
2613
|
return /* @__PURE__ */ R(C, { children: [
|
|
2607
2614
|
!e.isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(
|
|
2608
|
-
|
|
2615
|
+
D,
|
|
2609
2616
|
{
|
|
2610
2617
|
id: "builderio-init-variants-fns",
|
|
2611
|
-
scriptStr:
|
|
2618
|
+
scriptStr: pn()
|
|
2612
2619
|
}
|
|
2613
2620
|
) : null,
|
|
2614
2621
|
t ? /* @__PURE__ */ R(C, { children: [
|
|
2615
2622
|
/* @__PURE__ */ l(
|
|
2616
|
-
|
|
2623
|
+
N,
|
|
2617
2624
|
{
|
|
2618
2625
|
id: "builderio-variants",
|
|
2619
2626
|
styles: o()
|
|
2620
2627
|
}
|
|
2621
2628
|
),
|
|
2622
2629
|
/* @__PURE__ */ l(
|
|
2623
|
-
|
|
2630
|
+
D,
|
|
2624
2631
|
{
|
|
2625
2632
|
id: "builderio-variants-visibility",
|
|
2626
2633
|
scriptStr: n()
|
|
@@ -2678,13 +2685,13 @@ function oo(e) {
|
|
|
2678
2685
|
)
|
|
2679
2686
|
] });
|
|
2680
2687
|
}
|
|
2681
|
-
const
|
|
2688
|
+
const ro = async ({
|
|
2682
2689
|
builderContextValue: e,
|
|
2683
2690
|
symbol: t
|
|
2684
2691
|
}) => {
|
|
2685
2692
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2686
2693
|
(e != null && e.apiKey))
|
|
2687
|
-
return
|
|
2694
|
+
return Ve({
|
|
2688
2695
|
model: t.model,
|
|
2689
2696
|
apiKey: e.apiKey,
|
|
2690
2697
|
apiVersion: e.apiVersion,
|
|
@@ -2697,7 +2704,7 @@ const io = async ({
|
|
|
2697
2704
|
w.error("Could not fetch symbol content: ", n);
|
|
2698
2705
|
});
|
|
2699
2706
|
};
|
|
2700
|
-
async function
|
|
2707
|
+
async function ao(e) {
|
|
2701
2708
|
var r, a, s, c, u;
|
|
2702
2709
|
const t = function() {
|
|
2703
2710
|
return "div";
|
|
@@ -2711,12 +2718,12 @@ async function ro(e) {
|
|
|
2711
2718
|
(d = e.symbol) != null && d.inline ? "builder-inline-symbol" : void 0,
|
|
2712
2719
|
(f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2713
2720
|
].filter(Boolean).join(" ");
|
|
2714
|
-
}, i = ((r = e.symbol) == null ? void 0 : r.content) || await
|
|
2721
|
+
}, i = ((r = e.symbol) == null ? void 0 : r.content) || await ro({
|
|
2715
2722
|
symbol: e.symbol,
|
|
2716
2723
|
builderContextValue: e.builderContext
|
|
2717
2724
|
});
|
|
2718
2725
|
return /* @__PURE__ */ l("div", { ...e.attributes, className: o(), children: /* @__PURE__ */ l(
|
|
2719
|
-
|
|
2726
|
+
io,
|
|
2720
2727
|
{
|
|
2721
2728
|
isNestedRender: !0,
|
|
2722
2729
|
apiVersion: e.builderContext.apiVersion,
|
|
@@ -2740,7 +2747,7 @@ async function ro(e) {
|
|
|
2740
2747
|
) });
|
|
2741
2748
|
}
|
|
2742
2749
|
const le = {};
|
|
2743
|
-
function
|
|
2750
|
+
function Eo(e) {
|
|
2744
2751
|
if (k()) {
|
|
2745
2752
|
Object.assign(le, e);
|
|
2746
2753
|
const t = {
|
|
@@ -2750,7 +2757,7 @@ function To(e) {
|
|
|
2750
2757
|
parent.postMessage(t, "*");
|
|
2751
2758
|
}
|
|
2752
2759
|
}
|
|
2753
|
-
const
|
|
2760
|
+
const Ro = async (e) => {
|
|
2754
2761
|
var o, i, r;
|
|
2755
2762
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
|
|
2756
2763
|
...e,
|
|
@@ -2762,50 +2769,50 @@ const Eo = async (e) => {
|
|
|
2762
2769
|
urlPath: t
|
|
2763
2770
|
} : {}
|
|
2764
2771
|
},
|
|
2765
|
-
options:
|
|
2772
|
+
options: Ae(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
2766
2773
|
};
|
|
2767
2774
|
return {
|
|
2768
2775
|
apiKey: n.apiKey,
|
|
2769
2776
|
model: n.model,
|
|
2770
|
-
content: await
|
|
2777
|
+
content: await Ve(n)
|
|
2771
2778
|
};
|
|
2772
2779
|
};
|
|
2773
2780
|
export {
|
|
2774
|
-
|
|
2781
|
+
Ae as A,
|
|
2775
2782
|
K as B,
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2783
|
+
Bt as C,
|
|
2784
|
+
Co as D,
|
|
2785
|
+
Io as E,
|
|
2786
|
+
Ro as F,
|
|
2787
|
+
Pn as G,
|
|
2788
|
+
An as H,
|
|
2789
|
+
ao as S,
|
|
2790
|
+
tn as T,
|
|
2791
|
+
Mn as _,
|
|
2792
|
+
Rt as a,
|
|
2793
|
+
bo as b,
|
|
2787
2794
|
me as c,
|
|
2788
|
-
|
|
2789
|
-
|
|
2795
|
+
yo as d,
|
|
2796
|
+
So as e,
|
|
2790
2797
|
k as f,
|
|
2791
2798
|
M as g,
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2799
|
+
L as h,
|
|
2800
|
+
po as i,
|
|
2801
|
+
ko as j,
|
|
2802
|
+
To as k,
|
|
2796
2803
|
w as l,
|
|
2797
|
-
|
|
2804
|
+
Gn as m,
|
|
2798
2805
|
H as n,
|
|
2799
|
-
|
|
2800
|
-
|
|
2806
|
+
xo as o,
|
|
2807
|
+
xn as p,
|
|
2801
2808
|
O as q,
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2809
|
+
wo as r,
|
|
2810
|
+
Yn as s,
|
|
2811
|
+
go as t,
|
|
2812
|
+
vo as u,
|
|
2813
|
+
Ve as v,
|
|
2814
|
+
Sn as w,
|
|
2815
|
+
io as x,
|
|
2816
|
+
qn as y,
|
|
2817
|
+
Eo as z
|
|
2811
2818
|
};
|