@builder.io/sdk-react 4.1.2 → 4.2.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.
Files changed (66) hide show
  1. package/lib/browser/blocks-exports.cjs +7 -7
  2. package/lib/browser/blocks-exports.mjs +215 -193
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-275748e0.js → server-entry-065ec411.js} +1 -1
  6. package/lib/browser/{server-entry-d2f19ab1.cjs → server-entry-09953757.cjs} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-59685072.js → accordion-79f6d62c.js} +1 -1
  10. package/lib/edge/{accordion-59377bdf.cjs → accordion-c239771d.cjs} +1 -1
  11. package/lib/edge/{blocks-803a3669.js → blocks-3cb3a9cd.js} +5 -5
  12. package/lib/edge/{blocks-ab4caea4.cjs → blocks-56f79850.cjs} +2 -2
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-244756d9.js → button-6dee05c9.js} +2 -2
  16. package/lib/edge/{button-d9ead397.cjs → button-759b43fb.cjs} +1 -1
  17. package/lib/edge/{columns-ac088b45.js → columns-2743498a.js} +3 -3
  18. package/lib/edge/{columns-88904faf.cjs → columns-a29ec0ac.cjs} +1 -1
  19. package/lib/edge/{content-variants-7ba31977.js → content-variants-4d5a1e3c.js} +172 -150
  20. package/lib/edge/{content-variants-d0558de3.cjs → content-variants-bdf1748b.cjs} +6 -6
  21. package/lib/edge/{custom-code-e2904013.cjs → custom-code-6129bd8c.cjs} +1 -1
  22. package/lib/edge/{custom-code-3d893bd2.js → custom-code-8034fac0.js} +1 -1
  23. package/lib/edge/{embed-7710e674.cjs → embed-b2ea5150.cjs} +1 -1
  24. package/lib/edge/{embed-7c2fe6ce.js → embed-f5b10eeb.js} +1 -1
  25. package/lib/edge/{form-a5b57678.js → form-14942d4f.js} +3 -3
  26. package/lib/edge/{form-ec1cd318.cjs → form-26c3a03e.cjs} +1 -1
  27. package/lib/edge/{get-class-prop-name-31bfc4d6.cjs → get-class-prop-name-7e739c9f.cjs} +1 -1
  28. package/lib/edge/{get-class-prop-name-4ca8bda9.js → get-class-prop-name-f6a63f4a.js} +1 -1
  29. package/lib/edge/{img-1b034d45.js → img-ba2ef9ee.js} +1 -1
  30. package/lib/edge/{img-f00b7db5.cjs → img-f33a2e42.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/{input-dfd8b37e.js → input-7089e95f.js} +1 -1
  34. package/lib/edge/{input-19390442.cjs → input-c2f95825.cjs} +1 -1
  35. package/lib/edge/{personalization-container-40c62fee.cjs → personalization-container-794b3939.cjs} +1 -1
  36. package/lib/edge/{personalization-container-660938a9.js → personalization-container-eb1ecef2.js} +4 -4
  37. package/lib/edge/{select-155fc504.js → select-8f01592a.js} +1 -1
  38. package/lib/edge/{select-9839622b.cjs → select-af0bb9fe.cjs} +1 -1
  39. package/lib/edge/{server-entry-bdf7aa30.cjs → server-entry-142a50e9.cjs} +1 -1
  40. package/lib/edge/{server-entry-75006b6f.js → server-entry-7c65c9a8.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-c14c2de1.js → slot-2638fd6d.js} +3 -3
  44. package/lib/edge/{slot-28225152.cjs → slot-db37860e.cjs} +1 -1
  45. package/lib/edge/{symbol-e5dc7a91.cjs → symbol-630b9a57.cjs} +1 -1
  46. package/lib/edge/{symbol-2419b184.js → symbol-7faca118.js} +2 -2
  47. package/lib/edge/{tabs-c7011fa2.js → tabs-2eee6422.js} +3 -3
  48. package/lib/edge/{tabs-d7aa6ac2.cjs → tabs-502123df.cjs} +1 -1
  49. package/lib/node/blocks-exports.cjs +14 -14
  50. package/lib/node/blocks-exports.mjs +218 -196
  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-7a611f62.cjs → server-entry-375d06e8.cjs} +1 -1
  56. package/lib/node/{server-entry-0cf21855.js → server-entry-581dd491.js} +1 -1
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/lib/node/{setIvm-68685828.cjs → setIvm-2eb44b9d.cjs} +1 -1
  60. package/lib/node/{setIvm-4171d613.js → setIvm-8d02dc72.js} +1 -1
  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-88656beb.cjs → should-force-browser-runtime-in-node-ed3fa1f9.cjs} +1 -1
  64. package/lib/node/{should-force-browser-runtime-in-node-9fe42073.js → should-force-browser-runtime-in-node-f461467e.js} +1 -1
  65. package/package.json +1 -1
  66. package/types/constants/sdk-version.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { TARGET as F, isBrowser as K, logger as Z, checkIsDefined as ge, isPreviewing as le, isEditing as O, userAttributesService as Ce, getDefaultCanTrack as X, logFetch as Fe, setupBrowserForEditing as lt, createRegisterComponentMessage as st, getCookieSync as ct, _track as Te, fetchOneEntry as Le, createEditorListener as ut, serializeIncludingFunctions as Ie, handleABTestingSync as dt } from "./server-entry-0cf21855.js";
3
- import { setClientUserAttributes as Mi } from "./server-entry-0cf21855.js";
4
- import { jsx as s, Fragment as R, jsxs as $ } from "react/jsx-runtime";
2
+ import { TARGET as F, isBrowser as K, logger as Z, checkIsDefined as ge, isPreviewing as le, isEditing as _, userAttributesService as Ce, getDefaultCanTrack as X, logFetch as Fe, setupBrowserForEditing as lt, createRegisterComponentMessage as st, getCookieSync as ct, _track as Te, fetchOneEntry as Oe, createEditorListener as ut, serializeIncludingFunctions as Ie, handleABTestingSync as dt } from "./server-entry-581dd491.js";
3
+ import { setClientUserAttributes as Mi } from "./server-entry-581dd491.js";
4
+ import { jsx as s, Fragment as R, jsxs as W } from "react/jsx-runtime";
5
5
  import * as mt from "react";
6
- import { createContext as Oe, useEffect as V, useState as C, useRef as H, useContext as we, createElement as _e } from "react";
7
- import { getFunctionArguments as ft, flattenState as ht, runInNode as gt, parseCode as bt, getBuilderGlobals as yt, set as Ue, fastClone as ye } from "./setIvm-4171d613.js";
8
- import { shouldForceBrowserRuntimeInNode as pt } from "./should-force-browser-runtime-in-node-9fe42073.js";
6
+ import { createContext as Le, useEffect as V, useState as C, useRef as H, useContext as we, createElement as _e } from "react";
7
+ import { getFunctionArguments as ft, flattenState as ht, runInNode as gt, parseCode as bt, getBuilderGlobals as yt, set as Ue, fastClone as ye } from "./setIvm-8d02dc72.js";
8
+ import { shouldForceBrowserRuntimeInNode as pt } from "./should-force-browser-runtime-in-node-f461467e.js";
9
9
  const vt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), xt = (e) => typeof e == "string" && vt.has(e.toLowerCase());
