@builder.io/sdk-react-nextjs 0.11.5 → 0.12.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 (31) hide show
  1. package/lib/{node/USE_CLIENT_BUNDLE-e50e4115.cjs → browser/USE_CLIENT_BUNDLE-5457b97e.cjs} +1 -1
  2. package/lib/browser/{USE_CLIENT_BUNDLE-c1a184f7.js → USE_CLIENT_BUNDLE-ac9ba054.js} +2 -2
  3. package/lib/{edge/USE_SERVER_BUNDLE-cc60df3b.js → browser/USE_SERVER_BUNDLE-153f7d4b.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-e1b937d8.cjs → browser/USE_SERVER_BUNDLE-a0bf6d8f.cjs} +1 -1
  5. package/lib/browser/{bundle-c7776ad8.cjs → bundle-6435b7fb.cjs} +19 -19
  6. package/lib/browser/{bundle-e5e85e5e.js → bundle-7e2a44d9.js} +302 -259
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +3 -3
  9. package/lib/{node/USE_CLIENT_BUNDLE-3ca4914e.js → edge/USE_CLIENT_BUNDLE-3049fd56.js} +2 -2
  10. package/lib/{browser/USE_CLIENT_BUNDLE-fd1e8892.cjs → edge/USE_CLIENT_BUNDLE-8922846d.cjs} +1 -1
  11. package/lib/{node/USE_SERVER_BUNDLE-e8cb244e.js → edge/USE_SERVER_BUNDLE-231b55dd.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-f87d379c.cjs → edge/USE_SERVER_BUNDLE-24df6623.cjs} +1 -1
  13. package/lib/edge/{bundle-8d356121.js → bundle-44392f6d.js} +599 -556
  14. package/lib/edge/{bundle-66d2c18f.cjs → bundle-6d55a6a7.cjs} +26 -26
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +3 -3
  17. package/lib/{edge/USE_CLIENT_BUNDLE-e4756b15.cjs → node/USE_CLIENT_BUNDLE-09122ff1.cjs} +1 -1
  18. package/lib/{edge/USE_CLIENT_BUNDLE-5718fc51.js → node/USE_CLIENT_BUNDLE-f4804af3.js} +2 -2
  19. package/lib/{browser/USE_SERVER_BUNDLE-ab38c81e.js → node/USE_SERVER_BUNDLE-33c309df.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-b4858d5f.cjs → node/USE_SERVER_BUNDLE-93366161.cjs} +1 -1
  21. package/lib/node/{bundle-2fa811c7.js → bundle-217b5738.js} +138 -95
  22. package/lib/node/{bundle-f093f86b.cjs → bundle-b9af39ec.cjs} +10 -10
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +3 -3
  25. package/package.json +1 -1
  26. package/types/cjs/blocks/slot/component-info.d.ts +2 -0
  27. package/types/cjs/blocks/slot/slot.d.ts +11 -0
  28. package/types/cjs/constants/sdk-version.d.ts +1 -1
  29. package/types/esm/blocks/slot/component-info.d.ts +2 -0
  30. package/types/esm/blocks/slot/slot.d.ts +11 -0
  31. package/types/esm/constants/sdk-version.d.ts +1 -1
@@ -1,7 +1,7 @@
1
- import { LRUCache as Ae } from "lru-cache";
1
+ import { LRUCache as Pe } from "lru-cache";
2
2
  import { jsx as l, Fragment as y, jsxs as I } from "react/jsx-runtime";
3
3
  import { createElement as Ve } from "react";
4
- import { I as Be, B as G, a as We, b as $e, C as Oe, E as Fe, F as Ne, c as _e, d as Le, S as Ue, V as Me, e as De } from "./USE_CLIENT_BUNDLE-c1a184f7.js";
4
+ import { I as Be, B as G, a as We, b as $e, C as Oe, E as Fe, F as Ne, c as _e, d as Le, S as Ue, V as Me, e as De } from "./USE_CLIENT_BUNDLE-ac9ba054.js";
5
5
  import "next/navigation";
6
6
  function je(e) {
7
7
  var t;
@@ -14,24 +14,24 @@ function je(e) {
14
14
  builderBlock: e
15
15
  };
16
16
  }
