@builder.io/sdk-react 2.0.8 → 2.0.12

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 (73) hide show
  1. package/lib/browser/blocks-exports.cjs +28 -28
  2. package/lib/browser/blocks-exports.mjs +991 -966
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +3 -3
  6. package/lib/browser/init.mjs +3 -3
  7. package/lib/browser/server-entry-acf08871.cjs +2 -0
  8. package/lib/{node/server-entry-f6ee5d92.js → browser/server-entry-dc66de59.js} +346 -342
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{accordion-ef5e6161.js → accordion-37ff8319.js} +1 -1
  12. package/lib/edge/{accordion-88007399.cjs → accordion-b3b8c262.cjs} +1 -1
  13. package/lib/edge/blocks-793430a0.cjs +12 -0
  14. package/lib/edge/blocks-e0e60319.js +833 -0
  15. package/lib/edge/blocks-exports.cjs +1 -1
  16. package/lib/edge/blocks-exports.mjs +2 -2
  17. package/lib/edge/{button-8d307faf.js → button-15992755.js} +2 -2
  18. package/lib/edge/{button-228f448d.cjs → button-875ac10b.cjs} +1 -1
  19. package/lib/edge/{columns-3547be8c.cjs → columns-11ead988.cjs} +1 -1
  20. package/lib/edge/{columns-77b7011a.js → columns-cfe663b2.js} +4 -4
  21. package/lib/edge/{content-variants-4f7cad1a.js → content-variants-e780597b.js} +11 -11
  22. package/lib/edge/{content-variants-f0edf280.cjs → content-variants-f8ef104d.cjs} +4 -4
  23. package/lib/edge/{evaluate-384a03ed.js → evaluate-6408d64d.js} +87 -87
  24. package/lib/edge/{evaluate-39c2c786.cjs → evaluate-938a955e.cjs} +6 -6
  25. package/lib/edge/{form-c6da17f5.cjs → form-75a774bc.cjs} +1 -1
  26. package/lib/edge/{form-d40e9eca.js → form-7735178f.js} +4 -4
  27. package/lib/edge/{get-class-prop-name-767dbeb0.js → get-class-prop-name-d005a2bb.js} +1 -1
  28. package/lib/edge/{get-class-prop-name-4f8743e9.cjs → get-class-prop-name-e596650d.cjs} +1 -1
  29. package/lib/edge/{img-d650b796.js → img-045bb860.js} +1 -1
  30. package/lib/edge/{img-c50b3839.cjs → img-dd79e34b.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/init.cjs +3 -3
  34. package/lib/edge/init.mjs +3 -3
  35. package/lib/edge/{input-aaba7df0.cjs → input-3bd0ac03.cjs} +1 -1
  36. package/lib/edge/{input-5646dcb2.js → input-adf80016.js} +1 -1
  37. package/lib/edge/{select-2e7bf7d0.cjs → select-882193d4.cjs} +1 -1
  38. package/lib/edge/{select-d3905dcd.js → select-90b076db.js} +1 -1
  39. package/lib/edge/{server-entry-29a170e3.js → server-entry-84c3cdd6.js} +59 -58
  40. package/lib/edge/server-entry-d5ae6221.cjs +2 -0
  41. package/lib/edge/server-entry.cjs +1 -1
  42. package/lib/edge/server-entry.mjs +1 -1
  43. package/lib/edge/{slot-82c0b340.js → slot-293114eb.js} +4 -4
  44. package/lib/edge/{slot-695259cf.cjs → slot-42b9b358.cjs} +1 -1
  45. package/lib/edge/{symbol-5a6a783f.cjs → symbol-3e0799b8.cjs} +1 -1
  46. package/lib/edge/{symbol-91897bd4.js → symbol-aed9cd2b.js} +2 -2
  47. package/lib/edge/{tabs-a191e7b1.js → tabs-0cf37bf4.js} +4 -4
  48. package/lib/edge/{tabs-4c4a6b19.cjs → tabs-f5c4f350.cjs} +1 -1
  49. package/lib/edge/{text-ca974245.js → text-9e2166c7.js} +2 -2
  50. package/lib/edge/{text-7a00e2f8.cjs → text-abb84188.cjs} +1 -1
  51. package/lib/node/blocks-exports.cjs +29 -29
  52. package/lib/node/blocks-exports.mjs +983 -958
  53. package/lib/node/index.cjs +1 -1
  54. package/lib/node/index.mjs +2 -2
  55. package/lib/node/init.cjs +1 -1
  56. package/lib/node/init.mjs +2 -2
  57. package/lib/node/{node-runtime-a6fb6ac7.cjs → node-runtime-11912803.cjs} +4 -4
  58. package/lib/node/{node-runtime-d8e6d827.js → node-runtime-49e4c6cb.js} +3 -3
  59. package/lib/node/server-entry-acf08871.cjs +2 -0
  60. package/lib/{browser/server-entry-f6ee5d92.js → node/server-entry-dc66de59.js} +346 -342
  61. package/lib/node/server-entry.cjs +1 -1
  62. package/lib/node/server-entry.mjs +1 -1
  63. package/package.json +3 -3
  64. package/types/components/block/block.helpers.d.ts +1 -2
  65. package/types/constants/sdk-version.d.ts +1 -1
  66. package/types/functions/evaluate/node-runtime/init.d.ts +1 -0
  67. package/types/functions/get-processed-block.d.ts +1 -0
  68. package/types/functions/register-component.d.ts +1 -1
  69. package/lib/browser/server-entry-ba3e0524.cjs +0 -2
  70. package/lib/edge/blocks-90fd2fd8.js +0 -808
  71. package/lib/edge/blocks-dc478c97.cjs +0 -12
  72. package/lib/edge/server-entry-b0e7430b.cjs +0 -2
  73. package/lib/node/server-entry-ba3e0524.cjs +0 -2
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- var He = Object.defineProperty;
3
- var qe = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var ie = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
5
- import { jsx as s, Fragment as R, jsxs as V } from "react/jsx-runtime";
6
- import { TARGET as H, checkIsDefined as Y, logger as Z, isBrowser as G, isEditing as $, registerInsertMenu as Ke, setupBrowserForEditing as ze, createRegisterComponentMessage as _e, getDefaultCanTrack as Q, _track as he, isPreviewing as Je, fetchOneEntry as Ie, createEditorListener as Ye, fetch as Ge, serializeComponentInfo as ge, handleABTestingSync as Qe } from "./server-entry-f6ee5d92.js";
7
- import { createContext as we, useState as T, useEffect as P, useContext as be, useRef as ee, createElement as Re } from "react";
8
- import { getFunctionArguments as Xe, runInNode as Ze, parseCode as et, getBuilderGlobals as tt, fastClone as de, set as Ee } from "./node-runtime-d8e6d827.js";
2
+ var Ke = Object.defineProperty;
3
+ var qe = (e, t, n) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var ne = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
5
+ import { jsx as l, Fragment as R, jsxs as V } from "react/jsx-runtime";
6
+ import { TARGET as U, checkIsDefined as G, logger as Z, isBrowser as Q, isPreviewing as Ie, isEditing as $, registerInsertMenu as _e, setupBrowserForEditing as ze, createRegisterComponentMessage as Je, getDefaultCanTrack as X, _track as he, fetchOneEntry as we, createEditorListener as Ye, fetch as Ge, serializeIncludingFunctions as ge, handleABTestingSync as Qe } from "./server-entry-dc66de59.js";
7
+ import { createContext as Re, useState as T, useEffect as B, useRef as _, useContext as be, createElement as Ee } from "react";
8
+ import { getFunctionArguments as Xe, runInNode as Ze, parseCode as et, getBuilderGlobals as tt, set as Pe, fastClone as de } from "./node-runtime-49e4c6cb.js";
9
9
  const nt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), it = (e) => typeof e == "string" && nt.has(e.toLowerCase());
