@builder.io/sdk-react 4.2.1 → 4.2.3

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 (90) hide show
  1. package/lib/browser/blocks-exports.cjs +37 -37
  2. package/lib/browser/blocks-exports.mjs +1238 -1168
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/server-entry-0817de95.cjs +2 -0
  6. package/lib/browser/{server-entry-5e98a993.js → server-entry-331e2fd4.js} +248 -246
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-4bab42b1.cjs → accordion-1559ca68.cjs} +1 -1
  10. package/lib/edge/{accordion-a8a363e4.js → accordion-3e9ee224.js} +1 -1
  11. package/lib/edge/{blocks-d07d0261.cjs → blocks-4f20c19a.cjs} +14 -14
  12. package/lib/edge/{blocks-e1f5b0d0.js → blocks-b9be7dc1.js} +749 -736
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-6734c0bb.cjs → button-0a632d4f.cjs} +1 -1
  16. package/lib/edge/{button-bbcadacf.js → button-ba852235.js} +2 -2
  17. package/lib/edge/{columns-821cba14.cjs → columns-66170ac9.cjs} +1 -1
  18. package/lib/edge/{columns-cf3081c6.js → columns-ee2fba7b.js} +3 -3
  19. package/lib/edge/content-variants-4f54d98a.cjs +302 -0
  20. package/lib/edge/{content-variants-a704e35c.js → content-variants-c013569a.js} +489 -444
  21. package/lib/edge/{custom-code-f6c30129.js → custom-code-38e2c9d5.js} +1 -1
  22. package/lib/edge/{custom-code-8fcaa31e.cjs → custom-code-48579935.cjs} +1 -1
  23. package/lib/edge/{embed-3c0b5564.js → embed-1ce0435c.js} +1 -1
  24. package/lib/edge/{embed-666d3cc4.cjs → embed-9a7f29ff.cjs} +1 -1
  25. package/lib/edge/form-d9b6dea6.cjs +1 -0
  26. package/lib/edge/{form-8b068721.js → form-f558f5d4.js} +24 -21
  27. package/lib/edge/{get-class-prop-name-d6d821d6.js → get-class-prop-name-35ccd32a.js} +1 -1
  28. package/lib/edge/{get-class-prop-name-2869a960.cjs → get-class-prop-name-d2be9a48.cjs} +1 -1
  29. package/lib/edge/image-cce92f6c.cjs +17 -0
  30. package/lib/edge/image-d87761af.js +123 -0
  31. package/lib/edge/img-a1e0f10e.js +33 -0
  32. package/lib/edge/img-b21eb075.cjs +1 -0
  33. package/lib/edge/index.cjs +1 -1
  34. package/lib/edge/index.mjs +1 -1
  35. package/lib/edge/{input-665ef328.js → input-5c0d3350.js} +1 -1
  36. package/lib/edge/{input-d31d6451.cjs → input-6854bc85.cjs} +1 -1
  37. package/lib/edge/{personalization-container-e784836e.js → personalization-container-adf9e0bd.js} +4 -4
  38. package/lib/edge/{personalization-container-d12566e8.cjs → personalization-container-f7fdc090.cjs} +1 -1
  39. package/lib/edge/{select-c3085265.cjs → select-6c4637ae.cjs} +1 -1
  40. package/lib/edge/{select-5fe49bd4.js → select-713e73f6.js} +1 -1
  41. package/lib/edge/server-entry-0bef3cb1.cjs +2 -0
  42. package/lib/{node/server-entry-48724189.js → edge/server-entry-71badd34.js} +307 -307
  43. package/lib/edge/server-entry.cjs +1 -1
  44. package/lib/edge/server-entry.mjs +1 -1
  45. package/lib/edge/{slot-cbbbb02e.cjs → slot-59a86f46.cjs} +1 -1
  46. package/lib/edge/{slot-a17ee2d7.js → slot-a3c27352.js} +3 -3
  47. package/lib/edge/symbol-3d81a9de.cjs +1 -0
  48. package/lib/edge/{symbol-9f960685.js → symbol-86e5a3f0.js} +26 -23
  49. package/lib/edge/tabs-0d914e5c.cjs +1 -0
  50. package/lib/edge/{tabs-26ac5b2f.js → tabs-60f8bb61.js} +24 -23
  51. package/lib/node/blocks-exports.cjs +38 -38
  52. package/lib/node/blocks-exports.mjs +1375 -1305
  53. package/lib/node/index.cjs +1 -1
  54. package/lib/node/index.mjs +3 -3
  55. package/lib/node/init.cjs +1 -1
  56. package/lib/node/init.mjs +3 -3
  57. package/lib/node/server-entry-05b0f263.cjs +2 -0
  58. package/lib/{edge/server-entry-c9d5300f.js → node/server-entry-68823bb0.js} +346 -342
  59. package/lib/node/server-entry.cjs +1 -1
  60. package/lib/node/server-entry.mjs +1 -1
  61. package/lib/node/{setIvm-a7aba6d2.js → setIvm-bb3d0e32.js} +1 -1
  62. package/lib/node/{setIvm-3b6199a0.cjs → setIvm-bec8f1ed.cjs} +1 -1
  63. package/lib/node/setIvm.cjs +1 -1
  64. package/lib/node/setIvm.mjs +2 -2
  65. package/lib/node/{should-force-browser-runtime-in-node-fdc70f22.js → should-force-browser-runtime-in-node-a4c71d14.js} +1 -1
  66. package/lib/node/{should-force-browser-runtime-in-node-cbe0ef14.cjs → should-force-browser-runtime-in-node-bbbdf124.cjs} +1 -1
  67. package/package.json +1 -1
  68. package/types/blocks/img/img.d.ts +2 -0
  69. package/types/blocks/symbol/symbol.types.d.ts +1 -2
  70. package/types/components/awaiter.d.ts +1 -11
  71. package/types/components/awaiter.types.d.ts +7 -0
  72. package/types/components/block/components/live-edit-block-styles.d.ts +8 -0
  73. package/types/components/block/components/style-wrapper.d.ts +9 -0
  74. package/types/components/live-edit.d.ts +9 -0
  75. package/types/constants/sdk-version.d.ts +1 -1
  76. package/types/helpers/find-block.d.ts +18 -0
  77. package/types/helpers/subscribe-to-editor.d.ts +3 -2
  78. package/lib/browser/server-entry-4cf669a1.cjs +0 -2
  79. package/lib/edge/content-variants-ec180883.cjs +0 -302
  80. package/lib/edge/form-51f639ab.cjs +0 -1
  81. package/lib/edge/image-209835f4.js +0 -94
  82. package/lib/edge/image-87a4e006.cjs +0 -17
  83. package/lib/edge/image.helpers-3e926d47.js +0 -33
  84. package/lib/edge/image.helpers-dba8a869.cjs +0 -1
  85. package/lib/edge/img-b04b9b6d.cjs +0 -1
  86. package/lib/edge/img-dfbd4080.js +0 -28
  87. package/lib/edge/server-entry-acf5ce7d.cjs +0 -2
  88. package/lib/edge/symbol-b56b5675.cjs +0 -1
  89. package/lib/edge/tabs-bf6643d7.cjs +0 -1
  90. package/lib/node/server-entry-562c0663.cjs +0 -2
