@builder.io/sdk-react 1.0.11 → 1.0.12
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 +30 -30
- package/lib/browser/blocks-exports.mjs +875 -842
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-acc5a9c8.js → server-entry-34e4efb1.js} +1 -1
- package/lib/browser/{server-entry-4829e1ce.cjs → server-entry-60df1736.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-03ffaaf9.cjs +32 -0
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{blocks-244199ab.js → blocks-f8d5d3a0.js} +1003 -967
- package/lib/edge/{button-8cd5d71a.cjs → button-5137d1bc.cjs} +1 -1
- package/lib/edge/{button-73916377.js → button-5543875e.js} +3 -3
- package/lib/edge/{columns-c7d9b9f1.js → columns-a05f9fd8.js} +33 -33
- package/lib/edge/{columns-88c9df52.cjs → columns-ad62a5ce.cjs} +2 -2
- package/lib/edge/{content-variants-d5455178.js → content-variants-74109911.js} +106 -99
- package/lib/edge/{content-variants-1a65d814.cjs → content-variants-e6ba9024.cjs} +6 -6
- package/lib/edge/dynamic-renderer-8b343325.js +8 -0
- package/lib/edge/{dynamic-renderer-1c9f24c0.cjs → dynamic-renderer-b29b45ca.cjs} +1 -1
- package/lib/edge/{form-ad532981.js → form-67a4ec0b.js} +56 -66
- package/lib/edge/form-ee52f842.cjs +1 -0
- package/lib/edge/{get-class-prop-name-1178de8b.js → get-class-prop-name-25116ae3.js} +1 -1
- package/lib/edge/{get-class-prop-name-c082f4f3.cjs → get-class-prop-name-7ab1534a.cjs} +1 -1
- package/lib/edge/{image-2cc909d9.js → image-0008c792.js} +25 -25
- package/lib/edge/image-ee3dd857.cjs +17 -0
- package/lib/edge/{img-f61f7931.cjs → img-147fc69c.cjs} +1 -1
- package/lib/edge/{img-749d10ed.js → img-43af4666.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-ccec5aae.js → input-35088f50.js} +1 -1
- package/lib/edge/{input-184da708.cjs → input-90830684.cjs} +1 -1
- package/lib/edge/{select-a5fc0333.cjs → select-1e63f097.cjs} +1 -1
- package/lib/edge/{select-50a6db92.js → select-ee16e4ee.js} +1 -1
- package/lib/edge/{server-entry-178f215d.cjs → server-entry-39e6b4a6.cjs} +1 -1
- package/lib/edge/{server-entry-1cbf5bef.js → server-entry-f2d127da.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-d3ff8e4d.cjs → slot-3db582db.cjs} +1 -1
- package/lib/edge/{slot-dad01f2d.js → slot-45a2e0bf.js} +4 -4
- package/lib/edge/{symbol-b6db0014.js → symbol-75231166.js} +2 -2
- package/lib/edge/{symbol-31283b30.cjs → symbol-c533a54f.cjs} +1 -1
- package/lib/edge/{video-d02ff89b.js → video-58c2cc8d.js} +15 -15
- package/lib/edge/video-e20dcbbc.cjs +1 -0
- package/lib/node/blocks-exports.cjs +17 -17
- package/lib/node/blocks-exports.mjs +473 -440
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/node/{server-entry-856d379b.cjs → server-entry-81eab45c.cjs} +1 -1
- package/lib/node/{server-entry-09a75819.js → server-entry-a0cd9606.js} +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/block/block.helpers.d.ts +4 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/evaluate.d.ts +3 -1
- package/types/functions/evaluate/helpers.d.ts +1 -0
- package/lib/edge/blocks-a05f6af2.cjs +0 -32
- package/lib/edge/dynamic-renderer-96ba4e48.js +0 -8
- package/lib/edge/form-713c6da6.cjs +0 -1
- package/lib/edge/image-7e1361ce.cjs +0 -17
- package/lib/edge/video-64014cc4.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as C, useRef as oe, useState as
|
|
3
|
-
import { isBrowser as
|
|
1
|
+
import { jsx as b, jsxs as U, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as C, useRef as oe, useState as h, useEffect as y, createElement as re } from "react";
|
|
3
|
+
import { isBrowser as $, TARGET as Z, isEditing as P, registerInsertMenu as se, setupBrowserForEditing as le, createRegisterComponentMessage as de, getDefaultCanTrack as W, _track as O, isPreviewing as ce, fetchOneEntry as ue, logger as me, createEditorListener as pe, fastClone as ge, fetch as fe, serializeComponentInfo as z, handleABTestingSync as he } from "./server-entry-f2d127da.js";
|
|
4
4
|
import { Video as be, Button as ye, Columns as xe, Fragment as Se, Image as ve, Section as ke, Symbol as Ie, Text as Ce } from "./blocks-exports.mjs";
|
|
5
|
-
import { builderContext as Te, triggerAnimation as we, evaluate as J, InlinedStyles as ee, ComponentsContext as Ve, Blocks as Re } from "./blocks-
|
|
6
|
-
import "./get-class-prop-name-
|
|
7
|
-
import "./dynamic-renderer-
|
|
5
|
+
import { builderContext as Te, triggerAnimation as we, evaluate as J, InlinedStyles as ee, ComponentsContext as Ve, Blocks as Re } from "./blocks-f8d5d3a0.js";
|
|
6
|
+
import "./get-class-prop-name-25116ae3.js";
|
|
7
|
+
import "./dynamic-renderer-8b343325.js";
|
|
8
8
|
const Ee = {
|
|
9
9
|
name: "Core:Button",
|
|
10
10
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -397,7 +397,7 @@ const Ee = {
|
|
|
397
397
|
required: !0,
|
|
398
398
|
defaultValue: "children"
|
|
399
399
|
}]
|
|
400
|
-
}, $e = C(() => import("./slot-
|
|
400
|
+
}, $e = C(() => import("./slot-45a2e0bf.js")), He = {
|
|
401
401
|
name: "Symbol",
|
|
402
402
|
noWrap: !0,
|
|
403
403
|
static: !0,
|
|
@@ -726,7 +726,7 @@ const Ee = {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}]
|
|
729
|
-
}, Be = C(() => import("./form-
|
|
729
|
+
}, Be = C(() => import("./form-67a4ec0b.js")), Me = {
|
|
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
|
-
}, Ne = C(() => import("./input-
|
|
780
|
+
}, Ne = C(() => import("./input-35088f50.js")), Oe = {
|
|
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
|
-
}, ze = C(() => import("./select-
|
|
822
|
+
}, ze = C(() => import("./select-ee16e4ee.js")), Je = {
|
|
823
823
|
name: "Form:SubmitButton",
|
|
824
824
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
825
825
|
defaultStyles: {
|
|
@@ -858,7 +858,7 @@ const Ee = {
|
|
|
858
858
|
}],
|
|
859
859
|
noWrap: !0,
|
|
860
860
|
static: !0
|
|
861
|
-
}, Ge = C(() => import("./img-
|
|
861
|
+
}, Ge = C(() => import("./img-43af4666.js")), Xe = {
|
|
862
862
|
name: "Video",
|
|
863
863
|
canHaveChildren: !0,
|
|
864
864
|
defaultStyles: {
|
|
@@ -1077,14 +1077,14 @@ const Ee = {
|
|
|
1077
1077
|
thisScriptEl?.remove();
|
|
1078
1078
|
}
|
|
1079
1079
|
return;
|
|
1080
|
-
}`, te = "builderIoAbTest", ne = "builderIoRenderContent",
|
|
1080
|
+
}`, te = "builderIoAbTest", ne = "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
|
})), nt = ({
|
|
1085
1085
|
canTrack: e,
|
|
1086
1086
|
content: t
|
|
1087
|
-
}) => !(!(
|
|
1087
|
+
}) => !(!(F(t).length > 0) || !e || $()), at = (e) => e === "react" || e === "reactNative", ae = at(Z), it = () => `
|
|
1088
1088
|
window.${te} = ${et}
|
|
1089
1089
|
window.${ne} = ${tt}
|
|
1090
1090
|
`, ot = (e, t) => `
|
|
@@ -1096,8 +1096,8 @@ const Ee = {
|
|
|
1096
1096
|
}) => `window.${ne}(
|
|
1097
1097
|
"${t}", "${e}", ${ae}
|
|
1098
1098
|
)`;
|
|
1099
|
-
function
|
|
1100
|
-
return /* @__PURE__ */
|
|
1099
|
+
function H(e) {
|
|
1100
|
+
return /* @__PURE__ */ b(
|
|
1101
1101
|
"script",
|
|
1102
1102
|
{
|
|
1103
1103
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
@@ -1149,9 +1149,9 @@ const st = (e, t, n = !0) => {
|
|
|
1149
1149
|
};
|
|
1150
1150
|
};
|
|
1151
1151
|
function ct(e) {
|
|
1152
|
-
var j, q, K, _, B, M
|
|
1153
|
-
const t = oe(null), [n, a] =
|
|
1154
|
-
|
|
1152
|
+
var L, j, q, K, _, B, M;
|
|
1153
|
+
const t = oe(null), [n, a] = h(() => 0);
|
|
1154
|
+
h(() => !0);
|
|
1155
1155
|
function c(o) {
|
|
1156
1156
|
var s, l;
|
|
1157
1157
|
const r = {
|
|
@@ -1164,7 +1164,7 @@ function ct(e) {
|
|
|
1164
1164
|
}));
|
|
1165
1165
|
}
|
|
1166
1166
|
function m(o) {
|
|
1167
|
-
var s, l, u,
|
|
1167
|
+
var s, l, u, g, w;
|
|
1168
1168
|
const r = {
|
|
1169
1169
|
...e.builderContextSignal.content,
|
|
1170
1170
|
...o,
|
|
@@ -1175,18 +1175,18 @@ function ct(e) {
|
|
|
1175
1175
|
meta: {
|
|
1176
1176
|
...(l = e.builderContextSignal.content) == null ? void 0 : l.meta,
|
|
1177
1177
|
...o == null ? void 0 : o.meta,
|
|
1178
|
-
breakpoints: ((u = o == null ? void 0 : o.meta) == null ? void 0 : u.breakpoints) || ((w = (
|
|
1178
|
+
breakpoints: ((u = o == null ? void 0 : o.meta) == null ? void 0 : u.breakpoints) || ((w = (g = e.builderContextSignal.content) == null ? void 0 : g.meta) == null ? void 0 : w.breakpoints)
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
|
-
e.setBuilderContextSignal((
|
|
1182
|
-
...
|
|
1181
|
+
e.setBuilderContextSignal((E) => ({
|
|
1182
|
+
...E,
|
|
1183
1183
|
content: r
|
|
1184
1184
|
}));
|
|
1185
1185
|
}
|
|
1186
|
-
|
|
1187
|
-
const [i, p] =
|
|
1186
|
+
h(() => 0);
|
|
1187
|
+
const [i, p] = h(
|
|
1188
1188
|
() => !1
|
|
1189
|
-
), [d, f] =
|
|
1189
|
+
), [d, f] = h(
|
|
1190
1190
|
() => e.contentWrapper || "div"
|
|
1191
1191
|
);
|
|
1192
1192
|
function x(o) {
|
|
@@ -1220,56 +1220,63 @@ function ct(e) {
|
|
|
1220
1220
|
context: e.context || {},
|
|
1221
1221
|
localState: void 0,
|
|
1222
1222
|
rootState: e.builderContextSignal.rootState,
|
|
1223
|
-
rootSetState: e.builderContextSignal.rootSetState
|
|
1223
|
+
rootSetState: e.builderContextSignal.rootSetState,
|
|
1224
|
+
/**
|
|
1225
|
+
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
1226
|
+
*/
|
|
1227
|
+
enableCache: !1
|
|
1224
1228
|
});
|
|
1225
1229
|
}
|
|
1226
|
-
const [I,
|
|
1230
|
+
const [I, A] = h(() => ({})), [V, S] = h(() => !1);
|
|
1227
1231
|
function v(o) {
|
|
1228
1232
|
var r, s;
|
|
1229
1233
|
if (e.builderContextSignal.content) {
|
|
1230
1234
|
const l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, u = (s = e.builderContextSignal.content) == null ? void 0 : s.id;
|
|
1231
1235
|
O({
|
|
1232
1236
|
type: "click",
|
|
1233
|
-
canTrack:
|
|
1237
|
+
canTrack: W(e.canTrack),
|
|
1234
1238
|
contentId: u,
|
|
1235
1239
|
apiKey: e.apiKey,
|
|
1236
1240
|
variationId: l !== u ? l : void 0,
|
|
1237
1241
|
...dt(o),
|
|
1238
|
-
unique: !
|
|
1242
|
+
unique: !V
|
|
1239
1243
|
});
|
|
1240
1244
|
}
|
|
1241
|
-
|
|
1245
|
+
V || S(!0);
|
|
1242
1246
|
}
|
|
1243
1247
|
function T(o) {
|
|
1244
1248
|
return o.replace(
|
|
1245
1249
|
/{{([^}]+)}}/g,
|
|
1246
|
-
(r, s) =>
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1250
|
+
(r, s) => String(
|
|
1251
|
+
J({
|
|
1252
|
+
code: s,
|
|
1253
|
+
context: e.context || {},
|
|
1254
|
+
localState: void 0,
|
|
1255
|
+
rootState: e.builderContextSignal.rootState,
|
|
1256
|
+
rootSetState: e.builderContextSignal.rootSetState,
|
|
1257
|
+
enableCache: !0
|
|
1258
|
+
})
|
|
1259
|
+
)
|
|
1253
1260
|
);
|
|
1254
1261
|
}
|
|
1255
1262
|
function ie({ url: o, key: r }) {
|
|
1256
|
-
|
|
1257
|
-
var u,
|
|
1263
|
+
fe(o).then((s) => s.json()).then((s) => {
|
|
1264
|
+
var u, g;
|
|
1258
1265
|
const l = {
|
|
1259
1266
|
...e.builderContextSignal.rootState,
|
|
1260
1267
|
[r]: s
|
|
1261
1268
|
};
|
|
1262
|
-
(
|
|
1269
|
+
(g = (u = e.builderContextSignal).rootSetState) == null || g.call(u, l), I[r] = !0;
|
|
1263
1270
|
}).catch((s) => {
|
|
1264
1271
|
console.error("error fetching dynamic data", o, s);
|
|
1265
1272
|
});
|
|
1266
1273
|
}
|
|
1267
|
-
function
|
|
1274
|
+
function D() {
|
|
1268
1275
|
var r, s, l;
|
|
1269
1276
|
const o = (l = (s = (r = e.builderContextSignal.content) == null ? void 0 : r.data) == null ? void 0 : s.httpRequests) != null ? l : {};
|
|
1270
|
-
Object.entries(o).forEach(([u,
|
|
1271
|
-
if (
|
|
1272
|
-
const w = T(
|
|
1277
|
+
Object.entries(o).forEach(([u, g]) => {
|
|
1278
|
+
if (g && (!I[u] || P())) {
|
|
1279
|
+
const w = T(g);
|
|
1273
1280
|
ie({
|
|
1274
1281
|
url: w,
|
|
1275
1282
|
key: u
|
|
@@ -1277,8 +1284,8 @@ function ct(e) {
|
|
|
1277
1284
|
}
|
|
1278
1285
|
});
|
|
1279
1286
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1287
|
+
function R() {
|
|
1288
|
+
P() && window.dispatchEvent(
|
|
1282
1289
|
new CustomEvent(
|
|
1283
1290
|
"builder:component:stateChange",
|
|
1284
1291
|
{
|
|
@@ -1294,8 +1301,8 @@ function ct(e) {
|
|
|
1294
1301
|
}
|
|
1295
1302
|
return y(() => {
|
|
1296
1303
|
var o, r;
|
|
1297
|
-
if (
|
|
1298
|
-
if (
|
|
1304
|
+
if ($()) {
|
|
1305
|
+
if (P() && (a(n + 1), window.addEventListener("message", x), se(), le({
|
|
1299
1306
|
...e.locale ? {
|
|
1300
1307
|
locale: e.locale
|
|
1301
1308
|
} : {},
|
|
@@ -1308,48 +1315,48 @@ function ct(e) {
|
|
|
1308
1315
|
}), Object.values(
|
|
1309
1316
|
e.builderContextSignal.componentInfos
|
|
1310
1317
|
).forEach((l) => {
|
|
1311
|
-
var
|
|
1318
|
+
var g;
|
|
1312
1319
|
const u = de(l);
|
|
1313
|
-
(
|
|
1320
|
+
(g = window.parent) == null || g.postMessage(u, "*");
|
|
1314
1321
|
}), window.addEventListener(
|
|
1315
1322
|
"builder:component:stateChangeListenerActivated",
|
|
1316
|
-
|
|
1317
|
-
)), e.builderContextSignal.content &&
|
|
1318
|
-
const l = (o = e.builderContextSignal.content) == null ? void 0 : o.testVariationId, u = (r = e.builderContextSignal.content) == null ? void 0 : r.id,
|
|
1323
|
+
R
|
|
1324
|
+
)), e.builderContextSignal.content && W(e.canTrack)) {
|
|
1325
|
+
const l = (o = e.builderContextSignal.content) == null ? void 0 : o.testVariationId, u = (r = e.builderContextSignal.content) == null ? void 0 : r.id, g = e.apiKey;
|
|
1319
1326
|
O({
|
|
1320
1327
|
type: "impression",
|
|
1321
1328
|
canTrack: !0,
|
|
1322
1329
|
contentId: u,
|
|
1323
|
-
apiKey:
|
|
1330
|
+
apiKey: g,
|
|
1324
1331
|
variationId: l !== u ? l : void 0
|
|
1325
1332
|
});
|
|
1326
1333
|
}
|
|
1327
1334
|
if (ce()) {
|
|
1328
|
-
const l = new URL(location.href).searchParams, u = l.get("builder.preview"),
|
|
1335
|
+
const l = new URL(location.href).searchParams, u = l.get("builder.preview"), g = l.get(
|
|
1329
1336
|
`builder.preview.${u}`
|
|
1330
1337
|
), w = l.get("apiKey") || l.get("builder.space");
|
|
1331
|
-
u === e.model && w === e.apiKey && (!e.content ||
|
|
1338
|
+
u === e.model && w === e.apiKey && (!e.content || g === e.content.id) && ue({
|
|
1332
1339
|
model: e.model,
|
|
1333
1340
|
apiKey: e.apiKey,
|
|
1334
1341
|
apiVersion: e.builderContextSignal.apiVersion
|
|
1335
|
-
}).then((
|
|
1336
|
-
|
|
1342
|
+
}).then((E) => {
|
|
1343
|
+
E && m(E);
|
|
1337
1344
|
});
|
|
1338
1345
|
}
|
|
1339
1346
|
}
|
|
1340
1347
|
}, []), y(() => {
|
|
1341
1348
|
e.apiKey || me.error(
|
|
1342
1349
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
1343
|
-
), k(),
|
|
1350
|
+
), k(), D(), R();
|
|
1344
1351
|
}, []), y(() => {
|
|
1345
1352
|
e.content && m(e.content);
|
|
1346
1353
|
}, [e.content]), y(() => {
|
|
1347
1354
|
}, [i]), y(() => {
|
|
1348
1355
|
k();
|
|
1349
|
-
}, [(
|
|
1350
|
-
|
|
1351
|
-
}, [(
|
|
1352
|
-
|
|
1356
|
+
}, [(j = (L = e.builderContextSignal.content) == null ? void 0 : L.data) == null ? void 0 : j.jsCode]), y(() => {
|
|
1357
|
+
D();
|
|
1358
|
+
}, [(K = (q = e.builderContextSignal.content) == null ? void 0 : q.data) == null ? void 0 : K.httpRequests]), y(() => {
|
|
1359
|
+
R();
|
|
1353
1360
|
}, [e.builderContextSignal.rootState]), y(() => {
|
|
1354
1361
|
e.data && c(e.data);
|
|
1355
1362
|
}, [e.data]), y(() => {
|
|
@@ -1357,27 +1364,27 @@ function ct(e) {
|
|
|
1357
1364
|
locale: e.locale
|
|
1358
1365
|
});
|
|
1359
1366
|
}, [e.locale]), y(() => () => {
|
|
1360
|
-
|
|
1367
|
+
$() && (window.removeEventListener("message", x), window.removeEventListener(
|
|
1361
1368
|
"builder:component:stateChangeListenerActivated",
|
|
1362
|
-
|
|
1369
|
+
R
|
|
1363
1370
|
));
|
|
1364
|
-
}, []), /* @__PURE__ */
|
|
1371
|
+
}, []), /* @__PURE__ */ b(Te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ re(
|
|
1365
1372
|
d,
|
|
1366
1373
|
{
|
|
1367
1374
|
key: n,
|
|
1368
1375
|
ref: t,
|
|
1369
1376
|
onClick: (o) => v(o),
|
|
1370
|
-
"builder-content-id": (
|
|
1377
|
+
"builder-content-id": (_ = e.builderContextSignal.content) == null ? void 0 : _.id,
|
|
1371
1378
|
"builder-model": e.model,
|
|
1372
1379
|
...e.showContent ? {} : {
|
|
1373
1380
|
hidden: !0,
|
|
1374
1381
|
"aria-hidden": !0
|
|
1375
1382
|
},
|
|
1376
1383
|
...e.contentWrapperProps,
|
|
1377
|
-
className: `variant-${((
|
|
1384
|
+
className: `variant-${((B = e.content) == null ? void 0 : B.testVariationId) || ((M = e.content) == null ? void 0 : M.id)}`
|
|
1378
1385
|
},
|
|
1379
1386
|
e.children
|
|
1380
|
-
)
|
|
1387
|
+
) : null });
|
|
1381
1388
|
}
|
|
1382
1389
|
const ut = (e) => {
|
|
1383
1390
|
var m, i;
|
|
@@ -1415,7 +1422,7 @@ font-weight: ${p};
|
|
|
1415
1422
|
contentId: t
|
|
1416
1423
|
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
1417
1424
|
function gt(e) {
|
|
1418
|
-
const [t, n] =
|
|
1425
|
+
const [t, n] = h(
|
|
1419
1426
|
() => `
|
|
1420
1427
|
${pt({
|
|
1421
1428
|
cssCode: e.cssCode,
|
|
@@ -1443,9 +1450,9 @@ ${mt({
|
|
|
1443
1450
|
}
|
|
1444
1451
|
`.trim()
|
|
1445
1452
|
);
|
|
1446
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ b(ee, { styles: t });
|
|
1447
1454
|
}
|
|
1448
|
-
const
|
|
1455
|
+
const ft = ({
|
|
1449
1456
|
content: e,
|
|
1450
1457
|
data: t,
|
|
1451
1458
|
locale: n
|
|
@@ -1462,7 +1469,7 @@ const ht = ({
|
|
|
1462
1469
|
locale: n
|
|
1463
1470
|
} : {}
|
|
1464
1471
|
};
|
|
1465
|
-
},
|
|
1472
|
+
}, ht = ({
|
|
1466
1473
|
content: e,
|
|
1467
1474
|
data: t
|
|
1468
1475
|
}) => e ? {
|
|
@@ -1474,8 +1481,8 @@ const ht = ({
|
|
|
1474
1481
|
meta: e == null ? void 0 : e.meta
|
|
1475
1482
|
} : void 0;
|
|
1476
1483
|
function X(e) {
|
|
1477
|
-
var d, f, x, k, I,
|
|
1478
|
-
const [t, n] =
|
|
1484
|
+
var d, f, x, k, I, A, V;
|
|
1485
|
+
const [t, n] = h(
|
|
1479
1486
|
() => {
|
|
1480
1487
|
var S, v;
|
|
1481
1488
|
return rt({
|
|
@@ -1492,7 +1499,7 @@ function X(e) {
|
|
|
1492
1499
|
rootState: S
|
|
1493
1500
|
}));
|
|
1494
1501
|
}
|
|
1495
|
-
const [c, m] =
|
|
1502
|
+
const [c, m] = h(
|
|
1496
1503
|
() => [
|
|
1497
1504
|
...Y(),
|
|
1498
1505
|
...e.customComponents || []
|
|
@@ -1506,13 +1513,13 @@ function X(e) {
|
|
|
1506
1513
|
}),
|
|
1507
1514
|
{}
|
|
1508
1515
|
)
|
|
1509
|
-
), [i, p] =
|
|
1510
|
-
content:
|
|
1516
|
+
), [i, p] = h(() => ({
|
|
1517
|
+
content: ht({
|
|
1511
1518
|
content: e.content,
|
|
1512
1519
|
data: e.data
|
|
1513
1520
|
}),
|
|
1514
1521
|
localState: void 0,
|
|
1515
|
-
rootState:
|
|
1522
|
+
rootState: ft({
|
|
1516
1523
|
content: e.content,
|
|
1517
1524
|
data: e.data,
|
|
1518
1525
|
locale: e.locale
|
|
@@ -1535,13 +1542,13 @@ function X(e) {
|
|
|
1535
1542
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
1536
1543
|
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
1537
1544
|
}));
|
|
1538
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ b(
|
|
1539
1546
|
Ve.Provider,
|
|
1540
1547
|
{
|
|
1541
1548
|
value: {
|
|
1542
1549
|
registeredComponents: c
|
|
1543
1550
|
},
|
|
1544
|
-
children: /* @__PURE__ */
|
|
1551
|
+
children: /* @__PURE__ */ U(
|
|
1545
1552
|
ct,
|
|
1546
1553
|
{
|
|
1547
1554
|
content: e.content,
|
|
@@ -1560,19 +1567,19 @@ function X(e) {
|
|
|
1560
1567
|
trustedHosts: e.trustedHosts,
|
|
1561
1568
|
setBuilderContextSignal: p,
|
|
1562
1569
|
children: [
|
|
1563
|
-
e.isSsrAbTest ? /* @__PURE__ */
|
|
1564
|
-
/* @__PURE__ */
|
|
1570
|
+
e.isSsrAbTest ? /* @__PURE__ */ b(H, { scriptStr: t }) : null,
|
|
1571
|
+
/* @__PURE__ */ b(
|
|
1565
1572
|
gt,
|
|
1566
1573
|
{
|
|
1567
1574
|
contentId: (d = i.content) == null ? void 0 : d.id,
|
|
1568
1575
|
cssCode: (x = (f = i.content) == null ? void 0 : f.data) == null ? void 0 : x.cssCode,
|
|
1569
1576
|
customFonts: (I = (k = i.content) == null ? void 0 : k.data) == null ? void 0 : I.customFonts
|
|
1570
1577
|
}
|
|
1571
|
-
)
|
|
1572
|
-
/* @__PURE__ */
|
|
1578
|
+
),
|
|
1579
|
+
/* @__PURE__ */ b(
|
|
1573
1580
|
Re,
|
|
1574
1581
|
{
|
|
1575
|
-
blocks: (
|
|
1582
|
+
blocks: (V = (A = i.content) == null ? void 0 : A.data) == null ? void 0 : V.blocks,
|
|
1576
1583
|
context: i,
|
|
1577
1584
|
registeredComponents: c,
|
|
1578
1585
|
linkComponent: e.linkComponent
|
|
@@ -1586,16 +1593,16 @@ function X(e) {
|
|
|
1586
1593
|
}
|
|
1587
1594
|
function Ct(e) {
|
|
1588
1595
|
var i, p;
|
|
1589
|
-
const [t, n] =
|
|
1596
|
+
const [t, n] = h(
|
|
1590
1597
|
() => nt({
|
|
1591
|
-
canTrack:
|
|
1598
|
+
canTrack: W(e.canTrack),
|
|
1592
1599
|
content: e.content
|
|
1593
1600
|
})
|
|
1594
1601
|
);
|
|
1595
1602
|
function a() {
|
|
1596
1603
|
var d;
|
|
1597
1604
|
return ot(
|
|
1598
|
-
|
|
1605
|
+
F(e.content).map((f) => ({
|
|
1599
1606
|
id: f.testVariationId,
|
|
1600
1607
|
testRatio: f.testRatio
|
|
1601
1608
|
})),
|
|
@@ -1603,31 +1610,31 @@ function Ct(e) {
|
|
|
1603
1610
|
);
|
|
1604
1611
|
}
|
|
1605
1612
|
function c() {
|
|
1606
|
-
return
|
|
1613
|
+
return F(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
|
|
1607
1614
|
}
|
|
1608
1615
|
function m() {
|
|
1609
1616
|
var d;
|
|
1610
1617
|
return t ? {
|
|
1611
1618
|
...e.content,
|
|
1612
1619
|
testVariationId: (d = e.content) == null ? void 0 : d.id
|
|
1613
|
-
} :
|
|
1620
|
+
} : he({
|
|
1614
1621
|
item: e.content,
|
|
1615
|
-
canTrack:
|
|
1622
|
+
canTrack: W(e.canTrack)
|
|
1616
1623
|
});
|
|
1617
1624
|
}
|
|
1618
1625
|
return y(() => {
|
|
1619
|
-
}, []), /* @__PURE__ */
|
|
1620
|
-
!e.__isNestedRender && Z !== "reactNative" ? /* @__PURE__ */
|
|
1621
|
-
t ? /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1626
|
+
}, []), /* @__PURE__ */ U(N, { children: [
|
|
1627
|
+
!e.__isNestedRender && Z !== "reactNative" ? /* @__PURE__ */ b(H, { scriptStr: it() }) : null,
|
|
1628
|
+
t ? /* @__PURE__ */ U(N, { children: [
|
|
1629
|
+
/* @__PURE__ */ b(
|
|
1623
1630
|
ee,
|
|
1624
1631
|
{
|
|
1625
1632
|
id: `variants-styles-${(i = e.content) == null ? void 0 : i.id}`,
|
|
1626
1633
|
styles: c()
|
|
1627
1634
|
}
|
|
1628
1635
|
),
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
(p =
|
|
1636
|
+
/* @__PURE__ */ b(H, { scriptStr: a() }),
|
|
1637
|
+
(p = F(e.content)) == null ? void 0 : p.map((d) => /* @__PURE__ */ b(
|
|
1631
1638
|
X,
|
|
1632
1639
|
{
|
|
1633
1640
|
content: d,
|
|
@@ -1652,7 +1659,7 @@ function Ct(e) {
|
|
|
1652
1659
|
d.testVariationId
|
|
1653
1660
|
))
|
|
1654
1661
|
] }) : null,
|
|
1655
|
-
/* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ b(
|
|
1656
1663
|
X,
|
|
1657
1664
|
{
|
|
1658
1665
|
content: m(),
|