@builder.io/sdk-vue 0.2.1 → 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.
- package/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.e14644b9.js → block-styles.4667431d.js} +3 -3
- package/packages/_vue2/dist/{block-styles.1657b45f.cjs → block-styles.7c2a87df.cjs} +1 -1
- package/packages/{_vue3/dist/css.a2956fb2.js → _vue2/dist/css.468435de.js} +1 -1
- package/packages/_vue2/dist/{css.883115fd.cjs → css.dce6e4eb.cjs} +1 -1
- package/packages/_vue2/dist/index.78ba6586.cjs +29 -0
- package/packages/_vue2/dist/{index.af260d16.js → index.eb91dc82.js} +340 -325
- package/packages/_vue2/dist/render-block.67e4dd65.cjs +3 -0
- package/packages/_vue2/dist/{render-block.9394f002.js → render-block.6f9a607a.js} +28 -26
- package/packages/_vue2/dist/{render-component.58fe0189.js → render-component.10d6c8d2.js} +3 -3
- package/packages/_vue2/dist/{render-component.ab9c6751.cjs → render-component.3578089b.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.f139e6d2.cjs → render-inlined-styles.56373d13.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.cdf66d21.js → render-inlined-styles.942eb38d.js} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.d7008df1.cjs → render-repeated-block.18d7fc6e.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.fd7c9132.js → render-repeated-block.1bb5c2fb.js} +2 -2
- package/packages/_vue2/dist/{render-styles.039fcc51.js → render-styles.0d1f8872.js} +2 -2
- package/packages/_vue2/dist/{render-styles.5f902b3b.cjs → render-styles.de7287b6.cjs} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-content/index.d.ts +1 -1
- package/packages/_vue2/dist/src/helpers/logger.d.ts +5 -0
- package/packages/_vue2/dist/src/types/builder-content.d.ts +1 -1
- package/packages/_vue2/dist/src/types/components.d.ts +1 -72
- package/packages/_vue2/dist/src/types/input.d.ts +121 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/{block-styles.02894248.cjs → block-styles.09955b0c.cjs} +1 -1
- package/packages/_vue3/dist/{block-styles.6e74059d.js → block-styles.6bd36a5a.js} +3 -3
- package/packages/_vue3/dist/css.3241302b.cjs +6 -0
- package/packages/{_vue2/dist/css.9b722913.js → _vue3/dist/css.81a21c5a.js} +1 -1
- package/packages/_vue3/dist/{index.b87b71f2.js → index.45ab85e5.js} +506 -491
- package/packages/_vue3/dist/index.cca81180.cjs +29 -0
- package/packages/_vue3/dist/render-block.33cc5768.cjs +3 -0
- package/packages/_vue3/dist/{render-block.1a6dc153.js → render-block.ec4c1913.js} +27 -25
- package/packages/_vue3/dist/{render-component.c1760213.js → render-component.3bd8dc76.js} +3 -3
- package/packages/_vue3/dist/{render-component.ce1da9f7.cjs → render-component.c0d5e797.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.1e4cf51b.js → render-inlined-styles.952d2fff.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.4e769566.cjs → render-inlined-styles.b55b6667.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.bc4f1130.js → render-repeated-block.263f0cec.js} +2 -2
- package/packages/_vue3/dist/{render-repeated-block.607b20dd.cjs → render-repeated-block.c3c9e926.cjs} +1 -1
- package/packages/_vue3/dist/{render-styles.86b7cc7d.js → render-styles.cf6faa29.js} +2 -2
- package/packages/_vue3/dist/{render-styles.efd8cf3d.cjs → render-styles.d1ac3a18.cjs} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +0 -9
- package/packages/_vue3/dist/src/functions/get-content/index.d.ts +1 -1
- package/packages/_vue3/dist/src/helpers/logger.d.ts +5 -0
- package/packages/_vue3/dist/src/types/builder-content.d.ts +1 -1
- package/packages/_vue3/dist/src/types/components.d.ts +1 -72
- package/packages/_vue3/dist/src/types/input.d.ts +121 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/index.b9a8defa.cjs +0 -29
- package/packages/_vue2/dist/render-block.73e50e2a.cjs +0 -3
- package/packages/_vue3/dist/css.4fc86c7e.cjs +0 -6
- package/packages/_vue3/dist/index.501ef5e2.cjs +0 -29
- package/packages/_vue3/dist/render-block.a0bf0cfc.cjs +0 -3
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { openBlock as d, createElementBlock as m, mergeProps as
|
|
2
|
-
const
|
|
1
|
+
import { openBlock as d, createElementBlock as m, mergeProps as _, toHandlers as I, toDisplayString as $, defineAsyncComponent as x, resolveComponent as k, normalizeClass as j, normalizeStyle as T, createBlock as R, createCommentVNode as y, Fragment as A, renderList as U, createVNode as Z, renderSlot as V, createElementVNode as H } from "vue";
|
|
2
|
+
const he = {
|
|
3
3
|
name: "builder-button",
|
|
4
4
|
props: ["attributes", "text", "link", "openLinkInNewTab"],
|
|
5
5
|
methods: {
|
|
6
6
|
filterAttrs: function(n = {}, t) {
|
|
7
7
|
const o = "v-on:";
|
|
8
|
-
return Object.keys(n).filter((
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return Object.keys(n).filter((i) => {
|
|
9
|
+
if (!n[i])
|
|
10
|
+
return !1;
|
|
11
|
+
const r = i.startsWith(o);
|
|
12
|
+
return t ? r : !r;
|
|
11
13
|
}).reduce(
|
|
12
|
-
(
|
|
13
|
-
...
|
|
14
|
-
[
|
|
14
|
+
(i, r) => ({
|
|
15
|
+
...i,
|
|
16
|
+
[r.replace(o, "")]: n[r]
|
|
15
17
|
}),
|
|
16
18
|
{}
|
|
17
19
|
);
|
|
@@ -29,24 +31,24 @@ const me = {
|
|
|
29
31
|
};
|
|
30
32
|
const h = (e, n) => {
|
|
31
33
|
const t = e.__vccOpts || e;
|
|
32
|
-
for (const [o,
|
|
33
|
-
t[o] =
|
|
34
|
+
for (const [o, i] of n)
|
|
35
|
+
t[o] = i;
|
|
34
36
|
return t;
|
|
35
|
-
},
|
|
36
|
-
function
|
|
37
|
-
return t.link ? (d(), m("a",
|
|
37
|
+
}, fe = ["href", "target"];
|
|
38
|
+
function ge(e, n, t, o, i, r) {
|
|
39
|
+
return t.link ? (d(), m("a", _({
|
|
38
40
|
key: 0,
|
|
39
41
|
role: "button",
|
|
40
42
|
href: t.link,
|
|
41
43
|
target: t.openLinkInNewTab ? "_blank" : void 0
|
|
42
|
-
},
|
|
44
|
+
}, r.filterAttrs(t.attributes, !1), I(r.filterAttrs(t.attributes, !0), !0)), $(t.text), 17, fe)) : (d(), m("button", _({
|
|
43
45
|
key: 1,
|
|
44
|
-
class:
|
|
46
|
+
class: r._classStringToObject(
|
|
45
47
|
t.attributes.class + " button-1yj9n7yt24z"
|
|
46
48
|
)
|
|
47
|
-
},
|
|
49
|
+
}, r.filterAttrs(t.attributes, !1), I(r.filterAttrs(t.attributes, !0), !0)), $(t.text), 17));
|
|
48
50
|
}
|
|
49
|
-
const
|
|
51
|
+
const be = /* @__PURE__ */ h(he, [["render", ge], ["__scopeId", "data-v-fa5dea7e"]]), L = (e) => JSON.parse(JSON.stringify(e)), ee = {
|
|
50
52
|
small: {
|
|
51
53
|
min: 320,
|
|
52
54
|
default: 321,
|
|
@@ -62,8 +64,8 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
62
64
|
default: 991,
|
|
63
65
|
max: 1200
|
|
64
66
|
}
|
|
65
|
-
},
|
|
66
|
-
const t =
|
|
67
|
+
}, jn = (e, n = ee) => `@media (max-width: ${n[e].max}px)`, ye = ({ small: e, medium: n }) => {
|
|
68
|
+
const t = L(ee);
|
|
67
69
|
if (!e || !n)
|
|
68
70
|
return t;
|
|
69
71
|
const o = Math.floor(e / 2);
|
|
@@ -72,19 +74,19 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
72
74
|
min: o,
|
|
73
75
|
default: o + 1
|
|
74
76
|
};
|
|
75
|
-
const
|
|
77
|
+
const i = t.small.max + 1;
|
|
76
78
|
t.medium = {
|
|
77
79
|
max: n,
|
|
78
|
-
min:
|
|
79
|
-
default:
|
|
80
|
+
min: i,
|
|
81
|
+
default: i + 1
|
|
80
82
|
};
|
|
81
|
-
const
|
|
83
|
+
const r = t.medium.max + 1;
|
|
82
84
|
return t.large = {
|
|
83
85
|
max: 2e3,
|
|
84
|
-
min:
|
|
85
|
-
default:
|
|
86
|
+
min: r,
|
|
87
|
+
default: r + 1
|
|
86
88
|
}, t;
|
|
87
|
-
},
|
|
89
|
+
}, E = "vue3", ve = Symbol(), P = {
|
|
88
90
|
Builder: {
|
|
89
91
|
content: null,
|
|
90
92
|
context: {},
|
|
@@ -96,22 +98,22 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
96
98
|
registeredComponents: {},
|
|
97
99
|
inheritedStyles: {}
|
|
98
100
|
},
|
|
99
|
-
key:
|
|
100
|
-
},
|
|
101
|
+
key: ve
|
|
102
|
+
}, xe = () => Promise.resolve().then(() => te).then((e) => e.default).catch((e) => {
|
|
101
103
|
throw console.error(
|
|
102
104
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
103
105
|
e
|
|
104
106
|
), e;
|
|
105
|
-
}),
|
|
107
|
+
}), ke = () => import("./render-inlined-styles.952d2fff.js").then((e) => e.default).catch((e) => {
|
|
106
108
|
throw console.error(
|
|
107
109
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
108
110
|
e
|
|
109
111
|
), e;
|
|
110
|
-
}),
|
|
112
|
+
}), Se = {
|
|
111
113
|
name: "builder-columns",
|
|
112
114
|
components: {
|
|
113
|
-
RenderInlinedStyles: x(
|
|
114
|
-
RenderBlocks: x(
|
|
115
|
+
RenderInlinedStyles: x(ke),
|
|
116
|
+
RenderBlocks: x(xe)
|
|
115
117
|
},
|
|
116
118
|
props: [
|
|
117
119
|
"space",
|
|
@@ -126,11 +128,11 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
126
128
|
cols: this.columns || [],
|
|
127
129
|
stackAt: this.stackColumnsAt || "tablet",
|
|
128
130
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
129
|
-
TARGET:
|
|
131
|
+
TARGET: E
|
|
130
132
|
};
|
|
131
133
|
},
|
|
132
134
|
inject: {
|
|
133
|
-
builderContext:
|
|
135
|
+
builderContext: P.key
|
|
134
136
|
},
|
|
135
137
|
computed: {
|
|
136
138
|
columnsCssVars() {
|
|
@@ -193,7 +195,7 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
193
195
|
},
|
|
194
196
|
columnCssVars(e) {
|
|
195
197
|
e === 0 || this.gutterSize;
|
|
196
|
-
const n = this.getColumnCssWidth(e), t = `${this.gutterSize}px`, o = "100%",
|
|
198
|
+
const n = this.getColumnCssWidth(e), t = `${this.gutterSize}px`, o = "100%", i = 0;
|
|
197
199
|
return {
|
|
198
200
|
width: n,
|
|
199
201
|
"margin-left": t,
|
|
@@ -202,7 +204,7 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
202
204
|
desktopStyle: n
|
|
203
205
|
}),
|
|
204
206
|
"--column-margin-left-mobile": this.getMobileStyle({
|
|
205
|
-
stackedStyle:
|
|
207
|
+
stackedStyle: i,
|
|
206
208
|
desktopStyle: t
|
|
207
209
|
}),
|
|
208
210
|
"--column-width-tablet": this.getTabletStyle({
|
|
@@ -210,14 +212,14 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
210
212
|
desktopStyle: n
|
|
211
213
|
}),
|
|
212
214
|
"--column-margin-left-tablet": this.getTabletStyle({
|
|
213
|
-
stackedStyle:
|
|
215
|
+
stackedStyle: i,
|
|
214
216
|
desktopStyle: t
|
|
215
217
|
})
|
|
216
218
|
};
|
|
217
219
|
},
|
|
218
220
|
getWidthForBreakpointSize(e) {
|
|
219
221
|
var t, o;
|
|
220
|
-
return
|
|
222
|
+
return ye(
|
|
221
223
|
((o = (t = this.builderContext.content) == null ? void 0 : t.meta) == null ? void 0 : o.breakpoints) || {}
|
|
222
224
|
)[e].max;
|
|
223
225
|
},
|
|
@@ -232,32 +234,32 @@ const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-498ca04d
|
|
|
232
234
|
}
|
|
233
235
|
}
|
|
234
236
|
};
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
+
function _e(e, n, t, o, i, r) {
|
|
238
|
+
const s = k("render-inlined-styles"), c = k("render-blocks");
|
|
237
239
|
return d(), m("div", {
|
|
238
240
|
class: j(
|
|
239
|
-
|
|
240
|
-
`builder-columns ${t.builderBlock.id}-breakpoints div-
|
|
241
|
+
r._classStringToObject(
|
|
242
|
+
`builder-columns ${t.builderBlock.id}-breakpoints div-2btisl9m7v3`
|
|
241
243
|
)
|
|
242
244
|
),
|
|
243
|
-
style:
|
|
245
|
+
style: T(r.columnsCssVars),
|
|
244
246
|
dataSet: {
|
|
245
247
|
"builder-block-name": "builder-columns"
|
|
246
248
|
}
|
|
247
249
|
}, [
|
|
248
|
-
|
|
250
|
+
i.TARGET !== "reactNative" ? (d(), R(s, {
|
|
249
251
|
key: 0,
|
|
250
|
-
styles:
|
|
252
|
+
styles: r.columnsStyles
|
|
251
253
|
}, null, 8, ["styles"])) : y("", !0),
|
|
252
|
-
(d(!0), m(
|
|
254
|
+
(d(!0), m(A, null, U(t.columns, (a, l) => (d(), m("div", {
|
|
253
255
|
key: l,
|
|
254
|
-
class: "builder-column div-
|
|
255
|
-
style:
|
|
256
|
+
class: "builder-column div-2btisl9m7v3-2",
|
|
257
|
+
style: T(r.columnCssVars(l)),
|
|
256
258
|
dataSet: {
|
|
257
259
|
"builder-block-name": "builder-column"
|
|
258
260
|
}
|
|
259
261
|
}, [
|
|
260
|
-
|
|
262
|
+
Z(c, {
|
|
261
263
|
blocks: a.blocks,
|
|
262
264
|
path: `component.options.columns.${l}.blocks`,
|
|
263
265
|
parent: t.builderBlock.id,
|
|
@@ -268,49 +270,49 @@ function ke(e, n, t, o, s, i) {
|
|
|
268
270
|
], 4))), 128))
|
|
269
271
|
], 6);
|
|
270
272
|
}
|
|
271
|
-
const
|
|
273
|
+
const we = /* @__PURE__ */ h(Se, [["render", _e], ["__scopeId", "data-v-4459bc28"]]), Ce = {
|
|
272
274
|
name: "builder-fragment-component",
|
|
273
275
|
props: []
|
|
274
276
|
};
|
|
275
|
-
function
|
|
277
|
+
function Ie(e, n, t, o, i, r) {
|
|
276
278
|
return d(), m("span", null, [
|
|
277
|
-
|
|
279
|
+
V(e.$slots, "default")
|
|
278
280
|
]);
|
|
279
281
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
282
|
+
const Te = /* @__PURE__ */ h(Ce, [["render", Ie]]);
|
|
283
|
+
function z(e) {
|
|
282
284
|
return e.replace(/http(s)?:/, "");
|
|
283
285
|
}
|
|
284
|
-
function
|
|
285
|
-
const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"),
|
|
286
|
-
return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e +
|
|
286
|
+
function Re(e = "", n, t) {
|
|
287
|
+
const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"), i = e.indexOf("?") !== -1 ? "&" : "?";
|
|
288
|
+
return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e + i + n + "=" + encodeURIComponent(t);
|
|
287
289
|
}
|
|
288
|
-
function
|
|
290
|
+
function Ee(e, n) {
|
|
289
291
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !n)
|
|
290
292
|
return e;
|
|
291
293
|
if (n === "master")
|
|
292
|
-
return
|
|
294
|
+
return z(e);
|
|
293
295
|
const t = e.match(
|
|
294
296
|
/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
|
|
295
297
|
);
|
|
296
298
|
if (t) {
|
|
297
|
-
const o = e.split(t[0]),
|
|
298
|
-
return
|
|
299
|
+
const o = e.split(t[0]), i = t[3], r = n.match("x") ? n : `${n}x`;
|
|
300
|
+
return z(`${o[0]}_${r}${i}`);
|
|
299
301
|
}
|
|
300
302
|
return null;
|
|
301
303
|
}
|
|
302
|
-
function
|
|
304
|
+
function F(e) {
|
|
303
305
|
if (!e)
|
|
304
306
|
return e;
|
|
305
307
|
const n = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
306
308
|
if (e.match(/builder\.io/)) {
|
|
307
309
|
let t = e;
|
|
308
310
|
const o = Number(e.split("?width=")[1]);
|
|
309
|
-
return isNaN(o) || (t = `${t} ${o}w`), n.filter((
|
|
311
|
+
return isNaN(o) || (t = `${t} ${o}w`), n.filter((i) => i !== o).map((i) => `${Re(e, "width", i)} ${i}w`).concat([t]).join(", ");
|
|
310
312
|
}
|
|
311
|
-
return e.match(/cdn\.shopify\.com/) ? n.map((t) => [
|
|
313
|
+
return e.match(/cdn\.shopify\.com/) ? n.map((t) => [Ee(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, o]) => `${t} ${o}w`).concat([e]).join(", ") : e;
|
|
312
314
|
}
|
|
313
|
-
const
|
|
315
|
+
const Ae = {
|
|
314
316
|
name: "builder-image",
|
|
315
317
|
props: [
|
|
316
318
|
"image",
|
|
@@ -334,10 +336,10 @@ const Re = {
|
|
|
334
336
|
return this.srcset;
|
|
335
337
|
if (this.srcset && ((t = this.image) == null ? void 0 : t.includes("builder.io/api/v1/image"))) {
|
|
336
338
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
337
|
-
return console.debug("Removed given srcset"),
|
|
339
|
+
return console.debug("Removed given srcset"), F(n);
|
|
338
340
|
} else if (this.image && !this.srcset)
|
|
339
|
-
return
|
|
340
|
-
return
|
|
341
|
+
return F(n);
|
|
342
|
+
return F(n);
|
|
341
343
|
},
|
|
342
344
|
webpSrcSet() {
|
|
343
345
|
var e;
|
|
@@ -366,52 +368,52 @@ const Re = {
|
|
|
366
368
|
}
|
|
367
369
|
}
|
|
368
370
|
};
|
|
369
|
-
const
|
|
371
|
+
const Ve = ["srcset"], je = ["alt", "role", "src", "srcset", "sizes"], Pe = {
|
|
370
372
|
key: 2,
|
|
371
|
-
class: "div-
|
|
373
|
+
class: "div-20vehov4ay6-2"
|
|
372
374
|
};
|
|
373
|
-
function Be(e, n, t, o,
|
|
374
|
-
var
|
|
375
|
-
return d(), m(
|
|
376
|
-
|
|
377
|
-
|
|
375
|
+
function Be(e, n, t, o, i, r) {
|
|
376
|
+
var s, c, a, l;
|
|
377
|
+
return d(), m(A, null, [
|
|
378
|
+
H("picture", null, [
|
|
379
|
+
r.webpSrcSet ? (d(), m("source", {
|
|
378
380
|
key: 0,
|
|
379
381
|
type: "image/webp",
|
|
380
|
-
srcset:
|
|
381
|
-
}, null, 8,
|
|
382
|
-
|
|
382
|
+
srcset: r.webpSrcSet
|
|
383
|
+
}, null, 8, Ve)) : y("", !0),
|
|
384
|
+
H("img", {
|
|
383
385
|
loading: "lazy",
|
|
384
386
|
alt: t.altText,
|
|
385
387
|
role: t.altText ? "presentation" : void 0,
|
|
386
|
-
style:
|
|
388
|
+
style: T({
|
|
387
389
|
objectPosition: t.backgroundPosition || "center",
|
|
388
390
|
objectFit: t.backgroundSize || "cover",
|
|
389
|
-
...
|
|
391
|
+
...r.aspectRatioCss
|
|
390
392
|
}),
|
|
391
393
|
class: j(
|
|
392
|
-
|
|
393
|
-
"builder-image" + (t.className ? " " + t.className : "") + " img-
|
|
394
|
+
r._classStringToObject(
|
|
395
|
+
"builder-image" + (t.className ? " " + t.className : "") + " img-20vehov4ay6"
|
|
394
396
|
)
|
|
395
397
|
),
|
|
396
398
|
src: t.image,
|
|
397
|
-
srcset:
|
|
399
|
+
srcset: r.srcSetToUse,
|
|
398
400
|
sizes: t.sizes
|
|
399
|
-
}, null, 14,
|
|
401
|
+
}, null, 14, je)
|
|
400
402
|
]),
|
|
401
|
-
t.aspectRatio && !(((c = (
|
|
403
|
+
t.aspectRatio && !(((c = (s = t.builderBlock) == null ? void 0 : s.children) == null ? void 0 : c.length) && t.fitContent) ? (d(), m("div", {
|
|
402
404
|
key: 0,
|
|
403
|
-
class: "builder-image-sizer div-
|
|
404
|
-
style:
|
|
405
|
+
class: "builder-image-sizer div-20vehov4ay6",
|
|
406
|
+
style: T({
|
|
405
407
|
paddingTop: t.aspectRatio * 100 + "%"
|
|
406
408
|
})
|
|
407
409
|
}, null, 4)) : y("", !0),
|
|
408
|
-
((l = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : l.length) && t.fitContent ?
|
|
409
|
-
!t.fitContent && e.children ? (d(), m("div",
|
|
410
|
-
|
|
410
|
+
((l = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : l.length) && t.fitContent ? V(e.$slots, "default", { key: 1 }, void 0, !0) : y("", !0),
|
|
411
|
+
!t.fitContent && e.children ? (d(), m("div", Pe, [
|
|
412
|
+
V(e.$slots, "default", {}, void 0, !0)
|
|
411
413
|
])) : y("", !0)
|
|
412
414
|
], 64);
|
|
413
415
|
}
|
|
414
|
-
const
|
|
416
|
+
const Fe = /* @__PURE__ */ h(Ae, [["render", Be], ["__scopeId", "data-v-b99a9c06"]]);
|
|
415
417
|
function p() {
|
|
416
418
|
return typeof window < "u" && typeof document < "u";
|
|
417
419
|
}
|
|
@@ -421,25 +423,25 @@ function Oe() {
|
|
|
421
423
|
function v() {
|
|
422
424
|
return Oe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
423
425
|
}
|
|
424
|
-
const
|
|
426
|
+
const Ue = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).catch((e) => {
|
|
425
427
|
throw console.error(
|
|
426
428
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
427
429
|
e
|
|
428
430
|
), e;
|
|
429
|
-
}),
|
|
431
|
+
}), We = () => import("./render-block.ec4c1913.js").then((e) => e.r).then((e) => e.default).catch((e) => {
|
|
430
432
|
throw console.error(
|
|
431
433
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
432
434
|
e
|
|
433
435
|
), e;
|
|
434
|
-
}),
|
|
436
|
+
}), Me = {
|
|
435
437
|
name: "render-blocks",
|
|
436
438
|
components: {
|
|
437
|
-
RenderBlock: x(
|
|
438
|
-
BlockStyles: x(
|
|
439
|
+
RenderBlock: x(We),
|
|
440
|
+
BlockStyles: x(Ue)
|
|
439
441
|
},
|
|
440
442
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
441
443
|
inject: {
|
|
442
|
-
builderContext:
|
|
444
|
+
builderContext: P.key
|
|
443
445
|
},
|
|
444
446
|
computed: {
|
|
445
447
|
className() {
|
|
@@ -485,36 +487,36 @@ const Pe = () => import("./block-styles.6e74059d.js").then((e) => e.default).cat
|
|
|
485
487
|
}
|
|
486
488
|
}
|
|
487
489
|
};
|
|
488
|
-
const
|
|
489
|
-
function
|
|
490
|
-
const
|
|
490
|
+
const Le = ["builder-path", "builder-parent-id", "dataSet"];
|
|
491
|
+
function Ne(e, n, t, o, i, r) {
|
|
492
|
+
const s = k("render-block"), c = k("block-styles");
|
|
491
493
|
return d(), m("div", {
|
|
492
|
-
class: j(
|
|
494
|
+
class: j(r._classStringToObject(r.className + " div-7fq9d0i380")),
|
|
493
495
|
"builder-path": t.path,
|
|
494
496
|
"builder-parent-id": t.parent,
|
|
495
497
|
dataSet: {
|
|
496
|
-
class:
|
|
498
|
+
class: r.className
|
|
497
499
|
},
|
|
498
|
-
style:
|
|
499
|
-
onClick: n[0] || (n[0] = (a) =>
|
|
500
|
-
onMouseenter: n[1] || (n[1] = (a) =>
|
|
500
|
+
style: T(t.styleProp),
|
|
501
|
+
onClick: n[0] || (n[0] = (a) => r.onClick()),
|
|
502
|
+
onMouseenter: n[1] || (n[1] = (a) => r.onMouseEnter())
|
|
501
503
|
}, [
|
|
502
|
-
t.blocks ? (d(!0), m(
|
|
504
|
+
t.blocks ? (d(!0), m(A, { key: 0 }, U(t.blocks, (a, l) => (d(), R(s, {
|
|
503
505
|
key: "render-block-" + a.id,
|
|
504
506
|
block: a,
|
|
505
|
-
context:
|
|
507
|
+
context: r.builderContext
|
|
506
508
|
}, null, 8, ["block", "context"]))), 128)) : y("", !0),
|
|
507
|
-
t.blocks ? (d(!0), m(
|
|
509
|
+
t.blocks ? (d(!0), m(A, { key: 1 }, U(t.blocks, (a, l) => (d(), R(c, {
|
|
508
510
|
key: "block-style-" + a.id,
|
|
509
511
|
block: a,
|
|
510
|
-
context:
|
|
512
|
+
context: r.builderContext
|
|
511
513
|
}, null, 8, ["block", "context"]))), 128)) : y("", !0)
|
|
512
|
-
], 46,
|
|
514
|
+
], 46, Le);
|
|
513
515
|
}
|
|
514
|
-
const
|
|
516
|
+
const $e = /* @__PURE__ */ h(Me, [["render", Ne], ["__scopeId", "data-v-81bad369"]]), te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
515
517
|
__proto__: null,
|
|
516
|
-
default:
|
|
517
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
518
|
+
default: $e
|
|
519
|
+
}, Symbol.toStringTag, { value: "Module" })), He = {
|
|
518
520
|
name: "Core:Button",
|
|
519
521
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
520
522
|
defaultStyles: {
|
|
@@ -550,10 +552,10 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
550
552
|
],
|
|
551
553
|
static: !0,
|
|
552
554
|
noWrap: !0
|
|
553
|
-
},
|
|
555
|
+
}, B = (e) => {
|
|
554
556
|
const n = e.toString().trim();
|
|
555
557
|
return `return (${!n.startsWith("function") && !n.startsWith("(") ? "function " : ""}${n}).apply(this, arguments)`;
|
|
556
|
-
},
|
|
558
|
+
}, ze = {
|
|
557
559
|
name: "Columns",
|
|
558
560
|
inputs: [
|
|
559
561
|
{
|
|
@@ -740,7 +742,7 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
740
742
|
]
|
|
741
743
|
}
|
|
742
744
|
],
|
|
743
|
-
onChange:
|
|
745
|
+
onChange: B((e) => {
|
|
744
746
|
function n() {
|
|
745
747
|
t.forEach((o) => {
|
|
746
748
|
o.delete("width");
|
|
@@ -748,9 +750,9 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
748
750
|
}
|
|
749
751
|
const t = e.get("columns");
|
|
750
752
|
Array.isArray(t) && !!t.find(
|
|
751
|
-
(
|
|
753
|
+
(i) => i.get("width")
|
|
752
754
|
) && (!!t.find(
|
|
753
|
-
(
|
|
755
|
+
(r) => !r.get("width")
|
|
754
756
|
) || t.reduce((c, a) => c + a.get("width"), 0) !== 100) && n();
|
|
755
757
|
})
|
|
756
758
|
},
|
|
@@ -777,13 +779,13 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
777
779
|
advanced: !0
|
|
778
780
|
}
|
|
779
781
|
]
|
|
780
|
-
},
|
|
782
|
+
}, Ke = {
|
|
781
783
|
name: "Fragment",
|
|
782
784
|
static: !0,
|
|
783
785
|
hidden: !0,
|
|
784
786
|
canHaveChildren: !0,
|
|
785
787
|
noWrap: !0
|
|
786
|
-
},
|
|
788
|
+
}, De = {
|
|
787
789
|
name: "Image",
|
|
788
790
|
static: !0,
|
|
789
791
|
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",
|
|
@@ -802,10 +804,10 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
802
804
|
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
803
805
|
required: !0,
|
|
804
806
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
805
|
-
onChange:
|
|
807
|
+
onChange: B(
|
|
806
808
|
(e) => {
|
|
807
809
|
e.delete("srcset"), e.delete("noWebp");
|
|
808
|
-
function t(
|
|
810
|
+
function t(s, c = 6e4) {
|
|
809
811
|
return new Promise((a, l) => {
|
|
810
812
|
const u = document.createElement("img");
|
|
811
813
|
let g = !1;
|
|
@@ -813,21 +815,21 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
813
815
|
g = !0, a(u);
|
|
814
816
|
}, u.addEventListener("error", (f) => {
|
|
815
817
|
console.warn("Image load failed", f.error), l(f.error);
|
|
816
|
-
}), u.src =
|
|
818
|
+
}), u.src = s, setTimeout(() => {
|
|
817
819
|
g || l(new Error("Image load timed out"));
|
|
818
820
|
}, c);
|
|
819
821
|
});
|
|
820
822
|
}
|
|
821
|
-
function o(
|
|
822
|
-
return Math.round(
|
|
823
|
+
function o(s) {
|
|
824
|
+
return Math.round(s * 1e3) / 1e3;
|
|
823
825
|
}
|
|
824
|
-
const
|
|
825
|
-
if (fetch(
|
|
826
|
-
|
|
827
|
-
}),
|
|
828
|
-
return t(
|
|
826
|
+
const i = e.get("image"), r = e.get("aspectRatio");
|
|
827
|
+
if (fetch(i).then((s) => s.blob()).then((s) => {
|
|
828
|
+
s.type.includes("svg") && e.set("noWebp", !0);
|
|
829
|
+
}), i && (!r || r === 0.7041))
|
|
830
|
+
return t(i).then((s) => {
|
|
829
831
|
const c = e.get("aspectRatio");
|
|
830
|
-
e.get("image") ===
|
|
832
|
+
e.get("image") === i && (!c || c === 0.7041) && s.width && s.height && (e.set("aspectRatio", o(s.height / s.width)), e.set("height", s.height), e.set("width", s.width));
|
|
831
833
|
});
|
|
832
834
|
}
|
|
833
835
|
)
|
|
@@ -910,7 +912,7 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
910
912
|
defaultValue: 0.7041
|
|
911
913
|
}
|
|
912
914
|
]
|
|
913
|
-
},
|
|
915
|
+
}, qe = {
|
|
914
916
|
name: "Core:Section",
|
|
915
917
|
static: !0,
|
|
916
918
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -954,27 +956,29 @@ const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-81bad369
|
|
|
954
956
|
}
|
|
955
957
|
}
|
|
956
958
|
]
|
|
957
|
-
},
|
|
959
|
+
}, Ge = {
|
|
958
960
|
name: "builder-section-component",
|
|
959
961
|
props: ["maxWidth", "attributes"],
|
|
960
962
|
methods: {
|
|
961
963
|
filterAttrs: function(n = {}, t) {
|
|
962
964
|
const o = "v-on:";
|
|
963
|
-
return Object.keys(n).filter((
|
|
964
|
-
|
|
965
|
-
|
|
965
|
+
return Object.keys(n).filter((i) => {
|
|
966
|
+
if (!n[i])
|
|
967
|
+
return !1;
|
|
968
|
+
const r = i.startsWith(o);
|
|
969
|
+
return t ? r : !r;
|
|
966
970
|
}).reduce(
|
|
967
|
-
(
|
|
968
|
-
...
|
|
969
|
-
[
|
|
971
|
+
(i, r) => ({
|
|
972
|
+
...i,
|
|
973
|
+
[r.replace(o, "")]: n[r]
|
|
970
974
|
}),
|
|
971
975
|
{}
|
|
972
976
|
);
|
|
973
977
|
}
|
|
974
978
|
}
|
|
975
979
|
};
|
|
976
|
-
function
|
|
977
|
-
return d(), m("section",
|
|
980
|
+
function Je(e, n, t, o, i, r) {
|
|
981
|
+
return d(), m("section", _({
|
|
978
982
|
style: {
|
|
979
983
|
width: "100%",
|
|
980
984
|
alignSelf: "stretch",
|
|
@@ -987,11 +991,11 @@ function qe(e, n, t, o, s, i) {
|
|
|
987
991
|
marginLeft: "auto",
|
|
988
992
|
marginRight: "auto"
|
|
989
993
|
}
|
|
990
|
-
},
|
|
991
|
-
|
|
994
|
+
}, r.filterAttrs(t.attributes, !1), I(r.filterAttrs(t.attributes, !0), !0)), [
|
|
995
|
+
V(e.$slots, "default")
|
|
992
996
|
], 16);
|
|
993
997
|
}
|
|
994
|
-
const
|
|
998
|
+
const Xe = /* @__PURE__ */ h(Ge, [["render", Je]]), Ye = {
|
|
995
999
|
name: "Symbol",
|
|
996
1000
|
noWrap: !0,
|
|
997
1001
|
static: !0,
|
|
@@ -1029,12 +1033,16 @@ const Ge = /* @__PURE__ */ h(De, [["render", qe]]), Je = {
|
|
|
1029
1033
|
type: "boolean"
|
|
1030
1034
|
}
|
|
1031
1035
|
]
|
|
1036
|
+
}, O = "[Builder.io]: ", S = {
|
|
1037
|
+
log: (...e) => console.log(O, ...e),
|
|
1038
|
+
error: (...e) => console.error(O, ...e),
|
|
1039
|
+
warn: (...e) => console.warn(O, ...e)
|
|
1032
1040
|
};
|
|
1033
|
-
function
|
|
1041
|
+
function Qe() {
|
|
1034
1042
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1035
1043
|
}
|
|
1036
|
-
function
|
|
1037
|
-
const e =
|
|
1044
|
+
function Ze() {
|
|
1045
|
+
const e = Qe().fetch;
|
|
1038
1046
|
if (typeof e > "u")
|
|
1039
1047
|
throw console.warn(
|
|
1040
1048
|
`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
@@ -1042,12 +1050,12 @@ function Xe() {
|
|
|
1042
1050
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1043
1051
|
return e;
|
|
1044
1052
|
}
|
|
1045
|
-
const
|
|
1053
|
+
const ne = Ze(), w = (e) => e != null, et = (e) => {
|
|
1046
1054
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1047
1055
|
return e;
|
|
1048
1056
|
const n = e.split(".");
|
|
1049
1057
|
return n.length > 2 ? n.slice(1).join(".") : e;
|
|
1050
|
-
},
|
|
1058
|
+
}, oe = async ({
|
|
1051
1059
|
name: e,
|
|
1052
1060
|
canTrack: n
|
|
1053
1061
|
}) => {
|
|
@@ -1058,23 +1066,23 @@ const ee = Xe(), _ = (e) => e != null, Qe = (e) => {
|
|
|
1058
1066
|
console.debug("[COOKIE] GET error: ", o);
|
|
1059
1067
|
return;
|
|
1060
1068
|
}
|
|
1061
|
-
},
|
|
1069
|
+
}, tt = (e) => e.map(([n, t]) => t ? `${n}=${t}` : n).filter(w).join("; "), nt = [
|
|
1062
1070
|
["secure", ""],
|
|
1063
1071
|
["SameSite", "None"]
|
|
1064
|
-
],
|
|
1072
|
+
], ot = ({
|
|
1065
1073
|
name: e,
|
|
1066
1074
|
value: n,
|
|
1067
1075
|
expires: t
|
|
1068
1076
|
}) => {
|
|
1069
|
-
const
|
|
1077
|
+
const i = (p() ? location.protocol === "https:" : !0) ? nt : [[]], r = t ? [["expires", t.toUTCString()]] : [[]], s = [
|
|
1070
1078
|
[e, n],
|
|
1071
|
-
...
|
|
1079
|
+
...r,
|
|
1072
1080
|
["path", "/"],
|
|
1073
|
-
["domain",
|
|
1074
|
-
...
|
|
1081
|
+
["domain", et(window.location.hostname)],
|
|
1082
|
+
...i
|
|
1075
1083
|
];
|
|
1076
|
-
return
|
|
1077
|
-
},
|
|
1084
|
+
return tt(s);
|
|
1085
|
+
}, ie = async ({
|
|
1078
1086
|
name: e,
|
|
1079
1087
|
value: n,
|
|
1080
1088
|
expires: t,
|
|
@@ -1083,32 +1091,32 @@ const ee = Xe(), _ = (e) => e != null, Qe = (e) => {
|
|
|
1083
1091
|
try {
|
|
1084
1092
|
if (!o)
|
|
1085
1093
|
return;
|
|
1086
|
-
const
|
|
1087
|
-
document.cookie =
|
|
1088
|
-
} catch (
|
|
1089
|
-
console.warn("[COOKIE] SET error: ",
|
|
1094
|
+
const i = ot({ name: e, value: n, expires: t });
|
|
1095
|
+
document.cookie = i;
|
|
1096
|
+
} catch (i) {
|
|
1097
|
+
console.warn("[COOKIE] SET error: ", i);
|
|
1090
1098
|
}
|
|
1091
|
-
},
|
|
1099
|
+
}, it = "builderio.variations", re = (e) => `${it}.${e}`, rt = ({
|
|
1092
1100
|
contentId: e,
|
|
1093
1101
|
canTrack: n
|
|
1094
|
-
}) =>
|
|
1102
|
+
}) => oe({ name: re(e), canTrack: n }), st = ({
|
|
1095
1103
|
contentId: e,
|
|
1096
1104
|
canTrack: n,
|
|
1097
1105
|
value: t
|
|
1098
|
-
}) =>
|
|
1106
|
+
}) => ie({ name: re(e), value: t, canTrack: n }), at = (e) => w(e.id) && w(e.variations) && Object.keys(e.variations).length > 0, ct = ({
|
|
1099
1107
|
id: e,
|
|
1100
1108
|
variations: n
|
|
1101
1109
|
}) => {
|
|
1102
|
-
var
|
|
1110
|
+
var i;
|
|
1103
1111
|
let t = 0;
|
|
1104
1112
|
const o = Math.random();
|
|
1105
|
-
for (const
|
|
1106
|
-
const
|
|
1107
|
-
if (t +=
|
|
1108
|
-
return
|
|
1113
|
+
for (const r in n) {
|
|
1114
|
+
const s = (i = n[r]) == null ? void 0 : i.testRatio;
|
|
1115
|
+
if (t += s, o < t)
|
|
1116
|
+
return r;
|
|
1109
1117
|
}
|
|
1110
1118
|
return e;
|
|
1111
|
-
},
|
|
1119
|
+
}, K = ({
|
|
1112
1120
|
item: e,
|
|
1113
1121
|
testGroupId: n
|
|
1114
1122
|
}) => {
|
|
@@ -1121,127 +1129,131 @@ const ee = Xe(), _ = (e) => e != null, Qe = (e) => {
|
|
|
1121
1129
|
testVariationId: t.id,
|
|
1122
1130
|
testVariationName: t.name || (t.id === e.id ? "Default" : "")
|
|
1123
1131
|
};
|
|
1124
|
-
},
|
|
1132
|
+
}, lt = async ({
|
|
1125
1133
|
item: e,
|
|
1126
1134
|
canTrack: n
|
|
1127
1135
|
}) => {
|
|
1128
|
-
const t = await
|
|
1136
|
+
const t = await rt({
|
|
1129
1137
|
canTrack: n,
|
|
1130
1138
|
contentId: e.id
|
|
1131
|
-
}), o = t ?
|
|
1139
|
+
}), o = t ? K({ item: e, testGroupId: t }) : void 0;
|
|
1132
1140
|
if (o)
|
|
1133
1141
|
return o;
|
|
1134
1142
|
{
|
|
1135
|
-
const
|
|
1143
|
+
const i = ct({
|
|
1136
1144
|
variations: e.variations,
|
|
1137
1145
|
id: e.id
|
|
1138
1146
|
});
|
|
1139
|
-
return
|
|
1147
|
+
return st({
|
|
1140
1148
|
contentId: e.id,
|
|
1141
|
-
value:
|
|
1149
|
+
value: i,
|
|
1142
1150
|
canTrack: n
|
|
1143
|
-
}).catch((
|
|
1144
|
-
console.error("could not store A/B test variation: ",
|
|
1145
|
-
}),
|
|
1151
|
+
}).catch((r) => {
|
|
1152
|
+
console.error("could not store A/B test variation: ", r);
|
|
1153
|
+
}), K({ item: e, testGroupId: i });
|
|
1146
1154
|
}
|
|
1147
|
-
},
|
|
1155
|
+
}, dt = async ({
|
|
1148
1156
|
item: e,
|
|
1149
1157
|
canTrack: n
|
|
1150
1158
|
}) => {
|
|
1151
|
-
if (!
|
|
1159
|
+
if (!at(e))
|
|
1152
1160
|
return;
|
|
1153
|
-
const t = await
|
|
1161
|
+
const t = await lt({ item: e, canTrack: n });
|
|
1154
1162
|
Object.assign(e, t);
|
|
1155
1163
|
};
|
|
1156
|
-
function
|
|
1157
|
-
return Object.keys(e).reduce((o,
|
|
1158
|
-
const
|
|
1164
|
+
function W(e, n = null, t = ".") {
|
|
1165
|
+
return Object.keys(e).reduce((o, i) => {
|
|
1166
|
+
const r = e[i], s = [n, i].filter(Boolean).join(t);
|
|
1159
1167
|
return [
|
|
1160
|
-
typeof
|
|
1161
|
-
|
|
1162
|
-
!(Array.isArray(
|
|
1163
|
-
].every(Boolean) ? { ...o, ...
|
|
1168
|
+
typeof r == "object",
|
|
1169
|
+
r !== null,
|
|
1170
|
+
!(Array.isArray(r) && r.length === 0)
|
|
1171
|
+
].every(Boolean) ? { ...o, ...W(r, s, t) } : { ...o, [s]: r };
|
|
1164
1172
|
}, {});
|
|
1165
1173
|
}
|
|
1166
|
-
const
|
|
1174
|
+
const D = "builder.", ut = "options.", mt = (e) => {
|
|
1167
1175
|
const n = {};
|
|
1168
1176
|
return e.forEach((t, o) => {
|
|
1169
1177
|
n[o] = t;
|
|
1170
1178
|
}), n;
|
|
1171
|
-
},
|
|
1179
|
+
}, pt = (e) => {
|
|
1172
1180
|
if (!e)
|
|
1173
1181
|
return {};
|
|
1174
|
-
const n =
|
|
1182
|
+
const n = se(e), t = {};
|
|
1175
1183
|
return Object.keys(n).forEach((o) => {
|
|
1176
|
-
if (o.startsWith(
|
|
1177
|
-
const
|
|
1178
|
-
t[
|
|
1184
|
+
if (o.startsWith(D)) {
|
|
1185
|
+
const i = o.replace(D, "").replace(ut, "");
|
|
1186
|
+
t[i] = n[o];
|
|
1179
1187
|
}
|
|
1180
1188
|
}), t;
|
|
1181
|
-
},
|
|
1189
|
+
}, ht = () => {
|
|
1182
1190
|
if (!p())
|
|
1183
1191
|
return {};
|
|
1184
1192
|
const e = new URLSearchParams(window.location.search);
|
|
1185
|
-
return
|
|
1186
|
-
},
|
|
1193
|
+
return pt(e);
|
|
1194
|
+
}, se = (e) => e instanceof URLSearchParams ? mt(e) : e, ft = "v3", gt = (e) => {
|
|
1187
1195
|
const {
|
|
1188
1196
|
limit: n = 30,
|
|
1189
1197
|
userAttributes: t,
|
|
1190
1198
|
query: o,
|
|
1191
|
-
noTraverse:
|
|
1192
|
-
model:
|
|
1193
|
-
apiKey:
|
|
1199
|
+
noTraverse: i = !1,
|
|
1200
|
+
model: r,
|
|
1201
|
+
apiKey: s,
|
|
1194
1202
|
includeRefs: c = !0,
|
|
1195
1203
|
locale: a,
|
|
1196
|
-
apiVersion: l =
|
|
1204
|
+
apiVersion: l = ft
|
|
1197
1205
|
} = e;
|
|
1198
|
-
if (!
|
|
1206
|
+
if (!s)
|
|
1199
1207
|
throw new Error("Missing API key");
|
|
1200
1208
|
if (!["v2", "v3"].includes(l))
|
|
1201
1209
|
throw new Error(
|
|
1202
1210
|
`Invalid apiVersion: expected 'v2' or 'v3', received '${l}'`
|
|
1203
1211
|
);
|
|
1204
1212
|
const u = new URL(
|
|
1205
|
-
`https://cdn.builder.io/api/${l}/content/${
|
|
1213
|
+
`https://cdn.builder.io/api/${l}/content/${r}?apiKey=${s}&limit=${n}&noTraverse=${i}&includeRefs=${c}${a ? `&locale=${a}` : ""}`
|
|
1206
1214
|
), g = {
|
|
1207
|
-
...
|
|
1208
|
-
...
|
|
1209
|
-
}, f =
|
|
1215
|
+
...ht(),
|
|
1216
|
+
...se(e.options || {})
|
|
1217
|
+
}, f = W(g);
|
|
1210
1218
|
for (const b in f)
|
|
1211
1219
|
u.searchParams.set(b, String(f[b]));
|
|
1212
1220
|
if (t && u.searchParams.set("userAttributes", JSON.stringify(t)), o) {
|
|
1213
|
-
const b =
|
|
1214
|
-
for (const
|
|
1215
|
-
u.searchParams.set(
|
|
1221
|
+
const b = W({ query: o });
|
|
1222
|
+
for (const C in b)
|
|
1223
|
+
u.searchParams.set(C, JSON.stringify(b[C]));
|
|
1216
1224
|
}
|
|
1217
1225
|
return u;
|
|
1218
1226
|
};
|
|
1219
|
-
async function
|
|
1220
|
-
const n = await
|
|
1221
|
-
return "results" in n && (n == null ? void 0 : n.results[0]) || null;
|
|
1227
|
+
async function ae(e) {
|
|
1228
|
+
const n = await bt({ ...e, limit: 1 });
|
|
1229
|
+
return n && "results" in n && (n == null ? void 0 : n.results[0]) || null;
|
|
1222
1230
|
}
|
|
1223
|
-
async function
|
|
1224
|
-
const n = ht(e), o = await (await ee(n.href)).json();
|
|
1225
|
-
if ("status" in o && !("results" in o))
|
|
1226
|
-
return console.error("[Builder.io]: Error fetching data. ", o, e), o;
|
|
1227
|
-
const s = e.canTrack !== !1;
|
|
1231
|
+
async function bt(e) {
|
|
1228
1232
|
try {
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1233
|
+
const n = gt(e), o = await (await ne(n.href)).json();
|
|
1234
|
+
if ("status" in o && !("results" in o))
|
|
1235
|
+
return S.error("Error fetching data. ", o, e), o;
|
|
1236
|
+
const i = e.canTrack !== !1;
|
|
1237
|
+
try {
|
|
1238
|
+
if (i && Array.isArray(o.results))
|
|
1239
|
+
for (const r of o.results)
|
|
1240
|
+
await dt({ item: r, canTrack: i });
|
|
1241
|
+
} catch (r) {
|
|
1242
|
+
S.error("Could not setup A/B testing. ", r);
|
|
1243
|
+
}
|
|
1244
|
+
return o;
|
|
1245
|
+
} catch (n) {
|
|
1246
|
+
return S.error("Error fetching data. ", n), null;
|
|
1234
1247
|
}
|
|
1235
|
-
return o;
|
|
1236
1248
|
}
|
|
1237
|
-
const
|
|
1249
|
+
const yt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((e) => {
|
|
1238
1250
|
throw console.error(
|
|
1239
1251
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1240
1252
|
e
|
|
1241
1253
|
), e;
|
|
1242
|
-
}),
|
|
1254
|
+
}), vt = {
|
|
1243
1255
|
name: "builder-symbol",
|
|
1244
|
-
components: { RenderContent: x(
|
|
1256
|
+
components: { RenderContent: x(yt) },
|
|
1245
1257
|
props: ["attributes", "symbol", "dynamic"],
|
|
1246
1258
|
data() {
|
|
1247
1259
|
var e, n, t;
|
|
@@ -1256,7 +1268,7 @@ const gt = () => Promise.resolve().then(() => Rn).then((e) => e.default).catch((
|
|
|
1256
1268
|
};
|
|
1257
1269
|
},
|
|
1258
1270
|
inject: {
|
|
1259
|
-
builderContext:
|
|
1271
|
+
builderContext: P.key
|
|
1260
1272
|
},
|
|
1261
1273
|
mounted() {
|
|
1262
1274
|
this.fetchContent();
|
|
@@ -1279,7 +1291,7 @@ const gt = () => Promise.resolve().then(() => Rn).then((e) => e.default).catch((
|
|
|
1279
1291
|
methods: {
|
|
1280
1292
|
fetchContent() {
|
|
1281
1293
|
var e, n;
|
|
1282
|
-
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((n = this.builderContext) == null ? void 0 : n.apiKey) &&
|
|
1294
|
+
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((n = this.builderContext) == null ? void 0 : n.apiKey) && ae({
|
|
1283
1295
|
model: this.symbol.model,
|
|
1284
1296
|
apiKey: this.builderContext.apiKey,
|
|
1285
1297
|
apiVersion: this.builderContext.apiVersion,
|
|
@@ -1289,21 +1301,20 @@ const gt = () => Promise.resolve().then(() => Rn).then((e) => e.default).catch((
|
|
|
1289
1301
|
}).then((t) => {
|
|
1290
1302
|
t && (this.contentToUse = t);
|
|
1291
1303
|
}).catch((t) => {
|
|
1292
|
-
|
|
1293
|
-
"[Builder.io]: Could not fetch symbol content: ",
|
|
1294
|
-
t
|
|
1295
|
-
);
|
|
1304
|
+
S.error("Could not fetch symbol content: ", t);
|
|
1296
1305
|
});
|
|
1297
1306
|
},
|
|
1298
1307
|
filterAttrs: function(n = {}, t) {
|
|
1299
1308
|
const o = "v-on:";
|
|
1300
|
-
return Object.keys(n).filter((
|
|
1301
|
-
|
|
1302
|
-
|
|
1309
|
+
return Object.keys(n).filter((i) => {
|
|
1310
|
+
if (!n[i])
|
|
1311
|
+
return !1;
|
|
1312
|
+
const r = i.startsWith(o);
|
|
1313
|
+
return t ? r : !r;
|
|
1303
1314
|
}).reduce(
|
|
1304
|
-
(
|
|
1305
|
-
...
|
|
1306
|
-
[
|
|
1315
|
+
(i, r) => ({
|
|
1316
|
+
...i,
|
|
1317
|
+
[r.replace(o, "")]: n[r]
|
|
1307
1318
|
}),
|
|
1308
1319
|
{}
|
|
1309
1320
|
);
|
|
@@ -1318,32 +1329,32 @@ const gt = () => Promise.resolve().then(() => Rn).then((e) => e.default).catch((
|
|
|
1318
1329
|
return n;
|
|
1319
1330
|
}
|
|
1320
1331
|
}
|
|
1321
|
-
},
|
|
1322
|
-
function
|
|
1332
|
+
}, xt = ["dataSet"];
|
|
1333
|
+
function kt(e, n, t, o, i, r) {
|
|
1323
1334
|
var c, a, l, u;
|
|
1324
|
-
const
|
|
1325
|
-
return d(), m("div",
|
|
1335
|
+
const s = k("render-content");
|
|
1336
|
+
return d(), m("div", _({
|
|
1326
1337
|
dataSet: {
|
|
1327
|
-
class:
|
|
1328
|
-
},
|
|
1329
|
-
class:
|
|
1330
|
-
},
|
|
1331
|
-
|
|
1332
|
-
apiVersion:
|
|
1333
|
-
apiKey:
|
|
1334
|
-
context:
|
|
1335
|
-
customComponents: Object.values(
|
|
1338
|
+
class: i.className
|
|
1339
|
+
},
|
|
1340
|
+
class: r._classStringToObject(i.className)
|
|
1341
|
+
}, r.filterAttrs(t.attributes, !1), I(r.filterAttrs(t.attributes, !0), !0)), [
|
|
1342
|
+
Z(s, {
|
|
1343
|
+
apiVersion: r.builderContext.apiVersion,
|
|
1344
|
+
apiKey: r.builderContext.apiKey,
|
|
1345
|
+
context: r.builderContext.context,
|
|
1346
|
+
customComponents: Object.values(r.builderContext.registeredComponents),
|
|
1336
1347
|
data: {
|
|
1337
1348
|
...(c = t.symbol) == null ? void 0 : c.data,
|
|
1338
|
-
...
|
|
1339
|
-
...(l = (a =
|
|
1349
|
+
...r.builderContext.state,
|
|
1350
|
+
...(l = (a = i.contentToUse) == null ? void 0 : a.data) == null ? void 0 : l.state
|
|
1340
1351
|
},
|
|
1341
1352
|
model: (u = t.symbol) == null ? void 0 : u.model,
|
|
1342
|
-
content:
|
|
1353
|
+
content: i.contentToUse
|
|
1343
1354
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
1344
|
-
], 16,
|
|
1355
|
+
], 16, xt);
|
|
1345
1356
|
}
|
|
1346
|
-
const
|
|
1357
|
+
const St = /* @__PURE__ */ h(vt, [["render", kt]]), _t = {
|
|
1347
1358
|
name: "Text",
|
|
1348
1359
|
static: !0,
|
|
1349
1360
|
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",
|
|
@@ -1362,20 +1373,20 @@ const xt = /* @__PURE__ */ h(bt, [["render", vt]]), kt = {
|
|
|
1362
1373
|
height: "auto",
|
|
1363
1374
|
textAlign: "center"
|
|
1364
1375
|
}
|
|
1365
|
-
},
|
|
1376
|
+
}, wt = {
|
|
1366
1377
|
name: "builder-text",
|
|
1367
1378
|
props: ["text"]
|
|
1368
|
-
},
|
|
1369
|
-
function
|
|
1379
|
+
}, Ct = ["innerHTML"];
|
|
1380
|
+
function It(e, n, t, o, i, r) {
|
|
1370
1381
|
return d(), m("span", {
|
|
1371
1382
|
class: "builder-text",
|
|
1372
1383
|
innerHTML: t.text,
|
|
1373
1384
|
style: {
|
|
1374
1385
|
outline: "none"
|
|
1375
1386
|
}
|
|
1376
|
-
}, null, 8,
|
|
1387
|
+
}, null, 8, Ct);
|
|
1377
1388
|
}
|
|
1378
|
-
const
|
|
1389
|
+
const Tt = /* @__PURE__ */ h(wt, [["render", It]]), Rt = {
|
|
1379
1390
|
name: "Video",
|
|
1380
1391
|
canHaveChildren: !0,
|
|
1381
1392
|
defaultStyles: {
|
|
@@ -1476,7 +1487,7 @@ const Ct = /* @__PURE__ */ h(St, [["render", wt]]), It = {
|
|
|
1476
1487
|
advanced: !0
|
|
1477
1488
|
}
|
|
1478
1489
|
]
|
|
1479
|
-
},
|
|
1490
|
+
}, Et = {
|
|
1480
1491
|
name: "builder-video",
|
|
1481
1492
|
props: [
|
|
1482
1493
|
"autoPlay",
|
|
@@ -1517,23 +1528,23 @@ const Ct = /* @__PURE__ */ h(St, [["render", wt]]), It = {
|
|
|
1517
1528
|
};
|
|
1518
1529
|
}
|
|
1519
1530
|
}
|
|
1520
|
-
},
|
|
1521
|
-
function
|
|
1522
|
-
var
|
|
1523
|
-
return d(), m("video",
|
|
1531
|
+
}, At = ["src", "poster"];
|
|
1532
|
+
function Vt(e, n, t, o, i, r) {
|
|
1533
|
+
var s;
|
|
1534
|
+
return d(), m("video", _({
|
|
1524
1535
|
style: {
|
|
1525
1536
|
width: "100%",
|
|
1526
1537
|
height: "100%",
|
|
1527
|
-
...(
|
|
1538
|
+
...(s = t.attributes) == null ? void 0 : s.style,
|
|
1528
1539
|
objectFit: t.fit,
|
|
1529
1540
|
objectPosition: t.position,
|
|
1530
1541
|
borderRadius: 1
|
|
1531
1542
|
},
|
|
1532
1543
|
src: t.video || "no-src",
|
|
1533
1544
|
poster: t.posterImage
|
|
1534
|
-
},
|
|
1545
|
+
}, r.spreadProps), null, 16, At);
|
|
1535
1546
|
}
|
|
1536
|
-
const
|
|
1547
|
+
const jt = /* @__PURE__ */ h(Et, [["render", Vt]]), Pt = {
|
|
1537
1548
|
name: "Embed",
|
|
1538
1549
|
static: !0,
|
|
1539
1550
|
inputs: [
|
|
@@ -1543,7 +1554,7 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1543
1554
|
required: !0,
|
|
1544
1555
|
defaultValue: "",
|
|
1545
1556
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1546
|
-
onChange:
|
|
1557
|
+
onChange: B(
|
|
1547
1558
|
(e) => {
|
|
1548
1559
|
const n = e.get("url");
|
|
1549
1560
|
if (n)
|
|
@@ -1572,7 +1583,7 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1572
1583
|
"text/javascript",
|
|
1573
1584
|
"application/javascript",
|
|
1574
1585
|
"application/ecmascript"
|
|
1575
|
-
],
|
|
1586
|
+
], Ft = (e) => Bt.includes(e.type), Ot = {
|
|
1576
1587
|
name: "builder-embed",
|
|
1577
1588
|
props: ["content"],
|
|
1578
1589
|
data() {
|
|
@@ -1605,7 +1616,7 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1605
1616
|
this.scriptsInserted.push(t.src);
|
|
1606
1617
|
const o = document.createElement("script");
|
|
1607
1618
|
o.async = !0, o.src = t.src, document.head.appendChild(o);
|
|
1608
|
-
} else if (
|
|
1619
|
+
} else if (Ft(t) && !this.scriptsRun.includes(t.innerText))
|
|
1609
1620
|
try {
|
|
1610
1621
|
this.scriptsRun.push(t.innerText), new Function(t.innerText)();
|
|
1611
1622
|
} catch (o) {
|
|
@@ -1614,15 +1625,15 @@ const At = /* @__PURE__ */ h(Tt, [["render", Et]]), jt = {
|
|
|
1614
1625
|
}
|
|
1615
1626
|
}
|
|
1616
1627
|
}
|
|
1617
|
-
},
|
|
1618
|
-
function
|
|
1628
|
+
}, Ut = ["innerHTML"];
|
|
1629
|
+
function Wt(e, n, t, o, i, r) {
|
|
1619
1630
|
return d(), m("div", {
|
|
1620
1631
|
class: "builder-embed",
|
|
1621
1632
|
ref: "elem",
|
|
1622
1633
|
innerHTML: t.content
|
|
1623
|
-
}, null, 8,
|
|
1634
|
+
}, null, 8, Ut);
|
|
1624
1635
|
}
|
|
1625
|
-
const
|
|
1636
|
+
const Mt = /* @__PURE__ */ h(Ot, [["render", Wt]]), Lt = {
|
|
1626
1637
|
name: "builder-img-component",
|
|
1627
1638
|
props: [
|
|
1628
1639
|
"backgroundSize",
|
|
@@ -1638,31 +1649,33 @@ const Ut = /* @__PURE__ */ h(Ot, [["render", Ft]]), Wt = {
|
|
|
1638
1649
|
methods: {
|
|
1639
1650
|
filterAttrs: function(n = {}, t) {
|
|
1640
1651
|
const o = "v-on:";
|
|
1641
|
-
return Object.keys(n).filter((
|
|
1642
|
-
|
|
1643
|
-
|
|
1652
|
+
return Object.keys(n).filter((i) => {
|
|
1653
|
+
if (!n[i])
|
|
1654
|
+
return !1;
|
|
1655
|
+
const r = i.startsWith(o);
|
|
1656
|
+
return t ? r : !r;
|
|
1644
1657
|
}).reduce(
|
|
1645
|
-
(
|
|
1646
|
-
...
|
|
1647
|
-
[
|
|
1658
|
+
(i, r) => ({
|
|
1659
|
+
...i,
|
|
1660
|
+
[r.replace(o, "")]: n[r]
|
|
1648
1661
|
}),
|
|
1649
1662
|
{}
|
|
1650
1663
|
);
|
|
1651
1664
|
}
|
|
1652
1665
|
}
|
|
1653
|
-
},
|
|
1654
|
-
function
|
|
1655
|
-
return d(), m("img",
|
|
1666
|
+
}, Nt = ["alt", "src"];
|
|
1667
|
+
function $t(e, n, t, o, i, r) {
|
|
1668
|
+
return d(), m("img", _({
|
|
1656
1669
|
style: {
|
|
1657
1670
|
objectFit: t.backgroundSize || "cover",
|
|
1658
1671
|
objectPosition: t.backgroundPosition || "center"
|
|
1659
1672
|
},
|
|
1660
|
-
key:
|
|
1673
|
+
key: i.isEditing() && t.imgSrc || "default-key",
|
|
1661
1674
|
alt: t.altText,
|
|
1662
1675
|
src: t.imgSrc || t.image
|
|
1663
|
-
},
|
|
1676
|
+
}, r.filterAttrs(t.attributes, !1), I(r.filterAttrs(t.attributes, !0), !0)), null, 16, Nt);
|
|
1664
1677
|
}
|
|
1665
|
-
const
|
|
1678
|
+
const Ht = /* @__PURE__ */ h(Lt, [["render", $t]]), zt = {
|
|
1666
1679
|
name: "Raw:Img",
|
|
1667
1680
|
hideFromInsertMenu: !0,
|
|
1668
1681
|
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",
|
|
@@ -1677,7 +1690,7 @@ const Nt = /* @__PURE__ */ h(Wt, [["render", Lt]]), $t = {
|
|
|
1677
1690
|
],
|
|
1678
1691
|
noWrap: !0,
|
|
1679
1692
|
static: !0
|
|
1680
|
-
},
|
|
1693
|
+
}, Kt = {
|
|
1681
1694
|
name: "builder-custom-code",
|
|
1682
1695
|
props: ["replaceNodes", "code"],
|
|
1683
1696
|
data() {
|
|
@@ -1724,19 +1737,19 @@ const Nt = /* @__PURE__ */ h(Wt, [["render", Lt]]), $t = {
|
|
|
1724
1737
|
return n;
|
|
1725
1738
|
}
|
|
1726
1739
|
}
|
|
1727
|
-
},
|
|
1728
|
-
function
|
|
1740
|
+
}, Dt = ["innerHTML"];
|
|
1741
|
+
function qt(e, n, t, o, i, r) {
|
|
1729
1742
|
return d(), m("div", {
|
|
1730
1743
|
ref: "elem",
|
|
1731
1744
|
class: j(
|
|
1732
|
-
|
|
1745
|
+
r._classStringToObject(
|
|
1733
1746
|
"builder-custom-code" + (t.replaceNodes ? " replace-nodes" : "")
|
|
1734
1747
|
)
|
|
1735
1748
|
),
|
|
1736
1749
|
innerHTML: t.code
|
|
1737
|
-
}, null, 10,
|
|
1750
|
+
}, null, 10, Dt);
|
|
1738
1751
|
}
|
|
1739
|
-
const
|
|
1752
|
+
const Gt = /* @__PURE__ */ h(Kt, [["render", qt]]), Jt = {
|
|
1740
1753
|
name: "Custom Code",
|
|
1741
1754
|
static: !0,
|
|
1742
1755
|
requiredPermissions: ["editCode"],
|
|
@@ -1762,35 +1775,35 @@ const Dt = /* @__PURE__ */ h(Ht, [["render", Kt]]), qt = {
|
|
|
1762
1775
|
advanced: !0
|
|
1763
1776
|
}
|
|
1764
1777
|
]
|
|
1765
|
-
},
|
|
1766
|
-
{ component:
|
|
1767
|
-
{ component:
|
|
1768
|
-
{ component:
|
|
1769
|
-
{ component:
|
|
1770
|
-
{ component:
|
|
1771
|
-
{ component:
|
|
1772
|
-
{ component:
|
|
1773
|
-
{ component:
|
|
1774
|
-
{ component:
|
|
1775
|
-
{ component:
|
|
1776
|
-
{ component:
|
|
1778
|
+
}, Xt = () => [
|
|
1779
|
+
{ component: be, ...He },
|
|
1780
|
+
{ component: we, ...ze },
|
|
1781
|
+
{ component: Gt, ...Jt },
|
|
1782
|
+
{ component: Mt, ...Pt },
|
|
1783
|
+
{ component: Te, ...Ke },
|
|
1784
|
+
{ component: Fe, ...De },
|
|
1785
|
+
{ component: Ht, ...zt },
|
|
1786
|
+
{ component: Xe, ...qe },
|
|
1787
|
+
{ component: St, ...Ye },
|
|
1788
|
+
{ component: Tt, ..._t },
|
|
1789
|
+
{ component: jt, ...Rt }
|
|
1777
1790
|
];
|
|
1778
|
-
function
|
|
1791
|
+
function q({
|
|
1779
1792
|
code: e,
|
|
1780
1793
|
context: n,
|
|
1781
1794
|
state: t,
|
|
1782
1795
|
event: o,
|
|
1783
|
-
isExpression:
|
|
1796
|
+
isExpression: i = !0
|
|
1784
1797
|
}) {
|
|
1785
1798
|
if (e === "") {
|
|
1786
1799
|
console.warn("Skipping evaluation of empty code block.");
|
|
1787
1800
|
return;
|
|
1788
1801
|
}
|
|
1789
|
-
const
|
|
1802
|
+
const r = {
|
|
1790
1803
|
isEditing: v(),
|
|
1791
1804
|
isBrowser: p(),
|
|
1792
1805
|
isServer: !p()
|
|
1793
|
-
}, c =
|
|
1806
|
+
}, c = i && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
1794
1807
|
try {
|
|
1795
1808
|
return new Function(
|
|
1796
1809
|
"builder",
|
|
@@ -1799,7 +1812,7 @@ function K({
|
|
|
1799
1812
|
"context",
|
|
1800
1813
|
"event",
|
|
1801
1814
|
c
|
|
1802
|
-
)(
|
|
1815
|
+
)(r, r, t, n, o);
|
|
1803
1816
|
} catch (a) {
|
|
1804
1817
|
console.warn(
|
|
1805
1818
|
`Builder custom code error:
|
|
@@ -1812,113 +1825,113 @@ function K({
|
|
|
1812
1825
|
);
|
|
1813
1826
|
}
|
|
1814
1827
|
}
|
|
1815
|
-
function
|
|
1828
|
+
function Yt() {
|
|
1816
1829
|
return !p() || v() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1817
1830
|
}
|
|
1818
|
-
const
|
|
1819
|
-
function
|
|
1820
|
-
return
|
|
1831
|
+
const ce = [];
|
|
1832
|
+
function Pn(e, n) {
|
|
1833
|
+
return ce.push({ component: e, ...n }), console.warn(
|
|
1821
1834
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1822
1835
|
), e;
|
|
1823
1836
|
}
|
|
1824
|
-
const
|
|
1837
|
+
const Qt = ({
|
|
1825
1838
|
component: e,
|
|
1826
1839
|
...n
|
|
1827
1840
|
}) => ({
|
|
1828
1841
|
type: "builder.registerComponent",
|
|
1829
|
-
data:
|
|
1830
|
-
}),
|
|
1842
|
+
data: en(n)
|
|
1843
|
+
}), Zt = (e) => typeof e == "function" ? B(e) : L(e), en = ({
|
|
1831
1844
|
inputs: e,
|
|
1832
1845
|
...n
|
|
1833
1846
|
}) => ({
|
|
1834
|
-
...
|
|
1847
|
+
...L(n),
|
|
1835
1848
|
inputs: e == null ? void 0 : e.map(
|
|
1836
1849
|
(t) => Object.entries(t).reduce(
|
|
1837
|
-
(o, [
|
|
1850
|
+
(o, [i, r]) => ({
|
|
1838
1851
|
...o,
|
|
1839
|
-
[
|
|
1852
|
+
[i]: Zt(r)
|
|
1840
1853
|
}),
|
|
1841
1854
|
{}
|
|
1842
1855
|
)
|
|
1843
1856
|
)
|
|
1844
1857
|
});
|
|
1845
|
-
function
|
|
1858
|
+
function tn() {
|
|
1846
1859
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1847
1860
|
const n = Math.random() * 16 | 0;
|
|
1848
1861
|
return (e == "x" ? n : n & 3 | 8).toString(16);
|
|
1849
1862
|
});
|
|
1850
1863
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1864
|
+
function le() {
|
|
1865
|
+
return tn().replace(/-/g, "");
|
|
1853
1866
|
}
|
|
1854
|
-
const
|
|
1867
|
+
const de = "builderSessionId", nn = async ({
|
|
1855
1868
|
canTrack: e
|
|
1856
1869
|
}) => {
|
|
1857
1870
|
if (!e)
|
|
1858
1871
|
return;
|
|
1859
|
-
const n = await
|
|
1860
|
-
name:
|
|
1872
|
+
const n = await oe({
|
|
1873
|
+
name: de,
|
|
1861
1874
|
canTrack: e
|
|
1862
1875
|
});
|
|
1863
|
-
if (
|
|
1876
|
+
if (w(n))
|
|
1864
1877
|
return n;
|
|
1865
1878
|
{
|
|
1866
|
-
const t =
|
|
1867
|
-
return
|
|
1879
|
+
const t = on();
|
|
1880
|
+
return rn({ id: t, canTrack: e }), t;
|
|
1868
1881
|
}
|
|
1869
|
-
},
|
|
1882
|
+
}, on = () => le(), rn = ({
|
|
1870
1883
|
id: e,
|
|
1871
1884
|
canTrack: n
|
|
1872
|
-
}) =>
|
|
1885
|
+
}) => ie({ name: de, value: e, canTrack: n }), ue = () => p() && typeof localStorage < "u" ? localStorage : void 0, sn = ({
|
|
1873
1886
|
key: e,
|
|
1874
1887
|
canTrack: n
|
|
1875
1888
|
}) => {
|
|
1876
1889
|
var t;
|
|
1877
1890
|
try {
|
|
1878
|
-
return n ? (t =
|
|
1891
|
+
return n ? (t = ue()) == null ? void 0 : t.getItem(e) : void 0;
|
|
1879
1892
|
} catch (o) {
|
|
1880
1893
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1881
1894
|
return;
|
|
1882
1895
|
}
|
|
1883
|
-
},
|
|
1896
|
+
}, an = ({
|
|
1884
1897
|
key: e,
|
|
1885
1898
|
canTrack: n,
|
|
1886
1899
|
value: t
|
|
1887
1900
|
}) => {
|
|
1888
1901
|
var o;
|
|
1889
1902
|
try {
|
|
1890
|
-
n && ((o =
|
|
1891
|
-
} catch (
|
|
1892
|
-
console.debug("[LocalStorage] SET error: ",
|
|
1903
|
+
n && ((o = ue()) == null || o.setItem(e, t));
|
|
1904
|
+
} catch (i) {
|
|
1905
|
+
console.debug("[LocalStorage] SET error: ", i);
|
|
1893
1906
|
}
|
|
1894
|
-
},
|
|
1907
|
+
}, me = "builderVisitorId", cn = ({ canTrack: e }) => {
|
|
1895
1908
|
if (!e)
|
|
1896
1909
|
return;
|
|
1897
|
-
const n =
|
|
1898
|
-
key:
|
|
1910
|
+
const n = sn({
|
|
1911
|
+
key: me,
|
|
1899
1912
|
canTrack: e
|
|
1900
1913
|
});
|
|
1901
|
-
if (
|
|
1914
|
+
if (w(n))
|
|
1902
1915
|
return n;
|
|
1903
1916
|
{
|
|
1904
|
-
const t =
|
|
1905
|
-
return
|
|
1917
|
+
const t = ln();
|
|
1918
|
+
return dn({ id: t, canTrack: e }), t;
|
|
1906
1919
|
}
|
|
1907
|
-
},
|
|
1920
|
+
}, ln = () => le(), dn = ({
|
|
1908
1921
|
id: e,
|
|
1909
1922
|
canTrack: n
|
|
1910
|
-
}) =>
|
|
1911
|
-
key:
|
|
1923
|
+
}) => an({
|
|
1924
|
+
key: me,
|
|
1912
1925
|
value: e,
|
|
1913
1926
|
canTrack: n
|
|
1914
|
-
}),
|
|
1927
|
+
}), un = () => {
|
|
1915
1928
|
if (p()) {
|
|
1916
1929
|
const e = new URL(location.href);
|
|
1917
1930
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1918
1931
|
} else
|
|
1919
1932
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1920
|
-
},
|
|
1921
|
-
const e =
|
|
1933
|
+
}, mn = () => typeof navigator == "object" && navigator.userAgent || "", pn = () => {
|
|
1934
|
+
const e = mn(), n = {
|
|
1922
1935
|
Android() {
|
|
1923
1936
|
return e.match(/Android/i);
|
|
1924
1937
|
},
|
|
@@ -1935,55 +1948,55 @@ const ce = "builderSessionId", en = async ({
|
|
|
1935
1948
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
1936
1949
|
},
|
|
1937
1950
|
any() {
|
|
1938
|
-
return n.Android() || n.BlackBerry() || n.iOS() || n.Opera() || n.Windows() ||
|
|
1951
|
+
return n.Android() || n.BlackBerry() || n.iOS() || n.Opera() || n.Windows() || E === "reactNative";
|
|
1939
1952
|
}
|
|
1940
|
-
}, t = e.match(/Tablet|iPad/i), o =
|
|
1953
|
+
}, t = e.match(/Tablet|iPad/i), o = un();
|
|
1941
1954
|
return {
|
|
1942
1955
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1943
1956
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1944
1957
|
device: t ? "tablet" : n.any() ? "mobile" : "desktop"
|
|
1945
1958
|
};
|
|
1946
|
-
},
|
|
1959
|
+
}, hn = async ({
|
|
1947
1960
|
canTrack: e
|
|
1948
1961
|
}) => {
|
|
1949
1962
|
if (!e)
|
|
1950
1963
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1951
|
-
const n = await
|
|
1964
|
+
const n = await nn({ canTrack: e }), t = cn({ canTrack: e });
|
|
1952
1965
|
return {
|
|
1953
1966
|
sessionId: n,
|
|
1954
1967
|
visitorId: t
|
|
1955
1968
|
};
|
|
1956
|
-
},
|
|
1969
|
+
}, fn = async ({
|
|
1957
1970
|
type: e,
|
|
1958
1971
|
canTrack: n,
|
|
1959
1972
|
apiKey: t,
|
|
1960
1973
|
metadata: o,
|
|
1961
|
-
...
|
|
1974
|
+
...i
|
|
1962
1975
|
}) => ({
|
|
1963
1976
|
type: e,
|
|
1964
1977
|
data: {
|
|
1965
|
-
...
|
|
1978
|
+
...i,
|
|
1966
1979
|
metadata: {
|
|
1967
1980
|
url: location.href,
|
|
1968
1981
|
...o
|
|
1969
1982
|
},
|
|
1970
|
-
...await
|
|
1971
|
-
userAttributes:
|
|
1983
|
+
...await hn({ canTrack: n }),
|
|
1984
|
+
userAttributes: pn(),
|
|
1972
1985
|
ownerId: t
|
|
1973
1986
|
}
|
|
1974
1987
|
});
|
|
1975
|
-
async function
|
|
1988
|
+
async function M(e) {
|
|
1976
1989
|
if (!e.apiKey) {
|
|
1977
|
-
|
|
1978
|
-
"
|
|
1990
|
+
S.error(
|
|
1991
|
+
"Missing API key for track call. Please provide your API key."
|
|
1979
1992
|
);
|
|
1980
1993
|
return;
|
|
1981
1994
|
}
|
|
1982
|
-
if (!!e.canTrack && !v() && !!(p() ||
|
|
1995
|
+
if (!!e.canTrack && !v() && !!(p() || E === "reactNative"))
|
|
1983
1996
|
return fetch("https://builder.io/api/v1/track", {
|
|
1984
1997
|
method: "POST",
|
|
1985
1998
|
body: JSON.stringify({
|
|
1986
|
-
events: [await
|
|
1999
|
+
events: [await fn(e)]
|
|
1987
2000
|
}),
|
|
1988
2001
|
headers: {
|
|
1989
2002
|
"content-type": "application/json"
|
|
@@ -1993,10 +2006,10 @@ async function U(e) {
|
|
|
1993
2006
|
console.error("Failed to track: ", n);
|
|
1994
2007
|
});
|
|
1995
2008
|
}
|
|
1996
|
-
const Bn = (e) =>
|
|
1997
|
-
function
|
|
1998
|
-
let t =
|
|
1999
|
-
if (t || (t =
|
|
2009
|
+
const Bn = (e) => M({ ...e, canTrack: !0 }), G = {};
|
|
2010
|
+
function gn(e, n) {
|
|
2011
|
+
let t = G[e];
|
|
2012
|
+
if (t || (t = G[e] = []), t.push(n), p()) {
|
|
2000
2013
|
const o = {
|
|
2001
2014
|
type: "builder.register",
|
|
2002
2015
|
data: {
|
|
@@ -2006,13 +2019,13 @@ function hn(e, n) {
|
|
|
2006
2019
|
};
|
|
2007
2020
|
try {
|
|
2008
2021
|
parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
|
|
2009
|
-
} catch (
|
|
2010
|
-
console.debug("Could not postmessage",
|
|
2022
|
+
} catch (i) {
|
|
2023
|
+
console.debug("Could not postmessage", i);
|
|
2011
2024
|
}
|
|
2012
2025
|
}
|
|
2013
2026
|
}
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2027
|
+
const bn = () => {
|
|
2028
|
+
gn("insertMenu", {
|
|
2016
2029
|
name: "_default",
|
|
2017
2030
|
default: !0,
|
|
2018
2031
|
items: [
|
|
@@ -2027,14 +2040,14 @@ const fn = () => {
|
|
|
2027
2040
|
]
|
|
2028
2041
|
});
|
|
2029
2042
|
};
|
|
2030
|
-
let
|
|
2031
|
-
const
|
|
2043
|
+
let J = !1;
|
|
2044
|
+
const yn = (e = {}) => {
|
|
2032
2045
|
var n, t;
|
|
2033
|
-
|
|
2046
|
+
J || (J = !0, p() && ((n = window.parent) == null || n.postMessage(
|
|
2034
2047
|
{
|
|
2035
2048
|
type: "builder.sdkInfo",
|
|
2036
2049
|
data: {
|
|
2037
|
-
target:
|
|
2050
|
+
target: E,
|
|
2038
2051
|
supportsPatchUpdates: !1,
|
|
2039
2052
|
supportsAddBlockScoping: !0,
|
|
2040
2053
|
supportsCustomBreakpoints: !0
|
|
@@ -2050,18 +2063,18 @@ const gn = (e = {}) => {
|
|
|
2050
2063
|
},
|
|
2051
2064
|
"*"
|
|
2052
2065
|
), window.addEventListener("message", ({ data: o }) => {
|
|
2053
|
-
var
|
|
2066
|
+
var i, r;
|
|
2054
2067
|
if (!!(o != null && o.type))
|
|
2055
2068
|
switch (o.type) {
|
|
2056
2069
|
case "builder.evaluate": {
|
|
2057
|
-
const
|
|
2070
|
+
const s = o.data.text, c = o.data.arguments || [], a = o.data.id, l = new Function(s);
|
|
2058
2071
|
let u, g = null;
|
|
2059
2072
|
try {
|
|
2060
2073
|
u = l.apply(null, c);
|
|
2061
2074
|
} catch (f) {
|
|
2062
2075
|
g = f;
|
|
2063
2076
|
}
|
|
2064
|
-
g ? (
|
|
2077
|
+
g ? (i = window.parent) == null || i.postMessage(
|
|
2065
2078
|
{
|
|
2066
2079
|
type: "builder.evaluateError",
|
|
2067
2080
|
data: { id: a, error: g.message }
|
|
@@ -2076,7 +2089,7 @@ const gn = (e = {}) => {
|
|
|
2076
2089
|
},
|
|
2077
2090
|
"*"
|
|
2078
2091
|
);
|
|
2079
|
-
}).catch(console.error) : (
|
|
2092
|
+
}).catch(console.error) : (r = window.parent) == null || r.postMessage(
|
|
2080
2093
|
{
|
|
2081
2094
|
type: "builder.evaluateResult",
|
|
2082
2095
|
data: { result: u, id: a }
|
|
@@ -2088,10 +2101,10 @@ const gn = (e = {}) => {
|
|
|
2088
2101
|
}
|
|
2089
2102
|
})));
|
|
2090
2103
|
};
|
|
2091
|
-
function
|
|
2104
|
+
function X(e) {
|
|
2092
2105
|
return Math.round(e * 1e3) / 1e3;
|
|
2093
2106
|
}
|
|
2094
|
-
const
|
|
2107
|
+
const vn = (e, n, t = !0) => {
|
|
2095
2108
|
if (!(e instanceof HTMLElement))
|
|
2096
2109
|
return null;
|
|
2097
2110
|
let o = t ? e : e.parentElement;
|
|
@@ -2102,46 +2115,46 @@ const bn = (e, n, t = !0) => {
|
|
|
2102
2115
|
return o;
|
|
2103
2116
|
} while (o = o.parentElement);
|
|
2104
2117
|
return null;
|
|
2105
|
-
},
|
|
2118
|
+
}, xn = (e) => vn(e, (n) => {
|
|
2106
2119
|
const t = n.getAttribute("builder-id") || n.id;
|
|
2107
2120
|
return Boolean((t == null ? void 0 : t.indexOf("builder-")) === 0);
|
|
2108
|
-
}),
|
|
2121
|
+
}), Y = ({
|
|
2109
2122
|
event: e,
|
|
2110
2123
|
target: n
|
|
2111
2124
|
}) => {
|
|
2112
|
-
const t = n.getBoundingClientRect(), o = e.clientX - t.left,
|
|
2125
|
+
const t = n.getBoundingClientRect(), o = e.clientX - t.left, i = e.clientY - t.top, r = X(o / t.width), s = X(i / t.height);
|
|
2113
2126
|
return {
|
|
2114
|
-
x:
|
|
2115
|
-
y:
|
|
2127
|
+
x: r,
|
|
2128
|
+
y: s
|
|
2116
2129
|
};
|
|
2117
|
-
},
|
|
2118
|
-
const n = e.target, t = n &&
|
|
2130
|
+
}, kn = (e) => {
|
|
2131
|
+
const n = e.target, t = n && xn(n), o = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
|
|
2119
2132
|
return {
|
|
2120
2133
|
targetBuilderElement: o || void 0,
|
|
2121
2134
|
metadata: {
|
|
2122
|
-
targetOffset: n ?
|
|
2123
|
-
builderTargetOffset: t ?
|
|
2135
|
+
targetOffset: n ? Y({ event: e, target: n }) : void 0,
|
|
2136
|
+
builderTargetOffset: t ? Y({ event: e, target: t }) : void 0,
|
|
2124
2137
|
builderElementIndex: t && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(t) : void 0
|
|
2125
2138
|
}
|
|
2126
2139
|
};
|
|
2127
|
-
},
|
|
2140
|
+
}, Sn = ({
|
|
2128
2141
|
content: e,
|
|
2129
2142
|
data: n,
|
|
2130
2143
|
locale: t
|
|
2131
2144
|
}) => {
|
|
2132
|
-
var
|
|
2145
|
+
var r, s, c;
|
|
2133
2146
|
const o = {};
|
|
2134
|
-
(
|
|
2147
|
+
(s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.inputs) == null || s.forEach((a) => {
|
|
2135
2148
|
var l;
|
|
2136
2149
|
a.name && a.defaultValue !== void 0 && ((l = e == null ? void 0 : e.data) == null ? void 0 : l.state) && e.data.state[a.name] === void 0 && (o[a.name] = a.defaultValue);
|
|
2137
2150
|
});
|
|
2138
|
-
const
|
|
2151
|
+
const i = {
|
|
2139
2152
|
...(c = e == null ? void 0 : e.data) == null ? void 0 : c.state,
|
|
2140
2153
|
...n,
|
|
2141
2154
|
...t ? { locale: t } : {}
|
|
2142
2155
|
};
|
|
2143
|
-
return { ...o, ...
|
|
2144
|
-
},
|
|
2156
|
+
return { ...o, ...i };
|
|
2157
|
+
}, _n = ({
|
|
2145
2158
|
content: e,
|
|
2146
2159
|
data: n
|
|
2147
2160
|
}) => e ? {
|
|
@@ -2151,21 +2164,21 @@ const bn = (e, n, t = !0) => {
|
|
|
2151
2164
|
...n
|
|
2152
2165
|
},
|
|
2153
2166
|
meta: e == null ? void 0 : e.meta
|
|
2154
|
-
} : void 0,
|
|
2167
|
+
} : void 0, wn = () => Promise.resolve().then(() => te).then((e) => e.default).catch((e) => {
|
|
2155
2168
|
throw console.error(
|
|
2156
2169
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2157
2170
|
e
|
|
2158
2171
|
), e;
|
|
2159
|
-
}),
|
|
2172
|
+
}), Cn = () => import("./render-styles.cf6faa29.js").then((e) => e.default).catch((e) => {
|
|
2160
2173
|
throw console.error(
|
|
2161
2174
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2162
2175
|
e
|
|
2163
2176
|
), e;
|
|
2164
|
-
}),
|
|
2177
|
+
}), In = {
|
|
2165
2178
|
name: "render-content",
|
|
2166
2179
|
components: {
|
|
2167
|
-
RenderContentStyles: x(
|
|
2168
|
-
RenderBlocks: x(
|
|
2180
|
+
RenderContentStyles: x(Cn),
|
|
2181
|
+
RenderBlocks: x(wn)
|
|
2169
2182
|
},
|
|
2170
2183
|
props: [
|
|
2171
2184
|
"content",
|
|
@@ -2183,20 +2196,20 @@ const bn = (e, n, t = !0) => {
|
|
|
2183
2196
|
return {
|
|
2184
2197
|
forceReRenderCount: 0,
|
|
2185
2198
|
overrideContent: null,
|
|
2186
|
-
useContent:
|
|
2199
|
+
useContent: _n({
|
|
2187
2200
|
content: this.content,
|
|
2188
2201
|
data: this.data
|
|
2189
2202
|
}),
|
|
2190
2203
|
update: 0,
|
|
2191
|
-
canTrackToUse:
|
|
2192
|
-
contentState:
|
|
2204
|
+
canTrackToUse: w(this.canTrack) ? this.canTrack : !0,
|
|
2205
|
+
contentState: Sn({
|
|
2193
2206
|
content: this.content,
|
|
2194
2207
|
data: this.data,
|
|
2195
2208
|
locale: this.locale
|
|
2196
2209
|
}),
|
|
2197
2210
|
allRegisteredComponents: [
|
|
2198
|
-
...
|
|
2199
|
-
...
|
|
2211
|
+
...Xt(),
|
|
2212
|
+
...ce,
|
|
2200
2213
|
...this.customComponents || []
|
|
2201
2214
|
].reduce(
|
|
2202
2215
|
(e, n) => ({
|
|
@@ -2207,13 +2220,13 @@ const bn = (e, n, t = !0) => {
|
|
|
2207
2220
|
),
|
|
2208
2221
|
httpReqsData: {},
|
|
2209
2222
|
clicked: !1,
|
|
2210
|
-
TARGET:
|
|
2223
|
+
TARGET: E
|
|
2211
2224
|
};
|
|
2212
2225
|
},
|
|
2213
2226
|
provide() {
|
|
2214
2227
|
const e = this;
|
|
2215
2228
|
return {
|
|
2216
|
-
[
|
|
2229
|
+
[P.key]: {
|
|
2217
2230
|
content: e.useContent,
|
|
2218
2231
|
state: e.contentState,
|
|
2219
2232
|
setState: e.setContextState,
|
|
@@ -2226,10 +2239,10 @@ const bn = (e, n, t = !0) => {
|
|
|
2226
2239
|
},
|
|
2227
2240
|
mounted() {
|
|
2228
2241
|
var e, n;
|
|
2229
|
-
if (this.apiKey ||
|
|
2230
|
-
"
|
|
2242
|
+
if (this.apiKey || S.error(
|
|
2243
|
+
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2231
2244
|
), p()) {
|
|
2232
|
-
if (v() && (this.forceReRenderCount = this.forceReRenderCount + 1,
|
|
2245
|
+
if (v() && (this.forceReRenderCount = this.forceReRenderCount + 1, bn(), yn({
|
|
2233
2246
|
...this.locale ? {
|
|
2234
2247
|
locale: this.locale
|
|
2235
2248
|
} : {},
|
|
@@ -2239,15 +2252,15 @@ const bn = (e, n, t = !0) => {
|
|
|
2239
2252
|
}), Object.values(
|
|
2240
2253
|
this.allRegisteredComponents
|
|
2241
2254
|
).forEach((t) => {
|
|
2242
|
-
var
|
|
2243
|
-
const o =
|
|
2244
|
-
(
|
|
2255
|
+
var i;
|
|
2256
|
+
const o = Qt(t);
|
|
2257
|
+
(i = window.parent) == null || i.postMessage(o, "*");
|
|
2245
2258
|
}), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2246
2259
|
"builder:component:stateChangeListenerActivated",
|
|
2247
2260
|
this.emitStateUpdate
|
|
2248
2261
|
)), this.useContent) {
|
|
2249
2262
|
const t = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (n = this.useContent) == null ? void 0 : n.id;
|
|
2250
|
-
|
|
2263
|
+
M({
|
|
2251
2264
|
type: "impression",
|
|
2252
2265
|
canTrack: this.canTrackToUse,
|
|
2253
2266
|
contentId: o,
|
|
@@ -2255,14 +2268,16 @@ const bn = (e, n, t = !0) => {
|
|
|
2255
2268
|
variationId: t !== o ? t : void 0
|
|
2256
2269
|
});
|
|
2257
2270
|
}
|
|
2258
|
-
if (
|
|
2259
|
-
const t = new URL(location.href).searchParams, o = t.get("builder.preview"),
|
|
2260
|
-
|
|
2271
|
+
if (Yt()) {
|
|
2272
|
+
const t = new URL(location.href).searchParams, o = t.get("builder.preview"), i = t.get(
|
|
2273
|
+
`builder.preview.${o}`
|
|
2274
|
+
), r = t.get("apiKey") || t.get("builder.space");
|
|
2275
|
+
o === this.model && r === this.apiKey && (!this.content || i === this.content.id) && ae({
|
|
2261
2276
|
model: this.model,
|
|
2262
2277
|
apiKey: this.apiKey,
|
|
2263
2278
|
apiVersion: this.apiVersion
|
|
2264
|
-
}).then((
|
|
2265
|
-
|
|
2279
|
+
}).then((s) => {
|
|
2280
|
+
s && this.mergeNewContent(s);
|
|
2266
2281
|
});
|
|
2267
2282
|
}
|
|
2268
2283
|
this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
@@ -2327,7 +2342,7 @@ const bn = (e, n, t = !0) => {
|
|
|
2327
2342
|
},
|
|
2328
2343
|
methods: {
|
|
2329
2344
|
mergeNewContent(e) {
|
|
2330
|
-
var n, t, o,
|
|
2345
|
+
var n, t, o, i, r;
|
|
2331
2346
|
this.useContent = {
|
|
2332
2347
|
...this.useContent,
|
|
2333
2348
|
...e,
|
|
@@ -2338,7 +2353,7 @@ const bn = (e, n, t = !0) => {
|
|
|
2338
2353
|
meta: {
|
|
2339
2354
|
...(t = this.useContent) == null ? void 0 : t.meta,
|
|
2340
2355
|
...e == null ? void 0 : e.meta,
|
|
2341
|
-
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((
|
|
2356
|
+
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((r = (i = this.useContent) == null ? void 0 : i.meta) == null ? void 0 : r.breakpoints)
|
|
2342
2357
|
}
|
|
2343
2358
|
};
|
|
2344
2359
|
},
|
|
@@ -2361,15 +2376,15 @@ const bn = (e, n, t = !0) => {
|
|
|
2361
2376
|
if (n)
|
|
2362
2377
|
switch (n.type) {
|
|
2363
2378
|
case "builder.configureSdk": {
|
|
2364
|
-
const o = n.data, { breakpoints:
|
|
2365
|
-
if (!
|
|
2379
|
+
const o = n.data, { breakpoints: i, contentId: r } = o;
|
|
2380
|
+
if (!r || r !== ((t = this.useContent) == null ? void 0 : t.id))
|
|
2366
2381
|
return;
|
|
2367
|
-
|
|
2382
|
+
i && this.setBreakpoints(i), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
2368
2383
|
break;
|
|
2369
2384
|
}
|
|
2370
2385
|
case "builder.contentUpdate": {
|
|
2371
|
-
const o = n.data,
|
|
2372
|
-
|
|
2386
|
+
const o = n.data, i = o.key || o.alias || o.entry || o.modelName, r = o.data;
|
|
2387
|
+
i === this.model && (this.mergeNewContent(r), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2373
2388
|
break;
|
|
2374
2389
|
}
|
|
2375
2390
|
}
|
|
@@ -2377,7 +2392,7 @@ const bn = (e, n, t = !0) => {
|
|
|
2377
2392
|
evaluateJsCode() {
|
|
2378
2393
|
var n, t;
|
|
2379
2394
|
const e = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.jsCode;
|
|
2380
|
-
e &&
|
|
2395
|
+
e && q({
|
|
2381
2396
|
code: e,
|
|
2382
2397
|
context: this.context || {},
|
|
2383
2398
|
state: this.contentState
|
|
@@ -2386,14 +2401,14 @@ const bn = (e, n, t = !0) => {
|
|
|
2386
2401
|
onClick(e) {
|
|
2387
2402
|
var n, t;
|
|
2388
2403
|
if (this.useContent) {
|
|
2389
|
-
const o = (n = this.useContent) == null ? void 0 : n.testVariationId,
|
|
2390
|
-
|
|
2404
|
+
const o = (n = this.useContent) == null ? void 0 : n.testVariationId, i = (t = this.useContent) == null ? void 0 : t.id;
|
|
2405
|
+
M({
|
|
2391
2406
|
type: "click",
|
|
2392
2407
|
canTrack: this.canTrackToUse,
|
|
2393
|
-
contentId:
|
|
2408
|
+
contentId: i,
|
|
2394
2409
|
apiKey: this.apiKey,
|
|
2395
|
-
variationId: o !==
|
|
2396
|
-
...
|
|
2410
|
+
variationId: o !== i ? o : void 0,
|
|
2411
|
+
...kn(e),
|
|
2397
2412
|
unique: !this.clicked
|
|
2398
2413
|
});
|
|
2399
2414
|
}
|
|
@@ -2402,7 +2417,7 @@ const bn = (e, n, t = !0) => {
|
|
|
2402
2417
|
evalExpression(e) {
|
|
2403
2418
|
return e.replace(
|
|
2404
2419
|
/{{([^}]+)}}/g,
|
|
2405
|
-
(n, t) =>
|
|
2420
|
+
(n, t) => q({
|
|
2406
2421
|
code: t,
|
|
2407
2422
|
context: this.context || {},
|
|
2408
2423
|
state: this.contentState
|
|
@@ -2410,7 +2425,7 @@ const bn = (e, n, t = !0) => {
|
|
|
2410
2425
|
);
|
|
2411
2426
|
},
|
|
2412
2427
|
handleRequest({ url: e, key: n }) {
|
|
2413
|
-
|
|
2428
|
+
ne(e).then((t) => t.json()).then((t) => {
|
|
2414
2429
|
const o = {
|
|
2415
2430
|
...this.contentState,
|
|
2416
2431
|
[n]: t
|
|
@@ -2423,12 +2438,12 @@ const bn = (e, n, t = !0) => {
|
|
|
2423
2438
|
runHttpRequests() {
|
|
2424
2439
|
var n, t, o;
|
|
2425
2440
|
const e = (o = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.httpRequests) != null ? o : {};
|
|
2426
|
-
Object.entries(e).forEach(([
|
|
2427
|
-
if (
|
|
2428
|
-
const
|
|
2441
|
+
Object.entries(e).forEach(([i, r]) => {
|
|
2442
|
+
if (r && (!this.httpReqsData[i] || v())) {
|
|
2443
|
+
const s = this.evalExpression(r);
|
|
2429
2444
|
this.handleRequest({
|
|
2430
|
-
url:
|
|
2431
|
-
key:
|
|
2445
|
+
url: s,
|
|
2446
|
+
key: i
|
|
2432
2447
|
});
|
|
2433
2448
|
}
|
|
2434
2449
|
});
|
|
@@ -2449,74 +2464,74 @@ const bn = (e, n, t = !0) => {
|
|
|
2449
2464
|
);
|
|
2450
2465
|
}
|
|
2451
2466
|
}
|
|
2452
|
-
},
|
|
2453
|
-
function
|
|
2454
|
-
var a, l, u, g, f, b,
|
|
2455
|
-
const
|
|
2456
|
-
return
|
|
2467
|
+
}, Tn = ["builder-content-id", "builder-model"];
|
|
2468
|
+
function Rn(e, n, t, o, i, r) {
|
|
2469
|
+
var a, l, u, g, f, b, C, N;
|
|
2470
|
+
const s = k("render-content-styles"), c = k("render-blocks");
|
|
2471
|
+
return i.useContent ? (d(), m("div", {
|
|
2457
2472
|
key: 0,
|
|
2458
2473
|
ref: "elementRef",
|
|
2459
|
-
onClick: n[0] || (n[0] = (
|
|
2460
|
-
"builder-content-id": (a =
|
|
2474
|
+
onClick: n[0] || (n[0] = (pe) => r.onClick(pe)),
|
|
2475
|
+
"builder-content-id": (a = i.useContent) == null ? void 0 : a.id,
|
|
2461
2476
|
"builder-model": t.model
|
|
2462
2477
|
}, [
|
|
2463
|
-
|
|
2478
|
+
i.TARGET !== "reactNative" ? (d(), R(s, {
|
|
2464
2479
|
key: 0,
|
|
2465
|
-
contentId: (l =
|
|
2466
|
-
cssCode: (g = (u =
|
|
2467
|
-
customFonts: (b = (f =
|
|
2480
|
+
contentId: (l = i.useContent) == null ? void 0 : l.id,
|
|
2481
|
+
cssCode: (g = (u = i.useContent) == null ? void 0 : u.data) == null ? void 0 : g.cssCode,
|
|
2482
|
+
customFonts: (b = (f = i.useContent) == null ? void 0 : f.data) == null ? void 0 : b.customFonts
|
|
2468
2483
|
}, null, 8, ["contentId", "cssCode", "customFonts"])) : y("", !0),
|
|
2469
|
-
(d(),
|
|
2470
|
-
blocks: (
|
|
2471
|
-
key:
|
|
2484
|
+
(d(), R(c, {
|
|
2485
|
+
blocks: (N = (C = i.useContent) == null ? void 0 : C.data) == null ? void 0 : N.blocks,
|
|
2486
|
+
key: i.forceReRenderCount
|
|
2472
2487
|
}, null, 8, ["blocks"]))
|
|
2473
|
-
], 8,
|
|
2488
|
+
], 8, Tn)) : y("", !0);
|
|
2474
2489
|
}
|
|
2475
|
-
const
|
|
2490
|
+
const En = /* @__PURE__ */ h(In, [["render", Rn]]), An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2476
2491
|
__proto__: null,
|
|
2477
|
-
default:
|
|
2478
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2479
|
-
function
|
|
2492
|
+
default: En
|
|
2493
|
+
}, Symbol.toStringTag, { value: "Module" })), Q = {};
|
|
2494
|
+
function Fn(e) {
|
|
2480
2495
|
if (p()) {
|
|
2481
|
-
Object.assign(
|
|
2496
|
+
Object.assign(Q, e);
|
|
2482
2497
|
const n = {
|
|
2483
2498
|
type: "builder.settingsChange",
|
|
2484
|
-
data:
|
|
2499
|
+
data: Q
|
|
2485
2500
|
};
|
|
2486
2501
|
parent.postMessage(n, "*");
|
|
2487
2502
|
}
|
|
2488
2503
|
}
|
|
2489
2504
|
export {
|
|
2490
|
-
B,
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2505
|
+
P as B,
|
|
2506
|
+
we as C,
|
|
2507
|
+
Te as F,
|
|
2508
|
+
Fe as I,
|
|
2509
|
+
Xe as S,
|
|
2510
|
+
E as T,
|
|
2511
|
+
jt as V,
|
|
2497
2512
|
h as _,
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2513
|
+
jn as a,
|
|
2514
|
+
be as b,
|
|
2515
|
+
w as c,
|
|
2516
|
+
En as d,
|
|
2517
|
+
q as e,
|
|
2518
|
+
L as f,
|
|
2519
|
+
ye as g,
|
|
2520
|
+
St as h,
|
|
2521
|
+
Tt as i,
|
|
2507
2522
|
v as j,
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2523
|
+
Yt as k,
|
|
2524
|
+
ce as l,
|
|
2525
|
+
Pn as m,
|
|
2526
|
+
Qt as n,
|
|
2527
|
+
gn as o,
|
|
2528
|
+
ae as p,
|
|
2529
|
+
bt as q,
|
|
2530
|
+
$e as r,
|
|
2531
|
+
Fn as s,
|
|
2517
2532
|
Bn as t,
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2533
|
+
mt as u,
|
|
2534
|
+
pt as v,
|
|
2535
|
+
ht as w,
|
|
2536
|
+
se as x
|
|
2522
2537
|
};
|