@builder.io/sdk-react 4.1.2 → 4.2.0
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/blocks-exports.cjs +7 -7
- package/lib/browser/blocks-exports.mjs +215 -193
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-275748e0.js → server-entry-065ec411.js} +1 -1
- package/lib/browser/{server-entry-d2f19ab1.cjs → server-entry-09953757.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-59685072.js → accordion-79f6d62c.js} +1 -1
- package/lib/edge/{accordion-59377bdf.cjs → accordion-c239771d.cjs} +1 -1
- package/lib/edge/{blocks-803a3669.js → blocks-3cb3a9cd.js} +5 -5
- package/lib/edge/{blocks-ab4caea4.cjs → blocks-56f79850.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-244756d9.js → button-6dee05c9.js} +2 -2
- package/lib/edge/{button-d9ead397.cjs → button-759b43fb.cjs} +1 -1
- package/lib/edge/{columns-ac088b45.js → columns-2743498a.js} +3 -3
- package/lib/edge/{columns-88904faf.cjs → columns-a29ec0ac.cjs} +1 -1
- package/lib/edge/{content-variants-7ba31977.js → content-variants-4d5a1e3c.js} +172 -150
- package/lib/edge/{content-variants-d0558de3.cjs → content-variants-bdf1748b.cjs} +6 -6
- package/lib/edge/{custom-code-e2904013.cjs → custom-code-6129bd8c.cjs} +1 -1
- package/lib/edge/{custom-code-3d893bd2.js → custom-code-8034fac0.js} +1 -1
- package/lib/edge/{embed-7710e674.cjs → embed-b2ea5150.cjs} +1 -1
- package/lib/edge/{embed-7c2fe6ce.js → embed-f5b10eeb.js} +1 -1
- package/lib/edge/{form-a5b57678.js → form-14942d4f.js} +3 -3
- package/lib/edge/{form-ec1cd318.cjs → form-26c3a03e.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-31bfc4d6.cjs → get-class-prop-name-7e739c9f.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-4ca8bda9.js → get-class-prop-name-f6a63f4a.js} +1 -1
- package/lib/edge/{img-1b034d45.js → img-ba2ef9ee.js} +1 -1
- package/lib/edge/{img-f00b7db5.cjs → img-f33a2e42.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-dfd8b37e.js → input-7089e95f.js} +1 -1
- package/lib/edge/{input-19390442.cjs → input-c2f95825.cjs} +1 -1
- package/lib/edge/{personalization-container-40c62fee.cjs → personalization-container-794b3939.cjs} +1 -1
- package/lib/edge/{personalization-container-660938a9.js → personalization-container-eb1ecef2.js} +4 -4
- package/lib/edge/{select-155fc504.js → select-8f01592a.js} +1 -1
- package/lib/edge/{select-9839622b.cjs → select-af0bb9fe.cjs} +1 -1
- package/lib/edge/{server-entry-bdf7aa30.cjs → server-entry-142a50e9.cjs} +1 -1
- package/lib/edge/{server-entry-75006b6f.js → server-entry-7c65c9a8.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-c14c2de1.js → slot-2638fd6d.js} +3 -3
- package/lib/edge/{slot-28225152.cjs → slot-db37860e.cjs} +1 -1
- package/lib/edge/{symbol-e5dc7a91.cjs → symbol-630b9a57.cjs} +1 -1
- package/lib/edge/{symbol-2419b184.js → symbol-7faca118.js} +2 -2
- package/lib/edge/{tabs-c7011fa2.js → tabs-2eee6422.js} +3 -3
- package/lib/edge/{tabs-d7aa6ac2.cjs → tabs-502123df.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +14 -14
- package/lib/node/blocks-exports.mjs +218 -196
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-7a611f62.cjs → server-entry-375d06e8.cjs} +1 -1
- package/lib/node/{server-entry-0cf21855.js → server-entry-581dd491.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-68685828.cjs → setIvm-2eb44b9d.cjs} +1 -1
- package/lib/node/{setIvm-4171d613.js → setIvm-8d02dc72.js} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-88656beb.cjs → should-force-browser-runtime-in-node-ed3fa1f9.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-9fe42073.js → should-force-browser-runtime-in-node-f461467e.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { TARGET as F, isBrowser as
|
|
1
|
+
import { jsx as T, jsxs as B, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as C, useRef as Q, useState as R, useEffect as W } from "react";
|
|
3
|
+
import { TARGET as F, isBrowser as U, isEditing as N, isPreviewing as oe, setupBrowserForEditing as ge, createRegisterComponentMessage as he, getDefaultCanTrack as O, getCookieSync as be, _track as X, fetchOneEntry as ye, createEditorListener as ve, logFetch as xe, serializeIncludingFunctions as Z, logger as Se, handleABTestingSync as Te } from "./server-entry-7c65c9a8.js";
|
|
4
4
|
import { Video as Ie, Button as ke, Columns as Ce, Fragment as we, Image as Ve, Section as Ee, Symbol as Re, Text as Ae, BuilderContext as De } from "./blocks-exports.mjs";
|
|
5
|
-
import { triggerAnimation as Fe, evaluate as re, fastClone as Pe, InlinedStyles as se, ComponentsContext as We, Blocks as Ne } from "./blocks-
|
|
5
|
+
import { triggerAnimation as Fe, evaluate as re, fastClone as Pe, InlinedStyles as se, ComponentsContext as We, Blocks as Ne } from "./blocks-3cb3a9cd.js";
|
|
6
6
|
function Gt(e, t, n, o) {
|
|
7
7
|
function r(f) {
|
|
8
8
|
return typeof f == "string";
|
|
@@ -12,24 +12,24 @@ function Gt(e, t, n, o) {
|
|
|
12
12
|
}
|
|
13
13
|
function i(f, m) {
|
|
14
14
|
return (() => {
|
|
15
|
-
const
|
|
15
|
+
const I = m.property, E = m.operator;
|
|
16
16
|
let d = m.value;
|
|
17
|
-
if (m && m.property === "urlPath" && m.value && typeof m.value == "string" && m.value !== "/" && m.value.endsWith("/") && (d = m.value.slice(0, -1)), !(
|
|
17
|
+
if (m && m.property === "urlPath" && m.value && typeof m.value == "string" && m.value !== "/" && m.value.endsWith("/") && (d = m.value.slice(0, -1)), !(I && E))
|
|
18
18
|
return !0;
|
|
19
19
|
if (Array.isArray(d))
|
|
20
|
-
return
|
|
21
|
-
property:
|
|
22
|
-
operator:
|
|
23
|
-
value:
|
|
24
|
-
})) : !!d.find((
|
|
25
|
-
property:
|
|
26
|
-
operator:
|
|
27
|
-
value:
|
|
20
|
+
return E === "isNot" ? d.every((w) => i(f, {
|
|
21
|
+
property: I,
|
|
22
|
+
operator: E,
|
|
23
|
+
value: w
|
|
24
|
+
})) : !!d.find((w) => i(f, {
|
|
25
|
+
property: I,
|
|
26
|
+
operator: E,
|
|
27
|
+
value: w
|
|
28
28
|
}));
|
|
29
|
-
const u = f[
|
|
29
|
+
const u = f[I];
|
|
30
30
|
if (Array.isArray(u))
|
|
31
31
|
return u.includes(d);
|
|
32
|
-
switch (
|
|
32
|
+
switch (E) {
|
|
33
33
|
case "is":
|
|
34
34
|
return u === d;
|
|
35
35
|
case "isNot":
|
|
@@ -223,7 +223,7 @@ const $e = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
|
|
|
223
223
|
}
|
|
224
224
|
}`, Ue = "default", Be = "filterWithCustomTargeting", le = "builderIoPersonalization", ue = "updateVisibilityStylesScript", de = ["react", "vue", "svelte", "qwik"], He = ["vue", "svelte", "qwik"];
|
|
225
225
|
function Xt(e, t) {
|
|
226
|
-
return !(e && e.length > 0) || !t ? !1 : He.includes(F) ? !0 : !
|
|
226
|
+
return !(e && e.length > 0) || !t ? !1 : He.includes(F) ? !0 : !U();
|
|
227
227
|
}
|
|
228
228
|
function Zt({
|
|
229
229
|
variants: e,
|
|
@@ -250,7 +250,7 @@ function Zt({
|
|
|
250
250
|
}
|
|
251
251
|
return s;
|
|
252
252
|
}
|
|
253
|
-
if (
|
|
253
|
+
if (U()) {
|
|
254
254
|
const a = o == null ? void 0 : o[0];
|
|
255
255
|
if (a && e) {
|
|
256
256
|
const l = e.indexOf(a);
|
|
@@ -392,7 +392,7 @@ const qe = () => `
|
|
|
392
392
|
builderComponents: !0,
|
|
393
393
|
builderLinkComponent: !0
|
|
394
394
|
}
|
|
395
|
-
}, je =
|
|
395
|
+
}, je = C(() => import("./accordion-79f6d62c.js")), Me = {
|
|
396
396
|
name: "Core:Button",
|
|
397
397
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
398
398
|
defaultStyles: {
|
|
@@ -667,8 +667,8 @@ const qe = () => `
|
|
|
667
667
|
let P = !1;
|
|
668
668
|
m.onload = () => {
|
|
669
669
|
P = !0, l(m);
|
|
670
|
-
}, m.addEventListener("error", (
|
|
671
|
-
console.warn("Image load failed",
|
|
670
|
+
}, m.addEventListener("error", (I) => {
|
|
671
|
+
console.warn("Image load failed", I.error), f(I.error);
|
|
672
672
|
}), m.src = i, setTimeout(() => {
|
|
673
673
|
P || f(new Error("Image load timed out"));
|
|
674
674
|
}, a);
|
|
@@ -789,7 +789,7 @@ const qe = () => `
|
|
|
789
789
|
defaultValue: []
|
|
790
790
|
}]
|
|
791
791
|
}]
|
|
792
|
-
}, Ge =
|
|
792
|
+
}, Ge = C(() => import("./personalization-container-eb1ecef2.js")), Xe = {
|
|
793
793
|
name: "Core:Section",
|
|
794
794
|
static: !0,
|
|
795
795
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -845,7 +845,7 @@ const qe = () => `
|
|
|
845
845
|
builderContext: !0,
|
|
846
846
|
builderComponents: !0
|
|
847
847
|
}
|
|
848
|
-
}, et =
|
|
848
|
+
}, et = C(() => import("./slot-2638fd6d.js")), tt = {
|
|
849
849
|
name: "Symbol",
|
|
850
850
|
noWrap: !0,
|
|
851
851
|
static: !0,
|
|
@@ -1025,7 +1025,7 @@ const qe = () => `
|
|
|
1025
1025
|
builderComponents: !0,
|
|
1026
1026
|
builderLinkComponent: !0
|
|
1027
1027
|
}
|
|
1028
|
-
}, at =
|
|
1028
|
+
}, at = C(() => import("./tabs-2eee6422.js")), it = {
|
|
1029
1029
|
shouldReceiveBuilderProps: {},
|
|
1030
1030
|
name: "Text",
|
|
1031
1031
|
static: !0,
|
|
@@ -1066,7 +1066,7 @@ const qe = () => `
|
|
|
1066
1066
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1067
1067
|
advanced: !0
|
|
1068
1068
|
}]
|
|
1069
|
-
}, rt =
|
|
1069
|
+
}, rt = C(() => import("./custom-code-8034fac0.js")), st = {
|
|
1070
1070
|
name: "Embed",
|
|
1071
1071
|
static: !0,
|
|
1072
1072
|
inputs: [{
|
|
@@ -1081,7 +1081,7 @@ const qe = () => `
|
|
|
1081
1081
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1082
1082
|
hideFromUI: !0
|
|
1083
1083
|
}]
|
|
1084
|
-
}, lt =
|
|
1084
|
+
}, lt = C(() => import("./embed-f5b10eeb.js")), ut = {
|
|
1085
1085
|
name: "Form:Form",
|
|
1086
1086
|
// editableTags: ['builder-form-error']
|
|
1087
1087
|
defaults: {
|
|
@@ -1318,7 +1318,7 @@ const qe = () => `
|
|
|
1318
1318
|
builderComponents: !0,
|
|
1319
1319
|
builderLinkComponent: !0
|
|
1320
1320
|
}
|
|
1321
|
-
}, dt =
|
|
1321
|
+
}, dt = C(() => import("./form-14942d4f.js")), ct = {
|
|
1322
1322
|
name: "Form:Input",
|
|
1323
1323
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1324
1324
|
inputs: [
|
|
@@ -1369,7 +1369,7 @@ const qe = () => `
|
|
|
1369
1369
|
borderStyle: "solid",
|
|
1370
1370
|
borderColor: "#ccc"
|
|
1371
1371
|
}
|
|
1372
|
-
}, mt =
|
|
1372
|
+
}, mt = C(() => import("./input-7089e95f.js")), pt = {
|
|
1373
1373
|
name: "Form:Select",
|
|
1374
1374
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1375
1375
|
defaultStyles: {
|
|
@@ -1411,7 +1411,7 @@ const qe = () => `
|
|
|
1411
1411
|
}],
|
|
1412
1412
|
static: !0,
|
|
1413
1413
|
noWrap: !0
|
|
1414
|
-
}, ft =
|
|
1414
|
+
}, ft = C(() => import("./select-8f01592a.js")), gt = {
|
|
1415
1415
|
name: "Form:SubmitButton",
|
|
1416
1416
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1417
1417
|
defaultStyles: {
|
|
@@ -1436,7 +1436,7 @@ const qe = () => `
|
|
|
1436
1436
|
// that only shows if advanced setting is flipped
|
|
1437
1437
|
// TODO: defaultChildren
|
|
1438
1438
|
// canHaveChildren: true,
|
|
1439
|
-
}, ht =
|
|
1439
|
+
}, ht = C(() => import("./submit-button-b48361a7.js")), bt = {
|
|
1440
1440
|
name: "Form:TextArea",
|
|
1441
1441
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
|
|
1442
1442
|
inputs: [{
|
|
@@ -1472,7 +1472,7 @@ const qe = () => `
|
|
|
1472
1472
|
},
|
|
1473
1473
|
static: !0,
|
|
1474
1474
|
noWrap: !0
|
|
1475
|
-
}, yt =
|
|
1475
|
+
}, yt = C(() => import("./textarea-d29025e9.js")), vt = {
|
|
1476
1476
|
// friendlyName?
|
|
1477
1477
|
name: "Raw:Img",
|
|
1478
1478
|
hideFromInsertMenu: !0,
|
|
@@ -1486,7 +1486,7 @@ const qe = () => `
|
|
|
1486
1486
|
}],
|
|
1487
1487
|
noWrap: !0,
|
|
1488
1488
|
static: !0
|
|
1489
|
-
}, xt =
|
|
1489
|
+
}, xt = C(() => import("./img-ba2ef9ee.js")), St = {
|
|
1490
1490
|
name: "Video",
|
|
1491
1491
|
canHaveChildren: !0,
|
|
1492
1492
|
defaultStyles: {
|
|
@@ -1723,14 +1723,14 @@ const qe = () => `
|
|
|
1723
1723
|
thisScriptEl?.remove();
|
|
1724
1724
|
}
|
|
1725
1725
|
return;
|
|
1726
|
-
}`, me = "builderIoAbTest", pe = "builderIoRenderContent",
|
|
1726
|
+
}`, me = "builderIoAbTest", pe = "builderIoRenderContent", H = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1727
1727
|
...t,
|
|
1728
1728
|
testVariationId: t.id,
|
|
1729
1729
|
id: e == null ? void 0 : e.id
|
|
1730
1730
|
})), Ct = ({
|
|
1731
1731
|
canTrack: e,
|
|
1732
1732
|
content: t
|
|
1733
|
-
}) => !(!(
|
|
1733
|
+
}) => !(!(H(t).length > 0) || !e || U()), wt = (e) => e === "react" || e === "reactNative", Vt = F === "angular", fe = wt(F), Et = () => `
|
|
1734
1734
|
window.${me} = ${It}
|
|
1735
1735
|
window.${pe} = ${kt}
|
|
1736
1736
|
`, Rt = (e, t) => `
|
|
@@ -1742,8 +1742,8 @@ const qe = () => `
|
|
|
1742
1742
|
}) => `window.${pe}(
|
|
1743
1743
|
"${t}", "${e}", ${fe}
|
|
1744
1744
|
)`;
|
|
1745
|
-
function
|
|
1746
|
-
return /* @__PURE__ */
|
|
1745
|
+
function q(e) {
|
|
1746
|
+
return /* @__PURE__ */ T(
|
|
1747
1747
|
"script",
|
|
1748
1748
|
{
|
|
1749
1749
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1847,9 +1847,9 @@ font-weight: ${a};
|
|
|
1847
1847
|
}
|
|
1848
1848
|
`, Ut = (e) => e ? "" : Lt, Bt = (e) => `variant-${e}`;
|
|
1849
1849
|
function Ht(e) {
|
|
1850
|
-
var
|
|
1850
|
+
var v, k, D;
|
|
1851
1851
|
const t = Q(null);
|
|
1852
|
-
|
|
1852
|
+
R(() => !1);
|
|
1853
1853
|
function n(c) {
|
|
1854
1854
|
var h, b;
|
|
1855
1855
|
const p = {
|
|
@@ -1862,7 +1862,7 @@ function Ht(e) {
|
|
|
1862
1862
|
}));
|
|
1863
1863
|
}
|
|
1864
1864
|
function o(c) {
|
|
1865
|
-
var h, b, g,
|
|
1865
|
+
var h, b, g, x, A;
|
|
1866
1866
|
const p = {
|
|
1867
1867
|
...e.builderContextSignal.content,
|
|
1868
1868
|
...c,
|
|
@@ -1873,11 +1873,11 @@ function Ht(e) {
|
|
|
1873
1873
|
meta: {
|
|
1874
1874
|
...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
|
|
1875
1875
|
...c == null ? void 0 : c.meta,
|
|
1876
|
-
breakpoints: ((g = c == null ? void 0 : c.meta) == null ? void 0 : g.breakpoints) || ((
|
|
1876
|
+
breakpoints: ((g = c == null ? void 0 : c.meta) == null ? void 0 : g.breakpoints) || ((A = (x = e.builderContextSignal.content) == null ? void 0 : x.meta) == null ? void 0 : A.breakpoints)
|
|
1877
1877
|
}
|
|
1878
1878
|
};
|
|
1879
|
-
e.setBuilderContextSignal((
|
|
1880
|
-
...
|
|
1879
|
+
e.setBuilderContextSignal((_) => ({
|
|
1880
|
+
..._,
|
|
1881
1881
|
content: p
|
|
1882
1882
|
}));
|
|
1883
1883
|
}
|
|
@@ -1887,7 +1887,7 @@ function Ht(e) {
|
|
|
1887
1887
|
"aria-hidden": !0
|
|
1888
1888
|
};
|
|
1889
1889
|
}
|
|
1890
|
-
const [s, i] =
|
|
1890
|
+
const [s, i] = R(
|
|
1891
1891
|
() => e.contentWrapper || "div"
|
|
1892
1892
|
);
|
|
1893
1893
|
function a(c) {
|
|
@@ -1916,7 +1916,7 @@ function Ht(e) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
})(c);
|
|
1918
1918
|
}
|
|
1919
|
-
const [l, f] =
|
|
1919
|
+
const [l, f] = R(() => ({})), [m, P] = R(() => ({})), [I, E] = R(() => !1);
|
|
1920
1920
|
function d(c) {
|
|
1921
1921
|
var p, h;
|
|
1922
1922
|
if (e.builderContextSignal.content) {
|
|
@@ -1924,47 +1924,69 @@ function Ht(e) {
|
|
|
1924
1924
|
X({
|
|
1925
1925
|
apiHost: e.apiHost,
|
|
1926
1926
|
type: "click",
|
|
1927
|
-
canTrack:
|
|
1927
|
+
canTrack: O(e.canTrack),
|
|
1928
1928
|
contentId: g,
|
|
1929
1929
|
apiKey: e.apiKey,
|
|
1930
1930
|
variationId: b !== g ? b : void 0,
|
|
1931
1931
|
...Pt(c),
|
|
1932
|
-
unique: !
|
|
1932
|
+
unique: !I
|
|
1933
1933
|
});
|
|
1934
1934
|
}
|
|
1935
|
-
|
|
1935
|
+
I || E(!0);
|
|
1936
1936
|
}
|
|
1937
1937
|
function u() {
|
|
1938
1938
|
var p, h, b;
|
|
1939
1939
|
const c = (b = (h = (p = e.builderContextSignal.content) == null ? void 0 : p.data) == null ? void 0 : h.httpRequests) != null ? b : {};
|
|
1940
|
-
Object.entries(c).forEach(
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1940
|
+
Object.entries(c).forEach(
|
|
1941
|
+
([g, x]) => {
|
|
1942
|
+
if (!x)
|
|
1943
|
+
return;
|
|
1944
|
+
const A = typeof x == "object" && x["@type"] === "@builder.io/core:Request";
|
|
1945
|
+
if (m[g] || l[g] && !N())
|
|
1946
|
+
return;
|
|
1947
|
+
const _ = A ? x.request.url : x;
|
|
1948
|
+
m[g] = !0;
|
|
1949
|
+
const S = _.replace(
|
|
1950
|
+
/{{([^}]+)}}/g,
|
|
1951
|
+
(V, L) => String(
|
|
1952
|
+
re({
|
|
1953
|
+
code: L,
|
|
1954
|
+
context: e.context || {},
|
|
1955
|
+
localState: void 0,
|
|
1956
|
+
rootState: e.builderContextSignal.rootState,
|
|
1957
|
+
rootSetState: e.builderContextSignal.rootSetState
|
|
1958
|
+
})
|
|
1959
|
+
)
|
|
1960
|
+
), y = A ? {
|
|
1961
|
+
url: S,
|
|
1962
|
+
method: x.request.method,
|
|
1963
|
+
headers: x.request.headers,
|
|
1964
|
+
body: x.request.body
|
|
1965
|
+
} : {
|
|
1966
|
+
url: S,
|
|
1967
|
+
method: "GET"
|
|
1968
|
+
};
|
|
1969
|
+
xe(JSON.stringify(y)), fetch(y.url, {
|
|
1970
|
+
method: y.method,
|
|
1971
|
+
headers: y.headers,
|
|
1972
|
+
body: y.body
|
|
1973
|
+
}).then((V) => V.json()).then((V) => {
|
|
1974
|
+
n({
|
|
1975
|
+
[g]: V
|
|
1976
|
+
}), l[g] = !0;
|
|
1977
|
+
}).catch((V) => {
|
|
1978
|
+
console.error(
|
|
1979
|
+
"error fetching dynamic data",
|
|
1980
|
+
JSON.stringify(x),
|
|
1981
|
+
V
|
|
1982
|
+
);
|
|
1983
|
+
}).finally(() => {
|
|
1984
|
+
m[g] = !1;
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1987
|
+
);
|
|
1966
1988
|
}
|
|
1967
|
-
function
|
|
1989
|
+
function w() {
|
|
1968
1990
|
N() && window.dispatchEvent(
|
|
1969
1991
|
new CustomEvent(
|
|
1970
1992
|
"builder:component:stateChange",
|
|
@@ -1980,9 +2002,9 @@ function Ht(e) {
|
|
|
1980
2002
|
);
|
|
1981
2003
|
}
|
|
1982
2004
|
const $ = Q(!1);
|
|
1983
|
-
return $.current || (u(),
|
|
2005
|
+
return $.current || (u(), w(), $.current = !0), W(() => {
|
|
1984
2006
|
var c, p, h, b, g;
|
|
1985
|
-
if (
|
|
2007
|
+
if (U()) {
|
|
1986
2008
|
N() && !e.isNestedRender && (window.addEventListener("message", a), ge({
|
|
1987
2009
|
...e.locale ? {
|
|
1988
2010
|
locale: e.locale
|
|
@@ -1998,39 +2020,39 @@ function Ht(e) {
|
|
|
1998
2020
|
}), Object.values(
|
|
1999
2021
|
e.builderContextSignal.componentInfos
|
|
2000
2022
|
).forEach((S) => {
|
|
2001
|
-
var
|
|
2002
|
-
if (!((
|
|
2003
|
-
const
|
|
2004
|
-
(
|
|
2023
|
+
var y, V;
|
|
2024
|
+
if (!((y = S.models) != null && y.length) || S.models.includes(e.model)) {
|
|
2025
|
+
const L = he(S);
|
|
2026
|
+
(V = window.parent) == null || V.postMessage(L, "*");
|
|
2005
2027
|
}
|
|
2006
2028
|
}), window.addEventListener(
|
|
2007
2029
|
"builder:component:stateChangeListenerActivated",
|
|
2008
|
-
|
|
2030
|
+
w
|
|
2009
2031
|
));
|
|
2010
|
-
const
|
|
2032
|
+
const x = e.builderContextSignal.content && O(e.canTrack), A = be({
|
|
2011
2033
|
name: `builder.tests.${(p = e.builderContextSignal.content) == null ? void 0 : p.id}`,
|
|
2012
2034
|
canTrack: !0
|
|
2013
|
-
}),
|
|
2014
|
-
if (
|
|
2015
|
-
const S = (b = e.builderContextSignal.content) == null ? void 0 : b.id,
|
|
2035
|
+
}), _ = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId;
|
|
2036
|
+
if (x && _ === A) {
|
|
2037
|
+
const S = (b = e.builderContextSignal.content) == null ? void 0 : b.id, y = e.apiKey;
|
|
2016
2038
|
X({
|
|
2017
2039
|
apiHost: e.apiHost,
|
|
2018
2040
|
type: "impression",
|
|
2019
2041
|
canTrack: !0,
|
|
2020
2042
|
contentId: S,
|
|
2021
|
-
apiKey:
|
|
2022
|
-
variationId:
|
|
2043
|
+
apiKey: y,
|
|
2044
|
+
variationId: A !== S ? A : void 0
|
|
2023
2045
|
});
|
|
2024
2046
|
}
|
|
2025
2047
|
if (oe() && !N()) {
|
|
2026
|
-
const S = new URL(location.href).searchParams,
|
|
2027
|
-
`builder.overrides.${
|
|
2028
|
-
),
|
|
2029
|
-
(
|
|
2048
|
+
const S = new URL(location.href).searchParams, y = S.get("builder.preview"), V = S.get(
|
|
2049
|
+
`builder.overrides.${y}`
|
|
2050
|
+
), L = S.get("apiKey") || S.get("builder.space");
|
|
2051
|
+
(y === "BUILDER_STUDIO" || y === e.model && L === e.apiKey && (!e.content || V === e.content.id)) && ye({
|
|
2030
2052
|
model: e.model,
|
|
2031
2053
|
apiKey: e.apiKey,
|
|
2032
2054
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
2033
|
-
...
|
|
2055
|
+
...y === "BUILDER_STUDIO" && ((g = e.context) != null && g.symbolId) ? {
|
|
2034
2056
|
query: {
|
|
2035
2057
|
id: e.context.symbolId
|
|
2036
2058
|
}
|
|
@@ -2043,7 +2065,7 @@ function Ht(e) {
|
|
|
2043
2065
|
}, []), W(() => {
|
|
2044
2066
|
e.content && o(e.content);
|
|
2045
2067
|
}, [e.content]), W(() => {
|
|
2046
|
-
|
|
2068
|
+
w();
|
|
2047
2069
|
}, [e.builderContextSignal.rootState]), W(() => {
|
|
2048
2070
|
e.data && n(e.data);
|
|
2049
2071
|
}, [e.data]), W(() => {
|
|
@@ -2051,19 +2073,19 @@ function Ht(e) {
|
|
|
2051
2073
|
locale: e.locale
|
|
2052
2074
|
});
|
|
2053
2075
|
}, [e.locale]), W(() => () => {
|
|
2054
|
-
|
|
2076
|
+
U() && (window.removeEventListener("message", a), window.removeEventListener(
|
|
2055
2077
|
"builder:component:stateChangeListenerActivated",
|
|
2056
|
-
|
|
2078
|
+
w
|
|
2057
2079
|
));
|
|
2058
|
-
}, []), /* @__PURE__ */
|
|
2080
|
+
}, []), /* @__PURE__ */ T(De.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ae() ? /* @__PURE__ */ T(
|
|
2059
2081
|
s,
|
|
2060
2082
|
{
|
|
2061
2083
|
ref: t,
|
|
2062
2084
|
onClick: (c) => d(c),
|
|
2063
|
-
"builder-content-id": (
|
|
2085
|
+
"builder-content-id": (v = e.builderContextSignal.content) == null ? void 0 : v.id,
|
|
2064
2086
|
"builder-model": e.model,
|
|
2065
2087
|
className: Bt(
|
|
2066
|
-
((
|
|
2088
|
+
((k = e.content) == null ? void 0 : k.testVariationId) || ((D = e.content) == null ? void 0 : D.id)
|
|
2067
2089
|
),
|
|
2068
2090
|
style: {
|
|
2069
2091
|
display: !e.builderContextSignal.content && ae() ? "none" : void 0
|
|
@@ -2075,7 +2097,7 @@ function Ht(e) {
|
|
|
2075
2097
|
) : null });
|
|
2076
2098
|
}
|
|
2077
2099
|
function qt(e) {
|
|
2078
|
-
const [t, n] =
|
|
2100
|
+
const [t, n] = R(
|
|
2079
2101
|
() => `
|
|
2080
2102
|
${_t({
|
|
2081
2103
|
cssCode: e.cssCode,
|
|
@@ -2087,7 +2109,7 @@ ${$t({
|
|
|
2087
2109
|
${Ut(e.isNestedRender)}
|
|
2088
2110
|
`.trim()
|
|
2089
2111
|
);
|
|
2090
|
-
return /* @__PURE__ */
|
|
2112
|
+
return /* @__PURE__ */ T(
|
|
2091
2113
|
se,
|
|
2092
2114
|
{
|
|
2093
2115
|
id: "builderio-content",
|
|
@@ -2125,39 +2147,39 @@ const Ot = ({
|
|
|
2125
2147
|
meta: e == null ? void 0 : e.meta
|
|
2126
2148
|
} : void 0;
|
|
2127
2149
|
function ie(e) {
|
|
2128
|
-
var f, m, P,
|
|
2129
|
-
const [t, n] =
|
|
2150
|
+
var f, m, P, I, E, d, u, w, $;
|
|
2151
|
+
const [t, n] = R(
|
|
2130
2152
|
() => {
|
|
2131
|
-
var
|
|
2153
|
+
var v, k;
|
|
2132
2154
|
return At({
|
|
2133
2155
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2134
|
-
variationId: (
|
|
2156
|
+
variationId: (v = e.content) == null ? void 0 : v.testVariationId,
|
|
2135
2157
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2136
|
-
contentId: (
|
|
2158
|
+
contentId: (k = e.content) == null ? void 0 : k.id
|
|
2137
2159
|
});
|
|
2138
2160
|
}
|
|
2139
2161
|
);
|
|
2140
|
-
function o(
|
|
2141
|
-
a((
|
|
2142
|
-
...
|
|
2143
|
-
rootState:
|
|
2162
|
+
function o(v) {
|
|
2163
|
+
a((k) => ({
|
|
2164
|
+
...k,
|
|
2165
|
+
rootState: v
|
|
2144
2166
|
}));
|
|
2145
2167
|
}
|
|
2146
|
-
const [r, s] =
|
|
2168
|
+
const [r, s] = R(
|
|
2147
2169
|
() => [
|
|
2148
2170
|
...ee(),
|
|
2149
2171
|
...e.customComponents || []
|
|
2150
2172
|
].reduce(
|
|
2151
|
-
(
|
|
2152
|
-
...
|
|
2153
|
-
[
|
|
2154
|
-
component:
|
|
2155
|
-
...Z(
|
|
2173
|
+
(v, { component: k, ...D }) => ({
|
|
2174
|
+
...v,
|
|
2175
|
+
[D.name]: {
|
|
2176
|
+
component: k,
|
|
2177
|
+
...Z(D)
|
|
2156
2178
|
}
|
|
2157
2179
|
}),
|
|
2158
2180
|
{}
|
|
2159
2181
|
)
|
|
2160
|
-
), [i, a] =
|
|
2182
|
+
), [i, a] = R(() => ({
|
|
2161
2183
|
content: jt({
|
|
2162
2184
|
content: e.content,
|
|
2163
2185
|
data: e.data
|
|
@@ -2177,9 +2199,9 @@ function ie(e) {
|
|
|
2177
2199
|
...ee(),
|
|
2178
2200
|
...e.customComponents || []
|
|
2179
2201
|
].reduce(
|
|
2180
|
-
(
|
|
2181
|
-
...
|
|
2182
|
-
[
|
|
2202
|
+
(v, { component: k, ...D }) => ({
|
|
2203
|
+
...v,
|
|
2204
|
+
[D.name]: Z(D)
|
|
2183
2205
|
}),
|
|
2184
2206
|
{}
|
|
2185
2207
|
),
|
|
@@ -2193,25 +2215,25 @@ function ie(e) {
|
|
|
2193
2215
|
e.apiKey || Se.error(
|
|
2194
2216
|
"No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2195
2217
|
);
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2198
|
-
code:
|
|
2218
|
+
const v = (m = (f = i.content) == null ? void 0 : f.data) == null ? void 0 : m.jsCode;
|
|
2219
|
+
v && re({
|
|
2220
|
+
code: v,
|
|
2199
2221
|
context: e.context || {},
|
|
2200
2222
|
localState: void 0,
|
|
2201
2223
|
rootState: i.rootState,
|
|
2202
|
-
rootSetState: (
|
|
2203
|
-
Object.assign(i.rootState,
|
|
2224
|
+
rootSetState: (k) => {
|
|
2225
|
+
Object.assign(i.rootState, k);
|
|
2204
2226
|
},
|
|
2205
2227
|
isExpression: !1
|
|
2206
2228
|
}), l.current = !0;
|
|
2207
2229
|
}
|
|
2208
|
-
return /* @__PURE__ */
|
|
2230
|
+
return /* @__PURE__ */ T(
|
|
2209
2231
|
We.Provider,
|
|
2210
2232
|
{
|
|
2211
2233
|
value: {
|
|
2212
2234
|
registeredComponents: r
|
|
2213
2235
|
},
|
|
2214
|
-
children: /* @__PURE__ */
|
|
2236
|
+
children: /* @__PURE__ */ B(
|
|
2215
2237
|
Ht,
|
|
2216
2238
|
{
|
|
2217
2239
|
apiHost: e.apiHost,
|
|
@@ -2232,28 +2254,28 @@ function ie(e) {
|
|
|
2232
2254
|
isNestedRender: e.isNestedRender,
|
|
2233
2255
|
setBuilderContextSignal: a,
|
|
2234
2256
|
children: [
|
|
2235
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
2236
|
-
|
|
2257
|
+
e.isSsrAbTest ? /* @__PURE__ */ T(
|
|
2258
|
+
q,
|
|
2237
2259
|
{
|
|
2238
2260
|
id: "builderio-variant-visibility",
|
|
2239
2261
|
scriptStr: t,
|
|
2240
2262
|
nonce: e.nonce || ""
|
|
2241
2263
|
}
|
|
2242
2264
|
) : null,
|
|
2243
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ T(
|
|
2244
2266
|
qt,
|
|
2245
2267
|
{
|
|
2246
2268
|
nonce: e.nonce || "",
|
|
2247
2269
|
isNestedRender: e.isNestedRender,
|
|
2248
2270
|
contentId: (P = i.content) == null ? void 0 : P.id,
|
|
2249
|
-
cssCode: (
|
|
2271
|
+
cssCode: (E = (I = i.content) == null ? void 0 : I.data) == null ? void 0 : E.cssCode,
|
|
2250
2272
|
customFonts: (u = (d = i.content) == null ? void 0 : d.data) == null ? void 0 : u.customFonts
|
|
2251
2273
|
}
|
|
2252
2274
|
),
|
|
2253
|
-
/* @__PURE__ */
|
|
2275
|
+
/* @__PURE__ */ T(
|
|
2254
2276
|
Ne,
|
|
2255
2277
|
{
|
|
2256
|
-
blocks: ($ = (
|
|
2278
|
+
blocks: ($ = (w = i.content) == null ? void 0 : w.data) == null ? void 0 : $.blocks,
|
|
2257
2279
|
context: i,
|
|
2258
2280
|
registeredComponents: r,
|
|
2259
2281
|
linkComponent: e.linkComponent
|
|
@@ -2267,16 +2289,16 @@ function ie(e) {
|
|
|
2267
2289
|
}
|
|
2268
2290
|
function Mt(e) {
|
|
2269
2291
|
var i;
|
|
2270
|
-
const [t, n] =
|
|
2292
|
+
const [t, n] = R(
|
|
2271
2293
|
() => Ct({
|
|
2272
|
-
canTrack:
|
|
2294
|
+
canTrack: O(e.canTrack),
|
|
2273
2295
|
content: e.content
|
|
2274
2296
|
})
|
|
2275
2297
|
);
|
|
2276
2298
|
function o() {
|
|
2277
2299
|
var a;
|
|
2278
2300
|
return Rt(
|
|
2279
|
-
|
|
2301
|
+
H(e.content).map((l) => ({
|
|
2280
2302
|
id: l.testVariationId,
|
|
2281
2303
|
testRatio: l.testRatio
|
|
2282
2304
|
})),
|
|
@@ -2284,7 +2306,7 @@ function Mt(e) {
|
|
|
2284
2306
|
);
|
|
2285
2307
|
}
|
|
2286
2308
|
function r() {
|
|
2287
|
-
return
|
|
2309
|
+
return H(e.content).map((a) => `.variant-${a.testVariationId} { display: none; } `).join("");
|
|
2288
2310
|
}
|
|
2289
2311
|
function s() {
|
|
2290
2312
|
var a;
|
|
@@ -2293,22 +2315,22 @@ function Mt(e) {
|
|
|
2293
2315
|
testVariationId: (a = e.content) == null ? void 0 : a.id
|
|
2294
2316
|
} : Te({
|
|
2295
2317
|
item: e.content,
|
|
2296
|
-
canTrack:
|
|
2318
|
+
canTrack: O(e.canTrack)
|
|
2297
2319
|
});
|
|
2298
2320
|
}
|
|
2299
2321
|
return W(() => {
|
|
2300
|
-
}, []), /* @__PURE__ */
|
|
2301
|
-
!e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */
|
|
2302
|
-
/* @__PURE__ */
|
|
2303
|
-
|
|
2322
|
+
}, []), /* @__PURE__ */ B(j, { children: [
|
|
2323
|
+
!e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */ B(j, { children: [
|
|
2324
|
+
/* @__PURE__ */ T(
|
|
2325
|
+
q,
|
|
2304
2326
|
{
|
|
2305
2327
|
id: "builderio-init-variants-fns",
|
|
2306
2328
|
scriptStr: Et(),
|
|
2307
2329
|
nonce: e.nonce || ""
|
|
2308
2330
|
}
|
|
2309
2331
|
),
|
|
2310
|
-
de.includes(F) ? /* @__PURE__ */
|
|
2311
|
-
|
|
2332
|
+
de.includes(F) ? /* @__PURE__ */ T(
|
|
2333
|
+
q,
|
|
2312
2334
|
{
|
|
2313
2335
|
id: "builderio-init-personalization-variants-fns",
|
|
2314
2336
|
nonce: e.nonce || "",
|
|
@@ -2316,8 +2338,8 @@ function Mt(e) {
|
|
|
2316
2338
|
}
|
|
2317
2339
|
) : null
|
|
2318
2340
|
] }) : null,
|
|
2319
|
-
t ? /* @__PURE__ */
|
|
2320
|
-
/* @__PURE__ */
|
|
2341
|
+
t ? /* @__PURE__ */ B(j, { children: [
|
|
2342
|
+
/* @__PURE__ */ T(
|
|
2321
2343
|
se,
|
|
2322
2344
|
{
|
|
2323
2345
|
id: "builderio-variants",
|
|
@@ -2325,15 +2347,15 @@ function Mt(e) {
|
|
|
2325
2347
|
nonce: e.nonce || ""
|
|
2326
2348
|
}
|
|
2327
2349
|
),
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
|
|
2350
|
+
/* @__PURE__ */ T(
|
|
2351
|
+
q,
|
|
2330
2352
|
{
|
|
2331
2353
|
id: "builderio-variants-visibility",
|
|
2332
2354
|
scriptStr: o(),
|
|
2333
2355
|
nonce: e.nonce || ""
|
|
2334
2356
|
}
|
|
2335
2357
|
),
|
|
2336
|
-
(i =
|
|
2358
|
+
(i = H(e.content)) == null ? void 0 : i.map((a) => /* @__PURE__ */ T(
|
|
2337
2359
|
ie,
|
|
2338
2360
|
{
|
|
2339
2361
|
apiHost: e.apiHost,
|
|
@@ -2361,7 +2383,7 @@ function Mt(e) {
|
|
|
2361
2383
|
a.testVariationId
|
|
2362
2384
|
))
|
|
2363
2385
|
] }) : null,
|
|
2364
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ T(
|
|
2365
2387
|
ie,
|
|
2366
2388
|
{
|
|
2367
2389
|
apiHost: e.apiHost,
|
|
@@ -2395,7 +2417,7 @@ const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2395
2417
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2396
2418
|
export {
|
|
2397
2419
|
Ue as DEFAULT_INDEX,
|
|
2398
|
-
|
|
2420
|
+
q as InlinedScript,
|
|
2399
2421
|
He as SDKS_REQUIRING_RESET_APPROACH,
|
|
2400
2422
|
Xt as checkShouldRenderVariants,
|
|
2401
2423
|
nn as contentVariants,
|