@@ -1,66 +1,66 @@
1
- import { jsx as T, jsxs as B, Fragment as j } from "react/jsx-runtime";
2
- import { lazy as C, useRef as Q, useState as R, useEffect as W } from "react";
3
- import { TARGET as F, isBrowser as U, isEditing as N, isPreviewing as oe, setupBrowserForEditing as ge, createRegisterComponentMessage as he, getDefaultCanTrack as O, getCookieSync as be, _track as X, fetchOneEntry as ye, createEditorListener as ve, logFetch as xe, serializeIncludingFunctions as Z, logger as Se, handleABTestingSync as Te } from "./server-entry-c9d5300f.js";
4
- import { Video as Ie, Button as ke, Columns as Ce, Fragment as we, Image as Ve, Section as Ee, Symbol as Re, Text as Ae, BuilderContext as De } from "./blocks-exports.mjs";
5
- import { triggerAnimation as Fe, evaluate as re, fastClone as Pe, InlinedStyles as se, ComponentsContext as We, Blocks as Ne } from "./blocks-e1f5b0d0.js";
6
- function Gt(e, t, n, o) {
7
- function r(f) {
8
- return typeof f == "string";
1
+ import { jsx as S, jsxs as H, Fragment as M } from "react/jsx-runtime";
2
+ import { lazy as C, useRef as Y, useState as k, useEffect as N } from "react";
3
+ import { TARGET as F, isBrowser as L, isEditing as _, isPreviewing as ue, setupBrowserForEditing as ve, createRegisterComponentMessage as xe, getDefaultCanTrack as j, getCookieSync as Se, _track as ne, fetchOneEntry as Te, createEditorListener as Ie, logFetch as ke, serializeIncludingFunctions as ae, logger as Ce, handleABTestingSync as we } from "./server-entry-71badd34.js";
4
+ import { Video as Ve, Button as Ee, Columns as Re, Fragment as Ae, Image as De, Section as Pe, Symbol as Fe, Text as We, BuilderContext as Ne } from "./blocks-exports.mjs";
5
+ import { triggerAnimation as $e, evaluate as de, fastClone as _e, InlinedStyles as ce, ComponentsContext as Le, Blocks as Be } from "./blocks-b9be7dc1.js";
6
+ function tn(e, t, n, o) {
7
+ function r(m) {
8
+ return typeof m == "string";
9
9
  }
10
- function s(f) {
11
- return typeof f == "number";
10
+ function l(m) {
11
+ return typeof m == "number";
12
12
  }
13
- function i(f, m) {
13
+ function a(m, g) {
14
14
  return (() => {
15
- const I = m.property, E = m.operator;
16
- let d = m.value;
17
- if (m && m.property === "urlPath" && m.value && typeof m.value == "string" && m.value !== "/" && m.value.endsWith("/") && (d = m.value.slice(0, -1)), !(I && E))
15
+ const T = g.property, A = g.operator;
16
+ let s = g.value;
17
+ if (g && g.property === "urlPath" && g.value && typeof g.value == "string" && g.value !== "/" && g.value.endsWith("/") && (s = g.value.slice(0, -1)), !(T && A))
18
18
  return !0;
19
- if (Array.isArray(d))
20
- return E === "isNot" ? d.every((w) => i(f, {
21
- property: I,
22
- operator: E,
23
- value: w
24
- })) : !!d.find((w) => i(f, {
25
- property: I,
26
- operator: E,
27
- value: w
19
+ if (Array.isArray(s))
20
+ return A === "isNot" ? s.every((D) => a(m, {
21
+ property: T,
22
+ operator: A,
23
+ value: D
24
+ })) : !!s.find((D) => a(m, {
25
+ property: T,
26
+ operator: A,
27
+ value: D
28
28
  }));
29
- const u = f[I];
30
- if (Array.isArray(u))
31
- return u.includes(d);
32
- switch (E) {
29
+ const d = m[T];
30
+ if (Array.isArray(d))
31
+ return d.includes(s);
32
+ switch (A) {
33
33
  case "is":
34
- return u === d;
34
+ return d === s;
35
35
  case "isNot":
36
- return u !== d;
36
+ return d !== s;
37
37
  case "contains":
38
- return (r(u) || Array.isArray(u)) && u.includes(String(d));
38
+ return (r(d) || Array.isArray(d)) && d.includes(String(s));
39
39
  case "startsWith":
40
- return r(u) && u.startsWith(String(d));
40
+ return r(d) && d.startsWith(String(s));
41
41
  case "endsWith":
42
- return r(u) && u.endsWith(String(d));
42
+ return r(d) && d.endsWith(String(s));
43
43
  case "greaterThan":
44
- return s(u) && s(d) && u > d;
44
+ return l(d) && l(s) && d > s;
45
45
  case "lessThan":
46
- return s(u) && s(d) && u < d;
46
+ return l(d) && l(s) && d < s;
47
47
  case "greaterThanOrEqualTo":
48
- return s(u) && s(d) && u >= d;
48
+ return l(d) && l(s) && d >= s;
49
49
  case "lessThanOrEqualTo":
50
- return s(u) && s(d) && u <= d;
50
+ return l(d) && l(s) && d <= s;
51
51
  default:
52
52
  return !1;
53
53
  }
54
54
  })();
55
55
  }
56
- const a = {
56
+ const i = {
57
57
  query: t,
58
58
  startDate: n,
59
59
  endDate: o
60
- }, l = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
61
- return a.startDate && new Date(a.startDate) > l || a.endDate && new Date(a.endDate) < l ? !1 : !a.query || !a.query.length ? !0 : a.query.every((f) => i(e, f));
60
+ }, u = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
61
+ return i.startDate && new Date(i.startDate) > u || i.endDate && new Date(i.endDate) < u ? !1 : !i.query || !i.query.length ? !0 : i.query.every((m) => a(e, m));
62
62
  }
63
- const $e = `function getPersonalizedVariant(variants, blockId, isHydrationTarget, locale) {
63
+ const Ue = `function getPersonalizedVariant(variants, blockId, isHydrationTarget, locale) {
64
64
  if (!navigator.cookieEnabled) {
65
65
  return;
66
66
  }
@@ -105,7 +105,7 @@ const $e = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
105
105
  thisScript.remove();
106
106
  }
107
107
  }
108
- }`, _e = `function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
108
+ }`, He = `function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
109
109
  function isString(val) {
110
110
  return typeof val === 'string';
111
111
  }
@@ -183,7 +183,7 @@ const $e = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
183
183
  return item.query.every(filter => {
184
184
  return objectMatchesQuery(userAttributes, filter);
185
185
  });
186
- }`, Le = `function updateVisibilityStylesScript(variants, blockId, isHydrationTarget, locale) {
186
+ }`, Oe = `function updateVisibilityStylesScript(variants, blockId, isHydrationTarget, locale) {
187
187
  function getCookie(name) {
188
188
  const nameEQ = name + '=';
189
189
  const ca = document.cookie.split(';');
@@ -221,54 +221,54 @@ const $e = `function getPersonalizedVariant(variants, blockId, isHydrationTarget
221
221
  visibilityStylesEl.innerHTML = newStyleStr;
222
222
  }
223
223
  }
224
- }`, Ue = "default", Be = "filterWithCustomTargeting", le = "builderIoPersonalization", ue = "updateVisibilityStylesScript", de = ["react", "vue", "svelte", "qwik"], He = ["vue", "svelte", "qwik"];
225
- function Xt(e, t) {
226
- return !(e && e.length > 0) || !t ? !1 : He.includes(F) ? !0 : !U();
224
+ }`, qe = "default", je = "filterWithCustomTargeting", me = "builderIoPersonalization", pe = "updateVisibilityStylesScript", fe = ["react", "vue", "svelte", "qwik"], Me = ["vue", "svelte", "qwik"];
225
+ function nn(e, t) {
226
+ return !(e && e.length > 0) || !t ? !1 : Me.includes(F) ? !0 : !L();
227
227
  }
228
- function Zt({
228
+ function an({
229
229
  variants: e,
230
230
  previewingIndex: t,
231
231
  isHydrated: n,
232
232
  filteredVariants: o,
233
233
  fallbackBlocks: r
234
234
  }) {
235
- var i;
236
- const s = {
235
+ var a;
236
+ const l = {
237
237
  blocks: r != null ? r : [],
238
238
  path: "this.children",
239
- index: Ue
239
+ index: qe
240
240
  };
241
- if (n && N()) {
242
- if (typeof t == "number" && t < ((i = e == null ? void 0 : e.length) != null ? i : 0)) {
243
- const a = e == null ? void 0 : e[t];
244
- if (a)
241
+ if (n && _()) {
242
+ if (typeof t == "number" && t < ((a = e == null ? void 0 : e.length) != null ? a : 0)) {
243
+ const i = e == null ? void 0 : e[t];
244
+ if (i)
245
245
  return {
246
- blocks: a.blocks,
246
+ blocks: i.blocks,
247
247
  path: `variants.${t}.blocks`,
248
248
  index: t
249
249
  };
250
250
  }
251
- return s;
251
+ return l;
252
252
  }
253
- if (U()) {
254
- const a = o == null ? void 0 : o[0];
255
- if (a && e) {
256
- const l = e.indexOf(a);
257
- if (l !== -1)
253
+ if (L()) {
254
+ const i = o == null ? void 0 : o[0];
255
+ if (i && e) {
256
+ const u = e.indexOf(i);
257
+ if (u !== -1)
258
258
  return {
259
- blocks: a.blocks,
260
- path: `variants.${l}.blocks`,
261
- index: l
259
+ blocks: i.blocks,
260
+ path: `variants.${u}.blocks`,
261
+ index: u
262
262
  };
263
263
  }
264
264
  }
265
- return s;
265
+ return l;
266
266
  }
267
- const qe = () => `
268
- window.${Be} = ${_e}
269
- window.${le} = ${$e}
270
- window.${ue} = ${Le}
271
- `, ce = F === "react", en = (e, t, n) => `window.${le}(${JSON.stringify(e)}, "${t}", ${ce}${n ? `, "${n}"` : ""})`, tn = (e, t, n) => `window.${ue}(${JSON.stringify(e)}, "${t}", ${ce}${n ? `, "${n}"` : ""})`, M = {
267
+ const Ke = () => `
268
+ window.${je} = ${He}
269
+ window.${me} = ${Ue}
270
+ window.${pe} = ${Oe}
271
+ `, ge = F === "react", on = (e, t, n) => `window.${me}(${JSON.stringify(e)}, "${t}", ${ge}${n ? `, "${n}"` : ""})`, rn = (e, t, n) => `window.${pe}(${JSON.stringify(e)}, "${t}", ${ge}${n ? `, "${n}"` : ""})`, K = {
272
272
  "@type": "@builder.io/sdk:Element",
273
273
  layerName: "Accordion item title",
274
274
  responsiveStyles: {
@@ -297,7 +297,7 @@ const qe = () => `
297
297
  }
298
298
  }
299
299
  }]
300
- }, K = {
300
+ }, z = {
301
301
  "@type": "@builder.io/sdk:Element",
302
302
  layerName: "Accordion item detail",
303
303
  responsiveStyles: {
@@ -328,7 +328,7 @@ const qe = () => `
328
328
  }
329
329
  }
330
330
  }]
331
- }, Oe = {
331
+ }, ze = {
332
332
  name: "Builder:Accordion",
333
333
  canHaveChildren: !0,
334
334
  image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
@@ -345,19 +345,19 @@ const qe = () => `
345
345
  name: "title",
346
346
  type: "uiBlocks",
347
347
  hideFromUI: !0,
348
- defaultValue: [M]
348
+ defaultValue: [K]
349
349
  }, {
350
350
  name: "detail",
351
351
  type: "uiBlocks",
352
352
  hideFromUI: !0,
353
- defaultValue: [K]
353
+ defaultValue: [z]
354
354
  }],
355
355
  defaultValue: [{
356
- title: [M],
357
- detail: [K]
356
+ title: [K],
357
+ detail: [z]
358
358
  }, {
359
- title: [M],
360
- detail: [K]
359
+ title: [K],
360
+ detail: [z]
361
361
  }],
362
362
  showIf: (e) => !e.get("useChildrenForItems")
363
363
  }, {
@@ -392,7 +392,7 @@ const qe = () => `
392
392
  builderComponents: !0,
393
393
  builderLinkComponent: !0
394
394
  }
395
- }, je = C(() => import("./accordion-a8a363e4.js")), Me = {
395
+ }, Je = C(() => import("./accordion-3e9ee224.js")), Qe = {
396
396
  name: "Core:Button",
397
397
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
398
398
  defaultStyles: {
@@ -428,7 +428,7 @@ const qe = () => `
428
428
  shouldReceiveBuilderProps: {
429
429
  builderLinkComponent: !0
430
430
  }
431
- }, Ke = {
431
+ }, Ye = {
432
432
  // TODO: ways to statically preprocess JSON for references, functions, etc
433
433
  name: "Columns",
434
434
  isRSC: !0,
@@ -607,7 +607,7 @@ const qe = () => `
607
607
  });
608
608
  }
609
609
  const n = e.get("columns");
610
- Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((s) => !s.get("width")) || n.reduce((a, l) => a + l.get("width"), 0) !== 100) && t();
610
+ Array.isArray(n) && n.find((r) => r.get("width")) && (n.find((l) => !l.get("width")) || n.reduce((i, u) => i + u.get("width"), 0) !== 100) && t();
611
611
  }
612
612
  }, {
613
613
  name: "space",
@@ -635,13 +635,13 @@ const qe = () => `
635
635
  builderComponents: !0,
636
636
  builderLinkComponent: !0
637
637
  }