17
- const A = "[Builder.io]: ", k = {
18
- log: (...e) => console.log(A, ...e),
19
- error: (...e) => console.error(A, ...e),
20
- warn: (...e) => console.warn(A, ...e),
21
- debug: (...e) => console.debug(A, ...e)
17
+ const P = "[Builder.io]: ", k = {
18
+ log: (...e) => console.log(P, ...e),
19
+ error: (...e) => console.error(P, ...e),
20
+ warn: (...e) => console.warn(P, ...e),
21
+ debug: (...e) => console.debug(P, ...e)
22
22
  };
23
- function S() {
23
+ function x() {
24
24
  return typeof window < "u" && typeof document < "u";
25
25
  }
26
26
  const T = "rsc";
27
27
  function Ke() {
28
- return S() && window.self !== window.top;
28
+ return x() && window.self !== window.top;
29
29
  }
30
- function D() {
30
+ function j() {
31
31
  return Ke() && window.location.search.indexOf("builder.frameEditing=") !== -1;
32
32
  }
33
33
  const He = () => {
34
- if (S()) {
34
+ if (x()) {
35
35
  const e = new URL(location.href);
36
36
  return e.pathname === "" && (e.pathname = "/"), e;
37
37
  } else
@@ -75,9 +75,9 @@ const He = () => {
75
75
  context: t,
76
76
  event: n
77
77
  }), Ge = () => ({
78
- isEditing: D(),
79
- isBrowser: S(),
80
- isServer: !S(),
78
+ isEditing: j(),
79
+ isBrowser: x(),
80
+ isServer: !x(),
81
81
  getUserAttributes: () => le()
82
82
  }), Ye = (e, {
83
83
  isExpression: t = !0
@@ -110,8 +110,8 @@ function Je(e, t, n) {
110
110
  }
111
111
  });
112
112
  }
113
- const Qe = (e) => (S(), Y(e));
114
- function j({
113
+ const Qe = (e) => (x(), Y(e));
114
+ function K({
115
115
  code: e,
116
116
  context: t,
117
117
  localState: n,
@@ -169,7 +169,7 @@ const Ze = ({
169
169
  }
170
170
  };
171
171
  for (const s in e.bindings) {
172
- const c = e.bindings[s], u = j({
172
+ const c = e.bindings[s], u = K({
173
173
  code: c,
174
174
  localState: n,
175
175
  rootState: o,
@@ -197,7 +197,7 @@ function W({
197
197
  context: t
198
198
  }) : a;
199
199
  }
200
- const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], N = (e) => typeof e == "string" && et.includes(e.toLowerCase()), tt = ({
200
+ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], _ = (e) => typeof e == "string" && et.includes(e.toLowerCase()), tt = ({
201
201
  block: e,
202
202
  context: t,
203
203
  registeredComponents: n
@@ -229,7 +229,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
229
229
  } = e;
230
230
  if (!(n != null && n.collection))
231
231
  return;
232
- const i = j({
232
+ const i = K({
233
233
  code: n.collection,
234
234
  localState: t.localState,
235
235
  rootState: t.rootState,
@@ -298,7 +298,7 @@ const et = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
298
298
  if (typeof o == "string")
299
299
  return `${ot(n)}: ${o};`;
300
300
  }).filter(w), it = (e) => me(e).join(`
301
- `), _ = ({
301
+ `), L = ({
302
302
  mediaQuery: e,
303
303
  className: t,
304
304
  styles: n
@@ -335,35 +335,35 @@ function rt(e) {
335
335
  shouldEvaluateBindings: !0
336
336
  }), r = i.responsiveStyles, a = e.context.content, s = ue(
337
337
  ((d = a == null ? void 0 : a.meta) == null ? void 0 : d.breakpoints) || {}
338
- ), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, h = r == null ? void 0 : r.small, g = i.id;
338
+ ), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, m = r == null ? void 0 : r.small, g = i.id;
339
339
  if (!g)
340
340
  return "";
341
- const m = c ? _({
341
+ const f = c ? L({
342
342
  className: g,
343
343
  styles: c
344
- }) : "", f = u ? _({
344
+ }) : "", h = u ? L({
345
345
  className: g,
346
346
  styles: u,
347
347
  mediaQuery: J(
348
348
  "medium",
349
349
  s
350
350
  )
351
- }) : "", p = h ? _({
351
+ }) : "", p = m ? L({
352
352
  className: g,
353
- styles: h,
353
+ styles: m,
354
354
  mediaQuery: J(
355
355
  "small",
356
356
  s
357
357
  )
358
358
  }) : "";
359
- return [m, f, p].join(" ");
359
+ return [f, h, p].join(" ");
360
360
  };
361
361
  return /* @__PURE__ */ l(y, { children: n() && t() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: n() }) }) : null });
362
362
  }
363
363
  function at(e) {
364
364
  return e.charAt(0).toUpperCase() + e.slice(1);
365
365
  }
366
- const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => j({
366
+ const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => K({
367
367
  code: e,
368
368
  context: t.context,
369
369
  localState: t.localState,
@@ -372,7 +372,7 @@ const st = (e) => `on${at(e)}`, ct = (e, t) => (n) => j({
372
372
  event: n,
373
373
  isExpression: !1
374
374
  });
375
- function Un(e) {
375
+ function Dn(e) {
376
376
  const t = {}, n = e.block.actions ?? {};
377
377
  for (const o in n) {
378
378
  if (!n.hasOwnProperty(o))
@@ -500,7 +500,7 @@ function ht(e) {
500
500
  );
501
501
  }
502
502
  function F(e) {
503
- var u, h, g;
503
+ var u, m, g;
504
504
  const t = function() {
505
505
  return tt({
506
506
  block: e.block,
@@ -513,8 +513,8 @@ function F(e) {
513
513
  context: e.context
514
514
  });
515
515
  }, o = function() {
516
- var f;
517
- return (f = e.block.repeat) != null && f.collection ? e.block : W({
516
+ var h;
517
+ return (h = e.block.repeat) != null && h.collection ? e.block : W({
518
518
  block: e.block,
519
519
  localState: e.context.localState,
520
520
  rootState: e.context.rootState,
@@ -528,16 +528,16 @@ function F(e) {
528
528
  var d, b;
529
529
  if ((d = e.block.repeat) != null && d.collection)
530
530
  return !!((b = n()) != null && b.length);
531
- const f = "hide" in o() ? o().hide : !1;
532
- return ("show" in o() ? o().show : !0) && !f;
531
+ const h = "hide" in o() ? o().hide : !1;
532
+ return ("show" in o() ? o().show : !0) && !h;
533
533
  }, a = function() {
534
534
  var p;
535
535
  return !((p = t()) != null && p.component) && !n() ? o().children ?? [] : [];
536
536
  }, s = function() {
537
- var f, p, d, b, x;
537
+ var h, p, d, b, S;
538
538
  return {
539
539
  blockChildren: o().children ?? [],
540
- componentRef: (f = t()) == null ? void 0 : f.component,
540
+ componentRef: (h = t()) == null ? void 0 : h.component,
541
541
  componentOptions: {
542
542
  ...je(o()),
543
543
  builderContext: e.context,
@@ -549,7 +549,7 @@ function F(e) {
549
549
  registeredComponents: e.registeredComponents,
550
550
  builderBlock: o(),
551
551
  includeBlockProps: ((b = t()) == null ? void 0 : b.noWrap) === !0,
552
- isInteractive: !((x = t()) != null && x.isRSC)
552
+ isInteractive: !((S = t()) != null && S.isRSC)
553
553
  };
554
554
  }, c = e.context;
555
555
  return /* @__PURE__ */ l(y, { children: r() ? /* @__PURE__ */ I(y, { children: [
@@ -567,7 +567,7 @@ function F(e) {
567
567
  isInteractive: s().isInteractive
568
568
  }
569
569
  ) }) : /* @__PURE__ */ I(y, { children: [
570
- N(i()) ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
570
+ _(i()) ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
571
571
  G,
572
572
  {
573
573
  Wrapper: i(),
@@ -576,16 +576,16 @@ function F(e) {
576
576
  hasChildren: !1
577
577
  }
578
578
  ) }) : null,
579
- !N(i()) && n() ? /* @__PURE__ */ l(y, { children: (h = n()) == null ? void 0 : h.map((m, f) => /* @__PURE__ */ l(
579
+ !_(i()) && n() ? /* @__PURE__ */ l(y, { children: (m = n()) == null ? void 0 : m.map((f, h) => /* @__PURE__ */ l(
580
580
  ht,
581
581
  {
582
- repeatContext: m.context,
583
- block: m.block,
582
+ repeatContext: f.context,
583
+ block: f.block,
584
584
  registeredComponents: e.registeredComponents
585
585
  },
586
- f
586
+ h
587
587
  )) }) : null,
588
- !N(i()) && !n() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ I(
588
+ !_(i()) && !n() ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ I(
589
589
  G,
590
590
  {
591
591
  Wrapper: i(),
@@ -606,14 +606,14 @@ function F(e) {
606
606
  isInteractive: s().isInteractive
607
607
  }
608
608
  ),
609
- (g = a()) == null ? void 0 : g.map((m) => /* @__PURE__ */ l(
609
+ (g = a()) == null ? void 0 : g.map((f) => /* @__PURE__ */ l(
610
610
  F,
611
611
  {
612
- block: m,
612
+ block: f,
613
613
  context: c,
614
614
  registeredComponents: e.registeredComponents
615
615
  },
616
- m.id
616
+ f.id
617
617
  ))
618
618
  ]
619
619
  }
@@ -621,7 +621,7 @@ function F(e) {
621
621
  ] })
622
622
  ] }) : null });
623
623
  }
624
- function K(e) {
624
+ function N(e) {
625
625
  var t, n, o;
626
626
  return /* @__PURE__ */ l(
627
627
  We,
@@ -645,7 +645,7 @@ function K(e) {
645
645
  );
646
646
  }
647
647
  function pt(e) {
648
- var f;
648
+ var h;
649
649
  const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", i = function(d) {
650
650
  var b;
651
651
  return ((b = n[d]) == null ? void 0 : b.width) || 100 / n.length;
@@ -670,22 +670,22 @@ function pt(e) {
670
670
  desktopStyle: "row"
671
671
  })
672
672
  };
673
- }, h = function(d) {
674
- const b = d === 0 ? 0 : t, x = r(d), v = `${b}px`, P = "100%", E = 0;
673
+ }, m = function(d) {
674
+ const b = d === 0 ? 0 : t, S = r(d), v = `${b}px`, A = "100%", E = 0;
675
675
  return {
676
- width: x,
676
+ width: S,
677
677
  ["marginLeft"]: v,
678
678
  "--column-width-mobile": s({
679
- stackedStyle: P,
680
- desktopStyle: x
679
+ stackedStyle: A,
680
+ desktopStyle: S
681
681
  }),
682
682
  "--column-margin-left-mobile": s({
683
683
  stackedStyle: E,
684
684
  desktopStyle: v
685
685
  }),
686
686
  "--column-width-tablet": a({
687
- stackedStyle: P,
688
- desktopStyle: x
687
+ stackedStyle: A,
688
+ desktopStyle: S
689
689
  }),
690
690
  "--column-margin-left-tablet": a({
691
691
  stackedStyle: E,
@@ -693,11 +693,11 @@ function pt(e) {
693
693
  })
694
694
  };
695
695
  }, g = function(d) {
696
- var x, v;
696
+ var S, v;
697
697
  return ue(
698
- ((v = (x = e.builderContext.content) == null ? void 0 : x.meta) == null ? void 0 : v.breakpoints) || {}
698
+ ((v = (S = e.builderContext.content) == null ? void 0 : S.meta) == null ? void 0 : v.breakpoints) || {}
699
699
  )[d].max;
700
- }, m = function() {
700
+ }, f = function() {
701
701
  return `
702
702
  @media (max-width: ${g("medium")}px) {
703
703
  .${e.builderBlock.id}-breakpoints {
@@ -731,16 +731,16 @@ function pt(e) {
731
731
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-39daef82`,
732
732
  style: u(),
733
733
  children: [
734
- /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: m() }) }),
735
- (f = e.columns) == null ? void 0 : f.map((p, d) => /* @__PURE__ */ Ve(
734
+ /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
735
+ (h = e.columns) == null ? void 0 : h.map((p, d) => /* @__PURE__ */ Ve(
736
736
  "div",
737
737
  {
738
738
  className: "builder-column div-39daef82-2",
739
- style: h(d),
739
+ style: m(d),
740
740
  key: d
741
741
  },
742
742
  /* @__PURE__ */ l(
743
- K,
743
+ N,
744
744
  {
745
745
  path: `component.options.columns.${d}.blocks`,
746
746
  parent: e.builderBlock.id,
@@ -785,7 +785,7 @@ function bt(e, t) {
785
785
  }
786
786
  return null;
787
787
  }
788
- function Mn(e) {
788
+ function jn(e) {
789
789
  if (!e)
790
790
  return e;
791
791
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
@@ -812,12 +812,12 @@ const yt = (e) => {
812
812
  k.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
813
813
  return;
814
814
  }
815
- }, he = async (e) => fe(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), St = [["secure", ""], ["SameSite", "None"]], xt = ({
815
+ }, he = async (e) => fe(e), vt = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(w).join("; "), xt = [["secure", ""], ["SameSite", "None"]], St = ({
816
816
  name: e,
817
817
  value: t,
818
818
  expires: n
819
819
  }) => {
820
- const i = (S() ? location.protocol === "https:" : !0) ? St : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
820
+ const i = (x() ? location.protocol === "https:" : !0) ? xt : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], a = [[e, t], ...r, ["path", "/"], ["domain", yt(window.location.hostname)], ...i];
821
821
  return vt(a);
822
822
  }, pe = async ({
823
823
  name: e,
@@ -828,7 +828,7 @@ const yt = (e) => {
828
828
  try {
829
829
  if (!o)
830
830
  return;
831
- const i = xt({
831
+ const i = St({
832
832
  name: e,
833
833
  value: t,
834
834
  expires: n
@@ -931,7 +931,7 @@ const yt = (e) => {
931
931
  ...e,
932
932
  ...i
933
933
  };
934
- }, L = (e) => w(e) ? e : !0, Pt = {
934
+ }, U = (e) => w(e) ? e : !0, At = {
935
935
  name: "Core:Button",
936
936
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
937
937
  defaultStyles: {
@@ -964,7 +964,7 @@ const yt = (e) => {
964
964
  }],
965
965
  static: !0,
966
966
  noWrap: !0
967
- }, At = {
967
+ }, Pt = {
968
968
  // TODO: ways to statically preprocess JSON for references, functions, etc
969
969
  name: "Columns",
970
970
  isRSC: !0,
@@ -1212,7 +1212,7 @@ const yt = (e) => {
1212
1212
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1213
1213
  hideFromUI: !0
1214
1214
  }]
1215
- }, Wt = ["text/javascript", "application/javascript", "application/ecmascript"], Dn = (e) => Wt.includes(e.type), $t = {
1215
+ }, Wt = ["text/javascript", "application/javascript", "application/ecmascript"], Kn = (e) => Wt.includes(e.type), $t = {
1216
1216
  name: "Fragment",
1217
1217
  static: !0,
1218
1218
  hidden: !0,
@@ -1240,13 +1240,13 @@ const yt = (e) => {
1240
1240
  e.delete("srcset"), e.delete("noWebp");
1241
1241
  function n(a, s = 6e4) {
1242
1242
  return new Promise((c, u) => {
1243
- const h = document.createElement("img");
1243
+ const m = document.createElement("img");
1244
1244
  let g = !1;
1245
- h.onload = () => {
1246
- g = !0, c(h);
1247
- }, h.addEventListener("error", (m) => {
1248
- console.warn("Image load failed", m.error), u(m.error);
1249
- }), h.src = a, setTimeout(() => {
1245
+ m.onload = () => {
1246
+ g = !0, c(m);
1247
+ }, m.addEventListener("error", (f) => {
1248
+ console.warn("Image load failed", f.error), u(f.error);
1249
+ }), m.src = a, setTimeout(() => {
1250
1250
  g || u(new Error("Image load timed out"));
1251
1251
  }, s);
1252
1252
  });
@@ -1372,6 +1372,43 @@ const yt = (e) => {
1372
1372
  }
1373
1373
  }]
1374
1374
  }, _t = {
1375
+ name: "Slot",
1376
+ isRSC: !0,
1377
+ description: "Allow child blocks to be inserted into this content when used as a Symbol",
1378
+ docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
1379
+ image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
1380
+ // Maybe wrap this for canHaveChildren so bind children to this hm
1381
+ inputs: [{
1382
+ name: "name",
1383
+ type: "string",
1384
+ required: !0,
1385
+ defaultValue: "children"
1386
+ }]
1387
+ };
1388
+ function Lt(e) {
1389
+ var t, n, o;
1390
+ return /* @__PURE__ */ l(
1391
+ "div",
1392
+ {
1393
+ style: {
1394
+ pointerEvents: "auto"
1395
+ },
1396
+ ...!((t = e.builderContext.context) != null && t.symbolId) && {
1397
+ "builder-slot": e.name
1398
+ },
1399
+ children: /* @__PURE__ */ l(
1400
+ N,
1401
+ {
1402
+ parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
1403
+ path: `symbol.data.${e.name}`,
1404
+ context: e.builderContext,
1405
+ blocks: (o = e.builderContext.rootState) == null ? void 0 : o[e.name]
1406
+ }
1407
+ )
1408
+ }
1409
+ );
1410
+ }
1411
+ const Ut = {
1375
1412
  name: "Symbol",
1376
1413
  noWrap: !0,
1377
1414
  static: !0,
@@ -1404,7 +1441,7 @@ const yt = (e) => {
1404
1441
  hideFromUI: !0,
1405
1442
  type: "boolean"
1406
1443
  }]
1407
- }, Lt = {
1444
+ }, Mt = {
1408
1445
  name: "Text",
1409
1446
  static: !0,
1410
1447
  isRSC: !0,
@@ -1423,7 +1460,7 @@ const yt = (e) => {
1423
1460
  textAlign: "center"
1424
1461
  }
1425
1462
  };
1426
- function Ut(e) {
1463
+ function Dt(e) {
1427
1464
  var t;
1428
1465
  return /* @__PURE__ */ l(
1429
1466
  "div",
@@ -1436,7 +1473,7 @@ function Ut(e) {
1436
1473
  }
1437
1474
  );
1438
1475
  }
1439
- const Mt = {
1476
+ const jt = {
1440
1477
  name: "Video",
1441
1478
  canHaveChildren: !0,
1442
1479
  defaultStyles: {
@@ -1519,10 +1556,10 @@ const Mt = {
1519
1556
  }]
1520
1557
  }, Z = () => [{
1521
1558
  component: $e,
1522
- ...Pt
1559
+ ...At
1523
1560
  }, {
1524
1561
  component: pt,
1525
- ...At
1562
+ ...Pt
1526
1563
  }, {
1527
1564
  component: Oe,
1528
1565
  ...Vt
@@ -1542,30 +1579,33 @@ const Mt = {
1542
1579
  component: Ue,
1543
1580
  ...Nt
1544
1581
  }, {
1545
- component: $n,
1546
- ..._t
1582
+ component: Fn,
1583
+ ...Ut
1547
1584
  }, {
1548
- component: Ut,
1549
- ...Lt
1585
+ component: Dt,
1586
+ ...Mt
1550
1587
  }, {
1551
1588
  component: Me,
1552
- ...Mt
1553
- }], ee = [], jn = (e) => ({
1589
+ ...jt
1590
+ }, {
1591
+ component: Lt,
1592
+ ..._t
1593
+ }], ee = [], Hn = (e) => ({
1554
1594
  type: "builder.registerComponent",
1555
- data: U(e)
1556
- }), Dt = (e) => {
1595
+ data: M(e)
1596
+ }), Kt = (e) => {
1557
1597
  const t = e.toString().trim();
1558
1598
  return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1559
- }, jt = (e) => typeof e == "function" ? Dt(e) : $(e), U = ({
1599
+ }, Ht = (e) => typeof e == "function" ? Kt(e) : $(e), M = ({
1560
1600
  inputs: e,
1561
1601
  ...t
1562
1602
  }) => ({
1563
1603
  ...$(t),
1564
1604
  inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [i, r]) => ({
1565
1605
  ...o,
1566
- [i]: jt(r)
1606
+ [i]: Ht(r)
1567
1607
  }), {}))
1568
- }), Kt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1608
+ }), zt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1569
1609
  function getAndSetVariantId() {
1570
1610
  function setCookie(name, value, days) {
1571
1611
  let expires = '';
@@ -1621,7 +1661,7 @@ const Mt = {
1621
1661
  }).join('');
1622
1662
  styleEl.innerHTML = newStyleStr;
1623
1663
  }
1624
- }`, Ht = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1664
+ }`, qt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1625
1665
  if (!navigator.cookieEnabled) {
1626
1666
  return;
1627
1667
  }
@@ -1655,26 +1695,26 @@ const Mt = {
1655
1695
  thisScriptEl?.remove();
1656
1696
  }
1657
1697
  return;
1658
- }`, ve = "builderIoAbTest", Se = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1698
+ }`, ve = "builderIoAbTest", xe = "builderIoRenderContent", V = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1659
1699
  ...t,
1660
1700
  testVariationId: t.id,
1661
1701
  id: e == null ? void 0 : e.id
1662
- })), zt = ({
1702
+ })), Gt = ({
1663
1703
  canTrack: e,
1664
1704
  content: t
1665
- }) => !(!(V(t).length > 0) || !e || S()), qt = (e) => e === "react" || e === "reactNative", xe = qt(T), Gt = () => `
1666
- window.${ve} = ${Kt}
1667
- window.${Se} = ${Ht}
1668
- `, Yt = (e, t) => `
1705
+ }) => !(!(V(t).length > 0) || !e || x()), Yt = (e) => e === "react" || e === "reactNative", Se = Yt(T), Jt = () => `
1706
+ window.${ve} = ${zt}
1707
+ window.${xe} = ${qt}
1708
+ `, Qt = (e, t) => `
1669
1709
  window.${ve}(
1670
- "${t}",${JSON.stringify(e)}, ${xe}
1671
- )`, Jt = ({
1710
+ "${t}",${JSON.stringify(e)}, ${Se}
1711
+ )`, Xt = ({
1672
1712
  contentId: e,
1673
1713
  variationId: t
1674
- }) => `window.${Se}(
1675
- "${t}", "${e}", ${xe}
1714
+ }) => `window.${xe}(
1715
+ "${t}", "${e}", ${Se}
1676
1716
  )`;
1677
- function M(e) {
1717
+ function D(e) {
1678
1718
  return /* @__PURE__ */ l(
1679
1719
  "script",
1680
1720
  {
@@ -1683,33 +1723,33 @@ function M(e) {
1683
1723
  }
1684
1724
  );
1685
1725
  }
1686
- const Qt = (e) => {
1726
+ const Zt = (e) => {
1687
1727
  const t = e.get("preview"), n = e.get("overrides." + t);
1688
1728
  return n || k.warn("No previewed ID found in search params."), n;
1689
1729
  };
1690
- function Xt() {
1691
- globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Ae({
1730
+ function en() {
1731
+ globalThis._BUILDER_PREVIEW_LRU_CACHE || (globalThis._BUILDER_PREVIEW_LRU_CACHE = new Pe({
1692
1732
  max: 500,
1693
1733
  // how long to live in ms
1694
1734
  ttl: 1e3 * 60 * 5
1695
1735
  }));
1696
1736
  }
1697
- function Zt(e) {
1698
- Xt();
1699
- const t = Qt(e);
1737
+ function tn(e) {
1738
+ en();
1739
+ const t = Zt(e);
1700
1740
  return typeof t == "string" ? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t) : void 0;
1701
1741
  }
1702
- function en() {
1742
+ function nn() {
1703
1743
  return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
1704
1744
  }
1705
- function tn() {
1706
- const e = en().fetch;
1745
+ function on() {
1746
+ const e = nn().fetch;
1707
1747
  if (typeof e > "u")
1708
1748
  throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
1709
1749
  For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
1710
1750
  return e;
1711
1751
  }
1712
- const nn = tn();
1752
+ const rn = on();
1713
1753
  function B(e, t = null, n = ".") {
1714
1754
  return Object.keys(e).reduce((o, i) => {
1715
1755
  const r = e[i], a = [t, i].filter(Boolean).join(n);
@@ -1722,7 +1762,7 @@ function B(e, t = null, n = ".") {
1722
1762
  };
1723
1763
  }, {});
1724
1764
  }
1725
- const on = "v3", te = "builder.", rn = "options.", an = (e) => {
1765
+ const an = "v3", te = "builder.", sn = "options.", cn = (e) => {
1726
1766
  const t = {};
1727
1767
  return e.forEach((n, o) => {
1728
1768
  t[o] = n;
@@ -1733,16 +1773,16 @@ const on = "v3", te = "builder.", rn = "options.", an = (e) => {
1733
1773
  const t = Ce(e), n = {};
1734
1774
  return Object.keys(t).forEach((o) => {
1735
1775
  if (o.startsWith(te)) {
1736
- const i = o.replace(te, "").replace(rn, "");
1776
+ const i = o.replace(te, "").replace(sn, "");
1737
1777
  n[i] = t[o];
1738
1778
  }
1739
1779
  }), n;
1740
- }, sn = () => {
1741
- if (!S())
1780
+ }, ln = () => {
1781
+ if (!x())
1742
1782
  return {};
1743
1783
  const e = new URLSearchParams(window.location.search);
1744
1784
  return ke(e);
1745
- }, Ce = (e) => e instanceof URLSearchParams ? an(e) : e, ne = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1785
+ }, Ce = (e) => e instanceof URLSearchParams ? cn(e) : e, ne = (e) => typeof e == "number" && !isNaN(e) && e >= 0, z = (e) => {
1746
1786
  let {
1747
1787
  noTraverse: t = !1
1748
1788
  } = e;
@@ -1755,32 +1795,32 @@ const on = "v3", te = "builder.", rn = "options.", an = (e) => {
1755
1795
  includeRefs: s = !0,
1756
1796
  enrich: c,
1757
1797
  locale: u,
1758
- apiVersion: h = on,
1798
+ apiVersion: m = an,
1759
1799
  fields: g,
1760
- omit: m,
1761
- offset: f,
1800
+ omit: f,
1801
+ offset: h,
1762
1802
  cacheSeconds: p,
1763
1803
  staleCacheSeconds: d,
1764
1804
  sort: b,
1765
- includeUnpublished: x
1805
+ includeUnpublished: S
1766
1806
  } = e;
1767
1807
  if (!a)
1768
1808
  throw new Error("Missing API key");
1769
- if (!["v2", "v3"].includes(h))
1770
- throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${h}'`);
1809
+ if (!["v2", "v3"].includes(m))
1810
+ throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${m}'`);
1771
1811
  (e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
1772
- const v = new URL(`https://cdn.builder.io/api/${h}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
1773
- if (v.searchParams.set("omit", m || "meta.componentsUsed"), g && v.searchParams.set("fields", g), Number.isFinite(f) && f > -1 && v.searchParams.set("offset", String(Math.floor(f))), typeof x == "boolean" && v.searchParams.set("includeUnpublished", String(x)), p && ne(p) && v.searchParams.set("cacheSeconds", String(p)), d && ne(d) && v.searchParams.set("staleCacheSeconds", String(d)), b) {
1812
+ const v = new URL(`https://cdn.builder.io/api/${m}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${u ? `&locale=${u}` : ""}${c ? `&enrich=${c}` : ""}`);
1813
+ if (v.searchParams.set("omit", f || "meta.componentsUsed"), g && v.searchParams.set("fields", g), Number.isFinite(h) && h > -1 && v.searchParams.set("offset", String(Math.floor(h))), typeof S == "boolean" && v.searchParams.set("includeUnpublished", String(S)), p && ne(p) && v.searchParams.set("cacheSeconds", String(p)), d && ne(d) && v.searchParams.set("staleCacheSeconds", String(d)), b) {
1774
1814
  const C = B({
1775
1815
  sort: b
1776
1816
  });
1777
1817
  for (const R in C)
1778
1818
  v.searchParams.set(R, JSON.stringify(C[R]));
1779
1819
  }
1780
- const P = {
1781
- ...sn(),
1820
+ const A = {
1821
+ ...ln(),
1782
1822
  ...Ce(e.options || {})
1783
- }, E = B(P);
1823
+ }, E = B(A);
1784
1824
  for (const C in E)
1785
1825
  v.searchParams.set(C, String(E[C]));
1786
1826
  if (o && v.searchParams.set("userAttributes", JSON.stringify(o)), i) {
@@ -1791,7 +1831,7 @@ const on = "v3", te = "builder.", rn = "options.", an = (e) => {
1791
1831
  v.searchParams.set(R, JSON.stringify(C[R]));
1792
1832
  }
1793
1833
  return v;
1794
- }, cn = (e) => "results" in e;
1834
+ }, dn = (e) => "results" in e;
1795
1835
  async function q(e) {
1796
1836
  const t = await we({
1797
1837
  ...e,
@@ -1799,20 +1839,20 @@ async function q(e) {
1799
1839
  });
1800
1840
  return t && t[0] || null;
1801
1841
  }
1802
- const Kn = q, ln = async (e) => {
1842
+ const zn = q, un = async (e) => {
1803
1843
  const t = z(e);
1804
- return await (await nn(t.href)).json();
1805
- }, dn = async (e, t, n = z(e)) => {
1806
- const o = L(e.canTrack);
1844
+ return await (await rn(t.href)).json();
1845
+ }, mn = async (e, t, n = z(e)) => {
1846
+ const o = U(e.canTrack);
1807
1847
  if (n.search.includes("preview=")) {
1808
1848
  const r = [];
1809
1849
  for (const a of t.results) {
1810
- const s = Zt(n.searchParams);
1850
+ const s = tn(n.searchParams);
1811
1851
  r.push(s || a);
1812
1852
  }
1813
1853
  t.results = r;
1814
1854
  }
1815
- if (!o || !(S() || T === "reactNative"))
1855
+ if (!o || !(x() || T === "reactNative"))
1816
1856
  return t.results;
1817
1857
  try {
1818
1858
  const r = [];
@@ -1829,8 +1869,8 @@ const Kn = q, ln = async (e) => {
1829
1869
  };
1830
1870
  async function we(e) {
1831
1871
  try {
1832
- const t = z(e), n = await ln(e);
1833
- return cn(n) ? dn(e, n) : (k.error("Error fetching data. ", {
1872
+ const t = z(e), n = await un(e);
1873
+ return dn(n) ? mn(e, n) : (k.error("Error fetching data. ", {
1834
1874
  url: t,
1835
1875
  content: n,
1836
1876
  options: e
@@ -1839,20 +1879,20 @@ async function we(e) {
1839
1879
  return k.error("Error fetching data. ", t), null;
1840
1880
  }
1841
1881
  }
1842
- const Hn = we;
1843
- function zn() {
1844
- return !S() || D() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1882
+ const qn = we;
1883
+ function Gn() {
1884
+ return !x() || j() ? !1 : location.search.indexOf("builder.preview=") !== -1;
1845
1885
  }
1846
- function un() {
1886
+ function fn() {
1847
1887
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1848
1888
  const t = Math.random() * 16 | 0;
1849
1889
  return (e == "x" ? t : t & 3 | 8).toString(16);
1850
1890
  });
1851
1891
  }
1852
1892
  function Ie() {
1853
- return un().replace(/-/g, "");
1893
+ return fn().replace(/-/g, "");
1854
1894
  }
1855
- const Te = "builderSessionId", mn = async ({
1895
+ const Te = "builderSessionId", hn = async ({
1856
1896
  canTrack: e
1857
1897
  }) => {
1858
1898
  if (!e)
@@ -1864,20 +1904,20 @@ const Te = "builderSessionId", mn = async ({
1864
1904
  if (w(t))
1865
1905
  return t;
1866
1906
  {
1867
- const n = fn();
1868
- return hn({
1907
+ const n = pn();
1908
+ return gn({
1869
1909
  id: n,
1870
1910
  canTrack: e
1871
1911
  }), n;
1872
1912
  }
1873
- }, fn = () => Ie(), hn = ({
1913
+ }, pn = () => Ie(), gn = ({
1874
1914
  id: e,
1875
1915
  canTrack: t
1876
1916
  }) => pe({
1877
1917
  name: Te,
1878
1918
  value: e,
1879
1919
  canTrack: t
1880
- }), Ee = () => S() && typeof localStorage < "u" ? localStorage : void 0, pn = ({
1920
+ }), Ee = () => x() && typeof localStorage < "u" ? localStorage : void 0, bn = ({
1881
1921
  key: e,
1882
1922
  canTrack: t
1883
1923
  }) => {
@@ -1888,7 +1928,7 @@ const Te = "builderSessionId", mn = async ({
1888
1928
  console.debug("[LocalStorage] GET error: ", o);
1889
1929
  return;
1890
1930
  }
1891
- }, gn = ({
1931
+ }, yn = ({
1892
1932
  key: e,
1893
1933
  canTrack: t,
1894
1934
  value: n
@@ -1899,32 +1939,32 @@ const Te = "builderSessionId", mn = async ({
1899
1939
  } catch (i) {
1900
1940
  console.debug("[LocalStorage] SET error: ", i);
1901
1941
  }
1902
- }, Re = "builderVisitorId", bn = ({
1942
+ }, Re = "builderVisitorId", vn = ({
1903
1943
  canTrack: e
1904
1944
  }) => {
1905
1945
  if (!e)
1906
1946
  return;
1907
- const t = pn({
1947
+ const t = bn({
1908
1948
  key: Re,
1909
1949
  canTrack: e
1910
1950
  });
1911
1951
  if (w(t))
1912
1952
  return t;
1913
1953
  {
1914
- const n = yn();
1915
- return vn({
1954
+ const n = xn();
1955
+ return Sn({
1916
1956
  id: n,
1917
1957
  canTrack: e
1918
1958
  }), n;
1919
1959
  }
1920
- }, yn = () => Ie(), vn = ({
1960
+ }, xn = () => Ie(), Sn = ({
1921
1961
  id: e,
1922
1962
  canTrack: t
1923
- }) => gn({
1963
+ }) => yn({
1924
1964
  key: Re,
1925
1965
  value: e,
1926
1966
  canTrack: t
1927
- }), Sn = async ({
1967
+ }), kn = async ({
1928
1968
  canTrack: e
1929
1969
  }) => {
1930
1970
  if (!e)
@@ -1932,16 +1972,16 @@ const Te = "builderSessionId", mn = async ({
1932
1972
  visitorId: void 0,
1933
1973
  sessionId: void 0
1934
1974
  };
1935
- const t = await mn({
1975
+ const t = await hn({
1936
1976
  canTrack: e
1937
- }), n = bn({
1977
+ }), n = vn({
1938
1978
  canTrack: e
1939
1979
  });
1940
1980
  return {
1941
1981
  sessionId: t,
1942
1982
  visitorId: n
1943
1983
  };
1944
- }, xn = async ({
1984
+ }, Cn = async ({
1945
1985
  type: e,
1946
1986
  canTrack: t,
1947
1987
  apiKey: n,
@@ -1955,23 +1995,23 @@ const Te = "builderSessionId", mn = async ({
1955
1995
  url: location.href,
1956
1996
  ...o
1957
1997
  },
1958
- ...await Sn({
1998
+ ...await kn({
1959
1999
  canTrack: t
1960
2000
  }),
1961
2001
  userAttributes: le(),
1962
2002
  ownerId: n
1963
2003
  }
1964
2004
  });
1965
- async function kn(e) {
2005
+ async function wn(e) {
1966
2006
  if (!e.apiKey) {
1967
2007
  k.error("Missing API key for track call. Please provide your API key.");
1968
2008
  return;
1969
2009
  }
1970
- if (e.canTrack && !D() && (S() || T === "reactNative"))
2010
+ if (e.canTrack && !j() && (x() || T === "reactNative"))
1971
2011
  return fetch("https://cdn.builder.io/api/v1/track", {
1972
2012
  method: "POST",
1973
2013
  body: JSON.stringify({
1974
- events: [await xn(e)]
2014
+ events: [await Cn(e)]
1975
2015
  }),
1976
2016
  headers: {
1977
2017
  "content-type": "application/json"
@@ -1981,14 +2021,14 @@ async function kn(e) {
1981
2021
  console.error("Failed to track: ", t);
1982
2022
  });
1983
2023
  }
1984
- const qn = (e) => kn({
2024
+ const Yn = (e) => wn({
1985
2025
  ...e,
1986
2026
  canTrack: !0
1987
2027
  });
1988
2028
  function oe(e) {
1989
2029
  return Math.round(e * 1e3) / 1e3;
1990
2030
  }
1991
- const Cn = (e, t, n = !0) => {
2031
+ const In = (e, t, n = !0) => {
1992
2032
  if (!(e instanceof HTMLElement))
1993
2033
  return null;
1994
2034
  let o = n ? e : e.parentElement;
@@ -1999,7 +2039,7 @@ const Cn = (e, t, n = !0) => {
1999
2039
  return o;
2000
2040
  } while (o = o.parentElement);
2001
2041
  return null;
2002
- }, wn = (e) => Cn(e, (t) => {
2042
+ }, Tn = (e) => In(e, (t) => {
2003
2043
  const n = t.getAttribute("builder-id") || t.id;
2004
2044
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2005
2045
  }), ie = ({
@@ -2011,8 +2051,8 @@ const Cn = (e, t, n = !0) => {
2011
2051
  x: r,
2012
2052
  y: a
2013
2053
  };
2014
- }, Gn = (e) => {
2015
- const t = e.target, n = t && wn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2054
+ }, Jn = (e) => {
2055
+ const t = e.target, n = t && Tn(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2016
2056
  return {
2017
2057
  targetBuilderElement: o || void 0,
2018
2058
  metadata: {
@@ -2027,10 +2067,10 @@ const Cn = (e, t, n = !0) => {
2027
2067
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2028
2068
  }
2029
2069
  };
2030
- }, In = "0.11.5", re = {};
2031
- function Tn(e, t) {
2070
+ }, En = "0.12.1", re = {};
2071
+ function Rn(e, t) {
2032
2072
  let n = re[e];
2033
- if (n || (n = re[e] = []), n.push(t), S()) {
2073
+ if (n || (n = re[e] = []), n.push(t), x()) {
2034
2074
  const o = {
2035
2075
  type: "builder.register",
2036
2076
  data: {
@@ -2045,8 +2085,8 @@ function Tn(e, t) {
2045
2085
  }
2046
2086
  }
2047
2087
  }
2048
- const Yn = () => {
2049
- Tn("insertMenu", {
2088
+ const Qn = () => {
2089
+ Rn("insertMenu", {
2050
2090
  name: "_default",
2051
2091
  default: !0,
2052
2092
  items: [{
@@ -2069,13 +2109,13 @@ const Yn = () => {
2069
2109
  });
2070
2110
  };
2071
2111
  let ae = !1;
2072
- const Jn = (e = {}) => {
2112
+ const Xn = (e = {}) => {
2073
2113
  var t, n;
2074
- ae || (ae = !0, S() && ((t = window.parent) == null || t.postMessage({
2114
+ ae || (ae = !0, x() && ((t = window.parent) == null || t.postMessage({
2075
2115
  type: "builder.sdkInfo",
2076
2116
  data: {
2077
2117
  target: T,
2078
- version: In,
2118
+ version: En,
2079
2119
  supportsPatchUpdates: !1,
2080
2120
  // Supports builder-model="..." attribute which is needed to
2081
2121
  // scope our '+ add block' button styling
@@ -2095,11 +2135,11 @@ const Jn = (e = {}) => {
2095
2135
  switch (o.type) {
2096
2136
  case "builder.evaluate": {
2097
2137
  const a = o.data.text, s = o.data.arguments || [], c = o.data.id, u = new Function(a);
2098
- let h, g = null;
2138
+ let m, g = null;
2099
2139
  try {
2100
- h = u.apply(null, s);
2101
- } catch (m) {
2102
- g = m;
2140
+ m = u.apply(null, s);
2141
+ } catch (f) {
2142
+ g = f;
2103
2143
  }
2104
2144
  g ? (i = window.parent) == null || i.postMessage({
2105
2145
  type: "builder.evaluateError",
@@ -2107,19 +2147,19 @@ const Jn = (e = {}) => {
2107
2147
  id: c,
2108
2148
  error: g.message
2109
2149
  }
2110
- }, "*") : h && typeof h.then == "function" ? h.then((m) => {
2111
- var f;
2112
- (f = window.parent) == null || f.postMessage({
2150
+ }, "*") : m && typeof m.then == "function" ? m.then((f) => {
2151
+ var h;
2152
+ (h = window.parent) == null || h.postMessage({
2113
2153
  type: "builder.evaluateResult",
2114
2154
  data: {
2115
2155
  id: c,
2116
- result: m
2156
+ result: f
2117
2157
  }
2118
2158
  }, "*");
2119
2159
  }).catch(console.error) : (r = window.parent) == null || r.postMessage({
2120
2160
  type: "builder.evaluateResult",
2121
2161
  data: {
2122
- result: h,
2162
+ result: m,
2123
2163
  id: c
2124
2164
  }
2125
2165
  }, "*");
@@ -2127,7 +2167,7 @@ const Jn = (e = {}) => {
2127
2167
  }
2128
2168
  }
2129
2169
  })));
2130
- }, En = (e) => {
2170
+ }, An = (e) => {
2131
2171
  var r;
2132
2172
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
2133
2173
  let i = "";
@@ -2153,22 +2193,22 @@ font-weight: ${a};
2153
2193
  `.trim());
2154
2194
  }
2155
2195
  return i;
2156
- }, Rn = ({
2196
+ }, Pn = ({
2157
2197
  customFonts: e
2158
2198
  }) => {
2159
2199
  var t;
2160
- return ((t = e == null ? void 0 : e.map((n) => En(n))) == null ? void 0 : t.join(" ")) || "";
2161
- }, Pn = ({
2200
+ return ((t = e == null ? void 0 : e.map((n) => An(n))) == null ? void 0 : t.join(" ")) || "";
2201
+ }, Vn = ({
2162
2202
  cssCode: e,
2163
2203
  contentId: t
2164
2204
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2165
- function An(e) {
2205
+ function Bn(e) {
2166
2206
  const t = `
2167
- ${Pn({
2207
+ ${Vn({
2168
2208
  cssCode: e.cssCode,
2169
2209
  contentId: e.contentId
2170
2210
  })}
2171
- ${Rn({
2211
+ ${Pn({
2172
2212
  customFonts: e.customFonts
2173
2213
  })}
2174
2214
 
@@ -2187,7 +2227,7 @@ ${Rn({
2187
2227
  `.trim();
2188
2228
  return /* @__PURE__ */ l(O, { styles: t });
2189
2229
  }
2190
- const Vn = ({
2230
+ const Wn = ({
2191
2231
  content: e,
2192
2232
  data: t,
2193
2233
  locale: n
@@ -2204,7 +2244,7 @@ const Vn = ({
2204
2244
  locale: n
2205
2245
  } : {}
2206
2246
  };
2207
- }, Bn = ({
2247
+ }, $n = ({
2208
2248
  content: e,
2209
2249
  data: t
2210
2250
  }) => e ? {
@@ -2216,8 +2256,8 @@ const Vn = ({
2216
2256
  meta: e == null ? void 0 : e.meta
2217
2257
  } : void 0;
2218
2258
  function se(e) {
2219
- var i, r, a, s, c, u, h, g, m;
2220
- const t = Jt({
2259
+ var i, r, a, s, c, u, m, g, f;
2260
+ const t = Xt({
2221
2261
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2222
2262
  variationId: (i = e.content) == null ? void 0 : i.testVariationId,
2223
2263
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
@@ -2232,21 +2272,21 @@ function se(e) {
2232
2272
  ...ee,
2233
2273
  ...e.customComponents || []
2234
2274
  ].reduce(
2235
- (f, { component: p, ...d }) => ({
2236
- ...f,
2275
+ (h, { component: p, ...d }) => ({
2276
+ ...h,
2237
2277
  [d.name]: {
2238
2278
  component: p,
2239
- ...U(d)
2279
+ ...M(d)
2240
2280
  }
2241
2281
  }),
2242
2282
  {}
2243
2283
  ), o = {
2244
- content: Bn({
2284
+ content: $n({
2245
2285
  content: e.content,
2246
2286
  data: e.data
2247
2287
  }),
2248
2288
  localState: void 0,
2249
- rootState: Vn({
2289
+ rootState: Wn({
2250
2290
  content: e.content,
2251
2291
  data: e.data,
2252
2292
  locale: e.locale
@@ -2265,9 +2305,9 @@ function se(e) {
2265
2305
  ...ee,
2266
2306
  ...e.customComponents || []
2267
2307
  ].reduce(
2268
- (f, { component: p, ...d }) => ({
2269
- ...f,
2270
- [d.name]: U(d)
2308
+ (h, { component: p, ...d }) => ({
2309
+ ...h,
2310
+ [d.name]: M(d)
2271
2311
  }),
2272
2312
  {}
2273
2313
  ),
@@ -2292,19 +2332,19 @@ function se(e) {
2292
2332
  contentWrapper: e.contentWrapper,
2293
2333
  contentWrapperProps: e.contentWrapperProps,
2294
2334
  children: [
2295
- e.isSsrAbTest ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: t }) }) : null,
2335
+ e.isSsrAbTest ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(D, { scriptStr: t }) }) : null,
2296
2336
  /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(
2297
- An,
2337
+ Bn,
2298
2338
  {
2299
2339
  contentId: (a = o.content) == null ? void 0 : a.id,
2300
2340
  cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
2301
- customFonts: (h = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : h.customFonts
2341
+ customFonts: (m = (u = o.content) == null ? void 0 : u.data) == null ? void 0 : m.customFonts
2302
2342
  }
2303
2343
  ) }),
2304
2344
  /* @__PURE__ */ l(
2305
- K,
2345
+ N,
2306
2346
  {
2307
- blocks: (m = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : m.blocks,
2347
+ blocks: (f = (g = o.content) == null ? void 0 : g.data) == null ? void 0 : f.blocks,
2308
2348
  context: o,
2309
2349
  registeredComponents: n
2310
2350
  }
@@ -2313,14 +2353,14 @@ function se(e) {
2313
2353
  }
2314
2354
  );
2315
2355
  }
2316
- function Pe(e) {
2356
+ function Ae(e) {
2317
2357
  var r, a;
2318
- const t = zt({
2319
- canTrack: L(e.canTrack),
2358
+ const t = Gt({
2359
+ canTrack: U(e.canTrack),
2320
2360
  content: e.content
2321
2361
  }), n = function() {
2322
2362
  var c;
2323
- return Yt(
2363
+ return Qt(
2324
2364
  V(e.content).map((u) => ({
2325
2365
  id: u.testVariationId,
2326
2366
  testRatio: u.testRatio
@@ -2336,11 +2376,11 @@ function Pe(e) {
2336
2376
  testVariationId: (c = e.content) == null ? void 0 : c.id
2337
2377
  } : Et({
2338
2378
  item: e.content,
2339
- canTrack: L(e.canTrack)
2379
+ canTrack: U(e.canTrack)
2340
2380
  });
2341
2381
  };
2342
2382
  return /* @__PURE__ */ I(y, { children: [
2343
- !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(M, { scriptStr: Gt() }) }) : null,
2383
+ !e.__isNestedRender && T !== "reactNative" ? /* @__PURE__ */ l(y, { children: /* @__PURE__ */ l(D, { scriptStr: Jt() }) }) : null,
2344
2384
  t ? /* @__PURE__ */ I(y, { children: [
2345
2385
  /* @__PURE__ */ l(
2346
2386
  O,
@@ -2349,7 +2389,7 @@ function Pe(e) {
2349
2389
  styles: o()
2350
2390
  }
2351
2391
  ),
2352
- /* @__PURE__ */ l(M, { scriptStr: n() }),
2392
+ /* @__PURE__ */ l(D, { scriptStr: n() }),
2353
2393
  (a = V(e.content)) == null ? void 0 : a.map((s) => /* @__PURE__ */ l(
2354
2394
  se,
2355
2395
  {
@@ -2398,7 +2438,7 @@ function Pe(e) {
2398
2438
  )
2399
2439
  ] });
2400
2440
  }
2401
- const Wn = async ({
2441
+ const On = async ({
2402
2442
  builderContextValue: e,
2403
2443
  symbol: t
2404
2444
  }) => {
@@ -2417,41 +2457,44 @@ const Wn = async ({
2417
2457
  k.error("Could not fetch symbol content: ", n);
2418
2458
  });
2419
2459
  };
2420
- async function $n(e) {
2421
- var o, i, r, a;
2460
+ async function Fn(e) {
2461
+ var o, i, r, a, s;
2422
2462
  const t = function() {
2423
- var c, u;
2463
+ var u, m;
2424
2464
  return [
2425
2465
  e.attributes.className,
2426
2466
  "builder-symbol",
2427
- (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2428
- (u = e.symbol) != null && u.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2467
+ (u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
2468
+ (m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2429
2469
  ].filter(Boolean).join(" ");
2430
- }, n = ((o = e.symbol) == null ? void 0 : o.content) || await Wn({
2470
+ }, n = ((o = e.symbol) == null ? void 0 : o.content) || await On({
2431
2471
  symbol: e.symbol,
2432
2472
  builderContextValue: e.builderContext
2433
2473
  });
2434
2474
  return /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2435
- Pe,
2475
+ Ae,
2436
2476
  {
2437
2477
  __isNestedRender: !0,
2438
2478
  apiVersion: e.builderContext.apiVersion,
2439
2479
  apiKey: e.builderContext.apiKey,
2440
- context: e.builderContext.context,
2480
+ context: {
2481
+ ...e.builderContext.context,
2482
+ symbolId: (i = e.builderBlock) == null ? void 0 : i.id
2483
+ },
2441
2484
  customComponents: Object.values(e.builderComponents),
2442
2485
  data: {
2443
- ...(i = e.symbol) == null ? void 0 : i.data,
2486
+ ...(r = e.symbol) == null ? void 0 : r.data,
2444
2487
  ...e.builderContext.localState,
2445
- ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2488
+ ...(a = n == null ? void 0 : n.data) == null ? void 0 : a.state
2446
2489
  },
2447
- model: (a = e.symbol) == null ? void 0 : a.model,
2490
+ model: (s = e.symbol) == null ? void 0 : s.model,
2448
2491
  content: n
2449
2492
  }
2450
2493
  ) });
2451
2494
  }
2452
- const Qn = K, Xn = Pe, ce = {};
2453
- function Zn(e) {
2454
- if (S()) {
2495
+ const Zn = N, eo = Ae, ce = {};
2496
+ function to(e) {
2497
+ if (x()) {
2455
2498
  Object.assign(ce, e);
2456
2499
  const t = {
2457
2500
  type: "builder.settingsChange",
@@ -2460,7 +2503,7 @@ function Zn(e) {
2460
2503
  parent.postMessage(t, "*");
2461
2504
  }
2462
2505
  }
2463
- const eo = async (e) => {
2506
+ const no = async (e) => {
2464
2507
  var o, i, r;
2465
2508
  const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((i = e.userAttributes) == null ? void 0 : i.urlPath), n = {
2466
2509
  ...e,
@@ -2482,38 +2525,38 @@ const eo = async (e) => {
2482
2525
  };
2483
2526
  export {
2484
2527
  ke as A,
2485
- K as B,
2486
- Pe as C,
2487
- qn as D,
2488
- eo as E,
2489
- Qn as R,
2490
- $n as S,
2491
- Ut as T,
2492
- kn as _,
2493
- Un as a,
2494
- Mn as b,
2495
- Dn as c,
2496
- S as d,
2497
- L as e,
2498
- zn as f,
2528
+ N as B,
2529
+ Ae as C,
2530
+ Yn as D,
2531
+ no as E,
2532
+ Zn as R,
2533
+ Fn as S,
2534
+ Dt as T,
2535
+ wn as _,
2536
+ Dn as a,
2537
+ jn as b,
2538
+ Kn as c,
2539
+ x as d,
2540
+ U as e,
2541
+ Gn as f,
2499
2542
  ut as g,
2500
- j as h,
2501
- D as i,
2502
- Gn as j,
2543
+ K as h,
2544
+ j as i,
2545
+ Jn as j,
2503
2546
  $ as k,
2504
2547
  k as l,
2505
- jn as m,
2548
+ Hn as m,
2506
2549
  q as n,
2507
- nn as o,
2508
- Xt as p,
2509
- Xn as q,
2510
- Yn as r,
2511
- Jn as s,
2550
+ rn as o,
2551
+ en as p,
2552
+ eo as q,
2553
+ Qn as r,
2554
+ Xn as s,
2512
2555
  pt as t,
2513
- Tn as u,
2514
- Zn as v,
2515
- dn as w,
2556
+ Rn as u,
2557
+ to as v,
2558
+ mn as w,
2516
2559
  we as x,
2517
- Hn as y,
2518
- Kn as z
2560
+ qn as y,
2561
+ zn as z
2519
2562
  };