@builder.io/sdk-vue 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/package.json +1 -1
  2. package/packages/_vue2/dist/{block-styles.cacb4849.cjs → block-styles.aaf62526.cjs} +1 -1
  3. package/packages/_vue2/dist/{block-styles.6a1d7394.js → block-styles.c38fdaef.js} +4 -4
  4. package/packages/_vue2/dist/{css.49cc4003.js → css.377600fa.js} +2 -2
  5. package/packages/{_vue3/dist/css.627e21ae.cjs → _vue2/dist/css.4a664d41.cjs} +1 -1
  6. package/packages/_vue2/dist/{evaluate.6ab6e7cb.js → evaluate.d2d16952.js} +1 -1
  7. package/packages/_vue2/dist/{evaluate.7d21bb04.cjs → evaluate.d837a845.cjs} +2 -2
  8. package/packages/_vue2/dist/{index.2473a355.js → index.1074d675.js} +102 -102
  9. package/packages/_vue2/dist/{index.95d9006f.cjs → index.3d5a7a37.cjs} +6 -6
  10. package/packages/_vue2/dist/{render-block.22052bd8.js → render-block.1ec27d4d.js} +6 -6
  11. package/packages/_vue2/dist/{render-block.9342f7b5.cjs → render-block.43f24cc4.cjs} +2 -2
  12. package/packages/_vue2/dist/{render-component.ec485884.js → render-component.82a8e6f7.js} +3 -3
  13. package/packages/_vue2/dist/{render-component.f3cccaa9.cjs → render-component.ba549c84.cjs} +1 -1
  14. package/packages/_vue2/dist/{render-content.d53085e5.cjs → render-content.2c57f5bb.cjs} +1 -1
  15. package/packages/_vue2/dist/{render-content.a6b17a6c.js → render-content.3afd4a46.js} +5 -5
  16. package/packages/_vue2/dist/{render-inlined-styles.b322c74a.cjs → render-inlined-styles.1ed1b531.cjs} +1 -1
  17. package/packages/_vue2/dist/{render-inlined-styles.2286ef7c.js → render-inlined-styles.f76aba42.js} +1 -1
  18. package/packages/_vue2/dist/{render-repeated-block.253c96e6.cjs → render-repeated-block.625e26fc.cjs} +1 -1
  19. package/packages/_vue2/dist/{render-repeated-block.ac4f1559.js → render-repeated-block.d3c2411b.js} +2 -2
  20. package/packages/_vue2/dist/{render-styles.a148b748.js → render-styles.7b01db22.js} +2 -2
  21. package/packages/_vue2/dist/{render-styles.0cb949b0.cjs → render-styles.f1413001.cjs} +3 -3
  22. package/packages/_vue2/dist/sdk.cjs +1 -1
  23. package/packages/_vue2/dist/sdk.js +1 -1
  24. package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +0 -9
  25. package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
  26. package/packages/_vue3/dist/sdk.cjs +72 -1
  27. package/packages/_vue3/dist/sdk.js +3251 -22
  28. package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +0 -9
  29. package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
  30. package/packages/_vue3/dist/style.css +1 -1
  31. package/packages/_vue2/dist/css.c26b7ab4.cjs +0 -6
  32. package/packages/_vue3/dist/block-styles.5b949efb.cjs +0 -1
  33. package/packages/_vue3/dist/block-styles.e91165b8.js +0 -72
  34. package/packages/_vue3/dist/css.41ed2294.js +0 -75
  35. package/packages/_vue3/dist/evaluate.0662f166.js +0 -63
  36. package/packages/_vue3/dist/evaluate.da45a33b.cjs +0 -4
  37. package/packages/_vue3/dist/index.3a561c6a.js +0 -1394
  38. package/packages/_vue3/dist/index.3e17c057.cjs +0 -32
  39. package/packages/_vue3/dist/render-block.20c07cb1.cjs +0 -3
  40. package/packages/_vue3/dist/render-block.e9a2cb71.js +0 -273
  41. package/packages/_vue3/dist/render-component.20ef18f7.cjs +0 -1
  42. package/packages/_vue3/dist/render-component.afa60a7b.js +0 -42
  43. package/packages/_vue3/dist/render-content.20bd0f8d.js +0 -1354
  44. package/packages/_vue3/dist/render-content.e790eee5.cjs +0 -1
  45. package/packages/_vue3/dist/render-inlined-styles.0444f4fe.js +0 -16
  46. package/packages/_vue3/dist/render-inlined-styles.14d9ba36.cjs +0 -1
  47. package/packages/_vue3/dist/render-repeated-block.5a245883.js +0 -32
  48. package/packages/_vue3/dist/render-repeated-block.75230844.cjs +0 -1
  49. package/packages/_vue3/dist/render-styles.73c7ba5a.js +0 -80
  50. package/packages/_vue3/dist/render-styles.bd7475f8.cjs +0 -31
