@builder.io/sdk-vue 0.1.12 → 0.1.14
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.a33b589b.cjs +1 -0
- package/packages/_vue2/dist/{block-styles.1fddeaa3.js → block-styles.e4fa133a.js} +8 -8
- package/packages/_vue2/dist/css.9a515005.js +58 -0
- package/packages/_vue2/dist/css.a4a781f2.cjs +6 -0
- package/packages/_vue2/dist/{index.02b9d9df.js → index.3826ad2c.js} +373 -402
- package/packages/_vue2/dist/index.9e0fbaa1.cjs +29 -0
- package/packages/_vue2/dist/{render-block.b35b22c6.cjs → render-block.65396344.cjs} +2 -2
- package/packages/_vue2/dist/{render-block.9b751cde.js → render-block.8857ae34.js} +7 -7
- package/packages/_vue2/dist/{render-component.ffb3d2c6.cjs → render-component.b187cca7.cjs} +1 -1
- package/packages/_vue2/dist/{render-component.f245018a.js → render-component.d54274f2.js} +3 -3
- package/packages/_vue2/dist/{render-inlined-styles.25f2e4db.cjs → render-inlined-styles.aaa60ee3.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.7a493822.js → render-inlined-styles.f560a740.js} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.da052a0e.js → render-repeated-block.43d7ad78.js} +2 -2
- package/packages/_vue2/dist/{render-repeated-block.870ca664.cjs → render-repeated-block.a24ffa4d.cjs} +1 -1
- package/packages/_vue2/dist/{render-styles.a04e3469.js → render-styles.06311886.js} +2 -2
- package/packages/_vue2/dist/{render-styles.3f363471.cjs → render-styles.3df98784.cjs} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +9 -9
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +14 -29
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/{block-styles.aabb6710.js → block-styles.6bad6a44.js} +3 -3
- package/packages/_vue3/dist/block-styles.c334abc4.cjs +1 -0
- package/packages/_vue3/dist/css.162effaf.js +58 -0
- package/packages/_vue3/dist/css.9c26446d.cjs +6 -0
- package/packages/_vue3/dist/index.51c251ae.cjs +29 -0
- package/packages/_vue3/dist/{index.10a2a72a.js → index.77da28db.js} +521 -548
- package/packages/_vue3/dist/{render-block.ec594132.js → render-block.55844e87.js} +7 -7
- package/packages/_vue3/dist/{render-block.6fa7a4e6.cjs → render-block.75044288.cjs} +2 -2
- package/packages/_vue3/dist/{render-component.009b30ef.js → render-component.445bfcc5.js} +3 -3
- package/packages/_vue3/dist/{render-component.65256ccd.cjs → render-component.a3596f45.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.b27ba505.js → render-inlined-styles.799a72a2.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.fd94a00d.cjs → render-inlined-styles.a41845aa.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.e6298c37.js → render-repeated-block.3650cb4b.js} +2 -2
- package/packages/_vue3/dist/{render-repeated-block.aeaae10c.cjs → render-repeated-block.9f7871c0.cjs} +1 -1
- package/packages/_vue3/dist/{render-styles.7efeec10.js → render-styles.6ed62c76.js} +2 -2
- package/packages/_vue3/dist/{render-styles.a17481e5.cjs → render-styles.c70124f9.cjs} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +8 -8
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +14 -29
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.d2bf860b.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block.a5da75d9.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block.b381a0f8.js +0 -40
- package/packages/_vue2/dist/index.9cf67370.cjs +0 -30
- package/packages/_vue3/dist/block-styles.031c9667.cjs +0 -1
- package/packages/_vue3/dist/get-processed-block.2a2ed55d.cjs +0 -1
- package/packages/_vue3/dist/get-processed-block.bbef5e53.js +0 -40
- package/packages/_vue3/dist/index.07006be4.cjs +0 -30
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { openBlock as d, createElementBlock as m, mergeProps as
|
|
2
|
-
const
|
|
1
|
+
import { openBlock as d, createElementBlock as m, mergeProps as S, toHandlers as C, toDisplayString as L, defineAsyncComponent as x, resolveComponent as k, normalizeClass as j, normalizeStyle as I, createBlock as T, createCommentVNode as y, Fragment as E, renderList as P, createVNode as X, renderSlot as A, createElementVNode as N } from "vue";
|
|
2
|
+
const me = {
|
|
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
|
-
const
|
|
10
|
-
return t ?
|
|
8
|
+
return Object.keys(n).filter((s) => {
|
|
9
|
+
const i = s.startsWith(o);
|
|
10
|
+
return t ? i : !i;
|
|
11
11
|
}).reduce(
|
|
12
|
-
(
|
|
13
|
-
...
|
|
14
|
-
[
|
|
12
|
+
(s, i) => ({
|
|
13
|
+
...s,
|
|
14
|
+
[i.replace(o, "")]: n[i]
|
|
15
15
|
}),
|
|
16
16
|
{}
|
|
17
17
|
);
|
|
@@ -20,22 +20,22 @@ const pe = {
|
|
|
20
20
|
};
|
|
21
21
|
const h = (e, n) => {
|
|
22
22
|
const t = e.__vccOpts || e;
|
|
23
|
-
for (const [o,
|
|
24
|
-
t[o] =
|
|
23
|
+
for (const [o, s] of n)
|
|
24
|
+
t[o] = s;
|
|
25
25
|
return t;
|
|
26
|
-
},
|
|
27
|
-
function
|
|
28
|
-
return t.link ? (d(), m("a",
|
|
26
|
+
}, pe = ["href", "target"];
|
|
27
|
+
function he(e, n, t, o, s, i) {
|
|
28
|
+
return t.link ? (d(), m("a", S({
|
|
29
29
|
key: 0,
|
|
30
30
|
role: "button",
|
|
31
31
|
href: t.link,
|
|
32
32
|
target: t.openLinkInNewTab ? "_blank" : void 0
|
|
33
|
-
},
|
|
33
|
+
}, i.filterAttrs(t.attributes, !1), C(i.filterAttrs(t.attributes, !0), !0)), L(t.text), 17, pe)) : (d(), m("button", S({
|
|
34
34
|
key: 1,
|
|
35
35
|
class: "button-1yj9n7yt24z"
|
|
36
|
-
},
|
|
36
|
+
}, i.filterAttrs(t.attributes, !1), C(i.filterAttrs(t.attributes, !0), !0)), L(t.text), 17));
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const fe = /* @__PURE__ */ h(me, [["render", he], ["__scopeId", "data-v-28c9cee7"]]), W = (e) => JSON.parse(JSON.stringify(e)), Q = {
|
|
39
39
|
small: {
|
|
40
40
|
min: 320,
|
|
41
41
|
default: 321,
|
|
@@ -51,8 +51,8 @@ const ge = /* @__PURE__ */ h(pe, [["render", fe], ["__scopeId", "data-v-28c9cee7
|
|
|
51
51
|
default: 991,
|
|
52
52
|
max: 1200
|
|
53
53
|
}
|
|
54
|
-
},
|
|
55
|
-
const t = W(
|
|
54
|
+
}, En = (e, n = Q) => `@media (max-width: ${n[e].max}px)`, ge = ({ small: e, medium: n }) => {
|
|
55
|
+
const t = W(Q);
|
|
56
56
|
if (!e || !n)
|
|
57
57
|
return t;
|
|
58
58
|
const o = Math.floor(e / 2);
|
|
@@ -61,34 +61,19 @@ const ge = /* @__PURE__ */ h(pe, [["render", fe], ["__scopeId", "data-v-28c9cee7
|
|
|
61
61
|
min: o,
|
|
62
62
|
default: o + 1
|
|
63
63
|
};
|
|
64
|
-
const
|
|
64
|
+
const s = t.small.max + 1;
|
|
65
65
|
t.medium = {
|
|
66
66
|
max: n,
|
|
67
|
-
min:
|
|
68
|
-
default:
|
|
67
|
+
min: s,
|
|
68
|
+
default: s + 1
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const i = t.medium.max + 1;
|
|
71
71
|
return t.large = {
|
|
72
72
|
max: 2e3,
|
|
73
|
-
min:
|
|
74
|
-
default:
|
|
73
|
+
min: i,
|
|
74
|
+
default: i + 1
|
|
75
75
|
}, t;
|
|
76
|
-
},
|
|
77
|
-
if (typeof o == "string")
|
|
78
|
-
return `${ye(t)}: ${o};`;
|
|
79
|
-
}).filter(S), w = (e) => ve(e).join(`
|
|
80
|
-
`), Vn = ({
|
|
81
|
-
mediaQuery: e,
|
|
82
|
-
className: n,
|
|
83
|
-
styles: t
|
|
84
|
-
}) => {
|
|
85
|
-
const o = `.${n} {
|
|
86
|
-
${w(t)}
|
|
87
|
-
}`;
|
|
88
|
-
return e ? `${e} {
|
|
89
|
-
${o}
|
|
90
|
-
}` : o;
|
|
91
|
-
}, xe = Symbol(), V = {
|
|
76
|
+
}, R = "vue3", be = Symbol(), V = {
|
|
92
77
|
Builder: {
|
|
93
78
|
content: null,
|
|
94
79
|
context: {},
|
|
@@ -100,22 +85,22 @@ const ge = /* @__PURE__ */ h(pe, [["render", fe], ["__scopeId", "data-v-28c9cee7
|
|
|
100
85
|
registeredComponents: {},
|
|
101
86
|
inheritedStyles: {}
|
|
102
87
|
},
|
|
103
|
-
key:
|
|
104
|
-
},
|
|
88
|
+
key: be
|
|
89
|
+
}, ye = () => Promise.resolve().then(() => Z).then((e) => e.default).catch((e) => {
|
|
105
90
|
throw console.error(
|
|
106
91
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
107
92
|
e
|
|
108
93
|
), e;
|
|
109
|
-
}),
|
|
94
|
+
}), ve = () => import("./render-inlined-styles.799a72a2.js").then((e) => e.default).catch((e) => {
|
|
110
95
|
throw console.error(
|
|
111
96
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
112
97
|
e
|
|
113
98
|
), e;
|
|
114
|
-
}),
|
|
99
|
+
}), xe = {
|
|
115
100
|
name: "builder-columns",
|
|
116
101
|
components: {
|
|
117
|
-
RenderInlinedStyles: x(
|
|
118
|
-
RenderBlocks: x(
|
|
102
|
+
RenderInlinedStyles: x(ve),
|
|
103
|
+
RenderBlocks: x(ye)
|
|
119
104
|
},
|
|
120
105
|
props: [
|
|
121
106
|
"space",
|
|
@@ -125,104 +110,96 @@ const ge = /* @__PURE__ */ h(pe, [["render", fe], ["__scopeId", "data-v-28c9cee7
|
|
|
125
110
|
"builderBlock"
|
|
126
111
|
],
|
|
127
112
|
data() {
|
|
128
|
-
return {
|
|
113
|
+
return {
|
|
114
|
+
gutterSize: typeof this.space == "number" ? this.space || 0 : 20,
|
|
115
|
+
cols: this.columns || [],
|
|
116
|
+
stackAt: this.stackColumnsAt || "tablet",
|
|
117
|
+
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
118
|
+
TARGET: R
|
|
119
|
+
};
|
|
129
120
|
},
|
|
130
121
|
inject: {
|
|
131
122
|
builderContext: V.key
|
|
132
123
|
},
|
|
133
124
|
computed: {
|
|
134
125
|
columnsCssVars() {
|
|
135
|
-
const e = this.stackColumnsAt === "never" ? "inherit" : this.reverseColumnsWhenStacked ? "column-reverse" : "column";
|
|
136
|
-
return {
|
|
137
|
-
"--flex-dir": e,
|
|
138
|
-
"--flex-dir-tablet": this.maybeApplyForTablet(e)
|
|
139
|
-
};
|
|
140
|
-
},
|
|
141
|
-
columnCssVars() {
|
|
142
|
-
const e = "100%", n = "0";
|
|
143
|
-
return {
|
|
144
|
-
"--column-width": e,
|
|
145
|
-
"--column-margin-left": n,
|
|
146
|
-
"--column-width-tablet": this.maybeApplyForTablet(e),
|
|
147
|
-
"--column-margin-left-tablet": this.maybeApplyForTablet(n)
|
|
148
|
-
};
|
|
149
|
-
},
|
|
150
|
-
columnStyleObjects() {
|
|
151
126
|
return {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
medium: {
|
|
158
|
-
flexDirection: "var(--flex-dir-tablet)",
|
|
159
|
-
alignItems: "stretch"
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
column: {
|
|
163
|
-
small: {
|
|
164
|
-
width: "var(--column-width) !important",
|
|
165
|
-
marginLeft: "var(--column-margin-left) !important"
|
|
166
|
-
},
|
|
167
|
-
medium: {
|
|
168
|
-
width: "var(--column-width-tablet) !important",
|
|
169
|
-
marginLeft: "var(--column-margin-left-tablet) !important"
|
|
170
|
-
}
|
|
171
|
-
}
|
|
127
|
+
"--flex-dir": this.flexDir,
|
|
128
|
+
"--flex-dir-tablet": this.getTabletStyle({
|
|
129
|
+
stackedStyle: this.flexDir,
|
|
130
|
+
desktopStyle: "row"
|
|
131
|
+
})
|
|
172
132
|
};
|
|
173
133
|
},
|
|
174
134
|
columnsStyles() {
|
|
175
135
|
return `
|
|
176
136
|
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
177
137
|
.${this.builderBlock.id}-breakpoints {
|
|
178
|
-
|
|
138
|
+
flex-direction: var(--flex-dir-tablet);
|
|
139
|
+
align-items: stretch;
|
|
179
140
|
}
|
|
180
141
|
|
|
181
142
|
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
182
|
-
|
|
143
|
+
width: var(--column-width-tablet) !important;
|
|
144
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
183
145
|
}
|
|
184
146
|
}
|
|
185
147
|
|
|
186
148
|
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
187
149
|
.${this.builderBlock.id}-breakpoints {
|
|
188
|
-
|
|
150
|
+
flex-direction: var(--flex-dir);
|
|
151
|
+
align-items: stretch;
|
|
189
152
|
}
|
|
190
153
|
|
|
191
154
|
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
192
|
-
|
|
155
|
+
width: var(--column-width-mobile) !important;
|
|
156
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
193
157
|
}
|
|
194
158
|
},
|
|
195
159
|
`;
|
|
196
|
-
},
|
|
197
|
-
reactNativeColumnsStyles() {
|
|
198
|
-
return this.columnStyleObjects.columns.small;
|
|
199
|
-
},
|
|
200
|
-
reactNativeColumnStyles() {
|
|
201
|
-
return this.columnStyleObjects.column.small;
|
|
202
160
|
}
|
|
203
161
|
},
|
|
204
162
|
methods: {
|
|
205
|
-
getGutterSize() {
|
|
206
|
-
return typeof this.space == "number" ? this.space || 0 : 20;
|
|
207
|
-
},
|
|
208
|
-
getColumns() {
|
|
209
|
-
return this.columns || [];
|
|
210
|
-
},
|
|
211
163
|
getWidth(e) {
|
|
212
|
-
var
|
|
213
|
-
|
|
214
|
-
return ((t = n[e]) == null ? void 0 : t.width) || 100 / n.length;
|
|
164
|
+
var n;
|
|
165
|
+
return ((n = this.cols[e]) == null ? void 0 : n.width) || 100 / this.cols.length;
|
|
215
166
|
},
|
|
216
167
|
getColumnCssWidth(e) {
|
|
217
|
-
const n = this.
|
|
218
|
-
return `calc(${this.getWidth(e)}% - ${
|
|
168
|
+
const n = this.gutterSize * (this.cols.length - 1) / this.cols.length;
|
|
169
|
+
return `calc(${this.getWidth(e)}% - ${n}px)`;
|
|
170
|
+
},
|
|
171
|
+
getTabletStyle({ stackedStyle: e, desktopStyle: n }) {
|
|
172
|
+
return this.stackAt === "tablet" ? e : n;
|
|
219
173
|
},
|
|
220
|
-
|
|
221
|
-
return
|
|
174
|
+
getMobileStyle({ stackedStyle: e, desktopStyle: n }) {
|
|
175
|
+
return this.stackAt === "never" ? n : e;
|
|
176
|
+
},
|
|
177
|
+
columnCssVars(e) {
|
|
178
|
+
const n = this.getColumnCssWidth(e), t = `${e === 0 ? 0 : this.gutterSize}px`, o = "100%", s = 0;
|
|
179
|
+
return {
|
|
180
|
+
width: n,
|
|
181
|
+
"margin-left": t,
|
|
182
|
+
"--column-width-mobile": this.getMobileStyle({
|
|
183
|
+
stackedStyle: o,
|
|
184
|
+
desktopStyle: n
|
|
185
|
+
}),
|
|
186
|
+
"--column-margin-left-mobile": this.getMobileStyle({
|
|
187
|
+
stackedStyle: s,
|
|
188
|
+
desktopStyle: t
|
|
189
|
+
}),
|
|
190
|
+
"--column-width-tablet": this.getTabletStyle({
|
|
191
|
+
stackedStyle: o,
|
|
192
|
+
desktopStyle: n
|
|
193
|
+
}),
|
|
194
|
+
"--column-margin-left-tablet": this.getTabletStyle({
|
|
195
|
+
stackedStyle: s,
|
|
196
|
+
desktopStyle: t
|
|
197
|
+
})
|
|
198
|
+
};
|
|
222
199
|
},
|
|
223
200
|
getWidthForBreakpointSize(e) {
|
|
224
201
|
var t, o;
|
|
225
|
-
return
|
|
202
|
+
return ge(
|
|
226
203
|
((o = (t = this.builderContext.content) == null ? void 0 : t.meta) == null ? void 0 : o.breakpoints) || {}
|
|
227
204
|
)[e].max;
|
|
228
205
|
},
|
|
@@ -237,34 +214,32 @@ const ge = /* @__PURE__ */ h(pe, [["render", fe], ["__scopeId", "data-v-28c9cee7
|
|
|
237
214
|
}
|
|
238
215
|
}
|
|
239
216
|
};
|
|
240
|
-
function
|
|
241
|
-
const
|
|
217
|
+
function ke(e, n, t, o, s, i) {
|
|
218
|
+
const r = k("render-inlined-styles"), c = k("render-blocks");
|
|
242
219
|
return d(), m("div", {
|
|
243
|
-
class:
|
|
244
|
-
|
|
220
|
+
class: j(
|
|
221
|
+
i._classStringToObject(
|
|
245
222
|
`builder-columns ${t.builderBlock.id}-breakpoints div-361b1o6wv2k`
|
|
246
223
|
)
|
|
247
224
|
),
|
|
248
|
-
style:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
225
|
+
style: I(i.columnsCssVars),
|
|
226
|
+
dataSet: {
|
|
227
|
+
"builder-block-name": "builder-columns"
|
|
228
|
+
}
|
|
252
229
|
}, [
|
|
253
|
-
|
|
230
|
+
s.TARGET !== "reactNative" ? (d(), T(r, {
|
|
254
231
|
key: 0,
|
|
255
|
-
styles:
|
|
232
|
+
styles: i.columnsStyles
|
|
256
233
|
}, null, 8, ["styles"])) : y("", !0),
|
|
257
|
-
(d(!0), m(
|
|
234
|
+
(d(!0), m(E, null, P(t.columns, (a, l) => (d(), m("div", {
|
|
258
235
|
key: l,
|
|
259
236
|
class: "builder-column div-361b1o6wv2k-2",
|
|
260
|
-
style:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
...s.columnCssVars
|
|
265
|
-
})
|
|
237
|
+
style: I(i.columnCssVars(l)),
|
|
238
|
+
dataSet: {
|
|
239
|
+
"builder-block-name": "builder-column"
|
|
240
|
+
}
|
|
266
241
|
}, [
|
|
267
|
-
|
|
242
|
+
X(c, {
|
|
268
243
|
blocks: a.blocks,
|
|
269
244
|
path: `component.options.columns.${l}.blocks`,
|
|
270
245
|
parent: t.builderBlock.id,
|
|
@@ -275,49 +250,49 @@ function Ce(e, n, t, o, r, s) {
|
|
|
275
250
|
], 4))), 128))
|
|
276
251
|
], 6);
|
|
277
252
|
}
|
|
278
|
-
const
|
|
253
|
+
const Se = /* @__PURE__ */ h(xe, [["render", ke], ["__scopeId", "data-v-ea0f5889"]]), _e = {
|
|
279
254
|
name: "builder-fragment-component",
|
|
280
255
|
props: []
|
|
281
256
|
};
|
|
282
|
-
function
|
|
257
|
+
function we(e, n, t, o, s, i) {
|
|
283
258
|
return d(), m("span", null, [
|
|
284
|
-
|
|
259
|
+
A(e.$slots, "default")
|
|
285
260
|
]);
|
|
286
261
|
}
|
|
287
|
-
const
|
|
288
|
-
function
|
|
262
|
+
const Ce = /* @__PURE__ */ h(_e, [["render", we]]);
|
|
263
|
+
function $(e) {
|
|
289
264
|
return e.replace(/http(s)?:/, "");
|
|
290
265
|
}
|
|
291
|
-
function
|
|
292
|
-
const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"),
|
|
293
|
-
return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e +
|
|
266
|
+
function Ie(e = "", n, t) {
|
|
267
|
+
const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
268
|
+
return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e + s + n + "=" + encodeURIComponent(t);
|
|
294
269
|
}
|
|
295
|
-
function
|
|
270
|
+
function Te(e, n) {
|
|
296
271
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !n)
|
|
297
272
|
return e;
|
|
298
273
|
if (n === "master")
|
|
299
|
-
return
|
|
274
|
+
return $(e);
|
|
300
275
|
const t = e.match(
|
|
301
276
|
/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
|
|
302
277
|
);
|
|
303
278
|
if (t) {
|
|
304
|
-
const o = e.split(t[0]),
|
|
305
|
-
return
|
|
279
|
+
const o = e.split(t[0]), s = t[3], i = n.match("x") ? n : `${n}x`;
|
|
280
|
+
return $(`${o[0]}_${i}${s}`);
|
|
306
281
|
}
|
|
307
282
|
return null;
|
|
308
283
|
}
|
|
309
|
-
function
|
|
284
|
+
function F(e) {
|
|
310
285
|
if (!e)
|
|
311
286
|
return e;
|
|
312
287
|
const n = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
313
288
|
if (e.match(/builder\.io/)) {
|
|
314
289
|
let t = e;
|
|
315
290
|
const o = Number(e.split("?width=")[1]);
|
|
316
|
-
return isNaN(o) || (t = `${t} ${o}w`), n.filter((
|
|
291
|
+
return isNaN(o) || (t = `${t} ${o}w`), n.filter((s) => s !== o).map((s) => `${Ie(e, "width", s)} ${s}w`).concat([t]).join(", ");
|
|
317
292
|
}
|
|
318
|
-
return e.match(/cdn\.shopify\.com/) ? n.map((t) => [
|
|
293
|
+
return e.match(/cdn\.shopify\.com/) ? n.map((t) => [Te(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, o]) => `${t} ${o}w`).concat([e]).join(", ") : e;
|
|
319
294
|
}
|
|
320
|
-
const
|
|
295
|
+
const Re = {
|
|
321
296
|
name: "builder-image",
|
|
322
297
|
props: [
|
|
323
298
|
"image",
|
|
@@ -341,10 +316,10 @@ const je = {
|
|
|
341
316
|
return this.srcset;
|
|
342
317
|
if (this.srcset && ((t = this.image) == null ? void 0 : t.includes("builder.io/api/v1/image"))) {
|
|
343
318
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
344
|
-
return console.debug("Removed given srcset"),
|
|
319
|
+
return console.debug("Removed given srcset"), F(n);
|
|
345
320
|
} else if (this.image && !this.srcset)
|
|
346
|
-
return
|
|
347
|
-
return
|
|
321
|
+
return F(n);
|
|
322
|
+
return F(n);
|
|
348
323
|
},
|
|
349
324
|
webpSrcSet() {
|
|
350
325
|
var e;
|
|
@@ -373,76 +348,76 @@ const je = {
|
|
|
373
348
|
}
|
|
374
349
|
}
|
|
375
350
|
};
|
|
376
|
-
const
|
|
351
|
+
const Ee = ["srcset"], Ae = ["alt", "role", "src", "srcset", "sizes"], je = {
|
|
377
352
|
key: 2,
|
|
378
353
|
class: "div-7jvpanrlkn-2"
|
|
379
354
|
};
|
|
380
|
-
function
|
|
381
|
-
var
|
|
382
|
-
return d(), m(
|
|
383
|
-
|
|
384
|
-
|
|
355
|
+
function Ve(e, n, t, o, s, i) {
|
|
356
|
+
var r, c, a, l;
|
|
357
|
+
return d(), m(E, null, [
|
|
358
|
+
N("picture", null, [
|
|
359
|
+
i.webpSrcSet ? (d(), m("source", {
|
|
385
360
|
key: 0,
|
|
386
361
|
type: "image/webp",
|
|
387
|
-
srcset:
|
|
388
|
-
}, null, 8,
|
|
389
|
-
|
|
362
|
+
srcset: i.webpSrcSet
|
|
363
|
+
}, null, 8, Ee)) : y("", !0),
|
|
364
|
+
N("img", {
|
|
390
365
|
loading: "lazy",
|
|
391
366
|
alt: t.altText,
|
|
392
367
|
role: t.altText ? "presentation" : void 0,
|
|
393
|
-
style:
|
|
368
|
+
style: I({
|
|
394
369
|
objectPosition: t.backgroundPosition || "center",
|
|
395
370
|
objectFit: t.backgroundSize || "cover",
|
|
396
|
-
...
|
|
371
|
+
...i.aspectRatioCss
|
|
397
372
|
}),
|
|
398
|
-
class:
|
|
399
|
-
|
|
373
|
+
class: j(
|
|
374
|
+
i._classStringToObject(
|
|
400
375
|
"builder-image" + (t.className ? " " + t.className : "") + " img-7jvpanrlkn"
|
|
401
376
|
)
|
|
402
377
|
),
|
|
403
378
|
src: t.image,
|
|
404
|
-
srcset:
|
|
379
|
+
srcset: i.srcSetToUse,
|
|
405
380
|
sizes: t.sizes
|
|
406
|
-
}, null, 14,
|
|
381
|
+
}, null, 14, Ae)
|
|
407
382
|
]),
|
|
408
|
-
t.aspectRatio && !(((c = (
|
|
383
|
+
t.aspectRatio && !(((c = (r = t.builderBlock) == null ? void 0 : r.children) == null ? void 0 : c.length) && t.fitContent) ? (d(), m("div", {
|
|
409
384
|
key: 0,
|
|
410
385
|
class: "builder-image-sizer div-7jvpanrlkn",
|
|
411
|
-
style:
|
|
386
|
+
style: I({
|
|
412
387
|
paddingTop: t.aspectRatio * 100 + "%"
|
|
413
388
|
})
|
|
414
389
|
}, null, 4)) : y("", !0),
|
|
415
|
-
((l = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : l.length) && t.fitContent ?
|
|
416
|
-
!t.fitContent && e.children ? (d(), m("div",
|
|
417
|
-
|
|
390
|
+
((l = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : l.length) && t.fitContent ? A(e.$slots, "default", { key: 1 }, void 0, !0) : y("", !0),
|
|
391
|
+
!t.fitContent && e.children ? (d(), m("div", je, [
|
|
392
|
+
A(e.$slots, "default", {}, void 0, !0)
|
|
418
393
|
])) : y("", !0)
|
|
419
394
|
], 64);
|
|
420
395
|
}
|
|
421
|
-
const
|
|
396
|
+
const Be = /* @__PURE__ */ h(Re, [["render", Ve], ["__scopeId", "data-v-22833d9f"]]);
|
|
422
397
|
function p() {
|
|
423
398
|
return typeof window < "u" && typeof document < "u";
|
|
424
399
|
}
|
|
425
|
-
function
|
|
400
|
+
function Fe() {
|
|
426
401
|
return p() && window.self !== window.top;
|
|
427
402
|
}
|
|
428
403
|
function v() {
|
|
429
|
-
return
|
|
404
|
+
return Fe() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
430
405
|
}
|
|
431
|
-
const
|
|
406
|
+
const Pe = () => import("./block-styles.6bad6a44.js").then((e) => e.default).catch((e) => {
|
|
432
407
|
throw console.error(
|
|
433
408
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
434
409
|
e
|
|
435
410
|
), e;
|
|
436
|
-
}),
|
|
411
|
+
}), Oe = () => import("./render-block.55844e87.js").then((e) => e.default).catch((e) => {
|
|
437
412
|
throw console.error(
|
|
438
413
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
439
414
|
e
|
|
440
415
|
), e;
|
|
441
|
-
}),
|
|
416
|
+
}), Ue = {
|
|
442
417
|
name: "render-blocks",
|
|
443
418
|
components: {
|
|
444
|
-
RenderBlock: x(
|
|
445
|
-
BlockStyles: x(
|
|
419
|
+
RenderBlock: x(Oe),
|
|
420
|
+
BlockStyles: x(Pe)
|
|
446
421
|
},
|
|
447
422
|
props: ["blocks", "parent", "path", "styleProp"],
|
|
448
423
|
inject: {
|
|
@@ -492,36 +467,36 @@ const Le = () => import("./block-styles.aabb6710.js").then((e) => e.default).cat
|
|
|
492
467
|
}
|
|
493
468
|
}
|
|
494
469
|
};
|
|
495
|
-
const
|
|
496
|
-
function
|
|
497
|
-
const
|
|
470
|
+
const We = ["builder-path", "builder-parent-id", "dataSet"];
|
|
471
|
+
function Me(e, n, t, o, s, i) {
|
|
472
|
+
const r = k("render-block"), c = k("block-styles");
|
|
498
473
|
return d(), m("div", {
|
|
499
|
-
class:
|
|
474
|
+
class: j(i._classStringToObject(i.className + " div-7fq9d0i380")),
|
|
500
475
|
"builder-path": t.path,
|
|
501
476
|
"builder-parent-id": t.parent,
|
|
502
477
|
dataSet: {
|
|
503
|
-
class:
|
|
478
|
+
class: i.className
|
|
504
479
|
},
|
|
505
|
-
style:
|
|
506
|
-
onClick: n[0] || (n[0] = (a) =>
|
|
507
|
-
onMouseenter: n[1] || (n[1] = (a) =>
|
|
480
|
+
style: I(t.styleProp),
|
|
481
|
+
onClick: n[0] || (n[0] = (a) => i.onClick()),
|
|
482
|
+
onMouseenter: n[1] || (n[1] = (a) => i.onMouseEnter())
|
|
508
483
|
}, [
|
|
509
|
-
t.blocks ? (d(!0), m(
|
|
484
|
+
t.blocks ? (d(!0), m(E, { key: 0 }, P(t.blocks, (a, l) => (d(), T(r, {
|
|
510
485
|
key: "render-block-" + a.id,
|
|
511
486
|
block: a,
|
|
512
|
-
context:
|
|
487
|
+
context: i.builderContext
|
|
513
488
|
}, null, 8, ["block", "context"]))), 128)) : y("", !0),
|
|
514
|
-
t.blocks ? (d(!0), m(
|
|
489
|
+
t.blocks ? (d(!0), m(E, { key: 1 }, P(t.blocks, (a, l) => (d(), T(c, {
|
|
515
490
|
key: "block-style-" + a.id,
|
|
516
491
|
block: a,
|
|
517
|
-
context:
|
|
492
|
+
context: i.builderContext
|
|
518
493
|
}, null, 8, ["block", "context"]))), 128)) : y("", !0)
|
|
519
|
-
], 46,
|
|
494
|
+
], 46, We);
|
|
520
495
|
}
|
|
521
|
-
const
|
|
496
|
+
const Le = /* @__PURE__ */ h(Ue, [["render", Me], ["__scopeId", "data-v-1112d180"]]), Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
522
497
|
__proto__: null,
|
|
523
|
-
default:
|
|
524
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
498
|
+
default: Le
|
|
499
|
+
}, Symbol.toStringTag, { value: "Module" })), Ne = {
|
|
525
500
|
name: "Core:Button",
|
|
526
501
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
527
502
|
defaultStyles: {
|
|
@@ -557,10 +532,10 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
557
532
|
],
|
|
558
533
|
static: !0,
|
|
559
534
|
noWrap: !0
|
|
560
|
-
},
|
|
535
|
+
}, B = (e) => {
|
|
561
536
|
const n = e.toString().trim();
|
|
562
537
|
return `return (${!n.startsWith("function") && !n.startsWith("(") ? "function " : ""}${n}).apply(this, arguments)`;
|
|
563
|
-
},
|
|
538
|
+
}, $e = {
|
|
564
539
|
name: "Columns",
|
|
565
540
|
inputs: [
|
|
566
541
|
{
|
|
@@ -747,7 +722,7 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
747
722
|
]
|
|
748
723
|
}
|
|
749
724
|
],
|
|
750
|
-
onChange:
|
|
725
|
+
onChange: B((e) => {
|
|
751
726
|
function n() {
|
|
752
727
|
t.forEach((o) => {
|
|
753
728
|
o.delete("width");
|
|
@@ -755,9 +730,9 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
755
730
|
}
|
|
756
731
|
const t = e.get("columns");
|
|
757
732
|
Array.isArray(t) && !!t.find(
|
|
758
|
-
(
|
|
733
|
+
(s) => s.get("width")
|
|
759
734
|
) && (!!t.find(
|
|
760
|
-
(
|
|
735
|
+
(i) => !i.get("width")
|
|
761
736
|
) || t.reduce((c, a) => c + a.get("width"), 0) !== 100) && n();
|
|
762
737
|
})
|
|
763
738
|
},
|
|
@@ -784,13 +759,13 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
784
759
|
advanced: !0
|
|
785
760
|
}
|
|
786
761
|
]
|
|
787
|
-
},
|
|
762
|
+
}, He = {
|
|
788
763
|
name: "Fragment",
|
|
789
764
|
static: !0,
|
|
790
765
|
hidden: !0,
|
|
791
766
|
canHaveChildren: !0,
|
|
792
767
|
noWrap: !0
|
|
793
|
-
},
|
|
768
|
+
}, Ke = {
|
|
794
769
|
name: "Image",
|
|
795
770
|
static: !0,
|
|
796
771
|
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",
|
|
@@ -809,10 +784,10 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
809
784
|
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
810
785
|
required: !0,
|
|
811
786
|
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
812
|
-
onChange:
|
|
787
|
+
onChange: B(
|
|
813
788
|
(e) => {
|
|
814
789
|
e.delete("srcset"), e.delete("noWebp");
|
|
815
|
-
function t(
|
|
790
|
+
function t(r, c = 6e4) {
|
|
816
791
|
return new Promise((a, l) => {
|
|
817
792
|
const u = document.createElement("img");
|
|
818
793
|
let g = !1;
|
|
@@ -820,21 +795,21 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
820
795
|
g = !0, a(u);
|
|
821
796
|
}, u.addEventListener("error", (f) => {
|
|
822
797
|
console.warn("Image load failed", f.error), l(f.error);
|
|
823
|
-
}), u.src =
|
|
798
|
+
}), u.src = r, setTimeout(() => {
|
|
824
799
|
g || l(new Error("Image load timed out"));
|
|
825
800
|
}, c);
|
|
826
801
|
});
|
|
827
802
|
}
|
|
828
|
-
function o(
|
|
829
|
-
return Math.round(
|
|
803
|
+
function o(r) {
|
|
804
|
+
return Math.round(r * 1e3) / 1e3;
|
|
830
805
|
}
|
|
831
|
-
const
|
|
832
|
-
if (fetch(
|
|
833
|
-
|
|
834
|
-
}),
|
|
835
|
-
return t(
|
|
806
|
+
const s = e.get("image"), i = e.get("aspectRatio");
|
|
807
|
+
if (fetch(s).then((r) => r.blob()).then((r) => {
|
|
808
|
+
r.type.includes("svg") && e.set("noWebp", !0);
|
|
809
|
+
}), s && (!i || i === 0.7041))
|
|
810
|
+
return t(s).then((r) => {
|
|
836
811
|
const c = e.get("aspectRatio");
|
|
837
|
-
e.get("image") ===
|
|
812
|
+
e.get("image") === s && (!c || c === 0.7041) && r.width && r.height && (e.set("aspectRatio", o(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
|
|
838
813
|
});
|
|
839
814
|
}
|
|
840
815
|
)
|
|
@@ -917,7 +892,7 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
917
892
|
defaultValue: 0.7041
|
|
918
893
|
}
|
|
919
894
|
]
|
|
920
|
-
},
|
|
895
|
+
}, ze = {
|
|
921
896
|
name: "Core:Section",
|
|
922
897
|
static: !0,
|
|
923
898
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -961,27 +936,27 @@ const ze = /* @__PURE__ */ h(Ne, [["render", $e], ["__scopeId", "data-v-1112d180
|
|
|
961
936
|
}
|
|
962
937
|
}
|
|
963
938
|
]
|
|
964
|
-
},
|
|
939
|
+
}, De = {
|
|
965
940
|
name: "builder-section-component",
|
|
966
941
|
props: ["maxWidth", "attributes"],
|
|
967
942
|
methods: {
|
|
968
943
|
filterAttrs: function(n = {}, t) {
|
|
969
944
|
const o = "v-on:";
|
|
970
|
-
return Object.keys(n).filter((
|
|
971
|
-
const
|
|
972
|
-
return t ?
|
|
945
|
+
return Object.keys(n).filter((s) => {
|
|
946
|
+
const i = s.startsWith(o);
|
|
947
|
+
return t ? i : !i;
|
|
973
948
|
}).reduce(
|
|
974
|
-
(
|
|
975
|
-
...
|
|
976
|
-
[
|
|
949
|
+
(s, i) => ({
|
|
950
|
+
...s,
|
|
951
|
+
[i.replace(o, "")]: n[i]
|
|
977
952
|
}),
|
|
978
953
|
{}
|
|
979
954
|
);
|
|
980
955
|
}
|
|
981
956
|
}
|
|
982
957
|
};
|
|
983
|
-
function
|
|
984
|
-
return d(), m("section",
|
|
958
|
+
function qe(e, n, t, o, s, i) {
|
|
959
|
+
return d(), m("section", S({
|
|
985
960
|
style: {
|
|
986
961
|
width: "100%",
|
|
987
962
|
alignSelf: "stretch",
|
|
@@ -994,11 +969,11 @@ function Ye(e, n, t, o, r, s) {
|
|
|
994
969
|
marginLeft: "auto",
|
|
995
970
|
marginRight: "auto"
|
|
996
971
|
}
|
|
997
|
-
},
|
|
998
|
-
|
|
972
|
+
}, i.filterAttrs(t.attributes, !1), C(i.filterAttrs(t.attributes, !0), !0)), [
|
|
973
|
+
A(e.$slots, "default")
|
|
999
974
|
], 16);
|
|
1000
975
|
}
|
|
1001
|
-
const
|
|
976
|
+
const Ge = /* @__PURE__ */ h(De, [["render", qe]]), Je = {
|
|
1002
977
|
name: "Symbol",
|
|
1003
978
|
noWrap: !0,
|
|
1004
979
|
static: !0,
|
|
@@ -1037,11 +1012,11 @@ const Xe = /* @__PURE__ */ h(Je, [["render", Ye]]), Qe = {
|
|
|
1037
1012
|
}
|
|
1038
1013
|
]
|
|
1039
1014
|
};
|
|
1040
|
-
function
|
|
1015
|
+
function Ye() {
|
|
1041
1016
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1042
1017
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const e =
|
|
1018
|
+
function Xe() {
|
|
1019
|
+
const e = Ye().fetch;
|
|
1045
1020
|
if (typeof e > "u")
|
|
1046
1021
|
throw console.warn(
|
|
1047
1022
|
`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
@@ -1049,12 +1024,12 @@ function et() {
|
|
|
1049
1024
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1050
1025
|
return e;
|
|
1051
1026
|
}
|
|
1052
|
-
const
|
|
1027
|
+
const ee = Xe(), _ = (e) => e != null, Qe = (e) => {
|
|
1053
1028
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1054
1029
|
return e;
|
|
1055
1030
|
const n = e.split(".");
|
|
1056
1031
|
return n.length > 2 ? n.slice(1).join(".") : e;
|
|
1057
|
-
},
|
|
1032
|
+
}, te = async ({
|
|
1058
1033
|
name: e,
|
|
1059
1034
|
canTrack: n
|
|
1060
1035
|
}) => {
|
|
@@ -1065,23 +1040,23 @@ const te = et(), tt = (e) => {
|
|
|
1065
1040
|
console.debug("[COOKIE] GET error: ", o);
|
|
1066
1041
|
return;
|
|
1067
1042
|
}
|
|
1068
|
-
},
|
|
1043
|
+
}, Ze = (e) => e.map(([n, t]) => t ? `${n}=${t}` : n).filter(_).join("; "), et = [
|
|
1069
1044
|
["secure", ""],
|
|
1070
1045
|
["SameSite", "None"]
|
|
1071
|
-
],
|
|
1046
|
+
], tt = ({
|
|
1072
1047
|
name: e,
|
|
1073
1048
|
value: n,
|
|
1074
1049
|
expires: t
|
|
1075
1050
|
}) => {
|
|
1076
|
-
const
|
|
1051
|
+
const s = (p() ? location.protocol === "https:" : !0) ? et : [[]], i = t ? [["expires", t.toUTCString()]] : [[]], r = [
|
|
1077
1052
|
[e, n],
|
|
1078
|
-
...
|
|
1053
|
+
...i,
|
|
1079
1054
|
["path", "/"],
|
|
1080
|
-
["domain",
|
|
1081
|
-
...
|
|
1055
|
+
["domain", Qe(window.location.hostname)],
|
|
1056
|
+
...s
|
|
1082
1057
|
];
|
|
1083
|
-
return
|
|
1084
|
-
},
|
|
1058
|
+
return Ze(r);
|
|
1059
|
+
}, ne = async ({
|
|
1085
1060
|
name: e,
|
|
1086
1061
|
value: n,
|
|
1087
1062
|
expires: t,
|
|
@@ -1090,29 +1065,29 @@ const te = et(), tt = (e) => {
|
|
|
1090
1065
|
try {
|
|
1091
1066
|
if (!o)
|
|
1092
1067
|
return;
|
|
1093
|
-
const
|
|
1094
|
-
document.cookie =
|
|
1095
|
-
} catch (
|
|
1096
|
-
console.warn("[COOKIE] SET error: ",
|
|
1068
|
+
const s = tt({ name: e, value: n, expires: t });
|
|
1069
|
+
document.cookie = s;
|
|
1070
|
+
} catch (s) {
|
|
1071
|
+
console.warn("[COOKIE] SET error: ", s);
|
|
1097
1072
|
}
|
|
1098
|
-
},
|
|
1073
|
+
}, nt = "builderio.variations", oe = (e) => `${nt}.${e}`, ot = ({
|
|
1099
1074
|
contentId: e,
|
|
1100
1075
|
canTrack: n
|
|
1101
|
-
}) =>
|
|
1076
|
+
}) => te({ name: oe(e), canTrack: n }), it = ({
|
|
1102
1077
|
contentId: e,
|
|
1103
1078
|
canTrack: n,
|
|
1104
1079
|
value: t
|
|
1105
|
-
}) =>
|
|
1080
|
+
}) => ne({ name: oe(e), value: t, canTrack: n }), st = (e) => _(e.id) && _(e.variations) && Object.keys(e.variations).length > 0, rt = ({
|
|
1106
1081
|
id: e,
|
|
1107
1082
|
variations: n
|
|
1108
1083
|
}) => {
|
|
1109
|
-
var
|
|
1084
|
+
var s;
|
|
1110
1085
|
let t = 0;
|
|
1111
1086
|
const o = Math.random();
|
|
1112
|
-
for (const
|
|
1113
|
-
const
|
|
1114
|
-
if (t +=
|
|
1115
|
-
return
|
|
1087
|
+
for (const i in n) {
|
|
1088
|
+
const r = (s = n[i]) == null ? void 0 : s.testRatio;
|
|
1089
|
+
if (t += r, o < t)
|
|
1090
|
+
return i;
|
|
1116
1091
|
}
|
|
1117
1092
|
return e;
|
|
1118
1093
|
}, H = ({
|
|
@@ -1128,119 +1103,119 @@ const te = et(), tt = (e) => {
|
|
|
1128
1103
|
testVariationId: t.id,
|
|
1129
1104
|
testVariationName: t.name || (t.id === e.id ? "Default" : "")
|
|
1130
1105
|
};
|
|
1131
|
-
},
|
|
1106
|
+
}, at = async ({
|
|
1132
1107
|
item: e,
|
|
1133
1108
|
canTrack: n
|
|
1134
1109
|
}) => {
|
|
1135
|
-
const t = await
|
|
1110
|
+
const t = await ot({
|
|
1136
1111
|
canTrack: n,
|
|
1137
1112
|
contentId: e.id
|
|
1138
1113
|
}), o = t ? H({ item: e, testGroupId: t }) : void 0;
|
|
1139
1114
|
if (o)
|
|
1140
1115
|
return o;
|
|
1141
1116
|
{
|
|
1142
|
-
const
|
|
1117
|
+
const s = rt({
|
|
1143
1118
|
variations: e.variations,
|
|
1144
1119
|
id: e.id
|
|
1145
1120
|
});
|
|
1146
|
-
return
|
|
1121
|
+
return it({
|
|
1147
1122
|
contentId: e.id,
|
|
1148
|
-
value:
|
|
1123
|
+
value: s,
|
|
1149
1124
|
canTrack: n
|
|
1150
|
-
}).catch((
|
|
1151
|
-
console.error("could not store A/B test variation: ",
|
|
1152
|
-
}), H({ item: e, testGroupId:
|
|
1125
|
+
}).catch((i) => {
|
|
1126
|
+
console.error("could not store A/B test variation: ", i);
|
|
1127
|
+
}), H({ item: e, testGroupId: s });
|
|
1153
1128
|
}
|
|
1154
|
-
},
|
|
1129
|
+
}, ct = async ({
|
|
1155
1130
|
item: e,
|
|
1156
1131
|
canTrack: n
|
|
1157
1132
|
}) => {
|
|
1158
|
-
if (!
|
|
1133
|
+
if (!st(e))
|
|
1159
1134
|
return;
|
|
1160
|
-
const t = await
|
|
1135
|
+
const t = await at({ item: e, canTrack: n });
|
|
1161
1136
|
Object.assign(e, t);
|
|
1162
1137
|
};
|
|
1163
|
-
function
|
|
1164
|
-
return Object.keys(e).reduce((o,
|
|
1165
|
-
const
|
|
1138
|
+
function O(e, n = null, t = ".") {
|
|
1139
|
+
return Object.keys(e).reduce((o, s) => {
|
|
1140
|
+
const i = e[s], r = [n, s].filter(Boolean).join(t);
|
|
1166
1141
|
return [
|
|
1167
|
-
typeof
|
|
1168
|
-
|
|
1169
|
-
!(Array.isArray(
|
|
1170
|
-
].every(Boolean) ? { ...o, ...
|
|
1142
|
+
typeof i == "object",
|
|
1143
|
+
i !== null,
|
|
1144
|
+
!(Array.isArray(i) && i.length === 0)
|
|
1145
|
+
].every(Boolean) ? { ...o, ...O(i, r, t) } : { ...o, [r]: i };
|
|
1171
1146
|
}, {});
|
|
1172
1147
|
}
|
|
1173
|
-
const K = "builder.",
|
|
1148
|
+
const K = "builder.", lt = "options.", dt = (e) => {
|
|
1174
1149
|
const n = {};
|
|
1175
1150
|
return e.forEach((t, o) => {
|
|
1176
1151
|
n[o] = t;
|
|
1177
1152
|
}), n;
|
|
1178
|
-
},
|
|
1153
|
+
}, ut = (e) => {
|
|
1179
1154
|
if (!e)
|
|
1180
1155
|
return {};
|
|
1181
|
-
const n =
|
|
1156
|
+
const n = ie(e), t = {};
|
|
1182
1157
|
return Object.keys(n).forEach((o) => {
|
|
1183
1158
|
if (o.startsWith(K)) {
|
|
1184
|
-
const
|
|
1185
|
-
t[
|
|
1159
|
+
const s = o.replace(K, "").replace(lt, "");
|
|
1160
|
+
t[s] = n[o];
|
|
1186
1161
|
}
|
|
1187
1162
|
}), t;
|
|
1188
|
-
},
|
|
1163
|
+
}, mt = () => {
|
|
1189
1164
|
if (!p())
|
|
1190
1165
|
return {};
|
|
1191
1166
|
const e = new URLSearchParams(window.location.search);
|
|
1192
|
-
return
|
|
1193
|
-
},
|
|
1167
|
+
return ut(e);
|
|
1168
|
+
}, ie = (e) => e instanceof URLSearchParams ? dt(e) : e, pt = (e) => {
|
|
1194
1169
|
const {
|
|
1195
1170
|
limit: n = 30,
|
|
1196
1171
|
userAttributes: t,
|
|
1197
1172
|
query: o,
|
|
1198
|
-
noTraverse:
|
|
1199
|
-
model:
|
|
1200
|
-
apiKey:
|
|
1173
|
+
noTraverse: s = !1,
|
|
1174
|
+
model: i,
|
|
1175
|
+
apiKey: r,
|
|
1201
1176
|
includeRefs: c = !0,
|
|
1202
1177
|
locale: a,
|
|
1203
1178
|
apiVersion: l = "v2"
|
|
1204
1179
|
} = e;
|
|
1205
|
-
if (!
|
|
1180
|
+
if (!r)
|
|
1206
1181
|
throw new Error("Missing API key");
|
|
1207
1182
|
if (!["v2", "v3"].includes(l))
|
|
1208
1183
|
throw new Error(
|
|
1209
1184
|
`Invalid apiVersion: expected 'v2' or 'v3', received '${l}'`
|
|
1210
1185
|
);
|
|
1211
1186
|
const u = new URL(
|
|
1212
|
-
`https://cdn.builder.io/api/${l}/content/${
|
|
1187
|
+
`https://cdn.builder.io/api/${l}/content/${i}?apiKey=${r}&limit=${n}&noTraverse=${s}&includeRefs=${c}${a ? `&locale=${a}` : ""}`
|
|
1213
1188
|
), g = {
|
|
1214
|
-
...
|
|
1215
|
-
...
|
|
1216
|
-
}, f =
|
|
1189
|
+
...mt(),
|
|
1190
|
+
...ie(e.options || {})
|
|
1191
|
+
}, f = O(g);
|
|
1217
1192
|
for (const b in f)
|
|
1218
1193
|
u.searchParams.set(b, String(f[b]));
|
|
1219
1194
|
if (t && u.searchParams.set("userAttributes", JSON.stringify(t)), o) {
|
|
1220
|
-
const b =
|
|
1221
|
-
for (const
|
|
1222
|
-
u.searchParams.set(
|
|
1195
|
+
const b = O({ query: o });
|
|
1196
|
+
for (const w in b)
|
|
1197
|
+
u.searchParams.set(w, JSON.stringify(b[w]));
|
|
1223
1198
|
}
|
|
1224
1199
|
return u;
|
|
1225
1200
|
};
|
|
1226
|
-
async function
|
|
1227
|
-
return (await
|
|
1201
|
+
async function se(e) {
|
|
1202
|
+
return (await ht({ ...e, limit: 1 })).results[0] || null;
|
|
1228
1203
|
}
|
|
1229
|
-
async function
|
|
1230
|
-
const n =
|
|
1231
|
-
if (
|
|
1232
|
-
for (const
|
|
1233
|
-
await
|
|
1204
|
+
async function ht(e) {
|
|
1205
|
+
const n = pt(e), o = await (await ee(n.href)).json(), s = e.canTrack !== !1;
|
|
1206
|
+
if (s && Array.isArray(o.results))
|
|
1207
|
+
for (const i of o.results)
|
|
1208
|
+
await ct({ item: i, canTrack: s });
|
|
1234
1209
|
return o;
|
|
1235
1210
|
}
|
|
1236
|
-
const
|
|
1211
|
+
const ft = () => Promise.resolve().then(() => Tn).then((e) => e.default).catch((e) => {
|
|
1237
1212
|
throw console.error(
|
|
1238
1213
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1239
1214
|
e
|
|
1240
1215
|
), e;
|
|
1241
|
-
}),
|
|
1216
|
+
}), gt = {
|
|
1242
1217
|
name: "builder-symbol",
|
|
1243
|
-
components: { RenderContent: x(
|
|
1218
|
+
components: { RenderContent: x(ft) },
|
|
1244
1219
|
props: ["attributes", "symbol", "dynamic"],
|
|
1245
1220
|
data() {
|
|
1246
1221
|
var e, n, t;
|
|
@@ -1278,7 +1253,7 @@ const yt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
|
|
|
1278
1253
|
methods: {
|
|
1279
1254
|
fetchContent() {
|
|
1280
1255
|
var e, n;
|
|
1281
|
-
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((n = this.builderContext) == null ? void 0 : n.apiKey) &&
|
|
1256
|
+
!this.contentToUse && ((e = this.symbol) == null ? void 0 : e.model) && ((n = this.builderContext) == null ? void 0 : n.apiKey) && se({
|
|
1282
1257
|
model: this.symbol.model,
|
|
1283
1258
|
apiKey: this.builderContext.apiKey,
|
|
1284
1259
|
apiVersion: this.builderContext.apiVersion,
|
|
@@ -1296,13 +1271,13 @@ const yt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
|
|
|
1296
1271
|
},
|
|
1297
1272
|
filterAttrs: function(n = {}, t) {
|
|
1298
1273
|
const o = "v-on:";
|
|
1299
|
-
return Object.keys(n).filter((
|
|
1300
|
-
const
|
|
1301
|
-
return t ?
|
|
1274
|
+
return Object.keys(n).filter((s) => {
|
|
1275
|
+
const i = s.startsWith(o);
|
|
1276
|
+
return t ? i : !i;
|
|
1302
1277
|
}).reduce(
|
|
1303
|
-
(
|
|
1304
|
-
...
|
|
1305
|
-
[
|
|
1278
|
+
(s, i) => ({
|
|
1279
|
+
...s,
|
|
1280
|
+
[i.replace(o, "")]: n[i]
|
|
1306
1281
|
}),
|
|
1307
1282
|
{}
|
|
1308
1283
|
);
|
|
@@ -1317,32 +1292,32 @@ const yt = () => Promise.resolve().then(() => An).then((e) => e.default).catch((
|
|
|
1317
1292
|
return n;
|
|
1318
1293
|
}
|
|
1319
1294
|
}
|
|
1320
|
-
},
|
|
1321
|
-
function
|
|
1295
|
+
}, bt = ["dataSet"];
|
|
1296
|
+
function yt(e, n, t, o, s, i) {
|
|
1322
1297
|
var c, a, l, u;
|
|
1323
|
-
const
|
|
1324
|
-
return d(), m("div",
|
|
1298
|
+
const r = k("render-content");
|
|
1299
|
+
return d(), m("div", S({
|
|
1325
1300
|
dataSet: {
|
|
1326
|
-
class:
|
|
1327
|
-
},
|
|
1328
|
-
class:
|
|
1329
|
-
},
|
|
1330
|
-
|
|
1331
|
-
apiVersion:
|
|
1332
|
-
apiKey:
|
|
1333
|
-
context:
|
|
1334
|
-
customComponents: Object.values(
|
|
1301
|
+
class: s.className
|
|
1302
|
+
},
|
|
1303
|
+
class: i._classStringToObject(s.className)
|
|
1304
|
+
}, i.filterAttrs(t.attributes, !1), C(i.filterAttrs(t.attributes, !0), !0)), [
|
|
1305
|
+
X(r, {
|
|
1306
|
+
apiVersion: i.builderContext.apiVersion,
|
|
1307
|
+
apiKey: i.builderContext.apiKey,
|
|
1308
|
+
context: i.builderContext.context,
|
|
1309
|
+
customComponents: Object.values(i.builderContext.registeredComponents),
|
|
1335
1310
|
data: {
|
|
1336
1311
|
...(c = t.symbol) == null ? void 0 : c.data,
|
|
1337
|
-
...
|
|
1338
|
-
...(l = (a =
|
|
1312
|
+
...i.builderContext.state,
|
|
1313
|
+
...(l = (a = s.contentToUse) == null ? void 0 : a.data) == null ? void 0 : l.state
|
|
1339
1314
|
},
|
|
1340
1315
|
model: (u = t.symbol) == null ? void 0 : u.model,
|
|
1341
|
-
content:
|
|
1316
|
+
content: s.contentToUse
|
|
1342
1317
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content"])
|
|
1343
|
-
], 16,
|
|
1318
|
+
], 16, bt);
|
|
1344
1319
|
}
|
|
1345
|
-
const
|
|
1320
|
+
const vt = /* @__PURE__ */ h(gt, [["render", yt]]), xt = {
|
|
1346
1321
|
name: "Text",
|
|
1347
1322
|
static: !0,
|
|
1348
1323
|
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",
|
|
@@ -1361,20 +1336,20 @@ const St = /* @__PURE__ */ h(vt, [["render", kt]]), _t = {
|
|
|
1361
1336
|
height: "auto",
|
|
1362
1337
|
textAlign: "center"
|
|
1363
1338
|
}
|
|
1364
|
-
},
|
|
1339
|
+
}, kt = {
|
|
1365
1340
|
name: "builder-text",
|
|
1366
1341
|
props: ["text"]
|
|
1367
|
-
},
|
|
1368
|
-
function
|
|
1342
|
+
}, St = ["innerHTML"];
|
|
1343
|
+
function _t(e, n, t, o, s, i) {
|
|
1369
1344
|
return d(), m("span", {
|
|
1370
1345
|
class: "builder-text",
|
|
1371
1346
|
innerHTML: t.text,
|
|
1372
1347
|
style: {
|
|
1373
1348
|
outline: "none"
|
|
1374
1349
|
}
|
|
1375
|
-
}, null, 8,
|
|
1350
|
+
}, null, 8, St);
|
|
1376
1351
|
}
|
|
1377
|
-
const
|
|
1352
|
+
const wt = /* @__PURE__ */ h(kt, [["render", _t]]), Ct = {
|
|
1378
1353
|
name: "Video",
|
|
1379
1354
|
canHaveChildren: !0,
|
|
1380
1355
|
defaultStyles: {
|
|
@@ -1475,7 +1450,7 @@ const Tt = /* @__PURE__ */ h(Ct, [["render", It]]), Rt = {
|
|
|
1475
1450
|
advanced: !0
|
|
1476
1451
|
}
|
|
1477
1452
|
]
|
|
1478
|
-
},
|
|
1453
|
+
}, It = {
|
|
1479
1454
|
name: "builder-video",
|
|
1480
1455
|
props: [
|
|
1481
1456
|
"autoPlay",
|
|
@@ -1516,23 +1491,23 @@ const Tt = /* @__PURE__ */ h(Ct, [["render", It]]), Rt = {
|
|
|
1516
1491
|
};
|
|
1517
1492
|
}
|
|
1518
1493
|
}
|
|
1519
|
-
},
|
|
1520
|
-
function
|
|
1521
|
-
var
|
|
1522
|
-
return d(), m("video",
|
|
1494
|
+
}, Tt = ["src", "poster"];
|
|
1495
|
+
function Rt(e, n, t, o, s, i) {
|
|
1496
|
+
var r;
|
|
1497
|
+
return d(), m("video", S({
|
|
1523
1498
|
style: {
|
|
1524
1499
|
width: "100%",
|
|
1525
1500
|
height: "100%",
|
|
1526
|
-
...(
|
|
1501
|
+
...(r = t.attributes) == null ? void 0 : r.style,
|
|
1527
1502
|
objectFit: t.fit,
|
|
1528
1503
|
objectPosition: t.position,
|
|
1529
1504
|
borderRadius: 1
|
|
1530
1505
|
},
|
|
1531
1506
|
src: t.video || "no-src",
|
|
1532
1507
|
poster: t.posterImage
|
|
1533
|
-
},
|
|
1508
|
+
}, i.spreadProps), null, 16, Tt);
|
|
1534
1509
|
}
|
|
1535
|
-
const
|
|
1510
|
+
const Et = /* @__PURE__ */ h(It, [["render", Rt]]), At = {
|
|
1536
1511
|
name: "Embed",
|
|
1537
1512
|
static: !0,
|
|
1538
1513
|
inputs: [
|
|
@@ -1542,7 +1517,7 @@ const Ot = /* @__PURE__ */ h(Et, [["render", jt]]), Vt = {
|
|
|
1542
1517
|
required: !0,
|
|
1543
1518
|
defaultValue: "",
|
|
1544
1519
|
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1545
|
-
onChange:
|
|
1520
|
+
onChange: B(
|
|
1546
1521
|
(e) => {
|
|
1547
1522
|
const n = e.get("url");
|
|
1548
1523
|
if (n)
|
|
@@ -1567,11 +1542,11 @@ const Ot = /* @__PURE__ */ h(Et, [["render", jt]]), Vt = {
|
|
|
1567
1542
|
hideFromUI: !0
|
|
1568
1543
|
}
|
|
1569
1544
|
]
|
|
1570
|
-
},
|
|
1545
|
+
}, jt = [
|
|
1571
1546
|
"text/javascript",
|
|
1572
1547
|
"application/javascript",
|
|
1573
1548
|
"application/ecmascript"
|
|
1574
|
-
],
|
|
1549
|
+
], Vt = (e) => jt.includes(e.type), Bt = {
|
|
1575
1550
|
name: "builder-embed",
|
|
1576
1551
|
props: ["content"],
|
|
1577
1552
|
data() {
|
|
@@ -1604,7 +1579,7 @@ const Ot = /* @__PURE__ */ h(Et, [["render", jt]]), Vt = {
|
|
|
1604
1579
|
this.scriptsInserted.push(t.src);
|
|
1605
1580
|
const o = document.createElement("script");
|
|
1606
1581
|
o.async = !0, o.src = t.src, document.head.appendChild(o);
|
|
1607
|
-
} else if (
|
|
1582
|
+
} else if (Vt(t) && !this.scriptsRun.includes(t.innerText))
|
|
1608
1583
|
try {
|
|
1609
1584
|
this.scriptsRun.push(t.innerText), new Function(t.innerText)();
|
|
1610
1585
|
} catch (o) {
|
|
@@ -1613,15 +1588,15 @@ const Ot = /* @__PURE__ */ h(Et, [["render", jt]]), Vt = {
|
|
|
1613
1588
|
}
|
|
1614
1589
|
}
|
|
1615
1590
|
}
|
|
1616
|
-
},
|
|
1617
|
-
function
|
|
1591
|
+
}, Ft = ["innerHTML"];
|
|
1592
|
+
function Pt(e, n, t, o, s, i) {
|
|
1618
1593
|
return d(), m("div", {
|
|
1619
1594
|
class: "builder-embed",
|
|
1620
1595
|
ref: "elem",
|
|
1621
1596
|
innerHTML: t.content
|
|
1622
|
-
}, null, 8,
|
|
1597
|
+
}, null, 8, Ft);
|
|
1623
1598
|
}
|
|
1624
|
-
const
|
|
1599
|
+
const Ot = /* @__PURE__ */ h(Bt, [["render", Pt]]), Ut = {
|
|
1625
1600
|
name: "builder-img-component",
|
|
1626
1601
|
props: [
|
|
1627
1602
|
"backgroundSize",
|
|
@@ -1637,31 +1612,31 @@ const Wt = /* @__PURE__ */ h(Pt, [["render", Lt]]), Nt = {
|
|
|
1637
1612
|
methods: {
|
|
1638
1613
|
filterAttrs: function(n = {}, t) {
|
|
1639
1614
|
const o = "v-on:";
|
|
1640
|
-
return Object.keys(n).filter((
|
|
1641
|
-
const
|
|
1642
|
-
return t ?
|
|
1615
|
+
return Object.keys(n).filter((s) => {
|
|
1616
|
+
const i = s.startsWith(o);
|
|
1617
|
+
return t ? i : !i;
|
|
1643
1618
|
}).reduce(
|
|
1644
|
-
(
|
|
1645
|
-
...
|
|
1646
|
-
[
|
|
1619
|
+
(s, i) => ({
|
|
1620
|
+
...s,
|
|
1621
|
+
[i.replace(o, "")]: n[i]
|
|
1647
1622
|
}),
|
|
1648
1623
|
{}
|
|
1649
1624
|
);
|
|
1650
1625
|
}
|
|
1651
1626
|
}
|
|
1652
|
-
},
|
|
1653
|
-
function
|
|
1654
|
-
return d(), m("img",
|
|
1627
|
+
}, Wt = ["alt", "src"];
|
|
1628
|
+
function Mt(e, n, t, o, s, i) {
|
|
1629
|
+
return d(), m("img", S({
|
|
1655
1630
|
style: {
|
|
1656
1631
|
objectFit: t.backgroundSize || "cover",
|
|
1657
1632
|
objectPosition: t.backgroundPosition || "center"
|
|
1658
1633
|
},
|
|
1659
|
-
key:
|
|
1634
|
+
key: s.isEditing() && t.imgSrc || "default-key",
|
|
1660
1635
|
alt: t.altText,
|
|
1661
1636
|
src: t.imgSrc || t.image
|
|
1662
|
-
},
|
|
1637
|
+
}, i.filterAttrs(t.attributes, !1), C(i.filterAttrs(t.attributes, !0), !0)), null, 16, Wt);
|
|
1663
1638
|
}
|
|
1664
|
-
const
|
|
1639
|
+
const Lt = /* @__PURE__ */ h(Ut, [["render", Mt]]), Nt = {
|
|
1665
1640
|
name: "Raw:Img",
|
|
1666
1641
|
hideFromInsertMenu: !0,
|
|
1667
1642
|
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",
|
|
@@ -1676,7 +1651,7 @@ const zt = /* @__PURE__ */ h(Nt, [["render", $t]]), Ht = {
|
|
|
1676
1651
|
],
|
|
1677
1652
|
noWrap: !0,
|
|
1678
1653
|
static: !0
|
|
1679
|
-
},
|
|
1654
|
+
}, $t = {
|
|
1680
1655
|
name: "builder-custom-code",
|
|
1681
1656
|
props: ["replaceNodes", "code"],
|
|
1682
1657
|
data() {
|
|
@@ -1723,19 +1698,19 @@ const zt = /* @__PURE__ */ h(Nt, [["render", $t]]), Ht = {
|
|
|
1723
1698
|
return n;
|
|
1724
1699
|
}
|
|
1725
1700
|
}
|
|
1726
|
-
},
|
|
1727
|
-
function
|
|
1701
|
+
}, Ht = ["innerHTML"];
|
|
1702
|
+
function Kt(e, n, t, o, s, i) {
|
|
1728
1703
|
return d(), m("div", {
|
|
1729
1704
|
ref: "elem",
|
|
1730
|
-
class:
|
|
1731
|
-
|
|
1705
|
+
class: j(
|
|
1706
|
+
i._classStringToObject(
|
|
1732
1707
|
"builder-custom-code" + (t.replaceNodes ? " replace-nodes" : "")
|
|
1733
1708
|
)
|
|
1734
1709
|
),
|
|
1735
1710
|
innerHTML: t.code
|
|
1736
|
-
}, null, 10,
|
|
1711
|
+
}, null, 10, Ht);
|
|
1737
1712
|
}
|
|
1738
|
-
const
|
|
1713
|
+
const zt = /* @__PURE__ */ h($t, [["render", Kt]]), Dt = {
|
|
1739
1714
|
name: "Custom Code",
|
|
1740
1715
|
static: !0,
|
|
1741
1716
|
requiredPermissions: ["editCode"],
|
|
@@ -1761,35 +1736,35 @@ const Gt = /* @__PURE__ */ h(Kt, [["render", qt]]), Jt = {
|
|
|
1761
1736
|
advanced: !0
|
|
1762
1737
|
}
|
|
1763
1738
|
]
|
|
1764
|
-
},
|
|
1765
|
-
{ component:
|
|
1766
|
-
{ component:
|
|
1767
|
-
{ component:
|
|
1768
|
-
{ component:
|
|
1769
|
-
{ component:
|
|
1770
|
-
{ component:
|
|
1771
|
-
{ component:
|
|
1772
|
-
{ component:
|
|
1773
|
-
{ component:
|
|
1774
|
-
{ component:
|
|
1775
|
-
{ component:
|
|
1739
|
+
}, qt = () => [
|
|
1740
|
+
{ component: fe, ...Ne },
|
|
1741
|
+
{ component: Se, ...$e },
|
|
1742
|
+
{ component: zt, ...Dt },
|
|
1743
|
+
{ component: Ot, ...At },
|
|
1744
|
+
{ component: Ce, ...He },
|
|
1745
|
+
{ component: Be, ...Ke },
|
|
1746
|
+
{ component: Lt, ...Nt },
|
|
1747
|
+
{ component: Ge, ...ze },
|
|
1748
|
+
{ component: vt, ...Je },
|
|
1749
|
+
{ component: wt, ...xt },
|
|
1750
|
+
{ component: Et, ...Ct }
|
|
1776
1751
|
];
|
|
1777
|
-
function
|
|
1752
|
+
function z({
|
|
1778
1753
|
code: e,
|
|
1779
1754
|
context: n,
|
|
1780
1755
|
state: t,
|
|
1781
1756
|
event: o,
|
|
1782
|
-
isExpression:
|
|
1757
|
+
isExpression: s = !0
|
|
1783
1758
|
}) {
|
|
1784
1759
|
if (e === "") {
|
|
1785
1760
|
console.warn("Skipping evaluation of empty code block.");
|
|
1786
1761
|
return;
|
|
1787
1762
|
}
|
|
1788
|
-
const
|
|
1763
|
+
const i = {
|
|
1789
1764
|
isEditing: v(),
|
|
1790
1765
|
isBrowser: p(),
|
|
1791
1766
|
isServer: !p()
|
|
1792
|
-
}, c =
|
|
1767
|
+
}, c = s && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
|
|
1793
1768
|
try {
|
|
1794
1769
|
return new Function(
|
|
1795
1770
|
"builder",
|
|
@@ -1798,7 +1773,7 @@ function D({
|
|
|
1798
1773
|
"context",
|
|
1799
1774
|
"event",
|
|
1800
1775
|
c
|
|
1801
|
-
)(
|
|
1776
|
+
)(i, i, t, n, o);
|
|
1802
1777
|
} catch (a) {
|
|
1803
1778
|
console.warn(
|
|
1804
1779
|
`Builder custom code error:
|
|
@@ -1811,113 +1786,113 @@ function D({
|
|
|
1811
1786
|
);
|
|
1812
1787
|
}
|
|
1813
1788
|
}
|
|
1814
|
-
function
|
|
1789
|
+
function Gt() {
|
|
1815
1790
|
return !p() || v() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1816
1791
|
}
|
|
1817
|
-
const
|
|
1818
|
-
function
|
|
1819
|
-
return
|
|
1792
|
+
const re = [];
|
|
1793
|
+
function An(e, n) {
|
|
1794
|
+
return re.push({ component: e, ...n }), console.warn(
|
|
1820
1795
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1821
1796
|
), e;
|
|
1822
1797
|
}
|
|
1823
|
-
const
|
|
1798
|
+
const Jt = ({
|
|
1824
1799
|
component: e,
|
|
1825
1800
|
...n
|
|
1826
1801
|
}) => ({
|
|
1827
1802
|
type: "builder.registerComponent",
|
|
1828
|
-
data:
|
|
1829
|
-
}),
|
|
1803
|
+
data: Xt(n)
|
|
1804
|
+
}), Yt = (e) => typeof e == "function" ? B(e) : W(e), Xt = ({
|
|
1830
1805
|
inputs: e,
|
|
1831
1806
|
...n
|
|
1832
1807
|
}) => ({
|
|
1833
1808
|
...W(n),
|
|
1834
1809
|
inputs: e == null ? void 0 : e.map(
|
|
1835
1810
|
(t) => Object.entries(t).reduce(
|
|
1836
|
-
(o, [
|
|
1811
|
+
(o, [s, i]) => ({
|
|
1837
1812
|
...o,
|
|
1838
|
-
[
|
|
1813
|
+
[s]: Yt(i)
|
|
1839
1814
|
}),
|
|
1840
1815
|
{}
|
|
1841
1816
|
)
|
|
1842
1817
|
)
|
|
1843
1818
|
});
|
|
1844
|
-
function
|
|
1819
|
+
function Qt() {
|
|
1845
1820
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1846
1821
|
const n = Math.random() * 16 | 0;
|
|
1847
1822
|
return (e == "x" ? n : n & 3 | 8).toString(16);
|
|
1848
1823
|
});
|
|
1849
1824
|
}
|
|
1850
|
-
function
|
|
1851
|
-
return
|
|
1825
|
+
function ae() {
|
|
1826
|
+
return Qt().replace(/-/g, "");
|
|
1852
1827
|
}
|
|
1853
|
-
const
|
|
1828
|
+
const ce = "builderSessionId", Zt = async ({
|
|
1854
1829
|
canTrack: e
|
|
1855
1830
|
}) => {
|
|
1856
1831
|
if (!e)
|
|
1857
1832
|
return;
|
|
1858
|
-
const n = await
|
|
1859
|
-
name:
|
|
1833
|
+
const n = await te({
|
|
1834
|
+
name: ce,
|
|
1860
1835
|
canTrack: e
|
|
1861
1836
|
});
|
|
1862
|
-
if (
|
|
1837
|
+
if (_(n))
|
|
1863
1838
|
return n;
|
|
1864
1839
|
{
|
|
1865
|
-
const t =
|
|
1866
|
-
return
|
|
1840
|
+
const t = en();
|
|
1841
|
+
return tn({ id: t, canTrack: e }), t;
|
|
1867
1842
|
}
|
|
1868
|
-
},
|
|
1843
|
+
}, en = () => ae(), tn = ({
|
|
1869
1844
|
id: e,
|
|
1870
1845
|
canTrack: n
|
|
1871
|
-
}) =>
|
|
1846
|
+
}) => ne({ name: ce, value: e, canTrack: n }), le = () => p() && typeof localStorage < "u" ? localStorage : void 0, nn = ({
|
|
1872
1847
|
key: e,
|
|
1873
1848
|
canTrack: n
|
|
1874
1849
|
}) => {
|
|
1875
1850
|
var t;
|
|
1876
1851
|
try {
|
|
1877
|
-
return n ? (t =
|
|
1852
|
+
return n ? (t = le()) == null ? void 0 : t.getItem(e) : void 0;
|
|
1878
1853
|
} catch (o) {
|
|
1879
1854
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1880
1855
|
return;
|
|
1881
1856
|
}
|
|
1882
|
-
},
|
|
1857
|
+
}, on = ({
|
|
1883
1858
|
key: e,
|
|
1884
1859
|
canTrack: n,
|
|
1885
1860
|
value: t
|
|
1886
1861
|
}) => {
|
|
1887
1862
|
var o;
|
|
1888
1863
|
try {
|
|
1889
|
-
n && ((o =
|
|
1890
|
-
} catch (
|
|
1891
|
-
console.debug("[LocalStorage] SET error: ",
|
|
1864
|
+
n && ((o = le()) == null || o.setItem(e, t));
|
|
1865
|
+
} catch (s) {
|
|
1866
|
+
console.debug("[LocalStorage] SET error: ", s);
|
|
1892
1867
|
}
|
|
1893
|
-
},
|
|
1868
|
+
}, de = "builderVisitorId", sn = ({ canTrack: e }) => {
|
|
1894
1869
|
if (!e)
|
|
1895
1870
|
return;
|
|
1896
|
-
const n =
|
|
1897
|
-
key:
|
|
1871
|
+
const n = nn({
|
|
1872
|
+
key: de,
|
|
1898
1873
|
canTrack: e
|
|
1899
1874
|
});
|
|
1900
|
-
if (
|
|
1875
|
+
if (_(n))
|
|
1901
1876
|
return n;
|
|
1902
1877
|
{
|
|
1903
|
-
const t =
|
|
1904
|
-
return
|
|
1878
|
+
const t = rn();
|
|
1879
|
+
return an({ id: t, canTrack: e }), t;
|
|
1905
1880
|
}
|
|
1906
|
-
},
|
|
1881
|
+
}, rn = () => ae(), an = ({
|
|
1907
1882
|
id: e,
|
|
1908
1883
|
canTrack: n
|
|
1909
|
-
}) =>
|
|
1910
|
-
key:
|
|
1884
|
+
}) => on({
|
|
1885
|
+
key: de,
|
|
1911
1886
|
value: e,
|
|
1912
1887
|
canTrack: n
|
|
1913
|
-
}),
|
|
1888
|
+
}), cn = () => {
|
|
1914
1889
|
if (p()) {
|
|
1915
1890
|
const e = new URL(location.href);
|
|
1916
1891
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
1917
1892
|
} else
|
|
1918
1893
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1919
|
-
},
|
|
1920
|
-
const e =
|
|
1894
|
+
}, ln = () => typeof navigator == "object" && navigator.userAgent || "", dn = () => {
|
|
1895
|
+
const e = ln(), n = {
|
|
1921
1896
|
Android() {
|
|
1922
1897
|
return e.match(/Android/i);
|
|
1923
1898
|
},
|
|
@@ -1934,55 +1909,55 @@ const le = "builderSessionId", nn = async ({
|
|
|
1934
1909
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
1935
1910
|
},
|
|
1936
1911
|
any() {
|
|
1937
|
-
return n.Android() || n.BlackBerry() || n.iOS() || n.Opera() || n.Windows() ||
|
|
1912
|
+
return n.Android() || n.BlackBerry() || n.iOS() || n.Opera() || n.Windows() || R === "reactNative";
|
|
1938
1913
|
}
|
|
1939
|
-
}, t = e.match(/Tablet|iPad/i), o =
|
|
1914
|
+
}, t = e.match(/Tablet|iPad/i), o = cn();
|
|
1940
1915
|
return {
|
|
1941
1916
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1942
1917
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1943
1918
|
device: t ? "tablet" : n.any() ? "mobile" : "desktop"
|
|
1944
1919
|
};
|
|
1945
|
-
},
|
|
1920
|
+
}, un = async ({
|
|
1946
1921
|
canTrack: e
|
|
1947
1922
|
}) => {
|
|
1948
1923
|
if (!e)
|
|
1949
1924
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1950
|
-
const n = await
|
|
1925
|
+
const n = await Zt({ canTrack: e }), t = sn({ canTrack: e });
|
|
1951
1926
|
return {
|
|
1952
1927
|
sessionId: n,
|
|
1953
1928
|
visitorId: t
|
|
1954
1929
|
};
|
|
1955
|
-
},
|
|
1930
|
+
}, mn = async ({
|
|
1956
1931
|
type: e,
|
|
1957
1932
|
canTrack: n,
|
|
1958
1933
|
apiKey: t,
|
|
1959
1934
|
metadata: o,
|
|
1960
|
-
...
|
|
1935
|
+
...s
|
|
1961
1936
|
}) => ({
|
|
1962
1937
|
type: e,
|
|
1963
1938
|
data: {
|
|
1964
|
-
...
|
|
1939
|
+
...s,
|
|
1965
1940
|
metadata: {
|
|
1966
1941
|
url: location.href,
|
|
1967
1942
|
...o
|
|
1968
1943
|
},
|
|
1969
|
-
...await
|
|
1970
|
-
userAttributes:
|
|
1944
|
+
...await un({ canTrack: n }),
|
|
1945
|
+
userAttributes: dn(),
|
|
1971
1946
|
ownerId: t
|
|
1972
1947
|
}
|
|
1973
1948
|
});
|
|
1974
|
-
async function
|
|
1949
|
+
async function U(e) {
|
|
1975
1950
|
if (!e.apiKey) {
|
|
1976
1951
|
console.error(
|
|
1977
1952
|
"[Builder.io]: Missing API key for track call. Please provide your API key."
|
|
1978
1953
|
);
|
|
1979
1954
|
return;
|
|
1980
1955
|
}
|
|
1981
|
-
if (!!e.canTrack && !v() && !!(p() ||
|
|
1956
|
+
if (!!e.canTrack && !v() && !!(p() || R === "reactNative"))
|
|
1982
1957
|
return fetch("https://builder.io/api/v1/track", {
|
|
1983
1958
|
method: "POST",
|
|
1984
1959
|
body: JSON.stringify({
|
|
1985
|
-
events: [await
|
|
1960
|
+
events: [await mn(e)]
|
|
1986
1961
|
}),
|
|
1987
1962
|
headers: {
|
|
1988
1963
|
"content-type": "application/json"
|
|
@@ -1992,10 +1967,10 @@ async function L(e) {
|
|
|
1992
1967
|
console.error("Failed to track: ", n);
|
|
1993
1968
|
});
|
|
1994
1969
|
}
|
|
1995
|
-
const
|
|
1996
|
-
function
|
|
1997
|
-
let t =
|
|
1998
|
-
if (t || (t =
|
|
1970
|
+
const jn = (e) => U({ ...e, canTrack: !0 }), D = {};
|
|
1971
|
+
function pn(e, n) {
|
|
1972
|
+
let t = D[e];
|
|
1973
|
+
if (t || (t = D[e] = []), t.push(n), p()) {
|
|
1999
1974
|
const o = {
|
|
2000
1975
|
type: "builder.register",
|
|
2001
1976
|
data: {
|
|
@@ -2005,13 +1980,13 @@ function gn(e, n) {
|
|
|
2005
1980
|
};
|
|
2006
1981
|
try {
|
|
2007
1982
|
parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
|
|
2008
|
-
} catch (
|
|
2009
|
-
console.debug("Could not postmessage",
|
|
1983
|
+
} catch (s) {
|
|
1984
|
+
console.debug("Could not postmessage", s);
|
|
2010
1985
|
}
|
|
2011
1986
|
}
|
|
2012
1987
|
}
|
|
2013
|
-
const
|
|
2014
|
-
|
|
1988
|
+
const hn = () => {
|
|
1989
|
+
pn("insertMenu", {
|
|
2015
1990
|
name: "_default",
|
|
2016
1991
|
default: !0,
|
|
2017
1992
|
items: [
|
|
@@ -2026,14 +2001,14 @@ const bn = () => {
|
|
|
2026
2001
|
]
|
|
2027
2002
|
});
|
|
2028
2003
|
};
|
|
2029
|
-
let
|
|
2030
|
-
const
|
|
2004
|
+
let q = !1;
|
|
2005
|
+
const fn = (e = {}) => {
|
|
2031
2006
|
var n, t;
|
|
2032
|
-
|
|
2007
|
+
q || (q = !0, p() && ((n = window.parent) == null || n.postMessage(
|
|
2033
2008
|
{
|
|
2034
2009
|
type: "builder.sdkInfo",
|
|
2035
2010
|
data: {
|
|
2036
|
-
target:
|
|
2011
|
+
target: R,
|
|
2037
2012
|
supportsPatchUpdates: !1,
|
|
2038
2013
|
supportsAddBlockScoping: !0,
|
|
2039
2014
|
supportsCustomBreakpoints: !0
|
|
@@ -2049,18 +2024,18 @@ const yn = (e = {}) => {
|
|
|
2049
2024
|
},
|
|
2050
2025
|
"*"
|
|
2051
2026
|
), window.addEventListener("message", ({ data: o }) => {
|
|
2052
|
-
var
|
|
2027
|
+
var s, i;
|
|
2053
2028
|
if (!!(o != null && o.type))
|
|
2054
2029
|
switch (o.type) {
|
|
2055
2030
|
case "builder.evaluate": {
|
|
2056
|
-
const
|
|
2031
|
+
const r = o.data.text, c = o.data.arguments || [], a = o.data.id, l = new Function(r);
|
|
2057
2032
|
let u, g = null;
|
|
2058
2033
|
try {
|
|
2059
2034
|
u = l.apply(null, c);
|
|
2060
2035
|
} catch (f) {
|
|
2061
2036
|
g = f;
|
|
2062
2037
|
}
|
|
2063
|
-
g ? (
|
|
2038
|
+
g ? (s = window.parent) == null || s.postMessage(
|
|
2064
2039
|
{
|
|
2065
2040
|
type: "builder.evaluateError",
|
|
2066
2041
|
data: { id: a, error: g.message }
|
|
@@ -2075,7 +2050,7 @@ const yn = (e = {}) => {
|
|
|
2075
2050
|
},
|
|
2076
2051
|
"*"
|
|
2077
2052
|
);
|
|
2078
|
-
}).catch(console.error) : (
|
|
2053
|
+
}).catch(console.error) : (i = window.parent) == null || i.postMessage(
|
|
2079
2054
|
{
|
|
2080
2055
|
type: "builder.evaluateResult",
|
|
2081
2056
|
data: { result: u, id: a }
|
|
@@ -2087,10 +2062,10 @@ const yn = (e = {}) => {
|
|
|
2087
2062
|
}
|
|
2088
2063
|
})));
|
|
2089
2064
|
};
|
|
2090
|
-
function
|
|
2065
|
+
function G(e) {
|
|
2091
2066
|
return Math.round(e * 1e3) / 1e3;
|
|
2092
2067
|
}
|
|
2093
|
-
const
|
|
2068
|
+
const gn = (e, n, t = !0) => {
|
|
2094
2069
|
if (!(e instanceof HTMLElement))
|
|
2095
2070
|
return null;
|
|
2096
2071
|
let o = t ? e : e.parentElement;
|
|
@@ -2101,46 +2076,46 @@ const vn = (e, n, t = !0) => {
|
|
|
2101
2076
|
return o;
|
|
2102
2077
|
} while (o = o.parentElement);
|
|
2103
2078
|
return null;
|
|
2104
|
-
},
|
|
2079
|
+
}, bn = (e) => gn(e, (n) => {
|
|
2105
2080
|
const t = n.getAttribute("builder-id") || n.id;
|
|
2106
2081
|
return Boolean((t == null ? void 0 : t.indexOf("builder-")) === 0);
|
|
2107
|
-
}),
|
|
2082
|
+
}), J = ({
|
|
2108
2083
|
event: e,
|
|
2109
2084
|
target: n
|
|
2110
2085
|
}) => {
|
|
2111
|
-
const t = n.getBoundingClientRect(), o = e.clientX - t.left,
|
|
2086
|
+
const t = n.getBoundingClientRect(), o = e.clientX - t.left, s = e.clientY - t.top, i = G(o / t.width), r = G(s / t.height);
|
|
2112
2087
|
return {
|
|
2113
|
-
x:
|
|
2114
|
-
y:
|
|
2088
|
+
x: i,
|
|
2089
|
+
y: r
|
|
2115
2090
|
};
|
|
2116
|
-
},
|
|
2117
|
-
const n = e.target, t = n &&
|
|
2091
|
+
}, yn = (e) => {
|
|
2092
|
+
const n = e.target, t = n && bn(n), o = (t == null ? void 0 : t.getAttribute("builder-id")) || (t == null ? void 0 : t.id);
|
|
2118
2093
|
return {
|
|
2119
2094
|
targetBuilderElement: o || void 0,
|
|
2120
2095
|
metadata: {
|
|
2121
|
-
targetOffset: n ?
|
|
2122
|
-
builderTargetOffset: t ?
|
|
2096
|
+
targetOffset: n ? J({ event: e, target: n }) : void 0,
|
|
2097
|
+
builderTargetOffset: t ? J({ event: e, target: t }) : void 0,
|
|
2123
2098
|
builderElementIndex: t && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(t) : void 0
|
|
2124
2099
|
}
|
|
2125
2100
|
};
|
|
2126
|
-
},
|
|
2101
|
+
}, vn = ({
|
|
2127
2102
|
content: e,
|
|
2128
2103
|
data: n,
|
|
2129
2104
|
locale: t
|
|
2130
2105
|
}) => {
|
|
2131
|
-
var
|
|
2106
|
+
var i, r, c;
|
|
2132
2107
|
const o = {};
|
|
2133
|
-
(
|
|
2108
|
+
(r = (i = e == null ? void 0 : e.data) == null ? void 0 : i.inputs) == null || r.forEach((a) => {
|
|
2134
2109
|
var l;
|
|
2135
2110
|
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);
|
|
2136
2111
|
});
|
|
2137
|
-
const
|
|
2112
|
+
const s = {
|
|
2138
2113
|
...(c = e == null ? void 0 : e.data) == null ? void 0 : c.state,
|
|
2139
2114
|
...n,
|
|
2140
2115
|
...t ? { locale: t } : {}
|
|
2141
2116
|
};
|
|
2142
|
-
return { ...o, ...
|
|
2143
|
-
},
|
|
2117
|
+
return { ...o, ...s };
|
|
2118
|
+
}, xn = ({
|
|
2144
2119
|
content: e,
|
|
2145
2120
|
data: n
|
|
2146
2121
|
}) => e ? {
|
|
@@ -2150,21 +2125,21 @@ const vn = (e, n, t = !0) => {
|
|
|
2150
2125
|
...n
|
|
2151
2126
|
},
|
|
2152
2127
|
meta: e == null ? void 0 : e.meta
|
|
2153
|
-
} : void 0,
|
|
2128
|
+
} : void 0, kn = () => Promise.resolve().then(() => Z).then((e) => e.default).catch((e) => {
|
|
2154
2129
|
throw console.error(
|
|
2155
2130
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2156
2131
|
e
|
|
2157
2132
|
), e;
|
|
2158
|
-
}),
|
|
2133
|
+
}), Sn = () => import("./render-styles.6ed62c76.js").then((e) => e.default).catch((e) => {
|
|
2159
2134
|
throw console.error(
|
|
2160
2135
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2161
2136
|
e
|
|
2162
2137
|
), e;
|
|
2163
|
-
}),
|
|
2138
|
+
}), _n = {
|
|
2164
2139
|
name: "render-content",
|
|
2165
2140
|
components: {
|
|
2166
|
-
RenderContentStyles: x(
|
|
2167
|
-
RenderBlocks: x(
|
|
2141
|
+
RenderContentStyles: x(Sn),
|
|
2142
|
+
RenderBlocks: x(kn)
|
|
2168
2143
|
},
|
|
2169
2144
|
props: [
|
|
2170
2145
|
"content",
|
|
@@ -2182,20 +2157,20 @@ const vn = (e, n, t = !0) => {
|
|
|
2182
2157
|
return {
|
|
2183
2158
|
forceReRenderCount: 0,
|
|
2184
2159
|
overrideContent: null,
|
|
2185
|
-
useContent:
|
|
2160
|
+
useContent: xn({
|
|
2186
2161
|
content: this.content,
|
|
2187
2162
|
data: this.data
|
|
2188
2163
|
}),
|
|
2189
2164
|
update: 0,
|
|
2190
|
-
canTrackToUse:
|
|
2191
|
-
contentState:
|
|
2165
|
+
canTrackToUse: _(this.canTrack) ? this.canTrack : !0,
|
|
2166
|
+
contentState: vn({
|
|
2192
2167
|
content: this.content,
|
|
2193
2168
|
data: this.data,
|
|
2194
2169
|
locale: this.locale
|
|
2195
2170
|
}),
|
|
2196
2171
|
allRegisteredComponents: [
|
|
2197
|
-
...
|
|
2198
|
-
...
|
|
2172
|
+
...qt(),
|
|
2173
|
+
...re,
|
|
2199
2174
|
...this.customComponents || []
|
|
2200
2175
|
].reduce(
|
|
2201
2176
|
(e, n) => ({
|
|
@@ -2206,7 +2181,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2206
2181
|
),
|
|
2207
2182
|
httpReqsData: {},
|
|
2208
2183
|
clicked: !1,
|
|
2209
|
-
TARGET:
|
|
2184
|
+
TARGET: R
|
|
2210
2185
|
};
|
|
2211
2186
|
},
|
|
2212
2187
|
provide() {
|
|
@@ -2228,7 +2203,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2228
2203
|
if (this.apiKey || console.error(
|
|
2229
2204
|
"[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2230
2205
|
), p()) {
|
|
2231
|
-
if (v() && (this.forceReRenderCount = this.forceReRenderCount + 1,
|
|
2206
|
+
if (v() && (this.forceReRenderCount = this.forceReRenderCount + 1, hn(), fn({
|
|
2232
2207
|
...this.locale ? {
|
|
2233
2208
|
locale: this.locale
|
|
2234
2209
|
} : {},
|
|
@@ -2237,16 +2212,16 @@ const vn = (e, n, t = !0) => {
|
|
|
2237
2212
|
} : {}
|
|
2238
2213
|
}), Object.values(this.allRegisteredComponents).forEach(
|
|
2239
2214
|
(t) => {
|
|
2240
|
-
var
|
|
2241
|
-
const o =
|
|
2242
|
-
(
|
|
2215
|
+
var s;
|
|
2216
|
+
const o = Jt(t);
|
|
2217
|
+
(s = window.parent) == null || s.postMessage(o, "*");
|
|
2243
2218
|
}
|
|
2244
2219
|
), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2245
2220
|
"builder:component:stateChangeListenerActivated",
|
|
2246
2221
|
this.emitStateUpdate
|
|
2247
2222
|
)), this.useContent) {
|
|
2248
2223
|
const t = (e = this.useContent) == null ? void 0 : e.testVariationId, o = (n = this.useContent) == null ? void 0 : n.id;
|
|
2249
|
-
|
|
2224
|
+
U({
|
|
2250
2225
|
type: "impression",
|
|
2251
2226
|
canTrack: this.canTrackToUse,
|
|
2252
2227
|
contentId: o,
|
|
@@ -2254,14 +2229,14 @@ const vn = (e, n, t = !0) => {
|
|
|
2254
2229
|
variationId: t !== o ? t : void 0
|
|
2255
2230
|
});
|
|
2256
2231
|
}
|
|
2257
|
-
if (
|
|
2258
|
-
const t = new URL(location.href).searchParams, o = t.get("builder.preview"),
|
|
2259
|
-
o === this.model &&
|
|
2232
|
+
if (Gt()) {
|
|
2233
|
+
const t = new URL(location.href).searchParams, o = t.get("builder.preview"), s = t.get("apiKey") || t.get("builder.space");
|
|
2234
|
+
o === this.model && s === this.apiKey && se({
|
|
2260
2235
|
model: this.model,
|
|
2261
2236
|
apiKey: this.apiKey,
|
|
2262
2237
|
apiVersion: this.apiVersion
|
|
2263
|
-
}).then((
|
|
2264
|
-
|
|
2238
|
+
}).then((i) => {
|
|
2239
|
+
i && this.mergeNewContent(i);
|
|
2265
2240
|
});
|
|
2266
2241
|
}
|
|
2267
2242
|
this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
|
|
@@ -2326,7 +2301,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2326
2301
|
},
|
|
2327
2302
|
methods: {
|
|
2328
2303
|
mergeNewContent(e) {
|
|
2329
|
-
var n, t, o,
|
|
2304
|
+
var n, t, o, s, i;
|
|
2330
2305
|
this.useContent = {
|
|
2331
2306
|
...this.useContent,
|
|
2332
2307
|
...e,
|
|
@@ -2337,7 +2312,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2337
2312
|
meta: {
|
|
2338
2313
|
...(t = this.useContent) == null ? void 0 : t.meta,
|
|
2339
2314
|
...e == null ? void 0 : e.meta,
|
|
2340
|
-
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((
|
|
2315
|
+
breakpoints: ((o = e == null ? void 0 : e.meta) == null ? void 0 : o.breakpoints) || ((i = (s = this.useContent) == null ? void 0 : s.meta) == null ? void 0 : i.breakpoints)
|
|
2341
2316
|
}
|
|
2342
2317
|
};
|
|
2343
2318
|
},
|
|
@@ -2360,15 +2335,15 @@ const vn = (e, n, t = !0) => {
|
|
|
2360
2335
|
if (n)
|
|
2361
2336
|
switch (n.type) {
|
|
2362
2337
|
case "builder.configureSdk": {
|
|
2363
|
-
const o = n.data, { breakpoints:
|
|
2364
|
-
if (!
|
|
2338
|
+
const o = n.data, { breakpoints: s, contentId: i } = o;
|
|
2339
|
+
if (!i || i !== ((t = this.useContent) == null ? void 0 : t.id))
|
|
2365
2340
|
return;
|
|
2366
|
-
|
|
2341
|
+
s && this.setBreakpoints(s), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
2367
2342
|
break;
|
|
2368
2343
|
}
|
|
2369
2344
|
case "builder.contentUpdate": {
|
|
2370
|
-
const o = n.data,
|
|
2371
|
-
|
|
2345
|
+
const o = n.data, s = o.key || o.alias || o.entry || o.modelName, i = o.data;
|
|
2346
|
+
s === this.model && (this.mergeNewContent(i), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
2372
2347
|
break;
|
|
2373
2348
|
}
|
|
2374
2349
|
}
|
|
@@ -2376,7 +2351,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2376
2351
|
evaluateJsCode() {
|
|
2377
2352
|
var n, t;
|
|
2378
2353
|
const e = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.jsCode;
|
|
2379
|
-
e &&
|
|
2354
|
+
e && z({
|
|
2380
2355
|
code: e,
|
|
2381
2356
|
context: this.context || {},
|
|
2382
2357
|
state: this.contentState
|
|
@@ -2385,14 +2360,14 @@ const vn = (e, n, t = !0) => {
|
|
|
2385
2360
|
onClick(e) {
|
|
2386
2361
|
var n, t;
|
|
2387
2362
|
if (this.useContent) {
|
|
2388
|
-
const o = (n = this.useContent) == null ? void 0 : n.testVariationId,
|
|
2389
|
-
|
|
2363
|
+
const o = (n = this.useContent) == null ? void 0 : n.testVariationId, s = (t = this.useContent) == null ? void 0 : t.id;
|
|
2364
|
+
U({
|
|
2390
2365
|
type: "click",
|
|
2391
2366
|
canTrack: this.canTrackToUse,
|
|
2392
|
-
contentId:
|
|
2367
|
+
contentId: s,
|
|
2393
2368
|
apiKey: this.apiKey,
|
|
2394
|
-
variationId: o !==
|
|
2395
|
-
...
|
|
2369
|
+
variationId: o !== s ? o : void 0,
|
|
2370
|
+
...yn(e),
|
|
2396
2371
|
unique: !this.clicked
|
|
2397
2372
|
});
|
|
2398
2373
|
}
|
|
@@ -2401,7 +2376,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2401
2376
|
evalExpression(e) {
|
|
2402
2377
|
return e.replace(
|
|
2403
2378
|
/{{([^}]+)}}/g,
|
|
2404
|
-
(n, t) =>
|
|
2379
|
+
(n, t) => z({
|
|
2405
2380
|
code: t,
|
|
2406
2381
|
context: this.context || {},
|
|
2407
2382
|
state: this.contentState
|
|
@@ -2409,7 +2384,7 @@ const vn = (e, n, t = !0) => {
|
|
|
2409
2384
|
);
|
|
2410
2385
|
},
|
|
2411
2386
|
handleRequest({ url: e, key: n }) {
|
|
2412
|
-
|
|
2387
|
+
ee(e).then((t) => t.json()).then((t) => {
|
|
2413
2388
|
const o = {
|
|
2414
2389
|
...this.contentState,
|
|
2415
2390
|
[n]: t
|
|
@@ -2422,12 +2397,12 @@ const vn = (e, n, t = !0) => {
|
|
|
2422
2397
|
runHttpRequests() {
|
|
2423
2398
|
var n, t, o;
|
|
2424
2399
|
const e = (o = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.httpRequests) != null ? o : {};
|
|
2425
|
-
Object.entries(e).forEach(([
|
|
2426
|
-
if (
|
|
2427
|
-
const
|
|
2400
|
+
Object.entries(e).forEach(([s, i]) => {
|
|
2401
|
+
if (i && (!this.httpReqsData[s] || v())) {
|
|
2402
|
+
const r = this.evalExpression(i);
|
|
2428
2403
|
this.handleRequest({
|
|
2429
|
-
url:
|
|
2430
|
-
key:
|
|
2404
|
+
url: r,
|
|
2405
|
+
key: s
|
|
2431
2406
|
});
|
|
2432
2407
|
}
|
|
2433
2408
|
});
|
|
@@ -2445,76 +2420,74 @@ const vn = (e, n, t = !0) => {
|
|
|
2445
2420
|
);
|
|
2446
2421
|
}
|
|
2447
2422
|
}
|
|
2448
|
-
},
|
|
2449
|
-
function
|
|
2450
|
-
var a, l, u, g, f, b,
|
|
2451
|
-
const
|
|
2452
|
-
return
|
|
2423
|
+
}, wn = ["builder-content-id", "builder-model"];
|
|
2424
|
+
function Cn(e, n, t, o, s, i) {
|
|
2425
|
+
var a, l, u, g, f, b, w, M;
|
|
2426
|
+
const r = k("render-content-styles"), c = k("render-blocks");
|
|
2427
|
+
return s.useContent ? (d(), m("div", {
|
|
2453
2428
|
key: 0,
|
|
2454
2429
|
ref: "elementRef",
|
|
2455
|
-
onClick: n[0] || (n[0] = (
|
|
2456
|
-
"builder-content-id": (a =
|
|
2430
|
+
onClick: n[0] || (n[0] = (ue) => i.onClick(ue)),
|
|
2431
|
+
"builder-content-id": (a = s.useContent) == null ? void 0 : a.id,
|
|
2457
2432
|
"builder-model": t.model
|
|
2458
2433
|
}, [
|
|
2459
|
-
|
|
2434
|
+
s.TARGET !== "reactNative" ? (d(), T(r, {
|
|
2460
2435
|
key: 0,
|
|
2461
|
-
contentId: (l =
|
|
2462
|
-
cssCode: (g = (u =
|
|
2463
|
-
customFonts: (b = (f =
|
|
2436
|
+
contentId: (l = s.useContent) == null ? void 0 : l.id,
|
|
2437
|
+
cssCode: (g = (u = s.useContent) == null ? void 0 : u.data) == null ? void 0 : g.cssCode,
|
|
2438
|
+
customFonts: (b = (f = s.useContent) == null ? void 0 : f.data) == null ? void 0 : b.customFonts
|
|
2464
2439
|
}, null, 8, ["contentId", "cssCode", "customFonts"])) : y("", !0),
|
|
2465
|
-
(d(),
|
|
2466
|
-
blocks: (
|
|
2467
|
-
key:
|
|
2440
|
+
(d(), T(c, {
|
|
2441
|
+
blocks: (M = (w = s.useContent) == null ? void 0 : w.data) == null ? void 0 : M.blocks,
|
|
2442
|
+
key: s.forceReRenderCount
|
|
2468
2443
|
}, null, 8, ["blocks"]))
|
|
2469
|
-
], 8,
|
|
2444
|
+
], 8, wn)) : y("", !0);
|
|
2470
2445
|
}
|
|
2471
|
-
const
|
|
2446
|
+
const In = /* @__PURE__ */ h(_n, [["render", Cn]]), Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2472
2447
|
__proto__: null,
|
|
2473
|
-
default:
|
|
2474
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2475
|
-
function
|
|
2448
|
+
default: In
|
|
2449
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = {};
|
|
2450
|
+
function Vn(e) {
|
|
2476
2451
|
if (p()) {
|
|
2477
|
-
Object.assign(
|
|
2452
|
+
Object.assign(Y, e);
|
|
2478
2453
|
const n = {
|
|
2479
2454
|
type: "builder.settingsChange",
|
|
2480
|
-
data:
|
|
2455
|
+
data: Y
|
|
2481
2456
|
};
|
|
2482
2457
|
parent.postMessage(n, "*");
|
|
2483
2458
|
}
|
|
2484
2459
|
}
|
|
2485
2460
|
export {
|
|
2486
2461
|
V as B,
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2462
|
+
Se as C,
|
|
2463
|
+
Ce as F,
|
|
2464
|
+
Be as I,
|
|
2465
|
+
Ge as S,
|
|
2466
|
+
R as T,
|
|
2467
|
+
Et as V,
|
|
2493
2468
|
h as _,
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2469
|
+
En as a,
|
|
2470
|
+
fe as b,
|
|
2471
|
+
_ as c,
|
|
2472
|
+
In as d,
|
|
2473
|
+
z as e,
|
|
2499
2474
|
W as f,
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
ft as y,
|
|
2519
|
-
re as z
|
|
2475
|
+
ge as g,
|
|
2476
|
+
vt as h,
|
|
2477
|
+
wt as i,
|
|
2478
|
+
v as j,
|
|
2479
|
+
Gt as k,
|
|
2480
|
+
re as l,
|
|
2481
|
+
An as m,
|
|
2482
|
+
Jt as n,
|
|
2483
|
+
pn as o,
|
|
2484
|
+
se as p,
|
|
2485
|
+
ht as q,
|
|
2486
|
+
Le as r,
|
|
2487
|
+
Vn as s,
|
|
2488
|
+
jn as t,
|
|
2489
|
+
dt as u,
|
|
2490
|
+
ut as v,
|
|
2491
|
+
mt as w,
|
|
2492
|
+
ie as x
|
|
2520
2493
|
};
|