@builder.io/sdk-react 0.7.5 → 0.8.0

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.
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsxs as T, Fragment as f, jsx as r } from "react/jsx-runtime";
3
- import { createContext as pe, useState as p, useContext as le, createElement as ke, useRef as Z, useEffect as P } from "react";
2
+ import { jsxs as E, Fragment as f, jsx as r } from "react/jsx-runtime";
3
+ import { createContext as pe, useState as v, useContext as le, createElement as ke, useRef as Z, useEffect as P } from "react";
4
4
  import { i as $, j as N, k as $e, l as M, m as ee, n as G, T as L, r as Ne, o as U, p as ce, a as Fe, c as We, b as Ce, q as _e, u as se, v as de, w as Le } from "./server-entry-0aebe4be.mjs";
5
5
  import { _ as sn, h as dn, f as un, g as mn, e as fn, d as hn, s as gn, t as bn } from "./server-entry-0aebe4be.mjs";
6
6
  function je(e) {
7
- return /* @__PURE__ */ T(f, { children: [
7
+ return /* @__PURE__ */ E(f, { children: [
8
8
  e.link ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
9
9
  "a",
10
10
  {
@@ -315,7 +315,7 @@ function ne(e) {
315
315
  return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
316
316
  }
317
317
  function n() {
318
- var b;
318
+ var x;
319
319
  const i = D({
320
320
  block: e.block,
321
321
  localState: e.context.localState,
@@ -324,14 +324,14 @@ function ne(e) {
324
324
  context: e.context.context,
325
325
  shouldEvaluateBindings: !0
326
326
  }), a = i.responsiveStyles, o = e.context.content, l = Te(
327
- ((b = o == null ? void 0 : o.meta) == null ? void 0 : b.breakpoints) || {}
327
+ ((x = o == null ? void 0 : o.meta) == null ? void 0 : x.breakpoints) || {}
328
328
  ), s = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, d = a == null ? void 0 : a.small, u = i.id;
329
329
  if (!u)
330
330
  return "";
331
331
  const g = s ? Y({
332
332
  className: u,
333
333
  styles: s
334
- }) : "", v = c ? Y({
334
+ }) : "", S = c ? Y({
335
335
  className: u,
336
336
  styles: c,
337
337
  mediaQuery: me(
@@ -346,7 +346,7 @@ function ne(e) {
346
346
  l
347
347
  )
348
348
  }) : "";
349
- return [g, v, V].join(" ");
349
+ return [g, S, V].join(" ");
350
350
  }
351
351
  return /* @__PURE__ */ r(f, { children: n() && t() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: n() }) }) : null });
352
352
  }
@@ -418,9 +418,9 @@ function at(e) {
418
418
  }
419
419
  }
420
420
  function fe(e) {
421
- return /* @__PURE__ */ T(f, { children: [
421
+ return /* @__PURE__ */ E(f, { children: [
422
422
  " ",
423
- e.hasChildren ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
423
+ e.hasChildren ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ E(
424
424
  e.Wrapper,
425
425
  {
426
426
  ...O({
@@ -511,10 +511,10 @@ const rt = ({
511
511
  };
512
512
  function he(e) {
513
513
  var i, a;
514
- const [t, n] = p(
514
+ const [t, n] = v(
515
515
  () => e.isInteractive ? ot : e.componentRef
516
516
  );
517
- return /* @__PURE__ */ r(f, { children: e.componentRef ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
517
+ return /* @__PURE__ */ r(f, { children: e.componentRef ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ E(
518
518
  t,
519
519
  {
520
520
  ...rt({
@@ -549,7 +549,7 @@ function he(e) {
549
549
  ) }) : null });
550
550
  }
551
551
  function lt(e) {
552
- const [t, n] = p(() => e.repeatContext);
552
+ const [t, n] = v(() => e.repeatContext);
553
553
  return /* @__PURE__ */ r(te.Provider, { value: t, children: /* @__PURE__ */ r(
554
554
  H,
555
555
  {
@@ -560,7 +560,7 @@ function lt(e) {
560
560
  ) });
561
561
  }
562
562
  function H(e) {
563
- var u, g, v, V;
563
+ var u, g, S, V;
564
564
  function t() {
565
565
  return Qe({
566
566
  block: e.block,
@@ -575,8 +575,8 @@ function H(e) {
575
575
  });
576
576
  }
577
577
  function i() {
578
- var b;
579
- return (b = e.block.repeat) != null && b.collection ? e.block : D({
578
+ var x;
579
+ return (x = e.block.repeat) != null && x.collection ? e.block : D({
580
580
  block: e.block,
581
581
  localState: e.context.localState,
582
582
  rootState: e.context.rootState,
@@ -589,33 +589,36 @@ function H(e) {
589
589
  return e.block.tagName || "div";
590
590
  }
591
591
  function o() {
592
- var b, S;
593
- return "hide" in i() ? !i().hide : "show" in i() ? i().show : !((b = e.block.repeat) != null && b.collection && !((S = n == null ? void 0 : n()) != null && S.length));
592
+ var I, w;
593
+ if ((I = e.block.repeat) != null && I.collection)
594
+ return !!((w = n == null ? void 0 : n()) != null && w.length);
595
+ const x = "hide" in i() ? i().hide : !1;
596
+ return ("show" in i() ? i().show : !0) && !x;
594
597
  }
595
598
  function l() {
596
- var S;
597
- return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
599
+ var p;
600
+ return !((p = t == null ? void 0 : t()) != null && p.component) && !n() ? i().children ?? [] : [];
598
601
  }
599
602
  function s() {
600
- var b, S, E, R, C;
603
+ var x, p, I, w, C;
601
604
  return {
602
605
  blockChildren: i().children ?? [],
603
- componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
606
+ componentRef: (x = t == null ? void 0 : t()) == null ? void 0 : x.component,
604
607
  componentOptions: {
605
608
  ...Me(i()),
606
609
  builderContext: e.context,
607
- ...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
610
+ ...((p = t == null ? void 0 : t()) == null ? void 0 : p.name) === "Symbol" || ((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Columns" ? {
608
611
  builderComponents: e.registeredComponents
609
612
  } : {}
610
613
  },
611
614
  context: c,
612
615
  registeredComponents: e.registeredComponents,
613
616
  builderBlock: i(),
614
- includeBlockProps: ((R = t == null ? void 0 : t()) == null ? void 0 : R.noWrap) === !0,
617
+ includeBlockProps: ((w = t == null ? void 0 : t()) == null ? void 0 : w.noWrap) === !0,
615
618
  isInteractive: !((C = t == null ? void 0 : t()) != null && C.isRSC)
616
619
  };
617
620
  }
618
- const [c, d] = p(() => e.context);
621
+ const [c, d] = v(() => e.context);
619
622
  return /* @__PURE__ */ r(f, { children: o() ? /* @__PURE__ */ r(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
620
623
  he,
621
624
  {
@@ -628,7 +631,7 @@ function H(e) {
628
631
  includeBlockProps: s().includeBlockProps,
629
632
  isInteractive: s().isInteractive
630
633
  }
631
- ) }) : /* @__PURE__ */ T(f, { children: [
634
+ ) }) : /* @__PURE__ */ E(f, { children: [
632
635
  q(a()) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
633
636
  fe,
634
637
  {
@@ -638,16 +641,16 @@ function H(e) {
638
641
  hasChildren: !1
639
642
  }
640
643
  ) }) : null,
641
- !q(a()) && n() ? /* @__PURE__ */ r(f, { children: (g = n()) == null ? void 0 : g.map((b, S) => /* @__PURE__ */ r(
644
+ !q(a()) && n() ? /* @__PURE__ */ r(f, { children: (g = n()) == null ? void 0 : g.map((x, p) => /* @__PURE__ */ r(
642
645
  lt,
643
646
  {
644
- repeatContext: b.context,
645
- block: b.block,
647
+ repeatContext: x.context,
648
+ block: x.block,
646
649
  registeredComponents: e.registeredComponents
647
650
  },
648
- S
651
+ p
649
652
  )) }) : null,
650
- !q(a()) && !n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
653
+ !q(a()) && !n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ E(
651
654
  fe,
652
655
  {
653
656
  Wrapper: a(),
@@ -668,22 +671,22 @@ function H(e) {
668
671
  isInteractive: s().isInteractive
669
672
  }
670
673
  ),
671
- (v = l()) == null ? void 0 : v.map((b) => /* @__PURE__ */ r(
674
+ (S = l()) == null ? void 0 : S.map((x) => /* @__PURE__ */ r(
672
675
  H,
673
676
  {
674
- block: b,
677
+ block: x,
675
678
  context: c,
676
679
  registeredComponents: e.registeredComponents
677
680
  },
678
- "block-" + b.id
681
+ "block-" + x.id
679
682
  )),
680
- (V = l()) == null ? void 0 : V.map((b) => /* @__PURE__ */ r(
683
+ (V = l()) == null ? void 0 : V.map((x) => /* @__PURE__ */ r(
681
684
  ne,
682
685
  {
683
- block: b,
686
+ block: x,
684
687
  context: c
685
688
  },
686
- "block-style-" + b.id
689
+ "block-style-" + x.id
687
690
  ))
688
691
  ]
689
692
  }
@@ -721,7 +724,7 @@ function ct(e) {
721
724
  "*"
722
725
  ));
723
726
  }
724
- return /* @__PURE__ */ T(f, { children: [
727
+ return /* @__PURE__ */ E(f, { children: [
725
728
  /* @__PURE__ */ r(
726
729
  "div",
727
730
  {
@@ -745,7 +748,7 @@ function ct(e) {
745
748
  function ie(e) {
746
749
  var i, a;
747
750
  const t = le(te), n = le(we);
748
- return /* @__PURE__ */ T(
751
+ return /* @__PURE__ */ E(
749
752
  ct,
750
753
  {
751
754
  blocks: e.blocks,
@@ -775,33 +778,33 @@ function ie(e) {
775
778
  );
776
779
  }
777
780
  function st(e) {
778
- var R;
779
- const [t, n] = p(
781
+ var w;
782
+ const [t, n] = v(
780
783
  () => typeof e.space == "number" ? e.space || 0 : 20
781
- ), [i, a] = p(() => e.columns || []), [o, l] = p(
784
+ ), [i, a] = v(() => e.columns || []), [o, l] = v(
782
785
  () => e.stackColumnsAt || "tablet"
783
786
  );
784
787
  function s(C) {
785
- var w;
786
- return ((w = i[C]) == null ? void 0 : w.width) || 100 / i.length;
788
+ var T;
789
+ return ((T = i[C]) == null ? void 0 : T.width) || 100 / i.length;
787
790
  }
788
791
  function c(C) {
789
- const w = t * (i.length - 1) / i.length;
790
- return `calc(${s(C)}% - ${w}px)`;
792
+ const T = t * (i.length - 1) / i.length;
793
+ return `calc(${s(C)}% - ${T}px)`;
791
794
  }
792
795
  function d({
793
796
  stackedStyle: C,
794
- desktopStyle: w
797
+ desktopStyle: T
795
798
  }) {
796
- return o === "tablet" ? C : w;
799
+ return o === "tablet" ? C : T;
797
800
  }
798
801
  function u({
799
802
  stackedStyle: C,
800
- desktopStyle: w
803
+ desktopStyle: T
801
804
  }) {
802
- return o === "never" ? w : C;
805
+ return o === "never" ? T : C;
803
806
  }
804
- const [g, v] = p(
807
+ const [g, S] = v(
805
808
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
806
809
  );
807
810
  function V() {
@@ -813,8 +816,8 @@ function st(e) {
813
816
  })
814
817
  };
815
818
  }
816
- function b(C) {
817
- const w = C === 0 ? 0 : t, A = c(C), B = `${w}px`, F = "100%", W = 0;
819
+ function x(C) {
820
+ const T = C === 0 ? 0 : t, A = c(C), B = `${T}px`, F = "100%", W = 0;
818
821
  return {
819
822
  width: A,
820
823
  ["marginLeft"]: B,
@@ -836,15 +839,15 @@ function st(e) {
836
839
  })
837
840
  };
838
841
  }
839
- function S(C) {
842
+ function p(C) {
840
843
  var A, B;
841
844
  return Te(
842
845
  ((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
843
846
  )[C].max;
844
847
  }
845
- function E() {
848
+ function I() {
846
849
  return `
847
- @media (max-width: ${S("medium")}px) {
850
+ @media (max-width: ${p("medium")}px) {
848
851
  .${e.builderBlock.id}-breakpoints {
849
852
  flex-direction: var(--flex-dir-tablet);
850
853
  align-items: stretch;
@@ -856,7 +859,7 @@ function st(e) {
856
859
  }
857
860
  }
858
861
 
859
- @media (max-width: ${S("small")}px) {
862
+ @media (max-width: ${p("small")}px) {
860
863
  .${e.builderBlock.id}-breakpoints {
861
864
  flex-direction: var(--flex-dir);
862
865
  align-items: stretch;
@@ -869,25 +872,25 @@ function st(e) {
869
872
  },
870
873
  `;
871
874
  }
872
- return /* @__PURE__ */ T(f, { children: [
873
- /* @__PURE__ */ T(
875
+ return /* @__PURE__ */ E(f, { children: [
876
+ /* @__PURE__ */ E(
874
877
  "div",
875
878
  {
876
879
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
877
880
  style: V(),
878
881
  children: [
879
- /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: E() }) }),
880
- (R = e.columns) == null ? void 0 : R.map((C, w) => /* @__PURE__ */ ke(
882
+ /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: I() }) }),
883
+ (w = e.columns) == null ? void 0 : w.map((C, T) => /* @__PURE__ */ ke(
881
884
  "div",
882
885
  {
883
886
  className: "builder-column div-53636e90-2",
884
- style: b(w),
885
- key: w
887
+ style: x(T),
888
+ key: T
886
889
  },
887
890
  /* @__PURE__ */ r(
888
891
  ie,
889
892
  {
890
- path: `component.options.columns.${w}.blocks`,
893
+ path: `component.options.columns.${T}.blocks`,
891
894
  parent: e.builderBlock.id,
892
895
  styleProp: {
893
896
  flexGrow: "1"
@@ -974,9 +977,9 @@ function ft(e) {
974
977
  };
975
978
  return e.aspectRatio ? c : void 0;
976
979
  }
977
- return /* @__PURE__ */ T(f, { children: [
978
- /* @__PURE__ */ T(f, { children: [
979
- /* @__PURE__ */ T("picture", { children: [
980
+ return /* @__PURE__ */ E(f, { children: [
981
+ /* @__PURE__ */ E(f, { children: [
982
+ /* @__PURE__ */ E("picture", { children: [
980
983
  n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("source", { type: "image/webp", srcSet: n() }) }) : null,
981
984
  /* @__PURE__ */ r(
982
985
  "img",
@@ -1306,7 +1309,7 @@ const gt = {
1306
1309
  }]
1307
1310
  };
1308
1311
  function yt(e) {
1309
- const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []);
1312
+ const t = Z(null), [n, i] = v(() => []), [a, o] = v(() => []);
1310
1313
  return P(() => {
1311
1314
  var s;
1312
1315
  if (!((s = t.current) != null && s.getElementsByTagName) || typeof window > "u")
@@ -1370,7 +1373,7 @@ const St = {
1370
1373
  }]
1371
1374
  }, vt = ["text/javascript", "application/javascript", "application/ecmascript"], pt = (e) => vt.includes(e.type);
1372
1375
  function kt(e) {
1373
- const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []), [l, s] = p(() => !1);
1376
+ const t = Z(null), [n, i] = v(() => []), [a, o] = v(() => []), [l, s] = v(() => !1);
1374
1377
  function c() {
1375
1378
  if (!t.current || !t.current.getElementsByTagName)
1376
1379
  return;
@@ -1379,13 +1382,13 @@ function kt(e) {
1379
1382
  const g = d[u];
1380
1383
  if (g.src && !n.includes(g.src)) {
1381
1384
  n.push(g.src);
1382
- const v = document.createElement("script");
1383
- v.async = !0, v.src = g.src, document.head.appendChild(v);
1385
+ const S = document.createElement("script");
1386
+ S.async = !0, S.src = g.src, document.head.appendChild(S);
1384
1387
  } else if (pt(g) && !a.includes(g.innerText))
1385
1388
  try {
1386
1389
  a.push(g.innerText), new Function(g.innerText)();
1387
- } catch (v) {
1388
- console.warn("`Embed`: Error running script:", v);
1390
+ } catch (S) {
1391
+ console.warn("`Embed`: Error running script:", S);
1389
1392
  }
1390
1393
  }
1391
1394
  }
@@ -1432,8 +1435,8 @@ const Ct = {
1432
1435
  let g = !1;
1433
1436
  u.onload = () => {
1434
1437
  g = !0, c(u);
1435
- }, u.addEventListener("error", (v) => {
1436
- console.warn("Image load failed", v.error), d(v.error);
1438
+ }, u.addEventListener("error", (S) => {
1439
+ console.warn("Image load failed", S.error), d(S.error);
1437
1440
  }), u.src = l, setTimeout(() => {
1438
1441
  g || d(new Error("Image load timed out"));
1439
1442
  }, s);
@@ -1748,7 +1751,7 @@ function Bt(e) {
1748
1751
  ...t()
1749
1752
  };
1750
1753
  }
1751
- return /* @__PURE__ */ T(
1754
+ return /* @__PURE__ */ E(
1752
1755
  "div",
1753
1756
  {
1754
1757
  style: {
@@ -2016,7 +2019,7 @@ const Mt = (e, t, n = !0) => {
2016
2019
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
2017
2020
  }
2018
2021
  };
2019
- }, Ot = "0.7.5", Kt = () => {
2022
+ }, Ot = "0.8.0", Kt = () => {
2020
2023
  Ne("insertMenu", {
2021
2024
  name: "_default",
2022
2025
  default: !0,
@@ -2069,8 +2072,8 @@ const Ht = (e = {}) => {
2069
2072
  let u, g = null;
2070
2073
  try {
2071
2074
  u = d.apply(null, s);
2072
- } catch (v) {
2073
- g = v;
2075
+ } catch (S) {
2076
+ g = S;
2074
2077
  }
2075
2078
  g ? (a = window.parent) == null || a.postMessage({
2076
2079
  type: "builder.evaluateError",
@@ -2078,13 +2081,13 @@ const Ht = (e = {}) => {
2078
2081
  id: c,
2079
2082
  error: g.message
2080
2083
  }
2081
- }, "*") : u && typeof u.then == "function" ? u.then((v) => {
2084
+ }, "*") : u && typeof u.then == "function" ? u.then((S) => {
2082
2085
  var V;
2083
2086
  (V = window.parent) == null || V.postMessage({
2084
2087
  type: "builder.evaluateResult",
2085
2088
  data: {
2086
2089
  id: c,
2087
- result: v
2090
+ result: S
2088
2091
  }
2089
2092
  }, "*");
2090
2093
  }).catch(console.error) : (o = window.parent) == null || o.postMessage({
@@ -2101,20 +2104,20 @@ const Ht = (e = {}) => {
2101
2104
  };
2102
2105
  function zt(e) {
2103
2106
  var A, B, F, W, z, ae, oe;
2104
- const t = Z(null), [n, i] = p(() => 0);
2107
+ const t = Z(null), [n, i] = v(() => 0);
2105
2108
  function a(m) {
2106
- var x, y, k, I, re;
2109
+ var b, y, k, R, re;
2107
2110
  const h = {
2108
2111
  ...e.builderContextSignal.content,
2109
2112
  ...m,
2110
2113
  data: {
2111
- ...(x = e.builderContextSignal.content) == null ? void 0 : x.data,
2114
+ ...(b = e.builderContextSignal.content) == null ? void 0 : b.data,
2112
2115
  ...m == null ? void 0 : m.data
2113
2116
  },
2114
2117
  meta: {
2115
2118
  ...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
2116
2119
  ...m == null ? void 0 : m.meta,
2117
- breakpoints: ((k = m == null ? void 0 : m.meta) == null ? void 0 : k.breakpoints) || ((re = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : re.breakpoints)
2120
+ breakpoints: ((k = m == null ? void 0 : m.meta) == null ? void 0 : k.breakpoints) || ((re = (R = e.builderContextSignal.content) == null ? void 0 : R.meta) == null ? void 0 : re.breakpoints)
2118
2121
  }
2119
2122
  };
2120
2123
  e.setBuilderContextSignal((Be) => ({
@@ -2122,18 +2125,18 @@ function zt(e) {
2122
2125
  content: h
2123
2126
  }));
2124
2127
  }
2125
- p(() => 0);
2126
- const [o, l] = p(
2128
+ v(() => 0);
2129
+ const [o, l] = v(
2127
2130
  () => !1
2128
2131
  );
2129
2132
  function s(m) {
2130
- var x;
2133
+ var b;
2131
2134
  const { data: h } = m;
2132
2135
  if (h)
2133
2136
  switch (h.type) {
2134
2137
  case "builder.configureSdk": {
2135
- const y = h.data, { breakpoints: k, contentId: I } = y;
2136
- if (!I || I !== ((x = e.builderContextSignal.content) == null ? void 0 : x.id))
2138
+ const y = h.data, { breakpoints: k, contentId: R } = y;
2139
+ if (!R || R !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
2137
2140
  return;
2138
2141
  k && a({
2139
2142
  meta: {
@@ -2143,15 +2146,15 @@ function zt(e) {
2143
2146
  break;
2144
2147
  }
2145
2148
  case "builder.contentUpdate": {
2146
- const y = h.data, k = y.key || y.alias || y.entry || y.modelName, I = y.data;
2147
- k === e.model && (a(I), i(n + 1));
2149
+ const y = h.data, k = y.key || y.alias || y.entry || y.modelName, R = y.data;
2150
+ k === e.model && (a(R), i(n + 1));
2148
2151
  break;
2149
2152
  }
2150
2153
  }
2151
2154
  }
2152
2155
  function c() {
2153
- var h, x;
2154
- const m = (x = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : x.jsCode;
2156
+ var h, b;
2157
+ const m = (b = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : b.jsCode;
2155
2158
  m && _({
2156
2159
  code: m,
2157
2160
  context: e.context || {},
@@ -2160,11 +2163,11 @@ function zt(e) {
2160
2163
  rootSetState: e.builderContextSignal.rootSetState
2161
2164
  });
2162
2165
  }
2163
- const [d, u] = p(() => ({})), [g, v] = p(() => !1);
2166
+ const [d, u] = v(() => ({})), [g, S] = v(() => !1);
2164
2167
  function V(m) {
2165
- var h, x;
2168
+ var h, b;
2166
2169
  if (e.builderContextSignal.content) {
2167
- const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, k = (x = e.builderContextSignal.content) == null ? void 0 : x.id;
2170
+ const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, k = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
2168
2171
  ce({
2169
2172
  type: "click",
2170
2173
  canTrack: U(e.canTrack),
@@ -2175,13 +2178,13 @@ function zt(e) {
2175
2178
  unique: !g
2176
2179
  });
2177
2180
  }
2178
- g || v(!0);
2181
+ g || S(!0);
2179
2182
  }
2180
- function b(m) {
2183
+ function x(m) {
2181
2184
  return m.replace(
2182
2185
  /{{([^}]+)}}/g,
2183
- (h, x) => _({
2184
- code: x,
2186
+ (h, b) => _({
2187
+ code: b,
2185
2188
  context: e.context || {},
2186
2189
  localState: void 0,
2187
2190
  rootState: e.builderContextSignal.rootState,
@@ -2189,32 +2192,32 @@ function zt(e) {
2189
2192
  })
2190
2193
  );
2191
2194
  }
2192
- function S({ url: m, key: h }) {
2193
- _e(m).then((x) => x.json()).then((x) => {
2194
- var k, I;
2195
+ function p({ url: m, key: h }) {
2196
+ _e(m).then((b) => b.json()).then((b) => {
2197
+ var k, R;
2195
2198
  const y = {
2196
2199
  ...e.builderContextSignal.rootState,
2197
- [h]: x
2200
+ [h]: b
2198
2201
  };
2199
- (I = (k = e.builderContextSignal).rootSetState) == null || I.call(k, y), d[h] = !0;
2200
- }).catch((x) => {
2201
- console.error("error fetching dynamic data", m, x);
2202
+ (R = (k = e.builderContextSignal).rootSetState) == null || R.call(k, y), d[h] = !0;
2203
+ }).catch((b) => {
2204
+ console.error("error fetching dynamic data", m, b);
2202
2205
  });
2203
2206
  }
2204
- function E() {
2205
- var h, x;
2206
- const m = ((x = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : x.httpRequests) ?? {};
2207
+ function I() {
2208
+ var h, b;
2209
+ const m = ((b = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : b.httpRequests) ?? {};
2207
2210
  Object.entries(m).forEach(([y, k]) => {
2208
2211
  if (k && (!d[y] || $())) {
2209
- const I = b(k);
2210
- S({
2211
- url: I,
2212
+ const R = x(k);
2213
+ p({
2214
+ url: R,
2212
2215
  key: y
2213
2216
  });
2214
2217
  }
2215
2218
  });
2216
2219
  }
2217
- function R() {
2220
+ function w() {
2218
2221
  $() && window.dispatchEvent(
2219
2222
  new CustomEvent(
2220
2223
  "builder:component:stateChange",
@@ -2244,23 +2247,23 @@ function zt(e) {
2244
2247
  e.builderContextSignal.componentInfos
2245
2248
  ).forEach((h) => {
2246
2249
  var y;
2247
- const x = We(h);
2248
- (y = window.parent) == null || y.postMessage(x, "*");
2250
+ const b = We(h);
2251
+ (y = window.parent) == null || y.postMessage(b, "*");
2249
2252
  }), window.addEventListener(
2250
2253
  "builder:component:stateChangeListenerActivated",
2251
- R
2254
+ w
2252
2255
  );
2253
2256
  }
2254
- function w(m) {
2255
- const h = new URL(location.href).searchParams, x = h.get("builder.preview"), y = h.get(
2256
- `builder.preview.${x}`
2257
+ function T(m) {
2258
+ const h = new URL(location.href).searchParams, b = h.get("builder.preview"), y = h.get(
2259
+ `builder.preview.${b}`
2257
2260
  ), k = h.get("apiKey") || h.get("builder.space");
2258
- x === e.model && k === e.apiKey && (!e.content || y === e.content.id) && Ce({
2261
+ b === e.model && k === e.apiKey && (!e.content || y === e.content.id) && Ce({
2259
2262
  model: e.model,
2260
2263
  apiKey: e.apiKey,
2261
2264
  apiVersion: e.builderContextSignal.apiVersion
2262
- }).then((I) => {
2263
- I && a(I);
2265
+ }).then((R) => {
2266
+ R && a(R);
2264
2267
  });
2265
2268
  }
2266
2269
  return P(() => {
@@ -2279,24 +2282,24 @@ function zt(e) {
2279
2282
  var m;
2280
2283
  return (m = t.current) == null || m.addEventListener(
2281
2284
  "initpreviewingbldr",
2282
- w
2285
+ T
2283
2286
  ), () => {
2284
2287
  var h;
2285
2288
  return (h = t.current) == null ? void 0 : h.removeEventListener(
2286
2289
  "initpreviewingbldr",
2287
- w
2290
+ T
2288
2291
  );
2289
2292
  };
2290
2293
  }, []), P(() => {
2291
2294
  var m, h;
2292
2295
  if (N()) {
2293
2296
  if ($() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
2294
- const y = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, k = (h = e.builderContextSignal.content) == null ? void 0 : h.id, I = e.apiKey;
2297
+ const y = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, k = (h = e.builderContextSignal.content) == null ? void 0 : h.id, R = e.apiKey;
2295
2298
  ce({
2296
2299
  type: "impression",
2297
2300
  canTrack: !0,
2298
2301
  contentId: k,
2299
- apiKey: I,
2302
+ apiKey: R,
2300
2303
  variationId: y !== k ? y : void 0
2301
2304
  });
2302
2305
  }
@@ -2305,7 +2308,7 @@ function zt(e) {
2305
2308
  }, []), P(() => {
2306
2309
  e.apiKey || M.error(
2307
2310
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2308
- ), c(), E(), R();
2311
+ ), c(), I(), w();
2309
2312
  }, []), P(() => {
2310
2313
  e.content && a(e.content);
2311
2314
  }, [e.content]), P(() => {
@@ -2315,13 +2318,13 @@ function zt(e) {
2315
2318
  (B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
2316
2319
  e.builderContextSignal.rootState
2317
2320
  ]), P(() => {
2318
- E();
2321
+ I();
2319
2322
  }, [(W = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : W.httpRequests]), P(() => {
2320
- R();
2323
+ w();
2321
2324
  }, [e.builderContextSignal.rootState]), P(() => () => {
2322
2325
  N() && (window.removeEventListener("message", s), window.removeEventListener(
2323
2326
  "builder:component:stateChangeListenerActivated",
2324
- R
2327
+ w
2325
2328
  ));
2326
2329
  }, []), /* @__PURE__ */ r(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ ke(
2327
2330
  "div",
@@ -2376,7 +2379,7 @@ font-weight: ${l};
2376
2379
  contentId: t
2377
2380
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2378
2381
  function Gt(e) {
2379
- const [t, n] = p(
2382
+ const [t, n] = v(
2380
2383
  () => `
2381
2384
  ${Qt({
2382
2385
  cssCode: e.cssCode,
@@ -2431,25 +2434,25 @@ const Jt = ({
2431
2434
  meta: e == null ? void 0 : e.meta
2432
2435
  } : void 0;
2433
2436
  function ve(e) {
2434
- var c, d, u, g, v, V, b;
2435
- const [t, n] = p(
2437
+ var c, d, u, g, S, V, x;
2438
+ const [t, n] = v(
2436
2439
  () => {
2437
- var S, E;
2440
+ var p, I;
2438
2441
  return jt({
2439
2442
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2440
- variationId: (S = e.content) == null ? void 0 : S.testVariationId,
2443
+ variationId: (p = e.content) == null ? void 0 : p.testVariationId,
2441
2444
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2442
- contentId: (E = e.content) == null ? void 0 : E.id
2445
+ contentId: (I = e.content) == null ? void 0 : I.id
2443
2446
  });
2444
2447
  }
2445
2448
  );
2446
- function i(S) {
2447
- s((E) => ({
2448
- ...E,
2449
- rootState: S
2449
+ function i(p) {
2450
+ s((I) => ({
2451
+ ...I,
2452
+ rootState: p
2450
2453
  }));
2451
2454
  }
2452
- const [a, o] = p(
2455
+ const [a, o] = v(
2453
2456
  () => [
2454
2457
  ...be(),
2455
2458
  // While this `components` object is deprecated, we must maintain support for it.
@@ -2460,16 +2463,16 @@ function ve(e) {
2460
2463
  ...se,
2461
2464
  ...e.customComponents || []
2462
2465
  ].reduce(
2463
- (S, { component: E, ...R }) => ({
2464
- ...S,
2465
- [R.name]: {
2466
- component: E,
2467
- ...de(R)
2466
+ (p, { component: I, ...w }) => ({
2467
+ ...p,
2468
+ [w.name]: {
2469
+ component: I,
2470
+ ...de(w)
2468
2471
  }
2469
2472
  }),
2470
2473
  {}
2471
2474
  )
2472
- ), [l, s] = p(() => ({
2475
+ ), [l, s] = v(() => ({
2473
2476
  content: Xt({
2474
2477
  content: e.content,
2475
2478
  data: e.data
@@ -2494,9 +2497,9 @@ function ve(e) {
2494
2497
  ...se,
2495
2498
  ...e.customComponents || []
2496
2499
  ].reduce(
2497
- (S, { component: E, ...R }) => ({
2498
- ...S,
2499
- [R.name]: de(R)
2500
+ (p, { component: I, ...w }) => ({
2501
+ ...p,
2502
+ [w.name]: de(w)
2500
2503
  }),
2501
2504
  {}
2502
2505
  ),
@@ -2508,7 +2511,7 @@ function ve(e) {
2508
2511
  value: {
2509
2512
  registeredComponents: a
2510
2513
  },
2511
- children: /* @__PURE__ */ T(
2514
+ children: /* @__PURE__ */ E(
2512
2515
  zt,
2513
2516
  {
2514
2517
  content: e.content,
@@ -2529,13 +2532,13 @@ function ve(e) {
2529
2532
  {
2530
2533
  contentId: (c = l.content) == null ? void 0 : c.id,
2531
2534
  cssCode: (u = (d = l.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
2532
- customFonts: (v = (g = l.content) == null ? void 0 : g.data) == null ? void 0 : v.customFonts
2535
+ customFonts: (S = (g = l.content) == null ? void 0 : g.data) == null ? void 0 : S.customFonts
2533
2536
  }
2534
2537
  ) }),
2535
2538
  /* @__PURE__ */ r(
2536
2539
  ie,
2537
2540
  {
2538
- blocks: (b = (V = l.content) == null ? void 0 : V.data) == null ? void 0 : b.blocks,
2541
+ blocks: (x = (V = l.content) == null ? void 0 : V.data) == null ? void 0 : x.blocks,
2539
2542
  context: l,
2540
2543
  registeredComponents: a
2541
2544
  }
@@ -2548,7 +2551,7 @@ function ve(e) {
2548
2551
  }
2549
2552
  function Ae(e) {
2550
2553
  var l, s;
2551
- const [t, n] = p(
2554
+ const [t, n] = v(
2552
2555
  () => Ft({
2553
2556
  canTrack: U(e.canTrack),
2554
2557
  content: e.content
@@ -2578,9 +2581,9 @@ function Ae(e) {
2578
2581
  });
2579
2582
  }
2580
2583
  return P(() => {
2581
- }, []), /* @__PURE__ */ T(f, { children: [
2584
+ }, []), /* @__PURE__ */ E(f, { children: [
2582
2585
  !e.__isNestedRender && L !== "reactNative" ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: _t() }) }) : null,
2583
- t ? /* @__PURE__ */ T(f, { children: [
2586
+ t ? /* @__PURE__ */ E(f, { children: [
2584
2587
  /* @__PURE__ */ r(
2585
2588
  K,
2586
2589
  {
@@ -2659,7 +2662,7 @@ function en(e) {
2659
2662
  (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2660
2663
  ].filter(Boolean).join(" ");
2661
2664
  }
2662
- const [n, i] = p(() => {
2665
+ const [n, i] = v(() => {
2663
2666
  var c;
2664
2667
  return (c = e.symbol) == null ? void 0 : c.content;
2665
2668
  });