638
- }, ze = {
638
+ }, Ge = {
639
639
  name: "Fragment",
640
640
  static: !0,
641
641
  hidden: !0,
642
642
  canHaveChildren: !0,
643
643
  noWrap: !0
644
- }, Y = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], Je = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Qe = {
644
+ }, G = ["jpeg", "jpg", "png", "svg", "webp", "gif", "jfif", "pjpeg", "pjp", "apng", "avif", "tif", "tiff", "heif", "bmp", "eps", "raw", "cr2", "nef", "orf", "sr2", "psd", "heic", "dib", "ai"], Xe = ["mp4", "webm", "mkv", "flv", "vob", "ogv", "ogg", "drc", "gif", "gifv", "mng", "avi", "mov", "qt", "mts", "m2ts", "ts", "wmv", "yuv", "rm", "rmvb", "viv", "asf", "amv", "m4p", "mpeg", "mpe", "m2v", "m4v", "svi", "3gp", "3g2", "mxf", "roq", "nsv", "f4v", "f4p", "f4a", "f4b"], Ze = {
645
645
  name: "Image",
646
646
  static: !0,
647
647
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -656,34 +656,34 @@ const qe = () => `
656
656
  name: "image",
657
657
  type: "file",
658
658
  bubble: !0,
659
- allowedFileTypes: Y,
659
+ allowedFileTypes: G,
660
660
  required: !0,
661
661
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
662
662
  onChange: (e) => {
663
663
  e.delete("srcset"), e.delete("noWebp");
664
- function n(i, a = 6e4) {
665
- return new Promise((l, f) => {
666
- const m = document.createElement("img");
667
- let P = !1;
668
- m.onload = () => {
669
- P = !0, l(m);
670
- }, m.addEventListener("error", (I) => {
671
- console.warn("Image load failed", I.error), f(I.error);
672
- }), m.src = i, setTimeout(() => {
673
- P || f(new Error("Image load timed out"));
674
- }, a);
664
+ function n(a, i = 6e4) {
665
+ return new Promise((u, m) => {
666
+ const g = document.createElement("img");
667
+ let R = !1;
668
+ g.onload = () => {
669
+ R = !0, u(g);
670
+ }, g.addEventListener("error", (T) => {
671
+ console.warn("Image load failed", T.error), m(T.error);
672
+ }), g.src = a, setTimeout(() => {
673
+ R || m(new Error("Image load timed out"));
674
+ }, i);
675
675
  });
676
676
  }
677
- function o(i) {
678
- return Math.round(i * 1e3) / 1e3;
677
+ function o(a) {
678
+ return Math.round(a * 1e3) / 1e3;
679
679
  }
680
- const r = e.get("image"), s = e.get("aspectRatio");
681
- if (fetch(r).then((i) => i.blob()).then((i) => {
682
- i.type.includes("svg") && e.set("noWebp", !0);
683
- }), r && (!s || s === 0.7041))
684
- return n(r).then((i) => {
685
- const a = e.get("aspectRatio");
686
- e.get("image") === r && (!a || a === 0.7041) && i.width && i.height && (e.set("aspectRatio", o(i.height / i.width)), e.set("height", i.height), e.set("width", i.width));
680
+ const r = e.get("image"), l = e.get("aspectRatio");
681
+ if (fetch(r).then((a) => a.blob()).then((a) => {
682
+ a.type.includes("svg") && e.set("noWebp", !0);
683
+ }), r && (!l || l === 0.7041))
684
+ return n(r).then((a) => {
685
+ const i = e.get("aspectRatio");
686
+ e.get("image") === r && (!i || i === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
687
687
  });
688
688
  }
689
689
  }, {
@@ -753,7 +753,7 @@ const qe = () => `
753
753
  shouldReceiveBuilderProps: {
754
754
  builderBlock: !0
755
755
  }
756
- }, Ye = {
756
+ }, et = {
757
757
  name: "PersonalizationContainer",
758
758
  shouldReceiveBuilderProps: {
759
759
  builderBlock: !0,
@@ -789,7 +789,7 @@ const qe = () => `
789
789
  defaultValue: []
790
790
  }]
791
791
  }]
792
- }, Ge = C(() => import("./personalization-container-e784836e.js")), Xe = {
792
+ }, tt = C(() => import("./personalization-container-adf9e0bd.js")), nt = {
793
793
  name: "Core:Section",
794
794
  static: !0,
795
795
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -828,7 +828,7 @@ const qe = () => `
828
828
  }
829
829
  }
830
830
  }]
831
- }, Ze = {
831
+ }, at = {
832
832
  name: "Slot",
833
833
  isRSC: !0,
834
834
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -845,7 +845,7 @@ const qe = () => `
845
845
  builderContext: !0,
846
846
  builderComponents: !0
847
847
  }
848
- }, et = C(() => import("./slot-a17ee2d7.js")), tt = {
848
+ }, it = C(() => import("./slot-a3c27352.js")), ot = {
849
849
  name: "Symbol",
850
850
  noWrap: !0,
851
851
  static: !0,
@@ -884,7 +884,7 @@ const qe = () => `
884
884
  builderComponents: !0,
885
885
  builderLinkComponent: !0
886
886
  }
887
- }, z = {
887
+ }, J = {
888
888
  "@type": "@builder.io/sdk:Element",
889
889
  responsiveStyles: {
890
890
  large: {
@@ -906,7 +906,7 @@ const qe = () => `
906
906
  text: "New tab"
907
907
  }
908
908
  }
909
- }, J = {
909
+ }, Q = {
910
910
  "@type": "@builder.io/sdk:Element",
911
911
  responsiveStyles: {
912
912
  large: {
@@ -922,7 +922,7 @@ const qe = () => `
922
922
  text: "New tab content "
923
923
  }
924
924
  }
925
- }, nt = {
925
+ }, rt = {
926
926
  name: "Builder: Tabs",
927
927
  inputs: [{
928
928
  name: "tabs",
@@ -932,16 +932,16 @@ const qe = () => `
932
932
  name: "label",
933
933
  type: "uiBlocks",
934
934
  hideFromUI: !0,
935
- defaultValue: [z]
935
+ defaultValue: [J]
936
936
  }, {
937
937
  name: "content",
938
938
  type: "uiBlocks",
939
939
  hideFromUI: !0,
940
- defaultValue: [J]
940
+ defaultValue: [Q]
941
941
  }],
942
942
  defaultValue: [{
943
943
  label: [{
944
- ...z,
944
+ ...J,
945
945
  component: {
946
946
  name: "Text",
947
947
  options: {
@@ -950,7 +950,7 @@ const qe = () => `
950
950
  }
951
951
  }],
