@builder.io/sdk-react 5.0.1 → 5.1.1

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 (71) hide show
  1. package/lib/browser/blocks-exports.cjs +15 -15
  2. package/lib/browser/blocks-exports.mjs +400 -368
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-54562695.cjs → server-entry-85aa99e6.cjs} +2 -2
  6. package/lib/browser/{server-entry-48d8b908.js → server-entry-a3b5302c.js} +126 -126
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-8b1f60fc.cjs → accordion-1e467b30.cjs} +1 -1
  10. package/lib/edge/{accordion-66ebf67c.js → accordion-83f68de4.js} +1 -1
  11. package/lib/edge/{blocks-1dc43011.cjs → blocks-4d57d38f.cjs} +12 -12
  12. package/lib/edge/{blocks-c00ca88f.js → blocks-6b821501.js} +359 -327
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-041e711c.js → button-52af8a54.js} +2 -2
  16. package/lib/edge/{button-1984c901.cjs → button-b2eb1d64.cjs} +1 -1
  17. package/lib/edge/{columns-2b2cf661.cjs → columns-8eb66fad.cjs} +1 -1
  18. package/lib/edge/{columns-92e5946e.js → columns-e0489b50.js} +3 -3
  19. package/lib/edge/{content-variants-cce99ed6.js → content-variants-5003144d.js} +12 -12
  20. package/lib/edge/{content-variants-bc4a2651.cjs → content-variants-6c1ee307.cjs} +2 -2
  21. package/lib/edge/{custom-code-f7e6cd68.js → custom-code-4e76fc0d.js} +1 -1
  22. package/lib/edge/{custom-code-1f128470.cjs → custom-code-bc787526.cjs} +1 -1
  23. package/lib/edge/{embed-bc36f168.cjs → embed-8ef248c5.cjs} +1 -1
  24. package/lib/edge/{embed-52205349.js → embed-fd344d6d.js} +1 -1
  25. package/lib/edge/{form-5786e8d3.cjs → form-107c9eae.cjs} +1 -1
  26. package/lib/edge/{form-3df2f242.js → form-4efa40a5.js} +3 -3
  27. package/lib/edge/{get-class-prop-name-0276175d.cjs → get-class-prop-name-2c2513e9.cjs} +1 -1
  28. package/lib/edge/{get-class-prop-name-219095c0.js → get-class-prop-name-e6f7321f.js} +1 -1
  29. package/lib/edge/{img-b5312e74.js → img-a32b0723.js} +2 -2
  30. package/lib/edge/{img-e7eefcb8.cjs → img-ab241f22.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/{input-46b7c2f4.cjs → input-ada30ffb.cjs} +1 -1
  34. package/lib/edge/{input-0ae31d0b.js → input-c48fe23a.js} +1 -1
  35. package/lib/edge/{personalization-container-8000ecb8.cjs → personalization-container-375a1501.cjs} +1 -1
  36. package/lib/edge/{personalization-container-31c5a316.js → personalization-container-ad7cf89c.js} +4 -4
  37. package/lib/edge/{select-c02d2710.cjs → select-879c52dd.cjs} +1 -1
  38. package/lib/edge/{select-b32b2a7b.js → select-a49d819c.js} +1 -1
  39. package/lib/edge/{server-entry-5edd9be5.cjs → server-entry-560732da.cjs} +1 -1
  40. package/lib/edge/{server-entry-406d9576.js → server-entry-68d59577.js} +1 -1
  41. package/lib/edge/server-entry.cjs +1 -1
  42. package/lib/edge/server-entry.mjs +1 -1
  43. package/lib/edge/{slot-63da11c0.js → slot-005d6258.js} +3 -3
  44. package/lib/edge/{slot-d9dad534.cjs → slot-5da991d1.cjs} +1 -1
  45. package/lib/edge/{symbol-a6bc073a.js → symbol-155906ed.js} +2 -2
  46. package/lib/edge/{symbol-9c9940fb.cjs → symbol-7e6ac72e.cjs} +1 -1
  47. package/lib/edge/{tabs-bb475169.js → tabs-69a36a5c.js} +3 -3
  48. package/lib/edge/{tabs-57b3f986.cjs → tabs-96367bf5.cjs} +1 -1
  49. package/lib/node/blocks-exports.cjs +5 -5
  50. package/lib/node/blocks-exports.mjs +143 -127
  51. package/lib/node/index.cjs +1 -1
  52. package/lib/node/index.mjs +3 -3
  53. package/lib/node/init.cjs +1 -1
  54. package/lib/node/init.mjs +3 -3
  55. package/lib/node/{server-entry-92d43cb8.cjs → server-entry-2529c06e.cjs} +2 -2
  56. package/lib/node/{server-entry-f9e5ab97.js → server-entry-fc7f08d8.js} +126 -126
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/lib/node/{setIvm-fb14c72b.js → setIvm-41d8b067.js} +90 -68
  60. package/lib/node/setIvm-b97cfb8b.cjs +48 -0
  61. package/lib/node/setIvm.cjs +1 -1
  62. package/lib/node/setIvm.mjs +2 -2
  63. package/lib/node/{should-force-browser-runtime-in-node-e9c386f7.cjs → should-force-browser-runtime-in-node-1d85a066.cjs} +1 -1
  64. package/lib/node/{should-force-browser-runtime-in-node-7a57d156.js → should-force-browser-runtime-in-node-fc5c3a06.js} +1 -1
  65. package/package.json +1 -1
  66. package/types/constants/sdk-version.d.ts +1 -1
  67. package/types/functions/evaluate/evaluate.d.ts +1 -1
  68. package/types/functions/evaluate/helpers.d.ts +9 -1
  69. package/types/functions/get-block-actions-handler.d.ts +2 -0
  70. package/types/functions/get-block-actions.d.ts +2 -0
  71. package/lib/node/setIvm-b11f9172.cjs +0 -48
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { TARGET as F, isBrowser as G, logger as ee, checkIsDefined as ge, isPreviewing as oe, isEditing as U, userAttributesService as Te, getDefaultCanTrack as Z, logFetch as Le, setupBrowserForEditing as st, createRegisterComponentMessage as ct, getCookieSync as ut, _track as Ie, fetchOneEntry as Oe, createEditorListener as dt, serializeIncludingFunctions as we, handleABTestingSync as mt } from "./server-entry-f9e5ab97.js";
3
- import { setClientUserAttributes as qi } from "./server-entry-f9e5ab97.js";
2
+ import { TARGET as F, isBrowser as G, logger as ee, checkIsDefined as be, isPreviewing as oe, isEditing as U, userAttributesService as Te, getDefaultCanTrack as Z, logFetch as Le, setupBrowserForEditing as st, createRegisterComponentMessage as ct, getCookieSync as ut, _track as Ie, fetchOneEntry as Oe, createEditorListener as dt, serializeIncludingFunctions as we, handleABTestingSync as mt } from "./server-entry-fc7f08d8.js";
3
+ import { setClientUserAttributes as qi } from "./server-entry-fc7f08d8.js";
4
4
  import { jsx as s, Fragment as w, jsxs as D } from "react/jsx-runtime";
5
5
  import * as ft from "react";
6
6
  import { createContext as _e, useEffect as B, useState as k, useContext as ye, useRef as z, createElement as Ue } from "react";
7
- import { getFunctionArguments as ht, flattenState as bt, runInNode as gt, parseCode as yt, getBuilderGlobals as pt, set as He, fastClone as ve } from "./setIvm-fb14c72b.js";
8
- import { shouldForceBrowserRuntimeInNode as vt } from "./should-force-browser-runtime-in-node-7a57d156.js";
7
+ import { getFunctionArguments as ht, flattenState as gt, runInNode as bt, parseCode as yt, getBuilderGlobals as pt, set as He, fastClone as ve } from "./setIvm-41d8b067.js";
8
+ import { shouldForceBrowserRuntimeInNode as vt } from "./should-force-browser-runtime-in-node-fc5c3a06.js";
9
9
  const xt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), St = (e) => typeof e == "string" && xt.has(e.toLowerCase());
