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