952
952
  content: [{
953
- ...J,
953
+ ...Q,
954
954
  component: {
955
955
  name: "Text",
956
956
  options: {
@@ -960,7 +960,7 @@ const qe = () => `
960
960
  }]
961
961
  }, {
962
962
  label: [{
963
- ...z,
963
+ ...J,
964
964
  component: {
965
965
  name: "Text",
966
966
  options: {
@@ -969,7 +969,7 @@ const qe = () => `
969
969
  }
970
970
  }],
971
971
  content: [{
972
- ...J,
972
+ ...Q,
973
973
  component: {
974
974
  name: "Text",
975
975
  options: {
@@ -1025,11 +1025,10 @@ const qe = () => `
1025
1025
  builderComponents: !0,
1026
1026
  builderLinkComponent: !0
1027
1027
  }
1028
- }, at = C(() => import("./tabs-26ac5b2f.js")), it = {
1028
+ }, lt = C(() => import("./tabs-60f8bb61.js")), st = {
1029
1029
  shouldReceiveBuilderProps: {},
1030
1030
  name: "Text",
1031
1031
  static: !0,
1032
- isRSC: !0,
1033
1032
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
1034
1033
  inputs: [{
1035
1034
  name: "text",
@@ -1044,7 +1043,7 @@ const qe = () => `
1044
1043
  height: "auto",
1045
1044
  textAlign: "center"
1046
1045
  }
1047
- }, ot = {
1046
+ }, ut = {
1048
1047
  name: "Custom Code",
1049
1048
  static: !0,
1050
1049
  requiredPermissions: ["editCode"],
@@ -1066,7 +1065,7 @@ const qe = () => `
1066
1065
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1067
1066
  advanced: !0
1068
1067
  }]
1069
- }, rt = C(() => import("./custom-code-f6c30129.js")), st = {
1068
+ }, dt = C(() => import("./custom-code-38e2c9d5.js")), ct = {
1070
1069
  name: "Embed",
1071
1070
  static: !0,
1072
1071
  inputs: [{
@@ -1081,7 +1080,7 @@ const qe = () => `
1081
1080
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1082
1081
  hideFromUI: !0
1083
1082
  }]
1084
- }, lt = C(() => import("./embed-3c0b5564.js")), ut = {
1083
+ }, mt = C(() => import("./embed-1ce0435c.js")), pt = {
1085
1084
  name: "Form:Form",
1086
1085
  // editableTags: ['builder-form-error']
1087
1086
  defaults: {
@@ -1318,7 +1317,7 @@ const qe = () => `
1318
1317
  builderComponents: !0,
1319
1318
  builderLinkComponent: !0
1320
1319
  }
1321
- }, dt = C(() => import("./form-8b068721.js")), ct = {
1320
+ }, ft = C(() => import("./form-f558f5d4.js")), gt = {
1322
1321
  name: "Form:Input",
1323
1322
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
1324
1323
  inputs: [
@@ -1369,7 +1368,7 @@ const qe = () => `
1369
1368
  borderStyle: "solid",
1370
1369
  borderColor: "#ccc"
1371
1370
  }
1372
- }, mt = C(() => import("./input-665ef328.js")), pt = {
1371
+ }, ht = C(() => import("./input-5c0d3350.js")), bt = {
1373
1372
  name: "Form:Select",
1374
1373
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
1375
1374
  defaultStyles: {
@@ -1411,7 +1410,7 @@ const qe = () => `
1411
1410
  }],
1412
1411
  static: !0,
1413
1412
  noWrap: !0
1414
- }, ft = C(() => import("./select-5fe49bd4.js")), gt = {
1413
+ }, yt = C(() => import("./select-713e73f6.js")), vt = {
1415
1414
  name: "Form:SubmitButton",
1416
1415
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
1417
1416
  defaultStyles: {
@@ -1436,7 +1435,7 @@ const qe = () => `
1436
1435
  // that only shows if advanced setting is flipped
1437
1436
  // TODO: defaultChildren
1438
1437
  // canHaveChildren: true,
1439
- }, ht = C(() => import("./submit-button-b48361a7.js")), bt = {
1438
+ }, xt = C(() => import("./submit-button-b48361a7.js")), St = {
1440
1439
  name: "Form:TextArea",
1441
1440
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
1442
1441
  inputs: [{
@@ -1472,8 +1471,7 @@ const qe = () => `
1472
1471
  },
1473
1472
  static: !0,
1474
1473
  noWrap: !0
1475
- }, yt = C(() => import("./textarea-d29025e9.js")), vt = {
1476
- // friendlyName?
1474
+ }, Tt = C(() => import("./textarea-d29025e9.js")), It = {
1477
1475
  name: "Raw:Img",
1478
1476
  hideFromInsertMenu: !0,
1479
1477
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -1481,12 +1479,43 @@ const qe = () => `
1481
1479
  name: "image",
1482
1480
  bubble: !0,
1483
1481
  type: "file",
1484
- allowedFileTypes: Y,
1482
+ allowedFileTypes: G,
1485
1483
  required: !0
1484
+ }, {
1485
+ name: "backgroundSize",
1486
+ type: "text",
1487
+ defaultValue: "cover",
1488
+ enum: [{
1489
+ label: "contain",
1490
+ value: "contain",
1491
+ helperText: "The image should never get cropped"
1492
+ }, {
1493
+ label: "cover",
1494
+ value: "cover",
1495
+ helperText: "The image should fill it's box, cropping when needed"
1496
+ }]
1497
+ }, {
1498
+ name: "backgroundPosition",
1499
+ type: "text",
1500
+ defaultValue: "center",
1501
+ enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
1502
+ }, {
1503
+ name: "altText",
1504
+ type: "string",
1505
+ helperText: "Text to display when the user has images off"
1506
+ }, {
1507
+ name: "title",
1508
+ type: "string",
1509
+ helperText: "Text to display when hovering over the asset"
1510
+ }, {
1511
+ name: "aspectRatio",
1512
+ type: "number",
1513
+ helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
1514
+ advanced: !0,
1515
+ defaultValue: 0.7041
1486
1516
  }],
1487
- noWrap: !0,
1488
- static: !0
1489
- }, xt = C(() => import("./img-dfbd4080.js")), St = {
1517
+ noWrap: !0
1518
+ }, kt = C(() => import("./img-a1e0f10e.js")), Ct = {
1490
1519
  name: "Video",
1491
1520
  canHaveChildren: !0,
1492
1521
  defaultStyles: {
@@ -1497,14 +1526,14 @@ const qe = () => `
1497
1526
  inputs: [{
1498
1527
  name: "video",
1499
1528
  type: "file",
1500
- allowedFileTypes: Je,
1529
+ allowedFileTypes: Xe,
1501
1530
  bubble: !0,
1502
1531
  defaultValue: "https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",
1503
1532
  required: !0
1504
1533
  }, {
1505
1534
  name: "posterImage",
1506
1535
  type: "file",
1507
- allowedFileTypes: Y,
1536
+ allowedFileTypes: G,
1508
1537
  helperText: "Image to show before the video plays"
1509
1538
  }, {
1510
1539
  name: "autoPlay",
@@ -1570,67 +1599,67 @@ const qe = () => `
1570
1599
  shouldReceiveBuilderProps: {
1571
1600
  builderBlock: !0
1572
1601
  }
1573
- }, Tt = () => [{
1574
- component: rt,
1575
- ...ot
1576
- }, {
1577
- component: lt,
1578
- ...st
1579
- }, {
1602
+ }, wt = () => [{
1580
1603
  component: dt,
1581
1604
  ...ut
1582
1605
  }, {
1583
1606
  component: mt,
1584
1607
  ...ct
1585
- }, {
1586
- component: ht,
1587
- ...gt
1588
1608
  }, {
1589
1609
  component: ft,
1590
1610
  ...pt
1591
1611
  }, {
1592
- component: yt,
1593
- ...bt
1612
+ component: ht,
1613
+ ...gt
1594
1614
  }, {
1595
1615
  component: xt,
1596
1616
  ...vt
1597
1617
  }, {
1598
- component: Ie,
1599
- ...St
1600
- }], ee = () => [{
1601
- component: ke,
1602
- ...Me
1618
+ component: yt,
1619
+ ...bt
1603
1620
  }, {
1604
- component: Ce,
1605
- ...Ke
1621
+ component: Tt,
1622
+ ...St
1606
1623
  }, {
1607
- component: we,
1608
- ...ze
1624
+ component: kt,
1625
+ ...It
1609
1626
  }, {
1610
1627
  component: Ve,
1628
+ ...Ct
1629
+ }], ie = () => [{
1630
+ component: Ee,
1611
1631
  ...Qe
1612
1632
  }, {
1613
- component: Ee,
1614
- ...Xe
1633
+ component: Re,
1634
+ ...Ye
1635
+ }, {
1636
+ component: Ae,
1637
+ ...Ge
1615
1638
  }, {
1616
- component: et,
1639
+ component: De,
1617
1640
  ...Ze
1618
1641
  }, {
1619
- component: Re,
1620
- ...tt
1642
+ component: Pe,
1643
+ ...nt
1621
1644
  }, {
1622
- component: Ae,
1623
- ...it
1624
- }, ...de.includes(F) ? [{
1625
- component: Ge,
1626
- ...Ye
1645
+ component: it,
1646
+ ...at
1647
+ }, {
1648
+ component: Fe,
1649
+ ...ot
1650
+ }, {
1651
+ component: We,
1652
+ ...st
1653
+ }, ...fe.includes(F) ? [{
1654
+ component: tt,
1655
+ ...et
1627
1656
  }] : [], {
1628
- component: at,
1629
- ...nt
1657
+ component: lt,
1658
+ ...rt
1630
1659
  }, {
1631
- component: je,
1632
- ...Oe
1633
- }, ...Tt()], It = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
1660
+ component: Je,
1661
+ ...ze
1662
+ }, ...wt()], Vt = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
1634
1663
  function getAndSetVariantId() {
1635
1664
  function setCookie(name, value, days) {
1636
1665
  let expires = '';
@@ -1689,7 +1718,7 @@ const qe = () => `
1689
1718
  }).join('');
1690
1719
  styleEl.innerHTML = newStyleStr;
1691
1720
  }
1692
- }`, kt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1721
+ }`, Et = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1693
1722
  if (!navigator.cookieEnabled) {
1694
1723
  return;
1695
1724
  }
@@ -1723,27 +1752,27 @@ const qe = () => `
1723
1752
  thisScriptEl?.remove();
1724
1753
  }
1725
1754
  return;
1726
- }`, me = "builderIoAbTest", pe = "builderIoRenderContent", H = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1755
+ }`, he = "builderIoAbTest", be = "builderIoRenderContent", O = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1727
1756
  ...t,
1728
1757
  testVariationId: t.id,
1729
1758
  id: e == null ? void 0 : e.id
1730
- })), Ct = ({
1759
+ })), Rt = ({
1731
1760
  canTrack: e,
1732
1761
  content: t
1733
- }) => !(!(H(t).length > 0) || !e || U()), wt = (e) => e === "react" || e === "reactNative", Vt = F === "angular", fe = wt(F), Et = () => `
1734
- window.${me} = ${It}
1735
- window.${pe} = ${kt}
1736
- `, Rt = (e, t) => `
1737
- window.${me}(
1738
- "${t}",${JSON.stringify(e)}, ${fe}, ${Vt}
1739
- )`, At = ({
1762
+ }) => !(!(O(t).length > 0) || !e || L()), At = (e) => e === "react" || e === "reactNative", Dt = F === "angular", ye = At(F), Pt = () => `
1763
+ window.${he} = ${Vt}
1764
+ window.${be} = ${Et}
1765
+ `, Ft = (e, t) => `
1766
+ window.${he}(
1767
+ "${t}",${JSON.stringify(e)}, ${ye}, ${Dt}
1768
+ )`, Wt = ({
1740
1769
  contentId: e,
1741
1770
  variationId: t
1742
- }) => `window.${pe}(
1743
- "${t}", "${e}", ${fe}
1771
+ }) => `window.${be}(
1772
+ "${t}", "${e}", ${ye}
1744
1773
  )`;
1745
1774
  function q(e) {
1746
- return /* @__PURE__ */ T(
1775
+ return /* @__PURE__ */ S(
1747
1776
  "script",
1748
1777
  {
1749
1778
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -1752,10 +1781,10 @@ function q(e) {
1752
1781
  }
1753
1782
  );
1754
1783
  }
1755
- function te(e) {
1784
+ function oe(e) {
1756
1785
  return Math.round(e * 1e3) / 1e3;
1757
1786
  }
1758
- const Dt = (e, t, n = !0) => {
1787
+ const Nt = (e, t, n = !0) => {
1759
1788
  if (!(e instanceof HTMLElement))
1760
1789
  return null;
1761
1790
  let o = n ? e : e.parentElement;
@@ -1766,37 +1795,37 @@ const Dt = (e, t, n = !0) => {
1766
1795
  return o;
1767
1796
  } while (o = o.parentElement);
1768
1797
  return null;
1769
- }, Ft = (e) => Dt(e, (t) => {
1798
+ }, $t = (e) => Nt(e, (t) => {
1770
1799
  const n = t.getAttribute("builder-id") || t.id;
1771
1800
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1772
- }), ne = ({
1801
+ }), re = ({
1773
1802
  event: e,
1774
1803
  target: t
1775
1804
  }) => {
1776
- const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, s = te(o / n.width), i = te(r / n.height);
1805
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, l = oe(o / n.width), a = oe(r / n.height);
1777
1806
  return {
1778
- x: s,
1779
- y: i
1807
+ x: l,
1808
+ y: a
1780
1809
  };
1781
- }, Pt = (e) => {
1782
- const t = e.target, n = t && Ft(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1810
+ }, _t = (e) => {
1811
+ const t = e.target, n = t && $t(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1783
1812
  return {
1784
1813
  targetBuilderElement: o || void 0,
1785
1814
  metadata: {
1786
- targetOffset: t ? ne({
1815
+ targetOffset: t ? re({
1787
1816
  event: e,
1788
1817
  target: t
1789
1818
  }) : void 0,
1790
- builderTargetOffset: n ? ne({
1819
+ builderTargetOffset: n ? re({
1791
1820
  event: e,
1792
1821
  target: n
1793
1822
  }) : void 0,
1794
1823
  builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
1795
1824
  }
1796
1825
  };
1797
- }, Wt = ["svelte", "qwik", "vue"], ae = () => Wt.includes(F) && (N() || oe()), Nt = (e) => {
1798
- var s, i;
1799
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (i = e.fileUrl) != null ? i : (s = e == null ? void 0 : e.files) == null ? void 0 : s.regular;
1826
+ }, Lt = ["svelte", "qwik", "vue"], le = () => Lt.includes(F) && (_() || ue()), Bt = (e) => {
1827
+ var l, a;
1828
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (a = e.fileUrl) != null ? a : (l = e == null ? void 0 : e.files) == null ? void 0 : l.regular;
1800
1829
  let r = "";
1801
1830
  if (o && t && n && (r += `