10
10
  function pe(e) {
11
11
  return /* @__PURE__ */ s(R, { children: xt(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { 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 }) }) });
@@ -48,7 +48,7 @@ function St(e) {
48
48
  }
49
49
  );
50
50
  }
51
- const ve = Oe({
51
+ const ve = Le({
52
52
  content: null,
53
53
  context: {},
54
54
  localState: void 0,
@@ -63,7 +63,7 @@ const ve = Oe({
63
63
  BlocksWrapperProps: {},
64
64
  nonce: "",
65
65
  model: ""
66
- }), He = Oe({ registeredComponents: {} }), Me = (e, t, n) => {
66
+ }), He = Le({ registeredComponents: {} }), Me = (e, t, n) => {
67
67
  const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((r, o) => r != null ? r[o] : r, e);
68
68
  return i === void 0 || i === e ? n : i;
69
69
  }, kt = ({
@@ -265,14 +265,14 @@ function Dt({
265
265
  rootState: i,
266
266
  rootSetState: r
267
267
  }) {
268
- let o = Bt(e, i.locale);
269
- return o = o, Wt({
268
+ let o = e;
269
+ return o = Wt({
270
270
  block: o,
271
271
  localState: n,
272
272
  rootState: i,
273
273
  rootSetState: r,
274
274
  context: t
275
- });
275
+ }), o = Bt(o, i.locale), o;
276
276
  }
277
277
  const se = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
278
278
  function Ft(e, t, n = {}) {
@@ -297,7 +297,7 @@ function Y(e, ...t) {
297
297
  }
298
298
  return n;
299
299
  }
300
- function Lt(e) {
300
+ function Ot(e) {
301
301
  for (const t of e)
302
302
  switch (t.trigger) {
303
303
  case "pageLoad":
@@ -312,12 +312,12 @@ function je(e) {
312
312
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
313
313
  }
314
314
  function ze(e, t) {
315
- const n = Ot(e), i = getComputedStyle(t), r = e.steps[0].styles, o = e.steps[e.steps.length - 1].styles, a = [r, o];
315
+ const n = Lt(e), i = getComputedStyle(t), r = e.steps[0].styles, o = e.steps[e.steps.length - 1].styles, a = [r, o];
316
316
  for (const l of a)
317
317
  for (const c of n)
318
318
  c in l || (l[c] = i[c]);
319
319
  }
320
- function Ot(e) {
320
+ function Lt(e) {
321
321
  const t = [];
322
322
  for (const n of e.steps)
323
323
  for (const i in n.styles)
@@ -562,7 +562,7 @@ function Qt(e) {
562
562
  return ge(i.hide) ? !i.hide : ge(i.show) ? i.show : !0;
563
563
  }
564
564
  function n() {
565
- var k, A, T, I, g;
565
+ var k, A, T, w, g;
566
566
  const i = e.block, r = i.responsiveStyles, o = e.context.content, a = Xe(
567
567
  ((k = o == null ? void 0 : o.meta) == null ? void 0 : k.breakpoints) || {}
568
568
  ), l = !!((T = (A = o == null ? void 0 : o.meta) == null ? void 0 : A.breakpoints) != null && T.xsmall), c = r == null ? void 0 : r.large, u = r == null ? void 0 : r.medium, f = r == null ? void 0 : r.small, b = r == null ? void 0 : r.xsmall, m = i.id;
@@ -595,7 +595,7 @@ function Qt(e) {
595
595
  }) : "", y = i.animations && i.animations.find((x) => x.trigger === "hover");
596
596
  let S = "";
597
597
  if (y) {
598
- const x = ((g = (I = y.steps) == null ? void 0 : I[1]) == null ? void 0 : g.styles) || {};
598
+ const x = ((g = (w = y.steps) == null ? void 0 : w[1]) == null ? void 0 : g.styles) || {};
599
599
  S = Q({
600
600
  className: `${m}:hover`,
601
601
  styles: {
@@ -894,7 +894,7 @@ function ce(e) {
894
894
  }
895
895
  return V(() => {
896
896
  const d = r().id, h = r().animations;
897
- h && d && Lt(
897
+ h && d && Ot(
898
898
  h.map((p) => ({
899
899
  ...p,
900
900
  elementId: d
@@ -902,7 +902,7 @@ function ce(e) {
902
902
  );
903
903
  }, []), V(() => {
904
904
  n.update = !0;
905
- }), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */ $(R, { children: [
905
+ }), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */ W(R, { children: [
906
906
  /* @__PURE__ */ s(Qt, { block: r(), context: e.context }),
907
907
  (f = o == null ? void 0 : o()) != null && f.noWrap ? t() ? /* @__PURE__ */ s(R, { children: (v = t()) == null ? void 0 : v.map((d, h) => /* @__PURE__ */ s(
908
908
  Pe,
@@ -935,7 +935,7 @@ function ce(e) {
935
935
  linkComponent: e.linkComponent
936
936
  },
937
937
  Ee(h)
938
- )) }) : /* @__PURE__ */ $(
938
+ )) }) : /* @__PURE__ */ W(
939
939
  nn,
940
940
  {
941
941
  Wrapper: a(),
@@ -990,7 +990,7 @@ function ln(e) {
990
990
  }
991
991
  function r() {
992
992
  var a, l;
993
- O() && !((a = e.blocks) != null && a.length) && ((l = window.parent) == null || l.postMessage(
993
+ _() && !((a = e.blocks) != null && a.length) && ((l = window.parent) == null || l.postMessage(
994
994
  {
995
995
  type: "builder.clickEmptyBlocks",
996
996
  data: {
@@ -1003,7 +1003,7 @@ function ln(e) {
1003
1003
  }
1004
1004
  function o() {
1005
1005
  var a, l;
1006
- O() && !((a = e.blocks) != null && a.length) && ((l = window.parent) == null || l.postMessage(
1006
+ _() && !((a = e.blocks) != null && a.length) && ((l = window.parent) == null || l.postMessage(
1007
1007
  {
1008
1008
  type: "builder.hoverEmptyBlocks",
1009
1009
  data: {
@@ -1016,7 +1016,7 @@ function ln(e) {
1016
1016
  }
1017
1017
  return V(() => {
1018
1018
  }, []), V(() => {
1019
- }, [e.blocks]), /* @__PURE__ */ $(R, { children: [
1019
+ }, [e.blocks]), /* @__PURE__ */ W(R, { children: [
1020
1020
  /* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-8834791c {
1021
1021
  display: flex;
1022
1022
  flex-direction: column;
@@ -1039,10 +1039,10 @@ function ln(e) {
1039
1039
  )
1040
1040
  ] });
1041
1041
  }
1042
- function _(e) {
1042
+ function U(e) {
1043
1043
  var i, r, o;
1044
1044
  const t = we(ve), n = we(He);
1045
- return /* @__PURE__ */ $(
1045
+ return /* @__PURE__ */ W(
1046
1046
  ln,
1047
1047
  {
1048
1048
  blocks: e.blocks,
@@ -1116,7 +1116,7 @@ function cn(e) {
1116
1116
  };
1117
1117
  }
1118
1118
  function b(y) {
1119
- const S = y === 0 ? 0 : t(), k = a(y), A = `${S}px`, T = "100%", I = 0;
1119
+ const S = y === 0 ? 0 : t(), k = a(y), A = `${S}px`, T = "100%", w = 0;
1120
1120
  return {
1121
1121
  ...{
1122
1122
  display: "flex",
@@ -1130,7 +1130,7 @@ function cn(e) {
1130
1130
  desktopStyle: k
1131
1131
  }),
1132
1132
  "--column-margin-left-mobile": c({
1133
- stackedStyle: I,
1133
+ stackedStyle: w,
1134
1134
  desktopStyle: A
1135
1135
  }),
1136
1136
  "--column-width-tablet": l({
@@ -1138,7 +1138,7 @@ function cn(e) {
1138
1138
  desktopStyle: k
1139
1139
  }),
1140
1140
  "--column-margin-left-tablet": l({
1141
- stackedStyle: I,
1141
+ stackedStyle: w,
1142
1142
  desktopStyle: A
1143
1143
  })
1144
1144
  };
@@ -1186,13 +1186,13 @@ function cn(e) {
1186
1186
  style: Ge(b(S))
1187
1187
  };
1188
1188
  }
1189
- return /* @__PURE__ */ $(R, { children: [
1189
+ return /* @__PURE__ */ W(R, { children: [
1190
1190
  /* @__PURE__ */ s("style", { children: `.div-0369db37 {
1191
1191
  display: flex;
1192
1192
  line-height: normal;
1193
1193
  height: 100%;
1194
1194
  }` }),
1195
- /* @__PURE__ */ $(
1195
+ /* @__PURE__ */ W(
1196
1196
  "div",
1197
1197
  {
1198
1198
  className: sn((h = e.builderBlock) == null ? void 0 : h.id) + " div-0369db37",
@@ -1213,7 +1213,7 @@ function cn(e) {
1213
1213
  actionAttributes: {},
1214
1214
  attributes: d(y, S),
1215
1215
  children: /* @__PURE__ */ s(
1216
- _,
1216
+ U,
1217
1217
  {
1218
1218
  path: `columns.${S}.blocks`,
1219
1219
  parent: e.builderBlock.id,
@@ -1300,7 +1300,7 @@ function fn(e) {
1300
1300
  return e.aspectRatio ? f : void 0;
1301
1301
  }
1302
1302
  return V(() => {
1303
- }, []), /* @__PURE__ */ $(R, { children: [
1303
+ }, []), /* @__PURE__ */ W(R, { children: [
1304
1304
  /* @__PURE__ */ s("style", { children: `.img-3cc22d08 {
1305
1305
  opacity: 1;
1306
1306
  transition: opacity 0.2s ease-in-out;
@@ -1318,8 +1318,8 @@ function fn(e) {
1318
1318
  width: 100%;
1319
1319
  height: 100%;
1320
1320
  }` }),
1321
- /* @__PURE__ */ $(R, { children: [
1322
- /* @__PURE__ */ $("picture", { children: [
1321
+ /* @__PURE__ */ W(R, { children: [
1322
+ /* @__PURE__ */ W("picture", { children: [
1323
1323
  n() ? /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) : null,
1324
1324
  /* @__PURE__ */ s(
1325
1325
  "img",
@@ -1611,7 +1611,7 @@ function Sn({
1611
1611
  path: "this.children",
1612
1612
  index: ie
1613
1613
  };
1614
- if (n && O()) {
1614
+ if (n && _()) {
1615
1615
  if (typeof t == "number" && t < ((a = e == null ? void 0 : e.length) != null ? a : 0)) {
1616
1616
  const l = e == null ? void 0 : e[t];
1617
1617
  if (l)
@@ -1844,7 +1844,7 @@ function wn(e) {
1844
1844
  function f(m) {
1845
1845
  t.includes(m) ? n(i() ? [] : t.filter((v) => v !== m)) : n(i() ? [m] : t.concat(m));
1846
1846
  }
1847
- return /* @__PURE__ */ s("div", { className: "builder-accordion", style: r(), children: (b = e.items) == null ? void 0 : b.map((m, v) => /* @__PURE__ */ $(mt.Fragment, { children: [
1847
+ return /* @__PURE__ */ s("div", { className: "builder-accordion", style: r(), children: (b = e.items) == null ? void 0 : b.map((m, v) => /* @__PURE__ */ W(mt.Fragment, { children: [
1848
1848
  /* @__PURE__ */ s(
1849
1849
  "div",
1850
1850
  {
@@ -1859,7 +1859,7 @@ function wn(e) {
1859
1859
  "data-index": v,
1860
1860
  onClick: (d) => f(v),
1861
1861
  children: /* @__PURE__ */ s(
1862
- _,
1862
+ U,
1863
1863
  {
1864
1864
  blocks: m.title,
1865
1865
  path: `items.${v}.title`,
@@ -1877,7 +1877,7 @@ function wn(e) {
1877
1877
  className: l(v),
1878
1878
  style: u(),
1879
1879
  children: /* @__PURE__ */ s(
1880
- _,
1880
+ U,
1881
1881
  {
1882
1882
  blocks: m.detail,
1883
1883
  path: `items.${v}.detail`,
@@ -2300,33 +2300,33 @@ function q(e) {
2300
2300
  );
2301
2301
  }
2302
2302
  function Nn(e) {
2303
- var S, k, A, T, I, g, x, w, D, L, W, P, U;
2303
+ var S, k, A, T, w, g, x, E, N, O, L, P, D;
2304
2304
  const t = H(null), [n, i] = C(
2305
2305
  () => Ce.getUserAttributes()
2306
2306
  ), [r, o] = C(
2307
2307
  () => {
2308
- var E, B, N;
2308
+ var I, B, $;
2309
2309
  return Cn(
2310
2310
  e.variants,
2311
- ((E = e.builderBlock) == null ? void 0 : E.id) || "none",
2312
- (N = (B = e.builderContext) == null ? void 0 : B.rootState) == null ? void 0 : N.locale
2311
+ ((I = e.builderBlock) == null ? void 0 : I.id) || "none",
2312
+ ($ = (B = e.builderContext) == null ? void 0 : B.rootState) == null ? void 0 : $.locale
2313
2313
  );
2314
2314
  }
2315
2315
  ), [a, l] = C(
2316
2316
  () => {
2317
- var E, B, N;
2317
+ var I, B, $;
2318
2318
  return Tn(
2319
2319
  e.variants,
2320
- ((E = e.builderBlock) == null ? void 0 : E.id) || "none",
2321
- (N = (B = e.builderContext) == null ? void 0 : B.rootState) == null ? void 0 : N.locale
2320
+ ((I = e.builderBlock) == null ? void 0 : I.id) || "none",
2321
+ ($ = (B = e.builderContext) == null ? void 0 : B.rootState) == null ? void 0 : $.locale
2322
2322
  );
2323
2323
  }
2324
2324
  ), [c, u] = C(() => []), [f, b] = C(
2325
2325
  () => {
2326
- var E;
2326
+ var I;
2327
2327
  return xn(
2328
2328
  e.variants,
2329
- X((E = e.builderContext) == null ? void 0 : E.canTrack)
2329
+ X((I = e.builderContext) == null ? void 0 : I.canTrack)
2330
2330
  );
2331
2331
  }
2332
2332
  ), [m, v] = C(() => !1);
@@ -2337,26 +2337,26 @@ function Nn(e) {
2337
2337
  };
2338
2338
  }
2339
2339
  function h() {
2340
- return (e.variants || []).filter((E) => {
2341
- var B, N, z, M;
2340
+ return (e.variants || []).filter((I) => {
2341
+ var B, $, z, M;
2342
2342
  return gn(
2343
2343
  {
2344
- ...(N = (B = e.builderContext) == null ? void 0 : B.rootState) != null && N.locale ? {
2344
+ ...($ = (B = e.builderContext) == null ? void 0 : B.rootState) != null && $.locale ? {
2345
2345
  locale: (M = (z = e.builderContext) == null ? void 0 : z.rootState) == null ? void 0 : M.locale
2346
2346
  } : {},
2347
2347
  ...n
2348
2348
  },
2349
- E.query,
2350
- E.startDate,
2351
- E.endDate
2349
+ I.query,
2350
+ I.startDate,
2351
+ I.endDate
2352
2352
  );
2353
2353
  });
2354
2354
  }
2355
2355
  function p() {
2356
- var E;
2356
+ var I;
2357
2357
  return Sn({
2358
2358
  variants: e.variants,
2359
- fallbackBlocks: (E = e.builderBlock) == null ? void 0 : E.children,
2359
+ fallbackBlocks: (I = e.builderBlock) == null ? void 0 : I.children,
2360
2360
  isHydrated: m,
2361
2361
  filteredVariants: h(),
2362
2362
  previewingIndex: e.previewingIndex
@@ -2364,29 +2364,29 @@ function Nn(e) {
2364
2364
  }
2365
2365
  function y() {
2366
2366
  return (e.variants || []).map(
2367
- (E, B) => {
2368
- var N;
2369
- return `div[data-variant-id="${(N = e.builderBlock) == null ? void 0 : N.id}-${B}"] { display: none !important; } `;
2367
+ (I, B) => {
2368
+ var $;
2369
+ return `div[data-variant-id="${($ = e.builderBlock) == null ? void 0 : $.id}-${B}"] { display: none !important; } `;
2370
2370
  }
2371
2371
  ).join("");
2372
2372
  }
2373
2373
  return V(() => {
2374
2374
  var B;
2375
2375
  v(!0);
2376
- const E = Ce.subscribeOnUserAttributesChange(
2377
- (N) => {
2378
- i(N);
2376
+ const I = Ce.subscribeOnUserAttributesChange(
2377
+ ($) => {
2378
+ i($);
2379
2379
  },
2380
2380
  {
2381
2381
  fireImmediately: F === "qwik"
2382
2382
  }
2383
2383
  );
2384
- if (!(O() || le())) {
2385
- const N = h()[0];
2384
+ if (!(_() || le())) {
2385
+ const $ = h()[0];
2386
2386
  t.current && (t.current.dispatchEvent(
2387
2387
  new CustomEvent("builder.variantLoaded", {
2388
2388
  detail: {
2389
- variant: N || ie,
2389
+ variant: $ || ie,
2390
2390
  content: (B = e.builderContext) == null ? void 0 : B.content
2391
2391
  },
2392
2392
  bubbles: !0
@@ -2397,7 +2397,7 @@ function Nn(e) {
2397
2397
  te.isIntersecting && t.current && t.current.dispatchEvent(
2398
2398
  new CustomEvent("builder.variantDisplayed", {
2399
2399
  detail: {
2400
- variant: N || ie,
2400
+ variant: $ || ie,
2401
2401
  content: (G = e.builderContext) == null ? void 0 : G.content
2402
2402
  },
2403
2403
  bubbles: !0
@@ -2406,12 +2406,12 @@ function Nn(e) {
2406
2406
  });
2407
2407
  }).observe(t.current));
2408
2408
  }
2409
- c.push(E);
2409
+ c.push(I);
2410
2410
  }, []), V(() => () => {
2411
- c.forEach((E) => E());
2412
- }, []), /* @__PURE__ */ $("div", { ref: t, ...d(), children: [
2411
+ c.forEach((I) => I());
2412
+ }, []), /* @__PURE__ */ W("div", { ref: t, ...d(), children: [
2413
2413
  m && re.includes(F) ? /* @__PURE__ */ s(
2414
- _,
2414
+ U,
2415
2415
  {
2416
2416
  blocks: p().blocks,
2417
2417
  parent: (S = e.builderBlock) == null ? void 0 : S.id,
@@ -2424,14 +2424,14 @@ function Nn(e) {
2424
2424
  }
2425
2425
  }
2426
2426
  ) : null,
2427
- !m && re.includes(F) || !re.includes(F) ? /* @__PURE__ */ $(R, { children: [
2428
- f ? /* @__PURE__ */ $(R, { children: [
2427
+ !m && re.includes(F) || !re.includes(F) ? /* @__PURE__ */ W(R, { children: [
2428
+ f ? /* @__PURE__ */ W(R, { children: [
2429
2429
  /* @__PURE__ */ s(
2430
2430
  ee,
2431
2431
  {
2432
2432
  nonce: ((T = e.builderContext) == null ? void 0 : T.nonce) || "",
2433
2433
  styles: y(),
2434
- id: `variants-styles-${(I = e.builderBlock) == null ? void 0 : I.id}`
2434
+ id: `variants-styles-${(w = e.builderBlock) == null ? void 0 : w.id}`
2435
2435
  }
2436
2436
  ),
2437
2437
  /* @__PURE__ */ s(
@@ -2442,18 +2442,18 @@ function Nn(e) {
2442
2442
  id: `variants-visibility-script-${(x = e.builderBlock) == null ? void 0 : x.id}`
2443
2443
  }
2444
2444
  ),
2445
- (w = e.variants) == null ? void 0 : w.map((E, B) => {
2446
- var N, z, M, te, G, ke;
2445
+ (E = e.variants) == null ? void 0 : E.map((I, B) => {
2446
+ var $, z, M, te, G, ke;
2447
2447
  return /* @__PURE__ */ s(
2448
- _,
2448
+ U,
2449
2449
  {
2450
2450
  BlocksWrapperProps: {
2451
- ...(N = e.builderContext) == null ? void 0 : N.BlocksWrapperProps,
2451
+ ...($ = e.builderContext) == null ? void 0 : $.BlocksWrapperProps,
2452
2452
  "aria-hidden": !0,
2453
2453
  hidden: !0,
2454
2454
  "data-variant-id": `${(z = e.builderBlock) == null ? void 0 : z.id}-${B}`
2455
2455
  },
2456
- blocks: E.blocks,
2456
+ blocks: I.blocks,
2457
2457
  parent: (M = e.builderBlock) == null ? void 0 : M.id,
2458
2458
  path: `component.options.variants.${B}.blocks`,
2459
2459
  context: e.builderContext,
@@ -2472,23 +2472,23 @@ function Nn(e) {
2472
2472
  })
2473
2473
  ] }) : null,
2474
2474
  /* @__PURE__ */ s(
2475
- _,
2475
+ U,
2476
2476
  {
2477
2477
  blocks: p().blocks,
2478
- parent: (D = e.builderBlock) == null ? void 0 : D.id,
2478
+ parent: (N = e.builderBlock) == null ? void 0 : N.id,
2479
2479
  path: p().path,
2480
2480
  context: e.builderContext,
2481
2481
  registeredComponents: e.builderComponents,
2482
2482
  BlocksWrapperProps: {
2483
- ...(L = e.builderContext) == null ? void 0 : L.BlocksWrapperProps,
2484
- "data-variant-id": `${(W = e.builderBlock) == null ? void 0 : W.id}-${p().index}`
2483
+ ...(O = e.builderContext) == null ? void 0 : O.BlocksWrapperProps,
2484
+ "data-variant-id": `${(L = e.builderBlock) == null ? void 0 : L.id}-${p().index}`
2485
2485
  },
2486
2486
  children: f ? /* @__PURE__ */ s(
2487
2487
  q,
2488
2488
  {
2489
2489
  nonce: ((P = e.builderContext) == null ? void 0 : P.nonce) || "",
2490
2490
  scriptStr: r,
2491
- id: `variants-script-${(U = e.builderBlock) == null ? void 0 : U.id}-${ie}`
2491
+ id: `variants-script-${(D = e.builderBlock) == null ? void 0 : D.id}-${ie}`
2492
2492
  }
2493
2493
  ) : null
2494
2494
  }
@@ -2565,7 +2565,7 @@ function Dn(e) {
2565
2565
  "builder-slot": e.name
2566
2566
  },
2567
2567
  children: /* @__PURE__ */ s(
2568
- _,
2568
+ U,
2569
2569
  {
2570
2570
  parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
2571
2571
  path: `symbol.data.${e.name}`,
@@ -2654,7 +2654,7 @@ const Fn = {
2654
2654
  text: "New tab content "
2655
2655
  }
2656
2656
  }
2657
- }, Ln = {
2657
+ }, On = {
2658
2658
  name: "Builder: Tabs",
2659
2659
  inputs: [{
2660
2660
  name: "tabs",
@@ -2758,7 +2758,7 @@ const Fn = {
2758
2758
  builderLinkComponent: !0
2759
2759
  }
2760
2760
  };
2761
- function On(e) {
2761
+ function Ln(e) {
2762
2762
  var o;
2763
2763
  const [t, n] = C(
2764
2764
  () => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
@@ -2769,7 +2769,7 @@ function On(e) {
2769
2769
  function r(a) {
2770
2770
  a === t && e.collapsible ? n(-1) : n(a);
2771
2771
  }
2772
- return /* @__PURE__ */ $("div", { children: [
2772
+ return /* @__PURE__ */ W("div", { children: [
2773
2773
  /* @__PURE__ */ s(
2774
2774
  "div",
2775
2775
  {
@@ -2789,7 +2789,7 @@ function On(e) {
2789
2789
  },
2790
2790
  onClick: (c) => r(l),
2791
2791
  children: /* @__PURE__ */ s(
2792
- _,
2792
+ U,
2793
2793
  {
2794
2794
  parent: e.builderBlock.id,
2795
2795
  path: `tabs.${l}.label`,
@@ -2805,7 +2805,7 @@ function On(e) {
2805
2805
  }
2806
2806
  ),
2807
2807
  i(t) ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
2808
- _,
2808
+ U,
2809
2809
  {
2810
2810
  parent: e.builderBlock.id,
2811
2811
  path: `tabs.${t}.content`,
@@ -2909,7 +2909,7 @@ function Mn(e) {
2909
2909
  return V(() => {
2910
2910
  a();
2911
2911
  }, []), V(() => {
2912
- O() && a();
2912
+ _() && a();
2913
2913
  }, [e.code]), /* @__PURE__ */ s(
2914
2914
  "div",
2915
2915
  {
@@ -3218,7 +3218,7 @@ function Yn(e) {
3218
3218
  e.builderContext.rootSetState ? (d = (v = e.builderContext).rootSetState) == null || d.call(v, m) : e.builderContext.rootState = m;
3219
3219
  }
3220
3220
  function u() {
3221
- return O() && e.previewState || n;
3221
+ return _() && e.previewState || n;
3222
3222
  }
3223
3223
  function f(b) {
3224
3224
  var v;
@@ -3235,25 +3235,25 @@ function Yn(e) {
3235
3235
  let p;
3236
3236
  const y = new FormData(d), S = Array.from(d.querySelectorAll("input,select,textarea")).filter((g) => !!g.name).map((g) => {
3237
3237
  let x;
3238
- const w = g.name;
3238
+ const E = g.name;
3239
3239
  if (g instanceof HTMLInputElement)
3240
3240
  if (g.type === "radio") {
3241
3241
  if (g.checked)
3242
3242
  return x = g.name, {
3243
- key: w,
3243
+ key: E,
3244
3244
  value: x
3245
3245
  };
3246
3246
  } else if (g.type === "checkbox")
3247
3247
  x = g.checked;
3248
3248
  else if (g.type === "number" || g.type === "range") {
3249
- const D = g.valueAsNumber;
3250
- isNaN(D) || (x = D);
3249
+ const N = g.valueAsNumber;
3250
+ isNaN(N) || (x = N);
3251
3251
  } else
3252
3252
  g.type === "file" ? x = g.files : x = g.value;
3253
3253
  else
3254
3254
  x = g.value;
3255
3255
  return {
3256
- key: w,
3256
+ key: E,
3257
3257
  value: x
3258
3258
  };
3259
3259
  });
@@ -3264,8 +3264,8 @@ function Yn(e) {
3264
3264
  p = y;
3265
3265
  else {
3266
3266
  const g = {};
3267
- Array.from(S).forEach(({ value: x, key: w }) => {
3268
- Ue(g, w, x);
3267
+ Array.from(S).forEach(({ value: x, key: E }) => {
3268
+ Ue(g, E, x);
3269
3269
  }), p = JSON.stringify(g);
3270
3270
  }
3271
3271
  k && k !== "multipart/form-data" && (m && ((v = e.action) != null && v.includes("zapier.com")) || (h["content-type"] = k));
@@ -3279,17 +3279,17 @@ function Yn(e) {
3279
3279
  }
3280
3280
  const T = `${Qn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
3281
3281
  e.sendSubmissionsToEmail || ""
3282
- )}&name=${encodeURIComponent(e.name || "")}`, I = e.sendSubmissionsTo === "email" ? T : e.action;
3283
- Fe(I), fetch(I, { body: p, headers: h, method: e.method || "post" }).then(
3282
+ )}&name=${encodeURIComponent(e.name || "")}`, w = e.sendSubmissionsTo === "email" ? T : e.action;
3283
+ Fe(w), fetch(w, { body: p, headers: h, method: e.method || "post" }).then(
3284
3284
  async (g) => {
3285
- var D, L;
3285
+ var N, O;
3286
3286
  let x;
3287
- const w = g.headers.get("content-type");
3288
- if (w && w.indexOf("application/json") !== -1 ? x = await g.json() : x = await g.text(), !g.ok) {
3289
- const W = new CustomEvent("submit:error", {
3287
+ const E = g.headers.get("content-type");
3288
+ if (E && E.indexOf("application/json") !== -1 ? x = await g.json() : x = await g.text(), !g.ok) {
3289
+ const L = new CustomEvent("submit:error", {
3290
3290
  detail: { error: x, status: g.status }
3291
3291
  });
3292
- if ((D = t.current) != null && D.nativeElement && ((L = t.current) == null || L.nativeElement.dispatchEvent(W), W.defaultPrevented))
3292
+ if ((N = t.current) != null && N.nativeElement && ((O = t.current) == null || O.nativeElement.dispatchEvent(L), L.defaultPrevented))
3293
3293
  return;
3294
3294
  o(x), i("error");
3295
3295
  let P = e.errorMessagePath ? Me(x, e.errorMessagePath) : x.message || x.error || x;
@@ -3297,11 +3297,11 @@ function Yn(e) {
3297
3297
  return;
3298
3298
  }
3299
3299
  if (o(x), i(g.ok ? "success" : "error"), g.ok) {
3300
- const W = new CustomEvent("submit:success", {
3300
+ const L = new CustomEvent("submit:success", {
3301
3301
  detail: { res: g, body: x }
3302
3302
  });
3303
3303
  if (t.current) {
3304
- if (t.current.dispatchEvent(W), W.defaultPrevented)
3304
+ if (t.current.dispatchEvent(L), L.defaultPrevented)
3305
3305
  return;
3306
3306
  e.resetFormOnSubmit !== !1 && t.current.reset();
3307
3307
  }
@@ -3324,11 +3324,11 @@ function Yn(e) {
3324
3324
  );
3325
3325
  }
3326
3326
  }
3327
- return /* @__PURE__ */ $(R, { children: [
3327
+ return /* @__PURE__ */ W(R, { children: [
3328
3328
  " ",
3329
3329
  /* @__PURE__ */ s("style", { children: ".pre-7c90c93e { padding: 10px; color: red; text-align: center; }" }),
3330
3330
  " ",
3331
- /* @__PURE__ */ $(
3331
+ /* @__PURE__ */ W(
3332
3332
  "form",
3333
3333
  {
3334
3334
  validate: e.validate,
@@ -3341,7 +3341,7 @@ function Yn(e) {
3341
3341
  children: [
3342
3342
  e.children,
3343
3343
  u() === "error" ? /* @__PURE__ */ s(
3344
- _,
3344
+ U,
3345
3345
  {
3346
3346
  path: "errorMessage",
3347
3347
  blocks: e.errorMessage,
@@ -3349,7 +3349,7 @@ function Yn(e) {
3349
3349
  }
3350
3350
  ) : null,
3351
3351
  u() === "sending" ? /* @__PURE__ */ s(
3352
- _,
3352
+ U,
3353
3353
  {
3354
3354
  path: "sendingMessage",
3355
3355
  blocks: e.sendingMessage,
@@ -3358,7 +3358,7 @@ function Yn(e) {
3358
3358
  ) : null,
3359
3359
  u() === "error" && r ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-7c90c93e", children: JSON.stringify(r, null, 2) }) : null,
3360
3360
  u() === "success" ? /* @__PURE__ */ s(
3361
- _,
3361
+ U,
3362
3362
  {
3363
3363
  path: "successMessage",
3364
3364
  blocks: e.successMessage,
@@ -3428,7 +3428,7 @@ function Zn(e) {
3428
3428
  "input",
3429
3429
  {
3430
3430
  ...e.attributes,
3431
- key: O() && e.defaultValue ? e.defaultValue : "default-key",
3431
+ key: _() && e.defaultValue ? e.defaultValue : "default-key",
3432
3432
  placeholder: e.placeholder,
3433
3433
  type: e.type,
3434
3434
  name: e.name,
@@ -3488,7 +3488,7 @@ function ti(e) {
3488
3488
  {
3489
3489
  ...e.attributes,
3490
3490
  value: e.value,
3491
- key: O() && e.defaultValue ? e.defaultValue : "default-key",
3491
+ key: _() && e.defaultValue ? e.defaultValue : "default-key",
3492
3492
  defaultValue: e.defaultValue,
3493
3493
  name: e.name,
3494
3494
  required: e.required
@@ -3609,7 +3609,7 @@ function li(e) {
3609
3609
  srcSet: t(),
3610
3610
  ...e.attributes
3611
3611
  },
3612
- O() && e.imgSrc || "default-key"
3612
+ _() && e.imgSrc || "default-key"
3613
3613
  );
3614
3614
  }
3615
3615
  const si = {
@@ -3749,7 +3749,7 @@ function ci(e) {
3749
3749
  }
3750
3750
  }, []), V(() => () => {
3751
3751
  r && r.disconnect();
3752
- }, []), /* @__PURE__ */ $(
3752
+ }, []), /* @__PURE__ */ W(
3753
3753
  "div",
3754
3754
  {
3755
3755
  style: {
@@ -3888,8 +3888,8 @@ const ui = () => [{
3888
3888
  component: Nn,
3889
3889
  ...Bn
3890
3890
  }] : [], {
3891
- component: On,
3892
- ...Ln
3891
+ component: Ln,
3892
+ ...On
3893
3893
  }, {
3894
3894
  component: wn,
3895
3895
  ...In
@@ -4047,7 +4047,7 @@ const vi = (e, t, n = !0) => {
4047
4047
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
4048
4048
  }
4049
4049
  };
4050
- }, ki = ["svelte", "qwik", "vue"], We = () => ki.includes(F) && (O() || le()), Ci = (e) => {
4050
+ }, ki = ["svelte", "qwik", "vue"], We = () => ki.includes(F) && (_() || le()), Ci = (e) => {
4051
4051
  var o, a;
4052
4052
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (o = e == null ? void 0 : e.files) == null ? void 0 : o.regular;
4053
4053
  let r = "";
@@ -4105,18 +4105,18 @@ function Pi(e) {
4105
4105
  C(() => !1);
4106
4106
  function n(T) {
4107
4107
  var g, x;
4108
- const I = {
4108
+ const w = {
4109
4109
  ...e.builderContextSignal.rootState,
4110
4110
  ...T
4111
4111
  };
4112
- e.builderContextSignal.rootSetState ? (x = (g = e.builderContextSignal).rootSetState) == null || x.call(g, I) : e.setBuilderContextSignal((w) => ({
4113
- ...w,
4114
- rootState: I
4112
+ e.builderContextSignal.rootSetState ? (x = (g = e.builderContextSignal).rootSetState) == null || x.call(g, w) : e.setBuilderContextSignal((E) => ({
4113
+ ...E,
4114
+ rootState: w
4115
4115
  }));
4116
4116
  }
4117
4117
  function i(T) {
4118
- var g, x, w, D, L;
4119
- const I = {
4118
+ var g, x, E, N, O;
4119
+ const w = {
4120
4120
  ...e.builderContextSignal.content,
4121
4121
  ...T,
4122
4122
  data: {
@@ -4126,12 +4126,12 @@ function Pi(e) {
4126
4126
  meta: {
4127
4127
  ...(x = e.builderContextSignal.content) == null ? void 0 : x.meta,
4128
4128
  ...T == null ? void 0 : T.meta,
4129
- breakpoints: ((w = T == null ? void 0 : T.meta) == null ? void 0 : w.breakpoints) || ((L = (D = e.builderContextSignal.content) == null ? void 0 : D.meta) == null ? void 0 : L.breakpoints)
4129
+ breakpoints: ((E = T == null ? void 0 : T.meta) == null ? void 0 : E.breakpoints) || ((O = (N = e.builderContextSignal.content) == null ? void 0 : N.meta) == null ? void 0 : O.breakpoints)
4130
4130
  }
4131
4131
  };
4132
- e.setBuilderContextSignal((W) => ({
4133
- ...W,
4134
- content: I
4132
+ e.setBuilderContextSignal((L) => ({
4133
+ ...L,
4134
+ content: w
4135
4135
  }));
4136
4136
  }
4137
4137
  function r() {
@@ -4148,39 +4148,39 @@ function Pi(e) {
4148
4148
  model: e.model,
4149
4149
  trustedHosts: e.trustedHosts,
4150
4150
  callbacks: {
4151
- configureSdk: (I) => {
4152
- var w;
4153
- const { breakpoints: g, contentId: x } = I;
4154
- !x || x !== ((w = e.builderContextSignal.content) == null ? void 0 : w.id) || g && i({
4151
+ configureSdk: (w) => {
4152
+ var E;
4153
+ const { breakpoints: g, contentId: x } = w;
4154
+ !x || x !== ((E = e.builderContextSignal.content) == null ? void 0 : E.id) || g && i({
4155
4155
  meta: {
4156
4156
  breakpoints: g
4157
4157
  }
4158
4158
  });
4159
4159
  },
4160
- animation: (I) => {
4161
- Ke(I);
4160
+ animation: (w) => {
4161
+ Ke(w);
4162
4162
  },
4163
- contentUpdate: (I) => {
4164
- i(I);
4163
+ contentUpdate: (w) => {
4164
+ i(w);
4165
4165
  },
4166
- stateUpdate: (I) => {
4167
- n(I);
4166
+ stateUpdate: (w) => {
4167
+ n(w);
4168
4168
  }
4169
4169
  }
4170
4170
  })(T);
4171
4171
  }
4172
4172
  const [c, u] = C(() => ({})), [f, b] = C(() => ({})), [m, v] = C(() => !1);
4173
4173
  function d(T) {
4174
- var I, g;
4174
+ var w, g;
4175
4175
  if (e.builderContextSignal.content) {
4176
- const x = (I = e.builderContextSignal.content) == null ? void 0 : I.testVariationId, w = (g = e.builderContextSignal.content) == null ? void 0 : g.id;
4176
+ const x = (w = e.builderContextSignal.content) == null ? void 0 : w.testVariationId, E = (g = e.builderContextSignal.content) == null ? void 0 : g.id;
4177
4177
  Te({
4178
4178
  apiHost: e.apiHost,
4179
4179
  type: "click",
4180
4180
  canTrack: X(e.canTrack),
4181
- contentId: w,
4181
+ contentId: E,
4182
4182
  apiKey: e.apiKey,
4183
- variationId: x !== w ? x : void 0,
4183
+ variationId: x !== E ? x : void 0,
4184
4184
  ...Si(T),
4185
4185
  unique: !m
4186
4186
  });
@@ -4188,37 +4188,59 @@ function Pi(e) {
4188
4188
  m || v(!0);
4189
4189
  }
4190
4190
  function h() {
4191
- var I, g, x;
4192
- const T = (x = (g = (I = e.builderContextSignal.content) == null ? void 0 : I.data) == null ? void 0 : g.httpRequests) != null ? x : {};
4193
- Object.entries(T).forEach(([w, D]) => {
4194
- if (!D || f[w] || c[w] && !O())
4195
- return;
4196
- f[w] = !0;
4197
- const L = D.replace(
4198
- /{{([^}]+)}}/g,
4199
- (W, P) => String(
4200
- J({
4201
- code: P,
4202
- context: e.context || {},
4203
- localState: void 0,
4204
- rootState: e.builderContextSignal.rootState,
4205
- rootSetState: e.builderContextSignal.rootSetState
4206
- })
4207
- )
4208
- );
4209
- Fe(L), fetch(L).then((W) => W.json()).then((W) => {
4210
- n({
4211
- [w]: W
4212
- }), c[w] = !0;
4213
- }).catch((W) => {
4214
- console.error("error fetching dynamic data", D, W);
4215
- }).finally(() => {
4216
- f[w] = !1;
4217
- });
4218
- });
4191
+ var w, g, x;
4192
+ const T = (x = (g = (w = e.builderContextSignal.content) == null ? void 0 : w.data) == null ? void 0 : g.httpRequests) != null ? x : {};
4193
+ Object.entries(T).forEach(
4194
+ ([E, N]) => {
4195
+ if (!N)
4196
+ return;
4197
+ const O = typeof N == "object" && N["@type"] === "@builder.io/core:Request";
4198
+ if (f[E] || c[E] && !_())
4199
+ return;
4200
+ const L = O ? N.request.url : N;
4201
+ f[E] = !0;
4202
+ const P = L.replace(
4203
+ /{{([^}]+)}}/g,
4204
+ (I, B) => String(
4205
+ J({
4206
+ code: B,
4207
+ context: e.context || {},
4208
+ localState: void 0,
4209
+ rootState: e.builderContextSignal.rootState,
4210
+ rootSetState: e.builderContextSignal.rootSetState
4211
+ })
4212
+ )
4213
+ ), D = O ? {
4214
+ url: P,
4215
+ method: N.request.method,
4216
+ headers: N.request.headers,
4217
+ body: N.request.body
4218
+ } : {
4219
+ url: P,
4220
+ method: "GET"
4221
+ };
4222
+ Fe(JSON.stringify(D)), fetch(D.url, {
4223
+ method: D.method,
4224
+ headers: D.headers,
4225
+ body: D.body
4226
+ }).then((I) => I.json()).then((I) => {
4227
+ n({
4228
+ [E]: I
4229
+ }), c[E] = !0;
4230
+ }).catch((I) => {
4231
+ console.error(
4232
+ "error fetching dynamic data",
4233
+ JSON.stringify(N),
4234
+ I
4235
+ );
4236
+ }).finally(() => {
4237
+ f[E] = !1;
4238
+ });
4239
+ }
4240
+ );
4219
4241
  }
4220
4242
  function p() {
4221
- O() && window.dispatchEvent(
4243
+ _() && window.dispatchEvent(
4222
4244
  new CustomEvent(
4223
4245
  "builder:component:stateChange",
4224
4246
  {
@@ -4234,9 +4256,9 @@ function Pi(e) {
4234
4256
  }
4235
4257
  const y = H(!1);
4236
4258
  return y.current || (h(), p(), y.current = !0), V(() => {
4237
- var T, I, g, x, w;
4259
+ var T, w, g, x, E;
4238
4260
  if (K()) {
4239
- O() && !e.isNestedRender && (window.addEventListener("message", l), lt({
4261
+ _() && !e.isNestedRender && (window.addEventListener("message", l), lt({
4240
4262
  ...e.locale ? {
4241
4263
  locale: e.locale
4242
4264
  } : {},
@@ -4251,45 +4273,45 @@ function Pi(e) {
4251
4273
  }), Object.values(
4252
4274
  e.builderContextSignal.componentInfos
4253
4275
  ).forEach((P) => {
4254
- var U, E;
4255
- if (!((U = P.models) != null && U.length) || P.models.includes(e.model)) {
4276
+ var D, I;
4277
+ if (!((D = P.models) != null && D.length) || P.models.includes(e.model)) {
4256
4278
  const B = st(P);
4257
- (E = window.parent) == null || E.postMessage(B, "*");
4279
+ (I = window.parent) == null || I.postMessage(B, "*");
4258
4280
  }
4259
4281
  }), window.addEventListener(
4260
4282
  "builder:component:stateChangeListenerActivated",
4261
4283
  p
4262
4284
  ));
4263
- const D = e.builderContextSignal.content && X(e.canTrack), L = ct({
4264
- name: `builder.tests.${(I = e.builderContextSignal.content) == null ? void 0 : I.id}`,
4285
+ const N = e.builderContextSignal.content && X(e.canTrack), O = ct({
4286
+ name: `builder.tests.${(w = e.builderContextSignal.content) == null ? void 0 : w.id}`,
4265
4287
  canTrack: !0
4266
- }), W = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId;
4267
- if (D && W === L) {
4268
- const P = (x = e.builderContextSignal.content) == null ? void 0 : x.id, U = e.apiKey;
4288
+ }), L = (g = e.builderContextSignal.content) == null ? void 0 : g.testVariationId;
4289
+ if (N && L === O) {
4290
+ const P = (x = e.builderContextSignal.content) == null ? void 0 : x.id, D = e.apiKey;
4269
4291
  Te({
4270
4292
  apiHost: e.apiHost,
4271
4293
  type: "impression",
4272
4294
  canTrack: !0,
4273
4295
  contentId: P,
4274
- apiKey: U,
4275
- variationId: L !== P ? L : void 0
4296
+ apiKey: D,
4297
+ variationId: O !== P ? O : void 0
4276
4298
  });
4277
4299
  }
4278
- if (le() && !O()) {
4279
- const P = new URL(location.href).searchParams, U = P.get("builder.preview"), E = P.get(
4280
- `builder.overrides.${U}`
4300
+ if (le() && !_()) {
4301
+ const P = new URL(location.href).searchParams, D = P.get("builder.preview"), I = P.get(
4302
+ `builder.overrides.${D}`
4281
4303
  ), B = P.get("apiKey") || P.get("builder.space");
4282
- (U === "BUILDER_STUDIO" || U === e.model && B === e.apiKey && (!e.content || E === e.content.id)) && Le({
4304
+ (D === "BUILDER_STUDIO" || D === e.model && B === e.apiKey && (!e.content || I === e.content.id)) && Oe({
4283
4305
  model: e.model,
4284
4306
  apiKey: e.apiKey,
4285
4307
  apiVersion: e.builderContextSignal.apiVersion,
4286
- ...U === "BUILDER_STUDIO" && ((w = e.context) != null && w.symbolId) ? {
4308
+ ...D === "BUILDER_STUDIO" && ((E = e.context) != null && E.symbolId) ? {
4287
4309
  query: {
4288
4310
  id: e.context.symbolId
4289
4311
  }
4290
4312
  } : {}
4291
- }).then((N) => {
4292
- N && i(N);
4313
+ }).then(($) => {
4314
+ $ && i($);
4293
4315
  });
4294
4316
  }
4295
4317
  }
@@ -4464,7 +4486,7 @@ function De(e) {
4464
4486
  value: {
4465
4487
  registeredComponents: r
4466
4488
  },
4467
- children: /* @__PURE__ */ $(
4489
+ children: /* @__PURE__ */ W(
4468
4490
  Pi,
4469
4491
  {
4470
4492
  apiHost: e.apiHost,
@@ -4504,7 +4526,7 @@ function De(e) {
4504
4526
  }
4505
4527
  ),
4506
4528
  /* @__PURE__ */ s(
4507
- _,
4529
+ U,
4508
4530
  {
4509
4531
  blocks: (y = (p = a.content) == null ? void 0 : p.data) == null ? void 0 : y.blocks,
4510
4532
  context: a,
@@ -4550,8 +4572,8 @@ function Ni(e) {
4550
4572
  });
4551
4573
  }
4552
4574
  return V(() => {
4553
- }, []), /* @__PURE__ */ $(R, { children: [
4554
- !e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */ $(R, { children: [
4575
+ }, []), /* @__PURE__ */ W(R, { children: [
4576
+ !e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */ W(R, { children: [
4555
4577
  /* @__PURE__ */ s(
4556
4578
  q,
4557
4579
  {
@@ -4569,7 +4591,7 @@ function Ni(e) {
4569
4591
  }
4570
4592
  ) : null
4571
4593
  ] }) : null,
4572
- t ? /* @__PURE__ */ $(R, { children: [
4594
+ t ? /* @__PURE__ */ W(R, { children: [
4573
4595
  /* @__PURE__ */ s(
4574
4596
  ee,
4575
4597
  {
@@ -4648,7 +4670,7 @@ const $i = async ({
4648
4670
  }) => {
4649
4671
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
4650
4672
  (e != null && e.apiKey))
4651
- return Le({
4673
+ return Oe({
4652
4674
  model: t.model,
4653
4675
  apiKey: e.apiKey,
4654
4676
  apiVersion: e.apiVersion,
@@ -4725,7 +4747,7 @@ function Wi(e) {
4725
4747
  ) });
4726
4748
  }
4727
4749
  export {
4728
- _ as Blocks,
4750
+ U as Blocks,
4729
4751
  ve as BuilderContext,
4730
4752
  St as Button,
4731
4753
  cn as Columns,