@builder.io/sdk-react 1.0.12 → 1.0.14
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 -26
- package/lib/browser/blocks-exports.mjs +788 -790
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-60df1736.cjs → server-entry-742c121c.cjs} +1 -1
- package/lib/browser/{server-entry-34e4efb1.js → server-entry-df552d27.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-03ffaaf9.cjs → blocks-75e914c4.cjs} +1 -1
- package/lib/edge/{blocks-f8d5d3a0.js → blocks-dbf6f051.js} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-5137d1bc.cjs → button-4e7f9eff.cjs} +1 -1
- package/lib/edge/{button-5543875e.js → button-db8d78a4.js} +2 -2
- package/lib/edge/{columns-ad62a5ce.cjs → columns-8399aa74.cjs} +1 -1
- package/lib/edge/{columns-a05f9fd8.js → columns-9765610b.js} +3 -3
- package/lib/edge/{content-variants-74109911.js → content-variants-9a129944.js} +310 -312
- package/lib/edge/content-variants-ed22bfec.cjs +134 -0
- package/lib/edge/{form-67a4ec0b.js → form-7a73e99c.js} +3 -3
- package/lib/edge/{form-ee52f842.cjs → form-bc7b5558.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-7ab1534a.cjs → get-class-prop-name-3c370466.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-25116ae3.js → get-class-prop-name-83fffba1.js} +1 -1
- package/lib/edge/{img-147fc69c.cjs → img-7d93925c.cjs} +1 -1
- package/lib/edge/{img-43af4666.js → img-c944597b.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-90830684.cjs → input-72be594b.cjs} +1 -1
- package/lib/edge/{input-35088f50.js → input-d735cf41.js} +1 -1
- package/lib/edge/{select-1e63f097.cjs → select-3411462e.cjs} +1 -1
- package/lib/edge/{select-ee16e4ee.js → select-5e67472b.js} +1 -1
- package/lib/edge/{server-entry-f2d127da.js → server-entry-5e5c1898.js} +1 -1
- package/lib/edge/{server-entry-39e6b4a6.cjs → server-entry-62fc8a1d.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-3db582db.cjs → slot-04d29096.cjs} +1 -1
- package/lib/edge/{slot-45a2e0bf.js → slot-495693a8.js} +3 -3
- package/lib/edge/{symbol-c533a54f.cjs → symbol-ad121694.cjs} +1 -1
- package/lib/edge/{symbol-75231166.js → symbol-c29e2a25.js} +3 -3
- package/lib/node/blocks-exports.cjs +15 -14
- package/lib/node/blocks-exports.mjs +328 -330
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{server-entry-a0cd9606.js → server-entry-3a79d01e.js} +1 -1
- package/lib/node/{server-entry-81eab45c.cjs → server-entry-f5a4cdfa.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/components/enable-editor.d.ts +1 -1
- package/types/components/content/components/styles.d.ts +1 -0
- package/types/components/content/components/styles.helpers.d.ts +1 -0
- package/types/components/content/contentProps.types.d.ts +6 -1
- package/types/components/content-variants/content-variants.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/content-variants-e6ba9024.cjs +0 -133
|
@@ -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-5e5c1898.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-dbf6f051.js";
|
|
6
|
+
import "./get-class-prop-name-83fffba1.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-495693a8.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-7a73e99c.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-d735cf41.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-5e67472b.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-c944597b.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
|
+
}, {
|
|
949
|
+
component: Le,
|
|
950
|
+
...He
|
|
951
|
+
}, {
|
|
952
|
+
component: je,
|
|
953
|
+
...Ne
|
|
948
954
|
}, {
|
|
949
955
|
component: Be,
|
|
950
956
|
..._e
|
|
951
957
|
}, {
|
|
952
|
-
component:
|
|
958
|
+
component: Ke,
|
|
959
|
+
...qe
|
|
960
|
+
}, {
|
|
961
|
+
component: Oe,
|
|
953
962
|
...Me
|
|
954
963
|
}, {
|
|
955
|
-
component:
|
|
956
|
-
...
|
|
964
|
+
component: me,
|
|
965
|
+
...ze
|
|
966
|
+
}], O = () => [{
|
|
967
|
+
component: pe,
|
|
968
|
+
...Te
|
|
969
|
+
}, {
|
|
970
|
+
component: ge,
|
|
971
|
+
...Ce
|
|
957
972
|
}, {
|
|
958
|
-
component:
|
|
959
|
-
...
|
|
973
|
+
component: fe,
|
|
974
|
+
...we
|
|
960
975
|
}, {
|
|
961
|
-
component:
|
|
962
|
-
...
|
|
976
|
+
component: he,
|
|
977
|
+
...Ve
|
|
963
978
|
}, {
|
|
964
979
|
component: be,
|
|
965
|
-
...
|
|
966
|
-
}], Y = () => [{
|
|
967
|
-
component: ye,
|
|
968
|
-
...Ee
|
|
980
|
+
...Re
|
|
969
981
|
}, {
|
|
970
|
-
component:
|
|
971
|
-
...
|
|
982
|
+
component: Fe,
|
|
983
|
+
...Ee
|
|
972
984
|
}, {
|
|
973
|
-
component:
|
|
985
|
+
component: ye,
|
|
974
986
|
...We
|
|
975
987
|
}, {
|
|
976
|
-
component:
|
|
988
|
+
component: xe,
|
|
977
989
|
...Ae
|
|
978
|
-
}, {
|
|
979
|
-
component: ke,
|
|
980
|
-
...Pe
|
|
981
|
-
}, {
|
|
982
|
-
component: $e,
|
|
983
|
-
...Ue
|
|
984
|
-
}, {
|
|
985
|
-
component: Ie,
|
|
986
|
-
...He
|
|
987
|
-
}, {
|
|
988
|
-
component: Ce,
|
|
989
|
-
...De
|
|
990
|
-
}, ...Ze()], et = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
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 H(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,40 +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 : ""
|
|
1424
|
-
function gt(e) {
|
|
1425
|
-
const [t, n] = h(
|
|
1426
|
-
() => `
|
|
1427
|
-
${pt({
|
|
1428
|
-
cssCode: e.cssCode,
|
|
1429
|
-
contentId: e.contentId
|
|
1430
|
-
})}
|
|
1431
|
-
${mt({
|
|
1432
|
-
customFonts: e.customFonts
|
|
1433
|
-
})}
|
|
1434
|
-
|
|
1417
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", dt = `
|
|
1435
1418
|
.builder-button {
|
|
1436
1419
|
all: unset;
|
|
1437
1420
|
}
|
|
@@ -1448,28 +1431,40 @@ ${mt({
|
|
|
1448
1431
|
text-align: inherit;
|
|
1449
1432
|
font-family: inherit;
|
|
1450
1433
|
}
|
|
1434
|
+
`, ct = (e) => e ? "" : dt;
|
|
1435
|
+
function ut(e) {
|
|
1436
|
+
const [t, n] = I(
|
|
1437
|
+
() => `
|
|
1438
|
+
${lt({
|
|
1439
|
+
cssCode: e.cssCode,
|
|
1440
|
+
contentId: e.contentId
|
|
1441
|
+
})}
|
|
1442
|
+
${st({
|
|
1443
|
+
customFonts: e.customFonts
|
|
1444
|
+
})}
|
|
1445
|
+
${ct(e.isNestedRender)}
|
|
1451
1446
|
`.trim()
|
|
1452
1447
|
);
|
|
1453
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ h(G, { styles: t });
|
|
1454
1449
|
}
|
|
1455
|
-
const
|
|
1450
|
+
const mt = ({
|
|
1456
1451
|
content: e,
|
|
1457
1452
|
data: t,
|
|
1458
1453
|
locale: n
|
|
1459
1454
|
}) => {
|
|
1460
|
-
var
|
|
1461
|
-
const a = {},
|
|
1462
|
-
return (
|
|
1463
|
-
|
|
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);
|
|
1464
1459
|
}), {
|
|
1465
1460
|
...a,
|
|
1466
|
-
...
|
|
1461
|
+
...u,
|
|
1467
1462
|
...t,
|
|
1468
1463
|
...n ? {
|
|
1469
1464
|
locale: n
|
|
1470
1465
|
} : {}
|
|
1471
1466
|
};
|
|
1472
|
-
},
|
|
1467
|
+
}, pt = ({
|
|
1473
1468
|
content: e,
|
|
1474
1469
|
data: t
|
|
1475
1470
|
}) => e ? {
|
|
@@ -1480,46 +1475,46 @@ const ft = ({
|
|
|
1480
1475
|
},
|
|
1481
1476
|
meta: e == null ? void 0 : e.meta
|
|
1482
1477
|
} : void 0;
|
|
1483
|
-
function
|
|
1484
|
-
var
|
|
1485
|
-
const [t, n] =
|
|
1478
|
+
function Y(e) {
|
|
1479
|
+
var r, f, x, T, C, V, R;
|
|
1480
|
+
const [t, n] = I(
|
|
1486
1481
|
() => {
|
|
1487
|
-
var
|
|
1488
|
-
return
|
|
1482
|
+
var y, b;
|
|
1483
|
+
return tt({
|
|
1489
1484
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1490
|
-
variationId: (
|
|
1485
|
+
variationId: (y = e.content) == null ? void 0 : y.testVariationId,
|
|
1491
1486
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
1492
|
-
contentId: (
|
|
1487
|
+
contentId: (b = e.content) == null ? void 0 : b.id
|
|
1493
1488
|
});
|
|
1494
1489
|
}
|
|
1495
1490
|
);
|
|
1496
|
-
function a(
|
|
1497
|
-
|
|
1498
|
-
...
|
|
1499
|
-
rootState:
|
|
1491
|
+
function a(y) {
|
|
1492
|
+
m((b) => ({
|
|
1493
|
+
...b,
|
|
1494
|
+
rootState: y
|
|
1500
1495
|
}));
|
|
1501
1496
|
}
|
|
1502
|
-
const [
|
|
1497
|
+
const [u, p] = I(
|
|
1503
1498
|
() => [
|
|
1504
|
-
...
|
|
1499
|
+
...O(),
|
|
1505
1500
|
...e.customComponents || []
|
|
1506
1501
|
].reduce(
|
|
1507
|
-
(
|
|
1508
|
-
...
|
|
1509
|
-
[
|
|
1510
|
-
component:
|
|
1511
|
-
...
|
|
1502
|
+
(y, { component: b, ...v }) => ({
|
|
1503
|
+
...y,
|
|
1504
|
+
[v.name]: {
|
|
1505
|
+
component: b,
|
|
1506
|
+
...B(v)
|
|
1512
1507
|
}
|
|
1513
1508
|
}),
|
|
1514
1509
|
{}
|
|
1515
1510
|
)
|
|
1516
|
-
), [i,
|
|
1517
|
-
content:
|
|
1511
|
+
), [i, m] = I(() => ({
|
|
1512
|
+
content: pt({
|
|
1518
1513
|
content: e.content,
|
|
1519
1514
|
data: e.data
|
|
1520
1515
|
}),
|
|
1521
1516
|
localState: void 0,
|
|
1522
|
-
rootState:
|
|
1517
|
+
rootState: mt({
|
|
1523
1518
|
content: e.content,
|
|
1524
1519
|
data: e.data,
|
|
1525
1520
|
locale: e.locale
|
|
@@ -1529,12 +1524,12 @@ function X(e) {
|
|
|
1529
1524
|
apiKey: e.apiKey,
|
|
1530
1525
|
apiVersion: e.apiVersion,
|
|
1531
1526
|
componentInfos: [
|
|
1532
|
-
...
|
|
1527
|
+
...O(),
|
|
1533
1528
|
...e.customComponents || []
|
|
1534
1529
|
].reduce(
|
|
1535
|
-
(
|
|
1536
|
-
...
|
|
1537
|
-
[
|
|
1530
|
+
(y, { component: b, ...v }) => ({
|
|
1531
|
+
...y,
|
|
1532
|
+
[v.name]: B(v)
|
|
1538
1533
|
}),
|
|
1539
1534
|
{}
|
|
1540
1535
|
),
|
|
@@ -1542,14 +1537,14 @@ function X(e) {
|
|
|
1542
1537
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
1543
1538
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
1544
1539
|
}));
|
|
1545
|
-
return /* @__PURE__ */
|
|
1546
|
-
|
|
1540
|
+
return /* @__PURE__ */ h(
|
|
1541
|
+
Ie.Provider,
|
|
1547
1542
|
{
|
|
1548
1543
|
value: {
|
|
1549
|
-
registeredComponents:
|
|
1544
|
+
registeredComponents: u
|
|
1550
1545
|
},
|
|
1551
|
-
children: /* @__PURE__ */
|
|
1552
|
-
|
|
1546
|
+
children: /* @__PURE__ */ P(
|
|
1547
|
+
ot,
|
|
1553
1548
|
{
|
|
1554
1549
|
content: e.content,
|
|
1555
1550
|
data: e.data,
|
|
@@ -1565,23 +1560,24 @@ function X(e) {
|
|
|
1565
1560
|
contentWrapperProps: e.contentWrapperProps,
|
|
1566
1561
|
linkComponent: e.linkComponent,
|
|
1567
1562
|
trustedHosts: e.trustedHosts,
|
|
1568
|
-
setBuilderContextSignal:
|
|
1563
|
+
setBuilderContextSignal: m,
|
|
1569
1564
|
children: [
|
|
1570
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */
|
|
1572
|
-
|
|
1565
|
+
e.isSsrAbTest ? /* @__PURE__ */ h($, { scriptStr: t }) : null,
|
|
1566
|
+
/* @__PURE__ */ h(
|
|
1567
|
+
ut,
|
|
1573
1568
|
{
|
|
1574
|
-
|
|
1569
|
+
isNestedRender: e.isNestedRender,
|
|
1570
|
+
contentId: (r = i.content) == null ? void 0 : r.id,
|
|
1575
1571
|
cssCode: (x = (f = i.content) == null ? void 0 : f.data) == null ? void 0 : x.cssCode,
|
|
1576
|
-
customFonts: (
|
|
1572
|
+
customFonts: (C = (T = i.content) == null ? void 0 : T.data) == null ? void 0 : C.customFonts
|
|
1577
1573
|
}
|
|
1578
1574
|
),
|
|
1579
|
-
/* @__PURE__ */
|
|
1580
|
-
|
|
1575
|
+
/* @__PURE__ */ h(
|
|
1576
|
+
ke,
|
|
1581
1577
|
{
|
|
1582
|
-
blocks: (
|
|
1578
|
+
blocks: (R = (V = i.content) == null ? void 0 : V.data) == null ? void 0 : R.blocks,
|
|
1583
1579
|
context: i,
|
|
1584
|
-
registeredComponents:
|
|
1580
|
+
registeredComponents: u,
|
|
1585
1581
|
linkComponent: e.linkComponent
|
|
1586
1582
|
}
|
|
1587
1583
|
)
|
|
@@ -1591,53 +1587,54 @@ function X(e) {
|
|
|
1591
1587
|
}
|
|
1592
1588
|
);
|
|
1593
1589
|
}
|
|
1594
|
-
function
|
|
1595
|
-
var i,
|
|
1596
|
-
const [t, n] =
|
|
1597
|
-
() =>
|
|
1590
|
+
function vt(e) {
|
|
1591
|
+
var i, m;
|
|
1592
|
+
const [t, n] = I(
|
|
1593
|
+
() => Ge({
|
|
1598
1594
|
canTrack: W(e.canTrack),
|
|
1599
1595
|
content: e.content
|
|
1600
1596
|
})
|
|
1601
1597
|
);
|
|
1602
1598
|
function a() {
|
|
1603
|
-
var
|
|
1604
|
-
return
|
|
1599
|
+
var r;
|
|
1600
|
+
return et(
|
|
1605
1601
|
F(e.content).map((f) => ({
|
|
1606
1602
|
id: f.testVariationId,
|
|
1607
1603
|
testRatio: f.testRatio
|
|
1608
1604
|
})),
|
|
1609
|
-
((
|
|
1605
|
+
((r = e.content) == null ? void 0 : r.id) || ""
|
|
1610
1606
|
);
|
|
1611
1607
|
}
|
|
1612
|
-
function
|
|
1613
|
-
return F(e.content).map((
|
|
1608
|
+
function u() {
|
|
1609
|
+
return F(e.content).map((r) => `.variant-${r.testVariationId} { display: none; } `).join("");
|
|
1614
1610
|
}
|
|
1615
|
-
function
|
|
1616
|
-
var
|
|
1611
|
+
function p() {
|
|
1612
|
+
var r;
|
|
1617
1613
|
return t ? {
|
|
1618
1614
|
...e.content,
|
|
1619
|
-
testVariationId: (
|
|
1620
|
-
} :
|
|
1615
|
+
testVariationId: (r = e.content) == null ? void 0 : r.id
|
|
1616
|
+
} : ue({
|
|
1621
1617
|
item: e.content,
|
|
1622
1618
|
canTrack: W(e.canTrack)
|
|
1623
1619
|
});
|
|
1624
1620
|
}
|
|
1625
|
-
return
|
|
1626
|
-
}, []), /* @__PURE__ */
|
|
1627
|
-
!e.
|
|
1628
|
-
t ? /* @__PURE__ */
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
|
|
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,
|
|
1631
1627
|
{
|
|
1632
1628
|
id: `variants-styles-${(i = e.content) == null ? void 0 : i.id}`,
|
|
1633
|
-
styles:
|
|
1629
|
+
styles: u()
|
|
1634
1630
|
}
|
|
1635
1631
|
),
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
(
|
|
1638
|
-
|
|
1632
|
+
/* @__PURE__ */ h($, { scriptStr: a() }),
|
|
1633
|
+
(m = F(e.content)) == null ? void 0 : m.map((r) => /* @__PURE__ */ h(
|
|
1634
|
+
Y,
|
|
1639
1635
|
{
|
|
1640
|
-
|
|
1636
|
+
isNestedRender: e.isNestedRender,
|
|
1637
|
+
content: r,
|
|
1641
1638
|
showContent: !1,
|
|
1642
1639
|
model: e.model,
|
|
1643
1640
|
data: e.data,
|
|
@@ -1656,13 +1653,14 @@ function Ct(e) {
|
|
|
1656
1653
|
contentWrapperProps: e.contentWrapperProps,
|
|
1657
1654
|
trustedHosts: e.trustedHosts
|
|
1658
1655
|
},
|
|
1659
|
-
|
|
1656
|
+
r.testVariationId
|
|
1660
1657
|
))
|
|
1661
1658
|
] }) : null,
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
|
|
1659
|
+
/* @__PURE__ */ h(
|
|
1660
|
+
Y,
|
|
1664
1661
|
{
|
|
1665
|
-
|
|
1662
|
+
isNestedRender: e.isNestedRender,
|
|
1663
|
+
content: p(),
|
|
1666
1664
|
showContent: !0,
|
|
1667
1665
|
model: e.model,
|
|
1668
1666
|
data: e.data,
|
|
@@ -1685,5 +1683,5 @@ function Ct(e) {
|
|
|
1685
1683
|
] });
|
|
1686
1684
|
}
|
|
1687
1685
|
export {
|
|
1688
|
-
|
|
1686
|
+
vt as default
|
|
1689
1687
|
};
|