@builder.io/sdk-vue 1.0.11 → 1.0.12
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/lib/browser/{block-styles-fR3DyBd5.cjs → block-styles-xXC5xD7m.cjs} +1 -1
- package/lib/browser/{block-styles-5TYaPDIm.js → block-styles-xasGILBF.js} +1 -1
- package/lib/browser/{block-wrapper-i-jeb4Rj.cjs → block-wrapper-4N6UCZUb.cjs} +1 -1
- package/lib/browser/{block-wrapper-i3gn_AOE.js → block-wrapper-N_9kN83W.js} +3 -3
- package/lib/browser/{component-ref-pvWR-AOo.cjs → component-ref-CtedueX1.cjs} +1 -1
- package/lib/browser/{component-ref-KW5XoALS.js → component-ref-NZYFpLyY.js} +2 -2
- package/lib/browser/components/block/block.helpers.d.ts +4 -0
- package/lib/browser/components/block/block.vue.d.ts +1 -3
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +3 -3
- package/lib/browser/components/content/content.vue.d.ts +3 -3
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +3 -3
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/evaluate.d.ts +3 -1
- package/lib/browser/functions/evaluate/helpers.d.ts +1 -0
- package/lib/browser/get-block-properties-BYv9arve.cjs +1 -0
- package/lib/browser/{get-block-properties-8WpdLLNs.js → get-block-properties-XpDJWplm.js} +13 -12
- package/lib/browser/{index-d9qt5SfZ.js → index-IiLTuw5y.js} +744 -706
- package/lib/browser/index-TLgvBIUm.cjs +165 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/{repeated-block-YorFonSG.js → repeated-block-2uW65br0.js} +2 -2
- package/lib/browser/{repeated-block-b96PcUUW.cjs → repeated-block-R55GuInH.cjs} +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/{node/block-styles-zdUVxkGH.js → edge/block-styles-1Y-luUbF.js} +1 -1
- package/lib/edge/{block-styles-izqWMONu.cjs → block-styles-OQkHmuXv.cjs} +1 -1
- package/lib/edge/{block-wrapper-Zbclw0l-.js → block-wrapper-amJaBkpx.js} +3 -3
- package/lib/{node/block-wrapper-8K80FLYH.cjs → edge/block-wrapper-qcbYIhCp.cjs} +1 -1
- package/lib/{node/component-ref-2Al2Uq8d.js → edge/component-ref-G4Y_2Wev.js} +2 -2
- package/lib/{node/component-ref-k_QPq6BC.cjs → edge/component-ref-TBA1YCG5.cjs} +1 -1
- package/lib/edge/components/block/block.helpers.d.ts +4 -0
- package/lib/edge/components/block/block.vue.d.ts +1 -3
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +3 -3
- package/lib/edge/components/content/content.vue.d.ts +3 -3
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/evaluate.d.ts +3 -1
- package/lib/edge/functions/evaluate/helpers.d.ts +1 -0
- package/lib/edge/get-block-properties-I4wR6gqz.cjs +1 -0
- package/lib/{node/get-block-properties-bHRpSHYs.js → edge/get-block-properties-Mf8j3xxz.js} +15 -14
- package/lib/edge/{index-Y2bPTNhf.js → index-QGDyn3F4.js} +1226 -1188
- package/lib/edge/{index-NSnCpXuk.cjs → index-Y1Ul7p-a.cjs} +29 -30
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +1 -1
- package/lib/{node/repeated-block-IG8CPC0h.js → edge/repeated-block-SXw3PYRg.js} +2 -2
- package/lib/edge/{repeated-block-s6a68EOZ.cjs → repeated-block-cho6OAg2.cjs} +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/node/{block-styles-v9elG6WQ.cjs → block-styles-duIy1mDJ.cjs} +1 -1
- package/lib/{edge/block-styles-GdIbi_nx.js → node/block-styles-rVezFfnK.js} +1 -1
- package/lib/{edge/block-wrapper-lARY22qB.cjs → node/block-wrapper-HZs0reB7.cjs} +1 -1
- package/lib/node/{block-wrapper-e4z46w-0.js → block-wrapper-pazX_RJj.js} +3 -3
- package/lib/{edge/component-ref-LofeGpew.js → node/component-ref-lZGzt5_2.js} +2 -2
- package/lib/{edge/component-ref-T6hJa-lZ.cjs → node/component-ref-pR-6yx5E.cjs} +1 -1
- package/lib/node/components/block/block.helpers.d.ts +4 -0
- package/lib/node/components/block/block.vue.d.ts +1 -3
- package/lib/node/components/content/components/enable-editor.vue.d.ts +3 -3
- package/lib/node/components/content/content.vue.d.ts +3 -3
- package/lib/node/components/content-variants/content-variants.vue.d.ts +3 -3
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/evaluate.d.ts +3 -1
- package/lib/node/functions/evaluate/helpers.d.ts +1 -0
- package/lib/node/get-block-properties-R1EbzpGB.cjs +1 -0
- package/lib/{edge/get-block-properties-tZZSF7zb.js → node/get-block-properties-huGrIrmB.js} +15 -14
- package/lib/node/{index-SJ3VtjvJ.cjs → index-3Ry2GjhV.cjs} +7 -8
- package/lib/node/{index-T1-38gzE.js → index-whwvaDGF.js} +229 -191
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +1 -1
- package/lib/node/{repeated-block-pWgtyw6h.cjs → repeated-block-11rZMkW-.cjs} +1 -1
- package/lib/{edge/repeated-block-KBsvGmd-.js → node/repeated-block-q2Om5NKj.js} +2 -2
- package/lib/node/style.css +1 -1
- package/package.json +1 -1
- package/lib/browser/get-block-properties-RFctFkm2.cjs +0 -1
- package/lib/browser/index-wpiOu-BM.cjs +0 -166
- package/lib/edge/get-block-properties-KAUDARc7.cjs +0 -1
- package/lib/node/get-block-properties-czwJx8s5.cjs +0 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var at = (e, t, n) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Z = (e, t, n) => (at(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
1
4
|
import "./style.css";
|
|
2
|
-
import { defineComponent as f, openBlock as u, createElementBlock as h, Fragment as $, createBlock as g, resolveDynamicComponent as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
+
import { defineComponent as f, openBlock as u, createElementBlock as h, Fragment as $, createBlock as g, resolveDynamicComponent as H, mergeProps as w, toHandlers as E, withCtx as B, renderSlot as P, resolveComponent as k, createTextVNode as lt, toDisplayString as X, defineAsyncComponent as q, createVNode as A, renderList as L, createCommentVNode as v, h as Re, createElementVNode as te, normalizeStyle as ne, normalizeClass as Ee, markRaw as ct } from "vue";
|
|
6
|
+
const dt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ut = (e) => typeof e == "string" && dt.has(e.toLowerCase());
|
|
7
|
+
function U(e = {}, t, n) {
|
|
5
8
|
const o = {};
|
|
6
9
|
for (const s in e) {
|
|
7
10
|
if (!e[s] || n && !s.startsWith(t))
|
|
@@ -11,11 +14,11 @@ function F(e = {}, t, n) {
|
|
|
11
14
|
}
|
|
12
15
|
return o;
|
|
13
16
|
}
|
|
14
|
-
const
|
|
17
|
+
const pt = f({
|
|
15
18
|
name: "dynamic-renderer",
|
|
16
19
|
props: ["attributes", "actionAttributes", "TagName"],
|
|
17
20
|
data() {
|
|
18
|
-
return { isEmptyElement:
|
|
21
|
+
return { isEmptyElement: ut };
|
|
19
22
|
}
|
|
20
23
|
}), y = (e, t) => {
|
|
21
24
|
const n = e.__vccOpts || e;
|
|
@@ -23,26 +26,26 @@ const at = f({
|
|
|
23
26
|
n[o] = s;
|
|
24
27
|
return n;
|
|
25
28
|
};
|
|
26
|
-
function
|
|
27
|
-
return e.isEmptyElement(e.TagName) ? (u(), g(
|
|
28
|
-
typeof e.TagName == "string" ? (u(), g(
|
|
29
|
-
default:
|
|
29
|
+
function mt(e, t, n, o, s, r) {
|
|
30
|
+
return e.isEmptyElement(e.TagName) ? (u(), g(H(e.TagName), w({ key: 1 }, e.attributes, E(e.actionAttributes)), null, 16)) : (u(), h($, { key: 0 }, [
|
|
31
|
+
typeof e.TagName == "string" ? (u(), g(H(e.TagName), w({ key: 0 }, e.attributes, E(e.actionAttributes)), {
|
|
32
|
+
default: B(() => [
|
|
30
33
|
P(e.$slots, "default")
|
|
31
34
|
]),
|
|
32
35
|
_: 3
|
|
33
|
-
}, 16)) : (u(), g(
|
|
34
|
-
default:
|
|
36
|
+
}, 16)) : (u(), g(H(e.TagName), w({ key: 1 }, e.attributes, E(e.actionAttributes)), {
|
|
37
|
+
default: B(() => [
|
|
35
38
|
P(e.$slots, "default")
|
|
36
39
|
]),
|
|
37
40
|
_: 3
|
|
38
41
|
}, 16))
|
|
39
42
|
], 64));
|
|
40
43
|
}
|
|
41
|
-
const
|
|
44
|
+
const ie = /* @__PURE__ */ y(pt, [["render", mt]]), Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42
45
|
__proto__: null,
|
|
43
|
-
default:
|
|
44
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
45
|
-
switch (
|
|
46
|
+
default: ie
|
|
47
|
+
}, Symbol.toStringTag, { value: "Module" })), V = "vue", ae = () => {
|
|
48
|
+
switch (V) {
|
|
46
49
|
case "react":
|
|
47
50
|
case "reactNative":
|
|
48
51
|
case "rsc":
|
|
@@ -53,9 +56,9 @@ const oe = /* @__PURE__ */ y(at, [["render", lt]]), Ks = /* @__PURE__ */ Object.
|
|
|
53
56
|
case "qwik":
|
|
54
57
|
return "class";
|
|
55
58
|
}
|
|
56
|
-
},
|
|
59
|
+
}, ht = f({
|
|
57
60
|
name: "builder-button",
|
|
58
|
-
components: { DynamicRenderer:
|
|
61
|
+
components: { DynamicRenderer: ie },
|
|
59
62
|
props: [
|
|
60
63
|
"attributes",
|
|
61
64
|
"link",
|
|
@@ -64,10 +67,10 @@ const oe = /* @__PURE__ */ y(at, [["render", lt]]), Ks = /* @__PURE__ */ Object.
|
|
|
64
67
|
"text"
|
|
65
68
|
],
|
|
66
69
|
data() {
|
|
67
|
-
return { getClassPropName:
|
|
70
|
+
return { getClassPropName: ae, filterAttrs: U };
|
|
68
71
|
}
|
|
69
72
|
});
|
|
70
|
-
function
|
|
73
|
+
function ft(e, t, n, o, s, r) {
|
|
71
74
|
const i = k("dynamic-renderer");
|
|
72
75
|
return u(), g(i, {
|
|
73
76
|
attributes: {
|
|
@@ -84,13 +87,13 @@ function dt(e, t, n, o, s, r) {
|
|
|
84
87
|
TagName: e.link ? e.builderLinkComponent || "a" : "button",
|
|
85
88
|
actionAttributes: e.filterAttrs(e.attributes, "v-on:", !0)
|
|
86
89
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
|
|
90
|
+
default: B(() => [
|
|
91
|
+
lt(X(e.text), 1)
|
|
89
92
|
]),
|
|
90
93
|
_: 1
|
|
91
94
|
}, 8, ["attributes", "TagName", "actionAttributes"]);
|
|
92
95
|
}
|
|
93
|
-
const
|
|
96
|
+
const bt = /* @__PURE__ */ y(ht, [["render", ft]]), gt = Symbol(), oe = {
|
|
94
97
|
Builder: {
|
|
95
98
|
content: null,
|
|
96
99
|
context: {},
|
|
@@ -105,12 +108,12 @@ const ut = /* @__PURE__ */ y(ct, [["render", dt]]), pt = Symbol(), ee = {
|
|
|
105
108
|
BlocksWrapper: "div",
|
|
106
109
|
BlocksWrapperProps: {}
|
|
107
110
|
},
|
|
108
|
-
key:
|
|
109
|
-
},
|
|
111
|
+
key: gt
|
|
112
|
+
}, yt = Symbol(), Pe = {
|
|
110
113
|
Components: { registeredComponents: {} },
|
|
111
|
-
key:
|
|
114
|
+
key: yt
|
|
112
115
|
};
|
|
113
|
-
function
|
|
116
|
+
function kt(e) {
|
|
114
117
|
var t;
|
|
115
118
|
return {
|
|
116
119
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -121,35 +124,35 @@ function ht(e) {
|
|
|
121
124
|
builderBlock: e
|
|
122
125
|
};
|
|
123
126
|
}
|
|
124
|
-
const
|
|
125
|
-
log: (...e) => console.log(
|
|
126
|
-
error: (...e) => console.error(
|
|
127
|
-
warn: (...e) => console.warn(
|
|
128
|
-
debug: (...e) => console.debug(
|
|
127
|
+
const J = "[Builder.io]: ", T = {
|
|
128
|
+
log: (...e) => console.log(J, ...e),
|
|
129
|
+
error: (...e) => console.error(J, ...e),
|
|
130
|
+
warn: (...e) => console.warn(J, ...e),
|
|
131
|
+
debug: (...e) => console.debug(J, ...e)
|
|
129
132
|
};
|
|
130
133
|
function I() {
|
|
131
134
|
return typeof window < "u" && typeof document < "u";
|
|
132
135
|
}
|
|
133
|
-
const
|
|
136
|
+
const St = (e) => {
|
|
134
137
|
const t = {};
|
|
135
138
|
return e.forEach((n, o) => {
|
|
136
139
|
t[o] = n;
|
|
137
140
|
}), t;
|
|
138
|
-
},
|
|
139
|
-
function
|
|
141
|
+
}, Ve = (e) => e instanceof URLSearchParams ? St(e) : e, xe = (e) => typeof e == "string" ? e : e instanceof URLSearchParams ? e.toString() : new URLSearchParams(e).toString();
|
|
142
|
+
function vt() {
|
|
140
143
|
return I() && window.self !== window.top;
|
|
141
144
|
}
|
|
142
145
|
function R(e) {
|
|
143
|
-
return
|
|
146
|
+
return vt() && xe(e || window.location.search).indexOf("builder.frameEditing=") !== -1;
|
|
144
147
|
}
|
|
145
|
-
const
|
|
148
|
+
const Ct = () => {
|
|
146
149
|
if (I()) {
|
|
147
150
|
const e = new URL(location.href);
|
|
148
151
|
return e.pathname === "" && (e.pathname = "/"), e;
|
|
149
152
|
} else
|
|
150
153
|
return console.warn("Cannot get location for tracking in non-browser environment"), null;
|
|
151
|
-
},
|
|
152
|
-
const e =
|
|
154
|
+
}, wt = () => typeof navigator == "object" && navigator.userAgent || "", Ae = () => {
|
|
155
|
+
const e = wt(), t = {
|
|
153
156
|
Android() {
|
|
154
157
|
return e.match(/Android/i);
|
|
155
158
|
},
|
|
@@ -166,15 +169,15 @@ const gt = () => {
|
|
|
166
169
|
return e.match(/IEMobile/i) || e.match(/WPDesktop/i);
|
|
167
170
|
},
|
|
168
171
|
any() {
|
|
169
|
-
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() ||
|
|
172
|
+
return t.Android() || t.BlackBerry() || t.iOS() || t.Opera() || t.Windows() || V === "reactNative";
|
|
170
173
|
}
|
|
171
|
-
}, n = e.match(/Tablet|iPad/i), o =
|
|
174
|
+
}, n = e.match(/Tablet|iPad/i), o = Ct();
|
|
172
175
|
return {
|
|
173
176
|
urlPath: o == null ? void 0 : o.pathname,
|
|
174
177
|
host: (o == null ? void 0 : o.host) || (o == null ? void 0 : o.hostname),
|
|
175
178
|
device: n ? "tablet" : t.any() ? "mobile" : "desktop"
|
|
176
179
|
};
|
|
177
|
-
},
|
|
180
|
+
}, It = ({
|
|
178
181
|
builder: e,
|
|
179
182
|
context: t,
|
|
180
183
|
event: n,
|
|
@@ -186,14 +189,14 @@ const gt = () => {
|
|
|
186
189
|
builder: e,
|
|
187
190
|
context: t,
|
|
188
191
|
event: n
|
|
189
|
-
}),
|
|
192
|
+
}), $t = () => ({
|
|
190
193
|
isEditing: R(),
|
|
191
194
|
isBrowser: I(),
|
|
192
195
|
isServer: !I(),
|
|
193
|
-
getUserAttributes: () =>
|
|
194
|
-
}),
|
|
196
|
+
getUserAttributes: () => Ae()
|
|
197
|
+
}), Tt = (e, {
|
|
195
198
|
isExpression: t = !0
|
|
196
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
199
|
+
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, ge = ({
|
|
197
200
|
code: e,
|
|
198
201
|
builder: t,
|
|
199
202
|
context: n,
|
|
@@ -202,11 +205,11 @@ const gt = () => {
|
|
|
202
205
|
rootSetState: r,
|
|
203
206
|
rootState: i
|
|
204
207
|
}) => {
|
|
205
|
-
const a =
|
|
208
|
+
const a = It({
|
|
206
209
|
builder: t,
|
|
207
210
|
context: n,
|
|
208
211
|
event: o,
|
|
209
|
-
state:
|
|
212
|
+
state: Be({
|
|
210
213
|
rootState: i,
|
|
211
214
|
localState: s,
|
|
212
215
|
rootSetState: r
|
|
@@ -214,7 +217,7 @@ const gt = () => {
|
|
|
214
217
|
});
|
|
215
218
|
return new Function(...a.map(([l]) => l), e)(...a.map(([, l]) => l));
|
|
216
219
|
};
|
|
217
|
-
function
|
|
220
|
+
function Be({
|
|
218
221
|
rootState: e,
|
|
219
222
|
localState: t,
|
|
220
223
|
rootSetState: n
|
|
@@ -224,7 +227,7 @@ function xe({
|
|
|
224
227
|
if (t && s in t)
|
|
225
228
|
return t[s];
|
|
226
229
|
const r = o[s];
|
|
227
|
-
return typeof r == "object" ?
|
|
230
|
+
return typeof r == "object" && r !== null ? Be({
|
|
228
231
|
rootState: r,
|
|
229
232
|
localState: void 0,
|
|
230
233
|
rootSetState: n ? (i) => {
|
|
@@ -239,58 +242,88 @@ function xe({
|
|
|
239
242
|
}
|
|
240
243
|
});
|
|
241
244
|
}
|
|
242
|
-
const
|
|
243
|
-
function
|
|
245
|
+
const F = (e) => e != null;
|
|
246
|
+
function Rt() {
|
|
244
247
|
var e;
|
|
245
|
-
return typeof process < "u" &&
|
|
248
|
+
return typeof process < "u" && F((e = process == null ? void 0 : process.versions) == null ? void 0 : e.node);
|
|
246
249
|
}
|
|
247
|
-
const
|
|
250
|
+
const Et = () => {
|
|
248
251
|
var o;
|
|
249
|
-
if (!
|
|
252
|
+
if (!Rt())
|
|
250
253
|
return !1;
|
|
251
254
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
252
255
|
return e && t && !n ? (T.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
253
|
-
},
|
|
254
|
-
|
|
256
|
+
}, Pt = (e) => (I() || Et(), ge(e)), x = class x {
|
|
257
|
+
static getCacheKey(t) {
|
|
258
|
+
return JSON.stringify({
|
|
259
|
+
...t,
|
|
260
|
+
// replace the event with a random number to break cache
|
|
261
|
+
// thats because we can't serialize the event object due to circular refs in DOM node refs.
|
|
262
|
+
event: t.event ? Math.random() : void 0
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
static getCachedValue(t) {
|
|
266
|
+
return x.cache.get(t);
|
|
267
|
+
}
|
|
268
|
+
static setCachedValue(t, n) {
|
|
269
|
+
x.cache.size > 20 && x.cache.delete(x.cache.keys().next().value), x.cache.set(t, {
|
|
270
|
+
value: n
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
Z(x, "cacheLimit", 20), Z(x, "cache", /* @__PURE__ */ new Map());
|
|
275
|
+
let M = x;
|
|
276
|
+
function Q({
|
|
255
277
|
code: e,
|
|
256
278
|
context: t,
|
|
257
279
|
localState: n,
|
|
258
280
|
rootState: o,
|
|
259
281
|
rootSetState: s,
|
|
260
282
|
event: r,
|
|
261
|
-
isExpression: i = !0
|
|
283
|
+
isExpression: i = !0,
|
|
284
|
+
enableCache: a
|
|
262
285
|
}) {
|
|
263
286
|
if (e === "") {
|
|
264
287
|
T.warn("Skipping evaluation of empty code block.");
|
|
265
288
|
return;
|
|
266
289
|
}
|
|
267
|
-
const
|
|
268
|
-
code:
|
|
290
|
+
const l = {
|
|
291
|
+
code: Tt(e, {
|
|
269
292
|
isExpression: i
|
|
270
293
|
}),
|
|
271
|
-
builder:
|
|
294
|
+
builder: $t(),
|
|
272
295
|
context: t,
|
|
273
296
|
event: r,
|
|
274
297
|
rootSetState: s,
|
|
275
298
|
rootState: o,
|
|
276
299
|
localState: n
|
|
277
300
|
};
|
|
301
|
+
if (a) {
|
|
302
|
+
const c = M.getCacheKey(l), m = M.getCachedValue(c);
|
|
303
|
+
if (m)
|
|
304
|
+
return m.value;
|
|
305
|
+
}
|
|
278
306
|
try {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
307
|
+
const c = Pt(l);
|
|
308
|
+
if (a) {
|
|
309
|
+
const m = M.getCacheKey(l);
|
|
310
|
+
M.setCachedValue(m, c);
|
|
311
|
+
}
|
|
312
|
+
return c;
|
|
313
|
+
} catch (c) {
|
|
314
|
+
T.error("Failed code evaluation: " + c.message, {
|
|
282
315
|
code: e
|
|
283
316
|
});
|
|
284
317
|
return;
|
|
285
318
|
}
|
|
286
319
|
}
|
|
287
|
-
const
|
|
320
|
+
const K = (e) => JSON.parse(JSON.stringify(e)), We = (e, t, n) => {
|
|
288
321
|
if (Object(e) !== e)
|
|
289
322
|
return e;
|
|
290
323
|
const o = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
291
324
|
return o.slice(0, -1).reduce((s, r, i) => Object(s[r]) === s[r] ? s[r] : s[r] = Math.abs(Number(o[i + 1])) >> 0 === +o[i + 1] ? [] : {}, e)[o[o.length - 1]] = n, e;
|
|
292
325
|
};
|
|
293
|
-
const
|
|
326
|
+
const Vt = ({
|
|
294
327
|
block: e,
|
|
295
328
|
context: t,
|
|
296
329
|
localState: n,
|
|
@@ -299,7 +332,7 @@ const $t = ({
|
|
|
299
332
|
}) => {
|
|
300
333
|
if (!e.bindings)
|
|
301
334
|
return e;
|
|
302
|
-
const r =
|
|
335
|
+
const r = K(e), i = {
|
|
303
336
|
...r,
|
|
304
337
|
properties: {
|
|
305
338
|
...r.properties
|
|
@@ -309,18 +342,19 @@ const $t = ({
|
|
|
309
342
|
}
|
|
310
343
|
};
|
|
311
344
|
for (const a in e.bindings) {
|
|
312
|
-
const l = e.bindings[a],
|
|
345
|
+
const l = e.bindings[a], c = Q({
|
|
313
346
|
code: l,
|
|
314
347
|
localState: n,
|
|
315
348
|
rootState: o,
|
|
316
349
|
rootSetState: s,
|
|
317
|
-
context: t
|
|
350
|
+
context: t,
|
|
351
|
+
enableCache: !0
|
|
318
352
|
});
|
|
319
|
-
|
|
353
|
+
We(i, a, c);
|
|
320
354
|
}
|
|
321
355
|
return i;
|
|
322
356
|
};
|
|
323
|
-
function
|
|
357
|
+
function Ne({
|
|
324
358
|
block: e,
|
|
325
359
|
context: t,
|
|
326
360
|
shouldEvaluateBindings: n,
|
|
@@ -329,7 +363,7 @@ function Ve({
|
|
|
329
363
|
rootSetState: r
|
|
330
364
|
}) {
|
|
331
365
|
const i = e;
|
|
332
|
-
return n ?
|
|
366
|
+
return n ? Vt({
|
|
333
367
|
block: i,
|
|
334
368
|
localState: o,
|
|
335
369
|
rootState: s,
|
|
@@ -337,61 +371,19 @@ function Ve({
|
|
|
337
371
|
context: t
|
|
338
372
|
}) : i;
|
|
339
373
|
}
|
|
340
|
-
|
|
341
|
-
if (typeof o == "string")
|
|
342
|
-
return `${Tt(n)}: ${o};`;
|
|
343
|
-
}).filter(N), Rt = (e) => Be(e).join(`
|
|
344
|
-
`), zs = ({
|
|
345
|
-
mediaQuery: e,
|
|
346
|
-
className: t,
|
|
347
|
-
styles: n
|
|
348
|
-
}) => {
|
|
349
|
-
const o = `.${t} {
|
|
350
|
-
${Rt(n)}
|
|
351
|
-
}`;
|
|
352
|
-
return e ? `${e} {
|
|
353
|
-
${o}
|
|
354
|
-
}` : o;
|
|
355
|
-
};
|
|
356
|
-
function Et({
|
|
357
|
-
style: e
|
|
358
|
-
}) {
|
|
359
|
-
return e;
|
|
360
|
-
}
|
|
361
|
-
const qs = ({
|
|
362
|
-
block: e,
|
|
363
|
-
context: t
|
|
364
|
-
}) => We(Et({
|
|
365
|
-
style: e.style || {},
|
|
366
|
-
context: t,
|
|
367
|
-
block: e
|
|
368
|
-
}));
|
|
369
|
-
function We(e) {
|
|
370
|
-
switch (x) {
|
|
371
|
-
case "svelte":
|
|
372
|
-
case "vue":
|
|
373
|
-
case "solid":
|
|
374
|
-
return Be(e).join(" ");
|
|
375
|
-
case "qwik":
|
|
376
|
-
case "reactNative":
|
|
377
|
-
case "react":
|
|
378
|
-
case "rsc":
|
|
379
|
-
return e;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
function Pt(e, t, n = {}) {
|
|
374
|
+
function xt(e, t, n = {}) {
|
|
383
375
|
let o, s, r, i = null, a = 0;
|
|
384
376
|
const l = function() {
|
|
385
377
|
a = n.leading === !1 ? 0 : Date.now(), i = null, r = e.apply(o, s), i || (o = s = null);
|
|
386
378
|
};
|
|
387
379
|
return function() {
|
|
388
|
-
const
|
|
389
|
-
!a && n.leading === !1 && (a =
|
|
390
|
-
const m = t - (
|
|
391
|
-
return o = this, s = arguments, m <= 0 || m > t ? (i && (clearTimeout(i), i = null), a =
|
|
380
|
+
const c = Date.now();
|
|
381
|
+
!a && n.leading === !1 && (a = c);
|
|
382
|
+
const m = t - (c - a);
|
|
383
|
+
return o = this, s = arguments, m <= 0 || m > t ? (i && (clearTimeout(i), i = null), a = c, r = e.apply(o, s), i || (o = s = null)) : !i && n.trailing !== !1 && (i = setTimeout(l, m)), r;
|
|
392
384
|
};
|
|
393
385
|
}
|
|
394
|
-
function
|
|
386
|
+
function O(e, ...t) {
|
|
395
387
|
const n = Object(e);
|
|
396
388
|
for (let o = 1; o < arguments.length; o++) {
|
|
397
389
|
const s = arguments[o];
|
|
@@ -401,113 +393,155 @@ function U(e, ...t) {
|
|
|
401
393
|
}
|
|
402
394
|
return n;
|
|
403
395
|
}
|
|
404
|
-
const
|
|
405
|
-
function
|
|
396
|
+
const le = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
397
|
+
function At(e) {
|
|
406
398
|
for (const t of e)
|
|
407
399
|
switch (t.trigger) {
|
|
408
400
|
case "pageLoad":
|
|
409
|
-
|
|
401
|
+
Fe(t);
|
|
410
402
|
break;
|
|
411
403
|
case "hover":
|
|
412
|
-
|
|
404
|
+
Wt(t);
|
|
413
405
|
break;
|
|
414
406
|
case "scrollInView":
|
|
415
|
-
|
|
407
|
+
Nt(t);
|
|
416
408
|
break;
|
|
417
409
|
}
|
|
418
410
|
}
|
|
419
|
-
function
|
|
411
|
+
function ce(e) {
|
|
420
412
|
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
421
413
|
}
|
|
422
|
-
function
|
|
423
|
-
const n =
|
|
414
|
+
function de(e, t) {
|
|
415
|
+
const n = Bt(e), o = getComputedStyle(t), s = e.steps[0].styles, r = e.steps[e.steps.length - 1].styles, i = [s, r];
|
|
424
416
|
for (const a of i)
|
|
425
417
|
for (const l of n)
|
|
426
418
|
l in a || (a[l] = o[l]);
|
|
427
419
|
}
|
|
428
|
-
function
|
|
420
|
+
function Bt(e) {
|
|
429
421
|
const t = [];
|
|
430
422
|
for (const n of e.steps)
|
|
431
423
|
for (const o in n.styles)
|
|
432
424
|
t.indexOf(o) === -1 && t.push(o);
|
|
433
425
|
return t;
|
|
434
426
|
}
|
|
435
|
-
function
|
|
427
|
+
function Fe(e) {
|
|
436
428
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
437
429
|
if (!t.length) {
|
|
438
|
-
|
|
430
|
+
ce(e.elementId || e.id || "");
|
|
439
431
|
return;
|
|
440
432
|
}
|
|
441
433
|
Array.from(t).forEach((n) => {
|
|
442
|
-
|
|
443
|
-
n.style.transition = `all ${e.duration}s ${
|
|
434
|
+
de(e, n), n.style.transition = "none", n.style.transitionDelay = "0", O(n.style, e.steps[0].styles), setTimeout(() => {
|
|
435
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), O(n.style, e.steps[1].styles), setTimeout(() => {
|
|
444
436
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
445
437
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
446
438
|
});
|
|
447
439
|
});
|
|
448
440
|
}
|
|
449
|
-
function
|
|
441
|
+
function Wt(e) {
|
|
450
442
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
451
443
|
if (!t.length) {
|
|
452
|
-
|
|
444
|
+
ce(e.elementId || e.id || "");
|
|
453
445
|
return;
|
|
454
446
|
}
|
|
455
447
|
Array.from(t).forEach((n) => {
|
|
456
|
-
|
|
448
|
+
de(e, n);
|
|
457
449
|
const o = e.steps[0].styles, s = e.steps[1].styles;
|
|
458
450
|
function r() {
|
|
459
|
-
|
|
451
|
+
O(n.style, o);
|
|
460
452
|
}
|
|
461
453
|
function i() {
|
|
462
|
-
|
|
454
|
+
O(n.style, s);
|
|
463
455
|
}
|
|
464
456
|
r(), n.addEventListener("mouseenter", i), n.addEventListener("mouseleave", r), setTimeout(() => {
|
|
465
|
-
n.style.transition = `all ${e.duration}s ${
|
|
457
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
466
458
|
});
|
|
467
459
|
});
|
|
468
460
|
}
|
|
469
|
-
function
|
|
461
|
+
function Nt(e) {
|
|
470
462
|
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
471
463
|
if (!t.length) {
|
|
472
|
-
|
|
464
|
+
ce(e.elementId || e.id || "");
|
|
473
465
|
return;
|
|
474
466
|
}
|
|
475
467
|
Array.from(t).forEach((n) => {
|
|
476
|
-
|
|
468
|
+
de(e, n);
|
|
477
469
|
let o = !1, s = !1;
|
|
478
470
|
function r() {
|
|
479
471
|
!o && a(n) ? (o = !0, s = !0, setTimeout(() => {
|
|
480
|
-
|
|
472
|
+
O(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", i), setTimeout(() => {
|
|
481
473
|
s = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
482
474
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
483
|
-
})) : e.repeat && o && !s && !a(n) && (o = !1,
|
|
475
|
+
})) : e.repeat && o && !s && !a(n) && (o = !1, O(n.style, e.steps[0].styles));
|
|
484
476
|
}
|
|
485
|
-
const i =
|
|
477
|
+
const i = xt(r, 200, {
|
|
486
478
|
leading: !1
|
|
487
479
|
});
|
|
488
480
|
function a(m) {
|
|
489
|
-
const
|
|
490
|
-
return
|
|
481
|
+
const d = m.getBoundingClientRect(), p = window.innerHeight, b = (e.thresholdPercent || 0) / 100 * p;
|
|
482
|
+
return d.bottom > b && d.top < p - b;
|
|
491
483
|
}
|
|
492
484
|
const l = e.steps[0].styles;
|
|
493
|
-
function
|
|
494
|
-
|
|
485
|
+
function c() {
|
|
486
|
+
O(n.style, l);
|
|
495
487
|
}
|
|
496
|
-
|
|
497
|
-
n.style.transition = `all ${e.duration}s ${
|
|
488
|
+
c(), setTimeout(() => {
|
|
489
|
+
n.style.transition = `all ${e.duration}s ${le(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
498
490
|
}), document.addEventListener("scroll", i, {
|
|
499
491
|
capture: !0,
|
|
500
492
|
passive: !0
|
|
501
493
|
}), r();
|
|
502
494
|
});
|
|
503
495
|
}
|
|
504
|
-
const
|
|
496
|
+
const Ft = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), Ue = (e) => Object.entries(e).map(([n, o]) => {
|
|
497
|
+
if (typeof o == "string")
|
|
498
|
+
return `${Ft(n)}: ${o};`;
|
|
499
|
+
}).filter(F), Ut = (e) => Ue(e).join(`
|
|
500
|
+
`), Xs = ({
|
|
501
|
+
mediaQuery: e,
|
|
502
|
+
className: t,
|
|
503
|
+
styles: n
|
|
504
|
+
}) => {
|
|
505
|
+
const o = `.${t} {
|
|
506
|
+
${Ut(n)}
|
|
507
|
+
}`;
|
|
508
|
+
return e ? `${e} {
|
|
509
|
+
${o}
|
|
510
|
+
}` : o;
|
|
511
|
+
};
|
|
512
|
+
function Ot({
|
|
513
|
+
style: e
|
|
514
|
+
}) {
|
|
515
|
+
return e;
|
|
516
|
+
}
|
|
517
|
+
const _s = ({
|
|
518
|
+
block: e,
|
|
519
|
+
context: t
|
|
520
|
+
}) => Oe(Ot({
|
|
521
|
+
style: e.style || {},
|
|
522
|
+
context: t,
|
|
523
|
+
block: e
|
|
524
|
+
}));
|
|
525
|
+
function Oe(e) {
|
|
526
|
+
switch (V) {
|
|
527
|
+
case "svelte":
|
|
528
|
+
case "vue":
|
|
529
|
+
case "solid":
|
|
530
|
+
return Ue(e).join(" ");
|
|
531
|
+
case "qwik":
|
|
532
|
+
case "reactNative":
|
|
533
|
+
case "react":
|
|
534
|
+
case "rsc":
|
|
535
|
+
return e;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
const Lt = ({
|
|
505
539
|
block: e,
|
|
506
540
|
context: t,
|
|
507
541
|
registeredComponents: n
|
|
508
542
|
}) => {
|
|
509
543
|
var r;
|
|
510
|
-
const o = (r =
|
|
544
|
+
const o = (r = Ne({
|
|
511
545
|
block: e,
|
|
512
546
|
localState: t.localState,
|
|
513
547
|
rootState: t.rootState,
|
|
@@ -523,7 +557,7 @@ const Wt = ({
|
|
|
523
557
|
console.warn(`
|
|
524
558
|
Could not find a registered component named "${o}".
|
|
525
559
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
526
|
-
},
|
|
560
|
+
}, Mt = ({
|
|
527
561
|
block: e,
|
|
528
562
|
context: t
|
|
529
563
|
}) => {
|
|
@@ -533,64 +567,62 @@ const Wt = ({
|
|
|
533
567
|
} = e;
|
|
534
568
|
if (!(n != null && n.collection))
|
|
535
569
|
return;
|
|
536
|
-
const s =
|
|
570
|
+
const s = Q({
|
|
537
571
|
code: n.collection,
|
|
538
572
|
localState: t.localState,
|
|
539
573
|
rootState: t.rootState,
|
|
540
574
|
rootSetState: t.rootSetState,
|
|
541
|
-
context: t.context
|
|
575
|
+
context: t.context,
|
|
576
|
+
enableCache: !0
|
|
542
577
|
});
|
|
543
578
|
if (!Array.isArray(s))
|
|
544
579
|
return;
|
|
545
580
|
const r = n.collection.split(".").pop(), i = n.itemName || (r ? r + "Item" : "item");
|
|
546
|
-
return s.map((l,
|
|
581
|
+
return s.map((l, c) => ({
|
|
547
582
|
context: {
|
|
548
583
|
...t,
|
|
549
584
|
localState: {
|
|
550
585
|
...t.localState,
|
|
551
|
-
$index:
|
|
586
|
+
$index: c,
|
|
552
587
|
$item: l,
|
|
553
588
|
[i]: l,
|
|
554
|
-
[`$${i}Index`]:
|
|
589
|
+
[`$${i}Index`]: c
|
|
555
590
|
}
|
|
556
591
|
},
|
|
557
592
|
block: o
|
|
558
593
|
}));
|
|
559
|
-
},
|
|
594
|
+
}, Dt = () => import("./block-styles-xasGILBF.js").then((e) => e.default).catch((e) => {
|
|
560
595
|
throw console.error(
|
|
561
596
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
562
597
|
e
|
|
563
598
|
), e;
|
|
564
|
-
}),
|
|
599
|
+
}), Ht = () => import("./block-wrapper-N_9kN83W.js").then((e) => e.default).catch((e) => {
|
|
565
600
|
throw console.error(
|
|
566
601
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
567
602
|
e
|
|
568
603
|
), e;
|
|
569
|
-
}),
|
|
604
|
+
}), jt = () => import("./component-ref-NZYFpLyY.js").then((e) => e.default).catch((e) => {
|
|
570
605
|
throw console.error(
|
|
571
606
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
572
607
|
e
|
|
573
608
|
), e;
|
|
574
|
-
}),
|
|
609
|
+
}), Kt = () => import("./repeated-block-2uW65br0.js").then((e) => e.default).catch((e) => {
|
|
575
610
|
throw console.error(
|
|
576
611
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
577
612
|
e
|
|
578
613
|
), e;
|
|
579
|
-
}),
|
|
614
|
+
}), zt = f({
|
|
580
615
|
name: "block",
|
|
581
616
|
components: {
|
|
582
|
-
BlockStyles:
|
|
583
|
-
ComponentRef:
|
|
584
|
-
RepeatedBlock:
|
|
585
|
-
BlockWrapper:
|
|
617
|
+
BlockStyles: q(Dt),
|
|
618
|
+
ComponentRef: q(jt),
|
|
619
|
+
RepeatedBlock: q(Kt),
|
|
620
|
+
BlockWrapper: q(Ht)
|
|
586
621
|
},
|
|
587
622
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
588
|
-
data() {
|
|
589
|
-
return { childrenContext: this.context };
|
|
590
|
-
},
|
|
591
623
|
mounted() {
|
|
592
624
|
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
593
|
-
t && e &&
|
|
625
|
+
t && e && At(
|
|
594
626
|
t.filter((n) => n.trigger !== "hover").map((n) => ({
|
|
595
627
|
...n,
|
|
596
628
|
elementId: e
|
|
@@ -599,21 +631,21 @@ const Wt = ({
|
|
|
599
631
|
},
|
|
600
632
|
computed: {
|
|
601
633
|
blockComponent() {
|
|
602
|
-
return
|
|
634
|
+
return Lt({
|
|
603
635
|
block: this.block,
|
|
604
636
|
context: this.context,
|
|
605
637
|
registeredComponents: this.registeredComponents
|
|
606
638
|
});
|
|
607
639
|
},
|
|
608
640
|
repeatItem() {
|
|
609
|
-
return
|
|
641
|
+
return Mt({
|
|
610
642
|
block: this.block,
|
|
611
643
|
context: this.context
|
|
612
644
|
});
|
|
613
645
|
},
|
|
614
646
|
processedBlock() {
|
|
615
647
|
var e;
|
|
616
|
-
return (e = this.block.repeat) != null && e.collection ? this.block :
|
|
648
|
+
return (e = this.block.repeat) != null && e.collection ? this.block : Ne({
|
|
617
649
|
block: this.block,
|
|
618
650
|
localState: this.context.localState,
|
|
619
651
|
rootState: this.context.rootState,
|
|
@@ -638,12 +670,12 @@ const Wt = ({
|
|
|
638
670
|
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? this.processedBlock.children ?? [] : [];
|
|
639
671
|
},
|
|
640
672
|
componentRefProps() {
|
|
641
|
-
var e, t, n, o, s, r, i, a, l,
|
|
673
|
+
var e, t, n, o, s, r, i, a, l, c;
|
|
642
674
|
return {
|
|
643
675
|
blockChildren: this.processedBlock.children ?? [],
|
|
644
676
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
645
677
|
componentOptions: {
|
|
646
|
-
...
|
|
678
|
+
...kt(this.processedBlock),
|
|
647
679
|
builderContext: this.context,
|
|
648
680
|
...((t = this.blockComponent) == null ? void 0 : t.name) === "Core:Button" || ((n = this.blockComponent) == null ? void 0 : n.name) === "Symbol" || ((o = this.blockComponent) == null ? void 0 : o.name) === "Columns" || ((s = this.blockComponent) == null ? void 0 : s.name) === "Form:Form" ? {
|
|
649
681
|
builderLinkComponent: this.linkComponent
|
|
@@ -652,25 +684,25 @@ const Wt = ({
|
|
|
652
684
|
builderComponents: this.registeredComponents
|
|
653
685
|
} : {}
|
|
654
686
|
},
|
|
655
|
-
context: this.
|
|
687
|
+
context: this.context,
|
|
656
688
|
linkComponent: this.linkComponent,
|
|
657
689
|
registeredComponents: this.registeredComponents,
|
|
658
690
|
builderBlock: this.processedBlock,
|
|
659
691
|
includeBlockProps: ((l = this.blockComponent) == null ? void 0 : l.noWrap) === !0,
|
|
660
|
-
isInteractive: !((
|
|
692
|
+
isInteractive: !((c = this.blockComponent) != null && c.isRSC)
|
|
661
693
|
};
|
|
662
694
|
}
|
|
663
695
|
}
|
|
664
696
|
});
|
|
665
|
-
function
|
|
666
|
-
var
|
|
667
|
-
const i = k("block-styles"), a = k("component-ref"), l = k("block", !0),
|
|
697
|
+
function qt(e, t, n, o, s, r) {
|
|
698
|
+
var d;
|
|
699
|
+
const i = k("block-styles"), a = k("component-ref"), l = k("block", !0), c = k("block-wrapper"), m = k("repeated-block");
|
|
668
700
|
return e.canShowBlock ? (u(), h($, { key: 0 }, [
|
|
669
701
|
A(i, {
|
|
670
702
|
block: e.block,
|
|
671
703
|
context: e.context
|
|
672
704
|
}, null, 8, ["block", "context"]),
|
|
673
|
-
(
|
|
705
|
+
(d = e.blockComponent) != null && d.noWrap ? (u(), g(a, {
|
|
674
706
|
key: 1,
|
|
675
707
|
componentRef: e.componentRefProps.componentRef,
|
|
676
708
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -682,20 +714,20 @@ function Dt(e, t, n, o, s, r) {
|
|
|
682
714
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
683
715
|
isInteractive: e.componentRefProps.isInteractive
|
|
684
716
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"])) : (u(), h($, { key: 0 }, [
|
|
685
|
-
e.repeatItem ? (u(!0), h($, { key: 1 },
|
|
717
|
+
e.repeatItem ? (u(!0), h($, { key: 1 }, L(e.repeatItem, (p, S) => (u(), g(m, {
|
|
686
718
|
key: S,
|
|
687
719
|
repeatContext: p.context,
|
|
688
720
|
block: p.block,
|
|
689
721
|
registeredComponents: e.registeredComponents,
|
|
690
722
|
linkComponent: e.linkComponent
|
|
691
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (u(), g(
|
|
723
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (u(), g(c, {
|
|
692
724
|
key: 0,
|
|
693
725
|
Wrapper: e.Tag,
|
|
694
726
|
block: e.processedBlock,
|
|
695
727
|
context: e.context,
|
|
696
728
|
linkComponent: e.linkComponent
|
|
697
729
|
}, {
|
|
698
|
-
default:
|
|
730
|
+
default: B(() => [
|
|
699
731
|
A(a, {
|
|
700
732
|
componentRef: e.componentRefProps.componentRef,
|
|
701
733
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -707,23 +739,23 @@ function Dt(e, t, n, o, s, r) {
|
|
|
707
739
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
708
740
|
isInteractive: e.componentRefProps.isInteractive
|
|
709
741
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
710
|
-
(u(!0), h($, null,
|
|
742
|
+
(u(!0), h($, null, L(e.childrenWithoutParentComponent, (p, S) => (u(), g(l, {
|
|
711
743
|
key: p.id,
|
|
712
744
|
block: p,
|
|
713
|
-
context: e.childrenContext,
|
|
714
745
|
registeredComponents: e.registeredComponents,
|
|
715
|
-
linkComponent: e.linkComponent
|
|
716
|
-
|
|
746
|
+
linkComponent: e.linkComponent,
|
|
747
|
+
context: e.context
|
|
748
|
+
}, null, 8, ["block", "registeredComponents", "linkComponent", "context"]))), 128))
|
|
717
749
|
]),
|
|
718
750
|
_: 1
|
|
719
751
|
}, 8, ["Wrapper", "block", "context", "linkComponent"]))
|
|
720
752
|
], 64))
|
|
721
753
|
], 64)) : v("", !0);
|
|
722
754
|
}
|
|
723
|
-
const
|
|
755
|
+
const ue = /* @__PURE__ */ y(zt, [["render", qt]]), Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
724
756
|
__proto__: null,
|
|
725
|
-
default:
|
|
726
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
757
|
+
default: ue
|
|
758
|
+
}, Symbol.toStringTag, { value: "Module" })), Jt = f({
|
|
727
759
|
name: "builder-blocks-wrapper",
|
|
728
760
|
props: [
|
|
729
761
|
"BlocksWrapper",
|
|
@@ -768,8 +800,8 @@ const le = /* @__PURE__ */ y(Mt, [["render", Dt]]), Js = /* @__PURE__ */ Object.
|
|
|
768
800
|
}
|
|
769
801
|
}
|
|
770
802
|
});
|
|
771
|
-
function
|
|
772
|
-
return u(), g(
|
|
803
|
+
function Gt(e, t, n, o, s, r) {
|
|
804
|
+
return u(), g(H(e.BlocksWrapper), w({
|
|
773
805
|
class: e.className + " component-1o2kztlxdt6",
|
|
774
806
|
"builder-path": e.path,
|
|
775
807
|
"builder-parent-id": e.parent,
|
|
@@ -778,15 +810,15 @@ function jt(e, t, n, o, s, r) {
|
|
|
778
810
|
onMouseEnter: (i) => e.onMouseEnter(),
|
|
779
811
|
onKeyPress: (i) => e.onClick()
|
|
780
812
|
}, { ...e.BlocksWrapperProps }), {
|
|
781
|
-
default:
|
|
813
|
+
default: B(() => [
|
|
782
814
|
P(e.$slots, "default", {}, void 0, !0)
|
|
783
815
|
]),
|
|
784
816
|
_: 3
|
|
785
817
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
786
818
|
}
|
|
787
|
-
const
|
|
819
|
+
const Yt = /* @__PURE__ */ y(Jt, [["render", Gt], ["__scopeId", "data-v-b8add99a"]]), Qt = f({
|
|
788
820
|
name: "builder-blocks",
|
|
789
|
-
components: { BlocksWrapper:
|
|
821
|
+
components: { BlocksWrapper: Yt, Block: ue },
|
|
790
822
|
props: [
|
|
791
823
|
"blocks",
|
|
792
824
|
"parent",
|
|
@@ -797,12 +829,12 @@ const Kt = /* @__PURE__ */ y(Ht, [["render", jt], ["__scopeId", "data-v-6fabd81c
|
|
|
797
829
|
"registeredComponents"
|
|
798
830
|
],
|
|
799
831
|
inject: {
|
|
800
|
-
builderContext:
|
|
801
|
-
componentsContext:
|
|
832
|
+
builderContext: oe.key,
|
|
833
|
+
componentsContext: Pe.key
|
|
802
834
|
}
|
|
803
835
|
});
|
|
804
|
-
function
|
|
805
|
-
var l,
|
|
836
|
+
function Xt(e, t, n, o, s, r) {
|
|
837
|
+
var l, c;
|
|
806
838
|
const i = k("block"), a = k("blocks-wrapper");
|
|
807
839
|
return u(), g(a, {
|
|
808
840
|
blocks: e.blocks,
|
|
@@ -810,10 +842,10 @@ function qt(e, t, n, o, s, r) {
|
|
|
810
842
|
path: e.path,
|
|
811
843
|
styleProp: e.styleProp,
|
|
812
844
|
BlocksWrapper: ((l = e.context) == null ? void 0 : l.BlocksWrapper) || e.builderContext.BlocksWrapper,
|
|
813
|
-
BlocksWrapperProps: ((
|
|
845
|
+
BlocksWrapperProps: ((c = e.context) == null ? void 0 : c.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
|
|
814
846
|
}, {
|
|
815
|
-
default:
|
|
816
|
-
e.blocks ? (u(!0), h($, { key: 0 },
|
|
847
|
+
default: B(() => [
|
|
848
|
+
e.blocks ? (u(!0), h($, { key: 0 }, L(e.blocks, (m, d) => (u(), g(i, {
|
|
817
849
|
key: m.id,
|
|
818
850
|
block: m,
|
|
819
851
|
linkComponent: e.linkComponent,
|
|
@@ -824,13 +856,13 @@ function qt(e, t, n, o, s, r) {
|
|
|
824
856
|
_: 1
|
|
825
857
|
}, 8, ["blocks", "parent", "path", "styleProp", "BlocksWrapper", "BlocksWrapperProps"]);
|
|
826
858
|
}
|
|
827
|
-
const _ = /* @__PURE__ */ y(
|
|
859
|
+
const _ = /* @__PURE__ */ y(Qt, [["render", Xt]]), pe = f({
|
|
828
860
|
render() {
|
|
829
|
-
return
|
|
861
|
+
return Re("style", { id: this.id, innerHTML: this.styles });
|
|
830
862
|
},
|
|
831
863
|
name: "inlined-styles",
|
|
832
864
|
props: ["styles", "id"]
|
|
833
|
-
}),
|
|
865
|
+
}), Le = {
|
|
834
866
|
small: {
|
|
835
867
|
min: 320,
|
|
836
868
|
default: 321,
|
|
@@ -846,11 +878,11 @@ const _ = /* @__PURE__ */ y(zt, [["render", qt]]), ce = f({
|
|
|
846
878
|
default: 991,
|
|
847
879
|
max: 1200
|
|
848
880
|
}
|
|
849
|
-
},
|
|
881
|
+
}, er = (e, t = Le) => `@media (max-width: ${t[e].max}px)`, _t = ({
|
|
850
882
|
small: e,
|
|
851
883
|
medium: t
|
|
852
884
|
}) => {
|
|
853
|
-
const n =
|
|
885
|
+
const n = K(Le);
|
|
854
886
|
if (!e || !t)
|
|
855
887
|
return n;
|
|
856
888
|
const o = Math.floor(e / 2);
|
|
@@ -872,11 +904,11 @@ const _ = /* @__PURE__ */ y(zt, [["render", qt]]), ce = f({
|
|
|
872
904
|
min: r,
|
|
873
905
|
default: r + 1
|
|
874
906
|
}, n;
|
|
875
|
-
},
|
|
907
|
+
}, Zt = f({
|
|
876
908
|
name: "builder-columns",
|
|
877
909
|
components: {
|
|
878
|
-
InlinedStyles:
|
|
879
|
-
DynamicRenderer:
|
|
910
|
+
InlinedStyles: pe,
|
|
911
|
+
DynamicRenderer: ie,
|
|
880
912
|
Blocks: _
|
|
881
913
|
},
|
|
882
914
|
props: [
|
|
@@ -895,9 +927,9 @@ const _ = /* @__PURE__ */ y(zt, [["render", qt]]), ce = f({
|
|
|
895
927
|
cols: this.columns || [],
|
|
896
928
|
stackAt: this.stackColumnsAt || "tablet",
|
|
897
929
|
flexDir: this.stackColumnsAt === "never" ? "row" : this.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
898
|
-
TARGET:
|
|
899
|
-
getClassPropName:
|
|
900
|
-
mapStyleObjToStrIfNeeded:
|
|
930
|
+
TARGET: V,
|
|
931
|
+
getClassPropName: ae,
|
|
932
|
+
mapStyleObjToStrIfNeeded: Oe
|
|
901
933
|
};
|
|
902
934
|
},
|
|
903
935
|
computed: {
|
|
@@ -989,13 +1021,13 @@ const _ = /* @__PURE__ */ y(zt, [["render", qt]]), ce = f({
|
|
|
989
1021
|
},
|
|
990
1022
|
getWidthForBreakpointSize(e) {
|
|
991
1023
|
var n, o;
|
|
992
|
-
return
|
|
1024
|
+
return _t(
|
|
993
1025
|
((o = (n = this.builderContext.content) == null ? void 0 : n.meta) == null ? void 0 : o.breakpoints) || {}
|
|
994
1026
|
)[e].max;
|
|
995
1027
|
}
|
|
996
1028
|
}
|
|
997
1029
|
});
|
|
998
|
-
function
|
|
1030
|
+
function en(e, t, n, o, s, r) {
|
|
999
1031
|
const i = k("inlined-styles"), a = k("blocks"), l = k("dynamic-renderer");
|
|
1000
1032
|
return u(), h("div", w({
|
|
1001
1033
|
class: `builder-columns ${e.builderBlock.id}-breakpoints div-2fnk003dqad`,
|
|
@@ -1005,19 +1037,19 @@ function Yt(e, t, n, o, s, r) {
|
|
|
1005
1037
|
key: 0,
|
|
1006
1038
|
styles: e.columnsStyles
|
|
1007
1039
|
}, null, 8, ["styles"])) : v("", !0),
|
|
1008
|
-
(u(!0), h($, null,
|
|
1040
|
+
(u(!0), h($, null, L(e.columns, (c, m) => (u(), g(l, {
|
|
1009
1041
|
key: m,
|
|
1010
|
-
TagName:
|
|
1042
|
+
TagName: c.link ? e.builderLinkComponent || "a" : "div",
|
|
1011
1043
|
actionAttributes: {},
|
|
1012
1044
|
attributes: {
|
|
1013
|
-
...
|
|
1014
|
-
href:
|
|
1045
|
+
...c.link ? {
|
|
1046
|
+
href: c.link
|
|
1015
1047
|
} : {},
|
|
1016
1048
|
[e.getClassPropName()]: "builder-column",
|
|
1017
1049
|
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(m))
|
|
1018
1050
|
}
|
|
1019
1051
|
}, {
|
|
1020
|
-
default:
|
|
1052
|
+
default: B(() => [
|
|
1021
1053
|
A(a, {
|
|
1022
1054
|
path: `component.options.columns.${m}.blocks`,
|
|
1023
1055
|
parent: e.builderBlock.id,
|
|
@@ -1027,54 +1059,54 @@ function Yt(e, t, n, o, s, r) {
|
|
|
1027
1059
|
context: e.builderContext,
|
|
1028
1060
|
registeredComponents: e.builderComponents,
|
|
1029
1061
|
linkComponent: e.builderLinkComponent,
|
|
1030
|
-
blocks:
|
|
1062
|
+
blocks: c.blocks
|
|
1031
1063
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
|
|
1032
1064
|
]),
|
|
1033
1065
|
_: 2
|
|
1034
1066
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1035
1067
|
], 16);
|
|
1036
1068
|
}
|
|
1037
|
-
const
|
|
1069
|
+
const tn = /* @__PURE__ */ y(Zt, [["render", en], ["__scopeId", "data-v-d0d8b675"]]), nn = f({
|
|
1038
1070
|
name: "builder-fragment-component",
|
|
1039
1071
|
props: []
|
|
1040
1072
|
});
|
|
1041
|
-
function
|
|
1073
|
+
function on(e, t, n, o, s, r) {
|
|
1042
1074
|
return u(), h("span", null, [
|
|
1043
1075
|
P(e.$slots, "default")
|
|
1044
1076
|
]);
|
|
1045
1077
|
}
|
|
1046
|
-
const
|
|
1047
|
-
function
|
|
1078
|
+
const sn = /* @__PURE__ */ y(nn, [["render", on]]);
|
|
1079
|
+
function ye(e) {
|
|
1048
1080
|
return e.replace(/http(s)?:/, "");
|
|
1049
1081
|
}
|
|
1050
|
-
function
|
|
1082
|
+
function rn(e = "", t, n) {
|
|
1051
1083
|
const o = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), s = e.indexOf("?") !== -1 ? "&" : "?";
|
|
1052
1084
|
return e.match(o) ? e.replace(o, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + s + t + "=" + encodeURIComponent(n);
|
|
1053
1085
|
}
|
|
1054
|
-
function
|
|
1086
|
+
function an(e, t) {
|
|
1055
1087
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
1056
1088
|
return e;
|
|
1057
1089
|
if (t === "master")
|
|
1058
|
-
return
|
|
1090
|
+
return ye(e);
|
|
1059
1091
|
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
1060
1092
|
if (n) {
|
|
1061
1093
|
const o = e.split(n[0]), s = n[3], r = t.match("x") ? t : `${t}x`;
|
|
1062
|
-
return
|
|
1094
|
+
return ye(`${o[0]}_${r}${s}`);
|
|
1063
1095
|
}
|
|
1064
1096
|
return null;
|
|
1065
1097
|
}
|
|
1066
|
-
function
|
|
1098
|
+
function ee(e) {
|
|
1067
1099
|
if (!e)
|
|
1068
1100
|
return e;
|
|
1069
1101
|
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
1070
1102
|
if (e.match(/builder\.io/)) {
|
|
1071
1103
|
let n = e;
|
|
1072
1104
|
const o = Number(e.split("?width=")[1]);
|
|
1073
|
-
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${
|
|
1105
|
+
return isNaN(o) || (n = `${n} ${o}w`), t.filter((s) => s !== o).map((s) => `${rn(e, "width", s)} ${s}w`).concat([n]).join(", ");
|
|
1074
1106
|
}
|
|
1075
|
-
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [
|
|
1107
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [an(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, o]) => `${n} ${o}w`).concat([e]).join(", ") : e;
|
|
1076
1108
|
}
|
|
1077
|
-
const
|
|
1109
|
+
const ln = f({
|
|
1078
1110
|
name: "builder-image",
|
|
1079
1111
|
props: [
|
|
1080
1112
|
"image",
|
|
@@ -1100,10 +1132,10 @@ const nn = f({
|
|
|
1100
1132
|
return this.srcset;
|
|
1101
1133
|
if (this.srcset && ((n = this.image) != null && n.includes("builder.io/api/v1/image"))) {
|
|
1102
1134
|
if (!this.srcset.includes(this.image.split("?")[0]))
|
|
1103
|
-
return console.debug("Removed given srcset"),
|
|
1135
|
+
return console.debug("Removed given srcset"), ee(t);
|
|
1104
1136
|
} else if (this.image && !this.srcset)
|
|
1105
|
-
return
|
|
1106
|
-
return
|
|
1137
|
+
return ee(t);
|
|
1138
|
+
return ee(t);
|
|
1107
1139
|
},
|
|
1108
1140
|
webpSrcSet() {
|
|
1109
1141
|
var e;
|
|
@@ -1120,57 +1152,57 @@ const nn = f({
|
|
|
1120
1152
|
return this.aspectRatio ? e : void 0;
|
|
1121
1153
|
}
|
|
1122
1154
|
}
|
|
1123
|
-
}),
|
|
1155
|
+
}), cn = ["srcset"], dn = ["alt", "role", "src", "srcset", "sizes"], un = {
|
|
1124
1156
|
key: 2,
|
|
1125
1157
|
class: "div-1be3j8m9ewb-2"
|
|
1126
1158
|
};
|
|
1127
|
-
function
|
|
1128
|
-
var i, a, l,
|
|
1159
|
+
function pn(e, t, n, o, s, r) {
|
|
1160
|
+
var i, a, l, c;
|
|
1129
1161
|
return u(), h($, null, [
|
|
1130
|
-
|
|
1162
|
+
te("picture", null, [
|
|
1131
1163
|
e.webpSrcSet ? (u(), h("source", {
|
|
1132
1164
|
key: 0,
|
|
1133
1165
|
type: "image/webp",
|
|
1134
1166
|
srcset: e.webpSrcSet
|
|
1135
|
-
}, null, 8,
|
|
1136
|
-
|
|
1167
|
+
}, null, 8, cn)) : v("", !0),
|
|
1168
|
+
te("img", {
|
|
1137
1169
|
loading: "lazy",
|
|
1138
1170
|
alt: e.altText,
|
|
1139
1171
|
role: e.altText ? void 0 : "presentation",
|
|
1140
|
-
style:
|
|
1172
|
+
style: ne({
|
|
1141
1173
|
objectPosition: e.backgroundPosition || "center",
|
|
1142
1174
|
objectFit: e.backgroundSize || "cover",
|
|
1143
1175
|
...e.aspectRatioCss
|
|
1144
1176
|
}),
|
|
1145
|
-
class:
|
|
1177
|
+
class: Ee(
|
|
1146
1178
|
"builder-image" + (e.className ? " " + e.className : "") + " img-1be3j8m9ewb"
|
|
1147
1179
|
),
|
|
1148
1180
|
src: e.image,
|
|
1149
1181
|
srcset: e.srcSetToUse,
|
|
1150
1182
|
sizes: e.sizes
|
|
1151
|
-
}, null, 14,
|
|
1183
|
+
}, null, 14, dn)
|
|
1152
1184
|
]),
|
|
1153
1185
|
e.aspectRatio && !((a = (i = e.builderBlock) == null ? void 0 : i.children) != null && a.length && e.fitContent) ? (u(), h("div", {
|
|
1154
1186
|
key: 0,
|
|
1155
1187
|
class: "builder-image-sizer div-1be3j8m9ewb",
|
|
1156
|
-
style:
|
|
1188
|
+
style: ne({
|
|
1157
1189
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1158
1190
|
})
|
|
1159
1191
|
}, null, 4)) : v("", !0),
|
|
1160
|
-
(
|
|
1161
|
-
!e.fitContent && e.$slots.default ? (u(), h("div",
|
|
1192
|
+
(c = (l = e.builderBlock) == null ? void 0 : l.children) != null && c.length && e.fitContent ? P(e.$slots, "default", { key: 1 }, void 0, !0) : v("", !0),
|
|
1193
|
+
!e.fitContent && e.$slots.default ? (u(), h("div", un, [
|
|
1162
1194
|
P(e.$slots, "default", {}, void 0, !0)
|
|
1163
1195
|
])) : v("", !0)
|
|
1164
1196
|
], 64);
|
|
1165
1197
|
}
|
|
1166
|
-
const
|
|
1198
|
+
const mn = /* @__PURE__ */ y(ln, [["render", pn], ["__scopeId", "data-v-c23615d2"]]), hn = f({
|
|
1167
1199
|
name: "builder-section-component",
|
|
1168
1200
|
props: ["attributes", "maxWidth"],
|
|
1169
1201
|
data() {
|
|
1170
|
-
return { filterAttrs:
|
|
1202
|
+
return { filterAttrs: U };
|
|
1171
1203
|
}
|
|
1172
1204
|
});
|
|
1173
|
-
function
|
|
1205
|
+
function fn(e, t, n, o, s, r) {
|
|
1174
1206
|
return u(), h("section", w({
|
|
1175
1207
|
style: {
|
|
1176
1208
|
width: "100%",
|
|
@@ -1188,12 +1220,12 @@ function dn(e, t, n, o, s, r) {
|
|
|
1188
1220
|
P(e.$slots, "default")
|
|
1189
1221
|
], 16);
|
|
1190
1222
|
}
|
|
1191
|
-
const
|
|
1223
|
+
const bn = /* @__PURE__ */ y(hn, [["render", fn]]), gn = (e) => {
|
|
1192
1224
|
if (e === "localhost" || e === "127.0.0.1")
|
|
1193
1225
|
return e;
|
|
1194
1226
|
const t = e.split(".");
|
|
1195
1227
|
return t.length > 2 ? t.slice(1).join(".") : e;
|
|
1196
|
-
},
|
|
1228
|
+
}, Me = ({
|
|
1197
1229
|
name: e,
|
|
1198
1230
|
canTrack: t
|
|
1199
1231
|
}) => {
|
|
@@ -1204,14 +1236,14 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1204
1236
|
T.warn("[COOKIE] GET error: ", (o == null ? void 0 : o.message) || o);
|
|
1205
1237
|
return;
|
|
1206
1238
|
}
|
|
1207
|
-
},
|
|
1239
|
+
}, De = async (e) => Me(e), yn = (e) => e.map(([t, n]) => n ? `${t}=${n}` : t).filter(F).join("; "), kn = [["secure", ""], ["SameSite", "None"]], Sn = ({
|
|
1208
1240
|
name: e,
|
|
1209
1241
|
value: t,
|
|
1210
1242
|
expires: n
|
|
1211
1243
|
}) => {
|
|
1212
|
-
const s = (I() ? location.protocol === "https:" : !0) ?
|
|
1213
|
-
return
|
|
1214
|
-
},
|
|
1244
|
+
const s = (I() ? location.protocol === "https:" : !0) ? kn : [[]], r = n ? [["expires", n.toUTCString()]] : [[]], i = [[e, t], ...r, ["path", "/"], ["domain", gn(window.location.hostname)], ...s];
|
|
1245
|
+
return yn(i);
|
|
1246
|
+
}, He = async ({
|
|
1215
1247
|
name: e,
|
|
1216
1248
|
value: t,
|
|
1217
1249
|
expires: n,
|
|
@@ -1220,7 +1252,7 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1220
1252
|
try {
|
|
1221
1253
|
if (!o)
|
|
1222
1254
|
return;
|
|
1223
|
-
const s =
|
|
1255
|
+
const s = Sn({
|
|
1224
1256
|
name: e,
|
|
1225
1257
|
value: t,
|
|
1226
1258
|
expires: n
|
|
@@ -1229,24 +1261,24 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1229
1261
|
} catch (s) {
|
|
1230
1262
|
T.warn("[COOKIE] SET error: ", (s == null ? void 0 : s.message) || s);
|
|
1231
1263
|
}
|
|
1232
|
-
},
|
|
1264
|
+
}, vn = "builder.tests", me = (e) => `${vn}.${e}`, Cn = ({
|
|
1233
1265
|
contentId: e
|
|
1234
|
-
}) =>
|
|
1235
|
-
name:
|
|
1266
|
+
}) => De({
|
|
1267
|
+
name: me(e),
|
|
1236
1268
|
canTrack: !0
|
|
1237
|
-
}),
|
|
1269
|
+
}), wn = ({
|
|
1238
1270
|
contentId: e
|
|
1239
|
-
}) =>
|
|
1240
|
-
name:
|
|
1271
|
+
}) => Me({
|
|
1272
|
+
name: me(e),
|
|
1241
1273
|
canTrack: !0
|
|
1242
|
-
}),
|
|
1274
|
+
}), In = ({
|
|
1243
1275
|
contentId: e,
|
|
1244
1276
|
value: t
|
|
1245
|
-
}) =>
|
|
1246
|
-
name:
|
|
1277
|
+
}) => He({
|
|
1278
|
+
name: me(e),
|
|
1247
1279
|
value: t,
|
|
1248
1280
|
canTrack: !0
|
|
1249
|
-
}),
|
|
1281
|
+
}), je = (e) => F(e.id) && F(e.variations) && Object.keys(e.variations).length > 0, $n = ({
|
|
1250
1282
|
id: e,
|
|
1251
1283
|
variations: t
|
|
1252
1284
|
}) => {
|
|
@@ -1259,15 +1291,15 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1259
1291
|
return r;
|
|
1260
1292
|
}
|
|
1261
1293
|
return e;
|
|
1262
|
-
},
|
|
1263
|
-
const t =
|
|
1264
|
-
return
|
|
1294
|
+
}, Ke = (e) => {
|
|
1295
|
+
const t = $n(e);
|
|
1296
|
+
return In({
|
|
1265
1297
|
contentId: e.id,
|
|
1266
1298
|
value: t
|
|
1267
1299
|
}).catch((n) => {
|
|
1268
1300
|
T.error("could not store A/B test variation: ", n);
|
|
1269
1301
|
}), t;
|
|
1270
|
-
},
|
|
1302
|
+
}, ze = ({
|
|
1271
1303
|
item: e,
|
|
1272
1304
|
testGroupId: t
|
|
1273
1305
|
}) => {
|
|
@@ -1281,7 +1313,7 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1281
1313
|
testVariationId: n.id,
|
|
1282
1314
|
testVariationName: n.name || (n.id === e.id ? "Default" : "")
|
|
1283
1315
|
};
|
|
1284
|
-
},
|
|
1316
|
+
}, Tn = ({
|
|
1285
1317
|
item: e,
|
|
1286
1318
|
canTrack: t
|
|
1287
1319
|
}) => {
|
|
@@ -1289,14 +1321,14 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1289
1321
|
return e;
|
|
1290
1322
|
if (!e)
|
|
1291
1323
|
return;
|
|
1292
|
-
if (!
|
|
1324
|
+
if (!je(e))
|
|
1293
1325
|
return e;
|
|
1294
|
-
const n =
|
|
1326
|
+
const n = wn({
|
|
1295
1327
|
contentId: e.id
|
|
1296
|
-
}) ||
|
|
1328
|
+
}) || Ke({
|
|
1297
1329
|
variations: e.variations,
|
|
1298
1330
|
id: e.id
|
|
1299
|
-
}), o =
|
|
1331
|
+
}), o = ze({
|
|
1300
1332
|
item: e,
|
|
1301
1333
|
testGroupId: n
|
|
1302
1334
|
});
|
|
@@ -1304,18 +1336,18 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1304
1336
|
...e,
|
|
1305
1337
|
...o
|
|
1306
1338
|
};
|
|
1307
|
-
},
|
|
1339
|
+
}, Rn = async ({
|
|
1308
1340
|
item: e,
|
|
1309
1341
|
canTrack: t
|
|
1310
1342
|
}) => {
|
|
1311
|
-
if (!t || !
|
|
1343
|
+
if (!t || !je(e))
|
|
1312
1344
|
return e;
|
|
1313
|
-
const o = await
|
|
1345
|
+
const o = await Cn({
|
|
1314
1346
|
contentId: e.id
|
|
1315
|
-
}) ||
|
|
1347
|
+
}) || Ke({
|
|
1316
1348
|
variations: e.variations,
|
|
1317
1349
|
id: e.id
|
|
1318
|
-
}), s =
|
|
1350
|
+
}), s = ze({
|
|
1319
1351
|
item: e,
|
|
1320
1352
|
testGroupId: o
|
|
1321
1353
|
});
|
|
@@ -1323,7 +1355,7 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1323
1355
|
...e,
|
|
1324
1356
|
...s
|
|
1325
1357
|
};
|
|
1326
|
-
},
|
|
1358
|
+
}, j = (e) => F(e) ? e : !0, En = {
|
|
1327
1359
|
name: "Core:Button",
|
|
1328
1360
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1329
1361
|
defaultStyles: {
|
|
@@ -1356,7 +1388,7 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1356
1388
|
}],
|
|
1357
1389
|
static: !0,
|
|
1358
1390
|
noWrap: !0
|
|
1359
|
-
},
|
|
1391
|
+
}, Pn = {
|
|
1360
1392
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1361
1393
|
name: "Columns",
|
|
1362
1394
|
isRSC: !0,
|
|
@@ -1557,13 +1589,13 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1557
1589
|
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1558
1590
|
advanced: !0
|
|
1559
1591
|
}]
|
|
1560
|
-
},
|
|
1592
|
+
}, Vn = {
|
|
1561
1593
|
name: "Fragment",
|
|
1562
1594
|
static: !0,
|
|
1563
1595
|
hidden: !0,
|
|
1564
1596
|
canHaveChildren: !0,
|
|
1565
1597
|
noWrap: !0
|
|
1566
|
-
},
|
|
1598
|
+
}, xn = {
|
|
1567
1599
|
name: "Image",
|
|
1568
1600
|
static: !0,
|
|
1569
1601
|
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",
|
|
@@ -1584,15 +1616,15 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1584
1616
|
onChange: (e) => {
|
|
1585
1617
|
e.delete("srcset"), e.delete("noWebp");
|
|
1586
1618
|
function n(i, a = 6e4) {
|
|
1587
|
-
return new Promise((l,
|
|
1619
|
+
return new Promise((l, c) => {
|
|
1588
1620
|
const m = document.createElement("img");
|
|
1589
|
-
let
|
|
1621
|
+
let d = !1;
|
|
1590
1622
|
m.onload = () => {
|
|
1591
|
-
|
|
1623
|
+
d = !0, l(m);
|
|
1592
1624
|
}, m.addEventListener("error", (p) => {
|
|
1593
|
-
console.warn("Image load failed", p.error),
|
|
1625
|
+
console.warn("Image load failed", p.error), c(p.error);
|
|
1594
1626
|
}), m.src = i, setTimeout(() => {
|
|
1595
|
-
|
|
1627
|
+
d || c(new Error("Image load timed out"));
|
|
1596
1628
|
}, a);
|
|
1597
1629
|
});
|
|
1598
1630
|
}
|
|
@@ -1663,7 +1695,7 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1663
1695
|
advanced: !0,
|
|
1664
1696
|
defaultValue: 0.7041
|
|
1665
1697
|
}]
|
|
1666
|
-
},
|
|
1698
|
+
}, An = {
|
|
1667
1699
|
name: "Core:Section",
|
|
1668
1700
|
static: !0,
|
|
1669
1701
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -1702,7 +1734,7 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1702
1734
|
}
|
|
1703
1735
|
}
|
|
1704
1736
|
}]
|
|
1705
|
-
},
|
|
1737
|
+
}, Bn = {
|
|
1706
1738
|
name: "Slot",
|
|
1707
1739
|
isRSC: !0,
|
|
1708
1740
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -1715,13 +1747,13 @@ const un = /* @__PURE__ */ y(cn, [["render", dn]]), pn = (e) => {
|
|
|
1715
1747
|
required: !0,
|
|
1716
1748
|
defaultValue: "children"
|
|
1717
1749
|
}]
|
|
1718
|
-
},
|
|
1750
|
+
}, Wn = f({
|
|
1719
1751
|
name: "builder-slot",
|
|
1720
1752
|
components: { Blocks: _ },
|
|
1721
1753
|
props: ["js", "builderContext", "name"]
|
|
1722
1754
|
});
|
|
1723
|
-
function
|
|
1724
|
-
var a, l,
|
|
1755
|
+
function Nn(e, t, n, o, s, r) {
|
|
1756
|
+
var a, l, c;
|
|
1725
1757
|
const i = k("blocks");
|
|
1726
1758
|
return u(), h("div", w(
|
|
1727
1759
|
{ style: {
|
|
@@ -1735,11 +1767,11 @@ function xn(e, t, n, o, s, r) {
|
|
|
1735
1767
|
parent: (l = e.builderContext.context) == null ? void 0 : l.symbolId,
|
|
1736
1768
|
path: `symbol.data.${e.name}`,
|
|
1737
1769
|
context: e.builderContext,
|
|
1738
|
-
blocks: (
|
|
1770
|
+
blocks: (c = e.builderContext.rootState) == null ? void 0 : c[e.name]
|
|
1739
1771
|
}, null, 8, ["parent", "path", "context", "blocks"])
|
|
1740
1772
|
], 16);
|
|
1741
1773
|
}
|
|
1742
|
-
const
|
|
1774
|
+
const Fn = /* @__PURE__ */ y(Wn, [["render", Nn]]), Un = {
|
|
1743
1775
|
name: "Symbol",
|
|
1744
1776
|
noWrap: !0,
|
|
1745
1777
|
static: !0,
|
|
@@ -1772,7 +1804,7 @@ const An = /* @__PURE__ */ y(Pn, [["render", xn]]), Vn = {
|
|
|
1772
1804
|
hideFromUI: !0,
|
|
1773
1805
|
type: "boolean"
|
|
1774
1806
|
}]
|
|
1775
|
-
},
|
|
1807
|
+
}, On = {
|
|
1776
1808
|
name: "Text",
|
|
1777
1809
|
static: !0,
|
|
1778
1810
|
isRSC: !0,
|
|
@@ -1790,11 +1822,11 @@ const An = /* @__PURE__ */ y(Pn, [["render", xn]]), Vn = {
|
|
|
1790
1822
|
height: "auto",
|
|
1791
1823
|
textAlign: "center"
|
|
1792
1824
|
}
|
|
1793
|
-
},
|
|
1825
|
+
}, Ln = f({
|
|
1794
1826
|
name: "builder-text",
|
|
1795
1827
|
props: ["text"]
|
|
1796
|
-
}),
|
|
1797
|
-
function
|
|
1828
|
+
}), Mn = ["innerHTML"];
|
|
1829
|
+
function Dn(e, t, n, o, s, r) {
|
|
1798
1830
|
var i;
|
|
1799
1831
|
return u(), h("div", {
|
|
1800
1832
|
class: "builder-text",
|
|
@@ -1802,9 +1834,9 @@ function Fn(e, t, n, o, s, r) {
|
|
|
1802
1834
|
style: {
|
|
1803
1835
|
outline: "none"
|
|
1804
1836
|
}
|
|
1805
|
-
}, null, 8,
|
|
1837
|
+
}, null, 8, Mn);
|
|
1806
1838
|
}
|
|
1807
|
-
const
|
|
1839
|
+
const Hn = /* @__PURE__ */ y(Ln, [["render", Dn]]), jn = {
|
|
1808
1840
|
name: "Custom Code",
|
|
1809
1841
|
static: !0,
|
|
1810
1842
|
requiredPermissions: ["editCode"],
|
|
@@ -1826,7 +1858,7 @@ const Un = /* @__PURE__ */ y(Wn, [["render", Fn]]), On = {
|
|
|
1826
1858
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1827
1859
|
advanced: !0
|
|
1828
1860
|
}]
|
|
1829
|
-
},
|
|
1861
|
+
}, Kn = f({
|
|
1830
1862
|
name: "builder-custom-code",
|
|
1831
1863
|
props: ["replaceNodes", "code"],
|
|
1832
1864
|
data() {
|
|
@@ -1860,15 +1892,15 @@ const Un = /* @__PURE__ */ y(Wn, [["render", Fn]]), On = {
|
|
|
1860
1892
|
}
|
|
1861
1893
|
}
|
|
1862
1894
|
}
|
|
1863
|
-
}),
|
|
1864
|
-
function
|
|
1895
|
+
}), zn = ["innerHTML"];
|
|
1896
|
+
function qn(e, t, n, o, s, r) {
|
|
1865
1897
|
return u(), h("div", {
|
|
1866
1898
|
ref: "elementRef",
|
|
1867
|
-
class:
|
|
1899
|
+
class: Ee("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
1868
1900
|
innerHTML: e.code
|
|
1869
|
-
}, null, 10,
|
|
1901
|
+
}, null, 10, zn);
|
|
1870
1902
|
}
|
|
1871
|
-
const
|
|
1903
|
+
const Jn = /* @__PURE__ */ y(Kn, [["render", qn]]), Gn = {
|
|
1872
1904
|
name: "Embed",
|
|
1873
1905
|
static: !0,
|
|
1874
1906
|
inputs: [{
|
|
@@ -1893,7 +1925,7 @@ const Hn = /* @__PURE__ */ y(Ln, [["render", Dn]]), jn = {
|
|
|
1893
1925
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1894
1926
|
hideFromUI: !0
|
|
1895
1927
|
}]
|
|
1896
|
-
},
|
|
1928
|
+
}, Yn = ["text/javascript", "application/javascript", "application/ecmascript"], Qn = (e) => Yn.includes(e.type), Xn = f({
|
|
1897
1929
|
name: "builder-embed",
|
|
1898
1930
|
props: ["content"],
|
|
1899
1931
|
data() {
|
|
@@ -1926,7 +1958,7 @@ const Hn = /* @__PURE__ */ y(Ln, [["render", Dn]]), jn = {
|
|
|
1926
1958
|
this.scriptsInserted.push(n.src);
|
|
1927
1959
|
const o = document.createElement("script");
|
|
1928
1960
|
o.async = !0, o.src = n.src, document.head.appendChild(o);
|
|
1929
|
-
} else if (
|
|
1961
|
+
} else if (Qn(n) && !this.scriptsRun.includes(n.innerText))
|
|
1930
1962
|
try {
|
|
1931
1963
|
this.scriptsRun.push(n.innerText), new Function(n.innerText)();
|
|
1932
1964
|
} catch (o) {
|
|
@@ -1935,15 +1967,15 @@ const Hn = /* @__PURE__ */ y(Ln, [["render", Dn]]), jn = {
|
|
|
1935
1967
|
}
|
|
1936
1968
|
}
|
|
1937
1969
|
}
|
|
1938
|
-
}),
|
|
1939
|
-
function
|
|
1970
|
+
}), _n = ["innerHTML"];
|
|
1971
|
+
function Zn(e, t, n, o, s, r) {
|
|
1940
1972
|
return u(), h("div", {
|
|
1941
1973
|
class: "builder-embed",
|
|
1942
1974
|
ref: "elem",
|
|
1943
1975
|
innerHTML: e.content
|
|
1944
|
-
}, null, 8,
|
|
1976
|
+
}, null, 8, _n);
|
|
1945
1977
|
}
|
|
1946
|
-
const
|
|
1978
|
+
const eo = /* @__PURE__ */ y(Xn, [["render", Zn]]), to = {
|
|
1947
1979
|
name: "Form:Form",
|
|
1948
1980
|
// editableTags: ['builder-form-error']
|
|
1949
1981
|
defaults: {
|
|
@@ -2174,15 +2206,15 @@ const Yn = /* @__PURE__ */ y(qn, [["render", Gn]]), _n = {
|
|
|
2174
2206
|
}
|
|
2175
2207
|
}
|
|
2176
2208
|
}]
|
|
2177
|
-
},
|
|
2209
|
+
}, no = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], oo = () => {
|
|
2178
2210
|
const e = process.env.NODE_ENV || "production";
|
|
2179
|
-
return
|
|
2180
|
-
},
|
|
2211
|
+
return no.includes(e) ? e : "production";
|
|
2212
|
+
}, so = (e, t, n) => {
|
|
2181
2213
|
const o = String.prototype.split.call(t, /[,[\].]+?/).filter(Boolean).reduce((s, r) => s != null ? s[r] : s, e);
|
|
2182
2214
|
return o === void 0 || o === e ? n : o;
|
|
2183
|
-
},
|
|
2215
|
+
}, ro = f({
|
|
2184
2216
|
name: "builder-form-component",
|
|
2185
|
-
components: { Block:
|
|
2217
|
+
components: { Block: ue, Blocks: _ },
|
|
2186
2218
|
props: [
|
|
2187
2219
|
"js",
|
|
2188
2220
|
"builderContext",
|
|
@@ -2212,7 +2244,7 @@ const Yn = /* @__PURE__ */ y(qn, [["render", Gn]]), _n = {
|
|
|
2212
2244
|
formState: "unsubmitted",
|
|
2213
2245
|
responseData: null,
|
|
2214
2246
|
formErrorMessage: "",
|
|
2215
|
-
filterAttrs:
|
|
2247
|
+
filterAttrs: U
|
|
2216
2248
|
};
|
|
2217
2249
|
},
|
|
2218
2250
|
methods: {
|
|
@@ -2242,51 +2274,51 @@ const Yn = /* @__PURE__ */ y(qn, [["render", Gn]]), _n = {
|
|
|
2242
2274
|
let r;
|
|
2243
2275
|
const i = new FormData(o), a = Array.from(
|
|
2244
2276
|
e.currentTarget.querySelectorAll("input,select,textarea")
|
|
2245
|
-
).filter((
|
|
2277
|
+
).filter((d) => !!d.name).map((d) => {
|
|
2246
2278
|
let p;
|
|
2247
|
-
const S =
|
|
2248
|
-
if (
|
|
2249
|
-
if (
|
|
2250
|
-
if (
|
|
2251
|
-
return p =
|
|
2279
|
+
const S = d.name;
|
|
2280
|
+
if (d instanceof HTMLInputElement)
|
|
2281
|
+
if (d.type === "radio") {
|
|
2282
|
+
if (d.checked)
|
|
2283
|
+
return p = d.name, {
|
|
2252
2284
|
key: S,
|
|
2253
2285
|
value: p
|
|
2254
2286
|
};
|
|
2255
|
-
} else if (
|
|
2256
|
-
p =
|
|
2257
|
-
else if (
|
|
2258
|
-
const b =
|
|
2287
|
+
} else if (d.type === "checkbox")
|
|
2288
|
+
p = d.checked;
|
|
2289
|
+
else if (d.type === "number" || d.type === "range") {
|
|
2290
|
+
const b = d.valueAsNumber;
|
|
2259
2291
|
isNaN(b) || (p = b);
|
|
2260
2292
|
} else
|
|
2261
|
-
|
|
2293
|
+
d.type === "file" ? p = d.files : p = d.value;
|
|
2262
2294
|
else
|
|
2263
|
-
p =
|
|
2295
|
+
p = d.value;
|
|
2264
2296
|
return {
|
|
2265
2297
|
key: S,
|
|
2266
2298
|
value: p
|
|
2267
2299
|
};
|
|
2268
2300
|
});
|
|
2269
2301
|
let l = this.contentType;
|
|
2270
|
-
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value:
|
|
2271
|
-
(
|
|
2302
|
+
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value: d }) => {
|
|
2303
|
+
(d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (l = "multipart/form-data");
|
|
2272
2304
|
}), l !== "application/json")
|
|
2273
2305
|
r = i;
|
|
2274
2306
|
else {
|
|
2275
|
-
const
|
|
2307
|
+
const d = {};
|
|
2276
2308
|
Array.from(a).forEach(({ value: p, key: S }) => {
|
|
2277
|
-
|
|
2278
|
-
}), r = JSON.stringify(
|
|
2309
|
+
We(d, S, p);
|
|
2310
|
+
}), r = JSON.stringify(d);
|
|
2279
2311
|
}
|
|
2280
2312
|
l && l !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (s["content-type"] = l));
|
|
2281
|
-
const
|
|
2313
|
+
const c = new CustomEvent("presubmit", {
|
|
2282
2314
|
detail: {
|
|
2283
2315
|
body: r
|
|
2284
2316
|
}
|
|
2285
2317
|
});
|
|
2286
|
-
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2318
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(c), c.defaultPrevented))
|
|
2287
2319
|
return;
|
|
2288
2320
|
this.formState = "sending";
|
|
2289
|
-
const m = `${
|
|
2321
|
+
const m = `${oo() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
2290
2322
|
this.sendSubmissionsToEmail || ""
|
|
2291
2323
|
)}&name=${encodeURIComponent(this.name || "")}`;
|
|
2292
2324
|
fetch(
|
|
@@ -2297,19 +2329,19 @@ const Yn = /* @__PURE__ */ y(qn, [["render", Gn]]), _n = {
|
|
|
2297
2329
|
method: this.method || "post"
|
|
2298
2330
|
}
|
|
2299
2331
|
).then(
|
|
2300
|
-
async (
|
|
2332
|
+
async (d) => {
|
|
2301
2333
|
let p;
|
|
2302
|
-
const S =
|
|
2303
|
-
if (S && S.indexOf("application/json") !== -1 ? p = await
|
|
2304
|
-
let b =
|
|
2334
|
+
const S = d.headers.get("content-type");
|
|
2335
|
+
if (S && S.indexOf("application/json") !== -1 ? p = await d.json() : p = await d.text(), !d.ok && this.errorMessagePath) {
|
|
2336
|
+
let b = so(p, this.errorMessagePath);
|
|
2305
2337
|
b && (typeof b != "string" && (b = JSON.stringify(b)), this.formErrorMessage = b, this.mergeNewRootState({
|
|
2306
2338
|
formErrorMessage: b
|
|
2307
2339
|
}));
|
|
2308
2340
|
}
|
|
2309
|
-
if (this.responseData = p, this.formState =
|
|
2341
|
+
if (this.responseData = p, this.formState = d.ok ? "success" : "error", d.ok) {
|
|
2310
2342
|
const b = new CustomEvent("submit:success", {
|
|
2311
2343
|
detail: {
|
|
2312
|
-
res:
|
|
2344
|
+
res: d,
|
|
2313
2345
|
body: p
|
|
2314
2346
|
}
|
|
2315
2347
|
});
|
|
@@ -2320,33 +2352,33 @@ const Yn = /* @__PURE__ */ y(qn, [["render", Gn]]), _n = {
|
|
|
2320
2352
|
}
|
|
2321
2353
|
if (this.successUrl)
|
|
2322
2354
|
if (this.$refs.formRef) {
|
|
2323
|
-
const
|
|
2355
|
+
const W = new CustomEvent("route", {
|
|
2324
2356
|
detail: {
|
|
2325
2357
|
url: this.successUrl
|
|
2326
2358
|
}
|
|
2327
2359
|
});
|
|
2328
|
-
this.$refs.formRef.dispatchEvent(
|
|
2360
|
+
this.$refs.formRef.dispatchEvent(W), W.defaultPrevented || (location.href = this.successUrl);
|
|
2329
2361
|
} else
|
|
2330
2362
|
location.href = this.successUrl;
|
|
2331
2363
|
}
|
|
2332
2364
|
},
|
|
2333
|
-
(
|
|
2365
|
+
(d) => {
|
|
2334
2366
|
const p = new CustomEvent("submit:error", {
|
|
2335
2367
|
detail: {
|
|
2336
|
-
error:
|
|
2368
|
+
error: d
|
|
2337
2369
|
}
|
|
2338
2370
|
});
|
|
2339
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData =
|
|
2371
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData = d, this.formState = "error");
|
|
2340
2372
|
}
|
|
2341
2373
|
);
|
|
2342
2374
|
}
|
|
2343
2375
|
}
|
|
2344
2376
|
}
|
|
2345
|
-
}),
|
|
2377
|
+
}), io = ["validate", "action", "method", "name"], ao = {
|
|
2346
2378
|
key: 3,
|
|
2347
2379
|
class: "builder-form-error-text pre-5vz8uirn7sc"
|
|
2348
2380
|
};
|
|
2349
|
-
function
|
|
2381
|
+
function lo(e, t, n, o, s, r) {
|
|
2350
2382
|
var l;
|
|
2351
2383
|
const i = k("block"), a = k("blocks");
|
|
2352
2384
|
return u(), h("form", w({
|
|
@@ -2355,11 +2387,11 @@ function oo(e, t, n, o, s, r) {
|
|
|
2355
2387
|
action: !e.sendWithJs && e.action,
|
|
2356
2388
|
method: e.method,
|
|
2357
2389
|
name: e.name,
|
|
2358
|
-
onSubmit: t[0] || (t[0] = (
|
|
2390
|
+
onSubmit: t[0] || (t[0] = (c) => e.onSubmit(c))
|
|
2359
2391
|
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2360
|
-
e.builderBlock && e.builderBlock.children ? (u(!0), h($, { key: 0 },
|
|
2392
|
+
e.builderBlock && e.builderBlock.children ? (u(!0), h($, { key: 0 }, L((l = e.builderBlock) == null ? void 0 : l.children, (c, m) => (u(), g(i, {
|
|
2361
2393
|
key: `form-block-${e.idx}`,
|
|
2362
|
-
block:
|
|
2394
|
+
block: c,
|
|
2363
2395
|
context: e.builderContext,
|
|
2364
2396
|
registeredComponents: e.builderComponents,
|
|
2365
2397
|
linkComponent: e.builderLinkComponent
|
|
@@ -2376,17 +2408,16 @@ function oo(e, t, n, o, s, r) {
|
|
|
2376
2408
|
blocks: e.sendingMessage,
|
|
2377
2409
|
context: e.builderContext
|
|
2378
2410
|
}, null, 8, ["blocks", "context"])) : v("", !0),
|
|
2379
|
-
e.submissionState() === "error" && e.responseData ? (u(), h("pre",
|
|
2380
|
-
`, 1)) : v("", !0),
|
|
2411
|
+
e.submissionState() === "error" && e.responseData ? (u(), h("pre", ao, X(JSON.stringify(e.responseData, null, 2)), 1)) : v("", !0),
|
|
2381
2412
|
e.submissionState() === "success" ? (u(), g(a, {
|
|
2382
2413
|
key: 4,
|
|
2383
2414
|
path: "successMessage",
|
|
2384
2415
|
blocks: e.successMessage,
|
|
2385
2416
|
context: e.builderContext
|
|
2386
2417
|
}, null, 8, ["blocks", "context"])) : v("", !0)
|
|
2387
|
-
], 16,
|
|
2418
|
+
], 16, io);
|
|
2388
2419
|
}
|
|
2389
|
-
const
|
|
2420
|
+
const co = /* @__PURE__ */ y(ro, [["render", lo], ["__scopeId", "data-v-541b06ed"]]), uo = {
|
|
2390
2421
|
name: "Form:Input",
|
|
2391
2422
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2392
2423
|
inputs: [
|
|
@@ -2437,7 +2468,7 @@ const so = /* @__PURE__ */ y(eo, [["render", oo], ["__scopeId", "data-v-c1bb70af
|
|
|
2437
2468
|
borderStyle: "solid",
|
|
2438
2469
|
borderColor: "#ccc"
|
|
2439
2470
|
}
|
|
2440
|
-
},
|
|
2471
|
+
}, po = f({
|
|
2441
2472
|
name: "builder-form-input-component",
|
|
2442
2473
|
props: [
|
|
2443
2474
|
"attributes",
|
|
@@ -2449,10 +2480,10 @@ const so = /* @__PURE__ */ y(eo, [["render", oo], ["__scopeId", "data-v-c1bb70af
|
|
|
2449
2480
|
"required"
|
|
2450
2481
|
],
|
|
2451
2482
|
data() {
|
|
2452
|
-
return { isEditing: R, filterAttrs:
|
|
2483
|
+
return { isEditing: R, filterAttrs: U };
|
|
2453
2484
|
}
|
|
2454
|
-
}),
|
|
2455
|
-
function
|
|
2485
|
+
}), mo = ["placeholder", "type", "name", "value", "defaultValue", "required"];
|
|
2486
|
+
function ho(e, t, n, o, s, r) {
|
|
2456
2487
|
return u(), h("input", w({
|
|
2457
2488
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2458
2489
|
placeholder: e.placeholder,
|
|
@@ -2461,9 +2492,9 @@ function lo(e, t, n, o, s, r) {
|
|
|
2461
2492
|
value: e.value,
|
|
2462
2493
|
defaultValue: e.defaultValue,
|
|
2463
2494
|
required: e.required
|
|
2464
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
2495
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, mo);
|
|
2465
2496
|
}
|
|
2466
|
-
const
|
|
2497
|
+
const fo = /* @__PURE__ */ y(po, [["render", ho]]), bo = {
|
|
2467
2498
|
name: "Form:Select",
|
|
2468
2499
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
2469
2500
|
defaultStyles: {
|
|
@@ -2505,27 +2536,27 @@ const co = /* @__PURE__ */ y(io, [["render", lo]]), uo = {
|
|
|
2505
2536
|
}],
|
|
2506
2537
|
static: !0,
|
|
2507
2538
|
noWrap: !0
|
|
2508
|
-
},
|
|
2539
|
+
}, go = f({
|
|
2509
2540
|
name: "builder-select-component",
|
|
2510
2541
|
props: ["attributes", "value", "defaultValue", "name", "options"],
|
|
2511
2542
|
data() {
|
|
2512
|
-
return { isEditing: R, filterAttrs:
|
|
2543
|
+
return { isEditing: R, filterAttrs: U };
|
|
2513
2544
|
}
|
|
2514
|
-
}),
|
|
2515
|
-
function
|
|
2545
|
+
}), yo = ["value", "defaultValue", "name"], ko = ["value"];
|
|
2546
|
+
function So(e, t, n, o, s, r) {
|
|
2516
2547
|
return u(), h("select", w({
|
|
2517
2548
|
value: e.value,
|
|
2518
2549
|
key: e.isEditing() && e.defaultValue ? e.defaultValue : "default-key",
|
|
2519
2550
|
defaultValue: e.defaultValue,
|
|
2520
2551
|
name: e.name
|
|
2521
2552
|
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2522
|
-
(u(!0), h($, null,
|
|
2553
|
+
(u(!0), h($, null, L(e.options, (i, a) => (u(), h("option", {
|
|
2523
2554
|
key: a,
|
|
2524
2555
|
value: i.value
|
|
2525
|
-
},
|
|
2526
|
-
], 16,
|
|
2556
|
+
}, X(i.name || i.value), 9, ko))), 128))
|
|
2557
|
+
], 16, yo);
|
|
2527
2558
|
}
|
|
2528
|
-
const
|
|
2559
|
+
const vo = /* @__PURE__ */ y(go, [["render", So]]), Co = {
|
|
2529
2560
|
name: "Form:SubmitButton",
|
|
2530
2561
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
2531
2562
|
defaultStyles: {
|
|
@@ -2550,17 +2581,17 @@ const bo = /* @__PURE__ */ y(po, [["render", fo]]), go = {
|
|
|
2550
2581
|
// that only shows if advanced setting is flipped
|
|
2551
2582
|
// TODO: defaultChildren
|
|
2552
2583
|
// canHaveChildren: true,
|
|
2553
|
-
},
|
|
2584
|
+
}, wo = f({
|
|
2554
2585
|
name: "builder-submit-button",
|
|
2555
2586
|
props: ["attributes", "text"],
|
|
2556
2587
|
data() {
|
|
2557
|
-
return { filterAttrs:
|
|
2588
|
+
return { filterAttrs: U };
|
|
2558
2589
|
}
|
|
2559
2590
|
});
|
|
2560
|
-
function
|
|
2561
|
-
return u(), h("button", w({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)),
|
|
2591
|
+
function Io(e, t, n, o, s, r) {
|
|
2592
|
+
return u(), h("button", w({ type: "submit" }, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), X(e.text), 17);
|
|
2562
2593
|
}
|
|
2563
|
-
const
|
|
2594
|
+
const $o = /* @__PURE__ */ y(wo, [["render", Io]]), To = {
|
|
2564
2595
|
// friendlyName?
|
|
2565
2596
|
name: "Raw:Img",
|
|
2566
2597
|
hideFromInsertMenu: !0,
|
|
@@ -2574,7 +2605,7 @@ const So = /* @__PURE__ */ y(yo, [["render", ko]]), vo = {
|
|
|
2574
2605
|
}],
|
|
2575
2606
|
noWrap: !0,
|
|
2576
2607
|
static: !0
|
|
2577
|
-
},
|
|
2608
|
+
}, Ro = f({
|
|
2578
2609
|
name: "builder-img-component",
|
|
2579
2610
|
props: [
|
|
2580
2611
|
"backgroundSize",
|
|
@@ -2585,10 +2616,10 @@ const So = /* @__PURE__ */ y(yo, [["render", ko]]), vo = {
|
|
|
2585
2616
|
"attributes"
|
|
2586
2617
|
],
|
|
2587
2618
|
data() {
|
|
2588
|
-
return { isEditing: R, filterAttrs:
|
|
2619
|
+
return { isEditing: R, filterAttrs: U };
|
|
2589
2620
|
}
|
|
2590
|
-
}),
|
|
2591
|
-
function
|
|
2621
|
+
}), Eo = ["alt", "src"];
|
|
2622
|
+
function Po(e, t, n, o, s, r) {
|
|
2592
2623
|
return u(), h("img", w({
|
|
2593
2624
|
style: {
|
|
2594
2625
|
objectFit: e.backgroundSize || "cover",
|
|
@@ -2597,9 +2628,9 @@ function Io(e, t, n, o, s, r) {
|
|
|
2597
2628
|
key: e.isEditing() && e.imgSrc || "default-key",
|
|
2598
2629
|
alt: e.altText,
|
|
2599
2630
|
src: e.imgSrc || e.image
|
|
2600
|
-
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16,
|
|
2631
|
+
}, e.filterAttrs(e.attributes, "v-on:", !1), E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), null, 16, Eo);
|
|
2601
2632
|
}
|
|
2602
|
-
const
|
|
2633
|
+
const Vo = /* @__PURE__ */ y(Ro, [["render", Po]]), xo = {
|
|
2603
2634
|
name: "Video",
|
|
2604
2635
|
canHaveChildren: !0,
|
|
2605
2636
|
defaultStyles: {
|
|
@@ -2680,7 +2711,7 @@ const $o = /* @__PURE__ */ y(Co, [["render", Io]]), To = {
|
|
|
2680
2711
|
defaultValue: !0,
|
|
2681
2712
|
advanced: !0
|
|
2682
2713
|
}]
|
|
2683
|
-
},
|
|
2714
|
+
}, Ao = f({
|
|
2684
2715
|
name: "builder-video",
|
|
2685
2716
|
props: [
|
|
2686
2717
|
"autoPlay",
|
|
@@ -2725,16 +2756,16 @@ const $o = /* @__PURE__ */ y(Co, [["render", Io]]), To = {
|
|
|
2725
2756
|
};
|
|
2726
2757
|
}
|
|
2727
2758
|
}
|
|
2728
|
-
}),
|
|
2759
|
+
}), Bo = { style: {
|
|
2729
2760
|
position: "relative"
|
|
2730
|
-
} },
|
|
2761
|
+
} }, Wo = ["preload", "src", "poster"], No = ["src"], Fo = {
|
|
2731
2762
|
key: 1,
|
|
2732
2763
|
style: {
|
|
2733
2764
|
display: "flex",
|
|
2734
2765
|
flexDirection: "column",
|
|
2735
2766
|
alignItems: "stretch"
|
|
2736
2767
|
}
|
|
2737
|
-
},
|
|
2768
|
+
}, Uo = {
|
|
2738
2769
|
key: 2,
|
|
2739
2770
|
style: {
|
|
2740
2771
|
pointerEvents: "none",
|
|
@@ -2748,10 +2779,10 @@ const $o = /* @__PURE__ */ y(Co, [["render", Io]]), To = {
|
|
|
2748
2779
|
height: "100%"
|
|
2749
2780
|
}
|
|
2750
2781
|
};
|
|
2751
|
-
function
|
|
2752
|
-
var i, a, l,
|
|
2753
|
-
return u(), h("div",
|
|
2754
|
-
|
|
2782
|
+
function Oo(e, t, n, o, s, r) {
|
|
2783
|
+
var i, a, l, c, m, d, p;
|
|
2784
|
+
return u(), h("div", Bo, [
|
|
2785
|
+
te("video", w({
|
|
2755
2786
|
class: "builder-video",
|
|
2756
2787
|
preload: e.preload || "metadata",
|
|
2757
2788
|
style: {
|
|
@@ -2775,89 +2806,89 @@ function Bo(e, t, n, o, s, r) {
|
|
|
2775
2806
|
key: 0,
|
|
2776
2807
|
type: "video/mp4",
|
|
2777
2808
|
src: e.video
|
|
2778
|
-
}, null, 8,
|
|
2779
|
-
], 16,
|
|
2809
|
+
}, null, 8, No))
|
|
2810
|
+
], 16, Wo),
|
|
2780
2811
|
e.aspectRatio && !(e.fitContent && ((l = (a = e.builderBlock) == null ? void 0 : a.children) != null && l.length)) ? (u(), h("div", {
|
|
2781
2812
|
key: 0,
|
|
2782
|
-
style:
|
|
2813
|
+
style: ne({
|
|
2783
2814
|
width: "100%",
|
|
2784
2815
|
paddingTop: e.aspectRatio * 100 + "%",
|
|
2785
2816
|
pointerEvents: "none",
|
|
2786
2817
|
fontSize: "0px"
|
|
2787
2818
|
})
|
|
2788
2819
|
}, null, 4)) : v("", !0),
|
|
2789
|
-
(m = (
|
|
2820
|
+
(m = (c = e.builderBlock) == null ? void 0 : c.children) != null && m.length && e.fitContent ? (u(), h("div", Fo, [
|
|
2790
2821
|
P(e.$slots, "default")
|
|
2791
2822
|
])) : v("", !0),
|
|
2792
|
-
(p = (
|
|
2823
|
+
(p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && !e.fitContent ? (u(), h("div", Uo, [
|
|
2793
2824
|
P(e.$slots, "default")
|
|
2794
2825
|
])) : v("", !0)
|
|
2795
2826
|
]);
|
|
2796
2827
|
}
|
|
2797
|
-
const
|
|
2798
|
-
component:
|
|
2799
|
-
...On
|
|
2800
|
-
}, {
|
|
2801
|
-
component: Yn,
|
|
2828
|
+
const Lo = /* @__PURE__ */ y(Ao, [["render", Oo]]), Mo = () => [{
|
|
2829
|
+
component: Jn,
|
|
2802
2830
|
...jn
|
|
2803
2831
|
}, {
|
|
2804
|
-
component:
|
|
2805
|
-
...
|
|
2832
|
+
component: eo,
|
|
2833
|
+
...Gn
|
|
2806
2834
|
}, {
|
|
2807
2835
|
component: co,
|
|
2808
|
-
...
|
|
2836
|
+
...to
|
|
2809
2837
|
}, {
|
|
2810
|
-
component:
|
|
2811
|
-
...go
|
|
2812
|
-
}, {
|
|
2813
|
-
component: bo,
|
|
2838
|
+
component: fo,
|
|
2814
2839
|
...uo
|
|
2815
2840
|
}, {
|
|
2816
2841
|
component: $o,
|
|
2817
|
-
...
|
|
2842
|
+
...Co
|
|
2818
2843
|
}, {
|
|
2819
|
-
component:
|
|
2820
|
-
...
|
|
2821
|
-
}], be = () => [{
|
|
2822
|
-
component: ut,
|
|
2823
|
-
...wn
|
|
2844
|
+
component: vo,
|
|
2845
|
+
...bo
|
|
2824
2846
|
}, {
|
|
2825
|
-
component:
|
|
2826
|
-
...
|
|
2847
|
+
component: Vo,
|
|
2848
|
+
...To
|
|
2827
2849
|
}, {
|
|
2828
|
-
component:
|
|
2829
|
-
|
|
2850
|
+
component: Lo,
|
|
2851
|
+
...xo
|
|
2852
|
+
}], ke = () => [{
|
|
2853
|
+
component: bt,
|
|
2854
|
+
...En
|
|
2830
2855
|
}, {
|
|
2831
|
-
component:
|
|
2832
|
-
...
|
|
2856
|
+
component: tn,
|
|
2857
|
+
...Pn
|
|
2833
2858
|
}, {
|
|
2834
|
-
component:
|
|
2835
|
-
...
|
|
2859
|
+
component: sn,
|
|
2860
|
+
...Vn
|
|
2836
2861
|
}, {
|
|
2837
|
-
component:
|
|
2838
|
-
...
|
|
2862
|
+
component: mn,
|
|
2863
|
+
...xn
|
|
2839
2864
|
}, {
|
|
2840
|
-
component:
|
|
2841
|
-
...
|
|
2865
|
+
component: bn,
|
|
2866
|
+
...An
|
|
2842
2867
|
}, {
|
|
2843
|
-
component:
|
|
2868
|
+
component: Fn,
|
|
2844
2869
|
...Bn
|
|
2845
|
-
},
|
|
2870
|
+
}, {
|
|
2871
|
+
component: qs,
|
|
2872
|
+
...Un
|
|
2873
|
+
}, {
|
|
2874
|
+
component: Hn,
|
|
2875
|
+
...On
|
|
2876
|
+
}, ...Mo()], Do = (e) => ({
|
|
2846
2877
|
type: "builder.registerComponent",
|
|
2847
|
-
data:
|
|
2848
|
-
}),
|
|
2878
|
+
data: se(e)
|
|
2879
|
+
}), Ho = (e) => {
|
|
2849
2880
|
const t = e.toString().trim();
|
|
2850
2881
|
return `return (${!t.startsWith("function") && !t.startsWith("(") ? "function " : ""}${t}).apply(this, arguments)`;
|
|
2851
|
-
},
|
|
2882
|
+
}, jo = (e) => typeof e == "function" ? Ho(e) : K(e), se = ({
|
|
2852
2883
|
inputs: e,
|
|
2853
2884
|
...t
|
|
2854
2885
|
}) => ({
|
|
2855
|
-
...
|
|
2886
|
+
...K(t),
|
|
2856
2887
|
inputs: e == null ? void 0 : e.map((n) => Object.entries(n).reduce((o, [s, r]) => ({
|
|
2857
2888
|
...o,
|
|
2858
|
-
[s]:
|
|
2889
|
+
[s]: jo(r)
|
|
2859
2890
|
}), {}))
|
|
2860
|
-
}),
|
|
2891
|
+
}), Ko = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2861
2892
|
function getAndSetVariantId() {
|
|
2862
2893
|
function setCookie(name, value, days) {
|
|
2863
2894
|
let expires = '';
|
|
@@ -2913,7 +2944,7 @@ const Wo = /* @__PURE__ */ y(Ro, [["render", Bo]]), No = () => [{
|
|
|
2913
2944
|
}).join('');
|
|
2914
2945
|
styleEl.innerHTML = newStyleStr;
|
|
2915
2946
|
}
|
|
2916
|
-
}`,
|
|
2947
|
+
}`, zo = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2917
2948
|
if (!navigator.cookieEnabled) {
|
|
2918
2949
|
return;
|
|
2919
2950
|
}
|
|
@@ -2947,70 +2978,70 @@ const Wo = /* @__PURE__ */ y(Ro, [["render", Bo]]), No = () => [{
|
|
|
2947
2978
|
thisScriptEl?.remove();
|
|
2948
2979
|
}
|
|
2949
2980
|
return;
|
|
2950
|
-
}`,
|
|
2981
|
+
}`, qe = "builderIoAbTest", Je = "builderIoRenderContent", G = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2951
2982
|
...t,
|
|
2952
2983
|
testVariationId: t.id,
|
|
2953
2984
|
id: e == null ? void 0 : e.id
|
|
2954
|
-
})),
|
|
2985
|
+
})), qo = ({
|
|
2955
2986
|
canTrack: e,
|
|
2956
2987
|
content: t
|
|
2957
|
-
}) => !(!(
|
|
2958
|
-
window.${
|
|
2959
|
-
window.${
|
|
2960
|
-
`,
|
|
2961
|
-
window.${
|
|
2962
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
2963
|
-
)`,
|
|
2988
|
+
}) => !(!(G(t).length > 0) || !e), Jo = (e) => e === "react" || e === "reactNative", Ge = Jo(V), Go = () => `
|
|
2989
|
+
window.${qe} = ${Ko}
|
|
2990
|
+
window.${Je} = ${zo}
|
|
2991
|
+
`, Yo = (e, t) => `
|
|
2992
|
+
window.${qe}(
|
|
2993
|
+
"${t}",${JSON.stringify(e)}, ${Ge}
|
|
2994
|
+
)`, Qo = ({
|
|
2964
2995
|
contentId: e,
|
|
2965
2996
|
variationId: t
|
|
2966
|
-
}) => `window.${
|
|
2967
|
-
"${t}", "${e}", ${
|
|
2968
|
-
)`,
|
|
2997
|
+
}) => `window.${Je}(
|
|
2998
|
+
"${t}", "${e}", ${Ge}
|
|
2999
|
+
)`, Ye = f({
|
|
2969
3000
|
render() {
|
|
2970
|
-
return
|
|
3001
|
+
return Re("script", { id: this.id, innerHTML: this.scriptStr });
|
|
2971
3002
|
},
|
|
2972
3003
|
name: "inlined-script",
|
|
2973
3004
|
props: ["scriptStr", "id"]
|
|
2974
3005
|
});
|
|
2975
|
-
function
|
|
3006
|
+
function Xo() {
|
|
2976
3007
|
return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : globalThis;
|
|
2977
3008
|
}
|
|
2978
|
-
function
|
|
2979
|
-
const e =
|
|
3009
|
+
function _o() {
|
|
3010
|
+
const e = Xo().fetch;
|
|
2980
3011
|
if (typeof e > "u")
|
|
2981
3012
|
throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
2982
3013
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`), new Error("Builder SDK could not find a global `fetch` function");
|
|
2983
3014
|
return e;
|
|
2984
3015
|
}
|
|
2985
|
-
const
|
|
2986
|
-
function
|
|
3016
|
+
const Qe = _o();
|
|
3017
|
+
function Y(e, t = null, n = ".") {
|
|
2987
3018
|
return Object.keys(e).reduce((o, s) => {
|
|
2988
3019
|
const r = e[s], i = [t, s].filter(Boolean).join(n);
|
|
2989
3020
|
return [typeof r == "object", r !== null, !(Array.isArray(r) && r.length === 0)].every(Boolean) ? {
|
|
2990
3021
|
...o,
|
|
2991
|
-
...
|
|
3022
|
+
...Y(r, i, n)
|
|
2992
3023
|
} : {
|
|
2993
3024
|
...o,
|
|
2994
3025
|
[i]: r
|
|
2995
3026
|
};
|
|
2996
3027
|
}, {});
|
|
2997
3028
|
}
|
|
2998
|
-
const
|
|
3029
|
+
const Zo = "v3", Se = "builder.", es = "options.", Xe = (e) => {
|
|
2999
3030
|
if (!e)
|
|
3000
3031
|
return {};
|
|
3001
|
-
const t =
|
|
3032
|
+
const t = Ve(e), n = {};
|
|
3002
3033
|
return Object.keys(t).forEach((o) => {
|
|
3003
|
-
if (o.startsWith(
|
|
3004
|
-
const s = o.replace(
|
|
3034
|
+
if (o.startsWith(Se)) {
|
|
3035
|
+
const s = o.replace(Se, "").replace(es, "");
|
|
3005
3036
|
n[s] = t[o];
|
|
3006
3037
|
}
|
|
3007
3038
|
}), n;
|
|
3008
|
-
},
|
|
3039
|
+
}, ts = () => {
|
|
3009
3040
|
if (!I())
|
|
3010
3041
|
return {};
|
|
3011
3042
|
const e = new URLSearchParams(window.location.search);
|
|
3012
|
-
return
|
|
3013
|
-
},
|
|
3043
|
+
return Xe(e);
|
|
3044
|
+
}, ve = (e) => typeof e == "number" && !isNaN(e) && e >= 0, he = (e) => {
|
|
3014
3045
|
const {
|
|
3015
3046
|
limit: t = 30,
|
|
3016
3047
|
userAttributes: n,
|
|
@@ -3019,60 +3050,60 @@ const Go = "v3", ge = "builder.", Yo = "options.", Ge = (e) => {
|
|
|
3019
3050
|
apiKey: r,
|
|
3020
3051
|
enrich: i,
|
|
3021
3052
|
locale: a,
|
|
3022
|
-
apiVersion: l =
|
|
3023
|
-
fields:
|
|
3053
|
+
apiVersion: l = Zo,
|
|
3054
|
+
fields: c,
|
|
3024
3055
|
omit: m,
|
|
3025
|
-
offset:
|
|
3056
|
+
offset: d,
|
|
3026
3057
|
cacheSeconds: p,
|
|
3027
3058
|
staleCacheSeconds: S,
|
|
3028
3059
|
sort: b,
|
|
3029
|
-
includeUnpublished:
|
|
3060
|
+
includeUnpublished: W
|
|
3030
3061
|
} = e;
|
|
3031
3062
|
if (!r)
|
|
3032
3063
|
throw new Error("Missing API key");
|
|
3033
3064
|
if (!["v3"].includes(l))
|
|
3034
3065
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${l}'`);
|
|
3035
|
-
const
|
|
3036
|
-
if (C.searchParams.set("apiKey", r), C.searchParams.set("limit", String(t)), C.searchParams.set("noTraverse", String(
|
|
3037
|
-
const
|
|
3066
|
+
const z = t !== 1, C = new URL(`https://cdn.builder.io/api/${l}/content/${s}`);
|
|
3067
|
+
if (C.searchParams.set("apiKey", r), C.searchParams.set("limit", String(t)), C.searchParams.set("noTraverse", String(z)), C.searchParams.set("includeRefs", String(!0)), a && C.searchParams.set("locale", a), i && C.searchParams.set("enrich", String(i)), C.searchParams.set("omit", m || "meta.componentsUsed"), c && C.searchParams.set("fields", c), Number.isFinite(d) && d > -1 && C.searchParams.set("offset", String(Math.floor(d))), typeof W == "boolean" && C.searchParams.set("includeUnpublished", String(W)), p && ve(p) && C.searchParams.set("cacheSeconds", String(p)), S && ve(S) && C.searchParams.set("staleCacheSeconds", String(S)), b) {
|
|
3068
|
+
const N = Y({
|
|
3038
3069
|
sort: b
|
|
3039
3070
|
});
|
|
3040
|
-
for (const
|
|
3041
|
-
C.searchParams.set(
|
|
3071
|
+
for (const D in N)
|
|
3072
|
+
C.searchParams.set(D, JSON.stringify(N[D]));
|
|
3042
3073
|
}
|
|
3043
|
-
const
|
|
3044
|
-
...
|
|
3045
|
-
...
|
|
3046
|
-
},
|
|
3047
|
-
for (const
|
|
3048
|
-
C.searchParams.set(
|
|
3074
|
+
const rt = {
|
|
3075
|
+
...ts(),
|
|
3076
|
+
...Ve(e.options || {})
|
|
3077
|
+
}, be = Y(rt);
|
|
3078
|
+
for (const N in be)
|
|
3079
|
+
C.searchParams.set(N, String(be[N]));
|
|
3049
3080
|
if (n && C.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
3050
|
-
const
|
|
3081
|
+
const N = Y({
|
|
3051
3082
|
query: o
|
|
3052
3083
|
});
|
|
3053
|
-
for (const
|
|
3054
|
-
C.searchParams.set(
|
|
3084
|
+
for (const D in N)
|
|
3085
|
+
C.searchParams.set(D, JSON.stringify(N[D]));
|
|
3055
3086
|
}
|
|
3056
3087
|
return C;
|
|
3057
|
-
},
|
|
3058
|
-
async function
|
|
3059
|
-
const t = await
|
|
3088
|
+
}, ns = (e) => "results" in e;
|
|
3089
|
+
async function fe(e) {
|
|
3090
|
+
const t = await rs({
|
|
3060
3091
|
...e,
|
|
3061
3092
|
limit: 1
|
|
3062
3093
|
});
|
|
3063
3094
|
return t && t[0] || null;
|
|
3064
3095
|
}
|
|
3065
|
-
const
|
|
3066
|
-
const t =
|
|
3067
|
-
return await (await
|
|
3068
|
-
},
|
|
3069
|
-
const o =
|
|
3070
|
-
if (n.search.includes("preview="), !o || !(I() ||
|
|
3096
|
+
const os = async (e) => {
|
|
3097
|
+
const t = he(e);
|
|
3098
|
+
return await (await Qe(t.href)).json();
|
|
3099
|
+
}, ss = async (e, t, n = he(e)) => {
|
|
3100
|
+
const o = j(e.canTrack);
|
|
3101
|
+
if (n.search.includes("preview="), !o || !(I() || V === "reactNative"))
|
|
3071
3102
|
return t.results;
|
|
3072
3103
|
try {
|
|
3073
3104
|
const s = [];
|
|
3074
3105
|
for (const r of t.results)
|
|
3075
|
-
s.push(await
|
|
3106
|
+
s.push(await Rn({
|
|
3076
3107
|
item: r,
|
|
3077
3108
|
canTrack: o
|
|
3078
3109
|
}));
|
|
@@ -3082,10 +3113,10 @@ const Xo = async (e) => {
|
|
|
3082
3113
|
}
|
|
3083
3114
|
return t.results;
|
|
3084
3115
|
};
|
|
3085
|
-
async function
|
|
3116
|
+
async function rs(e) {
|
|
3086
3117
|
try {
|
|
3087
|
-
const t =
|
|
3088
|
-
return
|
|
3118
|
+
const t = he(e), n = await os(e);
|
|
3119
|
+
return ns(n) ? ss(e, n) : (T.error("Error fetching data. ", {
|
|
3089
3120
|
url: t,
|
|
3090
3121
|
content: n,
|
|
3091
3122
|
options: e
|
|
@@ -3094,94 +3125,94 @@ async function es(e) {
|
|
|
3094
3125
|
return T.error("Error fetching data. ", t), null;
|
|
3095
3126
|
}
|
|
3096
3127
|
}
|
|
3097
|
-
function
|
|
3128
|
+
function is(e) {
|
|
3098
3129
|
if (!I())
|
|
3099
3130
|
return !1;
|
|
3100
|
-
const t =
|
|
3131
|
+
const t = xe(e || window.location.search);
|
|
3101
3132
|
return R(t) ? !1 : t.indexOf("builder.preview=") !== -1;
|
|
3102
3133
|
}
|
|
3103
|
-
function
|
|
3134
|
+
function as() {
|
|
3104
3135
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
3105
3136
|
const t = Math.random() * 16 | 0;
|
|
3106
3137
|
return (e == "x" ? t : t & 3 | 8).toString(16);
|
|
3107
3138
|
});
|
|
3108
3139
|
}
|
|
3109
|
-
function
|
|
3110
|
-
return
|
|
3140
|
+
function _e() {
|
|
3141
|
+
return as().replace(/-/g, "");
|
|
3111
3142
|
}
|
|
3112
|
-
const
|
|
3143
|
+
const Ze = "builderSessionId", ls = async ({
|
|
3113
3144
|
canTrack: e
|
|
3114
3145
|
}) => {
|
|
3115
3146
|
if (!e)
|
|
3116
3147
|
return;
|
|
3117
|
-
const t = await
|
|
3118
|
-
name:
|
|
3148
|
+
const t = await De({
|
|
3149
|
+
name: Ze,
|
|
3119
3150
|
canTrack: e
|
|
3120
3151
|
});
|
|
3121
|
-
if (
|
|
3152
|
+
if (F(t))
|
|
3122
3153
|
return t;
|
|
3123
3154
|
{
|
|
3124
|
-
const n =
|
|
3125
|
-
return
|
|
3155
|
+
const n = cs();
|
|
3156
|
+
return ds({
|
|
3126
3157
|
id: n,
|
|
3127
3158
|
canTrack: e
|
|
3128
3159
|
}), n;
|
|
3129
3160
|
}
|
|
3130
|
-
},
|
|
3161
|
+
}, cs = () => _e(), ds = ({
|
|
3131
3162
|
id: e,
|
|
3132
3163
|
canTrack: t
|
|
3133
|
-
}) =>
|
|
3134
|
-
name:
|
|
3164
|
+
}) => He({
|
|
3165
|
+
name: Ze,
|
|
3135
3166
|
value: e,
|
|
3136
3167
|
canTrack: t
|
|
3137
|
-
}),
|
|
3168
|
+
}), et = () => I() && typeof localStorage < "u" ? localStorage : void 0, us = ({
|
|
3138
3169
|
key: e,
|
|
3139
3170
|
canTrack: t
|
|
3140
3171
|
}) => {
|
|
3141
3172
|
var n;
|
|
3142
3173
|
try {
|
|
3143
|
-
return t ? (n =
|
|
3174
|
+
return t ? (n = et()) == null ? void 0 : n.getItem(e) : void 0;
|
|
3144
3175
|
} catch (o) {
|
|
3145
3176
|
console.debug("[LocalStorage] GET error: ", o);
|
|
3146
3177
|
return;
|
|
3147
3178
|
}
|
|
3148
|
-
},
|
|
3179
|
+
}, ps = ({
|
|
3149
3180
|
key: e,
|
|
3150
3181
|
canTrack: t,
|
|
3151
3182
|
value: n
|
|
3152
3183
|
}) => {
|
|
3153
3184
|
var o;
|
|
3154
3185
|
try {
|
|
3155
|
-
t && ((o =
|
|
3186
|
+
t && ((o = et()) == null || o.setItem(e, n));
|
|
3156
3187
|
} catch (s) {
|
|
3157
3188
|
console.debug("[LocalStorage] SET error: ", s);
|
|
3158
3189
|
}
|
|
3159
|
-
},
|
|
3190
|
+
}, tt = "builderVisitorId", ms = ({
|
|
3160
3191
|
canTrack: e
|
|
3161
3192
|
}) => {
|
|
3162
3193
|
if (!e)
|
|
3163
3194
|
return;
|
|
3164
|
-
const t =
|
|
3165
|
-
key:
|
|
3195
|
+
const t = us({
|
|
3196
|
+
key: tt,
|
|
3166
3197
|
canTrack: e
|
|
3167
3198
|
});
|
|
3168
|
-
if (
|
|
3199
|
+
if (F(t))
|
|
3169
3200
|
return t;
|
|
3170
3201
|
{
|
|
3171
|
-
const n =
|
|
3172
|
-
return
|
|
3202
|
+
const n = hs();
|
|
3203
|
+
return fs({
|
|
3173
3204
|
id: n,
|
|
3174
3205
|
canTrack: e
|
|
3175
3206
|
}), n;
|
|
3176
3207
|
}
|
|
3177
|
-
},
|
|
3208
|
+
}, hs = () => _e(), fs = ({
|
|
3178
3209
|
id: e,
|
|
3179
3210
|
canTrack: t
|
|
3180
|
-
}) =>
|
|
3181
|
-
key:
|
|
3211
|
+
}) => ps({
|
|
3212
|
+
key: tt,
|
|
3182
3213
|
value: e,
|
|
3183
3214
|
canTrack: t
|
|
3184
|
-
}),
|
|
3215
|
+
}), bs = async ({
|
|
3185
3216
|
canTrack: e
|
|
3186
3217
|
}) => {
|
|
3187
3218
|
if (!e)
|
|
@@ -3189,16 +3220,16 @@ const _e = "builderSessionId", os = async ({
|
|
|
3189
3220
|
visitorId: void 0,
|
|
3190
3221
|
sessionId: void 0
|
|
3191
3222
|
};
|
|
3192
|
-
const t = await
|
|
3223
|
+
const t = await ls({
|
|
3193
3224
|
canTrack: e
|
|
3194
|
-
}), n =
|
|
3225
|
+
}), n = ms({
|
|
3195
3226
|
canTrack: e
|
|
3196
3227
|
});
|
|
3197
3228
|
return {
|
|
3198
3229
|
sessionId: t,
|
|
3199
3230
|
visitorId: n
|
|
3200
3231
|
};
|
|
3201
|
-
},
|
|
3232
|
+
}, gs = async ({
|
|
3202
3233
|
type: e,
|
|
3203
3234
|
canTrack: t,
|
|
3204
3235
|
apiKey: n,
|
|
@@ -3212,23 +3243,23 @@ const _e = "builderSessionId", os = async ({
|
|
|
3212
3243
|
url: location.href,
|
|
3213
3244
|
...o
|
|
3214
3245
|
},
|
|
3215
|
-
...await
|
|
3246
|
+
...await bs({
|
|
3216
3247
|
canTrack: t
|
|
3217
3248
|
}),
|
|
3218
|
-
userAttributes:
|
|
3249
|
+
userAttributes: Ae(),
|
|
3219
3250
|
ownerId: n
|
|
3220
3251
|
}
|
|
3221
3252
|
});
|
|
3222
|
-
async function
|
|
3253
|
+
async function re(e) {
|
|
3223
3254
|
if (!e.apiKey) {
|
|
3224
3255
|
T.error("Missing API key for track call. Please provide your API key.");
|
|
3225
3256
|
return;
|
|
3226
3257
|
}
|
|
3227
|
-
if (e.canTrack && !R() && (I() ||
|
|
3258
|
+
if (e.canTrack && !R() && (I() || V === "reactNative"))
|
|
3228
3259
|
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
3229
3260
|
method: "POST",
|
|
3230
3261
|
body: JSON.stringify({
|
|
3231
|
-
events: [await
|
|
3262
|
+
events: [await gs(e)]
|
|
3232
3263
|
}),
|
|
3233
3264
|
headers: {
|
|
3234
3265
|
"content-type": "application/json"
|
|
@@ -3238,14 +3269,14 @@ async function ne(e) {
|
|
|
3238
3269
|
console.error("Failed to track: ", t);
|
|
3239
3270
|
});
|
|
3240
3271
|
}
|
|
3241
|
-
const
|
|
3272
|
+
const tr = (e) => re({
|
|
3242
3273
|
...e,
|
|
3243
3274
|
canTrack: !0
|
|
3244
3275
|
});
|
|
3245
|
-
function
|
|
3276
|
+
function Ce(e) {
|
|
3246
3277
|
return Math.round(e * 1e3) / 1e3;
|
|
3247
3278
|
}
|
|
3248
|
-
const
|
|
3279
|
+
const ys = (e, t, n = !0) => {
|
|
3249
3280
|
if (!(e instanceof HTMLElement))
|
|
3250
3281
|
return null;
|
|
3251
3282
|
let o = n ? e : e.parentElement;
|
|
@@ -3256,43 +3287,43 @@ const ms = (e, t, n = !0) => {
|
|
|
3256
3287
|
return o;
|
|
3257
3288
|
} while (o = o.parentElement);
|
|
3258
3289
|
return null;
|
|
3259
|
-
},
|
|
3290
|
+
}, ks = (e) => ys(e, (t) => {
|
|
3260
3291
|
const n = t.getAttribute("builder-id") || t.id;
|
|
3261
3292
|
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
3262
|
-
}),
|
|
3293
|
+
}), we = ({
|
|
3263
3294
|
event: e,
|
|
3264
3295
|
target: t
|
|
3265
3296
|
}) => {
|
|
3266
|
-
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r =
|
|
3297
|
+
const n = t.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = Ce(o / n.width), i = Ce(s / n.height);
|
|
3267
3298
|
return {
|
|
3268
3299
|
x: r,
|
|
3269
3300
|
y: i
|
|
3270
3301
|
};
|
|
3271
|
-
},
|
|
3272
|
-
const t = e.target, n = t &&
|
|
3302
|
+
}, Ss = (e) => {
|
|
3303
|
+
const t = e.target, n = t && ks(t), o = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
3273
3304
|
return {
|
|
3274
3305
|
targetBuilderElement: o || void 0,
|
|
3275
3306
|
metadata: {
|
|
3276
|
-
targetOffset: t ?
|
|
3307
|
+
targetOffset: t ? we({
|
|
3277
3308
|
event: e,
|
|
3278
3309
|
target: t
|
|
3279
3310
|
}) : void 0,
|
|
3280
|
-
builderTargetOffset: n ?
|
|
3311
|
+
builderTargetOffset: n ? we({
|
|
3281
3312
|
event: e,
|
|
3282
3313
|
target: n
|
|
3283
3314
|
}) : void 0,
|
|
3284
3315
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
3285
3316
|
}
|
|
3286
3317
|
};
|
|
3287
|
-
},
|
|
3288
|
-
function
|
|
3318
|
+
}, vs = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
3319
|
+
function nt(e, t) {
|
|
3289
3320
|
const n = new URL(t.origin), o = n.hostname;
|
|
3290
|
-
return (e ||
|
|
3321
|
+
return (e || vs).findIndex((s) => s.startsWith("*.") ? o.endsWith(s.slice(1)) : s === o) > -1;
|
|
3291
3322
|
}
|
|
3292
|
-
const
|
|
3293
|
-
function
|
|
3294
|
-
let n =
|
|
3295
|
-
if (n || (n =
|
|
3323
|
+
const Cs = "1.0.12", Ie = {};
|
|
3324
|
+
function ws(e, t) {
|
|
3325
|
+
let n = Ie[e];
|
|
3326
|
+
if (n || (n = Ie[e] = []), n.push(t), I()) {
|
|
3296
3327
|
const o = {
|
|
3297
3328
|
type: "builder.register",
|
|
3298
3329
|
data: {
|
|
@@ -3307,8 +3338,8 @@ function ys(e, t) {
|
|
|
3307
3338
|
}
|
|
3308
3339
|
}
|
|
3309
3340
|
}
|
|
3310
|
-
const
|
|
3311
|
-
|
|
3341
|
+
const Is = () => {
|
|
3342
|
+
ws("insertMenu", {
|
|
3312
3343
|
name: "_default",
|
|
3313
3344
|
default: !0,
|
|
3314
3345
|
items: [{
|
|
@@ -3330,14 +3361,14 @@ const ks = () => {
|
|
|
3330
3361
|
}]
|
|
3331
3362
|
});
|
|
3332
3363
|
};
|
|
3333
|
-
let
|
|
3334
|
-
const
|
|
3364
|
+
let $e = !1;
|
|
3365
|
+
const ot = (e = {}) => {
|
|
3335
3366
|
var t, n;
|
|
3336
|
-
|
|
3367
|
+
$e || ($e = !0, I() && ((t = window.parent) == null || t.postMessage({
|
|
3337
3368
|
type: "builder.sdkInfo",
|
|
3338
3369
|
data: {
|
|
3339
|
-
target:
|
|
3340
|
-
version:
|
|
3370
|
+
target: V,
|
|
3371
|
+
version: Cs,
|
|
3341
3372
|
supportsPatchUpdates: !1,
|
|
3342
3373
|
// Supports builder-model="..." attribute which is needed to
|
|
3343
3374
|
// scope our '+ add block' button styling
|
|
@@ -3351,7 +3382,7 @@ const et = (e = {}) => {
|
|
|
3351
3382
|
}
|
|
3352
3383
|
}, "*"), window.addEventListener("message", (o) => {
|
|
3353
3384
|
var r, i;
|
|
3354
|
-
if (!
|
|
3385
|
+
if (!nt(e.trustedHosts, o))
|
|
3355
3386
|
return;
|
|
3356
3387
|
const {
|
|
3357
3388
|
data: s
|
|
@@ -3359,45 +3390,45 @@ const et = (e = {}) => {
|
|
|
3359
3390
|
if (s != null && s.type)
|
|
3360
3391
|
switch (s.type) {
|
|
3361
3392
|
case "builder.evaluate": {
|
|
3362
|
-
const a = s.data.text, l = s.data.arguments || [],
|
|
3363
|
-
let
|
|
3393
|
+
const a = s.data.text, l = s.data.arguments || [], c = s.data.id, m = new Function(a);
|
|
3394
|
+
let d, p = null;
|
|
3364
3395
|
try {
|
|
3365
|
-
|
|
3396
|
+
d = m.apply(null, l);
|
|
3366
3397
|
} catch (S) {
|
|
3367
3398
|
p = S;
|
|
3368
3399
|
}
|
|
3369
3400
|
p ? (r = window.parent) == null || r.postMessage({
|
|
3370
3401
|
type: "builder.evaluateError",
|
|
3371
3402
|
data: {
|
|
3372
|
-
id:
|
|
3403
|
+
id: c,
|
|
3373
3404
|
error: p.message
|
|
3374
3405
|
}
|
|
3375
|
-
}, "*") :
|
|
3406
|
+
}, "*") : d && typeof d.then == "function" ? d.then((S) => {
|
|
3376
3407
|
var b;
|
|
3377
3408
|
(b = window.parent) == null || b.postMessage({
|
|
3378
3409
|
type: "builder.evaluateResult",
|
|
3379
3410
|
data: {
|
|
3380
|
-
id:
|
|
3411
|
+
id: c,
|
|
3381
3412
|
result: S
|
|
3382
3413
|
}
|
|
3383
3414
|
}, "*");
|
|
3384
3415
|
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
3385
3416
|
type: "builder.evaluateResult",
|
|
3386
3417
|
data: {
|
|
3387
|
-
result:
|
|
3388
|
-
id:
|
|
3418
|
+
result: d,
|
|
3419
|
+
id: c
|
|
3389
3420
|
}
|
|
3390
3421
|
}, "*");
|
|
3391
3422
|
break;
|
|
3392
3423
|
}
|
|
3393
3424
|
}
|
|
3394
3425
|
})));
|
|
3395
|
-
},
|
|
3426
|
+
}, st = ({
|
|
3396
3427
|
model: e,
|
|
3397
3428
|
trustedHosts: t,
|
|
3398
3429
|
callbacks: n
|
|
3399
3430
|
}) => (o) => {
|
|
3400
|
-
if (!
|
|
3431
|
+
if (!nt(t, o))
|
|
3401
3432
|
return;
|
|
3402
3433
|
const {
|
|
3403
3434
|
data: s
|
|
@@ -3418,12 +3449,12 @@ const et = (e = {}) => {
|
|
|
3418
3449
|
break;
|
|
3419
3450
|
}
|
|
3420
3451
|
}
|
|
3421
|
-
},
|
|
3452
|
+
}, nr = (e, t, n) => {
|
|
3422
3453
|
if (!I)
|
|
3423
3454
|
return T.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
3424
3455
|
};
|
|
3425
|
-
|
|
3426
|
-
const o =
|
|
3456
|
+
ot();
|
|
3457
|
+
const o = st({
|
|
3427
3458
|
callbacks: {
|
|
3428
3459
|
contentUpdate: t,
|
|
3429
3460
|
animation: () => {
|
|
@@ -3437,7 +3468,7 @@ const et = (e = {}) => {
|
|
|
3437
3468
|
return window.addEventListener("message", o), () => {
|
|
3438
3469
|
window.removeEventListener("message", o);
|
|
3439
3470
|
};
|
|
3440
|
-
},
|
|
3471
|
+
}, $s = f({
|
|
3441
3472
|
name: "enable-editor",
|
|
3442
3473
|
props: [
|
|
3443
3474
|
"builderContextSignal",
|
|
@@ -3463,13 +3494,13 @@ const et = (e = {}) => {
|
|
|
3463
3494
|
ContentWrapper: this.contentWrapper || "div",
|
|
3464
3495
|
httpReqsData: {},
|
|
3465
3496
|
clicked: !1,
|
|
3466
|
-
builderContext:
|
|
3497
|
+
builderContext: oe
|
|
3467
3498
|
};
|
|
3468
3499
|
},
|
|
3469
3500
|
provide() {
|
|
3470
3501
|
const e = this;
|
|
3471
3502
|
return {
|
|
3472
|
-
[
|
|
3503
|
+
[oe.key]: e.builderContextSignal
|
|
3473
3504
|
};
|
|
3474
3505
|
},
|
|
3475
3506
|
mounted() {
|
|
@@ -3478,9 +3509,9 @@ const et = (e = {}) => {
|
|
|
3478
3509
|
if (I()) {
|
|
3479
3510
|
if (R() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
3480
3511
|
new CustomEvent("initeditingbldr")
|
|
3481
|
-
), this.builderContextSignal.content &&
|
|
3512
|
+
), this.builderContextSignal.content && j(this.canTrack)) {
|
|
3482
3513
|
const r = (n = this.builderContextSignal.content) == null ? void 0 : n.testVariationId, i = (o = this.builderContextSignal.content) == null ? void 0 : o.id, a = this.apiKey;
|
|
3483
|
-
|
|
3514
|
+
re({
|
|
3484
3515
|
type: "impression",
|
|
3485
3516
|
canTrack: !0,
|
|
3486
3517
|
contentId: i,
|
|
@@ -3488,7 +3519,7 @@ const et = (e = {}) => {
|
|
|
3488
3519
|
variationId: r !== i ? r : void 0
|
|
3489
3520
|
});
|
|
3490
3521
|
}
|
|
3491
|
-
|
|
3522
|
+
is() && this.$refs.elementRef && this.$refs.elementRef.dispatchEvent(
|
|
3492
3523
|
new CustomEvent("initpreviewingbldr")
|
|
3493
3524
|
);
|
|
3494
3525
|
}
|
|
@@ -3612,7 +3643,7 @@ const et = (e = {}) => {
|
|
|
3612
3643
|
this.builderContextSignal.content = t;
|
|
3613
3644
|
},
|
|
3614
3645
|
processMessage(e) {
|
|
3615
|
-
return
|
|
3646
|
+
return st({
|
|
3616
3647
|
model: this.model,
|
|
3617
3648
|
trustedHosts: this.trustedHosts,
|
|
3618
3649
|
callbacks: {
|
|
@@ -3626,7 +3657,7 @@ const et = (e = {}) => {
|
|
|
3626
3657
|
}), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
3627
3658
|
},
|
|
3628
3659
|
animation: (t) => {
|
|
3629
|
-
|
|
3660
|
+
Fe(t);
|
|
3630
3661
|
},
|
|
3631
3662
|
contentUpdate: (t) => {
|
|
3632
3663
|
this.mergeNewContent(t), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
@@ -3637,25 +3668,29 @@ const et = (e = {}) => {
|
|
|
3637
3668
|
evaluateJsCode() {
|
|
3638
3669
|
var t, n;
|
|
3639
3670
|
const e = (n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.jsCode;
|
|
3640
|
-
e &&
|
|
3671
|
+
e && Q({
|
|
3641
3672
|
code: e,
|
|
3642
3673
|
context: this.context || {},
|
|
3643
3674
|
localState: void 0,
|
|
3644
3675
|
rootState: this.builderContextSignal.rootState,
|
|
3645
|
-
rootSetState: this.builderContextSignal.rootSetState
|
|
3676
|
+
rootSetState: this.builderContextSignal.rootSetState,
|
|
3677
|
+
/**
|
|
3678
|
+
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
3679
|
+
*/
|
|
3680
|
+
enableCache: !1
|
|
3646
3681
|
});
|
|
3647
3682
|
},
|
|
3648
3683
|
onClick(e) {
|
|
3649
3684
|
var t, n;
|
|
3650
3685
|
if (this.builderContextSignal.content) {
|
|
3651
3686
|
const o = (t = this.builderContextSignal.content) == null ? void 0 : t.testVariationId, s = (n = this.builderContextSignal.content) == null ? void 0 : n.id;
|
|
3652
|
-
|
|
3687
|
+
re({
|
|
3653
3688
|
type: "click",
|
|
3654
|
-
canTrack:
|
|
3689
|
+
canTrack: j(this.canTrack),
|
|
3655
3690
|
contentId: s,
|
|
3656
3691
|
apiKey: this.apiKey,
|
|
3657
3692
|
variationId: o !== s ? o : void 0,
|
|
3658
|
-
...
|
|
3693
|
+
...Ss(e),
|
|
3659
3694
|
unique: !this.clicked
|
|
3660
3695
|
});
|
|
3661
3696
|
}
|
|
@@ -3664,17 +3699,20 @@ const et = (e = {}) => {
|
|
|
3664
3699
|
evalExpression(e) {
|
|
3665
3700
|
return e.replace(
|
|
3666
3701
|
/{{([^}]+)}}/g,
|
|
3667
|
-
(t, n) =>
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3702
|
+
(t, n) => String(
|
|
3703
|
+
Q({
|
|
3704
|
+
code: n,
|
|
3705
|
+
context: this.context || {},
|
|
3706
|
+
localState: void 0,
|
|
3707
|
+
rootState: this.builderContextSignal.rootState,
|
|
3708
|
+
rootSetState: this.builderContextSignal.rootSetState,
|
|
3709
|
+
enableCache: !0
|
|
3710
|
+
})
|
|
3711
|
+
)
|
|
3674
3712
|
);
|
|
3675
3713
|
},
|
|
3676
3714
|
handleRequest({ url: e, key: t }) {
|
|
3677
|
-
|
|
3715
|
+
Qe(e).then((n) => n.json()).then((n) => {
|
|
3678
3716
|
var s, r;
|
|
3679
3717
|
const o = {
|
|
3680
3718
|
...this.builderContextSignal.rootState,
|
|
@@ -3704,7 +3742,7 @@ const et = (e = {}) => {
|
|
|
3704
3742
|
"builder:component:stateChange",
|
|
3705
3743
|
{
|
|
3706
3744
|
detail: {
|
|
3707
|
-
state:
|
|
3745
|
+
state: K(this.builderContextSignal.rootState),
|
|
3708
3746
|
ref: {
|
|
3709
3747
|
name: this.model
|
|
3710
3748
|
}
|
|
@@ -3714,7 +3752,7 @@ const et = (e = {}) => {
|
|
|
3714
3752
|
);
|
|
3715
3753
|
},
|
|
3716
3754
|
elementRef_onIniteditingbldr(e) {
|
|
3717
|
-
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage),
|
|
3755
|
+
this.forceReRenderCount = this.forceReRenderCount + 1, window.addEventListener("message", this.processMessage), Is(), ot({
|
|
3718
3756
|
...this.locale ? {
|
|
3719
3757
|
locale: this.locale
|
|
3720
3758
|
} : {},
|
|
@@ -3728,7 +3766,7 @@ const et = (e = {}) => {
|
|
|
3728
3766
|
this.builderContextSignal.componentInfos
|
|
3729
3767
|
).forEach((t) => {
|
|
3730
3768
|
var o;
|
|
3731
|
-
const n =
|
|
3769
|
+
const n = Do(t);
|
|
3732
3770
|
(o = window.parent) == null || o.postMessage(n, "*");
|
|
3733
3771
|
}), window.addEventListener(
|
|
3734
3772
|
"builder:component:stateChangeListenerActivated",
|
|
@@ -3739,7 +3777,7 @@ const et = (e = {}) => {
|
|
|
3739
3777
|
const t = new URL(location.href).searchParams, n = t.get("builder.preview"), o = t.get(
|
|
3740
3778
|
`builder.preview.${n}`
|
|
3741
3779
|
), s = t.get("apiKey") || t.get("builder.space");
|
|
3742
|
-
n === this.model && s === this.apiKey && (!this.content || o === this.content.id) &&
|
|
3780
|
+
n === this.model && s === this.apiKey && (!this.content || o === this.content.id) && fe({
|
|
3743
3781
|
model: this.model,
|
|
3744
3782
|
apiKey: this.apiKey,
|
|
3745
3783
|
apiVersion: this.builderContextSignal.apiVersion
|
|
@@ -3749,17 +3787,17 @@ const et = (e = {}) => {
|
|
|
3749
3787
|
}
|
|
3750
3788
|
}
|
|
3751
3789
|
});
|
|
3752
|
-
function
|
|
3790
|
+
function Ts(e, t, n, o, s, r) {
|
|
3753
3791
|
var i, a, l;
|
|
3754
|
-
return e.builderContextSignal.content ? (u(), g(
|
|
3792
|
+
return e.builderContextSignal.content ? (u(), g(H(e.ContentWrapper), w({
|
|
3755
3793
|
key: e.forceReRenderCount,
|
|
3756
3794
|
ref: "elementRef",
|
|
3757
|
-
onClick: (
|
|
3795
|
+
onClick: (c) => e.onClick(c),
|
|
3758
3796
|
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
3759
3797
|
"builder-model": e.model,
|
|
3760
3798
|
class: `variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((l = e.content) == null ? void 0 : l.id)}`,
|
|
3761
|
-
onIniteditingbldr: (
|
|
3762
|
-
onInitpreviewingbldr: (
|
|
3799
|
+
onIniteditingbldr: (c) => e.elementRef_onIniteditingbldr(c),
|
|
3800
|
+
onInitpreviewingbldr: (c) => e.elementRef_onInitpreviewingbldr(c)
|
|
3763
3801
|
}, {
|
|
3764
3802
|
...e.showContent ? {} : {
|
|
3765
3803
|
hidden: !0,
|
|
@@ -3767,13 +3805,13 @@ function vs(e, t, n, o, s, r) {
|
|
|
3767
3805
|
},
|
|
3768
3806
|
...e.contentWrapperProps
|
|
3769
3807
|
}), {
|
|
3770
|
-
default:
|
|
3808
|
+
default: B(() => [
|
|
3771
3809
|
P(e.$slots, "default")
|
|
3772
3810
|
]),
|
|
3773
3811
|
_: 3
|
|
3774
3812
|
}, 16, ["onClick", "builder-content-id", "builder-model", "class", "onIniteditingbldr", "onInitpreviewingbldr"])) : v("", !0);
|
|
3775
3813
|
}
|
|
3776
|
-
const
|
|
3814
|
+
const Rs = /* @__PURE__ */ y($s, [["render", Ts]]), Es = (e) => {
|
|
3777
3815
|
var r;
|
|
3778
3816
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = e.fileUrl ?? ((r = e == null ? void 0 : e.files) == null ? void 0 : r.regular);
|
|
3779
3817
|
let s = "";
|
|
@@ -3799,26 +3837,26 @@ font-weight: ${i};
|
|
|
3799
3837
|
`.trim());
|
|
3800
3838
|
}
|
|
3801
3839
|
return s;
|
|
3802
|
-
},
|
|
3840
|
+
}, Ps = ({
|
|
3803
3841
|
customFonts: e
|
|
3804
3842
|
}) => {
|
|
3805
3843
|
var t;
|
|
3806
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
3807
|
-
},
|
|
3844
|
+
return ((t = e == null ? void 0 : e.map((n) => Es(n))) == null ? void 0 : t.join(" ")) || "";
|
|
3845
|
+
}, Vs = ({
|
|
3808
3846
|
cssCode: e,
|
|
3809
3847
|
contentId: t
|
|
3810
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "",
|
|
3848
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", xs = f({
|
|
3811
3849
|
name: "content-styles",
|
|
3812
|
-
components: { InlinedStyles:
|
|
3850
|
+
components: { InlinedStyles: pe },
|
|
3813
3851
|
props: ["cssCode", "contentId", "customFonts"],
|
|
3814
3852
|
data() {
|
|
3815
3853
|
return {
|
|
3816
3854
|
injectedStyles: `
|
|
3817
|
-
${
|
|
3855
|
+
${Vs({
|
|
3818
3856
|
cssCode: this.cssCode,
|
|
3819
3857
|
contentId: this.contentId
|
|
3820
3858
|
})}
|
|
3821
|
-
${
|
|
3859
|
+
${Ps({
|
|
3822
3860
|
customFonts: this.customFonts
|
|
3823
3861
|
})}
|
|
3824
3862
|
|
|
@@ -3842,11 +3880,11 @@ ${Is({
|
|
|
3842
3880
|
};
|
|
3843
3881
|
}
|
|
3844
3882
|
});
|
|
3845
|
-
function
|
|
3883
|
+
function As(e, t, n, o, s, r) {
|
|
3846
3884
|
const i = k("inlined-styles");
|
|
3847
3885
|
return u(), g(i, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
3848
3886
|
}
|
|
3849
|
-
const
|
|
3887
|
+
const Bs = /* @__PURE__ */ y(xs, [["render", As]]), Ws = ({
|
|
3850
3888
|
content: e,
|
|
3851
3889
|
data: t,
|
|
3852
3890
|
locale: n
|
|
@@ -3863,7 +3901,7 @@ const Es = /* @__PURE__ */ y(Ts, [["render", Rs]]), Ps = ({
|
|
|
3863
3901
|
locale: n
|
|
3864
3902
|
} : {}
|
|
3865
3903
|
};
|
|
3866
|
-
},
|
|
3904
|
+
}, Ns = ({
|
|
3867
3905
|
content: e,
|
|
3868
3906
|
data: t
|
|
3869
3907
|
}) => e ? {
|
|
@@ -3873,12 +3911,12 @@ const Es = /* @__PURE__ */ y(Ts, [["render", Rs]]), Ps = ({
|
|
|
3873
3911
|
...t
|
|
3874
3912
|
},
|
|
3875
3913
|
meta: e == null ? void 0 : e.meta
|
|
3876
|
-
} : void 0,
|
|
3914
|
+
} : void 0, Fs = ct, Us = f({
|
|
3877
3915
|
name: "content-component",
|
|
3878
3916
|
components: {
|
|
3879
|
-
EnableEditor:
|
|
3880
|
-
InlinedScript:
|
|
3881
|
-
ContentStyles:
|
|
3917
|
+
EnableEditor: Rs,
|
|
3918
|
+
InlinedScript: Ye,
|
|
3919
|
+
ContentStyles: Bs,
|
|
3882
3920
|
Blocks: _
|
|
3883
3921
|
},
|
|
3884
3922
|
props: [
|
|
@@ -3904,32 +3942,32 @@ const Es = /* @__PURE__ */ y(Ts, [["render", Rs]]), Ps = ({
|
|
|
3904
3942
|
data() {
|
|
3905
3943
|
var e, t;
|
|
3906
3944
|
return {
|
|
3907
|
-
scriptStr:
|
|
3945
|
+
scriptStr: Qo({
|
|
3908
3946
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3909
3947
|
variationId: (e = this.content) == null ? void 0 : e.testVariationId,
|
|
3910
3948
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
3911
3949
|
contentId: (t = this.content) == null ? void 0 : t.id
|
|
3912
3950
|
}),
|
|
3913
3951
|
registeredComponents: [
|
|
3914
|
-
...
|
|
3952
|
+
...ke(),
|
|
3915
3953
|
...this.customComponents || []
|
|
3916
3954
|
].reduce(
|
|
3917
3955
|
(n, { component: o, ...s }) => ({
|
|
3918
3956
|
...n,
|
|
3919
3957
|
[s.name]: {
|
|
3920
|
-
component:
|
|
3921
|
-
...
|
|
3958
|
+
component: Fs(o),
|
|
3959
|
+
...se(s)
|
|
3922
3960
|
}
|
|
3923
3961
|
}),
|
|
3924
3962
|
{}
|
|
3925
3963
|
),
|
|
3926
3964
|
builderContextSignal: {
|
|
3927
|
-
content:
|
|
3965
|
+
content: Ns({
|
|
3928
3966
|
content: this.content,
|
|
3929
3967
|
data: this.data
|
|
3930
3968
|
}),
|
|
3931
3969
|
localState: void 0,
|
|
3932
|
-
rootState:
|
|
3970
|
+
rootState: Ws({
|
|
3933
3971
|
content: this.content,
|
|
3934
3972
|
data: this.data,
|
|
3935
3973
|
locale: this.locale
|
|
@@ -3939,12 +3977,12 @@ const Es = /* @__PURE__ */ y(Ts, [["render", Rs]]), Ps = ({
|
|
|
3939
3977
|
apiKey: this.apiKey,
|
|
3940
3978
|
apiVersion: this.apiVersion,
|
|
3941
3979
|
componentInfos: [
|
|
3942
|
-
...
|
|
3980
|
+
...ke(),
|
|
3943
3981
|
...this.customComponents || []
|
|
3944
3982
|
].reduce(
|
|
3945
3983
|
(n, { component: o, ...s }) => ({
|
|
3946
3984
|
...n,
|
|
3947
|
-
[s.name]:
|
|
3985
|
+
[s.name]: se(s)
|
|
3948
3986
|
}),
|
|
3949
3987
|
{}
|
|
3950
3988
|
),
|
|
@@ -3952,13 +3990,13 @@ const Es = /* @__PURE__ */ y(Ts, [["render", Rs]]), Ps = ({
|
|
|
3952
3990
|
BlocksWrapper: this.blocksWrapper || "div",
|
|
3953
3991
|
BlocksWrapperProps: this.blocksWrapperProps || {}
|
|
3954
3992
|
},
|
|
3955
|
-
TARGET:
|
|
3993
|
+
TARGET: V
|
|
3956
3994
|
};
|
|
3957
3995
|
},
|
|
3958
3996
|
provide() {
|
|
3959
3997
|
const e = this;
|
|
3960
3998
|
return {
|
|
3961
|
-
[
|
|
3999
|
+
[Pe.key]: {
|
|
3962
4000
|
registeredComponents: e.registeredComponents
|
|
3963
4001
|
}
|
|
3964
4002
|
};
|
|
@@ -3969,9 +4007,9 @@ const Es = /* @__PURE__ */ y(Ts, [["render", Rs]]), Ps = ({
|
|
|
3969
4007
|
}
|
|
3970
4008
|
}
|
|
3971
4009
|
});
|
|
3972
|
-
function
|
|
3973
|
-
const i = k("inlined-script"), a = k("content-styles"), l = k("blocks"),
|
|
3974
|
-
return u(), g(
|
|
4010
|
+
function Os(e, t, n, o, s, r) {
|
|
4011
|
+
const i = k("inlined-script"), a = k("content-styles"), l = k("blocks"), c = k("enable-editor");
|
|
4012
|
+
return u(), g(c, w({
|
|
3975
4013
|
content: e.content,
|
|
3976
4014
|
data: e.data,
|
|
3977
4015
|
model: e.model,
|
|
@@ -3987,8 +4025,8 @@ function Bs(e, t, n, o, s, r) {
|
|
|
3987
4025
|
linkComponent: e.linkComponent,
|
|
3988
4026
|
trustedHosts: e.trustedHosts
|
|
3989
4027
|
}, {}), {
|
|
3990
|
-
default:
|
|
3991
|
-
var m,
|
|
4028
|
+
default: B(() => {
|
|
4029
|
+
var m, d, p, S, b, W, z;
|
|
3992
4030
|
return [
|
|
3993
4031
|
e.isSsrAbTest ? (u(), g(i, {
|
|
3994
4032
|
key: 0,
|
|
@@ -3997,11 +4035,11 @@ function Bs(e, t, n, o, s, r) {
|
|
|
3997
4035
|
e.TARGET !== "reactNative" ? (u(), g(a, {
|
|
3998
4036
|
key: 1,
|
|
3999
4037
|
contentId: (m = e.builderContextSignal.content) == null ? void 0 : m.id,
|
|
4000
|
-
cssCode: (p = (
|
|
4038
|
+
cssCode: (p = (d = e.builderContextSignal.content) == null ? void 0 : d.data) == null ? void 0 : p.cssCode,
|
|
4001
4039
|
customFonts: (b = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : b.customFonts
|
|
4002
4040
|
}, null, 8, ["contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
4003
4041
|
A(l, {
|
|
4004
|
-
blocks: (
|
|
4042
|
+
blocks: (z = (W = e.builderContextSignal.content) == null ? void 0 : W.data) == null ? void 0 : z.blocks,
|
|
4005
4043
|
context: e.builderContextSignal,
|
|
4006
4044
|
registeredComponents: e.registeredComponents,
|
|
4007
4045
|
linkComponent: e.linkComponent
|
|
@@ -4011,12 +4049,12 @@ function Bs(e, t, n, o, s, r) {
|
|
|
4011
4049
|
_: 1
|
|
4012
4050
|
}, 16, ["content", "data", "model", "context", "apiKey", "canTrack", "locale", "enrich", "showContent", "builderContextSignal", "contentWrapper", "contentWrapperProps", "linkComponent", "trustedHosts"]);
|
|
4013
4051
|
}
|
|
4014
|
-
const
|
|
4052
|
+
const Ls = /* @__PURE__ */ y(Us, [["render", Os]]), Ms = f({
|
|
4015
4053
|
name: "content-variants",
|
|
4016
4054
|
components: {
|
|
4017
|
-
InlinedScript:
|
|
4018
|
-
InlinedStyles:
|
|
4019
|
-
ContentComponent:
|
|
4055
|
+
InlinedScript: Ye,
|
|
4056
|
+
InlinedStyles: pe,
|
|
4057
|
+
ContentComponent: Ls
|
|
4020
4058
|
},
|
|
4021
4059
|
props: [
|
|
4022
4060
|
"canTrack",
|
|
@@ -4039,13 +4077,13 @@ const Ws = /* @__PURE__ */ y(Vs, [["render", Bs]]), Ns = f({
|
|
|
4039
4077
|
],
|
|
4040
4078
|
data() {
|
|
4041
4079
|
return {
|
|
4042
|
-
shouldRenderVariants:
|
|
4043
|
-
canTrack:
|
|
4080
|
+
shouldRenderVariants: qo({
|
|
4081
|
+
canTrack: j(this.canTrack),
|
|
4044
4082
|
content: this.content
|
|
4045
4083
|
}),
|
|
4046
|
-
TARGET:
|
|
4047
|
-
getScriptString:
|
|
4048
|
-
getVariants:
|
|
4084
|
+
TARGET: V,
|
|
4085
|
+
getScriptString: Go,
|
|
4086
|
+
getVariants: G
|
|
4049
4087
|
};
|
|
4050
4088
|
},
|
|
4051
4089
|
mounted() {
|
|
@@ -4054,8 +4092,8 @@ const Ws = /* @__PURE__ */ y(Vs, [["render", Bs]]), Ns = f({
|
|
|
4054
4092
|
computed: {
|
|
4055
4093
|
updateCookieAndStylesScriptStr() {
|
|
4056
4094
|
var e;
|
|
4057
|
-
return
|
|
4058
|
-
|
|
4095
|
+
return Yo(
|
|
4096
|
+
G(this.content).map((t) => ({
|
|
4059
4097
|
id: t.testVariationId,
|
|
4060
4098
|
testRatio: t.testRatio
|
|
4061
4099
|
})),
|
|
@@ -4063,22 +4101,22 @@ const Ws = /* @__PURE__ */ y(Vs, [["render", Bs]]), Ns = f({
|
|
|
4063
4101
|
);
|
|
4064
4102
|
},
|
|
4065
4103
|
hideVariantsStyleString() {
|
|
4066
|
-
return
|
|
4104
|
+
return G(this.content).map((e) => `.variant-${e.testVariationId} { display: none; } `).join("");
|
|
4067
4105
|
},
|
|
4068
4106
|
defaultContent() {
|
|
4069
4107
|
var e;
|
|
4070
4108
|
return this.shouldRenderVariants ? {
|
|
4071
4109
|
...this.content,
|
|
4072
4110
|
testVariationId: (e = this.content) == null ? void 0 : e.id
|
|
4073
|
-
} :
|
|
4111
|
+
} : Tn({
|
|
4074
4112
|
item: this.content,
|
|
4075
|
-
canTrack:
|
|
4113
|
+
canTrack: j(this.canTrack)
|
|
4076
4114
|
});
|
|
4077
4115
|
}
|
|
4078
4116
|
}
|
|
4079
4117
|
});
|
|
4080
|
-
function
|
|
4081
|
-
var
|
|
4118
|
+
function Ds(e, t, n, o, s, r) {
|
|
4119
|
+
var c;
|
|
4082
4120
|
const i = k("inlined-script"), a = k("inlined-styles"), l = k("content-component");
|
|
4083
4121
|
return u(), h($, null, [
|
|
4084
4122
|
!e.__isNestedRender && e.TARGET !== "reactNative" ? (u(), g(i, {
|
|
@@ -4087,11 +4125,11 @@ function Fs(e, t, n, o, s, r) {
|
|
|
4087
4125
|
}, null, 8, ["scriptStr"])) : v("", !0),
|
|
4088
4126
|
e.shouldRenderVariants ? (u(), h($, { key: 1 }, [
|
|
4089
4127
|
A(a, {
|
|
4090
|
-
id: `variants-styles-${(
|
|
4128
|
+
id: `variants-styles-${(c = e.content) == null ? void 0 : c.id}`,
|
|
4091
4129
|
styles: e.hideVariantsStyleString
|
|
4092
4130
|
}, null, 8, ["id", "styles"]),
|
|
4093
4131
|
A(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
4094
|
-
(u(!0), h($, null,
|
|
4132
|
+
(u(!0), h($, null, L(e.getVariants(e.content), (m, d) => (u(), g(l, {
|
|
4095
4133
|
key: m.testVariationId,
|
|
4096
4134
|
content: m,
|
|
4097
4135
|
showContent: !1,
|
|
@@ -4137,13 +4175,13 @@ function Fs(e, t, n, o, s, r) {
|
|
|
4137
4175
|
}), null, 16, ["content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4138
4176
|
], 64);
|
|
4139
4177
|
}
|
|
4140
|
-
const
|
|
4178
|
+
const Hs = /* @__PURE__ */ y(Ms, [["render", Ds]]), js = async ({
|
|
4141
4179
|
builderContextValue: e,
|
|
4142
4180
|
symbol: t
|
|
4143
4181
|
}) => {
|
|
4144
4182
|
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
4145
4183
|
(e != null && e.apiKey))
|
|
4146
|
-
return
|
|
4184
|
+
return fe({
|
|
4147
4185
|
model: t.model,
|
|
4148
4186
|
apiKey: e.apiKey,
|
|
4149
4187
|
apiVersion: e.apiVersion,
|
|
@@ -4155,9 +4193,9 @@ const Us = /* @__PURE__ */ y(Ns, [["render", Fs]]), Os = async ({
|
|
|
4155
4193
|
}).catch((n) => {
|
|
4156
4194
|
T.error("Could not fetch symbol content: ", n);
|
|
4157
4195
|
});
|
|
4158
|
-
},
|
|
4196
|
+
}, Ks = f({
|
|
4159
4197
|
name: "builder-symbol",
|
|
4160
|
-
components: { ContentVariants:
|
|
4198
|
+
components: { ContentVariants: Hs },
|
|
4161
4199
|
props: [
|
|
4162
4200
|
"attributes",
|
|
4163
4201
|
"symbol",
|
|
@@ -4169,7 +4207,7 @@ const Us = /* @__PURE__ */ y(Ns, [["render", Fs]]), Os = async ({
|
|
|
4169
4207
|
],
|
|
4170
4208
|
data() {
|
|
4171
4209
|
var e;
|
|
4172
|
-
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs:
|
|
4210
|
+
return { contentToUse: (e = this.symbol) == null ? void 0 : e.content, filterAttrs: U };
|
|
4173
4211
|
},
|
|
4174
4212
|
mounted() {
|
|
4175
4213
|
this.setContent();
|
|
@@ -4186,7 +4224,7 @@ const Us = /* @__PURE__ */ y(Ns, [["render", Fs]]), Os = async ({
|
|
|
4186
4224
|
className() {
|
|
4187
4225
|
var e, t;
|
|
4188
4226
|
return [
|
|
4189
|
-
this.attributes[
|
|
4227
|
+
this.attributes[ae()],
|
|
4190
4228
|
"builder-symbol",
|
|
4191
4229
|
(e = this.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
4192
4230
|
(t = this.symbol) != null && t.dynamic || this.dynamic ? "builder-dynamic-symbol" : void 0
|
|
@@ -4200,7 +4238,7 @@ const Us = /* @__PURE__ */ y(Ns, [["render", Fs]]), Os = async ({
|
|
|
4200
4238
|
},
|
|
4201
4239
|
methods: {
|
|
4202
4240
|
setContent() {
|
|
4203
|
-
this.contentToUse ||
|
|
4241
|
+
this.contentToUse || js({
|
|
4204
4242
|
symbol: this.symbol,
|
|
4205
4243
|
builderContextValue: this.builderContext
|
|
4206
4244
|
}).then((e) => {
|
|
@@ -4209,8 +4247,8 @@ const Us = /* @__PURE__ */ y(Ns, [["render", Fs]]), Os = async ({
|
|
|
4209
4247
|
}
|
|
4210
4248
|
}
|
|
4211
4249
|
});
|
|
4212
|
-
function
|
|
4213
|
-
var a, l,
|
|
4250
|
+
function zs(e, t, n, o, s, r) {
|
|
4251
|
+
var a, l, c, m, d;
|
|
4214
4252
|
const i = k("content-variants");
|
|
4215
4253
|
return u(), h("div", w({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, E(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4216
4254
|
A(i, {
|
|
@@ -4225,9 +4263,9 @@ function Ms(e, t, n, o, s, r) {
|
|
|
4225
4263
|
data: {
|
|
4226
4264
|
...(l = e.symbol) == null ? void 0 : l.data,
|
|
4227
4265
|
...e.builderContext.localState,
|
|
4228
|
-
...(m = (
|
|
4266
|
+
...(m = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : m.state
|
|
4229
4267
|
},
|
|
4230
|
-
model: (
|
|
4268
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
4231
4269
|
content: e.contentToUse,
|
|
4232
4270
|
linkComponent: e.builderLinkComponent,
|
|
4233
4271
|
blocksWrapper: "div",
|
|
@@ -4235,18 +4273,18 @@ function Ms(e, t, n, o, s, r) {
|
|
|
4235
4273
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|
|
4236
4274
|
], 16);
|
|
4237
4275
|
}
|
|
4238
|
-
const
|
|
4239
|
-
function
|
|
4276
|
+
const qs = /* @__PURE__ */ y(Ks, [["render", zs]]), Te = {};
|
|
4277
|
+
function or(e) {
|
|
4240
4278
|
if (I()) {
|
|
4241
|
-
Object.assign(
|
|
4279
|
+
Object.assign(Te, e);
|
|
4242
4280
|
const t = {
|
|
4243
4281
|
type: "builder.settingsChange",
|
|
4244
|
-
data:
|
|
4282
|
+
data: Te
|
|
4245
4283
|
};
|
|
4246
4284
|
parent.postMessage(t, "*");
|
|
4247
4285
|
}
|
|
4248
4286
|
}
|
|
4249
|
-
const
|
|
4287
|
+
const sr = async (e) => {
|
|
4250
4288
|
var o, s, r;
|
|
4251
4289
|
const t = e.path || ((o = e.url) == null ? void 0 : o.pathname) || ((s = e.userAttributes) == null ? void 0 : s.urlPath), n = {
|
|
4252
4290
|
...e,
|
|
@@ -4258,51 +4296,51 @@ const Xs = async (e) => {
|
|
|
4258
4296
|
urlPath: t
|
|
4259
4297
|
} : {}
|
|
4260
4298
|
},
|
|
4261
|
-
options:
|
|
4299
|
+
options: Xe(e.searchParams || ((r = e.url) == null ? void 0 : r.searchParams) || e.options)
|
|
4262
4300
|
};
|
|
4263
4301
|
return {
|
|
4264
4302
|
apiKey: n.apiKey,
|
|
4265
4303
|
model: n.model,
|
|
4266
|
-
content: await
|
|
4304
|
+
content: await fe(n)
|
|
4267
4305
|
};
|
|
4268
4306
|
};
|
|
4269
4307
|
export {
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4308
|
+
rs as A,
|
|
4309
|
+
ue as B,
|
|
4310
|
+
tn as C,
|
|
4311
|
+
fe as D,
|
|
4312
|
+
Qs as E,
|
|
4313
|
+
sn as F,
|
|
4314
|
+
Zs as G,
|
|
4315
|
+
mn as I,
|
|
4316
|
+
bn as S,
|
|
4317
|
+
V as T,
|
|
4318
|
+
Lo as V,
|
|
4319
|
+
pe as _,
|
|
4320
|
+
_t as a,
|
|
4321
|
+
Xs as b,
|
|
4322
|
+
F as c,
|
|
4323
|
+
er as d,
|
|
4286
4324
|
y as e,
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4325
|
+
Q as f,
|
|
4326
|
+
Ne as g,
|
|
4327
|
+
_s as h,
|
|
4328
|
+
ae as i,
|
|
4329
|
+
oe as j,
|
|
4330
|
+
bt as k,
|
|
4331
|
+
qs as l,
|
|
4332
|
+
Hn as m,
|
|
4295
4333
|
_ as n,
|
|
4296
|
-
|
|
4334
|
+
Hs as o,
|
|
4297
4335
|
R as p,
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4336
|
+
is as q,
|
|
4337
|
+
Do as r,
|
|
4338
|
+
ws as s,
|
|
4339
|
+
or as t,
|
|
4340
|
+
Xe as u,
|
|
4341
|
+
tr as v,
|
|
4342
|
+
Fs as w,
|
|
4343
|
+
nr as x,
|
|
4344
|
+
sr as y,
|
|
4345
|
+
ss as z
|
|
4308
4346
|
};
|