1802
1831
  @font-face {
@@ -1806,29 +1835,29 @@ font-display: fallback;
1806
1835
  font-weight: 400;
1807
1836
  }
1808
1837
  `.trim()), e.files)
1809
- for (const a in e.files) {
1810
- if (!(String(Number(a)) === a))
1838
+ for (const i in e.files) {
1839
+ if (!(String(Number(i)) === i))
1811
1840
  continue;
1812
- const f = e.files[a];
1813
- f && f !== o && (r += `
1841
+ const m = e.files[i];
1842
+ m && m !== o && (r += `
1814
1843
  @font-face {
1815
1844
  font-family: "${t}";
1816
- src: url('${f}') format('woff2');
1845
+ src: url('${m}') format('woff2');
1817
1846
  font-display: fallback;
1818
- font-weight: ${a};
1847
+ font-weight: ${i};
1819
1848
  }
1820
1849
  `.trim());
1821
1850
  }
1822
1851
  return r;
1823
- }, $t = ({
1852
+ }, Ut = ({
1824
1853
  customFonts: e
1825
1854
  }) => {
1826
1855
  var t;
1827
- return ((t = e == null ? void 0 : e.map((n) => Nt(n))) == null ? void 0 : t.join(" ")) || "";
1828
- }, _t = ({
1856
+ return ((t = e == null ? void 0 : e.map((n) => Bt(n))) == null ? void 0 : t.join(" ")) || "";
1857
+ }, Ht = ({
1829
1858
  cssCode: e,
1830
1859
  contentId: t
1831
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Lt = `
1860
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", Ot = `
1832
1861
  .builder-button {
1833
1862
  all: unset;
1834
1863
  }
@@ -1845,154 +1874,162 @@ font-weight: ${a};
1845
1874
  text-align: inherit;
1846
1875
  font-family: inherit;
1847
1876
  }
1848
- `, Ut = (e) => e ? "" : Lt, Bt = (e) => `variant-${e}`;
1849
- function Ht(e) {
1850
- var v, k, D;
1851
- const t = Q(null);
1852
- R(() => !1);
1853
- function n(c) {
1854
- var h, b;
1855
- const p = {
1877
+ `, qt = (e) => e ? "" : Ot, jt = (e) => `variant-${e}`;
1878
+ function Mt(e) {
1879
+ var Z, ee, te;
1880
+ const t = Y(null);
1881
+ k(() => !1), k(
1882
+ () => e.builderContextSignal
1883
+ );
1884
+ const [n, o] = k(() => null), [r, l] = k(() => "");
1885
+ function a(c, h) {
1886
+ var y, p;
1887
+ const f = {
1856
1888
  ...e.builderContextSignal.rootState,
1857
1889
  ...c
1858
1890
  };
1859
- e.builderContextSignal.rootSetState ? (b = (h = e.builderContextSignal).rootSetState) == null || b.call(h, p) : e.setBuilderContextSignal((g) => ({
1860
- ...g,
1861
- rootState: p
1891
+ e.builderContextSignal.rootSetState ? (p = (y = e.builderContextSignal).rootSetState) == null || p.call(y, f) : e.setBuilderContextSignal((b) => ({
1892
+ ...b,
1893
+ rootState: f
1894
+ })), e.builderContextSignal.rootSetState ? e.builderContextSignal.rootSetState(f) : e.setBuilderContextSignal((b) => ({
1895
+ ...b,
1896
+ rootState: f
1862
1897
  }));
1863
1898
  }
1864
- function o(c) {
1865
- var h, b, g, x, A;
1866
- const p = {
1899
+ function i(c, h) {
1900
+ var y, p, b, P, $;
1901
+ const f = {
1867
1902
  ...e.builderContextSignal.content,
1868
1903
  ...c,
1869
1904
  data: {
1870
- ...(h = e.builderContextSignal.content) == null ? void 0 : h.data,
1905
+ ...(y = e.builderContextSignal.content) == null ? void 0 : y.data,
1871
1906
  ...c == null ? void 0 : c.data
1872
1907
  },
1873
1908
  meta: {
1874
- ...(b = e.builderContextSignal.content) == null ? void 0 : b.meta,
1909
+ ...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
1875
1910
  ...c == null ? void 0 : c.meta,
1876
- breakpoints: ((g = c == null ? void 0 : c.meta) == null ? void 0 : g.breakpoints) || ((A = (x = e.builderContextSignal.content) == null ? void 0 : x.meta) == null ? void 0 : A.breakpoints)
1911
+ breakpoints: ((b = c == null ? void 0 : c.meta) == null ? void 0 : b.breakpoints) || (($ = (P = e.builderContextSignal.content) == null ? void 0 : P.meta) == null ? void 0 : $.breakpoints)
1877
1912
  }
1878
1913
  };
1879
- e.setBuilderContextSignal((_) => ({
1880
- ..._,
1881
- content: p
1914
+ e.setBuilderContextSignal((v) => ({
1915
+ ...v,
1916
+ content: f
1882
1917
  }));
1883
1918
  }
1884
- function r() {
1919
+ function u() {
1885
1920
  return e.showContent ? {} : {
1886
1921
  hidden: !0,
1887
1922
  "aria-hidden": !0
1888
1923
  };
1889
1924
  }
1890
- const [s, i] = R(
1925
+ const [m, g] = k(
1891
1926
  () => e.contentWrapper || "div"
1892
1927
  );
1893
- function a(c) {
1894
- return ve({
1928
+ function R(c) {
1929
+ return Ie({
1895
1930
  model: e.model,
1896
1931
  trustedHosts: e.trustedHosts,
1897
1932
  callbacks: {
1898
- configureSdk: (p) => {
1899
- var g;
1900
- const { breakpoints: h, contentId: b } = p;
1901
- !b || b !== ((g = e.builderContextSignal.content) == null ? void 0 : g.id) || h && o({
1933
+ configureSdk: (h) => {
1934
+ var p;
1935
+ const { breakpoints: f, contentId: y } = h;
1936
+ !y || y !== ((p = e.builderContextSignal.content) == null ? void 0 : p.id) || f && i({
1902
1937
  meta: {
1903
- breakpoints: h
1938
+ breakpoints: f
1904
1939
  }
1905
1940
  });
1906
1941
  },
1907
- animation: (p) => {
1908
- Fe(p);
1942
+ animation: (h) => {
1943
+ $e(h);
1909
1944
  },
1910
- contentUpdate: (p) => {
1911
- o(p);
1945
+ contentUpdate: (h, f) => {
1946
+ i(h);
1912
1947
  },
1913
- stateUpdate: (p) => {
1914
- n(p);
1948
+ stateUpdate: (h, f) => {
1949
+ a(h);
1915
1950
  }
1916
1951
  }
1917
1952
  })(c);
1918
1953
  }
1919
- const [l, f] = R(() => ({})), [m, P] = R(() => ({})), [I, E] = R(() => !1);
1920
- function d(c) {
1921
- var p, h;
1954
+ const [T, A] = k(() => ({})), [s, d] = k(() => ({})), [D, B] = k(() => !1);
1955
+ function I(c) {
1956
+ var h, f;
1922
1957
  if (e.builderContextSignal.content) {
1923
- const b = (p = e.builderContextSignal.content) == null ? void 0 : p.testVariationId, g = (h = e.builderContextSignal.content) == null ? void 0 : h.id;
1924
- X({
1958
+ const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id;
1959
+ ne({
1925
1960
  apiHost: e.apiHost,
1926
1961
  type: "click",
1927
- canTrack: O(e.canTrack),
1928
- contentId: g,
1962
+ canTrack: j(e.canTrack),
1963
+ contentId: p,
1929
1964
  apiKey: e.apiKey,
1930
- variationId: b !== g ? b : void 0,
1931
- ...Pt(c),
1932
- unique: !I
1965
+ variationId: y !== p ? y : void 0,
1966
+ ..._t(c),
1967
+ unique: !D
1933
1968
  });
1934
1969
  }
1935
- I || E(!0);
1970
+ D || B(!0);
1936
1971
  }
1937
- function u() {
1938
- var p, h, b;
1939
- const c = (b = (h = (p = e.builderContextSignal.content) == null ? void 0 : p.data) == null ? void 0 : h.httpRequests) != null ? b : {};
1972
+ function w() {
1973
+ var h, f, y;
1974
+ const c = (y = (f = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : f.httpRequests) != null ? y : {};
1940
1975
  Object.entries(c).forEach(
1941
- ([g, x]) => {
1942
- if (!x)
1976
+ ([p, b]) => {
1977
+ if (!b)
1943
1978
  return;
1944
- const A = typeof x == "object" && x["@type"] === "@builder.io/core:Request";
1945
- if (m[g] || l[g] && !N())
1979
+ const P = typeof b == "object" && b["@type"] === "@builder.io/core:Request";
1980
+ if (s[p] || T[p] && !_())
1946
1981
  return;
1947
- const _ = A ? x.request.url : x;
1948
- m[g] = !0;
1949
- const S = _.replace(
1982
+ const $ = P ? b.request.url : b;
1983
+ s[p] = !0;
1984
+ const v = $.replace(
1950
1985
  /{{([^}]+)}}/g,
1951
- (V, L) => String(
1952
- re({
1953
- code: L,
1986
+ (E, U) => String(
1987
+ de({
1988
+ code: U,
1954
1989
  context: e.context || {},
1955
1990
  localState: void 0,
1956
1991
  rootState: e.builderContextSignal.rootState,
1957
1992
  rootSetState: e.builderContextSignal.rootSetState
1958
1993
  })
1959
1994
  )
1960
- ), y = A ? {
1961
- url: S,
1962
- method: x.request.method,
1963
- headers: x.request.headers,
1964
- body: x.request.body
1995
+ ), x = P ? {
1996
+ url: v,
1997
+ method: b.request.method,
1998
+ headers: b.request.headers,
1999
+ body: b.request.body
1965
2000
  } : {
1966
- url: S,
2001
+ url: v,
1967
2002
  method: "GET"
1968
2003
  };
1969
- xe(JSON.stringify(y)), fetch(y.url, {
1970
- method: y.method,
1971
- headers: y.headers,
1972
- body: y.body
1973
- }).then((V) => V.json()).then((V) => {
1974
- n({
1975
- [g]: V
1976
- }), l[g] = !0;
1977
- }).catch((V) => {
2004
+ ke(JSON.stringify(x));
2005
+ const W = {
2006
+ method: x.method,
2007
+ headers: x.headers,
2008
+ body: x.body
2009
+ };
2010
+ x.method === "GET" && delete W.body, fetch(x.url, W).then((E) => E.json()).then((E) => {
2011
+ a({
2012
+ [p]: E
2013
+ }), T[p] = !0;
2014
+ }).catch((E) => {
1978
2015
  console.error(
1979
2016
  "error fetching dynamic data",
1980
- JSON.stringify(x),
1981
- V
2017
+ JSON.stringify(b),
2018
+ E
1982
2019
  );
1983
2020
  }).finally(() => {
1984
- m[g] = !1;
2021
+ s[p] = !1;
1985
2022
  });
1986
2023
  }
1987
2024
  );
1988
2025
  }
1989
- function w() {
1990
- N() && window.dispatchEvent(
2026
+ function V() {
2027
+ _() && window.dispatchEvent(
1991
2028
  new CustomEvent(
1992
2029
  "builder:component:stateChange",
1993
2030
  {
1994
2031
  detail: {
1995
- state: Pe(e.builderContextSignal.rootState),
2032
+ state: _e(e.builderContextSignal.rootState),
1996
2033
  ref: {
1997
2034
  name: e.model
1998
2035
  }
@@ -2001,11 +2038,11 @@ function Ht(e) {
2001
2038
  )
2002
2039
  );
2003
2040
  }
2004
- const $ = Q(!1);
2005
- return $.current || (u(), w(), $.current = !0), W(() => {
2006
- var c, p, h, b, g;
2007
- if (U()) {
2008
- N() && !e.isNestedRender && (window.addEventListener("message", a), ge({
2041
+ const X = Y(!1);
2042
+ return X.current || (w(), V(), X.current = !0), N(() => {
2043
+ var c, h, f, y, p;
2044
+ if (L()) {
2045
+ _() && !e.isNestedRender && (window.addEventListener("message", R), ve({
2009
2046
  ...e.locale ? {
2010
2047
  locale: e.locale
2011
2048
  } : {},
@@ -2019,98 +2056,106 @@ function Ht(e) {
2019
2056
  apiKey: e.apiKey
2020
2057
  }), Object.values(
2021
2058
  e.builderContextSignal.componentInfos
2022
- ).forEach((S) => {
2023
- var y, V;
2024
- if (!((y = S.models) != null && y.length) || S.models.includes(e.model)) {
2025
- const L = he(S);
2026
- (V = window.parent) == null || V.postMessage(L, "*");
2059
+ ).forEach((v) => {
2060
+ var x, W;
2061
+ if (!((x = v.models) != null && x.length) || v.models.includes(e.model)) {
2062
+ const E = xe(v);
2063
+ (W = window.parent) == null || W.postMessage(E, "*");
2027
2064
  }
2028
2065
  }), window.addEventListener(
2029
2066
  "builder:component:stateChangeListenerActivated",
2030
- w
2067
+ V
2031
2068
  ));
2032
- const x = e.builderContextSignal.content && O(e.canTrack), A = be({
2033
- name: `builder.tests.${(p = e.builderContextSignal.content) == null ? void 0 : p.id}`,
2069
+ const b = e.builderContextSignal.content && j(e.canTrack), P = Se({
2070
+ name: `builder.tests.${(h = e.builderContextSignal.content) == null ? void 0 : h.id}`,
2034
2071
  canTrack: !0
2035
- }), _ = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId;
2036
- if (x && _ === A) {
2037
- const S = (b = e.builderContextSignal.content) == null ? void 0 : b.id, y = e.apiKey;
2038
- X({
2072
+ }), $ = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId;
2073
+ if (b && $ === P) {
2074
+ const v = (y = e.builderContextSignal.content) == null ? void 0 : y.id, x = e.apiKey;
2075
+ ne({
2039
2076
  apiHost: e.apiHost,
2040
2077
  type: "impression",
2041
2078
  canTrack: !0,
2042
- contentId: S,
2043
- apiKey: y,
2044
- variationId: A !== S ? A : void 0
2079
+ contentId: v,
2080
+ apiKey: x,
2081
+ variationId: P !== v ? P : void 0
2045
2082
  });
2046
2083
  }
2047
- if (oe() && !N()) {
2048
- const S = new URL(location.href).searchParams, y = S.get("builder.preview"), V = S.get(
2049
- `builder.overrides.${y}`
2050
- ), L = S.get("apiKey") || S.get("builder.space");
2051
- (y === "BUILDER_STUDIO" || y === e.model && L === e.apiKey && (!e.content || V === e.content.id)) && ye({
2084
+ if (ue() && !_()) {
2085
+ const v = new URL(location.href).searchParams, x = v.get("builder.preview"), W = v.get(
2086
+ `builder.overrides.${x}`
2087
+ ), E = v.get("apiKey") || v.get("builder.space");
2088
+ (x === "BUILDER_STUDIO" || x === e.model && E === e.apiKey && (!e.content || W === e.content.id)) && Te({
2052
2089
  model: e.model,
2053
2090
  apiKey: e.apiKey,
2054
2091
  apiVersion: e.builderContextSignal.apiVersion,
2055
- ...y === "BUILDER_STUDIO" && ((g = e.context) != null && g.symbolId) ? {
2092
+ ...x === "BUILDER_STUDIO" && ((p = e.context) != null && p.symbolId) ? {
2056
2093
  query: {
2057
2094
  id: e.context.symbolId
2058
2095
  }
2059
2096
  } : {}
2060
- }).then((G) => {
2061
- G && o(G);
2097
+ }).then((U) => {
2098
+ U && i(U);
2062
2099
  });
2063
2100
  }
2064
2101
  }
2065
- }, []), W(() => {
2066
- e.content && o(e.content);
2067
- }, [e.content]), W(() => {
2068
- w();
2069
- }, [e.builderContextSignal.rootState]), W(() => {
2070
- e.data && n(e.data);
2071
- }, [e.data]), W(() => {
2072
- e.locale && n({
2073
- locale: e.locale
2074
- });
2075
- }, [e.locale]), W(() => () => {
2076
- U() && (window.removeEventListener("message", a), window.removeEventListener(
2102
+ }, []), N(() => {
2103
+ e.content && i(e.content);
2104
+ }, [e.content]), N(() => {
2105
+ V();
2106
+ }, [e.builderContextSignal.rootState]), N(() => {
2107
+ if (e.data) {
2108
+ if (n === e.data)
2109
+ return;
2110
+ a(e.data), o(e.data);
2111
+ }
2112
+ }, [e.data]), N(() => {
2113
+ if (e.locale) {
2114
+ if (r === e.locale)
2115
+ return;
2116
+ a({
2117
+ locale: e.locale
2118
+ }), l(e.locale);
2119
+ }
2120
+ }, [e.locale]), N(() => () => {
2121
+ L() && (window.removeEventListener("message", R), window.removeEventListener(
2077
2122
  "builder:component:stateChangeListenerActivated",
2078
- w
2123
+ V
2079
2124
  ));
2080
- }, []), /* @__PURE__ */ T(De.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || ae() ? /* @__PURE__ */ T(
2081
- s,
2125
+ }, []), /* @__PURE__ */ S(Ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content || le() ? /* @__PURE__ */ S(
2126
+ m,
2082
2127
  {
2083
2128
  ref: t,
2084
- onClick: (c) => d(c),
2085
- "builder-content-id": (v = e.builderContextSignal.content) == null ? void 0 : v.id,
2129
+ onClick: (c) => I(c),
2130
+ "builder-content-id": (Z = e.builderContextSignal.content) == null ? void 0 : Z.id,
2086
2131
  "builder-model": e.model,
2087
- className: Bt(
2088
- ((k = e.content) == null ? void 0 : k.testVariationId) || ((D = e.content) == null ? void 0 : D.id)
2132
+ className: jt(
2133
+ ((ee = e.content) == null ? void 0 : ee.testVariationId) || ((te = e.content) == null ? void 0 : te.id)
2089
2134
  ),
2090
2135
  style: {
2091
- display: !e.builderContextSignal.content && ae() ? "none" : void 0
2136
+ display: !e.builderContextSignal.content && le() ? "none" : void 0
2092
2137
  },
2093
- ...r(),
2138
+ ...u(),
2094
2139
  ...e.contentWrapperProps,
2095
2140
  children: e.children
2096
2141
  }
2097
2142
  ) : null });
2098
2143
  }
2099
- function qt(e) {
2100
- const [t, n] = R(
2144
+ function Kt(e) {
2145
+ const [t, n] = k(
2101
2146
  () => `
2102
- ${_t({
2147
+ ${Ht({
2103
2148
  cssCode: e.cssCode,
2104
2149
  contentId: e.contentId
2105
2150
  })}
2106
- ${$t({
2151
+ ${Ut({
2107
2152
  customFonts: e.customFonts
2108
2153
  })}
2109
- ${Ut(e.isNestedRender)}
2154
+ ${qt(e.isNestedRender)}
2110
2155
  `.trim()
2111
2156
  );
2112
- return /* @__PURE__ */ T(
2113
- se,
2157
+ return /* @__PURE__ */ S(
2158
+ ce,
2114
2159
  {
2115
2160
  id: "builderio-content",
2116
2161
  styles: t,
@@ -2118,15 +2163,15 @@ ${Ut(e.isNestedRender)}
2118
2163
  }
2119
2164
  );
2120
2165
  }
2121
- const Ot = ({
2166
+ const zt = ({
2122
2167
  content: e,
2123
2168
  data: t,
2124
2169
  locale: n
2125
2170
  }) => {
2126
- var s, i, a;
2127
- const o = {}, r = ((s = e == null ? void 0 : e.data) == null ? void 0 : s.state) || {};
2128
- return (a = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || a.forEach((l) => {
2129
- l.name && l.defaultValue !== void 0 && (o[l.name] = l.defaultValue);
2171
+ var l, a, i;
2172
+ const o = {}, r = ((l = e == null ? void 0 : e.data) == null ? void 0 : l.state) || {};
2173
+ return (i = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || i.forEach((u) => {
2174
+ u.name && u.defaultValue !== void 0 && (o[u.name] = u.defaultValue);
2130
2175
  }), {
2131
2176
  ...o,
2132
2177
  ...r,
@@ -2135,7 +2180,7 @@ const Ot = ({
2135
2180
  locale: n
2136
2181
  } : {}
2137
2182
  };
2138
- }, jt = ({
2183
+ }, Jt = ({
2139
2184
  content: e,
2140
2185
  data: t
2141
2186
  }) => e ? {
@@ -2146,46 +2191,46 @@ const Ot = ({
2146
2191
  },
2147
2192
  meta: e == null ? void 0 : e.meta
2148
2193
  } : void 0;
2149
- function ie(e) {
2150
- var f, m, P, I, E, d, u, w, $;
2151
- const [t, n] = R(
2194
+ function se(e) {
2195
+ var m, g, R, T, A, s, d, D, B;
2196
+ const [t, n] = k(
2152
2197
  () => {
2153
- var v, k;
2154
- return At({
2198
+ var I, w;
2199
+ return Wt({
2155
2200
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2156
- variationId: (v = e.content) == null ? void 0 : v.testVariationId,
2201
+ variationId: (I = e.content) == null ? void 0 : I.testVariationId,
2157
2202
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2158
- contentId: (k = e.content) == null ? void 0 : k.id
2203
+ contentId: (w = e.content) == null ? void 0 : w.id
2159
2204
  });
2160
2205
  }
2161
2206
  );
2162
- function o(v) {
2163
- a((k) => ({
2164
- ...k,
2165
- rootState: v
2207
+ function o(I) {
2208
+ i((w) => ({
2209
+ ...w,
2210
+ rootState: I
2166
2211
  }));
2167
2212
  }
2168
- const [r, s] = R(
2213
+ const [r, l] = k(
2169
2214
  () => [
2170
- ...ee(),
2215
+ ...ie(),
2171
2216
  ...e.customComponents || []
2172
2217
  ].reduce(
2173
- (v, { component: k, ...D }) => ({
2174
- ...v,
2175
- [D.name]: {
2176
- component: k,
2177
- ...Z(D)
2218
+ (I, { component: w, ...V }) => ({
2219
+ ...I,
2220
+ [V.name]: {
2221
+ component: w,
2222
+ ...ae(V)
2178
2223
  }
2179
2224
  }),
2180
2225
  {}
2181
2226
  )
2182
- ), [i, a] = R(() => ({
2183
- content: jt({
2227
+ ), [a, i] = k(() => ({
2228
+ content: Jt({
2184
2229
  content: e.content,
2185
2230
  data: e.data
2186
2231
  }),
2187
2232
  localState: void 0,
2188
- rootState: Ot({
2233
+ rootState: zt({
2189
2234
  content: e.content,
2190
2235
  data: e.data,
2191
2236
  locale: e.locale
@@ -2196,12 +2241,12 @@ function ie(e) {
2196
2241
  apiKey: e.apiKey,
2197
2242
  apiVersion: e.apiVersion,
2198
2243
  componentInfos: [
2199
- ...ee(),
2244
+ ...ie(),
2200
2245
  ...e.customComponents || []
2201
2246
  ].reduce(
2202
- (v, { component: k, ...D }) => ({
2203
- ...v,
2204
- [D.name]: Z(D)
2247
+ (I, { component: w, ...V }) => ({
2248
+ ...I,
2249
+ [V.name]: ae(V)
2205
2250
  }),
2206
2251
  {}
2207
2252
  ),
@@ -2210,31 +2255,31 @@ function ie(e) {
2210
2255
  BlocksWrapperProps: e.blocksWrapperProps || {},
2211
2256
  nonce: e.nonce || "",
2212
2257
  model: e.model
2213
- })), l = Q(!1);
2214
- if (!l.current) {
2215
- e.apiKey || Se.error(
2258
+ })), u = Y(!1);
2259
+ if (!u.current) {
2260
+ e.apiKey || Ce.error(
2216
2261
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2217
2262
  );
2218
- const v = (m = (f = i.content) == null ? void 0 : f.data) == null ? void 0 : m.jsCode;
2219
- v && re({
2220
- code: v,
2263
+ const I = (g = (m = a.content) == null ? void 0 : m.data) == null ? void 0 : g.jsCode;
2264
+ I && de({
2265
+ code: I,
2221
2266
  context: e.context || {},
2222
2267
  localState: void 0,
2223
- rootState: i.rootState,
2224
- rootSetState: (k) => {
2225
- Object.assign(i.rootState, k);
2268
+ rootState: a.rootState,
2269
+ rootSetState: (w) => {
2270
+ Object.assign(a.rootState, w);
2226
2271
  },
2227
2272
  isExpression: !1
2228
- }), l.current = !0;
2273
+ }), u.current = !0;
2229
2274
  }
2230
- return /* @__PURE__ */ T(
2231
- We.Provider,
2275
+ return /* @__PURE__ */ S(
2276
+ Le.Provider,
2232
2277
  {
2233
2278
  value: {
2234
2279
  registeredComponents: r
2235
2280
  },
2236
- children: /* @__PURE__ */ B(
2237
- Ht,
2281
+ children: /* @__PURE__ */ H(
2282
+ Mt,
2238
2283
  {
2239
2284
  apiHost: e.apiHost,
2240
2285
  nonce: e.nonce,
@@ -2247,14 +2292,14 @@ function ie(e) {
2247
2292
  locale: e.locale,
2248
2293
  enrich: e.enrich,
2249
2294
  showContent: e.showContent,
2250
- builderContextSignal: i,
2295
+ builderContextSignal: a,
2251
2296
  contentWrapper: e.contentWrapper,
2252
2297
  contentWrapperProps: e.contentWrapperProps,
2253
2298
  trustedHosts: e.trustedHosts,
2254
2299
  isNestedRender: e.isNestedRender,
2255
- setBuilderContextSignal: a,
2300
+ setBuilderContextSignal: i,
2256
2301
  children: [
2257
- e.isSsrAbTest ? /* @__PURE__ */ T(
2302
+ e.isSsrAbTest ? /* @__PURE__ */ S(
2258
2303
  q,
2259
2304
  {
2260
2305
  id: "builderio-variant-visibility",
@@ -2262,21 +2307,21 @@ function ie(e) {
2262
2307
  nonce: e.nonce || ""
2263
2308
  }
2264
2309
  ) : null,
2265
- /* @__PURE__ */ T(
2266
- qt,
2310
+ /* @__PURE__ */ S(
2311
+ Kt,
2267
2312
  {
2268
2313
  nonce: e.nonce || "",
2269
2314
  isNestedRender: e.isNestedRender,
2270
- contentId: (P = i.content) == null ? void 0 : P.id,
2271
- cssCode: (E = (I = i.content) == null ? void 0 : I.data) == null ? void 0 : E.cssCode,
2272
- customFonts: (u = (d = i.content) == null ? void 0 : d.data) == null ? void 0 : u.customFonts
2315
+ contentId: (R = a.content) == null ? void 0 : R.id,
2316
+ cssCode: (A = (T = a.content) == null ? void 0 : T.data) == null ? void 0 : A.cssCode,
2317
+ customFonts: (d = (s = a.content) == null ? void 0 : s.data) == null ? void 0 : d.customFonts
2273
2318
  }
2274
2319
  ),
2275
- /* @__PURE__ */ T(
2276
- Ne,
2320
+ /* @__PURE__ */ S(
2321
+ Be,
2277
2322
  {
2278
- blocks: ($ = (w = i.content) == null ? void 0 : w.data) == null ? void 0 : $.blocks,
2279
- context: i,
2323
+ blocks: (B = (D = a.content) == null ? void 0 : D.data) == null ? void 0 : B.blocks,
2324
+ context: a,
2280
2325
  registeredComponents: r,
2281
2326
  linkComponent: e.linkComponent
2282
2327
  }
@@ -2287,67 +2332,67 @@ function ie(e) {
2287
2332
  }
2288
2333
  );
2289
2334
  }
2290
- function Mt(e) {
2291
- var i;
2292
- const [t, n] = R(
2293
- () => Ct({
2294
- canTrack: O(e.canTrack),
2335
+ function Qt(e) {
2336
+ var a;
2337
+ const [t, n] = k(
2338
+ () => Rt({
2339
+ canTrack: j(e.canTrack),
2295
2340
  content: e.content
2296
2341
  })
2297
2342
  );
2298
2343
  function o() {
2299
- var a;
2300
- return Rt(
2301
- H(e.content).map((l) => ({
2302
- id: l.testVariationId,
2303
- testRatio: l.testRatio
2344
+ var i;
2345
+ return Ft(
2346
+ O(e.content).map((u) => ({
2347
+ id: u.testVariationId,
2348
+ testRatio: u.testRatio
2304
2349
  })),
2305
- ((a = e.content) == null ? void 0 : a.id) || ""
2350
+ ((i = e.content) == null ? void 0 : i.id) || ""
2306
2351
  );
2307
2352
  }
2308
2353
  function r() {
2309
- return H(e.content).map((a) => `.variant-${a.testVariationId} { display: none; } `).join("");
2354
+ return O(e.content).map((i) => `.variant-${i.testVariationId} { display: none; } `).join("");
2310
2355
  }
2311
- function s() {
2312
- var a;
2356
+ function l() {
2357
+ var i;
2313
2358
  return t ? {
2314
2359
  ...e.content,
2315
- testVariationId: (a = e.content) == null ? void 0 : a.id
2316
- } : Te({
2360
+ testVariationId: (i = e.content) == null ? void 0 : i.id
2361
+ } : we({
2317
2362
  item: e.content,
2318
- canTrack: O(e.canTrack)
2363
+ canTrack: j(e.canTrack)
2319
2364
  });
2320
2365
  }
2321
- return W(() => {
2322
- }, []), /* @__PURE__ */ B(j, { children: [
2323
- !e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */ B(j, { children: [
2324
- /* @__PURE__ */ T(
2366
+ return N(() => {
2367
+ }, []), /* @__PURE__ */ H(M, { children: [
2368
+ !e.isNestedRender && F !== "reactNative" ? /* @__PURE__ */ H(M, { children: [
2369
+ /* @__PURE__ */ S(
2325
2370
  q,
2326
2371
  {
2327
2372
  id: "builderio-init-variants-fns",
2328
- scriptStr: Et(),
2373
+ scriptStr: Pt(),
2329
2374
  nonce: e.nonce || ""
2330
2375
  }
2331
2376
  ),
2332
- de.includes(F) ? /* @__PURE__ */ T(
2377
+ fe.includes(F) ? /* @__PURE__ */ S(
2333
2378
  q,
2334
2379
  {
2335
2380
  id: "builderio-init-personalization-variants-fns",
2336
2381
  nonce: e.nonce || "",
2337
- scriptStr: qe()
2382
+ scriptStr: Ke()
2338
2383
  }
2339
2384
  ) : null
2340
2385
  ] }) : null,
2341
- t ? /* @__PURE__ */ B(j, { children: [
2342
- /* @__PURE__ */ T(
2343
- se,
2386
+ t ? /* @__PURE__ */ H(M, { children: [
2387
+ /* @__PURE__ */ S(
2388
+ ce,
2344
2389
  {
2345
2390
  id: "builderio-variants",
2346
2391
  styles: r(),
2347
2392
  nonce: e.nonce || ""
2348
2393
  }
2349
2394
  ),
2350
- /* @__PURE__ */ T(
2395
+ /* @__PURE__ */ S(
2351
2396
  q,
2352
2397
  {
2353
2398
  id: "builderio-variants-visibility",
@@ -2355,13 +2400,13 @@ function Mt(e) {
2355
2400
  nonce: e.nonce || ""
2356
2401
  }
2357
2402
  ),
2358
- (i = H(e.content)) == null ? void 0 : i.map((a) => /* @__PURE__ */ T(
2359
- ie,
2403
+ (a = O(e.content)) == null ? void 0 : a.map((i) => /* @__PURE__ */ S(
2404
+ se,
2360
2405
  {
2361
2406
  apiHost: e.apiHost,
2362
2407
  isNestedRender: e.isNestedRender,
2363
2408
  nonce: e.nonce,
2364
- content: a,
2409
+ content: i,
2365
2410
  showContent: !1,
2366
2411
  model: e.model,
2367
2412
  data: e.data,
@@ -2380,16 +2425,16 @@ function Mt(e) {
2380
2425
  contentWrapperProps: e.contentWrapperProps,
2381
2426
  trustedHosts: e.trustedHosts
2382
2427
  },
2383
- a.testVariationId
2428
+ i.testVariationId
2384
2429
  ))
2385
2430
  ] }) : null,
2386
- /* @__PURE__ */ T(
2387
- ie,
2431
+ /* @__PURE__ */ S(
2432
+ se,
2388
2433
  {
2389
2434
  apiHost: e.apiHost,
2390
2435
  nonce: e.nonce,
2391
2436
  isNestedRender: e.isNestedRender,
2392
- content: s(),
2437
+ content: l(),
2393
2438
  showContent: !0,
2394
2439
  model: e.model,
2395
2440
  data: e.data,
@@ -2411,18 +2456,18 @@ function Mt(e) {
2411
2456
  )
2412
2457
  ] });
2413
2458
  }
2414
- const nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2459
+ const ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2415
2460
  __proto__: null,
2416
- default: Mt
2461
+ default: Qt
2417
2462
  }, Symbol.toStringTag, { value: "Module" }));
2418
2463
  export {
2419
- Ue as DEFAULT_INDEX,
2464
+ qe as DEFAULT_INDEX,
2420
2465
  q as InlinedScript,
2421
- He as SDKS_REQUIRING_RESET_APPROACH,
2422
- Xt as checkShouldRenderVariants,
2423
- nn as contentVariants,
2424
- Gt as filterWithCustomTargeting,
2425
- Zt as getBlocksToRender,
2426
- en as getPersonalizationScript,
2427
- tn as getUpdateVisibilityStylesScript
2466
+ Me as SDKS_REQUIRING_RESET_APPROACH,
2467
+ nn as checkShouldRenderVariants,
2468
+ ln as contentVariants,
2469
+ tn as filterWithCustomTargeting,
2470
+ an as getBlocksToRender,
2471
+ on as getPersonalizationScript,
2472
+ rn as getUpdateVisibilityStylesScript
2428
2473
  };