@builder.io/sdk-react 0.6.4 → 0.7.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/lib/browser/index.cjs +25 -25
  2. package/lib/browser/index.mjs +617 -587
  3. package/lib/{node/server-entry-f7504f89.mjs → browser/server-entry-13b7e1e6.mjs} +208 -190
  4. package/lib/browser/server-entry-c98db16c.js +2 -0
  5. package/lib/browser/server-entry.cjs +1 -1
  6. package/lib/browser/server-entry.mjs +1 -1
  7. package/lib/edge/index.cjs +32 -32
  8. package/lib/edge/index.mjs +1284 -1226
  9. package/lib/{browser/server-entry-f7504f89.mjs → edge/server-entry-13b7e1e6.mjs} +208 -190
  10. package/lib/edge/server-entry-c98db16c.js +2 -0
  11. package/lib/edge/server-entry.cjs +1 -1
  12. package/lib/edge/server-entry.mjs +1 -1
  13. package/lib/index.cjs +14 -0
  14. package/lib/index.mjs +10 -0
  15. package/lib/node/index.cjs +68 -28
  16. package/lib/node/index.mjs +929 -802
  17. package/lib/{edge/server-entry-f7504f89.mjs → node/server-entry-13b7e1e6.mjs} +208 -190
  18. package/lib/node/server-entry-c98db16c.js +2 -0
  19. package/lib/node/server-entry.cjs +1 -1
  20. package/lib/node/server-entry.mjs +1 -1
  21. package/package.json +3 -1
  22. package/types/blocks/image/image.d.ts +1 -1
  23. package/types/constants/sdk-version.d.ts +1 -1
  24. package/types/functions/evaluate/choose-eval.d.ts +6 -0
  25. package/types/functions/evaluate/evaluate.d.ts +1 -5
  26. package/types/functions/evaluate/helpers.d.ts +7 -1
  27. package/types/functions/evaluate/node-runtime/index.d.ts +1 -1
  28. package/types/functions/evaluate/node-runtime/node-runtime.d.ts +2 -0
  29. package/types/functions/evaluate/node-runtime/safeDynamicRequire.d.ts +13 -0
  30. package/types/functions/get-content/types.d.ts +94 -3
  31. package/types/functions/is-node-runtime.d.ts +4 -0
  32. package/types/node-runtime/index.d.ts +1 -0
  33. package/types/node-runtime/node-runtime.d.ts +1 -0
  34. package/types/node-runtime.d.ts +1 -0
  35. package/lib/browser/server-entry-2e639417.js +0 -2
  36. package/lib/edge/server-entry-2e639417.js +0 -2
  37. package/lib/node/server-entry-2e639417.js +0 -2
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsxs as E, Fragment as f, jsx as l } from "react/jsx-runtime";
3
- import { createContext as ye, useState as p, useContext as ae, createElement as $e, useRef as Z, useEffect as P } from "react";
4
- import { j as ee, l as _, i as V, k as F, m as Pe, n as K, T as U, r as Ae, c as Be, o as oe, a as Ve, b as Se, p as Fe, q as re, u as le, v as ce, w as Ne } from "./server-entry-f7504f89.mjs";
5
- import { _ as an, h as on, f as rn, g as ln, e as cn, d as sn, s as dn, t as un } from "./server-entry-f7504f89.mjs";
6
- function We(e) {
7
- return /* @__PURE__ */ E(f, { children: [
8
- e.link ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
2
+ import { jsxs as $, Fragment as g, jsx as c } from "react/jsx-runtime";
3
+ import { createContext as Se, useState as I, useContext as oe, createElement as ve, useRef as Z, useEffect as P } from "react";
4
+ import { j as ee, i as V, k as F, l as Ae, m as _, n as Y, T as M, r as Be, o as U, p as re, a as Ve, c as Fe, b as pe, q as Ne, u as le, v as ce, w as We } from "./server-entry-13b7e1e6.mjs";
5
+ import { _ as ln, h as cn, f as sn, g as dn, e as un, d as mn, s as fn, t as hn } from "./server-entry-13b7e1e6.mjs";
6
+ function je(e) {
7
+ return /* @__PURE__ */ $(g, { children: [
8
+ e.link ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
9
9
  "a",
10
10
  {
11
11
  role: "button",
@@ -14,21 +14,21 @@ function We(e) {
14
14
  target: e.openLinkInNewTab ? "_blank" : void 0,
15
15
  children: e.text
16
16
  }
17
- ) }) : /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
17
+ ) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
18
18
  "button",
19
19
  {
20
20
  ...e.attributes,
21
21
  style: e.attributes.style,
22
- className: e.attributes.className + " button-3e7bc8b2",
22
+ className: e.attributes.className + " button-35669e6c",
23
23
  children: e.text
24
24
  }
25
25
  ) }),
26
- /* @__PURE__ */ l("style", { children: `.button-3e7bc8b2 {
26
+ /* @__PURE__ */ c("style", { children: `.button-35669e6c {
27
27
  all: unset;
28
28
  }` })
29
29
  ] });
30
30
  }
31
- const ve = {
31
+ const ke = {
32
32
  small: {
33
33
  min: 320,
34
34
  default: 321,
@@ -44,11 +44,11 @@ const ve = {
44
44
  default: 991,
45
45
  max: 1200
46
46
  }
47
- }, se = (e, t = ve) => `@media (max-width: ${t[e].max}px)`, ke = ({
47
+ }, se = (e, t = ke) => `@media (max-width: ${t[e].max}px)`, Ce = ({
48
48
  small: e,
49
49
  medium: t
50
50
  }) => {
51
- const n = ee(ve);
51
+ const n = ee(ke);
52
52
  if (!e || !t)
53
53
  return n;
54
54
  const i = Math.floor(e / 2);
@@ -70,7 +70,7 @@ const ve = {
70
70
  min: o,
71
71
  default: o + 1
72
72
  }, n;
73
- }, je = ({
73
+ }, Me = ({
74
74
  builder: e,
75
75
  context: t,
76
76
  event: n,
@@ -82,7 +82,14 @@ const ve = {
82
82
  builder: e,
83
83
  context: t,
84
84
  event: n
85
- }), Me = ({
85
+ }), Le = () => ({
86
+ isEditing: V(),
87
+ isBrowser: F(),
88
+ isServer: !F(),
89
+ getUserAttributes: () => Ae()
90
+ }), _e = (e, {
91
+ isExpression: t = !0
92
+ }) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, de = ({
86
93
  code: e,
87
94
  builder: t,
88
95
  context: n,
@@ -91,13 +98,13 @@ const ve = {
91
98
  rootSetState: o,
92
99
  rootState: r
93
100
  }) => {
94
- const d = je({
101
+ const d = Me({
95
102
  builder: t,
96
103
  context: n,
97
104
  event: i,
98
105
  state: Ue(r, a, o)
99
106
  });
100
- return new Function(...d.map(([c]) => c), e)(...d.map(([, c]) => c));
107
+ return new Function(...d.map(([l]) => l), e)(...d.map(([, l]) => l));
101
108
  };
102
109
  function Ue(e, t, n) {
103
110
  if (e === t)
@@ -111,7 +118,8 @@ function Ue(e, t, n) {
111
118
  }
112
119
  });
113
120
  }
114
- function M({
121
+ const Ke = (e) => (F(), de(e));
122
+ function j({
115
123
  code: e,
116
124
  context: t,
117
125
  localState: n,
@@ -125,13 +133,10 @@ function M({
125
133
  return;
126
134
  }
127
135
  const d = {
128
- isEditing: V(),
129
- isBrowser: F(),
130
- isServer: !F(),
131
- getUserAttributes: () => Pe()
132
- }, u = {
133
- code: /* we disable this for cases where we definitely don't want a return */ r && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
134
- builder: d,
136
+ code: _e(e, {
137
+ isExpression: r
138
+ }),
139
+ builder: Le(),
135
140
  context: t,
136
141
  event: o,
137
142
  rootSetState: a,
@@ -139,21 +144,21 @@ function M({
139
144
  localState: n
140
145
  };
141
146
  try {
142
- return Me(u);
143
- } catch (m) {
144
- _.error("Failed code evaluation: " + m.message, {
147
+ return Ke(d);
148
+ } catch (l) {
149
+ _.error("Failed code evaluation: " + l.message, {
145
150
  code: e
146
151
  });
147
152
  return;
148
153
  }
149
154
  }
150
- const Le = (e, t, n) => {
155
+ const Oe = (e, t, n) => {
151
156
  if (Object(e) !== e)
152
157
  return e;
153
158
  const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
154
159
  return i.slice(0, -1).reduce((a, o, r) => Object(a[o]) === a[o] ? a[o] : a[o] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
155
160
  };
156
- const _e = ({
161
+ const He = ({
157
162
  block: e,
158
163
  context: t,
159
164
  localState: n,
@@ -172,18 +177,18 @@ const _e = ({
172
177
  }
173
178
  };
174
179
  for (const d in e.bindings) {
175
- const c = e.bindings[d], s = M({
176
- code: c,
180
+ const l = e.bindings[d], s = j({
181
+ code: l,
177
182
  localState: n,
178
183
  rootState: i,
179
184
  rootSetState: a,
180
185
  context: t
181
186
  });
182
- Le(r, d, s);
187
+ Oe(r, d, s);
183
188
  }
184
189
  return r;
185
190
  };
186
- function O({
191
+ function K({
187
192
  block: e,
188
193
  context: t,
189
194
  shouldEvaluateBindings: n,
@@ -192,7 +197,7 @@ function O({
192
197
  rootSetState: o
193
198
  }) {
194
199
  const r = e;
195
- return n ? _e({
200
+ return n ? He({
196
201
  block: r,
197
202
  localState: i,
198
203
  rootState: a,
@@ -200,28 +205,28 @@ function O({
200
205
  context: t
201
206
  }) : r;
202
207
  }
203
- const Ke = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), pe = (e) => Object.entries(e).map(([n, i]) => {
208
+ const ze = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), we = (e) => Object.entries(e).map(([n, i]) => {
204
209
  if (typeof i == "string")
205
- return `${Ke(n)}: ${i};`;
206
- }).filter(K), Oe = (e) => pe(e).join(`
207
- `), J = ({
210
+ return `${ze(n)}: ${i};`;
211
+ }).filter(Y), qe = (e) => we(e).join(`
212
+ `), D = ({
208
213
  mediaQuery: e,
209
214
  className: t,
210
215
  styles: n
211
216
  }) => {
212
217
  const i = `.${t} {
213
- ${Oe(n)}
218
+ ${qe(n)}
214
219
  }`;
215
220
  return e ? `${e} {
216
221
  ${i}
217
222
  }` : i;
218
223
  };
219
- function z(e) {
220
- return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
224
+ function H(e) {
225
+ return /* @__PURE__ */ c("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
221
226
  }
222
227
  function te(e) {
223
228
  function t() {
224
- const i = O({
229
+ const i = K({
225
230
  block: e.block,
226
231
  localState: e.context.localState,
227
232
  rootState: e.context.rootState,
@@ -229,33 +234,33 @@ function te(e) {
229
234
  context: e.context.context,
230
235
  shouldEvaluateBindings: !0
231
236
  });
232
- return K(i.hide) ? !i.hide : K(i.show) ? i.show : !0;
237
+ return Y(i.hide) ? !i.hide : Y(i.show) ? i.show : !0;
233
238
  }
234
239
  function n() {
235
- var h;
236
- const i = O({
240
+ var b;
241
+ const i = K({
237
242
  block: e.block,
238
243
  localState: e.context.localState,
239
244
  rootState: e.context.rootState,
240
245
  rootSetState: e.context.rootSetState,
241
246
  context: e.context.context,
242
247
  shouldEvaluateBindings: !0
243
- }), a = i.responsiveStyles, o = e.context.content, r = ke(
244
- ((h = o == null ? void 0 : o.meta) == null ? void 0 : h.breakpoints) || {}
245
- ), d = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, s = a == null ? void 0 : a.small, u = i.id;
248
+ }), a = i.responsiveStyles, o = e.context.content, r = Ce(
249
+ ((b = o == null ? void 0 : o.meta) == null ? void 0 : b.breakpoints) || {}
250
+ ), d = a == null ? void 0 : a.large, l = a == null ? void 0 : a.medium, s = a == null ? void 0 : a.small, u = i.id;
246
251
  if (!u)
247
252
  return "";
248
- const m = d ? J({
253
+ const h = d ? D({
249
254
  className: u,
250
255
  styles: d
251
- }) : "", y = c ? J({
256
+ }) : "", y = l ? D({
252
257
  className: u,
253
- styles: c,
258
+ styles: l,
254
259
  mediaQuery: se(
255
260
  "medium",
256
261
  r
257
262
  )
258
- }) : "", k = s ? J({
263
+ }) : "", k = s ? D({
259
264
  className: u,
260
265
  styles: s,
261
266
  mediaQuery: se(
@@ -263,11 +268,11 @@ function te(e) {
263
268
  r
264
269
  )
265
270
  }) : "";
266
- return [m, y, k].join(" ");
271
+ return [h, y, k].join(" ");
267
272
  }
268
- return /* @__PURE__ */ l(f, { children: n() && t() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(z, { styles: n() }) }) : null });
273
+ return /* @__PURE__ */ c(g, { children: n() && t() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(H, { styles: n() }) }) : null });
269
274
  }
270
- function He(e) {
275
+ function De(e) {
271
276
  var t;
272
277
  return {
273
278
  ...(t = e.component) == null ? void 0 : t.options,
@@ -278,13 +283,13 @@ function He(e) {
278
283
  builderBlock: e
279
284
  };
280
285
  }
281
- const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], Y = (e) => typeof e == "string" && ze.includes(e.toLowerCase()), qe = ({
286
+ const Ge = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], G = (e) => typeof e == "string" && Ge.includes(e.toLowerCase()), Je = ({
282
287
  block: e,
283
288
  context: t,
284
289
  registeredComponents: n
285
290
  }) => {
286
291
  var o;
287
- const i = (o = O({
292
+ const i = (o = K({
288
293
  block: e,
289
294
  localState: t.localState,
290
295
  rootState: t.rootState,
@@ -300,7 +305,7 @@ const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
300
305
  console.warn(`
301
306
  Could not find a registered component named "${i}".
302
307
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
303
- }, De = ({
308
+ }, Ye = ({
304
309
  block: e,
305
310
  context: t
306
311
  }) => {
@@ -310,7 +315,7 @@ const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
310
315
  } = e;
311
316
  if (!(n != null && n.collection))
312
317
  return;
313
- const a = M({
318
+ const a = j({
314
319
  code: n.collection,
315
320
  localState: t.localState,
316
321
  rootState: t.rootState,
@@ -320,20 +325,20 @@ const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
320
325
  if (!Array.isArray(a))
321
326
  return;
322
327
  const o = n.collection.split(".").pop(), r = n.itemName || (o ? o + "Item" : "item");
323
- return a.map((c, s) => ({
328
+ return a.map((l, s) => ({
324
329
  context: {
325
330
  ...t,
326
331
  localState: {
327
332
  ...t.localState,
328
333
  $index: s,
329
- $item: c,
330
- [r]: c,
334
+ $item: l,
335
+ [r]: l,
331
336
  [`$${r}Index`]: s
332
337
  }
333
338
  },
334
339
  block: i
335
340
  }));
336
- }, ne = ye({
341
+ }, ne = Se({
337
342
  content: null,
338
343
  context: {},
339
344
  localState: void 0,
@@ -345,10 +350,10 @@ const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
345
350
  componentInfos: {},
346
351
  inheritedStyles: {}
347
352
  });
348
- function Je(e) {
349
- const [t, n] = p(() => e.repeatContext);
350
- return /* @__PURE__ */ l(ne.Provider, { value: t, children: /* @__PURE__ */ l(
351
- q,
353
+ function Qe(e) {
354
+ const [t, n] = I(() => e.repeatContext);
355
+ return /* @__PURE__ */ c(ne.Provider, { value: t, children: /* @__PURE__ */ c(
356
+ z,
352
357
  {
353
358
  block: e.block,
354
359
  context: t,
@@ -356,10 +361,10 @@ function Je(e) {
356
361
  }
357
362
  ) });
358
363
  }
359
- function Ye(e) {
364
+ function Xe(e) {
360
365
  return e.charAt(0).toUpperCase() + e.slice(1);
361
366
  }
362
- const Ge = (e) => `on${Ye(e)}`, Qe = (e, t) => (n) => M({
367
+ const Ze = (e) => `on${Xe(e)}`, et = (e, t) => (n) => j({
363
368
  code: e,
364
369
  context: t.context,
365
370
  localState: t.localState,
@@ -374,9 +379,9 @@ function Q(e) {
374
379
  if (!n.hasOwnProperty(i))
375
380
  continue;
376
381
  const a = n[i];
377
- let o = Ge(i);
382
+ let o = Ze(i);
378
383
  if (e.stripPrefix)
379
- switch (U) {
384
+ switch (M) {
380
385
  case "vue2":
381
386
  case "vue3":
382
387
  o = o.replace("v-on:", "");
@@ -385,37 +390,37 @@ function Q(e) {
385
390
  o = o.replace("on:", "");
386
391
  break;
387
392
  }
388
- t[o] = Qe(a, e);
393
+ t[o] = et(a, e);
389
394
  }
390
395
  return t;
391
396
  }
392
- function Xe(e) {
397
+ function tt(e) {
393
398
  return e.className = e.class, delete e.class, e;
394
399
  }
395
- const Ze = (e) => ({
400
+ const nt = (e) => ({
396
401
  href: e.href
397
402
  });
398
- function H({
403
+ function O({
399
404
  block: e,
400
405
  context: t
401
406
  }) {
402
407
  var i;
403
408
  const n = {
404
- ...Ze(e),
409
+ ...nt(e),
405
410
  ...e.properties,
406
411
  "builder-id": e.id,
407
- style: e.style ? et(e.style) : void 0,
412
+ style: e.style ? it(e.style) : void 0,
408
413
  class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
409
414
  };
410
- return Xe(n);
415
+ return tt(n);
411
416
  }
412
- function et(e) {
413
- switch (U) {
417
+ function it(e) {
418
+ switch (M) {
414
419
  case "svelte":
415
420
  case "vue2":
416
421
  case "vue3":
417
422
  case "solid":
418
- return pe(e).join(" ");
423
+ return we(e).join(" ");
419
424
  case "qwik":
420
425
  case "reactNative":
421
426
  case "react":
@@ -423,13 +428,13 @@ function et(e) {
423
428
  return e;
424
429
  }
425
430
  }
426
- function tt(e) {
427
- return /* @__PURE__ */ l(
431
+ function at(e) {
432
+ return /* @__PURE__ */ c(
428
433
  e.Wrapper,
429
434
  {
430
435
  ...e.wrapperProps,
431
436
  attributes: {
432
- ...H({
437
+ ...O({
433
438
  block: e.block,
434
439
  context: e.context
435
440
  }),
@@ -445,7 +450,7 @@ function tt(e) {
445
450
  }
446
451
  );
447
452
  }
448
- const nt = ({
453
+ const ot = ({
449
454
  componentOptions: e,
450
455
  builderBlock: t,
451
456
  context: n,
@@ -465,21 +470,21 @@ const nt = ({
465
470
  * component itself directly. Otherwise, they are provided to the wrapper element.
466
471
  */
467
472
  ...a ? {
468
- attributes: H({
473
+ attributes: O({
469
474
  block: t,
470
475
  context: r
471
476
  })
472
477
  } : {}
473
478
  };
474
- function de(e) {
479
+ function ue(e) {
475
480
  var i, a;
476
- const [t, n] = p(
477
- () => e.isInteractive ? tt : e.componentRef
481
+ const [t, n] = I(
482
+ () => e.isInteractive ? at : e.componentRef
478
483
  );
479
- return /* @__PURE__ */ l(f, { children: e.componentRef ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
484
+ return /* @__PURE__ */ c(g, { children: e.componentRef ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ $(
480
485
  t,
481
486
  {
482
- ...nt({
487
+ ...ot({
483
488
  componentOptions: e.componentOptions,
484
489
  builderBlock: e.builderBlock,
485
490
  context: e.context,
@@ -489,8 +494,8 @@ function de(e) {
489
494
  contextValue: e.context
490
495
  }),
491
496
  children: [
492
- (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
493
- q,
497
+ (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(
498
+ z,
494
499
  {
495
500
  block: o,
496
501
  context: e.context,
@@ -498,7 +503,7 @@ function de(e) {
498
503
  },
499
504
  "block-" + o.id
500
505
  )),
501
- (a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ l(
506
+ (a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ c(
502
507
  te,
503
508
  {
504
509
  block: o,
@@ -510,13 +515,13 @@ function de(e) {
510
515
  }
511
516
  ) }) : null });
512
517
  }
513
- function ue(e) {
514
- return /* @__PURE__ */ E(f, { children: [
518
+ function me(e) {
519
+ return /* @__PURE__ */ $(g, { children: [
515
520
  " ",
516
- e.hasChildren ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
521
+ e.hasChildren ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ $(
517
522
  e.Wrapper,
518
523
  {
519
- ...H({
524
+ ...O({
520
525
  block: e.block,
521
526
  context: e.context
522
527
  }),
@@ -534,10 +539,10 @@ function ue(e) {
534
539
  " "
535
540
  ]
536
541
  }
537
- ) }) : /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
542
+ ) }) : /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
538
543
  e.Wrapper,
539
544
  {
540
- ...H({
545
+ ...O({
541
546
  block: e.block,
542
547
  context: e.context
543
548
  }),
@@ -554,23 +559,23 @@ function ue(e) {
554
559
  " "
555
560
  ] });
556
561
  }
557
- function q(e) {
558
- var u, m, y, k;
562
+ function z(e) {
563
+ var u, h, y, k;
559
564
  function t() {
560
- return qe({
565
+ return Je({
561
566
  block: e.block,
562
567
  context: e.context,
563
568
  registeredComponents: e.registeredComponents
564
569
  });
565
570
  }
566
571
  function n() {
567
- return De({
572
+ return Ye({
568
573
  block: e.block,
569
574
  context: e.context
570
575
  });
571
576
  }
572
577
  function i() {
573
- return n() ? e.block : O({
578
+ return n() ? e.block : K({
574
579
  block: e.block,
575
580
  localState: e.context.localState,
576
581
  rootState: e.context.rootState,
@@ -586,32 +591,32 @@ function q(e) {
586
591
  return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
587
592
  }
588
593
  function r() {
589
- var x;
590
- return !((x = t == null ? void 0 : t()) != null && x.component) && !n() ? i().children ?? [] : [];
594
+ var S;
595
+ return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
591
596
  }
592
597
  function d() {
593
- var h, x, C, T, g;
598
+ var b, S, C, w, x;
594
599
  return {
595
600
  blockChildren: i().children ?? [],
596
- componentRef: (h = t == null ? void 0 : t()) == null ? void 0 : h.component,
601
+ componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
597
602
  componentOptions: {
598
- ...He(i()),
603
+ ...De(i()),
599
604
  builderContext: e.context,
600
- ...((x = t == null ? void 0 : t()) == null ? void 0 : x.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
605
+ ...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
601
606
  builderComponents: e.registeredComponents
602
607
  } : {}
603
608
  },
604
- context: c,
609
+ context: l,
605
610
  registeredComponents: e.registeredComponents,
606
611
  builderBlock: i(),
607
- includeBlockProps: ((T = t == null ? void 0 : t()) == null ? void 0 : T.noWrap) === !0,
608
- isInteractive: !((g = t == null ? void 0 : t()) != null && g.isRSC)
612
+ includeBlockProps: ((w = t == null ? void 0 : t()) == null ? void 0 : w.noWrap) === !0,
613
+ isInteractive: !((x = t == null ? void 0 : t()) != null && x.isRSC)
609
614
  };
610
615
  }
611
- const [c, s] = p(() => e.context);
612
- return /* @__PURE__ */ l(f, { children: o() ? /* @__PURE__ */ l(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(de, { ...d() }) }) : /* @__PURE__ */ E(f, { children: [
613
- Y(a()) ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
614
- ue,
616
+ const [l, s] = I(() => e.context);
617
+ return /* @__PURE__ */ c(g, { children: o() ? /* @__PURE__ */ c(g, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(ue, { ...d() }) }) : /* @__PURE__ */ $(g, { children: [
618
+ G(a()) ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
619
+ me,
615
620
  {
616
621
  Wrapper: a(),
617
622
  block: i(),
@@ -619,47 +624,47 @@ function q(e) {
619
624
  hasChildren: !1
620
625
  }
621
626
  ) }) : null,
622
- !Y(a()) && n() ? /* @__PURE__ */ l(f, { children: (m = n()) == null ? void 0 : m.map((h, x) => /* @__PURE__ */ l(
623
- Je,
627
+ !G(a()) && n() ? /* @__PURE__ */ c(g, { children: (h = n()) == null ? void 0 : h.map((b, S) => /* @__PURE__ */ c(
628
+ Qe,
624
629
  {
625
- repeatContext: h.context,
626
- block: h.block,
630
+ repeatContext: b.context,
631
+ block: b.block,
627
632
  registeredComponents: e.registeredComponents
628
633
  },
629
- x
634
+ S
630
635
  )) }) : null,
631
- !Y(a()) && !n() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
632
- ue,
636
+ !G(a()) && !n() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ $(
637
+ me,
633
638
  {
634
639
  Wrapper: a(),
635
640
  block: i(),
636
641
  context: e.context,
637
642
  hasChildren: !0,
638
643
  children: [
639
- /* @__PURE__ */ l(de, { ...d() }),
640
- (y = r()) == null ? void 0 : y.map((h) => /* @__PURE__ */ l(
641
- q,
644
+ /* @__PURE__ */ c(ue, { ...d() }),
645
+ (y = r()) == null ? void 0 : y.map((b) => /* @__PURE__ */ c(
646
+ z,
642
647
  {
643
- block: h,
644
- context: c,
648
+ block: b,
649
+ context: l,
645
650
  registeredComponents: e.registeredComponents
646
651
  },
647
- "block-" + h.id
652
+ "block-" + b.id
648
653
  )),
649
- (k = r()) == null ? void 0 : k.map((h) => /* @__PURE__ */ l(
654
+ (k = r()) == null ? void 0 : k.map((b) => /* @__PURE__ */ c(
650
655
  te,
651
656
  {
652
- block: h,
653
- context: c
657
+ block: b,
658
+ context: l
654
659
  },
655
- "block-style-" + h.id
660
+ "block-style-" + b.id
656
661
  ))
657
662
  ]
658
663
  }
659
664
  ) }) : null
660
665
  ] }) }) : null });
661
666
  }
662
- function it(e) {
667
+ function rt(e) {
663
668
  function t() {
664
669
  var a;
665
670
  return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
@@ -690,11 +695,11 @@ function it(e) {
690
695
  "*"
691
696
  ));
692
697
  }
693
- return /* @__PURE__ */ E(f, { children: [
694
- /* @__PURE__ */ l(
698
+ return /* @__PURE__ */ $(g, { children: [
699
+ /* @__PURE__ */ c(
695
700
  "div",
696
701
  {
697
- className: t() + " div-5821bd52",
702
+ className: t() + " div-02c7a115",
698
703
  "builder-path": e.path,
699
704
  "builder-parent-id": e.parent,
700
705
  style: e.styleProp,
@@ -704,27 +709,27 @@ function it(e) {
704
709
  children: e.children
705
710
  }
706
711
  ),
707
- /* @__PURE__ */ l("style", { children: `.div-5821bd52 {
712
+ /* @__PURE__ */ c("style", { children: `.div-02c7a115 {
708
713
  display: flex;
709
714
  flex-direction: column;
710
715
  align-items: stretch;
711
716
  }` })
712
717
  ] });
713
718
  }
714
- const Ce = ye({ registeredComponents: {} });
719
+ const Ie = Se({ registeredComponents: {} });
715
720
  function ie(e) {
716
721
  var i, a;
717
- const t = ae(ne), n = ae(Ce);
718
- return /* @__PURE__ */ E(
719
- it,
722
+ const t = oe(ne), n = oe(Ie);
723
+ return /* @__PURE__ */ $(
724
+ rt,
720
725
  {
721
726
  blocks: e.blocks,
722
727
  parent: e.parent,
723
728
  path: e.path,
724
729
  styleProp: e.styleProp,
725
730
  children: [
726
- e.blocks ? /* @__PURE__ */ l(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
727
- q,
731
+ e.blocks ? /* @__PURE__ */ c(g, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(
732
+ z,
728
733
  {
729
734
  block: o,
730
735
  context: e.context || t,
@@ -732,7 +737,7 @@ function ie(e) {
732
737
  },
733
738
  "render-block-" + o.id
734
739
  )) }) : null,
735
- e.blocks ? /* @__PURE__ */ l(f, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ l(
740
+ e.blocks ? /* @__PURE__ */ c(g, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ c(
736
741
  te,
737
742
  {
738
743
  block: o,
@@ -744,47 +749,47 @@ function ie(e) {
744
749
  }
745
750
  );
746
751
  }
747
- function at(e) {
748
- var T;
749
- const [t, n] = p(
752
+ function lt(e) {
753
+ var w;
754
+ const [t, n] = I(
750
755
  () => typeof e.space == "number" ? e.space || 0 : 20
751
- ), [i, a] = p(() => e.columns || []), [o, r] = p(
756
+ ), [i, a] = I(() => e.columns || []), [o, r] = I(
752
757
  () => e.stackColumnsAt || "tablet"
753
758
  );
754
- function d(g) {
759
+ function d(x) {
755
760
  var R;
756
- return ((R = i[g]) == null ? void 0 : R.width) || 100 / i.length;
761
+ return ((R = i[x]) == null ? void 0 : R.width) || 100 / i.length;
757
762
  }
758
- function c(g) {
763
+ function l(x) {
759
764
  const R = t * (i.length - 1) / i.length;
760
- return `calc(${d(g)}% - ${R}px)`;
765
+ return `calc(${d(x)}% - ${R}px)`;
761
766
  }
762
767
  function s({
763
- stackedStyle: g,
768
+ stackedStyle: x,
764
769
  desktopStyle: R
765
770
  }) {
766
- return o === "tablet" ? g : R;
771
+ return o === "tablet" ? x : R;
767
772
  }
768
773
  function u({
769
- stackedStyle: g,
774
+ stackedStyle: x,
770
775
  desktopStyle: R
771
776
  }) {
772
- return o === "never" ? R : g;
777
+ return o === "never" ? R : x;
773
778
  }
774
- const [m, y] = p(
779
+ const [h, y] = I(
775
780
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
776
781
  );
777
782
  function k() {
778
783
  return {
779
- "--flex-dir": m,
784
+ "--flex-dir": h,
780
785
  "--flex-dir-tablet": s({
781
- stackedStyle: m,
786
+ stackedStyle: h,
782
787
  desktopStyle: "row"
783
788
  })
784
789
  };
785
790
  }
786
- function h(g) {
787
- const R = g === 0 ? 0 : t, A = c(g), B = `${R}px`, N = "100%", W = 0;
791
+ function b(x) {
792
+ const R = x === 0 ? 0 : t, A = l(x), B = `${R}px`, N = "100%", W = 0;
788
793
  return {
789
794
  width: A,
790
795
  ["marginLeft"]: B,
@@ -806,15 +811,15 @@ function at(e) {
806
811
  })
807
812
  };
808
813
  }
809
- function x(g) {
814
+ function S(x) {
810
815
  var A, B;
811
- return ke(
816
+ return Ce(
812
817
  ((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
813
- )[g].max;
818
+ )[x].max;
814
819
  }
815
820
  function C() {
816
821
  return `
817
- @media (max-width: ${x("medium")}px) {
822
+ @media (max-width: ${S("medium")}px) {
818
823
  .${e.builderBlock.id}-breakpoints {
819
824
  flex-direction: var(--flex-dir-tablet);
820
825
  align-items: stretch;
@@ -826,7 +831,7 @@ function at(e) {
826
831
  }
827
832
  }
828
833
 
829
- @media (max-width: ${x("small")}px) {
834
+ @media (max-width: ${S("small")}px) {
830
835
  .${e.builderBlock.id}-breakpoints {
831
836
  flex-direction: var(--flex-dir);
832
837
  align-items: stretch;
@@ -839,22 +844,22 @@ function at(e) {
839
844
  },
840
845
  `;
841
846
  }
842
- return /* @__PURE__ */ E(f, { children: [
843
- /* @__PURE__ */ E(
847
+ return /* @__PURE__ */ $(g, { children: [
848
+ /* @__PURE__ */ $(
844
849
  "div",
845
850
  {
846
- className: `builder-columns ${e.builderBlock.id}-breakpoints div-d734ad62`,
851
+ className: `builder-columns ${e.builderBlock.id}-breakpoints div-ac8f4142`,
847
852
  style: k(),
848
853
  children: [
849
- /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(z, { styles: C() }) }),
850
- (T = e.columns) == null ? void 0 : T.map((g, R) => /* @__PURE__ */ $e(
854
+ /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(H, { styles: C() }) }),
855
+ (w = e.columns) == null ? void 0 : w.map((x, R) => /* @__PURE__ */ ve(
851
856
  "div",
852
857
  {
853
- className: "builder-column div-d734ad62-2",
854
- style: h(R),
858
+ className: "builder-column div-ac8f4142-2",
859
+ style: b(R),
855
860
  key: R
856
861
  },
857
- /* @__PURE__ */ l(
862
+ /* @__PURE__ */ c(
858
863
  ie,
859
864
  {
860
865
  path: `component.options.columns.${R}.blocks`,
@@ -864,57 +869,57 @@ function at(e) {
864
869
  },
865
870
  context: e.builderContext,
866
871
  registeredComponents: e.builderComponents,
867
- blocks: g.blocks
872
+ blocks: x.blocks
868
873
  }
869
874
  )
870
875
  ))
871
876
  ]
872
877
  }
873
878
  ),
874
- /* @__PURE__ */ l("style", { children: `.div-d734ad62 {
879
+ /* @__PURE__ */ c("style", { children: `.div-ac8f4142 {
875
880
  display: flex;
876
881
  line-height: normal;
877
- }.div-d734ad62-2 {
882
+ }.div-ac8f4142-2 {
878
883
  display: flex;
879
884
  flex-direction: column;
880
885
  align-items: stretch;
881
886
  }` })
882
887
  ] });
883
888
  }
884
- function ot(e) {
885
- return /* @__PURE__ */ l("span", { children: e.children });
889
+ function ct(e) {
890
+ return /* @__PURE__ */ c("span", { children: e.children });
886
891
  }
887
- function me(e) {
892
+ function fe(e) {
888
893
  return e.replace(/http(s)?:/, "");
889
894
  }
890
- function rt(e = "", t, n) {
895
+ function st(e = "", t, n) {
891
896
  const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
892
897
  return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
893
898
  }
894
- function lt(e, t) {
899
+ function dt(e, t) {
895
900
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
896
901
  return e;
897
902
  if (t === "master")
898
- return me(e);
903
+ return fe(e);
899
904
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
900
905
  if (n) {
901
906
  const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
902
- return me(`${i[0]}_${o}${a}`);
907
+ return fe(`${i[0]}_${o}${a}`);
903
908
  }
904
909
  return null;
905
910
  }
906
- function G(e) {
911
+ function J(e) {
907
912
  if (!e)
908
913
  return e;
909
914
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
910
915
  if (e.match(/builder\.io/)) {
911
916
  let n = e;
912
917
  const i = Number(e.split("?width=")[1]);
913
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${rt(e, "width", a)} ${a}w`).concat([n]).join(", ");
918
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${st(e, "width", a)} ${a}w`).concat([n]).join(", ");
914
919
  }
915
- return e.match(/cdn\.shopify\.com/) ? t.map((n) => [lt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
920
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [dt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
916
921
  }
917
- function ct(e) {
922
+ function ut(e) {
918
923
  var a, o, r, d;
919
924
  function t() {
920
925
  var u;
@@ -925,30 +930,30 @@ function ct(e) {
925
930
  return e.srcset;
926
931
  if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
927
932
  if (!e.srcset.includes(e.image.split("?")[0]))
928
- return console.debug("Removed given srcset"), G(s);
933
+ return console.debug("Removed given srcset"), J(s);
929
934
  } else if (e.image && !e.srcset)
930
- return G(s);
931
- return G(s);
935
+ return J(s);
936
+ return J(s);
932
937
  }
933
938
  function n() {
934
- var c;
935
- return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
939
+ var l;
940
+ return (l = t == null ? void 0 : t()) != null && l.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
936
941
  }
937
942
  function i() {
938
- const c = {
943
+ const l = {
939
944
  position: "absolute",
940
945
  height: "100%",
941
946
  width: "100%",
942
947
  left: "0px",
943
948
  top: "0px"
944
949
  };
945
- return e.aspectRatio ? c : void 0;
950
+ return e.aspectRatio ? l : void 0;
946
951
  }
947
- return /* @__PURE__ */ E(f, { children: [
948
- /* @__PURE__ */ E(f, { children: [
949
- /* @__PURE__ */ E("picture", { children: [
950
- n() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
951
- /* @__PURE__ */ l(
952
+ return /* @__PURE__ */ $(g, { children: [
953
+ /* @__PURE__ */ $(g, { children: [
954
+ /* @__PURE__ */ $("picture", { children: [
955
+ n() ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("source", { type: "image/webp", srcSet: n() }) }) : null,
956
+ /* @__PURE__ */ c(
952
957
  "img",
953
958
  {
954
959
  loading: "lazy",
@@ -959,33 +964,33 @@ function ct(e) {
959
964
  objectFit: e.backgroundSize || "cover",
960
965
  ...i()
961
966
  },
962
- className: "builder-image" + (e.className ? " " + e.className : "") + " img-ef11a6be",
967
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-497e0136",
963
968
  src: e.image,
964
969
  srcSet: t(),
965
970
  sizes: e.sizes
966
971
  }
967
972
  )
968
973
  ] }),
969
- e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
974
+ e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
970
975
  "div",
971
976
  {
972
- className: "builder-image-sizer div-ef11a6be",
977
+ className: "builder-image-sizer div-497e0136",
973
978
  style: {
974
979
  paddingTop: e.aspectRatio * 100 + "%"
975
980
  }
976
981
  }
977
982
  ) }) : null,
978
- (d = (r = e.builderBlock) == null ? void 0 : r.children) != null && d.length && e.fitContent ? /* @__PURE__ */ l(f, { children: e.children }) : null,
979
- !e.fitContent && e.children ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l("div", { className: "div-ef11a6be-2", children: e.children }) }) : null
983
+ (d = (r = e.builderBlock) == null ? void 0 : r.children) != null && d.length && e.fitContent ? /* @__PURE__ */ c(g, { children: e.children }) : null,
984
+ !e.fitContent && e.children ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c("div", { className: "div-497e0136-2", children: e.children }) }) : null
980
985
  ] }),
981
- /* @__PURE__ */ l("style", { children: `.img-ef11a6be {
986
+ /* @__PURE__ */ c("style", { children: `.img-497e0136 {
982
987
  opacity: 1;
983
988
  transition: opacity 0.2s ease-in-out;
984
- }.div-ef11a6be {
989
+ }.div-497e0136 {
985
990
  width: 100%;
986
991
  pointer-events: none;
987
992
  font-size: 0;
988
- }.div-ef11a6be-2 {
993
+ }.div-497e0136-2 {
989
994
  display: flex;
990
995
  flex-direction: column;
991
996
  align-items: stretch;
@@ -997,8 +1002,8 @@ function ct(e) {
997
1002
  }` })
998
1003
  ] });
999
1004
  }
1000
- function st(e) {
1001
- return /* @__PURE__ */ l(
1005
+ function mt(e) {
1006
+ return /* @__PURE__ */ c(
1002
1007
  "section",
1003
1008
  {
1004
1009
  ...e.attributes,
@@ -1022,41 +1027,41 @@ const L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t
1022
1027
  ...t,
1023
1028
  testVariationId: t.id,
1024
1029
  id: e == null ? void 0 : e.id
1025
- })), dt = ({
1030
+ })), ft = ({
1026
1031
  canTrack: e,
1027
1032
  content: t
1028
1033
  }) => !(!(L(t).length > 0) || !e || F());
1029
- function ut(e, t, n) {
1034
+ function ht(e, t, n) {
1030
1035
  var r;
1031
1036
  function i() {
1032
- function d(h, x, C) {
1033
- let T = "";
1037
+ function d(b, S, C) {
1038
+ let w = "";
1034
1039
  if (C) {
1035
- const g = /* @__PURE__ */ new Date();
1036
- g.setTime(g.getTime() + C * 24 * 60 * 60 * 1e3), T = "; expires=" + g.toUTCString();
1040
+ const x = /* @__PURE__ */ new Date();
1041
+ x.setTime(x.getTime() + C * 24 * 60 * 60 * 1e3), w = "; expires=" + x.toUTCString();
1037
1042
  }
1038
- document.cookie = h + "=" + (x || "") + T + "; path=/; Secure; SameSite=None";
1043
+ document.cookie = b + "=" + (S || "") + w + "; path=/; Secure; SameSite=None";
1039
1044
  }
1040
- function c(h) {
1041
- const x = h + "=", C = document.cookie.split(";");
1042
- for (let T = 0; T < C.length; T++) {
1043
- let g = C[T];
1044
- for (; g.charAt(0) === " "; )
1045
- g = g.substring(1, g.length);
1046
- if (g.indexOf(x) === 0)
1047
- return g.substring(x.length, g.length);
1045
+ function l(b) {
1046
+ const S = b + "=", C = document.cookie.split(";");
1047
+ for (let w = 0; w < C.length; w++) {
1048
+ let x = C[w];
1049
+ for (; x.charAt(0) === " "; )
1050
+ x = x.substring(1, x.length);
1051
+ if (x.indexOf(S) === 0)
1052
+ return x.substring(S.length, x.length);
1048
1053
  }
1049
1054
  return null;
1050
1055
  }
1051
- const s = `builder.tests.${e}`, u = c(s), m = t.map((h) => h.id).concat(e);
1052
- if (u && m.includes(u))
1056
+ const s = `builder.tests.${e}`, u = l(s), h = t.map((b) => b.id).concat(e);
1057
+ if (u && h.includes(u))
1053
1058
  return u;
1054
1059
  let y = 0;
1055
1060
  const k = Math.random();
1056
- for (let h = 0; h < t.length; h++) {
1057
- const x = t[h], C = x.testRatio;
1061
+ for (let b = 0; b < t.length; b++) {
1062
+ const S = t[b], C = S.testRatio;
1058
1063
  if (y += C, k < y)
1059
- return d(s, x.id), x.id;
1064
+ return d(s, S.id), S.id;
1060
1065
  }
1061
1066
  return d(s, e), e;
1062
1067
  }
@@ -1068,19 +1073,19 @@ function ut(e, t, n) {
1068
1073
  } else {
1069
1074
  const d = t.concat({
1070
1075
  id: e
1071
- }).filter((c) => c.id !== a).map((c) => `.variant-${c.id} { display: none; }
1076
+ }).filter((l) => l.id !== a).map((l) => `.variant-${l.id} { display: none; }
1072
1077
  `).join("");
1073
1078
  o.innerHTML = d;
1074
1079
  }
1075
1080
  }
1076
- function mt(e, t, n) {
1077
- var c;
1081
+ function gt(e, t, n) {
1082
+ var l;
1078
1083
  if (!navigator.cookieEnabled)
1079
1084
  return;
1080
1085
  function i(s) {
1081
- const u = s + "=", m = document.cookie.split(";");
1082
- for (let y = 0; y < m.length; y++) {
1083
- let k = m[y];
1086
+ const u = s + "=", h = document.cookie.split(";");
1087
+ for (let y = 0; y < h.length; y++) {
1088
+ let k = h[y];
1084
1089
  for (; k.charAt(0) === " "; )
1085
1090
  k = k.substring(1, k.length);
1086
1091
  if (k.indexOf(u) === 0)
@@ -1088,7 +1093,7 @@ function mt(e, t, n) {
1088
1093
  }
1089
1094
  return null;
1090
1095
  }
1091
- const a = `builder.tests.${t}`, o = i(a), r = (c = document.currentScript) == null ? void 0 : c.parentElement, d = e === t;
1096
+ const a = `builder.tests.${t}`, o = i(a), r = (l = document.currentScript) == null ? void 0 : l.parentElement, d = e === t;
1092
1097
  if (o === e) {
1093
1098
  if (d)
1094
1099
  return;
@@ -1098,18 +1103,18 @@ function mt(e, t, n) {
1098
1103
  return;
1099
1104
  }
1100
1105
  }
1101
- const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builderIoAbTest", Te = "builderIoRenderContent", ht = () => {
1102
- const e = ut.toString().replace(/\s+/g, " "), t = mt.toString().replace(/\s+/g, " ");
1106
+ const bt = (e) => e === "react" || e === "reactNative", Te = bt(M), Re = "builderIoAbTest", Ee = "builderIoRenderContent", xt = () => {
1107
+ const e = ht.toString().replace(/\s+/g, " "), t = gt.toString().replace(/\s+/g, " ");
1103
1108
  return `
1104
- window.${Ie} = ${e}
1105
- window.${Te} = ${t}
1109
+ window.${Re} = ${e}
1110
+ window.${Ee} = ${t}
1106
1111
  `;
1107
- }, gt = (e, t) => `
1108
- window.${Ie}("${t}",${JSON.stringify(e)}, ${we})`, bt = ({
1112
+ }, yt = (e, t) => `
1113
+ window.${Re}("${t}",${JSON.stringify(e)}, ${Te})`, St = ({
1109
1114
  contentId: e,
1110
1115
  variationId: t
1111
1116
  }) => `
1112
- window.${Te}("${t}", "${e}", ${we})`, xt = {
1117
+ window.${Ee}("${t}", "${e}", ${Te})`, vt = {
1113
1118
  name: "Core:Button",
1114
1119
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1115
1120
  defaultStyles: {
@@ -1142,7 +1147,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1142
1147
  }],
1143
1148
  static: !0,
1144
1149
  noWrap: !0
1145
- }, yt = {
1150
+ }, pt = {
1146
1151
  // TODO: ways to statically preprocess JSON for references, functions, etc
1147
1152
  name: "Columns",
1148
1153
  isRSC: !0,
@@ -1321,7 +1326,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1321
1326
  });
1322
1327
  }
1323
1328
  const n = e.get("columns");
1324
- Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((d, c) => d + c.get("width"), 0) !== 100) && t();
1329
+ Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((d, l) => d + l.get("width"), 0) !== 100) && t();
1325
1330
  }
1326
1331
  }, {
1327
1332
  name: "space",
@@ -1343,13 +1348,13 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1343
1348
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1344
1349
  advanced: !0
1345
1350
  }]
1346
- }, St = {
1351
+ }, kt = {
1347
1352
  name: "Fragment",
1348
1353
  static: !0,
1349
1354
  hidden: !0,
1350
1355
  canHaveChildren: !0,
1351
1356
  noWrap: !0
1352
- }, vt = {
1357
+ }, Ct = {
1353
1358
  name: "Image",
1354
1359
  static: !0,
1355
1360
  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",
@@ -1370,15 +1375,15 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1370
1375
  onChange: (e) => {
1371
1376
  e.delete("srcset"), e.delete("noWebp");
1372
1377
  function n(r, d = 6e4) {
1373
- return new Promise((c, s) => {
1378
+ return new Promise((l, s) => {
1374
1379
  const u = document.createElement("img");
1375
- let m = !1;
1380
+ let h = !1;
1376
1381
  u.onload = () => {
1377
- m = !0, c(u);
1382
+ h = !0, l(u);
1378
1383
  }, u.addEventListener("error", (y) => {
1379
1384
  console.warn("Image load failed", y.error), s(y.error);
1380
1385
  }), u.src = r, setTimeout(() => {
1381
- m || s(new Error("Image load timed out"));
1386
+ h || s(new Error("Image load timed out"));
1382
1387
  }, d);
1383
1388
  });
1384
1389
  }
@@ -1449,7 +1454,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1449
1454
  advanced: !0,
1450
1455
  defaultValue: 0.7041
1451
1456
  }]
1452
- }, kt = {
1457
+ }, wt = {
1453
1458
  name: "Core:Section",
1454
1459
  static: !0,
1455
1460
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1488,7 +1493,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1488
1493
  }
1489
1494
  }
1490
1495
  }]
1491
- }, pt = {
1496
+ }, It = {
1492
1497
  name: "Symbol",
1493
1498
  noWrap: !0,
1494
1499
  static: !0,
@@ -1521,7 +1526,7 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1521
1526
  hideFromUI: !0,
1522
1527
  type: "boolean"
1523
1528
  }]
1524
- }, Ct = {
1529
+ }, Tt = {
1525
1530
  name: "Text",
1526
1531
  static: !0,
1527
1532
  isRSC: !0,
@@ -1540,9 +1545,9 @@ const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builde
1540
1545
  textAlign: "center"
1541
1546
  }
1542
1547
  };
1543
- function wt(e) {
1548
+ function Rt(e) {
1544
1549
  var t;
1545
- return /* @__PURE__ */ l(
1550
+ return /* @__PURE__ */ c(
1546
1551
  "div",
1547
1552
  {
1548
1553
  className: "builder-text",
@@ -1553,7 +1558,7 @@ function wt(e) {
1553
1558
  }
1554
1559
  );
1555
1560
  }
1556
- const It = {
1561
+ const Et = {
1557
1562
  name: "Video",
1558
1563
  canHaveChildren: !0,
1559
1564
  defaultStyles: {
@@ -1635,7 +1640,7 @@ const It = {
1635
1640
  advanced: !0
1636
1641
  }]
1637
1642
  };
1638
- function Tt(e) {
1643
+ function $t(e) {
1639
1644
  var i;
1640
1645
  function t() {
1641
1646
  return {
@@ -1662,7 +1667,7 @@ function Tt(e) {
1662
1667
  ...t()
1663
1668
  };
1664
1669
  }
1665
- return /* @__PURE__ */ l(
1670
+ return /* @__PURE__ */ c(
1666
1671
  "video",
1667
1672
  {
1668
1673
  ...n(),
@@ -1682,7 +1687,7 @@ function Tt(e) {
1682
1687
  }
1683
1688
  );
1684
1689
  }
1685
- const Rt = {
1690
+ const Pt = {
1686
1691
  name: "Embed",
1687
1692
  static: !0,
1688
1693
  inputs: [{
@@ -1707,30 +1712,30 @@ const Rt = {
1707
1712
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1708
1713
  hideFromUI: !0
1709
1714
  }]
1710
- }, Et = ["text/javascript", "application/javascript", "application/ecmascript"], $t = (e) => Et.includes(e.type);
1711
- function Pt(e) {
1712
- const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []), [r, d] = p(() => !1);
1713
- function c() {
1715
+ }, At = ["text/javascript", "application/javascript", "application/ecmascript"], Bt = (e) => At.includes(e.type);
1716
+ function Vt(e) {
1717
+ const t = Z(null), [n, i] = I(() => []), [a, o] = I(() => []), [r, d] = I(() => !1);
1718
+ function l() {
1714
1719
  if (!t.current || !t.current.getElementsByTagName)
1715
1720
  return;
1716
1721
  const s = t.current.getElementsByTagName("script");
1717
1722
  for (let u = 0; u < s.length; u++) {
1718
- const m = s[u];
1719
- if (m.src && !n.includes(m.src)) {
1720
- n.push(m.src);
1723
+ const h = s[u];
1724
+ if (h.src && !n.includes(h.src)) {
1725
+ n.push(h.src);
1721
1726
  const y = document.createElement("script");
1722
- y.async = !0, y.src = m.src, document.head.appendChild(y);
1723
- } else if ($t(m) && !a.includes(m.innerText))
1727
+ y.async = !0, y.src = h.src, document.head.appendChild(y);
1728
+ } else if (Bt(h) && !a.includes(h.innerText))
1724
1729
  try {
1725
- a.push(m.innerText), new Function(m.innerText)();
1730
+ a.push(h.innerText), new Function(h.innerText)();
1726
1731
  } catch (y) {
1727
1732
  console.warn("`Embed`: Error running script:", y);
1728
1733
  }
1729
1734
  }
1730
1735
  }
1731
1736
  return P(() => {
1732
- t.current && !r && (d(!0), c());
1733
- }, [t.current, r]), /* @__PURE__ */ l(
1737
+ t.current && !r && (d(!0), l());
1738
+ }, [t.current, r]), /* @__PURE__ */ c(
1734
1739
  "div",
1735
1740
  {
1736
1741
  className: "builder-embed",
@@ -1739,8 +1744,8 @@ function Pt(e) {
1739
1744
  }
1740
1745
  );
1741
1746
  }
1742
- function At(e) {
1743
- return /* @__PURE__ */ l(
1747
+ function Ft(e) {
1748
+ return /* @__PURE__ */ c(
1744
1749
  "img",
1745
1750
  {
1746
1751
  style: {
@@ -1754,7 +1759,7 @@ function At(e) {
1754
1759
  V() && e.imgSrc || "default-key"
1755
1760
  );
1756
1761
  }
1757
- const Bt = {
1762
+ const Nt = {
1758
1763
  // friendlyName?
1759
1764
  name: "Raw:Img",
1760
1765
  hideFromInsertMenu: !0,
@@ -1769,38 +1774,36 @@ const Bt = {
1769
1774
  noWrap: !0,
1770
1775
  static: !0
1771
1776
  };
1772
- function Vt(e) {
1773
- const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []);
1774
- function r() {
1775
- if (t.current && t.current.getElementsByTagName && typeof window < "u") {
1776
- const d = t.current.getElementsByTagName("script");
1777
- for (let c = 0; c < d.length; c++) {
1778
- const s = d[c];
1779
- if (s.src) {
1780
- if (n.includes(s.src))
1781
- continue;
1782
- n.push(s.src);
1783
- const u = document.createElement("script");
1784
- u.async = !0, u.src = s.src, document.head.appendChild(u);
1785
- } else if (!s.type || [
1786
- "text/javascript",
1787
- "application/javascript",
1788
- "application/ecmascript"
1789
- ].includes(s.type)) {
1790
- if (a.includes(s.innerText))
1791
- continue;
1792
- try {
1793
- a.push(s.innerText), new Function(s.innerText)();
1794
- } catch (u) {
1795
- console.warn("`CustomCode`: Error running script:", u);
1796
- }
1777
+ function Wt(e) {
1778
+ const t = Z(null), [n, i] = I(() => []), [a, o] = I(() => []);
1779
+ return P(() => {
1780
+ var d;
1781
+ if (!((d = t.current) != null && d.getElementsByTagName) || typeof window > "u")
1782
+ return;
1783
+ const r = t.current.getElementsByTagName("script");
1784
+ for (let l = 0; l < r.length; l++) {
1785
+ const s = r[l];
1786
+ if (s.src) {
1787
+ if (n.includes(s.src))
1788
+ continue;
1789
+ n.push(s.src);
1790
+ const u = document.createElement("script");
1791
+ u.async = !0, u.src = s.src, document.head.appendChild(u);
1792
+ } else if (!s.type || [
1793
+ "text/javascript",
1794
+ "application/javascript",
1795
+ "application/ecmascript"
1796
+ ].includes(s.type)) {
1797
+ if (a.includes(s.innerText))
1798
+ continue;
1799
+ try {
1800
+ a.push(s.innerText), new Function(s.innerText)();
1801
+ } catch (u) {
1802
+ console.warn("`CustomCode`: Error running script:", u);
1797
1803
  }
1798
1804
  }
1799
1805
  }
1800
- }
1801
- return P(() => {
1802
- r();
1803
- }, []), /* @__PURE__ */ l(
1806
+ }, []), /* @__PURE__ */ c(
1804
1807
  "div",
1805
1808
  {
1806
1809
  ref: t,
@@ -1809,7 +1812,7 @@ function Vt(e) {
1809
1812
  }
1810
1813
  );
1811
1814
  }
1812
- const Ft = {
1815
+ const jt = {
1813
1816
  name: "Custom Code",
1814
1817
  static: !0,
1815
1818
  requiredPermissions: ["editCode"],
@@ -1831,40 +1834,40 @@ const Ft = {
1831
1834
  helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1832
1835
  advanced: !0
1833
1836
  }]
1834
- }, fe = () => [{
1835
- component: We,
1836
- ...xt
1837
- }, {
1838
- component: at,
1839
- ...yt
1837
+ }, he = () => [{
1838
+ component: je,
1839
+ ...vt
1840
1840
  }, {
1841
- component: Vt,
1842
- ...Ft
1841
+ component: lt,
1842
+ ...pt
1843
1843
  }, {
1844
- component: Pt,
1845
- ...Rt
1844
+ component: Wt,
1845
+ ...jt
1846
1846
  }, {
1847
- component: ot,
1848
- ...St
1847
+ component: Vt,
1848
+ ...Pt
1849
1849
  }, {
1850
1850
  component: ct,
1851
- ...vt
1852
- }, {
1853
- component: At,
1854
- ...Bt
1855
- }, {
1856
- component: st,
1857
1851
  ...kt
1858
1852
  }, {
1859
- component: Yt,
1860
- ...pt
1861
- }, {
1862
- component: wt,
1853
+ component: ut,
1863
1854
  ...Ct
1864
1855
  }, {
1865
- component: Tt,
1856
+ component: Ft,
1857
+ ...Nt
1858
+ }, {
1859
+ component: mt,
1860
+ ...wt
1861
+ }, {
1862
+ component: Xt,
1866
1863
  ...It
1867
- }], Nt = (e) => {
1864
+ }, {
1865
+ component: Rt,
1866
+ ...Tt
1867
+ }, {
1868
+ component: $t,
1869
+ ...Et
1870
+ }], Mt = (e) => {
1868
1871
  var o;
1869
1872
  const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((o = e == null ? void 0 : e.files) == null ? void 0 : o.regular);
1870
1873
  let a = "";
@@ -1879,34 +1882,34 @@ font-weight: 400;
1879
1882
  for (const r in e.files) {
1880
1883
  if (!(String(Number(r)) === r))
1881
1884
  continue;
1882
- const c = e.files[r];
1883
- c && c !== i && (a += `
1885
+ const l = e.files[r];
1886
+ l && l !== i && (a += `
1884
1887
  @font-face {
1885
1888
  font-family: "${t}";
1886
- src: url('${c}') format('woff2');
1889
+ src: url('${l}') format('woff2');
1887
1890
  font-display: fallback;
1888
1891
  font-weight: ${r};
1889
1892
  }
1890
1893
  `.trim());
1891
1894
  }
1892
1895
  return a;
1893
- }, Wt = ({
1896
+ }, Lt = ({
1894
1897
  customFonts: e
1895
1898
  }) => {
1896
1899
  var t;
1897
- return ((t = e == null ? void 0 : e.map((n) => Nt(n))) == null ? void 0 : t.join(" ")) || "";
1898
- }, jt = ({
1900
+ return ((t = e == null ? void 0 : e.map((n) => Mt(n))) == null ? void 0 : t.join(" ")) || "";
1901
+ }, _t = ({
1899
1902
  cssCode: e,
1900
1903
  contentId: t
1901
1904
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
1902
- function Mt(e) {
1903
- const [t, n] = p(
1905
+ function Ut(e) {
1906
+ const [t, n] = I(
1904
1907
  () => `
1905
- ${jt({
1908
+ ${_t({
1906
1909
  cssCode: e.cssCode,
1907
1910
  contentId: e.contentId
1908
1911
  })}
1909
- ${Wt({
1912
+ ${Lt({
1910
1913
  customFonts: e.customFonts
1911
1914
  })}
1912
1915
 
@@ -1924,18 +1927,18 @@ ${Wt({
1924
1927
  }
1925
1928
  `.trim()
1926
1929
  );
1927
- return /* @__PURE__ */ l(z, { styles: t });
1930
+ return /* @__PURE__ */ c(H, { styles: t });
1928
1931
  }
1929
- const Ut = ({
1932
+ const Kt = ({
1930
1933
  content: e,
1931
1934
  data: t,
1932
1935
  locale: n
1933
1936
  }) => {
1934
1937
  var o, r, d;
1935
1938
  const i = {};
1936
- (r = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || r.forEach((c) => {
1939
+ (r = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || r.forEach((l) => {
1937
1940
  var s;
1938
- c.name && c.defaultValue !== void 0 && ((s = e == null ? void 0 : e.data) != null && s.state) && e.data.state[c.name] === void 0 && (i[c.name] = c.defaultValue);
1941
+ l.name && l.defaultValue !== void 0 && ((s = e == null ? void 0 : e.data) != null && s.state) && e.data.state[l.name] === void 0 && (i[l.name] = l.defaultValue);
1939
1942
  });
1940
1943
  const a = {
1941
1944
  ...(d = e == null ? void 0 : e.data) == null ? void 0 : d.state,
@@ -1948,7 +1951,7 @@ const Ut = ({
1948
1951
  ...i,
1949
1952
  ...a
1950
1953
  };
1951
- }, Lt = ({
1954
+ }, Ot = ({
1952
1955
  content: e,
1953
1956
  data: t
1954
1957
  }) => e ? {
@@ -1958,8 +1961,8 @@ const Ut = ({
1958
1961
  ...t
1959
1962
  },
1960
1963
  meta: e == null ? void 0 : e.meta
1961
- } : void 0, _t = "0.6.4", Kt = () => {
1962
- Ae("insertMenu", {
1964
+ } : void 0, Ht = "0.7.1-0", zt = () => {
1965
+ Be("insertMenu", {
1963
1966
  name: "_default",
1964
1967
  default: !0,
1965
1968
  items: [{
@@ -1981,14 +1984,14 @@ const Ut = ({
1981
1984
  }]
1982
1985
  });
1983
1986
  };
1984
- let he = !1;
1985
- const Ot = (e = {}) => {
1987
+ let ge = !1;
1988
+ const qt = (e = {}) => {
1986
1989
  var t, n;
1987
- he || (he = !0, F() && ((t = window.parent) == null || t.postMessage({
1990
+ ge || (ge = !0, F() && ((t = window.parent) == null || t.postMessage({
1988
1991
  type: "builder.sdkInfo",
1989
1992
  data: {
1990
- target: U,
1991
- version: _t,
1993
+ target: M,
1994
+ version: Ht,
1992
1995
  supportsPatchUpdates: !1,
1993
1996
  // Supports builder-model="..." attribute which is needed to
1994
1997
  // scope our '+ add block' button styling
@@ -2007,25 +2010,25 @@ const Ot = (e = {}) => {
2007
2010
  if (i != null && i.type)
2008
2011
  switch (i.type) {
2009
2012
  case "builder.evaluate": {
2010
- const r = i.data.text, d = i.data.arguments || [], c = i.data.id, s = new Function(r);
2011
- let u, m = null;
2013
+ const r = i.data.text, d = i.data.arguments || [], l = i.data.id, s = new Function(r);
2014
+ let u, h = null;
2012
2015
  try {
2013
2016
  u = s.apply(null, d);
2014
2017
  } catch (y) {
2015
- m = y;
2018
+ h = y;
2016
2019
  }
2017
- m ? (a = window.parent) == null || a.postMessage({
2020
+ h ? (a = window.parent) == null || a.postMessage({
2018
2021
  type: "builder.evaluateError",
2019
2022
  data: {
2020
- id: c,
2021
- error: m.message
2023
+ id: l,
2024
+ error: h.message
2022
2025
  }
2023
2026
  }, "*") : u && typeof u.then == "function" ? u.then((y) => {
2024
2027
  var k;
2025
2028
  (k = window.parent) == null || k.postMessage({
2026
2029
  type: "builder.evaluateResult",
2027
2030
  data: {
2028
- id: c,
2031
+ id: l,
2029
2032
  result: y
2030
2033
  }
2031
2034
  }, "*");
@@ -2033,7 +2036,7 @@ const Ot = (e = {}) => {
2033
2036
  type: "builder.evaluateResult",
2034
2037
  data: {
2035
2038
  result: u,
2036
- id: c
2039
+ id: l
2037
2040
  }
2038
2041
  }, "*");
2039
2042
  break;
@@ -2041,10 +2044,10 @@ const Ot = (e = {}) => {
2041
2044
  }
2042
2045
  })));
2043
2046
  };
2044
- function ge(e) {
2047
+ function be(e) {
2045
2048
  return Math.round(e * 1e3) / 1e3;
2046
2049
  }
2047
- const Ht = (e, t, n = !0) => {
2050
+ const Dt = (e, t, n = !0) => {
2048
2051
  if (!(e instanceof HTMLElement))
2049
2052
  return null;
2050
2053
  let i = n ? e : e.parentElement;
@@ -2055,28 +2058,28 @@ const Ht = (e, t, n = !0) => {
2055
2058
  return i;
2056
2059
  } while (i = i.parentElement);
2057
2060
  return null;
2058
- }, zt = (e) => Ht(e, (t) => {
2061
+ }, Gt = (e) => Dt(e, (t) => {
2059
2062
  const n = t.getAttribute("builder-id") || t.id;
2060
2063
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
2061
- }), be = ({
2064
+ }), xe = ({
2062
2065
  event: e,
2063
2066
  target: t
2064
2067
  }) => {
2065
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = ge(i / n.width), r = ge(a / n.height);
2068
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = be(i / n.width), r = be(a / n.height);
2066
2069
  return {
2067
2070
  x: o,
2068
2071
  y: r
2069
2072
  };
2070
- }, qt = (e) => {
2071
- const t = e.target, n = t && zt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2073
+ }, Jt = (e) => {
2074
+ const t = e.target, n = t && Gt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2072
2075
  return {
2073
2076
  targetBuilderElement: i || void 0,
2074
2077
  metadata: {
2075
- targetOffset: t ? be({
2078
+ targetOffset: t ? xe({
2076
2079
  event: e,
2077
2080
  target: t
2078
2081
  }) : void 0,
2079
- builderTargetOffset: n ? be({
2082
+ builderTargetOffset: n ? xe({
2080
2083
  event: e,
2081
2084
  target: n
2082
2085
  }) : void 0,
@@ -2084,91 +2087,89 @@ const Ht = (e, t, n = !0) => {
2084
2087
  }
2085
2088
  };
2086
2089
  };
2087
- function Dt(e) {
2088
- var A, B, N, W, D;
2089
- const t = Z(null), [n, i] = p(
2090
- () => K(e.canTrack) ? e.canTrack : !0
2091
- ), [a, o] = p(() => 0);
2092
- function r(S) {
2093
- var b, v, I, $, j;
2094
- const w = {
2090
+ function Yt(e) {
2091
+ var A, B, N, W, q;
2092
+ const t = Z(null), [n, i] = I(() => 0);
2093
+ function a(m) {
2094
+ var v, p, T, E, ae;
2095
+ const f = {
2095
2096
  ...e.builderContextSignal.content,
2096
- ...S,
2097
+ ...m,
2097
2098
  data: {
2098
- ...(b = e.builderContextSignal.content) == null ? void 0 : b.data,
2099
- ...S == null ? void 0 : S.data
2099
+ ...(v = e.builderContextSignal.content) == null ? void 0 : v.data,
2100
+ ...m == null ? void 0 : m.data
2100
2101
  },
2101
2102
  meta: {
2102
- ...(v = e.builderContextSignal.content) == null ? void 0 : v.meta,
2103
- ...S == null ? void 0 : S.meta,
2104
- breakpoints: ((I = S == null ? void 0 : S.meta) == null ? void 0 : I.breakpoints) || ((j = ($ = e.builderContextSignal.content) == null ? void 0 : $.meta) == null ? void 0 : j.breakpoints)
2103
+ ...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
2104
+ ...m == null ? void 0 : m.meta,
2105
+ breakpoints: ((T = m == null ? void 0 : m.meta) == null ? void 0 : T.breakpoints) || ((ae = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : ae.breakpoints)
2105
2106
  }
2106
2107
  };
2107
- e.setBuilderContextSignal((Ee) => ({
2108
- ...Ee,
2109
- content: w
2108
+ e.setBuilderContextSignal((Pe) => ({
2109
+ ...Pe,
2110
+ content: f
2110
2111
  }));
2111
2112
  }
2112
- p(() => 0);
2113
- const [d, c] = p(
2113
+ I(() => 0);
2114
+ const [o, r] = I(
2114
2115
  () => !1
2115
2116
  );
2116
- function s(S) {
2117
- var b;
2118
- const { data: w } = S;
2119
- if (w)
2120
- switch (w.type) {
2117
+ function d(m) {
2118
+ var v;
2119
+ const { data: f } = m;
2120
+ if (f)
2121
+ switch (f.type) {
2121
2122
  case "builder.configureSdk": {
2122
- const v = w.data, { breakpoints: I, contentId: $ } = v;
2123
- if (!$ || $ !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
2123
+ const p = f.data, { breakpoints: T, contentId: E } = p;
2124
+ if (!E || E !== ((v = e.builderContextSignal.content) == null ? void 0 : v.id))
2124
2125
  return;
2125
- I && r({
2126
+ T && a({
2126
2127
  meta: {
2127
- breakpoints: I
2128
+ breakpoints: T
2128
2129
  }
2129
- }), o(a + 1);
2130
+ }), i(n + 1);
2130
2131
  break;
2131
2132
  }
2132
2133
  case "builder.contentUpdate": {
2133
- const v = w.data, I = v.key || v.alias || v.entry || v.modelName, $ = v.data;
2134
- I === e.model && (r($), o(a + 1));
2134
+ const p = f.data, T = p.key || p.alias || p.entry || p.modelName, E = p.data;
2135
+ T === e.model && (a(E), i(n + 1));
2135
2136
  break;
2136
2137
  }
2137
2138
  }
2138
2139
  }
2139
- function u() {
2140
- var w, b;
2141
- const S = (b = (w = e.builderContextSignal.content) == null ? void 0 : w.data) == null ? void 0 : b.jsCode;
2142
- S && M({
2143
- code: S,
2140
+ function l() {
2141
+ var f, v;
2142
+ const m = (v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.jsCode;
2143
+ m && j({
2144
+ code: m,
2144
2145
  context: e.context || {},
2145
2146
  localState: void 0,
2146
2147
  rootState: e.builderContextSignal.rootState,
2147
2148
  rootSetState: e.builderContextSignal.rootSetState
2148
2149
  });
2149
2150
  }
2150
- const [m, y] = p(() => ({})), [k, h] = p(() => !1);
2151
- function x(S) {
2152
- var w, b;
2151
+ const [s, u] = I(() => ({})), [h, y] = I(() => !1);
2152
+ function k(m) {
2153
+ var f, v;
2153
2154
  if (e.builderContextSignal.content) {
2154
- const v = (w = e.builderContextSignal.content) == null ? void 0 : w.testVariationId, I = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
2155
- oe({
2155
+ const p = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, T = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
2156
+ re({
2156
2157
  type: "click",
2157
- canTrack: n,
2158
- contentId: I,
2158
+ canTrack: U(e.canTrack),
2159
+ contentId: T,
2159
2160
  apiKey: e.apiKey,
2160
- variationId: v !== I ? v : void 0,
2161
- ...qt(S),
2162
- unique: !k
2161
+ variationId: p !== T ? p : void 0,
2162
+ ...Jt(m),
2163
+ unique: !h
2163
2164
  });
2164
2165
  }
2165
- k || h(!0);
2166
+ h || y(!0);
2166
2167
  }
2167
- function C(S) {
2168
- return S.replace(
2168
+ function b(m) {
2169
+ return m.replace(
2169
2170
  /{{([^}]+)}}/g,
2170
- (w, b) => M({
2171
- code: b,
2171
+ (f, v) => j({
2172
+ code: v,
2172
2173
  context: e.context || {},
2173
2174
  localState: void 0,
2174
2175
  rootState: e.builderContextSignal.rootState,
@@ -2176,32 +2177,32 @@ function Dt(e) {
2176
2177
  })
2177
2178
  );
2178
2179
  }
2179
- function T({ url: S, key: w }) {
2180
- Fe(S).then((b) => b.json()).then((b) => {
2181
- var I, $;
2182
- const v = {
2180
+ function S({ url: m, key: f }) {
2181
+ Ne(m).then((v) => v.json()).then((v) => {
2182
+ var T, E;
2183
+ const p = {
2183
2184
  ...e.builderContextSignal.rootState,
2184
- [w]: b
2185
+ [f]: v
2185
2186
  };
2186
- ($ = (I = e.builderContextSignal).rootSetState) == null || $.call(I, v), m[w] = !0;
2187
- }).catch((b) => {
2188
- console.error("error fetching dynamic data", S, b);
2187
+ (E = (T = e.builderContextSignal).rootSetState) == null || E.call(T, p), s[f] = !0;
2188
+ }).catch((v) => {
2189
+ console.error("error fetching dynamic data", m, v);
2189
2190
  });
2190
2191
  }
2191
- function g() {
2192
- var w, b;
2193
- const S = ((b = (w = e.builderContextSignal.content) == null ? void 0 : w.data) == null ? void 0 : b.httpRequests) ?? {};
2194
- Object.entries(S).forEach(([v, I]) => {
2195
- if (I && (!m[v] || V())) {
2196
- const $ = C(I);
2197
- T({
2198
- url: $,
2199
- key: v
2192
+ function C() {
2193
+ var f, v;
2194
+ const m = ((v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.httpRequests) ?? {};
2195
+ Object.entries(m).forEach(([p, T]) => {
2196
+ if (T && (!s[p] || V())) {
2197
+ const E = b(T);
2198
+ S({
2199
+ url: E,
2200
+ key: p
2200
2201
  });
2201
2202
  }
2202
2203
  });
2203
2204
  }
2204
- function R() {
2205
+ function w() {
2205
2206
  V() && window.dispatchEvent(
2206
2207
  new CustomEvent(
2207
2208
  "builder:component:stateChange",
@@ -2216,90 +2217,119 @@ function Dt(e) {
2216
2217
  )
2217
2218
  );
2218
2219
  }
2220
+ function x(m) {
2221
+ i(n + 1), window.addEventListener("message", d), zt(), qt({
2222
+ ...e.locale ? {
2223
+ locale: e.locale
2224
+ } : {},
2225
+ ...e.includeRefs ? {
2226
+ includeRefs: e.includeRefs
2227
+ } : {},
2228
+ ...e.enrich ? {
2229
+ enrich: e.enrich
2230
+ } : {}
2231
+ }), Object.values(
2232
+ e.builderContextSignal.componentInfos
2233
+ ).forEach((f) => {
2234
+ var p;
2235
+ const v = Fe(f);
2236
+ (p = window.parent) == null || p.postMessage(v, "*");
2237
+ }), window.addEventListener(
2238
+ "builder:component:stateChangeListenerActivated",
2239
+ w
2240
+ );
2241
+ }
2242
+ function R(m) {
2243
+ const f = new URL(location.href).searchParams, v = f.get("builder.preview"), p = f.get(
2244
+ `builder.preview.${v}`
2245
+ ), T = f.get("apiKey") || f.get("builder.space");
2246
+ v === e.model && T === e.apiKey && (!e.content || p === e.content.id) && pe({
2247
+ model: e.model,
2248
+ apiKey: e.apiKey,
2249
+ apiVersion: e.builderContextSignal.apiVersion
2250
+ }).then((E) => {
2251
+ E && a(E);
2252
+ });
2253
+ }
2219
2254
  return P(() => {
2220
- var S, w;
2221
- if (e.apiKey || _.error(
2222
- "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2223
- ), F()) {
2224
- if (V() && (o(a + 1), window.addEventListener("message", s), Kt(), Ot({
2225
- ...e.locale ? {
2226
- locale: e.locale
2227
- } : {},
2228
- ...e.includeRefs ? {
2229
- includeRefs: e.includeRefs
2230
- } : {},
2231
- ...e.enrich ? {
2232
- enrich: e.enrich
2233
- } : {}
2234
- }), Object.values(
2235
- e.builderContextSignal.componentInfos
2236
- ).forEach((b) => {
2237
- var I;
2238
- const v = Be(b);
2239
- (I = window.parent) == null || I.postMessage(v, "*");
2240
- }), window.addEventListener(
2241
- "builder:component:stateChangeListenerActivated",
2255
+ var m;
2256
+ return (m = t.current) == null || m.addEventListener(
2257
+ "initeditingbldr",
2258
+ x
2259
+ ), () => {
2260
+ var f;
2261
+ return (f = t.current) == null ? void 0 : f.removeEventListener(
2262
+ "initeditingbldr",
2263
+ x
2264
+ );
2265
+ };
2266
+ }, []), P(() => {
2267
+ var m;
2268
+ return (m = t.current) == null || m.addEventListener(
2269
+ "initpreviewingbldr",
2270
+ R
2271
+ ), () => {
2272
+ var f;
2273
+ return (f = t.current) == null ? void 0 : f.removeEventListener(
2274
+ "initpreviewingbldr",
2242
2275
  R
2243
- )), e.builderContextSignal.content) {
2244
- const b = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId, v = (w = e.builderContextSignal.content) == null ? void 0 : w.id;
2245
- oe({
2276
+ );
2277
+ };
2278
+ }, []), P(() => {
2279
+ var m, f;
2280
+ if (F()) {
2281
+ if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
2282
+ const p = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, T = (f = e.builderContextSignal.content) == null ? void 0 : f.id, E = e.apiKey;
2283
+ re({
2246
2284
  type: "impression",
2247
- canTrack: n,
2248
- contentId: v,
2249
- apiKey: e.apiKey,
2250
- variationId: b !== v ? b : void 0
2251
- });
2252
- }
2253
- if (Ve()) {
2254
- const b = new URL(location.href).searchParams, v = b.get("builder.preview"), I = b.get(
2255
- `builder.preview.${v}`
2256
- ), $ = b.get("apiKey") || b.get("builder.space");
2257
- v === e.model && $ === e.apiKey && (!e.content || I === e.content.id) && Se({
2258
- model: e.model,
2259
- apiKey: e.apiKey,
2260
- apiVersion: e.builderContextSignal.apiVersion
2261
- }).then((j) => {
2262
- j && r(j);
2285
+ canTrack: !0,
2286
+ contentId: T,
2287
+ apiKey: E,
2288
+ variationId: p !== T ? p : void 0
2263
2289
  });
2264
2290
  }
2265
- u(), g(), R();
2291
+ Ve() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2266
2292
  }
2267
2293
  }, []), P(() => {
2268
- e.content && r(e.content);
2294
+ e.apiKey || _.error(
2295
+ "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2296
+ ), l(), C(), w();
2297
+ }, []), P(() => {
2298
+ e.content && a(e.content);
2269
2299
  }, [e.content]), P(() => {
2270
- }, [d]), P(() => {
2271
- u();
2300
+ }, [o]), P(() => {
2301
+ l();
2272
2302
  }, [
2273
2303
  (B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
2274
2304
  e.builderContextSignal.rootState
2275
2305
  ]), P(() => {
2276
- g();
2306
+ C();
2277
2307
  }, [(W = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : W.httpRequests]), P(() => {
2278
- R();
2308
+ w();
2279
2309
  }, [e.builderContextSignal.rootState]), P(() => () => {
2280
- F() && (window.removeEventListener("message", s), window.removeEventListener(
2310
+ F() && (window.removeEventListener("message", d), window.removeEventListener(
2281
2311
  "builder:component:stateChangeListenerActivated",
2282
- R
2312
+ w
2283
2313
  ));
2284
- }, []), /* @__PURE__ */ l(ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
2314
+ }, []), /* @__PURE__ */ c(ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ ve(
2285
2315
  "div",
2286
2316
  {
2317
+ key: n,
2287
2318
  ref: t,
2288
- onClick: (S) => x(S),
2289
- "builder-content-id": (D = e.builderContextSignal.content) == null ? void 0 : D.id,
2319
+ onClick: (m) => k(m),
2320
+ "builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
2290
2321
  "builder-model": e.model,
2291
2322
  ...e.showContent ? {} : {
2292
2323
  hidden: !0,
2293
2324
  "aria-hidden": !0
2294
2325
  },
2295
- className: e.classNameProp,
2296
- children: e.children
2326
+ className: e.classNameProp
2297
2327
  },
2298
- a
2328
+ e.children
2299
2329
  ) }) : null });
2300
2330
  }
2301
2331
  function X(e) {
2302
- return /* @__PURE__ */ l(
2332
+ return /* @__PURE__ */ c(
2303
2333
  "script",
2304
2334
  {
2305
2335
  dangerouslySetInnerHTML: { __html: e.scriptStr },
@@ -2307,52 +2337,52 @@ function X(e) {
2307
2337
  }
2308
2338
  );
2309
2339
  }
2310
- function xe(e) {
2311
- var c, s, u, m, y, k, h;
2312
- const [t, n] = p(
2340
+ function ye(e) {
2341
+ var l, s, u, h, y, k, b;
2342
+ const [t, n] = I(
2313
2343
  () => {
2314
- var x, C;
2315
- return bt({
2344
+ var S, C;
2345
+ return St({
2316
2346
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2317
- variationId: (x = e.content) == null ? void 0 : x.testVariationId,
2347
+ variationId: (S = e.content) == null ? void 0 : S.testVariationId,
2318
2348
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2319
2349
  contentId: (C = e.content) == null ? void 0 : C.id
2320
2350
  });
2321
2351
  }
2322
2352
  );
2323
- function i(x) {
2353
+ function i(S) {
2324
2354
  d((C) => ({
2325
2355
  ...C,
2326
- rootState: x
2356
+ rootState: S
2327
2357
  }));
2328
2358
  }
2329
- const [a, o] = p(
2359
+ const [a, o] = I(
2330
2360
  () => [
2331
- ...fe(),
2361
+ ...he(),
2332
2362
  // While this `components` object is deprecated, we must maintain support for it.
2333
2363
  // Since users are able to override our default components, we need to make sure that we do not break such
2334
2364
  // existing usage.
2335
2365
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2336
2366
  // which is the new standard way of providing custom components, and must therefore take precedence.
2337
- ...re,
2367
+ ...le,
2338
2368
  ...e.customComponents || []
2339
2369
  ].reduce(
2340
- (x, { component: C, ...T }) => ({
2341
- ...x,
2342
- [T.name]: {
2370
+ (S, { component: C, ...w }) => ({
2371
+ ...S,
2372
+ [w.name]: {
2343
2373
  component: C,
2344
- ...le(T)
2374
+ ...ce(w)
2345
2375
  }
2346
2376
  }),
2347
2377
  {}
2348
2378
  )
2349
- ), [r, d] = p(() => ({
2350
- content: Lt({
2379
+ ), [r, d] = I(() => ({
2380
+ content: Ot({
2351
2381
  content: e.content,
2352
2382
  data: e.data
2353
2383
  }),
2354
2384
  localState: void 0,
2355
- rootState: Ut({
2385
+ rootState: Kt({
2356
2386
  content: e.content,
2357
2387
  data: e.data,
2358
2388
  locale: e.locale
@@ -2362,31 +2392,31 @@ function xe(e) {
2362
2392
  apiKey: e.apiKey,
2363
2393
  apiVersion: e.apiVersion,
2364
2394
  componentInfos: [
2365
- ...fe(),
2395
+ ...he(),
2366
2396
  // While this `components` object is deprecated, we must maintain support for it.
2367
2397
  // Since users are able to override our default components, we need to make sure that we do not break such
2368
2398
  // existing usage.
2369
2399
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2370
2400
  // which is the new standard way of providing custom components, and must therefore take precedence.
2371
- ...re,
2401
+ ...le,
2372
2402
  ...e.customComponents || []
2373
2403
  ].reduce(
2374
- (x, { component: C, ...T }) => ({
2375
- ...x,
2376
- [T.name]: le(T)
2404
+ (S, { component: C, ...w }) => ({
2405
+ ...S,
2406
+ [w.name]: ce(w)
2377
2407
  }),
2378
2408
  {}
2379
2409
  ),
2380
2410
  inheritedStyles: {}
2381
2411
  }));
2382
- return /* @__PURE__ */ l(
2383
- Ce.Provider,
2412
+ return /* @__PURE__ */ c(
2413
+ Ie.Provider,
2384
2414
  {
2385
2415
  value: {
2386
2416
  registeredComponents: a
2387
2417
  },
2388
- children: /* @__PURE__ */ E(
2389
- Dt,
2418
+ children: /* @__PURE__ */ $(
2419
+ Yt,
2390
2420
  {
2391
2421
  content: e.content,
2392
2422
  model: e.model,
@@ -2401,19 +2431,19 @@ function xe(e) {
2401
2431
  builderContextSignal: r,
2402
2432
  setBuilderContextSignal: d,
2403
2433
  children: [
2404
- e.isSsrAbTest ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(X, { scriptStr: t }) }) : null,
2405
- /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
2406
- Mt,
2434
+ e.isSsrAbTest ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(X, { scriptStr: t }) }) : null,
2435
+ /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(
2436
+ Ut,
2407
2437
  {
2408
- contentId: (c = r.content) == null ? void 0 : c.id,
2438
+ contentId: (l = r.content) == null ? void 0 : l.id,
2409
2439
  cssCode: (u = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : u.cssCode,
2410
- customFonts: (y = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : y.customFonts
2440
+ customFonts: (y = (h = r.content) == null ? void 0 : h.data) == null ? void 0 : y.customFonts
2411
2441
  }
2412
2442
  ) }),
2413
- /* @__PURE__ */ l(
2443
+ /* @__PURE__ */ c(
2414
2444
  ie,
2415
2445
  {
2416
- blocks: (h = (k = r.content) == null ? void 0 : k.data) == null ? void 0 : h.blocks,
2446
+ blocks: (b = (k = r.content) == null ? void 0 : k.data) == null ? void 0 : b.blocks,
2417
2447
  context: r,
2418
2448
  registeredComponents: a
2419
2449
  }
@@ -2424,17 +2454,17 @@ function xe(e) {
2424
2454
  }
2425
2455
  );
2426
2456
  }
2427
- function Re(e) {
2428
- var r, d, c;
2429
- const [t, n] = p(
2430
- () => dt({
2431
- canTrack: ce(e.canTrack),
2457
+ function $e(e) {
2458
+ var r, d, l;
2459
+ const [t, n] = I(
2460
+ () => ft({
2461
+ canTrack: U(e.canTrack),
2432
2462
  content: e.content
2433
2463
  })
2434
2464
  );
2435
2465
  function i() {
2436
2466
  var s;
2437
- return gt(
2467
+ return yt(
2438
2468
  L(e.content).map((u) => ({
2439
2469
  id: u.testVariationId,
2440
2470
  testRatio: u.testRatio
@@ -2450,25 +2480,25 @@ function Re(e) {
2450
2480
  return t ? {
2451
2481
  ...e.content,
2452
2482
  testVariationId: (s = e.content) == null ? void 0 : s.id
2453
- } : Ne({
2483
+ } : We({
2454
2484
  item: e.content,
2455
- canTrack: ce(e.canTrack)
2485
+ canTrack: U(e.canTrack)
2456
2486
  });
2457
2487
  }
2458
2488
  return P(() => {
2459
- }, []), /* @__PURE__ */ E(f, { children: [
2460
- !e.__isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(X, { scriptStr: ht() }) }) : null,
2461
- t ? /* @__PURE__ */ E(f, { children: [
2462
- /* @__PURE__ */ l(
2463
- z,
2489
+ }, []), /* @__PURE__ */ $(g, { children: [
2490
+ !e.__isNestedRender && M !== "reactNative" ? /* @__PURE__ */ c(g, { children: /* @__PURE__ */ c(X, { scriptStr: xt() }) }) : null,
2491
+ t ? /* @__PURE__ */ $(g, { children: [
2492
+ /* @__PURE__ */ c(
2493
+ H,
2464
2494
  {
2465
2495
  id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2466
2496
  styles: a()
2467
2497
  }
2468
2498
  ),
2469
- /* @__PURE__ */ l(X, { scriptStr: i() }),
2470
- (d = L(e.content)) == null ? void 0 : d.map((s) => /* @__PURE__ */ l(
2471
- xe,
2499
+ /* @__PURE__ */ c(X, { scriptStr: i() }),
2500
+ (d = L(e.content)) == null ? void 0 : d.map((s) => /* @__PURE__ */ c(
2501
+ ye,
2472
2502
  {
2473
2503
  content: s,
2474
2504
  showContent: !1,
@@ -2488,11 +2518,11 @@ function Re(e) {
2488
2518
  s.testVariationId
2489
2519
  ))
2490
2520
  ] }) : null,
2491
- /* @__PURE__ */ l(
2492
- xe,
2521
+ /* @__PURE__ */ c(
2522
+ ye,
2493
2523
  {
2494
2524
  content: o(),
2495
- classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
2525
+ classNameProp: `variant-${(l = e.content) == null ? void 0 : l.id}`,
2496
2526
  showContent: !0,
2497
2527
  model: e.model,
2498
2528
  data: e.data,
@@ -2509,13 +2539,13 @@ function Re(e) {
2509
2539
  )
2510
2540
  ] });
2511
2541
  }
2512
- const Jt = async ({
2542
+ const Qt = async ({
2513
2543
  builderContextValue: e,
2514
2544
  symbol: t
2515
2545
  }) => {
2516
2546
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2517
2547
  (e != null && e.apiKey))
2518
- return Se({
2548
+ return pe({
2519
2549
  model: t.model,
2520
2550
  apiKey: e.apiKey,
2521
2551
  apiVersion: e.apiVersion,
@@ -2528,35 +2558,35 @@ const Jt = async ({
2528
2558
  _.error("Could not fetch symbol content: ", n);
2529
2559
  });
2530
2560
  };
2531
- function Yt(e) {
2561
+ function Xt(e) {
2532
2562
  var o, r, d;
2533
2563
  function t() {
2534
- var c, s;
2564
+ var l, s;
2535
2565
  return [
2536
2566
  e.attributes.className,
2537
2567
  "builder-symbol",
2538
- (c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
2568
+ (l = e.symbol) != null && l.inline ? "builder-inline-symbol" : void 0,
2539
2569
  (s = e.symbol) != null && s.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2540
2570
  ].filter(Boolean).join(" ");
2541
2571
  }
2542
- const [n, i] = p(() => {
2543
- var c;
2544
- return (c = e.symbol) == null ? void 0 : c.content;
2572
+ const [n, i] = I(() => {
2573
+ var l;
2574
+ return (l = e.symbol) == null ? void 0 : l.content;
2545
2575
  });
2546
2576
  function a() {
2547
- n || Jt({
2577
+ n || Qt({
2548
2578
  symbol: e.symbol,
2549
2579
  builderContextValue: e.builderContext
2550
- }).then((c) => {
2551
- c && i(c);
2580
+ }).then((l) => {
2581
+ l && i(l);
2552
2582
  });
2553
2583
  }
2554
2584
  return P(() => {
2555
2585
  a();
2556
2586
  }, []), P(() => {
2557
2587
  a();
2558
- }, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
2559
- Re,
2588
+ }, [e.symbol]), /* @__PURE__ */ c("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ c(
2589
+ $e,
2560
2590
  {
2561
2591
  __isNestedRender: !0,
2562
2592
  apiVersion: e.builderContext.apiVersion,
@@ -2573,31 +2603,31 @@ function Yt(e) {
2573
2603
  }
2574
2604
  ) });
2575
2605
  }
2576
- const Zt = ie, en = Re;
2606
+ const nn = ie, an = $e;
2577
2607
  export {
2578
2608
  ie as Blocks,
2579
- We as Button,
2580
- at as Columns,
2581
- Re as Content,
2582
- ot as Fragment,
2583
- ct as Image,
2584
- Zt as RenderBlocks,
2585
- en as RenderContent,
2586
- st as Section,
2587
- Yt as Symbol,
2588
- wt as Text,
2589
- Tt as Video,
2590
- an as _processContentResult,
2591
- Be as createRegisterComponentMessage,
2592
- on as fetchBuilderProps,
2593
- rn as fetchEntries,
2594
- Se as fetchOneEntry,
2595
- ln as getAllContent,
2596
- cn as getBuilderSearchParams,
2597
- sn as getContent,
2609
+ je as Button,
2610
+ lt as Columns,
2611
+ $e as Content,
2612
+ ct as Fragment,
2613
+ ut as Image,
2614
+ nn as RenderBlocks,
2615
+ an as RenderContent,
2616
+ mt as Section,
2617
+ Xt as Symbol,
2618
+ Rt as Text,
2619
+ $t as Video,
2620
+ ln as _processContentResult,
2621
+ Fe as createRegisterComponentMessage,
2622
+ cn as fetchBuilderProps,
2623
+ sn as fetchEntries,
2624
+ pe as fetchOneEntry,
2625
+ dn as getAllContent,
2626
+ un as getBuilderSearchParams,
2627
+ mn as getContent,
2598
2628
  V as isEditing,
2599
2629
  Ve as isPreviewing,
2600
- Ae as register,
2601
- dn as setEditorSettings,
2602
- un as track
2630
+ Be as register,
2631
+ fn as setEditorSettings,
2632
+ hn as track
2603
2633
  };