@builder.io/sdk-vue 0.0.2-0 → 0.0.2-2

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 (39) hide show
  1. package/package.json +4 -4
  2. package/packages/_vue2/dist/block-styles.7900ea80.cjs +10 -0
  3. package/packages/_vue2/dist/block-styles.dd3d70e3.js +56 -0
  4. package/packages/_vue2/dist/get-processed-block.14848083.cjs +1 -0
  5. package/packages/_vue2/dist/get-processed-block.eda4b627.js +57 -0
  6. package/packages/_vue2/dist/index.9247eff2.cjs +4 -0
  7. package/packages/_vue2/dist/index.e1356b24.js +2081 -0
  8. package/packages/_vue2/dist/render-block.a2f51c18.js +237 -0
  9. package/packages/_vue2/dist/render-block.e4f18476.cjs +3 -0
  10. package/packages/_vue2/dist/render-component.76541f08.js +38 -0
  11. package/packages/_vue2/dist/render-component.fc56f8dc.cjs +1 -0
  12. package/packages/_vue2/dist/render-inlined-styles.0a71b4a1.cjs +1 -0
  13. package/packages/_vue2/dist/render-inlined-styles.fb54d112.js +31 -0
  14. package/packages/_vue2/dist/render-repeated-block.0990371f.cjs +1 -0
  15. package/packages/_vue2/dist/render-repeated-block.caf201fb.js +50 -0
  16. package/packages/_vue2/dist/render-styles.76adf086.cjs +17 -0
  17. package/packages/_vue2/dist/render-styles.79b15aed.js +70 -0
  18. package/packages/_vue2/dist/sdk.cjs +1 -0
  19. package/packages/_vue2/dist/sdk.js +27 -0
  20. package/packages/_vue2/dist/style.css +1 -0
  21. package/packages/_vue3/dist/block-styles.1f1fb83d.js +54 -0
  22. package/packages/_vue3/dist/block-styles.eb8f30fe.cjs +10 -0
  23. package/packages/_vue3/dist/get-processed-block.b7ff491d.cjs +1 -0
  24. package/packages/_vue3/dist/get-processed-block.c491559e.js +57 -0
  25. package/packages/_vue3/dist/index.36507004.cjs +4 -0
  26. package/packages/_vue3/dist/index.eb0e01ba.js +2067 -0
  27. package/packages/_vue3/dist/render-block.3cdd0c66.js +254 -0
  28. package/packages/_vue3/dist/render-block.98541a38.cjs +3 -0
  29. package/packages/_vue3/dist/render-component.442d659d.cjs +1 -0
  30. package/packages/_vue3/dist/render-component.963a01c2.js +44 -0
  31. package/packages/_vue3/dist/render-inlined-styles.1c41d49e.js +31 -0
  32. package/packages/_vue3/dist/render-inlined-styles.662df301.cjs +1 -0
  33. package/packages/_vue3/dist/render-repeated-block.2212c878.cjs +1 -0
  34. package/packages/_vue3/dist/render-repeated-block.760bb69a.js +46 -0
  35. package/packages/_vue3/dist/render-styles.750ea842.js +65 -0
  36. package/packages/_vue3/dist/render-styles.c0cc9565.cjs +17 -0
  37. package/packages/_vue3/dist/sdk.cjs +1 -0
  38. package/packages/_vue3/dist/sdk.js +28 -0
  39. package/packages/_vue3/dist/style.css +1 -0