@@ -1,24 +1,3253 @@
1
- import { B as a, C as n, F as o, I as r, y as i, z as g, S as m, d, e as l, V as C, m as c, u as p, w as u, p as S, i as B, o as R, v as x, r as k, t as v, x as w } from "./index.3a561c6a.js";
2
- import "vue";
1
+ import { defineComponent as g, openBlock as d, createElementBlock as m, mergeProps as x, toHandlers as V, toDisplayString as ne, createBlock as f, resolveDynamicComponent as P, resolveComponent as S, createCommentVNode as v, defineAsyncComponent as J, normalizeProps as Y, withCtx as he, Fragment as $, renderList as R, createVNode as j, guardReactiveProps as Ue, normalizeClass as H, normalizeStyle as N, renderSlot as W, createElementVNode as oe, markRaw as Me } from "vue";
2
+ const Le = g({
3
+ name: "builder-button",
4
+ props: ["attributes", "text", "link", "openLinkInNewTab"],
5
+ methods: {
6
+ filterAttrs: function(t = {}, n) {
7
+ const o = "v-on:";
8
+ return Object.keys(t).filter((r) => {
9
+ if (!t[r])
10
+ return !1;
11
+ const i = r.startsWith(o);
12
+ return n ? i : !i;
13
+ }).reduce(
14
+ (r, i) => ({
15
+ ...r,
16
+ [i.replace(o, "")]: t[i]
17
+ }),
18
+ {}
19
+ );
20
+ },
21
+ _classStringToObject(e) {
22
+ const t = {};
23
+ if (typeof e != "string")
24
+ return t;
25
+ const n = e.trim().split(/\s+/);
26
+ for (const o of n)
27
+ t[o] = !0;
28
+ return t;
29
+ }
30
+ }
31
+ });
32
+ const y = (e, t) => {
33
+ const n = e.__vccOpts || e;
34
+ for (const [o, r] of t)
35
+ n[o] = r;
36
+ return n;
37
+ }, We = ["href", "target"];
38
+ function He(e, t, n, o, r, i) {
39
+ return e.link ? (d(), m("a", x({
40
+ key: 0,
41
+ role: "button",
42
+ href: e.link,
43
+ target: e.openLinkInNewTab ? "_blank" : void 0
44
+ }, e.filterAttrs(e.attributes, !1), V(e.filterAttrs(e.attributes, !0), !0)), ne(e.text), 17, We)) : (d(), m("button", x({
45
+ key: 1,
46
+ class: e._classStringToObject(
47
+ e.attributes.class + " button-361b1o6wv2k"
48
+ )
49
+ }, e.filterAttrs(e.attributes, !1), V(e.filterAttrs(e.attributes, !0), !0)), ne(e.text), 17));
50
+ }
51
+ const Ke = /* @__PURE__ */ y(Le, [["render", He], ["__scopeId", "data-v-e8a5e9df"]]), ze = Symbol(), O = {
52
+ Builder: {
53
+ content: null,
54
+ context: {},
55
+ localState: void 0,
56
+ rootSetState() {
57
+ },
58
+ rootState: {},
59
+ apiKey: null,
60
+ apiVersion: void 0,
61
+ registeredComponents: {},
62
+ inheritedStyles: {}
63
+ },
64
+ key: ze
65
+ }, _ = "vue3";
66
+ function C() {
67
+ return typeof window < "u" && typeof document < "u";
68
+ }
69
+ function De() {
70
+ return C() && window.self !== window.top;
71
+ }
72
+ function E() {
73
+ return De() && window.location.search.indexOf("builder.frameEditing=") !== -1;
74
+ }
75
+ const K = (e) => JSON.parse(JSON.stringify(e)), fe = {
76
+ small: {
77
+ min: 320,
78
+ default: 321,
79
+ max: 640
80
+ },
81
+ medium: {
82
+ min: 641,
83
+ default: 642,
84
+ max: 991
85
+ },
86
+ large: {
87
+ min: 990,
88
+ default: 991,
89
+ max: 1200
90
+ }
91
+ }, re = (e, t = fe) => `@media (max-width: ${t[e].max}px)`, be = ({ small: e, medium: t }) => {
92
+ const n = K(fe);
93
+ if (!e || !t)
94
+ return n;
95
+ const o = Math.floor(e / 2);
96
+ n.small = {
97
+ max: e,
98
+ min: o,
99
+ default: o + 1
100
+ };
101
+ const r = n.small.max + 1;
102
+ n.medium = {
103
+ max: t,
104
+ min: r,
105
+ default: r + 1
106
+ };
107
+ const i = n.medium.max + 1;
108
+ return n.large = {
109
+ max: 2e3,
110
+ min: i,
111
+ default: i + 1
112
+ }, n;
113
+ };
114
+ function F({
115
+ code: e,
116
+ context: t,
117
+ localState: n,
118
+ rootState: o,
119
+ rootSetState: r,
120
+ event: i,
121
+ isExpression: s = !0
122
+ }) {
123
+ if (e === "") {
124
+ console.warn("Skipping evaluation of empty code block.");
125
+ return;
126
+ }
127
+ const l = {
128
+ isEditing: E(),
129
+ isBrowser: C(),
130
+ isServer: !C()
131
+ }, c = s && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
132
+ try {
133
+ return new Function(
134
+ "builder",
135
+ "Builder",
136
+ "state",
137
+ "context",
138
+ "event",
139
+ c
140
+ )(
141
+ l,
142
+ l,
143
+ qe(o, n, r),
144
+ t,
145
+ i
146
+ );
147
+ } catch (u) {
148
+ console.warn(
149
+ `Builder custom code error:
150
+ While Evaluating:
151
+ `,
152
+ c,
153
+ `
154
+ `,
155
+ u
156
+ );
157
+ }
158
+ }
159
+ function qe(e, t, n) {
160
+ if (e === t)
161
+ throw new Error("rootState === localState");
162
+ return new Proxy(e, {
163
+ get: (o, r) => t && r in t ? t[r] : e[r],
164
+ set: (o, r, i) => {
165
+ if (t && r in t)
166
+ throw new Error(
167
+ "Writing to local state is not allowed as it is read-only."
168
+ );
169
+ return e[r] = i, n == null || n(e), !0;
170
+ }
171
+ });
172
+ }
173
+ const Ge = (e, t, n) => {
174
+ if (Object(e) !== e)
175
+ return e;
176
+ const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
177
+ return o.slice(0, -1).reduce(
178
+ (r, i, s) => Object(r[i]) === r[i] ? r[i] : r[i] = Math.abs(Number(o[s + 1])) >> 0 === +o[s + 1] ? [] : {},
179
+ e
180
+ )[o[o.length - 1]] = n, e;
181
+ };
182
+ const Je = ({
183
+ block: e,
184
+ context: t,
185
+ localState: n,
186
+ rootState: o,
187
+ rootSetState: r
188
+ }) => {
189
+ if (!e.bindings)
190
+ return e;
191
+ const i = K(e), s = {
192
+ ...i,
193
+ properties: { ...i.properties },
194
+ actions: { ...i.actions }
195
+ };
196
+ for (const l in e.bindings) {
197
+ const a = e.bindings[l], c = F({
198
+ code: a,
199
+ localState: n,
200
+ rootState: o,
201
+ rootSetState: r,
202
+ context: t
203
+ });
204
+ Ge(s, l, c);
205
+ }
206
+ return s;
207
+ };
208
+ function Z({
209
+ block: e,
210
+ context: t,
211
+ shouldEvaluateBindings: n,
212
+ localState: o,
213
+ rootState: r,
214
+ rootSetState: i
215
+ }) {
216
+ const s = e;
217
+ return n ? Je({
218
+ block: s,
219
+ localState: o,
220
+ rootState: r,
221
+ rootSetState: i,
222
+ context: t
223
+ }) : s;
224
+ }
225
+ const Ye = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), I = (e) => e != null, ge = (e) => Object.entries(e).map(([n, o]) => {
226
+ if (typeof o == "string")
227
+ return `${Ye(n)}: ${o};`;
228
+ }).filter(I), Xe = (e) => ge(e).join(`
229
+ `), q = ({
230
+ mediaQuery: e,
231
+ className: t,
232
+ styles: n
233
+ }) => {
234
+ const o = `.${t} {
235
+ ${Xe(n)}
236
+ }`;
237
+ return e ? `${e} {
238
+ ${o}
239
+ }` : o;
240
+ }, Qe = g({
241
+ name: "render-inlined-styles",
242
+ props: ["styles", "id"]
243
+ });
244
+ function Ze(e, t, n, o, r, i) {
245
+ return d(), f(P("style"), {
246
+ innerHTML: e.styles,
247
+ id: e.id
248
+ }, null, 8, ["innerHTML", "id"]);
249
+ }
250
+ const z = /* @__PURE__ */ y(Qe, [["render", Ze]]), et = g({
251
+ name: "block-styles",
252
+ components: { RenderInlinedStyles: z },
253
+ props: ["block", "context"],
254
+ data() {
255
+ return { TARGET: _ };
256
+ },
257
+ computed: {
258
+ useBlock() {
259
+ return Z({
260
+ block: this.block,
261
+ localState: this.context.localState,
262
+ rootState: this.context.rootState,
263
+ rootSetState: this.context.rootSetState,
264
+ context: this.context.context,
265
+ shouldEvaluateBindings: !0
266
+ });
267
+ },
268
+ canShowBlock() {
269
+ return I(this.useBlock.hide) ? !this.useBlock.hide : I(this.useBlock.show) ? this.useBlock.show : !0;
270
+ },
271
+ css() {
272
+ var u;
273
+ const e = this.useBlock.responsiveStyles, t = this.context.content, n = be(
274
+ ((u = t == null ? void 0 : t.meta) == null ? void 0 : u.breakpoints) || {}
275
+ ), o = e == null ? void 0 : e.large, r = e == null ? void 0 : e.medium, i = e == null ? void 0 : e.small, s = this.useBlock.id;
276
+ if (!s)
277
+ return "";
278
+ const l = o ? q({
279
+ className: s,
280
+ styles: o
281
+ }) : "", a = r ? q({
282
+ className: s,
283
+ styles: r,
284
+ mediaQuery: re(
285
+ "medium",
286
+ n
287
+ )
288
+ }) : "", c = i ? q({
289
+ className: s,
290
+ styles: i,
291
+ mediaQuery: re(
292
+ "small",
293
+ n
294
+ )
295
+ }) : "";
296
+ return [l, a, c].join(" ");
297
+ }
298
+ }
299
+ });
300
+ function tt(e, t, n, o, r, i) {
301
+ const s = S("render-inlined-styles");
302
+ return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? (d(), f(s, {
303
+ key: 0,
304
+ styles: e.css
305
+ }, null, 8, ["styles"])) : v("", !0);
306
+ }
307
+ const ee = /* @__PURE__ */ y(et, [["render", tt]]), nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
308
+ __proto__: null,
309
+ default: ee
310
+ }, Symbol.toStringTag, { value: "Module" })), ot = (e) => `v-on:${e.toLowerCase()}`, rt = (e, t) => (n) => F({
311
+ code: e,
312
+ context: t.context,
313
+ localState: t.localState,
314
+ rootState: t.rootState,
315
+ rootSetState: t.rootSetState,
316
+ event: n,
317
+ isExpression: !1
318
+ });
319
+ function it(e) {
320
+ var o;
321
+ const t = {}, n = (o = e.block.actions) != null ? o : {};
322
+ for (const r in n) {
323
+ if (!n.hasOwnProperty(r))
324
+ continue;
325
+ const i = n[r];
326
+ t[ot(r)] = rt(i, e);
327
+ }
328
+ return t;
329
+ }
330
+ function st(e) {
331
+ var t;
332
+ return {
333
+ ...(t = e.component) == null ? void 0 : t.options,
334
+ ...e.options,
335
+ builderBlock: e
336
+ };
337
+ }
338
+ function at(e) {
339
+ const t = {};
340
+ if (typeof e != "string")
341
+ return t;
342
+ const n = e.trim().split(/\\s+/);
343
+ for (const o of n)
344
+ t[o] = !0;
345
+ return t;
346
+ }
347
+ function lt(e) {
348
+ return e.class = at(e.class), e;
349
+ }
350
+ const ct = (e) => ({ href: e.href });
351
+ function dt(e) {
352
+ var n;
353
+ const t = {
354
+ ...ct(e),
355
+ ...e.properties,
356
+ "builder-id": e.id,
357
+ style: ut(e.style),
358
+ class: [e.id, "builder-block", e.class, (n = e.properties) == null ? void 0 : n.class].filter(Boolean).join(" ")
359
+ };
360
+ return lt(t);
361
+ }
362
+ function ut(e) {
363
+ if (!!e)
364
+ switch (_) {
365
+ case "svelte":
366
+ case "vue2":
367
+ case "vue3":
368
+ case "solid":
369
+ return ge(e).join(" ");
370
+ case "qwik":
371
+ case "reactNative":
372
+ case "react":
373
+ return e;
374
+ }
375
+ }
376
+ const pt = [
377
+ "area",
378
+ "base",
379
+ "br",
380
+ "col",
381
+ "embed",
382
+ "hr",
383
+ "img",
384
+ "input",
385
+ "keygen",
386
+ "link",
387
+ "meta",
388
+ "param",
389
+ "source",
390
+ "track",
391
+ "wbr"
392
+ ], mt = (e) => typeof e == "string" && pt.includes(e.toLowerCase()), ht = ({
393
+ block: e,
394
+ context: t
395
+ }) => {
396
+ var r;
397
+ const n = (r = Z({
398
+ block: e,
399
+ localState: t.localState,
400
+ rootState: t.rootState,
401
+ rootSetState: t.rootSetState,
402
+ context: t.context,
403
+ shouldEvaluateBindings: !1
404
+ }).component) == null ? void 0 : r.name;
405
+ if (!n)
406
+ return null;
407
+ const o = t.registeredComponents[n];
408
+ if (o)
409
+ return o;
410
+ console.warn(`
411
+ Could not find a registered component named "${n}".
412
+ If you registered it, is the file that registered it imported by the file that needs to render it?`);
413
+ }, ft = ({
414
+ block: e,
415
+ context: t
416
+ }) => {
417
+ const { repeat: n, ...o } = e;
418
+ if (!(n != null && n.collection))
419
+ return;
420
+ const r = F({
421
+ code: n.collection,
422
+ localState: t.localState,
423
+ rootState: t.rootState,
424
+ rootSetState: t.rootSetState,
425
+ context: t.context
426
+ });
427
+ if (!Array.isArray(r))
428
+ return;
429
+ const i = n.collection.split(".").pop(), s = n.itemName || (i ? i + "Item" : "item");
430
+ return r.map((a, c) => ({
431
+ context: {
432
+ ...t,
433
+ localState: {
434
+ ...t.localState,
435
+ $index: c,
436
+ $item: a,
437
+ [s]: a,
438
+ [`$${s}Index`]: c
439
+ }
440
+ },
441
+ block: o
442
+ }));
443
+ }, bt = () => Promise.resolve().then(() => ke).then((e) => e.default).catch((e) => {
444
+ throw console.error(
445
+ "Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
446
+ e
447
+ ), e;
448
+ }), gt = g({
449
+ name: "render-repeated-block",
450
+ components: { RenderBlock: J(bt) },
451
+ props: ["repeatContext", "block"],
452
+ data() {
453
+ return { store: this.repeatContext };
454
+ },
455
+ provide() {
456
+ const e = this;
457
+ return {
458
+ [O.key]: e.store
459
+ };
460
+ }
461
+ });
462
+ function yt(e, t, n, o, r, i) {
463
+ const s = S("render-block");
464
+ return d(), f(s, {
465
+ block: e.block,
466
+ context: e.store
467
+ }, null, 8, ["block", "context"]);
468
+ }
469
+ const kt = /* @__PURE__ */ y(gt, [["render", yt]]), St = () => Promise.resolve().then(() => nt).then((e) => e.default).catch((e) => {
470
+ throw console.error(
471
+ "Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
472
+ e
473
+ ), e;
474
+ }), vt = () => Promise.resolve().then(() => ke).then((e) => e.default).catch((e) => {
475
+ throw console.error(
476
+ "Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
477
+ e
478
+ ), e;
479
+ }), Ct = g({
480
+ name: "render-component",
481
+ components: {
482
+ RenderBlock: J(vt),
483
+ BlockStyles: J(St)
484
+ },
485
+ props: ["componentRef", "componentOptions", "blockChildren", "context"]
486
+ });
487
+ function $t(e, t, n, o, r, i) {
488
+ const s = S("render-block"), l = S("block-styles");
489
+ return e.componentRef ? (d(), f(P(e.componentRef), Y(x({ key: 0 }, e.componentOptions)), {
490
+ default: he(() => [
491
+ (d(!0), m($, null, R(e.blockChildren, (a, c) => (d(), f(s, {
492
+ key: "render-block-" + a.id,
493
+ block: a,
494
+ context: e.context
495
+ }, null, 8, ["block", "context"]))), 128)),
496
+ (d(!0), m($, null, R(e.blockChildren, (a, c) => (d(), f(l, {
497
+ key: "block-style-" + a.id,
498
+ block: a,
499
+ context: e.context
500
+ }, null, 8, ["block", "context"]))), 128))
501
+ ]),
502
+ _: 1
503
+ }, 16)) : v("", !0);
504
+ }
505
+ const wt = /* @__PURE__ */ y(Ct, [["render", $t]]), Tt = g({
506
+ name: "render-block",
507
+ components: {
508
+ RenderComponent: wt,
509
+ RenderRepeatedBlock: kt,
510
+ BlockStyles: ee
511
+ },
512
+ props: ["block", "context"],
513
+ data() {
514
+ return {
515
+ component: ht({
516
+ block: this.block,
517
+ context: this.context
518
+ }),
519
+ Tag: this.block.tagName || "div",
520
+ childrenContext: this.context,
521
+ isEmptyHtmlElement: mt
522
+ };
523
+ },
524
+ computed: {
525
+ repeatItem() {
526
+ return ft({
527
+ block: this.block,
528
+ context: this.context
529
+ });
530
+ },
531
+ useBlock() {
532
+ return this.repeatItem ? this.block : Z({
533
+ block: this.block,
534
+ localState: this.context.localState,
535
+ rootState: this.context.rootState,
536
+ rootSetState: this.context.rootSetState,
537
+ context: this.context.context,
538
+ shouldEvaluateBindings: !0
539
+ });
540
+ },
541
+ canShowBlock() {
542
+ return "hide" in this.useBlock ? !this.useBlock.hide : "show" in this.useBlock ? this.useBlock.show : !0;
543
+ },
544
+ actions() {
545
+ return it({
546
+ block: this.useBlock,
547
+ rootState: this.context.rootState,
548
+ rootSetState: this.context.rootSetState,
549
+ localState: this.context.localState,
550
+ context: this.context.context
551
+ });
552
+ },
553
+ attributes() {
554
+ return {
555
+ ...dt(this.useBlock)
556
+ };
557
+ },
558
+ childrenWithoutParentComponent() {
559
+ var t, n;
560
+ return !((t = this.component) != null && t.component) && !this.repeatItem ? (n = this.useBlock.children) != null ? n : [] : [];
561
+ },
562
+ renderComponentProps() {
563
+ var e, t, n;
564
+ return {
565
+ blockChildren: (e = this.useBlock.children) != null ? e : [],
566
+ componentRef: (t = this.component) == null ? void 0 : t.component,
567
+ componentOptions: {
568
+ ...st(this.useBlock),
569
+ ...(n = this.component) != null && n.noWrap ? {
570
+ attributes: {
571
+ ...this.attributes,
572
+ ...this.actions
573
+ }
574
+ } : {}
575
+ },
576
+ context: this.childrenContext
577
+ };
578
+ }
579
+ },
580
+ methods: {
581
+ stripVOn: function(t = {}) {
582
+ return Object.keys(t).reduce(
583
+ (n, o) => ({
584
+ ...n,
585
+ [o.replace("v-on:", "")]: t[o]
586
+ }),
587
+ {}
588
+ );
589
+ }
590
+ }
591
+ });
592
+ function xt(e, t, n, o, r, i) {
593
+ var u;
594
+ const s = S("render-repeated-block"), l = S("render-component"), a = S("render-block", !0), c = S("block-styles");
595
+ return e.canShowBlock ? (d(), m($, { key: 0 }, [
596
+ (u = e.component) != null && u.noWrap ? (d(), f(l, Y(x({ key: 1 }, e.renderComponentProps)), null, 16)) : (d(), m($, { key: 0 }, [
597
+ e.isEmptyHtmlElement(e.Tag) ? (d(), f(P(e.Tag), x({ key: 0 }, e.attributes, V(e.stripVOn(e.actions))), null, 16)) : v("", !0),
598
+ !e.isEmptyHtmlElement(e.Tag) && e.repeatItem ? (d(!0), m($, { key: 1 }, R(e.repeatItem, (p, h) => (d(), f(s, {
599
+ key: h,
600
+ repeatContext: p.context,
601
+ block: p.block
602
+ }, null, 8, ["repeatContext", "block"]))), 128)) : v("", !0),
603
+ !e.isEmptyHtmlElement(e.Tag) && !e.repeatItem ? (d(), f(P(e.Tag), x({ key: 2 }, e.attributes, V(e.stripVOn(e.actions))), {
604
+ default: he(() => [
605
+ j(l, Y(Ue(e.renderComponentProps)), null, 16),
606
+ (d(!0), m($, null, R(e.childrenWithoutParentComponent, (p, h) => (d(), f(a, {
607
+ key: "render-block-" + p.id,
608
+ block: p,
609
+ context: e.childrenContext
610
+ }, null, 8, ["block", "context"]))), 128)),
611
+ (d(!0), m($, null, R(e.childrenWithoutParentComponent, (p, h) => (d(), f(c, {
612
+ key: "block-style-" + p.id,
613
+ block: p,
614
+ context: e.childrenContext
615
+ }, null, 8, ["block", "context"]))), 128))
616
+ ]),
617
+ _: 1
618
+ }, 16)) : v("", !0)
619
+ ], 64))
620
+ ], 64)) : v("", !0);
621
+ }
622
+ const ye = /* @__PURE__ */ y(Tt, [["render", xt]]), ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
623
+ __proto__: null,
624
+ default: ye
625
+ }, Symbol.toStringTag, { value: "Module" })), It = g({
626
+ name: "render-blocks",
627
+ components: { RenderBlock: ye, BlockStyles: ee },
628
+ props: ["blocks", "parent", "path", "styleProp"],
629
+ inject: {
630
+ builderContext: O.key
631
+ },
632
+ computed: {
633
+ className() {
634
+ var e;
635
+ return "builder-blocks" + ((e = this.blocks) != null && e.length ? "" : " no-blocks");
636
+ }
637
+ },
638
+ methods: {
639
+ onClick() {
640
+ var e, t;
641
+ E() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
642
+ {
643
+ type: "builder.clickEmptyBlocks",
644
+ data: {
645
+ parentElementId: this.parent,
646
+ dataPath: this.path
647
+ }
648
+ },
649
+ "*"
650
+ ));
651
+ },
652
+ onMouseEnter() {
653
+ var e, t;
654
+ E() && !((e = this.blocks) != null && e.length) && ((t = window.parent) == null || t.postMessage(
655
+ {
656
+ type: "builder.hoverEmptyBlocks",
657
+ data: {
658
+ parentElementId: this.parent,
659
+ dataPath: this.path
660
+ }
661
+ },
662
+ "*"
663
+ ));
664
+ },
665
+ _classStringToObject(e) {
666
+ const t = {};
667
+ if (typeof e != "string")
668
+ return t;
669
+ const n = e.trim().split(/\s+/);
670
+ for (const o of n)
671
+ t[o] = !0;
672
+ return t;
673
+ }
674
+ }
675
+ });
676
+ const Rt = ["builder-path", "builder-parent-id", "dataSet"];
677
+ function Et(e, t, n, o, r, i) {
678
+ const s = S("render-block"), l = S("block-styles");
679
+ return d(), m("div", {
680
+ class: H(e._classStringToObject(e.className + " div-4o9pb21oca6")),
681
+ "builder-path": e.path,
682
+ "builder-parent-id": e.parent,
683
+ dataSet: {
684
+ class: e.className
685
+ },
686
+ style: N(e.styleProp),
687
+ onClick: t[0] || (t[0] = (a) => e.onClick()),
688
+ onMouseenter: t[1] || (t[1] = (a) => e.onMouseEnter()),
689
+ onKeypress: t[2] || (t[2] = (a) => e.onClick())
690
+ }, [
691
+ e.blocks ? (d(!0), m($, { key: 0 }, R(e.blocks, (a, c) => (d(), f(s, {
692
+ key: "render-block-" + a.id,
693
+ block: a,
694
+ context: e.builderContext
695
+ }, null, 8, ["block", "context"]))), 128)) : v("", !0),
696
+ e.blocks ? (d(!0), m($, { key: 1 }, R(e.blocks, (a, c) => (d(), f(l, {
697
+ key: "block-style-" + a.id,
698
+ block: a,
699
+ context: e.builderContext
700
+ }, null, 8, ["block", "context"]))), 128)) : v("", !0)
701
+ ], 46, Rt);
702
+ }
703
+ const Se = /* @__PURE__ */ y(It, [["render", Et], ["__scopeId", "data-v-61bc5f3a"]]), At = g({
704
+ name: "builder-columns",
705
+ components: {
706
+ RenderInlinedStyles: z,
707
+ RenderBlocks: Se
708
+ },
709
+ props: [
710
+ "space",
711
+ "columns",
712
+ "stackColumnsAt",
713
+ "reverseColumnsWhenStacked",
714
+ "builderBlock"
715
+ ],
716
+ data() {
717
+ return {
718
+ gutterSize: typeof this.space == "number" ? this.space || 0 : 20,
719
+ cols: this.columns || [],
720
+ stackAt: this.stackColumnsAt || "tablet",
721
+ flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
722
+ TARGET: _
723
+ };
724
+ },
725
+ inject: {
726
+ builderContext: O.key
727
+ },
728
+ computed: {
729
+ columnsCssVars() {
730
+ return {
731
+ "--flex-dir": this.flexDir,
732
+ "--flex-dir-tablet": this.getTabletStyle({
733
+ stackedStyle: this.flexDir,
734
+ desktopStyle: "row"
735
+ })
736
+ };
737
+ },
738
+ columnsStyles() {
739
+ return `
740
+ @media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
741
+ .${this.builderBlock.id}-breakpoints {
742
+ flex-direction: var(--flex-dir-tablet);
743
+ align-items: stretch;
744
+ }
745
+
746
+ .${this.builderBlock.id}-breakpoints > .builder-column {
747
+ width: var(--column-width-tablet) !important;
748
+ margin-left: var(--column-margin-left-tablet) !important;
749
+ }
750
+ }
751
+
752
+ @media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
753
+ .${this.builderBlock.id}-breakpoints {
754
+ flex-direction: var(--flex-dir);
755
+ align-items: stretch;
756
+ }
757
+
758
+ .${this.builderBlock.id}-breakpoints > .builder-column {
759
+ width: var(--column-width-mobile) !important;
760
+ margin-left: var(--column-margin-left-mobile) !important;
761
+ }
762
+ },
763
+ `;
764
+ }
765
+ },
766
+ methods: {
767
+ getWidth(e) {
768
+ var t;
769
+ return ((t = this.cols[e]) == null ? void 0 : t.width) || 100 / this.cols.length;
770
+ },
771
+ getColumnCssWidth(e) {
772
+ const t = this.gutterSize * (this.cols.length - 1) / this.cols.length;
773
+ return `calc(${this.getWidth(e)}% - ${t}px)`;
774
+ },
775
+ getTabletStyle({
776
+ stackedStyle: e,
777
+ desktopStyle: t
778
+ }) {
779
+ return this.stackAt === "tablet" ? e : t;
780
+ },
781
+ getMobileStyle({
782
+ stackedStyle: e,
783
+ desktopStyle: t
784
+ }) {
785
+ return this.stackAt === "never" ? t : e;
786
+ },
787
+ columnCssVars(e) {
788
+ const t = e === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(e), o = `${t}px`, r = "100%", i = 0;
789
+ return {
790
+ width: n,
791
+ "margin-left": o,
792
+ "--column-width-mobile": this.getMobileStyle({
793
+ stackedStyle: r,
794
+ desktopStyle: n
795
+ }),
796
+ "--column-margin-left-mobile": this.getMobileStyle({
797
+ stackedStyle: i,
798
+ desktopStyle: o
799
+ }),
800
+ "--column-width-tablet": this.getTabletStyle({
801
+ stackedStyle: r,
802
+ desktopStyle: n
803
+ }),
804
+ "--column-margin-left-tablet": this.getTabletStyle({
805
+ stackedStyle: i,
806
+ desktopStyle: o
807
+ })
808
+ };
809
+ },
810
+ getWidthForBreakpointSize(e) {
811
+ var n, o;
812
+ return be(
813
+ ((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
814
+ )[e].max;
815
+ },
816
+ _classStringToObject(e) {
817
+ const t = {};
818
+ if (typeof e != "string")
819
+ return t;
820
+ const n = e.trim().split(/\s+/);
821
+ for (const o of n)
822
+ t[o] = !0;
823
+ return t;
824
+ }
825
+ }
826
+ });
827
+ function _t(e, t, n, o, r, i) {
828
+ const s = S("render-inlined-styles"), l = S("render-blocks");
829
+ return d(), m("div", {
830
+ class: H(
831
+ e._classStringToObject(
832
+ `builder-columns ${e.builderBlock.id}-breakpoints div-1eih9th5ow6`
833
+ )
834
+ ),
835
+ style: N(e.columnsCssVars),
836
+ dataSet: {
837
+ "builder-block-name": "builder-columns"
838
+ }
839
+ }, [
840
+ e.TARGET !== "reactNative" ? (d(), f(s, {
841
+ key: 0,
842
+ styles: e.columnsStyles
843
+ }, null, 8, ["styles"])) : v("", !0),
844
+ (d(!0), m($, null, R(e.columns, (a, c) => (d(), m("div", {
845
+ key: c,
846
+ class: "builder-column div-1eih9th5ow6-2",
847
+ style: N(e.columnCssVars(c)),
848
+ dataSet: {
849
+ "builder-block-name": "builder-column"
850
+ }
851
+ }, [
852
+ j(l, {
853
+ blocks: a.blocks,
854
+ path: `component.options.columns.${c}.blocks`,
855
+ parent: e.builderBlock.id,
856
+ styleProp: {
857
+ flexGrow: "1"
858
+ }
859
+ }, null, 8, ["blocks", "path", "parent"])
860
+ ], 4))), 128))
861
+ ], 6);
862
+ }
863
+ const Bt = /* @__PURE__ */ y(At, [["render", _t], ["__scopeId", "data-v-df2fecd0"]]), Vt = g({
864
+ name: "builder-fragment-component",
865
+ props: []
866
+ });
867
+ function Pt(e, t, n, o, r, i) {
868
+ return d(), m("span", null, [
869
+ W(e.$slots, "default")
870
+ ]);
871
+ }
872
+ const Ot = /* @__PURE__ */ y(Vt, [["render", Pt]]);
873
+ function ie(e) {
874
+ return e.replace(/http(s)?:/, "");
875
+ }
876
+ function jt(e = "", t, n) {
877
+ const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
878
+ return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + r + t + "=" + encodeURIComponent(n);
879
+ }
880
+ function Nt(e, t) {
881
+ if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
882
+ return e;
883
+ if (t === "master")
884
+ return ie(e);
885
+ const n = e.match(
886
+ /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
887
+ );
888
+ if (n) {
889
+ const o = e.split(n[0]), r = n[3], i = t.match("x") ? t : `${t}x`;
890
+ return ie(`${o[0]}_${i}${r}`);
891
+ }
892
+ return null;
893
+ }
894
+ function G(e) {
895
+ if (!e)
896
+ return e;
897
+ const t = [100, 200, 400, 800, 1200, 1600, 2e3];
898
+ if (e.match(/builder\.io/)) {
899
+ let n = e;
900
+ const o = Number(e.split("?width=")[1]);
901
+ return isNaN(o) || (n = `${n} ${o}w`), t.filter((r) => r !== o).map((r) => `${jt(e, "width", r)} ${r}w`).concat([n]).join(", ");
902
+ }
903
+ return e.match(/cdn\.shopify\.com/) ? t.map((n) => [Nt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
904
+ }
905
+ const Ft = g({
906
+ name: "builder-image",
907
+ props: [
908
+ "image",
909
+ "src",
910
+ "srcset",
911
+ "noWebp",
912
+ "aspectRatio",
913
+ "altText",
914
+ "backgroundPosition",
915
+ "backgroundSize",
916
+ "className",
917
+ "sizes",
918
+ "builderBlock",
919
+ "fitContent"
920
+ ],
921
+ computed: {
922
+ srcSetToUse() {
923
+ var n;
924
+ const t = this.image || this.src;
925
+ if (!t || !(t.match(/builder\.io/) || t.match(/cdn\.shopify\.com/)))
926
+ return this.srcset;
927
+ if (this.srcset && ((n = this.image) == null ? void 0 : n.includes("builder.io/api/v1/image"))) {
928
+ if (!this.srcset.includes(this.image.split("?")[0]))
929
+ return console.debug("Removed given srcset"), G(t);
930
+ } else if (this.image && !this.srcset)
931
+ return G(t);
932
+ return G(t);
933
+ },
934
+ webpSrcSet() {
935
+ var e;
936
+ return ((e = this.srcSetToUse) == null ? void 0 : e.match(/builder\.io/)) && !this.noWebp ? this.srcSetToUse.replace(/\?/g, "?format=webp&") : "";
937
+ },
938
+ aspectRatioCss() {
939
+ const e = {
940
+ position: "absolute",
941
+ height: "100%",
942
+ width: "100%",
943
+ left: "0px",
944
+ top: "0px"
945
+ };
946
+ return this.aspectRatio ? e : void 0;
947
+ }
948
+ },
949
+ methods: {
950
+ _classStringToObject(e) {
951
+ const t = {};
952
+ if (typeof e != "string")
953
+ return t;
954
+ const n = e.trim().split(/\s+/);
955
+ for (const o of n)
956
+ t[o] = !0;
957
+ return t;
958
+ }
959
+ }
960
+ });
961
+ const Ut = ["srcset"], Mt = ["alt", "role", "src", "srcset", "sizes"], Lt = {
962
+ key: 2,
963
+ class: "div-256wrwn33ry-2"
964
+ };
965
+ function Wt(e, t, n, o, r, i) {
966
+ var s, l, a, c;
967
+ return d(), m($, null, [
968
+ oe("picture", null, [
969
+ e.webpSrcSet ? (d(), m("source", {
970
+ key: 0,
971
+ type: "image/webp",
972
+ srcset: e.webpSrcSet
973
+ }, null, 8, Ut)) : v("", !0),
974
+ oe("img", {
975
+ loading: "lazy",
976
+ alt: e.altText,
977
+ role: e.altText ? "presentation" : void 0,
978
+ style: N({
979
+ objectPosition: e.backgroundPosition || "center",
980
+ objectFit: e.backgroundSize || "cover",
981
+ ...e.aspectRatioCss
982
+ }),
983
+ class: H(
984
+ e._classStringToObject(
985
+ "builder-image" + (e.className ? " " + e.className : "") + " img-256wrwn33ry"
986
+ )
987
+ ),
988
+ src: e.image,
989
+ srcset: e.srcSetToUse,
990
+ sizes: e.sizes
991
+ }, null, 14, Mt)
992
+ ]),
993
+ e.aspectRatio && !(((l = (s = e.builderBlock) == null ? void 0 : s.children) == null ? void 0 : l.length) && e.fitContent) ? (d(), m("div", {
994
+ key: 0,
995
+ class: "builder-image-sizer div-256wrwn33ry",
996
+ style: N({
997
+ paddingTop: e.aspectRatio * 100 + "%"
998
+ })
999
+ }, null, 4)) : v("", !0),
1000
+ ((c = (a = e.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length) && e.fitContent ? W(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
1001
+ !e.fitContent && e.children ? (d(), m("div", Lt, [
1002
+ W(e.$slots, "default", {}, void 0, !0)
1003
+ ])) : v("", !0)
1004
+ ], 64);
1005
+ }
1006
+ const Ht = /* @__PURE__ */ y(Ft, [["render", Wt], ["__scopeId", "data-v-f59f4313"]]), Kt = g({
1007
+ name: "builder-section-component",
1008
+ props: ["maxWidth", "attributes"],
1009
+ methods: {
1010
+ filterAttrs: function(t = {}, n) {
1011
+ const o = "v-on:";
1012
+ return Object.keys(t).filter((r) => {
1013
+ if (!t[r])
1014
+ return !1;
1015
+ const i = r.startsWith(o);
1016
+ return n ? i : !i;
1017
+ }).reduce(
1018
+ (r, i) => ({
1019
+ ...r,
1020
+ [i.replace(o, "")]: t[i]
1021
+ }),
1022
+ {}
1023
+ );
1024
+ }
1025
+ }
1026
+ });
1027
+ function zt(e, t, n, o, r, i) {
1028
+ return d(), m("section", x({
1029
+ style: {
1030
+ width: "100%",
1031
+ alignSelf: "stretch",
1032
+ flexGrow: 1,
1033
+ boxSizing: "border-box",
1034
+ maxWidth: e.maxWidth || 1200,
1035
+ display: "flex",
1036
+ flexDirection: "column",
1037
+ alignItems: "stretch",
1038
+ marginLeft: "auto",
1039
+ marginRight: "auto"
1040
+ }
1041
+ }, e.filterAttrs(e.attributes, !1), V(e.filterAttrs(e.attributes, !0), !0)), [
1042
+ W(e.$slots, "default")
1043
+ ], 16);
1044
+ }
1045
+ const Dt = /* @__PURE__ */ y(Kt, [["render", zt]]), qt = {
1046
+ name: "Core:Button",
1047
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1048
+ defaultStyles: {
1049
+ appearance: "none",
1050
+ paddingTop: "15px",
1051
+ paddingBottom: "15px",
1052
+ paddingLeft: "25px",
1053
+ paddingRight: "25px",
1054
+ backgroundColor: "#000000",
1055
+ color: "white",
1056
+ borderRadius: "4px",
1057
+ textAlign: "center",
1058
+ cursor: "pointer"
1059
+ },
1060
+ inputs: [
1061
+ {
1062
+ name: "text",
1063
+ type: "text",
1064
+ defaultValue: "Click me!",
1065
+ bubble: !0
1066
+ },
1067
+ {
1068
+ name: "link",
1069
+ type: "url",
1070
+ bubble: !0
1071
+ },
1072
+ {
1073
+ name: "openLinkInNewTab",
1074
+ type: "boolean",
1075
+ defaultValue: !1,
1076
+ friendlyName: "Open link in new tab"
1077
+ }
1078
+ ],
1079
+ static: !0,
1080
+ noWrap: !0
1081
+ }, D = (e) => {
1082
+ const t = e.toString().trim();
1083
+ return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
1084
+ }, Gt = {
1085
+ name: "Columns",
1086
+ inputs: [
1087
+ {
1088
+ name: "columns",
1089
+ type: "array",
1090
+ broadcast: !0,
1091
+ subFields: [
1092
+ {
1093
+ name: "blocks",
1094
+ type: "array",
1095
+ hideFromUI: !0,
1096
+ defaultValue: [
1097
+ {
1098
+ "@type": "@builder.io/sdk:Element",
1099
+ responsiveStyles: {
1100
+ large: {
1101
+ display: "flex",
1102
+ flexDirection: "column",
1103
+ alignItems: "stretch",
1104
+ flexShrink: "0",
1105
+ position: "relative",
1106
+ marginTop: "30px",
1107
+ textAlign: "center",
1108
+ lineHeight: "normal",
1109
+ height: "auto",
1110
+ minHeight: "20px",
1111
+ minWidth: "20px",
1112
+ overflow: "hidden"
1113
+ }
1114
+ },
1115
+ component: {
1116
+ name: "Image",
1117
+ options: {
1118
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1119
+ backgroundPosition: "center",
1120
+ backgroundSize: "cover",
1121
+ aspectRatio: 0.7004048582995948
1122
+ }
1123
+ }
1124
+ },
1125
+ {
1126
+ "@type": "@builder.io/sdk:Element",
1127
+ responsiveStyles: {
1128
+ large: {
1129
+ display: "flex",
1130
+ flexDirection: "column",
1131
+ alignItems: "stretch",
1132
+ flexShrink: "0",
1133
+ position: "relative",
1134
+ marginTop: "30px",
1135
+ textAlign: "center",
1136
+ lineHeight: "normal",
1137
+ height: "auto"
1138
+ }
1139
+ },
1140
+ component: {
1141
+ name: "Text",
1142
+ options: {
1143
+ text: "<p>Enter some text...</p>"
1144
+ }
1145
+ }
1146
+ }
1147
+ ]
1148
+ },
1149
+ {
1150
+ name: "width",
1151
+ type: "number",
1152
+ hideFromUI: !0,
1153
+ helperText: "Width %, e.g. set to 50 to fill half of the space"
1154
+ },
1155
+ {
1156
+ name: "link",
1157
+ type: "url",
1158
+ helperText: "Optionally set a url that clicking this column will link to"
1159
+ }
1160
+ ],
1161
+ defaultValue: [
1162
+ {
1163
+ blocks: [
1164
+ {
1165
+ "@type": "@builder.io/sdk:Element",
1166
+ responsiveStyles: {
1167
+ large: {
1168
+ display: "flex",
1169
+ flexDirection: "column",
1170
+ alignItems: "stretch",
1171
+ flexShrink: "0",
1172
+ position: "relative",
1173
+ marginTop: "30px",
1174
+ textAlign: "center",
1175
+ lineHeight: "normal",
1176
+ height: "auto",
1177
+ minHeight: "20px",
1178
+ minWidth: "20px",
1179
+ overflow: "hidden"
1180
+ }
1181
+ },
1182
+ component: {
1183
+ name: "Image",
1184
+ options: {
1185
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1186
+ backgroundPosition: "center",
1187
+ backgroundSize: "cover",
1188
+ aspectRatio: 0.7004048582995948
1189
+ }
1190
+ }
1191
+ },
1192
+ {
1193
+ "@type": "@builder.io/sdk:Element",
1194
+ responsiveStyles: {
1195
+ large: {
1196
+ display: "flex",
1197
+ flexDirection: "column",
1198
+ alignItems: "stretch",
1199
+ flexShrink: "0",
1200
+ position: "relative",
1201
+ marginTop: "30px",
1202
+ textAlign: "center",
1203
+ lineHeight: "normal",
1204
+ height: "auto"
1205
+ }
1206
+ },
1207
+ component: {
1208
+ name: "Text",
1209
+ options: {
1210
+ text: "<p>Enter some text...</p>"
1211
+ }
1212
+ }
1213
+ }
1214
+ ]
1215
+ },
1216
+ {
1217
+ blocks: [
1218
+ {
1219
+ "@type": "@builder.io/sdk:Element",
1220
+ responsiveStyles: {
1221
+ large: {
1222
+ display: "flex",
1223
+ flexDirection: "column",
1224
+ alignItems: "stretch",
1225
+ flexShrink: "0",
1226
+ position: "relative",
1227
+ marginTop: "30px",
1228
+ textAlign: "center",
1229
+ lineHeight: "normal",
1230
+ height: "auto",
1231
+ minHeight: "20px",
1232
+ minWidth: "20px",
1233
+ overflow: "hidden"
1234
+ }
1235
+ },
1236
+ component: {
1237
+ name: "Image",
1238
+ options: {
1239
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
1240
+ backgroundPosition: "center",
1241
+ backgroundSize: "cover",
1242
+ aspectRatio: 0.7004048582995948
1243
+ }
1244
+ }
1245
+ },
1246
+ {
1247
+ "@type": "@builder.io/sdk:Element",
1248
+ responsiveStyles: {
1249
+ large: {
1250
+ display: "flex",
1251
+ flexDirection: "column",
1252
+ alignItems: "stretch",
1253
+ flexShrink: "0",
1254
+ position: "relative",
1255
+ marginTop: "30px",
1256
+ textAlign: "center",
1257
+ lineHeight: "normal",
1258
+ height: "auto"
1259
+ }
1260
+ },
1261
+ component: {
1262
+ name: "Text",
1263
+ options: {
1264
+ text: "<p>Enter some text...</p>"
1265
+ }
1266
+ }
1267
+ }
1268
+ ]
1269
+ }
1270
+ ],
1271
+ onChange: D((e) => {
1272
+ function t() {
1273
+ n.forEach((o) => {
1274
+ o.delete("width");
1275
+ });
1276
+ }
1277
+ const n = e.get("columns");
1278
+ Array.isArray(n) && !!n.find(
1279
+ (r) => r.get("width")
1280
+ ) && (!!n.find(
1281
+ (i) => !i.get("width")
1282
+ ) || n.reduce((l, a) => l + a.get("width"), 0) !== 100) && t();
1283
+ })
1284
+ },
1285
+ {
1286
+ name: "space",
1287
+ type: "number",
1288
+ defaultValue: 20,
1289
+ helperText: "Size of gap between columns",
1290
+ advanced: !0
1291
+ },
1292
+ {
1293
+ name: "stackColumnsAt",
1294
+ type: "string",
1295
+ defaultValue: "tablet",
1296
+ helperText: "Convert horizontal columns to vertical at what device size",
1297
+ enum: ["tablet", "mobile", "never"],
1298
+ advanced: !0
1299
+ },
1300
+ {
1301
+ name: "reverseColumnsWhenStacked",
1302
+ type: "boolean",
1303
+ defaultValue: !1,
1304
+ helperText: "When stacking columns for mobile devices, reverse the ordering",
1305
+ advanced: !0
1306
+ }
1307
+ ]
1308
+ }, Jt = {
1309
+ name: "Fragment",
1310
+ static: !0,
1311
+ hidden: !0,
1312
+ canHaveChildren: !0,
1313
+ noWrap: !0
1314
+ }, Yt = {
1315
+ name: "Image",
1316
+ static: !0,
1317
+ 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",
1318
+ defaultStyles: {
1319
+ position: "relative",
1320
+ minHeight: "20px",
1321
+ minWidth: "20px",
1322
+ overflow: "hidden"
1323
+ },
1324
+ canHaveChildren: !0,
1325
+ inputs: [
1326
+ {
1327
+ name: "image",
1328
+ type: "file",
1329
+ bubble: !0,
1330
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1331
+ required: !0,
1332
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
1333
+ onChange: D(
1334
+ (e) => {
1335
+ e.delete("srcset"), e.delete("noWebp");
1336
+ function n(s, l = 6e4) {
1337
+ return new Promise((a, c) => {
1338
+ const u = document.createElement("img");
1339
+ let p = !1;
1340
+ u.onload = () => {
1341
+ p = !0, a(u);
1342
+ }, u.addEventListener("error", (h) => {
1343
+ console.warn("Image load failed", h.error), c(h.error);
1344
+ }), u.src = s, setTimeout(() => {
1345
+ p || c(new Error("Image load timed out"));
1346
+ }, l);
1347
+ });
1348
+ }
1349
+ function o(s) {
1350
+ return Math.round(s * 1e3) / 1e3;
1351
+ }
1352
+ const r = e.get("image"), i = e.get("aspectRatio");
1353
+ if (fetch(r).then((s) => s.blob()).then((s) => {
1354
+ s.type.includes("svg") && e.set("noWebp", !0);
1355
+ }), r && (!i || i === 0.7041))
1356
+ return n(r).then((s) => {
1357
+ const l = e.get("aspectRatio");
1358
+ e.get("image") === r && (!l || l === 0.7041) && s.width && s.height && (e.set("aspectRatio", o(s.height / s.width)), e.set("height", s.height), e.set("width", s.width));
1359
+ });
1360
+ }
1361
+ )
1362
+ },
1363
+ {
1364
+ name: "backgroundSize",
1365
+ type: "text",
1366
+ defaultValue: "cover",
1367
+ enum: [
1368
+ {
1369
+ label: "contain",
1370
+ value: "contain",
1371
+ helperText: "The image should never get cropped"
1372
+ },
1373
+ {
1374
+ label: "cover",
1375
+ value: "cover",
1376
+ helperText: "The image should fill it's box, cropping when needed"
1377
+ }
1378
+ ]
1379
+ },
1380
+ {
1381
+ name: "backgroundPosition",
1382
+ type: "text",
1383
+ defaultValue: "center",
1384
+ enum: [
1385
+ "center",
1386
+ "top",
1387
+ "left",
1388
+ "right",
1389
+ "bottom",
1390
+ "top left",
1391
+ "top right",
1392
+ "bottom left",
1393
+ "bottom right"
1394
+ ]
1395
+ },
1396
+ {
1397
+ name: "altText",
1398
+ type: "string",
1399
+ helperText: "Text to display when the user has images off"
1400
+ },
1401
+ {
1402
+ name: "height",
1403
+ type: "number",
1404
+ hideFromUI: !0
1405
+ },
1406
+ {
1407
+ name: "width",
1408
+ type: "number",
1409
+ hideFromUI: !0
1410
+ },
1411
+ {
1412
+ name: "sizes",
1413
+ type: "string",
1414
+ hideFromUI: !0
1415
+ },
1416
+ {
1417
+ name: "srcset",
1418
+ type: "string",
1419
+ hideFromUI: !0
1420
+ },
1421
+ {
1422
+ name: "lazy",
1423
+ type: "boolean",
1424
+ defaultValue: !0,
1425
+ hideFromUI: !0
1426
+ },
1427
+ {
1428
+ name: "fitContent",
1429
+ type: "boolean",
1430
+ helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
1431
+ defaultValue: !0
1432
+ },
1433
+ {
1434
+ name: "aspectRatio",
1435
+ type: "number",
1436
+ helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
1437
+ advanced: !0,
1438
+ defaultValue: 0.7041
1439
+ }
1440
+ ]
1441
+ }, Xt = {
1442
+ name: "Core:Section",
1443
+ static: !0,
1444
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
1445
+ inputs: [
1446
+ {
1447
+ name: "maxWidth",
1448
+ type: "number",
1449
+ defaultValue: 1200
1450
+ },
1451
+ {
1452
+ name: "lazyLoad",
1453
+ type: "boolean",
1454
+ defaultValue: !1,
1455
+ advanced: !0,
1456
+ description: "Only render this section when in view"
1457
+ }
1458
+ ],
1459
+ defaultStyles: {
1460
+ paddingLeft: "20px",
1461
+ paddingRight: "20px",
1462
+ paddingTop: "50px",
1463
+ paddingBottom: "50px",
1464
+ marginTop: "0px",
1465
+ width: "100vw",
1466
+ marginLeft: "calc(50% - 50vw)"
1467
+ },
1468
+ canHaveChildren: !0,
1469
+ defaultChildren: [
1470
+ {
1471
+ "@type": "@builder.io/sdk:Element",
1472
+ responsiveStyles: {
1473
+ large: {
1474
+ textAlign: "center"
1475
+ }
1476
+ },
1477
+ component: {
1478
+ name: "Text",
1479
+ options: {
1480
+ text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
1481
+ }
1482
+ }
1483
+ }
1484
+ ]
1485
+ }, Qt = {
1486
+ name: "Symbol",
1487
+ noWrap: !0,
1488
+ static: !0,
1489
+ inputs: [
1490
+ {
1491
+ name: "symbol",
1492
+ type: "uiSymbol"
1493
+ },
1494
+ {
1495
+ name: "dataOnly",
1496
+ helperText: "Make this a data symbol that doesn't display any UI",
1497
+ type: "boolean",
1498
+ defaultValue: !1,
1499
+ advanced: !0,
1500
+ hideFromUI: !0
1501
+ },
1502
+ {
1503
+ name: "inheritState",
1504
+ helperText: "Inherit the parent component state and data",
1505
+ type: "boolean",
1506
+ defaultValue: !1,
1507
+ advanced: !0
1508
+ },
1509
+ {
1510
+ name: "renderToLiquid",
1511
+ helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1512
+ type: "boolean",
1513
+ defaultValue: !1,
1514
+ advanced: !0,
1515
+ hideFromUI: !0
1516
+ },
1517
+ {
1518
+ name: "useChildren",
1519
+ hideFromUI: !0,
1520
+ type: "boolean"
1521
+ }
1522
+ ]
1523
+ }, Zt = {
1524
+ name: "Text",
1525
+ static: !0,
1526
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
1527
+ inputs: [
1528
+ {
1529
+ name: "text",
1530
+ type: "html",
1531
+ required: !0,
1532
+ autoFocus: !0,
1533
+ bubble: !0,
1534
+ defaultValue: "Enter some text..."
1535
+ }
1536
+ ],
1537
+ defaultStyles: {
1538
+ lineHeight: "normal",
1539
+ height: "auto",
1540
+ textAlign: "center"
1541
+ }
1542
+ }, en = g({
1543
+ name: "builder-text",
1544
+ props: ["text"]
1545
+ }), tn = ["innerHTML"];
1546
+ function nn(e, t, n, o, r, i) {
1547
+ return d(), m("span", {
1548
+ class: "builder-text",
1549
+ innerHTML: e.text,
1550
+ style: {
1551
+ outline: "none"
1552
+ }
1553
+ }, null, 8, tn);
1554
+ }
1555
+ const on = /* @__PURE__ */ y(en, [["render", nn]]), rn = {
1556
+ name: "Video",
1557
+ canHaveChildren: !0,
1558
+ defaultStyles: {
1559
+ minHeight: "20px",
1560
+ minWidth: "20px"
1561
+ },
1562
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
1563
+ inputs: [
1564
+ {
1565
+ name: "video",
1566
+ type: "file",
1567
+ allowedFileTypes: ["mp4"],
1568
+ bubble: !0,
1569
+ defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
1570
+ required: !0
1571
+ },
1572
+ {
1573
+ name: "posterImage",
1574
+ type: "file",
1575
+ allowedFileTypes: ["jpeg", "png"],
1576
+ helperText: "Image to show before the video plays"
1577
+ },
1578
+ {
1579
+ name: "autoPlay",
1580
+ type: "boolean",
1581
+ defaultValue: !0
1582
+ },
1583
+ {
1584
+ name: "controls",
1585
+ type: "boolean",
1586
+ defaultValue: !1
1587
+ },
1588
+ {
1589
+ name: "muted",
1590
+ type: "boolean",
1591
+ defaultValue: !0
1592
+ },
1593
+ {
1594
+ name: "loop",
1595
+ type: "boolean",
1596
+ defaultValue: !0
1597
+ },
1598
+ {
1599
+ name: "playsInline",
1600
+ type: "boolean",
1601
+ defaultValue: !0
1602
+ },
1603
+ {
1604
+ name: "fit",
1605
+ type: "text",
1606
+ defaultValue: "cover",
1607
+ enum: ["contain", "cover", "fill", "auto"]
1608
+ },
1609
+ {
1610
+ name: "fitContent",
1611
+ type: "boolean",
1612
+ helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
1613
+ defaultValue: !0,
1614
+ advanced: !0
1615
+ },
1616
+ {
1617
+ name: "position",
1618
+ type: "text",
1619
+ defaultValue: "center",
1620
+ enum: [
1621
+ "center",
1622
+ "top",
1623
+ "left",
1624
+ "right",
1625
+ "bottom",
1626
+ "top left",
1627
+ "top right",
1628
+ "bottom left",
1629
+ "bottom right"
1630
+ ]
1631
+ },
1632
+ {
1633
+ name: "height",
1634
+ type: "number",
1635
+ advanced: !0
1636
+ },
1637
+ {
1638
+ name: "width",
1639
+ type: "number",
1640
+ advanced: !0
1641
+ },
1642
+ {
1643
+ name: "aspectRatio",
1644
+ type: "number",
1645
+ advanced: !0,
1646
+ defaultValue: 0.7004048582995948
1647
+ },
1648
+ {
1649
+ name: "lazyLoad",
1650
+ type: "boolean",
1651
+ helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
1652
+ defaultValue: !0,
1653
+ advanced: !0
1654
+ }
1655
+ ]
1656
+ }, sn = g({
1657
+ name: "builder-video",
1658
+ props: [
1659
+ "autoPlay",
1660
+ "muted",
1661
+ "controls",
1662
+ "loop",
1663
+ "playsInline",
1664
+ "attributes",
1665
+ "fit",
1666
+ "position",
1667
+ "video",
1668
+ "posterImage"
1669
+ ],
1670
+ computed: {
1671
+ videoProps() {
1672
+ return {
1673
+ ...this.autoPlay === !0 ? {
1674
+ autoPlay: !0
1675
+ } : {},
1676
+ ...this.muted === !0 ? {
1677
+ muted: !0
1678
+ } : {},
1679
+ ...this.controls === !0 ? {
1680
+ controls: !0
1681
+ } : {},
1682
+ ...this.loop === !0 ? {
1683
+ loop: !0
1684
+ } : {},
1685
+ ...this.playsInline === !0 ? {
1686
+ playsInline: !0
1687
+ } : {}
1688
+ };
1689
+ },
1690
+ spreadProps() {
1691
+ return {
1692
+ ...this.attributes,
1693
+ ...this.videoProps
1694
+ };
1695
+ }
1696
+ }
1697
+ }), an = ["src", "poster"];
1698
+ function ln(e, t, n, o, r, i) {
1699
+ var s;
1700
+ return d(), m("video", x({
1701
+ style: {
1702
+ width: "100%",
1703
+ height: "100%",
1704
+ ...(s = e.attributes) == null ? void 0 : s.style,
1705
+ objectFit: e.fit,
1706
+ objectPosition: e.position,
1707
+ borderRadius: 1
1708
+ },
1709
+ src: e.video || "no-src",
1710
+ poster: e.posterImage
1711
+ }, e.spreadProps), null, 16, an);
1712
+ }
1713
+ const cn = /* @__PURE__ */ y(sn, [["render", ln]]), dn = {
1714
+ name: "Embed",
1715
+ static: !0,
1716
+ inputs: [
1717
+ {
1718
+ name: "url",
1719
+ type: "url",
1720
+ required: !0,
1721
+ defaultValue: "",
1722
+ helperText: "e.g. enter a youtube url, google map, etc",
1723
+ onChange: D(
1724
+ (e) => {
1725
+ const t = e.get("url");
1726
+ if (t)
1727
+ return e.set("content", "Loading..."), fetch(
1728
+ `https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`
1729
+ ).then((o) => o.json()).then((o) => {
1730
+ e.get("url") === t && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1731
+ }).catch((o) => {
1732
+ e.set(
1733
+ "content",
1734
+ "There was an error embedding this URL, please try again or another URL"
1735
+ );
1736
+ });
1737
+ e.delete("content");
1738
+ }
1739
+ )
1740
+ },
1741
+ {
1742
+ name: "content",
1743
+ type: "html",
1744
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1745
+ hideFromUI: !0
1746
+ }
1747
+ ]
1748
+ }, un = [
1749
+ "text/javascript",
1750
+ "application/javascript",
1751
+ "application/ecmascript"
1752
+ ], pn = (e) => un.includes(e.type), mn = g({
1753
+ name: "builder-embed",
1754
+ props: ["content"],
1755
+ data() {
1756
+ return { scriptsInserted: [], scriptsRun: [], ranInitFn: !1 };
1757
+ },
1758
+ watch: {
1759
+ onUpdateHook0: {
1760
+ handler() {
1761
+ this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1762
+ },
1763
+ immediate: !0
1764
+ }
1765
+ },
1766
+ computed: {
1767
+ onUpdateHook0() {
1768
+ return {
1769
+ 0: this.$refs.elem,
1770
+ 1: this.ranInitFn
1771
+ };
1772
+ }
1773
+ },
1774
+ methods: {
1775
+ findAndRunScripts() {
1776
+ if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
1777
+ return;
1778
+ const e = this.$refs.elem.getElementsByTagName("script");
1779
+ for (let t = 0; t < e.length; t++) {
1780
+ const n = e[t];
1781
+ if (n.src && !this.scriptsInserted.includes(n.src)) {
1782
+ this.scriptsInserted.push(n.src);
1783
+ const o = document.createElement("script");
1784
+ o.async = !0, o.src = n.src, document.head.appendChild(o);
1785
+ } else if (pn(n) && !this.scriptsRun.includes(n.innerText))
1786
+ try {
1787
+ this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1788
+ } catch (o) {
1789
+ console.warn("`Embed`: Error running script:", o);
1790
+ }
1791
+ }
1792
+ }
1793
+ }
1794
+ }), hn = ["innerHTML"];
1795
+ function fn(e, t, n, o, r, i) {
1796
+ return d(), m("div", {
1797
+ class: "builder-embed",
1798
+ ref: "elem",
1799
+ innerHTML: e.content
1800
+ }, null, 8, hn);
1801
+ }
1802
+ const bn = /* @__PURE__ */ y(mn, [["render", fn]]), gn = g({
1803
+ name: "builder-img-component",
1804
+ props: [
1805
+ "backgroundSize",
1806
+ "backgroundPosition",
1807
+ "imgSrc",
1808
+ "altText",
1809
+ "image",
1810
+ "attributes"
1811
+ ],
1812
+ data() {
1813
+ return { isEditing: E };
1814
+ },
1815
+ methods: {
1816
+ filterAttrs: function(t = {}, n) {
1817
+ const o = "v-on:";
1818
+ return Object.keys(t).filter((r) => {
1819
+ if (!t[r])
1820
+ return !1;
1821
+ const i = r.startsWith(o);
1822
+ return n ? i : !i;
1823
+ }).reduce(
1824
+ (r, i) => ({
1825
+ ...r,
1826
+ [i.replace(o, "")]: t[i]
1827
+ }),
1828
+ {}
1829
+ );
1830
+ }
1831
+ }
1832
+ }), yn = ["alt", "src"];
1833
+ function kn(e, t, n, o, r, i) {
1834
+ return d(), m("img", x({
1835
+ style: {
1836
+ objectFit: e.backgroundSize || "cover",
1837
+ objectPosition: e.backgroundPosition || "center"
1838
+ },
1839
+ key: e.isEditing() && e.imgSrc || "default-key",
1840
+ alt: e.altText,
1841
+ src: e.imgSrc || e.image
1842
+ }, e.filterAttrs(e.attributes, !1), V(e.filterAttrs(e.attributes, !0), !0)), null, 16, yn);
1843
+ }
1844
+ const Sn = /* @__PURE__ */ y(gn, [["render", kn]]), vn = {
1845
+ name: "Raw:Img",
1846
+ hideFromInsertMenu: !0,
1847
+ 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",
1848
+ inputs: [
1849
+ {
1850
+ name: "image",
1851
+ bubble: !0,
1852
+ type: "file",
1853
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
1854
+ required: !0
1855
+ }
1856
+ ],
1857
+ noWrap: !0,
1858
+ static: !0
1859
+ }, Cn = g({
1860
+ name: "builder-custom-code",
1861
+ props: ["replaceNodes", "code"],
1862
+ data() {
1863
+ return { scriptsInserted: [], scriptsRun: [] };
1864
+ },
1865
+ mounted() {
1866
+ this.findAndRunScripts();
1867
+ },
1868
+ methods: {
1869
+ findAndRunScripts() {
1870
+ if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
1871
+ const e = this.$refs.elem.getElementsByTagName("script");
1872
+ for (let t = 0; t < e.length; t++) {
1873
+ const n = e[t];
1874
+ if (n.src) {
1875
+ if (this.scriptsInserted.includes(n.src))
1876
+ continue;
1877
+ this.scriptsInserted.push(n.src);
1878
+ const o = document.createElement("script");
1879
+ o.async = !0, o.src = n.src, document.head.appendChild(o);
1880
+ } else if (!n.type || [
1881
+ "text/javascript",
1882
+ "application/javascript",
1883
+ "application/ecmascript"
1884
+ ].includes(n.type)) {
1885
+ if (this.scriptsRun.includes(n.innerText))
1886
+ continue;
1887
+ try {
1888
+ this.scriptsRun.push(n.innerText), new Function(n.innerText)();
1889
+ } catch (o) {
1890
+ console.warn("`CustomCode`: Error running script:", o);
1891
+ }
1892
+ }
1893
+ }
1894
+ }
1895
+ },
1896
+ _classStringToObject(e) {
1897
+ const t = {};
1898
+ if (typeof e != "string")
1899
+ return t;
1900
+ const n = e.trim().split(/\s+/);
1901
+ for (const o of n)
1902
+ t[o] = !0;
1903
+ return t;
1904
+ }
1905
+ }
1906
+ }), $n = ["innerHTML"];
1907
+ function wn(e, t, n, o, r, i) {
1908
+ return d(), m("div", {
1909
+ ref: "elem",
1910
+ class: H(
1911
+ e._classStringToObject(
1912
+ "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
1913
+ )
1914
+ ),
1915
+ innerHTML: e.code
1916
+ }, null, 10, $n);
1917
+ }
1918
+ const Tn = /* @__PURE__ */ y(Cn, [["render", wn]]), xn = {
1919
+ name: "Custom Code",
1920
+ static: !0,
1921
+ requiredPermissions: ["editCode"],
1922
+ inputs: [
1923
+ {
1924
+ name: "code",
1925
+ type: "html",
1926
+ required: !0,
1927
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1928
+ code: !0
1929
+ },
1930
+ {
1931
+ name: "replaceNodes",
1932
+ type: "boolean",
1933
+ helperText: "Preserve server rendered dom nodes",
1934
+ advanced: !0
1935
+ },
1936
+ {
1937
+ name: "scriptsClientOnly",
1938
+ type: "boolean",
1939
+ defaultValue: !1,
1940
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1941
+ advanced: !0
1942
+ }
1943
+ ]
1944
+ }, In = () => [
1945
+ { component: Ke, ...qt },
1946
+ { component: Bt, ...Gt },
1947
+ { component: Tn, ...xn },
1948
+ { component: bn, ...dn },
1949
+ { component: Ot, ...Jt },
1950
+ { component: Ht, ...Yt },
1951
+ { component: Sn, ...vn },
1952
+ { component: Dt, ...Xt },
1953
+ { component: Wo, ...Qt },
1954
+ { component: on, ...Zt },
1955
+ { component: cn, ...rn }
1956
+ ], U = "[Builder.io]: ", A = {
1957
+ log: (...e) => console.log(U, ...e),
1958
+ error: (...e) => console.error(U, ...e),
1959
+ warn: (...e) => console.warn(U, ...e),
1960
+ debug: (...e) => console.debug(U, ...e)
1961
+ }, Rn = (e) => {
1962
+ if (e === "localhost" || e === "127.0.0.1")
1963
+ return e;
1964
+ const t = e.split(".");
1965
+ return t.length > 2 ? t.slice(1).join(".") : e;
1966
+ }, ve = ({
1967
+ name: e,
1968
+ canTrack: t
1969
+ }) => {
1970
+ var n;
1971
+ try {
1972
+ return t ? (n = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : n.split("=")[1] : void 0;
1973
+ } catch (o) {
1974
+ A.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
1975
+ return;
1976
+ }
1977
+ }, Ce = async (e) => ve(e), En = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(I).join("; "), An = [
1978
+ ["secure", ""],
1979
+ ["SameSite", "None"]
1980
+ ], _n = ({
1981
+ name: e,
1982
+ value: t,
1983
+ expires: n
1984
+ }) => {
1985
+ const r = (C() ? location.protocol === "https:" : !0) ? An : [[]], i = n ? [["expires", n.toUTCString()]] : [[]], s = [
1986
+ [e, t],
1987
+ ...i,
1988
+ ["path", "/"],
1989
+ ["domain", Rn(window.location.hostname)],
1990
+ ...r
1991
+ ];
1992
+ return En(s);
1993
+ }, $e = async ({
1994
+ name: e,
1995
+ value: t,
1996
+ expires: n,
1997
+ canTrack: o
1998
+ }) => {
1999
+ try {
2000
+ if (!o)
2001
+ return;
2002
+ const r = _n({ name: e, value: t, expires: n });
2003
+ document.cookie = r;
2004
+ } catch (r) {
2005
+ A.warn("[COOKIE] SET error: ", (r == null ? void 0 : r.message) || r);
2006
+ }
2007
+ }, Bn = "builder.tests", te = (e) => `${Bn}.${e}`, Vn = ({ contentId: e }) => Ce({ name: te(e), canTrack: !0 }), Pn = ({ contentId: e }) => ve({ name: te(e), canTrack: !0 }), On = ({
2008
+ contentId: e,
2009
+ value: t
2010
+ }) => $e({ name: te(e), value: t, canTrack: !0 }), we = (e) => I(e.id) && I(e.variations) && Object.keys(e.variations).length > 0, jn = ({
2011
+ id: e,
2012
+ variations: t
2013
+ }) => {
2014
+ var r;
2015
+ let n = 0;
2016
+ const o = Math.random();
2017
+ for (const i in t) {
2018
+ const s = (r = t[i]) == null ? void 0 : r.testRatio;
2019
+ if (n += s, o < n)
2020
+ return i;
2021
+ }
2022
+ return e;
2023
+ }, Te = (e) => {
2024
+ const t = jn(e);
2025
+ return On({
2026
+ contentId: e.id,
2027
+ value: t
2028
+ }).catch((n) => {
2029
+ A.error("could not store A/B test variation: ", n);
2030
+ }), t;
2031
+ }, xe = ({
2032
+ item: e,
2033
+ testGroupId: t
2034
+ }) => {
2035
+ const n = e.variations[t];
2036
+ return t === e.id || !n ? {
2037
+ testVariationId: e.id,
2038
+ testVariationName: "Default"
2039
+ } : {
2040
+ data: n.data,
2041
+ testVariationId: n.id,
2042
+ testVariationName: n.name || (n.id === e.id ? "Default" : "")
2043
+ };
2044
+ }, Nn = ({
2045
+ item: e,
2046
+ canTrack: t
2047
+ }) => {
2048
+ if (!t)
2049
+ return e;
2050
+ if (!e)
2051
+ return;
2052
+ if (!we(e))
2053
+ return e;
2054
+ const n = Pn({
2055
+ contentId: e.id
2056
+ }) || Te({
2057
+ variations: e.variations,
2058
+ id: e.id
2059
+ }), o = xe({ item: e, testGroupId: n });
2060
+ return {
2061
+ ...e,
2062
+ ...o
2063
+ };
2064
+ }, Fn = async ({
2065
+ item: e,
2066
+ canTrack: t
2067
+ }) => {
2068
+ if (!t || !we(e))
2069
+ return e;
2070
+ const o = await Vn({
2071
+ contentId: e.id
2072
+ }) || Te({
2073
+ variations: e.variations,
2074
+ id: e.id
2075
+ }), r = xe({ item: e, testGroupId: o });
2076
+ return {
2077
+ ...e,
2078
+ ...r
2079
+ };
2080
+ }, M = (e) => I(e) ? e : !0;
2081
+ function Un() {
2082
+ return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
2083
+ }
2084
+ function Mn() {
2085
+ const e = Un().fetch;
2086
+ if (typeof e > "u")
2087
+ throw console.warn(
2088
+ `Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
2089
+ For more information, read https://github.com/BuilderIO/this-package-uses-fetch`
2090
+ ), new Error("Builder SDK could not find a global `fetch` function");
2091
+ return e;
2092
+ }
2093
+ const Ie = Mn();
2094
+ function X(e, t = null, n = ".") {
2095
+ return Object.keys(e).reduce((o, r) => {
2096
+ const i = e[r], s = [t, r].filter(Boolean).join(n);
2097
+ return [
2098
+ typeof i == "object",
2099
+ i !== null,
2100
+ !(Array.isArray(i) && i.length === 0)
2101
+ ].every(Boolean) ? { ...o, ...X(i, s, n) } : { ...o, [s]: i };
2102
+ }, {});
2103
+ }
2104
+ const se = "builder.", Ln = "options.", Wn = (e) => {
2105
+ const t = {};
2106
+ return e.forEach((n, o) => {
2107
+ t[o] = n;
2108
+ }), t;
2109
+ }, Hn = (e) => {
2110
+ if (!e)
2111
+ return {};
2112
+ const t = Re(e), n = {};
2113
+ return Object.keys(t).forEach((o) => {
2114
+ if (o.startsWith(se)) {
2115
+ const r = o.replace(se, "").replace(Ln, "");
2116
+ n[r] = t[o];
2117
+ }
2118
+ }), n;
2119
+ }, Kn = () => {
2120
+ if (!C())
2121
+ return {};
2122
+ const e = new URLSearchParams(window.location.search);
2123
+ return Hn(e);
2124
+ }, Re = (e) => e instanceof URLSearchParams ? Wn(e) : e, zn = "v3", Ee = (e) => {
2125
+ const {
2126
+ limit: t = 30,
2127
+ userAttributes: n,
2128
+ query: o,
2129
+ noTraverse: r = !1,
2130
+ model: i,
2131
+ apiKey: s,
2132
+ includeRefs: l = !0,
2133
+ enrich: a,
2134
+ locale: c,
2135
+ apiVersion: u = zn
2136
+ } = e;
2137
+ if (!s)
2138
+ throw new Error("Missing API key");
2139
+ if (!["v2", "v3"].includes(u))
2140
+ throw new Error(
2141
+ `Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`
2142
+ );
2143
+ const p = new URL(
2144
+ `https://cdn.builder.io/api/${u}/content/${i}?apiKey=${s}&limit=${t}&noTraverse=${r}&includeRefs=${l}${c ? `&locale=${c}` : ""}${a ? `&enrich=${a}` : ""}`
2145
+ ), h = {
2146
+ ...Kn(),
2147
+ ...Re(e.options || {})
2148
+ }, k = X(h);
2149
+ for (const b in k)
2150
+ p.searchParams.set(b, String(k[b]));
2151
+ if (n && p.searchParams.set("userAttributes", JSON.stringify(n)), o) {
2152
+ const b = X({ query: o });
2153
+ for (const w in b)
2154
+ p.searchParams.set(w, JSON.stringify(b[w]));
2155
+ }
2156
+ return p;
2157
+ }, Ae = (e) => "results" in e;
2158
+ async function _e(e) {
2159
+ const t = await Gn({ ...e, limit: 1 });
2160
+ return t && Ae(t) && t.results[0] || null;
2161
+ }
2162
+ const Dn = async (e) => {
2163
+ const t = Ee(e);
2164
+ return await (await Ie(t.href)).json();
2165
+ }, qn = async (e, t) => {
2166
+ const n = M(e.canTrack);
2167
+ if (!n || !(C() || _ === "reactNative"))
2168
+ return t;
2169
+ try {
2170
+ const o = [];
2171
+ for (const r of t.results)
2172
+ o.push(await Fn({ item: r, canTrack: n }));
2173
+ t.results = o;
2174
+ } catch (o) {
2175
+ A.error("Could not process A/B tests. ", o);
2176
+ }
2177
+ return t;
2178
+ };
2179
+ async function Gn(e) {
2180
+ try {
2181
+ const t = Ee(e), n = await Dn(e);
2182
+ return Ae(n) ? qn(e, n) : (A.error("Error fetching data. ", { url: t, content: n, options: e }), n);
2183
+ } catch (t) {
2184
+ return A.error("Error fetching data. ", t), null;
2185
+ }
2186
+ }
2187
+ function Jn() {
2188
+ return !C() || E() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
2189
+ }
2190
+ const Yn = [], Xn = ({
2191
+ component: e,
2192
+ ...t
2193
+ }) => ({
2194
+ type: "builder.registerComponent",
2195
+ data: Zn(t)
2196
+ }), Qn = (e) => typeof e == "function" ? D(e) : K(e), Zn = ({
2197
+ inputs: e,
2198
+ ...t
2199
+ }) => ({
2200
+ ...K(t),
2201
+ inputs: e == null ? void 0 : e.map(
2202
+ (n) => Object.entries(n).reduce(
2203
+ (o, [r, i]) => ({
2204
+ ...o,
2205
+ [r]: Qn(i)
2206
+ }),
2207
+ {}
2208
+ )
2209
+ )
2210
+ });
2211
+ function eo() {
2212
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
2213
+ const t = Math.random() * 16 | 0;
2214
+ return (e == "x" ? t : t & 3 | 8).toString(16);
2215
+ });
2216
+ }
2217
+ function Be() {
2218
+ return eo().replace(/-/g, "");
2219
+ }
2220
+ const Ve = "builderSessionId", to = async ({
2221
+ canTrack: e
2222
+ }) => {
2223
+ if (!e)
2224
+ return;
2225
+ const t = await Ce({
2226
+ name: Ve,
2227
+ canTrack: e
2228
+ });
2229
+ if (I(t))
2230
+ return t;
2231
+ {
2232
+ const n = no();
2233
+ return oo({ id: n, canTrack: e }), n;
2234
+ }
2235
+ }, no = () => Be(), oo = ({
2236
+ id: e,
2237
+ canTrack: t
2238
+ }) => $e({ name: Ve, value: e, canTrack: t }), Pe = () => C() && typeof localStorage < "u" ? localStorage : void 0, ro = ({
2239
+ key: e,
2240
+ canTrack: t
2241
+ }) => {
2242
+ var n;
2243
+ try {
2244
+ return t ? (n = Pe()) == null ? void 0 : n.getItem(e) : void 0;
2245
+ } catch (o) {
2246
+ console.debug("[LocalStorage] GET error: ", o);
2247
+ return;
2248
+ }
2249
+ }, io = ({
2250
+ key: e,
2251
+ canTrack: t,
2252
+ value: n
2253
+ }) => {
2254
+ var o;
2255
+ try {
2256
+ t && ((o = Pe()) == null || o.setItem(e, n));
2257
+ } catch (r) {
2258
+ console.debug("[LocalStorage] SET error: ", r);
2259
+ }
2260
+ }, Oe = "builderVisitorId", so = ({ canTrack: e }) => {
2261
+ if (!e)
2262
+ return;
2263
+ const t = ro({
2264
+ key: Oe,
2265
+ canTrack: e
2266
+ });
2267
+ if (I(t))
2268
+ return t;
2269
+ {
2270
+ const n = ao();
2271
+ return lo({ id: n, canTrack: e }), n;
2272
+ }
2273
+ }, ao = () => Be(), lo = ({
2274
+ id: e,
2275
+ canTrack: t
2276
+ }) => io({
2277
+ key: Oe,
2278
+ value: e,
2279
+ canTrack: t
2280
+ }), co = () => {
2281
+ if (C()) {
2282
+ const e = new URL(location.href);
2283
+ return e.pathname === "" && (e.pathname = "/"), e;
2284
+ } else
2285
+ return console.warn("Cannot get location for tracking in non-browser environment"), null;
2286
+ }, uo = () => typeof navigator == "object" && navigator.userAgent || "", po = () => {
2287
+ const e = uo(), t = {
2288
+ Android() {
2289
+ return e.match(/Android/i);
2290
+ },
2291
+ BlackBerry() {
2292
+ return e.match(/BlackBerry/i);
2293
+ },
2294
+ iOS() {
2295
+ return e.match(/iPhone|iPod/i);
2296
+ },
2297
+ Opera() {
2298
+ return e.match(/Opera Mini/i);
2299
+ },
2300
+ Windows() {
2301
+ return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
2302
+ },
2303
+ any() {
2304
+ return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || _ === "reactNative";
2305
+ }
2306
+ }, n = e.match(/Tablet|iPad/i), o = co();
2307
+ return {
2308
+ urlPath: o == null ? void 0 : o.pathname,
2309
+ host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
2310
+ device: n ? "tablet" : t.any() ? "mobile" : "desktop"
2311
+ };
2312
+ }, mo = async ({
2313
+ canTrack: e
2314
+ }) => {
2315
+ if (!e)
2316
+ return { visitorId: void 0, sessionId: void 0 };
2317
+ const t = await to({ canTrack: e }), n = so({ canTrack: e });
2318
+ return {
2319
+ sessionId: t,
2320
+ visitorId: n
2321
+ };
2322
+ }, ho = async ({
2323
+ type: e,
2324
+ canTrack: t,
2325
+ apiKey: n,
2326
+ metadata: o,
2327
+ ...r
2328
+ }) => ({
2329
+ type: e,
2330
+ data: {
2331
+ ...r,
2332
+ metadata: {
2333
+ url: location.href,
2334
+ ...o
2335
+ },
2336
+ ...await mo({ canTrack: t }),
2337
+ userAttributes: po(),
2338
+ ownerId: n
2339
+ }
2340
+ });
2341
+ async function Q(e) {
2342
+ if (!e.apiKey) {
2343
+ A.error(
2344
+ "Missing API key for track call. Please provide your API key."
2345
+ );
2346
+ return;
2347
+ }
2348
+ if (!!e.canTrack && !E() && !!(C() || _ === "reactNative"))
2349
+ return fetch("https://builder.io/api/v1/track", {
2350
+ method: "POST",
2351
+ body: JSON.stringify({
2352
+ events: [await ho(e)]
2353
+ }),
2354
+ headers: {
2355
+ "content-type": "application/json"
2356
+ },
2357
+ mode: "cors"
2358
+ }).catch((t) => {
2359
+ console.error("Failed to track: ", t);
2360
+ });
2361
+ }
2362
+ const Do = (e) => Q({ ...e, canTrack: !0 }), fo = (e) => {
2363
+ var i, s;
2364
+ const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (s = e.fileUrl) != null ? s : (i = e == null ? void 0 : e.files) == null ? void 0 : i.regular;
2365
+ let r = "";
2366
+ if (o && t && n && (r += `
2367
+ @font-face {
2368
+ font-family: "${t}";
2369
+ src: local("${n}"), url('${o}') format('woff2');
2370
+ font-display: fallback;
2371
+ font-weight: 400;
2372
+ }
2373
+ `.trim()), e.files)
2374
+ for (const l in e.files) {
2375
+ if (!(String(Number(l)) === l))
2376
+ continue;
2377
+ const c = e.files[l];
2378
+ c && c !== o && (r += `
2379
+ @font-face {
2380
+ font-family: "${t}";
2381
+ src: url('${c}') format('woff2');
2382
+ font-display: fallback;
2383
+ font-weight: ${l};
2384
+ }
2385
+ `.trim());
2386
+ }
2387
+ return r;
2388
+ }, bo = ({ customFonts: e }) => {
2389
+ var t;
2390
+ return ((t = e == null ? void 0 : e.map((n) => fo(n))) == null ? void 0 : t.join(" ")) || "";
2391
+ }, go = ({
2392
+ cssCode: e,
2393
+ contentId: t
2394
+ }) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", yo = g({
2395
+ name: "render-content-styles",
2396
+ components: { RenderInlinedStyles: z },
2397
+ props: ["cssCode", "contentId", "customFonts"],
2398
+ data() {
2399
+ return {
2400
+ injectedStyles: `
2401
+ ${go({
2402
+ cssCode: this.cssCode,
2403
+ contentId: this.contentId
2404
+ })}
2405
+ ${bo({
2406
+ customFonts: this.customFonts
2407
+ })}
2408
+
2409
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
2410
+ margin: 0;
2411
+ }
2412
+ .builder-text > p, .builder-text > .builder-paragraph {
2413
+ color: inherit;
2414
+ line-height: inherit;
2415
+ letter-spacing: inherit;
2416
+ font-weight: inherit;
2417
+ font-size: inherit;
2418
+ text-align: inherit;
2419
+ font-family: inherit;
2420
+ }
2421
+ `.trim()
2422
+ };
2423
+ }
2424
+ });
2425
+ function ko(e, t, n, o, r, i) {
2426
+ const s = S("render-inlined-styles");
2427
+ return d(), f(s, { styles: e.injectedStyles }, null, 8, ["styles"]);
2428
+ }
2429
+ const So = /* @__PURE__ */ y(yo, [["render", ko]]), vo = "0.4.3", ae = {};
2430
+ function Co(e, t) {
2431
+ let n = ae[e];
2432
+ if (n || (n = ae[e] = []), n.push(t), C()) {
2433
+ const o = {
2434
+ type: "builder.register",
2435
+ data: {
2436
+ type: e,
2437
+ info: t
2438
+ }
2439
+ };
2440
+ try {
2441
+ parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
2442
+ } catch (r) {
2443
+ console.debug("Could not postmessage", r);
2444
+ }
2445
+ }
2446
+ }
2447
+ const $o = () => {
2448
+ Co("insertMenu", {
2449
+ name: "_default",
2450
+ default: !0,
2451
+ items: [
2452
+ { name: "Box" },
2453
+ { name: "Text" },
2454
+ { name: "Image" },
2455
+ { name: "Columns" },
2456
+ { name: "Core:Section" },
2457
+ { name: "Core:Button" },
2458
+ { name: "Embed" },
2459
+ { name: "Custom Code" }
2460
+ ]
2461
+ });
2462
+ };
2463
+ let le = !1;
2464
+ const wo = (e = {}) => {
2465
+ var t, n;
2466
+ le || (le = !0, C() && ((t = window.parent) == null || t.postMessage(
2467
+ {
2468
+ type: "builder.sdkInfo",
2469
+ data: {
2470
+ target: _,
2471
+ version: vo,
2472
+ supportsPatchUpdates: !1,
2473
+ supportsAddBlockScoping: !0,
2474
+ supportsCustomBreakpoints: !0
2475
+ }
2476
+ },
2477
+ "*"
2478
+ ), (n = window.parent) == null || n.postMessage(
2479
+ {
2480
+ type: "builder.updateContent",
2481
+ data: {
2482
+ options: e
2483
+ }
2484
+ },
2485
+ "*"
2486
+ ), window.addEventListener("message", ({ data: o }) => {
2487
+ var r, i;
2488
+ if (!!(o != null && o.type))
2489
+ switch (o.type) {
2490
+ case "builder.evaluate": {
2491
+ const s = o.data.text, l = o.data.arguments || [], a = o.data.id, c = new Function(s);
2492
+ let u, p = null;
2493
+ try {
2494
+ u = c.apply(null, l);
2495
+ } catch (h) {
2496
+ p = h;
2497
+ }
2498
+ p ? (r = window.parent) == null || r.postMessage(
2499
+ {
2500
+ type: "builder.evaluateError",
2501
+ data: { id: a, error: p.message }
2502
+ },
2503
+ "*"
2504
+ ) : u && typeof u.then == "function" ? u.then((h) => {
2505
+ var k;
2506
+ (k = window.parent) == null || k.postMessage(
2507
+ {
2508
+ type: "builder.evaluateResult",
2509
+ data: { id: a, result: h }
2510
+ },
2511
+ "*"
2512
+ );
2513
+ }).catch(console.error) : (i = window.parent) == null || i.postMessage(
2514
+ {
2515
+ type: "builder.evaluateResult",
2516
+ data: { result: u, id: a }
2517
+ },
2518
+ "*"
2519
+ );
2520
+ break;
2521
+ }
2522
+ }
2523
+ })));
2524
+ };
2525
+ function ce(e) {
2526
+ return Math.round(e * 1e3) / 1e3;
2527
+ }
2528
+ const To = (e, t, n = !0) => {
2529
+ if (!(e instanceof HTMLElement))
2530
+ return null;
2531
+ let o = n ? e : e.parentElement;
2532
+ do {
2533
+ if (!o)
2534
+ return null;
2535
+ if (t(o))
2536
+ return o;
2537
+ } while (o = o.parentElement);
2538
+ return null;
2539
+ }, xo = (e) => To(e, (t) => {
2540
+ const n = t.getAttribute("builder-id") || t.id;
2541
+ return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
2542
+ }), de = ({
2543
+ event: e,
2544
+ target: t
2545
+ }) => {
2546
+ const n = t.getBoundingClientRect(), o = e.clientX - n.left, r = e.clientY - n.top, i = ce(o / n.width), s = ce(r / n.height);
2547
+ return {
2548
+ x: i,
2549
+ y: s
2550
+ };
2551
+ }, Io = (e) => {
2552
+ const t = e.target, n = t && xo(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
2553
+ return {
2554
+ targetBuilderElement: o || void 0,
2555
+ metadata: {
2556
+ targetOffset: t ? de({ event: e, target: t }) : void 0,
2557
+ builderTargetOffset: n ? de({ event: e, target: n }) : void 0,
2558
+ builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
2559
+ }
2560
+ };
2561
+ }, Ro = ({
2562
+ content: e,
2563
+ data: t,
2564
+ locale: n
2565
+ }) => {
2566
+ var i, s, l;
2567
+ const o = {};
2568
+ (s = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || s.forEach((a) => {
2569
+ var c;
2570
+ a.name && a.defaultValue !== void 0 && ((c = e == null ? void 0 : e.data) == null ? void 0 : c.state) && e.data.state[a.name] === void 0 && (o[a.name] = a.defaultValue);
2571
+ });
2572
+ const r = {
2573
+ ...(l = e == null ? void 0 : e.data) == null ? void 0 : l.state,
2574
+ ...t,
2575
+ ...n ? { locale: n } : {}
2576
+ };
2577
+ return { ...o, ...r };
2578
+ }, Eo = ({
2579
+ content: e,
2580
+ data: t
2581
+ }) => e ? {
2582
+ ...e,
2583
+ data: {
2584
+ ...e == null ? void 0 : e.data,
2585
+ ...t
2586
+ },
2587
+ meta: e == null ? void 0 : e.meta
2588
+ } : void 0, L = (e) => Object.values((e == null ? void 0 : e.variations) || {}), ue = ({
2589
+ canTrack: e,
2590
+ content: t
2591
+ }) => !(!(L(t).length > 0) || !e || C());
2592
+ function Ao(e, t, n) {
2593
+ function o() {
2594
+ function s(k, b, w) {
2595
+ let B = "";
2596
+ if (w) {
2597
+ const T = new Date();
2598
+ T.setTime(T.getTime() + w * 24 * 60 * 60 * 1e3), B = "; expires=" + T.toUTCString();
2599
+ }
2600
+ document.cookie = k + "=" + (b || "") + B + "; path=/; Secure; SameSite=None";
2601
+ }
2602
+ function l(k) {
2603
+ const b = k + "=", w = document.cookie.split(";");
2604
+ for (let B = 0; B < w.length; B++) {
2605
+ let T = w[B];
2606
+ for (; T.charAt(0) === " "; )
2607
+ T = T.substring(1, T.length);
2608
+ if (T.indexOf(b) === 0)
2609
+ return T.substring(b.length, T.length);
2610
+ }
2611
+ return null;
2612
+ }
2613
+ const a = `builder.tests.${e}`, c = l(a), u = t.map((k) => k.id).concat(e);
2614
+ if (c && u.includes(c))
2615
+ return c;
2616
+ let p = 0;
2617
+ const h = Math.random();
2618
+ for (let k = 0; k < t.length; k++) {
2619
+ const b = t[k], w = b.testRatio;
2620
+ if (p += w, h < p)
2621
+ return s(a, b.id), b.id;
2622
+ }
2623
+ return s(a, e), e;
2624
+ }
2625
+ const r = o(), i = document.getElementById(
2626
+ `variants-styles-${e}`
2627
+ );
2628
+ if (n) {
2629
+ i.remove();
2630
+ const s = document.getElementById(
2631
+ `variants-script-${e}`
2632
+ );
2633
+ s == null || s.remove();
2634
+ } else {
2635
+ const s = t.concat({ id: e }).filter((l) => l.id !== r).map((l) => `.variant-${l.id} { display: none; }
2636
+ `).join("");
2637
+ i.innerHTML = s;
2638
+ }
2639
+ }
2640
+ function _o(e, t, n) {
2641
+ if (!navigator.cookieEnabled)
2642
+ return;
2643
+ function o(a) {
2644
+ const c = a + "=", u = document.cookie.split(";");
2645
+ for (let p = 0; p < u.length; p++) {
2646
+ let h = u[p];
2647
+ for (; h.charAt(0) === " "; )
2648
+ h = h.substring(1, h.length);
2649
+ if (h.indexOf(c) === 0)
2650
+ return h.substring(c.length, h.length);
2651
+ }
2652
+ return null;
2653
+ }
2654
+ const r = `builder.tests.${t}`, i = o(r), s = document.querySelector(
2655
+ `[builder-content-id="${e}"]`
2656
+ ), l = e === t;
2657
+ if (i === e) {
2658
+ if (l)
2659
+ return;
2660
+ s == null || s.removeAttribute("hidden"), s == null || s.removeAttribute("aria-hidden");
2661
+ } else {
2662
+ l && (n ? s == null || s.remove() : (s == null || s.setAttribute("hidden", "true"), s == null || s.setAttribute("aria-hidden", "true")));
2663
+ return;
2664
+ }
2665
+ }
2666
+ const Bo = (e) => e === "react" || e === "reactNative" || e === "vue3" || e === "vue2", je = Bo(_), pe = "bldrAbTest", Ne = "bldrCntntScrpt", Vo = (e, t) => {
2667
+ const n = Ao.toString().replace(/\s+/g, " "), o = _o.toString().replace(/\s+/g, " ");
2668
+ return `
2669
+ const ${pe} = ${n}
2670
+ const ${Ne} = ${o}
2671
+ ${pe}("${t}", ${JSON.stringify(
2672
+ e
2673
+ )}, ${je})
2674
+ `;
2675
+ }, Po = ({
2676
+ parentContentId: e,
2677
+ contentId: t
2678
+ }) => `
2679
+ ${Ne}("${t}", "${e}", ${je})`, Oo = Me, jo = g({
2680
+ name: "render-content",
2681
+ components: {
2682
+ RenderContentStyles: So,
2683
+ RenderBlocks: Se
2684
+ },
2685
+ props: [
2686
+ "canTrack",
2687
+ "model",
2688
+ "context",
2689
+ "apiKey",
2690
+ "content",
2691
+ "parentContentId",
2692
+ "data",
2693
+ "locale",
2694
+ "apiVersion",
2695
+ "customComponents",
2696
+ "hideContent",
2697
+ "classNameProp",
2698
+ "isSsrAbTest",
2699
+ "includeRefs",
2700
+ "enrich"
2701
+ ],
2702
+ data() {
2703
+ var e;
2704
+ return {
2705
+ forceReRenderCount: 0,
2706
+ overrideContent: null,
2707
+ update: 0,
2708
+ canTrackToUse: I(this.canTrack) ? this.canTrack : !0,
2709
+ httpReqsData: {},
2710
+ clicked: !1,
2711
+ scriptStr: Po({
2712
+ contentId: (e = this.content) == null ? void 0 : e.id,
2713
+ parentContentId: this.parentContentId
2714
+ }),
2715
+ builderContextSignal: {
2716
+ content: Eo({
2717
+ content: this.content,
2718
+ data: this.data
2719
+ }),
2720
+ localState: void 0,
2721
+ rootState: Ro({
2722
+ content: this.content,
2723
+ data: this.data,
2724
+ locale: this.locale
2725
+ }),
2726
+ rootSetState: this.contentSetState,
2727
+ context: this.context || {},
2728
+ apiKey: this.apiKey,
2729
+ apiVersion: this.apiVersion,
2730
+ registeredComponents: [
2731
+ ...In(),
2732
+ ...Yn,
2733
+ ...this.customComponents || []
2734
+ ].reduce(
2735
+ (t, { component: n, ...o }) => ({
2736
+ ...t,
2737
+ [o.name]: {
2738
+ component: Oo(n),
2739
+ ...o
2740
+ }
2741
+ }),
2742
+ {}
2743
+ ),
2744
+ inheritedStyles: {}
2745
+ },
2746
+ builderContext: O,
2747
+ TARGET: _
2748
+ };
2749
+ },
2750
+ provide() {
2751
+ const e = this;
2752
+ return {
2753
+ [O.key]: e.builderContextSignal
2754
+ };
2755
+ },
2756
+ mounted() {
2757
+ var e, t;
2758
+ if (this.apiKey || A.error(
2759
+ "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
2760
+ ), C()) {
2761
+ if (E() && (this.forceReRenderCount = this.forceReRenderCount + 1, $o(), wo({
2762
+ ...this.locale ? {
2763
+ locale: this.locale
2764
+ } : {},
2765
+ ...this.includeRefs ? {
2766
+ includeRefs: this.includeRefs
2767
+ } : {},
2768
+ ...this.enrich ? {
2769
+ enrich: this.enrich
2770
+ } : {}
2771
+ }), Object.values(
2772
+ this.builderContextSignal.registeredComponents
2773
+ ).forEach((n) => {
2774
+ var r;
2775
+ const o = Xn(n);
2776
+ (r = window.parent) == null || r.postMessage(o, "*");
2777
+ }), window.addEventListener("message", this.processMessage), window.addEventListener(
2778
+ "builder:component:stateChangeListenerActivated",
2779
+ this.emitStateUpdate
2780
+ )), this.builderContextSignal.content) {
2781
+ const n = (e = this.builderContextSignal.content) == null ? void 0 : e.testVariationId, o = (t = this.builderContextSignal.content) == null ? void 0 : t.id;
2782
+ Q({
2783
+ type: "impression",
2784
+ canTrack: this.canTrackToUse,
2785
+ contentId: o,
2786
+ apiKey: this.apiKey,
2787
+ variationId: n !== o ? n : void 0
2788
+ });
2789
+ }
2790
+ if (Jn()) {
2791
+ const n = new URL(location.href).searchParams, o = n.get("builder.preview"), r = n.get(
2792
+ `builder.preview.${o}`
2793
+ ), i = n.get("apiKey") || n.get("builder.space");
2794
+ o === this.model && i === this.apiKey && (!this.content || r === this.content.id) && _e({
2795
+ model: this.model,
2796
+ apiKey: this.apiKey,
2797
+ apiVersion: this.apiVersion
2798
+ }).then((s) => {
2799
+ s && this.mergeNewContent(s);
2800
+ });
2801
+ }
2802
+ this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
2803
+ }
2804
+ },
2805
+ watch: {
2806
+ onUpdateHook0: {
2807
+ handler() {
2808
+ this.content && this.mergeNewContent(this.content);
2809
+ },
2810
+ immediate: !0
2811
+ },
2812
+ onUpdateHook1: {
2813
+ handler() {
2814
+ this.evaluateJsCode();
2815
+ },
2816
+ immediate: !0
2817
+ },
2818
+ onUpdateHook2: {
2819
+ handler() {
2820
+ this.runHttpRequests();
2821
+ },
2822
+ immediate: !0
2823
+ },
2824
+ onUpdateHook3: {
2825
+ handler() {
2826
+ this.emitStateUpdate();
2827
+ },
2828
+ immediate: !0
2829
+ }
2830
+ },
2831
+ unmounted() {
2832
+ C() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
2833
+ "builder:component:stateChangeListenerActivated",
2834
+ this.emitStateUpdate
2835
+ ));
2836
+ },
2837
+ computed: {
2838
+ onUpdateHook0() {
2839
+ return {
2840
+ 0: this.content
2841
+ };
2842
+ },
2843
+ onUpdateHook1() {
2844
+ var e, t;
2845
+ return {
2846
+ 0: (t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.jsCode,
2847
+ 1: this.builderContextSignal.rootState
2848
+ };
2849
+ },
2850
+ onUpdateHook2() {
2851
+ var e, t;
2852
+ return {
2853
+ 0: (t = (e = this.builderContextSignal.content) == null ? void 0 : e.data) == null ? void 0 : t.httpRequests
2854
+ };
2855
+ },
2856
+ onUpdateHook3() {
2857
+ return {
2858
+ 0: this.builderContextSignal.rootState
2859
+ };
2860
+ }
2861
+ },
2862
+ methods: {
2863
+ mergeNewContent(e) {
2864
+ var t, n, o, r, i;
2865
+ this.builderContextSignal.content = {
2866
+ ...this.builderContextSignal.content,
2867
+ ...e,
2868
+ data: {
2869
+ ...(t = this.builderContextSignal.content) == null ? void 0 : t.data,
2870
+ ...e == null ? void 0 : e.data
2871
+ },
2872
+ meta: {
2873
+ ...(n = this.builderContextSignal.content) == null ? void 0 : n.meta,
2874
+ ...e == null ? void 0 : e.meta,
2875
+ breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((i = (r = this.builderContextSignal.content) == null ? void 0 : r.meta) == null ? void 0 : i.breakpoints)
2876
+ }
2877
+ };
2878
+ },
2879
+ setBreakpoints(e) {
2880
+ var t;
2881
+ this.builderContextSignal.content = {
2882
+ ...this.builderContextSignal.content,
2883
+ meta: {
2884
+ ...(t = this.builderContextSignal.content) == null ? void 0 : t.meta,
2885
+ breakpoints: e
2886
+ }
2887
+ };
2888
+ },
2889
+ contentSetState(e) {
2890
+ this.builderContextSignal.rootState = e;
2891
+ },
2892
+ processMessage(e) {
2893
+ var n;
2894
+ const { data: t } = e;
2895
+ if (t)
2896
+ switch (t.type) {
2897
+ case "builder.configureSdk": {
2898
+ const o = t.data, { breakpoints: r, contentId: i } = o;
2899
+ if (!i || i !== ((n = this.builderContextSignal.content) == null ? void 0 : n.id))
2900
+ return;
2901
+ r && this.setBreakpoints(r), this.forceReRenderCount = this.forceReRenderCount + 1;
2902
+ break;
2903
+ }
2904
+ case "builder.contentUpdate": {
2905
+ const o = t.data, r = o.key || o.alias || o.entry || o.modelName, i = o.data;
2906
+ r === this.model && (this.mergeNewContent(i), this.forceReRenderCount = this.forceReRenderCount + 1);
2907
+ break;
2908
+ }
2909
+ }
2910
+ },
2911
+ evaluateJsCode() {
2912
+ var t, n;
2913
+ const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
2914
+ e && F({
2915
+ code: e,
2916
+ context: this.context || {},
2917
+ localState: void 0,
2918
+ rootState: this.builderContextSignal.rootState,
2919
+ rootSetState: this.contentSetState
2920
+ });
2921
+ },
2922
+ onClick(e) {
2923
+ var t, n;
2924
+ if (this.builderContextSignal.content) {
2925
+ const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, r = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
2926
+ Q({
2927
+ type: "click",
2928
+ canTrack: this.canTrackToUse,
2929
+ contentId: r,
2930
+ apiKey: this.apiKey,
2931
+ variationId: o !== r ? o : void 0,
2932
+ ...Io(e),
2933
+ unique: !this.clicked
2934
+ });
2935
+ }
2936
+ this.clicked || (this.clicked = !0);
2937
+ },
2938
+ evalExpression(e) {
2939
+ return e.replace(
2940
+ /{{([^}]+)}}/g,
2941
+ (t, n) => F({
2942
+ code: n,
2943
+ context: this.context || {},
2944
+ localState: void 0,
2945
+ rootState: this.builderContextSignal.rootState,
2946
+ rootSetState: this.contentSetState
2947
+ })
2948
+ );
2949
+ },
2950
+ handleRequest({ url: e, key: t }) {
2951
+ Ie(e).then((n) => n.json()).then((n) => {
2952
+ const o = {
2953
+ ...this.builderContextSignal.rootState,
2954
+ [t]: n
2955
+ };
2956
+ this.contentSetState(o);
2957
+ }).catch((n) => {
2958
+ console.error("error fetching dynamic data", e, n);
2959
+ });
2960
+ },
2961
+ runHttpRequests() {
2962
+ var t, n, o;
2963
+ const e = (o = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) != null ? o : {};
2964
+ Object.entries(e).forEach(([r, i]) => {
2965
+ if (i && (!this.httpReqsData[r] || E())) {
2966
+ const s = this.evalExpression(i);
2967
+ this.handleRequest({
2968
+ url: s,
2969
+ key: r
2970
+ });
2971
+ }
2972
+ });
2973
+ },
2974
+ emitStateUpdate() {
2975
+ E() && window.dispatchEvent(
2976
+ new CustomEvent(
2977
+ "builder:component:stateChange",
2978
+ {
2979
+ detail: {
2980
+ state: this.builderContextSignal.rootState,
2981
+ ref: {
2982
+ name: this.model
2983
+ }
2984
+ }
2985
+ }
2986
+ )
2987
+ );
2988
+ },
2989
+ _classStringToObject(e) {
2990
+ const t = {};
2991
+ if (typeof e != "string")
2992
+ return t;
2993
+ const n = e.trim().split(/\s+/);
2994
+ for (const o of n)
2995
+ t[o] = !0;
2996
+ return t;
2997
+ }
2998
+ }
2999
+ }), No = ["builder-content-id", "builder-model"];
3000
+ function Fo(e, t, n, o, r, i) {
3001
+ var a, c, u, p, h, k, b, w;
3002
+ const s = S("render-content-styles"), l = S("render-blocks");
3003
+ return e.builderContextSignal.content ? (d(), m("div", x({
3004
+ key: 0,
3005
+ ref: "elementRef",
3006
+ onClick: t[0] || (t[0] = (B) => e.onClick(B)),
3007
+ "builder-content-id": (a = e.builderContextSignal.content) == null ? void 0 : a.id,
3008
+ "builder-model": e.model,
3009
+ class: e._classStringToObject(e.classNameProp)
3010
+ }, {
3011
+ ...e.TARGET === "reactNative" ? {
3012
+ dataSet: {
3013
+ "builder-content-id": ""
3014
+ }
3015
+ } : {},
3016
+ ...e.hideContent ? {
3017
+ hidden: !0,
3018
+ "aria-hidden": !0
3019
+ } : {}
3020
+ }), [
3021
+ e.isSsrAbTest ? (d(), f(P("script"), {
3022
+ key: 0,
3023
+ innerHTML: e.scriptStr
3024
+ }, null, 8, ["innerHTML"])) : v("", !0),
3025
+ e.TARGET !== "reactNative" ? (d(), f(s, {
3026
+ key: 1,
3027
+ contentId: (c = e.builderContextSignal.content) == null ? void 0 : c.id,
3028
+ cssCode: (p = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : p.cssCode,
3029
+ customFonts: (k = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : k.customFonts
3030
+ }, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
3031
+ (d(), f(l, {
3032
+ blocks: (w = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : w.blocks,
3033
+ key: e.forceReRenderCount
3034
+ }, null, 8, ["blocks"]))
3035
+ ], 16, No)) : v("", !0);
3036
+ }
3037
+ const Fe = /* @__PURE__ */ y(jo, [["render", Fo]]), Uo = g({
3038
+ name: "builder-symbol",
3039
+ components: { RenderContent: Fe },
3040
+ props: ["attributes", "symbol", "dynamic"],
3041
+ data() {
3042
+ var e, t, n;
3043
+ return {
3044
+ className: [
3045
+ ...Object.keys(this.attributes.class),
3046
+ "builder-symbol",
3047
+ (e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
3048
+ ((t = this.symbol) == null ? void 0 : t.dynamic) || this.dynamic ? "builder-dynamic-symbol" : void 0
3049
+ ].filter(Boolean).join(" "),
3050
+ contentToUse: (n = this.symbol) == null ? void 0 : n.content
3051
+ };
3052
+ },
3053
+ inject: {
3054
+ builderContext: O.key
3055
+ },
3056
+ mounted() {
3057
+ this.fetchContent();
3058
+ },
3059
+ watch: {
3060
+ onUpdateHook0: {
3061
+ handler() {
3062
+ this.fetchContent();
3063
+ },
3064
+ immediate: !0
3065
+ }
3066
+ },
3067
+ computed: {
3068
+ onUpdateHook0() {
3069
+ return {
3070
+ 0: this.symbol
3071
+ };
3072
+ }
3073
+ },
3074
+ methods: {
3075
+ fetchContent() {
3076
+ var e, t;
3077
+ !this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((t = this.builderContext) == null ? void 0 : t.apiKey) && _e({
3078
+ model: this.symbol.model,
3079
+ apiKey: this.builderContext.apiKey,
3080
+ apiVersion: this.builderContext.apiVersion,
3081
+ query: {
3082
+ id: this.symbol.entry
3083
+ }
3084
+ }).then((n) => {
3085
+ n && (this.contentToUse = n);
3086
+ }).catch((n) => {
3087
+ A.error("Could not fetch symbol content: ", n);
3088
+ });
3089
+ },
3090
+ filterAttrs: function(t = {}, n) {
3091
+ const o = "v-on:";
3092
+ return Object.keys(t).filter((r) => {
3093
+ if (!t[r])
3094
+ return !1;
3095
+ const i = r.startsWith(o);
3096
+ return n ? i : !i;
3097
+ }).reduce(
3098
+ (r, i) => ({
3099
+ ...r,
3100
+ [i.replace(o, "")]: t[i]
3101
+ }),
3102
+ {}
3103
+ );
3104
+ },
3105
+ _classStringToObject(e) {
3106
+ const t = {};
3107
+ if (typeof e != "string")
3108
+ return t;
3109
+ const n = e.trim().split(/\s+/);
3110
+ for (const o of n)
3111
+ t[o] = !0;
3112
+ return t;
3113
+ }
3114
+ }
3115
+ }), Mo = ["dataSet"];
3116
+ function Lo(e, t, n, o, r, i) {
3117
+ var l, a, c, u;
3118
+ const s = S("render-content");
3119
+ return d(), m("div", x({
3120
+ dataSet: {
3121
+ class: e.className
3122
+ },
3123
+ class: e._classStringToObject(e.className)
3124
+ }, e.filterAttrs(e.attributes, !1), V(e.filterAttrs(e.attributes, !0), !0)), [
3125
+ j(s, {
3126
+ apiVersion: e.builderContext.apiVersion,
3127
+ apiKey: e.builderContext.apiKey,
3128
+ context: e.builderContext.context,
3129
+ customComponents: Object.values(e.builderContext.registeredComponents),
3130
+ data: {
3131
+ ...(l = e.symbol) == null ? void 0 : l.data,
3132
+ ...e.builderContext.localState,
3133
+ ...(c = (a = e.contentToUse) == null ? void 0 : a.data) == null ? void 0 : c.state
3134
+ },
3135
+ model: (u = e.symbol) == null ? void 0 : u.model,
3136
+ content: e.contentToUse
3137
+ }, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
3138
+ ], 16, Mo);
3139
+ }
3140
+ const Wo = /* @__PURE__ */ y(Uo, [["render", Lo]]), Ho = g({
3141
+ name: "render-content-variants",
3142
+ components: {
3143
+ RenderInlinedStyles: z,
3144
+ RenderContent: Fe
3145
+ },
3146
+ props: [
3147
+ "content",
3148
+ "canTrack",
3149
+ "apiKey",
3150
+ "apiVersion",
3151
+ "customComponents",
3152
+ "model"
3153
+ ],
3154
+ data() {
3155
+ var e;
3156
+ return {
3157
+ variantScriptStr: Vo(
3158
+ L(this.content).map((t) => ({
3159
+ id: t.id,
3160
+ testRatio: t.testRatio
3161
+ })),
3162
+ ((e = this.content) == null ? void 0 : e.id) || ""
3163
+ ),
3164
+ shouldRenderVariants: ue({
3165
+ canTrack: M(this.canTrack),
3166
+ content: this.content
3167
+ }),
3168
+ hideVariantsStyleString: L(this.content).map((t) => `.variant-${t.id} { display: none; } `).join(""),
3169
+ contentToRender: ue({
3170
+ canTrack: M(this.canTrack),
3171
+ content: this.content
3172
+ }) ? this.content : Nn({
3173
+ item: this.content,
3174
+ canTrack: M(this.canTrack)
3175
+ }),
3176
+ getVariants: L
3177
+ };
3178
+ }
3179
+ });
3180
+ function Ko(e, t, n, o, r, i) {
3181
+ var a, c, u, p;
3182
+ const s = S("render-inlined-styles"), l = S("render-content");
3183
+ return d(), m($, null, [
3184
+ e.shouldRenderVariants ? (d(), m($, { key: 0 }, [
3185
+ j(s, {
3186
+ id: `variants-styles-${(a = e.content) == null ? void 0 : a.id}`,
3187
+ styles: e.hideVariantsStyleString
3188
+ }, null, 8, ["id", "styles"]),
3189
+ (d(), f(P("script"), {
3190
+ id: `variants-script-${(c = e.content) == null ? void 0 : c.id}`,
3191
+ innerHTML: e.variantScriptStr
3192
+ }, null, 8, ["id", "innerHTML"])),
3193
+ (d(!0), m($, null, R(e.getVariants(e.content), (h, k) => {
3194
+ var b;
3195
+ return d(), f(l, {
3196
+ key: h.id,
3197
+ content: h,
3198
+ apiKey: e.apiKey,
3199
+ apiVersion: e.apiVersion,
3200
+ canTrack: e.canTrack,
3201
+ customComponents: e.customComponents,
3202
+ hideContent: !0,
3203
+ parentContentId: (b = e.content) == null ? void 0 : b.id,
3204
+ isSsrAbTest: e.shouldRenderVariants
3205
+ }, null, 8, ["content", "apiKey", "apiVersion", "canTrack", "customComponents", "parentContentId", "isSsrAbTest"]);
3206
+ }), 128))
3207
+ ], 64)) : v("", !0),
3208
+ j(l, {
3209
+ model: e.model,
3210
+ content: e.contentToRender,
3211
+ apiKey: e.apiKey,
3212
+ apiVersion: e.apiVersion,
3213
+ canTrack: e.canTrack,
3214
+ customComponents: e.customComponents,
3215
+ classNameProp: `variant-${(u = e.content) == null ? void 0 : u.id}`,
3216
+ parentContentId: (p = e.content) == null ? void 0 : p.id,
3217
+ isSsrAbTest: e.shouldRenderVariants
3218
+ }, null, 8, ["model", "content", "apiKey", "apiVersion", "canTrack", "customComponents", "classNameProp", "parentContentId", "isSsrAbTest"])
3219
+ ], 64);
3220
+ }
3221
+ const qo = /* @__PURE__ */ y(Ho, [["render", Ko]]), me = {};
3222
+ function Go(e) {
3223
+ if (C()) {
3224
+ Object.assign(me, e);
3225
+ const t = {
3226
+ type: "builder.settingsChange",
3227
+ data: me
3228
+ };
3229
+ parent.postMessage(t, "*");
3230
+ }
3231
+ }
3
3232
  export {
4
- a as Button,
5
- n as Columns,
6
- o as Fragment,
7
- r as Image,
8
- i as RenderBlocks,
9
- g as RenderContent,
10
- m as Section,
11
- d as Symbol,
12
- l as Text,
13
- C as Video,
14
- c as createRegisterComponentMessage,
15
- p as getAllContent,
16
- u as getBuilderSearchParams,
17
- S as getContent,
18
- B as isEditing,
19
- R as isPreviewing,
20
- x as processContentResult,
21
- k as register,
22
- v as setEditorSettings,
23
- w as track
3233
+ Ke as Button,
3234
+ Bt as Columns,
3235
+ Ot as Fragment,
3236
+ Ht as Image,
3237
+ Se as RenderBlocks,
3238
+ qo as RenderContent,
3239
+ Dt as Section,
3240
+ Wo as Symbol,
3241
+ on as Text,
3242
+ cn as Video,
3243
+ Xn as createRegisterComponentMessage,
3244
+ Gn as getAllContent,
3245
+ Hn as getBuilderSearchParams,
3246
+ _e as getContent,
3247
+ E as isEditing,
3248
+ Jn as isPreviewing,
3249
+ qn as processContentResult,
3250
+ Co as register,
3251
+ Go as setEditorSettings,
3252
+ Do as track
24
3253
  };