@builder.io/sdk-vue 0.2.3 → 0.3.1
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 +2 -5
- package/packages/_vue2/dist/block-styles.ae2c8895.cjs +1 -0
- package/packages/_vue2/dist/block-styles.b09f50da.js +75 -0
- package/packages/_vue2/dist/css.e6670a83.cjs +6 -0
- package/packages/_vue2/dist/css.fb10bcf8.js +74 -0
- package/packages/_vue2/dist/{index.6a9eec41.js → index.36f3710d.js} +185 -157
- package/packages/_vue2/dist/index.ae3f58f8.cjs +29 -0
- package/packages/_vue2/dist/render-block.74bc834e.cjs +3 -0
- package/packages/_vue2/dist/{render-block.4c7d7ca1.js → render-block.c14ab4be.js} +92 -87
- package/packages/_vue2/dist/{render-component.90275cfa.cjs → render-component.2b74ef23.cjs} +1 -1
- package/packages/_vue2/dist/{render-component.84d45798.js → render-component.d7f78e3d.js} +3 -3
- package/packages/_vue2/dist/{render-inlined-styles.1fa49816.js → render-inlined-styles.04d09a3c.js} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.1999f52e.cjs → render-inlined-styles.c8d80bc4.cjs} +1 -1
- package/packages/_vue2/dist/render-repeated-block.58333f68.cjs +1 -0
- package/packages/_vue2/dist/{render-repeated-block.900e2543.js → render-repeated-block.a8717618.js} +13 -12
- package/packages/_vue2/dist/{render-styles.15b8cdf0.cjs → render-styles.4a1edc25.cjs} +2 -2
- package/packages/_vue2/dist/{render-styles.591ca7be.js → render-styles.a49c2339.js} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue2/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue2/dist/src/context/types.d.ts +17 -2
- package/packages/_vue2/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.a1577ff9.cjs +1 -0
- package/packages/_vue3/dist/{block-styles.f06f105b.js → block-styles.ae0db517.js} +19 -17
- package/packages/_vue3/dist/css.c52c28f5.js +74 -0
- package/packages/_vue3/dist/css.eaf664fa.cjs +6 -0
- package/packages/_vue3/dist/index.8ed3c046.cjs +29 -0
- package/packages/_vue3/dist/{index.0aed90df.js → index.d8d44f06.js} +184 -156
- package/packages/_vue3/dist/render-block.8f200c30.cjs +3 -0
- package/packages/_vue3/dist/render-block.c70eab34.js +285 -0
- package/packages/_vue3/dist/{render-component.0a7c094b.cjs → render-component.023d5d67.cjs} +1 -1
- package/packages/_vue3/dist/{render-component.b4a311b8.js → render-component.9b027ad2.js} +3 -3
- package/packages/_vue3/dist/{render-inlined-styles.454bc38b.js → render-inlined-styles.0b6cafc4.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.a596482a.cjs → render-inlined-styles.e3ea32fb.cjs} +1 -1
- package/packages/_vue3/dist/render-repeated-block.1743f160.cjs +1 -0
- package/packages/_vue3/dist/{render-repeated-block.12894c71.js → render-repeated-block.1b229997.js} +12 -11
- package/packages/_vue3/dist/{render-styles.b6bf070d.cjs → render-styles.70e1b259.cjs} +2 -2
- package/packages/_vue3/dist/{render-styles.90b25836.js → render-styles.f8cb298d.js} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -0
- package/packages/_vue3/dist/src/context/builder.context.d.ts +3 -2
- package/packages/_vue3/dist/src/context/types.d.ts +17 -2
- package/packages/_vue3/dist/src/functions/evaluate.d.ts +4 -3
- package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +2 -2
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.5729b057.js +0 -73
- package/packages/_vue2/dist/block-styles.cb3c2dd0.cjs +0 -1
- package/packages/_vue2/dist/css.2efa95fa.cjs +0 -6
- package/packages/_vue2/dist/css.a54ddc90.js +0 -58
- package/packages/_vue2/dist/index.8547cce2.cjs +0 -29
- package/packages/_vue2/dist/render-block.753d2325.cjs +0 -3
- package/packages/_vue2/dist/render-repeated-block.f522a309.cjs +0 -1
- package/packages/_vue3/dist/block-styles.56f7b28a.cjs +0 -1
- package/packages/_vue3/dist/css.2ff361fc.js +0 -58
- package/packages/_vue3/dist/css.f83437ab.cjs +0 -6
- package/packages/_vue3/dist/index.d72bde22.cjs +0 -29
- package/packages/_vue3/dist/render-block.4e95bb8d.cjs +0 -3
- package/packages/_vue3/dist/render-block.905bcce5.js +0 -280
- package/packages/_vue3/dist/render-repeated-block.a95715ec.cjs +0 -1
|
@@ -29,27 +29,27 @@ const Y = f({
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
function h(t, e, n, o, s, r, i,
|
|
32
|
+
function h(t, e, n, o, s, r, i, c) {
|
|
33
33
|
var a = typeof t == "function" ? t.options : t;
|
|
34
34
|
e && (a.render = e, a.staticRenderFns = n, a._compiled = !0), o && (a.functional = !0), r && (a._scopeId = "data-v-" + r);
|
|
35
|
-
var
|
|
36
|
-
if (i ? (
|
|
35
|
+
var l;
|
|
36
|
+
if (i ? (l = function(u) {
|
|
37
37
|
u = u || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !u && typeof __VUE_SSR_CONTEXT__ < "u" && (u = __VUE_SSR_CONTEXT__), s && s.call(this, u), u && u._registeredComponents && u._registeredComponents.add(i);
|
|
38
|
-
}, a._ssrRegister =
|
|
38
|
+
}, a._ssrRegister = l) : s && (l = c ? function() {
|
|
39
39
|
s.call(
|
|
40
40
|
this,
|
|
41
41
|
(a.functional ? this.parent : this).$root.$options.shadowRoot
|
|
42
42
|
);
|
|
43
|
-
} : s),
|
|
43
|
+
} : s), l)
|
|
44
44
|
if (a.functional) {
|
|
45
|
-
a._injectStyles =
|
|
45
|
+
a._injectStyles = l;
|
|
46
46
|
var d = a.render;
|
|
47
47
|
a.render = function(g, _) {
|
|
48
|
-
return
|
|
48
|
+
return l.call(_), d(g, _);
|
|
49
49
|
};
|
|
50
50
|
} else {
|
|
51
51
|
var m = a.beforeCreate;
|
|
52
|
-
a.beforeCreate = m ? [].concat(m,
|
|
52
|
+
a.beforeCreate = m ? [].concat(m, l) : [l];
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
55
|
exports: t,
|
|
@@ -87,7 +87,7 @@ const te = ee.exports, T = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
87
87
|
default: 991,
|
|
88
88
|
max: 1200
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, Pn = (t, e = B) => `@media (max-width: ${e[t].max}px)`, ne = ({ small: t, medium: e }) => {
|
|
91
91
|
const n = T(B);
|
|
92
92
|
if (!t || !e)
|
|
93
93
|
return n;
|
|
@@ -113,9 +113,10 @@ const te = ee.exports, T = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
113
113
|
Builder: {
|
|
114
114
|
content: null,
|
|
115
115
|
context: {},
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
localState: void 0,
|
|
117
|
+
rootSetState() {
|
|
118
118
|
},
|
|
119
|
+
rootState: {},
|
|
119
120
|
apiKey: null,
|
|
120
121
|
apiVersion: void 0,
|
|
121
122
|
registeredComponents: {},
|
|
@@ -127,7 +128,7 @@ const te = ee.exports, T = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
127
128
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
128
129
|
t
|
|
129
130
|
), t;
|
|
130
|
-
}), re = () => import("./render-inlined-styles.
|
|
131
|
+
}), re = () => import("./render-inlined-styles.04d09a3c.js").then((t) => t.default).catch((t) => {
|
|
131
132
|
throw console.error(
|
|
132
133
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
133
134
|
t
|
|
@@ -217,26 +218,25 @@ const te = ee.exports, T = (t) => JSON.parse(JSON.stringify(t)), B = {
|
|
|
217
218
|
return this.stackAt === "never" ? e : t;
|
|
218
219
|
},
|
|
219
220
|
columnCssVars(t) {
|
|
220
|
-
t === 0
|
|
221
|
-
const e = this.getColumnCssWidth(t), n = `${this.gutterSize}px`, o = "100%", s = 0;
|
|
221
|
+
const e = t === 0 ? 0 : this.gutterSize, n = this.getColumnCssWidth(t), o = `${e}px`, s = "100%", r = 0;
|
|
222
222
|
return {
|
|
223
|
-
width:
|
|
224
|
-
"margin-left":
|
|
223
|
+
width: n,
|
|
224
|
+
"margin-left": o,
|
|
225
225
|
"--column-width-mobile": this.getMobileStyle({
|
|
226
|
-
stackedStyle: o,
|
|
227
|
-
desktopStyle: e
|
|
228
|
-
}),
|
|
229
|
-
"--column-margin-left-mobile": this.getMobileStyle({
|
|
230
226
|
stackedStyle: s,
|
|
231
227
|
desktopStyle: n
|
|
232
228
|
}),
|
|
233
|
-
"--column-
|
|
234
|
-
stackedStyle:
|
|
235
|
-
desktopStyle:
|
|
229
|
+
"--column-margin-left-mobile": this.getMobileStyle({
|
|
230
|
+
stackedStyle: r,
|
|
231
|
+
desktopStyle: o
|
|
236
232
|
}),
|
|
237
|
-
"--column-
|
|
233
|
+
"--column-width-tablet": this.getTabletStyle({
|
|
238
234
|
stackedStyle: s,
|
|
239
235
|
desktopStyle: n
|
|
236
|
+
}),
|
|
237
|
+
"--column-margin-left-tablet": this.getTabletStyle({
|
|
238
|
+
stackedStyle: r,
|
|
239
|
+
desktopStyle: o
|
|
240
240
|
})
|
|
241
241
|
};
|
|
242
242
|
},
|
|
@@ -276,7 +276,7 @@ var ae = function() {
|
|
|
276
276
|
le,
|
|
277
277
|
!1,
|
|
278
278
|
null,
|
|
279
|
-
"
|
|
279
|
+
"1cba7386",
|
|
280
280
|
null,
|
|
281
281
|
null
|
|
282
282
|
);
|
|
@@ -418,12 +418,12 @@ function Se() {
|
|
|
418
418
|
function b() {
|
|
419
419
|
return Se() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
420
420
|
}
|
|
421
|
-
const we = () => import("./block-styles.
|
|
421
|
+
const we = () => import("./block-styles.b09f50da.js").then((t) => t.default).catch((t) => {
|
|
422
422
|
throw console.error(
|
|
423
423
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
424
424
|
t
|
|
425
425
|
), t;
|
|
426
|
-
}), Ce = () => import("./render-block.
|
|
426
|
+
}), Ce = () => import("./render-block.c14ab4be.js").then((t) => t.default).catch((t) => {
|
|
427
427
|
throw console.error(
|
|
428
428
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
429
429
|
t
|
|
@@ -742,7 +742,7 @@ const Ee = $e.exports, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
742
742
|
(s) => s.get("width")
|
|
743
743
|
) && (!!n.find(
|
|
744
744
|
(r) => !r.get("width")
|
|
745
|
-
) || n.reduce((
|
|
745
|
+
) || n.reduce((c, a) => c + a.get("width"), 0) !== 100) && e();
|
|
746
746
|
})
|
|
747
747
|
},
|
|
748
748
|
{
|
|
@@ -796,17 +796,17 @@ const Ee = $e.exports, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
796
796
|
onChange: S(
|
|
797
797
|
(t) => {
|
|
798
798
|
t.delete("srcset"), t.delete("noWebp");
|
|
799
|
-
function n(i,
|
|
800
|
-
return new Promise((a,
|
|
799
|
+
function n(i, c = 6e4) {
|
|
800
|
+
return new Promise((a, l) => {
|
|
801
801
|
const d = document.createElement("img");
|
|
802
802
|
let m = !1;
|
|
803
803
|
d.onload = () => {
|
|
804
804
|
m = !0, a(d);
|
|
805
805
|
}, d.addEventListener("error", (u) => {
|
|
806
|
-
console.warn("Image load failed", u.error),
|
|
806
|
+
console.warn("Image load failed", u.error), l(u.error);
|
|
807
807
|
}), d.src = i, setTimeout(() => {
|
|
808
|
-
m ||
|
|
809
|
-
},
|
|
808
|
+
m || l(new Error("Image load timed out"));
|
|
809
|
+
}, c);
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
812
|
function o(i) {
|
|
@@ -817,8 +817,8 @@ const Ee = $e.exports, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
|
|
|
817
817
|
i.type.includes("svg") && t.set("noWebp", !0);
|
|
818
818
|
}), s && (!r || r === 0.7041))
|
|
819
819
|
return n(s).then((i) => {
|
|
820
|
-
const
|
|
821
|
-
t.get("image") === s && (!
|
|
820
|
+
const c = t.get("aspectRatio");
|
|
821
|
+
t.get("image") === s && (!c || c === 0.7041) && i.width && i.height && (t.set("aspectRatio", o(i.height / i.width)), t.set("height", i.height), t.set("width", i.width));
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
824
|
)
|
|
@@ -1036,7 +1036,7 @@ const Me = We.exports, Ne = {
|
|
|
1036
1036
|
function Le() {
|
|
1037
1037
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1039
|
+
function Ke() {
|
|
1040
1040
|
const t = Le().fetch;
|
|
1041
1041
|
if (typeof t > "u")
|
|
1042
1042
|
throw console.warn(
|
|
@@ -1045,7 +1045,7 @@ function ze() {
|
|
|
1045
1045
|
), new Error("Builder SDK could not find a global `fetch` function");
|
|
1046
1046
|
return t;
|
|
1047
1047
|
}
|
|
1048
|
-
const M =
|
|
1048
|
+
const M = Ke(), v = (t) => t != null, ze = (t) => {
|
|
1049
1049
|
if (t === "localhost" || t === "127.0.0.1")
|
|
1050
1050
|
return t;
|
|
1051
1051
|
const e = t.split(".");
|
|
@@ -1061,7 +1061,7 @@ const M = ze(), v = (t) => t != null, Ke = (t) => {
|
|
|
1061
1061
|
console.debug("[COOKIE] GET error: ", o);
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
|
-
},
|
|
1064
|
+
}, De = (t) => t.map(([e, n]) => n ? `${e}=${n}` : e).filter(v).join("; "), He = [
|
|
1065
1065
|
["secure", ""],
|
|
1066
1066
|
["SameSite", "None"]
|
|
1067
1067
|
], qe = ({
|
|
@@ -1069,14 +1069,14 @@ const M = ze(), v = (t) => t != null, Ke = (t) => {
|
|
|
1069
1069
|
value: e,
|
|
1070
1070
|
expires: n
|
|
1071
1071
|
}) => {
|
|
1072
|
-
const s = (p() ? location.protocol === "https:" : !0) ?
|
|
1072
|
+
const s = (p() ? location.protocol === "https:" : !0) ? He : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [
|
|
1073
1073
|
[t, e],
|
|
1074
1074
|
...r,
|
|
1075
1075
|
["path", "/"],
|
|
1076
|
-
["domain",
|
|
1076
|
+
["domain", ze(window.location.hostname)],
|
|
1077
1077
|
...s
|
|
1078
1078
|
];
|
|
1079
|
-
return
|
|
1079
|
+
return De(i);
|
|
1080
1080
|
}, L = async ({
|
|
1081
1081
|
name: t,
|
|
1082
1082
|
value: e,
|
|
@@ -1091,14 +1091,14 @@ const M = ze(), v = (t) => t != null, Ke = (t) => {
|
|
|
1091
1091
|
} catch (s) {
|
|
1092
1092
|
console.warn("[COOKIE] SET error: ", s);
|
|
1093
1093
|
}
|
|
1094
|
-
}, Ge = "builderio.variations",
|
|
1094
|
+
}, Ge = "builderio.variations", K = (t) => `${Ge}.${t}`, Je = ({
|
|
1095
1095
|
contentId: t,
|
|
1096
1096
|
canTrack: e
|
|
1097
|
-
}) => N({ name:
|
|
1097
|
+
}) => N({ name: K(t), canTrack: e }), Xe = ({
|
|
1098
1098
|
contentId: t,
|
|
1099
1099
|
canTrack: e,
|
|
1100
1100
|
value: n
|
|
1101
|
-
}) => L({ name:
|
|
1101
|
+
}) => L({ name: K(t), value: n, canTrack: e }), Ye = (t) => v(t.id) && v(t.variations) && Object.keys(t.variations).length > 0, Qe = ({
|
|
1102
1102
|
id: t,
|
|
1103
1103
|
variations: e
|
|
1104
1104
|
}) => {
|
|
@@ -1174,7 +1174,7 @@ const P = "builder.", tt = "options.", nt = (t) => {
|
|
|
1174
1174
|
}, ot = (t) => {
|
|
1175
1175
|
if (!t)
|
|
1176
1176
|
return {};
|
|
1177
|
-
const e =
|
|
1177
|
+
const e = z(t), n = {};
|
|
1178
1178
|
return Object.keys(e).forEach((o) => {
|
|
1179
1179
|
if (o.startsWith(P)) {
|
|
1180
1180
|
const s = o.replace(P, "").replace(tt, "");
|
|
@@ -1186,7 +1186,7 @@ const P = "builder.", tt = "options.", nt = (t) => {
|
|
|
1186
1186
|
return {};
|
|
1187
1187
|
const t = new URLSearchParams(window.location.search);
|
|
1188
1188
|
return ot(t);
|
|
1189
|
-
},
|
|
1189
|
+
}, z = (t) => t instanceof URLSearchParams ? nt(t) : t, rt = "v3", it = (t) => {
|
|
1190
1190
|
const {
|
|
1191
1191
|
limit: e = 30,
|
|
1192
1192
|
userAttributes: n,
|
|
@@ -1194,21 +1194,21 @@ const P = "builder.", tt = "options.", nt = (t) => {
|
|
|
1194
1194
|
noTraverse: s = !1,
|
|
1195
1195
|
model: r,
|
|
1196
1196
|
apiKey: i,
|
|
1197
|
-
includeRefs:
|
|
1197
|
+
includeRefs: c = !0,
|
|
1198
1198
|
locale: a,
|
|
1199
|
-
apiVersion:
|
|
1199
|
+
apiVersion: l = rt
|
|
1200
1200
|
} = t;
|
|
1201
1201
|
if (!i)
|
|
1202
1202
|
throw new Error("Missing API key");
|
|
1203
|
-
if (!["v2", "v3"].includes(
|
|
1203
|
+
if (!["v2", "v3"].includes(l))
|
|
1204
1204
|
throw new Error(
|
|
1205
|
-
`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1205
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${l}'`
|
|
1206
1206
|
);
|
|
1207
1207
|
const d = new URL(
|
|
1208
|
-
`https://cdn.builder.io/api/${
|
|
1208
|
+
`https://cdn.builder.io/api/${l}/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${c}${a ? `&locale=${a}` : ""}`
|
|
1209
1209
|
), m = {
|
|
1210
1210
|
...st(),
|
|
1211
|
-
...
|
|
1211
|
+
...z(t.options || {})
|
|
1212
1212
|
}, u = I(m);
|
|
1213
1213
|
for (const g in u)
|
|
1214
1214
|
d.searchParams.set(g, String(u[g]));
|
|
@@ -1219,7 +1219,7 @@ const P = "builder.", tt = "options.", nt = (t) => {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
return d;
|
|
1221
1221
|
};
|
|
1222
|
-
async function
|
|
1222
|
+
async function D(t) {
|
|
1223
1223
|
const e = await at({ ...t, limit: 1 });
|
|
1224
1224
|
return e && "results" in e && (e == null ? void 0 : e.results[0]) || null;
|
|
1225
1225
|
}
|
|
@@ -1241,7 +1241,7 @@ async function at(t) {
|
|
|
1241
1241
|
return y.error("Error fetching data. ", e), null;
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
const lt = () => Promise.resolve().then(() =>
|
|
1244
|
+
const lt = () => Promise.resolve().then(() => $n).then((t) => t.default).catch((t) => {
|
|
1245
1245
|
throw console.error(
|
|
1246
1246
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
1247
1247
|
t
|
|
@@ -1286,7 +1286,7 @@ const lt = () => Promise.resolve().then(() => Rn).then((t) => t.default).catch((
|
|
|
1286
1286
|
methods: {
|
|
1287
1287
|
fetchContent() {
|
|
1288
1288
|
var t, e;
|
|
1289
|
-
!this.contentToUse && ((t = this.symbol) == null ? void 0 : t.model) && ((e = this.builderContext) == null ? void 0 : e.apiKey) &&
|
|
1289
|
+
!this.contentToUse && ((t = this.symbol) == null ? void 0 : t.model) && ((e = this.builderContext) == null ? void 0 : e.apiKey) && D({
|
|
1290
1290
|
model: this.symbol.model,
|
|
1291
1291
|
apiKey: this.builderContext.apiKey,
|
|
1292
1292
|
apiVersion: this.builderContext.apiVersion,
|
|
@@ -1332,7 +1332,7 @@ var dt = function() {
|
|
|
1332
1332
|
class: e.className
|
|
1333
1333
|
} } }, "div", e.filterAttrs(e.attributes, !1), !1), e.filterAttrs(e.attributes, !0)), [n("render-content", { attrs: { apiVersion: e.builderContext.apiVersion, apiKey: e.builderContext.apiKey, context: e.builderContext.context, customComponents: Object.values(e.builderContext.registeredComponents), data: {
|
|
1334
1334
|
...(o = e.symbol) == null ? void 0 : o.data,
|
|
1335
|
-
...e.builderContext.
|
|
1335
|
+
...e.builderContext.localState,
|
|
1336
1336
|
...(r = (s = e.contentToUse) == null ? void 0 : s.data) == null ? void 0 : r.state
|
|
1337
1337
|
}, model: (i = e.symbol) == null ? void 0 : i.model, content: e.contentToUse } })], 1);
|
|
1338
1338
|
}, ut = [], pt = /* @__PURE__ */ h(
|
|
@@ -1757,7 +1757,7 @@ var Nt = function() {
|
|
|
1757
1757
|
return e._self._setupProxy, n("div", { ref: "elem", class: e._classStringToObject(
|
|
1758
1758
|
"builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")
|
|
1759
1759
|
), domProps: { innerHTML: e._s(e.code) } });
|
|
1760
|
-
}, Lt = [],
|
|
1760
|
+
}, Lt = [], Kt = /* @__PURE__ */ h(
|
|
1761
1761
|
Mt,
|
|
1762
1762
|
Nt,
|
|
1763
1763
|
Lt,
|
|
@@ -1767,7 +1767,7 @@ var Nt = function() {
|
|
|
1767
1767
|
null,
|
|
1768
1768
|
null
|
|
1769
1769
|
);
|
|
1770
|
-
const
|
|
1770
|
+
const zt = Kt.exports, Dt = {
|
|
1771
1771
|
name: "Custom Code",
|
|
1772
1772
|
static: !0,
|
|
1773
1773
|
requiredPermissions: ["editCode"],
|
|
@@ -1793,10 +1793,10 @@ const Kt = zt.exports, Ht = {
|
|
|
1793
1793
|
advanced: !0
|
|
1794
1794
|
}
|
|
1795
1795
|
]
|
|
1796
|
-
},
|
|
1796
|
+
}, Ht = () => [
|
|
1797
1797
|
{ component: te, ...Pe },
|
|
1798
1798
|
{ component: de, ...Ae },
|
|
1799
|
-
{ component:
|
|
1799
|
+
{ component: zt, ...Dt },
|
|
1800
1800
|
{ component: Ft, ...It },
|
|
1801
1801
|
{ component: he, ...Fe },
|
|
1802
1802
|
{ component: ke, ...je },
|
|
@@ -1809,19 +1809,21 @@ const Kt = zt.exports, Ht = {
|
|
|
1809
1809
|
function A({
|
|
1810
1810
|
code: t,
|
|
1811
1811
|
context: e,
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1812
|
+
localState: n,
|
|
1813
|
+
rootState: o,
|
|
1814
|
+
rootSetState: s,
|
|
1815
|
+
event: r,
|
|
1816
|
+
isExpression: i = !0
|
|
1815
1817
|
}) {
|
|
1816
1818
|
if (t === "") {
|
|
1817
1819
|
console.warn("Skipping evaluation of empty code block.");
|
|
1818
1820
|
return;
|
|
1819
1821
|
}
|
|
1820
|
-
const
|
|
1822
|
+
const c = {
|
|
1821
1823
|
isEditing: b(),
|
|
1822
1824
|
isBrowser: p(),
|
|
1823
1825
|
isServer: !p()
|
|
1824
|
-
}, l =
|
|
1826
|
+
}, l = i && !(t.includes(";") || t.includes(" return ") || t.trim().startsWith("return ")) ? `return (${t});` : t;
|
|
1825
1827
|
try {
|
|
1826
1828
|
return new Function(
|
|
1827
1829
|
"builder",
|
|
@@ -1830,8 +1832,14 @@ function A({
|
|
|
1830
1832
|
"context",
|
|
1831
1833
|
"event",
|
|
1832
1834
|
l
|
|
1833
|
-
)(
|
|
1834
|
-
|
|
1835
|
+
)(
|
|
1836
|
+
c,
|
|
1837
|
+
c,
|
|
1838
|
+
qt(o, n, s),
|
|
1839
|
+
e,
|
|
1840
|
+
r
|
|
1841
|
+
);
|
|
1842
|
+
} catch (d) {
|
|
1835
1843
|
console.warn(
|
|
1836
1844
|
`Builder custom code error:
|
|
1837
1845
|
While Evaluating:
|
|
@@ -1839,26 +1847,40 @@ function A({
|
|
|
1839
1847
|
l,
|
|
1840
1848
|
`
|
|
1841
1849
|
`,
|
|
1842
|
-
|
|
1850
|
+
d
|
|
1843
1851
|
);
|
|
1844
1852
|
}
|
|
1845
1853
|
}
|
|
1846
|
-
function qt() {
|
|
1854
|
+
function qt(t, e, n) {
|
|
1855
|
+
if (t === e)
|
|
1856
|
+
throw new Error("rootState === localState");
|
|
1857
|
+
return new Proxy(t, {
|
|
1858
|
+
get: (o, s) => e && s in e ? e[s] : t[s],
|
|
1859
|
+
set: (o, s, r) => {
|
|
1860
|
+
if (e && s in e)
|
|
1861
|
+
throw new Error(
|
|
1862
|
+
"Writing to local state is not allowed as it is read-only."
|
|
1863
|
+
);
|
|
1864
|
+
return t[s] = r, n == null || n(t), !0;
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
}
|
|
1868
|
+
function Gt() {
|
|
1847
1869
|
return !p() || b() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
|
|
1848
1870
|
}
|
|
1849
|
-
const
|
|
1850
|
-
function
|
|
1851
|
-
return
|
|
1871
|
+
const H = [];
|
|
1872
|
+
function An(t, e) {
|
|
1873
|
+
return H.push({ component: t, ...e }), console.warn(
|
|
1852
1874
|
"registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
|
|
1853
1875
|
), t;
|
|
1854
1876
|
}
|
|
1855
|
-
const
|
|
1877
|
+
const Jt = ({
|
|
1856
1878
|
component: t,
|
|
1857
1879
|
...e
|
|
1858
1880
|
}) => ({
|
|
1859
1881
|
type: "builder.registerComponent",
|
|
1860
|
-
data:
|
|
1861
|
-
}),
|
|
1882
|
+
data: Yt(e)
|
|
1883
|
+
}), Xt = (t) => typeof t == "function" ? S(t) : T(t), Yt = ({
|
|
1862
1884
|
inputs: t,
|
|
1863
1885
|
...e
|
|
1864
1886
|
}) => ({
|
|
@@ -1867,22 +1889,22 @@ const Gt = ({
|
|
|
1867
1889
|
(n) => Object.entries(n).reduce(
|
|
1868
1890
|
(o, [s, r]) => ({
|
|
1869
1891
|
...o,
|
|
1870
|
-
[s]:
|
|
1892
|
+
[s]: Xt(r)
|
|
1871
1893
|
}),
|
|
1872
1894
|
{}
|
|
1873
1895
|
)
|
|
1874
1896
|
)
|
|
1875
1897
|
});
|
|
1876
|
-
function
|
|
1898
|
+
function Qt() {
|
|
1877
1899
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
1878
1900
|
const e = Math.random() * 16 | 0;
|
|
1879
1901
|
return (t == "x" ? e : e & 3 | 8).toString(16);
|
|
1880
1902
|
});
|
|
1881
1903
|
}
|
|
1882
1904
|
function q() {
|
|
1883
|
-
return
|
|
1905
|
+
return Qt().replace(/-/g, "");
|
|
1884
1906
|
}
|
|
1885
|
-
const G = "builderSessionId",
|
|
1907
|
+
const G = "builderSessionId", Zt = async ({
|
|
1886
1908
|
canTrack: t
|
|
1887
1909
|
}) => {
|
|
1888
1910
|
if (!t)
|
|
@@ -1894,13 +1916,13 @@ const G = "builderSessionId", Qt = async ({
|
|
|
1894
1916
|
if (v(e))
|
|
1895
1917
|
return e;
|
|
1896
1918
|
{
|
|
1897
|
-
const n =
|
|
1898
|
-
return
|
|
1919
|
+
const n = en();
|
|
1920
|
+
return tn({ id: n, canTrack: t }), n;
|
|
1899
1921
|
}
|
|
1900
|
-
},
|
|
1922
|
+
}, en = () => q(), tn = ({
|
|
1901
1923
|
id: t,
|
|
1902
1924
|
canTrack: e
|
|
1903
|
-
}) => L({ name: G, value: t, canTrack: e }), J = () => p() && typeof localStorage < "u" ? localStorage : void 0,
|
|
1925
|
+
}) => L({ name: G, value: t, canTrack: e }), J = () => p() && typeof localStorage < "u" ? localStorage : void 0, nn = ({
|
|
1904
1926
|
key: t,
|
|
1905
1927
|
canTrack: e
|
|
1906
1928
|
}) => {
|
|
@@ -1911,7 +1933,7 @@ const G = "builderSessionId", Qt = async ({
|
|
|
1911
1933
|
console.debug("[LocalStorage] GET error: ", o);
|
|
1912
1934
|
return;
|
|
1913
1935
|
}
|
|
1914
|
-
},
|
|
1936
|
+
}, on = ({
|
|
1915
1937
|
key: t,
|
|
1916
1938
|
canTrack: e,
|
|
1917
1939
|
value: n
|
|
@@ -1922,34 +1944,34 @@ const G = "builderSessionId", Qt = async ({
|
|
|
1922
1944
|
} catch (s) {
|
|
1923
1945
|
console.debug("[LocalStorage] SET error: ", s);
|
|
1924
1946
|
}
|
|
1925
|
-
}, X = "builderVisitorId",
|
|
1947
|
+
}, X = "builderVisitorId", sn = ({ canTrack: t }) => {
|
|
1926
1948
|
if (!t)
|
|
1927
1949
|
return;
|
|
1928
|
-
const e =
|
|
1950
|
+
const e = nn({
|
|
1929
1951
|
key: X,
|
|
1930
1952
|
canTrack: t
|
|
1931
1953
|
});
|
|
1932
1954
|
if (v(e))
|
|
1933
1955
|
return e;
|
|
1934
1956
|
{
|
|
1935
|
-
const n =
|
|
1936
|
-
return
|
|
1957
|
+
const n = rn();
|
|
1958
|
+
return an({ id: n, canTrack: t }), n;
|
|
1937
1959
|
}
|
|
1938
|
-
},
|
|
1960
|
+
}, rn = () => q(), an = ({
|
|
1939
1961
|
id: t,
|
|
1940
1962
|
canTrack: e
|
|
1941
|
-
}) =>
|
|
1963
|
+
}) => on({
|
|
1942
1964
|
key: X,
|
|
1943
1965
|
value: t,
|
|
1944
1966
|
canTrack: e
|
|
1945
|
-
}),
|
|
1967
|
+
}), ln = () => {
|
|
1946
1968
|
if (p()) {
|
|
1947
1969
|
const t = new URL(location.href);
|
|
1948
1970
|
return t.pathname === "" && (t.pathname = "/"), t;
|
|
1949
1971
|
} else
|
|
1950
1972
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
1951
|
-
},
|
|
1952
|
-
const t =
|
|
1973
|
+
}, cn = () => typeof navigator == "object" && navigator.userAgent || "", dn = () => {
|
|
1974
|
+
const t = cn(), e = {
|
|
1953
1975
|
Android() {
|
|
1954
1976
|
return t.match(/Android/i);
|
|
1955
1977
|
},
|
|
@@ -1968,23 +1990,23 @@ const G = "builderSessionId", Qt = async ({
|
|
|
1968
1990
|
any() {
|
|
1969
1991
|
return e.Android() || e.BlackBerry() || e.iOS() || e.Opera() || e.Windows() || x === "reactNative";
|
|
1970
1992
|
}
|
|
1971
|
-
}, n = t.match(/Tablet|iPad/i), o =
|
|
1993
|
+
}, n = t.match(/Tablet|iPad/i), o = ln();
|
|
1972
1994
|
return {
|
|
1973
1995
|
urlPath: o == null ? void 0 : o.pathname,
|
|
1974
1996
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
1975
1997
|
device: n ? "tablet" : e.any() ? "mobile" : "desktop"
|
|
1976
1998
|
};
|
|
1977
|
-
},
|
|
1999
|
+
}, un = async ({
|
|
1978
2000
|
canTrack: t
|
|
1979
2001
|
}) => {
|
|
1980
2002
|
if (!t)
|
|
1981
2003
|
return { visitorId: void 0, sessionId: void 0 };
|
|
1982
|
-
const e = await
|
|
2004
|
+
const e = await Zt({ canTrack: t }), n = sn({ canTrack: t });
|
|
1983
2005
|
return {
|
|
1984
2006
|
sessionId: e,
|
|
1985
2007
|
visitorId: n
|
|
1986
2008
|
};
|
|
1987
|
-
},
|
|
2009
|
+
}, pn = async ({
|
|
1988
2010
|
type: t,
|
|
1989
2011
|
canTrack: e,
|
|
1990
2012
|
apiKey: n,
|
|
@@ -1998,8 +2020,8 @@ const G = "builderSessionId", Qt = async ({
|
|
|
1998
2020
|
url: location.href,
|
|
1999
2021
|
...o
|
|
2000
2022
|
},
|
|
2001
|
-
...await
|
|
2002
|
-
userAttributes:
|
|
2023
|
+
...await un({ canTrack: e }),
|
|
2024
|
+
userAttributes: dn(),
|
|
2003
2025
|
ownerId: n
|
|
2004
2026
|
}
|
|
2005
2027
|
});
|
|
@@ -2014,7 +2036,7 @@ async function R(t) {
|
|
|
2014
2036
|
return fetch("https://builder.io/api/v1/track", {
|
|
2015
2037
|
method: "POST",
|
|
2016
2038
|
body: JSON.stringify({
|
|
2017
|
-
events: [await
|
|
2039
|
+
events: [await pn(t)]
|
|
2018
2040
|
}),
|
|
2019
2041
|
headers: {
|
|
2020
2042
|
"content-type": "application/json"
|
|
@@ -2024,8 +2046,8 @@ async function R(t) {
|
|
|
2024
2046
|
console.error("Failed to track: ", e);
|
|
2025
2047
|
});
|
|
2026
2048
|
}
|
|
2027
|
-
const
|
|
2028
|
-
function
|
|
2049
|
+
const Fn = (t) => R({ ...t, canTrack: !0 }), mn = "0.3.1", F = {};
|
|
2050
|
+
function fn(t, e) {
|
|
2029
2051
|
let n = F[t];
|
|
2030
2052
|
if (n || (n = F[t] = []), n.push(e), p()) {
|
|
2031
2053
|
const o = {
|
|
@@ -2042,8 +2064,8 @@ function pn(t, e) {
|
|
|
2042
2064
|
}
|
|
2043
2065
|
}
|
|
2044
2066
|
}
|
|
2045
|
-
const
|
|
2046
|
-
|
|
2067
|
+
const hn = () => {
|
|
2068
|
+
fn("insertMenu", {
|
|
2047
2069
|
name: "_default",
|
|
2048
2070
|
default: !0,
|
|
2049
2071
|
items: [
|
|
@@ -2059,13 +2081,14 @@ const mn = () => {
|
|
|
2059
2081
|
});
|
|
2060
2082
|
};
|
|
2061
2083
|
let j = !1;
|
|
2062
|
-
const
|
|
2084
|
+
const gn = (t = {}) => {
|
|
2063
2085
|
var e, n;
|
|
2064
2086
|
j || (j = !0, p() && ((e = window.parent) == null || e.postMessage(
|
|
2065
2087
|
{
|
|
2066
2088
|
type: "builder.sdkInfo",
|
|
2067
2089
|
data: {
|
|
2068
2090
|
target: x,
|
|
2091
|
+
version: mn,
|
|
2069
2092
|
supportsPatchUpdates: !1,
|
|
2070
2093
|
supportsAddBlockScoping: !0,
|
|
2071
2094
|
supportsCustomBreakpoints: !0
|
|
@@ -2085,10 +2108,10 @@ const fn = (t = {}) => {
|
|
|
2085
2108
|
if (!!(o != null && o.type))
|
|
2086
2109
|
switch (o.type) {
|
|
2087
2110
|
case "builder.evaluate": {
|
|
2088
|
-
const i = o.data.text,
|
|
2111
|
+
const i = o.data.text, c = o.data.arguments || [], a = o.data.id, l = new Function(i);
|
|
2089
2112
|
let d, m = null;
|
|
2090
2113
|
try {
|
|
2091
|
-
d =
|
|
2114
|
+
d = l.apply(null, c);
|
|
2092
2115
|
} catch (u) {
|
|
2093
2116
|
m = u;
|
|
2094
2117
|
}
|
|
@@ -2122,7 +2145,7 @@ const fn = (t = {}) => {
|
|
|
2122
2145
|
function V(t) {
|
|
2123
2146
|
return Math.round(t * 1e3) / 1e3;
|
|
2124
2147
|
}
|
|
2125
|
-
const
|
|
2148
|
+
const bn = (t, e, n = !0) => {
|
|
2126
2149
|
if (!(t instanceof HTMLElement))
|
|
2127
2150
|
return null;
|
|
2128
2151
|
let o = n ? t : t.parentElement;
|
|
@@ -2133,7 +2156,7 @@ const hn = (t, e, n = !0) => {
|
|
|
2133
2156
|
return o;
|
|
2134
2157
|
} while (o = o.parentElement);
|
|
2135
2158
|
return null;
|
|
2136
|
-
},
|
|
2159
|
+
}, yn = (t) => bn(t, (e) => {
|
|
2137
2160
|
const n = e.getAttribute("builder-id") || e.id;
|
|
2138
2161
|
return Boolean((n == null ? void 0 : n.indexOf("builder-")) === 0);
|
|
2139
2162
|
}), O = ({
|
|
@@ -2145,8 +2168,8 @@ const hn = (t, e, n = !0) => {
|
|
|
2145
2168
|
x: r,
|
|
2146
2169
|
y: i
|
|
2147
2170
|
};
|
|
2148
|
-
},
|
|
2149
|
-
const e = t.target, n = e &&
|
|
2171
|
+
}, vn = (t) => {
|
|
2172
|
+
const e = t.target, n = e && yn(e), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2150
2173
|
return {
|
|
2151
2174
|
targetBuilderElement: o || void 0,
|
|
2152
2175
|
metadata: {
|
|
@@ -2155,24 +2178,24 @@ const hn = (t, e, n = !0) => {
|
|
|
2155
2178
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2156
2179
|
}
|
|
2157
2180
|
};
|
|
2158
|
-
},
|
|
2181
|
+
}, _n = ({
|
|
2159
2182
|
content: t,
|
|
2160
2183
|
data: e,
|
|
2161
2184
|
locale: n
|
|
2162
2185
|
}) => {
|
|
2163
|
-
var r, i,
|
|
2186
|
+
var r, i, c;
|
|
2164
2187
|
const o = {};
|
|
2165
2188
|
(i = (r = t == null ? void 0 : t.data) == null ? void 0 : r.inputs) == null || i.forEach((a) => {
|
|
2166
|
-
var
|
|
2167
|
-
a.name && a.defaultValue !== void 0 && ((
|
|
2189
|
+
var l;
|
|
2190
|
+
a.name && a.defaultValue !== void 0 && ((l = t == null ? void 0 : t.data) == null ? void 0 : l.state) && t.data.state[a.name] === void 0 && (o[a.name] = a.defaultValue);
|
|
2168
2191
|
});
|
|
2169
2192
|
const s = {
|
|
2170
|
-
...(
|
|
2193
|
+
...(c = t == null ? void 0 : t.data) == null ? void 0 : c.state,
|
|
2171
2194
|
...e,
|
|
2172
2195
|
...n ? { locale: n } : {}
|
|
2173
2196
|
};
|
|
2174
2197
|
return { ...o, ...s };
|
|
2175
|
-
},
|
|
2198
|
+
}, xn = ({
|
|
2176
2199
|
content: t,
|
|
2177
2200
|
data: e
|
|
2178
2201
|
}) => t ? {
|
|
@@ -2182,21 +2205,21 @@ const hn = (t, e, n = !0) => {
|
|
|
2182
2205
|
...e
|
|
2183
2206
|
},
|
|
2184
2207
|
meta: t == null ? void 0 : t.meta
|
|
2185
|
-
} : void 0,
|
|
2208
|
+
} : void 0, kn = () => Promise.resolve().then(() => W).then((t) => t.default).catch((t) => {
|
|
2186
2209
|
throw console.error(
|
|
2187
2210
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
2188
2211
|
t
|
|
2189
2212
|
), t;
|
|
2190
|
-
}),
|
|
2213
|
+
}), Sn = () => import("./render-styles.a49c2339.js").then((t) => t.default).catch((t) => {
|
|
2191
2214
|
throw console.error(
|
|
2192
2215
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
2193
2216
|
t
|
|
2194
2217
|
), t;
|
|
2195
|
-
}),
|
|
2218
|
+
}), wn = f({
|
|
2196
2219
|
name: "render-content",
|
|
2197
2220
|
components: {
|
|
2198
|
-
RenderContentStyles:
|
|
2199
|
-
RenderBlocks:
|
|
2221
|
+
RenderContentStyles: Sn,
|
|
2222
|
+
RenderBlocks: kn
|
|
2200
2223
|
},
|
|
2201
2224
|
props: [
|
|
2202
2225
|
"content",
|
|
@@ -2214,20 +2237,20 @@ const hn = (t, e, n = !0) => {
|
|
|
2214
2237
|
return {
|
|
2215
2238
|
forceReRenderCount: 0,
|
|
2216
2239
|
overrideContent: null,
|
|
2217
|
-
useContent:
|
|
2240
|
+
useContent: xn({
|
|
2218
2241
|
content: this.content,
|
|
2219
2242
|
data: this.data
|
|
2220
2243
|
}),
|
|
2221
2244
|
update: 0,
|
|
2222
2245
|
canTrackToUse: v(this.canTrack) ? this.canTrack : !0,
|
|
2223
|
-
contentState:
|
|
2246
|
+
contentState: _n({
|
|
2224
2247
|
content: this.content,
|
|
2225
2248
|
data: this.data,
|
|
2226
2249
|
locale: this.locale
|
|
2227
2250
|
}),
|
|
2228
2251
|
allRegisteredComponents: [
|
|
2229
|
-
...
|
|
2230
|
-
...
|
|
2252
|
+
...Ht(),
|
|
2253
|
+
...H,
|
|
2231
2254
|
...this.customComponents || []
|
|
2232
2255
|
].reduce(
|
|
2233
2256
|
(t, e) => ({
|
|
@@ -2246,8 +2269,9 @@ const hn = (t, e, n = !0) => {
|
|
|
2246
2269
|
return {
|
|
2247
2270
|
[k.key]: {
|
|
2248
2271
|
content: t.useContent,
|
|
2249
|
-
|
|
2250
|
-
|
|
2272
|
+
localState: void 0,
|
|
2273
|
+
rootState: t.contentState,
|
|
2274
|
+
rootSetState: t.contentSetState,
|
|
2251
2275
|
context: t.context || {},
|
|
2252
2276
|
apiKey: t.apiKey,
|
|
2253
2277
|
apiVersion: t.apiVersion,
|
|
@@ -2261,7 +2285,7 @@ const hn = (t, e, n = !0) => {
|
|
|
2261
2285
|
if (this.apiKey || y.error(
|
|
2262
2286
|
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2263
2287
|
), p()) {
|
|
2264
|
-
if (b() && (this.forceReRenderCount = this.forceReRenderCount + 1,
|
|
2288
|
+
if (b() && (this.forceReRenderCount = this.forceReRenderCount + 1, hn(), gn({
|
|
2265
2289
|
...this.locale ? {
|
|
2266
2290
|
locale: this.locale
|
|
2267
2291
|
} : {},
|
|
@@ -2272,7 +2296,7 @@ const hn = (t, e, n = !0) => {
|
|
|
2272
2296
|
this.allRegisteredComponents
|
|
2273
2297
|
).forEach((n) => {
|
|
2274
2298
|
var s;
|
|
2275
|
-
const o =
|
|
2299
|
+
const o = Jt(n);
|
|
2276
2300
|
(s = window.parent) == null || s.postMessage(o, "*");
|
|
2277
2301
|
}), window.addEventListener("message", this.processMessage), window.addEventListener(
|
|
2278
2302
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -2287,11 +2311,11 @@ const hn = (t, e, n = !0) => {
|
|
|
2287
2311
|
variationId: n !== o ? n : void 0
|
|
2288
2312
|
});
|
|
2289
2313
|
}
|
|
2290
|
-
if (
|
|
2314
|
+
if (Gt()) {
|
|
2291
2315
|
const n = new URL(location.href).searchParams, o = n.get("builder.preview"), s = n.get(
|
|
2292
2316
|
`builder.preview.${o}`
|
|
2293
2317
|
), r = n.get("apiKey") || n.get("builder.space");
|
|
2294
|
-
o === this.model && r === this.apiKey && (!this.content || s === this.content.id) &&
|
|
2318
|
+
o === this.model && r === this.apiKey && (!this.content || s === this.content.id) && D({
|
|
2295
2319
|
model: this.model,
|
|
2296
2320
|
apiKey: this.apiKey,
|
|
2297
2321
|
apiVersion: this.apiVersion
|
|
@@ -2386,7 +2410,7 @@ const hn = (t, e, n = !0) => {
|
|
|
2386
2410
|
}
|
|
2387
2411
|
};
|
|
2388
2412
|
},
|
|
2389
|
-
|
|
2413
|
+
contentSetState(t) {
|
|
2390
2414
|
this.contentState = t;
|
|
2391
2415
|
},
|
|
2392
2416
|
processMessage(t) {
|
|
@@ -2414,7 +2438,9 @@ const hn = (t, e, n = !0) => {
|
|
|
2414
2438
|
t && A({
|
|
2415
2439
|
code: t,
|
|
2416
2440
|
context: this.context || {},
|
|
2417
|
-
|
|
2441
|
+
localState: void 0,
|
|
2442
|
+
rootState: this.contentState,
|
|
2443
|
+
rootSetState: this.contentSetState
|
|
2418
2444
|
});
|
|
2419
2445
|
},
|
|
2420
2446
|
onClick(t) {
|
|
@@ -2427,7 +2453,7 @@ const hn = (t, e, n = !0) => {
|
|
|
2427
2453
|
contentId: s,
|
|
2428
2454
|
apiKey: this.apiKey,
|
|
2429
2455
|
variationId: o !== s ? o : void 0,
|
|
2430
|
-
...
|
|
2456
|
+
...vn(t),
|
|
2431
2457
|
unique: !this.clicked
|
|
2432
2458
|
});
|
|
2433
2459
|
}
|
|
@@ -2439,7 +2465,9 @@ const hn = (t, e, n = !0) => {
|
|
|
2439
2465
|
(e, n) => A({
|
|
2440
2466
|
code: n,
|
|
2441
2467
|
context: this.context || {},
|
|
2442
|
-
|
|
2468
|
+
localState: void 0,
|
|
2469
|
+
rootState: this.contentState,
|
|
2470
|
+
rootSetState: this.contentSetState
|
|
2443
2471
|
})
|
|
2444
2472
|
);
|
|
2445
2473
|
},
|
|
@@ -2449,7 +2477,7 @@ const hn = (t, e, n = !0) => {
|
|
|
2449
2477
|
...this.contentState,
|
|
2450
2478
|
[e]: n
|
|
2451
2479
|
};
|
|
2452
|
-
this.
|
|
2480
|
+
this.contentSetState(o);
|
|
2453
2481
|
}).catch((n) => {
|
|
2454
2482
|
console.error("error fetching dynamic data", t, n);
|
|
2455
2483
|
});
|
|
@@ -2484,27 +2512,27 @@ const hn = (t, e, n = !0) => {
|
|
|
2484
2512
|
}
|
|
2485
2513
|
}
|
|
2486
2514
|
});
|
|
2487
|
-
var
|
|
2488
|
-
var o, s, r, i,
|
|
2515
|
+
var Cn = function() {
|
|
2516
|
+
var o, s, r, i, c, a, l, d;
|
|
2489
2517
|
var e = this, n = e._self._c;
|
|
2490
2518
|
return e._self._setupProxy, e.useContent ? n("div", { ref: "elementRef", attrs: { "builder-content-id": (o = e.useContent) == null ? void 0 : o.id, "builder-model": e.model }, on: { click: function(m) {
|
|
2491
2519
|
return e.onClick(m);
|
|
2492
|
-
} } }, [e.TARGET !== "reactNative" ? [n("render-content-styles", { attrs: { contentId: (s = e.useContent) == null ? void 0 : s.id, cssCode: (i = (r = e.useContent) == null ? void 0 : r.data) == null ? void 0 : i.cssCode, customFonts: (a = (
|
|
2493
|
-
},
|
|
2494
|
-
kn,
|
|
2495
|
-
Sn,
|
|
2520
|
+
} } }, [e.TARGET !== "reactNative" ? [n("render-content-styles", { attrs: { contentId: (s = e.useContent) == null ? void 0 : s.id, cssCode: (i = (r = e.useContent) == null ? void 0 : r.data) == null ? void 0 : i.cssCode, customFonts: (a = (c = e.useContent) == null ? void 0 : c.data) == null ? void 0 : a.customFonts } })] : e._e(), n("render-blocks", { key: e.forceReRenderCount, attrs: { blocks: (d = (l = e.useContent) == null ? void 0 : l.data) == null ? void 0 : d.blocks } })], 2) : e._e();
|
|
2521
|
+
}, In = [], Rn = /* @__PURE__ */ h(
|
|
2496
2522
|
wn,
|
|
2523
|
+
Cn,
|
|
2524
|
+
In,
|
|
2497
2525
|
!1,
|
|
2498
2526
|
null,
|
|
2499
2527
|
null,
|
|
2500
2528
|
null,
|
|
2501
2529
|
null
|
|
2502
2530
|
);
|
|
2503
|
-
const
|
|
2531
|
+
const Tn = Rn.exports, $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2504
2532
|
__proto__: null,
|
|
2505
|
-
default:
|
|
2533
|
+
default: Tn
|
|
2506
2534
|
}, Symbol.toStringTag, { value: "Module" })), U = {};
|
|
2507
|
-
function
|
|
2535
|
+
function jn(t) {
|
|
2508
2536
|
if (p()) {
|
|
2509
2537
|
Object.assign(U, t);
|
|
2510
2538
|
const e = {
|
|
@@ -2522,29 +2550,29 @@ export {
|
|
|
2522
2550
|
Me as S,
|
|
2523
2551
|
x as T,
|
|
2524
2552
|
Ct as V,
|
|
2525
|
-
|
|
2553
|
+
Pn as a,
|
|
2526
2554
|
te as b,
|
|
2527
2555
|
v as c,
|
|
2528
|
-
|
|
2556
|
+
Tn as d,
|
|
2529
2557
|
A as e,
|
|
2530
2558
|
T as f,
|
|
2531
2559
|
ne as g,
|
|
2532
2560
|
mt as h,
|
|
2533
2561
|
vt as i,
|
|
2534
2562
|
b as j,
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2563
|
+
Gt as k,
|
|
2564
|
+
H as l,
|
|
2565
|
+
An as m,
|
|
2538
2566
|
h as n,
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2567
|
+
Jt as o,
|
|
2568
|
+
fn as p,
|
|
2569
|
+
D as q,
|
|
2542
2570
|
Ee as r,
|
|
2543
|
-
|
|
2544
|
-
|
|
2571
|
+
jn as s,
|
|
2572
|
+
Fn as t,
|
|
2545
2573
|
at as u,
|
|
2546
2574
|
nt as v,
|
|
2547
2575
|
ot as w,
|
|
2548
2576
|
st as x,
|
|
2549
|
-
|
|
2577
|
+
z as y
|
|
2550
2578
|
};
|