@@ -0,0 +1,2067 @@
1
+ import { defineAsyncComponent as y, resolveComponent as v, openBlock as l, createElementBlock as d, normalizeStyle as C, Fragment as R, renderList as E, createVNode as z, createElementVNode as I, createCommentVNode as b, normalizeClass as O, renderSlot as k, mergeProps as x, toDisplayString as $, createBlock as w } from "vue";
2
+ const j = "reactNative";
3
+ function h() {
4
+ return typeof window < "u" && typeof document < "u";
5
+ }
6
+ const P = {};
7
+ function ae(e, n) {
8
+ let t = P[e];
9
+ if (t || (t = P[e] = []), t.push(n), h()) {
10
+ const o = {
11
+ type: "builder.register",
12
+ data: {
13
+ type: e,
14
+ info: n
15
+ }
16
+ };
17
+ try {
18
+ parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
19
+ } catch (r) {
20
+ console.debug("Could not postmessage", r);
21
+ }
22
+ }
23
+ }
24
+ const ie = () => {
25
+ ae("insertMenu", {
26
+ name: "_default",
27
+ default: !0,
28
+ items: [
29
+ { name: "Box" },
30
+ { name: "Text" },
31
+ { name: "Image" },
32
+ { name: "Columns" }
33
+ ]
34
+ });
35
+ }, ce = () => {
36
+ var e;
37
+ h() && ((e = window.parent) == null || e.postMessage(
38
+ {
39
+ type: "builder.sdkInfo",
40
+ data: {
41
+ target: j,
42
+ supportsPatchUpdates: !1
43
+ }
44
+ },
45
+ "*"
46
+ ), window.addEventListener("message", ({ data: n }) => {
47
+ var t, o;
48
+ if (n)
49
+ switch (n.type) {
50
+ case "builder.evaluate": {
51
+ const r = n.data.text, s = n.data.arguments || [], a = n.data.id, c = new Function(r);
52
+ let i, u = null;
53
+ try {
54
+ i = c.apply(null, s);
55
+ } catch (m) {
56
+ u = m;
57
+ }
58
+ u ? (t = window.parent) == null || t.postMessage(
59
+ {
60
+ type: "builder.evaluateError",
61
+ data: { id: a, error: u.message }
62
+ },
63
+ "*"
64
+ ) : i && typeof i.then == "function" ? i.then((m) => {
65
+ var p;
66
+ (p = window.parent) == null || p.postMessage(
67
+ {
68
+ type: "builder.evaluateResult",
69
+ data: { id: a, result: m }
70
+ },
71
+ "*"
72
+ );
73
+ }).catch(console.error) : (o = window.parent) == null || o.postMessage(
74
+ {
75
+ type: "builder.evaluateResult",
76
+ data: { result: i, id: a }
77
+ },
78
+ "*"
79
+ );
80
+ break;
81
+ }
82
+ }
83
+ }));
84
+ };
85
+ function U(e) {
86
+ return e;
87
+ }
88
+ function pn(e) {
89
+ return e;
90
+ }
91
+ const le = () => Promise.resolve().then(() => se).then((e) => e.default).catch((e) => {
92
+ throw console.error(
93
+ "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
94
+ e
95
+ ), e;
96
+ }), de = {
97
+ name: "builder-columns",
98
+ components: { "render-blocks": y(le) },
99
+ props: [
100
+ "space",
101
+ "columns",
102
+ "stackColumnsAt",
103
+ "reverseColumnsWhenStacked",
104
+ "builderBlock"
105
+ ],
106
+ data: () => ({ markMutable: U }),
107
+ computed: {
108
+ columnsCssVars() {
109
+ const e = this.stackColumnsAt === "never" ? "inherit" : this.reverseColumnsWhenStacked ? "column-reverse" : "column";
110
+ return {
111
+ "--flex-dir": e,
112
+ "--flex-dir-tablet": this.maybeApplyForTablet(e)
113
+ };
114
+ },
115
+ columnCssVars() {
116
+ const e = "100%", n = "0";
117
+ return {
118
+ "--column-width": e,
119
+ "--column-margin-left": n,
120
+ "--column-width-tablet": this.maybeApplyForTablet(e),
121
+ "--column-margin-left-tablet": this.maybeApplyForTablet(n)
122
+ };
123
+ }
124
+ },
125
+ methods: {
126
+ getGutterSize() {
127
+ return typeof this.space == "number" ? this.space || 0 : 20;
128
+ },
129
+ getColumns() {
130
+ return this.columns || [];
131
+ },
132
+ getWidth(e) {
133
+ var t;
134
+ const n = this.getColumns();
135
+ return ((t = n[e]) == null ? void 0 : t.width) || 100 / n.length;
136
+ },
137
+ getColumnCssWidth(e) {
138
+ const n = this.getColumns(), o = this.getGutterSize() * (n.length - 1) / n.length;
139
+ return `calc(${this.getWidth(e)}% - ${o}px)`;
140
+ },
141
+ maybeApplyForTablet(e) {
142
+ return (this.stackColumnsAt || "tablet") === "tablet" ? e : "inherit";
143
+ }
144
+ },
145
+ compatConfig: { MODE: 3 }
146
+ };
147
+ const f = (e, n) => {
148
+ const t = e.__vccOpts || e;
149
+ for (const [o, r] of n)
150
+ t[o] = r;
151
+ return t;
152
+ };
153
+ function ue(e, n, t, o, r, s) {
154
+ const a = v("render-blocks");
155
+ return l(), d("div", {
156
+ class: "builder-columns div-2btisl9m7v3",
157
+ style: C(s.columnsCssVars)
158
+ }, [
159
+ (l(!0), d(R, null, E(t.columns, (c, i) => (l(), d("div", {
160
+ key: i,
161
+ class: "builder-column div-2btisl9m7v3-2",
162
+ style: C({
163
+ width: s.getColumnCssWidth(i),
164
+ marginLeft: `${i === 0 ? 0 : s.getGutterSize()}px`,
165
+ ...s.columnCssVars
166
+ })
167
+ }, [
168
+ z(a, {
169
+ blocks: e.markMutable(c.blocks),
170
+ path: `component.options.columns.${i}.blocks`,
171
+ parent: t.builderBlock.id
172
+ }, null, 8, ["blocks", "path", "parent"])
173
+ ], 4))), 128))
174
+ ], 4);
175
+ }
176
+ const me = /* @__PURE__ */ f(de, [["render", ue], ["__scopeId", "data-v-ce668c7d"]]);
177
+ function W(e) {
178
+ return e.replace(/http(s)?:/, "");
179
+ }
180
+ function pe(e = "", n, t) {
181
+ const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
182
+ return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e + r + n + "=" + encodeURIComponent(t);
183
+ }
184
+ function he(e, n) {
185
+ if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !n)
186
+ return e;
187
+ if (n === "master")
188
+ return W(e);
189
+ const t = e.match(
190
+ /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
191
+ );
192
+ if (t) {
193
+ const o = e.split(t[0]), r = t[3], s = n.match("x") ? n : `${n}x`;
194
+ return W(`${o[0]}_${s}${r}`);
195
+ }
196
+ return null;
197
+ }
198
+ function T(e) {
199
+ if (!e)
200
+ return e;
201
+ const n = [100, 200, 400, 800, 1200, 1600, 2e3];
202
+ if (e.match(/builder\.io/)) {
203
+ let t = e;
204
+ const o = Number(e.split("?width=")[1]);
205
+ return isNaN(o) || (t = `${t} ${o}w`), n.filter((r) => r !== o).map((r) => `${pe(e, "width", r)} ${r}w`).concat([t]).join(", ");
206
+ }
207
+ return e.match(/cdn\.shopify\.com/) ? n.map((t) => [he(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, o]) => `${t} ${o}w`).concat([e]).join(", ") : e;
208
+ }
209
+ const fe = {
210
+ name: "builder-image",
211
+ props: [
212
+ "image",
213
+ "src",
214
+ "srcset",
215
+ "noWebp",
216
+ "altText",
217
+ "backgroundSize",
218
+ "className",
219
+ "sizes",
220
+ "aspectRatio",
221
+ "fitContent",
222
+ "builderBlock"
223
+ ],
224
+ computed: {
225
+ srcSetToUse() {
226
+ var t;
227
+ const n = this.image || this.src;
228
+ if (!n || !(n.match(/builder\.io/) || n.match(/cdn\.shopify\.com/)))
229
+ return this.srcset;
230
+ if (this.srcset && ((t = this.image) == null ? void 0 : t.includes("builder.io/api/v1/image"))) {
231
+ if (!this.srcset.includes(this.image.split("?")[0]))
232
+ return console.debug("Removed given srcset"), T(n);
233
+ } else if (this.image && !this.srcset)
234
+ return T(n);
235
+ return T(n);
236
+ },
237
+ webpSrcSet() {
238
+ var e;
239
+ return ((e = this.srcSetToUse) == null ? void 0 : e.match(/builder\.io/)) && !this.noWebp ? this.srcSetToUse.replace(/\?/g, "?format=webp&") : "";
240
+ }
241
+ },
242
+ methods: {
243
+ _classStringToObject(e) {
244
+ const n = {};
245
+ if (typeof e != "string")
246
+ return n;
247
+ const t = e.trim().split(/\s+/);
248
+ for (const o of t)
249
+ n[o] = !0;
250
+ return n;
251
+ }
252
+ },
253
+ compatConfig: { MODE: 3 }
254
+ };
255
+ const ge = { class: "div-1fogms4bee0" }, be = ["srcset"], ye = ["alt", "role", "src", "srcset", "sizes"], ve = ["srcset"], xe = {
256
+ key: 2,
257
+ class: "div-1fogms4bee0-3"
258
+ };
259
+ function _e(e, n, t, o, r, s) {
260
+ var a, c, i, u;
261
+ return l(), d("div", ge, [
262
+ I("picture", null, [
263
+ s.webpSrcSet ? (l(), d("source", {
264
+ key: 0,
265
+ type: "image/webp",
266
+ srcset: s.webpSrcSet
267
+ }, null, 8, be)) : b("", !0),
268
+ I("img", {
269
+ loading: "lazy",
270
+ alt: t.altText,
271
+ role: t.altText ? "presentation" : void 0,
272
+ style: C({
273
+ objectPosition: t.backgroundSize || "center",
274
+ objectFit: t.backgroundSize || "cover"
275
+ }),
276
+ class: O(
277
+ s._classStringToObject(
278
+ "builder-image" + (t.className ? " " + t.className : "") + " img-1fogms4bee0"
279
+ )
280
+ ),
281
+ src: t.image,
282
+ srcset: s.srcSetToUse,
283
+ sizes: t.sizes
284
+ }, null, 14, ye),
285
+ I("source", { srcset: s.srcSetToUse }, null, 8, ve)
286
+ ]),
287
+ t.aspectRatio && !(t.fitContent && ((c = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length)) ? (l(), d("div", {
288
+ key: 0,
289
+ class: "builder-image-sizer div-1fogms4bee0-2",
290
+ style: C({
291
+ paddingTop: t.aspectRatio * 100 + "%"
292
+ })
293
+ }, null, 4)) : b("", !0),
294
+ ((u = (i = t.builderBlock) == null ? void 0 : i.children) == null ? void 0 : u.length) && t.fitContent ? k(e.$slots, "default", { key: 1 }, void 0, !0) : b("", !0),
295
+ t.fitContent ? b("", !0) : (l(), d("div", xe, [
296
+ k(e.$slots, "default", {}, void 0, !0)
297
+ ]))
298
+ ]);
299
+ }
300
+ const Ce = /* @__PURE__ */ f(fe, [["render", _e], ["__scopeId", "data-v-83d4ef2e"]]), ke = {
301
+ name: "builder-text",
302
+ props: ["text"],
303
+ compatConfig: { MODE: 3 }
304
+ }, we = ["innerHTML"];
305
+ function Se(e, n, t, o, r, s) {
306
+ return l(), d("span", {
307
+ class: "builder-text",
308
+ innerHTML: t.text
309
+ }, null, 8, we);
310
+ }
311
+ const Ie = /* @__PURE__ */ f(ke, [["render", Se]]), Te = {
312
+ name: "builder-video",
313
+ props: [
314
+ "autoPlay",
315
+ "muted",
316
+ "controls",
317
+ "loop",
318
+ "playsInline",
319
+ "attributes",
320
+ "fit",
321
+ "position",
322
+ "video",
323
+ "posterImage"
324
+ ],
325
+ computed: {
326
+ videoProps() {
327
+ return {
328
+ ...this.autoPlay === !0 ? {
329
+ autoPlay: !0
330
+ } : {},
331
+ ...this.muted === !0 ? {
332
+ muted: !0
333
+ } : {},
334
+ ...this.controls === !0 ? {
335
+ controls: !0
336
+ } : {},
337
+ ...this.loop === !0 ? {
338
+ loop: !0
339
+ } : {},
340
+ ...this.playsInline === !0 ? {
341
+ playsInline: !0
342
+ } : {}
343
+ };
344
+ }
345
+ },
346
+ compatConfig: { MODE: 3 }
347
+ }, Re = ["src", "poster"];
348
+ function Ee(e, n, t, o, r, s) {
349
+ var a;
350
+ return l(), d("video", x(s.videoProps, {
351
+ style: {
352
+ width: "100%",
353
+ height: "100%",
354
+ ...(a = t.attributes) == null ? void 0 : a.style,
355
+ objectFit: t.fit,
356
+ objectPosition: t.position,
357
+ borderRadius: 1
358
+ },
359
+ src: t.video || "no-src",
360
+ poster: t.posterImage
361
+ }), null, 16, Re);
362
+ }
363
+ const Fe = /* @__PURE__ */ f(Te, [["render", Ee]]);
364
+ function F(e, n = null, t = ".") {
365
+ return Object.keys(e).reduce((o, r) => {
366
+ const s = e[r], a = [n, r].filter(Boolean).join(t);
367
+ return [
368
+ typeof s == "object",
369
+ s !== null,
370
+ !(Array.isArray(s) && s.length === 0)
371
+ ].every(Boolean) ? { ...o, ...F(s, a, t) } : { ...o, [a]: s };
372
+ }, {});
373
+ }
374
+ const B = "builder.", Oe = (e) => {
375
+ const n = {};
376
+ return e.forEach((t, o) => {
377
+ n[o] = t;
378
+ }), n;
379
+ }, je = (e) => {
380
+ if (!e)
381
+ return {};
382
+ const n = q(e), t = {};
383
+ return Object.keys(n).forEach((o) => {
384
+ if (o.startsWith(B)) {
385
+ const r = o.replace(B, "");
386
+ t[r] = n[o];
387
+ }
388
+ }), t;
389
+ }, Ue = () => {
390
+ if (!h())
391
+ return {};
392
+ const e = new URLSearchParams(window.location.search);
393
+ return je(e);
394
+ }, q = (e) => e instanceof URLSearchParams ? Oe(e) : e;
395
+ function Me() {
396
+ return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : null;
397
+ }
398
+ async function K() {
399
+ const e = Me().fetch;
400
+ if (typeof e > "u" && typeof global < "u") {
401
+ const n = import("node-fetch").then((t) => t.default);
402
+ return n.default || n;
403
+ }
404
+ return e.default || e;
405
+ }
406
+ const Ve = (e) => {
407
+ const n = e.split(".");
408
+ return n.length > 2 ? n.slice(1).join(".") : e;
409
+ }, J = async ({
410
+ name: e,
411
+ canTrack: n
412
+ }) => {
413
+ var t;
414
+ try {
415
+ return n ? (t = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : t.split("=")[1] : void 0;
416
+ } catch (o) {
417
+ console.debug("[COOKIE] GET error: ", o);
418
+ }
419
+ }, Ae = (e) => e.map(([n, t]) => t ? `${n}=${t}` : n).join("; "), $e = [
420
+ ["secure", ""],
421
+ ["SameSite", "None"]
422
+ ], Pe = ({
423
+ name: e,
424
+ value: n,
425
+ expires: t
426
+ }) => {
427
+ const r = (h() ? location.protocol === "https:" : !0) ? $e : [[]], s = t ? [["expires", t.toUTCString()]] : [[]], a = [
428
+ [e, n],
429
+ ...s,
430
+ ["path", "/"],
431
+ ["domain", Ve(window.location.hostname)],
432
+ ...r
433
+ ];
434
+ return Ae(a);
435
+ }, G = async ({
436
+ name: e,
437
+ value: n,
438
+ expires: t,
439
+ canTrack: o
440
+ }) => {
441
+ try {
442
+ if (!o)
443
+ return;
444
+ const r = Pe({ name: e, value: n, expires: t });
445
+ document.cookie = r;
446
+ } catch (r) {
447
+ console.warn("[COOKIE] SET error: ", r);
448
+ }
449
+ }, We = "builderio.variations", Y = (e) => `${We}.${e}`, Be = ({
450
+ contentId: e,
451
+ canTrack: n
452
+ }) => J({ name: Y(e), canTrack: n }), Le = ({
453
+ contentId: e,
454
+ canTrack: n,
455
+ value: t
456
+ }) => G({ name: Y(e), value: t, canTrack: n }), S = (e) => e != null, Ne = (e) => S(e.id) && S(e.variations) && Object.keys(e.variations).length > 0, De = ({
457
+ id: e,
458
+ variations: n
459
+ }) => {
460
+ var r;
461
+ let t = 0;
462
+ const o = Math.random();
463
+ for (const s in n)
464
+ if (t += (r = n[s]) == null ? void 0 : r.testRatio, o < t)
465
+ return s;
466
+ return e;
467
+ }, L = ({
468
+ item: e,
469
+ testGroupId: n
470
+ }) => {
471
+ const t = e.variations[n];
472
+ return n === e.id || !t ? {
473
+ testVariationId: e.id,
474
+ testVariationName: "Default"
475
+ } : {
476
+ data: t.data,
477
+ testVariationId: t.id,
478
+ testVariationName: t.name || (t.id === e.id ? "Default" : "")
479
+ };
480
+ }, He = async ({
481
+ item: e,
482
+ canTrack: n
483
+ }) => {
484
+ const t = await Be({
485
+ canTrack: n,
486
+ contentId: e.id
487
+ }), o = t ? L({ item: e, testGroupId: t }) : void 0;
488
+ if (o)
489
+ return o;
490
+ {
491
+ const r = De({
492
+ variations: e.variations,
493
+ id: e.id
494
+ });
495
+ return Le({
496
+ contentId: e.id,
497
+ value: r,
498
+ canTrack: n
499
+ }).catch((s) => {
500
+ console.error("could not store A/B test variation: ", s);
501
+ }), L({ item: e, testGroupId: r });
502
+ }
503
+ }, ze = async ({
504
+ item: e,
505
+ canTrack: n
506
+ }) => {
507
+ if (!Ne(e))
508
+ return;
509
+ const t = await He({ item: e, canTrack: n });
510
+ Object.assign(e, t);
511
+ };
512
+ async function X(e) {
513
+ return (await Ke({ ...e, limit: 1 })).results[0] || null;
514
+ }
515
+ const qe = (e) => {
516
+ const {
517
+ limit: n = 30,
518
+ userAttributes: t,
519
+ query: o,
520
+ noTraverse: r = !1,
521
+ model: s,
522
+ apiKey: a
523
+ } = e, c = new URL(
524
+ `https://cdn.builder.io/api/v2/content/${s}?apiKey=${a}&limit=${n}&noTraverse=${r}`
525
+ ), i = {
526
+ ...Ue(),
527
+ ...q(e.options || {})
528
+ }, u = F(i);
529
+ for (const m in u)
530
+ c.searchParams.set(m, String(u[m]));
531
+ if (t && c.searchParams.set("userAttributes", JSON.stringify(t)), o) {
532
+ const m = F({ query: o });
533
+ for (const p in m)
534
+ c.searchParams.set(p, JSON.stringify(m[p]));
535
+ }
536
+ return c;
537
+ };
538
+ async function Ke(e) {
539
+ const n = qe(e), o = await (await K())(n.href).then(
540
+ (s) => s.json()
541
+ ), r = e.canTrack !== !1;
542
+ if (r)
543
+ for (const s of o.results)
544
+ await ze({ item: s, canTrack: r });
545
+ return o;
546
+ }
547
+ const Je = () => Promise.resolve().then(() => sn).then((e) => e.default).catch((e) => {
548
+ throw console.error(
549
+ "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
550
+ e
551
+ ), e;
552
+ }), Ge = {
553
+ name: "builder-symbol",
554
+ components: { "render-content": y(Je) },
555
+ props: ["symbol", "attributes"],
556
+ data: () => ({ className: "builder-symbol", content: null, markMutable: U }),
557
+ inject: {
558
+ builderContext: "BuilderContext"
559
+ },
560
+ mounted() {
561
+ var e;
562
+ this.content = (e = this.symbol) == null ? void 0 : e.content;
563
+ },
564
+ watch: {
565
+ onUpdateHook0() {
566
+ const e = this.symbol;
567
+ e && !e.content && !this.content && e.model && X({
568
+ model: e.model,
569
+ apiKey: this.builderContext.apiKey,
570
+ query: {
571
+ id: e.entry
572
+ }
573
+ }).then((n) => {
574
+ this.content = n;
575
+ });
576
+ }
577
+ },
578
+ computed: {
579
+ onUpdateHook0() {
580
+ return {
581
+ 0: this.symbol,
582
+ 1: this.content
583
+ };
584
+ }
585
+ },
586
+ methods: {
587
+ _classStringToObject(e) {
588
+ const n = {};
589
+ if (typeof e != "string")
590
+ return n;
591
+ const t = e.trim().split(/\s+/);
592
+ for (const o of t)
593
+ n[o] = !0;
594
+ return n;
595
+ }
596
+ },
597
+ compatConfig: { MODE: 3 }
598
+ }, Ye = ["dataSet"];
599
+ function Xe(e, n, t, o, r, s) {
600
+ var c, i, u, m, p;
601
+ const a = v("render-content");
602
+ return l(), d("div", x(t.attributes, {
603
+ dataSet: {
604
+ class: e.className
605
+ },
606
+ class: s._classStringToObject(e.className)
607
+ }), [
608
+ z(a, {
609
+ apiKey: s.builderContext.apiKey,
610
+ context: s.builderContext.context,
611
+ customComponents: e.markMutable(Object.values(s.builderContext.registeredComponents)),
612
+ data: e.markMutable({
613
+ ...(c = t.symbol) == null ? void 0 : c.data,
614
+ ...s.builderContext.state,
615
+ ...(m = (u = (i = t.symbol) == null ? void 0 : i.content) == null ? void 0 : u.data) == null ? void 0 : m.state
616
+ }),
617
+ model: (p = t.symbol) == null ? void 0 : p.model,
618
+ content: e.markMutable(e.content)
619
+ }, null, 8, ["apiKey", "context", "customComponents", "data", "model", "content"])
620
+ ], 16, Ye);
621
+ }
622
+ const Qe = /* @__PURE__ */ f(Ge, [["render", Xe]]), Ze = {
623
+ name: "builder-button",
624
+ props: ["attributes", "text", "link", "openLinkInNewTab"],
625
+ compatConfig: { MODE: 3 }
626
+ };
627
+ const et = ["href", "target"];
628
+ function tt(e, n, t, o, r, s) {
629
+ return t.link ? (l(), d("a", x({ key: 0 }, t.attributes, {
630
+ role: "button",
631
+ href: t.link,
632
+ target: t.openLinkInNewTab ? "_blank" : void 0
633
+ }), $(t.text), 17, et)) : (l(), d("button", x({ key: 1 }, t.attributes, { class: "button-1eih9th5ow6" }), $(t.text), 17));
634
+ }
635
+ const nt = /* @__PURE__ */ f(Ze, [["render", tt], ["__scopeId", "data-v-64b92e6e"]]), ot = {
636
+ name: "builder-section-component",
637
+ props: ["attributes", "maxWidth"],
638
+ compatConfig: { MODE: 3 }
639
+ };
640
+ function st(e, n, t, o, r, s) {
641
+ return l(), d("section", x(t.attributes, {
642
+ style: t.maxWidth && typeof t.maxWidth == "number" ? {
643
+ maxWidth: t.maxWidth
644
+ } : void 0
645
+ }), [
646
+ k(e.$slots, "default")
647
+ ], 16);
648
+ }
649
+ const rt = /* @__PURE__ */ f(ot, [["render", st]]), at = {
650
+ name: "builder-fragment-component",
651
+ props: [],
652
+ compatConfig: { MODE: 3 }
653
+ };
654
+ function it(e, n, t, o, r, s) {
655
+ return l(), d("span", null, [
656
+ k(e.$slots, "default")
657
+ ]);
658
+ }
659
+ const ct = /* @__PURE__ */ f(at, [["render", it]]), lt = {
660
+ name: "Core:Button",
661
+ builtIn: !0,
662
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
663
+ defaultStyles: {
664
+ appearance: "none",
665
+ paddingTop: "15px",
666
+ paddingBottom: "15px",
667
+ paddingLeft: "25px",
668
+ paddingRight: "25px",
669
+ backgroundColor: "#000000",
670
+ color: "white",
671
+ borderRadius: "4px",
672
+ textAlign: "center",
673
+ cursor: "pointer"
674
+ },
675
+ inputs: [
676
+ {
677
+ name: "text",
678
+ type: "text",
679
+ defaultValue: "Click me!",
680
+ bubble: !0
681
+ },
682
+ {
683
+ name: "link",
684
+ type: "url",
685
+ bubble: !0
686
+ },
687
+ {
688
+ name: "openLinkInNewTab",
689
+ type: "boolean",
690
+ defaultValue: !1,
691
+ friendlyName: "Open link in new tab"
692
+ }
693
+ ],
694
+ static: !0,
695
+ noWrap: !0
696
+ };
697
+ function M(e) {
698
+ return e.__qwik_serializable__ = !0, e;
699
+ }
700
+ const dt = {
701
+ name: "Columns",
702
+ builtIn: !0,
703
+ inputs: [
704
+ {
705
+ name: "columns",
706
+ type: "array",
707
+ broadcast: !0,
708
+ subFields: [
709
+ {
710
+ name: "blocks",
711
+ type: "array",
712
+ hideFromUI: !0,
713
+ defaultValue: [
714
+ {
715
+ "@type": "@builder.io/sdk:Element",
716
+ responsiveStyles: {
717
+ large: {
718
+ display: "flex",
719
+ flexDirection: "column",
720
+ alignItems: "stretch",
721
+ flexShrink: "0",
722
+ position: "relative",
723
+ marginTop: "30px",
724
+ textAlign: "center",
725
+ lineHeight: "normal",
726
+ height: "auto",
727
+ minHeight: "20px",
728
+ minWidth: "20px",
729
+ overflow: "hidden"
730
+ }
731
+ },
732
+ component: {
733
+ name: "Image",
734
+ options: {
735
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
736
+ backgroundPosition: "center",
737
+ backgroundSize: "cover",
738
+ aspectRatio: 0.7004048582995948
739
+ }
740
+ }
741
+ },
742
+ {
743
+ "@type": "@builder.io/sdk:Element",
744
+ responsiveStyles: {
745
+ large: {
746
+ display: "flex",
747
+ flexDirection: "column",
748
+ alignItems: "stretch",
749
+ flexShrink: "0",
750
+ position: "relative",
751
+ marginTop: "30px",
752
+ textAlign: "center",
753
+ lineHeight: "normal",
754
+ height: "auto"
755
+ }
756
+ },
757
+ component: {
758
+ name: "Text",
759
+ options: {
760
+ text: "<p>Enter some text...</p>"
761
+ }
762
+ }
763
+ }
764
+ ]
765
+ },
766
+ {
767
+ name: "width",
768
+ type: "number",
769
+ hideFromUI: !0,
770
+ helperText: "Width %, e.g. set to 50 to fill half of the space"
771
+ },
772
+ {
773
+ name: "link",
774
+ type: "url",
775
+ helperText: "Optionally set a url that clicking this column will link to"
776
+ }
777
+ ],
778
+ defaultValue: [
779
+ {
780
+ blocks: [
781
+ {
782
+ "@type": "@builder.io/sdk:Element",
783
+ responsiveStyles: {
784
+ large: {
785
+ display: "flex",
786
+ flexDirection: "column",
787
+ alignItems: "stretch",
788
+ flexShrink: "0",
789
+ position: "relative",
790
+ marginTop: "30px",
791
+ textAlign: "center",
792
+ lineHeight: "normal",
793
+ height: "auto",
794
+ minHeight: "20px",
795
+ minWidth: "20px",
796
+ overflow: "hidden"
797
+ }
798
+ },
799
+ component: {
800
+ name: "Image",
801
+ options: {
802
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
803
+ backgroundPosition: "center",
804
+ backgroundSize: "cover",
805
+ aspectRatio: 0.7004048582995948
806
+ }
807
+ }
808
+ },
809
+ {
810
+ "@type": "@builder.io/sdk:Element",
811
+ responsiveStyles: {
812
+ large: {
813
+ display: "flex",
814
+ flexDirection: "column",
815
+ alignItems: "stretch",
816
+ flexShrink: "0",
817
+ position: "relative",
818
+ marginTop: "30px",
819
+ textAlign: "center",
820
+ lineHeight: "normal",
821
+ height: "auto"
822
+ }
823
+ },
824
+ component: {
825
+ name: "Text",
826
+ options: {
827
+ text: "<p>Enter some text...</p>"
828
+ }
829
+ }
830
+ }
831
+ ]
832
+ },
833
+ {
834
+ blocks: [
835
+ {
836
+ "@type": "@builder.io/sdk:Element",
837
+ responsiveStyles: {
838
+ large: {
839
+ display: "flex",
840
+ flexDirection: "column",
841
+ alignItems: "stretch",
842
+ flexShrink: "0",
843
+ position: "relative",
844
+ marginTop: "30px",
845
+ textAlign: "center",
846
+ lineHeight: "normal",
847
+ height: "auto",
848
+ minHeight: "20px",
849
+ minWidth: "20px",
850
+ overflow: "hidden"
851
+ }
852
+ },
853
+ component: {
854
+ name: "Image",
855
+ options: {
856
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
857
+ backgroundPosition: "center",
858
+ backgroundSize: "cover",
859
+ aspectRatio: 0.7004048582995948
860
+ }
861
+ }
862
+ },
863
+ {
864
+ "@type": "@builder.io/sdk:Element",
865
+ responsiveStyles: {
866
+ large: {
867
+ display: "flex",
868
+ flexDirection: "column",
869
+ alignItems: "stretch",
870
+ flexShrink: "0",
871
+ position: "relative",
872
+ marginTop: "30px",
873
+ textAlign: "center",
874
+ lineHeight: "normal",
875
+ height: "auto"
876
+ }
877
+ },
878
+ component: {
879
+ name: "Text",
880
+ options: {
881
+ text: "<p>Enter some text...</p>"
882
+ }
883
+ }
884
+ }
885
+ ]
886
+ }
887
+ ],
888
+ onChange: M((e) => {
889
+ function n() {
890
+ t.forEach((o) => {
891
+ o.delete("width");
892
+ });
893
+ }
894
+ const t = e.get("columns");
895
+ Array.isArray(t) && !!t.find(
896
+ (r) => r.get("width")
897
+ ) && (!!t.find(
898
+ (s) => !s.get("width")
899
+ ) || t.reduce((c, i) => c + i.get("width"), 0) !== 100) && n();
900
+ })
901
+ },
902
+ {
903
+ name: "space",
904
+ type: "number",
905
+ defaultValue: 20,
906
+ helperText: "Size of gap between columns",
907
+ advanced: !0
908
+ },
909
+ {
910
+ name: "stackColumnsAt",
911
+ type: "string",
912
+ defaultValue: "tablet",
913
+ helperText: "Convert horizontal columns to vertical at what device size",
914
+ enum: ["tablet", "mobile", "never"],
915
+ advanced: !0
916
+ },
917
+ {
918
+ name: "reverseColumnsWhenStacked",
919
+ type: "boolean",
920
+ defaultValue: !1,
921
+ helperText: "When stacking columns for mobile devices, reverse the ordering",
922
+ advanced: !0
923
+ }
924
+ ]
925
+ }, ut = {
926
+ name: "Fragment",
927
+ static: !0,
928
+ hidden: !0,
929
+ builtIn: !0,
930
+ canHaveChildren: !0,
931
+ noWrap: !0
932
+ }, mt = {
933
+ name: "Image",
934
+ static: !0,
935
+ builtIn: !0,
936
+ 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",
937
+ defaultStyles: {
938
+ position: "relative",
939
+ minHeight: "20px",
940
+ minWidth: "20px",
941
+ overflow: "hidden"
942
+ },
943
+ canHaveChildren: !0,
944
+ inputs: [
945
+ {
946
+ name: "image",
947
+ type: "file",
948
+ bubble: !0,
949
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
950
+ required: !0,
951
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
952
+ onChange: M((e) => {
953
+ e.delete("srcset"), e.delete("noWebp");
954
+ function t(a, c = 6e4) {
955
+ return new Promise((i, u) => {
956
+ const m = document.createElement("img");
957
+ let p = !1;
958
+ m.onload = () => {
959
+ p = !0, i(m);
960
+ }, m.addEventListener("error", (_) => {
961
+ console.warn("Image load failed", _.error), u(_.error);
962
+ }), m.src = a, setTimeout(() => {
963
+ p || u(new Error("Image load timed out"));
964
+ }, c);
965
+ });
966
+ }
967
+ function o(a) {
968
+ return Math.round(a * 1e3) / 1e3;
969
+ }
970
+ const r = e.get("image"), s = e.get("aspectRatio");
971
+ if (fetch(r).then((a) => a.blob()).then((a) => {
972
+ a.type.includes("svg") && e.set("noWebp", !0);
973
+ }), r && (!s || s === 0.7041))
974
+ return t(r).then((a) => {
975
+ const c = e.get("aspectRatio");
976
+ e.get("image") === r && (!c || c === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
977
+ });
978
+ })
979
+ },
980
+ {
981
+ name: "backgroundSize",
982
+ type: "text",
983
+ defaultValue: "cover",
984
+ enum: [
985
+ {
986
+ label: "contain",
987
+ value: "contain",
988
+ helperText: "The image should never get cropped"
989
+ },
990
+ {
991
+ label: "cover",
992
+ value: "cover",
993
+ helperText: "The image should fill it's box, cropping when needed"
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ name: "backgroundPosition",
999
+ type: "text",
1000
+ defaultValue: "center",
1001
+ enum: [
1002
+ "center",
1003
+ "top",
1004
+ "left",
1005
+ "right",
1006
+ "bottom",
1007
+ "top left",
1008
+ "top right",
1009
+ "bottom left",
1010
+ "bottom right"
1011
+ ]
1012
+ },
1013
+ {
1014
+ name: "altText",
1015
+ type: "string",
1016
+ helperText: "Text to display when the user has images off"
1017
+ },
1018
+ {
1019
+ name: "height",
1020
+ type: "number",
1021
+ hideFromUI: !0
1022
+ },
1023
+ {
1024
+ name: "width",
1025
+ type: "number",
1026
+ hideFromUI: !0
1027
+ },
1028
+ {
1029
+ name: "sizes",
1030
+ type: "string",
1031
+ hideFromUI: !0
1032
+ },
1033
+ {
1034
+ name: "srcset",
1035
+ type: "string",
1036
+ hideFromUI: !0
1037
+ },
1038
+ {
1039
+ name: "lazy",
1040
+ type: "boolean",
1041
+ defaultValue: !0,
1042
+ hideFromUI: !0
1043
+ },
1044
+ {
1045
+ name: "fitContent",
1046
+ type: "boolean",
1047
+ helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
1048
+ defaultValue: !0
1049
+ },
1050
+ {
1051
+ name: "aspectRatio",
1052
+ type: "number",
1053
+ 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",
1054
+ advanced: !0,
1055
+ defaultValue: 0.7041
1056
+ }
1057
+ ]
1058
+ }, pt = {
1059
+ name: "Core:Section",
1060
+ static: !0,
1061
+ builtIn: !0,
1062
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
1063
+ inputs: [
1064
+ {
1065
+ name: "maxWidth",
1066
+ type: "number",
1067
+ defaultValue: 1200
1068
+ },
1069
+ {
1070
+ name: "lazyLoad",
1071
+ type: "boolean",
1072
+ defaultValue: !1,
1073
+ advanced: !0,
1074
+ description: "Only render this section when in view"
1075
+ }
1076
+ ],
1077
+ defaultStyles: {
1078
+ paddingLeft: "20px",
1079
+ paddingRight: "20px",
1080
+ paddingTop: "50px",
1081
+ paddingBottom: "50px",
1082
+ marginTop: "0px",
1083
+ width: "100vw",
1084
+ marginLeft: "calc(50% - 50vw)"
1085
+ },
1086
+ canHaveChildren: !0,
1087
+ defaultChildren: [
1088
+ {
1089
+ "@type": "@builder.io/sdk:Element",
1090
+ responsiveStyles: {
1091
+ large: {
1092
+ textAlign: "center"
1093
+ }
1094
+ },
1095
+ component: {
1096
+ name: "Text",
1097
+ options: {
1098
+ 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>"
1099
+ }
1100
+ }
1101
+ }
1102
+ ]
1103
+ }, ht = {
1104
+ name: "Symbol",
1105
+ noWrap: !0,
1106
+ static: !0,
1107
+ builtIn: !0,
1108
+ inputs: [
1109
+ {
1110
+ name: "symbol",
1111
+ type: "uiSymbol"
1112
+ },
1113
+ {
1114
+ name: "dataOnly",
1115
+ helperText: "Make this a data symbol that doesn't display any UI",
1116
+ type: "boolean",
1117
+ defaultValue: !1,
1118
+ advanced: !0,
1119
+ hideFromUI: !0
1120
+ },
1121
+ {
1122
+ name: "inheritState",
1123
+ helperText: "Inherit the parent component state and data",
1124
+ type: "boolean",
1125
+ defaultValue: !1,
1126
+ advanced: !0
1127
+ },
1128
+ {
1129
+ name: "renderToLiquid",
1130
+ helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1131
+ type: "boolean",
1132
+ defaultValue: !1,
1133
+ advanced: !0,
1134
+ hideFromUI: !0
1135
+ },
1136
+ {
1137
+ name: "useChildren",
1138
+ hideFromUI: !0,
1139
+ type: "boolean"
1140
+ }
1141
+ ]
1142
+ }, ft = {
1143
+ name: "Text",
1144
+ static: !0,
1145
+ builtIn: !0,
1146
+ 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",
1147
+ inputs: [
1148
+ {
1149
+ name: "text",
1150
+ type: "html",
1151
+ required: !0,
1152
+ autoFocus: !0,
1153
+ bubble: !0,
1154
+ defaultValue: "Enter some text..."
1155
+ }
1156
+ ],
1157
+ defaultStyles: {
1158
+ lineHeight: "normal",
1159
+ height: "auto",
1160
+ textAlign: "center"
1161
+ }
1162
+ }, gt = {
1163
+ name: "Video",
1164
+ canHaveChildren: !0,
1165
+ builtIn: !0,
1166
+ defaultStyles: {
1167
+ minHeight: "20px",
1168
+ minWidth: "20px"
1169
+ },
1170
+ 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",
1171
+ inputs: [
1172
+ {
1173
+ name: "video",
1174
+ type: "file",
1175
+ allowedFileTypes: ["mp4"],
1176
+ bubble: !0,
1177
+ defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
1178
+ required: !0
1179
+ },
1180
+ {
1181
+ name: "posterImage",
1182
+ type: "file",
1183
+ allowedFileTypes: ["jpeg", "png"],
1184
+ helperText: "Image to show before the video plays"
1185
+ },
1186
+ {
1187
+ name: "autoPlay",
1188
+ type: "boolean",
1189
+ defaultValue: !0
1190
+ },
1191
+ {
1192
+ name: "controls",
1193
+ type: "boolean",
1194
+ defaultValue: !1
1195
+ },
1196
+ {
1197
+ name: "muted",
1198
+ type: "boolean",
1199
+ defaultValue: !0
1200
+ },
1201
+ {
1202
+ name: "loop",
1203
+ type: "boolean",
1204
+ defaultValue: !0
1205
+ },
1206
+ {
1207
+ name: "playsInline",
1208
+ type: "boolean",
1209
+ defaultValue: !0
1210
+ },
1211
+ {
1212
+ name: "fit",
1213
+ type: "text",
1214
+ defaultValue: "cover",
1215
+ enum: ["contain", "cover", "fill", "auto"]
1216
+ },
1217
+ {
1218
+ name: "fitContent",
1219
+ type: "boolean",
1220
+ helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
1221
+ defaultValue: !0,
1222
+ advanced: !0
1223
+ },
1224
+ {
1225
+ name: "position",
1226
+ type: "text",
1227
+ defaultValue: "center",
1228
+ enum: [
1229
+ "center",
1230
+ "top",
1231
+ "left",
1232
+ "right",
1233
+ "bottom",
1234
+ "top left",
1235
+ "top right",
1236
+ "bottom left",
1237
+ "bottom right"
1238
+ ]
1239
+ },
1240
+ {
1241
+ name: "height",
1242
+ type: "number",
1243
+ advanced: !0
1244
+ },
1245
+ {
1246
+ name: "width",
1247
+ type: "number",
1248
+ advanced: !0
1249
+ },
1250
+ {
1251
+ name: "aspectRatio",
1252
+ type: "number",
1253
+ advanced: !0,
1254
+ defaultValue: 0.7004048582995948
1255
+ },
1256
+ {
1257
+ name: "lazyLoad",
1258
+ type: "boolean",
1259
+ helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
1260
+ defaultValue: !0,
1261
+ advanced: !0
1262
+ }
1263
+ ]
1264
+ }, bt = {
1265
+ name: "Embed",
1266
+ static: !0,
1267
+ builtIn: !0,
1268
+ inputs: [
1269
+ {
1270
+ name: "url",
1271
+ type: "url",
1272
+ required: !0,
1273
+ defaultValue: "",
1274
+ helperText: "e.g. enter a youtube url, google map, etc",
1275
+ onChange: M((e) => {
1276
+ const n = e.get("url");
1277
+ if (n)
1278
+ return e.set("content", "Loading..."), fetch(
1279
+ `https://iframe.ly/api/iframely?url=${n}&api_key=ae0e60e78201a3f2b0de4b`
1280
+ ).then((o) => o.json()).then((o) => {
1281
+ e.get("url") === n && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1282
+ }).catch((o) => {
1283
+ e.set(
1284
+ "content",
1285
+ "There was an error embedding this URL, please try again or another URL"
1286
+ );
1287
+ });
1288
+ e.delete("content");
1289
+ })
1290
+ },
1291
+ {
1292
+ name: "content",
1293
+ type: "html",
1294
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1295
+ hideFromUI: !0
1296
+ }
1297
+ ]
1298
+ }, yt = [
1299
+ "text/javascript",
1300
+ "application/javascript",
1301
+ "application/ecmascript"
1302
+ ], vt = (e) => yt.includes(e.type), xt = {
1303
+ name: "builder-embed",
1304
+ props: ["content"],
1305
+ data: () => ({ scriptsInserted: [], scriptsRun: [], ranInitFn: !1 }),
1306
+ watch: {
1307
+ onUpdateHook0() {
1308
+ this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1309
+ }
1310
+ },
1311
+ computed: {
1312
+ onUpdateHook0() {
1313
+ return {
1314
+ 0: this.$refs.elem,
1315
+ 1: this.ranInitFn
1316
+ };
1317
+ }
1318
+ },
1319
+ methods: {
1320
+ findAndRunScripts() {
1321
+ if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
1322
+ return;
1323
+ const e = this.$refs.elem.getElementsByTagName("script");
1324
+ for (let n = 0; n < e.length; n++) {
1325
+ const t = e[n];
1326
+ if (t.src && !this.scriptsInserted.includes(t.src)) {
1327
+ this.scriptsInserted.push(t.src);
1328
+ const o = document.createElement("script");
1329
+ o.async = !0, o.src = t.src, document.head.appendChild(o);
1330
+ } else if (vt(t) && !this.scriptsRun.includes(t.innerText))
1331
+ try {
1332
+ this.scriptsRun.push(t.innerText), new Function(t.innerText)();
1333
+ } catch (o) {
1334
+ console.warn("`Embed`: Error running script:", o);
1335
+ }
1336
+ }
1337
+ }
1338
+ },
1339
+ compatConfig: { MODE: 3 }
1340
+ }, _t = ["innerHTML"];
1341
+ function Ct(e, n, t, o, r, s) {
1342
+ return l(), d("div", {
1343
+ class: "builder-embed",
1344
+ ref: "elem",
1345
+ innerHTML: t.content
1346
+ }, null, 8, _t);
1347
+ }
1348
+ const kt = /* @__PURE__ */ f(xt, [["render", Ct]]);
1349
+ function wt() {
1350
+ return h() && window.self !== window.top;
1351
+ }
1352
+ function g() {
1353
+ return wt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1354
+ }
1355
+ const St = {
1356
+ name: "builder-img-component",
1357
+ props: [
1358
+ "backgroundSize",
1359
+ "backgroundPosition",
1360
+ "imgSrc",
1361
+ "altText",
1362
+ "image",
1363
+ "attributes"
1364
+ ],
1365
+ data: () => ({ isEditing: g }),
1366
+ compatConfig: { MODE: 3 }
1367
+ }, It = ["alt", "src"];
1368
+ function Tt(e, n, t, o, r, s) {
1369
+ return l(), d("img", x(t.attributes, {
1370
+ style: {
1371
+ objectFit: t.backgroundSize || "cover",
1372
+ objectPosition: t.backgroundPosition || "center"
1373
+ },
1374
+ key: e.isEditing() && t.imgSrc || "default-key",
1375
+ alt: t.altText,
1376
+ src: t.imgSrc || t.image
1377
+ }), null, 16, It);
1378
+ }
1379
+ const Rt = /* @__PURE__ */ f(St, [["render", Tt]]), Et = {
1380
+ name: "Raw:Img",
1381
+ hideFromInsertMenu: !0,
1382
+ builtIn: !0,
1383
+ 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",
1384
+ inputs: [
1385
+ {
1386
+ name: "image",
1387
+ bubble: !0,
1388
+ type: "file",
1389
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1390
+ required: !0
1391
+ }
1392
+ ],
1393
+ noWrap: !0,
1394
+ static: !0
1395
+ }, Ft = {
1396
+ name: "builder-custom-code",
1397
+ props: ["replaceNodes", "code"],
1398
+ data: () => ({ scriptsInserted: [], scriptsRun: [] }),
1399
+ mounted() {
1400
+ this.findAndRunScripts();
1401
+ },
1402
+ methods: {
1403
+ findAndRunScripts() {
1404
+ if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
1405
+ const e = this.$refs.elem.getElementsByTagName("script");
1406
+ for (let n = 0; n < e.length; n++) {
1407
+ const t = e[n];
1408
+ if (t.src) {
1409
+ if (this.scriptsInserted.includes(t.src))
1410
+ continue;
1411
+ this.scriptsInserted.push(t.src);
1412
+ const o = document.createElement("script");
1413
+ o.async = !0, o.src = t.src, document.head.appendChild(o);
1414
+ } else if (!t.type || [
1415
+ "text/javascript",
1416
+ "application/javascript",
1417
+ "application/ecmascript"
1418
+ ].includes(t.type)) {
1419
+ if (this.scriptsRun.includes(t.innerText))
1420
+ continue;
1421
+ try {
1422
+ this.scriptsRun.push(t.innerText), new Function(t.innerText)();
1423
+ } catch (o) {
1424
+ console.warn("`CustomCode`: Error running script:", o);
1425
+ }
1426
+ }
1427
+ }
1428
+ }
1429
+ },
1430
+ _classStringToObject(e) {
1431
+ const n = {};
1432
+ if (typeof e != "string")
1433
+ return n;
1434
+ const t = e.trim().split(/\s+/);
1435
+ for (const o of t)
1436
+ n[o] = !0;
1437
+ return n;
1438
+ }
1439
+ },
1440
+ compatConfig: { MODE: 3 }
1441
+ }, Ot = ["innerHTML"];
1442
+ function jt(e, n, t, o, r, s) {
1443
+ return l(), d("div", {
1444
+ ref: "elem",
1445
+ class: O(
1446
+ s._classStringToObject(
1447
+ "builder-custom-code" + (t.replaceNodes ? " replace-nodes" : "")
1448
+ )
1449
+ ),
1450
+ innerHTML: t.code
1451
+ }, null, 10, Ot);
1452
+ }
1453
+ const Ut = /* @__PURE__ */ f(Ft, [["render", jt]]), Mt = {
1454
+ name: "Custom Code",
1455
+ static: !0,
1456
+ builtIn: !0,
1457
+ requiredPermissions: ["editCode"],
1458
+ inputs: [
1459
+ {
1460
+ name: "code",
1461
+ type: "html",
1462
+ required: !0,
1463
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1464
+ code: !0
1465
+ },
1466
+ {
1467
+ name: "replaceNodes",
1468
+ type: "boolean",
1469
+ helperText: "Preserve server rendered dom nodes",
1470
+ advanced: !0
1471
+ },
1472
+ {
1473
+ name: "scriptsClientOnly",
1474
+ type: "boolean",
1475
+ defaultValue: !1,
1476
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1477
+ advanced: !0
1478
+ }
1479
+ ]
1480
+ }, Vt = () => [
1481
+ { component: me, ...dt },
1482
+ { component: Ce, ...mt },
1483
+ { component: Rt, ...Et },
1484
+ { component: Ie, ...ft },
1485
+ { component: Fe, ...gt },
1486
+ { component: Qe, ...ht },
1487
+ { component: nt, ...lt },
1488
+ { component: rt, ...pt },
1489
+ { component: ct, ...ut },
1490
+ { component: kt, ...bt },
1491
+ { component: Ut, ...Mt }
1492
+ ];
1493
+ function N({
1494
+ code: e,
1495
+ context: n,
1496
+ state: t,
1497
+ event: o
1498
+ }) {
1499
+ if (e === "") {
1500
+ console.warn("Skipping evaluation of empty code block.");
1501
+ return;
1502
+ }
1503
+ const r = {
1504
+ isEditing: g(),
1505
+ isBrowser: h(),
1506
+ isServer: !h()
1507
+ }, a = !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
1508
+ try {
1509
+ return new Function(
1510
+ "builder",
1511
+ "Builder",
1512
+ "state",
1513
+ "context",
1514
+ "event",
1515
+ a
1516
+ )(r, r, t, n, o);
1517
+ } catch (c) {
1518
+ console.warn(
1519
+ `Builder custom code error:
1520
+ While Evaluating:
1521
+ `,
1522
+ a,
1523
+ `
1524
+ `,
1525
+ c.message || c
1526
+ );
1527
+ }
1528
+ }
1529
+ function At() {
1530
+ return !h() || g() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1531
+ }
1532
+ const Q = [];
1533
+ function hn(e, n) {
1534
+ return Q.push({ component: e, ...n }), console.warn(
1535
+ "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1536
+ ), e;
1537
+ }
1538
+ const $t = ({
1539
+ component: e,
1540
+ ...n
1541
+ }) => ({
1542
+ type: "builder.registerComponent",
1543
+ data: Bt(n)
1544
+ }), Z = (e) => JSON.parse(JSON.stringify(e)), Pt = (e) => typeof e == "function" ? Wt(e) : Z(e), Wt = (e) => {
1545
+ const n = e.toString().trim();
1546
+ return `return (${!n.startsWith("function") && !n.startsWith("(") ? "function " : ""}${n}).apply(this, arguments)`;
1547
+ }, Bt = ({
1548
+ inputs: e,
1549
+ ...n
1550
+ }) => ({
1551
+ ...Z(n),
1552
+ inputs: e == null ? void 0 : e.map(
1553
+ (t) => Object.entries(t).reduce(
1554
+ (o, [r, s]) => ({
1555
+ ...o,
1556
+ [r]: Pt(s)
1557
+ }),
1558
+ {}
1559
+ )
1560
+ )
1561
+ });
1562
+ function Lt() {
1563
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1564
+ const n = Math.random() * 16 | 0;
1565
+ return (e == "x" ? n : n & 3 | 8).toString(16);
1566
+ });
1567
+ }
1568
+ function ee() {
1569
+ return Lt().replace(/-/g, "");
1570
+ }
1571
+ const te = "builderSessionId", Nt = async ({ canTrack: e }) => {
1572
+ if (!e)
1573
+ return;
1574
+ const n = await J({
1575
+ name: te,
1576
+ canTrack: e
1577
+ });
1578
+ if (S(n))
1579
+ return n;
1580
+ {
1581
+ const t = Dt();
1582
+ Ht({ id: t, canTrack: e });
1583
+ }
1584
+ }, Dt = () => ee(), Ht = ({
1585
+ id: e,
1586
+ canTrack: n
1587
+ }) => G({ name: te, value: e, canTrack: n }), ne = () => h() && typeof localStorage < "u" ? localStorage : void 0, zt = ({
1588
+ key: e,
1589
+ canTrack: n
1590
+ }) => {
1591
+ var t;
1592
+ try {
1593
+ return n ? (t = ne()) == null ? void 0 : t.getItem(e) : void 0;
1594
+ } catch (o) {
1595
+ console.debug("[LocalStorage] GET error: ", o);
1596
+ }
1597
+ }, qt = ({
1598
+ key: e,
1599
+ canTrack: n,
1600
+ value: t
1601
+ }) => {
1602
+ var o;
1603
+ try {
1604
+ n && ((o = ne()) == null || o.setItem(e, t));
1605
+ } catch (r) {
1606
+ console.debug("[LocalStorage] SET error: ", r);
1607
+ }
1608
+ }, oe = "builderVisitorId", Kt = ({ canTrack: e }) => {
1609
+ if (!e)
1610
+ return;
1611
+ const n = zt({
1612
+ key: oe,
1613
+ canTrack: e
1614
+ });
1615
+ if (S(n))
1616
+ return n;
1617
+ {
1618
+ const t = Jt();
1619
+ Gt({ id: t, canTrack: e });
1620
+ }
1621
+ }, Jt = () => ee(), Gt = ({
1622
+ id: e,
1623
+ canTrack: n
1624
+ }) => qt({
1625
+ key: oe,
1626
+ value: e,
1627
+ canTrack: n
1628
+ }), Yt = async ({
1629
+ canTrack: e
1630
+ }) => {
1631
+ if (!e)
1632
+ return { visitorId: void 0, sessionId: void 0 };
1633
+ const n = await Nt({ canTrack: e }), t = Kt({ canTrack: e });
1634
+ return {
1635
+ sessionId: n,
1636
+ visitorId: t
1637
+ };
1638
+ }, Xt = async ({
1639
+ type: e,
1640
+ canTrack: n,
1641
+ orgId: t,
1642
+ contentId: o,
1643
+ ...r
1644
+ }) => ({
1645
+ type: e,
1646
+ data: {
1647
+ ...r,
1648
+ ...await Yt({ canTrack: n }),
1649
+ ownerId: t,
1650
+ contentId: o
1651
+ }
1652
+ });
1653
+ async function D(e) {
1654
+ if (!!e.canTrack && !g() && !!(h() || j === "reactNative"))
1655
+ return fetch("https://builder.io/api/v1/track", {
1656
+ method: "POST",
1657
+ body: JSON.stringify({
1658
+ events: [await Xt(e)]
1659
+ }),
1660
+ headers: {
1661
+ "content-type": "application/json"
1662
+ },
1663
+ mode: "cors"
1664
+ }).catch((n) => {
1665
+ console.error("Failed to track: ", n);
1666
+ });
1667
+ }
1668
+ const Qt = () => Promise.resolve().then(() => se).then((e) => e.default).catch((e) => {
1669
+ throw console.error(
1670
+ "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
1671
+ e
1672
+ ), e;
1673
+ }), Zt = () => import("./render-styles.750ea842.js").then((e) => e.default).catch((e) => {
1674
+ throw console.error(
1675
+ "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
1676
+ e
1677
+ ), e;
1678
+ }), en = {
1679
+ name: "render-content",
1680
+ components: {
1681
+ "render-content-styles": y(Zt),
1682
+ "render-blocks": y(Qt)
1683
+ },
1684
+ props: [
1685
+ "content",
1686
+ "data",
1687
+ "canTrack",
1688
+ "context",
1689
+ "customComponents",
1690
+ "model",
1691
+ "apiKey"
1692
+ ],
1693
+ data: () => ({
1694
+ forceReRenderCount: 0,
1695
+ overrideContent: null,
1696
+ update: 0,
1697
+ overrideState: {},
1698
+ markMutable: U
1699
+ }),
1700
+ provide() {
1701
+ const e = this;
1702
+ return {
1703
+ BuilderContext: {
1704
+ get content() {
1705
+ return e.useContent;
1706
+ },
1707
+ get state() {
1708
+ return e.contentState;
1709
+ },
1710
+ get context() {
1711
+ return e.contextContext;
1712
+ },
1713
+ get apiKey() {
1714
+ return e.apiKey;
1715
+ },
1716
+ get registeredComponents() {
1717
+ return e.allRegisteredComponents;
1718
+ }
1719
+ }
1720
+ };
1721
+ },
1722
+ mounted() {
1723
+ var e;
1724
+ if (h()) {
1725
+ if (g() && (this.forceReRenderCount = this.forceReRenderCount + 1, ie(), ce(), Object.values(this.allRegisteredComponents).forEach(
1726
+ (n) => {
1727
+ var o;
1728
+ const t = $t(n);
1729
+ (o = window.parent) == null || o.postMessage(t, "*");
1730
+ }
1731
+ ), window.addEventListener("message", this.processMessage), window.addEventListener(
1732
+ "builder:component:stateChangeListenerActivated",
1733
+ this.emitStateUpdate
1734
+ )), this.useContent && D({
1735
+ type: "impression",
1736
+ canTrack: this.canTrackToUse,
1737
+ contentId: (e = this.useContent) == null ? void 0 : e.id,
1738
+ orgId: this.apiKey
1739
+ }), At()) {
1740
+ const n = new URL(location.href).searchParams;
1741
+ if (this.model && n.get("builder.preview") === this.model) {
1742
+ const t = n.get("apiKey") || n.get("builder.space");
1743
+ t && X({
1744
+ model: this.model,
1745
+ apiKey: t
1746
+ }).then((o) => {
1747
+ o && (this.overrideContent = o);
1748
+ });
1749
+ }
1750
+ }
1751
+ this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
1752
+ }
1753
+ },
1754
+ watch: {
1755
+ onUpdateHook0() {
1756
+ this.evaluateJsCode();
1757
+ },
1758
+ onUpdateHook1() {
1759
+ this.runHttpRequests();
1760
+ },
1761
+ onUpdateHook2() {
1762
+ this.emitStateUpdate();
1763
+ }
1764
+ },
1765
+ unmounted() {
1766
+ h() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1767
+ "builder:component:stateChangeListenerActivated",
1768
+ this.emitStateUpdate
1769
+ ));
1770
+ },
1771
+ computed: {
1772
+ useContent() {
1773
+ var n, t;
1774
+ return !this.content && !this.overrideContent ? void 0 : {
1775
+ ...this.content,
1776
+ ...this.overrideContent,
1777
+ data: {
1778
+ ...(n = this.content) == null ? void 0 : n.data,
1779
+ ...this.data,
1780
+ ...(t = this.overrideContent) == null ? void 0 : t.data
1781
+ }
1782
+ };
1783
+ },
1784
+ canTrackToUse() {
1785
+ return this.canTrack || !0;
1786
+ },
1787
+ contentState() {
1788
+ var e, n;
1789
+ return {
1790
+ ...(n = (e = this.content) == null ? void 0 : e.data) == null ? void 0 : n.state,
1791
+ ...this.data,
1792
+ ...this.overrideState
1793
+ };
1794
+ },
1795
+ contextContext() {
1796
+ return this.context || {};
1797
+ },
1798
+ allRegisteredComponents() {
1799
+ return [
1800
+ ...Vt(),
1801
+ ...Q,
1802
+ ...this.customComponents || []
1803
+ ].reduce(
1804
+ (t, o) => ({ ...t, [o.name]: o }),
1805
+ {}
1806
+ );
1807
+ },
1808
+ httpReqsData() {
1809
+ return {};
1810
+ },
1811
+ shouldRenderContentStyles() {
1812
+ var e, n, t, o, r;
1813
+ return Boolean(
1814
+ (((n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.cssCode) || ((r = (o = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : o.customFonts) == null ? void 0 : r.length)) && j !== "reactNative"
1815
+ );
1816
+ },
1817
+ onUpdateHook0() {
1818
+ var e, n;
1819
+ return {
1820
+ 0: (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.jsCode
1821
+ };
1822
+ },
1823
+ onUpdateHook1() {
1824
+ var e, n;
1825
+ return {
1826
+ 0: (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests
1827
+ };
1828
+ },
1829
+ onUpdateHook2() {
1830
+ return {
1831
+ 0: this.contentState
1832
+ };
1833
+ }
1834
+ },
1835
+ methods: {
1836
+ processMessage(e) {
1837
+ const { data: n } = e;
1838
+ if (n)
1839
+ switch (n.type) {
1840
+ case "builder.contentUpdate": {
1841
+ const t = n.data, o = t.key || t.alias || t.entry || t.modelName, r = t.data;
1842
+ o === this.model && (this.overrideContent = r, this.forceReRenderCount = this.forceReRenderCount + 1);
1843
+ break;
1844
+ }
1845
+ }
1846
+ },
1847
+ evaluateJsCode() {
1848
+ var n, t;
1849
+ const e = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.jsCode;
1850
+ e && N({
1851
+ code: e,
1852
+ context: this.contextContext,
1853
+ state: this.contentState
1854
+ });
1855
+ },
1856
+ onClick(e) {
1857
+ var n;
1858
+ this.useContent && D({
1859
+ type: "click",
1860
+ canTrack: this.canTrackToUse,
1861
+ contentId: (n = this.useContent) == null ? void 0 : n.id,
1862
+ orgId: this.apiKey
1863
+ });
1864
+ },
1865
+ evalExpression(e) {
1866
+ return e.replace(
1867
+ /{{([^}]+)}}/g,
1868
+ (n, t) => N({
1869
+ code: t,
1870
+ context: this.contextContext,
1871
+ state: this.contentState
1872
+ })
1873
+ );
1874
+ },
1875
+ handleRequest({ url: e, key: n }) {
1876
+ K().then((t) => t(e)).then((t) => t.json()).then((t) => {
1877
+ const o = { ...this.overrideState, [n]: t };
1878
+ this.overrideState = o;
1879
+ }).catch((t) => {
1880
+ console.log("error fetching dynamic data", e, t);
1881
+ });
1882
+ },
1883
+ runHttpRequests() {
1884
+ var n, t, o;
1885
+ const e = (o = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.httpRequests) != null ? o : {};
1886
+ Object.entries(e).forEach(([r, s]) => {
1887
+ if (s && (!this.httpReqsData[r] || g())) {
1888
+ const a = this.evalExpression(s);
1889
+ this.handleRequest({
1890
+ url: a,
1891
+ key: r
1892
+ });
1893
+ }
1894
+ });
1895
+ },
1896
+ emitStateUpdate() {
1897
+ g() && window.dispatchEvent(
1898
+ new CustomEvent("builder:component:stateChange", {
1899
+ detail: {
1900
+ state: this.contentState,
1901
+ ref: {
1902
+ name: this.model
1903
+ }
1904
+ }
1905
+ })
1906
+ );
1907
+ }
1908
+ },
1909
+ compatConfig: { MODE: 3 }
1910
+ }, tn = ["builder-content-id"];
1911
+ function nn(e, n, t, o, r, s) {
1912
+ var i, u, m, p, _, V, A;
1913
+ const a = v("render-content-styles"), c = v("render-blocks");
1914
+ return s.useContent ? (l(), d("div", {
1915
+ key: 0,
1916
+ ref: "elementRef",
1917
+ onClick: n[0] || (n[0] = (re) => s.onClick(re)),
1918
+ "builder-content-id": (i = s.useContent) == null ? void 0 : i.id
1919
+ }, [
1920
+ s.shouldRenderContentStyles ? (l(), w(a, {
1921
+ key: 0,
1922
+ cssCode: (m = (u = s.useContent) == null ? void 0 : u.data) == null ? void 0 : m.cssCode,
1923
+ customFonts: (_ = (p = s.useContent) == null ? void 0 : p.data) == null ? void 0 : _.customFonts
1924
+ }, null, 8, ["cssCode", "customFonts"])) : b("", !0),
1925
+ (l(), w(c, {
1926
+ blocks: e.markMutable((A = (V = s.useContent) == null ? void 0 : V.data) == null ? void 0 : A.blocks),
1927
+ key: e.forceReRenderCount
1928
+ }, null, 8, ["blocks"]))
1929
+ ], 8, tn)) : b("", !0);
1930
+ }
1931
+ const on = /* @__PURE__ */ f(en, [["render", nn]]), sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1932
+ __proto__: null,
1933
+ default: on
1934
+ }, Symbol.toStringTag, { value: "Module" })), rn = () => import("./block-styles.1f1fb83d.js").then((e) => e.default).catch((e) => {
1935
+ throw console.error(
1936
+ "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
1937
+ e
1938
+ ), e;
1939
+ }), an = () => import("./render-block.3cdd0c66.js").then((e) => e.default).catch((e) => {
1940
+ throw console.error(
1941
+ "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
1942
+ e
1943
+ ), e;
1944
+ }), cn = {
1945
+ name: "render-blocks",
1946
+ components: {
1947
+ "render-block": y(an),
1948
+ "block-styles": y(rn)
1949
+ },
1950
+ props: ["blocks", "parent", "path"],
1951
+ inject: {
1952
+ builderContext: "BuilderContext"
1953
+ },
1954
+ computed: {
1955
+ className() {
1956
+ var e;
1957
+ return "builder-blocks" + ((e = this.blocks) != null && e.length ? "" : " no-blocks");
1958
+ }
1959
+ },
1960
+ methods: {
1961
+ onClick() {
1962
+ var e, n;
1963
+ g() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
1964
+ {
1965
+ type: "builder.clickEmptyBlocks",
1966
+ data: {
1967
+ parentElementId: this.parent,
1968
+ dataPath: this.path
1969
+ }
1970
+ },
1971
+ "*"
1972
+ ));
1973
+ },
1974
+ onMouseEnter() {
1975
+ var e, n;
1976
+ g() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
1977
+ {
1978
+ type: "builder.hoverEmptyBlocks",
1979
+ data: {
1980
+ parentElementId: this.parent,
1981
+ dataPath: this.path
1982
+ }
1983
+ },
1984
+ "*"
1985
+ ));
1986
+ },
1987
+ _classStringToObject(e) {
1988
+ const n = {};
1989
+ if (typeof e != "string")
1990
+ return n;
1991
+ const t = e.trim().split(/\s+/);
1992
+ for (const o of t)
1993
+ n[o] = !0;
1994
+ return n;
1995
+ }
1996
+ },
1997
+ compatConfig: { MODE: 3 }
1998
+ };
1999
+ const ln = ["builder-path", "builder-parent-id", "dataSet"];
2000
+ function dn(e, n, t, o, r, s) {
2001
+ const a = v("render-block"), c = v("block-styles");
2002
+ return l(), d("div", {
2003
+ class: O(s._classStringToObject(s.className + " div-3q96myty4lk")),
2004
+ "builder-path": t.path,
2005
+ "builder-parent-id": t.parent,
2006
+ dataSet: {
2007
+ class: s.className
2008
+ },
2009
+ onClick: n[0] || (n[0] = (i) => s.onClick()),
2010
+ onMouseenter: n[1] || (n[1] = (i) => s.onMouseEnter())
2011
+ }, [
2012
+ t.blocks ? (l(!0), d(R, { key: 0 }, E(t.blocks, (i, u) => (l(), w(a, {
2013
+ key: "render-block-" + i.id,
2014
+ block: i,
2015
+ context: s.builderContext
2016
+ }, null, 8, ["block", "context"]))), 128)) : b("", !0),
2017
+ t.blocks ? (l(!0), d(R, { key: 1 }, E(t.blocks, (i, u) => (l(), w(c, {
2018
+ key: "block-style-" + i.id,
2019
+ block: i,
2020
+ context: s.builderContext
2021
+ }, null, 8, ["block", "context"]))), 128)) : b("", !0)
2022
+ ], 42, ln);
2023
+ }
2024
+ const un = /* @__PURE__ */ f(cn, [["render", dn], ["__scopeId", "data-v-b37c318e"]]), se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2025
+ __proto__: null,
2026
+ default: un
2027
+ }, Symbol.toStringTag, { value: "Module" })), H = {};
2028
+ function fn(e) {
2029
+ if (h()) {
2030
+ Object.assign(H, e);
2031
+ const n = {
2032
+ type: "builder.settingsChange",
2033
+ data: H
2034
+ };
2035
+ parent.postMessage(n, "*");
2036
+ }
2037
+ }
2038
+ export {
2039
+ nt as B,
2040
+ me as C,
2041
+ ct as F,
2042
+ Ce as I,
2043
+ Qe as S,
2044
+ j as T,
2045
+ Fe as V,
2046
+ f as _,
2047
+ Ie as a,
2048
+ rt as b,
2049
+ un as c,
2050
+ At as d,
2051
+ N as e,
2052
+ Q as f,
2053
+ hn as g,
2054
+ $t as h,
2055
+ g as i,
2056
+ ae as j,
2057
+ X as k,
2058
+ qe as l,
2059
+ pn as m,
2060
+ Ke as n,
2061
+ Oe as o,
2062
+ je as p,
2063
+ Ue as q,
2064
+ on as r,
2065
+ fn as s,
2066
+ q as t
2067
+ };