@builder.io/sdk-react 1.0.15 → 1.0.17
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 +21 -21
- package/lib/browser/blocks-exports.mjs +542 -527
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-3d9c0013.js → server-entry-064a8b7f.js} +1 -1
- package/lib/browser/{server-entry-60192a70.cjs → server-entry-a7b75909.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-8cf047ac.cjs → blocks-1f59d1c0.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{blocks-874a3da2.js → blocks-fe027bf7.js} +10 -4
- package/lib/edge/{button-e8062d3a.cjs → button-36ac5d97.cjs} +1 -1
- package/lib/edge/{button-f921801d.js → button-8fdd068a.js} +2 -2
- package/lib/edge/{columns-cd3277d0.cjs → columns-36bdc015.cjs} +2 -2
- package/lib/edge/{columns-3d6fd99f.js → columns-4f789807.js} +27 -27
- package/lib/edge/content-variants-87f99284.cjs +134 -0
- package/lib/edge/{content-variants-716e35d3.js → content-variants-a26825d5.js} +282 -273
- package/lib/edge/{form-ed39d763.js → form-004ab04e.js} +3 -3
- package/lib/edge/{form-9e4155f9.cjs → form-6b599bb9.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-97c37936.cjs → get-class-prop-name-522545c4.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-63df96dc.js → get-class-prop-name-ee5eac9d.js} +1 -1
- package/lib/edge/{img-60cd5cd5.js → img-5d36c59d.js} +1 -1
- package/lib/edge/{img-4c6f100c.cjs → img-d311451e.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-cf3adf1f.js → input-211240f4.js} +1 -1
- package/lib/edge/{input-2d8eb4bc.cjs → input-34a4e538.cjs} +1 -1
- package/lib/edge/{select-8e2ef3ed.cjs → select-a425b313.cjs} +1 -1
- package/lib/edge/{select-03974bcf.js → select-e592f42a.js} +1 -1
- package/lib/edge/{server-entry-1263a732.cjs → server-entry-04a076eb.cjs} +1 -1
- package/lib/edge/{server-entry-24e90a71.js → server-entry-633c4fab.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-972c3844.cjs → slot-1547b467.cjs} +1 -1
- package/lib/edge/{slot-1408ceff.js → slot-20e9bd0c.js} +3 -3
- package/lib/edge/{symbol-781970fe.cjs → symbol-441a42f8.cjs} +1 -1
- package/lib/edge/{symbol-80a11943.js → symbol-8aa6a69b.js} +2 -2
- package/lib/node/blocks-exports.cjs +11 -11
- package/lib/node/blocks-exports.mjs +482 -467
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{server-entry-016a36f7.js → server-entry-a2617044.js} +1 -1
- package/lib/node/{server-entry-71df0c38.cjs → server-entry-e66a06c7.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/components/content-variants/helpers.d.ts +1 -1
- package/types/components/inlined-script.d.ts +1 -1
- package/types/components/inlined-styles.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/content-variants-23991643.cjs +0 -134
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { isBrowser as U, TARGET as Q, isEditing as A, registerInsertMenu as
|
|
4
|
-
import { Video as
|
|
5
|
-
import { builderContext as Se, triggerAnimation as
|
|
6
|
-
import "./get-class-prop-name-
|
|
1
|
+
import { jsx as f, jsxs as P, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as C, useRef as ne, useState as I, useEffect as S } from "react";
|
|
3
|
+
import { isBrowser as U, TARGET as Q, isEditing as A, registerInsertMenu as ae, setupBrowserForEditing as ie, createRegisterComponentMessage as oe, getDefaultCanTrack as W, _track as _, isPreviewing as re, fetchOneEntry as se, logger as le, createEditorListener as de, fetch as ce, fastClone as ue, serializeComponentInfo as B, handleABTestingSync as me } from "./server-entry-633c4fab.js";
|
|
4
|
+
import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve } from "./blocks-exports.mjs";
|
|
5
|
+
import { builderContext as Se, triggerAnimation as Ie, evaluate as M, InlinedStyles as G, ComponentsContext as ke, Blocks as Te } from "./blocks-fe027bf7.js";
|
|
6
|
+
import "./get-class-prop-name-ee5eac9d.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
|
-
const
|
|
8
|
+
const Ce = {
|
|
9
9
|
name: "Core:Button",
|
|
10
10
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
11
11
|
defaultStyles: {
|
|
@@ -38,7 +38,7 @@ const Te = {
|
|
|
38
38
|
}],
|
|
39
39
|
static: !0,
|
|
40
40
|
noWrap: !0
|
|
41
|
-
},
|
|
41
|
+
}, we = {
|
|
42
42
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
43
43
|
name: "Columns",
|
|
44
44
|
isRSC: !0,
|
|
@@ -217,7 +217,7 @@ const Te = {
|
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
const n = e.get("columns");
|
|
220
|
-
Array.isArray(n) && n.find((
|
|
220
|
+
Array.isArray(n) && n.find((d) => d.get("width")) && (n.find((p) => !p.get("width")) || n.reduce((o, u) => o + u.get("width"), 0) !== 100) && t();
|
|
221
221
|
}
|
|
222
222
|
}, {
|
|
223
223
|
name: "space",
|
|
@@ -239,13 +239,13 @@ const Te = {
|
|
|
239
239
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
240
240
|
advanced: !0
|
|
241
241
|
}]
|
|
242
|
-
},
|
|
242
|
+
}, Ve = {
|
|
243
243
|
name: "Fragment",
|
|
244
244
|
static: !0,
|
|
245
245
|
hidden: !0,
|
|
246
246
|
canHaveChildren: !0,
|
|
247
247
|
noWrap: !0
|
|
248
|
-
},
|
|
248
|
+
}, Re = {
|
|
249
249
|
name: "Image",
|
|
250
250
|
static: !0,
|
|
251
251
|
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",
|
|
@@ -265,29 +265,29 @@ const Te = {
|
|
|
265
265
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
266
266
|
onChange: (e) => {
|
|
267
267
|
e.delete("srcset"), e.delete("noWebp");
|
|
268
|
-
function n(i,
|
|
269
|
-
return new Promise((
|
|
270
|
-
const
|
|
271
|
-
let
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
console.warn("Image load failed",
|
|
276
|
-
}),
|
|
277
|
-
|
|
278
|
-
},
|
|
268
|
+
function n(i, o = 6e4) {
|
|
269
|
+
return new Promise((u, v) => {
|
|
270
|
+
const b = document.createElement("img");
|
|
271
|
+
let w = !1;
|
|
272
|
+
b.onload = () => {
|
|
273
|
+
w = !0, u(b);
|
|
274
|
+
}, b.addEventListener("error", (k) => {
|
|
275
|
+
console.warn("Image load failed", k.error), v(k.error);
|
|
276
|
+
}), b.src = i, setTimeout(() => {
|
|
277
|
+
w || v(new Error("Image load timed out"));
|
|
278
|
+
}, o);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
function a(i) {
|
|
282
282
|
return Math.round(i * 1e3) / 1e3;
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
if (fetch(
|
|
284
|
+
const d = e.get("image"), p = e.get("aspectRatio");
|
|
285
|
+
if (fetch(d).then((i) => i.blob()).then((i) => {
|
|
286
286
|
i.type.includes("svg") && e.set("noWebp", !0);
|
|
287
|
-
}),
|
|
288
|
-
return n(
|
|
289
|
-
const
|
|
290
|
-
e.get("image") ===
|
|
287
|
+
}), d && (!p || p === 0.7041))
|
|
288
|
+
return n(d).then((i) => {
|
|
289
|
+
const o = e.get("aspectRatio");
|
|
290
|
+
e.get("image") === d && (!o || o === 0.7041) && i.width && i.height && (e.set("aspectRatio", a(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
}, {
|
|
@@ -345,7 +345,7 @@ const Te = {
|
|
|
345
345
|
advanced: !0,
|
|
346
346
|
defaultValue: 0.7041
|
|
347
347
|
}]
|
|
348
|
-
},
|
|
348
|
+
}, Ee = {
|
|
349
349
|
name: "Core:Section",
|
|
350
350
|
static: !0,
|
|
351
351
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -384,7 +384,7 @@ const Te = {
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
}]
|
|
387
|
-
},
|
|
387
|
+
}, Fe = {
|
|
388
388
|
name: "Slot",
|
|
389
389
|
isRSC: !0,
|
|
390
390
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -397,7 +397,7 @@ const Te = {
|
|
|
397
397
|
required: !0,
|
|
398
398
|
defaultValue: "children"
|
|
399
399
|
}]
|
|
400
|
-
},
|
|
400
|
+
}, We = C(() => import("./slot-20e9bd0c.js")), Ae = {
|
|
401
401
|
name: "Symbol",
|
|
402
402
|
noWrap: !0,
|
|
403
403
|
static: !0,
|
|
@@ -430,7 +430,7 @@ const Te = {
|
|
|
430
430
|
hideFromUI: !0,
|
|
431
431
|
type: "boolean"
|
|
432
432
|
}]
|
|
433
|
-
},
|
|
433
|
+
}, Pe = {
|
|
434
434
|
name: "Text",
|
|
435
435
|
static: !0,
|
|
436
436
|
isRSC: !0,
|
|
@@ -448,7 +448,7 @@ const Te = {
|
|
|
448
448
|
height: "auto",
|
|
449
449
|
textAlign: "center"
|
|
450
450
|
}
|
|
451
|
-
},
|
|
451
|
+
}, Ue = {
|
|
452
452
|
name: "Custom Code",
|
|
453
453
|
static: !0,
|
|
454
454
|
requiredPermissions: ["editCode"],
|
|
@@ -470,7 +470,7 @@ const Te = {
|
|
|
470
470
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
471
471
|
advanced: !0
|
|
472
472
|
}]
|
|
473
|
-
},
|
|
473
|
+
}, $e = C(() => import("./custom-code-7786788e.js")), He = {
|
|
474
474
|
name: "Embed",
|
|
475
475
|
static: !0,
|
|
476
476
|
inputs: [{
|
|
@@ -495,7 +495,7 @@ const Te = {
|
|
|
495
495
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
496
496
|
hideFromUI: !0
|
|
497
497
|
}]
|
|
498
|
-
}, De =
|
|
498
|
+
}, De = C(() => import("./embed-5c1bbe12.js")), Le = {
|
|
499
499
|
name: "Form:Form",
|
|
500
500
|
// editableTags: ['builder-form-error']
|
|
501
501
|
defaults: {
|
|
@@ -726,7 +726,7 @@ const Te = {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}]
|
|
729
|
-
},
|
|
729
|
+
}, qe = C(() => import("./form-004ab04e.js")), Ne = {
|
|
730
730
|
name: "Form:Input",
|
|
731
731
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
732
732
|
inputs: [
|
|
@@ -777,7 +777,7 @@ const Te = {
|
|
|
777
777
|
borderStyle: "solid",
|
|
778
778
|
borderColor: "#ccc"
|
|
779
779
|
}
|
|
780
|
-
}, je =
|
|
780
|
+
}, je = C(() => import("./input-211240f4.js")), Ke = {
|
|
781
781
|
name: "Form:Select",
|
|
782
782
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
783
783
|
defaultStyles: {
|
|
@@ -819,7 +819,7 @@ const Te = {
|
|
|
819
819
|
}],
|
|
820
820
|
static: !0,
|
|
821
821
|
noWrap: !0
|
|
822
|
-
},
|
|
822
|
+
}, _e = C(() => import("./select-e592f42a.js")), Be = {
|
|
823
823
|
name: "Form:SubmitButton",
|
|
824
824
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
825
825
|
defaultStyles: {
|
|
@@ -844,7 +844,7 @@ const Te = {
|
|
|
844
844
|
// that only shows if advanced setting is flipped
|
|
845
845
|
// TODO: defaultChildren
|
|
846
846
|
// canHaveChildren: true,
|
|
847
|
-
},
|
|
847
|
+
}, Me = C(() => import("./submit-button-b48361a7.js")), Oe = {
|
|
848
848
|
// friendlyName?
|
|
849
849
|
name: "Raw:Img",
|
|
850
850
|
hideFromInsertMenu: !0,
|
|
@@ -858,7 +858,7 @@ const Te = {
|
|
|
858
858
|
}],
|
|
859
859
|
noWrap: !0,
|
|
860
860
|
static: !0
|
|
861
|
-
},
|
|
861
|
+
}, ze = C(() => import("./img-5d36c59d.js")), Je = {
|
|
862
862
|
name: "Video",
|
|
863
863
|
canHaveChildren: !0,
|
|
864
864
|
defaultStyles: {
|
|
@@ -939,34 +939,31 @@ const Te = {
|
|
|
939
939
|
defaultValue: !0,
|
|
940
940
|
advanced: !0
|
|
941
941
|
}]
|
|
942
|
-
},
|
|
943
|
-
component:
|
|
944
|
-
...
|
|
942
|
+
}, Ye = () => [{
|
|
943
|
+
component: $e,
|
|
944
|
+
...Ue
|
|
945
945
|
}, {
|
|
946
946
|
component: De,
|
|
947
|
-
...$e
|
|
948
|
-
}, {
|
|
949
|
-
component: Le,
|
|
950
947
|
...He
|
|
948
|
+
}, {
|
|
949
|
+
component: qe,
|
|
950
|
+
...Le
|
|
951
951
|
}, {
|
|
952
952
|
component: je,
|
|
953
953
|
...Ne
|
|
954
954
|
}, {
|
|
955
|
-
component:
|
|
956
|
-
...
|
|
955
|
+
component: Me,
|
|
956
|
+
...Be
|
|
957
957
|
}, {
|
|
958
|
-
component:
|
|
959
|
-
...
|
|
958
|
+
component: _e,
|
|
959
|
+
...Ke
|
|
960
960
|
}, {
|
|
961
|
-
component:
|
|
962
|
-
...
|
|
961
|
+
component: ze,
|
|
962
|
+
...Oe
|
|
963
963
|
}, {
|
|
964
|
-
component: me,
|
|
965
|
-
...ze
|
|
966
|
-
}], O = () => [{
|
|
967
964
|
component: pe,
|
|
968
|
-
...
|
|
969
|
-
}, {
|
|
965
|
+
...Je
|
|
966
|
+
}], O = () => [{
|
|
970
967
|
component: ge,
|
|
971
968
|
...Ce
|
|
972
969
|
}, {
|
|
@@ -979,15 +976,18 @@ const Te = {
|
|
|
979
976
|
component: be,
|
|
980
977
|
...Re
|
|
981
978
|
}, {
|
|
982
|
-
component:
|
|
979
|
+
component: ye,
|
|
983
980
|
...Ee
|
|
984
981
|
}, {
|
|
985
|
-
component:
|
|
986
|
-
...
|
|
982
|
+
component: We,
|
|
983
|
+
...Fe
|
|
987
984
|
}, {
|
|
988
985
|
component: xe,
|
|
989
986
|
...Ae
|
|
990
|
-
},
|
|
987
|
+
}, {
|
|
988
|
+
component: ve,
|
|
989
|
+
...Pe
|
|
990
|
+
}, ...Ye()], Qe = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
991
991
|
function getAndSetVariantId() {
|
|
992
992
|
function setCookie(name, value, days) {
|
|
993
993
|
let expires = '';
|
|
@@ -1043,7 +1043,7 @@ const Te = {
|
|
|
1043
1043
|
}).join('');
|
|
1044
1044
|
styleEl.innerHTML = newStyleStr;
|
|
1045
1045
|
}
|
|
1046
|
-
}`,
|
|
1046
|
+
}`, Ge = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
1047
1047
|
if (!navigator.cookieEnabled) {
|
|
1048
1048
|
return;
|
|
1049
1049
|
}
|
|
@@ -1081,34 +1081,34 @@ const Te = {
|
|
|
1081
1081
|
...t,
|
|
1082
1082
|
testVariationId: t.id,
|
|
1083
1083
|
id: e == null ? void 0 : e.id
|
|
1084
|
-
})),
|
|
1084
|
+
})), Xe = ({
|
|
1085
1085
|
canTrack: e,
|
|
1086
1086
|
content: t
|
|
1087
|
-
}) => !(!(F(t).length > 0) || !e || U()),
|
|
1088
|
-
window.${X} = ${
|
|
1089
|
-
window.${Z} = ${
|
|
1090
|
-
`,
|
|
1087
|
+
}) => !(!(F(t).length > 0) || !e || U()), Ze = (e) => e === "react" || e === "reactNative", ee = Ze(Q), et = () => `
|
|
1088
|
+
window.${X} = ${Qe}
|
|
1089
|
+
window.${Z} = ${Ge}
|
|
1090
|
+
`, tt = (e, t) => `
|
|
1091
1091
|
window.${X}(
|
|
1092
1092
|
"${t}",${JSON.stringify(e)}, ${ee}
|
|
1093
|
-
)`,
|
|
1093
|
+
)`, nt = ({
|
|
1094
1094
|
contentId: e,
|
|
1095
1095
|
variationId: t
|
|
1096
1096
|
}) => `window.${Z}(
|
|
1097
1097
|
"${t}", "${e}", ${ee}
|
|
1098
1098
|
)`;
|
|
1099
1099
|
function $(e) {
|
|
1100
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ f(
|
|
1101
1101
|
"script",
|
|
1102
1102
|
{
|
|
1103
1103
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
1104
|
-
id: e.id
|
|
1104
|
+
"data-id": e.id
|
|
1105
1105
|
}
|
|
1106
1106
|
);
|
|
1107
1107
|
}
|
|
1108
1108
|
function z(e) {
|
|
1109
1109
|
return Math.round(e * 1e3) / 1e3;
|
|
1110
1110
|
}
|
|
1111
|
-
const
|
|
1111
|
+
const at = (e, t, n = !0) => {
|
|
1112
1112
|
if (!(e instanceof HTMLElement))
|
|
1113
1113
|
return null;
|
|
1114
1114
|
let a = n ? e : e.parentElement;
|
|
@@ -1119,20 +1119,20 @@ const nt = (e, t, n = !0) => {
|
|
|
1119
1119
|
return a;
|
|
1120
1120
|
} while (a = a.parentElement);
|
|
1121
1121
|
return null;
|
|
1122
|
-
},
|
|
1122
|
+
}, it = (e) => at(e, (t) => {
|
|
1123
1123
|
const n = t.getAttribute("builder-id") || t.id;
|
|
1124
1124
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
1125
1125
|
}), J = ({
|
|
1126
1126
|
event: e,
|
|
1127
1127
|
target: t
|
|
1128
1128
|
}) => {
|
|
1129
|
-
const n = t.getBoundingClientRect(), a = e.clientX - n.left,
|
|
1129
|
+
const n = t.getBoundingClientRect(), a = e.clientX - n.left, d = e.clientY - n.top, p = z(a / n.width), i = z(d / n.height);
|
|
1130
1130
|
return {
|
|
1131
1131
|
x: p,
|
|
1132
1132
|
y: i
|
|
1133
1133
|
};
|
|
1134
|
-
},
|
|
1135
|
-
const t = e.target, n = t &&
|
|
1134
|
+
}, ot = (e) => {
|
|
1135
|
+
const t = e.target, n = t && it(t), a = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
1136
1136
|
return {
|
|
1137
1137
|
targetBuilderElement: a || void 0,
|
|
1138
1138
|
metadata: {
|
|
@@ -1148,71 +1148,71 @@ const nt = (e, t, n = !0) => {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
};
|
|
1150
1150
|
};
|
|
1151
|
-
function
|
|
1152
|
-
var
|
|
1153
|
-
const t =
|
|
1154
|
-
function n(
|
|
1155
|
-
var
|
|
1156
|
-
const
|
|
1151
|
+
function rt(e) {
|
|
1152
|
+
var T, H, D, L, q, N, j;
|
|
1153
|
+
const t = ne(null);
|
|
1154
|
+
function n(r) {
|
|
1155
|
+
var m, l;
|
|
1156
|
+
const c = {
|
|
1157
1157
|
...e.builderContextSignal.rootState,
|
|
1158
|
-
...
|
|
1158
|
+
...r
|
|
1159
1159
|
};
|
|
1160
|
-
e.builderContextSignal.rootSetState ? (
|
|
1161
|
-
...
|
|
1162
|
-
rootState:
|
|
1160
|
+
e.builderContextSignal.rootSetState ? (l = (m = e.builderContextSignal).rootSetState) == null || l.call(m, c) : e.setBuilderContextSignal((s) => ({
|
|
1161
|
+
...s,
|
|
1162
|
+
rootState: c
|
|
1163
1163
|
}));
|
|
1164
1164
|
}
|
|
1165
|
-
function a(
|
|
1166
|
-
var
|
|
1167
|
-
const
|
|
1165
|
+
function a(r) {
|
|
1166
|
+
var m, l, s, g, V;
|
|
1167
|
+
const c = {
|
|
1168
1168
|
...e.builderContextSignal.content,
|
|
1169
|
-
...
|
|
1169
|
+
...r,
|
|
1170
1170
|
data: {
|
|
1171
|
-
...(
|
|
1172
|
-
...
|
|
1171
|
+
...(m = e.builderContextSignal.content) == null ? void 0 : m.data,
|
|
1172
|
+
...r == null ? void 0 : r.data
|
|
1173
1173
|
},
|
|
1174
1174
|
meta: {
|
|
1175
|
-
...(
|
|
1176
|
-
...
|
|
1177
|
-
breakpoints: ((
|
|
1175
|
+
...(l = e.builderContextSignal.content) == null ? void 0 : l.meta,
|
|
1176
|
+
...r == null ? void 0 : r.meta,
|
|
1177
|
+
breakpoints: ((s = r == null ? void 0 : r.meta) == null ? void 0 : s.breakpoints) || ((V = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : V.breakpoints)
|
|
1178
1178
|
}
|
|
1179
1179
|
};
|
|
1180
|
-
e.setBuilderContextSignal((
|
|
1181
|
-
...
|
|
1182
|
-
content:
|
|
1180
|
+
e.setBuilderContextSignal((x) => ({
|
|
1181
|
+
...x,
|
|
1182
|
+
content: c
|
|
1183
1183
|
}));
|
|
1184
1184
|
}
|
|
1185
|
-
const [
|
|
1185
|
+
const [d, p] = I(
|
|
1186
1186
|
() => e.contentWrapper || "div"
|
|
1187
1187
|
);
|
|
1188
|
-
function i(
|
|
1189
|
-
return
|
|
1188
|
+
function i(r) {
|
|
1189
|
+
return de({
|
|
1190
1190
|
model: e.model,
|
|
1191
1191
|
trustedHosts: e.trustedHosts,
|
|
1192
1192
|
callbacks: {
|
|
1193
|
-
configureSdk: (
|
|
1194
|
-
var
|
|
1195
|
-
const { breakpoints:
|
|
1196
|
-
!
|
|
1193
|
+
configureSdk: (c) => {
|
|
1194
|
+
var s;
|
|
1195
|
+
const { breakpoints: m, contentId: l } = c;
|
|
1196
|
+
!l || l !== ((s = e.builderContextSignal.content) == null ? void 0 : s.id) || m && a({
|
|
1197
1197
|
meta: {
|
|
1198
|
-
breakpoints:
|
|
1198
|
+
breakpoints: m
|
|
1199
1199
|
}
|
|
1200
1200
|
});
|
|
1201
1201
|
},
|
|
1202
|
-
animation: (
|
|
1203
|
-
|
|
1202
|
+
animation: (c) => {
|
|
1203
|
+
Ie(c);
|
|
1204
1204
|
},
|
|
1205
|
-
contentUpdate: (
|
|
1206
|
-
a(
|
|
1205
|
+
contentUpdate: (c) => {
|
|
1206
|
+
a(c);
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
})(
|
|
1209
|
+
})(r);
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
var
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
code:
|
|
1211
|
+
function o() {
|
|
1212
|
+
var c, m;
|
|
1213
|
+
const r = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.jsCode;
|
|
1214
|
+
r && M({
|
|
1215
|
+
code: r,
|
|
1216
1216
|
context: e.context || {},
|
|
1217
1217
|
localState: void 0,
|
|
1218
1218
|
rootState: e.builderContextSignal.rootState,
|
|
@@ -1223,70 +1223,61 @@ function ot(e) {
|
|
|
1223
1223
|
enableCache: !1
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
|
-
const [
|
|
1227
|
-
function
|
|
1228
|
-
var
|
|
1226
|
+
const [u, v] = I(() => ({})), [b, w] = I(() => ({})), [k, R] = I(() => !1);
|
|
1227
|
+
function E(r) {
|
|
1228
|
+
var c, m;
|
|
1229
1229
|
if (e.builderContextSignal.content) {
|
|
1230
|
-
const
|
|
1230
|
+
const l = (c = e.builderContextSignal.content) == null ? void 0 : c.testVariationId, s = (m = e.builderContextSignal.content) == null ? void 0 : m.id;
|
|
1231
1231
|
_({
|
|
1232
1232
|
type: "click",
|
|
1233
1233
|
canTrack: W(e.canTrack),
|
|
1234
|
-
contentId:
|
|
1234
|
+
contentId: s,
|
|
1235
1235
|
apiKey: e.apiKey,
|
|
1236
|
-
variationId:
|
|
1237
|
-
...
|
|
1238
|
-
unique: !
|
|
1236
|
+
variationId: l !== s ? l : void 0,
|
|
1237
|
+
...ot(r),
|
|
1238
|
+
unique: !k
|
|
1239
1239
|
});
|
|
1240
1240
|
}
|
|
1241
|
-
|
|
1242
|
-
}
|
|
1243
|
-
function V(o) {
|
|
1244
|
-
return o.replace(
|
|
1245
|
-
/{{([^}]+)}}/g,
|
|
1246
|
-
(s, l) => String(
|
|
1247
|
-
M({
|
|
1248
|
-
code: l,
|
|
1249
|
-
context: e.context || {},
|
|
1250
|
-
localState: void 0,
|
|
1251
|
-
rootState: e.builderContextSignal.rootState,
|
|
1252
|
-
rootSetState: e.builderContextSignal.rootSetState,
|
|
1253
|
-
enableCache: !0
|
|
1254
|
-
})
|
|
1255
|
-
)
|
|
1256
|
-
);
|
|
1257
|
-
}
|
|
1258
|
-
function R({ url: o, key: s }) {
|
|
1259
|
-
ce(o).then((l) => l.json()).then((l) => {
|
|
1260
|
-
var c, g;
|
|
1261
|
-
const d = {
|
|
1262
|
-
...e.builderContextSignal.rootState,
|
|
1263
|
-
[s]: l
|
|
1264
|
-
};
|
|
1265
|
-
(g = (c = e.builderContextSignal).rootSetState) == null || g.call(c, d), r[s] = !0;
|
|
1266
|
-
}).catch((l) => {
|
|
1267
|
-
console.error("error fetching dynamic data", o, l);
|
|
1268
|
-
});
|
|
1241
|
+
k || R(!0);
|
|
1269
1242
|
}
|
|
1270
1243
|
function y() {
|
|
1271
|
-
var
|
|
1272
|
-
const
|
|
1273
|
-
Object.entries(
|
|
1274
|
-
if (g
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1244
|
+
var c, m, l;
|
|
1245
|
+
const r = (l = (m = (c = e.builderContextSignal.content) == null ? void 0 : c.data) == null ? void 0 : m.httpRequests) != null ? l : {};
|
|
1246
|
+
Object.entries(r).forEach(([s, g]) => {
|
|
1247
|
+
if (!g || b[s] || u[s] && !A())
|
|
1248
|
+
return;
|
|
1249
|
+
b[s] = !0;
|
|
1250
|
+
const V = g.replace(
|
|
1251
|
+
/{{([^}]+)}}/g,
|
|
1252
|
+
(x, te) => String(
|
|
1253
|
+
M({
|
|
1254
|
+
code: te,
|
|
1255
|
+
context: e.context || {},
|
|
1256
|
+
localState: void 0,
|
|
1257
|
+
rootState: e.builderContextSignal.rootState,
|
|
1258
|
+
rootSetState: e.builderContextSignal.rootSetState,
|
|
1259
|
+
enableCache: !0
|
|
1260
|
+
})
|
|
1261
|
+
)
|
|
1262
|
+
);
|
|
1263
|
+
ce(V).then((x) => x.json()).then((x) => {
|
|
1264
|
+
n({
|
|
1265
|
+
[s]: x
|
|
1266
|
+
}), u[s] = !0;
|
|
1267
|
+
}).catch((x) => {
|
|
1268
|
+
console.error("error fetching dynamic data", g, x);
|
|
1269
|
+
}).finally(() => {
|
|
1270
|
+
b[s] = !1;
|
|
1271
|
+
});
|
|
1281
1272
|
});
|
|
1282
1273
|
}
|
|
1283
|
-
function
|
|
1274
|
+
function h() {
|
|
1284
1275
|
A() && window.dispatchEvent(
|
|
1285
1276
|
new CustomEvent(
|
|
1286
1277
|
"builder:component:stateChange",
|
|
1287
1278
|
{
|
|
1288
1279
|
detail: {
|
|
1289
|
-
state:
|
|
1280
|
+
state: ue(e.builderContextSignal.rootState),
|
|
1290
1281
|
ref: {
|
|
1291
1282
|
name: e.model
|
|
1292
1283
|
}
|
|
@@ -1296,9 +1287,9 @@ function ot(e) {
|
|
|
1296
1287
|
);
|
|
1297
1288
|
}
|
|
1298
1289
|
return S(() => {
|
|
1299
|
-
var
|
|
1290
|
+
var r, c;
|
|
1300
1291
|
if (U()) {
|
|
1301
|
-
if (A() && (window.addEventListener("message", i),
|
|
1292
|
+
if (A() && (window.addEventListener("message", i), ae(), ie({
|
|
1302
1293
|
...e.locale ? {
|
|
1303
1294
|
locale: e.locale
|
|
1304
1295
|
} : {},
|
|
@@ -1310,48 +1301,48 @@ function ot(e) {
|
|
|
1310
1301
|
} : {}
|
|
1311
1302
|
}), Object.values(
|
|
1312
1303
|
e.builderContextSignal.componentInfos
|
|
1313
|
-
).forEach((
|
|
1304
|
+
).forEach((l) => {
|
|
1314
1305
|
var g;
|
|
1315
|
-
const
|
|
1316
|
-
(g = window.parent) == null || g.postMessage(
|
|
1306
|
+
const s = oe(l);
|
|
1307
|
+
(g = window.parent) == null || g.postMessage(s, "*");
|
|
1317
1308
|
}), window.addEventListener(
|
|
1318
1309
|
"builder:component:stateChangeListenerActivated",
|
|
1319
|
-
|
|
1310
|
+
h
|
|
1320
1311
|
)), e.builderContextSignal.content && W(e.canTrack)) {
|
|
1321
|
-
const
|
|
1312
|
+
const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, s = (c = e.builderContextSignal.content) == null ? void 0 : c.id, g = e.apiKey;
|
|
1322
1313
|
_({
|
|
1323
1314
|
type: "impression",
|
|
1324
1315
|
canTrack: !0,
|
|
1325
|
-
contentId:
|
|
1316
|
+
contentId: s,
|
|
1326
1317
|
apiKey: g,
|
|
1327
|
-
variationId:
|
|
1318
|
+
variationId: l !== s ? l : void 0
|
|
1328
1319
|
});
|
|
1329
1320
|
}
|
|
1330
|
-
if (
|
|
1331
|
-
const
|
|
1332
|
-
`builder.preview.${
|
|
1333
|
-
),
|
|
1334
|
-
|
|
1321
|
+
if (re()) {
|
|
1322
|
+
const l = new URL(location.href).searchParams, s = l.get("builder.preview"), g = l.get(
|
|
1323
|
+
`builder.preview.${s}`
|
|
1324
|
+
), V = l.get("apiKey") || l.get("builder.space");
|
|
1325
|
+
s === e.model && V === e.apiKey && (!e.content || g === e.content.id) && se({
|
|
1335
1326
|
model: e.model,
|
|
1336
1327
|
apiKey: e.apiKey,
|
|
1337
1328
|
apiVersion: e.builderContextSignal.apiVersion
|
|
1338
|
-
}).then((
|
|
1339
|
-
|
|
1329
|
+
}).then((x) => {
|
|
1330
|
+
x && a(x);
|
|
1340
1331
|
});
|
|
1341
1332
|
}
|
|
1342
1333
|
}
|
|
1343
1334
|
}, []), S(() => {
|
|
1344
|
-
e.apiKey ||
|
|
1335
|
+
e.apiKey || le.error(
|
|
1345
1336
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1346
|
-
),
|
|
1337
|
+
), o(), y(), h();
|
|
1347
1338
|
}, []), S(() => {
|
|
1348
1339
|
e.content && a(e.content);
|
|
1349
1340
|
}, [e.content]), S(() => {
|
|
1350
|
-
|
|
1351
|
-
}, [(
|
|
1341
|
+
o();
|
|
1342
|
+
}, [(H = (T = e.builderContextSignal.content) == null ? void 0 : T.data) == null ? void 0 : H.jsCode]), S(() => {
|
|
1352
1343
|
y();
|
|
1353
|
-
}, [(L = (
|
|
1354
|
-
|
|
1344
|
+
}, [(L = (D = e.builderContextSignal.content) == null ? void 0 : D.data) == null ? void 0 : L.httpRequests]), S(() => {
|
|
1345
|
+
h();
|
|
1355
1346
|
}, [e.builderContextSignal.rootState]), S(() => {
|
|
1356
1347
|
e.data && n(e.data);
|
|
1357
1348
|
}, [e.data]), S(() => {
|
|
@@ -1361,30 +1352,30 @@ function ot(e) {
|
|
|
1361
1352
|
}, [e.locale]), S(() => () => {
|
|
1362
1353
|
U() && (window.removeEventListener("message", i), window.removeEventListener(
|
|
1363
1354
|
"builder:component:stateChangeListenerActivated",
|
|
1364
|
-
|
|
1355
|
+
h
|
|
1365
1356
|
));
|
|
1366
|
-
}, []), /* @__PURE__ */
|
|
1367
|
-
|
|
1357
|
+
}, []), /* @__PURE__ */ f(Se.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ f(
|
|
1358
|
+
d,
|
|
1368
1359
|
{
|
|
1369
1360
|
ref: t,
|
|
1370
|
-
onClick: (
|
|
1371
|
-
"builder-content-id": (
|
|
1361
|
+
onClick: (r) => E(r),
|
|
1362
|
+
"builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
|
|
1372
1363
|
"builder-model": e.model,
|
|
1373
1364
|
...e.showContent ? {} : {
|
|
1374
1365
|
hidden: !0,
|
|
1375
1366
|
"aria-hidden": !0
|
|
1376
1367
|
},
|
|
1377
1368
|
...e.contentWrapperProps,
|
|
1378
|
-
className: `variant-${((
|
|
1369
|
+
className: `variant-${((N = e.content) == null ? void 0 : N.testVariationId) || ((j = e.content) == null ? void 0 : j.id)}`,
|
|
1379
1370
|
children: e.children
|
|
1380
1371
|
}
|
|
1381
1372
|
) : null });
|
|
1382
1373
|
}
|
|
1383
|
-
const
|
|
1374
|
+
const st = (e) => {
|
|
1384
1375
|
var p, i;
|
|
1385
1376
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], a = (i = e.fileUrl) != null ? i : (p = e == null ? void 0 : e.files) == null ? void 0 : p.regular;
|
|
1386
|
-
let
|
|
1387
|
-
if (a && t && n && (
|
|
1377
|
+
let d = "";
|
|
1378
|
+
if (a && t && n && (d += `
|
|
1388
1379
|
@font-face {
|
|
1389
1380
|
font-family: "${t}";
|
|
1390
1381
|
src: local("${n}"), url('${a}') format('woff2');
|
|
@@ -1392,29 +1383,29 @@ font-display: fallback;
|
|
|
1392
1383
|
font-weight: 400;
|
|
1393
1384
|
}
|
|
1394
1385
|
`.trim()), e.files)
|
|
1395
|
-
for (const
|
|
1396
|
-
if (!(String(Number(
|
|
1386
|
+
for (const o in e.files) {
|
|
1387
|
+
if (!(String(Number(o)) === o))
|
|
1397
1388
|
continue;
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1389
|
+
const v = e.files[o];
|
|
1390
|
+
v && v !== a && (d += `
|
|
1400
1391
|
@font-face {
|
|
1401
1392
|
font-family: "${t}";
|
|
1402
|
-
src: url('${
|
|
1393
|
+
src: url('${v}') format('woff2');
|
|
1403
1394
|
font-display: fallback;
|
|
1404
|
-
font-weight: ${
|
|
1395
|
+
font-weight: ${o};
|
|
1405
1396
|
}
|
|
1406
1397
|
`.trim());
|
|
1407
1398
|
}
|
|
1408
|
-
return
|
|
1409
|
-
},
|
|
1399
|
+
return d;
|
|
1400
|
+
}, lt = ({
|
|
1410
1401
|
customFonts: e
|
|
1411
1402
|
}) => {
|
|
1412
1403
|
var t;
|
|
1413
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1414
|
-
},
|
|
1404
|
+
return ((t = e == null ? void 0 : e.map((n) => st(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1405
|
+
}, dt = ({
|
|
1415
1406
|
cssCode: e,
|
|
1416
1407
|
contentId: t
|
|
1417
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
1408
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", ct = `
|
|
1418
1409
|
.builder-button {
|
|
1419
1410
|
all: unset;
|
|
1420
1411
|
}
|
|
@@ -1431,40 +1422,40 @@ font-weight: ${m};
|
|
|
1431
1422
|
text-align: inherit;
|
|
1432
1423
|
font-family: inherit;
|
|
1433
1424
|
}
|
|
1434
|
-
`,
|
|
1435
|
-
function
|
|
1425
|
+
`, ut = (e) => e ? "" : ct;
|
|
1426
|
+
function mt(e) {
|
|
1436
1427
|
const [t, n] = I(
|
|
1437
1428
|
() => `
|
|
1438
|
-
${
|
|
1429
|
+
${dt({
|
|
1439
1430
|
cssCode: e.cssCode,
|
|
1440
1431
|
contentId: e.contentId
|
|
1441
1432
|
})}
|
|
1442
|
-
${
|
|
1433
|
+
${lt({
|
|
1443
1434
|
customFonts: e.customFonts
|
|
1444
1435
|
})}
|
|
1445
|
-
${
|
|
1436
|
+
${ut(e.isNestedRender)}
|
|
1446
1437
|
`.trim()
|
|
1447
1438
|
);
|
|
1448
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ f(G, { id: "builderio-content", styles: t });
|
|
1449
1440
|
}
|
|
1450
|
-
const
|
|
1441
|
+
const pt = ({
|
|
1451
1442
|
content: e,
|
|
1452
1443
|
data: t,
|
|
1453
1444
|
locale: n
|
|
1454
1445
|
}) => {
|
|
1455
|
-
var p, i,
|
|
1456
|
-
const a = {},
|
|
1457
|
-
return (
|
|
1458
|
-
|
|
1446
|
+
var p, i, o;
|
|
1447
|
+
const a = {}, d = ((p = e == null ? void 0 : e.data) == null ? void 0 : p.state) || {};
|
|
1448
|
+
return (o = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || o.forEach((u) => {
|
|
1449
|
+
u.name && u.defaultValue !== void 0 && (a[u.name] = u.defaultValue);
|
|
1459
1450
|
}), {
|
|
1460
1451
|
...a,
|
|
1461
|
-
...
|
|
1452
|
+
...d,
|
|
1462
1453
|
...t,
|
|
1463
1454
|
...n ? {
|
|
1464
1455
|
locale: n
|
|
1465
1456
|
} : {}
|
|
1466
1457
|
};
|
|
1467
|
-
},
|
|
1458
|
+
}, gt = ({
|
|
1468
1459
|
content: e,
|
|
1469
1460
|
data: t
|
|
1470
1461
|
}) => e ? {
|
|
@@ -1476,45 +1467,45 @@ const mt = ({
|
|
|
1476
1467
|
meta: e == null ? void 0 : e.meta
|
|
1477
1468
|
} : void 0;
|
|
1478
1469
|
function Y(e) {
|
|
1479
|
-
var
|
|
1470
|
+
var u, v, b, w, k, R, E;
|
|
1480
1471
|
const [t, n] = I(
|
|
1481
1472
|
() => {
|
|
1482
|
-
var y,
|
|
1483
|
-
return
|
|
1473
|
+
var y, h;
|
|
1474
|
+
return nt({
|
|
1484
1475
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1485
1476
|
variationId: (y = e.content) == null ? void 0 : y.testVariationId,
|
|
1486
1477
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1487
|
-
contentId: (
|
|
1478
|
+
contentId: (h = e.content) == null ? void 0 : h.id
|
|
1488
1479
|
});
|
|
1489
1480
|
}
|
|
1490
1481
|
);
|
|
1491
1482
|
function a(y) {
|
|
1492
|
-
|
|
1493
|
-
...
|
|
1483
|
+
o((h) => ({
|
|
1484
|
+
...h,
|
|
1494
1485
|
rootState: y
|
|
1495
1486
|
}));
|
|
1496
1487
|
}
|
|
1497
|
-
const [
|
|
1488
|
+
const [d, p] = I(
|
|
1498
1489
|
() => [
|
|
1499
1490
|
...O(),
|
|
1500
1491
|
...e.customComponents || []
|
|
1501
1492
|
].reduce(
|
|
1502
|
-
(y, { component:
|
|
1493
|
+
(y, { component: h, ...T }) => ({
|
|
1503
1494
|
...y,
|
|
1504
|
-
[
|
|
1505
|
-
component:
|
|
1506
|
-
...B(
|
|
1495
|
+
[T.name]: {
|
|
1496
|
+
component: h,
|
|
1497
|
+
...B(T)
|
|
1507
1498
|
}
|
|
1508
1499
|
}),
|
|
1509
1500
|
{}
|
|
1510
1501
|
)
|
|
1511
|
-
), [i,
|
|
1512
|
-
content:
|
|
1502
|
+
), [i, o] = I(() => ({
|
|
1503
|
+
content: gt({
|
|
1513
1504
|
content: e.content,
|
|
1514
1505
|
data: e.data
|
|
1515
1506
|
}),
|
|
1516
1507
|
localState: void 0,
|
|
1517
|
-
rootState:
|
|
1508
|
+
rootState: pt({
|
|
1518
1509
|
content: e.content,
|
|
1519
1510
|
data: e.data,
|
|
1520
1511
|
locale: e.locale
|
|
@@ -1527,9 +1518,9 @@ function Y(e) {
|
|
|
1527
1518
|
...O(),
|
|
1528
1519
|
...e.customComponents || []
|
|
1529
1520
|
].reduce(
|
|
1530
|
-
(y, { component:
|
|
1521
|
+
(y, { component: h, ...T }) => ({
|
|
1531
1522
|
...y,
|
|
1532
|
-
[
|
|
1523
|
+
[T.name]: B(T)
|
|
1533
1524
|
}),
|
|
1534
1525
|
{}
|
|
1535
1526
|
),
|
|
@@ -1537,14 +1528,14 @@ function Y(e) {
|
|
|
1537
1528
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
1538
1529
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
1539
1530
|
}));
|
|
1540
|
-
return /* @__PURE__ */
|
|
1541
|
-
|
|
1531
|
+
return /* @__PURE__ */ f(
|
|
1532
|
+
ke.Provider,
|
|
1542
1533
|
{
|
|
1543
1534
|
value: {
|
|
1544
|
-
registeredComponents:
|
|
1535
|
+
registeredComponents: d
|
|
1545
1536
|
},
|
|
1546
1537
|
children: /* @__PURE__ */ P(
|
|
1547
|
-
|
|
1538
|
+
rt,
|
|
1548
1539
|
{
|
|
1549
1540
|
content: e.content,
|
|
1550
1541
|
data: e.data,
|
|
@@ -1560,24 +1551,30 @@ function Y(e) {
|
|
|
1560
1551
|
contentWrapperProps: e.contentWrapperProps,
|
|
1561
1552
|
linkComponent: e.linkComponent,
|
|
1562
1553
|
trustedHosts: e.trustedHosts,
|
|
1563
|
-
setBuilderContextSignal:
|
|
1554
|
+
setBuilderContextSignal: o,
|
|
1564
1555
|
children: [
|
|
1565
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1566
|
-
|
|
1567
|
-
|
|
1556
|
+
e.isSsrAbTest ? /* @__PURE__ */ f(
|
|
1557
|
+
$,
|
|
1558
|
+
{
|
|
1559
|
+
id: "builderio-variant-visibility",
|
|
1560
|
+
scriptStr: t
|
|
1561
|
+
}
|
|
1562
|
+
) : null,
|
|
1563
|
+
/* @__PURE__ */ f(
|
|
1564
|
+
mt,
|
|
1568
1565
|
{
|
|
1569
1566
|
isNestedRender: e.isNestedRender,
|
|
1570
|
-
contentId: (
|
|
1571
|
-
cssCode: (
|
|
1572
|
-
customFonts: (
|
|
1567
|
+
contentId: (u = i.content) == null ? void 0 : u.id,
|
|
1568
|
+
cssCode: (b = (v = i.content) == null ? void 0 : v.data) == null ? void 0 : b.cssCode,
|
|
1569
|
+
customFonts: (k = (w = i.content) == null ? void 0 : w.data) == null ? void 0 : k.customFonts
|
|
1573
1570
|
}
|
|
1574
1571
|
),
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
|
|
1572
|
+
/* @__PURE__ */ f(
|
|
1573
|
+
Te,
|
|
1577
1574
|
{
|
|
1578
|
-
blocks: (
|
|
1575
|
+
blocks: (E = (R = i.content) == null ? void 0 : R.data) == null ? void 0 : E.blocks,
|
|
1579
1576
|
context: i,
|
|
1580
|
-
registeredComponents:
|
|
1577
|
+
registeredComponents: d,
|
|
1581
1578
|
linkComponent: e.linkComponent
|
|
1582
1579
|
}
|
|
1583
1580
|
)
|
|
@@ -1587,54 +1584,66 @@ function Y(e) {
|
|
|
1587
1584
|
}
|
|
1588
1585
|
);
|
|
1589
1586
|
}
|
|
1590
|
-
function
|
|
1591
|
-
var i
|
|
1587
|
+
function It(e) {
|
|
1588
|
+
var i;
|
|
1592
1589
|
const [t, n] = I(
|
|
1593
|
-
() =>
|
|
1590
|
+
() => Xe({
|
|
1594
1591
|
canTrack: W(e.canTrack),
|
|
1595
1592
|
content: e.content
|
|
1596
1593
|
})
|
|
1597
1594
|
);
|
|
1598
1595
|
function a() {
|
|
1599
|
-
var
|
|
1600
|
-
return
|
|
1601
|
-
F(e.content).map((
|
|
1602
|
-
id:
|
|
1603
|
-
testRatio:
|
|
1596
|
+
var o;
|
|
1597
|
+
return tt(
|
|
1598
|
+
F(e.content).map((u) => ({
|
|
1599
|
+
id: u.testVariationId,
|
|
1600
|
+
testRatio: u.testRatio
|
|
1604
1601
|
})),
|
|
1605
|
-
((
|
|
1602
|
+
((o = e.content) == null ? void 0 : o.id) || ""
|
|
1606
1603
|
);
|
|
1607
1604
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return F(e.content).map((
|
|
1605
|
+
function d() {
|
|
1606
|
+
return F(e.content).map((o) => `.variant-${o.testVariationId} { display: none; } `).join("");
|
|
1610
1607
|
}
|
|
1611
1608
|
function p() {
|
|
1612
|
-
var
|
|
1609
|
+
var o;
|
|
1613
1610
|
return t ? {
|
|
1614
1611
|
...e.content,
|
|
1615
|
-
testVariationId: (
|
|
1616
|
-
} :
|
|
1612
|
+
testVariationId: (o = e.content) == null ? void 0 : o.id
|
|
1613
|
+
} : me({
|
|
1617
1614
|
item: e.content,
|
|
1618
1615
|
canTrack: W(e.canTrack)
|
|
1619
1616
|
});
|
|
1620
1617
|
}
|
|
1621
1618
|
return S(() => {
|
|
1622
1619
|
}, []), /* @__PURE__ */ P(K, { children: [
|
|
1623
|
-
!e.isNestedRender && Q !== "reactNative" ? /* @__PURE__ */
|
|
1620
|
+
!e.isNestedRender && Q !== "reactNative" ? /* @__PURE__ */ f(
|
|
1621
|
+
$,
|
|
1622
|
+
{
|
|
1623
|
+
id: "builderio-init-variants-fns",
|
|
1624
|
+
scriptStr: et()
|
|
1625
|
+
}
|
|
1626
|
+
) : null,
|
|
1624
1627
|
t ? /* @__PURE__ */ P(K, { children: [
|
|
1625
|
-
/* @__PURE__ */
|
|
1628
|
+
/* @__PURE__ */ f(
|
|
1626
1629
|
G,
|
|
1627
1630
|
{
|
|
1628
|
-
id:
|
|
1629
|
-
styles:
|
|
1631
|
+
id: "builderio-variants",
|
|
1632
|
+
styles: d()
|
|
1633
|
+
}
|
|
1634
|
+
),
|
|
1635
|
+
/* @__PURE__ */ f(
|
|
1636
|
+
$,
|
|
1637
|
+
{
|
|
1638
|
+
id: "builderio-variants-visibility",
|
|
1639
|
+
scriptStr: a()
|
|
1630
1640
|
}
|
|
1631
1641
|
),
|
|
1632
|
-
|
|
1633
|
-
(m = F(e.content)) == null ? void 0 : m.map((r) => /* @__PURE__ */ h(
|
|
1642
|
+
(i = F(e.content)) == null ? void 0 : i.map((o) => /* @__PURE__ */ f(
|
|
1634
1643
|
Y,
|
|
1635
1644
|
{
|
|
1636
1645
|
isNestedRender: e.isNestedRender,
|
|
1637
|
-
content:
|
|
1646
|
+
content: o,
|
|
1638
1647
|
showContent: !1,
|
|
1639
1648
|
model: e.model,
|
|
1640
1649
|
data: e.data,
|
|
@@ -1653,10 +1662,10 @@ function vt(e) {
|
|
|
1653
1662
|
contentWrapperProps: e.contentWrapperProps,
|
|
1654
1663
|
trustedHosts: e.trustedHosts
|
|
1655
1664
|
},
|
|
1656
|
-
|
|
1665
|
+
o.testVariationId
|
|
1657
1666
|
))
|
|
1658
1667
|
] }) : null,
|
|
1659
|
-
/* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ f(
|
|
1660
1669
|
Y,
|
|
1661
1670
|
{
|
|
1662
1671
|
isNestedRender: e.isNestedRender,
|
|
@@ -1683,5 +1692,5 @@ function vt(e) {
|
|
|
1683
1692
|
] });
|
|
1684
1693
|
}
|
|
1685
1694
|
export {
|
|
1686
|
-
|
|
1695
|
+
It as default
|
|
1687
1696
|
};
|