@builder.io/sdk-react 0.7.3 → 0.7.5

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.
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { jsxs as P, Fragment as g, jsx as s } from "react/jsx-runtime";
3
- import { createContext as Se, useState as I, useContext as ae, createElement as ve, useRef as Z, useEffect as B } from "react";
4
- import { i as V, j as F, k as $e, l as _, m as ee, n as Y, T as M, r as Ae, 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-0aebe4be.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-0aebe4be.mjs";
2
+ import { jsxs as T, Fragment as f, jsx as r } from "react/jsx-runtime";
3
+ import { createContext as pe, useState as p, useContext as le, createElement as ke, useRef as Z, useEffect as P } from "react";
4
+ import { i as $, j as N, k as $e, l as M, m as ee, n as G, T as L, r as Ne, o as U, p as ce, a as Fe, c as We, b as Ce, q as _e, u as se, v as de, w as Le } from "./server-entry-0aebe4be.mjs";
5
+ import { _ as sn, h as dn, f as un, g as mn, e as fn, d as hn, s as gn, t as bn } from "./server-entry-0aebe4be.mjs";
6
6
  function je(e) {
7
- return /* @__PURE__ */ P(g, { children: [
8
- e.link ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
7
+ return /* @__PURE__ */ T(f, { children: [
8
+ e.link ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
9
9
  "a",
10
10
  {
11
11
  ...e.attributes,
@@ -14,7 +14,7 @@ function je(e) {
14
14
  role: "button",
15
15
  children: e.text
16
16
  }
17
- ) }) : /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
17
+ ) }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
18
18
  "button",
19
19
  {
20
20
  ...e.attributes,
@@ -23,12 +23,12 @@ function je(e) {
23
23
  children: e.text
24
24
  }
25
25
  ) }),
26
- /* @__PURE__ */ s("style", { children: `.button-5294b10c {
26
+ /* @__PURE__ */ r("style", { children: `.button-5294b10c {
27
27
  all: unset;
28
28
  }` })
29
29
  ] });
30
30
  }
31
- const te = Se({
31
+ const te = pe({
32
32
  content: null,
33
33
  context: {},
34
34
  localState: void 0,
@@ -39,7 +39,7 @@ const te = Se({
39
39
  apiVersion: void 0,
40
40
  componentInfos: {},
41
41
  inheritedStyles: {}
42
- }), ke = Se({ registeredComponents: {} });
42
+ }), we = pe({ registeredComponents: {} });
43
43
  function Me(e) {
44
44
  var t;
45
45
  return {
@@ -51,7 +51,7 @@ function Me(e) {
51
51
  builderBlock: e
52
52
  };
53
53
  }
54
- const Le = ({
54
+ const Ue = ({
55
55
  builder: e,
56
56
  context: t,
57
57
  event: n,
@@ -63,148 +63,148 @@ const Le = ({
63
63
  builder: e,
64
64
  context: t,
65
65
  event: n
66
- }), _e = () => ({
67
- isEditing: V(),
68
- isBrowser: F(),
69
- isServer: !F(),
66
+ }), De = () => ({
67
+ isEditing: $(),
68
+ isBrowser: N(),
69
+ isServer: !N(),
70
70
  getUserAttributes: () => $e()
71
- }), Ue = (e, {
71
+ }), Oe = (e, {
72
72
  isExpression: t = !0
73
- }) => /* 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, se = ({
73
+ }) => /* 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, ue = ({
74
74
  code: e,
75
75
  builder: t,
76
76
  context: n,
77
77
  event: i,
78
- localState: o,
79
- rootSetState: a,
80
- rootState: r
78
+ localState: a,
79
+ rootSetState: o,
80
+ rootState: l
81
81
  }) => {
82
- const l = Le({
82
+ const s = Ue({
83
83
  builder: t,
84
84
  context: n,
85
85
  event: i,
86
- state: Oe(r, o, a)
86
+ state: Ke(l, a, o)
87
87
  });
88
- return new Function(...l.map(([c]) => c), e)(...l.map(([, c]) => c));
88
+ return new Function(...s.map(([c]) => c), e)(...s.map(([, c]) => c));
89
89
  };
90
- function Oe(e, t, n) {
90
+ function Ke(e, t, n) {
91
91
  if (e === t)
92
92
  throw new Error("rootState === localState");
93
93
  return new Proxy(e, {
94
- get: (i, o) => t && o in t ? t[o] : e[o],
95
- set: (i, o, a) => {
96
- if (t && o in t)
94
+ get: (i, a) => t && a in t ? t[a] : e[a],
95
+ set: (i, a, o) => {
96
+ if (t && a in t)
97
97
  throw new Error("Writing to local state is not allowed as it is read-only.");
98
- return e[o] = a, n == null || n(e), !0;
98
+ return e[a] = o, n == null || n(e), !0;
99
99
  }
100
100
  });
101
101
  }
102
- const Ke = (e) => (F(), se(e));
103
- function j({
102
+ const He = (e) => (N(), ue(e));
103
+ function _({
104
104
  code: e,
105
105
  context: t,
106
106
  localState: n,
107
107
  rootState: i,
108
- rootSetState: o,
109
- event: a,
110
- isExpression: r = !0
108
+ rootSetState: a,
109
+ event: o,
110
+ isExpression: l = !0
111
111
  }) {
112
112
  if (e === "") {
113
- _.warn("Skipping evaluation of empty code block.");
113
+ M.warn("Skipping evaluation of empty code block.");
114
114
  return;
115
115
  }
116
- const l = {
117
- code: Ue(e, {
118
- isExpression: r
116
+ const s = {
117
+ code: Oe(e, {
118
+ isExpression: l
119
119
  }),
120
- builder: _e(),
120
+ builder: De(),
121
121
  context: t,
122
- event: a,
123
- rootSetState: o,
122
+ event: o,
123
+ rootSetState: a,
124
124
  rootState: i,
125
125
  localState: n
126
126
  };
127
127
  try {
128
- return Ke(l);
128
+ return He(s);
129
129
  } catch (c) {
130
- _.error("Failed code evaluation: " + c.message, {
130
+ M.error("Failed code evaluation: " + c.message, {
131
131
  code: e
132
132
  });
133
133
  return;
134
134
  }
135
135
  }
136
- const He = (e, t, n) => {
136
+ const ze = (e, t, n) => {
137
137
  if (Object(e) !== e)
138
138
  return e;
139
139
  const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
140
- return i.slice(0, -1).reduce((o, a, r) => Object(o[a]) === o[a] ? o[a] : o[a] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
140
+ return i.slice(0, -1).reduce((a, o, l) => Object(a[o]) === a[o] ? a[o] : a[o] = Math.abs(Number(i[l + 1])) >> 0 === +i[l + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
141
141
  };
142
- const ze = ({
142
+ const qe = ({
143
143
  block: e,
144
144
  context: t,
145
145
  localState: n,
146
146
  rootState: i,
147
- rootSetState: o
147
+ rootSetState: a
148
148
  }) => {
149
149
  if (!e.bindings)
150
150
  return e;
151
- const a = ee(e), r = {
152
- ...a,
151
+ const o = ee(e), l = {
152
+ ...o,
153
153
  properties: {
154
- ...a.properties
154
+ ...o.properties
155
155
  },
156
156
  actions: {
157
- ...a.actions
157
+ ...o.actions
158
158
  }
159
159
  };
160
- for (const l in e.bindings) {
161
- const c = e.bindings[l], d = j({
160
+ for (const s in e.bindings) {
161
+ const c = e.bindings[s], d = _({
162
162
  code: c,
163
163
  localState: n,
164
164
  rootState: i,
165
- rootSetState: o,
165
+ rootSetState: a,
166
166
  context: t
167
167
  });
168
- He(r, l, d);
168
+ ze(l, s, d);
169
169
  }
170
- return r;
170
+ return l;
171
171
  };
172
- function O({
172
+ function D({
173
173
  block: e,
174
174
  context: t,
175
175
  shouldEvaluateBindings: n,
176
176
  localState: i,
177
- rootState: o,
178
- rootSetState: a
177
+ rootState: a,
178
+ rootSetState: o
179
179
  }) {
180
- const r = e;
181
- return n ? ze({
182
- block: r,
180
+ const l = e;
181
+ return n ? qe({
182
+ block: l,
183
183
  localState: i,
184
- rootState: o,
185
- rootSetState: a,
184
+ rootState: a,
185
+ rootSetState: o,
186
186
  context: t
187
- }) : r;
187
+ }) : l;
188
188
  }
189
- const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], D = (e) => typeof e == "string" && qe.includes(e.toLowerCase()), De = ({
189
+ const Ye = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], q = (e) => typeof e == "string" && Ye.includes(e.toLowerCase()), Qe = ({
190
190
  block: e,
191
191
  context: t,
192
192
  registeredComponents: n
193
193
  }) => {
194
- var a;
195
- const i = (a = O({
194
+ var o;
195
+ const i = (o = D({
196
196
  block: e,
197
197
  localState: t.localState,
198
198
  rootState: t.rootState,
199
199
  rootSetState: t.rootSetState,
200
200
  context: t.context,
201
201
  shouldEvaluateBindings: !1
202
- }).component) == null ? void 0 : a.name;
202
+ }).component) == null ? void 0 : o.name;
203
203
  if (!i)
204
204
  return null;
205
- const o = n[i];
206
- if (o)
207
- return o;
205
+ const a = n[i];
206
+ if (a)
207
+ return a;
208
208
  console.warn(`
209
209
  Could not find a registered component named "${i}".
210
210
  If you registered it, is the file that registered it imported by the file that needs to render it?`);
@@ -218,30 +218,30 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
218
218
  } = e;
219
219
  if (!(n != null && n.collection))
220
220
  return;
221
- const o = j({
221
+ const a = _({
222
222
  code: n.collection,
223
223
  localState: t.localState,
224
224
  rootState: t.rootState,
225
225
  rootSetState: t.rootSetState,
226
226
  context: t.context
227
227
  });
228
- if (!Array.isArray(o))
228
+ if (!Array.isArray(a))
229
229
  return;
230
- const a = n.collection.split(".").pop(), r = n.itemName || (a ? a + "Item" : "item");
231
- return o.map((c, d) => ({
230
+ const o = n.collection.split(".").pop(), l = n.itemName || (o ? o + "Item" : "item");
231
+ return a.map((c, d) => ({
232
232
  context: {
233
233
  ...t,
234
234
  localState: {
235
235
  ...t.localState,
236
236
  $index: d,
237
237
  $item: c,
238
- [r]: c,
239
- [`$${r}Index`]: d
238
+ [l]: c,
239
+ [`$${l}Index`]: d
240
240
  }
241
241
  },
242
242
  block: i
243
243
  }));
244
- }, Ce = {
244
+ }, Ie = {
245
245
  small: {
246
246
  min: 320,
247
247
  default: 321,
@@ -257,11 +257,11 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
257
257
  default: 991,
258
258
  max: 1200
259
259
  }
260
- }, de = (e, t = Ce) => `@media (max-width: ${t[e].max}px)`, we = ({
260
+ }, me = (e, t = Ie) => `@media (max-width: ${t[e].max}px)`, Te = ({
261
261
  small: e,
262
262
  medium: t
263
263
  }) => {
264
- const n = ee(Ce);
264
+ const n = ee(Ie);
265
265
  if (!e || !t)
266
266
  return n;
267
267
  const i = Math.floor(e / 2);
@@ -270,41 +270,41 @@ const qe = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen"
270
270
  min: i,
271
271
  default: i + 1
272
272
  };
273
- const o = n.small.max + 1;
273
+ const a = n.small.max + 1;
274
274
  n.medium = {
275
275
  max: t,
276
- min: o,
277
- default: o + 1
276
+ min: a,
277
+ default: a + 1
278
278
  };
279
- const a = n.medium.max + 1;
279
+ const o = n.medium.max + 1;
280
280
  return n.large = {
281
281
  max: 2e3,
282
282
  // TODO: decide upper limit
283
- min: a,
284
- default: a + 1
283
+ min: o,
284
+ default: o + 1
285
285
  }, n;
286
- }, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ie = (e) => Object.entries(e).map(([n, i]) => {
286
+ }, Je = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Re = (e) => Object.entries(e).map(([n, i]) => {
287
287
  if (typeof i == "string")
288
288
  return `${Je(n)}: ${i};`;
289
- }).filter(Y), Ye = (e) => Ie(e).join(`
290
- `), G = ({
289
+ }).filter(G), Xe = (e) => Re(e).join(`
290
+ `), Y = ({
291
291
  mediaQuery: e,
292
292
  className: t,
293
293
  styles: n
294
294
  }) => {
295
295
  const i = `.${t} {
296
- ${Ye(n)}
296
+ ${Xe(n)}
297
297
  }`;
298
298
  return e ? `${e} {
299
299
  ${i}
300
300
  }` : i;
301
301
  };
302
- function H(e) {
303
- return /* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
302
+ function K(e) {
303
+ return /* @__PURE__ */ r("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
304
304
  }
305
305
  function ne(e) {
306
306
  function t() {
307
- const i = O({
307
+ const i = D({
308
308
  block: e.block,
309
309
  localState: e.context.localState,
310
310
  rootState: e.context.rootState,
@@ -312,48 +312,48 @@ function ne(e) {
312
312
  context: e.context.context,
313
313
  shouldEvaluateBindings: !0
314
314
  });
315
- return Y(i.hide) ? !i.hide : Y(i.show) ? i.show : !0;
315
+ return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
316
316
  }
317
317
  function n() {
318
318
  var b;
319
- const i = O({
319
+ const i = D({
320
320
  block: e.block,
321
321
  localState: e.context.localState,
322
322
  rootState: e.context.rootState,
323
323
  rootSetState: e.context.rootSetState,
324
324
  context: e.context.context,
325
325
  shouldEvaluateBindings: !0
326
- }), o = i.responsiveStyles, a = e.context.content, r = we(
327
- ((b = a == null ? void 0 : a.meta) == null ? void 0 : b.breakpoints) || {}
328
- ), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, d = o == null ? void 0 : o.small, u = i.id;
326
+ }), a = i.responsiveStyles, o = e.context.content, l = Te(
327
+ ((b = o == null ? void 0 : o.meta) == null ? void 0 : b.breakpoints) || {}
328
+ ), s = a == null ? void 0 : a.large, c = a == null ? void 0 : a.medium, d = a == null ? void 0 : a.small, u = i.id;
329
329
  if (!u)
330
330
  return "";
331
- const h = l ? G({
331
+ const g = s ? Y({
332
332
  className: u,
333
- styles: l
334
- }) : "", y = c ? G({
333
+ styles: s
334
+ }) : "", v = c ? Y({
335
335
  className: u,
336
336
  styles: c,
337
- mediaQuery: de(
337
+ mediaQuery: me(
338
338
  "medium",
339
- r
339
+ l
340
340
  )
341
- }) : "", k = d ? G({
341
+ }) : "", V = d ? Y({
342
342
  className: u,
343
343
  styles: d,
344
- mediaQuery: de(
344
+ mediaQuery: me(
345
345
  "small",
346
- r
346
+ l
347
347
  )
348
348
  }) : "";
349
- return [h, y, k].join(" ");
349
+ return [g, v, V].join(" ");
350
350
  }
351
- return /* @__PURE__ */ s(g, { children: n() && t() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(H, { styles: n() }) }) : null });
351
+ return /* @__PURE__ */ r(f, { children: n() && t() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: n() }) }) : null });
352
352
  }
353
- function Qe(e) {
353
+ function Ze(e) {
354
354
  return e.charAt(0).toUpperCase() + e.slice(1);
355
355
  }
356
- const Xe = (e) => `on${Qe(e)}`, Ze = (e, t) => (n) => j({
356
+ const et = (e) => `on${Ze(e)}`, tt = (e, t) => (n) => _({
357
357
  code: e,
358
358
  context: t.context,
359
359
  localState: t.localState,
@@ -362,54 +362,54 @@ const Xe = (e) => `on${Qe(e)}`, Ze = (e, t) => (n) => j({
362
362
  event: n,
363
363
  isExpression: !1
364
364
  });
365
- function Q(e) {
365
+ function J(e) {
366
366
  const t = {}, n = e.block.actions ?? {};
367
367
  for (const i in n) {
368
368
  if (!n.hasOwnProperty(i))
369
369
  continue;
370
- const o = n[i];
371
- let a = Xe(i);
370
+ const a = n[i];
371
+ let o = et(i);
372
372
  if (e.stripPrefix)
373
- switch (M) {
373
+ switch (L) {
374
374
  case "vue2":
375
375
  case "vue3":
376
- a = a.replace("v-on:", "");
376
+ o = o.replace("v-on:", "");
377
377
  break;
378
378
  case "svelte":
379
- a = a.replace("on:", "");
379
+ o = o.replace("on:", "");
380
380
  break;
381
381
  }
382
- t[a] = Ze(o, e);
382
+ t[o] = tt(a, e);
383
383
  }
384
384
  return t;
385
385
  }
386
- function et(e) {
386
+ function nt(e) {
387
387
  return e.className = e.class, delete e.class, e;
388
388
  }
389
- const tt = (e) => ({
389
+ const it = (e) => ({
390
390
  href: e.href
391
391
  });
392
- function K({
392
+ function O({
393
393
  block: e,
394
394
  context: t
395
395
  }) {
396
396
  var i;
397
397
  const n = {
398
- ...tt(e),
398
+ ...it(e),
399
399
  ...e.properties,
400
400
  "builder-id": e.id,
401
- style: e.style ? nt(e.style) : void 0,
401
+ style: e.style ? at(e.style) : void 0,
402
402
  class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
403
403
  };
404
- return et(n);
404
+ return nt(n);
405
405
  }
406
- function nt(e) {
407
- switch (M) {
406
+ function at(e) {
407
+ switch (L) {
408
408
  case "svelte":
409
409
  case "vue2":
410
410
  case "vue3":
411
411
  case "solid":
412
- return Ie(e).join(" ");
412
+ return Re(e).join(" ");
413
413
  case "qwik":
414
414
  case "reactNative":
415
415
  case "react":
@@ -417,17 +417,17 @@ function nt(e) {
417
417
  return e;
418
418
  }
419
419
  }
420
- function ue(e) {
421
- return /* @__PURE__ */ P(g, { children: [
420
+ function fe(e) {
421
+ return /* @__PURE__ */ T(f, { children: [
422
422
  " ",
423
- e.hasChildren ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
423
+ e.hasChildren ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
424
424
  e.Wrapper,
425
425
  {
426
- ...K({
426
+ ...O({
427
427
  block: e.block,
428
428
  context: e.context
429
429
  }),
430
- ...Q({
430
+ ...J({
431
431
  block: e.block,
432
432
  rootState: e.context.rootState,
433
433
  rootSetState: e.context.rootSetState,
@@ -441,14 +441,14 @@ function ue(e) {
441
441
  " "
442
442
  ]
443
443
  }
444
- ) }) : /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
444
+ ) }) : /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
445
445
  e.Wrapper,
446
446
  {
447
- ...K({
447
+ ...O({
448
448
  block: e.block,
449
449
  context: e.context
450
450
  }),
451
- ...Q({
451
+ ...J({
452
452
  block: e.block,
453
453
  rootState: e.context.rootState,
454
454
  rootSetState: e.context.rootSetState,
@@ -461,17 +461,17 @@ function ue(e) {
461
461
  " "
462
462
  ] });
463
463
  }
464
- function it(e) {
465
- return /* @__PURE__ */ s(
464
+ function ot(e) {
465
+ return /* @__PURE__ */ r(
466
466
  e.Wrapper,
467
467
  {
468
468
  ...e.wrapperProps,
469
469
  attributes: {
470
- ...K({
470
+ ...O({
471
471
  block: e.block,
472
472
  context: e.context
473
473
  }),
474
- ...Q({
474
+ ...J({
475
475
  block: e.block,
476
476
  rootState: e.context.rootState,
477
477
  rootSetState: e.context.rootSetState,
@@ -483,15 +483,15 @@ function it(e) {
483
483
  }
484
484
  );
485
485
  }
486
- const ot = ({
486
+ const rt = ({
487
487
  componentOptions: e,
488
488
  builderBlock: t,
489
489
  context: n,
490
490
  componentRef: i,
491
- includeBlockProps: o,
492
- isInteractive: a,
493
- contextValue: r
494
- }) => a ? {
491
+ includeBlockProps: a,
492
+ isInteractive: o,
493
+ contextValue: l
494
+ }) => o ? {
495
495
  Wrapper: i,
496
496
  block: t,
497
497
  context: n,
@@ -502,22 +502,22 @@ const ot = ({
502
502
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
503
503
  * component itself directly. Otherwise, they are provided to the wrapper element.
504
504
  */
505
- ...o ? {
506
- attributes: K({
505
+ ...a ? {
506
+ attributes: O({
507
507
  block: t,
508
- context: r
508
+ context: l
509
509
  })
510
510
  } : {}
511
511
  };
512
- function me(e) {
513
- var i, o;
514
- const [t, n] = I(
515
- () => e.isInteractive ? it : e.componentRef
512
+ function he(e) {
513
+ var i, a;
514
+ const [t, n] = p(
515
+ () => e.isInteractive ? ot : e.componentRef
516
516
  );
517
- return /* @__PURE__ */ s(g, { children: e.componentRef ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
517
+ return /* @__PURE__ */ r(f, { children: e.componentRef ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
518
518
  t,
519
519
  {
520
- ...ot({
520
+ ...rt({
521
521
  componentOptions: e.componentOptions,
522
522
  builderBlock: e.builderBlock,
523
523
  context: e.context,
@@ -527,31 +527,31 @@ function me(e) {
527
527
  contextValue: e.context
528
528
  }),
529
529
  children: [
530
- (i = e.blockChildren) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
531
- z,
530
+ (i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
531
+ H,
532
532
  {
533
- block: a,
533
+ block: o,
534
534
  context: e.context,
535
535
  registeredComponents: e.registeredComponents
536
536
  },
537
- "block-" + a.id
537
+ "block-" + o.id
538
538
  )),
539
- (o = e.blockChildren) == null ? void 0 : o.map((a) => /* @__PURE__ */ s(
539
+ (a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
540
540
  ne,
541
541
  {
542
- block: a,
542
+ block: o,
543
543
  context: e.context
544
544
  },
545
- "block-style-" + a.id
545
+ "block-style-" + o.id
546
546
  ))
547
547
  ]
548
548
  }
549
549
  ) }) : null });
550
550
  }
551
- function at(e) {
552
- const [t, n] = I(() => e.repeatContext);
553
- return /* @__PURE__ */ s(te.Provider, { value: t, children: /* @__PURE__ */ s(
554
- z,
551
+ function lt(e) {
552
+ const [t, n] = p(() => e.repeatContext);
553
+ return /* @__PURE__ */ r(te.Provider, { value: t, children: /* @__PURE__ */ r(
554
+ H,
555
555
  {
556
556
  block: e.block,
557
557
  context: t,
@@ -559,10 +559,10 @@ function at(e) {
559
559
  }
560
560
  ) });
561
561
  }
562
- function z(e) {
563
- var u, h, y, k;
562
+ function H(e) {
563
+ var u, g, v, V;
564
564
  function t() {
565
- return De({
565
+ return Qe({
566
566
  block: e.block,
567
567
  context: e.context,
568
568
  registeredComponents: e.registeredComponents
@@ -575,7 +575,8 @@ function z(e) {
575
575
  });
576
576
  }
577
577
  function i() {
578
- return n() ? e.block : O({
578
+ var b;
579
+ return (b = e.block.repeat) != null && b.collection ? e.block : D({
579
580
  block: e.block,
580
581
  localState: e.context.localState,
581
582
  rootState: e.context.rootState,
@@ -584,60 +585,61 @@ function z(e) {
584
585
  shouldEvaluateBindings: !0
585
586
  });
586
587
  }
587
- function o() {
588
+ function a() {
588
589
  return e.block.tagName || "div";
589
590
  }
590
- function a() {
591
- return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
591
+ function o() {
592
+ var b, S;
593
+ return "hide" in i() ? !i().hide : "show" in i() ? i().show : !((b = e.block.repeat) != null && b.collection && !((S = n == null ? void 0 : n()) != null && S.length));
592
594
  }
593
- function r() {
595
+ function l() {
594
596
  var S;
595
597
  return !((S = t == null ? void 0 : t()) != null && S.component) && !n() ? i().children ?? [] : [];
596
598
  }
597
- function l() {
598
- var b, S, C, w, x;
599
+ function s() {
600
+ var b, S, E, R, C;
599
601
  return {
600
602
  blockChildren: i().children ?? [],
601
603
  componentRef: (b = t == null ? void 0 : t()) == null ? void 0 : b.component,
602
604
  componentOptions: {
603
605
  ...Me(i()),
604
606
  builderContext: e.context,
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" ? {
607
+ ...((S = t == null ? void 0 : t()) == null ? void 0 : S.name) === "Symbol" || ((E = t == null ? void 0 : t()) == null ? void 0 : E.name) === "Columns" ? {
606
608
  builderComponents: e.registeredComponents
607
609
  } : {}
608
610
  },
609
611
  context: c,
610
612
  registeredComponents: e.registeredComponents,
611
613
  builderBlock: i(),
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)
614
+ includeBlockProps: ((R = t == null ? void 0 : t()) == null ? void 0 : R.noWrap) === !0,
615
+ isInteractive: !((C = t == null ? void 0 : t()) != null && C.isRSC)
614
616
  };
615
617
  }
616
- const [c, d] = I(() => e.context);
617
- return /* @__PURE__ */ s(g, { children: a() ? /* @__PURE__ */ s(g, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
618
- me,
618
+ const [c, d] = p(() => e.context);
619
+ return /* @__PURE__ */ r(f, { children: o() ? /* @__PURE__ */ r(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
620
+ he,
619
621
  {
620
- componentRef: l().componentRef,
621
- componentOptions: l().componentOptions,
622
- blockChildren: l().blockChildren,
623
- context: l().context,
624
- registeredComponents: l().registeredComponents,
625
- builderBlock: l().builderBlock,
626
- includeBlockProps: l().includeBlockProps,
627
- isInteractive: l().isInteractive
622
+ componentRef: s().componentRef,
623
+ componentOptions: s().componentOptions,
624
+ blockChildren: s().blockChildren,
625
+ context: s().context,
626
+ registeredComponents: s().registeredComponents,
627
+ builderBlock: s().builderBlock,
628
+ includeBlockProps: s().includeBlockProps,
629
+ isInteractive: s().isInteractive
628
630
  }
629
- ) }) : /* @__PURE__ */ P(g, { children: [
630
- D(o()) ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
631
- ue,
631
+ ) }) : /* @__PURE__ */ T(f, { children: [
632
+ q(a()) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
633
+ fe,
632
634
  {
633
- Wrapper: o(),
635
+ Wrapper: a(),
634
636
  block: i(),
635
637
  context: e.context,
636
638
  hasChildren: !1
637
639
  }
638
640
  ) }) : null,
639
- !D(o()) && n() ? /* @__PURE__ */ s(g, { children: (h = n()) == null ? void 0 : h.map((b, S) => /* @__PURE__ */ s(
640
- at,
641
+ !q(a()) && n() ? /* @__PURE__ */ r(f, { children: (g = n()) == null ? void 0 : g.map((b, S) => /* @__PURE__ */ r(
642
+ lt,
641
643
  {
642
644
  repeatContext: b.context,
643
645
  block: b.block,
@@ -645,29 +647,29 @@ function z(e) {
645
647
  },
646
648
  S
647
649
  )) }) : null,
648
- !D(o()) && !n() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ P(
649
- ue,
650
+ !q(a()) && !n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ T(
651
+ fe,
650
652
  {
651
- Wrapper: o(),
653
+ Wrapper: a(),
652
654
  block: i(),
653
655
  context: e.context,
654
656
  hasChildren: !0,
655
657
  children: [
656
- /* @__PURE__ */ s(
657
- me,
658
+ /* @__PURE__ */ r(
659
+ he,
658
660
  {
659
- componentRef: l().componentRef,
660
- componentOptions: l().componentOptions,
661
- blockChildren: l().blockChildren,
662
- context: l().context,
663
- registeredComponents: l().registeredComponents,
664
- builderBlock: l().builderBlock,
665
- includeBlockProps: l().includeBlockProps,
666
- isInteractive: l().isInteractive
661
+ componentRef: s().componentRef,
662
+ componentOptions: s().componentOptions,
663
+ blockChildren: s().blockChildren,
664
+ context: s().context,
665
+ registeredComponents: s().registeredComponents,
666
+ builderBlock: s().builderBlock,
667
+ includeBlockProps: s().includeBlockProps,
668
+ isInteractive: s().isInteractive
667
669
  }
668
670
  ),
669
- (y = r()) == null ? void 0 : y.map((b) => /* @__PURE__ */ s(
670
- z,
671
+ (v = l()) == null ? void 0 : v.map((b) => /* @__PURE__ */ r(
672
+ H,
671
673
  {
672
674
  block: b,
673
675
  context: c,
@@ -675,7 +677,7 @@ function z(e) {
675
677
  },
676
678
  "block-" + b.id
677
679
  )),
678
- (k = r()) == null ? void 0 : k.map((b) => /* @__PURE__ */ s(
680
+ (V = l()) == null ? void 0 : V.map((b) => /* @__PURE__ */ r(
679
681
  ne,
680
682
  {
681
683
  block: b,
@@ -688,14 +690,14 @@ function z(e) {
688
690
  ) }) : null
689
691
  ] }) }) : null });
690
692
  }
691
- function rt(e) {
693
+ function ct(e) {
692
694
  function t() {
693
- var o;
694
- return "builder-blocks" + ((o = e.blocks) != null && o.length ? "" : " no-blocks");
695
+ var a;
696
+ return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
695
697
  }
696
698
  function n() {
697
- var o, a;
698
- V() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
699
+ var a, o;
700
+ $() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
699
701
  {
700
702
  type: "builder.clickEmptyBlocks",
701
703
  data: {
@@ -707,8 +709,8 @@ function rt(e) {
707
709
  ));
708
710
  }
709
711
  function i() {
710
- var o, a;
711
- V() && !((o = e.blocks) != null && o.length) && ((a = window.parent) == null || a.postMessage(
712
+ var a, o;
713
+ $() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
712
714
  {
713
715
  type: "builder.hoverEmptyBlocks",
714
716
  data: {
@@ -719,21 +721,21 @@ function rt(e) {
719
721
  "*"
720
722
  ));
721
723
  }
722
- return /* @__PURE__ */ P(g, { children: [
723
- /* @__PURE__ */ s(
724
+ return /* @__PURE__ */ T(f, { children: [
725
+ /* @__PURE__ */ r(
724
726
  "div",
725
727
  {
726
728
  className: t() + " div-02c7a115",
727
729
  "builder-path": e.path,
728
730
  "builder-parent-id": e.parent,
729
731
  style: e.styleProp,
730
- onClick: (o) => n(),
731
- onMouseEnter: (o) => i(),
732
- onKeyPress: (o) => n(),
732
+ onClick: (a) => n(),
733
+ onMouseEnter: (a) => i(),
734
+ onKeyPress: (a) => n(),
733
735
  children: e.children
734
736
  }
735
737
  ),
736
- /* @__PURE__ */ s("style", { children: `.div-02c7a115 {
738
+ /* @__PURE__ */ r("style", { children: `.div-02c7a115 {
737
739
  display: flex;
738
740
  flex-direction: column;
739
741
  align-items: stretch;
@@ -741,106 +743,106 @@ function rt(e) {
741
743
  ] });
742
744
  }
743
745
  function ie(e) {
744
- var i, o;
745
- const t = ae(te), n = ae(ke);
746
- return /* @__PURE__ */ P(
747
- rt,
746
+ var i, a;
747
+ const t = le(te), n = le(we);
748
+ return /* @__PURE__ */ T(
749
+ ct,
748
750
  {
749
751
  blocks: e.blocks,
750
752
  parent: e.parent,
751
753
  path: e.path,
752
754
  styleProp: e.styleProp,
753
755
  children: [
754
- e.blocks ? /* @__PURE__ */ s(g, { children: (i = e.blocks) == null ? void 0 : i.map((a) => /* @__PURE__ */ s(
755
- z,
756
+ e.blocks ? /* @__PURE__ */ r(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ r(
757
+ H,
756
758
  {
757
- block: a,
759
+ block: o,
758
760
  context: e.context || t,
759
761
  registeredComponents: e.registeredComponents || n.registeredComponents
760
762
  },
761
- "render-block-" + a.id
763
+ "render-block-" + o.id
762
764
  )) }) : null,
763
- e.blocks ? /* @__PURE__ */ s(g, { children: (o = e.blocks) == null ? void 0 : o.map((a) => /* @__PURE__ */ s(
765
+ e.blocks ? /* @__PURE__ */ r(f, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ r(
764
766
  ne,
765
767
  {
766
- block: a,
768
+ block: o,
767
769
  context: e.context || t
768
770
  },
769
- "block-style-" + a.id
771
+ "block-style-" + o.id
770
772
  )) }) : null
771
773
  ]
772
774
  }
773
775
  );
774
776
  }
775
- function lt(e) {
776
- var w;
777
- const [t, n] = I(
777
+ function st(e) {
778
+ var R;
779
+ const [t, n] = p(
778
780
  () => typeof e.space == "number" ? e.space || 0 : 20
779
- ), [i, o] = I(() => e.columns || []), [a, r] = I(
781
+ ), [i, a] = p(() => e.columns || []), [o, l] = p(
780
782
  () => e.stackColumnsAt || "tablet"
781
783
  );
782
- function l(x) {
783
- var R;
784
- return ((R = i[x]) == null ? void 0 : R.width) || 100 / i.length;
784
+ function s(C) {
785
+ var w;
786
+ return ((w = i[C]) == null ? void 0 : w.width) || 100 / i.length;
785
787
  }
786
- function c(x) {
787
- const R = t * (i.length - 1) / i.length;
788
- return `calc(${l(x)}% - ${R}px)`;
788
+ function c(C) {
789
+ const w = t * (i.length - 1) / i.length;
790
+ return `calc(${s(C)}% - ${w}px)`;
789
791
  }
790
792
  function d({
791
- stackedStyle: x,
792
- desktopStyle: R
793
+ stackedStyle: C,
794
+ desktopStyle: w
793
795
  }) {
794
- return a === "tablet" ? x : R;
796
+ return o === "tablet" ? C : w;
795
797
  }
796
798
  function u({
797
- stackedStyle: x,
798
- desktopStyle: R
799
+ stackedStyle: C,
800
+ desktopStyle: w
799
801
  }) {
800
- return a === "never" ? R : x;
802
+ return o === "never" ? w : C;
801
803
  }
802
- const [h, y] = I(
804
+ const [g, v] = p(
803
805
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
804
806
  );
805
- function k() {
807
+ function V() {
806
808
  return {
807
- "--flex-dir": h,
809
+ "--flex-dir": g,
808
810
  "--flex-dir-tablet": d({
809
- stackedStyle: h,
811
+ stackedStyle: g,
810
812
  desktopStyle: "row"
811
813
  })
812
814
  };
813
815
  }
814
- function b(x) {
815
- const R = x === 0 ? 0 : t, $ = c(x), A = `${R}px`, N = "100%", W = 0;
816
+ function b(C) {
817
+ const w = C === 0 ? 0 : t, A = c(C), B = `${w}px`, F = "100%", W = 0;
816
818
  return {
817
- width: $,
818
- ["marginLeft"]: A,
819
+ width: A,
820
+ ["marginLeft"]: B,
819
821
  "--column-width-mobile": u({
820
- stackedStyle: N,
821
- desktopStyle: $
822
+ stackedStyle: F,
823
+ desktopStyle: A
822
824
  }),
823
825
  "--column-margin-left-mobile": u({
824
826
  stackedStyle: W,
825
- desktopStyle: A
827
+ desktopStyle: B
826
828
  }),
827
829
  "--column-width-tablet": d({
828
- stackedStyle: N,
829
- desktopStyle: $
830
+ stackedStyle: F,
831
+ desktopStyle: A
830
832
  }),
831
833
  "--column-margin-left-tablet": d({
832
834
  stackedStyle: W,
833
- desktopStyle: A
835
+ desktopStyle: B
834
836
  })
835
837
  };
836
838
  }
837
- function S(x) {
838
- var $, A;
839
- return we(
840
- ((A = ($ = e.builderContext.content) == null ? void 0 : $.meta) == null ? void 0 : A.breakpoints) || {}
841
- )[x].max;
839
+ function S(C) {
840
+ var A, B;
841
+ return Te(
842
+ ((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
843
+ )[C].max;
842
844
  }
843
- function C() {
845
+ function E() {
844
846
  return `
845
847
  @media (max-width: ${S("medium")}px) {
846
848
  .${e.builderBlock.id}-breakpoints {
@@ -867,39 +869,39 @@ function lt(e) {
867
869
  },
868
870
  `;
869
871
  }
870
- return /* @__PURE__ */ P(g, { children: [
871
- /* @__PURE__ */ P(
872
+ return /* @__PURE__ */ T(f, { children: [
873
+ /* @__PURE__ */ T(
872
874
  "div",
873
875
  {
874
876
  className: `builder-columns ${e.builderBlock.id}-breakpoints div-53636e90`,
875
- style: k(),
877
+ style: V(),
876
878
  children: [
877
- /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(H, { styles: C() }) }),
878
- (w = e.columns) == null ? void 0 : w.map((x, R) => /* @__PURE__ */ ve(
879
+ /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(K, { styles: E() }) }),
880
+ (R = e.columns) == null ? void 0 : R.map((C, w) => /* @__PURE__ */ ke(
879
881
  "div",
880
882
  {
881
883
  className: "builder-column div-53636e90-2",
882
- style: b(R),
883
- key: R
884
+ style: b(w),
885
+ key: w
884
886
  },
885
- /* @__PURE__ */ s(
887
+ /* @__PURE__ */ r(
886
888
  ie,
887
889
  {
888
- path: `component.options.columns.${R}.blocks`,
890
+ path: `component.options.columns.${w}.blocks`,
889
891
  parent: e.builderBlock.id,
890
892
  styleProp: {
891
893
  flexGrow: "1"
892
894
  },
893
895
  context: e.builderContext,
894
896
  registeredComponents: e.builderComponents,
895
- blocks: x.blocks
897
+ blocks: C.blocks
896
898
  }
897
899
  )
898
900
  ))
899
901
  ]
900
902
  }
901
903
  ),
902
- /* @__PURE__ */ s("style", { children: `.div-53636e90 {
904
+ /* @__PURE__ */ r("style", { children: `.div-53636e90 {
903
905
  display: flex;
904
906
  line-height: normal;
905
907
  }.div-53636e90-2 {
@@ -909,41 +911,41 @@ function lt(e) {
909
911
  }` })
910
912
  ] });
911
913
  }
912
- function ct(e) {
913
- return /* @__PURE__ */ s("span", { children: e.children });
914
+ function dt(e) {
915
+ return /* @__PURE__ */ r("span", { children: e.children });
914
916
  }
915
- function fe(e) {
917
+ function ge(e) {
916
918
  return e.replace(/http(s)?:/, "");
917
919
  }
918
- function st(e = "", t, n) {
919
- const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
920
- return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
920
+ function ut(e = "", t, n) {
921
+ const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
922
+ return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
921
923
  }
922
- function dt(e, t) {
924
+ function mt(e, t) {
923
925
  if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
924
926
  return e;
925
927
  if (t === "master")
926
- return fe(e);
928
+ return ge(e);
927
929
  const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
928
930
  if (n) {
929
- const i = e.split(n[0]), o = n[3], a = t.match("x") ? t : `${t}x`;
930
- return fe(`${i[0]}_${a}${o}`);
931
+ const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
932
+ return ge(`${i[0]}_${o}${a}`);
931
933
  }
932
934
  return null;
933
935
  }
934
- function J(e) {
936
+ function Q(e) {
935
937
  if (!e)
936
938
  return e;
937
939
  const t = [100, 200, 400, 800, 1200, 1600, 2e3];
938
940
  if (e.match(/builder\.io/)) {
939
941
  let n = e;
940
942
  const i = Number(e.split("?width=")[1]);
941
- return isNaN(i) || (n = `${n} ${i}w`), t.filter((o) => o !== i).map((o) => `${st(e, "width", o)} ${o}w`).concat([n]).join(", ");
943
+ return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${ut(e, "width", a)} ${a}w`).concat([n]).join(", ");
942
944
  }
943
- 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;
945
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [mt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
944
946
  }
945
- function ut(e) {
946
- var o, a, r, l;
947
+ function ft(e) {
948
+ var a, o, l, s;
947
949
  function t() {
948
950
  var u;
949
951
  const d = e.image || e.src;
@@ -953,10 +955,10 @@ function ut(e) {
953
955
  return e.srcset;
954
956
  if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
955
957
  if (!e.srcset.includes(e.image.split("?")[0]))
956
- return console.debug("Removed given srcset"), J(d);
958
+ return console.debug("Removed given srcset"), Q(d);
957
959
  } else if (e.image && !e.srcset)
958
- return J(d);
959
- return J(d);
960
+ return Q(d);
961
+ return Q(d);
960
962
  }
961
963
  function n() {
962
964
  var c;
@@ -972,11 +974,11 @@ function ut(e) {
972
974
  };
973
975
  return e.aspectRatio ? c : void 0;
974
976
  }
975
- return /* @__PURE__ */ P(g, { children: [
976
- /* @__PURE__ */ P(g, { children: [
977
- /* @__PURE__ */ P("picture", { children: [
978
- n() ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s("source", { type: "image/webp", srcSet: n() }) }) : null,
979
- /* @__PURE__ */ s(
977
+ return /* @__PURE__ */ T(f, { children: [
978
+ /* @__PURE__ */ T(f, { children: [
979
+ /* @__PURE__ */ T("picture", { children: [
980
+ n() ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("source", { type: "image/webp", srcSet: n() }) }) : null,
981
+ /* @__PURE__ */ r(
980
982
  "img",
981
983
  {
982
984
  loading: "lazy",
@@ -994,7 +996,7 @@ function ut(e) {
994
996
  }
995
997
  )
996
998
  ] }),
997
- e.aspectRatio && !((a = (o = e.builderBlock) == null ? void 0 : o.children) != null && a.length && e.fitContent) ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
999
+ e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
998
1000
  "div",
999
1001
  {
1000
1002
  className: "builder-image-sizer div-dbab4030",
@@ -1003,10 +1005,10 @@ function ut(e) {
1003
1005
  }
1004
1006
  }
1005
1007
  ) }) : null,
1006
- (l = (r = e.builderBlock) == null ? void 0 : r.children) != null && l.length && e.fitContent ? /* @__PURE__ */ s(g, { children: e.children }) : null,
1007
- !e.fitContent && e.children ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s("div", { className: "div-dbab4030-2", children: e.children }) }) : null
1008
+ (s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: e.children }) : null,
1009
+ !e.fitContent && e.children ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r("div", { className: "div-dbab4030-2", children: e.children }) }) : null
1008
1010
  ] }),
1009
- /* @__PURE__ */ s("style", { children: `.img-dbab4030 {
1011
+ /* @__PURE__ */ r("style", { children: `.img-dbab4030 {
1010
1012
  opacity: 1;
1011
1013
  transition: opacity 0.2s ease-in-out;
1012
1014
  }.div-dbab4030 {
@@ -1025,8 +1027,8 @@ function ut(e) {
1025
1027
  }` })
1026
1028
  ] });
1027
1029
  }
1028
- function mt(e) {
1029
- return /* @__PURE__ */ s(
1030
+ function ht(e) {
1031
+ return /* @__PURE__ */ r(
1030
1032
  "section",
1031
1033
  {
1032
1034
  ...e.attributes,
@@ -1046,7 +1048,7 @@ function mt(e) {
1046
1048
  }
1047
1049
  );
1048
1050
  }
1049
- const ft = {
1051
+ const gt = {
1050
1052
  name: "Core:Button",
1051
1053
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1052
1054
  defaultStyles: {
@@ -1079,7 +1081,7 @@ const ft = {
1079
1081
  }],
1080
1082
  static: !0,
1081
1083
  noWrap: !0
1082
- }, ht = {
1084
+ }, bt = {
1083
1085
  // TODO: ways to statically preprocess JSON for references, functions, etc
1084
1086
  name: "Columns",
1085
1087
  isRSC: !0,
@@ -1258,7 +1260,7 @@ const ft = {
1258
1260
  });
1259
1261
  }
1260
1262
  const n = e.get("columns");
1261
- Array.isArray(n) && n.find((o) => o.get("width")) && (n.find((a) => !a.get("width")) || n.reduce((l, c) => l + c.get("width"), 0) !== 100) && t();
1263
+ Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((s, c) => s + c.get("width"), 0) !== 100) && t();
1262
1264
  }
1263
1265
  }, {
1264
1266
  name: "space",
@@ -1280,7 +1282,7 @@ const ft = {
1280
1282
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1281
1283
  advanced: !0
1282
1284
  }]
1283
- }, gt = {
1285
+ }, xt = {
1284
1286
  name: "Custom Code",
1285
1287
  static: !0,
1286
1288
  requiredPermissions: ["editCode"],
@@ -1303,15 +1305,15 @@ const ft = {
1303
1305
  advanced: !0
1304
1306
  }]
1305
1307
  };
1306
- function bt(e) {
1307
- const t = Z(null), [n, i] = I(() => []), [o, a] = I(() => []);
1308
- return B(() => {
1309
- var l;
1310
- if (!((l = t.current) != null && l.getElementsByTagName) || typeof window > "u")
1308
+ function yt(e) {
1309
+ const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []);
1310
+ return P(() => {
1311
+ var s;
1312
+ if (!((s = t.current) != null && s.getElementsByTagName) || typeof window > "u")
1311
1313
  return;
1312
- const r = t.current.getElementsByTagName("script");
1313
- for (let c = 0; c < r.length; c++) {
1314
- const d = r[c];
1314
+ const l = t.current.getElementsByTagName("script");
1315
+ for (let c = 0; c < l.length; c++) {
1316
+ const d = l[c];
1315
1317
  if (d.src) {
1316
1318
  if (n.includes(d.src))
1317
1319
  continue;
@@ -1323,16 +1325,16 @@ function bt(e) {
1323
1325
  "application/javascript",
1324
1326
  "application/ecmascript"
1325
1327
  ].includes(d.type)) {
1326
- if (o.includes(d.innerText))
1328
+ if (a.includes(d.innerText))
1327
1329
  continue;
1328
1330
  try {
1329
- o.push(d.innerText), new Function(d.innerText)();
1331
+ a.push(d.innerText), new Function(d.innerText)();
1330
1332
  } catch (u) {
1331
1333
  console.warn("`CustomCode`: Error running script:", u);
1332
1334
  }
1333
1335
  }
1334
1336
  }
1335
- }, []), /* @__PURE__ */ s(
1337
+ }, []), /* @__PURE__ */ r(
1336
1338
  "div",
1337
1339
  {
1338
1340
  ref: t,
@@ -1341,7 +1343,7 @@ function bt(e) {
1341
1343
  }
1342
1344
  );
1343
1345
  }
1344
- const xt = {
1346
+ const St = {
1345
1347
  name: "Embed",
1346
1348
  static: !0,
1347
1349
  inputs: [{
@@ -1366,30 +1368,30 @@ const xt = {
1366
1368
  defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1367
1369
  hideFromUI: !0
1368
1370
  }]
1369
- }, yt = ["text/javascript", "application/javascript", "application/ecmascript"], St = (e) => yt.includes(e.type);
1370
- function vt(e) {
1371
- const t = Z(null), [n, i] = I(() => []), [o, a] = I(() => []), [r, l] = I(() => !1);
1371
+ }, vt = ["text/javascript", "application/javascript", "application/ecmascript"], pt = (e) => vt.includes(e.type);
1372
+ function kt(e) {
1373
+ const t = Z(null), [n, i] = p(() => []), [a, o] = p(() => []), [l, s] = p(() => !1);
1372
1374
  function c() {
1373
1375
  if (!t.current || !t.current.getElementsByTagName)
1374
1376
  return;
1375
1377
  const d = t.current.getElementsByTagName("script");
1376
1378
  for (let u = 0; u < d.length; u++) {
1377
- const h = d[u];
1378
- if (h.src && !n.includes(h.src)) {
1379
- n.push(h.src);
1380
- const y = document.createElement("script");
1381
- y.async = !0, y.src = h.src, document.head.appendChild(y);
1382
- } else if (St(h) && !o.includes(h.innerText))
1379
+ const g = d[u];
1380
+ if (g.src && !n.includes(g.src)) {
1381
+ n.push(g.src);
1382
+ const v = document.createElement("script");
1383
+ v.async = !0, v.src = g.src, document.head.appendChild(v);
1384
+ } else if (pt(g) && !a.includes(g.innerText))
1383
1385
  try {
1384
- o.push(h.innerText), new Function(h.innerText)();
1385
- } catch (y) {
1386
- console.warn("`Embed`: Error running script:", y);
1386
+ a.push(g.innerText), new Function(g.innerText)();
1387
+ } catch (v) {
1388
+ console.warn("`Embed`: Error running script:", v);
1387
1389
  }
1388
1390
  }
1389
1391
  }
1390
- return B(() => {
1391
- t.current && !r && (l(!0), c());
1392
- }, [t.current, r]), /* @__PURE__ */ s(
1392
+ return P(() => {
1393
+ t.current && !l && (s(!0), c());
1394
+ }, [t.current, l]), /* @__PURE__ */ r(
1393
1395
  "div",
1394
1396
  {
1395
1397
  className: "builder-embed",
@@ -1398,13 +1400,13 @@ function vt(e) {
1398
1400
  }
1399
1401
  );
1400
1402
  }
1401
- const pt = {
1403
+ const Ct = {
1402
1404
  name: "Fragment",
1403
1405
  static: !0,
1404
1406
  hidden: !0,
1405
1407
  canHaveChildren: !0,
1406
1408
  noWrap: !0
1407
- }, kt = {
1409
+ }, wt = {
1408
1410
  name: "Image",
1409
1411
  static: !0,
1410
1412
  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",
@@ -1424,29 +1426,29 @@ const pt = {
1424
1426
  defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1425
1427
  onChange: (e) => {
1426
1428
  e.delete("srcset"), e.delete("noWebp");
1427
- function n(r, l = 6e4) {
1429
+ function n(l, s = 6e4) {
1428
1430
  return new Promise((c, d) => {
1429
1431
  const u = document.createElement("img");
1430
- let h = !1;
1432
+ let g = !1;
1431
1433
  u.onload = () => {
1432
- h = !0, c(u);
1433
- }, u.addEventListener("error", (y) => {
1434
- console.warn("Image load failed", y.error), d(y.error);
1435
- }), u.src = r, setTimeout(() => {
1436
- h || d(new Error("Image load timed out"));
1437
- }, l);
1434
+ g = !0, c(u);
1435
+ }, u.addEventListener("error", (v) => {
1436
+ console.warn("Image load failed", v.error), d(v.error);
1437
+ }), u.src = l, setTimeout(() => {
1438
+ g || d(new Error("Image load timed out"));
1439
+ }, s);
1438
1440
  });
1439
1441
  }
1440
- function i(r) {
1441
- return Math.round(r * 1e3) / 1e3;
1442
+ function i(l) {
1443
+ return Math.round(l * 1e3) / 1e3;
1442
1444
  }
1443
- const o = e.get("image"), a = e.get("aspectRatio");
1444
- if (fetch(o).then((r) => r.blob()).then((r) => {
1445
- r.type.includes("svg") && e.set("noWebp", !0);
1446
- }), o && (!a || a === 0.7041))
1447
- return n(o).then((r) => {
1448
- const l = e.get("aspectRatio");
1449
- e.get("image") === o && (!l || l === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
1445
+ const a = e.get("image"), o = e.get("aspectRatio");
1446
+ if (fetch(a).then((l) => l.blob()).then((l) => {
1447
+ l.type.includes("svg") && e.set("noWebp", !0);
1448
+ }), a && (!o || o === 0.7041))
1449
+ return n(a).then((l) => {
1450
+ const s = e.get("aspectRatio");
1451
+ e.get("image") === a && (!s || s === 0.7041) && l.width && l.height && (e.set("aspectRatio", i(l.height / l.width)), e.set("height", l.height), e.set("width", l.width));
1450
1452
  });
1451
1453
  }
1452
1454
  }, {
@@ -1504,7 +1506,7 @@ const pt = {
1504
1506
  advanced: !0,
1505
1507
  defaultValue: 0.7041
1506
1508
  }]
1507
- }, Ct = {
1509
+ }, It = {
1508
1510
  // friendlyName?
1509
1511
  name: "Raw:Img",
1510
1512
  hideFromInsertMenu: !0,
@@ -1519,8 +1521,8 @@ const pt = {
1519
1521
  noWrap: !0,
1520
1522
  static: !0
1521
1523
  };
1522
- function wt(e) {
1523
- return /* @__PURE__ */ s(
1524
+ function Tt(e) {
1525
+ return /* @__PURE__ */ r(
1524
1526
  "img",
1525
1527
  {
1526
1528
  style: {
@@ -1531,10 +1533,10 @@ function wt(e) {
1531
1533
  src: e.imgSrc || e.image,
1532
1534
  ...e.attributes
1533
1535
  },
1534
- V() && e.imgSrc || "default-key"
1536
+ $() && e.imgSrc || "default-key"
1535
1537
  );
1536
1538
  }
1537
- const It = {
1539
+ const Rt = {
1538
1540
  name: "Core:Section",
1539
1541
  static: !0,
1540
1542
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1573,7 +1575,7 @@ const It = {
1573
1575
  }
1574
1576
  }
1575
1577
  }]
1576
- }, Tt = {
1578
+ }, Et = {
1577
1579
  name: "Symbol",
1578
1580
  noWrap: !0,
1579
1581
  static: !0,
@@ -1606,7 +1608,7 @@ const It = {
1606
1608
  hideFromUI: !0,
1607
1609
  type: "boolean"
1608
1610
  }]
1609
- }, Rt = {
1611
+ }, Pt = {
1610
1612
  name: "Text",
1611
1613
  static: !0,
1612
1614
  isRSC: !0,
@@ -1625,9 +1627,9 @@ const It = {
1625
1627
  textAlign: "center"
1626
1628
  }
1627
1629
  };
1628
- function Et(e) {
1630
+ function Vt(e) {
1629
1631
  var t;
1630
- return /* @__PURE__ */ s(
1632
+ return /* @__PURE__ */ r(
1631
1633
  "div",
1632
1634
  {
1633
1635
  className: "builder-text",
@@ -1638,7 +1640,7 @@ function Et(e) {
1638
1640
  }
1639
1641
  );
1640
1642
  }
1641
- const Pt = {
1643
+ const At = {
1642
1644
  name: "Video",
1643
1645
  canHaveChildren: !0,
1644
1646
  defaultStyles: {
@@ -1721,7 +1723,7 @@ const Pt = {
1721
1723
  }]
1722
1724
  };
1723
1725
  function Bt(e) {
1724
- var i;
1726
+ var i, a, o, l, s, c, d;
1725
1727
  function t() {
1726
1728
  return {
1727
1729
  ...e.autoPlay === !0 ? {
@@ -1743,165 +1745,236 @@ function Bt(e) {
1743
1745
  }
1744
1746
  function n() {
1745
1747
  return {
1746
- ...e.attributes,
1747
1748
  ...t()
1748
1749
  };
1749
1750
  }
1750
- return /* @__PURE__ */ s(
1751
- "video",
1751
+ return /* @__PURE__ */ T(
1752
+ "div",
1752
1753
  {
1753
- ...n(),
1754
- preload: e.preload || "metadata",
1755
1754
  style: {
1756
- width: "100%",
1757
- height: "100%",
1758
- ...(i = e.attributes) == null ? void 0 : i.style,
1759
- objectFit: e.fit,
1760
- objectPosition: e.position,
1761
- // Hack to get object fit to work as expected and
1762
- // not have the video overflow
1763
- borderRadius: 1
1755
+ position: "relative"
1764
1756
  },
1765
- src: e.video || "no-src",
1766
- poster: e.posterImage
1757
+ children: [
1758
+ /* @__PURE__ */ r(
1759
+ "video",
1760
+ {
1761
+ className: "builder-video",
1762
+ ...n(),
1763
+ preload: e.preload || "metadata",
1764
+ style: {
1765
+ width: "100%",
1766
+ height: "100%",
1767
+ ...(i = e.attributes) == null ? void 0 : i.style,
1768
+ objectFit: e.fit,
1769
+ objectPosition: e.position,
1770
+ // Hack to get object fit to work as expected and
1771
+ // not have the video overflow
1772
+ zIndex: 2,
1773
+ borderRadius: "1px",
1774
+ ...e.aspectRatio ? {
1775
+ position: "absolute"
1776
+ } : null
1777
+ },
1778
+ src: e.video || "no-src",
1779
+ poster: e.posterImage,
1780
+ children: e.lazyLoad ? null : /* @__PURE__ */ r("source", { type: "video/mp4", src: e.video })
1781
+ }
1782
+ ),
1783
+ e.aspectRatio && !(e.fitContent && ((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length)) ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
1784
+ "div",
1785
+ {
1786
+ style: {
1787
+ width: "100%",
1788
+ paddingTop: e.aspectRatio * 100 + "%",
1789
+ pointerEvents: "none",
1790
+ fontSize: "0px"
1791
+ }
1792
+ }
1793
+ ) }) : null,
1794
+ (s = (l = e.builderBlock) == null ? void 0 : l.children) != null && s.length && e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
1795
+ "div",
1796
+ {
1797
+ style: {
1798
+ display: "flex",
1799
+ flexDirection: "column",
1800
+ alignItems: "stretch"
1801
+ },
1802
+ children: e.children
1803
+ }
1804
+ ) }) : null,
1805
+ (d = (c = e.builderBlock) == null ? void 0 : c.children) != null && d.length && !e.fitContent ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
1806
+ "div",
1807
+ {
1808
+ style: {
1809
+ pointerEvents: "none",
1810
+ display: "flex",
1811
+ flexDirection: "column",
1812
+ alignItems: "stretch",
1813
+ position: "absolute",
1814
+ top: "0",
1815
+ left: "0",
1816
+ width: "100%",
1817
+ height: "100%"
1818
+ },
1819
+ children: e.children
1820
+ }
1821
+ ) }) : null
1822
+ ]
1767
1823
  }
1768
1824
  );
1769
1825
  }
1770
- const he = () => [{
1826
+ const be = () => [{
1771
1827
  component: je,
1772
- ...ft
1773
- }, {
1774
- component: lt,
1775
- ...ht
1776
- }, {
1777
- component: bt,
1778
1828
  ...gt
1779
1829
  }, {
1780
- component: vt,
1781
- ...xt
1830
+ component: st,
1831
+ ...bt
1782
1832
  }, {
1783
- component: ct,
1784
- ...pt
1833
+ component: yt,
1834
+ ...xt
1785
1835
  }, {
1786
- component: ut,
1787
- ...kt
1836
+ component: kt,
1837
+ ...St
1788
1838
  }, {
1789
- component: wt,
1839
+ component: dt,
1790
1840
  ...Ct
1791
1841
  }, {
1792
- component: mt,
1793
- ...It
1842
+ component: ft,
1843
+ ...wt
1794
1844
  }, {
1795
- component: Xt,
1796
- ...Tt
1845
+ component: Tt,
1846
+ ...It
1797
1847
  }, {
1798
- component: Et,
1848
+ component: ht,
1799
1849
  ...Rt
1800
1850
  }, {
1801
- component: Bt,
1851
+ component: en,
1852
+ ...Et
1853
+ }, {
1854
+ component: Vt,
1802
1855
  ...Pt
1803
- }], L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1804
- ...t,
1805
- testVariationId: t.id,
1806
- id: e == null ? void 0 : e.id
1807
- })), $t = ({
1808
- canTrack: e,
1809
- content: t
1810
- }) => !(!(L(t).length > 0) || !e || F());
1811
- function At(e, t, n) {
1812
- var r;
1813
- function i() {
1814
- function l(b, S, C) {
1815
- let w = "";
1816
- if (C) {
1817
- const x = /* @__PURE__ */ new Date();
1818
- x.setTime(x.getTime() + C * 24 * 60 * 60 * 1e3), w = "; expires=" + x.toUTCString();
1856
+ }, {
1857
+ component: Bt,
1858
+ ...At
1859
+ }], $t = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1860
+ function getAndSetVariantId() {
1861
+ function setCookie(name, value, days) {
1862
+ let expires = '';
1863
+ if (days) {
1864
+ const date = new Date();
1865
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
1866
+ expires = '; expires=' + date.toUTCString();
1819
1867
  }
1820
- document.cookie = b + "=" + (S || "") + w + "; path=/; Secure; SameSite=None";
1868
+ document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
1821
1869
  }
1822
- function c(b) {
1823
- const S = b + "=", C = document.cookie.split(";");
1824
- for (let w = 0; w < C.length; w++) {
1825
- let x = C[w];
1826
- for (; x.charAt(0) === " "; )
1827
- x = x.substring(1, x.length);
1828
- if (x.indexOf(S) === 0)
1829
- return x.substring(S.length, x.length);
1870
+ function getCookie(name) {
1871
+ const nameEQ = name + '=';
1872
+ const ca = document.cookie.split(';');
1873
+ for (let i = 0; i < ca.length; i++) {
1874
+ let c = ca[i];
1875
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
1876
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
1830
1877
  }
1831
1878
  return null;
1832
1879
  }
1833
- const d = `builder.tests.${e}`, u = c(d), h = t.map((b) => b.id).concat(e);
1834
- if (u && h.includes(u))
1835
- return u;
1836
- let y = 0;
1837
- const k = Math.random();
1838
- for (let b = 0; b < t.length; b++) {
1839
- const S = t[b], C = S.testRatio;
1840
- if (y += C, k < y)
1841
- return l(d, S.id), S.id;
1880
+ const cookieName = \`builder.tests.\${contentId}\`;
1881
+ const variantInCookie = getCookie(cookieName);
1882
+ const availableIDs = variants.map(vr => vr.id).concat(contentId);
1883
+ if (variantInCookie && availableIDs.includes(variantInCookie)) {
1884
+ return variantInCookie;
1885
+ }
1886
+ let n = 0;
1887
+ const random = Math.random();
1888
+ for (let i = 0; i < variants.length; i++) {
1889
+ const variant = variants[i];
1890
+ const testRatio = variant.testRatio;
1891
+ n += testRatio;
1892
+ if (random < n) {
1893
+ setCookie(cookieName, variant.id);
1894
+ return variant.id;
1895
+ }
1842
1896
  }
1843
- return l(d, e), e;
1897
+ setCookie(cookieName, contentId);
1898
+ return contentId;
1844
1899
  }
1845
- const o = i(), a = (r = document.currentScript) == null ? void 0 : r.previousElementSibling;
1846
- if (n) {
1847
- a.remove();
1848
- const l = document.currentScript;
1849
- l == null || l.remove();
1900
+ const winningVariantId = getAndSetVariantId();
1901
+ const styleEl = document.currentScript?.previousElementSibling;
1902
+ if (isHydrationTarget) {
1903
+ styleEl.remove();
1904
+ const thisScriptEl = document.currentScript;
1905
+ thisScriptEl?.remove();
1850
1906
  } else {
1851
- const l = t.concat({
1852
- id: e
1853
- }).filter((c) => c.id !== o).map((c) => `.variant-${c.id} { display: none; }
1854
- `).join("");
1855
- a.innerHTML = l;
1907
+ const newStyleStr = variants.concat({
1908
+ id: contentId
1909
+ }).filter(variant => variant.id !== winningVariantId).map(value => {
1910
+ return \`.variant-\${value.id} { display: none; }
1911
+ \`;
1912
+ }).join('');
1913
+ styleEl.innerHTML = newStyleStr;
1856
1914
  }
1857
- }
1858
- function Vt(e, t, n) {
1859
- var c;
1860
- if (!navigator.cookieEnabled)
1915
+ }`, Nt = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
1916
+ if (!navigator.cookieEnabled) {
1861
1917
  return;
1862
- function i(d) {
1863
- const u = d + "=", h = document.cookie.split(";");
1864
- for (let y = 0; y < h.length; y++) {
1865
- let k = h[y];
1866
- for (; k.charAt(0) === " "; )
1867
- k = k.substring(1, k.length);
1868
- if (k.indexOf(u) === 0)
1869
- return k.substring(u.length, k.length);
1918
+ }
1919
+ function getCookie(name) {
1920
+ const nameEQ = name + '=';
1921
+ const ca = document.cookie.split(';');
1922
+ for (let i = 0; i < ca.length; i++) {
1923
+ let c = ca[i];
1924
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
1925
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
1870
1926
  }
1871
1927
  return null;
1872
1928
  }
1873
- const o = `builder.tests.${t}`, a = i(o), r = (c = document.currentScript) == null ? void 0 : c.parentElement, l = e === t;
1874
- if (a === e) {
1875
- if (l)
1876
- return;
1877
- r == null || r.removeAttribute("hidden"), r == null || r.removeAttribute("aria-hidden");
1878
- } else {
1879
- l && (n ? r == null || r.remove() : (r == null || r.setAttribute("hidden", "true"), r == null || r.setAttribute("aria-hidden", "true")));
1880
- return;
1929
+ const cookieName = \`builder.tests.\${defaultContentId}\`;
1930
+ const winningVariant = getCookie(cookieName);
1931
+ const parentDiv = document.currentScript?.parentElement;
1932
+ const isDefaultContent = variantContentId === defaultContentId;
1933
+ const isWinningVariant = winningVariant === variantContentId;
1934
+ if (isWinningVariant && !isDefaultContent) {
1935
+ parentDiv?.removeAttribute('hidden');
1936
+ parentDiv?.removeAttribute('aria-hidden');
1937
+ } else if (!isWinningVariant && isDefaultContent) {
1938
+ parentDiv?.setAttribute('hidden', 'true');
1939
+ parentDiv?.setAttribute('aria-hidden', 'true');
1881
1940
  }
1882
- }
1883
- const Ft = (e) => e === "react" || e === "reactNative", Te = Ft(M), Re = "builderIoAbTest", Ee = "builderIoRenderContent", Nt = () => {
1884
- const e = At.toString().replace(/\s+/g, " "), t = Vt.toString().replace(/\s+/g, " ");
1885
- return `
1886
- window.${Re} = ${e}
1887
- window.${Ee} = ${t}
1888
- `;
1889
- }, Wt = (e, t) => `
1890
- window.${Re}("${t}",${JSON.stringify(e)}, ${Te})`, jt = ({
1941
+ if (isHydrationTarget) {
1942
+ if (!isWinningVariant) {
1943
+ parentDiv?.remove();
1944
+ }
1945
+ const thisScriptEl = document.currentScript;
1946
+ thisScriptEl?.remove();
1947
+ }
1948
+ return;
1949
+ }`, Ee = "builderIoAbTest", Pe = "builderIoRenderContent", j = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
1950
+ ...t,
1951
+ testVariationId: t.id,
1952
+ id: e == null ? void 0 : e.id
1953
+ })), Ft = ({
1954
+ canTrack: e,
1955
+ content: t
1956
+ }) => !(!(j(t).length > 0) || !e || N()), Wt = (e) => e === "react" || e === "reactNative", Ve = Wt(L), _t = () => `
1957
+ window.${Ee} = ${$t}
1958
+ window.${Pe} = ${Nt}
1959
+ `, Lt = (e, t) => `
1960
+ window.${Ee}(
1961
+ "${t}",${JSON.stringify(e)}, ${Ve}
1962
+ )`, jt = ({
1891
1963
  contentId: e,
1892
1964
  variationId: t
1893
- }) => `
1894
- window.${Ee}("${t}", "${e}", ${Te})`;
1965
+ }) => `window.${Pe}(
1966
+ "${t}", "${e}", ${Ve}
1967
+ )`;
1895
1968
  function X(e) {
1896
- return /* @__PURE__ */ s(
1969
+ return /* @__PURE__ */ r(
1897
1970
  "script",
1898
1971
  {
1899
1972
  dangerouslySetInnerHTML: { __html: e.scriptStr },
1900
- id: e.id
1973
+ id: e.id || ""
1901
1974
  }
1902
1975
  );
1903
1976
  }
1904
- function ge(e) {
1977
+ function xe(e) {
1905
1978
  return Math.round(e * 1e3) / 1e3;
1906
1979
  }
1907
1980
  const Mt = (e, t, n = !0) => {
@@ -1915,36 +1988,36 @@ const Mt = (e, t, n = !0) => {
1915
1988
  return i;
1916
1989
  } while (i = i.parentElement);
1917
1990
  return null;
1918
- }, Lt = (e) => Mt(e, (t) => {
1991
+ }, Ut = (e) => Mt(e, (t) => {
1919
1992
  const n = t.getAttribute("builder-id") || t.id;
1920
1993
  return (n == null ? void 0 : n.indexOf("builder-")) === 0;
1921
- }), be = ({
1994
+ }), ye = ({
1922
1995
  event: e,
1923
1996
  target: t
1924
1997
  }) => {
1925
- const n = t.getBoundingClientRect(), i = e.clientX - n.left, o = e.clientY - n.top, a = ge(i / n.width), r = ge(o / n.height);
1998
+ const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = xe(i / n.width), l = xe(a / n.height);
1926
1999
  return {
1927
- x: a,
1928
- y: r
2000
+ x: o,
2001
+ y: l
1929
2002
  };
1930
- }, _t = (e) => {
1931
- const t = e.target, n = t && Lt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2003
+ }, Dt = (e) => {
2004
+ const t = e.target, n = t && Ut(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
1932
2005
  return {
1933
2006
  targetBuilderElement: i || void 0,
1934
2007
  metadata: {
1935
- targetOffset: t ? be({
2008
+ targetOffset: t ? ye({
1936
2009
  event: e,
1937
2010
  target: t
1938
2011
  }) : void 0,
1939
- builderTargetOffset: n ? be({
2012
+ builderTargetOffset: n ? ye({
1940
2013
  event: e,
1941
2014
  target: n
1942
2015
  }) : void 0,
1943
2016
  builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
1944
2017
  }
1945
2018
  };
1946
- }, Ut = "0.7.3", Ot = () => {
1947
- Ae("insertMenu", {
2019
+ }, Ot = "0.7.5", Kt = () => {
2020
+ Ne("insertMenu", {
1948
2021
  name: "_default",
1949
2022
  default: !0,
1950
2023
  items: [{
@@ -1966,14 +2039,14 @@ const Mt = (e, t, n = !0) => {
1966
2039
  }]
1967
2040
  });
1968
2041
  };
1969
- let xe = !1;
1970
- const Kt = (e = {}) => {
2042
+ let Se = !1;
2043
+ const Ht = (e = {}) => {
1971
2044
  var t, n;
1972
- xe || (xe = !0, F() && ((t = window.parent) == null || t.postMessage({
2045
+ Se || (Se = !0, N() && ((t = window.parent) == null || t.postMessage({
1973
2046
  type: "builder.sdkInfo",
1974
2047
  data: {
1975
- target: M,
1976
- version: Ut,
2048
+ target: L,
2049
+ version: Ot,
1977
2050
  supportsPatchUpdates: !1,
1978
2051
  // Supports builder-model="..." attribute which is needed to
1979
2052
  // scope our '+ add block' button styling
@@ -1988,33 +2061,33 @@ const Kt = (e = {}) => {
1988
2061
  }, "*"), window.addEventListener("message", ({
1989
2062
  data: i
1990
2063
  }) => {
1991
- var o, a;
2064
+ var a, o;
1992
2065
  if (i != null && i.type)
1993
2066
  switch (i.type) {
1994
2067
  case "builder.evaluate": {
1995
- const r = i.data.text, l = i.data.arguments || [], c = i.data.id, d = new Function(r);
1996
- let u, h = null;
2068
+ const l = i.data.text, s = i.data.arguments || [], c = i.data.id, d = new Function(l);
2069
+ let u, g = null;
1997
2070
  try {
1998
- u = d.apply(null, l);
1999
- } catch (y) {
2000
- h = y;
2071
+ u = d.apply(null, s);
2072
+ } catch (v) {
2073
+ g = v;
2001
2074
  }
2002
- h ? (o = window.parent) == null || o.postMessage({
2075
+ g ? (a = window.parent) == null || a.postMessage({
2003
2076
  type: "builder.evaluateError",
2004
2077
  data: {
2005
2078
  id: c,
2006
- error: h.message
2079
+ error: g.message
2007
2080
  }
2008
- }, "*") : u && typeof u.then == "function" ? u.then((y) => {
2009
- var k;
2010
- (k = window.parent) == null || k.postMessage({
2081
+ }, "*") : u && typeof u.then == "function" ? u.then((v) => {
2082
+ var V;
2083
+ (V = window.parent) == null || V.postMessage({
2011
2084
  type: "builder.evaluateResult",
2012
2085
  data: {
2013
2086
  id: c,
2014
- result: y
2087
+ result: v
2015
2088
  }
2016
2089
  }, "*");
2017
- }).catch(console.error) : (a = window.parent) == null || a.postMessage({
2090
+ }).catch(console.error) : (o = window.parent) == null || o.postMessage({
2018
2091
  type: "builder.evaluateResult",
2019
2092
  data: {
2020
2093
  result: u,
@@ -2026,60 +2099,60 @@ const Kt = (e = {}) => {
2026
2099
  }
2027
2100
  })));
2028
2101
  };
2029
- function Ht(e) {
2030
- var $, A, N, W, q;
2031
- const t = Z(null), [n, i] = I(() => 0);
2032
- function o(m) {
2033
- var v, p, T, E, oe;
2034
- const f = {
2102
+ function zt(e) {
2103
+ var A, B, F, W, z, ae, oe;
2104
+ const t = Z(null), [n, i] = p(() => 0);
2105
+ function a(m) {
2106
+ var x, y, k, I, re;
2107
+ const h = {
2035
2108
  ...e.builderContextSignal.content,
2036
2109
  ...m,
2037
2110
  data: {
2038
- ...(v = e.builderContextSignal.content) == null ? void 0 : v.data,
2111
+ ...(x = e.builderContextSignal.content) == null ? void 0 : x.data,
2039
2112
  ...m == null ? void 0 : m.data
2040
2113
  },
2041
2114
  meta: {
2042
- ...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
2115
+ ...(y = e.builderContextSignal.content) == null ? void 0 : y.meta,
2043
2116
  ...m == null ? void 0 : m.meta,
2044
- breakpoints: ((T = m == null ? void 0 : m.meta) == null ? void 0 : T.breakpoints) || ((oe = (E = e.builderContextSignal.content) == null ? void 0 : E.meta) == null ? void 0 : oe.breakpoints)
2117
+ breakpoints: ((k = m == null ? void 0 : m.meta) == null ? void 0 : k.breakpoints) || ((re = (I = e.builderContextSignal.content) == null ? void 0 : I.meta) == null ? void 0 : re.breakpoints)
2045
2118
  }
2046
2119
  };
2047
2120
  e.setBuilderContextSignal((Be) => ({
2048
2121
  ...Be,
2049
- content: f
2122
+ content: h
2050
2123
  }));
2051
2124
  }
2052
- I(() => 0);
2053
- const [a, r] = I(
2125
+ p(() => 0);
2126
+ const [o, l] = p(
2054
2127
  () => !1
2055
2128
  );
2056
- function l(m) {
2057
- var v;
2058
- const { data: f } = m;
2059
- if (f)
2060
- switch (f.type) {
2129
+ function s(m) {
2130
+ var x;
2131
+ const { data: h } = m;
2132
+ if (h)
2133
+ switch (h.type) {
2061
2134
  case "builder.configureSdk": {
2062
- const p = f.data, { breakpoints: T, contentId: E } = p;
2063
- if (!E || E !== ((v = e.builderContextSignal.content) == null ? void 0 : v.id))
2135
+ const y = h.data, { breakpoints: k, contentId: I } = y;
2136
+ if (!I || I !== ((x = e.builderContextSignal.content) == null ? void 0 : x.id))
2064
2137
  return;
2065
- T && o({
2138
+ k && a({
2066
2139
  meta: {
2067
- breakpoints: T
2140
+ breakpoints: k
2068
2141
  }
2069
2142
  }), i(n + 1);
2070
2143
  break;
2071
2144
  }
2072
2145
  case "builder.contentUpdate": {
2073
- const p = f.data, T = p.key || p.alias || p.entry || p.modelName, E = p.data;
2074
- T === e.model && (o(E), i(n + 1));
2146
+ const y = h.data, k = y.key || y.alias || y.entry || y.modelName, I = y.data;
2147
+ k === e.model && (a(I), i(n + 1));
2075
2148
  break;
2076
2149
  }
2077
2150
  }
2078
2151
  }
2079
2152
  function c() {
2080
- var f, v;
2081
- const m = (v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.jsCode;
2082
- m && j({
2153
+ var h, x;
2154
+ const m = (x = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : x.jsCode;
2155
+ m && _({
2083
2156
  code: m,
2084
2157
  context: e.context || {},
2085
2158
  localState: void 0,
@@ -2087,28 +2160,28 @@ function Ht(e) {
2087
2160
  rootSetState: e.builderContextSignal.rootSetState
2088
2161
  });
2089
2162
  }
2090
- const [d, u] = I(() => ({})), [h, y] = I(() => !1);
2091
- function k(m) {
2092
- var f, v;
2163
+ const [d, u] = p(() => ({})), [g, v] = p(() => !1);
2164
+ function V(m) {
2165
+ var h, x;
2093
2166
  if (e.builderContextSignal.content) {
2094
- const p = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId, T = (v = e.builderContextSignal.content) == null ? void 0 : v.id;
2095
- re({
2167
+ const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, k = (x = e.builderContextSignal.content) == null ? void 0 : x.id;
2168
+ ce({
2096
2169
  type: "click",
2097
2170
  canTrack: U(e.canTrack),
2098
- contentId: T,
2171
+ contentId: k,
2099
2172
  apiKey: e.apiKey,
2100
- variationId: p !== T ? p : void 0,
2101
- ..._t(m),
2102
- unique: !h
2173
+ variationId: y !== k ? y : void 0,
2174
+ ...Dt(m),
2175
+ unique: !g
2103
2176
  });
2104
2177
  }
2105
- h || y(!0);
2178
+ g || v(!0);
2106
2179
  }
2107
2180
  function b(m) {
2108
2181
  return m.replace(
2109
2182
  /{{([^}]+)}}/g,
2110
- (f, v) => j({
2111
- code: v,
2183
+ (h, x) => _({
2184
+ code: x,
2112
2185
  context: e.context || {},
2113
2186
  localState: void 0,
2114
2187
  rootState: e.builderContextSignal.rootState,
@@ -2116,33 +2189,33 @@ function Ht(e) {
2116
2189
  })
2117
2190
  );
2118
2191
  }
2119
- function S({ url: m, key: f }) {
2120
- Ne(m).then((v) => v.json()).then((v) => {
2121
- var T, E;
2122
- const p = {
2192
+ function S({ url: m, key: h }) {
2193
+ _e(m).then((x) => x.json()).then((x) => {
2194
+ var k, I;
2195
+ const y = {
2123
2196
  ...e.builderContextSignal.rootState,
2124
- [f]: v
2197
+ [h]: x
2125
2198
  };
2126
- (E = (T = e.builderContextSignal).rootSetState) == null || E.call(T, p), d[f] = !0;
2127
- }).catch((v) => {
2128
- console.error("error fetching dynamic data", m, v);
2199
+ (I = (k = e.builderContextSignal).rootSetState) == null || I.call(k, y), d[h] = !0;
2200
+ }).catch((x) => {
2201
+ console.error("error fetching dynamic data", m, x);
2129
2202
  });
2130
2203
  }
2131
- function C() {
2132
- var f, v;
2133
- const m = ((v = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : v.httpRequests) ?? {};
2134
- Object.entries(m).forEach(([p, T]) => {
2135
- if (T && (!d[p] || V())) {
2136
- const E = b(T);
2204
+ function E() {
2205
+ var h, x;
2206
+ const m = ((x = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : x.httpRequests) ?? {};
2207
+ Object.entries(m).forEach(([y, k]) => {
2208
+ if (k && (!d[y] || $())) {
2209
+ const I = b(k);
2137
2210
  S({
2138
- url: E,
2139
- key: p
2211
+ url: I,
2212
+ key: y
2140
2213
  });
2141
2214
  }
2142
2215
  });
2143
2216
  }
2144
- function w() {
2145
- V() && window.dispatchEvent(
2217
+ function R() {
2218
+ $() && window.dispatchEvent(
2146
2219
  new CustomEvent(
2147
2220
  "builder:component:stateChange",
2148
2221
  {
@@ -2156,8 +2229,8 @@ function Ht(e) {
2156
2229
  )
2157
2230
  );
2158
2231
  }
2159
- function x(m) {
2160
- i(n + 1), window.addEventListener("message", l), Ot(), Kt({
2232
+ function C(m) {
2233
+ i(n + 1), window.addEventListener("message", s), Kt(), Ht({
2161
2234
  ...e.locale ? {
2162
2235
  locale: e.locale
2163
2236
  } : {},
@@ -2169,109 +2242,109 @@ function Ht(e) {
2169
2242
  } : {}
2170
2243
  }), Object.values(
2171
2244
  e.builderContextSignal.componentInfos
2172
- ).forEach((f) => {
2173
- var p;
2174
- const v = Fe(f);
2175
- (p = window.parent) == null || p.postMessage(v, "*");
2245
+ ).forEach((h) => {
2246
+ var y;
2247
+ const x = We(h);
2248
+ (y = window.parent) == null || y.postMessage(x, "*");
2176
2249
  }), window.addEventListener(
2177
2250
  "builder:component:stateChangeListenerActivated",
2178
- w
2251
+ R
2179
2252
  );
2180
2253
  }
2181
- function R(m) {
2182
- const f = new URL(location.href).searchParams, v = f.get("builder.preview"), p = f.get(
2183
- `builder.preview.${v}`
2184
- ), T = f.get("apiKey") || f.get("builder.space");
2185
- v === e.model && T === e.apiKey && (!e.content || p === e.content.id) && pe({
2254
+ function w(m) {
2255
+ const h = new URL(location.href).searchParams, x = h.get("builder.preview"), y = h.get(
2256
+ `builder.preview.${x}`
2257
+ ), k = h.get("apiKey") || h.get("builder.space");
2258
+ x === e.model && k === e.apiKey && (!e.content || y === e.content.id) && Ce({
2186
2259
  model: e.model,
2187
2260
  apiKey: e.apiKey,
2188
2261
  apiVersion: e.builderContextSignal.apiVersion
2189
- }).then((E) => {
2190
- E && o(E);
2262
+ }).then((I) => {
2263
+ I && a(I);
2191
2264
  });
2192
2265
  }
2193
- return B(() => {
2266
+ return P(() => {
2194
2267
  var m;
2195
2268
  return (m = t.current) == null || m.addEventListener(
2196
2269
  "initeditingbldr",
2197
- x
2270
+ C
2198
2271
  ), () => {
2199
- var f;
2200
- return (f = t.current) == null ? void 0 : f.removeEventListener(
2272
+ var h;
2273
+ return (h = t.current) == null ? void 0 : h.removeEventListener(
2201
2274
  "initeditingbldr",
2202
- x
2275
+ C
2203
2276
  );
2204
2277
  };
2205
- }, []), B(() => {
2278
+ }, []), P(() => {
2206
2279
  var m;
2207
2280
  return (m = t.current) == null || m.addEventListener(
2208
2281
  "initpreviewingbldr",
2209
- R
2282
+ w
2210
2283
  ), () => {
2211
- var f;
2212
- return (f = t.current) == null ? void 0 : f.removeEventListener(
2284
+ var h;
2285
+ return (h = t.current) == null ? void 0 : h.removeEventListener(
2213
2286
  "initpreviewingbldr",
2214
- R
2287
+ w
2215
2288
  );
2216
2289
  };
2217
- }, []), B(() => {
2218
- var m, f;
2219
- if (F()) {
2220
- if (V() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
2221
- const p = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, T = (f = e.builderContextSignal.content) == null ? void 0 : f.id, E = e.apiKey;
2222
- re({
2290
+ }, []), P(() => {
2291
+ var m, h;
2292
+ if (N()) {
2293
+ if ($() && t.current && t.current.dispatchEvent(new CustomEvent("initeditingbldr")), e.builderContextSignal.content && U(e.canTrack)) {
2294
+ const y = (m = e.builderContextSignal.content) == null ? void 0 : m.testVariationId, k = (h = e.builderContextSignal.content) == null ? void 0 : h.id, I = e.apiKey;
2295
+ ce({
2223
2296
  type: "impression",
2224
2297
  canTrack: !0,
2225
- contentId: T,
2226
- apiKey: E,
2227
- variationId: p !== T ? p : void 0
2298
+ contentId: k,
2299
+ apiKey: I,
2300
+ variationId: y !== k ? y : void 0
2228
2301
  });
2229
2302
  }
2230
- Ve() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2303
+ Fe() && t.current && t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"));
2231
2304
  }
2232
- }, []), B(() => {
2233
- e.apiKey || _.error(
2305
+ }, []), P(() => {
2306
+ e.apiKey || M.error(
2234
2307
  "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2235
- ), c(), C(), w();
2236
- }, []), B(() => {
2237
- e.content && o(e.content);
2238
- }, [e.content]), B(() => {
2239
- }, [a]), B(() => {
2308
+ ), c(), E(), R();
2309
+ }, []), P(() => {
2310
+ e.content && a(e.content);
2311
+ }, [e.content]), P(() => {
2312
+ }, [o]), P(() => {
2240
2313
  c();
2241
2314
  }, [
2242
- (A = ($ = e.builderContextSignal.content) == null ? void 0 : $.data) == null ? void 0 : A.jsCode,
2315
+ (B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
2243
2316
  e.builderContextSignal.rootState
2244
- ]), B(() => {
2245
- C();
2246
- }, [(W = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : W.httpRequests]), B(() => {
2247
- w();
2248
- }, [e.builderContextSignal.rootState]), B(() => () => {
2249
- F() && (window.removeEventListener("message", l), window.removeEventListener(
2317
+ ]), P(() => {
2318
+ E();
2319
+ }, [(W = (F = e.builderContextSignal.content) == null ? void 0 : F.data) == null ? void 0 : W.httpRequests]), P(() => {
2320
+ R();
2321
+ }, [e.builderContextSignal.rootState]), P(() => () => {
2322
+ N() && (window.removeEventListener("message", s), window.removeEventListener(
2250
2323
  "builder:component:stateChangeListenerActivated",
2251
- w
2324
+ R
2252
2325
  ));
2253
- }, []), /* @__PURE__ */ s(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ ve(
2326
+ }, []), /* @__PURE__ */ r(te.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ ke(
2254
2327
  "div",
2255
2328
  {
2256
2329
  key: n,
2257
2330
  ref: t,
2258
- onClick: (m) => k(m),
2259
- "builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
2331
+ onClick: (m) => V(m),
2332
+ "builder-content-id": (z = e.builderContextSignal.content) == null ? void 0 : z.id,
2260
2333
  "builder-model": e.model,
2261
2334
  ...e.showContent ? {} : {
2262
2335
  hidden: !0,
2263
2336
  "aria-hidden": !0
2264
2337
  },
2265
- className: e.classNameProp
2338
+ className: `variant-${((ae = e.content) == null ? void 0 : ae.testVariationId) || ((oe = e.content) == null ? void 0 : oe.id)}`
2266
2339
  },
2267
2340
  e.children
2268
2341
  ) }) : null });
2269
2342
  }
2270
- const zt = (e) => {
2271
- var a;
2272
- const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((a = e == null ? void 0 : e.files) == null ? void 0 : a.regular);
2273
- let o = "";
2274
- if (i && t && n && (o += `
2343
+ const qt = (e) => {
2344
+ var o;
2345
+ 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);
2346
+ let a = "";
2347
+ if (i && t && n && (a += `
2275
2348
  @font-face {
2276
2349
  font-family: "${t}";
2277
2350
  src: local("${n}"), url('${i}') format('woff2');
@@ -2279,37 +2352,37 @@ font-display: fallback;
2279
2352
  font-weight: 400;
2280
2353
  }
2281
2354
  `.trim()), e.files)
2282
- for (const r in e.files) {
2283
- if (!(String(Number(r)) === r))
2355
+ for (const l in e.files) {
2356
+ if (!(String(Number(l)) === l))
2284
2357
  continue;
2285
- const c = e.files[r];
2286
- c && c !== i && (o += `
2358
+ const c = e.files[l];
2359
+ c && c !== i && (a += `
2287
2360
  @font-face {
2288
2361
  font-family: "${t}";
2289
2362
  src: url('${c}') format('woff2');
2290
2363
  font-display: fallback;
2291
- font-weight: ${r};
2364
+ font-weight: ${l};
2292
2365
  }
2293
2366
  `.trim());
2294
2367
  }
2295
- return o;
2296
- }, qt = ({
2368
+ return a;
2369
+ }, Yt = ({
2297
2370
  customFonts: e
2298
2371
  }) => {
2299
2372
  var t;
2300
- return ((t = e == null ? void 0 : e.map((n) => zt(n))) == null ? void 0 : t.join(" ")) || "";
2301
- }, Dt = ({
2373
+ return ((t = e == null ? void 0 : e.map((n) => qt(n))) == null ? void 0 : t.join(" ")) || "";
2374
+ }, Qt = ({
2302
2375
  cssCode: e,
2303
2376
  contentId: t
2304
2377
  }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
2305
2378
  function Gt(e) {
2306
- const [t, n] = I(
2379
+ const [t, n] = p(
2307
2380
  () => `
2308
- ${Dt({
2381
+ ${Qt({
2309
2382
  cssCode: e.cssCode,
2310
2383
  contentId: e.contentId
2311
2384
  })}
2312
- ${qt({
2385
+ ${Yt({
2313
2386
  customFonts: e.customFonts
2314
2387
  })}
2315
2388
 
@@ -2327,31 +2400,26 @@ ${qt({
2327
2400
  }
2328
2401
  `.trim()
2329
2402
  );
2330
- return /* @__PURE__ */ s(H, { styles: t });
2403
+ return /* @__PURE__ */ r(K, { styles: t });
2331
2404
  }
2332
2405
  const Jt = ({
2333
2406
  content: e,
2334
2407
  data: t,
2335
2408
  locale: n
2336
2409
  }) => {
2337
- var a, r, l;
2338
- const i = {};
2339
- (r = (a = e == null ? void 0 : e.data) == null ? void 0 : a.inputs) == null || r.forEach((c) => {
2340
- var d;
2341
- c.name && c.defaultValue !== void 0 && ((d = e == null ? void 0 : e.data) != null && d.state) && e.data.state[c.name] === void 0 && (i[c.name] = c.defaultValue);
2342
- });
2343
- const o = {
2344
- ...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
2410
+ var o, l, s;
2411
+ const i = {}, a = ((o = e == null ? void 0 : e.data) == null ? void 0 : o.state) || {};
2412
+ return (s = (l = e == null ? void 0 : e.data) == null ? void 0 : l.inputs) == null || s.forEach((c) => {
2413
+ c.name && c.defaultValue !== void 0 && (i[c.name] = c.defaultValue);
2414
+ }), {
2415
+ ...i,
2416
+ ...a,
2345
2417
  ...t,
2346
2418
  ...n ? {
2347
2419
  locale: n
2348
2420
  } : {}
2349
2421
  };
2350
- return {
2351
- ...i,
2352
- ...o
2353
- };
2354
- }, Yt = ({
2422
+ }, Xt = ({
2355
2423
  content: e,
2356
2424
  data: t
2357
2425
  }) => e ? {
@@ -2362,47 +2430,47 @@ const Jt = ({
2362
2430
  },
2363
2431
  meta: e == null ? void 0 : e.meta
2364
2432
  } : void 0;
2365
- function ye(e) {
2366
- var c, d, u, h, y, k, b;
2367
- const [t, n] = I(
2433
+ function ve(e) {
2434
+ var c, d, u, g, v, V, b;
2435
+ const [t, n] = p(
2368
2436
  () => {
2369
- var S, C;
2437
+ var S, E;
2370
2438
  return jt({
2371
2439
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2372
2440
  variationId: (S = e.content) == null ? void 0 : S.testVariationId,
2373
2441
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
2374
- contentId: (C = e.content) == null ? void 0 : C.id
2442
+ contentId: (E = e.content) == null ? void 0 : E.id
2375
2443
  });
2376
2444
  }
2377
2445
  );
2378
2446
  function i(S) {
2379
- l((C) => ({
2380
- ...C,
2447
+ s((E) => ({
2448
+ ...E,
2381
2449
  rootState: S
2382
2450
  }));
2383
2451
  }
2384
- const [o, a] = I(
2452
+ const [a, o] = p(
2385
2453
  () => [
2386
- ...he(),
2454
+ ...be(),
2387
2455
  // While this `components` object is deprecated, we must maintain support for it.
2388
2456
  // Since users are able to override our default components, we need to make sure that we do not break such
2389
2457
  // existing usage.
2390
2458
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2391
2459
  // which is the new standard way of providing custom components, and must therefore take precedence.
2392
- ...le,
2460
+ ...se,
2393
2461
  ...e.customComponents || []
2394
2462
  ].reduce(
2395
- (S, { component: C, ...w }) => ({
2463
+ (S, { component: E, ...R }) => ({
2396
2464
  ...S,
2397
- [w.name]: {
2398
- component: C,
2399
- ...ce(w)
2465
+ [R.name]: {
2466
+ component: E,
2467
+ ...de(R)
2400
2468
  }
2401
2469
  }),
2402
2470
  {}
2403
2471
  )
2404
- ), [r, l] = I(() => ({
2405
- content: Yt({
2472
+ ), [l, s] = p(() => ({
2473
+ content: Xt({
2406
2474
  content: e.content,
2407
2475
  data: e.data
2408
2476
  }),
@@ -2417,31 +2485,31 @@ function ye(e) {
2417
2485
  apiKey: e.apiKey,
2418
2486
  apiVersion: e.apiVersion,
2419
2487
  componentInfos: [
2420
- ...he(),
2488
+ ...be(),
2421
2489
  // While this `components` object is deprecated, we must maintain support for it.
2422
2490
  // Since users are able to override our default components, we need to make sure that we do not break such
2423
2491
  // existing usage.
2424
2492
  // This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
2425
2493
  // which is the new standard way of providing custom components, and must therefore take precedence.
2426
- ...le,
2494
+ ...se,
2427
2495
  ...e.customComponents || []
2428
2496
  ].reduce(
2429
- (S, { component: C, ...w }) => ({
2497
+ (S, { component: E, ...R }) => ({
2430
2498
  ...S,
2431
- [w.name]: ce(w)
2499
+ [R.name]: de(R)
2432
2500
  }),
2433
2501
  {}
2434
2502
  ),
2435
2503
  inheritedStyles: {}
2436
2504
  }));
2437
- return /* @__PURE__ */ s(
2438
- ke.Provider,
2505
+ return /* @__PURE__ */ r(
2506
+ we.Provider,
2439
2507
  {
2440
2508
  value: {
2441
- registeredComponents: o
2509
+ registeredComponents: a
2442
2510
  },
2443
- children: /* @__PURE__ */ P(
2444
- Ht,
2511
+ children: /* @__PURE__ */ T(
2512
+ zt,
2445
2513
  {
2446
2514
  content: e.content,
2447
2515
  model: e.model,
@@ -2451,26 +2519,25 @@ function ye(e) {
2451
2519
  locale: e.locale,
2452
2520
  includeRefs: e.includeRefs,
2453
2521
  enrich: e.enrich,
2454
- classNameProp: e.classNameProp,
2455
2522
  showContent: e.showContent,
2456
- builderContextSignal: r,
2457
- setBuilderContextSignal: l,
2523
+ builderContextSignal: l,
2524
+ setBuilderContextSignal: s,
2458
2525
  children: [
2459
- e.isSsrAbTest ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(X, { scriptStr: t }) }) : null,
2460
- /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(
2526
+ e.isSsrAbTest ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: t }) }) : null,
2527
+ /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
2461
2528
  Gt,
2462
2529
  {
2463
- contentId: (c = r.content) == null ? void 0 : c.id,
2464
- cssCode: (u = (d = r.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
2465
- customFonts: (y = (h = r.content) == null ? void 0 : h.data) == null ? void 0 : y.customFonts
2530
+ contentId: (c = l.content) == null ? void 0 : c.id,
2531
+ cssCode: (u = (d = l.content) == null ? void 0 : d.data) == null ? void 0 : u.cssCode,
2532
+ customFonts: (v = (g = l.content) == null ? void 0 : g.data) == null ? void 0 : v.customFonts
2466
2533
  }
2467
2534
  ) }),
2468
- /* @__PURE__ */ s(
2535
+ /* @__PURE__ */ r(
2469
2536
  ie,
2470
2537
  {
2471
- blocks: (b = (k = r.content) == null ? void 0 : k.data) == null ? void 0 : b.blocks,
2472
- context: r,
2473
- registeredComponents: o
2538
+ blocks: (b = (V = l.content) == null ? void 0 : V.data) == null ? void 0 : b.blocks,
2539
+ context: l,
2540
+ registeredComponents: a
2474
2541
  }
2475
2542
  )
2476
2543
  ]
@@ -2479,55 +2546,54 @@ function ye(e) {
2479
2546
  }
2480
2547
  );
2481
2548
  }
2482
- function Pe(e) {
2483
- var r, l, c;
2484
- const [t, n] = I(
2485
- () => $t({
2549
+ function Ae(e) {
2550
+ var l, s;
2551
+ const [t, n] = p(
2552
+ () => Ft({
2486
2553
  canTrack: U(e.canTrack),
2487
2554
  content: e.content
2488
2555
  })
2489
2556
  );
2490
2557
  function i() {
2491
- var d;
2492
- return Wt(
2493
- L(e.content).map((u) => ({
2494
- id: u.testVariationId,
2495
- testRatio: u.testRatio
2558
+ var c;
2559
+ return Lt(
2560
+ j(e.content).map((d) => ({
2561
+ id: d.testVariationId,
2562
+ testRatio: d.testRatio
2496
2563
  })),
2497
- ((d = e.content) == null ? void 0 : d.id) || ""
2564
+ ((c = e.content) == null ? void 0 : c.id) || ""
2498
2565
  );
2499
2566
  }
2500
- function o() {
2501
- return L(e.content).map((d) => `.variant-${d.testVariationId} { display: none; } `).join("");
2502
- }
2503
2567
  function a() {
2504
- var d;
2568
+ return j(e.content).map((c) => `.variant-${c.testVariationId} { display: none; } `).join("");
2569
+ }
2570
+ function o() {
2571
+ var c;
2505
2572
  return t ? {
2506
2573
  ...e.content,
2507
- testVariationId: (d = e.content) == null ? void 0 : d.id
2508
- } : We({
2574
+ testVariationId: (c = e.content) == null ? void 0 : c.id
2575
+ } : Le({
2509
2576
  item: e.content,
2510
2577
  canTrack: U(e.canTrack)
2511
2578
  });
2512
2579
  }
2513
- return B(() => {
2514
- }, []), /* @__PURE__ */ P(g, { children: [
2515
- !e.__isNestedRender && M !== "reactNative" ? /* @__PURE__ */ s(g, { children: /* @__PURE__ */ s(X, { scriptStr: Nt() }) }) : null,
2516
- t ? /* @__PURE__ */ P(g, { children: [
2517
- /* @__PURE__ */ s(
2518
- H,
2580
+ return P(() => {
2581
+ }, []), /* @__PURE__ */ T(f, { children: [
2582
+ !e.__isNestedRender && L !== "reactNative" ? /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(X, { scriptStr: _t() }) }) : null,
2583
+ t ? /* @__PURE__ */ T(f, { children: [
2584
+ /* @__PURE__ */ r(
2585
+ K,
2519
2586
  {
2520
- id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
2521
- styles: o()
2587
+ id: `variants-styles-${(l = e.content) == null ? void 0 : l.id}`,
2588
+ styles: a()
2522
2589
  }
2523
2590
  ),
2524
- /* @__PURE__ */ s(X, { scriptStr: i() }),
2525
- (l = L(e.content)) == null ? void 0 : l.map((d) => /* @__PURE__ */ s(
2526
- ye,
2591
+ /* @__PURE__ */ r(X, { scriptStr: i() }),
2592
+ (s = j(e.content)) == null ? void 0 : s.map((c) => /* @__PURE__ */ r(
2593
+ ve,
2527
2594
  {
2528
- content: d,
2595
+ content: c,
2529
2596
  showContent: !1,
2530
- classNameProp: void 0,
2531
2597
  model: e.model,
2532
2598
  data: e.data,
2533
2599
  context: e.context,
@@ -2540,14 +2606,13 @@ function Pe(e) {
2540
2606
  enrich: e.enrich,
2541
2607
  isSsrAbTest: t
2542
2608
  },
2543
- d.testVariationId
2609
+ c.testVariationId
2544
2610
  ))
2545
2611
  ] }) : null,
2546
- /* @__PURE__ */ s(
2547
- ye,
2612
+ /* @__PURE__ */ r(
2613
+ ve,
2548
2614
  {
2549
- content: a(),
2550
- classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
2615
+ content: o(),
2551
2616
  showContent: !0,
2552
2617
  model: e.model,
2553
2618
  data: e.data,
@@ -2564,13 +2629,13 @@ function Pe(e) {
2564
2629
  )
2565
2630
  ] });
2566
2631
  }
2567
- const Qt = async ({
2632
+ const Zt = async ({
2568
2633
  builderContextValue: e,
2569
2634
  symbol: t
2570
2635
  }) => {
2571
2636
  if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
2572
2637
  (e != null && e.apiKey))
2573
- return pe({
2638
+ return Ce({
2574
2639
  model: t.model,
2575
2640
  apiKey: e.apiKey,
2576
2641
  apiVersion: e.apiVersion,
@@ -2580,11 +2645,11 @@ const Qt = async ({
2580
2645
  }
2581
2646
  }
2582
2647
  }).catch((n) => {
2583
- _.error("Could not fetch symbol content: ", n);
2648
+ M.error("Could not fetch symbol content: ", n);
2584
2649
  });
2585
2650
  };
2586
- function Xt(e) {
2587
- var a, r, l;
2651
+ function en(e) {
2652
+ var o, l, s;
2588
2653
  function t() {
2589
2654
  var c, d;
2590
2655
  return [
@@ -2594,23 +2659,23 @@ function Xt(e) {
2594
2659
  (d = e.symbol) != null && d.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
2595
2660
  ].filter(Boolean).join(" ");
2596
2661
  }
2597
- const [n, i] = I(() => {
2662
+ const [n, i] = p(() => {
2598
2663
  var c;
2599
2664
  return (c = e.symbol) == null ? void 0 : c.content;
2600
2665
  });
2601
- function o() {
2602
- n || Qt({
2666
+ function a() {
2667
+ n || Zt({
2603
2668
  symbol: e.symbol,
2604
2669
  builderContextValue: e.builderContext
2605
2670
  }).then((c) => {
2606
2671
  c && i(c);
2607
2672
  });
2608
2673
  }
2609
- return B(() => {
2610
- }, []), B(() => {
2611
- o();
2612
- }, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ s(
2613
- Pe,
2674
+ return P(() => {
2675
+ }, []), P(() => {
2676
+ a();
2677
+ }, [e.symbol]), /* @__PURE__ */ r("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ r(
2678
+ Ae,
2614
2679
  {
2615
2680
  __isNestedRender: !0,
2616
2681
  apiVersion: e.builderContext.apiVersion,
@@ -2618,40 +2683,40 @@ function Xt(e) {
2618
2683
  context: e.builderContext.context,
2619
2684
  customComponents: Object.values(e.builderComponents),
2620
2685
  data: {
2621
- ...(a = e.symbol) == null ? void 0 : a.data,
2686
+ ...(o = e.symbol) == null ? void 0 : o.data,
2622
2687
  ...e.builderContext.localState,
2623
- ...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
2688
+ ...(l = n == null ? void 0 : n.data) == null ? void 0 : l.state
2624
2689
  },
2625
- model: (l = e.symbol) == null ? void 0 : l.model,
2690
+ model: (s = e.symbol) == null ? void 0 : s.model,
2626
2691
  content: n
2627
2692
  }
2628
2693
  ) });
2629
2694
  }
2630
- const nn = ie, on = Pe;
2695
+ const on = ie, rn = Ae;
2631
2696
  export {
2632
2697
  ie as Blocks,
2633
2698
  je as Button,
2634
- lt as Columns,
2635
- Pe as Content,
2636
- ct as Fragment,
2637
- ut as Image,
2638
- nn as RenderBlocks,
2639
- on as RenderContent,
2640
- mt as Section,
2641
- Xt as Symbol,
2642
- Et as Text,
2699
+ st as Columns,
2700
+ Ae as Content,
2701
+ dt as Fragment,
2702
+ ft as Image,
2703
+ on as RenderBlocks,
2704
+ rn as RenderContent,
2705
+ ht as Section,
2706
+ en as Symbol,
2707
+ Vt as Text,
2643
2708
  Bt as Video,
2644
- ln as _processContentResult,
2645
- Fe as createRegisterComponentMessage,
2646
- cn as fetchBuilderProps,
2647
- sn as fetchEntries,
2648
- pe as fetchOneEntry,
2649
- dn as getAllContent,
2650
- un as getBuilderSearchParams,
2651
- mn as getContent,
2652
- V as isEditing,
2653
- Ve as isPreviewing,
2654
- Ae as register,
2655
- fn as setEditorSettings,
2656
- hn as track
2709
+ sn as _processContentResult,
2710
+ We as createRegisterComponentMessage,
2711
+ dn as fetchBuilderProps,
2712
+ un as fetchEntries,
2713
+ Ce as fetchOneEntry,
2714
+ mn as getAllContent,
2715
+ fn as getBuilderSearchParams,
2716
+ hn as getContent,
2717
+ $ as isEditing,
2718
+ Fe as isPreviewing,
2719
+ Ne as register,
2720
+ gn as setEditorSettings,
2721
+ bn as track
2657
2722
  };