@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.
Files changed (54) hide show
  1. package/lib/browser/blocks-exports.cjs +27 -26
  2. package/lib/browser/blocks-exports.mjs +788 -790
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-60df1736.cjs → server-entry-742c121c.cjs} +1 -1
  6. package/lib/browser/{server-entry-34e4efb1.js → server-entry-df552d27.js} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{blocks-03ffaaf9.cjs → blocks-75e914c4.cjs} +1 -1
  10. package/lib/edge/{blocks-f8d5d3a0.js → blocks-dbf6f051.js} +2 -2
  11. package/lib/edge/blocks-exports.cjs +1 -1
  12. package/lib/edge/blocks-exports.mjs +2 -2
  13. package/lib/edge/{button-5137d1bc.cjs → button-4e7f9eff.cjs} +1 -1
  14. package/lib/edge/{button-5543875e.js → button-db8d78a4.js} +2 -2
  15. package/lib/edge/{columns-ad62a5ce.cjs → columns-8399aa74.cjs} +1 -1
  16. package/lib/edge/{columns-a05f9fd8.js → columns-9765610b.js} +3 -3
  17. package/lib/edge/{content-variants-74109911.js → content-variants-9a129944.js} +310 -312
  18. package/lib/edge/content-variants-ed22bfec.cjs +134 -0
  19. package/lib/edge/{form-67a4ec0b.js → form-7a73e99c.js} +3 -3
  20. package/lib/edge/{form-ee52f842.cjs → form-bc7b5558.cjs} +1 -1
  21. package/lib/edge/{get-class-prop-name-7ab1534a.cjs → get-class-prop-name-3c370466.cjs} +1 -1
  22. package/lib/edge/{get-class-prop-name-25116ae3.js → get-class-prop-name-83fffba1.js} +1 -1
  23. package/lib/edge/{img-147fc69c.cjs → img-7d93925c.cjs} +1 -1
  24. package/lib/edge/{img-43af4666.js → img-c944597b.js} +1 -1
  25. package/lib/edge/index.cjs +1 -1
  26. package/lib/edge/index.mjs +1 -1
  27. package/lib/edge/{input-90830684.cjs → input-72be594b.cjs} +1 -1
  28. package/lib/edge/{input-35088f50.js → input-d735cf41.js} +1 -1
  29. package/lib/edge/{select-1e63f097.cjs → select-3411462e.cjs} +1 -1
  30. package/lib/edge/{select-ee16e4ee.js → select-5e67472b.js} +1 -1
  31. package/lib/edge/{server-entry-f2d127da.js → server-entry-5e5c1898.js} +1 -1
  32. package/lib/edge/{server-entry-39e6b4a6.cjs → server-entry-62fc8a1d.cjs} +1 -1
  33. package/lib/edge/server-entry.cjs +1 -1
  34. package/lib/edge/server-entry.mjs +1 -1
  35. package/lib/edge/{slot-3db582db.cjs → slot-04d29096.cjs} +1 -1
  36. package/lib/edge/{slot-45a2e0bf.js → slot-495693a8.js} +3 -3
  37. package/lib/edge/{symbol-c533a54f.cjs → symbol-ad121694.cjs} +1 -1
  38. package/lib/edge/{symbol-75231166.js → symbol-c29e2a25.js} +3 -3
  39. package/lib/node/blocks-exports.cjs +15 -14
  40. package/lib/node/blocks-exports.mjs +328 -330
  41. package/lib/node/index.cjs +1 -1
  42. package/lib/node/index.mjs +1 -1
  43. package/lib/node/{server-entry-a0cd9606.js → server-entry-3a79d01e.js} +1 -1
  44. package/lib/node/{server-entry-81eab45c.cjs → server-entry-f5a4cdfa.cjs} +1 -1
  45. package/lib/node/server-entry.cjs +1 -1
  46. package/lib/node/server-entry.mjs +1 -1
  47. package/package.json +1 -1
  48. package/types/components/content/components/enable-editor.d.ts +1 -1
  49. package/types/components/content/components/styles.d.ts +1 -0
  50. package/types/components/content/components/styles.helpers.d.ts +1 -0
  51. package/types/components/content/contentProps.types.d.ts +6 -1
  52. package/types/components/content-variants/content-variants.d.ts +1 -1
  53. package/types/constants/sdk-version.d.ts +1 -1
  54. package/lib/edge/content-variants-e6ba9024.cjs +0 -133