10
10
  function ue(e) {
11
- return /* @__PURE__ */ s(R, { children: it(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 }) }) });
11
+ return /* @__PURE__ */ l(R, { children: it(e.TagName) ? /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ l(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ l(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
12
12
  }
13
- const K = () => {
14
- switch (H) {
13
+ const q = () => {
14
+ switch (U) {
15
15
  case "react":
16
16
  case "reactNative":
17
17
  case "rsc":
@@ -28,7 +28,7 @@ function ot(e) {
28
28
  function t() {
29
29
  return {
30
30
  ...e.attributes,
31
- [K()]: `${e.link ? "" : "builder-button"} ${e.attributes[K()] || ""}`,
31
+ [q()]: `${e.link ? "" : "builder-button"} ${e.attributes[q()] || ""}`,
32
32
  ...e.link ? {
33
33
  href: e.link,
34
34
  target: e.openLinkInNewTab ? "_blank" : void 0,
@@ -38,7 +38,7 @@ function ot(e) {
38
38
  }
39
39
  };
40
40
  }
41
- return /* @__PURE__ */ s(
41
+ return /* @__PURE__ */ l(
42
42
  ue,
43
43
  {
44
44
  attributes: t(),
@@ -48,7 +48,7 @@ function ot(e) {
48
48
  }
49
49
  );
50
50
  }
51
- const me = we({
51
+ const me = Re({
52
52
  content: null,
53
53
  context: {},
54
54
  localState: void 0,
@@ -62,7 +62,7 @@ const me = we({
62
62
  BlocksWrapper: "div",
63
63
  BlocksWrapperProps: {},
64
64
  nonce: ""
65
- }), Be = we({ registeredComponents: {} });
65
+ }), Be = Re({ registeredComponents: {} });
66
66
  function at(e) {
67
67
  var t;
68
68
  return {
@@ -70,28 +70,34 @@ function at(e) {
70
70
  ...e.options
71
71
  };
72
72
  }
73
- const rt = ({
73
+ function rt(e, ...t) {
74
+ const n = Object.assign({}, e);
75
+ for (const i of t)
76
+ delete n[i];
77
+ return n;
78
+ }
79
+ const lt = ({
74
80
  code: e,
75
81
  builder: t,
76
82
  context: n,
77
83
  event: i,
78
84
  localState: o,
79
- rootSetState: l,
80
- rootState: a
85
+ rootSetState: a,
86
+ rootState: r
81
87
  }) => {
82
- const r = Xe({
88
+ const s = Xe({
83
89
  builder: t,
84
90
  context: n,
85
91
  event: i,
86
- state: Pe({
87
- rootState: a,
92
+ state: Ve({
93
+ rootState: r,
88
94
  localState: o,
89
- rootSetState: l
95
+ rootSetState: a
90
96
  })
91
97
  });
92
- return new Function(...r.map(([c]) => c), e)(...r.map(([, c]) => c));
98
+ return new Function(...s.map(([d]) => d), e)(...s.map(([, d]) => d));
93
99
  };
94
- function Pe({
100
+ function Ve({
95
101
  rootState: e,
96
102
  localState: t,
97
103
  rootSetState: n
@@ -100,33 +106,33 @@ function Pe({
100
106
  get: (i, o) => {
101
107
  if (t && o in t)
102
108
  return t[o];
103
- const l = i[o];
104
- return typeof l == "object" && l !== null ? Pe({
105
- rootState: l,
109
+ const a = i[o];
110
+ return typeof a == "object" && a !== null ? Ve({
111
+ rootState: a,
106
112
  localState: void 0,
107
- rootSetState: n ? (a) => {
108
- i[o] = a, n(i);
113
+ rootSetState: n ? (r) => {
114
+ i[o] = r, n(i);
109
115
  } : void 0
110
- }) : l;
116
+ }) : a;
111
117
  },
112
- set: (i, o, l) => {
118
+ set: (i, o, a) => {
113
119
  if (t && o in t)
114
120
  throw new Error("Writing to local state is not allowed as it is read-only.");
115
- return i[o] = l, n == null || n(i), !0;
121
+ return i[o] = a, n == null || n(i), !0;
116
122
  }
117
123
  });
118
124
  }
119
- function lt() {
125
+ function st() {
120
126
  var e;
121
- return typeof process != "undefined" && Y((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
127
+ return typeof process != "undefined" && G((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
122
128
  }
123
- const st = () => {
129
+ const ct = () => {
124
130
  var i;
125
- if (!lt())
131
+ if (!st())
126
132
  return !1;
127
133
  const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (i = process.env.NODE_OPTIONS) == null ? void 0 : i.includes("--no-node-snapshot");
128
134
  return e && t && !n ? (Z.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
129
- }, ct = (e) => G() || st() ? rt(e) : Ze(e), L = class L {
135
+ }, dt = (e) => Q() || ct() ? lt(e) : Ze(e), ut = !0, L = class L {
130
136
  static getCacheKey(t) {
131
137
  return JSON.stringify({
132
138
  ...t,
@@ -144,51 +150,89 @@ const st = () => {
144
150
  });
145
151
  }
146
152
  };
147
- ie(L, "cacheLimit", 20), ie(L, "cache", /* @__PURE__ */ new Map());
153
+ ne(L, "cacheLimit", 20), ne(L, "cache", /* @__PURE__ */ new Map());
148
154
  let M = L;
149
- function U({
155
+ function H({
150
156
  code: e,
151
157
  context: t,
152
158
  localState: n,
153
159
  rootState: i,
154
160
  rootSetState: o,
155
- event: l,
156
- isExpression: a = !0,
157
- enableCache: r
161
+ event: a,
162
+ isExpression: r = !0,
163
+ enableCache: s
158
164
  }) {
159
165
  if (e === "")
160
166
  return;
161
- const c = {
167
+ const d = {
162
168
  code: et(e, {
163
- isExpression: a
169
+ isExpression: r
164
170
  }),
165
171
  builder: tt(),
166
172
  context: t,
167
- event: l,
173
+ event: a,
168
174
  rootSetState: o,
169
175
  rootState: i,
170
176
  localState: n
171
177
  };
172
- if (r) {
173
- const d = M.getCacheKey(c), f = M.getCachedValue(d);
174
- if (f)
175
- return f.value;
178
+ if (s && !ut) {
179
+ const c = M.getCacheKey(d), m = M.getCachedValue(c);
180
+ if (m)
181
+ return m.value;
176
182
  }
177
183
  try {
178
- const d = ct(c);
179
- if (r) {
180
- const f = M.getCacheKey(c);
181
- M.setCachedValue(f, d);
182
- }
183
- return d;
184
- } catch (d) {
185
- Z.error("Failed code evaluation: " + d.message, {
184
+ const c = dt(d);
185
+ if (s) {
186
+ const m = M.getCacheKey(d);
187
+ M.setCachedValue(m, c);
188
+ }
189
+ return c;
190
+ } catch (c) {
191
+ Z.error("Failed code evaluation: " + c.message, {
186
192
  code: e
187
193
  });
188
194
  return;
189
195
  }
190
196
  }
191
- const dt = ({
197
+ function se(e) {
198
+ if (e === null || typeof e != "object")
199
+ return e;
200
+ if (Array.isArray(e))
201
+ return e.map((n) => se(n));
202
+ if (e["@type"] === "@builder.io/sdk:Element")
203
+ return e;
204
+ const t = {};
205
+ for (const n in e)
206
+ n !== "meta" && Object.prototype.hasOwnProperty.call(e, n) && (t[n] = se(e[n]));
207
+ return t;
208
+ }
209
+ const mt = ["svelte", "vue", "angular", "qwik", "solid"].includes(U), ft = (e) => {
210
+ if (mt) {
211
+ const t = de(e);
212
+ return {
213
+ ...t,
214
+ properties: {
215
+ ...t.properties
216
+ },
217
+ actions: {
218
+ ...t.actions
219
+ }
220
+ };
221
+ } else {
222
+ const t = se(rt(e, "children", "meta"));
223
+ return {
224
+ ...t,
225
+ properties: {
226
+ ...t.properties
227
+ },
228
+ actions: {
229
+ ...t.actions
230
+ },
231
+ children: e.children,
232
+ meta: e.meta
233
+ };
234
+ }
235
+ }, ht = ({
192
236
  block: e,
193
237
  context: t,
194
238
  localState: n,
@@ -197,180 +241,172 @@ const dt = ({
197
241
  }) => {
198
242
  if (!e.bindings)
199
243
  return e;
200
- const l = de(e), a = {
201
- ...l,
202
- properties: {
203
- ...l.properties
204
- },
205
- actions: {
206
- ...l.actions
207
- }
208
- };
244
+ const a = ft(e);
209
245
  for (const r in e.bindings) {
210
- const c = e.bindings[r], d = U({
211
- code: c,
246
+ const s = e.bindings[r], d = H({
247
+ code: s,
212
248
  localState: n,
213
249
  rootState: i,
214
250
  rootSetState: o,
215
251
  context: t,
216
252
  enableCache: !0
217
253
  });
218
- Ee(a, r, d);
254
+ Pe(a, r, d);
219
255
  }
220
256
  return a;
221
257
  };
222
- function X({
258
+ function gt({
223
259
  block: e,
224
260
  context: t,
225
261
  shouldEvaluateBindings: n,
226
262
  localState: i,
227
263
  rootState: o,
228
- rootSetState: l
264
+ rootSetState: a
229
265
  }) {
230
- const a = e;
231
- return n ? dt({
232
- block: a,
266
+ const r = e;
267
+ return n ? ht({
268
+ block: r,
233
269
  localState: i,
234
270
  rootState: o,
235
- rootSetState: l,
271
+ rootSetState: a,
236
272
  context: t
237
- }) : a;
273
+ }) : r;
238
274
  }
239
- const te = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
240
- function ut(e, t, n = {}) {
241
- let i, o, l, a = null, r = 0;
242
- const c = function() {
243
- r = n.leading === !1 ? 0 : Date.now(), a = null, l = e.apply(i, o), a || (i = o = null);
275
+ const ee = (e) => e ? e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
276
+ function bt(e, t, n = {}) {
277
+ let i, o, a, r = null, s = 0;
278
+ const d = function() {
279
+ s = n.leading === !1 ? 0 : Date.now(), r = null, a = e.apply(i, o), r || (i = o = null);
244
280
  };
245
281
  return function() {
246
- const d = Date.now();
247
- !r && n.leading === !1 && (r = d);
248
- const f = t - (d - r);
249
- return i = this, o = arguments, f <= 0 || f > t ? (a && (clearTimeout(a), a = null), r = d, l = e.apply(i, o), a || (i = o = null)) : !a && n.trailing !== !1 && (a = setTimeout(c, f)), l;
282
+ const c = Date.now();
283
+ !s && n.leading === !1 && (s = c);
284
+ const m = t - (c - s);
285
+ return i = this, o = arguments, m <= 0 || m > t ? (r && (clearTimeout(r), r = null), s = c, a = e.apply(i, o), r || (i = o = null)) : !r && n.trailing !== !1 && (r = setTimeout(d, m)), a;
250
286
  };
251
287
  }
252
- function q(e, ...t) {
288
+ function K(e, ...t) {
253
289
  const n = Object(e);
254
290
  for (let i = 1; i < arguments.length; i++) {
255
291
  const o = arguments[i];
256
292
  if (o != null)
257
- for (const l in o)
258
- Object.prototype.hasOwnProperty.call(o, l) && (n[l] = o[l]);
293
+ for (const a in o)
294
+ Object.prototype.hasOwnProperty.call(o, a) && (n[a] = o[a]);
259
295
  }
260
296
  return n;
261
297
  }
262
- function mt(e) {
298
+ function pt(e) {
263
299
  for (const t of e)
264
300
  switch (t.trigger) {
265
301
  case "pageLoad":
266
- Ne(t);
302
+ We(t);
267
303
  break;
268
304
  case "scrollInView":
269
- ht(t);
305
+ xt(t);
270
306
  break;
271
307
  }
272
308
  }
273
- function Ve(e) {
309
+ function Ae(e) {
274
310
  console.warn(`Cannot animate element: element with ID ${e} not found!`);
275
311
  }
276
- function Ae(e, t) {
277
- const n = ft(e), i = getComputedStyle(t), o = e.steps[0].styles, l = e.steps[e.steps.length - 1].styles, a = [o, l];
278
- for (const r of a)
279
- for (const c of n)
280
- c in r || (r[c] = i[c]);
312
+ function Ne(e, t) {
313
+ const n = yt(e), i = getComputedStyle(t), o = e.steps[0].styles, a = e.steps[e.steps.length - 1].styles, r = [o, a];
314
+ for (const s of r)
315
+ for (const d of n)
316
+ d in s || (s[d] = i[d]);
281
317
  }
282
- function ft(e) {
318
+ function yt(e) {
283
319
  const t = [];
284
320
  for (const n of e.steps)
285
321
  for (const i in n.styles)
286
322
  t.indexOf(i) === -1 && t.push(i);
287
323
  return t;
288
324
  }
289
- function Ne(e) {
325
+ function We(e) {
290
326
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
291
327
  if (!t.length) {
292
- Ve(e.elementId || e.id || "");
328
+ Ae(e.elementId || e.id || "");
293
329
  return;
294
330
  }
295
331
  Array.from(t).forEach((n) => {
296
- Ae(e, n), n.style.transition = "none", n.style.transitionDelay = "0", q(n.style, e.steps[0].styles), setTimeout(() => {
297
- n.style.transition = `all ${e.duration}s ${te(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), q(n.style, e.steps[1].styles), setTimeout(() => {
332
+ Ne(e, n), n.style.transition = "none", n.style.transitionDelay = "0", K(n.style, e.steps[0].styles), setTimeout(() => {
333
+ n.style.transition = `all ${e.duration}s ${ee(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), K(n.style, e.steps[1].styles), setTimeout(() => {
298
334
  n.style.transition = "", n.style.transitionDelay = "";
299
335
  }, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
300
336
  });
301
337
  });
302
338
  }
303
- function ht(e) {
339
+ function xt(e) {
304
340
  const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
305
341
  if (!t.length) {
306
- Ve(e.elementId || e.id || "");
342
+ Ae(e.elementId || e.id || "");
307
343
  return;
308
344
  }
309
345
  Array.from(t).forEach((n) => {
310
- Ae(e, n);
346
+ Ne(e, n);
311
347
  let i = !1, o = !1;
312
- function l() {
313
- !i && r(n) ? (i = !0, o = !0, setTimeout(() => {
314
- q(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", a), setTimeout(() => {
348
+ function a() {
349
+ !i && s(n) ? (i = !0, o = !0, setTimeout(() => {
350
+ K(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", r), setTimeout(() => {
315
351
  o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
316
352
  }, (e.duration + (e.delay || 0)) * 1e3 + 100);
317
- })) : e.repeat && i && !o && !r(n) && (i = !1, q(n.style, e.steps[0].styles));
353
+ })) : e.repeat && i && !o && !s(n) && (i = !1, K(n.style, e.steps[0].styles));
318
354
  }
319
- const a = ut(l, 200, {
355
+ const r = bt(a, 200, {
320
356
  leading: !1
321
357
  });
322
- function r(f) {
323
- const u = f.getBoundingClientRect(), m = window.innerHeight, y = (e.thresholdPercent || 0) / 100 * m;
324
- return u.bottom > y && u.top < m - y;
358
+ function s(m) {
359
+ const h = m.getBoundingClientRect(), f = window.innerHeight, g = (e.thresholdPercent || 0) / 100 * f;
360
+ return h.bottom > g && h.top < f - g;
325
361
  }
326
- const c = e.steps[0].styles;
327
- function d() {
328
- q(n.style, c);
362
+ const d = e.steps[0].styles;
363
+ function c() {
364
+ K(n.style, d);
329
365
  }
330
- d(), setTimeout(() => {
331
- n.style.transition = `all ${e.duration}s ${te(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
332
- }), document.addEventListener("scroll", a, {
366
+ c(), setTimeout(() => {
367
+ n.style.transition = `all ${e.duration}s ${ee(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
368
+ }), document.addEventListener("scroll", r, {
333
369
  capture: !0,
334
370
  passive: !0
335
- }), l();
371
+ }), a();
336
372
  });
337
373
  }
338
- const We = (e) => Object.entries(e).map(([n, i]) => {
374
+ const Fe = (e) => Object.entries(e).map(([n, i]) => {
339
375
  if (typeof i == "string")
340
- return `${te(n)}: ${i};`;
341
- }).filter(Y), gt = (e) => We(e).join(`
342
- `), _ = ({
376
+ return `${ee(n)}: ${i};`;
377
+ }).filter(G), vt = (e) => Fe(e).join(`
378
+ `), J = ({
343
379
  mediaQuery: e,
344
380
  className: t,
345
381
  styles: n
346
382
  }) => {
347
383
  const i = `.${t} {
348
- ${gt(n)}
384
+ ${vt(n)}
349
385
  }`;
350
386
  return e ? `${e} {
351
387
  ${i}
352
388
  }` : i;
353
389
  };
354
- function bt({
390
+ function St({
355
391
  style: e
356
392
  }) {
357
393
  return e;
358
394
  }
359
- const pt = ({
395
+ const kt = ({
360
396
  block: e,
361
397
  context: t
362
- }) => Fe(bt({
398
+ }) => $e(St({
363
399
  style: e.style || {},
364
400
  context: t,
365
401
  block: e
366
402
  }));
367
- function Fe(e) {
368
- switch (H) {
403
+ function $e(e) {
404
+ switch (U) {
369
405
  case "svelte":
370
406
  case "vue":
371
407
  case "solid":
372
408
  case "angular":
373
- return We(e).join(" ");
409
+ return Fe(e).join(" ");
374
410
  case "qwik":
375
411
  case "reactNative":
376
412
  case "react":
@@ -378,29 +414,21 @@ function Fe(e) {
378
414
  return e;
379
415
  }
380
416
  }
381
- const yt = ({
417
+ const Ct = ({
382
418
  block: e,
383
- context: t,
384
- registeredComponents: n
419
+ registeredComponents: t
385
420
  }) => {
386
- var l;
387
- const i = (l = X({
388
- block: e,
389
- localState: t.localState,
390
- rootState: t.rootState,
391
- rootSetState: t.rootSetState,
392
- context: t.context,
393
- shouldEvaluateBindings: !1
394
- }).component) == null ? void 0 : l.name;
395
- if (!i)
421
+ var o;
422
+ const n = (o = e.component) == null ? void 0 : o.name;
423
+ if (!n)
396
424
  return null;
397
- const o = n[i];
398
- if (o)
399
- return o;
425
+ const i = t[n];
426
+ if (i)
427
+ return i;
400
428
  console.warn(`
401
- Could not find a registered component named "${i}".
429
+ Could not find a registered component named "${n}".
402
430
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
403
- }, xt = ({
431
+ }, Tt = ({
404
432
  block: e,
405
433
  context: t
406
434
  }) => {
@@ -410,7 +438,7 @@ const yt = ({
410
438
  } = e;
411
439
  if (!(n != null && n.collection))
412
440
  return;
413
- const o = U({
441
+ const o = H({
414
442
  code: n.collection,
415
443
  localState: t.localState,
416
444
  rootState: t.rootState,
@@ -420,41 +448,41 @@ const yt = ({
420
448
  });
421
449
  if (!Array.isArray(o))
422
450
  return;
423
- const l = n.collection.split(".").pop(), a = n.itemName || (l ? l + "Item" : "item");
424
- return o.map((c, d) => ({
451
+ const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
452
+ return o.map((d, c) => ({
425
453
  context: {
426
454
  ...t,
427
455
  localState: {
428
456
  ...t.localState,
429
- $index: d,
430
- $item: c,
431
- [a]: c,
432
- [`$${a}Index`]: d
457
+ $index: c,
458
+ $item: d,
459
+ [r]: d,
460
+ [`$${r}Index`]: c
433
461
  }
434
462
  },
435
463
  block: i
436
464
  }));
437
- }, vt = (e, t) => {
465
+ }, It = (e, t) => {
438
466
  var n;
439
467
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderLinkComponent ? {
440
468
  builderLinkComponent: t
441
469
  } : {};
442
- }, St = (e, t) => {
470
+ }, wt = (e, t) => {
443
471
  var n;
444
472
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderComponents ? {
445
473
  builderComponents: t
446
474
  } : {};
447
- }, kt = (e, t) => {
475
+ }, Rt = (e, t) => {
448
476
  var n;
449
477
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderBlock ? {
450
478
  builderBlock: t
451
479
  } : {};
452
- }, Ct = (e, t) => {
480
+ }, Et = (e, t) => {
453
481
  var n;
454
482
  return (n = e == null ? void 0 : e.shouldReceiveBuilderProps) != null && n.builderContext ? {
455
483
  builderContext: t
456
484
  } : {};
457
- }, $e = {
485
+ }, De = {
458
486
  small: {
459
487
  min: 320,
460
488
  default: 321,
@@ -470,11 +498,11 @@ const yt = ({
470
498
  default: 991,
471
499
  max: 1200
472
500
  }
473
- }, pe = (e, t = $e) => `@media (max-width: ${t[e].max}px)`, De = ({
501
+ }, pe = (e, t = De) => `@media (max-width: ${t[e].max}px)`, Le = ({
474
502
  small: e,
475
503
  medium: t
476
504
  }) => {
477
- const n = de($e);
505
+ const n = de(De);
478
506
  if (!e || !t)
479
507
  return n;
480
508
  const i = Math.floor(e / 2);
@@ -489,16 +517,16 @@ const yt = ({
489
517
  min: o,
490
518
  default: o + 1
491
519
  };
492
- const l = n.medium.max + 1;
520
+ const a = n.medium.max + 1;
493
521
  return n.large = {
494
522
  max: 2e3,
495
523
  // TODO: decide upper limit
496
- min: l,
497
- default: l + 1
524
+ min: a,
525
+ default: a + 1
498
526
  }, n;
499
527
  };
500
- function ne(e) {
501
- return /* @__PURE__ */ s(
528
+ function te(e) {
529
+ return /* @__PURE__ */ l(
502
530
  "style",
503
531
  {
504
532
  dangerouslySetInnerHTML: { __html: e.styles },
@@ -507,73 +535,59 @@ function ne(e) {
507
535
  }
508
536
  );
509
537
  }
510
- function Tt(e) {
538
+ function Pt(e) {
511
539
  function t() {
512
- const i = X({
513
- block: e.block,
514
- localState: e.context.localState,
515
- rootState: e.context.rootState,
516
- rootSetState: e.context.rootSetState,
517
- context: e.context.context,
518
- shouldEvaluateBindings: !0
519
- });
520
- return Y(i.hide) ? !i.hide : Y(i.show) ? i.show : !0;
540
+ const i = e.block;
541
+ return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
521
542
  }
522
543
  function n() {
523
- var p, B, E;
524
- const i = X({
525
- block: e.block,
526
- localState: e.context.localState,
527
- rootState: e.context.rootState,
528
- rootSetState: e.context.rootSetState,
529
- context: e.context.context,
530
- shouldEvaluateBindings: !0
531
- }), o = i.responsiveStyles, l = e.context.content, a = De(
532
- ((p = l == null ? void 0 : l.meta) == null ? void 0 : p.breakpoints) || {}
533
- ), r = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, f = i.id;
534
- if (!f)
544
+ var b, P, E;
545
+ const i = e.block, o = i.responsiveStyles, a = e.context.content, r = Le(
546
+ ((b = a == null ? void 0 : a.meta) == null ? void 0 : b.breakpoints) || {}
547
+ ), s = o == null ? void 0 : o.large, d = o == null ? void 0 : o.medium, c = o == null ? void 0 : o.small, m = i.id;
548
+ if (!m)
535
549
  return "";
536
- const u = r ? _({
537
- className: f,
538
- styles: r
539
- }) : "", m = c ? _({
540
- className: f,
541
- styles: c,
550
+ const h = s ? J({
551
+ className: m,
552
+ styles: s
553
+ }) : "", f = d ? J({
554
+ className: m,
555
+ styles: d,
542
556
  mediaQuery: pe(
543
557
  "medium",
544
- a
558
+ r
545
559
  )
546
- }) : "", g = d ? _({
547
- className: f,
548
- styles: d,
560
+ }) : "", u = c ? J({
561
+ className: m,
562
+ styles: c,
549
563
  mediaQuery: pe(
550
564
  "small",
551
- a
565
+ r
552
566
  )
553
- }) : "", y = i.animations && i.animations.find((A) => A.trigger === "hover");
554
- let C = "";
555
- if (y) {
556
- const A = ((E = (B = y.steps) == null ? void 0 : B[1]) == null ? void 0 : E.styles) || {};
557
- C = _({
558
- className: `${f}:hover`,
567
+ }) : "", g = i.animations && i.animations.find((A) => A.trigger === "hover");
568
+ let x = "";
569
+ if (g) {
570
+ const A = ((E = (P = g.steps) == null ? void 0 : P[1]) == null ? void 0 : E.styles) || {};
571
+ x = J({
572
+ className: `${m}:hover`,
559
573
  styles: {
560
574
  ...A,
561
- transition: `all ${y.duration}s ${te(
562
- y.easing
575
+ transition: `all ${g.duration}s ${ee(
576
+ g.easing
563
577
  )}`,
564
- transitionDelay: y.delay ? `${y.delay}s` : "0s"
578
+ transitionDelay: g.delay ? `${g.delay}s` : "0s"
565
579
  }
566
580
  }) || "";
567
581
  }
568
582
  return [
583
+ h,
584
+ f,
569
585
  u,
570
- m,
571
- g,
572
- C
586
+ x
573
587
  ].join(" ");
574
588
  }
575
- return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
576
- ne,
589
+ return /* @__PURE__ */ l(R, { children: n() && t() ? /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
590
+ te,
577
591
  {
578
592
  id: "builderio-block",
579
593
  styles: n(),
@@ -581,10 +595,10 @@ function Tt(e) {
581
595
  }
582
596
  ) }) : null });
583
597
  }
584
- function It(e) {
598
+ function Bt(e) {
585
599
  return e.charAt(0).toUpperCase() + e.slice(1);
586
600
  }
587
- const wt = (e) => `on${It(e)}`, Rt = (e, t) => (n) => U({
601
+ const Vt = (e) => `on${Bt(e)}`, At = (e, t) => (n) => H({
588
602
  code: e,
589
603
  context: t.context,
590
604
  localState: t.localState,
@@ -594,33 +608,33 @@ const wt = (e) => `on${It(e)}`, Rt = (e, t) => (n) => U({
594
608
  isExpression: !1,
595
609
  enableCache: !0
596
610
  });
597
- function Le(e) {
611
+ function Oe(e) {
598
612
  var i;
599
613
  const t = {}, n = (i = e.block.actions) != null ? i : {};
600
614
  for (const o in n) {
601
615
  if (!n.hasOwnProperty(o))
602
616
  continue;
603
- const l = n[o];
604
- let a = wt(o);
617
+ const a = n[o];
618
+ let r = Vt(o);
605
619
  if (e.stripPrefix)
606
- switch (H) {
620
+ switch (U) {
607
621
  case "vue":
608
- a = a.replace("v-on:", "");
622
+ r = r.replace("v-on:", "");
609
623
  break;
610
624
  case "svelte":
611
- a = a.replace("on:", "");
625
+ r = r.replace("on:", "");
612
626
  break;
613
627
  }
614
- t[a] = Rt(l, e);
628
+ t[r] = At(a, e);
615
629
  }
616
630
  return t;
617
631
  }
618
- function Et({
632
+ function Nt({
619
633
  properties: e
620
634
  }) {
621
635
  return e;
622
636
  }
623
- const Bt = (e) => ({
637
+ const Wt = (e) => ({
624
638
  href: e.href
625
639
  });
626
640
  function fe({
@@ -629,23 +643,23 @@ function fe({
629
643
  }) {
630
644
  var i;
631
645
  const n = {
632
- ...Bt(e),
646
+ ...Wt(e),
633
647
  ...e.properties,
634
648
  "builder-id": e.id,
635
- style: pt({
649
+ style: kt({
636
650
  block: e,
637
651
  context: t
638
652
  }),
639
- [K()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
653
+ [q()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
640
654
  };
641
- return Et({
655
+ return Nt({
642
656
  properties: n,
643
657
  context: t,
644
658
  block: e
645
659
  });
646
660
  }
647
- function Pt(e) {
648
- return /* @__PURE__ */ s(
661
+ function Ft(e) {
662
+ return /* @__PURE__ */ l(
649
663
  ue,
650
664
  {
651
665
  TagName: e.Wrapper,
@@ -653,7 +667,7 @@ function Pt(e) {
653
667
  block: e.block,
654
668
  context: e.context
655
669
  }),
656
- actionAttributes: Le({
670
+ actionAttributes: Oe({
657
671
  block: e.block,
658
672
  rootState: e.context.rootState,
659
673
  rootSetState: e.context.rootSetState,
@@ -665,14 +679,14 @@ function Pt(e) {
665
679
  }
666
680
  );
667
681
  }
668
- function Vt(e) {
682
+ function $t(e) {
669
683
  function t() {
670
684
  return e.includeBlockProps ? {
671
685
  ...fe({
672
686
  block: e.block,
673
687
  context: e.context
674
688
  }),
675
- ...Le({
689
+ ...Oe({
676
690
  block: e.block,
677
691
  rootState: e.context.rootState,
678
692
  rootSetState: e.context.rootSetState,
@@ -681,18 +695,18 @@ function Vt(e) {
681
695
  })
682
696
  } : {};
683
697
  }
684
- return /* @__PURE__ */ s(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children });
698
+ return /* @__PURE__ */ l(e.Wrapper, { ...e.wrapperProps, attributes: t(), children: e.children });
685
699
  }
686
- const At = ({
700
+ const Dt = ({
687
701
  componentOptions: e,
688
702
  builderBlock: t,
689
703
  context: n,
690
704
  componentRef: i,
691
705
  includeBlockProps: o,
692
- isInteractive: l,
693
- contextValue: a
706
+ isInteractive: a,
707
+ contextValue: r
694
708
  }) => {
695
- const r = {
709
+ const s = {
696
710
  ...e,
697
711
  /**
698
712
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
@@ -701,27 +715,27 @@ const At = ({
701
715
  ...o ? {
702
716
  attributes: fe({
703
717
  block: t,
704
- context: a
718
+ context: r
705
719
  })
706
720
  } : {}
707
721
  };
708
- return l ? {
722
+ return a ? {
709
723
  Wrapper: i,
710
724
  block: t,
711
725
  context: n,
712
726
  wrapperProps: e,
713
727
  includeBlockProps: o
714
- } : r;
728
+ } : s;
715
729
  };
716
730
  function ye(e) {
717
731
  var i;
718
732
  const [t, n] = T(
719
- () => e.isInteractive ? Vt : e.componentRef
733
+ () => e.isInteractive ? $t : e.componentRef
720
734
  );
721
- return /* @__PURE__ */ s(R, { children: e.componentRef ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
735
+ return /* @__PURE__ */ l(R, { children: e.componentRef ? /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
722
736
  t,
723
737
  {
724
- ...At({
738
+ ...Dt({
725
739
  componentOptions: e.componentOptions,
726
740
  builderBlock: e.builderBlock,
727
741
  context: e.context,
@@ -731,7 +745,7 @@ function ye(e) {
731
745
  isInteractive: e.isInteractive,
732
746
  contextValue: e.context
733
747
  }),
734
- children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ s(
748
+ children: (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
735
749
  z,
736
750
  {
737
751
  block: o,
@@ -744,9 +758,9 @@ function ye(e) {
744
758
  }
745
759
  ) }) : null });
746
760
  }
747
- function Nt(e) {
761
+ function Lt(e) {
748
762
  const [t, n] = T(() => e.repeatContext);
749
- return /* @__PURE__ */ s(me.Provider, { value: t, children: /* @__PURE__ */ s(
763
+ return /* @__PURE__ */ l(me.Provider, { value: t, children: /* @__PURE__ */ l(
750
764
  z,
751
765
  {
752
766
  block: e.block,
@@ -757,23 +771,22 @@ function Nt(e) {
757
771
  ) });
758
772
  }
759
773
  function z(e) {
760
- var c, d, f;
774
+ var m, h, f;
761
775
  function t() {
762
- return yt({
763
- block: e.block,
764
- context: e.context,
765
- registeredComponents: e.registeredComponents
766
- });
767
- }
768
- function n() {
769
- return xt({
776
+ return Tt({
770
777
  block: e.block,
771
778
  context: e.context
772
779
  });
773
780
  }
774
- function i() {
775
- var u;
776
- return (u = e.block.repeat) != null && u.collection ? e.block : X({
781
+ const [n, i] = T(() => ({
782
+ value: null,
783
+ update: !1
784
+ }));
785
+ function o() {
786
+ var g;
787
+ if (n.value && !n.update && !Ie())
788
+ return n.value;
789
+ const u = (g = e.block.repeat) != null && g.collection ? e.block : gt({
777
790
  block: e.block,
778
791
  localState: e.context.localState,
779
792
  rootState: e.context.rootState,
@@ -781,99 +794,108 @@ function z(e) {
781
794
  context: e.context.context,
782
795
  shouldEvaluateBindings: !0
783
796
  });
784
- }
785
- function o() {
786
- var m;
787
- return e.block.tagName === "a" || ((m = i().properties) == null ? void 0 : m.href) || i().href ? e.linkComponent || "a" : e.block.tagName || "div";
788
- }
789
- function l() {
790
- var g, y;
791
- if ((g = e.block.repeat) != null && g.collection)
792
- return !!((y = n == null ? void 0 : n()) != null && y.length);
793
- const u = "hide" in i() ? i().hide : !1;
794
- return ("show" in i() ? i().show : !0) && !u;
797
+ return n.value = u, n.update = !1, u;
795
798
  }
796
799
  function a() {
797
- var m, g;
798
- return !((m = t == null ? void 0 : t()) != null && m.component) && !n() ? (g = i().children) != null ? g : [] : [];
800
+ return Ct({
801
+ block: o(),
802
+ registeredComponents: e.registeredComponents
803
+ });
799
804
  }
800
805
  function r() {
801
- var u, m, g, y;
806
+ var g;
807
+ return e.block.tagName === "a" || ((g = o().properties) == null ? void 0 : g.href) || o().href ? e.linkComponent || "a" : e.block.tagName || "div";
808
+ }
809
+ function s() {
810
+ var x, b;
811
+ if ((x = e.block.repeat) != null && x.collection)
812
+ return !!((b = t == null ? void 0 : t()) != null && b.length);
813
+ const u = "hide" in o() ? o().hide : !1;
814
+ return ("show" in o() ? o().show : !0) && !u;
815
+ }
816
+ function d() {
817
+ var g, x;
818
+ return !((g = a == null ? void 0 : a()) != null && g.component) && !t() ? (x = o().children) != null ? x : [] : [];
819
+ }
820
+ function c() {
821
+ var u, g, x, b;
802
822
  return {
803
- blockChildren: (u = i().children) != null ? u : [],
804
- componentRef: (m = t == null ? void 0 : t()) == null ? void 0 : m.component,
823
+ blockChildren: (u = o().children) != null ? u : [],
824
+ componentRef: (g = a == null ? void 0 : a()) == null ? void 0 : g.component,
805
825
  componentOptions: {
806
- ...at(i()),
807
- ...kt(t(), i()),
808
- ...Ct(t(), e.context),
809
- ...vt(t(), e.linkComponent),
810
- ...St(
811
- t(),
826
+ ...at(o()),
827
+ ...Rt(a(), o()),
828
+ ...Et(a(), e.context),
829
+ ...It(a(), e.linkComponent),
830
+ ...wt(
831
+ a(),
812
832
  e.registeredComponents
813
833
  )
814
834
  },
815
835
  context: e.context,
816
836
  linkComponent: e.linkComponent,
817
837
  registeredComponents: e.registeredComponents,
818
- builderBlock: i(),
819
- includeBlockProps: ((g = t == null ? void 0 : t()) == null ? void 0 : g.noWrap) === !0,
820
- isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC && H === "rsc")
838
+ builderBlock: o(),
839
+ includeBlockProps: ((x = a == null ? void 0 : a()) == null ? void 0 : x.noWrap) === !0,
840
+ isInteractive: !((b = a == null ? void 0 : a()) != null && b.isRSC && U === "rsc")
821
841
  };
822
842
  }
823
- return P(() => {
824
- const u = i().id, m = i().animations;
825
- m && u && mt(
826
- m.map((g) => ({
827
- ...g,
843
+ return B(() => {
844
+ const u = o().id, g = o().animations;
845
+ g && u && pt(
846
+ g.map((x) => ({
847
+ ...x,
828
848
  elementId: u
829
849
  }))
830
850
  );
831
- }, []), /* @__PURE__ */ s(R, { children: l() ? /* @__PURE__ */ V(R, { children: [
832
- /* @__PURE__ */ s(Tt, { block: e.block, context: e.context }),
833
- (c = t == null ? void 0 : t()) != null && c.noWrap ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
851
+ }, []), B(() => {
852
+ n.update = !0;
853
+ }), /* @__PURE__ */ l(R, { children: s() ? /* @__PURE__ */ V(R, { children: [
854
+ /* @__PURE__ */ l(Pt, { block: o(), context: e.context }),
855
+ (m = a == null ? void 0 : a()) != null && m.noWrap ? /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
834
856
  ye,
835
857
  {
836
- componentRef: r().componentRef,
837
- componentOptions: r().componentOptions,
838
- blockChildren: r().blockChildren,
839
- context: r().context,
840
- registeredComponents: r().registeredComponents,
841
- linkComponent: r().linkComponent,
842
- builderBlock: r().builderBlock,
843
- includeBlockProps: r().includeBlockProps,
844
- isInteractive: r().isInteractive
858
+ componentRef: c().componentRef,
859
+ componentOptions: c().componentOptions,
860
+ blockChildren: c().blockChildren,
861
+ context: c().context,
862
+ registeredComponents: c().registeredComponents,
863
+ linkComponent: c().linkComponent,
864
+ builderBlock: c().builderBlock,
865
+ includeBlockProps: c().includeBlockProps,
866
+ isInteractive: c().isInteractive
845
867
  }
846
- ) }) : /* @__PURE__ */ s(R, { children: n() ? /* @__PURE__ */ s(R, { children: (f = n()) == null ? void 0 : f.map((u, m) => /* @__PURE__ */ s(
847
- Nt,
868
+ ) }) : /* @__PURE__ */ l(R, { children: t() ? /* @__PURE__ */ l(R, { children: (f = t()) == null ? void 0 : f.map((u, g) => /* @__PURE__ */ l(
869
+ Lt,
848
870
  {
849
871
  repeatContext: u.context,
850
872
  block: u.block,
851
873
  registeredComponents: e.registeredComponents,
852
874
  linkComponent: e.linkComponent
853
875
  },
854
- m
876
+ g
855
877
  )) }) : /* @__PURE__ */ V(
856
- Pt,
878
+ Ft,
857
879
  {
858
- Wrapper: o(),
859
- block: i(),
880
+ Wrapper: r(),
881
+ block: o(),
860
882
  context: e.context,
861
883
  children: [
862
- /* @__PURE__ */ s(
884
+ /* @__PURE__ */ l(
863
885
  ye,
864
886
  {
865
- componentRef: r().componentRef,
866
- componentOptions: r().componentOptions,
867
- blockChildren: r().blockChildren,
868
- context: r().context,
869
- registeredComponents: r().registeredComponents,
870
- linkComponent: r().linkComponent,
871
- builderBlock: r().builderBlock,
872
- includeBlockProps: r().includeBlockProps,
873
- isInteractive: r().isInteractive
887
+ componentRef: c().componentRef,
888
+ componentOptions: c().componentOptions,
889
+ blockChildren: c().blockChildren,
890
+ context: c().context,
891
+ registeredComponents: c().registeredComponents,
892
+ linkComponent: c().linkComponent,
893
+ builderBlock: c().builderBlock,
894
+ includeBlockProps: c().includeBlockProps,
895
+ isInteractive: c().isInteractive
874
896
  }
875
897
  ),
876
- (d = a()) == null ? void 0 : d.map((u) => /* @__PURE__ */ s(
898
+ (h = d()) == null ? void 0 : h.map((u) => /* @__PURE__ */ l(
877
899
  z,
878
900
  {
879
901
  block: u,
@@ -888,14 +910,15 @@ function z(e) {
888
910
  ) })
889
911
  ] }) : null });
890
912
  }
891
- function Wt(e) {
892
- function t() {
893
- var o;
894
- return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
895
- }
913
+ function Ot(e) {
914
+ const t = _(null);
896
915
  function n() {
897
- var o, l;
898
- $() && !((o = e.blocks) != null && o.length) && ((l = window.parent) == null || l.postMessage(
916
+ var a;
917
+ return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
918
+ }
919
+ function i() {
920
+ var a, r;
921
+ $() && !((a = e.blocks) != null && a.length) && ((r = window.parent) == null || r.postMessage(
899
922
  {
900
923
  type: "builder.clickEmptyBlocks",
901
924
  data: {
@@ -906,9 +929,9 @@ function Wt(e) {
906
929
  "*"
907
930
  ));
908
931
  }
909
- function i() {
910
- var o, l;
911
- $() && !((o = e.blocks) != null && o.length) && ((l = window.parent) == null || l.postMessage(
932
+ function o() {
933
+ var a, r;
934
+ $() && !((a = e.blocks) != null && a.length) && ((r = window.parent) == null || r.postMessage(
912
935
  {
913
936
  type: "builder.hoverEmptyBlocks",
914
937
  data: {
@@ -919,22 +942,24 @@ function Wt(e) {
919
942
  "*"
920
943
  ));
921
944
  }
922
- return /* @__PURE__ */ V(R, { children: [
923
- /* @__PURE__ */ s(
945
+ return B(() => {
946
+ }, []), /* @__PURE__ */ V(R, { children: [
947
+ /* @__PURE__ */ l(
924
948
  e.BlocksWrapper,
925
949
  {
926
- className: t() + " props-blocks-wrapper-7cd1560e",
950
+ ref: t,
951
+ className: n() + " props-blocks-wrapper-51ef31b4",
927
952
  "builder-path": e.path,
928
953
  "builder-parent-id": e.parent,
929
954
  style: e.styleProp,
930
- onClick: (o) => n(),
931
- onMouseEnter: (o) => i(),
932
- onKeyPress: (o) => n(),
955
+ onClick: (a) => i(),
956
+ onMouseEnter: (a) => o(),
957
+ onKeyPress: (a) => i(),
933
958
  ...e.BlocksWrapperProps,
934
959
  children: e.children
935
960
  }
936
961
  ),
937
- /* @__PURE__ */ s("style", { children: `.props-blocks-wrapper-7cd1560e {
962
+ /* @__PURE__ */ l("style", { children: `.props-blocks-wrapper-51ef31b4 {
938
963
  display: flex;
939
964
  flex-direction: column;
940
965
  align-items: stretch;
@@ -942,10 +967,10 @@ function Wt(e) {
942
967
  ] });
943
968
  }
944
969
  function D(e) {
945
- var i, o, l;
970
+ var i, o, a;
946
971
  const t = be(me), n = be(Be);
947
- return /* @__PURE__ */ s(
948
- Wt,
972
+ return /* @__PURE__ */ l(
973
+ Ot,
949
974
  {
950
975
  blocks: e.blocks,
951
976
  parent: e.parent,
@@ -953,64 +978,64 @@ function D(e) {
953
978
  styleProp: e.styleProp,
954
979
  BlocksWrapper: ((i = e.context) == null ? void 0 : i.BlocksWrapper) || t.BlocksWrapper,
955
980
  BlocksWrapperProps: ((o = e.context) == null ? void 0 : o.BlocksWrapperProps) || t.BlocksWrapperProps,
956
- children: e.blocks ? /* @__PURE__ */ s(R, { children: (l = e.blocks) == null ? void 0 : l.map((a) => /* @__PURE__ */ s(
981
+ children: e.blocks ? /* @__PURE__ */ l(R, { children: (a = e.blocks) == null ? void 0 : a.map((r) => /* @__PURE__ */ l(
957
982
  z,
958
983
  {
959
- block: a,
984
+ block: r,
960
985
  linkComponent: e.linkComponent,
961
986
  context: e.context || t,
962
987
  registeredComponents: e.registeredComponents || n.registeredComponents
963
988
  },
964
- a.id
989
+ r.id
965
990
  )) }) : null
966
991
  }
967
992
  );
968
993
  }
969
- const Ft = (e) => `builder-columns ${e}-breakpoints`;
970
- function $t(e) {
994
+ const Ut = (e) => `builder-columns ${e}-breakpoints`;
995
+ function jt(e) {
971
996
  var A, O;
972
997
  const [t, n] = T(
973
998
  () => typeof e.space == "number" ? e.space || 0 : 20
974
- ), [i, o] = T(() => e.columns || []), [l, a] = T(
999
+ ), [i, o] = T(() => e.columns || []), [a, r] = T(
975
1000
  () => e.stackColumnsAt || "tablet"
976
1001
  );
977
- function r(x) {
978
- return x.link ? e.builderLinkComponent || "a" : "div";
1002
+ function s(v) {
1003
+ return v.link ? e.builderLinkComponent || "a" : "div";
979
1004
  }
980
- function c(x) {
1005
+ function d(v) {
981
1006
  var w;
982
- return ((w = i[x]) == null ? void 0 : w.width) || 100 / i.length;
1007
+ return ((w = i[v]) == null ? void 0 : w.width) || 100 / i.length;
983
1008
  }
984
- function d(x) {
985
- const w = c(x), N = t * (i.length - 1) * (w / 100);
1009
+ function c(v) {
1010
+ const w = d(v), N = t * (i.length - 1) * (w / 100);
986
1011
  return `calc(${w}% - ${N}px)`;
987
1012
  }
988
- function f({
989
- stackedStyle: x,
1013
+ function m({
1014
+ stackedStyle: v,
990
1015
  desktopStyle: w
991
1016
  }) {
992
- return l === "tablet" ? x : w;
1017
+ return a === "tablet" ? v : w;
993
1018
  }
994
- function u({
995
- stackedStyle: x,
1019
+ function h({
1020
+ stackedStyle: v,
996
1021
  desktopStyle: w
997
1022
  }) {
998
- return l === "never" ? w : x;
1023
+ return a === "never" ? w : v;
999
1024
  }
1000
- const [m, g] = T(
1025
+ const [f, u] = T(
1001
1026
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
1002
1027
  );
1003
- function y() {
1028
+ function g() {
1004
1029
  return {
1005
- "--flex-dir": m,
1006
- "--flex-dir-tablet": f({
1007
- stackedStyle: m,
1030
+ "--flex-dir": f,
1031
+ "--flex-dir-tablet": m({
1032
+ stackedStyle: f,
1008
1033
  desktopStyle: "row"
1009
1034
  })
1010
1035
  };
1011
1036
  }
1012
- function C(x) {
1013
- const w = x === 0 ? 0 : t, N = d(x), b = `${w}px`, h = "100%", v = 0;
1037
+ function x(v) {
1038
+ const w = v === 0 ? 0 : t, N = c(v), y = `${w}px`, p = "100%", S = 0;
1014
1039
  return {
1015
1040
  ...{
1016
1041
  display: "flex",
@@ -1018,90 +1043,90 @@ function $t(e) {
1018
1043
  alignItems: "stretch"
1019
1044
  },
1020
1045
  width: N,
1021
- ["marginLeft"]: b,
1022
- "--column-width-mobile": u({
1023
- stackedStyle: h,
1046
+ ["marginLeft"]: y,
1047
+ "--column-width-mobile": h({
1048
+ stackedStyle: p,
1024
1049
  desktopStyle: N
1025
1050
  }),
1026
- "--column-margin-left-mobile": u({
1027
- stackedStyle: v,
1028
- desktopStyle: b
1051
+ "--column-margin-left-mobile": h({
1052
+ stackedStyle: S,
1053
+ desktopStyle: y
1029
1054
  }),
1030
- "--column-width-tablet": f({
1031
- stackedStyle: h,
1055
+ "--column-width-tablet": m({
1056
+ stackedStyle: p,
1032
1057
  desktopStyle: N
1033
1058
  }),
1034
- "--column-margin-left-tablet": f({
1035
- stackedStyle: v,
1036
- desktopStyle: b
1059
+ "--column-margin-left-tablet": m({
1060
+ stackedStyle: S,
1061
+ desktopStyle: y
1037
1062
  })
1038
1063
  };
1039
1064
  }
1040
- function p(x) {
1041
- var N, b;
1042
- return De(
1043
- ((b = (N = e.builderContext.content) == null ? void 0 : N.meta) == null ? void 0 : b.breakpoints) || {}
1044
- )[x].max;
1065
+ function b(v) {
1066
+ var N, y;
1067
+ return Le(
1068
+ ((y = (N = e.builderContext.content) == null ? void 0 : N.meta) == null ? void 0 : y.breakpoints) || {}
1069
+ )[v].max;
1045
1070
  }
1046
- function B() {
1047
- const x = `.${e.builderBlock.id}-breakpoints > .builder-column`;
1071
+ function P() {
1072
+ const v = `.${e.builderBlock.id}-breakpoints > .builder-column`;
1048
1073
  return `
1049
- @media (max-width: ${p("medium")}px) {
1074
+ @media (max-width: ${b("medium")}px) {
1050
1075
  .${e.builderBlock.id}-breakpoints {
1051
1076
  flex-direction: var(--flex-dir-tablet);
1052
1077
  align-items: stretch;
1053
1078
  }
1054
1079
 
1055
- ${x} {
1080
+ ${v} {
1056
1081
  width: var(--column-width-tablet) !important;
1057
1082
  margin-left: var(--column-margin-left-tablet) !important;
1058
1083
  }
1059
1084
  }
1060
1085
 
1061
- @media (max-width: ${p("small")}px) {
1086
+ @media (max-width: ${b("small")}px) {
1062
1087
  .${e.builderBlock.id}-breakpoints {
1063
1088
  flex-direction: var(--flex-dir);
1064
1089
  align-items: stretch;
1065
1090
  }
1066
1091
 
1067
- ${x} {
1092
+ ${v} {
1068
1093
  width: var(--column-width-mobile) !important;
1069
1094
  margin-left: var(--column-margin-left-mobile) !important;
1070
1095
  }
1071
1096
  },
1072
1097
  `;
1073
1098
  }
1074
- function E(x, w) {
1099
+ function E(v, w) {
1075
1100
  return {
1076
- ...x.link ? {
1077
- href: x.link
1101
+ ...v.link ? {
1102
+ href: v.link
1078
1103
  } : {},
1079
- [K()]: "builder-column",
1080
- style: Fe(C(w))
1104
+ [q()]: "builder-column",
1105
+ style: $e(x(w))
1081
1106
  };
1082
1107
  }
1083
1108
  return /* @__PURE__ */ V(R, { children: [
1084
1109
  /* @__PURE__ */ V(
1085
1110
  "div",
1086
1111
  {
1087
- className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-34f576bb",
1088
- style: y(),
1112
+ className: Ut((A = e.builderBlock) == null ? void 0 : A.id) + " div-34f576bb",
1113
+ style: g(),
1089
1114
  children: [
1090
- /* @__PURE__ */ s(
1091
- ne,
1115
+ /* @__PURE__ */ l(
1116
+ te,
1092
1117
  {
1093
1118
  id: "builderio-columns",
1094
- styles: B(),
1119
+ styles: P(),
1095
1120
  nonce: e.builderContext.nonce
1096
1121
  }
1097
1122
  ),
1098
- (O = e.columns) == null ? void 0 : O.map((x, w) => /* @__PURE__ */ s(
1123
+ (O = e.columns) == null ? void 0 : O.map((v, w) => /* @__PURE__ */ l(
1099
1124
  ue,
1100
1125
  {
1101
- TagName: r(x),
1126
+ TagName: s(v),
1102
1127
  actionAttributes: {},
1103
- attributes: E(x, w),
1104
- children: /* @__PURE__ */ s(
1128
+ attributes: E(v, w),
1129
+ children: /* @__PURE__ */ l(
1105
1130
  D,
1106
1131
  {
1107
1132
  path: `component.options.columns.${w}.blocks`,
@@ -1112,7 +1137,7 @@ function $t(e) {
1112
1137
  context: e.builderContext,
1113
1138
  registeredComponents: e.builderComponents,
1114
1139
  linkComponent: e.builderLinkComponent,
1115
- blocks: x.blocks
1140
+ blocks: v.blocks
1116
1141
  }
1117
1142
  )
1118
1143
  },
@@ -1121,83 +1146,83 @@ function $t(e) {
1121
1146
  ]
1122
1147
  }
1123
1148
  ),
1124
- /* @__PURE__ */ s("style", { children: `.div-34f576bb {
1149
+ /* @__PURE__ */ l("style", { children: `.div-34f576bb {
1125
1150
  display: flex;
1126
1151
  line-height: normal;
1127
1152
  }` })
1128
1153
  ] });
1129
1154
  }
1130
- function Dt(e) {
1131
- return /* @__PURE__ */ s("span", { children: e.children });
1155
+ function Mt(e) {
1156
+ return /* @__PURE__ */ l("span", { children: e.children });
1132
1157
  }
1133
1158
  function xe(e) {
1134
1159
  return e.replace(/http(s)?:/, "");
1135
1160
  }
1136
- function Lt(e = "", t, n) {
1161
+ function Ht(e = "", t, n) {
1137
1162
  const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
1138
1163
  return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
1139
1164
  }
1140
- function Ot(e, t) {
1165
+ function Kt(e, t) {
1141
1166
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
1142
1167
  return e;
1143
1168
  if (t === "master")
1144
1169
  return xe(e);
1145
1170
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
1146
1171
  if (n) {
1147
- const i = e.split(n[0]), o = n[3], l = t.match("x") ? t : `${t}x`;
1148
- return xe(`${i[0]}_${l}${o}`);
1172
+ const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
1173
+ return xe(`${i[0]}_${a}${o}`);
1149
1174
  }
1150
1175
  return null;
1151
1176
  }
1152
- function oe(e) {
1177
+ function ie(e) {
1153
1178
  if (!e)
1154
1179
  return e;
1155
1180
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
1156
1181
  if (e.match(/builder\.io/)) {
1157
1182
  let n = e;
1158
1183
  const i = Number(e.split("?width=")[1]);
1159
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Lt(e, "width", o)} ${o}w`).concat([n]).join(", ");
1184
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${Ht(e, "width", o)} ${o}w`).concat([n]).join(", ");
1160
1185
  }
1161
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Ot(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
1186
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Kt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
1162
1187
  }
1163
- function jt(e) {
1164
- var o, l, a, r, c, d;
1188
+ function qt(e) {
1189
+ var o, a, r, s, d, c;
1165
1190
  function t() {
1166
- var m;
1167
- const u = e.image || e.src;
1168
- if (!u || // We can auto add srcset for cdn.builder.io and shopify
1191
+ var f;
1192
+ const h = e.image || e.src;
1193
+ if (!h || // We can auto add srcset for cdn.builder.io and shopify
1169
1194
  // images, otherwise you can supply this prop manually
1170
- !(u.match(/builder\.io/) || u.match(/cdn\.shopify\.com/)))
1195
+ !(h.match(/builder\.io/) || h.match(/cdn\.shopify\.com/)))
1171
1196
  return e.srcset;
1172
1197
  if (!e.noWebp) {
1173
- if (e.srcset && ((m = e.image) != null && m.includes("builder.io/api/v1/image"))) {
1198
+ if (e.srcset && ((f = e.image) != null && f.includes("builder.io/api/v1/image"))) {
1174
1199
  if (!e.srcset.includes(e.image.split("?")[0]))
1175
- return console.debug("Removed given srcset"), oe(u);
1200
+ return console.debug("Removed given srcset"), ie(h);
1176
1201
  } else if (e.image && !e.srcset)
1177
- return oe(u);
1178
- return oe(u);
1202
+ return ie(h);
1203
+ return ie(h);
1179
1204
  }
1180
1205
  }
1181
1206
  function n() {
1182
- var f;
1183
- return (f = t == null ? void 0 : t()) != null && f.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1207
+ var m;
1208
+ return (m = t == null ? void 0 : t()) != null && m.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
1184
1209
  }
1185
1210
  function i() {
1186
- const f = {
1211
+ const m = {
1187
1212
  position: "absolute",
1188
1213
  height: "100%",
1189
1214
  width: "100%",
1190
1215
  left: "0px",
1191
1216
  top: "0px"
1192
1217
  };
1193
- return e.aspectRatio ? f : void 0;
1218
+ return e.aspectRatio ? m : void 0;
1194
1219
  }
1195
- return P(() => {
1220
+ return B(() => {
1196
1221
  }, []), /* @__PURE__ */ V(R, { children: [
1197
1222
  /* @__PURE__ */ V(R, { children: [
1198
1223
  /* @__PURE__ */ V("picture", { children: [
1199
- n() ? /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) : null,
1200
- /* @__PURE__ */ s(
1224
+ n() ? /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) : null,
1225
+ /* @__PURE__ */ l(
1201
1226
  "img",
1202
1227
  {
1203
1228
  loading: e.highPriority ? "eager" : "lazy",
@@ -1216,7 +1241,7 @@ function jt(e) {
1216
1241
  }
1217
1242
  )
1218
1243
  ] }),
1219
- e.aspectRatio && !((l = (o = e.builderBlock) == null ? void 0 : o.children) != null && l.length && e.fitContent) ? /* @__PURE__ */ s(
1244
+ e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ l(
1220
1245
  "div",
1221
1246
  {
1222
1247
  className: "builder-image-sizer div-2d6925f2",
@@ -1225,10 +1250,10 @@ function jt(e) {
1225
1250
  }
1226
1251
  }
1227
1252
  ) : null,
1228
- (r = (a = e.builderBlock) == null ? void 0 : a.children) != null && r.length && e.fitContent ? /* @__PURE__ */ s(R, { children: e.children }) : null,
1229
- !e.fitContent && ((d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length) ? /* @__PURE__ */ s("div", { className: "div-2d6925f2-2", children: e.children }) : null
1253
+ (s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(R, { children: e.children }) : null,
1254
+ !e.fitContent && ((c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length) ? /* @__PURE__ */ l("div", { className: "div-2d6925f2-2", children: e.children }) : null
1230
1255
  ] }),
1231
- /* @__PURE__ */ s("style", { children: `.img-2d6925f2 {
1256
+ /* @__PURE__ */ l("style", { children: `.img-2d6925f2 {
1232
1257
  opacity: 1;
1233
1258
  transition: opacity 0.2s ease-in-out;
1234
1259
  }.div-2d6925f2 {
@@ -1247,8 +1272,8 @@ function jt(e) {
1247
1272
  }` })
1248
1273
  ] });
1249
1274
  }
1250
- function Mt(e) {
1251
- return /* @__PURE__ */ s(
1275
+ function _t(e) {
1276
+ return /* @__PURE__ */ l(
1252
1277
  "section",
1253
1278
  {
1254
1279
  ...e.attributes,
@@ -1268,7 +1293,7 @@ function Mt(e) {
1268
1293
  }
1269
1294
  );
1270
1295
  }
1271
- const ae = {
1296
+ const oe = {
1272
1297
  "@type": "@builder.io/sdk:Element",
1273
1298
  layerName: "Accordion item title",
1274
1299
  responsiveStyles: {
@@ -1297,7 +1322,7 @@ const ae = {
1297
1322
  }
1298
1323
  }
1299
1324
  }]
1300
- }, re = {
1325
+ }, ae = {
1301
1326
  "@type": "@builder.io/sdk:Element",
1302
1327
  layerName: "Accordion item detail",
1303
1328
  responsiveStyles: {
@@ -1328,7 +1353,7 @@ const ae = {
1328
1353
  }
1329
1354
  }
1330
1355
  }]
1331
- }, Ut = {
1356
+ }, zt = {
1332
1357
  name: "Builder:Accordion",
1333
1358
  canHaveChildren: !0,
1334
1359
  image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
@@ -1345,19 +1370,19 @@ const ae = {
1345
1370
  name: "title",
1346
1371
  type: "uiBlocks",
1347
1372
  hideFromUI: !0,
1348
- defaultValue: [ae]
1373
+ defaultValue: [oe]
1349
1374
  }, {
1350
1375
  name: "detail",
1351
1376
  type: "uiBlocks",
1352
1377
  hideFromUI: !0,
1353
- defaultValue: [re]
1378
+ defaultValue: [ae]
1354
1379
  }],
1355
1380
  defaultValue: [{
1356
- title: [ae],
1357
- detail: [re]
1381
+ title: [oe],
1382
+ detail: [ae]
1358
1383
  }, {
1359
- title: [ae],
1360
- detail: [re]
1384
+ title: [oe],
1385
+ detail: [ae]
1361
1386
  }],
1362
1387
  showIf: (e) => !e.get("useChildrenForItems")
1363
1388
  }, {
@@ -1393,8 +1418,8 @@ const ae = {
1393
1418
  builderLinkComponent: !0
1394
1419
  }
1395
1420
  }, ve = (e) => e.toString();
1396
- function Ht(e) {
1397
- var u;
1421
+ function Jt(e) {
1422
+ var h;
1398
1423
  const [t, n] = T(() => []);
1399
1424
  function i() {
1400
1425
  return !!(e.grid || e.oneAtATime);
@@ -1411,8 +1436,8 @@ function Ht(e) {
1411
1436
  }
1412
1437
  };
1413
1438
  }
1414
- function l() {
1415
- const g = {
1439
+ function a() {
1440
+ const u = {
1416
1441
  ...{
1417
1442
  display: "flex",
1418
1443
  flexDirection: "column"
@@ -1421,73 +1446,73 @@ function Ht(e) {
1421
1446
  cursor: "pointer"
1422
1447
  };
1423
1448
  return Object.fromEntries(
1424
- Object.entries(g).filter(([y, C]) => C !== void 0)
1449
+ Object.entries(u).filter(([g, x]) => x !== void 0)
1425
1450
  );
1426
1451
  }
1427
- function a(m) {
1428
- return `builder-accordion-title builder-accordion-title-${t.includes(m) ? "open" : "closed"}`;
1452
+ function r(f) {
1453
+ return `builder-accordion-title builder-accordion-title-${t.includes(f) ? "open" : "closed"}`;
1429
1454
  }
1430
- function r(m) {
1431
- return `builder-accordion-detail builder-accordion-detail-${t.includes(m) ? "open" : "closed"}`;
1455
+ function s(f) {
1456
+ return `builder-accordion-detail builder-accordion-detail-${t.includes(f) ? "open" : "closed"}`;
1432
1457
  }
1433
- function c() {
1434
- let m = null;
1458
+ function d() {
1459
+ let f = null;
1435
1460
  if (e.grid && t.length && document) {
1436
- const y = t[0];
1437
- let p = document.querySelector(
1438
- `.builder-accordion-title[data-index="${y}"]`
1461
+ const g = t[0];
1462
+ let b = document.querySelector(
1463
+ `.builder-accordion-title[data-index="${g}"]`
1439
1464
  );
1440
- if (m = y, p) {
1441
- let B = p.getBoundingClientRect();
1442
- for (; p = p && p.nextElementSibling; )
1443
- if (p) {
1444
- if (p.classList.contains("builder-accordion-detail"))
1465
+ if (f = g, b) {
1466
+ let P = b.getBoundingClientRect();
1467
+ for (; b = b && b.nextElementSibling; )
1468
+ if (b) {
1469
+ if (b.classList.contains("builder-accordion-detail"))
1445
1470
  continue;
1446
- const E = p.getBoundingClientRect();
1447
- if (E.left > B.left) {
1471
+ const E = b.getBoundingClientRect();
1472
+ if (E.left > P.left) {
1448
1473
  const A = parseInt(
1449
- p.getAttribute("data-index") || "",
1474
+ b.getAttribute("data-index") || "",
1450
1475
  10
1451
1476
  );
1452
- isNaN(A) || (B = E, m = A);
1477
+ isNaN(A) || (P = E, f = A);
1453
1478
  } else
1454
1479
  break;
1455
1480
  }
1456
1481
  }
1457
1482
  }
1458
- return typeof m == "number" && (m = m + 1), m;
1483
+ return typeof f == "number" && (f = f + 1), f;
1459
1484
  }
1460
- function d() {
1461
- const m = {
1462
- order: typeof c() == "number" ? c() : void 0,
1485
+ function c() {
1486
+ const f = {
1487
+ order: typeof d() == "number" ? d() : void 0,
1463
1488
  ...e.grid && {
1464
1489
  width: "100%"
1465
1490
  }
1466
1491
  };
1467
1492
  return Object.fromEntries(
1468
- Object.entries(m).filter(([g, y]) => y !== void 0)
1493
+ Object.entries(f).filter(([u, g]) => g !== void 0)
1469
1494
  );
1470
1495
  }
1471
- function f(m) {
1472
- t.includes(m) ? n(i() ? [] : t.filter((g) => g !== m)) : n(i() ? [m] : t.concat(m));
1496
+ function m(f) {
1497
+ t.includes(f) ? n(i() ? [] : t.filter((u) => u !== f)) : n(i() ? [f] : t.concat(f));
1473
1498
  }
1474
- return /* @__PURE__ */ s("div", { className: "builder-accordion", style: o(), children: (u = e.items) == null ? void 0 : u.map((m, g) => /* @__PURE__ */ V(R, { children: [
1475
- /* @__PURE__ */ s(
1499
+ return /* @__PURE__ */ l("div", { className: "builder-accordion", style: o(), children: (h = e.items) == null ? void 0 : h.map((f, u) => /* @__PURE__ */ V(R, { children: [
1500
+ /* @__PURE__ */ l(
1476
1501
  "div",
1477
1502
  {
1478
- className: a(g),
1503
+ className: r(u),
1479
1504
  style: {
1480
- ...l(),
1505
+ ...a(),
1481
1506
  width: e.grid ? e.gridRowWidth : void 0,
1482
- order: c() !== null ? ve(g) : ve(g + 1)
1507
+ order: d() !== null ? ve(u) : ve(u + 1)
1483
1508
  },
1484
- "data-index": g,
1485
- onClick: (y) => f(g),
1486
- children: /* @__PURE__ */ s(
1509
+ "data-index": u,
1510
+ onClick: (g) => m(u),
1511
+ children: /* @__PURE__ */ l(
1487
1512
  D,
1488
1513
  {
1489
- blocks: m.title,
1490
- path: `items.${g}.title`,
1514
+ blocks: f.title,
1515
+ path: `items.${u}.title`,
1491
1516
  parent: e.builderBlock.id,
1492
1517
  context: e.builderContext,
1493
1518
  registeredComponents: e.builderComponents,
@@ -1496,16 +1521,16 @@ function Ht(e) {
1496
1521
  )
1497
1522
  }
1498
1523
  ),
1499
- t.includes(g) ? /* @__PURE__ */ s(
1524
+ t.includes(u) ? /* @__PURE__ */ l(
1500
1525
  "div",
1501
1526
  {
1502
- className: r(g),
1503
- style: d(),
1504
- children: /* @__PURE__ */ s(
1527
+ className: s(u),
1528
+ style: c(),
1529
+ children: /* @__PURE__ */ l(
1505
1530
  D,
1506
1531
  {
1507
- blocks: m.detail,
1508
- path: `items.${g}.detail`,
1532
+ blocks: f.detail,
1533
+ path: `items.${u}.detail`,
1509
1534
  parent: e.builderBlock.id,
1510
1535
  context: e.builderContext,
1511
1536
  registeredComponents: e.builderComponents,
@@ -1516,7 +1541,7 @@ function Ht(e) {
1516
1541
  ) : null
1517
1542
  ] })) });
1518
1543
  }
1519
- const qt = {
1544
+ const Yt = {
1520
1545
  name: "Core:Button",
1521
1546
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1522
1547
  defaultStyles: {
@@ -1552,7 +1577,7 @@ const qt = {
1552
1577
  shouldReceiveBuilderProps: {
1553
1578
  builderLinkComponent: !0
1554
1579
  }
1555
- }, Kt = {
1580
+ }, Gt = {
1556
1581
  // TODO: ways to statically preprocess JSON for references, functions, etc
1557
1582
  name: "Columns",
1558
1583
  isRSC: !0,
@@ -1731,7 +1756,7 @@ const qt = {
1731
1756
  });
1732
1757
  }
1733
1758
  const n = e.get("columns");
1734
- Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((l) => !l.get("width")) || n.reduce((r, c) => r + c.get("width"), 0) !== 100) && t();
1759
+ Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((s, d) => s + d.get("width"), 0) !== 100) && t();
1735
1760
  }
1736
1761
  }, {
1737
1762
  name: "space",
@@ -1759,13 +1784,13 @@ const qt = {
1759
1784
  builderComponents: !0,
1760
1785
  builderLinkComponent: !0
1761
1786
  }
1762
- }, zt = {
1787
+ }, Qt = {
1763
1788
  name: "Fragment",
1764
1789
  static: !0,
1765
1790
  hidden: !0,
1766
1791
  canHaveChildren: !0,
1767
1792
  noWrap: !0
1768
- }, _t = {
1793
+ }, Xt = {
1769
1794
  name: "Image",
1770
1795
  static: !0,
1771
1796
  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",
@@ -1785,29 +1810,29 @@ const qt = {
1785
1810
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1786
1811
  onChange: (e) => {
1787
1812
  e.delete("srcset"), e.delete("noWebp");
1788
- function n(a, r = 6e4) {
1789
- return new Promise((c, d) => {
1790
- const f = document.createElement("img");
1791
- let u = !1;
1792
- f.onload = () => {
1793
- u = !0, c(f);
1794
- }, f.addEventListener("error", (m) => {
1795
- console.warn("Image load failed", m.error), d(m.error);
1796
- }), f.src = a, setTimeout(() => {
1797
- u || d(new Error("Image load timed out"));
1798
- }, r);
1813
+ function n(r, s = 6e4) {
1814
+ return new Promise((d, c) => {
1815
+ const m = document.createElement("img");
1816
+ let h = !1;
1817
+ m.onload = () => {
1818
+ h = !0, d(m);
1819
+ }, m.addEventListener("error", (f) => {
1820
+ console.warn("Image load failed", f.error), c(f.error);
1821
+ }), m.src = r, setTimeout(() => {
1822
+ h || c(new Error("Image load timed out"));
1823
+ }, s);
1799
1824
  });
1800
1825
  }
1801
- function i(a) {
1802
- return Math.round(a * 1e3) / 1e3;
1826
+ function i(r) {
1827
+ return Math.round(r * 1e3) / 1e3;
1803
1828
  }
1804
- const o = e.get("image"), l = e.get("aspectRatio");
1805
- if (fetch(o).then((a) => a.blob()).then((a) => {
1806
- a.type.includes("svg") && e.set("noWebp", !0);
1807
- }), o && (!l || l === 0.7041))
1808
- return n(o).then((a) => {
1809
- const r = e.get("aspectRatio");
1810
- e.get("image") === o && (!r || r === 0.7041) && a.width && a.height && (e.set("aspectRatio", i(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
1829
+ const o = e.get("image"), a = e.get("aspectRatio");
1830
+ if (fetch(o).then((r) => r.blob()).then((r) => {
1831
+ r.type.includes("svg") && e.set("noWebp", !0);
1832
+ }), o && (!a || a === 0.7041))
1833
+ return n(o).then((r) => {
1834
+ const s = e.get("aspectRatio");
1835
+ e.get("image") === o && (!s || s === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1811
1836
  });
1812
1837
  }
1813
1838
  }, {
@@ -1873,7 +1898,7 @@ const qt = {
1873
1898
  shouldReceiveBuilderProps: {
1874
1899
  builderBlock: !0
1875
1900
  }
1876
- }, Jt = {
1901
+ }, Zt = {
1877
1902
  name: "Core:Section",
1878
1903
  static: !0,
1879
1904
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1912,7 +1937,7 @@ const qt = {
1912
1937
  }
1913
1938
  }
1914
1939
  }]
1915
- }, Yt = {
1940
+ }, en = {
1916
1941
  name: "Slot",
1917
1942
  isRSC: !0,
1918
1943
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1929,9 +1954,9 @@ const qt = {
1929
1954
  builderContext: !0
1930
1955
  }
1931
1956
  };
1932
- function Gt(e) {
1957
+ function tn(e) {
1933
1958
  var t, n, i;
1934
- return /* @__PURE__ */ s(
1959
+ return /* @__PURE__ */ l(
1935
1960
  "div",
1936
1961
  {
1937
1962
  style: {
@@ -1940,7 +1965,7 @@ function Gt(e) {
1940
1965
  ...!((t = e.builderContext.context) != null && t.symbolId) && {
1941
1966
  "builder-slot": e.name
1942
1967
  },
1943
- children: /* @__PURE__ */ s(
1968
+ children: /* @__PURE__ */ l(
1944
1969
  D,
1945
1970
  {
1946
1971
  parent: (n = e.builderContext.context) == null ? void 0 : n.symbolId,
@@ -1952,7 +1977,7 @@ function Gt(e) {
1952
1977
  }
1953
1978
  );
1954
1979
  }
1955
- const Qt = {
1980
+ const nn = {
1956
1981
  name: "Symbol",
1957
1982
  noWrap: !0,
1958
1983
  static: !0,
@@ -1991,7 +2016,7 @@ const Qt = {
1991
2016
  builderComponents: !0,
1992
2017
  builderLinkComponent: !0
1993
2018
  }
1994
- }, le = {
2019
+ }, re = {
1995
2020
  "@type": "@builder.io/sdk:Element",
1996
2021
  responsiveStyles: {
1997
2022
  large: {
@@ -2013,7 +2038,7 @@ const Qt = {
2013
2038
  text: "New tab"
2014
2039
  }
2015
2040
  }
2016
- }, se = {
2041
+ }, le = {
2017
2042
  "@type": "@builder.io/sdk:Element",
2018
2043
  responsiveStyles: {
2019
2044
  large: {
@@ -2029,7 +2054,7 @@ const Qt = {
2029
2054
  text: "New tab content "
2030
2055
  }
2031
2056
  }
2032
- }, Xt = {
2057
+ }, on = {
2033
2058
  name: "Builder: Tabs",
2034
2059
  inputs: [{
2035
2060
  name: "tabs",
@@ -2039,16 +2064,16 @@ const Qt = {
2039
2064
  name: "label",
2040
2065
  type: "uiBlocks",
2041
2066
  hideFromUI: !0,
2042
- defaultValue: [le]
2067
+ defaultValue: [re]
2043
2068
  }, {
2044
2069
  name: "content",
2045
2070
  type: "uiBlocks",
2046
2071
  hideFromUI: !0,
2047
- defaultValue: [se]
2072
+ defaultValue: [le]
2048
2073
  }],
2049
2074
  defaultValue: [{
2050
2075
  label: [{
2051
- ...le,
2076
+ ...re,
2052
2077
  component: {
2053
2078
  name: "Text",
2054
2079
  options: {
@@ -2057,7 +2082,7 @@ const Qt = {
2057
2082
  }
2058
2083
  }],
2059
2084
  content: [{
2060
- ...se,
2085
+ ...le,
2061
2086
  component: {
2062
2087
  name: "Text",
2063
2088
  options: {
@@ -2067,7 +2092,7 @@ const Qt = {
2067
2092
  }]
2068
2093
  }, {
2069
2094
  label: [{
2070
- ...le,
2095
+ ...re,
2071
2096
  component: {
2072
2097
  name: "Text",
2073
2098
  options: {
@@ -2076,7 +2101,7 @@ const Qt = {
2076
2101
  }
2077
2102
  }],
2078
2103
  content: [{
2079
- ...se,
2104
+ ...le,
2080
2105
  component: {
2081
2106
  name: "Text",
2082
2107
  options: {
@@ -2133,19 +2158,19 @@ const Qt = {
2133
2158
  builderLinkComponent: !0
2134
2159
  }
2135
2160
  };
2136
- function Zt(e) {
2137
- var l;
2161
+ function an(e) {
2162
+ var a;
2138
2163
  const [t, n] = T(
2139
2164
  () => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
2140
2165
  );
2141
- function i(a) {
2142
- return e.tabs && e.tabs[a].content;
2166
+ function i(r) {
2167
+ return e.tabs && e.tabs[r].content;
2143
2168
  }
2144
- function o(a) {
2145
- a === t && e.collapsible ? n(-1) : n(a);
2169
+ function o(r) {
2170
+ r === t && e.collapsible ? n(-1) : n(r);
2146
2171
  }
2147
2172
  return /* @__PURE__ */ V("div", { children: [
2148
- /* @__PURE__ */ s(
2173
+ /* @__PURE__ */ l(
2149
2174
  "div",
2150
2175
  {
2151
2176
  className: "builder-tabs-wrap",
@@ -2155,31 +2180,31 @@ function Zt(e) {
2155
2180
  justifyContent: e.tabHeaderLayout || "flex-start",
2156
2181
  overflow: "auto"
2157
2182
  },
2158
- children: (l = e.tabs) == null ? void 0 : l.map((a, r) => /* @__PURE__ */ s(
2183
+ children: (a = e.tabs) == null ? void 0 : a.map((r, s) => /* @__PURE__ */ l(
2159
2184
  "span",
2160
2185
  {
2161
- className: `builder-tab-wrap ${t === r ? "builder-tab-active" : ""}`,
2186
+ className: `builder-tab-wrap ${t === s ? "builder-tab-active" : ""}`,
2162
2187
  style: {
2163
- ...t === r ? e.activeTabStyle : {}
2188
+ ...t === s ? e.activeTabStyle : {}
2164
2189
  },
2165
- onClick: (c) => o(r),
2166
- children: /* @__PURE__ */ s(
2190
+ onClick: (d) => o(s),
2191
+ children: /* @__PURE__ */ l(
2167
2192
  D,
2168
2193
  {
2169
2194
  parent: e.builderBlock.id,
2170
- path: `component.options.tabs.${r}.label`,
2171
- blocks: a.label,
2195
+ path: `component.options.tabs.${s}.label`,
2196
+ blocks: r.label,
2172
2197
  context: e.builderContext,
2173
2198
  registeredComponents: e.builderComponents,
2174
2199
  linkComponent: e.builderLinkComponent
2175
2200
  }
2176
2201
  )
2177
2202
  },
2178
- r
2203
+ s
2179
2204
  ))
2180
2205
  }
2181
2206
  ),
2182
- i(t) ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
2207
+ i(t) ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
2183
2208
  D,
2184
2209
  {
2185
2210
  parent: e.builderBlock.id,
@@ -2192,7 +2217,7 @@ function Zt(e) {
2192
2217
  ) }) : null
2193
2218
  ] });
2194
2219
  }
2195
- const en = {
2220
+ const rn = {
2196
2221
  shouldReceiveBuilderProps: {
2197
2222
  builderBlock: !1,
2198
2223
  builderContext: !0
@@ -2215,28 +2240,28 @@ const en = {
2215
2240
  textAlign: "center"
2216
2241
  }
2217
2242
  };
2218
- function tn(e) {
2243
+ function ln(e) {
2219
2244
  function t() {
2220
- var r;
2245
+ var s;
2221
2246
  const n = e.builderContext, {
2222
2247
  context: i,
2223
2248
  localState: o,
2224
- rootState: l,
2225
- rootSetState: a
2249
+ rootState: a,
2250
+ rootSetState: r
2226
2251
  } = n;
2227
- return String(((r = e.text) == null ? void 0 : r.toString()) || "").replace(
2252
+ return String(((s = e.text) == null ? void 0 : s.toString()) || "").replace(
2228
2253
  /{{([^}]+)}}/g,
2229
- (c, d) => U({
2230
- code: d,
2254
+ (d, c) => H({
2255
+ code: c,
2231
2256
  context: i,
2232
2257
  localState: o,
2233
- rootState: l,
2234
- rootSetState: a,
2258
+ rootState: a,
2259
+ rootSetState: r,
2235
2260
  enableCache: !1
2236
2261
  })
2237
2262
  );
2238
2263
  }
2239
- return /* @__PURE__ */ s(
2264
+ return /* @__PURE__ */ l(
2240
2265
  "div",
2241
2266
  {
2242
2267
  className: "builder-text",
@@ -2247,7 +2272,7 @@ function tn(e) {
2247
2272
  }
2248
2273
  );
2249
2274
  }
2250
- const nn = {
2275
+ const sn = {
2251
2276
  name: "Custom Code",
2252
2277
  static: !0,
2253
2278
  requiredPermissions: ["editCode"],
@@ -2270,36 +2295,36 @@ const nn = {
2270
2295
  advanced: !0
2271
2296
  }]
2272
2297
  };
2273
- function on(e) {
2274
- const t = ee(null), [n, i] = T(() => []), [o, l] = T(() => []);
2275
- return P(() => {
2276
- var r;
2277
- if (!((r = t.current) != null && r.getElementsByTagName) || typeof window == "undefined")
2298
+ function cn(e) {
2299
+ const t = _(null), [n, i] = T(() => []), [o, a] = T(() => []);
2300
+ return B(() => {
2301
+ var s;
2302
+ if (!((s = t.current) != null && s.getElementsByTagName) || typeof window == "undefined")
2278
2303
  return;
2279
- const a = t.current.getElementsByTagName("script");
2280
- for (let c = 0; c < a.length; c++) {
2281
- const d = a[c];
2282
- if (d.src) {
2283
- if (n.includes(d.src))
2304
+ const r = t.current.getElementsByTagName("script");
2305
+ for (let d = 0; d < r.length; d++) {
2306
+ const c = r[d];
2307
+ if (c.src) {
2308
+ if (n.includes(c.src))
2284
2309
  continue;
2285
- n.push(d.src);
2286
- const f = document.createElement("script");
2287
- f.async = !0, f.src = d.src, document.head.appendChild(f);
2288
- } else if (!d.type || [
2310
+ n.push(c.src);
2311
+ const m = document.createElement("script");
2312
+ m.async = !0, m.src = c.src, document.head.appendChild(m);
2313
+ } else if (!c.type || [
2289
2314
  "text/javascript",
2290
2315
  "application/javascript",
2291
2316
  "application/ecmascript"
2292
- ].includes(d.type)) {
2293
- if (o.includes(d.innerText))
2317
+ ].includes(c.type)) {
2318
+ if (o.includes(c.innerText))
2294
2319
  continue;
2295
2320
  try {
2296
- o.push(d.innerText), new Function(d.innerText)();
2297
- } catch (f) {
2298
- console.warn("`CustomCode`: Error running script:", f);
2321
+ o.push(c.innerText), new Function(c.innerText)();
2322
+ } catch (m) {
2323
+ console.warn("`CustomCode`: Error running script:", m);
2299
2324
  }
2300
2325
  }
2301
2326
  }
2302
- }, []), /* @__PURE__ */ s(
2327
+ }, []), /* @__PURE__ */ l(
2303
2328
  "div",
2304
2329
  {
2305
2330
  ref: t,
@@ -2308,7 +2333,7 @@ function on(e) {
2308
2333
  }
2309
2334
  );
2310
2335
  }
2311
- const an = {
2336
+ const dn = {
2312
2337
  name: "Embed",
2313
2338
  static: !0,
2314
2339
  inputs: [{
@@ -2323,30 +2348,30 @@ const an = {
2323
2348
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
2324
2349
  hideFromUI: !0
2325
2350
  }]
2326
- }, rn = ["text/javascript", "application/javascript", "application/ecmascript"], ln = (e) => rn.includes(e.type);
2327
- function sn(e) {
2328
- const t = ee(null), [n, i] = T(() => []), [o, l] = T(() => []), [a, r] = T(() => !1);
2329
- function c() {
2351
+ }, un = ["text/javascript", "application/javascript", "application/ecmascript"], mn = (e) => un.includes(e.type);
2352
+ function fn(e) {
2353
+ const t = _(null), [n, i] = T(() => []), [o, a] = T(() => []), [r, s] = T(() => !1);
2354
+ function d() {
2330
2355
  if (!t.current || !t.current.getElementsByTagName)
2331
2356
  return;
2332
- const d = t.current.getElementsByTagName("script");
2333
- for (let f = 0; f < d.length; f++) {
2334
- const u = d[f];
2335
- if (u.src && !n.includes(u.src)) {
2336
- n.push(u.src);
2337
- const m = document.createElement("script");
2338
- m.async = !0, m.src = u.src, document.head.appendChild(m);
2339
- } else if (ln(u) && !o.includes(u.innerText))
2357
+ const c = t.current.getElementsByTagName("script");
2358
+ for (let m = 0; m < c.length; m++) {
2359
+ const h = c[m];
2360
+ if (h.src && !n.includes(h.src)) {
2361
+ n.push(h.src);
2362
+ const f = document.createElement("script");
2363
+ f.async = !0, f.src = h.src, document.head.appendChild(f);
2364
+ } else if (mn(h) && !o.includes(h.innerText))
2340
2365
  try {
2341
- o.push(u.innerText), new Function(u.innerText)();
2342
- } catch (m) {
2343
- console.warn("`Embed`: Error running script:", m);
2366
+ o.push(h.innerText), new Function(h.innerText)();
2367
+ } catch (f) {
2368
+ console.warn("`Embed`: Error running script:", f);
2344
2369
  }
2345
2370
  }
2346
2371
  }
2347
- return P(() => {
2348
- t.current && !a && (r(!0), c());
2349
- }, [t.current, a]), /* @__PURE__ */ s(
2372
+ return B(() => {
2373
+ t.current && !r && (s(!0), d());
2374
+ }, [t.current, r]), /* @__PURE__ */ l(
2350
2375
  "div",
2351
2376
  {
2352
2377
  className: "builder-embed",
@@ -2355,7 +2380,7 @@ function sn(e) {
2355
2380
  }
2356
2381
  );
2357
2382
  }
2358
- const cn = {
2383
+ const hn = {
2359
2384
  name: "Form:Form",
2360
2385
  // editableTags: ['builder-form-error']
2361
2386
  defaults: {
@@ -2592,118 +2617,118 @@ const cn = {
2592
2617
  builderComponents: !0,
2593
2618
  builderLinkComponent: !0
2594
2619
  }
2595
- }, dn = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], un = () => {
2620
+ }, gn = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], bn = () => {
2596
2621
  const e = process.env.NODE_ENV || "production";
2597
- return dn.includes(e) ? e : "production";
2598
- }, mn = (e, t, n) => {
2599
- const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, l) => o != null ? o[l] : o, e);
2622
+ return gn.includes(e) ? e : "production";
2623
+ }, pn = (e, t, n) => {
2624
+ const i = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((o, a) => o != null ? o[a] : o, e);
2600
2625
  return i === void 0 || i === e ? n : i;
2601
2626
  };
2602
- function fn(e) {
2603
- var u, m;
2604
- const t = ee(null), [n, i] = T(() => "unsubmitted"), [o, l] = T(() => null), [a, r] = T(() => "");
2605
- function c(g) {
2606
- var C, p;
2607
- const y = {
2627
+ function yn(e) {
2628
+ var h, f;
2629
+ const t = _(null), [n, i] = T(() => "unsubmitted"), [o, a] = T(() => null), [r, s] = T(() => "");
2630
+ function d(u) {
2631
+ var x, b;
2632
+ const g = {
2608
2633
  ...e.builderContext.rootState,
2609
- ...g
2634
+ ...u
2610
2635
  };
2611
- e.builderContext.rootSetState ? (p = (C = e.builderContext).rootSetState) == null || p.call(C, y) : e.builderContext.rootState = y;
2636
+ e.builderContext.rootSetState ? (b = (x = e.builderContext).rootSetState) == null || b.call(x, g) : e.builderContext.rootState = g;
2612
2637
  }
2613
- function d() {
2638
+ function c() {
2614
2639
  return $() && e.previewState || n;
2615
2640
  }
2616
- function f(g) {
2617
- var C;
2618
- const y = e.sendWithJs || e.sendSubmissionsTo === "email";
2641
+ function m(u) {
2642
+ var x;
2643
+ const g = e.sendWithJs || e.sendSubmissionsTo === "email";
2619
2644
  if (e.sendSubmissionsTo === "zapier")
2620
- g.preventDefault();
2621
- else if (y) {
2645
+ u.preventDefault();
2646
+ else if (g) {
2622
2647
  if (!(e.action || e.sendSubmissionsTo === "email")) {
2623
- g.preventDefault();
2648
+ u.preventDefault();
2624
2649
  return;
2625
2650
  }
2626
- g.preventDefault();
2627
- const p = g.currentTarget || g.target, B = e.customHeaders || {};
2651
+ u.preventDefault();
2652
+ const b = u.currentTarget || u.target, P = e.customHeaders || {};
2628
2653
  let E;
2629
- const A = new FormData(p), O = Array.from(p.querySelectorAll("input,select,textarea")).filter((b) => !!b.name).map((b) => {
2630
- let h;
2631
- const v = b.name;
2632
- if (b instanceof HTMLInputElement)
2633
- if (b.type === "radio") {
2634
- if (b.checked)
2635
- return h = b.name, {
2636
- key: v,
2637
- value: h
2654
+ const A = new FormData(b), O = Array.from(b.querySelectorAll("input,select,textarea")).filter((y) => !!y.name).map((y) => {
2655
+ let p;
2656
+ const S = y.name;
2657
+ if (y instanceof HTMLInputElement)
2658
+ if (y.type === "radio") {
2659
+ if (y.checked)
2660
+ return p = y.name, {
2661
+ key: S,
2662
+ value: p
2638
2663
  };
2639
- } else if (b.type === "checkbox")
2640
- h = b.checked;
2641
- else if (b.type === "number" || b.type === "range") {
2642
- const S = b.valueAsNumber;
2643
- isNaN(S) || (h = S);
2664
+ } else if (y.type === "checkbox")
2665
+ p = y.checked;
2666
+ else if (y.type === "number" || y.type === "range") {
2667
+ const k = y.valueAsNumber;
2668
+ isNaN(k) || (p = k);
2644
2669
  } else
2645
- b.type === "file" ? h = b.files : h = b.value;
2670
+ y.type === "file" ? p = y.files : p = y.value;
2646
2671
  else
2647
- h = b.value;
2672
+ p = y.value;
2648
2673
  return {
2649
- key: v,
2650
- value: h
2674
+ key: S,
2675
+ value: p
2651
2676
  };
2652
2677
  });
2653
- let x = e.contentType;
2654
- if (e.sendSubmissionsTo === "email" && (x = "multipart/form-data"), Array.from(O).forEach(({ value: b }) => {
2655
- (b instanceof File || Array.isArray(b) && b[0] instanceof File || b instanceof FileList) && (x = "multipart/form-data");
2656
- }), x !== "application/json")
2678
+ let v = e.contentType;
2679
+ if (e.sendSubmissionsTo === "email" && (v = "multipart/form-data"), Array.from(O).forEach(({ value: y }) => {
2680
+ (y instanceof File || Array.isArray(y) && y[0] instanceof File || y instanceof FileList) && (v = "multipart/form-data");
2681
+ }), v !== "application/json")
2657
2682
  E = A;
2658
2683
  else {
2659
- const b = {};
2660
- Array.from(O).forEach(({ value: h, key: v }) => {
2661
- Ee(b, v, h);
2662
- }), E = JSON.stringify(b);
2684
+ const y = {};
2685
+ Array.from(O).forEach(({ value: p, key: S }) => {
2686
+ Pe(y, S, p);
2687
+ }), E = JSON.stringify(y);
2663
2688
  }
2664
- x && x !== "multipart/form-data" && (y && ((C = e.action) != null && C.includes("zapier.com")) || (B["content-type"] = x));
2689
+ v && v !== "multipart/form-data" && (g && ((x = e.action) != null && x.includes("zapier.com")) || (P["content-type"] = v));
2665
2690
  const w = new CustomEvent("presubmit", { detail: { body: E } });
2666
2691
  if (t.current && (t.current.dispatchEvent(w), w.defaultPrevented))
2667
2692
  return;
2668
2693
  i("sending");
2669
- const N = `${un() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
2694
+ const N = `${bn() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
2670
2695
  e.sendSubmissionsToEmail || ""
2671
2696
  )}&name=${encodeURIComponent(e.name || "")}`;
2672
2697
  fetch(
2673
2698
  e.sendSubmissionsTo === "email" ? N : e.action,
2674
- { body: E, headers: B, method: e.method || "post" }
2699
+ { body: E, headers: P, method: e.method || "post" }
2675
2700
  ).then(
2676
- async (b) => {
2677
- let h;
2678
- const v = b.headers.get("content-type");
2679
- if (v && v.indexOf("application/json") !== -1 ? h = await b.json() : h = await b.text(), !b.ok && e.errorMessagePath) {
2680
- let S = mn(h, e.errorMessagePath);
2681
- S && (typeof S != "string" && (S = JSON.stringify(S)), r(S), c({ formErrorMessage: S }));
2701
+ async (y) => {
2702
+ let p;
2703
+ const S = y.headers.get("content-type");
2704
+ if (S && S.indexOf("application/json") !== -1 ? p = await y.json() : p = await y.text(), !y.ok && e.errorMessagePath) {
2705
+ let k = pn(p, e.errorMessagePath);
2706
+ k && (typeof k != "string" && (k = JSON.stringify(k)), s(k), d({ formErrorMessage: k }));
2682
2707
  }
2683
- if (l(h), i(b.ok ? "success" : "error"), b.ok) {
2684
- const S = new CustomEvent("submit:success", {
2685
- detail: { res: b, body: h }
2708
+ if (a(p), i(y.ok ? "success" : "error"), y.ok) {
2709
+ const k = new CustomEvent("submit:success", {
2710
+ detail: { res: y, body: p }
2686
2711
  });
2687
2712
  if (t.current) {
2688
- if (t.current.dispatchEvent(S), S.defaultPrevented)
2713
+ if (t.current.dispatchEvent(k), k.defaultPrevented)
2689
2714
  return;
2690
2715
  e.resetFormOnSubmit !== !1 && t.current.reset();
2691
2716
  }
2692
2717
  if (e.successUrl)
2693
2718
  if (t.current) {
2694
- const k = new CustomEvent("route", {
2719
+ const C = new CustomEvent("route", {
2695
2720
  detail: { url: e.successUrl }
2696
2721
  });
2697
- t.current.dispatchEvent(k), k.defaultPrevented || (location.href = e.successUrl);
2722
+ t.current.dispatchEvent(C), C.defaultPrevented || (location.href = e.successUrl);
2698
2723
  } else
2699
2724
  location.href = e.successUrl;
2700
2725
  }
2701
2726
  },
2702
- (b) => {
2703
- const h = new CustomEvent("submit:error", {
2704
- detail: { error: b }
2727
+ (y) => {
2728
+ const p = new CustomEvent("submit:error", {
2729
+ detail: { error: y }
2705
2730
  });
2706
- t.current && (t.current.dispatchEvent(h), h.defaultPrevented) || (l(b), i("error"));
2731
+ t.current && (t.current.dispatchEvent(p), p.defaultPrevented) || (a(y), i("error"));
2707
2732
  }
2708
2733
  );
2709
2734
  }
@@ -2718,20 +2743,20 @@ function fn(e) {
2718
2743
  action: !e.sendWithJs && e.action,
2719
2744
  method: e.method,
2720
2745
  name: e.name,
2721
- onSubmit: (g) => f(g),
2746
+ onSubmit: (u) => m(u),
2722
2747
  ...e.attributes,
2723
2748
  children: [
2724
- e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(R, { children: (m = (u = e.builderBlock) == null ? void 0 : u.children) == null ? void 0 : m.map((g, y) => /* @__PURE__ */ s(
2749
+ e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ l(R, { children: (f = (h = e.builderBlock) == null ? void 0 : h.children) == null ? void 0 : f.map((u, g) => /* @__PURE__ */ l(
2725
2750
  z,
2726
2751
  {
2727
- block: g,
2752
+ block: u,
2728
2753
  context: e.builderContext,
2729
2754
  registeredComponents: e.builderComponents,
2730
2755
  linkComponent: e.builderLinkComponent
2731
2756
  },
2732
- `form-block-${y}`
2757
+ `form-block-${g}`
2733
2758
  )) }) : null,
2734
- d() === "error" ? /* @__PURE__ */ s(
2759
+ c() === "error" ? /* @__PURE__ */ l(
2735
2760
  D,
2736
2761
  {
2737
2762
  path: "errorMessage",
@@ -2739,7 +2764,7 @@ function fn(e) {
2739
2764
  context: e.builderContext
2740
2765
  }
2741
2766
  ) : null,
2742
- d() === "sending" ? /* @__PURE__ */ s(
2767
+ c() === "sending" ? /* @__PURE__ */ l(
2743
2768
  D,
2744
2769
  {
2745
2770
  path: "sendingMessage",
@@ -2747,8 +2772,8 @@ function fn(e) {
2747
2772
  context: e.builderContext
2748
2773
  }
2749
2774
  ) : null,
2750
- d() === "error" && o ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-3a20f614", children: JSON.stringify(o, null, 2) }) : null,
2751
- d() === "success" ? /* @__PURE__ */ s(
2775
+ c() === "error" && o ? /* @__PURE__ */ l("pre", { className: "builder-form-error-text pre-3a20f614", children: JSON.stringify(o, null, 2) }) : null,
2776
+ c() === "success" ? /* @__PURE__ */ l(
2752
2777
  D,
2753
2778
  {
2754
2779
  path: "successMessage",
@@ -2760,11 +2785,11 @@ function fn(e) {
2760
2785
  }
2761
2786
  ),
2762
2787
  " ",
2763
- /* @__PURE__ */ s("style", { children: ".pre-3a20f614 { padding: 10px; color: red; text-align: center; }" }),
2788
+ /* @__PURE__ */ l("style", { children: ".pre-3a20f614 { padding: 10px; color: red; text-align: center; }" }),
2764
2789
  " "
2765
2790
  ] });
2766
2791
  }
2767
- const hn = {
2792
+ const xn = {
2768
2793
  name: "Form:Input",
2769
2794
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
2770
2795
  inputs: [
@@ -2816,8 +2841,8 @@ const hn = {
2816
2841
  borderColor: "#ccc"
2817
2842
  }
2818
2843
  };
2819
- function gn(e) {
2820
- return /* @__PURE__ */ Re(
2844
+ function vn(e) {
2845
+ return /* @__PURE__ */ Ee(
2821
2846
  "input",
2822
2847
  {
2823
2848
  ...e.attributes,
@@ -2831,7 +2856,7 @@ function gn(e) {
2831
2856
  }
2832
2857
  );
2833
2858
  }
2834
- const bn = {
2859
+ const Sn = {
2835
2860
  name: "Form:Select",
2836
2861
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
2837
2862
  defaultStyles: {
@@ -2874,9 +2899,9 @@ const bn = {
2874
2899
  static: !0,
2875
2900
  noWrap: !0
2876
2901
  };
2877
- function pn(e) {
2902
+ function kn(e) {
2878
2903
  var t;
2879
- return /* @__PURE__ */ Re(
2904
+ return /* @__PURE__ */ Ee(
2880
2905
  "select",
2881
2906
  {
2882
2907
  ...e.attributes,
@@ -2886,10 +2911,10 @@ function pn(e) {
2886
2911
  name: e.name,
2887
2912
  required: e.required
2888
2913
  },
2889
- (t = e.options) == null ? void 0 : t.map((n, i) => /* @__PURE__ */ s("option", { value: n.value, children: n.name || n.value }, `${n.name}-${i}`))
2914
+ (t = e.options) == null ? void 0 : t.map((n, i) => /* @__PURE__ */ l("option", { value: n.value, children: n.name || n.value }, `${n.name}-${i}`))
2890
2915
  );
2891
2916
  }
2892
- const yn = {
2917
+ const Cn = {
2893
2918
  name: "Form:SubmitButton",
2894
2919
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
2895
2920
  defaultStyles: {
@@ -2915,10 +2940,10 @@ const yn = {
2915
2940
  // TODO: defaultChildren
2916
2941
  // canHaveChildren: true,
2917
2942
  };
2918
- function xn(e) {
2919
- return /* @__PURE__ */ s("button", { type: "submit", ...e.attributes, children: e.text });
2943
+ function Tn(e) {
2944
+ return /* @__PURE__ */ l("button", { type: "submit", ...e.attributes, children: e.text });
2920
2945
  }
2921
- const vn = {
2946
+ const In = {
2922
2947
  name: "Form:TextArea",
2923
2948
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
2924
2949
  inputs: [{
@@ -2955,8 +2980,8 @@ const vn = {
2955
2980
  static: !0,
2956
2981
  noWrap: !0
2957
2982
  };
2958
- function Sn(e) {
2959
- return /* @__PURE__ */ s(
2983
+ function wn(e) {
2984
+ return /* @__PURE__ */ l(
2960
2985
  "textarea",
2961
2986
  {
2962
2987
  ...e.attributes,
@@ -2968,7 +2993,7 @@ function Sn(e) {
2968
2993
  }
2969
2994
  );
2970
2995
  }
2971
- const kn = {
2996
+ const Rn = {
2972
2997
  // friendlyName?
2973
2998
  name: "Raw:Img",
2974
2999
  hideFromInsertMenu: !0,
@@ -2983,8 +3008,8 @@ const kn = {
2983
3008
  noWrap: !0,
2984
3009
  static: !0
2985
3010
  };
2986
- function Cn(e) {
2987
- return /* @__PURE__ */ s(
3011
+ function En(e) {
3012
+ return /* @__PURE__ */ l(
2988
3013
  "img",
2989
3014
  {
2990
3015
  style: {
@@ -2998,7 +3023,7 @@ function Cn(e) {
2998
3023
  $() && e.imgSrc || "default-key"
2999
3024
  );
3000
3025
  }
3001
- const Tn = {
3026
+ const Pn = {
3002
3027
  name: "Video",
3003
3028
  canHaveChildren: !0,
3004
3029
  defaultStyles: {
@@ -3083,8 +3108,8 @@ const Tn = {
3083
3108
  builderBlock: !0
3084
3109
  }
3085
3110
  };
3086
- function In(e) {
3087
- var i, o, l, a, r, c, d;
3111
+ function Bn(e) {
3112
+ var i, o, a, r, s, d, c;
3088
3113
  function t() {
3089
3114
  return {
3090
3115
  ...e.autoPlay === !0 ? {
@@ -3116,7 +3141,7 @@ function In(e) {
3116
3141
  position: "relative"
3117
3142
  },
3118
3143
  children: [
3119
- /* @__PURE__ */ s(
3144
+ /* @__PURE__ */ l(
3120
3145
  "video",
3121
3146
  {
3122
3147
  className: "builder-video",
@@ -3138,10 +3163,10 @@ function In(e) {
3138
3163
  },
3139
3164
  src: e.video || "no-src",
3140
3165
  poster: e.posterImage,
3141
- children: e.lazyLoad ? null : /* @__PURE__ */ s("source", { type: "video/mp4", src: e.video })
3166
+ children: e.lazyLoad ? null : /* @__PURE__ */ l("source", { type: "video/mp4", src: e.video })
3142
3167
  }
3143
3168
  ),
3144
- e.aspectRatio && !(e.fitContent && ((l = (o = e.builderBlock) == null ? void 0 : o.children) != null && l.length)) ? /* @__PURE__ */ s(
3169
+ e.aspectRatio && !(e.fitContent && ((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length)) ? /* @__PURE__ */ l(
3145
3170
  "div",
3146
3171
  {
3147
3172
  style: {
@@ -3152,7 +3177,7 @@ function In(e) {
3152
3177
  }
3153
3178
  }
3154
3179
  ) : null,
3155
- (r = (a = e.builderBlock) == null ? void 0 : a.children) != null && r.length && e.fitContent ? /* @__PURE__ */ s(
3180
+ (s = (r = e.builderBlock) == null ? void 0 : r.children) != null && s.length && e.fitContent ? /* @__PURE__ */ l(
3156
3181
  "div",
3157
3182
  {
3158
3183
  style: {
@@ -3163,7 +3188,7 @@ function In(e) {
3163
3188
  children: e.children
3164
3189
  }
3165
3190
  ) : null,
3166
- (d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ s(
3191
+ (c = (d = e.builderBlock) == null ? void 0 : d.children) != null && c.length && !e.fitContent ? /* @__PURE__ */ l(
3167
3192
  "div",
3168
3193
  {
3169
3194
  style: {
@@ -3184,64 +3209,64 @@ function In(e) {
3184
3209
  }
3185
3210
  );
3186
3211
  }
3187
- const wn = () => [{
3188
- component: on,
3189
- ...nn
3190
- }, {
3191
- component: sn,
3192
- ...an
3212
+ const Vn = () => [{
3213
+ component: cn,
3214
+ ...sn
3193
3215
  }, {
3194
3216
  component: fn,
3195
- ...cn
3217
+ ...dn
3196
3218
  }, {
3197
- component: gn,
3219
+ component: yn,
3198
3220
  ...hn
3199
3221
  }, {
3200
- component: xn,
3201
- ...yn
3222
+ component: vn,
3223
+ ...xn
3224
+ }, {
3225
+ component: Tn,
3226
+ ...Cn
3202
3227
  }, {
3203
- component: pn,
3204
- ...bn
3228
+ component: kn,
3229
+ ...Sn
3205
3230
  }, {
3206
- component: Sn,
3207
- ...vn
3231
+ component: wn,
3232
+ ...In
3208
3233
  }, {
3209
- component: Cn,
3210
- ...kn
3234
+ component: En,
3235
+ ...Rn
3211
3236
  }, {
3212
- component: In,
3213
- ...Tn
3237
+ component: Bn,
3238
+ ...Pn
3214
3239
  }], Se = () => [{
3215
3240
  component: ot,
3216
- ...qt
3217
- }, {
3218
- component: $t,
3219
- ...Kt
3220
- }, {
3221
- component: Dt,
3222
- ...zt
3241
+ ...Yt
3223
3242
  }, {
3224
3243
  component: jt,
3225
- ..._t
3244
+ ...Gt
3226
3245
  }, {
3227
3246
  component: Mt,
3228
- ...Jt
3247
+ ...Qt
3229
3248
  }, {
3230
- component: Gt,
3231
- ...Yt
3249
+ component: qt,
3250
+ ...Xt
3232
3251
  }, {
3233
- component: Yn,
3234
- ...Qt
3252
+ component: _t,
3253
+ ...Zt
3235
3254
  }, {
3236
3255
  component: tn,
3237
3256
  ...en
3238
3257
  }, {
3239
- component: Zt,
3240
- ...Xt
3258
+ component: ei,
3259
+ ...nn
3260
+ }, {
3261
+ component: ln,
3262
+ ...rn
3241
3263
  }, {
3242
- component: Ht,
3243
- ...Ut
3244
- }, ...wn()], Rn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
3264
+ component: an,
3265
+ ...on
3266
+ }, {
3267
+ component: Jt,
3268
+ ...zt
3269
+ }, ...Vn()], An = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
3245
3270
  function getAndSetVariantId() {
3246
3271
  function setCookie(name, value, days) {
3247
3272
  let expires = '';
@@ -3297,7 +3322,7 @@ const wn = () => [{
3297
3322
  }).join('');
3298
3323
  styleEl.innerHTML = newStyleStr;
3299
3324
  }
3300
- }`, En = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
3325
+ }`, Nn = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
3301
3326
  if (!navigator.cookieEnabled) {
3302
3327
  return;
3303
3328
  }
@@ -3331,27 +3356,27 @@ const wn = () => [{
3331
3356
  thisScriptEl?.remove();
3332
3357
  }
3333
3358
  return;
3334
- }`, Oe = "builderIoAbTest", je = "builderIoRenderContent", J = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
3359
+ }`, Ue = "builderIoAbTest", je = "builderIoRenderContent", Y = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
3335
3360
  ...t,
3336
3361
  testVariationId: t.id,
3337
3362
  id: e == null ? void 0 : e.id
3338
- })), Bn = ({
3363
+ })), Wn = ({
3339
3364
  canTrack: e,
3340
3365
  content: t
3341
- }) => !(!(J(t).length > 0) || !e || G()), Pn = (e) => e === "react" || e === "reactNative", Me = Pn(H), Vn = () => `
3342
- window.${Oe} = ${Rn}
3343
- window.${je} = ${En}
3344
- `, An = (e, t) => `
3345
- window.${Oe}(
3366
+ }) => !(!(Y(t).length > 0) || !e || Q()), Fn = (e) => e === "react" || e === "reactNative", Me = Fn(U), $n = () => `
3367
+ window.${Ue} = ${An}
3368
+ window.${je} = ${Nn}
3369
+ `, Dn = (e, t) => `
3370
+ window.${Ue}(
3346
3371
  "${t}",${JSON.stringify(e)}, ${Me}
3347
- )`, Nn = ({
3372
+ )`, Ln = ({
3348
3373
  contentId: e,
3349
3374
  variationId: t
3350
3375
  }) => `window.${je}(
3351
3376
  "${t}", "${e}", ${Me}
3352
3377
  )`;
3353
3378
  function ce(e) {
3354
- return /* @__PURE__ */ s(
3379
+ return /* @__PURE__ */ l(
3355
3380
  "script",
3356
3381
  {
3357
3382
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -3363,7 +3388,7 @@ function ce(e) {
3363
3388
  function ke(e) {
3364
3389
  return Math.round(e * 1e3) / 1e3;
3365
3390
  }
3366
- const Wn = (e, t, n = !0) => {
3391
+ const On = (e, t, n = !0) => {
3367
3392
  if (!(e instanceof HTMLElement))
3368
3393
  return null;
3369
3394
  let i = n ? e : e.parentElement;
@@ -3374,20 +3399,20 @@ const Wn = (e, t, n = !0) => {
3374
3399
  return i;
3375
3400
  } while (i = i.parentElement);
3376
3401
  return null;
3377
- }, Fn = (e) => Wn(e, (t) => {
3402
+ }, Un = (e) => On(e, (t) => {
3378
3403
  const n = t.getAttribute("builder-id") || t.id;
3379
3404
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
3380
3405
  }), Ce = ({
3381
3406
  event: e,
3382
3407
  target: t
3383
3408
  }) => {
3384
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, l = ke(i / n.width), a = ke(o / n.height);
3409
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ke(i / n.width), r = ke(o / n.height);
3385
3410
  return {
3386
- x: l,
3387
- y: a
3411
+ x: a,
3412
+ y: r
3388
3413
  };
3389
- }, $n = (e) => {
3390
- const t = e.target, n = t && Fn(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
3414
+ }, jn = (e) => {
3415
+ const t = e.target, n = t && Un(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
3391
3416
  return {
3392
3417
  targetBuilderElement: i || void 0,
3393
3418
  metadata: {
@@ -3402,9 +3427,9 @@ const Wn = (e, t, n = !0) => {
3402
3427
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
3403
3428
  }
3404
3429
  };
3405
- }, Dn = (e) => {
3406
- var l, a;
3407
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (l = e == null ? void 0 : e.files) == null ? void 0 : l.regular;
3430
+ }, Mn = (e) => {
3431
+ var a, r;
3432
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = (r = e.fileUrl) != null ? r : (a = e == null ? void 0 : e.files) == null ? void 0 : a.regular;
3408
3433
  let o = "";
3409
3434
  if (i && t && n && (o += `
3410
3435
  @font-face {
@@ -3414,29 +3439,29 @@ font-display: fallback;
3414
3439
  font-weight: 400;
3415
3440
  }
3416
3441
  `.trim()), e.files)
3417
- for (const r in e.files) {
3418
- if (!(String(Number(r)) === r))
3442
+ for (const s in e.files) {
3443
+ if (!(String(Number(s)) === s))
3419
3444
  continue;
3420
- const d = e.files[r];
3421
- d && d !== i && (o += `
3445
+ const c = e.files[s];
3446
+ c && c !== i && (o += `
3422
3447
  @font-face {
3423
3448
  font-family: "${t}";
3424
- src: url('${d}') format('woff2');
3449
+ src: url('${c}') format('woff2');
3425
3450
  font-display: fallback;
3426
- font-weight: ${r};
3451
+ font-weight: ${s};
3427
3452
  }
3428
3453
  `.trim());
3429
3454
  }
3430
3455
  return o;
3431
- }, Ln = ({
3456
+ }, Hn = ({
3432
3457
  customFonts: e
3433
3458
  }) => {
3434
3459
  var t;
3435
- return ((t = e == null ? void 0 : e.map((n) => Dn(n))) == null ? void 0 : t.join(" ")) || "";
3436
- }, On = ({
3460
+ return ((t = e == null ? void 0 : e.map((n) => Mn(n))) == null ? void 0 : t.join(" ")) || "";
3461
+ }, Kn = ({
3437
3462
  cssCode: e,
3438
3463
  contentId: t
3439
- }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", jn = `
3464
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", qn = `
3440
3465
  .builder-button {
3441
3466
  all: unset;
3442
3467
  }
@@ -3453,39 +3478,39 @@ font-weight: ${r};
3453
3478
  text-align: inherit;
3454
3479
  font-family: inherit;
3455
3480
  }
3456
- `, Mn = (e) => e ? "" : jn, Un = (e) => `variant-${e}`;
3457
- function Hn(e) {
3458
- var E, A, O, x, w, N, b;
3459
- const t = ee(null);
3460
- function n(h) {
3461
- var S, k;
3462
- const v = {
3481
+ `, _n = (e) => e ? "" : qn, zn = (e) => `variant-${e}`;
3482
+ function Jn(e) {
3483
+ var E, A, O, v, w, N, y;
3484
+ const t = _(null);
3485
+ function n(p) {
3486
+ var k, C;
3487
+ const S = {
3463
3488
  ...e.builderContextSignal.rootState,
3464
- ...h
3489
+ ...p
3465
3490
  };
3466
- e.builderContextSignal.rootSetState ? (k = (S = e.builderContextSignal).rootSetState) == null || k.call(S, v) : e.setBuilderContextSignal((I) => ({
3491
+ e.builderContextSignal.rootSetState ? (C = (k = e.builderContextSignal).rootSetState) == null || C.call(k, S) : e.setBuilderContextSignal((I) => ({
3467
3492
  ...I,
3468
- rootState: v
3493
+ rootState: S
3469
3494
  }));
3470
3495
  }
3471
- function i(h) {
3472
- var S, k, I, W, j;
3473
- const v = {
3496
+ function i(p) {
3497
+ var k, C, I, W, j;
3498
+ const S = {
3474
3499
  ...e.builderContextSignal.content,
3475
- ...h,
3500
+ ...p,
3476
3501
  data: {
3477
- ...(S = e.builderContextSignal.content) == null ? void 0 : S.data,
3478
- ...h == null ? void 0 : h.data
3502
+ ...(k = e.builderContextSignal.content) == null ? void 0 : k.data,
3503
+ ...p == null ? void 0 : p.data
3479
3504
  },
3480
3505
  meta: {
3481
- ...(k = e.builderContextSignal.content) == null ? void 0 : k.meta,
3482
- ...h == null ? void 0 : h.meta,
3483
- breakpoints: ((I = h == null ? void 0 : h.meta) == null ? void 0 : I.breakpoints) || ((j = (W = e.builderContextSignal.content) == null ? void 0 : W.meta) == null ? void 0 : j.breakpoints)
3506
+ ...(C = e.builderContextSignal.content) == null ? void 0 : C.meta,
3507
+ ...p == null ? void 0 : p.meta,
3508
+ breakpoints: ((I = p == null ? void 0 : p.meta) == null ? void 0 : I.breakpoints) || ((j = (W = e.builderContextSignal.content) == null ? void 0 : W.meta) == null ? void 0 : j.breakpoints)
3484
3509
  }
3485
3510
  };
3486
3511
  e.setBuilderContextSignal((F) => ({
3487
3512
  ...F,
3488
- content: v
3513
+ content: S
3489
3514
  }));
3490
3515
  }
3491
3516
  function o() {
@@ -3494,37 +3519,37 @@ function Hn(e) {
3494
3519
  "aria-hidden": !0
3495
3520
  };
3496
3521
  }
3497
- const [l, a] = T(
3522
+ const [a, r] = T(
3498
3523
  () => e.contentWrapper || "div"
3499
3524
  );
3500
- function r(h) {
3525
+ function s(p) {
3501
3526
  return Ye({
3502
3527
  model: e.model,
3503
3528
  trustedHosts: e.trustedHosts,
3504
3529
  callbacks: {
3505
- configureSdk: (v) => {
3530
+ configureSdk: (S) => {
3506
3531
  var I;
3507
- const { breakpoints: S, contentId: k } = v;
3508
- !k || k !== ((I = e.builderContextSignal.content) == null ? void 0 : I.id) || S && i({
3532
+ const { breakpoints: k, contentId: C } = S;
3533
+ !C || C !== ((I = e.builderContextSignal.content) == null ? void 0 : I.id) || k && i({
3509
3534
  meta: {
3510
- breakpoints: S
3535
+ breakpoints: k
3511
3536
  }
3512
3537
  });
3513
3538
  },
3514
- animation: (v) => {
3515
- Ne(v);
3539
+ animation: (S) => {
3540
+ We(S);
3516
3541
  },
3517
- contentUpdate: (v) => {
3518
- i(v);
3542
+ contentUpdate: (S) => {
3543
+ i(S);
3519
3544
  }
3520
3545
  }
3521
- })(h);
3546
+ })(p);
3522
3547
  }
3523
- function c() {
3524
- var v, S;
3525
- const h = (S = (v = e.builderContextSignal.content) == null ? void 0 : v.data) == null ? void 0 : S.jsCode;
3526
- h && U({
3527
- code: h,
3548
+ function d() {
3549
+ var S, k;
3550
+ const p = (k = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : k.jsCode;
3551
+ p && H({
3552
+ code: p,
3528
3553
  context: e.context || {},
3529
3554
  localState: void 0,
3530
3555
  rootState: e.builderContextSignal.rootState,
@@ -3535,35 +3560,35 @@ function Hn(e) {
3535
3560
  enableCache: !1
3536
3561
  });
3537
3562
  }
3538
- const [d, f] = T(() => ({})), [u, m] = T(() => ({})), [g, y] = T(() => !1);
3539
- function C(h) {
3540
- var v, S;
3563
+ const [c, m] = T(() => ({})), [h, f] = T(() => ({})), [u, g] = T(() => !1);
3564
+ function x(p) {
3565
+ var S, k;
3541
3566
  if (e.builderContextSignal.content) {
3542
- const k = (v = e.builderContextSignal.content) == null ? void 0 : v.testVariationId, I = (S = e.builderContextSignal.content) == null ? void 0 : S.id;
3567
+ const C = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId, I = (k = e.builderContextSignal.content) == null ? void 0 : k.id;
3543
3568
  he({
3544
3569
  type: "click",
3545
- canTrack: Q(e.canTrack),
3570
+ canTrack: X(e.canTrack),
3546
3571
  contentId: I,
3547
3572
  apiKey: e.apiKey,
3548
- variationId: k !== I ? k : void 0,
3549
- ...$n(h),
3550
- unique: !g
3573
+ variationId: C !== I ? C : void 0,
3574
+ ...jn(p),
3575
+ unique: !u
3551
3576
  });
3552
3577
  }
3553
- g || y(!0);
3578
+ u || g(!0);
3554
3579
  }
3555
- function p() {
3556
- var v, S, k;
3557
- const h = (k = (S = (v = e.builderContextSignal.content) == null ? void 0 : v.data) == null ? void 0 : S.httpRequests) != null ? k : {};
3558
- Object.entries(h).forEach(([I, W]) => {
3559
- if (!W || u[I] || d[I] && !$())
3580
+ function b() {
3581
+ var S, k, C;
3582
+ const p = (C = (k = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : k.httpRequests) != null ? C : {};
3583
+ Object.entries(p).forEach(([I, W]) => {
3584
+ if (!W || h[I] || c[I] && !$())
3560
3585
  return;
3561
- u[I] = !0;
3586
+ h[I] = !0;
3562
3587
  const j = W.replace(
3563
3588
  /{{([^}]+)}}/g,
3564
- (F, Ue) => String(
3565
- U({
3566
- code: Ue,
3589
+ (F, He) => String(
3590
+ H({
3591
+ code: He,
3567
3592
  context: e.context || {},
3568
3593
  localState: void 0,
3569
3594
  rootState: e.builderContextSignal.rootState,
@@ -3575,15 +3600,15 @@ function Hn(e) {
3575
3600
  Ge(j).then((F) => F.json()).then((F) => {
3576
3601
  n({
3577
3602
  [I]: F
3578
- }), d[I] = !0;
3603
+ }), c[I] = !0;
3579
3604
  }).catch((F) => {
3580
3605
  console.error("error fetching dynamic data", W, F);
3581
3606
  }).finally(() => {
3582
- u[I] = !1;
3607
+ h[I] = !1;
3583
3608
  });
3584
3609
  });
3585
3610
  }
3586
- function B() {
3611
+ function P() {
3587
3612
  $() && window.dispatchEvent(
3588
3613
  new CustomEvent(
3589
3614
  "builder:component:stateChange",
@@ -3598,10 +3623,10 @@ function Hn(e) {
3598
3623
  )
3599
3624
  );
3600
3625
  }
3601
- return P(() => {
3602
- var h, v;
3603
- if (G()) {
3604
- if ($() && (window.addEventListener("message", r), Ke(), ze({
3626
+ return B(() => {
3627
+ var p, S;
3628
+ if (Q()) {
3629
+ if ($() && (window.addEventListener("message", s), _e(), ze({
3605
3630
  ...e.locale ? {
3606
3631
  locale: e.locale
3607
3632
  } : {},
@@ -3613,28 +3638,28 @@ function Hn(e) {
3613
3638
  } : {}
3614
3639
  }), Object.values(
3615
3640
  e.builderContextSignal.componentInfos
3616
- ).forEach((k) => {
3641
+ ).forEach((C) => {
3617
3642
  var W;
3618
- const I = _e(k);
3643
+ const I = Je(C);
3619
3644
  (W = window.parent) == null || W.postMessage(I, "*");
3620
3645
  }), window.addEventListener(
3621
3646
  "builder:component:stateChangeListenerActivated",
3622
- B
3623
- )), e.builderContextSignal.content && Q(e.canTrack)) {
3624
- const k = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, I = (v = e.builderContextSignal.content) == null ? void 0 : v.id, W = e.apiKey;
3647
+ P
3648
+ )), e.builderContextSignal.content && X(e.canTrack)) {
3649
+ const C = (p = e.builderContextSignal.content) == null ? void 0 : p.testVariationId, I = (S = e.builderContextSignal.content) == null ? void 0 : S.id, W = e.apiKey;
3625
3650
  he({
3626
3651
  type: "impression",
3627
3652
  canTrack: !0,
3628
3653
  contentId: I,
3629
3654
  apiKey: W,
3630
- variationId: k !== I ? k : void 0
3655
+ variationId: C !== I ? C : void 0
3631
3656
  });
3632
3657
  }
3633
- if (Je() && !$()) {
3634
- const k = new URL(location.href).searchParams, I = k.get("builder.preview"), W = k.get(
3658
+ if (Ie() && !$()) {
3659
+ const C = new URL(location.href).searchParams, I = C.get("builder.preview"), W = C.get(
3635
3660
  `builder.overrides.${I}`
3636
- ), j = k.get("apiKey") || k.get("builder.space");
3637
- I === e.model && j === e.apiKey && (!e.content || W === e.content.id) && Ie({
3661
+ ), j = C.get("apiKey") || C.get("builder.space");
3662
+ I === e.model && j === e.apiKey && (!e.content || W === e.content.id) && we({
3638
3663
  model: e.model,
3639
3664
  apiKey: e.apiKey,
3640
3665
  apiVersion: e.builderContextSignal.apiVersion
@@ -3643,60 +3668,60 @@ function Hn(e) {
3643
3668
  });
3644
3669
  }
3645
3670
  }
3646
- }, []), P(() => {
3671
+ }, []), B(() => {
3647
3672
  e.apiKey || Z.error(
3648
3673
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
3649
- ), c(), p(), B();
3650
- }, []), P(() => {
3674
+ ), d(), b(), P();
3675
+ }, []), B(() => {
3651
3676
  e.content && i(e.content);
3652
- }, [e.content]), P(() => {
3653
- c();
3654
- }, [(A = (E = e.builderContextSignal.content) == null ? void 0 : E.data) == null ? void 0 : A.jsCode]), P(() => {
3655
- p();
3656
- }, [(x = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : x.httpRequests]), P(() => {
3657
- B();
3658
- }, [e.builderContextSignal.rootState]), P(() => {
3677
+ }, [e.content]), B(() => {
3678
+ d();
3679
+ }, [(A = (E = e.builderContextSignal.content) == null ? void 0 : E.data) == null ? void 0 : A.jsCode]), B(() => {
3680
+ b();
3681
+ }, [(v = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : v.httpRequests]), B(() => {
3682
+ P();
3683
+ }, [e.builderContextSignal.rootState]), B(() => {
3659
3684
  e.data && n(e.data);
3660
- }, [e.data]), P(() => {
3685
+ }, [e.data]), B(() => {
3661
3686
  e.locale && n({
3662
3687
  locale: e.locale
3663
3688
  });
3664
- }, [e.locale]), P(() => () => {
3665
- G() && (window.removeEventListener("message", r), window.removeEventListener(
3689
+ }, [e.locale]), B(() => () => {
3690
+ Q() && (window.removeEventListener("message", s), window.removeEventListener(
3666
3691
  "builder:component:stateChangeListenerActivated",
3667
- B
3692
+ P
3668
3693
  ));
3669
- }, []), /* @__PURE__ */ s(me.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(
3670
- l,
3694
+ }, []), /* @__PURE__ */ l(me.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(
3695
+ a,
3671
3696
  {
3672
3697
  ref: t,
3673
- onClick: (h) => C(h),
3698
+ onClick: (p) => x(p),
3674
3699
  "builder-content-id": (w = e.builderContextSignal.content) == null ? void 0 : w.id,
3675
3700
  "builder-model": e.model,
3676
3701
  ...o(),
3677
3702
  ...e.contentWrapperProps,
3678
- className: Un(
3679
- ((N = e.content) == null ? void 0 : N.testVariationId) || ((b = e.content) == null ? void 0 : b.id)
3703
+ className: zn(
3704
+ ((N = e.content) == null ? void 0 : N.testVariationId) || ((y = e.content) == null ? void 0 : y.id)
3680
3705
  ),
3681
3706
  children: e.children
3682
3707
  }
3683
3708
  ) : null });
3684
3709
  }
3685
- function qn(e) {
3710
+ function Yn(e) {
3686
3711
  const [t, n] = T(
3687
3712
  () => `
3688
- ${On({
3713
+ ${Kn({
3689
3714
  cssCode: e.cssCode,
3690
3715
  contentId: e.contentId
3691
3716
  })}
3692
- ${Ln({
3717
+ ${Hn({
3693
3718
  customFonts: e.customFonts
3694
3719
  })}
3695
- ${Mn(e.isNestedRender)}
3720
+ ${_n(e.isNestedRender)}
3696
3721
  `.trim()
3697
3722
  );
3698
- return /* @__PURE__ */ s(
3699
- ne,
3723
+ return /* @__PURE__ */ l(
3724
+ te,
3700
3725
  {
3701
3726
  id: "builderio-content",
3702
3727
  styles: t,
@@ -3704,15 +3729,15 @@ ${Mn(e.isNestedRender)}
3704
3729
  }
3705
3730
  );
3706
3731
  }
3707
- const Kn = ({
3732
+ const Gn = ({
3708
3733
  content: e,
3709
3734
  data: t,
3710
3735
  locale: n
3711
3736
  }) => {
3712
- var l, a, r;
3713
- const i = {}, o = ((l = e == null ? void 0 : e.data) == null ? void 0 : l.state) || {};
3714
- return (r = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || r.forEach((c) => {
3715
- c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
3737
+ var a, r, s;
3738
+ const i = {}, o = ((a = e == null ? void 0 : e.data) == null ? void 0 : a.state) || {};
3739
+ return (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((d) => {
3740
+ d.name && d.defaultValue !== void 0 && (i[d.name] = d.defaultValue);
3716
3741
  }), {
3717
3742
  ...i,
3718
3743
  ...o,
@@ -3721,7 +3746,7 @@ const Kn = ({
3721
3746
  locale: n
3722
3747
  } : {}
3723
3748
  };
3724
- }, zn = ({
3749
+ }, Qn = ({
3725
3750
  content: e,
3726
3751
  data: t
3727
3752
  }) => e ? {
@@ -3733,50 +3758,50 @@ const Kn = ({
3733
3758
  meta: e == null ? void 0 : e.meta
3734
3759
  } : void 0;
3735
3760
  function Te(e) {
3736
- var c, d, f, u, m, g, y;
3761
+ var d, c, m, h, f, u, g;
3737
3762
  const [t, n] = T(
3738
3763
  () => {
3739
- var C, p;
3740
- return Nn({
3764
+ var x, b;
3765
+ return Ln({
3741
3766
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3742
- variationId: (C = e.content) == null ? void 0 : C.testVariationId,
3767
+ variationId: (x = e.content) == null ? void 0 : x.testVariationId,
3743
3768
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3744
- contentId: (p = e.content) == null ? void 0 : p.id
3769
+ contentId: (b = e.content) == null ? void 0 : b.id
3745
3770
  });
3746
3771
  }
3747
3772
  );
3748
- function i(C) {
3749
- r((p) => ({
3750
- ...p,
3751
- rootState: C
3773
+ function i(x) {
3774
+ s((b) => ({
3775
+ ...b,
3776
+ rootState: x
3752
3777
  }));
3753
3778
  }
3754
- const [o, l] = T(
3779
+ const [o, a] = T(
3755
3780
  () => {
3756
- var C;
3781
+ var x;
3757
3782
  return [
3758
3783
  ...Se(),
3759
- ...((C = e.customComponents) == null ? void 0 : C.filter(({ models: p }) => !(p != null && p.length) || !e.model ? !0 : p.includes(e.model))) || []
3784
+ ...((x = e.customComponents) == null ? void 0 : x.filter(({ models: b }) => !(b != null && b.length) || !e.model ? !0 : b.includes(e.model))) || []
3760
3785
  ].reduce(
3761
- (p, { component: B, ...E }) => ({
3762
- ...p,
3786
+ (b, { component: P, ...E }) => ({
3787
+ ...b,
3763
3788
  [E.name]: {
3764
- component: B,
3789
+ component: P,
3765
3790
  ...ge(E)
3766
3791
  }
3767
3792
  }),
3768
3793
  {}
3769
3794
  );
3770
3795
  }
3771
- ), [a, r] = T(() => {
3772
- var C;
3796
+ ), [r, s] = T(() => {
3797
+ var x;
3773
3798
  return {
3774
- content: zn({
3799
+ content: Qn({
3775
3800
  content: e.content,
3776
3801
  data: e.data
3777
3802
  }),
3778
3803
  localState: void 0,
3779
- rootState: Kn({
3804
+ rootState: Gn({
3780
3805
  content: e.content,
3781
3806
  data: e.data,
3782
3807
  locale: e.locale
@@ -3788,10 +3813,10 @@ function Te(e) {
3788
3813
  apiVersion: e.apiVersion,
3789
3814
  componentInfos: [
3790
3815
  ...Se(),
3791
- ...((C = e.customComponents) == null ? void 0 : C.filter(({ models: p }) => !(p != null && p.length) || !e.model ? !0 : p.includes(e.model))) || []
3816
+ ...((x = e.customComponents) == null ? void 0 : x.filter(({ models: b }) => !(b != null && b.length) || !e.model ? !0 : b.includes(e.model))) || []
3792
3817
  ].reduce(
3793
- (p, { component: B, ...E }) => ({
3794
- ...p,
3818
+ (b, { component: P, ...E }) => ({
3819
+ ...b,
3795
3820
  [E.name]: ge(E)
3796
3821
  }),
3797
3822
  {}
@@ -3802,14 +3827,14 @@ function Te(e) {
3802
3827
  nonce: e.nonce || ""
3803
3828
  };
3804
3829
  });
3805
- return /* @__PURE__ */ s(
3830
+ return /* @__PURE__ */ l(
3806
3831
  Be.Provider,
3807
3832
  {
3808
3833
  value: {
3809
3834
  registeredComponents: o
3810
3835
  },
3811
3836
  children: /* @__PURE__ */ V(
3812
- Hn,
3837
+ Jn,
3813
3838
  {
3814
3839
  nonce: e.nonce,
3815
3840
  content: e.content,
@@ -3821,13 +3846,13 @@ function Te(e) {
3821
3846
  locale: e.locale,
3822
3847
  enrich: e.enrich,
3823
3848
  showContent: e.showContent,
3824
- builderContextSignal: a,
3849
+ builderContextSignal: r,
3825
3850
  contentWrapper: e.contentWrapper,
3826
3851
  contentWrapperProps: e.contentWrapperProps,
3827
3852
  trustedHosts: e.trustedHosts,
3828
- setBuilderContextSignal: r,
3853
+ setBuilderContextSignal: s,
3829
3854
  children: [
3830
- e.isSsrAbTest ? /* @__PURE__ */ s(
3855
+ e.isSsrAbTest ? /* @__PURE__ */ l(
3831
3856
  ce,
3832
3857
  {
3833
3858
  id: "builderio-variant-visibility",
@@ -3835,21 +3860,21 @@ function Te(e) {
3835
3860
  nonce: e.nonce || ""
3836
3861
  }
3837
3862
  ) : null,
3838
- /* @__PURE__ */ s(
3839
- qn,
3863
+ /* @__PURE__ */ l(
3864
+ Yn,
3840
3865
  {
3841
3866
  nonce: e.nonce || "",
3842
3867
  isNestedRender: e.isNestedRender,
3843
- contentId: (c = a.content) == null ? void 0 : c.id,
3844
- cssCode: (f = (d = a.content) == null ? void 0 : d.data) == null ? void 0 : f.cssCode,
3845
- customFonts: (m = (u = a.content) == null ? void 0 : u.data) == null ? void 0 : m.customFonts
3868
+ contentId: (d = r.content) == null ? void 0 : d.id,
3869
+ cssCode: (m = (c = r.content) == null ? void 0 : c.data) == null ? void 0 : m.cssCode,
3870
+ customFonts: (f = (h = r.content) == null ? void 0 : h.data) == null ? void 0 : f.customFonts
3846
3871
  }
3847
3872
  ),
3848
- /* @__PURE__ */ s(
3873
+ /* @__PURE__ */ l(
3849
3874
  D,
3850
3875
  {
3851
- blocks: (y = (g = a.content) == null ? void 0 : g.data) == null ? void 0 : y.blocks,
3852
- context: a,
3876
+ blocks: (g = (u = r.content) == null ? void 0 : u.data) == null ? void 0 : g.blocks,
3877
+ context: r,
3853
3878
  registeredComponents: o,
3854
3879
  linkComponent: e.linkComponent
3855
3880
  }
@@ -3860,57 +3885,57 @@ function Te(e) {
3860
3885
  }
3861
3886
  );
3862
3887
  }
3863
- function _n(e) {
3864
- var a;
3888
+ function Xn(e) {
3889
+ var r;
3865
3890
  const [t, n] = T(
3866
- () => Bn({
3867
- canTrack: Q(e.canTrack),
3891
+ () => Wn({
3892
+ canTrack: X(e.canTrack),
3868
3893
  content: e.content
3869
3894
  })
3870
3895
  );
3871
3896
  function i() {
3872
- var r;
3873
- return An(
3874
- J(e.content).map((c) => ({
3875
- id: c.testVariationId,
3876
- testRatio: c.testRatio
3897
+ var s;
3898
+ return Dn(
3899
+ Y(e.content).map((d) => ({
3900
+ id: d.testVariationId,
3901
+ testRatio: d.testRatio
3877
3902
  })),
3878
- ((r = e.content) == null ? void 0 : r.id) || ""
3903
+ ((s = e.content) == null ? void 0 : s.id) || ""
3879
3904
  );
3880
3905
  }
3881
3906
  function o() {
3882
- return J(e.content).map((r) => `.variant-${r.testVariationId} { display: none; } `).join("");
3907
+ return Y(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
3883
3908
  }
3884
- function l() {
3885
- var r;
3909
+ function a() {
3910
+ var s;
3886
3911
  return t ? {
3887
3912
  ...e.content,
3888
- testVariationId: (r = e.content) == null ? void 0 : r.id
3913
+ testVariationId: (s = e.content) == null ? void 0 : s.id
3889
3914
  } : Qe({
3890
3915
  item: e.content,
3891
- canTrack: Q(e.canTrack)
3916
+ canTrack: X(e.canTrack)
3892
3917
  });
3893
3918
  }
3894
- return P(() => {
3919
+ return B(() => {
3895
3920
  }, []), /* @__PURE__ */ V(R, { children: [
3896
- !e.isNestedRender && H !== "reactNative" ? /* @__PURE__ */ s(
3921
+ !e.isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(
3897
3922
  ce,
3898
3923
  {
3899
3924
  id: "builderio-init-variants-fns",
3900
- scriptStr: Vn(),
3925
+ scriptStr: $n(),
3901
3926
  nonce: e.nonce || ""
3902
3927
  }
3903
3928
  ) : null,
3904
3929
  t ? /* @__PURE__ */ V(R, { children: [
3905
- /* @__PURE__ */ s(
3906
- ne,
3930
+ /* @__PURE__ */ l(
3931
+ te,
3907
3932
  {
3908
3933
  id: "builderio-variants",
3909
3934
  styles: o(),
3910
3935
  nonce: e.nonce || ""
3911
3936
  }
3912
3937
  ),
3913
- /* @__PURE__ */ s(
3938
+ /* @__PURE__ */ l(
3914
3939
  ce,
3915
3940
  {
3916
3941
  id: "builderio-variants-visibility",
@@ -3918,12 +3943,12 @@ function _n(e) {
3918
3943
  nonce: e.nonce || ""
3919
3944
  }
3920
3945
  ),
3921
- (a = J(e.content)) == null ? void 0 : a.map((r) => /* @__PURE__ */ s(
3946
+ (r = Y(e.content)) == null ? void 0 : r.map((s) => /* @__PURE__ */ l(
3922
3947
  Te,
3923
3948
  {
3924
3949
  isNestedRender: e.isNestedRender,
3925
3950
  nonce: e.nonce,
3926
- content: r,
3951
+ content: s,
3927
3952
  showContent: !1,
3928
3953
  model: e.model,
3929
3954
  data: e.data,
@@ -3942,15 +3967,15 @@ function _n(e) {
3942
3967
  contentWrapperProps: e.contentWrapperProps,
3943
3968
  trustedHosts: e.trustedHosts
3944
3969
  },
3945
- r.testVariationId
3970
+ s.testVariationId
3946
3971
  ))
3947
3972
  ] }) : null,
3948
- /* @__PURE__ */ s(
3973
+ /* @__PURE__ */ l(
3949
3974
  Te,
3950
3975
  {
3951
3976
  nonce: e.nonce,
3952
3977
  isNestedRender: e.isNestedRender,
3953
- content: l(),
3978
+ content: a(),
3954
3979
  showContent: !0,
3955
3980
  model: e.model,
3956
3981
  data: e.data,
@@ -3972,13 +3997,13 @@ function _n(e) {
3972
3997
  )
3973
3998
  ] });
3974
3999
  }
3975
- const Jn = async ({
4000
+ const Zn = async ({
3976
4001
  builderContextValue: e,
3977
4002
  symbol: t
3978
4003
  }) => {
3979
4004
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
3980
4005
  (e != null && e.apiKey))
3981
- return Ie({
4006
+ return we({
3982
4007
  model: t.model,
3983
4008
  apiKey: e.apiKey,
3984
4009
  apiVersion: e.apiVersion,
@@ -3991,8 +4016,8 @@ const Jn = async ({
3991
4016
  Z.error("Could not fetch symbol content: ", n);
3992
4017
  });
3993
4018
  };
3994
- function Yn(e) {
3995
- var r, c, d, f;
4019
+ function ei(e) {
4020
+ var s, d, c, m;
3996
4021
  function t() {
3997
4022
  return "div";
3998
4023
  }
@@ -4000,31 +4025,31 @@ function Yn(e) {
4000
4025
  return "div";
4001
4026
  }
4002
4027
  function i() {
4003
- var u, m;
4028
+ var h, f;
4004
4029
  return [
4005
- e.attributes[K()],
4030
+ e.attributes[q()],
4006
4031
  "builder-symbol",
4007
- (u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
4008
- (m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
4032
+ (h = e.symbol) != null && h.inline ? "builder-inline-symbol" : void 0,
4033
+ (f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
4009
4034
  ].filter(Boolean).join(" ");
4010
4035
  }
4011
- const [o, l] = T(() => {
4012
- var u;
4013
- return (u = e.symbol) == null ? void 0 : u.content;
4036
+ const [o, a] = T(() => {
4037
+ var h;
4038
+ return (h = e.symbol) == null ? void 0 : h.content;
4014
4039
  });
4015
- function a() {
4016
- o || Jn({
4040
+ function r() {
4041
+ o || Zn({
4017
4042
  symbol: e.symbol,
4018
4043
  builderContextValue: e.builderContext
4019
- }).then((u) => {
4020
- u && l(u);
4044
+ }).then((h) => {
4045
+ h && a(h);
4021
4046
  });
4022
4047
  }
4023
- return P(() => {
4024
- }, []), P(() => {
4025
- a();
4026
- }, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ s(
4027
- _n,
4048
+ return B(() => {
4049
+ }, []), B(() => {
4050
+ r();
4051
+ }, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ l(
4052
+ Xn,
4028
4053
  {
4029
4054
  nonce: e.builderContext.nonce,
4030
4055
  isNestedRender: !0,
@@ -4032,16 +4057,16 @@ function Yn(e) {
4032
4057
  apiKey: e.builderContext.apiKey,
4033
4058
  context: {
4034
4059
  ...e.builderContext.context,
4035
- symbolId: (r = e.builderBlock) == null ? void 0 : r.id
4060
+ symbolId: (s = e.builderBlock) == null ? void 0 : s.id
4036
4061
  },
4037
4062
  customComponents: Object.values(e.builderComponents),
4038
4063
  data: {
4039
- ...(c = e.symbol) == null ? void 0 : c.data,
4064
+ ...(d = e.symbol) == null ? void 0 : d.data,
4040
4065
  ...e.builderContext.localState,
4041
- ...(d = o == null ? void 0 : o.data) == null ? void 0 : d.state
4066
+ ...(c = o == null ? void 0 : o.data) == null ? void 0 : c.state
4042
4067
  },
4043
4068
  canTrack: e.builderContext.canTrack,
4044
- model: (f = e.symbol) == null ? void 0 : f.model,
4069
+ model: (m = e.symbol) == null ? void 0 : m.model,
4045
4070
  content: o,
4046
4071
  linkComponent: e.builderLinkComponent,
4047
4072
  blocksWrapper: t(),
@@ -4053,12 +4078,12 @@ export {
4053
4078
  D as Blocks,
4054
4079
  me as BuilderContext,
4055
4080
  ot as Button,
4056
- $t as Columns,
4057
- _n as Content,
4058
- Dt as Fragment,
4059
- jt as Image,
4060
- Mt as Section,
4061
- Yn as Symbol,
4062
- tn as Text,
4063
- In as Video
4081
+ jt as Columns,
4082
+ Xn as Content,
4083
+ Mt as Fragment,
4084
+ qt as Image,
4085
+ _t as Section,
4086
+ ei as Symbol,
4087
+ ln as Text,
4088
+ Bn as Video
4064
4089
  };