10
10
  function xe(e) {
11
11
  return /* @__PURE__ */ s(w, { children: St(e.TagName) ? /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(w, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
@@ -79,7 +79,7 @@ const le = _e({
79
79
  builder: t,
80
80
  context: n,
81
81
  event: i,
82
- state: bt({
82
+ state: gt({
83
83
  rootState: o,
84
84
  localState: a,
85
85
  rootSetState: r
@@ -88,7 +88,7 @@ const le = _e({
88
88
  return new Function(...l.map(([c]) => c), e)(...l.map(([, c]) => c));
89
89
  }, Tt = (e) => G() || vt({
90
90
  shouldLogWarning: !0
91
- }) ? Ct(e) : gt(e), It = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, wt = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Et = (e) => {
91
+ }) ? Ct(e) : bt(e), It = /^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/, wt = /(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/, Et = (e) => {
92
92
  var t, n, i, a, r, o;
93
93
  return ((i = (n = (t = It.exec(e.trim())) == null ? void 0 : t.groups) == null ? void 0 : n.getPath) == null ? void 0 : i.slice(1)) || ((o = (r = (a = wt.exec(e.trim())) == null ? void 0 : a.groups) == null ? void 0 : r.getPath) == null ? void 0 : o.slice(1));
94
94
  };
@@ -99,21 +99,22 @@ function Q({
99
99
  rootState: i,
100
100
  rootSetState: a,
101
101
  event: r,
102
- isExpression: o = !0
102
+ isExpression: o = !0,
103
+ trackingContext: l
103
104
  }) {
104
105
  if (e.trim() === "")
105
106
  return;
106
- const l = Et(e.trim());
107
- if (l)
107
+ const c = Et(e.trim());
108
+ if (c)
108
109
  return qe({
109
110
  ...i,
110
111
  ...n
111
- }, l);
112
- const c = {
112
+ }, c);
113
+ const d = {
113
114
  code: yt(e, {
114
115
  isExpression: o
115
116
  }),
116
- builder: pt(),
117
+ builder: pt(l),
117
118
  context: t,
118
119
  event: r,
119
120
  rootSetState: a,
@@ -121,9 +122,9 @@ function Q({
121
122
  localState: n
122
123
  };
123
124
  try {
124
- return Tt(c);
125
- } catch (d) {
126
- ee.error("Failed code evaluation: " + d.message, {
125
+ return Tt(d);
126
+ } catch (h) {
127
+ ee.error("Failed code evaluation: " + h.message, {
127
128
  code: e
128
129
  });
129
130
  return;
@@ -358,8 +359,8 @@ function Ut(e) {
358
359
  leading: !1
359
360
  });
360
361
  function l(h) {
361
- const g = h.getBoundingClientRect(), u = window.innerHeight, f = (e.thresholdPercent || 0) / 100 * u;
362
- return g.bottom > f && g.top < u - f;
362
+ const b = h.getBoundingClientRect(), u = window.innerHeight, f = (e.thresholdPercent || 0) / 100 * u;
363
+ return b.bottom > f && b.top < u - f;
363
364
  }
364
365
  const c = e.steps[0].styles;
365
366
  function d() {
@@ -376,7 +377,7 @@ function Ut(e) {
376
377
  const Ge = (e) => Object.entries(e).map(([n, i]) => {
377
378
  if (typeof i == "string")
378
379
  return `${se(n)}: ${i};`;
379
- }).filter(ge), Ht = (e) => Ge(e).join(`
380
+ }).filter(be), Ht = (e) => Ge(e).join(`
380
381
  `), Y = ({
381
382
  mediaQuery: e,
382
383
  className: t,
@@ -497,7 +498,8 @@ const Xt = (e) => `on${Yt(e)}`, Zt = (e, t) => (n) => Q({
497
498
  rootState: t.rootState,
498
499
  rootSetState: t.rootSetState,
499
500
  event: n,
500
- isExpression: !1
501
+ isExpression: !1,
502
+ trackingContext: t.trackingContext
501
503
  });
502
504
  function Xe(e) {
503
505
  var i;
@@ -550,6 +552,7 @@ function Se({
550
552
  });
551
553
  }
552
554
  function nn(e) {
555
+ var t, n, i;
553
556
  return /* @__PURE__ */ s(
554
557
  xe,
555
558
  {
@@ -564,7 +567,13 @@ function nn(e) {
564
567
  rootSetState: e.context.rootSetState,
565
568
  localState: e.context.localState,
566
569
  context: e.context.context,
567
- stripPrefix: !0
570
+ stripPrefix: !0,
571
+ trackingContext: {
572
+ apiKey: e.context.apiKey,
573
+ canTrack: (t = e.context.canTrack) != null ? t : !0,
574
+ contentId: (n = e.context.content) == null ? void 0 : n.id,
575
+ variationId: (i = e.context.content) == null ? void 0 : i.testVariationId
576
+ }
568
577
  }),
569
578
  children: e.children
570
579
  }
@@ -578,6 +587,7 @@ function rn(e) {
578
587
  var i, a;
579
588
  k(() => 0);
580
589
  function t() {
590
+ var r, o, l;
581
591
  return e.includeBlockProps ? {
582
592
  ...Se({
583
593
  block: e.block,
@@ -588,7 +598,13 @@ function rn(e) {
588
598
  rootState: e.context.rootState,
589
599
  rootSetState: e.context.rootSetState,
590
600
  localState: e.context.localState,
591
- context: e.context.context
601
+ context: e.context.context,
602
+ trackingContext: {
603
+ apiKey: e.context.apiKey,
604
+ canTrack: (r = e.context.canTrack) != null ? r : !0,
605
+ contentId: (o = e.context.content) == null ? void 0 : o.id,
606
+ variationId: (l = e.context.content) == null ? void 0 : l.testVariationId
607
+ }
592
608
  })
593
609
  } : {};
594
610
  }
@@ -756,13 +772,13 @@ function te(e) {
756
772
  function Ve(e) {
757
773
  function t() {
758
774
  const i = e.block;
759
- return ge(i.hide) ? !i.hide : ge(i.show) ? i.show : !0;
775
+ return be(i.hide) ? !i.hide : be(i.show) ? i.show : !0;
760
776
  }
761
777
  function n() {
762
778
  var T, E, _, H, q;
763
779
  const i = e.block, a = i.responsiveStyles, r = e.context.content, o = et(
764
780
  ((T = r == null ? void 0 : r.meta) == null ? void 0 : T.breakpoints) || {}
765
- ), l = !!((_ = (E = r == null ? void 0 : r.meta) == null ? void 0 : E.breakpoints) != null && _.xsmall), c = a == null ? void 0 : a.large, d = a == null ? void 0 : a.medium, h = a == null ? void 0 : a.small, g = a == null ? void 0 : a.xsmall, u = i.id;
781
+ ), l = !!((_ = (E = r == null ? void 0 : r.meta) == null ? void 0 : E.breakpoints) != null && _.xsmall), c = a == null ? void 0 : a.large, d = a == null ? void 0 : a.medium, h = a == null ? void 0 : a.small, b = a == null ? void 0 : a.xsmall, u = i.id;
766
782
  if (!u)
767
783
  return "";
768
784
  const x = c ? Y({
@@ -782,25 +798,25 @@ function Ve(e) {
782
798
  "small",
783
799
  o
784
800
  )
785
- }) : "", y = g && l ? Y({
801
+ }) : "", y = b && l ? Y({
786
802
  className: u,
787
- styles: g,
803
+ styles: b,
788
804
  mediaQuery: ue(
789
805
  "xsmall",
790
806
  o
791
807
  )
792
- }) : "", b = i.animations && i.animations.find((p) => p.trigger === "hover");
808
+ }) : "", g = i.animations && i.animations.find((p) => p.trigger === "hover");
793
809
  let S = "";
794
- if (b) {
795
- const p = ((q = (H = b.steps) == null ? void 0 : H[1]) == null ? void 0 : q.styles) || {};
810
+ if (g) {
811
+ const p = ((q = (H = g.steps) == null ? void 0 : H[1]) == null ? void 0 : q.styles) || {};
796
812
  S = Y({
797
813
  className: `${u}:hover`,
798
814
  styles: {
799
815
  ...p,
800
- transition: `all ${b.duration}s ${se(
801
- b.easing
816
+ transition: `all ${g.duration}s ${se(
817
+ g.easing
802
818
  )}`,
803
- transitionDelay: b.delay ? `${b.delay}s` : "0s"
819
+ transitionDelay: g.delay ? `${g.delay}s` : "0s"
804
820
  }
805
821
  }) || "";
806
822
  }
@@ -828,7 +844,7 @@ function ln(e) {
828
844
  }, []), /* @__PURE__ */ s(w, { children: t ? /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(Ve, { block: e.block, context: e.context }) }) }) : /* @__PURE__ */ s(w, { children: /* @__PURE__ */ s(Ve, { block: e.block, context: e.context }) }) });
829
845
  }
830
846
  function ce(e) {
831
- var h, g, u, x;
847
+ var h, b, u, x;
832
848
  function t() {
833
849
  return zt({
834
850
  block: e.block,
@@ -864,9 +880,9 @@ function ce(e) {
864
880
  return e.block.tagName === "a" || ((m = a().properties) == null ? void 0 : m.href) || a().href ? e.linkComponent || "a" : e.block.tagName || "div";
865
881
  }
866
882
  function l() {
867
- var y, b;
883
+ var y, g;
868
884
  if ((y = e.block.repeat) != null && y.collection)
869
- return !!((b = t == null ? void 0 : t()) != null && b.length);
885
+ return !!((g = t == null ? void 0 : t()) != null && g.length);
870
886
  const f = "hide" in a() ? a().hide : !1;
871
887
  return ("show" in a() ? a().show : !0) && !f;
872
888
  }
@@ -875,7 +891,7 @@ function ce(e) {
875
891
  return !((m = r == null ? void 0 : r()) != null && m.component) && !t() ? (y = a().children) != null ? y : [] : [];
876
892
  }
877
893
  function d() {
878
- var f, m, y, b;
894
+ var f, m, y, g;
879
895
  return {
880
896
  blockChildren: (f = a().children) != null ? f : [],
881
897
  componentRef: (m = r == null ? void 0 : r()) == null ? void 0 : m.component,
@@ -895,7 +911,7 @@ function ce(e) {
895
911
  registeredComponents: e.registeredComponents,
896
912
  builderBlock: a(),
897
913
  includeBlockProps: ((y = r == null ? void 0 : r()) == null ? void 0 : y.noWrap) === !0,
898
- isInteractive: !((b = r == null ? void 0 : r()) != null && b.isRSC && F === "rsc")
914
+ isInteractive: !((g = r == null ? void 0 : r()) != null && g.isRSC && F === "rsc")
899
915
  };
900
916
  }
901
917
  return B(() => {
@@ -969,7 +985,7 @@ function ce(e) {
969
985
  isInteractive: d().isInteractive
970
986
  }
971
987
  ),
972
- (g = c()) == null ? void 0 : g.map((f) => /* @__PURE__ */ s(
988
+ (b = c()) == null ? void 0 : b.map((f) => /* @__PURE__ */ s(
973
989
  ce,
974
990
  {
975
991
  block: f,
@@ -1093,28 +1109,28 @@ function un(e) {
1093
1109
  function i() {
1094
1110
  return e.stackColumnsAt || "tablet";
1095
1111
  }
1096
- function a(b) {
1097
- return b.link ? e.builderLinkComponent || "a" : "div";
1112
+ function a(g) {
1113
+ return g.link ? e.builderLinkComponent || "a" : "div";
1098
1114
  }
1099
- function r(b) {
1115
+ function r(g) {
1100
1116
  var S;
1101
- return ((S = n()[b]) == null ? void 0 : S.width) || 100 / n().length;
1117
+ return ((S = n()[g]) == null ? void 0 : S.width) || 100 / n().length;
1102
1118
  }
1103
- function o(b) {
1104
- const S = r(b), T = t() * (n().length - 1) * (S / 100);
1119
+ function o(g) {
1120
+ const S = r(g), T = t() * (n().length - 1) * (S / 100);
1105
1121
  return `calc(${S}% - ${T}px)`;
1106
1122
  }
1107
1123
  function l({
1108
- stackedStyle: b,
1124
+ stackedStyle: g,
1109
1125
  desktopStyle: S
1110
1126
  }) {
1111
- return i() === "tablet" ? b : S;
1127
+ return i() === "tablet" ? g : S;
1112
1128
  }
1113
1129
  function c({
1114
- stackedStyle: b,
1130
+ stackedStyle: g,
1115
1131
  desktopStyle: S
1116
1132
  }) {
1117
- return i() === "never" ? S : b;
1133
+ return i() === "never" ? S : g;
1118
1134
  }
1119
1135
  function d() {
1120
1136
  return e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column";
@@ -1128,8 +1144,8 @@ function un(e) {
1128
1144
  })
1129
1145
  };
1130
1146
  }
1131
- function g(b) {
1132
- const S = b === 0 ? 0 : t(), T = o(b), E = `${S}px`, _ = "100%", H = 0;
1147
+ function b(g) {
1148
+ const S = g === 0 ? 0 : t(), T = o(g), E = `${S}px`, _ = "100%", H = 0;
1133
1149
  return {
1134
1150
  ...{
1135
1151
  display: "flex",
@@ -1156,14 +1172,14 @@ function un(e) {
1156
1172
  })
1157
1173
  };
1158
1174
  }
1159
- function u(b) {
1175
+ function u(g) {
1160
1176
  var T, E;
1161
1177
  return et(
1162
1178
  ((E = (T = e.builderContext.content) == null ? void 0 : T.meta) == null ? void 0 : E.breakpoints) || {}
1163
- )[b].max;
1179
+ )[g].max;
1164
1180
  }
1165
1181
  function x() {
1166
- const b = `.${e.builderBlock.id}-breakpoints > .builder-column`;
1182
+ const g = `.${e.builderBlock.id}-breakpoints > .builder-column`;
1167
1183
  return `
1168
1184
  @media (max-width: ${u("medium")}px) {
1169
1185
  .${e.builderBlock.id}-breakpoints {
@@ -1171,7 +1187,7 @@ function un(e) {
1171
1187
  align-items: stretch;
1172
1188
  }
1173
1189
 
1174
- ${b} {
1190
+ ${g} {
1175
1191
  width: var(--column-width-tablet) !important;
1176
1192
  margin-left: var(--column-margin-left-tablet) !important;
1177
1193
  }
@@ -1183,20 +1199,20 @@ function un(e) {
1183
1199
  align-items: stretch;
1184
1200
  }
1185
1201
 
1186
- ${b} {
1202
+ ${g} {
1187
1203
  width: var(--column-width-mobile) !important;
1188
1204
  margin-left: var(--column-margin-left-mobile) !important;
1189
1205
  }
1190
1206
  },
1191
1207
  `;
1192
1208
  }
1193
- function f(b, S) {
1209
+ function f(g, S) {
1194
1210
  return {
1195
- ...b.link ? {
1196
- href: b.link
1211
+ ...g.link ? {
1212
+ href: g.link
1197
1213
  } : {},
1198
1214
  [K()]: "builder-column",
1199
- style: Qe(g(S))
1215
+ style: Qe(b(S))
1200
1216
  };
1201
1217
  }
1202
1218
  return /* @__PURE__ */ D(w, { children: [
@@ -1219,12 +1235,12 @@ function un(e) {
1219
1235
  nonce: e.builderContext.nonce
1220
1236
  }
1221
1237
  ),
1222
- (y = e.columns) == null ? void 0 : y.map((b, S) => /* @__PURE__ */ s(
1238
+ (y = e.columns) == null ? void 0 : y.map((g, S) => /* @__PURE__ */ s(
1223
1239
  xe,
1224
1240
  {
1225
- TagName: a(b),
1241
+ TagName: a(g),
1226
1242
  actionAttributes: {},
1227
- attributes: f(b, S),
1243
+ attributes: f(g, S),
1228
1244
  children: /* @__PURE__ */ s(
1229
1245
  M,
1230
1246
  {
@@ -1233,7 +1249,7 @@ function un(e) {
1233
1249
  context: e.builderContext,
1234
1250
  registeredComponents: e.builderComponents,
1235
1251
  linkComponent: e.builderLinkComponent,
1236
- blocks: b.blocks,
1252
+ blocks: g.blocks,
1237
1253
  styleProp: {
1238
1254
  flexGrow: "1"
1239
1255
  }
@@ -1284,18 +1300,18 @@ function hn(e) {
1284
1300
  var a, r, o, l, c, d;
1285
1301
  function t() {
1286
1302
  var u;
1287
- const g = e.image || e.src;
1288
- if (!g || // We can auto add srcset for cdn.builder.io and shopify
1303
+ const b = e.image || e.src;
1304
+ if (!b || // We can auto add srcset for cdn.builder.io and shopify
1289
1305
  // images, otherwise you can supply this prop manually
1290
- !(typeof g == "string" && (g.match(/builder\.io/) || g.match(/cdn\.shopify\.com/))))
1306
+ !(typeof b == "string" && (b.match(/builder\.io/) || b.match(/cdn\.shopify\.com/))))
1291
1307
  return e.srcset;
1292
1308
  if (!e.noWebp) {
1293
1309
  if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
1294
1310
  if (!e.srcset.includes(e.image.split("?")[0]))
1295
- return console.debug("Removed given srcset"), de(g);
1311
+ return console.debug("Removed given srcset"), de(b);
1296
1312
  } else if (e.image && !e.srcset)
1297
- return de(g);
1298
- return de(g);
1313
+ return de(b);
1314
+ return de(b);
1299
1315
  }
1300
1316
  }
1301
1317
  function n() {
@@ -1368,7 +1384,7 @@ function hn(e) {
1368
1384
  ] })
1369
1385
  ] });
1370
1386
  }
1371
- function bn(e) {
1387
+ function gn(e) {
1372
1388
  return /* @__PURE__ */ s(
1373
1389
  "section",
1374
1390
  {
@@ -1389,7 +1405,7 @@ function bn(e) {
1389
1405
  }
1390
1406
  );
1391
1407
  }
1392
- function gn(e, t, n, i) {
1408
+ function bn(e, t, n, i) {
1393
1409
  function a(d) {
1394
1410
  return typeof d == "string";
1395
1411
  }
@@ -1780,7 +1796,7 @@ const Cn = () => `
1780
1796
  }
1781
1797
  }, Be = (e) => e.toString();
1782
1798
  function En(e) {
1783
- var g;
1799
+ var b;
1784
1800
  const [t, n] = k(() => []);
1785
1801
  function i() {
1786
1802
  return !!(e.grid || e.oneAtATime);
@@ -1824,18 +1840,18 @@ function En(e) {
1824
1840
  `.builder-accordion-title[data-index="${f}"]`
1825
1841
  );
1826
1842
  if (u = f, y) {
1827
- let b = y.getBoundingClientRect();
1843
+ let g = y.getBoundingClientRect();
1828
1844
  for (; y = y && y.nextElementSibling; )
1829
1845
  if (y) {
1830
1846
  if (y.classList.contains("builder-accordion-detail"))
1831
1847
  continue;
1832
1848
  const S = y.getBoundingClientRect();
1833
- if (S.left > b.left) {
1849
+ if (S.left > g.left) {
1834
1850
  const T = parseInt(
1835
1851
  y.getAttribute("data-index") || "",
1836
1852
  10
1837
1853
  );
1838
- isNaN(T) || (b = S, u = T);
1854
+ isNaN(T) || (g = S, u = T);
1839
1855
  } else
1840
1856
  break;
1841
1857
  }
@@ -1857,7 +1873,7 @@ function En(e) {
1857
1873
  function h(u) {
1858
1874
  t.includes(u) ? n(i() ? [] : t.filter((x) => x !== u)) : n(i() ? [u] : t.concat(u));
1859
1875
  }
1860
- return /* @__PURE__ */ s("div", { className: "builder-accordion", style: a(), children: (g = e.items) == null ? void 0 : g.map((u, x) => /* @__PURE__ */ D(ft.Fragment, { children: [
1876
+ return /* @__PURE__ */ s("div", { className: "builder-accordion", style: a(), children: (b = e.items) == null ? void 0 : b.map((u, x) => /* @__PURE__ */ D(ft.Fragment, { children: [
1861
1877
  /* @__PURE__ */ s(
1862
1878
  "div",
1863
1879
  {
@@ -2176,13 +2192,13 @@ const Rn = {
2176
2192
  function n(o, l = 6e4) {
2177
2193
  return new Promise((c, d) => {
2178
2194
  const h = document.createElement("img");
2179
- let g = !1;
2195
+ let b = !1;
2180
2196
  h.onload = () => {
2181
- g = !0, c(h);
2197
+ b = !0, c(h);
2182
2198
  }, h.addEventListener("error", (u) => {
2183
2199
  console.warn("Image load failed", u.error), d(u.error);
2184
2200
  }), h.src = o, setTimeout(() => {
2185
- g || d(new Error("Image load timed out"));
2201
+ b || d(new Error("Image load timed out"));
2186
2202
  }, l);
2187
2203
  });
2188
2204
  }
@@ -2334,7 +2350,7 @@ function $n(e) {
2334
2350
  (C = (N = e.builderContext) == null ? void 0 : N.rootState) == null ? void 0 : C.locale
2335
2351
  );
2336
2352
  }
2337
- ), [c, d] = k(() => []), [h, g] = k(
2353
+ ), [c, d] = k(() => []), [h, b] = k(
2338
2354
  () => {
2339
2355
  var I;
2340
2356
  return Sn(
@@ -2352,7 +2368,7 @@ function $n(e) {
2352
2368
  function m() {
2353
2369
  return (e.variants || []).filter((I) => {
2354
2370
  var N, C, W, L;
2355
- return gn(
2371
+ return bn(
2356
2372
  {
2357
2373
  ...(C = (N = e.builderContext) == null ? void 0 : N.rootState) != null && C.locale ? {
2358
2374
  locale: (L = (W = e.builderContext) == null ? void 0 : W.rootState) == null ? void 0 : L.locale
@@ -2375,7 +2391,7 @@ function $n(e) {
2375
2391
  previewingIndex: e.previewingIndex
2376
2392
  });
2377
2393
  }
2378
- function b() {
2394
+ function g() {
2379
2395
  return (e.variants || []).map(
2380
2396
  (I, N) => {
2381
2397
  var C;
@@ -2443,7 +2459,7 @@ function $n(e) {
2443
2459
  te,
2444
2460
  {
2445
2461
  nonce: ((_ = e.builderContext) == null ? void 0 : _.nonce) || "",
2446
- styles: b(),
2462
+ styles: g(),
2447
2463
  id: `variants-styles-${(H = e.builderBlock) == null ? void 0 : H.id}`
2448
2464
  }
2449
2465
  ),
@@ -2651,7 +2667,7 @@ const Ln = {
2651
2667
  text: "New tab"
2652
2668
  }
2653
2669
  }
2654
- }, be = {
2670
+ }, ge = {
2655
2671
  "@type": "@builder.io/sdk:Element",
2656
2672
  responsiveStyles: {
2657
2673
  large: {
@@ -2682,7 +2698,7 @@ const Ln = {
2682
2698
  name: "content",
2683
2699
  type: "uiBlocks",
2684
2700
  hideFromUI: !0,
2685
- defaultValue: [be]
2701
+ defaultValue: [ge]
2686
2702
  }],
2687
2703
  defaultValue: [{
2688
2704
  label: [{
@@ -2695,7 +2711,7 @@ const Ln = {
2695
2711
  }
2696
2712
  }],
2697
2713
  content: [{
2698
- ...be,
2714
+ ...ge,
2699
2715
  component: {
2700
2716
  name: "Text",
2701
2717
  options: {
@@ -2714,7 +2730,7 @@ const Ln = {
2714
2730
  }
2715
2731
  }],
2716
2732
  content: [{
2717
- ...be,
2733
+ ...ge,
2718
2734
  component: {
2719
2735
  name: "Text",
2720
2736
  options: {
@@ -2899,8 +2915,8 @@ function qn(e) {
2899
2915
  if (n.includes(h.src))
2900
2916
  continue;
2901
2917
  n.push(h.src);
2902
- const g = document.createElement("script");
2903
- g.async = !0, g.src = h.src, document.head.appendChild(g);
2918
+ const b = document.createElement("script");
2919
+ b.async = !0, b.src = h.src, document.head.appendChild(b);
2904
2920
  } else if (!h.type || [
2905
2921
  "text/javascript",
2906
2922
  "application/javascript",
@@ -2910,10 +2926,10 @@ function qn(e) {
2910
2926
  continue;
2911
2927
  try {
2912
2928
  a.push(h.innerText), new Function(h.innerText)();
2913
- } catch (g) {
2929
+ } catch (b) {
2914
2930
  ee.warn(
2915
2931
  "[BUILDER.IO] `CustomCode`: Error running script:",
2916
- g
2932
+ b
2917
2933
  );
2918
2934
  }
2919
2935
  }
@@ -2955,14 +2971,14 @@ function Jn(e) {
2955
2971
  return;
2956
2972
  const d = t.current.getElementsByTagName("script");
2957
2973
  for (let h = 0; h < d.length; h++) {
2958
- const g = d[h];
2959
- if (g.src && !n.includes(g.src)) {
2960
- n.push(g.src);
2974
+ const b = d[h];
2975
+ if (b.src && !n.includes(b.src)) {
2976
+ n.push(b.src);
2961
2977
  const u = document.createElement("script");
2962
- u.async = !0, u.src = g.src, document.head.appendChild(u);
2963
- } else if (Kn(g) && !a.includes(g.innerText))
2978
+ u.async = !0, u.src = b.src, document.head.appendChild(u);
2979
+ } else if (Kn(b) && !a.includes(b.innerText))
2964
2980
  try {
2965
- a.push(g.innerText), new Function(g.innerText)();
2981
+ a.push(b.innerText), new Function(b.innerText)();
2966
2982
  } catch (u) {
2967
2983
  ee.warn("[BUILDER.IO] `Embed`: Error running script:", u);
2968
2984
  }
@@ -3236,7 +3252,7 @@ function Xn(e) {
3236
3252
  function h(u) {
3237
3253
  return JSON.stringify(u, null, 2);
3238
3254
  }
3239
- function g(u) {
3255
+ function b(u) {
3240
3256
  var f;
3241
3257
  const x = e.sendWithJs || e.sendSubmissionsTo === "email";
3242
3258
  if (e.sendSubmissionsTo === "zapier")
@@ -3248,7 +3264,7 @@ function Xn(e) {
3248
3264
  }
3249
3265
  u.preventDefault();
3250
3266
  const m = u.currentTarget || u.target, y = e.customHeaders || {};
3251
- let b;
3267
+ let g;
3252
3268
  const S = new FormData(m), T = Array.from(m.querySelectorAll("input,select,textarea")).filter((p) => !!p.name).filter(
3253
3269
  (p) => !!p.name && (p.type !== "radio" || p.checked)
3254
3270
  ).map((p) => {
@@ -3279,15 +3295,15 @@ function Xn(e) {
3279
3295
  if (e.sendSubmissionsTo === "email" && (E = "multipart/form-data"), Array.from(T).forEach(({ value: p }) => {
3280
3296
  (p instanceof File || Array.isArray(p) && p[0] instanceof File || p instanceof FileList) && (E = "multipart/form-data");
3281
3297
  }), E !== "application/json")
3282
- b = S;
3298
+ g = S;
3283
3299
  else {
3284
3300
  const p = {};
3285
3301
  Array.from(T).forEach(({ value: v, key: V }) => {
3286
3302
  He(p, V, v);
3287
- }), b = JSON.stringify(p);
3303
+ }), g = JSON.stringify(p);
3288
3304
  }
3289
3305
  E && E !== "multipart/form-data" && (x && ((f = e.action) != null && f.includes("zapier.com")) || (y["content-type"] = E));
3290
- const _ = new CustomEvent("presubmit", { detail: { body: b } });
3306
+ const _ = new CustomEvent("presubmit", { detail: { body: g } });
3291
3307
  if (t.current && (t.current.dispatchEvent(_), _.defaultPrevented))
3292
3308
  return;
3293
3309
  if (i("sending"), e.sendSubmissionsTo === "email" && (e.sendSubmissionsToEmail === "your@email.com" || !e.sendSubmissionsToEmail)) {
@@ -3298,7 +3314,7 @@ function Xn(e) {
3298
3314
  const H = `${Yn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
3299
3315
  e.sendSubmissionsToEmail || ""
3300
3316
  )}&name=${encodeURIComponent(e.name || "")}`, q = e.sendSubmissionsTo === "email" ? H : e.action;
3301
- Le(q), fetch(q, { body: b, headers: y, method: e.method || "post" }).then(
3317
+ Le(q), fetch(q, { body: g, headers: y, method: e.method || "post" }).then(
3302
3318
  async (p) => {
3303
3319
  var A, $;
3304
3320
  let v;
@@ -3354,7 +3370,7 @@ function Xn(e) {
3354
3370
  action: !e.sendWithJs && e.action,
3355
3371
  method: e.method,
3356
3372
  name: e.name,
3357
- onSubmit: (u) => g(u),
3373
+ onSubmit: (u) => b(u),
3358
3374
  ...e.attributes,
3359
3375
  children: [
3360
3376
  e.children,
@@ -3751,7 +3767,7 @@ const ci = {
3751
3767
  }
3752
3768
  };
3753
3769
  function ui(e) {
3754
- var o, l, c, d, h, g, u;
3770
+ var o, l, c, d, h, b, u;
3755
3771
  const t = z(null);
3756
3772
  function n() {
3757
3773
  return {
@@ -3788,13 +3804,13 @@ function ui(e) {
3788
3804
  const y = m.target;
3789
3805
  try {
3790
3806
  Array.from(y.children).filter(
3791
- (b) => b instanceof HTMLElement && b.tagName === "SOURCE"
3792
- ).forEach((b) => {
3793
- const S = b.dataset.src;
3794
- S && (b.src = S);
3807
+ (g) => g instanceof HTMLElement && g.tagName === "SOURCE"
3808
+ ).forEach((g) => {
3809
+ const S = g.dataset.src;
3810
+ S && (g.src = S);
3795
3811
  }), y.load(), x.unobserve(y);
3796
- } catch (b) {
3797
- console.error("Error loading lazy video:", b);
3812
+ } catch (g) {
3813
+ console.error("Error loading lazy video:", g);
3798
3814
  }
3799
3815
  });
3800
3816
  });
@@ -3865,7 +3881,7 @@ function ui(e) {
3865
3881
  children: e.children
3866
3882
  }
3867
3883
  ) : null,
3868
- (u = (g = e.builderBlock) == null ? void 0 : g.children) != null && u.length && !e.fitContent ? /* @__PURE__ */ s(
3884
+ (u = (b = e.builderBlock) == null ? void 0 : b.children) != null && u.length && !e.fitContent ? /* @__PURE__ */ s(
3869
3885
  "div",
3870
3886
  {
3871
3887
  style: {
@@ -3926,7 +3942,7 @@ const di = () => [{
3926
3942
  component: hn,
3927
3943
  ...Bn
3928
3944
  }, {
3929
- component: bn,
3945
+ component: gn,
3930
3946
  ...Wn
3931
3947
  }, {
3932
3948
  component: Fn,
@@ -4046,12 +4062,12 @@ const di = () => [{
4046
4062
  })), hi = ({
4047
4063
  canTrack: e,
4048
4064
  content: t
4049
- }) => !(!(ae(t).length > 0) || !e || G()), bi = (e) => e === "react" || e === "reactNative", gi = F === "angular", lt = bi(F), yi = () => `
4065
+ }) => !(!(ae(t).length > 0) || !e || G()), gi = (e) => e === "react" || e === "reactNative", bi = F === "angular", lt = gi(F), yi = () => `
4050
4066
  window.${rt} = ${mi}
4051
4067
  window.${ot} = ${fi}
4052
4068
  `, pi = (e, t) => `
4053
4069
  window.${rt}(
4054
- "${t}",${JSON.stringify(e)}, ${lt}, ${gi}
4070
+ "${t}",${JSON.stringify(e)}, ${lt}, ${bi}
4055
4071
  )`, vi = ({
4056
4072
  contentId: e,
4057
4073
  variationId: t
@@ -4202,7 +4218,7 @@ function Vi(e) {
4202
4218
  const [d, h] = k(
4203
4219
  () => e.contentWrapper || "div"
4204
4220
  );
4205
- function g(v) {
4221
+ function b(v) {
4206
4222
  return dt({
4207
4223
  model: e.model,
4208
4224
  trustedHosts: e.trustedHosts,
@@ -4228,7 +4244,7 @@ function Vi(e) {
4228
4244
  }
4229
4245
  })(v);
4230
4246
  }
4231
- const [u, x] = k(() => ({})), [f, m] = k(() => ({})), [y, b] = k(() => !1);
4247
+ const [u, x] = k(() => ({})), [f, m] = k(() => ({})), [y, g] = k(() => !1);
4232
4248
  function S(v) {
4233
4249
  var V, A;
4234
4250
  if (e.builderContextSignal.content) {
@@ -4244,7 +4260,7 @@ function Vi(e) {
4244
4260
  unique: !y
4245
4261
  });
4246
4262
  }
4247
- y || b(!0);
4263
+ y || g(!0);
4248
4264
  }
4249
4265
  function T() {
4250
4266
  var V, A, $;
@@ -4319,7 +4335,7 @@ function Vi(e) {
4319
4335
  return _.current || (T(), E(), _.current = !0), B(() => {
4320
4336
  var v, V, A, $, R;
4321
4337
  if (G()) {
4322
- U() && !e.isNestedRender && (window.addEventListener("message", g), st({
4338
+ U() && !e.isNestedRender && (window.addEventListener("message", b), st({
4323
4339
  ...e.locale ? {
4324
4340
  locale: e.locale
4325
4341
  } : {},
@@ -4395,7 +4411,7 @@ function Vi(e) {
4395
4411
  }), r(e.locale);
4396
4412
  }
4397
4413
  }, [e.locale]), B(() => () => {
4398
- G() && (window.removeEventListener("message", g), window.removeEventListener(
4414
+ G() && (window.removeEventListener("message", b), window.removeEventListener(
4399
4415
  "builder:component:stateChangeListenerActivated",
4400
4416
  E
4401
4417
  ));
@@ -4469,7 +4485,7 @@ const Bi = ({
4469
4485
  meta: e == null ? void 0 : e.meta
4470
4486
  } : void 0;
4471
4487
  function Fe(e) {
4472
- var d, h, g, u, x, f, m, y, b;
4488
+ var d, h, b, u, x, f, m, y, g;
4473
4489
  const [t, n] = k(
4474
4490
  () => {
4475
4491
  var S, T;
@@ -4590,7 +4606,7 @@ function Fe(e) {
4590
4606
  {
4591
4607
  nonce: e.nonce || "",
4592
4608
  isNestedRender: e.isNestedRender,
4593
- contentId: (g = o.content) == null ? void 0 : g.id,
4609
+ contentId: (b = o.content) == null ? void 0 : b.id,
4594
4610
  cssCode: (x = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : x.cssCode,
4595
4611
  customFonts: (m = (f = o.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
4596
4612
  }
@@ -4598,7 +4614,7 @@ function Fe(e) {
4598
4614
  /* @__PURE__ */ s(
4599
4615
  M,
4600
4616
  {
4601
- blocks: (b = (y = o.content) == null ? void 0 : y.data) == null ? void 0 : b.blocks,
4617
+ blocks: (g = (y = o.content) == null ? void 0 : y.data) == null ? void 0 : g.blocks,
4602
4618
  context: o,
4603
4619
  registeredComponents: a,
4604
4620
  linkComponent: e.linkComponent
@@ -4754,7 +4770,7 @@ const Wi = async ({
4754
4770
  });
4755
4771
  };
4756
4772
  function Di(e) {
4757
- var h, g, u, x, f;
4773
+ var h, b, u, x, f;
4758
4774
  function t() {
4759
4775
  return "div";
4760
4776
  }
@@ -4786,8 +4802,8 @@ function Di(e) {
4786
4802
  symbol: e.symbol,
4787
4803
  builderContextValue: e.builderContext
4788
4804
  }).then((y) => {
4789
- var b;
4790
- y && (o(y), c((b = e.symbol) == null ? void 0 : b.entry));
4805
+ var g;
4806
+ y && (o(y), c((g = e.symbol) == null ? void 0 : g.entry));
4791
4807
  });
4792
4808
  }
4793
4809
  return B(() => {
@@ -4806,7 +4822,7 @@ function Di(e) {
4806
4822
  },
4807
4823
  customComponents: i(),
4808
4824
  data: {
4809
- ...(g = e.symbol) == null ? void 0 : g.data,
4825
+ ...(b = e.symbol) == null ? void 0 : b.data,
4810
4826
  ...e.builderContext.localState,
4811
4827
  ...(u = r == null ? void 0 : r.data) == null ? void 0 : u.state
4812
4828
  },
@@ -4827,7 +4843,7 @@ export {
4827
4843
  $i as Content,
4828
4844
  dn as Fragment,
4829
4845
  hn as Image,
4830
- bn as Section,
4846
+ gn as Section,
4831
4847
  Di as Symbol,
4832
4848
  Hn as Text,
4833
4849
  ui as Video,