@@ -1,11 +1,11 @@
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
- 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-f8d5d3a0.js";
6
- import "./get-class-prop-name-25116ae3.js";
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 Ee = {
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
- }, Fe = {
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((c) => c.get("width")) && (n.find((m) => !m.get("width")) || n.reduce((p, d) => p + d.get("width"), 0) !== 100) && t();
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
- }, We = {
242
+ }, we = {
243
243
  name: "Fragment",
244
244
  static: !0,
245
245
  hidden: !0,
246
246
  canHaveChildren: !0,
247
247
  noWrap: !0
248
- }, Ae = {
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, p = 6e4) {
269
- return new Promise((d, f) => {
268
+ function n(i, m = 6e4) {
269
+ return new Promise((r, f) => {
270
270
  const x = document.createElement("img");
271
- let k = !1;
271
+ let T = !1;
272
272
  x.onload = () => {
273
- k = !0, d(x);
274
- }, x.addEventListener("error", (I) => {
275
- console.warn("Image load failed", I.error), f(I.error);
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
- k || f(new Error("Image load timed out"));
278
- }, p);
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 c = e.get("image"), m = e.get("aspectRatio");
285
- if (fetch(c).then((i) => i.blob()).then((i) => {
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
- }), c && (!m || m === 0.7041))
288
- return n(c).then((i) => {
289
- const p = e.get("aspectRatio");
290
- e.get("image") === c && (!p || p === 0.7041) && i.width && i.height && (e.set("aspectRatio", a(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
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
- }, Pe = {
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
- }, Ue = {
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
- }, $e = C(() => import("./slot-45a2e0bf.js")), He = {
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
- }, De = {
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
- }, Le = {
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
- }, je = C(() => import("./custom-code-7786788e.js")), qe = {
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
- }, Ke = C(() => import("./embed-5c1bbe12.js")), _e = {
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
- }, Be = C(() => import("./form-67a4ec0b.js")), Me = {
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
- }, Ne = C(() => import("./input-35088f50.js")), Oe = {
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
- }, ze = C(() => import("./select-ee16e4ee.js")), Je = {
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
- }, Ye = C(() => import("./submit-button-b48361a7.js")), Qe = {
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
- }, Ge = C(() => import("./img-43af4666.js")), Xe = {
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
- }, Ze = () => [{
943
- component: je,
944
- ...Le
942
+ }, Je = () => [{
943
+ component: Ue,
944
+ ...Pe
945
945
  }, {
946
- component: Ke,
947
- ...qe
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: Ne,
958
+ component: Ke,
959
+ ...qe
960
+ }, {
961
+ component: Oe,
953
962
  ...Me
954
963
  }, {
955
- component: Ye,
956
- ...Je
964
+ component: me,
965
+ ...ze
966
+ }], O = () => [{
967
+ component: pe,
968
+ ...Te
969
+ }, {
970
+ component: ge,
971
+ ...Ce
957
972
  }, {
958
- component: ze,
959
- ...Oe
973
+ component: fe,
974
+ ...we
960
975
  }, {
961
- component: Ge,
962
- ...Qe
976
+ component: he,
977
+ ...Ve
963
978
  }, {
964
979
  component: be,
965
- ...Xe
966
- }], Y = () => [{
967
- component: ye,
968
- ...Ee
980
+ ...Re
969
981
  }, {
970
- component: xe,
971
- ...Fe
982
+ component: Fe,
983
+ ...Ee
972
984
  }, {
973
- component: Se,
985
+ component: ye,
974
986
  ...We
975
987
  }, {
976
- component: ve,
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
- }`, tt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
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
- }`, te = "builderIoAbTest", ne = "builderIoRenderContent", F = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
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
- })), nt = ({
1084
+ })), Ge = ({
1085
1085
  canTrack: e,
1086
1086
  content: t
1087
- }) => !(!(F(t).length > 0) || !e || $()), at = (e) => e === "react" || e === "reactNative", ae = at(Z), it = () => `
1088
- window.${te} = ${et}
1089
- window.${ne} = ${tt}
1090
- `, ot = (e, t) => `
1091
- window.${te}(
1092
- "${t}",${JSON.stringify(e)}, ${ae}
1093
- )`, rt = ({
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.${ne}(
1097
- "${t}", "${e}", ${ae}
1096
+ }) => `window.${Z}(
1097
+ "${t}", "${e}", ${ee}
1098
1098
  )`;
1099
- function H(e) {
1100
- return /* @__PURE__ */ b(
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 Q(e) {
1108
+ function z(e) {
1109
1109
  return Math.round(e * 1e3) / 1e3;
1110
1110
  }
1111
- const st = (e, t, n = !0) => {
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
- }, lt = (e) => st(e, (t) => {
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
- }), G = ({
1125
+ }), J = ({
1126
1126
  event: e,
1127
1127
  target: t
1128
1128
  }) => {
1129
- const n = t.getBoundingClientRect(), a = e.clientX - n.left, c = e.clientY - n.top, m = Q(a / n.width), i = Q(c / n.height);
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: m,
1131
+ x: p,
1132
1132
  y: i
1133
1133
  };
1134
- }, dt = (e) => {
1135
- const t = e.target, n = t && lt(t), a = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
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 ? G({
1139
+ targetOffset: t ? J({
1140
1140
  event: e,
1141
1141
  target: t
1142
1142
  }) : void 0,
1143
- builderTargetOffset: n ? G({
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 ct(e) {
1152
- var L, j, q, K, _, B, M;
1153
- const t = oe(null), [n, a] = h(() => 0);
1154
- h(() => !0);
1155
- function c(o) {
1156
- var s, l;
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 ? (l = (s = e.builderContextSignal).rootSetState) == null || l.call(s, r) : e.setBuilderContextSignal((u) => ({
1162
- ...u,
1163
- rootState: r
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 m(o) {
1167
- var s, l, u, g, w;
1168
- const r = {
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
- ...(s = e.builderContextSignal.content) == null ? void 0 : s.data,
1171
+ ...(l = e.builderContextSignal.content) == null ? void 0 : l.data,
1173
1172
  ...o == null ? void 0 : o.data
1174
1173
  },
1175
1174
  meta: {
1176
- ...(l = e.builderContextSignal.content) == null ? void 0 : l.meta,
1175
+ ...(d = e.builderContextSignal.content) == null ? void 0 : d.meta,
1177
1176
  ...o == null ? void 0 : o.meta,
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)
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: r
1182
+ content: s
1184
1183
  }));
1185
1184
  }
1186
- h(() => 0);
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 x(o) {
1193
- return pe({
1188
+ function i(o) {
1189
+ return le({
1194
1190
  model: e.model,
1195
1191
  trustedHosts: e.trustedHosts,
1196
1192
  callbacks: {
1197
- configureSdk: (r) => {
1198
- var u;
1199
- const { breakpoints: s, contentId: l } = r;
1200
- !l || l !== ((u = e.builderContextSignal.content) == null ? void 0 : u.id) || s && (m({
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: s
1198
+ breakpoints: l
1203
1199
  }
1204
- }), a(n + 1));
1200
+ });
1205
1201
  },
1206
- animation: (r) => {
1207
- we(r);
1202
+ animation: (s) => {
1203
+ ve(s);
1208
1204
  },
1209
- contentUpdate: (r) => {
1210
- m(r), a(n + 1);
1205
+ contentUpdate: (s) => {
1206
+ a(s);
1211
1207
  }
1212
1208
  }
1213
1209
  })(o);
1214
1210
  }
1215
- function k() {
1216
- var r, s;
1217
- const o = (s = (r = e.builderContextSignal.content) == null ? void 0 : r.data) == null ? void 0 : s.jsCode;
1218
- o && J({
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 [I, A] = h(() => ({})), [V, S] = h(() => !1);
1231
- function v(o) {
1232
- var r, s;
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 l = (r = e.builderContextSignal.content) == null ? void 0 : r.testVariationId, u = (s = e.builderContextSignal.content) == null ? void 0 : s.id;
1235
- O({
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: u,
1234
+ contentId: c,
1239
1235
  apiKey: e.apiKey,
1240
- variationId: l !== u ? l : void 0,
1241
- ...dt(o),
1242
- unique: !V
1236
+ variationId: d !== c ? d : void 0,
1237
+ ...it(o),
1238
+ unique: !x
1243
1239
  });
1244
1240
  }
1245
- V || S(!0);
1241
+ x || T(!0);
1246
1242
  }
1247
- function T(o) {
1243
+ function V(o) {
1248
1244
  return o.replace(
1249
1245
  /{{([^}]+)}}/g,
1250
- (r, s) => String(
1251
- J({
1252
- code: s,
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 ie({ url: o, key: r }) {
1263
- fe(o).then((s) => s.json()).then((s) => {
1264
- var u, g;
1265
- const l = {
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
- [r]: s
1263
+ [s]: l
1268
1264
  };
1269
- (g = (u = e.builderContextSignal).rootSetState) == null || g.call(u, l), I[r] = !0;
1270
- }).catch((s) => {
1271
- console.error("error fetching dynamic data", o, s);
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 D() {
1275
- var r, s, l;
1276
- const o = (l = (s = (r = e.builderContextSignal.content) == null ? void 0 : r.data) == null ? void 0 : s.httpRequests) != null ? l : {};
1277
- Object.entries(o).forEach(([u, g]) => {
1278
- if (g && (!I[u] || P())) {
1279
- const w = T(g);
1280
- ie({
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: u
1278
+ key: c
1283
1279
  });
1284
1280
  }
1285
1281
  });
1286
1282
  }
1287
- function R() {
1288
- P() && window.dispatchEvent(
1283
+ function b() {
1284
+ A() && window.dispatchEvent(
1289
1285
  new CustomEvent(
1290
1286
  "builder:component:stateChange",
1291
1287
  {
1292
1288
  detail: {
1293
- state: ge(e.builderContextSignal.rootState),
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 y(() => {
1303
- var o, r;
1304
- if ($()) {
1305
- if (P() && (a(n + 1), window.addEventListener("message", x), se(), le({
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((l) => {
1313
+ ).forEach((d) => {
1318
1314
  var g;
1319
- const u = de(l);
1320
- (g = window.parent) == null || g.postMessage(u, "*");
1315
+ const c = ie(d);
1316
+ (g = window.parent) == null || g.postMessage(c, "*");
1321
1317
  }), window.addEventListener(
1322
1318
  "builder:component:stateChangeListenerActivated",
1323
- R
1319
+ b
1324
1320
  )), 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;
1326
- O({
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: u,
1325
+ contentId: c,
1330
1326
  apiKey: g,
1331
- variationId: l !== u ? l : void 0
1327
+ variationId: d !== c ? d : void 0
1332
1328
  });
1333
1329
  }
1334
- if (ce()) {
1335
- const l = new URL(location.href).searchParams, u = l.get("builder.preview"), g = l.get(
1336
- `builder.preview.${u}`
1337
- ), w = l.get("apiKey") || l.get("builder.space");
1338
- u === e.model && w === e.apiKey && (!e.content || g === e.content.id) && ue({
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 && m(E);
1339
+ E && a(E);
1344
1340
  });
1345
1341
  }
1346
1342
  }
1347
- }, []), y(() => {
1348
- e.apiKey || me.error(
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
- ), k(), D(), R();
1351
- }, []), y(() => {
1352
- e.content && m(e.content);
1353
- }, [e.content]), y(() => {
1354
- }, [i]), y(() => {
1355
- k();
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();
1360
- }, [e.builderContextSignal.rootState]), y(() => {
1361
- e.data && c(e.data);
1362
- }, [e.data]), y(() => {
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]), y(() => () => {
1367
- $() && (window.removeEventListener("message", x), window.removeEventListener(
1361
+ }, [e.locale]), S(() => () => {
1362
+ U() && (window.removeEventListener("message", i), window.removeEventListener(
1368
1363
  "builder:component:stateChangeListenerActivated",
1369
- R
1364
+ b
1370
1365
  ));
1371
- }, []), /* @__PURE__ */ b(Te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ re(
1372
- d,
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) => v(o),
1377
- "builder-content-id": (_ = e.builderContextSignal.content) == null ? void 0 : _.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-${((B = e.content) == null ? void 0 : B.testVariationId) || ((M = e.content) == null ? void 0 : M.id)}`
1385
- },
1386
- e.children
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 ut = (e) => {
1390
- var m, i;
1391
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], a = (i = e.fileUrl) != null ? i : (m = e == null ? void 0 : e.files) == null ? void 0 : m.regular;
1392
- let c = "";
1393
- if (a && t && n && (c += `
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 p in e.files) {
1402
- if (!(String(Number(p)) === p))
1395
+ for (const m in e.files) {
1396
+ if (!(String(Number(m)) === m))
1403
1397
  continue;
1404
- const f = e.files[p];
1405
- f && f !== a && (c += `
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: ${p};
1404
+ font-weight: ${m};
1411
1405
  }
1412
1406
  `.trim());
1413
1407
  }
1414
- return c;
1415
- }, mt = ({
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) => ut(n))) == null ? void 0 : t.join(" ")) || "";
1420
- }, pt = ({
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__ */ b(ee, { styles: t });
1448
+ return /* @__PURE__ */ h(G, { styles: t });
1454
1449
  }
1455
- const ft = ({
1450
+ const mt = ({
1456
1451
  content: e,
1457
1452
  data: t,
1458
1453
  locale: n
1459
1454
  }) => {
1460
- var m, i, p;
1461
- const a = {}, c = ((m = e == null ? void 0 : e.data) == null ? void 0 : m.state) || {};
1462
- return (p = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || p.forEach((d) => {
1463
- d.name && d.defaultValue !== void 0 && (a[d.name] = d.defaultValue);
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
- ...c,
1461
+ ...u,
1467
1462
  ...t,
1468
1463
  ...n ? {
1469
1464
  locale: n
1470
1465
  } : {}
1471
1466
  };
1472
- }, ht = ({
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 X(e) {
1484
- var d, f, x, k, I, A, V;
1485
- const [t, n] = h(
1478
+ function Y(e) {
1479
+ var r, f, x, T, C, V, R;
1480
+ const [t, n] = I(
1486
1481
  () => {
1487
- var S, v;
1488
- return rt({
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: (S = e.content) == null ? void 0 : S.testVariationId,
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: (v = e.content) == null ? void 0 : v.id
1487
+ contentId: (b = e.content) == null ? void 0 : b.id
1493
1488
  });
1494
1489
  }
1495
1490
  );
1496
- function a(S) {
1497
- p((v) => ({
1498
- ...v,
1499
- rootState: S
1491
+ function a(y) {
1492
+ m((b) => ({
1493
+ ...b,
1494
+ rootState: y
1500
1495
  }));
1501
1496
  }
1502
- const [c, m] = h(
1497
+ const [u, p] = I(
1503
1498
  () => [
1504
- ...Y(),
1499
+ ...O(),
1505
1500
  ...e.customComponents || []
1506
1501
  ].reduce(
1507
- (S, { component: v, ...T }) => ({
1508
- ...S,
1509
- [T.name]: {
1510
- component: v,
1511
- ...z(T)
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, p] = h(() => ({
1517
- content: ht({
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: ft({
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
- ...Y(),
1527
+ ...O(),
1533
1528
  ...e.customComponents || []
1534
1529
  ].reduce(
1535
- (S, { component: v, ...T }) => ({
1536
- ...S,
1537
- [T.name]: z(T)
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__ */ b(
1546
- Ve.Provider,
1540
+ return /* @__PURE__ */ h(
1541
+ Ie.Provider,
1547
1542
  {
1548
1543
  value: {
1549
- registeredComponents: c
1544
+ registeredComponents: u
1550
1545
  },
1551
- children: /* @__PURE__ */ U(
1552
- ct,
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: p,
1563
+ setBuilderContextSignal: m,
1569
1564
  children: [
1570
- e.isSsrAbTest ? /* @__PURE__ */ b(H, { scriptStr: t }) : null,
1571
- /* @__PURE__ */ b(
1572
- gt,
1565
+ e.isSsrAbTest ? /* @__PURE__ */ h($, { scriptStr: t }) : null,
1566
+ /* @__PURE__ */ h(
1567
+ ut,
1573
1568
  {
1574
- contentId: (d = i.content) == null ? void 0 : d.id,
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: (I = (k = i.content) == null ? void 0 : k.data) == null ? void 0 : I.customFonts
1572
+ customFonts: (C = (T = i.content) == null ? void 0 : T.data) == null ? void 0 : C.customFonts
1577
1573
  }
1578
1574
  ),
1579
- /* @__PURE__ */ b(
1580
- Re,
1575
+ /* @__PURE__ */ h(
1576
+ ke,
1581
1577
  {
1582
- blocks: (V = (A = i.content) == null ? void 0 : A.data) == null ? void 0 : V.blocks,
1578
+ blocks: (R = (V = i.content) == null ? void 0 : V.data) == null ? void 0 : R.blocks,
1583
1579
  context: i,
1584
- registeredComponents: c,
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 Ct(e) {
1595
- var i, p;
1596
- const [t, n] = h(
1597
- () => nt({
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 d;
1604
- return ot(
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
- ((d = e.content) == null ? void 0 : d.id) || ""
1605
+ ((r = e.content) == null ? void 0 : r.id) || ""
1610
1606
  );
1611
1607
  }
1612
- function c() {
1613
- return F(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
1608
+ function u() {
1609
+ return F(e.content).map((r) => `.variant-${r.testVariationId} { display: none; } `).join("");
1614
1610
  }
1615
- function m() {
1616
- var d;
1611
+ function p() {
1612
+ var r;
1617
1613
  return t ? {
1618
1614
  ...e.content,
1619
- testVariationId: (d = e.content) == null ? void 0 : d.id
1620
- } : he({
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 y(() => {
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(
1630
- ee,
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: c()
1629
+ styles: u()
1634
1630
  }
1635
1631
  ),
1636
- /* @__PURE__ */ b(H, { scriptStr: a() }),
1637
- (p = F(e.content)) == null ? void 0 : p.map((d) => /* @__PURE__ */ b(
1638
- X,
1632
+ /* @__PURE__ */ h($, { scriptStr: a() }),
1633
+ (m = F(e.content)) == null ? void 0 : m.map((r) => /* @__PURE__ */ h(
1634
+ Y,
1639
1635
  {
1640
- content: d,
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
- d.testVariationId
1656
+ r.testVariationId
1660
1657
  ))
1661
1658
  ] }) : null,
1662
- /* @__PURE__ */ b(
1663
- X,
1659
+ /* @__PURE__ */ h(
1660
+ Y,
1664
1661
  {
1665
- content: m(),
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
- Ct as default
1686
+ vt as default
1689
1687
  };